[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aw2vqnz5vcccqqvrrhz5tgawj7fnzzg3tds7nnepuorit37a7r@jcj3wrs7d73h>
Date: Sat, 4 Jan 2025 11:07:58 +0100
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Haylen Chu <heylenay@....org>
Cc: Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...nel.org>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>,
Haylen Chu <heylenay@...look.com>, Yixun Lan <dlan@...too.org>, linux-riscv@...ts.infradead.org,
linux-clk@...r.kernel.org, devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
Inochi Amaoto <inochiama@...look.com>, Chen Wang <unicornxdotw@...mail.com>,
Jisheng Zhang <jszhang@...nel.org>, Meng Zhang <zhangmeng.kevin@...ux.spacemit.com>
Subject: Re: [PATCH v4 2/4] dt-bindings: soc: spacemit: Add spacemit,k1-syscon
On Fri, Jan 03, 2025 at 09:56:35PM +0000, Haylen Chu wrote:
> Add documentation to describe Spacemit K1 system controller registers.
>
> Signed-off-by: Haylen Chu <heylenay@....org>
> ---
> .../soc/spacemit/spacemit,k1-syscon.yaml | 52 +++++++++++++++++++
> 1 file changed, 52 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/soc/spacemit/spacemit,k1-syscon.yaml
>
> diff --git a/Documentation/devicetree/bindings/soc/spacemit/spacemit,k1-syscon.yaml b/Documentation/devicetree/bindings/soc/spacemit/spacemit,k1-syscon.yaml
> new file mode 100644
> index 000000000000..79c4a74ff30e
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/soc/spacemit/spacemit,k1-syscon.yaml
> @@ -0,0 +1,52 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/soc/spacemit/spacemit,k1-syscon.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Spacemit K1 SoC System Controller
> +
> +maintainers:
> + - Haylen Chu <heylenay@....org>
> +
> +description:
> + The Spacemit K1 SoC system controller provides access to shared register files
> + for related SoC modules, such as clock controller and reset controller.
> +
> +properties:
> + compatible:
> + items:
> + - enum:
> + - spacemit,k1-apbc-syscon
> + - spacemit,k1-apbs-syscon
> + - spacemit,k1-apmu-syscon
> + - spacemit,k1-mpmu-syscon
> + - const: syscon
> + - const: simple-mfd
> +
> + reg:
> + maxItems: 1
> +
> + clock-controller:
> + $ref: /schemas/clock/spacemit,k1-ccu.yaml#
> + type: object
So now we see the full picture and it leads to questions.
1. Why spacemit,k1-apbc-syscon with spacemit,k1-ccu-apmu child is a
correct combination?
2. Why having this split in the first place? Please confirm that clock
controller is really, really a separate device and its child in
datasheet. IOW, fake child for your Linux is a no-go. Fake child while
devices are independent is another no-go.
Actual answer for 1+2 above would be to fold the child into parent,
assuming clock controller split is fake in terms of datasheet.
If it is real device, then allOf:if:then: narrowing the compatibles of
child might not be worth the complexity.
3. Why using different naming, look:
spacemit,k1-XXXX-syscon
spacemit,k1-ccu-XXXX
Best regards,
Krzysztof
Powered by blists - more mailing lists