Some ESPRESSObin boards come with soldered eMMC flash, backport upstream patches adding this device and add patch to sync sdhci nodes order with U-Boot.
Signed-off-by: Tomasz Maciej Nowak <tome...@o2.pl> --- ...l-armada37xx-Add-emmc-sdio-pinctrl-d.patch | 40 +++++++ ...l-armada-37xx-Enable-emmc-on-espress.patch | 49 ++++++++ ...da-3720-espressobin-correct-spi-node.patch | 2 +- ...x-re-arrange-SDHCI-controllers-order.patch | 105 ++++++++++++++++++ 4 files changed, 195 insertions(+), 1 deletion(-) create mode 100644 target/linux/mvebu/patches-4.14/513-arm64-dts-marvell-armada37xx-Add-emmc-sdio-pinctrl-d.patch create mode 100644 target/linux/mvebu/patches-4.14/514-arm64-dts-marvell-armada-37xx-Enable-emmc-on-espress.patch create mode 100644 target/linux/mvebu/patches-4.14/522-arm64-dts-a37xx-re-arrange-SDHCI-controllers-order.patch diff --git a/target/linux/mvebu/patches-4.14/513-arm64-dts-marvell-armada37xx-Add-emmc-sdio-pinctrl-d.patch b/target/linux/mvebu/patches-4.14/513-arm64-dts-marvell-armada37xx-Add-emmc-sdio-pinctrl-d.patch new file mode 100644 index 0000000000..19702a61ed --- /dev/null +++ b/target/linux/mvebu/patches-4.14/513-arm64-dts-marvell-armada37xx-Add-emmc-sdio-pinctrl-d.patch @@ -0,0 +1,40 @@ +From eefe328439642101774f0f5c4ea0dc6ba1cfb687 Mon Sep 17 00:00:00 2001 +From: Ding Tao <miya...@qq.com> +Date: Fri, 26 Oct 2018 11:50:27 +0000 +Subject: [PATCH] arm64: dts: marvell: armada37xx: Add emmc/sdio pinctrl + definition + +Add emmc/sdio pinctrl definition for marvell armada37xx SoCs. + +Signed-off-by: Ding Tao <miya...@qq.com> +Signed-off-by: Gregory CLEMENT <gregory.clem...@bootlin.com> +--- + arch/arm64/boot/dts/marvell/armada-37xx.dtsi | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +--- a/arch/arm64/boot/dts/marvell/armada-37xx.dtsi ++++ b/arch/arm64/boot/dts/marvell/armada-37xx.dtsi +@@ -218,6 +218,11 @@ + groups = "uart2"; + function = "uart"; + }; ++ ++ mmc_pins: mmc-pins { ++ groups = "emmc_nb"; ++ function = "emmc"; ++ }; + }; + + nb_pm: syscon@14000 { +@@ -247,6 +252,11 @@ + function = "mii"; + }; + ++ sdio_pins: sdio-pins { ++ groups = "sdio_sb"; ++ function = "sdio"; ++ }; ++ + }; + + eth0: ethernet@30000 { diff --git a/target/linux/mvebu/patches-4.14/514-arm64-dts-marvell-armada-37xx-Enable-emmc-on-espress.patch b/target/linux/mvebu/patches-4.14/514-arm64-dts-marvell-armada-37xx-Enable-emmc-on-espress.patch new file mode 100644 index 0000000000..26d090f050 --- /dev/null +++ b/target/linux/mvebu/patches-4.14/514-arm64-dts-marvell-armada-37xx-Enable-emmc-on-espress.patch @@ -0,0 +1,49 @@ +From 43ebc7c1b3ed8198b9acf3019eca16e722f7331c Mon Sep 17 00:00:00 2001 +From: Ding Tao <miya...@qq.com> +Date: Fri, 26 Oct 2018 11:50:28 +0000 +Subject: [PATCH] arm64: dts: marvell: armada-37xx: Enable emmc on espressobin + +The ESPRESSObin board has a emmc interface available on U11: declare it +and let the bootloader enable it if the emmc is present. + +[gregory.clem...@bootlin.com: disable the emmc by default] +Signed-off-by: Ding Tao <miya...@qq.com> +Signed-off-by: Gregory CLEMENT <gregory.clem...@bootlin.com> +--- + .../dts/marvell/armada-3720-espressobin.dts | 22 +++++++++++++++++++ + 1 file changed, 22 insertions(+) + +--- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts ++++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts +@@ -93,9 +93,31 @@ + cd-gpios = <&gpionb 3 GPIO_ACTIVE_LOW>; + marvell,pad-type = "sd"; + vqmmc-supply = <&vcc_sd_reg1>; ++ ++ pinctrl-names = "default"; ++ pinctrl-0 = <&sdio_pins>; + status = "okay"; + }; + ++/* U11 */ ++&sdhci0 { ++ non-removable; ++ bus-width = <8>; ++ mmc-ddr-1_8v; ++ mmc-hs400-1_8v; ++ marvell,xenon-emmc; ++ marvell,xenon-tun-count = <9>; ++ marvell,pad-type = "fixed-1-8v"; ++ ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mmc_pins>; ++/* ++ * This eMMC is not populated on all boards, so disable it by ++ * default and let the bootloader enable it, if it is present ++ */ ++ status = "disabled"; ++}; ++ + &spi0 { + status = "okay"; + diff --git a/target/linux/mvebu/patches-4.14/521-arm64-dts-armada-3720-espressobin-correct-spi-node.patch b/target/linux/mvebu/patches-4.14/521-arm64-dts-armada-3720-espressobin-correct-spi-node.patch index 1d2bdfca75..fc7cb2af1e 100644 --- a/target/linux/mvebu/patches-4.14/521-arm64-dts-armada-3720-espressobin-correct-spi-node.patch +++ b/target/linux/mvebu/patches-4.14/521-arm64-dts-armada-3720-espressobin-correct-spi-node.patch @@ -29,7 +29,7 @@ Signed-off-by: Tomasz Maciej Nowak <tmn...@gmail.com> --- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts +++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts -@@ -101,25 +101,9 @@ +@@ -123,25 +123,9 @@ flash@0 { reg = <0>; diff --git a/target/linux/mvebu/patches-4.14/522-arm64-dts-a37xx-re-arrange-SDHCI-controllers-order.patch b/target/linux/mvebu/patches-4.14/522-arm64-dts-a37xx-re-arrange-SDHCI-controllers-order.patch new file mode 100644 index 0000000000..58962baeb7 --- /dev/null +++ b/target/linux/mvebu/patches-4.14/522-arm64-dts-a37xx-re-arrange-SDHCI-controllers-order.patch @@ -0,0 +1,105 @@ +From 9e34242f8817294ec1c2bef7f0c513417cac965e Mon Sep 17 00:00:00 2001 +From: Konstantin Porotchkin <kos...@marvell.com> +Date: Sun, 25 Nov 2018 18:38:26 +0200 +Subject: [PATCH] arm64: dts: a37xx: re-arrange SDHCI controllers order + +Sync the controllers order with uboot settings: +sdhci-0 is @ 0xd000, sdhci-1 is @ 0xd800. + +Signed-off-by: Konstantin Porotchkin <kos...@marvell.com> +Reviewed-by: Stefan Chulski <stef...@marvell.com> +[adapt patch to mainline state] +Signed-off-by: Tomasz Maciej Nowak <tmn...@gmail.com> +--- + arch/arm64/boot/dts/marvell/armada-3720-db.dts | 10 +++++----- + .../boot/dts/marvell/armada-3720-espressobin.dts | 8 ++++---- + arch/arm64/boot/dts/marvell/armada-37xx.dtsi | 4 ++-- + 3 files changed, 11 insertions(+), 11 deletions(-) + +--- a/arch/arm64/boot/dts/marvell/armada-3720-db.dts ++++ b/arch/arm64/boot/dts/marvell/armada-3720-db.dts +@@ -81,9 +81,9 @@ + vcc-supply = <&exp_usb3_vbus>; + }; + +- vcc_sd_reg1: regulator { ++ vcc_sd_reg0: regulator { + compatible = "regulator-gpio"; +- regulator-name = "vcc_sd1"; ++ regulator-name = "vcc_sd0"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + regulator-boot-on; +@@ -163,7 +163,7 @@ + status = "okay"; + }; + +-&sdhci0 { ++&sdhci1 { + non-removable; + bus-width = <8>; + mmc-ddr-1_8v; +@@ -173,12 +173,12 @@ + }; + + /* SD slot module on CON14(V2.0)/CON15(V1.4) */ +-&sdhci1 { ++&sdhci0 { + wp-inverted; + cd-gpios = <&gpiosb 2 GPIO_ACTIVE_LOW>; + bus-width = <4>; + marvell,pad-type = "sd"; +- vqmmc-supply = <&vcc_sd_reg1>; ++ vqmmc-supply = <&vcc_sd_reg0>; + status = "okay"; + }; + +--- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts ++++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts +@@ -61,9 +61,9 @@ + reg = <0x00000000 0x00000000 0x00000000 0x20000000>; + }; + +- vcc_sd_reg1: regulator { ++ vcc_sd_reg0: regulator { + compatible = "regulator-gpio"; +- regulator-name = "vcc_sd1"; ++ regulator-name = "vcc_sd0"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + regulator-boot-on; +@@ -87,12 +87,12 @@ + }; + + /* J1 */ +-&sdhci1 { ++&sdhci0 { + wp-inverted; + bus-width = <4>; + cd-gpios = <&gpionb 3 GPIO_ACTIVE_LOW>; + marvell,pad-type = "sd"; +- vqmmc-supply = <&vcc_sd_reg1>; ++ vqmmc-supply = <&vcc_sd_reg0>; + + pinctrl-names = "default"; + pinctrl-0 = <&sdio_pins>; +--- a/arch/arm64/boot/dts/marvell/armada-37xx.dtsi ++++ b/arch/arm64/boot/dts/marvell/armada-37xx.dtsi +@@ -312,7 +312,7 @@ + }; + }; + +- sdhci1: sdhci@d0000 { ++ sdhci0: sdhci@d0000 { + compatible = "marvell,armada-3700-sdhci", + "marvell,sdhci-xenon"; + reg = <0xd0000 0x300>, +@@ -323,7 +323,7 @@ + status = "disabled"; + }; + +- sdhci0: sdhci@d8000 { ++ sdhci1: sdhci@d8000 { + compatible = "marvell,armada-3700-sdhci", + "marvell,sdhci-xenon"; + reg = <0xd8000 0x300>, -- 2.21.0 _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel