]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
17 months agorockchip: veyron: Enable RESET driver
Alper Nebi Yasak [Fri, 7 Jul 2023 19:16:35 +0000 (22:16 +0300)]
rockchip: veyron: Enable RESET driver

Commit 70e351bdfeee ("rockchip: jerry: Enable RESET driver") enables
DM_RESET for chromebook_jerry to fix its display as required by changes
to the Rockchip video drivers. Enable it for other veyron boards as
well.

Fixes: cd529f7ad62 ("rockchip: video: edp: Add missing reset support")
Fixes: 9749d2ea29e ("rockchip: video: vop: Add reset support")
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org> # chromebook_jerry
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
17 months agoconfigs: rockchip: drop useless DEBUG_UART_SKIP_INIT
Pegorer Massimo [Sun, 16 Jul 2023 16:53:58 +0000 (16:53 +0000)]
configs: rockchip: drop useless DEBUG_UART_SKIP_INIT

DEBUG_UART_SKIP_INIT feature is implemented only by s5p (DEBUG_UART_S5P)
and pl01x (DEBUG_UART_PL010 or DEBUG_UART_PL011) serial drivers, but all
ARCH_ROCKCHIP configs rely on default DEBUG_UART_NS16550. The ns16550
serial driver does not depends on DEBUG_UART_SKIP_INIT, so drop it from
rockchip configs.

Signed-off-by: Massimo Pegorer <massimo.pegorer@vimar.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
17 months agorockchip: rk3308: fix same-as-spl boot order
Pegorer Massimo [Sat, 15 Jul 2023 10:19:46 +0000 (10:19 +0000)]
rockchip: rk3308: fix same-as-spl boot order

Boot devices defined in rk3308.c and in rk3308.dtsi do not match, causing
'same-as-spl' feature not to work. Update DTS definitions, aligning to
Linux kernel DTS and to other Rockchip DTS files, i.e. from dwmmc to mmc.

Add rk3308-rock-pi-s.dtb in dtb-y targets for CONFIG_ROCKCHIP_RK3308.

Signed-off-by: Massimo Pegorer <massimo.pegorer@vimar.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
17 months agorockchip: rk3308: add support for sdmmc boot
Pegorer Massimo [Sat, 15 Jul 2023 10:19:40 +0000 (10:19 +0000)]
rockchip: rk3308: add support for sdmmc boot

Some ROCK Pi S SKU/models are not equipped with SD-NAND (eMMC),
therefore SPL needs access to sdmmc: add it to rk3308-u-boot.dtsi
with bootph-all property.

Signed-off-by: Massimo Pegorer <massimo.pegorer@vimar.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
17 months agorockchip: rk3308: no DEBUG_UART_BOARD_INIT for ROCK Pi S
Pegorer Massimo [Sat, 15 Jul 2023 10:19:34 +0000 (10:19 +0000)]
rockchip: rk3308: no DEBUG_UART_BOARD_INIT for ROCK Pi S

Call to board_debug_uart_init() is useless, as mainline U-Boot can
not build TPL for rk3308, and proprietary ddr.bin to be used as TPL
is responsible to init debug uart. Moreover current implementation
of board_debug_uart_init() is not compatible with ROCK Pi S, as it
sets pins for UART2 channel 1 breaking access to sdmmc due to pinmux
conflict. Debug uart for ROCK Pi S is UART0.

Thus, avoid ROCKCHIP_RK3308 to select DEBUG_UART_BOARD_INIT and allow
to deselct it in rock-pi-s-rk3308_defconfig. The DEBUG_UART_BOARD_INIT
is already implied by ARCH_ROCKCHIP, therefore other boards based on
rk3308 chip are not affected by change.

Signed-off-by: Massimo Pegorer <massimo.pegorer@vimar.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
17 months agorockchip: rk3308: fix board_debug_uart_init
Pegorer Massimo [Sat, 15 Jul 2023 10:19:28 +0000 (10:19 +0000)]
rockchip: rk3308: fix board_debug_uart_init

Definition of function board_debug_uart_init() must be under
CONFIG_DEBUG_UART_BOARD_INIT and not under CONFIG_DEBUG_UART,
as it was: see debug_uart.h. In this way the debug uart can
be used but its board-specific initialization skipped by
configuration, if useless.

Signed-off-by: Massimo Pegorer <massimo.pegorer@vimar.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
17 months agoMerge tag 'efi-2023-10-rc2' of https://source.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Fri, 28 Jul 2023 16:48:00 +0000 (12:48 -0400)]
Merge tag 'efi-2023-10-rc2' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request for efi-2023-10-rc2

Documentation:

* Update the documentation for TI K3 boards (use SVG images)
* Update doc/sphinx/requirements.txt
* Describe QEMU emulation of block devices

UEFI

* Fix device paths for special block devices

17 months agoMerge branch '2023-07-27-TI-K2-K3-updates'
Tom Rini [Fri, 28 Jul 2023 14:25:50 +0000 (10:25 -0400)]
Merge branch '2023-07-27-TI-K2-K3-updates'

- Resync some of the K3 DTS files with the kernel, and pull in some
  required related updates to keep drivers in sync with the dts files
  now.  Bring in some incremental fixes on top of one of the series I
  applied recently as well as updating the iot2050 platform.  Also do a
  few small updates to the K2 platforms.

17 months agoMerge tag 'u-boot-rockchip-20230728' of https://source.denx.de/u-boot/custodians...
Tom Rini [Fri, 28 Jul 2023 14:13:46 +0000 (10:13 -0400)]
Merge tag 'u-boot-rockchip-20230728' of https://source.denx.de/u-boot/custodians/u-boot-rockchip

- Enable pcie support for rk3568;
- Add boards:
        rk3399: Radxa ROCK 4SE;
        rk3328: Orange Pi R1 Plus, Orange Pi R1 Plus LTS
        rk3568: FriendlyARM NanoPi R5S/R5C, Hardkernel ODROID-M1
        rk3588: Edgeble Neu6B
- support OP-TEE with binman;
- support Winbond SPI flash;
- rk3588 usbdp phy support;
- dts and config updates for different boards;

17 months agoconfigs: keystone2: Change to using env files
Andrew Davis [Tue, 25 Jul 2023 18:15:21 +0000 (13:15 -0500)]
configs: keystone2: Change to using env files

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

Signed-off-by: Andrew Davis <afd@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
17 months agoconfigs: keystone2: Unwind KERNEL_MTD_PARTS definition
Andrew Davis [Tue, 25 Jul 2023 18:15:20 +0000 (13:15 -0500)]
configs: keystone2: Unwind KERNEL_MTD_PARTS definition

This is more complex than it needs to be and makes converting these
boards over to plain text env files more difficult. Remove setting
mtdparts as the DTS already contain the partitions. While here also
drop the conflicting definitions from the K2 defconfigs.

Signed-off-by: Andrew Davis <afd@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
17 months agomach-k3: security: improve the checks around authentication
Manorit Chawdhry [Tue, 25 Jul 2023 07:39:22 +0000 (13:09 +0530)]
mach-k3: security: improve the checks around authentication

The following checks are more reasonable as the previous logs were a bit
misleading as we could still get the logs that the authetication is
being skipped but still authenticate. Move the debug prints and checks
to proper locations.

Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
17 months agoenv: ti: mmc.env: Fix overlays directory path
Vignesh Raghavendra [Tue, 25 Jul 2023 07:39:21 +0000 (13:09 +0530)]
env: ti: mmc.env: Fix overlays directory path

Similar to get_fdt_mmc make get_overlays_mmc look at /boot/dtb/* path
for overlay files.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
Reviewed-by: Nikhil M Jain <n-jain1@ti.com>
17 months agoenv: ti: mmc.env: Move mmc related args to common place
Vignesh Raghavendra [Tue, 25 Jul 2023 07:39:20 +0000 (13:09 +0530)]
env: ti: mmc.env: Move mmc related args to common place

All K3 SoCs use same set of args to load kernel for MMC. So move this to
common place to avoid duplication.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
Reviewed-by: Nikhil M Jain <n-jain1@ti.com>
17 months agoconfigs: am62x: add SPL_MAX_SIZE back
Manorit Chawdhry [Tue, 25 Jul 2023 07:39:18 +0000 (13:09 +0530)]
configs: am62x: add SPL_MAX_SIZE back

This was regressed by the following commit and is required to build with
additional configs enabled.

Fixes: 14439cd71c1a ("configs: k3: make consistent bootcmd across all k3 socs")
Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
Tested-by: Nikhil M Jain <n-jain1@ti.com>
17 months agoarm: k3: fix fdt_del_node_path implicit declaration and a missing include
Emanuele Ghidoli [Wed, 26 Jul 2023 14:36:50 +0000 (16:36 +0200)]
arm: k3: fix fdt_del_node_path implicit declaration and a missing include

Fix missing declaration of fdt_del_node_path() while compiling am625_fdt.c and
missing common_fdt.h include in common_fdt.c

Fixes: 70aa5a94d451 ("arm: mach-k3: am62: Fixup CPU core, gpu and pru nodes in fdt")
Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
17 months agoconfigs: iot2050: Enabled keyed autoboot
Jan Kiszka [Thu, 27 Jul 2023 04:34:56 +0000 (06:34 +0200)]
configs: iot2050: Enabled keyed autoboot

Only accept SPACE to stop autobooting. This is safer to avoid accidental
interruptions on unattended devices.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
17 months agodoc: board: siemens: iot2050: Update build env vars
Jan Kiszka [Thu, 27 Jul 2023 04:34:55 +0000 (06:34 +0200)]
doc: board: siemens: iot2050: Update build env vars

ATF is now called BL31, and OP-TEE since 3.21 suggests to use
tee-raw.bin instead of (the still identical) tee-pager_v2.bin.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
17 months agoboards: siemens: iot2050: Unify PG1 and PG2/M.2 configurations again
Jan Kiszka [Thu, 27 Jul 2023 04:34:54 +0000 (06:34 +0200)]
boards: siemens: iot2050: Unify PG1 and PG2/M.2 configurations again

This avoids having to maintain to defconfigs that are 99% equivalent.
The approach is to use binman to generate two flash images,
flash-pg1.bin and flash-pg2.bin. With the help of a template dtsi, we
can avoid duplicating the common binman image definitions.

Suggested-by: Andrew Davis <afd@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
17 months agoiot2050: Use binman in signing script
Jan Kiszka [Thu, 27 Jul 2023 04:34:53 +0000 (06:34 +0200)]
iot2050: Use binman in signing script

The underlying issue was fixed in the meantime. Also signing the U-Boot
proper fit image now works. Just supporting custom cert templates
remains a todo.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
17 months agoboards: siemens: iot2050: Fix boot configuration
Jan Kiszka [Thu, 27 Jul 2023 04:34:52 +0000 (06:34 +0200)]
boards: siemens: iot2050: Fix boot configuration

The common env bits now come via ti_armv7_common.env, include it.
Furthermore restore the board-specific boot targets and their ordering
that is now enforced k3-wide differently. Finally, enable
CONFIG_LEGACY_IMAGE_FORMAT explicitly which got lost while turning
FIT_SIGNATURE on by default for k3 devices.

Fixes: 53873974 ("include: armv7: Enable distroboot across all configs")
Fixes: 4ae1a247 ("env: Make common bootcmd across all k3 devices")
Fixes: 86fab110 ("Kconfig: Enable FIT_SIGNATURE if ARM64")
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
17 months agoarm: dts: k3-am62: Bump dtsi from linux v6.5-rc1
Nishanth Menon [Thu, 27 Jul 2023 09:03:31 +0000 (04:03 -0500)]
arm: dts: k3-am62: Bump dtsi from linux v6.5-rc1

Update the am62 and am625 device-trees from linux v6.5-rc1. This needed
the following tweaks to the u-boot specific dtsi as well:
- Switch tick-timer to the main_timer as it's now defined in the main dtsi
- Secure proxies are defined in SoC dtsi
- Drop duplicate nodes - u-boot.dtsi is includes in r5-sk, no need for
  either the definitions from main.dtsi OR duplication from u-boot.dtsi

Reviewed-by: Roger Quadros <rogerq@kernel.org>
Reviewed-by: Maxime Ripard <mripard@kernel.org>
Tested-by: Maxime Ripard <mripard@kernel.org>
Cc: Francesco Dolcini <francesco@dolcini.it>
Cc: Sjoerd Simons <sjoerd@collabora.com>
Cc: Wadim Egorov <w.egorov@phytec.de>
Signed-off-by: Nishanth Menon <nm@ti.com>
17 months agoarm: mach-k3: am62: Add timer0 id to the dev list
Sjoerd Simons [Thu, 27 Jul 2023 09:03:30 +0000 (04:03 -0500)]
arm: mach-k3: am62: Add timer0 id to the dev list

Timer0 is used by u-boot as the tick timer; Add it to the soc devices
list so it can be enabled via the k3 power controller.

Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Roger Quadros <rogerq@kernel.org>
Tested-by: Maxime Ripard <mripard@kernel.org>
Tested-by: Ravi Gunasekaran <r-gunasekaran@ti.com>
Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Cc: Francesco Dolcini <francesco@dolcini.it>
Cc: Wadim Egorov <w.egorov@phytec.de>
Signed-off-by: Nishanth Menon <nm@ti.com>
17 months agoomap: timer: add ti,am654-timer compatibility
Sjoerd Simons [Thu, 27 Jul 2023 09:03:29 +0000 (04:03 -0500)]
omap: timer: add ti,am654-timer compatibility

The TI AM654 timer is compatible with the omap-timer implementation,
so add it to the compatible id list.

Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>
Reviewed-by: Roger Quadros <rogerq@kernel.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Tested-by: Maxime Ripard <mripard@kernel.org>
Tested-by: Ravi Gunasekaran <r-gunasekaran@ti.com>
Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Cc: Francesco Dolcini <francesco@dolcini.it>
Cc: Wadim Egorov <w.egorov@phytec.de>
Signed-off-by: Nishanth Menon <nm@ti.com>
17 months agoboard: rockchip: Add Hardkernel ODROID-M1
Jonas Karlman [Sat, 22 Jul 2023 14:02:15 +0000 (14:02 +0000)]
board: rockchip: Add Hardkernel ODROID-M1

Hardkernel ODROID-M1 is a single board computer with a RK3568B2 SoC,
a slightly modified version of the RK3568 SoC.

Features tested on a ODROID-M1 8GB v1.0 2022-06-13:
- SD-card boot
- eMMC boot
- SPI Flash boot
- PCIe/NVMe/AHCI
- SATA port
- USB host

Device tree is imported from linux v6.4.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Stefan Agner <stefan@agner.ch>
Tested-by: Stefan Agner <stefan@agner.ch>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
17 months agocmd: ini: Fix build warning
Jonas Karlman [Sat, 22 Jul 2023 14:02:13 +0000 (14:02 +0000)]
cmd: ini: Fix build warning

Building U-Boot with CMD_INI=y result in following build warning:

  cmd/ini.c: In function 'memgets':
  include/linux/kernel.h:184:24: warning: comparison of distinct pointer types lacks a cast
    184 |         (void) (&_min1 == &_min2);              \
        |                        ^~
  cmd/ini.c:92:15: note: in expansion of macro 'min'
     92 |         len = min((end - *mem) + newline, num);
        |               ^~~

Fix this by adding an int cast to the pointer arithmetic result.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
17 months agoata: dwc_ahci: Fix support for other platforms
Jonas Karlman [Sat, 22 Jul 2023 14:02:12 +0000 (14:02 +0000)]
ata: dwc_ahci: Fix support for other platforms

The dwc_ahci driver use platform specific defines, place the platform
specific code behind a ifdef CONFIG_ARCH_OMAP2PLUS to allow build and
use of the driver on Rockchip platform.

Fixes: 02a4b4297901 ("drivers: block: dwc_ahci: Implement a driver for Synopsys DWC sata device")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
17 months agorockchip: px30: Define variables for compressed image support
Paul Kocialkowski [Tue, 25 Jul 2023 12:58:35 +0000 (14:58 +0200)]
rockchip: px30: Define variables for compressed image support

The standard boot path expects the kernel_comp_addr_r and kernel_comp_size
variables for booting compressed kernel images. Define them using the previous
kernel_addr_c value (likely initially meant for this purpose) and usual size.

This was tested on the PX30 EVB to successfully boot compressed Linux kernel
images.

Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
17 months agorockchip: rk356x: Update PCIe config, IO and memory regions
Jonas Karlman [Sat, 22 Jul 2023 13:30:24 +0000 (13:30 +0000)]
rockchip: rk356x: Update PCIe config, IO and memory regions

Update config, IO and memory regions used based on [1] with pcie3x2
config reg address and reg size corrected.

Before this change:

  PCI Autoconfig: Bus Memory region: [0-3eefffff],
  PCI Autoconfig: Bus I/O region: [3ef00000-3effffff],

After this change:

  PCI Autoconfig: Bus Memory region: [40000000-7fffffff],
  PCI Autoconfig: Bus I/O region: [f0100000-f01fffff],

[1] https://lore.kernel.org/lkml/20221112114125.1637543-2-aholmes@omnom.net/

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
17 months agorockchip: rk3568-rock-3a: Enable PCIe and NVMe support
Jonas Karlman [Sat, 22 Jul 2023 13:30:23 +0000 (13:30 +0000)]
rockchip: rk3568-rock-3a: Enable PCIe and NVMe support

Add missing pinctrl and defconfig options to enable PCIe and NVMe
support on Radxa ROCK 3 Model A.

Use of pcie20m1_pins and pcie30x2m1_pins ensure IO mux selection M1.
The following pcie_reset_h and pcie3x2_reset_h ensure GPIO func is
restored to the perstn pin, a workaround to avoid having to define
a new rockchip,pins.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
17 months agorockchip: clk: clk_rk3568: Add CLK_PCIEPHY2_REF support
Jonas Karlman [Sat, 22 Jul 2023 13:30:22 +0000 (13:30 +0000)]
rockchip: clk: clk_rk3568: Add CLK_PCIEPHY2_REF support

Add dummy support for the CLK_PCIEPHY2_REF clock.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
17 months agoregulator: fixed: Add support for gpios prop
Jonas Karlman [Sat, 22 Jul 2023 13:30:21 +0000 (13:30 +0000)]
regulator: fixed: Add support for gpios prop

The commit 12df2c182ccb ("regulator: dt-bindings: fixed-regulator: allow
gpios property") in linux v6.3-rc1 added support for use of either a
gpios or gpio prop with a fixed-regulator.

This adds support for the new gpios prop to the fixed-regulator driver.
gpios prop is used by vcc3v3-pcie-regulator on Radxa ROCK 3 Model A.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
17 months agopci: pcie_dw_rockchip: Disable unused BARs of the root complex
Jon Lin [Sat, 22 Jul 2023 13:30:20 +0000 (13:30 +0000)]
pci: pcie_dw_rockchip: Disable unused BARs of the root complex

The Root Complex BARs default to claim the full 1 GiB memory region on
RK3568, leaving no space for any attached device.

Fix this by disable the unused BAR 0 and BAR 1 of the RC.

Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
[jonas@kwiboo.se: Move to rk_pcie_configure and use PCI_BASE_ADDRESS_0/1 const]
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
17 months agopci: pcie_dw_rockchip: Speed up link probe
Jonas Karlman [Sat, 22 Jul 2023 13:30:19 +0000 (13:30 +0000)]
pci: pcie_dw_rockchip: Speed up link probe

Use a similar pattern and delay values as the linux mainline driver to
speed up failing when nothing is connected.

Reduce fail speed from around 5+ seconds down to around one second on a
Radxa ROCK 3 Model A, where pcie2x1 is probed before pcie3x2 M2 slot.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
17 months agopci: pcie_dw_rockchip: Use regulator_set_enable_if_allowed
Jonas Karlman [Sat, 22 Jul 2023 13:30:18 +0000 (13:30 +0000)]
pci: pcie_dw_rockchip: Use regulator_set_enable_if_allowed

The vpcie3v3 regulator is typically a fixed regulator controlled using
gpio. Change to use enable and disable calls on the regulator instead
of trying to set a voltage value.

Also remove the delay to match linux driver, for a fixed regulator the
startup-delay-us prop can be used in case a startup delay is needed.
Limited testing on ROCK 3A, ROCK 5B, Quartz64, Odroid-M1 has shown that
this delay was not needed.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
17 months agopci: pcie_dw_rockchip: Get config region from reg prop
Jonas Karlman [Sat, 22 Jul 2023 13:30:16 +0000 (13:30 +0000)]
pci: pcie_dw_rockchip: Get config region from reg prop

Get the config region to use from the reg prop. Also update the
referenced region index used in comment.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
17 months agocore: read: add dev_read_addr_size_index_ptr function
Jonas Karlman [Sat, 22 Jul 2023 13:30:15 +0000 (13:30 +0000)]
core: read: add dev_read_addr_size_index_ptr function

Add dev_read_addr_size_index_ptr function with the same functionality as
dev_read_addr_size_index, but instead a return pointer is given.
Use map_sysmem() function as cast for the return.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
17 months agorockchip: veyron: Enable Winbond SPI flash
Alper Nebi Yasak [Fri, 21 Jul 2023 08:46:00 +0000 (11:46 +0300)]
rockchip: veyron: Enable Winbond SPI flash

Some veyron boards seem to have Winbond SPI flash chips instead of
GigaDevice ones. At the very least, coreboot builds for veyron boards
have them enabled [1]. Enable support for them here as well.

[1] https://review.coreboot.org/c/coreboot/+/9719

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
17 months agoarm: rockchip: Add Radxa ROCK 4SE
Christopher Obbard [Wed, 19 Jul 2023 16:33:57 +0000 (17:33 +0100)]
arm: rockchip: Add Radxa ROCK 4SE

Add board-specific devicetree/config for the RK3399T-based Radxa ROCK 4SE
board. This board offers similar peripherals in a similar form-factor to
the existing ROCK Pi 4B but uses the cost-optimised RK3399T processor
(which has different OPP table than the RK3399) and other minimal hardware
changes.

Kernel tag: next-20230719
Kernel commits:
86a0e14a82ea ("arm64: dts: rockchip: Add Radxa ROCK 4SE")

Signed-off-by: Christopher Obbard <chris.obbard@collabora.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
17 months agoarm: rockchip: sync ROCK Pi 4 SoCs from Linux
Christopher Obbard [Wed, 19 Jul 2023 16:33:56 +0000 (17:33 +0100)]
arm: rockchip: sync ROCK Pi 4 SoCs from Linux

To prepare for ROCK 4 SE support, changes are needed to the common ROCK
Pi 4 devicetree to move the OPP from the common devicetree to individual
board devicetrees. Sync the Rockchip RK3399 ROCK Pi 4-related DTs from
Linux to gain from these changes.

Kernel tag: next-20230719
Kernel commits:
cfa12c32b96f ("arm64: dts: rockchip: correct wifi interrupt flag in Rock \
Pi 4B")
cee572756aa2 ("arm64: dts: rockchip: Disable HS400 for eMMC on ROCK Pi 4")
2bd1d2dd808c ("arm64: dts: rockchip: Disable HS400 for eMMC on ROCK 4C+")
fd2762a62646 ("arm64: dts: rockchip: Move OPP table from ROCK Pi 4 dtsi")

Signed-off-by: Christopher Obbard <chris.obbard@collabora.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
17 months agorockchip: evb_rk3229: Update/fix README
Alex Bee [Tue, 18 Jul 2023 14:57:14 +0000 (16:57 +0200)]
rockchip: evb_rk3229: Update/fix README

This updates the evb_rk3229's README on howto create / use the FIT image
created by binman.
Also fix some wrong paths and update filenames which have changed in recent
upstream optee-os versions.

Signed-off-by: Alex Bee <knaerzche@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
17 months agorockchip: RK322x: Select SPL_OPTEE_IMAGE
Alex Bee [Tue, 18 Jul 2023 14:57:13 +0000 (16:57 +0200)]
rockchip: RK322x: Select SPL_OPTEE_IMAGE

For RK322x series ARM SoCs the OP-TEE is non-optional, as besides the TEE
it also provides the PSCI implementation, which is expected to be available
by upstream linux.

Select CONFIG_SPL_OPTEE_IMAGE if an FIT image is built.

Signed-off-by: Alex Bee <knaerzche@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
17 months agoconfigs: evb-rk3229: Increase SPL_STACK_R_MALLOC_SIMPLE_LEN
Alex Bee [Tue, 18 Jul 2023 14:57:12 +0000 (16:57 +0200)]
configs: evb-rk3229: Increase SPL_STACK_R_MALLOC_SIMPLE_LEN

An OP-TEE FIT image will fail to extract in SPL because the malloc stack
size is currently limited to 0x2000 for evb-rk3229 board.

In SPL we do not have to care about size limitations, since we are no
longer bound to SRAM limits after DRAM initialization has been done in TPL.

Use the default value for CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN in order
successfully unpack the FIT image.

Signed-off-by: Alex Bee <knaerzche@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
17 months agorockchip: Support OP-TEE for ARM in FIT images created by binman
Alex Bee [Tue, 18 Jul 2023 14:57:11 +0000 (16:57 +0200)]
rockchip: Support OP-TEE for ARM in FIT images created by binman

CONFIG_SPL_OPTEE_IMAGE option is used during DRAM size detection for
Rockchip ARM platform to indicate that an OP-TEE binary was already loaded
and a Trusted Execution Environment (TEE) is available in order to
block/reserve a memory-region for it.

This adds a bunch of new `#if's` to u-boot-rockchip.dtsi to include the
OP-TEE binary in the FIT image for ARM SOCs if CONFIG_SPL_OPTEE_IMAGE is
selected.
That makes it a little harder to read, but I opted for that, because all
the duplicates in an extra ARM-OP-TEE-specfic .dtsi would be the greater
evil, IMHO. Besides it's more likley being "forgotten" to sync when changes
in u-boot-rockchip.dtsi are made.

The no longer required rockchip-optee.dtsi and it's inclusions are dropped.

The hardcoded load address is common across all OP-TEE implemenations for
Rockchip (vendor and upstream).

The OP-TEE-binary is non-optional if CONFIG_SPL_OPTEE_IMAGE is selected and
there will be an error if the file does not exist and/or `TEE=` build
option is missing.

Signed-off-by: Alex Bee <knaerzche@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
17 months agoconfigs: rockchip: rock5b-rk3588: Enable CONFIG_PCI_INIT_R
Christopher Obbard [Mon, 3 Jul 2023 10:41:20 +0000 (11:41 +0100)]
configs: rockchip: rock5b-rk3588: Enable CONFIG_PCI_INIT_R

Enable CONFIG_PCI_INIT_R for rock5b pci enumeration during boot in order
to autodetect the PCI ethernet NIC during the boot process.

Signed-off-by: Christopher Obbard <chris.obbard@collabora.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
17 months agorockchip: rk3568: Fix alloc space exhausted in SPL
Jonas Karlman [Sun, 2 Jul 2023 10:43:57 +0000 (10:43 +0000)]
rockchip: rk3568: Fix alloc space exhausted in SPL

Current SYS_MALLOC_F_LEN of 0x2000 (8 KB) used in SPL is too small for
some RK3568 boards. SPL will print following during boot:

  alloc space exhausted

Increase the default SYS_MALLOC_F_LEN to 0x20000 (128 KB) to mitigate.

Fixes: 2a950e3ba506 ("rockchip: Add rk3568 architecture core")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
17 months agomtd: nand: raw: rockchip_nfc: copy hwecc PA data to oob_poi buffer
Johan Jonker [Thu, 22 Jun 2023 13:59:24 +0000 (15:59 +0200)]
mtd: nand: raw: rockchip_nfc: copy hwecc PA data to oob_poi buffer

Rockchip boot blocks are written per 4 x 512 byte sectors per page.
Each page must have a page address (PA) pointer in OOB to the next page.
Pages are written in a pattern depending on the NAND chip ID.
This logic used to build a page pattern table is not fully disclosed and
is not easy to fit in the MTD framework.
The formula in rk_nfc_write_page_hwecc() function is not correct.
Make hwecc and raw behavior identical.
Generate boot block page address and pattern for hwecc in user space
and copy PA data to/from the already reserved last 4 bytes before EEC
in the chip->oob_poi data layout.

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
17 months agorockchip: puma: pass platform parameter to TF-A
Quentin Schulz [Wed, 21 Jun 2023 16:02:53 +0000 (18:02 +0200)]
rockchip: puma: pass platform parameter to TF-A

Puma supports upstream TF-A and is configured to output serial on UART0
instead of the default UART2. Since U-Boot is properly configured to
output on UART0, let's pass the DT to TF-A so there is no need for a
custom TF-A to make the latter output to UART0 too.

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>
17 months agorockchip: rk3399: pass platform parameter to TF-A by default for new RK3399 boards
Quentin Schulz [Wed, 21 Jun 2023 16:02:52 +0000 (18:02 +0200)]
rockchip: rk3399: pass platform parameter to TF-A by default for new RK3399 boards

Long are gone the times TF-A couldn't handle the FDT passed by U-Boot.
Specifically, since commit e7b586987c0a ("rockchip: don't crash if we
get an FDT we can't parse") in TF-A, failure to parse the FDT will use
the fallback mechanism. This patch was merged in TF-A v2.4-rc0 from two
years ago.

New boards should likely have this option disabled or explicitly enable
it in their respective defconfig.

Because existing boards might depend on a TF-A version that predates
v2.4, let's just enable this option in all RK3399 defconfigs.
Maintainers of each board can decide for themselves if they would prefer
to disable this option and allow U-Boot to pass the DT to TF-A.

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>
17 months agoboard: rockchip: Add Edgeble Neural Compute Module 6B
Jagan Teki [Sun, 11 Jun 2023 06:57:13 +0000 (12:27 +0530)]
board: rockchip: Add Edgeble Neural Compute Module 6B

Neural Compute Module 6B(Neu6B) is a 96boards SoM-CB compute module
based on Rockchip RK3588J from Edgeble AI.

Add support for this SoM and IO board.

Signed-off-by: Jagan Teki <jagan@edgeble.ai>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
17 months agoarm64: dts: rockchip: Add rk3588 Edgeble Neu6B
Jagan Teki [Sun, 11 Jun 2023 06:57:12 +0000 (12:27 +0530)]
arm64: dts: rockchip: Add rk3588 Edgeble Neu6B

Neural Compute Module 6B(Neu6B) is a 96boards SoM-CB compute module
based on Rockchip RK3588J from Edgeble AI.

General features:
- Rockchip RK3588J
- up to 32GB LPDDR4x
- up to 128GB eMMC
- 2x MIPI CSI2 FPC
- On module WiFi6/BT

Neural Compute Module 6B(Neu6B) IO board is an industrial form factor
ready-to-use IO board from Edgeble AI.

General features:
- microSD slot
- 1x HDMI Out
- 1x HDMI In
- 2x DP
- 1x eDP
- 2x MIPI DSI connector
- 4x MIPI CSI2 connector
- 2x USB Host
- 2x USB 3.0 OTG/Host
- 1x SATA
- 1x 2.5Gbps Ethernet
- 1x M.2 B-Key for 4G/5G cards
- 1x M.2 M-Key slot
- 1x Onboard PoE
- 1x RS485, RS232, CAN
- 1x Audio, MIC port
- RTC battery slot
- 40-pin GPIO expansion

Neu6B needs to mount on top of this IO board in order to create a
complete Edgeble Neural Compute Module 6B(Neu6B) IO platform.

Kernel commits:
commit <5f06c3f508f7> ("arm64: dts: rockchip: Add rk3588 Edgeble Neu6
Model B SoM")
commit <3a9181a43b94> ("arm64: dts: rockchip: Add rk3588 Edgeble Neu6
Model B IO")

Signed-off-by: Jagan Teki <jagan@edgeble.ai>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
17 months agoARM: dts: rockchip: Add rk3588j-u-boot.dtsi
Jagan Teki [Sun, 11 Jun 2023 06:57:11 +0000 (12:27 +0530)]
ARM: dts: rockchip: Add rk3588j-u-boot.dtsi

Add rk3588j-u-boot.dtsi for adding U-Boot specific nodes and
properties for Rockchip RK3588J SoC.

Signed-off-by: Jagan Teki <jagan@edgeble.ai>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
17 months agoarm64: dts: rockchip: Add Rockchip RK3588J
Jagan Teki [Sun, 11 Jun 2023 06:57:10 +0000 (12:27 +0530)]
arm64: dts: rockchip: Add Rockchip RK3588J

Rockchip RK3588J is the industrial-grade version of RK3588 SoC and
is operated with -40 Â°C to +85 Â°C temparature.

Add rk3588j specific dtsi for adding rk3588j specific operating points
and other changes to be add in future.

Kernel commit:
commit <8274a04ff1dc> ("arm64: dts: rockchip: Add Rockchip RK3588J")

Signed-off-by: Jagan Teki <jagan@edgeble.ai>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
17 months agoarch: rockchip: rk3588: Fix missing suffix 'A' for Edgeble Neu6A
Jagan Teki [Sun, 11 Jun 2023 06:57:09 +0000 (12:27 +0530)]
arch: rockchip: rk3588: Fix missing suffix 'A' for Edgeble Neu6A

Add missing suffix 'A' for Edgeble Neu6A SoM and IO boards.

Fixes: <15b2d1fb727> ("board: rockchip: Add Edgeble Neural Compute
Module 6")
Signed-off-by: Jagan Teki <jagan@edgeble.ai>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
17 months agorockchip: rk3568: Add support for FriendlyARM NanoPi R5C
Tianling Shen [Tue, 30 May 2023 07:11:22 +0000 (15:11 +0800)]
rockchip: rk3568: Add support for FriendlyARM NanoPi R5C

FriendlyARM NanoPi R5C is an open-sourced mini IoT gateway device.

Specification:
- Rockchip RK3568
- 1/4GB LPDDR4X RAM
- 8/32GB eMMC
- SD card slot
- M.2 Connector
- 2x USB 3.0 Port
- 2x 2500 Base-T (PCIe, r8125)
- HDMI 2.0
- MIPI DSI/CSI
- USB Type C 5V

The device tree is taken from kernel v6.4-rc1.

Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Signed-off-by: Tianling Shen <cnsztl@gmail.com>
17 months agorockchip: rk3568: Add support for FriendlyARM NanoPi R5S
Tianling Shen [Tue, 30 May 2023 07:11:21 +0000 (15:11 +0800)]
rockchip: rk3568: Add support for FriendlyARM NanoPi R5S

FriendlyARM NanoPi R5S is an open-sourced mini IoT gateway device.

Board Specifications
- Rockchip RK3568
- 2 or 4GB LPDDR4X
- 8GB or 16GB eMMC, SD card slot
- GbE LAN (Native)
- 2x 2.5G LAN (PCIe)
- M.2 Connector
- HDMI 2.0, MIPI DSI/CSI
- 2xUSB 3.0 Host
- USB Type C PD, 5V/9V/12V
- GPIO: 12-pin 0.5mm FPC connector

The device tree is taken from kernel v6.4-rc1.

Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Signed-off-by: Tianling Shen <cnsztl@gmail.com>
17 months agorockchip: rk3328: Add support for Orange Pi R1 Plus LTS
Tianling Shen [Sat, 20 May 2023 11:20:50 +0000 (19:20 +0800)]
rockchip: rk3328: Add support for Orange Pi R1 Plus LTS

The OrangePi R1 Plus LTS is a minor variant of OrangePi R1 Plus with
the on-board NIC chip changed from rtl8211e to yt8531c, and RAM type
changed from DDR4 to LPDDR3.

The device tree is taken from kernel v6.4-rc1.

Signed-off-by: Tianling Shen <cnsztl@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
17 months agorockchip: rk3328: Add support for Orange Pi R1 Plus
Tianling Shen [Sat, 20 May 2023 11:20:49 +0000 (19:20 +0800)]
rockchip: rk3328: Add support for Orange Pi R1 Plus

Orange Pi R1 Plus is a Rockchip RK3328 based SBC by Xunlong.

This device is similar to the NanoPi R2S, and has a 16MB
SPI NOR (mx25l12805d). The reset button is changed to
directly reset the power supply, another detail is that
both network ports have independent MAC addresses.

The device tree and description are taken from kernel v6.3-rc1.

Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Signed-off-by: Tianling Shen <cnsztl@gmail.com>
17 months agodoc: anbernic: Update RGxx3 Docs for panel detection
Chris Morgan [Mon, 15 May 2023 16:00:32 +0000 (11:00 -0500)]
doc: anbernic: Update RGxx3 Docs for panel detection

Update the Anbernic RGxx3 documentation to note that panel detection
has been added and how it works.

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
17 months agoconfigs: Update anbernic-rgxx3_defconfig for panel detection
Chris Morgan [Mon, 15 May 2023 16:00:31 +0000 (11:00 -0500)]
configs: Update anbernic-rgxx3_defconfig for panel detection

Update the anbernic-rgxx3_defconfig file to support panel autodetection
and automatically updating the compatible string in the devicetree.

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
17 months agoboard: rockchip: Add panel auto-detection for Anbernic RGxx3
Chris Morgan [Mon, 15 May 2023 16:00:30 +0000 (11:00 -0500)]
board: rockchip: Add panel auto-detection for Anbernic RGxx3

Add support to automatically detect the panel for the Anbernic RGxx3.
This is done by creating a "pseudo driver" that provides only the bare
minimum to start the DSI controller and DSI DPHY. Once started, we then
can query the panel for its panel ID and compare it to a table of known
values. The panel compatible string (which corresponds to the upstream
Linux driver) is then defined as an environment variable "panel". The
panel compatible string is also changed automatically via an
ft_board_setup() call if what is detected differs from what is in the
loaded tree. This way, end users can use the same bootloader without
having to worry about which panel they have (as there is no obvious
way of knowing).

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
17 months agoboard: rockchip: Add support for RG353PS to RGxx3
Chris Morgan [Mon, 15 May 2023 16:00:29 +0000 (11:00 -0500)]
board: rockchip: Add support for RG353PS to RGxx3

Add support for the RG353PS to the Anbernic RGxx3. This device is a
slightly pared down version of the RG353P with no eMMC, no touchscreen,
and only 1GB of RAM.

Refactor board logic so that all supported devices are defined with
ADC values and that future boards can be added by just defining the
board values in the device array.

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
17 months agoboard: rockchip: add DSI and DSI-DPHY for Anbernic RGxx3
Chris Morgan [Mon, 15 May 2023 16:00:28 +0000 (11:00 -0500)]
board: rockchip: add DSI and DSI-DPHY for Anbernic RGxx3

Add support for the DSI and DSI-DPHY to U-Boot for the RGxx3. These are
needed so we can send a panel ID request to determine which panel is
being used.

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
17 months agoboard: rockchip: Correct i2c2 pinctrl for RGxx3
Chris Morgan [Mon, 15 May 2023 16:00:27 +0000 (11:00 -0500)]
board: rockchip: Correct i2c2 pinctrl for RGxx3

The pinctrl on the Anbernic RGxx3 for the i2c2 bus does not use the
default value, so explicitly define it.

Fixes: 6cf6fe25370c ("board: rockchip: add Anbernic RGXX3 Series Devices")
Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
17 months agoconfigs: rock5b-rk3588: enable USB 3.0 controller, command, gadget
Eugen Hristev [Mon, 29 May 2023 10:01:36 +0000 (13:01 +0300)]
configs: rock5b-rk3588: enable USB 3.0 controller, command, gadget

Enable configuration for USB 3.0 controller, the commands required,
and the gadget drivers.

Signed-off-by: Eugen Hristev <eugen.hristev@collabora.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
17 months agoARM: dts: rockchip: rk3588-rock-5b-u-boot: add USB3 support
Eugen Hristev [Mon, 29 May 2023 10:01:35 +0000 (13:01 +0300)]
ARM: dts: rockchip: rk3588-rock-5b-u-boot: add USB3 support

Enable the USB3.0 host node, and gadget node.
The gadget is available through the USB type C connector on the board.
The connector is tied to a Fairchild fusb302b device, which currently
does not have a driver in U-boot, but the node is here for correct
description of the board + Linux future compatibility.
It will be easier to move the node as-is when it will be available
in the DT from Linux

Signed-off-by: Eugen Hristev <eugen.hristev@collabora.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
17 months agoARM: dts: rockchip: rk3588: add support for USB 3.0 devices
Joseph Chen [Mon, 29 May 2023 10:01:34 +0000 (13:01 +0300)]
ARM: dts: rockchip: rk3588: add support for USB 3.0 devices

Add support for the USB 3.0 devices in rk3588:
- USB DRD(dual role device) 3.0 #0 as usbdrd3_0 which is available in
rk3588s
- USB DRD(dual role device) 3.0 #1 as usbdrd3_1 which is available in
rk3588 only
- USB DP PHY (combo USB3.0 and DisplayPort Alt Mode ) #0 phy interface
as usbdp_phy0
- USB DP PHY (combo USB3.0 and DisplayPort Alt Mode ) #1 phy interface
as usbdp_phy1
- USB 2.0 phy #2 , the USB 3.0 device can work with this phy in USB 2.0
mode
- associated GRFs (general register files) for the devices.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
[eugen.hristev@collabora.com: move nodes to right place, adapt from latest
linux kernel]
Signed-off-by: Eugen Hristev <eugen.hristev@collabora.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
17 months agophy: rockchip: add usbdp combo phy driver
Frank Wang [Mon, 29 May 2023 10:01:33 +0000 (13:01 +0300)]
phy: rockchip: add usbdp combo phy driver

This adds a new USBDP combo PHY with Samsung IP block driver.
The PHY is a combo between USB 3.0 and DisplayPort alt mode.

Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
[eugen.hristev@collabora.com: ported to 2023.07, clean-up]
Signed-off-by: Eugen Hristev <eugen.hristev@collabora.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
17 months agoARM: dts: rockchip: rk3588: sync with Linux
Eugen Hristev [Mon, 29 May 2023 07:34:23 +0000 (10:34 +0300)]
ARM: dts: rockchip: rk3588: sync with Linux

Sync the devicetree with linux-next tag: next-20230525

Signed-off-by: Eugen Hristev <eugen.hristev@collabora.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
17 months agovideo: rockchip: Add support for RK3399 to dw-mipi-dsi bridge
Ondrej Jirman [Thu, 25 May 2023 12:29:03 +0000 (14:29 +0200)]
video: rockchip: Add support for RK3399 to dw-mipi-dsi bridge

This just needs some extra clocks enabled, and different registers
configured. Copied from Linux, just like the original submitter
of this driver did for rk3568.

Tested on Pinephone Pro.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Philipp Tomsich <philipp.tomsich@vrull.eu>
Cc: Kever Yang <kever.yang@rock-chips.com>
Cc: Chris Morgan <macromorgan@hotmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
17 months agorockchip: board: Update Odroid Go2 to Support Additional Revisions
Chris Morgan [Wed, 10 May 2023 15:55:50 +0000 (10:55 -0500)]
rockchip: board: Update Odroid Go2 to Support Additional Revisions

Update the board.c file for the Odroid Go Advance to support the
Black Edition and the Odroid Go Super. The Odroid Go Advance Black
Edition differs from the original model with the addition of 2
extra buttons and an ESP8266 WiFi module. The Odroid Go Super
adds an additional 2 buttons compared to the Black Edition, along
with a larger panel and larger battery.

This change uses the value of ADC0 to determine which of these
3 models it is, and then changes the ${fdtfile} environment variable
to match the proper devicetree name in mainline Linux.

Tested on an Odroid Go Advance (first revision) and an Odroid Go Super.
The correct ${fdtfile} variable was set for each device.

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
17 months agoconfigs: rock5b-rk3588: add rtl8169 driver
Eugen Hristev [Tue, 25 Apr 2023 13:06:59 +0000 (16:06 +0300)]
configs: rock5b-rk3588: add rtl8169 driver

Add the rtl8169 driver, which supports the rtl8125b device, which is
connected on the pciE bus on this board.
Enable also CONFIG_SYS_HAS_NONCACHED_MEMORY to have the descriptors stored.

Signed-off-by: Eugen Hristev <eugen.hristev@collabora.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
17 months agoboard: ti: k3: Convert boot flow ascii flow to svg
Nishanth Menon [Thu, 27 Jul 2023 18:59:02 +0000 (13:59 -0500)]
board: ti: k3: Convert boot flow ascii flow to svg

Replace the ascii flow diagram with svg.

Signed-off-by: Nishanth Menon <nm@ti.com>
17 months agodoc: board: ti: k3: Sort the boards in alphabetical order
Nishanth Menon [Thu, 27 Jul 2023 18:59:01 +0000 (13:59 -0500)]
doc: board: ti: k3: Sort the boards in alphabetical order

Keep the boards sorted in alphabetical order.

Signed-off-by: Nishanth Menon <nm@ti.com>
17 months agodoc: board: ti: *: Add platform information
Nishanth Menon [Thu, 27 Jul 2023 18:59:00 +0000 (13:59 -0500)]
doc: board: ti: *: Add platform information

Add link to the actual platform for folks to find details about the
board in addition to the SoC's TRM.

Signed-off-by: Nishanth Menon <nm@ti.com>
17 months agodoc: board: ti: j7200_evm: Convert the emmc layout to svg
Nishanth Menon [Thu, 27 Jul 2023 18:58:59 +0000 (13:58 -0500)]
doc: board: ti: j7200_evm: Convert the emmc layout to svg

Convert the emmc memory layout to svg

Signed-off-by: Nishanth Menon <nm@ti.com>
17 months agodoc: board: ti: am65x_evm: Convert the emmc layout to svg
Nishanth Menon [Thu, 27 Jul 2023 18:58:58 +0000 (13:58 -0500)]
doc: board: ti: am65x_evm: Convert the emmc layout to svg

Convert the emmc memory layout to svg

Signed-off-by: Nishanth Menon <nm@ti.com>
17 months agodoc: board: ti: am65/j721e: Convert OSPI memory map to svg
Nishanth Menon [Thu, 27 Jul 2023 18:58:57 +0000 (13:58 -0500)]
doc: board: ti: am65/j721e: Convert OSPI memory map to svg

Convert the memory map for OSPI as a common memory map

Signed-off-by: Nishanth Menon <nm@ti.com>
17 months agodoc: board: ti: am65x_evm: Convert the UART boot responsibility to list table
Nishanth Menon [Thu, 27 Jul 2023 18:58:56 +0000 (13:58 -0500)]
doc: board: ti: am65x_evm: Convert the UART boot responsibility to list table

Use list tables to map up the UART Boot responsibility table.

Signed-off-by: Nishanth Menon <nm@ti.com>
17 months agodoc: board: ti: j7200_evm: Convert switch settings to list tables
Nishanth Menon [Thu, 27 Jul 2023 18:58:55 +0000 (13:58 -0500)]
doc: board: ti: j7200_evm: Convert switch settings to list tables

Use list tables to map up the dip switch settings

Signed-off-by: Nishanth Menon <nm@ti.com>
17 months agodoc: board: ti: am62x_sk: Convert switch settings to list tables
Nishanth Menon [Thu, 27 Jul 2023 18:58:54 +0000 (13:58 -0500)]
doc: board: ti: am62x_sk: Convert switch settings to list tables

Use list tables to map up the dip switch settings

Signed-off-by: Nishanth Menon <nm@ti.com>
17 months agodoc: board: ti: am62x_sk: Add labels to reuse memory map
Nishanth Menon [Thu, 27 Jul 2023 18:58:53 +0000 (13:58 -0500)]
doc: board: ti: am62x_sk: Add labels to reuse memory map

Add labels around the A53 SPL DDR memory layout to be able to reuse the
memory map.

Signed-off-by: Nishanth Menon <nm@ti.com>
17 months agodoc: board: ti: am62x: Convert the image format to svg
Nishanth Menon [Thu, 27 Jul 2023 18:58:52 +0000 (13:58 -0500)]
doc: board: ti: am62x: Convert the image format to svg

Convert the image format into svg that can be reused across platforms as
needed.

Signed-off-by: Nishanth Menon <nm@ti.com>
17 months agodoc: board: ti: am65x: Convert the image format to svg
Nishanth Menon [Thu, 27 Jul 2023 18:58:51 +0000 (13:58 -0500)]
doc: board: ti: am65x: Convert the image format to svg

Convert the image format into svg that can be reused across platforms as
needed.

Signed-off-by: Nishanth Menon <nm@ti.com>
17 months agodoc: board: ti: j721e: Convert the image format to svg
Nishanth Menon [Thu, 27 Jul 2023 18:58:50 +0000 (13:58 -0500)]
doc: board: ti: j721e: Convert the image format to svg

Convert the image format into svg that can be reused across platforms as
needed.

Signed-off-by: Nishanth Menon <nm@ti.com>
17 months agodoc: board: ti: j7200: Convert the image format to svg
Nishanth Menon [Thu, 27 Jul 2023 18:58:49 +0000 (13:58 -0500)]
doc: board: ti: j7200: Convert the image format to svg

Convert the image format into svg that can be reused across platforms as
needed.

Signed-off-by: Nishanth Menon <nm@ti.com>
17 months agodoc: board: ti: k3: Reuse build instructions
Nishanth Menon [Thu, 27 Jul 2023 18:58:48 +0000 (13:58 -0500)]
doc: board: ti: k3: Reuse build instructions

Introduce common variables to define a generic build instruction that is
then used in specific board specific description.

Labels are introduced in the evm.rst files to be then reused in variant
board documentation as well.

While at this, drop using ARCH=arm when building u-boot sources. This
practice has been discouraged for some time and can potentially create
problems with Kconfig rules related to aarch64. It's best to avoid
this approach.

Signed-off-by: Nishanth Menon <nm@ti.com>
17 months agodoc: board: ti: j721e: Update with boot flow diagram
Nishanth Menon [Thu, 27 Jul 2023 18:58:47 +0000 (13:58 -0500)]
doc: board: ti: j721e: Update with boot flow diagram

Update the bootflow svg diagram instead of the ascii version

Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
17 months agodoc: board: ti: am65x: Update with boot flow diagram
Nishanth Menon [Thu, 27 Jul 2023 18:58:46 +0000 (13:58 -0500)]
doc: board: ti: am65x: Update with boot flow diagram

Update the bootflow svg diagram instead of the ascii version

Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
17 months agodoc: board: ti: am62x/j7200: Update with common boot flow diagram
Nishanth Menon [Thu, 27 Jul 2023 18:58:45 +0000 (13:58 -0500)]
doc: board: ti: am62x/j7200: Update with common boot flow diagram

Update the bootflow svg diagram and reuse across the platforms as they
are common.

Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
17 months agodoc: board: ti: Optimize sources references
Nishanth Menon [Thu, 27 Jul 2023 18:58:44 +0000 (13:58 -0500)]
doc: board: ti: Optimize sources references

We have duplication of sources which makes it hard to sustain across the
board, but at the same time, we'd like to ensure readers get specific
information without having to cross refer to different documentation to
get piecemeal information that they need to put together.

Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
17 months agoefi_loader: fix uninitialized variable bug in efi_set_load_options()
Dan Carpenter [Thu, 27 Jul 2023 07:15:01 +0000 (10:15 +0300)]
efi_loader: fix uninitialized variable bug in efi_set_load_options()

Check for efi_search_protocol() failure before dereferencing "handler"
to avoid a crash.

Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
17 months agodoc: ti: Clarify required file names for K3 platforms
Tom Rini [Tue, 25 Jul 2023 16:44:16 +0000 (12:44 -0400)]
doc: ti: Clarify required file names for K3 platforms

Now that we are using binman in all cases on these platforms, reword
things to be clearer that for filesystem booting we need to use a
specific name for each component.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
17 months agoefi_loader: make efi_delete_handle() follow the EFI spec
Ilias Apalodimas [Mon, 24 Jul 2023 10:17:36 +0000 (13:17 +0300)]
efi_loader: make efi_delete_handle() follow the EFI spec

The EFI doesn't allow removal of handles, unless all hosted protocols
are cleanly removed.  Our efi_delete_handle() is a bit intrusive.
Although it does try to delete protocols before removing a handle,
it doesn't care if that fails.  Instead it only returns an error if the
handle is invalid. On top of that none of the callers of that function
check the return code.

So let's rewrite this in a way that fits the EFI spec better.  Instead
of forcing the handle removal, gracefully uninstall all the handle
protocols.  According to the EFI spec when the last protocol is removed
the handle will be deleted.  Also switch all the callers and check the
return code. Some callers can't do anything useful apart from reporting
an error.  The disk related functions on the other hand, can prevent a
medium that is being used by EFI from removal.

The only function that doesn't check the result is efi_delete_image().
But that function needs a bigger rework anyway, so we can clean it up in
the future

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
17 months agodoc: describe QEMU emulation of block devices
Heinrich Schuchardt [Mon, 24 Jul 2023 10:04:18 +0000 (12:04 +0200)]
doc: describe QEMU emulation of block devices

* Add a new page about the emulation of block devices
* Add semihosting to the emulation index page
* Set toc maxdepth to 1 to improve readability

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
17 months agodoc: fix typo device_compat/.h
Heinrich Schuchardt [Mon, 24 Jul 2023 08:53:59 +0000 (10:53 +0200)]
doc: fix typo device_compat/.h

%s/device_compat\/.h/device_compat.h/

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
17 months agoefi_loader: simplify dp_fill()
Heinrich Schuchardt [Fri, 21 Jul 2023 06:34:18 +0000 (08:34 +0200)]
efi_loader: simplify dp_fill()

Move the recursive dp_fill(dev->parent) call to a single location.
Determine uclass_id only once.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
17 months agoefi_loader: device paths for special block devices
Heinrich Schuchardt [Thu, 20 Jul 2023 22:03:46 +0000 (00:03 +0200)]
efi_loader: device paths for special block devices

The UEFI specification does not provide node types matching UCLASS_BLKMAP,
UCLASS_HOST, UCLASS_VIRTIO block devices.

The current implementation uses VenHw() nodes with uclass specific GUIDs
and a single byte for the device number appended. This leads to unaligned
integers in succeeding device path nodes.

The current implementation fails to create unique device paths for block
devices based on other uclasses like UCLASS_PVBLOCK.

Let's use a VenHw() node with the U-Boot GUID with a length dividable by
four and encoding blkdesc->uclass_id as well as  blkdesc->devnum.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
17 months agodoc: update doc/sphinx/requirements.txt
Heinrich Schuchardt [Thu, 20 Jul 2023 16:27:30 +0000 (18:27 +0200)]
doc: update doc/sphinx/requirements.txt

Update the following requirements to their latest version:

* Pygments - syntax highlighting
* pytz     - world timezone definitions
* certifi  - Mozilla's CA bundle

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
17 months agonet: ti: am65-cpsw-nuss: Get port mode register from standard "phys" property
Roger Quadros [Sat, 22 Jul 2023 19:31:49 +0000 (22:31 +0300)]
net: ti: am65-cpsw-nuss: Get port mode register from standard "phys" property

Approved DT binding has the port mode register in the
"phys" property. Get it from there instead of the custom
"cpsw-phy-sel" property.

This will allow us to keep DT in sync with Linux.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
Acked-by: Nishanth Menon <nm@ti.com>