[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<BY3PR18MB4673F55565B70458E1F3F9A6A7C62@BY3PR18MB4673.namprd18.prod.outlook.com>
Date: Sat, 22 Feb 2025 20:57:13 +0000
From: Wilson Ding <dingwei@...vell.com>
To: Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk@...nel.org>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"andrew@...n.ch" <andrew@...n.ch>,
"gregory.clement@...tlin.com" <gregory.clement@...tlin.com>,
"sebastian.hesselbarth@...il.com" <sebastian.hesselbarth@...il.com>,
"krzk+dt@...nel.org" <krzk+dt@...nel.org>,
"conor+dt@...nel.org"
<conor+dt@...nel.org>,
"p.zabel@...gutronix.de" <p.zabel@...gutronix.de>,
Sanghoon Lee <salee@...vell.com>,
Geethasowjanya Akula <gakula@...vell.com>
Subject: Re: [PATCH v2 1/4] dt-bindings: reset: Add Armada8K reset controller
> -----Original Message-----
> From: Rob Herring <robh@...nel.org>
> Sent: Friday, February 21, 2025 3:41 PM
> To: Krzysztof Kozlowski <krzk@...nel.org>
> Cc: Wilson Ding <dingwei@...vell.com>; linux-kernel@...r.kernel.org;
> devicetree@...r.kernel.org; linux-arm-kernel@...ts.infradead.org;
> andrew@...n.ch; gregory.clement@...tlin.com;
> sebastian.hesselbarth@...il.com; krzk+dt@...nel.org; conor+dt@...nel.org;
> p.zabel@...gutronix.de; Sanghoon Lee <salee@...vell.com>;
> Geethasowjanya Akula <gakula@...vell.com>
> Subject: [EXTERNAL] Re: [PATCH v2 1/4] dt-bindings: reset: Add Armada8K
> reset controller
>
> On Fri, Feb 21, 2025 at 09: 46: 01AM +0100, Krzysztof Kozlowski wrote: > On
> Thu, Feb 20, 2025 at 03: 25: 24PM -0800, Wilson Ding wrote: > > Add device-
> tree binding documentation for the Armada8K reset driver. > > > > Signed-off-
> by:
> On Fri, Feb 21, 2025 at 09:46:01AM +0100, Krzysztof Kozlowski wrote:
> > On Thu, Feb 20, 2025 at 03:25:24PM -0800, Wilson Ding wrote:
> > > Add device-tree binding documentation for the Armada8K reset driver.
> > >
> > > Signed-off-by: Wilson Ding <dingwei@...vell.com>
> > > ---
> > > .../reset/marvell,armada8k-reset.yaml | 45 +++++++++++++++++++
> > > 1 file changed, 45 insertions(+)
> > > create mode 100644
> > > Documentation/devicetree/bindings/reset/marvell,armada8k-reset.yaml
> > >
> > > diff --git
> > > a/Documentation/devicetree/bindings/reset/marvell,armada8k-reset.yam
> > > l
> > > b/Documentation/devicetree/bindings/reset/marvell,armada8k-reset.yam
> > > l
> > > new file mode 100644
> > > index 000000000000..b9f7f3c24d3c
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/reset/marvell,armada8k-reset
> > > +++ .yaml
> > > @@ -0,0 +1,45 @@
> > > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) # Copyright
> > > +2025 Wilson Ding <dingwei@...vell.com> %YAML 1.2
> > > +---
> > > +$id:
> > > +https://urldefense.proofpoint.com/v2/url?u=http-3A__devicetree.org_
> > > +schemas_reset_marvell-2Carmada8k-2Dreset.yaml-
> 23&d=DwIBAg&c=nKjWec2
> > >
> +b6R0mOyPaz7xtfQ&r=sXDQZu4GyqNVDlFUXakSGJl0Dh81ZIPlU26YS4KHGIA
> &m=Q8Y
> > >
> +WjAVZaKSaPD0B9Hb3Il6KsiVTSpeB9Br9zI5bqQ9MyW0LQnEdiE2kzdfMRQfa
> &s=VRF
> > > +OPAwNVByPfjGNG1IWJt_mAet2LVsQmFVALenV7Ck&e=
> > > +$schema:
> > > +https://urldefense.proofpoint.com/v2/url?u=http-3A__devicetree.org_
> > > +meta-2Dschemas_core.yaml-
> 23&d=DwIBAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=sXD
> > >
> +QZu4GyqNVDlFUXakSGJl0Dh81ZIPlU26YS4KHGIA&m=Q8YWjAVZaKSaPD0B
> 9Hb3Il6K
> > >
> +siVTSpeB9Br9zI5bqQ9MyW0LQnEdiE2kzdfMRQfa&s=3F_XMbPCmCHx0pRO
> vv0KP1cZ
> > > +tvjQBFPSBpdty-yVZjY&e=
> > > +
> > > +title: Marvell Armada8K reset controller
> > > +
> > > +maintainers:
> > > + - Wilson Ding <dingwei@...vell.com>
> > > +
> > > +description: The reset controller node must be a sub-node of the
> > > +system
> > > + controller node on Armada7K/8K or CN913x SoCs.
> > > +
> > > +properties:
> > > + compatible:
> > > + const: marvell,armada8k-reset
> > > +
> > > + offset:
> > > + $ref: /schemas/types.yaml#/definitions/uint32
> > > + description: Offset in the register map for the gpio registers
> > > + (in bytes)
> >
> > That's neither correct nor needed. Your device knows ofsset based on
> > the compatible.
>
> Or use 'reg'.
>
> But really, just add #reset-cells to the parent node. There's no need for a child
> node here. The parent needs a specific compatible though.
>
I am not inventing the 'offset' property. I just tried to follow the other existing
sub-nodes under the same parent node (system-controller). The mvebu-gpio
driver also uses 'offset' instead of 'reg' for the syscon device (see below). But it
seems also not correct from your point of view. Now, I am a bit confused what
should be the right scheme for the Armada's system-controller, including GPIO
and Reset controller. And dt_binding_check complains "system-controller@
440000: compatible: ['syscon', 'simple-mfd'] is too short". Can you point me
any reference for me to fix these issues.
CP110_LABEL(syscon0): system-controller@...000 {
compatible = "syscon", "simple-mfd";
reg = <0x440000 0x1000>;
CP110_LABEL(clk): clock {
compatible = "marvell,cp110-clock";
#clock-cells = <2>;
};
CP110_LABEL(pinctrl): pinctrl {
compatible = "marvell,armada-8k-cpm-pinctrl";
};
CP110_LABEL(gpio1): gpio@100 {
compatible = "marvell,armada-8k-gpio";
offset = <0x100>;
#gpio-cells = <2>;
...
};
CP11X_LABEL(unit_swrst): reset-controller@268 {
compatible = "marvell,armada8k-reset";
offset = <0x268>;
#reset-cells = <1>;
};
};
> Rob
Powered by blists - more mailing lists