[PATCH RFC 3/8] arm64: dts: qcom: pm8550ve: make PMK8550VE SID configurable

Neil Armstrong posted 8 patches 2 years, 1 month ago
There is a newer version of this series
[PATCH RFC 3/8] arm64: dts: qcom: pm8550ve: make PMK8550VE SID configurable
Posted by Neil Armstrong 2 years, 1 month ago
The pm8550ve can be found with a different SID on SM8650 platforms,
make it configurable.

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
---
 arch/arm64/boot/dts/qcom/pm8550ve.dtsi | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/pm8550ve.dtsi b/arch/arm64/boot/dts/qcom/pm8550ve.dtsi
index c47646a467be..fbd8a386cef2 100644
--- a/arch/arm64/boot/dts/qcom/pm8550ve.dtsi
+++ b/arch/arm64/boot/dts/qcom/pm8550ve.dtsi
@@ -6,6 +6,11 @@
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/spmi/spmi.h>
 
+/* (Sadly) this PMIC can be configured to be at different SIDs */
+#ifndef PMK8550VE_SID
+	#define PMK8550VE_SID 5
+#endif
+
 / {
 	thermal-zones {
 		pm8550ve-thermal {
@@ -33,16 +38,16 @@ trip1 {
 
 
 &spmi_bus {
-	pm8550ve: pmic@5 {
+	pm8550ve: pmic@PMK8550VE_SID {
 		compatible = "qcom,pm8550", "qcom,spmi-pmic";
-		reg = <0x5 SPMI_USID>;
+		reg = <PMK8550VE_SID SPMI_USID>;
 		#address-cells = <1>;
 		#size-cells = <0>;
 
 		pm8550ve_temp_alarm: temp-alarm@a00 {
 			compatible = "qcom,spmi-temp-alarm";
 			reg = <0xa00>;
-			interrupts = <0x5 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
+			interrupts = <PMK8550VE_SID 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
 			#thermal-sensor-cells = <0>;
 		};
 

-- 
2.34.1
Re: [PATCH RFC 3/8] arm64: dts: qcom: pm8550ve: make PMK8550VE SID configurable
Posted by Krzysztof Kozlowski 2 years, 1 month ago
On 25/10/2023 09:47, Neil Armstrong wrote:
> The pm8550ve can be found with a different SID on SM8650 platforms,
> make it configurable.
> 
> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
> ---
>  arch/arm64/boot/dts/qcom/pm8550ve.dtsi | 11 ++++++++---
>  1 file changed, 8 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/qcom/pm8550ve.dtsi b/arch/arm64/boot/dts/qcom/pm8550ve.dtsi
> index c47646a467be..fbd8a386cef2 100644
> --- a/arch/arm64/boot/dts/qcom/pm8550ve.dtsi
> +++ b/arch/arm64/boot/dts/qcom/pm8550ve.dtsi
> @@ -6,6 +6,11 @@
>  #include <dt-bindings/interrupt-controller/irq.h>
>  #include <dt-bindings/spmi/spmi.h>
>  
> +/* (Sadly) this PMIC can be configured to be at different SIDs */
> +#ifndef PMK8550VE_SID
> +	#define PMK8550VE_SID 5
> +#endif

My statement is still the same - NAK, for defines depending on ifndef. I
believe outcome of our last discussion - including meeting in Amsterdam
- was only to have defines in the board without any ifndef/ifdef.

Best regards,
Krzysztof
Re: [PATCH RFC 3/8] arm64: dts: qcom: pm8550ve: make PMK8550VE SID configurable
Posted by Neil Armstrong 2 years, 1 month ago
On 25/10/2023 11:17, Krzysztof Kozlowski wrote:
> On 25/10/2023 09:47, Neil Armstrong wrote:
>> The pm8550ve can be found with a different SID on SM8650 platforms,
>> make it configurable.
>>
>> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
>> ---
>>   arch/arm64/boot/dts/qcom/pm8550ve.dtsi | 11 ++++++++---
>>   1 file changed, 8 insertions(+), 3 deletions(-)
>>
>> diff --git a/arch/arm64/boot/dts/qcom/pm8550ve.dtsi b/arch/arm64/boot/dts/qcom/pm8550ve.dtsi
>> index c47646a467be..fbd8a386cef2 100644
>> --- a/arch/arm64/boot/dts/qcom/pm8550ve.dtsi
>> +++ b/arch/arm64/boot/dts/qcom/pm8550ve.dtsi
>> @@ -6,6 +6,11 @@
>>   #include <dt-bindings/interrupt-controller/irq.h>
>>   #include <dt-bindings/spmi/spmi.h>
>>   
>> +/* (Sadly) this PMIC can be configured to be at different SIDs */
>> +#ifndef PMK8550VE_SID
>> +	#define PMK8550VE_SID 5
>> +#endif
> 
> My statement is still the same - NAK, for defines depending on ifndef. I
> believe outcome of our last discussion - including meeting in Amsterdam
> - was only to have defines in the board without any ifndef/ifdef.

As suggested by Dmitry, I'll add a define in all DT using the pm8550ve,
so this would remove any #ifndef.

Neil

> 
> Best regards,
> Krzysztof
>
Re: [PATCH RFC 3/8] arm64: dts: qcom: pm8550ve: make PMK8550VE SID configurable
Posted by Dmitry Baryshkov 2 years, 1 month ago
On Wed, 25 Oct 2023 at 11:00, Neil Armstrong <neil.armstrong@linaro.org> wrote:
>
> The pm8550ve can be found with a different SID on SM8650 platforms,
> make it configurable.
>
> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
> ---
>  arch/arm64/boot/dts/qcom/pm8550ve.dtsi | 11 ++++++++---
>  1 file changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/qcom/pm8550ve.dtsi b/arch/arm64/boot/dts/qcom/pm8550ve.dtsi
> index c47646a467be..fbd8a386cef2 100644
> --- a/arch/arm64/boot/dts/qcom/pm8550ve.dtsi
> +++ b/arch/arm64/boot/dts/qcom/pm8550ve.dtsi
> @@ -6,6 +6,11 @@
>  #include <dt-bindings/interrupt-controller/irq.h>
>  #include <dt-bindings/spmi/spmi.h>
>
> +/* (Sadly) this PMIC can be configured to be at different SIDs */
> +#ifndef PMK8550VE_SID
> +       #define PMK8550VE_SID 5
> +#endif

Please drop the #ifndef wrapping and move the define to all files
including this dtsi.

> +
>  / {
>         thermal-zones {
>                 pm8550ve-thermal {
> @@ -33,16 +38,16 @@ trip1 {
>
>
>  &spmi_bus {
> -       pm8550ve: pmic@5 {
> +       pm8550ve: pmic@PMK8550VE_SID {
>                 compatible = "qcom,pm8550", "qcom,spmi-pmic";
> -               reg = <0x5 SPMI_USID>;
> +               reg = <PMK8550VE_SID SPMI_USID>;
>                 #address-cells = <1>;
>                 #size-cells = <0>;
>
>                 pm8550ve_temp_alarm: temp-alarm@a00 {
>                         compatible = "qcom,spmi-temp-alarm";
>                         reg = <0xa00>;
> -                       interrupts = <0x5 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
> +                       interrupts = <PMK8550VE_SID 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
>                         #thermal-sensor-cells = <0>;
>                 };
>
>
> --
> 2.34.1
>


-- 
With best wishes
Dmitry
Re: [PATCH RFC 3/8] arm64: dts: qcom: pm8550ve: make PMK8550VE SID configurable
Posted by Konrad Dybcio 2 years, 1 month ago

On 10/25/23 09:47, Neil Armstrong wrote:
> The pm8550ve can be found with a different SID on SM8650 platforms,
> make it configurable.
> 
> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad