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.

AM57x pinmux in U-boot v. kernel

I'm a little confused.   I see what seems to be duplicated information in the  u-boot board/ti/am57xx/mux_data.h   file and the 

linux kernels /arch/arm/boot/dts/am57xx-beagle-x15.dts file.

Why would it be necessary to duplicate these?  

Aren't pins once configured by u-boot stable and do not need to re-configured again in the linux kernel?

How do you decide which needs to go in which file?

(snippets from u-boot mux_data.h)

{SPI1_D1, (M14 | PIN_INPUT_PULLDOWN)}, /* spi1_d1.gpio7_8 */
{SPI1_D0, (M14 | PIN_INPUT_PULLDOWN)}, /* spi1_d0.gpio7_9 */

{SPI2_SCLK, (M14 | PIN_INPUT_PULLDOWN)},/* spi2_sclk.gpio7_14 */
{SPI2_D1, (M14 | PIN_INPUT_PULLDOWN)}, /* spi2_d1.gpio7_15 */

{I2C2_SDA, (M1 | PIN_INPUT)}, /* i2c2_sda.hdmi1_ddc_scl */
{I2C2_SCL, (M1 | PIN_INPUT)}, /* i2c2_scl.hdmi1_ddc_sda *\

(Apparently duplicated info in the linux kernel am57xx-beagle-x15.dts)

&dra7_pmx_core {

leds_pins_default: leds_pins_default {
pinctrl-single,pins = <
0x3a8 (PIN_OUTPUT | MUX_MODE14) /* spi1_d1.gpio7_8 */
0x3ac (PIN_OUTPUT | MUX_MODE14) /* spi1_d0.gpio7_9 */
0x3c0 (PIN_OUTPUT | MUX_MODE14) /* spi2_sclk.gpio7_14 */
0x3c4 (PIN_OUTPUT | MUX_MODE14) /* spi2_d1.gpio7_15 */
>;
};


hdmi_pins: pinmux_hdmi_pins {
pinctrl-single,pins = <
0x408 (PIN_INPUT | MUX_MODE1) /* i2c2_sda.hdmi1_ddc_scl */
0x40c (PIN_INPUT | MUX_MODE1) /* i2c2_scl.hdmi1_ddc_sda */
>;
};

  • Hi Tom,

    Tom Antles said:
    Aren't pins once configured by u-boot stable and do not need to re-configured again in the linux kernel?

    This is to be sure there will be no  erroneous pin configurations when kernel takes over.  

    Best Regards,

    Yordan

  • I do not understand your reply. Would you please tell me if these statements are correct:

    1) once a pin mux setting is configured in u-boot using mux.h file, there is NO need to configure that pin again in the linux kernel *.dts file

    2) the fact that the am57xx evm linux kernel reconfigures pin mux settings using the *.dts file is unnecessary as these pin mux settings were previously set in u-boot