2023-12-05 09:22:59

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [PATCH 2/6] dt-bindings: pwm: samsung: add specific compatible for Tesla FSD

Tesla FSD is a derivative of Samsung Exynos SoC, thus just like the
others it reuses several devices from older designs. Historically we
kept the old (block's) compatible only. This works fine and there is no
bug here, however guidelines expressed in
Documentation/devicetree/bindings/writing-bindings.rst state that:
1. Compatibles should be specific.
2. We should add new compatibles in case of bugs or features.

Add Tesla FSD compatible specific to be used with an existing fallback.

Signed-off-by: Krzysztof Kozlowski <[email protected]>

---

I propose to take the patch through Samsung SoC (me). See cover letter
for explanation.
---
Documentation/devicetree/bindings/pwm/pwm-samsung.yaml | 1 +
1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/pwm/pwm-samsung.yaml b/Documentation/devicetree/bindings/pwm/pwm-samsung.yaml
index 16de6434693b..17a2b927af33 100644
--- a/Documentation/devicetree/bindings/pwm/pwm-samsung.yaml
+++ b/Documentation/devicetree/bindings/pwm/pwm-samsung.yaml
@@ -33,6 +33,7 @@ properties:
- samsung,exynos7-pwm
- samsung,exynosautov9-pwm
- samsung,exynosautov920-pwm
+ - tesla,fsd-pwm
- const: samsung,exynos4210-pwm

reg:
--
2.34.1


2023-12-05 09:42:04

by Uwe Kleine-König

[permalink] [raw]
Subject: Re: [PATCH 2/6] dt-bindings: pwm: samsung: add specific compatible for Tesla FSD

Hello,

On Tue, Dec 05, 2023 at 10:22:25AM +0100, Krzysztof Kozlowski wrote:
> Tesla FSD is a derivative of Samsung Exynos SoC, thus just like the
> others it reuses several devices from older designs. Historically we
> kept the old (block's) compatible only. This works fine and there is no
> bug here, however guidelines expressed in
> Documentation/devicetree/bindings/writing-bindings.rst state that:
> 1. Compatibles should be specific.
> 2. We should add new compatibles in case of bugs or features.
>
> Add Tesla FSD compatible specific to be used with an existing fallback.
>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>

Acked-by: Uwe Kleine-K?nig <[email protected]>

Best regards
Uwe

--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | https://www.pengutronix.de/ |


Attachments:
(No filename) (915.00 B)
signature.asc (499.00 B)
Download all attachments

2023-12-06 16:16:50

by Thierry Reding

[permalink] [raw]
Subject: Re: [PATCH 2/6] dt-bindings: pwm: samsung: add specific compatible for Tesla FSD

On Tue, Dec 05, 2023 at 10:22:25AM +0100, Krzysztof Kozlowski wrote:
> Tesla FSD is a derivative of Samsung Exynos SoC, thus just like the
> others it reuses several devices from older designs. Historically we
> kept the old (block's) compatible only. This works fine and there is no
> bug here, however guidelines expressed in
> Documentation/devicetree/bindings/writing-bindings.rst state that:
> 1. Compatibles should be specific.
> 2. We should add new compatibles in case of bugs or features.
>
> Add Tesla FSD compatible specific to be used with an existing fallback.
>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>
>
> ---
>
> I propose to take the patch through Samsung SoC (me). See cover letter
> for explanation.
> ---
> Documentation/devicetree/bindings/pwm/pwm-samsung.yaml | 1 +
> 1 file changed, 1 insertion(+)

You point to the guidelines that say we should have specific compatible
strings, but then the string that you add seems very generic. Now, I'm
obviously not an expert on Tesla hardware, but just FSD seems to be
quite generic according to the internet. It seems like the chip derived
from Samsung used to be known as AP3/HW3, but there's now also AP4/HW4,
so I wonder if those differ in some way and if these shouldn't include
some sort of version/generation number.

Thierry


Attachments:
(No filename) (1.33 kB)
signature.asc (849.00 B)
Download all attachments

2023-12-06 17:36:16

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 2/6] dt-bindings: pwm: samsung: add specific compatible for Tesla FSD

On 06/12/2023 17:16, Thierry Reding wrote:
> On Tue, Dec 05, 2023 at 10:22:25AM +0100, Krzysztof Kozlowski wrote:
>> Tesla FSD is a derivative of Samsung Exynos SoC, thus just like the
>> others it reuses several devices from older designs. Historically we
>> kept the old (block's) compatible only. This works fine and there is no
>> bug here, however guidelines expressed in
>> Documentation/devicetree/bindings/writing-bindings.rst state that:
>> 1. Compatibles should be specific.
>> 2. We should add new compatibles in case of bugs or features.
>>
>> Add Tesla FSD compatible specific to be used with an existing fallback.
>>
>> Signed-off-by: Krzysztof Kozlowski <[email protected]>
>>
>> ---
>>
>> I propose to take the patch through Samsung SoC (me). See cover letter
>> for explanation.
>> ---
>> Documentation/devicetree/bindings/pwm/pwm-samsung.yaml | 1 +
>> 1 file changed, 1 insertion(+)
>
> You point to the guidelines that say we should have specific compatible> strings, but then the string that you add seems very generic. Now, I'm
> obviously not an expert on Tesla hardware, but just FSD seems to be
> quite generic according to the internet. It seems like the chip derived
> from Samsung used to be known as AP3/HW3, but there's now also AP4/HW4,
> so I wonder if those differ in some way and if these shouldn't include
> some sort of version/generation number.

That's the compatible chosen that time for entire platform, as a
consensus, for all SoC components. Thus the PWM compatible is as
specific as it can get.

Best regards,
Krzysztof

2023-12-06 22:03:20

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH 2/6] dt-bindings: pwm: samsung: add specific compatible for Tesla FSD


On Tue, 05 Dec 2023 10:22:25 +0100, Krzysztof Kozlowski wrote:
> Tesla FSD is a derivative of Samsung Exynos SoC, thus just like the
> others it reuses several devices from older designs. Historically we
> kept the old (block's) compatible only. This works fine and there is no
> bug here, however guidelines expressed in
> Documentation/devicetree/bindings/writing-bindings.rst state that:
> 1. Compatibles should be specific.
> 2. We should add new compatibles in case of bugs or features.
>
> Add Tesla FSD compatible specific to be used with an existing fallback.
>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>
>
> ---
>
> I propose to take the patch through Samsung SoC (me). See cover letter
> for explanation.
> ---
> Documentation/devicetree/bindings/pwm/pwm-samsung.yaml | 1 +
> 1 file changed, 1 insertion(+)
>

Acked-by: Rob Herring <[email protected]>