Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mmc in kernel not support ? #6

Open
salara1960 opened this issue Nov 28, 2022 · 2 comments
Open

mmc in kernel not support ? #6

salara1960 opened this issue Nov 28, 2022 · 2 comments

Comments

@salara1960
Copy link

Good day.
How can I make support for mmc-card (on sdio2) ?
I edited the file stm32f769-disco.dtb, added the following lines to it:
aliases {
mmc0 = &sdio2;
serial0 = &usart1;
};

&sdio2 {
status="okay";
cd-gpios = <&gpiod 7 0>;
cd-inverted;
pinctrl-names = "default", "opendrain";
pinctrl-1 = <&sdio_pins_b>;
pinctrl-1 = <&sdio_pins_od_b>;
bus-width = <4>;
max-frequency = <25000000>;
};

and in the file stm32f746.dtb:
sdio_pins_b: sdio_pins_b@0 {
pins {
pinmux = <STM32_PINMUX('G', 9, AF10)>, //<STM32F769_PG9_FUNC_SDMMC2_D0>,
<STM32_PINMUX('G', 10, AF10)>, //<STM32F769_PG10_FUNC_SDMMC2_D1>,
<STM32_PINMUX('B', 3, AF10)>,//<STM32F769_PB3_FUNC_SDMMC2_D2>,
<STM32_PINMUX('B', 4, AF10)>,//<STM32F769_PB4_FUNC_SDMMC2_D3>,
<STM32_PINMUX('D', 6, AF10)>,//<STM32F769_PD6_FUNC_SDMMC2_CLK>,
<STM32_PINMUX('D', 7, AF10)>;//<STM32F769_PD7_FUNC_SDMMC2_CMD>;
drive-push-pull;
slew-rate = <2>;
};
};

sdio_pins_od_b: sdio_pins_od_b@0 {
pins1 {
pinmux = <STM32_PINMUX('G', 9, AF10)>, //<STM32F769_PG9_FUNC_SDMMC2_D0>,
<STM32_PINMUX('G', 10, AF10)>, //<STM32F769_PG10_FUNC_SDMMC2_D1>,
<STM32_PINMUX('B', 3, AF10)>, //<STM32F769_PB3_FUNC_SDMMC2_D2>,
<STM32_PINMUX('B', 4, AF10)>, //<STM32F769_PB4_FUNC_SDMMC2_D3>,
<STM32_PINMUX('D', 6, AF10)>; //<STM32F769_PD6_FUNC_SDMMC2_CLK>;
drive-push-pull;
slew-rate = <2>;
};
pins2 {
pinmux = <STM32_PINMUX('D', 7, AF10)>; //<STM32F769_PD7_FUNC_SDMMC2_CMD>;
drive-open-drain;
slew-rate = <2>;
};
};

sdio2: sdio2@40011c00 {
compatible = "st,stm32f7-sdio";
reg=<0x40011c00 0x400>;
clocks = <&rcc 0 167>;
interrupts = <103>;
status="enabled";
pinctrl-0 = <&sdio_pins_b>;
pinctrl-1 = <&sdio_pins_od_b>;
pinctrl-names = "default", "opendrain";
max-frequency = <24000000>;
};

but the kernel does not "see" this device.
I did something wrong in the description of this device.
What exactly, can you suggest?

@pauleffect90
Copy link

did you manage to get it working?

@salara1960
Copy link
Author

"did you manage to get it working?" - no, I found a project in which mmс support is done correctly -> https://github.com/adrianalin/STM32F769I-disco_Buildroot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants