Skip to content

Commit

Permalink
arm64: dts: meson-g12: split emmc pins to select 4 or 8 bus width
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Kevin Hilman <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
  • Loading branch information
superna9999 authored and khilman committed Mar 17, 2020
1 parent 5fa86f4 commit 4d2cb37
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 17 deletions.
40 changes: 30 additions & 10 deletions arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -295,17 +295,9 @@
};
};

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>;
Expand All @@ -319,6 +311,34 @@
};
};

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";
Expand Down
2 changes: 1 addition & 1 deletion arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@
/* 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";

Expand Down
2 changes: 1 addition & 1 deletion arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@
/* 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";

Expand Down
2 changes: 1 addition & 1 deletion arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@
/* 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";

Expand Down
2 changes: 1 addition & 1 deletion arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@
/* 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";

Expand Down
2 changes: 1 addition & 1 deletion arch/arm64/boot/dts/amlogic/meson-g12b-ugoos-am6.dts
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@
/* 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";

Expand Down
2 changes: 1 addition & 1 deletion arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@
/* 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";

Expand Down
2 changes: 1 addition & 1 deletion arch/arm64/boot/dts/amlogic/meson-sm1-sei610.dts
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@
/* 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";

Expand Down

0 comments on commit 4d2cb37

Please sign in to comment.