]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
ARM: dts: stm32: Auto-detect DHSOM with uSD level translator
authorMarek Vasut <marex@denx.de>
Sat, 13 Nov 2021 02:29:44 +0000 (03:29 +0100)
committerPatrice Chotard <patrice.chotard@foss.st.com>
Tue, 30 Nov 2021 15:43:28 +0000 (16:43 +0100)
The uSD level translator on DHSOM and Avenger96 are optional, however it
is possible to auto-detect it. This is done by setting SD CMD line high,
and then testing whether signal level on CK line matches the signal level
on CKIN line. If so, the uSD level translator is present, otherwise it is
not populated.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Patrice Chotard <patrice.chotard@foss.st.com>
Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
arch/arm/dts/stm32mp15xx-dhcom-u-boot.dtsi
arch/arm/dts/stm32mp15xx-dhcor-avenger96-u-boot.dtsi

index 71b0486f02a940d7c9fb0f2b44eefbccae9ca28e..5b2b09bcfb9e63c39bac81157b5ecb240d7dca97 100644 (file)
 
 &sdmmc1 {
        u-boot,dm-spl;
+       st,use-ckin;
+       st,cmd-gpios = <&gpiod 2 0>;
+       st,ck-gpios = <&gpioc 12 0>;
+       st,ckin-gpios = <&gpioe 4 0>;
 };
 
 &sdmmc1_b4_pins_a {
index 4b1dbf0838752edaf8125b9ad9e07bfa619a0962..c96eba99c5ee1ee5f94c1dd812cdc116ce7d9622 100644 (file)
 
 &sdmmc1 {
        u-boot,dm-spl;
+       st,use-ckin;
+       st,cmd-gpios = <&gpiod 2 0>;
+       st,ck-gpios = <&gpioc 12 0>;
+       st,ckin-gpios = <&gpioe 4 0>;
 };
 
 &sdmmc1_b4_pins_a {