diff mbox series

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

Message ID 20231011090510.114476-2-ychuang570808@gmail.com (mailing list archive)
State New, archived
Headers show
Series Add support for nuvoton ma35d1 pin control | expand

Commit Message

Jacky Huang Oct. 11, 2023, 9:05 a.m. UTC
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(-)

Comments

Krzysztof Kozlowski Oct. 12, 2023, 7:30 p.m. UTC | #1
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
Jacky Huang Oct. 13, 2023, 6:34 a.m. UTC | #2
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
Jacky Huang Oct. 13, 2023, 6:40 a.m. UTC | #3
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
diff mbox series

Patch

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>;
     };