summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2017-07-11 18:21:50 (GMT)
committerTom Rini <trini@konsulko.com>2017-07-11 18:21:50 (GMT)
commitd43ef73bf26614af9b01fd57baa1a1fcf24bfade (patch)
treee37eac34d78100d69ac984525f98186d1e68d0b7 /board
parent6b26aaef083957b75bcd69aa65bd6ffcf9245bb3 (diff)
parent2454b719fb874120e06e4aa64bfb9450d091e56c (diff)
downloadu-boot-fsl-qoriq-d43ef73bf26614af9b01fd57baa1a1fcf24bfade.tar.xz
Merge branch 'master' of git://git.denx.de/u-boot-rockchip
Diffstat (limited to 'board')
-rw-r--r--board/geekbuying/geekbox/geekbox.c14
-rw-r--r--board/phytec/phycore_rk3288/Kconfig15
-rw-r--r--board/phytec/phycore_rk3288/MAINTAINERS6
-rw-r--r--board/phytec/phycore_rk3288/Makefile8
-rw-r--r--board/phytec/phycore_rk3288/phycore-rk3288.c8
-rw-r--r--board/rockchip/evb_px5/evb-px5.c16
-rw-r--r--board/rockchip/evb_rk3229/Kconfig15
-rw-r--r--board/rockchip/evb_rk3229/MAINTAINERS6
-rw-r--r--board/rockchip/evb_rk3229/Makefile7
-rw-r--r--board/rockchip/evb_rk3229/evb_rk3229.c12
-rw-r--r--board/rockchip/evb_rk3328/evb-rk3328.c58
-rw-r--r--board/rockchip/evb_rk3399/evb-rk3399.c31
-rw-r--r--board/rockchip/sheep_rk3368/sheep_rk3368.c15
-rw-r--r--board/theobroma-systems/puma_rk3399/puma-rk3399.c31
14 files changed, 123 insertions, 119 deletions
diff --git a/board/geekbuying/geekbox/geekbox.c b/board/geekbuying/geekbox/geekbox.c
index 75d121d..88b67f9 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 0000000..57cd8e2
--- /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 0000000..9c0de3c
--- /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 0000000..f379fbe
--- /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 0000000..20696f6
--- /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 54e62db..6dca1fc 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 0000000..361dcb1
--- /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 0000000..dfa1090
--- /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 0000000..65dcd8b
--- /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 0000000..a9a3a40
--- /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 0a26ed5..99a73da 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 f63f003..d50c59d 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 df1fd9d..17adb02 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 6fff3e1..36e9cd7 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;
-}