diff options
author | Tom Rini <trini@konsulko.com> | 2017-07-11 14:21:50 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-07-11 14:21:50 -0400 |
commit | d43ef73bf26614af9b01fd57baa1a1fcf24bfade (patch) | |
tree | e37eac34d78100d69ac984525f98186d1e68d0b7 /board | |
parent | 6b26aaef083957b75bcd69aa65bd6ffcf9245bb3 (diff) | |
parent | 2454b719fb874120e06e4aa64bfb9450d091e56c (diff) | |
download | u-boot-d43ef73bf26614af9b01fd57baa1a1fcf24bfade.tar.gz |
Merge branch 'master' of git://git.denx.de/u-boot-rockchip
Diffstat (limited to 'board')
-rw-r--r-- | board/geekbuying/geekbox/geekbox.c | 14 | ||||
-rw-r--r-- | board/phytec/phycore_rk3288/Kconfig | 15 | ||||
-rw-r--r-- | board/phytec/phycore_rk3288/MAINTAINERS | 6 | ||||
-rw-r--r-- | board/phytec/phycore_rk3288/Makefile | 8 | ||||
-rw-r--r-- | board/phytec/phycore_rk3288/phycore-rk3288.c | 8 | ||||
-rw-r--r-- | board/rockchip/evb_px5/evb-px5.c | 16 | ||||
-rw-r--r-- | board/rockchip/evb_rk3229/Kconfig | 15 | ||||
-rw-r--r-- | board/rockchip/evb_rk3229/MAINTAINERS | 6 | ||||
-rw-r--r-- | board/rockchip/evb_rk3229/Makefile | 7 | ||||
-rw-r--r-- | board/rockchip/evb_rk3229/evb_rk3229.c | 12 | ||||
-rw-r--r-- | board/rockchip/evb_rk3328/evb-rk3328.c | 58 | ||||
-rw-r--r-- | board/rockchip/evb_rk3399/evb-rk3399.c | 31 | ||||
-rw-r--r-- | board/rockchip/sheep_rk3368/sheep_rk3368.c | 15 | ||||
-rw-r--r-- | board/theobroma-systems/puma_rk3399/puma-rk3399.c | 31 |
14 files changed, 123 insertions, 119 deletions
diff --git a/board/geekbuying/geekbox/geekbox.c b/board/geekbuying/geekbox/geekbox.c index 75d121d736..88b67f9d5f 100644 --- a/board/geekbuying/geekbox/geekbox.c +++ b/board/geekbuying/geekbox/geekbox.c @@ -12,17 +12,3 @@ int board_init(void) { return 0; } - -int dram_init(void) -{ - gd->ram_size = 0x80000000; - return 0; -} - -int dram_init_banksize(void) -{ - gd->bd->bi_dram[0].start = 0; - gd->bd->bi_dram[0].size = 0x80000000; - - return 0; -} diff --git a/board/phytec/phycore_rk3288/Kconfig b/board/phytec/phycore_rk3288/Kconfig new file mode 100644 index 0000000000..57cd8e26ed --- /dev/null +++ b/board/phytec/phycore_rk3288/Kconfig @@ -0,0 +1,15 @@ +if TARGET_PHYCORE_RK3288 + +config SYS_BOARD + default "phycore_rk3288" + +config SYS_VENDOR + default "phytec" + +config SYS_CONFIG_NAME + default "phycore_rk3288" + +config BOARD_SPECIFIC_OPTIONS # dummy + def_bool y + +endif diff --git a/board/phytec/phycore_rk3288/MAINTAINERS b/board/phytec/phycore_rk3288/MAINTAINERS new file mode 100644 index 0000000000..9c0de3cc81 --- /dev/null +++ b/board/phytec/phycore_rk3288/MAINTAINERS @@ -0,0 +1,6 @@ +phyCORE-RK3288 +M: Wadim Egorov <w.egorov@phytec.de> +S: Maintained +F: board/phytec/phycore_rk3288 +F: include/configs/phycore_rk3288.h +F: configs/phycore-rk3288_defconfig diff --git a/board/phytec/phycore_rk3288/Makefile b/board/phytec/phycore_rk3288/Makefile new file mode 100644 index 0000000000..f379fbe93a --- /dev/null +++ b/board/phytec/phycore_rk3288/Makefile @@ -0,0 +1,8 @@ +# +# Copyright (C) 2017 PHYTEC Messtechnik GmbH +# Author: Wadim Egorov <w.egorov@phytec.de> +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y += phycore-rk3288.o diff --git a/board/phytec/phycore_rk3288/phycore-rk3288.c b/board/phytec/phycore_rk3288/phycore-rk3288.c new file mode 100644 index 0000000000..20696f6dca --- /dev/null +++ b/board/phytec/phycore_rk3288/phycore-rk3288.c @@ -0,0 +1,8 @@ +/* + * Copyright (C) 2017 PHYTEC Messtechnik GmbH + * Author: Wadim Egorov <w.egorov@phytec.de> + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include <common.h> diff --git a/board/rockchip/evb_px5/evb-px5.c b/board/rockchip/evb_px5/evb-px5.c index 54e62dbb6e..6dca1fc74b 100644 --- a/board/rockchip/evb_px5/evb-px5.c +++ b/board/rockchip/evb_px5/evb-px5.c @@ -33,19 +33,3 @@ int board_init(void) { return 0; } - -int dram_init(void) -{ - gd->ram_size = 0x40000000; - - return 0; -} - -int dram_init_banksize(void) -{ - /* Reserve 0x200000 for ATF bl31 */ - gd->bd->bi_dram[0].start = 0x200000; - gd->bd->bi_dram[0].size = 0x3fe00000; - - return 0; -} diff --git a/board/rockchip/evb_rk3229/Kconfig b/board/rockchip/evb_rk3229/Kconfig new file mode 100644 index 0000000000..361dcb1860 --- /dev/null +++ b/board/rockchip/evb_rk3229/Kconfig @@ -0,0 +1,15 @@ +if TARGET_EVB_RK3229 + +config SYS_BOARD + default "evb_rk3229" + +config SYS_VENDOR + default "rockchip" + +config SYS_CONFIG_NAME + default "evb_rk3229" + +config BOARD_SPECIFIC_OPTIONS # dummy + def_bool y + +endif diff --git a/board/rockchip/evb_rk3229/MAINTAINERS b/board/rockchip/evb_rk3229/MAINTAINERS new file mode 100644 index 0000000000..dfa1090c3e --- /dev/null +++ b/board/rockchip/evb_rk3229/MAINTAINERS @@ -0,0 +1,6 @@ +EVB-RK3229 +M: Kever Yang <kever.yang@rock-chips.com> +S: Maintained +F: board/rockchip/evb_rk3229 +F: include/configs/evb_rk3229.h +F: configs/evb-rk3229_defconfig diff --git a/board/rockchip/evb_rk3229/Makefile b/board/rockchip/evb_rk3229/Makefile new file mode 100644 index 0000000000..65dcd8be35 --- /dev/null +++ b/board/rockchip/evb_rk3229/Makefile @@ -0,0 +1,7 @@ +# +# (C) Copyright 2015 Google, Inc +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y += evb_rk3229.o diff --git a/board/rockchip/evb_rk3229/evb_rk3229.c b/board/rockchip/evb_rk3229/evb_rk3229.c new file mode 100644 index 0000000000..a9a3a40ce8 --- /dev/null +++ b/board/rockchip/evb_rk3229/evb_rk3229.c @@ -0,0 +1,12 @@ +/* + * (C) Copyright 2017 Rockchip Electronics Co., Ltd + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include <common.h> +#include <dm.h> +#include <asm/io.h> +#include <asm/arch/uart.h> + +DECLARE_GLOBAL_DATA_PTR; diff --git a/board/rockchip/evb_rk3328/evb-rk3328.c b/board/rockchip/evb_rk3328/evb-rk3328.c index 0a26ed56b6..99a73dacf1 100644 --- a/board/rockchip/evb_rk3328/evb-rk3328.c +++ b/board/rockchip/evb_rk3328/evb-rk3328.c @@ -7,31 +7,65 @@ #include <common.h> #include <asm/armv8/mmu.h> #include <dwc3-uboot.h> +#include <power/regulator.h> #include <usb.h> DECLARE_GLOBAL_DATA_PTR; int board_init(void) { - return 0; -} + int ret; -int dram_init(void) -{ - gd->ram_size = 0x80000000; - return 0; + ret = regulators_enable_boot_on(false); + if (ret) + debug("%s: Cannot enable boot on regulator\n", __func__); + + return ret; } -int dram_init_banksize(void) +#if defined(CONFIG_USB_GADGET) && defined(CONFIG_USB_GADGET_DWC2_OTG) +#include <usb.h> +#include <usb/dwc2_udc.h> + +static struct dwc2_plat_otg_data rk3328_otg_data = { + .rx_fifo_sz = 512, + .np_tx_fifo_sz = 16, + .tx_fifo_sz = 128, +}; + +int board_usb_init(int index, enum usb_init_type init) { - /* Reserve 0x200000 for ATF bl31 */ - gd->bd->bi_dram[0].start = 0x200000; - gd->bd->bi_dram[0].size = 0x7e000000; + int node; + const char *mode; + bool matched = false; + const void *blob = gd->fdt_blob; - return 0; + /* find the usb_otg node */ + node = fdt_node_offset_by_compatible(blob, -1, + "rockchip,rk3328-usb"); + + while (node > 0) { + mode = fdt_getprop(blob, node, "dr_mode", NULL); + if (mode && strcmp(mode, "otg") == 0) { + matched = true; + break; + } + + node = fdt_node_offset_by_compatible(blob, node, + "rockchip,rk3328-usb"); + } + if (!matched) { + debug("Not found usb_otg device\n"); + return -ENODEV; + } + + rk3328_otg_data.regs_otg = fdtdec_get_addr(blob, node, "reg"); + + return dwc2_udc_probe(&rk3328_otg_data); } -int board_usb_init(int index, enum usb_init_type init) +int board_usb_cleanup(int index, enum usb_init_type init) { return 0; } +#endif diff --git a/board/rockchip/evb_rk3399/evb-rk3399.c b/board/rockchip/evb_rk3399/evb-rk3399.c index f63f003209..d50c59db8d 100644 --- a/board/rockchip/evb_rk3399/evb-rk3399.c +++ b/board/rockchip/evb_rk3399/evb-rk3399.c @@ -67,34 +67,3 @@ int board_init(void) out: return 0; } - -int dram_init(void) -{ - struct ram_info ram; - struct udevice *dev; - int ret; - - ret = uclass_get_device(UCLASS_RAM, 0, &dev); - if (ret) { - debug("DRAM init failed: %d\n", ret); - return ret; - } - ret = ram_get_info(dev, &ram); - if (ret) { - debug("Cannot get DRAM size: %d\n", ret); - return ret; - } - debug("SDRAM base=%llx, size=%x\n", ram.base, (unsigned int)ram.size); - gd->ram_size = ram.size; - - return 0; -} - -int dram_init_banksize(void) -{ - /* Reserve 0x200000 for ATF bl31 */ - gd->bd->bi_dram[0].start = 0x200000; - gd->bd->bi_dram[0].size = 0x7e000000; - - return 0; -} diff --git a/board/rockchip/sheep_rk3368/sheep_rk3368.c b/board/rockchip/sheep_rk3368/sheep_rk3368.c index df1fd9d2c3..17adb02469 100644 --- a/board/rockchip/sheep_rk3368/sheep_rk3368.c +++ b/board/rockchip/sheep_rk3368/sheep_rk3368.c @@ -20,18 +20,3 @@ int board_init(void) { return 0; } - -int dram_init(void) -{ - gd->ram_size = 0x80000000; - - return 0; -} - -int dram_init_banksize(void) -{ - gd->bd->bi_dram[0].start = 0x200000; - gd->bd->bi_dram[0].size = 0x7fe00000; - - return 0; -} diff --git a/board/theobroma-systems/puma_rk3399/puma-rk3399.c b/board/theobroma-systems/puma_rk3399/puma-rk3399.c index 6fff3e1ae6..36e9cd7f84 100644 --- a/board/theobroma-systems/puma_rk3399/puma-rk3399.c +++ b/board/theobroma-systems/puma_rk3399/puma-rk3399.c @@ -180,34 +180,3 @@ void get_board_serial(struct tag_serialnr *serialnr) serialnr->low = (u32)(serial & 0xffffffff); } #endif - -int dram_init(void) -{ - struct ram_info ram; - struct udevice *dev; - int ret; - - ret = uclass_get_device(UCLASS_RAM, 0, &dev); - if (ret) { - debug("DRAM init failed: %d\n", ret); - return ret; - } - ret = ram_get_info(dev, &ram); - if (ret) { - debug("Cannot get DRAM size: %d\n", ret); - return ret; - } - debug("SDRAM base=%llx, size=%x\n", ram.base, (unsigned int)ram.size); - gd->ram_size = ram.size; - - return 0; -} - -int dram_init_banksize(void) -{ - /* Reserve 0x200000 for ATF bl31 */ - gd->bd->bi_dram[0].start = 0x200000; - gd->bd->bi_dram[0].size = 0x7e000000; - - return 0; -} |