arm64: dts: sparx5: Add Sparx5 eMMC support
authorLars Povlsen <lars.povlsen@microchip.com>
Tue, 28 Apr 2020 12:40:23 +0000 (14:40 +0200)
committerLars Povlsen <lars.povlsen@microchip.com>
Wed, 16 Sep 2020 07:29:08 +0000 (09:29 +0200)
This adds eMMC support to the applicable Sparx5 board configuration
files.

Signed-off-by: Lars Povlsen <lars.povlsen@microchip.com>
Link: https://lore.kernel.org/r/20200825081357.32354-4-lars.povlsen@microchip.com
arch/arm64/boot/dts/microchip/sparx5.dtsi
arch/arm64/boot/dts/microchip/sparx5_pcb125.dts
arch/arm64/boot/dts/microchip/sparx5_pcb134_emmc.dts
arch/arm64/boot/dts/microchip/sparx5_pcb135_emmc.dts

index cf712e8..d477fcb 100644 (file)
@@ -5,6 +5,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/clock/microchip,sparx5.h>
 
 / {
        compatible = "microchip,sparx5";
                        interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
                };
 
+               sdhci0: mmc@600800000 {
+                       compatible = "microchip,dw-sparx5-sdhci";
+                       status = "disabled";
+                       reg = <0x6 0x00800000 0x1000>;
+                       pinctrl-0 = <&emmc_pins>;
+                       pinctrl-names = "default";
+                       clocks = <&clks CLK_ID_AUX1>;
+                       clock-names = "core";
+                       assigned-clocks = <&clks CLK_ID_AUX1>;
+                       assigned-clock-rates = <800000000>;
+                       interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
+                       bus-width = <8>;
+               };
+
                gpio: pinctrl@6110101e0 {
                        compatible = "microchip,sparx5-pinctrl";
                        reg = <0x6 0x110101e0 0x90>, <0x6 0x10508010 0x100>;
                                pins = "GPIO_28", "GPIO_29";
                                function = "twi2";
                        };
+
+                       emmc_pins: emmc-pins {
+                               pins = "GPIO_34", "GPIO_35", "GPIO_36",
+                                       "GPIO_37", "GPIO_38", "GPIO_39",
+                                       "GPIO_40", "GPIO_41", "GPIO_42",
+                                       "GPIO_43", "GPIO_44", "GPIO_45",
+                                       "GPIO_46", "GPIO_47";
+                               function = "emmc";
+                       };
                };
 
                i2c0: i2c@600101000 {
index 91ee5b6..573309f 100644 (file)
        };
 };
 
+&gpio {
+       emmc_pins: emmc-pins {
+               /* NB: No "GPIO_35", "GPIO_36", "GPIO_37"
+                * (N/A: CARD_nDETECT, CARD_WP, CARD_LED)
+                */
+               pins = "GPIO_34", "GPIO_38", "GPIO_39",
+                       "GPIO_40", "GPIO_41", "GPIO_42",
+                       "GPIO_43", "GPIO_44", "GPIO_45",
+                       "GPIO_46", "GPIO_47";
+               drive-strength = <3>;
+               function = "emmc";
+       };
+};
+
+&sdhci0 {
+       status = "okay";
+       bus-width = <8>;
+       non-removable;
+       pinctrl-0 = <&emmc_pins>;
+       max-frequency = <8000000>;
+       microchip,clock-delay = <10>;
+};
+
 &i2c1 {
        status = "okay";
 };
index 10081a6..bbb9852 100644 (file)
                reg = <0x00000000 0x00000000 0x10000000>;
        };
 };
+
+&gpio {
+       emmc_pins: emmc-pins {
+               /* NB: No "GPIO_35", "GPIO_36", "GPIO_37"
+                * (N/A: CARD_nDETECT, CARD_WP, CARD_LED)
+                */
+               pins = "GPIO_34", "GPIO_38", "GPIO_39",
+                       "GPIO_40", "GPIO_41", "GPIO_42",
+                       "GPIO_43", "GPIO_44", "GPIO_45",
+                       "GPIO_46", "GPIO_47";
+               drive-strength = <3>;
+               function = "emmc";
+       };
+};
+
+&sdhci0 {
+       status = "okay";
+       pinctrl-0 = <&emmc_pins>;
+       non-removable;
+       max-frequency = <52000000>;
+       bus-width = <8>;
+       microchip,clock-delay = <10>;
+};
index 741f0e1..f82266f 100644 (file)
                reg = <0x00000000 0x00000000 0x10000000>;
        };
 };
+
+&gpio {
+       emmc_pins: emmc-pins {
+               /* NB: No "GPIO_35", "GPIO_36", "GPIO_37"
+                * (N/A: CARD_nDETECT, CARD_WP, CARD_LED)
+                */
+               pins = "GPIO_34", "GPIO_38", "GPIO_39",
+                       "GPIO_40", "GPIO_41", "GPIO_42",
+                       "GPIO_43", "GPIO_44", "GPIO_45",
+                       "GPIO_46", "GPIO_47";
+               drive-strength = <3>;
+               function = "emmc";
+       };
+};
+
+&sdhci0 {
+       status = "okay";
+       pinctrl-0 = <&emmc_pins>;
+       non-removable;
+       max-frequency = <52000000>;
+       bus-width = <8>;
+       microchip,clock-delay = <10>;
+};