arm64: dts: meson-g12: split emmc pins to select 4 or 8 bus width
authorNeil Armstrong <narmstrong@baylibre.com>
Fri, 13 Mar 2020 09:07:10 +0000 (10:07 +0100)
committerKevin Hilman <khilman@baylibre.com>
Tue, 17 Mar 2020 22:14:44 +0000 (15:14 -0700)
The Khadas VIM3 shares the eMMC pins 4 to 7 with the SPI NOR, in order
to enable the eMMC and the SPI NOR interface, we need to omit the
4 last pins from the eMMC pinctrl.

As it was done for the Khadas VIM2, split the eMMC pinctrls in ctrl, data
and ds pins with either 4bits data or 8bits data, and update the current
board accordingly.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Link: https://lore.kernel.org/r/20200313090713.15147-2-narmstrong@baylibre.com
arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts
arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts
arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts
arch/arm64/boot/dts/amlogic/meson-g12b-ugoos-am6.dts
arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi
arch/arm64/boot/dts/amlogic/meson-sm1-sei610.dts

index f503ba104c71002ef4ad8de95f2805e3f6fcf8e0..35f50a6895a29fcad23a9f80de4f79cfc19851a8 100644 (file)
                                                };
                                        };
 
-                                       emmc_pins: emmc {
+                                       emmc_ctrl_pins: emmc-ctrl {
                                                mux-0 {
-                                                       groups = "emmc_nand_d0",
-                                                                "emmc_nand_d1",
-                                                                "emmc_nand_d2",
-                                                                "emmc_nand_d3",
-                                                                "emmc_nand_d4",
-                                                                "emmc_nand_d5",
-                                                                "emmc_nand_d6",
-                                                                "emmc_nand_d7",
-                                                                "emmc_cmd";
+                                                       groups = "emmc_cmd";
                                                        function = "emmc";
                                                        bias-pull-up;
                                                        drive-strength-microamp = <4000>;
                                                };
                                        };
 
+                                       emmc_data_4b_pins: emmc-data-4b {
+                                               mux-0 {
+                                                       groups = "emmc_nand_d0",
+                                                                "emmc_nand_d1",
+                                                                "emmc_nand_d2",
+                                                                "emmc_nand_d3";
+                                                       function = "emmc";
+                                                       bias-pull-up;
+                                                       drive-strength-microamp = <4000>;
+                                               };
+                                       };
+
+                                       emmc_data_8b_pins: emmc-data-8b {
+                                               mux-0 {
+                                                       groups = "emmc_nand_d0",
+                                                                "emmc_nand_d1",
+                                                                "emmc_nand_d2",
+                                                                "emmc_nand_d3",
+                                                                "emmc_nand_d4",
+                                                                "emmc_nand_d5",
+                                                                "emmc_nand_d6",
+                                                                "emmc_nand_d7";
+                                                       function = "emmc";
+                                                       bias-pull-up;
+                                                       drive-strength-microamp = <4000>;
+                                               };
+                                       };
+
                                        emmc_ds_pins: emmc-ds {
                                                mux {
                                                        groups = "emmc_nand_ds";
index 168f460e11fadbc1a990debc6056a84d60e1f000..b00d0468c7534ab49ad346d303b43e182176a3c4 100644 (file)
 /* eMMC */
 &sd_emmc_c {
        status = "okay";
-       pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
+       pinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_8b_pins>, <&emmc_ds_pins>;
        pinctrl-1 = <&emmc_clk_gate_pins>;
        pinctrl-names = "default", "clk-gate";
 
index 2a324f0136e3fc404dc243d4985e889634b79352..a26bfe72550fe47cb94dab419adc15531a8d2b0e 100644 (file)
 /* eMMC */
 &sd_emmc_c {
        status = "okay";
-       pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
+       pinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_8b_pins>, <&emmc_ds_pins>;
        pinctrl-1 = <&emmc_clk_gate_pins>;
        pinctrl-names = "default", "clk-gate";
 
index 4f2596d829890f12ecafde8789d499e80739d85e..1b07c8c06eac58d2da18c0c6ba0c265388fcfd9b 100644 (file)
 /* eMMC */
 &sd_emmc_c {
        status = "okay";
-       pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
+       pinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_8b_pins>, <&emmc_ds_pins>;
        pinctrl-1 = <&emmc_clk_gate_pins>;
        pinctrl-names = "default", "clk-gate";
 
index 8830d38448854896604c3eed50eeb3894f157963..b59ae1a297f26520ca81e33b57e21395a8bbb7a2 100644 (file)
 /* eMMC */
 &sd_emmc_c {
        status = "okay";
-       pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
+       pinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_8b_pins>, <&emmc_ds_pins>;
        pinctrl-1 = <&emmc_clk_gate_pins>;
        pinctrl-names = "default", "clk-gate";
 
index ccd0bced01e81e8fb8435104125f12dcec65e3d2..325e448eb09c3ee43bedb2ae3c895012c6381242 100644 (file)
 /* eMMC */
 &sd_emmc_c {
        status = "okay";
-       pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
+       pinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_8b_pins>, <&emmc_ds_pins>;
        pinctrl-1 = <&emmc_clk_gate_pins>;
        pinctrl-names = "default", "clk-gate";
 
index 0ef60c7151cb45eedbd9d65241ef60b69079de2a..e53cf03339d3c56cfc4fc2348532d15cc833ef0b 100644 (file)
 /* eMMC */
 &sd_emmc_c {
        status = "okay";
-       pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
+       pinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_8b_pins>, <&emmc_ds_pins>;
        pinctrl-1 = <&emmc_clk_gate_pins>;
        pinctrl-names = "default", "clk-gate";
 
index a8bb3fa9fec98e994ce2876b95e81e86b8369c02..71cc730a4913157d2d14b00f2f7a917d562b5d66 100644 (file)
 /* eMMC */
 &sd_emmc_c {
        status = "okay";
-       pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
+       pinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_8b_pins>, <&emmc_ds_pins>;
        pinctrl-1 = <&emmc_clk_gate_pins>;
        pinctrl-names = "default", "clk-gate";