Commit 01892d230dd456278cd28c3b8de109202f910238

Authored by Suniel Mahesh
Committed by Kever Yang
1 parent 80b9882a6e

rockchip: rk3399: split roc-pc-rk3399 out of evb_rk3399

roc-pc-rk3399 board has one user button & three user LED's. Currently
we don't have any code support for these devices. Since button and LED's are
specific to roc-pc-rk3399 board, split it into its own board file and add code
support here.

Signed-off-by: Suniel Mahesh <sunil@amarulasolutions.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>

Showing 8 changed files with 101 additions and 6 deletions Side-by-side Diff

arch/arm/mach-rockchip/rk3399/Kconfig
... ... @@ -81,6 +81,25 @@
81 81 * GPIO expansion ports
82 82 * DC 12V/2A
83 83  
  84 +config TARGET_ROC_PC_RK3399
  85 + bool "Firefly ROC-RK3399-PC board"
  86 + help
  87 + ROC-RK3399-PC is SBC produced by Firefly. Key features:
  88 +
  89 + * Rockchip RK3399
  90 + * 4GB Dual-Channel LPDDR4 64-bit
  91 + * SD card slot
  92 + * eMMC socket
  93 + * 16MB SPI Flash
  94 + * Gigabit ethernet
  95 + * PCIe
  96 + * HDMI In/Out, DP, MIPI DSI/CSI, eDP
  97 + * USB 3.0, 2.0
  98 + * USB Type C power and data
  99 + * GPIO expansion ports
  100 + * wide voltage input(5V-15V), dual cell battery
  101 + * Wifi/BT accessible via expansion board M.2
  102 +
84 103 endchoice
85 104  
86 105 config ROCKCHIP_BOOT_MODE_REG
... ... @@ -128,6 +147,7 @@
128 147 source "board/vamrs/rock960_rk3399/Kconfig"
129 148 source "board/google/gru/Kconfig"
130 149 source "board/pine64/rockpro64_rk3399/Kconfig"
  150 +source "board/firefly/roc-pc-rk3399/Kconfig"
131 151  
132 152 endif
board/firefly/roc-pc-rk3399/Kconfig
  1 +if TARGET_ROC_PC_RK3399
  2 +
  3 +config SYS_BOARD
  4 + default "roc-pc-rk3399"
  5 +
  6 +config SYS_VENDOR
  7 + default "firefly"
  8 +
  9 +config SYS_CONFIG_NAME
  10 + default "roc-pc-rk3399"
  11 +
  12 +config BOARD_SPECIFIC_OPTIONS # dummy
  13 + def_bool y
  14 +
  15 +endif
board/firefly/roc-pc-rk3399/MAINTAINERS
  1 +ROC-RK3399-PC
  2 +M: Levin Du <djw@t-chip.com.cn>
  3 +S: Maintained
  4 +F: board/firefly/roc-pc-rk3399
  5 +F: include/configs/roc-pc-rk3399.h
  6 +F: configs/roc-pc-rk3399_defconfig
board/firefly/roc-pc-rk3399/Makefile
  1 +#
  2 +# (C) Copyright 2016 Rockchip Electronics Co., Ltd
  3 +#
  4 +# SPDX-License-Identifier: GPL-2.0+
  5 +#
  6 +
  7 +obj-y += roc-pc-rk3399.o
board/firefly/roc-pc-rk3399/roc-pc-rk3399.c
  1 +// SPDX-License-Identifier: GPL-2.0+
  2 +/*
  3 + * (C) Copyright 2016 Rockchip Electronics Co., Ltd
  4 + */
  5 +
  6 +#include <common.h>
  7 +#include <dm.h>
  8 +#include <asm/arch-rockchip/periph.h>
  9 +#include <power/regulator.h>
  10 +
  11 +#ifndef CONFIG_SPL_BUILD
  12 +int board_early_init_f(void)
  13 +{
  14 + struct udevice *regulator;
  15 + int ret;
  16 +
  17 + ret = regulator_get_by_platname("vcc5v0_host", &regulator);
  18 + if (ret) {
  19 + debug("%s vcc5v0_host init fail! ret %d\n", __func__, ret);
  20 + goto out;
  21 + }
  22 +
  23 + ret = regulator_set_enable(regulator, true);
  24 + if (ret)
  25 + debug("%s vcc5v0-host-en set fail! ret %d\n", __func__, ret);
  26 +out:
  27 + return 0;
  28 +}
  29 +#endif
board/rockchip/evb_rk3399/MAINTAINERS
... ... @@ -55,12 +55,6 @@
55 55 F: arch/arm/dts/rk3399-u-boot.dtsi
56 56 F: arch/arm/dts/rk3399-orangepi-u-boot.dtsi
57 57  
58   -ROC-RK3399-PC
59   -M: Levin Du <djw@t-chip.com.cn>
60   -S: Maintained
61   -F: configs/roc-pc-rk3399_defconfig
62   -F: arch/arm/dts/rk3399-roc-pc-u-boot.dtsi
63   -
64 58 ROCK-PI-4
65 59 M: Akash Gajjar <akash@openedev.com>
66 60 M: Jagan Teki <jagan@amarulasolutions.com>
configs/roc-pc-rk3399_defconfig
... ... @@ -3,6 +3,7 @@
3 3 CONFIG_SYS_TEXT_BASE=0x00200000
4 4 CONFIG_ENV_OFFSET=0x3F8000
5 5 CONFIG_ROCKCHIP_RK3399=y
  6 +CONFIG_TARGET_ROC_PC_RK3399=y
6 7 CONFIG_NR_DRAM_BANKS=1
7 8 CONFIG_DEBUG_UART_BASE=0xFF1A0000
8 9 CONFIG_DEBUG_UART_CLOCK=24000000
include/configs/roc-pc-rk3399.h
  1 +/* SPDX-License-Identifier: GPL-2.0+ */
  2 +/*
  3 + * (C) Copyright 2016 Rockchip Electronics Co., Ltd
  4 + */
  5 +
  6 +#ifndef __ROC_PC_RK3399_H
  7 +#define __ROC_PC_RK3399_H
  8 +
  9 +#define ROCKCHIP_DEVICE_SETTINGS \
  10 + "stdin=serial,cros-ec-keyb\0" \
  11 + "stdout=serial,vidconsole\0" \
  12 + "stderr=serial,vidconsole\0"
  13 +
  14 +#include <configs/rk3399_common.h>
  15 +
  16 +#if defined(CONFIG_ENV_IS_IN_MMC)
  17 +# define CONFIG_SYS_MMC_ENV_DEV 0
  18 +#endif
  19 +
  20 +#define SDRAM_BANK_SIZE (2UL << 30)
  21 +
  22 +#endif