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.

AM335X Reset Release Mode for SPI0 Pins

Other Parts Discussed in Thread: AM3357

Hi,

the system I used is:

SDK version: ti-processor-sdk-linux-am335x-evm-01.00.00.00
Processor: AM3357
Package: ZCZ

My purpose is to use PIN NAME SPI0_SCLK, SPI0_CS0, SPI0_D0 and SPI0_D1 as gpio pins. 

By am3357 datasheet, the RESET REL. MODE of above four pins is "mode 7". That's to say, if I DON'T set any pin-mux in DTS, I will got mode 7 after booting system. After I experimented, I got
{

root@arm:/sys/kernel/debug/pinctrl/44e10800.pinmux# cat pins | grep 44e1095
pin 84 (44e10950.0) 00000020 pinctrl-single
pin 85 (44e10954.0) 00000020 pinctrl-single
pin 86 (44e10958.0) 00000030 pinctrl-single
pin 87 (44e1095c.0) 00000030 pinctrl-single

}

I wonder why these pins are mode 0?

Does anything i ignore to do in source code?

any suggestion welcome, thanks.

In contrast to above experiment, I set spi pin-mux in DTS. And I got the mode as I expected.

{

part 1:

spi0_pins: pinmux_spi0_pins {
pinctrl-single,pins = <
0x150 (PIN_INPUT_PULLUP | MUX_MODE0) /* spi0_sclk.spi0_sclk */
0x154 (PIN_INPUT_PULLUP | MUX_MODE0) /* spi0_d0.spi0_d0 */
0x158 (PIN_OUTPUT_PULLUP | MUX_MODE0) /* spi0_d1.spi0_d1 */
0x15c (PIN_OUTPUT_PULLUP | MUX_MODE0) /* spi0_cs0.spi0_cs0 */
>;
};

root@arm:/sys/kernel/debug/pinctrl/44e10800.pinmux# cat pins | grep 44e1095
pin 84 (44e10950.0) 00000030 pinctrl-single
pin 85 (44e10954.0) 00000030 pinctrl-single
pin 86 (44e10958.0) 00000010 pinctrl-single
pin 87 (44e1095c.0) 00000010 pinctrl-single

part 2:

spi0_pins: pinmux_spi0_pins {
pinctrl-single,pins = <
0x150 (MUX_MODE7) /* spi0_sclk.spi0_sclk */
0x154 (MUX_MODE7) /* spi0_d0.spi0_d0 */
0x158 (MUX_MODE7) /* spi0_d1.spi0_d1 */
0x15c (MUX_MODE7) /* spi0_cs0.spi0_cs0 */
>;
};

root@arm:/proc# cd /sys/kernel/debug/pinctrl/44e1080cat pins | grep 44e1095
pin 84 (44e10950.0) 00000007 pinctrl-single
pin 85 (44e10954.0) 00000007 pinctrl-single
pin 86 (44e10958.0) 00000007 pinctrl-single
pin 87 (44e1095c.0) 00000007 pinctrl-single

}