Re: [PATCH v2 1/4] dt-bindings: reset: Add Armada8K reset controller
From: Wilson Ding <hidden>
Date: 2025-02-22 20:57:46
Also in:
linux-devicetree, lkml
-----Original Message----- From: Rob Herring <robh@kernel.org> Sent: Friday, February 21, 2025 3:41 PM To: Krzysztof Kozlowski <krzk@kernel.org> Cc: Wilson Ding <redacted>; linux-kernel@vger.kernel.org; devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org; andrew@lunn.ch; gregory.clement@bootlin.com; sebastian.hesselbarth@gmail.com; krzk+dt@kernel.org; conor+dt@kernel.org; p.zabel@pengutronix.de; Sanghoon Lee [off-list ref]; Geethasowjanya Akula [off-list ref] 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:quoted
On Thu, Feb 20, 2025 at 03:25:24PM -0800, Wilson Ding wrote:quoted
Add device-tree binding documentation for the Armada8K reset driver. Signed-off-by: Wilson Ding <redacted> --- .../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@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=nKjWec2quoted
quoted
+b6R0mOyPaz7xtfQ&r=sXDQZu4GyqNVDlFUXakSGJl0Dh81ZIPlU26YS4KHGIA &m=Q8Yquoted
quoted
+WjAVZaKSaPD0B9Hb3Il6KsiVTSpeB9Br9zI5bqQ9MyW0LQnEdiE2kzdfMRQfa &s=VRFquoted
quoted
+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=sXDquoted
quoted
+QZu4GyqNVDlFUXakSGJl0Dh81ZIPlU26YS4KHGIA&m=Q8YWjAVZaKSaPD0B 9Hb3Il6Kquoted
quoted
+siVTSpeB9Br9zI5bqQ9MyW0LQnEdiE2kzdfMRQfa&s=3F_XMbPCmCHx0pRO vv0KP1cZquoted
quoted
+tvjQBFPSBpdty-yVZjY&e= + +title: Marvell Armada8K reset controller + +maintainers: + - Wilson Ding [off-list ref] + +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@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@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