Skip to contentSkip to conversation

arm64: add Synaptics SL2610 SoCs and RDK boards

PATCH In review Jisheng Zhang 5 participants 40 messages Nov 15 – Nov 24

Subsystems (7)
lore
Share & tools
lore

Jisheng Zhang

author maintainer
#0 lore raw

v2 cover arm64: add Synaptics SL2610 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.

since v1:
- rebase on latest rcN
- drop some patches which have been merged
- let the "gbl" node export pinctrl/reset/clk devices with MFD_CELL_NAME()
- use <linux/platform_device.h> instead of <linux/mod_devicetable.h>
- adopt some coding suggestions from Uwe
- Use 0 and 1 to select normal and strong pull-up on 10-bit pads
- collect Acked-by tag

Jisheng Zhang (13):
arm64: kconfig: let ARCH_BERLIN cover Synaptics arm64 SoCs
pinctrl: berlin: use u16 instead of u8 for the offset
pinctrl: berlin: enable module build support
pinctrl: berlin: add optional pinconf support
dt-bindings: soc: synaptics: add SL2610 system controllers
soc: synaptics: add SL2610 system controller support
reset: add Synaptics SL2610 reset controller support
pinctrl: berlin: add Synaptics SL2610 pin controller support
clk: berlin: add Synaptics clock controller helpers
clk: berlin: add Synaptics SL2610 clocks and PLLs
dt-bindings: arm: berlin: add Synaptics SL2610 SoCs and RDK boards
arm64: dts: synaptics: add SL2610 family SoCs
arm64: dts: synaptics: add SL2610 family RDK boards

 .../bindings/arm/marvell,berlin.yaml          |  20 +
 .../soc/synaptics/syna,sl2610-soc-syscon.yaml | 178 ++++
 MAINTAINERS                                   |   8 +
 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     | 457 +++++++++++
 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                    |  34 +
 drivers/clk/berlin/Makefile                   |   4 +
 drivers/clk/berlin/clk-sl2610.c               | 360 +++++++++
 drivers/clk/berlin/sl-clk.c                   | 279 +++++++
 drivers/clk/berlin/sl-clk.h                   |  31 +
 drivers/clk/berlin/sl-sysmgr-clk.c            | 241 ++++++
 drivers/clk/berlin/sl-sysmgr-clk.h            |  44 +
 drivers/clk/berlin/sl2610-pll.c               | 145 ++++
 drivers/clk/berlin/sl2610-pll.h               |  14 +
 drivers/pinctrl/berlin/Kconfig                |  16 +
 drivers/pinctrl/berlin/Makefile               |   1 +
 drivers/pinctrl/berlin/berlin.c               | 259 +++++-
 drivers/pinctrl/berlin/berlin.h               |  17 +-
 drivers/pinctrl/berlin/pinctrl-sl2610.c       | 759 ++++++++++++++++++
 drivers/reset/Kconfig                         |  13 +
 drivers/reset/Makefile                        |   1 +
 drivers/reset/reset-sl2610.c                  | 224 ++++++
 drivers/soc/Kconfig                           |   1 +
 drivers/soc/Makefile                          |   1 +
 drivers/soc/synaptics/Kconfig                 |  14 +
 drivers/soc/synaptics/Makefile                |   2 +
 drivers/soc/synaptics/sl2610-syscon.c         |  84 ++
 include/dt-bindings/clock/syna,sl2610.h       | 131 +++
 include/dt-bindings/reset/syna,sl2610-reset.h |  80 ++
 41 files changed, 3771 insertions(+), 20 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/soc/synaptics/syna,sl2610-soc-syscon.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/clk-sl2610.c
 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/sl2610-pll.c
 create mode 100644 drivers/clk/berlin/sl2610-pll.h
 create mode 100644 drivers/pinctrl/berlin/pinctrl-sl2610.c
 create mode 100644 drivers/reset/reset-sl2610.c
 create mode 100644 drivers/soc/synaptics/Kconfig
 create mode 100644 drivers/soc/synaptics/Makefile
 create mode 100644 drivers/soc/synaptics/sl2610-syscon.c
 create mode 100644 include/dt-bindings/clock/syna,sl2610.h
 create mode 100644 include/dt-bindings/reset/syna,sl2610-reset.h
Signature · 1 line
2.55.0
author maintainer
#1 lore raw

PATCH v2 1/13 arm64: kconfig: let ARCH_BERLIN cover Synaptics arm64 SoCs

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 49dcd7be82ce..b830161fe68b 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.55.0
author maintainer
#2 lore raw

PATCH v2 2/13 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.55.0
author maintainer
#3 lore raw

PATCH v2 3/13 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 8a612ce2d1d3..a0ae75b1d705 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,20 +256,17 @@ 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 =
 					devm_kzalloc_objs(&pdev->dev,
 							  *function->groups,
 							  function->ngroups);
-				if (!function->groups) {
-					kfree(pctrl->functions);
+
+				if (!function->groups)
 					return -ENOMEM;
-				}
 			}
 
 			groups = (const char **)function->groups;
@@ -326,6 +322,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)
@@ -340,3 +337,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.55.0
author maintainer
#5 lore raw

PATCH v2 4/13 pinctrl: berlin: add optional pinconf support

In reply to Jisheng Zhang

Add pin configuration support for newer Synaptics SoCs.

---
 drivers/pinctrl/berlin/Kconfig  |   1 +
 drivers/pinctrl/berlin/berlin.c | 234 +++++++++++++++++++++++++++++++-
 2 files changed, 230 insertions(+), 5 deletions(-)
drivers/pinctrl/berlin/Kconfig +1 -0
index 9b1644d1d4ea..abb1c912b9ba 100644
@@ -3,6 +3,7 @@ if (ARCH_BERLIN || COMPILE_TEST)
 
 config PINCTRL_BERLIN
 	bool
+	select GENERIC_PINCONF
 	select PINMUX
 	select REGMAP_MMIO
 
drivers/pinctrl/berlin/berlin.c +229 -5

295 lines not on this page · raw message

Signature · 1 line
2.55.0
author maintainer
#8 lore raw

PATCH v2 5/13 dt-bindings: soc: synaptics: add SL2610 system controllers

In reply to Jisheng Zhang

Describe the SoC, MCU, AVIO and CPU system control blocks, including their clock inputs, clock and reset providers, and pin configuration subnodes. The clock and reset providers share each register block node.

Add the clock and reset identifiers used by consumers of these blocks.

---
 .../soc/synaptics/syna,sl2610-soc-syscon.yaml | 178 ++++++++++++++++++
 MAINTAINERS                                   |   3 +
 include/dt-bindings/clock/syna,sl2610.h       | 131 +++++++++++++
 include/dt-bindings/reset/syna,sl2610-reset.h |  80 ++++++++
 4 files changed, 392 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/soc/synaptics/syna,sl2610-soc-syscon.yaml
 create mode 100644 include/dt-bindings/clock/syna,sl2610.h
 create mode 100644 include/dt-bindings/reset/syna,sl2610-reset.h
Documentation/devicetree/bindings/soc/synaptics/syna,sl2610-soc-syscon.yaml new file +178 -0
new file mode 100644
index 000000000000..cdf947cb3e0f
@@ -0,0 +1,178 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/soc/synaptics/syna,sl2610-soc-syscon.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Synaptics SL2610 system control registers
+
+maintainers:
+  - Jisheng Zhang <[email protected]>
+
+description: |
+  The SL2610 family has separate SoC, MCU, AVIO, and CPU system control
+  register blocks. The SoC and MCU blocks provide clocks, resets, and pin
+  control. The CPU block provides clocks. The AVIO block contains audio PLLs.
+
+  Clock and reset specifiers refer directly to the system control node.
+  Pin group configurations are direct children of the SoC or MCU node.
+  There are no separate clock, reset, or pin controller child nodes.
+
+properties:
+  compatible:
+    items:
+      - enum:
+          - syna,sl2610-soc-syscon
+          - syna,sl2610-mcu-syscon
+          - syna,sl2610-avio-syscon
+          - syna,sl2610-cpu-syscon
+      - const: syscon
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+    description: External reference clock input.
+
+  '#clock-cells':
+    const: 1
+
+  '#reset-cells':
+    const: 1
+
+  syna,gbl-syscon:
+    $ref: /schemas/types.yaml#/definitions/phandle
+    description: Phandle to the SoC system control registers for CPU PLL bypass.
+
+patternProperties:
+  '-(pmux|pins)$':
+    type: object
+    description: Pin group mux and electrical configuration.
+    allOf:
+      - $ref: /schemas/pinctrl/pinmux-node.yaml#
+      - $ref: /schemas/pinctrl/pincfg-node.yaml#
+    properties:
+      groups:
+        $ref: /schemas/types.yaml#/definitions/string-array
+      function:
+        $ref: /schemas/types.yaml#/definitions/string
+      bias-pull-up:
+        description: |
+          Enable pull-up bias and select its strength. A value of 0 selects
+          normal pull-up and 1 selects strong pull-up. The boolean form is
+          equivalent to 1 and selects strong pull-up. Use bias-disable to
+          disable pull bias. Values are mode selectors, not resistance in Ohms.
+        oneOf:
+          - type: boolean
+          - $ref: /schemas/types.yaml#/definitions/uint32
+            enum: [0, 1]
+      bias-pull-down:
+        description: |
+          Enable the default pull-down with a boolean or 1, or disable it with 0.
+          Pull resistance is not selectable.
+        oneOf:
+          - type: boolean
+          - $ref: /schemas/types.yaml#/definitions/uint32
+            enum: [0, 1]
+    required:
+      - groups
+      - function
+    unevaluatedProperties: false
+
+required:
+  - compatible
+  - reg
+  - clocks
+
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - syna,sl2610-soc-syscon
+              - syna,sl2610-mcu-syscon
+    then:
+      required:
+        - '#clock-cells'
+        - '#reset-cells'
+    else:
+      properties:
+        '#reset-cells': false
+      patternProperties:
+        '-(pmux|pins)$': false
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: syna,sl2610-cpu-syscon
+    then:
+      required:
+        - '#clock-cells'
+        - syna,gbl-syscon
+    else:
+      properties:
+        syna,gbl-syscon: false
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: syna,sl2610-avio-syscon
+    then:
+      properties:
+        '#clock-cells': false
+
+additionalProperties: false
+
+examples:
+  - |
+    soc_syscon: syscon@f7e10000 {
+        compatible = "syna,sl2610-soc-syscon", "syscon";
+        reg = <0xf7e10000 0x10000>;
+        clocks = <&osc>;
+        #clock-cells = <1>;
+        #reset-cells = <1>;
+
+        i2c2-pmux {
+            groups = "GPIO23", "GPIO24";
+            function = "tw2";
+            bias-pull-up = <0>;
+        };
+
+        i2c3-pmux {
+            groups = "GPIO27", "GPIO28";
+            function = "tw3";
+            bias-pull-up;
+        };
+    };
+
+    syscon@e5025000 {
+        compatible = "syna,sl2610-mcu-syscon", "syscon";
+        reg = <0xe5025000 0x1000>;
+        clocks = <&osc>;
+        #clock-cells = <1>;
+        #reset-cells = <1>;
+
+        i2c0-pmux {
+            groups = "SM_GPIO12", "SM_GPIO13";
+            function = "tw0";
+        };
+    };
+
+    syscon@f7e30000 {
+        compatible = "syna,sl2610-cpu-syscon", "syscon";
+        reg = <0xf7e30000 0x4000>;
+        clocks = <&osc>;
+        #clock-cells = <1>;
+        syna,gbl-syscon = <&soc_syscon>;
+    };
+
+    syscon@f7490000 {
+        compatible = "syna,sl2610-avio-syscon", "syscon";
+        reg = <0xf7490000 0x4000>;
+        clocks = <&osc>;
+    };
+...
MAINTAINERS +3 -0
index 222b7fc2c3aa..e7c061ae5a87 100644
@@ -3808,9 +3808,12 @@ M:	Jisheng Zhang <[email protected]>
 M:	Sebastian Hesselbarth <[email protected]>
 L:	[email protected] (moderated for non-subscribers)
 S:	Maintained
+F:	Documentation/devicetree/bindings/soc/synaptics/
 F:	arch/arm/boot/dts/synaptics/
 F:	arch/arm/mach-berlin/
 F:	arch/arm64/boot/dts/synaptics/
+F:	include/dt-bindings/clock/syna,sl2610.h
+F:	include/dt-bindings/reset/syna,sl2610-reset.h
 
 ARM/TEGRA HDMI CEC SUBSYSTEM SUPPORT
 M:	Hans Verkuil <[email protected]>
include/dt-bindings/clock/syna,sl2610.h new file +131 -0

131 lines not on this page · raw message

include/dt-bindings/reset/syna,sl2610-reset.h new file +80 -0

80 lines not on this page · raw message

Signature · 1 line
2.55.0
author maintainer
#13 lore raw

PATCH v2 6/13 soc: synaptics: add SL2610 system controller support

In reply to Jisheng Zhang

Create the clock, reset and pin controller platform devices implemented by each SL2610 system control block. Select the appropriate MFD cells from per-block compatible data while keeping register access available through the shared syscon.

---
 MAINTAINERS                           |  1 +
 drivers/soc/Kconfig                   |  1 +
 drivers/soc/Makefile                  |  1 +
 drivers/soc/synaptics/Kconfig         | 14 +++++
 drivers/soc/synaptics/Makefile        |  2 +
 drivers/soc/synaptics/sl2610-syscon.c | 84 +++++++++++++++++++++++++++
 6 files changed, 103 insertions(+)
 create mode 100644 drivers/soc/synaptics/Kconfig
 create mode 100644 drivers/soc/synaptics/Makefile
 create mode 100644 drivers/soc/synaptics/sl2610-syscon.c
MAINTAINERS +1 -0
index e7c061ae5a87..eae1493485ee 100644
@@ -3812,6 +3812,7 @@ F:	Documentation/devicetree/bindings/soc/synaptics/
 F:	arch/arm/boot/dts/synaptics/
 F:	arch/arm/mach-berlin/
 F:	arch/arm64/boot/dts/synaptics/
+F:	drivers/soc/synaptics/
 F:	include/dt-bindings/clock/syna,sl2610.h
 F:	include/dt-bindings/reset/syna,sl2610-reset.h
 
drivers/soc/Kconfig +1 -0
index 483cbdcae153..5fe7348cddab 100644
@@ -27,6 +27,7 @@ source "drivers/soc/sophgo/Kconfig"
 source "drivers/soc/st/Kconfig"
 source "drivers/soc/starfive/Kconfig"
 source "drivers/soc/sunxi/Kconfig"
+source "drivers/soc/synaptics/Kconfig"
 source "drivers/soc/tegra/Kconfig"
 source "drivers/soc/ti/Kconfig"
 source "drivers/soc/ux500/Kconfig"
drivers/soc/Makefile +1 -0
index 5a3efd68355c..3e51563b914c 100644
@@ -33,6 +33,7 @@ obj-y				+= sophgo/
 obj-y				+= st/
 obj-y				+= starfive/
 obj-y				+= sunxi/
+obj-y				+= synaptics/
 obj-$(CONFIG_ARCH_TEGRA)	+= tegra/
 obj-y				+= ti/
 obj-$(CONFIG_ARCH_U8500)	+= ux500/
drivers/soc/synaptics/Kconfig new file +14 -0
new file mode 100644
index 000000000000..9f0324a1a3b7
@@ -0,0 +1,14 @@
+# SPDX-License-Identifier: GPL-2.0-only
+
+config SOC_SL2610_SYSCON
+	tristate "Synaptics SL2610 system controller"
+	depends on ARCH_BERLIN || COMPILE_TEST
+	depends on OF && HAS_IOMEM
+	select MFD_CORE
+	select MFD_SYSCON
+	help
+	  Support the global and control register blocks on Synaptics SL2610
+	  SoCs. This creates devices for the clock, reset and pin controllers
+	  provided by each register block.
+
+	  Say Y here to enable access to these functions on SL2610 systems.
drivers/soc/synaptics/Makefile new file +2 -0
new file mode 100644
index 000000000000..13710fc58903
@@ -0,0 +1,2 @@
+# SPDX-License-Identifier: GPL-2.0-only
+obj-$(CONFIG_SOC_SL2610_SYSCON) += sl2610-syscon.o
drivers/soc/synaptics/sl2610-syscon.c new file +84 -0

84 lines not on this page · raw message

Signature · 1 line
2.55.0
author maintainer
#18 lore raw

PATCH v2 7/13 reset: add Synaptics SL2610 reset controller support

In reply to Jisheng Zhang

Support the SoC and MCU reset controls exposed by the SL2610 system controllers. Match the MFD-created platform devices, use the parent syscon regmap and register each reset provider against the parent DT node.

Handle both pulse resets and sticky resets with assert/deassert controls.

---
 MAINTAINERS                  |   1 +
 drivers/reset/Kconfig        |  13 ++
 drivers/reset/Makefile       |   1 +
 drivers/reset/reset-sl2610.c | 224 +++++++++++++++++++++++++++++++++++
 4 files changed, 239 insertions(+)
 create mode 100644 drivers/reset/reset-sl2610.c
MAINTAINERS +1 -0
index eae1493485ee..1bd3b2f39865 100644
@@ -3812,6 +3812,7 @@ F:	Documentation/devicetree/bindings/soc/synaptics/
 F:	arch/arm/boot/dts/synaptics/
 F:	arch/arm/mach-berlin/
 F:	arch/arm64/boot/dts/synaptics/
+F:	drivers/reset/reset-sl2610.c
 F:	drivers/soc/synaptics/
 F:	include/dt-bindings/clock/syna,sl2610.h
 F:	include/dt-bindings/reset/syna,sl2610-reset.h
drivers/reset/Kconfig +13 -0
index eda9c698a95f..98e973a8798c 100644
@@ -358,6 +358,19 @@ config RESET_SUNXI
 	help
 	  This enables the reset driver for Allwinner SoCs.
 
+config RESET_SL2610
+	tristate "Synaptics SL2610 Reset Driver"
+	depends on ARCH_BERLIN || COMPILE_TEST
+	depends on OF && HAS_IOMEM
+	select SOC_SL2610_SYSCON
+	help
+	  Support the reset controllers in the SoC and MCU system control
+	  blocks of Synaptics SL2610 SoCs. Both pulse and sticky reset lines
+	  are supported.
+
+	  To compile this driver as a module, choose M here. The module will
+	  be called reset-sl2610.
+
 config RESET_TENSTORRENT_ATLANTIS
 	tristate "Tenstorrent atlantis reset driver"
 	depends on ARCH_TENSTORRENT || COMPILE_TEST
drivers/reset/Makefile +1 -0
index 489fafd6bbe3..d28276a4f2ea 100644
@@ -42,6 +42,7 @@ obj-$(CONFIG_RESET_SCMI) += reset-scmi.o
 obj-$(CONFIG_RESET_SIMPLE) += reset-simple.o
 obj-$(CONFIG_RESET_SKY1) += reset-sky1.o
 obj-$(CONFIG_RESET_SKY1_AUDSS) += reset-sky1-audss.o
+obj-$(CONFIG_RESET_SL2610) += reset-sl2610.o
 obj-$(CONFIG_RESET_SOCFPGA) += reset-socfpga.o
 obj-$(CONFIG_RESET_SUNPLUS) += reset-sunplus.o
 obj-$(CONFIG_RESET_SUNXI) += reset-sunxi.o
drivers/reset/reset-sl2610.c new file +224 -0

224 lines not on this page · raw message

Signature · 1 line
2.55.0
author maintainer
#22 lore raw

PATCH v2 8/13 pinctrl: berlin: add Synaptics SL2610 pin controller support

In reply to Jisheng Zhang

Add the SoC and MCU pin groups and mux functions for SL2610, together with their pad configuration register descriptions. Bind to the platform devices created by the system controller and associate pin configurations with the parent syscon DT node.

---
 MAINTAINERS                             |   1 +
 drivers/pinctrl/berlin/Kconfig          |  15 +
 drivers/pinctrl/berlin/Makefile         |   1 +
 drivers/pinctrl/berlin/pinctrl-sl2610.c | 759 ++++++++++++++++++++++++
 4 files changed, 776 insertions(+)
 create mode 100644 drivers/pinctrl/berlin/pinctrl-sl2610.c
MAINTAINERS +1 -0
index 1bd3b2f39865..b5bc76062771 100644
@@ -3812,6 +3812,7 @@ F:	Documentation/devicetree/bindings/soc/synaptics/
 F:	arch/arm/boot/dts/synaptics/
 F:	arch/arm/mach-berlin/
 F:	arch/arm64/boot/dts/synaptics/
+F:	drivers/pinctrl/berlin/pinctrl-sl2610.c
 F:	drivers/reset/reset-sl2610.c
 F:	drivers/soc/synaptics/
 F:	include/dt-bindings/clock/syna,sl2610.h
drivers/pinctrl/berlin/Kconfig +15 -0
index abb1c912b9ba..79541a4a81aa 100644
@@ -32,4 +32,19 @@ config PINCTRL_BERLIN_BG4CT
 	depends on OF
 	select PINCTRL_BERLIN
 
+config PINCTRL_SL2610
+	tristate "Synaptics SL2610 pin controller driver"
+	depends on OF && HAS_IOMEM
+	select SOC_SL2610_SYSCON
+	select GENERIC_PINCONF
+	select PINCONF
+	select PINCTRL_BERLIN
+	help
+	  Support the SoC and MCU pin controllers on Synaptics SL2610 SoCs.
+	  These provide pin multiplexing and electrical pad configuration
+	  through their parent system control blocks.
+
+	  To compile this driver as a module, choose M here. The module will
+	  be called pinctrl-sl2610.
+
 endif
drivers/pinctrl/berlin/Makefile +1 -0
index 7b4aa5444a4a..448965293e6a 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_SL2610)		+= pinctrl-sl2610.o
drivers/pinctrl/berlin/pinctrl-sl2610.c new file +759 -0

759 lines not on this page · raw message

Signature · 1 line
2.55.0
author maintainer
#25 lore raw

PATCH v2 9/13 clk: berlin: add Synaptics clock controller helpers

In reply to Jisheng Zhang

Add the configurable divider and gate clock implementation shared by Synaptics system controllers. Provide the MCU system manager helper for registering its fixed clocks, gates and peripheral dividers.

Keep clock resources managed by the MFD clock device and obtain the register range and provider node from its parent.

---
 MAINTAINERS                        |   1 +
 drivers/clk/Kconfig                |   1 +
 drivers/clk/berlin/Kconfig         |   7 +
 drivers/clk/berlin/Makefile        |   2 +
 drivers/clk/berlin/sl-clk.c        | 279 +++++++++++++++++++++++++++++
 drivers/clk/berlin/sl-clk.h        |  31 ++++
 drivers/clk/berlin/sl-sysmgr-clk.c | 241 +++++++++++++++++++++++++
 drivers/clk/berlin/sl-sysmgr-clk.h |  44 +++++
 8 files changed, 606 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
MAINTAINERS +1 -0
index b5bc76062771..f3067f71d54c 100644
@@ -3812,6 +3812,7 @@ F:	Documentation/devicetree/bindings/soc/synaptics/
 F:	arch/arm/boot/dts/synaptics/
 F:	arch/arm/mach-berlin/
 F:	arch/arm64/boot/dts/synaptics/
+F:	drivers/clk/berlin/sl-*
 F:	drivers/pinctrl/berlin/pinctrl-sl2610.c
 F:	drivers/reset/reset-sl2610.c
 F:	drivers/soc/synaptics/
drivers/clk/Kconfig +1 -0
index 37a8e35d4178..906fabfe0d33 100644
@@ -514,6 +514,7 @@ source "drivers/clk/analogbits/Kconfig"
 source "drivers/clk/anlogic/Kconfig"
 source "drivers/clk/aspeed/Kconfig"
 source "drivers/clk/bcm/Kconfig"
+source "drivers/clk/berlin/Kconfig"
 source "drivers/clk/cix/Kconfig"
 source "drivers/clk/davinci/Kconfig"
 source "drivers/clk/eswin/Kconfig"
drivers/clk/berlin/Kconfig new file +7 -0
new file mode 100644
index 000000000000..8f71d4c7a478
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: GPL-2.0
+
+config SL_COMMON_CLK
+	bool
+
+config SL_SYSMGR_CLK
+	bool
drivers/clk/berlin/Makefile +2 -0
index 3733733a4806..5dbd0fd264ad 100644
@@ -3,3 +3,5 @@ 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
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 +241 -0

241 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

Signature · 1 line
2.55.0
author maintainer
#27 lore raw

PATCH v2 10/13 clk: berlin: add Synaptics SL2610 clocks and PLLs

In reply to Jisheng Zhang

Support the SL2610 SoC, CPU, AVIO and MCU clocks. Register the PLL outputs and the divider, gate and fixed-factor clocks used by the CPU and peripherals.

Match MFD platform devices and register clock providers on their parent system controller nodes.

---
 MAINTAINERS                     |   1 +
 drivers/clk/berlin/Kconfig      |  27 +++
 drivers/clk/berlin/Makefile     |   2 +
 drivers/clk/berlin/clk-sl2610.c | 360 ++++++++++++++++++++++++++++++++
 drivers/clk/berlin/sl2610-pll.c | 145 +++++++++++++
 drivers/clk/berlin/sl2610-pll.h |  14 ++
 6 files changed, 549 insertions(+)
 create mode 100644 drivers/clk/berlin/clk-sl2610.c
 create mode 100644 drivers/clk/berlin/sl2610-pll.c
 create mode 100644 drivers/clk/berlin/sl2610-pll.h
MAINTAINERS +1 -0
index f3067f71d54c..430758242906 100644
@@ -3812,6 +3812,7 @@ F:	Documentation/devicetree/bindings/soc/synaptics/
 F:	arch/arm/boot/dts/synaptics/
 F:	arch/arm/mach-berlin/
 F:	arch/arm64/boot/dts/synaptics/
+F:	drivers/clk/berlin/*sl2610*
 F:	drivers/clk/berlin/sl-*
 F:	drivers/pinctrl/berlin/pinctrl-sl2610.c
 F:	drivers/reset/reset-sl2610.c
drivers/clk/berlin/Kconfig +27 -0
index 8f71d4c7a478..be7e47e0ff52 100644
@@ -5,3 +5,30 @@ config SL_COMMON_CLK
 
 config SL_SYSMGR_CLK
 	bool
+
+config SL2610_PLL
+	tristate "Synaptics SL2610 PLL Driver"
+	depends on ARCH_BERLIN || COMPILE_TEST
+	default n
+	help
+	  Support the integer and fractional PLL outputs used by the SoC,
+	  CPU and audio clock controllers on Synaptics SL2610 SoCs.
+
+	  To compile this driver as a module, choose M here. The module will
+	  be called sl2610-pll.
+
+config SL2610_CLK
+	tristate "Synaptics SL2610 Clock Driver"
+	depends on ARCH_BERLIN || COMPILE_TEST
+	depends on OF && HAS_IOMEM
+	select SL2610_PLL
+	select SL_COMMON_CLK
+	select SL_SYSMGR_CLK
+	select SOC_SL2610_SYSCON
+	help
+	  This driver provides support for clock controller on Synaptics SL2610
+	  SoC. The clock controller generates and supplies clocks to various
+	  peripherals within the SoC.
+
+	  To compile this driver as a module, choose M here. The module will
+	  be called clk-sl2610.
drivers/clk/berlin/Makefile +2 -0
index 5dbd0fd264ad..ec87dbed7dd4 100644
@@ -5,3 +5,5 @@ 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_SL2610_PLL)	+= sl2610-pll.o
+obj-$(CONFIG_SL2610_CLK)	+= clk-sl2610.o
drivers/clk/berlin/clk-sl2610.c new file +360 -0

360 lines not on this page · raw message

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

145 lines not on this page · raw message

drivers/clk/berlin/sl2610-pll.h new file +14 -0
new file mode 100644
index 000000000000..b61a93b28610
@@ -0,0 +1,14 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef __SL2610_PLL_H
+#define __SL2610_PLL_H
+
+#include <linux/io.h>
+
+struct clk_hw_onecell_data;
+struct device;
+struct device_node;
+
+int sl2610_pll_register(struct device *dev, void __iomem *ctrl,
+			const char *out, const char *outf);
+
+#endif /* __SL2610_PLL_H */
Signature · 1 line
2.55.0
author maintainer
#29 lore raw

PATCH v2 11/13 dt-bindings: arm: berlin: add Synaptics SL2610 SoCs and RDK boards

In reply to Jisheng Zhang

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

The SL2610 family includes five pin-to-pin compatible SoCs: SL2611, SL2613, SL2615, SL2617, and SL2619.

---
 .../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.55.0
author maintainer
#30 lore raw

PATCH v2 12/13 arm64: dts: synaptics: add SL2610 family SoCs

In reply to Jisheng Zhang

Describe the CPUs, interrupt controller, system controllers and supported serial, I2C, I3C, SPI and GPIO peripherals for the SL2610 family.

Use the SL2610 peripheral compatibles already documented in the upstream bindings and share clock, reset and pin configuration providers through the system controller nodes.

---
 arch/arm64/boot/dts/synaptics/sl2611.dtsi | 457 ++++++++++++++++++++++
 arch/arm64/boot/dts/synaptics/sl2613.dtsi |  12 +
 arch/arm64/boot/dts/synaptics/sl2615.dtsi |  46 +++
 arch/arm64/boot/dts/synaptics/sl2617.dtsi |  46 +++
 arch/arm64/boot/dts/synaptics/sl2619.dtsi |  44 +++
 5 files changed, 605 insertions(+)
 create mode 100644 arch/arm64/boot/dts/synaptics/sl2611.dtsi
 create mode 100644 arch/arm64/boot/dts/synaptics/sl2613.dtsi
 create mode 100644 arch/arm64/boot/dts/synaptics/sl2615.dtsi
 create mode 100644 arch/arm64/boot/dts/synaptics/sl2617.dtsi
 create mode 100644 arch/arm64/boot/dts/synaptics/sl2619.dtsi
arch/arm64/boot/dts/synaptics/sl2611.dtsi new file +457 -0
new file mode 100644
index 000000000000..663fe6034ba0
@@ -0,0 +1,457 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (C) 2024 Synaptics Incorporated
+ *
+ * Author: Jisheng Zhang <[email protected]>
+ */
+
+#include <dt-bindings/clock/syna,sl2610.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/reset/syna,sl2610-reset.h>
+
+/ {
+	compatible = "syna,sl2611";
+	interrupt-parent = <&gic>;
+	#address-cells = <2>;
+	#size-cells = <2>;
+
+	psci {
+		compatible = "arm,psci-1.0";
+		method = "smc";
+	};
+
+	optee {
+		compatible = "linaro,optee-tz";
+		method = "smc";
+	};
+
+	cpus {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		cpu0: cpu@0 {
+			compatible = "arm,cortex-a55";
+			device_type = "cpu";
+			reg = <0x0>;
+			enable-method = "psci";
+			cpu-idle-states = <&CPU_SLEEP_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";
+				cache-size = <65536>;
+				cache-line-size = <64>;
+				cache-sets = <256>;
+				cache-level = <2>;
+				cache-unified;
+				next-level-cache = <&L3>;
+			};
+		};
+
+		L3: l3-cache0 {
+			compatible = "cache";
+			cache-level = <3>;
+			cache-unified;
+			cache-size = <262144>;
+			cache-line-size = <64>;
+			cache-sets = <256>;
+		};
+
+		idle-states {
+			entry-method = "psci";
+			CPU_SLEEP_0: cpu-sleep-0 {
+				compatible = "arm,idle-state";
+				local-timer-stop;
+				arm,psci-suspend-param = <0x0010000>;
+				entry-latency-us = <75>;
+				exit-latency-us = <155>;
+				min-residency-us = <50000>;
+			};
+		};
+	};
+
+	osc: osc {
+		compatible = "fixed-clock";
+		#clock-cells = <0>;
+	};
+
+	pmu {
+		compatible = "arm,cortex-a55-pmu";
+		interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>;
+		interrupt-affinity = <&cpu0>;
+	};
+
+	timer {
+		compatible = "arm,armv8-timer";
+		interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
+			     <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
+			     <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
+			     <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>;
+	};
+
+	soc {
+		compatible = "simple-bus";
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges = <0 0 0 0xffffffff>;
+
+		sm-bus {
+			compatible = "simple-bus";
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges;
+			dma-ranges = <0xa0000000 0x00000000 0x10000000>;
+
+			sm_clk: sm_pinctrl: sm_rst: sm_chip: syscon@e5025000 {
+				compatible = "syna,sl2610-mcu-syscon", "syscon";
+				reg = <0xe5025000 0x1000>;
+				#clock-cells = <1>;
+				#reset-cells = <1>;
+				clocks = <&osc>;
+			};
+
+			sm_uart0: serial@e5030000 {
+				compatible = "syna,sl2610-uart", "snps,dw-apb-uart";
+				reg = <0xe5030000 0x100>;
+				interrupts = <GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>;
+				clocks = <&sm_clk CLK_SER_UART0>, <&sm_clk CLK_CFG_UART0>;
+				clock-names = "baudclk", "apb_pclk";
+				reg-shift = <2>;
+				status = "disabled";
+			};
+
+			sm_uart1: serial@e5031000 {
+				compatible = "syna,sl2610-uart", "snps,dw-apb-uart";
+				reg = <0xe5031000 0x100>;
+				interrupts = <GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>;
+				clocks = <&sm_clk CLK_SER_UART1>, <&sm_clk CLK_CFG_UART1>;
+				clock-names = "baudclk", "apb_pclk";
+				reg-shift = <2>;
+				status = "disabled";
+			};
+
+			sm_uart2: serial@e5032000 {
+				compatible = "syna,sl2610-uart", "snps,dw-apb-uart";
+				reg = <0xe5032000 0x100>;
+				interrupts = <GIC_SPI 132 IRQ_TYPE_LEVEL_HIGH>;
+				clocks = <&sm_clk CLK_SER_UART2>, <&sm_clk CLK_CFG_UART2>;
+				clock-names = "baudclk", "apb_pclk";
+				reg-shift = <2>;
+				status = "disabled";
+			};
+
+			sm_uart3: serial@e5033000 {
+				compatible = "syna,sl2610-uart", "snps,dw-apb-uart";
+				reg = <0xe5033000 0x100>;
+				interrupts = <GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>;
+				clocks = <&sm_clk CLK_SER_UART3>, <&sm_clk CLK_CFG_UART3>;
+				clock-names = "baudclk", "apb_pclk";
+				reg-shift = <2>;
+				status = "disabled";
+			};
+
+			sm_spi1: spi@e5034000 {
+				compatible = "syna,sl2610-spi", "snps,dw-apb-ssi";
+				reg = <0xe5034000 0x100>;
+				#address-cells = <1>;
+				#size-cells = <0>;
+				num-cs = <4>;
+				clocks = <&sm_clk CLK_SER_SPIM>, <&sm_clk CLK_CFG_SPIM>;
+				clock-names = "ssi_clk", "pclk";
+				interrupts = <GIC_SPI 134 IRQ_TYPE_LEVEL_HIGH>;
+				status = "disabled";
+			};
+
+			sm_i2c0: i2c@e5035000 {
+				compatible = "syna,sl2610-i2c", "snps,designware-i2c";
+				#address-cells = <1>;
+				#size-cells = <0>;
+				reg = <0xe5035000 0x100>;
+				clocks = <&sm_clk CLK_SER_I2CM0>, <&sm_clk CLK_CFG_I2CM0>;
+				clock-names = "ref", "pclk";
+				i2c-sda-falling-time-ns = <510>;
+				i2c-scl-falling-time-ns = <510>;
+				interrupts = <GIC_SPI 135 IRQ_TYPE_LEVEL_HIGH>;
+				status = "disabled";
+			};
+
+			sm_i2c1: i2c@e5036000 {
+				compatible = "syna,sl2610-i2c", "snps,designware-i2c";
+				#address-cells = <1>;
+				#size-cells = <0>;
+				reg = <0xe5036000 0x100>;
+				clocks = <&sm_clk CLK_SER_I2CM1>, <&sm_clk CLK_CFG_I2CM1>;
+				clock-names = "ref", "pclk";
+				i2c-sda-falling-time-ns = <510>;
+				i2c-scl-falling-time-ns = <510>;
+				interrupts = <GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>;
+				status = "disabled";
+			};
+
+			sm_i3c0: i3c@e5037000 {
+				compatible = "syna,sl2610-i3c", "snps,dw-i3c-master-1.00a";
+				#address-cells = <3>;
+				#size-cells = <0>;
+				reg = <0xe5037000 0x1000>;
+				interrupts = <GIC_SPI 129 IRQ_TYPE_LEVEL_HIGH>;
+				resets = <&sm_rst RST_SM_I3CSRST>, <&sm_rst RST_SM_I3CPRST>;
+				clocks = <&sm_clk CLK_SER_I3C>, <&sm_clk CLK_CFG_I3C>;
+				clock-names = "core", "apb";
+				status = "disabled";
+			};
+
+			sm_gpio0: gpio@e5038000 {
+				compatible = "snps,dw-apb-gpio";
+				reg = <0xe5038000 0x400>;
+				#address-cells = <1>;
+				#size-cells = <0>;
+				clocks = <&sm_clk CLK_CFG_GPIO>, <&sm_clk CLK_DEB_GPIO>;
+				clock-names = "bus", "db";
+
+				portc: gpio-port@0 {
+					compatible = "snps,dw-apb-gpio-port";
+					gpio-controller;
+					#gpio-cells = <2>;
+					ngpios = <16>;
+					reg = <0>;
+				};
+			};
+
+			sm_gpio1: gpio@e5039000 {
+				compatible = "snps,dw-apb-gpio";
+				reg = <0xe5039000 0x400>;
+				#address-cells = <1>;
+				#size-cells = <0>;
+				clocks = <&sm_clk CLK_CFG_GPIO>, <&sm_clk CLK_DEB_GPIO>;
+				clock-names = "bus", "db";
+
+				portd: gpio-port@0 {
+					compatible = "snps,dw-apb-gpio-port";
+					gpio-controller;
+					#gpio-cells = <2>;
+					ngpios = <8>;
+					reg = <0>;
+				};
+			};
+
+			sm_gpio2: gpio@e503a000 {
+				compatible = "snps,dw-apb-gpio";
+				reg = <0xe503a000 0x400>;
+				#address-cells = <1>;
+				#size-cells = <0>;
+				clocks = <&sm_clk CLK_CFG_GPIO>, <&sm_clk CLK_DEB_GPIO>;
+				clock-names = "bus", "db";
+
+				porte: gpio-port@0 {
+					compatible = "snps,dw-apb-gpio-port";
+					gpio-controller;
+					#gpio-cells = <2>;
+					ngpios = <8>;
+					reg = <0>;
+				};
+			};
+
+			sm_gpio3: gpio@e503b000 {
+				compatible = "snps,dw-apb-gpio";
+				reg = <0xe503b000 0x400>;
+				#address-cells = <1>;
+				#size-cells = <0>;
+				clocks = <&sm_clk CLK_CFG_GPIO>, <&sm_clk CLK_DEB_GPIO>;
+				clock-names = "bus", "db";
+
+				portf: gpio-port@0 {
+					compatible = "snps,dw-apb-gpio-port";
+					gpio-controller;
+					#gpio-cells = <2>;
+					ngpios = <8>;
+					reg = <0>;
+				};
+			};
+		};
+
+		aioclk: aviogbl: syscon@f7490000 {
+			compatible = "syna,sl2610-avio-syscon", "syscon";
+			reg = <0xf7490000 0x4000>;
+			clocks = <&osc>;
+		};
+
+		clk: pinctrl: rst: chip: syscon@f7e10000 {
+			compatible = "syna,sl2610-soc-syscon", "syscon";
+			reg = <0xf7e10000 0x10000>;
+			#clock-cells = <1>;
+			#reset-cells = <1>;
+			clocks = <&osc>;
+		};
+
+		cpuclk: cpu_wrap: syscon@f7e30000 {
+			compatible = "syna,sl2610-cpu-syscon", "syscon";
+			reg = <0xf7e30000 0x4000>;
+			#clock-cells = <1>;
+			clocks = <&osc>;
+			syna,gbl-syscon = <&chip>;
+		};
+
+		gic: interrupt-controller@f7e59000 {
+			compatible = "arm,gic-400";
+			#interrupt-cells = <3>;
+			interrupt-controller;
+			reg = <0xf7e59000 0x1000>,
+			      <0xf7e5a000 0x2000>,
+			      <0xf7e5c000 0x2000>,
+			      <0xf7e5e000 0x2000>;
+			interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
+		};
+
+		soc_uart0: serial@f7f00000 {
+			compatible = "syna,sl2610-uart", "snps,dw-apb-uart";
+			reg = <0xf7f00000 0x100>;
+			interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&clk CLK_APBUART0>;
+			reg-shift = <2>;
+			status = "disabled";
+		};
+
+		soc_uart1: serial@f7f01000 {
+			compatible = "syna,sl2610-uart", "snps,dw-apb-uart";
+			reg = <0xf7f01000 0x100>;
+			interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&clk CLK_APBUART1>;
+			reg-shift = <2>;
+			status = "disabled";
+		};
+
+		soc_uart2: serial@f7f02000 {
+			compatible = "syna,sl2610-uart", "snps,dw-apb-uart";
+			reg = <0xf7f02000 0x100>;
+			interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&clk CLK_APBUART2>;
+			reg-shift = <2>;
+			status = "disabled";
+		};
+
+		soc_uart3: serial@f7f03000 {
+			compatible = "syna,sl2610-uart", "snps,dw-apb-uart";
+			reg = <0xf7f03000 0x100>;
+			interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&clk CLK_APBUART3>;
+			reg-shift = <2>;
+			status = "disabled";
+		};
+
+		soc_spi0: spi@f7f04000 {
+			compatible = "syna,sl2610-spi", "snps,dw-apb-ssi";
+			reg = <0xf7f04000 0x100>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			num-cs = <4>;
+			clocks = <&clk CLK_APBSPI0>;
+			interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
+			status = "disabled";
+		};
+
+		soc_i2c0: i2c@f7f05000 {
+			compatible = "syna,sl2610-i2c", "snps,designware-i2c";
+			#address-cells = <1>;
+			#size-cells = <0>;
+			reg = <0xf7f05000 0x100>;
+			clocks = <&clk CLK_APBI2C0>;
+			i2c-sda-hold-time-ns = <449>;
+			i2c-sda-falling-time-ns = <425>;
+			i2c-scl-falling-time-ns = <205>;
+			interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
+			status = "disabled";
+		};
+
+		soc_i2c1: i2c@f7f06000 {
+			compatible = "syna,sl2610-i2c", "snps,designware-i2c";
+			#address-cells = <1>;
+			#size-cells = <0>;
+			reg = <0xf7f06000 0x100>;
+			clocks = <&clk CLK_APBI2C1>;
+			i2c-sda-hold-time-ns = <449>;
+			i2c-sda-falling-time-ns = <425>;
+			i2c-scl-falling-time-ns = <205>;
+			interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
+			status = "disabled";
+		};
+
+		soc_gpio0: gpio@f7f07000 {
+			compatible = "snps,dw-apb-gpio";
+			reg = <0xf7f07000 0x400>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			clocks = <&clk CLK_APBGPIO>;
+			clock-names = "bus";
+
+			porta: gpio-port@0 {
+				compatible = "snps,dw-apb-gpio-port";
+				gpio-controller;
+				#gpio-cells = <2>;
+				ngpios = <32>;
+				reg = <0>;
+				interrupt-controller;
+				#interrupt-cells = <2>;
+				interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>;
+			};
+		};
+
+		soc_spi1: spi@f7f0b000 {
+			compatible = "syna,sl2610-spi", "snps,dw-apb-ssi";
+			reg = <0xf7f0b000 0x100>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			num-cs = <4>;
+			clocks = <&clk CLK_APBSPI1>;
+			interrupts = <GIC_SPI 199 IRQ_TYPE_LEVEL_HIGH>;
+			status = "disabled";
+		};
+
+		soc_spi2: spi@f7f0c000 {
+			compatible = "syna,sl2610-spi", "snps,dw-apb-ssi";
+			reg = <0xf7f0c000 0x100>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			num-cs = <4>;
+			clocks = <&clk CLK_APBSPI2>;
+			interrupts = <GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH>;
+			status = "disabled";
+		};
+
+		soc_spi3: spi@f7f0d000 {
+			compatible = "syna,sl2610-spi", "snps,dw-apb-ssi";
+			reg = <0xf7f0d000 0x100>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			num-cs = <4>;
+			clocks = <&clk CLK_APBSPI3>;
+			interrupts = <GIC_SPI 201 IRQ_TYPE_LEVEL_HIGH>;
+			status = "disabled";
+		};
+
+		soc_gpio1: gpio@f7f0e000 {
+			compatible = "snps,dw-apb-gpio";
+			reg = <0xf7f0e000 0x400>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			clocks = <&clk CLK_APBGPIO>;
+			clock-names = "bus";
+
+			portb: gpio-port@0 {
+				compatible = "snps,dw-apb-gpio-port";
+				gpio-controller;
+				#gpio-cells = <2>;
+				ngpios = <32>;
+				reg = <0>;
+				interrupt-controller;
+				#interrupt-cells = <2>;
+				interrupts = <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>;
+			};
+		};
+	};
+};
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.dtsi new file +46 -0

46 lines not on this page · raw message

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.dtsi new file +44 -0

44 lines not on this page · raw message

Signature · 1 line
2.55.0
author maintainer
#33 lore raw

PATCH v2 13/13 arm64: dts: synaptics: add SL2610 family RDK boards

In reply to Jisheng Zhang

Add device trees for the SL2611, SL2613, SL2615, SL2617 and SL2619 reference development kits. Share their common console, memory, pin configuration and regulator descriptions and enable the populated peripherals.

---
 arch/arm64/boot/dts/synaptics/Makefile        |   5 +
 arch/arm64/boot/dts/synaptics/sl2611-rdk.dts  |  16 +++
 arch/arm64/boot/dts/synaptics/sl2613-rdk.dts  |  16 +++
 arch/arm64/boot/dts/synaptics/sl2615-rdk.dts  |  16 +++
 arch/arm64/boot/dts/synaptics/sl2617-rdk.dts  |  16 +++
 arch/arm64/boot/dts/synaptics/sl2619-rdk.dts  |  16 +++
 .../boot/dts/synaptics/sl261x-rdk-common.dtsi | 135 ++++++++++++++++++
 7 files changed, 220 insertions(+)
 create mode 100644 arch/arm64/boot/dts/synaptics/sl2611-rdk.dts
 create mode 100644 arch/arm64/boot/dts/synaptics/sl2613-rdk.dts
 create mode 100644 arch/arm64/boot/dts/synaptics/sl2615-rdk.dts
 create mode 100644 arch/arm64/boot/dts/synaptics/sl2617-rdk.dts
 create mode 100644 arch/arm64/boot/dts/synaptics/sl2619-rdk.dts
 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/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/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/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/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/sl261x-rdk-common.dtsi new file +135 -0

135 lines not on this page · raw message

Signature · 1 line
2.55.0
#14 lore raw

Re: [PATCH v2 06/13] soc: synaptics: add SL2610 system controller support

In reply to Jisheng Zhang
Thank you for your contribution! Sashiko AI review found 3 potential issues to consider: - [Low] soc: synaptics: new MFD driver sl2610-syscon placed outside drivers/mfd - [Low] soc: synaptics: MFD…

Thank you for your contribution! Sashiko AI review found 3 potential issues to consider:
- [Low] soc: synaptics: new MFD driver sl2610-syscon placed outside drivers/mfd
- [Low] soc: synaptics: MFD used for single-function AVIO and CPU clock blocks
- [Low] soc: synaptics: mfd_cell arrays passed via match data in sl2610_syscon_probe()
--

commit 13fffaa081530baa348dec7822fd2e447d70af16
Author: Jisheng Zhang <[email protected]>

soc: synaptics: add SL2610 system controller support

This commit adds a driver for the Synaptics SL2610 system control blocks to register their clock, reset, and pin controller child devices via MFD.

Quoted 6 lines
drivers/soc/synaptics/Kconfig new file +0 -0
new file mode 100644
index 0000000000000..9f0324a1a3b7a

drivers/soc/synaptics/Kconfig line 8

Quoted 8 lines
drivers/soc/synaptics/Kconfig new file +8 -0
@@ -0,0 +1,14 @@
+# SPDX-License-Identifier: GPL-2.0-only
+
+config SOC_SL2610_SYSCON
+	tristate "Synaptics SL2610 system controller"
+	depends on ARCH_BERLIN || COMPILE_TEST
+	depends on OF && HAS_IOMEM
+	select MFD_CORE
+	select MFD_SYSCON

[Severity: Low]
Should this driver live under drivers/mfd/ instead of drivers/soc/synaptics/?

sl2610-syscon.c does not implement any SoC bus or SoC-specific service and only calls devm_mfd_add_devices() to instantiate MFD child devices. New core MFD drivers and new calls to devm_mfd_add_devices() belong in drivers/mfd/.

Quoted 30 lines
drivers/soc/synaptics/sl2610-syscon.c new file +24 -0
new file mode 100644
index 0000000000000..c6fc2955ac0de
@@ -0,0 +1,84 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright (C) 2026 Synaptics Incorporated
+ */
+
+#include <linux/mfd/core.h>
+#include <linux/module.h>
+#include <linux/of.h>
+#include <linux/platform_device.h>
+
+struct sl2610_syscon_data {
+	const struct mfd_cell *cells;
+	unsigned int num_cells;
+};
+
+static const struct mfd_cell sl2610_soc_cells[] = {
+	MFD_CELL_NAME("sl2610-soc-clk"),
+	MFD_CELL_NAME("sl2610-soc-reset"),
+	MFD_CELL_NAME("sl2610-soc-pinctrl"),
+};
+
+static const struct mfd_cell sl2610_mcu_cells[] = {
+	MFD_CELL_NAME("sl2610-mcu-clk"),
+	MFD_CELL_NAME("sl2610-mcu-reset"),

drivers/soc/synaptics/sl2610-syscon.c line 34

Quoted 10 lines
drivers/soc/synaptics/sl2610-syscon.c new file +10 -0
+	MFD_CELL_NAME("sl2610-mcu-pinctrl"),
+};
+
+static const struct mfd_cell sl2610_avio_cells[] = {
+	MFD_CELL_NAME("sl2610-avio-clk"),
+};
+
+static const struct mfd_cell sl2610_cpu_cells[] = {
+	MFD_CELL_NAME("sl2610-cpu-clk"),
+};

[Severity: Low]
Why use MFD for the single-function AVIO and CPU clock blocks?

sl2610_avio_cells and sl2610_cpu_cells each register only a single clock child device, and per the syna,sl2610-soc-syscon binding neither block provides reset or pinctrl functions. MFD is intended for devices that register multiple children across different subsystems, whereas the clock driver can bind directly to syna,sl2610-avio-syscon and syna,sl2610-cpu-syscon while keeping shared regmap access through the generic syscon compatible.

Quoted 26 lines
drivers/soc/synaptics/sl2610-syscon.c new file +26 -0
+
+static const struct sl2610_syscon_data sl2610_soc_data = {
+	.cells = sl2610_soc_cells,
+	.num_cells = ARRAY_SIZE(sl2610_soc_cells),
+};
+
+static const struct sl2610_syscon_data sl2610_mcu_data = {
+	.cells = sl2610_mcu_cells,
+	.num_cells = ARRAY_SIZE(sl2610_mcu_cells),
+};
+
+static const struct sl2610_syscon_data sl2610_avio_data = {
+	.cells = sl2610_avio_cells,
+	.num_cells = ARRAY_SIZE(sl2610_avio_cells),
+};
+
+static const struct sl2610_syscon_data sl2610_cpu_data = {
+	.cells = sl2610_cpu_cells,
+	.num_cells = ARRAY_SIZE(sl2610_cpu_cells),
+};
+
+static int sl2610_syscon_probe(struct platform_device *pdev)
+{
+	const struct sl2610_syscon_data *data = device_get_match_data(&pdev->dev);
+
+	return devm_mfd_add_devices(&pdev->dev, PLATFORM_DEVID_AUTO,

drivers/soc/synaptics/sl2610-syscon.c line 70

Quoted 10 lines
drivers/soc/synaptics/sl2610-syscon.c new file +10 -0
+				    data->cells, data->num_cells, NULL, 0, NULL);
+}
+
+static const struct of_device_id sl2610_syscon_of_match[] = {
+	{ .compatible = "syna,sl2610-soc-syscon", .data = &sl2610_soc_data },
+	{ .compatible = "syna,sl2610-mcu-syscon", .data = &sl2610_mcu_data },
+	{ .compatible = "syna,sl2610-avio-syscon", .data = &sl2610_avio_data },
+	{ .compatible = "syna,sl2610-cpu-syscon", .data = &sl2610_cpu_data },
+	{ }
+};

[Severity: Low]
This isn't a bug in normal DT probing, but MFD drivers should not pass mfd_cell arrays through the .data field of of_device_id tables. In addition, if the driver is bound without an OF match (such as via sysfs driver_override), device_get_match_data() returns NULL and sl2610_syscon_probe() dereferences a NULL data pointer.

Could sl2610_syscon_of_match store an enum or integer ID in .data and select the static const mfd_cell array with a switch statement (and a default error return) in sl2610_syscon_probe()?

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

Re: [PATCH v2 08/13] pinctrl: berlin: add Synaptics SL2610 pin controller support

In reply to Jisheng Zhang
Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Medium] pinctrl: berlin: wrong pad config offset 0x87c for GPIO54 on SL2610 --

Thank you for your contribution! Sashiko AI review found 1 potential issue to consider:
- [Medium] pinctrl: berlin: wrong pad config offset 0x87c for GPIO54 on SL2610
--

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

pinctrl: berlin: add Synaptics SL2610 pin controller support

This commit adds the pin controller driver for Synaptics SL2610 SoCs, defining the SoC and MCU pin groups, mux functions, and pad configuration register offsets.

Quoted 6 lines
drivers/pinctrl/berlin/pinctrl-sl2610.c new file +0 -0
new file mode 100644
index 0000000000000..0a3dc146c2c01
@@ -0,0 +1,759 @@

[ ... ]

Quoted 1 line

+static const struct berlin_desc_group sl2610_soc_pinctrl_groups[] = {

[ ... ]

Quoted 7 lines
drivers/pinctrl/berlin/pinctrl-sl2610.c new file +7 -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,

drivers/pinctrl/berlin/pinctrl-sl2610.c line 256

Quoted 10 lines
drivers/pinctrl/berlin/pinctrl-sl2610.c new file +10 -0
+			0x87c, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* GPIO54 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "rgmii2"), /* RD2 */
+			BERLIN_PINCTRL_FUNCTION(0x7, "spi3")), /* SDI */
+	BERLIN_PINCTRLCONF_GROUP("GPIO55", 0x800c, 0x3, 0x06,
+			0x8880, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* GPIO55 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "rgmii2"), /* RD3 */
+			BERLIN_PINCTRL_FUNCTION(0x5, "spi5"), /* SDI */
+			BERLIN_PINCTRL_FUNCTION(0x7, "spi4")), /* SS1n */

[Severity: Medium]
Should the pad configuration offset for GPIO54 be 0x887c instead of 0x87c? All other entries in sl2610_soc_pinctrl_groups place conf_offset at 4-byte intervals in the 0x8800..0x88ec range, so configuring pad parameters for GPIO54 will read and modify offset 0x87c in the parent syscon regmap while leaving GPIO54's pad unconfigured.

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

Re: [PATCH v2 05/13] dt-bindings: soc: synaptics: add SL2610 system controllers

In reply to Jisheng Zhang
Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Low] dt-bindings: soc: synaptics: split dissimilar SL2610 syscon blocks into separate schemas --

Thank you for your contribution! Sashiko AI review found 1 potential issue to consider:
- [Low] dt-bindings: soc: synaptics: split dissimilar SL2610 syscon blocks into separate schemas
--

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

dt-bindings: soc: synaptics: add SL2610 system controllers

This commit adds a Device Tree binding schema and clock/reset header definitions for the Synaptics SL2610 SoC, MCU, AVIO, and CPU system control register blocks.

Quoted 6 lines
Documentation/devicetree/bindings/soc/synaptics/syna,sl2610-soc-syscon.yaml new file +0 -0
new file mode 100644
index 0000000000000..cdf947cb3e0f6
@@ -0,0 +1,178 @@

[ ... ]

Quoted 9 lines
Documentation/devicetree/bindings/soc/synaptics/syna,sl2610-soc-syscon.yaml new file +9 -0
+properties:
+  compatible:
+    items:
+      - enum:
+          - syna,sl2610-soc-syscon
+          - syna,sl2610-mcu-syscon
+          - syna,sl2610-avio-syscon
+          - syna,sl2610-cpu-syscon
+      - const: syscon

[ ... ]

Quoted 29 lines
Documentation/devicetree/bindings/soc/synaptics/syna,sl2610-soc-syscon.yaml new file +29 -0
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - syna,sl2610-soc-syscon
+              - syna,sl2610-mcu-syscon
+    then:
+      required:
+        - '#clock-cells'
+        - '#reset-cells'
+    else:
+      properties:
+        '#reset-cells': false
+      patternProperties:
+        '-(pmux|pins)$': false
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: syna,sl2610-cpu-syscon
+    then:
+      required:
+        - '#clock-cells'
+        - syna,gbl-syscon
+    else:
+      properties:

Documentation/devicetree/bindings/soc/synaptics/syna,sl2610-soc-syscon.yaml line 126

Quoted 10 lines
Documentation/devicetree/bindings/soc/synaptics/syna,sl2610-soc-syscon.yaml new file +10 -0
+        syna,gbl-syscon: false
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: syna,sl2610-avio-syscon
+    then:
+      properties:
+        '#clock-cells': false

[Severity: Low]
Should these dissimilar system controller blocks be split into separate binding schemas instead of combining them with three per-compatible if-then-else blocks in allOf?

Only the SoC and MCU blocks provide resets and pin mux subnodes, only the CPU block uses syna,gbl-syscon, and the AVIO block exposes none of these providers. Splitting the schema by block role would avoid toggling most properties and patternProperties per compatible.

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

Re: [PATCH v2 03/13] pinctrl: berlin: enable module build support

In reply to Jisheng Zhang
Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Medium] pinctrl: berlin: PINCTRL_BERLIN remains bool and built via obj-y --

Thank you for your contribution! Sashiko AI review found 1 potential issue to consider:
- [Medium] pinctrl: berlin: PINCTRL_BERLIN remains bool and built via obj-y
--

commit 74a8c9f28b8b05de9543f2486bac3805aa5dc526
Author: Jisheng Zhang <[email protected]>

pinctrl: berlin: enable module build support

This commit converts allocations in the Berlin pinctrl core to devm APIs, exports the probe helpers, and adds module metadata to support building the driver as a module.

Quoted 4 lines
drivers/pinctrl/berlin/berlin.c +0 -0
index 8a612ce2d1d36..a0ae75b1d705d 100644

[ ... ]

drivers/pinctrl/berlin/berlin.c int berlin_pinctrl_probe(struct platform_device *pdev, · line 343

Quoted 8 lines
drivers/pinctrl/berlin/berlin.c +4 -0
@@ -340,3 +337,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");

[Severity: Medium]
Can berlin.c actually be built as a loadable module when drivers/pinctrl/berlin/Kconfig still defines the symbol as bool and drivers/pinctrl/berlin/Makefile builds berlin.o with obj-y?

drivers/pinctrl/berlin/Kconfig:
config PINCTRL_BERLIN
bool

drivers/pinctrl/berlin/Makefile:

	obj-y					+= berlin.o

Even when a downstream SoC pinctrl driver is configured as a module, selecting this symbol forces berlin.o into vmlinux instead of building a loadable module for vendor_dlkm.

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

Re: [PATCH v2 04/13] pinctrl: berlin: add optional pinconf support

In reply to Jisheng Zhang
Thank you for your contribution! Sashiko AI review found 4 potential issues to consider: - [Medium] pinctrl: berlin: memory leak on error in berlin_pinctrl_dt_node_to_map() - [Medium] pinctrl…

Thank you for your contribution! Sashiko AI review found 4 potential issues to consider:
- [Medium] pinctrl: berlin: memory leak on error in berlin_pinctrl_dt_node_to_map()
- [Medium] pinctrl: berlin: wrong errno -EOPNOTSUPP in berlin_pinconf_group_get()
- [Low] pinctrl: berlin: map over-allocation in berlin_pinctrl_dt_node_to_map()
- [Low] pinctrl: berlin: berlin_pinconf_group_get() fails when slew rate is 0
--

commit 8d9a060e7649872ae247085353d00ffa248ae051
Author: Jisheng Zhang <[email protected]>

pinctrl: berlin: add optional pinconf support

This commit adds generic pin configuration support (bias, drive strength, input enable, Schmitt trigger, and slew rate) to the Berlin pinctrl driver for 8-bit and 10-bit group configuration registers.

Quoted 4 lines
drivers/pinctrl/berlin/berlin.c +0 -0
index a0ae75b1d705d..0edf9d5a2a7b7 100644

[ ... ]

Quoted 5 lines
drivers/pinctrl/berlin/berlin.c +1 -0
@@ -75,11 +95,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 107

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: Low]
Does this over-allocate *map when num_configs > 1? pinctrl_utils_add_map_configs() packs all num_configs entries for a group into a single PIN_MAP_TYPE_CONFIGS_GROUP map slot, so each group uses at most two map entries (ngroups * (!!num_configs + 1) in total), leaving ngroups * (num_configs - 1) reserved entries unused.

Quoted 20 lines
drivers/pinctrl/berlin/berlin.c +9 -2
 	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 +116,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);

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

Quoted 10 lines
drivers/pinctrl/berlin/berlin.c +5 -1
+			if (ret < 0)
+				goto exit;
 		}
 	}
 
-	return 0;
+exit:
+	kfree(configs);
+	return ret;
 }

[Severity: Medium]
Does the error path leak *map and any per-group config arrays already duplicated by pinctrl_utils_add_map_configs()?

When ops->dt_node_to_map() returns a negative error code, the caller dt_to_map_one_config() in drivers/pinctrl/devicetree.c returns immediately without freeing the partially constructed map. If pinctrl_utils_add_map_mux() or pinctrl_utils_add_map_configs() fails in the loop after pinctrl_utils_reserve_map() allocated *map, jumping to exit only frees the temporary configs array and leaks *map along with any configs duplicated for earlier groups. Calling pinctrl_utils_free_map(pctrl_dev, *map, *num_maps) when ret < 0 would clean these up.

Quoted 17 lines
drivers/pinctrl/berlin/berlin.c +13 -0
@@ -177,6 +216,190 @@ 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;

[ ... ]

Quoted 4 lines
drivers/pinctrl/berlin/berlin.c +4 -0
+	case PIN_CONFIG_SLEW_RATE:
+		if (conf_bits == 10)
+			enabled = val & PINCFG_SL_10BIT;
+		else

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

Quoted 10 lines
drivers/pinctrl/berlin/berlin.c +10 -0
+			enabled = val & PINCFG_SL_8BIT;
+		val = enabled ? 1 : 0;
+		break;
+	default:
+		return -EOPNOTSUPP;
+	}
+
+	*configs = pinconf_to_config_packed(param, val);
+	return enabled ? 0 : -EINVAL;
+}

[Severity: Low]
Does querying PIN_CONFIG_SLEW_RATE fail with -EINVAL whenever the slew rate bit is 0?

berlin_pinconf_group_set() accepts 0 as a valid slew-rate argument to clear PINCFG_SL_10BIT or PINCFG_SL_8BIT, but berlin_pinconf_group_get() sets enabled from that bit and returns -EINVAL when enabled is false, so a slew rate of 0 cannot be read back (for example via debugfs pinconf-groups). Setting enabled = true as in the PIN_CONFIG_DRIVE_STRENGTH case would allow both 0 and 1 to be reported.

Quoted 13 lines
drivers/pinctrl/berlin/berlin.c +13 -0
+
+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;

[ ... ]

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

Quoted 4 lines
drivers/pinctrl/berlin/berlin.c +4 -0
+		default:
+			return -EOPNOTSUPP;
+		}
+	}

[Severity: Medium]
Should berlin_pinconf_group_get() and berlin_pinconf_group_set() return -ENOTSUPP instead of -EOPNOTSUPP when !conf_bits or when param is not supported?

With .is_generic = true, reading debugfs pinconf-groups calls pinconf_generic_dump_one(), which queries every generic parameter in conf_items[] and only treats -EINVAL and -ENOTSUPP as legal responses:

drivers/pinctrl/pinconf-generic.c:pinconf_generic_dump_one() {
	...
		ret = pin_config_group_get(dev_name(pctldev->dev),
					   pindesc->name, &config);
		/* These are legal errors */
		if (ret == -EINVAL || ret == -ENOTSUPP)
			continue;
		if (ret) {
			seq_printf(s, "ERROR READING CONFIG SETTING %d ", i);
			continue;
		}
	...
}

Returning -EOPNOTSUPP causes debugfs pinconf-groups to print "ERROR READING CONFIG SETTING" for every unsupported parameter and for any group with conf_bits == 0.

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

Re: [PATCH v2 10/13] clk: berlin: add Synaptics SL2610 clocks and PLLs

In reply to Jisheng Zhang
Thank you for your contribution! Sashiko AI review found 5 potential issues to consider: - [Medium] clk: berlin: dereference of dev before NULL check in sl2610_pll_register() - [Medium] clk: berlin…

Thank you for your contribution! Sashiko AI review found 5 potential issues to consider:
- [Medium] clk: berlin: dereference of dev before NULL check in sl2610_pll_register()
- [Medium] clk: berlin: irq lock inversion on sl_sysmgr_gateclk_lock via sl2610_sysmgr_clk_setup()
- [Low] clk: berlin: fix apbuart3clk and apbi2c1clk typos in sl2610_gates
- [Low] clk: berlin: missing OF and HAS_IOMEM dependencies on SL2610_PLL
- [Low] clk: berlin: unused SL2610_APLL macro and struct forward declarations
--

commit 9456f61cc7fffcd42790e27e9671ad341c8cf8cd
Author: Jisheng Zhang <[email protected]>

clk: berlin: add Synaptics SL2610 clocks and PLLs

This commit adds clock and PLL drivers for the Synaptics SL2610 SoC, registering the SoC, CPU, AVIO, and MCU clocks.

Quoted 14 lines
drivers/clk/berlin/Kconfig +6 -0
index 8f71d4c7a478b..be7e47e0ff523 100644
@@ -5,3 +5,30 @@ config SL_COMMON_CLK
 
 config SL_SYSMGR_CLK
 	bool
+
+config SL2610_PLL
+	tristate "Synaptics SL2610 PLL Driver"
+	depends on ARCH_BERLIN || COMPILE_TEST
+	default n
+	help

drivers/clk/berlin/Kconfig config SL_COMMON_CLK · line 23

Quoted 10 lines
drivers/clk/berlin/Kconfig +10 -0
+	  Support the integer and fractional PLL outputs used by the SoC,
+	  CPU and audio clock controllers on Synaptics SL2610 SoCs.
+
+	  To compile this driver as a module, choose M here. The module will
+	  be called sl2610-pll.
+
+config SL2610_CLK
+	tristate "Synaptics SL2610 Clock Driver"
+	depends on ARCH_BERLIN || COMPILE_TEST
+	depends on OF && HAS_IOMEM

[Severity: Low]
Should SL2610_PLL also depend on OF && HAS_IOMEM like SL2610_CLK? sl2610-pll.c calls readl_relaxed() and of_clk_get().

Also, both symbols allow COMPILE_TEST when ARCH_BERLIN=n, but drivers/clk/Makefile only descends into berlin/ for CONFIG_ARCH_BERLIN, so neither driver is built under COMPILE_TEST=y with ARCH_BERLIN=n.

Quoted 5 lines
drivers/clk/berlin/clk-sl2610.c new file +0 -0
new file mode 100644
index 0000000000000..b51d3523028de

[ ... ]

Quoted 7 lines
drivers/clk/berlin/clk-sl2610.c new file +7 -0
+static const struct sl_gateclk_desc sl2610_gates[] = {
+	{ "usb0coreclk",	"perifsysclk",	CLK_USB0CORE,		0 },
+	{ "sdiosysclk",		"perifsysclk",	CLK_SDIOSYS,		1 },
+	{ "emmcsysclk",		"perifsysclk",	CLK_EMMCSYS,		2 },
+	{ "gpuaxiclk",		"hpcclk",	CLK_GPUAXI,		3 },
+	{ "gethrgmiisysclk",	"perifsysclk",	CLK_GETHRGMIISYS,	4 },
+	{ "sdio1sysclk",	"perifsysclk",	CLK_SDIO1SYS,		5 },

drivers/clk/berlin/clk-sl2610.c line 70

Quoted 10 lines
drivers/clk/berlin/clk-sl2610.c new file +10 -0
+	{ "usb1coreclk",	"perifsysclk",	CLK_USB1CORE,		6 },
+	{ "gethrgmii1sysclk",	"perifsysclk",	CLK_GETHRGMII1SYS,	7 },
+	{ "usb0phyrefclk",	"perifsysclk",	CLK_USB0PHYREF,		8 },
+	{ "usb1phyrefclk",	"perifsysclk",	CLK_USB1PHYREF,		9 },
+	{ "apbuart0clk",	"apbcoreclk",	CLK_APBUART0,		10 },
+	{ "apbuart1clk",	"apbcoreclk",	CLK_APBUART1,		11 },
+	{ "apbuart2clk",	"apbcoreclk",	CLK_APBUART2,		12 },
+	{ "apbuart3lck",	"apbcoreclk",	CLK_APBUART3,		13 },
+	{ "apbi2c0clk",		"apbcoreclk",	CLK_APBI2C0,		14 },
+	{ "apbi2c1lck",		"apbcoreclk",	CLK_APBI2C1,		15 },

[Severity: Low]
Are "apbuart3lck" and "apbi2c1lck" typos for "apbuart3clk" and "apbi2c1clk"? Every other entry in sl2610_gates[] ends with "clk", so these two clocks are registered under misspelled names in clk_summary and any lookup by name.

[ ... ]

drivers/clk/berlin/clk-sl2610.c line 329

Quoted 7 lines
drivers/clk/berlin/clk-sl2610.c new file +7 -0
+static int sl2610_sysmgr_clk_setup(struct platform_device *pdev)
+{
+	return sl_sysmgr_clk_setup(pdev, sl2610_sysmgr_fixeds, ARRAY_SIZE(sl2610_sysmgr_fixeds),
+				   sl2610_sysmgr_gates, ARRAY_SIZE(sl2610_sysmgr_gates),
+				   CLK_GATE_CTRL0,
+				   sl2610_sysmgr_clks, ARRAY_SIZE(sl2610_sysmgr_clks));
+}

[Severity: Medium]
Can registering the MCU gate clocks via sl_sysmgr_clk_setup() cause an IRQ lock inversion or deadlock on sl_sysmgr_gateclk_lock?

In commit "clk: berlin: add Synaptics clock controller helpers", sl_sysmgr_gateclk_enable() and sl_sysmgr_gateclk_is_enabled() acquire sl_sysmgr_gateclk_lock with guard(spinlock) instead of guard(spinlock_irqsave):

drivers/clk/berlin/sl-sysmgr-clk.c:sl_sysmgr_gateclk_is_enabled() {
	struct sl_sysmgr_gateclk *gclk = to_sl_sysmgr_gateclk(hw);
	u32 reg;

	guard(spinlock)(&sl_sysmgr_gateclk_lock);
	reg = readl_relaxed(gclk->reg);
    ...
}

clk_enable() holds the CCF enable_lock with interrupts disabled (and may run in hardirq context) before calling .enable, whereas clk_summary_show_one() and clk_hw_is_enabled() call .is_enabled from process context without enable_lock and with interrupts enabled:

CPU0 CPU1
---- ----
clk_enable()
clk_enable_lock()
spin_lock_irqsave(&enable_lock)
clk_summary_show_one()
clk_core_is_enabled()
sl_sysmgr_gateclk_is_enabled()
spin_lock(&sl_sysmgr_gateclk_lock)
sl_sysmgr_gateclk_enable()
spin_lock(&sl_sysmgr_gateclk_lock)
<hardirq>
clk_enable()
clk_enable_lock()
spin_lock_irqsave(&enable_lock)

*** DEADLOCK ***

A single-CPU deadlock also occurs if the interrupt on the same CPU calls clk_enable() on an MCU gate clock while sl_sysmgr_gateclk_is_enabled() holds sl_sysmgr_gateclk_lock. Using guard(spinlock_irqsave) (or reading gclk->reg locklessly in sl_sysmgr_gateclk_is_enabled() as sl_clk_is_enabled() does) avoids this.

Quoted 5 lines
drivers/clk/berlin/sl2610-pll.c new file +0 -0
new file mode 100644
index 0000000000000..62c5d2d19c362

[ ... ]

Quoted 9 lines
drivers/clk/berlin/sl2610-pll.c new file +9 -0
+#define CTRLG			0x18
+#define DIVQF_MASK		GENMASK(2, 0)
+
+#define SL2610_APLL
+struct sl2610_pll {
+	void __iomem *ctrl;
+	struct clk_hw pllout;
+	struct clk_hw plloutf;
+};

[ ... ]

drivers/clk/berlin/sl2610-pll.c line 105

Quoted 12 lines
drivers/clk/berlin/sl2610-pll.c new file +12 -0
+int sl2610_pll_register(struct device *dev, void __iomem *ctrl,
+			const char *out, const char *outf)
+{
+	struct device_node *np = dev->parent->of_node;
+	struct clk_parent_data parent = {};
+	struct clk_init_data init = {};
+	struct sl2610_pll *pll;
+	struct clk *input;
+	int ret;
+
+	if (!dev || !ctrl || !out || !outf)
+		return -EINVAL;

[Severity: Medium]
Does sl2610_pll_register() dereference dev and dev->parent before the !dev check? If dev or dev->parent is NULL, initializing np at the top of the function causes a NULL pointer dereference instead of returning -EINVAL. sl2610_soc_clk_setup(), sl2610_cpu_clk_setup(), and sl2610_aio_clk_setup() in drivers/clk/berlin/clk-sl2610.c also dereference dev->parent->of_node without checking dev->parent.

Quoted 6 lines
drivers/clk/berlin/sl2610-pll.h new file +0 -0
new file mode 100644
index 0000000000000..b61a93b28610d

drivers/clk/berlin/sl2610-pll.h line 9

Quoted 9 lines
drivers/clk/berlin/sl2610-pll.h new file +9 -0
@@ -0,0 +1,14 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef __SL2610_PLL_H
+#define __SL2610_PLL_H
+
+#include <linux/io.h>
+
+struct clk_hw_onecell_data;
+struct device;
+struct device_node;

[Severity: Low]
This isn't a bug, but struct clk_hw_onecell_data and struct device_node in sl2610-pll.h and the empty SL2610_APLL macro in sl2610-pll.c are unused and can be dropped.

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

Re: [PATCH v2 09/13] clk: berlin: add Synaptics clock controller helpers

In reply to Jisheng Zhang
Thank you for your contribution! Sashiko AI review found 5 potential issues to consider: - [High] clk: berlin: non-irqsave spinlock in sl_sysmgr_gateclk_ops - [Medium] clk: berlin: uninitialized…

Thank you for your contribution! Sashiko AI review found 5 potential issues to consider:
- [High] clk: berlin: non-irqsave spinlock in sl_sysmgr_gateclk_ops
- [Medium] clk: berlin: uninitialized clk_init_data in sl-sysmgr-clk.c
- [Medium] clk: berlin: sl_sysmgr_clk_setup() ignores descriptor flags
- [Medium] clk: berlin: missing .disable callbacks and duplicated gate clock in sl-sysmgr-clk
- [Low] clk: berlin: non-self-contained header sl-sysmgr-clk.h and unused macros
--

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

clk: berlin: add Synaptics clock controller helpers

This commit adds configurable divider and gate clock helpers for Synaptics system controllers along with an MCU system manager clock setup helper.

Quoted 6 lines
drivers/clk/berlin/sl-sysmgr-clk.c new file +0 -0
new file mode 100644
index 0000000000000..f3cf921fc3c1a
@@ -0,0 +1,241 @@

[ ... ]

Quoted 7 lines
drivers/clk/berlin/sl-sysmgr-clk.c new file +7 -0
+#include <linux/platform_device.h>
+#include <linux/version.h>
+
+#include "sl-sysmgr-clk.h"
+
+#define CLK_EN		BIT(0)
+#define DIV_CHNG_EN	BIT(1)

[ ... ]

Quoted 18 lines
drivers/clk/berlin/sl-sysmgr-clk.c new file +18 -0
+static int sl_sysmgr_gateclk_enable(struct clk_hw *hw)
+{
+	u32 val;
+	struct sl_sysmgr_gateclk *clk = to_sl_sysmgr_gateclk(hw);
+
+	guard(spinlock)(&sl_sysmgr_gateclk_lock);
+
+	val = readl_relaxed(clk->base);
+	if (!(val & BIT(clk->bit_idx))) {
+		val |= BIT(clk->bit_idx);
+		writel_relaxed(val, clk->base);
+	}
+
+	return 0;
+}
+
+static int sl_sysmgr_gateclk_is_enabled(struct clk_hw *hw)
+{

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

Quoted 10 lines
drivers/clk/berlin/sl-sysmgr-clk.c new file +10 -0
+	u32 val;
+	struct sl_sysmgr_gateclk *clk = to_sl_sysmgr_gateclk(hw);
+
+	guard(spinlock)(&sl_sysmgr_gateclk_lock);
+
+	val = readl_relaxed(clk->base);
+	val &= BIT(clk->bit_idx);
+
+	return val ? 1 : 0;
+}

[Severity: High]
Can taking sl_sysmgr_gateclk_lock with guard(spinlock) instead of spinlock_irqsave deadlock?

clk_core_is_enabled() calls .is_enabled from process context without holding enable_lock and with local interrupts enabled (for example via clk_summary_show_one() or __clk_is_enabled()), while clk_enable() can be called from hardirq context:

clk_summary_show_one()
...
sl_sysmgr_gateclk_is_enabled()
spin_lock(&sl_sysmgr_gateclk_lock)
<hardirq>
clk_enable()
...
sl_sysmgr_gateclk_enable()
spin_lock(&sl_sysmgr_gateclk_lock) <-- spins forever

sl_sysmgr_gateclk_enable() needs guard(spinlock_irqsave), while sl_sysmgr_gateclk_is_enabled() only performs a single readl_relaxed() and does not need the lock.

Quoted 17 lines
drivers/clk/berlin/sl-sysmgr-clk.c new file +17 -0
+static const struct clk_ops sl_sysmgr_gateclk_ops = {
+	.enable		= sl_sysmgr_gateclk_enable,
+	.is_enabled	= sl_sysmgr_gateclk_is_enabled,
+};
+
+static int
+sl_sysmgr_gateclk_register(struct device *dev, struct sl_sysmgr_gateclk *gclk,
+			   const char *name, const char *parent_names,
+			   u8 bit_idx, void __iomem *base)
+{
+	struct clk_init_data init;
+
+	init.name = name;
+	init.ops = &sl_sysmgr_gateclk_ops;
+	init.parent_names = &parent_names;
+	init.num_parents = 1;
+	init.flags = 0;

[ ... ]

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]
Should sl_sysmgr_gateclk_ops and sl_sysmgr_clk_ops implement .disable callbacks?

Without .disable, consumer calls to clk_disable() and late boot's clk_disable_unused() cannot gate these clocks in hardware, and clk_is_enabled_when_prepared() treats them as enabled by .prepare even though .prepare is not implemented. In addition, struct sl_sysmgr_gateclk and struct sl_sysmgr_gateclk_desc duplicate devm_clk_hw_register_gate() and struct sl_gateclk_desc in drivers/clk/berlin/sl-clk.h.

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

Quoted 12 lines
drivers/clk/berlin/sl-sysmgr-clk.c new file +12 -0
+static int
+sl_sysmgr_clk_register(struct device *dev, struct sl_sysmgr_clk *sclk,
+		       const char *name, const char *parent_names,
+		       u8 div_bits, void __iomem *base)
+{
+	struct clk_init_data init;
+
+	init.name = name;
+	init.ops = &sl_sysmgr_clk_ops;
+	init.parent_names = &parent_names;
+	init.num_parents = 1;
+	init.flags = 0;

[Severity: Medium]
Does leaving struct clk_init_data init uninitialized on the stack in sl_sysmgr_gateclk_register() and sl_sysmgr_clk_register() pass garbage init.parent_data and init.parent_hws pointers into devm_clk_hw_register()?

clk_core_populate_parent_map() reads init->parent_hws and init->parent_data unconditionally when registering the clock.

[ ... ]

Quoted 7 lines
drivers/clk/berlin/sl-sysmgr-clk.c new file +7 -0
+	for (i = 0; i < gclk_n; i++) {
+		ret = sl_sysmgr_gateclk_register(&pdev->dev, &priv->gclks[i],
+						 gdescs[i].name, gdescs[i].parent_name,
+						 gdescs[i].bit_idx, base + gclk_offset);
+		if (ret)
+			return ret;
+

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

Quoted 10 lines
drivers/clk/berlin/sl-sysmgr-clk.c new file +10 -0
+		id = gdescs[i].id;
+		clk_data->hws[id] = &priv->gclks[i].hw;
+	}
+
+	for (i = 0; i < clk_n; i++) {
+		ret = sl_sysmgr_clk_register(&pdev->dev, &priv->clks[i],
+					     descs[i].name, descs[i].parent_name,
+					     descs[i].div_bits, base + descs[i].offset);
+		if (ret)
+			return ret;

[Severity: Medium]
Does sl_sysmgr_clk_setup() drop the flags field from gdescs[i] and descs[i]?

struct sl_sysmgr_gateclk_desc and struct sl_sysmgr_clk_desc both define an unsigned long flags member, but sl_sysmgr_clk_setup() never passes them to sl_sysmgr_gateclk_register() or sl_sysmgr_clk_register(), which hardcode init.flags = 0 and ignore flags such as CLK_IS_CRITICAL or CLK_IGNORE_UNUSED.

[ ... ]

Quoted 6 lines
drivers/clk/berlin/sl-sysmgr-clk.h new file +0 -0
new file mode 100644
index 0000000000000..5ccf388bcccbd
@@ -0,0 +1,44 @@

[ ... ]

Quoted 11 lines
drivers/clk/berlin/sl-sysmgr-clk.h new file +11 -0
+#ifndef __SL_SYSMGR_CLK_H
+#define __SL_SYSMGR_CLK_H
+
+struct sl_sysmgr_clk_desc {
+	const char	*name;
+	const char	*parent_name;
+	u32		id;
+	u32		offset;
+	u8		div_bits;
+	unsigned long	flags;
+};

[ ... ]

drivers/clk/berlin/sl-sysmgr-clk.h line 44

Quoted 10 lines
drivers/clk/berlin/sl-sysmgr-clk.h new file +10 -0
+int sl_sysmgr_clk_setup(struct platform_device *pdev,
+			const struct sl_sysmgr_fixedclk_desc *fdescs,
+			int fclk_n,
+			const struct sl_sysmgr_gateclk_desc *gdescs,
+			int gclk_n,
+			u32 gclk_offset,
+			const struct sl_sysmgr_clk_desc *descs,
+			int clk_n);
+
+#endif

[Severity: Low]
Does sl-sysmgr-clk.h need #include <linux/types.h> and a forward declaration of struct platform_device so it is self-contained when included before other headers? Also, <linux/version.h> and DIV_CHNG_EN in sl-sysmgr-clk.c are unused, and sl-clk.h uses u32 and u8 without directly including <linux/types.h>.

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

Re: [PATCH v2 13/13] arm64: dts: synaptics: add SL2610 family RDK boards

In reply to Jisheng Zhang
Thank you for your contribution! Sashiko AI review found 3 potential issues to consider: - [Low] arm64: dts: synaptics: deprecated cpu0-supply used in sl261x-rdk-common.dtsi - [Low] arm64: dts…

Thank you for your contribution! Sashiko AI review found 3 potential issues to consider:
- [Low] arm64: dts: synaptics: deprecated cpu0-supply used in sl261x-rdk-common.dtsi
- [Low] arm64: dts: synaptics: underscore in soc_i2c0-pmux node name
- [Low] arm64: dts: synaptics: unused linux-event-codes.h include in sl261x-rdk-common.dtsi
--

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

arm64: dts: synaptics: add SL2610 family RDK boards

This commit adds device tree files for the Synaptics SL2611, SL2613, SL2615, SL2617, and SL2619 reference development kits along with a shared common dtsi.

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

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

Quoted 9 lines
arch/arm64/boot/dts/synaptics/sl261x-rdk-common.dtsi new file +9 -0
@@ -0,0 +1,135 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (C) 2025 Synaptics Incorporated
+ *
+ * Author: Jisheng Zhang <[email protected]>
+ */
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/linux-event-codes.h>

[Severity: Low]
Is the dt-bindings/input/linux-event-codes.h include needed here? Neither sl261x-rdk-common.dtsi nor the board dts files that include it define any input nodes or reference event code macros.

[ ... ]

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

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

[Severity: Low]
Should cpu@0 use cpu-supply instead of cpu0-supply? Documentation/devicetree/bindings/arm/cpus.yaml marks cpu0-supply as deprecated in favor of cpu-supply, and the dual-core SL2615, SL2617, and SL2619 variants also define cpu1: cpu@100.

[ ... ]

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

Quoted 7 lines
arch/arm64/boot/dts/synaptics/sl261x-rdk-common.dtsi new file +7 -0
+&pinctrl {
+	soc_i2c0_pmux: soc_i2c0-pmux {
+		groups = "GPIO23", "GPIO24";
+		function = "tw2";
+		drive-strength = <7>;
+	};
+};

[Severity: Low]
Should the node name soc_i2c0-pmux use a hyphen instead of an underscore (for example, soc-i2c0-pmux)? Using an underscore in a devicetree node name triggers a dtc node_name_chars_strict warning when building with W=2.

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

Re: [PATCH v2 07/13] reset: add Synaptics SL2610 reset controller support

In reply to Jisheng Zhang
Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Medium] reset: sl2610: wrong errno in sl2610_reset_assert() and deassert() --

Thank you for your contribution! Sashiko AI review found 1 potential issue to consider:
- [Medium] reset: sl2610: wrong errno in sl2610_reset_assert() and deassert()
--

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

reset: add Synaptics SL2610 reset controller support

This commit adds a reset controller driver for the SoC and MCU system control blocks on Synaptics SL2610 SoCs, supporting both pulse and sticky reset lines.

Quoted 5 lines
drivers/reset/reset-sl2610.c new file +0 -0
new file mode 100644
index 0000000000000..1ca58d5a3e713

[ ... ]

Quoted 13 lines
drivers/reset/reset-sl2610.c new file +13 -0
+static int sl2610_reset_assert(struct reset_controller_dev *rcdev,
+			       unsigned long id)
+{
+	struct sl2610_reset_priv *priv = to_sl2610_reset_priv(rcdev);
+	const struct sl2610_reset_cfg *cfg = &priv->cfgs[id];
+
+	if (!cfg->sticky)
+		return -EINVAL;
+
+	return regmap_clear_bits(priv->regmap, cfg->reg, cfg->bit);
+}
+
+static int sl2610_reset_deassert(struct reset_controller_dev *rcdev,

drivers/reset/reset-sl2610.c line 157

Quoted 10 lines
drivers/reset/reset-sl2610.c new file +10 -0
+				 unsigned long id)
+{
+	struct sl2610_reset_priv *priv = to_sl2610_reset_priv(rcdev);
+	const struct sl2610_reset_cfg *cfg = &priv->cfgs[id];
+
+	if (!cfg->sticky)
+		return -EINVAL;
+
+	return regmap_set_bits(priv->regmap, cfg->reg, cfg->bit);
+}

[Severity: Medium]
Should sl2610_reset_assert() and sl2610_reset_deassert() return -ENOTSUPP (or 0 in sl2610_reset_deassert()) instead of -EINVAL when !cfg->sticky?

In drivers/reset/core.c, reset_control_deassert() treats self-deasserting pulse reset lines as deasserted by default when .deassert() is not implemented, and documents that .deassert() should return -ENOTSUPP when deassertion cannot be guaranteed:

drivers/reset/core.c:reset_control_deassert() {
	...
	/*
	 * If the reset controller does not implement .deassert(), we assume
	 * that it handles self-deasserting reset lines via .reset(). In that
	 * case, the reset lines are deasserted by default. If that is not the
	 * case, the reset controller driver should implement .deassert() and
	 * return -ENOTSUPP.
	 */
	if (!rcdev->ops->deassert)
		return 0;
	...
}

Because this controller implements .assert() and .deassert() for its sticky lines, returning -EINVAL for the 22 pulse reset lines in sl2610_reset_cfgs[] causes consumer drivers that call reset_control_deassert() during probe (such as 8250_dw) to fail probe, and prevents consumers such as stmmac_dvr_probe() from checking for -ENOTSUPP on reset_control_assert() and falling back to reset_control_reset().

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

Re: [PATCH v2 12/13] arm64: dts: synaptics: add SL2610 family SoCs

In reply to Jisheng Zhang
Thank you for your contribution! Sashiko AI review found 3 potential issues to consider: - [Low] arm64: dts: synaptics: missing root compatible property in sl2619.dtsi - [Low] arm64: dts: synaptics…

Thank you for your contribution! Sashiko AI review found 3 potential issues to consider:
- [Low] arm64: dts: synaptics: missing root compatible property in sl2619.dtsi
- [Low] arm64: dts: synaptics: duplicated cpu1 and pmu nodes in sl2617/sl2619.dtsi
- [Low] arm64: dts: synaptics: optee node placed under root instead of /firmware
--

commit 9dec2dc5b8adc9799e77b0f1baf814fa359dd8c4
Author: Jisheng Zhang <[email protected]>

arm64: dts: synaptics: add SL2610 family SoCs

This commit adds devicetree files for the Synaptics SL2610 family SoCs (SL2611, SL2613, SL2615, SL2617, and SL2619), describing CPUs, GIC, system controllers, and serial, I2C, I3C, SPI, and GPIO peripherals.

Quoted 22 lines
arch/arm64/boot/dts/synaptics/sl2611.dtsi new file +16 -0
new file mode 100644
index 0000000000000..663fe6034ba05
@@ -0,0 +1,457 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (C) 2024 Synaptics Incorporated
+ *
+ * Author: Jisheng Zhang <[email protected]>
+ */
+
+#include <dt-bindings/clock/syna,sl2610.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/reset/syna,sl2610-reset.h>
+
+/ {
+	compatible = "syna,sl2611";
+	interrupt-parent = <&gic>;
+	#address-cells = <2>;
+	#size-cells = <2>;

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

Quoted 10 lines
arch/arm64/boot/dts/synaptics/sl2611.dtsi new file +10 -0
+
+	psci {
+		compatible = "arm,psci-1.0";
+		method = "smc";
+	};
+
+	optee {
+		compatible = "linaro,optee-tz";
+		method = "smc";
+	};

[Severity: Low]
Should the optee node be placed under a /firmware container node?

Documentation/devicetree/bindings/arm/firmware/linaro,optee-tz.yaml places optee under /firmware, which of_platform_default_populate_init() looks up directly via of_find_node_by_path("/firmware") before populating the rest of the tree.

[ ... ]

Quoted 10 lines
arch/arm64/boot/dts/synaptics/sl2617.dtsi new file +4 -0
new file mode 100644
index 0000000000000..a0de686d1fae5
@@ -0,0 +1,46 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (C) 2025 Synaptics Incorporated
+ *

arch/arm64/boot/dts/synaptics/sl2617.dtsi line 14

Quoted 10 lines
arch/arm64/boot/dts/synaptics/sl2617.dtsi new file +10 -0
+ * Author: Jisheng Zhang <[email protected]>
+ */
+
+#include "sl2613.dtsi"
+
+/ {
+	compatible = "syna,sl2617";
+
+	cpus {
+		cpu1: cpu@100 {

[Severity: Low]
This isn't a bug, but sl2617.dtsi and sl2619.dtsi duplicate the entire cpu1 and pmu definitions from sl2615.dtsi. Could they include sl2615.dtsi and override the root compatible property, the same way sl2613.dtsi includes sl2611.dtsi?

[ ... ]

Quoted 7 lines
arch/arm64/boot/dts/synaptics/sl2619.dtsi new file +1 -0
new file mode 100644
index 0000000000000..96bd58bbed3e1
@@ -0,0 +1,44 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)

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

Quoted 10 lines
arch/arm64/boot/dts/synaptics/sl2619.dtsi new file +10 -0
+/*
+ * Copyright (C) 2025 Synaptics Incorporated
+ *
+ * Author: Jisheng Zhang <[email protected]>
+ */
+
+#include "sl2613.dtsi"
+
+/ {
+	cpus {

[Severity: Low]
Is the root node missing compatible = "syna,sl2619"; here?

Unlike sl2615.dtsi and sl2617.dtsi, sl2619.dtsi does not override the root compatible property and inherits compatible = "syna,sl2613"; from sl2613.dtsi.

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

Re: [PATCH v2 07/13] reset: add Synaptics SL2610 reset controller support

In reply to Jisheng Zhang
Quoted 293 lines · Jisheng Zhang

Support the SoC and MCU reset controls exposed by the SL2610 system controllers. Match the MFD-created platform devices, use the parent syscon regmap and register each reset provider against the parent DT node.

Handle both pulse resets and sticky resets with assert/deassert controls.

---
 MAINTAINERS                  |   1 +
 drivers/reset/Kconfig        |  13 ++
 drivers/reset/Makefile       |   1 +
 drivers/reset/reset-sl2610.c | 224 +++++++++++++++++++++++++++++++++++
 4 files changed, 239 insertions(+)
 create mode 100644 drivers/reset/reset-sl2610.c
MAINTAINERS +1 -0
index eae1493485ee..1bd3b2f39865 100644
@@ -3812,6 +3812,7 @@ F:	Documentation/devicetree/bindings/soc/synaptics/
 F:	arch/arm/boot/dts/synaptics/
 F:	arch/arm/mach-berlin/
 F:	arch/arm64/boot/dts/synaptics/
+F:	drivers/reset/reset-sl2610.c
 F:	drivers/soc/synaptics/
 F:	include/dt-bindings/clock/syna,sl2610.h
 F:	include/dt-bindings/reset/syna,sl2610-reset.h
drivers/reset/Kconfig +13 -0
index eda9c698a95f..98e973a8798c 100644
@@ -358,6 +358,19 @@ config RESET_SUNXI
 	help
 	  This enables the reset driver for Allwinner SoCs.
 
+config RESET_SL2610
+	tristate "Synaptics SL2610 Reset Driver"
+	depends on ARCH_BERLIN || COMPILE_TEST
+	depends on OF && HAS_IOMEM
+	select SOC_SL2610_SYSCON
+	help
+	  Support the reset controllers in the SoC and MCU system control
+	  blocks of Synaptics SL2610 SoCs. Both pulse and sticky reset lines
+	  are supported.
+
+	  To compile this driver as a module, choose M here. The module will
+	  be called reset-sl2610.
+
 config RESET_TENSTORRENT_ATLANTIS
 	tristate "Tenstorrent atlantis reset driver"
 	depends on ARCH_TENSTORRENT || COMPILE_TEST
drivers/reset/Makefile +1 -0
index 489fafd6bbe3..d28276a4f2ea 100644
@@ -42,6 +42,7 @@ obj-$(CONFIG_RESET_SCMI) += reset-scmi.o
 obj-$(CONFIG_RESET_SIMPLE) += reset-simple.o
 obj-$(CONFIG_RESET_SKY1) += reset-sky1.o
 obj-$(CONFIG_RESET_SKY1_AUDSS) += reset-sky1-audss.o
+obj-$(CONFIG_RESET_SL2610) += reset-sl2610.o
 obj-$(CONFIG_RESET_SOCFPGA) += reset-socfpga.o
 obj-$(CONFIG_RESET_SUNPLUS) += reset-sunplus.o
 obj-$(CONFIG_RESET_SUNXI) += reset-sunxi.o
drivers/reset/reset-sl2610.c new file +224 -0
new file mode 100644
index 000000000000..1ca58d5a3e71
@@ -0,0 +1,224 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2026 Synaptics Incorporated
+ *
+ * Synaptics SL2610 reset driver
+ *
+ * Author: Jisheng Zhang <[email protected]>
+ */
+
+#include <dt-bindings/reset/syna,sl2610-reset.h>
+#include <linux/delay.h>
+#include <linux/io.h>
+#include <linux/mfd/syscon.h>
+#include <linux/module.h>
+#include <linux/of.h>
+#include <linux/of_address.h>
+#include <linux/platform_device.h>
+#include <linux/regmap.h>
+#include <linux/reset-controller.h>
+#include <linux/slab.h>
+#include <linux/types.h>
+
+/* SL2610 ACPU subsystem */
+#define SL2610_GBL_PERIFRESET			0x350
+#define SL2610_GBL_PERIFSTICKYRESET		0x360
+#define SL2610_GBL_APBPERIFRESET		0x370
+#define SL2610_GBL_TOPSTICKYRESET		0x378
+#define SL2610_GBL_AVIOSTICKYRESET		0x37c
+
+/* SL2610 system subsystem */
+#define SL2610_SMGBL_STICKYRST0			0x400
+
+#define to_sl2610_reset_priv(p)	container_of((p), struct sl2610_reset_priv, rcdev)
+
+#define SL2610_RESET(id, reg, bit, sticky)[id] = { reg, BIT(bit), sticky }
+
+struct sl2610_reset_cfg {
+	u32 reg;
+	u32 bit;
+	bool sticky;
+};
+
+struct sl2610_reset_data {
+	const struct sl2610_reset_cfg *cfgs;
+	size_t num;
+};
+
+struct sl2610_reset_priv {
+	struct regmap *regmap;
+	const struct sl2610_reset_cfg *cfgs;
+	struct reset_controller_dev rcdev;
+};
+
+static const struct sl2610_reset_cfg sl2610_reset_cfgs[] = {
+	SL2610_RESET(RST_SOC_SDIO0, SL2610_GBL_PERIFRESET, 2, false),
+	SL2610_RESET(RST_SOC_USB0, SL2610_GBL_PERIFRESET, 4, false),
+	SL2610_RESET(RST_SOC_EMMC, SL2610_GBL_PERIFRESET, 5, false),
+	SL2610_RESET(RST_SOC_GETH0, SL2610_GBL_PERIFRESET, 6, false),
+	SL2610_RESET(RST_SOC_SDIO1, SL2610_GBL_PERIFRESET, 7, false),
+	SL2610_RESET(RST_SOC_USB1, SL2610_GBL_PERIFRESET, 8, false),
+	SL2610_RESET(RST_SOC_GETH1, SL2610_GBL_PERIFRESET, 9, false),
+	SL2610_RESET(RST_SOC_USB0PHY, SL2610_GBL_PERIFSTICKYRESET, 0, true),
+	SL2610_RESET(RST_SOC_USB0CORE, SL2610_GBL_PERIFSTICKYRESET, 1, true),
+	SL2610_RESET(RST_SOC_USB0MAHB, SL2610_GBL_PERIFSTICKYRESET, 2, true),
+	SL2610_RESET(RST_SOC_USB1PHY, SL2610_GBL_PERIFSTICKYRESET, 3, true),
+	SL2610_RESET(RST_SOC_USB1CORE, SL2610_GBL_PERIFSTICKYRESET, 4, true),
+	SL2610_RESET(RST_SOC_USB1MAHB, SL2610_GBL_PERIFSTICKYRESET, 5, true),
+	SL2610_RESET(RST_SOC_UART0, SL2610_GBL_APBPERIFRESET, 0, false),
+	SL2610_RESET(RST_SOC_UART1, SL2610_GBL_APBPERIFRESET, 1, false),
+	SL2610_RESET(RST_SOC_UART2, SL2610_GBL_APBPERIFRESET, 2, false),
+	SL2610_RESET(RST_SOC_UART3, SL2610_GBL_APBPERIFRESET, 3, false),
+	SL2610_RESET(RST_SOC_I2C0, SL2610_GBL_APBPERIFRESET, 4, false),
+	SL2610_RESET(RST_SOC_I2C1, SL2610_GBL_APBPERIFRESET, 5, false),
+	SL2610_RESET(RST_SOC_SPI0, SL2610_GBL_APBPERIFRESET, 6, false),
+	SL2610_RESET(RST_SOC_SPI1, SL2610_GBL_APBPERIFRESET, 7, false),
+	SL2610_RESET(RST_SOC_SPI2, SL2610_GBL_APBPERIFRESET, 8, false),
+	SL2610_RESET(RST_SOC_SPI3, SL2610_GBL_APBPERIFRESET, 9, false),
+	SL2610_RESET(RST_SOC_APBTIMERS, SL2610_GBL_APBPERIFRESET, 10, false),
+	SL2610_RESET(RST_SOC_APBSYSCNT, SL2610_GBL_APBPERIFRESET, 11, false),
+	SL2610_RESET(RST_SOC_APBWDT, SL2610_GBL_APBPERIFRESET, 12, false),
+	SL2610_RESET(RST_SOC_APBGPIO, SL2610_GBL_APBPERIFRESET, 13, false),
+	SL2610_RESET(RST_SOC_APBDMA, SL2610_GBL_APBPERIFRESET, 14, false),
+	SL2610_RESET(RST_SOC_GPUCORE, SL2610_GBL_TOPSTICKYRESET, 0, true),
+	SL2610_RESET(RST_SOC_NPUCORE, SL2610_GBL_TOPSTICKYRESET, 1, true),
+	SL2610_RESET(RST_SOC_AVIOAIOG, SL2610_GBL_AVIOSTICKYRESET, 0, true),
+	SL2610_RESET(RST_SOC_AVIOVPPG, SL2610_GBL_AVIOSTICKYRESET, 1, true),
+	SL2610_RESET(RST_SOC_AVIOVIPG, SL2610_GBL_AVIOSTICKYRESET, 2, true),
+};
+
+static const struct sl2610_reset_cfg sl2610_system_reset_cfgs[] = {
+	SL2610_RESET(RST_SM_ADCCORE, SL2610_SMGBL_STICKYRST0, 0, true),
+	SL2610_RESET(RST_SM_ADCPRST, SL2610_SMGBL_STICKYRST0, 1, true),
+	SL2610_RESET(RST_SM_CAN0PRST, SL2610_SMGBL_STICKYRST0, 2, true),
+	SL2610_RESET(RST_SM_CAN0SRST, SL2610_SMGBL_STICKYRST0, 3, true),
+	SL2610_RESET(RST_SM_CAN1PRST, SL2610_SMGBL_STICKYRST0, 4, true),
+	SL2610_RESET(RST_SM_CAN1SRST, SL2610_SMGBL_STICKYRST0, 5, true),
+	SL2610_RESET(RST_SM_GPIOPRST, SL2610_SMGBL_STICKYRST0, 6, true),
+	SL2610_RESET(RST_SM_GPIOSRST, SL2610_SMGBL_STICKYRST0, 7, true),
+	SL2610_RESET(RST_SM_I2CM0PRST, SL2610_SMGBL_STICKYRST0, 8, true),
+	SL2610_RESET(RST_SM_I2CM0SRST, SL2610_SMGBL_STICKYRST0, 9, true),
+	SL2610_RESET(RST_SM_I2CM1PRST, SL2610_SMGBL_STICKYRST0, 10, true),
+	SL2610_RESET(RST_SM_I2CM1SRST, SL2610_SMGBL_STICKYRST0, 11, true),
+	SL2610_RESET(RST_SM_I3CPRST, SL2610_SMGBL_STICKYRST0, 12, true),
+	SL2610_RESET(RST_SM_I3CSRST, SL2610_SMGBL_STICKYRST0, 13, true),
+	SL2610_RESET(RST_SM_PDMPRST, SL2610_SMGBL_STICKYRST0, 14, true),
+	SL2610_RESET(RST_SM_PDMSRST, SL2610_SMGBL_STICKYRST0, 15, true),
+	SL2610_RESET(RST_SM_PVTHSRST, SL2610_SMGBL_STICKYRST0, 16, true),
+	SL2610_RESET(RST_SM_PVTPRST, SL2610_SMGBL_STICKYRST0, 17, true),
+	SL2610_RESET(RST_SM_PWMPERIRST, SL2610_SMGBL_STICKYRST0, 18, true),
+	SL2610_RESET(RST_SM_PWMPRST, SL2610_SMGBL_STICKYRST0, 19, true),
+	SL2610_RESET(RST_SM_SPIMPRST, SL2610_SMGBL_STICKYRST0, 20, true),
+	SL2610_RESET(RST_SM_SPIMSRST, SL2610_SMGBL_STICKYRST0, 21, true),
+	SL2610_RESET(RST_SM_SPISPRST, SL2610_SMGBL_STICKYRST0, 22, true),
+	SL2610_RESET(RST_SM_SPISSRST, SL2610_SMGBL_STICKYRST0, 23, true),
+	SL2610_RESET(RST_SM_UART0PRST, SL2610_SMGBL_STICKYRST0, 24, true),
+	SL2610_RESET(RST_SM_UART0SRST, SL2610_SMGBL_STICKYRST0, 25, true),
+	SL2610_RESET(RST_SM_UART1PRST, SL2610_SMGBL_STICKYRST0, 26, true),
+	SL2610_RESET(RST_SM_UART1SRST, SL2610_SMGBL_STICKYRST0, 27, true),
+	SL2610_RESET(RST_SM_UART2PRST, SL2610_SMGBL_STICKYRST0, 28, true),
+	SL2610_RESET(RST_SM_UART2SRST, SL2610_SMGBL_STICKYRST0, 29, true),
+	SL2610_RESET(RST_SM_UART3PRST, SL2610_SMGBL_STICKYRST0, 30, true),
+	SL2610_RESET(RST_SM_UART3SRST, SL2610_SMGBL_STICKYRST0, 31, true),
+};
+
+static const struct sl2610_reset_data sl2610_reset_data = {
+	.cfgs = sl2610_reset_cfgs,
+	.num = ARRAY_SIZE(sl2610_reset_cfgs),
+};
+
+static const struct sl2610_reset_data sl2610_system_reset_data = {
+	.cfgs = sl2610_system_reset_cfgs,
+	.num = ARRAY_SIZE(sl2610_system_reset_cfgs),
+};
+
+static int sl2610_reset_assert(struct reset_controller_dev *rcdev,
+			       unsigned long id)
+{
+	struct sl2610_reset_priv *priv = to_sl2610_reset_priv(rcdev);
+	const struct sl2610_reset_cfg *cfg = &priv->cfgs[id];
+
+	if (!cfg->sticky)
+		return -EINVAL;
+
+	return regmap_clear_bits(priv->regmap, cfg->reg, cfg->bit);
+}
+
+static int sl2610_reset_deassert(struct reset_controller_dev *rcdev,
+				 unsigned long id)
+{
+	struct sl2610_reset_priv *priv = to_sl2610_reset_priv(rcdev);
+	const struct sl2610_reset_cfg *cfg = &priv->cfgs[id];
+
+	if (!cfg->sticky)
+		return -EINVAL;
+
+	return regmap_set_bits(priv->regmap, cfg->reg, cfg->bit);
+}
+
+static int sl2610_reset_reset(struct reset_controller_dev *rcdev,
+			      unsigned long id)
+{
+	struct sl2610_reset_priv *priv = to_sl2610_reset_priv(rcdev);
+	const struct sl2610_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);
+}
+
+static const struct reset_control_ops sl2610_reset_ops = {
+	.reset	= sl2610_reset_reset,
+	.assert = sl2610_reset_assert,
+	.deassert = sl2610_reset_deassert,
+};
+
+static int sl2610_reset_probe(struct platform_device *pdev)
+{
+	struct device_node *parent_np = pdev->dev.parent->of_node;
+	struct sl2610_reset_priv *priv;
+	const struct sl2610_reset_data *data =
+		(void *)platform_get_device_id(pdev)->driver_data;
+
+	priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
+	if (!priv)
+		return -ENOMEM;
+
+	priv->regmap = syscon_node_to_regmap(parent_np);
+	if (IS_ERR(priv->regmap))
+		return PTR_ERR(priv->regmap);
+
+	priv->rcdev.owner = THIS_MODULE;
+	priv->rcdev.ops = &sl2610_reset_ops;
+	priv->rcdev.dev = &pdev->dev;
+	priv->rcdev.of_node = parent_np;
+	priv->rcdev.of_reset_n_cells = 1;
+	priv->rcdev.nr_resets = data->num;
+	priv->cfgs = data->cfgs;
+
+	return devm_reset_controller_register(&pdev->dev, &priv->rcdev);
+}
+
+static const struct platform_device_id sl2610_reset_ids[] = {
+	{ "sl2610-soc-reset", (kernel_ulong_t)&sl2610_reset_data },
+	{ "sl2610-mcu-reset", (kernel_ulong_t)&sl2610_system_reset_data },
+	{ }
+};
+MODULE_DEVICE_TABLE(platform, sl2610_reset_ids);
+
+static struct platform_driver sl2610_reset_driver = {
+	.probe = sl2610_reset_probe,
+	.id_table = sl2610_reset_ids,
+	.driver = {
+		.name = "sl2610-reset",
+	},
+};
+module_platform_driver(sl2610_reset_driver);
+
+MODULE_AUTHOR("Jisheng Zhang <[email protected]>");
+MODULE_DESCRIPTION("Synaptics SL2610 reset controller");
+MODULE_LICENSE("GPL");
maintainer
#21 lore raw

Re: [PATCH v2 07/13] reset: add Synaptics SL2610 reset controller support

In reply to Jisheng Zhang
Quoted 32 lines · Jisheng Zhang

Support the SoC and MCU reset controls exposed by the SL2610 system controllers. Match the MFD-created platform devices, use the parent syscon regmap and register each reset provider against the parent DT node.

Handle both pulse resets and sticky resets with assert/deassert controls.

---
 MAINTAINERS                  |   1 +
 drivers/reset/Kconfig        |  13 ++
 drivers/reset/Makefile       |   1 +
 drivers/reset/reset-sl2610.c | 224 +++++++++++++++++++++++++++++++++++
 4 files changed, 239 insertions(+)
 create mode 100644 drivers/reset/reset-sl2610.c
MAINTAINERS +1 -0
index eae1493485ee..1bd3b2f39865 100644
@@ -3812,6 +3812,7 @@ F:	Documentation/devicetree/bindings/soc/synaptics/
 F:	arch/arm/boot/dts/synaptics/
 F:	arch/arm/mach-berlin/
 F:	arch/arm64/boot/dts/synaptics/
+F:	drivers/reset/reset-sl2610.c
 F:	drivers/soc/synaptics/
 F:	include/dt-bindings/clock/syna,sl2610.h
 F:	include/dt-bindings/reset/syna,sl2610-reset.h
drivers/reset/Kconfig +0 -0
index eda9c698a95f..98e973a8798c 100644

drivers/reset/Kconfig config RESET_SUNXI · line 365

Quoted 8 lines
drivers/reset/Kconfig +5 -0
@@ -358,6 +358,19 @@ config RESET_SUNXI
 	help
 	  This enables the reset driver for Allwinner SoCs.
 
+config RESET_SL2610
+	tristate "Synaptics SL2610 Reset Driver"
+	depends on ARCH_BERLIN || COMPILE_TEST
+	depends on OF && HAS_IOMEM
+	select SOC_SL2610_SYSCON

Why is this select needed?

Quoted 52 lines
drivers/reset/Kconfig +8 -0
+	help
+	  Support the reset controllers in the SoC and MCU system control
+	  blocks of Synaptics SL2610 SoCs. Both pulse and sticky reset lines
+	  are supported.
+
+	  To compile this driver as a module, choose M here. The module will
+	  be called reset-sl2610.
+
 config RESET_TENSTORRENT_ATLANTIS
 	tristate "Tenstorrent atlantis reset driver"
 	depends on ARCH_TENSTORRENT || COMPILE_TEST
drivers/reset/Makefile +1 -0
index 489fafd6bbe3..d28276a4f2ea 100644
@@ -42,6 +42,7 @@ obj-$(CONFIG_RESET_SCMI) += reset-scmi.o
 obj-$(CONFIG_RESET_SIMPLE) += reset-simple.o
 obj-$(CONFIG_RESET_SKY1) += reset-sky1.o
 obj-$(CONFIG_RESET_SKY1_AUDSS) += reset-sky1-audss.o
+obj-$(CONFIG_RESET_SL2610) += reset-sl2610.o
 obj-$(CONFIG_RESET_SOCFPGA) += reset-socfpga.o
 obj-$(CONFIG_RESET_SUNPLUS) += reset-sunplus.o
 obj-$(CONFIG_RESET_SUNXI) += reset-sunxi.o
drivers/reset/reset-sl2610.c new file +23 -0
new file mode 100644
index 000000000000..1ca58d5a3e71
@@ -0,0 +1,224 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2026 Synaptics Incorporated
+ *
+ * Synaptics SL2610 reset driver
+ *
+ * Author: Jisheng Zhang <[email protected]>
+ */
+
+#include <dt-bindings/reset/syna,sl2610-reset.h>
+#include <linux/delay.h>
+#include <linux/io.h>
+#include <linux/mfd/syscon.h>
+#include <linux/module.h>
+#include <linux/of.h>
+#include <linux/of_address.h>
+#include <linux/platform_device.h>
+#include <linux/regmap.h>
+#include <linux/reset-controller.h>
+#include <linux/slab.h>
+#include <linux/types.h>
+
+/* SL2610 ACPU subsystem */

drivers/reset/reset-sl2610.c line 33

Quoted 10 lines
drivers/reset/reset-sl2610.c new file +10 -0
+#define SL2610_GBL_PERIFRESET			0x350
+#define SL2610_GBL_PERIFSTICKYRESET		0x360
+#define SL2610_GBL_APBPERIFRESET		0x370
+#define SL2610_GBL_TOPSTICKYRESET		0x378
+#define SL2610_GBL_AVIOSTICKYRESET		0x37c
+
+/* SL2610 system subsystem */
+#define SL2610_SMGBL_STICKYRST0			0x400
+
+#define to_sl2610_reset_priv(p)	container_of((p), struct sl2610_reset_priv, rcdev)

Turn this into an inline function, please.

Quoted 99 lines
drivers/reset/reset-sl2610.c new file +99 -0
+
+#define SL2610_RESET(id, reg, bit, sticky)[id] = { reg, BIT(bit), sticky }
+
+struct sl2610_reset_cfg {
+	u32 reg;
+	u32 bit;
+	bool sticky;
+};
+
+struct sl2610_reset_data {
+	const struct sl2610_reset_cfg *cfgs;
+	size_t num;
+};
+
+struct sl2610_reset_priv {
+	struct regmap *regmap;
+	const struct sl2610_reset_cfg *cfgs;
+	struct reset_controller_dev rcdev;
+};
+
+static const struct sl2610_reset_cfg sl2610_reset_cfgs[] = {
+	SL2610_RESET(RST_SOC_SDIO0, SL2610_GBL_PERIFRESET, 2, false),
+	SL2610_RESET(RST_SOC_USB0, SL2610_GBL_PERIFRESET, 4, false),
+	SL2610_RESET(RST_SOC_EMMC, SL2610_GBL_PERIFRESET, 5, false),
+	SL2610_RESET(RST_SOC_GETH0, SL2610_GBL_PERIFRESET, 6, false),
+	SL2610_RESET(RST_SOC_SDIO1, SL2610_GBL_PERIFRESET, 7, false),
+	SL2610_RESET(RST_SOC_USB1, SL2610_GBL_PERIFRESET, 8, false),
+	SL2610_RESET(RST_SOC_GETH1, SL2610_GBL_PERIFRESET, 9, false),
+	SL2610_RESET(RST_SOC_USB0PHY, SL2610_GBL_PERIFSTICKYRESET, 0, true),
+	SL2610_RESET(RST_SOC_USB0CORE, SL2610_GBL_PERIFSTICKYRESET, 1, true),
+	SL2610_RESET(RST_SOC_USB0MAHB, SL2610_GBL_PERIFSTICKYRESET, 2, true),
+	SL2610_RESET(RST_SOC_USB1PHY, SL2610_GBL_PERIFSTICKYRESET, 3, true),
+	SL2610_RESET(RST_SOC_USB1CORE, SL2610_GBL_PERIFSTICKYRESET, 4, true),
+	SL2610_RESET(RST_SOC_USB1MAHB, SL2610_GBL_PERIFSTICKYRESET, 5, true),
+	SL2610_RESET(RST_SOC_UART0, SL2610_GBL_APBPERIFRESET, 0, false),
+	SL2610_RESET(RST_SOC_UART1, SL2610_GBL_APBPERIFRESET, 1, false),
+	SL2610_RESET(RST_SOC_UART2, SL2610_GBL_APBPERIFRESET, 2, false),
+	SL2610_RESET(RST_SOC_UART3, SL2610_GBL_APBPERIFRESET, 3, false),
+	SL2610_RESET(RST_SOC_I2C0, SL2610_GBL_APBPERIFRESET, 4, false),
+	SL2610_RESET(RST_SOC_I2C1, SL2610_GBL_APBPERIFRESET, 5, false),
+	SL2610_RESET(RST_SOC_SPI0, SL2610_GBL_APBPERIFRESET, 6, false),
+	SL2610_RESET(RST_SOC_SPI1, SL2610_GBL_APBPERIFRESET, 7, false),
+	SL2610_RESET(RST_SOC_SPI2, SL2610_GBL_APBPERIFRESET, 8, false),
+	SL2610_RESET(RST_SOC_SPI3, SL2610_GBL_APBPERIFRESET, 9, false),
+	SL2610_RESET(RST_SOC_APBTIMERS, SL2610_GBL_APBPERIFRESET, 10, false),
+	SL2610_RESET(RST_SOC_APBSYSCNT, SL2610_GBL_APBPERIFRESET, 11, false),
+	SL2610_RESET(RST_SOC_APBWDT, SL2610_GBL_APBPERIFRESET, 12, false),
+	SL2610_RESET(RST_SOC_APBGPIO, SL2610_GBL_APBPERIFRESET, 13, false),
+	SL2610_RESET(RST_SOC_APBDMA, SL2610_GBL_APBPERIFRESET, 14, false),
+	SL2610_RESET(RST_SOC_GPUCORE, SL2610_GBL_TOPSTICKYRESET, 0, true),
+	SL2610_RESET(RST_SOC_NPUCORE, SL2610_GBL_TOPSTICKYRESET, 1, true),
+	SL2610_RESET(RST_SOC_AVIOAIOG, SL2610_GBL_AVIOSTICKYRESET, 0, true),
+	SL2610_RESET(RST_SOC_AVIOVPPG, SL2610_GBL_AVIOSTICKYRESET, 1, true),
+	SL2610_RESET(RST_SOC_AVIOVIPG, SL2610_GBL_AVIOSTICKYRESET, 2, true),
+};
+
+static const struct sl2610_reset_cfg sl2610_system_reset_cfgs[] = {
+	SL2610_RESET(RST_SM_ADCCORE, SL2610_SMGBL_STICKYRST0, 0, true),
+	SL2610_RESET(RST_SM_ADCPRST, SL2610_SMGBL_STICKYRST0, 1, true),
+	SL2610_RESET(RST_SM_CAN0PRST, SL2610_SMGBL_STICKYRST0, 2, true),
+	SL2610_RESET(RST_SM_CAN0SRST, SL2610_SMGBL_STICKYRST0, 3, true),
+	SL2610_RESET(RST_SM_CAN1PRST, SL2610_SMGBL_STICKYRST0, 4, true),
+	SL2610_RESET(RST_SM_CAN1SRST, SL2610_SMGBL_STICKYRST0, 5, true),
+	SL2610_RESET(RST_SM_GPIOPRST, SL2610_SMGBL_STICKYRST0, 6, true),
+	SL2610_RESET(RST_SM_GPIOSRST, SL2610_SMGBL_STICKYRST0, 7, true),
+	SL2610_RESET(RST_SM_I2CM0PRST, SL2610_SMGBL_STICKYRST0, 8, true),
+	SL2610_RESET(RST_SM_I2CM0SRST, SL2610_SMGBL_STICKYRST0, 9, true),
+	SL2610_RESET(RST_SM_I2CM1PRST, SL2610_SMGBL_STICKYRST0, 10, true),
+	SL2610_RESET(RST_SM_I2CM1SRST, SL2610_SMGBL_STICKYRST0, 11, true),
+	SL2610_RESET(RST_SM_I3CPRST, SL2610_SMGBL_STICKYRST0, 12, true),
+	SL2610_RESET(RST_SM_I3CSRST, SL2610_SMGBL_STICKYRST0, 13, true),
+	SL2610_RESET(RST_SM_PDMPRST, SL2610_SMGBL_STICKYRST0, 14, true),
+	SL2610_RESET(RST_SM_PDMSRST, SL2610_SMGBL_STICKYRST0, 15, true),
+	SL2610_RESET(RST_SM_PVTHSRST, SL2610_SMGBL_STICKYRST0, 16, true),
+	SL2610_RESET(RST_SM_PVTPRST, SL2610_SMGBL_STICKYRST0, 17, true),
+	SL2610_RESET(RST_SM_PWMPERIRST, SL2610_SMGBL_STICKYRST0, 18, true),
+	SL2610_RESET(RST_SM_PWMPRST, SL2610_SMGBL_STICKYRST0, 19, true),
+	SL2610_RESET(RST_SM_SPIMPRST, SL2610_SMGBL_STICKYRST0, 20, true),
+	SL2610_RESET(RST_SM_SPIMSRST, SL2610_SMGBL_STICKYRST0, 21, true),
+	SL2610_RESET(RST_SM_SPISPRST, SL2610_SMGBL_STICKYRST0, 22, true),
+	SL2610_RESET(RST_SM_SPISSRST, SL2610_SMGBL_STICKYRST0, 23, true),
+	SL2610_RESET(RST_SM_UART0PRST, SL2610_SMGBL_STICKYRST0, 24, true),
+	SL2610_RESET(RST_SM_UART0SRST, SL2610_SMGBL_STICKYRST0, 25, true),
+	SL2610_RESET(RST_SM_UART1PRST, SL2610_SMGBL_STICKYRST0, 26, true),
+	SL2610_RESET(RST_SM_UART1SRST, SL2610_SMGBL_STICKYRST0, 27, true),
+	SL2610_RESET(RST_SM_UART2PRST, SL2610_SMGBL_STICKYRST0, 28, true),
+	SL2610_RESET(RST_SM_UART2SRST, SL2610_SMGBL_STICKYRST0, 29, true),
+	SL2610_RESET(RST_SM_UART3PRST, SL2610_SMGBL_STICKYRST0, 30, true),
+	SL2610_RESET(RST_SM_UART3SRST, SL2610_SMGBL_STICKYRST0, 31, true),
+};
+
+static const struct sl2610_reset_data sl2610_reset_data = {
+	.cfgs = sl2610_reset_cfgs,
+	.num = ARRAY_SIZE(sl2610_reset_cfgs),
+};
+
+static const struct sl2610_reset_data sl2610_system_reset_data = {
+	.cfgs = sl2610_system_reset_cfgs,
+	.num = ARRAY_SIZE(sl2610_system_reset_cfgs),

drivers/reset/reset-sl2610.c line 142

Quoted 10 lines
drivers/reset/reset-sl2610.c new file +10 -0
+};
+
+static int sl2610_reset_assert(struct reset_controller_dev *rcdev,
+			       unsigned long id)
+{
+	struct sl2610_reset_priv *priv = to_sl2610_reset_priv(rcdev);
+	const struct sl2610_reset_cfg *cfg = &priv->cfgs[id];
+
+	if (!cfg->sticky)
+		return -EINVAL;

The core uses -ENOTSUPP for this.

drivers/reset/reset-sl2610.c line 154

Quoted 12 lines
drivers/reset/reset-sl2610.c new file +12 -0
+
+	return regmap_clear_bits(priv->regmap, cfg->reg, cfg->bit);
+}
+
+static int sl2610_reset_deassert(struct reset_controller_dev *rcdev,
+				 unsigned long id)
+{
+	struct sl2610_reset_priv *priv = to_sl2610_reset_priv(rcdev);
+	const struct sl2610_reset_cfg *cfg = &priv->cfgs[id];
+
+	if (!cfg->sticky)
+		return -EINVAL;

This could just return 0.

Quoted 5 lines
drivers/reset/reset-sl2610.c new file +5 -0
+
+	return regmap_set_bits(priv->regmap, cfg->reg, cfg->bit);
+}
+
+static int sl2610_reset_reset(struct reset_controller_dev *rcdev,

drivers/reset/reset-sl2610.c line 169

Quoted 10 lines
drivers/reset/reset-sl2610.c new file +10 -0
+			      unsigned long id)
+{
+	struct sl2610_reset_priv *priv = to_sl2610_reset_priv(rcdev);
+	const struct sl2610_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);
+	}

Why is this needed? Could you just return -ENOTSUPP?

Quoted 20 lines
drivers/reset/reset-sl2610.c new file +20 -0
+
+	return regmap_set_bits(priv->regmap, cfg->reg, cfg->bit);
+}
+
+static const struct reset_control_ops sl2610_reset_ops = {
+	.reset	= sl2610_reset_reset,
+	.assert = sl2610_reset_assert,
+	.deassert = sl2610_reset_deassert,
+};
+
+static int sl2610_reset_probe(struct platform_device *pdev)
+{
+	struct device_node *parent_np = pdev->dev.parent->of_node;
+	struct sl2610_reset_priv *priv;
+	const struct sl2610_reset_data *data =
+		(void *)platform_get_device_id(pdev)->driver_data;
+
+	priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
+	if (!priv)
+		return -ENOMEM;

drivers/reset/reset-sl2610.c line 199

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

Please don't set of_reset_n_cells. This is ignored since of_xlate is not set. reset_controller_register() already sets fwnode_reset_n_cells to 1 by default.

regards
Philipp

author maintainer
#37 lore raw
In reply to Jisheng Zhang
Quoted 10 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 8 lines

since v1:
- rebase on latest rcN
- drop some patches which have been merged
- let the "gbl" node export pinctrl/reset/clk devices with MFD_CELL_NAME()
- use <linux/platform_device.h> instead of <linux/mod_devicetable.h>
- adopt some coding suggestions from Uwe
- Use 0 and 1 to select normal and strong pull-up on 10-bit pads

Other SoCs doesn't use this defintion for pull up or strong pull up. After consulting our HW people, the strong pull up isn't used at all, so I will remove strong pull up support in newer version. We can add back its support when it's really needed in the future, nothing breaks.

Quoted 91 lines

- collect Acked-by tag

Jisheng Zhang (13):
arm64: kconfig: let ARCH_BERLIN cover Synaptics arm64 SoCs
pinctrl: berlin: use u16 instead of u8 for the offset
pinctrl: berlin: enable module build support
pinctrl: berlin: add optional pinconf support
dt-bindings: soc: synaptics: add SL2610 system controllers
soc: synaptics: add SL2610 system controller support
reset: add Synaptics SL2610 reset controller support
pinctrl: berlin: add Synaptics SL2610 pin controller support
clk: berlin: add Synaptics clock controller helpers
clk: berlin: add Synaptics SL2610 clocks and PLLs
dt-bindings: arm: berlin: add Synaptics SL2610 SoCs and RDK boards
arm64: dts: synaptics: add SL2610 family SoCs
arm64: dts: synaptics: add SL2610 family RDK boards

 .../bindings/arm/marvell,berlin.yaml          |  20 +
 .../soc/synaptics/syna,sl2610-soc-syscon.yaml | 178 ++++
 MAINTAINERS                                   |   8 +
 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     | 457 +++++++++++
 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                    |  34 +
 drivers/clk/berlin/Makefile                   |   4 +
 drivers/clk/berlin/clk-sl2610.c               | 360 +++++++++
 drivers/clk/berlin/sl-clk.c                   | 279 +++++++
 drivers/clk/berlin/sl-clk.h                   |  31 +
 drivers/clk/berlin/sl-sysmgr-clk.c            | 241 ++++++
 drivers/clk/berlin/sl-sysmgr-clk.h            |  44 +
 drivers/clk/berlin/sl2610-pll.c               | 145 ++++
 drivers/clk/berlin/sl2610-pll.h               |  14 +
 drivers/pinctrl/berlin/Kconfig                |  16 +
 drivers/pinctrl/berlin/Makefile               |   1 +
 drivers/pinctrl/berlin/berlin.c               | 259 +++++-
 drivers/pinctrl/berlin/berlin.h               |  17 +-
 drivers/pinctrl/berlin/pinctrl-sl2610.c       | 759 ++++++++++++++++++
 drivers/reset/Kconfig                         |  13 +
 drivers/reset/Makefile                        |   1 +
 drivers/reset/reset-sl2610.c                  | 224 ++++++
 drivers/soc/Kconfig                           |   1 +
 drivers/soc/Makefile                          |   1 +
 drivers/soc/synaptics/Kconfig                 |  14 +
 drivers/soc/synaptics/Makefile                |   2 +
 drivers/soc/synaptics/sl2610-syscon.c         |  84 ++
 include/dt-bindings/clock/syna,sl2610.h       | 131 +++
 include/dt-bindings/reset/syna,sl2610-reset.h |  80 ++
 41 files changed, 3771 insertions(+), 20 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/soc/synaptics/syna,sl2610-soc-syscon.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/clk-sl2610.c
 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/sl2610-pll.c
 create mode 100644 drivers/clk/berlin/sl2610-pll.h
 create mode 100644 drivers/pinctrl/berlin/pinctrl-sl2610.c
 create mode 100644 drivers/reset/reset-sl2610.c
 create mode 100644 drivers/soc/synaptics/Kconfig
 create mode 100644 drivers/soc/synaptics/Makefile
 create mode 100644 drivers/soc/synaptics/sl2610-syscon.c
 create mode 100644 include/dt-bindings/clock/syna,sl2610.h
 create mode 100644 include/dt-bindings/reset/syna,sl2610-reset.h
Signature · 1 line
2.55.0
author maintainer
#24 lore raw

Re: [PATCH v2 08/13] pinctrl: berlin: add Synaptics SL2610 pin controller support

In reply to Jisheng Zhang
Quoted 302 lines · Jisheng Zhang

Add the SoC and MCU pin groups and mux functions for SL2610, together with their pad configuration register descriptions. Bind to the platform devices created by the system controller and associate pin configurations with the parent syscon DT node.

---
 MAINTAINERS                             |   1 +
 drivers/pinctrl/berlin/Kconfig          |  15 +
 drivers/pinctrl/berlin/Makefile         |   1 +
 drivers/pinctrl/berlin/pinctrl-sl2610.c | 759 ++++++++++++++++++++++++
 4 files changed, 776 insertions(+)
 create mode 100644 drivers/pinctrl/berlin/pinctrl-sl2610.c
MAINTAINERS +1 -0
index 1bd3b2f39865..b5bc76062771 100644
@@ -3812,6 +3812,7 @@ F:	Documentation/devicetree/bindings/soc/synaptics/
 F:	arch/arm/boot/dts/synaptics/
 F:	arch/arm/mach-berlin/
 F:	arch/arm64/boot/dts/synaptics/
+F:	drivers/pinctrl/berlin/pinctrl-sl2610.c
 F:	drivers/reset/reset-sl2610.c
 F:	drivers/soc/synaptics/
 F:	include/dt-bindings/clock/syna,sl2610.h
drivers/pinctrl/berlin/Kconfig +15 -0
index abb1c912b9ba..79541a4a81aa 100644
@@ -32,4 +32,19 @@ config PINCTRL_BERLIN_BG4CT
 	depends on OF
 	select PINCTRL_BERLIN
 
+config PINCTRL_SL2610
+	tristate "Synaptics SL2610 pin controller driver"
+	depends on OF && HAS_IOMEM
+	select SOC_SL2610_SYSCON
+	select GENERIC_PINCONF
+	select PINCONF
+	select PINCTRL_BERLIN
+	help
+	  Support the SoC and MCU pin controllers on Synaptics SL2610 SoCs.
+	  These provide pin multiplexing and electrical pad configuration
+	  through their parent system control blocks.
+
+	  To compile this driver as a module, choose M here. The module will
+	  be called pinctrl-sl2610.
+
 endif
drivers/pinctrl/berlin/Makefile +1 -0
index 7b4aa5444a4a..448965293e6a 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_SL2610)		+= pinctrl-sl2610.o
drivers/pinctrl/berlin/pinctrl-sl2610.c new file +237 -0
new file mode 100644
index 000000000000..0a3dc146c2c0
@@ -0,0 +1,759 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Synaptics SL2610 pinctrl driver
+ *
+ * Copyright (C) 2025 Synaptics Incorporated
+ *
+ * Author: Jisheng Zhang <[email protected]>
+ */
+
+#include <linux/init.h>
+#include <linux/mfd/syscon.h>
+#include <linux/module.h>
+#include <linux/of.h>
+#include <linux/platform_device.h>
+#include <linux/property.h>
+#include <linux/regmap.h>
+
+#include "berlin.h"
+
+static const struct berlin_desc_group sl2610_soc_pinctrl_groups[] = {
+	BERLIN_PINCTRLCONF_GROUP("GPIO23", 0x8000, 0x3, 0x00,
+			0x8800, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* GPIO23 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "tw2"), /* SCL */
+			BERLIN_PINCTRL_FUNCTION(0x2, "rgmii"), /* MDC */
+			BERLIN_PINCTRL_FUNCTION(0x3, "key_row0"),
+			BERLIN_PINCTRL_FUNCTION(0x5, "spi3"), /* SS2n */
+			BERLIN_PINCTRL_FUNCTION(0x6, "key_col3"),
+			BERLIN_PINCTRL_FUNCTION(0x7, "dbg")), /* OUT4 */
+	BERLIN_PINCTRLCONF_GROUP("GPIO24", 0x8000, 0x3, 0x03,
+			0x8804, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* GPIO24 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "tw2"), /* SDA */
+			BERLIN_PINCTRL_FUNCTION(0x2, "rgmii"), /* MDIO */
+			BERLIN_PINCTRL_FUNCTION(0x3, "key_row1"),
+			BERLIN_PINCTRL_FUNCTION(0x5, "spi3"), /* SS3n */
+			BERLIN_PINCTRL_FUNCTION(0x6, "key_col2"),
+			BERLIN_PINCTRL_FUNCTION(0x7, "dbg")), /* OUT5 */
+	BERLIN_PINCTRLCONF_GROUP("GPIO25", 0x8000, 0x3, 0x06,
+			0x8808, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* GPIO25 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "uart5"), /* RXD */
+			BERLIN_PINCTRL_FUNCTION(0x2, "gpio_trig1"),
+			BERLIN_PINCTRL_FUNCTION(0x3, "key_row2"),
+			BERLIN_PINCTRL_FUNCTION(0x4, "sm_uart1"), /* RXD */
+			BERLIN_PINCTRL_FUNCTION(0x6, "key_col1"),
+			BERLIN_PINCTRL_FUNCTION(0x7, "dbg")), /* OUT6 */
+	BERLIN_PINCTRLCONF_GROUP("GPIO26", 0x8000, 0x3, 0x09,
+			0x880c, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* GPIO26 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "uart5"), /* TXD */
+			BERLIN_PINCTRL_FUNCTION(0x2, "rgmii"), /* PTP_PPS_O */
+			BERLIN_PINCTRL_FUNCTION(0x4, "sm_uart1"), /* TXD */
+			BERLIN_PINCTRL_FUNCTION(0x5, "usb2"), /* VBUS */
+			BERLIN_PINCTRL_FUNCTION(0x7, "dbg")), /* OUT7 */
+	BERLIN_PINCTRLCONF_GROUP("GPIO27", 0x8000, 0x3, 0x0c,
+			0x8810, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* GPIO27 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "tw3"), /* SCL */
+			BERLIN_PINCTRL_FUNCTION(0x2, "uart4"), /* TXD */
+			BERLIN_PINCTRL_FUNCTION(0x4, "sm_uart1")), /* RTSn */
+	BERLIN_PINCTRLCONF_GROUP("GPIO28", 0x8000, 0x3, 0x0f,
+			0x8814, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* GPIO28 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "tw3"), /* SDA */
+			BERLIN_PINCTRL_FUNCTION(0x2, "uart4"), /* RXD */
+			BERLIN_PINCTRL_FUNCTION(0x4, "sm_uart1")), /* CTSn */
+	BERLIN_PINCTRLCONF_GROUP("GPIO29", 0x8000, 0x3, 0x12,
+			0x8818, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* GPIO29 */
+			BERLIN_PINCTRL_FUNCTION(0x2, "uart4"), /* DE */
+			BERLIN_PINCTRL_FUNCTION(0x3, "key_row4"),
+			BERLIN_PINCTRL_FUNCTION(0x4, "sm_uart1"), /* RXD */
+			BERLIN_PINCTRL_FUNCTION(0x6, "key_col4"),
+			BERLIN_PINCTRL_FUNCTION(0x7, "spi4")), /* SDI */
+	BERLIN_PINCTRLCONF_GROUP("GPIO30", 0x8000, 0x3, 0x15,
+			0x881c, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* GPIO30 */
+			BERLIN_PINCTRL_FUNCTION(0x2, "uart4"), /* REn */
+			BERLIN_PINCTRL_FUNCTION(0x3, "key_row5"),
+			BERLIN_PINCTRL_FUNCTION(0x4, "sm_uart1"), /* TXD */
+			BERLIN_PINCTRL_FUNCTION(0x6, "key_col5"),
+			BERLIN_PINCTRL_FUNCTION(0x7, "spi4")), /* SCLK */
+	BERLIN_PINCTRLCONF_GROUP("GPIO31", 0x8000, 0x3, 0x18,
+			0x8820, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* GPIO31 */
+			BERLIN_PINCTRL_FUNCTION(0x2, "rgmii"), /* MDC */
+			BERLIN_PINCTRL_FUNCTION(0x5, "spi5"), /* SS3n */
+			BERLIN_PINCTRL_FUNCTION(0x6, "spi3"), /* SS2n */
+			BERLIN_PINCTRL_FUNCTION(0x7, "spi4")), /* SS2n */
+	BERLIN_PINCTRLCONF_GROUP("GPIO32", 0x8000, 0x3, 0x1b,
+			0x8824, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* GPIO32 */
+			BERLIN_PINCTRL_FUNCTION(0x2, "rgmii"), /* MDIO */
+			BERLIN_PINCTRL_FUNCTION(0x6, "spi3"), /* SS3n */
+			BERLIN_PINCTRL_FUNCTION(0x7, "spi4")), /* SS3n */
+	BERLIN_PINCTRLCONF_GROUP("GPIO33", 0x8004, 0x3, 0x00,
+			0x8828, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* GPIO33 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "rgmii1"), /* TD0 */
+			BERLIN_PINCTRL_FUNCTION(0x2, "rmii1"), /* TXD0 */
+			BERLIN_PINCTRL_FUNCTION(0x5, "can0"), /* TX */
+			BERLIN_PINCTRL_FUNCTION(0x6, "spi3"), /* SS1n */
+			BERLIN_PINCTRL_FUNCTION(0x7, "spi4")), /* SS1n */
+	BERLIN_PINCTRLCONF_GROUP("GPIO34", 0x8004, 0x3, 0x03,
+			0x882c, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* GPIO34 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "rgmii1"), /* TD1 */
+			BERLIN_PINCTRL_FUNCTION(0x2, "rmii1"), /* TXD1 */
+			BERLIN_PINCTRL_FUNCTION(0x5, "can0")), /* RX */
+	BERLIN_PINCTRLCONF_GROUP("GPIO35", 0x8004, 0x3, 0x06,
+			0x8830, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* GPIO35 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "rgmii1"), /* TD2 */
+			BERLIN_PINCTRL_FUNCTION(0x2, "rmii2"), /* TXD0 */
+			BERLIN_PINCTRL_FUNCTION(0x3, "key_col7"),
+			BERLIN_PINCTRL_FUNCTION(0x4, "uart5"), /* RXD */
+			BERLIN_PINCTRL_FUNCTION(0x7, "spi4")), /* SS0n */
+	BERLIN_PINCTRLCONF_GROUP("GPIO36", 0x8004, 0x3, 0x09,
+			0x8834, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* GPIO36 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "rgmii1"), /* TD3 */
+			BERLIN_PINCTRL_FUNCTION(0x2, "rmii2"), /* TXD1 */
+			BERLIN_PINCTRL_FUNCTION(0x4, "uart5"), /* TXD */
+			BERLIN_PINCTRL_FUNCTION(0x7, "spi4")), /* SDO */
+	BERLIN_PINCTRLCONF_GROUP("GPIO37", 0x8004, 0x3, 0x0c,
+			0x8838, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* GPIO37 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "rgmii1"), /* RD0 */
+			BERLIN_PINCTRL_FUNCTION(0x2, "rmii1"), /* RXD0 */
+			BERLIN_PINCTRL_FUNCTION(0x5, "can1"), /* TX */
+			BERLIN_PINCTRL_FUNCTION(0x7, "spi5")), /* SDI */
+	BERLIN_PINCTRLCONF_GROUP("GPIO38", 0x8004, 0x3, 0x0f,
+			0x883c, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* GPIO38 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "rgmii1"), /* RD1 */
+			BERLIN_PINCTRL_FUNCTION(0x2, "rmii1"), /* RXD1 */
+			BERLIN_PINCTRL_FUNCTION(0x5, "can1"), /* RX */
+			BERLIN_PINCTRL_FUNCTION(0x7, "spi5")), /* SDO */
+	BERLIN_PINCTRLCONF_GROUP("GPIO39", 0x8004, 0x3, 0x12,
+			0x8840, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* GPIO39 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "rgmii1"), /* RD2 */
+			BERLIN_PINCTRL_FUNCTION(0x2, "rmii2"), /* RXD0 */
+			BERLIN_PINCTRL_FUNCTION(0x3, "key_row6"),
+			BERLIN_PINCTRL_FUNCTION(0x4, "uart6"), /* RXD */
+			BERLIN_PINCTRL_FUNCTION(0x5, "spi5"), /* SS1n*/
+			BERLIN_PINCTRL_FUNCTION(0x6, "spi4")), /* SS3n  */
+	BERLIN_PINCTRLCONF_GROUP("GPIO40", 0x8004, 0x3, 0x15,
+			0x8844, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* GPIO40 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "rgmii1"), /* RD3 */
+			BERLIN_PINCTRL_FUNCTION(0x2, "rmii2"), /* RXD1 */
+			BERLIN_PINCTRL_FUNCTION(0x3, "key_row7"),
+			BERLIN_PINCTRL_FUNCTION(0x4, "uart6"), /* TXD */
+			BERLIN_PINCTRL_FUNCTION(0x5, "spi5"), /* SS2n */
+			BERLIN_PINCTRL_FUNCTION(0x6, "spi4")), /* SS2n  */
+	BERLIN_PINCTRLCONF_GROUP("GPIO41", 0x8004, 0x3, 0x18,
+			0x8848, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* GPIO41 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "rgmii1"), /* RXC */
+			BERLIN_PINCTRL_FUNCTION(0x2, "rmii1"), /* CRSDV */
+			BERLIN_PINCTRL_FUNCTION(0x7, "spi5")), /* SCLK */
+	BERLIN_PINCTRLCONF_GROUP("GPIO42", 0x8004, 0x3, 0x1b,
+			0x884c, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* GPIO42 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "rgmii1"), /* TXC */
+			BERLIN_PINCTRL_FUNCTION(0x2, "rmii2"), /* CRSDV */
+			BERLIN_PINCTRL_FUNCTION(0x3, "key_row8"),
+			BERLIN_PINCTRL_FUNCTION(0x4, "uart7"), /* RXD */
+			BERLIN_PINCTRL_FUNCTION(0x6, "spi4")), /* SCLK */
+	BERLIN_PINCTRLCONF_GROUP("GPIO43", 0x8008, 0x3, 0x00,
+			0x8850, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* GPIO43 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "rgmii1"), /* TXCTL */
+			BERLIN_PINCTRL_FUNCTION(0x2, "rmii1"), /* TXEN */
+			BERLIN_PINCTRL_FUNCTION(0x6, "spi4")), /* SS0n */
+	BERLIN_PINCTRLCONF_GROUP("GPIO44", 0x8008, 0x3, 0x03,
+			0x8854, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* GPIO44 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "rgmii1"), /* RXCTL */
+			BERLIN_PINCTRL_FUNCTION(0x2, "rmii2"), /* TXEN */
+			BERLIN_PINCTRL_FUNCTION(0x3, "key_row9"),
+			BERLIN_PINCTRL_FUNCTION(0x4, "uart7"), /* TXD */
+			BERLIN_PINCTRL_FUNCTION(0x6, "spi4")), /* SDI */
+	BERLIN_PINCTRLCONF_GROUP("GPIO45", 0x8008, 0x3, 0x06,
+			0x8858, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* GPIO45 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "rgmii1"), /* CLKOUT */
+			BERLIN_PINCTRL_FUNCTION(0x2, "rmii1")), /* REFCLK */
+	BERLIN_PINCTRLCONF_GROUP("GPIO46", 0x8008, 0x3, 0x09,
+			0x885c, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* GPIO46 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "sdio1"), /* CDn */
+			BERLIN_PINCTRL_FUNCTION(0x2, "sdio2"), /* CDn */
+			BERLIN_PINCTRL_FUNCTION(0x3, "key_col0"),
+			BERLIN_PINCTRL_FUNCTION(0x5, "sm_uart1"), /* RTSn */
+			BERLIN_PINCTRL_FUNCTION(0x6, "key_row9"),
+			BERLIN_PINCTRL_FUNCTION(0x7, "dsi")), /* TE */
+	BERLIN_PINCTRLCONF_GROUP("GPIO47", 0x8008, 0x3, 0x0c,
+			0x8860, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* GPIO47 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "sdio1"), /* WP */
+			BERLIN_PINCTRL_FUNCTION(0x2, "sdio2"), /* WP */
+			BERLIN_PINCTRL_FUNCTION(0x3, "key_col1"),
+			BERLIN_PINCTRL_FUNCTION(0x4, "rmii2"), /* REFCLK */
+			BERLIN_PINCTRL_FUNCTION(0x5, "sm_uart1"), /* CTSn */
+			BERLIN_PINCTRL_FUNCTION(0x6, "key_row8")),
+	BERLIN_PINCTRLCONF_GROUP("GPIO48", 0x8008, 0x3, 0x0f,
+			0x8864, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* GPIO48 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "rgmii2"), /* TD0 */
+			BERLIN_PINCTRL_FUNCTION(0x5, "spi5"), /* SS0n */
+			BERLIN_PINCTRL_FUNCTION(0x6, "spi4"), /* SS2n */
+			BERLIN_PINCTRL_FUNCTION(0x7, "spi3")), /* SS3n */
+	BERLIN_PINCTRLCONF_GROUP("GPIO49", 0x8008, 0x3, 0x12,
+			0x8868, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* GPIO49 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "rgmii2"), /* TD1 */
+			BERLIN_PINCTRL_FUNCTION(0x5, "spi5"), /* SDO */
+			BERLIN_PINCTRL_FUNCTION(0x6, "spi4"), /* SS3n */
+			BERLIN_PINCTRL_FUNCTION(0x7, "spi3")), /* SS2n */
+	BERLIN_PINCTRLCONF_GROUP("GPIO50", 0x8008, 0x3, 0x15,
+			0x886c, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* GPIO50 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "rgmii2"), /* TD2 */
+			BERLIN_PINCTRL_FUNCTION(0x5, "spi5"), /* SCLK */
+			BERLIN_PINCTRL_FUNCTION(0x7, "spi3")), /* SS1n */
+	BERLIN_PINCTRLCONF_GROUP("GPIO51", 0x8008, 0x3, 0x18,
+			0x8870, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* GPIO51 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "rgmii2"), /* TD3 */
+			BERLIN_PINCTRL_FUNCTION(0x7, "spi3")), /* SS0n */
+	BERLIN_PINCTRLCONF_GROUP("GPIO52", 0x8008, 0x3, 0x1b,
+			0x8874, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* GPIO52 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "rgmii2"), /* RD0 */

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

Quoted 10 lines
drivers/pinctrl/berlin/pinctrl-sl2610.c new file +10 -0
+			BERLIN_PINCTRL_FUNCTION(0x6, "spi4"), /* SS2n */
+			BERLIN_PINCTRL_FUNCTION(0x7, "spi3")), /* SDO */
+	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,

There's typo here, should be 0x887c instead of 0x87c. Newer version will fix it.

Quoted 516 lines
drivers/pinctrl/berlin/pinctrl-sl2610.c new file +512 -0
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* GPIO54 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "rgmii2"), /* RD2 */
+			BERLIN_PINCTRL_FUNCTION(0x7, "spi3")), /* SDI */
+	BERLIN_PINCTRLCONF_GROUP("GPIO55", 0x800c, 0x3, 0x06,
+			0x8880, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* GPIO55 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "rgmii2"), /* RD3 */
+			BERLIN_PINCTRL_FUNCTION(0x5, "spi5"), /* SDI */
+			BERLIN_PINCTRL_FUNCTION(0x7, "spi4")), /* SS1n */
+	BERLIN_PINCTRLCONF_GROUP("GPIO56", 0x800c, 0x3, 0x09,
+			0x8884, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* GPIO56 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "rgmii2"), /* RXC */
+			BERLIN_PINCTRL_FUNCTION(0x7, "spi4")), /* SS0n */
+	BERLIN_PINCTRLCONF_GROUP("GPIO57", 0x800c, 0x3, 0x0c,
+			0x8888, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* GPIO57 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "rgmii2"), /* TXC */
+			BERLIN_PINCTRL_FUNCTION(0x7, "spi4")), /* SDO */
+	BERLIN_PINCTRLCONF_GROUP("GPIO58", 0x800c, 0x3, 0x0f,
+			0x888c, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* GPIO58 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "rgmii2"), /* TXCTL */
+			BERLIN_PINCTRL_FUNCTION(0x7, "spi4")), /* SCLK */
+	BERLIN_PINCTRLCONF_GROUP("GPIO59", 0x800c, 0x3, 0x12,
+			0x8890, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* GPIO59 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "rgmii2"), /* RXCTL */
+			BERLIN_PINCTRL_FUNCTION(0x7, "spi4")), /* SDI */
+	BERLIN_PINCTRLCONF_GROUP("GPIO0", 0x800c, 0x3, 0x15,
+			0x8894, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* GPIO0 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "i2s1"), /* LRCK */
+			BERLIN_PINCTRL_FUNCTION(0x7, "spi3")), /* SS0n */
+	BERLIN_PINCTRLCONF_GROUP("GPIO1", 0x800c, 0x3, 0x18,
+			0x8898, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* GPIO1 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "i2s1"), /* BCLK */
+			BERLIN_PINCTRL_FUNCTION(0x7, "spi3")), /* SCLK */
+	BERLIN_PINCTRLCONF_GROUP("GPIO2", 0x800c, 0x3, 0x1b,
+			0x889c, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* GPIO2*/
+			BERLIN_PINCTRL_FUNCTION(0x1, "i2s1"), /* DO */
+			BERLIN_PINCTRL_FUNCTION(0x4, "spdif"), /* O */
+			BERLIN_PINCTRL_FUNCTION(0x7, "spi3")), /* SDO */
+	BERLIN_PINCTRLCONF_GROUP("GPIO3", 0x8010, 0x3, 0x00,
+			0x88a0, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* GPIO3 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "i2s1"), /* MCLK */
+			BERLIN_PINCTRL_FUNCTION(0x7, "spi3")), /* SS1n */
+	BERLIN_PINCTRLCONF_GROUP("GPIO4", 0x8010, 0x3, 0x03,
+			0x88a4, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* GPIO4 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "i2s1"), /* DI */
+			BERLIN_PINCTRL_FUNCTION(0x4, "spdif"), /* I */
+			BERLIN_PINCTRL_FUNCTION(0x7, "spi3")), /* SDI */
+	BERLIN_PINCTRLCONF_GROUP("GPIO5", 0x8010, 0x3, 0x06,
+			0x88a8, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* GPIO5 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "i2s2"), /* LRCK */
+			BERLIN_PINCTRL_FUNCTION(0x2, "cam"), /* PIXCLK */
+			BERLIN_PINCTRL_FUNCTION(0x3, "key_row0"),
+			BERLIN_PINCTRL_FUNCTION(0x4, "spdif"), /* I */
+			BERLIN_PINCTRL_FUNCTION(0x6, "key_col7")),
+	BERLIN_PINCTRLCONF_GROUP("GPIO6", 0x8010, 0x3, 0x09,
+			0x88ac, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* GPIO6 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "i2s2"), /* BCLK */
+			BERLIN_PINCTRL_FUNCTION(0x2, "cam"), /* HSYNC */
+			BERLIN_PINCTRL_FUNCTION(0x3, "key_row1"),
+			BERLIN_PINCTRL_FUNCTION(0x4, "spdif"), /* O */
+			BERLIN_PINCTRL_FUNCTION(0x6, "key_col6")),
+	BERLIN_PINCTRLCONF_GROUP("GPIO7", 0x8010, 0x3, 0x0c,
+			0x88b0, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* GPIO7 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "i2s2"), /* DO */
+			BERLIN_PINCTRL_FUNCTION(0x3, "key_row2"),
+			BERLIN_PINCTRL_FUNCTION(0x4, "spdif"), /* O */
+			BERLIN_PINCTRL_FUNCTION(0x5, "sm_pdm"), /* CLKIO */
+			BERLIN_PINCTRL_FUNCTION(0x6, "key_col5")),
+	BERLIN_PINCTRLCONF_GROUP("GPIO8", 0x8010, 0x3, 0x0f,
+			0x88b4, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* GPIO8 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "i2s2"), /* DI */
+			BERLIN_PINCTRL_FUNCTION(0x2, "cam"), /* VSYNC */
+			BERLIN_PINCTRL_FUNCTION(0x3, "key_row3"),
+			BERLIN_PINCTRL_FUNCTION(0x4, "spdif"), /* I */
+			BERLIN_PINCTRL_FUNCTION(0x6, "key_col4")),
+	BERLIN_PINCTRLCONF_GROUP("GPIO9", 0x8010, 0x3, 0x12,
+			0x88b8, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* GPIO9 */
+			BERLIN_PINCTRL_FUNCTION(0x2, "cam"), /* DATA0 */
+			BERLIN_PINCTRL_FUNCTION(0x4, "pdm")), /* DI1 */
+	BERLIN_PINCTRLCONF_GROUP("GPIO10", 0x8010, 0x3, 0x15,
+			0x88bc, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* GPIO10 */
+			BERLIN_PINCTRL_FUNCTION(0x2, "cam"), /* DATA1 */
+			BERLIN_PINCTRL_FUNCTION(0x4, "pdm"), /* DI2 */
+			BERLIN_PINCTRL_FUNCTION(0x5, "dsi")), /* TE */
+	BERLIN_PINCTRLCONF_GROUP("GPIO11", 0x8010, 0x3, 0x18,
+			0x88c0, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* GPIO11 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "i2s2"), /* MCLK */
+			BERLIN_PINCTRL_FUNCTION(0x2, "cam"), /* DATA2 */
+			BERLIN_PINCTRL_FUNCTION(0x4, "sm_pdm"), /* CLKIO */
+			BERLIN_PINCTRL_FUNCTION(0x7, "dbg")), /* CLK */
+	BERLIN_PINCTRLCONF_GROUP("GPIO12", 0x8010, 0x3, 0x1b,
+			0x88c4, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* GPIO12 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "i2s3"), /* LRCK */
+			BERLIN_PINCTRL_FUNCTION(0x2, "cam"), /* DATA3 */
+			BERLIN_PINCTRL_FUNCTION(0x3, "sdio2"), /* WP */
+			BERLIN_PINCTRL_FUNCTION(0x4, "sdio1"), /* WP */
+			BERLIN_PINCTRL_FUNCTION(0x7, "dbg")), /* OUT0 */
+	BERLIN_PINCTRLCONF_GROUP("GPIO13", 0x8014, 0x3, 0x00,
+			0x88c8, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* GPIO13 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "i2s3"), /* BCLK */
+			BERLIN_PINCTRL_FUNCTION(0x2, "pdm"), /* DI1 */
+			BERLIN_PINCTRL_FUNCTION(0x3, "rgmii"), /* PTP_PPS_O */
+			BERLIN_PINCTRL_FUNCTION(0x4, "usb2"), /* VBUS */
+			BERLIN_PINCTRL_FUNCTION(0x7, "dbg")), /* OUT1 */
+	BERLIN_PINCTRLCONF_GROUP("GPIO14", 0x8014, 0x3, 0x03,
+			0x88cc, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* GPIO14 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "i2s3"), /* DO */
+			BERLIN_PINCTRL_FUNCTION(0x4, "pdm"), /* DI3 */
+			BERLIN_PINCTRL_FUNCTION(0x6, "spdif"), /* O */
+			BERLIN_PINCTRL_FUNCTION(0x7, "dbg")), /* OUT2 */
+	BERLIN_PINCTRLCONF_GROUP("GPIO15", 0x8014, 0x3, 0x06,
+			0x88d0, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* GPIO15 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "i2s3"), /* DI */
+			BERLIN_PINCTRL_FUNCTION(0x2, "cam"), /* DATA4 */
+			BERLIN_PINCTRL_FUNCTION(0x4, "sm_pdm"), /* DI0 */
+			BERLIN_PINCTRL_FUNCTION(0x6, "spdif"), /* I */
+			BERLIN_PINCTRL_FUNCTION(0x7, "dbg")), /* OUT3 */
+	BERLIN_PINCTRLCONF_GROUP("GPIO16", 0x8014, 0x3, 0x09,
+			0x88d4, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* GPIO16 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "spi2"), /* SS0n */
+			BERLIN_PINCTRL_FUNCTION(0x3, "sdio2")), /* DAT3 */
+	BERLIN_PINCTRLCONF_GROUP("GPIO17", 0x8014, 0x3, 0x0c,
+			0x88d8, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* GPIO17 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "spi2"), /* SS1n */
+			BERLIN_PINCTRL_FUNCTION(0x2, "cam"), /* DATA5 */
+			BERLIN_PINCTRL_FUNCTION(0x3, "sdio2"), /* DAT2 */
+			BERLIN_PINCTRL_FUNCTION(0x5, "dsi")), /* TE */
+	BERLIN_PINCTRLCONF_GROUP("GPIO18", 0x8014, 0x3, 0x0f,
+			0x88dc, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* GPIO18 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "spi2"), /* SS2n */
+			BERLIN_PINCTRL_FUNCTION(0x2, "cam"), /* DATA6 */
+			BERLIN_PINCTRL_FUNCTION(0x3, "sdio2"), /* DAT1 */
+			BERLIN_PINCTRL_FUNCTION(0x4, "pdm"), /* DI2 */
+			BERLIN_PINCTRL_FUNCTION(0x5, "can1")), /* RX */
+	BERLIN_PINCTRLCONF_GROUP("GPIO19", 0x8014, 0x3, 0x12,
+			0x88e0, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* GPIO19 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "spi2"), /* SS3n */
+			BERLIN_PINCTRL_FUNCTION(0x2, "cam"), /* DATA7 */
+			BERLIN_PINCTRL_FUNCTION(0x3, "sdio2"), /* DAT0 */
+			BERLIN_PINCTRL_FUNCTION(0x4, "pdm"), /* DI3 */
+			BERLIN_PINCTRL_FUNCTION(0x5, "can1")), /* TX */
+	BERLIN_PINCTRLCONF_GROUP("GPIO20", 0x8014, 0x3, 0x15,
+			0x88e4, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* GPIO20 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "spi2"), /* SDO */
+			BERLIN_PINCTRL_FUNCTION(0x3, "sdio2")), /* CMD */
+	BERLIN_PINCTRLCONF_GROUP("GPIO21", 0x8014, 0x3, 0x18,
+			0x88e8, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* GPIO21 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "spi2"), /* SCLK */
+			BERLIN_PINCTRL_FUNCTION(0x3, "sdio2"), /* CLK */
+			BERLIN_PINCTRL_FUNCTION(0x5, "clkout")),
+	BERLIN_PINCTRLCONF_GROUP("GPIO22", 0x8014, 0x3, 0x1b,
+			0x88ec, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* GPIO22 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "spi2"), /* SDI */
+			BERLIN_PINCTRL_FUNCTION(0x3, "sdio2"), /* CDn */
+			BERLIN_PINCTRL_FUNCTION(0x4, "sdio1")), /* CDn */
+};
+
+static const struct berlin_desc_group sl2610_sysmgr_pinctrl_groups[] = {
+	BERLIN_PINCTRLCONF_GROUP("SM_GPIO31", 0xb00, 0x3, 0x00,
+			0xc00, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* SM GPIO31*/
+			BERLIN_PINCTRL_FUNCTION(0x1, "pwm"), /* SM PWM0*/
+			BERLIN_PINCTRL_FUNCTION(0x2, "uart1"), /* SM UART1 RXD */
+			BERLIN_PINCTRL_FUNCTION(0x3, "key_row7"),
+			BERLIN_PINCTRL_FUNCTION(0x4, "pdm"), /* SM PDM DI0 */
+			BERLIN_PINCTRL_FUNCTION(0x5, "uart0"), /* SM UART0 RXD */
+			BERLIN_PINCTRL_FUNCTION(0x6, "can1")), /* SM CAN1 RX */
+	BERLIN_PINCTRLCONF_GROUP("SM_GPIO32", 0xb00, 0x3, 0x03,
+			0xc04, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* SM GPIO32 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "pwm"), /* SM PWM1 */
+			BERLIN_PINCTRL_FUNCTION(0x2, "uart1"), /* SM UART1 TXD */
+			BERLIN_PINCTRL_FUNCTION(0x3, "key_col0"),
+			BERLIN_PINCTRL_FUNCTION(0x4, "pdm"), /* SM PDM CLKIO */
+			BERLIN_PINCTRL_FUNCTION(0x5, "uart0"), /* SM UART0 TXD */
+			BERLIN_PINCTRL_FUNCTION(0x6, "can1")), /* SM CAN1 TX */
+	BERLIN_PINCTRLCONF_GROUP("SM_GPIO33", 0xb00, 0x3, 0x06,
+			0xc08, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* SM GPIO33 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "pwm"), /* SM PWM2 */
+			BERLIN_PINCTRL_FUNCTION(0x3, "uart2"), /* SM UART2 TXD */
+			BERLIN_PINCTRL_FUNCTION(0x4, "uart3"), /* SM UART3 RTSn */
+			BERLIN_PINCTRL_FUNCTION(0x5, "key_row5"),
+			BERLIN_PINCTRL_FUNCTION(0x6, "uart3_de")), /* SM UART3 DE */
+	BERLIN_PINCTRLCONF_GROUP("SM_GPIO34", 0xb00, 0x3, 0x09,
+			0xc0c, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* SM GPIO34 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "pwm"), /* SM PWM3 */
+			BERLIN_PINCTRL_FUNCTION(0x3, "uart2"), /* SM UART2 RXD */
+			BERLIN_PINCTRL_FUNCTION(0x4, "uart3"), /* SM UART3 CTSn */
+			BERLIN_PINCTRL_FUNCTION(0x5, "key_row4"),
+			BERLIN_PINCTRL_FUNCTION(0x6, "uart3_ren")), /* SM UART3 REn */
+	BERLIN_PINCTRLCONF_GROUP("SM_GPIO35", 0xb00, 0x3, 0x0c,
+			0xc10, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* SM GPIO35 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "pwm"), /* SM PWM4 */
+			BERLIN_PINCTRL_FUNCTION(0x2, "uart1"), /* SM UART1 RTSn */
+			BERLIN_PINCTRL_FUNCTION(0x3, "uart3"), /* SM UART3 TXD */
+			BERLIN_PINCTRL_FUNCTION(0x4, "uart2"), /* SM UART2 RTSn */
+			BERLIN_PINCTRL_FUNCTION(0x5, "key_row3"),
+			BERLIN_PINCTRL_FUNCTION(0x6, "uart0")), /* SM UART0 RTSn */
+	BERLIN_PINCTRLCONF_GROUP("SM_GPIO36", 0xb00, 0x3, 0x0f,
+			0xc14, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* SM GPIO36 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "pwm"), /* SM PWM5 */
+			BERLIN_PINCTRL_FUNCTION(0x2, "uart1"), /* SM UART1 CTSn */
+			BERLIN_PINCTRL_FUNCTION(0x3, "uart3"), /* SM UART3 RXD */
+			BERLIN_PINCTRL_FUNCTION(0x4, "uart2"), /* SM UART2 CTSn */
+			BERLIN_PINCTRL_FUNCTION(0x5, "key_row2"),
+			BERLIN_PINCTRL_FUNCTION(0x6, "uart0")), /* SM UART0 CTSn */
+	BERLIN_PINCTRLCONF_GROUP("SM_GPIO37", 0xb00, 0x3, 0x12,
+			0xc18, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* SM GPIO37 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "pwm"), /* SM PWM6 */
+			BERLIN_PINCTRL_FUNCTION(0x3, "tw0"), /* SM TW0 SCL */
+			BERLIN_PINCTRL_FUNCTION(0x4, "key_row6"),
+			BERLIN_PINCTRL_FUNCTION(0x5, "pdm")), /* SM PDM CLKIO */
+	BERLIN_PINCTRLCONF_GROUP("SM_GPIO38", 0xb00, 0x3, 0x15,
+			0xc1c, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* SM GPIO38 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "pwm"), /* SM PWM7 */
+			BERLIN_PINCTRL_FUNCTION(0x3, "tw0"), /* SM TW0 SDA */
+			BERLIN_PINCTRL_FUNCTION(0x5, "pdm")), /* SM PDM DI0 */
+	BERLIN_PINCTRLCONF_GROUP("SM_GPIO3", 0xb00, 0x3, 0x18,
+			0xc20, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* SM GPIO3 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "spi1"), /* SM SPI1 SS0n */
+			BERLIN_PINCTRL_FUNCTION(0x2, "tw1"), /* SM TW1 SCL */
+			BERLIN_PINCTRL_FUNCTION(0x3, "pwm"), /* SM PWM8 */
+			BERLIN_PINCTRL_FUNCTION(0x4, "i3c")), /* SM I3C MS SCL */
+	BERLIN_PINCTRLCONF_GROUP("SM_GPIO4", 0xb00, 0x3, 0x1b,
+			0xc24, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* SM GPIO4 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "spi1"), /* SM SPI1 SS1n */
+			BERLIN_PINCTRL_FUNCTION(0x2, "tw1"), /* SM TW1 SDA */
+			BERLIN_PINCTRL_FUNCTION(0x3, "pwm"), /* SM PWM0 */
+			BERLIN_PINCTRL_FUNCTION(0x4, "i3c")), /* SM I3C MS SDA */
+	BERLIN_PINCTRLCONF_GROUP("SM_GPIO5", 0xb04, 0x3, 0x00,
+			0xc28, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* SM GPIO5 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "spi1"), /* SM SPI1 SS2n */
+			BERLIN_PINCTRL_FUNCTION(0x3, "pwm")), /* SM PWM1 */
+	BERLIN_PINCTRLCONF_GROUP("SM_GPIO6", 0xb04, 0x3, 0x03,
+			0xc2c, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* SM GPIO6 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "spi1"), /* SM SPI1 SS3n */
+			BERLIN_PINCTRL_FUNCTION(0x2, "spi1s"), /* SM SPI1S SSn */
+			BERLIN_PINCTRL_FUNCTION(0x3, "pwm")), /* SM PWM2 */
+	BERLIN_PINCTRLCONF_GROUP("SM_GPIO9", 0xb04, 0x3, 0x06,
+			0xc30, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* SM GPIO9 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "spi1"), /* SM SPI1 SDO */
+			BERLIN_PINCTRL_FUNCTION(0x2, "spi1s"), /* SM SPI1S SDO */
+			BERLIN_PINCTRL_FUNCTION(0x3, "pwm")), /* SM PWM3 */
+	BERLIN_PINCTRLCONF_GROUP("SM_GPIO10", 0xb04, 0x3, 0x09,
+			0xc34, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* SM GPIO10 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "spi1"), /* SM SPI1 SCLK */
+			BERLIN_PINCTRL_FUNCTION(0x2, "spi1s"), /* SM SPI1S SCLK */
+			BERLIN_PINCTRL_FUNCTION(0x3, "pwm")), /* SM PWM4 */
+	BERLIN_PINCTRLCONF_GROUP("SM_GPIO11", 0xb04, 0x3, 0x0c,
+			0xc38, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* SM GPIO11 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "spi1"), /* SM SPI1 SDI */
+			BERLIN_PINCTRL_FUNCTION(0x2, "spi1s"), /* SM SPI1S SDI */
+			BERLIN_PINCTRL_FUNCTION(0x3, "pwm")), /* SM PWM5 */
+	BERLIN_PINCTRLCONF_GROUP("SM_GPIO30", 0xb04, 0x3, 0x0f,
+			0xc44, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* SM GPIO30 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "xspi"), /* SM XSPI DATA7 */
+			BERLIN_PINCTRL_FUNCTION(0x3, "key_col6"),
+			BERLIN_PINCTRL_FUNCTION(0x7, "sm_clkout")),
+	BERLIN_PINCTRLCONF_GROUP("SM_GPIO29", 0xb04, 0x3, 0x12,
+			0xc48, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* SM GPIO29 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "xspi"), /* SM XSPI DATA6 */
+			BERLIN_PINCTRL_FUNCTION(0x2, "uart3"), /* SM UART3 RXD */
+			BERLIN_PINCTRL_FUNCTION(0x3, "key_col5"),
+			BERLIN_PINCTRL_FUNCTION(0x4, "uart2"), /* SM UART2 CTSn */
+			BERLIN_PINCTRL_FUNCTION(0x5, "uart0"), /* SM UART0 CTSn */
+			BERLIN_PINCTRL_FUNCTION(0x6, "key_row2"),
+			BERLIN_PINCTRL_FUNCTION(0x7, "uart1")), /* SM UART1 CTSn */
+	BERLIN_PINCTRLCONF_GROUP("SM_GPIO28", 0xb04, 0x3, 0x15,
+			0xc4c, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* SM GPIO28 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "xspi"), /* SM XSPI DATA5 */
+			BERLIN_PINCTRL_FUNCTION(0x2, "uart3"), /* SM UART3 TXD */
+			BERLIN_PINCTRL_FUNCTION(0x3, "key_col4"),
+			BERLIN_PINCTRL_FUNCTION(0x4, "uart2"), /* SM UART2 RTSn */
+			BERLIN_PINCTRL_FUNCTION(0x5, "uart0"), /* SM UART0 RTSn */
+			BERLIN_PINCTRL_FUNCTION(0x6, "key_row3"),
+			BERLIN_PINCTRL_FUNCTION(0x7, "uart1")), /* SM UART1 RTSn */
+	BERLIN_PINCTRLCONF_GROUP("SM_GPIO27", 0xb04, 0x3, 0x18,
+			0xc50, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* SM GPIO27 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "xspi"), /* SM XSPI DATA4 */
+			BERLIN_PINCTRL_FUNCTION(0x2, "uart2"), /* SM UART2 RXD */
+			BERLIN_PINCTRL_FUNCTION(0x3, "key_col3"),
+			BERLIN_PINCTRL_FUNCTION(0x4, "uart3"), /* SM UART3 CTSn */
+			BERLIN_PINCTRL_FUNCTION(0x5, "uart3_ren"), /* SM UART3 REn */
+			BERLIN_PINCTRL_FUNCTION(0x6, "key_row4")),
+	BERLIN_PINCTRLCONF_GROUP("SM_GPIO26", 0xb04, 0x3, 0x1b,
+			0xc54, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* SM GPIO26 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "xspi"), /* SM XSPI CS1n */
+			BERLIN_PINCTRL_FUNCTION(0x2, "uart2"), /* SM UART2 TXD */
+			BERLIN_PINCTRL_FUNCTION(0x3, "key_col2"),
+			BERLIN_PINCTRL_FUNCTION(0x4, "uart3"), /* SM UART3 RTSn */
+			BERLIN_PINCTRL_FUNCTION(0x5, "uart3_de"), /* SM UART3 DE */
+			BERLIN_PINCTRL_FUNCTION(0x6, "key_row5"),
+			BERLIN_PINCTRL_FUNCTION(0x7, "sm_clkout")),
+	BERLIN_PINCTRLCONF_GROUP("SM_GPIO25", 0xb08, 0x3, 0x00,
+			0xc58, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* SM GPIO25 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "xspi"), /* SM XSPI DQS */
+			BERLIN_PINCTRL_FUNCTION(0x6, "key_row6")),
+	BERLIN_PINCTRLCONF_GROUP("SM_GPIO24", 0xb08, 0x3, 0x03,
+			0xc5c, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* SM GPIO24 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "xspi")), /* SM XSPI CLKn */
+	BERLIN_PINCTRLCONF_GROUP("SM_GPIO23", 0xb08, 0x3, 0x06,
+			0xc60, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* SM GPIO23 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "xspi")), /* SM XSPI CLK */
+	BERLIN_PINCTRLCONF_GROUP("SM_GPIO22", 0xb08, 0x3, 0x09,
+			0xc64, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* SM GPIO22 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "xspi")), /* SM XSPI DATA3 */
+	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", 0xb08, 0x3, 0x0f,
+			0xc6c, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* SM GPIO20 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "xspi")), /* SM XSPI DATA1 */
+	BERLIN_PINCTRLCONF_GROUP("SM_GPIO19", 0xb08, 0x3, 0x12,
+			0xc70, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* SM GPIO19 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "xspi")), /* SM XSPI DATA0 */
+	BERLIN_PINCTRLCONF_GROUP("SM_GPIO18", 0xb08, 0x3, 0x15,
+			0xc74, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* SM GPIO18 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "xspi")), /* SM XSPI CS0n*/
+	BERLIN_PINCTRLCONF_GROUP("SM_GPIO17", 0xb08, 0x3, 0x18,
+			0xc78, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* SM GPIO17 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "uart1"), /* SM UART1 TXD */
+			BERLIN_PINCTRL_FUNCTION(0x2, "can0"), /* SM CAN0 TX */
+			BERLIN_PINCTRL_FUNCTION(0x3, "pwm"), /* SM PWM8 */
+			BERLIN_PINCTRL_FUNCTION(0x6, "uart0")), /* SM UART0 TXD */
+	BERLIN_PINCTRLCONF_GROUP("SM_GPIO15", 0xb08, 0x3, 0x1b,
+			0xc7c, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* SM GPIO15 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "tw1"), /* SM TW1 SDA */
+			BERLIN_PINCTRL_FUNCTION(0x2, "uart0"), /* SM UART0 RTSn */
+			BERLIN_PINCTRL_FUNCTION(0x3, "pwm"), /* SM PWM11 */
+			BERLIN_PINCTRL_FUNCTION(0x4, "can0"), /* SM CAN0 TX */
+			BERLIN_PINCTRL_FUNCTION(0x6, "uart1"), /* SM UART1 RTSn */
+			BERLIN_PINCTRL_FUNCTION(0x7, "dbg")), /* DBG OUT */
+	BERLIN_PINCTRLCONF_GROUP("SM_GPIO14", 0xb0c, 0x3, 0x00,
+			0xc80, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* SM GPIO14 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "tw1"), /* SM TW1 SCL */
+			BERLIN_PINCTRL_FUNCTION(0x2, "uart0"), /* SM UART0 CTSn */
+			BERLIN_PINCTRL_FUNCTION(0x3, "pwm"), /* SM PWM10 */
+			BERLIN_PINCTRL_FUNCTION(0x4, "can0"), /* SM CAN0 RX */
+			BERLIN_PINCTRL_FUNCTION(0x6, "uart1"), /* SM UART1 CTSn */
+			BERLIN_PINCTRL_FUNCTION(0x7, "dbg")), /* DBG OUT */
+	BERLIN_PINCTRLCONF_GROUP("SM_GPIO16", 0xb0c, 0x3, 0x03,
+			0xc84, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* SM GPIO16 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "uart1"), /* SM UART1 RXD */
+			BERLIN_PINCTRL_FUNCTION(0x2, "can0"), /* SM CAN0 RX */
+			BERLIN_PINCTRL_FUNCTION(0x3, "pwm")), /* SM PWM7 */
+	BERLIN_PINCTRLCONF_GROUP("SM_GPIO13", 0xb0c, 0x3, 0x06,
+			0xc88, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* SM GPIO13 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "tw0"), /* SM TW0 SDA */
+			BERLIN_PINCTRL_FUNCTION(0x2, "i3c"), /* SM I3C MS SDA */
+			BERLIN_PINCTRL_FUNCTION(0x3, "sm_clkout"),
+			BERLIN_PINCTRL_FUNCTION(0x7, "dbg")), /* DBG out */
+	BERLIN_PINCTRLCONF_GROUP("SM_GPIO12", 0xb0c, 0x3, 0x09,
+			0xc8c, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), /* SM GPIO12 */
+			BERLIN_PINCTRL_FUNCTION(0x1, "tw0"), /* SM TW0 SCL */
+			BERLIN_PINCTRL_FUNCTION(0x2, "i3c"), /* SM I3C MS SCL */
+			BERLIN_PINCTRL_FUNCTION(0x3, "pwm"), /* SM PWM6 */
+			BERLIN_PINCTRL_FUNCTION(0x7, "dbg")), /* DBG CLK */
+	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 */
+	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 */
+	BERLIN_PINCTRLCONF_GROUP("SM_GPIO2", 0xb0c, 0x3, 0x12,
+			0xc98, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "jtag"), /* TDO */
+			BERLIN_PINCTRL_FUNCTION(0x1, "gpio"), /* SM GPIO2 */
+			BERLIN_PINCTRL_FUNCTION(0x2, "pdm"), /* SM PDM CLKIO */
+			BERLIN_PINCTRL_FUNCTION(0x3, "i2s2"), /* MCLK */
+			BERLIN_PINCTRL_FUNCTION(0x6, "pwm")), /* SM PWM11 */
+	BERLIN_PINCTRLCONF_GROUP("SM_GPIO1", 0xb0c, 0x3, 0x15,
+			0xc9c, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "jtag"), /* TDI */
+			BERLIN_PINCTRL_FUNCTION(0x1, "gpio"), /* SM GPIO1 */
+			BERLIN_PINCTRL_FUNCTION(0x2, "uart0"), /* SM UART0 RXD */
+			BERLIN_PINCTRL_FUNCTION(0x3, "key_col1"),
+			BERLIN_PINCTRL_FUNCTION(0x4, "gpio_trig"), /* TRIG0 */
+			BERLIN_PINCTRL_FUNCTION(0x5, "pwm"), /* SM PWM9 */
+			BERLIN_PINCTRL_FUNCTION(0x6, "key_row7")),
+	BERLIN_PINCTRLCONF_GROUP("SM_GPIO0", 0xb0c, 0x3, 0x18,
+			0xca0, 10,
+			BERLIN_PINCTRL_FUNCTION(0x0, "jtag"), /* TMS */
+			BERLIN_PINCTRL_FUNCTION(0x1, "gpio"), /* SM GPIO0 */
+			BERLIN_PINCTRL_FUNCTION(0x2, "uart0"), /* SM UART0 TXD */
+			BERLIN_PINCTRL_FUNCTION(0x3, "key_col0"),
+			BERLIN_PINCTRL_FUNCTION(0x5, "pdm"), /* SM PDM DI0 */
+			BERLIN_PINCTRL_FUNCTION(0x6, "pwm")), /* SM PWM10 */
+};
+
+static const struct berlin_pinctrl_desc sl2610_soc_pinctrl_data = {
+	.groups = sl2610_soc_pinctrl_groups,
+	.ngroups = ARRAY_SIZE(sl2610_soc_pinctrl_groups),
+};
+
+static const struct berlin_pinctrl_desc sl2610_sysmgr_pinctrl_data = {
+	.groups = sl2610_sysmgr_pinctrl_groups,
+	.ngroups = ARRAY_SIZE(sl2610_sysmgr_pinctrl_groups),
+};
+
+static const struct platform_device_id sl2610_pinctrl_ids[] = {
+	{ "sl2610-soc-pinctrl", (kernel_ulong_t)&sl2610_soc_pinctrl_data },
+	{ "sl2610-mcu-pinctrl", (kernel_ulong_t)&sl2610_sysmgr_pinctrl_data },
+	{ }
+};
+MODULE_DEVICE_TABLE(platform, sl2610_pinctrl_ids);
+
+static void sl2610_pinctrl_clear_node(void *data)
+{
+	device_set_node(data, NULL);
+}
+
+static int sl2610_pinctrl_probe(struct platform_device *pdev)
+{
+	struct device *dev = &pdev->dev;
+	const struct berlin_pinctrl_desc *desc =
+		(void *)platform_get_device_id(pdev)->driver_data;
+	struct regmap *regmap;
+	int ret;
+
+	regmap = syscon_node_to_regmap(dev->parent->of_node);
+	if (IS_ERR(regmap))
+		return dev_err_probe(dev, PTR_ERR(regmap), "Failed to get syscon regmap\n");
+
+	device_set_node(dev, dev_fwnode(dev->parent));
+	ret = devm_add_action_or_reset(dev, sl2610_pinctrl_clear_node, dev);
+	if (ret)
+		return ret;
+
+	return berlin_pinctrl_probe_regmap(pdev, desc, regmap);
+}
+
+static struct platform_driver sl2610_pinctrl_driver = {
+	.probe = sl2610_pinctrl_probe,
+	.id_table = sl2610_pinctrl_ids,
+	.driver = {
+		.name = "sl2610-pinctrl",
+	},
+};
+module_platform_driver(sl2610_pinctrl_driver);
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Jisheng Zhang <[email protected]>");
+MODULE_DESCRIPTION("pinctrl driver for Synaptics SL2610 SoC");
Signature · 1 line
2.55.0
#38 lore raw
In reply to Jisheng Zhang

Le 16/11/2026 à 13:06, Jisheng Zhang a écrit :

Quoted 20 lines · Jisheng Zhang
Quoted 10 lines

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 8 lines

since v1:
- rebase on latest rcN
- drop some patches which have been merged
- let the "gbl" node export pinctrl/reset/clk devices with

    MFD_CELL_NAME()

- use <linux/platform_device.h> instead of <linux/mod_devicetable.h>
- adopt some coding suggestions from Uwe
- Use 0 and 1 to select normal and strong pull-up on 10-bit pads

Quoted 5 lines

Other SoCs doesn't use this defintion for pull up or strong pull up. After consulting our HW people, the strong pull up isn't used at all, so I will remove strong pull up support in newer version. We can add back its support when it's really needed in the future, nothing breaks.

I've found a similar definition here:
https://elixir.bootlin.com/linux/v7.3.1/source/Documentation/devicetree/bindings/pinctrl/spacemit,k1-pinctrl.yaml#L73-L78
But also a plain new property here:
https://elixir.bootlin.com/linux/v7.3.1/source/Documentation/devicetree/bindings/pinctrl/starfive,jh7100-pinctrl.yaml#L153-L155
And another with the real strong pull-up value:
https://elixir.bootlin.com/linux/v7.3.1/source/Documentation/devicetree/bindings/pinctrl/thead,th1520-pinctrl.yaml#L94-L99
As you said, if it's not used, we can skip it and add a property in the future (or the real value if we have it).

But we won't be able to use 1 for strong and 0 for normal.

Regards,
Richard

Quoted 93 lines
Quoted 92 lines

- collect Acked-by tag

Jisheng Zhang (13):
arm64: kconfig: let ARCH_BERLIN cover Synaptics arm64 SoCs
pinctrl: berlin: use u16 instead of u8 for the offset
pinctrl: berlin: enable module build support
pinctrl: berlin: add optional pinconf support
dt-bindings: soc: synaptics: add SL2610 system controllers
soc: synaptics: add SL2610 system controller support
reset: add Synaptics SL2610 reset controller support
pinctrl: berlin: add Synaptics SL2610 pin controller support
clk: berlin: add Synaptics clock controller helpers
clk: berlin: add Synaptics SL2610 clocks and PLLs
dt-bindings: arm: berlin: add Synaptics SL2610 SoCs and RDK boards
arm64: dts: synaptics: add SL2610 family SoCs
arm64: dts: synaptics: add SL2610 family RDK boards

  .../bindings/arm/marvell,berlin.yaml          |  20 +
  .../soc/synaptics/syna,sl2610-soc-syscon.yaml | 178 ++++
  MAINTAINERS                                   |   8 +
  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     | 457 +++++++++++
  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                    |  34 +
  drivers/clk/berlin/Makefile                   |   4 +
  drivers/clk/berlin/clk-sl2610.c               | 360 +++++++++
  drivers/clk/berlin/sl-clk.c                   | 279 +++++++
  drivers/clk/berlin/sl-clk.h                   |  31 +
  drivers/clk/berlin/sl-sysmgr-clk.c            | 241 ++++++
  drivers/clk/berlin/sl-sysmgr-clk.h            |  44 +
  drivers/clk/berlin/sl2610-pll.c               | 145 ++++
  drivers/clk/berlin/sl2610-pll.h               |  14 +
  drivers/pinctrl/berlin/Kconfig                |  16 +
  drivers/pinctrl/berlin/Makefile               |   1 +
  drivers/pinctrl/berlin/berlin.c               | 259 +++++-
  drivers/pinctrl/berlin/berlin.h               |  17 +-
  drivers/pinctrl/berlin/pinctrl-sl2610.c       | 759 ++++++++++++++++++
  drivers/reset/Kconfig                         |  13 +
  drivers/reset/Makefile                        |   1 +
  drivers/reset/reset-sl2610.c                  | 224 ++++++
  drivers/soc/Kconfig                           |   1 +
  drivers/soc/Makefile                          |   1 +
  drivers/soc/synaptics/Kconfig                 |  14 +
  drivers/soc/synaptics/Makefile                |   2 +
  drivers/soc/synaptics/sl2610-syscon.c         |  84 ++
  include/dt-bindings/clock/syna,sl2610.h       | 131 +++
  include/dt-bindings/reset/syna,sl2610-reset.h |  80 ++
  41 files changed, 3771 insertions(+), 20 deletions(-)

create mode 100644 Documentation/devicetree/bindings/soc/synaptics/syna,sl2610-soc-syscon.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/clk-sl2610.c
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/sl2610-pll.c
create mode 100644 drivers/clk/berlin/sl2610-pll.h
create mode 100644 drivers/pinctrl/berlin/pinctrl-sl2610.c
create mode 100644 drivers/reset/reset-sl2610.c
create mode 100644 drivers/soc/synaptics/Kconfig
create mode 100644 drivers/soc/synaptics/Makefile
create mode 100644 drivers/soc/synaptics/sl2610-syscon.c
create mode 100644 include/dt-bindings/clock/syna,sl2610.h
create mode 100644 include/dt-bindings/reset/syna,sl2610-reset.h

Signature · 1 line
2.55.0
Signature · 3 lines
Richard Genoud, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#35 lore raw

Re: [PATCH v2 13/13] arm64: dts: synaptics: add SL2610 family RDK boards

In reply to Jisheng Zhang

Le 15/11/2026 à 11:23, Jisheng Zhang a écrit :

Quoted 187 lines

Add device trees for the SL2611, SL2613, SL2615, SL2617 and SL2619 reference development kits. Share their common console, memory, pin configuration and regulator descriptions and enable the populated peripherals.

---
  arch/arm64/boot/dts/synaptics/Makefile        |   5 +
  arch/arm64/boot/dts/synaptics/sl2611-rdk.dts  |  16 +++
  arch/arm64/boot/dts/synaptics/sl2613-rdk.dts  |  16 +++
  arch/arm64/boot/dts/synaptics/sl2615-rdk.dts  |  16 +++
  arch/arm64/boot/dts/synaptics/sl2617-rdk.dts  |  16 +++
  arch/arm64/boot/dts/synaptics/sl2619-rdk.dts  |  16 +++
  .../boot/dts/synaptics/sl261x-rdk-common.dtsi | 135 ++++++++++++++++++
  7 files changed, 220 insertions(+)

create mode 100644 arch/arm64/boot/dts/synaptics/sl2611-rdk.dts create mode 100644 arch/arm64/boot/dts/synaptics/sl2613-rdk.dts create mode 100644 arch/arm64/boot/dts/synaptics/sl2615-rdk.dts create mode 100644 arch/arm64/boot/dts/synaptics/sl2617-rdk.dts create mode 100644 arch/arm64/boot/dts/synaptics/sl2619-rdk.dts 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/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/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/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/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/sl261x-rdk-common.dtsi new file +36 -0
new file mode 100644
index 000000000000..78a9b28fdf99
@@ -0,0 +1,135 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (C) 2025 Synaptics Incorporated
+ *
+ * Author: Jisheng Zhang <[email protected]>
+ */
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/linux-event-codes.h>
+
+/ {
+	aliases {
+		serial0 = &sm_uart0;
+		serial1 = &sm_uart1;
+		serial2 = &sm_uart2;
+		serial3 = &sm_uart3;
+		serial4 = &soc_uart0;
+		serial5 = &soc_uart1;
+		serial6 = &soc_uart2;
+		serial7 = &soc_uart3;
+		i2c0 = &sm_i2c0;
+		i2c1 = &sm_i2c1;
+		i2c2 = &soc_i2c0;
+		i2c3 = &soc_i2c1;
+		spi1 = &sm_spi1;
+		spi2 = &soc_spi0;
+		spi3 = &soc_spi1;
+		spi4 = &soc_spi2;
+		spi5 = &soc_spi3;
+	};
+
+	cpus {
+		cpu@0 {
+			cpu0-supply = <&vcore>;
+		};
+	};

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

Quoted 10 lines
arch/arm64/boot/dts/synaptics/sl261x-rdk-common.dtsi new file +10 -0
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+		bootargs = "earlycon";
+	};
+
+	memory@0 {
+		device_type = "memory";
+		reg = <0x0 0x00000000 0x0 0x80000000>;
+	};

Some memory is dedicated to the trust zone:

    tz                      0x00100000 - 0x00600000 (secure)
    bootloader              0x00600000 - 0x00D00000
    NonSecure-NonCacheable  0x00D00000 - 0x01500000
    system                  0x01500000 - 0x7FFFFF00

(from mr_config)

Should it be added here as reserved-memory, or it's intended to be set at run time by the bootloader? I was thinking of something like:

	reserved_memory: reserved-memory {
		#address-cells = <2>;
		#size-cells = <2>;
		ranges;

		tz: tz@100000 {
			reg = <0x0 0x00100000 0x0 0x00500000>;
			no-map;
		};
	};
Quoted 89 lines
arch/arm64/boot/dts/synaptics/sl261x-rdk-common.dtsi new file +89 -0
+};
+
+&osc {
+	clock-frequency = <25000000>;
+};
+
+&pinctrl {
+	soc_i2c0_pmux: soc_i2c0-pmux {
+		groups = "GPIO23", "GPIO24";
+		function = "tw2";
+		drive-strength = <7>;
+	};
+};
+
+&sm_pinctrl {
+	sm_i2c0_pmux: i2c0-pmux {
+		groups = "SM_GPIO12", "SM_GPIO13";
+		function = "tw0";
+		drive-strength = <7>;
+	};
+
+	sm_i2c1_pmux: i2c1-pmux {
+		groups = "SM_GPIO3", "SM_GPIO4";
+		function = "tw1";
+		drive-strength = <7>;
+	};
+
+	vcore_gpio_pmux: vcore-gpio-pmux {
+		groups = "SM_GPIO5";
+		function = "gpio";
+	};
+};
+
+&sm_uart0 {
+	status = "okay";
+};
+
+&sm_i2c0 {
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&sm_i2c0_pmux>;
+	clock-frequency = <100000>;
+
+	expander0: gpio@43 {
+		compatible = "fcs,fxl6408";
+		reg = <0x43>;
+		gpio-controller;
+		#gpio-cells = <2>;
+	};
+
+	expander1: gpio@44 {
+		compatible = "fcs,fxl6408";
+		reg = <0x44>;
+		gpio-controller;
+		#gpio-cells = <2>;
+	};
+};
+
+&sm_i2c1 {
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&sm_i2c1_pmux>;
+	clock-frequency = <100000>;
+
+	vcore: regulator@60 {
+		compatible = "silergy,sy8827n";
+		reg = <0x60>;
+		regulator-name = "vcore";
+		regulator-min-microvolt = <700000>;
+		regulator-max-microvolt = <987500>;
+		regulator-always-on;
+		regulator-boot-on;
+		regulator-active-discharge = <0>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&vcore_gpio_pmux>;
+		enable-gpios = <&portc 5 GPIO_ACTIVE_LOW>;
+	};
+};
+
+&soc_i2c0 {
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&soc_i2c0_pmux>;
+	clock-frequency = <100000>;
+};
+
+&sm_uart1 {
+	status = "okay";
+};
#10 lore raw

Re: [PATCH v2 05/13] dt-bindings: soc: synaptics: add SL2610 system controllers

In reply to Jisheng Zhang
Quoted 42 lines · Jisheng Zhang

Describe the SoC, MCU, AVIO and CPU system control blocks, including their clock inputs, clock and reset providers, and pin configuration subnodes. The clock and reset providers share each register block node.

Add the clock and reset identifiers used by consumers of these blocks.

---
 .../soc/synaptics/syna,sl2610-soc-syscon.yaml | 178 ++++++++++++++++++
 MAINTAINERS                                   |   3 +
 include/dt-bindings/clock/syna,sl2610.h       | 131 +++++++++++++
 include/dt-bindings/reset/syna,sl2610-reset.h |  80 ++++++++
 4 files changed, 392 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/soc/synaptics/syna,sl2610-soc-syscon.yaml
 create mode 100644 include/dt-bindings/clock/syna,sl2610.h
 create mode 100644 include/dt-bindings/reset/syna,sl2610-reset.h
Documentation/devicetree/bindings/soc/synaptics/syna,sl2610-soc-syscon.yaml new file +19 -0
new file mode 100644
index 000000000000..cdf947cb3e0f
@@ -0,0 +1,178 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/soc/synaptics/syna,sl2610-soc-syscon.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Synaptics SL2610 system control registers
+
+maintainers:
+  - Jisheng Zhang <[email protected]>
+
+description: |
+  The SL2610 family has separate SoC, MCU, AVIO, and CPU system control
+  register blocks. The SoC and MCU blocks provide clocks, resets, and pin
+  control. The CPU block provides clocks. The AVIO block contains audio PLLs.
+
+  Clock and reset specifiers refer directly to the system control node.
+  Pin group configurations are direct children of the SoC or MCU node.
+  There are no separate clock, reset, or pin controller child nodes.

Documentation/devicetree/bindings/soc/synaptics/syna,sl2610-soc-syscon.yaml line 29

Quoted 10 lines
Documentation/devicetree/bindings/soc/synaptics/syna,sl2610-soc-syscon.yaml new file +10 -0
+
+properties:
+  compatible:
+    items:
+      - enum:
+          - syna,sl2610-soc-syscon
+          - syna,sl2610-mcu-syscon
+          - syna,sl2610-avio-syscon
+          - syna,sl2610-cpu-syscon
+      - const: syscon

Split the binding file, you combined multiple different devices.

Also, bindings should be placed in respective directories, not soc.

Best regards,
Krzysztof

#7 lore raw

Re: [PATCH v2 04/13] pinctrl: berlin: add optional pinconf support

In reply to Jisheng Zhang
Quoted 3 lines · Jisheng Zhang

Add pin configuration support for newer Synaptics SoCs.

...

drivers/pinctrl/berlin/berlin.c int berlin_pinctrl_probe(struct platform_device *pdev, · line 566

Quoted 6 lines
drivers/pinctrl/berlin/berlin.c +1 -1
@@ -339,5 +563,5 @@ int berlin_pinctrl_probe(struct platform_device *pdev,
 }
 EXPORT_SYMBOL_GPL(berlin_pinctrl_probe);
 
-MODULE_LICENSE("GPL v2");
+MODULE_LICENSE("GPL");

I don't see how this is relevant to the change described in the commit msg.

drivers/pinctrl/berlin/berlin.c int berlin_pinctrl_probe(struct platform_device *pdev, · line 567

Quoted 1 line
drivers/pinctrl/berlin/berlin.c +0 -0
 MODULE_DESCRIPTION("pinctrl library for Synaptics SoCs");

Best regards,
Krzysztof

#15 lore raw

Re: [PATCH v2 06/13] soc: synaptics: add SL2610 system controller support

In reply to Jisheng Zhang

drivers/soc/synaptics/sl2610-syscon.c line 53

Quoted 13 lines · Jisheng Zhang
drivers/soc/synaptics/sl2610-syscon.c new file +13 -0
+static const struct sl2610_syscon_data sl2610_mcu_data = {
+	.cells = sl2610_mcu_cells,
+	.num_cells = ARRAY_SIZE(sl2610_mcu_cells),
+};
+
+static const struct sl2610_syscon_data sl2610_avio_data = {
+	.cells = sl2610_avio_cells,
+	.num_cells = ARRAY_SIZE(sl2610_avio_cells),
+};
+
+static const struct sl2610_syscon_data sl2610_cpu_data = {
+	.cells = sl2610_cpu_cells,
+	.num_cells = ARRAY_SIZE(sl2610_cpu_cells),

That's just MFD driver, so should be in MFD, no? Why placing standard MFD code - nothing soc specific - in the soc directory?

drivers/soc/synaptics/sl2610-syscon.c line 62

Quoted 9 lines
drivers/soc/synaptics/sl2610-syscon.c new file +9 -0
+};
+
+static int sl2610_syscon_probe(struct platform_device *pdev)
+{
+	const struct sl2610_syscon_data *data = device_get_match_data(&pdev->dev);
+
+	return devm_mfd_add_devices(&pdev->dev, PLATFORM_DEVID_AUTO,
+				    data->cells, data->num_cells, NULL, 0, NULL);
+}

Best regards,
Krzysztof

#32 lore raw

Re: [PATCH v2 12/13] arm64: dts: synaptics: add SL2610 family SoCs

In reply to Jisheng Zhang
Quoted 45 lines · Jisheng Zhang

Describe the CPUs, interrupt controller, system controllers and supported serial, I2C, I3C, SPI and GPIO peripherals for the SL2610 family.

Use the SL2610 peripheral compatibles already documented in the upstream bindings and share clock, reset and pin configuration providers through the system controller nodes.

---
 arch/arm64/boot/dts/synaptics/sl2611.dtsi | 457 ++++++++++++++++++++++
 arch/arm64/boot/dts/synaptics/sl2613.dtsi |  12 +
 arch/arm64/boot/dts/synaptics/sl2615.dtsi |  46 +++
 arch/arm64/boot/dts/synaptics/sl2617.dtsi |  46 +++
 arch/arm64/boot/dts/synaptics/sl2619.dtsi |  44 +++
 5 files changed, 605 insertions(+)
 create mode 100644 arch/arm64/boot/dts/synaptics/sl2611.dtsi
 create mode 100644 arch/arm64/boot/dts/synaptics/sl2613.dtsi
 create mode 100644 arch/arm64/boot/dts/synaptics/sl2615.dtsi
 create mode 100644 arch/arm64/boot/dts/synaptics/sl2617.dtsi
 create mode 100644 arch/arm64/boot/dts/synaptics/sl2619.dtsi
arch/arm64/boot/dts/synaptics/sl2611.dtsi new file +18 -0
new file mode 100644
index 000000000000..663fe6034ba0
@@ -0,0 +1,457 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (C) 2024 Synaptics Incorporated
+ *
+ * Author: Jisheng Zhang <[email protected]>
+ */
+
+#include <dt-bindings/clock/syna,sl2610.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/reset/syna,sl2610-reset.h>
+
+/ {
+	compatible = "syna,sl2611";
+	interrupt-parent = <&gic>;
+	#address-cells = <2>;
+	#size-cells = <2>;
+
+	psci {

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

Quoted 10 lines
arch/arm64/boot/dts/synaptics/sl2611.dtsi new file +10 -0
+		compatible = "arm,psci-1.0";
+		method = "smc";
+	};
+
+	optee {
+		compatible = "linaro,optee-tz";
+		method = "smc";
+	};
+
+	cpus {

Messed order of nodes. Please run dt-check-style.

Quoted 8 lines
arch/arm64/boot/dts/synaptics/sl2611.dtsi new file +8 -0
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		cpu0: cpu@0 {
+			compatible = "arm,cortex-a55";
+			device_type = "cpu";
+			reg = <0x0>;
+			enable-method = "psci";

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

Quoted 10 lines
arch/arm64/boot/dts/synaptics/sl2611.dtsi new file +10 -0
+			cpu-idle-states = <&CPU_SLEEP_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 {

Labels should be lowercase rather.

Quoted 23 lines
arch/arm64/boot/dts/synaptics/sl2611.dtsi new file +23 -0
+				compatible = "cache";
+				cache-size = <65536>;
+				cache-line-size = <64>;
+				cache-sets = <256>;
+				cache-level = <2>;
+				cache-unified;
+				next-level-cache = <&L3>;
+			};
+		};
+
+		L3: l3-cache0 {
+			compatible = "cache";
+			cache-level = <3>;
+			cache-unified;
+			cache-size = <262144>;
+			cache-line-size = <64>;
+			cache-sets = <256>;
+		};
+
+		idle-states {
+			entry-method = "psci";
+			CPU_SLEEP_0: cpu-sleep-0 {
+				compatible = "arm,idle-state";

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

Quoted 10 lines
arch/arm64/boot/dts/synaptics/sl2611.dtsi new file +10 -0
+				local-timer-stop;
+				arm,psci-suspend-param = <0x0010000>;
+				entry-latency-us = <75>;
+				exit-latency-us = <155>;
+				min-residency-us = <50000>;
+			};
+		};
+	};
+
+	osc: osc {

Please use name for all fixed clocks which matches current format
recommendation: 'clock-<freq>' (see also the pattern in the binding for any other options).
https://web.git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/clock/fixed-clock.yaml

Quoted 4 lines
arch/arm64/boot/dts/synaptics/sl2611.dtsi new file +4 -0
+		compatible = "fixed-clock";
+		#clock-cells = <0>;
+	};
+

...

Quoted 6 lines
arch/arm64/boot/dts/synaptics/sl2611.dtsi new file +6 -0
+		cpuclk: cpu_wrap: syscon@f7e30000 {
+			compatible = "syna,sl2610-cpu-syscon", "syscon";
+			reg = <0xf7e30000 0x4000>;
+			#clock-cells = <1>;
+			clocks = <&osc>;
+			syna,gbl-syscon = <&chip>;

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

Quoted 10 lines
arch/arm64/boot/dts/synaptics/sl2611.dtsi new file +10 -0
+		};
+
+		gic: interrupt-controller@f7e59000 {
+			compatible = "arm,gic-400";
+			#interrupt-cells = <3>;
+			interrupt-controller;
+			reg = <0xf7e59000 0x1000>,
+			      <0xf7e5a000 0x2000>,
+			      <0xf7e5c000 0x2000>,
+			      <0xf7e5e000 0x2000>;

Please follow DTS coding style in ordering properties.

Quoted 1 line
arch/arm64/boot/dts/synaptics/sl2611.dtsi new file +1 -0
+			interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;

...

Quoted 10 lines
arch/arm64/boot/dts/synaptics/sl2611.dtsi new file +10 -0
+		soc_spi0: spi@f7f04000 {
+			compatible = "syna,sl2610-spi", "snps,dw-apb-ssi";
+			reg = <0xf7f04000 0x100>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			num-cs = <4>;
+			clocks = <&clk CLK_APBSPI0>;
+			interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
+			status = "disabled";
+		};

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

Quoted 10 lines
arch/arm64/boot/dts/synaptics/sl2611.dtsi new file +10 -0
+
+		soc_i2c0: i2c@f7f05000 {
+			compatible = "syna,sl2610-i2c", "snps,designware-i2c";
+			#address-cells = <1>;
+			#size-cells = <0>;
+			reg = <0xf7f05000 0x100>;
+			clocks = <&clk CLK_APBI2C0>;
+			i2c-sda-hold-time-ns = <449>;
+			i2c-sda-falling-time-ns = <425>;
+			i2c-scl-falling-time-ns = <205>;

If these are here, then they are implied by compatible, no?

Best regards,
Krzysztof

#36 lore raw

Re: [PATCH v2 13/13] arm64: dts: synaptics: add SL2610 family RDK boards

In reply to Jisheng Zhang
Quoted 20 lines · Jisheng Zhang
arch/arm64/boot/dts/synaptics/sl261x-rdk-common.dtsi new file +20 -0
+/ {
+	aliases {
+		serial0 = &sm_uart0;
+		serial1 = &sm_uart1;
+		serial2 = &sm_uart2;
+		serial3 = &sm_uart3;
+		serial4 = &soc_uart0;
+		serial5 = &soc_uart1;
+		serial6 = &soc_uart2;
+		serial7 = &soc_uart3;
+		i2c0 = &sm_i2c0;
+		i2c1 = &sm_i2c1;
+		i2c2 = &soc_i2c0;
+		i2c3 = &soc_i2c1;
+		spi1 = &sm_spi1;
+		spi2 = &soc_spi0;
+		spi3 = &soc_spi1;
+		spi4 = &soc_spi2;
+		spi5 = &soc_spi3;
+	};

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

Quoted 10 lines
arch/arm64/boot/dts/synaptics/sl261x-rdk-common.dtsi new file +10 -0
+
+	cpus {
+		cpu@0 {
+			cpu0-supply = <&vcore>;
+		};
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+		bootargs = "earlycon";

Drop bootargs, that's only for debugging.

Quoted 4 lines
arch/arm64/boot/dts/synaptics/sl261x-rdk-common.dtsi new file +4 -0
+	};
+
+	memory@0 {
+		device_type = "memory";

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

Quoted 10 lines
arch/arm64/boot/dts/synaptics/sl261x-rdk-common.dtsi new file +10 -0
+		reg = <0x0 0x00000000 0x0 0x80000000>;
+	};
+};
+
+&osc {
+	clock-frequency = <25000000>;
+};
+
+&pinctrl {
+	soc_i2c0_pmux: soc_i2c0-pmux {

Underscores should not be in node names. Please follow DTS coding style.

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

Quoted 5 lines
arch/arm64/boot/dts/synaptics/sl261x-rdk-common.dtsi new file +5 -0
+		groups = "GPIO23", "GPIO24";
+		function = "tw2";
+		drive-strength = <7>;
+	};
+};

Best regards,
Krzysztof

author maintainer
#16 lore raw

Re: [PATCH v2 06/13] soc: synaptics: add SL2610 system controller support

In reply to Krzysztof Kozlowski
Quoted 18 lines · Krzysztof Kozlowski

drivers/soc/synaptics/sl2610-syscon.c line 53

Quoted 13 lines · Jisheng Zhang
drivers/soc/synaptics/sl2610-syscon.c new file +13 -0
+static const struct sl2610_syscon_data sl2610_mcu_data = {
+	.cells = sl2610_mcu_cells,
+	.num_cells = ARRAY_SIZE(sl2610_mcu_cells),
+};
+
+static const struct sl2610_syscon_data sl2610_avio_data = {
+	.cells = sl2610_avio_cells,
+	.num_cells = ARRAY_SIZE(sl2610_avio_cells),
+};
+
+static const struct sl2610_syscon_data sl2610_cpu_data = {
+	.cells = sl2610_cpu_cells,
+	.num_cells = ARRAY_SIZE(sl2610_cpu_cells),

That's just MFD driver, so should be in MFD, no? Why placing standard MFD code - nothing soc specific - in the soc directory?

I'm not sure which is better. But FWICT, sophgo, samsung, microchip put mfd drivers in soc directory. So I guess the reason behind this is these drivers are soc specific?

Quoted 15 lines

drivers/soc/synaptics/sl2610-syscon.c line 62

Quoted 11 lines
drivers/soc/synaptics/sl2610-syscon.c new file +9 -0
+};
+
+static int sl2610_syscon_probe(struct platform_device *pdev)
+{
+	const struct sl2610_syscon_data *data = device_get_match_data(&pdev->dev);
+
+	return devm_mfd_add_devices(&pdev->dev, PLATFORM_DEVID_AUTO,
+				    data->cells, data->num_cells, NULL, 0, NULL);
+}

Best regards,
Krzysztof

author maintainer
#11 lore raw

Re: [PATCH v2 05/13] dt-bindings: soc: synaptics: add SL2610 system controllers

In reply to Krzysztof Kozlowski
Quoted 47 lines · Krzysztof Kozlowski
Quoted 46 lines · Jisheng Zhang

Describe the SoC, MCU, AVIO and CPU system control blocks, including their clock inputs, clock and reset providers, and pin configuration subnodes. The clock and reset providers share each register block node.

Add the clock and reset identifiers used by consumers of these blocks.

---
 .../soc/synaptics/syna,sl2610-soc-syscon.yaml | 178 ++++++++++++++++++
 MAINTAINERS                                   |   3 +
 include/dt-bindings/clock/syna,sl2610.h       | 131 +++++++++++++
 include/dt-bindings/reset/syna,sl2610-reset.h |  80 ++++++++
 4 files changed, 392 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/soc/synaptics/syna,sl2610-soc-syscon.yaml
 create mode 100644 include/dt-bindings/clock/syna,sl2610.h
 create mode 100644 include/dt-bindings/reset/syna,sl2610-reset.h
Documentation/devicetree/bindings/soc/synaptics/syna,sl2610-soc-syscon.yaml new file +23 -0
new file mode 100644
index 000000000000..cdf947cb3e0f
@@ -0,0 +1,178 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/soc/synaptics/syna,sl2610-soc-syscon.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Synaptics SL2610 system control registers
+
+maintainers:
+  - Jisheng Zhang <[email protected]>
+
+description: |
+  The SL2610 family has separate SoC, MCU, AVIO, and CPU system control
+  register blocks. The SoC and MCU blocks provide clocks, resets, and pin
+  control. The CPU block provides clocks. The AVIO block contains audio PLLs.
+
+  Clock and reset specifiers refer directly to the system control node.
+  Pin group configurations are direct children of the SoC or MCU node.
+  There are no separate clock, reset, or pin controller child nodes.
+
+properties:
+  compatible:
+    items:
Quoted 8 lines

Documentation/devicetree/bindings/soc/synaptics/syna,sl2610-soc-syscon.yaml line 29

Quoted 6 lines
Documentation/devicetree/bindings/soc/synaptics/syna,sl2610-soc-syscon.yaml new file +6 -0
+      - enum:
+          - syna,sl2610-soc-syscon
+          - syna,sl2610-mcu-syscon
+          - syna,sl2610-avio-syscon
+          - syna,sl2610-cpu-syscon
+      - const: syscon

Split the binding file, you combined multiple different devices.

sure, will do in next version

Quoted 2 lines

Also, bindings should be placed in respective directories, not soc.

I try to follow existing examples:
Documentation/devicetree/bindings/soc/ti/ti,j721e-system-controller.yaml Documentation/devicetree/bindings/soc/sophgo/sophgo,sg2044-top-syscon.yaml Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml and so on.

Especially, the 2nd and the last one also document the bindings of a mfd for clk. It seems upstream accepts both soc and mfd. TBH, I have no preference, but these are recent examples, so I follow their style. So if you still prefer putting the bindings in mfd directory, kindly comment.

Thanks

author maintainer
#39 lore raw
In reply to Richard GENOUD
Quoted 21 lines · Richard GENOUD

Le 16/11/2026 à 13:06, Jisheng Zhang a écrit :

Quoted 20 lines · Jisheng Zhang
Quoted 18 lines

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.

since v1:
- rebase on latest rcN
- drop some patches which have been merged
- let the "gbl" node export pinctrl/reset/clk devices with

    MFD_CELL_NAME()

- use <linux/platform_device.h> instead of <linux/mod_devicetable.h>
- adopt some coding suggestions from Uwe
- Use 0 and 1 to select normal and strong pull-up on 10-bit pads

Quoted 7 lines
Quoted 5 lines

Other SoCs doesn't use this defintion for pull up or strong pull up. After consulting our HW people, the strong pull up isn't used at all, so I will remove strong pull up support in newer version. We can add back its support when it's really needed in the future, nothing breaks.

I've found a similar definition here:
https://elixir.bootlin.com/linux/v7.3.1/source/Documentation/devicetree/bindings/pinctrl/spacemit,k1-pinctrl.yaml#L73-L78

This one looks strange, and changes the meaning of bias-pull-up, I.E if adding "bias-pull-up" to any pin node, then it means strong pull up because the pinctrl subsys framework adds 1 by default. To use normal pull up, this binding needs "bias-pull-up = <0>;", which looks ugly IMHO.

Quoted 2 lines

But also a plain new property here:
https://elixir.bootlin.com/linux/v7.3.1/source/Documentation/devicetree/bindings/pinctrl/starfive,jh7100-pinctrl.yaml#L153-L155

I like this. But I'm not sure whether it's accepted or not.

Quoted 2 lines

And another with the real strong pull-up value:
https://elixir.bootlin.com/linux/v7.3.1/source/Documentation/devicetree/bindings/pinctrl/thead,th1520-pinctrl.yaml#L94-L99

This is standard solution.

Quoted 2 lines

As you said, if it's not used, we can skip it and add a property in the future (or the real value if we have it).

skipping it makes sense now.

Quoted 104 lines

But we won't be able to use 1 for strong and 0 for normal.

Regards,
Richard

Quoted 93 lines
Quoted 92 lines

- collect Acked-by tag

Jisheng Zhang (13):
arm64: kconfig: let ARCH_BERLIN cover Synaptics arm64 SoCs
pinctrl: berlin: use u16 instead of u8 for the offset
pinctrl: berlin: enable module build support
pinctrl: berlin: add optional pinconf support
dt-bindings: soc: synaptics: add SL2610 system controllers
soc: synaptics: add SL2610 system controller support
reset: add Synaptics SL2610 reset controller support
pinctrl: berlin: add Synaptics SL2610 pin controller support
clk: berlin: add Synaptics clock controller helpers
clk: berlin: add Synaptics SL2610 clocks and PLLs
dt-bindings: arm: berlin: add Synaptics SL2610 SoCs and RDK boards
arm64: dts: synaptics: add SL2610 family SoCs
arm64: dts: synaptics: add SL2610 family RDK boards

  .../bindings/arm/marvell,berlin.yaml          |  20 +
  .../soc/synaptics/syna,sl2610-soc-syscon.yaml | 178 ++++
  MAINTAINERS                                   |   8 +
  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     | 457 +++++++++++
  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                    |  34 +
  drivers/clk/berlin/Makefile                   |   4 +
  drivers/clk/berlin/clk-sl2610.c               | 360 +++++++++
  drivers/clk/berlin/sl-clk.c                   | 279 +++++++
  drivers/clk/berlin/sl-clk.h                   |  31 +
  drivers/clk/berlin/sl-sysmgr-clk.c            | 241 ++++++
  drivers/clk/berlin/sl-sysmgr-clk.h            |  44 +
  drivers/clk/berlin/sl2610-pll.c               | 145 ++++
  drivers/clk/berlin/sl2610-pll.h               |  14 +
  drivers/pinctrl/berlin/Kconfig                |  16 +
  drivers/pinctrl/berlin/Makefile               |   1 +
  drivers/pinctrl/berlin/berlin.c               | 259 +++++-
  drivers/pinctrl/berlin/berlin.h               |  17 +-
  drivers/pinctrl/berlin/pinctrl-sl2610.c       | 759 ++++++++++++++++++
  drivers/reset/Kconfig                         |  13 +
  drivers/reset/Makefile                        |   1 +
  drivers/reset/reset-sl2610.c                  | 224 ++++++
  drivers/soc/Kconfig                           |   1 +
  drivers/soc/Makefile                          |   1 +
  drivers/soc/synaptics/Kconfig                 |  14 +
  drivers/soc/synaptics/Makefile                |   2 +
  drivers/soc/synaptics/sl2610-syscon.c         |  84 ++
  include/dt-bindings/clock/syna,sl2610.h       | 131 +++
  include/dt-bindings/reset/syna,sl2610-reset.h |  80 ++
  41 files changed, 3771 insertions(+), 20 deletions(-)

create mode 100644 Documentation/devicetree/bindings/soc/synaptics/syna,sl2610-soc-syscon.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/clk-sl2610.c
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/sl2610-pll.c
create mode 100644 drivers/clk/berlin/sl2610-pll.h
create mode 100644 drivers/pinctrl/berlin/pinctrl-sl2610.c
create mode 100644 drivers/reset/reset-sl2610.c
create mode 100644 drivers/soc/synaptics/Kconfig
create mode 100644 drivers/soc/synaptics/Makefile
create mode 100644 drivers/soc/synaptics/sl2610-syscon.c
create mode 100644 include/dt-bindings/clock/syna,sl2610.h
create mode 100644 include/dt-bindings/reset/syna,sl2610-reset.h

Signature · 1 line
2.55.0
Signature · 3 lines
Richard Genoud, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#17 lore raw

Re: [PATCH v2 06/13] soc: synaptics: add SL2610 system controller support

In reply to Jisheng Zhang
Quoted 20 lines · Jisheng Zhang
Quoted 18 lines · Krzysztof Kozlowski

drivers/soc/synaptics/sl2610-syscon.c line 53

Quoted 13 lines · Jisheng Zhang
drivers/soc/synaptics/sl2610-syscon.c new file +13 -0
+static const struct sl2610_syscon_data sl2610_mcu_data = {
+	.cells = sl2610_mcu_cells,
+	.num_cells = ARRAY_SIZE(sl2610_mcu_cells),
+};
+
+static const struct sl2610_syscon_data sl2610_avio_data = {
+	.cells = sl2610_avio_cells,
+	.num_cells = ARRAY_SIZE(sl2610_avio_cells),
+};
+
+static const struct sl2610_syscon_data sl2610_cpu_data = {
+	.cells = sl2610_cpu_cells,
+	.num_cells = ARRAY_SIZE(sl2610_cpu_cells),

That's just MFD driver, so should be in MFD, no? Why placing standard MFD code - nothing soc specific - in the soc directory?

Quoted 3 lines

I'm not sure which is better. But FWICT, sophgo, samsung, microchip put mfd drivers in soc directory. So I guess the reason behind this is these drivers are soc specific?

Samsung has no MFD driver in SoC. Samsung has FULL SoC driver there.

Others, dunno, but just like you they could be making random decisions. That's MFD driver. MFD drivers go to mfd.

Best regards,
Krzysztof

#12 lore raw

Re: [PATCH v2 05/13] dt-bindings: soc: synaptics: add SL2610 system controllers

In reply to Jisheng Zhang
Quoted 68 lines · Jisheng Zhang
Quoted 47 lines · Krzysztof Kozlowski
Quoted 46 lines · Jisheng Zhang

Describe the SoC, MCU, AVIO and CPU system control blocks, including their clock inputs, clock and reset providers, and pin configuration subnodes. The clock and reset providers share each register block node.

Add the clock and reset identifiers used by consumers of these blocks.

---
 .../soc/synaptics/syna,sl2610-soc-syscon.yaml | 178 ++++++++++++++++++
 MAINTAINERS                                   |   3 +
 include/dt-bindings/clock/syna,sl2610.h       | 131 +++++++++++++
 include/dt-bindings/reset/syna,sl2610-reset.h |  80 ++++++++
 4 files changed, 392 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/soc/synaptics/syna,sl2610-soc-syscon.yaml
 create mode 100644 include/dt-bindings/clock/syna,sl2610.h
 create mode 100644 include/dt-bindings/reset/syna,sl2610-reset.h
Documentation/devicetree/bindings/soc/synaptics/syna,sl2610-soc-syscon.yaml new file +23 -0
new file mode 100644
index 000000000000..cdf947cb3e0f
@@ -0,0 +1,178 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/soc/synaptics/syna,sl2610-soc-syscon.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Synaptics SL2610 system control registers
+
+maintainers:
+  - Jisheng Zhang <[email protected]>
+
+description: |
+  The SL2610 family has separate SoC, MCU, AVIO, and CPU system control
+  register blocks. The SoC and MCU blocks provide clocks, resets, and pin
+  control. The CPU block provides clocks. The AVIO block contains audio PLLs.
+
+  Clock and reset specifiers refer directly to the system control node.
+  Pin group configurations are direct children of the SoC or MCU node.
+  There are no separate clock, reset, or pin controller child nodes.
+
+properties:
+  compatible:
+    items:
Quoted 8 lines

Documentation/devicetree/bindings/soc/synaptics/syna,sl2610-soc-syscon.yaml line 29

Quoted 6 lines
Documentation/devicetree/bindings/soc/synaptics/syna,sl2610-soc-syscon.yaml new file +6 -0
+      - enum:
+          - syna,sl2610-soc-syscon
+          - syna,sl2610-mcu-syscon
+          - syna,sl2610-avio-syscon
+          - syna,sl2610-cpu-syscon
+      - const: syscon

Split the binding file, you combined multiple different devices.

sure, will do in next version

Quoted 2 lines

Also, bindings should be placed in respective directories, not soc.

I try to follow existing examples:
Documentation/devicetree/bindings/soc/ti/ti,j721e-system-controller.yaml Documentation/devicetree/bindings/soc/sophgo/sophgo,sg2044-top-syscon.yaml Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml and so on.

Quoted 4 lines

Especially, the 2nd and the last one also document the bindings of a mfd for clk. It seems upstream accepts both soc and mfd. TBH, I have no preference, but these are recent examples, so I follow their style. So if you still prefer putting the bindings in mfd directory, kindly comment.

I do not suggest mfd, because there is no such function. Tricky to say, binding is a mess, but first glance suggested devices here have specific functions.

Best regards,
Krzysztof