Fabio Estevam [Mon, 3 Oct 2022 13:59:24 +0000 (10:59 -0300)]
imx8mn-venice-u-boot: Fix broken boot
When the imx8mm.dtsi file was pulled in from Linux, the UARTs
were moved into an spba sub-node which wasn't being included
in the SPL device tree. This meant the references to the UART
weren't being handled properly and when booting the system would
constantly reboot. Fix this by adding the spba node to the spl
device tree to restore normal booting.
Based on the patch from Adam Ford for the imx8mn-beacon-kit-u-boot
board.
Fixes:
4e5114daf9eb ("imx8mn: synchronise device tree with linux")
Signed-off-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com>
Fabio Estevam [Mon, 3 Oct 2022 13:39:21 +0000 (10:39 -0300)]
imx8mn-ddr4-evk-u-boot: Fix broken boot
When the imx8mm.dtsi file was pulled in from Linux, the UARTs
were moved into an spba sub-node which wasn't being included
in the SPL device tree. This meant the references to the UART
weren't being handled properly and when booting the system would
constantly reboot. Fix this by adding the spba node to the spl
device tree to restore normal booting.
Based on the patch from Adam Ford for the imx8mn-beacon-kit-u-boot
board.
Fixes:
4e5114daf9eb ("imx8mn: synchronise device tree with linux")
Signed-off-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com>
Tim Harvey [Wed, 28 Sep 2022 21:00:35 +0000 (14:00 -0700)]
board: gateworks: gw_ventana: fix mmc env dev
Fix the MMC env device for boards with eMMC by adding a
board_mmc_get_env_dev override to return the boot device as the
MMC env device.
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Marek Vasut [Wed, 28 Sep 2022 16:45:18 +0000 (18:45 +0200)]
ARM: imx6: dh-imx6: Use sf update instead of sf erase and write
With sf update fixed to support unaligned start offset, use plain
sf update to update the bootloader in SPI NOR. This also helps
avoid the case where not enough SPI NOR has been erased and the
bootloader has been written to unerased area, and thus corrupted.
Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Marek Vasut [Wed, 28 Sep 2022 15:40:11 +0000 (17:40 +0200)]
ARM: imx: Enable btrfs support on DHSOM
The btrfs filesystem provides advanced functionality like copy-on-write
and snapshots, as well as metadata and data duplication and checksumming.
Enable btrfs in U-Boot to permit even the primary partition to be btrfs
and let system boot from it.
Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Ye Li [Wed, 28 Sep 2022 10:19:02 +0000 (15:49 +0530)]
crypto/fsl: fsl_rsa: Fix dcache issue in the driver
issue:
CAAM fails with key error when perform Modular Exponentiation
using PKHA Block in CAAM
Fix:
add flush and invalidate dcache for keys, signature
and output decrypted data processed by CAAM.
Fixes:
34276478f7 (DM: crypto/fsl - Add Freescale rsa DM driver)
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Gaurav Jain <gaurav.jain@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
Marcel Ziswiler [Tue, 27 Sep 2022 15:50:52 +0000 (17:50 +0200)]
apalis/colibri_imx6/-imx6ull/_imx7: update env memory layout
Update the distro config env memory layout for the Apalis iMX6,
Colibri iMX6, Colibri iMX6ULL and Colibri iMX7:
- loadaddr=0x84200000 (resp. 0x14200000 on them i.MX 6) allows for 64MB
area for uncompressing (ie FIT images)
- fdt_addr_r = loadaddr + 64MB : allows for 64MB kernel
- scriptaddr = fdt_addr_r + 512KB : allows for 512KB fdt
- pxefile_addr_r = scriptaddr + 512KB : allows for 512KB script
- ramdisk_addr_r = pxefile_addr_r + 512KB : allows for 1MB extlinux.conf
Memory layout analogous to 64-bit one from commit
fd5c7173ade4
("imx8m{m,n}_venice: update env memory layout") but left pxefile_addr_r
updated according to doc/develop/distro.rst.
This fixes a potential issue caused by the compressed kernel being
relocated on top of the ramdisk causing its corruption.
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Ariel D'Alessandro [Tue, 27 Sep 2022 14:24:53 +0000 (11:24 -0300)]
nitrogen6x: Remove extra quotes in fdtfile
After commit
395110284b56 ("nitrogen6x: Populate FDTFILE at build-time
for all platforms") iMX.6Q Sabrelite fails to boot due to a bad fdtfile
string:
Retrieving file: /dtbs/5.18.0-0.deb11.4-armmp/"imx6q-sabrelite".dtb
** File not found /dtbs/5.18.0-0.deb11.4-armmp/"imx6q-sabrelite".dtb **
CONFIG_DEFAULT_DEVICE_TREE option is string typed, so __stringify() is
adding extra quotes. Remove this.
Signed-off-by: Ariel D'Alessandro <ariel.dalessandro@collabora.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
Acked-by: Troy Kisky <troy.kisky@boundarydevices.com>
Fabio Estevam [Mon, 26 Sep 2022 16:40:11 +0000 (13:40 -0300)]
clk-imx8mm: Only build QSPI clocks when CONFIG_NXP_FSPI=y
The QSPI clocks are only used when CONFIG_NXP_FSPI=y, so only build the
QSPI clocks in this case to reduce the final SPL binary size.
Signed-off-by: Fabio Estevam <festevam@denx.de>
Fabio Estevam [Mon, 26 Sep 2022 16:40:10 +0000 (13:40 -0300)]
clk-imx8mm: Only build ecspi clocks when CONFIG_DM_SPI=y
The ecspi clocks are only used when CONFIG_DM_SPI=y, so only build the
ecspi clocks in this case to reduce the final SPL binary size.
Signed-off-by: Fabio Estevam <festevam@denx.de>
Fabio Estevam [Mon, 26 Sep 2022 16:40:09 +0000 (13:40 -0300)]
clk-imx8mm: Move CLK_ENET_AXI to the non-SPL section
Ethernet is not used inside SPL, so move the IMX8MM_CLK_ENET_AXI clock
inside the non-SPL block to reduce the final SPL binary size.
Signed-off-by: Fabio Estevam <festevam@denx.de>
Fabio Estevam [Mon, 26 Sep 2022 16:40:08 +0000 (13:40 -0300)]
clk-imx8mm: Only build PWM clocks in non-SPL code
PWM is not used inside SPL, so do not define the PWM clocks inside
SPL to reduce the final SPL binary size.
Signed-off-by: Fabio Estevam <festevam@denx.de>
Ye Li [Fri, 23 Sep 2022 22:29:33 +0000 (00:29 +0200)]
mmc: fsl_esdhc: fix problem when using clk driver
Move init_clk_usdhc to non-clk driver case, since assigned-clocks properties
will initialize the clocks by clk driver.
Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Marcel Ziswiler [Wed, 21 Sep 2022 11:34:19 +0000 (13:34 +0200)]
verdin-imx8mm: verdin-imx8mp: drop obsolete net/phy configs
Drop obsolete networking/PHY related configuration defines.
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Soeren Moch [Tue, 20 Sep 2022 16:05:41 +0000 (18:05 +0200)]
board: tbs2910: Add serial rx buffer in defconfig
... to avoid loosing characters when pasting text into the serial console.
This allows to remove the workaround to disable the vidconsole output
when no HDMI device is detected. This workaround only was there to speed-up
serial console processing.
Signed-off-by: Soeren Moch <smoch@web.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
Soeren Moch [Tue, 20 Sep 2022 16:05:40 +0000 (18:05 +0200)]
board: tbs2910: Set all board dts files as maintained
This also includes the imx6q-tbs2910-u-boot.dtsi file now.
Signed-off-by: Soeren Moch <smoch@web.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
Fabio Estevam [Tue, 20 Sep 2022 00:20:14 +0000 (21:20 -0300)]
imx8mm_evk: Add Serial Download Protocol support
Add Serial Download Protocol support as it is a useful method to
load flash.bin to RAM and run it via 'uuu'.
With this patch, it is possible to start both U-Boot SPL and U-Boot
proper using the following 'uuu'command:
$ uuu -brun spl flash.bin
Based on a patch from Marek Vasut for the imx8mm-mx8menlo board.
Also, to fit the SPL binary into the internal RAM, select CONFIG_LTO
to reduce its size.
Signed-off-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Fabio Estevam [Tue, 20 Sep 2022 00:20:13 +0000 (21:20 -0300)]
imx8mm_evk: Add an entry for USB boot
Add an entry for USB boot so that U-Boot could be loaded via
the Serial Download Protocol.
Signed-off-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Marek Vasut [Mon, 19 Sep 2022 19:41:18 +0000 (21:41 +0200)]
ARM: dts: imx8m: imx8mm-mx8menlo: Enable SPL SDP support
Enable DM USB, DM PHY and USB gadget support in imx8mm-mx8menlo SPL
to let the board continue SDP loading of second stage after the first
stage was loaded by BootROM SDP implementation. It is not possible to
jump back into BootROM v1 and let the BootROM implementation continue
the SDP loading, all this has to be performed by the U-Boot CI HDRC
controller driver and SDP protocol implementation, both of which fit
into the SPL just barely.
With this patch, it is possible to start both U-Boot SPL and U-Boot
using e.g. uuu on this board as follows:
$ uuu -brun spl flash.bin
Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Marek Vasut [Mon, 19 Sep 2022 19:41:17 +0000 (21:41 +0200)]
ARM: imx8m: verdin-imx8mm: Drop bogus content from spl_board_init()
The current implementation of spl_board_init() USB boot handling is
not correct, the MX8MM BootROM v1 does not support SDP load when
re-entered from U-Boot SPL, it is up to U-Boot to perform the next
stage load using its own internal CI gadget driver and SDP protocol
implementation. Drop the spl_board_init() to let SPL continue with
normal load in case the SDP support is enabled.
Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Marek Vasut [Mon, 19 Sep 2022 19:41:16 +0000 (21:41 +0200)]
ARM: imx8m: phycore_imx8mm: Drop bogus spl_board_init()
The current implementation of spl_board_init() is not correct,
the MX8MM BootROM v1 does not support SDP load when re-entered
from U-Boot SPL, it is up to U-Boot to perform the next stage
load using its own internal CI gadget driver and SDP protocol
implementation. Drop the spl_board_init() to let SPL continue
with normal load in case the SDP support is enabled.
Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Marek Vasut [Mon, 19 Sep 2022 19:41:15 +0000 (21:41 +0200)]
ARM: imx8m: Deduplicate CAAM init with arch_misc_init() call
Instead of duplicating code implemented by i.MX8M version of arch_misc_init()
in every board, enable CONFIG_ARCH_MISC_INIT and call arch_misc_init() from
spl_board_init(). This removes the duplication. No functional change.
Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Mihai Sain [Mon, 17 Oct 2022 08:37:11 +0000 (11:37 +0300)]
ARM: dts: at91: sama7g5: fix signal name of pin PB2
The signal name of pin PB2 with function F is FLEXCOM11_IO1
as it is defined in the datasheet.
Fixes:
558378a4cd ("ARM: mach-at91: add support for new SoC sama7g5")
Signed-off-by: Mihai Sain <mihai.sain@microchip.com>
Dario Binacchi [Tue, 20 Sep 2022 08:32:47 +0000 (10:32 +0200)]
ARM: dts: at91: sam9x60ek: fix indentation for pinctrl sub-nodes
The indentation went far on the right due to an extra tab for
each pinctrl sub-nodes.
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com>
Tom Rini [Fri, 21 Oct 2022 02:32:38 +0000 (22:32 -0400)]
Merge tag 'u-boot-rockchip-
20221020' of https://source.denx.de/u-boot/custodians/u-boot-rockchip
- dts update and sync for rk356x, rk3288, rk3399 from Linux;
- Add rk3399 EAIDK-610 board support;
- Update for puma-rk3399 board;
- some fix and typo fix in different drivers;
Marek Vasut [Mon, 19 Sep 2022 19:35:56 +0000 (21:35 +0200)]
ARM: dts: imx8mm: Swap i.MX8M Mini Menlo board UARTs back
The first production revision of the MX8M Mini Menlo board implements
a hardware change which swaps console UART and another UART connector.
Implement the swap, which maps the console UART back to the way Verdin
console is mapped.
Signed-off-by: Marek Vasut <marex@denx.de>
Tim Harvey [Fri, 9 Sep 2022 22:58:42 +0000 (15:58 -0700)]
arm: dts: imx8mm-venice-gw7903: add dig1_ctl and dig2_ctl gpios
The GW7903 revision B adds two additional GPIO's to control the
direction of the 2 isolated digital I/O circuits.
Define them as:
- dig1_ctl
- dig2_ctl
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Tim Harvey [Thu, 8 Sep 2022 21:41:09 +0000 (14:41 -0700)]
board: gateworks: venice: update GW74xx PMIC config
Update the GW74xx PMIC configuration:
- increase VDD_SOC DVS1 to 0.85V per datasheet
- increase VDD_SOC DVS0 to 0.95V before first DRAM access
- increase VDD_ARM DVS0 to 0.95V to support kernel overdrive voltage (OD)
- remove unnecessary changes to VDD_DRAM as we don't use 3GHz DRAM
- remove unnecessary change to LDO2 as it is unused
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
v2: update commit log with more detail
Tim Harvey [Thu, 8 Sep 2022 20:42:01 +0000 (13:42 -0700)]
arm: dts: imx8mp-venice-gw74xx: update M2 gpio hogs
Update the M2 socket gpio hogs such that they are not active on boot by
flagging them as GPIO_ACTIVE_HIGH so that 'output-high' drives high.
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Tim Harvey [Thu, 8 Sep 2022 20:41:08 +0000 (13:41 -0700)]
arm: dts: imx8mp-venice-gw74xx: fix uart configuration gpio hogs
Update the UART config gpio hogs such that it is configured for RS232
by default on boot. Additionally rename them to match the names used
on the reset of the venice boards.
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Francesco Dolcini [Wed, 7 Sep 2022 09:51:05 +0000 (11:51 +0200)]
ARM: imx8mp: verdin-imx8mp: Add memory size detection
Add RAM auto-sizing, without this change memory size for all SKU is set
to 8GB and the system will crash on SKU with less memory as soon as the
non existent memory addresses are accessed.
Fixes:
2bc2f817cea7 ("board: toradex: add verdin imx8m plus support")
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Philippe Schenker [Mon, 29 Aug 2022 17:59:53 +0000 (19:59 +0200)]
board: verdin-imx8mp: add call to ft_common_board_setup
With this call the following attributes get set to the device-tree
and are then accessible from linux in /proc/device-tree/
serial-number: The serial number that is stored in config-block
toradex,board-rev: The version of the module (e.g. V1.1A)
toradex,product-id: The SKU number of the module runnin
Fixes: commit
2bc2f817cea7 ("board: toradex: add verdin imx8m plus support")
Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Philippe Schenker [Mon, 29 Aug 2022 17:59:52 +0000 (19:59 +0200)]
board: verdin-imx8mm: add call to ft_common_board_setup
With this call the following attributes get set to the device-tree
and are then accessible from linux in /proc/device-tree/
serial-number: The serial number that is stored in config-block
toradex,board-rev: The version of the module (e.g. V1.1A)
toradex,product-id: The SKU number of the module running
Fixes: commit
14d5aeff776b ("board: toradex: Add Verdin iMX8M Mini support")
Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Frieder Schrempf [Wed, 24 Aug 2022 13:59:20 +0000 (15:59 +0200)]
imx: kontron-sl-mx8mm: Prepare for I2C display detection in environment script
Enable the I2C bus and set a env variable for the reset GPIO of the touch
controller. This allows us to probe the panel in a script.
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
Frieder Schrempf [Wed, 24 Aug 2022 13:59:19 +0000 (15:59 +0200)]
imx: kontron-sl-mx8mm: Add support for Kontron Electronics SoM SL i.MX8MM OSM-S
This adds support for the Kontron Electronics SoM SL i.MX8MM OSM-S
and the matching baseboard BL i.MX8MM OSM-S.
The SoM hardware complies to the Open Standard Module (OSM) 1.0
specification, size S (https://sget.org/standards/osm).
The existing board configuration for the non-OSM SoM is reused and
allows to detect the SoM variant at runtime.
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
Frieder Schrempf [Wed, 24 Aug 2022 13:59:18 +0000 (15:59 +0200)]
imx: kontron-sl-mx8mm: Simplify code in spl.c
Refactor the code a bit without any functional changes.
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
Frieder Schrempf [Wed, 24 Aug 2022 13:59:17 +0000 (15:59 +0200)]
imx: kontron-sl-mx8mm: Use voltage rail names from schematic for PMIC regulator-names
Improve the naming of the regulators to contain the voltage rail
names from the schematic.
Suggested-by: Heiko Thiery <heiko.thiery@gmail.com>
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
Frieder Schrempf [Wed, 24 Aug 2022 13:59:16 +0000 (15:59 +0200)]
imx: kontron-sl-mx8mm: Use the VSELECT signal to switch SD card IO voltage
It turns out that it is not necessary to declare the VSELECT signal as
GPIO and let the PMIC driver set it to a fixed high level. This switches
the voltage between 3.3V and 1.8V by setting the PMIC register for LDO5
accordingly.
Instead we can do it like other boards already do and simply mux the
VSELECT signal of the USDHC interface to the pin. This makes sure that
the correct voltage is selected by setting the PMIC's SD_VSEL input
to high or low accordingly.
Reported-by: Heiko Thiery <heiko.thiery@gmail.com>
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Heiko Thiery <heiko.thiery@gmail.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
Frieder Schrempf [Wed, 24 Aug 2022 13:59:15 +0000 (15:59 +0200)]
imx: kontron-sl-mx8mm: Adjust devicetree names, compatibles and model strings
This adjusts the names of the boards and SoMs to the official naming
used by Kontron marketing. These changes also affect devicetree
names and compatibles. The same changes have been submitted to the
Linux kernel.
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
Frieder Schrempf [Wed, 24 Aug 2022 13:59:14 +0000 (15:59 +0200)]
imx: kontron-sl-mx8mm: Prepare for other i.MX8MM SoM types
This sets an env variable 'som_type' from the board code. It can
later be used by environment scripts, e. g. to select the proper
devicetree for the board.
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
Frieder Schrempf [Wed, 24 Aug 2022 13:59:13 +0000 (15:59 +0200)]
imx: kontron-sl-mx8mm: Use new LPDDR4 config parameters
These parameters are needed for stable performance on new hardware
with Nanya LPDDR4 chips.
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
Frieder Schrempf [Wed, 24 Aug 2022 13:59:12 +0000 (15:59 +0200)]
imx: kontron-sl-mx8mm: Remove 100mt DDR setpoint
The new stable configuration is missing the 100mt setpoint, remove
it before updating the config to make sure the changes are separated
cleanly.
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
Frieder Schrempf [Wed, 24 Aug 2022 13:59:11 +0000 (15:59 +0200)]
imx: kontron-sl-mx8mm: lpddr4_timing.c: Add spaces for proper alignment
Fix the spaces and alignment for easier tracking of changes and comparing
with configs generated by the tools.
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
Frieder Schrempf [Wed, 24 Aug 2022 13:59:10 +0000 (15:59 +0200)]
imx: kontron-sl-mx8mm: Enable bootaux command
Enable the bootaux command in order to be able to load a
binary into the M4 core when needed.
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
Frieder Schrempf [Wed, 24 Aug 2022 13:59:09 +0000 (15:59 +0200)]
imx: kontron-sl-mx8mm: Migrate to use CONFIG_EXTRA_ENV_TEXT
Move the environment from the board header to a separate text file
and also drop those variables that are already set in env_default.h
from the Kconfig options.
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
Frieder Schrempf [Wed, 24 Aug 2022 13:59:08 +0000 (15:59 +0200)]
imx: kontron-sl-mx8mm: Enable environment in MMC
In case we boot from SD card or eMMC, we also want to load
the environment from the according boot device.
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
Frieder Schrempf [Wed, 24 Aug 2022 13:59:07 +0000 (15:59 +0200)]
imx: kontron-sl-mx8mm: Add redundant environment and SPI NOR partitions
Enable the redundant environment feature to allow falling back in case of
storage corruption. The partition layout for the SPI NOR device is added
to the devicetree.
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
Frieder Schrempf [Wed, 24 Aug 2022 13:59:06 +0000 (15:59 +0200)]
imx: kontron-sl-mx8mm: Enable MTD command
Enable the MTD command to be used for the SPI NOR on the SoM.
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
Frieder Schrempf [Wed, 24 Aug 2022 13:59:05 +0000 (15:59 +0200)]
imx: kontron-sl-mx8mm: Increase CONFIG_SYS_CBSIZE to 2K
This allows using the command line with longer lines like
large scripts in env variables.
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
Frieder Schrempf [Wed, 24 Aug 2022 13:59:04 +0000 (15:59 +0200)]
imx: kontron-sl-mx8mm: Remove custom board_boot_order() workaround
Nowadays detecting the SPI NOR as boot device from the ROMAPI is
fixed and works even if the SPI NOR is used as fallback boot device.
Therefore we don't need this workaround anymore.
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
Frieder Schrempf [Wed, 24 Aug 2022 13:52:24 +0000 (15:52 +0200)]
imx: kontron-sl-mx8mm: Add support for loading from SPI NOR in SPL
This was initially enabled, but got accidentally dropped while
migrating Kconfig options and resyncing the defconfig in:
commit
9802154a94d6 ("configs: Resync with savedefconfig")
Let's enable this again to be able to boot from SPI NOR.
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
Frieder Schrempf [Wed, 24 Aug 2022 13:52:23 +0000 (15:52 +0200)]
imx: kontron-sl-mx8mm: Remove LVDS board type and devicetrees
The display isn't and won't be used in U-Boot. Also the display setup
is not yet supported in mainline Linux, so even for cases where the
U-Boot devicetree is passed to the kernel there is currently no use
for this configuration.
Selecting the proper configuration in the kernel FIT image automatically
depending on the detected hardware can be handled by a script in the
environment.
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
Frieder Schrempf [Tue, 23 Aug 2022 14:29:15 +0000 (16:29 +0200)]
imx: imx6ul: kontron-sl-mx6ul: Sync devicetrees
Sync the devicetrees with Linux and adjust the board names.
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Frieder Schrempf [Tue, 23 Aug 2022 14:29:14 +0000 (16:29 +0200)]
imx: imx6ul: kontron-sl-mx6ul: Migrate to use CONFIG_EXTRA_ENV_TEXT
Move the environment from the board header to a separate text file
and also drop those variables that are already set in env_default.h
from the Kconfig options or are not needed anymore.
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Frieder Schrempf [Tue, 23 Aug 2022 14:29:13 +0000 (16:29 +0200)]
imx: imx6ul: kontron-sl-mx6ul: Select correct boot and env device
Instead of checking both, SPI NOR and MMC for loading U-Boot proper
and the environment, implement a way to detect the actual boot
device even if the BootROM doesn't report it and we can't rely
solely on the fuse settings, as by default we use MMC as primary
boot device and boot from SPI NOR via the secondary fallback device
(EEPROM Recovery Mode).
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Frieder Schrempf [Tue, 23 Aug 2022 14:29:12 +0000 (16:29 +0200)]
imx: imx6ul: kontron-sl-mx6ul: Fix CONFIG_ENV_SPI_BUS
The SPI NOR is on ECSPI1 so CONFIG_ENV_SPI_BUS should be 1
to detect the environment on the SPI NOR.
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Frieder Schrempf [Tue, 23 Aug 2022 14:29:11 +0000 (16:29 +0200)]
imx: imx6ul: kontron-sl-mx6ul: Enable migrated Kconfig options
The board support was merged at the same time as some Kconfig options
for SPL were migrated/renamed. As a result some essential features
like serial output, MMC support, etc. are currently missing. Fix this
by enabling the required options.
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Frieder Schrempf [Tue, 23 Aug 2022 14:29:10 +0000 (16:29 +0200)]
Makefile: Make flash.bin target available for all platforms
There is no reason for restricting the use of the flash.bin target
to the i.MX8 platform. Others can benefit from this as well.
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Tim Harvey [Thu, 11 Aug 2022 19:04:01 +0000 (12:04 -0700)]
board: gateworks: venice: rename eeprom_init
rename eeprom_init to avoid build failure when using CMD_EEPROM.
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Tim Harvey [Thu, 11 Aug 2022 19:02:48 +0000 (12:02 -0700)]
arm: dts: imx8mm-venice-gw7902: add LTE modem gpios
Add missing LTE_PWR# and LTE_RST gpio pinmux.
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
Tim Harvey [Thu, 11 Aug 2022 18:53:32 +0000 (11:53 -0700)]
imx8*_venice_defconfig: configure default MMC env device
When booting from USB/SDP mmc_get_env_dev() returns
CONFIG_SYS_MMC_ENV_DEV as the MMC env device (while booting from MMC
will call board_mmc_get_env_dev() to get this). Configure
CONFIG_SYS_MMC_ENV_DEV for SDHC3 (devno=2) as all Gateworks Venice
boards use SDHC3 as eMMC so that persistent env works when booting from
USB/SDP.
Reviewed-by: Fabio Estevam <festevam@denx.de>
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Tom Rini [Thu, 20 Oct 2022 13:11:08 +0000 (09:11 -0400)]
Merge https://source.denx.de/u-boot/custodians/u-boot-riscv
Tom Rini [Thu, 20 Oct 2022 12:58:25 +0000 (08:58 -0400)]
Merge tag 'clk-2023.01' of https://source.denx.de/u-boot/custodians/u-boot-clk
Clock patches for 2023.01
This contains various fixes (some long overdue) for the next release.
Tom Rini [Thu, 20 Oct 2022 12:58:05 +0000 (08:58 -0400)]
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sunxi
Beside some rather unexciting sync of the DTs from the kernel tree, and
some Kconfig cleanup, there are some improvements for the ARMv5 Allwinner
family, to support boards with the F1C200s (64MB DRAM) better. We will
get actual board support as soon as the DTs have passed the Linux review
process.
There is also support for the X96 Mate TV Box, featuring the H616 SoC and
a full 4GB of DRAM.
Also we found the secret to enable SPI booting on the H616 (pin PC5 must
be pulled to GND), so the SPI boot support patch is now good to go.
Passed the gitlab CI, plus briefly tested on Pine64-LTS, LicheePi Nano,
X96 Mate and OrangePi Zero.
Rick Chen [Thu, 20 Oct 2022 05:56:17 +0000 (13:56 +0800)]
riscv: ae350: Check firmware_fdt_addr header
Check firmware_fdt_addr header to see if it
is a valid fdt blob.
Signed-off-by: Rick Chen <rick@andestech.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Yu Chien Peter Lin [Fri, 14 Oct 2022 07:00:18 +0000 (15:00 +0800)]
riscv: andes_plic.c: use modified IPI scheme
The IPI scheme in OpenSBI has been updated to support 8-core AE350
platform, the plicsw configuration needs to be modified accordingly.
Signed-off-by: Yu Chien Peter Lin <peterlin@andestech.com>
Reviewed-by: Rick Chen <rick@andestech.com>
Bin Meng [Sun, 16 Oct 2022 16:42:06 +0000 (00:42 +0800)]
riscv: qemu: spl: Fix booting Linux kernel with OpenSBI 1.0+
Since OpenSBI commit
bf3ef53bb7f5 ("firmware: Enable FW_PIC by default"),
OpenSBI runs directly at the load address without any code movement.
This causes the SPL version of QEMU 'virt' U-Boot does not boot Linux
kernel anymore. In that case, OpenSBI is loaded and runs at 0x81000000,
and it creates a 512KiB PMP window from that address. When booting
the Linux kernel, moving kernel to its linking address 0x80200000
overlaps the PMP window, and a PMP access failure is raised.
Update SPL_OPENSBI_LOAD_ADDR to load OpenSBI to a safe address.
Reported-by: Yangjie Zhang <pyjmstr@gmail.com>
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Yangjie Zhang <pyjmstr@gmail.com>
Reviewed-by: Rick Chen <rick@andestech.com>
Heinrich Schuchardt [Sun, 16 Oct 2022 16:12:32 +0000 (18:12 +0200)]
k210: fix k210_pll_calc_config()
The k210 driver is selected by sandbox_defconfig.
Building the sandbox on 32bit systems fails with:
test/dm/k210_pll.c: In function ‘dm_test_k210_pll_calc_config’:
include/linux/bitops.h:11:38: warning:
left shift count >= width of type [-Wshift-count-overflow]
11 | #define BIT(nr) (1UL << (nr))
| ^~
test/dm/k210_pll.c:36:54: note: in expansion of macro ‘BIT’
36 | error = abs((error - BIT(32))) >> 16;
| ^~~
Use the BIT_ULL() macro to create a u64 value.
Replace abs() by abs64() to get correct results on 32bit system
Apply the same for the unit test.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Sean Anderson <seanga2@gmail.com>
Heinrich Schuchardt [Wed, 12 Oct 2022 12:59:51 +0000 (14:59 +0200)]
riscv: support building double-float modules
The riscv32 toolchain for GCC-12 provided by kernel.org contains libgcc.a
compiled for double-float. To link to it we have to adjust how we build
U-Boot.
As U-Boot actually does not use floating point at all this should not
make a significant difference for the produced binaries.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Rick Chen <rick@andestech.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Heinrich Schuchardt [Tue, 4 Oct 2022 08:09:54 +0000 (10:09 +0200)]
cmd/sbi: user friendly short texts
In the sbi command use the same short texts for the legacy extensions
as the SBI specification 1.0.0.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Rick Chen <rick@andestech.com>
Heinrich Schuchardt [Tue, 4 Oct 2022 08:09:53 +0000 (10:09 +0200)]
cmd/sbi: error message for failure to get spec version
If calling 'Get SBI specification version' fails, write an error message
and return CMD_RET_FAILURE.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Rick Chen <rick@andestech.com>
Heinrich Schuchardt [Tue, 4 Oct 2022 08:09:52 +0000 (10:09 +0200)]
cmd/sbi: format RustSBI version number
The SBI command can print out the version number of the SBI implementation.
Choose the correct output format for RustSBI.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Rick Chen <rick@andestech.com>
Patrick Delaunay [Mon, 20 Jun 2022 13:37:25 +0000 (15:37 +0200)]
clk: update clk_clean_rate_cache to use private clk struct
In clk_clean_rate_cache, clk->rate should update the private clock
struct, in particular when CCF is activated, to save the cached
rate value.
When clk_get_parent_rate is called, the cached information
is read from pclk->rate, with pclk = clk_get_parent(clk).
As the cached is read from private clk data, the update should
be done also on it.
Fixes:
6b7fd3128f7 ("clk: fix set_rate to clean up cached rates for the hierarchy")
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Sean Anderson <seanga2@gmail.com>
Link: https://lore.kernel.org/r/20220620153717.v2.1.Ifa06360115ffa3f3307372e6cdd98ec16759d6ba@changeid
Link: https://lore.kernel.org/r/20220712142352.RESEND.v2.1.Ifa06360115ffa3f3307372e6cdd98ec16759d6ba@changeid/
Michal Suchanek [Wed, 28 Sep 2022 10:41:29 +0000 (12:41 +0200)]
rockchip: clk: pll: Fix constant typo
Fixes:
bbda2ed584 ("rockchip: clk: pll: add common pll setting funcs")
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
Link: https://lore.kernel.org/r/20220928104129.13240-1-msuchanek@suse.de
Michal Suchanek [Wed, 28 Sep 2022 10:37:57 +0000 (12:37 +0200)]
clk: change return type of clk_get_parent_rate from long long to ulong
All functions getting and setting clock rate use ulong for rate, only
clk_get_parent_rate is an exception. Change the return value to match
other clock rate funcrions.
Most users directly assign the rate to unsigned long anyway, and the few
users that use u64 (not s64) multiply the rate so they may need the
extra bits for the result in their use case.
Fixes:
4aa78300a0 ("dm: clk: Define clk_get_parent_rate() for clk operations")
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Sean Anderson <seanga2@gmail.com>
Link: https://lore.kernel.org/r/20220928103757.11870-1-msuchanek@suse.de
Andre Przywara [Wed, 5 Oct 2022 22:19:54 +0000 (23:19 +0100)]
suniv: add UART1 support
Some boards with the Allwinner F1C100s family SoCs use UART1 for its
debug UART, so define the pins for the SPL and the pinmux name and mux
value for U-Boot proper.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Andre Przywara [Wed, 5 Oct 2022 22:19:28 +0000 (23:19 +0100)]
suniv: move SKIP_LOWLEVEL_INIT_ONLY into Kconfig
So far we stated the lack of a lowlevel() init function for the
Allwinner F1C100s board by defining the respective SKIP_* symbol in the
board's defconfig. However we don't expect any *board* to employ such
low level code, so expect this to be never used for the ARMv5 Allwinner
SoCs.
Select the appropriate symbols in the Kconfig, so that we can remove
them from the defconfig, and avoid putting them in future defconfigs for
other boards.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Andre Przywara [Thu, 6 Oct 2022 17:16:34 +0000 (18:16 +0100)]
sunxi: fix 32MB load address layout
The default load addresses for the various payloads (kernel, DT,
ramdisk) on systems with just 32MB of DRAM have some issues:
For a start the preceding comment doesn't match the actual values:
apparently they were copied from the 64MB S3 layout, then halved, but
since 0x5 is NOT the half of 0x10, they don't match up.
Also those projected maximum sizes are quite restrictive: it's not easy
to build a compressed kernel image with just 4MB. The only defconfig in
mainline Linux that supports the F1C100s (the only 32MB user so far)
creates a 6MB compressed / 15MB uncompressed kernel.
Rearrange the default load addresses to accommodate such a kernel: we
allow an 7MB/16MB kernel, and up to 5MB of ramdisk, stuffing the smaller
binaries like the DTB towards the end, just before the relocated U-Boot.
Shrink the size for DTB and scripts on the way, there is no need for
allowing up to 512K for them.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Andre Przywara [Sat, 2 Jul 2022 23:47:20 +0000 (00:47 +0100)]
sunxi: Kconfig: introduce SUNXI_MINIMUM_DRAM_MB
Traditionally we assumed that every Allwinner board would come with at
least 256 MB of DRAM, and set our DRAM layout accordingly. This affected
both the default load addresses, but also U-Boot's own address
expectations (like being loaded at 160 MB).
Some SoCs come with co-packaged DRAM, but only provide 32 or 64MB. So
far we special-cased those *chips*, as there was only one chip per DRAM
size. However new chips force us to take a more general approach.
Introduce a Kconfig symbol, which provides the minimum DRAM size of the
board. If nothing else is specified, we use 256 MB, and default to
smaller values for those co-packaged SoCs.
Then select the different DRAM maps according to this new symbol, so
that different SoCs with the same DRAM size can share those definitions.
Inspired by an idea from Icenowy.
This is just refactoring: compiled for all boards before and after this
patch: the binaries were identical.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Icenowy Zheng [Thu, 13 Oct 2022 13:26:45 +0000 (21:26 +0800)]
configs: sunxi: licheepi_nano: enable D-Cache
As the compile error when D-Cache is enabled is gone, we can have
D-Cache enabled now.
Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Icenowy Zheng [Thu, 13 Oct 2022 13:26:44 +0000 (21:26 +0800)]
sunxi: fix SUNIV build when enabling D-Cache
The enable_caches function in architecture-specific board code is only
necessary for V7A CPUs, code for both V8A and ARM926 have already
declared this function.
Only provide our implementation of enable_caches() for V7A CPUs.
Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Andre Przywara [Sat, 10 Sep 2022 23:06:19 +0000 (00:06 +0100)]
sunxi: defconfig: Add X96 Mate TV box
The X96 Mate TV box is a TV box with the Allwinner H616 SoC. It is
available with up to 4GB of DRAM and 64GB eMMC.
The DRAM chips require a different configuration when compared to the
OrangePi Zero2, we must not use read/write training and write leveling.
Add a defconfig for the box, so that we can easily build U-Boot for it.
We synced the .dts file already from the kernel tree.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
FUKAUMI Naoki [Tue, 4 Oct 2022 01:30:30 +0000 (01:30 +0000)]
arm: dts: rockchip: rk356x: sync with Linux 6.0
prepare for rk3566 based board
Signed-off-by: FUKAUMI Naoki <naoki@radxa.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Simon Glass [Wed, 28 Sep 2022 02:40:46 +0000 (20:40 -0600)]
rockchip: jerry: Enable RESET driver
At present the display does not work since it needs the reset driver to
operate. Fix this by enabling it.
Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes:
cd529f7ad62 ("rockchip: video: edp: Add missing reset support")
Fixes:
9749d2ea29e ("rockchip: video: vop: Add reset support")
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Quentin Schulz [Thu, 15 Sep 2022 09:14:32 +0000 (11:14 +0200)]
rockchip: puma-rk3399: migrate to u-boot-rockchip-spi.bin
Now that a single binary containing TPL/SPL correctly formatted for SPI
flashes and U-Boot proper, can be generated by binman, let's do it.
Also update the documentation to tell the user to use this newly
generated file instead of manually generating and flashing the binaries.
Cc: Quentin Schulz <foss+uboot@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Quentin Schulz [Thu, 15 Sep 2022 09:14:30 +0000 (11:14 +0200)]
rockchip: puma-rk3399: migrate to u-boot-rockchip.bin
The offset of the SPL payload on Puma is different than for other
Rockchip devices in that it is stored at offset 256K instead of much
further away in the MMC.
Flashing one binary instead of two at different offsets is much more
user friendly so let's migrate to it by modifying the offset in the Puma
specific Device Tree.
Cc: Quentin Schulz <foss+uboot@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Quentin Schulz [Thu, 15 Sep 2022 09:14:29 +0000 (11:14 +0200)]
rockchip: puma-rk3399: migrate to TPL
Depending on the toolchain used to compile the SPL for Puma RK3399-Q7
module, the board does not boot because the resulting binary is too big
to fit in SRAM.
Let's add a TPL so that there's no need to fiddle with or hack the
defconfig to have a working bootloader.
This follows what's been done for the majority of other RK3399-based
boards.
See the original commit for the first migrations:
bdc00080111f "rockchip: rk3399: update defconfig for TPL"
Unfortunately, the offset in SPI-NOR for U-Boot proper needs to be
modified, since the move from SPL to TPL+SPL for idbloader.img (and the
"only the first 2KB per 4KB blocks are written" "hack" for rkspi format)
increased the size above 256KB. Let's move it to 512KB to, hopefully, be
safe.
Cc: Quentin Schulz <foss+uboot@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Quentin Schulz [Thu, 15 Sep 2022 09:14:28 +0000 (11:14 +0200)]
rockchip: puma-rk3399: remove useless CONFIG_SYS_SPI_U_BOOT_OFFS
The SPL payload offset when booting from SPI defaults to
CONFIG_SYS_SPI_U_BOOT_OFFS but can be overridden by
u-boot,spl-payload-offset. The Device Tree for Puma Haikou has this
property so there's no need to have this one option in the defconfig,
especially since they are not in sync and therefore confusing.
Cc: Quentin Schulz <foss+uboot@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Quentin Schulz [Thu, 15 Sep 2022 09:14:27 +0000 (11:14 +0200)]
rockchip: puma-rk3399: load environment from same medium as one used to load U-Boot proper
Chances are when one boots U-Boot proper from a given storage medium,
they want the same medium to be used to load and store the environment.
This basically allows to have completely separate U-Boot (TPL/SPL/U-Boot
proper/environment) per storage medium which is convenient when working
with recovery from SD-Card as one would just need to insert a properly
configured SD-Card into the device to have access to their whole debug
setup.
No fallback mechanism is provided as to not dirty other storage medium
environment by mistake. However, since arch_env_get_location() is called
by env_init() which is part of the pre-relocation process, a valid,
non-ENVL_UNKNOWN, value shall be returned otherwise the relocation fails
with the following message:
initcall sequence
00000000002866c0 failed at call
0000000000256b34 (err=-19)
This valid, non-ENVL_UNKNOWN, value is ENVL_NOWHERE which requires to
always select CONFIG_ENV_IS_NOWHERE otherwise this work-around does not
work.
Cc: Quentin Schulz <foss+uboot@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Quentin Schulz [Thu, 15 Sep 2022 09:14:26 +0000 (11:14 +0200)]
rockchip: puma-rk3399: allow loading environment from SPI-NOR flash
There's a SPI-NOR flash available from which SPL and U-Boot proper can
be booted, it makes sense to also allow this medium to store U-Boot
environment so let's enable it.
The Device Tree advertises a max frequency of 50MHz so let's set the
config option appropriately.
Cc: Quentin Schulz <foss+uboot@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Quentin Schulz [Thu, 15 Sep 2022 09:14:25 +0000 (11:14 +0200)]
rockchip: puma-rk3399: load environment from same MMC as used for loading U-Boot proper
Automatically detect which MMC device (SD-Card or eMMC) was used to load
U-Boot proper and load the environment from that MMC device instead of
a hardcoded one.
Cc: Quentin Schulz <foss+uboot@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Quentin Schulz [Thu, 15 Sep 2022 09:14:24 +0000 (11:14 +0200)]
rockchip: puma-rk3399: remove unused default ENV_OFFSET for SPI flashes
CONFIG_ENV_OFFSET is set in the defconfig to a different value already
so this isn't used. Let's remove it as to not confuse users.
Cc: Quentin Schulz <foss+uboot@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Quentin Schulz [Thu, 15 Sep 2022 09:14:23 +0000 (11:14 +0200)]
rockchip: puma-rk3399: allow non-SD-Card-loaded SPL to load U-Boot proper from SD-Card
Trying to load U-Boot proper from SPL when SPL was not loaded from
SD-Card is currently not working because the SDMMC pins aren't muxed
correctly. It is assumed the BootROM is doing this for us when booting
from SD-Card hence why it's not needed when booting TPL/SPL from
SD-Card.
The pinctrl properties are removed from the SPL DT property removal list
and the pinctrl configuration nodes made available in the SPL DT, in
addition to the pull-up configurations to allow loading U-Boot proper
from SD-Card as a fallback mechanism for SPI-NOR and eMMC.
Cc: Quentin Schulz <foss+uboot@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Quentin Schulz [Thu, 15 Sep 2022 09:14:22 +0000 (11:14 +0200)]
rockchip: puma-rk3399: use gpio-hog instead of fixed-regulator for enabling eMMC/SPI-NOR
On Haikou devkit, it is possible to disable eMMC and SPI-NOR to force
booting from SD card or USB via rkdeveloptool by toggling a switch. This
switch needs to be overridden in software to be able to access eMMC and
SPI-NOR once the device has booted from SD Card. Puma SoM can override
this pin via gpio3_d5.
Until now, fixed regulator device was abused to model this, but since
there's now support for GPIO hogs, let's use it.
Since we want to be able to boot the SPL from SD Card but give it the
ability to load U-Boot proper from a fallback medium such as eMMC and
SPI-NOR, SPL support for GPIO hogs needs to be enabled too. Support for
other kinds of regulators are not needed anymore, so let's disable them.
Cc: Quentin Schulz <foss+uboot@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Quentin Schulz [Thu, 15 Sep 2022 09:14:21 +0000 (11:14 +0200)]
rockchip: puma-rk3399: fix boot_targets swap depending on U-Boot proper load medium
distroboot should try first on the same MMC medium as the one the SPL
loaded U-Boot proper from. This was the case when the introducing commit
was merged because the default order was eMMC first and then SD card.
The check was therefore made only on whether we booted from SD card,
because otherwise the order was the expected one.
However, in commit
b212ad24a604 ("rockchip: Fix MMC boot order"), the
order was swapped. Meaning our simple check is now useless.
Let's fix that by accounting for all scenarii: default boot_targets has
mmc0 first but booting from SD Card, mmc1 first but booting from eMMC.
Fixes:
b212ad24a604 ("rockchip: Fix MMC boot order")
Cc: Quentin Schulz <foss+uboot@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Andy Yan [Sun, 18 Sep 2022 11:30:02 +0000 (19:30 +0800)]
rockchip: rk3399: Add EAIDK-610 support
Specification
- Rockchip RK3399
- LPDDR3 4GB
- TF sd scard slot
- eMMC
- AP6255 for WiFi + BT
- Gigabit ethernet
- HDMI out
- 40 pin header
- USB 2.0 x 2
- USB 3.0 x 1
- USB 3.0 Type-C x 1 work in otg mode
- 12V DC Power supply
The dts file is sync from linux-next[0].
[0]:https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/arch/arm64/boot/dts/rockchip/rk3399-eaidk-610.dts
Signed-off-by: Andy Yan <andyshrk@163.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Quentin Schulz [Thu, 15 Sep 2022 16:25:32 +0000 (18:25 +0200)]
rockchip: puma-rk3399: remove dead code
CONFIG_SERIAL_TAG is not selectable for ARM64 machines. While
get_board_serial is weakly defined if ENV_VARS_UBOOT_RUNTIME_CONFIG is
defined, it is only called when CONFIG_SUPPORT_PASSING_ATAGS is defined,
which also is not selectable for ARM64 machines. Therefore this is dead
code so let's remove it.
Cc: Quentin Schulz <foss+uboot@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Quentin Schulz [Thu, 15 Sep 2022 10:17:10 +0000 (12:17 +0200)]
ram: rockchip: fix typo in KConfig option label
RAM_PX30_DDR4 is for DDR4 support and not DDR3 so let's fix the typo.
Fixes:
2db36c64bd5a ("ram: rockchip: px30: add a config-based ddr selection")
Cc: Quentin Schulz <foss+uboot@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Quentin Schulz [Thu, 15 Sep 2022 10:12:47 +0000 (12:12 +0200)]
rockchip: px30: support debug uart on UART0
UART0 can obviously also be used for debug uart in U-Boot, so let's add
its support.
Cc: Quentin Schulz <foss+uboot@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Quentin Schulz [Fri, 22 Jul 2022 09:30:14 +0000 (11:30 +0200)]
rockchip: rk3399: fix incorrect ifdef check on SPL_GPIO
The check to perform is on CONFIG_SPL_GPIO and not SPL_GPIO.
Because this was never compiled in, it missed an include of cru.h that
was not detected before. Let's include it too.
Also switch to IS_ENABLED in-code check as it is the preferred
inclusion/exclusion mechanism.
Fixes:
07586ee4322a ("rockchip: rk3399: Support common spl_board_init")
Cc: Quentin Schulz <foss+uboot@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>