diff mbox series

[2/5] arm64: dts: pm8004: Add SPMI regulator and add phandles to lsids

Message ID 20191020150746.64114-3-kholk11@gmail.com (mailing list archive)
State Superseded
Headers show
Series MSM8976/56 Sony Xperia Loire (X/XCompact) smartphones | expand

Commit Message

AngeloGioacchino Del Regno Oct. 20, 2019, 3:07 p.m. UTC
From: AngeloGioacchino Del Regno <kholk11@gmail.com>

Add the SPMI regulator node in the PM8004 LSID5 (as there is where
it resides basically 99% of the times) and set the nodes to be
disabled by default, as not all boards have both or one of the
lsids specified in this generic pm8004 DT.

While at it, also add nice phandles to the lsids specified in this
DT, so that we can modify their configuration or add nodes to them
from other DTs in a nicer and more human readable fashion.

Signed-off-by: AngeloGioacchino Del Regno <kholk11@gmail.com>
---
 arch/arm64/boot/dts/qcom/pm8004.dtsi | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

Comments

Bjorn Andersson Oct. 21, 2019, 5:37 a.m. UTC | #1
On Sun 20 Oct 08:07 PDT 2019, kholk11@gmail.com wrote:

> From: AngeloGioacchino Del Regno <kholk11@gmail.com>
> 
> Add the SPMI regulator node in the PM8004 LSID5 (as there is where
> it resides basically 99% of the times) and set the nodes to be
> disabled by default, as not all boards have both or one of the
> lsids specified in this generic pm8004 DT.
> 
> While at it, also add nice phandles to the lsids specified in this
> DT, so that we can modify their configuration or add nodes to them
> from other DTs in a nicer and more human readable fashion.
> 

Shouldn't all blocks of pm8004 be declared in this file?

> Signed-off-by: AngeloGioacchino Del Regno <kholk11@gmail.com>
> ---
>  arch/arm64/boot/dts/qcom/pm8004.dtsi | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/qcom/pm8004.dtsi b/arch/arm64/boot/dts/qcom/pm8004.dtsi
> index 297b57bfa87a..0abd1abe12fc 100644
> --- a/arch/arm64/boot/dts/qcom/pm8004.dtsi
> +++ b/arch/arm64/boot/dts/qcom/pm8004.dtsi
> @@ -4,17 +4,23 @@
>  
>  &spmi_bus {
>  
> -	pmic@4 {
> +	pm8004_lsid4: pmic@4 {
>  		compatible = "qcom,pm8004", "qcom,spmi-pmic";
>  		reg = <0x4 SPMI_USID>;
>  		#address-cells = <1>;
>  		#size-cells = <0>;
> +		status = "disabled";

I think you should just leave this enabled, boards that doesn't have a
pm8004 should be able to omit the include of this file.

>  	};
>  
> -	pmic@5 {
> +	pm8004_lsid5: pmic@5 {
>  		compatible = "qcom,pm8004", "qcom,spmi-pmic";
>  		reg = <0x5 SPMI_USID>;
>  		#address-cells = <1>;
>  		#size-cells = <0>;
> +		status = "disabled";
> +
> +		pm8004_spmi_regulators: regulators {
> +			compatible = "qcom,pm8004-regulators";
> +		};

Looks good.

Regards,
bjorn

>  	};
>  };
> -- 
> 2.21.0
>
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/qcom/pm8004.dtsi b/arch/arm64/boot/dts/qcom/pm8004.dtsi
index 297b57bfa87a..0abd1abe12fc 100644
--- a/arch/arm64/boot/dts/qcom/pm8004.dtsi
+++ b/arch/arm64/boot/dts/qcom/pm8004.dtsi
@@ -4,17 +4,23 @@ 
 
 &spmi_bus {
 
-	pmic@4 {
+	pm8004_lsid4: pmic@4 {
 		compatible = "qcom,pm8004", "qcom,spmi-pmic";
 		reg = <0x4 SPMI_USID>;
 		#address-cells = <1>;
 		#size-cells = <0>;
+		status = "disabled";
 	};
 
-	pmic@5 {
+	pm8004_lsid5: pmic@5 {
 		compatible = "qcom,pm8004", "qcom,spmi-pmic";
 		reg = <0x5 SPMI_USID>;
 		#address-cells = <1>;
 		#size-cells = <0>;
+		status = "disabled";
+
+		pm8004_spmi_regulators: regulators {
+			compatible = "qcom,pm8004-regulators";
+		};
 	};
 };