mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Conor Dooley <conor@kernel.org>
To: Jisheng Zhang <jszhang@kernel.org>
Cc: Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Stephen Boyd <sboyd@kernel.org>,
	Brian Masney <bmasney+clk@redhat.com>,
	Jerome Brunet <jbrunet+clk@baylibre.com>,
	Andi Shyti <andi.shyti@kernel.org>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Frank Li <Frank.Li@nxp.com>, Lee Jones <lee@kernel.org>,
	Linus Walleij <linusw@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Slaby <jirislaby@kernel.org>,
	Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-clk@vger.kernel.org, linux-i2c@vger.kernel.org,
	linux-i3c@lists.infradead.org, mfd@lists.linux.dev,
	linux-gpio@vger.kernel.org, linux-serial@vger.kernel.org,
	linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 08/20] dt-bindings: reset: add Synaptics SL261X SoCs
Date: Wed, 30 Sep 2026 17:49:18 +0100	[thread overview]
Message-ID: <20260930-legend-helium-ca5a0ff56709@spud> (raw)
In-Reply-To: <ar0npPCHX1P5Gjzx@xhacker>

[-- Attachment #1: Type: text/plain, Size: 8515 bytes --]

On Wed, Sep 30, 2026 at 11:15:48PM +0800, Jisheng Zhang wrote:
> On Tue, Sep 29, 2026 at 08:44:13PM +0100, Conor Dooley wrote:
> > On Tue, Sep 29, 2026 at 02:14:05PM +0800, Jisheng Zhang wrote:
> > > Add device tree bindings for the resets on Synaptics SL261X SoCs.
> > > 
> > > Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
> > > ---
> > >  .../bindings/reset/syna,sl261x-reset.yaml     | 40 ++++++++++
> > >  include/dt-bindings/reset/syna,sl261x-reset.h | 80 +++++++++++++++++++
> > >  2 files changed, 120 insertions(+)
> > >  create mode 100644 Documentation/devicetree/bindings/reset/syna,sl261x-reset.yaml
> > >  create mode 100644 include/dt-bindings/reset/syna,sl261x-reset.h
> > > 
> > > diff --git a/Documentation/devicetree/bindings/reset/syna,sl261x-reset.yaml b/Documentation/devicetree/bindings/reset/syna,sl261x-reset.yaml
> > > new file mode 100644
> > > index 000000000000..8cfec17df800
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/reset/syna,sl261x-reset.yaml
> > > @@ -0,0 +1,40 @@
> > > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> > > +# Copyright (C) 2026 Synaptics Incorporated
> > > +%YAML 1.2
> > > +---
> > > +$id: http://devicetree.org/schemas/reset/syna,sl261x-reset.yaml#
> > > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > > +
> > > +title: Synaptics SL261X reset controller
> > > +
> > > +maintainers:
> > > +  - Jisheng Zhang <jszhang@kernel.org>
> > > +
> > > +description: The reset controller node must be a sub-node of the chip
> > > +  controller node on SL261X SoCs.
> > > +
> > > +properties:
> > > +  compatible:
> > > +    enum:
> > > +      - syna,sl261x-soc-reset
> > > +      - syna,sl261x-system-reset
> > > +
> > > +  "#reset-cells":
> > > +    const: 1
> > > +
> > > +required:
> > > +  - compatible
> > > +  - "#reset-cells"
> > > +
> > > +additionalProperties: false
> > > +
> > > +examples:
> > > +  - |
> > > +    chip: chip-control@f7e10000 {
> > > +        reg = <0xf7e10000 0x1000>;
> > > +
> > > +        chip_rst: reset {
> > > +            compatible = "syna,sl261x-soc-reset";
> > > +            #reset-cells = <1>;
> > > +        };
> > 
> > Why can't this just be part of the parent node?
> 
> Good question! IMHO, the reasons are:
> 
> 1. the so called Gbls(Gbl means global) such as mcuGbl and
> chip control Gbl contain not only reset, pinctrl and clk/plls
> but also some other registers for different purposes, e.g in the
> chip control gbl, there are some registers to control eth phy sel(RMII
> or RGMII), and TXC 90 degree selection etc. These registers will
> be used by the Ethernet driver;
> 
> While there's no pinctrl regs in avioGbl and vppGbl. In the vppgbl,
> there are some registers for DPHYTX etc.
> 
> As can been, in different Gbls, there maybe different purposes registers, no
> obvious patterns.
> 
> So the question here is why not split the gbl into different register
> spaces, and abstract each space for each function group?

No, you misunderstood. I'm not asking for the register space to be
split, I am asking why you cannot do
| syscon@f7e1000 {
| 	compatible = "syna,sl2610-soc-syscon", "syscon";
| 	reg = <0xf7e10000 0x1000>;
| 	#clock-cells = <1>;
| 	#reset-cells = <1>;
| };
With this kind of thing, you can either use the auxiliary bus or
MFD_CELL_NAME() to create the other devices. The latter is good if
you've got a region with clocks that also has resets thrown in, the
former is probably better if you have a syscon with a genuine
assortment of different functions that you're going to be looking up via
phandle.

> Two blocking
> points make this impossible and ugly: different reg space may not be
> aligned at 4KB boundary, e.g reset: 0x350 ~ 0x37c; eth phy sel:0xa18;
> some registers which belong to similar functionality, e.g clks, may not be
> adjacent.

This sort of thing, with non-adjacent clocks is still possible, you have
a regmap just like before.

> So the best way is to abstract these GBLs via. "syscon", "simple-mfd", and
> put necessary subnodes such as reset, pinctrl and clks under the GBL
> node. If the registers in GBL is misc control, pass the syscon phandle
> to the main driver, e.g I planed to pass the syscon phandle to GMAC
> driver to control the RMII/RGMII selection.

And you can get the regmap from other drivers by doing phandle or
compatible based lookups just like before.

> 
> 2.follow current bg2 and bg2q style
> e.g arch/arm/boot/dts/synaptics/berlin2q.dtsi
> 
> IMHO, why bg2 and bg2q dtsi files are implemented as current
> style is due to the above point 1.

Unfortunately, this is the berlin2q devicetree showing its age, we've
been pushing people away from nodes that exist just to probe a driver
and don't provide any additional value. Something like
| chip-control@f7e10000 {
|     reg = <0xf7e10000 0x1000>;
| 
|     chip_rst: reset {
|         compatible = "syna,sl261x-soc-reset";
|         #reset-cells = <1>;
|     };
| 
|     chip_clk: clock {
|         compatible = "syna,sl261x-soc-clock";
|         #clock-cells = <1>;
|     };
is exactly the pattern we are trying to avoid.

Cheers,
Conor.

> 
> Kindly let me know if there's a better solution.
> 
> > From a quick check of the dts, the node with this subnode didn't also
> > have a system-reset node too, so there's no conflict or anything of that
> > nature.
> > 
> > > +    };
> > > diff --git a/include/dt-bindings/reset/syna,sl261x-reset.h b/include/dt-bindings/reset/syna,sl261x-reset.h
> > > new file mode 100644
> > > index 000000000000..7034f58aae5b
> > > --- /dev/null
> > > +++ b/include/dt-bindings/reset/syna,sl261x-reset.h
> > > @@ -0,0 +1,80 @@
> > > +/* SPDX-License-Identifier: (GPL-2.0 OR MIT) */
> > > +/*
> > > + * Copyright (C) 2026 Synaptics Incorporated
> > > + *
> > > + * Author: Jisheng Zhang <jszhang@kernel.org>
> > > + */
> > > +
> > > +#ifndef _DT_BINDINGS_SL261X_RESET_H
> > > +#define _DT_BINDINGS_SL261X_RESET_H
> > > +
> > > +/* ACPU subsystem */
> > > +#define RST_SOC_SDIO0		0
> > > +#define RST_SOC_USB0		1
> > > +#define RST_SOC_EMMC		2
> > > +#define RST_SOC_GETH0		3
> > > +#define RST_SOC_SDIO1		4
> > > +#define RST_SOC_USB1		5
> > > +#define RST_SOC_GETH1		6
> > > +#define RST_SOC_USB0PHY		7
> > > +#define RST_SOC_USB0CORE	8
> > > +#define RST_SOC_USB0MAHB	9
> > > +#define RST_SOC_USB1PHY		10
> > > +#define RST_SOC_USB1CORE	11
> > > +#define RST_SOC_USB1MAHB	12
> > > +#define RST_SOC_UART0		13
> > > +#define RST_SOC_UART1		14
> > > +#define RST_SOC_UART2		15
> > > +#define RST_SOC_UART3		16
> > > +#define RST_SOC_I2C0		17
> > > +#define RST_SOC_I2C1		18
> > > +#define RST_SOC_SPI0		19
> > > +#define RST_SOC_SPI1		20
> > > +#define RST_SOC_SPI2		21
> > > +#define RST_SOC_SPI3		22
> > > +#define RST_SOC_APBTIMERS	23
> > > +#define RST_SOC_APBSYSCNT	24
> > > +#define RST_SOC_APBWDT		25
> > > +#define RST_SOC_APBGPIO		26
> > > +#define RST_SOC_APBDMA		27
> > > +#define RST_SOC_GPUCORE		28
> > > +#define RST_SOC_NPUCORE		29
> > > +#define RST_SOC_AVIOAIOG	30
> > > +#define RST_SOC_AVIOVPPG	31
> > > +#define RST_SOC_AVIOVIPG	32
> > > +
> > > +/* system subsystem */
> > > +#define RST_SM_ADCCORE		0
> > > +#define RST_SM_ADCPRST		1
> > > +#define RST_SM_CAN0PRST		2
> > > +#define RST_SM_CAN0SRST		3
> > > +#define RST_SM_CAN1PRST		4
> > > +#define RST_SM_CAN1SRST		5
> > > +#define RST_SM_GPIOPRST		6
> > > +#define RST_SM_GPIOSRST		7
> > > +#define RST_SM_I2CM0PRST	8
> > > +#define RST_SM_I2CM0SRST	9
> > > +#define RST_SM_I2CM1PRST	10
> > > +#define RST_SM_I2CM1SRST	11
> > > +#define RST_SM_I3CPRST		12
> > > +#define RST_SM_I3CSRST		13
> > > +#define RST_SM_PDMPRST		14
> > > +#define RST_SM_PDMSRST		15
> > > +#define RST_SM_PVTHSRST		16
> > > +#define RST_SM_PVTPRST		17
> > > +#define RST_SM_PWMPERIRST	18
> > > +#define RST_SM_PWMPRST		19
> > > +#define RST_SM_SPIMPRST		20
> > > +#define RST_SM_SPIMSRST		21
> > > +#define RST_SM_SPISPRST		22
> > > +#define RST_SM_SPISSRST		23
> > > +#define RST_SM_UART0PRST	24
> > > +#define RST_SM_UART0SRST	25
> > > +#define RST_SM_UART1PRST	26
> > > +#define RST_SM_UART1SRST	27
> > > +#define RST_SM_UART2PRST	28
> > > +#define RST_SM_UART2SRST	29
> > > +#define RST_SM_UART3PRST	30
> > > +#define RST_SM_UART3SRST	31
> > > +
> > > +#endif /* _DT_BINDINGS_SL261X_RESET_H */
> > > -- 
> > > 2.53.0
> > > 
> 
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2026-09-30 16:49 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-29  6:13 [PATCH 00/20] arm64: add Synaptics SL261X SoCs and RDK boards Jisheng Zhang
2026-09-29  6:13 ` [PATCH 01/20] dt-bindings: serial: snps-dw-apb-uart: Add Synaptics sl261x uart Jisheng Zhang
2026-09-29  6:13 ` [PATCH 02/20] dt-bindings: i2c: dw: Add Synaptics sl261x i2c Jisheng Zhang
2026-09-29 20:57   ` Andi Shyti
2026-09-29  6:14 ` [PATCH 03/20] spi: dt-bindings: snps,dw-apb-ssi: Add Synaptics sl261x spi Jisheng Zhang
2026-09-29  6:14 ` [PATCH 04/20] dt-bindings: i3c: dw: support up to two reset lines Jisheng Zhang
2026-09-29 19:40   ` Conor Dooley
2026-09-29  6:14 ` [PATCH 05/20] i3c: dw: switch to array-based exclusive reset control Jisheng Zhang
2026-09-29 15:01   ` Frank Li
2026-09-29  6:14 ` [PATCH 06/20] dt-bindings: i3c: Add Synaptics sl261x i3c Jisheng Zhang
2026-09-29  6:14 ` [PATCH 07/20] arm64: kconfig: let ARCH_BERLIN cover Synaptics arm64 SoCs Jisheng Zhang
2026-09-29  6:14 ` [PATCH 08/20] dt-bindings: reset: add Synaptics SL261X SoCs Jisheng Zhang
2026-09-29 19:44   ` Conor Dooley
2026-09-30 15:15     ` Jisheng Zhang
2026-09-30 16:49       ` Conor Dooley [this message]
2026-09-29  6:14 ` [PATCH 09/20] reset: add Synaptics SL261x reset support Jisheng Zhang
2026-09-29  6:14 ` [PATCH 10/20] pinctrl: berlin: use u16 instead of u8 for the offset Jisheng Zhang
2026-09-29  6:14 ` [PATCH 11/20] pinctrl: berlin: enable module build support Jisheng Zhang
2026-09-29  6:14 ` [PATCH 12/20] pinctrl: berlin: add optional pinconf support Jisheng Zhang
2026-09-29  6:14 ` [PATCH 13/20] dt-bindings: pinctrl: berlin: Support Synaptics SL261X SoCs Jisheng Zhang
2026-09-29  6:14 ` [PATCH 14/20] pinctrl: berlin: support " Jisheng Zhang
2026-09-29 15:34   ` Uwe Kleine-König
2026-09-29  6:14 ` [PATCH 15/20] dt-bindings: clock: add Synaptics SL261X clock Jisheng Zhang
2026-09-29 19:46   ` Conor Dooley
2026-09-29 20:49   ` Rob Herring (Arm)
2026-09-30 14:18     ` Jisheng Zhang
2026-09-29  6:14 ` [PATCH 16/20] clk: berlin: add Synaptics SL261X SoC clocks and plls Jisheng Zhang
2026-09-29  6:14 ` [PATCH 17/20] dt-bindings: mfd: Add Synaptics SL261x global block binding Jisheng Zhang
2026-09-29 19:55   ` Conor Dooley
2026-09-29  6:14 ` [PATCH 18/20] regulator: dt-bindings: sy8827n: support standard properties Jisheng Zhang
2026-09-29 19:40   ` Conor Dooley
2026-09-29  6:14 ` [PATCH 19/20] dt-bindings: arm: berlin: Add Synaptics SL261X SoC and RDK board Jisheng Zhang
2026-09-29  6:14 ` [PATCH 20/20] arm64: dts: synaptics: " Jisheng Zhang
2026-09-29 19:38 ` [PATCH 00/20] arm64: add Synaptics SL261X SoCs and RDK boards Conor Dooley
2026-09-30 14:15   ` Jisheng Zhang
2026-09-30 14:32   ` Jisheng Zhang
2026-09-30 16:35     ` Conor Dooley

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=20260930-legend-helium-ca5a0ff56709@spud \
    --to=conor@kernel.org \
    --cc=Frank.Li@nxp.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=andi.shyti@kernel.org \
    --cc=bmasney+clk@redhat.com \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jbrunet+clk@baylibre.com \
    --cc=jirislaby@kernel.org \
    --cc=jszhang@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=lee@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linusw@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-i3c@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=mfd@lists.linux.dev \
    --cc=p.zabel@pengutronix.de \
    --cc=robh@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=sebastian.hesselbarth@gmail.com \
    /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

all inboxes | Powered by JetHome®