From: "Stefan Dösinger" <stefandoesinger@gmail.com>
To: linux-arm-kernel@lists.infradead.org,
Navid Ghahremani <ghahramani.navid@gmail.com>
Cc: arnd@arndb.de, krzk@kernel.org,
Navid Ghahremani <ghahramani.navid@gmail.com>,
Stephen Boyd <sboyd@kernel.org>,
Brian Masney <bmasney+clk@redhat.com>,
Jerome Brunet <jbrunet+clk@baylibre.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
linux-clk@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 04/24] dt-bindings: clock: Add ZTE ZX279128S CRM clock bindings
Date: Wed, 14 Oct 2026 23:48:32 +0200 [thread overview]
Message-ID: <P2sItgLkRqGZa4OOeZAnJw@gmail.com> (raw)
In-Reply-To: <20261014072109.1759502-5-ghahramani.navid@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 4300 bytes --]
Am Mittwoch, 14. Oktober 2026, 09:20:44 Mitteleuropäische Sommerzeit schrieb
Navid Ghahremani:
> Add Device Tree binding schemas for the ZTE ZX279128S clock controllers:
> topcrm, lspcrpm, and crm2. Define fixed clock lists and simple-mfd
> for child nodes inside topcrm.
This would be easier to review if it were split in 3 patches, one yaml per
patch. I'll try to comment on the details anyway.
> +properties:
> + compatible:
> + oneOf:
> + - const: zte,zx279128s-crm2
> + - items:
> + - const: zte,zx279128s-crm2
> + - const: syscon
Afaiu this makes "syscon" optional. Why do you need syscon? Why might you not
need syscon?
The goal should be to avoid "syscon" as much as possible. The meaning of the
syscon compatible is that a different driver will access these registers
directly instead of going through a properly exported interface like #clock-
cells. Is there anything in crm2 that is not a clock or reset?
> a/Documentation/devicetree/bindings/clock/zte,zx279128s-lspcrpm.yaml
> b/Documentation/devicetree/bindings/clock/zte,zx279128s-lspcrpm.yaml new
> +maintainers:
> + - Stefan Dösinger <stefandoesinger@gmail.com>
> + - Navid Ghahremani <ghahramani.navid@gmail.com>
I think you should be the maintainer alone here, I don't have the hardware to
do proper testing of patches.
> +description: |
> + Each of the two groups of low speed peripherals (LSP) has a peripheral
> clock + module (LSP CRPM) of its own, fed by the top CRM.
> +
> +properties:
> + compatible:
> + enum:
> + - zte,zx279128s-lsp0crpm
> + - zte,zx279128s-lsp1crpm
I think splitting those into different bindings is still a viable choice. Yeah,
ZTE gave them very similar names, but from what I can see the two controllers
have nothing in common.
> +patternProperties:
> + "^phy@[01]$":
> + type: object
> + description: PCIe PHY child nodes
You can drop the phy child node and just add "#phy-cells=1". See https://
docs.kernel.org/devicetree/bindings/writing-bindings.html : "DON’T create
nodes just for the sake of instantiating drivers. Multi-function devices only
need child nodes when the child nodes have their own DT resources. A single
node can be multiple providers (e.g. clocks and resets)."
In practical terms, putting a child node into the DT makes this a public ABI
contract. The alternative is to split the device with an MFD driver or using
the aux bus. In the latter case, what components a device consists of is a
driver implementation detail that can easily be changed later.
The PHY subsystem has a quirk that devm_of_phy_provider_register wants the
device node to have a DT node, which is not the case if the device is an MFD
child. device_set_of_node_from_dev(dev, dev->parent); helps.
The other purpose of having a DT child node is if a sub-component is likely to
be used in a different piece of hardware. syscon-reboot is a pretty generic
example of that.
> --- /dev/null
> +++ b/include/dt-bindings/clock/zte,zx279128s-crm.h
I'd suggest to rename clock/zte,zx279128s-crm.h to clock/zte,zx279128s-clk.h.
"CRM" implies clock-reset-manager, but the -reset.h header has the reset
handles, so the "crm.h" header won't have them.
> +#define ZX279128S_TOP_PLL_A9 0
> +#define ZX279128S_TOP_PLL_LSP 1
> +#define ZX279128S_TOP_CPU 2
Do they all need to be exported? You only need those that will be used for a
clock = <&topcrm ZX279128S_TOP_SOMETHING> handle. That could e.g. be the CPU
wclk and pclk, but the parent PLL itself can remain a driver detail. Most
likely all your device clocks have a gate somewhere. In my zx29 case I only
export gates from the clock driver, with the exception of the Cortex M0 mux -
the Cortex M0 can't be turned off, so it has no gate.
I realize that a lot of devices may be missing from the DTSI in patch 23.
> +/* Low speed peripherals 0 */
> +#define ZX279128S_LSP0_UART0_WCLK 0
> +#define ZX279128S_LSP0_UART0_PCLK 1
> +#define ZX279128S_LSP0_UART1_WCLK 2
> +#define ZX279128S_LSP0_UART1_PCLK 3
> +#define ZX279128S_LSP0_SPI_WCLK 4
> +#define ZX279128S_LSP0_SPI_PCLK 5
> +#define ZX279128S_LSP0_GPIO_PCLK 6
E.g. exporting those intuitively makes sense.
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 870 bytes --]
next prev parent reply other threads:[~2026-10-14 21:50 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-14 7:20 [PATCH v2 00/24] ARM: zte: Add support for Sanechips ZX279128S and ZTE ZXHN H3600 Navid Ghahremani
2026-10-14 7:20 ` [PATCH v2 01/24] MAINTAINERS: Consolidate ARM/ZTE ZX SOC SUPPORT with Stefan Doesinger Navid Ghahremani
2026-10-14 20:11 ` Stefan Dösinger
2026-10-14 7:20 ` [PATCH v2 02/24] dt-bindings: arm: Add ZTE ZX279128S platform descriptions Navid Ghahremani
2026-10-14 7:20 ` [PATCH v2 03/24] ARM: zte: Add ZX279128S platform and CPU hotplug support Navid Ghahremani
2026-10-14 7:20 ` [PATCH v2 04/24] dt-bindings: clock: Add ZTE ZX279128S CRM clock bindings Navid Ghahremani
2026-10-14 21:48 ` Stefan Dösinger [this message]
2026-10-14 7:20 ` [PATCH v2 05/24] dt-bindings: reset: Add ZTE ZX279128S reset controller bindings Navid Ghahremani
2026-10-14 7:20 ` [PATCH v2 06/24] clk: zte: Add ZX279128S CRM clock and reset driver Navid Ghahremani
2026-10-14 13:21 ` Philipp Zabel
2026-10-14 19:39 ` Stefan Dösinger
2026-10-14 7:20 ` [PATCH v2 07/24] dt-bindings: gpio: Add ZTE ZX279128S GPIO controller Navid Ghahremani
2026-10-14 7:20 ` [PATCH v2 08/24] gpio: Add ZTE ZX279128S GPIO driver Navid Ghahremani
2026-10-14 21:11 ` Stefan Dösinger
2026-10-14 7:20 ` [PATCH v2 09/24] dt-bindings: pinctrl: pinctrl-single: Add ZTE ZX279128S pin mux Navid Ghahremani
2026-10-14 7:20 ` [PATCH v2 10/24] dt-bindings: phy: Add ZTE ZX279128S PCIe PHY binding Navid Ghahremani
2026-10-14 7:20 ` [PATCH v2 11/24] phy: zte: Add ZTE ZX279128S PCIe PHY driver Navid Ghahremani
2026-10-14 7:20 ` [PATCH v2 12/24] dt-bindings: PCI: Add ZTE ZX279128S host controller Navid Ghahremani
2026-10-14 7:20 ` [PATCH v2 13/24] PCI: dwc: Add ZTE ZX279128S host controller driver Navid Ghahremani
2026-10-14 13:19 ` Bjorn Helgaas
2026-10-14 21:06 ` Stefan Dösinger
2026-10-14 7:20 ` [PATCH v2 14/24] dt-bindings: net: Add ZTE ZX279128S MDIO controller Navid Ghahremani
2026-10-14 7:20 ` [PATCH v2 15/24] net: mdio: " Navid Ghahremani
2026-10-14 12:13 ` Andrew Lunn
2026-10-14 7:20 ` [PATCH v2 16/24] net: phy: Add Sanechips ZX5201 PHY support Navid Ghahremani
2026-10-14 12:37 ` Andrew Lunn
2026-10-14 7:20 ` [PATCH v2 17/24] dt-bindings: net: Add ZTE ZX279128S Ethernet switch Navid Ghahremani
2026-10-14 7:20 ` [PATCH v2 18/24] net: ethernet: zte: Add ZX279128S Ethernet switch driver Navid Ghahremani
2026-10-14 7:20 ` [PATCH v2 19/24] dt-bindings: spi: Add ZTE ZX family SPI flash controller binding Navid Ghahremani
2026-10-14 20:33 ` Stefan Dösinger
2026-10-14 7:21 ` [PATCH v2 20/24] spi: zx: Add ZTE ZX family SPI flash controller driver Navid Ghahremani
2026-10-14 19:28 ` Stefan Dösinger
2026-10-14 7:21 ` [PATCH v2 21/24] dt-bindings: usb: Add ZTE ZX279128S DWC3 controller Navid Ghahremani
2026-10-14 7:21 ` [PATCH v2 22/24] usb: dwc3: generic-plat: Add ZTE ZX279128S Navid Ghahremani
2026-10-14 7:21 ` [PATCH v2 23/24] ARM: dts: zte: Add ZX279128S SoC description Navid Ghahremani
2026-10-14 7:21 ` [PATCH v2 24/24] ARM: dts: zte: Add ZTE ZXHN H3600 board Navid Ghahremani
2026-10-14 12:52 ` Andrew Lunn
2026-10-14 20:00 ` [PATCH v2 00/24] ARM: zte: Add support for Sanechips ZX279128S and ZTE ZXHN H3600 Stefan Dösinger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=P2sItgLkRqGZa4OOeZAnJw@gmail.com \
--to=stefandoesinger@gmail.com \
--cc=arnd@arndb.de \
--cc=bmasney+clk@redhat.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=ghahramani.navid@gmail.com \
--cc=jbrunet+clk@baylibre.com \
--cc=krzk+dt@kernel.org \
--cc=krzk@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh@kernel.org \
--cc=sboyd@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox