linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] Add SoC identification support for RZ/V2M
@ 2022-11-10 16:21 Biju Das
  2022-11-10 16:21 ` [PATCH v2 1/3] dt-bindings: arm: renesas: Document Renesas RZ/V2M System Configuration Biju Das
  2022-11-10 16:21 ` [PATCH v2 3/3] arm64: dts: renesas: r9a09g011: Add system configuration node Biju Das
  0 siblings, 2 replies; 24+ messages in thread
From: Biju Das @ 2022-11-10 16:21 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski
  Cc: Biju Das, Geert Uytterhoeven, Magnus Damm, linux-renesas-soc,
	devicetree, Chris Paterson, Fabrizio Castro

This patch series aims to add SoC identification support for RZ/V2M.

v1->v2:
 * Moved the binding file from arm->soc/renesas
 * Updated the binding example
 * Removed config from patch#2 as it is already present
 * Removed extra space before 'else if' statement

Ref:
[1] https://patchwork.kernel.org/project/linux-renesas-soc/patch/20220321154232.56315-3-phil.edworthy@renesas.com/
[2] https://patchwork.kernel.org/project/linux-renesas-soc/patch/20220321154232.56315-8-phil.edworthy@renesas.com/

logs:
root@rzv2m:~# dmesg | grep "Renesas RZ/V2M"
[ 0.119196] Detected Renesas RZ/V2M r9a09g011 1.1

root@rzv2m:~# for i in machine family soc_id revision; do echo -n "$i: ";cat /sys/devices/soc0/$i; done
machine: RZ/V2M Evaluation Kit 2.0
family: RZ/V2M
soc_id: r9a09g011
revision: 1.1

Biju Das (1):
  arm64: dts: renesas: r9a09g011: Add system configuration node

Phil Edworthy (2):
  dt-bindings: arm: renesas: Document Renesas RZ/V2M System
    Configuration
  soc: renesas: Identify RZ/V2M SoC

 .../soc/renesas/renesas,rzv2m-sys.yaml        | 39 +++++++++++++++++++
 arch/arm64/boot/dts/renesas/r9a09g011.dtsi    |  6 +++
 drivers/soc/renesas/renesas-soc.c             | 22 +++++++++++
 3 files changed, 67 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/soc/renesas/renesas,rzv2m-sys.yaml

-- 
2.25.1


^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH v2 1/3] dt-bindings: arm: renesas: Document Renesas RZ/V2M System Configuration
  2022-11-10 16:21 [PATCH v2 0/3] Add SoC identification support for RZ/V2M Biju Das
@ 2022-11-10 16:21 ` Biju Das
  2022-11-11  8:34   ` Krzysztof Kozlowski
  2022-11-10 16:21 ` [PATCH v2 3/3] arm64: dts: renesas: r9a09g011: Add system configuration node Biju Das
  1 sibling, 1 reply; 24+ messages in thread
From: Biju Das @ 2022-11-10 16:21 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski
  Cc: Phil Edworthy, Geert Uytterhoeven, Magnus Damm,
	linux-renesas-soc, devicetree, Chris Paterson, Fabrizio Castro,
	Biju Das

From: Phil Edworthy <phil.edworthy@renesas.com>

Add DT binding documentation for System Configuration (SYS) found on
RZ/V2M SoC's.

SYS block contains the SYS_VERSION register which can be used to retrieve
SoC version information.

Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
[biju: Updated the example ]
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
v1->v2:
 * Moved the file from arm->soc/renesas
 * Updated the path for binding file
 * Updated the example
---
 .../soc/renesas/renesas,rzv2m-sys.yaml        | 39 +++++++++++++++++++
 1 file changed, 39 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/soc/renesas/renesas,rzv2m-sys.yaml

diff --git a/Documentation/devicetree/bindings/soc/renesas/renesas,rzv2m-sys.yaml b/Documentation/devicetree/bindings/soc/renesas/renesas,rzv2m-sys.yaml
new file mode 100644
index 000000000000..cc41747798e2
--- /dev/null
+++ b/Documentation/devicetree/bindings/soc/renesas/renesas,rzv2m-sys.yaml
@@ -0,0 +1,39 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/soc/renesas/renesas,rzv2m-sys.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Renesas RZ/V2M System Configuration (SYS)
+
+maintainers:
+  - Geert Uytterhoeven <geert+renesas@glider.be>
+
+description:
+  The RZ/V2M System Configuration (SYS) performs system control of the LSI
+  and supports the following functions,
+  - LSI version
+  - 34-bit address space access function
+  - PCIe related settings
+  - WDT stop control
+  - Temperature sensor (TSU) monitor
+
+properties:
+  compatible:
+    const: renesas,r9a09g011-sys
+
+  reg:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    sysc: system-configuration@a3f03000 {
+            compatible = "renesas,r9a09g011-sys";
+            reg = <0xa3f03000 0x400>;
+    };
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH v2 3/3] arm64: dts: renesas: r9a09g011: Add system configuration node
  2022-11-10 16:21 [PATCH v2 0/3] Add SoC identification support for RZ/V2M Biju Das
  2022-11-10 16:21 ` [PATCH v2 1/3] dt-bindings: arm: renesas: Document Renesas RZ/V2M System Configuration Biju Das
@ 2022-11-10 16:21 ` Biju Das
  2022-11-11  8:34   ` Krzysztof Kozlowski
  1 sibling, 1 reply; 24+ messages in thread
From: Biju Das @ 2022-11-10 16:21 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski
  Cc: Biju Das, Geert Uytterhoeven, Magnus Damm, linux-renesas-soc,
	devicetree, Chris Paterson, Fabrizio Castro

Add system configuration node to RZ/V2M SoC dtsi.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
v2:
 * New patch
---
 arch/arm64/boot/dts/renesas/r9a09g011.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/r9a09g011.dtsi b/arch/arm64/boot/dts/renesas/r9a09g011.dtsi
index 7b949e40745a..07164d9e4a0f 100644
--- a/arch/arm64/boot/dts/renesas/r9a09g011.dtsi
+++ b/arch/arm64/boot/dts/renesas/r9a09g011.dtsi
@@ -130,6 +130,12 @@ cpg: clock-controller@a3500000 {
 			#power-domain-cells = <0>;
 		};
 
+		sysc: system-configuration@a3f03000 {
+			compatible = "renesas,r9a09g011-sys";
+			reg = <0 0xa3f03000 0 0x400>;
+			status = "disabled";
+		};
+
 		i2c0: i2c@a4030000 {
 			#address-cells = <1>;
 			#size-cells = <0>;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* Re: [PATCH v2 1/3] dt-bindings: arm: renesas: Document Renesas RZ/V2M System Configuration
  2022-11-10 16:21 ` [PATCH v2 1/3] dt-bindings: arm: renesas: Document Renesas RZ/V2M System Configuration Biju Das
@ 2022-11-11  8:34   ` Krzysztof Kozlowski
  2022-11-11  9:06     ` Biju Das
  0 siblings, 1 reply; 24+ messages in thread
From: Krzysztof Kozlowski @ 2022-11-11  8:34 UTC (permalink / raw)
  To: Biju Das, Rob Herring, Krzysztof Kozlowski
  Cc: Phil Edworthy, Geert Uytterhoeven, Magnus Damm,
	linux-renesas-soc, devicetree, Chris Paterson, Fabrizio Castro

On 10/11/2022 17:21, Biju Das wrote:
> From: Phil Edworthy <phil.edworthy@renesas.com>
> 
> Add DT binding documentation for System Configuration (SYS) found on
> RZ/V2M SoC's.
> 
> SYS block contains the SYS_VERSION register which can be used to retrieve
> SoC version information.
> 
> Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
> [biju: Updated the example ]
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> ---
> v1->v2:
>  * Moved the file from arm->soc/renesas
>  * Updated the path for binding file
>  * Updated the example
> ---
>  .../soc/renesas/renesas,rzv2m-sys.yaml        | 39 +++++++++++++++++++
>  1 file changed, 39 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/soc/renesas/renesas,rzv2m-sys.yaml
> 
> diff --git a/Documentation/devicetree/bindings/soc/renesas/renesas,rzv2m-sys.yaml b/Documentation/devicetree/bindings/soc/renesas/renesas,rzv2m-sys.yaml
> new file mode 100644
> index 000000000000..cc41747798e2
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/soc/renesas/renesas,rzv2m-sys.yaml

Filename should be based on the compatible. Pretty often some common
parts of both are fine (e.g. when file contains multiple compatibles),
but this very different then what I see below.

> @@ -0,0 +1,39 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: "http://devicetree.org/schemas/soc/renesas/renesas,rzv2m-sys.yaml#"
> +$schema: "http://devicetree.org/meta-schemas/core.yaml#"

Drop quotes from both.

> +
> +title: Renesas RZ/V2M System Configuration (SYS)
> +
> +maintainers:
> +  - Geert Uytterhoeven <geert+renesas@glider.be>
> +
> +description:
> +  The RZ/V2M System Configuration (SYS) performs system control of the LSI
> +  and supports the following functions,
> +  - LSI version
> +  - 34-bit address space access function
> +  - PCIe related settings
> +  - WDT stop control
> +  - Temperature sensor (TSU) monitor
> +
> +properties:
> +  compatible:
> +    const: renesas,r9a09g011-sys
> +
> +  reg:
> +    maxItems: 1
> +
> +required:
> +  - compatible
> +  - reg
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    sysc: system-configuration@a3f03000 {

If I get properly the purpose of the device, usually this is called
"system-controller". Use that as device node.

> +            compatible = "renesas,r9a09g011-sys";
> +            reg = <0xa3f03000 0x400>;

Use 4 spaces for example indentation.

> +    };

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2 3/3] arm64: dts: renesas: r9a09g011: Add system configuration node
  2022-11-10 16:21 ` [PATCH v2 3/3] arm64: dts: renesas: r9a09g011: Add system configuration node Biju Das
@ 2022-11-11  8:34   ` Krzysztof Kozlowski
  2022-11-11  9:10     ` Biju Das
  0 siblings, 1 reply; 24+ messages in thread
From: Krzysztof Kozlowski @ 2022-11-11  8:34 UTC (permalink / raw)
  To: Biju Das, Rob Herring, Krzysztof Kozlowski
  Cc: Geert Uytterhoeven, Magnus Damm, linux-renesas-soc, devicetree,
	Chris Paterson, Fabrizio Castro

On 10/11/2022 17:21, Biju Das wrote:
> Add system configuration node to RZ/V2M SoC dtsi.
> 
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> ---
> v2:
>  * New patch
> ---
>  arch/arm64/boot/dts/renesas/r9a09g011.dtsi | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/renesas/r9a09g011.dtsi b/arch/arm64/boot/dts/renesas/r9a09g011.dtsi
> index 7b949e40745a..07164d9e4a0f 100644
> --- a/arch/arm64/boot/dts/renesas/r9a09g011.dtsi
> +++ b/arch/arm64/boot/dts/renesas/r9a09g011.dtsi
> @@ -130,6 +130,12 @@ cpg: clock-controller@a3500000 {
>  			#power-domain-cells = <0>;
>  		};
>  
> +		sysc: system-configuration@a3f03000 {
> +			compatible = "renesas,r9a09g011-sys";
> +			reg = <0 0xa3f03000 0 0x400>;
> +			status = "disabled";

Why disabled? You do not have any other resources needed. This is odd.

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 24+ messages in thread

* RE: [PATCH v2 1/3] dt-bindings: arm: renesas: Document Renesas RZ/V2M System Configuration
  2022-11-11  8:34   ` Krzysztof Kozlowski
@ 2022-11-11  9:06     ` Biju Das
  2022-11-11 10:51       ` Krzysztof Kozlowski
  0 siblings, 1 reply; 24+ messages in thread
From: Biju Das @ 2022-11-11  9:06 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Rob Herring, Krzysztof Kozlowski
  Cc: Phil Edworthy, Geert Uytterhoeven, Magnus Damm,
	linux-renesas-soc, devicetree, Chris Paterson, Fabrizio Castro

Hi Krzysztof Kozlowski,

> -----Original Message-----
> From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Sent: 11 November 2022 08:34
> To: Biju Das <biju.das.jz@bp.renesas.com>; Rob Herring <robh+dt@kernel.org>;
> Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
> Cc: Phil Edworthy <phil.edworthy@renesas.com>; Geert Uytterhoeven
> <geert+renesas@glider.be>; Magnus Damm <magnus.damm@gmail.com>; linux-
> renesas-soc@vger.kernel.org; devicetree@vger.kernel.org; Chris Paterson
> <Chris.Paterson2@renesas.com>; Fabrizio Castro
> <fabrizio.castro.jz@renesas.com>
> Subject: Re: [PATCH v2 1/3] dt-bindings: arm: renesas: Document Renesas
> RZ/V2M System Configuration
> 
> On 10/11/2022 17:21, Biju Das wrote:
> > From: Phil Edworthy <phil.edworthy@renesas.com>
> >
> > Add DT binding documentation for System Configuration (SYS) found on
> > RZ/V2M SoC's.
> >
> > SYS block contains the SYS_VERSION register which can be used to
> > retrieve SoC version information.
> >
> > Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
> > [biju: Updated the example ]
> > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> > ---
> > v1->v2:
> >  * Moved the file from arm->soc/renesas
> >  * Updated the path for binding file
> >  * Updated the example
> > ---
> >  .../soc/renesas/renesas,rzv2m-sys.yaml        | 39 +++++++++++++++++++
> >  1 file changed, 39 insertions(+)
> >  create mode 100644
> > Documentation/devicetree/bindings/soc/renesas/renesas,rzv2m-sys.yaml
> >
> > diff --git
> > a/Documentation/devicetree/bindings/soc/renesas/renesas,rzv2m-sys.yaml
> > b/Documentation/devicetree/bindings/soc/renesas/renesas,rzv2m-sys.yaml
> > new file mode 100644
> > index 000000000000..cc41747798e2
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/soc/renesas/renesas,rzv2m-sys.
> > +++ yaml
> 
> Filename should be based on the compatible. Pretty often some common parts of
> both are fine (e.g. when file contains multiple compatibles), but this very
> different then what I see below.

We plan to upstream another similar SoC, RZ/V2MA which has similar IP, so we may
need to add generic compatible rzv2m-sys. I am checking with HW people to get
more info about RZ/V2MA.

> 
> > @@ -0,0 +1,39 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2
> > +---
> > +$id:
> "
"
> > +$schema:
> "
"
> 
> Drop quotes from both.

OK.

> 
> > +
> > +title: Renesas RZ/V2M System Configuration (SYS)
> > +
> > +maintainers:
> > +  - Geert Uytterhoeven <geert+renesas@glider.be>
> > +
> > +description:
> > +  The RZ/V2M System Configuration (SYS) performs system control of
> > +the LSI
> > +  and supports the following functions,
> > +  - LSI version
> > +  - 34-bit address space access function
> > +  - PCIe related settings
> > +  - WDT stop control
> > +  - Temperature sensor (TSU) monitor
> > +
> > +properties:
> > +  compatible:
> > +    const: renesas,r9a09g011-sys
> > +
> > +  reg:
> > +    maxItems: 1
> > +
> > +required:
> > +  - compatible
> > +  - reg
> > +
> > +additionalProperties: false
> > +
> > +examples:
> > +  - |
> > +    sysc: system-configuration@a3f03000 {
> 
> If I get properly the purpose of the device, usually this is called "system-
> controller". Use that as device node.

The hardware manual mentions the below. So want to consistent with HW manual.

Section 38 System Configuration (SYS)
This section describes the functions of the system configuration (SYS).

> 
> > +            compatible = "renesas,r9a09g011-sys";
> > +            reg = <0xa3f03000 0x400>;
> 
> Use 4 spaces for example indentation.

OK, Agreed.

Cheers,
Biju


^ permalink raw reply	[flat|nested] 24+ messages in thread

* RE: [PATCH v2 3/3] arm64: dts: renesas: r9a09g011: Add system configuration node
  2022-11-11  8:34   ` Krzysztof Kozlowski
@ 2022-11-11  9:10     ` Biju Das
  2022-11-11 10:50       ` Krzysztof Kozlowski
  0 siblings, 1 reply; 24+ messages in thread
From: Biju Das @ 2022-11-11  9:10 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Rob Herring, Krzysztof Kozlowski
  Cc: Geert Uytterhoeven, Magnus Damm, linux-renesas-soc, devicetree,
	Chris Paterson, Fabrizio Castro

Hi Krzysztof Kozlowski,

Thanks for the  feedback.

> -----Original Message-----
> From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Sent: 11 November 2022 08:35
> To: Biju Das <biju.das.jz@bp.renesas.com>; Rob Herring <robh+dt@kernel.org>;
> Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
> Cc: Geert Uytterhoeven <geert+renesas@glider.be>; Magnus Damm
> <magnus.damm@gmail.com>; linux-renesas-soc@vger.kernel.org;
> devicetree@vger.kernel.org; Chris Paterson <Chris.Paterson2@renesas.com>;
> Fabrizio Castro <fabrizio.castro.jz@renesas.com>
> Subject: Re: [PATCH v2 3/3] arm64: dts: renesas: r9a09g011: Add system
> configuration node
> 
> On 10/11/2022 17:21, Biju Das wrote:
> > Add system configuration node to RZ/V2M SoC dtsi.
> >
> > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> > ---
> > v2:
> >  * New patch
> > ---
> >  arch/arm64/boot/dts/renesas/r9a09g011.dtsi | 6 ++++++
> >  1 file changed, 6 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/renesas/r9a09g011.dtsi
> b/arch/arm64/boot/dts/renesas/r9a09g011.dtsi
> > index 7b949e40745a..07164d9e4a0f 100644
> > --- a/arch/arm64/boot/dts/renesas/r9a09g011.dtsi
> > +++ b/arch/arm64/boot/dts/renesas/r9a09g011.dtsi
> > @@ -130,6 +130,12 @@ cpg: clock-controller@a3500000 {
> >  			#power-domain-cells = <0>;
> >  		};
> >
> > +		sysc: system-configuration@a3f03000 {
> > +			compatible = "renesas,r9a09g011-sys";
> > +			reg = <0 0xa3f03000 0 0x400>;
> > +			status = "disabled";
> 
> Why disabled? You do not have any other resources needed. This is odd.

OK, will enable by default. Currently the driver compatible is used for getting SoC
Major and Minor versions. But later will enhance to support more features.

Cheers,
Biju

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2 3/3] arm64: dts: renesas: r9a09g011: Add system configuration node
  2022-11-11  9:10     ` Biju Das
@ 2022-11-11 10:50       ` Krzysztof Kozlowski
  2022-11-11 11:25         ` Biju Das
  0 siblings, 1 reply; 24+ messages in thread
From: Krzysztof Kozlowski @ 2022-11-11 10:50 UTC (permalink / raw)
  To: Biju Das, Rob Herring, Krzysztof Kozlowski
  Cc: Geert Uytterhoeven, Magnus Damm, linux-renesas-soc, devicetree,
	Chris Paterson, Fabrizio Castro

On 11/11/2022 10:10, Biju Das wrote:
> Hi Krzysztof Kozlowski,
> 
> Thanks for the  feedback.
> 
>> -----Original Message-----
>> From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>> Sent: 11 November 2022 08:35
>> To: Biju Das <biju.das.jz@bp.renesas.com>; Rob Herring <robh+dt@kernel.org>;
>> Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
>> Cc: Geert Uytterhoeven <geert+renesas@glider.be>; Magnus Damm
>> <magnus.damm@gmail.com>; linux-renesas-soc@vger.kernel.org;
>> devicetree@vger.kernel.org; Chris Paterson <Chris.Paterson2@renesas.com>;
>> Fabrizio Castro <fabrizio.castro.jz@renesas.com>
>> Subject: Re: [PATCH v2 3/3] arm64: dts: renesas: r9a09g011: Add system
>> configuration node
>>
>> On 10/11/2022 17:21, Biju Das wrote:
>>> Add system configuration node to RZ/V2M SoC dtsi.
>>>
>>> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
>>> ---
>>> v2:
>>>  * New patch
>>> ---
>>>  arch/arm64/boot/dts/renesas/r9a09g011.dtsi | 6 ++++++
>>>  1 file changed, 6 insertions(+)
>>>
>>> diff --git a/arch/arm64/boot/dts/renesas/r9a09g011.dtsi
>> b/arch/arm64/boot/dts/renesas/r9a09g011.dtsi
>>> index 7b949e40745a..07164d9e4a0f 100644
>>> --- a/arch/arm64/boot/dts/renesas/r9a09g011.dtsi
>>> +++ b/arch/arm64/boot/dts/renesas/r9a09g011.dtsi
>>> @@ -130,6 +130,12 @@ cpg: clock-controller@a3500000 {
>>>  			#power-domain-cells = <0>;
>>>  		};
>>>
>>> +		sysc: system-configuration@a3f03000 {
>>> +			compatible = "renesas,r9a09g011-sys";
>>> +			reg = <0 0xa3f03000 0 0x400>;
>>> +			status = "disabled";
>>
>> Why disabled? You do not have any other resources needed. This is odd.
> 
> OK, will enable by default. Currently the driver compatible is used for getting SoC
> Major and Minor versions. But later will enhance to support more features.

Whatever your driver is doing, should be rather independent of
enabling/disabling nodes in DTS. Generic rule is that all SoC
components, which do not need external resources from board, should be
enabled by default. Of course there are exceptions to this rule. DTS is
anyway description of hardware, so "driver compatible" is not
appropriate argument for this (or I miss the meaning behind this).

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2 1/3] dt-bindings: arm: renesas: Document Renesas RZ/V2M System Configuration
  2022-11-11  9:06     ` Biju Das
@ 2022-11-11 10:51       ` Krzysztof Kozlowski
  2022-11-11 11:16         ` Biju Das
  0 siblings, 1 reply; 24+ messages in thread
From: Krzysztof Kozlowski @ 2022-11-11 10:51 UTC (permalink / raw)
  To: Biju Das, Rob Herring, Krzysztof Kozlowski
  Cc: Phil Edworthy, Geert Uytterhoeven, Magnus Damm,
	linux-renesas-soc, devicetree, Chris Paterson, Fabrizio Castro

On 11/11/2022 10:06, Biju Das wrote:
> Hi Krzysztof Kozlowski,
> 
>> -----Original Message-----
>> From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>> Sent: 11 November 2022 08:34
>> To: Biju Das <biju.das.jz@bp.renesas.com>; Rob Herring <robh+dt@kernel.org>;
>> Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
>> Cc: Phil Edworthy <phil.edworthy@renesas.com>; Geert Uytterhoeven
>> <geert+renesas@glider.be>; Magnus Damm <magnus.damm@gmail.com>; linux-
>> renesas-soc@vger.kernel.org; devicetree@vger.kernel.org; Chris Paterson
>> <Chris.Paterson2@renesas.com>; Fabrizio Castro
>> <fabrizio.castro.jz@renesas.com>
>> Subject: Re: [PATCH v2 1/3] dt-bindings: arm: renesas: Document Renesas
>> RZ/V2M System Configuration
>>
>> On 10/11/2022 17:21, Biju Das wrote:
>>> From: Phil Edworthy <phil.edworthy@renesas.com>
>>>
>>> Add DT binding documentation for System Configuration (SYS) found on
>>> RZ/V2M SoC's.
>>>
>>> SYS block contains the SYS_VERSION register which can be used to
>>> retrieve SoC version information.
>>>
>>> Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
>>> [biju: Updated the example ]
>>> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
>>> ---
>>> v1->v2:
>>>  * Moved the file from arm->soc/renesas
>>>  * Updated the path for binding file
>>>  * Updated the example
>>> ---
>>>  .../soc/renesas/renesas,rzv2m-sys.yaml        | 39 +++++++++++++++++++
>>>  1 file changed, 39 insertions(+)
>>>  create mode 100644
>>> Documentation/devicetree/bindings/soc/renesas/renesas,rzv2m-sys.yaml
>>>
>>> diff --git
>>> a/Documentation/devicetree/bindings/soc/renesas/renesas,rzv2m-sys.yaml
>>> b/Documentation/devicetree/bindings/soc/renesas/renesas,rzv2m-sys.yaml
>>> new file mode 100644
>>> index 000000000000..cc41747798e2
>>> --- /dev/null
>>> +++ b/Documentation/devicetree/bindings/soc/renesas/renesas,rzv2m-sys.
>>> +++ yaml
>>
>> Filename should be based on the compatible. Pretty often some common parts of
>> both are fine (e.g. when file contains multiple compatibles), but this very
>> different then what I see below.
> 
> We plan to upstream another similar SoC, RZ/V2MA which has similar IP, so we may
> need to add generic compatible rzv2m-sys. I am checking with HW people to get
> more info about RZ/V2MA.
> 
>>
>>> @@ -0,0 +1,39 @@
>>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2
>>> +---
>>> +$id:
>> "
> "
>>> +$schema:
>> "
> "
>>
>> Drop quotes from both.
> 
> OK.
> 
>>
>>> +
>>> +title: Renesas RZ/V2M System Configuration (SYS)
>>> +
>>> +maintainers:
>>> +  - Geert Uytterhoeven <geert+renesas@glider.be>
>>> +
>>> +description:
>>> +  The RZ/V2M System Configuration (SYS) performs system control of
>>> +the LSI
>>> +  and supports the following functions,
>>> +  - LSI version
>>> +  - 34-bit address space access function
>>> +  - PCIe related settings
>>> +  - WDT stop control
>>> +  - Temperature sensor (TSU) monitor
>>> +
>>> +properties:
>>> +  compatible:
>>> +    const: renesas,r9a09g011-sys
>>> +
>>> +  reg:
>>> +    maxItems: 1
>>> +
>>> +required:
>>> +  - compatible
>>> +  - reg
>>> +
>>> +additionalProperties: false
>>> +
>>> +examples:
>>> +  - |
>>> +    sysc: system-configuration@a3f03000 {
>>
>> If I get properly the purpose of the device, usually this is called "system-
>> controller". Use that as device node.
> 
> The hardware manual mentions the below. So want to consistent with HW manual.

If the hardware manual said this is called "foo-whatever-name" or
"rz85736dfnx2", you would use it as well?

Node names should be generic.
https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation

> 
> Section 38 System Configuration (SYS)
> This section describes the functions of the system configuration (SYS).

So NAK.

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 24+ messages in thread

* RE: [PATCH v2 1/3] dt-bindings: arm: renesas: Document Renesas RZ/V2M System Configuration
  2022-11-11 10:51       ` Krzysztof Kozlowski
@ 2022-11-11 11:16         ` Biju Das
  2022-11-14 16:18           ` Biju Das
  0 siblings, 1 reply; 24+ messages in thread
From: Biju Das @ 2022-11-11 11:16 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Rob Herring, Krzysztof Kozlowski
  Cc: Phil Edworthy, Geert Uytterhoeven, Magnus Damm,
	linux-renesas-soc, devicetree, Chris Paterson, Fabrizio Castro



> -----Original Message-----
> From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Sent: 11 November 2022 10:52
> To: Biju Das <biju.das.jz@bp.renesas.com>; Rob Herring <robh+dt@kernel.org>;
> Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
> Cc: Phil Edworthy <phil.edworthy@renesas.com>; Geert Uytterhoeven
> <geert+renesas@glider.be>; Magnus Damm <magnus.damm@gmail.com>; linux-
> renesas-soc@vger.kernel.org; devicetree@vger.kernel.org; Chris Paterson
> <Chris.Paterson2@renesas.com>; Fabrizio Castro
> <fabrizio.castro.jz@renesas.com>
> Subject: Re: [PATCH v2 1/3] dt-bindings: arm: renesas: Document Renesas
> RZ/V2M System Configuration
> 
> On 11/11/2022 10:06, Biju Das wrote:
> > Hi Krzysztof Kozlowski,
> >
> >> -----Original Message-----
> >> From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> >> Sent: 11 November 2022 08:34
> >> To: Biju Das <biju.das.jz@bp.renesas.com>; Rob Herring
> >> <robh+dt@kernel.org>; Krzysztof Kozlowski
> >> <krzysztof.kozlowski+dt@linaro.org>
> >> Cc: Phil Edworthy <phil.edworthy@renesas.com>; Geert Uytterhoeven
> >> <geert+renesas@glider.be>; Magnus Damm <magnus.damm@gmail.com>;
> >> linux- renesas-soc@vger.kernel.org; devicetree@vger.kernel.org; Chris
> >> Paterson <Chris.Paterson2@renesas.com>; Fabrizio Castro
> >> <fabrizio.castro.jz@renesas.com>
> >> Subject: Re: [PATCH v2 1/3] dt-bindings: arm: renesas: Document
> >> Renesas RZ/V2M System Configuration
> >>
> >> On 10/11/2022 17:21, Biju Das wrote:
> >>> From: Phil Edworthy <phil.edworthy@renesas.com>
> >>>
> >>> Add DT binding documentation for System Configuration (SYS) found on
> >>> RZ/V2M SoC's.
> >>>
> >>> SYS block contains the SYS_VERSION register which can be used to
> >>> retrieve SoC version information.
> >>>
> >>> Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
> >>> [biju: Updated the example ]
> >>> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> >>> ---
> >>> v1->v2:
> >>>  * Moved the file from arm->soc/renesas
> >>>  * Updated the path for binding file
> >>>  * Updated the example
> >>> ---
> >>>  .../soc/renesas/renesas,rzv2m-sys.yaml        | 39 +++++++++++++++++++
> >>>  1 file changed, 39 insertions(+)
> >>>  create mode 100644
> >>> Documentation/devicetree/bindings/soc/renesas/renesas,rzv2m-sys.yaml
> >>>
> >>> diff --git
> >>> a/Documentation/devicetree/bindings/soc/renesas/renesas,rzv2m-sys.ya
> >>> ml
> >>> b/Documentation/devicetree/bindings/soc/renesas/renesas,rzv2m-sys.ya
> >>> ml
> >>> new file mode 100644
> >>> index 000000000000..cc41747798e2
> >>> --- /dev/null
> >>> +++ b/Documentation/devicetree/bindings/soc/renesas/renesas,rzv2m-sys.
> >>> +++ yaml
> >>
> >> Filename should be based on the compatible. Pretty often some common
> >> parts of both are fine (e.g. when file contains multiple
> >> compatibles), but this very different then what I see below.
> >
> > We plan to upstream another similar SoC, RZ/V2MA which has similar IP,
> > so we may need to add generic compatible rzv2m-sys. I am checking with
> > HW people to get more info about RZ/V2MA.
> >
> >>
> >>> @@ -0,0 +1,39 @@
> >>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2
> >>> +---
> >>> +$id:
> >> "
> > "
> >>> +$schema:
> >> "
> > "
> >>
> >> Drop quotes from both.
> >
> > OK.
> >
> >>
> >>> +
> >>> +title: Renesas RZ/V2M System Configuration (SYS)
> >>> +
> >>> +maintainers:
> >>> +  - Geert Uytterhoeven <geert+renesas@glider.be>
> >>> +
> >>> +description:
> >>> +  The RZ/V2M System Configuration (SYS) performs system control of
> >>> +the LSI
> >>> +  and supports the following functions,
> >>> +  - LSI version
> >>> +  - 34-bit address space access function
> >>> +  - PCIe related settings
> >>> +  - WDT stop control
> >>> +  - Temperature sensor (TSU) monitor
> >>> +
> >>> +properties:
> >>> +  compatible:
> >>> +    const: renesas,r9a09g011-sys
> >>> +
> >>> +  reg:
> >>> +    maxItems: 1
> >>> +
> >>> +required:
> >>> +  - compatible
> >>> +  - reg
> >>> +
> >>> +additionalProperties: false
> >>> +
> >>> +examples:
> >>> +  - |
> >>> +    sysc: system-configuration@a3f03000 {
> >>
> >> If I get properly the purpose of the device, usually this is called
> >> "system- controller". Use that as device node.
> >
> > The hardware manual mentions the below. So want to consistent with HW
> manual.
> 
> If the hardware manual said this is called "foo-whatever-name" or
> "rz85736dfnx2", you would use it as well?
> 
> Node names should be generic.

What about system-configuration-controller to make it generic or
You still prefer system-controller like [1]

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/dts/renesas/r9a07g054.dtsi?h=v6.1-rc4#n635

Cheers,
Biju


^ permalink raw reply	[flat|nested] 24+ messages in thread

* RE: [PATCH v2 3/3] arm64: dts: renesas: r9a09g011: Add system configuration node
  2022-11-11 10:50       ` Krzysztof Kozlowski
@ 2022-11-11 11:25         ` Biju Das
  0 siblings, 0 replies; 24+ messages in thread
From: Biju Das @ 2022-11-11 11:25 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Rob Herring, Krzysztof Kozlowski
  Cc: Geert Uytterhoeven, Magnus Damm, linux-renesas-soc, devicetree,
	Chris Paterson, Fabrizio Castro

Hi Krzysztof Kozlowski,

> -----Original Message-----
> From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Sent: 11 November 2022 10:51
> To: Biju Das <biju.das.jz@bp.renesas.com>; Rob Herring <robh+dt@kernel.org>;
> Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
> Cc: Geert Uytterhoeven <geert+renesas@glider.be>; Magnus Damm
> <magnus.damm@gmail.com>; linux-renesas-soc@vger.kernel.org;
> devicetree@vger.kernel.org; Chris Paterson <Chris.Paterson2@renesas.com>;
> Fabrizio Castro <fabrizio.castro.jz@renesas.com>
> Subject: Re: [PATCH v2 3/3] arm64: dts: renesas: r9a09g011: Add system
> configuration node
> 
> On 11/11/2022 10:10, Biju Das wrote:
> > Hi Krzysztof Kozlowski,
> >
> > Thanks for the  feedback.
> >
> >> -----Original Message-----
> >> From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> >> Sent: 11 November 2022 08:35
> >> To: Biju Das <biju.das.jz@bp.renesas.com>; Rob Herring
> >> <robh+dt@kernel.org>; Krzysztof Kozlowski
> >> <krzysztof.kozlowski+dt@linaro.org>
> >> Cc: Geert Uytterhoeven <geert+renesas@glider.be>; Magnus Damm
> >> <magnus.damm@gmail.com>; linux-renesas-soc@vger.kernel.org;
> >> devicetree@vger.kernel.org; Chris Paterson
> >> <Chris.Paterson2@renesas.com>; Fabrizio Castro
> >> <fabrizio.castro.jz@renesas.com>
> >> Subject: Re: [PATCH v2 3/3] arm64: dts: renesas: r9a09g011: Add
> >> system configuration node
> >>
> >> On 10/11/2022 17:21, Biju Das wrote:
> >>> Add system configuration node to RZ/V2M SoC dtsi.
> >>>
> >>> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> >>> ---
> >>> v2:
> >>>  * New patch
> >>> ---
> >>>  arch/arm64/boot/dts/renesas/r9a09g011.dtsi | 6 ++++++
> >>>  1 file changed, 6 insertions(+)
> >>>
> >>> diff --git a/arch/arm64/boot/dts/renesas/r9a09g011.dtsi
> >> b/arch/arm64/boot/dts/renesas/r9a09g011.dtsi
> >>> index 7b949e40745a..07164d9e4a0f 100644
> >>> --- a/arch/arm64/boot/dts/renesas/r9a09g011.dtsi
> >>> +++ b/arch/arm64/boot/dts/renesas/r9a09g011.dtsi
> >>> @@ -130,6 +130,12 @@ cpg: clock-controller@a3500000 {
> >>>  			#power-domain-cells = <0>;
> >>>  		};
> >>>
> >>> +		sysc: system-configuration@a3f03000 {
> >>> +			compatible = "renesas,r9a09g011-sys";
> >>> +			reg = <0 0xa3f03000 0 0x400>;
> >>> +			status = "disabled";
> >>
> >> Why disabled? You do not have any other resources needed. This is odd.
> >
> > OK, will enable by default. Currently the driver compatible is used
> > for getting SoC Major and Minor versions. But later will enhance to support
> more features.
> 
> Whatever your driver is doing, should be rather independent of
> enabling/disabling nodes in DTS. Generic rule is that all SoC components,
> which do not need external resources from board, should be enabled by
> default. Of course there are exceptions to this rule. DTS is anyway
> description of hardware, so "driver compatible" is not appropriate argument
> for this (or I miss the meaning behind this).

OK, agreed. Thanks for the detailed description. 

Previously, I just referred [1] for consistency
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/dts/renesas/r9a07g054.dtsi?h=v6.1-rc4#n635


Cheers,
Biju

^ permalink raw reply	[flat|nested] 24+ messages in thread

* RE: [PATCH v2 1/3] dt-bindings: arm: renesas: Document Renesas RZ/V2M System Configuration
  2022-11-11 11:16         ` Biju Das
@ 2022-11-14 16:18           ` Biju Das
  2022-11-14 16:32             ` Krzysztof Kozlowski
  0 siblings, 1 reply; 24+ messages in thread
From: Biju Das @ 2022-11-14 16:18 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Rob Herring, Krzysztof Kozlowski,
	Geert Uytterhoeven
  Cc: Phil Edworthy, Magnus Damm, linux-renesas-soc, devicetree,
	Chris Paterson, Fabrizio Castro

Hi All,

> -----Original Message-----
> From: Biju Das
> Sent: 11 November 2022 11:17
 >
> > On 11/11/2022 10:06, Biju Das wrote:
> > > Hi Krzysztof Kozlowski,
> > >
> > >> -----Original Message-----
> > >> From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> > >> Sent: 11 November 2022 08:34
> > >> To: Biju Das <biju.das.jz@bp.renesas.com>; Rob Herring
> > >> <robh+dt@kernel.org>; Krzysztof Kozlowski
> > >> <krzysztof.kozlowski+dt@linaro.org>
> > >> Cc: Phil Edworthy <phil.edworthy@renesas.com>; Geert Uytterhoeven
> > >> <geert+renesas@glider.be>; Magnus Damm <magnus.damm@gmail.com>;
> > >> linux- renesas-soc@vger.kernel.org; devicetree@vger.kernel.org;
> > >> Chris Paterson <Chris.Paterson2@renesas.com>; Fabrizio Castro
> > >> <fabrizio.castro.jz@renesas.com>
> > >> Subject: Re: [PATCH v2 1/3] dt-bindings: arm: renesas: Document
> > >> Renesas RZ/V2M System Configuration
> > >>
> > >> On 10/11/2022 17:21, Biju Das wrote:
> > >>> From: Phil Edworthy <phil.edworthy@renesas.com>
> > >>>
> > >>> Add DT binding documentation for System Configuration (SYS) found
> > >>> on RZ/V2M SoC's.
> > >>>
> > >>> SYS block contains the SYS_VERSION register which can be used to
> > >>> retrieve SoC version information.
> > >>>
> > >>> Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
> > >>> [biju: Updated the example ]
> > >>> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> > >>> ---
> > >>> v1->v2:
> > >>>  * Moved the file from arm->soc/renesas
> > >>>  * Updated the path for binding file
> > >>>  * Updated the example
> > >>> ---
> > >>>  .../soc/renesas/renesas,rzv2m-sys.yaml        | 39 +++++++++++++++++++
> > >>>  1 file changed, 39 insertions(+)
> > >>>  create mode 100644
> > >>> Documentation/devicetree/bindings/soc/renesas/renesas,rzv2m-sys.ya
> > >>> ml
> > >>>
> > >>> diff --git
> > >>> a/Documentation/devicetree/bindings/soc/renesas/renesas,rzv2m-sys.
> > >>> ya
> > >>> ml
> > >>> b/Documentation/devicetree/bindings/soc/renesas/renesas,rzv2m-sys.
> > >>> ya
> > >>> ml
> > >>> new file mode 100644
> > >>> index 000000000000..cc41747798e2
> > >>> --- /dev/null
> > >>> +++ b/Documentation/devicetree/bindings/soc/renesas/renesas,rzv2m-sys.
> > >>> +++ yaml
> > >>
> > >> Filename should be based on the compatible. Pretty often some
> > >> common parts of both are fine (e.g. when file contains multiple
> > >> compatibles), but this very different then what I see below.
> > >
> > > We plan to upstream another similar SoC, RZ/V2MA which has similar
> > > IP, so we may need to add generic compatible rzv2m-sys. I am
> > > checking with HW people to get more info about RZ/V2MA.
> > >
> > >>
> > >>> @@ -0,0 +1,39 @@
> > >>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML
> > >>> +1.2
> > >>> +---
> > >>> +$id:
> > >> "
> > > "
> > >>> +$schema:
> > >> "
> > > "
> > >>
> > >> Drop quotes from both.
> > >
> > > OK.
> > >
> > >>
> > >>> +
> > >>> +title: Renesas RZ/V2M System Configuration (SYS)
> > >>> +
> > >>> +maintainers:
> > >>> +  - Geert Uytterhoeven <geert+renesas@glider.be>
> > >>> +
> > >>> +description:
> > >>> +  The RZ/V2M System Configuration (SYS) performs system control
> > >>> +of the LSI
> > >>> +  and supports the following functions,
> > >>> +  - LSI version
> > >>> +  - 34-bit address space access function
> > >>> +  - PCIe related settings
> > >>> +  - WDT stop control
> > >>> +  - Temperature sensor (TSU) monitor
> > >>> +
> > >>> +properties:
> > >>> +  compatible:
> > >>> +    const: renesas,r9a09g011-sys
> > >>> +
> > >>> +  reg:
> > >>> +    maxItems: 1
> > >>> +
> > >>> +required:
> > >>> +  - compatible
> > >>> +  - reg
> > >>> +
> > >>> +additionalProperties: false
> > >>> +
> > >>> +examples:
> > >>> +  - |
> > >>> +    sysc: system-configuration@a3f03000 {
> > >>
> > >> If I get properly the purpose of the device, usually this is called
> > >> "system- controller". Use that as device node.
> > >
> > > The hardware manual mentions the below. So want to consistent with
> > > HW
> > manual.
> >
> > If the hardware manual said this is called "foo-whatever-name" or
> > "rz85736dfnx2", you would use it as well?
> >
> > Node names should be generic.

I got the following feedback from LSI team.

*The reason why we use "configuration" and not "controller" is the possibility that users might take it to mean 
"control" of system operation (product operation). This unit determines how the whole LSI configure to operate LSI, 
so we use "configuration" for this IP name.

As per this it is not a controller. It is a Configuration IP.

What should be generic node name for system configuration IP?

Please let us know.

Cheers,
Biju

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2 1/3] dt-bindings: arm: renesas: Document Renesas RZ/V2M System Configuration
  2022-11-14 16:18           ` Biju Das
@ 2022-11-14 16:32             ` Krzysztof Kozlowski
  2022-11-14 16:44               ` Biju Das
  0 siblings, 1 reply; 24+ messages in thread
From: Krzysztof Kozlowski @ 2022-11-14 16:32 UTC (permalink / raw)
  To: Biju Das, Rob Herring, Krzysztof Kozlowski, Geert Uytterhoeven
  Cc: Phil Edworthy, Magnus Damm, linux-renesas-soc, devicetree,
	Chris Paterson, Fabrizio Castro

On 14/11/2022 17:18, Biju Das wrote:
> Hi All,
> 
>> -----Original Message-----
>> From: Biju Das
>> Sent: 11 November 2022 11:17
>  >
>>> On 11/11/2022 10:06, Biju Das wrote:
>>>> Hi Krzysztof Kozlowski,
>>>>
>>>>> -----Original Message-----
>>>>> From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>>>>> Sent: 11 November 2022 08:34
>>>>> To: Biju Das <biju.das.jz@bp.renesas.com>; Rob Herring
>>>>> <robh+dt@kernel.org>; Krzysztof Kozlowski
>>>>> <krzysztof.kozlowski+dt@linaro.org>
>>>>> Cc: Phil Edworthy <phil.edworthy@renesas.com>; Geert Uytterhoeven
>>>>> <geert+renesas@glider.be>; Magnus Damm <magnus.damm@gmail.com>;
>>>>> linux- renesas-soc@vger.kernel.org; devicetree@vger.kernel.org;
>>>>> Chris Paterson <Chris.Paterson2@renesas.com>; Fabrizio Castro
>>>>> <fabrizio.castro.jz@renesas.com>
>>>>> Subject: Re: [PATCH v2 1/3] dt-bindings: arm: renesas: Document
>>>>> Renesas RZ/V2M System Configuration
>>>>>
>>>>> On 10/11/2022 17:21, Biju Das wrote:
>>>>>> From: Phil Edworthy <phil.edworthy@renesas.com>
>>>>>>
>>>>>> Add DT binding documentation for System Configuration (SYS) found
>>>>>> on RZ/V2M SoC's.
>>>>>>
>>>>>> SYS block contains the SYS_VERSION register which can be used to
>>>>>> retrieve SoC version information.
>>>>>>
>>>>>> Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
>>>>>> [biju: Updated the example ]
>>>>>> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
>>>>>> ---
>>>>>> v1->v2:
>>>>>>  * Moved the file from arm->soc/renesas
>>>>>>  * Updated the path for binding file
>>>>>>  * Updated the example
>>>>>> ---
>>>>>>  .../soc/renesas/renesas,rzv2m-sys.yaml        | 39 +++++++++++++++++++
>>>>>>  1 file changed, 39 insertions(+)
>>>>>>  create mode 100644
>>>>>> Documentation/devicetree/bindings/soc/renesas/renesas,rzv2m-sys.ya
>>>>>> ml
>>>>>>
>>>>>> diff --git
>>>>>> a/Documentation/devicetree/bindings/soc/renesas/renesas,rzv2m-sys.
>>>>>> ya
>>>>>> ml
>>>>>> b/Documentation/devicetree/bindings/soc/renesas/renesas,rzv2m-sys.
>>>>>> ya
>>>>>> ml
>>>>>> new file mode 100644
>>>>>> index 000000000000..cc41747798e2
>>>>>> --- /dev/null
>>>>>> +++ b/Documentation/devicetree/bindings/soc/renesas/renesas,rzv2m-sys.
>>>>>> +++ yaml
>>>>>
>>>>> Filename should be based on the compatible. Pretty often some
>>>>> common parts of both are fine (e.g. when file contains multiple
>>>>> compatibles), but this very different then what I see below.
>>>>
>>>> We plan to upstream another similar SoC, RZ/V2MA which has similar
>>>> IP, so we may need to add generic compatible rzv2m-sys. I am
>>>> checking with HW people to get more info about RZ/V2MA.
>>>>
>>>>>
>>>>>> @@ -0,0 +1,39 @@
>>>>>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML
>>>>>> +1.2
>>>>>> +---
>>>>>> +$id:
>>>>> "
>>>> "
>>>>>> +$schema:
>>>>> "
>>>> "
>>>>>
>>>>> Drop quotes from both.
>>>>
>>>> OK.
>>>>
>>>>>
>>>>>> +
>>>>>> +title: Renesas RZ/V2M System Configuration (SYS)
>>>>>> +
>>>>>> +maintainers:
>>>>>> +  - Geert Uytterhoeven <geert+renesas@glider.be>
>>>>>> +
>>>>>> +description:
>>>>>> +  The RZ/V2M System Configuration (SYS) performs system control
>>>>>> +of the LSI
>>>>>> +  and supports the following functions,
>>>>>> +  - LSI version
>>>>>> +  - 34-bit address space access function
>>>>>> +  - PCIe related settings
>>>>>> +  - WDT stop control
>>>>>> +  - Temperature sensor (TSU) monitor
>>>>>> +
>>>>>> +properties:
>>>>>> +  compatible:
>>>>>> +    const: renesas,r9a09g011-sys
>>>>>> +
>>>>>> +  reg:
>>>>>> +    maxItems: 1
>>>>>> +
>>>>>> +required:
>>>>>> +  - compatible
>>>>>> +  - reg
>>>>>> +
>>>>>> +additionalProperties: false
>>>>>> +
>>>>>> +examples:
>>>>>> +  - |
>>>>>> +    sysc: system-configuration@a3f03000 {
>>>>>
>>>>> If I get properly the purpose of the device, usually this is called
>>>>> "system- controller". Use that as device node.
>>>>
>>>> The hardware manual mentions the below. So want to consistent with
>>>> HW
>>> manual.
>>>
>>> If the hardware manual said this is called "foo-whatever-name" or
>>> "rz85736dfnx2", you would use it as well?
>>>
>>> Node names should be generic.
> 
> I got the following feedback from LSI team.
> 
> *The reason why we use "configuration" and not "controller" is the possibility that users might take it to mean 
> "control" of system operation (product operation). This unit determines how the whole LSI configure to operate LSI, 
> so we use "configuration" for this IP name.
> 
> As per this it is not a controller. It is a Configuration IP.
> 
> What should be generic node name for system configuration IP?

Then it's closer to chipid and should be in hwinfo?

Anyway, you wrote in bindings description: "performs system control", so
what can I say?

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 24+ messages in thread

* RE: [PATCH v2 1/3] dt-bindings: arm: renesas: Document Renesas RZ/V2M System Configuration
  2022-11-14 16:32             ` Krzysztof Kozlowski
@ 2022-11-14 16:44               ` Biju Das
  2022-11-14 16:51                 ` Krzysztof Kozlowski
  0 siblings, 1 reply; 24+ messages in thread
From: Biju Das @ 2022-11-14 16:44 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Rob Herring, Krzysztof Kozlowski,
	Geert Uytterhoeven
  Cc: Phil Edworthy, Magnus Damm, linux-renesas-soc, devicetree,
	Chris Paterson, Fabrizio Castro



> -----Original Message-----
> From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Sent: 14 November 2022 16:32
> To: Biju Das <biju.das.jz@bp.renesas.com>; Rob Herring <robh+dt@kernel.org>;
> Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>; Geert Uytterhoeven
> <geert+renesas@glider.be>
> Cc: Phil Edworthy <phil.edworthy@renesas.com>; Magnus Damm
> <magnus.damm@gmail.com>; linux-renesas-soc@vger.kernel.org;
> devicetree@vger.kernel.org; Chris Paterson <Chris.Paterson2@renesas.com>;
> Fabrizio Castro <fabrizio.castro.jz@renesas.com>
> Subject: Re: [PATCH v2 1/3] dt-bindings: arm: renesas: Document Renesas
> RZ/V2M System Configuration
> 
> On 14/11/2022 17:18, Biju Das wrote:
> > Hi All,
> >
> >> -----Original Message-----
> >> From: Biju Das
> >> Sent: 11 November 2022 11:17
> >  >
> >>> On 11/11/2022 10:06, Biju Das wrote:
> >>>> Hi Krzysztof Kozlowski,
> >>>>
> >>>>> -----Original Message-----
> >>>>> From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> >>>>> Sent: 11 November 2022 08:34
> >>>>> To: Biju Das <biju.das.jz@bp.renesas.com>; Rob Herring
> >>>>> <robh+dt@kernel.org>; Krzysztof Kozlowski
> >>>>> <krzysztof.kozlowski+dt@linaro.org>
> >>>>> Cc: Phil Edworthy <phil.edworthy@renesas.com>; Geert Uytterhoeven
> >>>>> <geert+renesas@glider.be>; Magnus Damm <magnus.damm@gmail.com>;
> >>>>> linux- renesas-soc@vger.kernel.org; devicetree@vger.kernel.org;
> >>>>> Chris Paterson <Chris.Paterson2@renesas.com>; Fabrizio Castro
> >>>>> <fabrizio.castro.jz@renesas.com>
> >>>>> Subject: Re: [PATCH v2 1/3] dt-bindings: arm: renesas: Document
> >>>>> Renesas RZ/V2M System Configuration
> >>>>>
> >>>>> On 10/11/2022 17:21, Biju Das wrote:
> >>>>>> From: Phil Edworthy <phil.edworthy@renesas.com>
> >>>>>>
> >>>>>> Add DT binding documentation for System Configuration (SYS) found
> >>>>>> on RZ/V2M SoC's.
> >>>>>>
> >>>>>> SYS block contains the SYS_VERSION register which can be used to
> >>>>>> retrieve SoC version information.
> >>>>>>
> >>>>>> Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
> >>>>>> [biju: Updated the example ]
> >>>>>> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> >>>>>> ---
> >>>>>> v1->v2:
> >>>>>>  * Moved the file from arm->soc/renesas
> >>>>>>  * Updated the path for binding file
> >>>>>>  * Updated the example
> >>>>>> ---
> >>>>>>  .../soc/renesas/renesas,rzv2m-sys.yaml        | 39
> +++++++++++++++++++
> >>>>>>  1 file changed, 39 insertions(+)  create mode 100644
> >>>>>> Documentation/devicetree/bindings/soc/renesas/renesas,rzv2m-sys.y
> >>>>>> a
> >>>>>> ml
> >>>>>>
> >>>>>> diff --git
> >>>>>> a/Documentation/devicetree/bindings/soc/renesas/renesas,rzv2m-sys.
> >>>>>> ya
> >>>>>> ml
> >>>>>> b/Documentation/devicetree/bindings/soc/renesas/renesas,rzv2m-sys.
> >>>>>> ya
> >>>>>> ml
> >>>>>> new file mode 100644
> >>>>>> index 000000000000..cc41747798e2
> >>>>>> --- /dev/null
> >>>>>> +++ b/Documentation/devicetree/bindings/soc/renesas/renesas,rzv2m-sys.
> >>>>>> +++ yaml
> >>>>>
> >>>>> Filename should be based on the compatible. Pretty often some
> >>>>> common parts of both are fine (e.g. when file contains multiple
> >>>>> compatibles), but this very different then what I see below.
> >>>>
> >>>> We plan to upstream another similar SoC, RZ/V2MA which has similar
> >>>> IP, so we may need to add generic compatible rzv2m-sys. I am
> >>>> checking with HW people to get more info about RZ/V2MA.
> >>>>
> >>>>>
> >>>>>> @@ -0,0 +1,39 @@
> >>>>>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML
> >>>>>> +1.2
> >>>>>> +---
> >>>>>> +$id:
> >>>>> "
> >>>> "
> >>>>>> +$schema:
> >>>>> "
> >>>> "
> >>>>>
> >>>>> Drop quotes from both.
> >>>>
> >>>> OK.
> >>>>
> >>>>>
> >>>>>> +
> >>>>>> +title: Renesas RZ/V2M System Configuration (SYS)
> >>>>>> +
> >>>>>> +maintainers:
> >>>>>> +  - Geert Uytterhoeven <geert+renesas@glider.be>
> >>>>>> +
> >>>>>> +description:
> >>>>>> +  The RZ/V2M System Configuration (SYS) performs system control
> >>>>>> +of the LSI
> >>>>>> +  and supports the following functions,
> >>>>>> +  - LSI version
> >>>>>> +  - 34-bit address space access function
> >>>>>> +  - PCIe related settings
> >>>>>> +  - WDT stop control
> >>>>>> +  - Temperature sensor (TSU) monitor
> >>>>>> +
> >>>>>> +properties:
> >>>>>> +  compatible:
> >>>>>> +    const: renesas,r9a09g011-sys
> >>>>>> +
> >>>>>> +  reg:
> >>>>>> +    maxItems: 1
> >>>>>> +
> >>>>>> +required:
> >>>>>> +  - compatible
> >>>>>> +  - reg
> >>>>>> +
> >>>>>> +additionalProperties: false
> >>>>>> +
> >>>>>> +examples:
> >>>>>> +  - |
> >>>>>> +    sysc: system-configuration@a3f03000 {
> >>>>>
> >>>>> If I get properly the purpose of the device, usually this is
> >>>>> called
> >>>>> "system- controller". Use that as device node.
> >>>>
> >>>> The hardware manual mentions the below. So want to consistent with
> >>>> HW
> >>> manual.
> >>>
> >>> If the hardware manual said this is called "foo-whatever-name" or
> >>> "rz85736dfnx2", you would use it as well?
> >>>
> >>> Node names should be generic.
> >
> > I got the following feedback from LSI team.
> >
> > *The reason why we use "configuration" and not "controller" is the
> > possibility that users might take it to mean "control" of system
> > operation (product operation). This unit determines how the whole LSI
> configure to operate LSI, so we use "configuration" for this IP name.
> >
> > As per this it is not a controller. It is a Configuration IP.
> >
> > What should be generic node name for system configuration IP?
> 
> Then it's closer to chipid and should be in hwinfo?

You mean, sys: hwinfo@a3f03000 instead of sys: system-configuration@a3f03000 ??

Also the same IP block is present on rz/v2ma as well?

Shall I use the same file renesas,rzv2m-sys.yaml for both r9a09g011-sys and r9a09g055-sys?

> 
> Anyway, you wrote in bindings description: "performs system control", so what
> can I say?

SYS functional description is as follows.

The SYS controls the overall configuration of the chip, such as

● Bank address settings for DMAC
● Bank address settings of the units for ICB
● ETHER AxCACHE[1] (C bit) control function
● RAMA initialization control
● MD[7:0] pin monitoring
● LSI version register
● General-purpose 32-bit readable/writable registers
● Observability counting stop control for ICB
● WDT counter stop control
● Reading of the temperature sensor reference value

Cheers,
Biju

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2 1/3] dt-bindings: arm: renesas: Document Renesas RZ/V2M System Configuration
  2022-11-14 16:44               ` Biju Das
@ 2022-11-14 16:51                 ` Krzysztof Kozlowski
  2022-11-14 17:05                   ` Biju Das
  0 siblings, 1 reply; 24+ messages in thread
From: Krzysztof Kozlowski @ 2022-11-14 16:51 UTC (permalink / raw)
  To: Biju Das, Rob Herring, Krzysztof Kozlowski, Geert Uytterhoeven
  Cc: Phil Edworthy, Magnus Damm, linux-renesas-soc, devicetree,
	Chris Paterson, Fabrizio Castro

On 14/11/2022 17:44, Biju Das wrote:
>>>>> If the hardware manual said this is called "foo-whatever-name" or
>>>>> "rz85736dfnx2", you would use it as well?
>>>>>
>>>>> Node names should be generic.
>>>
>>> I got the following feedback from LSI team.
>>>
>>> *The reason why we use "configuration" and not "controller" is the
>>> possibility that users might take it to mean "control" of system
>>> operation (product operation). This unit determines how the whole LSI
>> configure to operate LSI, so we use "configuration" for this IP name.
>>>
>>> As per this it is not a controller. It is a Configuration IP.
>>>
>>> What should be generic node name for system configuration IP?
>>
>> Then it's closer to chipid and should be in hwinfo?
> 
> You mean, sys: hwinfo@a3f03000 instead of sys: system-configuration@a3f03000 ??

Rather be put in hwinfo directory. Typical name is "chipid", but I don't
know if your device is a chipid.

> 
> Also the same IP block is present on rz/v2ma as well?
> 
> Shall I use the same file renesas,rzv2m-sys.yaml for both r9a09g011-sys and r9a09g055-sys?
> 
>>
>> Anyway, you wrote in bindings description: "performs system control", so what
>> can I say?
> 
> SYS functional description is as follows.
> 
> The SYS controls the overall configuration of the chip, such as

Exactly, it controls, so it is a controller... Anyway, do not introduce
your own names, but use something generic. There is no single reference
of "system-configuration".

> 
> ● Bank address settings for DMAC
> ● Bank address settings of the units for ICB> ● ETHER AxCACHE[1] (C bit) control function
> ● RAMA initialization control
> ● MD[7:0] pin monitoring
> ● LSI version register
> ● General-purpose 32-bit readable/writable registers
> ● Observability counting stop control for ICB
> ● WDT counter stop control
> ● Reading of the temperature sensor reference value
> 


Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 24+ messages in thread

* RE: [PATCH v2 1/3] dt-bindings: arm: renesas: Document Renesas RZ/V2M System Configuration
  2022-11-14 16:51                 ` Krzysztof Kozlowski
@ 2022-11-14 17:05                   ` Biju Das
  2022-11-14 19:12                     ` Geert Uytterhoeven
  0 siblings, 1 reply; 24+ messages in thread
From: Biju Das @ 2022-11-14 17:05 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Rob Herring, Krzysztof Kozlowski,
	Geert Uytterhoeven
  Cc: Phil Edworthy, Magnus Damm, linux-renesas-soc, devicetree,
	Chris Paterson, Fabrizio Castro



> -----Original Message-----
> From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Sent: 14 November 2022 16:51
> To: Biju Das <biju.das.jz@bp.renesas.com>; Rob Herring <robh+dt@kernel.org>;
> Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>; Geert Uytterhoeven
> <geert+renesas@glider.be>
> Cc: Phil Edworthy <phil.edworthy@renesas.com>; Magnus Damm
> <magnus.damm@gmail.com>; linux-renesas-soc@vger.kernel.org;
> devicetree@vger.kernel.org; Chris Paterson <Chris.Paterson2@renesas.com>;
> Fabrizio Castro <fabrizio.castro.jz@renesas.com>
> Subject: Re: [PATCH v2 1/3] dt-bindings: arm: renesas: Document Renesas
> RZ/V2M System Configuration
> 
> On 14/11/2022 17:44, Biju Das wrote:
> >>>>> If the hardware manual said this is called "foo-whatever-name" or
> >>>>> "rz85736dfnx2", you would use it as well?
> >>>>>
> >>>>> Node names should be generic.
> >>>
> >>> I got the following feedback from LSI team.
> >>>
> >>> *The reason why we use "configuration" and not "controller" is the
> >>> possibility that users might take it to mean "control" of system
> >>> operation (product operation). This unit determines how the whole
> >>> LSI
> >> configure to operate LSI, so we use "configuration" for this IP name.
> >>>
> >>> As per this it is not a controller. It is a Configuration IP.
> >>>
> >>> What should be generic node name for system configuration IP?
> >>
> >> Then it's closer to chipid and should be in hwinfo?
> >
> > You mean, sys: hwinfo@a3f03000 instead of sys: system-
> configuration@a3f03000 ??
> 
> Rather be put in hwinfo directory. Typical name is "chipid", but I don't know
> if your device is a chipid.

This IP is for sure not a chipid. We can detect SoC version. That is one of the functions provided
by this IP.

> 
> >
> > Also the same IP block is present on rz/v2ma as well?
> >
> > Shall I use the same file renesas,rzv2m-sys.yaml for both r9a09g011-sys and
> r9a09g055-sys?
> >
> >>
> >> Anyway, you wrote in bindings description: "performs system control",
> >> so what can I say?
> >
> > SYS functional description is as follows.
> >
> > The SYS controls the overall configuration of the chip, such as
> 
> Exactly, it controls, so it is a controller... Anyway, do not introduce your
> own names, but use something generic. There is no single reference of
> "system-configuration".

The main functionality of the chip is Bank address configuration,

Bank Address Switching

The SYS has a bank switching register to extend the two higher-order bits of the addresses of the following IP modules
which have only 32-bit (4-GB) address spaces. It makes 4 or more Gbytes of the address space accessible by switching
the bank address.

Target unit 1: DRP-AI, eMMC, SDI0/1, ETHER, PCIe, USB, GRP, VCD
Target unit 2: DMAC

The other control functionalities mentioned in the IP are simple one.

As you said, It is unique IP. Probably in future some other SoC manufactures may come with similar IP for system configuration
like Bank switching. With Bank switching we can switch from 32 bit ->34 bit addresses.

Cheers,
Biju


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2 1/3] dt-bindings: arm: renesas: Document Renesas RZ/V2M System Configuration
  2022-11-14 17:05                   ` Biju Das
@ 2022-11-14 19:12                     ` Geert Uytterhoeven
  2022-11-14 19:21                       ` Biju Das
  0 siblings, 1 reply; 24+ messages in thread
From: Geert Uytterhoeven @ 2022-11-14 19:12 UTC (permalink / raw)
  To: Biju Das
  Cc: Krzysztof Kozlowski, Rob Herring, Krzysztof Kozlowski,
	Geert Uytterhoeven, Phil Edworthy, Magnus Damm,
	linux-renesas-soc, devicetree, Chris Paterson, Fabrizio Castro

Hi Biju,

On Mon, Nov 14, 2022 at 6:05 PM Biju Das <biju.das.jz@bp.renesas.com> wrote:
> > From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> > On 14/11/2022 17:44, Biju Das wrote:
> > >>>>> If the hardware manual said this is called "foo-whatever-name" or
> > >>>>> "rz85736dfnx2", you would use it as well?
> > >>>>>
> > >>>>> Node names should be generic.
> > >>>
> > >>> I got the following feedback from LSI team.
> > >>>
> > >>> *The reason why we use "configuration" and not "controller" is the
> > >>> possibility that users might take it to mean "control" of system
> > >>> operation (product operation). This unit determines how the whole
> > >>> LSI
> > >> configure to operate LSI, so we use "configuration" for this IP name.
> > >>>
> > >>> As per this it is not a controller. It is a Configuration IP.
> > >>>
> > >>> What should be generic node name for system configuration IP?
> > >>
> > >> Then it's closer to chipid and should be in hwinfo?
> > >
> > > You mean, sys: hwinfo@a3f03000 instead of sys: system-
> > configuration@a3f03000 ??
> >
> > Rather be put in hwinfo directory. Typical name is "chipid", but I don't know
> > if your device is a chipid.
>
> This IP is for sure not a chipid. We can detect SoC version. That is one of the functions provided
> by this IP.
>
> > > Also the same IP block is present on rz/v2ma as well?
> > >
> > > Shall I use the same file renesas,rzv2m-sys.yaml for both r9a09g011-sys and
> > r9a09g055-sys?

Are they sufficiently similar? E.g. we have renesas,rst.yaml for
the various R-Car reset controllers, which have different register
layouts.

If the SoC version register is located at the same offset, it might be
worthwhile to add a family-specific compatible value, too, so the
soc_device driver doesn't have to contain a big list to match against.

> > >> Anyway, you wrote in bindings description: "performs system control",
> > >> so what can I say?
> > >
> > > SYS functional description is as follows.
> > >
> > > The SYS controls the overall configuration of the chip, such as
> >
> > Exactly, it controls, so it is a controller... Anyway, do not introduce your
> > own names, but use something generic. There is no single reference of
> > "system-configuration".
>
> The main functionality of the chip is Bank address configuration,
>
> Bank Address Switching
>
> The SYS has a bank switching register to extend the two higher-order bits of the addresses of the following IP modules
> which have only 32-bit (4-GB) address spaces. It makes 4 or more Gbytes of the address space accessible by switching
> the bank address.
>
> Target unit 1: DRP-AI, eMMC, SDI0/1, ETHER, PCIe, USB, GRP, VCD
> Target unit 2: DMAC
>
> The other control functionalities mentioned in the IP are simple one.
>
> As you said, It is unique IP. Probably in future some other SoC manufactures may come with similar IP for system configuration
> like Bank switching. With Bank switching we can switch from 32 bit ->34 bit addresses.

Sounds like a system-controller to me ;-)
So that looks like the most appropriate generic name.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 24+ messages in thread

* RE: [PATCH v2 1/3] dt-bindings: arm: renesas: Document Renesas RZ/V2M System Configuration
  2022-11-14 19:12                     ` Geert Uytterhoeven
@ 2022-11-14 19:21                       ` Biju Das
  2022-11-15  8:08                         ` Geert Uytterhoeven
  0 siblings, 1 reply; 24+ messages in thread
From: Biju Das @ 2022-11-14 19:21 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Krzysztof Kozlowski, Rob Herring, Krzysztof Kozlowski,
	Geert Uytterhoeven, Phil Edworthy, Magnus Damm,
	linux-renesas-soc, devicetree, Chris Paterson, Fabrizio Castro

Hi Geert,

Thanks for the feedback.

> Subject: Re: [PATCH v2 1/3] dt-bindings: arm: renesas: Document Renesas
> RZ/V2M System Configuration
> 
> Hi Biju,
> 
> On Mon, Nov 14, 2022 at 6:05 PM Biju Das <biju.das.jz@bp.renesas.com> wrote:
> > > From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> On
> > > 14/11/2022 17:44, Biju Das wrote:
> > > >>>>> If the hardware manual said this is called "foo-whatever-name"
> > > >>>>> or "rz85736dfnx2", you would use it as well?
> > > >>>>>
> > > >>>>> Node names should be generic.
> > > >>>
> > > >>> I got the following feedback from LSI team.
> > > >>>
> > > >>> *The reason why we use "configuration" and not "controller" is
> > > >>> the possibility that users might take it to mean "control" of
> > > >>> system operation (product operation). This unit determines how
> > > >>> the whole LSI
> > > >> configure to operate LSI, so we use "configuration" for this IP name.
> > > >>>
> > > >>> As per this it is not a controller. It is a Configuration IP.
> > > >>>
> > > >>> What should be generic node name for system configuration IP?
> > > >>
> > > >> Then it's closer to chipid and should be in hwinfo?
> > > >
> > > > You mean, sys: hwinfo@a3f03000 instead of sys: system-
> > > configuration@a3f03000 ??
> > >
> > > Rather be put in hwinfo directory. Typical name is "chipid", but I
> > > don't know if your device is a chipid.
> >
> > This IP is for sure not a chipid. We can detect SoC version. That is
> > one of the functions provided by this IP.
> >
> > > > Also the same IP block is present on rz/v2ma as well?
> > > >
> > > > Shall I use the same file renesas,rzv2m-sys.yaml for both
> > > > r9a09g011-sys and
> > > r9a09g055-sys?
> 
> Are they sufficiently similar? E.g. we have renesas,rst.yaml for the various
> R-Car reset controllers, which have different register layouts.

I have been told both RZ/V2M and RZ/V2MA are exactly same, but later does not have ISP module.

> 
> If the SoC version register is located at the same offset, it might be
> worthwhile to add a family-specific compatible value, too, so the soc_device
> driver doesn't have to contain a big list to match against.

The SoC version registers are located at the same offset.
But there is no way to distinguish both the SoCs.

> 
> > > >> Anyway, you wrote in bindings description: "performs system
> > > >> control", so what can I say?
> > > >
> > > > SYS functional description is as follows.
> > > >
> > > > The SYS controls the overall configuration of the chip, such as
> > >
> > > Exactly, it controls, so it is a controller... Anyway, do not
> > > introduce your own names, but use something generic. There is no
> > > single reference of "system-configuration".
> >
> > The main functionality of the chip is Bank address configuration,
> >
> > Bank Address Switching
> >
> > The SYS has a bank switching register to extend the two higher-order
> > bits of the addresses of the following IP modules which have only
> > 32-bit (4-GB) address spaces. It makes 4 or more Gbytes of the address
> space accessible by switching the bank address.
> >
> > Target unit 1: DRP-AI, eMMC, SDI0/1, ETHER, PCIe, USB, GRP, VCD Target
> > unit 2: DMAC
> >
> > The other control functionalities mentioned in the IP are simple one.
> >
> > As you said, It is unique IP. Probably in future some other SoC
> > manufactures may come with similar IP for system configuration like Bank
> switching. With Bank switching we can switch from 32 bit ->34 bit addresses.
> 
> Sounds like a system-controller to me ;-) So that looks like the most
> appropriate generic name.

OK, will use node name as 'system-controller@a3f03000' and
Label name as "sys" to match with HW manual.

Cheers,
Biju

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2 1/3] dt-bindings: arm: renesas: Document Renesas RZ/V2M System Configuration
  2022-11-14 19:21                       ` Biju Das
@ 2022-11-15  8:08                         ` Geert Uytterhoeven
  2022-11-15 11:19                           ` Biju Das
  2022-11-16  8:14                           ` Biju Das
  0 siblings, 2 replies; 24+ messages in thread
From: Geert Uytterhoeven @ 2022-11-15  8:08 UTC (permalink / raw)
  To: Biju Das
  Cc: Krzysztof Kozlowski, Rob Herring, Krzysztof Kozlowski,
	Geert Uytterhoeven, Phil Edworthy, Magnus Damm,
	linux-renesas-soc, devicetree, Chris Paterson, Fabrizio Castro

Hi Biju,

On Mon, Nov 14, 2022 at 8:22 PM Biju Das <biju.das.jz@bp.renesas.com> wrote:
> > Subject: Re: [PATCH v2 1/3] dt-bindings: arm: renesas: Document Renesas
> > RZ/V2M System Configuration
> > On Mon, Nov 14, 2022 at 6:05 PM Biju Das <biju.das.jz@bp.renesas.com> wrote:
> > > > From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> On
> > > > 14/11/2022 17:44, Biju Das wrote:
> > > > >>>>> If the hardware manual said this is called "foo-whatever-name"
> > > > >>>>> or "rz85736dfnx2", you would use it as well?
> > > > >>>>>
> > > > >>>>> Node names should be generic.
> > > > >>>
> > > > >>> I got the following feedback from LSI team.
> > > > >>>
> > > > >>> *The reason why we use "configuration" and not "controller" is
> > > > >>> the possibility that users might take it to mean "control" of
> > > > >>> system operation (product operation). This unit determines how
> > > > >>> the whole LSI
> > > > >> configure to operate LSI, so we use "configuration" for this IP name.
> > > > >>>
> > > > >>> As per this it is not a controller. It is a Configuration IP.
> > > > >>>
> > > > >>> What should be generic node name for system configuration IP?
> > > > >>
> > > > >> Then it's closer to chipid and should be in hwinfo?
> > > > >
> > > > > You mean, sys: hwinfo@a3f03000 instead of sys: system-
> > > > configuration@a3f03000 ??
> > > >
> > > > Rather be put in hwinfo directory. Typical name is "chipid", but I
> > > > don't know if your device is a chipid.
> > >
> > > This IP is for sure not a chipid. We can detect SoC version. That is
> > > one of the functions provided by this IP.
> > >
> > > > > Also the same IP block is present on rz/v2ma as well?
> > > > >
> > > > > Shall I use the same file renesas,rzv2m-sys.yaml for both
> > > > > r9a09g011-sys and
> > > > r9a09g055-sys?
> >
> > Are they sufficiently similar? E.g. we have renesas,rst.yaml for the various
> > R-Car reset controllers, which have different register layouts.
>
> I have been told both RZ/V2M and RZ/V2MA are exactly same, but later does not have ISP module.

OK...

> > If the SoC version register is located at the same offset, it might be
> > worthwhile to add a family-specific compatible value, too, so the soc_device
> > driver doesn't have to contain a big list to match against.
>
> The SoC version registers are located at the same offset.
> But there is no way to distinguish both the SoCs.

So they really are the same SoC, with the ISP disabled (by fuses?).

Then I guess the most sensible thing to do is to just use

    compatible = "renesas,r9a09g055", "renesas,r9a09g011"

at the top level, and keep all other compatible values unchanged?
Cfr. what we did for R-Car Gen3e (r8a779mX).

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 24+ messages in thread

* RE: [PATCH v2 1/3] dt-bindings: arm: renesas: Document Renesas RZ/V2M System Configuration
  2022-11-15  8:08                         ` Geert Uytterhoeven
@ 2022-11-15 11:19                           ` Biju Das
  2022-11-15 11:24                             ` Geert Uytterhoeven
  2022-11-16  8:14                           ` Biju Das
  1 sibling, 1 reply; 24+ messages in thread
From: Biju Das @ 2022-11-15 11:19 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Krzysztof Kozlowski, Rob Herring, Krzysztof Kozlowski,
	Geert Uytterhoeven, Phil Edworthy, Magnus Damm,
	linux-renesas-soc, devicetree, Chris Paterson, Fabrizio Castro

Hi Geert,

> Subject: Re: [PATCH v2 1/3] dt-bindings: arm: renesas: Document
> Renesas RZ/V2M System Configuration
> 
> Hi Biju,
> 
> On Mon, Nov 14, 2022 at 8:22 PM Biju Das <biju.das.jz@bp.renesas.com>
> wrote:
> > > Subject: Re: [PATCH v2 1/3] dt-bindings: arm: renesas: Document
> > > Renesas RZ/V2M System Configuration On Mon, Nov 14, 2022 at 6:05
> PM
> > > Biju Das <biju.das.jz@bp.renesas.com> wrote:
> > > > > From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> On
> > > > > 14/11/2022 17:44, Biju Das wrote:
> > > > > >>>>> If the hardware manual said this is called "foo-
> whatever-name"
> > > > > >>>>> or "rz85736dfnx2", you would use it as well?
> > > > > >>>>>
> > > > > >>>>> Node names should be generic.
> > > > > >>>
> > > > > >>> I got the following feedback from LSI team.
> > > > > >>>
> > > > > >>> *The reason why we use "configuration" and not
> "controller"
> > > > > >>> is the possibility that users might take it to mean
> > > > > >>> "control" of system operation (product operation). This
> unit
> > > > > >>> determines how the whole LSI
> > > > > >> configure to operate LSI, so we use "configuration" for
> this IP name.
> > > > > >>>
> > > > > >>> As per this it is not a controller. It is a Configuration
> IP.
> > > > > >>>
> > > > > >>> What should be generic node name for system configuration
> IP?
> > > > > >>
> > > > > >> Then it's closer to chipid and should be in hwinfo?
> > > > > >
> > > > > > You mean, sys: hwinfo@a3f03000 instead of sys: system-
> > > > > configuration@a3f03000 ??
> > > > >
> > > > > Rather be put in hwinfo directory. Typical name is "chipid",
> but
> > > > > I don't know if your device is a chipid.
> > > >
> > > > This IP is for sure not a chipid. We can detect SoC version.
> That
> > > > is one of the functions provided by this IP.
> > > >
> > > > > > Also the same IP block is present on rz/v2ma as well?
> > > > > >
> > > > > > Shall I use the same file renesas,rzv2m-sys.yaml for both
> > > > > > r9a09g011-sys and
> > > > > r9a09g055-sys?
> > >
> > > Are they sufficiently similar? E.g. we have renesas,rst.yaml for
> the
> > > various R-Car reset controllers, which have different register
> layouts.
> >
> > I have been told both RZ/V2M and RZ/V2MA are exactly same, but later
> does not have ISP module.
> 
> OK...
> 
> > > If the SoC version register is located at the same offset, it
> might
> > > be worthwhile to add a family-specific compatible value, too, so
> the
> > > soc_device driver doesn't have to contain a big list to match
> against.
> >
> > The SoC version registers are located at the same offset.
> > But there is no way to distinguish both the SoCs.
> 
> So they really are the same SoC, with the ISP disabled (by fuses?).
> 
> Then I guess the most sensible thing to do is to just use
> 
>     compatible = "renesas,r9a09g055", "renesas,r9a09g011"
> 
> at the top level, and keep all other compatible values unchanged?
> Cfr. what we did for R-Car Gen3e (r8a779mX).

OK, Thanks for the pointers.

Will send V3 with file name as renesas,rzv2m-sys.yaml as Krzysztof mentioned,
We can have generic file name,if the file contains multiple compatibles(Currently we have 
r9a09g011-sys and r9a09g055-sys).

Cheers,
Biju

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2 1/3] dt-bindings: arm: renesas: Document Renesas RZ/V2M System Configuration
  2022-11-15 11:19                           ` Biju Das
@ 2022-11-15 11:24                             ` Geert Uytterhoeven
  2022-11-15 11:27                               ` Biju Das
  0 siblings, 1 reply; 24+ messages in thread
From: Geert Uytterhoeven @ 2022-11-15 11:24 UTC (permalink / raw)
  To: Biju Das
  Cc: Krzysztof Kozlowski, Rob Herring, Krzysztof Kozlowski,
	Geert Uytterhoeven, Phil Edworthy, Magnus Damm,
	linux-renesas-soc, devicetree, Chris Paterson, Fabrizio Castro

Hi Biju,

On Tue, Nov 15, 2022 at 12:19 PM Biju Das <biju.das.jz@bp.renesas.com> wrote:
> > Subject: Re: [PATCH v2 1/3] dt-bindings: arm: renesas: Document
> > Renesas RZ/V2M System Configuration
> > On Mon, Nov 14, 2022 at 8:22 PM Biju Das <biju.das.jz@bp.renesas.com>
> > wrote:
> > > > Subject: Re: [PATCH v2 1/3] dt-bindings: arm: renesas: Document
> > > > Renesas RZ/V2M System Configuration On Mon, Nov 14, 2022 at 6:05
> > PM
> > > > Biju Das <biju.das.jz@bp.renesas.com> wrote:
> > > > > > From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> On
> > > > > > 14/11/2022 17:44, Biju Das wrote:
> > > > > > >>>>> If the hardware manual said this is called "foo-
> > whatever-name"
> > > > > > >>>>> or "rz85736dfnx2", you would use it as well?
> > > > > > >>>>>
> > > > > > >>>>> Node names should be generic.
> > > > > > >>>
> > > > > > >>> I got the following feedback from LSI team.
> > > > > > >>>
> > > > > > >>> *The reason why we use "configuration" and not
> > "controller"
> > > > > > >>> is the possibility that users might take it to mean
> > > > > > >>> "control" of system operation (product operation). This
> > unit
> > > > > > >>> determines how the whole LSI
> > > > > > >> configure to operate LSI, so we use "configuration" for
> > this IP name.
> > > > > > >>>
> > > > > > >>> As per this it is not a controller. It is a Configuration
> > IP.
> > > > > > >>>
> > > > > > >>> What should be generic node name for system configuration
> > IP?
> > > > > > >>
> > > > > > >> Then it's closer to chipid and should be in hwinfo?
> > > > > > >
> > > > > > > You mean, sys: hwinfo@a3f03000 instead of sys: system-
> > > > > > configuration@a3f03000 ??
> > > > > >
> > > > > > Rather be put in hwinfo directory. Typical name is "chipid",
> > but
> > > > > > I don't know if your device is a chipid.
> > > > >
> > > > > This IP is for sure not a chipid. We can detect SoC version.
> > That
> > > > > is one of the functions provided by this IP.
> > > > >
> > > > > > > Also the same IP block is present on rz/v2ma as well?
> > > > > > >
> > > > > > > Shall I use the same file renesas,rzv2m-sys.yaml for both
> > > > > > > r9a09g011-sys and
> > > > > > r9a09g055-sys?
> > > >
> > > > Are they sufficiently similar? E.g. we have renesas,rst.yaml for
> > the
> > > > various R-Car reset controllers, which have different register
> > layouts.
> > >
> > > I have been told both RZ/V2M and RZ/V2MA are exactly same, but later
> > does not have ISP module.
> >
> > OK...
> >
> > > > If the SoC version register is located at the same offset, it
> > might
> > > > be worthwhile to add a family-specific compatible value, too, so
> > the
> > > > soc_device driver doesn't have to contain a big list to match
> > against.
> > >
> > > The SoC version registers are located at the same offset.
> > > But there is no way to distinguish both the SoCs.
> >
> > So they really are the same SoC, with the ISP disabled (by fuses?).
> >
> > Then I guess the most sensible thing to do is to just use
> >
> >     compatible = "renesas,r9a09g055", "renesas,r9a09g011"
> >
> > at the top level, and keep all other compatible values unchanged?
> > Cfr. what we did for R-Car Gen3e (r8a779mX).
>
> OK, Thanks for the pointers.
>
> Will send V3 with file name as renesas,rzv2m-sys.yaml as Krzysztof mentioned,
> We can have generic file name,if the file contains multiple compatibles(Currently we have
> r9a09g011-sys and r9a09g055-sys).

Do we need different compatible values r9a09g011-sys and r9a09g055-sys?

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 24+ messages in thread

* RE: [PATCH v2 1/3] dt-bindings: arm: renesas: Document Renesas RZ/V2M System Configuration
  2022-11-15 11:24                             ` Geert Uytterhoeven
@ 2022-11-15 11:27                               ` Biju Das
  0 siblings, 0 replies; 24+ messages in thread
From: Biju Das @ 2022-11-15 11:27 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Krzysztof Kozlowski, Rob Herring, Krzysztof Kozlowski,
	Geert Uytterhoeven, Phil Edworthy, Magnus Damm,
	linux-renesas-soc, devicetree, Chris Paterson, Fabrizio Castro



> -----Original Message-----
> From: Geert Uytterhoeven <geert@linux-m68k.org>
> Sent: 15 November 2022 11:24
> To: Biju Das <biju.das.jz@bp.renesas.com>
> Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>; Rob Herring
> <robh+dt@kernel.org>; Krzysztof Kozlowski
> <krzysztof.kozlowski+dt@linaro.org>; Geert Uytterhoeven
> <geert+renesas@glider.be>; Phil Edworthy <phil.edworthy@renesas.com>;
> Magnus Damm <magnus.damm@gmail.com>; linux-renesas-
> soc@vger.kernel.org; devicetree@vger.kernel.org; Chris Paterson
> <Chris.Paterson2@renesas.com>; Fabrizio Castro
> <fabrizio.castro.jz@renesas.com>
> Subject: Re: [PATCH v2 1/3] dt-bindings: arm: renesas: Document
> Renesas RZ/V2M System Configuration
> 
> Hi Biju,
> 
> On Tue, Nov 15, 2022 at 12:19 PM Biju Das <biju.das.jz@bp.renesas.com>
> wrote:
> > > Subject: Re: [PATCH v2 1/3] dt-bindings: arm: renesas: Document
> > > Renesas RZ/V2M System Configuration On Mon, Nov 14, 2022 at 8:22
> PM
> > > Biju Das <biju.das.jz@bp.renesas.com>
> > > wrote:
> > > > > Subject: Re: [PATCH v2 1/3] dt-bindings: arm: renesas:
> Document
> > > > > Renesas RZ/V2M System Configuration On Mon, Nov 14, 2022 at
> 6:05
> > > PM
> > > > > Biju Das <biju.das.jz@bp.renesas.com> wrote:
> > > > > > > From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> > > > > > > On
> > > > > > > 14/11/2022 17:44, Biju Das wrote:
> > > > > > > >>>>> If the hardware manual said this is called "foo-
> > > whatever-name"
> > > > > > > >>>>> or "rz85736dfnx2", you would use it as well?
> > > > > > > >>>>>
> > > > > > > >>>>> Node names should be generic.
> > > > > > > >>>
> > > > > > > >>> I got the following feedback from LSI team.
> > > > > > > >>>
> > > > > > > >>> *The reason why we use "configuration" and not
> > > "controller"
> > > > > > > >>> is the possibility that users might take it to mean
> > > > > > > >>> "control" of system operation (product operation).
> This
> > > unit
> > > > > > > >>> determines how the whole LSI
> > > > > > > >> configure to operate LSI, so we use "configuration" for
> > > this IP name.
> > > > > > > >>>
> > > > > > > >>> As per this it is not a controller. It is a
> > > > > > > >>> Configuration
> > > IP.
> > > > > > > >>>
> > > > > > > >>> What should be generic node name for system
> > > > > > > >>> configuration
> > > IP?
> > > > > > > >>
> > > > > > > >> Then it's closer to chipid and should be in hwinfo?
> > > > > > > >
> > > > > > > > You mean, sys: hwinfo@a3f03000 instead of sys: system-
> > > > > > > configuration@a3f03000 ??
> > > > > > >
> > > > > > > Rather be put in hwinfo directory. Typical name is
> "chipid",
> > > but
> > > > > > > I don't know if your device is a chipid.
> > > > > >
> > > > > > This IP is for sure not a chipid. We can detect SoC version.
> > > That
> > > > > > is one of the functions provided by this IP.
> > > > > >
> > > > > > > > Also the same IP block is present on rz/v2ma as well?
> > > > > > > >
> > > > > > > > Shall I use the same file renesas,rzv2m-sys.yaml for
> both
> > > > > > > > r9a09g011-sys and
> > > > > > > r9a09g055-sys?
> > > > >
> > > > > Are they sufficiently similar? E.g. we have renesas,rst.yaml
> for
> > > the
> > > > > various R-Car reset controllers, which have different register
> > > layouts.
> > > >
> > > > I have been told both RZ/V2M and RZ/V2MA are exactly same, but
> > > > later
> > > does not have ISP module.
> > >
> > > OK...
> > >
> > > > > If the SoC version register is located at the same offset, it
> > > might
> > > > > be worthwhile to add a family-specific compatible value, too,
> so
> > > the
> > > > > soc_device driver doesn't have to contain a big list to match
> > > against.
> > > >
> > > > The SoC version registers are located at the same offset.
> > > > But there is no way to distinguish both the SoCs.
> > >
> > > So they really are the same SoC, with the ISP disabled (by
> fuses?).
> > >
> > > Then I guess the most sensible thing to do is to just use
> > >
> > >     compatible = "renesas,r9a09g055", "renesas,r9a09g011"
> > >
> > > at the top level, and keep all other compatible values unchanged?
> > > Cfr. what we did for R-Car Gen3e (r8a779mX).
> >
> > OK, Thanks for the pointers.
> >
> > Will send V3 with file name as renesas,rzv2m-sys.yaml as Krzysztof
> > mentioned, We can have generic file name,if the file contains
> multiple
> > compatibles(Currently we have r9a09g011-sys and r9a09g055-sys).
> 
> Do we need different compatible values r9a09g011-sys and r9a09g055-
> sys?

Oops. I Just realized it is not needed based on (r8a779mX).

I will rename the filename as renesas,r9a09g011-sys.yaml and send V3.

Cheers,
Biju

^ permalink raw reply	[flat|nested] 24+ messages in thread

* RE: [PATCH v2 1/3] dt-bindings: arm: renesas: Document Renesas RZ/V2M System Configuration
  2022-11-15  8:08                         ` Geert Uytterhoeven
  2022-11-15 11:19                           ` Biju Das
@ 2022-11-16  8:14                           ` Biju Das
  2022-11-16  8:20                             ` Geert Uytterhoeven
  1 sibling, 1 reply; 24+ messages in thread
From: Biju Das @ 2022-11-16  8:14 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Krzysztof Kozlowski, Rob Herring, Krzysztof Kozlowski,
	Geert Uytterhoeven, Phil Edworthy, Magnus Damm,
	linux-renesas-soc, devicetree, Chris Paterson, Fabrizio Castro

Hi Geert,

> Subject: Re: [PATCH v2 1/3] dt-bindings: arm: renesas: Document Renesas
> RZ/V2M System Configuration
> 
> Hi Biju,
> 
> On Mon, Nov 14, 2022 at 8:22 PM Biju Das <biju.das.jz@bp.renesas.com>
> wrote:
> > > Subject: Re: [PATCH v2 1/3] dt-bindings: arm: renesas: Document
> > > Renesas RZ/V2M System Configuration On Mon, Nov 14, 2022 at 6:05 PM
> > > Biju Das <biju.das.jz@bp.renesas.com> wrote:
> > > > > From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> On
> > > > > 14/11/2022 17:44, Biju Das wrote:
> > > > > >>>>> If the hardware manual said this is called "foo-whatever-
> name"
> > > > > >>>>> or "rz85736dfnx2", you would use it as well?
> > > > > >>>>>
> > > > > >>>>> Node names should be generic.
> > > > > >>>
> > > > > >>> I got the following feedback from LSI team.
> > > > > >>>
> > > > > >>> *The reason why we use "configuration" and not "controller"
> > > > > >>> is the possibility that users might take it to mean
> > > > > >>> "control" of system operation (product operation). This unit
> > > > > >>> determines how the whole LSI
> > > > > >> configure to operate LSI, so we use "configuration" for this
> IP name.
> > > > > >>>
> > > > > >>> As per this it is not a controller. It is a Configuration
> IP.
> > > > > >>>
> > > > > >>> What should be generic node name for system configuration
> IP?
> > > > > >>
> > > > > >> Then it's closer to chipid and should be in hwinfo?
> > > > > >
> > > > > > You mean, sys: hwinfo@a3f03000 instead of sys: system-
> > > > > configuration@a3f03000 ??
> > > > >
> > > > > Rather be put in hwinfo directory. Typical name is "chipid", but
> > > > > I don't know if your device is a chipid.
> > > >
> > > > This IP is for sure not a chipid. We can detect SoC version. That
> > > > is one of the functions provided by this IP.
> > > >
> > > > > > Also the same IP block is present on rz/v2ma as well?
> > > > > >
> > > > > > Shall I use the same file renesas,rzv2m-sys.yaml for both
> > > > > > r9a09g011-sys and
> > > > > r9a09g055-sys?
> > >
> > > Are they sufficiently similar? E.g. we have renesas,rst.yaml for the
> > > various R-Car reset controllers, which have different register
> layouts.
> >
> > I have been told both RZ/V2M and RZ/V2MA are exactly same, but later
> does not have ISP module.
> 
> OK...
> 
> > > If the SoC version register is located at the same offset, it might
> > > be worthwhile to add a family-specific compatible value, too, so the
> > > soc_device driver doesn't have to contain a big list to match
> against.
> >
> > The SoC version registers are located at the same offset.
> > But there is no way to distinguish both the SoCs.
> 
> So they really are the same SoC, with the ISP disabled (by fuses?).
> 
> Then I guess the most sensible thing to do is to just use
> 
>     compatible = "renesas,r9a09g055", "renesas,r9a09g011"
> 
> at the top level, and keep all other compatible values unchanged?
> Cfr. what we did for R-Car Gen3e (r8a779mX).


I started looking into PWM driver for V2M. For Linux we can use 7 channels
Out of 16 as other 9 channels are reserved for ISP.  Where as V2MA we can use all the 16 channels.

So for clk, we need to use separate compatible, as we don't want to register clocks
assigned for ISP to Linux.

That is ok right??

Cheers,
Biju

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2 1/3] dt-bindings: arm: renesas: Document Renesas RZ/V2M System Configuration
  2022-11-16  8:14                           ` Biju Das
@ 2022-11-16  8:20                             ` Geert Uytterhoeven
  0 siblings, 0 replies; 24+ messages in thread
From: Geert Uytterhoeven @ 2022-11-16  8:20 UTC (permalink / raw)
  To: Biju Das
  Cc: Krzysztof Kozlowski, Rob Herring, Krzysztof Kozlowski,
	Geert Uytterhoeven, Phil Edworthy, Magnus Damm,
	linux-renesas-soc, devicetree, Chris Paterson, Fabrizio Castro

Hi Biju,

On Wed, Nov 16, 2022 at 9:14 AM Biju Das <biju.das.jz@bp.renesas.com> wrote:
> > Subject: Re: [PATCH v2 1/3] dt-bindings: arm: renesas: Document Renesas
> > RZ/V2M System Configuration
> > On Mon, Nov 14, 2022 at 8:22 PM Biju Das <biju.das.jz@bp.renesas.com>
> > wrote:
> > > > Subject: Re: [PATCH v2 1/3] dt-bindings: arm: renesas: Document
> > > > Renesas RZ/V2M System Configuration On Mon, Nov 14, 2022 at 6:05 PM
> > > > Biju Das <biju.das.jz@bp.renesas.com> wrote:
> > > > > > From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> On
> > > > > > 14/11/2022 17:44, Biju Das wrote:
> > > > > > >>>>> If the hardware manual said this is called "foo-whatever-
> > name"
> > > > > > >>>>> or "rz85736dfnx2", you would use it as well?
> > > > > > >>>>>
> > > > > > >>>>> Node names should be generic.
> > > > > > >>>
> > > > > > >>> I got the following feedback from LSI team.
> > > > > > >>>
> > > > > > >>> *The reason why we use "configuration" and not "controller"
> > > > > > >>> is the possibility that users might take it to mean
> > > > > > >>> "control" of system operation (product operation). This unit
> > > > > > >>> determines how the whole LSI
> > > > > > >> configure to operate LSI, so we use "configuration" for this
> > IP name.
> > > > > > >>>
> > > > > > >>> As per this it is not a controller. It is a Configuration
> > IP.
> > > > > > >>>
> > > > > > >>> What should be generic node name for system configuration
> > IP?
> > > > > > >>
> > > > > > >> Then it's closer to chipid and should be in hwinfo?
> > > > > > >
> > > > > > > You mean, sys: hwinfo@a3f03000 instead of sys: system-
> > > > > > configuration@a3f03000 ??
> > > > > >
> > > > > > Rather be put in hwinfo directory. Typical name is "chipid", but
> > > > > > I don't know if your device is a chipid.
> > > > >
> > > > > This IP is for sure not a chipid. We can detect SoC version. That
> > > > > is one of the functions provided by this IP.
> > > > >
> > > > > > > Also the same IP block is present on rz/v2ma as well?
> > > > > > >
> > > > > > > Shall I use the same file renesas,rzv2m-sys.yaml for both
> > > > > > > r9a09g011-sys and
> > > > > > r9a09g055-sys?
> > > >
> > > > Are they sufficiently similar? E.g. we have renesas,rst.yaml for the
> > > > various R-Car reset controllers, which have different register
> > layouts.
> > >
> > > I have been told both RZ/V2M and RZ/V2MA are exactly same, but later
> > does not have ISP module.
> >
> > OK...
> >
> > > > If the SoC version register is located at the same offset, it might
> > > > be worthwhile to add a family-specific compatible value, too, so the
> > > > soc_device driver doesn't have to contain a big list to match
> > against.
> > >
> > > The SoC version registers are located at the same offset.
> > > But there is no way to distinguish both the SoCs.
> >
> > So they really are the same SoC, with the ISP disabled (by fuses?).
> >
> > Then I guess the most sensible thing to do is to just use
> >
> >     compatible = "renesas,r9a09g055", "renesas,r9a09g011"
> >
> > at the top level, and keep all other compatible values unchanged?
> > Cfr. what we did for R-Car Gen3e (r8a779mX).
>
> I started looking into PWM driver for V2M. For Linux we can use 7 channels
> Out of 16 as other 9 channels are reserved for ISP.  Where as V2MA we can use all the 16 channels.
>
> So for clk, we need to use separate compatible, as we don't want to register clocks
> assigned for ISP to Linux.
>
> That is ok right??

Yes, that's fine.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2022-11-16  8:20 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-10 16:21 [PATCH v2 0/3] Add SoC identification support for RZ/V2M Biju Das
2022-11-10 16:21 ` [PATCH v2 1/3] dt-bindings: arm: renesas: Document Renesas RZ/V2M System Configuration Biju Das
2022-11-11  8:34   ` Krzysztof Kozlowski
2022-11-11  9:06     ` Biju Das
2022-11-11 10:51       ` Krzysztof Kozlowski
2022-11-11 11:16         ` Biju Das
2022-11-14 16:18           ` Biju Das
2022-11-14 16:32             ` Krzysztof Kozlowski
2022-11-14 16:44               ` Biju Das
2022-11-14 16:51                 ` Krzysztof Kozlowski
2022-11-14 17:05                   ` Biju Das
2022-11-14 19:12                     ` Geert Uytterhoeven
2022-11-14 19:21                       ` Biju Das
2022-11-15  8:08                         ` Geert Uytterhoeven
2022-11-15 11:19                           ` Biju Das
2022-11-15 11:24                             ` Geert Uytterhoeven
2022-11-15 11:27                               ` Biju Das
2022-11-16  8:14                           ` Biju Das
2022-11-16  8:20                             ` Geert Uytterhoeven
2022-11-10 16:21 ` [PATCH v2 3/3] arm64: dts: renesas: r9a09g011: Add system configuration node Biju Das
2022-11-11  8:34   ` Krzysztof Kozlowski
2022-11-11  9:10     ` Biju Das
2022-11-11 10:50       ` Krzysztof Kozlowski
2022-11-11 11:25         ` Biju Das

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).