linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] ARM: dts: qcom: Enable various devices for IPQ806x / RB3011
@ 2021-05-15 16:52 Jonathan McDowell
  2021-05-15 16:52 ` [PATCH 1/5] ARM: dts: qcom: Add ADM DMA + NAND definitions to ipq806x Jonathan McDowell
                   ` (5 more replies)
  0 siblings, 6 replies; 17+ messages in thread
From: Jonathan McDowell @ 2021-05-15 16:52 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Rob Herring, Ansuel Smith,
	linux-arm-msm, devicetree, linux-kernel

This series adds various devices (NAND, USB, tsens, L2CC, RPM) which
have either recently gained mainline drivers, or just failed to be
previously added, to the DTS for the IPQ806x platform. It then enables
them for the MikroTik RB3011 platform, where they have all been tested.

I've done the additions to the main IPQ806x DTS as separate commits for
each logical set, and then a single wholesale set of changes for the
RB3011 to turn everything on. Happy to squash to 1/2 commits or split
out further if desired.

Jonathan McDowell (5):
  ARM: dts: qcom: Add ADM DMA + NAND definitions to ipq806x
  ARM: dts: qcom: Add tsens details to ipq806x
  ARM: dts: qcom: Add USB port definitions to ipq806x
  ARM: dts: qcom: add L2CC and RPM for IPQ8064
  ARM: dts: qcom: Enable NAND + USB for RB3011

 arch/arm/boot/dts/qcom-ipq8064-rb3011.dts |  58 +++
 arch/arm/boot/dts/qcom-ipq8064.dtsi       | 427 +++++++++++++++++++++-
 2 files changed, 484 insertions(+), 1 deletion(-)

-- 
2.20.1


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 1/5] ARM: dts: qcom: Add ADM DMA + NAND definitions to ipq806x
  2021-05-15 16:52 [PATCH 0/5] ARM: dts: qcom: Enable various devices for IPQ806x / RB3011 Jonathan McDowell
@ 2021-05-15 16:52 ` Jonathan McDowell
  2021-05-17  9:40   ` Vinod Koul
  2021-05-15 16:52 ` [PATCH 2/5] ARM: dts: qcom: Add tsens details " Jonathan McDowell
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 17+ messages in thread
From: Jonathan McDowell @ 2021-05-15 16:52 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Rob Herring, Ansuel Smith,
	linux-arm-msm, devicetree, linux-kernel

Now the ADM driver is in mainline add the appropriate definitions for it
and the NAND controller to get NAND working on IPQ806x platforms,

Signed-off-by: Jonathan McDowell <noodles@earth.li>
---
 arch/arm/boot/dts/qcom-ipq8064.dtsi | 67 +++++++++++++++++++++++++++++
 1 file changed, 67 insertions(+)

diff --git a/arch/arm/boot/dts/qcom-ipq8064.dtsi b/arch/arm/boot/dts/qcom-ipq8064.dtsi
index 98995ead4413..aaab3820ab0b 100644
--- a/arch/arm/boot/dts/qcom-ipq8064.dtsi
+++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi
@@ -185,6 +185,31 @@
 					bias-pull-up;
 				};
 			};
+
+			nand_pins: nand_pins {
+				mux {
+					pins = "gpio34", "gpio35", "gpio36",
+					       "gpio37", "gpio38", "gpio39",
+					       "gpio40", "gpio41", "gpio42",
+					       "gpio43", "gpio44", "gpio45",
+					       "gpio46", "gpio47";
+					function = "nand";
+					drive-strength = <10>;
+					bias-disable;
+				};
+
+				pullups {
+					pins = "gpio39";
+					bias-pull-up;
+				};
+
+				hold {
+					pins = "gpio40", "gpio41", "gpio42",
+					       "gpio43", "gpio44", "gpio45",
+					       "gpio46", "gpio47";
+					bias-bus-hold;
+				};
+			};
 		};
 
 		intc: interrupt-controller@2000000 {
@@ -226,6 +251,26 @@
 			reg = <0x02098000 0x1000>, <0x02008000 0x1000>;
 		};
 
+		adm_dma: dma@18300000 {
+			compatible = "qcom,adm";
+			reg = <0x18300000 0x100000>;
+			interrupts = <GIC_SPI 170 IRQ_TYPE_LEVEL_HIGH>;
+			#dma-cells = <1>;
+
+			clocks = <&gcc ADM0_CLK>, <&gcc ADM0_PBUS_CLK>;
+			clock-names = "core", "iface";
+
+			resets = <&gcc ADM0_RESET>,
+				 <&gcc ADM0_PBUS_RESET>,
+				 <&gcc ADM0_C0_RESET>,
+				 <&gcc ADM0_C1_RESET>,
+				 <&gcc ADM0_C2_RESET>;
+			reset-names = "clk", "pbus", "c0", "c1", "c2";
+			qcom,ee = <0>;
+
+			status = "disabled";
+		};
+
 		saw0: regulator@2089000 {
 			compatible = "qcom,saw2";
 			reg = <0x02089000 0x1000>, <0x02009000 0x1000>;
@@ -403,6 +448,28 @@
 			status = "disabled";
 		};
 
+		nand: nand-controller@1ac00000 {
+			compatible = "qcom,ipq806x-nand";
+			reg = <0x1ac00000 0x800>;
+
+			pinctrl-0 = <&nand_pins>;
+			pinctrl-names = "default";
+
+			clocks = <&gcc EBI2_CLK>,
+				 <&gcc EBI2_AON_CLK>;
+			clock-names = "core", "aon";
+
+			dmas = <&adm_dma 3>;
+			dma-names = "rxtx";
+			qcom,cmd-crci = <15>;
+			qcom,data-crci = <3>;
+
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			status = "disabled";
+		};
+
 		sata: sata@29000000 {
 			compatible = "qcom,ipq806x-ahci", "generic-ahci";
 			reg = <0x29000000 0x180>;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 2/5] ARM: dts: qcom: Add tsens details to ipq806x
  2021-05-15 16:52 [PATCH 0/5] ARM: dts: qcom: Enable various devices for IPQ806x / RB3011 Jonathan McDowell
  2021-05-15 16:52 ` [PATCH 1/5] ARM: dts: qcom: Add ADM DMA + NAND definitions to ipq806x Jonathan McDowell
@ 2021-05-15 16:52 ` Jonathan McDowell
  2021-05-17  9:42   ` Vinod Koul
  2021-05-15 16:52 ` [PATCH 3/5] ARM: dts: qcom: Add USB port definitions " Jonathan McDowell
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 17+ messages in thread
From: Jonathan McDowell @ 2021-05-15 16:52 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Rob Herring, Ansuel Smith,
	linux-arm-msm, devicetree, linux-kernel

Signed-off-by: Jonathan McDowell <noodles@earth.li>
---
 arch/arm/boot/dts/qcom-ipq8064.dtsi | 243 +++++++++++++++++++++++++++-
 1 file changed, 242 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/qcom-ipq8064.dtsi b/arch/arm/boot/dts/qcom-ipq8064.dtsi
index aaab3820ab0b..582d8a59e59b 100644
--- a/arch/arm/boot/dts/qcom-ipq8064.dtsi
+++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi
@@ -46,6 +46,228 @@
 		};
 	};
 
+	thermal-zones {
+		tsens_tz_sensor0 {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+			thermal-sensors = <&tsens 0>;
+
+			trips {
+				cpu-critical {
+					temperature = <105000>;
+					hysteresis = <2000>;
+					type = "critical";
+				};
+
+				cpu-hot {
+					temperature = <95000>;
+					hysteresis = <2000>;
+					type = "hot";
+				};
+			};
+		};
+
+		tsens_tz_sensor1 {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+			thermal-sensors = <&tsens 1>;
+
+			trips {
+				cpu-critical {
+					temperature = <105000>;
+					hysteresis = <2000>;
+					type = "critical";
+				};
+
+				cpu-hot {
+					temperature = <95000>;
+					hysteresis = <2000>;
+					type = "hot";
+				};
+			};
+		};
+
+		tsens_tz_sensor2 {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+			thermal-sensors = <&tsens 2>;
+
+			trips {
+				cpu-critical {
+					temperature = <105000>;
+					hysteresis = <2000>;
+					type = "critical";
+				};
+
+				cpu-hot {
+					temperature = <95000>;
+					hysteresis = <2000>;
+					type = "hot";
+				};
+			};
+		};
+
+		tsens_tz_sensor3 {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+			thermal-sensors = <&tsens 3>;
+
+			trips {
+				cpu-critical {
+					temperature = <105000>;
+					hysteresis = <2000>;
+					type = "critical";
+				};
+
+				cpu-hot {
+					temperature = <95000>;
+					hysteresis = <2000>;
+					type = "hot";
+				};
+			};
+		};
+
+		tsens_tz_sensor4 {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+			thermal-sensors = <&tsens 4>;
+
+			trips {
+				cpu-critical {
+					temperature = <105000>;
+					hysteresis = <2000>;
+					type = "critical";
+				};
+
+				cpu-hot {
+					temperature = <95000>;
+					hysteresis = <2000>;
+					type = "hot";
+				};
+			};
+		};
+
+		tsens_tz_sensor5 {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+			thermal-sensors = <&tsens 5>;
+
+			trips {
+				cpu-critical {
+					temperature = <105000>;
+					hysteresis = <2000>;
+					type = "critical";
+				};
+
+				cpu-hot {
+					temperature = <95000>;
+					hysteresis = <2000>;
+					type = "hot";
+				};
+			};
+		};
+
+		tsens_tz_sensor6 {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+			thermal-sensors = <&tsens 6>;
+
+			trips {
+				cpu-critical {
+					temperature = <105000>;
+					hysteresis = <2000>;
+					type = "critical";
+				};
+
+				cpu-hot {
+					temperature = <95000>;
+					hysteresis = <2000>;
+					type = "hot";
+				};
+			};
+		};
+
+		tsens_tz_sensor7 {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+			thermal-sensors = <&tsens 7>;
+
+			trips {
+				cpu-critical {
+					temperature = <105000>;
+					hysteresis = <2000>;
+					type = "critical";
+				};
+
+				cpu-hot {
+					temperature = <95000>;
+					hysteresis = <2000>;
+					type = "hot";
+				};
+			};
+		};
+
+		tsens_tz_sensor8 {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+			thermal-sensors = <&tsens 8>;
+
+			trips {
+				cpu-critical {
+					temperature = <105000>;
+					hysteresis = <2000>;
+					type = "critical";
+				};
+
+				cpu-hot {
+					temperature = <95000>;
+					hysteresis = <2000>;
+					type = "hot";
+				};
+			};
+		};
+
+		tsens_tz_sensor9 {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+			thermal-sensors = <&tsens 9>;
+
+			trips {
+				cpu-critical {
+					temperature = <105000>;
+					hysteresis = <2000>;
+					type = "critical";
+				};
+
+				cpu-hot {
+					temperature = <95000>;
+					hysteresis = <2000>;
+					type = "hot";
+				};
+			};
+		};
+
+		tsens_tz_sensor10 {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+			thermal-sensors = <&tsens 10>;
+
+			trips {
+				cpu-critical {
+					temperature = <105000>;
+					hysteresis = <2000>;
+					type = "critical";
+				};
+
+				cpu-hot {
+					temperature = <95000>;
+					hysteresis = <2000>;
+					type = "hot";
+				};
+			};
+		};
+	};
+
 	memory {
 		device_type = "memory";
 		reg = <0x0 0x0>;
@@ -503,13 +725,32 @@
 			reg = <0x00700000 0x1000>;
 			#address-cells = <1>;
 			#size-cells = <1>;
+			tsens_calib: calib@400 {
+				reg = <0x400 0xb>;
+			};
+			tsens_calib_backup: calib_backup@410 {
+				reg = <0x410 0xb>;
+			};
 		};
 
 		gcc: clock-controller@900000 {
-			compatible = "qcom,gcc-ipq8064";
+			compatible = "qcom,gcc-ipq8064", "syscon";
 			reg = <0x00900000 0x4000>;
 			#clock-cells = <1>;
 			#reset-cells = <1>;
+			#power-domain-cells = <1>;
+
+			tsens: thermal-sensor@900000 {
+				compatible = "qcom,ipq8064-tsens";
+
+				nvmem-cells = <&tsens_calib>, <&tsens_calib_backup>;
+				nvmem-cell-names = "calib", "calib_backup";
+				interrupts = <GIC_SPI 178 IRQ_TYPE_LEVEL_HIGH>;
+				interrupt-names = "uplow";
+
+				#qcom,sensors = <11>;
+				#thermal-sensor-cells = <1>;
+			};
 		};
 
 		tcsr: syscon@1a400000 {
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 3/5] ARM: dts: qcom: Add USB port definitions to ipq806x
  2021-05-15 16:52 [PATCH 0/5] ARM: dts: qcom: Enable various devices for IPQ806x / RB3011 Jonathan McDowell
  2021-05-15 16:52 ` [PATCH 1/5] ARM: dts: qcom: Add ADM DMA + NAND definitions to ipq806x Jonathan McDowell
  2021-05-15 16:52 ` [PATCH 2/5] ARM: dts: qcom: Add tsens details " Jonathan McDowell
@ 2021-05-15 16:52 ` Jonathan McDowell
  2021-05-15 16:53 ` [PATCH 4/5] ARM: dts: qcom: add L2CC and RPM for IPQ8064 Jonathan McDowell
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 17+ messages in thread
From: Jonathan McDowell @ 2021-05-15 16:52 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Rob Herring, Ansuel Smith,
	linux-arm-msm, devicetree, linux-kernel

Signed-off-by: Jonathan McDowell <noodles@earth.li>
---
 arch/arm/boot/dts/qcom-ipq8064.dtsi | 88 +++++++++++++++++++++++++++++
 1 file changed, 88 insertions(+)

diff --git a/arch/arm/boot/dts/qcom-ipq8064.dtsi b/arch/arm/boot/dts/qcom-ipq8064.dtsi
index 582d8a59e59b..afa11acfb378 100644
--- a/arch/arm/boot/dts/qcom-ipq8064.dtsi
+++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi
@@ -1026,6 +1026,94 @@
 			status = "disabled";
 		};
 
+		hs_phy_0: hs_phy_0 {
+			compatible = "qcom,ipq806x-usb-phy-hs";
+			reg = <0x100f8800 0x30>;
+			clocks = <&gcc USB30_0_UTMI_CLK>;
+			clock-names = "ref";
+			#phy-cells = <0>;
+
+			status = "disabled";
+		};
+
+		ss_phy_0: ss_phy_0 {
+			compatible = "qcom,ipq806x-usb-phy-ss";
+			reg = <0x100f8830 0x30>;
+			clocks = <&gcc USB30_0_MASTER_CLK>;
+			clock-names = "ref";
+			#phy-cells = <0>;
+
+			status = "disabled";
+		};
+
+		usb3_0: usb3@100f8800 {
+			compatible = "qcom,dwc3", "syscon";
+			#address-cells = <1>;
+			#size-cells = <1>;
+			reg = <0x100f8800 0x8000>;
+			clocks = <&gcc USB30_0_MASTER_CLK>;
+			clock-names = "core";
+
+			ranges;
+
+			resets = <&gcc USB30_0_MASTER_RESET>;
+			reset-names = "master";
+
+			status = "disabled";
+
+			dwc3_0: dwc3@10000000 {
+				compatible = "snps,dwc3";
+				reg = <0x10000000 0xcd00>;
+				interrupts = <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>;
+				phys = <&hs_phy_0>, <&ss_phy_0>;
+				phy-names = "usb2-phy", "usb3-phy";
+				dr_mode = "host";
+				snps,dis_u3_susphy_quirk;
+			};
+		};
+
+		hs_phy_1: hs_phy_1 {
+			compatible = "qcom,ipq806x-usb-phy-hs";
+			reg = <0x110f8800 0x30>;
+			clocks = <&gcc USB30_1_UTMI_CLK>;
+			clock-names = "ref";
+			#phy-cells = <0>;
+		};
+
+		ss_phy_1: ss_phy_1 {
+			compatible = "qcom,ipq806x-usb-phy-ss";
+			reg = <0x110f8830 0x30>;
+			clocks = <&gcc USB30_1_MASTER_CLK>;
+			clock-names = "ref";
+			#phy-cells = <0>;
+		};
+
+		usb3_1: usb3@110f8800 {
+			compatible = "qcom,dwc3", "syscon";
+			#address-cells = <1>;
+			#size-cells = <1>;
+			reg = <0x110f8800 0x8000>;
+			clocks = <&gcc USB30_1_MASTER_CLK>;
+			clock-names = "core";
+
+			ranges;
+
+			resets = <&gcc USB30_1_MASTER_RESET>;
+			reset-names = "master";
+
+			status = "disabled";
+
+			dwc3_1: dwc3@11000000 {
+				compatible = "snps,dwc3";
+				reg = <0x11000000 0xcd00>;
+				interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;
+				phys = <&hs_phy_1>, <&ss_phy_1>;
+				phy-names = "usb2-phy", "usb3-phy";
+				dr_mode = "host";
+				snps,dis_u3_susphy_quirk;
+			};
+		};
+
 		vsdcc_fixed: vsdcc-regulator {
 			compatible = "regulator-fixed";
 			regulator-name = "SDCC Power";
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 4/5] ARM: dts: qcom: add L2CC and RPM for IPQ8064
  2021-05-15 16:52 [PATCH 0/5] ARM: dts: qcom: Enable various devices for IPQ806x / RB3011 Jonathan McDowell
                   ` (2 preceding siblings ...)
  2021-05-15 16:52 ` [PATCH 3/5] ARM: dts: qcom: Add USB port definitions " Jonathan McDowell
@ 2021-05-15 16:53 ` Jonathan McDowell
  2021-05-15 16:53 ` [PATCH 5/5] ARM: dts: qcom: Enable NAND + USB for RB3011 Jonathan McDowell
  2021-05-20 17:29 ` [PATCH v2 0/5] ARM: dts: qcom: Enable various devices for IPQ806x / RB3011 Jonathan McDowell
  5 siblings, 0 replies; 17+ messages in thread
From: Jonathan McDowell @ 2021-05-15 16:53 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Rob Herring, Ansuel Smith,
	linux-arm-msm, devicetree, linux-kernel

This adds the L2CC IPC resource and RPM devices to the IPQ8064 device
tree.

Tested on a Mikrotik RB3011.

Signed-off-by: Jonathan McDowell <noodles@earth.li>
---
 arch/arm/boot/dts/qcom-ipq8064.dtsi | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/arch/arm/boot/dts/qcom-ipq8064.dtsi b/arch/arm/boot/dts/qcom-ipq8064.dtsi
index afa11acfb378..e4e3dc59c650 100644
--- a/arch/arm/boot/dts/qcom-ipq8064.dtsi
+++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi
@@ -2,6 +2,8 @@
 /dts-v1/;
 
 #include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/mfd/qcom-rpm.h>
+#include <dt-bindings/clock/qcom,rpmcc.h>
 #include <dt-bindings/clock/qcom,gcc-ipq806x.h>
 #include <dt-bindings/clock/qcom,lcc-ipq806x.h>
 #include <dt-bindings/gpio/gpio.h>
@@ -753,11 +755,38 @@
 			};
 		};
 
+		rpm: rpm@108000 {
+			compatible = "qcom,rpm-ipq8064";
+			reg = <0x108000 0x1000>;
+			qcom,ipc = <&l2cc 0x8 2>;
+
+			interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "ack", "err", "wakeup";
+
+			clocks = <&gcc RPM_MSG_RAM_H_CLK>;
+			clock-names = "ram";
+
+			rpmcc: clock-controller {
+				compatible = "qcom,rpmcc-ipq806x", "qcom,rpmcc";
+				#clock-cells = <1>;
+			};
+		};
+
 		tcsr: syscon@1a400000 {
 			compatible = "qcom,tcsr-ipq8064", "syscon";
 			reg = <0x1a400000 0x100>;
 		};
 
+		l2cc: clock-controller@2011000 {
+			compatible = "qcom,kpss-gcc", "syscon";
+			reg = <0x2011000 0x1000>;
+			clocks = <&gcc PLL8_VOTE>, <&gcc PXO_SRC>;
+			clock-names = "pll8_vote", "pxo";
+			clock-output-names = "acpu_l2_aux";
+		};
+
 		lcc: clock-controller@28000000 {
 			compatible = "qcom,lcc-ipq8064";
 			reg = <0x28000000 0x1000>;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 5/5] ARM: dts: qcom: Enable NAND + USB for RB3011
  2021-05-15 16:52 [PATCH 0/5] ARM: dts: qcom: Enable various devices for IPQ806x / RB3011 Jonathan McDowell
                   ` (3 preceding siblings ...)
  2021-05-15 16:53 ` [PATCH 4/5] ARM: dts: qcom: add L2CC and RPM for IPQ8064 Jonathan McDowell
@ 2021-05-15 16:53 ` Jonathan McDowell
  2021-05-20 17:29 ` [PATCH v2 0/5] ARM: dts: qcom: Enable various devices for IPQ806x / RB3011 Jonathan McDowell
  5 siblings, 0 replies; 17+ messages in thread
From: Jonathan McDowell @ 2021-05-15 16:53 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Rob Herring, Ansuel Smith,
	linux-arm-msm, devicetree, linux-kernel

Enable the NAND + USB devices for the MikroTik RB3011 platform now
they're in the main IPQ806x DT.

Signed-off-by: Jonathan McDowell <noodles@earth.li>
---
 arch/arm/boot/dts/qcom-ipq8064-rb3011.dts | 58 +++++++++++++++++++++++
 1 file changed, 58 insertions(+)

diff --git a/arch/arm/boot/dts/qcom-ipq8064-rb3011.dts b/arch/arm/boot/dts/qcom-ipq8064-rb3011.dts
index 282b89ce3d45..f7ea2e5dd191 100644
--- a/arch/arm/boot/dts/qcom-ipq8064-rb3011.dts
+++ b/arch/arm/boot/dts/qcom-ipq8064-rb3011.dts
@@ -216,6 +216,10 @@
 	};
 };
 
+&adm_dma {
+	status = "okay";
+};
+
 &gmac0 {
 	status = "okay";
 
@@ -251,6 +255,39 @@
 	status = "okay";
 };
 
+&hs_phy_1 {
+	status = "okay";
+};
+
+&nand {
+	status = "okay";
+
+	nandcs@0 {
+		compatible = "qcom,nandcs";
+		reg = <0>;
+
+		nand-ecc-strength = <4>;
+		nand-bus-width = <8>;
+		nand-ecc-step-size = <512>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			boot@0 {
+				label = "RouterBoard NAND 1 Boot";
+				reg = <0x0000000 0x0800000>;
+			};
+
+			main@800000 {
+				label = "RouterBoard NAND 1 Main";
+				reg = <0x0800000 0x7800000>;
+			};
+		};
+	};
+};
+
 &qcom_pinmux {
 	buttons_pins: buttons_pins {
 		mux {
@@ -305,4 +342,25 @@
 			input-disable;
 		};
 	};
+
+	usb1_pwr_en_pins: usb1_pwr_en_pins {
+		mux {
+			pins = "gpio4";
+			function = "gpio";
+			drive-strength = <16>;
+			bias-disable;
+			output-high;
+		};
+	};
+};
+
+&ss_phy_1 {
+	status = "okay";
+};
+
+&usb3_1 {
+	pinctrl-0 = <&usb1_pwr_en_pins>;
+	pinctrl-names = "default";
+
+	status = "okay";
 };
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [PATCH 1/5] ARM: dts: qcom: Add ADM DMA + NAND definitions to ipq806x
  2021-05-15 16:52 ` [PATCH 1/5] ARM: dts: qcom: Add ADM DMA + NAND definitions to ipq806x Jonathan McDowell
@ 2021-05-17  9:40   ` Vinod Koul
  2021-05-19 10:29     ` Jonathan McDowell
  0 siblings, 1 reply; 17+ messages in thread
From: Vinod Koul @ 2021-05-17  9:40 UTC (permalink / raw)
  To: Jonathan McDowell
  Cc: Andy Gross, Bjorn Andersson, Rob Herring, Ansuel Smith,
	linux-arm-msm, devicetree, linux-kernel

On 15-05-21, 17:52, Jonathan McDowell wrote:
> Now the ADM driver is in mainline add the appropriate definitions for it
> and the NAND controller to get NAND working on IPQ806x platforms,
> 
> Signed-off-by: Jonathan McDowell <noodles@earth.li>
> ---
>  arch/arm/boot/dts/qcom-ipq8064.dtsi | 67 +++++++++++++++++++++++++++++
>  1 file changed, 67 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/qcom-ipq8064.dtsi b/arch/arm/boot/dts/qcom-ipq8064.dtsi
> index 98995ead4413..aaab3820ab0b 100644
> --- a/arch/arm/boot/dts/qcom-ipq8064.dtsi
> +++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi
> @@ -185,6 +185,31 @@
>  					bias-pull-up;
>  				};
>  			};
> +
> +			nand_pins: nand_pins {
> +				mux {
> +					pins = "gpio34", "gpio35", "gpio36",
> +					       "gpio37", "gpio38", "gpio39",
> +					       "gpio40", "gpio41", "gpio42",
> +					       "gpio43", "gpio44", "gpio45",
> +					       "gpio46", "gpio47";
> +					function = "nand";
> +					drive-strength = <10>;
> +					bias-disable;
> +				};
> +
> +				pullups {
> +					pins = "gpio39";
> +					bias-pull-up;
> +				};
> +
> +				hold {
> +					pins = "gpio40", "gpio41", "gpio42",
> +					       "gpio43", "gpio44", "gpio45",
> +					       "gpio46", "gpio47";
> +					bias-bus-hold;
> +				};
> +			};
>  		};
>  
>  		intc: interrupt-controller@2000000 {
> @@ -226,6 +251,26 @@
>  			reg = <0x02098000 0x1000>, <0x02008000 0x1000>;
>  		};
>  
> +		adm_dma: dma@18300000 {

dma-controller@...

-- 
~Vinod

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 2/5] ARM: dts: qcom: Add tsens details to ipq806x
  2021-05-15 16:52 ` [PATCH 2/5] ARM: dts: qcom: Add tsens details " Jonathan McDowell
@ 2021-05-17  9:42   ` Vinod Koul
  2021-05-19 11:00     ` Jonathan McDowell
  0 siblings, 1 reply; 17+ messages in thread
From: Vinod Koul @ 2021-05-17  9:42 UTC (permalink / raw)
  To: Jonathan McDowell
  Cc: Andy Gross, Bjorn Andersson, Rob Herring, Ansuel Smith,
	linux-arm-msm, devicetree, linux-kernel

On 15-05-21, 17:52, Jonathan McDowell wrote:

>  		gcc: clock-controller@900000 {
> -			compatible = "qcom,gcc-ipq8064";
> +			compatible = "qcom,gcc-ipq8064", "syscon";

Does this belong here

>  			reg = <0x00900000 0x4000>;
>  			#clock-cells = <1>;
>  			#reset-cells = <1>;
> +			#power-domain-cells = <1>;
> +
> +			tsens: thermal-sensor@900000 {
> +				compatible = "qcom,ipq8064-tsens";
> +
> +				nvmem-cells = <&tsens_calib>, <&tsens_calib_backup>;
> +				nvmem-cell-names = "calib", "calib_backup";
> +				interrupts = <GIC_SPI 178 IRQ_TYPE_LEVEL_HIGH>;
> +				interrupt-names = "uplow";
> +
> +				#qcom,sensors = <11>;
> +				#thermal-sensor-cells = <1>;
> +			};

We have sensor under gcc node..?

-- 
~Vinod

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 1/5] ARM: dts: qcom: Add ADM DMA + NAND definitions to ipq806x
  2021-05-17  9:40   ` Vinod Koul
@ 2021-05-19 10:29     ` Jonathan McDowell
  0 siblings, 0 replies; 17+ messages in thread
From: Jonathan McDowell @ 2021-05-19 10:29 UTC (permalink / raw)
  To: Vinod Koul
  Cc: Andy Gross, Bjorn Andersson, Rob Herring, Ansuel Smith,
	linux-arm-msm, devicetree, linux-kernel

On Mon, May 17, 2021 at 03:10:43PM +0530, Vinod Koul wrote:
> On 15-05-21, 17:52, Jonathan McDowell wrote:
> > Now the ADM driver is in mainline add the appropriate definitions for it
> > and the NAND controller to get NAND working on IPQ806x platforms,
> > 
> > Signed-off-by: Jonathan McDowell <noodles@earth.li>
> > ---
> >  arch/arm/boot/dts/qcom-ipq8064.dtsi | 67 +++++++++++++++++++++++++++++
> >  1 file changed, 67 insertions(+)
> > 
> > diff --git a/arch/arm/boot/dts/qcom-ipq8064.dtsi b/arch/arm/boot/dts/qcom-ipq8064.dtsi
> > index 98995ead4413..aaab3820ab0b 100644
> > --- a/arch/arm/boot/dts/qcom-ipq8064.dtsi
> > +++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi
> > @@ -185,6 +185,31 @@
> >  					bias-pull-up;
> >  				};
> >  			};
> > +
> > +			nand_pins: nand_pins {
> > +				mux {
> > +					pins = "gpio34", "gpio35", "gpio36",
> > +					       "gpio37", "gpio38", "gpio39",
> > +					       "gpio40", "gpio41", "gpio42",
> > +					       "gpio43", "gpio44", "gpio45",
> > +					       "gpio46", "gpio47";
> > +					function = "nand";
> > +					drive-strength = <10>;
> > +					bias-disable;
> > +				};
> > +
> > +				pullups {
> > +					pins = "gpio39";
> > +					bias-pull-up;
> > +				};
> > +
> > +				hold {
> > +					pins = "gpio40", "gpio41", "gpio42",
> > +					       "gpio43", "gpio44", "gpio45",
> > +					       "gpio46", "gpio47";
> > +					bias-bus-hold;
> > +				};
> > +			};
> >  		};
> >  
> >  		intc: interrupt-controller@2000000 {
> > @@ -226,6 +251,26 @@
> >  			reg = <0x02098000 0x1000>, <0x02008000 0x1000>;
> >  		};
> >  
> > +		adm_dma: dma@18300000 {
> 
> dma-controller@...

Thanks, will fix for v2.

J.

-- 
"Remind me never to buy software from you." -- Geraint Jones, marking
an Operating Systems question.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 2/5] ARM: dts: qcom: Add tsens details to ipq806x
  2021-05-17  9:42   ` Vinod Koul
@ 2021-05-19 11:00     ` Jonathan McDowell
  0 siblings, 0 replies; 17+ messages in thread
From: Jonathan McDowell @ 2021-05-19 11:00 UTC (permalink / raw)
  To: Vinod Koul
  Cc: Andy Gross, Bjorn Andersson, Rob Herring, Ansuel Smith,
	linux-arm-msm, devicetree, linux-kernel

On Mon, May 17, 2021 at 03:12:02PM +0530, Vinod Koul wrote:
> On 15-05-21, 17:52, Jonathan McDowell wrote:
> 
> >  		gcc: clock-controller@900000 {
> > -			compatible = "qcom,gcc-ipq8064";
> > +			compatible = "qcom,gcc-ipq8064", "syscon";
> 
> Does this belong here

No, not sure how that slipped in, will remove for v2.

> >  			reg = <0x00900000 0x4000>;
> >  			#clock-cells = <1>;
> >  			#reset-cells = <1>;
> > +			#power-domain-cells = <1>;
> > +
> > +			tsens: thermal-sensor@900000 {
> > +				compatible = "qcom,ipq8064-tsens";
> > +
> > +				nvmem-cells = <&tsens_calib>, <&tsens_calib_backup>;
> > +				nvmem-cell-names = "calib", "calib_backup";
> > +				interrupts = <GIC_SPI 178 IRQ_TYPE_LEVEL_HIGH>;
> > +				interrupt-names = "uplow";
> > +
> > +				#qcom,sensors = <11>;
> > +				#thermal-sensor-cells = <1>;
> > +			};
> 
> We have sensor under gcc node..?

Weirdly, yes, that seems to be where it lives for the 8064.

J.

-- 
I'm dangerous when I know what I'm doing.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH v2 0/5] ARM: dts: qcom: Enable various devices for IPQ806x / RB3011
  2021-05-15 16:52 [PATCH 0/5] ARM: dts: qcom: Enable various devices for IPQ806x / RB3011 Jonathan McDowell
                   ` (4 preceding siblings ...)
  2021-05-15 16:53 ` [PATCH 5/5] ARM: dts: qcom: Enable NAND + USB for RB3011 Jonathan McDowell
@ 2021-05-20 17:29 ` Jonathan McDowell
  2021-05-20 17:29   ` [PATCH v2 1/5] ARM: dts: qcom: Add ADM DMA + NAND definitions to ipq806x Jonathan McDowell
                     ` (4 more replies)
  5 siblings, 5 replies; 17+ messages in thread
From: Jonathan McDowell @ 2021-05-20 17:29 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Rob Herring, Ansuel Smith,
	Vinod Koul, linux-arm-msm, devicetree, linux-kernel

This series adds various devices (NAND, USB, tsens, L2CC, RPM) which
have either recently gained mainline drivers, or just failed to be
previously added, to the DTS for the IPQ806x platform. It then enables
them for the MikroTik RB3011 platform, where they have all been tested.

I've done the additions to the main IPQ806x DTS as separate commits for
each logical set, and then a single wholesale set of changes for the
RB3011 to turn everything on. Happy to squash to 1/2 commits or split
out further if desired.

v2:
  Fix ADM label to "dma-controller"
  Drop spurious "syscon" on GCC for tsens changes

Jonathan McDowell (5):
  ARM: dts: qcom: Add ADM DMA + NAND definitions to ipq806x
  ARM: dts: qcom: Add tsens details to ipq806x
  ARM: dts: qcom: Add USB port definitions to ipq806x
  ARM: dts: qcom: add L2CC and RPM for IPQ8064
  ARM: dts: qcom: Enable NAND + USB for RB3011

 arch/arm/boot/dts/qcom-ipq8064-rb3011.dts |  58 +++
 arch/arm/boot/dts/qcom-ipq8064.dtsi       | 425 ++++++++++++++++++++++
 2 files changed, 483 insertions(+)

-- 
2.20.1


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH v2 1/5] ARM: dts: qcom: Add ADM DMA + NAND definitions to ipq806x
  2021-05-20 17:29 ` [PATCH v2 0/5] ARM: dts: qcom: Enable various devices for IPQ806x / RB3011 Jonathan McDowell
@ 2021-05-20 17:29   ` Jonathan McDowell
  2021-05-20 17:29   ` [PATCH v2 2/5] ARM: dts: qcom: Add tsens details " Jonathan McDowell
                     ` (3 subsequent siblings)
  4 siblings, 0 replies; 17+ messages in thread
From: Jonathan McDowell @ 2021-05-20 17:29 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Rob Herring, Ansuel Smith,
	Vinod Koul, linux-arm-msm, devicetree, linux-kernel

Now the ADM driver is in mainline add the appropriate definitions for it
and the NAND controller to get NAND working on IPQ806x platforms,

Signed-off-by: Jonathan McDowell <noodles@earth.li>
---
 arch/arm/boot/dts/qcom-ipq8064.dtsi | 67 +++++++++++++++++++++++++++++
 1 file changed, 67 insertions(+)

diff --git a/arch/arm/boot/dts/qcom-ipq8064.dtsi b/arch/arm/boot/dts/qcom-ipq8064.dtsi
index 98995ead4413..3f666021ff23 100644
--- a/arch/arm/boot/dts/qcom-ipq8064.dtsi
+++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi
@@ -185,6 +185,31 @@
 					bias-pull-up;
 				};
 			};
+
+			nand_pins: nand_pins {
+				mux {
+					pins = "gpio34", "gpio35", "gpio36",
+					       "gpio37", "gpio38", "gpio39",
+					       "gpio40", "gpio41", "gpio42",
+					       "gpio43", "gpio44", "gpio45",
+					       "gpio46", "gpio47";
+					function = "nand";
+					drive-strength = <10>;
+					bias-disable;
+				};
+
+				pullups {
+					pins = "gpio39";
+					bias-pull-up;
+				};
+
+				hold {
+					pins = "gpio40", "gpio41", "gpio42",
+					       "gpio43", "gpio44", "gpio45",
+					       "gpio46", "gpio47";
+					bias-bus-hold;
+				};
+			};
 		};
 
 		intc: interrupt-controller@2000000 {
@@ -226,6 +251,26 @@
 			reg = <0x02098000 0x1000>, <0x02008000 0x1000>;
 		};
 
+		adm_dma: dma-controller@18300000 {
+			compatible = "qcom,adm";
+			reg = <0x18300000 0x100000>;
+			interrupts = <GIC_SPI 170 IRQ_TYPE_LEVEL_HIGH>;
+			#dma-cells = <1>;
+
+			clocks = <&gcc ADM0_CLK>, <&gcc ADM0_PBUS_CLK>;
+			clock-names = "core", "iface";
+
+			resets = <&gcc ADM0_RESET>,
+				 <&gcc ADM0_PBUS_RESET>,
+				 <&gcc ADM0_C0_RESET>,
+				 <&gcc ADM0_C1_RESET>,
+				 <&gcc ADM0_C2_RESET>;
+			reset-names = "clk", "pbus", "c0", "c1", "c2";
+			qcom,ee = <0>;
+
+			status = "disabled";
+		};
+
 		saw0: regulator@2089000 {
 			compatible = "qcom,saw2";
 			reg = <0x02089000 0x1000>, <0x02009000 0x1000>;
@@ -403,6 +448,28 @@
 			status = "disabled";
 		};
 
+		nand: nand-controller@1ac00000 {
+			compatible = "qcom,ipq806x-nand";
+			reg = <0x1ac00000 0x800>;
+
+			pinctrl-0 = <&nand_pins>;
+			pinctrl-names = "default";
+
+			clocks = <&gcc EBI2_CLK>,
+				 <&gcc EBI2_AON_CLK>;
+			clock-names = "core", "aon";
+
+			dmas = <&adm_dma 3>;
+			dma-names = "rxtx";
+			qcom,cmd-crci = <15>;
+			qcom,data-crci = <3>;
+
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			status = "disabled";
+		};
+
 		sata: sata@29000000 {
 			compatible = "qcom,ipq806x-ahci", "generic-ahci";
 			reg = <0x29000000 0x180>;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH v2 2/5] ARM: dts: qcom: Add tsens details to ipq806x
  2021-05-20 17:29 ` [PATCH v2 0/5] ARM: dts: qcom: Enable various devices for IPQ806x / RB3011 Jonathan McDowell
  2021-05-20 17:29   ` [PATCH v2 1/5] ARM: dts: qcom: Add ADM DMA + NAND definitions to ipq806x Jonathan McDowell
@ 2021-05-20 17:29   ` Jonathan McDowell
  2021-05-20 17:30   ` [PATCH v2 3/5] ARM: dts: qcom: Add USB port definitions " Jonathan McDowell
                     ` (2 subsequent siblings)
  4 siblings, 0 replies; 17+ messages in thread
From: Jonathan McDowell @ 2021-05-20 17:29 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Rob Herring, Ansuel Smith,
	Vinod Koul, linux-arm-msm, devicetree, linux-kernel

Signed-off-by: Jonathan McDowell <noodles@earth.li>
---
 arch/arm/boot/dts/qcom-ipq8064.dtsi | 241 ++++++++++++++++++++++++++++
 1 file changed, 241 insertions(+)

diff --git a/arch/arm/boot/dts/qcom-ipq8064.dtsi b/arch/arm/boot/dts/qcom-ipq8064.dtsi
index 3f666021ff23..9628092217cb 100644
--- a/arch/arm/boot/dts/qcom-ipq8064.dtsi
+++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi
@@ -46,6 +46,228 @@
 		};
 	};
 
+	thermal-zones {
+		tsens_tz_sensor0 {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+			thermal-sensors = <&tsens 0>;
+
+			trips {
+				cpu-critical {
+					temperature = <105000>;
+					hysteresis = <2000>;
+					type = "critical";
+				};
+
+				cpu-hot {
+					temperature = <95000>;
+					hysteresis = <2000>;
+					type = "hot";
+				};
+			};
+		};
+
+		tsens_tz_sensor1 {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+			thermal-sensors = <&tsens 1>;
+
+			trips {
+				cpu-critical {
+					temperature = <105000>;
+					hysteresis = <2000>;
+					type = "critical";
+				};
+
+				cpu-hot {
+					temperature = <95000>;
+					hysteresis = <2000>;
+					type = "hot";
+				};
+			};
+		};
+
+		tsens_tz_sensor2 {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+			thermal-sensors = <&tsens 2>;
+
+			trips {
+				cpu-critical {
+					temperature = <105000>;
+					hysteresis = <2000>;
+					type = "critical";
+				};
+
+				cpu-hot {
+					temperature = <95000>;
+					hysteresis = <2000>;
+					type = "hot";
+				};
+			};
+		};
+
+		tsens_tz_sensor3 {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+			thermal-sensors = <&tsens 3>;
+
+			trips {
+				cpu-critical {
+					temperature = <105000>;
+					hysteresis = <2000>;
+					type = "critical";
+				};
+
+				cpu-hot {
+					temperature = <95000>;
+					hysteresis = <2000>;
+					type = "hot";
+				};
+			};
+		};
+
+		tsens_tz_sensor4 {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+			thermal-sensors = <&tsens 4>;
+
+			trips {
+				cpu-critical {
+					temperature = <105000>;
+					hysteresis = <2000>;
+					type = "critical";
+				};
+
+				cpu-hot {
+					temperature = <95000>;
+					hysteresis = <2000>;
+					type = "hot";
+				};
+			};
+		};
+
+		tsens_tz_sensor5 {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+			thermal-sensors = <&tsens 5>;
+
+			trips {
+				cpu-critical {
+					temperature = <105000>;
+					hysteresis = <2000>;
+					type = "critical";
+				};
+
+				cpu-hot {
+					temperature = <95000>;
+					hysteresis = <2000>;
+					type = "hot";
+				};
+			};
+		};
+
+		tsens_tz_sensor6 {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+			thermal-sensors = <&tsens 6>;
+
+			trips {
+				cpu-critical {
+					temperature = <105000>;
+					hysteresis = <2000>;
+					type = "critical";
+				};
+
+				cpu-hot {
+					temperature = <95000>;
+					hysteresis = <2000>;
+					type = "hot";
+				};
+			};
+		};
+
+		tsens_tz_sensor7 {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+			thermal-sensors = <&tsens 7>;
+
+			trips {
+				cpu-critical {
+					temperature = <105000>;
+					hysteresis = <2000>;
+					type = "critical";
+				};
+
+				cpu-hot {
+					temperature = <95000>;
+					hysteresis = <2000>;
+					type = "hot";
+				};
+			};
+		};
+
+		tsens_tz_sensor8 {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+			thermal-sensors = <&tsens 8>;
+
+			trips {
+				cpu-critical {
+					temperature = <105000>;
+					hysteresis = <2000>;
+					type = "critical";
+				};
+
+				cpu-hot {
+					temperature = <95000>;
+					hysteresis = <2000>;
+					type = "hot";
+				};
+			};
+		};
+
+		tsens_tz_sensor9 {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+			thermal-sensors = <&tsens 9>;
+
+			trips {
+				cpu-critical {
+					temperature = <105000>;
+					hysteresis = <2000>;
+					type = "critical";
+				};
+
+				cpu-hot {
+					temperature = <95000>;
+					hysteresis = <2000>;
+					type = "hot";
+				};
+			};
+		};
+
+		tsens_tz_sensor10 {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+			thermal-sensors = <&tsens 10>;
+
+			trips {
+				cpu-critical {
+					temperature = <105000>;
+					hysteresis = <2000>;
+					type = "critical";
+				};
+
+				cpu-hot {
+					temperature = <95000>;
+					hysteresis = <2000>;
+					type = "hot";
+				};
+			};
+		};
+	};
+
 	memory {
 		device_type = "memory";
 		reg = <0x0 0x0>;
@@ -503,6 +725,12 @@
 			reg = <0x00700000 0x1000>;
 			#address-cells = <1>;
 			#size-cells = <1>;
+			tsens_calib: calib@400 {
+				reg = <0x400 0xb>;
+			};
+			tsens_calib_backup: calib_backup@410 {
+				reg = <0x410 0xb>;
+			};
 		};
 
 		gcc: clock-controller@900000 {
@@ -510,6 +738,19 @@
 			reg = <0x00900000 0x4000>;
 			#clock-cells = <1>;
 			#reset-cells = <1>;
+			#power-domain-cells = <1>;
+
+			tsens: thermal-sensor@900000 {
+				compatible = "qcom,ipq8064-tsens";
+
+				nvmem-cells = <&tsens_calib>, <&tsens_calib_backup>;
+				nvmem-cell-names = "calib", "calib_backup";
+				interrupts = <GIC_SPI 178 IRQ_TYPE_LEVEL_HIGH>;
+				interrupt-names = "uplow";
+
+				#qcom,sensors = <11>;
+				#thermal-sensor-cells = <1>;
+			};
 		};
 
 		tcsr: syscon@1a400000 {
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH v2 3/5] ARM: dts: qcom: Add USB port definitions to ipq806x
  2021-05-20 17:29 ` [PATCH v2 0/5] ARM: dts: qcom: Enable various devices for IPQ806x / RB3011 Jonathan McDowell
  2021-05-20 17:29   ` [PATCH v2 1/5] ARM: dts: qcom: Add ADM DMA + NAND definitions to ipq806x Jonathan McDowell
  2021-05-20 17:29   ` [PATCH v2 2/5] ARM: dts: qcom: Add tsens details " Jonathan McDowell
@ 2021-05-20 17:30   ` Jonathan McDowell
  2021-05-31 15:58     ` Bjorn Andersson
  2021-05-20 17:30   ` [PATCH v2 4/5] ARM: dts: qcom: add L2CC and RPM for IPQ8064 Jonathan McDowell
  2021-05-20 17:30   ` [PATCH v2 5/5] ARM: dts: qcom: Enable NAND + USB for RB3011 Jonathan McDowell
  4 siblings, 1 reply; 17+ messages in thread
From: Jonathan McDowell @ 2021-05-20 17:30 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Rob Herring, Ansuel Smith,
	Vinod Koul, linux-arm-msm, devicetree, linux-kernel

Signed-off-by: Jonathan McDowell <noodles@earth.li>
---
 arch/arm/boot/dts/qcom-ipq8064.dtsi | 88 +++++++++++++++++++++++++++++
 1 file changed, 88 insertions(+)

diff --git a/arch/arm/boot/dts/qcom-ipq8064.dtsi b/arch/arm/boot/dts/qcom-ipq8064.dtsi
index 9628092217cb..c66859abdfd5 100644
--- a/arch/arm/boot/dts/qcom-ipq8064.dtsi
+++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi
@@ -1026,6 +1026,94 @@
 			status = "disabled";
 		};
 
+		hs_phy_0: hs_phy_0 {
+			compatible = "qcom,ipq806x-usb-phy-hs";
+			reg = <0x100f8800 0x30>;
+			clocks = <&gcc USB30_0_UTMI_CLK>;
+			clock-names = "ref";
+			#phy-cells = <0>;
+
+			status = "disabled";
+		};
+
+		ss_phy_0: ss_phy_0 {
+			compatible = "qcom,ipq806x-usb-phy-ss";
+			reg = <0x100f8830 0x30>;
+			clocks = <&gcc USB30_0_MASTER_CLK>;
+			clock-names = "ref";
+			#phy-cells = <0>;
+
+			status = "disabled";
+		};
+
+		usb3_0: usb3@100f8800 {
+			compatible = "qcom,dwc3", "syscon";
+			#address-cells = <1>;
+			#size-cells = <1>;
+			reg = <0x100f8800 0x8000>;
+			clocks = <&gcc USB30_0_MASTER_CLK>;
+			clock-names = "core";
+
+			ranges;
+
+			resets = <&gcc USB30_0_MASTER_RESET>;
+			reset-names = "master";
+
+			status = "disabled";
+
+			dwc3_0: dwc3@10000000 {
+				compatible = "snps,dwc3";
+				reg = <0x10000000 0xcd00>;
+				interrupts = <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>;
+				phys = <&hs_phy_0>, <&ss_phy_0>;
+				phy-names = "usb2-phy", "usb3-phy";
+				dr_mode = "host";
+				snps,dis_u3_susphy_quirk;
+			};
+		};
+
+		hs_phy_1: hs_phy_1 {
+			compatible = "qcom,ipq806x-usb-phy-hs";
+			reg = <0x110f8800 0x30>;
+			clocks = <&gcc USB30_1_UTMI_CLK>;
+			clock-names = "ref";
+			#phy-cells = <0>;
+		};
+
+		ss_phy_1: ss_phy_1 {
+			compatible = "qcom,ipq806x-usb-phy-ss";
+			reg = <0x110f8830 0x30>;
+			clocks = <&gcc USB30_1_MASTER_CLK>;
+			clock-names = "ref";
+			#phy-cells = <0>;
+		};
+
+		usb3_1: usb3@110f8800 {
+			compatible = "qcom,dwc3", "syscon";
+			#address-cells = <1>;
+			#size-cells = <1>;
+			reg = <0x110f8800 0x8000>;
+			clocks = <&gcc USB30_1_MASTER_CLK>;
+			clock-names = "core";
+
+			ranges;
+
+			resets = <&gcc USB30_1_MASTER_RESET>;
+			reset-names = "master";
+
+			status = "disabled";
+
+			dwc3_1: dwc3@11000000 {
+				compatible = "snps,dwc3";
+				reg = <0x11000000 0xcd00>;
+				interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;
+				phys = <&hs_phy_1>, <&ss_phy_1>;
+				phy-names = "usb2-phy", "usb3-phy";
+				dr_mode = "host";
+				snps,dis_u3_susphy_quirk;
+			};
+		};
+
 		vsdcc_fixed: vsdcc-regulator {
 			compatible = "regulator-fixed";
 			regulator-name = "SDCC Power";
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH v2 4/5] ARM: dts: qcom: add L2CC and RPM for IPQ8064
  2021-05-20 17:29 ` [PATCH v2 0/5] ARM: dts: qcom: Enable various devices for IPQ806x / RB3011 Jonathan McDowell
                     ` (2 preceding siblings ...)
  2021-05-20 17:30   ` [PATCH v2 3/5] ARM: dts: qcom: Add USB port definitions " Jonathan McDowell
@ 2021-05-20 17:30   ` Jonathan McDowell
  2021-05-20 17:30   ` [PATCH v2 5/5] ARM: dts: qcom: Enable NAND + USB for RB3011 Jonathan McDowell
  4 siblings, 0 replies; 17+ messages in thread
From: Jonathan McDowell @ 2021-05-20 17:30 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Rob Herring, Ansuel Smith,
	Vinod Koul, linux-arm-msm, devicetree, linux-kernel

This adds the L2CC IPC resource and RPM devices to the IPQ8064 device
tree.

Tested on a Mikrotik RB3011.

Signed-off-by: Jonathan McDowell <noodles@earth.li>
---
 arch/arm/boot/dts/qcom-ipq8064.dtsi | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/arch/arm/boot/dts/qcom-ipq8064.dtsi b/arch/arm/boot/dts/qcom-ipq8064.dtsi
index c66859abdfd5..1851a95f8663 100644
--- a/arch/arm/boot/dts/qcom-ipq8064.dtsi
+++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi
@@ -2,6 +2,8 @@
 /dts-v1/;
 
 #include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/mfd/qcom-rpm.h>
+#include <dt-bindings/clock/qcom,rpmcc.h>
 #include <dt-bindings/clock/qcom,gcc-ipq806x.h>
 #include <dt-bindings/clock/qcom,lcc-ipq806x.h>
 #include <dt-bindings/gpio/gpio.h>
@@ -753,11 +755,38 @@
 			};
 		};
 
+		rpm: rpm@108000 {
+			compatible = "qcom,rpm-ipq8064";
+			reg = <0x108000 0x1000>;
+			qcom,ipc = <&l2cc 0x8 2>;
+
+			interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "ack", "err", "wakeup";
+
+			clocks = <&gcc RPM_MSG_RAM_H_CLK>;
+			clock-names = "ram";
+
+			rpmcc: clock-controller {
+				compatible = "qcom,rpmcc-ipq806x", "qcom,rpmcc";
+				#clock-cells = <1>;
+			};
+		};
+
 		tcsr: syscon@1a400000 {
 			compatible = "qcom,tcsr-ipq8064", "syscon";
 			reg = <0x1a400000 0x100>;
 		};
 
+		l2cc: clock-controller@2011000 {
+			compatible = "qcom,kpss-gcc", "syscon";
+			reg = <0x2011000 0x1000>;
+			clocks = <&gcc PLL8_VOTE>, <&gcc PXO_SRC>;
+			clock-names = "pll8_vote", "pxo";
+			clock-output-names = "acpu_l2_aux";
+		};
+
 		lcc: clock-controller@28000000 {
 			compatible = "qcom,lcc-ipq8064";
 			reg = <0x28000000 0x1000>;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH v2 5/5] ARM: dts: qcom: Enable NAND + USB for RB3011
  2021-05-20 17:29 ` [PATCH v2 0/5] ARM: dts: qcom: Enable various devices for IPQ806x / RB3011 Jonathan McDowell
                     ` (3 preceding siblings ...)
  2021-05-20 17:30   ` [PATCH v2 4/5] ARM: dts: qcom: add L2CC and RPM for IPQ8064 Jonathan McDowell
@ 2021-05-20 17:30   ` Jonathan McDowell
  4 siblings, 0 replies; 17+ messages in thread
From: Jonathan McDowell @ 2021-05-20 17:30 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Rob Herring, Ansuel Smith,
	Vinod Koul, linux-arm-msm, devicetree, linux-kernel

Enable the NAND + USB devices for the MikroTik RB3011 platform now
they're in the main IPQ806x DT.

Signed-off-by: Jonathan McDowell <noodles@earth.li>
---
 arch/arm/boot/dts/qcom-ipq8064-rb3011.dts | 58 +++++++++++++++++++++++
 1 file changed, 58 insertions(+)

diff --git a/arch/arm/boot/dts/qcom-ipq8064-rb3011.dts b/arch/arm/boot/dts/qcom-ipq8064-rb3011.dts
index 282b89ce3d45..f7ea2e5dd191 100644
--- a/arch/arm/boot/dts/qcom-ipq8064-rb3011.dts
+++ b/arch/arm/boot/dts/qcom-ipq8064-rb3011.dts
@@ -216,6 +216,10 @@
 	};
 };
 
+&adm_dma {
+	status = "okay";
+};
+
 &gmac0 {
 	status = "okay";
 
@@ -251,6 +255,39 @@
 	status = "okay";
 };
 
+&hs_phy_1 {
+	status = "okay";
+};
+
+&nand {
+	status = "okay";
+
+	nandcs@0 {
+		compatible = "qcom,nandcs";
+		reg = <0>;
+
+		nand-ecc-strength = <4>;
+		nand-bus-width = <8>;
+		nand-ecc-step-size = <512>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			boot@0 {
+				label = "RouterBoard NAND 1 Boot";
+				reg = <0x0000000 0x0800000>;
+			};
+
+			main@800000 {
+				label = "RouterBoard NAND 1 Main";
+				reg = <0x0800000 0x7800000>;
+			};
+		};
+	};
+};
+
 &qcom_pinmux {
 	buttons_pins: buttons_pins {
 		mux {
@@ -305,4 +342,25 @@
 			input-disable;
 		};
 	};
+
+	usb1_pwr_en_pins: usb1_pwr_en_pins {
+		mux {
+			pins = "gpio4";
+			function = "gpio";
+			drive-strength = <16>;
+			bias-disable;
+			output-high;
+		};
+	};
+};
+
+&ss_phy_1 {
+	status = "okay";
+};
+
+&usb3_1 {
+	pinctrl-0 = <&usb1_pwr_en_pins>;
+	pinctrl-names = "default";
+
+	status = "okay";
 };
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [PATCH v2 3/5] ARM: dts: qcom: Add USB port definitions to ipq806x
  2021-05-20 17:30   ` [PATCH v2 3/5] ARM: dts: qcom: Add USB port definitions " Jonathan McDowell
@ 2021-05-31 15:58     ` Bjorn Andersson
  0 siblings, 0 replies; 17+ messages in thread
From: Bjorn Andersson @ 2021-05-31 15:58 UTC (permalink / raw)
  To: Jonathan McDowell
  Cc: Andy Gross, Rob Herring, Ansuel Smith, Vinod Koul, linux-arm-msm,
	devicetree, linux-kernel

On Thu 20 May 12:30 CDT 2021, Jonathan McDowell wrote:

> Signed-off-by: Jonathan McDowell <noodles@earth.li>
> ---
>  arch/arm/boot/dts/qcom-ipq8064.dtsi | 88 +++++++++++++++++++++++++++++
>  1 file changed, 88 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/qcom-ipq8064.dtsi b/arch/arm/boot/dts/qcom-ipq8064.dtsi
> index 9628092217cb..c66859abdfd5 100644
> --- a/arch/arm/boot/dts/qcom-ipq8064.dtsi
> +++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi
> @@ -1026,6 +1026,94 @@
>  			status = "disabled";
>  		};
>  
> +		hs_phy_0: hs_phy_0 {

The node name should be some generic-thing@unit-address, so I fixed up
all your phys as "phy@100f8800" while applying your patches.

Thank you,
Bjorn

> +			compatible = "qcom,ipq806x-usb-phy-hs";
> +			reg = <0x100f8800 0x30>;
> +			clocks = <&gcc USB30_0_UTMI_CLK>;
> +			clock-names = "ref";
> +			#phy-cells = <0>;
> +
> +			status = "disabled";
> +		};
> +
> +		ss_phy_0: ss_phy_0 {
> +			compatible = "qcom,ipq806x-usb-phy-ss";
> +			reg = <0x100f8830 0x30>;
> +			clocks = <&gcc USB30_0_MASTER_CLK>;
> +			clock-names = "ref";
> +			#phy-cells = <0>;
> +
> +			status = "disabled";
> +		};
> +
> +		usb3_0: usb3@100f8800 {
> +			compatible = "qcom,dwc3", "syscon";
> +			#address-cells = <1>;
> +			#size-cells = <1>;
> +			reg = <0x100f8800 0x8000>;
> +			clocks = <&gcc USB30_0_MASTER_CLK>;
> +			clock-names = "core";
> +
> +			ranges;
> +
> +			resets = <&gcc USB30_0_MASTER_RESET>;
> +			reset-names = "master";
> +
> +			status = "disabled";
> +
> +			dwc3_0: dwc3@10000000 {
> +				compatible = "snps,dwc3";
> +				reg = <0x10000000 0xcd00>;
> +				interrupts = <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>;
> +				phys = <&hs_phy_0>, <&ss_phy_0>;
> +				phy-names = "usb2-phy", "usb3-phy";
> +				dr_mode = "host";
> +				snps,dis_u3_susphy_quirk;
> +			};
> +		};
> +
> +		hs_phy_1: hs_phy_1 {
> +			compatible = "qcom,ipq806x-usb-phy-hs";
> +			reg = <0x110f8800 0x30>;
> +			clocks = <&gcc USB30_1_UTMI_CLK>;
> +			clock-names = "ref";
> +			#phy-cells = <0>;
> +		};
> +
> +		ss_phy_1: ss_phy_1 {
> +			compatible = "qcom,ipq806x-usb-phy-ss";
> +			reg = <0x110f8830 0x30>;
> +			clocks = <&gcc USB30_1_MASTER_CLK>;
> +			clock-names = "ref";
> +			#phy-cells = <0>;
> +		};
> +
> +		usb3_1: usb3@110f8800 {
> +			compatible = "qcom,dwc3", "syscon";
> +			#address-cells = <1>;
> +			#size-cells = <1>;
> +			reg = <0x110f8800 0x8000>;
> +			clocks = <&gcc USB30_1_MASTER_CLK>;
> +			clock-names = "core";
> +
> +			ranges;
> +
> +			resets = <&gcc USB30_1_MASTER_RESET>;
> +			reset-names = "master";
> +
> +			status = "disabled";
> +
> +			dwc3_1: dwc3@11000000 {
> +				compatible = "snps,dwc3";
> +				reg = <0x11000000 0xcd00>;
> +				interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;
> +				phys = <&hs_phy_1>, <&ss_phy_1>;
> +				phy-names = "usb2-phy", "usb3-phy";
> +				dr_mode = "host";
> +				snps,dis_u3_susphy_quirk;
> +			};
> +		};
> +
>  		vsdcc_fixed: vsdcc-regulator {
>  			compatible = "regulator-fixed";
>  			regulator-name = "SDCC Power";
> -- 
> 2.20.1
> 

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2021-05-31 17:24 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-15 16:52 [PATCH 0/5] ARM: dts: qcom: Enable various devices for IPQ806x / RB3011 Jonathan McDowell
2021-05-15 16:52 ` [PATCH 1/5] ARM: dts: qcom: Add ADM DMA + NAND definitions to ipq806x Jonathan McDowell
2021-05-17  9:40   ` Vinod Koul
2021-05-19 10:29     ` Jonathan McDowell
2021-05-15 16:52 ` [PATCH 2/5] ARM: dts: qcom: Add tsens details " Jonathan McDowell
2021-05-17  9:42   ` Vinod Koul
2021-05-19 11:00     ` Jonathan McDowell
2021-05-15 16:52 ` [PATCH 3/5] ARM: dts: qcom: Add USB port definitions " Jonathan McDowell
2021-05-15 16:53 ` [PATCH 4/5] ARM: dts: qcom: add L2CC and RPM for IPQ8064 Jonathan McDowell
2021-05-15 16:53 ` [PATCH 5/5] ARM: dts: qcom: Enable NAND + USB for RB3011 Jonathan McDowell
2021-05-20 17:29 ` [PATCH v2 0/5] ARM: dts: qcom: Enable various devices for IPQ806x / RB3011 Jonathan McDowell
2021-05-20 17:29   ` [PATCH v2 1/5] ARM: dts: qcom: Add ADM DMA + NAND definitions to ipq806x Jonathan McDowell
2021-05-20 17:29   ` [PATCH v2 2/5] ARM: dts: qcom: Add tsens details " Jonathan McDowell
2021-05-20 17:30   ` [PATCH v2 3/5] ARM: dts: qcom: Add USB port definitions " Jonathan McDowell
2021-05-31 15:58     ` Bjorn Andersson
2021-05-20 17:30   ` [PATCH v2 4/5] ARM: dts: qcom: add L2CC and RPM for IPQ8064 Jonathan McDowell
2021-05-20 17:30   ` [PATCH v2 5/5] ARM: dts: qcom: Enable NAND + USB for RB3011 Jonathan McDowell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).