From 545591132aa701ff1262bb309fbcd0c3ff0acd75 Mon Sep 17 00:00:00 2001 From: Marek Behún Date: Wed, 19 Aug 2020 11:57:25 +0200 Subject: arm64: dts: armada-3720-espressobin: fix COMPHY nodes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit fixes initialization of COMPHY on EspressoBin. Commit 22f418935be4 ("phy: marvell: a3700: Use comphy_mux on Armada 37xx.") introduced usage of comphy_mux on Armada 37xx comphy driver. The lanes are defined in comphy_a3700.c as described in functional specification, that is: lane 0 is SGMII1 or USB3 lane 1 is PCIe or SGMII0 lane 2 is SATA or USB3 But the DTS for EspressoBin configures PCIe on lane 0 and USB3 on lane 1, which is wrong in the sense of the specification and doesn't work with the comphy_mux code, which is 2 years now (the aardvark driver causes synchronous abort in U-Boot). It worked till the above mentioned commit, because the code for powering up PCIe PHY doesn't work with lane number at all, and the code for powering up USB3 PHY works differently only if USB3 is on lane 2, ie. the check goes like: if (lane == 2) something else something else so it does not differentiate between lanes 0 and 1. In the future I shall post patches that remove the comphy_a3700 driver and add comphy driver which uses calls to ATF, like Linux' driver does. This will have the advantage of same DTS bindings as Linux', but till this is done, we need this patch. Signed-off-by: Marek Behún Tested-by: Pali Rohár Cc: Stefan Roese Reviewed-by: Stefan Roese Tested-by: Andre Heider --- arch/arm/dts/armada-3720-espressobin.dts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'arch') diff --git a/arch/arm/dts/armada-3720-espressobin.dts b/arch/arm/dts/armada-3720-espressobin.dts index 84e2c2adba..50381e979e 100644 --- a/arch/arm/dts/armada-3720-espressobin.dts +++ b/arch/arm/dts/armada-3720-espressobin.dts @@ -72,13 +72,13 @@ &comphy { max-lanes = <3>; phy0 { - phy-type = ; - phy-speed = ; + phy-type = ; + phy-speed = ; }; phy1 { - phy-type = ; - phy-speed = ; + phy-type = ; + phy-speed = ; }; phy2 { -- cgit From 563b85bd88772c8949d10f7fa8e39a20280b1aac Mon Sep 17 00:00:00 2001 From: Pali Rohár Date: Wed, 19 Aug 2020 15:57:06 +0200 Subject: arm64: a37xx: pci: Make PCIe Reset GPIO DT compatible with Linux kernel DT MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change active-high to active-low and change DT property name from reset-gpio to reset-gpios. This format of gpio reset is used by pci-aardvark driver in Linux kernel. Signed-off-by: Pali Rohár Reviewed-by: Stefan Roese Reviewed-by: Konstantin Porotchkin Tested-by: Andre Heider --- arch/arm/dts/armada-3720-db.dts | 2 +- arch/arm/dts/armada-3720-espressobin.dts | 2 +- arch/arm/dts/armada-3720-turris-mox.dts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'arch') diff --git a/arch/arm/dts/armada-3720-db.dts b/arch/arm/dts/armada-3720-db.dts index 1b219c423b..1b1b66b94d 100644 --- a/arch/arm/dts/armada-3720-db.dts +++ b/arch/arm/dts/armada-3720-db.dts @@ -159,6 +159,6 @@ &pcie0 { pinctrl-names = "default"; pinctrl-0 = <&pcie_pins>; - reset-gpio = <&gpiosb 3 GPIO_ACTIVE_HIGH>; + reset-gpios = <&gpiosb 3 GPIO_ACTIVE_LOW>; status = "okay"; }; diff --git a/arch/arm/dts/armada-3720-espressobin.dts b/arch/arm/dts/armada-3720-espressobin.dts index 50381e979e..2ace52e812 100644 --- a/arch/arm/dts/armada-3720-espressobin.dts +++ b/arch/arm/dts/armada-3720-espressobin.dts @@ -145,6 +145,6 @@ &pcie0 { pinctrl-names = "default"; pinctrl-0 = <&pcie_pins>; - reset-gpio = <&gpiosb 3 GPIO_ACTIVE_HIGH>; + reset-gpios = <&gpiosb 3 GPIO_ACTIVE_LOW>; status = "okay"; }; diff --git a/arch/arm/dts/armada-3720-turris-mox.dts b/arch/arm/dts/armada-3720-turris-mox.dts index 0f0a6ce65d..974270cc8c 100644 --- a/arch/arm/dts/armada-3720-turris-mox.dts +++ b/arch/arm/dts/armada-3720-turris-mox.dts @@ -172,6 +172,6 @@ &pcie0 { pinctrl-names = "default"; pinctrl-0 = <&pcie_pins>; - reset-gpio = <&gpiosb 3 GPIO_ACTIVE_HIGH>; + reset-gpios = <&gpiosb 3 GPIO_ACTIVE_LOW>; status = "disabled"; }; -- cgit From 96fa3c4fda5cad85b05b086bed3855d4037d1639 Mon Sep 17 00:00:00 2001 From: Wilson Ding Date: Wed, 19 Aug 2020 16:19:40 +0200 Subject: arm: dts: a37x0: enable sd card support on espressobin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Enabled SDIO slot 0 (south bridge) for SD card on Espressobin board. Change-Id: I51a2debf9fba276b9c4a2bc6da91328d47f443e3 Signed-off-by: Wilson Ding Signed-off-by: Konstantin Porotchkin Reviewed-on: http://vgitil04.il.marvell.com:8080/60945 Tested-by: iSoC Platform CI Reviewed-by: Igal Liberman [pali: Define cd-gpios and enable CONFIG_DM_REGULATOR_GPIO] Signed-off-by: Pali Rohár Reviewed-by: Konstantin Porotchkin Reviewed-by: Stefan Roese Tested-by: Andre Heider --- arch/arm/dts/armada-3720-espressobin.dts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'arch') diff --git a/arch/arm/dts/armada-3720-espressobin.dts b/arch/arm/dts/armada-3720-espressobin.dts index 2ace52e812..4534f5ff29 100644 --- a/arch/arm/dts/armada-3720-espressobin.dts +++ b/arch/arm/dts/armada-3720-espressobin.dts @@ -67,6 +67,17 @@ device_type = "memory"; reg = <0x00000000 0x00000000 0x00000000 0x20000000>; }; + + vcc_sd_reg0: regulator@0 { + compatible = "regulator-gpio"; + regulator-name = "vcc_sd0"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + regulator-type = "voltage"; + states = <1800000 0x1 + 3300000 0x0>; + gpios = <&gpionb 4 GPIO_ACTIVE_HIGH>; + }; }; &comphy { @@ -110,6 +121,15 @@ status = "okay"; }; +&sdhci0 { + pinctrl-names = "default"; + pinctrl-0 = <&sdio_pins>; + bus-width = <4>; + cd-gpios = <&gpionb 3 GPIO_ACTIVE_LOW>; + vqmmc-supply = <&vcc_sd_reg0>; + status = "okay"; +}; + &spi0 { status = "okay"; pinctrl-names = "default"; -- cgit