diff mbox series

[v2,05/29] dt-bindings: soc: realtek: rtd1195-chip: Add iso-syscon property

Message ID 20200623025106.31273-6-afaerber@suse.de
State New
Headers show
Series ARM: Realtek DHC SoC info | expand

Commit Message

Andreas Färber June 23, 2020, 2:50 a.m. UTC
Allow to optionally specify a phandle to iso syscon to identify the chip.
RTD1295 family will want to check the ISO_CHIP_INFO1 register.

Signed-off-by: Andreas Färber <afaerber@suse.de>

---
 A SoC specific binding would defeat the purpose of the generic Linux driver
 detecting the SoC based on registers.
 Simply allowing it all for SoC families seems the most flexible.
 
 v1 -> v2:
 * Instead of extending reg, allow optional iso-syscon property for RTD129x.
   Iso syscon currently does not have a compatible, and it may need to differ
   across SoC families.
 
 .../bindings/soc/realtek/realtek,rtd1195-chip.yaml       | 9 +++++++++
 1 file changed, 9 insertions(+)

-- 
2.26.2

Comments

Rob Herring July 14, 2020, 2:13 a.m. UTC | #1
On Tue, Jun 23, 2020 at 04:50:42AM +0200, Andreas Färber wrote:
> Allow to optionally specify a phandle to iso syscon to identify the chip.

> RTD1295 family will want to check the ISO_CHIP_INFO1 register.

> 

> Signed-off-by: Andreas Färber <afaerber@suse.de>

> ---

>  A SoC specific binding would defeat the purpose of the generic Linux driver

>  detecting the SoC based on registers.

>  Simply allowing it all for SoC families seems the most flexible.

>  

>  v1 -> v2:

>  * Instead of extending reg, allow optional iso-syscon property for RTD129x.

>    Iso syscon currently does not have a compatible, and it may need to differ

>    across SoC families.

>  

>  .../bindings/soc/realtek/realtek,rtd1195-chip.yaml       | 9 +++++++++

>  1 file changed, 9 insertions(+)

> 

> diff --git a/Documentation/devicetree/bindings/soc/realtek/realtek,rtd1195-chip.yaml b/Documentation/devicetree/bindings/soc/realtek/realtek,rtd1195-chip.yaml

> index 86a1de214782..dfe33c95f68d 100644

> --- a/Documentation/devicetree/bindings/soc/realtek/realtek,rtd1195-chip.yaml

> +++ b/Documentation/devicetree/bindings/soc/realtek/realtek,rtd1195-chip.yaml

> @@ -11,6 +11,7 @@ maintainers:

>  

>  description: |

>    The Realtek DHC SoCs have some registers to identify the chip and revision.

> +  To identify the exact model within a family, further registers are needed.

>  

>  properties:

>    compatible:

> @@ -19,6 +20,8 @@ properties:

>    reg:

>      maxItems: 1

>  

> +  iso-syscon: true


Needs a type $ref (phandle).

> +

>  required:

>    - compatible

>    - reg

> @@ -31,4 +34,10 @@ examples:

>          compatible = "realtek,rtd1195-chip";

>          reg = <0x1801a200 0x8>;

>      };

> +  - |

> +    chip-info@9801a200 {

> +        compatible = "realtek,rtd1195-chip";

> +        reg = <0x9801a200 0x8>;

> +        iso-syscon = <&iso>;

> +    };

>  ...

> -- 

> 2.26.2

>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/soc/realtek/realtek,rtd1195-chip.yaml b/Documentation/devicetree/bindings/soc/realtek/realtek,rtd1195-chip.yaml
index 86a1de214782..dfe33c95f68d 100644
--- a/Documentation/devicetree/bindings/soc/realtek/realtek,rtd1195-chip.yaml
+++ b/Documentation/devicetree/bindings/soc/realtek/realtek,rtd1195-chip.yaml
@@ -11,6 +11,7 @@  maintainers:
 
 description: |
   The Realtek DHC SoCs have some registers to identify the chip and revision.
+  To identify the exact model within a family, further registers are needed.
 
 properties:
   compatible:
@@ -19,6 +20,8 @@  properties:
   reg:
     maxItems: 1
 
+  iso-syscon: true
+
 required:
   - compatible
   - reg
@@ -31,4 +34,10 @@  examples:
         compatible = "realtek,rtd1195-chip";
         reg = <0x1801a200 0x8>;
     };
+  - |
+    chip-info@9801a200 {
+        compatible = "realtek,rtd1195-chip";
+        reg = <0x9801a200 0x8>;
+        iso-syscon = <&iso>;
+    };
 ...