]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
2 years agonet: sun8i-emac: Downgrade printf during probe to debug
Samuel Holland [Fri, 15 Jul 2022 05:20:56 +0000 (00:20 -0500)]
net: sun8i-emac: Downgrade printf during probe to debug

This just prints the PHY mode taken from the devicetree. It does not
need to be printed during every boot, and also avoids an unwanted
line break for the "net: " reporting line.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2 years agosunxi: configs: streamline include/configs/sun*.h wrappers
Andre Przywara [Mon, 4 Jul 2022 14:10:03 +0000 (15:10 +0100)]
sunxi: configs: streamline include/configs/sun*.h wrappers

For mostly historic reasons we had configuration headers for each
Allwinner CPU "family". These days they are mostly just including one
common header, with the rest being somewhat empty.
There were attempts to remove them, and to just use the one common header
to begin with, but this has implications to the build system, which me
might not be ready for, yet.

To document this behaviour, and to avoid something sneaking in over
time, make those files all the same (minus the CPU family name and
the copyrights), and add a comment explaining that.
This makes it easier to just remove those files later on, when needed
and possible.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2 years agoreset: sunxi: Reuse the platform data from the clock driver
Samuel Holland [Mon, 9 May 2022 05:29:37 +0000 (00:29 -0500)]
reset: sunxi: Reuse the platform data from the clock driver

The clock and reset drivers use the exact same platform data. Simplify
them by sharing the object. This is safe because the parent device
(the clock device) always gets its driver model callbacks run first.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Acked-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2 years agoreset: sunxi: Convert driver private data to platform data
Samuel Holland [Mon, 9 May 2022 05:29:36 +0000 (00:29 -0500)]
reset: sunxi: Convert driver private data to platform data

The reason here is the same as the reason for changing the clock driver:
platform data can be provided when binding the driver.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2 years agoclk: sunxi: Convert driver private data to platform data
Samuel Holland [Mon, 9 May 2022 05:29:35 +0000 (00:29 -0500)]
clk: sunxi: Convert driver private data to platform data

All of the driver private data should really be platform data since it
is determined statically (selected by the compatible string or extracted
from the devicetree). Move everything to platform data, so it can be
provided when binding the driver. This is useful for SPL, or for
instantiating the driver as part of an MFD.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2 years agoclk: sunxi: Use a single driver for all variants
Samuel Holland [Mon, 9 May 2022 05:29:34 +0000 (00:29 -0500)]
clk: sunxi: Use a single driver for all variants

Now that all of the variants use the same bind/probe functions and ops,
there is no need to have a separate driver for each variant. Since most
SoCs contain two variants (the main CCU and PRCM CCU), this saves a bit
of firmware size and RAM.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
[Andre: add F1C100s support]
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2 years agoreset: sunxi: Get the reset count from the CCU descriptor
Samuel Holland [Mon, 9 May 2022 05:29:33 +0000 (00:29 -0500)]
reset: sunxi: Get the reset count from the CCU descriptor

This allows all of the clock drivers to use a common bind function.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
[Andre: add F1C100s support]
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2 years agoclk: sunxi: Prevent out-of-bounds gate array access
Samuel Holland [Mon, 9 May 2022 05:29:32 +0000 (00:29 -0500)]
clk: sunxi: Prevent out-of-bounds gate array access

Because the gate arrays are not given explicit sizes, the arrays are
only as large as the highest-numbered gate described in the driver.
However, only a subset of the CCU clocks are needed by U-Boot. So there
are valid clock specifiers with indexes greater than the size of the
arrays. Referencing any of these clocks causes out-of-bounds access.
Fix this by checking the identifier against the size of the array.

Fixes: 0d47bc705651 ("clk: Add Allwinner A64 CLK driver")
Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2 years agoclk: sunxi: Store the array sizes in the CCU descriptor
Samuel Holland [Mon, 9 May 2022 05:29:31 +0000 (00:29 -0500)]
clk: sunxi: Store the array sizes in the CCU descriptor

The reset array size is currently used for bounds checking in the reset
driver. The same bounds check should really be done in the clock driver.

Currently, the array size is provided to the reset driver separately
from the CCU descriptor, which is a bit strange. Let's do this the usual
way, with the array sizes next to the arrays themselves.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
[Andre: add F1C100s support]
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2 years agoMerge branch '2022-07-14-migrate-wiki-to-sphinx'
Tom Rini [Thu, 14 Jul 2022 22:43:51 +0000 (18:43 -0400)]
Merge branch '2022-07-14-migrate-wiki-to-sphinx'

- Merge the majority of the relevant wiki content to doc/process/ and
  convert to Sphinx.  Begin cleaning up and modernizing the content as
  well to match current process.  There is still more work to be done in
  this regard.

2 years agodoc: Add in the historical release statistics found on the wiki
Tom Rini [Tue, 12 Jul 2022 18:14:19 +0000 (14:14 -0400)]
doc: Add in the historical release statistics found on the wiki

The wiki had gitdm-generated release statistics starting with v1.3.0.
Re-generate this information as Sphinx.  This aims to be as historically
accurate as possible and so some company renames were kept to their old
rather than current name until we had made the switch previously.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agodoc: process: Correct and expand slightly on the Merge Window concept
Tom Rini [Tue, 12 Jul 2022 21:34:15 +0000 (17:34 -0400)]
doc: process: Correct and expand slightly on the Merge Window concept

For quite a long time we've been using a 3 week, rather than 2 week,
merge window as it was only 2 weeks during the timeframe where we did 2
month rather than 3 month releases.  This corrects the places that still
had 2 weeks and tries to make things a bit clearer overall.

Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agodoc: Add doc/develop/release_cycle.rst
Tom Rini [Tue, 12 Jul 2022 21:34:14 +0000 (17:34 -0400)]
doc: Add doc/develop/release_cycle.rst

Migrate the RelaseCycle wiki page to Sphinx.  In terms of visible
changes, we stop having a dynamic countdown to when the release is.  And
we drop the year-based statistics, that were not being kept up to date.
For the moment, we only link to statistics for v2022.07 but will add
back the historical data in a subsequent patch.

Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoprocess.rst: Modernize the "Workflow of a Custodian" section
Tom Rini [Thu, 14 Jul 2022 12:07:46 +0000 (08:07 -0400)]
process.rst: Modernize the "Workflow of a Custodian" section

The "Workflow of a Custodian" section on the wiki had not been changed
in quite some time to reflect how the process has been functioning for
some time.  First, update some links to point to modern and current
sources of information.

Second, and more overarching, reword much of the section.  This expands
on the expectations of both custodians and developers when it comes to
rebasing patches.  Rework the final points to be clearer that Custodians
are expected to do their best to test the changes and ask for help when
needed, as well as that pull requests are expected in a timely manner.

Cc: Claudius Heine <ch@denx.de>
Cc: Martin Bonner <martingreybeard@gmail.com>
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoprocess.rst: Perform minor cleanups
Tom Rini [Thu, 14 Jul 2022 12:07:45 +0000 (08:07 -0400)]
process.rst: Perform minor cleanups

- Use gender-neutral language to refer to the user, consistently.
- Reword a few places so that they read more naturally.
- Make the long standing practice around "Twilight Time" more clear,
  hopefully.
- Replace a reference to MAKEALL with a reference to CI testing as
  that's the current requirement.

Cc: Claudius Heine <ch@denx.de>
Cc: Martin Bonner <martingreybeard@gmail.com>
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agodesignprinciples.rst: Perform minor cleanups
Tom Rini [Thu, 14 Jul 2022 12:07:44 +0000 (08:07 -0400)]
designprinciples.rst: Perform minor cleanups

- Remove some missed wiki markup, and escape a "\n" correctly.
- Use gender-neutral language to refer to the user, consistently.

Cc: Claudius Heine <ch@denx.de>
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agodoc: Migrate Process wiki page to Sphinx
Tom Rini [Thu, 14 Jul 2022 12:07:43 +0000 (08:07 -0400)]
doc: Migrate Process wiki page to Sphinx

Move the current Process wiki page to doc/develop/process.rst.  The
changes here are for formatting or slight rewording so that it reads
well when linking to other Sphinx documents.

Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agodoc: codingstyle: Remove comment about '//' style comments
Tom Rini [Thu, 14 Jul 2022 12:07:42 +0000 (08:07 -0400)]
doc: codingstyle: Remove comment about '//' style comments

For some time now we've allowed for '//' style comments, which mirrors
the Linux kernel.  So drop this point here.

Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agodoc: Migrate DesignPrinciples wiki page to Sphinx
Tom Rini [Thu, 14 Jul 2022 12:07:41 +0000 (08:07 -0400)]
doc: Migrate DesignPrinciples wiki page to Sphinx

Move the current DesignPrinciples wiki page to
doc/develop/designprinciples.rst.  The changes here are for formatting
or slight rewording so that it reads well when linking to other Sphinx
documents.

Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agodoc: Migrate CodingStyle wiki page to Sphinx
Tom Rini [Thu, 14 Jul 2022 12:07:40 +0000 (08:07 -0400)]
doc: Migrate CodingStyle wiki page to Sphinx

Move the current CodingStyle wiki page to doc/develop/codingstyle.rst.
The changes here are for formatting or slight rewording so that it reads
well when linking to other Sphinx documents.

Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoMerge https://source.denx.de/u-boot/custodians/u-boot-usb
Tom Rini [Thu, 14 Jul 2022 15:10:49 +0000 (11:10 -0400)]
Merge https://source.denx.de/u-boot/custodians/u-boot-usb

2 years agospl: sdp: Pass the USB index to board_usb_init()
Fabio Estevam [Wed, 13 Jul 2022 20:39:46 +0000 (17:39 -0300)]
spl: sdp: Pass the USB index to board_usb_init()

board_usb_init() should receive the controller_index as its
first parameter instead of having it hardcoded as 0.

All in-tree users have CONFIG_SPL_SDP_USB_DEV as 0, so this error
should not affect any board.

Fix it by passing controller_index as the parameter of board_usb_init().

Signed-off-by: Fabio Estevam <festevam@denx.de>
Acked-by: Peng Fan <peng.fan@nxp.com>
2 years agoMerge tag 'mips-pull-2022-07-13' of https://source.denx.de/u-boot/custodians/u-boot...
Tom Rini [Thu, 14 Jul 2022 11:18:33 +0000 (07:18 -0400)]
Merge tag 'mips-pull-2022-07-13' of https://source.denx.de/u-boot/custodians/u-boot-mips

- MIPS: add drivers and board support for Mediatek MT7621 SoC

2 years agoMerge tag 'efi-2022-10-rc1' of https://source.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Thu, 14 Jul 2022 01:31:46 +0000 (21:31 -0400)]
Merge tag 'efi-2022-10-rc1' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request for efi-2022-10-rc1

Documentation:

* rework the mkimage.1 man-page
* add a statistics page for v2022.07
* update environment description

UEFI:

* add Ilias Apalodimas as co-maintainer
* fix a memory leak in efi_set_bootdev()
* suppress a build warning

2 years agoMAINTAINERS: update maintainer for MediaTek MIPS platform
Weijie Gao [Fri, 20 May 2022 03:24:16 +0000 (11:24 +0800)]
MAINTAINERS: update maintainer for MediaTek MIPS platform

Update maintainer for MediaTek MIPS platform

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2 years agotools: mtk_image: add support for MT7621 NAND images
Weijie Gao [Fri, 20 May 2022 03:24:10 +0000 (11:24 +0800)]
tools: mtk_image: add support for MT7621 NAND images

The BootROM of MT7621 requires a image header for SPL to record its size
and load address when booting from NAND.

To create such an image, one can use the following command line:
mkimage -T mtk_image -a 0x80200000 -e 0x80200000 -n "mt7621=1"
-d u-boot-spl-ddr.bin u-boot-spl-ddr.img

Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2 years agospl: nand: support loading legacy image with payload compressed
Weijie Gao [Fri, 20 May 2022 03:24:04 +0000 (11:24 +0800)]
spl: nand: support loading legacy image with payload compressed

Add support to load legacy image with payload compressed. This redirects
the boot flow for all legacy images. If the payload is not compressed, the
actual behavior will remain unchanged.

Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2 years agospl: spl_legacy: fix the use of SPL_COPY_PAYLOAD_ONLY
Weijie Gao [Fri, 20 May 2022 03:23:58 +0000 (11:23 +0800)]
spl: spl_legacy: fix the use of SPL_COPY_PAYLOAD_ONLY

If the payload is compressed, SPL_COPY_PAYLOAD_ONLY should always be set
since the payload will not be directly read to its load address. The
payload will first be read to a temporary buffer, and then be decompressed
to its load address, without image header.

If the payload is not compressed, and SPL_COPY_PAYLOAD_ONLY is set, image
header should be skipped on loading. Otherwise image header should also be
read to its load address.

Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2 years agospl: allow using nand base without standard nand driver
Weijie Gao [Fri, 20 May 2022 03:23:53 +0000 (11:23 +0800)]
spl: allow using nand base without standard nand driver

This patch removes the dependency to SPL_NAND_DRIVERS for SPL_NAND_BASE to
allow minimal spl nand driver to use nand base for probing NAND chips.

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2 years agonand: raw: add support for MediaTek MT7621 SoC
Weijie Gao [Fri, 20 May 2022 03:23:47 +0000 (11:23 +0800)]
nand: raw: add support for MediaTek MT7621 SoC

This patch adds NAND flash controller driver for MediaTek MT7621 SoC.
The NAND flash controller of MT7621 supports only SLC NAND flashes.
It supports 4~12 bits correction with maximum 4KB page size.

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2 years agonet: mediatek: add support for MediaTek MT7621 SoC
Weijie Gao [Fri, 20 May 2022 03:23:42 +0000 (11:23 +0800)]
net: mediatek: add support for MediaTek MT7621 SoC

This patch adds GMAC support for MediaTek MT7621 SoC.
MT7621 has the same GMAC/Switch configuration as MT7623.

Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2 years agonet: mediatek: use regmap api to modify ethsys registers
Weijie Gao [Fri, 20 May 2022 03:23:37 +0000 (11:23 +0800)]
net: mediatek: use regmap api to modify ethsys registers

The address returned by regmap_get_range() is not remapped. Directly r/w
to this address is ok for ARM platforms since it's idential to the virtual
address.

But for MIPS platform only virtual address should be used for access.
To solve this issue, the regmap api regmap_read/regmap_write should be used
since they will remap address before accessing.

Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2 years agonet: mediatek: remap iobase address
Weijie Gao [Fri, 20 May 2022 03:23:31 +0000 (11:23 +0800)]
net: mediatek: remap iobase address

The iobase address from dts node is actually physical address. It's
identical to the virtual address in ARM platform. This is ok because this
driver was used only by ARM platforms (mt7622/mt7623 ...).

But now this driver will be used by mt7621 which is a MIPS SoC. For MIPS
platform the physical address space is mapped to KSEG0 and KSEG1 and this
makes the virtual address apparently not idential to its physical address.

To solve this issue, this patch replaces dev_read_addr with dev_remap_addr
to get the remapped iobase address.

Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2 years agommc: mediatek: add support for MediaTek MT7621 SoC
Weijie Gao [Fri, 20 May 2022 03:23:26 +0000 (11:23 +0800)]
mmc: mediatek: add support for MediaTek MT7621 SoC

This patch adds SDXC support for MediaTek MT7621 SoC

Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2 years agowatchdog: add support for MediaTek MT7621 SoC
Weijie Gao [Fri, 20 May 2022 03:23:19 +0000 (11:23 +0800)]
watchdog: add support for MediaTek MT7621 SoC

This patch makes mt7621_wdt driver available for MediaTek MT7621 SoC

Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2 years agogpio: add support for MediaTek MT7621 SoC
Weijie Gao [Fri, 20 May 2022 03:23:14 +0000 (11:23 +0800)]
gpio: add support for MediaTek MT7621 SoC

This patch makes mt7621_gpio driver available for MediaTek MT7621 SoC

Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2 years agospi: add support for MediaTek MT7621 SoC
Weijie Gao [Fri, 20 May 2022 03:23:08 +0000 (11:23 +0800)]
spi: add support for MediaTek MT7621 SoC

This patch makes mt7621_spi driver available for MediaTek MT7621 SoC

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2 years agophy: mtk-tphy: add support for MediaTek MT7621 SoC
Weijie Gao [Fri, 20 May 2022 03:23:01 +0000 (11:23 +0800)]
phy: mtk-tphy: add support for MediaTek MT7621 SoC

This patch makes mtk-tphy driver available for MediaTek MT7621 SoC

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2 years agousb: xhci-mtk: add support for MediaTek MT7621 SoC
Weijie Gao [Fri, 20 May 2022 03:22:56 +0000 (11:22 +0800)]
usb: xhci-mtk: add support for MediaTek MT7621 SoC

This patch makes xhci-mtk driver available for MediaTek MT7621 SoC

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2 years agopinctrl: mtmips: add support for MediaTek MT7621 SoC
Weijie Gao [Fri, 20 May 2022 03:22:49 +0000 (11:22 +0800)]
pinctrl: mtmips: add support for MediaTek MT7621 SoC

This patch adds pinctrl support for MediaTek MT7621 SoC.
The MT7621 SoC supports pinconf, but it is not the same as mt7628.

Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2 years agoreset: mtmips: add reset controller support for MediaTek MT7621 SoC
Weijie Gao [Fri, 20 May 2022 03:22:41 +0000 (11:22 +0800)]
reset: mtmips: add reset controller support for MediaTek MT7621 SoC

This patch adds reset controller bits definition header file for MediaTek
MT7621 SoC

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2 years agoclk: mtmips: add clock driver for MediaTek MT7621 SoC
Weijie Gao [Fri, 20 May 2022 03:22:36 +0000 (11:22 +0800)]
clk: mtmips: add clock driver for MediaTek MT7621 SoC

This patch adds a clock driver for MediaTek MT7621 SoC.
This driver provides clock gate control as well as getting clock frequency
for CPU/SYS/XTAL and some peripherals.

Reviewed-by: Sean Anderson <seanga2@gmail.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2 years agodoc: mediatek: add documentation for mt7621 reference boards
Weijie Gao [Fri, 20 May 2022 03:22:31 +0000 (11:22 +0800)]
doc: mediatek: add documentation for mt7621 reference boards

The MT7621 requires external binary blob being executed during u-boot's
boot-up flow. It's necessary to provide a guide here for users to correctly
build the u-boot.

Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2 years agomips: mtmips: add two reference boards for mt7621
Weijie Gao [Fri, 20 May 2022 03:22:26 +0000 (11:22 +0800)]
mips: mtmips: add two reference boards for mt7621

The mt7621_rfb board supports integrated giga PHYs plus one external
giga PHYs. It also has up to 512MiB DDR3, 16MB SPI-NOR, 3 mini PCI-e x1
slots, SDXC and USB.

The mt7621_nand_rfb board is almost the same as mt7621_rfb board, but it
uses NAND flash and SDXC is not available.

Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2 years agomips: mtmips: add support for MediaTek MT7621 SoC
Weijie Gao [Fri, 20 May 2022 03:22:21 +0000 (11:22 +0800)]
mips: mtmips: add support for MediaTek MT7621 SoC

This patch adds support for MediaTek MT7621 SoC.
All files are dedicated for u-boot.

The default build target is u-boot-mt7621.bin.

The specification of this chip:
https://www.mediatek.com/products/homenetworking/mt7621

Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2 years agomips: add support for noncached_alloc()
Weijie Gao [Fri, 20 May 2022 03:21:51 +0000 (11:21 +0800)]
mips: add support for noncached_alloc()

This patch adds support for noncached_alloc() which was only supported by
ARM platform.

Unlike the ARM platform, MMU is not used in u-boot for MIPS. Instead, KSEG
is provided to access uncached memory. So most code of this patch is copied
from cache.c of ARM platform, with only two differences:
1. MMU is untouched in noncached_set_region()
2. Address returned by noncached_alloc() is converted using KSEG1ADDR()

Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2 years agomips: add __image_copy_len for SPL linker script
Weijie Gao [Fri, 20 May 2022 03:21:45 +0000 (11:21 +0800)]
mips: add __image_copy_len for SPL linker script

This patch adds __image_copy_len needed by TPL of MT7621 SoC.
The __image_copy_len represents the binary blob size of both SPL/TPL
binaries. To achieve this, __text_start/end are added for calculation.

Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2 years agomips: add more definitions for asm/cm.h
Weijie Gao [Fri, 20 May 2022 03:21:39 +0000 (11:21 +0800)]
mips: add more definitions for asm/cm.h

This patch add more definitions needed for MT7621 initialization.
MT7621 needs to initialize GIC/CPC and other related parts.

Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2 years agomips: add asm/mipsmtregs.h for MIPS multi-threading
Weijie Gao [Fri, 20 May 2022 03:21:34 +0000 (11:21 +0800)]
mips: add asm/mipsmtregs.h for MIPS multi-threading

To be compatible with old u-boot used by lots of MT7621 devices, the u-boot
needs to boot-up MT7621's all cores, and all VPES of each core.

This patch adds asm/mipsmtregs.h from linux kernel which is need for
boot-up VPEs.

Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2 years agoMAINTAINERS: add Ilias Apalodimas to EFI PAYLOAD as co-maintainer
Heinrich Schuchardt [Tue, 12 Jul 2022 10:38:42 +0000 (12:38 +0200)]
MAINTAINERS: add Ilias Apalodimas to EFI PAYLOAD as co-maintainer

Ilias has since long been reviewing UEFI patches.
Now he has volunteered to assist me in maintaining the sub-system.

Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2 years agoefi_loader: suppress executable stack warning
Heinrich Schuchardt [Tue, 12 Jul 2022 06:11:53 +0000 (08:11 +0200)]
efi_loader: suppress executable stack warning

When linking EFI binaries the linker emits:

    ld.bfd: warning: lib/efi_loader/efi_crt0.o:
    missing .note.GNU-stack section implies executable stack

Suppress the warning.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agoefi_loader: memory leak in efi_set_bootdev()
Heinrich Schuchardt [Sun, 10 Jul 2022 13:46:57 +0000 (15:46 +0200)]
efi_loader: memory leak in efi_set_bootdev()

efi_dp_str() allocates memory which should be released after use.

Use %pD printf code. Adjust message wording.

Fixes: d837cb1e3b6b ("efi: Add debugging to efi_set_bootdev()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agoefi_loader: expose END device path node
Masahisa Kojima [Sun, 19 Jun 2022 04:55:59 +0000 (13:55 +0900)]
efi_loader: expose END device path node

This commit exposes the END device path node.

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agodoc: Add statistics page for v2022.07
Tom Rini [Tue, 12 Jul 2022 21:34:13 +0000 (17:34 -0400)]
doc: Add statistics page for v2022.07

Our statistics pages have always been generated by gitdm.  After
patching gitdm to generate an acceptable Sphinx output for tables,
include that and some other basic formatting here.

Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agodoc: environment: Expand on fdt_addr, initrd_addr and loadaddr
Tom Rini [Mon, 20 Jun 2022 14:31:28 +0000 (10:31 -0400)]
doc: environment: Expand on fdt_addr, initrd_addr and loadaddr

- Explain why fdt_addr and initrd_addr should not be set to disable
  relocation normally.
- Provide some advice on the typical loadaddr default value.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agodoc: environment: Drop u-boot_addr_r
Tom Rini [Mon, 20 Jun 2022 14:31:27 +0000 (10:31 -0400)]
doc: environment: Drop u-boot_addr_r

This variable is never set nor explained why it would be set, drop it.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2 years agodoc: Add man page for dumpimage
Sean Anderson [Sat, 25 Jun 2022 17:12:21 +0000 (13:12 -0400)]
doc: Add man page for dumpimage

This tool seems a bit underloved. Unfortunately, it seems to be missing
support for FIT images. Alas...

Add a man page documenting it. The example is taken from commit a804b5ce2d
("Add dumpimage, a tool to extract data from U-Boot images").

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agodoc: mkimage: Further document -o and -R
Sean Anderson [Sat, 25 Jun 2022 17:12:20 +0000 (13:12 -0400)]
doc: mkimage: Further document -o and -R

Despite the original description of these options, they are not always
image names, or even files. Some image types use these options to convey
configuration directly. Re-document these options as configuration options.

Additionally, add a new section documenting the format of the configuration
for each image type which uses it. In general, if configuration is used
directly (without a separate file) I have added documentation for it. If
the configuration points to a separate file, I have referenced that file's
documentation. Where there is no such documentation, I have added it.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agomkimage: Add long options
Sean Anderson [Sat, 25 Jun 2022 17:12:19 +0000 (13:12 -0400)]
mkimage: Add long options

The mkimage command has had many options added over the years.
Unfortunately, we are starting to run out of short options. Recent options
don't have any obvious relation to their meaning (e.g. -o/-g). Fortunately,
long options exist. Add long options for each current short option.

For the curious, the remaining short options are HIkLmMPQSuUwWXyYzZ.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agodoc: mkimage: Remove AUTHORS section
Sean Anderson [Sat, 25 Jun 2022 17:12:18 +0000 (13:12 -0400)]
doc: mkimage: Remove AUTHORS section

Per man-pages(7), "use of an AUTHORS section is strongly discouraged."
Remove it, and instead add some copyright notices and an SPDX. The default
license for U-Boot is GPL2, so that's what I put. The copyright dates are
based on the commit dates.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agodoc: mkimage: Add SEE ALSO section
Sean Anderson [Sat, 25 Jun 2022 17:12:17 +0000 (13:12 -0400)]
doc: mkimage: Add SEE ALSO section

This adds a SEE ALSO section to link to similar man pages, as well as to
the U-Boot documentation.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agodoc: mkimage: Add BUGS section
Sean Anderson [Sat, 25 Jun 2022 17:12:16 +0000 (13:12 -0400)]
doc: mkimage: Add BUGS section

In leiu of a non-standard HOMEPAGE section, add a BUGS section with a link
to the issue tracker.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agodoc: mkimage: Edit options for style and consistency
Sean Anderson [Sat, 25 Jun 2022 17:12:15 +0000 (13:12 -0400)]
doc: mkimage: Edit options for style and consistency

This makes a variety of changes for the options to make them
typographically consistent, clarify their meaning, and fix grammatical (or
other) errors. Many of the changes here are stylistic, though there are a
few fixes. The main changes I made across the board were:

- All options are bolded and parameters italicised
- All single quotes are properly matched (instead of using apostrophes)
- Minor background info has been added to clarify many underdocumented
  options
- Default values for options are documented

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agodoc: mkimage: Use correct capitalization for NAME
Sean Anderson [Sat, 25 Jun 2022 17:12:14 +0000 (13:12 -0400)]
doc: mkimage: Use correct capitalization for NAME

The description in NAME should not be capitalized. Fix a grammatical error
as well.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agodoc: mkimage: Rearrange/remove some options
Sean Anderson [Sat, 25 Jun 2022 17:12:13 +0000 (13:12 -0400)]
doc: mkimage: Rearrange/remove some options

This moves some options which work in any mode to the general options
section. -p is moved to after -E/-B since those options are related. This
also adds documentation for -h and -V.

The -F, -l, and -G options are documented twice. Remove the second
documentation in each case. The synopsis for -l also suggests an implied
second uimage-file-name parameter. E.g.

mkimage [-l uimage-file-name] uimage-file-name

This is misleading, so remove it. Wrap a few lines to 80 characters as
well.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agodoc: mkimage: Use subsection macro
Sean Anderson [Sat, 25 Jun 2022 17:12:12 +0000 (13:12 -0400)]
doc: mkimage: Use subsection macro

The options are divided up into several subsections. Use the appropriate
macro. While we're at it, rename the headings to better reflect the
contents of their sections.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agodoc: mkimage: Regularize option documentation
Sean Anderson [Sat, 25 Jun 2022 17:12:11 +0000 (13:12 -0400)]
doc: mkimage: Regularize option documentation

Square brackets are commonly used to denote optional parts of a command.
However, all option arguments are mandatory. Remove these brackets. This
also removes some unnecessary quotation marks, and uses hyphens to connect
words in option arguments. This is intended to just clean up the
formatting, leaving content corrections to later patches.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agodoc: mkimage: Reformat examples
Sean Anderson [Sat, 25 Jun 2022 17:12:10 +0000 (13:12 -0400)]
doc: mkimage: Reformat examples

This puts each example in a new paragraph and uses a hanging indent for
continued lines to increase clarity. We use tabs instead of .in or .RS for
the indent because it renders properly in both man and mandoc (which is
what many common HTML man pages use). The only nit is that the tab stops in
man default to something like 2", so reduce that to 1". We also escape
every "minus" as recommended by man-pages(7).

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agodoc: mkimage: Use empty request instead of blank lines
Sean Anderson [Sat, 25 Jun 2022 17:12:09 +0000 (13:12 -0400)]
doc: mkimage: Use empty request instead of blank lines

Blank lines do not have well-defined semantics in fill mode (the default).
Instead, use empty requests (.) where vertical space is necessary for
readability. There are a few places where we use a paragraph instead.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agodoc: mkimage: Use standard style for synopsis
Sean Anderson [Sat, 25 Jun 2022 17:12:08 +0000 (13:12 -0400)]
doc: mkimage: Use standard style for synopsis

The synopsis section is a bit messy. As an example, "uimage file name" is
printed in italics, bold, and roman (depending on the line). This cleans
things up and converts the synopsis section to use standard style. The
.SY/.YS macros set up appropriate formatting for command synopsis sections
(such as disabling hyphenation and setting a hanging indent). All parts of
the synopsis now use the following style:

- Bold for parts of the command which should be typed in by the user (such
  as the program name and flags)
- Italic for parts which should be replaced (such as uimage-file-name)
- Roman for parts which should not be typed at all (such as brackets)

Multi-word variables now use hyphens to connect their words instead of
spaces. This makes it clearer that all the words are part of the same
variable. Additionally, "option ..." is used to denote where other options
may be specified, as this appears to be standard style.

In addition to the above style changes, this also makes some changes to
content. The use of the term "legacy" has been removed, since this simply
refers to any non-FIT image type. Additionally, wording like "uimage file
name" has been replaced with "image-file-name" to better reflect that
images may or may not be uImages. Lastly, the "auto" value for -f is
documented in the synopsis.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agoMerge tag 'u-boot-stm32-20220712' of https://source.denx.de/u-boot/custodians/u-boot-stm
Tom Rini [Wed, 13 Jul 2022 12:09:20 +0000 (08:09 -0400)]
Merge tag 'u-boot-stm32-20220712' of https://source.denx.de/u-boot/custodians/u-boot-stm

- Alignment with Linux kernel device tree v5.19 for stm32mp15 and stm32mp13
- Add OP-TEE nodes for stm32mp13x, alligned with upstreamed OP-TEE
- Introduce of_to_plat ops in stm32_sdmmc2 driver
- Activate more features in stm32mp13 defconfig and support of STM32MP13x Rev.Y
- Drop fastboot and stm32prog trigger gpios on STM32MP15x DHCOM board

2 years agousb: hub: introduce HUB_DEBOUNCE_TIMEOUT
Patrick Delaunay [Mon, 4 Jul 2022 10:45:42 +0000 (12:45 +0200)]
usb: hub: introduce HUB_DEBOUNCE_TIMEOUT

Introduce define for connection timeout, named HUB_DEBOUNCE_TIMEOUT
as in linux kernel drivers/usb/core/hub.c

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2 years agousb: kbd: allow probing even if usbkbd not in stdin
Kory Maincent [Wed, 22 Jun 2022 08:59:31 +0000 (10:59 +0200)]
usb: kbd: allow probing even if usbkbd not in stdin

For now the driver does not probe if usbkbd was not present in stdin.
This presents two issues, we can not probe the driver before setting stdin
and we can not use this driver in other manner than stdin console.

This patch fixes this by adding an else statement. It simply probes the
driver without console management in the case "usbkbd" is not in stdin.

Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
2 years agocorstone1000: enable isp1763 usb controller and mmc
Rui Miguel Silva [Wed, 29 Jun 2022 10:06:16 +0000 (11:06 +0100)]
corstone1000: enable isp1763 usb controller and mmc

MPS3 board have a ISP1763 usb controller, enable it to be used
for mass storage access for example. Enable the usb command
also and for the FVP support for mass storage enable the mmc
command.

Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
2 years agousb: add isp1760 family driver
Rui Miguel Silva [Wed, 29 Jun 2022 10:06:15 +0000 (11:06 +0100)]
usb: add isp1760 family driver

ISP1760/61/63 are a family of usb controllers, here the main
goal is to support the ISP1763 hcd part found in the MPS3 FPGA
board form Arm. This is based on the kernel driver and ported
to u-boot.

Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
2 years agousb: common: move urb code to common
Rui Miguel Silva [Wed, 29 Jun 2022 10:06:14 +0000 (11:06 +0100)]
usb: common: move urb code to common

Move urb code from musb only use to a more common scope, so other
drivers in the future can use the handling of urb in usb.

Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
2 years agousb: dwc3: Add support to reset usb ULPI phy
T Karthik Reddy [Fri, 8 Jul 2022 09:21:59 +0000 (11:21 +0200)]
usb: dwc3: Add support to reset usb ULPI phy

When usb PHY initialization is done, the PHY need to be reset.

Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
2 years agoti: keystone: Don't select GPIO_EXTRA_HEADER
Michal Simek [Fri, 8 Jul 2022 09:14:52 +0000 (11:14 +0200)]
ti: keystone: Don't select GPIO_EXTRA_HEADER

keystone doesn't have custom gpio.h that's why don't select
GPIO_EXTRA_HEADER which points to it.

Logic in arch/arm/include/asm/gpio.h is very clear

 #ifdef CONFIG_GPIO_EXTRA_HEADER
 #include <asm/arch/gpio.h>
 #endif
 #include <asm-generic/gpio.h>

Where it is visible that there is no gpio.h in platform headers:
$ ls arch/arm/mach-keystone/include/mach/
clock_defs.h  clock-k2e.h  clock-k2hk.h  ddr3.h      hardware-k2e.h
hardware-k2hk.h  i2c_defs.h      mon.h   mux-k2g.h   xhci-keystone.h
clock.h       clock-k2g.h  clock-k2l.h   hardware.h  hardware-k2g.h
hardware-k2l.h   mmc_host_def.h  msmc.h  psc_defs.h

Signed-off-by: Michal Simek <michal.simek@amd.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2 years agoarm: dts: stm32mp1: Drop fastboot and stm32prog trigger gpios on DHCOM
Johann Neuhauser [Thu, 30 Jun 2022 14:19:48 +0000 (16:19 +0200)]
arm: dts: stm32mp1: Drop fastboot and stm32prog trigger gpios on DHCOM

PA13 and PA14 are used for USB power control and can't be used
to enforce fastboot or stm32prog mode by pressing a button.

Defining CONFIG_FASTBOOT/CONFIG_CMD_STM32PROG without this patch applied
results in fastboot/stm32prog always starting, because PA13/PA14 are always
low during boot. So drop the wrong trigger gpios definitions.

Signed-off-by: Johann Neuhauser <jneuhauser@dh-electronics.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2 years agoconfigs: stm32mp13: activate some command
Patrick Delaunay [Thu, 30 Jun 2022 08:20:23 +0000 (10:20 +0200)]
configs: stm32mp13: activate some command

Activate useful commands in STM32MP13x config, already activated in
stm32mp15_defconfig.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2 years agoconfigs: stm32mp13: activate I2C support
Patrick Delaunay [Thu, 30 Jun 2022 08:20:22 +0000 (10:20 +0200)]
configs: stm32mp13: activate I2C support

Activate the I2C driver in STM32MP13x config.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2 years agoconfigs: stm32mp13: activate RTC support
Patrick Delaunay [Thu, 30 Jun 2022 08:20:21 +0000 (10:20 +0200)]
configs: stm32mp13: activate RTC support

Activate the RTC driver in STM32MP13x config.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2 years agoconfigs: stm32mp13: activate RNG support
Patrick Delaunay [Thu, 30 Jun 2022 08:20:20 +0000 (10:20 +0200)]
configs: stm32mp13: activate RNG support

Activate the RNG driver provided by OP-TEE.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2 years agoconfigs: stm32mp13: Add support for baudrates higher than 115200
Patrick Delaunay [Thu, 30 Jun 2022 08:20:19 +0000 (10:20 +0200)]
configs: stm32mp13: Add support for baudrates higher than 115200

On STM32MP13x STMicroelectronics boards, the UART can reliably go up to
4000000 bauds when connected to the external ST-LINKV3.

This patch adds the support of higher baudrates on STMicroelectronics
STM32MP13x boards with ST-LINKV3.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2 years agoARM: dts: stm32mp13: activate led on STM32MP13F-DK
Patrick Delaunay [Thu, 30 Jun 2022 08:20:18 +0000 (10:20 +0200)]
ARM: dts: stm32mp13: activate led on STM32MP13F-DK

Activate the led managed in stm32mp1 board for U-Boot indication
in STM32MP13F-DK device tree.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2 years agoARM: dts: stm32mp13: alignment with v5.19
Patrick Delaunay [Thu, 30 Jun 2022 08:20:17 +0000 (10:20 +0200)]
ARM: dts: stm32mp13: alignment with v5.19

Device tree alignment with Linux kernel v5.19-rc1 with:
- ARM: dts: stm32: add UserPA13 button on stm32mp135f-dk
- ARM: dts: stm32: add blue led (Linux heartbeat) on stm32mp135f-dk
- ARM: dts: stm32: add EXTI interrupt-parent to pinctrl node on stm32mp131
- ARM: dts: stm32: enable RTC support on stm32mp135f-dk
- ARM: dts: stm32: add RTC node on stm32mp131
- ARM: dts: stm32: fix pinctrl node name warnings (MPU soc)

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2 years agostm32mp: add support of STM32MP13x Rev.Y
Patrick Delaunay [Thu, 30 Jun 2022 08:20:16 +0000 (10:20 +0200)]
stm32mp: add support of STM32MP13x Rev.Y

Add support of STM32MP13x Rev.Y for the Silicon revision REV_ID = 0x1003.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2 years agorng: stm32mp1_rng: add conditional reset feature for STM32MP13x
Lionel Debieve [Thu, 30 Jun 2022 08:20:15 +0000 (10:20 +0200)]
rng: stm32mp1_rng: add conditional reset feature for STM32MP13x

New IP adds a conditional reset that impact the clock
error management. It is now linked to a new compatible.

Signed-off-by: Lionel Debieve <lionel.debieve@foss.st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2 years agoi2c: stm32: add support for the st,stm32mp13 SOC
Patrick Delaunay [Thu, 30 Jun 2022 08:20:14 +0000 (10:20 +0200)]
i2c: stm32: add support for the st,stm32mp13 SOC

The stm32mp13 soc differs from the stm32mp15 in terms of
clear register offset for controlling the FMP (Fast Mode Plus).

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2 years agoARM: dts: stm32: add SCMI version of STM32 boards (DK1/DK2/ED1/EV1)
Patrick Delaunay [Tue, 5 Jul 2022 14:55:57 +0000 (16:55 +0200)]
ARM: dts: stm32: add SCMI version of STM32 boards (DK1/DK2/ED1/EV1)

Add a "secure" version of STM32 boards based on SCMI when RCC_TZCR.TZEN=1.

Only boards provided by STMicroelectronics are concerned:
-STM32MP157A-DK1
-STM32MP157C-DK2
-STM32MP157C-ED1
-STM32MP157C-EV1

The resources secured by RCC_TZCR.TZEN=1 are managed by OP-TEE
and the associated SCMI services, reset and clock.

These device trees are only supported with stm32mp15_defconfig,
with OP-TEE, SCMI and without SPL support.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2 years agoconfigs: stm32mp15: increase malloc size for pre-reloc
Patrick Delaunay [Tue, 5 Jul 2022 14:55:56 +0000 (16:55 +0200)]
configs: stm32mp15: increase malloc size for pre-reloc

With support of SCMI in OP-TEE, the early malloc usage
increase, the associated defined CONFIG_SYS_MALLOC_F_LEN
need to be increased.

For example, for stm32mp15_defconfig and
stm32mp157c-dk2-scmi.dtsi, we have:

Early malloc usage: 14098 / 80000

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2 years agoclk: stm32: add support compatible st, stm32mp1-rcc-secure
Patrick Delaunay [Tue, 5 Jul 2022 14:55:55 +0000 (16:55 +0200)]
clk: stm32: add support compatible st, stm32mp1-rcc-secure

Add support for new compatible st,stm32mp1-rcc-secure used when the
RCC resource is managed by secured world (RCC_TZCR.TZEN=1)
iand when SCMI is used.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2 years agoARM: dts: stm32mp15: alignment with v5.19
Patrick Delaunay [Tue, 5 Jul 2022 14:55:54 +0000 (16:55 +0200)]
ARM: dts: stm32mp15: alignment with v5.19

Device tree alignment with Linux kernel v5.19-rc1

- ARM: dts: stm32: Add alternate pinmux for ethernet0 pins
- ARM: dts: stm32: Add alternate pinmux for mco2 pins
- ARM: dts: stm32: fix pinctrl node name warnings (MPU soc)
- ARM: dts: stm32: stm32mp15-pinctrl: add spi1-1 pinmux group
- dt-bindings: clock: add IDs for SCMI clocks on stm32mp15
- dt-bindings: reset: add IDs for SCMI reset domains on stm32mp15
- dt-bindings: clock: stm32mp15: rename CK_SCMI define
- dt-bindings: reset: stm32mp15: rename RST_SCMI define
- dt-bindings: reset: add MCU HOLD BOOT ID for SCMI reset domains
  on stm32mp15
- dt-bindings: clk: cleanup comments
- ARM: dts: align SPI NOR node name with dtschema
- ARM: dts: stm32: enable optee firmware and SCMI support on STM32MP15
- ARM: dts: stm32: Add SCMI version of STM32 boards (DK1/DK2/ED1/EV1)
- ARM: dts: stm32: move SCMI related nodes in a dedicated file for
  stm32mp15

+ patch from stm32-dt-for-v5.19-fixes-2

- ARM: dts: stm32: move SCMI related nodes in a dedicated file for
  stm32mp15
- ARM: dts: stm32: fix pwr regulators references to use scmi
- ARM: dts: stm32: use the correct clock source for CEC on stm32mp151
- ARM: dts: stm32: DSI should use LSE SCMI clock on DK1/ED1 STM32 board
- ARM: dts: stm32: delete fixed clock node on STM32MP15-SCMI
- ARM: dts: stm32: add missing usbh clock and fix clk order on stm32mp15

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2 years agommc: stm32_sdmmc2: introduce of_to_plat ops
Patrick Delaunay [Thu, 30 Jun 2022 08:01:47 +0000 (10:01 +0200)]
mmc: stm32_sdmmc2: introduce of_to_plat ops

Add the uclass ops of_to_plat to parse the device tree properties
to respect the expected sequence by the driver model.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2 years agommc: stm32_sdmmc2: remove privdata
Patrick Delaunay [Thu, 30 Jun 2022 08:01:46 +0000 (10:01 +0200)]
mmc: stm32_sdmmc2: remove privdata

All the elements of privdata are static and build from device tree,
they are moved in platdata to prepare the support of ops
of_to_plat.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2 years agommc: stm32_sdmmc2: cosmetic: rename stm32_sdmmc_bind
Patrick Delaunay [Thu, 30 Jun 2022 08:01:45 +0000 (10:01 +0200)]
mmc: stm32_sdmmc2: cosmetic: rename stm32_sdmmc_bind

Rename stm32_sdmmc_bind to stm32_sdmmc2_bind as all other functions
in SDMMCv2 driver

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Change-Id: Ic51acdfbbba6e971809c1029dd2227038bfe879d

2 years agoARM: dts: stm32mp13: add SCMI nodes
Patrick Delaunay [Wed, 6 Jul 2022 16:20:25 +0000 (18:20 +0200)]
ARM: dts: stm32mp13: add SCMI nodes

Add the node for SCMI firmware with the associated reserved memory nodes

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2 years agoARM: dts: stm32mp13: add OP-TEE nodes
Patrick Delaunay [Wed, 6 Jul 2022 16:20:24 +0000 (18:20 +0200)]
ARM: dts: stm32mp13: add OP-TEE nodes

Add the node for OP-TEE firmware with the associated reserved memory nodes

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2 years agoconfigs: stm32m15: support STM32MP_BOARD_EXTRA_ENV for st boards
Patrick Delaunay [Mon, 11 Jul 2022 17:45:50 +0000 (19:45 +0200)]
configs: stm32m15: support STM32MP_BOARD_EXTRA_ENV for st boards

Correctly handle STM32MP_BOARD_EXTRA_ENV define in stm32mp15_st_common.h;
the STM32MP_BOARD_EXTRA_ENV is added in CONFIG_EXTRA_ENV_SETTINGS
definition, as it is done "stm32mp15_st_common.h"

Without this patch, the content of STM32MP_BOARD_EXTRA_ENV is not used in
the default environment for STMicroelectronics boards.

Fixes: 806c4dd31532 ("configs: stm32mp1: set the console variable for extlinux.conf")
Reported-by: Gatien CHEVALLIER <gatien.chevallier@foss.st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2 years agoMerge branch 'next'
Tom Rini [Mon, 11 Jul 2022 14:18:13 +0000 (10:18 -0400)]
Merge branch 'next'