platform/kernel/u-boot.git
17 months agomtd: rawnand: omap_gpmc: Reduce .bss usage
Roger Quadros [Tue, 11 Oct 2022 11:50:06 +0000 (14:50 +0300)]
mtd: rawnand: omap_gpmc: Reduce .bss usage

Allocate omap_ecclayout on the heap as we have
limited .bss space on AM64 R5 SPL configuration.

Reduces .bss usage by 2984 bytes.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
Reviewed-By: Michael Trimarchi <michael@amarulasolutions.com>
Link: https://lore.kernel.org/all/20221011115012.6181-9-rogerq@kernel.org
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
17 months agomtd: rawnand: nand_spl_loaders: Fix cast type build warning
Roger Quadros [Tue, 11 Oct 2022 11:50:05 +0000 (14:50 +0300)]
mtd: rawnand: nand_spl_loaders: Fix cast type build warning

Fixes the below build warning on 64-bit platforms.

drivers/mtd/nand/raw/nand_spl_loaders.c:26:21: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      dst = (void *)((int)dst - page_offset);

Signed-off-by: Roger Quadros <rogerq@kernel.org>
Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com>
Link: https://lore.kernel.org/all/20221011115012.6181-8-rogerq@kernel.org
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
17 months agomtd: rawnand: omap_gpmc: Optimize NAND reads
Roger Quadros [Tue, 11 Oct 2022 11:50:02 +0000 (14:50 +0300)]
mtd: rawnand: omap_gpmc: Optimize NAND reads

Rename omap_nand_read() to omap_nand_read_buf() to reflect
actual behaviour.

Use FIFO read address instead of raw read address for reads.

The GPMC automatically converts 32-bit/16-bit reads to NAND
device specific reads (8/16 bit). Use the largest possible
read granularity size for more efficient reads.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com>
Link: https://lore.kernel.org/all/20221011115012.6181-5-rogerq@kernel.org
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
17 months agomtd: rawnand: omap_gpmc: Fix build warning on 64-bit platforms
Roger Quadros [Tue, 11 Oct 2022 11:50:01 +0000 (14:50 +0300)]
mtd: rawnand: omap_gpmc: Fix build warning on 64-bit platforms

Pointer size cannot be assumed to be 32-bit, so use
use uintptr_t instead of uint32_t.

Fixes the below build warning on 64-bit builds.

drivers/mtd/nand/raw/omap_gpmc.c:439:10: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  head = ((uint32_t) buf) % 4;

Signed-off-by: Roger Quadros <rogerq@kernel.org>
Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com>
Link: https://lore.kernel.org/all/20221011115012.6181-4-rogerq@kernel.org
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
17 months agomtd: rawnand: omap_gpmc: Enable build for K2/K3 platforms
Roger Quadros [Tue, 11 Oct 2022 11:50:00 +0000 (14:50 +0300)]
mtd: rawnand: omap_gpmc: Enable build for K2/K3 platforms

The GPMC module is present on some K2 and K3 SoCs.
Enable building GPMC NAND driver for K2/K3 platforms.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
Reviewed-By: Michael Trimarchi <michael@amarulasolutions.com>
Link: https://lore.kernel.org/all/20221011115012.6181-3-rogerq@kernel.org
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
17 months agomtd: rawnand: omap_gpmc: Deprecate asm/arch/mem.h
Roger Quadros [Tue, 11 Oct 2022 11:49:59 +0000 (14:49 +0300)]
mtd: rawnand: omap_gpmc: Deprecate asm/arch/mem.h

We want to get rid of <asm/arch/mem.h> so don't
enforce it for new platforms.

This also means GPMC_MAX CS doesn't have to be defined
by platform code.

Define it locally here for now.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com>
Link: https://lore.kernel.org/all/20221011115012.6181-2-rogerq@kernel.org
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
17 months agocmd: nand: Extend nand info to print ecc information
Michael Trimarchi [Thu, 22 Sep 2022 13:39:37 +0000 (15:39 +0200)]
cmd: nand: Extend nand info to print ecc information

Extract the information about ecc strength and ecc step size
from mtd controller. This information is usefull to check if
what we think as ecc is what we really configured.

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Reviewed-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Link: https://lore.kernel.org/all/20220922133937.277463-1-michael@amarulasolutions.com
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
17 months agoMerge branch '2022-12-09-platform-updates' into next
Tom Rini [Fri, 9 Dec 2022 22:50:51 +0000 (17:50 -0500)]
Merge branch '2022-12-09-platform-updates' into next

- Assorted TI platform updates
- Add DM_RTC callback functions, and a related x86 clean-up.

17 months agoconfigs: enable OSPI related configs in AM62x
Dhruva Gole [Thu, 27 Oct 2022 14:53:11 +0000 (20:23 +0530)]
configs: enable OSPI related configs in AM62x

Add am62x_evm_r5_defconfig for OSPI Flash support in R5 SPL
and am62x_evm_a53_defconfig for A53 SPL and U-Boot
support.
These configs enable OSPI Flash boot functionality in the board as well
as the usage of OSPI Flash from U-Boot.

Signed-off-by: Dhruva Gole <d-gole@ti.com>
17 months agoarm: dts: Add OSPI support for AM62-SK
Dhruva Gole [Thu, 27 Oct 2022 14:53:10 +0000 (20:23 +0530)]
arm: dts: Add OSPI support for AM62-SK

Add OSPI Support such that this device can boot up using OSPI Flash.
Also can use the flash for other purposes if required from uboot.

Signed-off-by: Dhruva Gole <d-gole@ti.com>
17 months agoarm: dts: k3-am62x: sync dt with linux kernel
Dhruva Gole [Thu, 27 Oct 2022 14:53:09 +0000 (20:23 +0530)]
arm: dts: k3-am62x: sync dt with linux kernel

Sync the DT Files with linux kernel (tag v6.0.3)

Signed-off-by: Dhruva Gole <d-gole@ti.com>
17 months agoconfigs: introduce configs for the am62a
Bryan Brattlof [Fri, 4 Nov 2022 00:13:58 +0000 (19:13 -0500)]
configs: introduce configs for the am62a

Introduce the minimum configs, only SD-MMC and UART boot related
settings, to serve as a good starting point for the am62a as we add more
functionality.

Signed-off-by: Bryan Brattlof <bb@ti.com>
[trini: Disable CONFIG_NET as it's not used, in both platforms]
Signed-off-by: Tom Rini <trini@konsulko.com>
17 months agoboard: ti: introduce the basic files needed to support the am62a
Bryan Brattlof [Fri, 4 Nov 2022 00:13:57 +0000 (19:13 -0500)]
board: ti: introduce the basic files needed to support the am62a

Introduce the bare minimum SD and UART support for the am62a sk.

Signed-off-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
17 months agoarm: mach-k3: am62a: introduce auto-generated SoC data
Bryan Brattlof [Fri, 4 Nov 2022 00:13:56 +0000 (19:13 -0500)]
arm: mach-k3: am62a: introduce auto-generated SoC data

Introduce the auto-generated clock tree and power domain data needed to
attach the am62a into the power-domain and clock frameworks of uboot

Signed-off-by: Bryan Brattlof <bb@ti.com>
17 months agoarm: mach-k3: introduce basic files to support the am62a
Bryan Brattlof [Fri, 4 Nov 2022 00:13:55 +0000 (19:13 -0500)]
arm: mach-k3: introduce basic files to support the am62a

Introduce the mach-k3 files needed to properly boot TI's am62a SoC
family of devices

Signed-off-by: Bryan Brattlof <bb@ti.com>
17 months agosoc: ti: k3-socinfo: add am62a SoC entry
Bryan Brattlof [Fri, 4 Nov 2022 00:13:54 +0000 (19:13 -0500)]
soc: ti: k3-socinfo: add am62a SoC entry

Add identification support for TI's am62ax family of SoCs

Signed-off-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
17 months agoram: k3-ddrss: add am62a controller support
Bryan Brattlof [Fri, 4 Nov 2022 00:13:53 +0000 (19:13 -0500)]
ram: k3-ddrss: add am62a controller support

TI's am62a family of SoCs uses a new 32bit DDR controller that shares
much of the same functionality with the existing am64 and j721e
controllers.

Select this controller by default when u-boot is build for the am62a

Signed-off-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
17 months agoarm: dts: introduce am62a7 u-boot dtbs
Bryan Brattlof [Fri, 4 Nov 2022 00:13:52 +0000 (19:13 -0500)]
arm: dts: introduce am62a7 u-boot dtbs

Introduce the base dts files needed for u-boot or to augment the
linux dtbs for use in the u-boot-spl and u-boot binaries

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Bryan Brattlof <bb@ti.com>
17 months agoarm: dts: introduce am62a7 dtbs from linux kernel
Bryan Brattlof [Fri, 4 Nov 2022 00:13:51 +0000 (19:13 -0500)]
arm: dts: introduce am62a7 dtbs from linux kernel

Introduce the basic am62a7 SoC dtbs from the v6.1-rc3 tag of the linux
kernel along with the new am62a specific pinmux definition that we will
use to generate the dtbs for the u-boot-spl and u-boot binaries

Co-developed-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Bryan Brattlof <bb@ti.com>
17 months agoram: k3-ddrss: add auto-generated macros for am62a support
Bryan Brattlof [Mon, 24 Oct 2022 21:53:28 +0000 (16:53 -0500)]
ram: k3-ddrss: add auto-generated macros for am62a support

The new 32bit DDR controller for TI's am62a family of SoCs shares much
of the same functionality with the existing 16bit (am64) and 32bit
(j721e) controllers, so this patch reorganizes the existing
auto-generated macros for the 16bit and 32bit controllers to make room
for the macros for the am62a's controller

This patch consists mostly of header/macro renames and additions with a
new Kconfig option (K3_AM62A_DDRSS) allowing us to select these new
macros during compilation.

Signed-off-by: Bryan Brattlof <bb@ti.com>
17 months agortc: Add fallbacks for dm functions
Sean Anderson [Tue, 22 Nov 2022 17:54:52 +0000 (12:54 -0500)]
rtc: Add fallbacks for dm functions

This adds fallbacks for the various dm_rtc_* functions. This allows
common code to use these functions without ifdefs.

Fixes: c8ce7ba87d1 ("misc: Add support for nvmem cells")
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Sean Anderson <sean.anderson@seco.com>
17 months agox86: fsp: Only compile fsp_save_s3_stack if (SPL_)DM_RTC is enabled
Sean Anderson [Tue, 22 Nov 2022 17:54:51 +0000 (12:54 -0500)]
x86: fsp: Only compile fsp_save_s3_stack if (SPL_)DM_RTC is enabled

This function calls rtc_write32, which has a different signature
depending on if (SPL_)DM_RTC is enabled or not. This could result in a
mismatch in SPL if DM_RTC was enabled but SPL_DM_RTC, as the non-DM
declaration would still be used in SPL even though the implementation
would be for non-DM_RTC. We are switching to the correct definitions in
the next commit, so this will become a compilation error. Since
fsp_save_s3_stack is not called from SPL, avoid compiling it if
(SPL_)DM_RTC is disabled.

Signed-off-by: Sean Anderson <sean.anderson@seco.com>
17 months agoNokia RX-51: Use ENTRY/ENDPROC for save_boot_params
Pali Rohár [Wed, 23 Nov 2022 23:45:00 +0000 (00:45 +0100)]
Nokia RX-51: Use ENTRY/ENDPROC for save_boot_params

ENTRY/ENDPROC macros from linux/linkage.h will make code more readable and
also will properly mark assembly symbol in ELF binary as function symbol.

Signed-off-by: Pali Rohár <pali@kernel.org>
17 months agoMerge branch '2022-12-08-assorted-tooling-and-fs-fixes' into next
Tom Rini [Thu, 8 Dec 2022 20:12:14 +0000 (15:12 -0500)]
Merge branch '2022-12-08-assorted-tooling-and-fs-fixes' into next

- Assorted fixes for squashfs, ext4, a number of host tools (including
  reworking u-boot-initial-env) and then a few unrelated code cleanups /
  fixes.

17 months agoMerge tag 'u-boot-stm32-20221207' of https://source.denx.de/u-boot/custodians/u-boot-stm
Tom Rini [Thu, 8 Dec 2022 16:25:08 +0000 (11:25 -0500)]
Merge tag 'u-boot-stm32-20221207' of https://source.denx.de/u-boot/custodians/u-boot-stm

- Drop MMCI interrupt-names in STM32H743, STM32MP15 and STM322MP13 DT

DHSOM:
  - Enable assorted ST specific commands
  - Add version variable
  - Add boot counter
STM32MP13:
  - Add sdmmc cd-gpios for STM32MP135F-DK
  - Add clock & reset support
STM32 ADC:
  - Split channel init into several routines
  - Add support of generic channels binding

17 months agoMerge https://source.denx.de/u-boot/custodians/u-boot-usb
Tom Rini [Thu, 8 Dec 2022 16:24:50 +0000 (11:24 -0500)]
Merge https://source.denx.de/u-boot/custodians/u-boot-usb

- DFU and RNDIS fixes

17 months agoata: ahci-pci: Replace magic constant by macro
Pali Rohár [Sun, 4 Dec 2022 12:31:08 +0000 (13:31 +0100)]
ata: ahci-pci: Replace magic constant by macro

Replace 0x1b21 by macro PCI_VENDOR_ID_ASMEDIA with the same value.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
17 months agofs/squashfs: use lldiv function for math
Kasper Revsbech [Thu, 1 Dec 2022 15:30:32 +0000 (16:30 +0100)]
fs/squashfs: use lldiv function for math

When compling for x86:
u-boot/fs/squashfs/sqfs.c:90: undefined reference to `__udivmoddi4'

Signed-off-by: Kasper Revsbech <kasper.revsbech.ext@siemensgamesa.com>
Tested-by: Sean Nyekjaer <sean@geanix.com>
17 months agou-boot-initial-env: rework make target
Max Krummenacher [Mon, 28 Nov 2022 08:41:22 +0000 (09:41 +0100)]
u-boot-initial-env: rework make target

With LTO enabled the U-Boot initial environment is no longer stored
in an easy accessible section in env/common.o. I.e. the section name
changes from build to build, its content maybe compressed and it is
annotated with additional data.

Drop trying to read the initial env with elf tools from the compiler
specific object file in favour of adding and using a host tool with
the only functionality of printing the initial env to stdout.

See also:
https://lore.kernel.org/all/927b122e-1f62-e790-f5ca-30bae4332c77@foss.st.com/

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Acked-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
17 months agofirmware: scmi: use protocol node name to bind the scmi regulator driver
Patrick Delaunay [Fri, 25 Nov 2022 11:56:29 +0000 (12:56 +0100)]
firmware: scmi: use protocol node name to bind the scmi regulator driver

In scmi firmware driver, it is better to bind the scmi protocol driver
"scmi_voltage_domain" with the node name of the protocol 17 and not
the sub-node named "regulator", because is a fixed string which doesn't
provide information and because it is not aligned with the other scmi
protocol nodes.

For example on stm32mp135f-dk board with device tree in stm32mp131.dtsi

scmi: scmi {
compatible = "linaro,scmi-optee";
#address-cells = <1>;
#size-cells = <0>;
linaro,optee-channel-id = <0>;
shmem = <&scmi_shm>;
scmi_clk: protocol@14 {
reg = <0x14>;
#clock-cells = <1>;
};
scmi_reset: protocol@16 {
reg = <0x16>;
#reset-cells = <1>;
};
scmi_voltd: protocol@17 {
reg = <0x17>;
scmi_regu: regulators {
#address-cells = <1>;
#size-cells = <0>;
scmi_reg11: voltd-reg11 {
reg = <VOLTD_SCMI_REG11>;
regulator-name = "reg11";
};
scmi_reg18: voltd-reg18 {
reg = <VOLTD_SCMI_REG18>;
regulator-name = "reg18";
};
scmi_usb33: voltd-usb33 {
reg = <VOLTD_SCMI_USB33>;
regulator-name = "usb33";
};
};
};
};

Before the patch:

> dm tree

 scmi_agent    0  [ + ]   scmi-over-optee       |-- scmi
 clk           1  [ + ]   scmi_clk              |   |-- protocol@14
 ...
 reset         1  [   ]   scmi_reset_domain     |   |-- protocol@16
 nop           2  [ + ]   scmi_voltage_domain   |   `-- regulators
 regulator     0  [ + ]   scmi_regulator        |       |-- voltd-reg11
 regulator     1  [ + ]   scmi_regulator        |       |-- voltd-reg18
 regulator     2  [ + ]   scmi_regulator        |       |-- voltd-usb33
 ...

after the patch:

> dm tree

 scmi_agent    0  [ + ]   scmi-over-optee       |-- scmi
 clk           1  [ + ]   scmi_clk              |   |-- protocol@14
 ...
 reset         1  [   ]   scmi_reset_domain     |   |-- protocol@16
 nop           2  [ + ]   scmi_voltage_domain   |   `-- protocol@17
 regulator     0  [ + ]   scmi_regulator        |       |-- voltd-reg11
 regulator     1  [ + ]   scmi_regulator        |       |-- voltd-reg18
 regulator     2  [ + ]   scmi_regulator        |       |-- voltd-usb33
 ...

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
17 months agotools: mkimage: add new image type "fdt_legacy"
Marc Kleine-Budde [Wed, 23 Nov 2022 11:55:33 +0000 (12:55 +0100)]
tools: mkimage: add new image type "fdt_legacy"

If the user select the image type "flat_dt" a FIT image will be build.
This breaks the legacy use case of putting a Flat Device Tree into a
legacy u-boot image.

Add a new image type "fdt_legacy" to build a legacy u-boot image
with a "flat_dt" type.

Link: https://lore.kernel.org/all/20221028155205.ojw6tcso2fofgnhm@pengutronix.de
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Reviewed-by: Sean Anderson <seanga2@gmail.com>
17 months agotools: mkimage: don't print error message "Success" in case of failure
Marc Kleine-Budde [Wed, 23 Nov 2022 11:55:32 +0000 (12:55 +0100)]
tools: mkimage: don't print error message "Success" in case of failure

In case there's no struct image_type_params::set_header callback, no
"errno" will be set. Don't fail with an error message, followed by
"Success". Remove the printing of the human readable "errno" value.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
17 months agotools: fdtgrep: Fix handle leak
Mikhail Ilin [Wed, 23 Nov 2022 11:31:03 +0000 (14:31 +0300)]
tools: fdtgrep: Fix handle leak

The handle "fd" was created in fdtgrep.c:708 by calling the
 "open" function and is lost in fdtgrep.c:716 and fdtgrep.c:723.
 Close file descriptor 'fd' before exiting with an error from function
 utilfdt_read_err_len(const char *filename, char **buffp, off_t *len).

Fixes: 1043d0a0296a ("fdt: Add fdtgrep tool")
Signed-off-by: Mikhail Ilin <ilin.mikhail.ol@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
17 months agotools: mkimage: Fix nullptr at strchr()
Mikhail Ilin [Wed, 23 Nov 2022 09:39:36 +0000 (12:39 +0300)]
tools: mkimage: Fix nullptr at strchr()

The copy_datafile(ifd, params.datafile) function has been
 implemented to copy data by reducing the number of lines in the main
 function.

Signed-off-by: Mikhail Ilin <ilin.mikhail.ol@gmail.com>
17 months agofs: ext4: Fix free(NULL)
Mikhail Ilin [Tue, 22 Nov 2022 08:00:55 +0000 (11:00 +0300)]
fs: ext4: Fix free(NULL)

The 'depth_dirname', 'ptr', 'parent_inode' and 'first_inode' pointers
may be null. Thus, it is necessary to check them before using free() to
avoid free(NULL) cases.

Fixes: 934b14f2bb30 ("ext4: free allocations by parse_path()")
Signed-off-by: Mikhail Ilin <ilin.mikhail.ol@gmail.com>
17 months agotool: ifwitool: Fix buffer overflow
Mikhail Ilin [Fri, 18 Nov 2022 11:50:24 +0000 (14:50 +0300)]
tool: ifwitool: Fix buffer overflow

An incorrect 1st parameter is passed to the fix_member()
 function. Should use a pointer to the beginning of the parent structure
 (bpdt or subpart_dir, because are boxed), not to their fields. Otherwise,
 this leads to an overrun of the structure boundary, since in the
 fix_member() function, an 'offset' is made, relative to the 1st argument,
 which itself is an 'offset' from the beginning of the structure.

Signed-off-by: Mikhail Ilin <ilin.mikhail.ol@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
17 months agotool: ifwitool: The function localtime() can return NULL.
Mikhail Ilin [Fri, 18 Nov 2022 08:50:02 +0000 (11:50 +0300)]
tool: ifwitool: The function localtime() can return NULL.

This will cause the local_time pointer is passed as the 4th argument
 to function strftime() to also point to NULL. This result in a
 segmentation fault. Thus, it's necessary to add a check of the local_time
 pointer to NULL.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Signed-off-by: Mikhail Ilin <ilin.mikhail.ol@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
17 months agotools: env: fw_env: Fix unused-result warning
Jaehoon Chung [Thu, 13 Oct 2022 08:41:21 +0000 (17:41 +0900)]
tools: env: fw_env: Fix unused-result warning

Fix unused-result warning about fread.

tools/env/fw_env.c: In function ‘find_nvmem_device’:
tools/env/fw_env.c:1751:3: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
 1751 |   fread(buf, sizeof(buf), 1, fp);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
17 months agousb: gadget: rndis: Prevent InformationBufferOffset manipulation
Szymon Heidrich [Mon, 5 Dec 2022 09:28:23 +0000 (10:28 +0100)]
usb: gadget: rndis: Prevent InformationBufferOffset manipulation

Prevent access to arbitrary memory locations in gen_ndis_set_resp
via manipulation of buf->InformationBufferOffset. Original
implementation permits manipulation of InformationBufferOffset to
exploit OID_GEN_CURRENT_PACKET_FILTER to set arbitrary memory contents
within a 32byte offset as the devices packet filter. The packet filter
value may be next retrieved using gen_ndis_query_resp so it is possible
to extract specific memory regions two bytes a time.

The rndis_query_response was not modified as neither the buffer offset
nor length passed to gen_ndis_query_resp is used.

Signed-off-by: Szymon Heidrich <szymon.heidrich@gmail.com>
17 months agodfu: Make DFU virtual backend SPL friendly
Patrick Delaunay [Wed, 30 Nov 2022 10:42:02 +0000 (11:42 +0100)]
dfu: Make DFU virtual backend SPL friendly

Define stub for dfu_*_virt function in SPL, because
CONFIG_SPL_DFU_VIRT is not defined.

This patch avoids compilation issue in dfu_fill_entity() when
CONFIG_SPL_DFU is activated because the dfu_fill_entity_virt()
function is not available.

Fixes: ec44cace4b8d2 ("dfu: add DFU virtual backend")
Reported-by: Marek Vasut <marex@denx.de>
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Tested-by: Marek Vasut <marex@denx.de>
17 months agousb: gadget: dfu: Fix check of transfer direction
Hugo SIMELIERE [Wed, 30 Nov 2022 08:29:16 +0000 (09:29 +0100)]
usb: gadget: dfu: Fix check of transfer direction

Commit fbce985e28eaca3af82afecc11961aadaf971a7e to fix CVE-2022-2347
blocks DFU usb requests.
The verification of the transfer direction was done by an equality
but it is a bit mask.

Signed-off-by: Hugo SIMELIERE <hsimeliere.opensource@witekio.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Sultan Qasim Khan <sultan.qasimkhan@nccgroup.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Tested-by: Marek Vasut <marex@denx.de>
17 months agoMerge https://source.denx.de/u-boot/custodians/u-boot-riscv
Tom Rini [Thu, 8 Dec 2022 13:28:14 +0000 (08:28 -0500)]
Merge https://source.denx.de/u-boot/custodians/u-boot-riscv

- Kautuk's semihosting patch:
  move semihosting library from arm directory to common place and add
  RISC-V support
- Zong's Kconfig patch:
  use "imply" instead of "select" to allow user to decide if
  SPL_SEPARATE_BSS should be selected

17 months agoMerge tag 'u-boot-at91-fixes-2023.01-b' of https://source.denx.de/u-boot/custodians...
Tom Rini [Thu, 8 Dec 2022 13:27:50 +0000 (08:27 -0500)]
Merge tag 'u-boot-at91-fixes-2023.01-b' of https://source.denx.de/u-boot/custodians/u-boot-at91

Second set of u-boot-at91 fixes for the 2023.01 cycle:

This is a single tiny fix that allows the correct name for one pin on
sama7g5 device. People with DT coming from Linux will have build errors
without this if they add NAND device.

17 months agoriscv: use imply instead of select for SPL_SEPARATE_BSS
Zong Li [Wed, 16 Nov 2022 07:08:39 +0000 (07:08 +0000)]
riscv: use imply instead of select for SPL_SEPARATE_BSS

Use imply instead of select, then it can still be disabled by
board-specific defconfig, or be set to n manually.

Signed-off-by: Zong Li <zong.li@sifive.com>
Reviewed-by: Rick Chen <rick@andestech.com>
Reviewed-by: Bin Meng <bmeng@tinylab.org>
17 months agocommon/spl/Kconfig: add dependency on SPL_SEMIHOSTING for SPL payload
Kautuk Consul [Wed, 7 Dec 2022 11:42:36 +0000 (17:12 +0530)]
common/spl/Kconfig: add dependency on SPL_SEMIHOSTING for SPL payload

When we enable CONFIG_SPL and CONFIG_SPL_SEMIHOSTING then the code
in common/spl/spl_semihosting.c tries to use the
CONFIG_SPL_FS_LOAD_PAYLOAD_NAME string which remains undeclared
unless SPL_FS_EXT4 || SPL_FS_FAT || SPL_FS_SQUASHFS are configured.

Add a dependency of SPL_SEMIHOSTING in the depends for
SPL_FS_LOAD_PAYLOAD_NAME so that the code compiles fine.

Signed-off-by: Kautuk Consul <kconsul@ventanamicro.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
17 months agoarch/riscv: add semihosting support for RISC-V
Kautuk Consul [Wed, 7 Dec 2022 11:42:35 +0000 (17:12 +0530)]
arch/riscv: add semihosting support for RISC-V

We add RISC-V semihosting based serial console for JTAG based early
debugging.

The RISC-V semihosting specification is available at:
https://github.com/riscv/riscv-semihosting-spec/blob/main/riscv-semihosting-spec.adoc

Signed-off-by: Anup Patel <apatel@ventanamicro.com>
Signed-off-by: Kautuk Consul <kconsul@ventanamicro.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
17 months agolib: Add common semihosting library
Kautuk Consul [Wed, 7 Dec 2022 11:42:34 +0000 (17:12 +0530)]
lib: Add common semihosting library

We factor out the arch-independent parts of the ARM semihosting
implementation as a common library so that it can be shared
with RISC-V.

Signed-off-by: Kautuk Consul <kconsul@ventanamicro.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
17 months agoMerge branch '2022-12-07-Kconfig-migrations' into next
Tom Rini [Wed, 7 Dec 2022 23:08:01 +0000 (18:08 -0500)]
Merge branch '2022-12-07-Kconfig-migrations' into next

- Import another batch of Kconfig migrations and in this case, also
  legacy code removal.

17 months agonet: Remove eth_legacy.c
Tom Rini [Sun, 27 Nov 2022 15:25:36 +0000 (10:25 -0500)]
net: Remove eth_legacy.c

As there are no more non-DM_ETH cases for networking, remove this legacy
file and update the Makefile to match current usage.

Signed-off-by: Tom Rini <trini@konsulko.com>
17 months agoqe: Remove non-DM_ETH code
Tom Rini [Sun, 27 Nov 2022 15:25:35 +0000 (10:25 -0500)]
qe: Remove non-DM_ETH code

As DM_ETH is required for all network drivers, it's now safe to remove
the non-DM_ETH support code.

Signed-off-by: Tom Rini <trini@konsulko.com>
17 months agousb: gadget: Remove non-DM_ETH code
Tom Rini [Sun, 27 Nov 2022 15:25:34 +0000 (10:25 -0500)]
usb: gadget: Remove non-DM_ETH code

As DM_ETH is required for all network drivers, it's now safe to remove
the non-DM_ETH support code.

Signed-off-by: Tom Rini <trini@konsulko.com>
17 months agousb: eth: Remove non-DM_ETH code
Tom Rini [Sun, 27 Nov 2022 15:25:33 +0000 (10:25 -0500)]
usb: eth: Remove non-DM_ETH code

As DM_ETH is required for all network drivers, it's now safe to remove
the non-DM_ETH support code fro usb_ether itself.

Signed-off-by: Tom Rini <trini@konsulko.com>
17 months agousb: eth: smsc95xx: Remove non-DM_ETH code
Tom Rini [Sun, 27 Nov 2022 15:25:32 +0000 (10:25 -0500)]
usb: eth: smsc95xx: Remove non-DM_ETH code

As DM_ETH is required for all network drivers, it's now safe to remove
the non-DM_ETH support code.

Signed-off-by: Tom Rini <trini@konsulko.com>
17 months agousb: eth: r8152: Remove non-DM_ETH code
Tom Rini [Sun, 27 Nov 2022 15:25:31 +0000 (10:25 -0500)]
usb: eth: r8152: Remove non-DM_ETH code

As DM_ETH is required for all network drivers, it's now safe to remove
the non-DM_ETH support code.

Signed-off-by: Tom Rini <trini@konsulko.com>
17 months agousb: eth: msc7830: Remove non-DM_ETH code
Tom Rini [Sun, 27 Nov 2022 15:25:30 +0000 (10:25 -0500)]
usb: eth: msc7830: Remove non-DM_ETH code

As DM_ETH is required for all network drivers, it's now safe to remove
the non-DM_ETH support code.

Signed-off-by: Tom Rini <trini@konsulko.com>
17 months agousb: eth: asix88179: Remove non-DM_ETH code
Tom Rini [Sun, 27 Nov 2022 15:25:29 +0000 (10:25 -0500)]
usb: eth: asix88179: Remove non-DM_ETH code

As DM_ETH is required for all network drivers, it's now safe to remove
the non-DM_ETH support code.

Signed-off-by: Tom Rini <trini@konsulko.com>
17 months agousb: eth: asix: Remove non-DM_ETH code
Tom Rini [Sun, 27 Nov 2022 15:25:28 +0000 (10:25 -0500)]
usb: eth: asix: Remove non-DM_ETH code

As DM_ETH is required for all network drivers, it's now safe to remove
the non-DM_ETH support code.

Signed-off-by: Tom Rini <trini@konsulko.com>
17 months agonet: keystone_net: Remove non-DM_ETH code
Tom Rini [Sun, 27 Nov 2022 15:25:27 +0000 (10:25 -0500)]
net: keystone_net: Remove non-DM_ETH code

As DM_ETH is required for all network drivers, it's now safe to
remove the non-DM_ETH support code.

Signed-off-by: Tom Rini <trini@konsulko.com>
17 months agonet: cpsw: Remove non-DM_ETH code
Tom Rini [Sun, 27 Nov 2022 15:25:26 +0000 (10:25 -0500)]
net: cpsw: Remove non-DM_ETH code

As DM_ETH is required for all network drivers, it's now safe to
remove the non-DM_ETH support code.

Signed-off-by: Tom Rini <trini@konsulko.com>
17 months agonet: sunxi_emac: Remove non-DM_ETH code
Tom Rini [Sun, 27 Nov 2022 15:25:25 +0000 (10:25 -0500)]
net: sunxi_emac: Remove non-DM_ETH code

As DM_ETH is required for all network drivers, it's now safe to
remove the non-DM_ETH support code.

Signed-off-by: Tom Rini <trini@konsulko.com>
17 months agonet: smc911x: Remove non-DM_ETH code
Tom Rini [Sun, 27 Nov 2022 15:25:24 +0000 (10:25 -0500)]
net: smc911x: Remove non-DM_ETH code

As DM_ETH is required for all network drivers, it's now safe to
remove the non-DM_ETH support code.

Signed-off-by: Tom Rini <trini@konsulko.com>
17 months agonet: sh_eth: Remove non-DM_ETH code
Tom Rini [Sun, 27 Nov 2022 15:25:23 +0000 (10:25 -0500)]
net: sh_eth: Remove non-DM_ETH code

As DM_ETH is required for all network drivers, it's now safe to
remove the non-DM_ETH support code.

Signed-off-by: Tom Rini <trini@konsulko.com>
17 months agonet: rtl8169: Remove non-DM_ETH code
Tom Rini [Sun, 27 Nov 2022 15:25:22 +0000 (10:25 -0500)]
net: rtl8169: Remove non-DM_ETH code

As DM_ETH is required for all network drivers, it's now safe to
remove the non-DM_ETH support code.

Signed-off-by: Tom Rini <trini@konsulko.com>
17 months agonet: rtl8139: Remove non-DM_ETH code
Tom Rini [Sun, 27 Nov 2022 15:25:21 +0000 (10:25 -0500)]
net: rtl8139: Remove non-DM_ETH code

As DM_ETH is required for all network drivers, it's now safe to
remove the non-DM_ETH support code.

Signed-off-by: Tom Rini <trini@konsulko.com>
17 months agonet: phy: Remove non-DM_ETH code
Tom Rini [Sun, 27 Nov 2022 15:25:20 +0000 (10:25 -0500)]
net: phy: Remove non-DM_ETH code

As DM_ETH is required for all network drivers, it's now safe to
remove the non-DM_ETH support code.

Signed-off-by: Tom Rini <trini@konsulko.com>
17 months agonet: pcnet: Remove non-DM_ETH code
Tom Rini [Sun, 27 Nov 2022 15:25:19 +0000 (10:25 -0500)]
net: pcnet: Remove non-DM_ETH code

As DM_ETH is required for all network drivers, it's now safe to
remove the non-DM_ETH support code.

Signed-off-by: Tom Rini <trini@konsulko.com>
17 months agonet: netconsole: Remove non-DM_ETH code
Tom Rini [Sun, 27 Nov 2022 15:25:18 +0000 (10:25 -0500)]
net: netconsole: Remove non-DM_ETH code

As DM_ETH is required for all network drivers, it's now safe to
remove the non-DM_ETH support code.

Signed-off-by: Tom Rini <trini@konsulko.com>
17 months agonet: mvgbe: Remove non-DM_ETH code
Tom Rini [Sun, 27 Nov 2022 15:25:17 +0000 (10:25 -0500)]
net: mvgbe: Remove non-DM_ETH code

As DM_ETH is required for all network drivers, it's now safe to
remove the non-DM_ETH support code.

Signed-off-by: Tom Rini <trini@konsulko.com>
17 months agonet: mcfmii: Remove non-DM_ETH code
Tom Rini [Sun, 27 Nov 2022 15:25:16 +0000 (10:25 -0500)]
net: mcfmii: Remove non-DM_ETH code

As DM_ETH is required for all network drivers, it's now safe to
remove the non-DM_ETH support code.

Signed-off-by: Tom Rini <trini@konsulko.com>
17 months agonet: macb: Remove non-DM_ETH code
Tom Rini [Sun, 27 Nov 2022 15:25:15 +0000 (10:25 -0500)]
net: macb: Remove non-DM_ETH code

As DM_ETH is required for all network drivers, it's now safe to
remove the non-DM_ETH support code.

Signed-off-by: Tom Rini <trini@konsulko.com>
17 months agonet: ldpaa_eth: Remove non-DM_ETH code
Tom Rini [Sun, 27 Nov 2022 15:25:14 +0000 (10:25 -0500)]
net: ldpaa_eth: Remove non-DM_ETH code

As DM_ETH is required for all network drivers, it's now safe to
remove the non-DM_ETH support code.

Signed-off-by: Tom Rini <trini@konsulko.com>
17 months agonet: fsl-mc: Remove non-DM_ETH code
Tom Rini [Sun, 27 Nov 2022 15:25:13 +0000 (10:25 -0500)]
net: fsl-mc: Remove non-DM_ETH code

As DM_ETH is required for all network drivers, it's now safe to
remove the non-DM_ETH support code.

Signed-off-by: Tom Rini <trini@konsulko.com>
17 months agonet: fec_mxc: Remove non-DM_ETH code
Tom Rini [Sun, 27 Nov 2022 15:25:12 +0000 (10:25 -0500)]
net: fec_mxc: Remove non-DM_ETH code

As DM_ETH is required for all network drivers, it's now safe to
remove the non-DM_ETH support code.

Signed-off-by: Tom Rini <trini@konsulko.com>
17 months agonet: ethoc: Remove non-DM_ETH code
Tom Rini [Sun, 27 Nov 2022 15:25:11 +0000 (10:25 -0500)]
net: ethoc: Remove non-DM_ETH code

As DM_ETH is required for all network drivers, it's now safe to
remove the non-DM_ETH support code.

Signed-off-by: Tom Rini <trini@konsulko.com>
17 months agonet: eepro100: Remove non-DM_ETH code
Tom Rini [Sun, 27 Nov 2022 15:25:10 +0000 (10:25 -0500)]
net: eepro100: Remove non-DM_ETH code

As DM_ETH is required for all network drivers, it's now safe to
remove the non-DM_ETH support code.

Signed-off-by: Tom Rini <trini@konsulko.com>
17 months agonet: e1000: Remove non-DM_ETH code
Tom Rini [Sun, 27 Nov 2022 15:25:09 +0000 (10:25 -0500)]
net: e1000: Remove non-DM_ETH code

As DM_ETH is required for all network drivers, it's now safe to remove
the non-DM_ETH support code.

Signed-off-by: Tom Rini <trini@konsulko.com>
17 months agonet: dm9000x: Remove non-DM_ETH code
Tom Rini [Sun, 27 Nov 2022 15:25:08 +0000 (10:25 -0500)]
net: dm9000x: Remove non-DM_ETH code

As DM_ETH is required for all network drivers, it's now safe to remove
the non-DM_ETH support code.

Signed-off-by: Tom Rini <trini@konsulko.com>
17 months agonet: designware: Remove non-DM_ETH code
Tom Rini [Sun, 27 Nov 2022 15:25:07 +0000 (10:25 -0500)]
net: designware: Remove non-DM_ETH code

As DM_ETH is required for all network drivers, it's now safe to remove
the non-DM_ETH support code.

Signed-off-by: Tom Rini <trini@konsulko.com>
17 months agonet: dc2114x: Remove non-DM_ETH code
Tom Rini [Sun, 27 Nov 2022 15:25:06 +0000 (10:25 -0500)]
net: dc2114x: Remove non-DM_ETH code

As DM_ETH is required for all network drivers, it's now safe to remove
the non-DM_ETH support code.

Signed-off-by: Tom Rini <trini@konsulko.com>
17 months agonet: fm: Remove non-DM_ETH code
Tom Rini [Sun, 27 Nov 2022 15:25:05 +0000 (10:25 -0500)]
net: fm: Remove non-DM_ETH code

As DM_ETH is required for all network drivers, it's now safe to remove
the non-DM_ETH support code.

Signed-off-by: Tom Rini <trini@konsulko.com>
17 months agonet: tsec: Remove non-DM_ETH support code
Tom Rini [Sun, 27 Nov 2022 15:25:04 +0000 (10:25 -0500)]
net: tsec: Remove non-DM_ETH support code

As DM_ETH is required for all network drivers, it's now safe to remove
the non-DM_ETH support code.  Doing this removes some board support code
which was also unused. Finally, this removes some CONFIG symbols that
otherwise needed to be migrated to Kconfig, but were unused in code now.

Signed-off-by: Tom Rini <trini@konsulko.com>
17 months agoglobal: Remove extraneous DM_ETH imply/select
Tom Rini [Sun, 27 Nov 2022 15:25:03 +0000 (10:25 -0500)]
global: Remove extraneous DM_ETH imply/select

We only need to enable DM_ETH if we have a networking driver. All
networking drivers depend on DM_ETH being enabled, and their selection
ensures DM_ETH will be enabled.

Signed-off-by: Tom Rini <trini@konsulko.com>
17 months agonet: Remove extraneous dependencies
Tom Rini [Sun, 27 Nov 2022 15:25:02 +0000 (10:25 -0500)]
net: Remove extraneous dependencies

With DM_ETH being required now for all drivers, we don't need this
listed on individual drivers as well.

Signed-off-by: Tom Rini <trini@konsulko.com>
17 months agochromebook_samus_tpl: Disable SPL networking
Tom Rini [Sun, 27 Nov 2022 15:25:00 +0000 (10:25 -0500)]
chromebook_samus_tpl: Disable SPL networking

We don't appear to actually use networking in SPL here, disable it.

Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
17 months agotopic_miami*: Disable networking support more fully
Tom Rini [Sun, 27 Nov 2022 15:24:59 +0000 (10:24 -0500)]
topic_miami*: Disable networking support more fully

This platform had largely disabled networking support before. More
completely disable it by turning off CONFIG_NET.

Cc: Mike Looijmans <mike.looijmans@topic.nl>
Signed-off-by: Tom Rini <trini@konsulko.com>
Acked-by: Mike Looijmans <mike.looijmans@topic.nl>
17 months agopinecube: Disable networking support more fully
Tom Rini [Sun, 27 Nov 2022 15:24:58 +0000 (10:24 -0500)]
pinecube: Disable networking support more fully

This platform had largely disabled networking support before. More
completely disable it by turning off CONFIG_NET.

Cc: Icenowy Zheng <icenowy@aosc.io>
Signed-off-by: Tom Rini <trini@konsulko.com>
17 months agoLicheePi_Zero: Disable networking support more fully
Tom Rini [Sun, 27 Nov 2022 15:24:57 +0000 (10:24 -0500)]
LicheePi_Zero: Disable networking support more fully

This platform had largely disabled networking support before. More
completely disable it by turning off CONFIG_NET.

Cc: Icenowy Zheng <icenowy@aosc.xyz>
Signed-off-by: Tom Rini <trini@konsulko.com>
17 months agoxenguest_arm64: Disable networking support more fully
Tom Rini [Sun, 27 Nov 2022 15:24:56 +0000 (10:24 -0500)]
xenguest_arm64: Disable networking support more fully

This platform had largely disabled networking support before. More
completely disable it by turning off CONFIG_NET.

Cc: Anastasiia Lukianenko <anastasiia_lukianenko@epam.com>
Cc: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
17 months agoARM: stm32: Increment WDT by default on DHSOM
Marek Vasut [Tue, 6 Dec 2022 02:35:15 +0000 (03:35 +0100)]
ARM: stm32: Increment WDT by default on DHSOM

Enable watchdog timer on the DHSOM by default, both in U-Boot proper and
in SPL. This can be used in combination with boot counter by either SPL
or U-Boot proper to boot either copy of system software, e.g. in case of
full A/B update strategy.

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
17 months agoARM: stm32: Increment boot counter in SPL on DHSOM
Marek Vasut [Tue, 6 Dec 2022 02:35:14 +0000 (03:35 +0100)]
ARM: stm32: Increment boot counter in SPL on DHSOM

Increment the boot counter already in U-Boot SPL instead of incrementing
it only later in U-Boot proper. This can be used by SPL to boot either of
two U-Boot copies and improve redundancy of software on the platform, e.g.
in case of full A/B update strategy.

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
17 months agoARM: stm32: Enable assorted ST specific commands on DHSOM
Marek Vasut [Tue, 6 Dec 2022 02:35:13 +0000 (03:35 +0100)]
ARM: stm32: Enable assorted ST specific commands on DHSOM

Enable the stm32prog, stm32key, stboard commands on DHSOM.
Those can be used e.g. to implement verified boot.

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
17 months agoARM: stm32: Add version variable to DHSOM
Marek Vasut [Tue, 1 Nov 2022 22:35:31 +0000 (23:35 +0100)]
ARM: stm32: Add version variable to DHSOM

Enable insertion of version variable into U-Boot environment on DHSOM,
to make it possible to check U-Boot version e.g. in U-Boot scripts.

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
17 months agoARM: stm32: Add boot counter to DHSOM
Marek Vasut [Thu, 27 Oct 2022 21:17:55 +0000 (23:17 +0200)]
ARM: stm32: Add boot counter to DHSOM

Add boot counter to STM32MP15xx DHSOM. This aligns the software with
other upstream DHSOM products which already do enable boot counter.

The boot counter on STM32MP15xx is placed in the TAMP block TAMP_BKPxR
register 19, right past register 17 and 18 used for CM4 resource table
and state by the Linux kernel. The TAMP_BKPxR register block is used
because its contents survives warm reset, but not cold reset.

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: Patrice Chotard <patrice.chotard@foss.st.com>
17 months agoARM: dts: stm32: Drop MMCI interrupt-names
Marek Vasut [Wed, 2 Nov 2022 13:53:49 +0000 (14:53 +0100)]
ARM: dts: stm32: Drop MMCI interrupt-names

The pl18x MMCI driver does not use the interrupt-names property,
the binding document has been updated to recommend this property
be unused, remove it.
Backport of Marek's Linux patch:
https://lore.kernel.org/linux-arm-kernel/20221013221242.218808-3-marex@denx.de/

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Yann Gautier <yann.gautier@foss.st.com>
Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
17 months agoARM: dts: stm32: add sdmmc cd-gpios for STM32MP135F-DK
Yann Gautier [Wed, 2 Nov 2022 13:53:48 +0000 (14:53 +0100)]
ARM: dts: stm32: add sdmmc cd-gpios for STM32MP135F-DK

On STM32MP135F-DK, the SD card detect GPIO is GPIOH4.
Backport of the Linux patch:
https://lore.kernel.org/linux-arm-kernel/20220921160334.3227138-1-yann.gautier@foss.st.com/

Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
17 months agoadc: stm32mp15: add support of generic channels binding
Olivier Moysan [Wed, 23 Nov 2022 15:20:16 +0000 (16:20 +0100)]
adc: stm32mp15: add support of generic channels binding

Add support of generic IIO channels binding:
./devicetree/bindings/iio/adc/adc.yaml
Keep support of st,adc-channels for backward compatibility.

Signed-off-by: Olivier Moysan <olivier.moysan@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
17 months agoadc: stm32mp15: split channel init into several routines
Olivier Moysan [Wed, 23 Nov 2022 15:20:15 +0000 (16:20 +0100)]
adc: stm32mp15: split channel init into several routines

Split stm32_adc_chan_of_init channel initialization function into
several routines to increase readability and prepare channel
generic binding handling.

Signed-off-by: Olivier Moysan <olivier.moysan@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
17 months agoarm: dts: stm32mp13: add support of RCC driver
Gabriel Fernandez [Thu, 24 Nov 2022 10:36:05 +0000 (11:36 +0100)]
arm: dts: stm32mp13: add support of RCC driver

Adds support of Clock and Reset drivers for STM32MP13 platform.

Signed-off-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
17 months agoclk: stm32mp13: introduce STM32MP13 RCC driver
Gabriel Fernandez [Thu, 24 Nov 2022 10:36:04 +0000 (11:36 +0100)]
clk: stm32mp13: introduce STM32MP13 RCC driver

STM32MP13 RCC driver uses Common Clock Framework and also a
'clk-stm32-core' API. Then STM32MPx RCC driver will contain only data
configuration (gates, mux, dividers and the way to check security)
or some specific clocks.
This API will be used by all new other generations of ST Socs.

Signed-off-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
17 months agodt-bindings: stm32mp13: add clock & reset support for STM32MP13
Gabriel Fernandez [Thu, 24 Nov 2022 10:36:03 +0000 (11:36 +0100)]
dt-bindings: stm32mp13: add clock & reset support for STM32MP13

Add support of stm32mp13 DT bindings of clock and reset.

Signed-off-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>