@@ -29,6 +29,7 @@ config SOC_KENDRYTE
select SERIAL_SIFIVE if TTY
select SERIAL_SIFIVE_CONSOLE if TTY
select SIFIVE_PLIC
+ select SOC_K210
help
This enables support for Kendryte K210 SoC platform hardware.
@@ -9,6 +9,7 @@ source "drivers/soc/bcm/Kconfig"
source "drivers/soc/fsl/Kconfig"
source "drivers/soc/imx/Kconfig"
source "drivers/soc/ixp4xx/Kconfig"
+source "drivers/soc/kendryte/Kconfig"
source "drivers/soc/mediatek/Kconfig"
source "drivers/soc/qcom/Kconfig"
source "drivers/soc/renesas/Kconfig"
@@ -22,6 +23,5 @@ source "drivers/soc/ux500/Kconfig"
source "drivers/soc/versatile/Kconfig"
source "drivers/soc/xilinx/Kconfig"
source "drivers/soc/zte/Kconfig"
-source "drivers/soc/kendryte/Kconfig"
endmenu
@@ -1,14 +1,9 @@
# SPDX-License-Identifier: GPL-2.0
-if SOC_KENDRYTE
-
-config K210_SYSCTL
- bool "Kendryte K210 system controller"
- default y
- depends on RISCV
- help
- Enables controlling the K210 various clocks and to enable
- general purpose use of the extra 2MB of SRAM normally
- reserved for the AI engine.
-
-endif
+config SOC_K210
+ bool "Kendryte K210 SoC drivers"
+ depends on RISCV && SOC_KENDRYTE && OF
+ select PM
+ select SIMPLE_PM_BUS
+ select SYSCON
+ select MFD_SYSCON
@@ -1,3 +1,3 @@
# SPDX-License-Identifier: GPL-2.0
-obj-$(CONFIG_K210_SYSCTL) += k210-sysctl.o
+obj-$(CONFIG_SOC_K210) += k210-sysctl.o
With the device tree update for the Kendryte K210 SoC, most peripherals are now defined under one of 3 advanced power buses (apb0, apb1 and apb2) compatible with the simple-pm-bus driver. The sysctl SoC device is defined as a syscon/simple-mfd device. Enable the configuration options PM, SIMPLE_PM_BUS, SYSCON and MFD_SYSCON to enable drivers for these device tree nodes. Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com> --- arch/riscv/Kconfig.socs | 1 + drivers/soc/Kconfig | 2 +- drivers/soc/kendryte/Kconfig | 19 +++++++------------ drivers/soc/kendryte/Makefile | 2 +- 4 files changed, 10 insertions(+), 14 deletions(-)