Skip to contentSkip to conversation

Introduce Synaptics SL2619 SoC and RDK board support

PATCH New Richard Genoud (Synaptics) 1 participant 9 messages Nov 23

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

v2 cover Introduce Synaptics SL2619 SoC and RDK board support

This commit adds initial support for the Synaptics SL2619 SoC, part of the Astra SL2610 product line.

The bindings and DTS have been sent on the LKML by Jisheng Zhang:
https://lore.kernel.org/lkml/[email protected]/
But not merged yet.

For this early support, we have:
- DRAM declaration
- CPU reset via PSCI
- Generic ARMv8 core timer
- UART
- system controller
- clock driver
- reset driver
- pinctrl/pinconf driver

Note: checkpatch complains "WARNING: Use the livetree API" in file arch/arm/mach-synaptics/cpu.c
But there's no livetree equivalent for fdtdec_setup_mem_size_base() and fdtdec_setup_memory_banksize()

yet settled. In this revision, it's 1 for strong pull-up and 0 for normal pull-up, like for:
https://elixir.bootlin.com/linux/v7.3.1/source/Documentation/devicetree/bindings/pinctrl/spacemit,k1-pinctrl.yaml#L73-L78
But in the next revision, this may change and use only the normal pull-up since the strong one is not used.

Note2: for the pinconf driver, the handling of the strong pull-up is not
---
Changes in v2:
- rebase onto v2027.01-rc2
- Use N: in MAINTAINERS to match all files
- make ARCH_SYNAPTICS select ARM64
- add system controller driver
- add clock driver
- add pinctrl/pinconf driver
- add reset driver
- enlarge SYS_MALLOC_F_LEN for ARCH_SYNAPTICS
- Drop clock-frequency property in sl2619-rdk-u-boot.dtsi (now unused)
- add bootph-all in sl2619-rdk-u-boot.dtsi for console dependencies
- Link to v1: https://patch.msgid.link/[email protected]

To: [email protected]
Cc: Tom Rini <[email protected]>
Cc: Rayagonda Kokatanur <[email protected]>
Cc: Ilias Apalodimas <[email protected]>
Cc: Richard Genoud <[email protected]>
Cc: Terry Zhou <[email protected]>
Cc: Casey Connolly <[email protected]>
Cc: Johan Jonker <[email protected]>
Cc: Quentin Schulz <[email protected]>
Cc: Michal Simek <[email protected]>
Cc: Linus Walleij <[email protected]>
Cc: Michael Srba <[email protected]>
Cc: Chris Packham <[email protected]>
Cc: Adam Ford <[email protected]>
Cc: Marek Vasut <[email protected]>
Cc: Lukasz Majewski <[email protected]>
Cc: Simon Glass <[email protected]>
Cc: Anshul Dalal <[email protected]>
Cc: Junhui Liu <[email protected]>
Cc: Peng Fan <[email protected]>
Cc: Alexander Sverdlin <[email protected]>
Cc: Billy Tsai <[email protected]>
Cc: David Lechner <[email protected]>
Cc: Mikhail Kshevetskiy <[email protected]>
Cc: Torsten Duwe <[email protected]>
Cc: Ryan Chen <[email protected]>
Cc: Guodong Xu <[email protected]>
Cc: Yixun Lan <[email protected]>
Cc: Jisheng Zhang <[email protected]>
Cc: Thomas Petazzoni <[email protected]>

---
Richard Genoud (Synaptics) (8):
arm: synaptics: add SL2619 SoC and RDK board support
arm: dts: sl2619: Introduce sl2619-rdk-u-boot.dtsi
Kconfig: enlarge CONFIG_SYS_MALLOC_F_LEN for ARCH_SYNAPTICS
soc: synaptics: add sl2610 system controller support
clk: synaptics: add Synaptics sl2610 family clock drivers
pinctrl: synaptics: Add sl2610 SoC family pinctrl driver
reset: synaptics: add sl2610 reset driver support
configs: sl2619: enable basic drivers and commands

 Kconfig                                          |   3 +-
 MAINTAINERS                                      |   7 +
 arch/arm/Kconfig                                 |  23 +
 arch/arm/Makefile                                |   1 +
 arch/arm/dts/sl2619-rdk-u-boot.dtsi              |   9 +
 arch/arm/mach-synaptics/Kconfig                  |  35 +
 arch/arm/mach-synaptics/Makefile                 |   5 +
 arch/arm/mach-synaptics/cpu.c                    |  45 +
 board/synaptics/sl2619/Kconfig                   |   9 +
 board/synaptics/sl2619/Makefile                  |   5 +
 board/synaptics/sl2619/sl2619.c                  |  73 ++
 configs/synaptics_sl2619_defconfig               |  63 ++
 doc/board/index.rst                              |   1 +
 doc/board/synaptics/img/sl2610_boot_sequence.svg | 178 ++++
 doc/board/synaptics/index.rst                    |   9 +
 doc/board/synaptics/sl2619.rst                   | 100 +++
 drivers/clk/Kconfig                              |   1 +
 drivers/clk/Makefile                             |   1 +
 drivers/clk/synaptics/Kconfig                    |  12 +
 drivers/clk/synaptics/Makefile                   |   1 +
 drivers/clk/synaptics/clk-sl2610.c               | 438 ++++++++++
 drivers/clk/synaptics/sl-clk.c                   | 266 ++++++
 drivers/clk/synaptics/sl-clk.h                   |  29 +
 drivers/clk/synaptics/sl-sysmgr-clk.c            |  76 ++
 drivers/clk/synaptics/sl-sysmgr-clk.h            |  44 +
 drivers/clk/synaptics/sl2610-pll.c               | 127 +++
 drivers/clk/synaptics/sl2610-pll.h               |  12 +
 drivers/pinctrl/Kconfig                          |  11 +
 drivers/pinctrl/Makefile                         |   1 +
 drivers/pinctrl/pinctrl-sl2610.c                 | 992 +++++++++++++++++++++++
 drivers/reset/Kconfig                            |   8 +
 drivers/reset/Makefile                           |   1 +
 drivers/reset/reset-sl2610.c                     | 283 +++++++
 drivers/soc/Kconfig                              |   1 +
 drivers/soc/Makefile                             |   1 +
 drivers/soc/synaptics/Kconfig                    |  11 +
 drivers/soc/synaptics/Makefile                   |   2 +
 drivers/soc/synaptics/sl2610-syscon.c            | 118 +++
 include/configs/synaptics_sl2619.h               |  14 +
 include/soc/synaptics/sl2610-syscon.h            |  23 +
 40 files changed, 3038 insertions(+), 1 deletion(-)

---
base-commit: 1f5c6df1bc042b3342473e6ebc50fe20eeebd728
change-id: 20261005-sl2619_base-26beae3f79ca

Best regards,

Signature · 1 line
Richard Genoud (Synaptics) <[email protected]>
#1 lore raw

PATCH v2 1/8 arm: synaptics: add SL2619 SoC and RDK board support

Introduce mach-synaptics to support SL2619 SoC-based boards. This adds the platform Kconfig and build infrastructure, along with initial SL2619 RDK board support and defconfig

Introduce SYNAPTICS_SL2619, along with ARCH_SYNAPTICS which selects ARM64, driver model, SYS_NS16550 and GIC-v2.

---
 Kconfig                                          |   1 +
 MAINTAINERS                                      |   6 +
 arch/arm/Kconfig                                 |  23 +++
 arch/arm/Makefile                                |   1 +
 arch/arm/mach-synaptics/Kconfig                  |  35 +++++
 arch/arm/mach-synaptics/Makefile                 |   5 +
 arch/arm/mach-synaptics/cpu.c                    |  45 ++++++
 board/synaptics/sl2619/Kconfig                   |   9 ++
 board/synaptics/sl2619/Makefile                  |   5 +
 board/synaptics/sl2619/sl2619.c                  |  73 ++++++++++
 configs/synaptics_sl2619_defconfig               |  54 +++++++
 doc/board/index.rst                              |   1 +
 doc/board/synaptics/img/sl2610_boot_sequence.svg | 178 +++++++++++++++++++++++
 doc/board/synaptics/index.rst                    |   9 ++
 doc/board/synaptics/sl2619.rst                   | 100 +++++++++++++
 include/configs/synaptics_sl2619.h               |  14 ++
 16 files changed, 559 insertions(+)
Kconfig +1 -0
index c8cfbf5d5de2..8e91a3360a83 100644
@@ -621,6 +621,7 @@ config SYS_LOAD_ADDR
 	hex "Address in memory to use by default"
 	default 0x01000000 if ARCH_SOCFPGA
 	default 0x02000000 if PPC || X86
+	default 0x0cf00000 if ARCH_SYNAPTICS
 	default 0x81000000 if MACH_SUNIV
 	default 0x22000000 if MACH_SUN9I
 	default 0x42000000 if ARCH_SUNXI
MAINTAINERS +6 -0
index 3f4f984bebdd..5f66db5d4608 100644
@@ -707,6 +707,12 @@ F:	drivers/pinctrl/sunxi/
 F:	drivers/video/sunxi/
 F:	tools/sunxi*
 
+ARM SYNAPTICS
+M:	Richard Genoud <[email protected]>
+M:	Terry Zhou <[email protected]>
+S:	Maintained
+N:	synaptics
+
 ARM TEGRA
 M:	Thierry Reding <[email protected]>
 M:	Svyatoslav Ryhel <[email protected]>
arch/arm/Kconfig +23 -0
index 93a0c663043f..148287c82f7f 100644
@@ -1292,6 +1292,27 @@ config ARCH_SUNXI
 	imply USB_GADGET
 	imply WDT
 
+config ARCH_SYNAPTICS
+	bool "Support Synaptics SoCs"
+	select ARM64
+	select CLK
+	select DM
+	select DM_RESET
+	select DM_SERIAL
+	select GICV2
+	select OF_CONTROL
+	select PSCI_RESET
+	select PINCTRL
+	select SYNAPTICS_SL2619
+	select SYSRESET
+	select SYSRESET_PSCI
+	select SYSCON
+	select SYS_NS16550
+	imply OF_UPSTREAM
+	help
+	  Support for Synaptics SoCs such as the Astra SL2610 product
+	  line.
+
 config ARCH_U8500
 	bool "ST-Ericsson U8500 Series"
 	select CPU_V7A
@@ -2441,6 +2462,8 @@ source "arch/arm/mach-stm32mp/Kconfig"
 
 source "arch/arm/mach-sunxi/Kconfig"
 
+source "arch/arm/mach-synaptics/Kconfig"
+
 source "arch/arm/mach-tegra/Kconfig"
 
 source "arch/arm/mach-u8500/Kconfig"
arch/arm/Makefile +1 -0
index de975fc93686..ba7d3d7cee18 100644
@@ -87,6 +87,7 @@ machine-$(CONFIG_ARCH_SOCFPGA)		+= socfpga
 machine-$(CONFIG_ARCH_STM32)		+= stm32
 machine-$(CONFIG_ARCH_STM32MP)		+= stm32mp
 machine-$(CONFIG_ARCH_SUNXI)		+= sunxi
+machine-$(CONFIG_ARCH_SYNAPTICS)	+= synaptics
 machine-$(CONFIG_ARCH_TEGRA)		+= tegra
 machine-$(CONFIG_ARCH_U8500)		+= u8500
 machine-$(CONFIG_ARCH_OCTEONTX)		+= octeontx
arch/arm/mach-synaptics/Kconfig new file +35 -0
new file mode 100644
index 000000000000..b485f438afff
@@ -0,0 +1,35 @@
+if ARCH_SYNAPTICS
+
+config SYS_SOC
+	default "synaptics"
+
+config SYS_VENDOR
+	default "synaptics"
+
+config SYNAPTICS_SL2619
+	bool "Synaptics SL2619 SoC"
+	help
+	  The Synaptics SL2619 is a ARM64-based SoC with a dual-core Cortex-A55.
+	  including UART, SPI, USB2.0 and OTG, EMMC, etc.
+
+config SYNAPTICS_REGMEM_MAP_BASE
+	hex
+	default 0xe0000000 if SYNAPTICS_SL2619
+
+config SYNAPTICS_REGMEM_MAP_SIZE
+	hex
+	default 0x20000000 if SYNAPTICS_SL2619
+
+if SYNAPTICS_SL2619
+
+config TARGET_SL2619
+	bool "Support Synaptics SL2619 RDK board"
+	help
+	  Support for the Synaptics Astra Machina SL2619 RDK board based on the
+	  Synaptics SL2619 SoC.
+
+source "board/synaptics/sl2619/Kconfig"
+
+endif
+
+endif
arch/arm/mach-synaptics/Makefile new file +5 -0
new file mode 100644
index 000000000000..5fc4b23719f7
@@ -0,0 +1,5 @@
+# SPDX-License-Identifier: GPL-2.0+
+#
+# Copyright 2026 Synaptics Incorporated
+
+obj-y += cpu.o
arch/arm/mach-synaptics/cpu.c new file +45 -0

45 lines not on this page · raw message

board/synaptics/sl2619/Kconfig new file +9 -0
new file mode 100644
index 000000000000..cab256a7750d
@@ -0,0 +1,9 @@
+if TARGET_SL2619
+
+config SYS_BOARD
+	default "sl2619"
+
+config SYS_CONFIG_NAME
+	default "synaptics_sl2619"
+
+endif
board/synaptics/sl2619/Makefile new file +5 -0
new file mode 100644
index 000000000000..c658f81d1c1b
@@ -0,0 +1,5 @@
+# SPDX-License-Identifier: GPL-2.0+
+#
+# Copyright (c) 2026 Synaptics Incorporated
+
+obj-y := sl2619.o
board/synaptics/sl2619/sl2619.c new file +73 -0

73 lines not on this page · raw message

configs/synaptics_sl2619_defconfig new file +54 -0

54 lines not on this page · raw message

doc/board/index.rst +1 -0
index cc1d181a8e1d..7a66379a5b0a 100644
@@ -66,6 +66,7 @@ Board-specific doc
    st/index
    starfive/index
    ste/index
+   synaptics/index
    tbs/index
    thead/index
    theobroma-systems/index
doc/board/synaptics/img/sl2610_boot_sequence.svg new file +178 -0

178 lines not on this page · raw message

doc/board/synaptics/index.rst new file +9 -0
new file mode 100644
index 000000000000..03624fa904e1
@@ -0,0 +1,9 @@
+.. SPDX-License-Identifier: GPL-2.0+
+
+Synaptics
+=========
+
+.. toctree::
+   :maxdepth: 2
+
+   sl2619
doc/board/synaptics/sl2619.rst new file +100 -0

100 lines not on this page · raw message

include/configs/synaptics_sl2619.h new file +14 -0
new file mode 100644
index 000000000000..b1729f814045
@@ -0,0 +1,14 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Configuration settings for the Synaptics sl2619 RDK board.
+ *
+ * Copyright 2026 Synaptics Incorporated
+ */
+
+#ifndef __SYNAPTICS_SL2619_H
+#define __SYNAPTICS_SL2619_H
+
+#define GICD_BASE 0xf7e59000
+#define GICC_BASE 0xf7e5a000
+
+#endif /* __SYNAPTICS_SL2619_H */
Signature · 1 line
2.55.0
#2 lore raw

PATCH v2 2/8 arm: dts: sl2619: Introduce sl2619-rdk-u-boot.dtsi

In reply to Richard Genoud (Synaptics)

Setup console before relocation

In order to setup the console before relocation, bootph-all is needed on sm_uart0 and on its clock provider sm_clk

---
 MAINTAINERS                         | 1 +
 arch/arm/dts/sl2619-rdk-u-boot.dtsi | 9 +++++++++
 2 files changed, 10 insertions(+)
MAINTAINERS +1 -0
index 5f66db5d4608..279193e8239e 100644
@@ -712,6 +712,7 @@ M:	Richard Genoud <[email protected]>
 M:	Terry Zhou <[email protected]>
 S:	Maintained
 N:	synaptics
+N:	sl261[x0-9]
 
 ARM TEGRA
 M:	Thierry Reding <[email protected]>
arch/arm/dts/sl2619-rdk-u-boot.dtsi new file +9 -0
new file mode 100644
index 000000000000..72e2adebde3e
@@ -0,0 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+&sm_uart0 {
+	bootph-all;
+};
+
+&sm_clk {
+	bootph-all;
+};
Signature · 1 line
2.55.0
#3 lore raw

PATCH v2 3/8 Kconfig: enlarge CONFIG_SYS_MALLOC_F_LEN for ARCH_SYNAPTICS

In reply to Richard Genoud (Synaptics)

There's not enough memory available at early stage because the console needs the clock driver which needs the system controller driver

0x3400 bytes is a bare minimum, so bump it at 0x4000

---
 Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Kconfig +1 -1
index 8e91a3360a83..51e3052579f6 100644
@@ -303,7 +303,7 @@ config SYS_MALLOC_F_LEN
 	default 0x1000 if ARCH_MESON || ARCH_BMIPS || ARCH_MTMIPS || X86
 	default 0x1800 if ARCH_TEGRA
 	default 0x4000 if SANDBOX || RISCV || ARCH_APPLE || ROCKCHIP_RK3368 || \
-			  ROCKCHIP_RK3399
+			  ROCKCHIP_RK3399 || ARCH_SYNAPTICS
 	default 0x8000 if RCAR_GEN3
 	default 0x10000 if ARCH_IMX8 || ARCH_IMX8M
 	default 0x2000
Signature · 1 line
2.55.0
#4 lore raw

PATCH v2 4/8 soc: synaptics: add sl2610 system controller support

In reply to Richard Genoud (Synaptics)

Introduce Synaptics sl2610 family system controller driver.

The code is based on Linux driver by Jisheng Zhang:
https://lore.kernel.org/lkml/[email protected]/

Creates and binds the clock, reset and pin controller platform devices implemented by each SL2610 system control block.
The platform device driver gets the block id (muc, soc, avio or cpu) as argument to select the appropriate private data.

---
 drivers/soc/Kconfig                   |   1 +
 drivers/soc/Makefile                  |   1 +
 drivers/soc/synaptics/Kconfig         |  11 ++++
 drivers/soc/synaptics/Makefile        |   2 +
 drivers/soc/synaptics/sl2610-syscon.c | 118 ++++++++++++++++++++++++++++++++++
 include/soc/synaptics/sl2610-syscon.h |  23 +++++++
 6 files changed, 156 insertions(+)
drivers/soc/Kconfig +1 -0
index 8ef408d9ba1b..0d5990cdc381 100644
@@ -50,6 +50,7 @@ config SOC_XILINX_VERSAL_NET
 
 source "drivers/soc/qcom/Kconfig"
 source "drivers/soc/samsung/Kconfig"
+source "drivers/soc/synaptics/Kconfig"
 source "drivers/soc/ti/Kconfig"
 
 endmenu
drivers/soc/Makefile +1 -0
index 00e6a5ac8e2b..de28c93160d5 100644
@@ -5,6 +5,7 @@
 obj-$(CONFIG_SOC_AMD_VERSAL2) += soc_amd_versal2.o
 obj-$(CONFIG_SOC_QCOM) += qcom/
 obj-$(CONFIG_SOC_SAMSUNG) += samsung/
+obj-$(CONFIG_SYNAPTICS_SL2619) += synaptics/
 obj-$(CONFIG_SOC_TI) += ti/
 obj-$(CONFIG_SOC_DEVICE) += soc-uclass.o
 obj-$(CONFIG_SOC_DEVICE_TI_K3) += soc_ti_k3.o
drivers/soc/synaptics/Kconfig new file +11 -0
new file mode 100644
index 000000000000..ae1c1e519cb5
@@ -0,0 +1,11 @@
+# SPDX-License-Identifier: GPL-2.0-only
+
+config SOC_SL2610_SYSCON
+	bool "Synaptics SL2610 system controller"
+	depends on ARCH_SYNAPTICS && OF_CONTROL && SYSCON
+	help
+	  Support the global and control register blocks on Synaptics SL2610
+	  SoCs. This binds 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 +118 -0

118 lines not on this page · raw message

include/soc/synaptics/sl2610-syscon.h new file +23 -0
new file mode 100644
index 000000000000..e192b9043370
@@ -0,0 +1,23 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * Copyright (C) 2026 Synaptics Incorporated
+ */
+
+#ifndef __SOC_SYNAPTICS_SL2610_SYSCON_H__
+#define __SOC_SYNAPTICS_SL2610_SYSCON_H__
+
+/*
+ * The SL2610 SoC has several system controller register blocks. Each block
+ * bundles a set of sub-devices (clock, reset, pin controller). The block
+ * identity is passed as driver data when the system controller binds its
+ * sub-devices, and lets each sub-device driver select the register layout it
+ * has to use.
+ */
+enum sl2610_syscon_block {
+	SL2610_SYSCON_BLOCK_SOC,
+	SL2610_SYSCON_BLOCK_MCU,
+	SL2610_SYSCON_BLOCK_AVIO,
+	SL2610_SYSCON_BLOCK_CPU,
+};
+
+#endif /* __SOC_SYNAPTICS_SL2610_SYSCON_H__ */
Signature · 1 line
2.55.0
#5 lore raw

PATCH v2 5/8 clk: synaptics: add Synaptics sl2610 family clock drivers

In reply to Richard Genoud (Synaptics)

Introduce Synaptics sl2619 clock driver.

The code is based on Linux driver by Jisheng Zhang:
https://lore.kernel.org/lkml/[email protected]/
It has been kept as close as possible to the original Linux code, thanks to U-Boot CCF.

The main difference is for sl2610_soc_clks_probe, where we force_probe sl2610_aio_clk and sl2610_system_clk, to resolve dependencies.

NB: this driver has no compatible string because it is bound by the system controller driver

---
 drivers/clk/Kconfig                   |   1 +
 drivers/clk/Makefile                  |   1 +
 drivers/clk/synaptics/Kconfig         |  12 +
 drivers/clk/synaptics/Makefile        |   1 +
 drivers/clk/synaptics/clk-sl2610.c    | 438 ++++++++++++++++++++++++++++++++++
 drivers/clk/synaptics/sl-clk.c        | 266 +++++++++++++++++++++
 drivers/clk/synaptics/sl-clk.h        |  29 +++
 drivers/clk/synaptics/sl-sysmgr-clk.c |  76 ++++++
 drivers/clk/synaptics/sl-sysmgr-clk.h |  44 ++++
 drivers/clk/synaptics/sl2610-pll.c    | 127 ++++++++++
 drivers/clk/synaptics/sl2610-pll.h    |  12 +
 11 files changed, 1007 insertions(+)
drivers/clk/Kconfig +1 -0
index 3f39b36949a6..d977727ab2a8 100644
@@ -297,6 +297,7 @@ source "drivers/clk/spacemit/Kconfig"
 source "drivers/clk/starfive/Kconfig"
 source "drivers/clk/stm32/Kconfig"
 source "drivers/clk/sunxi/Kconfig"
+source "drivers/clk/synaptics/Kconfig"
 source "drivers/clk/tegra/Kconfig"
 source "drivers/clk/ti/Kconfig"
 source "drivers/clk/thead/Kconfig"
drivers/clk/Makefile +1 -0
index 4b241a9240ac..d860e64fff53 100644
@@ -48,6 +48,7 @@ obj-$(CONFIG_CLK_RENESAS) += renesas/
 obj-$(CONFIG_$(PHASE_)CLK_RS9_PCIE) += clk-renesas-pcie.o
 obj-$(CONFIG_$(PHASE_)CLK_SCMI) += clk_scmi.o
 obj-$(CONFIG_CLK_SIFIVE) += sifive/
+obj-$(CONFIG_CLK_SL2610) += synaptics/
 obj-$(CONFIG_CLK_SOPHGO) += sophgo/
 obj-$(CONFIG_CLK_SPACEMIT) += spacemit/
 obj-$(CONFIG_CLK_SUNXI) += sunxi/
drivers/clk/synaptics/Kconfig new file +12 -0
new file mode 100644
index 000000000000..295a126ccea5
@@ -0,0 +1,12 @@
+config CLK_SL2610
+	bool "Synaptics SL2610 clock driver"
+	depends on CLK && ARCH_SYNAPTICS
+	select SOC_SL2610_SYSCON
+	select CLK_CCF
+	select CLK_AUTO_ID
+	help
+	  This enables support for clock driver for SL2610 Synaptics SoCs.
+	  The driver handles clocks from soc, cpu, aio and system manager
+	  domains.
+	  The clock controller generates and supplies clocks to various
+	  peripherals within the SoC.
drivers/clk/synaptics/Makefile new file +1 -0
new file mode 100644
index 000000000000..e2c922166a90
@@ -0,0 +1 @@
+obj-y += clk-sl2610.o sl2610-pll.o sl-clk.o sl-sysmgr-clk.o
drivers/clk/synaptics/clk-sl2610.c new file +438 -0

438 lines not on this page · raw message

drivers/clk/synaptics/sl-clk.c new file +266 -0

266 lines not on this page · raw message

drivers/clk/synaptics/sl-clk.h new file +29 -0
new file mode 100644
index 000000000000..f2cf99332c83
@@ -0,0 +1,29 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef __SL_CLK_H
+#define __SL_CLK_H
+
+#include <linux/compiler_types.h>
+
+struct clk;
+struct udevice;
+
+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 *sl_clk_register(struct udevice *dev, void __iomem *reg,
+			    const char *name, const char * const *parent_names,
+			    unsigned int num_parents, unsigned long flags);
+
+#endif /* __SL_CLK_H */
drivers/clk/synaptics/sl-sysmgr-clk.c new file +76 -0

76 lines not on this page · raw message

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

44 lines not on this page · raw message

drivers/clk/synaptics/sl2610-pll.c new file +127 -0

127 lines not on this page · raw message

drivers/clk/synaptics/sl2610-pll.h new file +12 -0
new file mode 100644
index 000000000000..7ee1764b3b9f
@@ -0,0 +1,12 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef __SL2610_PLL_H
+#define __SL2610_PLL_H
+
+#include <linux/io.h>
+
+struct udevice;
+
+int sl2610_pll_register(struct udevice *dev, void __iomem *ctrl,
+			const char *out, const char *outf);
+
+#endif /* __SL2610_PLL_H */
Signature · 1 line
2.55.0
#6 lore raw

PATCH v2 6/8 pinctrl: synaptics: Add sl2610 SoC family pinctrl driver

In reply to Richard Genoud (Synaptics)

Add support for Synaptics SL2610 SoCs family pin controller.

It uses Generic Pinctrl framework and is compatible with the Linux driver (same device tree).
Pin muxing and pin configuration are supported.

It supports:
- bias-disable
- bias-pull-up
- bias-pull-down
- drive-strength
- input-enable/disable
- input-schmitt-enable/disable
- slew-rate

NB: for the pull up, a true/1 means strong pull-up and 0 means normal pull-up

NB2: this driver has no compatible string because it is bound by the system controller driver

---
 drivers/pinctrl/Kconfig          |  11 +
 drivers/pinctrl/Makefile         |   1 +
 drivers/pinctrl/pinctrl-sl2610.c | 992 +++++++++++++++++++++++++++++++++++++++
 3 files changed, 1004 insertions(+)
drivers/pinctrl/Kconfig +11 -0
index 04785a927fec..6781e34b44f6 100644
@@ -319,6 +319,17 @@ config PINCTRL_SINGLE
 	  Depending on the platform make sure to also enable OF_TRANSLATE and
 	  eventually SPL_OF_TRANSLATE to get correct address translations.
 
+config PINCTRL_SL2610
+	bool "Synaptics SL2610 family pin-control and pin-mux driver"
+	depends on DM && PINCTRL_GENERIC && ARCH_SYNAPTICS
+	select SOC_SL2610_SYSCON
+	select PINCONF
+	default y
+	help
+	  Support pin multiplexing control on Synaptics SL2610 family SoCs.
+	  The driver uses Generic Pinctrl framework and is compatible with the
+	  Linux driver, i.e. it uses the same device tree configuration.
+
 config PINCTRL_STI
 	bool "STMicroelectronics STi pin-control and pin-mux driver"
 	depends on DM && ARCH_STI
drivers/pinctrl/Makefile +1 -0
index 23219626e392..0bbf0080c8bf 100644
@@ -33,6 +33,7 @@ obj-$(CONFIG_$(PHASE_)PINCTRL_ROCKCHIP)	+= rockchip/
 obj-$(CONFIG_PINCTRL_SANDBOX)		+= pinctrl-sandbox.o
 obj-$(CONFIG_PINCTRL_SCMI)		+= pinctrl-scmi.o
 obj-$(CONFIG_PINCTRL_SINGLE)		+= pinctrl-single.o
+obj-$(CONFIG_PINCTRL_SL2610)		+= pinctrl-sl2610.o
 obj-$(CONFIG_$(PHASE_)PINCTRL_SPACEMIT_K1) += spacemit/
 obj-$(CONFIG_PINCTRL_STARFIVE)		+= starfive/
 obj-$(CONFIG_PINCTRL_STI)		+= pinctrl-sti.o
drivers/pinctrl/pinctrl-sl2610.c new file +992 -0

992 lines not on this page · raw message

Signature · 1 line
2.55.0
#7 lore raw

PATCH v2 7/8 reset: synaptics: add sl2610 reset driver support

In reply to Richard Genoud (Synaptics)

Introduce Synaptics sl2610 family reset driver.

The code is based on Linux driver by Jisheng Zhang:
https://lore.kernel.org/lkml/[email protected]/

There's two kind of reset bits here:
- the so-called sticky bits that can be asserted and de-asserted, and are active low.
- the non-sticky bits (aka pulse bits) that generate a 640ns pulse and are active high.

rst_assert(), rst_deassert() and rst_reset() are implemented for sticky bits.
But for pulse bits, rst_assert()/rst_deassert() don't fit, because we can't keep them asserted, nor de-assert them.

So, only rst_assert() is implemented for pulse bits, and delay is ignored.

NB: this driver has no compatible string because it is bound by the system controller driver

---
 drivers/reset/Kconfig        |   8 ++
 drivers/reset/Makefile       |   1 +
 drivers/reset/reset-sl2610.c | 283 +++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 292 insertions(+)
drivers/reset/Kconfig +8 -0
index ad61ebf344a6..921453ca07a8 100644
@@ -248,6 +248,14 @@ config RESET_SCMI
 	  devices exposed by a SCMI agent based on SCMI reset domain
 	  protocol communication with a SCMI server.
 
+config RESET_SL2610
+	bool "Synaptics SL2610 Reset Driver"
+	depends on DM_RESET && ARCH_SYNAPTICS
+	select SOC_SL2610_SYSCON
+	help
+	  This enables the reset controller driver that can be found in
+	  Synaptics SL2610 product family.
+
 config RESET_ZYNQMP
 	bool "Reset Driver for Xilinx ZynqMP & Versal SoC's"
 	depends on DM_RESET && ZYNQMP_FIRMWARE
drivers/reset/Makefile +1 -0
index 959aafe4d709..06aa541587df 100644
@@ -29,6 +29,7 @@ obj-$(CONFIG_RESET_SUNXI) += reset-sunxi.o
 obj-$(CONFIG_RESET_HISILICON) += reset-hisilicon.o
 obj-$(CONFIG_RESET_IMX7) += reset-imx7.o
 obj-$(CONFIG_RESET_SIFIVE) += reset-sifive.o
+obj-$(CONFIG_RESET_SL2610) += reset-sl2610.o
 obj-$(CONFIG_RESET_SYSCON) += reset-syscon.o
 obj-$(CONFIG_RESET_RASPBERRYPI) += reset-raspberrypi.o
 obj-$(CONFIG_RESET_SCMI) += reset-scmi.o
drivers/reset/reset-sl2610.c new file +283 -0

283 lines not on this page · raw message

Signature · 1 line
2.55.0
#8 lore raw

PATCH v2 8/8 configs: sl2619: enable basic drivers and commands

In reply to Richard Genoud (Synaptics)

Enable working drivers for Synaptics sl2619 RDK board:
- system controller
- clock controller
- reset controller
- pin controller
- i2c controller

And commands:
- dm
- clk
- i2c

---
 configs/synaptics_sl2619_defconfig | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
configs/synaptics_sl2619_defconfig +10 -1
index 63bb1de97c89..97fdd9b41de3 100644
@@ -28,6 +28,9 @@ CONFIG_HUSH_PARSER=y
 # CONFIG_CMD_EXPORTENV is not set
 CONFIG_CMD_NVEDIT_INFO=y
 # CONFIG_CMD_LZMADEC is not set
+CONFIG_CMD_CLK=y
+CONFIG_CMD_DM=y
+CONFIG_CMD_I2C=y
 # CONFIG_CMD_LOADS is not set
 # CONFIG_CMD_ITEST is not set
 # CONFIG_CMD_SOURCE is not set
@@ -41,13 +44,19 @@ CONFIG_VERSION_VARIABLE=y
 # CONFIG_NET is not set
 CONFIG_SYSCON=y
 CONFIG_BOUNCE_BUFFER=y
+CONFIG_CLK=y
+CONFIG_CLK_SL2610=y
 # CONFIG_GPIO is not set
-# CONFIG_I2C is not set
+CONFIG_DM_I2C=y
+CONFIG_SYS_I2C_DW=y
 CONFIG_MISC=y
 # CONFIG_MMC is not set
+CONFIG_PINCTRL=y
+CONFIG_RESET_SL2610=y
 CONFIG_SPECIFY_CONSOLE_INDEX=y
 CONFIG_DM_SERIAL=y
 CONFIG_SERIAL_RX_BUFFER=y
+CONFIG_SOC_SL2610_SYSCON=y
 CONFIG_SYSRESET=y
 CONFIG_SYSRESET_PSCI=y
 # CONFIG_TOOLS_LIBCRYPTO is not set
Signature · 1 line
2.55.0