diff mbox series

[4/4] dt-bindings: soc: samsung: exynos-sysreg: add clocks for Exynos850

Message ID 20221125112201.240178-4-krzysztof.kozlowski@linaro.org (mailing list archive)
State New
Headers show
Series [1/4] arm64: dts: exynos: add dedicated SYSREG compatibles to Exynos5433 | expand

Commit Message

Krzysztof Kozlowski Nov. 25, 2022, 11:22 a.m. UTC
Exynos850 has dedicated clock for accessing SYSREGs.  Allow it, even
though Linux currently does not enable them and relies on bootloader.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

---

Cc: Sriranjani P <sriranjani.p@samsung.com>
Cc: Chanho Park <chanho61.park@samsung.com>
Cc: Sam Protsenko <semen.protsenko@linaro.org>
---
 .../soc/samsung/samsung,exynos-sysreg.yaml        | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

Comments

Sriranjani P Nov. 25, 2022, 2:33 p.m. UTC | #1
> -----Original Message-----
> From: Krzysztof Kozlowski [mailto:krzysztof.kozlowski@linaro.org]
> Sent: 25 November 2022 16:52
> To: Lee Jones <lee@kernel.org>; Rob Herring <robh+dt@kernel.org>;
Krzysztof
> Kozlowski <krzysztof.kozlowski+dt@linaro.org>; Alim Akhtar
> <alim.akhtar@samsung.com>; devicetree@vger.kernel.org; linux-
> kernel@vger.kernel.org; linux-arm-kernel@lists.infradead.org;
linux-samsung-
> soc@vger.kernel.org
> Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>; Sriranjani P
> <sriranjani.p@samsung.com>; Chanho Park <chanho61.park@samsung.com>;
> Sam Protsenko <semen.protsenko@linaro.org>
> Subject: [PATCH 4/4] dt-bindings: soc: samsung: exynos-sysreg: add clocks
for
> Exynos850
> 
> Exynos850 has dedicated clock for accessing SYSREGs.  Allow it, even
though
> Linux currently does not enable them and relies on bootloader.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> 
> ---
> 
> Cc: Sriranjani P <sriranjani.p@samsung.com>
> Cc: Chanho Park <chanho61.park@samsung.com>
> Cc: Sam Protsenko <semen.protsenko@linaro.org>
> ---

Reviewed-by: Sriranjani P <sriranjani.p@samsung.com>

>  .../soc/samsung/samsung,exynos-sysreg.yaml        | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git
> a/Documentation/devicetree/bindings/soc/samsung/samsung,exynos-
> sysreg.yaml
> b/Documentation/devicetree/bindings/soc/samsung/samsung,exynos-
> sysreg.yaml
> index 42357466005e..27cea934a286 100644
> --- a/Documentation/devicetree/bindings/soc/samsung/samsung,exynos-
> sysreg.yaml
> +++ b/Documentation/devicetree/bindings/soc/samsung/samsung,exynos-
> sysre
> +++ g.yaml
> @@ -36,10 +36,25 @@ properties:
>    reg:
>      maxItems: 1
> 
> +  clocks:
> +    maxItems: 1
> +
>  required:
>    - compatible
>    - reg
> 
> +allOf:
> +  - if:
> +      not:
> +        properties:
> +          compatible:
> +            contains:
> +              enum:
> +                - samsung,exynos850-sysreg
> +    then:
> +      properties:
> +        clocks: false
> +
>  additionalProperties: false
> 
>  examples:
> --
> 2.34.1
Sam Protsenko Nov. 25, 2022, 2:38 p.m. UTC | #2
On Fri, 25 Nov 2022 at 05:22, Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
>
> Exynos850 has dedicated clock for accessing SYSREGs.  Allow it, even
> though Linux currently does not enable them and relies on bootloader.
>

Not sure if this description is correct. Of course, there is no driver
for "samsung,exynos850-sysreg" compatible at the moment, so the next
compatible from the list ("syscon") is used for Exynos850. And
"syscon" driver (drivers/mfd/syscon.c) actually does control the
clocks. I remember adding "clocks" property to Exynos850 dts to fix
actual problem. Also, the "clocks" property is not described in
Documentation/devicetree/bindings/mfd/syscon.yaml, didn't really check
if it's ok or it's just missing.

Other than that comment:

Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>

> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>
> ---
>
> Cc: Sriranjani P <sriranjani.p@samsung.com>
> Cc: Chanho Park <chanho61.park@samsung.com>
> Cc: Sam Protsenko <semen.protsenko@linaro.org>
> ---
>  .../soc/samsung/samsung,exynos-sysreg.yaml        | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/soc/samsung/samsung,exynos-sysreg.yaml b/Documentation/devicetree/bindings/soc/samsung/samsung,exynos-sysreg.yaml
> index 42357466005e..27cea934a286 100644
> --- a/Documentation/devicetree/bindings/soc/samsung/samsung,exynos-sysreg.yaml
> +++ b/Documentation/devicetree/bindings/soc/samsung/samsung,exynos-sysreg.yaml
> @@ -36,10 +36,25 @@ properties:
>    reg:
>      maxItems: 1
>
> +  clocks:
> +    maxItems: 1
> +
>  required:
>    - compatible
>    - reg
>
> +allOf:
> +  - if:
> +      not:
> +        properties:
> +          compatible:
> +            contains:
> +              enum:
> +                - samsung,exynos850-sysreg
> +    then:
> +      properties:
> +        clocks: false
> +
>  additionalProperties: false
>
>  examples:
> --
> 2.34.1
>
Krzysztof Kozlowski Nov. 25, 2022, 2:49 p.m. UTC | #3
On 25/11/2022 15:38, Sam Protsenko wrote:
> On Fri, 25 Nov 2022 at 05:22, Krzysztof Kozlowski
> <krzysztof.kozlowski@linaro.org> wrote:
>>
>> Exynos850 has dedicated clock for accessing SYSREGs.  Allow it, even
>> though Linux currently does not enable them and relies on bootloader.
>>
> 
> Not sure if this description is correct. Of course, there is no driver
> for "samsung,exynos850-sysreg" compatible at the moment, so the next
> compatible from the list ("syscon") is used for Exynos850. And
> "syscon" driver (drivers/mfd/syscon.c) actually does control the
> clocks. I remember adding "clocks" property to Exynos850 dts to fix
> actual problem. Also, the "clocks" property is not described in
> Documentation/devicetree/bindings/mfd/syscon.yaml, didn't really check
> if it's ok or it's just missing.
> 
> Other than that comment:
> 
> Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>
> 
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Ah, then commit msg is not good. I'll update it and maybe the clocks
should be required for Exynos850?

Best regards,
Krzysztof
Sam Protsenko Nov. 25, 2022, 3:01 p.m. UTC | #4
On Fri, 25 Nov 2022 at 08:49, Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
>
> On 25/11/2022 15:38, Sam Protsenko wrote:
> > On Fri, 25 Nov 2022 at 05:22, Krzysztof Kozlowski
> > <krzysztof.kozlowski@linaro.org> wrote:
> >>
> >> Exynos850 has dedicated clock for accessing SYSREGs.  Allow it, even
> >> though Linux currently does not enable them and relies on bootloader.
> >>
> >
> > Not sure if this description is correct. Of course, there is no driver
> > for "samsung,exynos850-sysreg" compatible at the moment, so the next
> > compatible from the list ("syscon") is used for Exynos850. And
> > "syscon" driver (drivers/mfd/syscon.c) actually does control the
> > clocks. I remember adding "clocks" property to Exynos850 dts to fix
> > actual problem. Also, the "clocks" property is not described in
> > Documentation/devicetree/bindings/mfd/syscon.yaml, didn't really check
> > if it's ok or it's just missing.
> >
> > Other than that comment:
> >
> > Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>
> >
> >> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>
> Ah, then commit msg is not good. I'll update it and maybe the clocks
> should be required for Exynos850?
>

Yeah, looks like all Exynos850 sysreg blocks have dedicated clock.
Please make it required. And thanks for working on that! :)

> Best regards,
> Krzysztof
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/soc/samsung/samsung,exynos-sysreg.yaml b/Documentation/devicetree/bindings/soc/samsung/samsung,exynos-sysreg.yaml
index 42357466005e..27cea934a286 100644
--- a/Documentation/devicetree/bindings/soc/samsung/samsung,exynos-sysreg.yaml
+++ b/Documentation/devicetree/bindings/soc/samsung/samsung,exynos-sysreg.yaml
@@ -36,10 +36,25 @@  properties:
   reg:
     maxItems: 1
 
+  clocks:
+    maxItems: 1
+
 required:
   - compatible
   - reg
 
+allOf:
+  - if:
+      not:
+        properties:
+          compatible:
+            contains:
+              enum:
+                - samsung,exynos850-sysreg
+    then:
+      properties:
+        clocks: false
+
 additionalProperties: false
 
 examples: