diff options
author | Tom Rini <trini@konsulko.com> | 2020-07-22 18:30:52 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-07-22 18:30:52 +0300 |
commit | 95fc1f164723270b2b0bd8d7e2f7ba21bce66381 (patch) | |
tree | ac7b069cafc1178f6093944ee6a9b747d8b918e6 /board | |
parent | e9f1f5f48650301bd9e4194c474d19081c54f05b (diff) | |
parent | 8bedcf0ef9404f7f04da79783ba1ab8be7185cc2 (diff) | |
download | u-boot-95fc1f164723270b2b0bd8d7e2f7ba21bce66381.tar.xz |
Merge tag 'u-boot-rockchip-20200722' of https://gitlab.denx.de/u-boot/custodians/u-boot-rockchip
- New rk3326 board: Hardkernel Odroid Go2;
- Update board config and dts for RockPI 4/N8/N10;
- Update led boot on support for roc-rk3399-pc;
- Enable SPI Flash suppor for rk3328 rock64 board;
- Update rockchip pcie phy to use generic framework;
Diffstat (limited to 'board')
-rw-r--r-- | board/firefly/roc-pc-rk3399/roc-pc-rk3399.c | 48 | ||||
-rw-r--r-- | board/hardkernel/odroid_go2/Kconfig | 15 | ||||
-rw-r--r-- | board/hardkernel/odroid_go2/MAINTAINERS | 6 | ||||
-rw-r--r-- | board/hardkernel/odroid_go2/Makefile | 7 | ||||
-rw-r--r-- | board/hardkernel/odroid_go2/go2.c | 4 | ||||
-rw-r--r-- | board/rockchip/evb_rk3399/MAINTAINERS | 2 |
6 files changed, 73 insertions, 9 deletions
diff --git a/board/firefly/roc-pc-rk3399/roc-pc-rk3399.c b/board/firefly/roc-pc-rk3399/roc-pc-rk3399.c index 7c3a803654..93e7d776fb 100644 --- a/board/firefly/roc-pc-rk3399/roc-pc-rk3399.c +++ b/board/firefly/roc-pc-rk3399/roc-pc-rk3399.c @@ -5,12 +5,15 @@ #include <common.h> #include <dm.h> +#include <env.h> #include <log.h> -#include <asm/arch-rockchip/periph.h> -#include <power/regulator.h> #include <spl_gpio.h> #include <asm/io.h> +#include <power/regulator.h> + +#include <asm/arch-rockchip/cru.h> #include <asm/arch-rockchip/gpio.h> +#include <asm/arch-rockchip/grf_rk3399.h> #ifndef CONFIG_SPL_BUILD int board_early_init_f(void) @@ -30,19 +33,46 @@ int board_early_init_f(void) out: return 0; } -#endif -#if defined(CONFIG_TPL_BUILD) +#else -#define GPIO0_BASE 0xff720000 +#define PMUGRF_BASE 0xff320000 +#define GPIO0_BASE 0xff720000 -int board_early_init_f(void) +/** + * LED setup for roc-rk3399-pc + * + * 1. Set the low power leds (only during POR, pwr_key env is 'y') + * glow yellow LED, termed as low power + * poll for on board power key press + * once powe key pressed, turn off yellow + * 2. Turn on red LED, indicating full power mode + */ +void led_setup(void) { struct rockchip_gpio_regs * const gpio0 = (void *)GPIO0_BASE; + struct rk3399_pmugrf_regs * const pmugrf = (void *)PMUGRF_BASE; + bool press_pwr_key = false; - /* Turn on red LED, indicating full power mode */ - spl_gpio_output(gpio0, GPIO(BANK_B, 5), 1); + if (IS_ENABLED(CONFIG_SPL_ENV_SUPPORT)) { + env_init(); + env_load(); + if (env_get_yesno("pwr_key") == 1) + press_pwr_key = true; + } - return 0; + if (press_pwr_key && !strcmp(get_reset_cause(), "POR")) { + spl_gpio_output(gpio0, GPIO(BANK_A, 2), 1); + + spl_gpio_set_pull(&pmugrf->gpio0_p, GPIO(BANK_A, 5), + GPIO_PULL_NORMAL); + while (readl(&gpio0->ext_port) & 0x20) + ; + + spl_gpio_output(gpio0, GPIO(BANK_A, 2), 0); + } + + spl_gpio_output(gpio0, GPIO(BANK_B, 5), 1); } + #endif diff --git a/board/hardkernel/odroid_go2/Kconfig b/board/hardkernel/odroid_go2/Kconfig new file mode 100644 index 0000000000..cf3f7c91d9 --- /dev/null +++ b/board/hardkernel/odroid_go2/Kconfig @@ -0,0 +1,15 @@ +if TARGET_ODROID_GO2 + +config SYS_BOARD + default "odroid_go2" + +config SYS_VENDOR + default "hardkernel" + +config SYS_CONFIG_NAME + default "odroid_go2" + +config BOARD_SPECIFIC_OPTIONS # dummy + def_bool y + +endif diff --git a/board/hardkernel/odroid_go2/MAINTAINERS b/board/hardkernel/odroid_go2/MAINTAINERS new file mode 100644 index 0000000000..eab622a70b --- /dev/null +++ b/board/hardkernel/odroid_go2/MAINTAINERS @@ -0,0 +1,6 @@ +GO2 +M: Heiko Stuebner <heiko.stuebner@theobroma-systems.com> +S: Maintained +F: board/odroid/go2 +F: include/configs/odroid_go2.h +F: configs/odroid-go2_defconfig diff --git a/board/hardkernel/odroid_go2/Makefile b/board/hardkernel/odroid_go2/Makefile new file mode 100644 index 0000000000..51b9d24cfb --- /dev/null +++ b/board/hardkernel/odroid_go2/Makefile @@ -0,0 +1,7 @@ +# +# Copyright (c) 2020 Theobroma Systems Design und Consulting GmbH +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y += go2.o diff --git a/board/hardkernel/odroid_go2/go2.c b/board/hardkernel/odroid_go2/go2.c new file mode 100644 index 0000000000..29464ae63e --- /dev/null +++ b/board/hardkernel/odroid_go2/go2.c @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * (C) Copyright 2019 Rockchip Electronics Co., Ltd + */ diff --git a/board/rockchip/evb_rk3399/MAINTAINERS b/board/rockchip/evb_rk3399/MAINTAINERS index 578638a58b..4c889e06a6 100644 --- a/board/rockchip/evb_rk3399/MAINTAINERS +++ b/board/rockchip/evb_rk3399/MAINTAINERS @@ -68,6 +68,8 @@ M: Jagan Teki <jagan@amarulasolutions.com> S: Maintained F: configs/rock-pi-4-rk3399_defconfig F: arch/arm/dts/rk3399-rock-pi-4-u-boot.dtsi +F: configs/rock-pi-4c-rk3399_defconfig +F: arch/arm/dts/rk3399-rock-pi-4c-u-boot.dtsi ROCK-PI-N10 M: Jagan Teki <jagan@amarulasolutions.com> |