[PATCH v2 1/4] dt-bindings: reset: Add Armada8K reset controller

Wilson Ding dingwei at marvell.com
Sat Feb 22 12:57:13 PST 2025



> -----Original Message-----
> From: Rob Herring <robh at kernel.org>
> Sent: Friday, February 21, 2025 3:41 PM
> To: Krzysztof Kozlowski <krzk at kernel.org>
> Cc: Wilson Ding <dingwei at marvell.com>; linux-kernel at vger.kernel.org;
> devicetree at vger.kernel.org; linux-arm-kernel at lists.infradead.org;
> andrew at lunn.ch; gregory.clement at bootlin.com;
> sebastian.hesselbarth at gmail.com; krzk+dt at kernel.org; conor+dt at kernel.org;
> p.zabel at pengutronix.de; Sanghoon Lee <salee at marvell.com>;
> Geethasowjanya Akula <gakula at marvell.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 at marvell.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 at marvell.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 at marvell.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 at 440000 {
	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 at 100 {
		compatible = "marvell,armada-8k-gpio";
		offset = <0x100>;
		#gpio-cells = <2>;
		...
	};

	CP11X_LABEL(unit_swrst): reset-controller at 268 {
		compatible = "marvell,armada8k-reset";
		offset = <0x268>;
		#reset-cells = <1>;
	};

};

> Rob



More information about the linux-arm-kernel mailing list