Commit graph

90326 commits

Author SHA1 Message Date
Svyatoslav Ryhel
e22d5799dc ARM: dts: tegra30: enable USB PHY node on some devices
Enable USB PHY nodes on ASUS Transformers, Grouper, Enadevoru
and LG X3. This is not mandatory since driver will use default
values but preferable for new devices.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2023-11-28 09:17:18 +02:00
Svyatoslav Ryhel
555b28dacd board: grouper: convert ASUS Google Nexus 7 (2012) to use DM PMIC
Since required drivers were merged, we can safely clean up the
board and switch to DM based driver with device tree support.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2023-11-28 09:16:55 +02:00
Svyatoslav Ryhel
8849951057 board: transformer-t30: convert ASUS Transformers to use DM PMIC
Since required drivers were merged, we can safely clean up the
board and switch to DM based driver with device tree support.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2023-11-28 09:16:26 +02:00
Svyatoslav Ryhel
441dea268b board: endeavoru: convert HTC One X to use DM PMIC
Since required drivers were merged, we can safely clean up the
board and switch to DM based driver with device tree support.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2023-11-28 09:15:50 +02:00
Svyatoslav Ryhel
459d6d9f1e board: lg-x3: convert LG Optimus 4X and Vu to use DM PMIC
Since required drivers were merged, we can safely clean up the
board and switch to DM based driver with device tree support.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2023-11-28 09:14:54 +02:00
Svyatoslav Ryhel
14f2e54975 ARM: tegra: call regulators_enable_boot_on on board init
Call regulators_enable_boot_on on board init to set all regulators
with boot-on property in device tree. If regulator is not used by
any device in the device tree but is essential for the device to
work a regression will occur.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2023-11-28 09:09:53 +02:00
Thierry Reding
9d3f7f881e ARM: dts: Reuse I2C3 for NVEC
Instead of duplicating the I2C3 node and adding NVEC specific
properties, reuse the I2C3 node, extend it with NVEC specific properties
and drop properties that are not needed by NVEC. This results in a DTB
that is a bit cleaner and avoids accidentally using I2C3 and NVEC which
would have them fight over the same hardware resources.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2023-11-28 09:00:20 +02:00
Philip Oberfichtner
acae7eb5fe i2c: Bugfix in i2c_get_chip_by_phandle()
The "i2cbcdev" sneaked in when implementing this function for the
bootcounter use case. Obviously the intention was to use prop_name
instead.

Fixes: b483552773 (i2c: Implement i2c_get_chip_by_phandle())

Signed-off-by: Philip Oberfichtner <pro@denx.de>
Acked-by: Heiko Schocher <hs@denx.de>
2023-11-27 18:54:56 -05:00
Tom Rini
d6e052c615 Merge patch series "ufs: Add a PCI UFS controller support"
To quote the author:

This adds a PCI UFS controller support and enables the support on
QEMU RISC-V for testing.

Requiring QEMU v8.2+.
2023-11-27 16:19:09 -05:00
Bin Meng
3555c92583 qemu: riscv: Enable UFS support
This enables UFS support for QEMU RISC-V 'virt' machine.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-11-27 16:18:59 -05:00
Bin Meng
5b2d25a2e3 ufs: Handle UFS 3.1 controllers
Extend the version check to handle UFS 3.1 controllers as well.
Tested on QEMU emulated UFS 3.1 controller.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-11-27 16:18:59 -05:00
Bin Meng
2ec7d657c0 ufs: Add a PCI based UFS controller driver
This adds a simple PCI based UFS controller driver with a QEMU
emulated UFS controller on the PCI bus.

Requiring QEMU v8.2+.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-11-27 16:18:59 -05:00
Bin Meng
e5c19ce47c ufs: Allow mmio registers on the PCI bus
Check if the UFS controller is on the PCI bus, and get its register
base address accordingly.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
2023-11-27 16:18:59 -05:00
Bin Meng
07a64f0a34 pci_ids: Add Red Hat vendor and device IDs
Red Hat, Inc. donates a part of its device ID range [1] to QEMU,
to be used for virtual devices. This commit adds several typical
devices that are useful in U-Boot.

[1] https://www.qemu.org/docs/master/specs/pci-ids.html

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-11-27 16:18:59 -05:00
Bin Meng
ba537e9b27 cmd: ufs: Correct the help text
Remove the additional space and use "sub-system" for consistency
with other commands like "scsi" and "usb".

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
2023-11-27 16:18:59 -05:00
Bin Meng
ff039a8704 cmd: kconfig: Make ufs prompt look similar to other commands
At present the 'ufs' command prompt does not look similar like other
commands. Update it.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
2023-11-27 16:18:59 -05:00
Bin Meng
1b3dab2d29 ufs: Add a line feed to the end of some dev_xxx() messages
Add a line feed to improve readability of some dev_xxx() messages.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-11-27 16:18:59 -05:00
Bin Meng
b2d01681ab ufs: Correct the UFS terminlogy
UFS stands for Universal Flash Storage, not Subsytem.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
2023-11-27 16:18:58 -05:00
Sam Protsenko
470682ace1 configs: Remove unneeded SYS_CONFIG_NAME from a*y17lte defconfigs
As correct default SYS_CONFIG_NAME value is now set in
board/samsung/axy17lte/Kconfig (in commit "board: samsung: Fix
SYS_CONFIG_NAME configs in axy17lte Kconfig"), the SYS_CONFIG_NAME
option can be safely removed from all a*y17lte defconfigs. That removal
doesn't change resulting .config files.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2023-11-27 18:57:35 +09:00
Sam Protsenko
6219b47c4d board: samsung: Fix SYS_CONFIG_NAME configs in axy17lte Kconfig
There is a couple of issues related to SYS_CONFIG_NAME config in
axy17lte Kconfig.

1. The global SYS_CONFIG_NAME in axy17lte Kconfig overrides
   SYS_CONFIG_NAME for all boards specified after this line in
   arch/arm/mach-exynos/Kconfig:

       source "board/samsung/axy17lte/Kconfig"

   Right now it's the last 'source' line there, so the issue is not
   reproducible. But once some board is moved or added after this line
   the next build error will happen:

       GEN     include/autoconf.mk.dep
     In file included from ./include/common.h:16:
     include/config.h:3:10: fatal error: configs/exynos78x0-common.h.h:
                            No such file or directory
         3 | #include <configs/exynos78x0-common.h.h>
           |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     compilation terminated.

   That's happening because axy17lte Kconfig defines SYS_CONFIG_NAME
   option in global namespace (not guarded with any "if TARGET_..."), so
   it basically rewrites the correct SYS_CONFIG_NAME defined in the
   hypothetical boards which might appear after axy17lte in mach-exynos
   Kconfig.

2. Another side of the issue is that SYS_CONFIG_NAME is defined
   incorrectly in axy17lte Kconfig:

       config SYS_CONFIG_NAME
           default "exynos78x0-common.h"

   The .h extension should not have been specified there. It's leading
   to a build error, as the generated include file has a double '.h'
   extension.

3. Each target in axy17lte/Kconfig defines its own SYS_CONFIG_NAME. But
   all of those in fact incorrect, as corresponding
   include/configs/<CONFIG_SYS_CONFIG_NAME>.h header files don't exist.

4. The global SYS_CONFIG_NAME pretty much repeats the help description
   from arch/Kconfig and doc/README.kconfig.

Corresponding defconfig files (a*y17lte_defconfig) fix above issues by
overriding SYS_CONFIG_NAME and correctly setting it to
"exynos78x0-common".

Fix all mentioned issues by removing the incorrect global
SYS_CONFIG_NAME and instead specifying it (correctly) in SYS_CONFIG_NAME
options for each target instead.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Fixes: 3e2095e960 ("board: samsung: add support for Galaxy A series of 2017 (a5y17lte)")
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2023-11-27 18:57:35 +09:00
Sam Protsenko
33e7ca5a9b serial: s5p: Use dev_read_addr_ptr() to get base address
As the address read from device tree is being cast to a pointer, it's
better to use dev_read_addr_ptr() API for getting that address. The more
detailed explanation can be found in commit a12a73b664 ("drivers: use
dev_read_addr_ptr when cast to pointer").

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2023-11-27 18:04:11 +09:00
Tom Rini
1fcf078f54 Merge tag 'u-boot-dfu-20231124' of https://source.denx.de/u-boot/custodians/u-boot-dfu
u-boot-dfu-20231124

- Fix reinit for ChipIdea controller
- Add missing newline in fastboot error handling
2023-11-25 17:38:43 -05:00
Tom Rini
129d6a0d87 Merge tag 'u-boot-dfu-next-20231124' of https://source.denx.de/u-boot/custodians/u-boot-dfu into next
u-boot-dfu-next-20231124

- Make dfu entity name size configurable in KConfig
- Implement start-stop for UMS (graceful shutdown via eject)
- Improve help messages for cmd/bind
- Improve help message for udc bind failures
2023-11-25 12:34:23 -05:00
Tom Rini
1682d97db9 Merge branch '2023-11-25-assorted-platform-updates' into next
- Updates for the Siemens AM335x platforms, Nuvoton platforms, and
  disable CONFIG_NET on platforms that lack NETDEVICES, so that
  NETDEVICES can be implied by NET.
2023-11-25 12:32:48 -05:00
Sam Protsenko
a627f2802a serial: s5p: Improve coding style
Just some minor style fixes. No functional change.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2023-11-23 15:24:18 +09:00
Sam Protsenko
e79f630dbf serial: s5p: Use named constants for register values
Get rid of magic numbers in s5p_serial_init() when writing to UART
registers. While at it, use BIT() macro for existing constants when
appropriate.

No functional change.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2023-11-23 15:24:18 +09:00
Sam Protsenko
5ad21de6ba serial: s5p: Use livetree API to get "id" property
Use dev_read_u8_default() instead of fdtdec_get_int() to read the "id"
property from device tree, as suggested in [1]. dev_* API is already
used in this driver, so there is no reason to stick to fdtdec_* API.
This also fixes checkpatch warning:

    WARNING: Use the livetree API (dev_read_...)

[1] doc/develop/driver-model/livetree.rst

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2023-11-23 15:24:18 +09:00
Sam Protsenko
a0615ffc99 serial: s5p: Remove common.h inclusion
It's not really needed here anymore. Remove it, as common.h is going
away at some point.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2023-11-23 15:24:18 +09:00
Tom Rini
f4449038f6 net: Make NET imply NETDEVICES
Normally, when NET is enabled, CMD_NET will then be enabled and in turn
NETDEVICES will (likely) be enabled via imply. However, if we disable
CMDLINE in a defconfig we now no longer get CMD_NET enabling NETDEVICES
for us. This suggestion (as an imply is) really isn't about the network
commands but network itself and is a legacy of how intertwined
NET/CMD_NET were historically. Move this over to the NET entry instead
where it is a more logical fit.

Reported-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
2023-11-22 19:53:39 -05:00
Tom Rini
6df4e7b50a boards: Disable NET on platforms without NETDEVICES
None of these platforms enabled a networking devices, and disabled
CMD_NET. Given that we used to gate network support on CMD_NET rather
than NET, we disable CONFIG_NET on these platforms now.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-11-22 19:53:39 -05:00
Jim Liu
5a2070783d board: nuvoton: update console environment variable
If CONFIG_SYS_SKIP_UART_INIT is enabled, calculate the
current baud rate and update the "console" environment
variable.

Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
2023-11-22 19:11:27 -05:00
Jim Liu
65660bfe85 serial: npcm: support skip uart clock setting
Skip the uart clock setting if CONFIG_SYS_SKIP_UART_INIT is enabled.
Fix divisor error.

Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
2023-11-22 19:10:04 -05:00
Jim Liu
1504813eb8 configs: arbel: Enable full functions
Enable more functions/commands for arbel evb.

Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
2023-11-22 19:10:04 -05:00
Jim Liu
438d253943 arm: dts: npcm845-evb: fix/add node and aliases
Modify spi and usb aliases name.
Add dt-binding for usb phy define and fix usb phy reset error.
Add tpm/otpee and host_intf node.

Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
2023-11-22 19:10:04 -05:00
Enrico Leto
437fa09673 configs: draco: restore clock driver
Fix 'failed to get fck clock' error on boot. Add missing configs.

Signed-off-by: Enrico Leto <enrico.leto@siemens.com>
2023-11-22 19:10:04 -05:00
Enrico Leto
ba0d6a284a configs: draco: disable misc init
The initcall sequence fails at arch_misc_init. Disable misc init until
driver model and DT are clean.

Signed-off-by: Enrico Leto <enrico.leto@siemens.com>
2023-11-22 19:10:04 -05:00
Enrico Leto
3328e6ec77 configs: draco: remove unused resources from spl
We don't need device tree, GPIO & SPI in SPL.

Signed-off-by: Enrico Leto <enrico.leto@siemens.com>
2023-11-22 19:10:04 -05:00
Enrico Leto
f01e947c4a configs: thuban, rastaban: remove emmc
These targets use NAND FLASH only. Maybe some MMC definitions were added by
trying MMC for the etamin target evaluation and were not removed.

Signed-off-by: Enrico Leto <enrico.leto@siemens.com>
2023-11-22 19:10:04 -05:00
Enrico Leto
6fd75b7d19 configs: draco: remove spi flash support
The SPI FLASH was set in the early development phase for evaluations.
Any target use it anymore.

Signed-off-by: Enrico Leto <enrico.leto@siemens.com>
2023-11-22 19:10:04 -05:00
Enrico Leto
1c73e05b03 siemens,am335x: clean-up draco targets
Draco is a family of 3 boards: thuban, rastaban & etamin. Rename all
targets of the family adding the draco- prefix to increase readibility
and simplify future commits about concerning all boards of the family.

The name draco was initially used for the first target. It's deprecated
since a 2nd target was introduced. Unfortunately the draco target was
copied to the thuban target instead to be renamed. Remove it to save
unnecessary maintenance effort.

Signed-off-by: Enrico Leto <enrico.leto@siemens.com>
2023-11-22 19:10:03 -05:00
Tom Rini
054222eb68 Merge branch '2023-11-22-TI-K3-cleanups' into next
This brings in a large number of cleanups and reorganizations to the TI
K3 family of SoCs. We get DTS resyncs for most of the SoCs under that
umbrella as well, and a few enhancements too.
2023-11-22 14:05:53 -05:00
Manorit Chawdhry
2fadd62fe6 arm: dts: k3-am68*: Sync with kernel v6.7-rc1
Sync devicetree with kernel v6.7-rc1

Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
2023-11-22 13:48:20 -05:00
Manorit Chawdhry
7e7d2bfb2c arm: dts: k3-j721s2*: Sync with kernel v6.7-rc1
Sync devicetree with kernel v6.7-rc1

Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
2023-11-22 13:48:20 -05:00
Neha Malcom Francis
4509b9ff0b arm: dts: k3-*-binman: Move to using templated FITs
Reduce redundancy in code by using templates to generate the A72 boot
binaries (tispl.bin and u-boot.img) as well as R5 boot binary sysfw.itb
(for legacy boot following devices J721E and AM65x).

Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
Acked-by: Andrew Davis <afd@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Manorit Chawdhry <m-chawdhry@ti.com>
2023-11-22 13:48:20 -05:00
Neha Malcom Francis
b153bad0f1 arm: dts: k3-binman: Add support for FIT templates
Add templates for FIT images used extensively across K3 boards with most
of the code common. This includes the FIT portions of:
	- tispl.bin
	- u-boot.img
	- sysfw.itb (in case of legacy boot flow)

Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-11-22 13:48:20 -05:00
Nishanth Menon
b1c7fa0bf0 arm: dts: k3-am625-sk-r5/u-boot: Drop duplicate bootph-nodes
Kernel dts import now provides bootph-all and bootph-pre-ram properties
for the properties we have been overriding so far. Drop the same.

While at this enable the DM and TIFS UARTs for programming pinmux
since they are marked reserved by board.dts

Reviewed-by: Dhruva Gole <d-gole@ti.com>
Tested-by: Dhruva Gole <d-gole@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
2023-11-22 13:48:20 -05:00
Nishanth Menon
ab9d07b181 arm: dts: k3-am625-beagleplay-u-boot: drop duplicate bootph-nodes
Kernel dts import now provides bootph-all and bootph-pre-ram properties
for the properties we have been overriding so far. Drop the same.

Reviewed-by: Dhruva Gole <d-gole@ti.com>
Tested-by: Dhruva Gole <d-gole@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
2023-11-22 13:48:20 -05:00
Nishanth Menon
1146dc0854 arm: dts: k3-am625: Drop SoC provided bootph params from board u-boot/r5 dtsi
k3-am62* SoC dtsi files now provide the following:

bootph-all: dmss secure_proxy_main dmsc k3_pds k3_clks k3_reset
   main_pmx0 main_timer0 mcu_pmx0 wkup_conf chipid

bootph-pre-ram: secure_proxy_sa3 main_esm mcu_esm

Drop these from board r5 and u-boot.dtsi files as these are duplicate in
them now.

Acked-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Tested-by: Dhruva Gole <d-gole@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
2023-11-22 13:47:39 -05:00
Nishanth Menon
a0ca5f24c8 arm: dts: k3-am625*: Sync with kernel v6.7-rc1
Sync with kernel v6.7-rc1 and sync up the u-boot dts files accordingly.

Tested-by: Dhruva Gole <d-gole@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
2023-11-22 13:47:39 -05:00
Roger Quadros
0fc6f663ea arm: dts: k3-am625-verdin-wifi-dev-u-boot.dtsi: Fix DMA with BCDMA
BCDMA can be used at SPL for OSPI boot and mem-to-mem DMA
so add "bootph-all" to BCDMA node.

Suggested-by: Nishanth Menon <nm@ti.com>
Fixes: 9a3f2b6798 ("arm: dts: k3-am625-verdin-wifi-dev-u-boot.dtsi: Fix DMA/Ethernet")
Signed-off-by: Roger Quadros <rogerq@kernel.org>
Reviewed-by: Nishanth Menon <nm@ti.com>
Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2023-11-22 13:47:39 -05:00