This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

uboot enable spi1 fail

Other Parts Discussed in Thread: AM3359

Hi, all

I am using TI platform for AM335x, with am3359 bring up Board, download SDK from the following URL

http://software-dl.ti.com/sitara_linux/esd/AM335xSDK/06_00_00_00/index_FDS.html


I have tried SPI0 for my bring up board, it worked, could measure waveform from oscilloscope, could control by uboot shell.

U-Boot# help sspi                                                               
sspi - SPI utility command                                                      
                                                                                
Usage:                                                                          
sspi [<bus>:]<cs>[.<mode>] <bit_len> <dout> - Send and receive bits             
<bus>     - Identifies the SPI bus                                              
<cs>      - Identifies the chip select                                          
<mode>    - Identifies the SPI mode to use                                      
<bit_len> - Number of bits to send (base 10)                                    
<dout>    - Hexadecimal string that gets sent                                   
U-Boot# sspi 0 32 1a                                                            
FFFFFFFF

 

Now i am going to enable spi1 for my bring up board, the following is my code in mux.c

static struct module_pin_mux spi1_pin_mux[] = {
    {OFFSET(mcasp0_aclkx), (MODE(2) | RXACTIVE | PULLUDEN)},    /* SPI1_SCLK */
    {OFFSET(mcasp0_fsx), (MODE(2) | RXACTIVE | PULLUDEN | PULLUP_EN)},            /* SPI1_D0 */
    {OFFSET(mcasp0_axr0), (MODE(2) | RXACTIVE | PULLUDEN)},    /* SPI1_D1 */
    {OFFSET(mcasp0_ahclkr), (MODE(3) | RXACTIVE | PULLUDEN | PULLUP_EN)},            /* SPI1_CS0 */
    {-1},
};

void enable_board_pin_mux(struct am335x_baseboard_id *header){

    configure_module_pin_mux(spi0_pin_mux);//SPI0

    configure_module_pin_mux(spi1_pin_mux);//SPI1

}

After I add the above code , rebuild it and program, using the memory browser to look for SPI1 register, it seems that the SPI1 register enable fail. Does anyone know how to solve this issue?