Message ID | 20240702123425.584610-2-gnstark@salutedevices.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | pwm: meson: add pwm support for A1 | expand |
On Tue, Jul 02, 2024 at 03:34:24PM +0300, George Stark wrote: > The chip has 3 dual-channel PWM modules PWM_AB, PWM_CD, PWM_EF. > > Signed-off-by: George Stark <gnstark@salutedevices.com> > Signed-off-by: Dmitry Rokosov <ddrokosov@salutedevices.com> Acked-by: Conor Dooley <conor.dooley@microchip.com>
On Tue 02 Jul 2024 at 15:34, George Stark <gnstark@salutedevices.com> wrote: > The chip has 3 dual-channel PWM modules PWM_AB, PWM_CD, PWM_EF. > > Signed-off-by: George Stark <gnstark@salutedevices.com> > Signed-off-by: Dmitry Rokosov <ddrokosov@salutedevices.com> > --- > .../devicetree/bindings/pwm/pwm-amlogic.yaml | 17 +++++++++++++++++ > 1 file changed, 17 insertions(+) > > diff --git a/Documentation/devicetree/bindings/pwm/pwm-amlogic.yaml b/Documentation/devicetree/bindings/pwm/pwm-amlogic.yaml > index 1d71d4f8f328..e021cf59421a 100644 > --- a/Documentation/devicetree/bindings/pwm/pwm-amlogic.yaml > +++ b/Documentation/devicetree/bindings/pwm/pwm-amlogic.yaml > @@ -37,6 +37,10 @@ properties: > - enum: > - amlogic,meson8-pwm-v2 > - amlogic,meson-s4-pwm > + - items: > + - enum: > + - amlogic,meson-a1-pwm > + - const: amlogic,meson-s4-pwm > - items: > - enum: > - amlogic,meson8b-pwm-v2 > @@ -56,6 +60,9 @@ properties: > minItems: 1 > maxItems: 2 > > + power-domains: > + maxItems: 1 > + The change is not only introducing a1 compatibility but also allowing a power-domain for the other SoC, even if optional. If that is intended, it should be stated in the description and probably a separate change. > "#pwm-cells": > const: 3 > > @@ -136,6 +143,16 @@ allOf: > required: > - clocks > > + - if: > + properties: > + compatible: > + contains: > + enum: > + - amlogic,meson-a1-pwm > + then: > + required: > + - power-domains > + > additionalProperties: false > > examples:
Hello Jerome Thanks for the review On 7/8/24 16:11, Jerome Brunet wrote: > On Tue 02 Jul 2024 at 15:34, George Stark <gnstark@salutedevices.com> wrote: > >> The chip has 3 dual-channel PWM modules PWM_AB, PWM_CD, PWM_EF. >> >> Signed-off-by: George Stark <gnstark@salutedevices.com> >> Signed-off-by: Dmitry Rokosov <ddrokosov@salutedevices.com> >> --- >> .../devicetree/bindings/pwm/pwm-amlogic.yaml | 17 +++++++++++++++++ >> 1 file changed, 17 insertions(+) >> >> diff --git a/Documentation/devicetree/bindings/pwm/pwm-amlogic.yaml b/Documentation/devicetree/bindings/pwm/pwm-amlogic.yaml >> index 1d71d4f8f328..e021cf59421a 100644 >> --- a/Documentation/devicetree/bindings/pwm/pwm-amlogic.yaml >> +++ b/Documentation/devicetree/bindings/pwm/pwm-amlogic.yaml ... > > The change is not only introducing a1 compatibility but also allowing a > power-domain for the other SoC, even if optional. > > If that is intended, it should be stated in the description and probably > a separate change. AFAIK the only SoC with a separate PD for PWM is A1 (currently). I added PD to bindings by an independent change in series #2 [1] but Rob proposed it should be squashed into compatible patch. The only thing missed in series #2 was the conditional schema making PD required for A1. I personally would prefer to add PD as a separate change. I'll give it a try. [1] https://lore.kernel.org/lkml/20240701172016.523402-1-gnstark@salutedevices.com/T/#m0e004fc0d22e205aa3bf6bdd0284d251f26eb0f3 > >> "#pwm-cells": >> const: 3 >> >> @@ -136,6 +143,16 @@ allOf: >> required: >> - clocks >> >> + - if: >> + properties: >> + compatible: >> + contains: >> + enum: >> + - amlogic,meson-a1-pwm >> + then: >> + required: >> + - power-domains >> + >> additionalProperties: false >> >> examples: >
diff --git a/Documentation/devicetree/bindings/pwm/pwm-amlogic.yaml b/Documentation/devicetree/bindings/pwm/pwm-amlogic.yaml index 1d71d4f8f328..e021cf59421a 100644 --- a/Documentation/devicetree/bindings/pwm/pwm-amlogic.yaml +++ b/Documentation/devicetree/bindings/pwm/pwm-amlogic.yaml @@ -37,6 +37,10 @@ properties: - enum: - amlogic,meson8-pwm-v2 - amlogic,meson-s4-pwm + - items: + - enum: + - amlogic,meson-a1-pwm + - const: amlogic,meson-s4-pwm - items: - enum: - amlogic,meson8b-pwm-v2 @@ -56,6 +60,9 @@ properties: minItems: 1 maxItems: 2 + power-domains: + maxItems: 1 + "#pwm-cells": const: 3 @@ -136,6 +143,16 @@ allOf: required: - clocks + - if: + properties: + compatible: + contains: + enum: + - amlogic,meson-a1-pwm + then: + required: + - power-domains + additionalProperties: false examples: