]> git.ipfire.org Git - thirdparty/u-boot.git/log
thirdparty/u-boot.git
3 years agopower: pmic: Add NXP PCA9451A PMIC support
Ye Li [Fri, 3 Feb 2023 10:24:36 +0000 (18:24 +0800)] 
power: pmic: Add NXP PCA9451A PMIC support

PCA9451A uses similar BUCKs and LDO regulators as PCA9450B/C but
has LDO2 and LDO3 removed. So reuse pca9450 PMIC and regulator driver
and add new type for PCA9451A.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Marek Vasut <marex@denx.de>
3 years agoimx: spl_imx_romapi: Get and print boot stage
Ye Li [Fri, 3 Feb 2023 10:21:47 +0000 (18:21 +0800)] 
imx: spl_imx_romapi: Get and print boot stage

Get and print boot stage through ROM API in SPL

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
3 years agomx6sabresd: Convert to DM_PMIC
Fabio Estevam [Thu, 16 Feb 2023 10:08:49 +0000 (07:08 -0300)] 
mx6sabresd: Convert to DM_PMIC

The usage of DM_PMIC is preferred, so convert to it.

This also brings the benefit of causing a significant amount
of code removal.

Signed-off-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
3 years agomx6sabreauto: Convert to DM_PMIC
Fabio Estevam [Thu, 16 Feb 2023 10:08:48 +0000 (07:08 -0300)] 
mx6sabreauto: Convert to DM_PMIC

The usage of DM_PMIC is preferred, so convert to it.

This also brings the benefit of causing a significant amount
of code removal.

Signed-off-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
3 years agomx6sxsabreauto: Remove myself from MAINTAINERS
Fabio Estevam [Wed, 15 Feb 2023 18:32:54 +0000 (15:32 -0300)] 
mx6sxsabreauto: Remove myself from MAINTAINERS

I don't have access to the mx6sxsabreauto board, so remove myself
from the MAINTAINERS entry and add Peng instead.

Signed-off-by: Fabio Estevam <festevam@denx.de>
Acked-by: Peng Fan <peng.fan@nxp.com>
3 years agopico-imx6: Pass the mmc alias to fix boot regression
Fabio Estevam [Wed, 15 Feb 2023 18:24:44 +0000 (15:24 -0300)] 
pico-imx6: Pass the mmc alias to fix boot regression

Originally, the mmc aliases node was present in imx6qdl-pico.dtsi.

After the sync with Linux in commit d0399a46e7cd ("imx6dl/imx6qdl:
synchronise device trees with linux"), the aliases node is gone as
the upstream version does not have it.

This causes a boot regression in which the eMMC card cannot be found anymore.

Fix it by passing the alias node in the u-boot.dtsi file to
restore the original behaviour where the eMMC (esdhc3) was
mapped to mmc0.

Fixes: d0399a46e7cd ("imx6dl/imx6qdl: synchronise device trees with linux")
Signed-off-by: Fabio Estevam <festevam@denx.de>
3 years agopico-imx6: Add DM_SERIAL support
Fabio Estevam [Wed, 15 Feb 2023 18:24:43 +0000 (15:24 -0300)] 
pico-imx6: Add DM_SERIAL support

The conversion to DM_SERIAL is mandatory, so add support
for it.

Signed-off-by: Fabio Estevam <festevam@denx.de>
3 years agoudoo: Add DM_SERIAL support
Fabio Estevam [Wed, 15 Feb 2023 17:46:33 +0000 (14:46 -0300)] 
udoo: Add DM_SERIAL support

The conversion to DM_SERIAL is mandatory, so add support
for it.

Signed-off-by: Fabio Estevam <festevam@denx.de>
3 years agomx6sxsabresd: Add DM_SERIAL support
Fabio Estevam [Wed, 15 Feb 2023 17:08:56 +0000 (14:08 -0300)] 
mx6sxsabresd: Add DM_SERIAL support

The conversion to DM_SERIAL is mandatory, so add support
for it.

Signed-off-by: Fabio Estevam <festevam@denx.de>
3 years agomx51evk: Add DM_SERIAL support
Fabio Estevam [Wed, 15 Feb 2023 14:48:49 +0000 (11:48 -0300)] 
mx51evk: Add DM_SERIAL support

The conversion to DM_SERIAL is mandatory, so add support
for it.

Signed-off-by: Fabio Estevam <festevam@denx.de>
3 years agomx53loco: Add DM_I2C support
Fabio Estevam [Wed, 15 Feb 2023 14:41:51 +0000 (11:41 -0300)] 
mx53loco: Add DM_I2C support

The conversion to DM_I2C is mandatory, so add support
for it.

Signed-off-by: Fabio Estevam <festevam@denx.de>
3 years agomx53loco: Add DM_SERIAL support
Fabio Estevam [Wed, 15 Feb 2023 14:41:50 +0000 (11:41 -0300)] 
mx53loco: Add DM_SERIAL support

The conversion to DM_SERIAL is mandatory, so add support
for it.

Signed-off-by: Fabio Estevam <festevam@denx.de>
3 years agoimx: ele_ahab: Remove OEM Secure World Closed print
Ye Li [Mon, 30 Jan 2023 10:39:55 +0000 (18:39 +0800)] 
imx: ele_ahab: Remove OEM Secure World Closed print

The OEM Secure World Closed is not a valid lifecycle on iMX8ULP/iMX9.
So remove it from lifecycle print.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
3 years agoimx: ele_ahab: confirm lifecycle before closing the part
Ye Li [Mon, 30 Jan 2023 10:39:54 +0000 (18:39 +0800)] 
imx: ele_ahab: confirm lifecycle before closing the part

Before moving the lifecycle to OEM closed, confirm the lifecycle is
OEM open, otherwise cancel to move forward the lifecycle.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
3 years agomisc: sentinel: s400_api: Use new command request definitions
Ye Li [Mon, 30 Jan 2023 10:39:53 +0000 (18:39 +0800)] 
misc: sentinel: s400_api: Use new command request definitions

Remove legacy command definitions, change to use new ELE_xxx command
request.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
3 years agoimx: ahab: Move imx9 and imx8ulp AHAB support together
Ye Li [Mon, 30 Jan 2023 10:39:52 +0000 (18:39 +0800)] 
imx: ahab: Move imx9 and imx8ulp AHAB support together

Use common file ele_ahab.c for i.MX9 and iMX8ULP AHAB support, since
both of them use same sentinel ELE APIs

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
3 years agoimx93: ahab: Get and decode AHAB events
Ye Li [Mon, 30 Jan 2023 10:39:51 +0000 (18:39 +0800)] 
imx93: ahab: Get and decode AHAB events

For ahab_status command, support to get and decode AHAB events

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
3 years agomisc: sentinel: s400_api: Add get_events API
Ye Li [Mon, 30 Jan 2023 10:39:50 +0000 (18:39 +0800)] 
misc: sentinel: s400_api: Add get_events API

Add get_events API to retrieve any singular events that has occurred
since the FW has started from sentinel

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
3 years agoimx8ulp_evk: Clear data at fdt_addr_r before booting kernel
Ye Li [Tue, 31 Jan 2023 08:42:34 +0000 (16:42 +0800)] 
imx8ulp_evk: Clear data at fdt_addr_r before booting kernel

When using dual boot mode, the DDR won't be reset when APD power off
or reboot. It has possibility that obsolete fdt data existing on
fdt_addr_r address. Then even nothing in EFI partitions, the distro boot
still continue to parse fdt and get uboot crashed.

Clear the data at fdt_addr_r, so the fdt header check in above case
will not pass.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
3 years agoimx8ulp_evk: disable overflow of port0 for LPAV
Peng Fan [Tue, 31 Jan 2023 08:42:33 +0000 (16:42 +0800)] 
imx8ulp_evk: disable overflow of port0 for LPAV

Bit0: Port 0 behavior when bandwidth maximized. Set to 1 to allow overflow

With overflow set, we see some issue that A35 may not able to get enough
bandwidth and A35 will report hrtimer takes too much time, workqueue
lockup. With overflow cleared, the issues are gone.

Reviewed-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
3 years agoimx8ulp_evk: Update DDR ports arbitration for DCNANO underrun
Ye Li [Tue, 31 Jan 2023 08:42:32 +0000 (16:42 +0800)] 
imx8ulp_evk: Update DDR ports arbitration for DCNANO underrun

To resolve DCNANO underrun issue, change the DDR Port 0 arbitration
from round robin fashion to fixed priority level 1, while other ports
are not assigned any priority, so they will be serviced in round robin
fashion if there is no active request from Port 0.

Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
3 years agoimx8ulp_evk: Change to use DDR driver
Ye Li [Tue, 31 Jan 2023 08:42:31 +0000 (16:42 +0800)] 
imx8ulp_evk: Change to use DDR driver

Remove the DDR initialization codes from board and enable the iMX8ULP
DDR driver.

Signed-off-by: Ye Li <ye.li@nxp.com>
3 years agoimx8ulp_evk: Update the DDR timing
Jacky Bai [Tue, 31 Jan 2023 08:42:30 +0000 (16:42 +0800)] 
imx8ulp_evk: Update the DDR timing

Update the dram timing to support PLL bypass mode
for F1.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
3 years agoddr: imx: Update the ddr init flow on imx8ulp
Jacky Bai [Tue, 31 Jan 2023 08:42:29 +0000 (16:42 +0800)] 
ddr: imx: Update the ddr init flow on imx8ulp

Update the ddr init flow to support LPDDR3 and PLL bypass mode.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
3 years agomisc: fuse: Lock 8ULP ECC-protected fuse when programming
Ye Li [Tue, 31 Jan 2023 08:42:28 +0000 (16:42 +0800)] 
misc: fuse: Lock 8ULP ECC-protected fuse when programming

The ECC fuse on 8ULP can't be written twice. If any user did it, the
ECC value would be wrong then cause accessing problem to the fuse.
The patch will lock the ECC fuse word to avoid this problem.
For iMX9, the OTP controller automatically prevents an ECC fuse word to
be written twice. So it does not need the setting.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
3 years agomisc: fuse: Update fuse mapping for 8ULP S400 API
Ye Li [Tue, 31 Jan 2023 08:42:27 +0000 (16:42 +0800)] 
misc: fuse: Update fuse mapping for 8ULP S400 API

Since new 8ULP A1 S400 FW (v0.0.8-e329b760) can support to read
more fuses: like PMU trim, Test flow/USB, GP1-5, GP8-10. Update
the u-boot driver for the new mapping.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Alice Guo <alice.guo@nxp.com>
3 years agoimx: sentinel: Update S400 API get info message structure
Ye Li [Tue, 31 Jan 2023 08:42:26 +0000 (16:42 +0800)] 
imx: sentinel: Update S400 API get info message structure

From Sentinel FW v0.0.9-9df0f503, the response message of get info API
is changed to add OEM SRK and some states (IMEM, CSAL, TRNG).
With old structure, we get failure from sentinel due to the buffer
size can't fit with new response message. So update the API structure
to fix the issue.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
3 years agoimx: imx8ulp: Update clocks to meet max rate restrictions
Ye Li [Tue, 31 Jan 2023 08:42:25 +0000 (16:42 +0800)] 
imx: imx8ulp: Update clocks to meet max rate restrictions

Update PLL3/PLL4 PFD and USDHC clocks to meet maximum frequency
restrictions. Detail clock rate changes in the patch:

PLL3 PFD2: 389M -> 324M
PLL3 PFD3: 336M -> 389M
PLL3 PFD3: DIV1 336M -> 389M (OD), 194M (ND/LD)
PLL3 PFD3: DIV2 336M -> 194M (OD), 97M (ND/LD)

PLL4 PFD0: 792M -> 594M
PLL4 PFD2: 792M -> 316.8M

NIC_AP:    96M (ND) -> 192M,  48M (LD) -> 96M
NIC_LPAV:  198 (ND) -> 192M,  99M (LD) -> 96M

USDHC0:    PLL3 PFD3 DIV1, 389M (OD), 194M (ND/LD)
USDHC1:    PLL3 PFD3 DIV2, 194M (OD), 97M (ND/LD)
USDHC2:    PLL3 PFD3 DIV2, 194M (OD), 97M (ND/LD)

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
3 years agoimx: imx8ulp: Configure XRDC PDAC and MSC for DBD owner=S400 only
Ye Li [Tue, 31 Jan 2023 08:42:24 +0000 (16:42 +0800)] 
imx: imx8ulp: Configure XRDC PDAC and MSC for DBD owner=S400 only

This patch is used to support DBD owner fuse changed to S400 only.
The XRDC PDAC2 for LPAV pbridge5 and MSC1/2/3 for GPIO and LPAV are not
configured by S400 default setting.  So these PDAC and MSC are invalid,
only DBD owner can access the corresponding resources.

We have to configure necessary PDAC and MSC for SPL before DDR
initialization.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
3 years agoimx: imx8ulp: upower: make code cleaner
Peng Fan [Tue, 31 Jan 2023 08:42:23 +0000 (16:42 +0800)] 
imx: imx8ulp: upower: make code cleaner

To clean the upower codes by aligning codes format, check err_code
and add detail bits list for the memory magic number

Reviewed-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
3 years agoimx: imx8ulp: upower: replace magic number with macro
Peng Fan [Tue, 31 Jan 2023 08:42:22 +0000 (16:42 +0800)] 
imx: imx8ulp: upower: replace magic number with macro

The swton indicates the logic switch, magic number 0xfff80 is hard
to understand, so use macro.

Some board design may not have MIPI_CSI voltage input connected per
data sheet. In that case, the upower power on API may dead loop mu to wait
response, however there is no response. So remove MIPI_CSI here, let
linux power domain driver to runtime enable the power domain.

Reviewed-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
3 years agoimx: imx8ulp: Clear dividers in PLL3DIV_PFD registers
Ye Li [Tue, 31 Jan 2023 08:42:21 +0000 (16:42 +0800)] 
imx: imx8ulp: Clear dividers in PLL3DIV_PFD registers

At present, in cgc1_pll3_init we don't set the pll3pfd div values,
just use the default 0. But on A1 part, ROM will set PLL3 pfd1div2
to 1 and pfd2div1 to 3.
This finally causes some clocks' rate decreased, for example USDHC.
So clear the PLL3DIV_PFD dividers to get correct rate.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
3 years agoimx: imx8ulp: Reconfigure MRC3 for SRAM0 access
Ye Li [Tue, 31 Jan 2023 08:42:20 +0000 (16:42 +0800)] 
imx: imx8ulp: Reconfigure MRC3 for SRAM0 access

Some space in SRAM0 will be protected by S400 to allow RX SecPriv mode
access only for boot purpose. Since SW will reuse the SRAM0 as SCMI
buffer and SPL container loading buffer, need to reconfigure MRC3.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
3 years agoddr: imx8ulp: Change DRAM timing save area to 0x20055000
Ye Li [Tue, 31 Jan 2023 08:42:19 +0000 (16:42 +0800)] 
ddr: imx8ulp: Change DRAM timing save area to 0x20055000

To align with ARM trusted firmware's change, adjust DRAM timing
save area to new position 0x20055000. So we can release the space
since 0x2006c000 for the NOBITS region of ARM trusted firmware

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Jacky Bai <ping.bai@nxp.com>
3 years agoimx: imx8ulp: configure XRDC for DRAM access from S400
Ye Li [Tue, 31 Jan 2023 08:42:18 +0000 (16:42 +0800)] 
imx: imx8ulp: configure XRDC for DRAM access from S400

Need to add DRAM access permission for S400, as S400 needs to access
it When SPL calls image authentication

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
3 years agoimx: imx8ulp: Adjust handshake to sync TRDC and XRDC completion
Ye Li [Tue, 31 Jan 2023 08:42:17 +0000 (16:42 +0800)] 
imx: imx8ulp: Adjust handshake to sync TRDC and XRDC completion

To fit the DBD_EN fused part, we re-design the TRDC and XRDC assignment.
M33 will be the TRDC owner and needs to configure TRDC. A35 is the
XRDC owner, ATF will configure XRDC.

The handshake between U-boot and M33 image is used to sync TRDC and
XRDC configuration completion. Once the handshake is done, A35 and M33
can access the allowed resources in others domain.

The handshake is needed when M33 is booted or DBD_EN fused, because both
cases will enable the TRDC. If handshake is timeout, the boot will hang.
We use SIM GPR0 to pass the info from SPL to u-boot, because before the
handshake, u-boot can't access SEC SIM and FSB.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Jacky Bai <ping.bai@nxp.com>
3 years agoimx: imx8ulp: Remove the TRDC configure from A35
Ye Li [Tue, 31 Jan 2023 08:42:16 +0000 (16:42 +0800)] 
imx: imx8ulp: Remove the TRDC configure from A35

As M33 is responsible for TRDC configuration, the settings for A35
nonsecure world access and DMA0 access are moved to M33 image.
So remove the codes to release TRDC and configure it. Just keep
the configurations for reference.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Jacky Bai <ping.bai@nxp.com>
3 years agoimx: imx8ulp: Set XRDC MRC4/5 for access DDR from APD
Ye Li [Tue, 31 Jan 2023 08:42:15 +0000 (16:42 +0800)] 
imx: imx8ulp: Set XRDC MRC4/5 for access DDR from APD

iMX8ULP A1 S400 ROM removes the setting for MRC4/5. So we have to set
them in SPL to allow access to DDR from A35 and APD PER masters

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
3 years agoimx: imx8ulp: Limit the eMMC ROM API workaround to A0.1 part
Ye Li [Tue, 31 Jan 2023 08:42:14 +0000 (16:42 +0800)] 
imx: imx8ulp: Limit the eMMC ROM API workaround to A0.1 part

Since A1 ROM has fixed the ROM API eMMC issue, we should only use
the workaround for A0.1 part. Add a SOC revision check.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
3 years agoimx: imx8ulp: Get chip revision from Sentinel
Ye Li [Tue, 31 Jan 2023 08:42:13 +0000 (16:42 +0800)] 
imx: imx8ulp: Get chip revision from Sentinel

In both SPL and u-boot, after probing the S400 MU, get the chip revision,
lifecycle and UID from Sentinel.
Update get_cpu_rev to use the chip revision not hard coded it for A0

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
3 years agoimx: imx8ulp: Fix MU device probe failure
Ye Li [Tue, 31 Jan 2023 08:42:12 +0000 (16:42 +0800)] 
imx: imx8ulp: Fix MU device probe failure

Since latest DTS has added multiple MU nodes, using compatible
string to find the device node is not proper. It finds the first
node with the compatible string matched even the node is disabled.

Signed-off-by: Ye Li <ye.li@nxp.com>
3 years agoinclude: configs: am65x_evm: Change to using .env
Nikhil M Jain [Tue, 21 Mar 2023 12:53:30 +0000 (18:23 +0530)] 
include: configs: am65x_evm: Change to using .env

Move to using .env file for setting up environment variables for am65x.

Signed-off-by: Nikhil M Jain <n-jain1@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
3 years agoboard: ti: am62x: am62x: Include K3 common .env files
Nikhil M Jain [Mon, 20 Mar 2023 17:23:56 +0000 (22:53 +0530)] 
board: ti: am62x: am62x: Include K3 common .env files

Include ti_armv7_common.env and ti/mmc.env, which includes' K3  common
environment variables used across different K3 boards.

This patch depends on
https://lore.kernel.org/all/20230315052745.110502-1-n-francis@ti.com/

Signed-off-by: Nikhil M Jain <n-jain1@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
3 years agoinclude: configs: am62ax: Change to using .env
Nikhil M Jain [Mon, 20 Mar 2023 17:02:08 +0000 (22:32 +0530)] 
include: configs: am62ax: Change to using .env

Move to using .env file for setting up environment variables for am62ax.

This patch depends on
https://lore.kernel.org/all/20230315052745.110502-1-n-francis@ti.com/

Signed-off-by: Nikhil M Jain <n-jain1@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
3 years agoconfigs: am62ax: enable secure device configs by default
Bryan Brattlof [Fri, 17 Mar 2023 23:37:11 +0000 (18:37 -0500)] 
configs: am62ax: enable secure device configs by default

TI's security enforcing SoCs will authenticate each binary it loads by
comparing it's signature with keys etched into the SoC during the boot
up process. The am62ax family of SoCs by default will have some level of
security enforcement checking. To keep things as simple as possible,
enable the CONFIG_TI_SECURE_DEVICE options by default so all levels of
secure SoCs will work out of the box

Enable the CONFIG_TI_SECURE_DEVICE by default

Signed-off-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Kamlesh Gurudasani <kamlesh@ti.com>
3 years agoinclude: configs: j721e_evm: Change to using .env
Neha Malcom Francis [Wed, 15 Mar 2023 05:27:45 +0000 (10:57 +0530)] 
include: configs: j721e_evm: Change to using .env

Move to using .env file for setting up environment variables for J721E
and J7200.

Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
3 years agoinclude: configs: j721s2_evm: Change to using .env
Neha Malcom Francis [Wed, 15 Mar 2023 05:27:44 +0000 (10:57 +0530)] 
include: configs: j721s2_evm: Change to using .env

Move to using .env file for setting up environment variables for J721S2.

Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
3 years agoinclude: environment: ti: Use .env for environment variables
Neha Malcom Francis [Wed, 15 Mar 2023 05:27:43 +0000 (10:57 +0530)] 
include: environment: ti: Use .env for environment variables

Add K3 common environment variables to .env. We retain the old-style C
environment .h files to maintain compatibility with other K3 boards that
have not moved to using .env yet.

Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
3 years agompc83xx: Remove CONFIG_SYS_GPIO{1/2}_PRELIM and related
Christophe Leroy [Tue, 14 Mar 2023 22:24:45 +0000 (23:24 +0100)] 
mpc83xx: Remove CONFIG_SYS_GPIO{1/2}_PRELIM and related

Last use of CONFIG_SYS_GPIO1_PRELIM was removed by
commit fae2ea5951 ("ppc: Remove MPC8349EMDS board and ARCH_MPC8349
support").

Last use of CONFIG_SYS_GPIO2_PRELIM was removed even before by
commit 6843862342 ("ppc: Remove caddy2 / vme8349 boards")

Those two items were removed from whitelist by
commit 8cca60a2cb ("Kconfig: Remove some symbols from the whitelist")

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Fixes: fae2ea5951 ("ppc: Remove MPC8349EMDS board and ARCH_MPC8349 support")
3 years agompc83xx: Remove stale CONFIG_SYS_LBLAWBAR{4/5/6/7}_PRELIM
Christophe Leroy [Tue, 14 Mar 2023 22:24:44 +0000 (23:24 +0100)] 
mpc83xx: Remove stale CONFIG_SYS_LBLAWBAR{4/5/6/7}_PRELIM

Last (incorrect) use of those CONFIG items was removed by
commit 9fd9abedcc ("TQM834x: remove defines causing gcc4.4 warnings")

Those items are invalid and should have been removed at the
same time because lblaw[] has only 4 elements.

And they were removed from the whitelist by
commit 9c5df7a2a9 ("mpc83xx: Migrate LBLAW_* to Kconfig")

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Fixes: 9fd9abedcc ("TQM834x: remove defines causing gcc4.4 warnings")
3 years agoapple_m1_defconfig: Bump CONFIG_LMB_MAX_REGIONS to 64
Janne Grunau [Mon, 13 Mar 2023 13:54:32 +0000 (14:54 +0100)] 
apple_m1_defconfig: Bump CONFIG_LMB_MAX_REGIONS to 64

Apple silicon SoCs have numerous embedded co-processors with pre-loaded
firmware. The co-processors text and data sections need to be mapped via
DART iommus controlled by the main processor. Those sections are
exported as reserved-memory. Bump CONFIG_LMB_MAX_REGIONS from 8 to 64 to
deal with the large amount of reserved-memory regions.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
3 years agopci: apple: Initialize only enabled ports
Janne Grunau [Mon, 13 Mar 2023 13:46:11 +0000 (14:46 +0100)] 
pci: apple: Initialize only enabled ports

The Linux devicetrees for Apple silicon devices are after review
feedback switching from deleting unused PCIe ports to disabling them.

Link: https://lore.kernel.org/asahi/1ea2107a-bb86-8c22-0bbc-82c453ab08ce@linaro.org/
Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
3 years agophy: ti: j721e-wiz: Add support to enable LN23 Type-C swap
Sinthu Raja [Mon, 13 Mar 2023 12:42:24 +0000 (18:12 +0530)] 
phy: ti: j721e-wiz: Add support to enable LN23 Type-C swap

The WIZ acts as a wrapper for SerDes and has Lanes 0 and 2 reserved
for USB for type-C lane swap if Lane 1 and Lane 3 are linked to the
USB PHY that is integrated into the SerDes IP. The WIZ control register
has to be configured to support this lane swap feature.

The support for swapping lanes 2 and 3 is missing and therefore
add support to configure the control register to swap between
lanes 2 and 3 if PHY type is USB.

Signed-off-by: Sinthu Raja <sinthu.raja@ti.com>
3 years agophy: ti: j721e-wiz: Manage TypeC lane swap if typec-dir-gpios not specified
Sinthu Raja [Mon, 13 Mar 2023 12:42:23 +0000 (18:12 +0530)] 
phy: ti: j721e-wiz: Manage TypeC lane swap if typec-dir-gpios not specified

It's possible that the Type-C plug orientation on the DIR line will be
implemented through hardware design. In that situation, there won't be
an external GPIO line available, but the driver still needs to address
this since the DT won't use the typec-dir-gpios property.

Add code to handle LN10 Type-C swap if typec-dir-gpios property is not
specified in DT.

Signed-off-by: Sinthu Raja <sinthu.raja@ti.com>
3 years agoarm: mach-k3: introduce generic board detction kconfig option
Christian Gmeiner [Fri, 3 Mar 2023 19:16:28 +0000 (20:16 +0100)] 
arm: mach-k3: introduce generic board detction kconfig option

For non TI boards it is not possible to enable the do_board_detect()
call as TI_I2C_BOARD_DETECT is defined in board/ti/common/Kconfig.

I want to use do_board_detect() to dectect boards and properties based
on some SPI communication with a FPGA.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
3 years agoboard: ti: Kconfig: Correct invalid Kconfig syntax
Neha Malcom Francis [Fri, 3 Mar 2023 08:21:24 +0000 (13:51 +0530)] 
board: ti: Kconfig: Correct invalid Kconfig syntax

Kconfig does not support using 'select' to select a 'choice'. A choice
can be configured by either setting the choice symbol to 'y' in a
configuration file or by setting a 'default' of the choice.

In board/ti/*/Kconfig the SOC_K3_* choice is already set to 'y' in their
corresponding configs/*_defconfig file. So remove selecting it.

Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
3 years agoiot2050: Add support for configuring M.2 connector
Jan Kiszka [Tue, 28 Feb 2023 18:19:23 +0000 (19:19 +0100)] 
iot2050: Add support for configuring M.2 connector

The M.2 slots of the related IOT2050 variant need to be configured
according to the plugged cards. This tries to detect the card using the
M.2 configuration pins of the B-key slot. If that fails, a U-Boot
environment variable can be set to configure manually. This variable is
write-permitted also in secure boot mode as it is not able to undermine
the integrity of the booted system.

The configuration is then applied to mux the serdes and to fix up the
device tree passed to or loaded by the bootloader. The fix-ups are
coming from device tree overlays that are embedded into the firmware
image and there also integrity protected. The OS remains free to load
a device tree to which they do not apply: U-Boot will not fail to boot
in that case.

Based on original patch by Chao Zeng.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoarm: dts: iot2050: Add support for M.2 variant
chao zeng [Tue, 28 Feb 2023 18:19:22 +0000 (19:19 +0100)] 
arm: dts: iot2050: Add support for M.2 variant

Add support for the M.2 board based on the iot2050 advanced board.
The board has two m.2 connectors, one is B-keyed, the other E-keyed.
The B-key slot can connect 5G/SSD devices, and E-key can be used for
WIFI/BT devices.

This variant is covered by PG2 firmware image.

Signed-off-by: chao zeng <chao.zeng@siemens.com>
[Jan: align DT to kernel, polish wording]
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoiot2050: Refresh defconfigs and activate CONFIG_EFI_SCROLL_ON_CLEAR_SCREEN
Jan Kiszka [Tue, 28 Feb 2023 18:19:21 +0000 (19:19 +0100)] 
iot2050: Refresh defconfigs and activate CONFIG_EFI_SCROLL_ON_CLEAR_SCREEN

This feature is desired on the platform.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agoboard: siemens: iot2050: use the named gpio to control the user-button
chao zeng [Tue, 28 Feb 2023 18:19:20 +0000 (19:19 +0100)] 
board: siemens: iot2050: use the named gpio to control the user-button

User-button is controlled by the mcu domain gpio number 25.
But main0 main1 mcu domain all have gpio number 25.

To identify where the gpio is from, Using gpio controll base as the prefix
to indicate the gpio resource.

Signed-off-by: chao zeng <chao.zeng@siemens.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agodoc: iot2050: Add a note about the watchdog firmware
Jan Kiszka [Tue, 28 Feb 2023 18:19:19 +0000 (19:19 +0100)] 
doc: iot2050: Add a note about the watchdog firmware

This is enabled by default, thus should be described as well.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoarm: dts: iot2050: Optionally embed OTP programming data into image
Jan Kiszka [Tue, 28 Feb 2023 18:19:18 +0000 (19:19 +0100)] 
arm: dts: iot2050: Optionally embed OTP programming data into image

Use external blob otpcmd.bin to replace the 0xff filled OTP programming
command block to create a firmware image that provisions the OTP on
first boot. This otpcmd.bin is generated from the customer keys using
steps described in the meta-iot2050 integration layer for the device.

Based on original patch by Baocheng Su.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoiot2050: Add script for signing artifacts
Jan Kiszka [Tue, 28 Feb 2023 18:19:17 +0000 (19:19 +0100)] 
iot2050: Add script for signing artifacts

There are many ways to get a signed firmware for the IOT2050 devices,
namely for the parts under user-control. This script documents one way
of doing it, given a signing key. Augment the board documentation with
the required procedure around it.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agotools: Add script for converting public key into device tree include
Jan Kiszka [Tue, 28 Feb 2023 18:19:16 +0000 (19:19 +0100)] 
tools: Add script for converting public key into device tree include

Allows to create a public key device tree dtsi for inclusion into U-Boot
SPL and proper during first build already. This can be achieved via
CONFIG_DEVICE_TREE_INCLUDES.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoarm: dts: iot2050: Allow verifying U-Boot proper by SPL
Jan Kiszka [Tue, 28 Feb 2023 18:19:15 +0000 (19:19 +0100)] 
arm: dts: iot2050: Allow verifying U-Boot proper by SPL

Add hashes and configuration signature stubs to prepare verified boot
of main U-Boot by SPL.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agoiot2050: Add CFG_ENV_FLAGS_LIST_STATIC
Jan Kiszka [Tue, 28 Feb 2023 18:19:14 +0000 (19:19 +0100)] 
iot2050: Add CFG_ENV_FLAGS_LIST_STATIC

Will be needed when CONFIG_ENV_WRITEABLE_LIST is enabled. The listed
variables shall remain writable, for informational purposes - they have
to be considered untrusted because the persistent U-Boot env is not
protected.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoiot2050: Add watchdog start to bootcmd
Jan Kiszka [Tue, 28 Feb 2023 18:19:13 +0000 (19:19 +0100)] 
iot2050: Add watchdog start to bootcmd

Allows run-time control over watchdog auto-start and the timeout via
setting the environment variable watchdog_timeout_ms. A value of zero
means "do not start". Use CONFIG_WATCHDOG_TIMEOUT_MSECS as initial value
and this to zero by default. Users can then enable the watchdog once the
use and OS which picks it up during boot.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoiot2050: Migrate settings into board env file
Jan Kiszka [Tue, 28 Feb 2023 18:19:12 +0000 (19:19 +0100)] 
iot2050: Migrate settings into board env file

Anything that is not boot-env related is better kept there by now.

At this chance, also drop a stale comment from iot2050.h

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoiot2050: Update firmware layout
Jan Kiszka [Tue, 28 Feb 2023 18:19:11 +0000 (19:19 +0100)] 
iot2050: Update firmware layout

The latest version of the binary-only firmware parts come in a combined
form of FSBL and sysfw containers. This implies some layout changes to
the generated firmware image but also makes handling of artifacts much
simpler (4 files less). The env locations will not change, just the
space reserved for U-Boot will shrink from 4 to 3 MB - still plenty of
space left in practice.

Adjust configuration and documentation accordingly.

Along this change, add a new reservation for update commands of the
user-controlled OTP part. A specific userspace tool will fill it, and
the FSBL will evaluate it during boot. This reservation will use 64K of
the former sysfw section.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoarm: dts: iot2050: Use the auto generator nodes for fdt
Su Baocheng [Tue, 28 Feb 2023 18:19:10 +0000 (19:19 +0100)] 
arm: dts: iot2050: Use the auto generator nodes for fdt

Refactor according to the entry `fit: Entry containing a FIT` of
document tools/binman/README.entries.

As the generator uses the device tree name for the config description,
board_fit_config_name_match requires a small adjustment as well.

Signed-off-by: Su Baocheng <baocheng.su@siemens.com>
[Jan: re-add now required CONFIG_OF_LIST, update config matching]
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agoboard: siemens: iot2050: Split the build for PG1 and PG2
Su Baocheng [Tue, 28 Feb 2023 18:19:09 +0000 (19:19 +0100)] 
board: siemens: iot2050: Split the build for PG1 and PG2

Due to different signature keys, the PG1 and the PG2 boards can no
longer use the same FSBL (tiboot3). This makes it impossible anyway to
maintaine a single flash.bin for both variants, so we can also split the
build.

A new target is added to indicates the build is for PG1 vs. PG2 boards.
Hence now the variants have separated defconfig files.

The runtime board_is_sr1() check does make no sense anymore, so remove
it and replace with build time check.

Documentation is updated accordingly. New binary artifacts are already
available via meta-iot2050.

Signed-off-by: Su Baocheng <baocheng.su@siemens.com>
[Jan: refactor config option into targets, tweak some wordings]
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoMerge tag 'u-boot-at91-2023.07-a' of https://source.denx.de/u-boot/custodians/u-boot...
Tom Rini [Tue, 28 Mar 2023 15:21:29 +0000 (11:21 -0400)] 
Merge tag 'u-boot-at91-2023.07-a' of https://source.denx.de/u-boot/custodians/u-boot-at91 into next

First set of u-boot-at91 features for the 2023.07 cycle:

This feature set includes the clock changes required for sam9x60 SoC to
support USB host.

3 years agoimx6sx-udoo-neo-basic: Introduce the u-boot.dtsi
Fabio Estevam [Wed, 22 Mar 2023 19:59:31 +0000 (16:59 -0300)] 
imx6sx-udoo-neo-basic: Introduce the u-boot.dtsi

After the conversion to DM_SERIAL in commit 01f372d8d62b ("udoo_neo:
Select DM_SERIAL and drop iomux board level init") the SPL log is gone
and the U-Boot proper log becomes incomplete:

Core:  80 devices, 18 uclasses, devicetree: separate
MMC:   FSL_SDHC: 1, FSL_SDHC: 2
Loading Environment from MMC... OK
In:    serial@2020000
Out:   serial@2020000
Err:   serial@2020000
Net:   eth0: ethernet@2188000
Hit any key to stop autoboot:  0

Introduce the u-boot.dtsi file that passes the u-boot,dm-pre-reloc
properties to the relevant nodes so that UART can be used early in SPL.

With this change, the complete SPL and U-Boot messages are seen again.

Signed-off-by: Fabio Estevam <festevam@denx.de>
3 years agoMerge branch '2023-03-28-correct-several-cli_getch-bugs'
Tom Rini [Tue, 28 Mar 2023 14:57:34 +0000 (10:57 -0400)] 
Merge branch '2023-03-28-correct-several-cli_getch-bugs'

- Merge a regression fix (for an issue that we raised post v2023.01)
  with cli_getch(), and include a test now.

3 years agocli: Correct handling of invalid escape sequences in cread_line()
Simon Glass [Mon, 27 Mar 2023 19:34:14 +0000 (08:34 +1300)] 
cli: Correct handling of invalid escape sequences in cread_line()

The second call to cli_ch_process() is in the wrong place, meaning that
the one of the characters of an invalid escape sequence is swallowed
instead of being returned.

Fix the bug and add a test to cover this.

This behaviour matches that of the code before cli_getch() was
introduced. This was verified on the commit before b08e9d4b66 i.e.:

   7d850f85aad ("sandbox: Enable mmc command and legacy images")

Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
3 years agocli: Correct several bugs in cli_getch()
Simon Glass [Mon, 27 Mar 2023 19:34:13 +0000 (08:34 +1300)] 
cli: Correct several bugs in cli_getch()

This function does not behave as expected when unknown escape sequences
are sent to it:

- it fails to store (and thus echo) the last character of the invalid
  sequence
- it fails to set esc_len to 0 when it finishes emitting the invalid
  sequence, meaning that the following character will appear to be part
  of a new escape sequence
- it processes the first character of the rejected sequence as a valid
  character, just starting the sequence all over again

The last two bugs conspire to produce an "impossible condition #876"
message which is the main symptom of this behaviour.

Fix these bugs and add a test to verify the behaviour.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
3 years agoRevert "rockchip: Fix early use of bootph props"
Tom Rini [Mon, 27 Mar 2023 19:20:19 +0000 (15:20 -0400)] 
Revert "rockchip: Fix early use of bootph props"

While this change is correct for v2023.04 it is not correct for next
(where this is right now) nor post-v2023.04.

This reverts commit 8653e5d3b745925fced5fa6897c92f4a46ec2757.

Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoMerge branch 'master' into next
Tom Rini [Mon, 27 Mar 2023 19:19:57 +0000 (15:19 -0400)] 
Merge branch 'master' into next

3 years agoPrepare v2023.04-rc5 v2023.04-rc5
Tom Rini [Mon, 27 Mar 2023 18:23:26 +0000 (14:23 -0400)] 
Prepare v2023.04-rc5

Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoconfigs: Resync with savedefconfig
Tom Rini [Mon, 27 Mar 2023 17:39:17 +0000 (13:39 -0400)] 
configs: Resync with savedefconfig

Rsync all defconfig files using moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoMerge branch '2023-03-27-rockchip-rk3399-fixes'
Tom Rini [Mon, 27 Mar 2023 15:16:51 +0000 (11:16 -0400)] 
Merge branch '2023-03-27-rockchip-rk3399-fixes'

- A series of minor cleanups to DISTRO_DEFAULTS and BOOTSTD so that the
  rk3399 bootstd migration can be complete and functional now, and make
  future migrations easier.

3 years agorockchip: rk3399: Drop altbootcmd
Tom Rini [Fri, 24 Mar 2023 20:58:16 +0000 (16:58 -0400)] 
rockchip: rk3399: Drop altbootcmd

The defined altbootcmd was specific to distro_bootcmd which is not
longer in use on these platforms, so drop it.

Tested-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agorockchip: Use BOOTSTD_DEFAULTS if not DISTRO_DEFAULTS
Tom Rini [Fri, 24 Mar 2023 20:58:15 +0000 (16:58 -0400)] 
rockchip: Use BOOTSTD_DEFAULTS if not DISTRO_DEFAULTS

When we do not enable DISTRO_DEFAULTS (generally, to get distro_bootcmd)
we instea do want to imply BOOTSTD_DEFAULTS so that when using bootstd
the general distro boot functionality will still work.

Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agorockchip: Disable DISTRO_DEFAULTS for rk3399 boards
Simon Glass [Fri, 24 Mar 2023 20:58:14 +0000 (16:58 -0400)] 
rockchip: Disable DISTRO_DEFAULTS for rk3399 boards

These board have moved to standard boot but the old 'distro_bootcmd'
command is still active. Disable DISTRO_DEFAULTS to fix this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Vagrant Cascadian <vagrant@debian.org>
3 years agoboot: Create a common BOOT_DEFAULTS for distro and bootstd
Simon Glass [Fri, 24 Mar 2023 20:58:13 +0000 (16:58 -0400)] 
boot: Create a common BOOT_DEFAULTS for distro and bootstd

These two features use a lot of common options. Move them into a common
CONFIG to reduce duplication.

Use 'select' for most options since these are things that boards aren't
supposed to override. For now it is not possible to disable
BOOT_DEFAULTS but we may take another look later.

Note that five options use 'imply' to match existing behaviour.

Signed-off-by: Simon Glass <sjg@chromium.org>
[trini: Rework a bit so we don't grow so many platforms unintentionally]
Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agolmb: Enable LMB if SYS_BOOT_RAMDISK_HIGH
Simon Glass [Fri, 24 Mar 2023 20:58:12 +0000 (16:58 -0400)] 
lmb: Enable LMB if SYS_BOOT_RAMDISK_HIGH

Ramdisk relocation requires LMB, so enable it automatically to avoid
build errors.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agoMove DISTRO_DEFAULTS into boot/
Simon Glass [Fri, 24 Mar 2023 20:58:11 +0000 (16:58 -0400)] 
Move DISTRO_DEFAULTS into boot/

This relates to booting so move it in to that Kconfig file, before
changing it.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agorockchip: Drop bootstage stash in TPL and SPL for rockpro64
Simon Glass [Fri, 24 Mar 2023 20:58:10 +0000 (16:58 -0400)] 
rockchip: Drop bootstage stash in TPL and SPL for rockpro64

Unfortunately the IRAM used to stash the bootstage records in TPL
becomes inaccessible after SPL runs. Presumably this is because of ATF
taking it over.

We could move the stash to another address in SPL, before passing it to
U-Boot proper. But it seems easier to wait until we have support for
standard passage[1] which should not be too far away.

For now, disable it in TPL and SPL.

[1] https://patchwork.ozlabs.org/project/uboot/cover/
    20220117150428.1580273-1-sjg@chromium.org/

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Vagrant Cascadian <vagrant@debian.org>
3 years agoMerge https://source.denx.de/u-boot/custodians/u-boot-x86
Tom Rini [Mon, 27 Mar 2023 15:05:40 +0000 (11:05 -0400)] 
Merge https://source.denx.de/u-boot/custodians/u-boot-x86

- x86: Bug fixes of previous BayTrail platform CONFIG_TEXT_BASE changes

3 years agoconfigs: at91: sam9x60: Add required configs for the USB clock
Sergiu Moga [Wed, 8 Mar 2023 14:39:54 +0000 (16:39 +0200)] 
configs: at91: sam9x60: Add required configs for the USB clock

Add the configs required to use the SAM9X60's USB clock.

Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
[claudiu.beznea: added CONFIG_AT91_SAM9X60_USB to
 sam9x60_curiosity_mmc1_defconfig]
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
3 years agoclk: at91: sam9x60: Add initial setup of UPLL and USBCK rates
Sergiu Moga [Wed, 8 Mar 2023 14:39:53 +0000 (16:39 +0200)] 
clk: at91: sam9x60: Add initial setup of UPLL and USBCK rates

In order for some of the functionalities, such as the USB clocks,
to work properly we need some clocks to be properly initialised
at the very beginning of booting.

Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
3 years agoclk: at91: pmc: export clock setup to pmc
Claudiu Beznea [Wed, 8 Mar 2023 14:39:52 +0000 (16:39 +0200)] 
clk: at91: pmc: export clock setup to pmc

Clock setup was intended for setting clocks at boot time on SAMA7G5,
e.g. for root clocks like PLLs, that were used to feed IPs needed alive
in u-boot (e.g. Ethernet clock feed by a PLL). Export this functionality
to all at91 clocks as it may be necessary on other SoCs.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
3 years agoclk: at91: sam9x60: Register the required clocks for USB
Sergiu Moga [Wed, 8 Mar 2023 14:39:51 +0000 (16:39 +0200)] 
clk: at91: sam9x60: Register the required clocks for USB

Register into DM the clocks required to properly enable USB functionality
within the bootloader.

Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
3 years agoclk: at91: Add support for sam9x60 USB clock
Sergiu Moga [Wed, 8 Mar 2023 14:39:50 +0000 (16:39 +0200)] 
clk: at91: Add support for sam9x60 USB clock

Implement sam9x60 USB clock driver. This clock has
three parents: PLLA, UPLL and MAINXTAL. The driver is
aware of the three possible parents with the help of the
two mux tables provied to the driver during the registration
of the clock.

Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
3 years agox86: som-db5800-som-6867: Fix up adjustment of CONFIG_TEXT_BASE
Simon Glass [Tue, 14 Mar 2023 23:59:55 +0000 (17:59 -0600)] 
x86: som-db5800-som-6867: Fix up adjustment of CONFIG_TEXT_BASE

With recent CONFIG_TEXT_BASE changes, there are inconsistencies between
several settings.

Adjust CONFIG_SYS_MONITOR_LEN to allow more code space. Move the MRC
cache out of the way too.

Fixes: e23cae30801f ("x86: som-db5800-som-6867: Adjust CONFIG_TEXT_BASE")
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
3 years agox86: dfi-bt700: Fix up adjustment of CONFIG_TEXT_BASE
Simon Glass [Tue, 14 Mar 2023 23:59:54 +0000 (17:59 -0600)] 
x86: dfi-bt700: Fix up adjustment of CONFIG_TEXT_BASE

With recent CONFIG_TEXT_BASE changes, there are inconsistencies between
several settings.

Adjust CONFIG_SYS_MONITOR_LEN to allow more code space. Move the MRC
cache out of the way too.

Fixes: 5d1c8342aeaa ("x86: dfi-bt700: Adjust CONFIG_TEXT_BASE")
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
3 years agox86: conga-qeval20-qa3-e3845: Fix up adjustment of CONFIG_TEXT_BASE
Simon Glass [Tue, 14 Mar 2023 23:59:53 +0000 (17:59 -0600)] 
x86: conga-qeval20-qa3-e3845: Fix up adjustment of CONFIG_TEXT_BASE

With recent CONFIG_TEXT_BASE changes, there are inconsistencies between
several settings.

Adjust CONFIG_SYS_MONITOR_LEN to allow more code space. Move the MRC
cache out of the way too.

Fixes: 388f93f96354 ("x86: conga-qeval20-qa3-e3845: Adjust CONFIG_TEXT_BASE")
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agox86: bayleybay: Fix up adjustment of CONFIG_TEXT_BASE
Simon Glass [Tue, 14 Mar 2023 23:59:52 +0000 (17:59 -0600)] 
x86: bayleybay: Fix up adjustment of CONFIG_TEXT_BASE

With recent CONFIG_TEXT_BASE changes, there are inconsistencies between
several settings.

Adjust CONFIG_SYS_MONITOR_LEN to allow more code space. Move the MRC
cache out of the way too.

Fixes: f38be3086837 ("x86: bayleybay: Adjust CONFIG_TEXT_BASE")
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
3 years agox86: minnowmax: Fix up adjustment of CONFIG_TEXT_BASE
Simon Glass [Tue, 14 Mar 2023 23:59:51 +0000 (17:59 -0600)] 
x86: minnowmax: Fix up adjustment of CONFIG_TEXT_BASE

With recent CONFIG_TEXT_BASE changes, there are inconsistencies between
several settings.

Adjust CONFIG_SYS_MONITOR_LEN to allow more code space. Move the MRC
cache out of the way too.

Add documentation on how to make this change safely.

Fixes: 66e2c665f3b6 ("x86: minnowmax: Adjust CONFIG_TEXT_BASE")
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
3 years agoMerge tag 'efi-next-20230325' of https://source.denx.de/u-boot/custodians/u-boot...
Tom Rini [Sat, 25 Mar 2023 21:34:34 +0000 (17:34 -0400)] 
Merge tag 'efi-next-20230325' of https://source.denx.de/u-boot/custodians/u-boot-efi into next

Pull request for efi-next-20230325

Documenation:

* add man-page for efi command

UEFI:

* Let EFI app call ExitBootServices() before legacy booting kernel
* Support zboot and bootm in the EFI app
* Let efi command show configuration tables
* Support booting a 64-bit kernel from 64-bit EFI app
* Allocate device-tree copy from high memory
* simplify efi_str_to_u16()