oweals/u-boot.git
5 years agoconfigs: am65x_evm_a53: enable networking
Grygorii Strashko [Tue, 9 Jul 2019 05:00:37 +0000 (10:30 +0530)]
configs: am65x_evm_a53: enable networking

Enable TI K3 AM65x CPSW NUSS driver.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
5 years agoarm64: dts: k3-am654-base-board: add mcu cpsw nuss pinmux and phy defs
Grygorii Strashko [Tue, 9 Jul 2019 05:00:36 +0000 (10:30 +0530)]
arm64: dts: k3-am654-base-board: add mcu cpsw nuss pinmux and phy defs

Add mcu cpsw nuss pinmux and phy defs required by cpsw.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
5 years agoarm64: dts: ti: k3-am65: add mcu cpsw node
Grygorii Strashko [Tue, 9 Jul 2019 05:00:35 +0000 (10:30 +0530)]
arm64: dts: ti: k3-am65: add mcu cpsw node

Add mcu cpsw and its components along with scm_conf node
to have ethernet functional.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
5 years agonet: ethernet: ti: Introduce am654 gigabit eth switch subsystem driver
Keerthy [Tue, 9 Jul 2019 05:00:34 +0000 (10:30 +0530)]
net: ethernet: ti: Introduce am654 gigabit eth switch subsystem driver

Add new driver for the TI AM65x SoC Gigabit Ethernet Switch subsystem (CPSW
NUSS). It has two ports and provides Ethernet packet communication for the
device and can be configured as an Ethernet switch. CPSW NUSS features: the
Reduced Gigabit Media Independent Interface (RGMII), Reduced Media
Independent Interface (RMII), and the Management Data Input/Output (MDIO)
interface for physical layer device (PHY) management. The TI AM65x SoC has
integrated two-port Gigabit Ethernet Switch subsystem into device MCU
domain named MCU_CPSW0. One Ethernet port (port 1) with selectable RGMII
and RMII interfaces and an internal Communications Port Programming
Interface (CPPI) port (Host port 0).

Host Port 0 CPPI Packet Streaming Interface interface supports 8 TX
channels and on RX channels operating by TI am654 NAVSS Unified DMA
Peripheral Root Complex (UDMA-P) controller.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Keerthy <j-keerthy@ti.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
5 years agodriver: net: ti: cpsw-mdio: use phys_addr_t for mdio_base addr
Keerthy [Tue, 9 Jul 2019 05:00:33 +0000 (10:30 +0530)]
driver: net: ti: cpsw-mdio: use phys_addr_t for mdio_base addr

Use phys_addr_t for mdio_base address to avoid build
warnings on arm64 and dra7. Cast it to uintprt_t before
assigning to regs.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
5 years agonet: phy: cortina: Use block layer to read from mmc
Yinbo Zhu [Tue, 11 Jun 2019 06:29:03 +0000 (14:29 +0800)]
net: phy: cortina: Use block layer to read from mmc

This patch is to use block layer to read from mmc in cortina

Signed-off-by: Yinbo Zhu <yinbo.zhu@nxp.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
5 years agonet: mscc: refactor mscc_miim
Horatiu Vultur [Sun, 9 Jun 2019 13:27:29 +0000 (15:27 +0200)]
net: mscc: refactor mscc_miim

Because all MSCC SoC use the same MDIO bus, put the implementation in
one common file(mscc_miim) and make all the other MSCC network drivers to
use these functions.

Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
5 years agotest: dm: add MDIO test
Alex Marginean [Mon, 3 Jun 2019 16:12:28 +0000 (19:12 +0300)]
test: dm: add MDIO test

A very simple test for DM_MDIO, mimicks a register write/read through the
sandbox bus to a dummy PHY.

Signed-off-by: Alex Marginean <alexm.osslist@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
5 years agonet: introduce MDIO DM class for MDIO devices
Alex Marginean [Mon, 3 Jun 2019 16:10:30 +0000 (19:10 +0300)]
net: introduce MDIO DM class for MDIO devices

Adds UCLASS_MDIO DM class supporting MDIO buses that are probed as
stand-alone devices.  Useful in particular for systems that support
DM_ETH and have a stand-alone MDIO hardware block shared by multiple
Ethernet interfaces.

Signed-off-by: Alex Marginean <alexm.osslist@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
5 years agonet: mscc: serval: Remove delay when serdes is configured
Horatiu Vultur [Thu, 23 May 2019 19:45:33 +0000 (21:45 +0200)]
net: mscc: serval: Remove delay when serdes is configured

When serdes configuration was written in hardware there was a delay
of 100ms to be sure that configuration was written. But the delay is not
needed because already the function serdes_write it is checking that the
operation finished.

Therefore remove the mdelay. This improves the speed of configuring the
network driver.

Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
5 years agonet: phy: ti: Fix clock output DT property
Trent Piepho [Fri, 10 May 2019 17:49:08 +0000 (17:49 +0000)]
net: phy: ti: Fix clock output DT property

The code block reading the DT property for the clock output control was
before the phy's DT node pointer was set, so it could never work.  Move
it after the node pointer is set.

Also store the unsigned 32-bit property into an unsigned value, not a
signed value, as the former will cause a problem if value overflows.
For instance, if one were to add 0xffffffff as a code to mean the clock
output should be turned off.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Janine Hagemann <j.hagemann@phytec.de>
Cc: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Trent Piepho <tpiepho@impinj.com>
Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
5 years agonet: phy: ti: Use default values for tx/rx delay and fifo size
Trent Piepho [Thu, 9 May 2019 19:41:51 +0000 (19:41 +0000)]
net: phy: ti: Use default values for tx/rx delay and fifo size

When not using DM_ETH, these PHY settings are programmed with default
values hardcoded into the driver.  When using DM_ETH, they should come
from the device tree.  However, if the device tree does not have the
properties, the driver will silent use -1.  Which is entirely out of
range, programs nonsense into the PHY's registers, and does not work.

Change this to use the same defaults as non-DM_ETH if the device tree is
lacking the properties.

As an alternative, the kernel driver for the phy will display an error
message and fail if the device tree is lacking.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Janine Hagemann <j.hagemann@phytec.de>
Cc: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Trent Piepho <tpiepho@impinj.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
5 years agocmd: mii: Add the standard 1000BASE-T registers
Trent Piepho [Thu, 9 May 2019 19:23:47 +0000 (19:23 +0000)]
cmd: mii: Add the standard 1000BASE-T registers

These are standard across gigabit phys.  These mostly extend the
auto-negotiation information with gigabit fields.

Signed-off-by: Trent Piepho <tpiepho@impinj.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
5 years agocmd: mii: Refactor some of the MII reg dump code
Trent Piepho [Thu, 9 May 2019 19:23:39 +0000 (19:23 +0000)]
cmd: mii: Refactor some of the MII reg dump code

Share the code that prints out a register field with the function that
prints out the "special" fields.

There were two arrays the register dump list, one with reg number and
name, another with a pointer to the field table and the table size.
These two arrays had have each entry match what register is referred to.
Combine them into just one table.  Now they can't not match and there is
just one table.

Add some missing consts to pointers to string literals.

The dump code was ignoring the regno field in the description table and
assuming register 0 was at index 0, etc.  Have it use the field.

Change reg > max+1 into reg >= max, which doesn't fail if max+1 could
overflow, besides just making more sense.

Signed-off-by: Trent Piepho <tpiepho@impinj.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
5 years agoMerge tag 'u-boot-stm32-20190712' of https://gitlab.denx.de/u-boot/custodians/u-boot-stm
Tom Rini [Sun, 14 Jul 2019 13:09:49 +0000 (09:09 -0400)]
Merge tag 'u-boot-stm32-20190712' of https://gitlab.denx.de/u-boot/custodians/u-boot-stm

- syscon: add support for power off
- stm32mp1: add op-tee config
- stm32mp1: add specific commands: stboard and stm32key
- add stm32 mailbox driver
- solve many stm32 warnings when building with W=1
- update stm32 gpio driver

5 years agoMerge branch '2019-07-12-master-imports'
Tom Rini [Sun, 14 Jul 2019 13:05:20 +0000 (09:05 -0400)]
Merge branch '2019-07-12-master-imports'

- First round of TI Davinci updates
- Some OMAP3 DM updates
- Other misc updates

5 years agotest: Disable pci_ep test for now
Tom Rini [Sun, 14 Jul 2019 01:18:37 +0000 (21:18 -0400)]
test: Disable pci_ep test for now

This test is currently broken so disable it for now.

Cc: Ramon Fried <ramon.fried@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agoARM: dts: logicpd som-lvs and torpedos: Shrink SPL DTB
Adam Ford [Wed, 12 Jun 2019 20:26:26 +0000 (15:26 -0500)]
ARM: dts: logicpd som-lvs and torpedos: Shrink SPL DTB

Since we have limited resources in SPL, it is the best interest
to keep the SPL as small as possible and that includes the DTB.
There are a few items in the device tree that can be removed,
because these boards don't use them.

Signed-off-by: Adam Ford <aford173@gmail.com>
5 years agoregulator: Allow autosetting fixed regulators
Sven Schwermer [Wed, 12 Jun 2019 06:32:38 +0000 (08:32 +0200)]
regulator: Allow autosetting fixed regulators

Fixed regulators don't have a set_value method. Therefore, trying to
set their value will always return -ENOSYS.

Signed-off-by: Sven Schwermer <sven@svenschwermer.de>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Cc: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agogpio: add gpio-hog support
Heiko Schocher [Wed, 12 Jun 2019 04:11:46 +0000 (06:11 +0200)]
gpio: add gpio-hog support

add gpio-hog support. GPIO hogging is a mechanism
providing automatic GPIO request and configuration
as part of the gpio-controller's driver probe function.

for more infos see:
doc/device-tree-bindings/gpio/gpio.txt

Signed-off-by: Heiko Schocher <hs@denx.de>
Tested-by: Michal Simek <michal.simek@xilinx.com> (zcu102)
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agoARM: dts: logicpd-som-lv: Resync with Kernel 5.1.9
Adam Ford [Wed, 12 Jun 2019 01:40:42 +0000 (20:40 -0500)]
ARM: dts: logicpd-som-lv: Resync with Kernel 5.1.9

The MMC card-detect pin was incorrectly defined which was fixed.
This patch resync's the dts and removes the u-boot specific fix.

Signed-off-by: Adam Ford <aford173@gmail.com>
5 years agoARM: dts: da850: Resync with Linux 5.1.9
Adam Ford [Wed, 12 Jun 2019 01:28:44 +0000 (20:28 -0500)]
ARM: dts: da850: Resync with Linux 5.1.9

The da850.dtsi file had some changes.  This patch pulls in the
changes from Kernel 5.1.9

Signed-off-by: Adam Ford <aford173@gmail.com>
5 years agoARM: davinci: da850: Manual pinmux only when PINCTRL not available
Adam Ford [Mon, 10 Jun 2019 18:25:08 +0000 (13:25 -0500)]
ARM: davinci: da850: Manual pinmux only when PINCTRL not available

With a recent update to the pinctrl-single driver and the fact
that the da850evm has both DM and OF_CONTROL working in both SPL
and U-Boot, some of the manual pinmuxing can be setup to only
be activated when either the driver doesn't have DM for it, or
when CONFIG_PINMUX isn't available (only during SPL).  If the
code ever shrinks enough to support PINCTRL in SPL, a lot of this
can go away.  This also remove some manual pinmuxing not needed
by SPL to give SPL a little more breathing room.

Signed-off-by: Adam Ford <aford173@gmail.com>
5 years agopinctrl: pinctrl-single: Add 'pinctrl-single, bits' support
Adam Ford [Mon, 10 Jun 2019 18:15:55 +0000 (13:15 -0500)]
pinctrl: pinctrl-single: Add 'pinctrl-single, bits' support

The TI Davinci (da850/l138/am1808) use pinctrl-single,bits for
pinmuxing peripherals.  This patch allosw the pinctrl-single
driver to parse the pinctrl-single,bits options and correctly
setup devices.

Signed-off-by: Adam Ford <aford173@gmail.com>
5 years agoconfigs: Make USE_TINY_PRINTF depend on SPL||TPL and be default
Tom Rini [Sat, 8 Jun 2019 16:46:18 +0000 (12:46 -0400)]
configs: Make USE_TINY_PRINTF depend on SPL||TPL and be default

The USE_TINY_PRINTF symbol only changes things within SPL and TPL
builds, so make it depend on that support.  Next, make it default as
within these cases we should rarely have need of more advanced print
formats outside of the debug context.

To do this, in a few cases we need to correct our Kconfig dependencies
as we had cases of non-SPL targets select'ing this symbol.  Finally, in
the case of a few boards we really do need the full printf
functionality.

Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agopower: regulator: Kconfig: Add SPL_DM_REGULATOR configs for palmas/lp873x/lp87565
Keerthy [Thu, 6 Jun 2019 10:36:56 +0000 (16:06 +0530)]
power: regulator: Kconfig: Add SPL_DM_REGULATOR configs for palmas/lp873x/lp87565

Add SPL_DM_REGULATOR configs for palmas/lp873x/lp87565. These were missing
and the Makefile already assumes them to be defined. Add the corresponding
SPL config options. This enables the regulator support in SPL.

Signed-off-by: Keerthy <j-keerthy@ti.com>
5 years agopower: pmic: Kconfig: Add SPL_PMIC configs for palmas/lp873x/lp87565
Keerthy [Thu, 6 Jun 2019 10:36:55 +0000 (16:06 +0530)]
power: pmic: Kconfig: Add SPL_PMIC configs for palmas/lp873x/lp87565

Add SPL_PMIC configs for palmas/lp873x/lp87565. These were missing
and the Makefile already assumes them to be defined. Add the corresponding
SPL config options. This enables the pmics in SPL.

Signed-off-by: Keerthy <j-keerthy@ti.com>
5 years agoARM: am335x: Add phyCORE AM335x R2 support
Niel Fourie [Mon, 3 Jun 2019 13:31:17 +0000 (15:31 +0200)]
ARM: am335x: Add phyCORE AM335x R2 support

Support for Phytech phyCORE AM335x R2 SOM (PCL060) on the Phytec
phyBOARD-Wega AM335x.

CPU  : AM335X-GP rev 2.1
Model: Phytec AM335x phyBOARD-WEGA
DRAM:  256 MiB
NAND:  256 MiB
MMC:   OMAP SD/MMC: 0
eth0: ethernet@4a100000

Working:
 - Eth0
 - i2C
 - MMC/SD
 - NAND
 - UART
 - USB (host)

Device trees were taken from Linux mainline:
commit 37624b58542f ("Linux 5.1-rc7")

Signed-off-by: Niel Fourie <lusus@denx.de>
Signed-off-by: Parthiban Nallathambi <pn@denx.de>
Reviewed-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
Tested-by: Marek Vasut <marex@denx.de>
5 years agoARM: legoev3: convert to driver model
David Lechner [Wed, 29 May 2019 01:56:42 +0000 (20:56 -0500)]
ARM: legoev3: convert to driver model

This converts LEGO MINDSTORMS EV3 to the driver model. MMC, SERIAL, SPI
and SPI_FLASH are converted.

The device tree contains only the minimal nodes required by U-Boot
since the size of U-Boot is limited to 256K on this device.

Signed-off-by: David Lechner <david@lechnology.com>
5 years agortc: add Microcrystal RV-8803 driver
Michael Walle [Tue, 28 May 2019 23:29:58 +0000 (01:29 +0200)]
rtc: add Microcrystal RV-8803 driver

Signed-off-by: Michael Walle <michael@walle.cc>
5 years agousb: musb-new: omap2430: Fix compilation warning with USB_MUSB_GADGET
Derald D. Woods [Tue, 28 May 2019 02:22:00 +0000 (21:22 -0500)]
usb: musb-new: omap2430: Fix compilation warning with USB_MUSB_GADGET

This commit addresses the following warning, when _NOT_ USB_MUSB_HOST:

[...]
  CC      drivers/usb/gadget/f_mass_storage.o
  CC      drivers/usb/musb-new/omap2430.o
  CC      drivers/usb/gadget/f_fastboot.o
  CC      env/common.o
  CC      env/env.o
/src/etinker/software/u-boot-master/drivers/usb/musb-new/omap2430.c: In function ‘omap2430_musb_probe’:
/src/etinker/software/u-boot-master/drivers/usb/musb-new/omap2430.c:239:6: warning: assignment to ‘int’ from ‘struct musb *’ makes integer from pointer without a cast [-Wint-conversion]
  ret = musb_register(&platdata->plat,
      ^
  LD      drivers/usb/host/built-in.o
  CC      drivers/usb/gadget/f_sdp.o
  CC      fs/ext4/ext4fs.o
[...]

Signed-off-by: Derald D. Woods <woods.technical@gmail.com>
5 years agoARM: omap3: evm: Enable DM_USB in defconfig
Derald D. Woods [Tue, 28 May 2019 02:20:50 +0000 (21:20 -0500)]
ARM: omap3: evm: Enable DM_USB in defconfig

This addresses the following warning message:

===================== WARNING ======================
This board does not use CONFIG_DM_USB. Please update
the board to use CONFIG_DM_USB before the v2019.07 release.
Failure to update by the deadline may result in board removal.
See doc/driver-model/MIGRATION.txt for more info.
====================================================

As USB support for older OMAP3 SoC's improves, OMAP3 EVM can be
readily adapted. There is some additional 'gpio-hog' support
needed to fully setup USB in a similar manner to Linux.

Signed-off-by: Derald D. Woods <woods.technical@gmail.com>
5 years agoARM: dts: omap3-evm: Sync dts(i) files from Linux 5.1.5
Derald D. Woods [Tue, 28 May 2019 02:19:38 +0000 (21:19 -0500)]
ARM: dts: omap3-evm: Sync dts(i) files from Linux 5.1.5

Signed-off-by: Derald D. Woods <woods.technical@gmail.com>
5 years agortc: ds1307: add support for m41t11
Heiko Schocher [Mon, 27 May 2019 06:13:41 +0000 (08:13 +0200)]
rtc: ds1307: add support for m41t11

add m41t11 support in ds1307 driver. changes:

- add compatible string for m41t11
- check if RTC clock is running, if not
  enable the clock

Signed-off-by: Heiko Schocher <hs@denx.de>
5 years agommc: Register only the first MMC device on MMC_TINY
Ezequiel Garcia [Sat, 25 May 2019 22:25:22 +0000 (19:25 -0300)]
mmc: Register only the first MMC device on MMC_TINY

When MMC_TINY is enabled, support for only one MMC device
is provided. Boards that register more than one device,
will just write over mmc_static keeping only the last one
registered.

This commit prevents this, keeping only the first MMC
device created. A debug warning message is added, if nothing
else, as a hint/documentation for developers.

Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
5 years agospl: Move SPL_MMC_TINY option to appear under SPL menu
Ezequiel Garcia [Sat, 25 May 2019 22:25:21 +0000 (19:25 -0300)]
spl: Move SPL_MMC_TINY option to appear under SPL menu

The SPL_MMC_TINY implements feature-reduced MMC support
on SPL, and as such, it's more consistent and convenient
to find it as part of the SPL configuration.

Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
5 years agocmd: nvedit: Add sub-command 'env info'
Leo Ruan [Fri, 24 May 2019 15:20:19 +0000 (17:20 +0200)]
cmd: nvedit: Add sub-command 'env info'

Add sub-command 'env info' to display environment information:
- env_valid : is environment valid
- env_ready : is environment imported into hash table
- env_use_default : is default environment using

This command can be optionally used for evaluation in scripts:
[-d] : evaluate whether default environment is used
[-p] : evaluate whether environment can be persisted
The result of multiple evaluations will be combined with AND.

Signed-off-by: Leo Ruan <tingquan.ruan@cn.bosch.com>
Signed-off-by: Mark Jonas <mark.jonas@de.bosch.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
[trini: Do not enable by default]
Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agodrivers: core: use strcmp when find device by name
Peng Fan [Wed, 22 May 2019 07:08:14 +0000 (07:08 +0000)]
drivers: core: use strcmp when find device by name

`if (!strncmp(dev->name, name, strlen(name)))` might find out
the wrong device, it might find out `dram_pll_ref_sel`, when name is
`dram_pll`. So use strcmp to avoid such issue.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
5 years agotest: dm: usb: use the real device name
Peng Fan [Wed, 22 May 2019 07:08:12 +0000 (07:08 +0000)]
test: dm: usb: use the real device name

"keyb" is not the real device name, "keyb@3" is.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
5 years agotest: dm: adc: use the real device name
Peng Fan [Wed, 22 May 2019 07:08:09 +0000 (07:08 +0000)]
test: dm: adc: use the real device name

"adc" is not the real device name, "adc@0" is.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
5 years agopci: ensure enumeration of all devices in pci_init
Marek Behún [Tue, 21 May 2019 10:04:31 +0000 (12:04 +0200)]
pci: ensure enumeration of all devices in pci_init

Use the uclass_first_device_check and uclass_next_device_check functions
instead of uclass_first_device and uclass_next_device in pci_init. This
ensures that all PCI devices are tried to be probed. Currently if a
device fails to probe, the enumeration stops and the devices which come
after the failed device are not probed.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Cc: Stefan Roese <sr@denx.de>
Cc: Anton Schubert <anton.schubert@gmx.de>
Cc: Dirk Eibach <dirk.eibach@gdsys.cc>
Cc: Mario Six <mario.six@gdsys.cc>
Cc: Chris Packham <chris.packham@alliedtelesis.co.nz>
Cc: Phil Sutter <phil@nwl.cc>
Cc: VlaoMao <vlaomao@gmail.com>
Cc: Tom Rini <trini@konsulko.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
5 years agoboard: pm9263: Convert to CONFIG_DM_USB and CONFIG_DM_VIDEO
Ilko Iliev [Mon, 11 Mar 2019 12:06:25 +0000 (13:06 +0100)]
board: pm9263: Convert to CONFIG_DM_USB and CONFIG_DM_VIDEO

Convert the board to support the USB and video driver model and remove
the unnecessary code.

5 years agoboard: pm9261: Convert to CONFIG_DM_USB and CONFIG_DM_VIDEO
Ilko Iliev [Mon, 11 Mar 2019 12:06:24 +0000 (13:06 +0100)]
board: pm9261: Convert to CONFIG_DM_USB and CONFIG_DM_VIDEO

Convert the board to support the USB and video driver model and remove
the unnecessary code.

5 years agoboard: st: add missing gpio_request() for stm32f429-discovery
Patrice Chotard [Wed, 26 Jun 2019 08:26:41 +0000 (10:26 +0200)]
board: st: add missing gpio_request() for stm32f429-discovery

This fixes the following error message:

U-Boot 2019.07-rc4-00103-g5eea874b5e (Jun 25 2019 - 15:09:31 +0200)

DRAM:  8 MiB
gpio@40021800: dir_output: error: gpio GPIOG14 not reserved
gpio@40021800: dir_output: error: gpio GPIOG13 not reserved
gpio@40021800: set_value: error: gpio GPIOG14 not reserved
Flash: 2 MiB
....

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
5 years agogpio: stm32: Remove .ofmatch callback
Patrice Chotard [Fri, 21 Jun 2019 13:39:25 +0000 (15:39 +0200)]
gpio: stm32: Remove .ofmatch callback

As compatible string "st,stm32-gpio" is no more used, .ofmatch
callback becomes useless, remove it.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agoARM: dts: stm32: Remove useless "st, stm32-gpio" compatible string
Patrice Chotard [Fri, 21 Jun 2019 13:39:24 +0000 (15:39 +0200)]
ARM: dts: stm32: Remove useless "st, stm32-gpio" compatible string

Since pinctrl_stm32 driver update, each gpio bank is now binded
by pinctrl driver. The compatible string "st,stm32-gpio" becomes
useless, remove it.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agopinctrl: stm32: update .bind callback
Patrice Chotard [Fri, 21 Jun 2019 13:39:23 +0000 (15:39 +0200)]
pinctrl: stm32: update .bind callback

Update .bind callback in order to bind all pinctrl subnodes
with "gpio-controller" property to gpio_stm32 driver.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agogpio: stm32: Rename stm32f7_gpio to stm32_gpio
Patrice Chotard [Fri, 21 Jun 2019 13:39:22 +0000 (15:39 +0200)]
gpio: stm32: Rename stm32f7_gpio to stm32_gpio

As this driver is used on stm32f4/f7/h7 and stm32mp1
SoCs, rename it with a more generic name.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agospi: stm32: Fix warnings when compiling with W=1
Patrick Delaunay [Fri, 21 Jun 2019 13:26:58 +0000 (15:26 +0200)]
spi: stm32: Fix warnings when compiling with W=1

This patch solves the following warnings:

drivers/spi/stm32_spi.c: In function 'stm32_spi_write_txfifo':
drivers/spi/stm32_spi.c:116:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   if (priv->tx_len >= sizeof(u32) &&
                    ^~
drivers/spi/stm32_spi.c:122:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   } else if (priv->tx_len >= sizeof(u16) &&
                           ^~
drivers/spi/stm32_spi.c: In function 'stm32_spi_read_rxfifo':
drivers/spi/stm32_spi.c:150:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       (priv->rx_len >= sizeof(u32) || (sr & SPI_SR_RXWNE))) {
                     ^~
drivers/spi/stm32_spi.c:156:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       (priv->rx_len >= sizeof(u16) ||
                     ^~
drivers/core/simple-bus.c:15:12: warning: no previous prototype for 'simple_bus_translate' [-Wmissing-prototypes]
 fdt_addr_t simple_bus_translate(struct udevice *dev, fdt_addr_t addr)
            ^~~~~~~~~~~~~~~~~~~~
drivers/spi/stm32_spi.c: In function 'stm32_spi_set_speed':
drivers/spi/stm32_spi.c:335:10: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
      div > STM32_MBR_DIV_MAX)
          ^
drivers/spi/stm32_spi.c:344:19: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
  if ((mbrdiv - 1) < 0)
                   ^
drivers/spi/stm32_spi.c: In function 'stm32_spi_probe':
drivers/spi/stm32_spi.c:531:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for (i = 0; i < ARRAY_SIZE(priv->cs_gpios); i++) {
                ^
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agocmd: pinmux: Fix warnings when compiling with W=1
Patrick Delaunay [Fri, 21 Jun 2019 13:26:56 +0000 (15:26 +0200)]
cmd: pinmux: Fix warnings when compiling with W=1

This patch solves the following warnings:

cmd/pinmux.c: In function 'do_dev':
cmd/pinmux.c:26:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
   if (ret) {
      ^
cmd/pinmux.c:30:2: note: here
  case 1:
  ^~~~

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agospi: stm32_qspi: avoid warnings when building with W=1 option
Patrick Delaunay [Fri, 21 Jun 2019 13:26:55 +0000 (15:26 +0200)]
spi: stm32_qspi: avoid warnings when building with W=1 option

This patch solves warnings detected by setting W=1 when building.

Warnings type detected:
 - [-Wtype-limits]
 - [-Wsign-compare]

Signed-off-by: Christophe Kerello <christophe.kerello@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agomtd: rawnand: stm32_fmc2: avoid warnings when building with W=1 option
Patrick Delaunay [Fri, 21 Jun 2019 13:26:54 +0000 (15:26 +0200)]
mtd: rawnand: stm32_fmc2: avoid warnings when building with W=1 option

This patch solves warnings detected by setting W=1 when building.

Warnings type detected:
 - [-Wsign-compare]
 - [-Wtype-limits]

Signed-off-by: Christophe Kerello <christophe.kerello@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agopower: stpmic1: Fix warnings when compiling with W=1
Patrick Delaunay [Fri, 21 Jun 2019 13:26:53 +0000 (15:26 +0200)]
power: stpmic1: Fix warnings when compiling with W=1

This patch solves the following warnings:
warning: this statement may fall through [-Wimplicit-fallthrough=]

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agopinctrl: pinctrl_stm32: Fix warnings when compiling with W=1
Patrick Delaunay [Fri, 21 Jun 2019 13:26:52 +0000 (15:26 +0200)]
pinctrl: pinctrl_stm32: Fix warnings when compiling with W=1

This patch solves the following warnings:

warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
    if (*idx < 0)
             ^
drivers/pinctrl/pinctrl_stm32.c: At top level:
warning: no previous prototype for 'stm32_pinctrl_probe' [-Wmissing-prototypes]
 int stm32_pinctrl_probe(struct udevice *dev)
     ^~~~~~~~~~~~~~~~~~~

Signed-off-by: Patrice CHOTARD <patrice.chotard@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agoram: stm32mp1_ram: Fix warnings when compiling with W=1
Patrick Delaunay [Fri, 21 Jun 2019 13:26:51 +0000 (15:26 +0200)]
ram: stm32mp1_ram: Fix warnings when compiling with W=1

This patch solves the following warnings:

drivers/ram/stm32mp1/stm32mp1_ram.c: In function 'stm32mp1_ddr_clk_enable':
warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for (idx = 0; idx < ARRAY_SIZE(clkname); idx++) {
                    ^
drivers/ram/stm32mp1/stm32mp1_ram.c: In function 'stm32mp1_ddr_setup':
warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for (idx = 0; idx < ARRAY_SIZE(param); idx++) {
                    ^
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agomisc: stm32_fuse: Fix warnings when compiling with W=1
Patrick Delaunay [Fri, 21 Jun 2019 13:26:50 +0000 (15:26 +0200)]
misc: stm32_fuse: Fix warnings when compiling with W=1

This patch solves the following warnings:

warning: no previous prototype for 'fuse_read' [-Wmissing-prototypes]
 int fuse_read(u32 bank, u32 word, u32 *val)
     ^~~~~~~~~
  CC      cmd/sf.o
warning: no previous prototype for 'fuse_prog' [-Wmissing-prototypes]
 int fuse_prog(u32 bank, u32 word, u32 val)
     ^~~~~~~~~
warning: no previous prototype for 'fuse_sense' [-Wmissing-prototypes]
 int fuse_sense(u32 bank, u32 word, u32 *val)
     ^~~~~~~~~~
warning: no previous prototype for 'fuse_override' [-Wmissing-prototypes]
 int fuse_override(u32 bank, u32 word, u32 val)
     ^~~~~~~~~~~~~

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agopower: regulator: stm32: Fix warnings when compiling with W=1
Patrick Delaunay [Fri, 21 Jun 2019 13:26:49 +0000 (15:26 +0200)]
power: regulator: stm32: Fix warnings when compiling with W=1

This patch solves the following warnings:

drivers/power/regulator/stm32-vrefbuf.c: In function 'stm32_vrefbuf_set_value':
warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   if (uV == stm32_vrefbuf_voltages[i]) {
          ^~

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agoclk: clk_stm32mp1: Fix warnings when compiling with W=1
Patrick Delaunay [Fri, 21 Jun 2019 13:26:48 +0000 (15:26 +0200)]
clk: clk_stm32mp1: Fix warnings when compiling with W=1

This patch solves the following warnings:

drivers/clk/clk_stm32mp1.c: In function 'stm32mp1_clk_get_parent':
warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for (i = 0; i < ARRAY_SIZE(stm32mp1_clks); i++)
                ^
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agoi2c: stm32f7_i2c: Fix warnings when compiling with W=1
Patrick Delaunay [Fri, 21 Jun 2019 13:26:47 +0000 (15:26 +0200)]
i2c: stm32f7_i2c: Fix warnings when compiling with W=1

This patch solves the following warnings:

drivers/i2c/stm32f7_i2c.c: In function 'stm32_i2c_compute_solutions':
warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    if (scldel < scldel_min)
               ^
warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (((sdadel >= sdadel_min) &&
                  ^~
warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
          (sdadel <= sdadel_max)) &&
                  ^~
drivers/i2c/stm32f7_i2c.c: In function 'stm32_i2c_choose_solution':
warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
      if (clk_error < clk_error_prev) {
                    ^
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agogpio: stm32_gpio: Fix warnings when compiling with W=1
Patrick Delaunay [Fri, 21 Jun 2019 13:26:46 +0000 (15:26 +0200)]
gpio: stm32_gpio: Fix warnings when compiling with W=1

This patch solves the following warnings:

drivers/gpio/stm32_gpio.c: In function 'stm32_offset_to_index':
: comparison between signed and unsigned integer expressions [-Wsign-compare]
    if (idx == offset)
            ^~
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agoadc: stm32: Fix warnings when compiling with W=1
Patrick Delaunay [Fri, 21 Jun 2019 13:26:45 +0000 (15:26 +0200)]
adc: stm32: Fix warnings when compiling with W=1

This patch solves the following warnings:

drivers/adc/stm32-adc-core.c: In function 'stm32h7_adc_clk_sel':
warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for (i = 0; i < ARRAY_SIZE(stm32h7_adc_ckmodes_spec); i++) {
                 ^
warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for (i = 0; i < ARRAY_SIZE(stm32h7_adc_ckmodes_spec); i++) {
                ^
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Acked-by: Fabrice Gasnier <fabrice.gasnier@st.com>
5 years agoadc: stm32-adc: Fix warnings when compiling with W=1
Patrick Delaunay [Fri, 21 Jun 2019 13:26:44 +0000 (15:26 +0200)]
adc: stm32-adc: Fix warnings when compiling with W=1

This patch solves the following warnings:

drivers/adc/stm32-adc.c: In function 'stm32_adc_chan_of_init':
warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  if (num_channels > adc->cfg->max_channels) {
                   ^
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Acked-by: Fabrice Gasnier <fabrice.gasnier@st.com>
5 years agostm32mp1: bsec: Fix warnings when compiling with W=1
Patrick Delaunay [Fri, 21 Jun 2019 13:26:43 +0000 (15:26 +0200)]
stm32mp1: bsec: Fix warnings when compiling with W=1

This patch solves the following warnings:

arch/arm/mach-stm32mp/bsec.c: In function 'stm32mp_bsec_read':
warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  if (offset >= STM32_BSEC_OTP_OFFSET) {
             ^~
arch/arm/mach-stm32mp/bsec.c: In function 'stm32mp_bsec_write':
warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  if (offset >= STM32_BSEC_OTP_OFFSET) {
             ^~
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agommc: stm32_sdmmc2: avoid warnings when building with W=1 option
Patrick Delaunay [Fri, 21 Jun 2019 13:26:42 +0000 (15:26 +0200)]
mmc: stm32_sdmmc2: avoid warnings when building with W=1 option

This patch solves warnings detected by setting W=1 when building.

Warnings type detected:
 - [-Wmissing-prototypes]
 - [-Wimplicit-fallthrough=]

Signed-off-by: Christophe Kerello <christophe.kerello@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agoserial: stm32: Fix warnings when compiling with W=1
Patrick Delaunay [Fri, 21 Jun 2019 13:26:41 +0000 (15:26 +0200)]
serial: stm32: Fix warnings when compiling with W=1

This patch solves the following warnings:

drivers/serial/serial_stm32.c: In function 'stm32_serial_probe':
warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
  if (plat->clock_rate < 0) {
                       ^

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agoboard: stm32mp1: Fix warnings when compiling with W=1
Patrick Delaunay [Fri, 21 Jun 2019 13:26:40 +0000 (15:26 +0200)]
board: stm32mp1: Fix warnings when compiling with W=1

This patch solves the following warnings:

warning: no previous prototype for 'board_quiesce_devices' [-Wmissing-prototypes]
 void board_quiesce_devices(void)
      ^~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agostm32mp1: Fix warnings when compiling with W=1
Patrick Delaunay [Fri, 21 Jun 2019 13:26:39 +0000 (15:26 +0200)]
stm32mp1: Fix warnings when compiling with W=1

This patch solves the following warnings:

arch/arm/mach-stm32mp/cpu.c:378:16: warning: comparison between signed
and unsigned integer expressions [-Wsign-compare]
   if (instance > ARRAY_SIZE(serial_addr))
                ^

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agoMAINTAINERS: Add git custodians for ARM STM STM32MP entry
Patrice Chotard [Thu, 20 Jun 2019 13:35:28 +0000 (15:35 +0200)]
MAINTAINERS: Add git custodians for ARM STM STM32MP entry

Add git custodians for STMicroelectronics STM32MP entry.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
5 years agostm32mp1: add SPI flash support in SPL
Patrick Delaunay [Thu, 11 Jul 2019 09:25:54 +0000 (11:25 +0200)]
stm32mp1: add SPI flash support in SPL

Allow boot from NOR with basic boot.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agostm32mp1: Add UBIFS boot capability
Patrick Delaunay [Fri, 21 Jun 2019 13:39:55 +0000 (15:39 +0200)]
stm32mp1: Add UBIFS boot capability

Add support for boot from NAND in generic ditribution command.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agostm32mp1: activate OF_BOARD_SETUP and FDT_FIXUP_PARTITIONS
Patrick Delaunay [Tue, 2 Jul 2019 11:26:07 +0000 (13:26 +0200)]
stm32mp1: activate OF_BOARD_SETUP and FDT_FIXUP_PARTITIONS

Update kernel MTD partition in device tree with U-Boot information.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agostm32mp1: add configuration op-tee
Patrick Delaunay [Tue, 2 Jul 2019 11:26:06 +0000 (13:26 +0200)]
stm32mp1: add configuration op-tee

Add support of Trusted boot chain with OP-TEE
- reserved 32MB at the end of the DDR for OP-TEE

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agostm32mp1: reorder some CONFIG in stm32mp1.h
Patrick Delaunay [Tue, 2 Jul 2019 11:26:05 +0000 (13:26 +0200)]
stm32mp1: reorder some CONFIG in stm32mp1.h

Change config not directly linked to CONFIG_DISTRO_DEFAULTS.
Allow to deactivate CONFIG_SYS_MTDPARTS_RUNTIME when
CONFIG_MTDPARTS_DEFAULT is defined in defconfig.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agopmic: stpmic1: add support for SYSRESET_POWER_OFF
Patrick Delaunay [Mon, 20 May 2019 07:47:07 +0000 (09:47 +0200)]
pmic: stpmic1: add support for SYSRESET_POWER_OFF

Adds support for SYSRESET_POWER_OFF = PMIC power off used by command
power off and introduced by commit 751fed426f87 ("sysreset: Add a way
to find the last reset").
The driver use SYSRESET_POWER for the PMIC-level power cycle, with restart.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agoARM: dts: stm32mp1: sync device tree with v5.2-rc4
Patrick Delaunay [Thu, 11 Jul 2019 09:15:28 +0000 (11:15 +0200)]
ARM: dts: stm32mp1: sync device tree with v5.2-rc4

Synchronize device tree with v5.2-rc4 label and
update the associated u-boot dtsi.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Tested-by: Pierre-Jean Texier <pjtexier@koncepto.io>
5 years agostm32mp1: force boot_net_usb_start
Patrick Delaunay [Fri, 5 Jul 2019 15:20:22 +0000 (17:20 +0200)]
stm32mp1: force boot_net_usb_start

Prevent USB enumeration and avoid unnecessary delay in bootcmd_pxe
as Ethernet device is not attached to USB.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agostm32mp1: add check for presence of environment in boot device
Patrick Delaunay [Fri, 5 Jul 2019 15:20:21 +0000 (17:20 +0200)]
stm32mp1: add check for presence of environment in boot device

For boot from flash, check presence of default environment to force
save env.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Tested-by: Pierre-Jean Texier <pjtexier@koncepto.io>
5 years agostm32mp1: configs: Add CONFIG_OF_SPL_REMOVE_PROPS
Patrick Delaunay [Fri, 5 Jul 2019 15:20:20 +0000 (17:20 +0200)]
stm32mp1: configs: Add CONFIG_OF_SPL_REMOVE_PROPS

Removes unused device tree property in SPL
to reduce the SPL size by 1kB

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agostm32mp1: cosmetic: remove unnecessary include
Patrick Delaunay [Fri, 5 Jul 2019 15:20:19 +0000 (17:20 +0200)]
stm32mp1: cosmetic: remove unnecessary include

Remove post.h include as it is used in spl.c

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agostm32mp1: update README
Patrick Delaunay [Fri, 5 Jul 2019 15:20:18 +0000 (17:20 +0200)]
stm32mp1: update README

Add latest information and correct some information.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agostm32mp1: key: add stm32key command
Patrick Delaunay [Fri, 5 Jul 2019 15:20:17 +0000 (17:20 +0200)]
stm32mp1: key: add stm32key command

Add dedicated command to register in fuse a public hash
key provided by keygen tool.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agostm32mp1: add stboard command
Patrick Delaunay [Fri, 5 Jul 2019 15:20:16 +0000 (17:20 +0200)]
stm32mp1: add stboard command

Allow to update board identification in OTP 59.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agostm32mp1: update device tree with ETZPC status
Patrick Delaunay [Fri, 5 Jul 2019 15:20:15 +0000 (17:20 +0200)]
stm32mp1: update device tree with ETZPC status

U-Boot should disable nodes in device tree if needed according
ETZPC status in ft_system_setup().

ETZPC itself use an array on addresses to do the match between the status
bits and the node.

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agostm32mp1: update package information in device tree
Patrick Delaunay [Fri, 5 Jul 2019 15:20:14 +0000 (17:20 +0200)]
stm32mp1: update package information in device tree

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agostm32mp1: export get_cpu_package function
Patrick Delaunay [Fri, 5 Jul 2019 15:20:13 +0000 (17:20 +0200)]
stm32mp1: export get_cpu_package function

Prepare update of package information update
in Linux device tree.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agodt-bindings: pinctrl: stm32: add new entry for package information
Patrick Delaunay [Fri, 5 Jul 2019 15:20:12 +0000 (17:20 +0200)]
dt-bindings: pinctrl: stm32: add new entry for package information

Add "st,package" entry. Possibles values are:
-STM32MP_PKG_AA for LFBGA448 (18*18) package
-STM32MP_PKG_AB for LFBGA354 (16*16) package
-STM32MP_PKG_AC for TFBGA361 (12*12) package
-STM32MP_PKG_AD for TFBGA257 (10*10) package

see Linux commit 966d9b928f626a54a0c27c0fdae1e3dfe9bab416
for v5.2-rc1

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agostm32mp1: syscon: remove stgen
Patrick Delaunay [Fri, 5 Jul 2019 15:20:11 +0000 (17:20 +0200)]
stm32mp1: syscon: remove stgen

Reduce difference with kernel Linux device tree.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agostm32mp1: syscon: remove etzpc support
Patrick Delaunay [Fri, 5 Jul 2019 15:20:10 +0000 (17:20 +0200)]
stm32mp1: syscon: remove etzpc support

Support for ETZPC is removed as this device is not present
in Linux kernel device tree.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agostm32mp1: call regulators_enable_boot_on in board_init
Patrick Delaunay [Fri, 5 Jul 2019 15:20:09 +0000 (17:20 +0200)]
stm32mp1: call regulators_enable_boot_on in board_init

U-Boot activates regulators by reading the "regulator-boot-on"
property in DT; it is requested by M4 early Boot feature.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agostm32mp1: deactivate WATCHDOG in defconfig
Patrick Delaunay [Fri, 5 Jul 2019 15:20:08 +0000 (17:20 +0200)]
stm32mp1: deactivate WATCHDOG in defconfig

Deactivate WATCHDOG by default in u-boot to avoid issue to boot kernel
and rootfs without the needed daemon to reload it.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Tested-by: Pierre-Jean Texier <pjtexier@koncepto.io>
5 years agosysreset: syscon: add support for power off
Patrick Delaunay [Mon, 20 May 2019 08:58:39 +0000 (10:58 +0200)]
sysreset: syscon: add support for power off

The new type sysreset 'POWER_OFF', introduced by
commit 751fed426f87 ("sysreset: Add a way to find the last reset")
is only supported for "syscon-poweroff" compatible.

For details see Linux binding:
./Documentation/devicetree/bindings/power/reset/syscon-poweroff.txt

This patch removes the support of POWER_OFF for "syscon-reboot"
and keeps only the COLD reset (for command reset support)
and it introduces the compatible "syscon-poweroff"
for the POWER_OFF case.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agostm32mp1: move CONFIG_ENV in Kconfig
Patrick Delaunay [Fri, 14 Jun 2019 11:05:59 +0000 (13:05 +0200)]
stm32mp1: move CONFIG_ENV in Kconfig

Move 2 ENV configuration flags in board Kconfig
- CONFIG_ENV_SECT_SIZE
- CONFIG_ENV_OFFSET

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agoARM: dts: stm32: Add ipcc mailbox support on stm32mp1
Fabien Dessenne [Tue, 14 May 2019 09:20:37 +0000 (11:20 +0200)]
ARM: dts: stm32: Add ipcc mailbox support on stm32mp1

Add IPCC mailbox support on stm32mp157 eval and disco boards.

Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
5 years agoconfigs: stm32mp15: enable IPCC mailbox
Fabien Dessenne [Tue, 14 May 2019 09:20:36 +0000 (11:20 +0200)]
configs: stm32mp15: enable IPCC mailbox

Activate the ipcc mailbox for stm32mp15 configs.

Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
5 years agoMAINTAINERS: Add stm32 mailbox IPPC driver
Fabien Dessenne [Tue, 14 May 2019 09:20:35 +0000 (11:20 +0200)]
MAINTAINERS: Add stm32 mailbox IPPC driver

Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
5 years agomailbox: introduce stm32-ipcc driver
Fabien Dessenne [Tue, 14 May 2019 09:20:34 +0000 (11:20 +0200)]
mailbox: introduce stm32-ipcc driver

On STM32 family, the IPCC peripheral allows the communication
between 2 processors offering doorbells mechanism.

Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com>
Signed-off-by: Loic Pallardy <loic.pallardy@st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
5 years agoMerge tag 'dm-pull-9jul19-take2' of https://gitlab.denx.de/u-boot/custodians/u-boot-dm
Tom Rini [Thu, 11 Jul 2019 22:10:11 +0000 (18:10 -0400)]
Merge tag 'dm-pull-9jul19-take2' of https://gitlab.denx.de/u-boot/custodians/u-boot-dm

- Sandbox improvements including .dts refactor
- Minor tracing and PCI improvements
- Various other minor fixes
- Conversion of patman, dtoc and binman to support Python 3

5 years agoMerge https://gitlab.denx.de/u-boot/custodians/u-boot-marvell
Tom Rini [Thu, 11 Jul 2019 22:09:38 +0000 (18:09 -0400)]
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-marvell

- SPL SATA enhancements to allow booting from RAW SATA device
  needed for Clearfog (Baruch)
- Enable SATA booting on Clearfog (Baruch)
- Misc changes to Turris Omnia (Marek)
- Enable CMD_BOOTZ and increase SYS_BOOTM_LEN on crs305-1g-4s
  (Luka)
- Enable FIT support for db-xc3-24g4xg (Chris)
- Enable DM_SPI on Keymile Kirkwood board with necessary changes
  for this (Pascal)
- Set 38x and 39x AVS on lower frequency (Baruch)

5 years agoMerge tag 'uniphier-v2019.10' of https://gitlab.denx.de/u-boot/custodians/u-boot...
Tom Rini [Thu, 11 Jul 2019 22:08:44 +0000 (18:08 -0400)]
Merge tag 'uniphier-v2019.10' of https://gitlab.denx.de/u-boot/custodians/u-boot-uniphier

UniPhier SoC updates for v2019.10

- import DT updates from Linux

- add UniPhier SPI controller driver

- make U-Boot image for 64bit SoCs position independent

- tidy up various init code for next generation SoCs

- misc cleanups

5 years agoMerge branch '2019-07-11-master-imports'
Tom Rini [Thu, 11 Jul 2019 22:03:52 +0000 (18:03 -0400)]
Merge branch '2019-07-11-master-imports'

- spear platform improvements
- Android BCB support
- Cadence PCIe endpoint driver