Skip to contentSkip to conversation

rockchip: rk3399: add support for chromebook_kevin

PATCH New Marty E. Plummer 1 participant 1 message Mar 8, 2019

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

PATCH 1/1 rockchip: rk3399: add support for chromebook_kevin

What I've got so far. Currently it does not get any further than the following:

U-Boot SPL board init
spl_early_init
SPL malloc() before relocation used 0x23c8 bytes (8 KB)

Quoted 1 line
Quoted 1 line

SPL: board_init_r()

spl_init
SPL: Unsupported Boot Device!
SPL: failed to boot from all boot devices
ERROR ### Please RESET the board ###

Posting to the lists so someone could perhaps assist

---
 arch/arm/dts/rk3399-gru-kevin.dts             |  1 +
 arch/arm/mach-rockchip/rk3399-board-spl.c     |  6 +-
 arch/arm/mach-rockchip/rk3399/Kconfig         |  3 +
 board/google/gru/Kconfig                      | 16 +++
 configs/chromebook_kevin_defconfig            | 99 +++++++++++++++++++
 include/dt-bindings/input/linux-event-codes.h |  1 +
 6 files changed, 123 insertions(+), 3 deletions(-)
 create mode 100644 configs/chromebook_kevin_defconfig
arch/arm/dts/rk3399-gru-kevin.dts +1 -0
index 2cc7c47d6a..c7ead02af8 100644
@@ -7,6 +7,7 @@
 
 /dts-v1/;
 #include "rk3399-gru-chromebook.dtsi"
+#include "rk3399-sdram-lpddr3-samsung-4GB-1866.dtsi"
 #include <dt-bindings/input/linux-event-codes.h>
 
 /*
arch/arm/mach-rockchip/rk3399-board-spl.c +3 -3
index ccc136f388..799fb95013 100644
@@ -133,7 +133,7 @@ void board_debug_uart_init(void)
 #define GPIO0_BASE	0xff720000
 #define PMUGRF_BASE	0xff320000
 	struct rk3399_grf_regs * const grf = (void *)GRF_BASE;
-#ifdef CONFIG_TARGET_CHROMEBOOK_BOB
+#if defined(CONFIG_TARGET_CHROMEBOOK_BOB) || defined(CONFIG_TARGET_CHROMEBOOK_KEVIN)
 	struct rk3399_pmugrf_regs * const pmugrf = (void *)PMUGRF_BASE;
 	struct rockchip_gpio_regs * const gpio = (void *)GPIO0_BASE;
 #endif
@@ -147,7 +147,7 @@ void board_debug_uart_init(void)
 		     GRF_GPIO2C1_SEL_MASK,
 		     GRF_UART0BT_SOUT << GRF_GPIO2C1_SEL_SHIFT);
 #else
-# ifdef CONFIG_TARGET_CHROMEBOOK_BOB
+# if defined(CONFIG_TARGET_CHROMEBOOK_BOB) || defined(CONFIG_TARGET_CHROMEBOOK_KEVIN)
 	rk_setreg(&grf->io_vsel, 1 << 0);
 
 	/*
@@ -187,7 +187,7 @@ void board_init_f(ulong dummy)
 #ifdef EARLY_UART
 	debug_uart_init();
 
-# ifdef CONFIG_TARGET_CHROMEBOOK_BOB
+#if defined(CONFIG_TARGET_CHROMEBOOK_BOB) || defined(CONFIG_TARGET_CHROMEBOOK_KEVIN)
 	int sum, i;
 
 	/*
arch/arm/mach-rockchip/rk3399/Kconfig +3 -0
index 2408adb420..9124bc145a 100644
@@ -62,6 +62,9 @@ config TARGET_CHROMEBOOK_BOB
 	  display. It includes a Chrome OS EC (Cortex-M3) to provide access to
 	  the keyboard and battery functions.
 
+config TARGET_CHROMEBOOK_KEVIN
+	bool "Samsung Chromebook Plus (RK3399)"
+
 endchoice
 
 config SYS_SOC
board/google/gru/Kconfig +16 -0
index 61f7bbca98..1455e1481d 100644
@@ -13,3 +13,19 @@ config BOARD_SPECIFIC_OPTIONS # dummy
 	def_bool y
 
 endif
+
+if TARGET_CHROMEBOOK_KEVIN
+
+config SYS_BOARD
+	default "gru"
+
+config SYS_VENDOR
+	default "google"
+
+config SYS_CONFIG_NAME
+	default "gru"
+
+config BOARD_SPECIFIC_OPTIONS # dummy
+	def_bool y
+
+endif
configs/chromebook_kevin_defconfig new file +99 -0

99 lines not on this page · raw message

include/dt-bindings/input/linux-event-codes.h +1 -0
index 87cf351bab..fff5bc75f9 100644
@@ -749,6 +749,7 @@
 #define SW_ROTATE_LOCK		0x0c  /* set = rotate locked/disabled */
 #define SW_LINEIN_INSERT	0x0d  /* set = inserted */
 #define SW_MUTE_DEVICE		0x0e  /* set = device disabled */
+#define SW_PEN_INSERTED		0x0f  /* set = pen inserted */
 #define SW_MAX			0x0f
 #define SW_CNT			(SW_MAX+1)
 
Signature · 1 line
2.21.0