Tool/software: Linux
I have been looking at the device tree for both Uboot and Linux and I have been unable to find where the pinmux settings are for the SD card that is attached to mmc0.
In am335x-evm.dts I found the following which tells me that the pinmux configs are under mmc1_pins:
&mmc1 {
status = "okay";
vmmc-supply = <&vmmc_reg>;
bus-width = <4>;
pinctrl-names = "default";
pinctrl-0 = <&mmc1_pins>;
cd-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
};
When I look up mmc1_pins in the pinmux section I see this:
mmc1_pins: pinmux_mmc1_pins {
pinctrl-single,pins = <
0x160 (PIN_INPUT | MUX_MODE7) /* spi0_cs1.gpio0_6 */
>;
};
Should there not be entries for pins 0x0f0, 0x0f4, 0x0f8, 0x0fc, 0x100, 0x104 as well? I understand the meaning of the 0x160 line but I was expecting the definitions for Data0-2, CLK, CMD as well. I know the ROM boot loader will setup these pins when it looks for the SPL but isn't it prudent to keep these pins defined in the devicetree if you plan to use them?
For reference I was expecting to find something like this:
mmc1_pins: pinmux_mmc1_pins {
pinctrl-single,pins = <
0x100 ( PIN_INPUT | MUX_MODE0 ) /* (G17) mmc0_clk.mmc0_clk */
0x104 ( PIN_INPUT | MUX_MODE0 ) /* (G18) mmc0_cmd.mmc0_cmd */
0xfc ( PIN_INPUT | MUX_MODE0 ) /* (G16) mmc0_dat0.mmc0_dat0 */
0xf8 ( PIN_INPUT | MUX_MODE0 ) /* (G15) mmc0_dat1.mmc0_dat1 */
0xf4 ( PIN_INPUT | MUX_MODE0 ) /* (F18) mmc0_dat2.mmc0_dat2 */
0xf0 ( PIN_INPUT | MUX_MODE0 ) /* (F17) mmc0_dat3.mmc0_dat3 */
0x160 ( PIN_INPUT | MUX_MODE7 ) /* (C15) spi0_cs1.mmc0_sdcd */
>;
};
Thanks for any insight,
Tyler
EDIT
I went and decompiled the dtb that my beaglebone black is using (no uboot overlays enabled) and I found much the same for the mmc1:
pinmux_mmc1_pins {
pinctrl-single,pins = <0x160 0x2f>;
linux,phandle = <0x38>;
phandle = <0x38>;
};
So I am convinced that there is no pinmux configs for the SD card bus and I believe this is because the rom bootloader is setting up the pinmux, but I am still left my original question of isn't it prudent to keep these pins defined in the devicetree if you plan to use them or is there a very good reason not to touch the pinmux registers for these pins once they are set by the rom bootloader?
Tyler