]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
7 years agoMerge branch 'master' of git://git.denx.de/u-boot-rockchip
Tom Rini [Tue, 11 Jul 2017 18:21:50 +0000 (14:21 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-rockchip

7 years agorockchip: rk3288: Add pinctrl support for the gmac ethernet interface
Sjoerd Simons [Mon, 26 Jun 2017 08:01:46 +0000 (10:01 +0200)]
rockchip: rk3288: Add pinctrl support for the gmac ethernet interface

Add support for the gmac ethernet interface to pinctrl. This hardcodes
the setup to match that of the firefly and Radxa Rock2 boards, using the
RGMII phy mode for gmac interface and GPIO4B0 as the phy reset GPIO.

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Signed-off-by: Romain Perier <romain.perier@collabora.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agorockchip: evb-rk3328: enable boot on regulator
Kever Yang [Thu, 8 Jun 2017 07:32:05 +0000 (15:32 +0800)]
rockchip: evb-rk3328: enable boot on regulator

Enable all the boot-on regulator in default.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agorockchip: dts: rk3328-evb: add sdmmc-pwren regulator
Kever Yang [Thu, 8 Jun 2017 07:32:06 +0000 (15:32 +0800)]
rockchip: dts: rk3328-evb: add sdmmc-pwren regulator

Use fixed regulator for sdmmc-pwren for sdmmc power.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agorockchip: pinctrl: rk3328: use gpio instead of sdmmc-pwren
Kever Yang [Thu, 8 Jun 2017 07:32:04 +0000 (15:32 +0800)]
rockchip: pinctrl: rk3328: use gpio instead of sdmmc-pwren

SDMMC-PWREN is a pin to control voltage for SDMMC IO, it may
be high active or low active, the dwmmc driver always assume
the sdmmc-pwren as high active.

Kernel treat this pin as fixed regulator instead of a pin from
controller, and then it can set in dts file upon board schematic,
that's a good solution, we can also do this in u-boot.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agodoc: rockchip: Add phyCORE-RK3288 RDK to board list
Wadim Egorov [Mon, 19 Jun 2017 10:36:41 +0000 (12:36 +0200)]
doc: rockchip: Add phyCORE-RK3288 RDK to board list

Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
Acked-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agorockchip: Add basic support for phyCORE-RK3288 SoM based carrier board
Wadim Egorov [Mon, 19 Jun 2017 10:36:40 +0000 (12:36 +0200)]
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>
7 years agopower: regulator: rk8xx: Allow input current/charger shutdown configuration
Wadim Egorov [Mon, 19 Jun 2017 10:36:39 +0000 (12:36 +0200)]
power: regulator: rk8xx: Allow input current/charger shutdown configuration

The RK818 PMIC contains a charger. Add very basic charger functionality
to be able to regulate the USB input current and charger shutdown limits.

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>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agopower: regulator: rk8xx: Build get_ldo_reg only for SPL
Wadim Egorov [Mon, 19 Jun 2017 10:36:38 +0000 (12:36 +0200)]
power: regulator: rk8xx: Build get_ldo_reg only for SPL

Enabling CONFIG_SPL_POWER_SUPPORT will cause a compiler warning:
  ‘get_ldo_reg’ defined but not used [-Wunused-function]

Let's wrap get_ldo_reg(), rk808_ldo and rk818_ldo with ENABLE_DRIVER
which is only set for non SPL builds.

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>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agorockchip: dts: rk3399: control vbus of typec by fixed regulator
Meng Dongyang [Wed, 28 Jun 2017 11:26:32 +0000 (19:26 +0800)]
rockchip: dts: rk3399: control vbus of typec by fixed regulator

Add fixed regulator for the port of typec0 and typec1 to control vbus
instead of gpio.

Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agorockchip: dts: rk3328: support and enable dwc2
Meng Dongyang [Wed, 28 Jun 2017 11:22:45 +0000 (19:22 +0800)]
rockchip: dts: rk3328: support and enable dwc2

Enable dwc2 controller and add fixed regulator for dwc2 controller to
control vbus.

Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agorockchip: rk3328: board: add support of dwc2 gadget
Meng Dongyang [Wed, 28 Jun 2017 11:22:44 +0000 (19:22 +0800)]
rockchip: rk3328: board: add support of dwc2 gadget

Probe dwc2 udc in the function of board_usb_start to enable
usb gadget function.

Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agousb: dwc2: use dev_read_bool() instead of fdt_getprop()
Meng Dongyang [Wed, 28 Jun 2017 11:22:43 +0000 (19:22 +0800)]
usb: dwc2: use dev_read_bool() instead of fdt_getprop()

Use dev_read_bool() instead of fdt_getprop() to get the property
from DTS. And add a comment for "hnp-srp-disable" property to
fully describe its effect.

Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agorockchip: dts: rk3328: add fixed regulator node for xhci
Meng Dongyang [Wed, 28 Jun 2017 11:22:41 +0000 (19:22 +0800)]
rockchip: dts: rk3328: add fixed regulator node for xhci

The driver changes gpio to fixed regulator to control vbus, so add
fixed regulator node in DTS for xhci driver.

Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agousb: Kconfig: migrate USB_DWC2 to Kconfig
Philipp Tomsich [Mon, 3 Jul 2017 16:30:06 +0000 (18:30 +0200)]
usb: Kconfig: migrate USB_DWC2 to Kconfig

This change migrates the USB_DWC2 configuration item to Kconfig
and runs moveconfig to adjust header files and defconfig.

Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com>
Split off into a separate patch:
Ran moveconfig to migrate other boards:
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agorockchip: dts: rk3328: add fixed regulator node for xhci
Meng Dongyang [Wed, 28 Jun 2017 11:22:41 +0000 (19:22 +0800)]
rockchip: dts: rk3328: add fixed regulator node for xhci

The driver changes gpio to fixed regulator to control vbus, so add
fixed regulator node in DTS for xhci driver.

Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agousb: host: xhci-rockchip: use fixed regulator to control vbus
Meng Dongyang [Wed, 28 Jun 2017 11:22:40 +0000 (19:22 +0800)]
usb: host: xhci-rockchip: use fixed regulator to control vbus

Use fixed regulator to control the voltage of vbus. Enable vbus
supply when usb start and disable vbus supply when usb stop.

Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agousb: Kconfig: config USB_XHCI_ROCKCHIP depends on DM_REGULATOR and DM_USB
Meng Dongyang [Wed, 28 Jun 2017 11:22:39 +0000 (19:22 +0800)]
usb: Kconfig: config USB_XHCI_ROCKCHIP depends on DM_REGULATOR and DM_USB

The xhci-rockchip driver depends on DM_REGULATOR and DM_USB.
So add dependent features for xhci-rockchip driver in Kconfig.

Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agorockchip: rk3036: sync os_reg2 define with other soc
Kever Yang [Tue, 13 Jun 2017 08:10:46 +0000 (16:10 +0800)]
rockchip: rk3036: sync os_reg2 define with other soc

Rockchip using the same bit definition for dram info and write
to os_reg, the col and bw info is not correct and let's fix it.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agorockchip: rk3036 remove CONFIG_RAM from defconfig
Kever Yang [Tue, 13 Jun 2017 08:10:45 +0000 (16:10 +0800)]
rockchip: rk3036 remove CONFIG_RAM from defconfig

rk3036 sdram driver does not use DM, remove CONFIG_RAM first.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agorockchip: video: mipi: Modify format type for debug message
eric.gao@rock-chips.com [Wed, 21 Jun 2017 03:15:57 +0000 (11:15 +0800)]
rockchip: video: mipi: Modify format type for debug message

Modify format type for debug message.

Signed-off-by: Eric Gao <eric.gao@rock-chips.com>
7 years agorockchip: video: mipi: Modify variable type for arm32 compatibility
eric.gao@rock-chips.com [Wed, 21 Jun 2017 03:12:50 +0000 (11:12 +0800)]
rockchip: video: mipi: Modify variable type for arm32 compatibility

Some address relevant varibable is defined originally as u64. To
compatible with arm32, this patch change them to uintptr_t type.

Signed-off-by: Eric Gao <eric.gao@rock-chips.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: pwm: fix the register layout for the PWM controller
eric.gao@rock-chips.com [Mon, 19 Jun 2017 06:45:36 +0000 (14:45 +0800)]
rockchip: pwm: fix the register layout for the PWM controller

According to rk3288 spec, the pwm register order is:
    PWM_PWM0_CNT,
    PWM_PWM0_PERIOD_HPR,
    PWM_PWM0_DUTY_LPR,
    PWM_PWM0_CTRL
but the source code's order is:
  struct rk3288_pwm {
    u32 cnt;
    u32 duty_lpr;
    u32 period_hpr;
    u32 ctrl;
  };

So, correct it here. It is the same as RK3399.

Signed-off-by: Eric Gao <eric.gao@rock-chips.com>
Edited the commit message:
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agoRevert "mmc: dw_mmc: rockchip: select proper card clock"
Kever Yang [Wed, 14 Jun 2017 08:31:49 +0000 (16:31 +0800)]
Revert "mmc: dw_mmc: rockchip: select proper card clock"

The origin patch get rockchip dwmmc by name 'ciu', which lead
to the SPL not able to remove 'clock-names' node in dts.
I'm not saying this is not correct, but I would prefer to handle
this in dts or clock driver to save memory for SPL.
For example the rk3288 SPL size has out of memory if not enable
BACK_TO_BROM option, there are many other SoCs has less internal
memory than rk3288.

This reverts commit 480a9b834c661fc88217f50bdf780192c3018d66.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agorockchip: firefly-rk3399: enable dwmmc driver for the board
Kever Yang [Wed, 14 Jun 2017 08:31:48 +0000 (16:31 +0800)]
rockchip: firefly-rk3399: enable dwmmc driver for the board

Enable mmc_dw_rockchip driver, disable CONFIG_SPL_OF_PLATDATA
first for some dependence patches still not merged.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Tested-by: Vagrant Cascadian <vagrant@debian.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: firefly-rk3399: dts: enable sdmmc device
Kever Yang [Wed, 14 Jun 2017 08:31:47 +0000 (16:31 +0800)]
rockchip: firefly-rk3399: dts: enable sdmmc device

Enable sdmmc device and add the spl boot device sequence.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agorockchip: dwmmc: use max-frequency when OF_PLATDATA enabled
Kever Yang [Wed, 14 Jun 2017 08:31:46 +0000 (16:31 +0800)]
rockchip: dwmmc: use max-frequency when OF_PLATDATA enabled

Since the 'clock-freq-min-max' is deprecated, we use max-frequency for
all rockchip SoC dwmmc controller.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agorockchip: rk3328: dtsi use max-frequency for mmc node
Kever Yang [Wed, 14 Jun 2017 08:31:45 +0000 (16:31 +0800)]
rockchip: rk3328: dtsi use max-frequency for mmc node

Since the 'clock-freq-min-max' is deprecated, we use max-frequency.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agorockchip: rk3288: dtsi use max-frequency for mmc node
Kever Yang [Wed, 14 Jun 2017 08:31:44 +0000 (16:31 +0800)]
rockchip: rk3288: dtsi use max-frequency for mmc node

Since the 'clock-freq-min-max' is deprecated, we use max-frequency.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agorockchip: rk3036: dtsi use max-frequency for mmc node
Kever Yang [Wed, 14 Jun 2017 08:31:43 +0000 (16:31 +0800)]
rockchip: rk3036: dtsi use max-frequency for mmc node

Since the 'clock-freq-min-max' is deprecated, we use max-frequency.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agorockchip: add evb_rk3229 board
Kever Yang [Fri, 23 Jun 2017 09:17:54 +0000 (17:17 +0800)]
rockchip: add evb_rk3229 board

evb_rk3229 is a RK3229 based board, with:
- 8GB eMMC;
- 1GB DDR SDRAM;
- 2 USB2.0 HOST port;
- 1 MAC port;
- 1 HDMI port;
- IR;
- WiFi;

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agorockchip: rk322x: add sysreset driver
Kever Yang [Fri, 23 Jun 2017 09:17:53 +0000 (17:17 +0800)]
rockchip: rk322x: add sysreset driver

Rockchip rk322x sysreset is much like rk3036 and other Rockchip SoCs,
only difference is that the target register address is different.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agorockchip: rk322x: add basic soc support
Kever Yang [Fri, 23 Jun 2017 09:17:52 +0000 (17:17 +0800)]
rockchip: rk322x: add basic soc support

Enable soc support for SPL and U-boot skeleton.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agorockchip: rk322x: add dts file
Kever Yang [Fri, 23 Jun 2017 09:17:51 +0000 (17:17 +0800)]
rockchip: rk322x: add dts file

The dts files are from kernel and with modify to adapt U-Boot.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agorockchip: rk322x: add pinctrl driver
Kever Yang [Fri, 23 Jun 2017 09:17:50 +0000 (17:17 +0800)]
rockchip: rk322x: add pinctrl driver

Add init pinctrl driver support for:
- i2c;
- spi;
- uart;
- pwm;
- emmc/sdmmc;

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agorockchip: rk322x: add clock driver
Kever Yang [Fri, 23 Jun 2017 09:17:49 +0000 (17:17 +0800)]
rockchip: rk322x: add clock driver

Add clock driver init support for:
- cpu, bus clock init;
- emmc, sdmmc clock;
- ddr clock;

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Fixed format specified (%x -> %p) in clk_rk322x.c:
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agorockchip: mkimage: add support for rk322x soc
Kever Yang [Fri, 23 Jun 2017 09:17:48 +0000 (17:17 +0800)]
rockchip: mkimage: add support for rk322x soc

Add support for rk322x package header in mkimage tool.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agorockchip: rv1108: disable CONFIG_RAM before we have driver
Kever Yang [Fri, 23 Jun 2017 08:11:12 +0000 (16:11 +0800)]
rockchip: rv1108: disable CONFIG_RAM before we have driver

The rv1108 do not have DRAM driver now, so disable it first,
or else it will get conflict with the sdram common code.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agorockchip: correct the bank0 ram size
Kever Yang [Fri, 23 Jun 2017 08:11:11 +0000 (16:11 +0800)]
rockchip: correct the bank0 ram size

The bank0 ram size should be the DRAM size minus reserved size,
the DRAM size may be 1GB, 2GB, 4GB, we can not hard code it.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Added DECLARE_GLOBAL_DATA_PTR for RK3328, RK3368 and RK3399:
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agorockchip: dts: rk3368: add dmc node
Kever Yang [Fri, 23 Jun 2017 08:11:10 +0000 (16:11 +0800)]
rockchip: dts: rk3368: add dmc node

Add dmc node to enable sdram driver.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agorockchip: dts: rk3328: add dmc node
Kever Yang [Fri, 23 Jun 2017 08:11:09 +0000 (16:11 +0800)]
rockchip: dts: rk3328: add dmc node

Add a dmc node for sdram driver.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agorockchip: rk3368: add sdram driver for U-Boot
Kever Yang [Fri, 23 Jun 2017 08:11:08 +0000 (16:11 +0800)]
rockchip: rk3368: add sdram driver for U-Boot

Add sdram driver in U-Boot for get the correct sdram size from
sys_reg, so that U-Boot can co-work with Rockchip loader or SPL
to get different dram capability and then tell the kernel.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agorockchip: rk3328: add sdram driver in U-Boot
Kever Yang [Fri, 23 Jun 2017 08:11:07 +0000 (16:11 +0800)]
rockchip: rk3328: add sdram driver in U-Boot

Add sdram driver in U-Boot for get the correct sdram size from
sys_reg, so that U-Boot can co-work with Rockchip loader or SPL
to get different dram capability and then tell the kernel.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agorockchip: use common sdram function
Kever Yang [Fri, 23 Jun 2017 08:11:06 +0000 (16:11 +0800)]
rockchip: use common sdram function

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>
7 years agorockchip: add sdram_common for common functions
Kever Yang [Fri, 23 Jun 2017 08:11:05 +0000 (16:11 +0800)]
rockchip: add sdram_common for common functions

There are some functions like sdram_size_mb can be re-used for
different rockchip SoCs, just put them into common file.
Add board_get_usable_ram_top() for ram_top init base on
SDRAM_MAX_SIZE.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Added SDRAM_MAX_SIZE definition for RK3036:
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
fixup: 3036 fix for sdram_common

7 years agorockchip: rk3328: correct mem_region
Kever Yang [Tue, 13 Jun 2017 13:00:12 +0000 (21:00 +0800)]
rockchip: rk3328: correct mem_region

According to rk3328 TRM:
0~0xff000000 is ddr space;
0xff000000~0xffffffff is device space.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agorockchip: dm: convert fdt_get to dev_read
Philipp Tomsich [Wed, 7 Jun 2017 16:46:03 +0000 (18:46 +0200)]
rockchip: dm: convert fdt_get to dev_read

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>
7 years agorockchip: ns16550: dm: convert fdt_get to dev_read
Philipp Tomsich [Wed, 7 Jun 2017 16:46:02 +0000 (18:46 +0200)]
rockchip: ns16550: dm: convert fdt_get to dev_read

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 serial driver (ns16550 and compatible) used for the
Rockchip devices.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: net: dm: convert fdt_get to dev_read
Philipp Tomsich [Wed, 7 Jun 2017 16:46:01 +0000 (18:46 +0200)]
rockchip: net: dm: convert fdt_get to dev_read

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 Gigabit Ethernet MAC (i.e. common designware driver and
rockchip-specific wrapper).

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: mmc: dm: convert fdt_get to dev_read
Philipp Tomsich [Wed, 7 Jun 2017 16:46:00 +0000 (18:46 +0200)]
rockchip: mmc: dm: convert fdt_get to dev_read

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 dw_mmc and sdhci wrapper drivers for Rockchip.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: xhci: dm: convert fdt_get to dev_read
Philipp Tomsich [Wed, 7 Jun 2017 16:45:59 +0000 (18:45 +0200)]
rockchip: xhci: dm: convert fdt_get to dev_read

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 change covers the USB3 (xhci) driver for the Rockchip devices.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: spi: dm: convert fdt_get to dev_read
Philipp Tomsich [Wed, 7 Jun 2017 16:45:58 +0000 (18:45 +0200)]
rockchip: spi: dm: convert fdt_get to dev_read

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 change covers the rk_spi.c (SPI driver) used in Rockchip devices.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: pinctrl: dm: convert fdt_get to dev_read
Philipp Tomsich [Wed, 7 Jun 2017 16:45:57 +0000 (18:45 +0200)]
rockchip: pinctrl: dm: convert fdt_get to dev_read

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 change covers the pinctrl drivers for the Rockchip devices.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agopipe3: Fix broken dependency
Jean-Jacques Hiblot [Fri, 7 Jul 2017 10:13:34 +0000 (12:13 +0200)]
pipe3: Fix broken dependency

ARCH_OMAP2 has been renamed ARCH_OMAP2PLUS in commit a93fbf4a7892
("ARM: omap2+: rename config to ARCH_OMAP2PLUS and consolidate Kconfig")

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agomtd: stm32: use parameter instead of default value
Patrice Chotard [Tue, 4 Jul 2017 16:24:43 +0000 (18:24 +0200)]
mtd: stm32: use parameter instead of default value

To set wait state, a hard coded value is used instead of using
latency parameter. stm32_flash_latency_cfg() is currently used
in arch/arm/mach-stm32/stm32f4/clock.c and in
drivers/clk/clk_stm32f7.c with, in both case, "5" as parameter.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
7 years agoarm: mach-keystone: Modify secure image size before copy
Andrew F. Davis [Thu, 29 Jun 2017 13:38:25 +0000 (08:38 -0500)]
arm: mach-keystone: Modify secure image size before copy

The size of the secure image does not include the size of the
header, subtract this out before we move the image or we grab
extra data after the image.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
7 years agoARM: dts: OMAP5+: Enable gpio in SPL
Lokesh Vutla [Tue, 27 Jun 2017 08:20:58 +0000 (13:50 +0530)]
ARM: dts: OMAP5+: Enable gpio in SPL

gpio2 is used to detect lcd based on which pin mux is done in SPL.
gpio7 is used to enable vtt regulator. Enable these two gpio nodes
in SPL.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoarm: omap4+: Enable spl_early_init()
Lokesh Vutla [Tue, 27 Jun 2017 08:20:57 +0000 (13:50 +0530)]
arm: omap4+: Enable spl_early_init()

Enable spl_early_init() so that spl can use
DT very early during boot.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoarm: omap: Detect boot mode very early
Lokesh Vutla [Tue, 27 Jun 2017 08:20:56 +0000 (13:50 +0530)]
arm: omap: Detect boot mode very early

ROM stores the boot params information in a known location
and passes it to SPL. This information needs to be copied
very early during boot or else there is a chance of getting
corrupted by SPL. So move this boot device detection very early
during boot.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoARM64: poplar: hi3798cv200: u-boot support for Poplar 96Boards
Jorge Ramirez-Ortiz [Mon, 26 Jun 2017 13:52:49 +0000 (15:52 +0200)]
ARM64: poplar: hi3798cv200: u-boot support for Poplar 96Boards

This port adds support for:
        1) Serial
        2) eMMC
        3) USB

It has been tested with ARM TRUSTED FIRMWARE running u-boot as the
BL33 executable [see board's README]

eMMC has been tested for reading and booting the loader and linux
kernels as well as saving the u-boot environment.

USB has been tested with ASIX networking adapter and SanDisk 7.4GB
drive.

PSCI has been tested via the reset call (PSCI executes from DDR)

The firwmare upgrade process has been tested via TFTP and USB FAT
filesystem containing the fastboot.bin image in one of the partitions.

Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
7 years agodriver: mmc: update debug info
Jorge Ramirez-Ortiz [Mon, 26 Jun 2017 13:52:48 +0000 (15:52 +0200)]
driver: mmc: update debug info

This driver is used in another board; remove board information from
the driver debug log.

Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoARM64: dts: hi3798cv200-poplar: add device tree bindings
Jorge Ramirez-Ortiz [Mon, 26 Jun 2017 13:52:47 +0000 (15:52 +0200)]
ARM64: dts: hi3798cv200-poplar: add device tree bindings

Pulled from Linux 4.12-rc3

Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agopinctrl: stm32: add set_state ops
Christophe Kerello [Tue, 20 Jun 2017 15:04:19 +0000 (17:04 +0200)]
pinctrl: stm32: add set_state ops

set_state_ops is kept under PINCTRL_FULL flag in order
to decrease memory footprint in some configuration.
PINCTRL_FULL can be enabled for debug purpose.

Signed-off-by: Christophe Kerello <christophe.kerello@st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
7 years agopinctrl: stm32: handle a configuration list
Christophe Kerello [Tue, 20 Jun 2017 15:04:18 +0000 (17:04 +0200)]
pinctrl: stm32: handle a configuration list

This patch handles a configuration list behind pinctrl-0
like pinctrl-0 = <&qspi_clk_a &qspi_bk1_a &qspi_bk2_a>;

Signed-off-by: Christophe Kerello <christophe.kerello@st.com>
Acked-by: Vikas MANOCHA <vikas.manocha@st.com>
7 years agodefconfig: k2g_evm_defconfig: Add K2G ICE to OF_LIST
Cooper Jr., Franklin [Fri, 16 Jun 2017 22:25:33 +0000 (17:25 -0500)]
defconfig: k2g_evm_defconfig: Add K2G ICE to OF_LIST

Include K2G ICE to OF_LIST so it can be used for runtime board
detection.

Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoARM: k2g: Add K2G ICE DTB to the list of possible DTBs
Cooper Jr., Franklin [Fri, 16 Jun 2017 22:25:32 +0000 (17:25 -0500)]
ARM: k2g: Add K2G ICE DTB to the list of possible DTBs

K2G ICE evm will have its own dtb. Therefore, add it to the list of dtbs
located in the appended U-boot dtb FIT image. Therefore, when swapping out
dtbs K2G ICE boards can grab the correct one.

Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoARM: dts: k2g: Add DT support for K2G Industrial Communication Engine evm
Cooper Jr., Franklin [Fri, 16 Jun 2017 22:25:31 +0000 (17:25 -0500)]
ARM: dts: k2g: Add DT support for K2G Industrial Communication Engine evm

Add basic DT support for K2G ICE evm. Only minimal peripherals are
supported to allow console output and MMC boot.

Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoARM: dts: k2g: Disable netcp by default
Cooper Jr., Franklin [Fri, 16 Jun 2017 22:25:30 +0000 (17:25 -0500)]
ARM: dts: k2g: Disable netcp by default

Disable netcp by default like all other peripherals in the dtsi file.
Enable the peripheral explicitly in the board specific dts file.

Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoARM: dts: keystone-k2g-evm: Add unit address to memory node
Cooper Jr., Franklin [Fri, 16 Jun 2017 22:25:29 +0000 (17:25 -0500)]
ARM: dts: keystone-k2g-evm: Add unit address to memory node

Upstream Linux has the unit address being added to the various 66AK2Gx
boards dts. Therefore, update the dts to mimic this change.

Also remove memory node from the base K2G dtsi file.

Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoARM: dts: keystone-k2g: Remove skeleton.dtsi
Cooper Jr., Franklin [Fri, 16 Jun 2017 22:25:28 +0000 (17:25 -0500)]
ARM: dts: keystone-k2g: Remove skeleton.dtsi

Adding the unit address to the memory node was causing the below error:
Warning (reg_format): "reg" property in /memory has invalid length
(8 bytes) (#address-cells == 2, #size-cells == 2)

Further debugging showed that this was due to the memory node added by
default to skeleton.dtsi which was being included in keystone-k2g.dtsi.
Adding a missing node was all that was needed to remove this deprecated
dtsi file from the SoC dtsi. With skeleton.dtsi removed the dtc compiler
no longer complained about including the unit address for the memory node.

Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoARM: k2g: Update board_name u-boot env variable at runtime
Cooper Jr., Franklin [Fri, 16 Jun 2017 22:25:27 +0000 (17:25 -0500)]
ARM: k2g: Update board_name u-boot env variable at runtime

Enable CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG to allow "board_name" to
be set depending on the board it is being ran on.

Update findfdt to use this new dynamic board_name value to determine
which dtb should be used.

Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoARM: k2g: Use board detection to wrap K2G GP specific calls
Cooper Jr., Franklin [Fri, 16 Jun 2017 22:25:26 +0000 (17:25 -0500)]
ARM: k2g: Use board detection to wrap K2G GP specific calls

Certain peripherals used by K2G GP aren't used on K2G ICE evm. Or
configuration is slightly different. Therefore, use board detection to
deal with these variations.

Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoboard: ks2: Use board detection to wrap code not specific to K2G ICE evm
Cooper Jr., Franklin [Fri, 16 Jun 2017 22:25:25 +0000 (17:25 -0500)]
board: ks2: Use board detection to wrap code not specific to K2G ICE evm

Some code doesn't apply to K2G ICE evm. Therefore, use board detection to
wrap these calls.

Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoARM: k2g: Add DDR3 configuration for K2G ICE evm
Cooper Jr., Franklin [Fri, 16 Jun 2017 22:25:24 +0000 (17:25 -0500)]
ARM: k2g: Add DDR3 configuration for K2G ICE evm

Add configuration settings used by the K2G ICE evm. Also use board
detection to determine which DDR3 configuration to use.

Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoARM: k2g: Add pinmux support for K2G ICE evm
Cooper Jr., Franklin [Fri, 16 Jun 2017 22:25:23 +0000 (17:25 -0500)]
ARM: k2g: Add pinmux support for K2G ICE evm

Add basic pinmux data for new K2G ICE evm. Also add pinmuxing for a
generic K2G evm which includes I2C 0 and 1 used for board detection
purposes.

Since multiple K2G boards are supported that means initially generic
pinmuxing should be used when board detection hasn't ran. Once board
detection runs the proper pinmuxing can be reran to match the board
being ran on.

Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoks2_evm: Add EEPROM based board detection helper functions
Cooper Jr., Franklin [Fri, 16 Jun 2017 22:25:22 +0000 (17:25 -0500)]
ks2_evm: Add EEPROM based board detection helper functions

Add a function that can be used to determine if the board being ran on is
a K2G Industrial Communication Engine EVM or K2G General Purpose EVM based
on values programmed on the EEPROM.

Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoARM: k2g: Program DDRPHY_DATX8 registers via mask and value variables
Cooper Jr., Franklin [Fri, 16 Jun 2017 22:25:21 +0000 (17:25 -0500)]
ARM: k2g: Program DDRPHY_DATX8 registers via mask and value variables

Different K2G evms may need to program the various
KS2_DDRPHY_DATX8_X_OFFSET registers in different ways. Therefore, use
the mask and val registers for each KS2_DDRPHY_DATAX_X_OFFSET to
properly program the register.

Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoARM: k2g: Program DDR PHY MR2 register with the default value
Cooper Jr., Franklin [Fri, 16 Jun 2017 22:25:20 +0000 (17:25 -0500)]
ARM: k2g: Program DDR PHY MR2 register with the default value

K2G GP doesn't require the MR2 register to be programed since the
default is good enough. However, newer K2G boards do need to change
this register value. Therefore, instead of not writing this register if
ran on a K2G board just program the value to be written to match the
default/reset value.

Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoARM: keystone2: Add additional fields used for DDR3 configuration
Cooper Jr., Franklin [Fri, 16 Jun 2017 22:25:19 +0000 (17:25 -0500)]
ARM: keystone2: Add additional fields used for DDR3 configuration

Future boards will need to configure DDR3 registers in a slightly
different manner. Support this by defining additional variables and
defines that will be utilized later.

Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agodefconfig: keystone2: Enable U-boot runtime DTB detection
Cooper Jr., Franklin [Fri, 16 Jun 2017 22:25:18 +0000 (17:25 -0500)]
defconfig: keystone2: Enable U-boot runtime DTB detection

Enable various config options to allow U-boot at runtime to select the
proper dtb to use from the list of dtb's within the FIT image.

Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoks2_evm: Add EEPROM based board detection
Cooper Jr., Franklin [Fri, 16 Jun 2017 22:25:17 +0000 (17:25 -0500)]
ks2_evm: Add EEPROM based board detection

Some K2G evms have their EEPROM programming while most do not. Therefore,
add EEPROM board detection to be used as the default method and fall back
to the alternative board detection when needed.

Also reorder board configuration. Perform bare minimal configuration
initially since board detection hasn't ran. Finish board configuration
once the board has been identified.

Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoARM: keystone2: Define board_fit_config_name_match for Keystone 2 boards
Cooper Jr., Franklin [Fri, 16 Jun 2017 22:25:16 +0000 (17:25 -0500)]
ARM: keystone2: Define board_fit_config_name_match for Keystone 2 boards

Now with support for U-boot runtime dtb selection each board needs to
define board_fit_config_name_match so U-boot can determine what the
correct dtb is within the FIT blob.

Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoARM: k2g: Define embedded_dtb_select for runtime DTB selection in U-boot
Cooper Jr., Franklin [Fri, 16 Jun 2017 22:25:15 +0000 (17:25 -0500)]
ARM: k2g: Define embedded_dtb_select for runtime DTB selection in U-boot

For K2G, runtime DTB selection utilizes the embedded_dtb_select function.
Therefore, define the function which will perform a EEPROM read and then
retries selecting the correct dtb now that it can detect which board its
on. For other Keystone devices use an empty function since they will still
use the embedded FIT functionality but their FIT will only contain a single
dtb.

Most production K2G boards do not have their EEPROM programmed. Therefore,
perform a test to verify a K2G GP is currently being used and if it is then
set the values normally set by a EEPROM read.

Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoARM: keystone2: Allow to build with all image formats
Cooper Jr., Franklin [Fri, 16 Jun 2017 22:25:14 +0000 (17:25 -0500)]
ARM: keystone2: Allow to build with all image formats

u-boot.bin is a copy of:
u-boot-fit-dtb.bin if CONFIG_FIT_EMBED is enabled,
u-boot-dtb.bin if CONFIG_OF_SEPARATE is enabled,
u-boot-nodtb.bin if DT is not enabled.
So, use u-boot.bin to to generate keystone images instead of
u-boot-dtb.bin

Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoMakefile: Build additional binaries for dtb FIT blobs appended to U-boot
Cooper Jr., Franklin [Fri, 16 Jun 2017 22:25:13 +0000 (17:25 -0500)]
Makefile: Build additional binaries for dtb FIT blobs appended to U-boot

Add additional make targets and options for building embedded FIT U-boot
images.

Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoboard_f: Add new function to allow runtime DTB selection
Cooper Jr., Franklin [Fri, 16 Jun 2017 22:25:12 +0000 (17:25 -0500)]
board_f: Add new function to allow runtime DTB selection

Runtime U-boot dtb selection is generally a two step process. First step
is to simply use an initial generic dtb. The second step is to select
the dtb and perhaps execute additional code ones U-boot knows what board
it is running on. Embedded_dtb_select handles the second step by allowing
board specific code to run and perform what ever necessary configuration
that is needed.

Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoarm: dts: Add new "generic" 66AK2Gx device tree file.
Cooper Jr., Franklin [Fri, 16 Jun 2017 22:25:11 +0000 (17:25 -0500)]
arm: dts: Add new "generic" 66AK2Gx device tree file.

With U-boot runtime board detect for DTB selection a "default" dtb needs
to be created. This will be used temporarily until the "proper" dtb is
selected.

Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoARM: dts: k2g: Introduce U-boot specific dtsi file
Cooper Jr., Franklin [Fri, 16 Jun 2017 22:25:10 +0000 (17:25 -0500)]
ARM: dts: k2g: Introduce U-boot specific dtsi file

Introduce K2G evm specific dtsi file for U-boot specific configurations.
This will help seperate U-boot only configurations thus making it easier to
keep device tree files synced between U-boot and Linux.

For now only add nodes to allow i2c drivers to be probed early during
the boot process.

Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agodts: Allow OF_LIST to depend on FIT_EMBED
Cooper Jr., Franklin [Fri, 16 Jun 2017 22:25:09 +0000 (17:25 -0500)]
dts: Allow OF_LIST to depend on FIT_EMBED

OF_LIST will be useable by SPL and U-boot. Therefore, update its
dependency to allow it to be enable by either SPL or U-boot specific
config option.

Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
Acked-by: Andrew F. Davis <afd@ti.com>
7 years agoti: common: board_detect: Add function to determine if EEPROM was read
Cooper Jr., Franklin [Fri, 16 Jun 2017 22:25:08 +0000 (17:25 -0500)]
ti: common: board_detect: Add function to determine if EEPROM was read

When the EEPROM is first read its contents are stored in memory as a
cache to avoid further I2C operations. To determine if the EEPROM was
previously read the easiest way is to check the memory to see if the
EEPROM's magic header value is set. Create a new function that can
determine if the EEPROM was previously read or not without having to
perform a I2C transaction.

Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agofdt: Enable selecting correct DTB from appended FIT Image
Cooper Jr., Franklin [Fri, 16 Jun 2017 22:25:07 +0000 (17:25 -0500)]
fdt: Enable selecting correct DTB from appended FIT Image

This patch gives U-boot the runtime support to have the board specific
code decide which FDT to use. This is especially useful for devices
that need this type of runtime determination and also doesn't use SPL.

Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoboot_fit: Create helper functions that can be used to select DTB out of FIT
Cooper Jr., Franklin [Fri, 16 Jun 2017 22:25:06 +0000 (17:25 -0500)]
boot_fit: Create helper functions that can be used to select DTB out of FIT

Some platforms may append a FIT image to the U-boot image. This function
aids in parsing the FIT image and selecting the correct DTB at runtime.

Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agospl: fit: Break out some functions into a common file
Cooper Jr., Franklin [Fri, 16 Jun 2017 22:25:05 +0000 (17:25 -0500)]
spl: fit: Break out some functions into a common file

Some of the functions within spl_fit will be used for non spl purposes.
Instead of duplicating functions simply break the functions to be reused
into its own file.

Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
[trini: Only add the new define to image.h, otherwise we see breakage
due to massive include leakage into host tools in some cases]
Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agoti: common: board_detect: Allow settings board detection variables manually
Nishanth Menon [Fri, 16 Jun 2017 22:25:04 +0000 (17:25 -0500)]
ti: common: board_detect: Allow settings board detection variables manually

In some situations the EEPROM used for board detection may not be
programmed or simply programmed incorrectly. Therefore, it may be
necessary to "simulate" reading the contents of the EEPROM to set
appropriate variables used in the board detection code.

This may also be helpful in certain boot modes where doing i2c reads
may be costly and the config supports running only a specific board.

Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Franklin S Cooper Jr. <fcooper@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoARM: dts: keystone-k2e-evm: Add U-boot specific dtsi file
Cooper Jr., Franklin [Fri, 16 Jun 2017 21:16:14 +0000 (16:16 -0500)]
ARM: dts: keystone-k2e-evm: Add U-boot specific dtsi file

With Davinci I2C switching to device model, K2E requires U-boot specific
device tree entries. This is only required for I2C 1 which is needed
extremely early during the boot process.

Fixes: 1743d040b1df ("ARM: keystone: Enable DM_I2C by default")
Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
7 years agoPrepare v2017.07
Tom Rini [Mon, 10 Jul 2017 17:07:38 +0000 (13:07 -0400)]
Prepare v2017.07

Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agokm/common: remove unused function declarations
Holger Brunck [Mon, 10 Jul 2017 07:46:23 +0000 (09:46 +0200)]
km/common: remove unused function declarations

Cc: Wolfgang Denk <wd@denx.de>
Cc: Heiko Schocher <hs@denx.de>
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
7 years agocmd, nand: fix broken output of "nand info"
Lothar Waßmann [Mon, 10 Jul 2017 06:44:24 +0000 (08:44 +0200)]
cmd, nand: fix broken output of "nand info"

If the value of either "nand options" or "bbt options" has a zero in
the most significant nibble, the '0x' prefix will be isolated from the
value like shown below:
|Device 0: nand0, sector size 128 KiB
|  Page size       2048 b
|  OOB size          64 b
|  Erase size    131072 b
|  subpagesize     2048 b
|  options     0x40000200
|  bbt options 0x   60000

Change the format string to produce leading zeroes filling the gap.

Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
7 years agolibfdt: Drop -FDT_ERR_TOODEEP
Simon Glass [Mon, 10 Jul 2017 03:30:17 +0000 (21:30 -0600)]
libfdt: Drop -FDT_ERR_TOODEEP

This error code has not been upstreamed and is not really needed since it
is unlikely to be triggered. Drop it to maintain compatability with
upstream.

Reported-by: Peter Robinson <pbrobinson@gmail.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Peter Robinson <pbrobinson@gmail.com>
7 years agoconfigs: Resync defconfigs
Tom Rini [Sun, 9 Jul 2017 00:32:11 +0000 (20:32 -0400)]
configs: Resync defconfigs

Signed-off-by: Tom Rini <trini@konsulko.com>