diff mbox series

[v4,2/2] arm64: dts: qcom: Add base QDU1000/QRU1000 IDP DTs

Message ID 20221118192241.29384-3-quic_molvera@quicinc.com (mailing list archive)
State Superseded
Headers show
Series Add base device tree files for QDU1000/QRU1000 | expand

Commit Message

Melody Olvera Nov. 18, 2022, 7:22 p.m. UTC
Add DTs for Qualcomm IDP platforms using the QDU1000 and QRU1000
SoCs.

Signed-off-by: Melody Olvera <quic_molvera@quicinc.com>
---
 arch/arm64/boot/dts/qcom/Makefile        |   2 +
 arch/arm64/boot/dts/qcom/qdu1000-idp.dts | 266 +++++++++++++++++++++++
 arch/arm64/boot/dts/qcom/qru1000-idp.dts | 266 +++++++++++++++++++++++
 3 files changed, 534 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/qdu1000-idp.dts
 create mode 100644 arch/arm64/boot/dts/qcom/qru1000-idp.dts

Comments

Konrad Dybcio Nov. 21, 2022, 11:07 a.m. UTC | #1
On 18.11.2022 20:22, Melody Olvera wrote:
> Add DTs for Qualcomm IDP platforms using the QDU1000 and QRU1000
> SoCs.
> 
> Signed-off-by: Melody Olvera <quic_molvera@quicinc.com>
> ---
>  arch/arm64/boot/dts/qcom/Makefile        |   2 +
>  arch/arm64/boot/dts/qcom/qdu1000-idp.dts | 266 +++++++++++++++++++++++
>  arch/arm64/boot/dts/qcom/qru1000-idp.dts | 266 +++++++++++++++++++++++
>  3 files changed, 534 insertions(+)
>  create mode 100644 arch/arm64/boot/dts/qcom/qdu1000-idp.dts
>  create mode 100644 arch/arm64/boot/dts/qcom/qru1000-idp.dts
> 
> diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
> index afe496a93f94..da66d4a0a884 100644
> --- a/arch/arm64/boot/dts/qcom/Makefile
> +++ b/arch/arm64/boot/dts/qcom/Makefile
> @@ -53,7 +53,9 @@ dtb-$(CONFIG_ARCH_QCOM)	+= msm8998-sony-xperia-yoshino-maple.dtb
>  dtb-$(CONFIG_ARCH_QCOM)	+= msm8998-sony-xperia-yoshino-poplar.dtb
>  dtb-$(CONFIG_ARCH_QCOM)	+= qcs404-evb-1000.dtb
>  dtb-$(CONFIG_ARCH_QCOM)	+= qcs404-evb-4000.dtb
> +dtb-$(CONFIG_ARCH_QCOM)	+= qdu1000-idp.dtb
>  dtb-$(CONFIG_ARCH_QCOM)	+= qrb5165-rb5.dtb
> +dtb-$(CONFIG_ARCH_QCOM)	+= qru1000-idp.dtb
>  dtb-$(CONFIG_ARCH_QCOM)	+= sa8155p-adp.dtb
>  dtb-$(CONFIG_ARCH_QCOM)	+= sa8295p-adp.dtb
>  dtb-$(CONFIG_ARCH_QCOM)	+= sc7180-idp.dtb
> diff --git a/arch/arm64/boot/dts/qcom/qdu1000-idp.dts b/arch/arm64/boot/dts/qcom/qdu1000-idp.dts
> new file mode 100644
> index 000000000000..5aed483201fa
> --- /dev/null
> +++ b/arch/arm64/boot/dts/qcom/qdu1000-idp.dts
> @@ -0,0 +1,266 @@
> +// SPDX-License-Identifier: BSD-3-Clause
> +/*
> + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
> + */
> +
> +/dts-v1/;
> +
> +#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
> +#include "qdu1000.dtsi"
> +#include "pm8150.dtsi"
> +
> +/ {
> +	model = "Qualcomm Technologies, Inc. QDU1000 IDP";
> +	compatible = "qcom,qdu1000-idp", "qcom,qdu1000";
Missing chassis-type

> +
> +	aliases {
> +		serial0 = &uart7;
> +	};
> +
> +	clocks {
> +		xo_board: xo-board {
> +			compatible = "fixed-clock";
> +			clock-frequency = <19200000>;
> +			clock-output-names = "xo_board";
> +			#clock-cells = <0>;
> +		};
> +
> +		sleep_clk: sleep-clk {
> +			compatible = "fixed-clock";
> +			clock-frequency = <32000>;
> +			#clock-cells = <0>;
> +		};
> +
> +		pcie_0_pipe_clk: pcie-0-pipe-clk {
> +			compatible = "fixed-clock";
> +			clock-frequency = <1000>;
> +			clock-output-names = "pcie_0_pipe_clk";
> +			#clock-cells = <0>;
> +		};
> +
> +		pcie_0_phy_aux_clk: pcie-0-phy-aux-clk {
> +			compatible = "fixed-clock";
> +			clock-frequency = <1000>;
> +			clock-output-names = "pcie_0_phy_aux_clk";
> +			#clock-cells = <0>;
> +		};
> +
> +		usb3_phy_wrapper_pipe_clk: usb3-phy-wrapper-pipe-clk {
> +			compatible = "fixed-clock";
> +			clock-frequency = <1000>;
> +			clock-output-names = "usb3_phy_wrapper_pipe_clk";
> +			#clock-cells = <0>;
> +		};
Do these pipe clocks not come from QMPPHY?

> +	};
> +
> +	chosen {
> +		stdout-path = "serial0:115200n8";
> +	};
> +
> +	ppvar_sys: ppvar-sys-regulator {
> +		compatible = "regulator-fixed";
> +		regulator-name = "ppvar_sys";
Any chance you could add the voltage of this regulator here,
so the DT can better represent the hardware?

Konrad
> +		regulator-always-on;
> +		regulator-boot-on;
> +	};
> +
> +	vph_pwr: vph-pwr-regulator {
> +		compatible = "regulator-fixed";
> +		regulator-name = "vph_pwr";
> +		regulator-min-microvolt = <3700000>;
> +		regulator-max-microvolt = <3700000>;
> +
> +		regulator-always-on;
> +		regulator-boot-on;
> +
> +		vin-supply = <&ppvar_sys>;
> +	};
> +};
> +
> +&apps_rsc {
> +	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 = <&vph_pwr>;
> +		vdd-l3-l4-l5-l18-supply = <&vreg_s5a_2p0>;
> +		vdd-l6-l9-supply = <&vreg_s6a_0p9>;
> +		vdd-l7-l12-l14-l15-supply = <&vreg_s4a_1p8>;
> +		vdd-l13-l16-l17-supply = <&vph_pwr>;
> +
> +		vreg_s2a_0p5: smps2 {
> +			regulator-name = "vreg_s2a_0p5";
> +			regulator-min-microvolt = <320000>;
> +			regulator-max-microvolt = <570000>;
> +		};
> +
> +		vreg_s3a_1p05: smps3 {
> +			regulator-name = "vreg_s3a_1p05";
> +			regulator-min-microvolt = <950000>;
> +			regulator-max-microvolt = <1170000>;
> +		};
> +
> +		vreg_s4a_1p8: smps4 {
> +			regulator-name = "vreg_s4a_1p8";
> +			regulator-min-microvolt = <1800000>;
> +			regulator-max-microvolt = <1800000>;
> +		};
> +
> +		vreg_s5a_2p0: smps5 {
> +			regulator-name = "vreg_s5a_2p0";
> +			regulator-min-microvolt = <1904000>;
> +			regulator-max-microvolt = <2000000>;
> +		};
> +
> +		vreg_s6a_0p9: smps6 {
> +			regulator-name = "vreg_s6a_0p9";
> +			regulator-min-microvolt = <920000>;
> +			regulator-max-microvolt = <1128000>;
> +		};
> +
> +		vreg_s7a_1p2: smps7 {
> +			regulator-name = "vreg_s7a_1p2";
> +			regulator-min-microvolt = <1200000>;
> +			regulator-max-microvolt = <1200000>;
> +		};
> +
> +		vreg_s8a_1p3: smps8 {
> +			regulator-name = "vreg_s8a_1p3";
> +			regulator-min-microvolt = <1352000>;
> +			regulator-max-microvolt = <1352000>;
> +		};
> +
> +		vreg_l1a_0p91: ldo1 {
> +			regulator-name = "vreg_l1a_0p91";
> +			regulator-min-microvolt = <312000>;
> +			regulator-max-microvolt = <1304000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> +		};
> +
> +		vreg_l2a_2p3: ldo2 {
> +			regulator-name = "vreg_l2a_2p3";
> +			regulator-min-microvolt = <2970000>;
> +			regulator-max-microvolt = <3300000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> +		};
> +
> +		vreg_l3a_1p2: ldo3 {
> +			regulator-name = "vreg_l3a_1p2";
> +			regulator-min-microvolt = <920000>;
> +			regulator-max-microvolt = <1260000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> +		};
> +
> +		vreg_l5a_0p8: ldo5 {
> +			regulator-name = "vreg_l5a_0p8";
> +			regulator-min-microvolt = <312000>;
> +			regulator-max-microvolt = <1304000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> +		};
> +
> +		vreg_l6a_0p91: ldo6 {
> +			regulator-name = "vreg_l6a_0p91";
> +			regulator-min-microvolt = <880000>;
> +			regulator-max-microvolt = <950000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> +		};
> +
> +		vreg_l7a_1p8: ldo7 {
> +			regulator-name = "vreg_l7a_1p8";
> +			regulator-min-microvolt = <1650000>;
> +			regulator-max-microvolt = <2000000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> +
> +		};
> +
> +		vreg_l8a_0p91: ldo8 {
> +			regulator-name = "vreg_l8a_0p91";
> +			regulator-min-microvolt = <888000>;
> +			regulator-max-microvolt = <925000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> +		};
> +
> +		vreg_l9a_0p91: ldo9 {
> +			regulator-name = "vreg_l8a_0p91";
> +			regulator-min-microvolt = <312000>;
> +			regulator-max-microvolt = <1304000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> +		};
> +
> +		vreg_l10a_2p95: ldo10 {
> +			regulator-name = "vreg_l10a_2p95";
> +			regulator-min-microvolt = <2700000>;
> +			regulator-max-microvolt = <3544000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> +		};
> +
> +		vreg_l11a_0p91: ldo11 {
> +			regulator-name = "vreg_l11a_0p91";
> +			regulator-min-microvolt = <800000>;
> +			regulator-max-microvolt = <1000000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> +		};
> +
> +		vreg_l12a_1p8: ldo12 {
> +			regulator-name = "vreg_l12a_1p8";
> +			regulator-min-microvolt = <1504000>;
> +			regulator-max-microvolt = <1504000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> +		};
> +
> +		vreg_l14a_1p8: ldo14 {
> +			regulator-name = "vreg_l14a_1p8";
> +			regulator-min-microvolt = <1650000>;
> +			regulator-max-microvolt = <1950000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> +		};
> +
> +		vreg_l15a_1p8: ldo15 {
> +			regulator-name = "vreg_l15a_1p8";
> +			regulator-min-microvolt = <1504000>;
> +			regulator-max-microvolt = <2000000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> +		};
> +
> +		vreg_l16a_1p8: ldo16 {
> +			regulator-name = "vreg_l16a_1p8";
> +			regulator-min-microvolt = <1710000>;
> +			regulator-max-microvolt = <1890000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> +		};
> +
> +		vreg_l17a_3p3: ldo17 {
> +			regulator-name = "vreg_l17a_3p3";
> +			regulator-min-microvolt = <3000000>;
> +			regulator-max-microvolt = <3544000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> +		};
> +
> +		vreg_l18a_1p2: ldo18 {
> +			regulator-name = "vreg_l18a_1p2";
> +			regulator-min-microvolt = <312000>;
> +			regulator-max-microvolt = <1304000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> +		};
> +	};
> +};
> +
> +&qupv3_id_0 {
> +	status = "okay";
> +};
> +
> +&uart7 {
> +	status = "okay";
> +};
> diff --git a/arch/arm64/boot/dts/qcom/qru1000-idp.dts b/arch/arm64/boot/dts/qcom/qru1000-idp.dts
> new file mode 100644
> index 000000000000..42eb0c33e7ba
> --- /dev/null
> +++ b/arch/arm64/boot/dts/qcom/qru1000-idp.dts
> @@ -0,0 +1,266 @@
> +// SPDX-License-Identifier: BSD-3-Clause
> +/*
> + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
> + */
> +
> +/dts-v1/;
> +
> +#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
> +#include "qru1000.dtsi"
> +#include "pm8150.dtsi"
> +
> +/ {
> +	model = "Qualcomm Technologies, Inc. QRU1000 IDP";
> +	compatible = "qcom,qru1000-idp", "qcom,qru1000";
> +
> +	aliases {
> +		serial0 = &uart7;
> +	};
> +
> +	clocks {
> +		xo_board: xo-board {
> +			compatible = "fixed-clock";
> +			clock-frequency = <19200000>;
> +			clock-output-names = "xo_board";
> +			#clock-cells = <0>;
> +		};
> +
> +		sleep_clk: sleep-clk {
> +			compatible = "fixed-clock";
> +			clock-frequency = <32000>;
> +			#clock-cells = <0>;
> +		};
> +
> +		pcie_0_pipe_clk: pcie-0-pipe-clk {
> +			compatible = "fixed-clock";
> +			clock-frequency = <1000>;
> +			clock-output-names = "pcie_0_pipe_clk";
> +			#clock-cells = <0>;
> +		};
> +
> +		pcie_0_phy_aux_clk: pcie-0-phy-aux-clk {
> +			compatible = "fixed-clock";
> +			clock-frequency = <1000>;
> +			clock-output-names = "pcie_0_phy_aux_clk";
> +			#clock-cells = <0>;
> +		};
> +
> +		usb3_phy_wrapper_pipe_clk: usb3-phy-wrapper-pipe-clk {
> +			compatible = "fixed-clock";
> +			clock-frequency = <1000>;
> +			clock-output-names = "usb3_phy_wrapper_pipe_clk";
> +			#clock-cells = <0>;
> +		};
> +	};
> +
> +	chosen {
> +		stdout-path = "serial0:115200n8";
> +	};
> +
> +	ppvar_sys: ppvar-sys-regulator {
> +		compatible = "regulator-fixed";
> +		regulator-name = "ppvar_sys";
> +		regulator-always-on;
> +		regulator-boot-on;
> +	};
> +
> +	vph_pwr: vph-pwr-regulator {
> +		compatible = "regulator-fixed";
> +		regulator-name = "vph_pwr";
> +		regulator-min-microvolt = <3700000>;
> +		regulator-max-microvolt = <3700000>;
> +
> +		regulator-always-on;
> +		regulator-boot-on;
> +
> +		vin-supply = <&ppvar_sys>;
> +	};
> +};
> +
> +&apps_rsc {
> +	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 = <&vph_pwr>;
> +		vdd-l3-l4-l5-l18-supply = <&vreg_s5a_2p0>;
> +		vdd-l6-l9-supply = <&vreg_s6a_0p9>;
> +		vdd-l7-l12-l14-l15-supply = <&vreg_s4a_1p8>;
> +		vdd-l13-l16-l17-supply = <&vph_pwr>;
> +
> +		vreg_s2a_0p5: smps2 {
> +			regulator-name = "vreg_s2a_0p5";
> +			regulator-min-microvolt = <320000>;
> +			regulator-max-microvolt = <570000>;
> +		};
> +
> +		vreg_s3a_1p05: smps3 {
> +			regulator-name = "vreg_s3a_1p05";
> +			regulator-min-microvolt = <950000>;
> +			regulator-max-microvolt = <1170000>;
> +		};
> +
> +		vreg_s4a_1p8: smps4 {
> +			regulator-name = "vreg_s4a_1p8";
> +			regulator-min-microvolt = <1800000>;
> +			regulator-max-microvolt = <1800000>;
> +		};
> +
> +		vreg_s5a_2p0: smps5 {
> +			regulator-name = "vreg_s5a_2p0";
> +			regulator-min-microvolt = <1904000>;
> +			regulator-max-microvolt = <2000000>;
> +		};
> +
> +		vreg_s6a_0p9: smps6 {
> +			regulator-name = "vreg_s6a_0p9";
> +			regulator-min-microvolt = <920000>;
> +			regulator-max-microvolt = <1128000>;
> +		};
> +
> +		vreg_s7a_1p2: smps7 {
> +			regulator-name = "vreg_s7a_1p2";
> +			regulator-min-microvolt = <1200000>;
> +			regulator-max-microvolt = <1200000>;
> +		};
> +
> +		vreg_s8a_1p3: smps8 {
> +			regulator-name = "vreg_s8a_1p3";
> +			regulator-min-microvolt = <1352000>;
> +			regulator-max-microvolt = <1352000>;
> +		};
> +
> +		vreg_l1a_0p91: ldo1 {
> +			regulator-name = "vreg_l1a_0p91";
> +			regulator-min-microvolt = <312000>;
> +			regulator-max-microvolt = <1304000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> +		};
> +
> +		vreg_l2a_2p3: ldo2 {
> +			regulator-name = "vreg_l2a_2p3";
> +			regulator-min-microvolt = <2970000>;
> +			regulator-max-microvolt = <3300000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> +		};
> +
> +		vreg_l3a_1p2: ldo3 {
> +			regulator-name = "vreg_l3a_1p2";
> +			regulator-min-microvolt = <920000>;
> +			regulator-max-microvolt = <1260000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> +		};
> +
> +		vreg_l5a_0p8: ldo5 {
> +			regulator-name = "vreg_l5a_0p8";
> +			regulator-min-microvolt = <312000>;
> +			regulator-max-microvolt = <1304000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> +		};
> +
> +		vreg_l6a_0p91: ldo6 {
> +			regulator-name = "vreg_l6a_0p91";
> +			regulator-min-microvolt = <880000>;
> +			regulator-max-microvolt = <950000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> +		};
> +
> +		vreg_l7a_1p8: ldo7 {
> +			regulator-name = "vreg_l7a_1p8";
> +			regulator-min-microvolt = <1650000>;
> +			regulator-max-microvolt = <2000000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> +
> +		};
> +
> +		vreg_l8a_0p91: ldo8 {
> +			regulator-name = "vreg_l8a_0p91";
> +			regulator-min-microvolt = <888000>;
> +			regulator-max-microvolt = <925000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> +		};
> +
> +		vreg_l9a_0p91: ldo9 {
> +			regulator-name = "vreg_l8a_0p91";
> +			regulator-min-microvolt = <312000>;
> +			regulator-max-microvolt = <1304000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> +		};
> +
> +		vreg_l10a_2p95: ldo10 {
> +			regulator-name = "vreg_l10a_2p95";
> +			regulator-min-microvolt = <2700000>;
> +			regulator-max-microvolt = <3544000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> +		};
> +
> +		vreg_l11a_0p91: ldo11 {
> +			regulator-name = "vreg_l11a_0p91";
> +			regulator-min-microvolt = <800000>;
> +			regulator-max-microvolt = <1000000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> +		};
> +
> +		vreg_l12a_1p8: ldo12 {
> +			regulator-name = "vreg_l12a_1p8";
> +			regulator-min-microvolt = <1504000>;
> +			regulator-max-microvolt = <1504000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> +		};
> +
> +		vreg_l14a_1p8: ldo14 {
> +			regulator-name = "vreg_l14a_1p8";
> +			regulator-min-microvolt = <1650000>;
> +			regulator-max-microvolt = <1950000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> +		};
> +
> +		vreg_l15a_1p8: ldo15 {
> +			regulator-name = "vreg_l15a_1p8";
> +			regulator-min-microvolt = <1504000>;
> +			regulator-max-microvolt = <2000000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> +		};
> +
> +		vreg_l16a_1p8: ldo16 {
> +			regulator-name = "vreg_l16a_1p8";
> +			regulator-min-microvolt = <1710000>;
> +			regulator-max-microvolt = <1890000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> +		};
> +
> +		vreg_l17a_3p3: ldo17 {
> +			regulator-name = "vreg_l17a_3p3";
> +			regulator-min-microvolt = <3000000>;
> +			regulator-max-microvolt = <3544000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> +		};
> +
> +		vreg_l18a_1p2: ldo18 {
> +			regulator-name = "vreg_l18a_1p2";
> +			regulator-min-microvolt = <312000>;
> +			regulator-max-microvolt = <1304000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> +		};
> +	};
> +};
> +
> +&qupv3_id_0 {
> +	status = "okay";
> +};
> +
> +&uart7 {
> +	status = "okay";
> +};
Melody Olvera Nov. 21, 2022, 10:15 p.m. UTC | #2
On 11/21/2022 5:07 AM, Konrad Dybcio wrote:
>
> On 18.11.2022 20:22, Melody Olvera wrote:
>> Add DTs for Qualcomm IDP platforms using the QDU1000 and QRU1000
>> SoCs.
>>
>> Signed-off-by: Melody Olvera <quic_molvera@quicinc.com>
>> ---
>>  arch/arm64/boot/dts/qcom/Makefile        |   2 +
>>  arch/arm64/boot/dts/qcom/qdu1000-idp.dts | 266 +++++++++++++++++++++++
>>  arch/arm64/boot/dts/qcom/qru1000-idp.dts | 266 +++++++++++++++++++++++
>>  3 files changed, 534 insertions(+)
>>  create mode 100644 arch/arm64/boot/dts/qcom/qdu1000-idp.dts
>>  create mode 100644 arch/arm64/boot/dts/qcom/qru1000-idp.dts
>>
>> diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
>> index afe496a93f94..da66d4a0a884 100644
>> --- a/arch/arm64/boot/dts/qcom/Makefile
>> +++ b/arch/arm64/boot/dts/qcom/Makefile
>> @@ -53,7 +53,9 @@ dtb-$(CONFIG_ARCH_QCOM)	+= msm8998-sony-xperia-yoshino-maple.dtb
>>  dtb-$(CONFIG_ARCH_QCOM)	+= msm8998-sony-xperia-yoshino-poplar.dtb
>>  dtb-$(CONFIG_ARCH_QCOM)	+= qcs404-evb-1000.dtb
>>  dtb-$(CONFIG_ARCH_QCOM)	+= qcs404-evb-4000.dtb
>> +dtb-$(CONFIG_ARCH_QCOM)	+= qdu1000-idp.dtb
>>  dtb-$(CONFIG_ARCH_QCOM)	+= qrb5165-rb5.dtb
>> +dtb-$(CONFIG_ARCH_QCOM)	+= qru1000-idp.dtb
>>  dtb-$(CONFIG_ARCH_QCOM)	+= sa8155p-adp.dtb
>>  dtb-$(CONFIG_ARCH_QCOM)	+= sa8295p-adp.dtb
>>  dtb-$(CONFIG_ARCH_QCOM)	+= sc7180-idp.dtb
>> diff --git a/arch/arm64/boot/dts/qcom/qdu1000-idp.dts b/arch/arm64/boot/dts/qcom/qdu1000-idp.dts
>> new file mode 100644
>> index 000000000000..5aed483201fa
>> --- /dev/null
>> +++ b/arch/arm64/boot/dts/qcom/qdu1000-idp.dts
>> @@ -0,0 +1,266 @@
>> +// SPDX-License-Identifier: BSD-3-Clause
>> +/*
>> + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
>> + */
>> +
>> +/dts-v1/;
>> +
>> +#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
>> +#include "qdu1000.dtsi"
>> +#include "pm8150.dtsi"
>> +
>> +/ {
>> +	model = "Qualcomm Technologies, Inc. QDU1000 IDP";
>> +	compatible = "qcom,qdu1000-idp", "qcom,qdu1000";
> Missing chassis-type

Sorry, not sure what you mean here... Do you mean like QRD, HDK, MTP, etc.?
If so, then IDP is the chassis type.

>
>> +
>> +	aliases {
>> +		serial0 = &uart7;
>> +	};
>> +
>> +	clocks {
>> +		xo_board: xo-board {
>> +			compatible = "fixed-clock";
>> +			clock-frequency = <19200000>;
>> +			clock-output-names = "xo_board";
>> +			#clock-cells = <0>;
>> +		};
>> +
>> +		sleep_clk: sleep-clk {
>> +			compatible = "fixed-clock";
>> +			clock-frequency = <32000>;
>> +			#clock-cells = <0>;
>> +		};
>> +
>> +		pcie_0_pipe_clk: pcie-0-pipe-clk {
>> +			compatible = "fixed-clock";
>> +			clock-frequency = <1000>;
>> +			clock-output-names = "pcie_0_pipe_clk";
>> +			#clock-cells = <0>;
>> +		};
>> +
>> +		pcie_0_phy_aux_clk: pcie-0-phy-aux-clk {
>> +			compatible = "fixed-clock";
>> +			clock-frequency = <1000>;
>> +			clock-output-names = "pcie_0_phy_aux_clk";
>> +			#clock-cells = <0>;
>> +		};
>> +
>> +		usb3_phy_wrapper_pipe_clk: usb3-phy-wrapper-pipe-clk {
>> +			compatible = "fixed-clock";
>> +			clock-frequency = <1000>;
>> +			clock-output-names = "usb3_phy_wrapper_pipe_clk";
>> +			#clock-cells = <0>;
>> +		};
> Do these pipe clocks not come from QMPPHY?

Yes they do; I just don't have those phys ready yet. I can put a TODO here to
move them if necessary.

>
>> +	};
>> +
>> +	chosen {
>> +		stdout-path = "serial0:115200n8";
>> +	};
>> +
>> +	ppvar_sys: ppvar-sys-regulator {
>> +		compatible = "regulator-fixed";
>> +		regulator-name = "ppvar_sys";
> Any chance you could add the voltage of this regulator here,
> so the DT can better represent the hardware?

Sure.

Thanks,
Melody
> Konrad
>> +		regulator-always-on;
>> +		regulator-boot-on;
>> +	};
>> +
>> +	vph_pwr: vph-pwr-regulator {
>> +		compatible = "regulator-fixed";
>> +		regulator-name = "vph_pwr";
>> +		regulator-min-microvolt = <3700000>;
>> +		regulator-max-microvolt = <3700000>;
>> +
>> +		regulator-always-on;
>> +		regulator-boot-on;
>> +
>> +		vin-supply = <&ppvar_sys>;
>> +	};
>> +};
>> +
>> +&apps_rsc {
>> +	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 = <&vph_pwr>;
>> +		vdd-l3-l4-l5-l18-supply = <&vreg_s5a_2p0>;
>> +		vdd-l6-l9-supply = <&vreg_s6a_0p9>;
>> +		vdd-l7-l12-l14-l15-supply = <&vreg_s4a_1p8>;
>> +		vdd-l13-l16-l17-supply = <&vph_pwr>;
>> +
>> +		vreg_s2a_0p5: smps2 {
>> +			regulator-name = "vreg_s2a_0p5";
>> +			regulator-min-microvolt = <320000>;
>> +			regulator-max-microvolt = <570000>;
>> +		};
>> +
>> +		vreg_s3a_1p05: smps3 {
>> +			regulator-name = "vreg_s3a_1p05";
>> +			regulator-min-microvolt = <950000>;
>> +			regulator-max-microvolt = <1170000>;
>> +		};
>> +
>> +		vreg_s4a_1p8: smps4 {
>> +			regulator-name = "vreg_s4a_1p8";
>> +			regulator-min-microvolt = <1800000>;
>> +			regulator-max-microvolt = <1800000>;
>> +		};
>> +
>> +		vreg_s5a_2p0: smps5 {
>> +			regulator-name = "vreg_s5a_2p0";
>> +			regulator-min-microvolt = <1904000>;
>> +			regulator-max-microvolt = <2000000>;
>> +		};
>> +
>> +		vreg_s6a_0p9: smps6 {
>> +			regulator-name = "vreg_s6a_0p9";
>> +			regulator-min-microvolt = <920000>;
>> +			regulator-max-microvolt = <1128000>;
>> +		};
>> +
>> +		vreg_s7a_1p2: smps7 {
>> +			regulator-name = "vreg_s7a_1p2";
>> +			regulator-min-microvolt = <1200000>;
>> +			regulator-max-microvolt = <1200000>;
>> +		};
>> +
>> +		vreg_s8a_1p3: smps8 {
>> +			regulator-name = "vreg_s8a_1p3";
>> +			regulator-min-microvolt = <1352000>;
>> +			regulator-max-microvolt = <1352000>;
>> +		};
>> +
>> +		vreg_l1a_0p91: ldo1 {
>> +			regulator-name = "vreg_l1a_0p91";
>> +			regulator-min-microvolt = <312000>;
>> +			regulator-max-microvolt = <1304000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>> +		};
>> +
>> +		vreg_l2a_2p3: ldo2 {
>> +			regulator-name = "vreg_l2a_2p3";
>> +			regulator-min-microvolt = <2970000>;
>> +			regulator-max-microvolt = <3300000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>> +		};
>> +
>> +		vreg_l3a_1p2: ldo3 {
>> +			regulator-name = "vreg_l3a_1p2";
>> +			regulator-min-microvolt = <920000>;
>> +			regulator-max-microvolt = <1260000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>> +		};
>> +
>> +		vreg_l5a_0p8: ldo5 {
>> +			regulator-name = "vreg_l5a_0p8";
>> +			regulator-min-microvolt = <312000>;
>> +			regulator-max-microvolt = <1304000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>> +		};
>> +
>> +		vreg_l6a_0p91: ldo6 {
>> +			regulator-name = "vreg_l6a_0p91";
>> +			regulator-min-microvolt = <880000>;
>> +			regulator-max-microvolt = <950000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>> +		};
>> +
>> +		vreg_l7a_1p8: ldo7 {
>> +			regulator-name = "vreg_l7a_1p8";
>> +			regulator-min-microvolt = <1650000>;
>> +			regulator-max-microvolt = <2000000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>> +
>> +		};
>> +
>> +		vreg_l8a_0p91: ldo8 {
>> +			regulator-name = "vreg_l8a_0p91";
>> +			regulator-min-microvolt = <888000>;
>> +			regulator-max-microvolt = <925000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>> +		};
>> +
>> +		vreg_l9a_0p91: ldo9 {
>> +			regulator-name = "vreg_l8a_0p91";
>> +			regulator-min-microvolt = <312000>;
>> +			regulator-max-microvolt = <1304000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>> +		};
>> +
>> +		vreg_l10a_2p95: ldo10 {
>> +			regulator-name = "vreg_l10a_2p95";
>> +			regulator-min-microvolt = <2700000>;
>> +			regulator-max-microvolt = <3544000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>> +		};
>> +
>> +		vreg_l11a_0p91: ldo11 {
>> +			regulator-name = "vreg_l11a_0p91";
>> +			regulator-min-microvolt = <800000>;
>> +			regulator-max-microvolt = <1000000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>> +		};
>> +
>> +		vreg_l12a_1p8: ldo12 {
>> +			regulator-name = "vreg_l12a_1p8";
>> +			regulator-min-microvolt = <1504000>;
>> +			regulator-max-microvolt = <1504000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>> +		};
>> +
>> +		vreg_l14a_1p8: ldo14 {
>> +			regulator-name = "vreg_l14a_1p8";
>> +			regulator-min-microvolt = <1650000>;
>> +			regulator-max-microvolt = <1950000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>> +		};
>> +
>> +		vreg_l15a_1p8: ldo15 {
>> +			regulator-name = "vreg_l15a_1p8";
>> +			regulator-min-microvolt = <1504000>;
>> +			regulator-max-microvolt = <2000000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>> +		};
>> +
>> +		vreg_l16a_1p8: ldo16 {
>> +			regulator-name = "vreg_l16a_1p8";
>> +			regulator-min-microvolt = <1710000>;
>> +			regulator-max-microvolt = <1890000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>> +		};
>> +
>> +		vreg_l17a_3p3: ldo17 {
>> +			regulator-name = "vreg_l17a_3p3";
>> +			regulator-min-microvolt = <3000000>;
>> +			regulator-max-microvolt = <3544000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>> +		};
>> +
>> +		vreg_l18a_1p2: ldo18 {
>> +			regulator-name = "vreg_l18a_1p2";
>> +			regulator-min-microvolt = <312000>;
>> +			regulator-max-microvolt = <1304000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>> +		};
>> +	};
>> +};
>> +
>> +&qupv3_id_0 {
>> +	status = "okay";
>> +};
>> +
>> +&uart7 {
>> +	status = "okay";
>> +};
>> diff --git a/arch/arm64/boot/dts/qcom/qru1000-idp.dts b/arch/arm64/boot/dts/qcom/qru1000-idp.dts
>> new file mode 100644
>> index 000000000000..42eb0c33e7ba
>> --- /dev/null
>> +++ b/arch/arm64/boot/dts/qcom/qru1000-idp.dts
>> @@ -0,0 +1,266 @@
>> +// SPDX-License-Identifier: BSD-3-Clause
>> +/*
>> + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
>> + */
>> +
>> +/dts-v1/;
>> +
>> +#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
>> +#include "qru1000.dtsi"
>> +#include "pm8150.dtsi"
>> +
>> +/ {
>> +	model = "Qualcomm Technologies, Inc. QRU1000 IDP";
>> +	compatible = "qcom,qru1000-idp", "qcom,qru1000";
>> +
>> +	aliases {
>> +		serial0 = &uart7;
>> +	};
>> +
>> +	clocks {
>> +		xo_board: xo-board {
>> +			compatible = "fixed-clock";
>> +			clock-frequency = <19200000>;
>> +			clock-output-names = "xo_board";
>> +			#clock-cells = <0>;
>> +		};
>> +
>> +		sleep_clk: sleep-clk {
>> +			compatible = "fixed-clock";
>> +			clock-frequency = <32000>;
>> +			#clock-cells = <0>;
>> +		};
>> +
>> +		pcie_0_pipe_clk: pcie-0-pipe-clk {
>> +			compatible = "fixed-clock";
>> +			clock-frequency = <1000>;
>> +			clock-output-names = "pcie_0_pipe_clk";
>> +			#clock-cells = <0>;
>> +		};
>> +
>> +		pcie_0_phy_aux_clk: pcie-0-phy-aux-clk {
>> +			compatible = "fixed-clock";
>> +			clock-frequency = <1000>;
>> +			clock-output-names = "pcie_0_phy_aux_clk";
>> +			#clock-cells = <0>;
>> +		};
>> +
>> +		usb3_phy_wrapper_pipe_clk: usb3-phy-wrapper-pipe-clk {
>> +			compatible = "fixed-clock";
>> +			clock-frequency = <1000>;
>> +			clock-output-names = "usb3_phy_wrapper_pipe_clk";
>> +			#clock-cells = <0>;
>> +		};
>> +	};
>> +
>> +	chosen {
>> +		stdout-path = "serial0:115200n8";
>> +	};
>> +
>> +	ppvar_sys: ppvar-sys-regulator {
>> +		compatible = "regulator-fixed";
>> +		regulator-name = "ppvar_sys";
>> +		regulator-always-on;
>> +		regulator-boot-on;
>> +	};
>> +
>> +	vph_pwr: vph-pwr-regulator {
>> +		compatible = "regulator-fixed";
>> +		regulator-name = "vph_pwr";
>> +		regulator-min-microvolt = <3700000>;
>> +		regulator-max-microvolt = <3700000>;
>> +
>> +		regulator-always-on;
>> +		regulator-boot-on;
>> +
>> +		vin-supply = <&ppvar_sys>;
>> +	};
>> +};
>> +
>> +&apps_rsc {
>> +	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 = <&vph_pwr>;
>> +		vdd-l3-l4-l5-l18-supply = <&vreg_s5a_2p0>;
>> +		vdd-l6-l9-supply = <&vreg_s6a_0p9>;
>> +		vdd-l7-l12-l14-l15-supply = <&vreg_s4a_1p8>;
>> +		vdd-l13-l16-l17-supply = <&vph_pwr>;
>> +
>> +		vreg_s2a_0p5: smps2 {
>> +			regulator-name = "vreg_s2a_0p5";
>> +			regulator-min-microvolt = <320000>;
>> +			regulator-max-microvolt = <570000>;
>> +		};
>> +
>> +		vreg_s3a_1p05: smps3 {
>> +			regulator-name = "vreg_s3a_1p05";
>> +			regulator-min-microvolt = <950000>;
>> +			regulator-max-microvolt = <1170000>;
>> +		};
>> +
>> +		vreg_s4a_1p8: smps4 {
>> +			regulator-name = "vreg_s4a_1p8";
>> +			regulator-min-microvolt = <1800000>;
>> +			regulator-max-microvolt = <1800000>;
>> +		};
>> +
>> +		vreg_s5a_2p0: smps5 {
>> +			regulator-name = "vreg_s5a_2p0";
>> +			regulator-min-microvolt = <1904000>;
>> +			regulator-max-microvolt = <2000000>;
>> +		};
>> +
>> +		vreg_s6a_0p9: smps6 {
>> +			regulator-name = "vreg_s6a_0p9";
>> +			regulator-min-microvolt = <920000>;
>> +			regulator-max-microvolt = <1128000>;
>> +		};
>> +
>> +		vreg_s7a_1p2: smps7 {
>> +			regulator-name = "vreg_s7a_1p2";
>> +			regulator-min-microvolt = <1200000>;
>> +			regulator-max-microvolt = <1200000>;
>> +		};
>> +
>> +		vreg_s8a_1p3: smps8 {
>> +			regulator-name = "vreg_s8a_1p3";
>> +			regulator-min-microvolt = <1352000>;
>> +			regulator-max-microvolt = <1352000>;
>> +		};
>> +
>> +		vreg_l1a_0p91: ldo1 {
>> +			regulator-name = "vreg_l1a_0p91";
>> +			regulator-min-microvolt = <312000>;
>> +			regulator-max-microvolt = <1304000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>> +		};
>> +
>> +		vreg_l2a_2p3: ldo2 {
>> +			regulator-name = "vreg_l2a_2p3";
>> +			regulator-min-microvolt = <2970000>;
>> +			regulator-max-microvolt = <3300000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>> +		};
>> +
>> +		vreg_l3a_1p2: ldo3 {
>> +			regulator-name = "vreg_l3a_1p2";
>> +			regulator-min-microvolt = <920000>;
>> +			regulator-max-microvolt = <1260000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>> +		};
>> +
>> +		vreg_l5a_0p8: ldo5 {
>> +			regulator-name = "vreg_l5a_0p8";
>> +			regulator-min-microvolt = <312000>;
>> +			regulator-max-microvolt = <1304000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>> +		};
>> +
>> +		vreg_l6a_0p91: ldo6 {
>> +			regulator-name = "vreg_l6a_0p91";
>> +			regulator-min-microvolt = <880000>;
>> +			regulator-max-microvolt = <950000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>> +		};
>> +
>> +		vreg_l7a_1p8: ldo7 {
>> +			regulator-name = "vreg_l7a_1p8";
>> +			regulator-min-microvolt = <1650000>;
>> +			regulator-max-microvolt = <2000000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>> +
>> +		};
>> +
>> +		vreg_l8a_0p91: ldo8 {
>> +			regulator-name = "vreg_l8a_0p91";
>> +			regulator-min-microvolt = <888000>;
>> +			regulator-max-microvolt = <925000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>> +		};
>> +
>> +		vreg_l9a_0p91: ldo9 {
>> +			regulator-name = "vreg_l8a_0p91";
>> +			regulator-min-microvolt = <312000>;
>> +			regulator-max-microvolt = <1304000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>> +		};
>> +
>> +		vreg_l10a_2p95: ldo10 {
>> +			regulator-name = "vreg_l10a_2p95";
>> +			regulator-min-microvolt = <2700000>;
>> +			regulator-max-microvolt = <3544000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>> +		};
>> +
>> +		vreg_l11a_0p91: ldo11 {
>> +			regulator-name = "vreg_l11a_0p91";
>> +			regulator-min-microvolt = <800000>;
>> +			regulator-max-microvolt = <1000000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>> +		};
>> +
>> +		vreg_l12a_1p8: ldo12 {
>> +			regulator-name = "vreg_l12a_1p8";
>> +			regulator-min-microvolt = <1504000>;
>> +			regulator-max-microvolt = <1504000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>> +		};
>> +
>> +		vreg_l14a_1p8: ldo14 {
>> +			regulator-name = "vreg_l14a_1p8";
>> +			regulator-min-microvolt = <1650000>;
>> +			regulator-max-microvolt = <1950000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>> +		};
>> +
>> +		vreg_l15a_1p8: ldo15 {
>> +			regulator-name = "vreg_l15a_1p8";
>> +			regulator-min-microvolt = <1504000>;
>> +			regulator-max-microvolt = <2000000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>> +		};
>> +
>> +		vreg_l16a_1p8: ldo16 {
>> +			regulator-name = "vreg_l16a_1p8";
>> +			regulator-min-microvolt = <1710000>;
>> +			regulator-max-microvolt = <1890000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>> +		};
>> +
>> +		vreg_l17a_3p3: ldo17 {
>> +			regulator-name = "vreg_l17a_3p3";
>> +			regulator-min-microvolt = <3000000>;
>> +			regulator-max-microvolt = <3544000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>> +		};
>> +
>> +		vreg_l18a_1p2: ldo18 {
>> +			regulator-name = "vreg_l18a_1p2";
>> +			regulator-min-microvolt = <312000>;
>> +			regulator-max-microvolt = <1304000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>> +		};
>> +	};
>> +};
>> +
>> +&qupv3_id_0 {
>> +	status = "okay";
>> +};
>> +
>> +&uart7 {
>> +	status = "okay";
>> +};
Konrad Dybcio Nov. 21, 2022, 10:18 p.m. UTC | #3
On 21.11.2022 23:15, Melody Olvera wrote:
> 
> 
> On 11/21/2022 5:07 AM, Konrad Dybcio wrote:
>>
>> On 18.11.2022 20:22, Melody Olvera wrote:
>>> Add DTs for Qualcomm IDP platforms using the QDU1000 and QRU1000
>>> SoCs.
>>>
>>> Signed-off-by: Melody Olvera <quic_molvera@quicinc.com>
>>> ---
>>>  arch/arm64/boot/dts/qcom/Makefile        |   2 +
>>>  arch/arm64/boot/dts/qcom/qdu1000-idp.dts | 266 +++++++++++++++++++++++
>>>  arch/arm64/boot/dts/qcom/qru1000-idp.dts | 266 +++++++++++++++++++++++
>>>  3 files changed, 534 insertions(+)
>>>  create mode 100644 arch/arm64/boot/dts/qcom/qdu1000-idp.dts
>>>  create mode 100644 arch/arm64/boot/dts/qcom/qru1000-idp.dts
>>>
>>> diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
>>> index afe496a93f94..da66d4a0a884 100644
>>> --- a/arch/arm64/boot/dts/qcom/Makefile
>>> +++ b/arch/arm64/boot/dts/qcom/Makefile
>>> @@ -53,7 +53,9 @@ dtb-$(CONFIG_ARCH_QCOM)	+= msm8998-sony-xperia-yoshino-maple.dtb
>>>  dtb-$(CONFIG_ARCH_QCOM)	+= msm8998-sony-xperia-yoshino-poplar.dtb
>>>  dtb-$(CONFIG_ARCH_QCOM)	+= qcs404-evb-1000.dtb
>>>  dtb-$(CONFIG_ARCH_QCOM)	+= qcs404-evb-4000.dtb
>>> +dtb-$(CONFIG_ARCH_QCOM)	+= qdu1000-idp.dtb
>>>  dtb-$(CONFIG_ARCH_QCOM)	+= qrb5165-rb5.dtb
>>> +dtb-$(CONFIG_ARCH_QCOM)	+= qru1000-idp.dtb
>>>  dtb-$(CONFIG_ARCH_QCOM)	+= sa8155p-adp.dtb
>>>  dtb-$(CONFIG_ARCH_QCOM)	+= sa8295p-adp.dtb
>>>  dtb-$(CONFIG_ARCH_QCOM)	+= sc7180-idp.dtb
>>> diff --git a/arch/arm64/boot/dts/qcom/qdu1000-idp.dts b/arch/arm64/boot/dts/qcom/qdu1000-idp.dts
>>> new file mode 100644
>>> index 000000000000..5aed483201fa
>>> --- /dev/null
>>> +++ b/arch/arm64/boot/dts/qcom/qdu1000-idp.dts
>>> @@ -0,0 +1,266 @@
>>> +// SPDX-License-Identifier: BSD-3-Clause
>>> +/*
>>> + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
>>> + */
>>> +
>>> +/dts-v1/;
>>> +
>>> +#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
>>> +#include "qdu1000.dtsi"
>>> +#include "pm8150.dtsi"
>>> +
>>> +/ {
>>> +	model = "Qualcomm Technologies, Inc. QDU1000 IDP";
>>> +	compatible = "qcom,qdu1000-idp", "qcom,qdu1000";
>> Missing chassis-type
> 
> Sorry, not sure what you mean here... Do you mean like QRD, HDK, MTP, etc.?
> If so, then IDP is the chassis type.
It's a way to describe the type of the board, you probably want "embedded" here.

Check page 30 of the PDF here:

https://buildmedia.readthedocs.org/media/pdf/devicetree-specification/latest/devicetree-specification.pdf

Konrad
> 
>>
>>> +
>>> +	aliases {
>>> +		serial0 = &uart7;
>>> +	};
>>> +
>>> +	clocks {
>>> +		xo_board: xo-board {
>>> +			compatible = "fixed-clock";
>>> +			clock-frequency = <19200000>;
>>> +			clock-output-names = "xo_board";
>>> +			#clock-cells = <0>;
>>> +		};
>>> +
>>> +		sleep_clk: sleep-clk {
>>> +			compatible = "fixed-clock";
>>> +			clock-frequency = <32000>;
>>> +			#clock-cells = <0>;
>>> +		};
>>> +
>>> +		pcie_0_pipe_clk: pcie-0-pipe-clk {
>>> +			compatible = "fixed-clock";
>>> +			clock-frequency = <1000>;
>>> +			clock-output-names = "pcie_0_pipe_clk";
>>> +			#clock-cells = <0>;
>>> +		};
>>> +
>>> +		pcie_0_phy_aux_clk: pcie-0-phy-aux-clk {
>>> +			compatible = "fixed-clock";
>>> +			clock-frequency = <1000>;
>>> +			clock-output-names = "pcie_0_phy_aux_clk";
>>> +			#clock-cells = <0>;
>>> +		};
>>> +
>>> +		usb3_phy_wrapper_pipe_clk: usb3-phy-wrapper-pipe-clk {
>>> +			compatible = "fixed-clock";
>>> +			clock-frequency = <1000>;
>>> +			clock-output-names = "usb3_phy_wrapper_pipe_clk";
>>> +			#clock-cells = <0>;
>>> +		};
>> Do these pipe clocks not come from QMPPHY?
> 
> Yes they do; I just don't have those phys ready yet. I can put a TODO here to
> move them if necessary.
> 
>>
>>> +	};
>>> +
>>> +	chosen {
>>> +		stdout-path = "serial0:115200n8";
>>> +	};
>>> +
>>> +	ppvar_sys: ppvar-sys-regulator {
>>> +		compatible = "regulator-fixed";
>>> +		regulator-name = "ppvar_sys";
>> Any chance you could add the voltage of this regulator here,
>> so the DT can better represent the hardware?
> 
> Sure.
> 
> Thanks,
> Melody
>> Konrad
>>> +		regulator-always-on;
>>> +		regulator-boot-on;
>>> +	};
>>> +
>>> +	vph_pwr: vph-pwr-regulator {
>>> +		compatible = "regulator-fixed";
>>> +		regulator-name = "vph_pwr";
>>> +		regulator-min-microvolt = <3700000>;
>>> +		regulator-max-microvolt = <3700000>;
>>> +
>>> +		regulator-always-on;
>>> +		regulator-boot-on;
>>> +
>>> +		vin-supply = <&ppvar_sys>;
>>> +	};
>>> +};
>>> +
>>> +&apps_rsc {
>>> +	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 = <&vph_pwr>;
>>> +		vdd-l3-l4-l5-l18-supply = <&vreg_s5a_2p0>;
>>> +		vdd-l6-l9-supply = <&vreg_s6a_0p9>;
>>> +		vdd-l7-l12-l14-l15-supply = <&vreg_s4a_1p8>;
>>> +		vdd-l13-l16-l17-supply = <&vph_pwr>;
>>> +
>>> +		vreg_s2a_0p5: smps2 {
>>> +			regulator-name = "vreg_s2a_0p5";
>>> +			regulator-min-microvolt = <320000>;
>>> +			regulator-max-microvolt = <570000>;
>>> +		};
>>> +
>>> +		vreg_s3a_1p05: smps3 {
>>> +			regulator-name = "vreg_s3a_1p05";
>>> +			regulator-min-microvolt = <950000>;
>>> +			regulator-max-microvolt = <1170000>;
>>> +		};
>>> +
>>> +		vreg_s4a_1p8: smps4 {
>>> +			regulator-name = "vreg_s4a_1p8";
>>> +			regulator-min-microvolt = <1800000>;
>>> +			regulator-max-microvolt = <1800000>;
>>> +		};
>>> +
>>> +		vreg_s5a_2p0: smps5 {
>>> +			regulator-name = "vreg_s5a_2p0";
>>> +			regulator-min-microvolt = <1904000>;
>>> +			regulator-max-microvolt = <2000000>;
>>> +		};
>>> +
>>> +		vreg_s6a_0p9: smps6 {
>>> +			regulator-name = "vreg_s6a_0p9";
>>> +			regulator-min-microvolt = <920000>;
>>> +			regulator-max-microvolt = <1128000>;
>>> +		};
>>> +
>>> +		vreg_s7a_1p2: smps7 {
>>> +			regulator-name = "vreg_s7a_1p2";
>>> +			regulator-min-microvolt = <1200000>;
>>> +			regulator-max-microvolt = <1200000>;
>>> +		};
>>> +
>>> +		vreg_s8a_1p3: smps8 {
>>> +			regulator-name = "vreg_s8a_1p3";
>>> +			regulator-min-microvolt = <1352000>;
>>> +			regulator-max-microvolt = <1352000>;
>>> +		};
>>> +
>>> +		vreg_l1a_0p91: ldo1 {
>>> +			regulator-name = "vreg_l1a_0p91";
>>> +			regulator-min-microvolt = <312000>;
>>> +			regulator-max-microvolt = <1304000>;
>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>>> +		};
>>> +
>>> +		vreg_l2a_2p3: ldo2 {
>>> +			regulator-name = "vreg_l2a_2p3";
>>> +			regulator-min-microvolt = <2970000>;
>>> +			regulator-max-microvolt = <3300000>;
>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>>> +		};
>>> +
>>> +		vreg_l3a_1p2: ldo3 {
>>> +			regulator-name = "vreg_l3a_1p2";
>>> +			regulator-min-microvolt = <920000>;
>>> +			regulator-max-microvolt = <1260000>;
>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>>> +		};
>>> +
>>> +		vreg_l5a_0p8: ldo5 {
>>> +			regulator-name = "vreg_l5a_0p8";
>>> +			regulator-min-microvolt = <312000>;
>>> +			regulator-max-microvolt = <1304000>;
>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>>> +		};
>>> +
>>> +		vreg_l6a_0p91: ldo6 {
>>> +			regulator-name = "vreg_l6a_0p91";
>>> +			regulator-min-microvolt = <880000>;
>>> +			regulator-max-microvolt = <950000>;
>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>>> +		};
>>> +
>>> +		vreg_l7a_1p8: ldo7 {
>>> +			regulator-name = "vreg_l7a_1p8";
>>> +			regulator-min-microvolt = <1650000>;
>>> +			regulator-max-microvolt = <2000000>;
>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>>> +
>>> +		};
>>> +
>>> +		vreg_l8a_0p91: ldo8 {
>>> +			regulator-name = "vreg_l8a_0p91";
>>> +			regulator-min-microvolt = <888000>;
>>> +			regulator-max-microvolt = <925000>;
>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>>> +		};
>>> +
>>> +		vreg_l9a_0p91: ldo9 {
>>> +			regulator-name = "vreg_l8a_0p91";
>>> +			regulator-min-microvolt = <312000>;
>>> +			regulator-max-microvolt = <1304000>;
>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>>> +		};
>>> +
>>> +		vreg_l10a_2p95: ldo10 {
>>> +			regulator-name = "vreg_l10a_2p95";
>>> +			regulator-min-microvolt = <2700000>;
>>> +			regulator-max-microvolt = <3544000>;
>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>>> +		};
>>> +
>>> +		vreg_l11a_0p91: ldo11 {
>>> +			regulator-name = "vreg_l11a_0p91";
>>> +			regulator-min-microvolt = <800000>;
>>> +			regulator-max-microvolt = <1000000>;
>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>>> +		};
>>> +
>>> +		vreg_l12a_1p8: ldo12 {
>>> +			regulator-name = "vreg_l12a_1p8";
>>> +			regulator-min-microvolt = <1504000>;
>>> +			regulator-max-microvolt = <1504000>;
>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>>> +		};
>>> +
>>> +		vreg_l14a_1p8: ldo14 {
>>> +			regulator-name = "vreg_l14a_1p8";
>>> +			regulator-min-microvolt = <1650000>;
>>> +			regulator-max-microvolt = <1950000>;
>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>>> +		};
>>> +
>>> +		vreg_l15a_1p8: ldo15 {
>>> +			regulator-name = "vreg_l15a_1p8";
>>> +			regulator-min-microvolt = <1504000>;
>>> +			regulator-max-microvolt = <2000000>;
>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>>> +		};
>>> +
>>> +		vreg_l16a_1p8: ldo16 {
>>> +			regulator-name = "vreg_l16a_1p8";
>>> +			regulator-min-microvolt = <1710000>;
>>> +			regulator-max-microvolt = <1890000>;
>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>>> +		};
>>> +
>>> +		vreg_l17a_3p3: ldo17 {
>>> +			regulator-name = "vreg_l17a_3p3";
>>> +			regulator-min-microvolt = <3000000>;
>>> +			regulator-max-microvolt = <3544000>;
>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>>> +		};
>>> +
>>> +		vreg_l18a_1p2: ldo18 {
>>> +			regulator-name = "vreg_l18a_1p2";
>>> +			regulator-min-microvolt = <312000>;
>>> +			regulator-max-microvolt = <1304000>;
>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>>> +		};
>>> +	};
>>> +};
>>> +
>>> +&qupv3_id_0 {
>>> +	status = "okay";
>>> +};
>>> +
>>> +&uart7 {
>>> +	status = "okay";
>>> +};
>>> diff --git a/arch/arm64/boot/dts/qcom/qru1000-idp.dts b/arch/arm64/boot/dts/qcom/qru1000-idp.dts
>>> new file mode 100644
>>> index 000000000000..42eb0c33e7ba
>>> --- /dev/null
>>> +++ b/arch/arm64/boot/dts/qcom/qru1000-idp.dts
>>> @@ -0,0 +1,266 @@
>>> +// SPDX-License-Identifier: BSD-3-Clause
>>> +/*
>>> + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
>>> + */
>>> +
>>> +/dts-v1/;
>>> +
>>> +#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
>>> +#include "qru1000.dtsi"
>>> +#include "pm8150.dtsi"
>>> +
>>> +/ {
>>> +	model = "Qualcomm Technologies, Inc. QRU1000 IDP";
>>> +	compatible = "qcom,qru1000-idp", "qcom,qru1000";
>>> +
>>> +	aliases {
>>> +		serial0 = &uart7;
>>> +	};
>>> +
>>> +	clocks {
>>> +		xo_board: xo-board {
>>> +			compatible = "fixed-clock";
>>> +			clock-frequency = <19200000>;
>>> +			clock-output-names = "xo_board";
>>> +			#clock-cells = <0>;
>>> +		};
>>> +
>>> +		sleep_clk: sleep-clk {
>>> +			compatible = "fixed-clock";
>>> +			clock-frequency = <32000>;
>>> +			#clock-cells = <0>;
>>> +		};
>>> +
>>> +		pcie_0_pipe_clk: pcie-0-pipe-clk {
>>> +			compatible = "fixed-clock";
>>> +			clock-frequency = <1000>;
>>> +			clock-output-names = "pcie_0_pipe_clk";
>>> +			#clock-cells = <0>;
>>> +		};
>>> +
>>> +		pcie_0_phy_aux_clk: pcie-0-phy-aux-clk {
>>> +			compatible = "fixed-clock";
>>> +			clock-frequency = <1000>;
>>> +			clock-output-names = "pcie_0_phy_aux_clk";
>>> +			#clock-cells = <0>;
>>> +		};
>>> +
>>> +		usb3_phy_wrapper_pipe_clk: usb3-phy-wrapper-pipe-clk {
>>> +			compatible = "fixed-clock";
>>> +			clock-frequency = <1000>;
>>> +			clock-output-names = "usb3_phy_wrapper_pipe_clk";
>>> +			#clock-cells = <0>;
>>> +		};
>>> +	};
>>> +
>>> +	chosen {
>>> +		stdout-path = "serial0:115200n8";
>>> +	};
>>> +
>>> +	ppvar_sys: ppvar-sys-regulator {
>>> +		compatible = "regulator-fixed";
>>> +		regulator-name = "ppvar_sys";
>>> +		regulator-always-on;
>>> +		regulator-boot-on;
>>> +	};
>>> +
>>> +	vph_pwr: vph-pwr-regulator {
>>> +		compatible = "regulator-fixed";
>>> +		regulator-name = "vph_pwr";
>>> +		regulator-min-microvolt = <3700000>;
>>> +		regulator-max-microvolt = <3700000>;
>>> +
>>> +		regulator-always-on;
>>> +		regulator-boot-on;
>>> +
>>> +		vin-supply = <&ppvar_sys>;
>>> +	};
>>> +};
>>> +
>>> +&apps_rsc {
>>> +	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 = <&vph_pwr>;
>>> +		vdd-l3-l4-l5-l18-supply = <&vreg_s5a_2p0>;
>>> +		vdd-l6-l9-supply = <&vreg_s6a_0p9>;
>>> +		vdd-l7-l12-l14-l15-supply = <&vreg_s4a_1p8>;
>>> +		vdd-l13-l16-l17-supply = <&vph_pwr>;
>>> +
>>> +		vreg_s2a_0p5: smps2 {
>>> +			regulator-name = "vreg_s2a_0p5";
>>> +			regulator-min-microvolt = <320000>;
>>> +			regulator-max-microvolt = <570000>;
>>> +		};
>>> +
>>> +		vreg_s3a_1p05: smps3 {
>>> +			regulator-name = "vreg_s3a_1p05";
>>> +			regulator-min-microvolt = <950000>;
>>> +			regulator-max-microvolt = <1170000>;
>>> +		};
>>> +
>>> +		vreg_s4a_1p8: smps4 {
>>> +			regulator-name = "vreg_s4a_1p8";
>>> +			regulator-min-microvolt = <1800000>;
>>> +			regulator-max-microvolt = <1800000>;
>>> +		};
>>> +
>>> +		vreg_s5a_2p0: smps5 {
>>> +			regulator-name = "vreg_s5a_2p0";
>>> +			regulator-min-microvolt = <1904000>;
>>> +			regulator-max-microvolt = <2000000>;
>>> +		};
>>> +
>>> +		vreg_s6a_0p9: smps6 {
>>> +			regulator-name = "vreg_s6a_0p9";
>>> +			regulator-min-microvolt = <920000>;
>>> +			regulator-max-microvolt = <1128000>;
>>> +		};
>>> +
>>> +		vreg_s7a_1p2: smps7 {
>>> +			regulator-name = "vreg_s7a_1p2";
>>> +			regulator-min-microvolt = <1200000>;
>>> +			regulator-max-microvolt = <1200000>;
>>> +		};
>>> +
>>> +		vreg_s8a_1p3: smps8 {
>>> +			regulator-name = "vreg_s8a_1p3";
>>> +			regulator-min-microvolt = <1352000>;
>>> +			regulator-max-microvolt = <1352000>;
>>> +		};
>>> +
>>> +		vreg_l1a_0p91: ldo1 {
>>> +			regulator-name = "vreg_l1a_0p91";
>>> +			regulator-min-microvolt = <312000>;
>>> +			regulator-max-microvolt = <1304000>;
>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>>> +		};
>>> +
>>> +		vreg_l2a_2p3: ldo2 {
>>> +			regulator-name = "vreg_l2a_2p3";
>>> +			regulator-min-microvolt = <2970000>;
>>> +			regulator-max-microvolt = <3300000>;
>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>>> +		};
>>> +
>>> +		vreg_l3a_1p2: ldo3 {
>>> +			regulator-name = "vreg_l3a_1p2";
>>> +			regulator-min-microvolt = <920000>;
>>> +			regulator-max-microvolt = <1260000>;
>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>>> +		};
>>> +
>>> +		vreg_l5a_0p8: ldo5 {
>>> +			regulator-name = "vreg_l5a_0p8";
>>> +			regulator-min-microvolt = <312000>;
>>> +			regulator-max-microvolt = <1304000>;
>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>>> +		};
>>> +
>>> +		vreg_l6a_0p91: ldo6 {
>>> +			regulator-name = "vreg_l6a_0p91";
>>> +			regulator-min-microvolt = <880000>;
>>> +			regulator-max-microvolt = <950000>;
>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>>> +		};
>>> +
>>> +		vreg_l7a_1p8: ldo7 {
>>> +			regulator-name = "vreg_l7a_1p8";
>>> +			regulator-min-microvolt = <1650000>;
>>> +			regulator-max-microvolt = <2000000>;
>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>>> +
>>> +		};
>>> +
>>> +		vreg_l8a_0p91: ldo8 {
>>> +			regulator-name = "vreg_l8a_0p91";
>>> +			regulator-min-microvolt = <888000>;
>>> +			regulator-max-microvolt = <925000>;
>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>>> +		};
>>> +
>>> +		vreg_l9a_0p91: ldo9 {
>>> +			regulator-name = "vreg_l8a_0p91";
>>> +			regulator-min-microvolt = <312000>;
>>> +			regulator-max-microvolt = <1304000>;
>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>>> +		};
>>> +
>>> +		vreg_l10a_2p95: ldo10 {
>>> +			regulator-name = "vreg_l10a_2p95";
>>> +			regulator-min-microvolt = <2700000>;
>>> +			regulator-max-microvolt = <3544000>;
>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>>> +		};
>>> +
>>> +		vreg_l11a_0p91: ldo11 {
>>> +			regulator-name = "vreg_l11a_0p91";
>>> +			regulator-min-microvolt = <800000>;
>>> +			regulator-max-microvolt = <1000000>;
>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>>> +		};
>>> +
>>> +		vreg_l12a_1p8: ldo12 {
>>> +			regulator-name = "vreg_l12a_1p8";
>>> +			regulator-min-microvolt = <1504000>;
>>> +			regulator-max-microvolt = <1504000>;
>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>>> +		};
>>> +
>>> +		vreg_l14a_1p8: ldo14 {
>>> +			regulator-name = "vreg_l14a_1p8";
>>> +			regulator-min-microvolt = <1650000>;
>>> +			regulator-max-microvolt = <1950000>;
>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>>> +		};
>>> +
>>> +		vreg_l15a_1p8: ldo15 {
>>> +			regulator-name = "vreg_l15a_1p8";
>>> +			regulator-min-microvolt = <1504000>;
>>> +			regulator-max-microvolt = <2000000>;
>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>>> +		};
>>> +
>>> +		vreg_l16a_1p8: ldo16 {
>>> +			regulator-name = "vreg_l16a_1p8";
>>> +			regulator-min-microvolt = <1710000>;
>>> +			regulator-max-microvolt = <1890000>;
>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>>> +		};
>>> +
>>> +		vreg_l17a_3p3: ldo17 {
>>> +			regulator-name = "vreg_l17a_3p3";
>>> +			regulator-min-microvolt = <3000000>;
>>> +			regulator-max-microvolt = <3544000>;
>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>>> +		};
>>> +
>>> +		vreg_l18a_1p2: ldo18 {
>>> +			regulator-name = "vreg_l18a_1p2";
>>> +			regulator-min-microvolt = <312000>;
>>> +			regulator-max-microvolt = <1304000>;
>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>>> +		};
>>> +	};
>>> +};
>>> +
>>> +&qupv3_id_0 {
>>> +	status = "okay";
>>> +};
>>> +
>>> +&uart7 {
>>> +	status = "okay";
>>> +};
>
Melody Olvera Nov. 21, 2022, 10:24 p.m. UTC | #4
On 11/21/2022 4:18 PM, Konrad Dybcio wrote:
>
> On 21.11.2022 23:15, Melody Olvera wrote:
>>
>> On 11/21/2022 5:07 AM, Konrad Dybcio wrote:
>>> On 18.11.2022 20:22, Melody Olvera wrote:
>>>> Add DTs for Qualcomm IDP platforms using the QDU1000 and QRU1000
>>>> SoCs.
>>>>
>>>> Signed-off-by: Melody Olvera <quic_molvera@quicinc.com>
>>>> ---
>>>>  arch/arm64/boot/dts/qcom/Makefile        |   2 +
>>>>  arch/arm64/boot/dts/qcom/qdu1000-idp.dts | 266 +++++++++++++++++++++++
>>>>  arch/arm64/boot/dts/qcom/qru1000-idp.dts | 266 +++++++++++++++++++++++
>>>>  3 files changed, 534 insertions(+)
>>>>  create mode 100644 arch/arm64/boot/dts/qcom/qdu1000-idp.dts
>>>>  create mode 100644 arch/arm64/boot/dts/qcom/qru1000-idp.dts
>>>>
>>>> diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
>>>> index afe496a93f94..da66d4a0a884 100644
>>>> --- a/arch/arm64/boot/dts/qcom/Makefile
>>>> +++ b/arch/arm64/boot/dts/qcom/Makefile
>>>> @@ -53,7 +53,9 @@ dtb-$(CONFIG_ARCH_QCOM)	+= msm8998-sony-xperia-yoshino-maple.dtb
>>>>  dtb-$(CONFIG_ARCH_QCOM)	+= msm8998-sony-xperia-yoshino-poplar.dtb
>>>>  dtb-$(CONFIG_ARCH_QCOM)	+= qcs404-evb-1000.dtb
>>>>  dtb-$(CONFIG_ARCH_QCOM)	+= qcs404-evb-4000.dtb
>>>> +dtb-$(CONFIG_ARCH_QCOM)	+= qdu1000-idp.dtb
>>>>  dtb-$(CONFIG_ARCH_QCOM)	+= qrb5165-rb5.dtb
>>>> +dtb-$(CONFIG_ARCH_QCOM)	+= qru1000-idp.dtb
>>>>  dtb-$(CONFIG_ARCH_QCOM)	+= sa8155p-adp.dtb
>>>>  dtb-$(CONFIG_ARCH_QCOM)	+= sa8295p-adp.dtb
>>>>  dtb-$(CONFIG_ARCH_QCOM)	+= sc7180-idp.dtb
>>>> diff --git a/arch/arm64/boot/dts/qcom/qdu1000-idp.dts b/arch/arm64/boot/dts/qcom/qdu1000-idp.dts
>>>> new file mode 100644
>>>> index 000000000000..5aed483201fa
>>>> --- /dev/null
>>>> +++ b/arch/arm64/boot/dts/qcom/qdu1000-idp.dts
>>>> @@ -0,0 +1,266 @@
>>>> +// SPDX-License-Identifier: BSD-3-Clause
>>>> +/*
>>>> + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
>>>> + */
>>>> +
>>>> +/dts-v1/;
>>>> +
>>>> +#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
>>>> +#include "qdu1000.dtsi"
>>>> +#include "pm8150.dtsi"
>>>> +
>>>> +/ {
>>>> +	model = "Qualcomm Technologies, Inc. QDU1000 IDP";
>>>> +	compatible = "qcom,qdu1000-idp", "qcom,qdu1000";
>>> Missing chassis-type
>> Sorry, not sure what you mean here... Do you mean like QRD, HDK, MTP, etc.?
>> If so, then IDP is the chassis type.
> It's a way to describe the type of the board, you probably want "embedded" here.
>
> Check page 30 of the PDF here:
>
> https://buildmedia.readthedocs.org/media/pdf/devicetree-specification/latest/devicetree-specification.pdf

Ah, ok; thanks so much. Yeah embedded is the way to go.

Thanks,
Melody
>
> Konrad
>>>> +
>>>> +	aliases {
>>>> +		serial0 = &uart7;
>>>> +	};
>>>> +
>>>> +	clocks {
>>>> +		xo_board: xo-board {
>>>> +			compatible = "fixed-clock";
>>>> +			clock-frequency = <19200000>;
>>>> +			clock-output-names = "xo_board";
>>>> +			#clock-cells = <0>;
>>>> +		};
>>>> +
>>>> +		sleep_clk: sleep-clk {
>>>> +			compatible = "fixed-clock";
>>>> +			clock-frequency = <32000>;
>>>> +			#clock-cells = <0>;
>>>> +		};
>>>> +
>>>> +		pcie_0_pipe_clk: pcie-0-pipe-clk {
>>>> +			compatible = "fixed-clock";
>>>> +			clock-frequency = <1000>;
>>>> +			clock-output-names = "pcie_0_pipe_clk";
>>>> +			#clock-cells = <0>;
>>>> +		};
>>>> +
>>>> +		pcie_0_phy_aux_clk: pcie-0-phy-aux-clk {
>>>> +			compatible = "fixed-clock";
>>>> +			clock-frequency = <1000>;
>>>> +			clock-output-names = "pcie_0_phy_aux_clk";
>>>> +			#clock-cells = <0>;
>>>> +		};
>>>> +
>>>> +		usb3_phy_wrapper_pipe_clk: usb3-phy-wrapper-pipe-clk {
>>>> +			compatible = "fixed-clock";
>>>> +			clock-frequency = <1000>;
>>>> +			clock-output-names = "usb3_phy_wrapper_pipe_clk";
>>>> +			#clock-cells = <0>;
>>>> +		};
>>> Do these pipe clocks not come from QMPPHY?
>> Yes they do; I just don't have those phys ready yet. I can put a TODO here to
>> move them if necessary.
>>
>>>> +	};
>>>> +
>>>> +	chosen {
>>>> +		stdout-path = "serial0:115200n8";
>>>> +	};
>>>> +
>>>> +	ppvar_sys: ppvar-sys-regulator {
>>>> +		compatible = "regulator-fixed";
>>>> +		regulator-name = "ppvar_sys";
>>> Any chance you could add the voltage of this regulator here,
>>> so the DT can better represent the hardware?
>> Sure.
>>
>> Thanks,
>> Melody
>>> Konrad
>>>> +		regulator-always-on;
>>>> +		regulator-boot-on;
>>>> +	};
>>>> +
>>>> +	vph_pwr: vph-pwr-regulator {
>>>> +		compatible = "regulator-fixed";
>>>> +		regulator-name = "vph_pwr";
>>>> +		regulator-min-microvolt = <3700000>;
>>>> +		regulator-max-microvolt = <3700000>;
>>>> +
>>>> +		regulator-always-on;
>>>> +		regulator-boot-on;
>>>> +
>>>> +		vin-supply = <&ppvar_sys>;
>>>> +	};
>>>> +};
>>>> +
>>>> +&apps_rsc {
>>>> +	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 = <&vph_pwr>;
>>>> +		vdd-l3-l4-l5-l18-supply = <&vreg_s5a_2p0>;
>>>> +		vdd-l6-l9-supply = <&vreg_s6a_0p9>;
>>>> +		vdd-l7-l12-l14-l15-supply = <&vreg_s4a_1p8>;
>>>> +		vdd-l13-l16-l17-supply = <&vph_pwr>;
>>>> +
>>>> +		vreg_s2a_0p5: smps2 {
>>>> +			regulator-name = "vreg_s2a_0p5";
>>>> +			regulator-min-microvolt = <320000>;
>>>> +			regulator-max-microvolt = <570000>;
>>>> +		};
>>>> +
>>>> +		vreg_s3a_1p05: smps3 {
>>>> +			regulator-name = "vreg_s3a_1p05";
>>>> +			regulator-min-microvolt = <950000>;
>>>> +			regulator-max-microvolt = <1170000>;
>>>> +		};
>>>> +
>>>> +		vreg_s4a_1p8: smps4 {
>>>> +			regulator-name = "vreg_s4a_1p8";
>>>> +			regulator-min-microvolt = <1800000>;
>>>> +			regulator-max-microvolt = <1800000>;
>>>> +		};
>>>> +
>>>> +		vreg_s5a_2p0: smps5 {
>>>> +			regulator-name = "vreg_s5a_2p0";
>>>> +			regulator-min-microvolt = <1904000>;
>>>> +			regulator-max-microvolt = <2000000>;
>>>> +		};
>>>> +
>>>> +		vreg_s6a_0p9: smps6 {
>>>> +			regulator-name = "vreg_s6a_0p9";
>>>> +			regulator-min-microvolt = <920000>;
>>>> +			regulator-max-microvolt = <1128000>;
>>>> +		};
>>>> +
>>>> +		vreg_s7a_1p2: smps7 {
>>>> +			regulator-name = "vreg_s7a_1p2";
>>>> +			regulator-min-microvolt = <1200000>;
>>>> +			regulator-max-microvolt = <1200000>;
>>>> +		};
>>>> +
>>>> +		vreg_s8a_1p3: smps8 {
>>>> +			regulator-name = "vreg_s8a_1p3";
>>>> +			regulator-min-microvolt = <1352000>;
>>>> +			regulator-max-microvolt = <1352000>;
>>>> +		};
>>>> +
>>>> +		vreg_l1a_0p91: ldo1 {
>>>> +			regulator-name = "vreg_l1a_0p91";
>>>> +			regulator-min-microvolt = <312000>;
>>>> +			regulator-max-microvolt = <1304000>;
>>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>>>> +		};
>>>> +
>>>> +		vreg_l2a_2p3: ldo2 {
>>>> +			regulator-name = "vreg_l2a_2p3";
>>>> +			regulator-min-microvolt = <2970000>;
>>>> +			regulator-max-microvolt = <3300000>;
>>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>>>> +		};
>>>> +
>>>> +		vreg_l3a_1p2: ldo3 {
>>>> +			regulator-name = "vreg_l3a_1p2";
>>>> +			regulator-min-microvolt = <920000>;
>>>> +			regulator-max-microvolt = <1260000>;
>>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>>>> +		};
>>>> +
>>>> +		vreg_l5a_0p8: ldo5 {
>>>> +			regulator-name = "vreg_l5a_0p8";
>>>> +			regulator-min-microvolt = <312000>;
>>>> +			regulator-max-microvolt = <1304000>;
>>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>>>> +		};
>>>> +
>>>> +		vreg_l6a_0p91: ldo6 {
>>>> +			regulator-name = "vreg_l6a_0p91";
>>>> +			regulator-min-microvolt = <880000>;
>>>> +			regulator-max-microvolt = <950000>;
>>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>>>> +		};
>>>> +
>>>> +		vreg_l7a_1p8: ldo7 {
>>>> +			regulator-name = "vreg_l7a_1p8";
>>>> +			regulator-min-microvolt = <1650000>;
>>>> +			regulator-max-microvolt = <2000000>;
>>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>>>> +
>>>> +		};
>>>> +
>>>> +		vreg_l8a_0p91: ldo8 {
>>>> +			regulator-name = "vreg_l8a_0p91";
>>>> +			regulator-min-microvolt = <888000>;
>>>> +			regulator-max-microvolt = <925000>;
>>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>>>> +		};
>>>> +
>>>> +		vreg_l9a_0p91: ldo9 {
>>>> +			regulator-name = "vreg_l8a_0p91";
>>>> +			regulator-min-microvolt = <312000>;
>>>> +			regulator-max-microvolt = <1304000>;
>>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>>>> +		};
>>>> +
>>>> +		vreg_l10a_2p95: ldo10 {
>>>> +			regulator-name = "vreg_l10a_2p95";
>>>> +			regulator-min-microvolt = <2700000>;
>>>> +			regulator-max-microvolt = <3544000>;
>>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>>>> +		};
>>>> +
>>>> +		vreg_l11a_0p91: ldo11 {
>>>> +			regulator-name = "vreg_l11a_0p91";
>>>> +			regulator-min-microvolt = <800000>;
>>>> +			regulator-max-microvolt = <1000000>;
>>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>>>> +		};
>>>> +
>>>> +		vreg_l12a_1p8: ldo12 {
>>>> +			regulator-name = "vreg_l12a_1p8";
>>>> +			regulator-min-microvolt = <1504000>;
>>>> +			regulator-max-microvolt = <1504000>;
>>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>>>> +		};
>>>> +
>>>> +		vreg_l14a_1p8: ldo14 {
>>>> +			regulator-name = "vreg_l14a_1p8";
>>>> +			regulator-min-microvolt = <1650000>;
>>>> +			regulator-max-microvolt = <1950000>;
>>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>>>> +		};
>>>> +
>>>> +		vreg_l15a_1p8: ldo15 {
>>>> +			regulator-name = "vreg_l15a_1p8";
>>>> +			regulator-min-microvolt = <1504000>;
>>>> +			regulator-max-microvolt = <2000000>;
>>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>>>> +		};
>>>> +
>>>> +		vreg_l16a_1p8: ldo16 {
>>>> +			regulator-name = "vreg_l16a_1p8";
>>>> +			regulator-min-microvolt = <1710000>;
>>>> +			regulator-max-microvolt = <1890000>;
>>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>>>> +		};
>>>> +
>>>> +		vreg_l17a_3p3: ldo17 {
>>>> +			regulator-name = "vreg_l17a_3p3";
>>>> +			regulator-min-microvolt = <3000000>;
>>>> +			regulator-max-microvolt = <3544000>;
>>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>>>> +		};
>>>> +
>>>> +		vreg_l18a_1p2: ldo18 {
>>>> +			regulator-name = "vreg_l18a_1p2";
>>>> +			regulator-min-microvolt = <312000>;
>>>> +			regulator-max-microvolt = <1304000>;
>>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>>>> +		};
>>>> +	};
>>>> +};
>>>> +
>>>> +&qupv3_id_0 {
>>>> +	status = "okay";
>>>> +};
>>>> +
>>>> +&uart7 {
>>>> +	status = "okay";
>>>> +};
>>>> diff --git a/arch/arm64/boot/dts/qcom/qru1000-idp.dts b/arch/arm64/boot/dts/qcom/qru1000-idp.dts
>>>> new file mode 100644
>>>> index 000000000000..42eb0c33e7ba
>>>> --- /dev/null
>>>> +++ b/arch/arm64/boot/dts/qcom/qru1000-idp.dts
>>>> @@ -0,0 +1,266 @@
>>>> +// SPDX-License-Identifier: BSD-3-Clause
>>>> +/*
>>>> + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
>>>> + */
>>>> +
>>>> +/dts-v1/;
>>>> +
>>>> +#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
>>>> +#include "qru1000.dtsi"
>>>> +#include "pm8150.dtsi"
>>>> +
>>>> +/ {
>>>> +	model = "Qualcomm Technologies, Inc. QRU1000 IDP";
>>>> +	compatible = "qcom,qru1000-idp", "qcom,qru1000";
>>>> +
>>>> +	aliases {
>>>> +		serial0 = &uart7;
>>>> +	};
>>>> +
>>>> +	clocks {
>>>> +		xo_board: xo-board {
>>>> +			compatible = "fixed-clock";
>>>> +			clock-frequency = <19200000>;
>>>> +			clock-output-names = "xo_board";
>>>> +			#clock-cells = <0>;
>>>> +		};
>>>> +
>>>> +		sleep_clk: sleep-clk {
>>>> +			compatible = "fixed-clock";
>>>> +			clock-frequency = <32000>;
>>>> +			#clock-cells = <0>;
>>>> +		};
>>>> +
>>>> +		pcie_0_pipe_clk: pcie-0-pipe-clk {
>>>> +			compatible = "fixed-clock";
>>>> +			clock-frequency = <1000>;
>>>> +			clock-output-names = "pcie_0_pipe_clk";
>>>> +			#clock-cells = <0>;
>>>> +		};
>>>> +
>>>> +		pcie_0_phy_aux_clk: pcie-0-phy-aux-clk {
>>>> +			compatible = "fixed-clock";
>>>> +			clock-frequency = <1000>;
>>>> +			clock-output-names = "pcie_0_phy_aux_clk";
>>>> +			#clock-cells = <0>;
>>>> +		};
>>>> +
>>>> +		usb3_phy_wrapper_pipe_clk: usb3-phy-wrapper-pipe-clk {
>>>> +			compatible = "fixed-clock";
>>>> +			clock-frequency = <1000>;
>>>> +			clock-output-names = "usb3_phy_wrapper_pipe_clk";
>>>> +			#clock-cells = <0>;
>>>> +		};
>>>> +	};
>>>> +
>>>> +	chosen {
>>>> +		stdout-path = "serial0:115200n8";
>>>> +	};
>>>> +
>>>> +	ppvar_sys: ppvar-sys-regulator {
>>>> +		compatible = "regulator-fixed";
>>>> +		regulator-name = "ppvar_sys";
>>>> +		regulator-always-on;
>>>> +		regulator-boot-on;
>>>> +	};
>>>> +
>>>> +	vph_pwr: vph-pwr-regulator {
>>>> +		compatible = "regulator-fixed";
>>>> +		regulator-name = "vph_pwr";
>>>> +		regulator-min-microvolt = <3700000>;
>>>> +		regulator-max-microvolt = <3700000>;
>>>> +
>>>> +		regulator-always-on;
>>>> +		regulator-boot-on;
>>>> +
>>>> +		vin-supply = <&ppvar_sys>;
>>>> +	};
>>>> +};
>>>> +
>>>> +&apps_rsc {
>>>> +	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 = <&vph_pwr>;
>>>> +		vdd-l3-l4-l5-l18-supply = <&vreg_s5a_2p0>;
>>>> +		vdd-l6-l9-supply = <&vreg_s6a_0p9>;
>>>> +		vdd-l7-l12-l14-l15-supply = <&vreg_s4a_1p8>;
>>>> +		vdd-l13-l16-l17-supply = <&vph_pwr>;
>>>> +
>>>> +		vreg_s2a_0p5: smps2 {
>>>> +			regulator-name = "vreg_s2a_0p5";
>>>> +			regulator-min-microvolt = <320000>;
>>>> +			regulator-max-microvolt = <570000>;
>>>> +		};
>>>> +
>>>> +		vreg_s3a_1p05: smps3 {
>>>> +			regulator-name = "vreg_s3a_1p05";
>>>> +			regulator-min-microvolt = <950000>;
>>>> +			regulator-max-microvolt = <1170000>;
>>>> +		};
>>>> +
>>>> +		vreg_s4a_1p8: smps4 {
>>>> +			regulator-name = "vreg_s4a_1p8";
>>>> +			regulator-min-microvolt = <1800000>;
>>>> +			regulator-max-microvolt = <1800000>;
>>>> +		};
>>>> +
>>>> +		vreg_s5a_2p0: smps5 {
>>>> +			regulator-name = "vreg_s5a_2p0";
>>>> +			regulator-min-microvolt = <1904000>;
>>>> +			regulator-max-microvolt = <2000000>;
>>>> +		};
>>>> +
>>>> +		vreg_s6a_0p9: smps6 {
>>>> +			regulator-name = "vreg_s6a_0p9";
>>>> +			regulator-min-microvolt = <920000>;
>>>> +			regulator-max-microvolt = <1128000>;
>>>> +		};
>>>> +
>>>> +		vreg_s7a_1p2: smps7 {
>>>> +			regulator-name = "vreg_s7a_1p2";
>>>> +			regulator-min-microvolt = <1200000>;
>>>> +			regulator-max-microvolt = <1200000>;
>>>> +		};
>>>> +
>>>> +		vreg_s8a_1p3: smps8 {
>>>> +			regulator-name = "vreg_s8a_1p3";
>>>> +			regulator-min-microvolt = <1352000>;
>>>> +			regulator-max-microvolt = <1352000>;
>>>> +		};
>>>> +
>>>> +		vreg_l1a_0p91: ldo1 {
>>>> +			regulator-name = "vreg_l1a_0p91";
>>>> +			regulator-min-microvolt = <312000>;
>>>> +			regulator-max-microvolt = <1304000>;
>>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>>>> +		};
>>>> +
>>>> +		vreg_l2a_2p3: ldo2 {
>>>> +			regulator-name = "vreg_l2a_2p3";
>>>> +			regulator-min-microvolt = <2970000>;
>>>> +			regulator-max-microvolt = <3300000>;
>>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>>>> +		};
>>>> +
>>>> +		vreg_l3a_1p2: ldo3 {
>>>> +			regulator-name = "vreg_l3a_1p2";
>>>> +			regulator-min-microvolt = <920000>;
>>>> +			regulator-max-microvolt = <1260000>;
>>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>>>> +		};
>>>> +
>>>> +		vreg_l5a_0p8: ldo5 {
>>>> +			regulator-name = "vreg_l5a_0p8";
>>>> +			regulator-min-microvolt = <312000>;
>>>> +			regulator-max-microvolt = <1304000>;
>>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>>>> +		};
>>>> +
>>>> +		vreg_l6a_0p91: ldo6 {
>>>> +			regulator-name = "vreg_l6a_0p91";
>>>> +			regulator-min-microvolt = <880000>;
>>>> +			regulator-max-microvolt = <950000>;
>>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>>>> +		};
>>>> +
>>>> +		vreg_l7a_1p8: ldo7 {
>>>> +			regulator-name = "vreg_l7a_1p8";
>>>> +			regulator-min-microvolt = <1650000>;
>>>> +			regulator-max-microvolt = <2000000>;
>>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>>>> +
>>>> +		};
>>>> +
>>>> +		vreg_l8a_0p91: ldo8 {
>>>> +			regulator-name = "vreg_l8a_0p91";
>>>> +			regulator-min-microvolt = <888000>;
>>>> +			regulator-max-microvolt = <925000>;
>>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>>>> +		};
>>>> +
>>>> +		vreg_l9a_0p91: ldo9 {
>>>> +			regulator-name = "vreg_l8a_0p91";
>>>> +			regulator-min-microvolt = <312000>;
>>>> +			regulator-max-microvolt = <1304000>;
>>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>>>> +		};
>>>> +
>>>> +		vreg_l10a_2p95: ldo10 {
>>>> +			regulator-name = "vreg_l10a_2p95";
>>>> +			regulator-min-microvolt = <2700000>;
>>>> +			regulator-max-microvolt = <3544000>;
>>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>>>> +		};
>>>> +
>>>> +		vreg_l11a_0p91: ldo11 {
>>>> +			regulator-name = "vreg_l11a_0p91";
>>>> +			regulator-min-microvolt = <800000>;
>>>> +			regulator-max-microvolt = <1000000>;
>>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>>>> +		};
>>>> +
>>>> +		vreg_l12a_1p8: ldo12 {
>>>> +			regulator-name = "vreg_l12a_1p8";
>>>> +			regulator-min-microvolt = <1504000>;
>>>> +			regulator-max-microvolt = <1504000>;
>>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>>>> +		};
>>>> +
>>>> +		vreg_l14a_1p8: ldo14 {
>>>> +			regulator-name = "vreg_l14a_1p8";
>>>> +			regulator-min-microvolt = <1650000>;
>>>> +			regulator-max-microvolt = <1950000>;
>>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>>>> +		};
>>>> +
>>>> +		vreg_l15a_1p8: ldo15 {
>>>> +			regulator-name = "vreg_l15a_1p8";
>>>> +			regulator-min-microvolt = <1504000>;
>>>> +			regulator-max-microvolt = <2000000>;
>>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>>>> +		};
>>>> +
>>>> +		vreg_l16a_1p8: ldo16 {
>>>> +			regulator-name = "vreg_l16a_1p8";
>>>> +			regulator-min-microvolt = <1710000>;
>>>> +			regulator-max-microvolt = <1890000>;
>>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>>>> +		};
>>>> +
>>>> +		vreg_l17a_3p3: ldo17 {
>>>> +			regulator-name = "vreg_l17a_3p3";
>>>> +			regulator-min-microvolt = <3000000>;
>>>> +			regulator-max-microvolt = <3544000>;
>>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>>>> +		};
>>>> +
>>>> +		vreg_l18a_1p2: ldo18 {
>>>> +			regulator-name = "vreg_l18a_1p2";
>>>> +			regulator-min-microvolt = <312000>;
>>>> +			regulator-max-microvolt = <1304000>;
>>>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>>>> +		};
>>>> +	};
>>>> +};
>>>> +
>>>> +&qupv3_id_0 {
>>>> +	status = "okay";
>>>> +};
>>>> +
>>>> +&uart7 {
>>>> +	status = "okay";
>>>> +};
Bjorn Andersson Dec. 2, 2022, 3:37 a.m. UTC | #5
On Fri, Nov 18, 2022 at 11:22:41AM -0800, Melody Olvera wrote:
> Add DTs for Qualcomm IDP platforms using the QDU1000 and QRU1000
> SoCs.
> 
> Signed-off-by: Melody Olvera <quic_molvera@quicinc.com>
> ---
>  arch/arm64/boot/dts/qcom/Makefile        |   2 +
>  arch/arm64/boot/dts/qcom/qdu1000-idp.dts | 266 +++++++++++++++++++++++
>  arch/arm64/boot/dts/qcom/qru1000-idp.dts | 266 +++++++++++++++++++++++
>  3 files changed, 534 insertions(+)
>  create mode 100644 arch/arm64/boot/dts/qcom/qdu1000-idp.dts
>  create mode 100644 arch/arm64/boot/dts/qcom/qru1000-idp.dts
> 
> diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
> index afe496a93f94..da66d4a0a884 100644
> --- a/arch/arm64/boot/dts/qcom/Makefile
> +++ b/arch/arm64/boot/dts/qcom/Makefile
> @@ -53,7 +53,9 @@ dtb-$(CONFIG_ARCH_QCOM)	+= msm8998-sony-xperia-yoshino-maple.dtb
>  dtb-$(CONFIG_ARCH_QCOM)	+= msm8998-sony-xperia-yoshino-poplar.dtb
>  dtb-$(CONFIG_ARCH_QCOM)	+= qcs404-evb-1000.dtb
>  dtb-$(CONFIG_ARCH_QCOM)	+= qcs404-evb-4000.dtb
> +dtb-$(CONFIG_ARCH_QCOM)	+= qdu1000-idp.dtb
>  dtb-$(CONFIG_ARCH_QCOM)	+= qrb5165-rb5.dtb
> +dtb-$(CONFIG_ARCH_QCOM)	+= qru1000-idp.dtb
>  dtb-$(CONFIG_ARCH_QCOM)	+= sa8155p-adp.dtb
>  dtb-$(CONFIG_ARCH_QCOM)	+= sa8295p-adp.dtb
>  dtb-$(CONFIG_ARCH_QCOM)	+= sc7180-idp.dtb
> diff --git a/arch/arm64/boot/dts/qcom/qdu1000-idp.dts b/arch/arm64/boot/dts/qcom/qdu1000-idp.dts
> new file mode 100644
> index 000000000000..5aed483201fa
> --- /dev/null
> +++ b/arch/arm64/boot/dts/qcom/qdu1000-idp.dts
> @@ -0,0 +1,266 @@
> +// SPDX-License-Identifier: BSD-3-Clause
> +/*
> + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
> + */
> +
> +/dts-v1/;
> +
> +#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
> +#include "qdu1000.dtsi"
> +#include "pm8150.dtsi"
> +
> +/ {
> +	model = "Qualcomm Technologies, Inc. QDU1000 IDP";
> +	compatible = "qcom,qdu1000-idp", "qcom,qdu1000";
> +
> +	aliases {
> +		serial0 = &uart7;
> +	};
> +
> +	clocks {
> +		xo_board: xo-board {

Please add a -clk suffix to the node name.

> +			compatible = "fixed-clock";
> +			clock-frequency = <19200000>;
> +			clock-output-names = "xo_board";

Nothing should rely on this name, so please don't specify it.

> +			#clock-cells = <0>;
> +		};
> +
> +		sleep_clk: sleep-clk {
> +			compatible = "fixed-clock";
> +			clock-frequency = <32000>;
> +			#clock-cells = <0>;
> +		};
> +
> +		pcie_0_pipe_clk: pcie-0-pipe-clk {

Afaict these clocks are not referenced anywhere, so please skip them.

> +			compatible = "fixed-clock";
> +			clock-frequency = <1000>;
> +			clock-output-names = "pcie_0_pipe_clk";
> +			#clock-cells = <0>;
> +		};
> +
> +		pcie_0_phy_aux_clk: pcie-0-phy-aux-clk {
> +			compatible = "fixed-clock";
> +			clock-frequency = <1000>;
> +			clock-output-names = "pcie_0_phy_aux_clk";
> +			#clock-cells = <0>;
> +		};
> +
> +		usb3_phy_wrapper_pipe_clk: usb3-phy-wrapper-pipe-clk {
> +			compatible = "fixed-clock";
> +			clock-frequency = <1000>;
> +			clock-output-names = "usb3_phy_wrapper_pipe_clk";
> +			#clock-cells = <0>;
> +		};
> +	};
> +
> +	chosen {

"ch" < "cl", so please move this up.

> +		stdout-path = "serial0:115200n8";
> +	};
> +
> +	ppvar_sys: ppvar-sys-regulator {
> +		compatible = "regulator-fixed";
> +		regulator-name = "ppvar_sys";
> +		regulator-always-on;
> +		regulator-boot-on;
> +	};
> +
> +	vph_pwr: vph-pwr-regulator {
> +		compatible = "regulator-fixed";
> +		regulator-name = "vph_pwr";
> +		regulator-min-microvolt = <3700000>;
> +		regulator-max-microvolt = <3700000>;
> +
> +		regulator-always-on;
> +		regulator-boot-on;
> +
> +		vin-supply = <&ppvar_sys>;
> +	};
> +};
> +
> +&apps_rsc {
> +	regulators {

Seems like this is supposed to match -regulators$, so how about
pm8150-regulators?

Regards,
Bjorn

> +		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 = <&vph_pwr>;
> +		vdd-l3-l4-l5-l18-supply = <&vreg_s5a_2p0>;
> +		vdd-l6-l9-supply = <&vreg_s6a_0p9>;
> +		vdd-l7-l12-l14-l15-supply = <&vreg_s4a_1p8>;
> +		vdd-l13-l16-l17-supply = <&vph_pwr>;
> +
> +		vreg_s2a_0p5: smps2 {
> +			regulator-name = "vreg_s2a_0p5";
> +			regulator-min-microvolt = <320000>;
> +			regulator-max-microvolt = <570000>;
> +		};
> +
> +		vreg_s3a_1p05: smps3 {
> +			regulator-name = "vreg_s3a_1p05";
> +			regulator-min-microvolt = <950000>;
> +			regulator-max-microvolt = <1170000>;
> +		};
> +
> +		vreg_s4a_1p8: smps4 {
> +			regulator-name = "vreg_s4a_1p8";
> +			regulator-min-microvolt = <1800000>;
> +			regulator-max-microvolt = <1800000>;
> +		};
> +
> +		vreg_s5a_2p0: smps5 {
> +			regulator-name = "vreg_s5a_2p0";
> +			regulator-min-microvolt = <1904000>;
> +			regulator-max-microvolt = <2000000>;
> +		};
> +
> +		vreg_s6a_0p9: smps6 {
> +			regulator-name = "vreg_s6a_0p9";
> +			regulator-min-microvolt = <920000>;
> +			regulator-max-microvolt = <1128000>;
> +		};
> +
> +		vreg_s7a_1p2: smps7 {
> +			regulator-name = "vreg_s7a_1p2";
> +			regulator-min-microvolt = <1200000>;
> +			regulator-max-microvolt = <1200000>;
> +		};
> +
> +		vreg_s8a_1p3: smps8 {
> +			regulator-name = "vreg_s8a_1p3";
> +			regulator-min-microvolt = <1352000>;
> +			regulator-max-microvolt = <1352000>;
> +		};
> +
> +		vreg_l1a_0p91: ldo1 {
> +			regulator-name = "vreg_l1a_0p91";
> +			regulator-min-microvolt = <312000>;
> +			regulator-max-microvolt = <1304000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> +		};
> +
> +		vreg_l2a_2p3: ldo2 {
> +			regulator-name = "vreg_l2a_2p3";
> +			regulator-min-microvolt = <2970000>;
> +			regulator-max-microvolt = <3300000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> +		};
> +
> +		vreg_l3a_1p2: ldo3 {
> +			regulator-name = "vreg_l3a_1p2";
> +			regulator-min-microvolt = <920000>;
> +			regulator-max-microvolt = <1260000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> +		};
> +
> +		vreg_l5a_0p8: ldo5 {
> +			regulator-name = "vreg_l5a_0p8";
> +			regulator-min-microvolt = <312000>;
> +			regulator-max-microvolt = <1304000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> +		};
> +
> +		vreg_l6a_0p91: ldo6 {
> +			regulator-name = "vreg_l6a_0p91";
> +			regulator-min-microvolt = <880000>;
> +			regulator-max-microvolt = <950000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> +		};
> +
> +		vreg_l7a_1p8: ldo7 {
> +			regulator-name = "vreg_l7a_1p8";
> +			regulator-min-microvolt = <1650000>;
> +			regulator-max-microvolt = <2000000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> +
> +		};
> +
> +		vreg_l8a_0p91: ldo8 {
> +			regulator-name = "vreg_l8a_0p91";
> +			regulator-min-microvolt = <888000>;
> +			regulator-max-microvolt = <925000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> +		};
> +
> +		vreg_l9a_0p91: ldo9 {
> +			regulator-name = "vreg_l8a_0p91";
> +			regulator-min-microvolt = <312000>;
> +			regulator-max-microvolt = <1304000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> +		};
> +
> +		vreg_l10a_2p95: ldo10 {
> +			regulator-name = "vreg_l10a_2p95";
> +			regulator-min-microvolt = <2700000>;
> +			regulator-max-microvolt = <3544000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> +		};
> +
> +		vreg_l11a_0p91: ldo11 {
> +			regulator-name = "vreg_l11a_0p91";
> +			regulator-min-microvolt = <800000>;
> +			regulator-max-microvolt = <1000000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> +		};
> +
> +		vreg_l12a_1p8: ldo12 {
> +			regulator-name = "vreg_l12a_1p8";
> +			regulator-min-microvolt = <1504000>;
> +			regulator-max-microvolt = <1504000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> +		};
> +
> +		vreg_l14a_1p8: ldo14 {
> +			regulator-name = "vreg_l14a_1p8";
> +			regulator-min-microvolt = <1650000>;
> +			regulator-max-microvolt = <1950000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> +		};
> +
> +		vreg_l15a_1p8: ldo15 {
> +			regulator-name = "vreg_l15a_1p8";
> +			regulator-min-microvolt = <1504000>;
> +			regulator-max-microvolt = <2000000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> +		};
> +
> +		vreg_l16a_1p8: ldo16 {
> +			regulator-name = "vreg_l16a_1p8";
> +			regulator-min-microvolt = <1710000>;
> +			regulator-max-microvolt = <1890000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> +		};
> +
> +		vreg_l17a_3p3: ldo17 {
> +			regulator-name = "vreg_l17a_3p3";
> +			regulator-min-microvolt = <3000000>;
> +			regulator-max-microvolt = <3544000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> +		};
> +
> +		vreg_l18a_1p2: ldo18 {
> +			regulator-name = "vreg_l18a_1p2";
> +			regulator-min-microvolt = <312000>;
> +			regulator-max-microvolt = <1304000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> +		};
> +	};
> +};
> +
> +&qupv3_id_0 {
> +	status = "okay";
> +};
> +
> +&uart7 {
> +	status = "okay";
> +};
> diff --git a/arch/arm64/boot/dts/qcom/qru1000-idp.dts b/arch/arm64/boot/dts/qcom/qru1000-idp.dts
> new file mode 100644
> index 000000000000..42eb0c33e7ba
> --- /dev/null
> +++ b/arch/arm64/boot/dts/qcom/qru1000-idp.dts
> @@ -0,0 +1,266 @@
> +// SPDX-License-Identifier: BSD-3-Clause
> +/*
> + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
> + */
> +
> +/dts-v1/;
> +
> +#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
> +#include "qru1000.dtsi"
> +#include "pm8150.dtsi"
> +
> +/ {
> +	model = "Qualcomm Technologies, Inc. QRU1000 IDP";
> +	compatible = "qcom,qru1000-idp", "qcom,qru1000";
> +
> +	aliases {
> +		serial0 = &uart7;
> +	};
> +
> +	clocks {
> +		xo_board: xo-board {
> +			compatible = "fixed-clock";
> +			clock-frequency = <19200000>;
> +			clock-output-names = "xo_board";
> +			#clock-cells = <0>;
> +		};
> +
> +		sleep_clk: sleep-clk {
> +			compatible = "fixed-clock";
> +			clock-frequency = <32000>;
> +			#clock-cells = <0>;
> +		};
> +
> +		pcie_0_pipe_clk: pcie-0-pipe-clk {
> +			compatible = "fixed-clock";
> +			clock-frequency = <1000>;
> +			clock-output-names = "pcie_0_pipe_clk";
> +			#clock-cells = <0>;
> +		};
> +
> +		pcie_0_phy_aux_clk: pcie-0-phy-aux-clk {
> +			compatible = "fixed-clock";
> +			clock-frequency = <1000>;
> +			clock-output-names = "pcie_0_phy_aux_clk";
> +			#clock-cells = <0>;
> +		};
> +
> +		usb3_phy_wrapper_pipe_clk: usb3-phy-wrapper-pipe-clk {
> +			compatible = "fixed-clock";
> +			clock-frequency = <1000>;
> +			clock-output-names = "usb3_phy_wrapper_pipe_clk";
> +			#clock-cells = <0>;
> +		};
> +	};
> +
> +	chosen {
> +		stdout-path = "serial0:115200n8";
> +	};
> +
> +	ppvar_sys: ppvar-sys-regulator {
> +		compatible = "regulator-fixed";
> +		regulator-name = "ppvar_sys";
> +		regulator-always-on;
> +		regulator-boot-on;
> +	};
> +
> +	vph_pwr: vph-pwr-regulator {
> +		compatible = "regulator-fixed";
> +		regulator-name = "vph_pwr";
> +		regulator-min-microvolt = <3700000>;
> +		regulator-max-microvolt = <3700000>;
> +
> +		regulator-always-on;
> +		regulator-boot-on;
> +
> +		vin-supply = <&ppvar_sys>;
> +	};
> +};
> +
> +&apps_rsc {
> +	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 = <&vph_pwr>;
> +		vdd-l3-l4-l5-l18-supply = <&vreg_s5a_2p0>;
> +		vdd-l6-l9-supply = <&vreg_s6a_0p9>;
> +		vdd-l7-l12-l14-l15-supply = <&vreg_s4a_1p8>;
> +		vdd-l13-l16-l17-supply = <&vph_pwr>;
> +
> +		vreg_s2a_0p5: smps2 {
> +			regulator-name = "vreg_s2a_0p5";
> +			regulator-min-microvolt = <320000>;
> +			regulator-max-microvolt = <570000>;
> +		};
> +
> +		vreg_s3a_1p05: smps3 {
> +			regulator-name = "vreg_s3a_1p05";
> +			regulator-min-microvolt = <950000>;
> +			regulator-max-microvolt = <1170000>;
> +		};
> +
> +		vreg_s4a_1p8: smps4 {
> +			regulator-name = "vreg_s4a_1p8";
> +			regulator-min-microvolt = <1800000>;
> +			regulator-max-microvolt = <1800000>;
> +		};
> +
> +		vreg_s5a_2p0: smps5 {
> +			regulator-name = "vreg_s5a_2p0";
> +			regulator-min-microvolt = <1904000>;
> +			regulator-max-microvolt = <2000000>;
> +		};
> +
> +		vreg_s6a_0p9: smps6 {
> +			regulator-name = "vreg_s6a_0p9";
> +			regulator-min-microvolt = <920000>;
> +			regulator-max-microvolt = <1128000>;
> +		};
> +
> +		vreg_s7a_1p2: smps7 {
> +			regulator-name = "vreg_s7a_1p2";
> +			regulator-min-microvolt = <1200000>;
> +			regulator-max-microvolt = <1200000>;
> +		};
> +
> +		vreg_s8a_1p3: smps8 {
> +			regulator-name = "vreg_s8a_1p3";
> +			regulator-min-microvolt = <1352000>;
> +			regulator-max-microvolt = <1352000>;
> +		};
> +
> +		vreg_l1a_0p91: ldo1 {
> +			regulator-name = "vreg_l1a_0p91";
> +			regulator-min-microvolt = <312000>;
> +			regulator-max-microvolt = <1304000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> +		};
> +
> +		vreg_l2a_2p3: ldo2 {
> +			regulator-name = "vreg_l2a_2p3";
> +			regulator-min-microvolt = <2970000>;
> +			regulator-max-microvolt = <3300000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> +		};
> +
> +		vreg_l3a_1p2: ldo3 {
> +			regulator-name = "vreg_l3a_1p2";
> +			regulator-min-microvolt = <920000>;
> +			regulator-max-microvolt = <1260000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> +		};
> +
> +		vreg_l5a_0p8: ldo5 {
> +			regulator-name = "vreg_l5a_0p8";
> +			regulator-min-microvolt = <312000>;
> +			regulator-max-microvolt = <1304000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> +		};
> +
> +		vreg_l6a_0p91: ldo6 {
> +			regulator-name = "vreg_l6a_0p91";
> +			regulator-min-microvolt = <880000>;
> +			regulator-max-microvolt = <950000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> +		};
> +
> +		vreg_l7a_1p8: ldo7 {
> +			regulator-name = "vreg_l7a_1p8";
> +			regulator-min-microvolt = <1650000>;
> +			regulator-max-microvolt = <2000000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> +
> +		};
> +
> +		vreg_l8a_0p91: ldo8 {
> +			regulator-name = "vreg_l8a_0p91";
> +			regulator-min-microvolt = <888000>;
> +			regulator-max-microvolt = <925000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> +		};
> +
> +		vreg_l9a_0p91: ldo9 {
> +			regulator-name = "vreg_l8a_0p91";
> +			regulator-min-microvolt = <312000>;
> +			regulator-max-microvolt = <1304000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> +		};
> +
> +		vreg_l10a_2p95: ldo10 {
> +			regulator-name = "vreg_l10a_2p95";
> +			regulator-min-microvolt = <2700000>;
> +			regulator-max-microvolt = <3544000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> +		};
> +
> +		vreg_l11a_0p91: ldo11 {
> +			regulator-name = "vreg_l11a_0p91";
> +			regulator-min-microvolt = <800000>;
> +			regulator-max-microvolt = <1000000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> +		};
> +
> +		vreg_l12a_1p8: ldo12 {
> +			regulator-name = "vreg_l12a_1p8";
> +			regulator-min-microvolt = <1504000>;
> +			regulator-max-microvolt = <1504000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> +		};
> +
> +		vreg_l14a_1p8: ldo14 {
> +			regulator-name = "vreg_l14a_1p8";
> +			regulator-min-microvolt = <1650000>;
> +			regulator-max-microvolt = <1950000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> +		};
> +
> +		vreg_l15a_1p8: ldo15 {
> +			regulator-name = "vreg_l15a_1p8";
> +			regulator-min-microvolt = <1504000>;
> +			regulator-max-microvolt = <2000000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> +		};
> +
> +		vreg_l16a_1p8: ldo16 {
> +			regulator-name = "vreg_l16a_1p8";
> +			regulator-min-microvolt = <1710000>;
> +			regulator-max-microvolt = <1890000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> +		};
> +
> +		vreg_l17a_3p3: ldo17 {
> +			regulator-name = "vreg_l17a_3p3";
> +			regulator-min-microvolt = <3000000>;
> +			regulator-max-microvolt = <3544000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> +		};
> +
> +		vreg_l18a_1p2: ldo18 {
> +			regulator-name = "vreg_l18a_1p2";
> +			regulator-min-microvolt = <312000>;
> +			regulator-max-microvolt = <1304000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
> +		};
> +	};
> +};
> +
> +&qupv3_id_0 {
> +	status = "okay";
> +};
> +
> +&uart7 {
> +	status = "okay";
> +};
> -- 
> 2.38.1
>
Krzysztof Kozlowski Dec. 2, 2022, 9:16 a.m. UTC | #6
On 02/12/2022 04:37, Bjorn Andersson wrote:
> On Fri, Nov 18, 2022 at 11:22:41AM -0800, Melody Olvera wrote:
>> Add DTs for Qualcomm IDP platforms using the QDU1000 and QRU1000
>> SoCs.
>>
>> Signed-off-by: Melody Olvera <quic_molvera@quicinc.com>
>> ---


(...)

>> +	vph_pwr: vph-pwr-regulator {
>> +		compatible = "regulator-fixed";
>> +		regulator-name = "vph_pwr";
>> +		regulator-min-microvolt = <3700000>;
>> +		regulator-max-microvolt = <3700000>;
>> +
>> +		regulator-always-on;
>> +		regulator-boot-on;
>> +
>> +		vin-supply = <&ppvar_sys>;
>> +	};
>> +};
>> +
>> +&apps_rsc {
>> +	regulators {
> 
> Seems like this is supposed to match -regulators$, so how about
> pm8150-regulators?

No, it's correct as model numbers should not be used for node names.

https://lore.kernel.org/linux-devicetree/20220926092104.111449-1-krzysztof.kozlowski@linaro.org/

https://lore.kernel.org/all/d13d5638-67b1-218b-c16d-505a389ccc42@quicinc.com/


Best regards,
Krzysztof
Melody Olvera Dec. 14, 2022, 6:59 p.m. UTC | #7
On 12/1/2022 7:37 PM, Bjorn Andersson wrote:
> On Fri, Nov 18, 2022 at 11:22:41AM -0800, Melody Olvera wrote:
>> Add DTs for Qualcomm IDP platforms using the QDU1000 and QRU1000
>> SoCs.
>>
>> Signed-off-by: Melody Olvera <quic_molvera@quicinc.com>
>> ---
>>  arch/arm64/boot/dts/qcom/Makefile        |   2 +
>>  arch/arm64/boot/dts/qcom/qdu1000-idp.dts | 266 +++++++++++++++++++++++
>>  arch/arm64/boot/dts/qcom/qru1000-idp.dts | 266 +++++++++++++++++++++++
>>  3 files changed, 534 insertions(+)
>>  create mode 100644 arch/arm64/boot/dts/qcom/qdu1000-idp.dts
>>  create mode 100644 arch/arm64/boot/dts/qcom/qru1000-idp.dts
>>
>> diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
>> index afe496a93f94..da66d4a0a884 100644
>> --- a/arch/arm64/boot/dts/qcom/Makefile
>> +++ b/arch/arm64/boot/dts/qcom/Makefile
>> @@ -53,7 +53,9 @@ dtb-$(CONFIG_ARCH_QCOM)	+= msm8998-sony-xperia-yoshino-maple.dtb
>>  dtb-$(CONFIG_ARCH_QCOM)	+= msm8998-sony-xperia-yoshino-poplar.dtb
>>  dtb-$(CONFIG_ARCH_QCOM)	+= qcs404-evb-1000.dtb
>>  dtb-$(CONFIG_ARCH_QCOM)	+= qcs404-evb-4000.dtb
>> +dtb-$(CONFIG_ARCH_QCOM)	+= qdu1000-idp.dtb
>>  dtb-$(CONFIG_ARCH_QCOM)	+= qrb5165-rb5.dtb
>> +dtb-$(CONFIG_ARCH_QCOM)	+= qru1000-idp.dtb
>>  dtb-$(CONFIG_ARCH_QCOM)	+= sa8155p-adp.dtb
>>  dtb-$(CONFIG_ARCH_QCOM)	+= sa8295p-adp.dtb
>>  dtb-$(CONFIG_ARCH_QCOM)	+= sc7180-idp.dtb
>> diff --git a/arch/arm64/boot/dts/qcom/qdu1000-idp.dts b/arch/arm64/boot/dts/qcom/qdu1000-idp.dts
>> new file mode 100644
>> index 000000000000..5aed483201fa
>> --- /dev/null
>> +++ b/arch/arm64/boot/dts/qcom/qdu1000-idp.dts
>> @@ -0,0 +1,266 @@
>> +// SPDX-License-Identifier: BSD-3-Clause
>> +/*
>> + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
>> + */
>> +
>> +/dts-v1/;
>> +
>> +#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
>> +#include "qdu1000.dtsi"
>> +#include "pm8150.dtsi"
>> +
>> +/ {
>> +	model = "Qualcomm Technologies, Inc. QDU1000 IDP";
>> +	compatible = "qcom,qdu1000-idp", "qcom,qdu1000";
>> +
>> +	aliases {
>> +		serial0 = &uart7;
>> +	};
>> +
>> +	clocks {
>> +		xo_board: xo-board {
> Please add a -clk suffix to the node name.

Sure thing.

>
>> +			compatible = "fixed-clock";
>> +			clock-frequency = <19200000>;
>> +			clock-output-names = "xo_board";
> Nothing should rely on this name, so please don't specify it.

Ok; will remove clk names.

>
>> +			#clock-cells = <0>;
>> +		};
>> +
>> +		sleep_clk: sleep-clk {
>> +			compatible = "fixed-clock";
>> +			clock-frequency = <32000>;
>> +			#clock-cells = <0>;
>> +		};
>> +
>> +		pcie_0_pipe_clk: pcie-0-pipe-clk {
> Afaict these clocks are not referenced anywhere, so please skip them.

Yes, so I included them to be consistent with the bindings. They will be needed later;
should I still remove?

>
>> +			compatible = "fixed-clock";
>> +			clock-frequency = <1000>;
>> +			clock-output-names = "pcie_0_pipe_clk";
>> +			#clock-cells = <0>;
>> +		};
>> +
>> +		pcie_0_phy_aux_clk: pcie-0-phy-aux-clk {
>> +			compatible = "fixed-clock";
>> +			clock-frequency = <1000>;
>> +			clock-output-names = "pcie_0_phy_aux_clk";
>> +			#clock-cells = <0>;
>> +		};
>> +
>> +		usb3_phy_wrapper_pipe_clk: usb3-phy-wrapper-pipe-clk {
>> +			compatible = "fixed-clock";
>> +			clock-frequency = <1000>;
>> +			clock-output-names = "usb3_phy_wrapper_pipe_clk";
>> +			#clock-cells = <0>;
>> +		};
>> +	};
>> +
>> +	chosen {
> "ch" < "cl", so please move this up.

My bad; will do.

Thanks,
Melody

>> +		stdout-path = "serial0:115200n8";
>> +	};
>> +
>> +	ppvar_sys: ppvar-sys-regulator {
>> +		compatible = "regulator-fixed";
>> +		regulator-name = "ppvar_sys";
>> +		regulator-always-on;
>> +		regulator-boot-on;
>> +	};
>> +
>> +	vph_pwr: vph-pwr-regulator {
>> +		compatible = "regulator-fixed";
>> +		regulator-name = "vph_pwr";
>> +		regulator-min-microvolt = <3700000>;
>> +		regulator-max-microvolt = <3700000>;
>> +
>> +		regulator-always-on;
>> +		regulator-boot-on;
>> +
>> +		vin-supply = <&ppvar_sys>;
>> +	};
>> +};
>> +
>> +&apps_rsc {
>> +	regulators {
> Seems like this is supposed to match -regulators$, so how about
> pm8150-regulators?
>
> Regards,
> Bjorn
>
>> +		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 = <&vph_pwr>;
>> +		vdd-l3-l4-l5-l18-supply = <&vreg_s5a_2p0>;
>> +		vdd-l6-l9-supply = <&vreg_s6a_0p9>;
>> +		vdd-l7-l12-l14-l15-supply = <&vreg_s4a_1p8>;
>> +		vdd-l13-l16-l17-supply = <&vph_pwr>;
>> +
>> +		vreg_s2a_0p5: smps2 {
>> +			regulator-name = "vreg_s2a_0p5";
>> +			regulator-min-microvolt = <320000>;
>> +			regulator-max-microvolt = <570000>;
>> +		};
>> +
>> +		vreg_s3a_1p05: smps3 {
>> +			regulator-name = "vreg_s3a_1p05";
>> +			regulator-min-microvolt = <950000>;
>> +			regulator-max-microvolt = <1170000>;
>> +		};
>> +
>> +		vreg_s4a_1p8: smps4 {
>> +			regulator-name = "vreg_s4a_1p8";
>> +			regulator-min-microvolt = <1800000>;
>> +			regulator-max-microvolt = <1800000>;
>> +		};
>> +
>> +		vreg_s5a_2p0: smps5 {
>> +			regulator-name = "vreg_s5a_2p0";
>> +			regulator-min-microvolt = <1904000>;
>> +			regulator-max-microvolt = <2000000>;
>> +		};
>> +
>> +		vreg_s6a_0p9: smps6 {
>> +			regulator-name = "vreg_s6a_0p9";
>> +			regulator-min-microvolt = <920000>;
>> +			regulator-max-microvolt = <1128000>;
>> +		};
>> +
>> +		vreg_s7a_1p2: smps7 {
>> +			regulator-name = "vreg_s7a_1p2";
>> +			regulator-min-microvolt = <1200000>;
>> +			regulator-max-microvolt = <1200000>;
>> +		};
>> +
>> +		vreg_s8a_1p3: smps8 {
>> +			regulator-name = "vreg_s8a_1p3";
>> +			regulator-min-microvolt = <1352000>;
>> +			regulator-max-microvolt = <1352000>;
>> +		};
>> +
>> +		vreg_l1a_0p91: ldo1 {
>> +			regulator-name = "vreg_l1a_0p91";
>> +			regulator-min-microvolt = <312000>;
>> +			regulator-max-microvolt = <1304000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>> +		};
>> +
>> +		vreg_l2a_2p3: ldo2 {
>> +			regulator-name = "vreg_l2a_2p3";
>> +			regulator-min-microvolt = <2970000>;
>> +			regulator-max-microvolt = <3300000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>> +		};
>> +
>> +		vreg_l3a_1p2: ldo3 {
>> +			regulator-name = "vreg_l3a_1p2";
>> +			regulator-min-microvolt = <920000>;
>> +			regulator-max-microvolt = <1260000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>> +		};
>> +
>> +		vreg_l5a_0p8: ldo5 {
>> +			regulator-name = "vreg_l5a_0p8";
>> +			regulator-min-microvolt = <312000>;
>> +			regulator-max-microvolt = <1304000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>> +		};
>> +
>> +		vreg_l6a_0p91: ldo6 {
>> +			regulator-name = "vreg_l6a_0p91";
>> +			regulator-min-microvolt = <880000>;
>> +			regulator-max-microvolt = <950000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>> +		};
>> +
>> +		vreg_l7a_1p8: ldo7 {
>> +			regulator-name = "vreg_l7a_1p8";
>> +			regulator-min-microvolt = <1650000>;
>> +			regulator-max-microvolt = <2000000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>> +
>> +		};
>> +
>> +		vreg_l8a_0p91: ldo8 {
>> +			regulator-name = "vreg_l8a_0p91";
>> +			regulator-min-microvolt = <888000>;
>> +			regulator-max-microvolt = <925000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>> +		};
>> +
>> +		vreg_l9a_0p91: ldo9 {
>> +			regulator-name = "vreg_l8a_0p91";
>> +			regulator-min-microvolt = <312000>;
>> +			regulator-max-microvolt = <1304000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>> +		};
>> +
>> +		vreg_l10a_2p95: ldo10 {
>> +			regulator-name = "vreg_l10a_2p95";
>> +			regulator-min-microvolt = <2700000>;
>> +			regulator-max-microvolt = <3544000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>> +		};
>> +
>> +		vreg_l11a_0p91: ldo11 {
>> +			regulator-name = "vreg_l11a_0p91";
>> +			regulator-min-microvolt = <800000>;
>> +			regulator-max-microvolt = <1000000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>> +		};
>> +
>> +		vreg_l12a_1p8: ldo12 {
>> +			regulator-name = "vreg_l12a_1p8";
>> +			regulator-min-microvolt = <1504000>;
>> +			regulator-max-microvolt = <1504000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>> +		};
>> +
>> +		vreg_l14a_1p8: ldo14 {
>> +			regulator-name = "vreg_l14a_1p8";
>> +			regulator-min-microvolt = <1650000>;
>> +			regulator-max-microvolt = <1950000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>> +		};
>> +
>> +		vreg_l15a_1p8: ldo15 {
>> +			regulator-name = "vreg_l15a_1p8";
>> +			regulator-min-microvolt = <1504000>;
>> +			regulator-max-microvolt = <2000000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>> +		};
>> +
>> +		vreg_l16a_1p8: ldo16 {
>> +			regulator-name = "vreg_l16a_1p8";
>> +			regulator-min-microvolt = <1710000>;
>> +			regulator-max-microvolt = <1890000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>> +		};
>> +
>> +		vreg_l17a_3p3: ldo17 {
>> +			regulator-name = "vreg_l17a_3p3";
>> +			regulator-min-microvolt = <3000000>;
>> +			regulator-max-microvolt = <3544000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>> +		};
>> +
>> +		vreg_l18a_1p2: ldo18 {
>> +			regulator-name = "vreg_l18a_1p2";
>> +			regulator-min-microvolt = <312000>;
>> +			regulator-max-microvolt = <1304000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>> +		};
>> +	};
>> +};
>> +
>> +&qupv3_id_0 {
>> +	status = "okay";
>> +};
>> +
>> +&uart7 {
>> +	status = "okay";
>> +};
>> diff --git a/arch/arm64/boot/dts/qcom/qru1000-idp.dts b/arch/arm64/boot/dts/qcom/qru1000-idp.dts
>> new file mode 100644
>> index 000000000000..42eb0c33e7ba
>> --- /dev/null
>> +++ b/arch/arm64/boot/dts/qcom/qru1000-idp.dts
>> @@ -0,0 +1,266 @@
>> +// SPDX-License-Identifier: BSD-3-Clause
>> +/*
>> + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
>> + */
>> +
>> +/dts-v1/;
>> +
>> +#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
>> +#include "qru1000.dtsi"
>> +#include "pm8150.dtsi"
>> +
>> +/ {
>> +	model = "Qualcomm Technologies, Inc. QRU1000 IDP";
>> +	compatible = "qcom,qru1000-idp", "qcom,qru1000";
>> +
>> +	aliases {
>> +		serial0 = &uart7;
>> +	};
>> +
>> +	clocks {
>> +		xo_board: xo-board {
>> +			compatible = "fixed-clock";
>> +			clock-frequency = <19200000>;
>> +			clock-output-names = "xo_board";
>> +			#clock-cells = <0>;
>> +		};
>> +
>> +		sleep_clk: sleep-clk {
>> +			compatible = "fixed-clock";
>> +			clock-frequency = <32000>;
>> +			#clock-cells = <0>;
>> +		};
>> +
>> +		pcie_0_pipe_clk: pcie-0-pipe-clk {
>> +			compatible = "fixed-clock";
>> +			clock-frequency = <1000>;
>> +			clock-output-names = "pcie_0_pipe_clk";
>> +			#clock-cells = <0>;
>> +		};
>> +
>> +		pcie_0_phy_aux_clk: pcie-0-phy-aux-clk {
>> +			compatible = "fixed-clock";
>> +			clock-frequency = <1000>;
>> +			clock-output-names = "pcie_0_phy_aux_clk";
>> +			#clock-cells = <0>;
>> +		};
>> +
>> +		usb3_phy_wrapper_pipe_clk: usb3-phy-wrapper-pipe-clk {
>> +			compatible = "fixed-clock";
>> +			clock-frequency = <1000>;
>> +			clock-output-names = "usb3_phy_wrapper_pipe_clk";
>> +			#clock-cells = <0>;
>> +		};
>> +	};
>> +
>> +	chosen {
>> +		stdout-path = "serial0:115200n8";
>> +	};
>> +
>> +	ppvar_sys: ppvar-sys-regulator {
>> +		compatible = "regulator-fixed";
>> +		regulator-name = "ppvar_sys";
>> +		regulator-always-on;
>> +		regulator-boot-on;
>> +	};
>> +
>> +	vph_pwr: vph-pwr-regulator {
>> +		compatible = "regulator-fixed";
>> +		regulator-name = "vph_pwr";
>> +		regulator-min-microvolt = <3700000>;
>> +		regulator-max-microvolt = <3700000>;
>> +
>> +		regulator-always-on;
>> +		regulator-boot-on;
>> +
>> +		vin-supply = <&ppvar_sys>;
>> +	};
>> +};
>> +
>> +&apps_rsc {
>> +	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 = <&vph_pwr>;
>> +		vdd-l3-l4-l5-l18-supply = <&vreg_s5a_2p0>;
>> +		vdd-l6-l9-supply = <&vreg_s6a_0p9>;
>> +		vdd-l7-l12-l14-l15-supply = <&vreg_s4a_1p8>;
>> +		vdd-l13-l16-l17-supply = <&vph_pwr>;
>> +
>> +		vreg_s2a_0p5: smps2 {
>> +			regulator-name = "vreg_s2a_0p5";
>> +			regulator-min-microvolt = <320000>;
>> +			regulator-max-microvolt = <570000>;
>> +		};
>> +
>> +		vreg_s3a_1p05: smps3 {
>> +			regulator-name = "vreg_s3a_1p05";
>> +			regulator-min-microvolt = <950000>;
>> +			regulator-max-microvolt = <1170000>;
>> +		};
>> +
>> +		vreg_s4a_1p8: smps4 {
>> +			regulator-name = "vreg_s4a_1p8";
>> +			regulator-min-microvolt = <1800000>;
>> +			regulator-max-microvolt = <1800000>;
>> +		};
>> +
>> +		vreg_s5a_2p0: smps5 {
>> +			regulator-name = "vreg_s5a_2p0";
>> +			regulator-min-microvolt = <1904000>;
>> +			regulator-max-microvolt = <2000000>;
>> +		};
>> +
>> +		vreg_s6a_0p9: smps6 {
>> +			regulator-name = "vreg_s6a_0p9";
>> +			regulator-min-microvolt = <920000>;
>> +			regulator-max-microvolt = <1128000>;
>> +		};
>> +
>> +		vreg_s7a_1p2: smps7 {
>> +			regulator-name = "vreg_s7a_1p2";
>> +			regulator-min-microvolt = <1200000>;
>> +			regulator-max-microvolt = <1200000>;
>> +		};
>> +
>> +		vreg_s8a_1p3: smps8 {
>> +			regulator-name = "vreg_s8a_1p3";
>> +			regulator-min-microvolt = <1352000>;
>> +			regulator-max-microvolt = <1352000>;
>> +		};
>> +
>> +		vreg_l1a_0p91: ldo1 {
>> +			regulator-name = "vreg_l1a_0p91";
>> +			regulator-min-microvolt = <312000>;
>> +			regulator-max-microvolt = <1304000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>> +		};
>> +
>> +		vreg_l2a_2p3: ldo2 {
>> +			regulator-name = "vreg_l2a_2p3";
>> +			regulator-min-microvolt = <2970000>;
>> +			regulator-max-microvolt = <3300000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>> +		};
>> +
>> +		vreg_l3a_1p2: ldo3 {
>> +			regulator-name = "vreg_l3a_1p2";
>> +			regulator-min-microvolt = <920000>;
>> +			regulator-max-microvolt = <1260000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>> +		};
>> +
>> +		vreg_l5a_0p8: ldo5 {
>> +			regulator-name = "vreg_l5a_0p8";
>> +			regulator-min-microvolt = <312000>;
>> +			regulator-max-microvolt = <1304000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>> +		};
>> +
>> +		vreg_l6a_0p91: ldo6 {
>> +			regulator-name = "vreg_l6a_0p91";
>> +			regulator-min-microvolt = <880000>;
>> +			regulator-max-microvolt = <950000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>> +		};
>> +
>> +		vreg_l7a_1p8: ldo7 {
>> +			regulator-name = "vreg_l7a_1p8";
>> +			regulator-min-microvolt = <1650000>;
>> +			regulator-max-microvolt = <2000000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>> +
>> +		};
>> +
>> +		vreg_l8a_0p91: ldo8 {
>> +			regulator-name = "vreg_l8a_0p91";
>> +			regulator-min-microvolt = <888000>;
>> +			regulator-max-microvolt = <925000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>> +		};
>> +
>> +		vreg_l9a_0p91: ldo9 {
>> +			regulator-name = "vreg_l8a_0p91";
>> +			regulator-min-microvolt = <312000>;
>> +			regulator-max-microvolt = <1304000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>> +		};
>> +
>> +		vreg_l10a_2p95: ldo10 {
>> +			regulator-name = "vreg_l10a_2p95";
>> +			regulator-min-microvolt = <2700000>;
>> +			regulator-max-microvolt = <3544000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>> +		};
>> +
>> +		vreg_l11a_0p91: ldo11 {
>> +			regulator-name = "vreg_l11a_0p91";
>> +			regulator-min-microvolt = <800000>;
>> +			regulator-max-microvolt = <1000000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>> +		};
>> +
>> +		vreg_l12a_1p8: ldo12 {
>> +			regulator-name = "vreg_l12a_1p8";
>> +			regulator-min-microvolt = <1504000>;
>> +			regulator-max-microvolt = <1504000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>> +		};
>> +
>> +		vreg_l14a_1p8: ldo14 {
>> +			regulator-name = "vreg_l14a_1p8";
>> +			regulator-min-microvolt = <1650000>;
>> +			regulator-max-microvolt = <1950000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>> +		};
>> +
>> +		vreg_l15a_1p8: ldo15 {
>> +			regulator-name = "vreg_l15a_1p8";
>> +			regulator-min-microvolt = <1504000>;
>> +			regulator-max-microvolt = <2000000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>> +		};
>> +
>> +		vreg_l16a_1p8: ldo16 {
>> +			regulator-name = "vreg_l16a_1p8";
>> +			regulator-min-microvolt = <1710000>;
>> +			regulator-max-microvolt = <1890000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>> +		};
>> +
>> +		vreg_l17a_3p3: ldo17 {
>> +			regulator-name = "vreg_l17a_3p3";
>> +			regulator-min-microvolt = <3000000>;
>> +			regulator-max-microvolt = <3544000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>> +		};
>> +
>> +		vreg_l18a_1p2: ldo18 {
>> +			regulator-name = "vreg_l18a_1p2";
>> +			regulator-min-microvolt = <312000>;
>> +			regulator-max-microvolt = <1304000>;
>> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
>> +		};
>> +	};
>> +};
>> +
>> +&qupv3_id_0 {
>> +	status = "okay";
>> +};
>> +
>> +&uart7 {
>> +	status = "okay";
>> +};
>> -- 
>> 2.38.1
>>
Krzysztof Kozlowski Dec. 15, 2022, 8:44 a.m. UTC | #8
On 14/12/2022 19:59, Melody Olvera wrote:
> 
>>
>>> +			#clock-cells = <0>;
>>> +		};
>>> +
>>> +		sleep_clk: sleep-clk {
>>> +			compatible = "fixed-clock";
>>> +			clock-frequency = <32000>;
>>> +			#clock-cells = <0>;
>>> +		};
>>> +
>>> +		pcie_0_pipe_clk: pcie-0-pipe-clk {
>> Afaict these clocks are not referenced anywhere, so please skip them.
> 
> Yes, so I included them to be consistent with the bindings. They will be needed later;
> should I still remove?
> 

If they are not referenced anywhere, how is it consistent with bindings?
Where do the bindings require defining such nodes?

Best regards,
Krzysztof
Dmitry Baryshkov Dec. 15, 2022, 3:07 p.m. UTC | #9
On 22/11/2022 00:15, Melody Olvera wrote:
> 
> 
> On 11/21/2022 5:07 AM, Konrad Dybcio wrote:
>>
>> On 18.11.2022 20:22, Melody Olvera wrote:
>>> Add DTs for Qualcomm IDP platforms using the QDU1000 and QRU1000
>>> SoCs.
>>>
>>> Signed-off-by: Melody Olvera <quic_molvera@quicinc.com>
>>> ---
>>>   arch/arm64/boot/dts/qcom/Makefile        |   2 +
>>>   arch/arm64/boot/dts/qcom/qdu1000-idp.dts | 266 +++++++++++++++++++++++
>>>   arch/arm64/boot/dts/qcom/qru1000-idp.dts | 266 +++++++++++++++++++++++
>>>   3 files changed, 534 insertions(+)
>>>   create mode 100644 arch/arm64/boot/dts/qcom/qdu1000-idp.dts
>>>   create mode 100644 arch/arm64/boot/dts/qcom/qru1000-idp.dts
>>>
>>> diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
>>> index afe496a93f94..da66d4a0a884 100644
>>> --- a/arch/arm64/boot/dts/qcom/Makefile
>>> +++ b/arch/arm64/boot/dts/qcom/Makefile
>>> @@ -53,7 +53,9 @@ dtb-$(CONFIG_ARCH_QCOM)	+= msm8998-sony-xperia-yoshino-maple.dtb
>>>   dtb-$(CONFIG_ARCH_QCOM)	+= msm8998-sony-xperia-yoshino-poplar.dtb
>>>   dtb-$(CONFIG_ARCH_QCOM)	+= qcs404-evb-1000.dtb
>>>   dtb-$(CONFIG_ARCH_QCOM)	+= qcs404-evb-4000.dtb
>>> +dtb-$(CONFIG_ARCH_QCOM)	+= qdu1000-idp.dtb
>>>   dtb-$(CONFIG_ARCH_QCOM)	+= qrb5165-rb5.dtb
>>> +dtb-$(CONFIG_ARCH_QCOM)	+= qru1000-idp.dtb
>>>   dtb-$(CONFIG_ARCH_QCOM)	+= sa8155p-adp.dtb
>>>   dtb-$(CONFIG_ARCH_QCOM)	+= sa8295p-adp.dtb
>>>   dtb-$(CONFIG_ARCH_QCOM)	+= sc7180-idp.dtb
>>> diff --git a/arch/arm64/boot/dts/qcom/qdu1000-idp.dts b/arch/arm64/boot/dts/qcom/qdu1000-idp.dts
>>> new file mode 100644
>>> index 000000000000..5aed483201fa
>>> --- /dev/null
>>> +++ b/arch/arm64/boot/dts/qcom/qdu1000-idp.dts
>>> @@ -0,0 +1,266 @@
>>> +// SPDX-License-Identifier: BSD-3-Clause
>>> +/*
>>> + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
>>> + */
>>> +
>>> +/dts-v1/;
>>> +
>>> +#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
>>> +#include "qdu1000.dtsi"
>>> +#include "pm8150.dtsi"
>>> +
>>> +/ {
>>> +	model = "Qualcomm Technologies, Inc. QDU1000 IDP";
>>> +	compatible = "qcom,qdu1000-idp", "qcom,qdu1000";
>> Missing chassis-type
> 
> Sorry, not sure what you mean here... Do you mean like QRD, HDK, MTP, etc.?
> If so, then IDP is the chassis type.
> 
>>
>>> +
>>> +	aliases {
>>> +		serial0 = &uart7;
>>> +	};
>>> +
>>> +	clocks {
>>> +		xo_board: xo-board {
>>> +			compatible = "fixed-clock";
>>> +			clock-frequency = <19200000>;
>>> +			clock-output-names = "xo_board";
>>> +			#clock-cells = <0>;
>>> +		};
>>> +
>>> +		sleep_clk: sleep-clk {
>>> +			compatible = "fixed-clock";
>>> +			clock-frequency = <32000>;
>>> +			#clock-cells = <0>;
>>> +		};
>>> +
>>> +		pcie_0_pipe_clk: pcie-0-pipe-clk {
>>> +			compatible = "fixed-clock";
>>> +			clock-frequency = <1000>;
>>> +			clock-output-names = "pcie_0_pipe_clk";
>>> +			#clock-cells = <0>;
>>> +		};
>>> +
>>> +		pcie_0_phy_aux_clk: pcie-0-phy-aux-clk {
>>> +			compatible = "fixed-clock";
>>> +			clock-frequency = <1000>;
>>> +			clock-output-names = "pcie_0_phy_aux_clk";
>>> +			#clock-cells = <0>;
>>> +		};
>>> +
>>> +		usb3_phy_wrapper_pipe_clk: usb3-phy-wrapper-pipe-clk {
>>> +			compatible = "fixed-clock";
>>> +			clock-frequency = <1000>;
>>> +			clock-output-names = "usb3_phy_wrapper_pipe_clk";
>>> +			#clock-cells = <0>;
>>> +		};
>> Do these pipe clocks not come from QMPPHY?
> 
> Yes they do; I just don't have those phys ready yet. I can put a TODO here to
> move them if necessary.

Just use <0> instead of adding a dummy fixed clock.
Melody Olvera Dec. 15, 2022, 5:56 p.m. UTC | #10
On 12/15/2022 12:44 AM, Krzysztof Kozlowski wrote:
> On 14/12/2022 19:59, Melody Olvera wrote:
>>>> +			#clock-cells = <0>;
>>>> +		};
>>>> +
>>>> +		sleep_clk: sleep-clk {
>>>> +			compatible = "fixed-clock";
>>>> +			clock-frequency = <32000>;
>>>> +			#clock-cells = <0>;
>>>> +		};
>>>> +
>>>> +		pcie_0_pipe_clk: pcie-0-pipe-clk {
>>> Afaict these clocks are not referenced anywhere, so please skip them.
>> Yes, so I included them to be consistent with the bindings. They will be needed later;
>> should I still remove?
>>
> If they are not referenced anywhere, how is it consistent with bindings?
> Where do the bindings require defining such nodes?

These bindings here: https://lore.kernel.org/all/20221118181826.28269-2-quic_molvera@quicinc.com/
I believe you commented that we either have these clocks or we don't, correct? I added them to
the dt since these clocks exist and will be needed later when USB and PCIE nodes are added.
As Konrad noted, these technically belong in the PHYs, but I was told to put stub fixed
clocks instead here: https://lore.kernel.org/lkml/2c8c4642-8aee-3da3-7698-5e08b4c5894d@linaro.org/

How is this to be handled? Should I remove the clocks from the dt and the bindings and add them
later when we need them? Do I leave stub clocks here with frequency 0 until needed? I am
very confused right now.

Thanks,
Melody

>
> Best regards,
> Krzysztof
>
Dmitry Baryshkov Dec. 15, 2022, 6:47 p.m. UTC | #11
On 15/12/2022 19:56, Melody Olvera wrote:
> 
> 
> On 12/15/2022 12:44 AM, Krzysztof Kozlowski wrote:
>> On 14/12/2022 19:59, Melody Olvera wrote:
>>>>> +			#clock-cells = <0>;
>>>>> +		};
>>>>> +
>>>>> +		sleep_clk: sleep-clk {
>>>>> +			compatible = "fixed-clock";
>>>>> +			clock-frequency = <32000>;
>>>>> +			#clock-cells = <0>;
>>>>> +		};
>>>>> +
>>>>> +		pcie_0_pipe_clk: pcie-0-pipe-clk {
>>>> Afaict these clocks are not referenced anywhere, so please skip them.
>>> Yes, so I included them to be consistent with the bindings. They will be needed later;
>>> should I still remove?
>>>
>> If they are not referenced anywhere, how is it consistent with bindings?
>> Where do the bindings require defining such nodes?
> 
> These bindings here: https://lore.kernel.org/all/20221118181826.28269-2-quic_molvera@quicinc.com/
> I believe you commented that we either have these clocks or we don't, correct? I added them to
> the dt since these clocks exist and will be needed later when USB and PCIE nodes are added.
> As Konrad noted, these technically belong in the PHYs, but I was told to put stub fixed
> clocks instead here: https://lore.kernel.org/lkml/2c8c4642-8aee-3da3-7698-5e08b4c5894d@linaro.org/
> 
> How is this to be handled? Should I remove the clocks from the dt and the bindings and add them
> later when we need them? Do I leave stub clocks here with frequency 0 until needed? I am
> very confused right now.

You were told to use stub clocks in the bindings, not in the dtsi file. 
You can use <0> in the dtsi instead.

> 
> Thanks,
> Melody
> 
>>
>> Best regards,
>> Krzysztof
>>
>
Melody Olvera Dec. 15, 2022, 6:53 p.m. UTC | #12
On 12/15/2022 10:47 AM, Dmitry Baryshkov wrote:
> On 15/12/2022 19:56, Melody Olvera wrote:
>>
>>
>> On 12/15/2022 12:44 AM, Krzysztof Kozlowski wrote:
>>> On 14/12/2022 19:59, Melody Olvera wrote:
>>>>>> +            #clock-cells = <0>;
>>>>>> +        };
>>>>>> +
>>>>>> +        sleep_clk: sleep-clk {
>>>>>> +            compatible = "fixed-clock";
>>>>>> +            clock-frequency = <32000>;
>>>>>> +            #clock-cells = <0>;
>>>>>> +        };
>>>>>> +
>>>>>> +        pcie_0_pipe_clk: pcie-0-pipe-clk {
>>>>> Afaict these clocks are not referenced anywhere, so please skip them.
>>>> Yes, so I included them to be consistent with the bindings. They will be needed later;
>>>> should I still remove?
>>>>
>>> If they are not referenced anywhere, how is it consistent with bindings?
>>> Where do the bindings require defining such nodes?
>>
>> These bindings here: https://lore.kernel.org/all/20221118181826.28269-2-quic_molvera@quicinc.com/
>> I believe you commented that we either have these clocks or we don't, correct? I added them to
>> the dt since these clocks exist and will be needed later when USB and PCIE nodes are added.
>> As Konrad noted, these technically belong in the PHYs, but I was told to put stub fixed
>> clocks instead here: https://lore.kernel.org/lkml/2c8c4642-8aee-3da3-7698-5e08b4c5894d@linaro.org/
>>
>> How is this to be handled? Should I remove the clocks from the dt and the bindings and add them
>> later when we need them? Do I leave stub clocks here with frequency 0 until needed? I am
>> very confused right now.
>
> You were told to use stub clocks in the bindings, not in the dtsi file. You can use <0> in the dtsi instead.

Oh ok that makes more sense. I appreciate the clarification.

Thanks,
Melody
>
>>
>> Thanks,
>> Melody
>>
>>>
>>> Best regards,
>>> Krzysztof
>>>
>>
>
Krzysztof Kozlowski Dec. 15, 2022, 6:53 p.m. UTC | #13
On 15/12/2022 18:56, Melody Olvera wrote:
> 
> 
> On 12/15/2022 12:44 AM, Krzysztof Kozlowski wrote:
>> On 14/12/2022 19:59, Melody Olvera wrote:
>>>>> +			#clock-cells = <0>;
>>>>> +		};
>>>>> +
>>>>> +		sleep_clk: sleep-clk {
>>>>> +			compatible = "fixed-clock";
>>>>> +			clock-frequency = <32000>;
>>>>> +			#clock-cells = <0>;
>>>>> +		};
>>>>> +
>>>>> +		pcie_0_pipe_clk: pcie-0-pipe-clk {
>>>> Afaict these clocks are not referenced anywhere, so please skip them.
>>> Yes, so I included them to be consistent with the bindings. They will be needed later;
>>> should I still remove?
>>>
>> If they are not referenced anywhere, how is it consistent with bindings?
>> Where do the bindings require defining such nodes?
> 
> These bindings here: https://lore.kernel.org/all/20221118181826.28269-2-quic_molvera@quicinc.com/
> I believe you commented that we either have these clocks or we don't, correct? I added them to
> the dt since these clocks exist and will be needed later when USB and PCIE nodes are added.
> As Konrad noted, these technically belong in the PHYs, but I was told to put stub fixed
> clocks instead here: https://lore.kernel.org/lkml/2c8c4642-8aee-3da3-7698-5e08b4c5894d@linaro.org/
> 
> How is this to be handled? Should I remove the clocks from the dt and the bindings and add them

This was a discussion about clock controller. You either have these
clocks as input of the clock controller or not. If you have - drop
minItems. If you do not have - trim the list to just two items.

What do you actually write in DTS is of course connected with the
bindings but separate problem. I was not referring to what should be or
should not be in DTS. We talked about clock controller and its inputs.

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
index afe496a93f94..da66d4a0a884 100644
--- a/arch/arm64/boot/dts/qcom/Makefile
+++ b/arch/arm64/boot/dts/qcom/Makefile
@@ -53,7 +53,9 @@  dtb-$(CONFIG_ARCH_QCOM)	+= msm8998-sony-xperia-yoshino-maple.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8998-sony-xperia-yoshino-poplar.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= qcs404-evb-1000.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= qcs404-evb-4000.dtb
+dtb-$(CONFIG_ARCH_QCOM)	+= qdu1000-idp.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= qrb5165-rb5.dtb
+dtb-$(CONFIG_ARCH_QCOM)	+= qru1000-idp.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sa8155p-adp.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sa8295p-adp.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sc7180-idp.dtb
diff --git a/arch/arm64/boot/dts/qcom/qdu1000-idp.dts b/arch/arm64/boot/dts/qcom/qdu1000-idp.dts
new file mode 100644
index 000000000000..5aed483201fa
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/qdu1000-idp.dts
@@ -0,0 +1,266 @@ 
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
+#include "qdu1000.dtsi"
+#include "pm8150.dtsi"
+
+/ {
+	model = "Qualcomm Technologies, Inc. QDU1000 IDP";
+	compatible = "qcom,qdu1000-idp", "qcom,qdu1000";
+
+	aliases {
+		serial0 = &uart7;
+	};
+
+	clocks {
+		xo_board: xo-board {
+			compatible = "fixed-clock";
+			clock-frequency = <19200000>;
+			clock-output-names = "xo_board";
+			#clock-cells = <0>;
+		};
+
+		sleep_clk: sleep-clk {
+			compatible = "fixed-clock";
+			clock-frequency = <32000>;
+			#clock-cells = <0>;
+		};
+
+		pcie_0_pipe_clk: pcie-0-pipe-clk {
+			compatible = "fixed-clock";
+			clock-frequency = <1000>;
+			clock-output-names = "pcie_0_pipe_clk";
+			#clock-cells = <0>;
+		};
+
+		pcie_0_phy_aux_clk: pcie-0-phy-aux-clk {
+			compatible = "fixed-clock";
+			clock-frequency = <1000>;
+			clock-output-names = "pcie_0_phy_aux_clk";
+			#clock-cells = <0>;
+		};
+
+		usb3_phy_wrapper_pipe_clk: usb3-phy-wrapper-pipe-clk {
+			compatible = "fixed-clock";
+			clock-frequency = <1000>;
+			clock-output-names = "usb3_phy_wrapper_pipe_clk";
+			#clock-cells = <0>;
+		};
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
+	ppvar_sys: ppvar-sys-regulator {
+		compatible = "regulator-fixed";
+		regulator-name = "ppvar_sys";
+		regulator-always-on;
+		regulator-boot-on;
+	};
+
+	vph_pwr: vph-pwr-regulator {
+		compatible = "regulator-fixed";
+		regulator-name = "vph_pwr";
+		regulator-min-microvolt = <3700000>;
+		regulator-max-microvolt = <3700000>;
+
+		regulator-always-on;
+		regulator-boot-on;
+
+		vin-supply = <&ppvar_sys>;
+	};
+};
+
+&apps_rsc {
+	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 = <&vph_pwr>;
+		vdd-l3-l4-l5-l18-supply = <&vreg_s5a_2p0>;
+		vdd-l6-l9-supply = <&vreg_s6a_0p9>;
+		vdd-l7-l12-l14-l15-supply = <&vreg_s4a_1p8>;
+		vdd-l13-l16-l17-supply = <&vph_pwr>;
+
+		vreg_s2a_0p5: smps2 {
+			regulator-name = "vreg_s2a_0p5";
+			regulator-min-microvolt = <320000>;
+			regulator-max-microvolt = <570000>;
+		};
+
+		vreg_s3a_1p05: smps3 {
+			regulator-name = "vreg_s3a_1p05";
+			regulator-min-microvolt = <950000>;
+			regulator-max-microvolt = <1170000>;
+		};
+
+		vreg_s4a_1p8: smps4 {
+			regulator-name = "vreg_s4a_1p8";
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <1800000>;
+		};
+
+		vreg_s5a_2p0: smps5 {
+			regulator-name = "vreg_s5a_2p0";
+			regulator-min-microvolt = <1904000>;
+			regulator-max-microvolt = <2000000>;
+		};
+
+		vreg_s6a_0p9: smps6 {
+			regulator-name = "vreg_s6a_0p9";
+			regulator-min-microvolt = <920000>;
+			regulator-max-microvolt = <1128000>;
+		};
+
+		vreg_s7a_1p2: smps7 {
+			regulator-name = "vreg_s7a_1p2";
+			regulator-min-microvolt = <1200000>;
+			regulator-max-microvolt = <1200000>;
+		};
+
+		vreg_s8a_1p3: smps8 {
+			regulator-name = "vreg_s8a_1p3";
+			regulator-min-microvolt = <1352000>;
+			regulator-max-microvolt = <1352000>;
+		};
+
+		vreg_l1a_0p91: ldo1 {
+			regulator-name = "vreg_l1a_0p91";
+			regulator-min-microvolt = <312000>;
+			regulator-max-microvolt = <1304000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
+		};
+
+		vreg_l2a_2p3: ldo2 {
+			regulator-name = "vreg_l2a_2p3";
+			regulator-min-microvolt = <2970000>;
+			regulator-max-microvolt = <3300000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
+		};
+
+		vreg_l3a_1p2: ldo3 {
+			regulator-name = "vreg_l3a_1p2";
+			regulator-min-microvolt = <920000>;
+			regulator-max-microvolt = <1260000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
+		};
+
+		vreg_l5a_0p8: ldo5 {
+			regulator-name = "vreg_l5a_0p8";
+			regulator-min-microvolt = <312000>;
+			regulator-max-microvolt = <1304000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
+		};
+
+		vreg_l6a_0p91: ldo6 {
+			regulator-name = "vreg_l6a_0p91";
+			regulator-min-microvolt = <880000>;
+			regulator-max-microvolt = <950000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
+		};
+
+		vreg_l7a_1p8: ldo7 {
+			regulator-name = "vreg_l7a_1p8";
+			regulator-min-microvolt = <1650000>;
+			regulator-max-microvolt = <2000000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
+
+		};
+
+		vreg_l8a_0p91: ldo8 {
+			regulator-name = "vreg_l8a_0p91";
+			regulator-min-microvolt = <888000>;
+			regulator-max-microvolt = <925000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
+		};
+
+		vreg_l9a_0p91: ldo9 {
+			regulator-name = "vreg_l8a_0p91";
+			regulator-min-microvolt = <312000>;
+			regulator-max-microvolt = <1304000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
+		};
+
+		vreg_l10a_2p95: ldo10 {
+			regulator-name = "vreg_l10a_2p95";
+			regulator-min-microvolt = <2700000>;
+			regulator-max-microvolt = <3544000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
+		};
+
+		vreg_l11a_0p91: ldo11 {
+			regulator-name = "vreg_l11a_0p91";
+			regulator-min-microvolt = <800000>;
+			regulator-max-microvolt = <1000000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
+		};
+
+		vreg_l12a_1p8: ldo12 {
+			regulator-name = "vreg_l12a_1p8";
+			regulator-min-microvolt = <1504000>;
+			regulator-max-microvolt = <1504000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
+		};
+
+		vreg_l14a_1p8: ldo14 {
+			regulator-name = "vreg_l14a_1p8";
+			regulator-min-microvolt = <1650000>;
+			regulator-max-microvolt = <1950000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
+		};
+
+		vreg_l15a_1p8: ldo15 {
+			regulator-name = "vreg_l15a_1p8";
+			regulator-min-microvolt = <1504000>;
+			regulator-max-microvolt = <2000000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
+		};
+
+		vreg_l16a_1p8: ldo16 {
+			regulator-name = "vreg_l16a_1p8";
+			regulator-min-microvolt = <1710000>;
+			regulator-max-microvolt = <1890000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
+		};
+
+		vreg_l17a_3p3: ldo17 {
+			regulator-name = "vreg_l17a_3p3";
+			regulator-min-microvolt = <3000000>;
+			regulator-max-microvolt = <3544000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
+		};
+
+		vreg_l18a_1p2: ldo18 {
+			regulator-name = "vreg_l18a_1p2";
+			regulator-min-microvolt = <312000>;
+			regulator-max-microvolt = <1304000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
+		};
+	};
+};
+
+&qupv3_id_0 {
+	status = "okay";
+};
+
+&uart7 {
+	status = "okay";
+};
diff --git a/arch/arm64/boot/dts/qcom/qru1000-idp.dts b/arch/arm64/boot/dts/qcom/qru1000-idp.dts
new file mode 100644
index 000000000000..42eb0c33e7ba
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/qru1000-idp.dts
@@ -0,0 +1,266 @@ 
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
+#include "qru1000.dtsi"
+#include "pm8150.dtsi"
+
+/ {
+	model = "Qualcomm Technologies, Inc. QRU1000 IDP";
+	compatible = "qcom,qru1000-idp", "qcom,qru1000";
+
+	aliases {
+		serial0 = &uart7;
+	};
+
+	clocks {
+		xo_board: xo-board {
+			compatible = "fixed-clock";
+			clock-frequency = <19200000>;
+			clock-output-names = "xo_board";
+			#clock-cells = <0>;
+		};
+
+		sleep_clk: sleep-clk {
+			compatible = "fixed-clock";
+			clock-frequency = <32000>;
+			#clock-cells = <0>;
+		};
+
+		pcie_0_pipe_clk: pcie-0-pipe-clk {
+			compatible = "fixed-clock";
+			clock-frequency = <1000>;
+			clock-output-names = "pcie_0_pipe_clk";
+			#clock-cells = <0>;
+		};
+
+		pcie_0_phy_aux_clk: pcie-0-phy-aux-clk {
+			compatible = "fixed-clock";
+			clock-frequency = <1000>;
+			clock-output-names = "pcie_0_phy_aux_clk";
+			#clock-cells = <0>;
+		};
+
+		usb3_phy_wrapper_pipe_clk: usb3-phy-wrapper-pipe-clk {
+			compatible = "fixed-clock";
+			clock-frequency = <1000>;
+			clock-output-names = "usb3_phy_wrapper_pipe_clk";
+			#clock-cells = <0>;
+		};
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
+	ppvar_sys: ppvar-sys-regulator {
+		compatible = "regulator-fixed";
+		regulator-name = "ppvar_sys";
+		regulator-always-on;
+		regulator-boot-on;
+	};
+
+	vph_pwr: vph-pwr-regulator {
+		compatible = "regulator-fixed";
+		regulator-name = "vph_pwr";
+		regulator-min-microvolt = <3700000>;
+		regulator-max-microvolt = <3700000>;
+
+		regulator-always-on;
+		regulator-boot-on;
+
+		vin-supply = <&ppvar_sys>;
+	};
+};
+
+&apps_rsc {
+	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 = <&vph_pwr>;
+		vdd-l3-l4-l5-l18-supply = <&vreg_s5a_2p0>;
+		vdd-l6-l9-supply = <&vreg_s6a_0p9>;
+		vdd-l7-l12-l14-l15-supply = <&vreg_s4a_1p8>;
+		vdd-l13-l16-l17-supply = <&vph_pwr>;
+
+		vreg_s2a_0p5: smps2 {
+			regulator-name = "vreg_s2a_0p5";
+			regulator-min-microvolt = <320000>;
+			regulator-max-microvolt = <570000>;
+		};
+
+		vreg_s3a_1p05: smps3 {
+			regulator-name = "vreg_s3a_1p05";
+			regulator-min-microvolt = <950000>;
+			regulator-max-microvolt = <1170000>;
+		};
+
+		vreg_s4a_1p8: smps4 {
+			regulator-name = "vreg_s4a_1p8";
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <1800000>;
+		};
+
+		vreg_s5a_2p0: smps5 {
+			regulator-name = "vreg_s5a_2p0";
+			regulator-min-microvolt = <1904000>;
+			regulator-max-microvolt = <2000000>;
+		};
+
+		vreg_s6a_0p9: smps6 {
+			regulator-name = "vreg_s6a_0p9";
+			regulator-min-microvolt = <920000>;
+			regulator-max-microvolt = <1128000>;
+		};
+
+		vreg_s7a_1p2: smps7 {
+			regulator-name = "vreg_s7a_1p2";
+			regulator-min-microvolt = <1200000>;
+			regulator-max-microvolt = <1200000>;
+		};
+
+		vreg_s8a_1p3: smps8 {
+			regulator-name = "vreg_s8a_1p3";
+			regulator-min-microvolt = <1352000>;
+			regulator-max-microvolt = <1352000>;
+		};
+
+		vreg_l1a_0p91: ldo1 {
+			regulator-name = "vreg_l1a_0p91";
+			regulator-min-microvolt = <312000>;
+			regulator-max-microvolt = <1304000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
+		};
+
+		vreg_l2a_2p3: ldo2 {
+			regulator-name = "vreg_l2a_2p3";
+			regulator-min-microvolt = <2970000>;
+			regulator-max-microvolt = <3300000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
+		};
+
+		vreg_l3a_1p2: ldo3 {
+			regulator-name = "vreg_l3a_1p2";
+			regulator-min-microvolt = <920000>;
+			regulator-max-microvolt = <1260000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
+		};
+
+		vreg_l5a_0p8: ldo5 {
+			regulator-name = "vreg_l5a_0p8";
+			regulator-min-microvolt = <312000>;
+			regulator-max-microvolt = <1304000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
+		};
+
+		vreg_l6a_0p91: ldo6 {
+			regulator-name = "vreg_l6a_0p91";
+			regulator-min-microvolt = <880000>;
+			regulator-max-microvolt = <950000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
+		};
+
+		vreg_l7a_1p8: ldo7 {
+			regulator-name = "vreg_l7a_1p8";
+			regulator-min-microvolt = <1650000>;
+			regulator-max-microvolt = <2000000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
+
+		};
+
+		vreg_l8a_0p91: ldo8 {
+			regulator-name = "vreg_l8a_0p91";
+			regulator-min-microvolt = <888000>;
+			regulator-max-microvolt = <925000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
+		};
+
+		vreg_l9a_0p91: ldo9 {
+			regulator-name = "vreg_l8a_0p91";
+			regulator-min-microvolt = <312000>;
+			regulator-max-microvolt = <1304000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
+		};
+
+		vreg_l10a_2p95: ldo10 {
+			regulator-name = "vreg_l10a_2p95";
+			regulator-min-microvolt = <2700000>;
+			regulator-max-microvolt = <3544000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
+		};
+
+		vreg_l11a_0p91: ldo11 {
+			regulator-name = "vreg_l11a_0p91";
+			regulator-min-microvolt = <800000>;
+			regulator-max-microvolt = <1000000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
+		};
+
+		vreg_l12a_1p8: ldo12 {
+			regulator-name = "vreg_l12a_1p8";
+			regulator-min-microvolt = <1504000>;
+			regulator-max-microvolt = <1504000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
+		};
+
+		vreg_l14a_1p8: ldo14 {
+			regulator-name = "vreg_l14a_1p8";
+			regulator-min-microvolt = <1650000>;
+			regulator-max-microvolt = <1950000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
+		};
+
+		vreg_l15a_1p8: ldo15 {
+			regulator-name = "vreg_l15a_1p8";
+			regulator-min-microvolt = <1504000>;
+			regulator-max-microvolt = <2000000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
+		};
+
+		vreg_l16a_1p8: ldo16 {
+			regulator-name = "vreg_l16a_1p8";
+			regulator-min-microvolt = <1710000>;
+			regulator-max-microvolt = <1890000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
+		};
+
+		vreg_l17a_3p3: ldo17 {
+			regulator-name = "vreg_l17a_3p3";
+			regulator-min-microvolt = <3000000>;
+			regulator-max-microvolt = <3544000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
+		};
+
+		vreg_l18a_1p2: ldo18 {
+			regulator-name = "vreg_l18a_1p2";
+			regulator-min-microvolt = <312000>;
+			regulator-max-microvolt = <1304000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
+		};
+	};
+};
+
+&qupv3_id_0 {
+	status = "okay";
+};
+
+&uart7 {
+	status = "okay";
+};