[PATCH 1/4] dt-bindings: reset: Add syscon to nuvoton ma35d1 system-management node

Jacky Huang posted 4 patches 2 years, 2 months ago
There is a newer version of this series
[PATCH 1/4] dt-bindings: reset: Add syscon to nuvoton ma35d1 system-management node
Posted by Jacky Huang 2 years, 2 months ago
From: Jacky Huang <ychuang3@nuvoton.com>

Add compatible 'syscon' to the system-management node.

Signed-off-by: Jacky Huang <ychuang3@nuvoton.com>
---
 .../devicetree/bindings/reset/nuvoton,ma35d1-reset.yaml        | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/reset/nuvoton,ma35d1-reset.yaml b/Documentation/devicetree/bindings/reset/nuvoton,ma35d1-reset.yaml
index 34c5c1c08ec1..3ce7dcecd87a 100644
--- a/Documentation/devicetree/bindings/reset/nuvoton,ma35d1-reset.yaml
+++ b/Documentation/devicetree/bindings/reset/nuvoton,ma35d1-reset.yaml
@@ -18,6 +18,7 @@ properties:
   compatible:
     items:
       - const: nuvoton,ma35d1-reset
+      - const: syscon
 
   reg:
     maxItems: 1
@@ -37,7 +38,7 @@ examples:
   - |
 
     system-management@40460000 {
-        compatible = "nuvoton,ma35d1-reset";
+        compatible = "nuvoton,ma35d1-reset", "syscon";
         reg = <0x40460000 0x200>;
         #reset-cells = <1>;
     };
-- 
2.34.1
Re: [PATCH 1/4] dt-bindings: reset: Add syscon to nuvoton ma35d1 system-management node
Posted by Rob Herring 2 years, 2 months ago
On Wed, Oct 11, 2023 at 09:05:07AM +0000, Jacky Huang wrote:
> From: Jacky Huang <ychuang3@nuvoton.com>
> 
> Add compatible 'syscon' to the system-management node.
> 
> Signed-off-by: Jacky Huang <ychuang3@nuvoton.com>
> ---
>  .../devicetree/bindings/reset/nuvoton,ma35d1-reset.yaml        | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/reset/nuvoton,ma35d1-reset.yaml b/Documentation/devicetree/bindings/reset/nuvoton,ma35d1-reset.yaml
> index 34c5c1c08ec1..3ce7dcecd87a 100644
> --- a/Documentation/devicetree/bindings/reset/nuvoton,ma35d1-reset.yaml
> +++ b/Documentation/devicetree/bindings/reset/nuvoton,ma35d1-reset.yaml
> @@ -18,6 +18,7 @@ properties:
>    compatible:
>      items:
>        - const: nuvoton,ma35d1-reset
> +      - const: syscon

Presumably you already have a driver for nuvoton,ma35d1-reset, so just 
make it create a regmap. I assume this is the reason you want to add 
'syscon'?

Rob
Re: [PATCH 1/4] dt-bindings: reset: Add syscon to nuvoton ma35d1 system-management node
Posted by Jacky Huang 2 years, 2 months ago
Dear Rob,

Thank you for the review.

On 2023/10/13 上午 04:39, Rob Herring wrote:
> On Wed, Oct 11, 2023 at 09:05:07AM +0000, Jacky Huang wrote:
>> From: Jacky Huang <ychuang3@nuvoton.com>
>>
>> Add compatible 'syscon' to the system-management node.
>>
>> Signed-off-by: Jacky Huang <ychuang3@nuvoton.com>
>> ---
>>   .../devicetree/bindings/reset/nuvoton,ma35d1-reset.yaml        | 3 ++-
>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/Documentation/devicetree/bindings/reset/nuvoton,ma35d1-reset.yaml b/Documentation/devicetree/bindings/reset/nuvoton,ma35d1-reset.yaml
>> index 34c5c1c08ec1..3ce7dcecd87a 100644
>> --- a/Documentation/devicetree/bindings/reset/nuvoton,ma35d1-reset.yaml
>> +++ b/Documentation/devicetree/bindings/reset/nuvoton,ma35d1-reset.yaml
>> @@ -18,6 +18,7 @@ properties:
>>     compatible:
>>       items:
>>         - const: nuvoton,ma35d1-reset
>> +      - const: syscon
> Presumably you already have a driver for nuvoton,ma35d1-reset, so just
> make it create a regmap. I assume this is the reason you want to add
> 'syscon'?
>
> Rob

Yes, we have a driver for 'nuvoton,ma35d1-reset' with a register space 
mapped to
the system control registers. The other ma35d1 drivers may also require 
access
to the system control registers. I added 'syscon' to this node so that 
other drivers
can utilize 'regmap' via the phandle of this node.

Best Regards,
Jacky Huang



Re: [PATCH 1/4] dt-bindings: reset: Add syscon to nuvoton ma35d1 system-management node
Posted by Krzysztof Kozlowski 2 years, 2 months ago
On 11/10/2023 11:05, Jacky Huang wrote:
> From: Jacky Huang <ychuang3@nuvoton.com>
> 
> Add compatible 'syscon' to the system-management node.

Why? Commit msg should answer to this.

Best regards,
Krzysztof
Re: [PATCH 1/4] dt-bindings: reset: Add syscon to nuvoton ma35d1 system-management node
Posted by Jacky Huang 2 years, 2 months ago
Dear Krzysztof,

Thank you for the review.


On 2023/10/13 上午 03:30, Krzysztof Kozlowski wrote:
> On 11/10/2023 11:05, Jacky Huang wrote:
>> From: Jacky Huang <ychuang3@nuvoton.com>
>>
>> Add compatible 'syscon' to the system-management node.
> Why? Commit msg should answer to this.
>
> Best regards,
> Krzysztof
>

I added 'syscon' because system control registers are mapped by this driver.
The pinctrl driver needs to access the system control registers through 
'regmap'
with a phandle referring to this node.
I will update the commit message to provide a more detailed explanation
of its purpose.

Best Regards,
Jacky Huang