Skip to contentSkip to conversation

arm64: dts: qcom: qcs404: ethernet and other updates

PATCH In review Vinod Koul 2 participants 11 messages Mar 24, 2019 – Mar 25, 2019

Subsystems (3)
lore
Share & tools
lore

Vinod Koul

author
#0 lore raw

cover arm64: dts: qcom: qcs404: ethernet and other updates

This series adds ethernet nodes, fixes DMA settings, fixes regulator voltages and lastly adds spmi regulators for QCS404 platform

Bjorn Andersson (1):
arm64: dts: qcom: qcs404: Fix voltages for s5 and l3

Jorge Ramirez-Ortiz (1):
arm64: dts: qcom: pms405: add spmi regulators

Khasim Syed Mohammed (1):
arm64: dts: qcom: qcs404: Remove default setting of
controlled-remotely for BAM DMA

Shawn Guo (1):
arm64: dts: qcom: qcs404: Enable blsp1_uart3 for qcs404-evb

Vinod Koul (2):
arm64: dts: qcom: qcs404: Add Ethernet node
arm64: dts: qcom: qcs404: Enable ethernet for EVB-4000

 arch/arm64/boot/dts/qcom/pms405.dtsi         | 20 +++++
 arch/arm64/boot/dts/qcom/qcs404-evb-4000.dts | 82 ++++++++++++++++++++
 arch/arm64/boot/dts/qcom/qcs404-evb.dtsi     | 24 +++++-
 arch/arm64/boot/dts/qcom/qcs404.dtsi         | 23 +++++-
 4 files changed, 144 insertions(+), 5 deletions(-)
Signature · 1 line
2.20.1
author
#1 lore raw

PATCH 1/6 arm64: dts: qcom: qcs404: Add Ethernet node

Add the ethernet node found in QCS404 platform.

---
 arch/arm64/boot/dts/qcom/qcs404.dtsi | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
arch/arm64/boot/dts/qcom/qcs404.dtsi +21 -0
index e8fd26633d57..32f2f51bbf7f 100644
@@ -479,6 +479,27 @@
 			status = "okay";
 		};
 
+		ethernet: ethernet@7a80000 {
+			compatible = "qcom,qcs404-ethqos";
+			reg = <0x07a80000 0x10000>,
+				<0x07a96000 0x100>;
+			reg-names = "stmmaceth", "rgmii";
+			clock-names = "stmmaceth", "pclk", "ptp_ref", "rgmii";
+			clocks = <&gcc GCC_ETH_AXI_CLK>,
+				<&gcc GCC_ETH_SLAVE_AHB_CLK>,
+				<&gcc GCC_ETH_PTP_CLK>,
+				<&gcc GCC_ETH_RGMII_CLK>;
+			interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "macirq", "eth_lpi";
+
+			snps,tso;
+			rx-fifo-depth = <4096>;
+			tx-fifo-depth = <4096>;
+
+			status = "disabled";
+		};
+
 		wifi: wifi@a000000 {
 			compatible = "qcom,wcn3990-wifi";
 			reg = <0xa000000 0x800000>;
Signature · 1 line
2.20.1
author
#2 lore raw

PATCH 2/6 arm64: dts: qcom: qcs404: Enable ethernet for EVB-4000

In reply to Vinod Koul

EVB-4000 comes with ethernet so enable it and add pinctrl bindings.

---
 arch/arm64/boot/dts/qcom/qcs404-evb-4000.dts | 82 ++++++++++++++++++++
 1 file changed, 82 insertions(+)
arch/arm64/boot/dts/qcom/qcs404-evb-4000.dts +82 -0
index 11269ad3de0d..8234cff414de 100644
@@ -3,9 +3,91 @@
 
 /dts-v1/;
 
+#include <dt-bindings/gpio/gpio.h>
 #include "qcs404-evb.dtsi"
 
 / {
 	model = "Qualcomm Technologies, Inc. QCS404 EVB 4000";
 	compatible = "qcom,qcs404-evb";
 };
+
+&ethernet {
+	status = "ok";
+
+	snps,reset-gpio = <&tlmm 60 GPIO_ACTIVE_LOW>;
+	snps,reset-active-low;
+	snps,reset-delays-us = <0 10000 10000>;
+
+	pinctrl-names = "default";
+	pinctrl-0 = <&ethernet_defaults>;
+
+	phy-handle = <&phy1>;
+	phy-mode = "rgmii";
+	mdio {
+		#address-cells = <0x1>;
+		#size-cells = <0x0>;
+		compatible = "snps,dwmac-mdio";
+		phy1: phy@4 {
+			compatible = "ethernet-phy-ieee802.3-c22";
+			device_type = "ethernet-phy";
+			reg = <0x4>;
+		};
+	};
+};
+
+&tlmm {
+	ethernet_defaults: ethernet-defaults {
+		int {
+			pins = "gpio61";
+			function = "rgmii_int";
+			bias-disable;
+			drive-strength = <2>;
+		};
+		mdc {
+			pins = "gpio76";
+			function = "rgmii_mdc";
+			bias-pull-up;
+		};
+		mdio {
+			pins = "gpio75";
+			function = "rgmii_mdio";
+			bias-pull-up;
+		};
+		tx {
+			pins = "gpio67", "gpio66", "gpio65", "gpio64";
+			function = "rgmii_tx";
+			bias-pull-up;
+			drive-strength = <16>;
+		};
+		rx {
+			pins = "gpio73", "gpio72", "gpio71", "gpio70";
+			function = "rgmii_rx";
+			bias-disable;
+			drive-strength = <2>;
+		};
+		tx-ctl {
+			pins = "gpio68";
+			function = "rgmii_ctl";
+			bias-pull-up;
+			drive-strength = <16>;
+		};
+		rx-ctl {
+			pins = "gpio74";
+			function = "rgmii_ctl";
+			bias-disable;
+			drive-strength = <2>;
+		};
+		tx-ck {
+			pins = "gpio63";
+			function = "rgmii_ck";
+			bias-pull-up;
+			drive-strength = <16>;
+		};
+		rx-ck {
+			pins = "gpio69";
+			function = "rgmii_ck";
+			bias-disable;
+			drive-strength = <2>;
+		};
+	};
+};
Signature · 1 line
2.20.1
author
#3 lore raw

PATCH 3/6 arm64: dts: qcom: qcs404: Fix voltages for s5 and l3

In reply to Vinod Koul

From: Bjorn Andersson <[email protected]>

PMS405 S5 was upstreamed without a voltage and PMS405 L3 is outside the acceptable range, causing PCIe to fail. Fix these.

---
 arch/arm64/boot/dts/qcom/qcs404-evb.dtsi | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm64/boot/dts/qcom/qcs404-evb.dtsi +3 -3
index 50b3589c7f15..323f9633084b 100644
@@ -56,8 +56,8 @@
 		};
 
 		vreg_s5_1p35: s5 {
-			regulator-min-microvolt = <>;
-			regulator-max-microvolt = <>;
+			regulator-min-microvolt = <1352000>;
+			regulator-max-microvolt = <1352000>;
 		};
 
 		vreg_l1_1p3: l1 {
@@ -71,7 +71,7 @@
 		};
 
 		vreg_l3_1p05: l3 {
-			regulator-min-microvolt = <976000>;
+			regulator-min-microvolt = <1050000>;
 			regulator-max-microvolt = <1160000>;
 		};
 
Signature · 1 line
2.20.1
author
#4 lore raw

PATCH 4/6 arm64: dts: qcom: qcs404: Enable blsp1_uart3 for qcs404-evb

In reply to Vinod Koul

From: Shawn Guo <[email protected]>

It defines pinctrl settings for blsp1_uart3 in board level dts and enable the device by toggling 'status'.

---
 arch/arm64/boot/dts/qcom/qcs404-evb.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)
arch/arm64/boot/dts/qcom/qcs404-evb.dtsi +10 -0
index 323f9633084b..d4fadeaa0bbc 100644
@@ -7,6 +7,7 @@
 / {
 	aliases {
 		serial0 = &blsp1_uart2;
+		serial1 = &blsp1_uart3;
 	};
 
 	chosen {
@@ -137,6 +138,11 @@
 };
 
 &tlmm {
+	blsp1_uart3_default: blsp1-uart3-default {
+		drive-strength = <2>;
+		bias-disable;
+	};
+
 	sdc1_on: sdc1-on {
 		clk {
 			pins = "sdc1_clk";
@@ -205,3 +211,7 @@
 		bias-disable;
 	};
 };
+
+&blsp1_uart3 {
+	status = "okay";
+};
Signature · 1 line
2.20.1
#5 lore raw

Re: [PATCH 4/6] arm64: dts: qcom: qcs404: Enable blsp1_uart3 for qcs404-evb

Quoted 8 lines · Vinod Koul

From: Shawn Guo <[email protected]>

It defines pinctrl settings for blsp1_uart3 in board level dts and enable the device by toggling 'status'.

How about a review of this patch instead?

https://lore.kernel.org/lkml/[email protected]/

Regards,
Bjorn

Quoted 39 lines
---
 arch/arm64/boot/dts/qcom/qcs404-evb.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)
arch/arm64/boot/dts/qcom/qcs404-evb.dtsi +10 -0
index 323f9633084b..d4fadeaa0bbc 100644
@@ -7,6 +7,7 @@
 / {
 	aliases {
 		serial0 = &blsp1_uart2;
+		serial1 = &blsp1_uart3;
 	};
 
 	chosen {
@@ -137,6 +138,11 @@
 };
 
 &tlmm {
+	blsp1_uart3_default: blsp1-uart3-default {
+		drive-strength = <2>;
+		bias-disable;
+	};
+
 	sdc1_on: sdc1-on {
 		clk {
 			pins = "sdc1_clk";
@@ -205,3 +211,7 @@
 		bias-disable;
 	};
 };
+
+&blsp1_uart3 {
+	status = "okay";
+};
Signature · 1 line
2.20.1
author
#6 lore raw

Re: [PATCH 4/6] arm64: dts: qcom: qcs404: Enable blsp1_uart3 for qcs404-evb

Quoted 7 lines · Bjorn Andersson
Quoted 5 lines · Vinod Koul

From: Shawn Guo <[email protected]>

It defines pinctrl settings for blsp1_uart3 in board level dts and enable the device by toggling 'status'.

Quoted 7 lines
Quoted 3 lines

How about a review of this patch instead?

https://lore.kernel.org/lkml/[email protected]/

Done lgtm..

Signature · 1 line
~Vinod
author
#7 lore raw

PATCH 5/6 arm64: dts: qcom: pms405: add spmi regulators

In reply to Vinod Koul

From: Jorge Ramirez-Ortiz <[email protected]>

The PMS405 sports 5 SMPS and 13 LDO regulators.

---
 arch/arm64/boot/dts/qcom/pms405.dtsi | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
arch/arm64/boot/dts/qcom/pms405.dtsi +20 -0
index 1bb836d1e8aa..8da4dee1db9b 100644
@@ -131,4 +131,24 @@
 			interrupts = <0x0 0x61 0x1 IRQ_TYPE_NONE>;
 		};
 	};
+
+	pms405_1: pms405@1 {
+		compatible = "qcom,spmi-pmic";
+		reg = <0x1 SPMI_USID>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		regulators {
+			compatible = "qcom,pms405-regulators";
+			vdd_s3-supply = <&pms405_s3>;
+
+			pms405_s3: s3 {
+				regulator-always-on;
+				regulator-boot-on;
+				regulator-name = "vdd_cpu";
+				regulator-min-microvolt = <1048000>;
+				regulator-max-microvolt = <1352000>;
+			};
+		};
+	};
 };
Signature · 1 line
2.20.1
#8 lore raw

Re: [PATCH 5/6] arm64: dts: qcom: pms405: add spmi regulators

Quoted 17 lines · Vinod Koul

From: Jorge Ramirez-Ortiz <[email protected]>

The PMS405 sports 5 SMPS and 13 LDO regulators.

---
 arch/arm64/boot/dts/qcom/pms405.dtsi | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
arch/arm64/boot/dts/qcom/pms405.dtsi +0 -0
index 1bb836d1e8aa..8da4dee1db9b 100644
@@ -131,4 +131,24 @@
 			interrupts = <0x0 0x61 0x1 IRQ_TYPE_NONE>;

arch/arm64/boot/dts/qcom/pms405.dtsi line 141

Quoted 10 lines
arch/arm64/boot/dts/qcom/pms405.dtsi +8 -0
 		};
 	};
+
+	pms405_1: pms405@1 {
+		compatible = "qcom,spmi-pmic";
+		reg = <0x1 SPMI_USID>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		regulators {

Label the regulators node and keep the compatible here. s3-supply and pms405_s3 are board specific, so define these in the qcs404-evb.dtsi instead.

Also double check the EVB schematics for the name of the line coming out of S3; I would assume vdd_apc or something like that.

Regards,
Bjorn

Quoted 16 lines
arch/arm64/boot/dts/qcom/pms405.dtsi +12 -0
+			compatible = "qcom,pms405-regulators";
+			vdd_s3-supply = <&pms405_s3>;
+
+			pms405_s3: s3 {
+				regulator-always-on;
+				regulator-boot-on;
+				regulator-name = "vdd_cpu";
+				regulator-min-microvolt = <1048000>;
+				regulator-max-microvolt = <1352000>;
+			};
+		};
+	};
 };
Signature · 1 line
2.20.1
author
#9 lore raw

PATCH 6/6 arm64: dts: qcom: qcs404: Remove default setting of controlled-remotely for BAM DMA

In reply to Vinod Koul

From: Khasim Syed Mohammed <[email protected]>

The property controlled-remotely should not be set by default for qcs-404 device, it should be set based on the secure boot options (TZ or ATF) preferred by the platform. Hence, the controlled-remotely property is moved to platform specific dts files.

---
 arch/arm64/boot/dts/qcom/qcs404-evb.dtsi | 8 ++++++++
 arch/arm64/boot/dts/qcom/qcs404.dtsi     | 2 --
 2 files changed, 8 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/qcom/qcs404-evb.dtsi +8 -0
index d4fadeaa0bbc..b04e38ae163f 100644
@@ -215,3 +215,11 @@
 &blsp1_uart3 {
 	status = "okay";
 };
+
+&blsp1_dma {
+	qcom,controlled-remotely;
+};
+
+&blsp2_dma {
+	qcom,controlled-remotely;
+};
arch/arm64/boot/dts/qcom/qcs404.dtsi +0 -2
index 32f2f51bbf7f..ffedf9640af7 100644
@@ -435,7 +435,6 @@
 			clocks = <&gcc GCC_BLSP1_AHB_CLK>;
 			clock-names = "bam_clk";
 			#dma-cells = <1>;
-			qcom,controlled-remotely = <1>;
 			qcom,ee = <0>;
 			status = "okay";
 		};
@@ -680,7 +679,6 @@
 			clocks = <&gcc GCC_BLSP2_AHB_CLK>;
 			clock-names = "bam_clk";
 			#dma-cells = <1>;
-			qcom,controlled-remotely = <1>;
 			qcom,ee = <0>;
 			status = "disabled";
 		};
Signature · 1 line
2.20.1
#10 lore raw
In reply to Vinod Koul
Quoted 3 lines · Vinod Koul

This series adds ethernet nodes, fixes DMA settings, fixes regulator voltages and lastly adds spmi regulators for QCS404 platform

Thanks Vinod, happy to see these on the list.

I picked up patches 1, 2, 3 and 6.

Regards,
Bjorn

Quoted 26 lines

Bjorn Andersson (1):
arm64: dts: qcom: qcs404: Fix voltages for s5 and l3

Jorge Ramirez-Ortiz (1):
arm64: dts: qcom: pms405: add spmi regulators

Khasim Syed Mohammed (1):
arm64: dts: qcom: qcs404: Remove default setting of
controlled-remotely for BAM DMA

Shawn Guo (1):
arm64: dts: qcom: qcs404: Enable blsp1_uart3 for qcs404-evb

Vinod Koul (2):
arm64: dts: qcom: qcs404: Add Ethernet node
arm64: dts: qcom: qcs404: Enable ethernet for EVB-4000

 arch/arm64/boot/dts/qcom/pms405.dtsi         | 20 +++++
 arch/arm64/boot/dts/qcom/qcs404-evb-4000.dts | 82 ++++++++++++++++++++
 arch/arm64/boot/dts/qcom/qcs404-evb.dtsi     | 24 +++++-
 arch/arm64/boot/dts/qcom/qcs404.dtsi         | 23 +++++-
 4 files changed, 144 insertions(+), 5 deletions(-)
Signature · 1 line
2.20.1