summaryrefslogtreecommitdiff
path: root/arch/arm/mach-rockchip/rk3288
AgeCommit message (Collapse)AuthorFilesLines
2020-02-06dm: core: Create a new header file for 'compat' featuresSimon Glass1-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>
2020-02-06dm: core: Require users of devres to include the headerSimon Glass2-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>
2020-01-30rockchip: Add common reset causeJagan Teki1-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>
2020-01-30arm: rockchip: Add common cru.hJagan Teki2-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>
2019-12-03common: Move some board functions out of common.hSimon Glass1-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>
2019-11-17ram: rockchip: rename sdram_common.c/h to sdram.cKever Yang1-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>
2019-11-10rockchip: firefly-rk3288: Enable TPL supportKever Yang1-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>
2019-11-10rockchip: adding the missing "/" in entries of boot_devicesLevin Du1-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>
2019-09-19rockchip: rk3288: vyasa: Drop ROCKCHIP_BROM_HELPER selectionJagan Teki1-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>
2019-08-23rockchip: rk3288: remove fennec board supportKever Yang1-2/+0
Since there is no one using this board, remove it. Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2019-08-11env: Move env_set() to env.hSimon Glass1-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>
2019-07-29rockchip: rk3288: Move rk3288_detect_reset_reason to soc fileKever Yang1-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>
2019-07-29rockchip: rk3288: Move clock CMD to SoC fileKever Yang1-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>
2019-07-29rockchip: rk3288: move SOC setting into arch_cpu_init()Kever Yang1-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>
2019-07-29rockchip: sdram_common: add common dram_init_banksizeKever Yang1-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>
2019-07-29rockchip: rk3288: add boot_devices mapping to support 'same-as-spl'Kever Yang1-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>
2019-07-29rockchip: rk3288: move dram_init_banksize() into soc fileKever Yang1-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>
2019-07-29rockchip: rk3288-phycore: move phycore_init() to its own board fileKever Yang1-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>
2019-07-29rockchip: rk3288: move setup_led() to firefly-rk3288Kever Yang1-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>
2019-07-20rockchip: rk3288: enable TPL for evb-rk3288Kever Yang1-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>
2019-07-20rockchip: rk3288: add default TPL_LDSCRIPT value in KconfigKever Yang1-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>
2019-07-20rockchip: rk3288: move configure_l2ctlr back to rk3288Kever Yang1-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>
2019-07-20rockchip: rk3288: add arch_cpu_init in splKever Yang1-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>
2019-07-20rockchip: rk3288: use default value for SYS_MALLOC_F_LENKever Yang1-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>
2019-07-20rockchip: Kconfig: move ROCKCHIP_BOOT_MODE_REG to soc KconfigKever Yang1-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>
2019-07-20rockchip: Kconfig: move rk3288 config into its KconfigKever Yang1-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>
2019-07-20rockchip: fixup board choice in KconfigKever Yang1-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>
2019-07-02rockchip: rk3288: enable TPL for tinker-boardKever Yang1-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>
2019-07-02rockchip: rk3288: enable TPL configs to chip levelKever Yang1-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>
2019-05-01rockchip: rk3288: add board_debug_uart_init()Kever Yang1-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>
2019-05-01rockchip: rk3288: use grf structure to access soc_con2Kever Yang1-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>
2019-05-01rockchip: correct ARCH_SOC nameKever Yang1-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>
2019-05-01rockchip: use 'arch-rockchip' as header file pathKever Yang3-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>
2019-02-01rockchip: add support for veyron-speedy (ASUS Chromebook C201)Marty E. Plummer1-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>
2019-01-27linker: Modify linker scripts to be more genericTom Rini1-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>
2018-07-30Kconfig: Sort bool, default, select and imply optionsMichal Simek1-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>
2018-05-07SPDX: Convert all of our single license tags to Linux Kernel styleTom Rini4-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>
2018-02-24rockchip: rk3288: Add TPL_LDSCRIPTJagan Teki1-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>
2017-10-01rk3288: vyasa: Add TPL supportJagan Teki1-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>
2017-10-01rockchip: rk3288: move sdram driver to driver/ramKever Yang2-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>
2017-09-18rk3288: Add Vyasa initial board supportJagan Teki1-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>
2017-07-11rockchip: Add basic support for phyCORE-RK3288 SoM based carrier boardWadim Egorov1-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>
2017-07-11rockchip: use common sdram functionKever Yang1-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>
2017-07-11rockchip: dm: convert fdt_get to dev_readPhilipp Tomsich1-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>
2017-05-10power: rk808: rename to rk8xxJacob Chen1-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>
2017-04-05rockchip: Add support for MiQi rk3288 boardJernej Skrabec1-0/+11
MiQi is rk3288 based development board with 1 or 2 GB SDRAM, 16 GB eMMC, micro SD card interface, 4 USB 2.0 ports, HDMI, gigabit Ethernet and expansion ports. Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net> Reviewed-by: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Eddie Cai <eddie.cai.linux@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
2017-04-05rockchip: cosmetic: Sort RK3288 boardsJernej Skrabec1-45/+45
Sort rk3288 boards in alphabetical order. Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net> Reviewed-by: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Eddie Cai <eddie.cai.linux@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
2017-03-17rockchip: rk3288: sdram: style fixes from rk3188 sdram reviewHeiko Stübner1-28/+31
The sdram IP blocks used on rk3066, rk3188 and rk3288 are very similar and we want to unify things once all 3 work as expected. Therefore try to keep the rk3288 sdram driver in line by applying the general review comments received for the rk3188 variant to it as well. Signed-off-by: Heiko Stuebner <heiko@sntech.de> Acked-by: Simon Glass <sjg@chromium.org>
2017-03-17rockchip: rk3288: sdram: use constants in ddrconf tableHeiko Stübner1-10/+10
Use defines to describe the bit shifts used to create the table for ddrconf register values. Signed-off-by: Heiko Stuebner <heiko@sntech.de> Acked-by: Simon Glass <sjg@chromium.org>
2017-02-09rockchip: rename miniarm to tinker boardEddie Cai1-5/+5
Miniarm is the internal project code. Now it is officially named Tinker board. So rename it. Signed-off-by: Eddie Cai <eddie.cai@rock-chips.com> Reviewed-by: Simon Glass <sjg@chromium.org>