project/bcm63xx/u-boot.git
5 years agoboard: ti: dra7-evm: remove USB platform code
Jean-Jacques Hiblot [Thu, 29 Nov 2018 09:57:46 +0000 (10:57 +0100)]
board: ti: dra7-evm: remove USB platform code

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agoconfigs: am57xx_evm: Enable DM_USB and DM_USB_DEV
Jean-Jacques Hiblot [Thu, 29 Nov 2018 09:57:45 +0000 (10:57 +0100)]
configs: am57xx_evm: Enable DM_USB and DM_USB_DEV

Enable DM_USB and DM_USB_DEV for AM57xx based boards.

Signed-off-by: Vignesh R <vigneshr@ti.com>
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agoconfigs: enable DM_USB and DM_USB_DEV for all DRA7 platforms
Jean-Jacques Hiblot [Thu, 29 Nov 2018 09:57:44 +0000 (10:57 +0100)]
configs: enable DM_USB and DM_USB_DEV for all DRA7 platforms

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agodts: dra7x: make ocp2scp@4a080000 compatible with simple-bus
Jean-Jacques Hiblot [Thu, 29 Nov 2018 09:57:43 +0000 (10:57 +0100)]
dts: dra7x: make ocp2scp@4a080000 compatible with simple-bus

This is required when DM_USB is used, to bind the USB phys.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agoboard; ti: am57xx: turn on USB clocks
Vignesh R [Thu, 29 Nov 2018 09:57:42 +0000 (10:57 +0100)]
board; ti: am57xx: turn on USB clocks

Enable USB clocks in late init stage to support ports under DM_USB.

Signed-off-by: Vignesh R <vigneshr@ti.com>
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agoboard: ti: dra7xx-evm: turn on USB clocks in late init stage
Jean-Jacques Hiblot [Thu, 29 Nov 2018 09:57:41 +0000 (10:57 +0100)]
board: ti: dra7xx-evm: turn on USB clocks in late init stage

For USB ports that use the Driver Model, turn on the clocks during the
late init stage.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agodwc3-generic: Add support for the TI DWC3 glue
Jean-Jacques Hiblot [Thu, 29 Nov 2018 09:57:40 +0000 (10:57 +0100)]
dwc3-generic: Add support for the TI DWC3 glue

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
5 years agophy: Add a new driver for OMAP's USB2 PHYs
Jean-Jacques Hiblot [Thu, 29 Nov 2018 09:57:39 +0000 (10:57 +0100)]
phy: Add a new driver for OMAP's USB2 PHYs

This drivers supports the USB2 PHY found on omap5 and dra7 SOCs.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
5 years agophy: ti-pip3-phy: Add support for USB3 PHY
Vignesh R [Thu, 29 Nov 2018 09:57:38 +0000 (10:57 +0100)]
phy: ti-pip3-phy: Add support for USB3 PHY

Add support to handle USB3 PHYs present on AM57xx/DRA7xx SoCs. This is
needed to move AM57xx to DM_USB.

Signed-off-by: Vignesh R <vigneshr@ti.com>
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
5 years agosyscon: dm: Add a new method to get a regmap from DTS
Jean-Jacques Hiblot [Thu, 29 Nov 2018 09:57:37 +0000 (10:57 +0100)]
syscon: dm: Add a new method to get a regmap from DTS

syscon_regmap_lookup_by_phandle() can be used to get the regmap of a syscon
device from a reference in the DTS. It operates similarly to the linux
version of the namesake function.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agousb: dwc3: Fix a compilation error with the edison defconfig
Jean-Jacques Hiblot [Thu, 29 Nov 2018 09:52:50 +0000 (10:52 +0100)]
usb: dwc3: Fix a compilation error with the edison defconfig

The error is:
In file included from include/part.h:10:0,
                 from include/usb.h:18,
                 from include/linux/usb/gadget.h:22,
                 from drivers/usb/dwc3/ep0.c:20:
include/ide.h:62:14: error: unknown type name ‘uchar’
 void ide_led(uchar led, uchar status);

Fixing it by including common.h that defines the uchar type.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
5 years agodwc3-generic: Add select_dr_mode operation
Jean-Jacques Hiblot [Thu, 29 Nov 2018 09:52:49 +0000 (10:52 +0100)]
dwc3-generic: Add select_dr_mode operation

The select_dr_mode operation is executed when the glue driver is probed.
The role of this optional function is to configure the operating mode
of the controller at the glue level.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
5 years agodwc3-generic: Handle the PHYs, the clocks and the reset lines
Jean-Jacques Hiblot [Thu, 29 Nov 2018 09:52:48 +0000 (10:52 +0100)]
dwc3-generic: Handle the PHYs, the clocks and the reset lines

This make the driver more generic. At this point this driver can replace
the dwc3-of-simple implementation.
Make the description in the Kconfig more generic too.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
5 years agoconfigs: evb-rk3328: Enable CONFIG_USB_DWC3
Jean-Jacques Hiblot [Thu, 29 Nov 2018 09:52:47 +0000 (10:52 +0100)]
configs: evb-rk3328: Enable CONFIG_USB_DWC3

This is now required because the PHY operations used by xhci-dwc3 are part
of the dwc3 core.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
5 years agodm: usb: create a new UCLASS ID for USB gadget devices
Jean-Jacques Hiblot [Thu, 29 Nov 2018 09:52:46 +0000 (10:52 +0100)]
dm: usb: create a new UCLASS ID for USB gadget devices

UCLASS_USB_DEV_GENERIC was meant for USB devices connected to host
controllers, not gadget devices.
Adding a new UCLASS for gadget devices alone.

Also move the generic DM code for USB gadgets in a separate file for
clarity.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
5 years agodwc3: move phy operation to core.c
Jean-Jacques Hiblot [Thu, 29 Nov 2018 09:52:45 +0000 (10:52 +0100)]
dwc3: move phy operation to core.c

Those operations can be used for peripheral operation as well as host
operation.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
# Conflicts:
# drivers/usb/dwc3/core.c
# drivers/usb/host/xhci-dwc3.c

5 years agodwc3_generic: do not probe the USB device driver when it's bound
Jean-Jacques Hiblot [Thu, 29 Nov 2018 09:52:44 +0000 (10:52 +0100)]
dwc3_generic: do not probe the USB device driver when it's bound

The driver will be probed when usb_gadget_initialize() is called.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
5 years agousb: udc: implement DM versions of usb_gadget_initialize()/_release()/_handle_interrupt()
Jean-Jacques Hiblot [Thu, 29 Nov 2018 09:52:43 +0000 (10:52 +0100)]
usb: udc: implement DM versions of usb_gadget_initialize()/_release()/_handle_interrupt()

When DM_USB_GADGET the platform code for the USB device must be replaced by
calls to a USB device driver.

usb_gadget_initialize() probes the USB device driver.
usb_gadget_release() removes the USB device driver.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
5 years agousb: introduce a separate config option for DM USB device
Jean-Jacques Hiblot [Thu, 29 Nov 2018 09:52:42 +0000 (10:52 +0100)]
usb: introduce a separate config option for DM USB device

Using CONFIG_DM_USB for this purpose prevents using DM_USB for host and not
for device.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
5 years agousb: gadget: Do not call board_usb_xxx() directly in USB gadget drivers
Jean-Jacques Hiblot [Thu, 29 Nov 2018 09:52:41 +0000 (10:52 +0100)]
usb: gadget: Do not call board_usb_xxx() directly in USB gadget drivers

Add 2 functions to wrap the calls to board_usb_init() and
board_usb_cleanup().
This is a preparatory work for DM support for UDC drivers (DM_USB_GADGET).

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
5 years agorockchip: rk3399: Add MAINTAINERS entry
Tom Rini [Thu, 6 Dec 2018 15:24:12 +0000 (10:24 -0500)]
rockchip: rk3399: Add MAINTAINERS entry

Add an entry for the Ficus EE board to the existing rock960 MAINTAINERS
file.

Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agoMerge tag 'for-master-20181206' of git://git.denx.de/u-boot-rockchip
Tom Rini [Thu, 6 Dec 2018 15:15:08 +0000 (10:15 -0500)]
Merge tag 'for-master-20181206' of git://git.denx.de/u-boot-rockchip

- Changes the declaration of regs_phy in dwc2-otg to uintptr_t
  to ensure it can be cast to void* for use with writel().
- Add the Rock960 and Ficus boards.

5 years agorockchip: rk3399: Add Ficus EE board support
Manivannan Sadhasivam [Thu, 27 Sep 2018 19:03:01 +0000 (00:33 +0530)]
rockchip: rk3399: Add Ficus EE board support

Add board support for Ficus EE board from Vamrs. This board utilizes
common Rock960 family support.

Following peripherals are tested and known to work:
* Gigabit Ethernet
* USB 2.0
* MMC

Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
[Reworked based on common Rock960 family support]
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
5 years agorockchip: rk3399: Add Rock960 CE board support
Manivannan Sadhasivam [Thu, 27 Sep 2018 19:03:00 +0000 (00:33 +0530)]
rockchip: rk3399: Add Rock960 CE board support

Add board support for Rock960 CE board from Vamrs. This board utilizes
common Rock960 family support.

Following peripherals are tested and known to work:
* USB 2.0
* MMC

This commit also adds DDR configuration for LPDDR3-2GiB-1600MHz which
is being used on the board.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
5 years agorockchip: rk3399: Add common Rock960 family from Vamrs
Manivannan Sadhasivam [Thu, 27 Sep 2018 19:02:59 +0000 (00:32 +0530)]
rockchip: rk3399: Add common Rock960 family from Vamrs

Rock960 is a family of boards based on Rockchip RK3399 SoC from Vamrs.
It consists of Rock960 (Consumer Edition) and Ficus (Enterprise Edition)
96Boards.

Below are some of the key differences between both Rock960 and Ficus
boards:

1. Different host enable GPIO for USB
2. Different power and reset GPIO for PCI-E
3. No Ethernet port on Rock960

The common board support will be utilized by both boards. The device
tree has been organized in such a way that only the properties which
differ between both boards are placed in the board specific dts and
the reset of the nodes are placed in common dtsi file.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
[Added instructions for SD card boot]
Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Peter Robinson <pbrobinson@gmail.com>
5 years agoarm: dts: rockchip: add some common pin-settings to rk3399
Randy Li [Thu, 27 Sep 2018 19:02:58 +0000 (00:32 +0530)]
arm: dts: rockchip: add some common pin-settings to rk3399

Those pins would be used by many boards.

Commit grabbed from Linux:

commit b41023282d07b61a53e2c9b9508912b1e7ce7b4f
Author: Randy Li <ayaka@soulik.info>
Date:   Thu Jun 21 21:32:10 2018 +0800

    arm64: dts: rockchip: add some common pin-settings to rk3399

    Those pins would be used by many boards.

Signed-off-by: Randy Li <ayaka@soulik.info>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Signed-off-by: Randy Li <ayaka@soulik.info>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Tested-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
5 years agousb: dwc2-otg: make regs_phy (in platdata) a uintptr_t
Philipp Tomsich [Thu, 6 Dec 2018 00:26:39 +0000 (01:26 +0100)]
usb: dwc2-otg: make regs_phy (in platdata) a uintptr_t

The regs_phy field of the platform data structure for dwc2-otg is
today declared an unsigned int, but will eventually be cast into a
void* for a writel operation.  This triggers errors on modern GCC
versions.

E.g. we get the following error with GCC 6.3:
  drivers/usb/phy/rockchip_usb2_phy.c: In function 'property_enable':
  arch/arm/include/asm/io.h:49:29: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
   #define __arch_putl(v,a)  (*(volatile unsigned int *)(a) = (v))
                               ^
  arch/arm/include/asm/io.h:117:48: note: in expansion of macro '__arch_putl'
   #define writel(v,c) ({ u32 __v = v; __iowmb(); __arch_putl(__v,c); __v; })
                                                  ^~~~~~~~~~~
  drivers/usb/phy/rockchip_usb2_phy.c:61:2: note: in expansion of macro 'writel'
    writel(val, pdata->regs_phy + reg->offset);
    ^~~~~~

This commit changes regs_phy to be a uintptr_t to ensure that it is
large enough to hold any valid pointer (and fix the associated
warning).

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
5 years agoMerge tag 'dm-pull-5dec18' of git://git.denx.de/u-boot-dm
Tom Rini [Thu, 6 Dec 2018 01:32:25 +0000 (20:32 -0500)]
Merge tag 'dm-pull-5dec18' of git://git.denx.de/u-boot-dm

Minor sandbox enhancements  / fixes
tpm improvements to clear up v1/v2 support
buildman toolchain fixes
New serial options to set/get config

5 years agoMerge branch 'master' of git://git.denx.de/u-boot-spi
Tom Rini [Wed, 5 Dec 2018 20:06:24 +0000 (15:06 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-spi

- Various MTD fixes from Boris
- Zap various unused / legacy paths.
- pxa3xx NAND update from Miquel

Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agomtd: sf: Make sf_mtd.c more robust
Boris Brezillon [Sun, 2 Dec 2018 09:54:32 +0000 (10:54 +0100)]
mtd: sf: Make sf_mtd.c more robust

SPI flash based MTD devs can be registered/unregistered at any time
through the sf probe command or the spi_flash_free() function.

This commit does not try to fix the root cause as it would probably
require rewriting most of the code and have an mtd_info object
instance per spi_flash object (not to mention that the the spi-flash
layer is likely to be replaced by a spi-nor layer ported from Linux).

Instead, we try to be as safe as can be by checking the code returned
by del_mtd_device() and complain loudly when there's nothing we can
do about the deregistration failure. When that happens we also reset
sf_mtd_info.priv to NULL, and check for NULL pointer in the mtd hooks
so that -ENODEV is returned instead of hitting a NULL pointer
dereference exception when the MTD instance is later accessed by a user.

Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Tested-by: Heiko Schocher <hs@denx.de>
5 years agomtd: sf: Unregister the MTD device prior to removing the spi_flash obj
Boris Brezillon [Sun, 2 Dec 2018 09:54:31 +0000 (10:54 +0100)]
mtd: sf: Unregister the MTD device prior to removing the spi_flash obj

The DM implementation of spi_flash_free() does not unregister the MTD
device before removing the spi dev object. This leads to a use-after-free
bug when the MTD device is later accessed by a MTD user (observed when
attaching the device to UBI after env_sf_load() has called
spi_flash_free()).

Implement ->remove() and call spi_flash_mtd_unregister() from there.

Fixes: 9fe6d8716e09 ("mtd, spi: Add MTD layer driver")
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Tested-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Jagan Teki <jagan@openedev.com>
5 years agomtd: Don't stop MTD partition creation when it fails on one device
Boris Brezillon [Sun, 2 Dec 2018 09:54:30 +0000 (10:54 +0100)]
mtd: Don't stop MTD partition creation when it fails on one device

MTD partition creation code is a bit tricky. It tries to figure out
when things have changed (either MTD dev list or mtdparts/mtdids vars)
and when that happens it first deletes all the partitions that had been
previously created and then creates the new ones based on the new
mtdparts/mtdids values.
But before deleting the old partitions, it ensures that none of the
currently registered parts are being used and bails out when that's
not the case. So, we end up in a situation where, if at least one MTD
dev has one of its partitions used by someone (UBI for instance), the
partitions update logic no longer works for other devs.

Rework the code to relax the logic and allow updates of MTD parts on
devices that are not being used (we still refuse to updates parts on
devices who have at least one of their partitions used by someone).

Fixes: 5db66b3aee6f ("cmd: mtd: add 'mtd' command")
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Tested-by: Heiko Schocher <hs@denx.de>
5 years agomtd: Make sure we don't parse MTD partitions belonging to another dev
Boris Brezillon [Sun, 2 Dec 2018 09:54:29 +0000 (10:54 +0100)]
mtd: Make sure we don't parse MTD partitions belonging to another dev

The mtdparts variable might contain partition definitions for several
MTD devices. Each partition layout is separated by a ';', so let's
make sure we don't pick a wrong name when mtdparts is malformed.

Fixes: 5db66b3aee6f ("cmd: mtd: add 'mtd' command")
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Tested-by: Heiko Schocher <hs@denx.de>
5 years agomtd: Make sure the name passed in mtdparts fits in mtd_name[]
Boris Brezillon [Sun, 2 Dec 2018 09:54:28 +0000 (10:54 +0100)]
mtd: Make sure the name passed in mtdparts fits in mtd_name[]

The local mtd_name[] variable is limited in size. Return an error if
the name passed in mtdparts does not fit in this local var.

Fixes: 5db66b3aee6f ("cmd: mtd: add 'mtd' command")
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Tested-by: Heiko Schocher <hs@denx.de>
5 years agomtd: Be more strict on the "mtdparts=" prefix check
Boris Brezillon [Sun, 2 Dec 2018 09:54:27 +0000 (10:54 +0100)]
mtd: Be more strict on the "mtdparts=" prefix check

strstr() does not guarantee that the string we're searching for is
placed at the beginning. Use strncmp() instead.

Fixes: 5db66b3aee6f ("cmd: mtd: add 'mtd' command")
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Tested-by: Heiko Schocher <hs@denx.de>
5 years agomtd: Use get_mtdids() instead of env_get("mtdids") in mtd_search_alternate_name()
Boris Brezillon [Sun, 2 Dec 2018 09:54:26 +0000 (10:54 +0100)]
mtd: Use get_mtdids() instead of env_get("mtdids") in mtd_search_alternate_name()

The environment is not guaranteed to contain a valid mtdids variable
when called from mtd_search_alternate_name(). Call get_mtdids() instead
of env_get("mtdids").

Fixes: ff4afa8a981e ("mtd: uboot: search for an equivalent MTD name with the mtdids")
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Tested-by: Heiko Schocher <hs@denx.de>
5 years agomtd: sf: Make sure we don't register the same device twice
Boris Brezillon [Sun, 2 Dec 2018 09:54:25 +0000 (10:54 +0100)]
mtd: sf: Make sure we don't register the same device twice

spi_flash_mtd_register() can be called several times and each time it
will register the same mtd_info instance like if it was a new one.
The MTD ID allocation gets crazy when that happens, so let's track the
status of the sf_mtd_info object to avoid that.

Fixes: 9fe6d8716e09 ("mtd, spi: Add MTD layer driver")
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Tested-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Jagan Teki <jagan@openedev.com>
5 years agomtd: Delete partitions attached to the device when a device is deleted
Boris Brezillon [Sun, 2 Dec 2018 09:54:24 +0000 (10:54 +0100)]
mtd: Delete partitions attached to the device when a device is deleted

If we don't do that, partitions might still be exposed while the
underlying device is gone.

Fixes: 2a74930da57f ("mtd: mtdpart: implement proper partition handling")
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Tested-by: Heiko Schocher <hs@denx.de>
5 years agomtd: Parse mtdparts/mtdids again when the MTD list has been updated
Boris Brezillon [Sun, 2 Dec 2018 09:54:23 +0000 (10:54 +0100)]
mtd: Parse mtdparts/mtdids again when the MTD list has been updated

Updates to the MTD device list should trigger a new parsing of the
mtdids/mtdparts vars even if those vars haven't changed.

Fixes: 5db66b3aee6f ("cmd: mtd: add 'mtd' command")
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Tested-by: Heiko Schocher <hs@denx.de>
5 years agomtd: Add a function to report when the MTD dev list has been updated
Boris Brezillon [Sun, 2 Dec 2018 09:54:22 +0000 (10:54 +0100)]
mtd: Add a function to report when the MTD dev list has been updated

We need to parse mtdparts/mtids again everytime a device has been
added/removed from the MTD list, but there's currently no way to know
when such an update has been done.

Add an ->updated field to the idr struct that we set to true every time
a device is added/removed and expose a function returning the value
of this field and resetting it to false.

Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Tested-by: Heiko Schocher <hs@denx.de>
5 years agox86: acpi: Generate SPCR table
Andy Shevchenko [Tue, 20 Nov 2018 21:52:38 +0000 (23:52 +0200)]
x86: acpi: Generate SPCR table

Microsoft specifies a SPCR (Serial Port Console Redirection Table) [1].
Let's provide it in U-Boot.

[1]: https://docs.microsoft.com/en-us/windows-hardware/drivers/serports/serial-port-console-redirection-table

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agox86: acpi: Add SPCR table description
Andy Shevchenko [Tue, 20 Nov 2018 21:52:37 +0000 (23:52 +0200)]
x86: acpi: Add SPCR table description

Add SPCR table description as it provided in Linux kernel.

Port subtype for ACPI_DBG2_SERIAL_PORT is used as an interface type in SPCR.
Thus, provide a set of definitions to be utilized later.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
5 years agoserial: ns16550: Provide ->getinfo() implementation
Andy Shevchenko [Tue, 20 Nov 2018 21:52:36 +0000 (23:52 +0200)]
serial: ns16550: Provide ->getinfo() implementation

New callback will supply necessary information, for example,
to ACPI SPCR table.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agoMerge git://git.denx.de/u-boot-riscv
Tom Rini [Wed, 5 Dec 2018 13:24:50 +0000 (08:24 -0500)]
Merge git://git.denx.de/u-boot-riscv

- Fix BBL may be corrupted problem.
- Support U-Boot run in S-mode.

5 years agoMerge tag 'video-updates-for-2019.01-rc2' of git://git.denx.de/u-boot-video
Tom Rini [Wed, 5 Dec 2018 13:24:14 +0000 (08:24 -0500)]
Merge tag 'video-updates-for-2019.01-rc2' of git://git.denx.de/u-boot-video

video, bmp and cls command updates

5 years agoserial: ns16550: Read reg-io-width from device tree
Andy Shevchenko [Tue, 20 Nov 2018 21:52:35 +0000 (23:52 +0200)]
serial: ns16550: Read reg-io-width from device tree

Cache the value of the reg-io-width property for the future use.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agoserial: ns16550: Group reg_* members of ns16550_platdata
Andy Shevchenko [Tue, 20 Nov 2018 21:52:34 +0000 (23:52 +0200)]
serial: ns16550: Group reg_* members of ns16550_platdata

Group reg_* members of struct ns16550_platdata together for better maintenance.

No functional change intended.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agodm: serial: Introduce ->getinfo() callback
Andy Shevchenko [Tue, 20 Nov 2018 21:52:33 +0000 (23:52 +0200)]
dm: serial: Introduce ->getinfo() callback

New callback will give a necessary information to fill up ACPI SPCR table,
for example. Maybe used later for other purposes.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Change ADR_SPACE_SYSTEM_IO to SERIAL_ADDRESS_SPACE_IO to fix build error:
Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agodm: serial: Add ->getconfig() callback
Andy Shevchenko [Tue, 20 Nov 2018 21:52:32 +0000 (23:52 +0200)]
dm: serial: Add ->getconfig() callback

In some cases it would be good to know the settings, such as parity,
of current serial console. One example might be an ACPI SPCR table
to generate using these parameters.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agopower: regulator: denied disable on always-on regulator
Patrick Delaunay [Thu, 15 Nov 2018 12:45:31 +0000 (13:45 +0100)]
power: regulator: denied disable on always-on regulator

Don't disable regulator which are tagged as "regulator-always-on" in DT.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jack Mitchell <jack@embed.me.uk>
Tested-by: Jack Mitchell <jack@embed.me.uk>
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Richard Röjfors <richard@puffinpack.se>
Tested-by: Richard Röjfors <richard@puffinpack.se>
Reviewed-by: Felix Brack <fb@ltec.ch>
Tested-by: Felix Brack <fb@ltec.ch>
5 years agodm: core: add functions to get/remap I/O addresses by name
Álvaro Fernández Rojas [Mon, 3 Dec 2018 18:37:09 +0000 (19:37 +0100)]
dm: core: add functions to get/remap I/O addresses by name

This functions allow us to get and remap I/O addresses by name, which is useful when there are multiple reg addresses indexed by reg-names property.
This is needed in bmips dma/eth patch series, but can also be used on many
other drivers.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agobinman: Add myself as maintainer
Simon Glass [Mon, 26 Nov 2018 03:07:26 +0000 (20:07 -0700)]
binman: Add myself as maintainer

Add an entry for my maintainership of this tool.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agodm: (re)sort uclass ids alphabetically
Philipp Tomsich [Sun, 25 Nov 2018 18:38:54 +0000 (19:38 +0100)]
dm: (re)sort uclass ids alphabetically

The comment in uclass-id.h states that
    "U-Boot uclasses start here - in alphabetical order"
but the subsequent list is not sorted alphabetically.
This reestablishes order.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
5 years agodm: rtc: Fix function name in comment
Philipp Tomsich [Sun, 25 Nov 2018 18:32:54 +0000 (19:32 +0100)]
dm: rtc: Fix function name in comment

The documentation comment for dm_rtc_set was referring to dm_rtc_put
instead. Fix it.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
5 years agobuildman/toolchain.py: handle inconsistent tarball names
Trevor Woerner [Wed, 21 Nov 2018 08:31:13 +0000 (03:31 -0500)]
buildman/toolchain.py: handle inconsistent tarball names

Unfortunately, for some releases the kernel.org toolchain tarball names adhere
to the following pattern:

<hostarch>-gcc-<ver>-nolib-<targetarch>-<type>.tar.xz

e.g.:
x86_64-gcc-8.1.0-nolibc-aarch64-linux.tar.xz

while others use the following pattern:

<hostarch>-gcc-<ver>-nolib_<targetarch>-<type>.tar.xz

e.g.:

x86_64-gcc-7.3.0-nolibc_aarch64-linux.tar.xz

Notice that the first pattern has dashes throughout, while the second has
dashes throughout except just before the target architecture which has an
underscore.

The "dash throughout" versions from kernel.org are:

8.1.0, 6.4.0, 5.5.0, 4.9.4, 4.8.5, 4.6.1

while the "dash and underscore" versions from kernel.org are:

7.3.0, 4.9.0, 4.8.0, 4.7.3, 4.6.3, 4.6.2, 4.5.1, 4.2.4

This tweak allows the code to handle both versions. Note that this tweak also
causes the architecture parsing to get confused and find the following two
bogus architectures, "2.0" and "64", which are explicitly checked for, and
removed.

Signed-off-by: Trevor Woerner <trevor@toganlabs.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Change single quotes to double quotes:
Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agobuildman/toolchain.py: fix toolchain directory
Trevor Woerner [Wed, 21 Nov 2018 08:31:12 +0000 (03:31 -0500)]
buildman/toolchain.py: fix toolchain directory

The hexagon toolchain (4.6.1) from kernel.org, for example, was packaged in
a way that is different from most toolchains. The first entry when unpacking
most toolchain tarballs is:

gcc-<version>-nolib/<targetarch>-<system>

e.g.:

gcc-8.1.0-nolibc/aarch64-linux/

The first entry of the hexagon toolchain, however, is:

gcc-4.6.1-nolibc/

This causes the buildman logic in toolchain.py::ScanPath() to not be able to
find the "*gcc" executable since it looks in gcc-4.6.1-nolib/{.|bin|usr/bin}
instead of gcc-4.6.1/hexagon-linux/{.|bin|usr/bin}. Therefore when buildman
tries to download a set of toolchains that includes hexagon, the script fails.

This update takes the second line of the tarball unpacking (which works for
all the toolchains I've tested from kernel.org) and parses it to take the
first two elements, separated by '/'. It makes this logic a bit more robust.

Signed-off-by: Trevor Woerner <trevor@toganlabs.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agoAdd inttypes.h
Simon Glass [Sat, 24 Nov 2018 04:29:43 +0000 (21:29 -0700)]
Add inttypes.h

Even if U-Boot does not use this, some libraries do. Add back this header
file so that the build does not fall back to using the host version, which
may include stdint.h and break the build due to conflicts with uint64_t,
etc.

This partially reverts commit dee37fc99d94 ("Remove <inttypes.h> includes
and PRI* usages in printf() entirely")

The only change from the file that was in U-Boot until recently is that it
now comes twice as close to passing checkpatch. The remaining warnings
pertain to the typedefs, which checkpatch does not like.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agoAdd UINT32_MAX and UINT64_MAX
Simon Glass [Sat, 24 Nov 2018 04:29:42 +0000 (21:29 -0700)]
Add UINT32_MAX and UINT64_MAX

These constants are defined by stdint.h but not by kernel.h, which is
its stand-in in U-Boot. Add the definitions so that libraries which expect
stdint.h constants can work.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agotime: Update mdelay() to delay in one large chunk
Simon Glass [Sat, 24 Nov 2018 04:29:40 +0000 (21:29 -0700)]
time: Update mdelay() to delay in one large chunk

The current function delays in one millisecond at a time. This does not
work well on sandbox since it results in lots of calls to usleep(1000) in
a tight loop. This makes the sleep duration quite variable since each call
results in a sleep of *at least* 1000us, but possibly more. Depending on
how busy the machine is, the sleep time can change quite a bit.

We cannot fix this in general, but we can reduce the effect by doing a
single sleep. The multiplication works fine with an unsigned long argument
up until a sleep time of about 4m milliseconds. This is over an hour and
we can be sure that delays of that length are not useful.

Update the mdelay() function to call udelay() only once with the
calculated delay value.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agovideo: backlight: Fix log message in enable_sequence()
Simon Glass [Sat, 24 Nov 2018 04:29:39 +0000 (21:29 -0700)]
video: backlight: Fix log message in enable_sequence()

This has an extra argument. Remove it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Anatolij Gustschin <agust@denx.de>
5 years agoinput: i8042: Use remove() instead of exported functions
Simon Glass [Sat, 24 Nov 2018 04:29:38 +0000 (21:29 -0700)]
input: i8042: Use remove() instead of exported functions

We should not have exported functions in a driver. The i8042_disable()
function is used to disable the keyboard. Provide a remove() method
instead, which is the standard way of disabling a device.

We could potentially add a method to flush input but that does not seem
necessary.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agocros_ec: Adjust to use v1 vboot context only
Simon Glass [Sat, 24 Nov 2018 04:29:37 +0000 (21:29 -0700)]
cros_ec: Adjust to use v1 vboot context only

At present there are no users of the 64-byte v2 context. The v1 context is
only 16 bytes long and currently an error is raised if too much data is
returned from the EC.

Update the code to limit the size to 16 bytes.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agocros: Correct a printf() string and comment
Simon Glass [Sat, 24 Nov 2018 04:29:36 +0000 (21:29 -0700)]
cros: Correct a printf() string and comment

Correct a warning that occurs on sandbox. Also fix the comment style in
cros_ec_set_lid_shutdown_mask().

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agotpm: Fix a logging warning in unpack_byte_string()
Simon Glass [Sat, 24 Nov 2018 04:29:35 +0000 (21:29 -0700)]
tpm: Fix a logging warning in unpack_byte_string()

Fix the printf() string to avoid a warning.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agotpm: Add non-volatile index attributes needed for v2
Simon Glass [Sat, 24 Nov 2018 04:29:34 +0000 (21:29 -0700)]
tpm: Add non-volatile index attributes needed for v2

Version-2 TPMs support attributes for nvdata. Add definitions to the
header file so that clients can use it.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agotpm: Export tpm_clear_and_reenable()
Simon Glass [Sat, 24 Nov 2018 04:29:33 +0000 (21:29 -0700)]
tpm: Export tpm_clear_and_reenable()

This function is intended to be exported but is not. Add it to the header
file.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agotpm: Remove use of build-time TPM versions
Simon Glass [Sat, 24 Nov 2018 04:29:32 +0000 (21:29 -0700)]
tpm: Remove use of build-time TPM versions

There is only one place in the code which assumes at build-time that we
are using either a v1 or a v2 TPM. Fix this up and add a new function to
return the version of a TPM.

Supported TPM versions (v1 and v2) can be enabled independently and it is
possible to use both versions at once. This is useful for sandbox when
running tests.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agosandbox: Use 'extras' to specify 'head' files
Simon Glass [Sat, 24 Nov 2018 04:29:30 +0000 (21:29 -0700)]
sandbox: Use 'extras' to specify 'head' files

At present sandbox has a start.o in the 'start' target but also includes
it in the normal target list. This is not how this is normally handled. It
is needed because sandbox does not include the u-boot-init variable in its
link rule.

Update the rule and move start.o from the normal target list to the
'extras' list.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agosandbox: Zero the ram buffer on startup
Simon Glass [Sat, 24 Nov 2018 04:29:29 +0000 (21:29 -0700)]
sandbox: Zero the ram buffer on startup

At present the RAM buffer is not inited unless it is read from a file,
likely produced by an earlier phase of U-Boot. This causes valgrind
warnings whenever the RAM buffer is used. Correct this by initing it if
needed.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agosandbox: sysreset: Update to support power-on reset
Simon Glass [Sat, 24 Nov 2018 04:29:28 +0000 (21:29 -0700)]
sandbox: sysreset: Update to support power-on reset

If U-Boot is started from SPL or TPL, then those earlier phases deal with
the reset cause. On real hardware this cause may be lost once it is read.
Emulate that behaviour in sandbox by reporting a warm reset when a
previous phase has run since start-up.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agosandbox: net: Correct name copy in eth_raw_bus_post_bind()
Simon Glass [Sat, 24 Nov 2018 04:29:27 +0000 (21:29 -0700)]
sandbox: net: Correct name copy in eth_raw_bus_post_bind()

We cannot be sure that the interface name takes up the full length of the
space available to it. Use strcpy() instead of memcpy() in this case. This
corrects a valgrind warning.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agosandbox: physmem: Use mapping to support sandbox
Simon Glass [Sat, 24 Nov 2018 04:29:26 +0000 (21:29 -0700)]
sandbox: physmem: Use mapping to support sandbox

Replace the raw cast with a map_sysmem() call so this code works with
sandbox.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agosandbox: Check the filename in jump_to_image_no_args()
Simon Glass [Sat, 24 Nov 2018 04:29:25 +0000 (21:29 -0700)]
sandbox: Check the filename in jump_to_image_no_args()

If the filename is NULL this function currently crashes. Update it to fail
gracefully.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agosandbox: Fix up the debug message for the image filename
Simon Glass [Sat, 24 Nov 2018 04:29:24 +0000 (21:29 -0700)]
sandbox: Fix up the debug message for the image filename

This currently prints out the wrong filename. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agoriscv: ax25-ae350: Pass dtb address to u-boot with a1 register
Rick Chen [Mon, 3 Dec 2018 09:48:20 +0000 (17:48 +0800)]
riscv: ax25-ae350: Pass dtb address to u-boot with a1 register

ax25-ae350 use CONFIG_OF_BOARD via a2 and CONFIG_SYS_SDRAM_BASE
to boot from ram which allow the board to override the fdt
address originally.

But after this patch
riscv: save hart ID and device tree passed by prior boot stage
It provide prior_stage_fdt_address which offer a temporary
memory address to keep the dtb address passing from loader(gdb)
to u-boot with a1.

So passing via a2 and CONFIG_SYS_SDRAM_BASE is redundant and
can be removed. And it also somehow may corrupted BBL if it
was be arranged in CONFIG_SYS_SDRAM_BASE.

In board_fdt_blob_setup()
When boting from ram:
prior_stage_fdt_address will be use to reserved dtb temporarily.

When booting from ROM:
dtb will be pre-burned in CONFIG_SYS_FDT_BASE, if it is flash base.
Or CONFIG_SYS_FDT_BASE maybe a memory map space (NOT RAM or ROM)
which is provided by HW.

Signed-off-by: Rick Chen <rick@andestech.com>
Cc: Greentime Hu <greentime@andestech.com>
5 years agoriscv: Add S-mode defconfigs for QEMU virt machine
Anup Patel [Mon, 3 Dec 2018 05:27:42 +0000 (10:57 +0530)]
riscv: Add S-mode defconfigs for QEMU virt machine

This patch adds S-mode defconfigs for QEMU virt machine so
that we can run u-boot in S-mode on QEMU using M-mode runtime
firmware (BBL or equivalent).

Signed-off-by: Anup Patel <anup@brainfault.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
5 years agoriscv: qemu: Use different SYS_TEXT_BASE for S-mode
Anup Patel [Mon, 3 Dec 2018 05:27:41 +0000 (10:57 +0530)]
riscv: qemu: Use different SYS_TEXT_BASE for S-mode

When u-boot runs in S-mode, the M-mode runtime firmware
(BBL or equivalent) uses memory range in 0x80000000 to
0x80200000. Due to this, we cannot use 0x80000000 as
SYS_TEXT_BASE when running in S-mode. Instead for S-mode,
we use 0x80200000 as SYS_TEXT_BASE.

Even Linux RISC-V kernel ignores/reserves memory range
0x80000000 to 0x80200000 because it runs in S-mode.

Signed-off-by: Anup Patel <anup@brainfault.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
5 years agoriscv: Add kconfig option to run U-Boot in S-mode
Anup Patel [Mon, 3 Dec 2018 05:27:40 +0000 (10:57 +0530)]
riscv: Add kconfig option to run U-Boot in S-mode

This patch adds kconfig option RISCV_SMODE to run U-Boot in
S-mode. When this opition is enabled we use s<xyz> CSRs instead
of m<xyz> CSRs.

It is important to note that there is no equivalent S-mode CSR
for misa and mhartid CSRs so we expect M-mode runtime firmware
(BBL or equivalent) to emulate misa and mhartid CSR read.

In-future, we will have more patches to avoid accessing misa and
mhartid CSRs from S-mode.

Signed-off-by: Anup Patel <anup@brainfault.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
5 years agoMerge branch 'master' of git://git.denx.de/u-boot-sh
Tom Rini [Wed, 5 Dec 2018 00:22:31 +0000 (19:22 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-sh

- DT sync with Linux 4.19 and minor fixes.

5 years agovideo: use BMP_ALIGN_CENTER define from splash.h
Anatolij Gustschin [Sat, 1 Dec 2018 14:30:08 +0000 (15:30 +0100)]
video: use BMP_ALIGN_CENTER define from splash.h

Drop BMP_ALIGN_CENTER define in lcd.c and video_bmp.c as it is
already defined by splash.h. Include splash.h in bmp code.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
5 years agocmd: bmp: manage centered display
Patrick Delaunay [Sat, 1 Dec 2018 13:41:07 +0000 (14:41 +0100)]
cmd: bmp: manage centered display

Allow to display BMP at the middle of the screen.

'm' means "middle" as it is done for the splashscreen variable:
splashpos=m,m

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agocmd: add clear screen 'cls' command
Anatolij Gustschin [Sat, 1 Dec 2018 09:47:20 +0000 (10:47 +0100)]
cmd: add clear screen 'cls' command

Add common clear screen command for configurations
CONFIG_DM_VIDEO, CONFIG_LCD and CONFIG_CFB_CONSOLE.

Remove the existing cls command implementation from
lcd.c code and activate the command for all boards
enabling CONFIG_LCD for compatibility reasons.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Tested-by: Patrick.Delaunay <patrick.delaunay@free.fr>
5 years agoARM: dts: Turn ULCB into Multi-DTB config
Marek Vasut [Tue, 4 Dec 2018 00:44:34 +0000 (01:44 +0100)]
ARM: dts: Turn ULCB into Multi-DTB config

Bundle DTBs for R8A7795, R8A7796 ULCB variants into single U-Boot
build and let U-Boot choose between them based on the CPU model.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
5 years agoARM: dts: Turn Salvator-X into Multi-DTB config
Marek Vasut [Thu, 18 Oct 2018 18:30:00 +0000 (20:30 +0200)]
ARM: dts: Turn Salvator-X into Multi-DTB config

Bundle DTBs for R8A7795, R8A7796, R8A77965 Salvator-X variants
into the single U-Boot build and let U-Boot choose between them
based on the CPU model.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
5 years agoARM: rmobile: Drop unused macros from Gen3 boards
Marek Vasut [Tue, 4 Dec 2018 00:32:29 +0000 (01:32 +0100)]
ARM: rmobile: Drop unused macros from Gen3 boards

Drop unused MSTP macros from Gen3 boards. These are no longer needed
as the boards are using clock framework to manipulate clock.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
5 years agoARM: rmobile: Set environment variable containing CPU type
Marek Vasut [Mon, 3 Dec 2018 12:28:25 +0000 (13:28 +0100)]
ARM: rmobile: Set environment variable containing CPU type

Set environment variable 'platform' containing the CPU type.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
5 years agoARM: rmobile: Enable MMC extensions
Marek Vasut [Mon, 3 Dec 2018 22:46:11 +0000 (23:46 +0100)]
ARM: rmobile: Enable MMC extensions

Enable extended MMC commands and GPT partition table support.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
---
V2: Rebase on u-boot/master

5 years agoARM: dts: rmobile: Sync Gen3 DTs with Linux 4.19.6
Marek Vasut [Mon, 3 Dec 2018 20:43:05 +0000 (21:43 +0100)]
ARM: dts: rmobile: Sync Gen3 DTs with Linux 4.19.6

Synchronize DTs with mainline Linux 4.19.6 ,
commit 96db90800c06d3fe3fa08eb6222fe201286bb778

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
---
V2: Rebase on u-boot/master

5 years agoARM: dts: rmobile: Sync Gen2 DTs with Linux 4.19.6
Marek Vasut [Mon, 3 Dec 2018 20:39:48 +0000 (21:39 +0100)]
ARM: dts: rmobile: Sync Gen2 DTs with Linux 4.19.6

Synchronize DTs with mainline Linux 4.19.6 ,
commit 96db90800c06d3fe3fa08eb6222fe201286bb778

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
---
V2: Rebase on u-boot/master

5 years agoARM: dts: rmobile: Extract i2c6 on M2W Porter
Marek Vasut [Mon, 3 Dec 2018 20:30:44 +0000 (21:30 +0100)]
ARM: dts: rmobile: Extract i2c6 on M2W Porter

The i2c6 node is missing in mainline Linux thus far, pull it
into U-Boot specific DT until it hits mainline Linux, to make
syncing of DTs easier.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
---
V2: Rebase on u-boot/master

5 years agoARM: dts: rmobile: Extract SCIF2 node on E3 Ebisu
Marek Vasut [Mon, 3 Dec 2018 21:14:09 +0000 (22:14 +0100)]
ARM: dts: rmobile: Extract SCIF2 node on E3 Ebisu

The SCIF2 node is not in Linux 4.17 DTs on E3, pull it into U-Boot
specific DT extras until it hits mainline Linux, to make syncing of
DTs easier.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
---
V2: Rebase on u-boot/master

5 years agoARM: dts: rmobile: Extract SDHI nodes on E3 Ebisu
Marek Vasut [Mon, 3 Dec 2018 21:12:47 +0000 (22:12 +0100)]
ARM: dts: rmobile: Extract SDHI nodes on E3 Ebisu

The SDHI nodes are not in Linux 4.17 DTs in E3, pull them into U-Boot
specific DT extras until they hit mainline Linux, to make syncing of
DTs easier.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
---
V2: Rebase on u-boot/master

5 years agoARM: dts: rmobile: Extract SDHI extras on H3, M3W, M3N Salvator-X
Marek Vasut [Mon, 3 Dec 2018 19:58:13 +0000 (20:58 +0100)]
ARM: dts: rmobile: Extract SDHI extras on H3, M3W, M3N Salvator-X

The SDHI nodes are missing features supported in upstream U-Boot,
like mode support properties. Pull the extras into U-Boot specific
DT until it hits mainline Linux, to make syncing of DTs easier.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
---
V2: Rebase on u-boot/master

5 years agoARM: dts: rmobile: Extract SDHI extras on H3 and M3W ULCB
Marek Vasut [Mon, 3 Dec 2018 19:55:01 +0000 (20:55 +0100)]
ARM: dts: rmobile: Extract SDHI extras on H3 and M3W ULCB

The SDHI nodes are missing features supported in upstream U-Boot,
like mode support properties. Pull the extras into U-Boot specific
DT until it hits mainline Linux, to make syncing of DTs easier.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
---
V2: Rebase on u-boot/master

5 years agoARM: dts: rmobile: Extract CPLD node on H3 and M3W ULCB
Marek Vasut [Mon, 3 Dec 2018 19:48:16 +0000 (20:48 +0100)]
ARM: dts: rmobile: Extract CPLD node on H3 and M3W ULCB

The CPLD node is missing in Linux 4.17 DTs on H3/M3W ULCB, pull the
node into U-Boot specific DT until it hits mainline Linux, to make
syncing of DTs easier.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
---
V2: Rebase on u-boot/master

5 years agoARM: dts: rmobile: Extract AVB node extras on V3M Eagle
Marek Vasut [Mon, 3 Dec 2018 19:45:22 +0000 (20:45 +0100)]
ARM: dts: rmobile: Extract AVB node extras on V3M Eagle

The AVB node is not complete in Linux 4.17 DTs on V3M Eagle, pull the
AVB node extras into U-Boot specific DT until they hit mainline Linux,
to make syncing of DTs easier.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
---
V2: Rebase on u-boot/master

5 years agoARM: dts: rmobile: Extract SDHI nodes on M3N
Marek Vasut [Mon, 3 Dec 2018 19:39:07 +0000 (20:39 +0100)]
ARM: dts: rmobile: Extract SDHI nodes on M3N

The SDHI nodes are not in Linux 4.17 DTs in M3N, pull them into U-Boot
specific DT extras until they hit mainline Linux, to make syncing of
DTs easier.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
---
V2: Rebase on u-boot/master

5 years agoARM: dts: rmobile: Extract USB nodes on M3N
Marek Vasut [Mon, 3 Dec 2018 19:34:13 +0000 (20:34 +0100)]
ARM: dts: rmobile: Extract USB nodes on M3N

The USB nodes are not in Linux 4.17 DTs in M3N, pull them into U-Boot
specific DT extras until they hit mainline Linux, to make syncing of
DTs easier.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
---
V2: Rebase on u-boot/master

5 years agoARM: dts: rmobile: Extract RPC node to u-boot specific DT
Marek Vasut [Mon, 3 Dec 2018 19:17:50 +0000 (20:17 +0100)]
ARM: dts: rmobile: Extract RPC node to u-boot specific DT

The RPC DT bindings are still work in progress. Extract the RPC DT node
from the DT to allow easier update and so it can be replaced once the DT
bindings are stable.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
---
V2: Rebase on u-boot/master

5 years agoARM: dts: rmobile: Add soc label to Gen3
Marek Vasut [Mon, 3 Dec 2018 20:05:55 +0000 (21:05 +0100)]
ARM: dts: rmobile: Add soc label to Gen3

Add label to the /soc node, so it can be referenced from the U-Boot DTs.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
---
V2: Rebase on u-boot/master