Compare commits

...

166 Commits

Author SHA1 Message Date
Jan Čermák
0724608ff7
Update Buildroot to 2025.02 (#4027)
* Update Buildroot base to v2025.02

Packages updated:

* Added host-blake3 1.5.4
* Added host-go-src
* Added host-libxcrypt 4.4.38
* Added host-tar 1.35
* Added host-xxhash 0.8.3
* Added libtalloc 2.4.2
* Added libxcrypt 4.4.38
* apparmor updated from 3.1.2 to 3.1.7
* busybox updated from 1.36.1 to 1.37.0
* cifs-utils updated from 6.15 to 7.1
* containerd updated from 1.7.26 to 2.0.2
* dbus-broker updated from 35 to 36
* dropbear updated from 2024.85 to 2024.86
* e2fsprogs updated from 1.47.0 to 1.47.2
* expat updated from 2.6.4 to 2.7.0
* gcc-final updated from 12.4.0 to 13.3.0
* glibc updated from 2.38-81-gc8cb4d2b86ece572793e31a3422ea29e88d77df5 to 2.41-5-gcb7f20653724029be89224ed3a35d627cc5b4163
* gptfdisk updated from 1.0.9 to 1.0.10
* host-binutils updated from 2.40 to 2.43.1
* host-ccache updated from 4.8.2 to 4.10.2
* host-cmake updated from 3.28.3 to 3.31.5
* host-dtc updated from 1.7.0 to 1.7.2
* host-e2fsprogs updated from 1.47.0 to 1.47.2
* host-elfutils updated from 0.189 to 0.192
* host-expat updated from 2.6.4 to 2.7.0
* host-fakeroot updated from 1.32.1 to 1.36
* host-gawk updated from 5.3.0 to 5.3.1
* host-gcc-final updated from 12.4.0 to 13.3.0
* host-gcc-initial updated from 12.4.0 to 13.3.0
* host-genimage updated from 17 to 18
* host-go updated from 1.22.12 to unknown
* host-gptfdisk updated from 1.0.9 to 1.0.10
* host-kmod updated from 31 to 33
* host-libcap updated from 2.69 to 2.73
* host-libffi updated from 3.4.4 to 3.4.6
* host-libglib2 updated from 2.76.1 to 2.82.5
* host-libopenssl updated from 3.2.4 to 3.4.1
* host-libtirpc updated from 1.3.4 to 1.3.6
* host-libxml2 updated from 2.12.9 to 2.13.6
* host-lz4 updated from 1.9.4 to 1.10.0
* host-lzip updated from 1.23 to 1.25
* host-meson updated from 1.3.1 to 1.7.0
* host-mpc updated from 1.2.1 to 1.3.1
* host-mtools updated from 4.0.43 to 4.0.47
* host-nfs-utils updated from 2.6.4 to 2.8.2
* host-pcre2 updated from 10.42 to 10.44
* host-pkgconf updated from 1.6.3 to 2.3.0
* host-python3 updated from 3.11.11 to 3.12.9
* host-python-flit-core updated from 3.9.0 to 3.10.1
* host-python-jinja2 updated from 3.1.2 to 3.1.5
* host-python-markupsafe updated from 2.1.3 to 3.0.2
* host-python-packaging updated from 23.2 to 24.2
* host-python-pypa-build updated from 1.0.3 to 1.2.2
* host-python-pyproject-hooks updated from 1.0.0 to 1.2.0
* host-python-setuptools updated from 69.0.3 to 75.8.0
* host-python-wheel updated from 0.40.0 to 0.45.1
* host-rauc updated from 1.11.3 to 1.13
* host-sqlite updated from 3.44.2 to 3.48.0
* host-systemd updated from 254.13 to 256.7
* host-util-linux updated from 2.39.3 to 2.40.2
* host-xz updated from 5.4.5 to 5.6.4
* host-zstd updated from 1.5.5 to 1.5.7
* iproute2 updated from 6.7.0 to 6.13.0
* iptables updated from 1.8.9 to 1.8.11
* json-c updated from 0.17 to 0.18
* kmod updated from 31 to 33
* libapparmor updated from 3.1.2 to 3.1.7
* libblockdev updated from 3.1.1 to 3.3.0
* libbytesize updated from 2.7 to 2.10
* libcap-ng updated from 0.8.4 to 0.8.5
* libcap updated from 2.69 to 2.73
* libdnet updated from 1.16.4 to 1.18.0
* libffi updated from 3.4.4 to 3.4.6
* libglib2 updated from 2.76.1 to 2.82.5
* libgudev updated from 237 to 238
* libmicrohttpd updated from 0.9.77 to 1.0.1
* libnftnl updated from 1.2.6 to 1.2.7
* libnl updated from 3.9.0 to 3.11.0
* libnvme updated from 1.7.1 to 1.11.1
* libopenssl updated from 3.2.4 to 3.4.1
* libtirpc updated from 1.3.4 to 1.3.6
* libunistring updated from 1.1 to 1.3
* libusb updated from 1.0.26 to 1.0.27
* lvm2 updated from 2.03.14 to 2.03.27
* nettle updated from 3.9.1 to 3.10.1
* network-manager updated from 1.44.2 to 1.50.2
* nfs-utils updated from 2.6.4 to 2.8.2
* pcre2 updated from 10.42 to 10.44
* procps-ng updated from 4.0.4 to 4.0.5
* rauc updated from 1.11.3 to 1.13
* rpcbind updated from 1.2.6 to 1.2.7
* rtl8821cu updated from 1597dfeda6cefd2e603fc7020ceca226d05fb108 to 96c65c58b544241178638e810b333dcc9aa26b91
* sqlite updated from 3.44.2 to 3.48.0
* systemd updated from 254.13 to 256.7
* util-linux-libs updated from 2.39.3 to 2.40.2
* util-linux updated from 2.39.3 to 2.40.2
* wireless-regdb updated from 2023.09.01 to 2024.10.07
* wpa_supplicant updated from 2.10 to 2.11

* patches/genimage: drop upstreamed patches

* patches/systemd: drop merged patch

* patches/network-manager: drop upstreamed patch

* Add BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_* to defconfigs
2025-04-17 12:04:39 +02:00
Jan Čermák
233b9c9482
Bump OS to development version 15.3.dev0 2025-04-11 10:05:19 +02:00
Jan Čermák
338df41858
Linux: Update kernel to 6.12.23 (#4017)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.23
2025-04-10 17:21:58 +02:00
Jan Čermák
57445099f7
Allow for fluctuation of MemTotal for automatic swapfile size (#4016)
As the reported MemTotal can fluctuate a bit on some systems, e.g. because the
reserved memory changes between kernel version or other factors affect it like
VRAM, the swap file can be recreated unnecessarily between boots. Allow for
some fluctuation (up to +-32MB) before the swapfile is recreated.

This was a problem already before the recent haos-swapfile changes, however,
before it checked if the existing swapfile isn't smaller than the desired
value. If the MemTotal fluctuated there, the swapfile size eventually settled
on the highest value seen and it wasn't recreated anymore. With this change,
things should be stable even more.
2025-04-10 17:18:07 +02:00
Michal Šimek
f3916bb7f0
Enable driver for 1-wire temperature sensors for generic-aarch64 (#4015)
Driver is used for connected local 1-wire temperatures sensors.
2025-04-10 13:31:52 +02:00
Jan Čermák
7b3ce53ab2
Backport realtek phy driver changes for RTL8125D (#4014)
As pointed out in [1] by @cdce8p, the RTL8125D has an internal PHY that also
needs some changes to be backported.

Also, move the patches to more targeted directories is it would be otherwise
applied to RPi 6.6 kernel with failures. We can move it back to the top-level
patches directory once RPi moves to kernel 6.12.

[1] https://github.com/home-assistant/operating-system/issues/3880#issuecomment-2790105503
2025-04-09 21:44:31 +02:00
Jan Čermák
7bc7f66e49
Disable amdgpu SI/CIK support and backport upstream patch to prevent crashes (#4013)
As we enabled SI/CIK support to fix crashes on bunch of AMD SoCs in #3957, the
amdgpu driver still crashes on some hardware. It seems to be some GX-217GA SoCs
or even GX-425GA in Fujitsu thin clients (even though the same SoC is fine on
T620).

To get to the state before update to kernel 6.12, disable amdgpu for these
platforms again (as it couldn't work properly there before OS 15.0) and just
backport the patch that fixes the crashes during probing when the driver isn't
compiled with SI/CIK support.

Fixes #4012
2025-04-09 17:23:55 +02:00
Jan Čermák
fc984b9435
Backport RTL8125D (rev C, XID 688) support (#4011)
* Backport RTL8125D (rev C, XID 688) support

Apply mainline patch adding support for NIC present e.g. on ASUS NUC 14
Essential.

Fixes #3880

* Update buildroot to add RTL8125D firmware

* buildroot 4cd211162d...5379c358bf (1):
  > linux-firmware: add RTL8125D firmware
2025-04-09 16:38:29 +02:00
Jan Čermák
349b7e48ea
Add tests for checking connectivity, fix Supervisor update test (#4008)
When there's a problem with connectivity, it may result in obscure errors later
in the testing. Add checks testing three scenarions:

* connectivity in host - both using curl and nmcli
* connectivity in Supervisor container (uses docker0 as default via)
* connectivity in CLI container (uses hassio as default via)

Also make sure that Supervisor upgrade isn't attempted when the version
information is missing.
2025-04-07 16:13:11 +02:00
Jan Čermák
cdbbfeaecc
Linux: Update kernel to 6.12.22 (#4007)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.22
2025-04-07 16:13:00 +02:00
Jan Čermák
212796c98a
Linux: Update kernel to 6.12.21 (#3994)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.21
2025-04-01 18:49:19 +02:00
Jan Čermák
92a3b5a793
Adjust lock workflow to run only once a day (#3991)
It's unnecessary to run it every hour, adjust it to run shortly after the
current stale workflow.
2025-03-31 20:26:23 +02:00
Jan Čermák
163b1a3fff
Merge branch 'main' into dev 2025-03-31 17:28:33 +02:00
Jan Čermák
3e2f891cc0
Bump OS to release version 15.1 2025-03-31 11:27:11 +02:00
Jan Čermák
23d08b9cf7
Fix permissions for the lock workflow (#3982)
Unlike Core this repo has stricter default policy for actions. Explicitly
enable permissions for scope the lock workflow needs.
2025-03-28 16:59:27 +01:00
Jan Čermák
75f0936c53
Add workflow for locking old issues (#3980)
To avoid necroposting to old issues that's usually left unnoticed, add workflow
for locking issues similar to the one that Core has.

The PR locking limit can be increased as the traffic is much lower compared to
Core. Issues before 2025 have been locked manually via the API.
2025-03-28 15:51:25 +01:00
Jan Čermák
2f0ffbe443
Change algorithm name in OVA manifest from SHA2-256 to SHA256 (#3981)
Update of OpenSSL in OS 12.2 from 1.1.1 to 3.2 changed the output of `openssl
sha256` command. It seems that some hypervisors don't like this and fail if
it's not plain "SHA256".

Fixes #3654
2025-03-28 15:21:46 +01:00
Jan Čermák
3a9a2529c6
Bump OS to development version 15.2.dev0 2025-03-28 15:20:43 +01:00
Jan Čermák
8407de34f6
Bump OS to pre-release version 15.1.rc1 2025-03-27 11:03:23 +01:00
Jan Čermák
00203b8c5c
Update Docker to v28.0.4 (#3974)
Update Docker and its dependencies to versions packaged in last bugfix release.

* buildroot 3914f8cad5...4cd211162d (4):
  > package/runc: bump version to v1.2.6
  > package/docker-cli: bump version to v28.0.4
  > package/docker-engine: bump version to v28.0.4
  > package/containerd: bump version to v1.7.26
2025-03-26 18:43:44 +01:00
Jan Čermák
ed53f0491c
Set initial_turbo=0 in config.txt on Raspberry Pi 3 (#3973)
Firmware change that set initial_turbo to 60 from the previous 0 has broken
initialization of some SD cards in U-Boot. Adjust the value in config.txt on OS
update if the value is not already set by the user, and put it to the default
config.txt.

The config.txt also contains a short comment explaining the purpose. The
purpose of it is also to make it easier to revert this change in the future if
the problem is fixed in the firmware or U-Boot.

Fixes #3965
2025-03-26 17:26:20 +01:00
Jan Čermák
5e9c47a318
Backport RPi patches for PIO/RP1 firmware probing errors (#3972)
One of the reason for failures after update to OS 15.0 was missing support for
the kernel PIO driver in EEPROM firmware. Backport upstream patches from
raspberrypi/linux#6645 and raspberrypi/linux#6642 that handle this situation
more gracefully. These patches could be dropped after the next RPi kernel
release.

Refs #3943
2025-03-26 16:26:44 +01:00
Jan Čermák
ab6214ba42
Linux: Update kernel to 6.12.20 (#3971)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.20
2025-03-25 18:29:22 +01:00
M. Greyson Christoforo
73b6cce99a
Add Mellanox ConnectX-3 NIC support for kernel 6.12 (#3969)
PR #3775 was mistakenly left out of the jump to the 6.12 kernel
2025-03-25 11:50:25 +01:00
Jan Čermák
ff1eadfe21
Fix incorrect buildroot reference after #3964 merge (#3968)
Submodule hash for buildroot was changed by accident in #3964, revert to
version from the previous commit.
2025-03-25 10:09:00 +01:00
Jens Maus
15e59ead2f
Update generic_raw_uart and eq3_char_loop to latest versions (#3964)
Update generic_raw_uart package to the latest sources available coming with
direct kernel 6.12.x compatibility dropping the intermediate patches
accordingly. In addition, the eq3_char_loop patchset was updated to reflect the
same changes performed.
2025-03-23 10:59:02 +01:00
Jan Čermák
05830dae0b
Change i915 to module for proper initialization in VM passthrough (#3959)
When Intel GPUs are used in passthrough, the i915 is probed too early and fails
to load firmware which is in the rootfs mounted later. The CONFIG_DRM_I915=y
comes from x86_64_defconfig, by changing it to module (like we do for
generic-x86-64), the driver becomes only available after the rootfs is mounted
and firmware is loaded correctly.

Fixes #3949
2025-03-20 17:33:17 +01:00
Jan Čermák
0abfee2eaf
Enable amdgpu SI and CIK support for x86 (#3957)
It seems that kernel 6.12 handles device probing less gracefully when these
options are not enabled and causes crash on some AMD SoCs, e.g.:

*ERROR* Invalid callback to read register 0x58184

Link: https://gitlab.freedesktop.org/drm/amd/-/issues/4050

Refs #3944
2025-03-20 17:32:24 +01:00
Jan Čermák
ce961e0c2c
Add patches missing for ODROID-N2/C2/C4 to fix missing serial/I2C (#3947)
U-Boot update in #3878 changed the layout of patch folders for Hardkernel
targets with the goal to make it less confusing. However, it missed adding the
top-level hardkernel patches directory to all hardkernel targets and only
remove it from some of them in [1].

Revert to state before #3878 by adding the hardkernel folder to c2/c4/n2. In
the future, the patches from this folder should be split per target and if any
patches remain in it, they should be applied for all hardkernel boards.

[1] 2716b564c2

Fixes #3936
2025-03-18 18:00:04 +01:00
Jan Čermák
fd2c16d568
Move ODROID-N2/C2/C4 U-Boot patch to correct folder to fix eMMC issues (#3946)
As pointed out by @ginkage, in #3878 the eMMC patch was moved to a wrong path.
Move it to uboot subfolder so it's correctly applied.

Fixes #3942
2025-03-18 14:21:49 +01:00
dependabot[bot]
6d77c03e98
Bump docker/login-action from 3.3.0 to 3.4.0 (#3934)
Bumps [docker/login-action](https://github.com/docker/login-action) from 3.3.0 to 3.4.0.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v3.3.0...v3.4.0)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-17 15:12:30 +01:00
Jan Čermák
1e69fb2c25
Merge branch 'main' into dev 2025-03-17 11:27:03 +01:00
Jan Čermák
a3b0232351
Add landing page test to the basic test set (#3928)
We check that landing page is working when the network is down but we don't
check it in the happy path. Add its test to make it more obvious when the
just landing page is broken.
2025-03-17 11:23:04 +01:00
Jan Čermák
d259bf8b6b
Linux: Update kernel to 6.12.19 (#3929)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.19
2025-03-17 11:19:03 +01:00
Jan Čermák
248af90c9f
Bump OS to release version 15.0 2025-03-17 11:10:39 +01:00
Jan Čermák
5741be48bd
Bump OS to pre-release version 15.0.rc2 2025-03-13 10:16:33 +01:00
Jan Čermák
a4190754fe
Ensure haos-wipe service can be called only once per boot (#3924)
In some cases, the wipe service may be called due to a race condition for the
second time during the boot, very likely failing because the filesystems are
already mounted. This can not be reproduced on OVA but can be fairly easy
triggered e.g. on RPi. As we want the service to be executed exactly only once,
we can do what's suggested in [1] and set the RemainAfterExit=yes. That should
ensure the unit is not ever started for the second time.

[1] https://www.github.com/systemd/systemd/issues/29367

(cherry picked from commit 24640c11aeb89290f7a1ecfd0c8c6527f8523e27)
2025-03-13 10:16:12 +01:00
Jan Čermák
24640c11ae
Ensure haos-wipe service can be called only once per boot (#3924)
In some cases, the wipe service may be called due to a race condition for the
second time during the boot, very likely failing because the filesystems are
already mounted. This can not be reproduced on OVA but can be fairly easy
triggered e.g. on RPi. As we want the service to be executed exactly only once,
we can do what's suggested in [1] and set the RemainAfterExit=yes. That should
ensure the unit is not ever started for the second time.

[1] https://www.github.com/systemd/systemd/issues/29367
2025-03-12 20:07:26 +01:00
Jan Čermák
7e6e4119a7
Fix runtime device permissions update in runc v1.2.x (#3921)
Add missing patch and update for latest runc version to fix losing device
permissions when new devices are added in runtime.

* buildroot b079a02a9a...3914f8cad5 (2):
  > package/runc: add patch for extended default allowed devices in v1.2.4
  > package/runc: add missing patch to fix device permissions update

Fixes #3915

(cherry picked from commit 04debe2f539c4275fd68fe4d38fee3f8b8bab84b)
2025-03-12 11:31:35 +01:00
Jan Čermák
34a422401d
Update Hailo PCIe driver and firmware to v4.20.1 (#3922)
Update to latest version of the driver and matching firmware. The most common
application for it - Frigate - currently has 4.19.0 in stable but 4.20.0 is
staged in dev. As it's easier to select OS version than a version of the
add-on, it makes sense to stay ahead in HAOS. This also means Frigate needs to
be updated to the matching version (as staying on an arbitrary older patch
revision doesn't make much sense either).

(cherry picked from commit 173a4388fe7ee2f26c277b6c2dccdcab1b9f0a58)
2025-03-12 11:31:30 +01:00
Jan Čermák
f723d93159
Linux: Update kernel to 6.12.18 (#3919)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.18

(cherry picked from commit 3fb9c161c0f224e91f534bbe152d3dd46cc1375e)
2025-03-12 11:31:27 +01:00
Jan Čermák
084d0acee4
Improve tests traceability, add test for Systemd dependency cycles (#3917)
* Add test checking journal logs for dependency cycles
* Run some test cases to get their output also when full init fails
* Remove high timeouts from the times when GHA couldn't use KVM
* Enable logging durations for future optimizations

(cherry picked from commit 4a1d2b75b94483efc749e88aab95fa639aa2bb0a)
2025-03-12 11:31:24 +01:00
Jan Čermák
4ccc875520
Use shell script instead of OS Agent for device wipe (#3916)
Use simple shell script to perform device wipe instead of calling OS Agent to
do that through the UDisks2 API. While it might have been a good idea to use
high level interface for that back then, it turns out it causes more issues
than the benefits it could bring.

Main problem currently is that the OS Agent needs to read sysctl variables, but
those are only set after mounting the overlay partition. But at the same time,
the overlay partition can't be mounted if we want to wipe it - this creates a
dependency cycle through the haos-agent.service.

To get rid of the cycle and simplify things, use a shell script doing basically
the same what the OS Agent does. Since the wipe functionality only makes sense
to be implemented on HAOS targets (not on Supervised), there's little point of
having it in higher layer of abstraction that OS Agent provides.

It should be also checked if changes from #1291 are needed anymore, as the
driving factor for those have been probably the wipe feature in OS Agent too,
but at this point they seem to be harmless.

(cherry picked from commit 6c4f32a8c0cb48ba203d48068a773a5b3895ccfc)
2025-03-12 11:31:20 +01:00
Jan Čermák
25ca83287e
Bump os-agent to v1.7.2 (#3914)
Update to latest version that fixes start order in haos-agent.service. Without
that, OS Agent reports incorrect swappiness after boot.

(cherry picked from commit 36d905720a12742b4d46f3a0a6b0ca4628ed3f1d)
2025-03-12 11:31:13 +01:00
Jan Čermák
6e8c390096
Update RPi firmware to fix boot with 2025-02-11 bootloader (#3913)
* buildroot 7d5c3b5e70...b079a02a9a (1):
  > package/rpi-firmware: bump to 1.20250305 with updated firmware binaries

Fixes #3911

(cherry picked from commit d4e11afd3c98619bb83c19bee876902f794f8376)
2025-03-12 11:31:10 +01:00
Jan Čermák
16e6599832
Add test that no AppArmor denied events are produced (#3912)
As discussed in #3885, now that fixed Supervisor is in stable, we can test that
no AppArmor denied events are logged during CI tests.

(cherry picked from commit 610ced0162aa1c76915a0cc2adf16d93c858358e)
2025-03-12 11:31:07 +01:00
dependabot[bot]
f7bfd161ad
Bump docker/setup-buildx-action from 3.9.0 to 3.10.0 (#3910)
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 3.9.0 to 3.10.0.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v3.9.0...v3.10.0)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
(cherry picked from commit c72cf09cc36d13782dcdaed4eeb77ed5031a595c)
2025-03-12 11:31:02 +01:00
dependabot[bot]
33b92f53f9
Bump docker/build-push-action from 6.14.0 to 6.15.0 (#3909)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.14.0 to 6.15.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v6.14.0...v6.15.0)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
(cherry picked from commit 668c84959a656cdd3a246d42a2ebe1e553dbfdff)
2025-03-12 11:30:55 +01:00
Jan Čermák
04debe2f53
Fix runtime device permissions update in runc v1.2.x (#3921)
Add missing patch and update for latest runc version to fix losing device
permissions when new devices are added in runtime.

* buildroot b079a02a9a...3914f8cad5 (2):
  > package/runc: add patch for extended default allowed devices in v1.2.4
  > package/runc: add missing patch to fix device permissions update

Fixes #3915
2025-03-11 15:24:08 +01:00
Jan Čermák
173a4388fe
Update Hailo PCIe driver and firmware to v4.20.1 (#3922)
Update to latest version of the driver and matching firmware. The most common
application for it - Frigate - currently has 4.19.0 in stable but 4.20.0 is
staged in dev. As it's easier to select OS version than a version of the
add-on, it makes sense to stay ahead in HAOS. This also means Frigate needs to
be updated to the matching version (as staying on an arbitrary older patch
revision doesn't make much sense either).
2025-03-11 15:15:28 +01:00
Jan Čermák
3fb9c161c0
Linux: Update kernel to 6.12.18 (#3919)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.18
2025-03-11 15:12:54 +01:00
Jan Čermák
4a1d2b75b9
Improve tests traceability, add test for Systemd dependency cycles (#3917)
* Add test checking journal logs for dependency cycles
* Run some test cases to get their output also when full init fails
* Remove high timeouts from the times when GHA couldn't use KVM
* Enable logging durations for future optimizations
2025-03-06 18:23:34 +01:00
Jan Čermák
6c4f32a8c0
Use shell script instead of OS Agent for device wipe (#3916)
Use simple shell script to perform device wipe instead of calling OS Agent to
do that through the UDisks2 API. While it might have been a good idea to use
high level interface for that back then, it turns out it causes more issues
than the benefits it could bring.

Main problem currently is that the OS Agent needs to read sysctl variables, but
those are only set after mounting the overlay partition. But at the same time,
the overlay partition can't be mounted if we want to wipe it - this creates a
dependency cycle through the haos-agent.service.

To get rid of the cycle and simplify things, use a shell script doing basically
the same what the OS Agent does. Since the wipe functionality only makes sense
to be implemented on HAOS targets (not on Supervised), there's little point of
having it in higher layer of abstraction that OS Agent provides.

It should be also checked if changes from #1291 are needed anymore, as the
driving factor for those have been probably the wipe feature in OS Agent too,
but at this point they seem to be harmless.
2025-03-06 16:39:40 +01:00
Jan Čermák
36d905720a
Bump os-agent to v1.7.2 (#3914)
Update to latest version that fixes start order in haos-agent.service. Without
that, OS Agent reports incorrect swappiness after boot.
2025-03-05 19:06:27 +01:00
Jan Čermák
d4e11afd3c
Update RPi firmware to fix boot with 2025-02-11 bootloader (#3913)
* buildroot 7d5c3b5e70...b079a02a9a (1):
  > package/rpi-firmware: bump to 1.20250305 with updated firmware binaries

Fixes #3911
2025-03-05 19:04:23 +01:00
Jan Čermák
610ced0162
Add test that no AppArmor denied events are produced (#3912)
As discussed in #3885, now that fixed Supervisor is in stable, we can test that
no AppArmor denied events are logged during CI tests.
2025-03-05 19:04:15 +01:00
Jan Čermák
a39b8a9418
Bump OS to development version 15.1.dev0 2025-03-03 15:14:08 +01:00
dependabot[bot]
c72cf09cc3
Bump docker/setup-buildx-action from 3.9.0 to 3.10.0 (#3910)
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 3.9.0 to 3.10.0.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v3.9.0...v3.10.0)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-03 15:12:43 +01:00
dependabot[bot]
668c84959a
Bump docker/build-push-action from 6.14.0 to 6.15.0 (#3909)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.14.0 to 6.15.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v6.14.0...v6.15.0)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-03 15:12:14 +01:00
Jan Čermák
b2aa96c9bd
Bump OS to pre-release version 15.0.rc1 2025-03-03 09:24:34 +01:00
Jan Čermák
a4cbf82a6f
Bump os-agent to v1.7.1 (#3906)
Adds new DBus APIs for NTP servers and swap:
 - https://github.com/home-assistant/os-agent/pull/207
 - https://github.com/home-assistant/os-agent/pull/222
2025-02-28 15:07:31 +01:00
Jan Čermák
6b904abfcd
Linux: Update kernel to 6.12.17 (#3905)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.17
2025-02-28 14:19:55 +01:00
Jan Čermák
e801d403e1
Bump BlueZ to v5.79 (#3903)
Cherry-pick bumps up to v5.79 and sync other changes and fixes with latest
upstream state.

* buildroot b4df362187...7d5c3b5e70 (10):
  > package/bluez5_utils: tidy up the init script
  > package/bluez5_utils: install datafiles with correct permissions
  > package/bluez5_utils: fix dbusconfdir
  > package/bluez5_utils{, -headers}: bump version to 5.79
  > package/bluez5_utils: enable asha/bass when building audio plugins
  > package/{bluez5_utils, bluez5_utils-headers}: bump to version 5.78
  > bluez5_utils: disable asha profile
  > package/{bluez5_utils, bluez5_utils-headers}: bump to version 5.77
  > package/bluez5_utils: disable datafiles
  > package/bluez5_utils: fix sixaxis build without tools
2025-02-26 23:07:14 +01:00
Jan Čermák
15be152345
Update Docker to v28.0.1 (#3902)
Update Docker to latest version and containerd to latest version from the 1.7
line. Runc updated to v1.2.5 with rebased patchset from the outstanding PR.

* buildroot 257ddc70ce...b4df362187 (4):
  > package/runc: bump version to v1.2.5
  > package/docker-cli: bump version to v28.0.1
  > package/docker-engine: bump version to v28.0.1
  > package/containerd: bump version to v1.7.25
2025-02-26 17:22:39 +01:00
Jan Čermák
40ef226872
Update linux-firmware to 20250211 (#3901)
Mainly the amdgpu updates cause an increase of generic-x86-64 image size by
~12MB but there's still enough of space in the rootfs after recent cleanup.

* buildroot c5a1cbcf73...257ddc70ce (9):
  > package/linux-firmware: bump Intel BZ firmware version to 92
  > package/linux-firmware: bump version to 20250211
  > package/linux-firmware: bump version to 20241210
  > package/linux-firmware: fix build failures to due RTL8723 file changes
  > package/linux-firmware: bump version to 20240909
  > package/linux-firmware: bump to version 20240709
  > package/linux-firmware: improve help text for Realtek 88xx Bluetooth firmware
  > package/linux-firmware: install all rtl88 Bluetooth binary blobs
  > package/linux-firmware: RTL_88XX_BT: install all firmware
2025-02-26 13:45:53 +01:00
Jan Čermák
b3ce7131af
Disable linux-firmware zstd compression (#3898)
Disable downstream option for linux-firmware compression. With #3877 it's not
needed for x86 anymore and other boards don't need it. Eventually the higher
EROFS compression for firmwares and modules can be enabled for other targets as
well.
2025-02-25 15:16:58 +01:00
Jan Čermák
f5905569b0
Bump buildroot to 2024.02.11 (#3897)
* buildroot 92fab35fed...c5a1cbcf73 (1):
  > Merge tag '2024.02.11' into 2024.02.x-haos
2025-02-25 15:16:46 +01:00
pisanvs
bdcc2b90d5
Improve log clarity and fix typos (#3896) 2025-02-25 15:00:39 +01:00
Jan Čermák
714ca8a344
Drop kernel patch for fixed ODROID-M1/M1S kernel regression (#3895)
Patch added in #3843 is not necessary anymore, as the missing reset names have
been added to DTS includes of the 6.12.y branch as patch
6c9cd0a70ccea8a505471062a85de5626ad07cec (released in v6.12.14).
2025-02-24 17:13:45 +01:00
dependabot[bot]
f032cd571a
Bump docker/build-push-action from 6.13.0 to 6.14.0 (#3894)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.13.0 to 6.14.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v6.13.0...v6.14.0)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-24 16:24:34 +01:00
Jan Čermák
ea40984603
Linux: Update kernel to 6.12.16 (#3892)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.15
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.16
2025-02-24 15:17:51 +01:00
Jan Čermák
56e3a377db
Fix RAUC tryboot handler set-state idempotency, add more checks (#3891)
When RPi is booted in the tryboot state and the set-state operation is called
for the second time, the tryboot files don't exists anymore and the handler
exits with an error code, printing an error in the Supervisor logs. Fix
handling of this case and add few more checks to make the handler a bit more
robust/traceable.
2025-02-24 15:17:43 +01:00
Jan Čermák
8531e7b57d
Remove all info pages in post-build script (#3888)
As we don't have the info utility in HAOS, it's worthless to preserve info
pages. While there are currently some files in /share/info (coming from GRUB2
tools install), /usr/share/info was added pre-emptively.
2025-02-20 17:50:38 +01:00
Jan Čermák
664ae4ebfc
Remove unnecessary GRUB userspace tools and other files (#3887)
Because the OTA hooks interact with GRUB environment using grub-editenv, we
have BR2_TARGET_GRUB2_INSTALL_TOOLS enabled. However, that brings massive bloat
of files that are never used in HAOS, as it also installs many other binaries,
GRUB modules and translations.

As it's not possible to configure what gets installed in grub2 package, remove
the undesired files in the post-build function. This brings savings of ~8.5MB
of space in the root partition.
2025-02-20 17:50:21 +01:00
Jan Čermák
e158fbc834
Use auditd to process AppArmor/audit logs (#3885)
Use auditd so logs from AppArmor and other audit events are processed by that
instead of printed to the Systemd journal. This will reduce the log spam from
BPF usually present in host logs and still preserve the audit logs for
debugging.

The default configs seems to be sane for our purpose, rotating up to 5 files of
8MiB each. The difference is that /var/log/audit will be now on tmpfs but given
how AppArmor is used on typical HA setup, we don't need to preserve the logs
over reboots.
2025-02-20 17:45:23 +01:00
Jan Čermák
4ab51e780c
Remove unnecessary and invalid e2scrub removal from post-build (#3886)
Removal of the e2scrub binary is not needed anymore, as it's not installed and
only BR2_PACKAGE_E2FSPROGS_E2IMAGE is enabled. Moreover, it's been probably
wrong since the very beginning, as the TARGET_DIR prefix was missing, possibly
leading to removal of the binary from the host/builder.
2025-02-20 14:16:56 +01:00
Jan Čermák
e455669d62
Move swappiness config to 15-swappiness.conf (#3884) 2025-02-19 21:51:39 +01:00
Jan Čermák
1b511990e3
Allow overriding sysctl parameters via /etc/sysctl.d files (#3883)
Relocate current content of /etc/sysctl.d to /usr/lib and make the /etc folder
writable via a bind mount.
2025-02-19 15:33:16 +01:00
Jan Čermák
d42e34f646
Make swap size configurable (#3882)
Allow configuration of the swap size via /etc/default/haos-swapfile file. By
setting the SWAPSIZE variable in this file, swapfile get recreated on the next
reboot to the defined size. Size can be either in bytes or with optional units
(B/K/M/G, accepting some variations but always interpreted as power of 10). The
size is then rounded to 4k block size. If no override is defined or the value
can't be parsed, it falls back to previously used 33% of system RAM.

Fixes #968
2025-02-19 15:33:04 +01:00
Jan Čermák
dc7b693691
Update U-Boot to 2025.01 (#3878)
* Refresh fileenv patch for U-Boot 2025.01

* Update Tinker to U-Boot 2025.01

Needs minor patch adjustment, also fixed patch numbering.

* Update ODROID-N2 to U-Boot 2025.01, move eMMC patch

Move the patch for eMMC so it's applied only for N2 specifically and update it
for 2025.01.

* Update ODROID-C/XU to U-Boot 2025.01

No changes in patches necessary after moving the N2 patch.

* Update RPi boards to U-Boot 2025.01

Changes needed in bcmstb PCIe driver due to upstream refactoring, rest only
refreshed. All patches now target the same version, so we can drop one of the
series.

* Update VIM3 to U-Boot 2025.01

No patches here, just version bump.

* Update Green to U-Boot 2025.01

Updated and refreshed patches, added a patch to disable OF_UPSTREAM which is
now needed.

* Update ODROID-M1 to U-Boot 2025.01

Drop patch that has been mostly merged upstream. The change is that HS400 would
stay enabled but let's get back to what upstream does.

* Update ODROID-M1 to U-Boot 2025.01

Drop all patches as M1S support should be now merged to U-Boot and DTS taken
from upstream.

* Disable DFU and mkeficapsule to fix build

mkeficapsule requires gnutls to be built first but it's not among dependencies.
Since we don't need the tool, we can disable it.

DFU is also not used on HAOS and it implies EFI_LOADER that we already disable.
Moreover, that also sets SET_DFU_ALT_INFO and leads to linker failure on some
platforms where it's not implemented.

* fixup! Update Green to U-Boot 2025.01

There were more changes needed in the Green config to use correct memory layout
due to upstream changes, otherwise we'll have malloc failures in U-Boot proper.

* Move N2 eMMC patch to more generic patches-meson

To stay on the safe side, move the eMMC hack to more generic folder that's used
for all targets using the meson_gx eMMC driver (i.e. C2, C4 and N2). This is
still better than keeping it in hardkernel/patches which is applied only to
some hardkernel boards (like it was before bump to U-Boot 20205.01).
2025-02-18 13:48:24 +01:00
Jan Čermák
22ed3864dd
Linux: Update kernel to 6.12.14 (#3881)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.14
2025-02-18 11:41:09 +01:00
Jan Čermák
3a666bbeea
Use EROFS LZMA compression of firmware on x86 instead of per-file ZSTD (#3877)
Instead of using per-file ZSTD compression, compress firmware (and newly also
kernel modules) using LZMA within EROFS image. LZMA was picked because ZSTD
support in EROFS is still experimental and due to some limitations in the
implementation, the compression takes significantly more time.

This change gives us more control over compression of the files and with the
proposed settings, saves a bit of the space (~10 MiB) in the resulting image.
In theory, even higher savings could be achieved through compressing other
runtime binaries, but this would need to be thoroughly tested whether it
doesn't have any detrimental effects. For firmware and modules, the overhead
should be minimal, as they are usually touched only once per boot and are
rather small before decompression.

* buildroot 74994c4f32...92fab35fed (6):
  > fs/erofs: add custom compression option with optional compress-hints file
  > package/erofs-utils: bump to version 1.8.5
  > package/erofs-utils: bump to version 1.8.3
  > package/erofs-utils: bump to version 1.8.2
  > package/erofs-utils: bump to version 1.8.1
  > package/erofs-utils: add libdeflate and zlib optional dependencies
2025-02-14 12:27:39 +01:00
Jan Čermák
5fcf2932a6
Update firmware for Intel Wi-Fi 6/6E/7 cards, bump linux-firmware to 20240513 (#3876)
* buildroot 014c3fad50...74994c4f32 (2):
  > package/linux-firmware: update Intel iwlwifi firmware versions for Linux 6.12
  > package/linux-firmware: bump version to 20240513
2025-02-12 22:10:42 +01:00
Jan Čermák
43d26c8c54
Linux: Update kernel to 6.12.13 (#3868)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.13
2025-02-10 15:35:54 +01:00
dependabot[bot]
072ba9bade
Bump docker/setup-buildx-action from 3.8.0 to 3.9.0 (#3869)
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 3.8.0 to 3.9.0.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v3.8.0...v3.9.0)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-10 14:57:53 +01:00
Jan Čermák
970cd4dfeb
Fix order of patches for Yellow (#3862)
After #3856, we need to change the patch order also for Yellow.
2025-02-05 18:18:45 +01:00
Jan Čermák
2dda7a0e75
Enable Intel 40 Gigabit ethernet driver module for x86-64 and OVA (#3858)
Enable Intel 40 Gigabit (aka 700 series) driver, used e.g. on MinisForum MS-01
for the SFP+ ports.

Fixes #3751
2025-02-04 18:33:52 +01:00
Jan Čermák
0ac5f029e6
Linux: Update kernel to 6.12.12 (#3859)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.12
2025-02-04 18:32:36 +01:00
Jan Čermák
aafe82f801
RaspberryPi: Update kernel to 6.6.74 - stable_20250127 (#3860)
* RaspberryPi: Update kernel to 6.6.74 - stable_20250127

* Bump buildroot to update rpi-firmware

* buildroot 71cba6c610...014c3fad50 (1):
  > package/rpi-firmware: bump to version 1.20250127 for kernel 6.6.74

* Update patch for disabling CQE on CM5

The bool has been changed to a cell, adding the possibility to change the value
via sd_cqe dt_param both on CM5 and Pi5. Set it to disabled by default on CM5.
2025-02-04 18:29:42 +01:00
Jan Čermák
1d5e86ad77
Disable UAS via usb-storage.quirks on RPi for JMicron JMS578 (#3857)
Reported in/fixes #3827
2025-02-04 13:13:50 +01:00
Jan Čermák
47309b4a10
Backport upstream patch to fix downstream patch collision in RPi 6.6 kernel (#3856)
Because of refactoring/code quality improvements in upstream, IPv6 reachability
patch no longer applied on 6.12 kernel. We added two versions of the patch to
address this initially, however, this requires updating of the patch directory
name on every kernel bump. Backport the patch causing collision instead to RPi
kernel, so we can carry only one version of the patch.

This also requires swapping of the patching order - now we first apply
board-specific patches, then the global ones. Unless there are collisions,
these operations should be idempontent, so at this point it shouldn't have any
side-effects.
2025-02-04 13:13:40 +01:00
Jan Čermák
b5b2f5da07
Remove USB stack patches working around obsoleted Z-Wave devices issues (#3854)
* Remove USB stack patches working around obsoleted Z-Wave devices issues

In #3224 we've introduced a patch reverting some changes in the USB stack that
was supposed to work around issues with some USB devices. Later discussions
revealed these devices are obsoleted by the manufacturer and there is no
official way of fixing those in newer Linux kernels. However, carrying the
patches makes us diverge from upstream and can eventually trigger other
problems not present upstream we'll have to handle.

Drop these patches now to be part of the upcoming OS 15 release, rather than
needing to drop them later in any of the patch revisions later.

* Also remove the patch from board/raspberrypi patches
2025-02-04 11:42:59 +01:00
Ricardo Pardini
c63f9ec84a
Allow boot from USB and NVMe on ODROID-M1 (#3852)
Use devtype instead of hardcoding device type to mmc in U-Boot script

Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
2025-02-03 14:46:01 +01:00
Jan Čermák
9a760a2e28
Update all platforms to latest stable Linux 6.12 (#3850)
* Upgrade Rockchip platforms to Linux 6.12

Upgrade all Rockchip boards to latest 6.12. Patches for M1S can be dropped, its
DTS has been merged. Same goes for the Rockchip TRNG, it only had to be enabled
in the Green DTS. Patch for broken combphy has been updated for 6.12.y.

* Remove deprecated and nonsense symbols from Rockchip defconfig

Many symbols have been removed between 6.6 and 6.12. Most of them have no use
in Rockchip defconfig, or should be set by other kernel fragments anyway.
Remove all of them, with the exception of USB_ONBOARD_HUB (which was renamed to
USB_ONBOARD_DEV) and FSCACHE (which was changed from tristate to bool).

* Update generic-aarch64 to Linux 6.12

* Update Amlogic-based ODROID boards to Linux 6.12

Removed couple of deprecated/unrelated kernel options.

* Update VIM3 to Linux 6.12

Cleaned up symbols unrelated/deprecated in 6.12 from defconfig.

* Update ODROID-XU4 to Linux 6.12

The usual defconfigs suspects had to been removed and the regulator patch for
ethernet needed a minor update after refactoring in upstream.

* Update Tinker to Linux 6.12

Needed defconfig cleanup for 6.12, otherwise no changes.

* Update x86 and OVA to latest 6.12 release

This way the extra patches directory can be removed too.

* Remove 6.6.73 patches

* Refresh all linux patch series against 6.12.11 sources

* Reenable HW RNG on M1S to speed up boot

The TRNG on RK3566 supposedly [1] has low quality, that's why it's disabled in
upstream for this SoC. We had it enabled in the past and without it, the boot
is delayed by quite a lot. Enable it again for now and investigate the RNG
issues later.

[1] https://patchew.org/linux/cover.1722355365.git.daniel@makrotopia.org/

* Also remove CACHEFILES module from Rockchip config

It was only enabled for Rockchip and Tinker, and to my knowledge there is no
cachefiles daemon or anything other in the userspace that's using it.

* Remove unused 6.6.y fragments

Since we only have 6.6.y for Raspberry Pi now, it doesn't need the Rockchip and
wireless PCI fragments.
2025-02-03 14:35:22 +01:00
Jan Čermák
f56130af19
Revert kernel patch causing USB 3 and PCIe breakage on ODROID-M1/M1S (#3843)
Revert the patch changing phy reset behavior, requiring also changes in the
device tree that are missing in the stable backport. The issue was reported to
the regressions mailing list and hopefully future patch release should contain
a proper fix.

The patch is added to the patches-rockchip directory, potentially affecting
Green as well, although the broken peripherals are not used there.

Fixes #3837, fixes #3841
2025-01-30 11:36:01 +01:00
Jan Čermák
ffca0b30a9
Fix RPi 5 getting stuck in bootloader after some reboots (#3842)
Probably since home-assistant/supervisor#5276 introduced in Supervisor
2024.9.0, RAUC bootloader handler for tryboot can set the tryboot flag also
when the tryboot file is not present, causing the Pi to become stuck in
bootloader, trying to load the tryboot file.

This happens when the device is already in the tryboot state, in that case the
tryboot files and flag are created by set-primary and in turn the files are
removed in set-state, while the flag is persisted, causing the bootloader to
attempt loading non-existing file.

To avoid unnecessary juggling with tryboot/config files, only create them and
set the flag if the boot slot is different than the current one. Also, make
sure that the flag is reboot parameter is cleared when the tryboot files are
removed by the handler.

Fixes #3740
2025-01-30 11:35:51 +01:00
Jan Čermák
f9776abb6a
Update OVA to Linux 6.12 (#3845)
* Update OVA to Linux 6.12

* Remove obsolete I2C_COMPAT option

Same as on x86, this symbol was removed upstream.

* Disable linux-tools hypervfcopyd option

It was removed from Linux beginning in 6.9, see:
https://lore.kernel.org/all/1711788723-8593-7-git-send-email-ssengar@linux.microsoft.com/
2025-01-30 11:35:41 +01:00
Nick Venenga
fbd5c2c751
Update generic-x86-64 Linux kernel to 6.12 (#3767)
* Linux: Update kernel to 6.12.6

* Linux 6.12

* https://github.com/home-assistant/operating-system/pull/3767#discussion_r1899169881

* https://github.com/home-assistant/operating-system/pull/3767#discussion_r1899170543

* Add patch descriptions, kernel ver conditionals

Signed-off-by: Nick Venenga <nick@venenga.com>

* Remove extra zram compression algos

* Undo fragment files config change

...for platforms that didn't receive kernel updates

* Sort Dockerfile apt packages

* Add Upstream refs to patches

* Re-enable TC

* Restore v6.6.y kernel fragments

* Update buildroot to rebased branch

* Apply 6.12 migration only to generic-x86-64

* package/eq3_char_loop: port patch from RaspberryMatic by @jens-maus

* package/generic_raw_uart: port patch from RaspberryMatic by @jens-maus

* Restore buildroot-external/board/pc/patches/linux

It's used in ova and generic-aarch64 defconfigs. Keep the path removed from
generic-x86-64 defconfig.

* Split linux patches to be version-specific

The IPv6 reachability patch needs different context on 6.6.y and 6.12.y -
introduce version-specific linux directories. To avoid the need for extra
directory for version used in RPi, copy those patches to its patches directory.

* Replace removed Intel Skylake audio driver with Intel AVS

The Skylake driver was removed and should be now replaced either by Intel HD
Audio or Intel AVS. Remove the old options and enable AVS.

SND_SOC_INTEL_SKYLAKE=m not found (defined in /build/buildroot-external/board/pc/generic-x86-64/kernel.config:63)
SND_SOC_INTEL_SKL=m not found (defined in /build/buildroot-external/board/pc/generic-x86-64/kernel.config:64)
SND_SOC_INTEL_APL=m not found (defined in /build/buildroot-external/board/pc/generic-x86-64/kernel.config:65)
SND_SOC_INTEL_KBL=m not found (defined in /build/buildroot-external/board/pc/generic-x86-64/kernel.config:66)
SND_SOC_INTEL_GLK=m not found (defined in /build/buildroot-external/board/pc/generic-x86-64/kernel.config:67)
SND_SOC_INTEL_CNL=m not found (defined in /build/buildroot-external/board/pc/generic-x86-64/kernel.config:68)
SND_SOC_INTEL_CFL=m not found (defined in /build/buildroot-external/board/pc/generic-x86-64/kernel.config:69)
SND_SOC_INTEL_CML_H=m not found (defined in /build/buildroot-external/board/pc/generic-x86-64/kernel.config:70)
SND_SOC_INTEL_CML_LP=m not found (defined in /build/buildroot-external/board/pc/generic-x86-64/kernel.config:71)
SND_SOC_INTEL_SKYLAKE_FAMILY=m not found (defined in /build/buildroot-external/board/pc/generic-x86-64/kernel.config:72)
SND_SOC_INTEL_SKYLAKE_HDAUDIO_CODEC=y not found (defined in /build/buildroot-external/board/pc/generic-x86-64/kernel.config:73)
SND_SOC_INTEL_SKYLAKE_COMMON=m not found (defined in /build/buildroot-external/board/pc/generic-x86-64/kernel.config:74)
-> a882f4d750

SND_SOC_INTEL_SST=m requested, actual = n (defined in /build/buildroot-external/board/pc/generic-x86-64/kernel.config:58)
-> 970d299b0a

* Remove I2C_COMPAT option

I2C_COMPAT=y not found (defined in /build/buildroot-external/board/pc/generic-x86-64/kernel.config:163)
-> 7e722083fc

* Correctly disable module compression after Kconfig change

The Kconfig structure was changed, there's now a top-level bool:
c7ff693fa2

---------

Signed-off-by: Nick Venenga <nick@venenga.com>
Co-authored-by: Jan Čermák <sairon@sairon.cz>
2025-01-28 14:57:07 +01:00
Jan Čermák
4919e4e26c
Use Python 3.13 for the build and artifacts index jobs (#3840) 2025-01-28 13:51:18 +01:00
Michal Šimek
7eccef8a18
Change Cadence i2c and Zynq GPIO from modules to built-in drivers (#3821)
On Kria KD240 slg7xl45106 device is handling reset for USB hub which is
providing access to SD card (USB/SD converter). Access to this device is
done via i2c which needs to be also enabled in the kernel as built-in
driver not as module when rootfs is mounted.

Also change ZYNQ_GPIO to be built-in driver because i2c is using gpio for
bus recovery that's why it should be also enabled to probe i2c driver
properly.

v6.6 kernel doesn't have support for usb5744 driver that's why disable it
but add TODO to enable it once v6.12 upgrade is done.
2025-01-28 13:05:02 +01:00
dependabot[bot]
c6218aafd8
Bump docker/build-push-action from 6.12.0 to 6.13.0 (#3836)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.12.0 to 6.13.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v6.12.0...v6.13.0)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-27 16:26:40 +01:00
dependabot[bot]
f51d6b0490
Bump actions/stale from 9.0.0 to 9.1.0 (#3835) 2025-01-27 15:21:53 +01:00
Jan Čermák
4fb83d5480
Merge branch 'main' into dev 2025-01-27 13:47:53 +01:00
Jan Čermák
da08a45d9f
Bump OS to release version 14.2 2025-01-27 09:29:31 +01:00
Jan Čermák
6f51b80db5
Bump OS to pre-release version 14.2.rc2 2025-01-21 22:44:51 +01:00
Jan Čermák
478f652e8c
Fix linux-pam trying to include disabled pam_lastlog.so on login (#3815)
Build of pam_lastlog.so was disabled by updating to v1.5.3 [1] yet the line
wasn't removed from the login modules. In upstream this was resolved by adding
a config option for turning the lastlog module and dynamic disabling of the
line including it. These changes neither a fix removing the config line were
not applied to 2024.02, so cherry-pick them here to fix the issue.

* buildroot ff563b383d...3784884466 (2):
  > package/linux-pam: adjust login pam file for lastlog
  > package/linux-pam: add menuconfig option to build pam_lastlog.so

Fixes #3789

[1] https://github.com/linux-pam/linux-pam/releases/tag/v1.5.3

(cherry picked from commit af7b36e1007981ccd04c75d60ee24e487d836a04)
2025-01-21 22:44:28 +01:00
Jan Čermák
8db3b9f848
Linux: Update kernel to 6.6.73 (#3813)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.72
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.73

(cherry picked from commit 235d7e0a4d8d7800f7c000d6e2a91fcd30254b9b)
2025-01-21 22:43:34 +01:00
Michal Šimek
5a502ca44c
Enable USB-SD convertor on AMD/Xilinx Kria KD240 platform (#3812)
* Enable USB-SD convertor on AMD/Xilinx Kria KD240 platform

Kria KD240 board is using SD card but SD is connected via onboard USB HUB.
USB controller is DWC3 with Xilinx glue logic. Both of these options are
enabled but board is using slg7xl45106 for driving usb-hub reset (PCA9570
driver) and USB3.0 requires initialization via PHY_XILINX_ZYNQMP driver.

All options should be enabled (=y) and can't be kernel modules because
provide access to rootfs.

* Add a note for config symbol change in 6.12

Changed in mainline commit 31e7f6c015d9eb35e77ae9868801c53ab0ff19ac

---------

Co-authored-by: Jan Čermák <sairon@users.noreply.github.com>
(cherry picked from commit 64ee53579b32fae80f02d15b88d1ef4016abc2c0)
2025-01-21 22:43:24 +01:00
Jan Čermák
a9efc21cb5
Bump Buildroot to 2024.02.10 (#3811)
* buildroot 00e8f09356...ff563b383d (1):
  > Merge tag '2024.02.10' into 2024.02.x-haos

(cherry picked from commit a7cdebf03217c7d6b44ff64ab2aa93a7a7fc0237)
2025-01-21 22:43:21 +01:00
dependabot[bot]
ed4463ed97
Bump docker/build-push-action from 6.11.0 to 6.12.0 (#3809)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
(cherry picked from commit a9af9c8d351ccb2281d41023b0420491d96d69b8)
2025-01-21 22:43:17 +01:00
Jan Čermák
8233cb94cd
Fix kernel tainted test (#3818)
I have only tested that it fails for unreleased 6.6.72 kernel but haven't
tested the happy path and missed that it also failed because the types were
different. Stupid me.
2025-01-21 22:41:53 +01:00
Jan Čermák
48bf9b5056
Move rauc.db to boot partition (#3810)
* Move rauc.db to boot partition

The RAUC metadata file contains information that is tightly related to the
system and kernel partitions. With the possibility to migrate data disk, the
rauc.db can contain bogus information when moved to a different system. Removal
of the file on "device wipe" is also not desirable, because the information
about slot status is lost.

Relocate the rauc.db to the boot partition after a system upgrade (as this
can't be handled by RAUC hooks, because it needs to be executed after all slots
and metadata is written) and adjust the script for recreating it. The downside
is that its content in /mnt/data would be recreated if the boot slot is changed
or system downgraded but this should be handled quite gracefully.

Also remove the raucdb-first-boot service which is no longer necessary
with the file not present in the data partition.

* Fix shellcheck and mount path
2025-01-21 18:40:07 +01:00
Jan Čermák
af7b36e100
Fix linux-pam trying to include disabled pam_lastlog.so on login (#3815)
Build of pam_lastlog.so was disabled by updating to v1.5.3 [1] yet the line
wasn't removed from the login modules. In upstream this was resolved by adding
a config option for turning the lastlog module and dynamic disabling of the
line including it. These changes neither a fix removing the config line were
not applied to 2024.02, so cherry-pick them here to fix the issue.

* buildroot ff563b383d...3784884466 (2):
  > package/linux-pam: adjust login pam file for lastlog
  > package/linux-pam: add menuconfig option to build pam_lastlog.so

Fixes #3789

[1] https://github.com/linux-pam/linux-pam/releases/tag/v1.5.3
2025-01-21 18:39:58 +01:00
Jan Čermák
235d7e0a4d
Linux: Update kernel to 6.6.73 (#3813)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.72
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.73
2025-01-21 16:56:05 +01:00
Jan Čermák
ca02ed000b
Add check for tainted kernel to automatic tests (#3814)
Add test that the kernel isn't tainted at the end of the basic and supervisor
test suites, allowing us to catch e.g. kernel warnings that may left unnoticed
if dmesg isn't checked. There is no other source of tainting, so the value
should be always zero.
2025-01-21 16:55:49 +01:00
Michal Šimek
64ee53579b
Enable USB-SD convertor on AMD/Xilinx Kria KD240 platform (#3812)
* Enable USB-SD convertor on AMD/Xilinx Kria KD240 platform

Kria KD240 board is using SD card but SD is connected via onboard USB HUB.
USB controller is DWC3 with Xilinx glue logic. Both of these options are
enabled but board is using slg7xl45106 for driving usb-hub reset (PCA9570
driver) and USB3.0 requires initialization via PHY_XILINX_ZYNQMP driver.

All options should be enabled (=y) and can't be kernel modules because
provide access to rootfs.

* Add a note for config symbol change in 6.12

Changed in mainline commit 31e7f6c015d9eb35e77ae9868801c53ab0ff19ac

---------

Co-authored-by: Jan Čermák <sairon@users.noreply.github.com>
2025-01-21 13:01:12 +01:00
Jan Čermák
a7cdebf032
Bump Buildroot to 2024.02.10 (#3811)
* buildroot 00e8f09356...ff563b383d (1):
  > Merge tag '2024.02.10' into 2024.02.x-haos
2025-01-21 12:42:20 +01:00
dependabot[bot]
a9af9c8d35
Bump docker/build-push-action from 6.11.0 to 6.12.0 (#3809)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-20 14:50:05 +01:00
Jan Čermák
219d7ec530
Fix artifacts index job by downgrading awscli (#3805)
Similarly to #3803, artifact index update fails because the R2 doesn't
like the new awscli. The regression apparently comes from 1.37.0 as
well, so pin to version older than that.
2025-01-17 15:50:21 +01:00
Jan Čermák
267679b192
Bump OS to development version 15.0.dev0 2025-01-17 13:12:50 +01:00
Jan Čermák
07e1cedeb8
Pin awscli to older version to work around R2 issues (#3803)
CI job fails to upload build artifacts because R2 doesn't support
checksums [1]. This was added in awscli 1.37.0 [2], pin to a version
older than that to work around the issue before R2 supports it or
ignores the header.

[1] https://www.cloudflarestatus.com/incidents/t5nrjmpxc1cj
[2] https://github.com/aws/aws-cli/blob/develop/CHANGELOG.rst
2025-01-17 10:03:17 +01:00
Jan Čermák
beafcda863
Bump OS to pre-release version 14.2.rc1 2025-01-16 18:12:43 +01:00
Jan Čermák
6ef7a68a1d
Make usb_modeswitch include directory writable (#3800)
The /etc/usb_modeswitch.d is present and empty but it can't be written to allow
user modification. Bind-mount it like other /etc folders to make it possible to
adjust usb_modeswitch config.

Fixes #3785
2025-01-16 18:11:35 +01:00
Jan Čermák
d9fb660152
Enable ES1371 sound card module for VMWare guests (#3799)
VMWare has option to emulate ES1371 soundcard which supposedly works better
than the default hdaudio. Enable its driver for the OVA image.

Fixes #3778
2025-01-16 18:11:03 +01:00
Michal Šimek
b8b1e255b1
Enable AMD 1-wire AXI IP and Zynq GPIO drivers (#3795)
Zynq GPIO driver is used on AMD/Xilinx Kria platform for ETH phy reset.
Macb and PHY drivers are already enabled.
1 wire IP can be used for reading sensors via PMOD connector.
2025-01-15 18:44:45 +01:00
Jan Čermák
4baca32658
Disable CQE on mmc0 to fix I/O freezes on CM5 (#3793)
Similarly to #3705, enabled CQE triggers I/O freezes usually on the first boot
when the swapfile is being created. While we disabled it for Yellow, with #3782
the issue started to appear on generic CM5 targets with the rpi5-64 image.

In the meantime it was discovered that there seems to be some relation with the
ext4lazyinit task, which happens as a result of data partition resize, yet it's
still unclear if the pattern of the access triggered by the concurrent FS
initialization is somehow responsible, or if another factor comes in play.
Disabling CQE yet makes the issue go away and serves as an acceptable
workaround.
2025-01-15 18:00:56 +01:00
Jan Čermák
f3d83d2650
Linux: Update kernel to 6.6.71 (#3792)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.70
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.71
2025-01-15 17:51:24 +01:00
M. Greyson Christoforo
16eb245f43
Add Mellanox ConnectX-3 NIC support (#3775)
Enable MLX4 kernel options, mainly for OVA and x86.

Co-authored-by: Jan Čermák <sairon@sairon.cz>
2025-01-15 10:31:10 +01:00
Gunjan Gupta
cd04812e9e
Allow boot from USB and NVMe on Khadas VIM3 (#3784)
Use devtype instead of hardcoding device type to mmc in U-Boot script.

Signed-off-by: Gunjan Gupta <gunjan@wesion.com>
2025-01-15 09:59:11 +01:00
dependabot[bot]
c0bf2751c4
Bump docker/build-push-action from 6.10.0 to 6.11.0 (#3791)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-13 14:35:42 +01:00
Jan Čermák
c7e21c0cf2
Add all BCM2712 device trees to RPi 5 image (#3782)
RPi 5 images container only device tree for Pi 5 Model B. Add the other
remaining BCM2712 device trees to enable running on CM5 and other variants
supported upstream.

Fixes #3766
2025-01-09 23:14:00 +01:00
Jan Čermák
f778edfac3
Change RPi bootargs order to keep cgroup memory controller enabled (#3772)
With "cgroup: Use kernel command line to disable memory cgroup" merged to RPi
kernel as 86099de [1], the device tree now contains "cgroup_disable=memory"
parameter. The parameters are parsed in the order defined in the cmdline and
with the previous order, the memory CG ends up disabled. Switching the order
fixes that and makes the order similar to what we get with standard bootloader
and parameters in cmdline.txt only.

The possible downside is that it won't be possible to override parameters from
hardcoded bootargs_hassos using cmdline.txt anymore, however, it's unlikely any
of these parameters will need to be adjusted by users.

Fixes #3765

[1] 86099deff5
2025-01-08 10:58:33 +01:00
Jan Čermák
a842fffa5b
Linux: Update kernel to 6.6.69 (#3773)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.67
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.68
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.69
2025-01-08 10:58:20 +01:00
Jan Čermák
29c8cf8440
Remove Z3FOLD option from Tinker kernel config (#3755)
The z3fold allocator was deprecated with the reasoning explained in [1] and
this patch was backported to stable 6.6.y as well. We enable zsmalloc in shared
hassos.config and the enabled option in the Tinker config was probably just
some remnant from the past.

[1] https://lore.kernel.org/linux-mm/20240904233343.933462-1-yosryahmed@google.com/
2024-12-19 13:59:52 +01:00
Jan Čermák
b02eee1af5
Remove unapplied BRCM_TRACING option from Rockchip kernel config (#3754)
The Rockchip config contained BRCM_TRACING option which had no effect without
TRACING enabled. The option now depends on that option since [1], resulting in
warning in our config checker.

[1] https://lore.kernel.org/lkml/81a29b15eaacc1ac1fb421bdace9ac0c3385f40f.1727179742.git.geert@linux-m68k.org/
2024-12-19 13:59:40 +01:00
Jan Čermák
52774c451c
Merge branch 'main' into dev 2024-12-19 11:43:30 +01:00
Jan Čermák
07159c8225
Bump OS to release version 14.1 2024-12-19 08:09:46 +01:00
Jan Čermák
2c2f88b270
Bump OS to development version 14.2.dev0 2024-12-17 10:43:02 +01:00
Jan Čermák
baa3f7871b
Bump OS to pre-release version 14.1.rc1 2024-12-17 09:26:31 +01:00
Jan Čermák
48edf7a114
Bump Buildroot to 2024.02.9 (#3745)
* buildroot b2077df873...00e8f09356 (1):
  > Merge tag '2024.02.9' into 2024.02.x-haos
2024-12-16 16:53:52 +01:00
Jan Čermák
79a90f81ff
Linux: Update kernel to 6.6.66 (#3744)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.66
2024-12-16 16:47:04 +01:00
dependabot[bot]
bb280e796f
Bump docker/setup-buildx-action from 3.7.1 to 3.8.0 (#3746)
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 3.7.1 to 3.8.0.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v3.7.1...v3.8.0)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-16 15:53:52 +01:00
Jan Čermák
765f4daaa2
Enable TCPMSS target iptables module for all boards (#3739)
The TCPMSS target module for iptables was enabled in some kernel defconfigs but
not for all targets. It is used e.g. in default config of @bigmoby's WireGuard
Client add-on. Enable it globally in the HAOS kernel config to make sure it's
always present.

Fixes #3730
2024-12-12 20:44:30 +01:00
Jan Čermák
c7a9a0b906
Remove existing rauc.db from a data disk on the first boot (#3737)
If data disk is adopted on Yellow using the mechanism added in #3686, it
contains RAUC version information that is very likely invalid. In such case,
remove the file on first boot and have it recreated by the raucdb-update
service.
2024-12-12 20:44:15 +01:00
Jan Čermák
3b0b0312f6
Add Hailo PCIe driver and firmware for x86-64, aarch64 and OVA (#3736)
Hailo modules are usable also in other generic targets, so enable them also on
generic x86 and ARM targets. Runtime tested only on x86-64 (Beelink with Intel
N100).
2024-12-12 20:44:02 +01:00
Jan Čermák
d06aa63e3f
Add Hailo PCIe driver and firmware for Yellow (#3734)
The PCIe card from the RPi AI Kit (and probably other M.2 cards using the
Hailo-8 chip) can be used on Yellow - the driver initializes correctly and
creates a /dev/hailo0 device on Yellow both with CM4 and CM5.
2024-12-12 20:43:38 +01:00
Jan Čermák
70318701ea
Linux: Update kernel to 6.6.65 (#3733)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.65
2024-12-11 19:05:25 +01:00
Jan Čermák
434b83722f
Add HA Yellow image to RPi Imager index update action (#3731)
* Add HA Yellow image to RPi Imager index update action

Update the action to also bump HA Yellow image added in
home-assistant/version#402.

* Sync image name with the current JSON PR
2024-12-11 17:01:47 +01:00
Jan Čermák
e30cf80066
Compile hailo_pci module from original sources on RPi 5 (#3732)
Instead of using in-tree module on RPi 5, build it as a module from the
original sources. This will give us better control over the version used and
will also allow us for easier way to add the module to other platforms.

This also makes 017d172 unnecessary anymore.
2024-12-11 15:13:20 +01:00
Jan Čermák
2b30e2bf53
Linux: Update kernel to 6.6.64 (#3728)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.64
2024-12-09 20:01:36 +01:00
Jan Čermák
017d17291d
Fix Hailo-8 firmware path expected since driver v4.19.0 (#3721)
The new driver now expects the firmware file to contain version number, adjust
the path and remove unnecessary makefile step.
2024-12-06 15:17:32 +01:00
Jan Čermák
ce1e261fa4
Bump RPi SDIO WiFi firmware to latest version (#3719)
* buildroot c65b0306bb...b2077df873 (1):
  > package/brcmfmac_sdio-firmware-rpi: bump version to 4c1789e

Raspberry Pi kernel 6.6 driver for BCM43455 (used in RPi 3B+/4B) calls new API
which uses the DUMP_OBSS feature for channel selection. If it's not preset, it
results in drivers reporting errors, e.g.:

brcmf_set_channel: set chanspec 0xd099 fail, reason -52

The RPi OS firmware was updated but the package we use for this firmware
contains an old version that lacks this support. Update to latest version
synced from RPi upstream to fix the issues. The root cause is explained in [1]
by @ragazenta. Both disabling the DUMP_OBSS and updating the firmware makes the
errors go away.

[1] https://github.com/raspberrypi/linux/issues/6049#issuecomment-2485431104

Fixes #3367
2024-12-05 21:29:29 +01:00
Jan Čermák
4229332cc7
Bump Hailo-8 firmware to 4.19.0 for RPi kernel 6.6.62 (#3716)
Kernel bump in #3715 contains update of the driver to version 4.19.0 - bump the
firmware version to match it.
2024-12-04 18:27:50 +01:00
Jan Čermák
0a4114db3e
RaspberryPi: Update kernel to 6.6.62 - dd2394360860d15146c96635796a75b05bb32b61 (#3715)
* RaspberryPi: Update kernel to 6.6.62 - dd2394360860d15146c96635796a75b05bb32b61

* Bump buildroot to update rpi-firmware

* buildroot 1d7407c66b...c65b0306bb (1):
  > package/rpi-firmware: bump to version 1.20241126 for kernel 6.6.62
2024-12-04 18:26:00 +01:00
Jan Čermák
91079a0cc6
Merge branch 'main' into dev 2024-12-03 19:29:39 +01:00
Jan Čermák
2ac3fceaf4
Bump OS to release version 14.0 2024-12-03 14:16:01 +01:00
Jan Čermák
9d643edb54
Disable CM5's RTC to make Yellow's on-board RTC the primary one (#3706)
With both RTCs enabled, the rpi_rtc is probed as the first one, making the
on-board RTC unused by default. Since the CM5's RTC peripheral can't be used on
Yellow, as the VBAT pin is not connected, disable it completely to fix RTC.
2024-12-02 17:47:40 +01:00
dependabot[bot]
e0ccf398f2
Bump docker/build-push-action from 6.9.0 to 6.10.0 (#3704)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.9.0 to 6.10.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v6.9.0...v6.10.0)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-02 16:47:20 +01:00
Jan Čermák
c514d6b482
Disable CQE on mmc0 to fix I/O freezes on Yellow+CM5 (#3705)
The I/O operations on the eMMC can sometimes fail and lock up completely, and
disabling CQE on the sdio1 (mmc0) interface seems to solve the issue. While it
is a known (and potentially resolved) issue [1] for SD cards in Raspberry Pi's
Linux fork, it is not acknowledged neither resolved for CM5's eMMC. With CQE
enabled, the device usually locks up within the first 10 first boots, when the
swap file is being created. After disabling CQE, no error occurred after more
that 100 cold boots (every time with swap file removed).

[1] https://github.com/raspberrypi/linuxissues/6349
2024-12-02 16:45:35 +01:00
Jan Čermák
489de0b2fb
Reduce time of mmc0 interface random hangs on Yellow+CM5 boot (#3700)
For yet unknown root cause, the eMMC interface sometimes fails to initialize
properly, delaying boot for up to 130 seconds. This can be reduced by ~100s by
disabling SD and SDIO modes on the sdio1 interface used for mmc0 before a
better patch is found.
2024-12-02 15:19:38 +01:00
Jan Čermák
22dd060183
Linux: Update kernel to 6.6.63 (#3697)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.63
2024-11-25 17:49:13 +01:00
Jan Čermák
d57e507764
Enable Cypress M8 USB serial driver for all targets (#3693)
Build cypress_m8 driver as module for all targets - some of them had it in
their base defconfig while some not. It is required e.g. for UPB PIM (Powerline
Interface Module).

Fixes #3690
2024-11-22 13:56:49 +01:00
Jan Čermák
b288cd212a
Sync Yellow's DTS with plain CM5 device tree (#3688)
Sync the DTS with changes added in newer commits merged after the initial
Yellow/CM5 DTS was written. The sdio1 node now has HS400 mode enabled and
sd_io_1v8_reg has been changed to regulator-fixed.
2024-11-21 19:42:58 +01:00
Jan Čermák
98ac7f0170
Always use NVMe datadisk on Yellow if it's present on first boot (#3686)
If HAOS on Yellow is booted for the first time with NVMe data disk present, it
should be preferred over the empty eMMC data partition. This will ease
reinstall of the system and migration from CM4 to CM5. All other data disks
(e.g. if a USB drive is used for them) are still treated as before, requiring
manual adoption using the Supervisor repair.
2024-11-21 19:42:26 +01:00
@RubenKelevra
a042dc01d2
Disable UAS via usb-storage.quirks on RPi for JMicron JMS583
Vendor ID: 152d
Product ID: a583

fixes #3674
2024-11-21 19:07:41 +01:00
Jan Čermák
af833dbc9f
Bump OS to development version 14.1.dev0 2024-11-19 16:06:02 +01:00
193 changed files with 2904 additions and 5825 deletions

View File

@ -83,6 +83,7 @@ runs:
bump_entry /tmp/version/rpi-imager-haos.json "$INPUTS_VERSION" "${{ steps.validate-input.outputs.date }}" "rpi3-64" "RPi 3"
bump_entry /tmp/version/rpi-imager-haos.json "$INPUTS_VERSION" "${{ steps.validate-input.outputs.date }}" "rpi4-64" "RPi 4/400"
bump_entry /tmp/version/rpi-imager-haos.json "$INPUTS_VERSION" "${{ steps.validate-input.outputs.date }}" "rpi5-64" "RPi 5"
bump_entry /tmp/version/rpi-imager-haos.json "$INPUTS_VERSION" "${{ steps.validate-input.outputs.date }}" "yellow" "Yellow"
- shell: bash
env:

View File

@ -31,7 +31,7 @@ on:
required: true
env:
PYTHON_VERSION: "3.10"
PYTHON_VERSION: "3.13"
jobs:
build-index:
@ -49,7 +49,7 @@ jobs:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install AWS CLI
run: pip install awscli
run: pip install 'awscli<1.37.0'
- name: Create build index
env:

View File

@ -18,7 +18,7 @@ on:
default: true
env:
PYTHON_VERSION: "3.10"
PYTHON_VERSION: "3.13"
jobs:
prepare:
@ -136,15 +136,15 @@ jobs:
}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.7.1
uses: docker/setup-buildx-action@v3.10.0
- name: Log in to the GitHub container registry
uses: docker/login-action@v3.3.0
uses: docker/login-action@v3.4.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push
uses: docker/build-push-action@v6.10.0
uses: docker/build-push-action@v6.15.0
id: build_haos_builder
with:
context: .
@ -199,7 +199,7 @@ jobs:
- name: Install AWS CLI
if: ${{ github.event_name != 'release' && needs.prepare.outputs.publish_build == 'true' }}
run: pip install awscli
run: pip install 'awscli<1.37.0'
- name: Set version suffix
if: ${{ github.event_name != 'release' }}

25
.github/workflows/lock.yml vendored Normal file
View File

@ -0,0 +1,25 @@
name: Lock
on:
schedule:
- cron: "45 5 * * *"
permissions:
discussions: write
issues: write
pull-requests: write
jobs:
lock:
if: github.repository_owner == 'home-assistant'
runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@v5.0.1
with:
github-token: ${{ github.token }}
issue-inactive-days: "30"
exclude-issue-created-before: "2025-01-01T00:00:00Z"
issue-lock-reason: ""
pr-inactive-days: "7"
exclude-pr-created-before: "2025-01-01T00:00:00Z"
pr-lock-reason: ""

View File

@ -19,7 +19,7 @@ jobs:
# - No PRs marked as no-stale or pinned
# - No issues marked as no-stale, help-wanted or pinned
- name: 90 days stale issues & PRs policy
uses: actions/stale@v9.0.0
uses: actions/stale@v9.1.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 90

View File

@ -74,7 +74,7 @@ jobs:
- name: Run tests
run: |
./tests/run_tests.sh
./tests/run_tests.sh --durations=0 --durations-min=5.0
- name: Archive logs
uses: actions/upload-artifact@v4

View File

@ -21,6 +21,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
# Build tools
RUN apt-get update && apt-get install -y --no-install-recommends \
automake \
bash \
bc \
binutils \
@ -30,6 +31,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
file \
git \
graphviz \
help2man \
jq \
make \
ncurses-dev \
@ -43,6 +45,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
rsync \
skopeo \
sudo \
texinfo \
unzip \
vim \
wget \

View File

@ -3,22 +3,22 @@
| Board | Version |
|-------|---------|
| Open Virtual Appliance | 6.6.63 |
| Raspberry Pi | 6.6.51 |
| Raspberry Pi 0-W | 6.6.51 |
| Raspberry Pi 2 | 6.6.51 |
| Raspberry Pi 3 | 6.6.51 |
| Raspberry Pi 4 | 6.6.51 |
| Raspberry Pi 5 | 6.6.51 |
| Home Assistant Yellow | 6.6.51 |
| Home Assistant Green | 6.6.63 |
| Tinker Board | 6.6.63 |
| ODROID-C2 | 6.6.63 |
| ODROID-C4 | 6.6.63 |
| ODROID-M1 | 6.6.63 |
| ODROID-M1S | 6.6.63 |
| ODROID-N2 | 6.6.63 |
| ODROID-XU4 | 6.6.63 |
| Generic aarch64 | 6.6.63 |
| Generic x86-64 | 6.6.63 |
| Khadas VIM3 | 6.6.63 |
| Open Virtual Appliance | 6.12.23 |
| Raspberry Pi | 6.6.74 |
| Raspberry Pi 0-W | 6.6.74 |
| Raspberry Pi 2 | 6.6.74 |
| Raspberry Pi 3 | 6.6.74 |
| Raspberry Pi 4 | 6.6.74 |
| Raspberry Pi 5 | 6.6.74 |
| Home Assistant Yellow | 6.6.74 |
| Home Assistant Green | 6.12.23 |
| Tinker Board | 6.12.23 |
| ODROID-C2 | 6.12.23 |
| ODROID-C4 | 6.12.23 |
| ODROID-M1 | 6.12.23 |
| ODROID-M1S | 6.12.23 |
| ODROID-N2 | 6.12.23 |
| ODROID-XU4 | 6.12.23 |
| Generic aarch64 | 6.12.23 |
| Generic x86-64 | 6.12.23 |
| Khadas VIM3 | 6.12.23 |

@ -1 +1 @@
Subproject commit 1d7407c66b22a34a6ac9b896a10c55fc4b9f2521
Subproject commit ead21eb6d24055317b7281b1a8e7d1d6e809313b

View File

@ -3,6 +3,7 @@ source "$BR2_EXTERNAL_HASSOS_PATH/package/eq3_char_loop/Config.in"
source "$BR2_EXTERNAL_HASSOS_PATH/package/gasket/Config.in"
source "$BR2_EXTERNAL_HASSOS_PATH/package/generic_raw_uart/Config.in"
source "$BR2_EXTERNAL_HASSOS_PATH/package/hailo8-firmware/Config.in"
source "$BR2_EXTERNAL_HASSOS_PATH/package/hailo-pci/Config.in"
source "$BR2_EXTERNAL_HASSOS_PATH/package/hardkernel-boot/Config.in"
source "$BR2_EXTERNAL_HASSOS_PATH/package/hassio/Config.in"
source "$BR2_EXTERNAL_HASSOS_PATH/package/khadas-boot/Config.in"

View File

@ -57,3 +57,21 @@ CONFIG_PCI_HYPERV_INTERFACE=m
CONFIG_FB_HYPERV=y
CONFIG_I6300ESB_WDT=y
# GPIO support
CONFIG_GPIO_ZYNQ=y
CONFIG_GPIO_PCA9570=y
# PHY drivers
CONFIG_PHY_XILINX_ZYNQMP=y
# USB support
CONFIG_USB_ONBOARD_DEV=y
CONFIG_USB_ONBOARD_DEV_USB5744=y
# i2c support
CONFIG_I2C_CADENCE=y
# 1-wire
CONFIG_W1_MASTER_AMD_AXI=m
CONFIG_W1_SLAVE_THERM=m

View File

@ -0,0 +1,154 @@
From f0fb974644a132ecc4bd2dc5cce9622435d0ec13 Mon Sep 17 00:00:00 2001
From: Heiner Kallweit <hkallweit1@gmail.com>
Date: Thu, 24 Oct 2024 22:42:33 +0200
Subject: [PATCH] r8169: add support for RTL8125D
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This adds support for new chip version RTL8125D, which can be found on
boards like Gigabyte X870E AORUS ELITE WIFI7. Firmware rtl8125d-1.fw
for this chip version is available in linux-firmware already.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/d0306912-e88e-4c25-8b5d-545ae8834c0c@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Upstream: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=f75d1fbe7809bc5ed134204b920fd9e2fc5db1df
Signed-off-by: Jan Čermák <sairon@sairon.cz>
---
drivers/net/ethernet/realtek/r8169.h | 1 +
drivers/net/ethernet/realtek/r8169_main.c | 23 +++++++++++++------
.../net/ethernet/realtek/r8169_phy_config.c | 10 ++++++++
3 files changed, 27 insertions(+), 7 deletions(-)
diff --git a/drivers/net/ethernet/realtek/r8169.h b/drivers/net/ethernet/realtek/r8169.h
index e2db944e6fa8b..be4c9622618d8 100644
--- a/drivers/net/ethernet/realtek/r8169.h
+++ b/drivers/net/ethernet/realtek/r8169.h
@@ -68,6 +68,7 @@ enum mac_version {
/* support for RTL_GIGA_MAC_VER_60 has been removed */
RTL_GIGA_MAC_VER_61,
RTL_GIGA_MAC_VER_63,
+ RTL_GIGA_MAC_VER_64,
RTL_GIGA_MAC_VER_65,
RTL_GIGA_MAC_VER_66,
RTL_GIGA_MAC_NONE
diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
index 5ed2818bac257..1cbde7ebd6f30 100644
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -55,6 +55,7 @@
#define FIRMWARE_8107E_2 "rtl_nic/rtl8107e-2.fw"
#define FIRMWARE_8125A_3 "rtl_nic/rtl8125a-3.fw"
#define FIRMWARE_8125B_2 "rtl_nic/rtl8125b-2.fw"
+#define FIRMWARE_8125D_1 "rtl_nic/rtl8125d-1.fw"
#define FIRMWARE_8126A_2 "rtl_nic/rtl8126a-2.fw"
#define FIRMWARE_8126A_3 "rtl_nic/rtl8126a-3.fw"
@@ -138,6 +139,7 @@ static const struct {
[RTL_GIGA_MAC_VER_61] = {"RTL8125A", FIRMWARE_8125A_3},
/* reserve 62 for CFG_METHOD_4 in the vendor driver */
[RTL_GIGA_MAC_VER_63] = {"RTL8125B", FIRMWARE_8125B_2},
+ [RTL_GIGA_MAC_VER_64] = {"RTL8125D", FIRMWARE_8125D_1},
[RTL_GIGA_MAC_VER_65] = {"RTL8126A", FIRMWARE_8126A_2},
[RTL_GIGA_MAC_VER_66] = {"RTL8126A", FIRMWARE_8126A_3},
};
@@ -707,6 +709,7 @@ MODULE_FIRMWARE(FIRMWARE_8168FP_3);
MODULE_FIRMWARE(FIRMWARE_8107E_2);
MODULE_FIRMWARE(FIRMWARE_8125A_3);
MODULE_FIRMWARE(FIRMWARE_8125B_2);
+MODULE_FIRMWARE(FIRMWARE_8125D_1);
MODULE_FIRMWARE(FIRMWARE_8126A_2);
MODULE_FIRMWARE(FIRMWARE_8126A_3);
@@ -2098,10 +2101,7 @@ static void rtl_set_eee_txidle_timer(struct rtl8169_private *tp)
tp->tx_lpi_timer = timer_val;
r8168_mac_ocp_write(tp, 0xe048, timer_val);
break;
- case RTL_GIGA_MAC_VER_61:
- case RTL_GIGA_MAC_VER_63:
- case RTL_GIGA_MAC_VER_65:
- case RTL_GIGA_MAC_VER_66:
+ case RTL_GIGA_MAC_VER_61 ... RTL_GIGA_MAC_VER_66:
tp->tx_lpi_timer = timer_val;
RTL_W16(tp, EEE_TXIDLE_TIMER_8125, timer_val);
break;
@@ -2233,6 +2233,9 @@ static enum mac_version rtl8169_get_mac_version(u16 xid, bool gmii)
{ 0x7cf, 0x64a, RTL_GIGA_MAC_VER_66 },
{ 0x7cf, 0x649, RTL_GIGA_MAC_VER_65 },
+ /* 8125D family. */
+ { 0x7cf, 0x688, RTL_GIGA_MAC_VER_64 },
+
/* 8125B family. */
{ 0x7cf, 0x641, RTL_GIGA_MAC_VER_63 },
@@ -2500,9 +2503,7 @@ static void rtl_init_rxcfg(struct rtl8169_private *tp)
case RTL_GIGA_MAC_VER_61:
RTL_W32(tp, RxConfig, RX_FETCH_DFLT_8125 | RX_DMA_BURST);
break;
- case RTL_GIGA_MAC_VER_63:
- case RTL_GIGA_MAC_VER_65:
- case RTL_GIGA_MAC_VER_66:
+ case RTL_GIGA_MAC_VER_63 ... RTL_GIGA_MAC_VER_66:
RTL_W32(tp, RxConfig, RX_FETCH_DFLT_8125 | RX_DMA_BURST |
RX_PAUSE_SLOT_ON);
break;
@@ -3814,6 +3815,12 @@ static void rtl_hw_start_8125b(struct rtl8169_private *tp)
rtl_hw_start_8125_common(tp);
}
+static void rtl_hw_start_8125d(struct rtl8169_private *tp)
+{
+ rtl_set_def_aspm_entry_latency(tp);
+ rtl_hw_start_8125_common(tp);
+}
+
static void rtl_hw_start_8126a(struct rtl8169_private *tp)
{
rtl_set_def_aspm_entry_latency(tp);
@@ -3862,6 +3869,7 @@ static void rtl_hw_config(struct rtl8169_private *tp)
[RTL_GIGA_MAC_VER_53] = rtl_hw_start_8117,
[RTL_GIGA_MAC_VER_61] = rtl_hw_start_8125a_2,
[RTL_GIGA_MAC_VER_63] = rtl_hw_start_8125b,
+ [RTL_GIGA_MAC_VER_64] = rtl_hw_start_8125d,
[RTL_GIGA_MAC_VER_65] = rtl_hw_start_8126a,
[RTL_GIGA_MAC_VER_66] = rtl_hw_start_8126a,
};
@@ -3879,6 +3887,7 @@ static void rtl_hw_start_8125(struct rtl8169_private *tp)
/* disable interrupt coalescing */
switch (tp->mac_version) {
case RTL_GIGA_MAC_VER_61:
+ case RTL_GIGA_MAC_VER_64:
for (i = 0xa00; i < 0xb00; i += 4)
RTL_W32(tp, i, 0);
break;
diff --git a/drivers/net/ethernet/realtek/r8169_phy_config.c b/drivers/net/ethernet/realtek/r8169_phy_config.c
index cf29b12084826..d09b2a41cd062 100644
--- a/drivers/net/ethernet/realtek/r8169_phy_config.c
+++ b/drivers/net/ethernet/realtek/r8169_phy_config.c
@@ -1104,6 +1104,15 @@ static void rtl8125b_hw_phy_config(struct rtl8169_private *tp,
rtl8125b_config_eee_phy(phydev);
}
+static void rtl8125d_hw_phy_config(struct rtl8169_private *tp,
+ struct phy_device *phydev)
+{
+ r8169_apply_firmware(tp);
+ rtl8125_legacy_force_mode(phydev);
+ rtl8168g_disable_aldps(phydev);
+ rtl8125b_config_eee_phy(phydev);
+}
+
static void rtl8126a_hw_phy_config(struct rtl8169_private *tp,
struct phy_device *phydev)
{
@@ -1160,6 +1169,7 @@ void r8169_hw_phy_config(struct rtl8169_private *tp, struct phy_device *phydev,
[RTL_GIGA_MAC_VER_53] = rtl8117_hw_phy_config,
[RTL_GIGA_MAC_VER_61] = rtl8125a_2_hw_phy_config,
[RTL_GIGA_MAC_VER_63] = rtl8125b_hw_phy_config,
+ [RTL_GIGA_MAC_VER_64] = rtl8125d_hw_phy_config,
[RTL_GIGA_MAC_VER_65] = rtl8126a_hw_phy_config,
[RTL_GIGA_MAC_VER_66] = rtl8126a_hw_phy_config,
};

View File

@ -0,0 +1,143 @@
From acc8d5ec4b6cdbf0a9625a9f9d3710b52555f3b2 Mon Sep 17 00:00:00 2001
From: Heiner Kallweit <hkallweit1@gmail.com>
Date: Tue, 15 Oct 2024 07:47:14 +0200
Subject: [PATCH] net: phy: realtek: merge the drivers for internal NBase-T
PHY's
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The Realtek RTL8125/RTL8126 NBase-T MAC/PHY chips have internal PHY's
which are register-compatible, at least for the registers we use here.
So let's use just one PHY driver to support all of them.
These internal PHY's exist also as external C45 PHY's, but on the
internal PHY's no access to MMD registers is possible. This can be
used to differentiate between the internal and external version.
As a side effect the drivers for two now external-only drivers don't
require read_mmd/write_mmd hooks any longer.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Link: https://patch.msgid.link/c57081a6-811f-4571-ab35-34f4ca6de9af@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Upstream: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=f87a17ed3b51fba4dfdd8f8b643b5423a85fc551
Signed-off-by: Jan Čermák <sairon@sairon.cz>
---
drivers/net/phy/realtek.c | 53 +++++++++++++++++++++++++++++++--------
1 file changed, 43 insertions(+), 10 deletions(-)
diff --git a/drivers/net/phy/realtek.c b/drivers/net/phy/realtek.c
index 166f6a7283731..830a0d337de5d 100644
--- a/drivers/net/phy/realtek.c
+++ b/drivers/net/phy/realtek.c
@@ -92,6 +92,7 @@
#define RTL_GENERIC_PHYID 0x001cc800
#define RTL_8211FVD_PHYID 0x001cc878
+#define RTL_8221B 0x001cc840
#define RTL_8221B_VB_CG 0x001cc849
#define RTL_8221B_VN_CG 0x001cc84a
#define RTL_8251B 0x001cc862
@@ -1040,6 +1041,23 @@ static bool rtlgen_supports_2_5gbps(struct phy_device *phydev)
return val >= 0 && val & MDIO_PMA_SPEED_2_5G;
}
+/* On internal PHY's MMD reads over C22 always return 0.
+ * Check a MMD register which is known to be non-zero.
+ */
+static bool rtlgen_supports_mmd(struct phy_device *phydev)
+{
+ int val;
+
+ phy_lock_mdio_bus(phydev);
+ __phy_write(phydev, MII_MMD_CTRL, MDIO_MMD_PCS);
+ __phy_write(phydev, MII_MMD_DATA, MDIO_PCS_EEE_ABLE);
+ __phy_write(phydev, MII_MMD_CTRL, MDIO_MMD_PCS | MII_MMD_CTRL_NOINCR);
+ val = __phy_read(phydev, MII_MMD_DATA);
+ phy_unlock_mdio_bus(phydev);
+
+ return val > 0;
+}
+
static int rtlgen_match_phy_device(struct phy_device *phydev)
{
return phydev->phy_id == RTL_GENERIC_PHYID &&
@@ -1049,7 +1067,8 @@ static int rtlgen_match_phy_device(struct phy_device *phydev)
static int rtl8226_match_phy_device(struct phy_device *phydev)
{
return phydev->phy_id == RTL_GENERIC_PHYID &&
- rtlgen_supports_2_5gbps(phydev);
+ rtlgen_supports_2_5gbps(phydev) &&
+ rtlgen_supports_mmd(phydev);
}
static int rtlgen_is_c45_match(struct phy_device *phydev, unsigned int id,
@@ -1061,6 +1080,11 @@ static int rtlgen_is_c45_match(struct phy_device *phydev, unsigned int id,
return !is_c45 && (id == phydev->phy_id);
}
+static int rtl8221b_match_phy_device(struct phy_device *phydev)
+{
+ return phydev->phy_id == RTL_8221B && rtlgen_supports_mmd(phydev);
+}
+
static int rtl8221b_vb_cg_c22_match_phy_device(struct phy_device *phydev)
{
return rtlgen_is_c45_match(phydev, RTL_8221B_VB_CG, false);
@@ -1081,9 +1105,21 @@ static int rtl8221b_vn_cg_c45_match_phy_device(struct phy_device *phydev)
return rtlgen_is_c45_match(phydev, RTL_8221B_VN_CG, true);
}
-static int rtl8251b_c22_match_phy_device(struct phy_device *phydev)
+static int rtl_internal_nbaset_match_phy_device(struct phy_device *phydev)
{
- return rtlgen_is_c45_match(phydev, RTL_8251B, false);
+ if (phydev->is_c45)
+ return false;
+
+ switch (phydev->phy_id) {
+ case RTL_GENERIC_PHYID:
+ case RTL_8221B:
+ case RTL_8251B:
+ break;
+ default:
+ return false;
+ }
+
+ return rtlgen_supports_2_5gbps(phydev) && !rtlgen_supports_mmd(phydev);
}
static int rtl8251b_c45_match_phy_device(struct phy_device *phydev)
@@ -1345,10 +1381,8 @@ static struct phy_driver realtek_drvs[] = {
.resume = rtlgen_resume,
.read_page = rtl821x_read_page,
.write_page = rtl821x_write_page,
- .read_mmd = rtl822x_read_mmd,
- .write_mmd = rtl822x_write_mmd,
}, {
- PHY_ID_MATCH_EXACT(0x001cc840),
+ .match_phy_device = rtl8221b_match_phy_device,
.name = "RTL8226B_RTL8221B 2.5Gbps PHY",
.get_features = rtl822x_get_features,
.config_aneg = rtl822x_config_aneg,
@@ -1359,8 +1393,6 @@ static struct phy_driver realtek_drvs[] = {
.resume = rtlgen_resume,
.read_page = rtl821x_read_page,
.write_page = rtl821x_write_page,
- .read_mmd = rtl822x_read_mmd,
- .write_mmd = rtl822x_write_mmd,
}, {
PHY_ID_MATCH_EXACT(0x001cc838),
.name = "RTL8226-CG 2.5Gbps PHY",
@@ -1438,8 +1470,9 @@ static struct phy_driver realtek_drvs[] = {
.read_page = rtl821x_read_page,
.write_page = rtl821x_write_page,
}, {
- .match_phy_device = rtl8251b_c22_match_phy_device,
- .name = "RTL8126A-internal 5Gbps PHY",
+ .match_phy_device = rtl_internal_nbaset_match_phy_device,
+ .name = "Realtek Internal NBASE-T PHY",
+ .flags = PHY_IS_INTERNAL,
.get_features = rtl822x_get_features,
.config_aneg = rtl822x_config_aneg,
.read_status = rtl822x_read_status,

View File

@ -0,0 +1,36 @@
From 7ab842c714924784cae4b6ab229997905b096b4f Mon Sep 17 00:00:00 2001
From: Heiner Kallweit <hkallweit1@gmail.com>
Date: Thu, 17 Oct 2024 18:01:13 +0200
Subject: [PATCH] net: phy: realtek: add RTL8125D-internal PHY
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The first boards show up with Realtek's RTL8125D. This MAC/PHY chip
comes with an integrated 2.5Gbps PHY with ID 0x001cc841. It's not
clear yet whether there's an external version of this PHY and how
Realtek calls it, therefore use the numeric id for now.
Link: https://lore.kernel.org/netdev/2ada65e1-5dfa-456c-9334-2bc51272e9da@gmail.com/T/
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Message-ID: <7d2924de-053b-44d2-a479-870dc3878170@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Upstream: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=8989bad541133c43550bff2b80edbe37b8fb9659
Signed-off-by: Jan Čermák <sairon@sairon.cz>
---
drivers/net/phy/realtek.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/phy/realtek.c b/drivers/net/phy/realtek.c
index 830a0d337de5d..8ce5705af69c5 100644
--- a/drivers/net/phy/realtek.c
+++ b/drivers/net/phy/realtek.c
@@ -1114,6 +1114,7 @@ static int rtl_internal_nbaset_match_phy_device(struct phy_device *phydev)
case RTL_GENERIC_PHYID:
case RTL_8221B:
case RTL_8251B:
+ case 0x001cc841:
break;
default:
return false;

View File

@ -71,7 +71,6 @@ CONFIG_ZSWAP_DEFAULT_ON=y
CONFIG_ZSWAP_COMPRESSOR_DEFAULT_LZ4=y
CONFIG_ZSWAP_ZPOOL_DEFAULT_ZSMALLOC=y
CONFIG_ZBUD=y
CONFIG_Z3FOLD=y
# CONFIG_COMPAT_BRK is not set
CONFIG_KSM=y
CONFIG_CMA=y
@ -217,7 +216,6 @@ CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
CONFIG_NETFILTER_XT_TARGET_TEE=m
CONFIG_NETFILTER_XT_TARGET_TPROXY=m
CONFIG_NETFILTER_XT_TARGET_SECMARK=m
CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=m
CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=y
CONFIG_NETFILTER_XT_MATCH_BPF=m
@ -394,9 +392,6 @@ CONFIG_VLAN_8021Q=m
CONFIG_VLAN_8021Q_GVRP=y
CONFIG_VLAN_8021Q_MVRP=y
CONFIG_ATALK=m
CONFIG_DEV_APPLETALK=m
CONFIG_IPDDP=m
CONFIG_IPDDP_ENCAP=y
CONFIG_6LOWPAN=m
CONFIG_NET_SCHED=y
CONFIG_NET_SCH_HTB=m
@ -452,7 +447,6 @@ CONFIG_NET_ACT_GACT=m
CONFIG_GACT_PROB=y
CONFIG_NET_ACT_MIRRED=m
CONFIG_NET_ACT_SAMPLE=m
CONFIG_NET_ACT_IPT=m
CONFIG_NET_ACT_NAT=m
CONFIG_NET_ACT_PEDIT=m
CONFIG_NET_ACT_SIMP=m
@ -649,9 +643,6 @@ CONFIG_ATH10K_USB=m
CONFIG_WCN36XX=m
CONFIG_AT76C50X_USB=m
CONFIG_BRCMFMAC=m
CONFIG_HOSTAP=y
CONFIG_HOSTAP_FIRMWARE=y
CONFIG_HOSTAP_FIRMWARE_NVRAM=y
# CONFIG_WLAN_VENDOR_MARVELL is not set
CONFIG_MT7601U=m
# CONFIG_WLAN_VENDOR_MICROCHIP is not set
@ -669,9 +660,7 @@ CONFIG_RTL8192CU=m
CONFIG_RTL8XXXU=m
# CONFIG_WLAN_VENDOR_ST is not set
# CONFIG_WLAN_VENDOR_TI is not set
CONFIG_USB_ZD1201=m
CONFIG_ZD1211RW=m
CONFIG_USB_NET_RNDIS_WLAN=m
CONFIG_NET_FAILOVER=m
CONFIG_INPUT_MATRIXKMAP=y
CONFIG_INPUT_JOYDEV=y
@ -1497,7 +1486,6 @@ CONFIG_CUSE=m
CONFIG_OVERLAY_FS=y
CONFIG_FSCACHE=y
CONFIG_FSCACHE_STATS=y
CONFIG_CACHEFILES=y
CONFIG_ISO9660_FS=m
CONFIG_JOLIET=y
CONFIG_ZISOFS=y
@ -1505,7 +1493,6 @@ CONFIG_UDF_FS=m
CONFIG_MSDOS_FS=y
CONFIG_VFAT_FS=y
CONFIG_NTFS_FS=m
CONFIG_NTFS_RW=y
CONFIG_TMPFS=y
CONFIG_TMPFS_POSIX_ACL=y
CONFIG_ECRYPT_FS=m
@ -1529,7 +1516,6 @@ CONFIG_NFS_SWAP=y
CONFIG_NFS_V4_1=y
CONFIG_NFS_V4_2=y
CONFIG_ROOT_NFS=y
CONFIG_NFS_FSCACHE=y
CONFIG_NFSD=m
CONFIG_NFSD_V3_ACL=y
CONFIG_NFSD_V4=y
@ -1573,7 +1559,6 @@ CONFIG_CRYPTO_TEA=m
CONFIG_CRYPTO_TWOFISH=m
CONFIG_CRYPTO_ARC4=m
CONFIG_CRYPTO_CHACHA20=m
CONFIG_CRYPTO_CFB=m
CONFIG_CRYPTO_CTS=m
CONFIG_CRYPTO_KEYWRAP=m
CONFIG_CRYPTO_LRW=m

View File

@ -1,4 +1,4 @@
From b4d676729c5bee4b9adb85362f6f2e32f833b6c2 Mon Sep 17 00:00:00 2001
From 675fbbc309e4f7c805cf4fbd7c463cfc8308b54e Mon Sep 17 00:00:00 2001
From: Stefan Agner <stefan@agner.ch>
Date: Wed, 17 Feb 2021 19:55:41 +0100
Subject: [PATCH] Revert "ARM: dts: rockchip: use DMA channels for UARTs for
@ -10,10 +10,10 @@ This reverts commit 3425fe335c29310f6628faf9a7947d07f32d8962.
1 file changed, 8 deletions(-)
diff --git a/arch/arm/boot/dts/rockchip/rk3288.dtsi b/arch/arm/boot/dts/rockchip/rk3288.dtsi
index cb9cdaddffd4..51f1273d6beb 100644
index 3f1d640afafae..becf3abd8367f 100644
--- a/arch/arm/boot/dts/rockchip/rk3288.dtsi
+++ b/arch/arm/boot/dts/rockchip/rk3288.dtsi
@@ -378,8 +378,6 @@ uart0: serial@ff180000 {
@@ -387,8 +387,6 @@ uart0: serial@ff180000 {
reg-io-width = <4>;
clocks = <&cru SCLK_UART0>, <&cru PCLK_UART0>;
clock-names = "baudclk", "apb_pclk";
@ -22,7 +22,7 @@ index cb9cdaddffd4..51f1273d6beb 100644
pinctrl-names = "default";
pinctrl-0 = <&uart0_xfer>;
status = "disabled";
@@ -393,8 +391,6 @@ uart1: serial@ff190000 {
@@ -402,8 +400,6 @@ uart1: serial@ff190000 {
reg-io-width = <4>;
clocks = <&cru SCLK_UART1>, <&cru PCLK_UART1>;
clock-names = "baudclk", "apb_pclk";
@ -31,7 +31,7 @@ index cb9cdaddffd4..51f1273d6beb 100644
pinctrl-names = "default";
pinctrl-0 = <&uart1_xfer>;
status = "disabled";
@@ -421,8 +417,6 @@ uart3: serial@ff1b0000 {
@@ -430,8 +426,6 @@ uart3: serial@ff1b0000 {
reg-io-width = <4>;
clocks = <&cru SCLK_UART3>, <&cru PCLK_UART3>;
clock-names = "baudclk", "apb_pclk";
@ -40,7 +40,7 @@ index cb9cdaddffd4..51f1273d6beb 100644
pinctrl-names = "default";
pinctrl-0 = <&uart3_xfer>;
status = "disabled";
@@ -436,8 +430,6 @@ uart4: serial@ff1c0000 {
@@ -445,8 +439,6 @@ uart4: serial@ff1c0000 {
reg-io-width = <4>;
clocks = <&cru SCLK_UART4>, <&cru PCLK_UART4>;
clock-names = "baudclk", "apb_pclk";

View File

@ -1,4 +1,4 @@
From 02c7d9bb23f497993d52f5a41341ed955e6a2745 Mon Sep 17 00:00:00 2001
From 37b4467356113f17f55066aef54db55b64daa030 Mon Sep 17 00:00:00 2001
From: "Miouyouyou (Myy)" <myy@miouyouyou.fr>
Date: Mon, 5 Nov 2018 22:15:14 +0100
Subject: [PATCH] ARM: DTS: rk3288-tinker: Defining the SPI interface
@ -18,7 +18,7 @@ Signed-off-by: Stefan Agner <stefan@agner.ch>
1 file changed, 19 insertions(+)
diff --git a/arch/arm/boot/dts/rockchip/rk3288-tinker.dtsi b/arch/arm/boot/dts/rockchip/rk3288-tinker.dtsi
index 09618bb7d872..30430d2e64b9 100644
index 09618bb7d872c..30430d2e64b93 100644
--- a/arch/arm/boot/dts/rockchip/rk3288-tinker.dtsi
+++ b/arch/arm/boot/dts/rockchip/rk3288-tinker.dtsi
@@ -483,6 +483,25 @@ &sdio0 {

View File

@ -1,4 +1,4 @@
From bf7869033cf3caa50912cbdfa548428a6571c104 Mon Sep 17 00:00:00 2001
From 1a15fc7f6a241895a31b00c1f324d358d408a610 Mon Sep 17 00:00:00 2001
From: Stefan Agner <stefan@agner.ch>
Date: Fri, 4 Sep 2020 21:57:55 +0200
Subject: [PATCH] ARM: dts: rockchip: enable I2C1/4 on rk3288-tinker
@ -11,7 +11,7 @@ Signed-off-by: Stefan Agner <stefan@agner.ch>
1 file changed, 8 insertions(+)
diff --git a/arch/arm/boot/dts/rockchip/rk3288-tinker.dtsi b/arch/arm/boot/dts/rockchip/rk3288-tinker.dtsi
index 30430d2e64b9..395afc2b2283 100644
index 30430d2e64b93..395afc2b2283c 100644
--- a/arch/arm/boot/dts/rockchip/rk3288-tinker.dtsi
+++ b/arch/arm/boot/dts/rockchip/rk3288-tinker.dtsi
@@ -342,10 +342,18 @@ regulator-state-mem {

View File

@ -1,4 +1,4 @@
From a0ef6a86e96920a9cf703d8c65d0126494037d37 Mon Sep 17 00:00:00 2001
From d6c44c231fc4518ad69bb7870a193bb10c563f2a Mon Sep 17 00:00:00 2001
From: Myy Miouyouyou <myy@miouyouyou.fr>
Date: Thu, 19 Oct 2017 21:24:47 +0200
Subject: [PATCH] RK3288: DTSI: rk3288.dtsi: Add missing SPI2 pinctrl
@ -14,10 +14,10 @@ Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/rockchip/rk3288.dtsi b/arch/arm/boot/dts/rockchip/rk3288.dtsi
index 51f1273d6beb..d8663928bfe2 100644
index becf3abd8367f..e78fa883b9841 100644
--- a/arch/arm/boot/dts/rockchip/rk3288.dtsi
+++ b/arch/arm/boot/dts/rockchip/rk3288.dtsi
@@ -311,7 +311,7 @@ spi2: spi@ff130000 {
@@ -320,7 +320,7 @@ spi2: spi@ff130000 {
dma-names = "tx", "rx";
interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
pinctrl-names = "default";

View File

@ -1,4 +1,4 @@
From e828e0fc2be98e5ad20c93981681505fc97b063b Mon Sep 17 00:00:00 2001
From dfb0232e9fae1267d04247aaf171739038c1659e Mon Sep 17 00:00:00 2001
From: "Miouyouyou (Myy)" <myy@miouyouyou.fr>
Date: Mon, 5 Nov 2018 20:16:05 +0100
Subject: [PATCH] ARM: DTSI: rk3288-tinker: Improving the CPU max voltage
@ -11,7 +11,7 @@ Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/rockchip/rk3288-tinker.dtsi b/arch/arm/boot/dts/rockchip/rk3288-tinker.dtsi
index 395afc2b2283..c7e79e594720 100644
index 395afc2b2283c..c7e79e5947206 100644
--- a/arch/arm/boot/dts/rockchip/rk3288-tinker.dtsi
+++ b/arch/arm/boot/dts/rockchip/rk3288-tinker.dtsi
@@ -184,7 +184,7 @@ vdd_cpu: DCDC_REG1 {

View File

@ -1,4 +1,4 @@
From ad1ffd6be5f54a0871e3c303602548687dfe0ffc Mon Sep 17 00:00:00 2001
From 4955695e410289df07258b00290d4028c3ac8fb1 Mon Sep 17 00:00:00 2001
From: Myy Miouyouyou <myy@miouyouyou.fr>
Date: Sun, 7 Jan 2018 01:52:44 +0100
Subject: [PATCH] drivers: mmc: dw-mci-rockchip: Handle ASUS Tinkerboard reboot
@ -21,7 +21,7 @@ Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
1 file changed, 66 insertions(+)
diff --git a/drivers/mmc/host/dw_mmc-rockchip.c b/drivers/mmc/host/dw_mmc-rockchip.c
index b07190ba4b7a..0badaa1b404e 100644
index f96260fd143b4..fa779ce8fb661 100644
--- a/drivers/mmc/host/dw_mmc-rockchip.c
+++ b/drivers/mmc/host/dw_mmc-rockchip.c
@@ -12,6 +12,11 @@
@ -36,7 +36,7 @@ index b07190ba4b7a..0badaa1b404e 100644
#include "dw_mmc.h"
#include "dw_mmc-pltfm.h"
@@ -340,6 +345,66 @@ static const struct of_device_id dw_mci_rockchip_match[] = {
@@ -527,6 +532,66 @@ static const struct of_device_id dw_mci_rockchip_match[] = {
};
MODULE_DEVICE_TABLE(of, dw_mci_rockchip_match);
@ -103,7 +103,7 @@ index b07190ba4b7a..0badaa1b404e 100644
static int dw_mci_rockchip_probe(struct platform_device *pdev)
{
const struct dw_mci_drv_data *drv_data;
@@ -367,6 +432,7 @@ static int dw_mci_rockchip_probe(struct platform_device *pdev)
@@ -554,6 +619,7 @@ static int dw_mci_rockchip_probe(struct platform_device *pdev)
}
pm_runtime_put_autosuspend(&pdev->dev);

View File

@ -1,4 +1,4 @@
From 4e6c3d013c847f199664a3075934f5ca52d8cba4 Mon Sep 17 00:00:00 2001
From 74227462bbe9236dca234dd24cce4191fa71bdf9 Mon Sep 17 00:00:00 2001
From: Stefan Agner <stefan@agner.ch>
Date: Tue, 10 May 2022 22:57:26 +0200
Subject: [PATCH] ARM: dts: rockchip: Add Bluetooth to rk3288-tinker
@ -12,7 +12,7 @@ Signed-off-by: Stefan Agner <stefan@agner.ch>
1 file changed, 26 insertions(+)
diff --git a/arch/arm/boot/dts/rockchip/rk3288-tinker.dtsi b/arch/arm/boot/dts/rockchip/rk3288-tinker.dtsi
index c7e79e594720..5d261fae6e72 100644
index c7e79e5947206..5d261fae6e72a 100644
--- a/arch/arm/boot/dts/rockchip/rk3288-tinker.dtsi
+++ b/arch/arm/boot/dts/rockchip/rk3288-tinker.dtsi
@@ -386,6 +386,20 @@ bl_en: bl-en {

View File

@ -1,4 +1,4 @@
From f597ec583c262ed4c3264ddf661e22b503fb8a11 Mon Sep 17 00:00:00 2001
From eb29ab60a69353f355b3af58b06fff1a89d17992 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= <sairon@sairon.cz>
Date: Wed, 10 Jan 2024 16:29:59 +0100
Subject: [PATCH] usb-audio: add ASUS TinkerBoard's ALC4040
@ -12,10 +12,10 @@ Co-authored-by: Pascal Vizeli <pascal.vizeli@syshack.ch>
1 file changed, 8 insertions(+)
diff --git a/sound/usb/card.c b/sound/usb/card.c
index 1b2edc0fd2e9..3069ac5b6759 100644
index 9c411b82a218d..672136e25c81d 100644
--- a/sound/usb/card.c
+++ b/sound/usb/card.c
@@ -521,6 +521,14 @@ static void usb_audio_make_shortname(struct usb_device *dev,
@@ -533,6 +533,14 @@ static void usb_audio_make_shortname(struct usb_device *dev,
}
strim(card->shortname);

View File

@ -1,31 +1,30 @@
From defc964eaa9f4ccc9cd1568ade4e4d81f35b9e07 Mon Sep 17 00:00:00 2001
From 78bd1a46cfc585773719963ce8e0a380e9676a93 Mon Sep 17 00:00:00 2001
From: Pascal Vizeli <pvizeli@syshack.ch>
Date: Fri, 24 Apr 2020 11:37:55 +0000
Subject: [PATCH] pmic: enable LDO2 vcc33_mipi at bootup
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
---
board/rockchip/tinker_rk3288/tinker-rk3288.c | 37 ++++++++++++++++++++
1 file changed, 37 insertions(+)
board/rockchip/tinker_rk3288/tinker-rk3288.c | 36 ++++++++++++++++++++
1 file changed, 36 insertions(+)
diff --git a/board/rockchip/tinker_rk3288/tinker-rk3288.c b/board/rockchip/tinker_rk3288/tinker-rk3288.c
index f85209c649..6fa1bb0c66 100644
index e966e9f201a..2944d8c084f 100644
--- a/board/rockchip/tinker_rk3288/tinker-rk3288.c
+++ b/board/rockchip/tinker_rk3288/tinker-rk3288.c
@@ -13,6 +13,7 @@
@@ -9,6 +9,7 @@
#include <init.h>
#include <net.h>
#include <netdev.h>
#include <asm/arch-rockchip/bootrom.h>
#include <asm/io.h>
+#include <power/regulator.h>
static int get_ethaddr_from_eeprom(u8 *addr)
{
@@ -48,3 +49,39 @@ int mmc_get_env_dev(void)
@@ -34,3 +35,38 @@ int rk3288_board_late_init(void)
return 1;
return 0;
}
+
+
+#ifdef CONFIG_DM_PMIC
+static int rockchip_set_regulator_on(const char *name, uint uv)
+{
@ -60,6 +59,3 @@ index f85209c649..6fa1bb0c66 100644
+ return 0;
+}
+#endif
--
2.43.0

View File

@ -228,7 +228,6 @@ CONFIG_PCIE_KIRIN=y
# CONFIG_PCI_MESON is not set
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
CONFIG_BRCMSTB_GISB_ARB=y
CONFIG_VEXPRESS_CONFIG=y
CONFIG_ARM_SCPI_PROTOCOL=y
CONFIG_EFI_CAPSULE_LOADER=y
@ -381,7 +380,6 @@ CONFIG_TCG_TIS_I2C_INFINEON=y
CONFIG_I2C_CHARDEV=y
CONFIG_I2C_MUX=y
CONFIG_I2C_MUX_PCA954x=y
CONFIG_I2C_DESIGNWARE_PLATFORM=y
CONFIG_I2C_GPIO=m
CONFIG_I2C_MESON=y
CONFIG_I2C_RK3X=y
@ -409,7 +407,6 @@ CONFIG_W1=y
CONFIG_W1_MASTER_DS2490=m
CONFIG_W1_MASTER_DS2482=m
CONFIG_W1_MASTER_GPIO=m
CONFIG_POWER_RESET_BRCMSTB=y
CONFIG_POWER_RESET_VEXPRESS=y
CONFIG_POWER_RESET_XGENE=y
CONFIG_POWER_RESET_SYSCON=y
@ -541,7 +538,6 @@ CONFIG_DRM_MESON=m
CONFIG_DRM_PL111=m
CONFIG_DRM_LIMA=m
CONFIG_DRM_PANFROST=m
CONFIG_DRM_LEGACY=y
CONFIG_FB=y
CONFIG_FB_MODE_HELPERS=y
CONFIG_FB_EFI=y
@ -684,7 +680,6 @@ CONFIG_ARM_SMMU_V3=y
CONFIG_REMOTEPROC=y
CONFIG_RPMSG_QCOM_GLINK_RPM=y
CONFIG_MESON_CANVAS=y
CONFIG_SOC_BRCMSTB=y
CONFIG_SOC_TI=y
CONFIG_EXTCON_USB_GPIO=y
CONFIG_EXTCON_USBC_CROS_EC=y

View File

@ -1,46 +0,0 @@
From 023bc5bd23d3239494bca81d807d3c093f78c131 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= <sairon@sairon.cz>
Date: Thu, 8 Aug 2024 17:52:47 +0200
Subject: [PATCH] odroid-m1: Disable eMMC DDR52 mode, enable HS200
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Disable DDR52 mode on odroid-m1 to fix eMMC writes. Also enable HS200,
as it's supposed to work more reliably than slower modes.
Signed-off-by: Jan Čermák <sairon@sairon.cz>
Upstream: https://patchwork.ozlabs.org/project/uboot/cover/20240204205312.2342868-1-jonas@kwiboo.se/
---
arch/arm/dts/rk3568-odroid-m1-u-boot.dtsi | 3 ---
configs/odroid-m1-rk3568_defconfig | 2 ++
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/arch/arm/dts/rk3568-odroid-m1-u-boot.dtsi b/arch/arm/dts/rk3568-odroid-m1-u-boot.dtsi
index 0fc360b06d..f9d34d3b77 100644
--- a/arch/arm/dts/rk3568-odroid-m1-u-boot.dtsi
+++ b/arch/arm/dts/rk3568-odroid-m1-u-boot.dtsi
@@ -14,10 +14,7 @@
&sdhci {
cap-mmc-highspeed;
- mmc-ddr-1_8v;
mmc-hs200-1_8v;
- mmc-hs400-1_8v;
- mmc-hs400-enhanced-strobe;
pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd &emmc_datastrobe>;
};
diff --git a/configs/odroid-m1-rk3568_defconfig b/configs/odroid-m1-rk3568_defconfig
index 96b4e9ecda..517ac0575d 100644
--- a/configs/odroid-m1-rk3568_defconfig
+++ b/configs/odroid-m1-rk3568_defconfig
@@ -72,6 +72,8 @@ CONFIG_ROCKCHIP_GPIO=y
CONFIG_SYS_I2C_ROCKCHIP=y
CONFIG_MISC=y
CONFIG_SUPPORT_EMMC_RPMB=y
+CONFIG_MMC_HS200_SUPPORT=y
+CONFIG_SPL_MMC_HS200_SUPPORT=y
CONFIG_MMC_DW=y
CONFIG_MMC_DW_ROCKCHIP=y
CONFIG_MMC_SDHCI=y

View File

@ -1,15 +1,15 @@
part start mmc ${devnum} hassos-bootstate mmc_env
mmc dev ${devnum}
part start ${devtype} ${devnum} hassos-bootstate mmc_env
${devtype} dev ${devnum}
setenv loadbootstate " \
echo 'loading env...'; \
mmc read ${ramdisk_addr_r} ${mmc_env} 0x40; \
${devtype} read ${ramdisk_addr_r} ${mmc_env} 0x40; \
env import -c ${ramdisk_addr_r} 0x8000;"
setenv storebootstate " \
echo 'storing env...'; \
env export -c -s 0x8000 ${ramdisk_addr_r} BOOT_ORDER BOOT_A_LEFT BOOT_B_LEFT MACHINE_ID; \
mmc write ${ramdisk_addr_r} ${mmc_env} 0x40;"
${devtype} write ${ramdisk_addr_r} ${mmc_env} 0x40;"
run loadbootstate
test -n "${BOOT_ORDER}" || setenv BOOT_ORDER "A B"
@ -26,34 +26,34 @@ setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 systemd.machine_id=${M
setenv bootargs_a "root=PARTUUID=8d3d53e3-6d49-4c38-8349-aff6859e82fd ro rootwait"
setenv bootargs_b "root=PARTUUID=a3ec664e-32ce-4665-95ea-7ae90ce9aa20 ro rootwait"
part number mmc ${devnum} hassos-boot boot_partnum
part number ${devtype} ${devnum} hassos-boot boot_partnum
# Load environment from haos-config.txt
if test -e mmc ${devnum}:${boot_partnum} haos-config.txt; then
fatload mmc ${devnum}:${boot_partnum} ${ramdisk_addr_r} haos-config.txt
if test -e ${devtype} ${devnum}:${boot_partnum} haos-config.txt; then
fatload ${devtype} ${devnum}:${boot_partnum} ${ramdisk_addr_r} haos-config.txt
env import -t ${ramdisk_addr_r} ${filesize}
fi
# Load extraargs
fileenv mmc ${devnum}:${boot_partnum} ${ramdisk_addr_r} cmdline.txt cmdline
fileenv ${devtype} ${devnum}:${boot_partnum} ${ramdisk_addr_r} cmdline.txt cmdline
# Load device tree
setenv fdtfile rk3568-odroid-m1.dtb
echo "Loading standard device tree ${fdtfile}"
fatload mmc ${devnum}:${boot_partnum} ${fdt_addr_r} ${fdtfile}
fatload ${devtype} ${devnum}:${boot_partnum} ${fdt_addr_r} ${fdtfile}
fdt addr ${fdt_addr_r}
# load dt overlays
fdt resize 65536
for overlay_file in ${overlays}; do
if fatload mmc ${devnum}:${boot_partnum} ${ramdisk_addr_r} overlays/${overlay_file}.dtbo; then
if fatload ${devtype} ${devnum}:${boot_partnum} ${ramdisk_addr_r} overlays/${overlay_file}.dtbo; then
echo "Applying kernel provided DT overlay ${overlay_file}.dtbo"
fdt apply ${ramdisk_addr_r} || setenv overlay_error "true"
fi
done
if test "${overlay_error}" = "true"; then
echo "Error applying DT overlays, restoring original DT"
fatload mmc ${devnum}:${boot_partnum} ${fdt_addr_r} ${fdtfile}
fatload ${devtype} ${devnum}:${boot_partnum} ${fdt_addr_r} ${fdtfile}
fi
setenv bootargs
@ -64,8 +64,8 @@ for BOOT_SLOT in "${BOOT_ORDER}"; do
if test ${BOOT_A_LEFT} -gt 0; then
setexpr BOOT_A_LEFT ${BOOT_A_LEFT} - 1
echo "Trying to boot slot A, ${BOOT_A_LEFT} attempts remaining. Loading kernel ..."
part number mmc ${devnum} hassos-kernel0 kernel_partnum
if load mmc ${devnum}:${kernel_partnum} ${kernel_addr_r} Image; then
part number ${devtype} ${devnum} hassos-kernel0 kernel_partnum
if load ${devtype} ${devnum}:${kernel_partnum} ${kernel_addr_r} Image; then
setenv bootargs "${bootargs_hassos} ${bootargs_a} rauc.slot=A ${cmdline}"
fi
fi
@ -73,8 +73,8 @@ for BOOT_SLOT in "${BOOT_ORDER}"; do
if test ${BOOT_B_LEFT} -gt 0; then
setexpr BOOT_B_LEFT ${BOOT_B_LEFT} - 1
echo "Trying to boot slot B, ${BOOT_B_LEFT} attempts remaining. Loading kernel ..."
part number mmc ${devnum} hassos-kernel1 kernel_partnum
if load mmc ${devnum}:${kernel_partnum} ${kernel_addr_r} Image; then
part number ${devtype} ${devnum} hassos-kernel1 kernel_partnum
if load ${devtype} ${devnum}:${kernel_partnum} ${kernel_addr_r} Image; then
setenv bootargs "${bootargs_hassos} ${bootargs_b} rauc.slot=B ${cmdline}"
fi
fi

View File

@ -0,0 +1,32 @@
From 60b24f8c30181ef60964ce186c2a6d05b85f3be1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= <sairon@sairon.cz>
Date: Fri, 31 Jan 2025 16:13:48 +0100
Subject: [PATCH] arm64: dts: rockchip: Enable Rockchip TRNG on ODROID-M1S
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
HAOS with 6.6 kernel had the RNG disbled because of a downstream patch. Now the
rk356x.dtsi has it's enabled only in rk3568.dtsi. We want it enabled also for
RK3566 on ODROID-M1S.
Signed-off-by: Jan Čermák <sairon@sairon.cz>
---
arch/arm64/boot/dts/rockchip/rk3566-odroid-m1s.dts | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3566-odroid-m1s.dts b/arch/arm64/boot/dts/rockchip/rk3566-odroid-m1s.dts
index 33bc5249d729b..a0d912b5ce4aa 100644
--- a/arch/arm64/boot/dts/rockchip/rk3566-odroid-m1s.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3566-odroid-m1s.dts
@@ -551,6 +551,10 @@ &pmu_io_domains {
status = "okay";
};
+&rng {
+ status = "okay";
+};
+
&saradc {
vref-supply = <&vcca_1v8>;
status = "okay";

View File

@ -1,896 +0,0 @@
From 83dadbe0a615f6fc7550dec98dee938647050990 Mon Sep 17 00:00:00 2001
From: Tim Lunn <tim@feathertop.org>
Date: Sun, 28 Jan 2024 18:52:26 +1100
Subject: [PATCH] arm64: dts: rockchip: Import Hardkernel ODROID-M1S board
Odroid-m1s is in the process of being upstreamed.
For now sync dts for Odroid-m1s:
https://github.com/tobetter/linux/blob/ae33b445578884c70d7bfc5d6d519de4db815ccd/arch/arm64/boot/dts/rockchip/rk3566-odroid-m1s.dts
---
arch/arm64/boot/dts/rockchip/Makefile | 1 +
.../boot/dts/rockchip/rk3566-odroid-m1s.dts | 861 ++++++++++++++++++
2 files changed, 862 insertions(+)
create mode 100644 arch/arm64/boot/dts/rockchip/rk3566-odroid-m1s.dts
diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile
index 8c15593c0ca4..362359684ed0 100644
--- a/arch/arm64/boot/dts/rockchip/Makefile
+++ b/arch/arm64/boot/dts/rockchip/Makefile
@@ -63,6 +63,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-sapphire-excavator.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399pro-rock-pi-n10.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-anbernic-rg353p.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-anbernic-rg503.dtb
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-odroid-m1s.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-pinenote-v1.1.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-pinenote-v1.2.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-quartz64-a.dtb
diff --git a/arch/arm64/boot/dts/rockchip/rk3566-odroid-m1s.dts b/arch/arm64/boot/dts/rockchip/rk3566-odroid-m1s.dts
new file mode 100644
index 000000000000..1cad9217c374
--- /dev/null
+++ b/arch/arm64/boot/dts/rockchip/rk3566-odroid-m1s.dts
@@ -0,0 +1,861 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2023 Hardkernel Co., Ltd.
+ *
+ */
+
+/dts-v1/;
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/leds/common.h>
+#include <dt-bindings/pinctrl/rockchip.h>
+#include <dt-bindings/soc/rockchip,vop2.h>
+
+#include "rk3566.dtsi"
+
+/ {
+ model = "Hardkernel ODROID-M1S";
+ compatible = "rockchip,rk3566-odroid-m1", "rockchip,rk3566";
+
+ aliases {
+ ethernet1 = &gmac1;
+ i2c0 = &i2c3;
+ i2c3 = &i2c0;
+ mmc0 = &sdhci;
+ mmc1 = &sdmmc0;
+ serial0 = &uart1;
+ serial1 = &uart0;
+ };
+
+ chosen: chosen {
+ stdout-path = "serial2:1500000n8";
+ };
+
+ hdmi-con {
+ compatible = "hdmi-connector";
+ type = "a";
+
+ port {
+ hdmi_con_in: endpoint {
+ remote-endpoint = <&hdmi_out_con>;
+ };
+ };
+ };
+
+ gmac1_clkin: external-gmac1-clock {
+ compatible = "fixed-clock";
+ clock-frequency = <125000000>;
+ clock-output-names = "gmac1_clkin";
+ #clock-cells = <0>;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+ status = "okay";
+
+ red_led: red {
+ gpios = <&gpio0 RK_PC6 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "default-on";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_RED>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&led_power_en>;
+ };
+ blue_led: blue {
+ gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>;
+ linux,default-trigger = "heartbeat";
+ function = LED_FUNCTION_HEARTBEAT;
+ color = <LED_COLOR_ID_BLUE>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&led_work_en>;
+ };
+ };
+
+ pcie20_3v3: pcie20-3v3-regulator {
+ compatible = "regulator-fixed";
+ enable-active-high;
+ gpios = <&gpio2 RK_PC2 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pcie20_3v3_en>;
+ regulator-name = "pcie20_3v3";
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ rk809-sound {
+ compatible = "simple-audio-card";
+ simple-audio-card,format = "i2s";
+ simple-audio-card,name = "ODROID-M1-FRONT";
+ simple-audio-card,mclk-fs = <256>;
+ status = "okay";
+
+ simple-audio-card,cpu {
+ sound-dai = <&i2s1_8ch>;
+ };
+
+ simple-audio-card,codec {
+ sound-dai = <&rk809>;
+ };
+ };
+
+ vcc3v3_sys: vcc3v3-sys {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc3v3_sys";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ vin-supply = <&vcc5v0_sys>;
+ };
+
+ vcc5v_dcin: vcc5v-dcin {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc-5v";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ };
+
+ vcc5v0_sys: vcc5v0-sys {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc5v0_sys";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&vcc5v_dcin>;
+ };
+
+ vcc5v0_host: vcc5v0-host-regulator {
+ compatible = "regulator-fixed";
+ enable-active-high;
+ gpio = <&gpio3 RK_PB0 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&vcc5v0_host_en>;
+ regulator-name = "vcc5v0_host";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&vcc5v0_sys>;
+ };
+
+ vcc5v0_usb_otg: vcc5v0-otg-regulator {
+ compatible = "regulator-fixed";
+ enable-active-high;
+ gpio = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&vcc5v0_usb_otg_en>;
+ regulator-name = "vcc5v0_usb_otg";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&vcc5v0_sys>;
+ };
+
+ vcc5v0_usb_host: vcc5v0-usb3-regulator {
+ compatible = "regulator-fixed";
+ enable-active-high;
+ gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&vcc5v0_usb_host_en>;
+ regulator-name = "vcc5v0_usb_host";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&vcc5v0_sys>;
+ };
+};
+
+&combphy1 {
+ phy-supply = <&vcc5v0_usb_host>;
+ status = "okay";
+};
+
+&combphy2 {
+ status = "okay";
+};
+
+&cpu0 {
+ cpu-supply = <&vdd_cpu>;
+};
+
+&cpu1 {
+ cpu-supply = <&vdd_cpu>;
+};
+
+&cpu2 {
+ cpu-supply = <&vdd_cpu>;
+};
+
+&cpu3 {
+ cpu-supply = <&vdd_cpu>;
+};
+
+&display_subsystem {
+ status = "okay";
+};
+
+&gmac1 {
+ assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, <&cru SCLK_GMAC1_RGMII_SPEED>, <&cru SCLK_GMAC1>;
+ assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>, <&cru SCLK_GMAC1>, <&gmac1_clkin>;
+ clock_in_out = "input";
+ phy-supply = <&vcc_3v3>;
+ phy-mode = "rgmii";
+ pinctrl-names = "default";
+ pinctrl-0 = <&gmac1m1_miim
+ &gmac1m1_tx_bus2
+ &gmac1m1_rx_bus2
+ &gmac1m1_rgmii_clk
+ &gmac1m1_rgmii_bus
+ &gmac1m1_clkinout>;
+ snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
+ snps,reset-active-low;
+ /* Reset time is 20ms, 100ms for rtl8211f */
+ snps,reset-delays-us = <0 20000 100000>;
+ tx_delay = <0x4f>;
+ rx_delay = <0x2d>;
+ phy-handle = <&rgmii_phy1>;
+ status = "okay";
+};
+
+&gpio0 {
+ gpio-line-names =
+ /* GPIO0_A0-A3 */
+ "", "", "", "",
+ /* GPIO0_A4-A7 */
+ "", "", "", "",
+
+ /* GPIO0_B0-B3 */
+ "", "", "", "PIN_28",
+ /* GPIO0_B4-B7 */
+ "PIN_27", "PIN_33", "PIN_7", "",
+
+ /* GPIO0_C0-C3 */
+ "PIN_11", "PIN_13", "PIN_15", "",
+ /* GPIO0_C4-C7 */
+ "", "", "", "",
+
+ /* GPIO0_D0-D3 */
+ "", "", "", "",
+ /* GPIO0_D4-D7 */
+ "", "", "", "";
+};
+
+&gpio1 {
+ gpio-line-names =
+ /* GPIO1_A0-A3 */
+ "", "", "", "",
+ /* GPIO1_A4-A7 */
+ "", "", "", "",
+
+ /* GPIO1_B0-B3 */
+ "", "", "", "",
+ /* GPIO1_B4-B7 */
+ "", "", "", "",
+
+ /* GPIO1_C0-C3 */
+ "", "", "", "",
+ /* GPIO1_C4-C7 */
+ "", "", "", "",
+
+ /* GPIO1_D0-D3 */
+ "", "", "", "",
+ /* GPIO1_D4-D7 */
+ "", "", "", "";
+};
+
+&gpio2 {
+ gpio-line-names =
+ /* GPIO2_A0-A3 */
+ "", "", "", "PIN_10",
+ /* GPIO2_A4-A7 */
+ "PIN_8", "PINN_35", "PIN_36", "PIN_12",
+
+ /* GPIO2_B0-B3 */
+ "PIN_22", "PIN_26", "PIN_32", "",
+ /* GPIO2_B4-B7 */
+ "", "PIN_16", "PIN_18", "PIN_31",
+
+ /* GPIO2_C0-C3 */
+ "PIN_29", "", "", "",
+ /* GPIO2_C4-C7 */
+ "", "", "", "",
+
+ /* GPIO2_D0-D3 */
+ "", "", "", "",
+ /* GPIO2_D4-D7 */
+ "", "", "", "";
+};
+
+&gpio3 {
+ gpio-line-names =
+ /* GPIO3_A0-A3 */
+ "", "PIN_24", "", "",
+ /* GPIO3_A4-A7 */
+ "", "", "", "",
+
+ /* GPIO3_B0-B3 */
+ "", "", "", "EXTPIN_13",
+ /* GPIO3_B4-B7 */
+ "EXTPIN_14", "PIN_5", "PIN_3", "",
+
+ /* GPIO3_C0-C3 */
+ "", "PIN_19", "PIN_21", "PIN_23",
+ /* GPIO3_C4-C7 */
+ "EXTPIN_11", "EXTPIN_12", "", "",
+
+ /* GPIO3_D0-D3 */
+ "", "", "", "",
+ /* GPIO3_D4-D7 */
+ "", "", "", "";
+};
+
+&gpio4 {
+ gpio-line-names =
+ /* GPIO4_A0-A3 */
+ "", "", "", "",
+ /* GPIO4_A4-A7 */
+ "", "", "", "",
+
+ /* GPIO4_B0-B3 */
+ "", "", "", "",
+ /* GPIO4_B4-B7 */
+ "", "", "", "",
+
+ /* GPIO4_C0-C3 */
+ "", "", "", "",
+ /* GPIO4_C4-C7 */
+ "", "", "", "",
+
+ /* GPIO4_D0-D3 */
+ "", "", "", "",
+ /* GPIO4_D4-D7 */
+ "", "", "", "";
+};
+
+&gpu {
+ mali-supply = <&vdd_gpu>;
+ status = "okay";
+};
+
+&hdmi {
+ avdd-0v9-supply = <&vdda0v9_image>;
+ avdd-1v8-supply = <&vcca1v8_image>;
+ status = "okay";
+};
+
+&hdmi_in {
+ hdmi_in_vp0: endpoint {
+ remote-endpoint = <&vp0_out_hdmi>;
+ };
+};
+
+&hdmi_out {
+ hdmi_out_con: endpoint {
+ remote-endpoint = <&hdmi_con_in>;
+ };
+};
+
+&hdmi_sound {
+ simple-audio-card,name = "ODROID-M1-HDMI";
+ status = "okay";
+};
+
+&i2c0 {
+ status = "okay";
+ vdd_cpu: tcs4525@1c {
+ compatible = "tcs,tcs452x";
+ reg = <0x1c>;
+ vin-supply = <&vcc5v0_sys>;
+ regulator-compatible = "fan53555-reg";
+ regulator-name = "vdd_cpu";
+ regulator-min-microvolt = <712500>;
+ regulator-max-microvolt = <1390000>;
+ regulator-init-microvolt = <900000>;
+ regulator-ramp-delay = <2300>;
+ fcs,suspend-voltage-selector = <1>;
+ regulator-boot-on;
+ regulator-always-on;
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ rk809: pmic@20 {
+ compatible = "rockchip,rk809";
+ reg = <0x20>;
+ interrupt-parent = <&gpio0>;
+ interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
+ assigned-clocks = <&cru I2S1_MCLKOUT_TX>;
+ assigned-clock-parents = <&cru CLK_I2S1_8CH_TX>;
+ #clock-cells = <1>;
+ clock-names = "mclk";
+ clocks = <&cru I2S1_MCLKOUT_TX>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pmic_int>, <&i2s1m0_mclk>;
+ rockchip,system-power-controller;
+ #sound-dai-cells = <0>;
+ vcc1-supply = <&vcc3v3_sys>;
+ vcc2-supply = <&vcc3v3_sys>;
+ vcc3-supply = <&vcc3v3_sys>;
+ vcc4-supply = <&vcc3v3_sys>;
+ vcc5-supply = <&vcc3v3_sys>;
+ vcc6-supply = <&vcc3v3_sys>;
+ vcc7-supply = <&vcc3v3_sys>;
+ vcc8-supply = <&vcc3v3_sys>;
+ vcc9-supply = <&vcc3v3_sys>;
+ wakeup-source;
+
+ regulators {
+ vdd_logic: DCDC_REG1 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <500000>;
+ regulator-max-microvolt = <1350000>;
+ regulator-init-microvolt = <900000>;
+ regulator-ramp-delay = <6001>;
+ regulator-initial-mode = <0x2>;
+ regulator-name = "vdd_logic";
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_gpu: DCDC_REG2 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <500000>;
+ regulator-max-microvolt = <1350000>;
+ regulator-init-microvolt = <900000>;
+ regulator-ramp-delay = <6001>;
+ regulator-initial-mode = <0x2>;
+ regulator-name = "vdd_gpu";
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc_ddr: DCDC_REG3 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-initial-mode = <0x2>;
+ regulator-name = "vcc_ddr";
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ };
+ };
+
+ vdd_npu: DCDC_REG4 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <500000>;
+ regulator-max-microvolt = <1350000>;
+ regulator-init-microvolt = <900000>;
+ regulator-ramp-delay = <6001>;
+ regulator-initial-mode = <0x2>;
+ regulator-name = "vdd_npu";
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdda0v9_image: LDO_REG1 {
+ regulator-boot-on;
+ regulator-always-on;
+ regulator-min-microvolt = <900000>;
+ regulator-max-microvolt = <900000>;
+ regulator-name = "vdda0v9_image";
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdda_0v9: LDO_REG2 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <900000>;
+ regulator-max-microvolt = <900000>;
+ regulator-name = "vdda_0v9";
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdda0v9_pmu: LDO_REG3 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <900000>;
+ regulator-max-microvolt = <900000>;
+ regulator-name = "vdda0v9_pmu";
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <900000>;
+ };
+ };
+
+ vccio_acodec: LDO_REG4 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <3000000>;
+ regulator-max-microvolt = <3000000>;
+ regulator-name = "vccio_acodec";
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vccio_sd: LDO_REG5 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-name = "vccio_sd";
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc3v3_pmu: LDO_REG6 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-name = "vcc3v3_pmu";
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <3300000>;
+ };
+ };
+
+ vcca_1v8: LDO_REG7 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-name = "vcca_1v8";
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcca1v8_ddr: LDO_REG8 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-name = "vcca1v8_pmu";
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <1800000>;
+ };
+ };
+
+ vcca1v8_image: LDO_REG9 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-name = "vcca1v8_image";
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc_1v8: DCDC_REG5 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-name = "vcc_1v8";
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc_3v3: SWITCH_REG1 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-name = "vcc_3v3";
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc3v3_sd: SWITCH_REG2 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-name = "vcc3v3_sd";
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+ };
+ };
+};
+
+&i2c2 {
+ status = "disabled";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c2m1_xfer>;
+
+ clock-frequency = <400000>;
+};
+
+&i2c3 {
+ status = "disabled";
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c3m1_xfer>;
+};
+
+&i2s0_8ch {
+ status = "okay";
+};
+
+&i2s1_8ch {
+ status = "okay";
+ rockchip,clk-trcm = <1>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2s1m0_sclktx
+ &i2s1m0_lrcktx
+ &i2s1m0_sdi0
+ &i2s1m0_sdo0>;
+};
+
+&mdio1 {
+ rgmii_phy1: phy@0 {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <0x0>;
+ };
+};
+
+&pcie2x1 {
+ reset-gpios = <&gpio1 RK_PB2 GPIO_ACTIVE_HIGH>;
+ vpcie3v3-supply = <&pcie20_3v3>;
+ pinctrl-0 = <&pcie20m2_pins>;
+ status = "okay";
+};
+
+&pinctrl {
+ gmac1 {
+ gmac1m1_miim: gmac1m1-miim {
+ rockchip,pins =
+ /* gmac1_mdcm1 */
+ <4 RK_PB6 3 &pcfg_pull_none_drv_level_15>,
+ /* gmac1_mdiom1 */
+ <4 RK_PB7 3 &pcfg_pull_none_drv_level_15>;
+ };
+
+ gmac1m1_clkinout: gmac1m1-clkinout {
+ rockchip,pins =
+ /* gmac1_mclkinoutm1 */
+ <4 RK_PC1 3 &pcfg_pull_none_drv_level_15>;
+ };
+
+ gmac1m1_rx_bus2: gmac1m1-rx-bus2 {
+ rockchip,pins =
+ /* gmac1_rxd0m1 */
+ <4 RK_PA7 3 &pcfg_pull_none_drv_level_15>,
+ /* gmac1_rxd1m1 */
+ <4 RK_PB0 3 &pcfg_pull_none_drv_level_15>,
+ /* gmac1_rxdvcrsm1 */
+ <4 RK_PB1 3 &pcfg_pull_none_drv_level_15>;
+ };
+
+ gmac1m1_tx_bus2: gmac1m1-tx-bus2 {
+ rockchip,pins =
+ /* gmac1_txd0m1 */
+ <4 RK_PA4 3 &pcfg_pull_none_drv_level_15>,
+ /* gmac1_txd1m1 */
+ <4 RK_PA5 3 &pcfg_pull_none_drv_level_15>,
+ /* gmac1_txenm1 */
+ <4 RK_PA6 3 &pcfg_pull_none_drv_level_15>;
+ };
+
+ gmac1m1_rgmii_clk: gmac1m1-rgmii-clk {
+ rockchip,pins =
+ /* gmac1_rxclkm1 */
+ <4 RK_PA3 3 &pcfg_pull_none_drv_level_15>,
+ /* gmac1_txclkm1 */
+ <4 RK_PA0 3 &pcfg_pull_none_drv_level_15>;
+ };
+
+ gmac1m1_rgmii_bus: gmac1m1-rgmii-bus {
+ rockchip,pins =
+ /* gmac1_rxd2m1 */
+ <4 RK_PA1 3 &pcfg_pull_none_drv_level_15>,
+ /* gmac1_rxd3m1 */
+ <4 RK_PA2 3 &pcfg_pull_none_drv_level_15>,
+ /* gmac1_txd2m1 */
+ <3 RK_PD6 3 &pcfg_pull_none_drv_level_15>,
+ /* gmac1_txd3m1 */
+ <3 RK_PD7 3 &pcfg_pull_none_drv_level_15>;
+ };
+ };
+
+ leds {
+ led_power_en: led_power_en {
+ rockchip,pins = <0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ led_work_en: led_work_en {
+ rockchip,pins = <0 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
+ pcie {
+ pcie20_3v3_en: pcie20-3v3-en {
+ rockchip,pins = <2 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
+ pmic {
+ pmic_int: pmic_int {
+ rockchip,pins =
+ <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+ };
+
+ usb {
+ vcc5v0_host_en: vcc5v0-host-en {
+ rockchip,pins = <3 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+
+ vcc5v0_usb_otg_en: vcc5v0-otg-en {
+ rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+
+ vcc5v0_usb_host_en: vcc5v0-usb3-en {
+ rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+};
+
+&pmu_io_domains {
+ pmuio1-supply = <&vcc3v3_pmu>;
+ pmuio2-supply = <&vcc3v3_pmu>;
+ vccio1-supply = <&vccio_acodec>;
+ vccio2-supply = <&vcc_1v8>;
+ vccio3-supply = <&vccio_sd>;
+ vccio4-supply = <&vcc_3v3>;
+ vccio5-supply = <&vcc_3v3>;
+ vccio6-supply = <&vcc_3v3>;
+ vccio7-supply = <&vcc_3v3>;
+ status = "okay";
+};
+
+&pwm1 {
+ status = "disabled";
+ pinctrl-0 = <&pwm1m1_pins>;
+};
+
+&saradc {
+ vref-supply = <&vcca_1v8>;
+ status = "okay";
+};
+
+&sdhci {
+ bus-width = <8>;
+ max-frequency = <200000000>;
+ non-removable;
+ pinctrl-names = "default";
+ pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd &emmc_datastrobe &emmc_rstnout>;
+ vmmc-supply = <&vcc_3v3>;
+ vqmmc-supply = <&vcc_1v8>;
+ status = "okay";
+};
+
+&sdmmc0 {
+ bus-width = <4>;
+ cap-sd-highspeed;
+ cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
+ disable-wp;
+ pinctrl-names = "default";
+ pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det>;
+ sd-uhs-sdr104;
+ vmmc-supply = <&vcc3v3_sys>;
+ vqmmc-supply = <&vccio_sd>;
+ status = "okay";
+};
+
+&tsadc {
+ status = "okay";
+};
+
+&uart1 {
+ dma-names = "tx", "rx";
+ /* uart1 uart1-with-ctsrts */
+ pinctrl-0 = <&uart1m1_xfer>;
+ pinctrl-1 = <&uart1m1_xfer &uart1m1_ctsn &uart1m1_rtsn>;
+ status = "disabled";
+};
+
+&uart2 {
+ status = "okay";
+};
+
+&usb_host0_ehci {
+ status = "okay";
+};
+
+&usb_host0_ohci {
+ status = "okay";
+};
+
+&usb_host0_xhci {
+ dr_mode = "otg";
+ status = "okay";
+};
+
+&usb_host1_ehci {
+ status = "okay";
+};
+
+&usb_host1_ohci {
+ status = "okay";
+};
+
+&usb_host1_xhci {
+ status = "okay";
+};
+
+&usb2phy0 {
+ status = "okay";
+};
+
+&usb2phy0_host {
+ phy-supply = <&vcc5v0_usb_host>;
+ status = "okay";
+};
+
+&usb2phy0_otg {
+ vbus-supply = <&vcc5v0_usb_otg>;
+ status = "okay";
+};
+
+&usb2phy1 {
+ status = "okay";
+};
+
+&usb2phy1_host {
+ phy-supply = <&vcc5v0_host>;
+ status = "okay";
+};
+
+&usb2phy1_otg {
+ phy-supply = <&vcc5v0_host>;
+ status = "okay";
+};
+
+&vop {
+ assigned-clocks = <&cru DCLK_VOP0>, <&cru DCLK_VOP1>;
+ assigned-clock-parents = <&pmucru PLL_HPLL>, <&cru PLL_VPLL>;
+ status = "okay";
+};
+
+&vop_mmu {
+ status = "okay";
+};
+
+&vp0 {
+ vp0_out_hdmi: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
+ reg = <ROCKCHIP_VOP2_EP_HDMI0>;
+ remote-endpoint = <&hdmi_in_vp0>;
+ };
+};
--
2.40.1

View File

@ -1,335 +0,0 @@
From eb02261dd6c88a7fcf3c28e59a7976905815fa6b Mon Sep 17 00:00:00 2001
From: Tim Lunn <tim@feathertop.org>
Date: Sun, 28 Jan 2024 18:55:57 +1100
Subject: [PATCH] arm64: dts: clean up as required for mainline linux
---
.../boot/dts/rockchip/rk3566-odroid-m1s.dts | 212 +++---------------
1 file changed, 27 insertions(+), 185 deletions(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3566-odroid-m1s.dts b/arch/arm64/boot/dts/rockchip/rk3566-odroid-m1s.dts
index 1cad9217c374..cbf2495901d7 100644
--- a/arch/arm64/boot/dts/rockchip/rk3566-odroid-m1s.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3566-odroid-m1s.dts
@@ -18,12 +18,8 @@ / {
aliases {
ethernet1 = &gmac1;
- i2c0 = &i2c3;
- i2c3 = &i2c0;
mmc0 = &sdhci;
mmc1 = &sdmmc0;
- serial0 = &uart1;
- serial1 = &uart0;
};
chosen: chosen {
@@ -52,7 +48,7 @@ leds {
compatible = "gpio-leds";
status = "okay";
- red_led: red {
+ red_led: led-0 {
gpios = <&gpio0 RK_PC6 GPIO_ACTIVE_LOW>;
linux,default-trigger = "default-on";
function = LED_FUNCTION_POWER;
@@ -60,7 +56,7 @@ red_led: red {
pinctrl-names = "default";
pinctrl-0 = <&led_power_en>;
};
- blue_led: blue {
+ blue_led: led-1 {
gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "heartbeat";
function = LED_FUNCTION_HEARTBEAT;
@@ -97,6 +93,25 @@ simple-audio-card,codec {
};
};
+ spdif_dit: spdif-dit {
+ compatible = "linux,spdif-dit";
+ #sound-dai-cells = <0>;
+ status = "disabled";
+ };
+
+ spdif_sound: spdif-sound {
+ compatible = "simple-audio-card";
+ status = "disabled";
+
+ simple-audio-card,cpu {
+ sound-dai = <&spdif>;
+ };
+
+ simple-audio-card,codec {
+ sound-dai = <&spdif_dit>;
+ };
+ };
+
vcc3v3_sys: vcc3v3-sys {
compatible = "regulator-fixed";
regulator-name = "vcc3v3_sys";
@@ -164,7 +179,6 @@ vcc5v0_usb_host: vcc5v0-usb3-regulator {
};
&combphy1 {
- phy-supply = <&vcc5v0_usb_host>;
status = "okay";
};
@@ -215,121 +229,6 @@ &gmac1m1_rgmii_bus
status = "okay";
};
-&gpio0 {
- gpio-line-names =
- /* GPIO0_A0-A3 */
- "", "", "", "",
- /* GPIO0_A4-A7 */
- "", "", "", "",
-
- /* GPIO0_B0-B3 */
- "", "", "", "PIN_28",
- /* GPIO0_B4-B7 */
- "PIN_27", "PIN_33", "PIN_7", "",
-
- /* GPIO0_C0-C3 */
- "PIN_11", "PIN_13", "PIN_15", "",
- /* GPIO0_C4-C7 */
- "", "", "", "",
-
- /* GPIO0_D0-D3 */
- "", "", "", "",
- /* GPIO0_D4-D7 */
- "", "", "", "";
-};
-
-&gpio1 {
- gpio-line-names =
- /* GPIO1_A0-A3 */
- "", "", "", "",
- /* GPIO1_A4-A7 */
- "", "", "", "",
-
- /* GPIO1_B0-B3 */
- "", "", "", "",
- /* GPIO1_B4-B7 */
- "", "", "", "",
-
- /* GPIO1_C0-C3 */
- "", "", "", "",
- /* GPIO1_C4-C7 */
- "", "", "", "",
-
- /* GPIO1_D0-D3 */
- "", "", "", "",
- /* GPIO1_D4-D7 */
- "", "", "", "";
-};
-
-&gpio2 {
- gpio-line-names =
- /* GPIO2_A0-A3 */
- "", "", "", "PIN_10",
- /* GPIO2_A4-A7 */
- "PIN_8", "PINN_35", "PIN_36", "PIN_12",
-
- /* GPIO2_B0-B3 */
- "PIN_22", "PIN_26", "PIN_32", "",
- /* GPIO2_B4-B7 */
- "", "PIN_16", "PIN_18", "PIN_31",
-
- /* GPIO2_C0-C3 */
- "PIN_29", "", "", "",
- /* GPIO2_C4-C7 */
- "", "", "", "",
-
- /* GPIO2_D0-D3 */
- "", "", "", "",
- /* GPIO2_D4-D7 */
- "", "", "", "";
-};
-
-&gpio3 {
- gpio-line-names =
- /* GPIO3_A0-A3 */
- "", "PIN_24", "", "",
- /* GPIO3_A4-A7 */
- "", "", "", "",
-
- /* GPIO3_B0-B3 */
- "", "", "", "EXTPIN_13",
- /* GPIO3_B4-B7 */
- "EXTPIN_14", "PIN_5", "PIN_3", "",
-
- /* GPIO3_C0-C3 */
- "", "PIN_19", "PIN_21", "PIN_23",
- /* GPIO3_C4-C7 */
- "EXTPIN_11", "EXTPIN_12", "", "",
-
- /* GPIO3_D0-D3 */
- "", "", "", "",
- /* GPIO3_D4-D7 */
- "", "", "", "";
-};
-
-&gpio4 {
- gpio-line-names =
- /* GPIO4_A0-A3 */
- "", "", "", "",
- /* GPIO4_A4-A7 */
- "", "", "", "",
-
- /* GPIO4_B0-B3 */
- "", "", "", "",
- /* GPIO4_B4-B7 */
- "", "", "", "",
-
- /* GPIO4_C0-C3 */
- "", "", "", "",
- /* GPIO4_C4-C7 */
- "", "", "", "",
-
- /* GPIO4_D0-D3 */
- "", "", "", "",
- /* GPIO4_D4-D7 */
- "", "", "", "";
-};
-
&gpu {
mali-supply = <&vdd_gpu>;
status = "okay";
@@ -368,7 +267,6 @@ vdd_cpu: tcs4525@1c {
regulator-name = "vdd_cpu";
regulator-min-microvolt = <712500>;
regulator-max-microvolt = <1390000>;
- regulator-init-microvolt = <900000>;
regulator-ramp-delay = <2300>;
fcs,suspend-voltage-selector = <1>;
regulator-boot-on;
@@ -409,7 +307,6 @@ vdd_logic: DCDC_REG1 {
regulator-boot-on;
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <1350000>;
- regulator-init-microvolt = <900000>;
regulator-ramp-delay = <6001>;
regulator-initial-mode = <0x2>;
regulator-name = "vdd_logic";
@@ -423,7 +320,6 @@ vdd_gpu: DCDC_REG2 {
regulator-boot-on;
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <1350000>;
- regulator-init-microvolt = <900000>;
regulator-ramp-delay = <6001>;
regulator-initial-mode = <0x2>;
regulator-name = "vdd_gpu";
@@ -447,7 +343,6 @@ vdd_npu: DCDC_REG4 {
regulator-boot-on;
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <1350000>;
- regulator-init-microvolt = <900000>;
regulator-ramp-delay = <6001>;
regulator-initial-mode = <0x2>;
regulator-name = "vdd_npu";
@@ -587,6 +482,9 @@ regulator-state-mem {
};
};
};
+ codec {
+ rockchip,mic-in-differential;
+ };
};
};
@@ -611,7 +509,7 @@ &i2s0_8ch {
&i2s1_8ch {
status = "okay";
- rockchip,clk-trcm = <1>;
+ rockchip,trcm-sync-tx-only;
pinctrl-names = "default";
pinctrl-0 = <&i2s1m0_sclktx
&i2s1m0_lrcktx
@@ -620,7 +518,7 @@ &i2s1m0_sdi0
};
&mdio1 {
- rgmii_phy1: phy@0 {
+ rgmii_phy1: ethernet-phy@0 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <0x0>;
};
@@ -634,62 +532,6 @@ &pcie2x1 {
};
&pinctrl {
- gmac1 {
- gmac1m1_miim: gmac1m1-miim {
- rockchip,pins =
- /* gmac1_mdcm1 */
- <4 RK_PB6 3 &pcfg_pull_none_drv_level_15>,
- /* gmac1_mdiom1 */
- <4 RK_PB7 3 &pcfg_pull_none_drv_level_15>;
- };
-
- gmac1m1_clkinout: gmac1m1-clkinout {
- rockchip,pins =
- /* gmac1_mclkinoutm1 */
- <4 RK_PC1 3 &pcfg_pull_none_drv_level_15>;
- };
-
- gmac1m1_rx_bus2: gmac1m1-rx-bus2 {
- rockchip,pins =
- /* gmac1_rxd0m1 */
- <4 RK_PA7 3 &pcfg_pull_none_drv_level_15>,
- /* gmac1_rxd1m1 */
- <4 RK_PB0 3 &pcfg_pull_none_drv_level_15>,
- /* gmac1_rxdvcrsm1 */
- <4 RK_PB1 3 &pcfg_pull_none_drv_level_15>;
- };
-
- gmac1m1_tx_bus2: gmac1m1-tx-bus2 {
- rockchip,pins =
- /* gmac1_txd0m1 */
- <4 RK_PA4 3 &pcfg_pull_none_drv_level_15>,
- /* gmac1_txd1m1 */
- <4 RK_PA5 3 &pcfg_pull_none_drv_level_15>,
- /* gmac1_txenm1 */
- <4 RK_PA6 3 &pcfg_pull_none_drv_level_15>;
- };
-
- gmac1m1_rgmii_clk: gmac1m1-rgmii-clk {
- rockchip,pins =
- /* gmac1_rxclkm1 */
- <4 RK_PA3 3 &pcfg_pull_none_drv_level_15>,
- /* gmac1_txclkm1 */
- <4 RK_PA0 3 &pcfg_pull_none_drv_level_15>;
- };
-
- gmac1m1_rgmii_bus: gmac1m1-rgmii-bus {
- rockchip,pins =
- /* gmac1_rxd2m1 */
- <4 RK_PA1 3 &pcfg_pull_none_drv_level_15>,
- /* gmac1_rxd3m1 */
- <4 RK_PA2 3 &pcfg_pull_none_drv_level_15>,
- /* gmac1_txd2m1 */
- <3 RK_PD6 3 &pcfg_pull_none_drv_level_15>,
- /* gmac1_txd3m1 */
- <3 RK_PD7 3 &pcfg_pull_none_drv_level_15>;
- };
- };
-
leds {
led_power_en: led_power_en {
rockchip,pins = <0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
@@ -825,7 +667,7 @@ &usb2phy0_host {
};
&usb2phy0_otg {
- vbus-supply = <&vcc5v0_usb_otg>;
+ phy-supply = <&vcc5v0_usb_otg>;
status = "okay";
};
--
2.40.1

View File

@ -1,43 +0,0 @@
From 641ec8e05726d42c8ec7fa3bda1d8a64f126b475 Mon Sep 17 00:00:00 2001
From: Tim Lunn <tim@feathertop.org>
Date: Fri, 12 Jan 2024 22:32:56 +1100
Subject: [PATCH] arm64: dts: fix vdd_cpu regulator for mainline
---
.../arm64/boot/dts/rockchip/rk3566-odroid-m1s.dts | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3566-odroid-m1s.dts b/arch/arm64/boot/dts/rockchip/rk3566-odroid-m1s.dts
index cbf2495901d7..a5d9216b544b 100644
--- a/arch/arm64/boot/dts/rockchip/rk3566-odroid-m1s.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3566-odroid-m1s.dts
@@ -259,18 +259,19 @@ &hdmi_sound {
&i2c0 {
status = "okay";
- vdd_cpu: tcs4525@1c {
- compatible = "tcs,tcs452x";
+
+ vdd_cpu: regulator@1c {
+ compatible = "tcs,tcs4525";
reg = <0x1c>;
- vin-supply = <&vcc5v0_sys>;
- regulator-compatible = "fan53555-reg";
+ fcs,suspend-voltage-selector = <1>;
regulator-name = "vdd_cpu";
+ regulator-always-on;
+ regulator-boot-on;
regulator-min-microvolt = <712500>;
regulator-max-microvolt = <1390000>;
regulator-ramp-delay = <2300>;
- fcs,suspend-voltage-selector = <1>;
- regulator-boot-on;
- regulator-always-on;
+ vin-supply = <&vcc3v3_sys>;
+
regulator-state-mem {
regulator-off-in-suspend;
};
--
2.40.1

View File

@ -1,51 +0,0 @@
From b4d16cd88ec2701dcb15b9519a79288ea5d2bfec Mon Sep 17 00:00:00 2001
From: Tim Lunn <tim@feathertop.org>
Date: Sat, 3 Feb 2024 23:40:16 +1100
Subject: [PATCH] Remove deprecated snps,reset properties
---
arch/arm64/boot/dts/rockchip/rk3566-odroid-m1s.dts | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3566-odroid-m1s.dts b/arch/arm64/boot/dts/rockchip/rk3566-odroid-m1s.dts
index b8adfd7024f9..e755d00b1d4f 100644
--- a/arch/arm64/boot/dts/rockchip/rk3566-odroid-m1s.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3566-odroid-m1s.dts
@@ -192,8 +192,9 @@ &gmac1 {
assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, <&cru SCLK_GMAC1_RGMII_SPEED>, <&cru SCLK_GMAC1>;
assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>, <&cru SCLK_GMAC1>, <&gmac1_clkin>;
clock_in_out = "input";
- phy-supply = <&vcc_3v3>;
+ phy-handle = <&rgmii_phy1>;
phy-mode = "rgmii";
+ phy-supply = <&vcc_3v3>;
pinctrl-names = "default";
pinctrl-0 = <&gmac1m1_miim
&gmac1m1_tx_bus2
@@ -201,13 +202,8 @@ &gmac1m1_rx_bus2
&gmac1m1_rgmii_clk
&gmac1m1_rgmii_bus
&gmac1m1_clkinout>;
- snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
- snps,reset-active-low;
- /* Reset time is 20ms, 100ms for rtl8211f */
- snps,reset-delays-us = <0 20000 100000>;
tx_delay = <0x4f>;
rx_delay = <0x2d>;
- phy-handle = <&rgmii_phy1>;
status = "okay";
};
@@ -504,6 +500,9 @@ &mdio1 {
rgmii_phy1: ethernet-phy@0 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <0x0>;
+ reset-assert-us = <20000>;
+ reset-deassert-us = <100000>;
+ reset-gpios = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
};
};
--
2.40.1

View File

@ -1,48 +0,0 @@
From ed61d0b5f18bf333ff7f35fc8546dd58d227b12f Mon Sep 17 00:00:00 2001
From: Tim Lunn <tim@feathertop.org>
Date: Sat, 3 Feb 2024 18:38:49 +1100
Subject: [PATCH] Apply fixes for mainline u-boot
---
arch/arm/dts/rk3566-odroid-m1s.dts | 6 +-----
configs/odroid-m1s-rk3566_defconfig | 1 -
2 files changed, 1 insertion(+), 6 deletions(-)
diff --git a/arch/arm/dts/rk3566-odroid-m1s.dts b/arch/arm/dts/rk3566-odroid-m1s.dts
index 73e29d80c7..2dba07ba19 100644
--- a/arch/arm/dts/rk3566-odroid-m1s.dts
+++ b/arch/arm/dts/rk3566-odroid-m1s.dts
@@ -17,12 +17,8 @@
aliases {
ethernet0 = &gmac1;
- i2c0 = &i2c3;
- i2c3 = &i2c0;
mmc0 = &sdhci;
mmc1 = &sdmmc0;
- serial0 = &uart1;
- serial1 = &uart0;
};
chosen {
@@ -578,7 +574,7 @@
disable-wp;
pinctrl-names = "default";
pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det>;
- sd-uhs-sdr50;
+ sd-uhs-sdr104;
vmmc-supply = <&vcc3v3_sd>;
vqmmc-supply = <&vccio_sd>;
status = "okay";
diff --git a/configs/odroid-m1s-rk3566_defconfig b/configs/odroid-m1s-rk3566_defconfig
index d70a10dc08..61b6962063 100644
--- a/configs/odroid-m1s-rk3566_defconfig
+++ b/configs/odroid-m1s-rk3566_defconfig
@@ -106,4 +106,3 @@ CONFIG_USB_DWC3=y
CONFIG_USB_DWC3_GENERIC=y
CONFIG_FS_CRAMFS=y
CONFIG_ERRNO_STR=y
-CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x0800
--
2.40.1

View File

@ -1,44 +0,0 @@
From 2a1d8f586799e4166e802babcce18c9980aa1f44 Mon Sep 17 00:00:00 2001
From: Tim Lunn <tim@feathertop.org>
Date: Thu, 1 Feb 2024 17:50:46 +1100
Subject: [PATCH] Improve reliability of eMMC
Cherry-picked from:
20240126232615.6826-2-jonas@kwiboo.se
---
arch/arm/dts/rk3566-odroid-m1s-u-boot.dtsi | 4 ----
configs/odroid-m1s-rk3566_defconfig | 2 ++
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/arch/arm/dts/rk3566-odroid-m1s-u-boot.dtsi b/arch/arm/dts/rk3566-odroid-m1s-u-boot.dtsi
index 33a1d142b8..04d0cd17ef 100644
--- a/arch/arm/dts/rk3566-odroid-m1s-u-boot.dtsi
+++ b/arch/arm/dts/rk3566-odroid-m1s-u-boot.dtsi
@@ -14,11 +14,7 @@
&sdhci {
cap-mmc-highspeed;
- mmc-ddr-1_8v;
mmc-hs200-1_8v;
- mmc-hs400-1_8v;
- mmc-hs400-enhanced-strobe;
- pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd &emmc_datastrobe>;
};
&uart2 {
diff --git a/configs/odroid-m1s-rk3566_defconfig b/configs/odroid-m1s-rk3566_defconfig
index 61b6962063..7920ef224d 100644
--- a/configs/odroid-m1s-rk3566_defconfig
+++ b/configs/odroid-m1s-rk3566_defconfig
@@ -70,6 +70,8 @@ CONFIG_ROCKCHIP_GPIO=y
CONFIG_SYS_I2C_ROCKCHIP=y
CONFIG_MISC=y
CONFIG_SUPPORT_EMMC_RPMB=y
+CONFIG_MMC_HS200_SUPPORT=y
+CONFIG_SPL_MMC_HS200_SUPPORT=y
CONFIG_MMC_DW=y
CONFIG_MMC_DW_ROCKCHIP=y
CONFIG_MMC_SDHCI=y
--
2.40.1

View File

@ -1,52 +0,0 @@
From 65a304151817626157e7be4e7e1581cdddca2a02 Mon Sep 17 00:00:00 2001
From: Tim Lunn <tim@feathertop.org>
Date: Sat, 3 Feb 2024 23:42:47 +1100
Subject: [PATCH] Fix ethernet properties
---
arch/arm/dts/rk3566-odroid-m1s.dts | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/arch/arm/dts/rk3566-odroid-m1s.dts b/arch/arm/dts/rk3566-odroid-m1s.dts
index 2dba07ba19..73b545109d 100644
--- a/arch/arm/dts/rk3566-odroid-m1s.dts
+++ b/arch/arm/dts/rk3566-odroid-m1s.dts
@@ -197,10 +197,9 @@
};
&gmac1 {
- assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>;
- assigned-clock-rates = <0>, <125000000>;
- assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, <&cru SCLK_GMAC1>;
- clock_in_out = "output";
+ assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, <&cru SCLK_GMAC1_RGMII_SPEED>, <&cru SCLK_GMAC1>;
+ assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>, <&cru SCLK_GMAC1>, <&gmac1_clkin>;
+ clock_in_out = "input";
phy-handle = <&rgmii_phy1>;
phy-mode = "rgmii";
phy-supply = <&vcc3v3_sys>;
@@ -211,10 +210,9 @@
&gmac1m1_rgmii_clk
&gmac1m1_rgmii_bus
&gmac1m1_clkinout>;
- status = "okay";
-
tx_delay = <0x4f>;
rx_delay = <0x2d>;
+ status = "okay";
};
&gpu {
@@ -496,6 +494,9 @@
rgmii_phy1: ethernet-phy@0 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <0x0>;
+ reset-assert-us = <20000>;
+ reset-deassert-us = <100000>;
+ reset-gpios = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
};
};
--
2.40.1

View File

@ -1,8 +1,11 @@
From c51639443d3c90127a77f1534e39dd01fac1577f Mon Sep 17 00:00:00 2001
From d4ec3799c0773b3a6d3d90f4b16eec1f50e4b032 Mon Sep 17 00:00:00 2001
From: memeka <mihailescu2m@gmail.com>
Date: Fri, 18 Jan 2019 14:36:21 +1030
Subject: [PATCH] ODROID-XU4: regulator: s2mps11: add ethernet power reset in
shutdown function
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Ethernet device cannot be detected on warm boot sometimes. This patch is
to add the power reset routines for ethernet device using PMIC. Then
@ -11,15 +14,17 @@ ethernet device can be reset hardware-wise.
Change-Id: Iffbe2966da7e4679f63b91ab79241167391792df
Signed-off-by: Brian Kim <brian.kim@hardkernel.com>
Signed-off-by: Marian Mihailescu <mihailescu2m@gmail.com>
[Updated patch for Linux 6.11+ after scoped memory allocation refactor]
Signed-off-by: Jan Čermák <sairon@sairon.cz>
---
drivers/regulator/s2mps11.c | 55 +++++++++++++++++++++++++++++++++++++
1 file changed, 55 insertions(+)
drivers/regulator/s2mps11.c | 56 +++++++++++++++++++++++++++++++++++++
1 file changed, 56 insertions(+)
diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c
index 570b61420f3a..286b606660a4 100644
index 7dcf92af8f15e..f08f6f494fe0b 100644
--- a/drivers/regulator/s2mps11.c
+++ b/drivers/regulator/s2mps11.c
@@ -1117,6 +1117,57 @@ static const struct regulator_desc s2mpu02_regulators[] = {
@@ -1118,6 +1118,57 @@ static const struct regulator_desc s2mpu02_regulators[] = {
regulator_desc_s2mpu02_buck7(7),
};
@ -77,7 +82,7 @@ index 570b61420f3a..286b606660a4 100644
static int s2mps11_pmic_probe(struct platform_device *pdev)
{
struct sec_pmic_dev *iodev = dev_get_drvdata(pdev->dev.parent);
@@ -1219,6 +1270,10 @@ static int s2mps11_pmic_probe(struct platform_device *pdev)
@@ -1219,6 +1270,11 @@ static int s2mps11_pmic_probe(struct platform_device *pdev)
}
}
@ -85,6 +90,7 @@ index 570b61420f3a..286b606660a4 100644
+ s2mps11_pmic_ethonoff(pdev, false);
+ mdelay(10);
+ s2mps11_pmic_ethonoff(pdev, true);
out:
kfree(rdata);
+
return 0;
}

View File

@ -1,4 +1,4 @@
From 024796cbf752d2e210341ae8609792803641eb92 Mon Sep 17 00:00:00 2001
From f63ef87b9a9bf9997aa4017f8380567b20a1810c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= <sairon@sairon.cz>
Date: Thu, 7 Nov 2024 12:39:02 +0100
Subject: [PATCH] HACK: mmc: meson-gx: limit f_max to 24 MHz on the first try
@ -25,10 +25,10 @@ Signed-off-by: Jan Čermák <sairon@sairon.cz>
3 files changed, 15 insertions(+)
diff --git a/drivers/mmc/meson_gx_mmc.c b/drivers/mmc/meson_gx_mmc.c
index fcf4f03d1e..715dce3522 100644
index 5852b24c6d2..0e0265de359 100644
--- a/drivers/mmc/meson_gx_mmc.c
+++ b/drivers/mmc/meson_gx_mmc.c
@@ -283,6 +283,8 @@ static int meson_mmc_probe(struct udevice *dev)
@@ -282,6 +282,8 @@ static int meson_mmc_probe(struct udevice *dev)
cfg->b_max = 511; /* max 512 - 1 blocks */
cfg->name = dev->name;
@ -38,10 +38,10 @@ index fcf4f03d1e..715dce3522 100644
upriv->mmc = mmc;
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index d96db7a0f8..c8dc676612 100644
index 799586891af..85b6210f220 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -1652,6 +1652,10 @@ int mmc_set_clock(struct mmc *mmc, uint clock, bool disable)
@@ -1694,6 +1694,10 @@ int mmc_set_clock(struct mmc *mmc, uint clock, bool disable)
clock = mmc->cfg->f_min;
}
@ -52,7 +52,7 @@ index d96db7a0f8..c8dc676612 100644
mmc->clock = clock;
mmc->clk_disable = disable;
@@ -2647,6 +2651,13 @@ static int mmc_startup(struct mmc *mmc)
@@ -2701,6 +2705,13 @@ static int mmc_startup(struct mmc *mmc)
if (err)
return err;
err = mmc_select_mode_and_width(mmc, mmc->card_caps);
@ -67,13 +67,13 @@ index d96db7a0f8..c8dc676612 100644
#endif
if (err)
diff --git a/include/mmc.h b/include/mmc.h
index 1022db3ffa..0ea48c6fd9 100644
index e4b960b7294..5ad40cf2ed1 100644
--- a/include/mmc.h
+++ b/include/mmc.h
@@ -739,6 +739,8 @@ struct mmc {
u8 hs400_tuning;
@@ -760,6 +760,8 @@ struct mmc {
enum bus_mode user_speed_mode; /* input speed mode from user */
CONFIG_IS_ENABLED(CYCLIC, (struct cyclic_info cyclic));
+
+ bool meson_gx_f_max_hack;
};

View File

@ -1,4 +1,4 @@
From e780a5f405a02e3102c471415f7b0ad73a5cc036 Mon Sep 17 00:00:00 2001
From 8286ad3b1e761138e3c574160a5e1a2d6ed06084 Mon Sep 17 00:00:00 2001
From: Stefan Agner <stefan@agner.ch>
Date: Mon, 11 Jan 2021 11:20:48 +0100
Subject: [PATCH] arm64: dts: meson: g12b: add power button support
@ -13,7 +13,7 @@ Signed-off-by: Stefan Agner <stefan@agner.ch>
1 file changed, 11 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid.dtsi
index 9e12a34b2840..c27eae6488ce 100644
index 09d959aefb184..6be653ac77fac 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid.dtsi
@@ -38,6 +38,17 @@ fan: gpio-fan {

View File

@ -1,4 +1,4 @@
From cff7ba94733d9103487d87a6474e2ab026bd718c Mon Sep 17 00:00:00 2001
From 6835f658a2c21d38730c1280587cf3768a82ad60 Mon Sep 17 00:00:00 2001
From: Stefan Agner <stefan@agner.ch>
Date: Mon, 11 Jan 2021 11:38:54 +0100
Subject: [PATCH] arm64: dts: meson: g12b: add GPIO fan support
@ -13,7 +13,7 @@ Signed-off-by: Stefan Agner <stefan@agner.ch>
1 file changed, 11 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid.dtsi
index c27eae6488ce..db8a2dfaf0b3 100644
index 6be653ac77fac..10dd23a3b44bc 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid.dtsi
@@ -49,6 +49,17 @@ power-button {

View File

@ -1,4 +1,4 @@
From 8d781fc504780a3aa8ef751724e3749c2bfda7a9 Mon Sep 17 00:00:00 2001
From 297031995dabde203581d555e9ddd91a50d155dc Mon Sep 17 00:00:00 2001
From: Stefan Agner <stefan@agner.ch>
Date: Mon, 11 Jan 2021 15:53:55 +0100
Subject: [PATCH] arm64: dts: meson: g12b: odroid-n2: add fan as cooling device
@ -17,7 +17,7 @@ Signed-off-by: Stefan Agner <stefan@agner.ch>
1 file changed, 38 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid.dtsi
index db8a2dfaf0b3..843e66332369 100644
index 10dd23a3b44bc..13624c6522abc 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid.dtsi
@@ -245,6 +245,44 @@ &clkc_audio {

View File

@ -1,4 +1,4 @@
From 01ac730fa92a030690a7701c9b8781bc4ef7bcae Mon Sep 17 00:00:00 2001
From 742764eb039d8d96aa43afeb62a89b122073bb98 Mon Sep 17 00:00:00 2001
From: Hyeonki Hong <hhk7734@gmail.com>
Date: Fri, 27 Mar 2020 17:05:22 +0900
Subject: [PATCH] arm64: dts: meson: add uart_A node
@ -12,7 +12,7 @@ Signed-off-by: Stefan Agner <stefan@agner.ch>
1 file changed, 7 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid.dtsi
index 843e66332369..61caadd679e2 100644
index 13624c6522abc..6a1330b40cf4d 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid.dtsi
@@ -12,6 +12,7 @@

View File

@ -1,4 +1,4 @@
From f5676219e12b48a0f591e911797304fae05ca78c Mon Sep 17 00:00:00 2001
From bb0da00e7b89510fb66c7a8a1acf16d9f58a45fe Mon Sep 17 00:00:00 2001
From: Stefan Agner <stefan@agner.ch>
Date: Thu, 29 Apr 2021 21:32:43 +0200
Subject: [PATCH] arm64: dts: meson: add i2c2 node to ODROID N2/N2+
@ -13,11 +13,11 @@ Signed-off-by: Stefan Agner <stefan@agner.ch>
1 file changed, 6 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
index 91c9769fda20..ececc6b17639 100644
index 3bca8023638d4..45f6dada0edee 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
@@ -248,6 +248,12 @@ usb-hub-hog {
};
@@ -264,6 +264,12 @@ &gpio {
"PIN_36"; /* GPIOX_19 */
};
+&i2c2 {

View File

@ -1,4 +1,4 @@
From 1c9c3ca476adf09884295e9f8298288ea497e5ac Mon Sep 17 00:00:00 2001
From 37b8576e97c3a130160bd5908220c67b2258a443 Mon Sep 17 00:00:00 2001
From: Hyeonki Hong <hhk7734@gmail.com>
Date: Tue, 1 Mar 2022 21:51:50 +0100
Subject: [PATCH] ODROID-C4: arm64/dts: add uart_A node
@ -8,7 +8,7 @@ Subject: [PATCH] ODROID-C4: arm64/dts: add uart_A node
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi
index 1db2327bbd13..e67869fbb460 100644
index 7b0e9817a615d..a41fc1cfdeead 100644
--- a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi
@@ -10,8 +10,9 @@
@ -22,7 +22,7 @@ index 1db2327bbd13..e67869fbb460 100644
};
chosen {
@@ -449,6 +450,12 @@ &tohdmitx {
@@ -453,6 +454,12 @@ &tohdmitx {
status = "okay";
};

View File

@ -1,4 +1,4 @@
From 9cd343da01d9b69ad33444105208949775c909b4 Mon Sep 17 00:00:00 2001
From 837c71af687b26385467b5c1e58208de325f6d26 Mon Sep 17 00:00:00 2001
From: Hyeonki Hong <hhk7734@gmail.com>
Date: Tue, 1 Mar 2022 21:53:32 +0100
Subject: [PATCH] ODROID-C4: arm64/dts: add i2c2, i2c3 node
@ -8,7 +8,7 @@ Subject: [PATCH] ODROID-C4: arm64/dts: add i2c2, i2c3 node
1 file changed, 53 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi
index e67869fbb460..90d2eea7fe24 100644
index a41fc1cfdeead..ceb8a182820fd 100644
--- a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi
@@ -11,6 +11,8 @@
@ -20,7 +20,7 @@ index e67869fbb460..90d2eea7fe24 100644
serial0 = &uart_AO;
serial1 = &uart_A;
};
@@ -386,6 +388,57 @@ &ir {
@@ -390,6 +392,57 @@ &ir {
pinctrl-names = "default";
};

View File

@ -1,4 +1,4 @@
From 299d45dd82df026c0164e170d476b56eada4aa77 Mon Sep 17 00:00:00 2001
From 94625c724799c8082ab0f195e1799f88b352203d Mon Sep 17 00:00:00 2001
From: Stefan Agner <stefan@agner.ch>
Date: Wed, 15 Feb 2023 20:15:07 +0100
Subject: [PATCH] arm64: dts: amlogic: add uartA/uartC to ODROID-C2
@ -9,7 +9,7 @@ Signed-off-by: Stefan Agner <stefan@agner.ch>
1 file changed, 14 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
index e6d2de7c45a9..c6a38d890db5 100644
index 959bd8d77a82e..557ad0cf8f975 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
@@ -17,6 +17,8 @@ / {
@ -21,7 +21,7 @@ index e6d2de7c45a9..c6a38d890db5 100644
ethernet0 = &ethmac;
};
@@ -383,6 +385,18 @@ &uart_AO {
@@ -387,6 +389,18 @@ &uart_AO {
pinctrl-names = "default";
};

View File

@ -1,4 +1,4 @@
From 61a378b42a2f61589cc62ff85334dd607014cb6d Mon Sep 17 00:00:00 2001
From 2ee967384a0062b0de6a4259a9d9c839e11b1120 Mon Sep 17 00:00:00 2001
From: Stefan Agner <stefan@agner.ch>
Date: Wed, 15 Feb 2023 20:16:29 +0100
Subject: [PATCH] arm64: dts: amlogic: meson-gx: add missing pins for I2C A/B
@ -9,10 +9,10 @@ Signed-off-by: Stefan Agner <stefan@agner.ch>
1 file changed, 4 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
index 12ef6e81c8bd..90ae81493de2 100644
index ed00e67e6923a..460a21a4f551a 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
@@ -333,6 +333,8 @@ &hwrng {
@@ -339,6 +339,8 @@ &hwrng {
&i2c_A {
clocks = <&clkc CLKID_I2C>;
@ -21,7 +21,7 @@ index 12ef6e81c8bd..90ae81493de2 100644
};
&i2c_AO {
@@ -341,6 +343,8 @@ &i2c_AO {
@@ -347,6 +349,8 @@ &i2c_AO {
&i2c_B {
clocks = <&clkc CLKID_I2C>;

View File

@ -296,7 +296,6 @@ CONFIG_TCG_TIS_I2C_INFINEON=y
CONFIG_I2C_CHARDEV=y
CONFIG_I2C_MUX=y
CONFIG_I2C_MUX_PCA954x=y
CONFIG_I2C_DESIGNWARE_PLATFORM=y
CONFIG_I2C_GPIO=m
CONFIG_I2C_MESON=y
CONFIG_I2C_RK3X=y
@ -332,7 +331,6 @@ CONFIG_GPIO_MAX732X=y
CONFIG_GPIO_PCA953X=y
CONFIG_GPIO_PCA953X_IRQ=y
CONFIG_GPIO_MAX77620=y
CONFIG_POWER_RESET_BRCMSTB=y
CONFIG_POWER_RESET_XGENE=y
CONFIG_POWER_RESET_SYSCON=y
CONFIG_SYSCON_REBOOT_MODE=y
@ -546,7 +544,6 @@ CONFIG_LEDS_TRIGGER_HEARTBEAT=y
CONFIG_LEDS_TRIGGER_CPU=y
CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
CONFIG_LEDS_TRIGGER_PANIC=y
CONFIG_LEDS_TRIGGER_AUDIO=m
CONFIG_EDAC=y
CONFIG_RTC_CLASS=y
CONFIG_RTC_DRV_DS1307=m
@ -587,7 +584,6 @@ CONFIG_HWSPINLOCK=y
CONFIG_ARM_SMMU=y
CONFIG_ARM_SMMU_V3=y
CONFIG_REMOTEPROC=y
CONFIG_SOC_BRCMSTB=y
CONFIG_SOC_TI=y
CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND=y
CONFIG_EXTCON_USB_GPIO=y

View File

@ -1,17 +1,17 @@
###########################################
part start mmc ${devnum} 9 mmc_env
mmc dev ${devnum}
part start ${devtype} ${devnum} 9 mmc_env
${devtype} dev ${devnum}
setenv loadbootstate " \
echo 'loading env...'; \
mmc read ${ramdisk_addr_r} ${mmc_env} 0x10; \
${devtype} read ${ramdisk_addr_r} ${mmc_env} 0x10; \
env import -c ${ramdisk_addr_r} 0x2000;"
setenv storebootstate " \
echo 'storing env...'; \
env export -c -s 0x2000 ${ramdisk_addr_r} BOOT_ORDER BOOT_A_LEFT BOOT_B_LEFT MACHINE_ID; \
mmc write ${ramdisk_addr_r} ${mmc_env} 0x10;"
${devtype} write ${ramdisk_addr_r} ${mmc_env} 0x10;"
run loadbootstate
test -n "${BOOT_ORDER}" || setenv BOOT_ORDER "A B"
@ -29,31 +29,31 @@ setenv bootargs_a "root=PARTUUID=48617373-06 ro rootwait"
setenv bootargs_b "root=PARTUUID=48617373-08 ro rootwait"
# Load environment from haos-config.txt
if test -e mmc ${devnum}:1 haos-config.txt; then
fatload mmc ${devnum}:1 ${ramdisk_addr_r} haos-config.txt
if test -e ${devtype} ${devnum}:1 haos-config.txt; then
fatload ${devtype} ${devnum}:1 ${ramdisk_addr_r} haos-config.txt
env import -t ${ramdisk_addr_r} ${filesize}
fi
# Load extraargs
fileenv mmc ${devnum}:1 ${ramdisk_addr_r} cmdline.txt cmdline
fileenv ${devtype} ${devnum}:1 ${ramdisk_addr_r} cmdline.txt cmdline
# Load device tree
setenv fdtfile "meson-g12b-s922x-khadas-vim3.dtb"
echo "Loading standard device tree ${fdtfile}"
fatload mmc ${devnum}:1 ${fdt_addr_r} ${fdtfile}
fatload ${devtype} ${devnum}:1 ${fdt_addr_r} ${fdtfile}
fdt addr ${fdt_addr_r}
# load dt overlays
fdt resize 65536
for overlay_file in ${overlays}; do
if fatload mmc ${devnum}:1 ${ramdisk_addr_r} overlays/${overlay_file}.dtbo; then
if fatload ${devtype} ${devnum}:1 ${ramdisk_addr_r} overlays/${overlay_file}.dtbo; then
echo "Applying kernel provided DT overlay ${overlay_file}.dtbo"
fdt apply ${ramdisk_addr_r} || setenv overlay_error "true"
fi
done
if test "${overlay_error}" = "true"; then
echo "Error applying DT overlays, restoring original DT"
fatload mmc ${devnum}:1 ${fdt_addr_r} ${fdtfile}
fatload ${devtype} ${devnum}:1 ${fdt_addr_r} ${fdtfile}
fi
# logical volumes get numbered after physical ones.
@ -74,7 +74,7 @@ for BOOT_SLOT in "${BOOT_ORDER}"; do
if test ${BOOT_A_LEFT} -gt 0; then
setexpr BOOT_A_LEFT ${BOOT_A_LEFT} - 1
echo "Trying to boot slot A, ${BOOT_A_LEFT} attempts remaining. Loading kernel ..."
if load mmc ${devnum}:5 ${kernel_addr_r} Image; then
if load ${devtype} ${devnum}:5 ${kernel_addr_r} Image; then
setenv bootargs "${bootargs_hassos} ${bootargs_a} rauc.slot=A ${cmdline}"
fi
fi
@ -82,7 +82,7 @@ for BOOT_SLOT in "${BOOT_ORDER}"; do
if test ${BOOT_B_LEFT} -gt 0; then
setexpr BOOT_B_LEFT ${BOOT_B_LEFT} - 1
echo "Trying to boot slot B, ${BOOT_B_LEFT} attempts remaining. Loading kernel ..."
if load mmc ${devnum}:7 ${kernel_addr_r} Image; then
if load ${devtype} ${devnum}:7 ${kernel_addr_r} Image; then
setenv bootargs "${bootargs_hassos} ${bootargs_b} rauc.slot=B ${cmdline}"
fi
fi

View File

@ -1,4 +1,4 @@
From 9b1367f47f2e790f155d4aab39878233eedf7b22 Mon Sep 17 00:00:00 2001
From 015fa4136338919a43c1c6e47e8c07679cefbaa2 Mon Sep 17 00:00:00 2001
From: Zhangqun Ming <north_sea@qq.com>
Date: Thu, 6 Jul 2023 10:05:04 +0000
Subject: [PATCH] arm64: dts: rockchip: Add NabuCasa Green board
@ -8,30 +8,32 @@ Content-Transfer-Encoding: 8bit
[Replaced custom rk860x driver with upstream fan53555]
Signed-off-by: Jan Čermák <sairon@sairon.cz>
[Enabled Rockchip RNG from rk356x.dtsi]
Signed-off-by: Jan Čermák <sairon@sairon.cz>
---
arch/arm64/boot/dts/rockchip/Makefile | 1 +
.../boot/dts/rockchip/rk3566-ha-green.dts | 684 ++++++++++++++++++
2 files changed, 685 insertions(+)
.../boot/dts/rockchip/rk3566-ha-green.dts | 688 ++++++++++++++++++
2 files changed, 689 insertions(+)
create mode 100644 arch/arm64/boot/dts/rockchip/rk3566-ha-green.dts
diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile
index e7728007fd1b..475becd793ac 100644
index 09423070c9928..1f5a9d690648f 100644
--- a/arch/arm64/boot/dts/rockchip/Makefile
+++ b/arch/arm64/boot/dts/rockchip/Makefile
@@ -75,6 +75,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-anbernic-rg353ps.dtb
@@ -83,6 +83,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-anbernic-rg353ps.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-anbernic-rg353v.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-anbernic-rg353vs.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-anbernic-rg503.dtb
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-ha-green.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-pinenote-v1.1.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-pinenote-v1.2.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-quartz64-a.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-odroid-m1s.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-orangepi-3b-v1.1.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-orangepi-3b-v2.1.dtb
diff --git a/arch/arm64/boot/dts/rockchip/rk3566-ha-green.dts b/arch/arm64/boot/dts/rockchip/rk3566-ha-green.dts
new file mode 100644
index 000000000000..b5e4a67b3fc7
index 0000000000000..d6a86cc57b65e
--- /dev/null
+++ b/arch/arm64/boot/dts/rockchip/rk3566-ha-green.dts
@@ -0,0 +1,684 @@
@@ -0,0 +1,688 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2023 Seeed Co., Ltd.
@ -559,6 +561,10 @@ index 000000000000..b5e4a67b3fc7
+ status = "okay";
+};
+
+&rng {
+ status = "okay";
+};
+
+&saradc {
+ vref-supply = <&vcca_1v8>;
+ status = "okay";

View File

@ -1,4 +1,4 @@
From be773999495258994d1df04448a4de43d58db9c4 Mon Sep 17 00:00:00 2001
From 8bd12039ef70b3b78a588da61f6680cee40b65cf Mon Sep 17 00:00:00 2001
From: Zhangqun Ming <north_sea@qq.com>
Date: Wed, 12 Jul 2023 02:33:03 +0000
Subject: [PATCH] drivers: mfd: rk808: set PWRON_LP_OFF_TIME 12s
@ -9,10 +9,10 @@ Subject: [PATCH] drivers: mfd: rk808: set PWRON_LP_OFF_TIME 12s
2 files changed, 6 insertions(+)
diff --git a/drivers/mfd/rk8xx-core.c b/drivers/mfd/rk8xx-core.c
index a577f950c632..418a4506c99e 100644
index 39ab114ea669d..c7a639b25231f 100644
--- a/drivers/mfd/rk8xx-core.c
+++ b/drivers/mfd/rk8xx-core.c
@@ -232,6 +232,7 @@ static const struct rk808_reg_data rk817_pre_init_reg[] = {
@@ -263,6 +263,7 @@ static const struct rk808_reg_data rk817_pre_init_reg[] = {
{RK817_GPIO_INT_CFG, RK817_INT_POL_MSK, RK817_INT_POL_L},
{RK817_SYS_CFG(1), RK817_HOTDIE_TEMP_MSK | RK817_TSD_TEMP_MSK,
RK817_HOTDIE_105 | RK817_TSD_140},
@ -21,10 +21,10 @@ index a577f950c632..418a4506c99e 100644
static const struct rk808_reg_data rk818_pre_init_reg[] = {
diff --git a/include/linux/mfd/rk808.h b/include/linux/mfd/rk808.h
index 78e167a92483..0bd7031966d6 100644
index 69cbea78b430b..2a9563caa3e24 100644
--- a/include/linux/mfd/rk808.h
+++ b/include/linux/mfd/rk808.h
@@ -1052,6 +1052,11 @@ enum rk809_reg_id {
@@ -1195,6 +1195,11 @@ enum rk809_reg_id {
#define RK817_ON_SOURCE_REG 0xf5
#define RK817_OFF_SOURCE_REG 0xf6

View File

@ -1,4 +1,4 @@
From 41026603d639007895de1f48437813f78edb62ea Mon Sep 17 00:00:00 2001
From c0430945cd4a6a5b4072662b44cb6a44d3f7ecc2 Mon Sep 17 00:00:00 2001
From: Zhangqun Ming <north_sea@qq.com>
Date: Sat, 15 Jul 2023 08:28:16 +0000
Subject: [PATCH] arch: arm64: dts: green: Remove spiflash partitions
@ -8,10 +8,10 @@ Subject: [PATCH] arch: arm64: dts: green: Remove spiflash partitions
1 file changed, 2 insertions(+), 29 deletions(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3566-ha-green.dts b/arch/arm64/boot/dts/rockchip/rk3566-ha-green.dts
index b5e4a67b3fc7..debb9459a5aa 100644
index d6a86cc57b65e..6336fe758819f 100644
--- a/arch/arm64/boot/dts/rockchip/rk3566-ha-green.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3566-ha-green.dts
@@ -565,36 +565,9 @@ &sfc {
@@ -569,36 +569,9 @@ &sfc {
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;

View File

@ -1,4 +1,4 @@
From 0c8b1453993f15715836123bfc7c164e568913f2 Mon Sep 17 00:00:00 2001
From c3f803f835db301e586127b061bd473fb61ec13a Mon Sep 17 00:00:00 2001
From: Stefan Agner <stefan@agner.ch>
Date: Wed, 19 Jul 2023 10:08:06 +0200
Subject: [PATCH] Input: rk805-pwrkey: reverse polarity of pwrkey
@ -12,7 +12,7 @@ Signed-off-by: Stefan Agner <stefan@agner.ch>
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/input/misc/rk805-pwrkey.c b/drivers/input/misc/rk805-pwrkey.c
index 76873aa005b4..139419033c84 100644
index 76873aa005b41..139419033c84a 100644
--- a/drivers/input/misc/rk805-pwrkey.c
+++ b/drivers/input/misc/rk805-pwrkey.c
@@ -19,7 +19,7 @@ static irqreturn_t pwrkey_fall_irq(int irq, void *_pwr)

View File

@ -1,4 +1,4 @@
From 858d26179ee3a06fc7ebadf2c49dc337a7a98485 Mon Sep 17 00:00:00 2001
From 3d75827d0318c792d4d7a68d7d7076deee3e7ad3 Mon Sep 17 00:00:00 2001
From: zhangcy <chengyu.zhang@seeed.cc>
Date: Mon, 14 Aug 2023 01:27:34 +0000
Subject: [PATCH] green: emmc use HS200 mode
@ -8,10 +8,10 @@ Subject: [PATCH] green: emmc use HS200 mode
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3566-ha-green.dts b/arch/arm64/boot/dts/rockchip/rk3566-ha-green.dts
index debb9459a5aa..e4b1e80641b9 100644
index 6336fe758819f..61083a9885a78 100644
--- a/arch/arm64/boot/dts/rockchip/rk3566-ha-green.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3566-ha-green.dts
@@ -532,6 +532,7 @@ &saradc {
@@ -536,6 +536,7 @@ &saradc {
&sdhci {
bus-width = <8>;

View File

@ -1,4 +1,4 @@
From 6b926b041e939655d3a88202bde32f4901459a65 Mon Sep 17 00:00:00 2001
From 6219da5138cdcdd0186187e8591010bbda5dc8a9 Mon Sep 17 00:00:00 2001
From: Stefan Agner <stefan@agner.ch>
Date: Mon, 4 Sep 2023 22:36:10 +0200
Subject: [PATCH] arch: arm64: dts: green: Improve LED representation
@ -9,7 +9,7 @@ Fix color and use labels/node names according to the LEDs functionality.
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3566-ha-green.dts b/arch/arm64/boot/dts/rockchip/rk3566-ha-green.dts
index e4b1e80641b9..1d0db11db3e0 100644
index 61083a9885a78..df260be4211d9 100644
--- a/arch/arm64/boot/dts/rockchip/rk3566-ha-green.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3566-ha-green.dts
@@ -48,16 +48,18 @@ hdmi_con_in: endpoint {

View File

@ -1,33 +1,35 @@
From 501ac314ef709d6ecac3047310d5e48a473df638 Mon Sep 17 00:00:00 2001
From 99fdcac59b4c993dcac1869e8372dc895ffa0ae5 Mon Sep 17 00:00:00 2001
From: Zhangqun Ming <north_sea@qq.com>
Date: Thu, 6 Jul 2023 10:06:35 +0000
Subject: [PATCH] arch: arm: dts: Add NabuCasa Green board
---
arch/arm/dts/Makefile | 1 +
arch/arm/dts/Makefile | 3 +
arch/arm/dts/rk3566-ha-green-u-boot.dtsi | 28 +
arch/arm/dts/rk3566-ha-green.dts | 685 +++++++++++++++++++++++
configs/green_defconfig | 74 +++
4 files changed, 788 insertions(+)
4 files changed, 790 insertions(+)
create mode 100644 arch/arm/dts/rk3566-ha-green-u-boot.dtsi
create mode 100644 arch/arm/dts/rk3566-ha-green.dts
create mode 100644 configs/green_defconfig
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 9d28a485be..f78839f9cc 100644
index 6ad59aeed5f..92c6fa54caa 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -172,6 +172,7 @@ dtb-$(CONFIG_ROCKCHIP_RK3399) += \
@@ -87,6 +87,9 @@ dtb-$(CONFIG_ROCKCHIP_RK3368) += \
rk3368-geekbox.dtb \
rk3368-px5-evb.dtb \
+dtb-$(CONFIG_ROCKCHIP_RK3568) += \
+ rk3566-ha-green.dtb
+
dtb-$(CONFIG_ARCH_S5P4418) += \
s5p4418-nanopi2.dtb
dtb-$(CONFIG_ROCKCHIP_RK3568) += \
rk3566-anbernic-rgxx3.dtb \
+ rk3566-ha-green.dtb \
rk3566-quartz64-a.dtb \
rk3566-quartz64-b.dtb \
rk3566-radxa-cm3-io.dtb \
diff --git a/arch/arm/dts/rk3566-ha-green-u-boot.dtsi b/arch/arm/dts/rk3566-ha-green-u-boot.dtsi
new file mode 100644
index 0000000000..83fa66d591
index 00000000000..83fa66d591e
--- /dev/null
+++ b/arch/arm/dts/rk3566-ha-green-u-boot.dtsi
@@ -0,0 +1,28 @@
@ -61,7 +63,7 @@ index 0000000000..83fa66d591
+};
diff --git a/arch/arm/dts/rk3566-ha-green.dts b/arch/arm/dts/rk3566-ha-green.dts
new file mode 100644
index 0000000000..15d2b73433
index 00000000000..15d2b734338
--- /dev/null
+++ b/arch/arm/dts/rk3566-ha-green.dts
@@ -0,0 +1,685 @@
@ -752,7 +754,7 @@ index 0000000000..15d2b73433
+};
diff --git a/configs/green_defconfig b/configs/green_defconfig
new file mode 100644
index 0000000000..0617d308aa
index 00000000000..0617d308aa2
--- /dev/null
+++ b/configs/green_defconfig
@@ -0,0 +1,74 @@
@ -830,6 +832,3 @@ index 0000000000..0617d308aa
+CONFIG_SYSRESET=y
+# CONFIG_BINMAN_FDT is not set
+CONFIG_ERRNO_STR=y
--
2.43.0

View File

@ -1,4 +1,4 @@
From 6441bdb22a25649ff8fd69aa8f8a7285d9c37266 Mon Sep 17 00:00:00 2001
From 634b3b17d96b6def645b15b379fbe617620e6665 Mon Sep 17 00:00:00 2001
From: Zhangqun Ming <north_sea@qq.com>
Date: Fri, 14 Jul 2023 14:13:39 +0000
Subject: [PATCH] configs: green: Support USB boot
@ -8,7 +8,7 @@ Subject: [PATCH] configs: green: Support USB boot
1 file changed, 36 insertions(+), 16 deletions(-)
diff --git a/configs/green_defconfig b/configs/green_defconfig
index 0617d308aa..14960b67d2 100644
index 0617d308aa2..14960b67d26 100644
--- a/configs/green_defconfig
+++ b/configs/green_defconfig
@@ -6,48 +6,54 @@ CONFIG_TEXT_BASE=0x00a00000
@ -112,6 +112,3 @@ index 0617d308aa..14960b67d2 100644
+CONFIG_USB_OHCI_GENERIC=y
+CONFIG_USB_DWC3=y
CONFIG_ERRNO_STR=y
--
2.43.0

View File

@ -1,4 +1,4 @@
From d8b8b614d19dbb3fa004677a2c2e50b685a80192 Mon Sep 17 00:00:00 2001
From 80fc442a51ecab7b822145561421e3adff899bc9 Mon Sep 17 00:00:00 2001
From: Zhangqun Ming <north_sea@qq.com>
Date: Fri, 14 Jul 2023 14:14:10 +0000
Subject: [PATCH] arch: arm: dts: rk3566: green: boot order
@ -9,7 +9,7 @@ Subject: [PATCH] arch: arm: dts: rk3566: green: boot order
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/arch/arm/dts/rk3566-ha-green-u-boot.dtsi b/arch/arm/dts/rk3566-ha-green-u-boot.dtsi
index 83fa66d591..7f2ed298ce 100644
index 83fa66d591e..7f2ed298ce3 100644
--- a/arch/arm/dts/rk3566-ha-green-u-boot.dtsi
+++ b/arch/arm/dts/rk3566-ha-green-u-boot.dtsi
@@ -9,7 +9,7 @@
@ -33,7 +33,7 @@ index 83fa66d591..7f2ed298ce 100644
clock-frequency = <24000000>;
bootph-all;
diff --git a/arch/arm/dts/rk3566-ha-green.dts b/arch/arm/dts/rk3566-ha-green.dts
index 15d2b73433..bf0f81c3a1 100644
index 15d2b734338..bf0f81c3a15 100644
--- a/arch/arm/dts/rk3566-ha-green.dts
+++ b/arch/arm/dts/rk3566-ha-green.dts
@@ -563,7 +563,7 @@
@ -45,6 +45,3 @@ index 15d2b73433..bf0f81c3a1 100644
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <100000000>;
--
2.43.0

View File

@ -1,4 +1,4 @@
From e14d7d56b293ba01c5b73a4b3483795d78c75172 Mon Sep 17 00:00:00 2001
From 107a4b9bf7d335de4a6dc7e6097a1f38fdab38c7 Mon Sep 17 00:00:00 2001
From: Zhangqun Ming <north_sea@qq.com>
Date: Sat, 15 Jul 2023 08:46:09 +0000
Subject: [PATCH] arch: arm: dts: green: spi nor uboot
@ -10,7 +10,7 @@ Subject: [PATCH] arch: arm: dts: green: spi nor uboot
3 files changed, 91 insertions(+), 3 deletions(-)
diff --git a/arch/arm/dts/rk3566-ha-green-u-boot.dtsi b/arch/arm/dts/rk3566-ha-green-u-boot.dtsi
index 7f2ed298ce..fa98078fce 100644
index 7f2ed298ce3..fa98078fce2 100644
--- a/arch/arm/dts/rk3566-ha-green-u-boot.dtsi
+++ b/arch/arm/dts/rk3566-ha-green-u-boot.dtsi
@@ -13,15 +13,96 @@
@ -123,7 +123,7 @@ index 7f2ed298ce..fa98078fce 100644
+};
\ No newline at end of file
diff --git a/arch/arm/dts/rk3566-ha-green.dts b/arch/arm/dts/rk3566-ha-green.dts
index bf0f81c3a1..ea9d358099 100644
index bf0f81c3a15..ea9d358099b 100644
--- a/arch/arm/dts/rk3566-ha-green.dts
+++ b/arch/arm/dts/rk3566-ha-green.dts
@@ -566,8 +566,8 @@
@ -138,7 +138,7 @@ index bf0f81c3a1..ea9d358099 100644
partitions {
diff --git a/configs/green_defconfig b/configs/green_defconfig
index 14960b67d2..5f94c06279 100644
index 14960b67d26..5f94c062798 100644
--- a/configs/green_defconfig
+++ b/configs/green_defconfig
@@ -68,6 +68,8 @@ CONFIG_MMC_SDHCI_SDMA=y
@ -150,6 +150,3 @@ index 14960b67d2..5f94c06279 100644
CONFIG_ETH_DESIGNWARE=y
CONFIG_GMAC_ROCKCHIP=y
CONFIG_PHY_ROCKCHIP_INNO_USB2=y
--
2.43.0

View File

@ -1,4 +1,4 @@
From acec57c77e10230fc32820046301cb2a59c431d4 Mon Sep 17 00:00:00 2001
From c1b3736623b9a6e5d027ca202dbc53b7eb7e4662 Mon Sep 17 00:00:00 2001
From: Stefan Agner <stefan@agner.ch>
Date: Thu, 17 Aug 2023 17:38:13 +0200
Subject: [PATCH] board: green: add Green board to read board specific EEPROM
@ -12,17 +12,17 @@ Signed-off-by: Stefan Agner <stefan@agner.ch>
arch/arm/mach-rockchip/rk3568/Kconfig | 7 +++
board/nabucasa/ha-green/Kconfig | 15 +++++++
board/nabucasa/ha-green/Makefile | 3 ++
board/nabucasa/ha-green/ha-green.c | 65 +++++++++++++++++++++++++++
board/nabucasa/ha-green/ha-green.c | 64 +++++++++++++++++++++++++++
configs/green_defconfig | 3 ++
include/configs/ha-green.h | 11 +++++
7 files changed, 111 insertions(+)
7 files changed, 110 insertions(+)
create mode 100644 board/nabucasa/ha-green/Kconfig
create mode 100644 board/nabucasa/ha-green/Makefile
create mode 100644 board/nabucasa/ha-green/ha-green.c
create mode 100644 include/configs/ha-green.h
diff --git a/arch/arm/dts/rk3566-ha-green.dts b/arch/arm/dts/rk3566-ha-green.dts
index ea9d358099..91afadf0e6 100644
index ea9d358099b..91afadf0e65 100644
--- a/arch/arm/dts/rk3566-ha-green.dts
+++ b/arch/arm/dts/rk3566-ha-green.dts
@@ -449,6 +449,13 @@
@ -40,7 +40,7 @@ index ea9d358099..91afadf0e6 100644
&i2s0_8ch {
diff --git a/arch/arm/mach-rockchip/rk3568/Kconfig b/arch/arm/mach-rockchip/rk3568/Kconfig
index baa51349f4..42652dec03 100644
index ce327ed6f9e..5f675b11491 100644
--- a/arch/arm/mach-rockchip/rk3568/Kconfig
+++ b/arch/arm/mach-rockchip/rk3568/Kconfig
@@ -17,6 +17,12 @@ config TARGET_ANBERNIC_RGXX3_RK3566
@ -56,17 +56,17 @@ index baa51349f4..42652dec03 100644
config TARGET_ODROID_M1_RK3568
bool "ODROID-M1"
help
@@ -44,6 +50,7 @@ config SYS_MALLOC_F_LEN
source "board/rockchip/evb_rk3568/Kconfig"
@@ -81,6 +87,7 @@ source "board/rockchip/evb_rk3568/Kconfig"
source "board/anbernic/rgxx3_rk3566/Kconfig"
source "board/hardkernel/odroid_m1/Kconfig"
source "board/hardkernel/odroid_m1s/Kconfig"
+source "board/nabucasa/ha-green/Kconfig"
source "board/pine64/quartz64_rk3566/Kconfig"
endif
source "board/powkiddy/x55/Kconfig"
source "board/qnap/ts433/Kconfig"
diff --git a/board/nabucasa/ha-green/Kconfig b/board/nabucasa/ha-green/Kconfig
new file mode 100644
index 0000000000..863afd4363
index 00000000000..863afd43632
--- /dev/null
+++ b/board/nabucasa/ha-green/Kconfig
@@ -0,0 +1,15 @@
@ -87,7 +87,7 @@ index 0000000000..863afd4363
+endif
diff --git a/board/nabucasa/ha-green/Makefile b/board/nabucasa/ha-green/Makefile
new file mode 100644
index 0000000000..bf711fe8c4
index 00000000000..bf711fe8c44
--- /dev/null
+++ b/board/nabucasa/ha-green/Makefile
@@ -0,0 +1,3 @@
@ -96,10 +96,10 @@ index 0000000000..bf711fe8c4
+obj-y += ha-green.o
diff --git a/board/nabucasa/ha-green/ha-green.c b/board/nabucasa/ha-green/ha-green.c
new file mode 100644
index 0000000000..b9a0c32441
index 00000000000..3f0ede747bc
--- /dev/null
+++ b/board/nabucasa/ha-green/ha-green.c
@@ -0,0 +1,65 @@
@@ -0,0 +1,64 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright 2023 Nabu Casa, Inc.
@ -109,7 +109,6 @@ index 0000000000..b9a0c32441
+#include <errno.h>
+#include <dm/device.h>
+#include <dm/uclass.h>
+#include <common.h>
+#include <dm.h>
+#include <eeprom.h>
+#include <env.h>
@ -166,7 +165,7 @@ index 0000000000..b9a0c32441
+ return 0;
+}
diff --git a/configs/green_defconfig b/configs/green_defconfig
index 5f94c06279..a97391f295 100644
index 5f94c062798..a97391f2954 100644
--- a/configs/green_defconfig
+++ b/configs/green_defconfig
@@ -16,6 +16,7 @@ CONFIG_SPL_ROCKCHIP_COMMON_BOARD=y
@ -188,7 +187,7 @@ index 5f94c06279..a97391f295 100644
CONFIG_MMC_DW_ROCKCHIP=y
diff --git a/include/configs/ha-green.h b/include/configs/ha-green.h
new file mode 100644
index 0000000000..e42d9c8e8c
index 00000000000..e42d9c8e8c9
--- /dev/null
+++ b/include/configs/ha-green.h
@@ -0,0 +1,11 @@
@ -203,6 +202,3 @@ index 0000000000..e42d9c8e8c
+#include <configs/rk3568_common.h>
+
+#endif
--
2.43.0

View File

@ -1,4 +1,4 @@
From 51f1bdec59b8f62ac00a37e97a7bb8ebfc9f61d7 Mon Sep 17 00:00:00 2001
From 6ae9e30259812a3cbc8d4990a5acfe459053a225 Mon Sep 17 00:00:00 2001
From: syan <syan.cham@gmail.com>
Date: Mon, 31 Jul 2023 09:39:55 +0000
Subject: [PATCH] green: spl loader uboot order: sd-emmc-spi_nor
@ -8,7 +8,7 @@ Subject: [PATCH] green: spl loader uboot order: sd-emmc-spi_nor
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/dts/rk3566-ha-green-u-boot.dtsi b/arch/arm/dts/rk3566-ha-green-u-boot.dtsi
index fa98078fce..48d7b61513 100644
index fa98078fce2..48d7b615137 100644
--- a/arch/arm/dts/rk3566-ha-green-u-boot.dtsi
+++ b/arch/arm/dts/rk3566-ha-green-u-boot.dtsi
@@ -9,7 +9,7 @@
@ -20,6 +20,3 @@ index fa98078fce..48d7b61513 100644
};
};
--
2.43.0

View File

@ -1,4 +1,4 @@
From 0142d1a99d2aa4a6dad7181dcd74958b2ee0fe31 Mon Sep 17 00:00:00 2001
From b6c7fc08198300d8620f9896db468e0e50e8838a Mon Sep 17 00:00:00 2001
From: Stefan Agner <stefan@agner.ch>
Date: Thu, 17 Aug 2023 17:51:07 +0200
Subject: [PATCH] green: Fix SPI Flash alias
@ -12,7 +12,7 @@ Signed-off-by: Stefan Agner <stefan@agner.ch>
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/configs/green_defconfig b/configs/green_defconfig
index a97391f295..71c9257d7d 100644
index a97391f2954..71c9257d7d4 100644
--- a/configs/green_defconfig
+++ b/configs/green_defconfig
@@ -55,6 +55,7 @@ CONFIG_CMD_REGULATOR=y
@ -38,6 +38,3 @@ index a97391f295..71c9257d7d 100644
CONFIG_ETH_DESIGNWARE=y
CONFIG_GMAC_ROCKCHIP=y
CONFIG_PHY_ROCKCHIP_INNO_USB2=y
--
2.43.0

View File

@ -1,4 +1,4 @@
From 846df62342a4904a91aace66e9204ae3ed4ca0af Mon Sep 17 00:00:00 2001
From 71ad7d9b73ff14283e61fbb1d3d214982f8c9967 Mon Sep 17 00:00:00 2001
From: Stefan Agner <stefan@agner.ch>
Date: Fri, 18 Aug 2023 10:06:24 +0200
Subject: [PATCH] arch: arm: dts: green: drop SPI NOR flash partitions
@ -8,7 +8,7 @@ Subject: [PATCH] arch: arm: dts: green: drop SPI NOR flash partitions
1 file changed, 27 deletions(-)
diff --git a/arch/arm/dts/rk3566-ha-green.dts b/arch/arm/dts/rk3566-ha-green.dts
index 91afadf0e6..68d836911e 100644
index 91afadf0e65..68d836911ec 100644
--- a/arch/arm/dts/rk3566-ha-green.dts
+++ b/arch/arm/dts/rk3566-ha-green.dts
@@ -576,33 +576,6 @@
@ -45,6 +45,3 @@ index 91afadf0e6..68d836911e 100644
};
};
--
2.43.0

View File

@ -1,4 +1,4 @@
From 331826e0c52d6bdd65d862e06834f23b3a750276 Mon Sep 17 00:00:00 2001
From bda29ba9030c8ad9aa245d68033a83106de4f633 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= <sairon@sairon.cz>
Date: Wed, 12 Jun 2024 15:20:46 +0200
Subject: [PATCH] green: Do not use eMMC DDR52 mode, enable HS200
@ -22,7 +22,7 @@ Signed-off-by: Jan Čermák <sairon@sairon.cz>
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/arch/arm/dts/rk3566-ha-green-u-boot.dtsi b/arch/arm/dts/rk3566-ha-green-u-boot.dtsi
index 48d7b61513..8dc1585aac 100644
index 48d7b615137..8dc1585aacd 100644
--- a/arch/arm/dts/rk3566-ha-green-u-boot.dtsi
+++ b/arch/arm/dts/rk3566-ha-green-u-boot.dtsi
@@ -71,10 +71,7 @@
@ -44,7 +44,7 @@ index 48d7b61513..8dc1585aac 100644
\ No newline at end of file
+};
diff --git a/configs/green_defconfig b/configs/green_defconfig
index 71c9257d7d..7b5a705686 100644
index 71c9257d7d4..7b5a7056868 100644
--- a/configs/green_defconfig
+++ b/configs/green_defconfig
@@ -65,6 +65,8 @@ CONFIG_MISC=y

View File

@ -1,4 +1,4 @@
From d3fb1ec2364b20025d71e2263514a71208cfb61e Mon Sep 17 00:00:00 2001
From 2bdc5718a00ce5cb9c1fa27c8a1ff6893b016455 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= <sairon@sairon.cz>
Date: Tue, 13 Aug 2024 17:51:29 +0200
Subject: [PATCH] arch: arm64: dts: green: Improve LED representation
@ -15,7 +15,7 @@ Co-authored-by: Stefan Agner <stefan@agner.ch>
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/arch/arm/dts/rk3566-ha-green.dts b/arch/arm/dts/rk3566-ha-green.dts
index 68d836911e..c3adc59904 100644
index 68d836911ec..c3adc599049 100644
--- a/arch/arm/dts/rk3566-ha-green.dts
+++ b/arch/arm/dts/rk3566-ha-green.dts
@@ -48,16 +48,18 @@

View File

@ -0,0 +1,93 @@
From a05b87fa8cd6716a07514c64d8816272418d74e8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= <sairon@sairon.cz>
Date: Fri, 14 Feb 2025 18:09:29 +0100
Subject: [PATCH] configs: green: fix bss and stack address and disable
OF_UPSTREAM
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Some addresses defined in Green defconfig are wrong after upstream
changes [1] for Rockchip platform present since U-Boot 2024.04+. Remove
them to apply upstream changes and disable OF_UPSTREAM, as we don't have
upstream device tree for Green. Also refresh the defconfig
[1] https://lore.kernel.org/u-boot/20240302191629.322562-1-jonas@kwiboo.se/
Signed-off-by: Jan Čermák <sairon@sairon.cz>
---
configs/green_defconfig | 21 +++------------------
1 file changed, 3 insertions(+), 18 deletions(-)
diff --git a/configs/green_defconfig b/configs/green_defconfig
index 7b5a7056868..1f61c172f01 100644
--- a/configs/green_defconfig
+++ b/configs/green_defconfig
@@ -2,27 +2,20 @@ CONFIG_ARM=y
CONFIG_SKIP_LOWLEVEL_INIT=y
CONFIG_COUNTER_FREQUENCY=24000000
CONFIG_ARCH_ROCKCHIP=y
-CONFIG_TEXT_BASE=0x00a00000
-CONFIG_SPL_LIBCOMMON_SUPPORT=y
-CONFIG_SPL_LIBGENERIC_SUPPORT=y
CONFIG_NR_DRAM_BANKS=2
-CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
-CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0xc00000
CONFIG_SF_DEFAULT_SPEED=24000000
CONFIG_SF_DEFAULT_MODE=0x2000
CONFIG_DEFAULT_DEVICE_TREE="rk3566-ha-green"
CONFIG_ROCKCHIP_RK3568=y
-CONFIG_SPL_ROCKCHIP_COMMON_BOARD=y
CONFIG_ROCKCHIP_SPI_IMAGE=y
CONFIG_SPL_SERIAL=y
-CONFIG_SPL_STACK_R_ADDR=0x600000
CONFIG_TARGET_NABU_CASA_HA_GREEN_RK3566=y
-CONFIG_SPL_STACK=0x400000
+CONFIG_SYS_LOAD_ADDR=0xc00800
+CONFIG_SF_DEFAULT_BUS=4
CONFIG_DEBUG_UART_BASE=0xFE660000
CONFIG_DEBUG_UART_CLOCK=24000000
CONFIG_SPL_SPI_FLASH_SUPPORT=y
CONFIG_SPL_SPI=y
-CONFIG_SYS_LOAD_ADDR=0xc00800
CONFIG_DEBUG_UART=y
CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
@@ -34,12 +27,7 @@ CONFIG_DEFAULT_FDT_FILE="rockchip/rk3566-ha-green.dtb"
CONFIG_DISPLAY_BOARDINFO_LATE=y
CONFIG_SPL_MAX_SIZE=0x40000
CONFIG_SPL_PAD_TO=0x7f8000
-CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
-CONFIG_SPL_BSS_START_ADDR=0x4000000
-CONFIG_SPL_BSS_MAX_SIZE=0x4000
# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
-# CONFIG_SPL_SHARES_INIT_SP_ADDR is not set
-CONFIG_SPL_STACK_R=y
CONFIG_SPL_SPI_LOAD=y
CONFIG_SYS_SPI_U_BOOT_OFFS=0x60000
CONFIG_SPL_ATF=y
@@ -54,6 +42,7 @@ CONFIG_CMD_REGULATOR=y
# CONFIG_SPL_DOS_PARTITION is not set
CONFIG_SPL_OF_CONTROL=y
CONFIG_OF_LIVE=y
+# CONFIG_OF_UPSTREAM is not set
CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
CONFIG_SPL_DM_SEQ_ALIAS=y
CONFIG_SPL_REGMAP=y
@@ -63,16 +52,12 @@ CONFIG_ROCKCHIP_GPIO=y
CONFIG_SYS_I2C_ROCKCHIP=y
CONFIG_MISC=y
CONFIG_I2C_EEPROM=y
-CONFIG_SYS_I2C_EEPROM_ADDR=0x0
CONFIG_SUPPORT_EMMC_RPMB=y
-CONFIG_MMC_HS200_SUPPORT=y
-CONFIG_SPL_MMC_HS200_SUPPORT=y
CONFIG_MMC_DW=y
CONFIG_MMC_DW_ROCKCHIP=y
CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_SDMA=y
CONFIG_MMC_SDHCI_ROCKCHIP=y
-CONFIG_SF_DEFAULT_BUS=4
CONFIG_SPI_FLASH_SFDP_SUPPORT=y
CONFIG_SPI_FLASH_GIGADEVICE=y
CONFIG_SPI_FLASH_MACRONIX=y

View File

@ -0,0 +1,3 @@
# assumed -zlz4hc,12:lzma,9 for optimal compression
16384 1 usr/lib/firmware/
16384 1 usr/lib/modules/

View File

@ -55,24 +55,12 @@ CONFIG_SND_HDA_I915=y
CONFIG_SND_SOC=m
CONFIG_SND_SOC_INTEL_SST_TOPLEVEL=y
CONFIG_SND_SOC_INTEL_SST=m
CONFIG_SND_SOC_INTEL_CATPT=m
CONFIG_SND_SST_ATOM_HIFI2_PLATFORM=m
CONFIG_SND_SST_ATOM_HIFI2_PLATFORM_PCI=m
CONFIG_SND_SST_ATOM_HIFI2_PLATFORM_ACPI=m
CONFIG_SND_SOC_INTEL_SKYLAKE=m
CONFIG_SND_SOC_INTEL_SKL=m
CONFIG_SND_SOC_INTEL_APL=m
CONFIG_SND_SOC_INTEL_KBL=m
CONFIG_SND_SOC_INTEL_GLK=m
CONFIG_SND_SOC_INTEL_CNL=m
CONFIG_SND_SOC_INTEL_CFL=m
CONFIG_SND_SOC_INTEL_CML_H=m
CONFIG_SND_SOC_INTEL_CML_LP=m
CONFIG_SND_SOC_INTEL_SKYLAKE_FAMILY=m
CONFIG_SND_SOC_INTEL_SKYLAKE_HDAUDIO_CODEC=y
CONFIG_SND_SOC_INTEL_SKYLAKE_COMMON=m
CONFIG_SND_SOC_ACPI_INTEL_MATCH=m
CONFIG_SND_SOC_INTEL_AVS=m
CONFIG_SND_SOC_INTEL_MACH=y
CONFIG_SND_SOC_INTEL_USER_FRIENDLY_LONG_NAMES=y
CONFIG_SND_SOC_INTEL_HDA_DSP_COMMON=m
@ -160,7 +148,6 @@ CONFIG_EDAC_IGEN6=m
CONFIG_I2C=y
CONFIG_I2C_BOARDINFO=y
CONFIG_I2C_COMPAT=y
CONFIG_I2C_CHARDEV=m
CONFIG_I2C_MUX=y
CONFIG_I2C_TINY_USB=m

View File

@ -21,6 +21,8 @@ CONFIG_VMWARE_VMCI_VSOCKETS=m
CONFIG_VMWARE_VMCI=y
CONFIG_VMWARE_BALLOON=y
CONFIG_VMWARE_PVSCSI=y
# VMWare has optional ES1371 sound card emulation
CONFIG_SND_ENS1371=m
# These options are for LXD Guest Support
CONFIG_NET_9P=m
@ -88,6 +90,8 @@ CONFIG_FB_EFI=y
CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
CONFIG_DRM_I915=m
CONFIG_MMC=y
CONFIG_MMC_BLOCK=y
CONFIG_MMC_SDHCI=y
@ -125,7 +129,6 @@ CONFIG_I6300ESB_WDT=y
CONFIG_I2C=y
CONFIG_I2C_BOARDINFO=y
CONFIG_I2C_COMPAT=y
CONFIG_I2C_CHARDEV=m
CONFIG_I2C_MUX=y
CONFIG_I2C_TINY_USB=m

View File

@ -1,94 +0,0 @@
From 5712a20822709d1cd744a435eba5d9c8ef91a834 Mon Sep 17 00:00:00 2001
From: Zachary Michaels <mikezackles@gmail.com>
Date: Thu, 7 Jan 2021 08:13:11 -0800
Subject: [PATCH] iwlwifi: Make missed beacon timeout configurable
Makes the beacon timeout a module parameter, allowing the original default (16
missed beacons) to be kept while also enabling users that experience problems to
increase the timeout.
See https://bugzilla.kernel.org/show_bug.cgi?id=203709
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 4 ++++
drivers/net/wireless/intel/iwlwifi/iwl-modparams.h | 2 ++
drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c | 3 ++-
drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 1 -
4 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c
index fb5e254757e7..2db7032ea269 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c
@@ -1866,6 +1866,7 @@ struct iwl_mod_params iwlwifi_mod_params = {
.power_level = IWL_POWER_INDEX_1,
.uapsd_disable = IWL_DISABLE_UAPSD_BSS | IWL_DISABLE_UAPSD_P2P_CLIENT,
.enable_ini = ENABLE_INI,
+ .beacon_timeout = 16,
/* the rest are 0 by default */
};
IWL_EXPORT_SYMBOL(iwlwifi_mod_params);
@@ -1982,6 +1983,9 @@ module_param_named(enable_ini, iwlwifi_mod_params.enable_ini, uint, 0444);
MODULE_PARM_DESC(enable_ini,
"0:disable, 1-15:FW_DBG_PRESET Values, 16:enabled without preset value defined,"
"Debug INI TLV FW debug infrastructure (default: 16)");
+module_param_named(beacon_timeout, iwlwifi_mod_params.beacon_timeout, uint, 0644);
+MODULE_PARM_DESC(beacon_timeout,
+ "Number of missed beacons before disconnecting (default: 16)");
/*
* set bt_coex_active to true, uCode will do kill/defer
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-modparams.h b/drivers/net/wireless/intel/iwlwifi/iwl-modparams.h
index 1cf26ab4f488..ba50b7d21744 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-modparams.h
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-modparams.h
@@ -63,6 +63,7 @@ enum iwl_uapsd_disable {
* @remove_when_gone: remove an inaccessible device from the PCIe bus.
* @enable_ini: enable new FW debug infratructure (INI TLVs)
* @disable_11be: disable EHT capabilities, default = false.
+ * @beacon_timeout: number of missed beacons before disconnect, default = 16
*/
struct iwl_mod_params {
int swcrypto;
@@ -86,6 +87,7 @@ struct iwl_mod_params {
bool remove_when_gone;
u32 enable_ini;
bool disable_11be;
+ u32 beacon_timeout;
};
static inline bool iwl_enable_rx_ampdu(void)
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c
index 9c97691e6038..56c0f98d12b5 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c
@@ -8,6 +8,7 @@
#include <linux/crc32.h>
#include <net/mac80211.h>
#include "iwl-io.h"
+#include "iwl-modparams.h"
#include "iwl-prph.h"
#include "fw-api.h"
#include "mvm.h"
@@ -1614,7 +1615,7 @@ void iwl_mvm_rx_missed_beacons_notif(struct iwl_mvm *mvm,
* TODO: the threshold should be adjusted based on latency conditions,
* and/or in case of a CS flow on one of the other AP vifs.
*/
- if (rx_missed_bcon > IWL_MVM_MISSED_BEACONS_THRESHOLD_LONG)
+ if (rx_missed_bcon > iwlwifi_mod_params.beacon_timeout)
iwl_mvm_connection_loss(mvm, vif, "missed beacons");
else if (rx_missed_bcon_since_rx > IWL_MVM_MISSED_BEACONS_THRESHOLD)
ieee80211_beacon_loss(vif);
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
index 218f3bc31104..4f112ecdf704 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
@@ -41,7 +41,6 @@
/* RSSI offset for WkP */
#define IWL_RSSI_OFFSET 50
#define IWL_MVM_MISSED_BEACONS_THRESHOLD 8
-#define IWL_MVM_MISSED_BEACONS_THRESHOLD_LONG 16
/* A TimeUnit is 1024 microsecond */
#define MSEC_TO_TU(_msec) (_msec*1000/1024)

View File

@ -0,0 +1,154 @@
From f0fb974644a132ecc4bd2dc5cce9622435d0ec13 Mon Sep 17 00:00:00 2001
From: Heiner Kallweit <hkallweit1@gmail.com>
Date: Thu, 24 Oct 2024 22:42:33 +0200
Subject: [PATCH] r8169: add support for RTL8125D
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This adds support for new chip version RTL8125D, which can be found on
boards like Gigabyte X870E AORUS ELITE WIFI7. Firmware rtl8125d-1.fw
for this chip version is available in linux-firmware already.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/d0306912-e88e-4c25-8b5d-545ae8834c0c@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Upstream: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=f75d1fbe7809bc5ed134204b920fd9e2fc5db1df
Signed-off-by: Jan Čermák <sairon@sairon.cz>
---
drivers/net/ethernet/realtek/r8169.h | 1 +
drivers/net/ethernet/realtek/r8169_main.c | 23 +++++++++++++------
.../net/ethernet/realtek/r8169_phy_config.c | 10 ++++++++
3 files changed, 27 insertions(+), 7 deletions(-)
diff --git a/drivers/net/ethernet/realtek/r8169.h b/drivers/net/ethernet/realtek/r8169.h
index e2db944e6fa8b..be4c9622618d8 100644
--- a/drivers/net/ethernet/realtek/r8169.h
+++ b/drivers/net/ethernet/realtek/r8169.h
@@ -68,6 +68,7 @@ enum mac_version {
/* support for RTL_GIGA_MAC_VER_60 has been removed */
RTL_GIGA_MAC_VER_61,
RTL_GIGA_MAC_VER_63,
+ RTL_GIGA_MAC_VER_64,
RTL_GIGA_MAC_VER_65,
RTL_GIGA_MAC_VER_66,
RTL_GIGA_MAC_NONE
diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
index 5ed2818bac257..1cbde7ebd6f30 100644
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -55,6 +55,7 @@
#define FIRMWARE_8107E_2 "rtl_nic/rtl8107e-2.fw"
#define FIRMWARE_8125A_3 "rtl_nic/rtl8125a-3.fw"
#define FIRMWARE_8125B_2 "rtl_nic/rtl8125b-2.fw"
+#define FIRMWARE_8125D_1 "rtl_nic/rtl8125d-1.fw"
#define FIRMWARE_8126A_2 "rtl_nic/rtl8126a-2.fw"
#define FIRMWARE_8126A_3 "rtl_nic/rtl8126a-3.fw"
@@ -138,6 +139,7 @@ static const struct {
[RTL_GIGA_MAC_VER_61] = {"RTL8125A", FIRMWARE_8125A_3},
/* reserve 62 for CFG_METHOD_4 in the vendor driver */
[RTL_GIGA_MAC_VER_63] = {"RTL8125B", FIRMWARE_8125B_2},
+ [RTL_GIGA_MAC_VER_64] = {"RTL8125D", FIRMWARE_8125D_1},
[RTL_GIGA_MAC_VER_65] = {"RTL8126A", FIRMWARE_8126A_2},
[RTL_GIGA_MAC_VER_66] = {"RTL8126A", FIRMWARE_8126A_3},
};
@@ -707,6 +709,7 @@ MODULE_FIRMWARE(FIRMWARE_8168FP_3);
MODULE_FIRMWARE(FIRMWARE_8107E_2);
MODULE_FIRMWARE(FIRMWARE_8125A_3);
MODULE_FIRMWARE(FIRMWARE_8125B_2);
+MODULE_FIRMWARE(FIRMWARE_8125D_1);
MODULE_FIRMWARE(FIRMWARE_8126A_2);
MODULE_FIRMWARE(FIRMWARE_8126A_3);
@@ -2098,10 +2101,7 @@ static void rtl_set_eee_txidle_timer(struct rtl8169_private *tp)
tp->tx_lpi_timer = timer_val;
r8168_mac_ocp_write(tp, 0xe048, timer_val);
break;
- case RTL_GIGA_MAC_VER_61:
- case RTL_GIGA_MAC_VER_63:
- case RTL_GIGA_MAC_VER_65:
- case RTL_GIGA_MAC_VER_66:
+ case RTL_GIGA_MAC_VER_61 ... RTL_GIGA_MAC_VER_66:
tp->tx_lpi_timer = timer_val;
RTL_W16(tp, EEE_TXIDLE_TIMER_8125, timer_val);
break;
@@ -2233,6 +2233,9 @@ static enum mac_version rtl8169_get_mac_version(u16 xid, bool gmii)
{ 0x7cf, 0x64a, RTL_GIGA_MAC_VER_66 },
{ 0x7cf, 0x649, RTL_GIGA_MAC_VER_65 },
+ /* 8125D family. */
+ { 0x7cf, 0x688, RTL_GIGA_MAC_VER_64 },
+
/* 8125B family. */
{ 0x7cf, 0x641, RTL_GIGA_MAC_VER_63 },
@@ -2500,9 +2503,7 @@ static void rtl_init_rxcfg(struct rtl8169_private *tp)
case RTL_GIGA_MAC_VER_61:
RTL_W32(tp, RxConfig, RX_FETCH_DFLT_8125 | RX_DMA_BURST);
break;
- case RTL_GIGA_MAC_VER_63:
- case RTL_GIGA_MAC_VER_65:
- case RTL_GIGA_MAC_VER_66:
+ case RTL_GIGA_MAC_VER_63 ... RTL_GIGA_MAC_VER_66:
RTL_W32(tp, RxConfig, RX_FETCH_DFLT_8125 | RX_DMA_BURST |
RX_PAUSE_SLOT_ON);
break;
@@ -3814,6 +3815,12 @@ static void rtl_hw_start_8125b(struct rtl8169_private *tp)
rtl_hw_start_8125_common(tp);
}
+static void rtl_hw_start_8125d(struct rtl8169_private *tp)
+{
+ rtl_set_def_aspm_entry_latency(tp);
+ rtl_hw_start_8125_common(tp);
+}
+
static void rtl_hw_start_8126a(struct rtl8169_private *tp)
{
rtl_set_def_aspm_entry_latency(tp);
@@ -3862,6 +3869,7 @@ static void rtl_hw_config(struct rtl8169_private *tp)
[RTL_GIGA_MAC_VER_53] = rtl_hw_start_8117,
[RTL_GIGA_MAC_VER_61] = rtl_hw_start_8125a_2,
[RTL_GIGA_MAC_VER_63] = rtl_hw_start_8125b,
+ [RTL_GIGA_MAC_VER_64] = rtl_hw_start_8125d,
[RTL_GIGA_MAC_VER_65] = rtl_hw_start_8126a,
[RTL_GIGA_MAC_VER_66] = rtl_hw_start_8126a,
};
@@ -3879,6 +3887,7 @@ static void rtl_hw_start_8125(struct rtl8169_private *tp)
/* disable interrupt coalescing */
switch (tp->mac_version) {
case RTL_GIGA_MAC_VER_61:
+ case RTL_GIGA_MAC_VER_64:
for (i = 0xa00; i < 0xb00; i += 4)
RTL_W32(tp, i, 0);
break;
diff --git a/drivers/net/ethernet/realtek/r8169_phy_config.c b/drivers/net/ethernet/realtek/r8169_phy_config.c
index cf29b12084826..d09b2a41cd062 100644
--- a/drivers/net/ethernet/realtek/r8169_phy_config.c
+++ b/drivers/net/ethernet/realtek/r8169_phy_config.c
@@ -1104,6 +1104,15 @@ static void rtl8125b_hw_phy_config(struct rtl8169_private *tp,
rtl8125b_config_eee_phy(phydev);
}
+static void rtl8125d_hw_phy_config(struct rtl8169_private *tp,
+ struct phy_device *phydev)
+{
+ r8169_apply_firmware(tp);
+ rtl8125_legacy_force_mode(phydev);
+ rtl8168g_disable_aldps(phydev);
+ rtl8125b_config_eee_phy(phydev);
+}
+
static void rtl8126a_hw_phy_config(struct rtl8169_private *tp,
struct phy_device *phydev)
{
@@ -1160,6 +1169,7 @@ void r8169_hw_phy_config(struct rtl8169_private *tp, struct phy_device *phydev,
[RTL_GIGA_MAC_VER_53] = rtl8117_hw_phy_config,
[RTL_GIGA_MAC_VER_61] = rtl8125a_2_hw_phy_config,
[RTL_GIGA_MAC_VER_63] = rtl8125b_hw_phy_config,
+ [RTL_GIGA_MAC_VER_64] = rtl8125d_hw_phy_config,
[RTL_GIGA_MAC_VER_65] = rtl8126a_hw_phy_config,
[RTL_GIGA_MAC_VER_66] = rtl8126a_hw_phy_config,
};

View File

@ -0,0 +1,143 @@
From acc8d5ec4b6cdbf0a9625a9f9d3710b52555f3b2 Mon Sep 17 00:00:00 2001
From: Heiner Kallweit <hkallweit1@gmail.com>
Date: Tue, 15 Oct 2024 07:47:14 +0200
Subject: [PATCH] net: phy: realtek: merge the drivers for internal NBase-T
PHY's
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The Realtek RTL8125/RTL8126 NBase-T MAC/PHY chips have internal PHY's
which are register-compatible, at least for the registers we use here.
So let's use just one PHY driver to support all of them.
These internal PHY's exist also as external C45 PHY's, but on the
internal PHY's no access to MMD registers is possible. This can be
used to differentiate between the internal and external version.
As a side effect the drivers for two now external-only drivers don't
require read_mmd/write_mmd hooks any longer.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Link: https://patch.msgid.link/c57081a6-811f-4571-ab35-34f4ca6de9af@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Upstream: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=f87a17ed3b51fba4dfdd8f8b643b5423a85fc551
Signed-off-by: Jan Čermák <sairon@sairon.cz>
---
drivers/net/phy/realtek.c | 53 +++++++++++++++++++++++++++++++--------
1 file changed, 43 insertions(+), 10 deletions(-)
diff --git a/drivers/net/phy/realtek.c b/drivers/net/phy/realtek.c
index 166f6a7283731..830a0d337de5d 100644
--- a/drivers/net/phy/realtek.c
+++ b/drivers/net/phy/realtek.c
@@ -92,6 +92,7 @@
#define RTL_GENERIC_PHYID 0x001cc800
#define RTL_8211FVD_PHYID 0x001cc878
+#define RTL_8221B 0x001cc840
#define RTL_8221B_VB_CG 0x001cc849
#define RTL_8221B_VN_CG 0x001cc84a
#define RTL_8251B 0x001cc862
@@ -1040,6 +1041,23 @@ static bool rtlgen_supports_2_5gbps(struct phy_device *phydev)
return val >= 0 && val & MDIO_PMA_SPEED_2_5G;
}
+/* On internal PHY's MMD reads over C22 always return 0.
+ * Check a MMD register which is known to be non-zero.
+ */
+static bool rtlgen_supports_mmd(struct phy_device *phydev)
+{
+ int val;
+
+ phy_lock_mdio_bus(phydev);
+ __phy_write(phydev, MII_MMD_CTRL, MDIO_MMD_PCS);
+ __phy_write(phydev, MII_MMD_DATA, MDIO_PCS_EEE_ABLE);
+ __phy_write(phydev, MII_MMD_CTRL, MDIO_MMD_PCS | MII_MMD_CTRL_NOINCR);
+ val = __phy_read(phydev, MII_MMD_DATA);
+ phy_unlock_mdio_bus(phydev);
+
+ return val > 0;
+}
+
static int rtlgen_match_phy_device(struct phy_device *phydev)
{
return phydev->phy_id == RTL_GENERIC_PHYID &&
@@ -1049,7 +1067,8 @@ static int rtlgen_match_phy_device(struct phy_device *phydev)
static int rtl8226_match_phy_device(struct phy_device *phydev)
{
return phydev->phy_id == RTL_GENERIC_PHYID &&
- rtlgen_supports_2_5gbps(phydev);
+ rtlgen_supports_2_5gbps(phydev) &&
+ rtlgen_supports_mmd(phydev);
}
static int rtlgen_is_c45_match(struct phy_device *phydev, unsigned int id,
@@ -1061,6 +1080,11 @@ static int rtlgen_is_c45_match(struct phy_device *phydev, unsigned int id,
return !is_c45 && (id == phydev->phy_id);
}
+static int rtl8221b_match_phy_device(struct phy_device *phydev)
+{
+ return phydev->phy_id == RTL_8221B && rtlgen_supports_mmd(phydev);
+}
+
static int rtl8221b_vb_cg_c22_match_phy_device(struct phy_device *phydev)
{
return rtlgen_is_c45_match(phydev, RTL_8221B_VB_CG, false);
@@ -1081,9 +1105,21 @@ static int rtl8221b_vn_cg_c45_match_phy_device(struct phy_device *phydev)
return rtlgen_is_c45_match(phydev, RTL_8221B_VN_CG, true);
}
-static int rtl8251b_c22_match_phy_device(struct phy_device *phydev)
+static int rtl_internal_nbaset_match_phy_device(struct phy_device *phydev)
{
- return rtlgen_is_c45_match(phydev, RTL_8251B, false);
+ if (phydev->is_c45)
+ return false;
+
+ switch (phydev->phy_id) {
+ case RTL_GENERIC_PHYID:
+ case RTL_8221B:
+ case RTL_8251B:
+ break;
+ default:
+ return false;
+ }
+
+ return rtlgen_supports_2_5gbps(phydev) && !rtlgen_supports_mmd(phydev);
}
static int rtl8251b_c45_match_phy_device(struct phy_device *phydev)
@@ -1345,10 +1381,8 @@ static struct phy_driver realtek_drvs[] = {
.resume = rtlgen_resume,
.read_page = rtl821x_read_page,
.write_page = rtl821x_write_page,
- .read_mmd = rtl822x_read_mmd,
- .write_mmd = rtl822x_write_mmd,
}, {
- PHY_ID_MATCH_EXACT(0x001cc840),
+ .match_phy_device = rtl8221b_match_phy_device,
.name = "RTL8226B_RTL8221B 2.5Gbps PHY",
.get_features = rtl822x_get_features,
.config_aneg = rtl822x_config_aneg,
@@ -1359,8 +1393,6 @@ static struct phy_driver realtek_drvs[] = {
.resume = rtlgen_resume,
.read_page = rtl821x_read_page,
.write_page = rtl821x_write_page,
- .read_mmd = rtl822x_read_mmd,
- .write_mmd = rtl822x_write_mmd,
}, {
PHY_ID_MATCH_EXACT(0x001cc838),
.name = "RTL8226-CG 2.5Gbps PHY",
@@ -1438,8 +1470,9 @@ static struct phy_driver realtek_drvs[] = {
.read_page = rtl821x_read_page,
.write_page = rtl821x_write_page,
}, {
- .match_phy_device = rtl8251b_c22_match_phy_device,
- .name = "RTL8126A-internal 5Gbps PHY",
+ .match_phy_device = rtl_internal_nbaset_match_phy_device,
+ .name = "Realtek Internal NBASE-T PHY",
+ .flags = PHY_IS_INTERNAL,
.get_features = rtl822x_get_features,
.config_aneg = rtl822x_config_aneg,
.read_status = rtl822x_read_status,

View File

@ -0,0 +1,36 @@
From 7ab842c714924784cae4b6ab229997905b096b4f Mon Sep 17 00:00:00 2001
From: Heiner Kallweit <hkallweit1@gmail.com>
Date: Thu, 17 Oct 2024 18:01:13 +0200
Subject: [PATCH] net: phy: realtek: add RTL8125D-internal PHY
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The first boards show up with Realtek's RTL8125D. This MAC/PHY chip
comes with an integrated 2.5Gbps PHY with ID 0x001cc841. It's not
clear yet whether there's an external version of this PHY and how
Realtek calls it, therefore use the numeric id for now.
Link: https://lore.kernel.org/netdev/2ada65e1-5dfa-456c-9334-2bc51272e9da@gmail.com/T/
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Message-ID: <7d2924de-053b-44d2-a479-870dc3878170@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Upstream: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=8989bad541133c43550bff2b80edbe37b8fb9659
Signed-off-by: Jan Čermák <sairon@sairon.cz>
---
drivers/net/phy/realtek.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/phy/realtek.c b/drivers/net/phy/realtek.c
index 830a0d337de5d..8ce5705af69c5 100644
--- a/drivers/net/phy/realtek.c
+++ b/drivers/net/phy/realtek.c
@@ -1114,6 +1114,7 @@ static int rtl_internal_nbaset_match_phy_device(struct phy_device *phydev)
case RTL_GENERIC_PHYID:
case RTL_8221B:
case RTL_8251B:
+ case 0x001cc841:
break;
default:
return false;

View File

@ -1 +1 @@
dwc_otg.lpm_enable=0 console=tty0 usb-storage.quirks=174c:55aa:u,2109:0715:u,152d:0578:u,152d:0579:u,152d:1561:u,174c:0829:u,14b0:0206:u,174c:225c:u,7825:a2a4:u,152d:0562:u,125f:a88a:u,152d:a583:u
dwc_otg.lpm_enable=0 console=tty0 usb-storage.quirks=174c:55aa:u,2109:0715:u,152d:0578:u,152d:0579:u,152d:1561:u,174c:0829:u,14b0:0206:u,174c:225c:u,7825:a2a4:u,152d:0562:u,125f:a88a:u,152d:a583:u,152d:a578:u

View File

@ -71,6 +71,10 @@ kernel=u-boot.bin
# Enable audio (loads snd_bcm2835)
dtparam=audio=on
[pi3]
# Added to fix #3965
initial_turbo=0
[pi4]
# Enable DRM VC4 V3D driver on top of the dispmanx display stack
dtoverlay=vc4-fkms-v3d

View File

@ -7,3 +7,6 @@ CONFIG_LOCALVERSION="-haos-raspi"
CONFIG_LEDS_TRIGGERS=y
CONFIG_LEDS_TRIGGER_DISK=y
CONFIG_LEDS_TRIGGER_ACTIVITY=y
# do not use RPi in-tree driver, use one from BR package instead
# CONFIG_MEDIA_PCI_HAILO is not set

View File

@ -0,0 +1,32 @@
From ec7a5ea27ef759c67225b1616e4266bcff0d7fb4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= <sairon@sairon.cz>
Date: Tue, 14 Jan 2025 18:27:20 +0100
Subject: [PATCH] dts: bcm2712-rpi: Disable CQE for CM5 eMMC to work around FS
lockups
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
With CQE enabled, HAOS first boot often fails during swap file initilization,
and leaves hanging on all I/O access. For some reason, this only happens when
an ext4lazyinit on the accessed partition hasn't been finished yet. Before the
real solution is found, disable CQE at the cost of a small performance cost.
Signed-off-by: Jan Čermák <sairon@sairon.cz>
---
arch/arm64/boot/dts/broadcom/bcm2712-rpi-cm5.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/broadcom/bcm2712-rpi-cm5.dtsi b/arch/arm64/boot/dts/broadcom/bcm2712-rpi-cm5.dtsi
index 099d14ecf19a4..d49fc876cccc1 100644
--- a/arch/arm64/boot/dts/broadcom/bcm2712-rpi-cm5.dtsi
+++ b/arch/arm64/boot/dts/broadcom/bcm2712-rpi-cm5.dtsi
@@ -339,7 +339,7 @@ &sdio1 {
mmc-hs400-1_8v;
mmc-hs400-enhanced-strobe;
broken-cd;
- supports-cqe = <1>;
+ supports-cqe = <0>;
status = "okay";
};

View File

@ -0,0 +1,198 @@
From 93ddda43441baefd98267c671ce2ec7e5527906b Mon Sep 17 00:00:00 2001
From: Eric Dumazet <edumazet@google.com>
Date: Wed, 28 Feb 2024 13:54:30 +0000
Subject: [PATCH] ipv6: annotate data-races around cnf.forwarding
idev->cnf.forwarding and net->ipv6.devconf_all->forwarding
might be read locklessly, add appropriate READ_ONCE()
and WRITE_ONCE() annotations.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
drivers/net/usb/cdc_mbim.c | 2 +-
include/net/ipv6.h | 8 +++++---
net/core/filter.c | 2 +-
net/ipv6/addrconf.c | 10 ++++++----
net/ipv6/ip6_output.c | 2 +-
net/ipv6/ndisc.c | 11 ++++++-----
net/ipv6/route.c | 4 ++--
7 files changed, 22 insertions(+), 17 deletions(-)
diff --git a/drivers/net/usb/cdc_mbim.c b/drivers/net/usb/cdc_mbim.c
index cd4083e0b3b9e..e13e4920ee9b2 100644
--- a/drivers/net/usb/cdc_mbim.c
+++ b/drivers/net/usb/cdc_mbim.c
@@ -339,7 +339,7 @@ static void do_neigh_solicit(struct usbnet *dev, u8 *buf, u16 tci)
in6_dev = in6_dev_get(netdev);
if (!in6_dev)
goto out;
- is_router = !!in6_dev->cnf.forwarding;
+ is_router = !!READ_ONCE(in6_dev->cnf.forwarding);
in6_dev_put(in6_dev);
/* ipv6_stub != NULL if in6_dev_get returned an inet6_dev */
diff --git a/include/net/ipv6.h b/include/net/ipv6.h
index c6932d1a3fa80..0185ca1617c1a 100644
--- a/include/net/ipv6.h
+++ b/include/net/ipv6.h
@@ -534,13 +534,15 @@ static inline int ipv6_hopopt_jumbo_remove(struct sk_buff *skb)
return 0;
}
-static inline bool ipv6_accept_ra(struct inet6_dev *idev)
+static inline bool ipv6_accept_ra(const struct inet6_dev *idev)
{
+ s32 accept_ra = READ_ONCE(idev->cnf.accept_ra);
+
/* If forwarding is enabled, RA are not accepted unless the special
* hybrid mode (accept_ra=2) is enabled.
*/
- return idev->cnf.forwarding ? idev->cnf.accept_ra == 2 :
- idev->cnf.accept_ra;
+ return READ_ONCE(idev->cnf.forwarding) ? accept_ra == 2 :
+ accept_ra;
}
#define IPV6_FRAG_HIGH_THRESH (4 * 1024*1024) /* 4194304 */
diff --git a/net/core/filter.c b/net/core/filter.c
index 5881944f1681c..4288f45ff54ce 100644
--- a/net/core/filter.c
+++ b/net/core/filter.c
@@ -6021,7 +6021,7 @@ static int bpf_ipv6_fib_lookup(struct net *net, struct bpf_fib_lookup *params,
return -ENODEV;
idev = __in6_dev_get_safely(dev);
- if (unlikely(!idev || !idev->cnf.forwarding))
+ if (unlikely(!idev || !READ_ONCE(idev->cnf.forwarding)))
return BPF_FIB_LKUP_RET_FWD_DISABLED;
if (flags & BPF_FIB_LOOKUP_OUTPUT) {
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 8360939acf85a..12c0b1e85cea1 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -547,7 +547,8 @@ static int inet6_netconf_fill_devconf(struct sk_buff *skb, int ifindex,
goto out;
if ((all || type == NETCONFA_FORWARDING) &&
- nla_put_s32(skb, NETCONFA_FORWARDING, devconf->forwarding) < 0)
+ nla_put_s32(skb, NETCONFA_FORWARDING,
+ READ_ONCE(devconf->forwarding)) < 0)
goto nla_put_failure;
#ifdef CONFIG_IPV6_MROUTE
if ((all || type == NETCONFA_MC_FORWARDING) &&
@@ -865,7 +866,8 @@ static void addrconf_forward_change(struct net *net, __s32 newf)
idev = __in6_dev_get(dev);
if (idev) {
int changed = (!idev->cnf.forwarding) ^ (!newf);
- idev->cnf.forwarding = newf;
+
+ WRITE_ONCE(idev->cnf.forwarding, newf);
if (changed)
dev_forward_change(idev);
}
@@ -882,7 +884,7 @@ static int addrconf_fixup_forwarding(struct ctl_table *table, int *p, int newf)
net = (struct net *)table->extra2;
old = *p;
- *p = newf;
+ WRITE_ONCE(*p, newf);
if (p == &net->ipv6.devconf_dflt->forwarding) {
if ((!newf) ^ (!old))
@@ -897,7 +899,7 @@ static int addrconf_fixup_forwarding(struct ctl_table *table, int *p, int newf)
if (p == &net->ipv6.devconf_all->forwarding) {
int old_dflt = net->ipv6.devconf_dflt->forwarding;
- net->ipv6.devconf_dflt->forwarding = newf;
+ WRITE_ONCE(net->ipv6.devconf_dflt->forwarding, newf);
if ((!newf) ^ (!old_dflt))
inet6_netconf_notify_devconf(net, RTM_NEWNETCONF,
NETCONFA_FORWARDING,
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index 2341a4373bb94..46c0dfa8c6f88 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -508,7 +508,7 @@ int ip6_forward(struct sk_buff *skb)
u32 mtu;
idev = __in6_dev_get_safely(dev_get_by_index_rcu(net, IP6CB(skb)->iif));
- if (net->ipv6.devconf_all->forwarding == 0)
+ if (READ_ONCE(net->ipv6.devconf_all->forwarding) == 0)
goto error;
if (skb->pkt_type != PACKET_HOST)
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
index 23b46b5705c53..bd73484de3818 100644
--- a/net/ipv6/ndisc.c
+++ b/net/ipv6/ndisc.c
@@ -905,7 +905,7 @@ static enum skb_drop_reason ndisc_recv_ns(struct sk_buff *skb)
}
if (ipv6_chk_acast_addr(net, dev, &msg->target) ||
- (idev->cnf.forwarding &&
+ (READ_ONCE(idev->cnf.forwarding) &&
(net->ipv6.devconf_all->proxy_ndp || idev->cnf.proxy_ndp) &&
(is_router = pndisc_is_router(&msg->target, dev)) >= 0)) {
if (!(NEIGH_CB(skb)->flags & LOCALLY_ENQUEUED) &&
@@ -931,7 +931,7 @@ static enum skb_drop_reason ndisc_recv_ns(struct sk_buff *skb)
}
if (is_router < 0)
- is_router = idev->cnf.forwarding;
+ is_router = READ_ONCE(idev->cnf.forwarding);
if (dad) {
ndisc_send_na(dev, &in6addr_linklocal_allnodes, &msg->target,
@@ -1082,7 +1082,7 @@ static enum skb_drop_reason ndisc_recv_na(struct sk_buff *skb)
* Note that we don't do a (daddr == all-routers-mcast) check.
*/
new_state = msg->icmph.icmp6_solicited ? NUD_REACHABLE : NUD_STALE;
- if (!neigh && lladdr && idev && idev->cnf.forwarding) {
+ if (!neigh && lladdr && idev && READ_ONCE(idev->cnf.forwarding)) {
if (accept_untracked_na(dev, saddr)) {
neigh = neigh_create(&nd_tbl, &msg->target, dev);
new_state = NUD_STALE;
@@ -1102,7 +1102,8 @@ static enum skb_drop_reason ndisc_recv_na(struct sk_buff *skb)
* has already sent a NA to us.
*/
if (lladdr && !memcmp(lladdr, dev->dev_addr, dev->addr_len) &&
- net->ipv6.devconf_all->forwarding && net->ipv6.devconf_all->proxy_ndp &&
+ READ_ONCE(net->ipv6.devconf_all->forwarding) &&
+ net->ipv6.devconf_all->proxy_ndp &&
pneigh_lookup(&nd_tbl, net, &msg->target, dev, 0)) {
/* XXX: idev->cnf.proxy_ndp */
goto out;
@@ -1150,7 +1151,7 @@ static enum skb_drop_reason ndisc_recv_rs(struct sk_buff *skb)
}
/* Don't accept RS if we're not in router mode */
- if (!idev->cnf.forwarding)
+ if (!READ_ONCE(idev->cnf.forwarding))
goto out;
/*
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index fc5c534620253..4a0b12651777b 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -2215,7 +2215,7 @@ struct rt6_info *ip6_pol_route(struct net *net, struct fib6_table *table,
strict |= flags & RT6_LOOKUP_F_IFACE;
strict |= flags & RT6_LOOKUP_F_IGNORE_LINKSTATE;
- if (net->ipv6.devconf_all->forwarding == 0)
+ if (READ_ONCE(net->ipv6.devconf_all->forwarding) == 0)
strict |= RT6_LOOKUP_F_REACHABLE;
rcu_read_lock();
@@ -4146,7 +4146,7 @@ static void rt6_do_redirect(struct dst_entry *dst, struct sock *sk, struct sk_bu
in6_dev = __in6_dev_get(skb->dev);
if (!in6_dev)
return;
- if (in6_dev->cnf.forwarding || !in6_dev->cnf.accept_redirects)
+ if (READ_ONCE(in6_dev->cnf.forwarding) || !in6_dev->cnf.accept_redirects)
return;
/* RFC2461 8.1:

View File

@ -0,0 +1,44 @@
From ab1d73e2b5101689fcd1737e588119b4fde3a5ff Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.com>
Date: Mon, 3 Feb 2025 14:44:08 +0000
Subject: [PATCH] misc: rp1-pio: Error out on incompatible firmware
If the RP1 firmware has reported an error then return that from the PIO
probe function, otherwise defer the probing.
Link: https://github.com/raspberrypi/linux/issues/6642
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
---
drivers/misc/rp1-pio.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/misc/rp1-pio.c b/drivers/misc/rp1-pio.c
index dbf69279e313d..7e875811509f8 100644
--- a/drivers/misc/rp1-pio.c
+++ b/drivers/misc/rp1-pio.c
@@ -1268,8 +1268,10 @@ static int rp1_pio_probe(struct platform_device *pdev)
return dev_err_probe(dev, pdev->id, "alias is missing\n");
fw = devm_rp1_firmware_get(dev, dev->of_node);
- if (IS_ERR_OR_NULL(fw))
- return dev_err_probe(dev, -ENOENT, "failed to contact RP1 firmware\n");
+ if (!fw)
+ return dev_err_probe(dev, -EPROBE_DEFER, "failed to find RP1 firmware driver\n");
+ if (IS_ERR(fw))
+ return dev_err_probe(dev, PTR_ERR(fw), "failed to contact RP1 firmware\n");
ret = rp1_firmware_get_feature(fw, FOURCC_PIO, &op_base, &op_count);
if (ret < 0)
return ret;
@@ -1346,6 +1348,11 @@ static void rp1_pio_remove(struct platform_device *pdev)
if (g_pio == pio)
g_pio = NULL;
+
+ device_destroy(pio->dev_class, pio->dev_num);
+ cdev_del(&pio->cdev);
+ class_destroy(pio->dev_class);
+ unregister_chrdev_region(pio->dev_num, 1);
}
static const struct of_device_id rp1_pio_ids[] = {

View File

@ -0,0 +1,105 @@
From b1bcedb44c54a65a8e494158385eb23199572217 Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.com>
Date: Mon, 3 Feb 2025 14:51:52 +0000
Subject: [PATCH] firmware: rp1: Linger on firmware failure
To avoid pointless retries, let the probe function succeed if the
firmware interface is configured correctly but the firmware is
incompatible. The value of the private drvdata field holds the outcome.
Link: https://github.com/raspberrypi/linux/issues/6642
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
---
drivers/firmware/rp1.c | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/drivers/firmware/rp1.c b/drivers/firmware/rp1.c
index 0b0760ca77764..a258452c8b33e 100644
--- a/drivers/firmware/rp1.c
+++ b/drivers/firmware/rp1.c
@@ -114,7 +114,8 @@ static void rp1_firmware_delete(struct kref *kref)
void rp1_firmware_put(struct rp1_firmware *fw)
{
- kref_put(&fw->consumers, rp1_firmware_delete);
+ if (!IS_ERR_OR_NULL(fw))
+ kref_put(&fw->consumers, rp1_firmware_delete);
}
EXPORT_SYMBOL_GPL(rp1_firmware_put);
@@ -157,7 +158,7 @@ struct rp1_firmware *rp1_firmware_get(struct device_node *client)
const char *match = rp1_firmware_of_match[0].compatible;
struct platform_device *pdev;
struct device_node *fwnode;
- struct rp1_firmware *fw;
+ struct rp1_firmware *fw = NULL;
if (!client)
return NULL;
@@ -166,17 +167,17 @@ struct rp1_firmware *rp1_firmware_get(struct device_node *client)
return NULL;
if (!of_device_is_compatible(fwnode, match)) {
of_node_put(fwnode);
- return NULL;
+ return ERR_PTR(-ENXIO);
}
pdev = of_find_device_by_node(fwnode);
of_node_put(fwnode);
if (!pdev)
- goto err_exit;
+ return ERR_PTR(-ENXIO);
fw = platform_get_drvdata(pdev);
- if (!fw)
+ if (IS_ERR_OR_NULL(fw))
goto err_exit;
if (!kref_get_unless_zero(&fw->consumers))
@@ -188,7 +189,7 @@ struct rp1_firmware *rp1_firmware_get(struct device_node *client)
err_exit:
put_device(&pdev->dev);
- return NULL;
+ return fw;
}
EXPORT_SYMBOL_GPL(rp1_firmware_get);
@@ -204,8 +205,8 @@ struct rp1_firmware *devm_rp1_firmware_get(struct device *dev, struct device_nod
int ret;
fw = rp1_firmware_get(client);
- if (!fw)
- return NULL;
+ if (IS_ERR_OR_NULL(fw))
+ return fw;
ret = devm_add_action_or_reset(dev, devm_rp1_firmware_put, fw);
if (ret)
@@ -270,19 +271,18 @@ static int rp1_firmware_probe(struct platform_device *pdev)
init_completion(&fw->c);
kref_init(&fw->consumers);
- platform_set_drvdata(pdev, fw);
-
ret = rp1_firmware_message(fw, GET_FIRMWARE_VERSION,
NULL, 0, &version, sizeof(version));
if (ret == sizeof(version)) {
dev_info(dev, "RP1 Firmware version %08x%08x%08x%08x%08x\n",
version[0], version[1], version[2], version[3], version[4]);
- ret = 0;
- } else if (ret >= 0) {
- ret = -EIO;
+ platform_set_drvdata(pdev, fw);
+ } else {
+ rp1_firmware_put(fw);
+ platform_set_drvdata(pdev, ERR_PTR(-ENOENT));
}
- return ret;
+ return 0;
}
static int rp1_firmware_remove(struct platform_device *pdev)

View File

@ -0,0 +1,32 @@
From 97e6955cef61340165e8ec276084841d335335e9 Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.com>
Date: Tue, 4 Feb 2025 13:18:45 +0000
Subject: [PATCH] mailbox: rp1: Don't claim channels in of_xlate
The of_xlate method saves the calculated event mask in the con_priv
field. It also rejects subsequent attempt to use that channel because
the mask is non-zero, which causes a repeated instantiation of a client
driver to fail.
The of_xlate method is not meant to be a point of resource acquisition.
Leave the con_priv initialisation, but drop the test that it was
previously zero.
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
---
drivers/mailbox/rp1-mailbox.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/mailbox/rp1-mailbox.c b/drivers/mailbox/rp1-mailbox.c
index bf71db1dd9fae..0e8af098b62b2 100644
--- a/drivers/mailbox/rp1-mailbox.c
+++ b/drivers/mailbox/rp1-mailbox.c
@@ -133,8 +133,6 @@ static struct mbox_chan *rp1_mbox_xlate(struct mbox_controller *mbox,
return ERR_PTR(-EINVAL);
chan = &mbox->chans[doorbell];
- if (chan->con_priv)
- return ERR_PTR(-EBUSY);
chan->con_priv = (void *)(uintptr_t)(1 << doorbell);

View File

@ -0,0 +1,34 @@
From c8cf0694d8ecd5acaa03c26fc404e66dea9308fd Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.com>
Date: Tue, 25 Feb 2025 12:16:33 +0000
Subject: [PATCH] misc: rp1-pio: Demote fw probe error to warning
Support for the RP1 firmware mailbox API is rolling out to Pi 5 EEPROM
images. For most users, the fact that the PIO is not available is no
cause for alarm. Change the message to a warning, so that it does not
appear with "quiet" in cmdline.txt.
Link: https://github.com/raspberrypi/linux/issues/6642
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
---
drivers/misc/rp1-pio.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/misc/rp1-pio.c b/drivers/misc/rp1-pio.c
index 7e875811509f8..a04dc8edcf5b8 100644
--- a/drivers/misc/rp1-pio.c
+++ b/drivers/misc/rp1-pio.c
@@ -1270,8 +1270,10 @@ static int rp1_pio_probe(struct platform_device *pdev)
fw = devm_rp1_firmware_get(dev, dev->of_node);
if (!fw)
return dev_err_probe(dev, -EPROBE_DEFER, "failed to find RP1 firmware driver\n");
- if (IS_ERR(fw))
- return dev_err_probe(dev, PTR_ERR(fw), "failed to contact RP1 firmware\n");
+ if (IS_ERR(fw)) {
+ dev_warn(dev, "failed to contact RP1 firmware\n");
+ return PTR_ERR(fw);
+ }
ret = rp1_firmware_get_feature(fw, FOURCC_PIO, &op_base, &op_count);
if (ret < 0)
return ret;

View File

@ -1,4 +1,4 @@
From 3d9bd29941ce291e44aab60be1339d4c116ebda5 Mon Sep 17 00:00:00 2001
From 1e59538810162eca0e902e024dde599c15f36cde Mon Sep 17 00:00:00 2001
From: Stefan Agner <stefan@agner.ch>
Date: Tue, 29 Dec 2020 23:34:52 +0100
Subject: [PATCH] rpi: add NVMe to boot order
@ -12,7 +12,7 @@ Signed-off-by: Stefan Agner <stefan@agner.ch>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/board/raspberrypi/rpi/rpi.env b/board/raspberrypi/rpi/rpi.env
index 30228285ed..89f6c5a839 100644
index 30228285edd..89f6c5a8392 100644
--- a/board/raspberrypi/rpi/rpi.env
+++ b/board/raspberrypi/rpi/rpi.env
@@ -74,4 +74,4 @@ pxefile_addr_r=0x02500000

View File

@ -1,4 +1,4 @@
From ab13da2df9f86517df45da293ed8002e07a3d5ec Mon Sep 17 00:00:00 2001
From 16508d6d1a166ac2c7c03550876633cf9828e0e0 Mon Sep 17 00:00:00 2001
From: Stefan Agner <stefan@agner.ch>
Date: Thu, 23 Sep 2021 23:43:31 +0200
Subject: [PATCH] Revert "nvme: Correct the prps per page calculation method"
@ -23,7 +23,7 @@ Cc: Wesley Sheng <wesleyshenggit@sina.com>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nvme/nvme.c b/drivers/nvme/nvme.c
index 7c58ceb78f..0b2496cf26 100644
index 7c58ceb78f5..0b2496cf26f 100644
--- a/drivers/nvme/nvme.c
+++ b/drivers/nvme/nvme.c
@@ -52,7 +52,7 @@ static int nvme_setup_prps(struct nvme_dev *dev, u64 *prp2,

View File

@ -1,4 +1,4 @@
From 9de58838106829b8caa47b6fd6b42ba3435c2ce6 Mon Sep 17 00:00:00 2001
From 725fef2ebd8a23f68c2574ca799593596d1ef6fd Mon Sep 17 00:00:00 2001
From: Stefan Agner <stefan@agner.ch>
Date: Thu, 7 Oct 2021 12:02:39 +0200
Subject: [PATCH] usb: xhci-brcm: Make driver compatible with downstream device
@ -13,7 +13,7 @@ Signed-off-by: Stefan Agner <stefan@agner.ch>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/host/xhci-brcm.c b/drivers/usb/host/xhci-brcm.c
index 2ffad148de..2a063ccc9e 100644
index 2ffad148dea..2a063ccc9eb 100644
--- a/drivers/usb/host/xhci-brcm.c
+++ b/drivers/usb/host/xhci-brcm.c
@@ -81,7 +81,7 @@ static int xhci_brcm_deregister(struct udevice *dev)

View File

@ -1,4 +1,4 @@
From 8c5910539c7e4e97f233789c2489c800f87ddf81 Mon Sep 17 00:00:00 2001
From cd66ee3e5f0a3c86702cf898c5b6d13227cd29b7 Mon Sep 17 00:00:00 2001
From: Stefan Agner <stefan@agner.ch>
Date: Thu, 23 Sep 2021 23:52:44 +0200
Subject: [PATCH] nvme: improve readability of nvme_setup_prps()
@ -12,7 +12,7 @@ Signed-off-by: Stefan Agner <stefan@agner.ch>
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/nvme/nvme.c b/drivers/nvme/nvme.c
index 0b2496cf26..b1d8eecdca 100644
index 0b2496cf26f..b1d8eecdcaf 100644
--- a/drivers/nvme/nvme.c
+++ b/drivers/nvme/nvme.c
@@ -47,12 +47,12 @@ static int nvme_wait_csts(struct nvme_dev *dev, u32 mask, u32 val)

View File

@ -1,4 +1,4 @@
From e3f73d6ddba46f3b4ec8833c11f9ad831e57d394 Mon Sep 17 00:00:00 2001
From 76cde18c3c80d4f7c2d53e4731e1c5d9689a6f49 Mon Sep 17 00:00:00 2001
From: Stefan Agner <stefan@agner.ch>
Date: Thu, 23 Sep 2021 23:58:35 +0200
Subject: [PATCH] nvme: Use pointer for CPU addressed buffers
@ -15,7 +15,7 @@ Signed-off-by: Stefan Agner <stefan@agner.ch>
3 files changed, 33 insertions(+), 33 deletions(-)
diff --git a/drivers/nvme/nvme.c b/drivers/nvme/nvme.c
index b1d8eecdca..f626a472ff 100644
index b1d8eecdcaf..f626a472ffa 100644
--- a/drivers/nvme/nvme.c
+++ b/drivers/nvme/nvme.c
@@ -45,11 +45,11 @@ static int nvme_wait_csts(struct nvme_dev *dev, u32 mask, u32 val)
@ -184,7 +184,7 @@ index b1d8eecdca..f626a472ff 100644
goto free_id;
}
diff --git a/drivers/nvme/nvme_show.c b/drivers/nvme/nvme_show.c
index b06cb5c6d5..ad1a260f9a 100644
index b06cb5c6d51..ad1a260f9ab 100644
--- a/drivers/nvme/nvme_show.c
+++ b/drivers/nvme/nvme_show.c
@@ -113,7 +113,7 @@ int nvme_print_info(struct udevice *udev)
@ -206,7 +206,7 @@ index b06cb5c6d5..ad1a260f9a 100644
goto free_id;
}
diff --git a/include/nvme.h b/include/nvme.h
index 2cdf8ce320..8ff823cd81 100644
index 2cdf8ce320c..8ff823cd81c 100644
--- a/include/nvme.h
+++ b/include/nvme.h
@@ -18,12 +18,12 @@ struct nvme_dev;

View File

@ -1,4 +1,4 @@
From 1c9ebd44d5af878719f041d6a2329cc81674134c Mon Sep 17 00:00:00 2001
From 9d2676a8fad6d92e5c761c125b069c90a9ef6587 Mon Sep 17 00:00:00 2001
From: Stefan Agner <stefan@agner.ch>
Date: Fri, 24 Sep 2021 00:27:39 +0200
Subject: [PATCH] nvme: translate virtual addresses into the bus's address
@ -26,7 +26,7 @@ Signed-off-by: Stefan Agner <stefan@agner.ch>
2 files changed, 25 insertions(+), 14 deletions(-)
diff --git a/drivers/nvme/nvme.c b/drivers/nvme/nvme.c
index f626a472ff..70ce63f205 100644
index f626a472ffa..70ce63f2053 100644
--- a/drivers/nvme/nvme.c
+++ b/drivers/nvme/nvme.c
@@ -66,7 +66,7 @@ static int nvme_setup_prps(struct nvme_dev *dev, u64 *prp2,
@ -143,7 +143,7 @@ index f626a472ff..70ce63f205 100644
status = nvme_submit_sync_cmd(dev->queues[NVME_IO_Q],
&c, NULL, IO_TIMEOUT);
diff --git a/drivers/nvme/nvme.h b/drivers/nvme/nvme.h
index bc1d612dde..f52103c009 100644
index bc1d612dde4..f52103c0095 100644
--- a/drivers/nvme/nvme.h
+++ b/drivers/nvme/nvme.h
@@ -7,8 +7,11 @@

View File

@ -1,4 +1,4 @@
From 418664bb1dfa61b8fc1a0292adb00ec93e1a7619 Mon Sep 17 00:00:00 2001
From c77c55c6975af3ff5210559b1c5a89e76de0cceb Mon Sep 17 00:00:00 2001
From: Stefan Agner <stefan@agner.ch>
Date: Mon, 24 Apr 2023 15:44:15 +0200
Subject: [PATCH] Revert "pci: Check region ranges are addressable"
@ -15,7 +15,7 @@ Signed-off-by: Stefan Agner <stefan@agner.ch>
1 file changed, 1 insertion(+), 16 deletions(-)
diff --git a/drivers/pci/pci-uclass.c b/drivers/pci/pci-uclass.c
index 6571e65304..803d5c25fc 100644
index 59894d2430b..f1f7e525efe 100644
--- a/drivers/pci/pci-uclass.c
+++ b/drivers/pci/pci-uclass.c
@@ -1038,22 +1038,7 @@ static int decode_regions(struct pci_controller *hose, ofnode parent_node,

View File

@ -1,4 +1,4 @@
From 81100e760c8ed3d697696de5353d51e8e1af2be4 Mon Sep 17 00:00:00 2001
From ad9ce9d8ba273fffeff3d98ae1fc978dd217ab1d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= <sairon@sairon.cz>
Date: Mon, 30 Sep 2024 17:56:45 +0200
Subject: [PATCH] reset: reset-brcmstb: Add Broadcom STB reset controller
@ -20,7 +20,7 @@ Signed-off-by: Jan Čermák <sairon@sairon.cz>
create mode 100644 drivers/reset/reset-brcmstb.c
diff --git a/drivers/reset/Kconfig b/drivers/reset/Kconfig
index fe5c1214f5..10a364b2a8 100644
index fe5c1214f57..186dd963bc4 100644
--- a/drivers/reset/Kconfig
+++ b/drivers/reset/Kconfig
@@ -63,6 +63,12 @@ config RESET_BCM6345
@ -37,7 +37,7 @@ index fe5c1214f5..10a364b2a8 100644
bool "Reset controller driver for UniPhier SoCs"
depends on ARCH_UNIPHIER
diff --git a/drivers/reset/Makefile b/drivers/reset/Makefile
index 2eb639e4a6..d7e9ac1a88 100644
index d99a78c9828..8d9181e8af7 100644
--- a/drivers/reset/Makefile
+++ b/drivers/reset/Makefile
@@ -13,6 +13,7 @@ obj-$(CONFIG_TEGRA186_RESET) += tegra186-reset.o
@ -50,7 +50,7 @@ index 2eb639e4a6..d7e9ac1a88 100644
obj-$(CONFIG_RESET_AST2600) += reset-ast2600.o
diff --git a/drivers/reset/reset-brcmstb.c b/drivers/reset/reset-brcmstb.c
new file mode 100644
index 0000000000..c0aef5f124
index 00000000000..c0aef5f1241
--- /dev/null
+++ b/drivers/reset/reset-brcmstb.c
@@ -0,0 +1,89 @@

View File

@ -1,4 +1,4 @@
From eb7dd5b1afa4831e6eca2edb2650bd9db9a6d6eb Mon Sep 17 00:00:00 2001
From d7f2d45fa63507cef65e86aeb79e1f47733e981c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= <sairon@sairon.cz>
Date: Mon, 30 Sep 2024 18:09:29 +0200
Subject: [PATCH] reset: reset-brcmstb-rescal: Add Broadcom RESCAL reset
@ -21,7 +21,7 @@ Signed-off-by: Jan Čermák <sairon@sairon.cz>
create mode 100644 drivers/reset/reset-brcmstb-rescal.c
diff --git a/drivers/reset/Kconfig b/drivers/reset/Kconfig
index 10a364b2a8..fd1eb05a41 100644
index 186dd963bc4..85776ba234d 100644
--- a/drivers/reset/Kconfig
+++ b/drivers/reset/Kconfig
@@ -69,6 +69,12 @@ config RESET_BRCMSTB
@ -38,7 +38,7 @@ index 10a364b2a8..fd1eb05a41 100644
bool "Reset controller driver for UniPhier SoCs"
depends on ARCH_UNIPHIER
diff --git a/drivers/reset/Makefile b/drivers/reset/Makefile
index d7e9ac1a88..45cf2f1b4d 100644
index 8d9181e8af7..8f926c52c42 100644
--- a/drivers/reset/Makefile
+++ b/drivers/reset/Makefile
@@ -14,6 +14,7 @@ obj-$(CONFIG_RESET_TI_SCI) += reset-ti-sci.o
@ -51,7 +51,7 @@ index d7e9ac1a88..45cf2f1b4d 100644
obj-$(CONFIG_RESET_AST2600) += reset-ast2600.o
diff --git a/drivers/reset/reset-brcmstb-rescal.c b/drivers/reset/reset-brcmstb-rescal.c
new file mode 100644
index 0000000000..37096bb9ff
index 00000000000..37096bb9fff
--- /dev/null
+++ b/drivers/reset/reset-brcmstb-rescal.c
@@ -0,0 +1,101 @@

View File

@ -1,4 +1,4 @@
From 6e16ad9e01d746f78f8a2391dec9aae3f39a96e5 Mon Sep 17 00:00:00 2001
From 62d5ad02aa91d4f8e5343869439c0e2302b59301 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= <sairon@sairon.cz>
Date: Mon, 30 Sep 2024 18:13:09 +0200
Subject: [PATCH] pci: pcie-brcmstb: Add basic support for BCM2712 PCIe
@ -25,12 +25,48 @@ in a similar fashion as in upstream/downstream Linux drivers.
Signed-off-by: Jan Čermák <sairon@sairon.cz>
---
arch/arm/mach-bcm283x/init.c | 10 +-
drivers/pci/pcie_brcmstb.c | 191 +++++++++++++++++++++++++++++++++--
2 files changed, 189 insertions(+), 12 deletions(-)
.../mach-bcm283x/include/mach/acpi/bcm2711.h | 10 +
arch/arm/mach-bcm283x/init.c | 10 +-
drivers/pci/pcie_brcmstb.c | 179 +++++++++++++++++-
3 files changed, 188 insertions(+), 11 deletions(-)
diff --git a/arch/arm/mach-bcm283x/include/mach/acpi/bcm2711.h b/arch/arm/mach-bcm283x/include/mach/acpi/bcm2711.h
index a86875b1833..a810b91906e 100644
--- a/arch/arm/mach-bcm283x/include/mach/acpi/bcm2711.h
+++ b/arch/arm/mach-bcm283x/include/mach/acpi/bcm2711.h
@@ -49,6 +49,10 @@
#define PCIE_RC_DL_MDIO_WR_DATA 0x1104
#define PCIE_RC_DL_MDIO_RD_DATA 0x1108
+#define PCIE_RC_PL_PHY_CTL_15 0x184c
+#define PCIE_RC_PL_PHY_CTL_15_DIS_PLL_PD_MASK 0x400000
+#define PCIE_RC_PL_PHY_CTL_15_PM_CLK_PERIOD_MASK 0xff
+
#define PCIE_MISC_MISC_CTRL 0x4008
#define MISC_CTRL_SCB_ACCESS_EN_MASK 0x1000
#define MISC_CTRL_CFG_READ_UR_MODE_MASK 0x2000
@@ -70,6 +74,9 @@
#define PCIE_MISC_RC_BAR2_CONFIG_HI 0x4038
#define PCIE_MISC_RC_BAR3_CONFIG_LO 0x403c
#define RC_BAR3_CONFIG_LO_SIZE_MASK 0x1f
+#define PCIE_MISC_PCIE_CTRL 0x4064
+#define PCIE_MISC_PCIE_CTRL_PCIE_L23_REQUEST_MASK 1
+#define PCIE_MISC_PCIE_CTRL_PCIE_PERSTB_MASK 4
#define PCIE_MISC_PCIE_STATUS 0x4068
#define STATUS_PCIE_PORT_MASK 0x80
#define STATUS_PCIE_PORT_SHIFT 7
@@ -93,6 +100,9 @@
#define PCIE_MEM_WIN0_LIMIT_HI(win) \
PCIE_MISC_CPU_2_PCIE_MEM_WIN0_LIMIT_HI + ((win) * 8)
+#define PCIE_MISC_UBUS_BAR2_CONFIG_REMAP 0x40b4
+#define PCIE_MISC_UBUS_BAR2_CONFIG_REMAP_ACCESS_ENABLE_MASK BIT(0)
+
#define PCIE_MISC_HARD_PCIE_HARD_DEBUG 0x4204
#define PCIE_HARD_DEBUG_SERDES_IDDQ_MASK 0x08000000
diff --git a/arch/arm/mach-bcm283x/init.c b/arch/arm/mach-bcm283x/init.c
index 1b459707bc..2d34d67075 100644
index 7a1de22e0ae..7c7c4e75032 100644
--- a/arch/arm/mach-bcm283x/init.c
+++ b/arch/arm/mach-bcm283x/init.c
@@ -18,7 +18,7 @@
@ -58,10 +94,10 @@ index 1b459707bc..2d34d67075 100644
/* SoC bus */
.virt = 0x107c000000UL,
diff --git a/drivers/pci/pcie_brcmstb.c b/drivers/pci/pcie_brcmstb.c
index f978c64365..df3e177629 100644
index f089c48f028..51b7351b8ce 100644
--- a/drivers/pci/pcie_brcmstb.c
+++ b/drivers/pci/pcie_brcmstb.c
@@ -16,6 +16,7 @@
@@ -17,6 +17,7 @@
#include <dm.h>
#include <dm/ofnode.h>
#include <pci.h>
@ -69,46 +105,11 @@ index f978c64365..df3e177629 100644
#include <asm/io.h>
#include <linux/bitfield.h>
#include <linux/log2.h>
@@ -39,6 +40,10 @@
#define PCIE_RC_DL_MDIO_WR_DATA 0x1104
#define PCIE_RC_DL_MDIO_RD_DATA 0x1108
+#define PCIE_RC_PL_PHY_CTL_15 0x184c
+#define PCIE_RC_PL_PHY_CTL_15_DIS_PLL_PD_MASK 0x400000
+#define PCIE_RC_PL_PHY_CTL_15_PM_CLK_PERIOD_MASK 0xff
+
#define PCIE_MISC_MISC_CTRL 0x4008
#define MISC_CTRL_SCB_ACCESS_EN_MASK 0x1000
#define MISC_CTRL_CFG_READ_UR_MODE_MASK 0x2000
@@ -64,6 +69,10 @@
#define PCIE_MISC_RC_BAR3_CONFIG_LO 0x403c
#define RC_BAR3_CONFIG_LO_SIZE_MASK 0x1f
+#define PCIE_MISC_PCIE_CTRL 0x4064
+#define PCIE_MISC_PCIE_CTRL_PCIE_L23_REQUEST_MASK 0x1
+#define PCIE_MISC_PCIE_CTRL_PCIE_PERSTB_MASK 0x4
+
#define PCIE_MISC_PCIE_STATUS 0x4068
#define STATUS_PCIE_PORT_MASK 0x80
#define STATUS_PCIE_PORT_SHIFT 7
@@ -89,9 +98,11 @@
#define PCIE_MEM_WIN0_LIMIT_HI(win) \
PCIE_MISC_CPU_2_PCIE_MEM_WIN0_LIMIT_HI + ((win) * 8)
-#define PCIE_MISC_HARD_PCIE_HARD_DEBUG 0x4204
#define PCIE_HARD_DEBUG_SERDES_IDDQ_MASK 0x08000000
+#define PCIE_MISC_UBUS_BAR2_CONFIG_REMAP 0x40b4
+#define PCIE_MISC_UBUS_BAR2_CONFIG_REMAP_ACCESS_ENABLE_MASK BIT(0)
+
#define PCIE_MSI_INTR2_CLR 0x4508
#define PCIE_MSI_INTR2_MASK_SET 0x4510
@@ -130,6 +141,26 @@
@@ -49,6 +50,26 @@
#define SSC_STATUS_PLL_LOCK_MASK 0x800
#define SSC_STATUS_PLL_LOCK_SHIFT 11
+#define HARD_DEBUG(pcie) ((pcie)->reg_offsets[PCIE_HARD_DEBUG])
+#define HARD_DEBUG(pcie) ((pcie)->reg_offsets[PCIE_HARD_DEBUG])
+
+struct brcm_pcie;
+
@ -131,7 +132,7 @@ index f978c64365..df3e177629 100644
/**
* struct brcm_pcie - the PCIe controller state
* @base: Base address of memory mapped IO registers of the controller
@@ -140,8 +171,15 @@
@@ -59,8 +80,15 @@
struct brcm_pcie {
void __iomem *base;
@ -147,7 +148,7 @@ index f978c64365..df3e177629 100644
};
/**
@@ -367,6 +405,27 @@ static int brcm_pcie_set_ssc(void __iomem *base)
@@ -286,6 +314,27 @@ static int brcm_pcie_set_ssc(void __iomem *base)
return ssc && pll ? 0 : -EIO;
}
@ -175,16 +176,16 @@ index f978c64365..df3e177629 100644
/**
* brcm_pcie_set_gen() - Limits operation to a specific generation (1, 2 or 3)
* @pcie: pointer to the PCIe controller state
@@ -426,6 +485,52 @@ static void brcm_pcie_set_outbound_win(struct brcm_pcie *pcie,
@@ -345,6 +394,52 @@ static void brcm_pcie_set_outbound_win(struct brcm_pcie *pcie,
writel(tmp, base + PCIE_MEM_WIN0_LIMIT_HI(win));
}
+static int brcm_pcie_perst_set_generic(struct brcm_pcie *pcie, u32 val)
+{
+ if (val)
+ setbits_le32(pcie->base + PCIE_RGR1_SW_INIT_1, RGR1_SW_INIT_1_PERST_MASK);
+ setbits_le32(pcie->base + PCIE_RGR1_SW_INIT_1, PCIE_RGR1_SW_INIT_1_PERST_MASK);
+ else
+ clrbits_le32(pcie->base + PCIE_RGR1_SW_INIT_1, RGR1_SW_INIT_1_PERST_MASK);
+ clrbits_le32(pcie->base + PCIE_RGR1_SW_INIT_1, PCIE_RGR1_SW_INIT_1_PERST_MASK);
+
+ return 0;
+}
@ -207,9 +208,9 @@ index f978c64365..df3e177629 100644
+ }
+
+ if (val)
+ setbits_le32(pcie->base + PCIE_RGR1_SW_INIT_1, RGR1_SW_INIT_1_INIT_MASK);
+ setbits_le32(pcie->base + PCIE_RGR1_SW_INIT_1, PCIE_RGR1_SW_INIT_1_INIT_MASK);
+ else
+ clrbits_le32(pcie->base + PCIE_RGR1_SW_INIT_1, RGR1_SW_INIT_1_INIT_MASK);
+ clrbits_le32(pcie->base + PCIE_RGR1_SW_INIT_1, PCIE_RGR1_SW_INIT_1_INIT_MASK);
+
+ return ret;
+}
@ -228,7 +229,7 @@ index f978c64365..df3e177629 100644
static int brcm_pcie_probe(struct udevice *dev)
{
struct udevice *ctlr = pci_get_controller(dev);
@@ -441,13 +546,17 @@ static int brcm_pcie_probe(struct udevice *dev)
@@ -360,13 +455,17 @@ static int brcm_pcie_probe(struct udevice *dev)
u16 nlw, cls, lnksta;
u32 tmp;
@ -241,18 +242,18 @@ index f978c64365..df3e177629 100644
* This will need to be changed when support for other SoCs is added.
*/
- setbits_le32(base + PCIE_RGR1_SW_INIT_1,
- RGR1_SW_INIT_1_INIT_MASK | RGR1_SW_INIT_1_PERST_MASK);
- PCIE_RGR1_SW_INIT_1_INIT_MASK | PCIE_RGR1_SW_INIT_1_PERST_MASK);
+ pcie->perst_set(pcie, 1);
+ pcie->bridge_sw_init_set(pcie, 1);
+
/*
* The delay is a safety precaution to preclude the reset signal
* from looking like a glitch.
@@ -455,14 +564,26 @@ static int brcm_pcie_probe(struct udevice *dev)
@@ -374,14 +473,26 @@ static int brcm_pcie_probe(struct udevice *dev)
udelay(100);
/* Take the bridge out of reset */
- clrbits_le32(base + PCIE_RGR1_SW_INIT_1, RGR1_SW_INIT_1_INIT_MASK);
- clrbits_le32(base + PCIE_RGR1_SW_INIT_1, PCIE_RGR1_SW_INIT_1_INIT_MASK);
+ pcie->bridge_sw_init_set(pcie, 0);
- clrbits_le32(base + PCIE_MISC_HARD_PCIE_HARD_DEBUG,
@ -277,7 +278,7 @@ index f978c64365..df3e177629 100644
/* Set SCB_MAX_BURST_SIZE, CFG_READ_UR_MODE, SCB_ACCESS_EN */
clrsetbits_le32(base + PCIE_MISC_MISC_CTRL,
MISC_CTRL_MAX_BURST_SIZE_MASK,
@@ -481,6 +602,13 @@ static int brcm_pcie_probe(struct udevice *dev)
@@ -400,6 +511,13 @@ static int brcm_pcie_probe(struct udevice *dev)
writel(upper_32_bits(rc_bar2_offset),
base + PCIE_MISC_RC_BAR2_CONFIG_HI);
@ -291,21 +292,21 @@ index f978c64365..df3e177629 100644
scb_size_val = rc_bar2_size ?
ilog2(rc_bar2_size) - 15 : 0xf; /* 0xf is 1GB */
@@ -507,8 +635,7 @@ static int brcm_pcie_probe(struct udevice *dev)
@@ -426,8 +544,7 @@ static int brcm_pcie_probe(struct udevice *dev)
brcm_pcie_set_gen(pcie, pcie->gen);
/* Unassert the fundamental reset */
- clrbits_le32(pcie->base + PCIE_RGR1_SW_INIT_1,
- RGR1_SW_INIT_1_PERST_MASK);
- PCIE_RGR1_SW_INIT_1_PERST_MASK);
+ pcie->perst_set(pcie, 0);
/*
* Wait for 100ms after PERST# deassertion; see PCIe CEM specification
@@ -595,20 +722,23 @@ static int brcm_pcie_remove(struct udevice *dev)
@@ -514,20 +631,23 @@ static int brcm_pcie_remove(struct udevice *dev)
void __iomem *base = pcie->base;
/* Assert fundamental reset */
- setbits_le32(base + PCIE_RGR1_SW_INIT_1, RGR1_SW_INIT_1_PERST_MASK);
- setbits_le32(base + PCIE_RGR1_SW_INIT_1, PCIE_RGR1_SW_INIT_1_PERST_MASK);
+ pcie->perst_set(pcie, 1);
/* Turn off SerDes */
@ -314,7 +315,7 @@ index f978c64365..df3e177629 100644
PCIE_HARD_DEBUG_SERDES_IDDQ_MASK);
/* Shutdown bridge */
- setbits_le32(base + PCIE_RGR1_SW_INIT_1, RGR1_SW_INIT_1_INIT_MASK);
- setbits_le32(base + PCIE_RGR1_SW_INIT_1, PCIE_RGR1_SW_INIT_1_INIT_MASK);
+ /* On BCM2712 it will block access to the RESCAL, so don't do it. */
+ if (pcie->soc_base != BCM2712)
+ pcie->bridge_sw_init_set(pcie, 1);
@ -328,7 +329,7 @@ index f978c64365..df3e177629 100644
struct brcm_pcie *pcie = dev_get_priv(dev);
ofnode dn = dev_ofnode(dev);
u32 max_link_speed;
@@ -619,6 +749,22 @@ static int brcm_pcie_of_to_plat(struct udevice *dev)
@@ -538,6 +658,22 @@ static int brcm_pcie_of_to_plat(struct udevice *dev)
if (!pcie->base)
return -EINVAL;
@ -351,7 +352,7 @@ index f978c64365..df3e177629 100644
pcie->ssc = ofnode_read_bool(dn, "brcm,enable-ssc");
ret = ofnode_read_u32(dn, "max-link-speed", &max_link_speed);
@@ -635,8 +781,31 @@ static const struct dm_pci_ops brcm_pcie_ops = {
@@ -554,8 +690,31 @@ static const struct dm_pci_ops brcm_pcie_ops = {
.write_config = brcm_pcie_write_config,
};

View File

@ -1,4 +1,4 @@
From 61693f4e8db08d263c6036afeecd6d30e7b23660 Mon Sep 17 00:00:00 2001
From 4302f18da75c7138ce8abc2c67eb6aaf0205e109 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= <sairon@sairon.cz>
Date: Thu, 3 Oct 2024 11:09:53 +0200
Subject: [PATCH] ARM: bcm2835: add BCM2712 config option
@ -17,12 +17,12 @@ Signed-off-by: Jan Čermák <sairon@sairon.cz>
2 files changed, 7 insertions(+)
diff --git a/arch/arm/mach-bcm283x/Kconfig b/arch/arm/mach-bcm283x/Kconfig
index b3287ce8bc..3b8672cfe0 100644
index d9303e8c281..0adc881d238 100644
--- a/arch/arm/mach-bcm283x/Kconfig
+++ b/arch/arm/mach-bcm283x/Kconfig
@@ -44,6 +44,11 @@ config BCM2711_64B
select BCM2711
select ARM64
@@ -56,6 +56,11 @@ config BCM2711_64B
select BLOBLIST_ALLOC if GENERATE_ACPI_TABLE
select BLOBLIST_TABLES if GENERATE_ACPI_TABLE
+config BCM2712
+ bool "Broadcom BCM2712 SoC support (64-bit only)"
@ -31,12 +31,12 @@ index b3287ce8bc..3b8672cfe0 100644
+
menu "Broadcom BCM283X family"
depends on ARCH_BCM283X
choice
diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig
index 22a56f4ca3..6badc60d13 100644
index 41901433e8c..89bc332b626 100644
--- a/drivers/pci/Kconfig
+++ b/drivers/pci/Kconfig
@@ -386,6 +386,8 @@ config PCIE_DW_ROCKCHIP
@@ -392,6 +392,8 @@ config PCIE_DW_ROCKCHIP
config PCI_BRCMSTB
bool "Broadcom STB PCIe controller"
depends on ARCH_BCM283X

View File

@ -1,4 +1,4 @@
From d613be9ca405b2e65ac03b137cf6351b1aae7154 Mon Sep 17 00:00:00 2001
From 57a416a55ebd7ab43fbebd972f984470f7f71973 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= <sairon@sairon.cz>
Date: Mon, 7 Oct 2024 15:13:40 +0200
Subject: [PATCH] pci: pcie-brcmstb: HACK - add DT property for skipping device
@ -21,10 +21,10 @@ Signed-off-by: Jan Čermák <sairon@sairon.cz>
1 file changed, 7 insertions(+)
diff --git a/drivers/pci/pcie_brcmstb.c b/drivers/pci/pcie_brcmstb.c
index df3e177629..02d9e7a1b3 100644
index 51b7351b8ce..cd2d395947a 100644
--- a/drivers/pci/pcie_brcmstb.c
+++ b/drivers/pci/pcie_brcmstb.c
@@ -175,6 +175,7 @@ struct brcm_pcie {
@@ -84,6 +84,7 @@ struct brcm_pcie {
enum pcie_soc_base soc_base;
int gen;
bool ssc;
@ -32,7 +32,7 @@ index df3e177629..02d9e7a1b3 100644
struct reset_ctl *rescal;
struct reset_ctl *bridge_reset;
@@ -546,6 +547,11 @@ static int brcm_pcie_probe(struct udevice *dev)
@@ -455,6 +456,11 @@ static int brcm_pcie_probe(struct udevice *dev)
u16 nlw, cls, lnksta;
u32 tmp;
@ -44,7 +44,7 @@ index df3e177629..02d9e7a1b3 100644
if (pcie->rescal)
reset_deassert(pcie->rescal);
@@ -766,6 +772,7 @@ static int brcm_pcie_of_to_plat(struct udevice *dev)
@@ -675,6 +681,7 @@ static int brcm_pcie_of_to_plat(struct udevice *dev)
}
pcie->ssc = ofnode_read_bool(dn, "brcm,enable-ssc");

View File

@ -1,82 +0,0 @@
From 45df955b5aa0460b9c93f63fb4a38f10807c0694 Mon Sep 17 00:00:00 2001
From: Pascal Vizeli <pvizeli@syshack.ch>
Date: Tue, 10 Dec 2019 09:48:46 +0000
Subject: [PATCH] rpi: Use CONFIG_OF_BOARD instead of CONFIG_EMBED
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
---
configs/rpi_0_w_defconfig | 2 +-
configs/rpi_2_defconfig | 2 +-
configs/rpi_3_32b_defconfig | 2 +-
configs/rpi_3_defconfig | 2 +-
configs/rpi_defconfig | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/configs/rpi_0_w_defconfig b/configs/rpi_0_w_defconfig
index ac3b40c1c1..e6765878d1 100644
--- a/configs/rpi_0_w_defconfig
+++ b/configs/rpi_0_w_defconfig
@@ -24,7 +24,7 @@ CONFIG_CMD_GPIO=y
CONFIG_CMD_MMC=y
CONFIG_CMD_USB=y
CONFIG_CMD_FS_UUID=y
-CONFIG_OF_EMBED=y
+CONFIG_OF_BOARD=y
CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
diff --git a/configs/rpi_2_defconfig b/configs/rpi_2_defconfig
index b6e06cfe20..0650344526 100644
--- a/configs/rpi_2_defconfig
+++ b/configs/rpi_2_defconfig
@@ -25,7 +25,7 @@ CONFIG_CMD_GPIO=y
CONFIG_CMD_MMC=y
CONFIG_CMD_USB=y
CONFIG_CMD_FS_UUID=y
-CONFIG_OF_EMBED=y
+CONFIG_OF_BOARD=y
CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
diff --git a/configs/rpi_3_32b_defconfig b/configs/rpi_3_32b_defconfig
index eadc418927..7f52b508c4 100644
--- a/configs/rpi_3_32b_defconfig
+++ b/configs/rpi_3_32b_defconfig
@@ -24,7 +24,7 @@ CONFIG_CMD_GPIO=y
CONFIG_CMD_MMC=y
CONFIG_CMD_USB=y
CONFIG_CMD_FS_UUID=y
-CONFIG_OF_EMBED=y
+CONFIG_OF_BOARD=y
CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
diff --git a/configs/rpi_3_defconfig b/configs/rpi_3_defconfig
index 6890af4d1d..0767518279 100644
--- a/configs/rpi_3_defconfig
+++ b/configs/rpi_3_defconfig
@@ -23,7 +23,7 @@ CONFIG_CMD_GPIO=y
CONFIG_CMD_MMC=y
CONFIG_CMD_USB=y
CONFIG_CMD_FS_UUID=y
-CONFIG_OF_EMBED=y
+CONFIG_OF_BOARD=y
CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
diff --git a/configs/rpi_defconfig b/configs/rpi_defconfig
index 29c10060cf..79b507405d 100644
--- a/configs/rpi_defconfig
+++ b/configs/rpi_defconfig
@@ -24,7 +24,7 @@ CONFIG_CMD_GPIO=y
CONFIG_CMD_MMC=y
CONFIG_CMD_USB=y
CONFIG_CMD_FS_UUID=y
-CONFIG_OF_EMBED=y
+CONFIG_OF_BOARD=y
CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
--
2.43.0

View File

@ -1,26 +0,0 @@
From f53b9a545132686b0286ce166203a57935502dbc Mon Sep 17 00:00:00 2001
From: Stefan Agner <stefan@agner.ch>
Date: Tue, 29 Dec 2020 23:34:52 +0100
Subject: [PATCH] rpi: add NVMe to boot order
The Compute Module 4 I/O Board can support a NVMe. Add NVMe to the boot
order.
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
board/raspberrypi/rpi/rpi.env | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/board/raspberrypi/rpi/rpi.env b/board/raspberrypi/rpi/rpi.env
index 30228285ed..89f6c5a839 100644
--- a/board/raspberrypi/rpi/rpi.env
+++ b/board/raspberrypi/rpi/rpi.env
@@ -74,4 +74,4 @@ pxefile_addr_r=0x02500000
fdt_addr_r=0x02600000
ramdisk_addr_r=0x02700000
-boot_targets=mmc usb pxe dhcp
+boot_targets=mmc nvme usb pxe dhcp
--
2.43.0

View File

@ -1,40 +0,0 @@
From 8e63cbe8892eb6edc02674d42078a9f116ee8224 Mon Sep 17 00:00:00 2001
From: Stefan Agner <stefan@agner.ch>
Date: Thu, 23 Sep 2021 23:43:31 +0200
Subject: [PATCH] Revert "nvme: Correct the prps per page calculation method"
This reverts commit 859b33c948945f7904f60a2c12a3792d356d51ad.
If there is more than one PRP List the last entry is a pointer to
the next list. From the NVM Express specification:
"The last entry within a memory page, as indicated by the memory page
size in the CC.MPS field, shall be a PRP List pointer if there is more
than a single memory page of data to be transferred."
For the purpose of calculating the number of pages required for PRP
lists we should always assume that the last entry is required for
the next PRP list.
Signed-off-by: Stefan Agner <stefan@agner.ch>
Cc: Wesley Sheng <wesleyshenggit@sina.com>
---
drivers/nvme/nvme.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nvme/nvme.c b/drivers/nvme/nvme.c
index c39cd41aa3..03a652863c 100644
--- a/drivers/nvme/nvme.c
+++ b/drivers/nvme/nvme.c
@@ -53,7 +53,7 @@ static int nvme_setup_prps(struct nvme_dev *dev, u64 *prp2,
u64 *prp_pool;
int length = total_len;
int i, nprps;
- u32 prps_per_page = page_size >> 3;
+ u32 prps_per_page = (page_size >> 3) - 1;
u32 num_pages;
length -= (page_size - offset);
--
2.43.0

View File

@ -1,30 +0,0 @@
From c4f0a3c6147e7f8c32cb8806a0c2531b9d3852b7 Mon Sep 17 00:00:00 2001
From: Stefan Agner <stefan@agner.ch>
Date: Thu, 7 Oct 2021 12:02:39 +0200
Subject: [PATCH] usb: xhci-brcm: Make driver compatible with downstream device
tree
The downstream device tree uses just "generic-xhci" as compatible
string. Use this string to make U-Boot work with the downstream Kernel.
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
drivers/usb/host/xhci-brcm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/host/xhci-brcm.c b/drivers/usb/host/xhci-brcm.c
index fe17924028..0c6938187b 100644
--- a/drivers/usb/host/xhci-brcm.c
+++ b/drivers/usb/host/xhci-brcm.c
@@ -82,7 +82,7 @@ static int xhci_brcm_deregister(struct udevice *dev)
}
static const struct udevice_id xhci_brcm_ids[] = {
- { .compatible = "brcm,generic-xhci" },
+ { .compatible = "generic-xhci" },
{ }
};
--
2.43.0

View File

@ -1,46 +0,0 @@
From 66e2d5b7ba776587a4ebaca100f27798fa804c54 Mon Sep 17 00:00:00 2001
From: Stefan Agner <stefan@agner.ch>
Date: Thu, 23 Sep 2021 23:52:44 +0200
Subject: [PATCH] nvme: improve readability of nvme_setup_prps()
Improve readability by introducing consts, reuse consts where
appropriate and adding variables with discriptive name.
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
drivers/nvme/nvme.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/nvme/nvme.c b/drivers/nvme/nvme.c
index 03a652863c..5c4fbd08dc 100644
--- a/drivers/nvme/nvme.c
+++ b/drivers/nvme/nvme.c
@@ -48,12 +48,12 @@ static int nvme_wait_csts(struct nvme_dev *dev, u32 mask, u32 val)
static int nvme_setup_prps(struct nvme_dev *dev, u64 *prp2,
int total_len, u64 dma_addr)
{
- u32 page_size = dev->page_size;
+ const u32 page_size = dev->page_size;
+ const u32 prps_per_page = (page_size >> 3) - 1;
int offset = dma_addr & (page_size - 1);
u64 *prp_pool;
int length = total_len;
int i, nprps;
- u32 prps_per_page = (page_size >> 3) - 1;
u32 num_pages;
length -= (page_size - offset);
@@ -92,8 +92,8 @@ static int nvme_setup_prps(struct nvme_dev *dev, u64 *prp2,
i = 0;
while (nprps) {
if ((i == (prps_per_page - 1)) && nprps > 1) {
- *(prp_pool + i) = cpu_to_le64((ulong)prp_pool +
- page_size);
+ u64 next_prp_list = (u64)prp_pool + page_size;
+ *(prp_pool + i) = cpu_to_le64(next_prp_list);
i = 0;
prp_pool += page_size;
}
--
2.43.0

View File

@ -1,261 +0,0 @@
From 4e7236a0e4a75dfca366ffc4ffb23a4bd43a52e7 Mon Sep 17 00:00:00 2001
From: Stefan Agner <stefan@agner.ch>
Date: Thu, 23 Sep 2021 23:58:35 +0200
Subject: [PATCH] nvme: Use pointer for CPU addressed buffers
Pass buffers which use CPU addressing as void pointers. This aligns with
DMA APIs which use void pointers as argument. It will avoid unnecessary
type casts when adding support bus address translations.
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
drivers/nvme/nvme.c | 50 ++++++++++++++++++++--------------------
drivers/nvme/nvme_show.c | 4 ++--
include/nvme.h | 12 +++++-----
3 files changed, 33 insertions(+), 33 deletions(-)
diff --git a/drivers/nvme/nvme.c b/drivers/nvme/nvme.c
index 5c4fbd08dc..43ef819d11 100644
--- a/drivers/nvme/nvme.c
+++ b/drivers/nvme/nvme.c
@@ -46,11 +46,11 @@ static int nvme_wait_csts(struct nvme_dev *dev, u32 mask, u32 val)
}
static int nvme_setup_prps(struct nvme_dev *dev, u64 *prp2,
- int total_len, u64 dma_addr)
+ int total_len, void *buffer)
{
const u32 page_size = dev->page_size;
const u32 prps_per_page = (page_size >> 3) - 1;
- int offset = dma_addr & (page_size - 1);
+ int offset = (uintptr_t)buffer & (page_size - 1);
u64 *prp_pool;
int length = total_len;
int i, nprps;
@@ -64,10 +64,10 @@ static int nvme_setup_prps(struct nvme_dev *dev, u64 *prp2,
}
if (length)
- dma_addr += (page_size - offset);
+ buffer += (page_size - offset);
if (length <= page_size) {
- *prp2 = dma_addr;
+ *prp2 = (u64)buffer;
return 0;
}
@@ -97,11 +97,11 @@ static int nvme_setup_prps(struct nvme_dev *dev, u64 *prp2,
i = 0;
prp_pool += page_size;
}
- *(prp_pool + i++) = cpu_to_le64(dma_addr);
- dma_addr += page_size;
+ *(prp_pool + i++) = cpu_to_le64((u64)buffer);
+ buffer += page_size;
nprps--;
}
- *prp2 = (ulong)dev->prp_pool;
+ *prp2 = (u64)dev->prp_pool;
flush_dcache_range((ulong)dev->prp_pool, (ulong)dev->prp_pool +
num_pages * page_size);
@@ -448,42 +448,42 @@ static int nvme_alloc_sq(struct nvme_dev *dev, u16 qid,
}
int nvme_identify(struct nvme_dev *dev, unsigned nsid,
- unsigned cns, dma_addr_t dma_addr)
+ unsigned int cns, void *buffer)
{
struct nvme_command c;
u32 page_size = dev->page_size;
- int offset = dma_addr & (page_size - 1);
+ int offset = (uintptr_t)buffer & (page_size - 1);
int length = sizeof(struct nvme_id_ctrl);
int ret;
memset(&c, 0, sizeof(c));
c.identify.opcode = nvme_admin_identify;
c.identify.nsid = cpu_to_le32(nsid);
- c.identify.prp1 = cpu_to_le64(dma_addr);
+ c.identify.prp1 = cpu_to_le64((u64)buffer);
length -= (page_size - offset);
if (length <= 0) {
c.identify.prp2 = 0;
} else {
- dma_addr += (page_size - offset);
- c.identify.prp2 = cpu_to_le64(dma_addr);
+ buffer += (page_size - offset);
+ c.identify.prp2 = cpu_to_le64((u64)buffer);
}
c.identify.cns = cpu_to_le32(cns);
- invalidate_dcache_range(dma_addr,
- dma_addr + sizeof(struct nvme_id_ctrl));
+ invalidate_dcache_range((uintptr_t)buffer,
+ (uintptr_t)buffer + sizeof(struct nvme_id_ctrl));
ret = nvme_submit_admin_cmd(dev, &c, NULL);
if (!ret)
- invalidate_dcache_range(dma_addr,
- dma_addr + sizeof(struct nvme_id_ctrl));
+ invalidate_dcache_range((uintptr_t)buffer,
+ (uintptr_t)buffer + sizeof(struct nvme_id_ctrl));
return ret;
}
int nvme_get_features(struct nvme_dev *dev, unsigned fid, unsigned nsid,
- dma_addr_t dma_addr, u32 *result)
+ void *buffer, u32 *result)
{
struct nvme_command c;
int ret;
@@ -491,7 +491,7 @@ int nvme_get_features(struct nvme_dev *dev, unsigned fid, unsigned nsid,
memset(&c, 0, sizeof(c));
c.features.opcode = nvme_admin_get_features;
c.features.nsid = cpu_to_le32(nsid);
- c.features.prp1 = cpu_to_le64(dma_addr);
+ c.features.prp1 = cpu_to_le64((u64)buffer);
c.features.fid = cpu_to_le32(fid);
ret = nvme_submit_admin_cmd(dev, &c, result);
@@ -511,13 +511,13 @@ int nvme_get_features(struct nvme_dev *dev, unsigned fid, unsigned nsid,
}
int nvme_set_features(struct nvme_dev *dev, unsigned fid, unsigned dword11,
- dma_addr_t dma_addr, u32 *result)
+ void *buffer, u32 *result)
{
struct nvme_command c;
memset(&c, 0, sizeof(c));
c.features.opcode = nvme_admin_set_features;
- c.features.prp1 = cpu_to_le64(dma_addr);
+ c.features.prp1 = cpu_to_le64((u64)buffer);
c.features.fid = cpu_to_le32(fid);
c.features.dword11 = cpu_to_le32(dword11);
@@ -568,7 +568,7 @@ static int nvme_set_queue_count(struct nvme_dev *dev, int count)
u32 q_count = (count - 1) | ((count - 1) << 16);
status = nvme_set_features(dev, NVME_FEAT_NUM_QUEUES,
- q_count, 0, &result);
+ q_count, NULL, &result);
if (status < 0)
return status;
@@ -629,7 +629,7 @@ static int nvme_get_info_from_identify(struct nvme_dev *dev)
if (!ctrl)
return -ENOMEM;
- ret = nvme_identify(dev, 0, 1, (dma_addr_t)(long)ctrl);
+ ret = nvme_identify(dev, 0, 1, ctrl);
if (ret) {
free(ctrl);
return -EIO;
@@ -717,7 +717,7 @@ static int nvme_blk_probe(struct udevice *udev)
ns->dev = ndev;
/* extract the namespace id from the block device name */
ns->ns_id = trailing_strtol(udev->name);
- if (nvme_identify(ndev, ns->ns_id, 0, (dma_addr_t)(long)id)) {
+ if (nvme_identify(ndev, ns->ns_id, 0, id)) {
free(id);
return -EIO;
}
@@ -751,7 +751,7 @@ static ulong nvme_blk_rw(struct udevice *udev, lbaint_t blknr,
u64 prp2;
u64 total_len = blkcnt << desc->log2blksz;
u64 temp_len = total_len;
- uintptr_t temp_buffer = (uintptr_t)buffer;
+ void *temp_buffer = buffer;
u64 slba = blknr;
u16 lbas = 1 << (dev->max_transfer_shift - ns->lba_shift);
@@ -889,7 +889,7 @@ int nvme_init(struct udevice *udev)
char name[20];
memset(id, 0, sizeof(*id));
- if (nvme_identify(ndev, i, 0, (dma_addr_t)(long)id)) {
+ if (nvme_identify(ndev, i, 0, id)) {
ret = -EIO;
goto free_id;
}
diff --git a/drivers/nvme/nvme_show.c b/drivers/nvme/nvme_show.c
index 72cbac82bc..ac9b5cc9bd 100644
--- a/drivers/nvme/nvme_show.c
+++ b/drivers/nvme/nvme_show.c
@@ -114,7 +114,7 @@ int nvme_print_info(struct udevice *udev)
if (!ctrl)
return -ENOMEM;
- if (nvme_identify(dev, 0, 1, (dma_addr_t)(long)ctrl)) {
+ if (nvme_identify(dev, 0, 1, ctrl)) {
ret = -EIO;
goto free_ctrl;
}
@@ -129,7 +129,7 @@ int nvme_print_info(struct udevice *udev)
goto free_ctrl;
}
- if (nvme_identify(dev, ns->ns_id, 0, (dma_addr_t)(long)id)) {
+ if (nvme_identify(dev, ns->ns_id, 0, id)) {
ret = -EIO;
goto free_id;
}
diff --git a/include/nvme.h b/include/nvme.h
index 2cdf8ce320..8ff823cd81 100644
--- a/include/nvme.h
+++ b/include/nvme.h
@@ -18,12 +18,12 @@ struct nvme_dev;
* @dev: NVMe controller device
* @nsid: 0 for controller, namespace id for namespace to identify
* @cns: 1 for controller, 0 for namespace
- * @dma_addr: dma buffer address to store the identify result
+ * @buffer: dma buffer address to store the identify result
* @return: 0 on success, -ETIMEDOUT on command execution timeout,
* -EIO on command execution fails
*/
int nvme_identify(struct nvme_dev *dev, unsigned nsid,
- unsigned cns, dma_addr_t dma_addr);
+ unsigned int cns, void *buffer);
/**
* nvme_get_features - retrieve the attributes of the feature specified
@@ -33,13 +33,13 @@ int nvme_identify(struct nvme_dev *dev, unsigned nsid,
* @dev: NVMe controller device
* @fid: feature id to provide data
* @nsid: namespace id the command applies to
- * @dma_addr: data structure used as part of the specified feature
+ * @buffer: data structure used as part of the specified feature
* @result: command-specific result in the completion queue entry
* @return: 0 on success, -ETIMEDOUT on command execution timeout,
* -EIO on command execution fails
*/
int nvme_get_features(struct nvme_dev *dev, unsigned fid, unsigned nsid,
- dma_addr_t dma_addr, u32 *result);
+ void *buffer, u32 *result);
/**
* nvme_set_features - specify the attributes of the feature indicated
@@ -49,13 +49,13 @@ int nvme_get_features(struct nvme_dev *dev, unsigned fid, unsigned nsid,
* @dev: NVMe controller device
* @fid: feature id to provide data
* @dword11: command-specific input parameter
- * @dma_addr: data structure used as part of the specified feature
+ * @buffer: data structure used as part of the specified feature
* @result: command-specific result in the completion queue entry
* @return: 0 on success, -ETIMEDOUT on command execution timeout,
* -EIO on command execution fails
*/
int nvme_set_features(struct nvme_dev *dev, unsigned fid, unsigned dword11,
- dma_addr_t dma_addr, u32 *result);
+ void *buffer, u32 *result);
/**
* nvme_scan_namespace - scan all namespaces attached to NVMe controllers
--
2.43.0

Some files were not shown because too many files have changed in this diff Show More