Skip to contentSkip to conversation

arm64: dts: qcom: sm8150: Add SM8150 DTS

PATCH Superseded Vinod Koul 4 participants 57 messages Aug 14, 2019 – Aug 20, 2019

Subsystems (3)

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

Vinod Koul

author
#0 lore raw

cover arm64: dts: qcom: sm8150: Add SM8150 DTS

This series adds DTS for SM8150, PMIC PM8150, PM8150B, PM8150L and the MTP for SM815.

Only dependency for this series is the clk gcc dt binding [1] which is already in Clock tree upstream, so merging that is required.

The patches are incremental based on features as they were developed. We can merge them into bigger commits but I feel keeping them as individual units helps.

[1]: https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git/commit/?h=clk-qcom&id=e5ee331ebcf33827d1bd64e984c565b23cf53227

Sibi Sankar (3):
arm64: dts: qcom: sm8150: Add pmu node to SM8150 SoC
arm64: dts: qcom: sm8150: Add SMEM nodes
arm64: dts: qcom: sm8150: Add APSS shared mailbox

Vinod Koul (19):
arm64: dts: qcom: sm8150: add base dts file
arm64: dts: qcom: sm8150-mtp: add base dts file
arm64: dts: qcom: sm8150: add tlmm node
arm64: dts: qcom: sm8150-mtp: add tlmm reserved range
arm64: dts: qcom: sm8150: Add spmi node
arm64: dts: qcom: pm8150: Add Base DTS file
arm64: dts: qcom: pm8150: Add pon and rtc nodes
arm64: dts: qcom: pm8150: Add vadc node
arm64: dts: qcom: pm8150b: Add Base DTS file
arm64: dts: qcom: pm8150b: Add pon and adc nodes
arm64: dts: qcom: pm8150b: Add gpio node
arm64: dts: qcom: pm8150l: Add Base DTS file
arm64: dts: qcom: pm8150l: Add pon and adc nodes
arm64: dts: qcom: pm8150l: Add gpio node
arm64: dts: qcom: sm8150-mtp: Include pmics
arm64: dts: qcom: sm8150-mtp: Add resin node
arm64: dts: qcom: sm8150: Add apss_shared and apps_rsc nodes
arm64: dts: qcom: sm8150: Add reserved-memory regions
arm64: dts: qcom: sm8150-mtp: Add regulators

 arch/arm64/boot/dts/qcom/Makefile       |   1 +
 arch/arm64/boot/dts/qcom/pm8150.dtsi    |  89 +++++
 arch/arm64/boot/dts/qcom/pm8150b.dtsi   |  95 +++++
 arch/arm64/boot/dts/qcom/pm8150l.dtsi   |  74 ++++
 arch/arm64/boot/dts/qcom/sm8150-mtp.dts | 371 ++++++++++++++++++
 arch/arm64/boot/dts/qcom/sm8150.dtsi    | 476 ++++++++++++++++++++++++
 6 files changed, 1106 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/pm8150.dtsi
 create mode 100644 arch/arm64/boot/dts/qcom/pm8150b.dtsi
 create mode 100644 arch/arm64/boot/dts/qcom/pm8150l.dtsi
 create mode 100644 arch/arm64/boot/dts/qcom/sm8150-mtp.dts
 create mode 100644 arch/arm64/boot/dts/qcom/sm8150.dtsi
Signature · 1 line
2.20.1
author
#1 lore raw

PATCH 1/22 arm64: dts: qcom: sm8150: add base dts file

This add base DTS file with cpu, psci, firmware and clock node to enable boot to console

---
 arch/arm64/boot/dts/qcom/sm8150.dtsi | 269 +++++++++++++++++++++++++++
 1 file changed, 269 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/sm8150.dtsi
arch/arm64/boot/dts/qcom/sm8150.dtsi new file +269 -0
new file mode 100644
index 000000000000..cd9fcadaeacb
@@ -0,0 +1,269 @@
+// SPDX-License-Identifier: BSD-3-Clause
+// Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
+// Copyright (c) 2019, Linaro Limited
+
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/clock/qcom,gcc-sm8150.h>
+
+/ {
+	interrupt-parent = <&intc>;
+
+	#address-cells = <2>;
+	#size-cells = <2>;
+
+	chosen { };
+
+	clocks {
+		xo_board: xo-board {
+			compatible = "fixed-clock";
+			#clock-cells = <0>;
+			clock-frequency = <19200000>;
+			clock-output-names = "xo_board";
+		};
+
+		sleep_clk: sleep-clk {
+			compatible = "fixed-clock";
+			#clock-cells = <0>;
+			clock-frequency = <32764>;
+			clock-output-names = "sleep_clk";
+		};
+	};
+
+	cpus {
+		#address-cells = <2>;
+		#size-cells = <0>;
+
+		CPU0: cpu@0 {
+			device_type = "cpu";
+			compatible = "qcom,kryo485";
+			reg = <0x0 0x0>;
+			enable-method = "psci";
+			next-level-cache = <&L2_0>;
+			L2_0: l2-cache {
+				compatible = "cache";
+				next-level-cache = <&L3_0>;
+				L3_0: l3-cache {
+				      compatible = "cache";
+				};
+			};
+		};
+
+		CPU1: cpu@100 {
+			device_type = "cpu";
+			compatible = "qcom,kryo485";
+			reg = <0x0 0x100>;
+			enable-method = "psci";
+			next-level-cache = <&L2_100>;
+			L2_100: l2-cache {
+				compatible = "cache";
+				next-level-cache = <&L3_0>;
+			};
+
+		};
+
+		CPU2: cpu@200 {
+			device_type = "cpu";
+			compatible = "qcom,kryo485";
+			reg = <0x0 0x200>;
+			enable-method = "psci";
+			next-level-cache = <&L2_200>;
+			L2_200: l2-cache {
+				compatible = "cache";
+				next-level-cache = <&L3_0>;
+			};
+		};
+
+		CPU3: cpu@300 {
+			device_type = "cpu";
+			compatible = "qcom,kryo485";
+			reg = <0x0 0x300>;
+			enable-method = "psci";
+			next-level-cache = <&L2_300>;
+			L2_300: l2-cache {
+				compatible = "cache";
+				next-level-cache = <&L3_0>;
+			};
+		};
+
+		CPU4: cpu@400 {
+			device_type = "cpu";
+			compatible = "qcom,kryo485";
+			reg = <0x0 0x400>;
+			enable-method = "psci";
+			next-level-cache = <&L2_400>;
+			L2_400: l2-cache {
+				compatible = "cache";
+				next-level-cache = <&L3_0>;
+			};
+		};
+
+		CPU5: cpu@500 {
+			device_type = "cpu";
+			compatible = "qcom,kryo485";
+			reg = <0x0 0x500>;
+			enable-method = "psci";
+			next-level-cache = <&L2_500>;
+			L2_500: l2-cache {
+				compatible = "cache";
+				next-level-cache = <&L3_0>;
+			};
+		};
+
+		CPU6: cpu@600 {
+			device_type = "cpu";
+			compatible = "qcom,kryo485";
+			reg = <0x0 0x600>;
+			enable-method = "psci";
+			next-level-cache = <&L2_600>;
+			L2_600: l2-cache {
+				compatible = "cache";
+				next-level-cache = <&L3_0>;
+			};
+		};
+
+		CPU7: cpu@700 {
+			device_type = "cpu";
+			compatible = "qcom,kryo485";
+			reg = <0x0 0x700>;
+			enable-method = "psci";
+			next-level-cache = <&L2_700>;
+			L2_700: l2-cache {
+				compatible = "cache";
+				next-level-cache = <&L3_0>;
+			};
+		};
+	};
+
+	firmware {
+		scm: scm {
+			compatible = "qcom,scm-sm8150", "qcom,scm";
+			#reset-cells = <1>;
+		};
+	};
+
+	memory@80000000 {
+		device_type = "memory";
+		/* We expect the bootloader to fill in the size */
+		reg = <0 0x80000000 0 0>;
+	};
+
+	psci {
+		compatible = "arm,psci-1.0";
+		method = "smc";
+	};
+
+	soc: soc@0 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges = <0 0 0 0xffffffff>;
+		compatible = "simple-bus";
+
+		gcc: clock-controller@100000 {
+			compatible = "qcom,gcc-sm8150";
+			reg = <0x00100000 0x1f0000>;
+			#clock-cells = <1>;
+			#reset-cells = <1>;
+			#power-domain-cells = <1>;
+			clock-names = "bi_tcxo", "sleep_clk";
+			clocks = <&xo_board>, <&sleep_clk>;
+		};
+
+		qupv3_id_1: geniqup@ac0000 {
+			compatible = "qcom,geni-se-qup";
+			reg = <0x00ac0000 0x6000>;
+			clock-names = "m-ahb", "s-ahb";
+			clocks = <&gcc GCC_QUPV3_WRAP_1_M_AHB_CLK>,
+				 <&gcc GCC_QUPV3_WRAP_1_S_AHB_CLK>;
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges;
+			status = "disabled";
+
+			uart2: serial@a90000 {
+				compatible = "qcom,geni-debug-uart";
+				reg = <0x00a90000 0x4000>;
+				clock-names = "se";
+				clocks = <&gcc GCC_QUPV3_WRAP1_S4_CLK>;
+				interrupts = <GIC_SPI 357 IRQ_TYPE_LEVEL_HIGH>;
+				status = "disabled";
+			};
+		};
+
+		intc: interrupt-controller@17a00000 {
+			compatible = "arm,gic-v3";
+			interrupt-controller;
+			#interrupt-cells = <3>;
+			reg = <0x17a00000 0x10000>,	/* GICD */
+			      <0x17a60000 0x100000>;	/* GICR * 8 */
+			interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;
+		};
+
+		timer@17c20000 {
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges;
+			compatible = "arm,armv7-timer-mem";
+			reg = <0x17c20000 0x1000>;
+			clock-frequency = <19200000>;
+
+			frame@17c21000{
+				frame-number = <0>;
+				interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>,
+					     <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
+				reg = <0x17c21000 0x1000>,
+				      <0x17c22000 0x1000>;
+			};
+
+			frame@17c23000 {
+				frame-number = <1>;
+				interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
+				reg = <0x17c23000 0x1000>;
+				status = "disabled";
+			};
+
+			frame@17c25000 {
+				frame-number = <2>;
+				interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
+				reg = <0x17c25000 0x1000>;
+				status = "disabled";
+			};
+
+			frame@17c27000 {
+				frame-number = <3>;
+				interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>;
+				reg = <0x17c26000 0x1000>;
+				status = "disabled";
+			};
+
+			frame@17c29000 {
+				frame-number = <4>;
+				interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>;
+				reg = <0x17c29000 0x1000>;
+				status = "disabled";
+			};
+
+			frame@17c2b000 {
+				frame-number = <5>;
+				interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>;
+				reg = <0x17c2b000 0x1000>;
+				status = "disabled";
+			};
+
+			frame@17c2d000 {
+				frame-number = <6>;
+				interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
+				reg = <0x17c2d000 0x1000>;
+				status = "disabled";
+			};
+		};
+
+	};
+
+	timer {
+		compatible = "arm,armv8-timer";
+		interrupts = <GIC_PPI 1 IRQ_TYPE_LEVEL_LOW>,
+			     <GIC_PPI 2 IRQ_TYPE_LEVEL_LOW>,
+			     <GIC_PPI 3 IRQ_TYPE_LEVEL_LOW>,
+			     <GIC_PPI 0 IRQ_TYPE_LEVEL_LOW>;
+	};
+};
Signature · 1 line
2.20.1
#2 lore raw

Re: [PATCH 01/22] arm64: dts: qcom: sm8150: add base dts file

Quoting Vinod Koul (2019-08-14 05:49:51)

Quoted 16 lines
arch/arm64/boot/dts/qcom/sm8150.dtsi new file +10 -0
new file mode 100644
index 000000000000..cd9fcadaeacb
@@ -0,0 +1,269 @@
+// SPDX-License-Identifier: BSD-3-Clause
+// Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
+// Copyright (c) 2019, Linaro Limited
+
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/clock/qcom,gcc-sm8150.h>
+
+/ {
+       interrupt-parent = <&intc>;
+

arch/arm64/boot/dts/qcom/sm8150.dtsi line 20

Quoted 10 lines
arch/arm64/boot/dts/qcom/sm8150.dtsi new file +10 -0
+       #address-cells = <2>;
+       #size-cells = <2>;
+
+       chosen { };
+
+       clocks {
+               xo_board: xo-board {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <19200000>;

Is it 19.2 or 38.4 MHz? It seems like lately there are dividers, but I guess it doesn't really matter in the end.

arch/arm64/boot/dts/qcom/sm8150.dtsi line 28

Quoted 8 lines
arch/arm64/boot/dts/qcom/sm8150.dtsi new file +8 -0
+                       clock-output-names = "xo_board";
+               };
+
+               sleep_clk: sleep-clk {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <32764>;
+                       clock-output-names = "sleep_clk";

Does it matter to have this property anymore? Presumably it's OK if the name is now sleep-clk instead of sleep_clk because the name doesn't matter to connect clk tree.

Quoted 88 lines
arch/arm64/boot/dts/qcom/sm8150.dtsi new file +88 -0
+               };
+       };
+
+       cpus {
+               #address-cells = <2>;
+               #size-cells = <0>;
+
+               CPU0: cpu@0 {
+                       device_type = "cpu";
+                       compatible = "qcom,kryo485";
+                       reg = <0x0 0x0>;
+                       enable-method = "psci";
+                       next-level-cache = <&L2_0>;
+                       L2_0: l2-cache {
+                               compatible = "cache";
+                               next-level-cache = <&L3_0>;
+                               L3_0: l3-cache {
+                                     compatible = "cache";
+                               };
+                       };
+               };
+
+               CPU1: cpu@100 {
+                       device_type = "cpu";
+                       compatible = "qcom,kryo485";
+                       reg = <0x0 0x100>;
+                       enable-method = "psci";
+                       next-level-cache = <&L2_100>;
+                       L2_100: l2-cache {
+                               compatible = "cache";
+                               next-level-cache = <&L3_0>;
+                       };
+
+               };
+
+               CPU2: cpu@200 {
+                       device_type = "cpu";
+                       compatible = "qcom,kryo485";
+                       reg = <0x0 0x200>;
+                       enable-method = "psci";
+                       next-level-cache = <&L2_200>;
+                       L2_200: l2-cache {
+                               compatible = "cache";
+                               next-level-cache = <&L3_0>;
+                       };
+               };
+
+               CPU3: cpu@300 {
+                       device_type = "cpu";
+                       compatible = "qcom,kryo485";
+                       reg = <0x0 0x300>;
+                       enable-method = "psci";
+                       next-level-cache = <&L2_300>;
+                       L2_300: l2-cache {
+                               compatible = "cache";
+                               next-level-cache = <&L3_0>;
+                       };
+               };
+
+               CPU4: cpu@400 {
+                       device_type = "cpu";
+                       compatible = "qcom,kryo485";
+                       reg = <0x0 0x400>;
+                       enable-method = "psci";
+                       next-level-cache = <&L2_400>;
+                       L2_400: l2-cache {
+                               compatible = "cache";
+                               next-level-cache = <&L3_0>;
+                       };
+               };
+
+               CPU5: cpu@500 {
+                       device_type = "cpu";
+                       compatible = "qcom,kryo485";
+                       reg = <0x0 0x500>;
+                       enable-method = "psci";
+                       next-level-cache = <&L2_500>;
+                       L2_500: l2-cache {
+                               compatible = "cache";
+                               next-level-cache = <&L3_0>;
+                       };
+               };
+
+               CPU6: cpu@600 {
+                       device_type = "cpu";
+                       compatible = "qcom,kryo485";
+                       reg = <0x0 0x600>;
+                       enable-method = "psci";

arch/arm64/boot/dts/qcom/sm8150.dtsi line 126

Quoted 10 lines
arch/arm64/boot/dts/qcom/sm8150.dtsi new file +10 -0
+                       next-level-cache = <&L2_600>;
+                       L2_600: l2-cache {
+                               compatible = "cache";
+                               next-level-cache = <&L3_0>;
+                       };
+               };
+
+               CPU7: cpu@700 {
+                       device_type = "cpu";
+                       compatible = "qcom,kryo485";

Is this compatible documented?

Quoted 62 lines
arch/arm64/boot/dts/qcom/sm8150.dtsi new file +62 -0
+                       reg = <0x0 0x700>;
+                       enable-method = "psci";
+                       next-level-cache = <&L2_700>;
+                       L2_700: l2-cache {
+                               compatible = "cache";
+                               next-level-cache = <&L3_0>;
+                       };
+               };
+       };
+
+       firmware {
+               scm: scm {
+                       compatible = "qcom,scm-sm8150", "qcom,scm";
+                       #reset-cells = <1>;
+               };
+       };
+
+       memory@80000000 {
+               device_type = "memory";
+               /* We expect the bootloader to fill in the size */
+               reg = <0 0x80000000 0 0>;
+       };
+
+       psci {
+               compatible = "arm,psci-1.0";
+               method = "smc";
+       };
+
+       soc: soc@0 {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges = <0 0 0 0xffffffff>;
+               compatible = "simple-bus";
+
+               gcc: clock-controller@100000 {
+                       compatible = "qcom,gcc-sm8150";
+                       reg = <0x00100000 0x1f0000>;
+                       #clock-cells = <1>;
+                       #reset-cells = <1>;
+                       #power-domain-cells = <1>;
+                       clock-names = "bi_tcxo", "sleep_clk";
+                       clocks = <&xo_board>, <&sleep_clk>;
+               };
+
+               qupv3_id_1: geniqup@ac0000 {
+                       compatible = "qcom,geni-se-qup";
+                       reg = <0x00ac0000 0x6000>;
+                       clock-names = "m-ahb", "s-ahb";
+                       clocks = <&gcc GCC_QUPV3_WRAP_1_M_AHB_CLK>,
+                                <&gcc GCC_QUPV3_WRAP_1_S_AHB_CLK>;
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges;
+                       status = "disabled";
+
+                       uart2: serial@a90000 {
+                               compatible = "qcom,geni-debug-uart";
+                               reg = <0x00a90000 0x4000>;
+                               clock-names = "se";
+                               clocks = <&gcc GCC_QUPV3_WRAP1_S4_CLK>;
+                               interrupts = <GIC_SPI 357 IRQ_TYPE_LEVEL_HIGH>;
+                               status = "disabled";

arch/arm64/boot/dts/qcom/sm8150.dtsi line 198

Quoted 10 lines
arch/arm64/boot/dts/qcom/sm8150.dtsi new file +10 -0
+                       };
+               };
+
+               intc: interrupt-controller@17a00000 {
+                       compatible = "arm,gic-v3";
+                       interrupt-controller;
+                       #interrupt-cells = <3>;
+                       reg = <0x17a00000 0x10000>,     /* GICD */
+                             <0x17a60000 0x100000>;    /* GICR * 8 */
+                       interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;

Is there an its node? Probably the same as sdm845?

arch/arm64/boot/dts/qcom/sm8150.dtsi line 207

Quoted 9 lines
arch/arm64/boot/dts/qcom/sm8150.dtsi new file +9 -0
+               };
+
+               timer@17c20000 {
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges;
+                       compatible = "arm,armv7-timer-mem";
+                       reg = <0x17c20000 0x1000>;
+                       clock-frequency = <19200000>;

This property shouldn't be necessary. Please remove.

Quoted 5 lines
arch/arm64/boot/dts/qcom/sm8150.dtsi new file +5 -0
+
+                       frame@17c21000{
+                               frame-number = <0>;
+                               interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>,
+                                            <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
#3 lore raw

Re: [PATCH 01/22] arm64: dts: qcom: sm8150: add base dts file

Quoted 2 lines · Stephen Boyd

Quoting Vinod Koul (2019-08-14 05:49:51)

Quoted 1 line
arch/arm64/boot/dts/qcom/sm8150.dtsi +0 -0

[..]

Quoted 9 lines

arch/arm64/boot/dts/qcom/sm8150.dtsi line 20

Quoted 5 lines
arch/arm64/boot/dts/qcom/sm8150.dtsi +5 -0
+       clocks {
+               xo_board: xo-board {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <19200000>;

Is it 19.2 or 38.4 MHz? It seems like lately there are dividers, but I guess it doesn't really matter in the end.

As with previous platforms, the board's XO feeds the PMIC at 38.4MHz and the SoC's CXO_IN pin (i.e. bi_tcxo) is fed from the PMIC's LNBBCLK1, which is ticking at 19.2MHz.

[..]

Quoted 8 lines

arch/arm64/boot/dts/qcom/sm8150.dtsi line 168

Quoted 8 lines
arch/arm64/boot/dts/qcom/sm8150.dtsi +8 -0
+               gcc: clock-controller@100000 {
+                       compatible = "qcom,gcc-sm8150";
+                       reg = <0x00100000 0x1f0000>;
+                       #clock-cells = <1>;
+                       #reset-cells = <1>;
+                       #power-domain-cells = <1>;
+                       clock-names = "bi_tcxo", "sleep_clk";
+                       clocks = <&xo_board>, <&sleep_clk>;

So this first one should actually be <&rpmhcc LNBBCLK1>.

But while we now should handle this gracefully in the clock driver I think we still have problems with the cascading probe deferral that follows - last time I tried to do this the serial driver probe deferred past user space initialization and the system crashed as we didn't have a /dev/console.

So, I think we should s/xo_board/lnbbclk1/ (at 19.2MHz) to make it represent the schematics and then once we have rpmhcc and validated that the system handles this gracefully we can switch it out.

Regards,
Bjorn

#4 lore raw

Re: [PATCH 01/22] arm64: dts: qcom: sm8150: add base dts file

Quoting Bjorn Andersson (2019-08-14 10:44:39)

Quoted 29 lines · Stephen Boyd
Quoted 3 lines

Quoting Vinod Koul (2019-08-14 05:49:51)

Quoted 1 line
arch/arm64/boot/dts/qcom/sm8150.dtsi +0 -0

[..]

Quoted 9 lines

arch/arm64/boot/dts/qcom/sm8150.dtsi line 20

Quoted 5 lines
arch/arm64/boot/dts/qcom/sm8150.dtsi +5 -0
+       clocks {
+               xo_board: xo-board {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <19200000>;

Is it 19.2 or 38.4 MHz? It seems like lately there are dividers, but I guess it doesn't really matter in the end.

As with previous platforms, the board's XO feeds the PMIC at 38.4MHz and the SoC's CXO_IN pin (i.e. bi_tcxo) is fed from the PMIC's LNBBCLK1, which is ticking at 19.2MHz.

[..]

Quoted 8 lines

arch/arm64/boot/dts/qcom/sm8150.dtsi line 168

Quoted 8 lines
arch/arm64/boot/dts/qcom/sm8150.dtsi +8 -0
+               gcc: clock-controller@100000 {
+                       compatible = "qcom,gcc-sm8150";
+                       reg = <0x00100000 0x1f0000>;
+                       #clock-cells = <1>;
+                       #reset-cells = <1>;
+                       #power-domain-cells = <1>;
+                       clock-names = "bi_tcxo", "sleep_clk";
+                       clocks = <&xo_board>, <&sleep_clk>;
Quoted 1 line

So this first one should actually be <&rpmhcc LNBBCLK1>.

Hrmm LNBBCLK1 doesn't make any sense to me. That's a buffer that is technically the net connected to the XO pin on the Soc, but it isn't really supposed to be used by anything from what I recall. Last time I tried to use the buffers the RPM team told me I was using the wrong resource and I should just use the XO resource instead. Doesn't RPMh expose the other "XO" resource that is supposed to prevent XO shutdown? Just mark it critical for now so that XO isn't turned off at runtime.

Quoted 6 lines

But while we now should handle this gracefully in the clock driver I think we still have problems with the cascading probe deferral that follows - last time I tried to do this the serial driver probe deferred past user space initialization and the system crashed as we didn't have a /dev/console.

Does the serial driver probe eventually? Maybe you can run agetty when the device appears based on some uevent for /dev/console. Or we have a bug where /dev/console is created by devtmpfs when there isn't actually a console?

Quoted 6 lines

So, I think we should s/xo_board/lnbbclk1/ (at 19.2MHz) to make it represent the schematics and then once we have rpmhcc and validated that the system handles this gracefully we can switch it out.

Sure, some sort of approach that switches it later on is fine, just want to make sure that the board clk frequency is accurately reflected in the DT.

#5 lore raw

Re: [PATCH 01/22] arm64: dts: qcom: sm8150: add base dts file

Quoted 30 lines · Stephen Boyd

Quoting Bjorn Andersson (2019-08-14 10:44:39)

Quoted 29 lines · Stephen Boyd
Quoted 3 lines

Quoting Vinod Koul (2019-08-14 05:49:51)

Quoted 1 line
arch/arm64/boot/dts/qcom/sm8150.dtsi +0 -0

[..]

Quoted 9 lines

arch/arm64/boot/dts/qcom/sm8150.dtsi line 20

Quoted 5 lines
arch/arm64/boot/dts/qcom/sm8150.dtsi +5 -0
+       clocks {
+               xo_board: xo-board {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <19200000>;

Is it 19.2 or 38.4 MHz? It seems like lately there are dividers, but I guess it doesn't really matter in the end.

As with previous platforms, the board's XO feeds the PMIC at 38.4MHz and the SoC's CXO_IN pin (i.e. bi_tcxo) is fed from the PMIC's LNBBCLK1, which is ticking at 19.2MHz.

[..]

Quoted 8 lines
Quoted 8 lines
arch/arm64/boot/dts/qcom/sm8150.dtsi +8 -0
+               gcc: clock-controller@100000 {
+                       compatible = "qcom,gcc-sm8150";
+                       reg = <0x00100000 0x1f0000>;
+                       #clock-cells = <1>;
+                       #reset-cells = <1>;
+                       #power-domain-cells = <1>;
+                       clock-names = "bi_tcxo", "sleep_clk";
+                       clocks = <&xo_board>, <&sleep_clk>;
Quoted 8 lines
Quoted 1 line

So this first one should actually be <&rpmhcc LNBBCLK1>.

Hrmm LNBBCLK1 doesn't make any sense to me. That's a buffer that is technically the net connected to the XO pin on the Soc, but it isn't really supposed to be used by anything from what I recall. Last time I tried to use the buffers the RPM team told me I was using the wrong resource and I should just use the XO resource instead. Doesn't RPMh expose the other "XO" resource that is supposed to prevent XO shutdown?

So while it's the LNBBCLK1 pin we're referring to, it's the RPMH_CXO_CLK which has some level of magic involved that we should actually use in the software.

Quoted 9 lines

Just mark it critical for now so that XO isn't turned off at runtime.

Quoted 6 lines

But while we now should handle this gracefully in the clock driver I think we still have problems with the cascading probe deferral that follows - last time I tried to do this the serial driver probe deferred past user space initialization and the system crashed as we didn't have a /dev/console.

Quoted 5 lines

Does the serial driver probe eventually? Maybe you can run agetty when the device appears based on some uevent for /dev/console. Or we have a bug where /dev/console is created by devtmpfs when there isn't actually a console?

I don't remember the exact outcome, but presume it would depend on the implementation details of early user space (e.g. my regression test suite would not deal with this).

Quoted 11 lines
Quoted 6 lines

So, I think we should s/xo_board/lnbbclk1/ (at 19.2MHz) to make it represent the schematics and then once we have rpmhcc and validated that the system handles this gracefully we can switch it out.

Sure, some sort of approach that switches it later on is fine, just want to make sure that the board clk frequency is accurately reflected in the DT.

We introduced the xo_board fixed clock to have a parent of gcc, but given that there is a clock named "XO" and it is not the clock being connected to gcc, nor is it ticking at the right frequency I think it should at least have a different name.

Regards,
Bjorn

#6 lore raw

Re: [PATCH 01/22] arm64: dts: qcom: sm8150: add base dts file

In reply to Vinod Koul
Quoted 1 line · Vinod Koul
arch/arm64/boot/dts/qcom/sm8150.dtsi +0 -0

[..]

arch/arm64/boot/dts/qcom/sm8150.dtsi line 158

Quoted 4 lines
arch/arm64/boot/dts/qcom/sm8150.dtsi +4 -0
+	soc: soc@0 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges = <0 0 0 0xffffffff>;

I'm expecting that we'll run into the same problems as we saw on 845 when bringing in the smmu nodes, so please make the cells 2 - and ranges should likely be the same 36 bits.

Regards,
Bjorn

author
#7 lore raw

PATCH 2/22 arm64: dts: qcom: sm8150-mtp: add base dts file

In reply to Vinod Koul

This add base DTS file for sm8150-mtp and enables
boot to console

---
 arch/arm64/boot/dts/qcom/Makefile       |  1 +
 arch/arm64/boot/dts/qcom/sm8150-mtp.dts | 28 +++++++++++++++++++++++++
 2 files changed, 29 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/sm8150-mtp.dts
arch/arm64/boot/dts/qcom/Makefile +1 -0
index 0a7e5dfce6f7..1964dacaf19b 100644
@@ -12,5 +12,6 @@ dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-cheza-r2.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-cheza-r3.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-db845c.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-mtp.dtb
+dtb-$(CONFIG_ARCH_QCOM)	+= sm8150-mtp.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= qcs404-evb-1000.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= qcs404-evb-4000.dtb
arch/arm64/boot/dts/qcom/sm8150-mtp.dts new file +28 -0
new file mode 100644
index 000000000000..df08ee50510d
@@ -0,0 +1,28 @@
+// SPDX-License-Identifier: BSD-3-Clause
+// Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
+// Copyright (c) 2019, Linaro Limited
+
+/dts-v1/;
+
+#include "sm8150.dtsi"
+
+/ {
+	model = "Qualcomm Technologies, Inc. SM8150 MTP";
+	compatible = "qcom,sm8150-mtp";
+
+	aliases {
+		serial0 = &uart2;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+};
+
+&qupv3_id_1 {
+	status = "okay";
+};
+
+&uart2 {
+	status = "okay";
+};
Signature · 1 line
2.20.1
Reviewed-by on v1 2/22
#8 lore raw

Re: [PATCH 02/22] arm64: dts: qcom: sm8150-mtp: add base dts file

Quoted 4 lines · Vinod Koul

This add base DTS file for sm8150-mtp and enables
boot to console

Quoted 54 lines
---
 arch/arm64/boot/dts/qcom/Makefile       |  1 +
 arch/arm64/boot/dts/qcom/sm8150-mtp.dts | 28 +++++++++++++++++++++++++
 2 files changed, 29 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/sm8150-mtp.dts
arch/arm64/boot/dts/qcom/Makefile +1 -0
index 0a7e5dfce6f7..1964dacaf19b 100644
@@ -12,5 +12,6 @@ dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-cheza-r2.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-cheza-r3.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-db845c.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-mtp.dtb
+dtb-$(CONFIG_ARCH_QCOM)	+= sm8150-mtp.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= qcs404-evb-1000.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= qcs404-evb-4000.dtb
arch/arm64/boot/dts/qcom/sm8150-mtp.dts new file +28 -0
new file mode 100644
index 000000000000..df08ee50510d
@@ -0,0 +1,28 @@
+// SPDX-License-Identifier: BSD-3-Clause
+// Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
+// Copyright (c) 2019, Linaro Limited
+
+/dts-v1/;
+
+#include "sm8150.dtsi"
+
+/ {
+	model = "Qualcomm Technologies, Inc. SM8150 MTP";
+	compatible = "qcom,sm8150-mtp";
+
+	aliases {
+		serial0 = &uart2;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+};
+
+&qupv3_id_1 {
+	status = "okay";
+};
+
+&uart2 {
+	status = "okay";
+};
Signature · 1 line
2.20.1
author
#9 lore raw

PATCH 3/22 arm64: dts: qcom: sm8150: add tlmm node

In reply to Vinod Koul
---
 arch/arm64/boot/dts/qcom/sm8150.dtsi | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
arch/arm64/boot/dts/qcom/sm8150.dtsi +15 -0
index cd9fcadaeacb..5f2f21270e2d 100644
@@ -189,6 +189,21 @@
 			};
 		};
 
+		tlmm: pinctrl@3100000 {
+			compatible = "qcom,sm8150-pinctrl";
+			reg = <0x03100000 0x300000>,
+			      <0x03500000 0x300000>,
+			      <0x03900000 0x300000>,
+			      <0x03D00000 0x300000>;
+			reg-names = "west", "east", "north", "south";
+			interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>;
+			gpio-ranges = <&tlmm 0 0 175>;
+			gpio-controller;
+			#gpio-cells = <2>;
+			interrupt-controller;
+			#interrupt-cells = <2>;
+		};
+
 		intc: interrupt-controller@17a00000 {
 			compatible = "arm,gic-v3";
 			interrupt-controller;
Signature · 1 line
2.20.1
#10 lore raw

Re: [PATCH 03/22] arm64: dts: qcom: sm8150: add tlmm node

Quoting Vinod Koul (2019-08-14 05:49:53)

Quoted 2 lines

---

Add some commit text? Or just squash with the first patch? Not sure why it's a different commit.

Quoted 8 lines
 arch/arm64/boot/dts/qcom/sm8150.dtsi | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
arch/arm64/boot/dts/qcom/sm8150.dtsi +0 -0
index cd9fcadaeacb..5f2f21270e2d 100644

arch/arm64/boot/dts/qcom/sm8150.dtsi line 197

Quoted 9 lines
arch/arm64/boot/dts/qcom/sm8150.dtsi +6 -0
@@ -189,6 +189,21 @@
                        };
                };
 
+               tlmm: pinctrl@3100000 {
+                       compatible = "qcom,sm8150-pinctrl";
+                       reg = <0x03100000 0x300000>,
+                             <0x03500000 0x300000>,
+                             <0x03900000 0x300000>,
+                             <0x03D00000 0x300000>;

Please don't use capitalized hex characters.

Quoted 9 lines
arch/arm64/boot/dts/qcom/sm8150.dtsi +9 -0
+                       reg-names = "west", "east", "north", "south";
+                       interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>;
+                       gpio-ranges = <&tlmm 0 0 175>;
+                       gpio-controller;
+                       #gpio-cells = <2>;
+                       interrupt-controller;
+                       #interrupt-cells = <2>;
+               };
+
author
#11 lore raw

Re: [PATCH 03/22] arm64: dts: qcom: sm8150: add tlmm node

Quoted 18 lines · Stephen Boyd

Quoting Vinod Koul (2019-08-14 05:49:53)

Quoted 2 lines

---

Add some commit text? Or just squash with the first patch? Not sure why it's a different commit.

Quoted 11 lines
 arch/arm64/boot/dts/qcom/sm8150.dtsi | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
arch/arm64/boot/dts/qcom/sm8150.dtsi +0 -0
index cd9fcadaeacb..5f2f21270e2d 100644
@@ -189,6 +189,21 @@
                        };
                };
 
Quoted 8 lines

arch/arm64/boot/dts/qcom/sm8150.dtsi line 197

Quoted 6 lines
arch/arm64/boot/dts/qcom/sm8150.dtsi +6 -0
+               tlmm: pinctrl@3100000 {
+                       compatible = "qcom,sm8150-pinctrl";
+                       reg = <0x03100000 0x300000>,
+                             <0x03500000 0x300000>,
+                             <0x03900000 0x300000>,
+                             <0x03D00000 0x300000>;

Please don't use capitalized hex characters.

Sure, this seems to be only instance where this crept in. Fixed now

Signature · 1 line
~Vinod
author
#12 lore raw

PATCH 4/22 arm64: dts: qcom: sm8150-mtp: add tlmm reserved range

In reply to Vinod Koul
---
 arch/arm64/boot/dts/qcom/sm8150-mtp.dts | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm64/boot/dts/qcom/sm8150-mtp.dts +4 -0
index df08ee50510d..8700f015c074 100644
@@ -23,6 +23,10 @@
 	status = "okay";
 };
 
+&tlmm {
+	gpio-reserved-ranges = <0 4>, <126 4>;
+};
+
 &uart2 {
 	status = "okay";
 };
Signature · 1 line
2.20.1
#13 lore raw

Re: [PATCH 04/22] arm64: dts: qcom: sm8150-mtp: add tlmm reserved range

Quoting Vinod Koul (2019-08-14 05:49:54)

Quoted 2 lines

---

Squash?

Quoted 3 lines
 arch/arm64/boot/dts/qcom/sm8150-mtp.dts | 4 ++++
 1 file changed, 4 insertions(+)
author
#14 lore raw

PATCH 5/22 arm64: dts: qcom: sm8150: Add spmi node

In reply to Vinod Koul

Add SPMI node which is used for spmi_bus

---
 arch/arm64/boot/dts/qcom/sm8150.dtsi | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
arch/arm64/boot/dts/qcom/sm8150.dtsi +18 -0
index 5f2f21270e2d..5c6b103b042b 100644
@@ -272,6 +272,24 @@
 			};
 		};
 
+		spmi_bus: spmi@c440000 {
+			compatible = "qcom,spmi-pmic-arb";
+			reg = <0x0c440000 0x0001100>,
+			      <0x0c600000 0x2000000>,
+			      <0x0e600000 0x0100000>,
+			      <0x0e700000 0x00a0000>,
+			      <0x0c40a000 0x0026000>;
+			reg-names = "core", "chnls", "obsrvr", "intr", "cnfg";
+			interrupt-names = "periph_irq";
+			interrupts = <GIC_SPI 481 IRQ_TYPE_LEVEL_HIGH>;
+			qcom,ee = <0>;
+			qcom,channel = <0>;
+			#address-cells = <2>;
+			#size-cells = <0>;
+			interrupt-controller;
+			#interrupt-cells = <4>;
+			cell-index = <0>;
+		};
 	};
 
 	timer {
Signature · 1 line
2.20.1
#15 lore raw

Re: [PATCH 05/22] arm64: dts: qcom: sm8150: Add spmi node

Quoting Vinod Koul (2019-08-14 05:49:55)

Quoted 6 lines

Add SPMI node which is used for spmi_bus

---
 arch/arm64/boot/dts/qcom/sm8150.dtsi | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

Squash?

author
#16 lore raw

PATCH 6/22 arm64: dts: qcom: pm8150: Add Base DTS file

In reply to Vinod Koul

Add base DTS file for pm8150 along with GPIOs

---
 arch/arm64/boot/dts/qcom/pm8150.dtsi | 41 ++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/pm8150.dtsi
arch/arm64/boot/dts/qcom/pm8150.dtsi new file +41 -0
new file mode 100644
index 000000000000..b533e254a203
@@ -0,0 +1,41 @@
+// SPDX-License-Identifier: BSD-3-Clause
+// Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
+// Copyright (c) 2019, Linaro Limited
+
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/spmi/spmi.h>
+
+&spmi_bus {
+	pm8150_0: pm8150@0 {
+		compatible = "qcom,spmi-pmic";
+		reg = <0x0 SPMI_USID>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		pm8150_gpios: gpio@c000 {
+			compatible = "qcom,pm8150-gpio";
+			reg = <0xc000>;
+			gpio-controller;
+			#gpio-cells = <2>;
+			interrupts = <0 0xc0 0 IRQ_TYPE_NONE>,
+				     <0 0xc1 0 IRQ_TYPE_NONE>,
+				     <0 0xc2 0 IRQ_TYPE_NONE>,
+				     <0 0xc3 0 IRQ_TYPE_NONE>,
+				     <0 0xc4 0 IRQ_TYPE_NONE>,
+				     <0 0xc5 0 IRQ_TYPE_NONE>,
+				     <0 0xc6 0 IRQ_TYPE_NONE>,
+				     <0 0xc7 0 IRQ_TYPE_NONE>,
+				     <0 0xc8 0 IRQ_TYPE_NONE>,
+				     <0 0xc9 0 IRQ_TYPE_NONE>,
+				     <0 0xca 0 IRQ_TYPE_NONE>,
+				     <0 0xcb 0 IRQ_TYPE_NONE>;
+		};
+	};
+
+	qcom,pm8150@1 {
+		compatible ="qcom,spmi-pmic";
+		reg = <0x1 SPMI_USID>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+	};
+};
Signature · 1 line
2.20.1
#17 lore raw

Re: [PATCH 06/22] arm64: dts: qcom: pm8150: Add Base DTS file

Quoting Vinod Koul (2019-08-14 05:49:56)

Quoted 14 lines

Add base DTS file for pm8150 along with GPIOs

---
 arch/arm64/boot/dts/qcom/pm8150.dtsi | 41 ++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/pm8150.dtsi
arch/arm64/boot/dts/qcom/pm8150.dtsi new file +0 -0
new file mode 100644
index 000000000000..b533e254a203

arch/arm64/boot/dts/qcom/pm8150.dtsi line 9

Quoted 9 lines
arch/arm64/boot/dts/qcom/pm8150.dtsi new file +9 -0
@@ -0,0 +1,41 @@
+// SPDX-License-Identifier: BSD-3-Clause
+// Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
+// Copyright (c) 2019, Linaro Limited
+
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/spmi/spmi.h>
+
+&spmi_bus {
+       pm8150_0: pm8150@0 {

I think node name should be 'pmic'

arch/arm64/boot/dts/qcom/pm8150.dtsi line 10

Quoted 1 line
arch/arm64/boot/dts/qcom/pm8150.dtsi new file +1 -0
+               compatible = "qcom,spmi-pmic";

This should also have the model number? "qcom,pm8150"?

Quoted 15 lines
arch/arm64/boot/dts/qcom/pm8150.dtsi new file +15 -0
+               reg = <0x0 SPMI_USID>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               pm8150_gpios: gpio@c000 {
+                       compatible = "qcom,pm8150-gpio";
+                       reg = <0xc000>;
+                       gpio-controller;
+                       #gpio-cells = <2>;
+                       interrupts = <0 0xc0 0 IRQ_TYPE_NONE>,
+                                    <0 0xc1 0 IRQ_TYPE_NONE>,
+                                    <0 0xc2 0 IRQ_TYPE_NONE>,
+                                    <0 0xc3 0 IRQ_TYPE_NONE>,
+                                    <0 0xc4 0 IRQ_TYPE_NONE>,
+                                    <0 0xc5 0 IRQ_TYPE_NONE>,

arch/arm64/boot/dts/qcom/pm8150.dtsi line 35

Quoted 10 lines
arch/arm64/boot/dts/qcom/pm8150.dtsi new file +10 -0
+                                    <0 0xc6 0 IRQ_TYPE_NONE>,
+                                    <0 0xc7 0 IRQ_TYPE_NONE>,
+                                    <0 0xc8 0 IRQ_TYPE_NONE>,
+                                    <0 0xc9 0 IRQ_TYPE_NONE>,
+                                    <0 0xca 0 IRQ_TYPE_NONE>,
+                                    <0 0xcb 0 IRQ_TYPE_NONE>;
+               };
+       };
+
+       qcom,pm8150@1 {

Same comment, pmic@1.

Quoted 6 lines
arch/arm64/boot/dts/qcom/pm8150.dtsi new file +6 -0
+               compatible ="qcom,spmi-pmic";
+               reg = <0x1 SPMI_USID>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+       };
+};
author
#18 lore raw

Re: [PATCH 06/22] arm64: dts: qcom: pm8150: Add Base DTS file

Quoted 18 lines · Stephen Boyd

Quoting Vinod Koul (2019-08-14 05:49:56)

Quoted 17 lines

Add base DTS file for pm8150 along with GPIOs

---
 arch/arm64/boot/dts/qcom/pm8150.dtsi | 41 ++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/pm8150.dtsi
arch/arm64/boot/dts/qcom/pm8150.dtsi new file +3 -0
new file mode 100644
index 000000000000..b533e254a203
@@ -0,0 +1,41 @@
+// SPDX-License-Identifier: BSD-3-Clause
+// Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
+// Copyright (c) 2019, Linaro Limited
Quoted 8 lines

arch/arm64/boot/dts/qcom/pm8150.dtsi line 9

Quoted 6 lines
arch/arm64/boot/dts/qcom/pm8150.dtsi new file +6 -0
+
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/spmi/spmi.h>
+
+&spmi_bus {
+       pm8150_0: pm8150@0 {

I think node name should be 'pmic'

Yes will fix.

Quoted 4 lines

arch/arm64/boot/dts/qcom/pm8150.dtsi line 10

Quoted 2 lines
arch/arm64/boot/dts/qcom/pm8150.dtsi new file +1 -0
+               compatible = "qcom,spmi-pmic";

This should also have the model number? "qcom,pm8150"?

Added now

Quoted 19 lines
Quoted 19 lines
arch/arm64/boot/dts/qcom/pm8150.dtsi new file +19 -0
+               reg = <0x0 SPMI_USID>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               pm8150_gpios: gpio@c000 {
+                       compatible = "qcom,pm8150-gpio";
+                       reg = <0xc000>;
+                       gpio-controller;
+                       #gpio-cells = <2>;
+                       interrupts = <0 0xc0 0 IRQ_TYPE_NONE>,
+                                    <0 0xc1 0 IRQ_TYPE_NONE>,
+                                    <0 0xc2 0 IRQ_TYPE_NONE>,
+                                    <0 0xc3 0 IRQ_TYPE_NONE>,
+                                    <0 0xc4 0 IRQ_TYPE_NONE>,
+                                    <0 0xc5 0 IRQ_TYPE_NONE>,
+                                    <0 0xc6 0 IRQ_TYPE_NONE>,
+                                    <0 0xc7 0 IRQ_TYPE_NONE>,
+                                    <0 0xc8 0 IRQ_TYPE_NONE>,
+                                    <0 0xc9 0 IRQ_TYPE_NONE>,
Quoted 8 lines

arch/arm64/boot/dts/qcom/pm8150.dtsi line 35

Quoted 6 lines
arch/arm64/boot/dts/qcom/pm8150.dtsi new file +6 -0
+                                    <0 0xca 0 IRQ_TYPE_NONE>,
+                                    <0 0xcb 0 IRQ_TYPE_NONE>;
+               };
+       };
+
+       qcom,pm8150@1 {

Same comment, pmic@1.

right, here and everywhere else

Signature · 1 line
~Vinod
author
#19 lore raw

PATCH 7/22 arm64: dts: qcom: pm8150: Add pon and rtc nodes

In reply to Vinod Koul

PM8150 PMIC contains pon and rtc devices so add nodes for these.

---
 arch/arm64/boot/dts/qcom/pm8150.dtsi | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
arch/arm64/boot/dts/qcom/pm8150.dtsi +20 -0
index b533e254a203..2cb727ce30eb 100644
@@ -2,6 +2,7 @@
 // Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
 // Copyright (c) 2019, Linaro Limited
 
+#include <dt-bindings/input/input.h>
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/spmi/spmi.h>
 
@@ -12,6 +13,25 @@
 		#address-cells = <1>;
 		#size-cells = <0>;
 
+		pon: pon@800 {
+			compatible = "qcom,pm8916-pon";
+			reg = <0x0800>;
+			pwrkey {
+				compatible = "qcom,pm8941-pwrkey";
+				interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
+				debounce = <15625>;
+				bias-pull-up;
+				linux,code = <KEY_POWER>;
+			};
+		};
+
+		rtc@6000 {
+			compatible = "qcom,pm8941-rtc";
+			reg = <0x6000>;
+			reg-names = "rtc", "alarm";
+			interrupts = <0x0 0x61 0x1 IRQ_TYPE_NONE>;
+		};
+
 		pm8150_gpios: gpio@c000 {
 			compatible = "qcom,pm8150-gpio";
 			reg = <0xc000>;
Signature · 1 line
2.20.1
#20 lore raw

Re: [PATCH 07/22] arm64: dts: qcom: pm8150: Add pon and rtc nodes

Quoting Vinod Koul (2019-08-14 05:49:57)

Quoted 4 lines

PM8150 PMIC contains pon and rtc devices so add nodes for these.

---

Squash this with the other patch?

arch/arm64/boot/dts/qcom/pm8150.dtsi line 24

Quoted 13 lines
arch/arm64/boot/dts/qcom/pm8150.dtsi +9 -0
@@ -12,6 +13,25 @@
                #address-cells = <1>;
                #size-cells = <0>;
 
+               pon: pon@800 {
+                       compatible = "qcom,pm8916-pon";
+                       reg = <0x0800>;
+                       pwrkey {
+                               compatible = "qcom,pm8941-pwrkey";
+                               interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
+                               debounce = <15625>;
+                               bias-pull-up;
+                               linux,code = <KEY_POWER>;

status = "disabled"?

arch/arm64/boot/dts/qcom/pm8150.dtsi line 32

Quoted 8 lines
arch/arm64/boot/dts/qcom/pm8150.dtsi +8 -0
+                       };
+               };
+
+               rtc@6000 {
+                       compatible = "qcom,pm8941-rtc";
+                       reg = <0x6000>;
+                       reg-names = "rtc", "alarm";
+                       interrupts = <0x0 0x61 0x1 IRQ_TYPE_NONE>;

status = "disabled"?

Quoted 8 lines
arch/arm64/boot/dts/qcom/pm8150.dtsi +2 -0
+               };
+
                pm8150_gpios: gpio@c000 {
                        compatible = "qcom,pm8150-gpio";
                        reg = <0xc000>;
Signature · 1 line
2.20.1
author
#21 lore raw

Re: [PATCH 07/22] arm64: dts: qcom: pm8150: Add pon and rtc nodes

Quoted 7 lines · Stephen Boyd

Quoting Vinod Koul (2019-08-14 05:49:57)

Quoted 4 lines

PM8150 PMIC contains pon and rtc devices so add nodes for these.

---

Squash this with the other patch?

OK

Quoted 5 lines
Quoted 5 lines
arch/arm64/boot/dts/qcom/pm8150.dtsi +0 -0
@@ -12,6 +13,25 @@
                #address-cells = <1>;
                #size-cells = <0>;
 
Quoted 11 lines

arch/arm64/boot/dts/qcom/pm8150.dtsi line 24

Quoted 9 lines
arch/arm64/boot/dts/qcom/pm8150.dtsi +9 -0
+               pon: pon@800 {
+                       compatible = "qcom,pm8916-pon";
+                       reg = <0x0800>;
+                       pwrkey {
+                               compatible = "qcom,pm8941-pwrkey";
+                               interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
+                               debounce = <15625>;
+                               bias-pull-up;
+                               linux,code = <KEY_POWER>;

status = "disabled"?

will do

Quoted 11 lines

arch/arm64/boot/dts/qcom/pm8150.dtsi line 32

Quoted 9 lines
arch/arm64/boot/dts/qcom/pm8150.dtsi +8 -0
+                       };
+               };
+
+               rtc@6000 {
+                       compatible = "qcom,pm8941-rtc";
+                       reg = <0x6000>;
+                       reg-names = "rtc", "alarm";
+                       interrupts = <0x0 0x61 0x1 IRQ_TYPE_NONE>;

status = "disabled"?

will do

Signature · 1 line
~Vinod
author
#22 lore raw

PATCH 8/22 arm64: dts: qcom: pm8150: Add vadc node

In reply to Vinod Koul

PM8150 PMIC contains vadc device so add node for this.

---
 arch/arm64/boot/dts/qcom/pm8150.dtsi | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)
arch/arm64/boot/dts/qcom/pm8150.dtsi +28 -0
index 2cb727ce30eb..a137def0e26a 100644
@@ -5,6 +5,7 @@
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/spmi/spmi.h>
+#include <dt-bindings/iio/qcom,spmi-vadc.h>
 
 &spmi_bus {
 	pm8150_0: pm8150@0 {
@@ -25,6 +26,33 @@
 			};
 		};
 
+		pm8150_adc: adc@3100 {
+			compatible = "qcom,spmi-adc5";
+			reg = <0x3100>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			#io-channel-cells = <1>;
+			interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
+
+			ref-gnd@0 {
+				reg = <ADC5_REF_GND>;
+				qcom,pre-scaling = <1 1>;
+				label = "ref_gnd";
+			};
+
+			vref-1p25@1 {
+				reg = <ADC5_1P25VREF>;
+				qcom,pre-scaling = <1 1>;
+				label = "vref_1p25";
+			};
+
+			die-temp@6 {
+				reg = <ADC5_DIE_TEMP>;
+				qcom,pre-scaling = <1 1>;
+				label = "die_temp";
+			};
+		};
+
 		rtc@6000 {
 			compatible = "qcom,pm8941-rtc";
 			reg = <0x6000>;
Signature · 1 line
2.20.1
#23 lore raw

Re: [PATCH 08/22] arm64: dts: qcom: pm8150: Add vadc node

Quoting Vinod Koul (2019-08-14 05:49:58)

arch/arm64/boot/dts/qcom/pm8150.dtsi line 35

Quoted 11 lines
arch/arm64/boot/dts/qcom/pm8150.dtsi +7 -0
@@ -25,6 +26,33 @@
                        };
                };
 
+               pm8150_adc: adc@3100 {
+                       compatible = "qcom,spmi-adc5";
+                       reg = <0x3100>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       #io-channel-cells = <1>;
+                       interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;

status = "disabled"? I imagine there are cases where some board doesn't want to use the ADC for anything.

Quoted 8 lines
arch/arm64/boot/dts/qcom/pm8150.dtsi +8 -0
+
+                       ref-gnd@0 {
+                               reg = <ADC5_REF_GND>;
+                               qcom,pre-scaling = <1 1>;
+                               label = "ref_gnd";
+                       };
+
+                       vref-1p25@1 {

arch/arm64/boot/dts/qcom/pm8150.dtsi line 53

Quoted 10 lines
arch/arm64/boot/dts/qcom/pm8150.dtsi +10 -0
+                               reg = <ADC5_1P25VREF>;
+                               qcom,pre-scaling = <1 1>;
+                               label = "vref_1p25";
+                       };
+
+                       die-temp@6 {
+                               reg = <ADC5_DIE_TEMP>;
+                               qcom,pre-scaling = <1 1>;
+                               label = "die_temp";
+                       };

Are these board level details?

Quoted 8 lines
arch/arm64/boot/dts/qcom/pm8150.dtsi +2 -0
+               };
+
                rtc@6000 {
                        compatible = "qcom,pm8941-rtc";
                        reg = <0x6000>;
Signature · 1 line
2.20.1
author
#24 lore raw

PATCH 9/22 arm64: dts: qcom: pm8150b: Add Base DTS file

In reply to Vinod Koul

PMIC pm8150b is a slave pmic and this adds base DTS file for pm8150b

---
 arch/arm64/boot/dts/qcom/pm8150b.dtsi | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/pm8150b.dtsi
arch/arm64/boot/dts/qcom/pm8150b.dtsi new file +22 -0
new file mode 100644
index 000000000000..c0a678b0f159
@@ -0,0 +1,22 @@
+// SPDX-License-Identifier: BSD-3-Clause
+// Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
+// Copyright (c) 2019, Linaro Limited
+
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/spmi/spmi.h>
+
+&spmi_bus {
+	pm8150@2 {
+		compatible = "qcom,spmi-pmic";
+		reg = <0x2 SPMI_USID>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+	};
+
+	qcom,pm8150@3 {
+		compatible ="qcom,spmi-pmic";
+		reg = <0x3 SPMI_USID>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+	};
+};
Signature · 1 line
2.20.1
#25 lore raw

Re: [PATCH 09/22] arm64: dts: qcom: pm8150b: Add Base DTS file

Quoting Vinod Koul (2019-08-14 05:49:59)

Quoted 6 lines
arch/arm64/boot/dts/qcom/pm8150b.dtsi new file +0 -0
new file mode 100644
index 000000000000..c0a678b0f159

arch/arm64/boot/dts/qcom/pm8150b.dtsi line 9

Quoted 9 lines
arch/arm64/boot/dts/qcom/pm8150b.dtsi new file +9 -0
@@ -0,0 +1,22 @@
+// SPDX-License-Identifier: BSD-3-Clause
+// Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
+// Copyright (c) 2019, Linaro Limited
+
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/spmi/spmi.h>
+
+&spmi_bus {
+       pm8150@2 {

pmic.

arch/arm64/boot/dts/qcom/pm8150b.dtsi line 16

Quoted 7 lines
arch/arm64/boot/dts/qcom/pm8150b.dtsi new file +7 -0
+               compatible = "qcom,spmi-pmic";
+               reg = <0x2 SPMI_USID>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+       };
+
+       qcom,pm8150@3 {

pmic. Funny this one has qcom, prefix!

Quoted 9 lines
arch/arm64/boot/dts/qcom/pm8150b.dtsi new file +6 -0
+               compatible ="qcom,spmi-pmic";
+               reg = <0x3 SPMI_USID>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+       };
+};
Signature · 1 line
2.20.1
author
#26 lore raw

PATCH 10/22 arm64: dts: qcom: pm8150b: Add pon and adc nodes

In reply to Vinod Koul

Add the pon and adc nodes found in pm8150b PMIC.

---
 arch/arm64/boot/dts/qcom/pm8150b.dtsi | 54 +++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)
arch/arm64/boot/dts/qcom/pm8150b.dtsi +54 -0
index c0a678b0f159..846197bd65cd 100644
@@ -2,6 +2,7 @@
 // Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
 // Copyright (c) 2019, Linaro Limited
 
+#include <dt-bindings/iio/qcom,spmi-vadc.h>
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/spmi/spmi.h>
 
@@ -11,6 +12,59 @@
 		reg = <0x2 SPMI_USID>;
 		#address-cells = <1>;
 		#size-cells = <0>;
+
+		pon@800 {
+			compatible = "qcom,pm8916-pon";
+			reg = <0x0800>;
+		};
+
+		adc@3100 {
+			compatible = "qcom,spmi-adc5";
+			reg = <0x3100>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			#io-channel-cells = <1>;
+			interrupts = <0x2 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
+
+			ref-gnd@0 {
+				reg = <ADC5_REF_GND>;
+				qcom,pre-scaling = <1 1>;
+				label = "ref_gnd";
+			};
+
+			vref-1p25@1 {
+				reg = <ADC5_1P25VREF>;
+				qcom,pre-scaling = <1 1>;
+				label = "vref_1p25";
+			};
+
+			die-temp@6 {
+				reg = <ADC5_DIE_TEMP>;
+				qcom,pre-scaling = <1 1>;
+				label = "die_temp";
+			};
+
+			chg-temp@9 {
+				reg = <ADC5_CHG_TEMP>;
+				qcom,pre-scaling = <1 1>;
+				label = "chg_temp";
+			};
+
+			smb1390-therm@14 {
+				reg = <ADC5_AMUX_THM2>;
+				qcom,hw-settle-time = <200>;
+				qcom,pre-scaling = <1 1>;
+				label = "smb1390_therm";
+			};
+
+			smb1355-therm@78 {
+				reg = <ADC5_AMUX_THM2_100K_PU>;
+				qcom,ratiometric;
+				qcom,hw-settle-time = <200>;
+				qcom,pre-scaling = <1 1>;
+				label = "smb1355_therm";
+			};
+		};
 	};
 
 	qcom,pm8150@3 {
Signature · 1 line
2.20.1
#27 lore raw

Re: [PATCH 10/22] arm64: dts: qcom: pm8150b: Add pon and adc nodes

Quoting Vinod Koul (2019-08-14 05:50:00)

Quoted 6 lines

Add the pon and adc nodes found in pm8150b PMIC.

---
 arch/arm64/boot/dts/qcom/pm8150b.dtsi | 54 +++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)

Squash?

Quoted 14 lines
arch/arm64/boot/dts/qcom/pm8150b.dtsi +1 -0
index c0a678b0f159..846197bd65cd 100644
@@ -2,6 +2,7 @@
 // Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
 // Copyright (c) 2019, Linaro Limited
 
+#include <dt-bindings/iio/qcom,spmi-vadc.h>
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/spmi/spmi.h>
 

arch/arm64/boot/dts/qcom/pm8150b.dtsi line 16

Quoted 5 lines
arch/arm64/boot/dts/qcom/pm8150b.dtsi +2 -0
@@ -11,6 +12,59 @@
                reg = <0x2 SPMI_USID>;
                #address-cells = <1>;
                #size-cells = <0>;
+
+               pon@800 {

Maybe pon node name should be 'key' or 'power-on'?

Quoted 40 lines
arch/arm64/boot/dts/qcom/pm8150b.dtsi +40 -0
+                       compatible = "qcom,pm8916-pon";
+                       reg = <0x0800>;
+               };
+
+               adc@3100 {
+                       compatible = "qcom,spmi-adc5";
+                       reg = <0x3100>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       #io-channel-cells = <1>;
+                       interrupts = <0x2 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
+
+                       ref-gnd@0 {
+                               reg = <ADC5_REF_GND>;
+                               qcom,pre-scaling = <1 1>;
+                               label = "ref_gnd";
+                       };
+
+                       vref-1p25@1 {
+                               reg = <ADC5_1P25VREF>;
+                               qcom,pre-scaling = <1 1>;
+                               label = "vref_1p25";
+                       };
+
+                       die-temp@6 {
+                               reg = <ADC5_DIE_TEMP>;
+                               qcom,pre-scaling = <1 1>;
+                               label = "die_temp";
+                       };
+
+                       chg-temp@9 {
+                               reg = <ADC5_CHG_TEMP>;
+                               qcom,pre-scaling = <1 1>;
+                               label = "chg_temp";
+                       };
+
+                       smb1390-therm@14 {
+                               reg = <ADC5_AMUX_THM2>;
+                               qcom,hw-settle-time = <200>;
+                               qcom,pre-scaling = <1 1>;

arch/arm64/boot/dts/qcom/pm8150b.dtsi line 66

Quoted 10 lines
arch/arm64/boot/dts/qcom/pm8150b.dtsi +10 -0
+                               label = "smb1390_therm";
+                       };
+
+                       smb1355-therm@78 {
+                               reg = <ADC5_AMUX_THM2_100K_PU>;
+                               qcom,ratiometric;
+                               qcom,hw-settle-time = <200>;
+                               qcom,pre-scaling = <1 1>;
+                               label = "smb1355_therm";
+                       };

Again, are these board level details? Maybe should be provided here with status = "disabled" and then added by the boards that use these ADCs.

Quoted 2 lines
arch/arm64/boot/dts/qcom/pm8150b.dtsi +1 -0
+               };
        };
author
#28 lore raw

Re: [PATCH 10/22] arm64: dts: qcom: pm8150b: Add pon and adc nodes

Quoted 9 lines · Stephen Boyd

Quoting Vinod Koul (2019-08-14 05:50:00)

Quoted 6 lines

Add the pon and adc nodes found in pm8150b PMIC.

---
 arch/arm64/boot/dts/qcom/pm8150b.dtsi | 54 +++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)

Squash?

Ok

Quoted 14 lines
Quoted 14 lines
arch/arm64/boot/dts/qcom/pm8150b.dtsi +1 -0
index c0a678b0f159..846197bd65cd 100644
@@ -2,6 +2,7 @@
 // Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
 // Copyright (c) 2019, Linaro Limited
 
+#include <dt-bindings/iio/qcom,spmi-vadc.h>
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/spmi/spmi.h>
 
Quoted 8 lines

arch/arm64/boot/dts/qcom/pm8150b.dtsi line 16

Quoted 6 lines
arch/arm64/boot/dts/qcom/pm8150b.dtsi +2 -0
@@ -11,6 +12,59 @@
                reg = <0x2 SPMI_USID>;
                #address-cells = <1>;
                #size-cells = <0>;
+
+               pon@800 {

Maybe pon node name should be 'key' or 'power-on'?

pon stands for power on device. See Documentation/devicetree/bindings/power/reset/qcom,pon.txt

Quoted 46 lines
Quoted 46 lines
arch/arm64/boot/dts/qcom/pm8150b.dtsi +45 -0
+                       compatible = "qcom,pm8916-pon";
+                       reg = <0x0800>;
+               };
+
+               adc@3100 {
+                       compatible = "qcom,spmi-adc5";
+                       reg = <0x3100>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       #io-channel-cells = <1>;
+                       interrupts = <0x2 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
+
+                       ref-gnd@0 {
+                               reg = <ADC5_REF_GND>;
+                               qcom,pre-scaling = <1 1>;
+                               label = "ref_gnd";
+                       };
+
+                       vref-1p25@1 {
+                               reg = <ADC5_1P25VREF>;
+                               qcom,pre-scaling = <1 1>;
+                               label = "vref_1p25";
+                       };
+
+                       die-temp@6 {
+                               reg = <ADC5_DIE_TEMP>;
+                               qcom,pre-scaling = <1 1>;
+                               label = "die_temp";
+                       };
+
+                       chg-temp@9 {
+                               reg = <ADC5_CHG_TEMP>;
+                               qcom,pre-scaling = <1 1>;
+                               label = "chg_temp";
+                       };
+
+                       smb1390-therm@14 {
+                               reg = <ADC5_AMUX_THM2>;
+                               qcom,hw-settle-time = <200>;
+                               qcom,pre-scaling = <1 1>;
+                               label = "smb1390_therm";
+                       };
+
+                       smb1355-therm@78 {
+                               reg = <ADC5_AMUX_THM2_100K_PU>;
Quoted 8 lines

arch/arm64/boot/dts/qcom/pm8150b.dtsi line 66

Quoted 5 lines
arch/arm64/boot/dts/qcom/pm8150b.dtsi +5 -0
+                               qcom,ratiometric;
+                               qcom,hw-settle-time = <200>;
+                               qcom,pre-scaling = <1 1>;
+                               label = "smb1355_therm";
+                       };

Again, are these board level details? Maybe should be provided here with status = "disabled" and then added by the boards that use these ADCs.

Sure I will update these

Signature · 1 line
~Vinod
#29 lore raw

Re: [PATCH 10/22] arm64: dts: qcom: pm8150b: Add pon and adc nodes

Quoting Vinod Koul (2019-08-19 10:43:31)

Quoted 24 lines · Stephen Boyd
Quoted 14 lines
Quoted 14 lines
arch/arm64/boot/dts/qcom/pm8150b.dtsi +1 -0
index c0a678b0f159..846197bd65cd 100644
@@ -2,6 +2,7 @@
 // Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
 // Copyright (c) 2019, Linaro Limited
 
+#include <dt-bindings/iio/qcom,spmi-vadc.h>
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/spmi/spmi.h>
 
Quoted 8 lines

arch/arm64/boot/dts/qcom/pm8150b.dtsi line 16

Quoted 6 lines
arch/arm64/boot/dts/qcom/pm8150b.dtsi +2 -0
@@ -11,6 +12,59 @@
                reg = <0x2 SPMI_USID>;
                #address-cells = <1>;
                #size-cells = <0>;
+
+               pon@800 {

Maybe pon node name should be 'key' or 'power-on'?

Quoted 2 lines

pon stands for power on device. See Documentation/devicetree/bindings/power/reset/qcom,pon.txt

Right. I was hoping for a more standard node name vs. an acronym that's SoC specific.

author
#30 lore raw

Re: [PATCH 10/22] arm64: dts: qcom: pm8150b: Add pon and adc nodes

Quoted 25 lines · Stephen Boyd

Quoting Vinod Koul (2019-08-19 10:43:31)

Quoted 24 lines · Stephen Boyd
Quoted 22 lines
Quoted 15 lines
arch/arm64/boot/dts/qcom/pm8150b.dtsi +1 -0
index c0a678b0f159..846197bd65cd 100644
@@ -2,6 +2,7 @@
 // Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
 // Copyright (c) 2019, Linaro Limited
 
+#include <dt-bindings/iio/qcom,spmi-vadc.h>
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/spmi/spmi.h>
 

arch/arm64/boot/dts/qcom/pm8150b.dtsi line 16

Quoted 5 lines
arch/arm64/boot/dts/qcom/pm8150b.dtsi +2 -0
@@ -11,6 +12,59 @@
                reg = <0x2 SPMI_USID>;
                #address-cells = <1>;
                #size-cells = <0>;
+
+               pon@800 {

Maybe pon node name should be 'key' or 'power-on'?

Quoted 4 lines
Quoted 1 line

pon stands for power on device. See Documentation/devicetree/bindings/power/reset/qcom,pon.txt

Right. I was hoping for a more standard node name vs. an acronym that's SoC specific.

Sure that sounds better to me, I will make it "power-on"

Signature · 1 line
~Vinod
#31 lore raw

Re: [PATCH 10/22] arm64: dts: qcom: pm8150b: Add pon and adc nodes

In reply to Vinod Koul
Quoted 51 lines · Vinod Koul

Add the pon and adc nodes found in pm8150b PMIC.

---
 arch/arm64/boot/dts/qcom/pm8150b.dtsi | 54 +++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)
arch/arm64/boot/dts/qcom/pm8150b.dtsi +29 -0
index c0a678b0f159..846197bd65cd 100644
@@ -2,6 +2,7 @@
 // Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
 // Copyright (c) 2019, Linaro Limited
 
+#include <dt-bindings/iio/qcom,spmi-vadc.h>
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/spmi/spmi.h>
 
@@ -11,6 +12,59 @@
 		reg = <0x2 SPMI_USID>;
 		#address-cells = <1>;
 		#size-cells = <0>;
+
+		pon@800 {
+			compatible = "qcom,pm8916-pon";
+			reg = <0x0800>;
+		};
+
+		adc@3100 {
+			compatible = "qcom,spmi-adc5";
+			reg = <0x3100>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			#io-channel-cells = <1>;
+			interrupts = <0x2 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
+
+			ref-gnd@0 {
+				reg = <ADC5_REF_GND>;
+				qcom,pre-scaling = <1 1>;
+				label = "ref_gnd";
+			};
+
+			vref-1p25@1 {
+				reg = <ADC5_1P25VREF>;
+				qcom,pre-scaling = <1 1>;
+				label = "vref_1p25";
+			};
+
+			die-temp@6 {
+				reg = <ADC5_DIE_TEMP>;

arch/arm64/boot/dts/qcom/pm8150b.dtsi line 52

Quoted 10 lines
arch/arm64/boot/dts/qcom/pm8150b.dtsi +10 -0
+				qcom,pre-scaling = <1 1>;
+				label = "die_temp";
+			};
+
+			chg-temp@9 {
+				reg = <ADC5_CHG_TEMP>;
+				qcom,pre-scaling = <1 1>;
+				label = "chg_temp";
+			};
+

I believe the above items are internal, so it makes sense to keep them here, the below amux ones relates to board configuration so I think those should go in the board file.

Regards,
Bjorn

Quoted 21 lines
arch/arm64/boot/dts/qcom/pm8150b.dtsi +15 -0
+			smb1390-therm@14 {
+				reg = <ADC5_AMUX_THM2>;
+				qcom,hw-settle-time = <200>;
+				qcom,pre-scaling = <1 1>;
+				label = "smb1390_therm";
+			};
+
+			smb1355-therm@78 {
+				reg = <ADC5_AMUX_THM2_100K_PU>;
+				qcom,ratiometric;
+				qcom,hw-settle-time = <200>;
+				qcom,pre-scaling = <1 1>;
+				label = "smb1355_therm";
+			};
+		};
 	};
 
 	qcom,pm8150@3 {
Signature · 1 line
2.20.1
author
#32 lore raw

PATCH 11/22 arm64: dts: qcom: pm8150b: Add gpio node

In reply to Vinod Koul

Add the gpio node found in pm8150b PMIC.

---
 arch/arm64/boot/dts/qcom/pm8150b.dtsi | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
arch/arm64/boot/dts/qcom/pm8150b.dtsi +19 -0
index 846197bd65cd..2bb2384461f7 100644
@@ -65,6 +65,25 @@
 				label = "smb1355_therm";
 			};
 		};
+
+		pm8150b_gpios: gpio@c000 {
+			compatible = "qcom,pm8150b-gpio";
+			reg = <0xc000>;
+			gpio-controller;
+			#gpio-cells = <2>;
+			interrupts = <0x2 0xc0 0 IRQ_TYPE_NONE>,
+				     <0x2 0xc1 0 IRQ_TYPE_NONE>,
+				     <0x2 0xc2 0 IRQ_TYPE_NONE>,
+				     <0x2 0xc3 0 IRQ_TYPE_NONE>,
+				     <0x2 0xc4 0 IRQ_TYPE_NONE>,
+				     <0x2 0xc5 0 IRQ_TYPE_NONE>,
+				     <0x2 0xc6 0 IRQ_TYPE_NONE>,
+				     <0x2 0xc7 0 IRQ_TYPE_NONE>,
+				     <0x2 0xc8 0 IRQ_TYPE_NONE>,
+				     <0x2 0xc9 0 IRQ_TYPE_NONE>,
+				     <0x2 0xca 0 IRQ_TYPE_NONE>,
+				     <0x2 0xcb 0 IRQ_TYPE_NONE>;
+		};
 	};
 
 	qcom,pm8150@3 {
Signature · 1 line
2.20.1
#33 lore raw

Re: [PATCH 11/22] arm64: dts: qcom: pm8150b: Add gpio node

Quoting Vinod Koul (2019-08-14 05:50:01)

Quoted 6 lines

Add the gpio node found in pm8150b PMIC.

---
 arch/arm64/boot/dts/qcom/pm8150b.dtsi | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

Squash it?

author
#34 lore raw

PATCH 12/22 arm64: dts: qcom: pm8150l: Add Base DTS file

In reply to Vinod Koul

PMIC pm8150l is a slave pmic and this adds base DTS file for pm8150l

---
 arch/arm64/boot/dts/qcom/pm8150l.dtsi | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/pm8150l.dtsi
arch/arm64/boot/dts/qcom/pm8150l.dtsi new file +22 -0
new file mode 100644
index 000000000000..e61ae6c6dab5
@@ -0,0 +1,22 @@
+// SPDX-License-Identifier: BSD-3-Clause
+// Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
+// Copyright (c) 2019, Linaro Limited
+
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/spmi/spmi.h>
+
+&spmi_bus {
+	qcom,pm8150@4 {
+		compatible = "qcom,spmi-pmic";
+		reg = <0x4 SPMI_USID>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+	};
+
+	qcom,pm8150@5 {
+		compatible ="qcom,spmi-pmic";
+		reg = <0x5 SPMI_USID>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+	};
+};
Signature · 1 line
2.20.1
#35 lore raw

Re: [PATCH 12/22] arm64: dts: qcom: pm8150l: Add Base DTS file

Quoting Vinod Koul (2019-08-14 05:50:02)

Quoted 14 lines

PMIC pm8150l is a slave pmic and this adds base DTS file for pm8150l

---
 arch/arm64/boot/dts/qcom/pm8150l.dtsi | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/pm8150l.dtsi
arch/arm64/boot/dts/qcom/pm8150l.dtsi new file +0 -0
new file mode 100644
index 000000000000..e61ae6c6dab5

arch/arm64/boot/dts/qcom/pm8150l.dtsi line 9

Quoted 9 lines
arch/arm64/boot/dts/qcom/pm8150l.dtsi new file +9 -0
@@ -0,0 +1,22 @@
+// SPDX-License-Identifier: BSD-3-Clause
+// Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
+// Copyright (c) 2019, Linaro Limited
+
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/spmi/spmi.h>
+
+&spmi_bus {
+       qcom,pm8150@4 {

pmic

arch/arm64/boot/dts/qcom/pm8150l.dtsi line 10

Quoted 1 line
arch/arm64/boot/dts/qcom/pm8150l.dtsi new file +1 -0
+               compatible = "qcom,spmi-pmic";

Update compatible string too.

Quoted 12 lines
arch/arm64/boot/dts/qcom/pm8150l.dtsi new file +12 -0
+               reg = <0x4 SPMI_USID>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+       };
+
+       qcom,pm8150@5 {
+               compatible ="qcom,spmi-pmic";
+               reg = <0x5 SPMI_USID>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+       };
+};
author
#36 lore raw

PATCH 13/22 arm64: dts: qcom: pm8150l: Add pon and adc nodes

In reply to Vinod Koul

Add the pon and adc nodes found in pm8150l PMIC.

---
 arch/arm64/boot/dts/qcom/pm8150l.dtsi | 33 +++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)
arch/arm64/boot/dts/qcom/pm8150l.dtsi +33 -0
index e61ae6c6dab5..d685dac426a3 100644
@@ -2,6 +2,7 @@
 // Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
 // Copyright (c) 2019, Linaro Limited
 
+#include <dt-bindings/iio/qcom,spmi-vadc.h>
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/spmi/spmi.h>
 
@@ -11,6 +12,38 @@
 		reg = <0x4 SPMI_USID>;
 		#address-cells = <1>;
 		#size-cells = <0>;
+
+		pon@800 {
+			compatible = "qcom,pm8916-pon";
+			reg = <0x0800>;
+		};
+
+		adc@3100 {
+			compatible = "qcom,spmi-adc5";
+			reg = <0x3100>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			#io-channel-cells = <1>;
+			interrupts = <0x4 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
+
+			ref-gnd@0 {
+				reg = <ADC5_REF_GND>;
+				qcom,pre-scaling = <1 1>;
+				label = "ref_gnd";
+			};
+
+			vref-1p25@1 {
+				reg = <ADC5_1P25VREF>;
+				qcom,pre-scaling = <1 1>;
+				label = "vref_1p25";
+			};
+
+			die-temp@6 {
+				reg = <ADC5_DIE_TEMP>;
+				qcom,pre-scaling = <1 1>;
+				label = "die_temp";
+			};
+		};
 	};
 
 	qcom,pm8150@5 {
Signature · 1 line
2.20.1
#37 lore raw

Re: [PATCH 13/22] arm64: dts: qcom: pm8150l: Add pon and adc nodes

Quoting Vinod Koul (2019-08-14 05:50:03)

Quoted 6 lines

Add the pon and adc nodes found in pm8150l PMIC.

---
 arch/arm64/boot/dts/qcom/pm8150l.dtsi | 33 +++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

Wow it's all the same! :)

author
#38 lore raw

PATCH 14/22 arm64: dts: qcom: pm8150l: Add gpio node

In reply to Vinod Koul

Add the gpio node found in pm8150l PMIC.

---
 arch/arm64/boot/dts/qcom/pm8150l.dtsi | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
arch/arm64/boot/dts/qcom/pm8150l.dtsi +19 -0
index d685dac426a3..dce72bff0e7a 100644
@@ -44,6 +44,25 @@
 				label = "die_temp";
 			};
 		};
+
+		pm8150l_gpios: gpio@c000 {
+			compatible = "qcom,pm8150l-gpio";
+			reg = <0xc000>;
+			gpio-controller;
+			#gpio-cells = <2>;
+			interrupts = <0x4 0xc0 0 IRQ_TYPE_NONE>,
+				     <0x4 0xc1 0 IRQ_TYPE_NONE>,
+				     <0x4 0xc2 0 IRQ_TYPE_NONE>,
+				     <0x4 0xc3 0 IRQ_TYPE_NONE>,
+				     <0x4 0xc4 0 IRQ_TYPE_NONE>,
+				     <0x4 0xc5 0 IRQ_TYPE_NONE>,
+				     <0x4 0xc6 0 IRQ_TYPE_NONE>,
+				     <0x4 0xc7 0 IRQ_TYPE_NONE>,
+				     <0x4 0xc8 0 IRQ_TYPE_NONE>,
+				     <0x4 0xc9 0 IRQ_TYPE_NONE>,
+				     <0x4 0xca 0 IRQ_TYPE_NONE>,
+				     <0x4 0xcb 0 IRQ_TYPE_NONE>;
+		};
 	};
 
 	qcom,pm8150@5 {
Signature · 1 line
2.20.1
author
#39 lore raw

PATCH 15/22 arm64: dts: qcom: sm8150-mtp: Include pmics

In reply to Vinod Koul

sm8150-mtp uses pm8150, pm8150b and pm8150l pmics, so include the files

---
 arch/arm64/boot/dts/qcom/sm8150-mtp.dts | 3 +++
 1 file changed, 3 insertions(+)
arch/arm64/boot/dts/qcom/sm8150-mtp.dts +3 -0
index 8700f015c074..43ba14cc0b00 100644
@@ -5,6 +5,9 @@
 /dts-v1/;
 
 #include "sm8150.dtsi"
+#include "pm8150.dtsi"
+#include "pm8150b.dtsi"
+#include "pm8150l.dtsi"
 
 / {
 	model = "Qualcomm Technologies, Inc. SM8150 MTP";
Signature · 1 line
2.20.1
author
#40 lore raw

PATCH 16/22 arm64: dts: qcom: sm8150-mtp: Add resin node

In reply to Vinod Koul

The sm8150-mtp board has a reset button which also works as a volume down key. Add the node for resin device to handle the resin and volume down key

---
 arch/arm64/boot/dts/qcom/sm8150-mtp.dts | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm64/boot/dts/qcom/sm8150-mtp.dts +9 -0
index 43ba14cc0b00..a42f1c154600 100644
@@ -26,6 +26,15 @@
 	status = "okay";
 };
 
+&pon {
+	resin {
+		compatible = "qcom,pm8941-resin";
+		interrupts = <0x0 0x8 1 IRQ_TYPE_EDGE_BOTH>;
+		debounce = <15625>;
+		bias-pull-up;
+		linux,code = <KEY_VOLUMEDOWN>;
+	};
+};
 &tlmm {
 	gpio-reserved-ranges = <0 4>, <126 4>;
 };
Signature · 1 line
2.20.1
author
#41 lore raw

PATCH 17/22 arm64: dts: qcom: sm8150: Add apss_shared and apps_rsc nodes

In reply to Vinod Koul

Add apss_shared and apps_rsc node including the rpmhcc child node

---
 arch/arm64/boot/dts/qcom/sm8150.dtsi | 30 ++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)
arch/arm64/boot/dts/qcom/sm8150.dtsi +30 -0
index 5c6b103b042b..5258b79676f6 100644
@@ -4,6 +4,7 @@
 
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include <dt-bindings/clock/qcom,gcc-sm8150.h>
+#include <dt-bindings/soc/qcom,rpmh-rsc.h>
 
 / {
 	interrupt-parent = <&intc>;
@@ -213,6 +214,12 @@
 			interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;
 		};
 
+		apss_shared: mailbox@17c00000 {
+			compatible = "qcom,sm8150-apss-shared";
+			reg = <0x17c00000 0x1000>;
+			#mbox-cells = <1>;
+		};
+
 		timer@17c20000 {
 			#address-cells = <1>;
 			#size-cells = <1>;
@@ -272,6 +279,29 @@
 			};
 		};
 
+		apps_rsc: rsc@18200000 {
+			label = "apps_rsc";
+			compatible = "qcom,rpmh-rsc";
+			reg = <0x18200000 0x10000>,
+			      <0x18210000 0x10000>,
+			      <0x18220000 0x10000>;
+			reg-names = "drv-0", "drv-1", "drv-2";
+			interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>;
+			qcom,tcs-offset = <0xd00>;
+			qcom,drv-id = <2>;
+			qcom,tcs-config = <ACTIVE_TCS  2>,
+					  <SLEEP_TCS   1>,
+					  <WAKE_TCS    1>,
+					  <CONTROL_TCS 0>;
+
+			rpmhcc: clock-controller {
+				compatible = "qcom,sm8150-rpmh-clk";
+				#clock-cells = <1>;
+			};
+		};
+
 		spmi_bus: spmi@c440000 {
 			compatible = "qcom,spmi-pmic-arb";
 			reg = <0x0c440000 0x0001100>,
Signature · 1 line
2.20.1
#42 lore raw

Re: [PATCH 17/22] arm64: dts: qcom: sm8150: Add apss_shared and apps_rsc nodes

Quoting Vinod Koul (2019-08-14 05:50:07)

Quoted 4 lines

Add apss_shared and apps_rsc node including the rpmhcc child node

---

Can't this be squashed with the original dtsi file?

arch/arm64/boot/dts/qcom/sm8150.dtsi line 7

Quoted 12 lines
 arch/arm64/boot/dts/qcom/sm8150.dtsi | 30 ++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)
arch/arm64/boot/dts/qcom/sm8150.dtsi +1 -0
index 5c6b103b042b..5258b79676f6 100644
@@ -4,6 +4,7 @@
 
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include <dt-bindings/clock/qcom,gcc-sm8150.h>
+#include <dt-bindings/soc/qcom,rpmh-rsc.h>

But not the rpmh clk bindings?

Quoted 14 lines
arch/arm64/boot/dts/qcom/sm8150.dtsi +10 -0
@@ -272,6 +279,29 @@
                        };
                };
 
+               apps_rsc: rsc@18200000 {
+                       label = "apps_rsc";
+                       compatible = "qcom,rpmh-rsc";
+                       reg = <0x18200000 0x10000>,
+                             <0x18210000 0x10000>,
+                             <0x18220000 0x10000>;
+                       reg-names = "drv-0", "drv-1", "drv-2";
+                       interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>;

arch/arm64/boot/dts/qcom/sm8150.dtsi line 301

Quoted 10 lines
arch/arm64/boot/dts/qcom/sm8150.dtsi +10 -0
+                       qcom,tcs-offset = <0xd00>;
+                       qcom,drv-id = <2>;
+                       qcom,tcs-config = <ACTIVE_TCS  2>,
+                                         <SLEEP_TCS   1>,
+                                         <WAKE_TCS    1>,
+                                         <CONTROL_TCS 0>;
+
+                       rpmhcc: clock-controller {
+                               compatible = "qcom,sm8150-rpmh-clk";
+                               #clock-cells = <1>;

Should take some sort of clocks property to get the board clock for XO?

Quoted 3 lines
arch/arm64/boot/dts/qcom/sm8150.dtsi +3 -0
+                       };
+               };
+
author
#43 lore raw

Re: [PATCH 17/22] arm64: dts: qcom: sm8150: Add apss_shared and apps_rsc nodes

Quoted 7 lines · Stephen Boyd

Quoting Vinod Koul (2019-08-14 05:50:07)

Quoted 4 lines

Add apss_shared and apps_rsc node including the rpmhcc child node

---

Can't this be squashed with the original dtsi file?

That makes it a huge blob, imo hard to review. I will still go ahead and squash things in v2, but will still keep logical chunks.. (this can go in original though)

Quoted 10 lines
Quoted 10 lines
 arch/arm64/boot/dts/qcom/sm8150.dtsi | 30 ++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)
arch/arm64/boot/dts/qcom/sm8150.dtsi +0 -0
index 5c6b103b042b..5258b79676f6 100644
@@ -4,6 +4,7 @@
 
Quoted 5 lines

arch/arm64/boot/dts/qcom/sm8150.dtsi line 7

Quoted 3 lines
arch/arm64/boot/dts/qcom/sm8150.dtsi +1 -0
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include <dt-bindings/clock/qcom,gcc-sm8150.h>
+#include <dt-bindings/soc/qcom,rpmh-rsc.h>

But not the rpmh clk bindings?

Thats missing will add

Quoted 19 lines
Quoted 19 lines
arch/arm64/boot/dts/qcom/sm8150.dtsi +14 -0
@@ -272,6 +279,29 @@
                        };
                };
 
+               apps_rsc: rsc@18200000 {
+                       label = "apps_rsc";
+                       compatible = "qcom,rpmh-rsc";
+                       reg = <0x18200000 0x10000>,
+                             <0x18210000 0x10000>,
+                             <0x18220000 0x10000>;
+                       reg-names = "drv-0", "drv-1", "drv-2";
+                       interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>;
+                       qcom,tcs-offset = <0xd00>;
+                       qcom,drv-id = <2>;
+                       qcom,tcs-config = <ACTIVE_TCS  2>,
+                                         <SLEEP_TCS   1>,
Quoted 8 lines

arch/arm64/boot/dts/qcom/sm8150.dtsi line 301

Quoted 6 lines
arch/arm64/boot/dts/qcom/sm8150.dtsi +6 -0
+                                         <WAKE_TCS    1>,
+                                         <CONTROL_TCS 0>;
+
+                       rpmhcc: clock-controller {
+                               compatible = "qcom,sm8150-rpmh-clk";
+                               #clock-cells = <1>;

Should take some sort of clocks property to get the board clock for XO?

Yes after conversion, I have updated this now

Signature · 1 line
~Vinod
author
#44 lore raw

PATCH 18/22 arm64: dts: qcom: sm8150: Add reserved-memory regions

In reply to Vinod Koul

Add the reserved memory regions in SM8150

---
 arch/arm64/boot/dts/qcom/sm8150.dtsi | 111 +++++++++++++++++++++++++++
 1 file changed, 111 insertions(+)
arch/arm64/boot/dts/qcom/sm8150.dtsi +111 -0
index 5258b79676f6..7111e1f092f4 100644
@@ -153,6 +153,117 @@
 		method = "smc";
 	};
 
+	reserved_memory: reserved-memory {
+		#address-cells = <2>;
+		#size-cells = <2>;
+		ranges;
+
+		hyp_mem: memory@85700000 {
+			reg = <0x0 0x85700000 0x0 0x600000>;
+			no-map;
+		};
+
+		xbl_mem: memory@85d00000 {
+			reg = <0x0 0x85d00000 0x0 0x140000>;
+			no-map;
+		};
+
+		aop_mem: memory@85f00000 {
+			reg = <0x0 0x85f00000 0x0 0x20000>;
+			no-map;
+		};
+
+		aop_cmd_db: memory@85f20000 {
+			compatible = "qcom,cmd-db";
+			reg = <0x0 0x85f20000 0x0 0x20000>;
+			no-map;
+		};
+
+		smem_mem: memory@86000000 {
+			reg = <0x0 0x86000000 0x0 0x200000>;
+			no-map;
+		};
+
+		tz_mem: memory@86200000 {
+			reg = <0x0 0x86200000 0x0 0x3900000>;
+			no-map;
+		};
+
+		rmtfs_mem: memory@89b00000 {
+			compatible = "qcom,rmtfs-mem";
+			reg = <0x0 0x89b00000 0x0 0x200000>;
+			no-map;
+
+			qcom,client-id = <1>;
+			qcom,vmid = <15>;
+		};
+
+		camera_mem: memory@8b700000 {
+			reg = <0x0 0x8b700000 0x0 0x500000>;
+			no-map;
+		};
+
+		wlan_mem: memory@8bc00000 {
+			reg = <0x0 0x8bc00000 0x0 0x180000>;
+			no-map;
+		};
+
+		npu_mem: memory@8bd80000 {
+			reg = <0x0 0x8bd80000 0x0 0x80000>;
+			no-map;
+		};
+
+		adsp_mem: memory@8be00000 {
+			reg = <0x0 0x8be00000 0x0 0x1a00000>;
+			no-map;
+		};
+
+		mpss_mem: memory@8d800000 {
+			reg = <0x0 0x8d800000 0x0 0x9600000>;
+			no-map;
+		};
+
+		venus_mem: memory@96e00000 {
+			reg = <0x0 0x96e00000 0x0 0x500000>;
+			no-map;
+		};
+
+		slpi_mem: memory@97300000 {
+			reg = <0x0 0x97300000 0x0 0x1400000>;
+			no-map;
+		};
+
+		ipa_fw_mem: memory@98700000 {
+			reg = <0x0 0x98700000 0x0 0x10000>;
+			no-map;
+		};
+
+		ipa_gsi_mem: memory@98710000 {
+			reg = <0x0 0x98710000 0x0 0x5000>;
+			no-map;
+		};
+
+		gpu_mem: memory@98715000 {
+			reg = <0x0 0x98715000 0x0 0x2000>;
+			no-map;
+		};
+
+		spss_mem: memory@98800000 {
+			reg = <0x0 0x98800000 0x0 0x100000>;
+			no-map;
+		};
+
+		cdsp_mem: memory@98900000 {
+			reg = <0x0 0x98900000 0x0 0x1400000>;
+			no-map;
+		};
+
+		qseecom_mem: memory@9e400000 {
+			reg = <0 0x9e400000 0 0x1400000>;
+			no-map;
+		};
+	};
+
 	soc: soc@0 {
 		#address-cells = <1>;
 		#size-cells = <1>;
Signature · 1 line
2.20.1
#45 lore raw

Re: [PATCH 18/22] arm64: dts: qcom: sm8150: Add reserved-memory regions

Quoting Vinod Koul (2019-08-14 05:50:08)

arch/arm64/boot/dts/qcom/sm8150.dtsi line 156

Quoted 9 lines
arch/arm64/boot/dts/qcom/sm8150.dtsi +1 -0
index 5258b79676f6..7111e1f092f4 100644
@@ -153,6 +153,117 @@
                method = "smc";
        };
 
+       reserved_memory: reserved-memory {

Does this need a label?

Quoted 7 lines
arch/arm64/boot/dts/qcom/sm8150.dtsi +7 -0
+               #address-cells = <2>;
+               #size-cells = <2>;
+               ranges;
+
+               hyp_mem: memory@85700000 {
+                       reg = <0x0 0x85700000 0x0 0x600000>;
+                       no-map;
author
#46 lore raw

Re: [PATCH 18/22] arm64: dts: qcom: sm8150: Add reserved-memory regions

Quoted 9 lines · Stephen Boyd

Quoting Vinod Koul (2019-08-14 05:50:08)

Quoted 8 lines
arch/arm64/boot/dts/qcom/sm8150.dtsi +0 -0
index 5258b79676f6..7111e1f092f4 100644
@@ -153,6 +153,117 @@
                method = "smc";
        };
 
Quoted 3 lines

arch/arm64/boot/dts/qcom/sm8150.dtsi line 156

Quoted 1 line
arch/arm64/boot/dts/qcom/sm8150.dtsi +1 -0
+       reserved_memory: reserved-memory {

Does this need a label?

will remove

Quoted 8 lines
Quoted 8 lines
arch/arm64/boot/dts/qcom/sm8150.dtsi +7 -0
+               #address-cells = <2>;
+               #size-cells = <2>;
+               ranges;
+
+               hyp_mem: memory@85700000 {
+                       reg = <0x0 0x85700000 0x0 0x600000>;
+                       no-map;
Signature · 1 line
~Vinod
author
#47 lore raw

PATCH 19/22 arm64: dts: qcom: sm8150-mtp: Add regulators

In reply to Vinod Koul

Add the regulators found in the mtp platform. This platform consists of pmic PM8150, PM8150L and PM8009.

---
 arch/arm64/boot/dts/qcom/sm8150-mtp.dts | 327 ++++++++++++++++++++++++
 1 file changed, 327 insertions(+)
arch/arm64/boot/dts/qcom/sm8150-mtp.dts +327 -0
index a42f1c154600..1d08a6daa006 100644
@@ -4,6 +4,7 @@
 
 /dts-v1/;
 
+#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
 #include "sm8150.dtsi"
 #include "pm8150.dtsi"
 #include "pm8150b.dtsi"
@@ -20,6 +21,332 @@
 	chosen {
 		stdout-path = "serial0:115200n8";
 	};
+
+	vph_pwr: vph-pwr-regulator {
+		compatible = "regulator-fixed";
+		regulator-name = "vph_pwr";
+		regulator-min-microvolt = <3700000>;
+		regulator-max-microvolt = <3700000>;
+	};
+
+	/*
+	 * Apparently RPMh does not provide support for PM8150 S4 because it
+	 * is always-on; model it as a fixed regulator.
+	 */
+	vreg_s4a_1p8: pm8150-s4 {
+		compatible = "regulator-fixed";
+		regulator-name = "vreg_s4a_1p8";
+
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <1800000>;
+
+		regulator-always-on;
+		regulator-boot-on;
+
+		vin-supply = <&vph_pwr>;
+	};
+};
+
+&apps_rsc {
+	pm8150-rpmh-regulators {
+		compatible = "qcom,pm8150-rpmh-regulators";
+		qcom,pmic-id = "a";
+
+		vdd-s1-supply = <&vph_pwr>;
+		vdd-s2-supply = <&vph_pwr>;
+		vdd-s3-supply = <&vph_pwr>;
+		vdd-s4-supply = <&vph_pwr>;
+		vdd-s5-supply = <&vph_pwr>;
+		vdd-s6-supply = <&vph_pwr>;
+		vdd-s7-supply = <&vph_pwr>;
+		vdd-s8-supply = <&vph_pwr>;
+		vdd-s9-supply = <&vph_pwr>;
+		vdd-s10-supply = <&vph_pwr>;
+
+		vdd-l1-l8-l11-supply = <&vreg_s6a_0p9>;
+		vdd-l2-l10-supply = <&vreg_bob>;
+		vdd-l3-l4-l5-l18-supply = <&vreg_s6a_0p9>;
+		vdd-l6-l9-supply = <&vreg_s8c_1p3>;
+		vdd-l7-l12-l14-l15-supply = <&vreg_s5a_2p0>;
+		vdd-l13-l16-l17-supply = <&vreg_bob>;
+
+		vreg_s5a_2p0: smps5 {
+			regulator-min-microvolt = <1904000>;
+			regulator-max-microvolt = <2000000>;
+		};
+
+		vreg_s6a_0p9: smps6 {
+			regulator-min-microvolt = <920000>;
+			regulator-max-microvolt = <1128000>;
+		};
+
+		vdda_wcss_pll:
+		vreg_l1a_0p75: ldo1 {
+			regulator-min-microvolt = <752000>;
+			regulator-max-microvolt = <752000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vdd_pdphy:
+		vdda_usb_hs_3p1:
+		vreg_l2a_3p1: ldo2 {
+			regulator-min-microvolt = <3072000>;
+			regulator-max-microvolt = <3072000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l3a_0p8: ldo3 {
+			regulator-min-microvolt = <480000>;
+			regulator-max-microvolt = <932000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vdd_usb_hs_core:
+		vdda_csi_0_0p9:
+		vdda_csi_1_0p9:
+		vdda_csi_2_0p9:
+		vdda_csi_3_0p9:
+		vdda_dsi_0_0p9:
+		vdda_dsi_1_0p9:
+		vdda_dsi_0_pll_0p9:
+		vdda_dsi_1_pll_0p9:
+		vdda_pcie_1ln_core:
+		vdda_pcie_2ln_core:
+		vdda_pll_hv_cc_ebi01:
+		vdda_pll_hv_cc_ebi23:
+		vdda_qrefs_0p875_5:
+		vdda_sp_sensor:
+		vdda_ufs_2ln_core_1:
+		vdda_ufs_2ln_core_2:
+		vdda_usb_ss_dp_core_1:
+		vdda_usb_ss_dp_core_2:
+		vdda_qlink_lv:
+		vdda_qlink_lv_ck:
+		vreg_l5a_0p875: ldo5 {
+			regulator-min-microvolt = <880000>;
+			regulator-max-microvolt = <880000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l6a_1p2: ldo6 {
+			regulator-min-microvolt = <1200000>;
+			regulator-max-microvolt = <1200000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l7a_1p8: ldo7 {
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <1800000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vddpx_10:
+		vreg_l9a_1p2: ldo9 {
+			regulator-min-microvolt = <1200000>;
+			regulator-max-microvolt = <1200000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+
+		vreg_l10a_2p5: ldo10 {
+			regulator-min-microvolt = <2504000>;
+			regulator-max-microvolt = <2960000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l11a_0p8: ldo11 {
+			regulator-min-microvolt = <800000>;
+			regulator-max-microvolt = <800000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vdd_qfprom:
+		vdd_qfprom_sp:
+		vdda_apc_cs_1p8:
+		vdda_gfx_cs_1p8:
+		vdda_usb_hs_1p8:
+		vdda_qrefs_vref_1p8:
+		vddpx_10_a:
+		vreg_l12a_1p8: ldo12 {
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <1800000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l13a_2p7: ldo13 {
+			regulator-min-microvolt = <2704000>;
+			regulator-max-microvolt = <2704000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l14a_1p8: ldo14 {
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <1880000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l15a_1p7: ldo15 {
+			regulator-min-microvolt = <1704000>;
+			regulator-max-microvolt = <1704000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l16a_2p7: ldo16 {
+			regulator-min-microvolt = <2704000>;
+			regulator-max-microvolt = <2960000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l17a_3p0: ldo17 {
+			regulator-min-microvolt = <2856000>;
+			regulator-max-microvolt = <3008000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+	};
+
+	pm8150l-rpmh-regulators {
+		compatible = "qcom,pm8150l-rpmh-regulators";
+		qcom,pmic-id = "c";
+
+		vdd-s1-supply = <&vph_pwr>;
+		vdd-s2-supply = <&vph_pwr>;
+		vdd-s3-supply = <&vph_pwr>;
+		vdd-s4-supply = <&vph_pwr>;
+		vdd-s5-supply = <&vph_pwr>;
+		vdd-s6-supply = <&vph_pwr>;
+		vdd-s7-supply = <&vph_pwr>;
+		vdd-s8-supply = <&vph_pwr>;
+
+		vdd-l1-l8-supply = <&vreg_s4a_1p8>;
+		vdd-l2-l3-supply = <&vreg_s8c_1p3>;
+		vdd-l4-l5-l6-supply = <&vreg_bob>;
+		vdd-l7-l11-supply = <&vreg_bob>;
+		vdd-l9-l10-supply = <&vreg_bob>;
+
+		vdd-bob-supply = <&vph_pwr>;
+		vdd-flash-supply = <&vreg_bob>;
+		vdd-rgb-supply = <&vreg_bob>;
+
+		vreg_bob: bob {
+			regulator-min-microvolt = <3008000>;
+			regulator-max-microvolt = <4000000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>;
+			regulator-allow-bypass;
+		};
+
+		vreg_s8c_1p3: smps8 {
+			regulator-min-microvolt = <1352000>;
+			regulator-max-microvolt = <1352000>;
+		};
+
+		vreg_l1c_1p8: ldo1 {
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <1800000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vdda_wcss_adcdac_1:
+		vdda_wcss_adcdac_22:
+		vreg_l2c_1p3: ldo2 {
+			regulator-min-microvolt = <1304000>;
+			regulator-max-microvolt = <1304000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vdda_hv_ebi0:
+		vdda_hv_ebi1:
+		vdda_hv_ebi2:
+		vdda_hv_ebi3:
+		vdda_hv_refgen0:
+		vdda_qlink_hv_ck:
+		vreg_l3c_1p2: ldo3 {
+			regulator-min-microvolt = <1200000>;
+			regulator-max-microvolt = <1200000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vddpx_5:
+		vreg_l4c_1p8: ldo4 {
+			regulator-min-microvolt = <1704000>;
+			regulator-max-microvolt = <2928000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vddpx_6:
+		vreg_l5c_1p8: ldo5 {
+			regulator-min-microvolt = <1704000>;
+			regulator-max-microvolt = <2928000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vddpx_2:
+		vreg_l6c_2p9: ldo6 {
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <2960000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l7c_3p0: ldo7 {
+			regulator-min-microvolt = <2856000>;
+			regulator-max-microvolt = <3104000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l8c_1p8: ldo8 {
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <1800000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l9c_2p9: ldo9 {
+			regulator-min-microvolt = <2704000>;
+			regulator-max-microvolt = <2960000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+
+		vreg_l10c_3p3: ldo10 {
+			regulator-min-microvolt = <3000000>;
+			regulator-max-microvolt = <3312000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l11c_3p3: ldo11 {
+			regulator-min-microvolt = <3000000>;
+			regulator-max-microvolt = <3312000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+	};
+
+	pm8009-rpmh-regulators {
+		compatible = "qcom,pm8009-rpmh-regulators";
+		qcom,pmic-id = "f";
+
+		vdd-s1-supply = <&vph_pwr>;
+		vdd-s2-supply = <&vreg_bob>;
+
+		vdd-l2-supply = <&vreg_s8c_1p3>;
+		vdd-l5-l6-supply = <&vreg_bob>;
+
+		vreg_l2f_1p2: ldo2 {
+			regulator-min-microvolt = <1200000>;
+			regulator-max-microvolt = <1200000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l5f_2p85: ldo5 {
+			regulator-min-microvolt = <2800000>;
+			regulator-max-microvolt = <2800000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l6f_2p85: ldo6 {
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+			regulator-min-microvolt = <2856000>;
+			regulator-max-microvolt = <2856000>;
+		};
+	};
+
 };
 
 &qupv3_id_1 {
Signature · 1 line
2.20.1
author
#48 lore raw

PATCH 20/22 arm64: dts: qcom: sm8150: Add pmu node to SM8150 SoC

In reply to Vinod Koul

From: Sibi Sankar <[email protected]>

Add the CPU PMU on SM8150 to get perf support for hardware events.

---
 arch/arm64/boot/dts/qcom/sm8150.dtsi | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm64/boot/dts/qcom/sm8150.dtsi +5 -0
index 7111e1f092f4..19be87dc893f 100644
@@ -148,6 +148,11 @@
 		reg = <0 0x80000000 0 0>;
 	};
 
+	pmu {
+		compatible = "arm,armv8-pmuv3";
+		interrupts = <GIC_PPI 5 IRQ_TYPE_LEVEL_HIGH>;
+	};
+
 	psci {
 		compatible = "arm,psci-1.0";
 		method = "smc";
Signature · 1 line
2.20.1
author
#50 lore raw

PATCH 21/22 arm64: dts: qcom: sm8150: Add SMEM nodes

In reply to Vinod Koul

From: Sibi Sankar <[email protected]>

Add the necessary dt nodes to support SMEM on SM8150 SoC.

---
 arch/arm64/boot/dts/qcom/sm8150.dtsi | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
arch/arm64/boot/dts/qcom/sm8150.dtsi +17 -0
index 19be87dc893f..5df3f335272a 100644
@@ -142,6 +142,12 @@
 		};
 	};
 
+	tcsr_mutex: hwlock {
+		compatible = "qcom,tcsr-mutex";
+		syscon = <&tcsr_mutex_regs 0 0x1000>;
+		#hwlock-cells = <1>;
+	};
+
 	memory@80000000 {
 		device_type = "memory";
 		/* We expect the bootloader to fill in the size */
@@ -269,6 +275,12 @@
 		};
 	};
 
+	smem {
+		compatible = "qcom,smem";
+		memory-region = <&smem_mem>;
+		hwlocks = <&tcsr_mutex 3>;
+	};
+
 	soc: soc@0 {
 		#address-cells = <1>;
 		#size-cells = <1>;
@@ -306,6 +318,11 @@
 			};
 		};
 
+		tcsr_mutex_regs: syscon@1f40000 {
+			compatible = "syscon";
+			reg = <0x01f40000 0x40000>;
+		};
+
 		tlmm: pinctrl@3100000 {
 			compatible = "qcom,sm8150-pinctrl";
 			reg = <0x03100000 0x300000>,
Signature · 1 line
2.20.1
author
#52 lore raw

PATCH 22/22 arm64: dts: qcom: sm8150: Add APSS shared mailbox

In reply to Vinod Koul

From: Sibi Sankar <[email protected]>

Add APSS shared mailbox support to SM8150 SoC.

---
 arch/arm64/boot/dts/qcom/sm8150.dtsi | 11 +++++++++++
 1 file changed, 11 insertions(+)
arch/arm64/boot/dts/qcom/sm8150.dtsi +11 -0
index 5df3f335272a..88cbab4a9297 100644
@@ -5,6 +5,7 @@
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include <dt-bindings/clock/qcom,gcc-sm8150.h>
 #include <dt-bindings/soc/qcom,rpmh-rsc.h>
+#include <dt-bindings/clock/qcom,rpmh.h>
 
 / {
 	interrupt-parent = <&intc>;
@@ -338,6 +339,16 @@
 			#interrupt-cells = <2>;
 		};
 
+		aoss_qmp: qmp@c300000 {
+			compatible = "qcom,sm8150-aoss-qmp";
+			reg = <0x0c300000 0x100000>;
+			interrupts = <GIC_SPI 389 IRQ_TYPE_EDGE_RISING>;
+			mboxes = <&apss_shared 0>;
+
+			#clock-cells = <0>;
+			#power-domain-cells = <1>;
+		};
+
 		intc: interrupt-controller@17a00000 {
 			compatible = "arm,gic-v3";
 			interrupt-controller;
Signature · 1 line
2.20.1
#53 lore raw

Re: [PATCH 22/22] arm64: dts: qcom: sm8150: Add APSS shared mailbox

Quoting Vinod Koul (2019-08-14 05:50:12)

arch/arm64/boot/dts/qcom/sm8150.dtsi line 342

Quoted 5 lines
arch/arm64/boot/dts/qcom/sm8150.dtsi +1 -0
@@ -338,6 +339,16 @@
                        #interrupt-cells = <2>;
                };
 
+               aoss_qmp: qmp@c300000 {

Node name of 'clock-controller', or 'power-controller'?

Quoted 4 lines
arch/arm64/boot/dts/qcom/sm8150.dtsi +4 -0
+                       compatible = "qcom,sm8150-aoss-qmp";
+                       reg = <0x0c300000 0x100000>;
+                       interrupts = <GIC_SPI 389 IRQ_TYPE_EDGE_RISING>;
+                       mboxes = <&apss_shared 0>;
author
#54 lore raw

Re: [PATCH 22/22] arm64: dts: qcom: sm8150: Add APSS shared mailbox

Quoted 8 lines · Stephen Boyd

Quoting Vinod Koul (2019-08-14 05:50:12)

arch/arm64/boot/dts/qcom/sm8150.dtsi line 342

Quoted 5 lines
arch/arm64/boot/dts/qcom/sm8150.dtsi +1 -0
@@ -338,6 +339,16 @@
                        #interrupt-cells = <2>;
                };
 
+               aoss_qmp: qmp@c300000 {

Node name of 'clock-controller', or 'power-controller'?

The orignal entry for sdm845 has no such statement, but yes it doesn makes sense. I am thinking power-controller.. Bjorn?

Signature · 1 line
~Vinod
#55 lore raw

Re: [PATCH 22/22] arm64: dts: qcom: sm8150: Add APSS shared mailbox

Hey Vinod,

There seems to be a mismatch
between the commit description
and the dt node (This is the
aoss qmp node not the APPS
shared node).

Quoted 6 lines · Vinod Koul
Quoted 5 lines · Stephen Boyd

Quoting Vinod Koul (2019-08-14 05:50:12)

Quoted 4 lines
arch/arm64/boot/dts/qcom/sm8150.dtsi +0 -0
@@ -338,6 +339,16 @@
                        #interrupt-cells = <2>;
                };
 
Quoted 6 lines
Quoted 3 lines

arch/arm64/boot/dts/qcom/sm8150.dtsi line 342

Quoted 1 line
arch/arm64/boot/dts/qcom/sm8150.dtsi +1 -0
+               aoss_qmp: qmp@c300000 {

Node name of 'clock-controller', or 'power-controller'?

The orignal entry for sdm845 has no such statement, but yes it doesn makes sense. I am thinking power-controller.. Bjorn?

aoss_qmp registers both pd and
clock providers.

Signature · 3 lines
-- Sibi Sankar --
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project.
author
#56 lore raw

Re: [PATCH 22/22] arm64: dts: qcom: sm8150: Add APSS shared mailbox

Quoted 7 lines · Sibi Sankar

Hey Vinod,

There seems to be a mismatch between the commit description and the dt node (This is the aoss qmp node not the APPS shared node).

Thanks for pointing, I have squashed this and other into single patch and updated the description

Quoted 13 lines · Vinod Koul
Quoted 10 lines · Stephen Boyd
Quoted 8 lines

Quoting Vinod Koul (2019-08-14 05:50:12)

arch/arm64/boot/dts/qcom/sm8150.dtsi line 342

Quoted 5 lines
arch/arm64/boot/dts/qcom/sm8150.dtsi +1 -0
@@ -338,6 +339,16 @@
                        #interrupt-cells = <2>;
                };
 
+               aoss_qmp: qmp@c300000 {

Node name of 'clock-controller', or 'power-controller'?

Quoted 5 lines
Quoted 2 lines

The orignal entry for sdm845 has no such statement, but yes it doesn makes sense. I am thinking power-controller.. Bjorn?

aoss_qmp registers both pd and clock providers.

Thats correct, I chatted with Bjorn and he recommended we use power-controller

Signature · 1 line
~Vinod