]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
3 years agoboard: dh_stm32mp1: Remove gpio_hog_probe_all() from board
Patrice Chotard [Wed, 1 Sep 2021 09:51:43 +0000 (11:51 +0200)]
board: dh_stm32mp1: Remove gpio_hog_probe_all() from board

DM_GPIO_HOG flag has been replaced by GPIO_HOG flag since a while in
commit 49b10cb49262 ("gpio: fixes for gpio-hog support").

And furthermore, gpio_hog_probe_all() is already called in board_r.c.
So gpio_hog_probe() can be removed from stm32mp1.c.

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Cc: Marek Vasut <marex@denx.de>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
3 years agoboard: stm32mp1: Remove gpio_hog_probe_all() from board
Patrice Chotard [Wed, 1 Sep 2021 09:51:42 +0000 (11:51 +0200)]
board: stm32mp1: Remove gpio_hog_probe_all() from board

DM_GPIO_HOG flag has been replaced by GPIO_HOG flag since a while in
commit 49b10cb49262 ("gpio: fixes for gpio-hog support").

And furthermore, gpio_hog_probe_all() is already called in board_r.c.
So gpio_hog_probe() can be removed from stm32mp1.c.

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
3 years agoi2c: stm32f7: compute i2cclk only one time
Patrick Delaunay [Tue, 3 Aug 2021 10:05:15 +0000 (12:05 +0200)]
i2c: stm32f7: compute i2cclk only one time

Compute i2cclk only one time in stm32_i2c_compute_timing()
and remove setup parameter (accessible in i2c_priv).

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
3 years agoi2c: stm32f7: add support for DNF i2c-digital-filter binding
Patrick Delaunay [Tue, 3 Aug 2021 10:05:14 +0000 (12:05 +0200)]
i2c: stm32f7: add support for DNF i2c-digital-filter binding

Add the support for the i2c-digital-filter binding, allowing to enable
the digital filter via the device-tree and indicate its value in the DT

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
3 years agoi2c: stm32f7: fix configuration of the digital filter
Patrick Delaunay [Tue, 3 Aug 2021 10:05:13 +0000 (12:05 +0200)]
i2c: stm32f7: fix configuration of the digital filter

The digital filter related computation are present in the driver
however the programming of the filter within the IP is missing.
The maximum value for the DNF is wrong and should be 15 instead of 16.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
3 years agoi2c: stm32f7: support DT binding i2c-analog-filter
Patrick Delaunay [Tue, 3 Aug 2021 10:05:12 +0000 (12:05 +0200)]
i2c: stm32f7: support DT binding i2c-analog-filter

Replace driver internally coded enabling/disabling of the
analog-filter with the DT binding "i2c-analog-filter".

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
3 years agoarm: dts: stm32: Add i2c-analog-filter property in I2C nodes for stm32h743
Patrice Chotard [Tue, 3 Aug 2021 10:05:11 +0000 (12:05 +0200)]
arm: dts: stm32: Add i2c-analog-filter property in I2C nodes for stm32h743

Add i2c-analog-filter property in I2C nodes to enable analog
filter feature.

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
3 years agoarm: dts: stm32: Add i2c-analog-filter property in I2C nodes for stm32f746
Patrice Chotard [Tue, 3 Aug 2021 10:05:10 +0000 (12:05 +0200)]
arm: dts: stm32: Add i2c-analog-filter property in I2C nodes for stm32f746

Add i2c-analog-filter property in I2C nodes to enable analog
filter feature.

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
3 years agoi2c: stm32f7: move driver data of each instance in a privdata
Patrick Delaunay [Tue, 3 Aug 2021 10:05:09 +0000 (12:05 +0200)]
i2c: stm32f7: move driver data of each instance in a privdata

Today all the I2C instance point on the same global
variable stm32_i2c_setup according the compatible: i2c_priv->setup =
pointer to the same driver data.

This patch changes this driver data (stm32f7_setup and stm32mp15_setup)
to a const struct and move the timing struct 'setup' as element of i2c
privdata, initialized in stm32_ofdata_to_platdata() with the driver
configuration data.

This patch solves issues when several I2C instance have not the same
clock source or not the same configuration: each timing setup is saved
is the I2C privdata.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
3 years agospi: stm32: Add ofdata_to_platdata() callback
Patrice Chotard [Tue, 3 Aug 2021 09:16:40 +0000 (11:16 +0200)]
spi: stm32: Add ofdata_to_platdata() callback

Parse DT in ofdata_to_platdata() callback instead of probe().

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
3 years agopm9263: Remove unused CONFIG_USER_LOWLEVEL_INIT
Patrick Delaunay [Wed, 6 Oct 2021 16:49:47 +0000 (18:49 +0200)]
pm9263: Remove unused CONFIG_USER_LOWLEVEL_INIT

Remove the latest reference of CONFIG_USER_LOWLEVEL_INIT in code

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
3 years agostv0991: remove specific CONFIG_STV0991 configs
Patrick Delaunay [Wed, 6 Oct 2021 16:10:32 +0000 (18:10 +0200)]
stv0991: remove specific CONFIG_STV0991 configs

Remove the following STV0991 specific configs:
- CONFIG_STV0991 (never used, only defined in CONFIG_SYS_EXTRA_OPTIONS)
- CONFIG_STV0991_HZ (replaced by generic CONFIG_SYS_HZ)
- CONFIG_STV0991_HZ_CLOCK (replaced by generic CONFIG_SYS_HZ_CLOCK)

This patch allows to reduce the file config_whitelist.txt.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
3 years agostm32f429: move CONFIG_BOOTCOMMAND in defconfig
Patrick Delaunay [Wed, 6 Oct 2021 15:16:23 +0000 (17:16 +0200)]
stm32f429: move CONFIG_BOOTCOMMAND in defconfig

Move CONFIG_BOOTCOMMAND defined in Kconfig in the board defconfig.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
3 years agoconfigs: Move some usb config in defconfig
Patrick Delaunay [Mon, 4 Oct 2021 09:23:41 +0000 (11:23 +0200)]
configs: Move some usb config in defconfig

Using the tools moveconfig.py to move the following config in the
defconfig files:
 CONFIG_USB_HOST_ETHER
 CONFIG_USB_ETHER_ASIX
 CONFIG_USB_ETHER_MCS7830
 CONFIG_USB_ETHER_SMSC95XX

These option are already migrated since the commit f58ad98a621c ("usb: net:
migrate USB Ethernet adapters to Kconfig") and the commit ae3584498bf8
("usb: net: migrate CONFIG_USB_HOST_ETHER to Kconfig").

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
Reviewed-by: Ian Ray <ian.ray@ge.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
3 years agoConvert CONFIG_STM32_FLASH to Kconfig
Patrick Delaunay [Mon, 4 Oct 2021 09:05:52 +0000 (11:05 +0200)]
Convert CONFIG_STM32_FLASH to Kconfig

This converts the CONFIG_STM32_FLASH to Kconfig by using
tools/moveconfig.py

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
3 years agoRevert "configs: stm32mp1: only support SD card after NOR in bootcmd_stm32mp"
Marek Vasut [Mon, 4 Oct 2021 11:48:08 +0000 (13:48 +0200)]
Revert "configs: stm32mp1: only support SD card after NOR in bootcmd_stm32mp"

This reverts commit d5d726d3cc47691ace3c68fa31147ad104aaf579,
which breaks boards which ship with multiple SD/eMMC sockets.

This stm32mp1.h config is not used only by the ST reference
boards, but all the other STM32MP1 based boards in U-Boot, so
changes to this stm32mp1.h cannot break the other boards.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Patrice Chotard <patrice.chotard@foss.st.com>
Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
3 years agophy: stm32-usbphyc: stm32: usbphyc: add protection on phy sub-node
Patrick Delaunay [Tue, 14 Sep 2021 12:31:17 +0000 (14:31 +0200)]
phy: stm32-usbphyc: stm32: usbphyc: add protection on phy sub-node

Add protection on presence and order of the phy node sub node
by using the mandatory reg information.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
3 years agophy: stm32-usbphyc: use connector for vbus-supply with phy-stm32-usbphyc
Patrick Delaunay [Tue, 14 Sep 2021 12:31:16 +0000 (14:31 +0200)]
phy: stm32-usbphyc: use connector for vbus-supply with phy-stm32-usbphyc

The vbus-supply is an optional property of sub-node connector node.
and no more in the usb phyc node (in first proposed binding).

This regulator for USB VBUS may be needed for host mode.

See the latest kernel binding for details in
Documentation/devicetree/bindings/phy/phy-stm32-usbphyc.yaml.

  usbphyc_port0: usb-phy@0 {
      reg = <0>;
      phy-supply = <&vdd_usb>;
      #phy-cells = <0>;
      connector {
          compatible = "usb-a-connector";
          vbus-supply = <&vbus_sw>;
      };
  };

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
3 years agoboard: stm32: Remove the bi_boot_params initialization
Patrick Delaunay [Thu, 2 Sep 2021 10:02:07 +0000 (12:02 +0200)]
board: stm32: Remove the bi_boot_params initialization

The stm32 platforms never had to support an ATAGs-based Linux Kernel,
so remove the bi_boot_params initialization.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Tested-by: Patrice Chotard <patrice.chotard@foss.st.com>
Tested-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
3 years agoarm: stm32: Disable ATAGs support
Patrick Delaunay [Thu, 2 Sep 2021 10:02:06 +0000 (12:02 +0200)]
arm: stm32: Disable ATAGs support

These platforms never had to support an ATAGs-based Linux Kernel, so
remove the options.

Cc: Marek Vasut <marex@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Tested-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
3 years agoPrepare v2021.10
Tom Rini [Mon, 4 Oct 2021 15:09:26 +0000 (11:09 -0400)]
Prepare v2021.10

Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agomtd: cqspi: Fix division by zero
Marek Vasut [Tue, 14 Sep 2021 03:21:48 +0000 (05:21 +0200)]
mtd: cqspi: Fix division by zero

Both dummy.nbytes and dummy.buswidth may be zero. By not checking
the later, it is possible to trigger division by zero and a crash.
This does happen with tiny SPI NOR framework in SPL. Fix this by
adding the check and returning zero dummy bytes in such a case.

Fixes: 38b0852b0ea ("spi: cadence-qspi: Add support for octal DTR flashes")
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Jagan Teki <jagan@amarulasolutions.com>
Cc: Vignesh R <vigneshr@ti.com>
Cc: Pratyush Yadav <p.yadav@ti.com>
[trini: Drop Pratyush's RB as his requested changes weren't made as
        Marek disagreed]

3 years agoAzure/GitLab CI: Update docker image
Tom Rini [Thu, 30 Sep 2021 16:33:46 +0000 (12:33 -0400)]
Azure/GitLab CI: Update docker image

Rebuild our current docker image so that ca-certificates will be updated
and Let's Encrypt issued certificates will work again.

Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoMerge tag 'rpi-next-2021.10.2' of https://source.denx.de/u-boot/custodians/u-boot...
Tom Rini [Wed, 29 Sep 2021 19:13:35 +0000 (15:13 -0400)]
Merge tag 'rpi-next-2021.10.2' of https://source.denx.de/u-boot/custodians/u-boot-raspberrypi

- fix usb stopt; usb start; bug
- update Nicolas email address

3 years agoMerge https://source.denx.de/u-boot/custodians/u-boot-marvell
Tom Rini [Wed, 29 Sep 2021 19:13:11 +0000 (15:13 -0400)]
Merge https://source.denx.de/u-boot/custodians/u-boot-marvell

- Armada8k: Fix CP0 eMMC/SDIO support (Robert)

3 years agoarm: rpi: perform XHCI firmware upload only once
Marek Szyprowski [Fri, 17 Sep 2021 08:19:43 +0000 (10:19 +0200)]
arm: rpi: perform XHCI firmware upload only once

XHCI firmware upload must be performed only once after initializing the
PCI bridge. This fixes USB stack initialization after calling "usb stop;
usb start" on Raspberry Pi 4B.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Nicolas Saenz Julienne <nsaenz@kernel.org>
Signed-off-by: Matthias Brugger <mbrugger@suse.com>
3 years agomailmap: Update mail address for Nicolas Saenz julienne
Nicolas Saenz Julienne [Thu, 16 Sep 2021 09:55:48 +0000 (11:55 +0200)]
mailmap: Update mail address for Nicolas Saenz julienne

The @suse.de address doesn't exist anymore. Update it to something not
dependent on my workplace.

Signed-off-by: Nicolas Saenz Julienne <nsaenz@kernel.org>
Signed-off-by: Matthias Brugger <mbrugger@suse.com>
3 years agoarm: dts: armada8040: Fix CP0 eMMC/SDIO support
Robert Marko [Mon, 27 Sep 2021 21:03:26 +0000 (23:03 +0200)]
arm: dts: armada8040: Fix CP0 eMMC/SDIO support

During the migration to a single DTSI for the CP110-s specific pinctrl
compatibles were moved to the SoC DTSI as CP0 and CP1 have some specifics.
Namely, CP0 eMMC/SDIO support depends on the mvebu-pinctrl driver setting
the BIT(0) in eMMC PHY IO Control 0 Register to 0 in order for the connect
the eMMC/SDIO PHY to the controller and not use it as a MPP pin multiplexor.

So, the mvebu-pinctrl driver check specifically for the
"marvell,armada-8k-cpm-pinctrl" compatible to clear the that bit.

Issue is that compatibles in the 8040 DTSI were set to "marvell,8k-cpm-pinctrl"
for CP0 and "marvell,8k-cps-pinctrl" for the CP1.
This is obviously incorrect as the pinctrl driver does not know about these.

So fix the regression by applying correct compatibles to the DTSI.
Regression found and tested on the Puzzle M801 board.

Fixes: a0ba97e5 ("arm: armada: dts: Use a single dtsi for cp110 die description")
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agoMerge branch '2021-09-28-regression-fixes'
Tom Rini [Tue, 28 Sep 2021 17:57:56 +0000 (13:57 -0400)]
Merge branch '2021-09-28-regression-fixes'

- Reintroduce creating internally the "nor%d" style names, in order to
  fix some use U-Boot use-cases involving the "mtd" command.
- Fix a regression over the default SPI bus mode shown by having the
  compiled default actually start being used.  The correct default here
  is 0.
- Fix ethernet on imx7d-sdb
- Fix a regression with MTD NAND devices when OF_LIVE is enabled

3 years agoimx: imx7d-sdb: fix ethernet, sync .dts with linux
Rasmus Villemoes [Thu, 16 Sep 2021 14:53:14 +0000 (16:53 +0200)]
imx: imx7d-sdb: fix ethernet, sync .dts with linux

Commit 0d52bab46 (mx7dsabre: Enable DM_ETH) changed these flags from 0
(aka GPIO_ACTIVE_HIGH) to GPIO_ACTIVE_LOW. It claimed to "Also sync
device tree with v5.5-rc1", but in the linux tree, these gpios have
always been GPIO_ACTIVE_HIGH ever since this node was introduced
around v4.13 (linux commit 184f39b5).

I'm guessing that the reason for the GPIO_ACTIVE_LOW was to work
around the behaviour of the soft-spi driver back then, which
effectively defaulted to spi-mode 3 and not 0. That was arguably a bug
in the soft-spi driver, which then got fixed in 0e146993bb3 (spi: add
support for all spi modes with soft spi), but that commit then broke
ethernet on this board.

Fix it by setting the gpios as active high, which as a bonus actually
brings us in sync with the .dts in the linux source tree.

Without this, one gets

    Net:   Could not get PHY for FEC0: addr 0
    No ethernet found.

With this, ethernet (at least ping and tftp) works as expected from
the U-Boot shell.

Cc: Fabio Estevam <festevam@gmail.com>
Cc: Joris Offouga <offougajoris@gmail.com>
Cc: "Christian Bräuner Sørensen" <yocto@bsorensen.net>
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
3 years agomtd: nand: raw: convert nand_dt_init() to ofnode_xx() interface
Patrice Chotard [Mon, 13 Sep 2021 14:25:53 +0000 (16:25 +0200)]
mtd: nand: raw: convert nand_dt_init() to ofnode_xx() interface

nand_dt_init() is still using fdtdec_xx() interface.
If OF_LIVE flag is enabled, dt property can't be get anymore.
Updating all fdtdec_xx() interface to ofnode_xx() to solve this issue.

For doing this, node parameter type must be ofnode.

First idea was to convert "node" parameter to ofnode type inside
nand_dt_init() using offset_to_ofnode(node). But offset_to_ofnode()
is not bijective, in case OF_LIVE flag is enabled, it performs an assert().

So, this leads to update nand_chip struct flash_node field from int to
ofnode and to update all nand_dt_init() callers.

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
3 years agomtd: spi: Set CONFIG_SF_DEFAULT_MODE default to 0
Marek Vasut [Tue, 14 Sep 2021 18:28:24 +0000 (20:28 +0200)]
mtd: spi: Set CONFIG_SF_DEFAULT_MODE default to 0

Before e2e95e5e254 ("spi: Update speed/mode on change") most systems
silently defaulted to SF bus mode 0. Now the mode is always updated,
which causes breakage. It seems most SF which are used as boot media
operate in bus mode 0, so switch that as the default.

This should fix booting at least on Altera SoCFPGA, ST STM32, Xilinx
ZynqMP, NXP iMX and Rockchip SoCs, which recently ran into trouble
with mode 3. Marvell Kirkwood and Xilinx microblaze need to be checked
as those might need mode 3.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Aleksandar Gerasimovski <aleksandar.gerasimovski@hitachi-powergrids.com>
Cc: Andreas Biessmann <andreas@biessmann.org>
Cc: Eugen Hristev <eugen.hristev@microchip.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Patrice Chotard <patrice.chotard@foss.st.com>
Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Siew Chin Lim <elly.siew.chin.lim@intel.com>
Cc: Tom Rini <trini@konsulko.com>
Cc: Valentin Longchamp <valentin.longchamp@hitachi-powergrids.com>
Cc: Vignesh Raghavendra <vigneshr@ti.com>
3 years agomtd: spi: nor: force mtd name to "nor%d"
Patrick Delaunay [Wed, 22 Sep 2021 16:29:08 +0000 (18:29 +0200)]
mtd: spi: nor: force mtd name to "nor%d"

Force the mtd name of spi-nor to "nor" + the driver sequence number:
"nor0", "nor1"... beginning after the existing nor devices.

This patch is coherent with existing "nand" and "spi-nand"
mtd device names.

When CFI MTD NOR device are supported, the spi-nor index is chosen after
the last CFI device defined by CONFIG_SYS_MAX_FLASH_BANKS.

When CONFIG_SYS_MAX_FLASH_BANKS_DETECT is activated, this config
is replaced by to cfi_flash_num_flash_banks in the include file
mtd/cfi_flash.h.

This generic name "nor%d" can be use to identify the mtd spi-nor device
without knowing the real device name or the DT path of the device,
used with API get_mtd_device_nm() and is used in mtdparts command.

This patch also avoids issue when the same NOR device is present 2 times,
for example on STM32MP15F-EV1:

STM32MP> mtd list
SF: Detected mx66l51235l with page size 256 Bytes, erase size 64 KiB, \
total 64 MiB

List of MTD devices:
* nand0
  - type: NAND flash
  - block size: 0x40000 bytes
  - min I/O: 0x1000 bytes
  - OOB size: 224 bytes
  - OOB available: 118 bytes
  - ECC strength: 8 bits
  - ECC step size: 512 bytes
  - bitflip threshold: 6 bits
  - 0x000000000000-0x000040000000 : "nand0"
* mx66l51235l
  - device: mx66l51235l@0
  - parent: spi@58003000
  - driver: jedec_spi_nor
  - path: /soc/spi@58003000/mx66l51235l@0
  - type: NOR flash
  - block size: 0x10000 bytes
  - min I/O: 0x1 bytes
  - 0x000000000000-0x000004000000 : "mx66l51235l"
* mx66l51235l
  - device: mx66l51235l@1
  - parent: spi@58003000
  - driver: jedec_spi_nor
  - path: /soc/spi@58003000/mx66l51235l@1
  - type: NOR flash
  - block size: 0x10000 bytes
  - min I/O: 0x1 bytes
  - 0x000000000000-0x000004000000 : "mx66l51235l"

The same mtd name "mx66l51235l" identify the 2 instances
mx66l51235l@0 and mx66l51235l@1.

This patch fixes a ST32CubeProgrammer / stm32prog command issue
with nor0 target on STM32MP157C-EV1 board introduced by
commit b7f060565e31 ("mtd: spi-nor: allow registering multiple MTDs when
DM is enabled").

Fixes: b7f060565e31 ("mtd: spi-nor: allow registering multiple MTDs when DM is enabled")
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
[trini: Add <dm/device.h> to <mtd.h> for DM_MAX_SEQ_STR]
Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agomtd: cfi_flash: use cfi_flash_num_flash_banks only when supported
Patrick Delaunay [Wed, 22 Sep 2021 16:29:07 +0000 (18:29 +0200)]
mtd: cfi_flash: use cfi_flash_num_flash_banks only when supported

When CONFIG_SYS_MAX_FLASH_BANKS_DETECT is activated,
CONFIG_SYS_MAX_FLASH_BANKS is replaced by cfi_flash_num_flash_banks,
but this variable is defined in drivers/mtd/cfi_flash.c, which is
compiled only when CONFIG_FLASH_CFI_DRIVER is activated, in U-Boot
or in SPL when CONFIG_SPL_MTD_SUPPORT is activated.

This patch deactivates this feature CONFIG_SYS_MAX_FLASH_BANKS_DETECT
when flash cfi driver is not activated to avoid compilation issue in
the next patch, when CONFIG_SYS_MAX_FLASH_BANKS is used in spi_nor_scan().

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
3 years agoPrepare v2021.10-rc5
Tom Rini [Mon, 27 Sep 2021 13:34:20 +0000 (09:34 -0400)]
Prepare v2021.10-rc5

Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoMerge https://source.denx.de/u-boot/custodians/u-boot-marvell
Tom Rini [Mon, 27 Sep 2021 11:41:03 +0000 (07:41 -0400)]
Merge https://source.denx.de/u-boot/custodians/u-boot-marvell

- turris_omnia: fix leaked mtd device (Marek)
- phy: marvell: cp110: Fix SATA invert polarity (Denis)

3 years agophy: marvell: cp110: Support SATA invert polarity
Denis Odintsov [Wed, 15 Sep 2021 13:45:31 +0000 (15:45 +0200)]
phy: marvell: cp110: Support SATA invert polarity

In commit b24bb99d cp110 configuration initially done in u-boot
was removed and delegated to atf firmware as smc call.
That commit didn't account for later introduced in d13b740c SATA invert polarity support.

This patch adds support of passing SATA invert polarity flags to atf
firmware during the smc call.

Signed-off-by: Denis Odintsov <shiva@mail.ru>
Cc: Baruch Siach <baruch@tkos.co.il>
Cc: Rabeeh Khoury <rabeeh@solid-run.com>
Cc: Stefan Roese <sr@denx.de>
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agoarm: mvebu: turris_omnia: fix leaked mtd device
Marek Behún [Sat, 25 Sep 2021 00:49:18 +0000 (02:49 +0200)]
arm: mvebu: turris_omnia: fix leaked mtd device

After getting MTD device via get_mtd_device_nm(), we need to put it with
put_mtd_device(), otherwise we get

  Removing MTD device #0 (mx25l6405d) with use count 1

before booting kernel.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Pali Rohár <pali@kernel.org>
Tested-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agoMerge tag 'efi-2021-10-rc5' of https://source.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Sun, 26 Sep 2021 18:15:14 +0000 (14:15 -0400)]
Merge tag 'efi-2021-10-rc5' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request for efi-2021-10-rc5

Documentation:

* add /config bindings to HTML documentation

UEFI

* Fix number_of_algorithms field in TCG EFI Protocol

3 years agoefi_loader: Fix spec ID event creation
Ruchika Gupta [Tue, 14 Sep 2021 06:44:31 +0000 (12:14 +0530)]
efi_loader: Fix spec ID event creation

TCG EFI Protocol Specification defines the number_of_algorithms
field in spec ID event to be equal to the number of active
algorithms supported by the TPM device. In current implementation,
this field is populated with the count of all algorithms supported
by the TPM which leads to incorrect spec ID event creation.

Similarly, the algorithm array in spec ID event should be a variable
length array with length being equal to the number_of_algorithms field.
In current implementation this is defined as a fixed length array
which has been fixed.

Signed-off-by: Ruchika Gupta <ruchika.gupta@linaro.org>
CC: Masahisa Kojima <masahisa.kojima@linaro.org>
CC: Ilias Apalodimas <ilias.apalodimas@linaro.org>
CC: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
3 years agodoc: Add mention of the /config binding
Simon Glass [Sun, 19 Sep 2021 21:51:10 +0000 (15:51 -0600)]
doc: Add mention of the /config binding

The devicetree binding files are in their own directory and use a simple
text format. Add a link for the binding for the /config node, since it
is otherwise hard to find.

Suggested-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
3 years agoMerge branch '2021-09-24-assorted-minor-updates'
Tom Rini [Fri, 24 Sep 2021 18:28:54 +0000 (14:28 -0400)]
Merge branch '2021-09-24-assorted-minor-updates'

- Assorted bugfixes, MAINTAINER updates and dead code removal

3 years agoarm: orion5x: edminiv2: change maintainer
Simon Guinot [Wed, 15 Sep 2021 13:01:51 +0000 (15:01 +0200)]
arm: orion5x: edminiv2: change maintainer

Since Albert Aribaud is not maintaining anymore the LaCie Ethernet Disk
mini V2 board, then I am taking over.

Signed-off-by: Simon Guinot <simon.guinot@sequanux.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agomtd: remove SPEAr flash driver st_smi
Patrick Delaunay [Wed, 22 Sep 2021 09:02:26 +0000 (11:02 +0200)]
mtd: remove SPEAr flash driver st_smi

Remove the driver st_smic.c used in SPEAr products and the associated
config CONFIG_ST_SMI; this driver is no more used in U-Boot after the
commit 570c3dcfc153 ("arm: Remove spear600 boards and the rest of SPEAr
support").

Fixes: 570c3dcfc153 ("arm: Remove spear600 boards and the rest of SPEAr support")
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
3 years agoTaking over responsibility for GE boards from Sebastian
Martyn Welch [Tue, 21 Sep 2021 16:35:06 +0000 (17:35 +0100)]
Taking over responsibility for GE boards from Sebastian

I am taking over responsibility for the GE board from Sebastian Reichel.
Updating the MAINTAINERS files to reflect this.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>
Acked-by: Sebastian Reichel <sebastian.reichel@collabora.com>
3 years agoMAINTAINERS: remove SPEAR entry
Patrick Delaunay [Tue, 21 Sep 2021 16:18:51 +0000 (18:18 +0200)]
MAINTAINERS: remove SPEAR entry

As the lastest spear directories are removed, delete the associated entry
in the MAINTAINERS file:
- arch/arm/cpu/arm926ejs/spear/
- arch/arm/include/asm/arch-spear/

Fixes: 570c3dcfc153 ("arm: Remove spear600 boards and the rest of SPEAr support")
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
3 years agofs: avoid superfluous messages
Heinrich Schuchardt [Mon, 20 Sep 2021 12:15:03 +0000 (14:15 +0200)]
fs: avoid superfluous messages

Output like the following is quite irritating:

    => bootefi hello
    Scanning disk mmc2.blk...
    No valid Btrfs found
    Bad magic number for SquashFS image.
    ** Unrecognized filesystem type **
    Scanning disk mmc1.blk...
    No valid Btrfs found
    Bad magic number for SquashFS image.
    ** Unrecognized filesystem type **
    Scanning disk mmc0.blk...
    No valid Btrfs found
    Bad magic number for SquashFS image.
    ** Unrecognized filesystem type **

Albeit a whole disk may be formatted with a filesystem in most cases
a partition table is used and the whole disk (partition number 0) doesn't
contain a filesytem. Some partitions may only contain a blob. Not seeing a
filesytem on the whole disk or on any partition is only worth a debug
message.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agoscripts/mailmapper: enable running with Python 3
Heinrich Schuchardt [Thu, 16 Sep 2021 08:59:12 +0000 (10:59 +0200)]
scripts/mailmapper: enable running with Python 3

Our mailmapper script required Python 2 which is no longer maintained.
A main difference when converting to Python 3 is that byte strings are not
character strings. So add conversion and skip over conversion errors.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
3 years agotest/py: tpm2: Skip tpm pytest based on env variable
T Karthik Reddy [Fri, 23 Jul 2021 12:18:26 +0000 (06:18 -0600)]
test/py: tpm2: Skip tpm pytest based on env variable

Tpm test cases relies on tpm device setup. Provide an environment
variable "env__tpm_device_test_skip = True" to skip the test case
if tpm device is not present.
Only needed will have to add variable to the py-test framework.
Test runs successfully even this variable is absent.

Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
3 years agoMerge git://source.denx.de/u-boot-socfpga
Tom Rini [Thu, 23 Sep 2021 12:30:45 +0000 (08:30 -0400)]
Merge git://source.denx.de/u-boot-socfpga

Bugfixes for this one socfpga platform

3 years agoMerge branch 'master' of git://source.denx.de/u-boot-usb
Tom Rini [Thu, 23 Sep 2021 12:30:22 +0000 (08:30 -0400)]
Merge branch 'master' of git://source.denx.de/u-boot-usb

Late bunch of USB fixes (incl. the xhci usb 3.1 support)

3 years agoddr: altera: use KBUILD_BASENAME instead of __FILE__
Marek Vasut [Tue, 14 Sep 2021 03:20:19 +0000 (05:20 +0200)]
ddr: altera: use KBUILD_BASENAME instead of __FILE__

The KBUILD_BASENAME contains just the name of the compiled module,
in this case 'sequencer', rather than a full path to the compiled
file. Use it to prevent pulling the full path into the U-Boot binary,
which is useless and annoying.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Siew Chin Lim <elly.siew.chin.lim@intel.com>
Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Cc: Tien Fong Chee <tien.fong.chee@intel.com>
3 years agoarm: socfpga: vining: Let DWMAC configure PHY reset GPIO
Marek Vasut [Tue, 14 Sep 2021 03:25:36 +0000 (05:25 +0200)]
arm: socfpga: vining: Let DWMAC configure PHY reset GPIO

The DM DWMAC driver is perfectly capable of configuring the ethernet
PHY reset GPIO, let the driver do it instead of doing it in the board
file.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Siew Chin Lim <elly.siew.chin.lim@intel.com>
Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Cc: Tien Fong Chee <tien.fong.chee@intel.com>
3 years agoarm: socfpga: vining: Enable DW I2C driver
Marek Vasut [Tue, 14 Sep 2021 03:25:35 +0000 (05:25 +0200)]
arm: socfpga: vining: Enable DW I2C driver

The Designware I2C IP is used to communicate with I2C peripherals on
SoCFPGA, and required to access I2C EEPROM on this board. Enable it.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Siew Chin Lim <elly.siew.chin.lim@intel.com>
Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Cc: Tien Fong Chee <tien.fong.chee@intel.com>
3 years agoarm: socfpga: vining: Fix UDC controller phandle in DT
Marek Vasut [Tue, 14 Sep 2021 03:25:34 +0000 (05:25 +0200)]
arm: socfpga: vining: Fix UDC controller phandle in DT

The USB peripheral controller is the DWC2 controller 1, not 0.
Update the phandle to fix UDC support on this board.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Siew Chin Lim <elly.siew.chin.lim@intel.com>
Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Cc: Tien Fong Chee <tien.fong.chee@intel.com>
3 years agoarm: socfpga: vining: Un-disable WDT in DT
Marek Vasut [Tue, 14 Sep 2021 03:25:33 +0000 (05:25 +0200)]
arm: socfpga: vining: Un-disable WDT in DT

The WDT on this system should be enabled, make it so.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Siew Chin Lim <elly.siew.chin.lim@intel.com>
Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Cc: Tien Fong Chee <tien.fong.chee@intel.com>
3 years agoarm: socfpga: vining: Set default SPI NOR mode and frequency
Marek Vasut [Tue, 14 Sep 2021 03:25:32 +0000 (05:25 +0200)]
arm: socfpga: vining: Set default SPI NOR mode and frequency

The SPI NOR bus mode is 0 on this system, update it accordingly.
Increase frequency to 40 MHz and enable SFDP parsing, since the
flashes on this system support that and it is a huge performance
improvement.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Siew Chin Lim <elly.siew.chin.lim@intel.com>
Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Cc: Tien Fong Chee <tien.fong.chee@intel.com>
3 years agoarm: socfpga: vining: Set USB gadget manufacturer to Softing with capital S
Marek Vasut [Tue, 14 Sep 2021 03:25:31 +0000 (05:25 +0200)]
arm: socfpga: vining: Set USB gadget manufacturer to Softing with capital S

This was configured in downstream, so it is likely that most of the
custom software used around the device depends on it. Make upstream
compatible.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Siew Chin Lim <elly.siew.chin.lim@intel.com>
Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Cc: Tien Fong Chee <tien.fong.chee@intel.com>
3 years agoarm: socfpga: vining: Increase environment size
Marek Vasut [Tue, 14 Sep 2021 03:25:30 +0000 (05:25 +0200)]
arm: socfpga: vining: Increase environment size

Increase the environment size from 4k to 16k to prevent
environment from becoming full.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Siew Chin Lim <elly.siew.chin.lim@intel.com>
Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Cc: Tien Fong Chee <tien.fong.chee@intel.com>
3 years agoarm: socfpga: vining: Drop meaningless comment
Marek Vasut [Tue, 14 Sep 2021 03:25:29 +0000 (05:25 +0200)]
arm: socfpga: vining: Drop meaningless comment

The comment is no longer meaningful due to DT conversion, drop it.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Siew Chin Lim <elly.siew.chin.lim@intel.com>
Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Cc: Tien Fong Chee <tien.fong.chee@intel.com>
3 years agousb: xhci-dwc3: Add support for USB 3.1 controllers
Mark Kettenis [Thu, 16 Sep 2021 14:00:09 +0000 (16:00 +0200)]
usb: xhci-dwc3: Add support for USB 3.1 controllers

This adds support for the DWC_sub31 controllers such as those
found on Apple's M1 SoC.  This version of the controller
seems to work fine with the existing driver.

Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
3 years agousb: ehci-mx6: use phy_type from device tree
Matthias Schiffer [Mon, 20 Sep 2021 13:37:25 +0000 (15:37 +0200)]
usb: ehci-mx6: use phy_type from device tree

Allow using different PHY interfaces for multiple USB controllers. When no
value is set in DT, we fall back to CONFIG_MXC_USB_PORTSC for now to stay
compatible with current board configurations.

This also adds support for the HSIC mode of the i.MX7.

Signed-off-by: Markus Niebel <Markus.Niebel@ew.tq-group.com>
Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
3 years agousb: ehci-ci: remove redundant PORTSC flag definitions
Matthias Schiffer [Mon, 20 Sep 2021 13:37:24 +0000 (15:37 +0200)]
usb: ehci-ci: remove redundant PORTSC flag definitions

These definitions are unused, all boards that define portsc flags use
the equivalent PORT_* definitions instead.

Signed-off-by: Markus Niebel <Markus.Niebel@ew.tq-group.com>
Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
3 years agoinclude/configs: replace MXC_EHCI_MODE_SERIAL with PORT_PTS_SERIAL
Matthias Schiffer [Mon, 20 Sep 2021 13:37:23 +0000 (15:37 +0200)]
include/configs: replace MXC_EHCI_MODE_SERIAL with PORT_PTS_SERIAL

The MXC_EHCI_MODE_ definitions are redundant. Replace MXC_EHCI_MODE_SERIAL
with the equivalent PORT_PTS_SERIAL.

Only the zmx25 platform is affected.

Signed-off-by: Markus Niebel <Markus.Niebel@ew.tq-group.com>
Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
3 years agousb: add support for ULPI/SERIAL/HSIC PHY modes
Matthias Schiffer [Mon, 20 Sep 2021 13:37:22 +0000 (15:37 +0200)]
usb: add support for ULPI/SERIAL/HSIC PHY modes

Import usb_phy_interface enum values and DT match strings from the Linux
kernel.

Signed-off-by: Markus Niebel <Markus.Niebel@ew.tq-group.com>
Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
3 years agoconfigs: Enable USB3 on Allwinner H6 boards
Samuel Holland [Mon, 5 Jul 2021 12:29:04 +0000 (13:29 +0100)]
configs: Enable USB3 on Allwinner H6 boards

Pine H64 and Orange Pi 3 both provide a USB3 type A port.
Enable it in U-Boot.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
3 years agousb: xhci-dwc3: Add support for clocks/resets
Samuel Holland [Mon, 5 Jul 2021 12:29:03 +0000 (13:29 +0100)]
usb: xhci-dwc3: Add support for clocks/resets

Some platforms, like the Allwinner H6, do not have a separate glue layer
around the dwc3. Instead, they rely on the clocks/resets/phys referenced
from the dwc3 DT node itself. Add support for enabling the clocks/resets
referenced from the dwc3 DT node.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
3 years agousb: xhci-pci: Move reset logic out of XHCI core
Samuel Holland [Mon, 5 Jul 2021 12:29:02 +0000 (13:29 +0100)]
usb: xhci-pci: Move reset logic out of XHCI core

Resetting an XHCI controller inside xhci_register undoes any register
setup performed by the platform driver. And at least on the Allwinner
H6, resetting the XHCI controller also resets the PHY, which prevents
the controller from working. That means the controller must be taken out
of reset before initializing the PHY, which must be done before calling
xhci_register.

The logic in the XHCI core was added to support the Raspberry Pi 4
(although this was not mentioned in the commit log!), which uses the
xhci-pci platform driver. Move the reset logic to the platform driver,
where it belongs, and where it cannot interfere with other platform
drivers.

This also fixes a failure to call reset_free if xhci_register failed.

Fixes: 0b80371b350e ("usb: xhci: Add reset controller support")
Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
3 years agophy: sun50i-usb3: Add a driver for the H6 USB3 PHY
Samuel Holland [Mon, 5 Jul 2021 12:29:01 +0000 (13:29 +0100)]
phy: sun50i-usb3: Add a driver for the H6 USB3 PHY

This driver is needed for XHCI to work on the Allwinner H6 SoC. The
driver is copied from Linux v5.10.

Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Samuel Holland <samuel@sholland.org>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
3 years agoMerge https://source.denx.de/u-boot/custodians/u-boot-x86
Tom Rini [Wed, 22 Sep 2021 15:43:12 +0000 (11:43 -0400)]
Merge https://source.denx.de/u-boot/custodians/u-boot-x86

- Small fixes to eMMC and SDHCI for Intel Edison

3 years agox86: tangier: acpi: Add GPIO card detection to SDHCI #2
Andy Shevchenko [Sat, 11 Sep 2021 18:27:42 +0000 (21:27 +0300)]
x86: tangier: acpi: Add GPIO card detection to SDHCI #2

On Intel Tangier the SDHCI #2 provides SD card connection.
Add GPIO card detection for it.

Fixes: 39665beed6f7 ("x86: tangier: Enable ACPI support for Intel Tangier")
BugLink: https://github.com/edison-fw/meta-intel-edison/issues/135
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Bin Meng <bmeng.cn@gmail.com>
3 years agox86: edison: Mark eMMC non-removable
Andy Shevchenko [Fri, 10 Sep 2021 07:59:27 +0000 (10:59 +0300)]
x86: edison: Mark eMMC non-removable

eMMC is non-removable on Intel Edison board. Fix the DTS accordingly.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
3 years agoMerge tag 'u-boot-stm32-20210921' of https://source.denx.de/u-boot/custodians/u-boot-stm
Tom Rini [Wed, 22 Sep 2021 13:38:48 +0000 (09:38 -0400)]
Merge tag 'u-boot-stm32-20210921' of https://source.denx.de/u-boot/custodians/u-boot-stm

- stm32mp15: fix the used partition name for U-Boot environement with SPL

3 years agoarm: dts: stm32mp1: use ssbl partition name for U-Boot
Patrick Delaunay [Tue, 14 Sep 2021 12:14:52 +0000 (14:14 +0200)]
arm: dts: stm32mp1: use ssbl partition name for U-Boot

Continue to use the "ssbl" name for GPT partition of secondary boot
stage = U-Boot for basic boot with SPL to avoid to disturb existing user.

The "fip" partition name is only used for TFA_BOOT with FIP, it is a TF-A
BL2 requirement; it the default configuration for STMicroelectronics
boards.

Fixes: b73e8bf453f8 ("arm: stm32mp: add defconfig for trusted boot with FIP")
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
3 years agoMerge https://source.denx.de/u-boot/custodians/u-boot-marvell
Tom Rini [Mon, 20 Sep 2021 12:45:26 +0000 (08:45 -0400)]
Merge https://source.denx.de/u-boot/custodians/u-boot-marvell

- wdt: dw: Fix passing NULL pointer to reset functions (Sean)

3 years agowdt: dw: Fix passing NULL pointer to reset functions
Sean Anderson [Sat, 11 Sep 2021 19:11:30 +0000 (15:11 -0400)]
wdt: dw: Fix passing NULL pointer to reset functions

reset_*_bulk expects a real pointer.

Fixes: 4f7abafe1c ("driver: watchdog: reset watchdog in designware_wdt_stop() function")
Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agoMerge tag 'dm-pull-18sep21' of https://source.denx.de/u-boot/custodians/u-boot-dm
Tom Rini [Sun, 19 Sep 2021 14:38:20 +0000 (10:38 -0400)]
Merge tag 'dm-pull-18sep21' of https://source.denx.de/u-boot/custodians/u-boot-dm

Revert the public-key-embedded-in-executable patches so this does not form
part of an official release before it is agreed.

3 years agoRevert "efi_capsule: Move signature from DTB to .rodata"
Simon Glass [Mon, 2 Aug 2021 14:44:31 +0000 (08:44 -0600)]
Revert "efi_capsule: Move signature from DTB to .rodata"

This was unfortunately applied despite much discussion about it beiong
the wrong way to implement this feature.

Revert it before too many other things are built on top of it.

This reverts commit ddf67daac39de76d2697d587148f4c2cb768f492.
Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agoRevert "mkeficapsule: Remove dtb related options"
Simon Glass [Mon, 2 Aug 2021 14:44:30 +0000 (08:44 -0600)]
Revert "mkeficapsule: Remove dtb related options"

This reverts commit f86caab058ff062ce72b24cd1ab9ec1253cc1352.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agoRevert "doc: Update CapsuleUpdate READMEs"
Simon Glass [Mon, 2 Aug 2021 14:44:29 +0000 (08:44 -0600)]
Revert "doc: Update CapsuleUpdate READMEs"

This reverts commit 316ab801c0d91c02b21b8be1e3db7e69555364e9.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agoMerge branch '2021-09-17-TI-platform-updates'
Tom Rini [Fri, 17 Sep 2021 22:51:57 +0000 (18:51 -0400)]
Merge branch '2021-09-17-TI-platform-updates'

- Assorted bugfixes for TI platforms

3 years agoarm: mach-k3: common: Make sure firmware sections are loaded prior to armv8 startup
Nishanth Menon [Tue, 31 Aug 2021 18:20:48 +0000 (13:20 -0500)]
arm: mach-k3: common: Make sure firmware sections are loaded prior to armv8 startup

With Device Manager firmware in an elf file form, we cannot load the FIT
image to the exact same address as any of the executable sections of the
elf file itself is located.

However, the device tree descriptions for the ARMV8 bootloader/OS
includes DDR regions only the final sections in DDR where the Device
Manager firmware is actually executing out of.

As the R5 uC is usually operating at a slower rate than an ARMv8 MPU,
by starting the Armv8 ahead of parsing the elf and copying the correct
sections to the required memories creates a race condition where the
ARMv8 could overwrite the elf image loaded from the FIT image prior to
the R5 completing parsing and putting the correct sections of elf in
the required memory locations. OR create rather obscure debug conditions
where data in the section is being modified by ARMV8 OS while the elf
copy is in progress.

To prevent all these conditions, lets make sure that the elf parse and
copy operations are completed ahead of ARMv8 being released to execute.

We will pay a penalty of elf copy time, but that is a valid tradeoff in
comparison to debug of alternate scenarios.

Signed-off-by: Nishanth Menon <nm@ti.com>
3 years agoarm: mach-k3: am6_init: Prioritize MSMC traffic over DDR in NAVSS Northbridge
Roger Quadros [Wed, 8 Sep 2021 20:28:59 +0000 (15:28 -0500)]
arm: mach-k3: am6_init: Prioritize MSMC traffic over DDR in NAVSS Northbridge

NB0 is bridge to SRAM and NB1 is bridge to DDR.

To ensure that SRAM transfers are not stalled due to delays during DDR
refreshes, SRAM traffic should be higher priority (threadmap=2) than
DDR traffic (threadmap=0).

This fixup is critical to provide deterministic access latency to
MSMC from ICSSG, it applies to all AM65 silicon revisions and is due
to incorrect reset values (has no erratum id) and statically setting
things up should be done independent of usecases and board.

This specific style of Northbridge configuration is specific only to
AM65x devices, follow-on K3 devices have different data prioritization
schemes (ASEL and the like) and hence the fixup applies purely to
AM65x.

Without this fix, ICSSG TX lock-ups due to delays in MSMC transfers in
case of SR1 devices, on SR2 devices, lockups were not observed so far
but high retry rates of ICSSG Ethernet (icssg-eth) and, thus, lower
throughput.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Acked-by: Andrew F. Davis <afd@ti.com>
Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Benoit Parrot <bparrot@ti.com>
[Jan: rebased, dropped used define, extended commit log]
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
[Nishanth: Provide relevant context in the commit message]
Signed-off-by: Nishanth Menon<nm@ti.com>
3 years agoclk: ti: k3: Update driver to account for divider flags
Suman Anna [Tue, 7 Sep 2021 22:16:58 +0000 (17:16 -0500)]
clk: ti: k3: Update driver to account for divider flags

The K3 SoCs have some PLL output clocks (POSTDIV clocks) which in
turn serve as inputs to other HSDIV output clocks. These clocks use
the actual value to compute the divider clock rate, and need to be
registered with the CLK_DIVIDER_ONE_BASED flags. The current k3-clk
driver and data lacks the infrastructure to pass in divider flags.
Update the driver and data to account for these divider flags.

Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
3 years agoclk: ti: k3-pll: Change DIV_CTRL programming to read-modify-write
Dave Gerlach [Tue, 7 Sep 2021 22:16:57 +0000 (17:16 -0500)]
clk: ti: k3-pll: Change DIV_CTRL programming to read-modify-write

There are three different divider values in the DIV_CTRL register
controlled by the k3-pll driver. Currently the ti_pll_clk_set_rate
function writes the entire register when programming plld, even though
plld only resides in the lower 6 bits.

Change the plld programming to read-modify-write to only affect the
relevant bits for plld and to preserve the other two divider values
present in the upper 16 bits, otherwise they will always get set to zero
when programming plld.

Fixes: 0aa2930ca192 ("clk: add support for TI K3 SoC PLL")
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
3 years agoarm: mach-k3: Add note to auto-generated files
Dave Gerlach [Tue, 7 Sep 2021 22:16:56 +0000 (17:16 -0500)]
arm: mach-k3: Add note to auto-generated files

Add a note to the automatically generated clk-data and dev-data files
for j721e and j7200 to indicate that they are in fact auto-generated and
should not be hand edited.

Also adjust TI URL to use https instead of http and also add an empty
line before first header inclusion.

Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
3 years agoarm: mach-k3: j7200: Fix clk-data parenting for postdiv PLL clocks
Suman Anna [Tue, 7 Sep 2021 22:16:55 +0000 (17:16 -0500)]
arm: mach-k3: j7200: Fix clk-data parenting for postdiv PLL clocks

The TI K3 Fractional PLLs use two programmable POSTDIV1 and POSTDIV2
divisors to generate the final FOUTPOSTDIV clock. These are in sequence
with POSTDIV2 following the POSTDIV1 clock. The current J7200 clock data
has the POSTDIV2 clock as the parent for the POSTDIV1 clock, which is
opposite of the actual implementation. Fix the data by simply adjusting
the register bit-shifts.

The Main PLL1 POSTDIV clocks were also defined incorrectly using Main PLL0
register values, fix these as well.

Fixes: 277729eaf373 ("arm: mach-k3: Add platform data for j721e and j7200")
Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
3 years agoarm: mach-k3: j721e: Fix clk-data parenting for postdiv PLL clocks
Suman Anna [Tue, 7 Sep 2021 22:16:54 +0000 (17:16 -0500)]
arm: mach-k3: j721e: Fix clk-data parenting for postdiv PLL clocks

The TI K3 Fractional PLLs use two programmable POSTDIV1 and POSTDIV2
divisors to generate the final FOUTPOSTDIV clock. These are in sequence
with POSTDIV2 following the POSTDIV1 clock. The current J721E clock data
has the POSTDIV2 clock as the parent for the POSTDIV1 clock, which is
opposite of the actual implementation. Fix the data by simply adjusting
the register bit-shifts.

The Main PLL1 POSTDIV clocks were also defined incorrectly using Main PLL0
register values, fix these as well.

Fixes: 277729eaf373 ("arm: mach-k3: Add platform data for j721e and j7200")
Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
3 years agoarm: mach-k3: common: Add a release_resources_for_core_shutdown() stub
Suman Anna [Tue, 27 Jul 2021 23:24:40 +0000 (18:24 -0500)]
arm: mach-k3: common: Add a release_resources_for_core_shutdown() stub

Add a weak release_resources_for_core_shutdown() stub implementation
that can be overridden by actual implementation if a SoC supports that
function.

Signed-off-by: Suman Anna <s-anna@ti.com>
Reviewed-by: Nishanth Menon <nm@ti.com>
3 years agofirmware: ti_sci: Include linux/err.h in ti_sci_protocol.h
Suman Anna [Tue, 27 Jul 2021 23:24:39 +0000 (18:24 -0500)]
firmware: ti_sci: Include linux/err.h in ti_sci_protocol.h

The common TI SCI header file uses some macros from err.h and these
get exercised when CONFIG_TI_SCI_PROTOCOL is not defined. Include
the linux/err.h header file in this header file directly rather
than relying on source files to include it to eliminate any
potential build errors.

While at this, reorder the existing header file include to the
beginning of the file.

Signed-off-by: Suman Anna <s-anna@ti.com>
Reviewed-by: Nishanth Menon <nm@ti.com>
3 years agoMAINTAINERS: POWERPC MPC8XX: Update email address
Christophe Leroy [Wed, 13 May 2020 05:30:03 +0000 (05:30 +0000)]
MAINTAINERS: POWERPC MPC8XX: Update email address

Our email addresses have changed from @c-s.fr to @csgroup.eu

Update entry in MAINTAINERS

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
3 years agoMerge branch 'rpi-next' of https://source.denx.de/u-boot/custodians/u-boot-raspberrypi
Tom Rini [Wed, 15 Sep 2021 19:22:46 +0000 (15:22 -0400)]
Merge branch 'rpi-next' of https://source.denx.de/u-boot/custodians/u-boot-raspberrypi

Ivan's patch fixes a kernel warning when booting RPi2, as the firmware
already
provides a frambebuffer node.

Marek's patch fixes random crashes on 32 bit RPi4 with newer firmware.

My SMBIOS patchesfixes an issue that show up with
e4f8e543f1 ("smbios: Drop the unused Kconfig options").
Basically the SMBIOS table broke and wasn't readable anymore.

3 years agorpi: Conditionally add simple-framebuffer node
Ivan T. Ivanov [Tue, 10 Aug 2021 14:31:14 +0000 (16:31 +0200)]
rpi: Conditionally add simple-framebuffer node

It appears that RPi firmware has already added framebuffer
node under /chosen, at least on RPi 2 versions. So check
for this and don't add duplicate node.

Signed-off-by: Ivan T. Ivanov <iivanov@suse.de>
Signed-off-by: Matthias Brugger <mbrugger@suse.com>
3 years agoARM: bcm283x: change the virtual address of the XHCI PCI device base
Marek Szyprowski [Thu, 17 Jun 2021 09:22:03 +0000 (11:22 +0200)]
ARM: bcm283x: change the virtual address of the XHCI PCI device base

Move the XHCI PCI device base up in the virtual address space. This fixes
initialization failure observed with newer Raspberry Pi firmware, later
than 63b1922311 ("firmware: arm_loader: Update armstubs with those from
PR 117). It looks that chosing 0xff800000 as the XHCI PCI device base
conflicts with the updated ARM/VideoCore firmware.

This also requires to reduce the size of the mapped PCI device region
from 8MiB to 4MiB to fit into 32bit address space. This is still enough
for the XHCI PCI device.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Nicolas Saenz Julienne <nsaenz@kernel.org>
Tested-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Matthias Brugger <mbrugger@suse.com>
3 years agoconfigs: rpi: Enable SMBIOS sysinfo driver
Matthias Brugger [Mon, 12 Apr 2021 13:38:52 +0000 (15:38 +0200)]
configs: rpi: Enable SMBIOS sysinfo driver

Enable this driver to allow U-Boot to get SMBIOS table information from
a device tree node.

Signed-off-by: Matthias Brugger <mbrugger@suse.com>
Acked-by: Fabian Vogt <fvogt@suse.com>
3 years agoarm: dts: bcm283x: Add minimal smbios information
Matthias Brugger [Mon, 12 Apr 2021 13:38:51 +0000 (15:38 +0200)]
arm: dts: bcm283x: Add minimal smbios information

At present SMBIOS tables are empty, which breaks some use-cases that
rely on that. Add some minimal information to fulfill this.

Signed-off-by: Matthias Brugger <mbrugger@suse.com>
3 years agoPrepare v2021.10-rc4
Tom Rini [Tue, 14 Sep 2021 22:58:10 +0000 (18:58 -0400)]
Prepare v2021.10-rc4

Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoconfigs: Resync with savedefconfig
Tom Rini [Tue, 14 Sep 2021 22:48:05 +0000 (18:48 -0400)]
configs: Resync with savedefconfig

Rsync all defconfig files using moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoimage: Avoid erroneous double byte-swap in CRC value
Alexandru Gagniuc [Tue, 14 Sep 2021 20:53:33 +0000 (15:53 -0500)]
image: Avoid erroneous double byte-swap in CRC value

The hash algorithm selection was streamlined in commit 92055e138f28
("image: Drop if/elseif hash selection in calculate_hash()"). Said
commit kept the call to cpu_to_uimage() to convert the CRC to big
endian format.

This would have been correct when calling crc32_wd(). However, the
->hash_func_ws member of crc32 points to crc32_wd_buf(), which already
converts the CRC to big endian. On a little endian host, doing both
conversions results in a little-endian CRC. This is incorrect.

To remedy this, simply drop the call to cpu_to_uimage(), thus only
doing the byte-order conversion once.

Fixes: 92055e138f28 ("image: Drop if/elseif hash selection in
       calculate_hash()")
Tested-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
3 years agoMerge branch '2021-09-14-assorted-fixes'
Tom Rini [Tue, 14 Sep 2021 19:47:07 +0000 (15:47 -0400)]
Merge branch '2021-09-14-assorted-fixes'

- Assorted bugfixes