All of lore.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Daniel Golle <daniel@makrotopia.org>
Cc: linux-mediatek@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	linux-pwm@vger.kernel.or,
	"Matthias Brugger" <matthias.bgg@gmail.com>,
	"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	"Thierry Reding" <thierry.reding@gmail.com>,
	"Fabien Parent" <fparent@baylibre.com>,
	"Zhi Mao" <zhi.mao@mediatek.com>,
	"Sam Shih" <sam.shih@mediatek.com>
Subject: Re: [PATCH RESEND v2] dt-bindings: pwm: mediatek: Add compatible for MT7986
Date: Thu, 24 Nov 2022 14:33:35 +0100	[thread overview]
Message-ID: <add5675c-b7a9-7f6e-e977-ac79c5c4086a@linaro.org> (raw)
In-Reply-To: <Y39fe3oHgMTyAHBm@makrotopia.org>

On 24/11/2022 13:11, Daniel Golle wrote:
> On Thu, Nov 24, 2022 at 12:30:44PM +0100, Krzysztof Kozlowski wrote:
>> On 24/11/2022 12:03, Daniel Golle wrote:
>>> Add new compatible string for MT7986 PWM and list compatible units for
>>> existing entries. Also make sure the number of pwm1-X clocks is listed
>>> for all supported units.
>>>
>>> Signed-off-by: Daniel Golle <daniel@makrotopia.org>
>>> ---
>>> Changes since v1: list compatibles, fix pwm1-n clocks for all SoCs
>>>
>>> Rebased on linux-next and re-run scripts/get_maintainers.pl on patch to
>>> makes sure dt maintainers are included. This has been requested by
>>> Krzysztof Kozlowski.
>>>
>>>  .../devicetree/bindings/pwm/pwm-mediatek.txt  | 20 +++++++++++--------
>>>  1 file changed, 12 insertions(+), 8 deletions(-)
>>>
>>> diff --git a/Documentation/devicetree/bindings/pwm/pwm-mediatek.txt b/Documentation/devicetree/bindings/pwm/pwm-mediatek.txt
>>> index 554c96b6d0c3..952a338e06e7 100644
>>> --- a/Documentation/devicetree/bindings/pwm/pwm-mediatek.txt
>>> +++ b/Documentation/devicetree/bindings/pwm/pwm-mediatek.txt
>>> @@ -2,14 +2,15 @@ MediaTek PWM controller
>>>  
>>>  Required properties:
>>>   - compatible: should be "mediatek,<name>-pwm":
>>> -   - "mediatek,mt2712-pwm": found on mt2712 SoC.
>>> +   - "mediatek,mt2712-pwm", "mediatek,mt6795-pwm": found on mt2712 SoC.
>>>     - "mediatek,mt6795-pwm": found on mt6795 SoC.
>>> -   - "mediatek,mt7622-pwm": found on mt7622 SoC.
>>> -   - "mediatek,mt7623-pwm": found on mt7623 SoC.
>>> +   - "mediatek,mt7622-pwm", "mediatek,mt8195-pwm", "mediatek,mt8183-pwm", "mediatek,mt7986-pwm": found on mt7622 SoC.
>>
>> This does not look right. What you are saying is mt7622 is compatible
>> with mt8195, which is compatible with mt8183, which is compatible with
>> mt7986. It could be true, but I feel you wanted to say something else -
>> mt7622 is compatible with one SoC which is generic and common to all
>> other implementations.
> 
> MT7622 has 6 PWM channels, it does have CK_26M_SEL register and does
> not need pwm45_fixup. Hence, when using a driver made for MT8195, only
> 4 out of 6 channels woukd work. MT8183 PWM is identical to MT8195,
> hence also compatible. When using driver for MT7986, only 2 channels
> would work, but otherwise it is also compatible.
> 
> So unfortunately, that one generic implementation ("common ancestor")
> does not exist and development of the PWM unit found in MediaTek SoCs
> did not necessarily increase features in more recent iterations, but
> rather just reduce or increase the number of PWM channels available.
> Ironically, the unit with least features (only 2 channels) is found in
> the most recent SoC (MT7986).

None of these explain listing four compatibles.

> 
>>
>>> +   - "mediatek,mt7623-pwm", "mediatek,mt7628-pwm": found on mt7623 SoC.
>>>     - "mediatek,mt7628-pwm": found on mt7628 SoC.
>>>     - "mediatek,mt7629-pwm": found on mt7629 SoC.
>>> -   - "mediatek,mt8183-pwm": found on mt8183 SoC.
>>> -   - "mediatek,mt8195-pwm", "mediatek,mt8183-pwm": found on mt8195 SoC.
>>> +   - "mediatek,mt7986-pwm": found on mt7986 SoC.
>>> +   - "mediatek,mt8183-pwm", "mediatek,mt7986-pwm": found on mt8183 SoC.
>>> +   - "mediatek,mt8195-pwm", "mediatek,mt8183-pwm", "mediatek,mt7986-pwm": found on mt8195 SoC.
>>
>> This as well looks excessive.
> 
> I agree. But it's difficult to say which one should be ommitted.

Best regards,
Krzysztof


WARNING: multiple messages have this Message-ID (diff)
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Daniel Golle <daniel@makrotopia.org>
Cc: linux-mediatek@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	linux-pwm@vger.kernel.or,
	"Matthias Brugger" <matthias.bgg@gmail.com>,
	"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	"Thierry Reding" <thierry.reding@gmail.com>,
	"Fabien Parent" <fparent@baylibre.com>,
	"Zhi Mao" <zhi.mao@mediatek.com>,
	"Sam Shih" <sam.shih@mediatek.com>
Subject: Re: [PATCH RESEND v2] dt-bindings: pwm: mediatek: Add compatible for MT7986
Date: Thu, 24 Nov 2022 14:33:35 +0100	[thread overview]
Message-ID: <add5675c-b7a9-7f6e-e977-ac79c5c4086a@linaro.org> (raw)
In-Reply-To: <Y39fe3oHgMTyAHBm@makrotopia.org>

On 24/11/2022 13:11, Daniel Golle wrote:
> On Thu, Nov 24, 2022 at 12:30:44PM +0100, Krzysztof Kozlowski wrote:
>> On 24/11/2022 12:03, Daniel Golle wrote:
>>> Add new compatible string for MT7986 PWM and list compatible units for
>>> existing entries. Also make sure the number of pwm1-X clocks is listed
>>> for all supported units.
>>>
>>> Signed-off-by: Daniel Golle <daniel@makrotopia.org>
>>> ---
>>> Changes since v1: list compatibles, fix pwm1-n clocks for all SoCs
>>>
>>> Rebased on linux-next and re-run scripts/get_maintainers.pl on patch to
>>> makes sure dt maintainers are included. This has been requested by
>>> Krzysztof Kozlowski.
>>>
>>>  .../devicetree/bindings/pwm/pwm-mediatek.txt  | 20 +++++++++++--------
>>>  1 file changed, 12 insertions(+), 8 deletions(-)
>>>
>>> diff --git a/Documentation/devicetree/bindings/pwm/pwm-mediatek.txt b/Documentation/devicetree/bindings/pwm/pwm-mediatek.txt
>>> index 554c96b6d0c3..952a338e06e7 100644
>>> --- a/Documentation/devicetree/bindings/pwm/pwm-mediatek.txt
>>> +++ b/Documentation/devicetree/bindings/pwm/pwm-mediatek.txt
>>> @@ -2,14 +2,15 @@ MediaTek PWM controller
>>>  
>>>  Required properties:
>>>   - compatible: should be "mediatek,<name>-pwm":
>>> -   - "mediatek,mt2712-pwm": found on mt2712 SoC.
>>> +   - "mediatek,mt2712-pwm", "mediatek,mt6795-pwm": found on mt2712 SoC.
>>>     - "mediatek,mt6795-pwm": found on mt6795 SoC.
>>> -   - "mediatek,mt7622-pwm": found on mt7622 SoC.
>>> -   - "mediatek,mt7623-pwm": found on mt7623 SoC.
>>> +   - "mediatek,mt7622-pwm", "mediatek,mt8195-pwm", "mediatek,mt8183-pwm", "mediatek,mt7986-pwm": found on mt7622 SoC.
>>
>> This does not look right. What you are saying is mt7622 is compatible
>> with mt8195, which is compatible with mt8183, which is compatible with
>> mt7986. It could be true, but I feel you wanted to say something else -
>> mt7622 is compatible with one SoC which is generic and common to all
>> other implementations.
> 
> MT7622 has 6 PWM channels, it does have CK_26M_SEL register and does
> not need pwm45_fixup. Hence, when using a driver made for MT8195, only
> 4 out of 6 channels woukd work. MT8183 PWM is identical to MT8195,
> hence also compatible. When using driver for MT7986, only 2 channels
> would work, but otherwise it is also compatible.
> 
> So unfortunately, that one generic implementation ("common ancestor")
> does not exist and development of the PWM unit found in MediaTek SoCs
> did not necessarily increase features in more recent iterations, but
> rather just reduce or increase the number of PWM channels available.
> Ironically, the unit with least features (only 2 channels) is found in
> the most recent SoC (MT7986).

None of these explain listing four compatibles.

> 
>>
>>> +   - "mediatek,mt7623-pwm", "mediatek,mt7628-pwm": found on mt7623 SoC.
>>>     - "mediatek,mt7628-pwm": found on mt7628 SoC.
>>>     - "mediatek,mt7629-pwm": found on mt7629 SoC.
>>> -   - "mediatek,mt8183-pwm": found on mt8183 SoC.
>>> -   - "mediatek,mt8195-pwm", "mediatek,mt8183-pwm": found on mt8195 SoC.
>>> +   - "mediatek,mt7986-pwm": found on mt7986 SoC.
>>> +   - "mediatek,mt8183-pwm", "mediatek,mt7986-pwm": found on mt8183 SoC.
>>> +   - "mediatek,mt8195-pwm", "mediatek,mt8183-pwm", "mediatek,mt7986-pwm": found on mt8195 SoC.
>>
>> This as well looks excessive.
> 
> I agree. But it's difficult to say which one should be ommitted.

Best regards,
Krzysztof


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-11-24 13:33 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-24 11:03 [PATCH RESEND v2] dt-bindings: pwm: mediatek: Add compatible for MT7986 Daniel Golle
2022-11-24 11:03 ` Daniel Golle
2022-11-24 11:30 ` Krzysztof Kozlowski
2022-11-24 11:30   ` Krzysztof Kozlowski
2022-11-24 12:11   ` Daniel Golle
2022-11-24 12:11     ` Daniel Golle
2022-11-24 13:33     ` Krzysztof Kozlowski [this message]
2022-11-24 13:33       ` Krzysztof Kozlowski
2022-11-24 20:00       ` Daniel Golle
2022-11-24 20:00         ` Daniel Golle
2022-11-25  7:55         ` Krzysztof Kozlowski
2022-11-25  7:55           ` Krzysztof Kozlowski
2022-11-25 11:12 ` AngeloGioacchino Del Regno
2022-11-25 11:12   ` AngeloGioacchino Del Regno
2022-11-25 11:34   ` Daniel Golle
2022-11-25 11:34     ` Daniel Golle
2022-11-28 11:25     ` AngeloGioacchino Del Regno
2022-11-28 11:25       ` AngeloGioacchino Del Regno

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=add5675c-b7a9-7f6e-e977-ac79c5c4086a@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=daniel@makrotopia.org \
    --cc=devicetree@vger.kernel.org \
    --cc=fparent@baylibre.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-pwm@vger.kernel.or \
    --cc=matthias.bgg@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=sam.shih@mediatek.com \
    --cc=thierry.reding@gmail.com \
    --cc=u.kleine-koenig@pengutronix.de \
    --cc=zhi.mao@mediatek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.