Commit graph

91306 commits

Author SHA1 Message Date
Dan Carpenter
e5e7d8bbcf blk: host_dev: Fix error code in host_sb_attach_file()
This error path should return -EINVAL instead of success.

Fixes: e261fbf347 ("blk: host_dev: Sanity check on the size of host backing file")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
2024-02-06 16:31:07 -05:00
Dhruva Gole
c59720c5f4 firmware: ti_sci: Add comment explaining the is_secure code
Add a comment to explain the code under is_secure condition of
ti_sci_do_xfer. This will help avoid confusion amongst people who may in
future touch upon this code.

Reviewed-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Dhruva Gole <d-gole@ti.com>
2024-02-06 16:31:06 -05:00
Dhruva Gole
0c4e36d65f firmware: ti_sci: fix the secure_hdr in do_xfer
The ti_sci driver in U-Boot has support for secure_msg as part of it's
do_xfer function. This let's U-boot send secure messages during boot up.

The protocol to send such secure messages is described as part of the
struct ti_sci_secure_msg_hdr. As part of this, there are 2 fields for
checksum and reserved that occupy the first 4 bytes of any secure
message. This is called as the secure_hdr.

As of now, the secure_hdr needs to be 0 init-ed before sending secure
messages. However the existing code was never putting the zero-inited vars
into the secure_buf, leading to possibility of the first 4 bytes of
secure_buf being possibly garbage.

Fix this by initialising the secure_hdr itself to the secure_buf
location, thus when we make secure_hdr members 0, it automatically ensures
the first 4 bytes of secure_buf are 0.

Fixes: 32cd25128b ("firmware: Add basic support for TI System Control Interface (TI SCI)")
Reviewed-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Dhruva Gole <d-gole@ti.com>
2024-02-06 16:31:06 -05:00
Neha Malcom Francis
94cfc6fc96 arm: mach-k3: j721s2_init: Support less than max DDR controllers
The number of DDR controllers to be initialised and used should depend
on the device tree with the constraint of the maximum number of
controllers the device supports. Since J721S2 has multiple (2)
controllers, instead of hardcoding the number of probes, move to
depending on the device tree UCLASS_RAM nodes present.

Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
Reviewed-by: Manorit Chawdhry <m-chawdhry@ti.com>
2024-02-06 16:31:06 -05:00
MD Danish Anwar
4312a1dfca dma: ti: k3-udma: Use ring_idx to pair k3 nav rings
Use ring_idx to pair rings. ring_idx will be same as tx flow_id for all
non-negative flow_ids. For negative flow_ids, ring_idx will be tchan->id
added with bchan_cnt.

Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/dma/ti/k3-udma.c?h=v6.8-rc2#n1686
Signed-off-by: MD Danish Anwar <danishanwar@ti.com>
Reviewed-by: Ravi Gunasekaran <r-gunasekaran@ti.com>
2024-02-06 16:31:06 -05:00
Ole P. Orhagen
798ad3e6b2 vexpress_ca9x4: Enable DM_SERIAL
This commit enables support for DM_SERIAL in the vexpress_ca9x4 boards.

When running the board with the DM_SERIAL driver, the board ran out of
memory in SPL when initialising the DM serial driver.

Thus this required an increase in the pre-allocated SRAM memory. I did
increase it to 0x800, and it now works graciously.

It could probably be set lower, but I do not see any reason not to use the
available SRAM at this point.

Also adds stdout-path to the 'chosen' node in the device tree.

Signed-off-by: Ole P. Orhagen <ole.orhagen@northern.tech>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
2024-02-06 16:31:06 -05:00
Heinrich Schuchardt
0c5110ccf8 common: event: check event_type_name() argument
In event_type_name() we should avoid possible buffer overruns by checking
the type argument.

Addresses-Coverity-ID: 478862 Out-of-bounds access
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-02-06 16:31:06 -05:00
Jim Liu
dd0807804e arm: dts: nuvoton: modify npcm8xx reset property
Change reset method from generic to reset driver

Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
2024-02-06 16:31:06 -05:00
Brandon Maier
cb6f4d6510 scripts/gen_compile_commands: update to Linux v6.7
Adds support for assembly files and updates the LINE_PATTERN so it
supports both "cmd" and "savedcmd", which allows reverting the U-Boot
modification in commit 97fbb2eb01 ("scripts/gen_compile_commands.py:
adapt _LINE_PATTERN").

Upstream commits:

- 880946158b011 gen_compile_commands.py: fix path resolve with symlinks in it
- 9e56d3be4bfd2 gen_compile_commands: Sort output compile commands by file name
- 52c15e7e79285 gen_compile_commands: Allow the line prefix to still be cmd_
- 1c67921444bf6 gen_compile_commands: add assembly files to compilation database

Signed-off-by: Brandon Maier <brandon.maier@collins.com>
Cc: Joao Marcos Costa <jmcosta944@gmail.com>
2024-02-06 16:31:06 -05:00
Tom Rini
daa3100250 Merge patch series "board: siemens: clean up subfolders"
Enrico Leto <enrico.leto@siemens.com> says:

    The common folder was initialially created for the common parts of
    the products based on draco-am355x board family. We have the
    product lines 'pxm2', 'rut' and the base line unfortunately named
    'draco'! Adding the new capricorn-imx8 board family, the files
    were enhanced without cleanup.

    Simplify first EEPROM probe and access that implements both i2c
    with & without driver model. Use abstraction functions for this.

    Move all am355x specifics to a new file 'board_am335x'.

    Clean-up includes, config checks, maintainer.
2024-02-05 13:33:01 -05:00
Enrico Leto
b062eef075 siemens: factoryset: use correct config for soc specific implementation
Adding the capricorn board family some parts diverge from draco family.
The switches used were not pertinent and need to be enhanced for each new
board of the capricorn family. Replace them through the SOC name 'AM33XX'
and 'IMX8'.

Signed-off-by: Enrico Leto <enrico.leto@siemens.com>
2024-02-05 13:32:48 -05:00
Enrico Leto
60ad0fdb19 siemens: board: clean up includes
Many includes were not removed when code parts were moved or removed.

Signed-off-by: Enrico Leto <enrico.leto@siemens.com>
2024-02-05 13:32:48 -05:00
Enrico Leto
d89a97ef94 siemens: board: clean up products folders vs common
The common folder was initialially created for the common parts of the
products based on draco-am355x board family. These are the product lines
'pxm2', 'rut' and the base line named 'draco'!

Adding the new capricorn-imx8 board family, common was enhanced without
cleanup.
- rename 'common/board.c' to 'common/board_am335x.c'
- add 'common/board_am335x.h' for export to the product lines

Reviewed-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
Signed-off-by: Enrico Leto <enrico.leto@siemens.com>
2024-02-05 13:32:48 -05:00
Enrico Leto
671be9f539 siemens: board: etamin: remove deprecated nand config
NAND was used in the early development phase of etamin. The board runs now
on MMC. This setting is no more used -> remove to simplify the board file.

Further clean-up of etamin should remove all NAND settings. Complete clean-
up of etamin board will take place in a separate patch serie.

Signed-off-by: Enrico Leto <enrico.leto@siemens.com>
2024-02-05 13:32:48 -05:00
Enrico Leto
12e60282cb siemens draco: i2c: use driver model for u-boot
Add support for driver model where EEPROM data are read in draco board.

Reviewed-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
Signed-off-by: Enrico Leto <enrico.leto@siemens.com>
2024-02-05 13:32:48 -05:00
Enrico Leto
e9ef9a1377 siemens: eeprom: simplify setup & read
Since we have boards using the driver model or not for i2c, use abstraction
function to probe the i2c, check the EEPROM and read from EEPROM.

Signed-off-by: Enrico Leto <enrico.leto@siemens.com>
2024-02-05 13:32:48 -05:00
Enrico Leto
5ae54613eb siemens: eeprom: clean up definitions
Move the I2C and EEPROM address definitions in common board header.

Reviewed-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
Signed-off-by: Enrico Leto <enrico.leto@siemens.com>
2024-02-05 13:32:48 -05:00
Tom Rini
090d8463b0 Add RaspberryPi5 basic support.
-----BEGIN PGP SIGNATURE-----
 
 iQJLBAABCAA1FiEEUdvKHhzqrUYPB/u8L21+TfbCqH4FAmW6e1wXHG1hdHRoaWFz
 LmJnZ0BnbWFpbC5jb20ACgkQL21+TfbCqH52xQ/8CFn5pp17a8hmC7Y/sCxTcG72
 HpgKgvmPDk859riCmwzGFQOzs4adOHP4q46xnh6t1Rx9oHWIqHfw9dadtT2yarIp
 NS57vpYWzl4KNmM3fsMIbt1KuuR+uczOq5kBnefI8SDLX1XE94Eo1pbaTyKWP967
 g3bE1M/ifdbduKbi+X0d0rocbc6EtTLOeaUVsSzP/6bYI7ky4TT8KUMXpeCnfOXe
 539+8AJhncVoY/ewVnEypAY3EFmQedol9mMAYSAR4RTUIsMMt+fjD7RMKy5ZUylF
 GDa26CKo79bUvrrjdafGP8Jywd/+t8LZgNwWsISvsMTDwE72whuUikOr4z+MnMaG
 ATWTpmW7sSnTnjASWpG1cgFwxsGu1u5Ylj2KemEL+HzTz5uVfOZnuW6OvNmVDZLV
 fcCH6tmbiCh0OaLwCYeyAQRfozrWatVwvB6eq2VrPvHeqgL9ulCFLoSeENsl63VV
 6imoFZlisUDK/9VEBMrAxnVYxgwf0unKgSQX5fpvX7olt66I4XDQiNwd/fjzZRhE
 vM62hO+vKGicHmdN2sxeU+0G04+4kBMZtHRMa+Jusvk7BAOesX5cgKWoJ/bLzW5d
 BveXcvvbQV3lqC7zS5WX8TvgaNQiPeyAuDn1hNNk22fMPhL5v2fevm2H9RCoF1fg
 w//cffQwFnxtM6rKz5g=
 =9V5z
 -----END PGP SIGNATURE-----

Merge tag 'rpi-next-2024.04' of https://source.denx.de/u-boot/custodians/u-boot-raspberrypi

Add RaspberryPi5 basic support.

Acked-by: Peter Robinson <pbrobinson@gmail.com>
2024-02-05 09:31:48 -05:00
Tom Rini
819abd0a1e Pull request smbios-2024-04-rc2
* In smbios command
   - write 'Not Specified' for missing strings
   - show correct table size for SMBIOS2.1 entry point
   - adjust formatting of handle numbers
   - add missing colon after UUID
 * In generated SMBIOS table
   - avoid introducing 'Unknown' string for missing properties
   - provide RISC-V vendor ID in the type 4 structure
   - provide the correct chassis handle in structure type 2
 * Rename Structure Table Maximum Size field in SMBIOS 3 entry point
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEK7wKXt3/btL6/yA+hO4vgnE3U0sFAmW9PuYACgkQhO4vgnE3
 U0vD4RAAv9gfe4xkqObPA9KRB79u+8hIkxUraUvkKzlI5ibg2Q634yD8SuSr5AQs
 PjkQlPbxN9zLK7tcy3N+H86txp5WGf66dDg1hxhCsohuRR9ZfWfwcLIM+NNqJUT8
 wekCHMuhsK7/5wWZngnjvJOmijNSIsPyxEKUGLKPvguWLzFpYezPHXYzAfe1R+qr
 yMOvPcnVTHkfpMNh0xym0rs1Kg5AnmeUYZ2mHdtIAJrseeozqq64KdBYZ/aIIJ1Y
 KHzR7n2MJg6vVab4Z6+eET5LFWXxuDu3jbN16ydnhMY6Zv4bc7IWpWD/HQT7s0gj
 Uub2MnnBFgDMYKV5CuY3q34dDASVHw4HLvMm+tbOt7oZiLL+HACdqQ+2CxkyB3Lp
 gqgTt04OEiNEKY9ZHdUxWudLpGRjHG6BEy7UParXmqyup+swRYk2JoVVBRKj2aML
 h1lF555L2o01SbtBT2QaeNjH9xMyO0wGUt/+URVxPwyTUwOgiUQ7GvvUBghnDIX6
 QmdzkJUf7QFREJ4TYDBqw58iX9ksjN0gfJsy1bE9jVs1afXedcaRqf1qrHhvg8wW
 jypmSA/J0qy9ZYDGKEeFXzwn+8xr8s2YLi94xjxJAgfuVIqHAI2BPOuhvPmBKypT
 w4q1U4tW8isS2hH9N/V0MJc3xay3CxR/XPLRwqEq5HXAFd3mvoc=
 =rF6y
 -----END PGP SIGNATURE-----

Merge tag 'smbios-2024-04-rc2' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request smbios-2024-04-rc2

* In smbios command
  - write 'Not Specified' for missing strings
  - show correct table size for SMBIOS2.1 entry point
  - adjust formatting of handle numbers
  - add missing colon after UUID
* In generated SMBIOS table
  - avoid introducing 'Unknown' string for missing properties
  - provide RISC-V vendor ID in the type 4 structure
  - provide the correct chassis handle in structure type 2
* Rename Structure Table Maximum Size field in SMBIOS 3 entry point
2024-02-03 09:11:25 -05:00
Heinrich Schuchardt
406c410ef7 smbios: correctly name Structure Table Maximum Size field
In the SMBIOS 3 entry point the Structure Table Maximum Size field was
incorrectly named max_struct_size. A Maximum Structure Size field only
exists in the SMBIOS 2.1 entry point and has a different meaning.

Call the Structure Table Length field table_maximum_size.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-02-02 19:57:45 +01:00
Heinrich Schuchardt
e494258ded smbios: do not determine maximum structure size
Only the SMBIOS 2.1 entry point has a field for the maximum structure size.
As we have switched to an SMBIOS 3 entry point remove the superfluous
calculation.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-02-02 19:57:45 +01:00
Heinrich Schuchardt
551bc96be5 cmd: smbios: show correct table size for SMBIOS2.1 entry point
The SMBIOS table size for SMBIOS2.1 entry points is in field 'Structure
Table Length' (offset 0x16) and not in field 'Maximum Structure Size'
(offset 0x08).

Rename the receiving variable max_struct_size to table_maximum_size
to avoid future confusion.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-02-02 19:57:45 +01:00
Heinrich Schuchardt
5778c88eb0 smbios: correctly fill chassis handle
The chassis handle field in the type 2 structure must point to the handle
of the type 3 structure.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-02-02 19:57:16 +01:00
Heinrich Schuchardt
545e0e42b9 smbios: provide type 4 RISC-V SMBIOS Processor ID
For RISC-V CPUs the SMBIOS Processor ID field contains
the Machine Vendor ID from CSR mvendorid.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-02-02 19:57:16 +01:00
Heinrich Schuchardt
6ebf9136ec smbios: if a string value is unknown, use string number 0
The SMBIOS specification describes: "If a string field references no string,
a null (0) is placed in that string field."

Accordingly we should avoid writing a string "Unknown" to the SMBIOS table.

dmidecode displays 'Not Specified' if the string number is 0.

Commit 00a871d34e ("smbios: empty strings in smbios_add_string()")
correctly identified that strings may not have length 0 as two
consecutive NULs indentify the end of the string list. But the suggested
solution did not match the intent of the SMBIOS specification.

Fixes: 00a871d34e ("smbios: empty strings in smbios_add_string()")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-02-02 19:56:54 +01:00
Matthias Brugger
e31efe50b5 smbios: Fix table when no string is present
When no string is present in a table, next_ptr points to the same
location as eos. When calculating the string table length, we would only
reserve one \0. By spec a SMBIOS table has to end with two \0\0 when no
strings a present.

Signed-off-by: Matthias Brugger <mbrugger@suse.com>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-02-02 19:56:54 +01:00
Heinrich Schuchardt
c11f176ab1 cmd: smbios: replace missing string by 'Not Specified'
A missing string value is indicated by a string index of 0. In this case
print 'Not Specified' like the Linux dmidecode command does.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-02-02 19:56:54 +01:00
Heinrich Schuchardt
e799f8a48d cmd: smbios: add missing colon after UUID
For consistent formatting add a colon ':' after the UUID label.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-02-02 19:56:34 +01:00
Heinrich Schuchardt
7ca4b0ea6a cmd: smbios: always use '0x%04x' for printing handles
Handles are u16 numbers. Consistently use '0x%04x' to print them.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-02-02 19:55:29 +01:00
Heinrich Schuchardt
b327e64d5f smbios: get_str_from_dt() - add sysinfo_id description
Add description for parameter sysinfo_id of function get_str_from_dt().

Fixes: 07c9e683a4 ("smbios: Allow a few values to come from sysinfo")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-02-02 19:55:29 +01:00
Heinrich Schuchardt
85e490b22e lib: smbios_entr() use logical or for booleans
As a matter of programming style use logical or to combine two boolean
results.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-02-02 19:55:29 +01:00
Tom Rini
050a9b981d - stop printing board model twice after sysinfo update
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEPVPGJshWBf4d9CyLd9zb2sjISdEFAmW7qZEACgkQd9zb2sjI
 SdErzQ//bw6KUZ+blULL98qXoaxPnnAE4NLxU7PUYgzV0lYXiSJZdPBTlE69V2Cy
 xSaYzinLpDg1TDpbUvIHi7Q0Qs8KA3ppW00AXVXAuT9hwHWrYXA/gLs2ghflM/eJ
 gPjjKgO2HpMkHGqf2NKelfk0gCy7EHTFUUO3jvmJZZvoUYY0uiQIxZddluwWiqrz
 fR0TmueCR4Wyaxy7Wni19RETmhg0osB8HSwWhTEa3Cpqn8mb/ci26S106Q55mOpA
 BefRtkP+/dqhBZgUbS2sf1YC8pRD84uvKJyNVXeEce7bYp/lUPacObtTMhZhn27q
 2y3LGgYHGwQ+SCxMWYJi1CfjLN0Gu6mlTda0WIJZA5UxRK2ttZjfEVy4aea8kMyg
 KOR7nO7qJyEBe9UDPQPQgDBdFR6EoxUJCfM3ac0o+pjy7dhmYdjIafAK4pTtQcEE
 MzPeG3iqsZNl+B1k0yqrMm54UWE0r/TL2C3J0gfy+civLtIaHnG/M7tozpOBJY8V
 Xp38WgC7weQmE161p+3jfnq3R2sR89Er02aDYODsrRSJmSCZ5g8v7l7Wb+4A2kDq
 kxivQ4ZJ7jbTjQbyZsYwWmB6QMTVHm6CCImYKaj7erB7yv22jyNk6vFBKknL+YPy
 UhYe1jjS97HM1jx0wQ1UYIQctCZUHHKC6gEaQZKFtwkx0xy9FWA=
 =slED
 -----END PGP SIGNATURE-----

Merge tag 'u-boot-amlogic-fixes-20240201' of https://source.denx.de/u-boot/custodians/u-boot-amlogic

- stop printing board model twice after sysinfo update
2024-02-01 09:59:53 -05:00
Tom Rini
f0df21b40c Merge https://source.denx.de/u-boot/custodians/u-boot-watchdog
- add andes atcwdt200 support (Randolph)
2024-02-01 09:59:09 -05:00
Randolph
094eda0660 configs: andes: add watchdog support fot andes ae350
It adds the ATCWDT200 support for Andes AE350 platform.
It also enables wdt command support.

Signed-off-by: CL Wang <cl634@andestech.com>
Signed-off-by: Randolph <randolph@andestech.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-02-01 09:08:44 +01:00
Randolph
4350e99937 drivers: watchdog: add andes atcwdt200 support
This patch adds an implementation of the Andes watchdog ATCWDT200 driver.

Signed-off-by: CL Wang <cl634@andestech.com>
Signed-off-by: Randolph <randolph@andestech.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-02-01 09:08:44 +01:00
Tom Rini
b6d8969bcb First set of u-boot-at91 features for the 2024.04 cycle
-----BEGIN PGP SIGNATURE-----
 
 iQFQBAABCgA6FiEEqxhEmNJ6d7ZdeFLIHrMeAg6sL8gFAmW4mGIcHGV1Z2VuLmhy
 aXN0ZXZAY29sbGFib3JhLmNvbQAKCRAesx4CDqwvyBq9B/sHzeh4lWQpyU5CcO8J
 WnlRn2blqL/2LzkawD6OvA7WhEYisLh2389q6pPSFqWZS8v1aNgTO4krnPDOG3a5
 s7yigcBtg5KsmnM4K89+KZ/BZW4TzrSHIY4P+t1W92QtnFHEzNW/LolG6jBZnz+e
 bMzi0uCGR1cgTW4IfLmuq6NajIaAXywdohMxfi/9kiNhQVT03Jux/CGoIvpJ61Bu
 OKWX2KNn0o3XXK7UKdZUSzP6CyiRSplQl3eX/0shh9qPR16eSeUqh952zGxlcOZO
 PKXvDMl8QxkCzRjXdg3EH2jADoaTB0maq6JutVyY+SoLiYJ9A8BUCLOIMevCVXjK
 3BCH
 =V29u
 -----END PGP SIGNATURE-----

Merge tag 'u-boot-at91-2024.04-a' of https://source.denx.de/u-boot/custodians/u-boot-at91

First set of u-boot-at91 features for the 2024.04 cycle:

This set includes some DT alignments and solves a compile issue for
custom nand defconfigs.
2024-01-31 10:44:33 -05:00
Tom Rini
625e68ef65 Merge https://source.denx.de/u-boot/custodians/u-boot-riscv
* Add RISC-V falcon mode documentation
* Add Clang build support
* Add cmd to detect Debug Trigger Extension support

* Add PWM setting for Unmatched board
* Add Milk-V Duo board support
* Add new device node and enable new config option for VisionFive2 board
* Add second virtio device for RISC-V QEMU
2024-01-31 08:49:35 -05:00
Nam Cao
6882255ac3 riscv: dts: starfive: add regulator device
Add the axp15060 regulator device. OpenSBI uses this device to perform
board reset and shutdown.

Signed-off-by: Nam Cao <namcao@linutronix.de>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-01-31 16:52:53 +08:00
Nam Cao
92802e12ef riscv: dts: jh7110: add power management unit controller node
JH7110 has a power management unit controller node. Add this node.

This device is used by OpenSBI during board reset/shutdown.

Signed-off-by: Nam Cao <namcao@linutronix.de>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-01-31 16:52:53 +08:00
Lukasz Tekieli
70f150759b board: visionfive2: configure PHY pad drive strength
Configure the pad drive strength register for both PHYs.
The values correspond to what can be found in the Linux DTS
for VisionFive2 v1.3b.

Pad drive strength configuration is required for the phy0 to work correctly
with 100Mbit links.

Signed-off-by: Lukasz Tekieli <tekieli.lukasz@gmail.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-01-31 16:52:49 +08:00
Lukasz Tekieli
c025c8afd4 net: phy: motorcomm: configure pad drive strength register
This ports the pad drive strength register configuration which can be
already found in the Linux driver for this PHY.

Signed-off-by: Lukasz Tekieli <tekieli.lukasz@gmail.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-01-31 16:52:49 +08:00
Kongyang Liu
36278b7051 doc: sophgo: milkv_duo: document Milk-V Duo board
Add document for Milk-V Duo board which based on Sophgo's CV1800B SoC.

Signed-off-by: Kongyang Liu <seashell11234455@gmail.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-01-31 16:52:45 +08:00
Kongyang Liu
0dc6ee6d2b riscv: sophgo: milkv_duo: initial support added
Add support for Sophgo's Milk-V Duo board, only minimal device tree and
serial console are enabled, and it can boot via vendor first stage
bootloader.

Signed-off-by: Kongyang Liu <seashell11234455@gmail.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-01-31 16:52:45 +08:00
Kongyang Liu
f03d2ab206 riscv: dts: sophgo: add basic device tree for Milk-V Duo board
Import device tree from Linux kernel to add basic support for CPU, PLIC,
UART and Timer. The name cv1800b in the filename represent the chip used
on Milk-V Duo board.

Signed-off-by: Kongyang Liu <seashell11234455@gmail.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-01-31 16:52:45 +08:00
Aurelien Jarno
386db9a26b configs: visionfive2: Disable ENV_IS_NOWHERE
The VisionFive 2 board supports saving the u-boot environment settings
are saved to on-board SPI flash. However the defconfig enables both
ENV_IS_NOWHERE and ENV_IS_IN_SPI_FLASH, preventing the "saveenv" command
to work. Fix that by disabling ENV_IS_NOWHERE.

Fixes: 7d79bed00c ("configs: starfive: Enable environment in SPI flash support")

Reported-by: E Shattow <lucent@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-01-31 16:52:38 +08:00
kleines Filmröllchen
ee9f9d6a41 riscv: Support building with Clang
The -ffixed-gp option of GCC has an exact equivalent of -ffixed-x3 in
Clang.

Signed-off-by: kleines Filmröllchen <filmroellchen@serenityos.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2024-01-31 16:52:36 +08:00
Heinrich Schuchardt
6b0520c939 cmd: sbi: add support for Debug Trigger Extension
Detect and show if the SBI implements the Debug Trigger Extension.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-01-31 16:52:30 +08:00
Vincent Chen
282159ff24 board: sifive: spl: Initialized the PWM setting in the SPL stage
LEDs and multiple fans can be controlled by SPL. This patch ensures
that all fans have been enabled in the SPL stage. In addition, the
LED's color will be set to yellow.

Signed-off-by: Vincent Chen <vincent.chen@sifive.com>
Co-developed-by: Nylon Chen <nylon.chen@sifive.com>
Signed-off-by: Nylon Chen <nylon.chen@sifive.com>
Co-developed-by: Zong Li <zong.li@sifve.com>
Signed-off-by: Zong Li <zong.li@sifve.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-01-31 16:52:24 +08:00
Aurelien Jarno
cbc45cb596 riscv: qemu: enable booting on a second virtio device
QEMU RISC-V supports multiple virtio devices, but only tries to boot to
the first one. Enable support for a second virtio device, that is useful
for instance to boot on a disk image + an installer. Ideally that should
be made dynamic, but that's a first step.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-01-31 16:52:15 +08:00
Aurelien Jarno
465e7e6d50 board: starfive: handle compatible property in dynamic DT configuration
The difference between the StarFive VisionFive 2 1.2A and 1.3B boards is
handled dynamically by looking at the PCB version in the EEPROM in order
to have a single u-boot version for both versions of the board. While
the "model" property is correctly handled, the "compatible" one is
always the the one of version 1.3b.

This patch add support for dynamically configuring that property.

Fixes: 9b7060bd15 ("riscv: dts: jh7110: Combine the board device tree files of 1.2A and 1.3B")

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-01-31 16:52:07 +08:00