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.

AM3352: Relation between PinMuxTool to u-boot mux

Part Number: AM3352

Hi

I use am3352 in my custom board, based on the beaglebone black.

I have a SD card connected to MMC0, the same as BBB.

However, I use different pin for card detection.

BBB uses GPIO0_6, and I use GPIO3_14.

I've created the pinmux configuration using PINMUX TOOL.

Assuming I use the same .dts file structure as BBB, where should I change this pin definition.

I've tried to temporarly change the am335x-bone-common.dtsi

0x160 (PIN_INPUT | MUX_MODE7) /* GPIO0_6 */

AM33XX_IOPAD(0x990, PIN_INPUT | MUX_MODE4) /* (A13) mcasp0_aclkx.mmc0_sdcd */


Unfortunately, I get the same error.

*** Warning - No MMC card found

Where should I change the pin definition?
Moreover, I've found the difference in pin definition in .dts files from u-boot GIT and from PINMUX TOOL.

0x160 (PIN_INPUT | MUX_MODE7) /* GPIO0_6 */

AM33XX_IOPAD(0x990, PIN_INPUT | MUX_MODE4) /* (A13) mcasp0_aclkx.mmc0_sdcd */



Are both these definiotions valid?

  • Hi Maciej,

    In addition to dts file change, additional change is needed in "board/ti/am335x/mux.c".
    Also note that AM335x/AM437x mmc0 (in mux, and TRM) is "mapped" to mmc1 in the device tree.
    Let me using BBB mmc0 Card Detection (CD) as an example:

    1/. "am335x-bone-common.dtsi":

    ...
    	mmc1_pins: pinmux_mmc1_pins {
    		pinctrl-single,pins = <
    			0x160 (PIN_INPUT | MUX_MODE7) /* GPIO0_6 */
    		>;
    	};
    ...
    	&mmc1 {
    	status = "okay";
    	bus-width = <0x4>;
    	pinctrl-names = "default";
    	pinctrl-0 = <&mmc1_pins>;
    	cd-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
    	};
    ...

    2/. "board/ti/am335x/mux.c".  Note the very last line on GPIO0_6 pinmux setup for SD card detection

    ...
    static struct module_pin_mux mmc0_pin_mux[] = {
    	{OFFSET(mmc0_dat3), (MODE(0) | RXACTIVE | PULLUP_EN)},	/* MMC0_DAT3 */
    	{OFFSET(mmc0_dat2), (MODE(0) | RXACTIVE | PULLUP_EN)},	/* MMC0_DAT2 */
    	{OFFSET(mmc0_dat1), (MODE(0) | RXACTIVE | PULLUP_EN)},	/* MMC0_DAT1 */
    	{OFFSET(mmc0_dat0), (MODE(0) | RXACTIVE | PULLUP_EN)},	/* MMC0_DAT0 */
    	{OFFSET(mmc0_clk), (MODE(0) | RXACTIVE | PULLUP_EN)},	/* MMC0_CLK */
    	{OFFSET(mmc0_cmd), (MODE(0) | RXACTIVE | PULLUP_EN)},	/* MMC0_CMD */
    	{OFFSET(mcasp0_aclkr), (MODE(4) | RXACTIVE)},		/* MMC0_WP */
    	{OFFSET(spi0_cs1), (MODE(7) | RXACTIVE | PULLUP_EN)},	/* GPIO0_6 */
    	{-1},
    };
    ...

    Best,

    -Hong