platform/kernel/u-boot.git
14 months agodoc: board: ti: am65x: provide image alt text
Heinrich Schuchardt [Tue, 22 Aug 2023 16:40:59 +0000 (11:40 -0500)]
doc: board: ti: am65x: provide image alt text

Provide alternative text for image.

Fixes: fd358121bdb8 ("doc: board: ti: am65x: Update with boot flow diagram")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
14 months agodoc: board: ti: am62x: provide image alt texts
Heinrich Schuchardt [Tue, 22 Aug 2023 16:40:57 +0000 (11:40 -0500)]
doc: board: ti: am62x: provide image alt texts

Provide alternative texts for images.

Fixes: 34f76921d801 ("doc: board: ti: am62x: Convert the image format to svg")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
14 months agodoc: board: ti: k3: Fixup alt text for openocd sequence
Nishanth Menon [Tue, 22 Aug 2023 16:40:56 +0000 (11:40 -0500)]
doc: board: ti: k3: Fixup alt text for openocd sequence

Fix up OpenOCD setup sequence

Fixes: effe50854a69 ("doc: board: ti: k3: Add a guide to debugging with OpenOCD")
Reported-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
14 months agodoc: board: ti: k3: image alt texts
Heinrich Schuchardt [Tue, 22 Aug 2023 16:40:55 +0000 (11:40 -0500)]
doc: board: ti: k3: image alt texts

Provide alternative texts for images.

Fixes: 6e8fa0611f19 ("board: ti: k3: Convert boot flow ascii flow to svg")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
14 months agocmd: setexpr: fix printf_str()
Heinrich Schuchardt [Tue, 22 Aug 2023 10:21:13 +0000 (12:21 +0200)]
cmd: setexpr: fix printf_str()

If vsnprintf() returns a negative number, (i >= remaining) will
possibly be true:

'i' is of type signed int and 'remaining' is of the unsigned type size_t.
The C language will convert i to an unsigned type before the comparison.

This can result in the wrong error type being indicated.

Checking for negative i should be done first.

Fixes: f4f8d8bb1abc ("cmd: setexpr: add format string handling")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
14 months agoPrepare v2023.10-rc3
Tom Rini [Mon, 21 Aug 2023 20:19:59 +0000 (16:19 -0400)]
Prepare v2023.10-rc3

Signed-off-by: Tom Rini <trini@konsulko.com>
14 months agoMerge tag 'dm-pull-20aug23' of https://source.denx.de/u-boot/custodians/u-boot-dm
Tom Rini [Mon, 21 Aug 2023 19:48:30 +0000 (15:48 -0400)]
Merge tag 'dm-pull-20aug23' of https://source.denx.de/u-boot/custodians/u-boot-dm

sandbox64 fixes

15 months agotest: cpu: Handle both 32bit and 64bit CPUs
Marek Vasut [Sun, 13 Aug 2023 19:52:19 +0000 (21:52 +0200)]
test: cpu: Handle both 32bit and 64bit CPUs

Handle both 32bit and 64bit systems, i.e. sandbox and sandbox64
the same way drivers/cpu/cpu_sandbox.c does, that is in case
CONFIG_PHYS_64BIT is enabled, assume 64bit address width, else
assume 32bit address width. This fixes ut_dm_dm_test_cpu test
failure on sandbox64.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
15 months agoconfigs: sandbox64: Enable PCI register multi-entry support
Marek Vasut [Sun, 13 Aug 2023 19:51:50 +0000 (21:51 +0200)]
configs: sandbox64: Enable PCI register multi-entry support

Align the sandbox64 defconfig with sandbox defconfig. Enable missing
PCI register multi-entry support. This fixes ut_dm_dm_test_pci_bus_to_phys
test .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
15 months agoconfigs: sandbox64: Enable clock CCF driver
Marek Vasut [Sun, 13 Aug 2023 19:50:29 +0000 (21:50 +0200)]
configs: sandbox64: Enable clock CCF driver

Align the sandbox64 defconfig with sandbox defconfig. Enable missing
CCF and Sandbox CCF drivers. This fixes ut_dm_dm_test_clk_ccf test .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
15 months agoconfigs: sandbox64: Enable video 12x22 font support
Marek Vasut [Sun, 13 Aug 2023 05:15:06 +0000 (07:15 +0200)]
configs: sandbox64: Enable video 12x22 font support

Align the sandbox64 defconfig with sandbox defconfig. Enable missing
12x22 font support. This fixes ut_dm_dm_test_video_text_12x22 test .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
15 months agoconfigs: sandbox64: Enable video 16bpp and 24bpp support
Marek Vasut [Sun, 13 Aug 2023 05:15:05 +0000 (07:15 +0200)]
configs: sandbox64: Enable video 16bpp and 24bpp support

Align the sandbox64 defconfig with sandbox defconfig. Enable missing
16bpp and 24bpp video support. This fixes ut_dm_dm_test_video_bmp16
and ut_dm_dm_test_video_bmp24 tests .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
15 months agoconfigs: sandbox64: Enable PINCTRL_SINGLE driver
Marek Vasut [Sun, 13 Aug 2023 03:32:09 +0000 (05:32 +0200)]
configs: sandbox64: Enable PINCTRL_SINGLE driver

Align the sandbox64 defconfig with sandbox defconfig. Enable missing
PINCTRL single driver. This fixes ut_dm_dm_test_pinctrl_single test .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
15 months agotest: dm: pinmux: Handle %pa in pinctrl-single mux output
Marek Vasut [Sun, 13 Aug 2023 03:32:08 +0000 (05:32 +0200)]
test: dm: pinmux: Handle %pa in pinctrl-single mux output

The pinctrl-single driver uses %pa to print register value
in its single_get_pin_muxing() output. Handle this properly
in the test based on CONFIG_PHYS_64BIT .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
15 months agoconfigs: sandbox64: Enable BUTTON_ADC driver
Marek Vasut [Sun, 13 Aug 2023 03:05:52 +0000 (05:05 +0200)]
configs: sandbox64: Enable BUTTON_ADC driver

Align the sandbox64 defconfig with sandbox defconfig. Enable missing
BUTTON ADC driver. This fixes ut_dm_dm_test_button_keys_adc test .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
15 months agoconfigs: sandbox64: Enable MC34708 driver
Marek Vasut [Sun, 13 Aug 2023 02:57:01 +0000 (04:57 +0200)]
configs: sandbox64: Enable MC34708 driver

Align the sandbox64 defconfig with sandbox defconfig. Enable missing
MC34708 PMIC driver. This fixes ut_dm_dm_test_power_pmic_mc34708_get test .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
15 months agoconfigs: sandbox64: Increase console record size to 0x6000
Marek Vasut [Sun, 13 Aug 2023 01:17:54 +0000 (03:17 +0200)]
configs: sandbox64: Increase console record size to 0x6000

Align the sandbox64 defconfig with sandbox defconfig. Increase the
console record size. This fixes ut_bootstd_bootflow_cmd_scan_e .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
15 months agoconfigs: sandbox64: Enable SF bootdev
Marek Vasut [Sun, 13 Aug 2023 00:15:53 +0000 (02:15 +0200)]
configs: sandbox64: Enable SF bootdev

Align the sandbox64 defconfig with sandbox defconfig. Enable missing
SPI NOT bootdev. This fixes ut_bootstd_bootdev_test_cmd_hunt test .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
15 months agoMerge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sh
Tom Rini [Sun, 20 Aug 2023 15:09:11 +0000 (11:09 -0400)]
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sh

15 months agoarm: rmobile: Fix off-by-one error in cpuinfo
Paul Barker [Fri, 18 Aug 2023 13:17:21 +0000 (14:17 +0100)]
arm: rmobile: Fix off-by-one error in cpuinfo

In rmobile_cpuinfo_idx() there is an off-by-one error in accessing the
rmobile_cpuinfo array.

At the end of the loop, i is equal to the array size, i.e.
rmobile_cpuinfo[i] accesses one entry past the end of the array. The
last entry in the array is a fallback value so the loop should count to
ARRAY_SIZE(rmobile_cpuinfo) - 1 instead, this will leave i equal to the
index of the fallback value if no match is found.

Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com>
Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
15 months agoMerge tag 'doc-2023-10-rc3-2' of https://source.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Sat, 19 Aug 2023 14:13:28 +0000 (10:13 -0400)]
Merge tag 'doc-2023-10-rc3-2' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request doc-2023-10-rc3-2

Documentation:

* csf_examples: csf.sh: Remove unneeded export ATF_LOAD_ADDR line
* printf() codes: correct format specifier for unsigned int
* Fix typos in clk.h, irq.h.
* Correct description of proftool

Other:

* Quieten test for erofs filesystem presence
* spl: don't assume NVMe partition 1 exists

15 months agodoc: csf_examples: csf.sh: Remove unneeded export ATF_LOAD_ADDR line
Fabio Estevam [Tue, 15 Aug 2023 13:48:01 +0000 (10:48 -0300)]
doc: csf_examples: csf.sh: Remove unneeded export ATF_LOAD_ADDR line

Originally, exporting the ATF_LOAD_ADDR was required, but since binman has
been used to generate the flash.bin, it is no longer needed to do
such manual export.

The ATF address is now passed via binman.

Remove the unneeded export ATF_LOAD_ADDR line.

Signed-off-by: Fabio Estevam <festevam@denx.de>
15 months agoirq: Fix typo in header comment
Paul Barker [Mon, 14 Aug 2023 19:13:35 +0000 (20:13 +0100)]
irq: Fix typo in header comment

Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
15 months agoclk: Fix typo in header comment
Paul Barker [Mon, 14 Aug 2023 19:13:34 +0000 (20:13 +0100)]
clk: Fix typo in header comment

Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
15 months agodoc: printf() codes: Fix format specifier for unsigned int
Siddharth Vadapalli [Mon, 14 Aug 2023 04:53:48 +0000 (10:23 +0530)]
doc: printf() codes: Fix format specifier for unsigned int

The format specifier for the "unsigned int" variable is documented as
"%d". However, it should be "%u". Thus, fix it.

Fixes: f5e9035043fb ("doc: printf() codes")
Reported-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
15 months agodocs: fix wrong usage of proftool
Puhan Zhou [Sun, 13 Aug 2023 05:16:19 +0000 (13:16 +0800)]
docs: fix wrong usage of proftool

The usage of proftool in docs is incorrect. If proftool is used without
'-o' argument, it will show the usage like following

$ ./sandbox/tools/proftool -m sandbox/System.map -t trace -f funcgraph dump-ftrace >trace.dat
Must provide trace data, System.map file and output file
Usage: proftool [-cmtv] <cmd> <profdata>

Change '>' to '-o' to fix it.

Signed-off-by: Puhan Zhou <puh4n.zhou@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
15 months agospl: don't assume NVMe partition 1 exists
Heinrich Schuchardt [Tue, 15 Aug 2023 16:07:36 +0000 (18:07 +0200)]
spl: don't assume NVMe partition 1 exists

There is no requirement that a partition 1 exists in a partition table.
We should not try to retrieve information about it.

We should not even try reading with partition number
CONFIG_SYS_NVME_BOOT_PARTITION here as this is done in the fs_set_blk_dev()
call anyway.

Fixes: 8ce6a2e17577 ("spl: blk: Support loading images from fs")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
15 months agofs/erofs: Quieten test for filesystem presence
Simon Glass [Sun, 13 Aug 2023 14:26:40 +0000 (08:26 -0600)]
fs/erofs: Quieten test for filesystem presence

At present listing a partition produces lots of errors about this
filesystem:

   => part list mmc 4
   cannot find valid erofs superblock
   cannot find valid erofs superblock
   cannot read erofs superblock: -5
   [9 more similar lines]

Use debugging rather than errors when unable to find a signature, as is
done with other filesystems.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
15 months agorockchip: rk3566-anbernic-rgxx3: Rename defconfig to include SoC name
Jonas Karlman [Thu, 17 Aug 2023 21:52:48 +0000 (21:52 +0000)]
rockchip: rk3566-anbernic-rgxx3: Rename defconfig to include SoC name

Rename defconfig to include SoC name, use similar pattern as other
RK356x boards: <soc>-<name>.dts -> <name>-<soc>_defconfig

Suggested-by: Kever Yang <kever.yang@rock-chips.com>
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
15 months agoMerge tag 'tegra-for-2023.10-rc1' of https://source.denx.de/u-boot/custodians/u-boot...
Tom Rini [Fri, 18 Aug 2023 14:05:04 +0000 (10:05 -0400)]
Merge tag 'tegra-for-2023.10-rc1' of https://source.denx.de/u-boot/custodians/u-boot-tegra

ARM: tegra: Changes for v2023.10-rc1

This adds support for various new Tegra30 boards (ASUS, LG and HTC) and
has some other minor enhancements, such as enabling the poweroff command
on several Tegra210 and Tegra186 boards.

15 months agoMerge branch '2023-08-17-assorted-minor-fixes'
Tom Rini [Thu, 17 Aug 2023 19:01:11 +0000 (15:01 -0400)]
Merge branch '2023-08-17-assorted-minor-fixes'

- More MAINTAINERS updates, update CI to use a newer coreboot and make
  arm-ffa a bit less verbose by default.

15 months agoboard: rockchip: rk35xx: Add myself as reviewer to MAINTAINERS
Jonas Karlman [Thu, 17 Aug 2023 06:04:38 +0000 (06:04 +0000)]
board: rockchip: rk35xx: Add myself as reviewer to MAINTAINERS

Add myself as a reviewer for RK3566/RK3568/RK3588 boards that I have and
can help with review and testing of defconfig and device tree changes.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Acked-by: Eugen Hristev <eugen.hristev@collabora.com>
15 months agoboard: rockchip: rk35xx: Add device tree files to MAINTAINERS
Jonas Karlman [Thu, 17 Aug 2023 06:04:36 +0000 (06:04 +0000)]
board: rockchip: rk35xx: Add device tree files to MAINTAINERS

Update MAINTAINERS files for RK3566/RK3568/RK3588 boards to include
related device tree files. Also replace space with tabs.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Acked-by: Eugen Hristev <eugen.hristev@collabora.com>
15 months agodoc: rockchip: Add supported RK3566/RK3568 boards
Jonas Karlman [Thu, 17 Aug 2023 06:04:34 +0000 (06:04 +0000)]
doc: rockchip: Add supported RK3566/RK3568 boards

Update Rockchip documentation to include RK3566/RK3568 boards already
supported. Also list Pine64 boards under RK3566 and drop defconfig to
match other listed boards.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
15 months agoMAINTAINERS: Update UFS maintainer
Neha Malcom Francis [Thu, 17 Aug 2023 12:09:14 +0000 (17:39 +0530)]
MAINTAINERS: Update UFS maintainer

Dropping Faiz Abbas from the UFS maintainer list as his e-mail ID is no
longer valid.

Adding Bhupesh Sharma who has been using this framework working on
Qualcomm Snapdragon SoCs as well as sending out fixes.

Adding myself as well to support in reviewing and testing patches.

Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
Reviewed-by: Nishanth Menon <nm@ti.com>
Acked-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
15 months agoCI: x86: coreboot: Update to latest coreboot
Simon Glass [Fri, 11 Aug 2023 18:17:43 +0000 (12:17 -0600)]
CI: x86: coreboot: Update to latest coreboot

Use a recent coreboot build for this test.

The coreboot commit is:

   6f5ead14b4 mb/google/nissa/var/joxer: Update eMMC DLL settings

This is build with default settings, i.e. QEMU x86 i440fx/piix4

Add some documentation as to how to update it next time.

Signed-off-by: Simon Glass <sjg@chromium.org>
15 months agocorstone1000: update maintainers
Abdellatif El Khlifi [Fri, 11 Aug 2023 12:22:57 +0000 (13:22 +0100)]
corstone1000: update maintainers

Update MAINTAINERS of corstone1000 board.

Signed-off-by: Xueliang Zhong <xueliang.zhong@arm.com>
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
15 months agoarm_ffa: use debug logs
Abdellatif El Khlifi [Wed, 9 Aug 2023 11:47:30 +0000 (12:47 +0100)]
arm_ffa: use debug logs

replace info logs with debug logs

Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Cc: Tom Rini <trini@konsulko.com>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
15 months agoarm: Add arch/arm/dts/Makefile specifically to MAINTAINERS
Tom Rini [Mon, 7 Aug 2023 21:08:11 +0000 (17:08 -0400)]
arm: Add arch/arm/dts/Makefile specifically to MAINTAINERS

In order to reduce the number of people that are cc'd on a patch for
simply touching arch/arm/dts/Makefile (which is a big common file) add
an entry specifically to MAINTAINERS under the ARM entry.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
15 months agoMerge tag 'u-boot-stm32-20230816' of https://source.denx.de/u-boot/custodians/u-boot-stm
Tom Rini [Wed, 16 Aug 2023 15:23:58 +0000 (11:23 -0400)]
Merge tag 'u-boot-stm32-20230816' of https://source.denx.de/u-boot/custodians/u-boot-stm

DHSOM: Power cycle Buck3 in reset
DHCOM: Switch DWMAC RMII clock to MCO2
stm32f746: fix display pinmux
stm32mp: psci: Inhibit PDDS because CSTBYDIS is set
stm32mp1: DT alignment with v6.4
stm32mp1: add splashscreen with STMicroelectronics logo
stm32mp1: clk: remove error for disabled clock in stm32mp1_clk_get_parent
serial: stm32: Extend TC timeout

15 months agoserial: stm32: extend TC timeout
Valentin Caron [Fri, 4 Aug 2023 14:09:04 +0000 (16:09 +0200)]
serial: stm32: extend TC timeout

Waiting 150us TC bit couldn't be enough.

If TFA lets 16 bits in USART fifo, we has to wait 16 times 87 us (time
of 10 bits (1 byte in most use cases) at a baud rate of 115200).

Fixes: b4dbc5d65a67 ("serial: stm32: Wait TC bit before performing initialization")

Signed-off-by: Valentin Caron <valentin.caron@foss.st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
15 months agoARM: dts: stm32: Switch DWMAC RMII clock to MCO2 on DHCOM
Marek Vasut [Wed, 26 Jul 2023 23:58:07 +0000 (01:58 +0200)]
ARM: dts: stm32: Switch DWMAC RMII clock to MCO2 on DHCOM

The DHCOM SoM has two options for supplying ETHRX clock to the DWMAC
block and PHY. Either (1) ETHCK_K generates 50 MHz clock on ETH_CLK
pad for the PHY and the same 50 MHz clock are fed back to ETHRX via
internal eth_clk_fb clock connection OR (2) ETH_CLK is not used at
all, MCO2 generates 50 MHz clock on MCO2 output pad for the PHY and
the same MCO2 clock are fed back into ETHRX via ETH_RX_CLK input pad
using external pad-to-pad connection.

Option (1) has two downsides. ETHCK_K is supplied directly from either
PLL3_Q or PLL4_P, hence the PLL output is limited to exactly 50 MHz and
since the same PLL output is also used to supply SDMMC blocks, the
performance of SD and eMMC access is affected. The second downside is
that using this option, the EMI of the SoM is higher.

Option (2) solves both of those problems, so implement it here. In this
case, the PLL4_P is no longer limited and can be operated faster, at
100 MHz, which improves SDMMC performance (read performance is improved
from ~41 MiB/s to ~57 MiB/s with dd if=/dev/mmcblk1 of=/dev/null bs=64M
count=1). The EMI interference also decreases.

Ported from Linux kernel commit
73ab99aad50cd ("ARM: dts: stm32: Switch DWMAC RMII clock to MCO2 on DHCOM")

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
15 months agoboard: stm32mp1: add splash screen with stmicroelectronics logo
Patrick Delaunay [Mon, 10 Jul 2023 11:30:59 +0000 (13:30 +0200)]
board: stm32mp1: add splash screen with stmicroelectronics logo

Display the STMicroelectronics logo with features VIDEO_LOGO and
SPLASH_SCREEN on STMicroelectronics boards.

With CONFIG_SYS_VENDOR = "st", the logo st.bmp is selected, loaded at the
address indicated by splashimage and centered with "splashpos=m,m".

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
15 months agoARM: dts: stm32mp: alignment with v6.4
Patrick Delaunay [Mon, 10 Jul 2023 08:38:45 +0000 (10:38 +0200)]
ARM: dts: stm32mp: alignment with v6.4

Device tree alignment with Linux kernel v6.4.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
15 months agoARM: stm32: Inhibit PDDS because CSTBYDIS is set
Marek Vasut [Thu, 6 Jul 2023 21:32:27 +0000 (23:32 +0200)]
ARM: stm32: Inhibit PDDS because CSTBYDIS is set

The PWR_MPUCR CSTBYDIS bit is set, therefore the CA cores can never
enter CStandby state and would always end up in CStop state. Clear
the PDDS bit, which indicates the CA cores can enter CStandby state
as it makes little sense to keep it set with CSTBYDIS also set.

This does however fix a problem too. When both PWR_MPUCR and PWR_MCUCR
PDDS bits are set, then the chip enters CStandby state even though the
PWR_MCUCR CSTBYDIS is set. Clearing the PWR_MPUCR PDDS prevents that
from happening.

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
15 months agoARM: dts: stm32: fix display pinmux for stm32f746-disco
Dario Binacchi [Mon, 3 Jul 2023 16:02:33 +0000 (18:02 +0200)]
ARM: dts: stm32: fix display pinmux for stm32f746-disco

As reported by the datasheet (DocID027590 Rev 4) for PG12:
- AF9  -> LCD_B4
- AF14 -> LCD_B1

So replace AF14 with AF9 for PG12 in the dts.

Fixes: fe63d3cfb77ef ("ARM: dts: stm32: Sync DT with v4.20 kernel for stm32f7")
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
15 months agoclk: stm32mp1: remove error for disabled clock in stm32mp1_clk_get_parent
Patrick Delaunay [Fri, 23 Jun 2023 13:05:16 +0000 (15:05 +0200)]
clk: stm32mp1: remove error for disabled clock in stm32mp1_clk_get_parent

To disabled a clock in clock tree initialization for a mux of STM32MP15,
the selected clock source index is set with the latest possible index for
the number of bit used. Today this valid configuration cause a error
in U-Boot messages, for example with CLK_ETH_DISABLED, when this clock
is not needed for the used ETH PHY without crystal:

   no parents defined for clk id 123

This patch change the level of this message to avoid this trace for
valid clock tree.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
15 months agoARM: stm32: Power cycle Buck3 in reset on DHSOM
Marek Vasut [Wed, 17 May 2023 22:02:39 +0000 (00:02 +0200)]
ARM: stm32: Power cycle Buck3 in reset on DHSOM

In case the DHSOM is in suspend state and either reset button is pushed
or IWDG2 triggers a watchdog reset, then DRAM initialization could fail
as follows:

  "
  RAM: DDR3L 32bits 2x4Gb 533MHz
  DDR invalid size : 0x4, expected 0x40000000
  DRAM init failed: -22
  ### ERROR ### Please RESET the board ###
  "

Avoid this failure by not keeping any Buck regulators enabled during reset,
let the SoC and DRAMs power cycle fully. Since the change which keeps Buck3
VDD enabled during reset is ST specific, move this addition to ST specific
SPL board initialization so that it wouldn't affect the DHSOM .

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
15 months agoMerge tag 'efi-2023-10-rc3' of https://source.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Tue, 15 Aug 2023 17:08:17 +0000 (13:08 -0400)]
Merge tag 'efi-2023-10-rc3' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request for efi-2023-10-rc3

Documentation:

* Correct description of board_get_usable_ram_top
* Add partition API to HTML documentation
* Describe  lmb_is_reserved
* doc/sphinx/requirements.txt: Bump certifi up

UEFI:

* Fix  efi_add_known_memory
* Make distro_efi_boot() static

Other:

* Correct return type board_get_usable_ram_top

15 months agocommon: return type board_get_usable_ram_top
Heinrich Schuchardt [Sat, 12 Aug 2023 18:16:58 +0000 (20:16 +0200)]
common: return type board_get_usable_ram_top

board_get_usable_ram_top() returns a physical address that is stored in
gd->ram_top. The return type of the function should be phys_addr_t like the
current type of gd->ram_top.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
15 months agoefi_loader: fix efi_add_known_memory()
Heinrich Schuchardt [Mon, 14 Aug 2023 05:50:53 +0000 (07:50 +0200)]
efi_loader: fix efi_add_known_memory()

In efi_add_known_memory() we currently call board_get_usable_ram_top() with
an incorrect value 0 of parameter total_size. This leads to an incorrect
value for ram_top depending on the code in board_get_usable_ram_top().

Use the value of gd->ram_top instead which is set before relocation by
calling board_get_usable_ram_top().

Fixes: 7b78d6438a2b ("efi_loader: Reserve unaccessible memory")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
15 months agobootmeth: efi: Make distro_efi_boot() static
Bin Meng [Thu, 3 Aug 2023 09:30:05 +0000 (17:30 +0800)]
bootmeth: efi: Make distro_efi_boot() static

As it is only called in bootmeth_efi.c

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
15 months agodoc: add partition API to HTML documentation
Heinrich Schuchardt [Tue, 15 Aug 2023 10:30:19 +0000 (12:30 +0200)]
doc: add partition API to HTML documentation

* Convert comments in part.h to Sphinx style.
* Create documentation page for the partition API.
* Add the partition API page to the API index page.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
15 months agodoc: description of board_get_usable_ram_top()
Heinrich Schuchardt [Mon, 14 Aug 2023 06:44:26 +0000 (08:44 +0200)]
doc: description of board_get_usable_ram_top()

Improve the description of function board_get_usable_ram_top().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
15 months agolmb: description lmb_is_reserved, lmb_is_reserved_flags
Heinrich Schuchardt [Sat, 12 Aug 2023 17:09:32 +0000 (19:09 +0200)]
lmb: description lmb_is_reserved, lmb_is_reserved_flags

* provide a description for function lmb_is_reserved()
* improve the description of funciton lmb_is_reserved_flags()

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
15 months agodoc/sphinx/requirements.txt: Bump certifi up
Tom Rini [Tue, 1 Aug 2023 18:53:30 +0000 (14:53 -0400)]
doc/sphinx/requirements.txt: Bump certifi up

Upgrade certifi to the latest version, to remove e-Tugra from the root
store.

Link: https://groups.google.com/a/mozilla.org/g/dev-security-policy/c/C-HrP1SEq1A?pli=1
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
15 months agoMerge tag 'ubi-updates-for-v2023.10-rc3' of https://source.denx.de/u-boot/custodians...
Tom Rini [Tue, 15 Aug 2023 14:44:32 +0000 (10:44 -0400)]
Merge tag 'ubi-updates-for-v2023.10-rc3' of https://source.denx.de/u-boot/custodians/u-boot-ubi

ubi changes for v2023.10-rc3

Fix:
- Fix 'ubi list' command arguments parsing
  from Dmitry

15 months agoMerge tag 'i2c-updates-for-v2023.10-rc3' of https://source.denx.de/u-boot/custodians...
Tom Rini [Tue, 15 Aug 2023 14:44:20 +0000 (10:44 -0400)]
Merge tag 'i2c-updates-for-v2023.10-rc3' of https://source.denx.de/u-boot/custodians/u-boot-i2c

i2c updates for v2023.10-rc3

Bugfixes:
- mvtwsi driver fix stuck "bus error" state
  from Sam

15 months agocmd: ubi: Fix 'ubi list' command arguments parsing
Dmitry Dunaev [Wed, 12 Jul 2023 12:58:21 +0000 (15:58 +0300)]
cmd: ubi: Fix 'ubi list' command arguments parsing

This fixes allowed argc variable value for arguments parsing

Fixes: 6de1daf64b1 ("cmd: ubi: Add 'ubi list' command")
Signed-off-by: Dmitry Dunaev <dunaev@tecon.ru>
15 months agoi2c: mvtwsi: reset controller if stuck in "bus error" state
Sam Edwards [Tue, 25 Jul 2023 22:13:05 +0000 (16:13 -0600)]
i2c: mvtwsi: reset controller if stuck in "bus error" state

The MVTWSI controller can act either as a master or slave device. When
acting as a master, the FSM is driven by the CPU. As a slave, the FSM is
driven by the bus directly. In what is (apparently) a safety mechanism,
if the bus transitions our FSM in any improper way, the FSM goes to a
"bus error" state (0x00). I could find no documented or experimental way
to get the FSM out of this state, except for a controller reset.

Since U-Boot only uses the MVTWSI controller as a bus master, this
feature only gets in the way: we do not care what happened on the bus
previously as long as the bus is ready for a new transaction. So, when
trying to start a new transaction, check for this state and reset the
controller if necessary.

Note that this should not be confused with the "deblocking" technique
(used by the `i2c reset` command), which involves pulsing SCL repeatedly
if SDA is found to be held low, in an attempt to force the bus back to
an idle state. This patch only resets the controller in case something
else had previously upset it, and (in principle) results in no
externally-observable change in behavior.

Signed-off-by: Sam Edwards <CFSworks@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Heiko Schocher <hs@denx.de>
15 months agoMerge tag 'u-boot-rockchip-20230814' of https://source.denx.de/u-boot/custodians...
Tom Rini [Mon, 14 Aug 2023 13:11:09 +0000 (09:11 -0400)]
Merge tag 'u-boot-rockchip-20230814' of https://source.denx.de/u-boot/custodians/u-boot-rockchip

- Add board: rk3568 EmbedFire Lubancat 2
- Fixes for rk3568 clock and pinctrl;
- Fixes for rk3308 clock and uart;
- rk3328 rock64 updates;
- Video fix on veyron board;

15 months agoMerge tag 'video-20230814' of https://source.denx.de/u-boot/custodians/u-boot-video
Tom Rini [Mon, 14 Aug 2023 13:09:23 +0000 (09:09 -0400)]
Merge tag 'video-20230814' of https://source.denx.de/u-boot/custodians/u-boot-video

 - fix NULL dereference in vidconsole_measure()
 - fix simplefb format for raspberrypi-4b
 - fix typo in Kconfig

15 months agopinctrl: rockchip: Fix drive and input schmitt on RK3568
Jonas Karlman [Mon, 14 Aug 2023 00:28:26 +0000 (00:28 +0000)]
pinctrl: rockchip: Fix drive and input schmitt on RK3568

On RK3568 most pins have a configurable drive strength of level 0-5 and
some pins level 0-11. When rk3568_set_drive is called with a strength
value above 7 the drv value written to reg may overflow into the write
enable bits, resulting in a bad configuration.

This cause e.g. ethernet PHY on Radxa CM3-IO board not to work after
drive is configured according to the device tree.

  Could not get PHY for ethernet@fe010000: addr 0

Level 6-11 can be configured using a second reg for some pins, however
the drv value is reused resulting in lower 6 bits being written to reg.

Input schmitt is configured in 2-bit fields on RK3568 compared to
earlier generation and 2'b10 should be used to enable input schmitt.

Change to use regmap_update_bits with a rmask to fix the overflow issue
and closer match the linux driver. Bit shift the drv value used for the
second reg to configure drive strength level 6-11. Also write correct
values for input schmitt setting.

Fixes: 1977d746aa54 ("rockchip: rk3568: add rk3568 pinctrl driver")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
15 months agorpi: set the correct parameter for simple framebuffer node
Meng Li [Wed, 26 Jul 2023 02:42:35 +0000 (10:42 +0800)]
rpi: set the correct parameter for simple framebuffer node

When raspberrpi-4b platform  boots up, there are 2 sets of same bootup
log displayed on HDMI monitor screen, it looks like the screen is split
into 2 parts. The root cause is that video format of u-boot is different
from kernel. The fixing "a8r8g8b8" video format is used in u-boot, but
"r5g6b5" video format from framebuffer node is used in kernel image. In
order to avoid weird display status on screen, it needs to set the correct
parameter for simple framebuffer node even if it has existed.

Signed-off-by: Meng Li <Meng.Li@windriver.com>
15 months agobcm2835: Add simiple-framebuffer for use with fkms
Jason Wessel [Wed, 26 Jul 2023 02:42:34 +0000 (10:42 +0800)]
bcm2835: Add simiple-framebuffer for use with fkms

When the fkms dtb overlay is used only the simple-framebuffer is
presented as a usable video display. So, add "simple-framebuffer"
compatible to enable video driver bcm2835.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Meng Li <Meng.Li@windriver.com>
15 months agovideo: kconfig: Fix a typo in SPL_VIDEO_REMOVE
Bin Meng [Thu, 3 Aug 2023 10:40:08 +0000 (18:40 +0800)]
video: kconfig: Fix a typo in SPL_VIDEO_REMOVE

Add one space between 'before' and 'loading'.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
15 months agovideo: vidconsole: Fix null dereference of ops->measure
Bin Meng [Thu, 3 Aug 2023 09:32:41 +0000 (17:32 +0800)]
video: vidconsole: Fix null dereference of ops->measure

At present vidconsole_measure() tests ops->select_font before calling
ops->measure, which would result in a null dereference when the console
driver provides no ops for measure.

Fixes: b828ed7d7929 ("console: Allow measuring the bounding box of text")
Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
15 months agoARM: rmobile: Update little‐endian byte order option in srec_cat command
Hai Pham [Mon, 19 Jun 2023 22:43:18 +0000 (00:43 +0200)]
ARM: rmobile: Update little‐endian byte order option in srec_cat command

Since srecord v1.60, option "-Little_Endian_CONSTant" is deprecated.
Fix the build warnings by updating little‐endian byte order option in
srec_cat command when generating loader header.

Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Hai Pham <hai.pham.ud@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
15 months agoclk: renesas: Tear clock controller down last before booting OS
Marek Vasut [Sat, 25 Apr 2020 12:57:55 +0000 (14:57 +0200)]
clk: renesas: Tear clock controller down last before booting OS

Once all the other drivers got torn down in preparation for the OS
to start, tear down the clock controller last. The clock controller
must be torn down last as some of the clock which get turned off
might have still been needed during the teardown stage of the other
drivers.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Tam Nguyen <tam.nguyen.xa@renesas.com>
Signed-off-by: Hai Pham <hai.pham.ud@renesas.com>
15 months agorockchip: MAINTAINERS: fix board name for Radxa ROCK 4C+
FUKAUMI Naoki [Thu, 3 Aug 2023 08:04:32 +0000 (17:04 +0900)]
rockchip: MAINTAINERS: fix board name for Radxa ROCK 4C+

align with other ROCK series.

Fixes: 2b506407c8 ("rockchip: Add MAINTAINERS entry for Radxa Rock 4C+")
Signed-off-by: FUKAUMI Naoki <naoki@radxa.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
15 months agodts: rockchip: rk3308: Avoid warning for serial probe on prereloc
Massimo Pegorer [Thu, 3 Aug 2023 11:08:13 +0000 (13:08 +0200)]
dts: rockchip: rk3308: Avoid warning for serial probe on prereloc

Make device tree complete and consistent for pre relocation phase. Some
nodes are missing, causing warnings to be issued on serial port probing
during pre relocation phase (uclass_get_device_by_phandle_id fails when
called by pinctrl_select_state_full: none of these failures is fatal
nor causing issues). Add to *-u-boot.dtsi all required nodes with the
'bootph-some-ram' attribute.

Signed-off-by: Massimo Pegorer <massimo.pegorer+oss@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
15 months agoclk: rockchip: rk3308: Support reading UART rate and clock registers
Massimo Pegorer [Thu, 3 Aug 2023 11:08:12 +0000 (13:08 +0200)]
clk: rockchip: rk3308: Support reading UART rate and clock registers

Add support to read RK3308 registers used to configure UART clocks, and
thus to get UART rate and baudrate. This fixes clock_get_rate returning
error on serial device probing. Moreover, there is no need anymore to
use 'clock-frequency' property for UART nodes in *-u-boot.dtsi files
for all cases where UART is not inited by U-Boot proper or by SPL o by
TPL code but by a preliminary external boot phase (for Rock PI S, UART
is inited by external TPL).

Signed-off-by: Massimo Pegorer <massimo.pegorer+oss@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
15 months agoclk: rockchip: rk3308: Fix ordering between masking and shifting
Massimo Pegorer [Thu, 3 Aug 2023 11:08:11 +0000 (13:08 +0200)]
clk: rockchip: rk3308: Fix ordering between masking and shifting

As per definitions of masks and shift offsets in cru_rk3308.h, values
read from registers must be first masked and then shifted. By the way,
this fix is binary invariant, because in all of fixed cases the shift
offset is zero.

Signed-off-by: Massimo Pegorer <massimo.pegorer+oss@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
15 months agorockchip: spl: Drop out of scope debug message related to uart init
Massimo Pegorer [Wed, 2 Aug 2023 17:05:24 +0000 (19:05 +0200)]
rockchip: spl: Drop out of scope debug message related to uart init

Debug uart is no more inited in board_init_f function: remove this
debug message from board_init_f. If an earliest-as-possible message
after debug uart initialization is needed, enable DEBUG_UART_ANNOUNCE
Kconfig option, instead.

Signed-off-by: Massimo Pegorer <massimo.pegorer+oss@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
15 months agorockchip: spl: Drop useless call to debug_uart_init
Massimo Pegorer [Wed, 2 Aug 2023 17:05:23 +0000 (19:05 +0200)]
rockchip: spl: Drop useless call to debug_uart_init

Since commit 0dba45864b2a ("arm: Init the debug UART") function
debug_uart_init is called in crt files _main before calling
board_init_f. Therefore, there is no need to call it again
inside board_init_f implementation in arm/mach-rockchip/spl.c.

Signed-off-by: Massimo Pegorer <massimo.pegorer+oss@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
15 months agorockchip: rk356x-u-boot: Set max-frequency prop in sdhci node
Jonas Karlman [Fri, 4 Aug 2023 09:34:01 +0000 (09:34 +0000)]
rockchip: rk356x-u-boot: Set max-frequency prop in sdhci node

Most board device trees for RK356x set max-frequency = <200000000> in
the sdhci node, some boards like Quartz64 do not. This result in an
error message due to sdhci driver trying to set a clock rate of 0
instead of the max-frequency value.

  rockchip_sdhci_probe clk set rate fail!

Fix this by setting a common max-frequency in rk356x-u-boot.dtsi. A
patch to set default max-frequency of sdhci node in linux is planned.

Also remove the forced status = "okay" for the sdhci and sdmmc0 nodes,
boards already set correct state for these nodes.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
15 months agoclk: rockchip: rk3568: Add dummy support for GMAC speed clocks
Jonas Karlman [Fri, 4 Aug 2023 09:34:00 +0000 (09:34 +0000)]
clk: rockchip: rk3568: Add dummy support for GMAC speed clocks

Pine64 Quartz64 boards DT reference SCLK_GMAC1_RGMII_SPEED in the
assigned-clocks property of the gmac1 node. This result in a ENOENT
error when driver core tries to set a parent for this clock.

The clock speed in rgmii/rmii mode is changed using clk_set_rate of the
tx_rx clock and not using clk_set_parent of the speed clock.

Add dummy support for SCLK_GMAC1_RGMII_SPEED and similar clocks to clk
driver to allow a driver for gmac node to probe.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
15 months agoclk: rockchip: rk3568: Include UART clocks in SPL
Jonas Karlman [Fri, 4 Aug 2023 09:33:59 +0000 (09:33 +0000)]
clk: rockchip: rk3568: Include UART clocks in SPL

The clock driver for RK3568 does not include support for UART clocks in
SPL. This result in the following message with high enough loglevel.

  ns16550_serial serial@fe660000: pinctrl_select_state_full: uclass_get_device_by_phandle_id: err=-19

Fix this by including support for UART clocks in SPL.

Fixes: 4a262feba3a5 ("rockchip: rk3568: add clock driver")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Eugen Hristev <eugen.hristev@collabora.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
15 months agoclk: rockchip: rk3568: Fix mask for clk_cpll_div_25m_div
Jonas Karlman [Fri, 4 Aug 2023 09:33:59 +0000 (09:33 +0000)]
clk: rockchip: rk3568: Fix mask for clk_cpll_div_25m_div

The field for clk_cpll_div_25m_div in CRU_CLKSEL_CON81 is 6 bits wide,
not 5 bits wide as currently defined in CPLL_25M_DIV_MASK.

Fix this and the assert so that CPLL_25M can be assigned a 25 MHz rate.

Fixes: 4a262feba3a5 ("rockchip: rk3568: add clock driver")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
15 months agoclk: rockchip: rk3568: Fix clk selection in rk3568_pwm_get_clk
Damon Ding [Fri, 4 Aug 2023 09:33:57 +0000 (09:33 +0000)]
clk: rockchip: rk3568: Fix clk selection in rk3568_pwm_get_clk

Fix use of wrong clk selection for CLK_PWM1 on RK3568.

Fixes: 4a262feba3a5 ("rockchip: rk3568: add clock driver")
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
15 months agorockchip: cru: Enable cpu info support for rk3568
Anton [Mon, 7 Aug 2023 07:04:46 +0000 (10:04 +0300)]
rockchip: cru: Enable cpu info support for rk3568

Add cru structure definition in head file to support cpu_info driver.

Series-version: 2
Series-changes: 2
Format the patch header, add commit message and signature.

Signed-off-by: Anton <vao@asu-vei.ru>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
15 months agovideo: avoid build failure on veyron board
Alvaro Fernando García [Fri, 4 Aug 2023 00:35:38 +0000 (21:35 -0300)]
video: avoid build failure on veyron board

533ad9dc avoided an overflow but causes compilation
failure on 32bit boards (eg. veyron speedy)

this commit uses div_u64 which has a fallback codepath
for 32bit platforms

Signed-off-by: Alvaro Fernando García <alvarofernandogarcia@gmail.com>
Tested-by: Simon Glass <sjg@chromium.org> # chromebook_jerry
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
15 months agorockchip: rk3568: Add EmbedFire Lubancat 2 support
Andy Yan [Sat, 5 Aug 2023 12:00:11 +0000 (20:00 +0800)]
rockchip: rk3568: Add EmbedFire Lubancat 2 support

LubanCat2 is a rk3568 based SBC from EmbedFire.

Specification:
- Rockchip rk3568
- LPDDR4/4X 1/2/4/8 GB
- TF scard slot
- eMMC 8/32/64/128 GB
- Gigabit ethernet x 2
- HDMI out
- USB 2.0 Host x 1
- USB 2.0 Type-C OTG x 1
- USB 3.0 Host x 1
- Mini PCIE interface for WIFI/BT module
- M.2 key for 2280 NVME
- 40 pin header

The dts file is sync from linux mainline.

Signed-off-by: Andy Yan <andyshrk@163.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
15 months agorockchip: rv1126: Enable fdtoverlay support
Jagan Teki [Sat, 29 Jul 2023 13:41:42 +0000 (19:11 +0530)]
rockchip: rv1126: Enable fdtoverlay support

Add fdtoverlay_addr_r and enable OF_LIBFDT_OVERLAY for the
use of DT overlay in RV1126.

Signed-off-by: Jagan Teki <jagan@edgeble.ai>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
15 months agorockchip: dts: rk3328: rock64: Align spi flash entry
Peter Robinson [Wed, 14 Jun 2023 12:43:14 +0000 (13:43 +0100)]
rockchip: dts: rk3328: rock64: Align spi flash entry

Align the SPI flash entry with upstream. There's no need
to diverge here.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
15 months agorockchip: dts: rk3328: Add rng details to u-boot.dtsi
Peter Robinson [Wed, 14 Jun 2023 12:43:13 +0000 (13:43 +0100)]
rockchip: dts: rk3328: Add rng details to u-boot.dtsi

Add the rk3328 rng details to the u-boot.dtsi and
enable the RNG on the Rock64 to be able to provide
a random seed via UEFI.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
(Fix typo message)
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
15 months agoconfig: rock64: enable efuse for stable mac addr
Peter Robinson [Wed, 14 Jun 2023 12:43:12 +0000 (13:43 +0100)]
config: rock64: enable efuse for stable mac addr

Enable the rockchip efuse driver on the Rock64 to
provide a stable ethernet address on the device.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
15 months agopci: rockchip: Release resources on failing probe
Jonas Karlman [Tue, 11 Jul 2023 23:13:56 +0000 (23:13 +0000)]
pci: rockchip: Release resources on failing probe

The PCIe driver for RK3399 is affected by a similar issue that was fixed
for RK35xx in the commit e04b67a7f4c1 ("pci: pcie_dw_rockchip: release
resources on failing probe").

Resources are not released on failing probe, e.g. regulators may be left
enabled and the ep-gpio may be left in a requested state.

Change to use regulator_set_enable_if_allowed and disable regulators
after failure to keep regulator enable count balanced, ep-gpio is also
released on regulator failure.

Also add support for the vpcie12v-supply, remove unused include and
check return value from dev_read_addr_name.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
15 months agorockchip: rk3399: remove duplicate call to regulators_enable_boot_on
Quentin Schulz [Fri, 22 Jul 2022 10:09:08 +0000 (12:09 +0200)]
rockchip: rk3399: remove duplicate call to regulators_enable_boot_on

An earlier commit makes the common SPL code call
regulators_enable_boot_on and regulators_enable_boot_off before
iterating over possible boot media for U-Boot proper. There is therefore
no need to do this in the rk3399-specific code, so let's remove it.

Cc: Quentin Schulz <foss+uboot@0leil.net>
Tested-by: Xavier Drudis Ferran <xdrudis@tinet.cat>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
15 months agoMerge https://source.denx.de/u-boot/custodians/u-boot-watchdog
Tom Rini [Thu, 10 Aug 2023 15:40:09 +0000 (11:40 -0400)]
Merge https://source.denx.de/u-boot/custodians/u-boot-watchdog

- cmd: cyclic: Remove duplicate command name in help text (Alexander)
- ftwdt010: need to reset watchdog in ftwdt010_wdt_start() (Sergei)

15 months agoMerge https://source.denx.de/u-boot/custodians/u-boot-riscv
Tom Rini [Thu, 10 Aug 2023 14:36:43 +0000 (10:36 -0400)]
Merge https://source.denx.de/u-boot/custodians/u-boot-riscv

+ Add USB host support on VisionFive2 board
+ Enable SPI flash support on VisionFive2 board
+ Enable Random Number Generator in RISC-V QEMU board
+ Display new SBI extension
+ Add SPL_ZERO_MEM_BEFORE_USE Kconfig for jh7110 L2 LIM
  (Loosely-Integrated Memory)

15 months agowatchdog: ftwdt010: need to reset watchdog in ftwdt010_wdt_start()
Sergei Antonov [Sun, 30 Jul 2023 17:14:16 +0000 (20:14 +0300)]
watchdog: ftwdt010: need to reset watchdog in ftwdt010_wdt_start()

ftwdt010_wdt_start() has to call ftwdt010_wdt_reset() after setting-up
the timeout in the same fashion ftwdt010_wdt_expire_now() does it.

Without this patch the "wdt start <ms>" command does not actually start
the watchdog timer until the "wdt reset" command is executed.

Signed-off-by: Sergei Antonov <saproj@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
15 months agocmd: cyclic: Remove duplicate command name in help text
Alexander Dahl [Fri, 4 Aug 2023 15:53:23 +0000 (17:53 +0200)]
cmd: cyclic: Remove duplicate command name in help text

Function 'cmd_usage()' already prints one command in usage before
printing out the help text given to the U_BOOT_CMD_WITH_SUBCMDS macro.

Wrong previous output:

    Usage:
    cyclic cyclic demo <cycletime_ms> <delay_us> - register cyclic demo function
    cyclic list - list cyclic functions

Signed-off-by: Alexander Dahl <ada@thorsis.com>
Reviewed-by: Stefan Roese <sr@denx.de>
15 months agoriscv: cpu: jh7110: Select SPL_ZERO_MEM_BEFORE_USE
Shengyu Qu [Wed, 9 Aug 2023 13:11:33 +0000 (21:11 +0800)]
riscv: cpu: jh7110: Select SPL_ZERO_MEM_BEFORE_USE

Add Kconfig item for Starfive JH7110 to select SPL_ZERO_MEM_BEFORE_USE.

Signed-off-by: Bo Gan <ganboing@gmail.com>
Signed-off-by: Shengyu Qu <wiagn233@outlook.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
15 months agoriscv: Add SPL_ZERO_MEM_BEFORE_USE implementation
Shengyu Qu [Wed, 9 Aug 2023 13:11:32 +0000 (21:11 +0800)]
riscv: Add SPL_ZERO_MEM_BEFORE_USE implementation

Add the actual support code for SPL_ZERO_MEM_BEFORE_USE and remove
existing Starfive JH7110's L2 LIM clean code, since existing code has
following issues:
 1. Each hart (in the middle of a function call) overwriting its own
    stack and other harts' stacks.
    (data-race and data-corruption)
 2. Lottery winner hart can be doing "board_init_f_init_reserve",
    while other harts are in the middle of zeroing L2 LIM.
    (data-race)

Signed-off-by: Bo Gan <ganboing@gmail.com>
Signed-off-by: Shengyu Qu <wiagn233@outlook.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
15 months agoriscv: Kconfig: Add SPL_ZERO_MEM_BEFORE_USE
Shengyu Qu [Wed, 9 Aug 2023 13:11:31 +0000 (21:11 +0800)]
riscv: Kconfig: Add SPL_ZERO_MEM_BEFORE_USE

Add a Kconfig item to allow SPL to clear stack/GD/malloc area before
using them.

Signed-off-by: Bo Gan <ganboing@gmail.com>
Signed-off-by: Shengyu Qu <wiagn233@outlook.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
15 months agoconfigs: starfive: Enable environment in SPI flash support
Shengyu Qu [Tue, 8 Aug 2023 13:14:36 +0000 (21:14 +0800)]
configs: starfive: Enable environment in SPI flash support

On Starfive Visionfive 2, the u-boot environment settings are saved to
on-board SPI flash. Enable relative configs by default and set offset
and size according to upstream linux dts.

Signed-off-by: Shengyu Qu <wiagn233@outlook.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
15 months agoconfigs: riscv: starfive: Add VF2 PCIe USB3 XHCI support
Minda Chen [Mon, 7 Aug 2023 08:53:38 +0000 (16:53 +0800)]
configs: riscv: starfive: Add VF2 PCIe USB3 XHCI support

Add XHCI_PCI to enable usb3-host functions.
Also add usb command and keyboard config.

Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
15 months agoriscv: starfive: Add SYS_CACHE_SHIFT_6 to enable SYS_CACHELINE_SIZE
Minda Chen [Mon, 7 Aug 2023 08:53:37 +0000 (16:53 +0800)]
riscv: starfive: Add SYS_CACHE_SHIFT_6 to enable SYS_CACHELINE_SIZE

Some device driver need SYS_CACHELINE_SIZE macro. Add StarFive
SYS_CACHE_SHIFT_6 to enable it.

Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
Reviewed-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
15 months agoriscv: dts: starfive: Enable pcie0 dts node
Minda Chen [Mon, 7 Aug 2023 08:53:36 +0000 (16:53 +0800)]
riscv: dts: starfive: Enable pcie0 dts node

In StarFive VF2 board. pcie0 connect to VTI usb controller.
Enable it to support usb host.

Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>