summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-rockchip/rk3288
Commit message (Collapse)AuthorAgeFilesLines
* rockchip: Convert evb-rk3288 over to use binmanSimon Glass2020-07-281-0/+1
| | | | | | | | At present this board uses a custom script to produce the .its file. Update it to use binman instead. Binman can create all the images that are needed. Signed-off-by: Simon Glass <sjg@chromium.org>
* rockchip: Enable building a SPI ROM image on jerrySimon Glass2020-07-281-0/+2
| | | | | | | | | | Add a simple binman config and enable CONFIG_HAS_ROM so that U-Boot produces a ROM for jerry. Change the binman image definition to support multiple images, since it may be used to build both u-boot-rockchip.bin and u-boot.rom Signed-off-by: Simon Glass <sjg@chromium.org>
* rockchip: rk3288: Add OF board setupJagan Teki2020-07-221-0/+30
| | | | | | | | | | | | | | | | The new rk3288 revision rk3288w has some changes with respect to legacy rk3288 like hclk_vio in cru and usb host0 ohci. Linux clock driver already handle this via rockchip,rk3288w-cru compatible. USB ohci host can enable via dts for rk3288w based boards. So, add fdt board setup code to update cru compatible with rk3288w-cru compatible if the SOC revision is RK3288W. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
* common: Drop log.h from common headerSimon Glass2020-05-181-0/+1
| | | | | | Move this header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
* command: Remove the cmd_tbl_t typedefSimon Glass2020-05-181-2/+3
| | | | | | | | | | | | | We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: core: Create a new header file for 'compat' featuresSimon Glass2020-02-051-0/+1
| | | | | | | | | | | | At present dm/device.h includes the linux-compatible features. This requires including linux/compat.h which in turn includes a lot of headers. One of these is malloc.h which we thus end up including in every file in U-Boot. Apart from the inefficiency of this, it is problematic for sandbox which needs to use the system malloc() in some files. Move the compatibility features into a separate header file. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: core: Require users of devres to include the headerSimon Glass2020-02-052-0/+2
| | | | | | | | | | At present devres.h is included in all files that include dm.h but few make use of it. Also this pulls in linux/compat which adds several more headers. Drop the automatic inclusion and require files to include devres themselves. This provides a good indication of which files use devres. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Anatolij Gustschin <agust@denx.de>
* rockchip: Add common reset causeJagan Teki2020-01-301-39/+0
| | | | | | | | | | | | | | Add cpu reset cause in common cpu-info file. This would help to print the reset cause for various resets. Right now it support rk3288, rk3399. rest of rockchip platforms doesn't have reset cause support ye but this code is more feasible to extend the same. Reviewed-by: Kever Yang <kever.yang@rock-chips.com> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
* arm: rockchip: Add common cru.hJagan Teki2020-01-302-3/+3
| | | | | | | | | | | | | | | | | Few of the rockchip family SoC atleast rk3288, rk3399 are sharing some cru register bits so adding common code between these SoC families would require to include both cru include files that indeed resulting function declarations error. So, create a common cru include as cru.h then include the rk3399 arch cru include file and move the common cru register bit definitions into it. The rest of rockchip cru files will add it in future. Reviewed-by: Kever Yang <kever.yang@rock-chips.com> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
* common: Move some board functions out of common.hSimon Glass2019-12-021-0/+1
| | | | | | | A number of board function belong in init.h with the others. Move them. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* ram: rockchip: rename sdram_common.c/h to sdram.cKever Yang2019-11-171-1/+1
| | | | | | | | | | rename sdram_common.c in arch/arm/mach-rockchip to sdram.c; so that we can use the file name sdram_common.c in dram driver for better understand the code; clean the related file who has use the header file at the same time. Signed-off-by: YouMin Chen <cym@rock-chips.com> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
* rockchip: firefly-rk3288: Enable TPL supportKever Yang2019-11-101-0/+1
| | | | | | | This patch enable TPL support for firefly-rk3288 board, which works ths same way with other RK3288 board like Tinker, evb. Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
* rockchip: adding the missing "/" in entries of boot_devicesLevin Du2019-11-101-2/+2
| | | | | | | | | | | | | | | | | | Without the prefix, "same-as-spl" in `u-boot,spl-boot-order` will not work as expected. When board_boot_order() `spl-boot-order.c` meets "same-as-spl", it gets the conf by looking the boot_devices table by boot source, and parse the node by the conf with: node = fdt_path_offset(blob, conf); which will failed without the "/" indicating the path. Currently only entries of boot_devices in rk3399 have the "/" prefix. Therefore add the missing ones in other boards. Signed-off-by: Levin Du <djw@t-chip.com.cn> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
* rockchip: rk3288: vyasa: Drop ROCKCHIP_BROM_HELPER selectionJagan Teki2019-09-191-1/+0
| | | | | | | | | | | ROCKCHIP_BROM_HELPER is selected as if TPL/SPL ROCKCHIP_BACK_TO_BROM has been defined, so drop the explicit enablement for vyasa board. This change is supposed to missed during config move to other locations, and missed to drop the same. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Kever Yang<kever.yang@rock-chips.com>
* rockchip: rk3288: remove fennec board supportKever Yang2019-08-231-2/+0
| | | | | | Since there is no one using this board, remove it. Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
* env: Move env_set() to env.hSimon Glass2019-08-111-0/+1
| | | | | | | Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
* rockchip: rk3288: Move rk3288_detect_reset_reason to soc fileKever Yang2019-07-291-0/+49
| | | | | | | | | The rk3288_detect_reset_reason() is per-SoC operation, move it to rk3288.c, and extend the rk_board_late_init() with rk3288_board_late_init() to make all the board works fine as before. Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
* rockchip: rk3288: Move clock CMD to SoC fileKever Yang2019-07-291-0/+55
| | | | | | | Move the do_clock CMD to rk3288.c so that we can re-use the common board file later. Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
* rockchip: rk3288: move SOC setting into arch_cpu_init()Kever Yang2019-07-291-0/+28
| | | | | | Qos setting and emmc relate SoC setting should go to arch_cpu_init(). Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
* rockchip: sdram_common: add common dram_init_banksizeKever Yang2019-07-291-15/+0
| | | | | | | dram_init_banksize() can be common used by all SoCs, move it into sdram_common.c Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
* rockchip: rk3288: add boot_devices mapping to support 'same-as-spl'Kever Yang2019-07-291-0/+6
| | | | | | The driver need a mapping to get the dts node by boot srouce ID. Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
* rockchip: rk3288: move dram_init_banksize() into soc fileKever Yang2019-07-291-0/+19
| | | | | | | Mov edram_init_banksize() into rk3288.c so that we can re-use the common SPL board file later. Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
* rockchip: rk3288-phycore: move phycore_init() to its own board fileKever Yang2019-07-291-0/+1
| | | | | | | phycore_init() is use for phycore board only, it should be move back to phycore-rk3288.c Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
* rockchip: rk3288: move setup_led() to firefly-rk3288Kever Yang2019-07-291-0/+1
| | | | | | | | Only firefly-rk3288 has the dts node "u-boot,boot-led", while CONFIG_SPL_LED is not enable, move code to firefly-rk3288 now in case someone need this code. Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
* rockchip: rk3288: enable TPL for evb-rk3288Kever Yang2019-07-201-0/+1
| | | | | | | Enable TPL for evb-rk3288 so that we can have a free size limited SPL. Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
* rockchip: rk3288: add default TPL_LDSCRIPT value in KconfigKever Yang2019-07-201-0/+3
| | | | | | | We share the same TPL_LDSCRIPT for all rk3288 board, add default value in Kconfig. Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
* rockchip: rk3288: move configure_l2ctlr back to rk3288Kever Yang2019-07-201-0/+22
| | | | | | | The configure_l2ctlr() is used only by rk3288, do not need to locate in sys_proto.h Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
* rockchip: rk3288: add arch_cpu_init in splKever Yang2019-07-201-0/+4
| | | | | | | | | Add arch_cpu_init() in SPL for soc related init, and move configure_l2ctlr() into it. The arch_cpu_init() only need to run once, so no need to run in TPL. Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
* rockchip: rk3288: use default value for SYS_MALLOC_F_LENKever Yang2019-07-201-1/+1
| | | | | | | There is no difference in rk3288 board use for SYS_MALLOC_F_LEN, so we can use default value. Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
* rockchip: Kconfig: move ROCKCHIP_BOOT_MODE_REG to soc KconfigKever Yang2019-07-201-0/+3
| | | | | | | | Rockchip SoCs have different ROCKCHIP_BOOT_MODE_REG value, move it to SoC's own Kconfig, and add address for rk3128 and rk3328 so that all SoCs have available address. Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
* rockchip: Kconfig: move rk3288 config into its KconfigKever Yang2019-07-201-0/+9
| | | | | | | Each SoC have its config setting and its Kconfig, move the specific setting to its own Kconfig file. Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
* rockchip: fixup board choice in KconfigKever Yang2019-07-201-0/+5
| | | | | | | Kconfig for board target select is choice option, fixup for rk3036, rk3288 and rv1108. Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
* rockchip: rk3288: enable TPL for tinker-boardKever Yang2019-07-021-0/+1
| | | | | | All the config for TPL has been update, we can enable the TPL. Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
* rockchip: rk3288: enable TPL configs to chip levelKever Yang2019-07-021-14/+0
| | | | | | | More boards other than vyasa needs TPL, so enable the TPL configs at chip level instead of board level. Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
* rockchip: rk3288: add board_debug_uart_init()Kever Yang2019-05-011-0/+13
| | | | | | | | | | Use board_debug_uart_init() for UART iomux init instead of do it in board_init_f, and move the function to soc file so that we can find all the soc/board setting in soc file and use a common board file for all rockchip SoCs later. Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
* rockchip: rk3288: use grf structure to access soc_con2Kever Yang2019-05-011-2/+4
| | | | | | | Prefer to use structure to access register if we can. Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
* rockchip: correct ARCH_SOC nameKever Yang2019-05-011-1/+1
| | | | | | | | | | The ARCH_SOC name default as 'rockchip' and we put all the header file in 'arch/arm/include/asm/arch-rockchip/', but the 'rockchip' is not the SOC name, let's correct it after we update all the source file. Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Philipp Tomsiich <philipp.tomsich@theobroma-systems.com>
* rockchip: use 'arch-rockchip' as header file pathKever Yang2019-05-013-4/+4
| | | | | | | | Rockchip use 'arch-rockchip' instead of arch-$(SOC) as common header file path, so that we can get the correct path directly. Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
* rockchip: add support for veyron-speedy (ASUS Chromebook C201)Marty E. Plummer2019-02-011-0/+11
| | | | | | | | | | | This adds support for the ASUS C201, a RK3288-based clamshell device. The device tree comes from linus's linux tree at 3f16503b7d2274ac8cbab11163047ac0b4c66cfe. The SDRAM parameters are for 4GB Samsung LPDDR3, decoded from coreboot's src/mainboard/google/veyron/sdram_inf/sdram-lpddr3-samsung-4GB.inc Signed-off-by: Marty E. Plummer <hanetzer@startmail.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
* linker: Modify linker scripts to be more genericTom Rini2019-01-261-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | Make use of "IMAGE_MAX_SIZE" and "IMAGE_TEXT_BASE" rather than CONFIG_SPL_MAX_SIZE and CONFIG_SPL_TEXT_BASE. This lets us re-use the same script for both SPL and TPL. Add logic to scripts/Makefile.spl to pass in the right value when preprocessing the script. Cc: Stefano Babic <sbabic@denx.de> Cc: Fabio Estevam <fabio.estevam@nxp.com> Cc: Jagan Teki <jagan@openedev.com> Cc: Maxime Ripard <maxime.ripard@bootlin.com> Cc: Andreas Bießmann <andreas@biessmann.org> Cc: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Cc: Michal Simek <monstr@monstr.eu> Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Cc: York Sun <york.sun@nxp.com> Cc: Bin Meng <bmeng.cn@gmail.com> Cc: Heiko Schocher <hs@denx.de> Cc: Adam Ford <aford173@gmail.com> Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Tested-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Tested-by: Adam Ford <aford173@gmail.com> #da850evm & omap3_logic_somlv Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
* Kconfig: Sort bool, default, select and imply optionsMichal Simek2018-07-301-10/+10
| | | | | | | | | Another round of sorting Kconfig entries aplhabetically. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Tom Rini <trini@konsulko.com> Acked-by: Alexey Brodkin <abrodkin@synopsys.com> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
* SPDX: Convert all of our single license tags to Linux Kernel styleTom Rini2018-05-074-8/+4
| | | | | | | | | | | | | | | | | | | | When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
* rockchip: rk3288: Add TPL_LDSCRIPTJagan Teki2018-02-241-0/+10
| | | | | | | | | | Due to size limitations in SPL by adding falcon mode, rk3288 support TPL. In order to not overlap SPL_TEXT_BASE add TPL_TEXT_BASE with u-boot-tpl.lds that intern call u-boot-spl.lds with proper TEXT_BASE values. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
* rk3288: vyasa: Add TPL supportJagan Teki2017-10-011-0/+16
| | | | | | | | | | | | | Since the size of SPL can't be exceeded 0x8000 bytes in RK3288, it is not possible add new SPL features like Falcon mode or etc. So add TPL stage so-that adding new features to SPL is possible. - TPL: DRAM init, clocks - SPL: MMC, falcon, etc Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
* rockchip: rk3288: move sdram driver to driver/ramKever Yang2017-10-012-1126/+0
| | | | | | | | | Since we have CONFIG_RAM framwork and its driver folder, move the driver into it. Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
* rk3288: Add Vyasa initial board supportJagan Teki2017-09-181-0/+11
| | | | | | | | | | This patch adds support for Vyasa RK3288 initial board from Amarula Solutions. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
* rockchip: Add basic support for phyCORE-RK3288 SoM based carrier boardWadim Egorov2017-07-111-0/+10
| | | | | | | | | | | | | | | | | | | | | 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>
* rockchip: use common sdram functionKever Yang2017-07-111-55/+11
| | | | | | | | | | Replace the sdram_init() in board init and rockchip_sdram_size() in sdram driver for all the Rockchip SoCs which enable CONFIG_RAM. Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Make dram_init() in rk3036-board.c conditional on CONFIG_RAM: Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
* rockchip: dm: convert fdt_get to dev_readPhilipp Tomsich2017-07-111-11/+9
| | | | | | | | | | | | | With the new dev_read functions available, we can convert the rockchip architecture-specific drivers and common drivers used by these devices over to the dev_read family of calls. This covers the DRAM controller initialisation for the RK3188, RK3288 and RK3399... all of these read some of the tuning/setup/timing parameters from the device-tree. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* power: rk808: rename to rk8xxJacob Chen2017-05-101-3/+3
| | | | | | | | | Since this driver can be used for rk8xx series pmic, let's rename rk808 to rk8xx, to make it clear. Configs parts are done by sed -i "s/RK808/RK8XX/g" `grep RK808 -lr ./` Signed-off-by: Jacob Chen <jacob-chen@iotwrt.com>