diff options
author | Tom Rini <trini@konsulko.com> | 2018-12-16 20:49:46 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-12-16 20:49:46 -0500 |
commit | d597b26d5132643118333b2372757fb402ba0579 (patch) | |
tree | c668de186d8fa11ae8eea894dde6d59b5bb12298 /board | |
parent | 401c2540445aad08816382c0dc208d2516d90d89 (diff) | |
parent | e11ef3d26eff8d14a11f89b9bdc20471b425d2d7 (diff) | |
download | u-boot-d597b26d5132643118333b2372757fb402ba0579.tar.gz |
Merge tag 'for-master-20181216' of git://git.denx.de/u-boot-rockchip
Improvements and fixes or u-boot-rockchip:
- new board: adds rv1108-elgin-r1 board support
- rk3288-evb: dts: remove 'vmmc' from emmc node
- rk3399-puma: dts: remove obsolete DTS node 'vcc5v0_host'
Diffstat (limited to 'board')
-rw-r--r-- | board/elgin/elgin_rv1108/Kconfig | 15 | ||||
-rw-r--r-- | board/elgin/elgin_rv1108/MAINTAINERS | 6 | ||||
-rw-r--r-- | board/elgin/elgin_rv1108/Makefile | 7 | ||||
-rw-r--r-- | board/elgin/elgin_rv1108/elgin_rv1108.c | 74 |
4 files changed, 102 insertions, 0 deletions
diff --git a/board/elgin/elgin_rv1108/Kconfig b/board/elgin/elgin_rv1108/Kconfig new file mode 100644 index 0000000000..be9243164a --- /dev/null +++ b/board/elgin/elgin_rv1108/Kconfig @@ -0,0 +1,15 @@ +if TARGET_ELGIN_RV1108 + +config SYS_BOARD + default "elgin_rv1108" + +config SYS_VENDOR + default "elgin" + +config SYS_CONFIG_NAME + default "elgin_rv1108" + +config BOARD_SPECIFIC_OPTIONS # dummy + def_bool y + +endif diff --git a/board/elgin/elgin_rv1108/MAINTAINERS b/board/elgin/elgin_rv1108/MAINTAINERS new file mode 100644 index 0000000000..7747490163 --- /dev/null +++ b/board/elgin/elgin_rv1108/MAINTAINERS @@ -0,0 +1,6 @@ +ELGIN-RV1108 +M: Otavio Salvador <otavio@ossystems.com.br> +S: Maintained +F: board/elgin/elgin_rv1108 +F: include/configs/elgin_rv1108.h +F: configs/elgin-rv1108_defconfig diff --git a/board/elgin/elgin_rv1108/Makefile b/board/elgin/elgin_rv1108/Makefile new file mode 100644 index 0000000000..382218006a --- /dev/null +++ b/board/elgin/elgin_rv1108/Makefile @@ -0,0 +1,7 @@ +# +# (C) Copyright 2016 Rockchip Electronics Co., Ltd +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y += elgin_rv1108.o diff --git a/board/elgin/elgin_rv1108/elgin_rv1108.c b/board/elgin/elgin_rv1108/elgin_rv1108.c new file mode 100644 index 0000000000..3abc514412 --- /dev/null +++ b/board/elgin/elgin_rv1108/elgin_rv1108.c @@ -0,0 +1,74 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * (C)Copyright 2016 Rockchip Electronics Co., Ltd + * Authors: Andy Yan <andy.yan@rock-chips.com> + */ + +#include <common.h> +#include <asm/io.h> +#include <fdtdec.h> +#include <asm/arch/grf_rv1108.h> +#include <asm/arch/hardware.h> +#include <asm/gpio.h> + +DECLARE_GLOBAL_DATA_PTR; + +int mach_cpu_init(void) +{ + int node; + struct rv1108_grf *grf; + enum { + GPIO3C3_SHIFT = 6, + GPIO3C3_MASK = 3 << GPIO3C3_SHIFT, + + GPIO3C2_SHIFT = 4, + GPIO3C2_MASK = 3 << GPIO3C2_SHIFT, + + GPIO2D2_SHIFT = 4, + GPIO2D2_MASK = 3 << GPIO2D2_SHIFT, + GPIO2D2_GPIO = 0, + GPIO2D2_UART2_SOUT_M0, + + GPIO2D1_SHIFT = 2, + GPIO2D1_MASK = 3 << GPIO2D1_SHIFT, + GPIO2D1_GPIO = 0, + GPIO2D1_UART2_SIN_M0, + }; + + node = fdt_node_offset_by_compatible(gd->fdt_blob, -1, "rockchip,rv1108-grf"); + grf = (struct rv1108_grf *)fdtdec_get_addr(gd->fdt_blob, node, "reg"); + + /* Elgin board use UART2 m0 for debug*/ + rk_clrsetreg(&grf->gpio2d_iomux, + GPIO2D2_MASK | GPIO2D1_MASK, + GPIO2D2_UART2_SOUT_M0 << GPIO2D2_SHIFT | + GPIO2D1_UART2_SIN_M0 << GPIO2D1_SHIFT); + rk_clrreg(&grf->gpio3c_iomux, GPIO3C3_MASK | GPIO3C2_MASK); + + return 0; +} + +#define MODEM_ENABLE_GPIO 111 + +int board_init(void) +{ + gpio_request(MODEM_ENABLE_GPIO, "modem_enable"); + gpio_direction_output(MODEM_ENABLE_GPIO, 0); + + return 0; +} + +int dram_init(void) +{ + gd->ram_size = 0x8000000; + + return 0; +} + +int dram_init_banksize(void) +{ + gd->bd->bi_dram[0].start = 0x60000000; + gd->bd->bi_dram[0].size = 0x8000000; + + return 0; +} |