Commit Graph

42833 Commits

Author SHA1 Message Date
Chen-Yu Tsai
fab03e30e6 sunxi: Provide defaults for R40 DRAM settings
These values were taken from the Banana Pi M2 Ultra fex file
found in the released vendor BSP. This is the only publicly
available R40 device at the time of this writing.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-04-20 13:30:01 +02:00
Chen-Yu Tsai
328ce7fd50 sunxi: Set PLL lock enable bits for R40
According to the BSP released by Banana Pi, the R40 (sun8iw11p1) has
an extra "PLL lock control" register in the CCU, which controls whether
the individual PLL lock status bits in each PLL's control register work
or not.

This patch enables it for all the PLLs.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-04-20 13:30:01 +02:00
Chen-Yu Tsai
8094a4a20b sunxi: Add mmc[1-3] pinmux settings for R40
The PIO is generally compatible with the A20, except that it routes the
full 8 bits and eMMC reset pins for mmc2.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-04-20 13:30:00 +02:00
Chen-Yu Tsai
6c7ae2bfc9 sunxi: Fix watchdog reset function for R40
The watchdog found on the R40 SoC is the older variant found on the A20.
Add the proper "#if defines" to make it work.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-04-20 13:30:00 +02:00
Chen-Yu Tsai
409677ec17 sunxi: Enable AXP221s in I2C mode with the R40 SoC
The R40 SoC uses the AXP221s in I2C mode to supply power.

Some regulator's common usages have changed, and also the recommended
voltage for existing usages have changed. Update the defaults to match.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-04-20 13:30:00 +02:00
Chen-Yu Tsai
379febac5a sunxi: Add initial support for R40
The R40 is the successor to the A20. It is a hybrid of the A20, A33
and the H3.

The R40's PIO controller is compatible with the A20,
Reuse the A20 UART and I2C muxing code by adding the R40's macro.

The display pipeline is the newer DE 2.0 variant.
Block enabling video on R40 for now.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-04-20 13:30:00 +02:00
Chen-Yu Tsai
301791c9b0 sunxi: Split up long Kconfig lines
Currently we have some lines in board/sunxi/Kconfig that are very long.
These line either provide default values for a set of SoCs, or limit
some option to a subset of sunxi SoCs.

Fortunately Kconfig makes it easy to split them. The Kconfig language
document states

    If multiple dependencies are defined, they are connected with '&&'.

This means we can split existing dependencies at "&&" symbols. This
applies to both the "depends on" lines and "if" expressions.

This patch splits them up to one symbol per line. This will make it
easier to add, remove, or modify one item at a time.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-04-20 13:30:00 +02:00
Mylène Josserand
7095f86418 sunxi: Convert CONS_INDEX to Kconfig
Convert the CONS_INDEX configuration to Kconfig.
Update sunxi's defconfigs to remove SYS_EXTRA_OPTIONS variable not
needed anymore.
Default value is 1 except for sun5i (equals 2) and sun8i (equals 5).

Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com>
[Maxime: Added a depends on ARCH_SUNXI to avoid build breakages]
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-04-20 13:20:32 +02:00
Mylène Josserand
f5fd78860a sunxi: Convert CONFIG_MACPWR to Kconfig
Convert the CONFIG_MACPWR to Kconfig and update all the sunxi defconfigs
that used it in SYS_EXTRA_OPTIONS.

Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-04-20 13:20:31 +02:00
Mylène Josserand
d7b560e665 sunxi: Convert CONFIG_SATAPWR to Kconfig
Convert the CONFIG_SATAPWR into kconfig.
Thanks to that, many SYS_EXTRA_OPTIONS can be removed from some
defconfigs.

Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-04-20 13:20:31 +02:00
Mylène Josserand
751b0be0a1 sunxi: Convert CONFIG_RGMII to Kconfig
Convert CONFIG_RGMII to Kconfig. Thanks to that, it is possible to
update defconfig files of SYS_EXTRA_OPTIONS accordingly and
remove it when it is possible.

Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-04-20 13:20:29 +02:00
Mylène Josserand
abc3e4df59 sunxi: Convert SUNXI_EMAC to Kconfig
Convert the SUNXI_EMAC config to Kconfig. Remove it from SYS_EXTRA_OPTIONS
from many sunxi defconfig and renamed it into SUN4I_EMAC to not confuse it
with SUN8I_EMAC.

Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-04-20 13:19:59 +02:00
Mylène Josserand
261f3deeb3 sunxi: mk802_defconfig: Remove SYS_EXTRA_OPTIONS
The USB_EHCI configuration is already set in this defconfig
using kconfig's config. This configuration in SYS_EXTRA_OPTIONS
must be removed and so the SYS_EXTRA_OPTIONS.

Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-04-20 13:19:58 +02:00
Mylène Josserand
38495ebaf6 sunxi: icnova-a20-swac_defconfig: Remove CMD_BMP from
This configuration is not necessary in a defconfig file so
it is removed from the SYS_EXTRA_OPTIONS.

Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-04-20 13:19:58 +02:00
Mylène Josserand
e34dc387bd sunxi: icnova-a20-swac_defconfig: Remove AXP209_POWER
Remove the AXP209_POWER option from SYS_EXTRA_OPTIONS.
As this configuration already exists on Kconfig, we just need
to remove it from defconfig.

Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-04-20 13:19:58 +02:00
Mylène Josserand
4d43d065db sunxi: Move SUNXI_GMAC to Kconfig
Move the SUNXI_GMAC config option to Kconfig, remove it
from SYS_EXTRA_OPTIONS and rename it into SUN7I_GMAC.

Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-04-20 13:19:56 +02:00
Jelle van der Waa
27f31aac15 sunxi: Add maintainer of the NanoPi NEO Air
Add myself as maintainer of the NanoPi NEO Air board.

Signed-off-by: Jelle van der Waa <jelle@vdwaa.nl>
Reviewed-by: Jagan Teki <jagan@openedev.com>
2017-04-18 10:50:13 +05:30
Tom Rini
f6c1df44b8 Prepare v2017.05-rc2
Signed-off-by: Tom Rini <trini@konsulko.com>
2017-04-17 18:16:49 -04:00
Tom Rini
af8ef2ed21 Merge git://git.denx.de/u-boot-rockchip 2017-04-16 22:08:13 -04:00
Tom Rini
51f866e8da Merge git://git.denx.de/u-boot-dm 2017-04-16 22:07:52 -04:00
Philipp Tomsich
7ee16de58b rockchip: rk3399: spl: add UART0 support for SPL
The RK3399-Q7 ("Puma") SoM exposes UART0 as the Qseven UART (i.e. the
serial line available via standardised pins on the edge connector and
available on a RS232 connector).

To support boards (such as the RK3399-Q7) that require UART0 as a
debug console, we match CONFIG_DEBUG_UART_BASE and add the appropriate
iomux setup to the rk3399 SPL code.

As we are already touching this code, we also move the board-specific
UART setup (i.e. iomux setup) into board_debug_uart_init(). This will
be called from the debug UART init when CONFIG_DEBUG_UART_BOARD_INIT
is set.

As the RK3399 needs to use its board_debug_uart_init() function, we
have Kconfig enable it by default for RK3399 builds.

With everything set up to define CONFIG_BAUDRATE via defconfig and
with to have the SPL debug UART either on UART0 or UART2, the configs
for the RK3399 EVB are then update (the change for the RK3399-Q7 is
left for later to not cause issues on applying the change).

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
2017-04-15 10:18:29 -06:00
eric.gao@rock-chips.com
d3cf9eb2d8 rockchip: pmic: Enable RK808 for rk3399 evb
For using mipi display, we need to enable lcd3v3
which supplied by rk808,so enable rk808 first.

Signed-off-by: Eric Gao <eric.gao@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
2017-04-15 10:13:17 -06:00
eric.gao@rock-chips.com
b644354a7c rockchip: i2c: Enable i2c for rk3399
To enable mipi display, we need to enable pmic
rk808 first for lcd3v3 power,which use i2c0 to
communicate with soc. So enable i2c0.

Signed-off-by: Eric Gao <eric.gao@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
2017-04-15 10:13:17 -06:00
eric.gao@rock-chips.com
bc8e8fe40b rockchip: rk3399: Add missing sentinel in syscon
when enable PMIC rk808,the system will halt at very
 early stage,log is shown as bellow.

INFO:    plat_rockchip_pmu_init(1211): pd status 3e
INFO:    BL31: Initializing runtime services
INFO:    BL31: Preparing for EL3 exit to normal world
INFO:    Entry point address = 0x200000
INFO:    SPSR = 0x3c9
time 44561b, 0 (<<----Just stop here)

It's caused by the absence of "{ }" in syscon_rk3399.c
,which will lead to memory overflow like below.According
 to Sysmap file ,we can find the function buck_get_value
of rk808 is just follow the compatible struct,the pointer
"of_match" point to "buck_get_value",but it is not a
struct and don't have member of compatible, In this case,
system crash. So,on the face, it looks like that rk808 is
guilty.but he is really innocent.

while (of_match->compatible) { <<----------
    if (!strcmp(of_match->compatible, compat)) {
    *of_idp = of_match;
    return 0;
    }
    of_match++;
}

Signed-off-by: Eric Gao <eric.gao@rock-chips.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Tested-by: Kever Yang <kever.yang@rock-chips.com>
2017-04-15 10:13:17 -06:00
Klaus Goger
a13110a99f rockchip: ARM64: split RK3399-Q7 board off the RK3399-EVB board
The RK3399-Q7 SoM is a Qseven-compatible (70mm x 70mm, MXM-230
connector) system-on-module from Theobroma Systems, featuring the
Rockchip RK3399.

It provides the following feature set:
 * up to 4GB DDR3
 * on-module SPI-NOR flash
 * on-module eMMC (with 8-bit interace)
 * SD card (on a baseboad) via edge connector
 * Gigabit Ethernet w/ on-module Micrel KSZ9031 GbE PHY
 * HDMI/eDP/MIPI displays
 * 2x MIPI-CSI
 * USB
   - 1x USB 3.0 dual-role (direct connection)
   - 2x USB 3.0 host + 1x USB 2.0 (on-module USB 3.0 hub)
 * on-module STM32 Cortex-M0 companion controller, implementing:
   - low-power RTC functionality (ISL1208 emulation)
   - fan controller (AMC6821 emulation)
   - USB<->CAN bridge controller

Note that we use a multi-payload FIT image for booting and have
Cortex-M0 payload in a separate subimage: we thus rely on the FIT
image loader to put it into the SRAM region that ATF expects it in.

Signed-off-by: Klaus Goger <klaus.goger@theobroma-systems.com>
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Fixed build warning on puma-rk3399:
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2017-04-15 10:13:17 -06:00
Philipp Tomsich
faf1afc473 rockchip: dts: rk3399-puma: make the DTS dual-licensed
The RK3399-Q7 (Puma) DTS should (of course) be dual-licensed.
This updates the licensing info in the rk3399-puma.dts.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2017-04-15 10:13:17 -06:00
Heiko Stübner
4e5439ac25 rockchip: sysreset: rk3188: Make sure remap is off on warm-resets
The warm-reset of rk3188 socs keeps the remap setting as it was, so if
it was enabled, the cpu would start from address 0x0 of the sram instead
of address 0x0 of the bootrom, thus making the reset hang.

Therefore make sure the remap is disabled before attempting a warm reset.

Cold reset is not affected by this at all.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Acked-by: Simon Glass <sjg@chromium.org>
2017-04-15 10:13:17 -06:00
Kever Yang
86d012657c rockchip: rk3399: do not use lower address
The lower address is reserved for ATF, do not use it.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
2017-04-15 10:13:17 -06:00
Heiko Stübner
008a610b4c rockchip: rk3188: enable remap function
Most Rockchip socs have the ability to either map the bootrom or a sram
area to the starting address of the cpu by flipping a bit in the GRF.

Newer socs leave this untouched and mapped to the bootrom but the legacy
loaders on rk3188 and before enabled the remap functionality and the
current smp implementation in the Linux kernel also requires it to be
enabled, to bring up secondary cpus.

So to keep smp working in the kernel, mimic the behaviour of the legacy
bootloaders and enable the remap functionality.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Acked-by: Simon Glass <sjg@chromium.org>
2017-04-15 10:13:17 -06:00
Heiko Stübner
6499b1976c rockchip: cosmetic: Move rock board to its correct position
Somehow 43b5c78d8d ("rockchip: cosmetic: Sort RK3288 boards") moved
the rock board in between some rk3288 board, probably as a result of
rebasing.

So move it back to its original position above all rk3288 boards.

Fixes: 43b5c78d8d ("rockchip: cosmetic: Sort RK3288 boards")
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Acked-by: Simon Glass <sjg@chromium.org>
2017-04-15 10:13:17 -06:00
Eddie Cai
1e9d6c159f rockchip: Add USB to the default boot targets
Now that most rockchip SoC based board have usb host support, enable
USB boot targets by default.

Signed-off-by: Eddie Cai <eddie.cai.linux@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
Fixed build errors when CONFIG_CMD_USB not defined:
Signed-off-by: Simon Glass <sjg@chromium.org>
2017-04-15 10:13:17 -06:00
Eddie Cai
bfc664ba8b rockchip: tinker: configs: Add USB, PXE, DHCP to the default boot targets
tinker board support ethernet and usb host, so enable USB, PXE and DHCP support.

Signed-off-by: Eddie Cai <eddie.cai.linux@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
2017-04-15 10:13:17 -06:00
Philipp Tomsich
35d1b6dc08 rockchip: dts: rk3399-puma: disable 'fifo-mode' in sdmmc
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Acked-by: Simon Glass <sjg@chromium.org>
2017-04-15 10:13:17 -06:00
Philipp Tomsich
504b9f1a5f rockchip: spl: rk3399: disable DDR security regions for SPL
The RK3399 hangs during DMA of the Designware MMC controller, when
performing DMA-based transactions in SPL due to the DDR security settings
left behind by the BootROM (i.e. accesses to the first MB of DRAM are
restricted... however, the DMA is likely to target this first MB, as it
transfers from/to the stack).

System security is not affected, as the final security configuration is
performed by the ATF, which is executed after the SPL stage.

With this fix in place, we can now drop 'fifo-mode' in the DTS for the
RK3399-Q7 (Puma).

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
2017-04-15 10:13:17 -06:00
Wenyou Yang
ad46af0e76 board: sama5d3_xplained: Enable early debug UART
Enable the early debug UART to debug problems when an ICE or other
debug mechanism is not available.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
2017-04-14 20:10:35 -06:00
Wenyou Yang
80016f5125 board: sama5d3_xplained: Clean up code
Due to the introduction of the pinctrl and clk driver, and using
device tree files, remove the unneeded hardcoded pin configuration
and clock enabling code from the board file.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
2017-04-14 20:10:35 -06:00
Wenyou Yang
1878804a2b board: sama5d3_xplained: Update to support DM/DT
Update the configuration files to support the device tree and driver
model, so do SPL. The device clock and pins configuration are handled
by the clock and the pinctrl drivers respectively.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Fix build error with sama5d3_xplained_mmc:
Signed-off-by: Simon Glass <sjg@chromium.org>
2017-04-14 20:10:35 -06:00
Wenyou Yang
098d15bc77 board: sama5d3xek: Enable early debug UART
Enable the early debug UART to debug problems when an ICE or other
debug mechanism is not available.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
2017-04-14 20:10:35 -06:00
Wenyou Yang
b6ceefedf7 board: sama5d3xek: Clean up code
Due to the introduction of the pinctrl and clk driver, and using
device tree files, remove the unneeded hardcoded pin configuration
and clock enabling code from the board file.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Remove CONFIG_PHY_MICREL as per previous patch:
Signed-off-by: Simon Glass <sjg@chromium.org>
2017-04-14 20:10:25 -06:00
Wenyou Yang
a97cb06154 board: sama5d3xek: Update to support DM/DT
Update the configuration files to support the device tree and
driver model, so do SPL. The device clock and pins configuration
are handled by the clock and the pinctrl drivers respectively.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Add back CONFIG_PHY_MICREL to prevent a build error:
Signed-off-by: Simon Glass <sjg@chromium.org>
2017-04-14 20:09:28 -06:00
Tom Rini
3fea953698 Merge branch 'master' of git://git.denx.de/u-boot-video 2017-04-14 22:05:17 -04:00
Simon Glass
ffe2052d6e dm: led: Add a new 'led' command
When driver model is used for LEDs, provide a command to allow LED access.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Ziping Chen <techping.chan@gmail.com>
2017-04-14 19:38:57 -06:00
Simon Glass
21c340849d led: Mark existing driver as legacy
The existing 'led' command does not support driver model. Rename it to
indicate that it is legacy code.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Ziping Chen <techping.chan@gmail.com>
2017-04-14 19:38:57 -06:00
Simon Glass
53378dac8d dm: led: Add support for blinking LEDs
Allow LEDs to be blinked if the driver supports it. Enable this for
sandbox so that the tests run.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Ziping Chen <techping.chan@gmail.com>
2017-04-14 19:38:57 -06:00
Simon Glass
9413ad4f0d dm: led: Support toggling LEDs
Add support for toggling an LED into the uclass interface. This can be
efficiently implemented by the driver.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Ziping Chen <techping.chan@gmail.com>
2017-04-14 19:38:57 -06:00
Simon Glass
8f4b612333 dm: led: Add support for getting the state of an LED
It is useful to be able to read the LED as well as write it. Add this to
the uclass and update the GPIO driver.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Ziping Chen <techping.chan@gmail.com>
2017-04-14 19:38:57 -06:00
Simon Glass
ddae9fcddc dm: led: Adjust the LED uclass
At present this is very simple, supporting only on and off. We want to
also support toggling and blinking. As a first step, change the name of
the main method and use an enum to indicate the state.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Ziping Chen <techping.chan@gmail.com>
2017-04-14 19:38:57 -06:00
Simon Glass
56e19871dc dm: led: Rename struct led_uclass_plat
These structures are normally named with 'uc' instead of 'uclass'. Change
this one for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Ziping Chen <techping.chan@gmail.com>
2017-04-14 19:38:57 -06:00
Simon Glass
9b36f74816 dm: led: Add a missing blank line in the Kconfig file
There should be a blank line between each option. Add one before LED_GPIO.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Ziping Chen <techping.chan@gmail.com>
2017-04-14 19:38:57 -06:00
Simon Glass
a89c3a04bc sandbox: Add some test LEDs
Add some LEDs to the standard sandbox device tree.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Ziping Chen <techping.chan@gmail.com>
2017-04-14 19:38:57 -06:00