]> git.ipfire.org Git - thirdparty/u-boot.git/log
thirdparty/u-boot.git
3 years agoconfigs: zynqmp: Disable LMB for mini u-boot
Ashok Reddy Soma [Tue, 14 Dec 2021 12:19:14 +0000 (05:19 -0700)] 
configs: zynqmp: Disable LMB for mini u-boot

LMB is not required for mini u-boot which runs out of on chip memory.
Disable CONFIG_LMB from mini u-boot defconfig's.

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
3 years agozynqmp: Run board_get_usable_ram_top() only on main U-Boot
Ashok Reddy Soma [Tue, 14 Dec 2021 12:19:13 +0000 (05:19 -0700)] 
zynqmp: Run board_get_usable_ram_top() only on main U-Boot

With commit ce39ee28ec31 ("zynqmp: Do not place u-boot to reserved memory
location"), the function board_get_usable_ram_top() is allocating
MMU_SECTION_SIZE of about 2MB using lmb_alloc(). But we dont have this
much memory in case of mini U-Boot.

Keep these functions which use lmb under CONFIG_LMB so that they are
compiled and used only when LMB is enabled.

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
3 years agolmb: Fix lmb property's defination under struct lmb
Ashok Reddy Soma [Tue, 14 Dec 2021 12:19:12 +0000 (05:19 -0700)] 
lmb: Fix lmb property's defination under struct lmb

Under struct lmb {} the lmb property's should be defined only if
CONFIG_LMB_MEMORY_REGIONS is defined.

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
3 years agoarm64: zynqmp: Remove all pinctrl setting
Michal Simek [Thu, 2 Dec 2021 13:39:09 +0000 (14:39 +0100)] 
arm64: zynqmp: Remove all pinctrl setting

There is any unknown issue with SC that with pinctrl enabled system is not
able to boot. This issue should be investigated more to find the real
problem behind. Till that time it is better to remove pinctrl setting
completely.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
3 years agoarm64: versal: Add support for vpk180 revA
Michal Simek [Mon, 29 Nov 2021 10:29:04 +0000 (11:29 +0100)] 
arm64: versal: Add support for vpk180 revA

The board is very similar to vpk120-revB based on VP1802 Versal.
Dual QSPi, SD3.0, Ethernet, USB2.0. Board should be also compatible with
generic SC design.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
3 years agoarm64: versal: Cover all vck190/vmk180 combinations in defconfig
Michal Simek [Mon, 29 Nov 2021 10:26:47 +0000 (11:26 +0100)] 
arm64: versal: Cover all vck190/vmk180 combinations in defconfig

Add all combinations to OF_LIST to make sure that it is the part of
fit-dtb.blob.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
3 years agoarm64: versal: Fix amount of memory available on vpk120
Michal Simek [Mon, 29 Nov 2021 10:18:07 +0000 (11:18 +0100)] 
arm64: versal: Fix amount of memory available on vpk120

vpk120 has 12GB of memory not just 8GB.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
3 years agoarm64: versal: Add support for vck190 rev1.1
Michal Simek [Mon, 29 Nov 2021 09:02:11 +0000 (10:02 +0100)] 
arm64: versal: Add support for vck190 rev1.1

Difference is quite small which is just using new level shifter for SD
which requires different tap delay setting. Also to be safe remove
sdhci-caps-mask, sdhci-caps and max-frequency properties which were in the
tree for some time to have support for multiple board revisions with the
same SW.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
3 years agoarm64: zynqmp: Add support for vpk180-revA SC overlay
Michal Simek [Fri, 26 Nov 2021 14:23:28 +0000 (15:23 +0100)] 
arm64: zynqmp: Add support for vpk180-revA SC overlay

It is necessary to describe i2c topology which is slightly different
compare to vpk120.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
3 years agoarm64: zynqmp: Remove eeprom from sc-vpk120-revB
Michal Simek [Fri, 26 Nov 2021 15:31:24 +0000 (16:31 +0100)] 
arm64: zynqmp: Remove eeprom from sc-vpk120-revB

EEPROM has moved to root of i2c bus to avoid i2c mux handling.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
3 years agoarm64: zynqmp: Fix label for u152 on vpk120 revB
Michal Simek [Fri, 26 Nov 2021 14:30:15 +0000 (15:30 +0100)] 
arm64: zynqmp: Fix label for u152 on vpk120 revB

Just incorrect address in label and comment but better to fix it.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
3 years agoarm64: zynqmp: Fix compatible string for vpk120
Michal Simek [Fri, 26 Nov 2021 14:22:17 +0000 (15:22 +0100)] 
arm64: zynqmp: Fix compatible string for vpk120

trivial fix.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
3 years agoarm64: zynqmp: Add fclk for clock chips
Michal Simek [Fri, 26 Nov 2021 14:01:25 +0000 (15:01 +0100)] 
arm64: zynqmp: Add fclk for clock chips

fclk driver enables access to clock chip and provide a way to control them.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
3 years agoarm64: zynqmp: Add support for SC for vpk120-revB
Michal Simek [Fri, 26 Nov 2021 09:07:55 +0000 (10:07 +0100)] 
arm64: zynqmp: Add support for SC for vpk120-revB

Boards with generic SC will vary in small aspects. One thing what will
change from one board to another is i2c intrastructure which needs to be
covered by DT overlay.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
3 years agoarm64: zynqmp: Wire also i2c0 with generic SC
Michal Simek [Fri, 26 Nov 2021 13:32:03 +0000 (14:32 +0100)] 
arm64: zynqmp: Wire also i2c0 with generic SC

Spec is also adding i2c to MIO 34/35 that's why add it.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
3 years agoarm64: zynqmp: Add pinctrl setup for generic SC
Michal Simek [Fri, 26 Nov 2021 13:15:47 +0000 (14:15 +0100)] 
arm64: zynqmp: Add pinctrl setup for generic SC

All MIOs are fixed by the spec that's why not a problem to description
pinctrl setting.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
3 years agoarm64: zynqmp: Remove u-boot,dm-pre-reloc for uart1 from SC
Michal Simek [Fri, 26 Nov 2021 13:17:24 +0000 (14:17 +0100)] 
arm64: zynqmp: Remove u-boot,dm-pre-reloc for uart1 from SC

This flag is already setup via zynqmp.dtsi that's why it can be removed.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
3 years agoarm64: zynqmp: Trivial fix in zynqmp-sc-revB
Michal Simek [Fri, 26 Nov 2021 13:02:56 +0000 (14:02 +0100)] 
arm64: zynqmp: Trivial fix in zynqmp-sc-revB

Remove one trailing newline at the end.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
3 years agoarm64: zynqmp: Add gpio-line-names for PS gpio
Michal Simek [Fri, 26 Nov 2021 12:53:46 +0000 (13:53 +0100)] 
arm64: zynqmp: Add gpio-line-names for PS gpio

EMIOs from PS gpio are not going to be used that's why this description
should be stable across all SCs.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
3 years agonet: gem: Also handle error cases for sgmii phy
Michal Simek [Tue, 14 Dec 2021 12:17:26 +0000 (13:17 +0100)] 
net: gem: Also handle error cases for sgmii phy

If driver is not compiled to u-boot driver should error out.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
3 years agousb: dwc3: Fix ULPI reset when resetting usb
T Karthik Reddy [Tue, 7 Dec 2021 10:36:40 +0000 (03:36 -0700)] 
usb: dwc3: Fix ULPI reset when resetting usb

In the current ULPI reset implementation, when a usb reset is issued
gpio_request_by_name() returns -EBUSY as the gpio is already requested
and failing to set gpio descriptor flags(active low) and failing to
bring the ULPI out of reset.

Fix this issue by freeing the gpio when a usb reset is issued and
request gpio again when usb starts.

Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
3 years agophy: zynqmp: Add serdes/psgtr driver
Michal Simek [Thu, 21 Oct 2021 14:03:47 +0000 (16:03 +0200)] 
phy: zynqmp: Add serdes/psgtr driver

Add PSGTR driver for Xilinx ZynqMP.
The most of configurations are taken from Linux kernel psgtr driver.

USB3.0 and SGMII configurations are tested on SOM. In SGMII case also
IOU_SLCR reg is updated to get proper clock setup and signal detection
configuration.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Link: https://lore.kernel.org/r/947922ceb12a7db388fc63eddd3dcc9b8a8a1208.1637238602.git.michal.simek@xilinx.com
3 years agoarm64: zynqmp: Switch SOM to shared psu configuration
Michal Simek [Thu, 18 Nov 2021 11:58:15 +0000 (12:58 +0100)] 
arm64: zynqmp: Switch SOM to shared psu configuration

Previous psu init was targeting SOM + KV260 carrier card and also contain
configurations for other devices on carrier card. This config is removing
all expected configurations for CC and let U-Boot to handle all of it self.
This configuration is designed for SOM itself (and I would bet without
eMMC).

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Link: https://lore.kernel.org/r/5782131058dc372befd3fdb4dceabeea5ba56606.1637236693.git.michal.simek@xilinx.com
3 years agoarm64: zynqmp: Use assigned-clock-rates for setting up clock in SOM
Michal Simek [Tue, 30 Nov 2021 15:09:19 +0000 (16:09 +0100)] 
arm64: zynqmp: Use assigned-clock-rates for setting up clock in SOM

With limited low level configuration done via psu-init only IPs connected
on SOM are initialized and configured. All IPs connected to carrier card
are not initialized. There is a need to do proper reset, pin configuration
and also clock setting.
The patch targets the last part which is setting up proper clock for USBs
and SDs which on kr260 and kv260-revB boards.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
3 years agoarm64: zynqmp: Remove SOM *u-boot.dtsi
Michal Simek [Tue, 30 Nov 2021 14:33:30 +0000 (15:33 +0100)] 
arm64: zynqmp: Remove SOM *u-boot.dtsi

Disable mmc from u-boot.dtsi file because it was there only for kv260
board. With kr260 this is not needed because we will switch to full DT per
board with SD/EMMC there too.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
3 years agoarm64: zynqmp: Fix level of gpio reset for usb on kv260 boards
Michal Simek [Fri, 29 Oct 2021 11:21:22 +0000 (13:21 +0200)] 
arm64: zynqmp: Fix level of gpio reset for usb on kv260 boards

Active level is low that's why it should be fixed.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
3 years agoarm64: zynqmp: Update usb2244 node
Michal Simek [Tue, 30 Nov 2021 14:28:33 +0000 (15:28 +0100)] 
arm64: zynqmp: Update usb2244 node

Update comment and labels for usb2244 usb to sd convertor.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
3 years agoarm64: zynqmp: In sck-kr DTS use slg device for GEM phy reset
Radhey Shyam Pandey [Tue, 23 Nov 2021 19:05:06 +0000 (19:05 +0000)] 
arm64: zynqmp: In sck-kr DTS use slg device for GEM phy reset

For GEM node switch to phy specific reset-gpios.

Include ethernet-phy-id compatible string in each phy node so that so
that phylib knows the contents of the ID registers.
Some background: In DP83867 external strap configuration is used for PHY
address and strap pin configuration is done by sw stack at a later stage.
The PHY address on power on is configured based on sampled values at
strap pins which is not PHY address mentioned in DT. It could be any PHY
address depending on strap pins default input. For PHY detect to happen
at proper PHY Address we have call PHY reset (RESET_B) after strap pins
are configured otherwise probe (of_mdiobus_phy_device_register) fails
and we see below error:
mdio_bus ff0c0000.ethernet-ffffffff: MDIO device at address 8 is missing.

Apart from reset, it also set proper phy delays.
The TI DP83867 PHY datasheet says:
T1: Post RESET stabilization time == 195us
T3: Hardware configuration pins transition to output drivers == 64us
T4: RESET pulse width == 1us
So with a little overhead set 'reset-assert-us' to 100us (T4) and
'reset-deassert-us' to 280us (T1+T3).

NOTE: The tuning of TI DP83867 phy reset delay is derived from linux
upstream commit: 5dbadc848259(arm64: dts: fsl: add support for Kontron
pitx-imx8m board).

Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
3 years agoarm64: zynqmp: Use usb-hub as node name
Michal Simek [Fri, 29 Oct 2021 10:48:56 +0000 (12:48 +0200)] 
arm64: zynqmp: Use usb-hub as node name

DT spec is directly listing this as node name that's why use it instead of
usb-hub name.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
3 years agoarm64: zynqmp: Move usb hub from i2c to usb node
Michal Simek [Tue, 26 Oct 2021 05:20:52 +0000 (07:20 +0200)] 
arm64: zynqmp: Move usb hub from i2c to usb node

Based on upstream discussion based on link below usb hub should be placed
to usb node directly as child node. Based on this Linux driver was updated
and the same change should be also reflected in kv260 board.

Link: https://lore.kernel.org/all/CAL_JsqJZBbu+UXqUNdZwg-uv0PAsNg55026PTwhKr5wQtxCjVQ@mail.gmail.com/
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
3 years agoarm64: zynqmp: Use slg device for all resets
Michal Simek [Tue, 30 Nov 2021 14:17:24 +0000 (15:17 +0100)] 
arm64: zynqmp: Use slg device for all resets

All reset signals are active low that's why change level to proper values
and switch renaming resets over PS gpio to slg device too.
Reset over slg device has been proven by HW guys to be working properly.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
3 years agoarm64: zynqmp: Correct clock input for usb1
Michal Simek [Fri, 22 Oct 2021 06:45:24 +0000 (08:45 +0200)] 
arm64: zynqmp: Correct clock input for usb1

There is shared clock for usb0 and usb1.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
3 years agoarm64: zynqmp: Setup is-internal-pcspma property for kr260
Michal Simek [Fri, 29 Oct 2021 08:13:15 +0000 (10:13 +0200)] 
arm64: zynqmp: Setup is-internal-pcspma property for kr260

This flag is needed to setup gem to SGMII mode.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
3 years agoarm64: zynqmp: Enable DP driver for SOMs
Michal Simek [Tue, 26 Oct 2021 14:16:16 +0000 (16:16 +0200)] 
arm64: zynqmp: Enable DP driver for SOMs

The main reason is to send pmufw cfg overlay from U-Boot to PMUFW to enable
access to DP. Overlay is sent when cls command is called and for that IP
has to be enabled in carrier cards.
And IP needs to be also enabled in SOM dt because with DTB reselection new
DT is not parsed in pre reloc U-Boot instance. It is called from board_f
via embedded_dtb_select(). That's why bind function is not able to allocate
memory and it ends up with error:
"Video device 'display@fd4a0000' cannot allocate frame buffer memory -ensure the
device is set up before relocation"

To avoid this situation DP is placed also to SOM where bind function is
called and frame buffer memory is allocated and just reused after DTB
reselection. Result is the same. There could be a problem in Linux with
different DP configurations but that's need to be solved there because
console should be on from u-boot already.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
3 years agoarm64: zynqmp: Add i2c-bus property for usb5744
Piyush Mehta [Fri, 8 Oct 2021 07:58:48 +0000 (13:28 +0530)] 
arm64: zynqmp: Add i2c-bus property for usb5744

Added "i2c-bus" property feature in usb5744 driver for I2C slaves
devices. Based on the I2C handler driver is initialize the I2C device
and trigger GPIO reset. If the property does not present then the
usb5744 driver acts as a non-I2C platform device.

Signed-off-by: Piyush Mehta <piyush.mehta@xilinx.com>
3 years agoarm64: zynqmp: Add gpio labels for modepin and slg nodes
Michal Simek [Fri, 22 Oct 2021 06:24:58 +0000 (08:24 +0200)] 
arm64: zynqmp: Add gpio labels for modepin and slg nodes

Using labels helps with better identifications of chips.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
3 years agoarm64: zynqmp: Change i2c address of i2c reset chip
Michal Simek [Thu, 23 Sep 2021 07:05:37 +0000 (09:05 +0200)] 
arm64: zynqmp: Change i2c address of i2c reset chip

Reset chip should be using address 0x11 not 0x10.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
3 years agousb: dwc3: Add support for usb3-phy PHY configuration
Michal Simek [Thu, 21 Oct 2021 14:54:17 +0000 (16:54 +0200)] 
usb: dwc3: Add support for usb3-phy PHY configuration

When usb3-phy label is found, PHY driver is called and serdes line is
initialized. This is preparation for serdes/psgtr driver to configure GT
lines based on description in DT.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
3 years agonet: gem: Reduce timeout of mdio phy idle status check
Ashok Reddy Soma [Mon, 11 Oct 2021 11:45:42 +0000 (05:45 -0600)] 
net: gem: Reduce timeout of mdio phy idle status check

Timeout for checking mdio phy idle status is 20seconds. In case of errors
this timeout will be too much. Reduce it to 100ms.

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
3 years agonet: zynq: Add support for PHY configuration in SGMII mode
Michal Simek [Tue, 26 Oct 2021 12:26:18 +0000 (14:26 +0200)] 
net: zynq: Add support for PHY configuration in SGMII mode

SGMII configuration depends on proper GT setting that's why when node has
phys property call PSGTR driver to configure it properly.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
3 years agonet: zynq: Add support for mdio bus address decoding
Michal Simek [Tue, 26 Oct 2021 13:51:39 +0000 (15:51 +0200)] 
net: zynq: Add support for mdio bus address decoding

There are flying two configurations around.
The first (already supported) has phy as subnode of gem node.
The second has mdio subnode (with mdio name) which has phy subnode.

This patch adds support for the second case where mdio subnode
is found driver will look at its parent to find out which gem is handling
MDIO bus.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
3 years agoarm64: zynqmp: Add resets to all GEMs
Michal Simek [Fri, 22 Oct 2021 14:40:55 +0000 (16:40 +0200)] 
arm64: zynqmp: Add resets to all GEMs

There is a need to get IP out of reset to operate properly.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
3 years agonet: zynq: Add support for GEM reset
Michal Simek [Fri, 22 Oct 2021 15:09:00 +0000 (17:09 +0200)] 
net: zynq: Add support for GEM reset

Perform reset before core initialization.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
3 years agopower: zynqmp: Add power domain driver for ZynqMP
Michal Simek [Tue, 30 Nov 2021 15:32:43 +0000 (16:32 +0100)] 
power: zynqmp: Add power domain driver for ZynqMP

Driver should be enabled by CONFIG_POWER_DOMAIN=y and
CONFIG_ZYNQMP_POWER_DOMAIN=y. Power domain driver doesn't have own DT node
but it uses zynqmp firmware DT node that's why there is a need to bind
driver when firmware node is found.

Driver itself is simple. It is sending pmufw config object overlay for
enabling access to device which is done in ...domain_request().
In ...domain_on() capabilities are passed and node is requested.
This should be bare minimum of required to get power domain driver working.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
3 years agoarm64: zynqmp: Add command for disabling loading other overlays
Michal Simek [Tue, 16 Nov 2021 14:18:23 +0000 (15:18 +0100)] 
arm64: zynqmp: Add command for disabling loading other overlays

Add command "zynqmp pmufw node close" to disable permission to load
additional pmufw config overlays. This command will make sure that any
other sw will ask for changing permission.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
3 years agoxilinx: firmware: Introduce zynqmp_pmufw_node() for loading PMU fragments
Michal Simek [Thu, 4 Nov 2021 10:32:46 +0000 (11:32 +0100)] 
xilinx: firmware: Introduce zynqmp_pmufw_node() for loading PMU fragments

Introduce zynqmp_pmufw_node() for loading PMU configuration fragment for
enabling IPs. Firmware driver has small overlay where NODE id is added and
config fragment is sent to PMUFW. There is a need to build PMUFW with
fragment support.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
3 years agoarm64: zynqmp: Add u-boot,dm-pre-reloc to dpsub node
Michal Simek [Mon, 18 Oct 2021 14:00:50 +0000 (16:00 +0200)] 
arm64: zynqmp: Add u-boot,dm-pre-reloc to dpsub node

u-boot,dm-pre-reloc is necessary for DP driver to allocate enough space for
framebuffer before relocation.
Power domain driver is called when video console is used for example by
loading BMP image.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
3 years agoarm64: zynqmp: Remove clock-names from GEM in zynqmp-clk-ccf.dtsi
Michal Simek [Fri, 22 Oct 2021 09:58:24 +0000 (11:58 +0200)] 
arm64: zynqmp: Remove clock-names from GEM in zynqmp-clk-ccf.dtsi

Remove clock-names from GEM nodes from clk-ccf because they should be only
present in zynqmp.dtsi. And as is visible both clock-names defined didn't
really match.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
3 years agogpio: slg7xl45106: Add support for slg7xl45106 i2c gpo expander
T Karthik Reddy [Thu, 21 Oct 2021 11:37:09 +0000 (05:37 -0600)] 
gpio: slg7xl45106: Add support for slg7xl45106 i2c gpo expander

slg7xl45106 is i2c based 8-bit gpo expander, gpo pins are set and get by
writing and reading corresponding gpo bit value into its data register.

Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
3 years agoclk: zynqmp: Add support for setting up clock for USB
Michal Simek [Fri, 29 Oct 2021 11:13:37 +0000 (13:13 +0200)] 
clk: zynqmp: Add support for setting up clock for USB

USB range is not enabled but for setting up frequency it is needed.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Link: https://lore.kernel.org/r/c55c423f48ca8f953a2dfbdcb25068278d8e5ad6.1635506016.git.michal.simek@xilinx.com
3 years agoclk: zynqmp: Fix gem tx/rx/ref clock handling
Michal Simek [Fri, 29 Oct 2021 11:13:38 +0000 (13:13 +0200)] 
clk: zynqmp: Fix gem tx/rx/ref clock handling

gemX_ref clock IDs starts at number 104. Till now it was at gemX_tx
location which wasn't correct.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Link: https://lore.kernel.org/r/d073e159b6316707306092a62bccb876cd89a602.1635506016.git.michal.simek@xilinx.com
3 years agoxilinx: firmware: Move dcache handling directly to pmufw load config
Michal Simek [Thu, 18 Nov 2021 12:00:02 +0000 (13:00 +0100)] 
xilinx: firmware: Move dcache handling directly to pmufw load config

Core function should make sure that data is stored properly that's why move
cache operations directly to zynqmp_pmufw_load_config_object() to be able
to call it from other functions.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Link: https://lore.kernel.org/r/8c92edd3650ce34a3cfd1c1e4e9103980830b1fa.1637236800.git.michal.simek@xilinx.com
3 years agoMerge tag 'v2022.01-rc3' into master-next-test
Michal Simek [Tue, 30 Nov 2021 12:35:47 +0000 (13:35 +0100)] 
Merge tag 'v2022.01-rc3' into master-next-test

Prepare v2022.01-rc3

- Resolve issues in SPI framework by Ashok
- Use xilinx_spi driver
- Update GPIO_MODEPIN locations, selection
- Defconfig update
  "Add CONFIG_SYS_LOAD_ADDR to mini defconfigs" by Ashok
- Fix qspi merge issues by T Karthik

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
3 years agodts: versal: Remove unused interrupt index for mmc
Sai Krishna Potthuri [Mon, 29 Nov 2021 12:30:36 +0000 (18:00 +0530)] 
dts: versal: Remove unused interrupt index for mmc

Remove unused interrupt index for mmc.
This change fix the below dtbs check warning
"mmc@f1050000: interrupts: [[0, 128, 4], [0, 128, 4]] is too long".

Signed-off-by: Sai Krishna Potthuri <lakshmi.sai.krishna.potthuri@xilinx.com>
3 years agoPrepare v2022.01-rc3 v2022.01-rc3
Tom Rini [Mon, 29 Nov 2021 16:16:03 +0000 (11:16 -0500)] 
Prepare v2022.01-rc3

Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoboard: iot2050: update build documentation for OP-TEE
Ivan Mikhaylov [Sun, 28 Nov 2021 21:57:01 +0000 (21:57 +0000)] 
board: iot2050: update build documentation for OP-TEE

Set ta-target explicitly to correspond with OP-TEE recipe in
siemens/meta-iot2050.

Errors without explicit set of ta-target:
aarch64-linux-gnu-gcc: error: unrecognized command-line option â€˜-mthumb’
aarch64-linux-gnu-gcc: error: unrecognized command-line option â€˜-mno-unaligned-access’
aarch64-linux-gnu-gcc: error: unrecognized command-line option â€˜-mfloat-abi=hard’
make: *** [mk/compile.mk:159: out/arm-plat-k3/ta_arm32-lib/libdl/dlfcn.o] Error 1

Signed-off-by: Ivan Mikhaylov <ivan.mikhaylov@siemens.com>
Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoqemu: common: Fix build with update capsule
Vincent Stehlé [Wed, 24 Nov 2021 14:54:20 +0000 (15:54 +0100)] 
qemu: common: Fix build with update capsule

The common emulation Makefile has a dependency on a non-existent
qemu_capsule.o when building with support for capsule update enabled
(CONFIG_EFI_RUNTIME_UPDATE_CAPSULE=y).
The code which was in qemu_capsule.c has been completely moved to
lib/efi_loader/efi_capsule.c by commit 7a6fb28c8e4b ("efi_loader: capsule:
add back efi_get_public_key_data()").
Remove the false dependency.

This fixes the following build error:

  make[1]: *** No rule to make target 'board/emulation/common/qemu_capsule.o', needed by 'board/emulation/common/built-in.o'.  Stop.

Fixes: commit 47a25e81d35c ("Revert "efi_capsule: Move signature from DTB to .rodata"")
Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
Cc: Simon Glass <sjg@chromium.org>
3 years agofastboot: Add maintainers entry
Sean Anderson [Wed, 24 Nov 2021 04:33:11 +0000 (23:33 -0500)] 
fastboot: Add maintainers entry

Add an entry in maintainers for fastboot. It is starting off orphaned, but
hopefully someone can pick it up.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
3 years agoclk: Add myself as a maintainer for the clock subsystem
Sean Anderson [Wed, 24 Nov 2021 04:23:40 +0000 (23:23 -0500)] 
clk: Add myself as a maintainer for the clock subsystem

Lukasz has not been very responsive in reviewing clock patches. Add
myself as a maintainer.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Acked-by: Lukasz Majewski <lukma@denx.de>
3 years agoMerge tag 'efi-2022-01-rc3-2' of https://source.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Fri, 26 Nov 2021 22:10:53 +0000 (17:10 -0500)] 
Merge tag 'efi-2022-01-rc3-2' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request for efi-2022-01-rc3-2

Test:
* fix pylint warnings

UEFI:
* disable interrupts before removing devices in ExitBootServices()
* implement poweroff in efi_system_reset() on sandbox
* allow booting via EFI even if some block device fails

3 years agotest: fix pylint error in u_boot_console_exec_attach.py
Heinrich Schuchardt [Mon, 22 Nov 2021 23:01:49 +0000 (00:01 +0100)] 
test: fix pylint error in u_boot_console_exec_attach.py

* provide module docstring

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agotest: fix pylint error in u_boot_console_sandbox.py
Heinrich Schuchardt [Mon, 22 Nov 2021 23:01:48 +0000 (00:01 +0100)] 
test: fix pylint error in u_boot_console_sandbox.py

* provide module docstring

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agotest: fix pylint errors in u_boot_utils.py
Heinrich Schuchardt [Mon, 22 Nov 2021 23:01:47 +0000 (00:01 +0100)] 
test: fix pylint errors in u_boot_utils.py

* there is no os.path.unlink() method
* don't inherit from object
* add module docstring
* move imports to the top
* avoid unused variable

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agotest: fix pylint errors in u_boot_spawn.py
Heinrich Schuchardt [Mon, 22 Nov 2021 23:01:46 +0000 (00:01 +0100)] 
test: fix pylint errors in u_boot_spawn.py

* don't inherit from object
* imports should be on the top level
* avoid unused variable names
* avoid unnecessary else after raise

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agotest: fix pylint errors in multiplexed_log.py
Heinrich Schuchardt [Mon, 22 Nov 2021 23:01:45 +0000 (00:01 +0100)] 
test: fix pylint errors in multiplexed_log.py

* don't inherit from object
* remove superfluous comprehension
* add module docstring

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agoefi_selftest: simplify endian conversion for FDT test
Heinrich Schuchardt [Thu, 25 Nov 2021 17:55:09 +0000 (18:55 +0100)] 
efi_selftest: simplify endian conversion for FDT test

UEFI code is always little-endian. Remove a superfluous test.

Remove a superfluous type conversion.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
3 years agoefi_loader: segfault in efi_clear_os_indications()
Heinrich Schuchardt [Sat, 20 Nov 2021 10:53:12 +0000 (11:53 +0100)] 
efi_loader: segfault in efi_clear_os_indications()

If we call efi_clear_os_indications() before initializing the memory store
for UEFI variables a NULL pointer dereference occurs.

The error was observed on the sandbox with:

    usb start
    host bind 0 sandbox.img
    load host 0:1 $kernel_addr_r helloworld.efi
    bootefi $kernel_addr_r

Here efi_resister_disk() failed due to an error in the BTRFS implementation.

Move the logic to clear EFI_OS_INDICATIONS_FILE_CAPSULE_DELIVERY_SUPPORTED
to the rest of the capsule code.

If CONFIG_EFI_IGNORE_OSINDICATIONS=y, we should still clear the flag.
If OsIndications does not exist, we should not create it as it is owned by
the operating system.

Fixes: 149108a3eb59 ("efi_loader: clear OsIndications")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
3 years agotest: address some pylint warnings
Heinrich Schuchardt [Mon, 22 Nov 2021 07:24:08 +0000 (08:24 +0100)] 
test: address some pylint warnings

* remove unused variables
* module description must precede import statements
* fix inconsistent return values

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
3 years agosandbox: poweroff in efi_system_reset()
Heinrich Schuchardt [Sat, 20 Nov 2021 13:49:18 +0000 (14:49 +0100)] 
sandbox: poweroff in efi_system_reset()

efi_system_reset() should exit if called with EFI_RESET_SHUTDOWN.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agoefi_loader: efi_disk_register() should not fail
Heinrich Schuchardt [Sat, 20 Nov 2021 12:56:02 +0000 (13:56 +0100)] 
efi_loader: efi_disk_register() should not fail

Our algorithm for creating USB device paths may lead to duplicate device
paths which result in efi_disk_register() failing. Instead we should just
skip devices that cannot be registered as EFI block devices.

Fix a memory leak in efi_disk_add_dev() caused by the duplicate device
path.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
3 years agoefi: Call bootm_disable_interrupts earlier in efi_exit_boot_services
Tom Rini [Fri, 19 Nov 2021 21:33:04 +0000 (16:33 -0500)] 
efi: Call bootm_disable_interrupts earlier in efi_exit_boot_services

If we look at the path that bootm/booti take when preparing to boot the
OS, we see that as part of (or prior to calling do_bootm_states,
explicitly) the process, bootm_disable_interrupts() is called prior to
announce_and_cleanup() which is where udc_disconnect() /
board_quiesce_devices() / dm_remove_devices_flags() are called from.  In
the EFI path, these are called afterwards.  In efi_exit_boot_services()
however we have been calling bootm_disable_interrupts() after the above
functions, as part of ensuring that we disable interrupts as required
by the spec.  However, bootm_disable_interrupts() is also where we go
and call usb_stop().  While this has been fine before, on the TI J721E
platform this leads us to an exception.  This exception seems likely to
be the case that we're trying to stop devices that we have already
disabled clocks for.  The most direct way to handle this particular
problem is to make EFI behave like the do_bootm_states() process and
ensure we call bootm_disable_interrupts() prior to ending up in
usb_stop().

Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Simon Glass <sjg@chromium.org>
Suggested-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
3 years agoversal: Return ENVL_NOWHERE instead of ENVL_UNKNOWN
T Karthik Reddy [Wed, 24 Nov 2021 10:18:55 +0000 (03:18 -0700)] 
versal: Return ENVL_NOWHERE instead of ENVL_UNKNOWN

The system fails to boot without any environment location, so return
ENVL_NOWHERE when there's nowhere to store the environment instead
of ENVL_UNKNOWN.

The same change was also done by commit 50918d0df5cb ("xilinx: Return
ENVL_NOWHERE instead of ENVL_UNKNOWN") for zynq and zynqmp.

Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
3 years agoMerge branch 'efi-2022-01' of https://source.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Sat, 20 Nov 2021 14:36:37 +0000 (09:36 -0500)] 
Merge branch 'efi-2022-01' of https://source.denx.de/u-boot/custodians/u-boot-efi

Scripts:
* Update spelling.txt

LMB:
* remove extern keyword in lmb.h
* drop unused lmb_size_bytes()

Test:
* test truncation in snprintf()

Documentation:
* add include/lmb.h to HTML documentation

UEFI:
* reduce non-debug logging output for measured boot
* fix use after free in measured boot
* startup the tpm device when installing the protocol
* implement EFI_EVENT_GROUP_BEFORE_EXIT_BOOT_SERVICES
* record capsule result only if capsule is read

3 years agoefi_loader: startup the tpm device when installing the protocol
Ilias Apalodimas [Thu, 18 Nov 2021 08:13:42 +0000 (10:13 +0200)] 
efi_loader: startup the tpm device when installing the protocol

Due to U-Boot's lazy binding mentality the TPM is probed but not properly
initialized.  The user can startup the device from the command line
e.g 'tpm2 startup TPM2_SU_CLEAR'.  However we can initialize the TPM during
the TCG protocol installation,  which is easier to use overall.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
3 years agoefi_loader: fix FinalEvents table if an EFI app invoked GetEventLog
Ilias Apalodimas [Thu, 18 Nov 2021 07:03:39 +0000 (09:03 +0200)] 
efi_loader: fix FinalEvents table if an EFI app invoked GetEventLog

As described in the TCG spec [1] in sections 7.1.1 and 7.1.2 the FinalEvent
table should include events after GetEventLog has been called.  This
currently works for us as long as the kernel is the only EFI application
calling that.  Specifically we only implement what's described in 7.1.1.

So refactor the code a bit and support EFI application(s) calling
GetEventLog.  Events will now be logged in both the EventLog and FinalEvent
table as long as ExitBootServices haven't been invoked.

[1] https://trustedcomputinggroup.org/wp-content/uploads/EFI-Protocol-Specification-rev13-160330final.pdf

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
3 years agoefi_loader: bump EFI_SPECIFICATION_VERSION to 2.9
Heinrich Schuchardt [Wed, 17 Nov 2021 17:55:59 +0000 (18:55 +0100)] 
efi_loader: bump EFI_SPECIFICATION_VERSION to 2.9

We have implemented all what is new in UEFI specification 2.9 and relevant
for U-Boot.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
3 years agoefi_selftest: unit test for EFI_GROUP_BEFORE_EXIT_BOOT_SERVICE
Heinrich Schuchardt [Wed, 17 Nov 2021 17:52:35 +0000 (18:52 +0100)] 
efi_selftest: unit test for EFI_GROUP_BEFORE_EXIT_BOOT_SERVICE

Add a test for the EFI_GROUP_BEFORE_EXIT_BOOT_SERVICE event group.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
3 years agoefi_loader: EFI_EVENT_GROUP_BEFORE_EXIT_BOOT_SERVICES
Heinrich Schuchardt [Tue, 16 Nov 2021 17:46:27 +0000 (18:46 +0100)] 
efi_loader: EFI_EVENT_GROUP_BEFORE_EXIT_BOOT_SERVICES

Implement the EFI_EVENT_GROUP_BEFORE_EXIT_BOOT_SERVICES event group
handling.

Add the definition of EFI_EVENT_GROUP_AFTER_READY_TO_BOOT.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
3 years agoefi_loader: capsule: Record capsule result only if capsule is read
Masami Hiramatsu [Fri, 12 Nov 2021 13:05:15 +0000 (22:05 +0900)] 
efi_loader: capsule: Record capsule result only if capsule is read

Record capsule update result only if the capsule file is
successfully read, because the capsule GUID is not sure when
the file can not be read or the file is not a capsule.
Without this fix, if user puts a dummy (non-capsule) file
under (ESP)EFI/UpdateCapsule, U-Boot causes a synchronous
abort.

This also fixes use-after-free bug of the 'capsule' variable.

Fixes: c74cd8bd08d1 ("efi_loader: capsule: add capsule_on_disk support")
Signed-off-by: Masami Hiramatsu <masami.hiramatsu@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
3 years agoefi_loader: Reduce efi_tcg2 logging statement
Masahisa Kojima [Tue, 9 Nov 2021 11:35:53 +0000 (20:35 +0900)] 
efi_loader: Reduce efi_tcg2 logging statement

log_info() is used for the debug level logging statement
which should use log_debug() instead. Convert it to reduce the
log output.

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
3 years agoefi_loader: Sphinx comments in efi_api.h
Heinrich Schuchardt [Sat, 20 Nov 2021 08:28:54 +0000 (09:28 +0100)] 
efi_loader: Sphinx comments in efi_api.h

Fix incorrect Sphinx comments in efi_api.h:

* add missing 'struct'
* correct indentation

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
3 years agoefi: add comment for efi_system_table and efi_configuration_table
Masahisa Kojima [Fri, 12 Nov 2021 07:24:27 +0000 (16:24 +0900)] 
efi: add comment for efi_system_table and efi_configuration_table

This commit adds the comment for efi_system_table and
efi_configuration_table structure.

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
3 years agodoc: fix typos in trace.rst
Heinrich Schuchardt [Tue, 16 Nov 2021 17:38:47 +0000 (18:38 +0100)] 
doc: fix typos in trace.rst

Fix obvious typos. Use US spelling consistently.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
3 years agoscripts: update spelling.txt from upstream Linux
Heinrich Schuchardt [Tue, 16 Nov 2021 17:56:43 +0000 (18:56 +0100)] 
scripts: update spelling.txt from upstream Linux

This list is used by checkpatch.pl. The Linux v5.15 version has several
words that where mispelled in U-Boot too.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
3 years agotest: test truncation in snprintf()
Heinrich Schuchardt [Mon, 15 Nov 2021 18:06:55 +0000 (19:06 +0100)] 
test: test truncation in snprintf()

Test that the return value of snprintf() is correct in the case of
truncation.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agolmb: fix typo 'commun'
Heinrich Schuchardt [Sun, 14 Nov 2021 08:38:53 +0000 (09:38 +0100)] 
lmb: fix typo 'commun'

%s/commun/common/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
3 years agolmb: drop unused lmb_size_bytes()
Heinrich Schuchardt [Sun, 14 Nov 2021 08:03:27 +0000 (09:03 +0100)] 
lmb: drop unused lmb_size_bytes()

lmb_size_bytes() is unused.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
3 years agolmb: remove extern keyword in lmb.h
Heinrich Schuchardt [Sun, 14 Nov 2021 07:52:48 +0000 (08:52 +0100)] 
lmb: remove extern keyword in lmb.h

The extern keyword is not needed in include/lmb.h to declare functions.
Remove it.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
3 years agodoc: add include/lmb.h to the HTML documentation
Heinrich Schuchardt [Sun, 14 Nov 2021 07:43:07 +0000 (08:43 +0100)] 
doc: add include/lmb.h to the HTML documentation

Correct Sphinx style comments in include/lmb.h

Add the logical memory block API to the HTML documentation.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
3 years agolmb: remove lmb_is_nomap() from include
Heinrich Schuchardt [Sun, 14 Nov 2021 07:41:07 +0000 (08:41 +0100)] 
lmb: remove lmb_is_nomap() from include

Defining static functions in includes should be avoided.
Function lmb_is_nomap() is only used in the unit test.
So move it to the unit test.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
3 years agoMerge tag 'u-boot-amlogic-20211119' of https://source.denx.de/u-boot/custodians/u...
Tom Rini [Fri, 19 Nov 2021 21:33:33 +0000 (16:33 -0500)] 
Merge tag 'u-boot-amlogic-20211119' of https://source.denx.de/u-boot/custodians/u-boot-amlogic

- pinctrl: Correct the driver GPIO declaration
- meson64_android: handle errors on boot and run fastboot on boot failure

3 years agoMerge tag 'tpm-19112021' of https://source.denx.de/u-boot/custodians/u-boot-tpm
Tom Rini [Fri, 19 Nov 2021 21:33:23 +0000 (16:33 -0500)] 
Merge tag 'tpm-19112021' of https://source.denx.de/u-boot/custodians/u-boot-tpm

TPM1.2 and Atmel fixes

# gpg verification failed.

3 years agoconfigs: meson64_android: add PANIC stage for SYSTEM fails
Neil Armstrong [Wed, 17 Nov 2021 11:04:11 +0000 (12:04 +0100)] 
configs: meson64_android: add PANIC stage for SYSTEM fails

If bootloader was updated without running oem format, reboot will cause
boot loop because the SYSTEM stage fails.

Add a final PANIC stage running fastboot to permit recovery.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
3 years agoconfigs: meson64_android: bypass other checks on run_fastboot=1
Neil Armstrong [Wed, 17 Nov 2021 11:04:10 +0000 (12:04 +0100)] 
configs: meson64_android: bypass other checks on run_fastboot=1

This can lead to GPT and BCB errors even if fastboot was selected early
by usb rom boot and the eMMC is blank/invalid.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
3 years agopinctrl: meson: Correct the driver GPIO declaration
Simon Glass [Sat, 13 Nov 2021 14:07:15 +0000 (07:07 -0700)] 
pinctrl: meson: Correct the driver GPIO declaration

This should use the provided U_BOOT_DRIVER() macro so that the driver gets
added to the appropriate linker list. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: 7c9dcfed50f ("pinctrl: meson: rework gx pmx function")
Reported-by: Tom Rini <trini@konsulko.com>
Tested-by: Tom Rini <trini@konsulko.com> on libretech-cc
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
3 years agoMerge branch '2021-11-18-regression-fixes'
Tom Rini [Thu, 18 Nov 2021 23:25:19 +0000 (18:25 -0500)] 
Merge branch '2021-11-18-regression-fixes'

- An assortment of fixes related to GD, GD_FLG_SKIP_RELOC, and the lmb
- Environment fix on synquacer developmentbox
- Fix for get_info is not valid in partition code

3 years agoarm64: Add missing GD_FLG_SKIP_RELOC handling
Marek Vasut [Sat, 13 Nov 2021 17:34:59 +0000 (18:34 +0100)] 
arm64: Add missing GD_FLG_SKIP_RELOC handling

In case U-Boot enters relocation with GD_FLG_SKIP_RELOC, skip the
relocation. The code still has to set up new_gd pointer and new
stack pointer.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
3 years agolmb: Reserve U-Boot separately if relocation is disabled
Marek Vasut [Sat, 13 Nov 2021 17:34:37 +0000 (18:34 +0100)] 
lmb: Reserve U-Boot separately if relocation is disabled

In case U-Boot starts with GD_FLG_SKIP_RELOC, the U-Boot code is
not relocated, however the stack and heap is at the end of DRAM
after relocation. Reserve a LMB area for the non-relocated U-Boot
code so it won't be overwritten.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
3 years agoboard_f: Copy GD to new GD even if relocation disabled
Marek Vasut [Sat, 13 Nov 2021 17:34:04 +0000 (18:34 +0100)] 
board_f: Copy GD to new GD even if relocation disabled

Even if U-Boot has relocation disabled via GD_FLG_SKIP_RELOC , the
relocated stage of U-Boot still picks GD from new_gd location. The
U-Boot itself is not relocated, but GD might be, so copy the GD to
new GD location even if relocation is disabled.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Peng Fan <peng.fan@oss.nxp.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
3 years agopart: return -ENOSYS when get_info not valid.
schspa [Wed, 20 Oct 2021 12:15:55 +0000 (20:15 +0800)] 
part: return -ENOSYS when get_info not valid.

In some case, get_info() interface can be NULL, add this check to stop
from crash.

Signed-off-by: schspa <schspa@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>