diff mbox series

[v5,2/4] dt-bindings: arm: samsung: Update the CHIPID binding for ASV

Message ID 20191016145756.16004-3-s.nawrocki@samsung.com (mailing list archive)
State Superseded
Headers show
Series Exynos Adaptive Supply Voltage support | expand

Commit Message

This patch adds documentation of new optional "samsung,asv-bin"
property in the chipid device node and documents requirement of
"syscon" compatible string.  These additions are needed to support
Exynos ASV (Adaptive Supply Voltage) feature.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
---
Depends on patch ("8d0daa4c89c9 dt-bindings: arm: samsung: Convert
Exynos Chipid bindings to json-schema") already applied to Rob's
dt/next.

Changes since v4:
 - converted to YAML

Changes since v3:
 - none

Changes since v2:
 - corrected patch summary line prefix, the patch moved in the
   sequence

Changes since v1 (RFC):
 - new patch

 .../bindings/arm/samsung/exynos-chipid.yaml   | 31 +++++++++++++++++--
 1 file changed, 28 insertions(+), 3 deletions(-)

--
2.17.1

Comments

Krzysztof Kozlowski Oct. 16, 2019, 4:16 p.m. UTC | #1
On Wed, 16 Oct 2019 at 17:58, Sylwester Nawrocki <s.nawrocki@samsung.com> wrote:
>
> This patch adds documentation of new optional "samsung,asv-bin"
> property in the chipid device node and documents requirement of
> "syscon" compatible string.  These additions are needed to support
> Exynos ASV (Adaptive Supply Voltage) feature.
>
> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
> ---
> Depends on patch ("8d0daa4c89c9 dt-bindings: arm: samsung: Convert
> Exynos Chipid bindings to json-schema") already applied to Rob's
> dt/next.
>
> Changes since v4:
>  - converted to YAML
>
> Changes since v3:
>  - none
>
> Changes since v2:
>  - corrected patch summary line prefix, the patch moved in the
>    sequence
>
> Changes since v1 (RFC):
>  - new patch
>
>  .../bindings/arm/samsung/exynos-chipid.yaml   | 31 +++++++++++++++++--
>  1 file changed, 28 insertions(+), 3 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/arm/samsung/exynos-chipid.yaml b/Documentation/devicetree/bindings/arm/samsung/exynos-chipid.yaml
> index 9c573ad7dc7d..df84d9e9f4c2 100644
> --- a/Documentation/devicetree/bindings/arm/samsung/exynos-chipid.yaml
> +++ b/Documentation/devicetree/bindings/arm/samsung/exynos-chipid.yaml
> @@ -9,17 +9,42 @@ title: Samsung Exynos SoC series Chipid driver
>  maintainers:
>    - Krzysztof Kozlowski <krzk@kernel.org>
>
> +# Custom select to avoid matching all nodes with 'syscon'
> +select:
> +  properties:
> +    compatible:
> +      contains:
> +        const: samsung,exynos4210-chipid
> +  required:
> +    - compatible
> +
>  properties:
>    compatible:
> -    items:
> -      - const: samsung,exynos4210-chipid
> +    allOf:

I think it was my mistake to use allOf in other Exynos bindings. It
should not be needed.

Rest looks good so with allOf removal:
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>

Best regards,
Krzysztof
On 10/16/19 18:16, Krzysztof Kozlowski wrote:
>> --- a/Documentation/devicetree/bindings/arm/samsung/exynos-chipid.yaml
>> +++ b/Documentation/devicetree/bindings/arm/samsung/exynos-chipid.yaml
>> @@ -9,17 +9,42 @@ title: Samsung Exynos SoC series Chipid driver

BTW, I think we should rename the above title to talk about IP block/device
rather than driver, e.g.

-SAMSUNG Exynos SoCs Chipid driver.
+SAMSUNG Exynos SoC series CHIPID subsystem

>> +# Custom select to avoid matching all nodes with 'syscon'
>> +select:
>> +  properties:
>> +    compatible:
>> +      contains:
>> +        const: samsung,exynos4210-chipid
>> +  required:
>> +    - compatible
>> +
>>  properties:
>>    compatible:
>> -    items:
>> -      - const: samsung,exynos4210-chipid
>> +    allOf:
>
> I think it was my mistake to use allOf in other Exynos bindings. It
> should not be needed.

Indeed it seems to work well without allOf, I was wondering why we
needed the custom select above AND allOf.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/arm/samsung/exynos-chipid.yaml b/Documentation/devicetree/bindings/arm/samsung/exynos-chipid.yaml
index 9c573ad7dc7d..df84d9e9f4c2 100644
--- a/Documentation/devicetree/bindings/arm/samsung/exynos-chipid.yaml
+++ b/Documentation/devicetree/bindings/arm/samsung/exynos-chipid.yaml
@@ -9,17 +9,42 @@  title: Samsung Exynos SoC series Chipid driver
 maintainers:
   - Krzysztof Kozlowski <krzk@kernel.org>

+# Custom select to avoid matching all nodes with 'syscon'
+select:
+  properties:
+    compatible:
+      contains:
+        const: samsung,exynos4210-chipid
+  required:
+    - compatible
+
 properties:
   compatible:
-    items:
-      - const: samsung,exynos4210-chipid
+    allOf:
+      - items:
+        - const: samsung,exynos4210-chipid
+        - const: syscon

   reg:
     maxItems: 1

+  samsung,asv-bin:
+    description:
+      Adaptive Supply Voltage bin selection. This can be used
+      to determine the ASV bin of an SoC if respective information
+      is missing in the CHIPID registers or in the OTP memory.
+    allOf:
+      - $ref: /schemas/types.yaml#/definitions/uint32
+      - enum: [ 0, 1, 2, 3 ]
+
+required:
+  - compatible
+  - reg
+
 examples:
   - |
     chipid@10000000 {
-      compatible = "samsung,exynos4210-chipid";
+      compatible = "samsung,exynos4210-chipid", "syscon";
       reg = <0x10000000 0x100>;
+      samsung,asv-bin = <2>;
     };