Skip to contentSkip to conversation

arm64: add Synaptics SL261X SoCs and RDK boards

PATCH Superseded Jisheng Zhang 9 participants 67 messages Sep 29 – Oct 28

Subsystems (14)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Jisheng Zhang

author maintainer
#0 lore raw

cover arm64: add Synaptics SL261X SoCs and RDK boards

Add initial support for the Synaptics SL261X SoCs and corresponding RDK boards.

The SL261X SoCs include five pin-to-pin compatible SoCs: SL2611, SL2613, SL2615, SL2617, and SL2619.

Only reset, pinctrl, clk/pll, uart, gpio, i2c, spi, i3c are included in this series. The support for Ethernet, USB, SDHCI, CAN, DMAC, XSPI will be submitted after this series is merged.

Jisheng Zhang (20):
dt-bindings: serial: snps-dw-apb-uart: Add Synaptics sl261x uart
dt-bindings: i2c: dw: Add Synaptics sl261x i2c
spi: dt-bindings: snps,dw-apb-ssi: Add Synaptics sl261x spi
dt-bindings: i3c: dw: support up to two reset lines
i3c: dw: switch to array-based exclusive reset control
dt-bindings: i3c: Add Synaptics sl261x i3c
arm64: kconfig: let ARCH_BERLIN cover Synaptics arm64 SoCs
dt-bindings: reset: add Synaptics SL261X SoCs
reset: add Synaptics SL261x reset support
pinctrl: berlin: use u16 instead of u8 for the offset
pinctrl: berlin: enable module build support
pinctrl: berlin: add optional pinconf support
dt-bindings: pinctrl: berlin: Support Synaptics SL261X SoCs
pinctrl: berlin: support Synaptics SL261X SoCs
dt-bindings: clock: add Synaptics SL261X clock
clk: berlin: add Synaptics SL261X SoC clocks and plls
dt-bindings: mfd: Add Synaptics SL261x global block binding
regulator: dt-bindings: sy8827n: support standard properties
dt-bindings: arm: berlin: Add Synaptics SL261X SoC and RDK board
arm64: dts: synaptics: Add Synaptics SL261X SoC and RDK board

 .../bindings/arm/marvell,berlin.yaml          |  20 +
 .../bindings/clock/syna,sl261x-clk.yaml       |  92 +++
 .../bindings/i2c/snps,designware-i2c.yaml     |   1 +
 .../bindings/i3c/snps,dw-i3c-master.yaml      |   6 +-
 .../bindings/mfd/syna,sl261x-gbl.yaml         | 208 +++++
 .../pinctrl/marvell,berlin2-soc-pinctrl.yaml  |  10 +-
 .../bindings/regulator/silergy,sy8827n.yaml   |   5 +-
 .../bindings/reset/syna,sl261x-reset.yaml     |  40 +
 .../bindings/serial/snps-dw-apb-uart.yaml     |  12 +-
 .../bindings/spi/snps,dw-apb-ssi.yaml         |   1 +
 arch/arm64/Kconfig.platforms                  |   4 +-
 arch/arm64/boot/dts/synaptics/Makefile        |   5 +
 arch/arm64/boot/dts/synaptics/sl2611-rdk.dts  |  16 +
 arch/arm64/boot/dts/synaptics/sl2611.dtsi     | 490 ++++++++++++
 arch/arm64/boot/dts/synaptics/sl2613-rdk.dts  |  16 +
 arch/arm64/boot/dts/synaptics/sl2613.dtsi     |  12 +
 arch/arm64/boot/dts/synaptics/sl2615-rdk.dts  |  16 +
 arch/arm64/boot/dts/synaptics/sl2615.dtsi     |  46 ++
 arch/arm64/boot/dts/synaptics/sl2617-rdk.dts  |  16 +
 arch/arm64/boot/dts/synaptics/sl2617.dtsi     |  46 ++
 arch/arm64/boot/dts/synaptics/sl2619-rdk.dts  |  16 +
 arch/arm64/boot/dts/synaptics/sl2619.dtsi     |  44 ++
 .../boot/dts/synaptics/sl261x-rdk-common.dtsi | 135 ++++
 drivers/clk/Kconfig                           |   1 +
 drivers/clk/berlin/Kconfig                    |  25 +
 drivers/clk/berlin/Makefile                   |   4 +
 drivers/clk/berlin/sl-clk.c                   | 279 +++++++
 drivers/clk/berlin/sl-clk.h                   |  31 +
 drivers/clk/berlin/sl-sysmgr-clk.c            | 250 ++++++
 drivers/clk/berlin/sl-sysmgr-clk.h            |  44 ++
 drivers/clk/berlin/sl261x-clks.c              | 385 +++++++++
 drivers/clk/berlin/sl261x-pll.c               | 145 ++++
 drivers/clk/berlin/sl261x-pll.h               |  14 +
 drivers/i3c/master/dw-i3c-master.c            |  24 +-
 drivers/i3c/master/dw-i3c-master.h            |   2 +-
 drivers/pinctrl/berlin/Kconfig                |   7 +
 drivers/pinctrl/berlin/Makefile               |   1 +
 drivers/pinctrl/berlin/berlin.c               | 259 +++++-
 drivers/pinctrl/berlin/berlin.h               |  17 +-
 drivers/pinctrl/berlin/pinctrl-sl261x.c       | 745 ++++++++++++++++++
 drivers/reset/Kconfig                         |   6 +
 drivers/reset/Makefile                        |   1 +
 drivers/reset/reset-sl261x.c                  | 224 ++++++
 include/dt-bindings/clock/syna,sl261x.h       | 131 +++
 include/dt-bindings/reset/syna,sl261x-reset.h |  80 ++
 45 files changed, 3899 insertions(+), 33 deletions(-)
 create mode 100755 Documentation/devicetree/bindings/clock/syna,sl261x-clk.yaml
 create mode 100644 Documentation/devicetree/bindings/mfd/syna,sl261x-gbl.yaml
 create mode 100644 Documentation/devicetree/bindings/reset/syna,sl261x-reset.yaml
 create mode 100644 arch/arm64/boot/dts/synaptics/sl2611-rdk.dts
 create mode 100644 arch/arm64/boot/dts/synaptics/sl2611.dtsi
 create mode 100644 arch/arm64/boot/dts/synaptics/sl2613-rdk.dts
 create mode 100644 arch/arm64/boot/dts/synaptics/sl2613.dtsi
 create mode 100644 arch/arm64/boot/dts/synaptics/sl2615-rdk.dts
 create mode 100644 arch/arm64/boot/dts/synaptics/sl2615.dtsi
 create mode 100644 arch/arm64/boot/dts/synaptics/sl2617-rdk.dts
 create mode 100644 arch/arm64/boot/dts/synaptics/sl2617.dtsi
 create mode 100644 arch/arm64/boot/dts/synaptics/sl2619-rdk.dts
 create mode 100644 arch/arm64/boot/dts/synaptics/sl2619.dtsi
 create mode 100644 arch/arm64/boot/dts/synaptics/sl261x-rdk-common.dtsi
 create mode 100644 drivers/clk/berlin/Kconfig
 create mode 100644 drivers/clk/berlin/sl-clk.c
 create mode 100644 drivers/clk/berlin/sl-clk.h
 create mode 100644 drivers/clk/berlin/sl-sysmgr-clk.c
 create mode 100644 drivers/clk/berlin/sl-sysmgr-clk.h
 create mode 100644 drivers/clk/berlin/sl261x-clks.c
 create mode 100644 drivers/clk/berlin/sl261x-pll.c
 create mode 100644 drivers/clk/berlin/sl261x-pll.h
 create mode 100644 drivers/pinctrl/berlin/pinctrl-sl261x.c
 create mode 100644 drivers/reset/reset-sl261x.c
 create mode 100644 include/dt-bindings/clock/syna,sl261x.h
 create mode 100644 include/dt-bindings/reset/syna,sl261x-reset.h
Signature · 1 line
2.53.0
author maintainer
#1 lore raw

PATCH 1/20 dt-bindings: serial: snps-dw-apb-uart: Add Synaptics sl261x uart

Add the compatible for the UARTs of the Synaptics SL261X, which are compatible with the Synopsys DesignWare APB UART.

---
 .../devicetree/bindings/serial/snps-dw-apb-uart.yaml | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml +11 -1
index 664305de4986..7a80357230eb 100644
@@ -34,7 +34,16 @@ allOf:
       properties:
         resets:
           minItems: 2
-    else:
+
+  - if:
+      not:
+        properties:
+          compatible:
+            contains:
+              enum:
+                - starfive,jh7110-uart
+                - syna,sl261x-uart
+    then:
       properties:
         resets:
           maxItems: 1
@@ -80,6 +89,7 @@ properties:
               - starfive,jh7100-hsuart
               - starfive,jh7100-uart
               - starfive,jh7110-uart
+              - syna,sl261x-uart
               - ultrarisc,dp1000-uart
           - const: snps,dw-apb-uart
       - const: snps,dw-apb-uart
Signature · 1 line
2.53.0
#2 lore raw

Re: [PATCH 01/20] dt-bindings: serial: snps-dw-apb-uart: Add Synaptics sl261x uart

Sashiko has reviewed this patch and found no issues. It looks great!
Quoted 4 lines

Add the compatible for the UARTs of the Synaptics SL261X, which are compatible with the Synopsys DesignWare APB UART.

Sashiko has reviewed this patch and found no issues. It looks great!

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
author maintainer
#3 lore raw

PATCH 2/20 dt-bindings: i2c: dw: Add Synaptics sl261x i2c

In reply to Jisheng Zhang

Add the compatible for the Synaptics SL261X SoC I2C controllers, which are compatible with the Synopsys DesignWare I2C.

---
 Documentation/devicetree/bindings/i2c/snps,designware-i2c.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/i2c/snps,designware-i2c.yaml +1 -0
index 467bdcbb8538..ca2921865b97 100644
@@ -43,6 +43,7 @@ properties:
               - mobileye,eyeq6lplus-i2c
               - mscc,ocelot-i2c
               - sophgo,sg2044-i2c
+              - syna,sl261x-i2c
               - thead,th1520-i2c
           - const: snps,designware-i2c
 
Signature · 1 line
2.53.0
#4 lore raw

Re: [PATCH 02/20] dt-bindings: i2c: dw: Add Synaptics sl261x i2c

Sashiko has reviewed this patch and found no issues. It looks great!
Quoted 4 lines

Add the compatible for the Synaptics SL261X SoC I2C controllers, which are compatible with the Synopsys DesignWare I2C.

Sashiko has reviewed this patch and found no issues. It looks great!

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2
author maintainer
#6 lore raw

PATCH 3/20 spi: dt-bindings: snps,dw-apb-ssi: Add Synaptics sl261x spi

In reply to Jisheng Zhang

Add the compatible for the Synaptics SL261X SoC SPI controllers, which are compatible with the Synopsys DesignWare APB SSI.

---
 Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml +1 -0
index 1e70c6804d5d..7090de9fa8d3 100644
@@ -62,6 +62,7 @@ properties:
               - mscc,ocelot-spi
               - mscc,jaguar2-spi
               - sophgo,sg2042-spi
+              - syna,sl261x-spi
               - thead,th1520-spi
           - const: snps,dw-apb-ssi
       - description: Vendor controllers compatible with v1.01a
Signature · 1 line
2.53.0
#7 lore raw

Re: [PATCH 03/20] spi: dt-bindings: snps,dw-apb-ssi: Add Synaptics sl261x spi

Sashiko has reviewed this patch and found no issues. It looks great!
Quoted 4 lines

Add the compatible for the Synaptics SL261X SoC SPI controllers, which are compatible with the Synopsys DesignWare APB SSI.

Sashiko has reviewed this patch and found no issues. It looks great!

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=3
author maintainer
#8 lore raw

PATCH 4/20 dt-bindings: i3c: dw: support up to two reset lines

In reply to Jisheng Zhang

The Synopsys DesignWare I3C master controller can have multiple reset lines, such as core reset, apb reset, and dma reset.

Update the DT binding documentation to increase maxItems for the resets property to 2.

---
 Documentation/devicetree/bindings/i3c/snps,dw-i3c-master.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/i3c/snps,dw-i3c-master.yaml +1 -1
index dc7ee38001d6..dcc21a7ab4c4 100644
@@ -39,7 +39,7 @@ properties:
     maxItems: 1
 
   resets:
-    maxItems: 1
+    maxItems: 2
 
   power-domains:
     maxItems: 1
Signature · 1 line
2.53.0
#9 lore raw

Re: [PATCH 04/20] dt-bindings: i3c: dw: support up to two reset lines

Sashiko has reviewed this patch and found no issues. It looks great!
Quoted 7 lines

The Synopsys DesignWare I3C master controller can have multiple reset lines, such as core reset, apb reset, and dma reset.

Update the DT binding documentation to increase maxItems for the resets property to 2.

Sashiko has reviewed this patch and found no issues. It looks great!

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=4
#10 lore raw

Re: [PATCH 04/20] dt-bindings: i3c: dw: support up to two reset lines

In reply to Jisheng Zhang
Quoted 7 lines · Jisheng Zhang

The Synopsys DesignWare I3C master controller can have multiple reset lines, such as core reset, apb reset, and dma reset.

Update the DT binding documentation to increase maxItems for the resets property to 2.

Could you add a conditional section alongside this change to restrict the altera device to one please?

pw-bot: changes-requested

Thanks,
Conor.

Quoted 20 lines
---
 Documentation/devicetree/bindings/i3c/snps,dw-i3c-master.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/i3c/snps,dw-i3c-master.yaml +1 -1
index dc7ee38001d6..dcc21a7ab4c4 100644
@@ -39,7 +39,7 @@ properties:
     maxItems: 1
 
   resets:
-    maxItems: 1
+    maxItems: 2
 
   power-domains:
     maxItems: 1
Signature · 1 line
2.53.0
maintainer
#11 lore raw

Re: [PATCH 04/20] dt-bindings: i3c: dw: support up to two reset lines

In reply to Jisheng Zhang
Quoted 5 lines · Jisheng Zhang

The Synopsys DesignWare I3C master controller can have multiple reset lines, such as core reset, apb reset, and dma reset.

Update the DT binding documentation to increase maxItems for the resets property to 2.

The last sentence just listed three reset lines. Why increase to 2?

regards
Philipp

author maintainer
#12 lore raw

Re: [PATCH 04/20] dt-bindings: i3c: dw: support up to two reset lines

Quoted 8 lines · Philipp Zabel
Quoted 5 lines · Jisheng Zhang

The Synopsys DesignWare I3C master controller can have multiple reset lines, such as core reset, apb reset, and dma reset.

Update the DT binding documentation to increase maxItems for the resets property to 2.

The last sentence just listed three reset lines. Why increase to 2?

Per the doc, the last one is dma reset, currently dw I3C driver doesn't support dma. And increasing it to 3 is still dt compatible. Maybe I misunderstood something. what's more, I don't have platforms with all 3 resets to test and verify.

If dt maintainers prefer 3 in one step, I will sent out a follow-up patch.

#13 lore raw

Re: [PATCH 04/20] dt-bindings: i3c: dw: support up to two reset lines

Quoted 8 lines · Jisheng Zhang
Quoted 7 lines · Philipp Zabel
Quoted 5 lines · Jisheng Zhang

The Synopsys DesignWare I3C master controller can have multiple reset lines, such as core reset, apb reset, and dma reset.

Update the DT binding documentation to increase maxItems for the resets property to 2.

Quoted 7 lines
Quoted 1 line

The last sentence just listed three reset lines. Why increase to 2?

Per the doc, the last one is dma reset, currently dw I3C driver doesn't support dma. And increasing it to 3 is still dt compatible. Maybe I misunderstood something. what's more, I don't have platforms with all 3 resets to test and verify.

If dt maintainers prefer 3 in one step, I will sent out a follow-up patch.

I think you can increase it to 3 globally, then restrict to 1 for the altera device and 2 for your new one.

author maintainer
#14 lore raw

PATCH 5/20 i3c: dw: switch to array-based exclusive reset control

In reply to Jisheng Zhang

The Synopsys DesignWare I3C master controller can have multiple reset lines, such as a core reset and APB reset.

Refactor the driver to use devm_reset_control_array_get_exclusive() instead of a single named reset handle. This automatically manages all resets allocated to the device node sequentially.

---
 drivers/i3c/master/dw-i3c-master.c | 24 ++++++++++++++++++------
 drivers/i3c/master/dw-i3c-master.h |  2 +-
 2 files changed, 19 insertions(+), 7 deletions(-)
drivers/i3c/master/dw-i3c-master.c +18 -6
index 4563d8761ba0..1c6c870f5bb3 100644
@@ -1657,6 +1657,11 @@ static const struct dw_i3c_platform_ops dw_i3c_platform_ops_default = {
 	.set_dat_ibi = dw_i3c_platform_set_dat_ibi_nop,
 };
 
+static void dw_i3c_resets_assert(void *data)
+{
+	reset_control_assert(data);
+}
+
 int dw_i3c_common_probe(struct dw_i3c_master *master,
 			struct platform_device *pdev)
 {
@@ -1696,10 +1701,17 @@ int dw_i3c_common_probe(struct dw_i3c_master *master,
 	if (IS_ERR(master->pclk))
 		return PTR_ERR(master->pclk);
 
-	master->core_rst = devm_reset_control_get_optional_exclusive_deasserted(&pdev->dev,
-										NULL);
-	if (IS_ERR(master->core_rst))
-		return PTR_ERR(master->core_rst);
+	master->resets = devm_reset_control_array_get_optional_exclusive(&pdev->dev);
+	if (IS_ERR(master->resets))
+		return PTR_ERR(master->resets);
+
+	ret = reset_control_deassert(master->resets);
+	if (ret)
+		return ret;
+
+	ret = devm_add_action_or_reset(&pdev->dev, dw_i3c_resets_assert, master->resets);
+	if (ret)
+		return ret;
 
 	spin_lock_init(&master->xferqueue.lock);
 	INIT_LIST_HEAD(&master->xferqueue.list);
@@ -1873,7 +1885,7 @@ static int __maybe_unused dw_i3c_master_runtime_suspend(struct device *dev)
 
 	dw_i3c_master_disable(master);
 
-	reset_control_assert(master->core_rst);
+	reset_control_assert(master->resets);
 	dw_i3c_master_disable_clks(master);
 	pinctrl_pm_select_sleep_state(dev);
 	return 0;
@@ -1885,7 +1897,7 @@ static int __maybe_unused dw_i3c_master_runtime_resume(struct device *dev)
 
 	pinctrl_pm_select_default_state(dev);
 	dw_i3c_master_enable_clks(master);
-	reset_control_deassert(master->core_rst);
+	reset_control_deassert(master->resets);
 
 	dw_i3c_master_set_intr_regs(master);
 	dw_i3c_master_restore_timing_regs(master);
drivers/i3c/master/dw-i3c-master.h +1 -1
index 17ad817d1f8e..f5b4491b247a 100644
@@ -36,7 +36,7 @@ struct dw_i3c_master {
 	} xferqueue;
 	struct dw_i3c_master_caps caps;
 	void __iomem *regs;
-	struct reset_control *core_rst;
+	struct reset_control *resets;
 	struct clk *core_clk;
 	struct clk *pclk;
 	char version[5];
Signature · 1 line
2.53.0
#15 lore raw

Re: [PATCH 05/20] i3c: dw: switch to array-based exclusive reset control

Sashiko has reviewed this patch and found no issues. It looks great!
Quoted 8 lines

The Synopsys DesignWare I3C master controller can have multiple reset lines, such as a core reset and APB reset.

Refactor the driver to use devm_reset_control_array_get_exclusive() instead of a single named reset handle. This automatically manages all resets allocated to the device node sequentially.

Sashiko has reviewed this patch and found no issues. It looks great!

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=5
Reviewed-by on v1 5/20
#16 lore raw

Re: [PATCH 05/20] i3c: dw: switch to array-based exclusive reset control

In reply to Jisheng Zhang
Quoted 9 lines · Jisheng Zhang

The Synopsys DesignWare I3C master controller can have multiple reset lines, such as a core reset and APB reset.

Refactor the driver to use devm_reset_control_array_get_exclusive() instead of a single named reset handle. This automatically manages all resets allocated to the device node sequentially.

---

Quoted 76 lines
 drivers/i3c/master/dw-i3c-master.c | 24 ++++++++++++++++++------
 drivers/i3c/master/dw-i3c-master.h |  2 +-
 2 files changed, 19 insertions(+), 7 deletions(-)
drivers/i3c/master/dw-i3c-master.c +18 -6
index 4563d8761ba0..1c6c870f5bb3 100644
@@ -1657,6 +1657,11 @@ static const struct dw_i3c_platform_ops dw_i3c_platform_ops_default = {
 	.set_dat_ibi = dw_i3c_platform_set_dat_ibi_nop,
 };
 
+static void dw_i3c_resets_assert(void *data)
+{
+	reset_control_assert(data);
+}
+
 int dw_i3c_common_probe(struct dw_i3c_master *master,
 			struct platform_device *pdev)
 {
@@ -1696,10 +1701,17 @@ int dw_i3c_common_probe(struct dw_i3c_master *master,
 	if (IS_ERR(master->pclk))
 		return PTR_ERR(master->pclk);
 
-	master->core_rst = devm_reset_control_get_optional_exclusive_deasserted(&pdev->dev,
-										NULL);
-	if (IS_ERR(master->core_rst))
-		return PTR_ERR(master->core_rst);
+	master->resets = devm_reset_control_array_get_optional_exclusive(&pdev->dev);
+	if (IS_ERR(master->resets))
+		return PTR_ERR(master->resets);
+
+	ret = reset_control_deassert(master->resets);
+	if (ret)
+		return ret;
+
+	ret = devm_add_action_or_reset(&pdev->dev, dw_i3c_resets_assert, master->resets);
+	if (ret)
+		return ret;
 
 	spin_lock_init(&master->xferqueue.lock);
 	INIT_LIST_HEAD(&master->xferqueue.list);
@@ -1873,7 +1885,7 @@ static int __maybe_unused dw_i3c_master_runtime_suspend(struct device *dev)
 
 	dw_i3c_master_disable(master);
 
-	reset_control_assert(master->core_rst);
+	reset_control_assert(master->resets);
 	dw_i3c_master_disable_clks(master);
 	pinctrl_pm_select_sleep_state(dev);
 	return 0;
@@ -1885,7 +1897,7 @@ static int __maybe_unused dw_i3c_master_runtime_resume(struct device *dev)
 
 	pinctrl_pm_select_default_state(dev);
 	dw_i3c_master_enable_clks(master);
-	reset_control_deassert(master->core_rst);
+	reset_control_deassert(master->resets);
 
 	dw_i3c_master_set_intr_regs(master);
 	dw_i3c_master_restore_timing_regs(master);
drivers/i3c/master/dw-i3c-master.h +1 -2
index 17ad817d1f8e..f5b4491b247a 100644
@@ -36,7 +36,7 @@ struct dw_i3c_master {
 	} xferqueue;
 	struct dw_i3c_master_caps caps;
 	void __iomem *regs;
-	struct reset_control *core_rst;
+	struct reset_control *resets;
 	struct clk *core_clk;
 	struct clk *pclk;
 	char version[5];
--

2.53.0

maintainer
#17 lore raw

Re: [PATCH 05/20] i3c: dw: switch to array-based exclusive reset control

In reply to Jisheng Zhang
Quoted 6 lines · Jisheng Zhang

The Synopsys DesignWare I3C master controller can have multiple reset lines, such as a core reset and APB reset.

Refactor the driver to use devm_reset_control_array_get_exclusive() instead of a single named reset handle. This automatically manages all resets allocated to the device node sequentially.

Note that this does not guarantee any particular order. Are you sure that this is good enough for all implementations of the DW I3C core?

Otherwise it may be wise to at least specify the names in binding, to be able to switch to the bulk API or individual control later, if needed.

Quoted 31 lines
---
 drivers/i3c/master/dw-i3c-master.c | 24 ++++++++++++++++++------
 drivers/i3c/master/dw-i3c-master.h |  2 +-
 2 files changed, 19 insertions(+), 7 deletions(-)
drivers/i3c/master/dw-i3c-master.c +6 -4
index 4563d8761ba0..1c6c870f5bb3 100644
@@ -1657,6 +1657,11 @@ static const struct dw_i3c_platform_ops dw_i3c_platform_ops_default = {
 	.set_dat_ibi = dw_i3c_platform_set_dat_ibi_nop,
 };
 
+static void dw_i3c_resets_assert(void *data)
+{
+	reset_control_assert(data);
+}
+
 int dw_i3c_common_probe(struct dw_i3c_master *master,
 			struct platform_device *pdev)
 {
@@ -1696,10 +1701,17 @@ int dw_i3c_common_probe(struct dw_i3c_master *master,
 	if (IS_ERR(master->pclk))
 		return PTR_ERR(master->pclk);
 
-	master->core_rst = devm_reset_control_get_optional_exclusive_deasserted(&pdev->dev,
-										NULL);
-	if (IS_ERR(master->core_rst))
-		return PTR_ERR(master->core_rst);
+	master->resets = devm_reset_control_array_get_optional_exclusive(&pdev->dev);

drivers/i3c/master/dw-i3c-master.c int dw_i3c_common_probe(struct dw_i3c_master *master, · line 1714

Quoted 10 lines
drivers/i3c/master/dw-i3c-master.c +10 -0
+	if (IS_ERR(master->resets))
+		return PTR_ERR(master->resets);
+
+	ret = reset_control_deassert(master->resets);
+	if (ret)
+		return ret;
+
+	ret = devm_add_action_or_reset(&pdev->dev, dw_i3c_resets_assert, master->resets);
+	if (ret)
+		return ret;

This looks like we are missing devm_reset_control_array_get_optional_exclusive_deasserted().

regards
Philipp

author maintainer
#18 lore raw

Re: [PATCH 05/20] i3c: dw: switch to array-based exclusive reset control

Quoted 10 lines · Philipp Zabel
Quoted 6 lines · Jisheng Zhang

The Synopsys DesignWare I3C master controller can have multiple reset lines, such as a core reset and APB reset.

Refactor the driver to use devm_reset_control_array_get_exclusive() instead of a single named reset handle. This automatically manages all resets allocated to the device node sequentially.

Note that this does not guarantee any particular order. Are you sure that this is good enough for all implementations of the DW I3C core?

Per my understanding of the doc, it only requires the resets are asserted and de-asserted, didn't mention the order. And per my tests on syna SL2610 platforms, the DW I3C works perfectly no matter I reset apb reset or core reset firstly.

Quoted 52 lines

Otherwise it may be wise to at least specify the names in binding, to be able to switch to the bulk API or individual control later, if needed.

Quoted 31 lines
---
 drivers/i3c/master/dw-i3c-master.c | 24 ++++++++++++++++++------
 drivers/i3c/master/dw-i3c-master.h |  2 +-
 2 files changed, 19 insertions(+), 7 deletions(-)
drivers/i3c/master/dw-i3c-master.c +6 -4
index 4563d8761ba0..1c6c870f5bb3 100644
@@ -1657,6 +1657,11 @@ static const struct dw_i3c_platform_ops dw_i3c_platform_ops_default = {
 	.set_dat_ibi = dw_i3c_platform_set_dat_ibi_nop,
 };
 
+static void dw_i3c_resets_assert(void *data)
+{
+	reset_control_assert(data);
+}
+
 int dw_i3c_common_probe(struct dw_i3c_master *master,
 			struct platform_device *pdev)
 {
@@ -1696,10 +1701,17 @@ int dw_i3c_common_probe(struct dw_i3c_master *master,
 	if (IS_ERR(master->pclk))
 		return PTR_ERR(master->pclk);
 
-	master->core_rst = devm_reset_control_get_optional_exclusive_deasserted(&pdev->dev,
-										NULL);
-	if (IS_ERR(master->core_rst))
-		return PTR_ERR(master->core_rst);
+	master->resets = devm_reset_control_array_get_optional_exclusive(&pdev->dev);

drivers/i3c/master/dw-i3c-master.c int dw_i3c_common_probe(struct dw_i3c_master *master, · line 1714

Quoted 10 lines
drivers/i3c/master/dw-i3c-master.c +10 -0
+	if (IS_ERR(master->resets))
+		return PTR_ERR(master->resets);
+
+	ret = reset_control_deassert(master->resets);
+	if (ret)
+		return ret;
+
+	ret = devm_add_action_or_reset(&pdev->dev, dw_i3c_resets_assert, master->resets);
+	if (ret)
+		return ret;

This looks like we are missing devm_reset_control_array_get_optional_exclusive_deasserted().

regards
Philipp

author maintainer
#19 lore raw

PATCH 6/20 dt-bindings: i3c: Add Synaptics sl261x i3c

In reply to Jisheng Zhang

Add the compatible for the Synaptics SL261X SoC I3C controller, which is compatible with the Synopsys DesignWare I3C.

---
 Documentation/devicetree/bindings/i3c/snps,dw-i3c-master.yaml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/i3c/snps,dw-i3c-master.yaml +3 -1
index dcc21a7ab4c4..bd08d048d44b 100644
@@ -17,7 +17,9 @@ properties:
     oneOf:
       - const: snps,dw-i3c-master-1.00a
       - items:
-          - const: altr,agilex5-dw-i3c-master
+          - enum:
+              - altr,agilex5-dw-i3c-master
+              - syna,sl261x-i3c
           - const: snps,dw-i3c-master-1.00a
 
   reg:
Signature · 1 line
2.53.0
#20 lore raw

Re: [PATCH 06/20] dt-bindings: i3c: Add Synaptics sl261x i3c

Sashiko has reviewed this patch and found no issues. It looks great!
Quoted 4 lines

Add the compatible for the Synaptics SL261X SoC I3C controller, which is compatible with the Synopsys DesignWare I3C.

Sashiko has reviewed this patch and found no issues. It looks great!

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=6
author maintainer
#21 lore raw

PATCH 7/20 arm64: kconfig: let ARCH_BERLIN cover Synaptics arm64 SoCs

In reply to Jisheng Zhang

Extend ARCH_BERLIN to cover Synaptics arm64 SoCs.

---
 arch/arm64/Kconfig.platforms | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/Kconfig.platforms +2 -2
index d2acfac73003..1c0747555a57 100644
@@ -108,13 +108,13 @@ config ARCH_BRCMSTB
 endif
 
 config ARCH_BERLIN
-	bool "Marvell Berlin SoC Family"
+	bool "Synaptics/Marvell Berlin SoC Family"
 	select DW_APB_ICTL
 	select DW_APB_TIMER_OF
 	select GPIOLIB
 	select PINCTRL
 	help
-	  This enables support for Marvell Berlin SoC Family
+	  This enables support for Synaptics SoCs or Marvell Berlin SoC Family
 
 config ARCH_BITMAIN
 	bool "Bitmain SoC Platforms"
Signature · 1 line
2.53.0
#22 lore raw

Re: [PATCH 07/20] arm64: kconfig: let ARCH_BERLIN cover Synaptics arm64 SoCs

Sashiko has reviewed this patch and found no issues. It looks great!
Quoted 3 lines

Extend ARCH_BERLIN to cover Synaptics arm64 SoCs.

Sashiko has reviewed this patch and found no issues. It looks great!

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=7
author maintainer
#23 lore raw

PATCH 8/20 dt-bindings: reset: add Synaptics SL261X SoCs

In reply to Jisheng Zhang

Add device tree bindings for the resets on Synaptics SL261X SoCs.

---
 .../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
Documentation/devicetree/bindings/reset/syna,sl261x-reset.yaml new file +40 -0
new file mode 100644
index 000000000000..8cfec17df800
@@ -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 <[email protected]>
+
+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>;
+        };
+    };
include/dt-bindings/reset/syna,sl261x-reset.h new file +80 -0

80 lines not on this page · raw message

Signature · 1 line
2.53.0
#24 lore raw

Re: [PATCH 08/20] dt-bindings: reset: add Synaptics SL261X SoCs

Sashiko has reviewed this patch and found no issues. It looks great!
Quoted 3 lines

Add device tree bindings for the resets on Synaptics SL261X SoCs.

Sashiko has reviewed this patch and found no issues. It looks great!

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=8
#25 lore raw

Re: [PATCH 08/20] dt-bindings: reset: add Synaptics SL261X SoCs

In reply to Jisheng Zhang
Quoted 45 lines · Jisheng Zhang

Add device tree bindings for the resets on Synaptics SL261X SoCs.

---
 .../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
Documentation/devicetree/bindings/reset/syna,sl261x-reset.yaml new file +29 -0
new file mode 100644
index 000000000000..8cfec17df800
@@ -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 <[email protected]>
+
+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

Documentation/devicetree/bindings/reset/syna,sl261x-reset.yaml line 39

Quoted 10 lines
Documentation/devicetree/bindings/reset/syna,sl261x-reset.yaml new file +10 -0
+
+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?
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.

Quoted 90 lines
Documentation/devicetree/bindings/reset/syna,sl261x-reset.yaml new file +1 -0
+    };
include/dt-bindings/reset/syna,sl261x-reset.h new file +80 -0
new file mode 100644
index 000000000000..7034f58aae5b
@@ -0,0 +1,80 @@
+/* SPDX-License-Identifier: (GPL-2.0 OR MIT) */
+/*
+ * Copyright (C) 2026 Synaptics Incorporated
+ *
+ * Author: Jisheng Zhang <[email protected]>
+ */
+
+#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 */
Signature · 1 line
2.53.0
author maintainer
#26 lore raw

Re: [PATCH 08/20] dt-bindings: reset: add Synaptics SL261X SoCs

Quoted 50 lines · Conor Dooley
Quoted 49 lines · Jisheng Zhang

Add device tree bindings for the resets on Synaptics SL261X SoCs.

---
 .../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
Documentation/devicetree/bindings/reset/syna,sl261x-reset.yaml new file +33 -0
new file mode 100644
index 000000000000..8cfec17df800
@@ -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 <[email protected]>
+
+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 {
Quoted 8 lines

Documentation/devicetree/bindings/reset/syna,sl261x-reset.yaml line 39

Quoted 6 lines
Documentation/devicetree/bindings/reset/syna,sl261x-reset.yaml new file +6 -0
+        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? 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.

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.

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.

Kindly let me know if there's a better solution.

Quoted 94 lines

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.

Quoted 90 lines
Documentation/devicetree/bindings/reset/syna,sl261x-reset.yaml new file +1 -0
+    };
include/dt-bindings/reset/syna,sl261x-reset.h new file +80 -0
new file mode 100644
index 000000000000..7034f58aae5b
@@ -0,0 +1,80 @@
+/* SPDX-License-Identifier: (GPL-2.0 OR MIT) */
+/*
+ * Copyright (C) 2026 Synaptics Incorporated
+ *
+ * Author: Jisheng Zhang <[email protected]>
+ */
+
+#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 */
Signature · 1 line
2.53.0
#27 lore raw

Re: [PATCH 08/20] dt-bindings: reset: add Synaptics SL261X SoCs

Quoted 69 lines · Jisheng Zhang
Quoted 50 lines · Conor Dooley
Quoted 49 lines · Jisheng Zhang

Add device tree bindings for the resets on Synaptics SL261X SoCs.

---
 .../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
Documentation/devicetree/bindings/reset/syna,sl261x-reset.yaml new file +33 -0
new file mode 100644
index 000000000000..8cfec17df800
@@ -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 <[email protected]>
+
+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 {
Quoted 8 lines

Documentation/devicetree/bindings/reset/syna,sl261x-reset.yaml line 39

Quoted 6 lines
Documentation/devicetree/bindings/reset/syna,sl261x-reset.yaml new file +6 -0
+        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;

Quoted 8 lines

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.

Quoted 5 lines

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.

Quoted 5 lines

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.

Quoted 6 lines

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.

Quoted 99 lines

Kindly let me know if there's a better solution.

Quoted 94 lines

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.

Quoted 90 lines
Documentation/devicetree/bindings/reset/syna,sl261x-reset.yaml new file +1 -0
+    };
include/dt-bindings/reset/syna,sl261x-reset.h new file +80 -0
new file mode 100644
index 000000000000..7034f58aae5b
@@ -0,0 +1,80 @@
+/* SPDX-License-Identifier: (GPL-2.0 OR MIT) */
+/*
+ * Copyright (C) 2026 Synaptics Incorporated
+ *
+ * Author: Jisheng Zhang <[email protected]>
+ */
+
+#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 */
Signature · 1 line
2.53.0
author maintainer
#28 lore raw

Re: [PATCH 08/20] dt-bindings: reset: add Synaptics SL261X SoCs

Quoted 87 lines · Conor Dooley
Quoted 69 lines · Jisheng Zhang
Quoted 50 lines · Conor Dooley
Quoted 49 lines · Jisheng Zhang

Add device tree bindings for the resets on Synaptics SL261X SoCs.

---
 .../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
Documentation/devicetree/bindings/reset/syna,sl261x-reset.yaml new file +33 -0
new file mode 100644
index 000000000000..8cfec17df800
@@ -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 <[email protected]>
+
+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 {
Quoted 8 lines

Documentation/devicetree/bindings/reset/syna,sl261x-reset.yaml line 39

Quoted 6 lines
Documentation/devicetree/bindings/reset/syna,sl261x-reset.yaml new file +6 -0
+        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;

Quoted 8 lines

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>;
| };
Quoted 6 lines

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.

I see your points now. But there are two problems with this solution:

1. Besides reset, pinctrl and clk, the so called "Gbl" also contains registers for other purpose, e.g DPHYTX, when we need the driver for DPHYTX, I assume I could also go with the auxiliary bus or MFD_CELL_NAME(),

2. where should the driver(s) and dt-bindings doc be put? I assume drivers/soc/synaptics/ and Documentation/devicetree/bindings/soc/synaptics?

Kindly correct me if I misunderstood something.

Thanks

Quoted 145 lines
Quoted 6 lines

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.

Quoted 5 lines

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.

Quoted 6 lines

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.

Quoted 99 lines

Kindly let me know if there's a better solution.

Quoted 94 lines

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.

Quoted 90 lines
Documentation/devicetree/bindings/reset/syna,sl261x-reset.yaml new file +1 -0
+    };
include/dt-bindings/reset/syna,sl261x-reset.h new file +80 -0
new file mode 100644
index 000000000000..7034f58aae5b
@@ -0,0 +1,80 @@
+/* SPDX-License-Identifier: (GPL-2.0 OR MIT) */
+/*
+ * Copyright (C) 2026 Synaptics Incorporated
+ *
+ * Author: Jisheng Zhang <[email protected]>
+ */
+
+#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 */
Signature · 1 line
2.53.0
#29 lore raw

Re: [PATCH 08/20] dt-bindings: reset: add Synaptics SL261X SoCs

Quoted 95 lines · Jisheng Zhang
Quoted 87 lines · Conor Dooley
Quoted 69 lines · Jisheng Zhang
Quoted 50 lines · Conor Dooley
Quoted 49 lines · Jisheng Zhang

Add device tree bindings for the resets on Synaptics SL261X SoCs.

---
 .../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
Documentation/devicetree/bindings/reset/syna,sl261x-reset.yaml new file +33 -0
new file mode 100644
index 000000000000..8cfec17df800
@@ -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 <[email protected]>
+
+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 {
Quoted 8 lines

Documentation/devicetree/bindings/reset/syna,sl261x-reset.yaml line 39

Quoted 6 lines
Documentation/devicetree/bindings/reset/syna,sl261x-reset.yaml new file +6 -0
+        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;

Quoted 8 lines

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>;
| };
Quoted 6 lines

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.

Quoted 5 lines

I see your points now. But there are two problems with this solution:

1. Besides reset, pinctrl and clk, the so called "Gbl" also contains registers for other purpose, e.g DPHYTX, when we need the driver for DPHYTX, I assume I could also go with the auxiliary bus or MFD_CELL_NAME(),

Correct.

Quoted 4 lines

2. where should the driver(s) and dt-bindings doc be put? I assume drivers/soc/synaptics/ and Documentation/devicetree/bindings/soc/synaptics?

Personally, this is where I put them in the MFD_CELL_NAME() case. In the aux bus case, there's generally no "parent" driver that just probes children, so it'd go into clock or whatever the main purpose is.

Thanks,
Conor,.

Quoted 151 lines

Kindly correct me if I misunderstood something.

Thanks

Quoted 145 lines
Quoted 6 lines

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.

Quoted 5 lines

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.

Quoted 6 lines

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.

Quoted 99 lines

Kindly let me know if there's a better solution.

Quoted 94 lines

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.

Quoted 90 lines
Documentation/devicetree/bindings/reset/syna,sl261x-reset.yaml new file +1 -0
+    };
include/dt-bindings/reset/syna,sl261x-reset.h new file +80 -0
new file mode 100644
index 000000000000..7034f58aae5b
@@ -0,0 +1,80 @@
+/* SPDX-License-Identifier: (GPL-2.0 OR MIT) */
+/*
+ * Copyright (C) 2026 Synaptics Incorporated
+ *
+ * Author: Jisheng Zhang <[email protected]>
+ */
+
+#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 */
Signature · 1 line
2.53.0
author maintainer
#30 lore raw

PATCH 9/20 reset: add Synaptics SL261x reset support

In reply to Jisheng Zhang

Add support for reset controller in Synaptics SL261X SoCs.

---
 drivers/reset/Kconfig        |   6 +
 drivers/reset/Makefile       |   1 +
 drivers/reset/reset-sl261x.c | 224 +++++++++++++++++++++++++++++++++++
 3 files changed, 231 insertions(+)
 create mode 100644 drivers/reset/reset-sl261x.c
drivers/reset/Kconfig +6 -0
index 3168ab1eea88..0e8424ede7fa 100644
@@ -348,6 +348,12 @@ config RESET_SUNXI
 	help
 	  This enables the reset driver for Allwinner SoCs.
 
+config RESET_SL261X
+	tristate "Synaptics SL261X Reset Driver"
+	depends on ARCH_BERLIN || COMPILE_TEST
+	help
+	  This enables the reset controller driver for Synaptics SL261X SoCs.
+
 config RESET_TENSTORRENT_ATLANTIS
 	tristate "Tenstorrent atlantis reset driver"
 	depends on ARCH_TENSTORRENT || COMPILE_TEST
drivers/reset/Makefile +1 -0
index 45ad17062462..f3a46f2176db 100644
@@ -44,6 +44,7 @@ obj-$(CONFIG_RESET_SKY1_AUDSS) += reset-sky1-audss.o
 obj-$(CONFIG_RESET_SOCFPGA) += reset-socfpga.o
 obj-$(CONFIG_RESET_SUNPLUS) += reset-sunplus.o
 obj-$(CONFIG_RESET_SUNXI) += reset-sunxi.o
+obj-$(CONFIG_RESET_SL261X) += reset-sl261x.o
 obj-$(CONFIG_RESET_TENSTORRENT_ATLANTIS) += reset-tenstorrent-atlantis.o
 obj-$(CONFIG_RESET_TH1520) += reset-th1520.o
 obj-$(CONFIG_RESET_TI_SCI) += reset-ti-sci.o
drivers/reset/reset-sl261x.c new file +224 -0

224 lines not on this page · raw message

Signature · 1 line
2.53.0
#31 lore raw

Re: [PATCH 09/20] reset: add Synaptics SL261x reset support

Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider: - [Medium] reset: sl261x: potential NULL pointer dereference in probe - [Medium] reset: sl261x: unsafe…

Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [Medium] reset: sl261x: potential NULL pointer dereference in probe
- [Medium] reset: sl261x: unsafe read-modify-write on non-sticky pulse triggers
- [Low] reset: sl261x: typo 'sl261x2' in driver name and probe function
--

commit 78616d8a7b66b0ac665b311775dd566f2469412a
Author: Jisheng Zhang <[email protected]>

reset: add Synaptics SL261x reset support

This commit adds support for the reset controller in Synaptics SL261X SoCs.

Quoted 4 lines
drivers/reset/reset-sl261x.c new file +0 -0
new file mode 100644

[ ... ]

drivers/reset/reset-sl261x.c line 171

Quoted 13 lines
drivers/reset/reset-sl261x.c new file +13 -0
+static int sl261x_reset_reset(struct reset_controller_dev *rcdev,
+			      unsigned long id)
+{
+	struct sl261x_reset_priv *priv = to_sl261x_reset_priv(rcdev);
+	const struct sl261x_reset_cfg *cfg = &priv->cfgs[id];
+
+	if (cfg->sticky) {
+		regmap_clear_bits(priv->regmap, cfg->reg, cfg->bit);
+		usleep_range(10, 15);
+		return regmap_set_bits(priv->regmap, cfg->reg, cfg->bit);
+	}
+
+	return regmap_set_bits(priv->regmap, cfg->reg, cfg->bit);

[Severity: Medium]
Could this read-modify-write operation disrupt concurrent resets?

If the non-sticky hardware registers are active-high self-clearing pulse triggers that read as 1 while active, the regmap_set_bits() operation might read 1s for concurrently active resets and write them back, unintentionally extending or re-triggering them.

[ ... ]

drivers/reset/reset-sl261x.c line 180

Quoted 7 lines
drivers/reset/reset-sl261x.c new file +7 -0
+static const struct reset_control_ops sl261x_reset_ops = {
+	.reset	= sl261x_reset_reset,
+	.assert = sl261x_reset_assert,
+	.deassert = sl261x_reset_deassert,
+};
+
+static int sl261x2_reset_probe(struct platform_device *pdev)

[Severity: Low]
Is the "sl261x2" in the probe function name intentional? It looks like a typo.

Quoted 10 lines
drivers/reset/reset-sl261x.c new file +10 -0
+{
+	struct device_node *parent_np;
+	struct sl261x_reset_priv *priv;
+	const struct sl261x_reset_data *data = device_get_match_data(&pdev->dev);
+
+	priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
+	if (!priv)
+		return -ENOMEM;
+
+	parent_np = of_get_parent(pdev->dev.of_node);

drivers/reset/reset-sl261x.c line 200

Quoted 10 lines
drivers/reset/reset-sl261x.c new file +10 -0
+	priv->regmap = syscon_node_to_regmap(parent_np);
+	of_node_put(parent_np);
+	if (IS_ERR(priv->regmap))
+		return PTR_ERR(priv->regmap);
+
+	priv->rcdev.owner = THIS_MODULE;
+	priv->rcdev.ops = &sl261x_reset_ops;
+	priv->rcdev.of_node = pdev->dev.of_node;
+	priv->rcdev.of_reset_n_cells = 1;
+	priv->rcdev.nr_resets = data->num;

[Severity: Medium]
Can data be NULL here?

If the driver is bound via sysfs to a device that has a valid syscon parent but does not match the OF compatible strings, device_get_match_data() will return NULL. Unconditionally dereferencing data->num in this case would cause a NULL pointer dereference.

Quoted 6 lines
drivers/reset/reset-sl261x.c new file +6 -0
+	priv->cfgs = data->cfgs;
+
+	return devm_reset_controller_register(&pdev->dev, &priv->rcdev);
+}
+
+static const struct of_device_id sl261x_reset_dt_match[] = {

drivers/reset/reset-sl261x.c line 216

Quoted 10 lines
drivers/reset/reset-sl261x.c new file +10 -0
+	{ .compatible = "syna,sl261x-reset", .data = &sl261x_reset_data },
+	{ .compatible = "syna,sl261x-system-reset", .data = &sl261x_system_reset_data },
+	{ },
+};
+MODULE_DEVICE_TABLE(of, sl261x_reset_dt_match);
+
+static struct platform_driver sl261x_reset_driver = {
+	.probe	= sl261x2_reset_probe,
+	.driver	= {
+		.name = "sl261x2-reset",

[Severity: Low]
Does this driver name intentionally use "sl261x2-reset"? Exposing a confusing name to the platform bus and sysfs might break userspace scripts expecting a consistent "sl261x-reset" name.

Quoted 3 lines
drivers/reset/reset-sl261x.c new file +3 -0
+		.of_match_table = sl261x_reset_dt_match,
+	},
+};
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=9
author maintainer
#32 lore raw

PATCH 10/20 pinctrl: berlin: use u16 instead of u8 for the offset

In reply to Jisheng Zhang

The u8 may not be enough for newer Synaptics SoCs.

---
 drivers/pinctrl/berlin/berlin.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/berlin/berlin.h +1 -1
index 231aab61d415..7e7096842eda 100644
@@ -17,7 +17,7 @@ struct berlin_desc_function {
 
 struct berlin_desc_group {
 	const char			*name;
-	u8				offset;
+	u16				offset;
 	u8				bit_width;
 	u8				lsb;
 	struct berlin_desc_function	*functions;
Signature · 1 line
2.53.0
#33 lore raw

Re: [PATCH 10/20] pinctrl: berlin: use u16 instead of u8 for the offset

Sashiko has reviewed this patch and found no issues. It looks great!
Quoted 3 lines

The u8 may not be enough for newer Synaptics SoCs.

Sashiko has reviewed this patch and found no issues. It looks great!

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=10
author maintainer
#34 lore raw

PATCH 11/20 pinctrl: berlin: enable module build support

In reply to Jisheng Zhang

For Android GKI + vendor_dlkm deployments, where vendor-specific drivers must be kept separate from the GKI vmlinux and loaded as modules from the vendor partition, we need to enable module build support for berlin pinctrl drivers.

To acchive this goal:

1.Use devm_* APIs to alloc memory, so that we don't need to care free when unloading.

2.Export two symbols which will be used by SoC pinctrl drivers.

3.Add MODULE_LICENSE and MODULE_DESCRIPTION

---
 drivers/pinctrl/berlin/berlin.c | 27 ++++++++++++++-------------
 drivers/pinctrl/berlin/berlin.h | 15 +++++++++++++++
 2 files changed, 29 insertions(+), 13 deletions(-)
drivers/pinctrl/berlin/berlin.c +14 -13
index 7971339e269f..0c2179b98629 100644
@@ -215,7 +215,8 @@ static int berlin_pinctrl_build_state(struct platform_device *pdev)
 	}
 
 	/* we will reallocate later */
-	pctrl->functions = kzalloc_objs(*pctrl->functions, max_functions);
+	pctrl->functions = devm_kcalloc(&pdev->dev, max_functions,
+					sizeof(*pctrl->functions), GFP_KERNEL);
 	if (!pctrl->functions)
 		return -ENOMEM;
 
@@ -230,13 +231,11 @@ static int berlin_pinctrl_build_state(struct platform_device *pdev)
 		}
 	}
 
-	new_functions = krealloc(pctrl->functions,
-				    pctrl->nfunctions * sizeof(*pctrl->functions),
-				    GFP_KERNEL);
-	if (!new_functions) {
-		kfree(pctrl->functions);
+	new_functions = devm_krealloc(&pdev->dev, pctrl->functions,
+				      pctrl->nfunctions * sizeof(*pctrl->functions),
+				      GFP_KERNEL);
+	if (!new_functions)
 		return -ENOMEM;
-	}
 
 	pctrl->functions = new_functions;
 	/* map functions to theirs groups */
@@ -257,10 +256,8 @@ static int berlin_pinctrl_build_state(struct platform_device *pdev)
 				function++;
 			}
 
-			if (!found) {
-				kfree(pctrl->functions);
+			if (!found)
 				return -EINVAL;
-			}
 
 			if (!function->groups) {
 				function->groups =
@@ -268,10 +265,9 @@ static int berlin_pinctrl_build_state(struct platform_device *pdev)
 						     function->ngroups,
 						     sizeof(*function->groups),
 						     GFP_KERNEL);
-				if (!function->groups) {
-					kfree(pctrl->functions);
+
+				if (!function->groups)
 					return -ENOMEM;
-				}
 			}
 
 			groups = (const char **)function->groups;
@@ -327,6 +323,7 @@ int berlin_pinctrl_probe_regmap(struct platform_device *pdev,
 
 	return 0;
 }
+EXPORT_SYMBOL_GPL(berlin_pinctrl_probe_regmap);
 
 int berlin_pinctrl_probe(struct platform_device *pdev,
 			 const struct berlin_pinctrl_desc *desc)
@@ -341,3 +338,7 @@ int berlin_pinctrl_probe(struct platform_device *pdev,
 
 	return berlin_pinctrl_probe_regmap(pdev, desc, regmap);
 }
+EXPORT_SYMBOL_GPL(berlin_pinctrl_probe);
+
+MODULE_LICENSE("GPL v2");
+MODULE_DESCRIPTION("pinctrl library for Synaptics SoCs");
drivers/pinctrl/berlin/berlin.h +15 -0
index 7e7096842eda..8ff70d682593 100644
@@ -20,6 +20,8 @@ struct berlin_desc_group {
 	u16				offset;
 	u8				bit_width;
 	u8				lsb;
+	u16				conf_offset;
+	u8				conf_bits;
 	struct berlin_desc_function	*functions;
 };
 
@@ -28,6 +30,19 @@ struct berlin_pinctrl_desc {
 	unsigned			ngroups;
 };
 
+#define BERLIN_PINCTRLCONF_GROUP(_name, _offset, _width, _lsb,		\
+		_conf_offset, _conf_bits, ...)				\
+	{								\
+		.name = _name,						\
+		.offset = _offset,					\
+		.bit_width = _width,					\
+		.lsb = _lsb,						\
+		.conf_offset = _conf_offset,				\
+		.conf_bits = _conf_bits,				\
+		.functions = (struct berlin_desc_function[]){		\
+			__VA_ARGS__, { } },				\
+	}
+
 #define BERLIN_PINCTRL_GROUP(_name, _offset, _width, _lsb, ...)		\
 	{								\
 		.name = _name,						\
Signature · 1 line
2.53.0
#35 lore raw

Re: [PATCH 11/20] pinctrl: berlin: enable module build support

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [High] pinctrl: berlin: missing Kconfig/Makefile changes for module build --

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] pinctrl: berlin: missing Kconfig/Makefile changes for module build --

commit 90017c53ecb9e3f7c921f299ee20085471283f78
Author: Jisheng Zhang <[email protected]>

pinctrl: berlin: enable module build support

This commit updates the berlin pinctrl library to use devres allocation APIs, exports necessary symbols, and adds module metadata. This is intended to allow building the drivers as loadable modules for vendor_dlkm deployments.

Quoted 4 lines

For Android GKI + vendor_dlkm deployments, where vendor-specific drivers must be kept separate from the GKI vmlinux and loaded as modules from the vendor partition, we need to enable module build support for berlin pinctrl drivers.

[Severity: High]
Are Kconfig and Makefile updates also needed to fully enable module support?

The commit message states the goal is to enable module builds, but Kconfig and Makefile changes appear to be missing from the patch.

In drivers/pinctrl/berlin/Kconfig, PINCTRL_BERLIN is currently restricted to bool:

config PINCTRL_BERLIN
bool

In drivers/pinctrl/berlin/Makefile, berlin.o is unconditionally built-in:

obj-y += berlin.o

Without changing these to use a tristate and obj-$(CONFIG_PINCTRL_BERLIN), the object is compiled into a built-in archive during a module build. It is never linked into the loadable module, which causes undefined references to berlin_pinctrl_probe during driver loading.

Additionally, does builtin_platform_driver() in the SoC drivers prevent them from being built as modules?

For example, in drivers/pinctrl/berlin/berlin-bg2.c:

builtin_platform_driver(berlin2_pinctrl_driver);

Would this need to be updated to module_platform_driver() to allow existing SoC drivers to be built as loadable modules alongside the core library?

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=11
author maintainer
#36 lore raw

PATCH 12/20 pinctrl: berlin: add optional pinconf support

In reply to Jisheng Zhang

Add pinconf support for newer Synaptics SoCs.

---
 drivers/pinctrl/berlin/berlin.c | 232 +++++++++++++++++++++++++++++++-
 1 file changed, 228 insertions(+), 4 deletions(-)
drivers/pinctrl/berlin/berlin.c +228 -4
index 0c2179b98629..06c67f00c527 100644
@@ -13,6 +13,8 @@
 #include <linux/of.h>
 #include <linux/of_address.h>
 #include <linux/of_device.h>
+#include <linux/pinctrl/pinconf-generic.h>
+#include <linux/pinctrl/pinconf.h>
 #include <linux/pinctrl/pinctrl.h>
 #include <linux/pinctrl/pinmux.h>
 #include <linux/platform_device.h>
@@ -20,9 +22,24 @@
 #include <linux/slab.h>
 
 #include "../core.h"
+#include "../pinconf.h"
 #include "../pinctrl-utils.h"
 #include "berlin.h"
 
+#define PINCFG_DS_10BIT		GENMASK(3, 0)
+#define PINCFG_IE_10BIT		BIT(4)
+#define PINCFG_PE_10BIT		BIT(5)
+#define PINCFG_PS_10BIT		BIT(6)
+#define PINCFG_SL_10BIT		BIT(7)
+#define PINCFG_SPU_10BIT	BIT(8)
+#define PINCFG_ST_10BIT		BIT(9)
+#define PINCFG_DS_8BIT		GENMASK(2, 0)
+#define PINCFG_IE_8BIT		BIT(3)
+#define PINCFG_PD_8BIT		BIT(4)
+#define PINCFG_PU_8BIT		BIT(5)
+#define PINCFG_SL_8BIT		BIT(6)
+#define PINCFG_ST_8BIT		BIT(7)
+
 struct berlin_pinctrl {
 	struct regmap *regmap;
 	struct device *dev;
@@ -56,6 +73,8 @@ static int berlin_pinctrl_dt_node_to_map(struct pinctrl_dev *pctrl_dev,
 	struct property *prop;
 	const char *function_name, *group_name;
 	unsigned reserved_maps = 0;
+	unsigned long *configs = NULL;
+	unsigned int num_configs = 0;
 	int ret, ngroups;
 
 	*map = NULL;
@@ -75,11 +94,19 @@ static int berlin_pinctrl_dt_node_to_map(struct pinctrl_dev *pctrl_dev,
 		return -EINVAL;
 	}
 
+	ret = pinconf_generic_parse_dt_config(node, pctrl_dev, &configs,
+					      &num_configs);
+	if (ret < 0) {
+		dev_err(pctrl->dev, "%s: could not parse node property\n",
+			node->name);
+		return ret;
+	}
+
 	ret = pinctrl_utils_reserve_map(pctrl_dev, map, &reserved_maps,
-					num_maps, ngroups);
+					num_maps, ngroups * (num_configs + 1));
 	if (ret) {
 		dev_err(pctrl->dev, "can't reserve map: %d\n", ret);
-		return ret;
+		goto exit;
 	}
 
 	of_property_for_each_string(node, "groups", prop, group_name) {
@@ -88,11 +115,22 @@ static int berlin_pinctrl_dt_node_to_map(struct pinctrl_dev *pctrl_dev,
 						function_name);
 		if (ret) {
 			dev_err(pctrl->dev, "can't add map: %d\n", ret);
-			return ret;
+			goto exit;
+		}
+
+		if (num_configs) {
+			ret = pinctrl_utils_add_map_configs(pctrl_dev, map,
+					&reserved_maps, num_maps, group_name,
+					configs, num_configs,
+					PIN_MAP_TYPE_CONFIGS_GROUP);
+			if (ret < 0)
+				goto exit;
 		}
 	}
 
-	return 0;
+exit:
+	kfree(configs);
+	return ret;
 }
 
 static const struct pinctrl_ops berlin_pinctrl_ops = {
@@ -177,6 +215,191 @@ static const struct pinmux_ops berlin_pinmux_ops = {
 	.set_mux		= &berlin_pinmux_set,
 };
 
+static int berlin_pinconf_group_get(struct pinctrl_dev *pctrl_dev,
+				    unsigned int group, unsigned long *configs)
+{
+	enum pin_config_param param = pinconf_to_config_param(*configs);
+	struct berlin_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctrl_dev);
+	const struct berlin_desc_group *group_desc = pctrl->desc->groups + group;
+	bool enabled;
+	u32 val;
+	int ret;
+	u8 conf_bits = group_desc->conf_bits;
+
+	if (!conf_bits)
+		return -EOPNOTSUPP;
+
+	ret = regmap_read(pctrl->regmap, group_desc->conf_offset, &val);
+	if (ret)
+		return ret;
+
+	switch (param) {
+	case PIN_CONFIG_BIAS_DISABLE:
+		if (conf_bits == 10)
+			enabled = !(val & PINCFG_PE_10BIT);
+		else
+			enabled = !(val & (PINCFG_PD_8BIT | PINCFG_PU_8BIT));
+		val = 0;
+		break;
+	case PIN_CONFIG_BIAS_PULL_DOWN:
+		if (conf_bits == 10)
+			enabled = (val & (PINCFG_PE_10BIT | PINCFG_PS_10BIT)) == PINCFG_PE_10BIT;
+		else
+			enabled = val & PINCFG_PD_8BIT;
+		val = enabled ? 1 : 0;
+		break;
+	case PIN_CONFIG_BIAS_PULL_UP:
+		if (conf_bits == 10) {
+			if ((val & (PINCFG_PE_10BIT | PINCFG_PS_10BIT)) == (PINCFG_PE_10BIT | PINCFG_PS_10BIT)) {
+				enabled = true;
+				if (val & PINCFG_SPU_10BIT)
+					val = 2;
+				else
+					val = 1;
+			} else {
+				enabled = false;
+				val = 0;
+			}
+		} else {
+			enabled = val & PINCFG_PU_8BIT;
+			val = enabled ? 1 : 0;
+		}
+		break;
+	case PIN_CONFIG_DRIVE_STRENGTH:
+		enabled = true;
+		if (conf_bits == 10)
+			val = FIELD_GET(PINCFG_DS_10BIT, val);
+		else
+			val = FIELD_GET(PINCFG_DS_8BIT, val);
+		break;
+	case PIN_CONFIG_INPUT_ENABLE:
+		if (conf_bits == 10)
+			enabled = val & PINCFG_IE_10BIT;
+		else
+			enabled = val & PINCFG_IE_8BIT;
+		val = enabled ? 1 : 0;
+		break;
+	case PIN_CONFIG_INPUT_SCHMITT_ENABLE:
+		if (conf_bits == 10)
+			enabled = val & PINCFG_ST_10BIT;
+		else
+			enabled = val & PINCFG_ST_8BIT;
+		val = enabled ? 1 : 0;
+		break;
+	case PIN_CONFIG_SLEW_RATE:
+		if (conf_bits == 10)
+			enabled = val & PINCFG_SL_10BIT;
+		else
+			enabled = val & PINCFG_SL_8BIT;
+		val = enabled ? 1 : 0;
+		break;
+	default:
+		return -EOPNOTSUPP;
+	}
+
+	*configs = pinconf_to_config_packed(param, val);
+	return enabled ? 0 : -EINVAL;
+}
+
+static int berlin_pinconf_group_set(struct pinctrl_dev *pctrl_dev,
+				    unsigned int group, unsigned long *configs,
+				    unsigned int nconfigs)
+{
+	struct berlin_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctrl_dev);
+	const struct berlin_desc_group *group_desc = pctrl->desc->groups + group;
+	u8 conf_bits = group_desc->conf_bits;
+	u32 mask = 0, val = 0;
+	int i;
+
+	if (!conf_bits)
+		return -EOPNOTSUPP;
+
+	for (i = 0; i < nconfigs; i++) {
+		enum pin_config_param param =
+					pinconf_to_config_param(configs[i]);
+		u32 arg = pinconf_to_config_argument(configs[i]);
+
+		switch (param) {
+		case PIN_CONFIG_BIAS_DISABLE:
+			if (conf_bits == 10)
+				mask |= (PINCFG_PE_10BIT | PINCFG_PS_10BIT | PINCFG_SPU_10BIT);
+			else
+				mask |= (PINCFG_PU_8BIT | PINCFG_PD_8BIT);
+			break;
+		case PIN_CONFIG_BIAS_PULL_DOWN:
+			if (conf_bits == 10) {
+				mask |= (PINCFG_PE_10BIT | PINCFG_PS_10BIT | PINCFG_SPU_10BIT);
+				val |= PINCFG_PE_10BIT;
+			} else {
+				mask |= (PINCFG_PU_8BIT | PINCFG_PD_8BIT);
+				val |= PINCFG_PD_8BIT;
+			}
+			break;
+		case PIN_CONFIG_BIAS_PULL_UP:
+			if (conf_bits == 10) {
+				mask |= (PINCFG_PE_10BIT | PINCFG_PS_10BIT | PINCFG_SPU_10BIT);
+				val |= (PINCFG_PE_10BIT | PINCFG_PS_10BIT);
+				if (arg == 2)
+					val |= PINCFG_SPU_10BIT;
+			} else {
+				mask |= (PINCFG_PU_8BIT | PINCFG_PD_8BIT);
+				val |= PINCFG_PU_8BIT;
+			}
+			break;
+		case PIN_CONFIG_DRIVE_STRENGTH:
+			if (conf_bits == 10)
+				mask |= PINCFG_DS_10BIT;
+			else
+				mask |= PINCFG_DS_8BIT;
+			val |= arg;
+			break;
+		case PIN_CONFIG_INPUT_ENABLE:
+			if (conf_bits == 10) {
+				mask |= PINCFG_IE_10BIT;
+				if (arg)
+					val |= PINCFG_IE_10BIT;
+			} else {
+				mask |= PINCFG_IE_8BIT;
+				if (arg)
+					val |= PINCFG_IE_8BIT;
+			}
+			break;
+		case PIN_CONFIG_INPUT_SCHMITT_ENABLE:
+			if (conf_bits == 10) {
+				mask |= PINCFG_ST_10BIT;
+				if (arg)
+					val |= PINCFG_ST_10BIT;
+			} else {
+				mask |= PINCFG_ST_8BIT;
+				if (arg)
+					val |= PINCFG_ST_8BIT;
+			}
+			break;
+		case PIN_CONFIG_SLEW_RATE:
+			if (conf_bits == 10) {
+				mask |= PINCFG_SL_10BIT;
+				if (arg)
+					val |= PINCFG_SL_10BIT;
+			} else {
+				mask |= PINCFG_SL_8BIT;
+				if (arg)
+					val |= PINCFG_SL_8BIT;
+			}
+			break;
+		default:
+			return -EOPNOTSUPP;
+		}
+	}
+
+	return regmap_update_bits(pctrl->regmap, group_desc->conf_offset, mask, val);
+}
+
+static const struct pinconf_ops berlin_confops = {
+	.is_generic = true,
+	.pin_config_group_get = berlin_pinconf_group_get,
+	.pin_config_group_set = berlin_pinconf_group_set,
+};
+
 static int berlin_pinctrl_add_function(struct berlin_pinctrl *pctrl,
 				       const char *name)
 {
@@ -287,6 +510,7 @@ static const struct pinctrl_desc berlin_pctrl_desc = {
 	.name		= "berlin-pinctrl",
 	.pctlops	= &berlin_pinctrl_ops,
 	.pmxops		= &berlin_pinmux_ops,
+	.confops	= &berlin_confops,
 	.owner		= THIS_MODULE,
 };
 
Signature · 1 line
2.53.0
#37 lore raw

Re: [PATCH 12/20] pinctrl: berlin: add optional pinconf support

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider: - [High] pinctrl: Unmasked DRIVE_STRENGTH argument corrupts adjacent register bits - [Medium] pinctrl…

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] pinctrl: Unmasked DRIVE_STRENGTH argument corrupts adjacent register bits
- [Medium] pinctrl: memory over-allocation due to incorrect map reservation logic --

commit 9565e1451acca64670b365c5e1dcc3edb4643737
Author: Jisheng Zhang <[email protected]>

pinctrl: berlin: add optional pinconf support

Add pinconf support for newer Synaptics SoCs.

Quoted 4 lines
drivers/pinctrl/berlin/berlin.c +0 -0
index 0c2179b986295..06c67f00c5276 100644

[ ... ]

Quoted 5 lines
drivers/pinctrl/berlin/berlin.c +1 -0
@@ -75,11 +94,19 @@ static int berlin_pinctrl_dt_node_to_map(struct pinctrl_dev *pctrl_dev,
 		return -EINVAL;
 	}
 
+	ret = pinconf_generic_parse_dt_config(node, pctrl_dev, &configs,

drivers/pinctrl/berlin/berlin.c static int berlin_pinctrl_dt_node_to_map(struct pinctrl_dev *pctrl_dev, · line 106

Quoted 10 lines
drivers/pinctrl/berlin/berlin.c +8 -1
+					      &num_configs);
+	if (ret < 0) {
+		dev_err(pctrl->dev, "%s: could not parse node property\n",
+			node->name);
+		return ret;
+	}
+
 	ret = pinctrl_utils_reserve_map(pctrl_dev, map, &reserved_maps,
-					num_maps, ngroups);
+					num_maps, ngroups * (num_configs + 1));

[Severity: Medium]
Does this map reservation logic permanently over-allocate kernel memory for the lifetime of the parsed pin configuration?

The driver reserves map entries using ngroups * (num_configs + 1). However, pinctrl_utils_add_map_configs() aggregates the entire array of configurations into a single map entry. Thus, the driver adds at most 2 entries per group (one for the mux and one for the configs), regardless of num_configs.

When parsing pin configurations from the device tree where num_configs > 1, this results in (num_configs - 1) * ngroups unused array elements being allocated.

Quoted 5 lines
drivers/pinctrl/berlin/berlin.c +1 -1
 	if (ret) {
 		dev_err(pctrl->dev, "can't reserve map: %d\n", ret);
-		return ret;
+		goto exit;
 	}

[ ... ]

Quoted 4 lines
drivers/pinctrl/berlin/berlin.c +4 -0
+static int berlin_pinconf_group_set(struct pinctrl_dev *pctrl_dev,
+				    unsigned int group, unsigned long *configs,
+				    unsigned int nconfigs)
+{

[ ... ]

Quoted 1 line
drivers/pinctrl/berlin/berlin.c +1 -0
+		switch (param) {

[ ... ]

drivers/pinctrl/berlin/berlin.c static const struct pinmux_ops berlin_pinmux_ops = { · line 355

Quoted 7 lines
drivers/pinctrl/berlin/berlin.c +7 -0
+		case PIN_CONFIG_DRIVE_STRENGTH:
+			if (conf_bits == 10)
+				mask |= PINCFG_DS_10BIT;
+			else
+				mask |= PINCFG_DS_8BIT;
+			val |= arg;
+			break;

[Severity: High]
Can this regression cause the unbounded user-provided arg to overflow and corrupt adjacent register bits?

When the device tree specifies a drive-strength value that exceeds the unmasked bit width (e.g., > 15), the parsed arg is added directly to val via val |= arg without applying a bitmask.

Because val and mask are accumulated across all config parameters in a loop, the overflowing bits from DRIVE_STRENGTH will be written to the register if they overlap with the composite mask bits requested by other parameters (e.g., overriding the PINCFG_IE_10BIT state). This could lead to incorrect hardware pin states and functional failures on key interfaces during device probe.

Quoted 1 line
drivers/pinctrl/berlin/berlin.c +1 -0
+		case PIN_CONFIG_INPUT_ENABLE:

[ ... ]

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=12
#38 lore raw

Re: [PATCH 12/20] pinctrl: berlin: add optional pinconf support

In reply to Jisheng Zhang

Le 29/09/2026 à 08:14, Jisheng Zhang a écrit :

Quoted 221 lines

Add pinconf support for newer Synaptics SoCs.

---
  drivers/pinctrl/berlin/berlin.c | 232 +++++++++++++++++++++++++++++++-
  1 file changed, 228 insertions(+), 4 deletions(-)
drivers/pinctrl/berlin/berlin.c +158 -4
index 0c2179b98629..06c67f00c527 100644
@@ -13,6 +13,8 @@
  #include <linux/of.h>
  #include <linux/of_address.h>
  #include <linux/of_device.h>
+#include <linux/pinctrl/pinconf-generic.h>
+#include <linux/pinctrl/pinconf.h>
  #include <linux/pinctrl/pinctrl.h>
  #include <linux/pinctrl/pinmux.h>
  #include <linux/platform_device.h>
@@ -20,9 +22,24 @@
  #include <linux/slab.h>
 
  #include "../core.h"
+#include "../pinconf.h"
  #include "../pinctrl-utils.h"
  #include "berlin.h"
 
+#define PINCFG_DS_10BIT		GENMASK(3, 0)
+#define PINCFG_IE_10BIT		BIT(4)
+#define PINCFG_PE_10BIT		BIT(5)
+#define PINCFG_PS_10BIT		BIT(6)
+#define PINCFG_SL_10BIT		BIT(7)
+#define PINCFG_SPU_10BIT	BIT(8)
+#define PINCFG_ST_10BIT		BIT(9)
+#define PINCFG_DS_8BIT		GENMASK(2, 0)
+#define PINCFG_IE_8BIT		BIT(3)
+#define PINCFG_PD_8BIT		BIT(4)
+#define PINCFG_PU_8BIT		BIT(5)
+#define PINCFG_SL_8BIT		BIT(6)
+#define PINCFG_ST_8BIT		BIT(7)
+
  struct berlin_pinctrl {
  	struct regmap *regmap;
  	struct device *dev;
@@ -56,6 +73,8 @@ static int berlin_pinctrl_dt_node_to_map(struct pinctrl_dev *pctrl_dev,
  	struct property *prop;
  	const char *function_name, *group_name;
  	unsigned reserved_maps = 0;
+	unsigned long *configs = NULL;
+	unsigned int num_configs = 0;
  	int ret, ngroups;
 
  	*map = NULL;
@@ -75,11 +94,19 @@ static int berlin_pinctrl_dt_node_to_map(struct pinctrl_dev *pctrl_dev,
  		return -EINVAL;
  	}
 
+	ret = pinconf_generic_parse_dt_config(node, pctrl_dev, &configs,
+					      &num_configs);
+	if (ret < 0) {
+		dev_err(pctrl->dev, "%s: could not parse node property\n",
+			node->name);
+		return ret;
+	}
+
  	ret = pinctrl_utils_reserve_map(pctrl_dev, map, &reserved_maps,
-					num_maps, ngroups);
+					num_maps, ngroups * (num_configs + 1));
  	if (ret) {
  		dev_err(pctrl->dev, "can't reserve map: %d\n", ret);
-		return ret;
+		goto exit;
  	}
 
  	of_property_for_each_string(node, "groups", prop, group_name) {
@@ -88,11 +115,22 @@ static int berlin_pinctrl_dt_node_to_map(struct pinctrl_dev *pctrl_dev,
  						function_name);
  		if (ret) {
  			dev_err(pctrl->dev, "can't add map: %d\n", ret);
-			return ret;
+			goto exit;
+		}
+
+		if (num_configs) {
+			ret = pinctrl_utils_add_map_configs(pctrl_dev, map,
+					&reserved_maps, num_maps, group_name,
+					configs, num_configs,
+					PIN_MAP_TYPE_CONFIGS_GROUP);
+			if (ret < 0)
+				goto exit;
  		}
  	}
 
-	return 0;
+exit:
+	kfree(configs);
+	return ret;
  }
 
  static const struct pinctrl_ops berlin_pinctrl_ops = {
@@ -177,6 +215,191 @@ static const struct pinmux_ops berlin_pinmux_ops = {
  	.set_mux		= &berlin_pinmux_set,
  };
 
+static int berlin_pinconf_group_get(struct pinctrl_dev *pctrl_dev,
+				    unsigned int group, unsigned long *configs)
+{
+	enum pin_config_param param = pinconf_to_config_param(*configs);
+	struct berlin_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctrl_dev);
+	const struct berlin_desc_group *group_desc = pctrl->desc->groups + group;
+	bool enabled;
+	u32 val;
+	int ret;
+	u8 conf_bits = group_desc->conf_bits;
+
+	if (!conf_bits)
+		return -EOPNOTSUPP;
+
+	ret = regmap_read(pctrl->regmap, group_desc->conf_offset, &val);
+	if (ret)
+		return ret;
+
+	switch (param) {
+	case PIN_CONFIG_BIAS_DISABLE:
+		if (conf_bits == 10)
+			enabled = !(val & PINCFG_PE_10BIT);
+		else
+			enabled = !(val & (PINCFG_PD_8BIT | PINCFG_PU_8BIT));
+		val = 0;
+		break;
+	case PIN_CONFIG_BIAS_PULL_DOWN:
+		if (conf_bits == 10)
+			enabled = (val & (PINCFG_PE_10BIT | PINCFG_PS_10BIT)) == PINCFG_PE_10BIT;
+		else
+			enabled = val & PINCFG_PD_8BIT;
+		val = enabled ? 1 : 0;
+		break;
+	case PIN_CONFIG_BIAS_PULL_UP:
+		if (conf_bits == 10) {
+			if ((val & (PINCFG_PE_10BIT | PINCFG_PS_10BIT)) == (PINCFG_PE_10BIT | PINCFG_PS_10BIT)) {
+				enabled = true;
+				if (val & PINCFG_SPU_10BIT)
+					val = 2;
+				else
+					val = 1;
+			} else {
+				enabled = false;
+				val = 0;
+			}
+		} else {
+			enabled = val & PINCFG_PU_8BIT;
+			val = enabled ? 1 : 0;
+		}
+		break;
+	case PIN_CONFIG_DRIVE_STRENGTH:
+		enabled = true;
+		if (conf_bits == 10)
+			val = FIELD_GET(PINCFG_DS_10BIT, val);
+		else
+			val = FIELD_GET(PINCFG_DS_8BIT, val);
+		break;
+	case PIN_CONFIG_INPUT_ENABLE:
+		if (conf_bits == 10)
+			enabled = val & PINCFG_IE_10BIT;
+		else
+			enabled = val & PINCFG_IE_8BIT;
+		val = enabled ? 1 : 0;
+		break;
+	case PIN_CONFIG_INPUT_SCHMITT_ENABLE:
+		if (conf_bits == 10)
+			enabled = val & PINCFG_ST_10BIT;
+		else
+			enabled = val & PINCFG_ST_8BIT;
+		val = enabled ? 1 : 0;
+		break;
+	case PIN_CONFIG_SLEW_RATE:
+		if (conf_bits == 10)
+			enabled = val & PINCFG_SL_10BIT;
+		else
+			enabled = val & PINCFG_SL_8BIT;
+		val = enabled ? 1 : 0;
+		break;
+	default:
+		return -EOPNOTSUPP;
+	}
+
+	*configs = pinconf_to_config_packed(param, val);
+	return enabled ? 0 : -EINVAL;
+}
+
+static int berlin_pinconf_group_set(struct pinctrl_dev *pctrl_dev,
+				    unsigned int group, unsigned long *configs,
+				    unsigned int nconfigs)
+{
+	struct berlin_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctrl_dev);
+	const struct berlin_desc_group *group_desc = pctrl->desc->groups + group;
+	u8 conf_bits = group_desc->conf_bits;
+	u32 mask = 0, val = 0;
+	int i;
+
+	if (!conf_bits)
+		return -EOPNOTSUPP;
+
+	for (i = 0; i < nconfigs; i++) {
+		enum pin_config_param param =
+					pinconf_to_config_param(configs[i]);
+		u32 arg = pinconf_to_config_argument(configs[i]);
+
+		switch (param) {
+		case PIN_CONFIG_BIAS_DISABLE:
+			if (conf_bits == 10)
+				mask |= (PINCFG_PE_10BIT | PINCFG_PS_10BIT | PINCFG_SPU_10BIT);
+			else
+				mask |= (PINCFG_PU_8BIT | PINCFG_PD_8BIT);
+			break;
+		case PIN_CONFIG_BIAS_PULL_DOWN:
+			if (conf_bits == 10) {
+				mask |= (PINCFG_PE_10BIT | PINCFG_PS_10BIT | PINCFG_SPU_10BIT);
+				val |= PINCFG_PE_10BIT;
+			} else {

drivers/pinctrl/berlin/berlin.c static const struct pinmux_ops berlin_pinmux_ops = { · line 343

Quoted 10 lines
drivers/pinctrl/berlin/berlin.c +10 -0
+				mask |= (PINCFG_PU_8BIT | PINCFG_PD_8BIT);
+				val |= PINCFG_PD_8BIT;
+			}
+			break;
+		case PIN_CONFIG_BIAS_PULL_UP:
+			if (conf_bits == 10) {
+				mask |= (PINCFG_PE_10BIT | PINCFG_PS_10BIT | PINCFG_SPU_10BIT);
+				val |= (PINCFG_PE_10BIT | PINCFG_PS_10BIT);
+				if (arg == 2)
+					val |= PINCFG_SPU_10BIT;

The value 2 Ohms is hijacked to be used as strong pull up. The more I look at that, the more it feels hacky.

drivers/pinctrl/berlin/berlin.c static const struct pinmux_ops berlin_pinmux_ops = { · line 354

Quoted 11 lines
drivers/pinctrl/berlin/berlin.c +11 -0
+			} else {
+				mask |= (PINCFG_PU_8BIT | PINCFG_PD_8BIT);
+				val |= PINCFG_PU_8BIT;
+			}
+			break;
+		case PIN_CONFIG_DRIVE_STRENGTH:
+			if (conf_bits == 10)
+				mask |= PINCFG_DS_10BIT;
+			else
+				mask |= PINCFG_DS_8BIT;
+			val |= arg;

The drive strength is assumed to be lsb (which is the case), but maybe something like:

	if (arg > FIELD_MAX(mask))
		return -EINVAL;
	val |= FIELD_PREP(mask, arg);

would be more generic.

Quoted 52 lines
drivers/pinctrl/berlin/berlin.c +48 -0
+			break;
+		case PIN_CONFIG_INPUT_ENABLE:
+			if (conf_bits == 10) {
+				mask |= PINCFG_IE_10BIT;
+				if (arg)
+					val |= PINCFG_IE_10BIT;
+			} else {
+				mask |= PINCFG_IE_8BIT;
+				if (arg)
+					val |= PINCFG_IE_8BIT;
+			}
+			break;
+		case PIN_CONFIG_INPUT_SCHMITT_ENABLE:
+			if (conf_bits == 10) {
+				mask |= PINCFG_ST_10BIT;
+				if (arg)
+					val |= PINCFG_ST_10BIT;
+			} else {
+				mask |= PINCFG_ST_8BIT;
+				if (arg)
+					val |= PINCFG_ST_8BIT;
+			}
+			break;
+		case PIN_CONFIG_SLEW_RATE:
+			if (conf_bits == 10) {
+				mask |= PINCFG_SL_10BIT;
+				if (arg)
+					val |= PINCFG_SL_10BIT;
+			} else {
+				mask |= PINCFG_SL_8BIT;
+				if (arg)
+					val |= PINCFG_SL_8BIT;
+			}
+			break;
+		default:
+			return -EOPNOTSUPP;
+		}
+	}
+
+	return regmap_update_bits(pctrl->regmap, group_desc->conf_offset, mask, val);
+}
+
+static const struct pinconf_ops berlin_confops = {
+	.is_generic = true,
+	.pin_config_group_get = berlin_pinconf_group_get,
+	.pin_config_group_set = berlin_pinconf_group_set,
+};
+
  static int berlin_pinctrl_add_function(struct berlin_pinctrl *pctrl,
  				       const char *name)
  {

drivers/pinctrl/berlin/berlin.c static const struct pinctrl_desc berlin_pctrl_desc = { · line 516

Quoted 7 lines
drivers/pinctrl/berlin/berlin.c +1 -0
@@ -287,6 +510,7 @@ static const struct pinctrl_desc berlin_pctrl_desc = {
  	.name		= "berlin-pinctrl",
  	.pctlops	= &berlin_pinctrl_ops,
  	.pmxops		= &berlin_pinmux_ops,
+	.confops	= &berlin_confops,
  	.owner		= THIS_MODULE,
  };
 

Regards,
Richard

author maintainer
#39 lore raw

PATCH 13/20 dt-bindings: pinctrl: berlin: Support Synaptics SL261X SoCs

In reply to Jisheng Zhang

Document the dt-bindings for pinctrl in Synaptics SL261X SoCs.

---
 .../bindings/pinctrl/marvell,berlin2-soc-pinctrl.yaml  | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/pinctrl/marvell,berlin2-soc-pinctrl.yaml +8 -2
index 6ace3bf5433b..fb60a310a24e 100644
@@ -37,6 +37,8 @@ properties:
           - marvell,berlin4ct-soc-pinctrl
           - marvell,berlin4ct-system-pinctrl
           - syna,as370-soc-pinctrl
+          - syna,sl261x-soc-pinctrl
+          - syna,sl261x-system-pinctrl
 
   reg:
     maxItems: 1
@@ -44,8 +46,10 @@ properties:
 additionalProperties:
   description: Pin group configuration subnodes.
   type: object
-  $ref: /schemas/pinctrl/pinmux-node.yaml#
-  additionalProperties: false
+
+  allOf:
+    - $ref: /schemas/pinctrl/pinmux-node.yaml#
+    - $ref: /schemas/pinctrl/pincfg-node.yaml#
 
   properties:
     groups:
@@ -60,6 +64,8 @@ additionalProperties:
     - groups
     - function
 
+  unevaluatedProperties: false
+
 allOf:
   - if:
       properties:
Signature · 1 line
2.53.0
#40 lore raw

Re: [PATCH 13/20] dt-bindings: pinctrl: berlin: Support Synaptics SL261X SoCs

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Medium] dt-bindings: pinctrl: undocumented schema relaxation for all SoCs --

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] dt-bindings: pinctrl: undocumented schema relaxation for all SoCs --

commit 85b4def57a8a9be19cfbb07ca389098832f3670a
Author: Jisheng Zhang <[email protected]>
dt-bindings: pinctrl: berlin: Support Synaptics SL261X SoCs

This commit adds device tree binding support for the Synaptics SL261X SoCs to the Marvell Berlin2 pinctrl schema. It also modifies the subnode schema references to include generic pin configurations.

Quoted 4 lines
Documentation/devicetree/bindings/pinctrl/marvell,berlin2-soc-pinctrl.yaml +0 -0
index 6ace3bf5433bd..fb60a310a24e6 100644

[ ... ]

Documentation/devicetree/bindings/pinctrl/marvell,berlin2-soc-pinctrl.yaml properties: · line 52

Quoted 10 lines
Documentation/devicetree/bindings/pinctrl/marvell,berlin2-soc-pinctrl.yaml +4 -2
@@ -44,8 +46,10 @@ properties:
 additionalProperties:
   description: Pin group configuration subnodes.
   type: object
-  $ref: /schemas/pinctrl/pinmux-node.yaml#
-  additionalProperties: false
+
+  allOf:
+    - $ref: /schemas/pinctrl/pinmux-node.yaml#
+    - $ref: /schemas/pinctrl/pincfg-node.yaml#

[Severity: Medium]
Does this change unintentionally relax the schema for all older SoCs?

By universally adding the reference to pincfg-node.yaml here, generic pinconf properties (like drive-strength or bias-pull-up) in pin configuration subnodes will now silently pass validation for all existing SoCs (such as marvell,berlin2-soc-pinctrl). These were previously explicitly rejected by the removed additionalProperties: false declaration.

Since the commit message strictly states it only aims to support Synaptics SL261X SoCs, should this schema relaxation be restricted to just the newly added variants?

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=13
#41 lore raw

Re: [PATCH 13/20] dt-bindings: pinctrl: berlin: Support Synaptics SL261X SoCs

In reply to Jisheng Zhang

Le 29/09/2026 à 08:14, Jisheng Zhang a écrit :

Quoted 21 lines

Document the dt-bindings for pinctrl in Synaptics SL261X SoCs.

---
  .../bindings/pinctrl/marvell,berlin2-soc-pinctrl.yaml  | 10 ++++++++--
  1 file changed, 8 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/pinctrl/marvell,berlin2-soc-pinctrl.yaml +2 -0
index 6ace3bf5433b..fb60a310a24e 100644
@@ -37,6 +37,8 @@ properties:
            - marvell,berlin4ct-soc-pinctrl
            - marvell,berlin4ct-system-pinctrl
            - syna,as370-soc-pinctrl
+          - syna,sl261x-soc-pinctrl
+          - syna,sl261x-system-pinctrl
 
    reg:
      maxItems: 1

Documentation/devicetree/bindings/pinctrl/marvell,berlin2-soc-pinctrl.yaml properties: · line 52

Quoted 9 lines
Documentation/devicetree/bindings/pinctrl/marvell,berlin2-soc-pinctrl.yaml +4 -2
@@ -44,8 +46,10 @@ properties:
  additionalProperties:
    description: Pin group configuration subnodes.
    type: object
-  $ref: /schemas/pinctrl/pinmux-node.yaml#
-  additionalProperties: false
+
+  allOf:
+    - $ref: /schemas/pinctrl/pinmux-node.yaml#
+    - $ref: /schemas/pinctrl/pincfg-node.yaml#

The special value bias-pull-up=2 is handled has a strong pull-up in the code, maybe that's something that needs a documentation in the binding (or the strong pull up value is really 2 Ohms, and in this case, everything is ok)

Documentation/devicetree/bindings/pinctrl/marvell,berlin2-soc-pinctrl.yaml additionalProperties: · line 71

Quoted 12 lines
Documentation/devicetree/bindings/pinctrl/marvell,berlin2-soc-pinctrl.yaml +2 -0
    properties:
      groups:
@@ -60,6 +64,8 @@ additionalProperties:
      - groups
      - function
 
+  unevaluatedProperties: false
+
  allOf:
    - if:
        properties:

Regards,
Richard

author maintainer
#42 lore raw

PATCH 14/20 pinctrl: berlin: support Synaptics SL261X SoCs

In reply to Jisheng Zhang

Add driver for the pinctrl in Synaptics SL261X SoCs.

---
 drivers/pinctrl/berlin/Kconfig          |   7 +
 drivers/pinctrl/berlin/Makefile         |   1 +
 drivers/pinctrl/berlin/pinctrl-sl261x.c | 745 ++++++++++++++++++++++++
 3 files changed, 753 insertions(+)
 create mode 100644 drivers/pinctrl/berlin/pinctrl-sl261x.c
drivers/pinctrl/berlin/Kconfig +7 -0
index 9b1644d1d4ea..40e4b6546d0c 100644
@@ -31,4 +31,11 @@ config PINCTRL_BERLIN_BG4CT
 	depends on OF
 	select PINCTRL_BERLIN
 
+config PINCTRL_SL261X
+	tristate "Synaptics SL261X pin controller driver"
+	depends on OF
+	select GENERIC_PINCONF
+	select PINCONF
+	select PINCTRL_BERLIN
+
 endif
drivers/pinctrl/berlin/Makefile +1 -0
index 7b4aa5444a4a..21031f0297af 100644
@@ -5,3 +5,4 @@ obj-$(CONFIG_PINCTRL_BERLIN_BG2CD)	+= berlin-bg2cd.o
 obj-$(CONFIG_PINCTRL_BERLIN_BG2Q)	+= berlin-bg2q.o
 obj-$(CONFIG_PINCTRL_BERLIN_BG4CT)	+= berlin-bg4ct.o
 obj-$(CONFIG_PINCTRL_AS370)		+= pinctrl-as370.o
+obj-$(CONFIG_PINCTRL_SL261X)		+= pinctrl-sl261x.o
drivers/pinctrl/berlin/pinctrl-sl261x.c new file +745 -0

745 lines not on this page · raw message

Signature · 1 line
2.53.0
#43 lore raw

Re: [PATCH 14/20] pinctrl: berlin: support Synaptics SL261X SoCs

Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider: - [High] pinctrl: sl261x: incorrect multiplexer register base offset for SM_GPIO20 - [High] pinctrl…

Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [High] pinctrl: sl261x: incorrect multiplexer register base offset for SM_GPIO20
- [High] pinctrl: sl261x: incorrect configuration register offset for GPIO54
- [Low] pinctrl: sl261x: mismatched comments for uart1 pin functions
--

commit fd69572f1bec3df913befb121d2d8d563a04f10c
Author: Jisheng Zhang <[email protected]>

pinctrl: berlin: support Synaptics SL261X SoCs

This commit adds a new pinctrl driver for the Synaptics SL261X SoCs. It defines the pin configuration groups, register offsets, and multiplexer functions for both the main SoC and the system manager pin controller blocks.

Quoted 4 lines
drivers/pinctrl/berlin/pinctrl-sl261x.c new file +0 -0
new file mode 100644

[ ... ]

drivers/pinctrl/berlin/pinctrl-sl261x.c line 247

Quoted 8 lines
drivers/pinctrl/berlin/pinctrl-sl261x.c new file +8 -0
+	BERLIN_PINCTRLCONF_GROUP("GPIO53", 0x800c, 0x3, 0x00,
+			0x8878, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* GPIO53 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "rgmii2"), /* RD1 */
+			BERLIN_PINCTRL_FUNCTION(0x6, "spi4"), /* SS3n */
+			BERLIN_PINCTRL_FUNCTION(0x7, "spi3")), /* SCLK */
+	BERLIN_PINCTRLCONF_GROUP("GPIO54", 0x800c, 0x3, 0x03,
+			0x87c, 10,

[Severity: High]
Is the configuration register offset for GPIO54 correct here?

The surrounding GPIO configurations in sl261x_soc_pinctrl_groups use a 0x8800 base (for example, GPIO53 uses 0x8878 and GPIO55 uses 0x8880). Does this code incorrectly hardcode 0x87c instead of 0x887c, potentially causing writes to the wrong hardware address when configuring pins?

[ ... ]

drivers/pinctrl/berlin/pinctrl-sl261x.c line 608

Quoted 6 lines
drivers/pinctrl/berlin/pinctrl-sl261x.c new file +6 -0
+	BERLIN_PINCTRLCONF_GROUP("SM_GPIO21", 0xb08, 0x3, 0x0c,
+			0xc68, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* SM GPIO21 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "xspi")), /* SM XSPI DATA2 */
+	BERLIN_PINCTRLCONF_GROUP("SM_GPIO20", 0x8, 0x3, 0x0f,
+			0xc6c, 10,

[Severity: High]
Does this code use the wrong multiplexer register base offset for SM_GPIO20?

Surrounding SM_GPIO groups in sl261x_sysmgr_pinctrl_groups (like SM_GPIO21 and SM_GPIO19) correctly use 0xb08. Using 0x8 here could cause the driver to write to the wrong hardware address when applying pinmux states.

[ ... ]

drivers/pinctrl/berlin/pinctrl-sl261x.c line 670

Quoted 7 lines
drivers/pinctrl/berlin/pinctrl-sl261x.c new file +7 -0
+	BERLIN_PINCTRLCONF_GROUP("SM_GPIO8", 0xb0c, 0x3, 0x0c,
+			0xc90, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* SM GPIO8 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "uart0"), /* SM UART0 TXD */
+			BERLIN_PINCTRL_FUNCTION(0x2, "can0"), /* SM CAN0 TX */
+			BERLIN_PINCTRL_FUNCTION(0x3, "sm_clkout"),
+			BERLIN_PINCTRL_FUNCTION(0x6, "uart1")), /* SM UART0 TXD */

[Severity: Low]
This isn't a bug, but the trailing comment for uart1 incorrectly documents the pin functionality as SM UART0 TXD. Should this be SM UART1 TXD?

drivers/pinctrl/berlin/pinctrl-sl261x.c line 679

Quoted 9 lines
drivers/pinctrl/berlin/pinctrl-sl261x.c new file +9 -0
+	BERLIN_PINCTRLCONF_GROUP("SM_GPIO7", 0xb0c, 0x3, 0x0f,
+			0xc94, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* SM GPIO7 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "uart0"), /* SM UART0 RXD */
+			BERLIN_PINCTRL_FUNCTION(0x2, "can0"), /* SM CAN0 RX */
+			BERLIN_PINCTRL_FUNCTION(0x3, "key_row6"),
+			BERLIN_PINCTRL_FUNCTION(0x4, "gpio_trig"), /* TRIG2 */
+			BERLIN_PINCTRL_FUNCTION(0x5, "pwm"), /* SM PWM9 */
+			BERLIN_PINCTRL_FUNCTION(0x6, "uart1")), /* SM UART0 RXD */

[Severity: Low]
This isn't a bug, but there appears to be a similar copy-paste error here. Should this trailing comment be labeled as SM UART1 RXD?

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=14
#44 lore raw

Re: [PATCH 14/20] pinctrl: berlin: support Synaptics SL261X SoCs

In reply to Jisheng Zhang

Hello,

Quoted 1 line · Jisheng Zhang

+#include <linux/mod_devicetable.h>

Please rely on <linux/platform_device.h> to pull in the definition of of_device_id and drop the inclusion of <linux/mod_devicetable.h>.

Including <linux/mod_devicetable.h> creates a bunch of unneeded dependencies on subsystems you will never need in this driver.

drivers/pinctrl/berlin/pinctrl-sl261x.c line 725

Quoted 11 lines

[...]

drivers/pinctrl/berlin/pinctrl-sl261x.c new file +10 -0
+static const struct of_device_id sl261x_pinctrl_match[] = {
+	{
+		.compatible = "syna,sl261x-soc-pinctrl",
+		.data = &sl261x_soc_pinctrl_data,
+	},
+	{
+		.compatible = "syna,sl261x-system-pinctrl",
+		.data = &sl261x_sysmgr_pinctrl_data,
+	},
+	{}

Please use { } (with a space) to match the most common style for these arrays.

drivers/pinctrl/berlin/pinctrl-sl261x.c line 735

Quoted 10 lines
drivers/pinctrl/berlin/pinctrl-sl261x.c new file +10 -0
+};
+MODULE_DEVICE_TABLE(of, sl261x_pinctrl_match);
+
+static int sl261x_pinctrl_probe(struct platform_device *pdev)
+{
+	return berlin_pinctrl_probe(pdev, device_get_match_data(&pdev->dev));
+}
+
+static struct platform_driver sl261x_pinctrl_driver = {
+	.probe	= sl261x_pinctrl_probe,

Not a fan on aligning the =, still more if it's done inconsistently in a single struct. If you ask me, just use a single space before the =.

drivers/pinctrl/berlin/pinctrl-sl261x.c line 741

Quoted 6 lines
drivers/pinctrl/berlin/pinctrl-sl261x.c new file +6 -0
+	.driver	= {
+		.name = "sl261x-pinctrl",
+		.of_match_table = sl261x_pinctrl_match,
+	},
+};
+module_platform_driver(sl261x_pinctrl_driver);

Best regards
Uwe

author maintainer
#45 lore raw

PATCH 15/20 dt-bindings: clock: add Synaptics SL261X clock

In reply to Jisheng Zhang

Add support for clocks, plls in Synaptics SL261X SoCs.

---
 .../bindings/clock/syna,sl261x-clk.yaml       |  92 ++++++++++++
 include/dt-bindings/clock/syna,sl261x.h       | 131 ++++++++++++++++++
 2 files changed, 223 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/syna,sl261x-clk.yaml
 create mode 100644 include/dt-bindings/clock/syna,sl261x.h
Documentation/devicetree/bindings/clock/syna,sl261x-clk.yaml new file +92 -0
new file mode 100755
index 000000000000..3fd380c1dd39
@@ -0,0 +1,92 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/syna,sl261x-clk.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Synaptics SL261x clock controllers
+
+maintainers:
+  - Jisheng Zhang <[email protected]>
+
+description: |
+  The SL261x clock hardware is divided into SoC, CPU, AIO, and system
+  manager register blocks. Each clock controller is a child of the node
+  containing its register range. The CPU clock node has a phandle to the
+  global chip control syscon.
+
+properties:
+  compatible:
+    oneOf:
+      - enum:
+          - syna,sl261x-soc-clk
+          - syna,sl261x-cpu-clk
+          - syna,sl261x-aio-clk
+          - syna,sl261x-system-clk
+      - items:
+          - const: simple-mfd
+          - const: syscon
+
+  reg:
+    maxItems: 1
+
+  syna,gbl-syscon:
+    $ref: /schemas/types.yaml#/definitions/phandle
+    description: Phandle to the SL261x global chip control syscon.
+
+  '#clock-cells':
+    const: 1
+
+  clocks:
+    maxItems: 1
+    description: Reference clock used as the input to the PLLs.
+
+required:
+  - compatible
+
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: syna,sl261x-cpu-clk
+    then:
+      required:
+        - syna,gbl-syscon
+    else:
+      properties:
+        syna,gbl-syscon: false
+
+additionalProperties: false
+
+examples:
+  - |
+    osc: clock-osc {
+        compatible = "fixed-clock";
+        #clock-cells = <0>;
+        clock-frequency = <25000000>;
+    };
+
+    chip: syscon@f7e10000 {
+        compatible = "syscon", "simple-mfd";
+        reg = <0xf7e10000 0x10000>;
+
+        clk: clock {
+            compatible = "syna,sl261x-soc-clk";
+            #clock-cells = <1>;
+            clocks = <&osc>;
+        };
+    };
+
+    cpu_wrap: cpu-wrap@f7e30000 {
+        compatible = "syscon", "simple-mfd";
+        reg = <0xf7e30000 0x4000>;
+
+        cpuclk: clock {
+            compatible = "syna,sl261x-cpu-clk";
+            #clock-cells = <1>;
+            clocks = <&osc>;
+            syna,gbl-syscon = <&chip>;
+        };
+    };
+...
include/dt-bindings/clock/syna,sl261x.h new file +131 -0

131 lines not on this page · raw message

Signature · 1 line
2.53.0
#46 lore raw

Re: [PATCH 15/20] dt-bindings: clock: add Synaptics SL261X clock

Thank you for your contribution! Sashiko AI review found 4 potential issue(s) to consider: - [Medium] dt-bindings: clock: schema erroneously matches generic syscon globally - [Medium] dt-bindings…

Thank you for your contribution! Sashiko AI review found 4 potential issue(s) to consider:
- [Medium] dt-bindings: clock: schema erroneously matches generic syscon globally
- [Medium] dt-bindings: clock: missing clock-cells in required properties
- [Medium] dt-bindings: clock: missing clock IDs for AIO clock controller
- [Low] dt-bindings: clock: missing include guard in header file
--

commit e7f8a3b9148879b63e354fd7d1d51ae0ec2df9d0
Author: Jisheng Zhang <[email protected]>

dt-bindings: clock: add Synaptics SL261X clock

Add support for clocks, plls in Synaptics SL261X SoCs.

Quoted 6 lines
Documentation/devicetree/bindings/clock/syna,sl261x-clk.yaml new file +0 -0
new file mode 100755
index 0000000000000..3fd380c1dd39d
@@ -0,0 +1,92 @@

[ ... ]

Documentation/devicetree/bindings/clock/syna,sl261x-clk.yaml line 28

Quoted 11 lines
Documentation/devicetree/bindings/clock/syna,sl261x-clk.yaml new file +11 -0
+properties:
+  compatible:
+    oneOf:
+      - enum:
+          - syna,sl261x-soc-clk
+          - syna,sl261x-cpu-clk
+          - syna,sl261x-aio-clk
+          - syna,sl261x-system-clk
+      - items:
+          - const: simple-mfd
+          - const: syscon

[Severity: Medium]
Will defining these generic strings as valid matches cause the schema toolchain to improperly select and apply this highly restrictive clock schema to all syscon nodes system-wide?

Quoted 3 lines
Documentation/devicetree/bindings/clock/syna,sl261x-clk.yaml new file +3 -0
+
+  reg:
+    maxItems: 1

[ ... ]

Documentation/devicetree/bindings/clock/syna,sl261x-clk.yaml line 45

Quoted 9 lines
Documentation/devicetree/bindings/clock/syna,sl261x-clk.yaml new file +9 -0
+  '#clock-cells':
+    const: 1
+
+  clocks:
+    maxItems: 1
+    description: Reference clock used as the input to the PLLs.
+
+required:
+  - compatible

[Severity: Medium]
Should '#clock-cells' be explicitly included in this required list to enforce that these nodes act as valid clock providers?

Quoted 2 lines
Documentation/devicetree/bindings/clock/syna,sl261x-clk.yaml new file +2 -0
+
+allOf:

[ ... ]

Documentation/devicetree/bindings/clock/syna,sl261x-clk.yaml line 60

Quoted 5 lines
Documentation/devicetree/bindings/clock/syna,sl261x-clk.yaml new file +5 -0
+    else:
+      properties:
+        syna,gbl-syscon: false
+
+additionalProperties: false

[Severity: Medium]
When applied to a generic simple-mfd or syscon node system-wide, will this strict constraint incorrectly reject valid properties and child nodes?

[ ... ]

Quoted 6 lines
include/dt-bindings/clock/syna,sl261x.h new file +0 -0
new file mode 100644
index 0000000000000..4649b233f08a5

include/dt-bindings/clock/syna,sl261x.h line 8

Quoted 8 lines
include/dt-bindings/clock/syna,sl261x.h new file +8 -0
@@ -0,0 +1,131 @@
+/* SPDX-License-Identifier: (GPL-2.0 OR MIT) */
+/*
+ * Synaptics SL261X clock tree IDs
+ *
+ * Copyright (C) 2025 Synaptics Incorporated
+ *
+ * Author: Jisheng Zhang <[email protected]>
+ */

[Severity: Low]
Does this file need a standard include guard (e.g.,
#ifndef _DT_BINDINGS_CLOCK_SYNA_SL261X_H) to prevent macro redefinition warnings and compilation errors if included multiple times?

include/dt-bindings/clock/syna,sl261x.h line 13

Quoted 5 lines
include/dt-bindings/clock/syna,sl261x.h new file +5 -0
+
+/* SoC domain */
+
+/* GBL common clks */
+#define CLK_CPUFASTREF		0

[Severity: Medium]
The header explicitly maps domains like SoC, CPU, and sysmgr, but lacks a macro section defining IDs for the AIO clock controller.

Since the schema declares the AIO clock controller (compatible = "syna,sl261x-aio-clk") and requires '#clock-cells = <1>', device tree authors need valid IDs to consume its clocks.

Are there missing clock IDs for the AIO clock controller?

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=15
#47 lore raw

Re: [PATCH 15/20] dt-bindings: clock: add Synaptics SL261X clock

In reply to Jisheng Zhang
Quoted 34 lines · Jisheng Zhang

Add support for clocks, plls in Synaptics SL261X SoCs.

---
 .../bindings/clock/syna,sl261x-clk.yaml       |  92 ++++++++++++
 include/dt-bindings/clock/syna,sl261x.h       | 131 ++++++++++++++++++
 2 files changed, 223 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/syna,sl261x-clk.yaml
 create mode 100644 include/dt-bindings/clock/syna,sl261x.h
Documentation/devicetree/bindings/clock/syna,sl261x-clk.yaml new file +18 -0
new file mode 100755
index 000000000000..3fd380c1dd39
@@ -0,0 +1,92 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/syna,sl261x-clk.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Synaptics SL261x clock controllers
+
+maintainers:
+  - Jisheng Zhang <[email protected]>
+
+description: |
+  The SL261x clock hardware is divided into SoC, CPU, AIO, and system
+  manager register blocks. Each clock controller is a child of the node
+  containing its register range. The CPU clock node has a phandle to the
+  global chip control syscon.
+
+properties:

Documentation/devicetree/bindings/clock/syna,sl261x-clk.yaml line 28

Quoted 10 lines
Documentation/devicetree/bindings/clock/syna,sl261x-clk.yaml new file +10 -0
+  compatible:
+    oneOf:
+      - enum:
+          - syna,sl261x-soc-clk
+          - syna,sl261x-cpu-clk
+          - syna,sl261x-aio-clk
+          - syna,sl261x-system-clk
+      - items:
+          - const: simple-mfd
+          - const: syscon

What's going on here? You're entirely missing specific compatibles for your syscon nodes (which aren't clock controllers and shouldn't be defined here.
Similarly to the reset stuff, why can't these just be parts of their parent nodes?

Thanks,
Conor.

Quoted 204 lines
Documentation/devicetree/bindings/clock/syna,sl261x-clk.yaml new file +64 -0
+
+  reg:
+    maxItems: 1
+
+  syna,gbl-syscon:
+    $ref: /schemas/types.yaml#/definitions/phandle
+    description: Phandle to the SL261x global chip control syscon.
+
+  '#clock-cells':
+    const: 1
+
+  clocks:
+    maxItems: 1
+    description: Reference clock used as the input to the PLLs.
+
+required:
+  - compatible
+
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: syna,sl261x-cpu-clk
+    then:
+      required:
+        - syna,gbl-syscon
+    else:
+      properties:
+        syna,gbl-syscon: false
+
+additionalProperties: false
+
+examples:
+  - |
+    osc: clock-osc {
+        compatible = "fixed-clock";
+        #clock-cells = <0>;
+        clock-frequency = <25000000>;
+    };
+
+    chip: syscon@f7e10000 {
+        compatible = "syscon", "simple-mfd";
+        reg = <0xf7e10000 0x10000>;
+
+        clk: clock {
+            compatible = "syna,sl261x-soc-clk";
+            #clock-cells = <1>;
+            clocks = <&osc>;
+        };
+    };
+
+    cpu_wrap: cpu-wrap@f7e30000 {
+        compatible = "syscon", "simple-mfd";
+        reg = <0xf7e30000 0x4000>;
+
+        cpuclk: clock {
+            compatible = "syna,sl261x-cpu-clk";
+            #clock-cells = <1>;
+            clocks = <&osc>;
+            syna,gbl-syscon = <&chip>;
+        };
+    };
+...
include/dt-bindings/clock/syna,sl261x.h new file +131 -0
new file mode 100644
index 000000000000..4649b233f08a
@@ -0,0 +1,131 @@
+/* SPDX-License-Identifier: (GPL-2.0 OR MIT) */
+/*
+ * Synaptics SL261X clock tree IDs
+ *
+ * Copyright (C) 2025 Synaptics Incorporated
+ *
+ * Author: Jisheng Zhang <[email protected]>
+ */
+
+/* SoC domain */
+
+/* GBL common clks */
+#define CLK_CPUFASTREF		0
+#define CLK_MEMFASTREF		1
+#define CLK_CFG			2
+#define CLK_SYS			3
+#define CLK_PERIFSYS		4
+#define CLK_APBCORE		5
+#define CLK_APBSER		6
+#define CLK_ATB			7
+#define CLK_HPC			8
+#define CLK_EMMC		9
+#define CLK_SD0			10
+#define CLK_SD1			11
+#define CLK_GETHRGMII		12
+#define CLK_GETHRGMII1		13
+#define CLK_GE0_PTP_REF		14
+#define CLK_GE1_PTP_REF		15
+#define CLK_USB2TEST		16
+#define CLK_USB2TEST480MG0	17
+#define CLK_USB2TEST480MG1	18
+#define CLK_USB2TEST480MG2	19
+#define CLK_USB2TEST100MG0	20
+#define CLK_USB2TEST100MG1	21
+#define CLK_USB2TEST100MG2	22
+#define CLK_USB2TEST100MG3	23
+#define CLK_PERIFTEST125MG0	24
+#define CLK_PERIFTEST200MG0	25
+#define CLK_PERIFTEST200MG1	26
+#define CLK_GPU			27
+#define CLK_NPU			28
+#define CLK_AVIOSYS		29
+#define CLK_AIOSYS		30
+#define CLK_AVIO_LCDC2SCAN	31
+#define CLK_AVIO_IPI		32
+#define CLK_AVIO_P		33
+#define CLK_AVIO_DPHYRXTXESC	34
+#define CLK_AVIOFPLL		35
+#define CLK_AVIO_RX_SCANBYTE	36
+#define CLK_AVIO_RX_SCANTEST	37
+
+/* GBL gate clks */
+#define CLK_USB0CORE		38
+#define CLK_SDIOSYS		39
+#define CLK_EMMCSYS		40
+#define CLK_GPUAXI		41
+#define CLK_GETHRGMIISYS	42
+#define CLK_SDIO1SYS		43
+#define CLK_USB1CORE		44
+#define CLK_GETHRGMII1SYS	45
+#define CLK_USB0PHYREF		46
+#define CLK_USB1PHYREF		47
+#define CLK_APBUART0		48
+#define CLK_APBUART1		49
+#define CLK_APBUART2		50
+#define CLK_APBUART3		51
+#define CLK_APBI2C0		52
+#define CLK_APBI2C1		53
+#define CLK_APBSPI0		54
+#define CLK_APBSPI1		55
+#define CLK_APBSPI2		56
+#define CLK_APBSPI3		57
+#define CLK_APBGPIO		58
+#define CLK_APBTIMERS		59
+#define CLK_APBSYSCNT		60
+#define CLK_APBWDT		61
+#define CLK_APBDMA		62
+#define SL261X_CLK_MAX		63
+
+/* cpuss */
+#define CLK_CPU0		0
+#define CLK_CPU1		1
+#define CLK_DSU			2
+#define SL261X_CPU_CLK_MAX	3
+
+
+/* sysmgr domain */
+
+#define CLK_CFG_UART0		0
+#define CLK_SER_UART0		1
+#define CLK_CFG_UART1		2
+#define CLK_CFG_UART2		3
+#define CLK_CFG_UART3		4
+#define CLK_CFG_GPIO		5
+#define CLK_CFG_I2CM0		6
+#define CLK_CFG_I2CM1		7
+#define CLK_CFG_SPIM		8
+#define CLK_CFG_SPIS		9
+#define CLK_CFG_I3C		10
+#define CLK_CFG_XSPI		11
+#define CLK_AXI_XSPI		12
+#define CLK_CFG_PVT		13
+#define CLK_CFG_ADC		14
+#define CLK_CFG_PWM		15
+#define CLK_BUS_CAN0		16
+#define CLK_BUS_CAN1		17
+#define CLK_CFG_PDM		18
+
+#define CLK_SER_UART1		19
+#define CLK_SER_UART2		20
+#define CLK_SER_UART3		21
+#define CLK_DEB_GPIO		22
+#define CLK_SER_I2CM0		23
+#define CLK_SER_I2CM1		24
+#define CLK_SER_SPIM		25
+#define CLK_SER_SPIS		26
+#define CLK_SER_I3C		27
+#define CLK_SER_XSPI		28
+#define CLK_HS_PVT		29
+#define CLK_CORE_ADC		30
+#define CLK_SER_PWM		31
+#define CLK_SER_CAN0		32
+#define CLK_SER_CAN1		33
+#define CLK_SER_PDM		34
+#define CLK_REF_CALIB		35
+
+#define CLK_MCU_REF		36
+#define CLK_MCU_PLL		37
+#define CLK_MCU_IO_PLL		38
+#define CLK_MCU_APB		39
+#define CLK_MCU_AXI		40
Signature · 1 line
2.53.0
#48 lore raw

Re: [PATCH 15/20] dt-bindings: clock: add Synaptics SL261X clock

In reply to Jisheng Zhang
Quoted 10 lines · Jisheng Zhang

Add support for clocks, plls in Synaptics SL261X SoCs.

---
 .../bindings/clock/syna,sl261x-clk.yaml       |  92 ++++++++++++
 include/dt-bindings/clock/syna,sl261x.h       | 131 ++++++++++++++++++
 2 files changed, 223 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/syna,sl261x-clk.yaml
 create mode 100644 include/dt-bindings/clock/syna,sl261x.h

My bot found errors running 'make dt_binding_check' on your patch:

yamllint warnings/errors:

dtschema/dtc warnings/errors:
Documentation/devicetree/bindings/clock/syna,sl261x-clk.example.dtb: syscon@f7e10000 (syscon): compatible: ['syscon', 'simple-mfd'] is too short
from schema $id: http://devicetree.org/schemas/mfd/syscon-common.yaml
Documentation/devicetree/bindings/clock/syna,sl261x-clk.example.dtb: cpu-wrap@f7e30000 (syscon): compatible: ['syscon', 'simple-mfd'] is too short
from schema $id: http://devicetree.org/schemas/mfd/syscon-common.yaml

doc reference errors (make refcheckdocs):

See https://patchwork.kernel.org/project/devicetree/patch/[email protected]

The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.

author maintainer
#49 lore raw

Re: [PATCH 15/20] dt-bindings: clock: add Synaptics SL261X clock

Quoted 17 lines · Rob Herring (Arm)
Quoted 10 lines · Jisheng Zhang

Add support for clocks, plls in Synaptics SL261X SoCs.

---
 .../bindings/clock/syna,sl261x-clk.yaml       |  92 ++++++++++++
 include/dt-bindings/clock/syna,sl261x.h       | 131 ++++++++++++++++++
 2 files changed, 223 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/syna,sl261x-clk.yaml
 create mode 100644 include/dt-bindings/clock/syna,sl261x.h

My bot found errors running 'make dt_binding_check' on your patch:

yamllint warnings/errors:

Quoted 7 lines

dtschema/dtc warnings/errors:
Documentation/devicetree/bindings/clock/syna,sl261x-clk.example.dtb: syscon@f7e10000 (syscon): compatible: ['syscon', 'simple-mfd'] is too short
from schema $id: http://devicetree.org/schemas/mfd/syscon-common.yaml
Documentation/devicetree/bindings/clock/syna,sl261x-clk.example.dtb: cpu-wrap@f7e30000 (syscon): compatible: ['syscon', 'simple-mfd'] is too short
from schema $id: http://devicetree.org/schemas/mfd/syscon-common.yaml

doc reference errors (make refcheckdocs):

oops, I missed this dt example dt_binding_check, or in details -- I forget to update the example after fixing the soc dtsi syscon nodes. In newer version, I will move synaptics chip global block binding patch earlier and update the example

Quoted 16 lines

See https://patchwork.kernel.org/project/devicetree/patch/[email protected]

The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.

author maintainer
#50 lore raw

PATCH 16/20 clk: berlin: add Synaptics SL261X SoC clocks and plls

In reply to Jisheng Zhang

Add support for clocks, plls in Synaptics SL261X SoCs.

---
 drivers/clk/Kconfig                |   1 +
 drivers/clk/berlin/Kconfig         |  25 ++
 drivers/clk/berlin/Makefile        |   4 +
 drivers/clk/berlin/sl-clk.c        | 279 +++++++++++++++++++++
 drivers/clk/berlin/sl-clk.h        |  31 +++
 drivers/clk/berlin/sl-sysmgr-clk.c | 250 +++++++++++++++++++
 drivers/clk/berlin/sl-sysmgr-clk.h |  44 ++++
 drivers/clk/berlin/sl261x-clks.c   | 385 +++++++++++++++++++++++++++++
 drivers/clk/berlin/sl261x-pll.c    | 145 +++++++++++
 drivers/clk/berlin/sl261x-pll.h    |  14 ++
 10 files changed, 1178 insertions(+)
 create mode 100644 drivers/clk/berlin/Kconfig
 create mode 100644 drivers/clk/berlin/sl-clk.c
 create mode 100644 drivers/clk/berlin/sl-clk.h
 create mode 100644 drivers/clk/berlin/sl-sysmgr-clk.c
 create mode 100644 drivers/clk/berlin/sl-sysmgr-clk.h
 create mode 100644 drivers/clk/berlin/sl261x-clks.c
 create mode 100644 drivers/clk/berlin/sl261x-pll.c
 create mode 100644 drivers/clk/berlin/sl261x-pll.h
drivers/clk/Kconfig +1 -0
index f9592fd9ec2b..8052db52e28f 100644
@@ -509,6 +509,7 @@ source "drivers/clk/actions/Kconfig"
 source "drivers/clk/analogbits/Kconfig"
 source "drivers/clk/aspeed/Kconfig"
 source "drivers/clk/bcm/Kconfig"
+source "drivers/clk/berlin/Kconfig"
 source "drivers/clk/cix/Kconfig"
 source "drivers/clk/eswin/Kconfig"
 source "drivers/clk/hisilicon/Kconfig"
drivers/clk/berlin/Kconfig new file +25 -0
new file mode 100644
index 000000000000..2d5694cd29b7
@@ -0,0 +1,25 @@
+# SPDX-License-Identifier: GPL-2.0
+
+config SL_COMMON_CLK
+	bool
+
+config SL_SYSMGR_CLK
+	bool
+
+config SL261X_PLL
+	tristate "Synaptics SL261X PLL Driver"
+	depends on ARCH_BERLIN || COMPILE_TEST
+	default n
+	help
+	  This driver provides support for PLLs on Synaptics SL261X SoC.
+
+config SL261X_CLK
+	tristate "Synaptics SL261X Clock Driver"
+	depends on ARCH_BERLIN || COMPILE_TEST
+	select SL_COMMON_CLK
+	select SL_SYSMGR_CLK
+	default n
+	help
+	  This driver provides support for clock controller on Synaptics SL261X
+	  SoC. The clock controller generates and supplies clocks to various
+	  peripherals within the SoC.
drivers/clk/berlin/Makefile +4 -0
index 3733733a4806..2a664782d8a2 100644
@@ -3,3 +3,7 @@ obj-y += berlin2-avpll.o berlin2-pll.o berlin2-div.o
 obj-$(CONFIG_MACH_BERLIN_BG2)	+= bg2.o
 obj-$(CONFIG_MACH_BERLIN_BG2CD)	+= bg2.o
 obj-$(CONFIG_MACH_BERLIN_BG2Q)	+= bg2q.o
+obj-$(CONFIG_SL_COMMON_CLK)	+= sl-clk.o
+obj-$(CONFIG_SL_SYSMGR_CLK)	+= sl-sysmgr-clk.o
+obj-$(CONFIG_SL261X_PLL)	+= sl261x-pll.o
+obj-$(CONFIG_SL261X_CLK)	+= sl261x-clks.o
drivers/clk/berlin/sl-clk.c new file +279 -0

279 lines not on this page · raw message

drivers/clk/berlin/sl-clk.h new file +31 -0
new file mode 100644
index 000000000000..7489b26a5e8d
@@ -0,0 +1,31 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef __SL_CLK_H
+#define __SL_CLK_H
+
+#include <linux/compiler_types.h>
+#include <linux/spinlock_types.h>
+
+struct clk_hw;
+struct device;
+
+struct sl_clk_desc {
+	const char	*name;
+	u32		id;
+	u32		offset;
+	unsigned long	flags;
+};
+
+struct sl_gateclk_desc {
+	const char	*name;
+	const char	*parent_name;
+	u32		id;
+	u8		bit_idx;
+	unsigned long	flags;
+};
+
+struct clk_hw *sl_clk_register(struct device *dev, void __iomem *reg,
+			       const char *name, const char * const *parent_names,
+			       unsigned int num_parents, unsigned long flags,
+			       spinlock_t *lock);
+
+#endif /* __SL_CLK_H */
drivers/clk/berlin/sl-sysmgr-clk.c new file +250 -0

250 lines not on this page · raw message

drivers/clk/berlin/sl-sysmgr-clk.h new file +44 -0

44 lines not on this page · raw message

drivers/clk/berlin/sl261x-clks.c new file +385 -0

385 lines not on this page · raw message

drivers/clk/berlin/sl261x-pll.c new file +145 -0

145 lines not on this page · raw message

drivers/clk/berlin/sl261x-pll.h new file +14 -0
new file mode 100644
index 000000000000..70788661ff60
@@ -0,0 +1,14 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef __SL261X_PLL_H
+#define __SL261X_PLL_H
+
+#include <linux/io.h>
+
+struct clk_hw_onecell_data;
+struct device;
+struct device_node;
+
+int sl261x_pll_register(struct device *dev, void __iomem *ctrl,
+			const char *out, const char *outf);
+
+#endif /* __SL261X_PLL_H */
Signature · 1 line
2.53.0
#51 lore raw

Re: [PATCH 16/20] clk: berlin: add Synaptics SL261X SoC clocks and plls

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider: - [Medium] clk: berlin: missing .disable callbacks in sysmgr clock operations - [Low] kbuild: Linker error…

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] clk: berlin: missing .disable callbacks in sysmgr clock operations
- [Low] kbuild: Linker error due to missing Kconfig dependency for SL261X_PLL --

commit 56d97606c2f6bbb88d4a36a5f8b06b807c05523d
Author: Jisheng Zhang <[email protected]>

clk: berlin: add Synaptics SL261X SoC clocks and plls

Add support for clocks, plls in Synaptics SL261X SoCs.

Quoted 4 lines
drivers/clk/berlin/Kconfig new file +0 -0
new file mode 100644

[ ... ]

drivers/clk/berlin/Kconfig line 21

Quoted 6 lines
drivers/clk/berlin/Kconfig new file +6 -0
+config SL261X_CLK
+	tristate "Synaptics SL261X Clock Driver"
+	depends on ARCH_BERLIN || COMPILE_TEST
+	select SL_COMMON_CLK
+	select SL_SYSMGR_CLK
+	default n

[Severity: Low]
Does this missing dependency lead to a linker error? The SL261X_CLK config fails to declare a dependency or select on SL261X_PLL, but the clock driver unconditionally calls sl261x_pll_register() defined in the PLL driver. If CONFIG_SL261X_CLK=y but CONFIG_SL261X_PLL=n or m, the build will fail with an undefined reference.

[ ... ]

Quoted 4 lines
drivers/clk/berlin/sl-sysmgr-clk.c new file +0 -0
new file mode 100644

[ ... ]

drivers/clk/berlin/sl-sysmgr-clk.c line 76

Quoted 4 lines
drivers/clk/berlin/sl-sysmgr-clk.c new file +4 -0
+static const struct clk_ops sl_sysmgr_gateclk_ops = {
+	.enable		= sl_sysmgr_gateclk_enable,
+	.is_enabled	= sl_sysmgr_gateclk_is_enabled,
+};

[Severity: Medium]
Will this leave the gate clocks permanently enabled? The ops struct for gate clocks implements .enable to ungate the clock but omits the .disable callback. When a consumer driver calls clk_disable_unprepare(), the common clock framework will silently skip the hardware operation, leaking power.

[ ... ]

drivers/clk/berlin/sl-sysmgr-clk.c line 140

Quoted 5 lines
drivers/clk/berlin/sl-sysmgr-clk.c new file +5 -0
+static const struct clk_ops sl_sysmgr_clk_ops = {
+	.recalc_rate	= sl_sysmgr_clk_recalc_rate,
+	.enable		= sl_sysmgr_clk_enable,
+	.is_enabled	= sl_sysmgr_clk_is_enabled,
+};

[Severity: Medium]
Does this have the same issue with missing disable operations? The ops struct for divider clocks implements .enable but also omits the .disable callback.

[ ... ]

Quoted 4 lines
drivers/clk/berlin/sl261x-clks.c new file +0 -0
new file mode 100644

[ ... ]

Quoted 2 lines
drivers/clk/berlin/sl261x-clks.c new file +2 -0
+static int sl261x_soc_clk_setup(struct platform_device *pdev)
+{

[ ... ]

drivers/clk/berlin/sl261x-clks.c line 166

Quoted 3 lines
drivers/clk/berlin/sl261x-clks.c new file +3 -0
+	/* sysplls */
+	ret = sl261x_pll_register(dev, base + SYSPLL0_OFFSET,
+				  clk_names[SYSPLL0_OUT], clk_names[SYSPLL0_OUTF]);

[Severity: Low]
This is the call to sl261x_pll_register() mentioned above that requires SL261X_PLL to be selected or depended on in Kconfig to avoid linker errors.

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=16
author maintainer
#52 lore raw

PATCH 17/20 dt-bindings: mfd: Add Synaptics SL261x global block binding

In reply to Jisheng Zhang

Document the AVIO global, CPU wrapper, chip control, and MCU global register blocks on SL261x SoCs. Each block exposes its clock and, where applicable, pinctrl and reset functions through child nodes.

Document the chip control syscon phandle used by the CPU clock controller.

---
 .../bindings/mfd/syna,sl261x-gbl.yaml         | 208 ++++++++++++++++++
 1 file changed, 208 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mfd/syna,sl261x-gbl.yaml
Documentation/devicetree/bindings/mfd/syna,sl261x-gbl.yaml new file +208 -0
new file mode 100644
index 000000000000..3e5842169c4a
@@ -0,0 +1,208 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mfd/syna,sl261x-gbl.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Synaptics SL261x global and control register blocks
+
+maintainers:
+  - Jisheng Zhang <[email protected]>
+
+description: |
+  The SL261x global and control register blocks contain clock, reset, and
+  pin control registers. Each functional child uses its parent's register
+  range. The CPU clock controller also refers to the chip control syscon.
+
+properties:
+  compatible:
+    oneOf:
+      - items:
+          - const: syna,sl261x-avio-gbl
+          - const: syscon
+          - const: simple-mfd
+      - items:
+          - const: syna,sl261x-cpu-wrp
+          - const: syscon
+          - const: simple-mfd
+      - items:
+          - const: syna,sl261x-chip-control
+          - const: syscon
+          - const: simple-mfd
+      - items:
+          - const: syna,sl261x-mcu-gbl
+          - const: syscon
+          - const: simple-mfd
+
+  reg:
+    maxItems: 1
+
+  clock:
+    type: object
+    additionalProperties: true
+
+  pin-controller:
+    type: object
+    additionalProperties: true
+
+  reset:
+    type: object
+    additionalProperties: true
+
+required:
+  - compatible
+  - reg
+
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: syna,sl261x-avio-gbl
+    then:
+      required:
+        - clock
+      properties:
+        clock:
+          properties:
+            compatible:
+              const: syna,sl261x-aio-clk
+        pin-controller: false
+        reset: false
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: syna,sl261x-cpu-wrp
+    then:
+      required:
+        - clock
+      properties:
+        clock:
+          properties:
+            compatible:
+              const: syna,sl261x-cpu-clk
+        pin-controller: false
+        reset: false
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: syna,sl261x-chip-control
+    then:
+      required:
+        - clock
+        - pin-controller
+        - reset
+      properties:
+        clock:
+          properties:
+            compatible:
+              const: syna,sl261x-soc-clk
+        pin-controller:
+          properties:
+            compatible:
+              const: syna,sl261x-soc-pinctrl
+        reset:
+          properties:
+            compatible:
+              const: syna,sl261x-soc-reset
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: syna,sl261x-mcu-gbl
+    then:
+      required:
+        - clock
+        - pin-controller
+        - reset
+      properties:
+        clock:
+          properties:
+            compatible:
+              const: syna,sl261x-system-clk
+        pin-controller:
+          properties:
+            compatible:
+              const: syna,sl261x-system-pinctrl
+        reset:
+          properties:
+            compatible:
+              const: syna,sl261x-system-reset
+
+additionalProperties: false
+
+examples:
+  - |
+    osc: clock-osc {
+        compatible = "fixed-clock";
+        #clock-cells = <0>;
+        clock-frequency = <25000000>;
+    };
+
+    avio_gbl: avio-gbl@f7490000 {
+        compatible = "syna,sl261x-avio-gbl", "syscon", "simple-mfd";
+        reg = <0xf7490000 0x4000>;
+
+        aioclk: clock {
+            compatible = "syna,sl261x-aio-clk";
+            #clock-cells = <1>;
+            clocks = <&osc>;
+        };
+    };
+
+    chip: chip-control@f7e10000 {
+        compatible = "syna,sl261x-chip-control", "syscon", "simple-mfd";
+        reg = <0xf7e10000 0x10000>;
+
+        clk: clock {
+            compatible = "syna,sl261x-soc-clk";
+            #clock-cells = <1>;
+            clocks = <&osc>;
+        };
+
+        pinctrl: pin-controller {
+            compatible = "syna,sl261x-soc-pinctrl";
+        };
+
+        rst: reset {
+            compatible = "syna,sl261x-soc-reset";
+            #reset-cells = <1>;
+        };
+    };
+
+    cpu_wrp: cpu-wrp@f7e30000 {
+        compatible = "syna,sl261x-cpu-wrp", "syscon", "simple-mfd";
+        reg = <0xf7e30000 0x4000>;
+
+        cpuclk: clock {
+            compatible = "syna,sl261x-cpu-clk";
+            #clock-cells = <1>;
+            clocks = <&osc>;
+            syna,gbl-syscon = <&chip>;
+        };
+    };
+
+    mcu_gbl: mcu-gbl@e5025000 {
+        compatible = "syna,sl261x-mcu-gbl", "syscon", "simple-mfd";
+        reg = <0xe5025000 0x1000>;
+
+        sm_clk: clock {
+            compatible = "syna,sl261x-system-clk";
+            #clock-cells = <1>;
+        };
+
+        sm_pinctrl: pin-controller {
+            compatible = "syna,sl261x-system-pinctrl";
+        };
+
+        sm_rst: reset {
+            compatible = "syna,sl261x-system-reset";
+            #reset-cells = <1>;
+        };
+    };
+...
Signature · 1 line
2.53.0
#53 lore raw

Re: [PATCH 17/20] dt-bindings: mfd: Add Synaptics SL261x global block binding

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] dt-bindings: mfd: hardcoded child node names reject standard generic names --

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] dt-bindings: mfd: hardcoded child node names reject standard generic names --

commit 0676aaa06a44b6b171bf0c3b295a14f6820c22d4
Author: Jisheng Zhang <[email protected]>

dt-bindings: mfd: Add Synaptics SL261x global block binding

This commit introduces the device tree binding for Synaptics SL261x global and control register blocks. It defines constraints for the AVIO global, CPU wrapper, chip control, and MCU global blocks, exposing clocks, pinctrl, and reset functions.

Quoted 5 lines
Documentation/devicetree/bindings/mfd/syna,sl261x-gbl.yaml new file +0 -0
new file mode 100644
index 0000000000000..3e5842169c4a3

[ ... ]

Quoted 1 line

+properties:

[ ... ]

Quoted 4 lines
Documentation/devicetree/bindings/mfd/syna,sl261x-gbl.yaml new file +4 -0
+  reg:
+    maxItems: 1
+
+  clock:

Documentation/devicetree/bindings/mfd/syna,sl261x-gbl.yaml line 50

Quoted 10 lines
Documentation/devicetree/bindings/mfd/syna,sl261x-gbl.yaml new file +10 -0
+    type: object
+    additionalProperties: true
+
+  pin-controller:
+    type: object
+    additionalProperties: true
+
+  reset:
+    type: object
+    additionalProperties: true

[Severity: Low]
Does enforcing these exact node names prevent devicetree authors from using standard generic node names like clock-controller or reset-controller?

[ ... ]

Documentation/devicetree/bindings/mfd/syna,sl261x-gbl.yaml line 137

Quoted 6 lines
Documentation/devicetree/bindings/mfd/syna,sl261x-gbl.yaml new file +6 -0
+        reset:
+          properties:
+            compatible:
+              const: syna,sl261x-system-reset
+
+additionalProperties: false

[Severity: Low]
Could this strict validation reject devicetrees using standard generic names, since only clock, pin-controller, and reset are explicitly allowed in the properties block?

Using patternProperties (e.g., "^clock-controller(@.*)?$": type: object) would allow standard devicetree naming conventions.

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=17
#54 lore raw

Re: [PATCH 17/20] dt-bindings: mfd: Add Synaptics SL261x global block binding

In reply to Jisheng Zhang

Documentation/devicetree/bindings/mfd/syna,sl261x-gbl.yaml

Quoted 14 lines · Jisheng Zhang

Document the AVIO global, CPU wrapper, chip control, and MCU global register blocks on SL261x SoCs. Each block exposes its clock and, where applicable, pinctrl and reset functions through child nodes.

Document the chip control syscon phandle used by the CPU clock controller.

---
 .../bindings/mfd/syna,sl261x-gbl.yaml         | 208 ++++++++++++++++++
 1 file changed, 208 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mfd/syna,sl261x-gbl.yaml
Documentation/devicetree/bindings/mfd/syna,sl261x-gbl.yaml +0 -0

Filename should match a compatible.

Quoted 30 lines

new file mode 100644
index 000000000000..3e5842169c4a

Documentation/devicetree/bindings/mfd/syna,sl261x-gbl.yaml new file +25 -0
@@ -0,0 +1,208 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mfd/syna,sl261x-gbl.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Synaptics SL261x global and control register blocks
+
+maintainers:
+  - Jisheng Zhang <[email protected]>
+
+description: |
+  The SL261x global and control register blocks contain clock, reset, and
+  pin control registers. Each functional child uses its parent's register
+  range. The CPU clock controller also refers to the chip control syscon.
+
+properties:
+  compatible:
+    oneOf:
+      - items:
+          - const: syna,sl261x-avio-gbl
+          - const: syscon
+          - const: simple-mfd
+      - items:
+          - const: syna,sl261x-cpu-wrp

Documentation/devicetree/bindings/mfd/syna,sl261x-gbl.yaml line 35

Quoted 10 lines
Documentation/devicetree/bindings/mfd/syna,sl261x-gbl.yaml new file +10 -0
+          - const: syscon
+          - const: simple-mfd
+      - items:
+          - const: syna,sl261x-chip-control
+          - const: syscon
+          - const: simple-mfd
+      - items:
+          - const: syna,sl261x-mcu-gbl
+          - const: syscon
+          - const: simple-mfd

This can be simplified significantly by using an enum for the variable part.

Quoted 91 lines
Documentation/devicetree/bindings/mfd/syna,sl261x-gbl.yaml new file +90 -0
+
+  reg:
+    maxItems: 1
+
+  clock:
+    type: object
+    additionalProperties: true
+
+  pin-controller:
+    type: object
+    additionalProperties: true
+
+  reset:
+    type: object
+    additionalProperties: true
+
+required:
+  - compatible
+  - reg
+
 
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: syna,sl261x-avio-gbl
+    then:
+      required:
+        - clock
+      properties:
+        clock:
+          properties:
+            compatible:
+              const: syna,sl261x-aio-clk
+        pin-controller: false
+        reset: false
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: syna,sl261x-cpu-wrp
+    then:
+      required:
+        - clock
+      properties:
+        clock:
+          properties:
+            compatible:
+              const: syna,sl261x-cpu-clk
+        pin-controller: false
+        reset: false
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: syna,sl261x-chip-control
+    then:
+      required:
+        - clock
+        - pin-controller
+        - reset
+      properties:
+        clock:
+          properties:
+            compatible:
+              const: syna,sl261x-soc-clk
+        pin-controller:
+          properties:
+            compatible:
+              const: syna,sl261x-soc-pinctrl
+        reset:
+          properties:
+            compatible:
+              const: syna,sl261x-soc-reset
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: syna,sl261x-mcu-gbl
+    then:
+      required:
+        - clock
+        - pin-controller
+        - reset
+      properties:
+        clock:
+          properties:

Documentation/devicetree/bindings/mfd/syna,sl261x-gbl.yaml line 135

Quoted 10 lines
Documentation/devicetree/bindings/mfd/syna,sl261x-gbl.yaml new file +10 -0
+            compatible:
+              const: syna,sl261x-system-clk
+        pin-controller:
+          properties:
+            compatible:
+              const: syna,sl261x-system-pinctrl
+        reset:
+          properties:
+            compatible:
+              const: syna,sl261x-system-reset

Most of this can just disappear because most of these subnodes don't need to exist. In fact, maybe all of them can be removed, leaving you just with the syscon nodes themselves containing the relevant properties for resets/clocks/pinctrl.

Documentation/devicetree/bindings/mfd/syna,sl261x-gbl.yaml line 145

Quoted 10 lines
Documentation/devicetree/bindings/mfd/syna,sl261x-gbl.yaml new file +10 -0
+
+additionalProperties: false
+
+examples:
+  - |
+    osc: clock-osc {
+        compatible = "fixed-clock";
+        #clock-cells = <0>;
+        clock-frequency = <25000000>;
+    };

Nodes like this will get simulated by the tooling, they're not needed here.

Quoted 23 lines
Documentation/devicetree/bindings/mfd/syna,sl261x-gbl.yaml new file +23 -0
+
+    avio_gbl: avio-gbl@f7490000 {
+        compatible = "syna,sl261x-avio-gbl", "syscon", "simple-mfd";
+        reg = <0xf7490000 0x4000>;
+
+        aioclk: clock {
+            compatible = "syna,sl261x-aio-clk";
+            #clock-cells = <1>;
+            clocks = <&osc>;
+        };
+    };
+
+    chip: chip-control@f7e10000 {
+        compatible = "syna,sl261x-chip-control", "syscon", "simple-mfd";
+        reg = <0xf7e10000 0x10000>;
+
+        clk: clock {
+            compatible = "syna,sl261x-soc-clk";
+            #clock-cells = <1>;
+            clocks = <&osc>;
+        };
+
+        pinctrl: pin-controller {

Documentation/devicetree/bindings/mfd/syna,sl261x-gbl.yaml line 178

Quoted 10 lines
Documentation/devicetree/bindings/mfd/syna,sl261x-gbl.yaml new file +10 -0
+            compatible = "syna,sl261x-soc-pinctrl";
+        };
+
+        rst: reset {
+            compatible = "syna,sl261x-soc-reset";
+            #reset-cells = <1>;
+        };
+    };
+
+    cpu_wrp: cpu-wrp@f7e30000 {

Please don't make up new node names for your device, use something established like "system-controller" or "syscon" please.

pw-bot: changes-requested

Thanks,
Conor.

Quoted 33 lines
Documentation/devicetree/bindings/mfd/syna,sl261x-gbl.yaml new file +30 -0
+        compatible = "syna,sl261x-cpu-wrp", "syscon", "simple-mfd";
+        reg = <0xf7e30000 0x4000>;
+
+        cpuclk: clock {
+            compatible = "syna,sl261x-cpu-clk";
+            #clock-cells = <1>;
+            clocks = <&osc>;
+            syna,gbl-syscon = <&chip>;
+        };
+    };
+
+    mcu_gbl: mcu-gbl@e5025000 {
+        compatible = "syna,sl261x-mcu-gbl", "syscon", "simple-mfd";
+        reg = <0xe5025000 0x1000>;
+
+        sm_clk: clock {
+            compatible = "syna,sl261x-system-clk";
+            #clock-cells = <1>;
+        };
+
+        sm_pinctrl: pin-controller {
+            compatible = "syna,sl261x-system-pinctrl";
+        };
+
+        sm_rst: reset {
+            compatible = "syna,sl261x-system-reset";
+            #reset-cells = <1>;
+        };
+    };
+...
Signature · 1 line
2.53.0
author maintainer
#55 lore raw

PATCH 18/20 regulator: dt-bindings: sy8827n: support standard properties

In reply to Jisheng Zhang

Support standard properties regulator.yaml, such as regulator-active-discharge', 'regulator-always-on', 'regulator-boot-on', 'regulator-max-microvolt', 'regulator-min-microvolt', 'regulator-name' and on.

---
 .../devicetree/bindings/regulator/silergy,sy8827n.yaml       | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/regulator/silergy,sy8827n.yaml +4 -1
index b222adabc7b4..0baf93ca67ca 100644
@@ -31,7 +31,10 @@ required:
   - compatible
   - reg
 
-additionalProperties: false
+allOf:
+  - $ref: regulator.yaml#
+
+unevaluatedProperties: false
 
 examples:
   - |
Signature · 1 line
2.53.0
#56 lore raw

Re: [PATCH 18/20] regulator: dt-bindings: sy8827n: support standard properties

Sashiko has reviewed this patch and found no issues. It looks great!
Quoted 6 lines

Support standard properties regulator.yaml, such as regulator-active-discharge', 'regulator-always-on', 'regulator-boot-on', 'regulator-max-microvolt', 'regulator-min-microvolt', 'regulator-name' and on.

Sashiko has reviewed this patch and found no issues. It looks great!

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=18
author maintainer
#58 lore raw

PATCH 19/20 dt-bindings: arm: berlin: Add Synaptics SL261X SoC and RDK board

In reply to Jisheng Zhang

Add devicetree binding for the Synaptics SL261X SoCs and corresponding RDK boards.

The SL261X include five pin-to-pin compatible SoCs: SL2611, SL2613, SL2615, SL2617, and SL2619.

The corresponding RDK boards are based on the these SoCs.

---
 .../bindings/arm/marvell,berlin.yaml          | 20 +++++++++++++++++++
 1 file changed, 20 insertions(+)
Documentation/devicetree/bindings/arm/marvell,berlin.yaml +20 -0
index 4e8442980dcb..30d94059e2f2 100644
@@ -41,5 +41,25 @@ properties:
               - marvell,berlin4ct-stb
           - const: marvell,berlin4ct
           - const: marvell,berlin
+      - items:
+          - enum:
+              - syna,sl2611-rdk
+          - const: syna,sl2611
+      - items:
+          - enum:
+              - syna,sl2613-rdk
+          - const: syna,sl2613
+      - items:
+          - enum:
+              - syna,sl2615-rdk
+          - const: syna,sl2615
+      - items:
+          - enum:
+              - syna,sl2617-rdk
+          - const: syna,sl2617
+      - items:
+          - enum:
+              - syna,sl2619-rdk
+          - const: syna,sl2619
 
 additionalProperties: true
Signature · 1 line
2.53.0
#59 lore raw

Re: [PATCH 19/20] dt-bindings: arm: berlin: Add Synaptics SL261X SoC and RDK board

Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider: - [High] pinctrl: register corruption due to wrong offset for GPIO54 and SM_GPIO20 - [Medium] reset: soc…

Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [High] pinctrl: register corruption due to wrong offset for GPIO54 and SM_GPIO20
- [Medium] reset: soc reset driver fails to probe due to compatible string mismatch
- [Medium] clk: missing clock provider registration in sl261x_aio_clk_setup() --

commit efe9a4b32a9836b222023aba07e846238a729d6a
Author: Jisheng Zhang <[email protected]>

dt-bindings: arm: berlin: Add Synaptics SL261X SoC and RDK board

Add devicetree binding for the Synaptics SL261X SoCs and corresponding RDK boards.

Quoted 4 lines
drivers/clk/berlin/sl261x-clks.c new file +0 -0
new file mode 100644

[ ... ]

Quoted 2 lines
drivers/clk/berlin/sl261x-clks.c new file +2 -0
+static int sl261x_aio_clk_setup(struct platform_device *pdev)
+{

[ ... ]

Quoted 4 lines
drivers/clk/berlin/sl261x-clks.c new file +4 -0
+	/* aplls */
+	ret = sl261x_pll_register(dev, base + APLL0_OFFSET,
+				  clk_names[APLL0_OUT], clk_names[APLL0_OUTF]);
+	if (ret)

drivers/clk/berlin/sl261x-clks.c

Quoted 10 lines
drivers/clk/berlin/sl261x-clks.c new file +10 -0
+		return ret;
+	ret = sl261x_pll_register(dev, base + APLL1_OFFSET,
+				  clk_names[APLL1_OUT], clk_names[APLL1_OUTF]);
+	if (ret)
+		return ret;
+
+	/* TODO aio clks */
+
+	return 0;
+}

[Severity: Medium]
Since the device tree node for this clock defines #clock-cells = <1>, doesn't the clock framework expect a provider to be registered here?

It appears sl261x_aio_clk_setup() returns 0 without calling devm_of_clk_add_hw_provider(), which could cause any consumer requesting a clock from the syna,sl261x-aio-clk provider to fail with a probe deferral error.

Quoted 4 lines
drivers/pinctrl/berlin/pinctrl-sl261x.c new file +0 -0
new file mode 100644

[ ... ]

Quoted 1 line

+static const struct berlin_desc_group sl261x_soc_pinctrl_groups[] = {

[ ... ]

drivers/pinctrl/berlin/pinctrl-sl261x.c

Quoted 2 lines
drivers/pinctrl/berlin/pinctrl-sl261x.c new file +2 -0
+	BERLIN_PINCTRLCONF_GROUP("GPIO54", 0x800c, 0x3, 0x03,
+			0x87c, 10,

[Severity: High]
Is the configuration offset for GPIO54 correct in sl261x_soc_pinctrl_groups?

Surrounding pins like GPIO53 use 0x8878 and GPIO55 uses 0x8880. If this was meant to be 0x887c, wouldn't writing to 0x87c during pin configuration corrupt unrelated system registers instead?

[ ... ]

Quoted 1 line

+static const struct berlin_desc_group sl261x_sysmgr_pinctrl_groups[] = {

[ ... ]

drivers/pinctrl/berlin/pinctrl-sl261x.c

Quoted 2 lines
drivers/pinctrl/berlin/pinctrl-sl261x.c new file +2 -0
+	BERLIN_PINCTRLCONF_GROUP("SM_GPIO20", 0x8, 0x3, 0x0f,
+			0xc6c, 10,

[Severity: High]
Could the multiplexing offset for SM_GPIO20 in sl261x_sysmgr_pinctrl_groups be a typo?

All surrounding pins use a multiplexing offset of 0xb08. Executing pinmux requests with an offset of 0x8 might lead to system register corruption.

Quoted 4 lines
drivers/reset/reset-sl261x.c new file +0 -0
new file mode 100644

[ ... ]

drivers/reset/reset-sl261x.c

Quoted 5 lines
drivers/reset/reset-sl261x.c new file +5 -0
+static const struct of_device_id sl261x_reset_dt_match[] = {
+	{ .compatible = "syna,sl261x-reset", .data = &sl261x_reset_data },
+	{ .compatible = "syna,sl261x-system-reset", .data = &sl261x_system_reset_data },
+	{ },
+};

[Severity: Medium]
Will this driver successfully bind to the SoC reset node during boot?

The sl261x_reset_dt_match table matches against syna,sl261x-reset, but the devicetree bindings and device tree sources define the compatible string as syna,sl261x-soc-reset.

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=19
maintainer Acked-by on v1 19/20
#60 lore raw

Re: [PATCH 19/20] dt-bindings: arm: berlin: Add Synaptics SL261X SoC and RDK board

In reply to Jisheng Zhang
Quoted 6 lines · Jisheng Zhang

Add devicetree binding for the Synaptics SL261X SoCs and corresponding RDK boards.

The SL261X include five pin-to-pin compatible SoCs: SL2611, SL2613, SL2615, SL2617, and SL2619.

Quoted 7 lines

The corresponding RDK boards are based on the these SoCs.

---
 .../bindings/arm/marvell,berlin.yaml          | 20 +++++++++++++++++++
 1 file changed, 20 insertions(+)
author maintainer
#61 lore raw

PATCH 20/20 arm64: dts: synaptics: Add Synaptics SL261X SoC and RDK board

In reply to Jisheng Zhang

Add dts(i) files for the Synaptics SL261X SoCs and corresponding RDK boards.

The SL261X include five pin-to-pin compatible SoCs: SL2611, SL2613, SL2615, SL2617, and SL2619.

The corresponding RDK boards are based on the these SoCs.

---
 arch/arm64/boot/dts/synaptics/Makefile        |   5 +
 arch/arm64/boot/dts/synaptics/sl2611-rdk.dts  |  16 +
 arch/arm64/boot/dts/synaptics/sl2611.dtsi     | 490 ++++++++++++++++++
 arch/arm64/boot/dts/synaptics/sl2613-rdk.dts  |  16 +
 arch/arm64/boot/dts/synaptics/sl2613.dtsi     |  12 +
 arch/arm64/boot/dts/synaptics/sl2615-rdk.dts  |  16 +
 arch/arm64/boot/dts/synaptics/sl2615.dtsi     |  46 ++
 arch/arm64/boot/dts/synaptics/sl2617-rdk.dts  |  16 +
 arch/arm64/boot/dts/synaptics/sl2617.dtsi     |  46 ++
 arch/arm64/boot/dts/synaptics/sl2619-rdk.dts  |  16 +
 arch/arm64/boot/dts/synaptics/sl2619.dtsi     |  44 ++
 .../boot/dts/synaptics/sl261x-rdk-common.dtsi | 135 +++++
 12 files changed, 858 insertions(+)
 create mode 100644 arch/arm64/boot/dts/synaptics/sl2611-rdk.dts
 create mode 100644 arch/arm64/boot/dts/synaptics/sl2611.dtsi
 create mode 100644 arch/arm64/boot/dts/synaptics/sl2613-rdk.dts
 create mode 100644 arch/arm64/boot/dts/synaptics/sl2613.dtsi
 create mode 100644 arch/arm64/boot/dts/synaptics/sl2615-rdk.dts
 create mode 100644 arch/arm64/boot/dts/synaptics/sl2615.dtsi
 create mode 100644 arch/arm64/boot/dts/synaptics/sl2617-rdk.dts
 create mode 100644 arch/arm64/boot/dts/synaptics/sl2617.dtsi
 create mode 100644 arch/arm64/boot/dts/synaptics/sl2619-rdk.dts
 create mode 100644 arch/arm64/boot/dts/synaptics/sl2619.dtsi
 create mode 100644 arch/arm64/boot/dts/synaptics/sl261x-rdk-common.dtsi
arch/arm64/boot/dts/synaptics/Makefile +5 -0
index de71ddda6835..810d0d08c2de 100644
@@ -2,3 +2,8 @@
 # Berlin SoC Family
 dtb-$(CONFIG_ARCH_BERLIN) += berlin4ct-dmp.dtb
 dtb-$(CONFIG_ARCH_BERLIN) += berlin4ct-stb.dtb
+dtb-$(CONFIG_ARCH_BERLIN) += sl2611-rdk.dtb
+dtb-$(CONFIG_ARCH_BERLIN) += sl2613-rdk.dtb
+dtb-$(CONFIG_ARCH_BERLIN) += sl2615-rdk.dtb
+dtb-$(CONFIG_ARCH_BERLIN) += sl2617-rdk.dtb
+dtb-$(CONFIG_ARCH_BERLIN) += sl2619-rdk.dtb
arch/arm64/boot/dts/synaptics/sl2611-rdk.dts new file +16 -0
new file mode 100644
index 000000000000..585872307834
@@ -0,0 +1,16 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (C) 2025 Synaptics Incorporated
+ *
+ * Author: Jisheng Zhang <[email protected]>
+ */
+
+/dts-v1/;
+
+#include "sl2611.dtsi"
+#include "sl261x-rdk-common.dtsi"
+
+/ {
+	model = "Synaptics SL2611 RDK";
+	compatible = "syna,sl2611-rdk", "syna,sl2611";
+};
arch/arm64/boot/dts/synaptics/sl2611.dtsi new file +490 -0

490 lines not on this page · raw message

arch/arm64/boot/dts/synaptics/sl2613-rdk.dts new file +16 -0
new file mode 100644
index 000000000000..de75c9fab6a2
@@ -0,0 +1,16 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (C) 2025 Synaptics Incorporated
+ *
+ * Author: Jisheng Zhang <[email protected]>
+ */
+
+/dts-v1/;
+
+#include "sl2613.dtsi"
+#include "sl261x-rdk-common.dtsi"
+
+/ {
+	model = "Synaptics SL2613 RDK";
+	compatible = "syna,sl2613-rdk", "syna,sl2613";
+};
arch/arm64/boot/dts/synaptics/sl2613.dtsi new file +12 -0
new file mode 100644
index 000000000000..379809901677
@@ -0,0 +1,12 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (C) 2025 Synaptics Incorporated
+ *
+ * Author: Jisheng Zhang <[email protected]>
+ */
+
+#include "sl2611.dtsi"
+
+/ {
+	compatible = "syna,sl2613";
+};
arch/arm64/boot/dts/synaptics/sl2615-rdk.dts new file +16 -0
new file mode 100644
index 000000000000..ae03638a3a53
@@ -0,0 +1,16 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (C) 2025 Synaptics Incorporated
+ *
+ * Author: Jisheng Zhang <[email protected]>
+ */
+
+/dts-v1/;
+
+#include "sl2615.dtsi"
+#include "sl261x-rdk-common.dtsi"
+
+/ {
+	model = "Synaptics SL2615 RDK";
+	compatible = "syna,sl2615-rdk", "syna,sl2615";
+};
arch/arm64/boot/dts/synaptics/sl2615.dtsi new file +46 -0

46 lines not on this page · raw message

arch/arm64/boot/dts/synaptics/sl2617-rdk.dts new file +16 -0
new file mode 100644
index 000000000000..ba4ea21ac505
@@ -0,0 +1,16 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (C) 2025 Synaptics Incorporated
+ *
+ * Author: Jisheng Zhang <[email protected]>
+ */
+
+/dts-v1/;
+
+#include "sl2617.dtsi"
+#include "sl261x-rdk-common.dtsi"
+
+/ {
+	model = "Synaptics SL2617 RDK";
+	compatible = "syna,sl2617-rdk", "syna,sl2617";
+};
arch/arm64/boot/dts/synaptics/sl2617.dtsi new file +46 -0

46 lines not on this page · raw message

arch/arm64/boot/dts/synaptics/sl2619-rdk.dts new file +16 -0
new file mode 100644
index 000000000000..58901ac2a050
@@ -0,0 +1,16 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (C) 2025 Synaptics Incorporated
+ *
+ * Author: Jisheng Zhang <[email protected]>
+ */
+
+/dts-v1/;
+
+#include "sl2619.dtsi"
+#include "sl261x-rdk-common.dtsi"
+
+/ {
+	model = "Synaptics SL2619 RDK";
+	compatible = "syna,sl2619-rdk", "syna,sl2619";
+};
arch/arm64/boot/dts/synaptics/sl2619.dtsi new file +44 -0

44 lines not on this page · raw message

arch/arm64/boot/dts/synaptics/sl261x-rdk-common.dtsi new file +135 -0

135 lines not on this page · raw message

Signature · 1 line
2.53.0
#62 lore raw

Re: [PATCH 20/20] arm64: dts: synaptics: Add Synaptics SL261X SoC and RDK board

Thank you for your contribution! Sashiko AI review found 4 potential issue(s) to consider: - [Medium] dt: cpu0-supply is deprecated and breaks scaling on secondary cores - [Low] dt: missing root…

Thank you for your contribution! Sashiko AI review found 4 potential issue(s) to consider:
- [Medium] dt: cpu0-supply is deprecated and breaks scaling on secondary cores
- [Low] dt: missing root compatible string in sl2619.dtsi
- [Low] dt: schema violation by nesting l2-cache inside cpu node
- [Low] dt: missing whitespace before opening brace in cpu-wrap node
--

commit 58d4f39b5f4d2e3ef035e2e85d0944a8e6331b18
Author: Jisheng Zhang <[email protected]>

arm64: dts: synaptics: Add Synaptics SL261X SoC and RDK board

Add dts(i) files for the Synaptics SL261X SoCs and corresponding RDK boards.

Quoted 5 lines
arch/arm64/boot/dts/synaptics/sl2611.dtsi new file +0 -0
new file mode 100644
index 0000000000000..1d640ffe4c4b2

[ ... ]

Quoted 1 line
arch/arm64/boot/dts/synaptics/sl2611.dtsi new file +0 -0
@@ -0,0 +1,490 @@

[ ... ]

Quoted 6 lines
arch/arm64/boot/dts/synaptics/sl2611.dtsi new file +6 -0
+		cpu0: cpu@0 {
+			compatible = "arm,cortex-a55";
+			device_type = "cpu";
+			reg = <0x0>;
+			enable-method = "psci";
+			cpu-idle-states = <&CPU_SLEEP_0>;

arch/arm64/boot/dts/synaptics/sl2611.dtsi line 47

Quoted 10 lines
arch/arm64/boot/dts/synaptics/sl2611.dtsi new file +10 -0
+			i-cache-size = <32768>;
+			i-cache-line-size = <64>;
+			i-cache-sets = <128>;
+			d-cache-size = <32768>;
+			d-cache-line-size = <64>;
+			d-cache-sets = <128>;
+			next-level-cache = <&L2_0>;
+
+			L2_0: l2-cache {
+				compatible = "cache";

[Severity: Low]
Could this violate the standard Device Tree schema for CPU topology? The l2-cache nodes shouldn't be instantiated as children of the cpu nodes. Can they be moved as siblings under the /cpus node to avoid dtbs_check validation errors?

[ ... ]

Quoted 11 lines
arch/arm64/boot/dts/synaptics/sl2611.dtsi new file +11 -0
+		chip: chip-control@f7e10000 {
+			compatible = "syna,sl261x-chip-control", "syscon", "simple-mfd";
+			reg = <0xf7e10000 0x10000>;
+
+			clk: clock {
+				compatible = "syna,sl261x-soc-clk";
+				#clock-cells = <1>;
+				clocks = <&osc>;
+			};
+
+			pinctrl: pin-controller {

arch/arm64/boot/dts/synaptics/sl2611.dtsi line 321

Quoted 10 lines
arch/arm64/boot/dts/synaptics/sl2611.dtsi new file +10 -0
+				compatible = "syna,sl261x-soc-pinctrl";
+			};
+
+			rst: reset {
+				compatible = "syna,sl261x-soc-reset";
+				#reset-cells = <1>;
+			};
+		};
+
+		cpu_wrap: cpu-wrap@f7e30000{

[Severity: Low]
Should there be a space before the opening brace for cpu-wrap@f7e30000? While the Device Tree Compiler parses this successfully, it goes against standard formatting conventions.

Quoted 2 lines
arch/arm64/boot/dts/synaptics/sl2611.dtsi new file +2 -0
+			compatible = "syna,sl261x-cpu-wrp", "syscon", "simple-mfd";
+			reg = <0xf7e30000 0x4000>;

[ ... ]

Quoted 5 lines
arch/arm64/boot/dts/synaptics/sl2615.dtsi new file +0 -0
new file mode 100644
index 0000000000000..11b1fe316aa6d

[ ... ]

Quoted 1 line
arch/arm64/boot/dts/synaptics/sl2615.dtsi new file +0 -0
@@ -0,0 +1,46 @@

[ ... ]

Quoted 7 lines
arch/arm64/boot/dts/synaptics/sl2615.dtsi new file +7 -0
+	cpus {
+		cpu1: cpu@100 {
+			compatible = "arm,cortex-a55";
+			device_type = "cpu";
+			reg = <0x100>;
+			enable-method = "psci";
+			cpu-idle-states = <&CPU_SLEEP_0>;

arch/arm64/boot/dts/synaptics/sl2615.dtsi line 29

Quoted 10 lines
arch/arm64/boot/dts/synaptics/sl2615.dtsi new file +10 -0
+			i-cache-size = <32768>;
+			i-cache-line-size = <64>;
+			i-cache-sets = <128>;
+			d-cache-size = <32768>;
+			d-cache-line-size = <64>;
+			d-cache-sets = <128>;
+			next-level-cache = <&L2_1>;
+
+			L2_1: l2-cache {
+				compatible = "cache";

[Severity: Low]
Similar to sl2611.dtsi, does this violate the standard Device Tree schema for CPU topology? The l2-cache node is instantiated as a child of the cpu node here, and it should likely be moved to be a sibling under the /cpus node.

[ ... ]

Quoted 6 lines
arch/arm64/boot/dts/synaptics/sl2619.dtsi new file +0 -0
new file mode 100644
index 0000000000000..96bd58bbed3e1

arch/arm64/boot/dts/synaptics/sl2619.dtsi line 10

Quoted 10 lines
arch/arm64/boot/dts/synaptics/sl2619.dtsi new file +10 -0
@@ -0,0 +1,44 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (C) 2025 Synaptics Incorporated
+ *
+ * Author: Jisheng Zhang <[email protected]>
+ */
+
+#include "sl2613.dtsi"
+
+/ {

[Severity: Low]
Would it make sense to include the root compatible string here? sl2619.dtsi includes sl2613.dtsi but doesn't override the root compatible string to syna,sl2619 (unlike sl2615.dtsi and sl2617.dtsi). Even though sl2619-rdk.dts overrides it, this omission seems logically inconsistent.

Quoted 3 lines
arch/arm64/boot/dts/synaptics/sl2619.dtsi new file +3 -0
+	cpus {
+		cpu1: cpu@100 {
+			compatible = "arm,cortex-a55";

[ ... ]

Quoted 5 lines
arch/arm64/boot/dts/synaptics/sl261x-rdk-common.dtsi new file +0 -0
new file mode 100644
index 0000000000000..78a9b28fdf99e

[ ... ]

Quoted 1 line
arch/arm64/boot/dts/synaptics/sl261x-rdk-common.dtsi new file +0 -0
@@ -0,0 +1,135 @@

[ ... ]

arch/arm64/boot/dts/synaptics/sl261x-rdk-common.dtsi line 34

Quoted 3 lines
arch/arm64/boot/dts/synaptics/sl261x-rdk-common.dtsi new file +3 -0
+	cpus {
+		cpu@0 {
+			cpu0-supply = <&vcore>;

[Severity: Medium]
Will this break voltage scaling for secondary cores? cpu0-supply is deprecated in the cpus.yaml devicetree bindings in favor of cpu-supply.

Also, since this is hardcoded strictly under cpu@0 in the common board dtsi, any secondary cores introduced by multi-core SoCs (like cpu1 in SL2615) will inherit no regulator supply. Could this cause the cpufreq driver to fail to configure voltage scaling for secondary cores?

Quoted 2 lines
arch/arm64/boot/dts/synaptics/sl261x-rdk-common.dtsi new file +2 -0
+		};
+	};
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=20
#63 lore raw
In reply to Jisheng Zhang
Quoted 9 lines · Jisheng Zhang

Add initial support for the Synaptics SL261X SoCs and corresponding RDK boards.

The SL261X SoCs include five pin-to-pin compatible SoCs: SL2611, SL2613, SL2615, SL2617, and SL2619.

Only reset, pinctrl, clk/pll, uart, gpio, i2c, spi, i3c are included in this series. The support for Ethernet, USB, SDHCI, CAN, DMAC, XSPI will be submitted after this series is merged.

This series is filled with wildcard compatibles, which we don't permit typically. The only case for SoCs that I've seen them accepted is when the devices covered are actually just different binnings of the same device. I took a look at the docs for this device, but it wasn't clear to me if these are actually binnings or if there are different integrations here. If they're binnings, I'd rather you used 0 as the final digit, rather than x, since that matches the synaptics documentation for the family. If they're not binnings, there's no guarantee that they share the same errata etc, and must have different compatibles.

Cheers,
Conor.

Quoted 100 lines

Jisheng Zhang (20):
dt-bindings: serial: snps-dw-apb-uart: Add Synaptics sl261x uart
dt-bindings: i2c: dw: Add Synaptics sl261x i2c
spi: dt-bindings: snps,dw-apb-ssi: Add Synaptics sl261x spi
dt-bindings: i3c: dw: support up to two reset lines
i3c: dw: switch to array-based exclusive reset control
dt-bindings: i3c: Add Synaptics sl261x i3c
arm64: kconfig: let ARCH_BERLIN cover Synaptics arm64 SoCs
dt-bindings: reset: add Synaptics SL261X SoCs
reset: add Synaptics SL261x reset support
pinctrl: berlin: use u16 instead of u8 for the offset
pinctrl: berlin: enable module build support
pinctrl: berlin: add optional pinconf support
dt-bindings: pinctrl: berlin: Support Synaptics SL261X SoCs
pinctrl: berlin: support Synaptics SL261X SoCs
dt-bindings: clock: add Synaptics SL261X clock
clk: berlin: add Synaptics SL261X SoC clocks and plls
dt-bindings: mfd: Add Synaptics SL261x global block binding
regulator: dt-bindings: sy8827n: support standard properties
dt-bindings: arm: berlin: Add Synaptics SL261X SoC and RDK board
arm64: dts: synaptics: Add Synaptics SL261X SoC and RDK board

 .../bindings/arm/marvell,berlin.yaml          |  20 +
 .../bindings/clock/syna,sl261x-clk.yaml       |  92 +++
 .../bindings/i2c/snps,designware-i2c.yaml     |   1 +
 .../bindings/i3c/snps,dw-i3c-master.yaml      |   6 +-
 .../bindings/mfd/syna,sl261x-gbl.yaml         | 208 +++++
 .../pinctrl/marvell,berlin2-soc-pinctrl.yaml  |  10 +-
 .../bindings/regulator/silergy,sy8827n.yaml   |   5 +-
 .../bindings/reset/syna,sl261x-reset.yaml     |  40 +
 .../bindings/serial/snps-dw-apb-uart.yaml     |  12 +-
 .../bindings/spi/snps,dw-apb-ssi.yaml         |   1 +
 arch/arm64/Kconfig.platforms                  |   4 +-
 arch/arm64/boot/dts/synaptics/Makefile        |   5 +
 arch/arm64/boot/dts/synaptics/sl2611-rdk.dts  |  16 +
 arch/arm64/boot/dts/synaptics/sl2611.dtsi     | 490 ++++++++++++
 arch/arm64/boot/dts/synaptics/sl2613-rdk.dts  |  16 +
 arch/arm64/boot/dts/synaptics/sl2613.dtsi     |  12 +
 arch/arm64/boot/dts/synaptics/sl2615-rdk.dts  |  16 +
 arch/arm64/boot/dts/synaptics/sl2615.dtsi     |  46 ++
 arch/arm64/boot/dts/synaptics/sl2617-rdk.dts  |  16 +
 arch/arm64/boot/dts/synaptics/sl2617.dtsi     |  46 ++
 arch/arm64/boot/dts/synaptics/sl2619-rdk.dts  |  16 +
 arch/arm64/boot/dts/synaptics/sl2619.dtsi     |  44 ++
 .../boot/dts/synaptics/sl261x-rdk-common.dtsi | 135 ++++
 drivers/clk/Kconfig                           |   1 +
 drivers/clk/berlin/Kconfig                    |  25 +
 drivers/clk/berlin/Makefile                   |   4 +
 drivers/clk/berlin/sl-clk.c                   | 279 +++++++
 drivers/clk/berlin/sl-clk.h                   |  31 +
 drivers/clk/berlin/sl-sysmgr-clk.c            | 250 ++++++
 drivers/clk/berlin/sl-sysmgr-clk.h            |  44 ++
 drivers/clk/berlin/sl261x-clks.c              | 385 +++++++++
 drivers/clk/berlin/sl261x-pll.c               | 145 ++++
 drivers/clk/berlin/sl261x-pll.h               |  14 +
 drivers/i3c/master/dw-i3c-master.c            |  24 +-
 drivers/i3c/master/dw-i3c-master.h            |   2 +-
 drivers/pinctrl/berlin/Kconfig                |   7 +
 drivers/pinctrl/berlin/Makefile               |   1 +
 drivers/pinctrl/berlin/berlin.c               | 259 +++++-
 drivers/pinctrl/berlin/berlin.h               |  17 +-
 drivers/pinctrl/berlin/pinctrl-sl261x.c       | 745 ++++++++++++++++++
 drivers/reset/Kconfig                         |   6 +
 drivers/reset/Makefile                        |   1 +
 drivers/reset/reset-sl261x.c                  | 224 ++++++
 include/dt-bindings/clock/syna,sl261x.h       | 131 +++
 include/dt-bindings/reset/syna,sl261x-reset.h |  80 ++
 45 files changed, 3899 insertions(+), 33 deletions(-)
 create mode 100755 Documentation/devicetree/bindings/clock/syna,sl261x-clk.yaml
 create mode 100644 Documentation/devicetree/bindings/mfd/syna,sl261x-gbl.yaml
 create mode 100644 Documentation/devicetree/bindings/reset/syna,sl261x-reset.yaml
 create mode 100644 arch/arm64/boot/dts/synaptics/sl2611-rdk.dts
 create mode 100644 arch/arm64/boot/dts/synaptics/sl2611.dtsi
 create mode 100644 arch/arm64/boot/dts/synaptics/sl2613-rdk.dts
 create mode 100644 arch/arm64/boot/dts/synaptics/sl2613.dtsi
 create mode 100644 arch/arm64/boot/dts/synaptics/sl2615-rdk.dts
 create mode 100644 arch/arm64/boot/dts/synaptics/sl2615.dtsi
 create mode 100644 arch/arm64/boot/dts/synaptics/sl2617-rdk.dts
 create mode 100644 arch/arm64/boot/dts/synaptics/sl2617.dtsi
 create mode 100644 arch/arm64/boot/dts/synaptics/sl2619-rdk.dts
 create mode 100644 arch/arm64/boot/dts/synaptics/sl2619.dtsi
 create mode 100644 arch/arm64/boot/dts/synaptics/sl261x-rdk-common.dtsi
 create mode 100644 drivers/clk/berlin/Kconfig
 create mode 100644 drivers/clk/berlin/sl-clk.c
 create mode 100644 drivers/clk/berlin/sl-clk.h
 create mode 100644 drivers/clk/berlin/sl-sysmgr-clk.c
 create mode 100644 drivers/clk/berlin/sl-sysmgr-clk.h
 create mode 100644 drivers/clk/berlin/sl261x-clks.c
 create mode 100644 drivers/clk/berlin/sl261x-pll.c
 create mode 100644 drivers/clk/berlin/sl261x-pll.h
 create mode 100644 drivers/pinctrl/berlin/pinctrl-sl261x.c
 create mode 100644 drivers/reset/reset-sl261x.c
 create mode 100644 include/dt-bindings/clock/syna,sl261x.h
 create mode 100644 include/dt-bindings/reset/syna,sl261x-reset.h
Signature · 1 line
2.53.0
author maintainer
#64 lore raw
Quoted 11 lines · Conor Dooley
Quoted 9 lines · Jisheng Zhang

Add initial support for the Synaptics SL261X SoCs and corresponding RDK boards.

The SL261X SoCs include five pin-to-pin compatible SoCs: SL2611, SL2613, SL2615, SL2617, and SL2619.

Only reset, pinctrl, clk/pll, uart, gpio, i2c, spi, i3c are included in this series. The support for Ethernet, USB, SDHCI, CAN, DMAC, XSPI will be submitted after this series is merged.

Quoted 10 lines

This series is filled with wildcard compatibles, which we don't permit typically. The only case for SoCs that I've seen them accepted is when the devices covered are actually just different binnings of the same device. I took a look at the docs for this device, but it wasn't clear to me if these are actually binnings or if there are different integrations here. If they're binnings, I'd rather you used 0 as the final digit, rather than x, since that matches the synaptics documentation for the family. If they're not binnings, there's no guarantee that they share the same errata etc, and must have different compatibles.

Based on these kind hints, I will use sl2610 instead of sl261x.

Thanks a lot

Quoted 104 lines

Cheers,
Conor.

Quoted 100 lines

Jisheng Zhang (20):
dt-bindings: serial: snps-dw-apb-uart: Add Synaptics sl261x uart
dt-bindings: i2c: dw: Add Synaptics sl261x i2c
spi: dt-bindings: snps,dw-apb-ssi: Add Synaptics sl261x spi
dt-bindings: i3c: dw: support up to two reset lines
i3c: dw: switch to array-based exclusive reset control
dt-bindings: i3c: Add Synaptics sl261x i3c
arm64: kconfig: let ARCH_BERLIN cover Synaptics arm64 SoCs
dt-bindings: reset: add Synaptics SL261X SoCs
reset: add Synaptics SL261x reset support
pinctrl: berlin: use u16 instead of u8 for the offset
pinctrl: berlin: enable module build support
pinctrl: berlin: add optional pinconf support
dt-bindings: pinctrl: berlin: Support Synaptics SL261X SoCs
pinctrl: berlin: support Synaptics SL261X SoCs
dt-bindings: clock: add Synaptics SL261X clock
clk: berlin: add Synaptics SL261X SoC clocks and plls
dt-bindings: mfd: Add Synaptics SL261x global block binding
regulator: dt-bindings: sy8827n: support standard properties
dt-bindings: arm: berlin: Add Synaptics SL261X SoC and RDK board
arm64: dts: synaptics: Add Synaptics SL261X SoC and RDK board

 .../bindings/arm/marvell,berlin.yaml          |  20 +
 .../bindings/clock/syna,sl261x-clk.yaml       |  92 +++
 .../bindings/i2c/snps,designware-i2c.yaml     |   1 +
 .../bindings/i3c/snps,dw-i3c-master.yaml      |   6 +-
 .../bindings/mfd/syna,sl261x-gbl.yaml         | 208 +++++
 .../pinctrl/marvell,berlin2-soc-pinctrl.yaml  |  10 +-
 .../bindings/regulator/silergy,sy8827n.yaml   |   5 +-
 .../bindings/reset/syna,sl261x-reset.yaml     |  40 +
 .../bindings/serial/snps-dw-apb-uart.yaml     |  12 +-
 .../bindings/spi/snps,dw-apb-ssi.yaml         |   1 +
 arch/arm64/Kconfig.platforms                  |   4 +-
 arch/arm64/boot/dts/synaptics/Makefile        |   5 +
 arch/arm64/boot/dts/synaptics/sl2611-rdk.dts  |  16 +
 arch/arm64/boot/dts/synaptics/sl2611.dtsi     | 490 ++++++++++++
 arch/arm64/boot/dts/synaptics/sl2613-rdk.dts  |  16 +
 arch/arm64/boot/dts/synaptics/sl2613.dtsi     |  12 +
 arch/arm64/boot/dts/synaptics/sl2615-rdk.dts  |  16 +
 arch/arm64/boot/dts/synaptics/sl2615.dtsi     |  46 ++
 arch/arm64/boot/dts/synaptics/sl2617-rdk.dts  |  16 +
 arch/arm64/boot/dts/synaptics/sl2617.dtsi     |  46 ++
 arch/arm64/boot/dts/synaptics/sl2619-rdk.dts  |  16 +
 arch/arm64/boot/dts/synaptics/sl2619.dtsi     |  44 ++
 .../boot/dts/synaptics/sl261x-rdk-common.dtsi | 135 ++++
 drivers/clk/Kconfig                           |   1 +
 drivers/clk/berlin/Kconfig                    |  25 +
 drivers/clk/berlin/Makefile                   |   4 +
 drivers/clk/berlin/sl-clk.c                   | 279 +++++++
 drivers/clk/berlin/sl-clk.h                   |  31 +
 drivers/clk/berlin/sl-sysmgr-clk.c            | 250 ++++++
 drivers/clk/berlin/sl-sysmgr-clk.h            |  44 ++
 drivers/clk/berlin/sl261x-clks.c              | 385 +++++++++
 drivers/clk/berlin/sl261x-pll.c               | 145 ++++
 drivers/clk/berlin/sl261x-pll.h               |  14 +
 drivers/i3c/master/dw-i3c-master.c            |  24 +-
 drivers/i3c/master/dw-i3c-master.h            |   2 +-
 drivers/pinctrl/berlin/Kconfig                |   7 +
 drivers/pinctrl/berlin/Makefile               |   1 +
 drivers/pinctrl/berlin/berlin.c               | 259 +++++-
 drivers/pinctrl/berlin/berlin.h               |  17 +-
 drivers/pinctrl/berlin/pinctrl-sl261x.c       | 745 ++++++++++++++++++
 drivers/reset/Kconfig                         |   6 +
 drivers/reset/Makefile                        |   1 +
 drivers/reset/reset-sl261x.c                  | 224 ++++++
 include/dt-bindings/clock/syna,sl261x.h       | 131 +++
 include/dt-bindings/reset/syna,sl261x-reset.h |  80 ++
 45 files changed, 3899 insertions(+), 33 deletions(-)
 create mode 100755 Documentation/devicetree/bindings/clock/syna,sl261x-clk.yaml
 create mode 100644 Documentation/devicetree/bindings/mfd/syna,sl261x-gbl.yaml
 create mode 100644 Documentation/devicetree/bindings/reset/syna,sl261x-reset.yaml
 create mode 100644 arch/arm64/boot/dts/synaptics/sl2611-rdk.dts
 create mode 100644 arch/arm64/boot/dts/synaptics/sl2611.dtsi
 create mode 100644 arch/arm64/boot/dts/synaptics/sl2613-rdk.dts
 create mode 100644 arch/arm64/boot/dts/synaptics/sl2613.dtsi
 create mode 100644 arch/arm64/boot/dts/synaptics/sl2615-rdk.dts
 create mode 100644 arch/arm64/boot/dts/synaptics/sl2615.dtsi
 create mode 100644 arch/arm64/boot/dts/synaptics/sl2617-rdk.dts
 create mode 100644 arch/arm64/boot/dts/synaptics/sl2617.dtsi
 create mode 100644 arch/arm64/boot/dts/synaptics/sl2619-rdk.dts
 create mode 100644 arch/arm64/boot/dts/synaptics/sl2619.dtsi
 create mode 100644 arch/arm64/boot/dts/synaptics/sl261x-rdk-common.dtsi
 create mode 100644 drivers/clk/berlin/Kconfig
 create mode 100644 drivers/clk/berlin/sl-clk.c
 create mode 100644 drivers/clk/berlin/sl-clk.h
 create mode 100644 drivers/clk/berlin/sl-sysmgr-clk.c
 create mode 100644 drivers/clk/berlin/sl-sysmgr-clk.h
 create mode 100644 drivers/clk/berlin/sl261x-clks.c
 create mode 100644 drivers/clk/berlin/sl261x-pll.c
 create mode 100644 drivers/clk/berlin/sl261x-pll.h
 create mode 100644 drivers/pinctrl/berlin/pinctrl-sl261x.c
 create mode 100644 drivers/reset/reset-sl261x.c
 create mode 100644 include/dt-bindings/clock/syna,sl261x.h
 create mode 100644 include/dt-bindings/reset/syna,sl261x-reset.h
Signature · 1 line
2.53.0
Signature · 3 lines
linux-i3c mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-i3c
author maintainer
#65 lore raw
In reply to Conor Dooley
Quoted 11 lines · Conor Dooley
Quoted 9 lines · Jisheng Zhang

Add initial support for the Synaptics SL261X SoCs and corresponding RDK boards.

The SL261X SoCs include five pin-to-pin compatible SoCs: SL2611, SL2613, SL2615, SL2617, and SL2619.

Only reset, pinctrl, clk/pll, uart, gpio, i2c, spi, i3c are included in this series. The support for Ethernet, USB, SDHCI, CAN, DMAC, XSPI will be submitted after this series is merged.

Quoted 10 lines

This series is filled with wildcard compatibles, which we don't permit typically. The only case for SoCs that I've seen them accepted is when the devices covered are actually just different binnings of the same device. I took a look at the docs for this device, but it wasn't clear to me if these are actually binnings or if there are different integrations here. If they're binnings, I'd rather you used 0 as the final digit, rather than x, since that matches the synaptics documentation for the family. If they're not binnings, there's no guarantee that they share the same errata etc, and must have different compatibles.

BTW: May I query a qustion?
After searching the maillist archieves, it seems now maintainers prefer spiliting this kind of SoC initial support series into separate patches for different subsystems, e.g uart, i2c, i3c, spi and so on, then the SoC pinctrl, clk, reset and dtsi/dts files, but AIUI, there will be dtb check failures with the SoC dts(i) files patch(es), what's the normal solution then?

Quoted 104 lines

Cheers,
Conor.

Quoted 100 lines

Jisheng Zhang (20):
dt-bindings: serial: snps-dw-apb-uart: Add Synaptics sl261x uart
dt-bindings: i2c: dw: Add Synaptics sl261x i2c
spi: dt-bindings: snps,dw-apb-ssi: Add Synaptics sl261x spi
dt-bindings: i3c: dw: support up to two reset lines
i3c: dw: switch to array-based exclusive reset control
dt-bindings: i3c: Add Synaptics sl261x i3c
arm64: kconfig: let ARCH_BERLIN cover Synaptics arm64 SoCs
dt-bindings: reset: add Synaptics SL261X SoCs
reset: add Synaptics SL261x reset support
pinctrl: berlin: use u16 instead of u8 for the offset
pinctrl: berlin: enable module build support
pinctrl: berlin: add optional pinconf support
dt-bindings: pinctrl: berlin: Support Synaptics SL261X SoCs
pinctrl: berlin: support Synaptics SL261X SoCs
dt-bindings: clock: add Synaptics SL261X clock
clk: berlin: add Synaptics SL261X SoC clocks and plls
dt-bindings: mfd: Add Synaptics SL261x global block binding
regulator: dt-bindings: sy8827n: support standard properties
dt-bindings: arm: berlin: Add Synaptics SL261X SoC and RDK board
arm64: dts: synaptics: Add Synaptics SL261X SoC and RDK board

 .../bindings/arm/marvell,berlin.yaml          |  20 +
 .../bindings/clock/syna,sl261x-clk.yaml       |  92 +++
 .../bindings/i2c/snps,designware-i2c.yaml     |   1 +
 .../bindings/i3c/snps,dw-i3c-master.yaml      |   6 +-
 .../bindings/mfd/syna,sl261x-gbl.yaml         | 208 +++++
 .../pinctrl/marvell,berlin2-soc-pinctrl.yaml  |  10 +-
 .../bindings/regulator/silergy,sy8827n.yaml   |   5 +-
 .../bindings/reset/syna,sl261x-reset.yaml     |  40 +
 .../bindings/serial/snps-dw-apb-uart.yaml     |  12 +-
 .../bindings/spi/snps,dw-apb-ssi.yaml         |   1 +
 arch/arm64/Kconfig.platforms                  |   4 +-
 arch/arm64/boot/dts/synaptics/Makefile        |   5 +
 arch/arm64/boot/dts/synaptics/sl2611-rdk.dts  |  16 +
 arch/arm64/boot/dts/synaptics/sl2611.dtsi     | 490 ++++++++++++
 arch/arm64/boot/dts/synaptics/sl2613-rdk.dts  |  16 +
 arch/arm64/boot/dts/synaptics/sl2613.dtsi     |  12 +
 arch/arm64/boot/dts/synaptics/sl2615-rdk.dts  |  16 +
 arch/arm64/boot/dts/synaptics/sl2615.dtsi     |  46 ++
 arch/arm64/boot/dts/synaptics/sl2617-rdk.dts  |  16 +
 arch/arm64/boot/dts/synaptics/sl2617.dtsi     |  46 ++
 arch/arm64/boot/dts/synaptics/sl2619-rdk.dts  |  16 +
 arch/arm64/boot/dts/synaptics/sl2619.dtsi     |  44 ++
 .../boot/dts/synaptics/sl261x-rdk-common.dtsi | 135 ++++
 drivers/clk/Kconfig                           |   1 +
 drivers/clk/berlin/Kconfig                    |  25 +
 drivers/clk/berlin/Makefile                   |   4 +
 drivers/clk/berlin/sl-clk.c                   | 279 +++++++
 drivers/clk/berlin/sl-clk.h                   |  31 +
 drivers/clk/berlin/sl-sysmgr-clk.c            | 250 ++++++
 drivers/clk/berlin/sl-sysmgr-clk.h            |  44 ++
 drivers/clk/berlin/sl261x-clks.c              | 385 +++++++++
 drivers/clk/berlin/sl261x-pll.c               | 145 ++++
 drivers/clk/berlin/sl261x-pll.h               |  14 +
 drivers/i3c/master/dw-i3c-master.c            |  24 +-
 drivers/i3c/master/dw-i3c-master.h            |   2 +-
 drivers/pinctrl/berlin/Kconfig                |   7 +
 drivers/pinctrl/berlin/Makefile               |   1 +
 drivers/pinctrl/berlin/berlin.c               | 259 +++++-
 drivers/pinctrl/berlin/berlin.h               |  17 +-
 drivers/pinctrl/berlin/pinctrl-sl261x.c       | 745 ++++++++++++++++++
 drivers/reset/Kconfig                         |   6 +
 drivers/reset/Makefile                        |   1 +
 drivers/reset/reset-sl261x.c                  | 224 ++++++
 include/dt-bindings/clock/syna,sl261x.h       | 131 +++
 include/dt-bindings/reset/syna,sl261x-reset.h |  80 ++
 45 files changed, 3899 insertions(+), 33 deletions(-)
 create mode 100755 Documentation/devicetree/bindings/clock/syna,sl261x-clk.yaml
 create mode 100644 Documentation/devicetree/bindings/mfd/syna,sl261x-gbl.yaml
 create mode 100644 Documentation/devicetree/bindings/reset/syna,sl261x-reset.yaml
 create mode 100644 arch/arm64/boot/dts/synaptics/sl2611-rdk.dts
 create mode 100644 arch/arm64/boot/dts/synaptics/sl2611.dtsi
 create mode 100644 arch/arm64/boot/dts/synaptics/sl2613-rdk.dts
 create mode 100644 arch/arm64/boot/dts/synaptics/sl2613.dtsi
 create mode 100644 arch/arm64/boot/dts/synaptics/sl2615-rdk.dts
 create mode 100644 arch/arm64/boot/dts/synaptics/sl2615.dtsi
 create mode 100644 arch/arm64/boot/dts/synaptics/sl2617-rdk.dts
 create mode 100644 arch/arm64/boot/dts/synaptics/sl2617.dtsi
 create mode 100644 arch/arm64/boot/dts/synaptics/sl2619-rdk.dts
 create mode 100644 arch/arm64/boot/dts/synaptics/sl2619.dtsi
 create mode 100644 arch/arm64/boot/dts/synaptics/sl261x-rdk-common.dtsi
 create mode 100644 drivers/clk/berlin/Kconfig
 create mode 100644 drivers/clk/berlin/sl-clk.c
 create mode 100644 drivers/clk/berlin/sl-clk.h
 create mode 100644 drivers/clk/berlin/sl-sysmgr-clk.c
 create mode 100644 drivers/clk/berlin/sl-sysmgr-clk.h
 create mode 100644 drivers/clk/berlin/sl261x-clks.c
 create mode 100644 drivers/clk/berlin/sl261x-pll.c
 create mode 100644 drivers/clk/berlin/sl261x-pll.h
 create mode 100644 drivers/pinctrl/berlin/pinctrl-sl261x.c
 create mode 100644 drivers/reset/reset-sl261x.c
 create mode 100644 include/dt-bindings/clock/syna,sl261x.h
 create mode 100644 include/dt-bindings/reset/syna,sl261x-reset.h
Signature · 1 line
2.53.0
#66 lore raw
Quoted 23 lines · Jisheng Zhang
Quoted 11 lines · Conor Dooley
Quoted 9 lines · Jisheng Zhang

Add initial support for the Synaptics SL261X SoCs and corresponding RDK boards.

The SL261X SoCs include five pin-to-pin compatible SoCs: SL2611, SL2613, SL2615, SL2617, and SL2619.

Only reset, pinctrl, clk/pll, uart, gpio, i2c, spi, i3c are included in this series. The support for Ethernet, USB, SDHCI, CAN, DMAC, XSPI will be submitted after this series is merged.

Quoted 10 lines

This series is filled with wildcard compatibles, which we don't permit typically. The only case for SoCs that I've seen them accepted is when the devices covered are actually just different binnings of the same device. I took a look at the docs for this device, but it wasn't clear to me if these are actually binnings or if there are different integrations here. If they're binnings, I'd rather you used 0 as the final digit, rather than x, since that matches the synaptics documentation for the family. If they're not binnings, there's no guarantee that they share the same errata etc, and must have different compatibles.

Quoted 7 lines

BTW: May I query a qustion?
After searching the maillist archieves, it seems now maintainers prefer spiliting this kind of SoC initial support series into separate patches for different subsystems, e.g uart, i2c, i3c, spi and so on, then the SoC pinctrl, clk, reset and dtsi/dts files, but AIUI, there will be dtb check failures with the SoC dts(i) files patch(es), what's the normal solution then?

Depends on the type of failure, but yes it can be okay. If the failure is some missing schema causing validation to fail, that's fine as long as it passes in linux-next (same as when you add a new driver and binding, but the dts goes to a different branch). What's not acceptable is breaking the build because some header that provides clock defines is missing in the dts branch or in the driver branch. In that case, either send all that stuff in one "New SoC" PR to the soc tree, or put the binding headers in a shared tag that is the basis for your PR to the relevant maintainers (typically clock) and the dts PR to the soc tree.