summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-10-01rockchip: puma-rk3399: update board_init()Philipp Tomsich
The original initialisation code for board_init() was largely lifted from the code on the EVB. However, the RK3399-Q7 can do with a much more concise init sequence. This cleans up the board_init() by updating it to the essentials for the RK3399-Q7 and getting rid of the accumulated cruft. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-10-01rockchip: dts: rk3399-puma: add 'same-as-spl' to the front of the boot-orderPhilipp Tomsich
In the general case, we want to continue booting the full U-Boot (contained in a discoverable FIT image) from the same device the SPL stage was loaded from. This prepends the 'same-as-spl' specifier to our configurable boot-order to make this the default behaviour. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-10-01rockchip: spl: rk3399: implement chip-specific board_spl_was_booted_from()Philipp Tomsich
To support the new "same-as-spl" specifier in the boot-order on the RK3399, this implements the chip-specific mapping from the information obtainable from the BROM to a OF path name. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-10-01rockchip: spl: support a 'same-as-spl'-specifier in the spl-boot-orderPhilipp Tomsich
It is often desirable to configure the spl-boot-order (i.e. the order that SPL probes devices to find the FIT image containing a full U-Boot) such that it contains 'the same device the SPL stage was booted from' early on. To support this, we introduce the 'same-as-spl' specifier for the spl-boot-order property. This commit adds: - documentation for the new board_spl_was_booted_from() function that individual SoCs/boards should provide, if they can determine where the SPL was booted from - implements the new board_spl_was_booted_from() stub function - adds support for handling the 'same-as-spl' specifier and calling into the per-SoC/per-board support code. This also updates the documentation for the 'u-boot,spl-boot-order' property. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-10-01rockchip: spl: add documentation for spl_node_to_boot_device()Philipp Tomsich
In the expectation that the spl-boot-order code will eventually gain use outside of mach-rockchip: let's add documentation on the spl_node_to_boot_device() function, which is likely to become a publicly exported function. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-10-01rockchip: bootrom: add definitions to retrieve BROM boot-sourcePhilipp Tomsich
The Rockchip BROM allows reading where it booted from from SRAM. This adds the necessary definitions (as received from Kever) for the location of this information in the RK3399's SRAM and naming for the constants used. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-10-01rockchip: rk3399: make spl_board_init board-specificPhilipp Tomsich
The later-stage spl_board_init (as opposed to board_init_f) should set up board-specific details: these differ between the EVB-RK3399 and the RK3399-Q7 (Puma). This moves spl_board_init back into the individual boards and removes the unneeded functionality from Puma. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-10-01evb-rk3399: avoid redefinition of CONFIG_ENV_OFFSETHeinrich Schuchardt
CONFIG_ENV_OFFSET is already defined in include/configs/rockchip-common.h For CONFIG_ROCKCHIP_BACK_TO_BROM=y we redefine CONFIG_ENV_OFFSET to an unsuitable value. We were lucky to get a compiler warning. Remove the incorrect redefinition. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-10-01rockchip: rk322x: update the sysreg number for boot modeKever Yang
The boot mode for rk322x is stored in sysreg 0, update 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-10-01rockchip: dts: rk3328-evb: add i2c1 and rk805 nodesElaine Zhang
add i2c1 and rk805 nodes to support rk805 init setting. Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com> 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-10-01configs: rk3328: add support for pmic rk8xx and regulator and i2c driverElaine Zhang
Add defconfig for rk8xx and regulator and i2c controller. Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com> 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-10-01rockchip: i2c: rk3328: support i2c for rk3328 SoCElaine Zhang
Add compatible to support rk3328 i2c Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com> 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> Acked-by: Heiko Schocher<hs@denx.de>
2017-10-01rockchip: pinctrl: rk3368: add pinctrl for SDMMC0Philipp Tomsich
Apparently, our earlier assumption that the BROM will always set up the iomux for SDcard communication does not always hold true: when booting U-Boot from the on-module (on the RK3368-uQ7) eMMC, the SDcard pins are not set up and need to be configured by the pinctrl driver to allow SD card access. This change implements support for setting up the SDMMC pins in pinctrl for the RK3368. Reported-by: Klaus Goger <klaus.goger@theobroma-systems.com> Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-10-01rockchip: board: lion-rk3368: avoid ATF overwriting active SPL stagePhilipp Tomsich
The RK3368-uQ7 ATF has been moved back to 0x100000 (1MB from the start of DRAM) to avoid it overwriting the active SPL stage during FIT image loading. This change adapts the .its to match up (again) with our ATF repository for the RK3368-uQ7. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-10-01rk3288: vyasa: Add falcon mode supportJagan Teki
Add Falcon mode support in vyasa rk3288 board. 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-01rk3288: vyasa: Add TPL supportJagan Teki
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-01armv7: rk3288: Move configure_l2ctlr to commonJagan Teki
configure_l2ctlr will be shared between SPL and TPL so move them into asm/arch/sys_proto.h Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-10-01armv7: Move L2CTLR read/write to commonJagan Teki
L2CTLR read/write functions are common to armv7 so, move them in to include/asm/armv7.h and use them where ever it need. Cc: Tom Warren <twarren@nvidia.com> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> [Backed out the change to arch/arm/mach-tegra/cache.c:] Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-10-01rockchip: rk322x: fix pd_bus hclk/pclkKever Yang
The pd_bus hclk/pclk source is pd_bus aclk, not the PLL. 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-10-01rockchip: mkimage: add support for rk3128 socKever Yang
Add support for rk3128 package header in mkimage tool. Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-10-01rockchip: rk3036: fix grf macro defineKever Yang
Some of macros definition are not correct, fix them according to TRM. Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-10-01rockchip: clk: fix typo in rk322x clock driverKever Yang
Fix typo RK322X/RK3036 in rk322x clock driver. Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-10-01rockchip: rk3399: spl: convert to using BOOT_DEVICE_BOOTROMPhilipp Tomsich
Instead of directly calling into the back-to-bootrom code, the RK3399 common SPL implementation now uses BOOT_DEVICE_BOOTROM to trigger a transfer back into the bootrom. With this factored out, the spl_board_init function can not be customised for each RK3399 board. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-10-01rockchip: lion-rk3368: defconfig: remove duplicate CONFIG_ENV_IS_IN_MMCPhilipp Tomsich
Remove a duplicate CONFIG_ENV_IS_IN_MMC assignment for the lion-rk3368 defconfig. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-10-01rockchip: rk3188: ram: add support for 16bit row addressKever Yang
RK3188 using the same ddr_conf for both 15 bit and 16 bit row address. 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> [Fixed compile-error by declaring 'row':] Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-10-01rockchip: dts: rk3229: remove dram channel infoKever Yang
The dram channel info will be auto detect by the driver, we do not need it. Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2017-10-01rockchip: rk322x: add sdram driverKever Yang
Add driver for rk322x to support sdram initialize in SPL. 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-10-01rockchip: rk3328: move sdram driver to driver/ramKever Yang
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-10-01rockchip: rk3288: move sdram driver to driver/ramKever Yang
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-10-01rockchip: rk3188: move sdram driver to driver/ramKever Yang
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-10-01rockchip: rk3399: move sdram driver to driver/ramKever Yang
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-10-01rockchip: imply ADC and SARADC_ROCKCHIP for Rockchip SOCsPhilipp Tomsich
Enable the Rockchip SARADC driver for all Rockchip SoCs. Note that the SARADC peripheral is available on all SoCs except the RK3036 and RK3228. However, as this is a DM-driver, enabling by default will not cause any function problems (and can always be changed from defconfig, if size is a concern). Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: David Wu <david.wu@rock-chips.com>
2017-10-01rockchip: dts: Enable SARADC for rk3399-evbDavid Wu
Enable the SARADC for download key pressed detect. Signed-off-by: David Wu <david.wu@rock-chips.com> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-10-01rockchip: dts: Enable SARADC for rk3368-sheepDavid Wu
Enable the SARADC for download key pressed detect. Signed-off-by: David Wu <david.wu@rock-chips.com> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-10-01rockchip: dts: Enable SARADC for rk3368-px5-evbDavid Wu
Enable the SARADC for download key pressed detect. Signed-off-by: David Wu <david.wu@rock-chips.com> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-10-01rockchip: dts: Enable SARADC for rk3328-evbDavid Wu
Enable the SARADC for download key pressed detect. Signed-off-by: David Wu <david.wu@rock-chips.com> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-10-01rockchip: dts: Enable SARADC for rk3288-popmetalDavid Wu
Enable the SARADC for download key pressed detect. Signed-off-by: David Wu <david.wu@rock-chips.com> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-10-01rockchip: dts: Enable SARADC for rv1108-evbDavid Wu
Enable the SARADC for download key pressed detect. Signed-off-by: David Wu <david.wu@rock-chips.com> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-10-01rockchip: dts: rv1108: Add SARADC node at dtsi levelDavid Wu
Signed-off-by: David Wu <david.wu@rock-chips.com> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-10-01rockchip: clk: Add rk3399 SARADC clock supportDavid Wu
The clk_saradc is dividing from the 24M, clk_saradc=24MHz/(saradc_div_con+1). SARADC integer divider control register is 8-bits width. Signed-off-by: David Wu <david.wu@rock-chips.com> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-10-01rockchip: clk: Add rk3368 SARADC clock supportDavid Wu
The clk_saradc is dividing from the 24M, clk_saradc=24MHz/(saradc_div_con+1). SARADC integer divider control register is 8-bits width. Signed-off-by: David Wu <david.wu@rock-chips.com> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-10-01rockchip: clk: Add rk3328 SARADC clock supportDavid Wu
The clk_saradc is dividing from the 24M, clk_saradc=24MHz/(saradc_div_con+1). SARADC integer divider control register is 10-bits width. Signed-off-by: David Wu <david.wu@rock-chips.com> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-10-01rockchip: clk: Add SARADC clock support for rk3288David Wu
The clk_saradc is dividing from the 24M, clk_saradc=24MHz/(saradc_div_con+1). SARADC integer divider control register is 8-bits width. Signed-off-by: David Wu <david.wu@rock-chips.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-10-01rockchip: clk: Add rv1108 SARADC clock supportDavid Wu
The clk_saradc is dividing from the 24M, clk_saradc=24MHz/(saradc_div_con+1). SARADC integer divider control register is 10-bits width. Signed-off-by: David Wu <david.wu@rock-chips.com> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-10-01dm: adc: Add driver for Rockchip SARADCDavid Wu
The ADC can support some channels signal-ended some bits Successive Approximation Register (SAR) A/D Converter, like 6-channel and 10-bit. It converts the analog input signal into some bits binary digital codes. Signed-off-by: David Wu <david.wu@rock-chips.com> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-09-29env: ti: boot: Show boot status informationSam Protsenko
Add tracing printings to Linux/Android boot commands, so that we can see what's going on. Helps to trace possible bugs on early stages and improves the output for user (which is especially useful, because we have a bunch of boot commands executing one by one). Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2017-09-29env: ti: boot: Extract command for eMMC Linux bootSam Protsenko
Extract commands for booting Linux from eMMC to separate command. It seems more logical that way, and allows us to run the whole command set from U-Boot shell with only one command. Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2017-09-29arm: dra7xx: Fix Linux boot from eMMCSam Protsenko
Right now on OMAP5-based boards we have only one partition defined for Linux boot, which is rootfs. That doesn't work with bootpart=1:2 (that is defined in include/environment/ti/boot.h). To fix Linux boot we may either: 1. Change bootpart to be 1:1 2. Or add preceding partition, so that rootfs is actually 1:2 Second choice seems more reasonable, as DFU is already using similar partition table and can rely on bootpart to be 1:2. This patch adds "bootloader" partition. So now eMMC layout for Linux boot looks like this: offset content size partition (KiB) (KiB) Reviewed-by: Tom Rini <trini@konsulko.com> ======================================================================= 0 +--------------------------------+ | MBR/GPT header | 128 - 128 +--------------------------------+ | MLO | 256 - 384 +--------------------------------+ | u-boot.img | 1792 bootloader 2176 +--------------------------------+ | //////////// hole //////////// | 256 - 2432 +--------------------------------+ | U-Boot environment | 128 - 2560 +--------------------------------+ | U-Boot environment (redundant) | 128 - 2688 +--------------------------------+ | rootfs | remaining rootfs end +--------------------------------+ ======================================================================= Guard hole appears because U-Boot environment offset was calculated for Android partition table, which has two additional partitions in place of that hole ("environment" and "misc" partitions). This patch also changes rootfs offset from 2 MiB further to 2688 KiB, so that there won't be any collisions with U-Boot environment when we flash rootfs. Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
2017-09-29arm: am57xx: Fix Linux boot from eMMCSam Protsenko
Right now on OMAP5-based boards we have only one partition defined for Linux boot, which is rootfs. That doesn't work with bootpart=1:2 (that is defined in include/environment/ti/boot.h). To fix Linux boot we may either: 1. Change bootpart to be 1:1 2. Or add preceding partition, so that rootfs is actually 1:2 Second choice seems more reasonable, as DFU is already using similar partition table and can rely on bootpart to be 1:2. This patch adds "bootloader" partition. So now eMMC layout for Linux boot looks like this: offset content size partition (KiB) (KiB) Reviewed-by: Tom Rini <trini@konsulko.com> ======================================================================= 0 +--------------------------------+ | MBR/GPT header | 128 - 128 +--------------------------------+ | MLO | 256 - 384 +--------------------------------+ | u-boot.img | 1792 bootloader 2176 +--------------------------------+ | //////////// hole //////////// | 256 - 2432 +--------------------------------+ | U-Boot environment | 128 - 2560 +--------------------------------+ | U-Boot environment (redundant) | 128 - 2688 +--------------------------------+ | rootfs | remaining rootfs end +--------------------------------+ ======================================================================= Guard hole appears because U-Boot environment offset was calculated for Android partition table, which has two additional partitions in place of that hole ("environment" and "misc" partitions). This patch also changes rootfs offset from 2 MiB further to 2688 KiB, so that there won't be any collisions with U-Boot environment when we flash rootfs. Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
2017-09-29arm: dts: omap3: sync DTS with Linux 4.14-rc1Karthik Tummala
This re-syncs omap3 DTS file with current file from Linux v4.14-rc1 to ensure a consistent configuration. Upstream Linux removed the redundant Interrupt-parent property from usbhsohci, usbhsehci, ssi_port1 and ssi_port2 sub nodes. Signed-off-by: Karthik Tummala <karthik@techveda.org>