mbox series

[v1,0/2] pwm-mediatek: Convert to schema and fixes

Message ID 20221128112028.58021-1-angelogioacchino.delregno@collabora.com
Headers show
Series pwm-mediatek: Convert to schema and fixes | expand

Message

AngeloGioacchino Del Regno Nov. 28, 2022, 11:20 a.m. UTC
This series converts pwm-mediatek.txt to schema and fixes
mt7622.dtsi to declare the needed #pwm-cells on the pwm node,
required to not trigger a dtbs_check warning... and to make
that node actually usable.

AngeloGioacchino Del Regno (2):
  arm64: dts: mediatek: mt7622: Add missing pwm-cells to pwm node
  dt-bindings: pwm: mediatek: Convert pwm-mediatek to dt schema

 .../bindings/pwm/mediatek,mt2712-pwm.yaml     | 93 +++++++++++++++++++
 .../devicetree/bindings/pwm/pwm-mediatek.txt  | 52 -----------
 arch/arm64/boot/dts/mediatek/mt7622.dtsi      |  1 +
 3 files changed, 94 insertions(+), 52 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/pwm/mediatek,mt2712-pwm.yaml
 delete mode 100644 Documentation/devicetree/bindings/pwm/pwm-mediatek.txt

Comments

Uwe Kleine-König Dec. 2, 2022, 6:09 p.m. UTC | #1
On Mon, Nov 28, 2022 at 12:20:27PM +0100, AngeloGioacchino Del Regno wrote:
> Specify #pwm-cells on pwm@11006000 to make it actually usable.
> 
> Fixes: ae457b7679c4 ("arm64: dts: mt7622: add SoC and peripheral related device nodes")
> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> ---
>  arch/arm64/boot/dts/mediatek/mt7622.dtsi | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/arm64/boot/dts/mediatek/mt7622.dtsi b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
> index 146e18b5b1f4..f321c6d0fd7c 100644
> --- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
> +++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
> @@ -435,6 +435,7 @@ uart3: serial@11005000 {
>  	pwm: pwm@11006000 {
>  		compatible = "mediatek,mt7622-pwm";
>  		reg = <0 0x11006000 0 0x1000>;
> +		#pwm-cells = <2>;

3 should be possible, too. The driver does only support one
polarity, so it's not really needed, but would be nice for consistency?

Thierry, what's your take here?

Other than that: Who would pick this up, I assume it to go via an ARM
tree together with the 2nd patch in this series?

Best regards
Uwe
Uwe Kleine-König Jan. 17, 2023, 9:39 p.m. UTC | #2
Hello,

On Fri, Dec 02, 2022 at 07:09:32PM +0100, Uwe Kleine-König wrote:
> On Mon, Nov 28, 2022 at 12:20:27PM +0100, AngeloGioacchino Del Regno wrote:
> > Specify #pwm-cells on pwm@11006000 to make it actually usable.
> > 
> > Fixes: ae457b7679c4 ("arm64: dts: mt7622: add SoC and peripheral related device nodes")
> > Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> > ---
> >  arch/arm64/boot/dts/mediatek/mt7622.dtsi | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/arch/arm64/boot/dts/mediatek/mt7622.dtsi b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
> > index 146e18b5b1f4..f321c6d0fd7c 100644
> > --- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
> > +++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
> > @@ -435,6 +435,7 @@ uart3: serial@11005000 {
> >  	pwm: pwm@11006000 {
> >  		compatible = "mediatek,mt7622-pwm";
> >  		reg = <0 0x11006000 0 0x1000>;
> > +		#pwm-cells = <2>;
> 
> 3 should be possible, too. The driver does only support one
> polarity, so it's not really needed, but would be nice for consistency?
> 
> Thierry, what's your take here?
> 
> Other than that: Who would pick this up, I assume it to go via an ARM
> tree together with the 2nd patch in this series?

The questions here are still open and both patches unapplied. :-\

Best regards
Uwe
Matthias Brugger Jan. 19, 2023, 5:33 p.m. UTC | #3
On 17/01/2023 22:39, Uwe Kleine-König wrote:
> Hello,
> 
> On Fri, Dec 02, 2022 at 07:09:32PM +0100, Uwe Kleine-König wrote:
>> On Mon, Nov 28, 2022 at 12:20:27PM +0100, AngeloGioacchino Del Regno wrote:
>>> Specify #pwm-cells on pwm@11006000 to make it actually usable.
>>>
>>> Fixes: ae457b7679c4 ("arm64: dts: mt7622: add SoC and peripheral related device nodes")
>>> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
>>> ---
>>>   arch/arm64/boot/dts/mediatek/mt7622.dtsi | 1 +
>>>   1 file changed, 1 insertion(+)
>>>
>>> diff --git a/arch/arm64/boot/dts/mediatek/mt7622.dtsi b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
>>> index 146e18b5b1f4..f321c6d0fd7c 100644
>>> --- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
>>> +++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
>>> @@ -435,6 +435,7 @@ uart3: serial@11005000 {
>>>   	pwm: pwm@11006000 {
>>>   		compatible = "mediatek,mt7622-pwm";
>>>   		reg = <0 0x11006000 0 0x1000>;
>>> +		#pwm-cells = <2>;
>>
>> 3 should be possible, too. The driver does only support one
>> polarity, so it's not really needed, but would be nice for consistency?
>>
>> Thierry, what's your take here?
>>
>> Other than that: Who would pick this up, I assume it to go via an ARM
>> tree together with the 2nd patch in this series?

The DT patch should go through my tree once all questions are answered and the 
dt-binding patch got accpeted by PWM maintainer.

Regards,
Matthias

> 
> The questions here are still open and both patches unapplied. :-\
> 
> Best regards
> Uwe
>
Matthias Brugger Feb. 1, 2023, 10:56 a.m. UTC | #4
On 28/11/2022 12:20, AngeloGioacchino Del Regno wrote:
> Specify #pwm-cells on pwm@11006000 to make it actually usable.
> 
> Fixes: ae457b7679c4 ("arm64: dts: mt7622: add SoC and peripheral related device nodes")
> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>

Applied, thanks!

> ---
>   arch/arm64/boot/dts/mediatek/mt7622.dtsi | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/arch/arm64/boot/dts/mediatek/mt7622.dtsi b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
> index 146e18b5b1f4..f321c6d0fd7c 100644
> --- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
> +++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
> @@ -435,6 +435,7 @@ uart3: serial@11005000 {
>   	pwm: pwm@11006000 {
>   		compatible = "mediatek,mt7622-pwm";
>   		reg = <0 0x11006000 0 0x1000>;
> +		#pwm-cells = <2>;
>   		interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_LOW>;
>   		clocks = <&topckgen CLK_TOP_PWM_SEL>,
>   			 <&pericfg CLK_PERI_PWM_PD>,