ARM64: dts: meson: update around mmc
Subsystems (2)
Jerome Brunet
reviewerv3 cover ARM64: dts: meson: update around mmc
This patchset feature updates around mmc. It is linked to this series [0] but does not strictly depends on it. It adds:
* The regulator settling times for the gpio regulator of nanopi-k2 and the libretech-cc.
* UHS modes for the p20x, nanopi-k2 and the libretech-cc
* clk-gate pins: these are the pinmuxes used for the clk-stop work around explained here [1]
It also removes cap-sd-highspeed from eMMC nodes.
Special note on SDR104:
While the PCB of the p200 and the libretech-cc does not seems to handle SDR104 completely, the nanopi-k2 seems to be handling it correctly.
The patch enabling this mode on the nanopi-k2 is the last one of this series. It should propabably be left out until more people can test sdr104 on the nanopi-k2
This series has been tested on the gxbb-200, the gxbb-nanopi-k2 and the gxl-s905x-libretech-cc
Changes since v2 [3]:
* Rebase on Kevin's v4.14/dt64 branch
Changes since v1 [2]:
* Reorder patches to put fixes first, then enhancements
* Fix error in the SDIO clk_gate pins (GPIOX_5 instead GPIOX_4)
[0]: https://lkml.kernel.org/r/20170828142915.27020-1-jbrunet at baylibre.com [1]: https://lkml.kernel.org/r/20170821160301.21899-11-jbrunet at baylibre.com [2]: https://lkml.kernel.org/r/20170804180816.18737-1-jbrunet at baylibre.com [3]: https://lkml.kernel.org/r/20170821160637.22456-1-jbrunet at baylibre.com
Jerome Brunet (9):
ARM64: dts: meson-gx: Use correct mmc clock source 0
ARM64: dts: meson: remove cap-sd-highspeed from emmc nodes
ARM64: dts: meson: add mmc clk gate pins
ARM64: dts: meson-gxbb: nanopi-k2: add card regulator settle times
ARM64: dts: meson-gxl: libretech-cc: add card regulator settle times
ARM64: dts: meson-gxl: libretech-cc: enable high speed modes
ARM64: dts: meson-gxbb: p20x: enable sdcard UHS modes
ARM64: dts: meson-gxbb: nanopi-k2: enable sdcard UHS modes
ARM64: dts: meson-gxbb: nanopi-k2: enable sdr104 mode
.../arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi | 10 +++--- .../boot/dts/amlogic/meson-gxbb-nanopi-k2.dts | 19 ++++++++--- .../boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts | 12 ++++--- .../arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 9 ++--- arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi | 13 +++++--- .../boot/dts/amlogic/meson-gxbb-vega-s95.dtsi | 10 +++--- arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 39 ++++++++++++++++++++-- .../dts/amlogic/meson-gxl-s905x-hwacom-amazetv.dts | 7 ++-- .../dts/amlogic/meson-gxl-s905x-libretech-cc.dts | 13 ++++++-- .../dts/amlogic/meson-gxl-s905x-nexbox-a95x.dts | 10 +++--- .../boot/dts/amlogic/meson-gxl-s905x-p212.dtsi | 10 +++--- arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 39 ++++++++++++++++++++-- .../arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts | 7 ++-- arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts | 1 - 14 files changed, 150 insertions(+), 49 deletions(-)
Signature · 1 line
2.9.5
Jerome Brunet
reviewerPATCH v3 1/9 ARM64: dts: meson-gx: Use correct mmc clock source 0
Now that the clock source 0 is properly described in the CCF, use it instead of assuming the default value (xtal)
--- arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 6 +++--- arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-)
arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi +3 -3
@@ -661,21 +661,21 @@ &sd_emmc_a { clocks = <&clkc CLKID_SD_EMMC_A>, - <&xtal>, + <&clkc CLKID_SD_EMMC_A_CLK0>, <&clkc CLKID_FCLK_DIV2>; clock-names = "core", "clkin0", "clkin1"; }; &sd_emmc_b { clocks = <&clkc CLKID_SD_EMMC_B>, - <&xtal>, + <&clkc CLKID_SD_EMMC_B_CLK0>, <&clkc CLKID_FCLK_DIV2>; clock-names = "core", "clkin0", "clkin1"; }; &sd_emmc_c { clocks = <&clkc CLKID_SD_EMMC_C>, - <&xtal>, + <&clkc CLKID_SD_EMMC_C_CLK0>, <&clkc CLKID_FCLK_DIV2>; clock-names = "core", "clkin0", "clkin1"; };
arch/arm64/boot/dts/amlogic/meson-gxl.dtsi +3 -3
@@ -603,21 +603,21 @@ &sd_emmc_a { clocks = <&clkc CLKID_SD_EMMC_A>, - <&xtal>, + <&clkc CLKID_SD_EMMC_A_CLK0>, <&clkc CLKID_FCLK_DIV2>; clock-names = "core", "clkin0", "clkin1"; }; &sd_emmc_b { clocks = <&clkc CLKID_SD_EMMC_B>, - <&xtal>, + <&clkc CLKID_SD_EMMC_B_CLK0>, <&clkc CLKID_FCLK_DIV2>; clock-names = "core", "clkin0", "clkin1"; }; &sd_emmc_c { clocks = <&clkc CLKID_SD_EMMC_C>, - <&xtal>, + <&clkc CLKID_SD_EMMC_C_CLK0>, <&clkc CLKID_FCLK_DIV2>; clock-names = "core", "clkin0", "clkin1"; };
Signature · 1 line
2.9.5
Jerome Brunet
reviewerPATCH v3 2/9 ARM64: dts: meson: remove cap-sd-highspeed from emmc nodes
In reply to Jerome BrunetIt does not make much sense to define cap-sd-highspeed in the emmc nodes Just remove it.
--- arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi | 1 - arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts | 1 - arch/arm64/boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts | 1 - arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 1 - arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi | 1 - arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi | 1 - arch/arm64/boot/dts/amlogic/meson-gxl-s905x-hwacom-amazetv.dts | 1 - arch/arm64/boot/dts/amlogic/meson-gxl-s905x-nexbox-a95x.dts | 1 - arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi | 1 - arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts | 1 - arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts | 1 - 11 files changed, 11 deletions(-)
arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi +0 -1
@@ -215,7 +215,6 @@ pinctrl-names = "default"; bus-width = <8>; - cap-sd-highspeed; cap-mmc-highspeed; max-frequency = <200000000>; non-removable;
arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts +0 -1
@@ -297,7 +297,6 @@ pinctrl-names = "default"; bus-width = <8>; - cap-sd-highspeed; max-frequency = <200000000>; non-removable; disable-wp;
arch/arm64/boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts +0 -1
@@ -274,7 +274,6 @@ pinctrl-names = "default"; bus-width = <8>; - cap-sd-highspeed; cap-mmc-highspeed; max-frequency = <200000000>; non-removable;
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts +0 -1
@@ -274,7 +274,6 @@ pinctrl-names = "default"; bus-width = <8>; - cap-sd-highspeed; max-frequency = <200000000>; non-removable; disable-wp;
arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi +0 -1
@@ -241,7 +241,6 @@ pinctrl-names = "default"; bus-width = <8>; - cap-sd-highspeed; cap-mmc-highspeed; max-frequency = <200000000>; non-removable;
arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi +0 -1
@@ -201,7 +201,6 @@ pinctrl-names = "default"; bus-width = <8>; - cap-sd-highspeed; cap-mmc-highspeed; max-frequency = <200000000>; non-removable;
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-hwacom-amazetv.dts +0 -1
@@ -144,7 +144,6 @@ pinctrl-names = "default"; bus-width = <8>; - cap-sd-highspeed; cap-mmc-highspeed; max-frequency = <100000000>; non-removable;
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-nexbox-a95x.dts +0 -1
@@ -231,7 +231,6 @@ pinctrl-names = "default"; bus-width = <8>; - cap-sd-highspeed; cap-mmc-highspeed; max-frequency = <200000000>; non-removable;
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi +0 -1
@@ -137,7 +137,6 @@ pinctrl-names = "default"; bus-width = <8>; - cap-sd-highspeed; cap-mmc-highspeed; max-frequency = <200000000>; non-removable;
arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts +0 -1
@@ -196,7 +196,6 @@ pinctrl-names = "default"; bus-width = <8>; - cap-sd-highspeed; cap-mmc-highspeed; max-frequency = <200000000>; non-removable;
arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts +0 -1
@@ -220,7 +220,6 @@ pinctrl-names = "default"; bus-width = <8>; - cap-sd-highspeed; cap-mmc-highspeed; max-frequency = <200000000>; non-removable;
Signature · 1 line
2.9.5
Jerome Brunet
reviewerPATCH v3 3/9 ARM64: dts: meson: add mmc clk gate pins
In reply to Jerome BrunetAdd 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
--- .../arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi | 9 ++++-- .../boot/dts/amlogic/meson-gxbb-nanopi-k2.dts | 9 ++++-- .../boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts | 11 +++++--- .../arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 8 ++++-- arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi | 9 ++++-- .../boot/dts/amlogic/meson-gxbb-vega-s95.dtsi | 9 ++++-- arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 33 ++++++++++++++++++++++ .../dts/amlogic/meson-gxl-s905x-hwacom-amazetv.dts | 6 ++-- .../dts/amlogic/meson-gxl-s905x-libretech-cc.dts | 6 ++-- .../dts/amlogic/meson-gxl-s905x-nexbox-a95x.dts | 9 ++++-- .../boot/dts/amlogic/meson-gxl-s905x-p212.dtsi | 9 ++++-- arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 33 ++++++++++++++++++++++ .../arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts | 6 ++-- 13 files changed, 126 insertions(+), 31 deletions(-)
arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi +6 -3
@@ -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>;
@@ -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;
@@ -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;
arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts +6 -3
@@ -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>;
@@ -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;
@@ -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>;
arch/arm64/boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts +7 -4
@@ -51,7 +51,7 @@ / { compatible = "nexbox,a95x", "amlogic,meson-gxbb"; model = "NEXBOX A95X"; - + aliases { serial0 = &uart_AO; };
@@ -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>;
@@ -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;
@@ -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;
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts +5 -3
@@ -50,7 +50,7 @@ / { compatible = "hardkernel,odroid-c2", "amlogic,meson-gxbb"; model = "Hardkernel ODROID-C2"; - + aliases { serial0 = &uart_AO; };
@@ -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;
@@ -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>;
arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi +6 -3
@@ -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>;
@@ -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;
@@ -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;
arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi +6 -3
@@ -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>;
@@ -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;
@@ -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;
arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi +33 -0
@@ -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",
@@ -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",
@@ -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";
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-hwacom-amazetv.dts +4 -2
@@ -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;
@@ -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;
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts +4 -2
@@ -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;
@@ -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;
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-nexbox-a95x.dts +6 -3
@@ -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>;
@@ -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;
@@ -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;
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi +6 -3
@@ -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>;
@@ -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;
@@ -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;
arch/arm64/boot/dts/amlogic/meson-gxl.dtsi +33 -0
@@ -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",
@@ -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",
@@ -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";
arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts +4 -2
@@ -175,7 +175,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;
@@ -193,7 +194,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;
Signature · 1 line
2.9.5
Jerome Brunet
reviewerPATCH v3 4/9 ARM64: dts: meson-gxbb: nanopi-k2: add card regulator settle times
In reply to Jerome BrunetChanging the card voltage on the nanopi-k2 is not instantaneous, especially when switching from 3.3v to 1.8v.
It take at least 3ms for the regulator to go from 3.3v to 1.8v. Add margin to that to make sure we don't upset the sdcard during the voltage switch
--- arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts | 3 +++ 1 file changed, 3 insertions(+)
arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts +3 -0
@@ -107,6 +107,9 @@ states = <3300000 0>, <1800000 1>; + + regulator-settling-time-up-us = <100>; + regulator-settling-time-down-us = <5000>; }; wifi_32k: wifi-32k {
Signature · 1 line
2.9.5
Jerome Brunet
reviewerPATCH v3 5/9 ARM64: dts: meson-gxl: libretech-cc: add card regulator settle times
In reply to Jerome BrunetChanging the card voltage on the cc is not instantaneous, especially when switching from 3.3v to 1.8v.
It take at least 30ms for the regulator to go from 3.3v to 1.8v. Add margin to that to make sure we don't upset the sdcard during the voltage switch
--- arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts | 3 +++ 1 file changed, 3 insertions(+)
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts +3 -0
@@ -91,6 +91,9 @@ states = <3300000 0>, <1800000 1>; + + regulator-settling-time-up-us = <200>; + regulator-settling-time-down-us = <50000>; }; vddio_boot: regulator-vddio_boot {
Signature · 1 line
2.9.5
Jerome Brunet
reviewerPATCH v3 6/9 ARM64: dts: meson-gxl: libretech-cc: enable high speed modes
In reply to Jerome BrunetEnable sdcard UHS modes up to SDR50. Unfortunately, it seems the PCB of the libretech-cc cannot handle SDR104 at 200Mhz reliably. Also enable eMMC DDR52 mode.
--- arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts +4 -0
@@ -205,6 +205,9 @@ bus-width = <4>; cap-sd-highspeed; + sd-uhs-sdr12; + sd-uhs-sdr25; + sd-uhs-sdr50; max-frequency = <100000000>; disable-wp;
@@ -224,6 +227,7 @@ bus-width = <8>; cap-mmc-highspeed; + mmc-ddr-3_3v; max-frequency = <50000000>; non-removable; disable-wp;
Signature · 1 line
2.9.5
Jerome Brunet
reviewerPATCH v3 7/9 ARM64: dts: meson-gxbb: p20x: enable sdcard UHS modes
In reply to Jerome BrunetEnable sdcard UHS modes, up to SDR50, on p20x based boards. While the s905 supports SDR104 mode, it appears that the PCB of p20x based boards can't cope with a rate as high as 200Mhz.
--- arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi | 3 +++ 1 file changed, 3 insertions(+)
arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi +3 -0
@@ -226,6 +226,9 @@ bus-width = <4>; cap-sd-highspeed; + sd-uhs-sdr12; + sd-uhs-sdr25; + sd-uhs-sdr50; max-frequency = <100000000>; disable-wp;
Signature · 1 line
2.9.5
Jerome Brunet
reviewerPATCH v3 8/9 ARM64: dts: meson-gxbb: nanopi-k2: enable sdcard UHS modes
In reply to Jerome BrunetEnable UHS modes, up to SDR50, on the nanopi-k2 SBC.
--- arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts | 3 +++ 1 file changed, 3 insertions(+)
arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts +3 -0
@@ -285,6 +285,9 @@ bus-width = <4>; cap-sd-highspeed; + sd-uhs-sdr12; + sd-uhs-sdr25; + sd-uhs-sdr50; max-frequency = <100000000>; disable-wp;
Signature · 1 line
2.9.5
Jerome Brunet
reviewerPATCH v3 9/9 ARM64: dts: meson-gxbb: nanopi-k2: enable sdr104 mode
In reply to Jerome BrunetSDR104 seems to be OK on the nanopi-k2 SBC so enable it
--- arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts +2 -1
@@ -288,7 +288,8 @@ sd-uhs-sdr12; sd-uhs-sdr25; sd-uhs-sdr50; - max-frequency = <100000000>; + sd-uhs-sdr104; + max-frequency = <200000000>; disable-wp; cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
Signature · 1 line
2.9.5
Quoted 34 lines · Jerome Brunet
This patchset feature updates around mmc. It is linked to this series [0] but does not strictly depends on it. It adds:
* The regulator settling times for the gpio regulator of nanopi-k2 and the libretech-cc.
* UHS modes for the p20x, nanopi-k2 and the libretech-cc
* clk-gate pins: these are the pinmuxes used for the clk-stop work around explained here [1]It also removes cap-sd-highspeed from eMMC nodes.
Special note on SDR104:
While the PCB of the p200 and the libretech-cc does not seems to handle SDR104 completely, the nanopi-k2 seems to be handling it correctly.The patch enabling this mode on the nanopi-k2 is the last one of this series. It should propabably be left out until more people can test sdr104 on the nanopi-k2
This series has been tested on the gxbb-200, the gxbb-nanopi-k2 and the gxl-s905x-libretech-cc
Changes since v2 [3]:
* Rebase on Kevin's v4.14/dt64 branchChanges since v1 [2]:
* Reorder patches to put fixes first, then enhancements
* Fix error in the SDIOclk_gatepins (GPIOX_5insteadGPIOX_4)[0]: https://lkml.kernel.org/r/20170828142915.27020-1-jbrunet at baylibre.com [1]: https://lkml.kernel.org/r/20170821160301.21899-11-jbrunet at baylibre.com [2]: https://lkml.kernel.org/r/20170804180816.18737-1-jbrunet at baylibre.com [3]: https://lkml.kernel.org/r/20170821160637.22456-1-jbrunet at baylibre.com
Quoted 10 lines
Jerome Brunet (9):
ARM64: dts: meson-gx: Use correct mmc clock source 0
ARM64: dts: meson: remove cap-sd-highspeed from emmc nodes
ARM64: dts: meson: add mmc clk gate pins
ARM64: dts: meson-gxbb: nanopi-k2: add card regulator settle times
ARM64: dts: meson-gxl: libretech-cc: add card regulator settle times
ARM64: dts: meson-gxl: libretech-cc: enable high speed modes
ARM64: dts: meson-gxbb: p20x: enable sdcard UHS modes
ARM64: dts: meson-gxbb: nanopi-k2: enable sdcard UHS modes
ARM64: dts: meson-gxbb: nanopi-k2: enable sdr104 mode
Applied to v4.14/dt64, and submitted to arm-soc. It may miss this merge window, but if it does, we can submit for the first round of fixes after -rc1 is out.
Thanks,
Kevin