]> git.ipfire.org Git - thirdparty/u-boot.git/log
thirdparty/u-boot.git
2 years agoimx: imx8mn-evk: convert to OF_UPSTREAM
Peng Fan [Thu, 28 Mar 2024 02:45:10 +0000 (10:45 +0800)] 
imx: imx8mn-evk: convert to OF_UPSTREAM

Convert i.MX8MN-EVK and i.MX8MN-DDR4-EVK to OF_UPSTREAM

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agoimx: imx8mm_evk: convert to OF_UPSTREAM
Peng Fan [Thu, 28 Mar 2024 02:45:09 +0000 (10:45 +0800)] 
imx: imx8mm_evk: convert to OF_UPSTREAM

Convert i.MX8MM EVK to OF_UPSTREAM

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agoimx: imx8mq_evk: convert to OF_UPSTREAM
Peng Fan [Thu, 28 Mar 2024 02:45:08 +0000 (10:45 +0800)] 
imx: imx8mq_evk: convert to OF_UPSTREAM

Convert i.MX8MQ EVK to OF_UPSTREAM

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agoboard: toradex: colibri-imx8x: Remove board_gpio_init
Hiago De Franco [Wed, 27 Mar 2024 12:45:50 +0000 (09:45 -0300)] 
board: toradex: colibri-imx8x: Remove board_gpio_init

On Colibri iMX8X, the gpio initialization and usage should be handled by
the device tree, not by the colibri-imx8x.c code. Therefore, remove it.

Signed-off-by: Hiago De Franco <hiago.franco@toradex.com>
2 years agoimx8: Add a default reset_cpu() implementation
Fabio Estevam [Tue, 26 Mar 2024 12:19:49 +0000 (09:19 -0300)] 
imx8: Add a default reset_cpu() implementation

Add a weak default reset_cpu() implementation just like
it is done on arch/arm/mach-imx/cpu.c.

This allows the removal of the empty reset_cpu() in several
board files.

Signed-off-by: Fabio Estevam <festevam@denx.de>
Tested-by: Hiago De Franco <hiago.franco@toradex.com> # Toradex Colibri iMX8X
2 years agoarm: dts: imx8m*-venice-gw72xx: add TPM device
Tim Harvey [Mon, 25 Mar 2024 16:27:22 +0000 (09:27 -0700)] 
arm: dts: imx8m*-venice-gw72xx: add TPM device

The GW71xx baseboard has a TPM that defined in the upstream dt however
we need to ensure the GPIO reset line is de-asserted which we do in boot
firmware with a gpio hog.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2 years agoarm: dts: imx8mm-venice-gw7901: add digital I/O direction control GPIO's
Tim Harvey [Mon, 25 Mar 2024 16:27:02 +0000 (09:27 -0700)] 
arm: dts: imx8mm-venice-gw7901: add digital I/O direction control GPIO's

The GW7901 has GPIO's to configure the direction of its isolated
digital I/O signals. Add the GPIO pinmux, line names, and hog
configuration.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2 years agophycore_pcl063: Drop leading zero from USB vendor number
Fabio Estevam [Mon, 25 Mar 2024 13:52:30 +0000 (10:52 -0300)] 
phycore_pcl063: Drop leading zero from USB vendor number

CONFIG_USB_GADGET_VENDOR_NUM is a 16-bit number, so remove
the leading zero.

Reported-by: Marek Vasut <marex@denx.de>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Marek Vasut <marex@denx.de>
2 years agomx6cuboxi: Convert to watchdog driver model
Fabio Estevam [Wed, 27 Mar 2024 14:18:49 +0000 (11:18 -0300)] 
mx6cuboxi: Convert to watchdog driver model

Commit 68dcbdd594d4 ("ARM: imx: Add weak default reset_cpu()") caused
the 'reset' command in U-Boot to not cause a board reset.

Fix it by switching to the watchdog driver model via sysreset, which
is the preferred method for implementing the watchdog reset.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Tested-by: Christian Gmeiner <cgmeiner@igalia.com>
2 years agowarp7: Convert to watchdog driver model
Fabio Estevam [Wed, 27 Mar 2024 13:46:51 +0000 (10:46 -0300)] 
warp7: Convert to watchdog driver model

Commit 68dcbdd594d4 ("ARM: imx: Add weak default reset_cpu()") caused
the 'reset' command in U-Boot to not cause a board reset.

Fix it by switching to the watchdog driver model via sysreset, which
is the preferred method for implementing the watchdog reset.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2 years agomx6cuboxi: Fix board revision detection
Fabio Estevam [Wed, 27 Mar 2024 11:49:59 +0000 (08:49 -0300)] 
mx6cuboxi: Fix board revision detection

Currently, an i.MX6 Cuboxi board is incorrectly detected
as the HummingBoard model:

U-Boot 2024.04-rc5 (Mar 26 2024 - 15:59:22 +0100)

CPU:   Freescale i.MX6Q rev1.3 996 MHz (running at 792 MHz)
CPU:   Extended Commercial temperature grade (-20C to 105C) at 26C
Reset cause: POR
Model: SolidRun HummingBoard2 Dual/Quad (1.5som+emmc)
gpio@20a4000: set_dir_flags: error: gpio GPIO3_8 not reserved
gpio@20a4000: get_value: error: gpio GPIO3_8 not reserved
gpio@20a8000: set_dir_flags: error: gpio GPIO4_4 not reserved
gpio@20a8000: get_value: error: gpio GPIO4_4 not reserved
gpio@20b0000: set_dir_flags: error: gpio GPIO6_9 not reserved
gpio@20b0000: get_value: error: gpio GPIO6_9 not reserved
Board: MX6 HummingBoard
DRAM:  2 GiB
...

This error happens because request_detect_gpios() uses the GPIO DM
API, but board_type() still uses the legacy non-DM GPIO API.

Fix it by using the GPIO DM API in board_type() to read the
board revision pins in SPL.

Reported-by: Christian Gmeiner <cgmeiner@igalia.com>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Tested-by: Christian Gmeiner <cgmeiner@igalia.com>
2 years agoMerge patch series "Clean up arm linker scripts"
Tom Rini [Fri, 29 Mar 2024 14:39:38 +0000 (10:39 -0400)] 
Merge patch series "Clean up arm linker scripts"

Ilias Apalodimas <ilias.apalodimas@linaro.org> says:

The arm linker scripts had a mix of symbols and C defined variables in an
effort to emit relative references instead of absolute ones e.g [0]. A
linker bug prevented us from doing so [1] -- fixed since 2016.
This has led to confusion over the years, ending up with mixed section
definitions. Some sections are defined with overlays and different
definitions between v7 and v8 architectures.
For example __efi_runtime_rel_start/end is defined as a linker symbol for
armv8 and a C variable in armv7.

Linker scripts nowadays can emit relative references, as long as the symbol
definition is contained within the section definition. So let's switch most
of the C defined variables and clean up the arm sections.c file.
There's still a few symbols remaining -- __secure_start/end,
__secure_stack_start/end and __end which can be cleaned up
in a followup series.

For both QEMU v7/v8 bloat-o-meter shows now size difference
$~ ./scripts/bloat-o-meter u-boot u-boot.new
add/remove: 0/0 grow/shrink: 0/0 up/down: 0/0 (0)
Function                                     old     new   delta
Total: Before=798861, After=798861, chg +0.00%

The symbols seem largely unchanged apart from a difference in .bss
as well as the emited sections and object types of the affected variables.

On the output below the first value is from -next and the second comes from
-next + this patchset. The .bss_start/end sections have disappeared from
the newer binaries.

# For example on QEMU v8:
efi_runtime_start
  7945: 0000000000000178     0 OBJECT  GLOBAL DEFAULT    2 __efi_runtime_start
  7942: 0000000000000178     0 NOTYPE  GLOBAL DEFAULT    2 __efi_runtime_start
efi_runtime_stop
  9050: 0000000000000d38     0 OBJECT  GLOBAL DEFAULT    2 __efi_runtime_stop
  9047: 0000000000000d38     0 NOTYPE  GLOBAL DEFAULT    2 __efi_runtime_stop
__efi_runtime_rel_start
  7172: 00000000000dc2f0     0 OBJECT  GLOBAL DEFAULT   10 __efi_runtime_rel_start
  7169: 00000000000dc2f0     0 NOTYPE  GLOBAL DEFAULT   10 __efi_runtime_rel_start
__efi_runtime_rel_stop
  7954: 00000000000dc4a0     0 OBJECT  GLOBAL DEFAULT   10 __efi_runtime_rel_stop
  7951: 00000000000dc4a0     0 NOTYPE  GLOBAL DEFAULT   10 __efi_runtime_rel_stop
__rel_dyn_start
  7030: 00000000000dc4a0     0 OBJECT  GLOBAL DEFAULT   11 __rel_dyn_start
  7027: 00000000000dc4a0     0 NOTYPE  GLOBAL DEFAULT   11 __rel_dyn_start
__rel_dyn_end
  8959: 0000000000102b10     0 OBJECT  GLOBAL DEFAULT   12 __rel_dyn_end
  8956: 0000000000102b10     0 NOTYPE  GLOBAL DEFAULT   11 __rel_dyn_end
image_copy_start
  9051: 0000000000000000     0 OBJECT  GLOBAL DEFAULT    1 __image_copy_start
  9048: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT    1 __image_copy_start
image_copy_end
  7467: 00000000000dc4a0     0 OBJECT  GLOBAL DEFAULT   11 __image_copy_end
  7464: 00000000000dc4a0     0 NOTYPE  GLOBAL DEFAULT   11 __image_copy_end
bss_start
    12: 0000000000102b10     0 SECTION LOCAL  DEFAULT   12 .bss_start
  8087: 0000000000000018     0 NOTYPE  GLOBAL DEFAULT    1 _bss_start_ofs
  8375: 0000000000102b10     0 OBJECT  GLOBAL DEFAULT   12 __bss_start
  8084: 0000000000000018     0 NOTYPE  GLOBAL DEFAULT    1 _bss_start_ofs
  8372: 0000000000102b10     0 NOTYPE  GLOBAL DEFAULT   12 __bss_start
bss_end
    14: 000000000010bc30     0 SECTION LOCAL  DEFAULT   14 .bss_end
  7683: 000000000010bc30     0 OBJECT  GLOBAL DEFAULT   14 __bss_end
  8479: 0000000000000020     0 NOTYPE  GLOBAL DEFAULT    1 _bss_end_ofs
  7680: 000000000010bbb0     0 NOTYPE  GLOBAL DEFAULT   12 __bss_end
  8476: 0000000000000020     0 NOTYPE  GLOBAL DEFAULT    1 _bss_end_ofs

# For QEMU v7:
efi_runtime_start
 10703: 000003bc     0 OBJECT  GLOBAL DEFAULT    2 __efi_runtime_start
 10699: 000003c0     0 NOTYPE  GLOBAL DEFAULT    2 __efi_runtime_start
efi_runtime_stop
 11796: 000012ec     0 OBJECT  GLOBAL DEFAULT    2 __efi_runtime_stop
 11792: 000012ec     0 NOTYPE  GLOBAL DEFAULT    2 __efi_runtime_stop
__efi_runtime_rel_start
  9937: 000c40dc     0 OBJECT  GLOBAL DEFAULT    8 __efi_runtime_rel_start
  9935: 000c40dc     0 NOTYPE  GLOBAL DEFAULT    9 __efi_runtime_rel_start
__efi_runtime_rel_stop
 10712: 000c41dc     0 OBJECT  GLOBAL DEFAULT   10 __efi_runtime_rel_stop
 10708: 000c41dc     0 NOTYPE  GLOBAL DEFAULT    9 __efi_runtime_rel_stop
__rel_dyn_start
  9791: 000c41dc     0 OBJECT  GLOBAL DEFAULT   10 __rel_dyn_start
  9789: 000c41dc     0 NOTYPE  GLOBAL DEFAULT   10 __rel_dyn_start
__rel_dyn_end
 11708: 000da5f4     0 OBJECT  GLOBAL DEFAULT   10 __rel_dyn_end
 11704: 000da5f4     0 NOTYPE  GLOBAL DEFAULT   10 __rel_dyn_end
image_copy_start
   448: 0000177c     0 NOTYPE  LOCAL  DEFAULT    3 _image_copy_start_ofs
 11797: 00000000     0 OBJECT  GLOBAL DEFAULT    1 __image_copy_start
   445: 0000177c     0 NOTYPE  LOCAL  DEFAULT    3 _image_copy_start_ofs
 11793: 00000000     0 NOTYPE  GLOBAL DEFAULT    1 __image_copy_start
image_copy_end
   450: 00001780     0 NOTYPE  LOCAL  DEFAULT    3 _image_copy_end_ofs
 10225: 000c41dc     0 OBJECT  GLOBAL DEFAULT   10 __image_copy_end
   447: 00001780     0 NOTYPE  LOCAL  DEFAULT    3 _image_copy_end_ofs
 10222: 000c41dc     0 NOTYPE  GLOBAL DEFAULT   10 __image_copy_end
bss_start
    11: 000c41dc     0 SECTION LOCAL  DEFAULT   11 .bss_start
 11124: 000c41dc     0 OBJECT  GLOBAL DEFAULT   11 __bss_start
 11120: 000c41dc     0 NOTYPE  GLOBAL DEFAULT   11 __bss_start
bss_end
    13: 000cbbf8     0 SECTION LOCAL  DEFAULT   13 .bss_end
 10442: 000cbbf8     0 OBJECT  GLOBAL DEFAULT   13 __bss_end
 10439: 000cbbf8     0 NOTYPE  GLOBAL DEFAULT   11 __bss_end

It's worth noting that since the efi regions are affected by the change, booting
with EFI is preferable while testing. Booting the kernel only should be enough
since the efi stub and the kernel proper do request boottime and runtime
services respectively.
Something along the lines of
> virtio scan && load virtio 0 $kernel_addr_r Image && bootefi $kernel_addr_r
will work for QEMU aarch64.

Tested platforms:
- QEMU aarch64
- Xilinx kv260 kria starter kit & zynq
- QEMU armv7
- STM32MP157C-DK2

[0] commit 3ebd1cbc49f0 ("arm: make __bss_start and __bss_end__ compiler-generated")
[1] binutils commit 6b3b0ab89663 ("Make linker assigned symbol dynamic only for shared object")

2 years agoarm: remove redundant section alignments
Ilias Apalodimas [Fri, 15 Mar 2024 06:43:51 +0000 (08:43 +0200)] 
arm: remove redundant section alignments

Previous patches cleaning up linker symbols, also merged any explicit
. = ALIGN(x); into section definitions -- e.g
.bss ALIGN(x) : instead of

. = ALIGN(x);
. bss : {...}

However, if the output address is not specified then one will be chosen
for the section. This address will be adjusted to fit the alignment
requirement of the output section following the strictest alignment of
any input section contained within the output section. So let's get rid
of the redundant ALIGN directives when they are not needed.

While at add comments for the alignment of __bss_start/end since our
C runtime setup assembly assumes that __bss_start - __bss_end will be
a multiple of 4/8 for armv7 and armv8 respectively.

It's worth noting that the alignment is preserved on .rel.dyn for
mach-zynq which was explicitly aligning that section on an 8b
boundary instead of 4b one.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2 years agoarm: move image_copy_start/end to linker symbols
Ilias Apalodimas [Fri, 15 Mar 2024 06:43:50 +0000 (08:43 +0200)] 
arm: move image_copy_start/end to linker symbols

image_copy_start/end are defined as c variables in order to force the compiler
emit relative references. However, defining those within a section definition
will do the same thing since [0].

So let's remove the special sections from the linker scripts, the
variable definitions from sections.c and define them as a symbols within
a section.

[0] binutils commit 6b3b0ab89663 ("Make linker assigned symbol dynamic only for shared object")

Suggested-by: Sam Edwards <CFSworks@gmail.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Tested-by: Sam Edwards <CFSworks@gmail.com> # Binary output identical
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2 years agoarm: fix __efi_runtime_start/end definitions
Ilias Apalodimas [Fri, 15 Mar 2024 06:43:49 +0000 (08:43 +0200)] 
arm: fix __efi_runtime_start/end definitions

__efi_runtime_start/end are defined as c variables for arm7 only in
order to force the compiler emit relative references. However, defining
those within a section definition will do the same thing since [0].
On top of that the v8 linker scripts define it as a symbol.

So let's remove the special sections from the linker scripts, the
variable definitions from sections.c and define them as a symbols within
the correct section.

[0] binutils commit 6b3b0ab89663 ("Make linker assigned symbol dynamic only for shared object")

Suggested-by: Sam Edwards <CFSworks@gmail.com>
Reviewed-by: Sam Edwards <CFSworks@gmail.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Tested-by: Sam Edwards <CFSworks@gmail.com> # Binary output identical
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2 years agoarm: clean up v7 and v8 linker scripts for __rel_dyn_start/end
Ilias Apalodimas [Fri, 15 Mar 2024 06:43:48 +0000 (08:43 +0200)] 
arm: clean up v7 and v8 linker scripts for __rel_dyn_start/end

commit 47bd65ef057f ("arm: make __rel_dyn_{start, end} compiler-generated")
were moving the __rel_dyn_start/end on c generated variables that were
injected in their own sections. The reason was that we needed relative
relocations for position independent code and linker bugs back then
prevented us from doing so [0].

However, the linker documentation pages states that symbols that are
defined within a section definition will create a relocatable
type with the value being a fixed offset from the base of a section [1].

[0] binutils commit 6b3b0ab89663 ("Make linker assigned symbol dynamic only for shared object")
[1] https://sourceware.org/binutils/docs/ld/Expression-Section.html

Suggested-by: Sam Edwards <CFSworks@gmail.com>
Reviewed-by: Sam Edwards <CFSworks@gmail.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Tested-by: Sam Edwards <CFSworks@gmail.com> # Binary output identical
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2 years agoarm: fix __efi_runtime_rel_start/end definitions
Ilias Apalodimas [Fri, 15 Mar 2024 06:43:47 +0000 (08:43 +0200)] 
arm: fix __efi_runtime_rel_start/end definitions

__efi_runtime_rel_start/end are defined as c variables for arm7 only in
order to force the compiler emit relative references. However, defining
those within a section definition will do the same thing since [0].
On top of that the v8 linker scripts define it as a symbol.

So let's remove the special sections from the linker scripts, the
variable definitions from sections.c and define them as a symbols within
the correct section.

[0] binutils commit 6b3b0ab89663 ("Make linker assigned symbol dynamic only for shared object")

Suggested-by: Sam Edwards <CFSworks@gmail.com>
Reviewed-by: Sam Edwards <CFSworks@gmail.com>
Tested-by: Sam Edwards <CFSworks@gmail.com> # Binary output identical
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2 years agoarm: clean up v7 and v8 linker scripts for bss_start/end
Ilias Apalodimas [Fri, 15 Mar 2024 06:43:46 +0000 (08:43 +0200)] 
arm: clean up v7 and v8 linker scripts for bss_start/end

commit 3ebd1cbc49f0 ("arm: make __bss_start and __bss_end__ compiler-generated")
and
commit f84a7b8f54db ("ARM: Fix __bss_start and __bss_end in linker scripts")
were moving the bss_start/end on c generated variables that were
injected in their own sections. The reason was that we needed relative
relocations for position independent code and linker bugs back then
prevented us from doing so [0].

However, the linker documentation pages states that symbols that are
defined within a section definition will create a relocatable type with
the value being a fixed offset from the base of a section [1].
So let's start cleaning this up starting with the bss_start and bss_end
variables. Convert them into symbols within the .bss section definition.

[0] binutils commit 6b3b0ab89663 ("Make linker assigned symbol dynamic only for shared object")
[1] https://sourceware.org/binutils/docs/ld/Expression-Section.html

Tested-by: Caleb Connolly <caleb.connolly@linaro.org> # Qualcomm sdm845
Tested-by: Sam Edwards <CFSworks@gmail.com> # Binary output identical
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
2 years agoarm: baltos: remove custom linker script
Ilias Apalodimas [Fri, 15 Mar 2024 06:43:45 +0000 (08:43 +0200)] 
arm: baltos: remove custom linker script

commit 3d74a0977f514 ("ti: am335x: Remove unused linker script") removed
the linker script for the TI variant. This linker script doesn't seem to
do anything special and on top of that, has no definitions for the EFI
runtime sections.

So let's get rid of it and use the generic linker script which defines
those correctly

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2 years agoMerge tag 'doc-2024-04-rc6' of https://source.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Thu, 28 Mar 2024 20:01:03 +0000 (16:01 -0400)] 
Merge tag 'doc-2024-04-rc6' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request doc-2024-04-rc6

Documentation:

* man page of 'itest'
* tee: sandbox: fix spelling errors in function documentation

2 years agoMerge branch '2024-03-28-assorted-net-changes' into next
Tom Rini [Thu, 28 Mar 2024 15:05:30 +0000 (11:05 -0400)] 
Merge branch '2024-03-28-assorted-net-changes' into next

- A few ncsi PHY fixes, clean up PHY GPIO reset code, support LEDs on
  BCM54210E PHY, fix a signed shift overflow in the PHY code, hifemac
  updates, E1000 i225-IT support, improve DM_MDIO+DM_PHY support and
  enable it on the BeaglePlay platform.

2 years agoMerge tag 'acpi-next-20240328' of https://source.denx.de/u-boot/custodians/u-boot...
Tom Rini [Thu, 28 Mar 2024 12:54:34 +0000 (08:54 -0400)] 
Merge tag 'acpi-next-20240328' of https://source.denx.de/u-boot/custodians/u-boot-efi into next

Pull request acpi-next-20240328

ACPI:

* rename fields rename aslc_id, aslc_revision to match ACPI specification
* remove duplicate declaration of acpi_fill_header()
* document fields of HETP table
* MAINTAINERS: add include/acpi/ to ACPI

SMBIOS:

* provide wake-up type in SMBIOS table
* display wake-up type in smbios command

2 years agodoc: add reference to itest in if man-page
Heinrich Schuchardt [Fri, 22 Mar 2024 07:57:31 +0000 (08:57 +0100)] 
doc: add reference to itest in if man-page

Add a cross reference to the itest command.

Fix a typo: %s/Example/Examples/.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agodoc: man-page for itest
Heinrich Schuchardt [Fri, 22 Mar 2024 07:57:30 +0000 (08:57 +0100)] 
doc: man-page for itest

Provide a man-page for the itest command.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agotee: sandbox: fix spelling errors
Igor Opaniuk [Mon, 4 Mar 2024 17:44:50 +0000 (18:44 +0100)] 
tee: sandbox: fix spelling errors

Fix spelling errors in comments.

Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Igor Opaniuk <igor.opaniuk@gmail.com>
2 years agosmbios: fill wake-up type
Heinrich Schuchardt [Sat, 10 Feb 2024 11:06:48 +0000 (12:06 +0100)] 
smbios: fill wake-up type

We should not use the reserved value 0x00 for the wake up type but
use 0x02 (Unknown).

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agocmd: smbios: type 1 wake-up time, family
Heinrich Schuchardt [Sat, 10 Feb 2024 11:06:47 +0000 (12:06 +0100)] 
cmd: smbios: type 1 wake-up time, family

Correct type 1 output

* render wake up time as string
* print family string
* remove duplicate serial number output

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agoacpi: remove duplicate declaration of acpi_fill_header()
Heinrich Schuchardt [Sun, 21 Jan 2024 14:05:00 +0000 (15:05 +0100)] 
acpi: remove duplicate declaration of acpi_fill_header()

acpi_fill_header() is declared twice in include/acpi/acpi_table.h

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agoacpi: document HETP table
Heinrich Schuchardt [Sun, 21 Jan 2024 13:44:36 +0000 (14:44 +0100)] 
acpi: document HETP table

Document struct acpi_gen_regaddr and struct acpi_hpet.

Sphinx requires that the __packed attribute is at the end of the structure
definitions.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agoMAINTAINERS: add include/acpi/ to ACPI
Heinrich Schuchardt [Sun, 21 Jan 2024 13:41:59 +0000 (14:41 +0100)] 
MAINTAINERS: add include/acpi/ to ACPI

Add include/acpi/ to the realm of the ACPI maintainer.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agoacpi: rename aslc_id, aslc_revision
Heinrich Schuchardt [Sun, 21 Jan 2024 11:52:48 +0000 (12:52 +0100)] 
acpi: rename aslc_id, aslc_revision

The fields Creator ID and Creator Revision contain information about the
tool that created an ACPI table. This may be the ASL compiler for some
tables but it is not for others. Naming these fields aslc_id and
aslc_revision is misleading.

It is usual to see diverse values of Creator ID. On a laptop I saw these:
'AMD ', 'INTL, 'MSFT', 'PTEC'. Obviously not all relate to the Intel
ASL compiler.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agoconfigs/am62x_beagleplay_a53_defconfig: enable DM_ETH_PHY
Roger Quadros [Tue, 5 Mar 2024 13:24:54 +0000 (15:24 +0200)] 
configs/am62x_beagleplay_a53_defconfig: enable DM_ETH_PHY

Reset GPIO handling is done in ETH PHY Class driver.
Enable DM_ETH_PHY.

We don't use Fixed PHY so disable PHY_FIXED.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
2 years agonet: mdio-uclass: Bind and probe generic Ethernet PHY driver
Roger Quadros [Tue, 5 Mar 2024 13:24:53 +0000 (15:24 +0200)] 
net: mdio-uclass: Bind and probe generic Ethernet PHY driver

If DM_ETH_PHY is enabled then try to bind and probe the
generic Ethernet PHY driver for each child of MDIO bus.

This is to ensure that GPIO reset handling is done if available
before MDIO bus driver scans for the PHYs.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
2 years agonet: phy: Factor out PHY GPIO reset code
Marek Vasut [Mon, 18 Mar 2024 14:57:01 +0000 (15:57 +0100)] 
net: phy: Factor out PHY GPIO reset code

Pull the PHY GPIO reset code into separate function, since
this is and will be reused multiple times. Set up default
reset assert and deassert timing to generous 20ms and 1ms
for maximum compatibility in case those DT properties are
missing.

Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2 years agoe1000: add support for i225-IT
Marjolaine Amate [Mon, 4 Mar 2024 15:23:38 +0000 (16:23 +0100)] 
e1000: add support for i225-IT

This patch adds support for i225-IT in e1000 driver.
Add e1000_phy_igc.

Signed-off-by: Marjolaine Amate <marjolaine.amate@odyssee-systemes.fr>
2 years agonet: phy: ncsi: reslove the unaligned access issue
Jacky Chou [Mon, 5 Feb 2024 08:13:23 +0000 (16:13 +0800)] 
net: phy: ncsi: reslove the unaligned access issue

From the ethernet header is not on aligned, because the length
of the ethernet header is 14 bytes.
Therefore, unaligned access must be done here.

Signed-off-by: Jacky Chou <jacky_chou@aspeedtech.com>
2 years agonet: phy: ncsi: Correct the endian of the checksum
Jacky Chou [Mon, 5 Feb 2024 08:02:28 +0000 (16:02 +0800)] 
net: phy: ncsi: Correct the endian of the checksum

There is no need to perform the endian twice here.

Signed-off-by: Jacky Chou <jacky_chou@aspeedtech.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
2 years agonet: hifemac: make some functions static
Yang Xiwen [Mon, 22 Jan 2024 14:33:24 +0000 (22:33 +0800)] 
net: hifemac: make some functions static

They are not required to be global, make them static.

Signed-off-by: Yang Xiwen <forbidden405@outlook.com>
2 years agonet: hifemac: implement `net stats` needed ops
Yang Xiwen [Mon, 22 Jan 2024 14:33:23 +0000 (22:33 +0800)] 
net: hifemac: implement `net stats` needed ops

3 operations needed by `net stats` are implemented. New `net stats`
output some useful info.

Signed-off-by: Yang Xiwen <forbidden405@outlook.com>
2 years agonet: hifemac: register MDIO bus device for subnode
Yang Xiwen [Mon, 22 Jan 2024 14:33:22 +0000 (22:33 +0800)] 
net: hifemac: register MDIO bus device for subnode

register internal MDIO bus device if it is a subnode.

Signed-off-by: Yang Xiwen <forbidden405@outlook.com>
2 years agonet: hifemac: fix log reporting
Yang Xiwen [Mon, 22 Jan 2024 14:33:21 +0000 (22:33 +0800)] 
net: hifemac: fix log reporting

shrink the first argument of log_msg_ret(), add dev_xxx() functions for
error reporting.

Fixes: 9d8f78a2a79f7 ("net: add hifemac Ethernet driver for HiSilicon platform")
Signed-off-by: Yang Xiwen <forbidden405@outlook.com>
2 years agonet: hifemac_mdio: use log_msg_ret() correctly, report error by dev_err()
Yang Xiwen [Mon, 22 Jan 2024 14:33:20 +0000 (22:33 +0800)] 
net: hifemac_mdio: use log_msg_ret() correctly, report error by dev_err()

The initial commit used log_msg_ret() wrongly. Fix that by moving error
report to a separate dev_err() call and shrink the first argument of
log_msg_ret() to no more than 4 chars.

Fixes: 6b5c8d98e204 ("net: add hifemac_mdio MDIO bus driver for HiSilicon platform")
Signed-off-by: Yang Xiwen <forbidden405@outlook.com>
2 years agonet: phy: the NC-SI phy device do not require mdio bus
Jacky Chou [Mon, 15 Jan 2024 10:34:47 +0000 (18:34 +0800)] 
net: phy: the NC-SI phy device do not require mdio bus

As with fixed-link phy device, the NC-SI phy devive does not
require an mdio bus. So, a condition is added to check the
NC-SI phy id to avoid accessing the bus pointer that is NULL.

Signed-off-by: Jacky Chou <jacky_chou@aspeedtech.com>
2 years agonet: phy: Fix signed shift overflow
Eugeniu Rosca [Thu, 4 Jan 2024 04:26:23 +0000 (05:26 +0100)] 
net: phy: Fix signed shift overflow

Booting R-Car Gen3 arm64 U-Boot with CONFIG_UBSAN=y resulted in:

 =====================================================================
 UBSAN: Undefined behaviour in drivers/net/phy/phy.c:728:19
 left shift of 1 by 31 places cannot be represented in type 'int'
 =====================================================================

Fix it by appending the UL suffix to the numeric literal. While at it,
convert the type of "addr" variable from signed to unsigned, to protect
against shifting the numeric literal by a negative value (which would
lead to yet another undefined behavior).

Fixes: 1adb406b0141 ("phy: add phy_find_by_mask/phy_connect_dev")
Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com>
* Using U-suffix for integer is sufficient.
* ffs() of non-zero value cannot be 0. But addr being unsigned is
* preferable.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agonet: phy: broadcom: Configure LEDs on BCM54210E
Marek Vasut [Mon, 1 Jan 2024 21:07:47 +0000 (22:07 +0100)] 
net: phy: broadcom: Configure LEDs on BCM54210E

Configure LEDs on BCM54210E so they would blink on activity
and indicate link speed. Without this the LEDs are always on
if cable is plugged in.

Signed-off-by: Marek Vasut <marex@denx.de>
2 years agonet: phy: ncsi: fixed not nullify the pointers after free
Jacky Chou [Fri, 29 Dec 2023 01:45:55 +0000 (09:45 +0800)] 
net: phy: ncsi: fixed not nullify the pointers after free

The issue occurs the UAF (use-after-free) to cause double free
when do the realloc function for the pointers during the
reinitialization NC-SI process, and it will cause the memory
management occurs error.
So, nullify these pointers after free.

Signed-off-by: Jacky Chou <jacky_chou@aspeedtech.com>
2 years agoMerge https://source.denx.de/u-boot/custodians/u-boot-riscv
Tom Rini [Tue, 26 Mar 2024 14:00:21 +0000 (10:00 -0400)] 
Merge https://source.denx.de/u-boot/custodians/u-boot-riscv

- Fix RISC-V falcon mode booting issue

2 years agoclk: exynos: Add CMU_CORE and CMU_HSI for Exynos850
Sam Protsenko [Fri, 8 Mar 2024 02:18:58 +0000 (20:18 -0600)] 
clk: exynos: Add CMU_CORE and CMU_HSI for Exynos850

CMU_CORE generates clocks needed for eMMC enablement, and CMU_HSI
provides clocks for SD card and USB. Most of the code is copied from the
Linux kernel counterpart driver.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2 years agoclk: exynos: Fix incorrect clock lookup for non-top CMUs
Sam Protsenko [Fri, 8 Mar 2024 02:18:57 +0000 (20:18 -0600)] 
clk: exynos: Fix incorrect clock lookup for non-top CMUs

Samsung clock drivers usually define the clock indices that are unique
per one CMU, but are not unique across all CMUs. That is, clock indices
start from 1 for each CMU, as provided in CMU bindings header. The way
the clock lookup via clk_get_by_index() works at the moment is by using
clk_of_xlate_default(), which returns globally non-unique clock ids for
for clocks registered with Samsung CCF API, which leads to incorrect
clocks being obtained. One way to fix that would be to make all clock
ids defined in the bindings header unique, but it'd make it incompatible
with Linux kernel bindings header. A better way to solve this issue is
to calculate the global clock id and use it when registering a clock
with clk_dm() and when obtaining it, in a custom .of_xlate function.

This patch adds an API for such mapping calculation, introducing the
necessary modifications to CMU registering functions in Samsung CCF.
Exynos850 clock driver (the only driver that uses Samsung CCF at the
moment) is modified accordingly, as it uses the changed API. So the
clock lookup with clk-exynos850.c driver is also fixed here.

The global clock id is calculated from CMU id and local clock id in
SAMSUNG_TO_CLK_ID() macro like this:

    clk_id_global = cmu_id * 256 + clk_id_local

leaving a range of up to 256 clocks for each CMU. Then this mapping
macro is used in clk_dm() to register clocks using their global ids, and
in .of_xlate() to lookup the clock by its local id correctly. Because
.of_xlate() operation has a separate function for each CMU, it "knows"
the correct way of finding the correct clk_id_global by provided
clk_id_local.

Fixes: ff3e8b8c6c22 ("clk: exynos: Add Samsung clock framework")
Fixes: a36cc5e3ef4d ("clk: exynos: Add Exynos850 clock driver")
Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2 years agoclk: exynos: Don't expose prototypes for not used functions
Sam Protsenko [Fri, 8 Mar 2024 02:18:56 +0000 (20:18 -0600)] 
clk: exynos: Don't expose prototypes for not used functions

Samsung CCF is meant to be used from the clock drivers by calling the
CMU registration API, i.e.:
  - samsung_cmu_register_one() -- for top-level CMU
  - samsung_register_cmu() -- for the rest of CMUs

Functions for registering separate clocks is probably not going to be
very useful, and isn't used at the moment. Remove prototypes of those
functions to make the Samsung CCF interface more compact and clear.

No functional change.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2 years agoclk: exynos: Re-arrange clocks in Exynos850 CMU_TOP
Sam Protsenko [Fri, 8 Mar 2024 02:18:55 +0000 (20:18 -0600)] 
clk: exynos: Re-arrange clocks in Exynos850 CMU_TOP

Group CMU_TOP clocks to make it easier to add the support for more CMUs.
No functional change.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2 years agospl: riscv: opensbi: fix check of PAYLOAD_ARGS_ADDR
Randolph [Fri, 22 Mar 2024 11:36:37 +0000 (19:36 +0800)] 
spl: riscv: opensbi: fix check of PAYLOAD_ARGS_ADDR

When Falcon Mode is enabled on RISC-V, use CONFIG_VAL
to check PAYLOAD_ARGS_ADDR, not CONFIG_IS_ENABLED.

Fixes: 10c4ab898c25 ("spl: riscv: falcon: move fdt blob to specified address")
Signed-off-by: Randolph <randolph@andestech.com>
Tested-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2 years agoMerge tag 'v2024.04-rc5' into next
Tom Rini [Tue, 26 Mar 2024 02:15:47 +0000 (22:15 -0400)] 
Merge tag 'v2024.04-rc5' into next

Prepare v2024.04-rc5

2 years agoPrepare v2024.04-rc5 v2024.04-rc5
Tom Rini [Tue, 26 Mar 2024 01:55:55 +0000 (21:55 -0400)] 
Prepare v2024.04-rc5

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoarm64: zynqmp: Describe DisplayPort connector for Kria
Vishal Sagar [Thu, 21 Mar 2024 15:54:56 +0000 (16:54 +0100)] 
arm64: zynqmp: Describe DisplayPort connector for Kria

Add a device tree node to describe the DisplayPort connector, and
connect it to the DPSUB output.

The patch was tested on kv260-revB/rev2 and also kr260-revB.

Signed-off-by: Vishal Sagar <vishal.sagar@amd.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/c8738cb9951c73c6c00a4ce8d0025fb372372346.1711036494.git.michal.simek@amd.com
2 years agoarm64: zynqmp: dts: Add required properties for rs485 support for KD240
Manikanta Guntupalli [Tue, 19 Mar 2024 11:27:33 +0000 (12:27 +0100)] 
arm64: zynqmp: dts: Add required properties for rs485 support for KD240

Add "rts-gpios" and "linux,rs485-enabled-at-boot-time" properties
to uartps node to support RS485 on KD240.

Signed-off-by: Manikanta Guntupalli <manikanta.guntupalli@amd.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/56e4e135ad796afd1370c3dfa2643c143ba758ee.1710847646.git.michal.simek@amd.com
2 years agoarm64: zynqmp: Disable Tri-state for SDIO
Tejas Bhumkar [Thu, 21 Mar 2024 08:52:20 +0000 (14:22 +0530)] 
arm64: zynqmp: Disable Tri-state for SDIO

Since the zynqmp pinctrl driver now includes support for the
tri-state registers, ensure that the pins needing output-enable
are correctly configured for SOMs.

Currently, there is an issue with the detection of the MMC for
the SOM kv260, resulting in the following error:
ZynqMP> mmc dev 1
Card did not respond to voltage select! : -110

To address this problem, configure the SDIO pins for output-enable
to enable MMC detection.

Signed-off-by: Tejas Bhumkar <tejas.arvind.bhumkar@amd.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/20240321085220.2920792-2-tejas.arvind.bhumkar@amd.com
2 years agoarm64: zynqmp: Add bootcmd_usb4 variable
Shubhangi Shrikrushna Mahalle [Wed, 20 Mar 2024 11:24:16 +0000 (12:24 +0100)] 
arm64: zynqmp: Add bootcmd_usb4 variable

Add "bootcmd_usb4" variable to boot through usb4 device.

Signed-off-by: Shubhangi Shrikrushna Mahalle <shubhangi.shrikrushna-mahalle@amd.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/cb36fe6bd1fef540441e1d8c32636ae6f80357b4.1710933852.git.michal.simek@amd.com
2 years agoarm64: zynqmp: Also support JTAG as alternative boot mode
Michal Simek [Wed, 20 Mar 2024 11:18:35 +0000 (12:18 +0100)] 
arm64: zynqmp: Also support JTAG as alternative boot mode

if (reg >> BOOT_MODE_ALT_SHIFT) condition rules out alternative jtag boot
mode which is 0. When 0 was used origin(HW) boot mode was used instead.
That's why directly fill reg variable with requested boot mode and don't
let code to read value back. "else" part of code remain unchanged.

Reviewed-by: Sean Anderson <sean.anderson@linux.dev>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/ed51a9d51948ab939a53e0b9dc6c2d2546f97a4f.1710933505.git.michal.simek@amd.com
2 years agoMerge tag 'u-boot-at91-2024.07-a' of https://source.denx.de/u-boot/custodians/u-boot...
Tom Rini [Mon, 25 Mar 2024 12:18:20 +0000 (08:18 -0400)] 
Merge tag 'u-boot-at91-2024.07-a' of https://source.denx.de/u-boot/custodians/u-boot-at91 into next

First set of u-boot-at91 features for the 2024.07 cycle:
- This feature set includes a new board named sama7g54 Curiosity.

2 years agoMerge tag 'u-boot-amlogic-fixes-20240325' of https://source.denx.de/u-boot/custodians...
Tom Rini [Mon, 25 Mar 2024 12:18:53 +0000 (08:18 -0400)] 
Merge tag 'u-boot-amlogic-fixes-20240325' of https://source.denx.de/u-boot/custodians/u-boot-amlogic

- fix Ethernet and random MAC's on WeTek Hub/Play2
- fix buffer overflow in serial, mac & usid read

2 years agoboard: amlogic: fix buffler overflow in seria, mac & usid read
Neil Armstrong [Wed, 20 Mar 2024 08:46:11 +0000 (09:46 +0100)] 
board: amlogic: fix buffler overflow in seria, mac & usid read

While meson_sm_read_efuse() doesn't overflow, the string is not
zero terminated and env_set*() will buffer overflow and add random
characters to environment.

Acked-by: Viacheslav Bocharov <adeep@lexina.in>
Link: https://lore.kernel.org/r/20240320-u-boot-fix-p200-serial-v2-1-972be646a301@linaro.org
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2 years agoboard: amlogic: add meson_generate_serial_ethaddr fallback to p200
Christian Hewitt [Sun, 24 Mar 2024 15:19:05 +0000 (15:19 +0000)] 
board: amlogic: add meson_generate_serial_ethaddr fallback to p200

Add a fall-back method to generate ethaddr from CPU serial on p200 boards
if the MAC cannot be read from efuse. This prevents random MAC addresses
on the WeTek Hub/Play2 boards.

Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
Link: https://lore.kernel.org/r/20240324151905.3817732-3-christianshewitt@gmail.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2 years agoARM: dts: fix Ethernet on WeTek Hub/Play2
Christian Hewitt [Sun, 24 Mar 2024 15:19:04 +0000 (15:19 +0000)] 
ARM: dts: fix Ethernet on WeTek Hub/Play2

Placing the snps,reset content needed for Ethernet to probe in a common
uboot.dtsi results in the content not being used and broken Ethernet. Fix
this by creating two board specific dtsi files with the right content.

Fixes: 67d5128df950 ("ARM: dts: add support for WeTek Hub and WeTek Play2")
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
Link: https://lore.kernel.org/r/20240324151905.3817732-2-christianshewitt@gmail.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2 years agoMerge tag 'u-boot-imx-next-20240324' of https://gitlab.denx.de/u-boot/custodians...
Tom Rini [Sun, 24 Mar 2024 21:49:42 +0000 (17:49 -0400)] 
Merge tag 'u-boot-imx-next-20240324' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx into next

- Add ahab_commit command support.
- Add USB support for the imx93-phyboard-segin board.
- Add i.MX8MP PCIe support.
- Fix netboot environment on phycore_imx8mp.

2 years agoboard: phytec: phycore_imx8mp.env fix netboot issues
Yannic Moog [Fri, 22 Mar 2024 12:55:28 +0000 (13:55 +0100)] 
board: phytec: phycore_imx8mp.env fix netboot issues

The "run netargs" command should come later in the "netboot" command
order when using dhcp since it sets the server and client ip addresses.
The previous order led to misconfigured kernel boot params and thus
kernel panic when serverip was not manually set.
Further, following Linux FHS 3.0, change the nfsroot default directory
to /srv/nfs.

Fixes: 60f64bec414e ("board: phytec: phycore_imx8mp: Add fec support")
Signed-off-by: Yannic Moog <y.moog@phytec.de>
2 years agoconfigs: imx93-phyboard-segin: Add fastboot support
Mathieu Othacehe [Thu, 21 Mar 2024 14:45:41 +0000 (15:45 +0100)] 
configs: imx93-phyboard-segin: Add fastboot support

Enable the `fastboot` command.

Reviewed-by: Marek Vasut <marex@denx.de>
Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
2 years agoconfigs: imx93-phyboard-segin: Add USB support
Mathieu Othacehe [Thu, 21 Mar 2024 14:45:40 +0000 (15:45 +0100)] 
configs: imx93-phyboard-segin: Add USB support

Add USB support by enabling `usb` command and required USB drivers.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
2 years agoarm: dts: imx93-phyboard-segin: Add USB support
Mathieu Othacehe [Thu, 21 Mar 2024 14:45:39 +0000 (15:45 +0100)] 
arm: dts: imx93-phyboard-segin: Add USB support

Enable both usbotg1 and usbotg2 ports. Disable over-current as OC pins are
not connected to the SoC.

This addition to imx93-phyboard-segin-u-boot.dtsi is temporary,
until USB support is added to imx93-phyboard-segin.dts in Linux.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Marek Vasut <marex@denx.de>
2 years agoimx: ele_ahab: Add ahab_commit command support
Mathieu Othacehe [Thu, 21 Mar 2024 07:19:53 +0000 (08:19 +0100)] 
imx: ele_ahab: Add ahab_commit command support

This message is used to commit into the fuses any new SRK revocation and
FW version information that have been found into the NXP (ELE FW) and
OEM containers.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
2 years agoMAINTAINERS: Add entry for PCIe DWC IMX driver
Sumit Garg [Thu, 21 Mar 2024 14:55:07 +0000 (20:25 +0530)] 
MAINTAINERS: Add entry for PCIe DWC IMX driver

Add myself as maintainer for PCIe DWC IMX driver support.

Acked-by: Marek Vasut <marex@denx.de>
Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2 years agoimx8mp_venice_defconfig: Enable PCIe/NVMe support
Tim Harvey [Thu, 21 Mar 2024 14:55:06 +0000 (20:25 +0530)] 
imx8mp_venice_defconfig: Enable PCIe/NVMe support

Enable PCIe/NVMe support. Also, enable the reset, regmap and syscon
drivers which are a prerequisite for PCIe support.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
[SG: rebased to next branch tip]
Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2 years agoverdin-imx8mp_defconfig: Enable PCIe/NVMe support
Sumit Garg [Thu, 21 Mar 2024 14:55:05 +0000 (20:25 +0530)] 
verdin-imx8mp_defconfig: Enable PCIe/NVMe support

Enable PCIe/NVMe support. Also, enable the reset driver which
is a prerequisite for PCIe support.

Acked-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2 years agopcie_imx: Update header to describe it as a legacy driver
Sumit Garg [Thu, 21 Mar 2024 14:55:04 +0000 (20:25 +0530)] 
pcie_imx: Update header to describe it as a legacy driver

Since now we have the modern pcie_dw_imx.c driver for iMX SoCs,
encourage people to switch to that for any further new iMX SoC support
or even for the older iMX6 SoCs too.

Suggested-by: Peter Robinson <pbrobinson@gmail.com>
Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Reviewed-by: Marek Vasut <marex@denx.de>
2 years agopci: Add DW PCIe controller support for iMX8MP SoC
Sumit Garg [Thu, 21 Mar 2024 14:55:03 +0000 (20:25 +0530)] 
pci: Add DW PCIe controller support for iMX8MP SoC

pcie_imx doesn't seem to share any useful code for iMX8 SoC and it is
tied to quite old port of pcie_designware driver from Linux which
suffices only iMX6 specific needs.

But currently we have the common DWC specific bits which alligns pretty
well with DW PCIe controller on iMX8MP SoC. So lets reuse those common
bits instead as a new driver for iMX8 SoCs. It should be fairly easy to
add support for other iMX8 variants to this driver.

iMX8MP SoC also comes up with standalone PCIe PHY support, so hence we
can reuse the generic PHY infrastructure to power on PCIe PHY.

Tested-by: Tim Harvey <tharvey@gateworks.com> #imx8mp-venice*
Tested-by: Adam Ford <aford173@gmail.com> #imx8mp-beacon-kit
Reviewed-by: Marek Vasut <marex@denx.de>
Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2 years agophy: phy-imx8m-pcie: Add support for i.MX8M{M/P} PCIe PHY
Sumit Garg [Thu, 21 Mar 2024 14:55:02 +0000 (20:25 +0530)] 
phy: phy-imx8m-pcie: Add support for i.MX8M{M/P} PCIe PHY

Add initial support for i.MX8M{M/P} PCIe PHY. On i.MX8M{M/P} SoCs PCIe
PHY initialization moved to this standalone PHY driver.

Inspired from counterpart Linux kernel v6.8-rc3 driver:
drivers/phy/freescale/phy-fsl-imx8m-pcie.c. Use last Linux kernel driver
reference commit 7559e7572c03 ("phy: Explicitly include correct DT
includes").

Tested-by: Tim Harvey <tharvey@gateworks.com> #imx8mp-venice*
Tested-by: Adam Ford <aford173@gmail.com> #imx8mp-beacon-kit
Reviewed-by: Marek Vasut <marex@denx.de>
Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2 years agoimx8mp: power-domain: Expose high performance PLL clock
Sumit Garg [Thu, 21 Mar 2024 14:55:01 +0000 (20:25 +0530)] 
imx8mp: power-domain: Expose high performance PLL clock

Expose the high performance PLL as clock framework clock, so the
PCIe PHY can use it when there is no external refclock provided.

Inspired from counterpart Linux kernel v6.8-rc3 driver:
drivers/pmdomain/imx/imx8mp-blk-ctrl.c. Use last Linux kernel driver
reference commit 7476ddfd36ac ("pmdomain: imx8mp-blk-ctrl: Convert to
platform remove callback returning void").

Tested-by: Tim Harvey <tharvey@gateworks.com> #imx8mp-venice*
Tested-by: Adam Ford <aford173@gmail.com> #imx8mp-beacon-kit
Reviewed-by: Marek Vasut <marex@denx.de>
Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2 years agoimx8mp: power-domain: Add PCIe support
Sumit Garg [Thu, 21 Mar 2024 14:55:00 +0000 (20:25 +0530)] 
imx8mp: power-domain: Add PCIe support

Add support for GPCv2 power domains and clock handling for PCIe and
PCIe PHY.

Tested-by: Tim Harvey <tharvey@gateworks.com> #imx8mp-venice*
Tested-by: Adam Ford <aford173@gmail.com> #imx8mp-beacon-kit
Reviewed-by: Marek Vasut <marex@denx.de>
Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2 years agoreset: imx: Add support for i.MX8MP reset controller
Sumit Garg [Thu, 21 Mar 2024 14:54:59 +0000 (20:24 +0530)] 
reset: imx: Add support for i.MX8MP reset controller

Add support for i.MX8MP reset controller, it has same reset IP inside
as the other iMX7 and iMX8M variants but with different module layout.

Inspired from counterpart Linux kernel v6.8-rc3 driver:
drivers/reset/reset-imx7.c. Use last Linux kernel driver reference
commit bad8a8afe19f ("reset: Explicitly include correct DT includes").

Tested-by: Tim Harvey <tharvey@gateworks.com> #imx8mp-venice*
Tested-by: Adam Ford <aford173@gmail.com> #imx8mp-beacon-kit
Reviewed-by: Marek Vasut <marex@denx.de>
Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2 years agoreset: imx: Refactor driver to simplify function names
Sumit Garg [Thu, 21 Mar 2024 14:54:58 +0000 (20:24 +0530)] 
reset: imx: Refactor driver to simplify function names

imx7_reset_{deassert/assert}_imx* are a bit more confusing when compared
with imx*_reset_{deassert/assert}. So refactor driver to use function
names easier to understand. This shouldn't affect the functionality
though.

Suggested-by: Marek Vasut <marex@denx.de>
Reviewed-by: Marek Vasut <marex@denx.de>
Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2 years agoclk: imx8mp: Add support for PCIe clocks
Sumit Garg [Thu, 21 Mar 2024 14:54:57 +0000 (20:24 +0530)] 
clk: imx8mp: Add support for PCIe clocks

Add support for PCIe clocks required to enable PCIe support on
iMX8MP SoC.

Tested-by: Tim Harvey <tharvey@gateworks.com> #imx8mp-venice*
Tested-by: Adam Ford <aford173@gmail.com> #imx8mp-beacon-kit
Reviewed-by: Marek Vasut <marex@denx.de>
Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2 years agoremoteproc: uclass: Add methods to load firmware to rproc and boot rproc
MD Danish Anwar [Thu, 21 Mar 2024 10:28:19 +0000 (15:58 +0530)] 
remoteproc: uclass: Add methods to load firmware to rproc and boot rproc

Add APIs to set a firmware_name to a rproc and boot the rproc with the
same firmware.

Clients can call rproc_set_firmware() API to set firmware_name for a rproc
whereas rproc_boot() will load the firmware set by rproc_set_firmware() to
a buffer by calling request_firmware_into_buf(). rproc_boot() will then
load the firmware file to the remote processor and start the remote
processor.

Signed-off-by: MD Danish Anwar <danishanwar@ti.com>
Acked-by: Ravi Gunasekaran <r-gunasekaran@ti.com>
Reviewed-by: Roger Quadros <rogerq@kernel.org>
2 years agoremoteproc: k3-dsp: Extend support for C71x DSPs on J721S2 SoCs
Hari Nagalla [Tue, 12 Mar 2024 09:44:36 +0000 (15:14 +0530)] 
remoteproc: k3-dsp: Extend support for C71x DSPs on J721S2 SoCs

The K3 J721S2 SoCs have two C71x DSP subsystems in MAIN voltage domain,
and there are no C66x DSP subsystems on these SoCs. The C71x DSP subsystem
is a slighly updated version of the C71x DSP subsystem on J721e. The
C71x DSPs are 64 bit machine with fixed and floating point DSP
operations.

Extend support to the C71x DSPs with J721S2 compatible strings.

Signed-off-by: Hari Nagalla <hnagalla@ti.com>
Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
Signed-off-by: Apurva Nandan <a-nandan@ti.com>
2 years agoremoteproc: k3-r5: Extend support for R5F clusters on J721S2 SoCs
Hari Nagalla [Tue, 12 Mar 2024 09:44:35 +0000 (15:14 +0530)] 
remoteproc: k3-r5: Extend support for R5F clusters on J721S2 SoCs

The K3 J721S2 SoCs have three dual-core R5F subsystems, one in MCU
voltage domain and the other two in MAIN voltage domain. These R5F
clusters are similar to the R5F clusters in J7200 SoCs.

Compatible Info is updated to support J721S2 SoCs.

Signed-off-by: Hari Nagalla <hnagalla@ti.com>
Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
Signed-off-by: Apurva Nandan <a-nandan@ti.com>
2 years agoboard: toradex: verdin-am62_r5: Increase SPL_STACK_R_MALLOC_SIMPLE_LEN
Hiago De Franco [Wed, 20 Mar 2024 16:48:45 +0000 (13:48 -0300)] 
board: toradex: verdin-am62_r5: Increase SPL_STACK_R_MALLOC_SIMPLE_LEN

Increase the SPL_STACK_R_MALLOC_SIMPLE_LEN to 0x200000 to accommodate the
size of tispl.bin fit image. With the recent upgrade of ti-linux-firmware
from version v9.1.0 to v9.2.5, the size of tispl.bin fit image has
increased to 1.4MB, causing allocation errors in the R5 SPL:

```
alloc space exhausted
Could not get FIT buffer of 1325056 bytes
        check CONFIG_SPL_SYS_MALLOC_SIZE
```

Signed-off-by: Hiago De Franco <hiago.franco@toradex.com>
Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com>
2 years ago.mailmap entry for Masahisa Kojima
Heinrich Schuchardt [Mon, 18 Mar 2024 10:47:16 +0000 (11:47 +0100)] 
.mailmap entry for Masahisa Kojima

The Linaro mail address is not valid anymore.

Cc: kojima.masahisa@socionext.com
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Masahisa Kojima <kojima.masahisa@socionext.com>
2 years agoarm: dts: k3-am625-verdin-r5: Change CPU frequency to 800MHz
Joao Paulo Goncalves [Tue, 19 Mar 2024 14:04:27 +0000 (11:04 -0300)] 
arm: dts: k3-am625-verdin-r5: Change CPU frequency to 800MHz

The lowest speed grade of Toradex AM62 SoMs is K speed, resulting in a
max value of 800MHz for the CPU operating frequency. A solution with
runtime selection of the CPU frequency is already planned to avoid these
kinds of problems in the future.

Fixes: 8fb8a6d49977 ("arm: dts: k3-am625-verdin-r5:Change CPU frequency to 1000MHz")
Signed-off-by: Joao Paulo Goncalves <joao.goncalves@toradex.com>
2 years agoclk: clk-imx8qm: Add LPUART IPG entries
Fabio Estevam [Fri, 8 Mar 2024 20:13:16 +0000 (17:13 -0300)] 
clk: clk-imx8qm: Add LPUART IPG entries

Since commit cc7df0b9e8bc ("serial: lpuart: Enable IPG clock")
the apalis-imx8qm board no longer boots.

The reason is that the imx8qm clock driver does not handle the
LPUART IPG clocks inside get_rate(), set_rate() and enable() functions.

Fix the boot regression by adding the LPUART IPG entries.

Fixes: cc7df0b9e8bc ("serial: lpuart: Enable IPG clock")
Reported-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2 years agoclk: clk-imx8qxp: Add LPUART IPG entries
Fabio Estevam [Fri, 8 Mar 2024 20:13:15 +0000 (17:13 -0300)] 
clk: clk-imx8qxp: Add LPUART IPG entries

Since commit cc7df0b9e8bc ("serial: lpuart: Enable IPG clock")
the colibri-imx8qxp board no longer boots.

The reason is that the imx8qxp clock driver does not handle the
LPUART IPG clocks inside get_rate(), set_rate() and enable() functions.

Fix the boot regression by adding the LPUART IPG entries.

Fixes: cc7df0b9e8bc ("serial: lpuart: Enable IPG clock")
Reported-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Tested-by: Hiago De Franco <hiago.franco@toradex.com> # Toradex Colibri iMX8X
Acked-by: Sean Anderson <seanga2@gmail.com>
2 years agoarm64: zynqmp: Do not describe u-boot.itb if SPL is disabled
Michal Simek [Fri, 23 Feb 2024 16:18:42 +0000 (17:18 +0100)] 
arm64: zynqmp: Do not describe u-boot.itb if SPL is disabled

There is no reason to describe u-boot.itb on system without SPL. Pretty
much this is cover all systems which are using only boot.bin which contains
all images inside.

Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/561f9d0ee96ebb6cd674042f269f280ab68fbbac.1708705118.git.michal.simek@amd.com
2 years agoarm64: zynqmp: Do not setup default SPL options without SPL
Michal Simek [Tue, 12 Mar 2024 15:51:21 +0000 (16:51 +0100)] 
arm64: zynqmp: Do not setup default SPL options without SPL

mach Kconfig file select some options independently of if SPL is actually
enabled. It ends up in situation that SPL is disabled but symbols are still
present in .config. That's why add SPL dependency for them but also group
them with other SPL options in ARCH_ZYNQMP fragment with using imply
option. This should ensure the same behavior as default y.

Also fixed SPL_ZYNQMP_PSU_INIT_ENABLED for the same.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/8dc4b799d36f963a3e1ebb5b24793632dc360b61.1710258674.git.michal.simek@amd.com
2 years agoxilinx: versal-net: Add support for saving env based on bootmode
Venkatesh Yadav Abbarapu [Tue, 12 Mar 2024 11:34:21 +0000 (17:04 +0530)] 
xilinx: versal-net: Add support for saving env based on bootmode

Enable saving variables to MMC(FAT) and SPI based on primary
bootmode. If bootmode is JTAG, dont save env anywhere(NOWHERE).

Enable ENV_FAT_DEVICE_AND_PART="0:auto" for versal-net platform as well.

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Link: https://lore.kernel.org/r/20240312113421.7394-1-venkatesh.abbarapu@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
2 years agoiommu: qcom-smmu: fix debugging
Caleb Connolly [Wed, 20 Mar 2024 14:30:51 +0000 (14:30 +0000)] 
iommu: qcom-smmu: fix debugging

The priv struct was wrong in dump_boot_mappings(). Causing errors when
compiling with -DDEBUG. Fix this.

Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Link: https://lore.kernel.org/r/20240320-b4-qcom-usb-v4-5-41be480172e1@linaro.org
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2 years agousb: gadget: UMS: support multiple sector sizes
Caleb Connolly [Wed, 20 Mar 2024 14:30:50 +0000 (14:30 +0000)] 
usb: gadget: UMS: support multiple sector sizes

UFS storage often uses a 4096-byte sector size, add support for dynamic
sector sizes based loosely on the Linux implementation.

Support for dynamic sector sizes changes the types used in some
divisions, resulting in the compiler attempting to use
libgcc helpers (__aeabi_ldivmod).
Replace these divisions with calls to lldiv() to handle this correctly.

Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Link: https://lore.kernel.org/r/20240320-b4-qcom-usb-v4-4-41be480172e1@linaro.org
[mkorpershoek: squashed the lldiv() fix from caleb]
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2 years agousb: gadget: CDC ACM: call usb_gadget_initialize
Caleb Connolly [Wed, 20 Mar 2024 14:30:49 +0000 (14:30 +0000)] 
usb: gadget: CDC ACM: call usb_gadget_initialize

To actually use the gadget the peripheral driver must be probed and we
must call g_dnl_clear_detach(). Otherwise acm_stdio_start() will always
fail to find a UDC on DT platforms.

Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Link: https://lore.kernel.org/r/20240320-b4-qcom-usb-v4-3-41be480172e1@linaro.org
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2 years agoMerge tag 'efi-2024-04-rc5-2' of https://source.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Thu, 21 Mar 2024 12:35:23 +0000 (08:35 -0400)] 
Merge tag 'efi-2024-04-rc5-2' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request efi-2024-04-rc5-2

Documentation:

* patman: Properly document the patchwork_url setting
* doc: man-page for if
* colibri-imx8x, apalis-imx8: update board documentation

UEFI:

* correct handling of EFI binary return code
* don't show usage help if EFI binary fails.
* correct error handling for bootefi selftest command

2 years agoMerge tag 'efi-next-20240321' of https://source.denx.de/u-boot/custodians/u-boot...
Tom Rini [Thu, 21 Mar 2024 12:34:41 +0000 (08:34 -0400)] 
Merge tag 'efi-next-20240321' of https://source.denx.de/u-boot/custodians/u-boot-efi into next

Pull request efi-next-20240321

Documentation:

* Avoid short reference link names in device-tree documentation.

UEFI/Video:

* Support code page 437 code points 1 - 31 used by GRUB

2 years agousb: dwc3-generic: implement Qualcomm wrapper
Caleb Connolly [Wed, 20 Mar 2024 14:30:47 +0000 (14:30 +0000)] 
usb: dwc3-generic: implement Qualcomm wrapper

The Qualcomm specific dwc3 wrapper isn't hugely complicated, implemented
the missing initialisation for host and gadget mode.

Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Link: https://lore.kernel.org/r/20240320-b4-qcom-usb-v4-1-41be480172e1@linaro.org
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2 years agopatman: Properly document the patchwork_url setting
Douglas Anderson [Mon, 11 Mar 2024 21:02:45 +0000 (14:02 -0700)] 
patman: Properly document the patchwork_url setting

The "Series-patchwork-url:" tag description says that it overrides the
settings file but doesn't specify the name of the setting. Elsewhere
in the documentation about the "useful" settings we see a setting that
sounds promising called "patchwork_server" that's actually not a valid
setting. It should be "patchwork_url".

Fix these problems so the doc is right and more useful.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
2 years agodoc: typo Synopis
Heinrich Schuchardt [Sat, 16 Mar 2024 10:09:36 +0000 (11:09 +0100)] 
doc: typo Synopis

%s/Synopis/Synopsis/g

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>