Skip to content

Commit

Permalink
ARM64: dts: meson: add mmc clk gate pins
Browse files Browse the repository at this point in the history
Add the pinctrl to switch mmc clk pins in gpio (pulled down) mode. This
is necessary to be able to gate the clk outside of the SoC while
keeping it running in the controller

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
  • Loading branch information
Jerome Brunet authored and Kevin Hilman committed Sep 5, 2017
1 parent 673ccaa commit 67e7607
Show file tree
Hide file tree
Showing 13 changed files with 126 additions and 31 deletions.
9 changes: 6 additions & 3 deletions arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@
&sd_emmc_a {
status = "okay";
pinctrl-0 = <&sdio_pins>;
pinctrl-names = "default";
pinctrl-1 = <&sdio_clk_gate_pins>;
pinctrl-names = "default", "clk-gate";
#address-cells = <1>;
#size-cells = <0>;

Expand All @@ -194,7 +195,8 @@
&sd_emmc_b {
status = "okay";
pinctrl-0 = <&sdcard_pins>;
pinctrl-names = "default";
pinctrl-1 = <&sdcard_clk_gate_pins>;
pinctrl-names = "default", "clk-gate";

bus-width = <4>;
cap-sd-highspeed;
Expand All @@ -212,7 +214,8 @@
&sd_emmc_c {
status = "okay";
pinctrl-0 = <&emmc_pins>;
pinctrl-names = "default";
pinctrl-1 = <&emmc_clk_gate_pins>;
pinctrl-names = "default", "clk-gate";

bus-width = <8>;
cap-mmc-highspeed;
Expand Down
9 changes: 6 additions & 3 deletions arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,8 @@
&sd_emmc_a {
status = "okay";
pinctrl-0 = <&sdio_pins>, <&sdio_irq_pins>;
pinctrl-names = "default";
pinctrl-1 = <&sdio_clk_gate_pins>;
pinctrl-names = "default", "clk-gate";
#address-cells = <1>;
#size-cells = <0>;

Expand All @@ -276,7 +277,8 @@
&sd_emmc_b {
status = "okay";
pinctrl-0 = <&sdcard_pins>;
pinctrl-names = "default";
pinctrl-1 = <&sdcard_clk_gate_pins>;
pinctrl-names = "default", "clk-gate";

bus-width = <4>;
cap-sd-highspeed;
Expand All @@ -294,7 +296,8 @@
&sd_emmc_c {
status = "disabled";
pinctrl-0 = <&emmc_pins>;
pinctrl-names = "default";
pinctrl-1 = <&emmc_clk_gate_pins>;
pinctrl-names = "default", "clk-gate";

bus-width = <8>;
max-frequency = <200000000>;
Expand Down
11 changes: 7 additions & 4 deletions arch/arm64/boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
/ {
compatible = "nexbox,a95x", "amlogic,meson-gxbb";
model = "NEXBOX A95X";

aliases {
serial0 = &uart_AO;
};
Expand Down Expand Up @@ -232,7 +232,8 @@
&sd_emmc_a {
status = "okay";
pinctrl-0 = <&sdio_pins>;
pinctrl-names = "default";
pinctrl-1 = <&sdio_clk_gate_pins>;
pinctrl-names = "default", "clk-gate";
#address-cells = <1>;
#size-cells = <0>;

Expand All @@ -253,7 +254,8 @@
&sd_emmc_b {
status = "okay";
pinctrl-0 = <&sdcard_pins>;
pinctrl-names = "default";
pinctrl-1 = <&sdcard_clk_gate_pins>;
pinctrl-names = "default", "clk-gate";

bus-width = <4>;
cap-sd-highspeed;
Expand All @@ -271,7 +273,8 @@
&sd_emmc_c {
status = "okay";
pinctrl-0 = <&emmc_pins>;
pinctrl-names = "default";
pinctrl-1 = <&emmc_clk_gate_pins>;
pinctrl-names = "default", "clk-gate";

bus-width = <8>;
cap-mmc-highspeed;
Expand Down
8 changes: 5 additions & 3 deletions arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
/ {
compatible = "hardkernel,odroid-c2", "amlogic,meson-gxbb";
model = "Hardkernel ODROID-C2";

aliases {
serial0 = &uart_AO;
};
Expand Down Expand Up @@ -253,7 +253,8 @@
&sd_emmc_b {
status = "okay";
pinctrl-0 = <&sdcard_pins>;
pinctrl-names = "default";
pinctrl-1 = <&sdcard_clk_gate_pins>;
pinctrl-names = "default", "clk-gate";

bus-width = <4>;
cap-sd-highspeed;
Expand All @@ -271,7 +272,8 @@
&sd_emmc_c {
status = "okay";
pinctrl-0 = <&emmc_pins>;
pinctrl-names = "default";
pinctrl-1 = <&emmc_clk_gate_pins>;
pinctrl-names = "default", "clk-gate";

bus-width = <8>;
max-frequency = <200000000>;
Expand Down
9 changes: 6 additions & 3 deletions arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,8 @@
&sd_emmc_a {
status = "okay";
pinctrl-0 = <&sdio_pins>;
pinctrl-names = "default";
pinctrl-1 = <&sdio_clk_gate_pins>;
pinctrl-names = "default", "clk-gate";
#address-cells = <1>;
#size-cells = <0>;

Expand All @@ -220,7 +221,8 @@
&sd_emmc_b {
status = "okay";
pinctrl-0 = <&sdcard_pins>;
pinctrl-names = "default";
pinctrl-1 = <&sdcard_clk_gate_pins>;
pinctrl-names = "default", "clk-gate";

bus-width = <4>;
cap-sd-highspeed;
Expand All @@ -238,7 +240,8 @@
&sd_emmc_c {
status = "okay";
pinctrl-0 = <&emmc_pins>;
pinctrl-names = "default";
pinctrl-1 = <&emmc_clk_gate_pins>;
pinctrl-names = "default", "clk-gate";

bus-width = <8>;
cap-mmc-highspeed;
Expand Down
9 changes: 6 additions & 3 deletions arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,8 @@
&sd_emmc_a {
status = "okay";
pinctrl-0 = <&sdio_pins &sdio_irq_pins>;
pinctrl-names = "default";
pinctrl-1 = <&sdio_clk_gate_pins>;
pinctrl-names = "default", "clk-gate";
#address-cells = <1>;
#size-cells = <0>;

Expand All @@ -181,7 +182,8 @@
&sd_emmc_b {
status = "okay";
pinctrl-0 = <&sdcard_pins>;
pinctrl-names = "default";
pinctrl-1 = <&sdcard_clk_gate_pins>;
pinctrl-names = "default", "clk-gate";

bus-width = <4>;
cap-sd-highspeed;
Expand All @@ -198,7 +200,8 @@
&sd_emmc_c {
status = "okay";
pinctrl-0 = <&emmc_pins>;
pinctrl-names = "default";
pinctrl-1 = <&emmc_clk_gate_pins>;
pinctrl-names = "default", "clk-gate";

bus-width = <8>;
cap-mmc-highspeed;
Expand Down
33 changes: 33 additions & 0 deletions arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,17 @@
};
};

emmc_clk_gate_pins: emmc_clk_gate {
mux {
groups = "BOOT_8";
function = "gpio_periphs";
};
cfg-pull-down {
pins = "BOOT_8";
bias-pull-down;
};
};

nor_pins: nor {
mux {
groups = "nor_d",
Expand Down Expand Up @@ -430,6 +441,17 @@
};
};

sdcard_clk_gate_pins: sdcard_clk_gate {
mux {
groups = "CARD_2";
function = "gpio_periphs";
};
cfg-pull-down {
pins = "CARD_2";
bias-pull-down;
};
};

sdio_pins: sdio {
mux {
groups = "sdio_d0",
Expand All @@ -442,6 +464,17 @@
};
};

sdio_clk_gate_pins: sdio_clk_gate {
mux {
groups = "GPIOX_4";
function = "gpio_periphs";
};
cfg-pull-down {
pins = "GPIOX_4";
bias-pull-down;
};
};

sdio_irq_pins: sdio_irq {
mux {
groups = "sdio_irq";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@
&sd_emmc_b {
status = "okay";
pinctrl-0 = <&sdcard_pins>;
pinctrl-names = "default";
pinctrl-1 = <&sdcard_clk_gate_pins>;
pinctrl-names = "default", "clk-gate";

bus-width = <4>;
cap-sd-highspeed;
Expand All @@ -141,7 +142,8 @@
&sd_emmc_c {
status = "okay";
pinctrl-0 = <&emmc_pins>;
pinctrl-names = "default";
pinctrl-1 = <&emmc_clk_gate_pins>;
pinctrl-names = "default", "clk-gate";

bus-width = <8>;
cap-mmc-highspeed;
Expand Down
6 changes: 4 additions & 2 deletions arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,8 @@
&sd_emmc_b {
status = "okay";
pinctrl-0 = <&sdcard_pins>;
pinctrl-names = "default";
pinctrl-1 = <&sdcard_clk_gate_pins>;
pinctrl-names = "default", "clk-gate";

bus-width = <4>;
cap-sd-highspeed;
Expand All @@ -215,7 +216,8 @@
&sd_emmc_c {
status = "okay";
pinctrl-0 = <&emmc_pins>;
pinctrl-names = "default";
pinctrl-1 = <&emmc_clk_gate_pins>;
pinctrl-names = "default", "clk-gate";

bus-width = <8>;
cap-mmc-highspeed;
Expand Down
9 changes: 6 additions & 3 deletions arch/arm64/boot/dts/amlogic/meson-gxl-s905x-nexbox-a95x.dts
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,8 @@
&sd_emmc_a {
status = "okay";
pinctrl-0 = <&sdio_pins>;
pinctrl-names = "default";
pinctrl-1 = <&sdio_clk_gate_pins>;
pinctrl-names = "default", "clk-gate";
#address-cells = <1>;
#size-cells = <0>;

Expand All @@ -210,7 +211,8 @@
&sd_emmc_b {
status = "okay";
pinctrl-0 = <&sdcard_pins>;
pinctrl-names = "default";
pinctrl-1 = <&sdcard_clk_gate_pins>;
pinctrl-names = "default", "clk-gate";

bus-width = <4>;
cap-sd-highspeed;
Expand All @@ -228,7 +230,8 @@
&sd_emmc_c {
status = "okay";
pinctrl-0 = <&emmc_pins>;
pinctrl-names = "default";
pinctrl-1 = <&emmc_clk_gate_pins>;
pinctrl-names = "default", "clk-gate";

bus-width = <8>;
cap-mmc-highspeed;
Expand Down
9 changes: 6 additions & 3 deletions arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@
&sd_emmc_a {
status = "okay";
pinctrl-0 = <&sdio_pins>;
pinctrl-names = "default";
pinctrl-1 = <&sdio_clk_gate_pins>;
pinctrl-names = "default", "clk-gate";
#address-cells = <1>;
#size-cells = <0>;

Expand All @@ -116,7 +117,8 @@
&sd_emmc_b {
status = "okay";
pinctrl-0 = <&sdcard_pins>;
pinctrl-names = "default";
pinctrl-1 = <&sdcard_clk_gate_pins>;
pinctrl-names = "default", "clk-gate";

bus-width = <4>;
cap-sd-highspeed;
Expand All @@ -134,7 +136,8 @@
&sd_emmc_c {
status = "okay";
pinctrl-0 = <&emmc_pins>;
pinctrl-names = "default";
pinctrl-1 = <&emmc_clk_gate_pins>;
pinctrl-names = "default", "clk-gate";

bus-width = <8>;
cap-mmc-highspeed;
Expand Down
33 changes: 33 additions & 0 deletions arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,17 @@
};
};

emmc_clk_gate_pins: emmc_clk_gate {
mux {
groups = "BOOT_8";
function = "gpio_periphs";
};
cfg-pull-down {
pins = "BOOT_8";
bias-pull-down;
};
};

nor_pins: nor {
mux {
groups = "nor_d",
Expand Down Expand Up @@ -319,6 +330,17 @@
};
};

sdcard_clk_gate_pins: sdcard_clk_gate {
mux {
groups = "CARD_2";
function = "gpio_periphs";
};
cfg-pull-down {
pins = "CARD_2";
bias-pull-down;
};
};

sdio_pins: sdio {
mux {
groups = "sdio_d0",
Expand All @@ -331,6 +353,17 @@
};
};

sdio_clk_gate_pins: sdio_clk_gate {
mux {
groups = "GPIOX_4";
function = "gpio_periphs";
};
cfg-pull-down {
pins = "GPIOX_4";
bias-pull-down;
};
};

sdio_irq_pins: sdio_irq {
mux {
groups = "sdio_irq";
Expand Down
Loading

0 comments on commit 67e7607

Please sign in to comment.