riscv: K210: Add a built-in device tree
authorPalmer Dabbelt <palmerdabbelt@google.com>
Tue, 14 Apr 2020 04:43:25 +0000 (13:43 +0900)
committerPalmer Dabbelt <palmerdabbelt@google.com>
Mon, 18 May 2020 18:38:06 +0000 (11:38 -0700)
commit8bb6617427761c04b9670f8554fa63a1ef2d2807
treeb49fe2219d89e041a613f521adb0a6386ef346b7
parent2d2682512f0faf4d09a696184bf3c0bb6838baca
riscv: K210: Add a built-in device tree

The K210's bootloader does not provide a device tree. Give the ability
to providea builtin one with the SOC_KENDRYTE_K210_BUILTIN_DTB option.
If selected, this option result in the definition of a builtin DTB
entry in the k210 sysctl driver.

If defined, the builtin DTB entry points to the default k210.dts device
tree file and is keyed with the vendor ID 0x4B5, the arch ID
0xE59889E6A5A04149 ("Canaan AI" in UTF-8 coded Chinese) and the impl ID
0x4D41495832303030 ("MAIX200"). These values are reported by the SiPEED
MAIXDUINO board, the SiPEED MAIX Go board and the SiPEED Dan Dock board.

[Thanks to Damien for the K210 IDs]
Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
arch/riscv/Kconfig.socs
arch/riscv/boot/dts/Makefile
arch/riscv/boot/dts/kendryte/Makefile
drivers/soc/kendryte/k210-sysctl.c