diff options
author | Wadim Egorov <w.egorov@phytec.de> | 2017-06-19 12:36:40 +0200 |
---|---|---|
committer | Philipp Tomsich <philipp.tomsich@theobroma-systems.com> | 2017-07-11 15:23:38 +0200 |
commit | bafcf2db4176940953a96339025d7b06e96cb22e (patch) | |
tree | d9c5419abd83ab32ba7123ddb8d439f5989e0995 /arch/arm/mach-rockchip/rk3288-board-spl.c | |
parent | ad98f882e86d3b7231b8c02bbdf8f7eee735aee6 (diff) | |
download | u-boot-bafcf2db4176940953a96339025d7b06e96cb22e.tar.gz |
rockchip: Add basic support for phyCORE-RK3288 SoM based carrier board
The phyCORE-RK3288 is a SoM (System on Module) containing a RK3288 SoC.
The module can be connected to different carrier boards.
It can be also equipped with different RAM, SPI flash and eMMC variants.
The Rapid Development Kit option is using the following setup:
- 1 GB DDR3 RAM (2 Banks)
- 1x 4 KB EEPROM
- DP83867 Gigabit Ethernet PHY
- 16 MB SPI Flash
- 4 GB eMMC Flash
Add basic support for the PCM-947 carrier board, a RK3288 based development
board made by PHYTEC. This board works in a combination with
the phyCORE-RK3288 System on Module.
Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Diffstat (limited to 'arch/arm/mach-rockchip/rk3288-board-spl.c')
-rw-r--r-- | arch/arm/mach-rockchip/rk3288-board-spl.c | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/arch/arm/mach-rockchip/rk3288-board-spl.c b/arch/arm/mach-rockchip/rk3288-board-spl.c index 8ca6b1e439..5668fd28a0 100644 --- a/arch/arm/mach-rockchip/rk3288-board-spl.c +++ b/arch/arm/mach-rockchip/rk3288-board-spl.c @@ -8,6 +8,7 @@ #include <debug_uart.h> #include <dm.h> #include <fdtdec.h> +#include <i2c.h> #include <led.h> #include <malloc.h> #include <ram.h> @@ -25,6 +26,7 @@ #include <dm/test.h> #include <dm/util.h> #include <power/regulator.h> +#include <power/rk8xx_pmic.h> DECLARE_GLOBAL_DATA_PTR; @@ -157,6 +159,32 @@ static int configure_emmc(struct udevice *pinctrl) } #endif +#if !defined(CONFIG_SPL_OF_PLATDATA) +static int phycore_init(void) +{ + struct udevice *pmic; + int ret; + + ret = uclass_first_device_err(UCLASS_PMIC, &pmic); + if (ret) + return ret; + +#if defined(CONFIG_SPL_POWER_SUPPORT) + /* Increase USB input current to 2A */ + ret = rk818_spl_configure_usb_input_current(pmic, 2000); + if (ret) + return ret; + + /* Close charger when USB lower then 3.26V */ + ret = rk818_spl_configure_usb_chrg_shutdown(pmic, 3260000); + if (ret) + return ret; +#endif + + return 0; +} +#endif + void board_init_f(ulong dummy) { struct udevice *pinctrl; @@ -203,6 +231,18 @@ void board_init_f(ulong dummy) debug("Pinctrl init failed: %d\n", ret); return; } + +#if !defined(CONFIG_SPL_OF_PLATDATA) + if (of_machine_is_compatible("phytec,rk3288-phycore-som")) { + ret = phycore_init(); + if (ret) { + debug("Failed to set up phycore power settings: %d\n", + ret); + return; + } + } +#endif + debug("\nspl:init dram\n"); ret = uclass_get_device(UCLASS_RAM, 0, &dev); if (ret) { |