Skip to contentSkip to conversation

Update device tree for Armada 3720 DB

PATCH Superseded Gregory CLEMENT 1 participant 9 messages Jun 13, 2017 – Jun 15, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

v3 cover Update device tree for Armada 3720 DB

Hi,

the main purpose of this short series is to add the support of the second SDHCI controller on the Armada 3720 DB board (and on the Armada 37xx SoC).

This series also adds some improvement to the device tree of the the Armada 3720 DB board and the last patch allow using higher speed on the SD card by adding the vqmmc regulator.

In the v3, I use the angle bracket for each set of register. And I added the reviewed by flag from Andreas F?rber.

In the v2, I added a patch aligning the compatible string and fix the patch " arm64: dts: marvell: Enable second SDHCI controller in Armada 37xx" too.

Gregory

Gregory CLEMENT (5):
arm64: dts: marvell: armada-3720-db: Sort the dts node alphabetically
arm64: dts: marvell: armada-3720-db: Add information about the V2
board
arm64: dts: marvell: armada-37xx: Align the compatible string
arm64: dts: marvell: armada-37xx: Use angle bracket for each register
set
arm64: dts: marvell: armada-3720-db: Add vqmmc regulator for SD slot

Konstantin Porotchkin (1):
arm64: dts: marvell: Enable second SDHCI controller in Armada 37xx

 arch/arm64/boot/dts/marvell/armada-3720-db.dts | 120 ++++++++++++++++---------
 arch/arm64/boot/dts/marvell/armada-37xx.dtsi   |  25 ++++--
 2 files changed, 94 insertions(+), 51 deletions(-)
Signature · 1 line
2.11.0
#1 lore raw

PATCH v3 1/6 arm64: dts: marvell: armada-3720-db: Sort the dts node alphabetically

Sort the reference nodes in alphabetical order to ease the merge of future nodes.

---
 arch/arm64/boot/dts/marvell/armada-3720-db.dts | 83 +++++++++++++-------------
 1 file changed, 41 insertions(+), 42 deletions(-)
arch/arm64/boot/dts/marvell/armada-3720-db.dts +41 -42
index a89855f57091..d6f12fafac6c 100644
@@ -78,6 +78,20 @@
 	};
 };
 
+&eth0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&rgmii_pins>;
+	phy-mode = "rgmii-id";
+	phy = <&phy0>;
+	status = "okay";
+};
+
+&eth1 {
+	phy-mode = "sgmii";
+	phy = <&phy1>;
+	status = "okay";
+};
+
 &i2c0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&i2c1_pins>;
@@ -108,11 +122,36 @@
 	};
 };
 
+&mdio {
+	status = "okay";
+	phy0: ethernet-phy at 0 {
+		reg = <0>;
+	};
+
+	phy1: ethernet-phy at 1 {
+		reg = <1>;
+	};
+};
+
+/* CON17 (PCIe) / CON12 (mini-PCIe) */
+&pcie0 {
+	status = "okay";
+};
+
 /* CON3 */
 &sata {
 	status = "okay";
 };
 
+&sdhci0 {
+	non-removable;
+	bus-width = <8>;
+	mmc-ddr-1_8v;
+	mmc-hs400-1_8v;
+	marvell,pad-type = "fixed-1-8v";
+	status = "okay";
+};
+
 &spi0 {
 	status = "okay";
 	pinctrl-names = "default";
@@ -152,12 +191,8 @@
 	status = "okay";
 };
 
-&sdhci0 {
-	non-removable;
-	bus-width = <8>;
-	mmc-ddr-1_8v;
-	mmc-hs400-1_8v;
-	marvell,pad-type = "fixed-1-8v";
+/* CON27 */
+&usb2 {
 	status = "okay";
 };
 
@@ -166,39 +201,3 @@
 	status = "okay";
 	usb-phy = <&usb3_phy>;
 };
-
-/* CON17 (PCIe) / CON12 (mini-PCIe) */
-&pcie0 {
-	status = "okay";
-};
-
-/* CON27 */
-&usb2 {
-	status = "okay";
-};
-
-
-&mdio {
-	status = "okay";
-	phy0: ethernet-phy at 0 {
-		reg = <0>;
-	};
-
-	phy1: ethernet-phy at 1 {
-		reg = <1>;
-	};
-};
-
-&eth0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&rgmii_pins>;
-	phy-mode = "rgmii-id";
-	phy = <&phy0>;
-	status = "okay";
-};
-
-&eth1 {
-	phy-mode = "sgmii";
-	phy = <&phy1>;
-	status = "okay";
-};
Signature · 1 line
2.11.0
#2 lore raw

PATCH v3 2/6 arm64: dts: marvell: armada-3720-db: Add information about the V2 board

In reply to Gregory CLEMENT

The initial device tree file was for the board V1.4. Now the V2.0 board is also available. The same dtb will work for both, but the CON number have changed, so update the comment in the dts to reflect this.

---
 arch/arm64/boot/dts/marvell/armada-3720-db.dts | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)
arch/arm64/boot/dts/marvell/armada-3720-db.dts +13 -4
index d6f12fafac6c..3ee920ac0015 100644
@@ -42,6 +42,10 @@
  *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  *     OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * This file is compatible with the version 1.4 and the version 2.0 of
+ * the board, however the CON numbers are different between the 2
+ * version
  */
 
 /dts-v1/;
@@ -78,6 +82,7 @@
 	};
 };
 
+/* Gigabit module on CON19(V2.0)/CON21(V1.4) */
 &eth0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&rgmii_pins>;
@@ -86,6 +91,7 @@
 	status = "okay";
 };
 
+/* Gigabit module on CON18(V2.0)/CON20(V1.4) */
 &eth1 {
 	phy-mode = "sgmii";
 	phy = <&phy1>;
@@ -133,7 +139,7 @@
 	};
 };
 
-/* CON17 (PCIe) / CON12 (mini-PCIe) */
+/* CON15(V2.0)/CON17(V1.4) : PCIe / CON15(V2.0)/CON12(V1.4) :mini-PCIe */
 &pcie0 {
 	status = "okay";
 };
@@ -184,19 +190,22 @@
 	};
 };
 
-/* Exported on the micro USB connector CON32 through an FTDI */
+/*
+ * Exported on the micro USB connector CON30(V2.0)/CON32(V1.4) through
+ * an FTDI
+ */
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart1_pins>;
 	status = "okay";
 };
 
-/* CON27 */
+/* CON27(V2.0)/CON29(V1.4) */
 &usb2 {
 	status = "okay";
 };
 
-/* CON31 */
+/* CON29(V2.0)/CON31(V1.4) */
 &usb3 {
 	status = "okay";
 	usb-phy = <&usb3_phy>;
Signature · 1 line
2.11.0
#3 lore raw

PATCH v3 3/6 arm64: dts: marvell: armada-37xx: Align the compatible string

In reply to Gregory CLEMENT

This cosmetic patch aligns the compatible string when there are on several lines.

---
 arch/arm64/boot/dts/marvell/armada-37xx.dtsi | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm64/boot/dts/marvell/armada-37xx.dtsi +3 -3
index 4d495ec39202..c1076fd0bd9e 100644
@@ -163,7 +163,7 @@
 
 			pinctrl_nb: pinctrl at 13800 {
 				compatible = "marvell,armada3710-nb-pinctrl",
-				"syscon", "simple-mfd";
+					     "syscon", "simple-mfd";
 				reg = <0x13800 0x100>, <0x13C00 0x20>;
 				gpionb: gpio {
 					#gpio-cells = <2>;
@@ -219,7 +219,7 @@
 
 			pinctrl_sb: pinctrl at 18800 {
 				compatible = "marvell,armada3710-sb-pinctrl",
-				"syscon", "simple-mfd";
+					     "syscon", "simple-mfd";
 				reg = <0x18800 0x100>, <0x18C00 0x20>;
 				gpiosb: gpio {
 					#gpio-cells = <2>;
@@ -294,7 +294,7 @@
 
 			sdhci0: sdhci at d8000 {
 				compatible = "marvell,armada-3700-sdhci",
-				"marvell,sdhci-xenon";
+					     "marvell,sdhci-xenon";
 				reg = <0xd8000 0x300
 				       0x17808 0x4>;
 				interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
Signature · 1 line
2.11.0
#4 lore raw

PATCH v3 4/6 arm64: dts: marvell: armada-37xx: Use angle bracket for each register set

In reply to Gregory CLEMENT

When several groups of register address and size are used with reg, then surround each one by angle bracket.

---
 arch/arm64/boot/dts/marvell/armada-37xx.dtsi | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
arch/arm64/boot/dts/marvell/armada-37xx.dtsi +4 -4
index c1076fd0bd9e..65562319770b 100644
@@ -281,8 +281,8 @@
 
 			xor at 60900 {
 				compatible = "marvell,armada-3700-xor";
-				reg = <0x60900 0x100
-				       0x60b00 0x100>;
+				reg = <0x60900 0x100>,
+				      <0x60b00 0x100>;
 
 				xor10 {
 					interrupts = <GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>;
@@ -295,8 +295,8 @@
 			sdhci0: sdhci at d8000 {
 				compatible = "marvell,armada-3700-sdhci",
 					     "marvell,sdhci-xenon";
-				reg = <0xd8000 0x300
-				       0x17808 0x4>;
+				reg = <0xd8000 0x300>,
+				      <0x17808 0x4>;
 				interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
 				clocks = <&nb_periph_clk 0>;
 				clock-names = "core";
Signature · 1 line
2.11.0
#5 lore raw

PATCH v3 5/6 arm64: dts: marvell: Enable second SDHCI controller in Armada 37xx

In reply to Gregory CLEMENT

From: Konstantin Porotchkin <[email protected]>

The Armada 37xx SoCs has 2 SDHCI interfaces. This patch adds the second one.

Moreover, the Armada 37xx DB v2 board populates the 2 SDHCI interfaces.

The second interface is using pluggable module that can either have an SD connector or eMMC on it.
This patch adds support for SD module in the device DT.

[ gregory.clement at free-electrons.com:
- Add more detail in commit log
- Sort the dt node in address order
- Document the SD slot in the dts ]

---
 arch/arm64/boot/dts/marvell/armada-3720-db.dts |  9 +++++++++
 arch/arm64/boot/dts/marvell/armada-37xx.dtsi   | 11 +++++++++++
 2 files changed, 20 insertions(+)
arch/arm64/boot/dts/marvell/armada-3720-db.dts +9 -0
index 3ee920ac0015..eab3bc7e6382 100644
@@ -158,6 +158,15 @@
 	status = "okay";
 };
 
+/* SD slot module on CON14(V2.0)/CON15(V1.4) */
+&sdhci1 {
+	wp-inverted;
+	cd-gpios = <&gpiosb 2 GPIO_ACTIVE_LOW>;
+	bus-width = <4>;
+	marvell,pad-type = "sd";
+	status = "okay";
+};
+
 &spi0 {
 	status = "okay";
 	pinctrl-names = "default";
arch/arm64/boot/dts/marvell/armada-37xx.dtsi +11 -0
index 65562319770b..b4d27857c61b 100644
@@ -292,6 +292,17 @@
 				};
 			};
 
+			sdhci1: sdhci at d0000 {
+				compatible = "marvell,armada-3700-sdhci",
+					     "marvell,sdhci-xenon";
+				reg = <0xd0000 0x300>,
+				      <0x1e808 0x4>;
+				interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
+				clocks = <&nb_periph_clk 0>;
+				clock-names = "core";
+				status = "disabled";
+			};
+
 			sdhci0: sdhci at d8000 {
 				compatible = "marvell,armada-3700-sdhci",
 					     "marvell,sdhci-xenon";
Signature · 1 line
2.11.0
#6 lore raw

PATCH v3 6/6 arm64: dts: marvell: armada-3720-db: Add vqmmc regulator for SD slot

In reply to Gregory CLEMENT

By adding this regulator, the SD cards are usable at higher speed protocols such as SDR104.

This patch was tested with an SD HC card compatible with UHS-I.

---
 arch/arm64/boot/dts/marvell/armada-3720-db.dts | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
arch/arm64/boot/dts/marvell/armada-3720-db.dts +15 -0
index eab3bc7e6382..9df0f06ce607 100644
@@ -80,6 +80,20 @@
 		compatible = "usb-nop-xceiv";
 		vcc-supply = <&exp_usb3_vbus>;
 	};
+
+	vcc_sd_reg1: regulator {
+		compatible = "regulator-gpio";
+		regulator-name = "vcc_sd1";
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <3300000>;
+		regulator-boot-on;
+
+		gpios = <&gpiosb 23 GPIO_ACTIVE_HIGH>;
+		gpios-states = <0>;
+		states = <1800000 0x1
+			  3300000 0x0>;
+		enable-active-high;
+	};
 };
 
 /* Gigabit module on CON19(V2.0)/CON21(V1.4) */
@@ -164,6 +178,7 @@
 	cd-gpios = <&gpiosb 2 GPIO_ACTIVE_LOW>;
 	bus-width = <4>;
 	marvell,pad-type = "sd";
+	vqmmc-supply = <&vcc_sd_reg1>;
 	status = "okay";
 };
 
Signature · 1 line
2.11.0
#7 lore raw

v3 cover Update device tree for Armada 3720 DB

In reply to Gregory CLEMENT

Hi,

Quoted 29 lines · Gregory CLEMENT

Hi,

the main purpose of this short series is to add the support of the second SDHCI controller on the Armada 3720 DB board (and on the Armada 37xx SoC).

This series also adds some improvement to the device tree of the the Armada 3720 DB board and the last patch allow using higher speed on the SD card by adding the vqmmc regulator.

In the v3, I use the angle bracket for each set of register. And I added the reviewed by flag from Andreas F?rber.

In the v2, I added a patch aligning the compatible string and fix the patch " arm64: dts: marvell: Enable second SDHCI controller in Armada 37xx" too.

Gregory

Gregory CLEMENT (5):
arm64: dts: marvell: armada-3720-db: Sort the dts node alphabetically
arm64: dts: marvell: armada-3720-db: Add information about the V2
board
arm64: dts: marvell: armada-37xx: Align the compatible string
arm64: dts: marvell: armada-37xx: Use angle bracket for each register
set
arm64: dts: marvell: armada-3720-db: Add vqmmc regulator for SD slot

Quoted 2 lines

Konstantin Porotchkin (1):
arm64: dts: marvell: Enable second SDHCI controller in Armada 37xx

All series applided on mvebu/dt

Gregory

Quoted 8 lines
 arch/arm64/boot/dts/marvell/armada-3720-db.dts | 120 ++++++++++++++++---------
 arch/arm64/boot/dts/marvell/armada-37xx.dtsi   |  25 ++++--
 2 files changed, 94 insertions(+), 51 deletions(-)
Signature · 1 line
2.11.0
Signature · 4 lines
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#8 lore raw

v3 cover Update device tree for Armada 3720 DB

Hi,

Quoted 33 lines · Gregory CLEMENT

Hi,

Quoted 29 lines · Gregory CLEMENT

Hi,

the main purpose of this short series is to add the support of the second SDHCI controller on the Armada 3720 DB board (and on the Armada 37xx SoC).

This series also adds some improvement to the device tree of the the Armada 3720 DB board and the last patch allow using higher speed on the SD card by adding the vqmmc regulator.

In the v3, I use the angle bracket for each set of register. And I added the reviewed by flag from Andreas F?rber.

In the v2, I added a patch aligning the compatible string and fix the patch " arm64: dts: marvell: Enable second SDHCI controller in Armada 37xx" too.

Gregory

Gregory CLEMENT (5):
arm64: dts: marvell: armada-3720-db: Sort the dts node alphabetically
arm64: dts: marvell: armada-3720-db: Add information about the V2
board
arm64: dts: marvell: armada-37xx: Align the compatible string
arm64: dts: marvell: armada-37xx: Use angle bracket for each register
set
arm64: dts: marvell: armada-3720-db: Add vqmmc regulator for SD slot

Quoted 4 lines
Quoted 2 lines

Konstantin Porotchkin (1):
arm64: dts: marvell: Enable second SDHCI controller in Armada 37xx

All series applided on mvebu/dt

And now applied on the correct tree: mvebu/dt64

Gregory

Quoted 22 lines

Gregory

Quoted 8 lines
 arch/arm64/boot/dts/marvell/armada-3720-db.dts | 120 ++++++++++++++++---------
 arch/arm64/boot/dts/marvell/armada-37xx.dtsi   |  25 ++++--
 2 files changed, 94 insertions(+), 51 deletions(-)
Signature · 1 line
2.11.0
Signature · 9 lines
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Signature · 4 lines
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com