devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/1] arm64: dts: qcom: pwm: Drop PWM reg dependency
@ 2022-08-26 12:35 Bryan O'Donoghue
  2022-08-26 12:35 ` [PATCH v2 1/1] " Bryan O'Donoghue
  0 siblings, 1 reply; 3+ messages in thread
From: Bryan O'Donoghue @ 2022-08-26 12:35 UTC (permalink / raw)
  To: agross, andersson, konrad.dybcio, robh+dt, krzysztof.kozlowski+dt,
	linux-arm-msm, devicetree
  Cc: bryan.odonoghue

The accompanying patch removes reg = <> and pwm@reg from the yaml and dtsi.
This follows on from discussions between Bupesh, Dmitry, Bjorn, Krzysztof and myself.

https://lore.kernel.org/all/20220719205058.1004942-1-bhupesh.sharma@linaro.org/
https://lore.kernel.org/all/20220721195502.1525214-1-bhupesh.sharma@linaro.org/
https://lore.kernel.org/all/20220822120300.2633790-1-bryan.odonoghue@linaro.org/

The previous discussion tended towards either removing pwm@reg and reg = <> or
extending out the yaml to support multiple reg declarations for PWM compatible.

This patch does the former. I've left node: label in place, dropped both pwm@reg
and reg = <> I kept "label: nodename" though because it looked more like what we
already have for rpm regulators.

Per our previous discussion I've modified the yaml and dtsi in one go.

Bryan O'Donoghue (1):
  arm64: dts: qcom: pwm: Drop PWM reg dependency

 Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml | 8 ++++----
 arch/arm64/boot/dts/qcom/pm8350c.dtsi                     | 3 +--
 2 files changed, 5 insertions(+), 6 deletions(-)

-- 
2.37.1


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

* [PATCH v2 1/1] arm64: dts: qcom: pwm: Drop PWM reg dependency
  2022-08-26 12:35 [PATCH v2 0/1] arm64: dts: qcom: pwm: Drop PWM reg dependency Bryan O'Donoghue
@ 2022-08-26 12:35 ` Bryan O'Donoghue
  2022-08-27  9:31   ` Krzysztof Kozlowski
  0 siblings, 1 reply; 3+ messages in thread
From: Bryan O'Donoghue @ 2022-08-26 12:35 UTC (permalink / raw)
  To: agross, andersson, konrad.dybcio, robh+dt, krzysztof.kozlowski+dt,
	linux-arm-msm, devicetree
  Cc: bryan.odonoghue

Drop the reg dependency from the qcom PWM description.

The PWM driver doesn't depend on the reg so we should drop the dependency
and remove the pwm@reg from the nodename.

Fixes: e79a1385ab74 ("arm64: dts: qcom: Add LPG to pm8916, pm8994, pmi8994 and pmi8998")
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
 Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml | 8 ++++----
 arch/arm64/boot/dts/qcom/pm8350c.dtsi                     | 3 +--
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml b/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml
index 65cbc6dee545e..2a5bafe0660a0 100644
--- a/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml
+++ b/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml
@@ -92,6 +92,10 @@ properties:
     type: object
     $ref: /schemas/regulator/regulator.yaml#
 
+  pwm:
+    type: object
+    $ref: /schemas/leds/leds-qcom-lpg.yaml#
+
 patternProperties:
   "^adc@[0-9a-f]+$":
     type: object
@@ -117,10 +121,6 @@ patternProperties:
     type: object
     $ref: /schemas/power/reset/qcom,pon.yaml#
 
-  "pwm@[0-9a-f]+$":
-    type: object
-    $ref: /schemas/leds/leds-qcom-lpg.yaml#
-
   "^rtc@[0-9a-f]+$":
     type: object
     $ref: /schemas/rtc/qcom-pm8xxx-rtc.yaml#
diff --git a/arch/arm64/boot/dts/qcom/pm8350c.dtsi b/arch/arm64/boot/dts/qcom/pm8350c.dtsi
index e0bbb67717fec..f28e71487d5c7 100644
--- a/arch/arm64/boot/dts/qcom/pm8350c.dtsi
+++ b/arch/arm64/boot/dts/qcom/pm8350c.dtsi
@@ -30,9 +30,8 @@ pm8350c_gpios: gpio@8800 {
 			#interrupt-cells = <2>;
 		};
 
-		pm8350c_pwm: pwm@e800 {
+		pm8350c_pwm: pwm {
 			compatible = "qcom,pm8350c-pwm";
-			reg = <0xe800>;
 			#pwm-cells = <2>;
 			status = "disabled";
 		};
-- 
2.37.1


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

* Re: [PATCH v2 1/1] arm64: dts: qcom: pwm: Drop PWM reg dependency
  2022-08-26 12:35 ` [PATCH v2 1/1] " Bryan O'Donoghue
@ 2022-08-27  9:31   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2022-08-27  9:31 UTC (permalink / raw)
  To: Bryan O'Donoghue, agross, andersson, konrad.dybcio, robh+dt,
	krzysztof.kozlowski+dt, linux-arm-msm, devicetree

On 26/08/2022 15:35, Bryan O'Donoghue wrote:
> Drop the reg dependency from the qcom PWM description.
> 
> The PWM driver doesn't depend on the reg so we should drop the dependency
> and remove the pwm@reg from the nodename.

Driver is not really a sufficient reason. Based on
https://lore.kernel.org/all/CAA8EJppGS38aP7gyd1c3kNgraAVJDoqUef2cDfZpu2aL_iwW0g@mail.gmail.com/
reason could be:

The PWM node is not a separate device and is expected to be part of
parent SPMI PMIC node, thus it obtains the address space from the
parent. One IO address in "reg" is also not correct description because
LPG block maps to several regions.

> 
> Fixes: e79a1385ab74 ("arm64: dts: qcom: Add LPG to pm8916, pm8994, pmi8994 and pmi8998")
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> ---
>  Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml | 8 ++++----
>  arch/arm64/boot/dts/qcom/pm8350c.dtsi                     | 3 +--

Patches should be split. One patchset, but two patches.

>  2 files changed, 5 insertions(+), 6 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml b/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml
> index 65cbc6dee545e..2a5bafe0660a0 100644
> --- a/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml
> +++ b/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml
> @@ -92,6 +92,10 @@ properties:
>      type: object
>      $ref: /schemas/regulator/regulator.yaml#
>  

Best regards,
Krzysztof

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

end of thread, other threads:[~2022-08-27  9:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-26 12:35 [PATCH v2 0/1] arm64: dts: qcom: pwm: Drop PWM reg dependency Bryan O'Donoghue
2022-08-26 12:35 ` [PATCH v2 1/1] " Bryan O'Donoghue
2022-08-27  9:31   ` Krzysztof Kozlowski

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