Unverified Commit c48c4a4c authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Palmer Dabbelt
Browse files

riscv: Add Kendryte K210 SoC support



Add support for the Kendryte K210 RISC-V SoC. For now, this support
only provides a simple sysctl driver allowing to setup the CPU and
uart clock. This support is enabled through the new Kconfig option
SOC_KENDRYTE and defines the config option CONFIG_K210_SYSCTL
to enable the K210 SoC sysctl driver compilation.

The sysctl driver also registers an early SoC initialization function
allowing enabling the general purpose use of the 2MB of SRAM normally
reserved for the SoC AI engine. This initialization function is
automatically called before the dt early initialization using the flat
dt root node compatible property matching the value "kendryte,k210".

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarDamien Le Moal <damien.lemoal@wdc.com>
[Palmer: Add missing endmenu in Kconfig.socs]
Signed-off-by: default avatarPalmer Dabbelt <palmerdabbelt@google.com>
parent 335b1390
Loading
Loading
Loading
Loading
+30 −0
Original line number Diff line number Diff line
@@ -10,4 +10,34 @@ config SOC_SIFIVE
	help
	  This enables support for SiFive SoC platform hardware.

config SOC_VIRT
       bool "QEMU Virt Machine"
       select VIRTIO_PCI
       select VIRTIO_BALLOON
       select VIRTIO_MMIO
       select VIRTIO_CONSOLE
       select VIRTIO_NET
       select NET_9P_VIRTIO
       select VIRTIO_BLK
       select SCSI_VIRTIO
       select DRM_VIRTIO_GPU
       select HW_RANDOM_VIRTIO
       select RPMSG_CHAR
       select RPMSG_VIRTIO
       select CRYPTO_DEV_VIRTIO
       select VIRTIO_INPUT
       select POWER_RESET_SYSCON
       select POWER_RESET_SYSCON_POWEROFF
       select GOLDFISH
       select RTC_DRV_GOLDFISH
       select SIFIVE_PLIC
       help
         This enables support for QEMU Virt Machine.

config SOC_KENDRYTE
	bool "Kendryte K210 SoC"
	depends on !MMU
	help
	  This enables support for Kendryte K210 SoC platform hardware.

endmenu
+1 −0
Original line number Diff line number Diff line
@@ -22,5 +22,6 @@ 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 −0
Original line number Diff line number Diff line
@@ -28,3 +28,4 @@ obj-$(CONFIG_ARCH_U8500) += ux500/
obj-$(CONFIG_PLAT_VERSATILE)	+= versatile/
obj-y				+= xilinx/
obj-$(CONFIG_ARCH_ZX)		+= zte/
obj-$(CONFIG_SOC_KENDRYTE)	+= kendryte/
+14 −0
Original line number Diff line number Diff line
# 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
+3 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0

obj-$(CONFIG_K210_SYSCTL)	+= k210-sysctl.o
Loading