Compare commits

...

230 Commits

Author SHA1 Message Date
Jan Čermák
12597f197f Bump OS to release version 12.3 2024-05-06 14:35:19 +02:00
Jan Čermák
d7338e7570 Bump OS to pre-release version 12.3.rc2 2024-04-30 11:58:55 +02:00
Jan Čermák
301bf4a377 RaspberryPi: Update kernel to 6.6.28 - stable_20240423 (#3336)
* RaspberryPi: Update kernel to 6.6.28 - stable_20240423

* Bump buildroot to update rpi-firmware

* buildroot 0a64bfe8f1...e8948ce36e (1):
  > package/rpi-firmware: bump to version 1.20240424 for kernel 6.6.28

(cherry picked from commit 9fa953745a)
2024-04-30 11:57:24 +02:00
Jan Čermák
2ea9eccf79 Fix incorrect mapping of DT overlays on RPi 5 (#3335)
RPi 5 config uses BR2_LINUX_KERNEL_INSTALL_INTREE_OVERLAYS which builds
the device tree overlays from the Linux tree when building the kernel.
The overlays directory also contains overlay_map.dtb which is necessary
to correctly map overlays without RPi version suffix to the
platform-specific ones. Without this, some peripherals may not work
correctly on Pi 5 without any obvious error messages in the kernel log
because an incorrect (Pi 4) overlay is used as the default.

Fixes #3321

* buildroot cc0481f40e...0a64bfe8f1 (1):
  > Install overlay_map.dtb when using in-tree DT overlays

(cherry picked from commit fce19b7846)
2024-04-30 11:56:55 +02:00
Jan Čermák
1a5a2c4e28 Linux: Update kernel to 6.6.29 (#3334)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.29

(cherry picked from commit 65f35c65b2)
2024-04-30 11:56:48 +02:00
Jan Čermák
7a94a2ef71 Enable kernel userspace crypto API interface for all platforms (#3330)
Enable libkcapi in generic kernel config. The bloat is minimal and the
options are enabled on most distributions. These modules are also needed
for Bluetooth Mesh and adding them fixes compatibility with some HCI USB
adapters.

Fixes #3322

(cherry picked from commit 67315f86d4)
2024-04-30 11:56:44 +02:00
Jan Čermák
ddd528b8e7 Enable KVM for running tests in GH Actions (#3329)
It was not possible on free runners previously, but it should be now:
https://github.com/actions/runner-images/discussions/7191#discussioncomment-9018826

(cherry picked from commit 4e44b101f3)
2024-04-30 11:56:33 +02:00
Jan Čermák
9dab6908c9 Bump OS to pre-release version 12.3.rc1 2024-04-26 11:24:09 +02:00
Jan Čermák
a277854add Bump buildroot to update BlueZ to 5.75 (#3326)
* buildroot 9a506c0e75...cc0481f40e (1):
  > package/{bluez5_utils, bluez5_utils-headers}: bump to version 5.75
2024-04-25 17:49:30 +02:00
Jan Čermák
8854dd4ddb Bump buildroot to update linux-pam (#3325)
This fixes "Warning: your password will expire in 0 days." message
shown on tty login since Buildroot bump in HAOS 12.2.

* buildroot 9f5750121a...d29893dd98 (1):
  > package/linux-pam: bump to version 1.6.1
2024-04-25 08:33:10 +02:00
Jan Čermák
478538eac0 Revert GRUB2 patch causing boot failure on some old x86_64 BIOSes (#3324)
GRUB 2.12 release contains a change of the loader [1] used for loading
the kernel on x86_64 platform. This change was identified to cause boot
failure on some old Intel Atom boards with the NM10 chipset, and
possibly some others. Revert this patch before we get a more proper fix
for the issue.

[1] https://git.savannah.gnu.org/cgit/grub.git/commit/?id=cfbfae1aef0694b416aa199291cfef7596cdfc20

Fixes #3305
2024-04-25 08:33:01 +02:00
Stefan Agner
e1b11540a1 ODROID-N2/C2/C4: Force 40MHz instead of 24MHz as eMMC clock (#3319)
It seems that forcing 24MHz clocks is problematic for newer 32GB
Kingston based eMMC modules on ODROID-N2(+). Use what downstream
U-Boot is using as f_max, which is 40MHz.

Fixes: #3227
2024-04-24 20:37:14 +02:00
Salim B
82c3e2a859 Update instructions for ODROID M1 Petitboot update (#3317) 2024-04-18 09:02:17 +02:00
Jan Čermák
9272065664 Linux: Update kernel to 6.6.28 (#3316)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.28
2024-04-17 16:23:18 +02:00
Jan Čermák
77c28be3cd Increase maximum length of usb_storage.quirks in RPi kernel params (#3311)
With #3281 we hit the maximum length of the quirks parameter. Since
cmdline.txt changes are not applied on OS update, only new installs of
12.2 are affected, effectively disabling all quirks until this patch
lands in future OS release.

Fixes #3308
2024-04-15 14:27:41 +02:00
Jan Čermák
85d7c23a5f Linux: Update kernel to 6.6.27 (#3310)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.26
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.27
2024-04-15 14:27:28 +02:00
Stefan Agner
4f53947596 Update Raspberry Pi 3 device tree list (#3301)
Make sure all Raspberry Pi devices using the BCM2837 SoC (or the SiP
version RP3A0 of it) are deployed. This especially makes sure that
we only deploy the downstream device trees (named bcm2710*) and deploy
device trees for the CM3 as well as the Zero 2 and Zero 2 W consistently
for 32-bit and 64-bit.
2024-04-12 09:42:05 +02:00
Jan Čermák
dd76a1dda4 Merge branch 'main' into dev 2024-04-11 10:38:30 +02:00
Jan Čermák
c9efdea83b Bump OS to release version 12.2 2024-04-11 10:07:22 +02:00
Jan Čermák
56ae6e1cb7 Remove BT_HS from kernel configs after upstream removal (#3299)
BT_HS has been removed in e7b02296fb400ee64822fbdd81a0718449066333 and
backported to stable branches - remove it from our configs to avoid
warnings.
2024-04-10 15:53:21 +02:00
Jan Čermák
2254260dad Update Raspberry Pi Kernel to v6.6.20 (#3297)
* RaspberryPi: Update kernel to 6.6.20 - 6f16847710cc0502450788b9f12f0a14d3429668

Used version specified in RPi OS release notes [1].

[1] https://downloads.raspberrypi.org/raspios_arm64/release_notes.txt

* Update RPi Buildroot defconfigs for v6.6.y kernel

* Update RPi kernel patches for v6.6.y kernel

* Amended old patches to accomodate for new DTS paths
* Removed 6.6.25 patches -> moved to the common folder
* Added patch to fix Yellow DTS compilation

* Bump buildroot to update rpi-firmware

* buildroot b45d671fe3...9f5750121a (1):
  > package/rpi-firmware: bump to version for (untagged) kernel v6.6.20

* Remove kernel v6.1.y config fragments, as they're not needed anymore
2024-04-10 10:04:35 +02:00
Jan Čermák
3252676fde Bump OS to pre-release version 12.2.rc2 2024-04-08 19:04:20 +02:00
Jan Čermák
5dc234d14f Only run HA CLI interactively if stdout is a terminal (#3292)
* Only run HA CLI interactively if stdout is a terminal

Flags for running HA CLI commands in an interactive shell added in #3238
cause the command to fail if the process is not running in a terminal.
This is needed for example for the fsfreeze hook, otherwise the command
fails, as seen in this trace when the hook is executed:

-----------
+ '[' thaw '=' freeze ]
+ '[' thaw '=' thaw ]
+ echo 'File system thaw requested, thawing Home Assistant'
File system thaw requested, thawing Home Assistant
+ ha backups thaw
the input device is not a TTY
------------

However, for example on Proxmox this message is not logged anywhere and
the hook just fails silently (i.e. it doesn't cause the backup to fail).

Fixes #3251

* Use -i also when not running in a terminal

(cherry picked from commit 78d281fce1)
2024-04-08 19:03:35 +02:00
Jan Čermák
3e970f1e9a Linux: Update kernel to 6.6.25 (#3291)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.25

(cherry picked from commit 7013872665)
2024-04-08 19:02:54 +02:00
Jan Čermák
ea217fe5bd Update Linux patches directory for v6.6.24 (#3289)
This should have been included in #3288.

(cherry picked from commit 974812a8af)
2024-04-08 19:02:44 +02:00
Jan Čermák
bfe9943068 Linux: Update kernel to 6.6.24 (#3288)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.24

(cherry picked from commit e18c6ef4ce)
2024-04-08 19:02:38 +02:00
Stefan Agner
7166a83998 Ignore non-existing CP15 barrier instructions emulation (#3285)
CP15 barrier instruction emulation only exists on arm64 architecture.
Avoid sysctl writing an error to the journal when the setting doesn't
exist by prepending a dash.

(cherry picked from commit 889b561ca1)
2024-04-08 19:02:33 +02:00
Jan Čermák
7a69678505 Use Docker 25 for installing containers in hassio package (#3286)
Bump DinD version used for creating data partition after Docker bump
in #3271.

(cherry picked from commit 90b618b096)
2024-04-08 19:02:28 +02:00
agglrx
0c9deaeebf Disable UAS via usb-storage.quirks on RPi for ADATA SD600Q (#3281)
Booting from a ADATA SD600Q fails when connected to a USB 3.0 port on RPi4. Adding it to the quirks list resolves the issue.

(cherry picked from commit 5ee9cef8c8)
2024-04-08 19:02:22 +02:00
dependabot[bot]
de3f2c6420 Bump docker/setup-buildx-action from 3.2.0 to 3.3.0 (#3293)
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 3.2.0 to 3.3.0.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v3.2.0...v3.3.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-04-08 16:05:29 +02:00
Jan Čermák
78d281fce1 Only run HA CLI interactively if stdout is a terminal (#3292)
* Only run HA CLI interactively if stdout is a terminal

Flags for running HA CLI commands in an interactive shell added in #3238
cause the command to fail if the process is not running in a terminal.
This is needed for example for the fsfreeze hook, otherwise the command
fails, as seen in this trace when the hook is executed:

-----------
+ '[' thaw '=' freeze ]
+ '[' thaw '=' thaw ]
+ echo 'File system thaw requested, thawing Home Assistant'
File system thaw requested, thawing Home Assistant
+ ha backups thaw
the input device is not a TTY
------------

However, for example on Proxmox this message is not logged anywhere and
the hook just fails silently (i.e. it doesn't cause the backup to fail).

Fixes #3251

* Use -i also when not running in a terminal
2024-04-08 15:43:12 +02:00
Jan Čermák
7013872665 Linux: Update kernel to 6.6.25 (#3291)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.25
2024-04-08 12:46:54 +02:00
Jan Čermák
974812a8af Update Linux patches directory for v6.6.24 (#3289)
This should have been included in #3288.
2024-04-04 13:52:28 +02:00
Jan Čermák
e18c6ef4ce Linux: Update kernel to 6.6.24 (#3288)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.24
2024-04-04 12:56:14 +02:00
Stefan Agner
889b561ca1 Ignore non-existing CP15 barrier instructions emulation (#3285)
CP15 barrier instruction emulation only exists on arm64 architecture.
Avoid sysctl writing an error to the journal when the setting doesn't
exist by prepending a dash.
2024-04-04 00:33:45 +02:00
Jan Čermák
90b618b096 Use Docker 25 for installing containers in hassio package (#3286)
Bump DinD version used for creating data partition after Docker bump
in #3271.
2024-04-04 00:33:34 +02:00
agglrx
5ee9cef8c8 Disable UAS via usb-storage.quirks on RPi for ADATA SD600Q (#3281)
Booting from a ADATA SD600Q fails when connected to a USB 3.0 port on RPi4. Adding it to the quirks list resolves the issue.
2024-04-02 10:36:37 +02:00
Jan Čermák
040af8fd9b Bump OS to development version 12.3.dev0 2024-04-02 10:32:23 +02:00
Jan Čermák
94bf84a807 Bump OS to pre-release version 12.2.rc1 2024-03-28 11:13:08 +01:00
Jan Čermák
b564fb3fa7 Bump buildroot to fix dbus tmpfiles warning (#3273)
* buildroot f2472c23a3...b45d671fe3 (1):
  > package/dbus: set runstatedir to /run
2024-03-28 11:09:51 +01:00
Jan Čermák
2d6b731b9a Bump buildroot to add forgotten package/runc patch (#3272)
* buildroot 51c9960ed8...f2472c23a3 (1):
  > package/runc: add support for CGroup device permission updates
2024-03-27 17:33:14 +01:00
Jan Čermák
adbd449494 Bump buildroot to update Docker to v25.0.5 (#3271)
* buildroot 1c84a7493b...51c9960ed8 (2):
  > package/docker-engine: bump version to v25.0.5
  > package/docker-cli: bump version to v25.0.5
2024-03-27 17:24:40 +01:00
Jan Čermák
cff5c81cf0 Linux: Update kernel to 6.6.23 (#3270)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.23
2024-03-27 10:20:35 +01:00
Jan Čermák
aafa022800 Bump buildroot to 2024.02.1 (#3268)
* buildroot a1b2d12f32...1c84a7493b (1):
  > Merge tag '2024.02.1' into 2024.02.x-haos
2024-03-26 13:15:48 +01:00
Jan Čermák
ccf92bc87f Disable setting default keymap in systemd-vconsole-setup (#3261)
Since buildroot commit 3ceb8c97bcb6753740fa27a58b8e0dc00dbbbd19, systemd
has new option BR2_PACKAGE_SYSTEMD_VCONSOLE_DEFAULT_KEYMAP which
defaults to "us". With this option specified, systemd-console depends on
kbd package and causes the following message to be printed during
startup on HAOS:

systemd-vconsole-setup[253]: sh: gzip: not found

This comes from the loadkeys call which tries to open the gzipped file,
so likely the kbd package should also depend on gzip. However, since we
don't want the kbd package at this point, I'm leaving this for later
investigation and simply unsetting the new option to revert to
pre-2024.02 setup.
2024-03-20 12:25:43 +01:00
Jan Čermák
a45cab1756 Linux: Update kernel to 6.6.22 (#3259)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.22
2024-03-20 12:25:35 +01:00
Hedda
6c11146d9c List Nabu Casa appliances under boards README.md (#3260)
List Nabu Casa appliances under boards README.md

* Home Assistant Green
* Home Assistant Yellow (based custom carrier board and powered by a Raspberry Pi 4 Compute Module)
* Home Assistant Blue (based on ODROID-N2+)
2024-03-20 09:35:58 +01:00
dependabot[bot]
e144c2bc96 Bump docker/setup-buildx-action from 3.1.0 to 3.2.0 (#3257)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-18 15:35:15 +01:00
dependabot[bot]
6c7c972c5d Bump docker/build-push-action from 5.2.0 to 5.3.0 (#3256)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-18 15:31:55 +01:00
dependabot[bot]
1953c2afdb Bump docker/login-action from 3.0.0 to 3.1.0 (#3258)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-18 15:31:40 +01:00
Matthieu Baerts
6b062f3c75 kernel: enable MPTCP support (#3248)
The official description says:

  Multipath TCP (MPTCP) connections send and receive data over multiple
  subflows in order to utilize multiple network paths. Each subflow uses
  the TCP protocol, and TCP options carry header information for MPTCP.

Thanks to MPTCP, being able to use multiple paths in parallel or
simultaneously brings new use-cases:

- Seamless handovers: switching from one path to another while
  preserving established connections -- Apple is using it for this
  reason since 2013.

- Best network selection: using the "best" available path (latency,
  losses, cost, bandwidth) -- one path can be used as a "backup" one.

- Network aggregation: using multiple paths at the same time to have a
  higher throughput -- e.g. to combine a fixed an mobile network to
  send files faster.

For example, for HA, it is possible to keep a SSH connection alive when
switching from one network to another (e.g. while travelling).

To be able to use MPTCP, both ends need to support it. An application
has to request it, by creating an MPTCP socket instead of a TCP one.
The rest in unchanged. An alternative is to use 'mptcpize' tool, which
relies on LD_PRELOAD to create an MPTCP socket instead of a TCP one.

Note that a MPTCP-enabled server continues to accept regular TCP
connections that do not use the Multipath TCP extension without any
performance impact. When a connection request is received, and is linked
to a listening socket with MPTCP support, the kernel will simply check
if MPTCP options are present. If not, the accepted socket will be a
"plain" TCP one, with the same impact as before.

To use multiple paths at the same time, additional IP addresses need to
be configured, e.g. via the 'ip' tool (IPRoute2).

MPTCP in the kernel is enabled in most main Linux distributions (Debian,
Ubuntu, RedHat, Fedora, etc.), but in more specific ones like Raspbian.
It is available in the Linux kernel since v5.6.

Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
2024-03-14 16:51:01 +01:00
Jan Čermák
c085ff2b10 Bump OS to development version 12.2.dev0 2024-03-13 15:19:48 +01:00
Jan Čermák
454d764676 Update Buildroot to 2024.02 (#3241)
* Update Buildroot to tag 2024.02 with rebased HAOS patchset

* udisks2: update to v2.10.1

  * Updated to version 2.10.x compatible with libblockdev v3
  * Rebased patches to new codebase
  * Autoreconf patch is not needed anymore
  * libblockdev-nvme is now hard dependency of udisks daemon

* patches/grub2: remove upstreamed efidisk patch

* patches/network-manager: update multiple gateway patch

* package/os-agent: fix go download

  After the Go update, build fails with the following error on mod vendor:

    GOPROXY list is not the empty string, but contains no entries

  Turns out this step is not having the environment variables set, use
  those used for download to fix it.

* package/xe-guest-utilities: set DL env for go mod vendor

* Bump buildroot to fix missing unit file from nfs-utils

* buildroot 3f950a1aee...a1b2d12f32 (1):
  > package/nfs-utils: only install fsidd binary and unit file with enabled nfsd

* CI: install flake8 for pr-checks runner

  Use distribution package, as it's what's used in Buidlroot's Gitlab CI
  Docker image at buildroot/support/docker/Dockefile.

* Disable check for Upstream section in the patch header for now

  It was introduced in latest BR - disable it for now and re-enable
  for HAOS in a later separate PR.
2024-03-13 15:16:54 +01:00
Jan Čermák
0e3a2d016d Merge branch 'main' into dev 2024-03-13 12:21:53 +01:00
Jan Čermák
fde0c80e54 Bump OS to release version 12.1 2024-03-13 11:17:02 +01:00
Stefan Agner
80dfffc0b0 Bump OS to pre-release version 12.1.rc2 2024-03-12 16:04:54 +01:00
Jan Čermák
dd43bfee8e Fix IPv6 reachability patch not being applied (#3240)
Fix regression caused by #3224 which introduced version-specific
directory for linux patches, causing the upper-level patch not being
applied. Copy the patch to the version folder instead. Also we need
to keep it in the upper directory for RPi kernels.

(cherry picked from commit 8226323a1b)
2024-03-12 15:09:25 +01:00
Jan Čermák
32f1ca8fa8 Fix test_restore_ssl_directory with HA CLI in interactive PTY (#3239)
The test was missing --no-progress flag, which only manifested after
merging #3238 - causing the CLI to run in an interactive pseudotty.

(cherry picked from commit 122dd1c288)
2024-03-12 14:56:14 +01:00
Stefan Agner
3dfd3a4c21 Start HA CLI interactively and with a tty allocated (#3238)
Use -i (--interactive) and -t (--tty) to start the HA CLI interactively.
This is required by some commands like the new device wipe command added
with https://github.com/home-assistant/cli/pull/464.

(cherry picked from commit fe1978f98f)
2024-03-12 14:56:11 +01:00
Jan Čermák
8226323a1b Fix IPv6 reachability patch not being applied (#3240)
Fix regression caused by #3224 which introduced version-specific
directory for linux patches, causing the upper-level patch not being
applied. Copy the patch to the version folder instead. Also we need
to keep it in the upper directory for RPi kernels.
2024-03-12 14:55:18 +01:00
Jan Čermák
122dd1c288 Fix test_restore_ssl_directory with HA CLI in interactive PTY (#3239)
The test was missing --no-progress flag, which only manifested after
merging #3238 - causing the CLI to run in an interactive pseudotty.
2024-03-12 14:55:10 +01:00
Stefan Agner
fe1978f98f Start HA CLI interactively and with a tty allocated (#3238)
Use -i (--interactive) and -t (--tty) to start the HA CLI interactively.
This is required by some commands like the new device wipe command added
with https://github.com/home-assistant/cli/pull/464.
2024-03-12 10:12:35 +01:00
dependabot[bot]
541afd452b Bump docker/build-push-action from 5.1.0 to 5.2.0 (#3235)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 5.1.0 to 5.2.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v5.1.0...v5.2.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-03-11 18:28:48 +01:00
Jan Čermák
b5795a0277 Linux: Update kernel to 6.6.21 (#3234)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.21
2024-03-11 18:28:36 +01:00
Jan Čermák
a909d89e1c Bump OS to pre-release version 12.1.rc1 2024-03-07 17:48:52 +01:00
Jan Čermák
e24fbf63ae Revert back to OOT driver for RTL8821CU (#3225)
The in-tree driver introduced in HAOS 12.0 is having random issues,
so revert back to the stable OOT driver that was used before for now.
Also it add it to RPi 2 and Yellow where it's been missing the whole
time.

Fixes #3205
2024-03-06 16:50:14 +01:00
Jan Čermák
a6f54f6c4d Revert USB core changes to workaround Z-Wave stick issues (#3224)
Revert changes in the USB driver causing Z-Wave sticks (Z-Wave.me a
and Aeotec at least) failing to enumerate. Issue is reported upstream
but reverting the patches is a feasible workaround for the time being.

Refs #2995
2024-03-06 16:49:54 +01:00
dependabot[bot]
6ac4f3435b Bump docker/setup-buildx-action from 3.0.0 to 3.1.0 (#3221)
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 3.0.0 to 3.1.0.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v3.0.0...v3.1.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-03-04 14:26:47 +01:00
Jan Čermák
8debb61114 Disable UAS via usb-storage.quirks on RPi for JMicron JMS567 (#3220)
Reported to have issues, quick search around the internet also confirms
that UAS driver doesn't work well here on Linux in general.

Fixes #3217
2024-03-04 12:11:47 +01:00
Jan Čermák
47f8671925 Add Intel Wireless-N 105 firmware for generic-x86-64 (#3219)
* buildroot 0ab96d7c0d...15dc3b6e0c (1):
  > linux-firmware: add options for missing Intel b/g/n cards

Fixes #3200
2024-03-04 11:56:23 +01:00
Jan Čermák
8f577e47db Linux: Update kernel to 6.6.20 (#3218)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.19
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.20
2024-03-04 11:42:04 +01:00
Jan Čermák
2adfa287d1 Linux: Update kernel to 6.6.18 (#3204)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.17
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.18
2024-02-27 19:17:39 +01:00
Jan Čermák
e60a2e4b68 Merge branch 'main' into dev 2024-02-26 09:39:41 +01:00
Jan Čermák
ff34a11f37 Bump OS to release version 12.0 2024-02-26 09:26:15 +01:00
Jan Čermák
dfdd3b4438 Clarify M1S flashing and recovery docs (#3187)
Remove the mentions of petitboot, as it's not normally used on M1S.
Document possibility to use SD card boot and alternative method of
reflashing the eMMC from an OS running from an SD card.
2024-02-20 14:24:24 +01:00
Tim L
9614f769f2 M1S issues template (#3181)
* Add Odroid M1S to issues template

* Add M1S to Hardkernel readme
2024-02-17 09:17:11 +01:00
Tim L
8c5377810f Add documentation for ODROID-M1S (#3179) 2024-02-16 12:22:28 +01:00
Jan Čermák
426ef2d568 Bump OS to development version 12.1.dev0 2024-02-15 12:08:24 +01:00
Jan Čermák
e9e027dd95 Bump OS to pre-release version 12.0.rc1 2024-02-15 11:40:55 +01:00
Jan Čermák
cf0bde1f5a Move output directory to /mnt in GH build action (#3174)
With recent change of Azure VM type, the disk layout has changed and
the build of ova target fails with insufficient space. Since there
is now plenty of space on /mnt partition, we can use that, just like
we've been using it for cache for now.

Ref: https://github.com/easimon/maximize-build-space/issues/39#issuecomment-1935591779
2024-02-14 17:42:17 +01:00
Tim L
1b66f81dfa Add support for Odroid M1S Board (#3121)
* Copy Odroid-m1 config for new odroid-m1s board

* config: Adjust names and paths for odroid-m1s

* configs: Use rk3566 blobs for ATF

* set correct fdt in uboot.ush

* Add linux patches with Odroid-m1s devicetree

Synced from Hardkernel unofficial 6.1 tree
ae33b44557/arch/arm64/boot/dts/rockchip/rk3566-odroid-m1s.dts

With additional cleanup and fixes for mainline linux

* Add Odroid M1S to Github actions

* uboot: Patch boot order to set SD Card first

* Create u-boot placeholder partion for odroid-m1s also

* Switch u-boot to full odroid-m1s config

* cherry-pick emmc stability improvements

* Generalise u-boot to use ${devtype} instead of hardcoded mmc

* Remove deprecated snps, reset options from device tree

* re-enable uboot ethernet
2024-02-14 12:01:15 +01:00
Jens Maus
623ebd8d38 added udev rule to rpi-rf-mod package to allow addons to have write (#2854)
access to these led nodes.
2024-02-12 17:12:57 +01:00
Tim L
f05294e51d Factor out common Rockchip config (#3165)
* Create common kernel config for Rockchip aarch64 boards

* Green: drop kernel option already included in main config

* Move rockchip RNG patchset to common folder

* Odroid-m1 has no board specific patches now
2024-02-12 16:05:47 +01:00
Jan Čermák
af345d98d7 Add SD/MMC drivers of Realtek card readers for generic_x86_64 (#3170)
We added drivers for Realtek cards readers in #3005, however it also
needs MMC drivers in order to make card reading possible. Enable both
USB and PCI versions of those (each about ~40 kB).

Fixes #3167
2024-02-12 16:05:22 +01:00
Jan Čermák
b599d24658 Update issue template with better links to logs, add CLI instructions (#3169)
* Update issue template with better links to logs, add CLI instructions

Legacy supervisor_logs target (which is currently kind of broken) replaced
with standard logs with provider specified. Added instructions how to get
logs in HA CLI.

* Apply suggestions from code review

Co-authored-by: Stefan Agner <stefan@agner.ch>
2024-02-12 16:05:12 +01:00
Jan Čermák
e7a62ce563 RaspberryPi: Update kernel to 6.1.73 - stable_20240124 (#3162)
* RaspberryPi: Update kernel to 6.1.73 - stable_20240124

* Bump rpi-firmware to version for RPi Linux 6.1.73

* buildroot f844f7f725...0ab96d7c0d (1):
  > package/rpi-firmware: bump to version for stable_20240124 kernel
2024-02-08 22:02:28 +01:00
Stefan Agner
f770a3f4b2 Bump Pi 5 image on release in Raspberry Pi Imager json (#3161) 2024-02-08 19:24:18 +01:00
Jan Čermák
0028e20973 Linux: Update kernel to 6.6.16 (#3159)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.16
2024-02-08 10:36:58 +01:00
Jan Čermák
ad4493a781 Fix ODROID XU4 boot by disabling PROVE_LOCKING in kernel (#3158)
ODROID XU4 fails to boot after update to Linux 6.6. Comparing downstream
kernel config with upstream exynos defconfig shows it has various lockdep
options enabled, and PROVE_LOCKING seems to be the one that causes the
issue. It seems it (or any of PROVE_RCU, TRACE_IRQFLAGS or
PREEMPTIRQ_TRACEPOINTS) which get enabled along with it) probably
triggers some timing issues on the I2C bus, which causes the main PMIC
to fail to properly initialize all voltages.

Since these options should not have any real impact on our system, the
easiest option is to disable them. If we need them, or want to stay
closer to upstream defconfig, further debugging is needed.

Fixes #3137
2024-02-08 10:36:49 +01:00
Jan Čermák
5fddd20258 Use verity bundle format for RAUC updates (#3152)
We originally enabled it in 0ebcdcb9dc
but later reverted the patch in 5b927389b8
because of backward compatibility issues. Since we're going to 12.0,
there is now hopefully enough room for seamless transition.

Co-authored-by: Stefan Agner <stefan@agner.ch>
2024-02-06 18:19:10 +01:00
Jan Čermák
c1b936716d Enable ath12k, MT7996E and various new Realtek drivers from Linux v6.6 (#3151)
* Enable ath12k, MT7996E and various new Realtek drivers from Linux v6.6

* Remove custom rtl8821cu driver from targets running Linux 6.6
2024-02-06 18:18:58 +01:00
Jan Čermák
977f017cf8 Bump buildroot to update BlueZ to v5.72 (#3147)
* buildroot 235a3aee47...f844f7f725 (1):
  > package/{bluez5_utils, bluez5_utils-headers}: bump to version 5.72
2024-02-05 20:07:39 +01:00
Jan Čermák
87938f0a4b Use separate path for v6.1.y and v6.6.y kernel config fragments (#3146)
* Use separate path for v6.1.y and v6.6.y kernel config fragments

Since we're now maintaining Linux configs for two different versions,
it may happen that we want to add some options only to one of the
versions. While the Kconfig might figure the invalid options itself,
our config checking tooling would spam us with warnings. This commit
splits the configs to two directories. This pattern is used only for
the common fragments, more specific ones are usually sharing the same
Linux version anyway.

* Add back options removed in v6.6.y to v6.1.y kernel config fragments
2024-02-05 20:06:59 +01:00
dependabot[bot]
37c2f951d6 Bump release-drafter/release-drafter from 5 to 6 (#3144)
Bumps [release-drafter/release-drafter](https://github.com/release-drafter/release-drafter) from 5 to 6.
- [Release notes](https://github.com/release-drafter/release-drafter/releases)
- [Commits](https://github.com/release-drafter/release-drafter/compare/v5...v6)

---
updated-dependencies:
- dependency-name: release-drafter/release-drafter
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-05 18:02:50 +01:00
Stefan Agner
3dee9895ac Merge branch 'main' into dev 2024-02-05 14:19:24 +01:00
Stefan Agner
0f0eacf46e Bump OS to release version 11.5 2024-02-05 10:41:11 +01:00
Jan Čermák
8fef166685 Bump OS to development version 12.0.dev0 2024-02-02 14:32:34 +01:00
Jan Čermák
b08f7de9e1 Update buildroot to latest version with rebased 6.6 patches 2024-02-02 14:31:49 +01:00
Jan Čermák
9dcf8ae82f Update to 6.6 LTS kernel (#3063)
* Linux: Update kernel 6.6.15

* Update buildroot packages to work with Linux 6.6

* Fix top-level and pc patches of linux

* Update tinker patch series

* Drop Odroid M1 patches

M1 is now supported in upstream.

* Update Hardkernel patches

Needed larger refactoring because of 379ae64609c7a3301b60483eb65bd8bc78f76328

* Update Green patches

* Update Odroid XU4 patches

Removing the TMU patch/hack for now, need to check if it's still needed.
If it is indeed, then it needs slighter rewrite.

* Move Rockchip RNG patches to M1 and Green dirs

* Update rtl88x2bu package to fix build

* Update gasket package to fix build

* Fix eq3_char_loop build

* Use fan53555 instead of custom rk860x driver

* Fix kernel base configs and fragments after 6.6 update

Mostly removed options that have been removed between releases. Only
a few options have been renamed, then there's bunch of options that
had dependencies added so they are available only on some architectures,
which are not those that we're using.

* Remove deprecated regulator-compatible from Green DTS
2024-02-02 14:27:18 +01:00
Jan Čermák
c90c175754 Linux: Update kernel to 6.1.76 (#3134)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.76
2024-02-01 11:32:41 +01:00
Jan Čermák
b3e3d833a7 Include links to kernel changelogs on kernel bump (#3133)
Generate list of changelogs if we're bumping to the next patch release.
If major or minor version is bumped, the commit message contains only
the title, like before.

Also fix English in the commit title of RPi bump.
2024-02-01 11:27:52 +01:00
Jan Čermák
5271dd180d Fix check-dotconfig warnings coming from custom kernel configs (#3130)
* Remove options not present in current kernel anymore

* Adjust options set to incorrect values

* Remove options unset due to missing dependencies
2024-02-01 10:05:45 +01:00
Jan Čermák
3c50eee20b Bump buildroot to 2023.02.9 (#3129)
* buildroot 512a487366...015e99f244 (1):
  > Merge tag '2023.02.9' into 2023.02.x-haos
2024-01-31 12:45:38 +01:00
Jan Čermák
1e70dc8edf Bump OS to pre-release version 11.5.rc3 2024-01-31 10:25:40 +01:00
Jan Čermák
fd3c1066b8 Update ATF and DDR blob for Odroid M1, change 1056->1560 MHz RAM timing (#3125)
Odroid M1 was using 1056 MHz blob for RAM training, although it can run
at 1560 MHz. Use the correct file for M1 and update it to latest version,
along with ARM Trusted Firmware blob.

(cherry picked from commit 1f45aaf359)
2024-01-31 10:24:58 +01:00
Stefan Agner
f4f7928f17 Disable MMC environment on ASUS Tinkerboard (#3124)
We don't really use the MMC environment, so disable it by default. This
prevents the following warning at startup:
Loading Environment from MMC... *** Warning - bad CRC, using default environment

(cherry picked from commit f263326ef8)
2024-01-31 10:24:05 +01:00
Stefan Agner
8eeb85ed17 Disable Ethernet in U-Boot if ODROID-M1 (#3122)
It seems that the Ethernet initialization in U-Boot causes significant
packet drops in Linux on some board. On a ODROID-M1 with 8GB of RAM, a
packet loss rate of ~20% has been observed. From the user point of view
it feels like a massive slow down (SSH feels very slow, Home Assistant
loads very slow or not at all).

Disabling the Ethernet controller driver avoids initialization in U-Boot
and makes Ethernet work correctly again in Linux.

While at it, drop the previously board specific configs. They haven't
been used and the board seemed fine without them.

(cherry picked from commit bd3cae5300)
2024-01-31 10:20:21 +01:00
Jens Maus
e00709d449 Add optional rpi-rf-mod dtoverlay block for RPi5 (#3080)
* added optional rpi-rf-mod dtoverlay block
* remove dtoverlay=miniuart-bt as not required.

(cherry picked from commit 9102f06fba)
2024-01-31 10:20:18 +01:00
Tim L
9e7b6783d1 Drop Amlogic specific patches for Odroid-m1 build (#3120)
All of the patches in ./board/hardkernel/patches are specific to
Amlogic SoC's. Drop this patch path when building Rockchip based
Odroid-m1 board.
2024-01-31 09:12:33 +01:00
Jan Čermák
1f45aaf359 Update ATF and DDR blob for Odroid M1, change 1056->1560 MHz RAM timing (#3125)
Odroid M1 was using 1056 MHz blob for RAM training, although it can run
at 1560 MHz. Use the correct file for M1 and update it to latest version,
along with ARM Trusted Firmware blob.
2024-01-30 13:48:36 +01:00
Jan Čermák
0ac12d3cd4 Also check kernel custom config file in linux-check-dotconfig (#3126)
If BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE is set, it should be also checked
by the script for checking that all kernel options are applied.
2024-01-30 13:36:59 +01:00
Stefan Agner
f263326ef8 Disable MMC environment on ASUS Tinkerboard (#3124)
We don't really use the MMC environment, so disable it by default. This
prevents the following warning at startup:
Loading Environment from MMC... *** Warning - bad CRC, using default environment
2024-01-30 11:47:48 +01:00
Jan Čermák
82e1beff2e Linux: Update kernel 6.1.75 (#3123) 2024-01-30 11:30:19 +01:00
Tim L
54e86009c2 Use rockchip combined SPL images for Tinkerboard (#3118)
* tinker: Drop patch for u-boot entry point and move into uboot.config

* tinker: Use rockchip combined uboot image
2024-01-30 11:22:23 +01:00
Stefan Agner
bd3cae5300 Disable Ethernet in U-Boot if ODROID-M1 (#3122)
It seems that the Ethernet initialization in U-Boot causes significant
packet drops in Linux on some board. On a ODROID-M1 with 8GB of RAM, a
packet loss rate of ~20% has been observed. From the user point of view
it feels like a massive slow down (SSH feels very slow, Home Assistant
loads very slow or not at all).

Disabling the Ethernet controller driver avoids initialization in U-Boot
and makes Ethernet work correctly again in Linux.

While at it, drop the previously board specific configs. They haven't
been used and the board seemed fine without them.
2024-01-30 10:12:48 +01:00
Jens Maus
9102f06fba Add optional rpi-rf-mod dtoverlay block for RPi5 (#3080)
* added optional rpi-rf-mod dtoverlay block
* remove dtoverlay=miniuart-bt as not required.
2024-01-30 10:12:01 +01:00
Tim L
9df30c9e4e Use rockchip combined uboot images (#3115) 2024-01-29 22:12:52 +01:00
Jan Čermák
378b90bc82 Bump OS to pre-release version 11.5.rc2 2024-01-26 14:23:39 +01:00
Jan Čermák
01c8c1a5fa Add kernel options missing as a result of enabling CONFIG_EXPERT (#3114)
Enabling CONFIG_EXPERT, which was a dependency of some options we try
to set by our config fragments, had a side-effect of toggling some other
options, most importantly the framebuffer console support. Enable the
options found by diffing old and new kernel configs.

Fixes #3112

(cherry picked from commit 3d234144a2)
2024-01-26 14:23:17 +01:00
Jan Čermák
3d234144a2 Add kernel options missing as a result of enabling CONFIG_EXPERT (#3114)
Enabling CONFIG_EXPERT, which was a dependency of some options we try
to set by our config fragments, had a side-effect of toggling some other
options, most importantly the framebuffer console support. Enable the
options found by diffing old and new kernel configs.

Fixes #3112
2024-01-26 14:04:14 +01:00
Jan Čermák
ae4ab5aa24 Bump OS to development version 11.6.dev0 2024-01-25 15:26:28 +01:00
Jan Čermák
113348ef93 Bump OS to pre-release version 11.5.rc1 2024-01-25 14:26:08 +01:00
Jan Čermák
4b2d34368d Fix path to VHDX artifact in OS build job (#3105) 2024-01-25 09:46:10 +01:00
Jan Čermák
aadb5a74b6 Use renamed MT7921/MT7922 options from linux-firmware upstream merge (#3106)
* ../../../buildroot 55120df0b7...512a487366 (3):
  > package/linux-firmware: add WiFi and BT firmware for MT7921 and MT7922
  > package/dbus-broker: fix legal info
  > package/rtl8821cu: fix legal info
2024-01-25 09:43:07 +01:00
Jan Čermák
4619dcbb16 Create empty overlays/README to fix DTB overlay loading on RPi 5 (#3107)
Since we're using a custom os_prefix for dual boot on RPi 5, overlays
can be also present in different directories. Raspberry Pi's bootloader
has a strange feature that it only respects os_prefix if the directory
with overlays contains a README file:
https://www.raspberrypi.com/documentation/computers/config_txt.html#overlay_prefix

While rpi-firmware package touches the file when copying overlays to
the destination directory, for RPi 5 we are using BR2_LINUX_KERNEL_INSTALL_INTREE_OVERLAYS
option which does not copy or create it. Ensure it is present (no matter
if we're using intree on rpi-firmware overlays) in the hassos-hook.

Fixes #3079

(also removed invalid mention about the README from config.txt)
2024-01-25 09:27:52 +01:00
Jan Čermák
08b3277bdb Resolve warnings caused by incorrect kernel config settings (#3104)
* Remove all non-existing kernel config symbols

* Remove unapplied x86 Intel sound options

These are missing various subsystem dependencies and were never in fact
enabled, assuming they're rather exotic and removing them completely.

* Add missing dependencies, adjust tristate values, remove nonsense

* Use KERNEL_LZ4 only for non-aarch64

Since aarch64 doesn't use self-extracting kernel:
https://patchwork.kernel.org/project/linux-arm-kernel/patch/20190119185540.20526-1-tobias.johannes.klausmann@mni.thm.de/

* Extract PCI options to device-support-pci fragment (renamed from device-support-pcie)

RPi 4+ should use this fragment too, since CM4 has PCIe support.

* Rename RPi's kernel-32b fragment to kernel-armv7
2024-01-24 12:03:25 +01:00
Stefan Agner
bf744adc5f Bump U-Boot to 2024.01 (#3096)
* Bump U-Boot to 2024.01 for Raspberry Pi and Home Assistant Yellow

* Regenerated using --no-thread

By default git creates some email headers. We can minimize them using
--no-thread.

* Fix build for Yellow

* Update U-Boot for ASUS Tinker Board

* Update U-Boot for Khadas VIM3

* Update U-Boot for ODROID-M1

* Update U-Boot for Home Assistant Green

* Update U-Boot for ODROID-C2/C4/N2/XU4
2024-01-24 10:01:13 +01:00
Jens Maus
f36ab6cf5e add missing ARMv8 32bit kernel support configs (#3099) 2024-01-23 21:28:24 +01:00
Stefan Agner
7685e04c2b Enable PCIe for Khadas VIM3 (#3092) (#3100)
It seems that the PCIe driver is not enabled for Khadas VIM3. Enable it
by default.

Note to make use of the M2X extension board, the following commands need
to be executed on the U-Boot command line:

```
HAOS> i2c dev 0
Setting bus to 0
HAOS> i2c mw 0x18 0x33 1
```
2024-01-23 21:27:49 +01:00
Jan Čermák
d83fc29969 Fix ARCH/SRCARCH for aarch64 in linux-check-dotconfig (#3098)
Wrong arch for arm64 produces few false check results resulting
from some symbols in arm64 tree not being loaded. We can use raw
$(ARCH) variable for arm, only need to translate aarch64 -> arm64.
2024-01-22 22:15:54 +01:00
Jan Čermák
82e7dc7ccf Linux: Update kernel 6.1.74 (#3093) 2024-01-22 18:09:30 +01:00
dependabot[bot]
ab586e285f Bump actions/cache from 3 to 4 (#3095)
Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-22 18:09:15 +01:00
Tom Pipe
ff84663caa Fix build_haos_builder step to fetch the correct version (#3091)
Fixes the build_haos_builder step to fetch the version correctly from the version step, not the (non-existent) version_main step
2024-01-19 13:18:03 +01:00
Tim L
c210a1a52a Dockerfile: migrate to trusted.gpg.d for docker repo keys (#3090)
Using apt-key for managing Debian repo keys has been deprecated for a
while now. While it currently works ok, seems to be broken in bookworm. This migrates to storing keys in trusted.gpg.d as recommended by the warning messages when using apt-key.
2024-01-19 11:02:34 +01:00
Jan Čermák
3aa2c1e411 Bump buildroot to update linux-firmware (#3084)
* buildroot 153f1461f6...55120df0b7 (8):
  > package/linux-firmware: bump version to 20231211
  > package/linux-firmware: bump version to 20231030
  > package/linux-firmware: add iwlwifi quz firmware
  > package/linux-firmware: add new option for Marvell prestera firmware
  > package/linux-firmware: bump version to 20230804
  > package/linux-firmware: bump version to 20230625
  > package/linux-firmware: add QCA9377 BT firmware
  > package/linux-firmware: bump version to 20230515
2024-01-17 18:58:56 +01:00
Jan Čermák
c845b387c9 Linux: Update kernel 6.1.73 (#3083) 2024-01-17 18:58:45 +01:00
Jan Čermák
bde080336e Fix path to cmdline after successful RPi 5 tryboot (#3085)
Path to cmdline is set in tryboot.txt to cmdline-tryboot.txt before
attempting A/B boot. After successful boot, tryboot.txt is relocated
to config.txt, yet the config path of cmdline is not changed and remains
set to cmdline-tryboot.txt which doesn't exist anymore at that point,
causing following reboots to fail.

Fixes #3065
2024-01-17 17:56:29 +01:00
Tom Pipe
e7c15f9aa6 Fix self_signed_cert variable value (#3071)
The value of ```self_signed_cert``` is being set incorrectly, resulting in a failed build, as the self signed certs aren't copied correctly.

Updated so the value is set from ```self_signed_cert``` and not ```self_signed```
2024-01-17 10:45:12 +01:00
Jan Čermák
a7f570c4b4 Linux: Update kernel 6.1.72 (#3064)
* Linux: Update kernel 6.1.72
* Remove SMB client workaround for 6.1.71
2024-01-11 10:04:10 +01:00
Jan Čermák
59555e597e Merge Buildroot 2023.2.8 (#3060)
* buildroot 2d89a0f9b6...153f1461f6 (1):
  > Merge tag '2023.02.8' into 2023.02.x-haos
2024-01-10 10:23:21 +01:00
Jan Čermák
c328d30610 Merge branch 'main' into dev 2024-01-09 10:55:26 +01:00
Jan Čermák
b88ba4d208 Bump OS to release version 11.4 2024-01-09 10:47:53 +01:00
Jan Čermák
99e8af2aac Bump OS to development version 11.5.dev0 2024-01-08 15:09:41 +01:00
Jan Čermák
66087c4334 Bump OS to pre-release version 11.4.rc1 2024-01-08 14:41:33 +01:00
Jan Čermák
baa756e736 Revert kernel patch causing failures on CIFS share disk usage (#3051)
* Revert kernel patch causing failures on CIFS share disk usage

The issue was reported upstream, waiting for a fix there. Reverting the
patch for a quick resolution of the bug that breaks some things in HA
and add-ons badly.

Refs #3041

* Move the patch to 6.1.71 subdirectory

That way Raspberry Pi's kernel won't be patched (unless it's the same
version which it's currently not).
2024-01-08 13:03:22 +01:00
Jan Čermák
1a48d6fdd4 Add rtw89 firmware option missing in #3003 (#3043)
In #3003 the rtw89 firmware was only added to the buildroot submodule,
config option for enabling it was missing.
2024-01-06 17:30:50 +01:00
Jan Čermák
f50f7c2475 Linux: Update kernel 6.1.71 (#3046) 2024-01-06 17:29:28 +01:00
Stefan Agner
e93d92b50e Merge branch 'main' into dev 2024-01-04 21:28:48 +01:00
Stefan Agner
0ec5c22d3a Remove rootfstype for Raspberry Pi 5 (#3037) 2024-01-04 21:26:55 +01:00
Stefan Agner
fdd0bd0efb Bump OS to release version 11.3 2024-01-04 15:40:02 +01:00
Stefan Agner
57913a3eee Bump OS to pre-release version 11.3.rc2 2024-01-03 10:46:30 +01:00
Jan Čermák
d6873893a4 Linux: Update kernel 6.1.70 (#3029) 2024-01-03 10:46:02 +01:00
Stefan Agner
572d14adcc Enable IP policy routing options (#3026) (#3027)
Enable multiple table options which allows policy routing based on
source address or type-of-service. This is useful for Tailscale.
2024-01-03 10:46:02 +01:00
Stefan Agner
fe8c4ef6c1 Set Raspberry Pi 2 Supervisor architecture correctly (#3012)
The Raspberry Pi 2 was based on Cortex-A7 in first revisions, then
Cortex-A53. However, both ar armv7 architectures, and that is also how
the Operating System itself is configured. Use the correct architecture
for Supervisor.

The hassos-supervisor script should recreate the container
automatically on first boot after update.

Since Supervisor itself is written in Python this shouldn't affect much.
However, the Supervisor uses it's architecture as default architecture
when building local add-on and uses it as default architecture for
multi-arch container images. This is also where this error got noticed
(see https://github.com/home-assistant/supervisor/issues/4402#issuecomment-1865979421).
2024-01-03 10:45:56 +01:00
Jan Čermák
714912a2a9 Suppress action-shellcheck warning from deprecated option (#3030)
Use ignore_paths instead of ignore for the buildroot directory.
2024-01-03 10:02:44 +01:00
Jan Čermák
62b76f7f47 Linux: Update kernel 6.1.70 (#3029) 2024-01-03 10:02:34 +01:00
Stefan Agner
d82458a6a8 Enable IP policy routing options (#3026) (#3027)
Enable multiple table options which allows policy routing based on
source address or type-of-service. This is useful for Tailscale.
2024-01-03 09:35:49 +01:00
Stefan Agner
6c549c10d8 Set Raspberry Pi 2 Supervisor architecture correctly (#3012)
The Raspberry Pi 2 was based on Cortex-A7 in first revisions, then
Cortex-A53. However, both ar armv7 architectures, and that is also how
the Operating System itself is configured. Use the correct architecture
for Supervisor.

The hassos-supervisor script should recreate the container
automatically on first boot after update.

Since Supervisor itself is written in Python this shouldn't affect much.
However, the Supervisor uses it's architecture as default architecture
when building local add-on and uses it as default architecture for
multi-arch container images. This is also where this error got noticed
(see https://github.com/home-assistant/supervisor/issues/4402#issuecomment-1865979421).
2023-12-26 17:53:20 +01:00
Jan Čermák
364ca718fb Remove duplicated step uploading ova QEMU image for the test job (#3011)
* Remove duplicated step uploading ova QEMU image for the test job

Instead of uploading the file twice with a fixed name, upload it in the
same step that is used for unpublished builds and pass the version string
to the test job.

* Update .github/workflows/test.yaml

Co-authored-by: Stefan Agner <stefan@agner.ch>

---------

Co-authored-by: Stefan Agner <stefan@agner.ch>
2023-12-26 17:53:00 +01:00
Jan Čermák
978e13b180 Generate self-signed certificate in the prepare step and archive it (#3015)
Generate the certificate only once and make it available. The preferred
option that doesn't generate warnings would be to use secrets in the
repository config, in that case no certificate is generated or archived.
2023-12-22 14:49:40 +01:00
Stefan Agner
225d4194bf Bump OS to development version 11.4.dev0 2023-12-21 17:04:24 +01:00
Stefan Agner
230a50587f Bump OS to pre-release version 11.3.rc1 2023-12-21 15:06:11 +01:00
Stefan Agner
de82d0b412 Linux: Update kernel 6.1.69 (#3009) 2023-12-21 09:45:54 +01:00
Stefan Agner
7ef16072c6 Bump buildroot to update dbus-broker to 35 (#3008)
* buildroot 4c89661fd1...2d89a0f9b6 (2):
  > package/dbus-broker: bump to release 35
  > Revert "package/dbus-broker: avoid blocking due to missing entropy"
2023-12-21 09:09:54 +01:00
Jan Čermák
13e0f13f3c Enable driver for Realtek card readers (#3005)
Enable PCI card reader found on some Intel NUC models, along with the USB
drivers as well.

Adds two new modules (listed with size):

30104   /lib/modules/6.1.68-haos/kernel/drivers/misc/cardreader/rtsx_usb.ko
167240  /lib/modules/6.1.68-haos/kernel/drivers/misc/cardreader/rtsx_pci.ko

Fixes #2688
2023-12-20 17:41:54 +01:00
Jan Čermák
5a9be34007 Add script for checking resulting kernel config (#3006)
There is bunch of kernel config options that are not propagated
correctly to the kernel configuration after fragments are merged
and processed by Kconfig. Current Buildroot tools are not good at
discovering these - while we cleaned up most inconsistencies by using
linux-diff-config and output from the merge_config.sh script, there
are still options that were removed or get a different value than
intended because of dependencies, etc.

This commit adds a Python script that is using Kconfiglib to parse
current kernel's Kconfig files and the generated .config and compare
the requested values from individual kernel config fragments. The
script can be used manually by running `make linux-check-dotconfig`
from the buildroot directory (with path to BR2_EXTERNAL directory set)
and it's called also from the CI, where it generates Github Workflow
warning annotations when some of the values are not present or when set
incorrectly.

The kconfiglib.py is checked-in to the repo as well, because the library
is currently abandoned on PyPI and packaged version has a bug that causes
errors parsing Kconfigs in newer Linux versions, fixed in outstanding
pull request ulfalizer/Kconfiglib#119 - so version from this PR is used
here.

If pypi/support#2526 is ever resolved, we could remove it from our repo
and use pip for installing the package as a requirement during build
of the build container.
2023-12-20 17:41:39 +01:00
Jan Čermák
2e7aa1dc6a Add rtw89, mt7921 and mt7922 WiFi and BT firmware (#3003)
Add new firmwares and enable them for all targets.
Bloat in rootfs in my x86_64 test build was ~2.16 MiB.

Buildroot bump:

* buildroot 8a75878da4...4c89661fd1 (2):
  > package/linux-firmware: add WiFi and BT firmware for MT7921 and MT7922
  > package/linux-firmware: add rtw89 firmware files
2023-12-20 17:39:04 +01:00
Jan Čermák
d116bba470 Enable virtio-mem and DMI tables/fw_cfg sysfs for aarch64 and ova (#3004)
Enable options that can be useful on virtualized systems as modules.

Fixes #2987
2023-12-20 16:16:53 +01:00
Jan Čermák
069614a968 Adjust build to allow running from forks or feature branches (#2998)
Make it possible to run build on feature branches by adding a flag that
can be used to select whether the build output will be uploaded to the
R2 artifacts bucket or kept only as build artifact on GH. The latter is
also used for 3rd party repos, allowing builds in forked repositories.

Feature builds are using Unix timestamp as the dev version suffix. This
makes them easily distiguishable, yet it makes them appear to be newer
than standard daily dev version builds when compared by AwesomeVersion.
2023-12-19 16:57:26 +01:00
Stefan Agner
b9efb8edaf Enable WPA3 support in wpa_supplicant to support WPA3-SAE (#3000) 2023-12-19 15:43:18 +01:00
Jan Čermák
722cdf26f4 Enable ZSTD compression of firmware files (#3001)
Compress firmware files from linux-firmware using ZSTD algorithm.
This should grant us some more space to add more firmwares and should
not have any major performance impact, because firmwares are not accessed
frequently.

Includes buildroot submodule bump:
* buildroot 07e08e01b2...8a75878da4 (1):
  > linux-firmware: add option for firmware files compression
2023-12-19 15:31:19 +01:00
dependabot[bot]
e4fab0ab93 Bump actions/upload-artifact from 3 to 4 (#2997)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-18 21:58:24 +01:00
dependabot[bot]
7fc91c7bd7 Bump actions/download-artifact from 3 to 4 (#2996)
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-18 17:06:50 +01:00
Stefan Agner
779b75f10e Linux: Update kernel 6.1.68 (#2991) 2023-12-14 17:59:51 +01:00
Jan Čermák
f605dd43ec Add build summary for each board build (#2990)
This allows for rudimentary image/partition size tracking between builds,
potentially this could be further extended with more useful information
about the build (TBD).
2023-12-14 15:49:40 +01:00
Jan Čermák
fb13b2bff8 Remove Raspberry Pi 1/Zero from docs (#2986)
Its support has been removed 2 years ago.
2023-12-12 15:01:46 +01:00
Stefan Agner
5b3447ae38 Add Raspberry Pi 5 to GitHub Action (#2985) 2023-12-12 13:34:31 +01:00
Stefan Agner
8e1016dcaf Initial Raspberry Pi 5 support (#2914)
* Add initial Raspberry Pi 5 buildroot config

* Add machine-id support via cmdline.txt

* Add new entry if entry is missing

* Don't overwrite cmdline.txt when adding machine-id

Use sed to append the new cmdline parameter to the first line.

* Skeleton script for RAUC custom bootloader interface

* Deploy kernel/device-tree into a RAUC slot specific directory

This allows us to use the os_prefix feature to switch between slot A and
B. Compared to the boot_partition option, this option allows to use a
shared config.txt and cmdline.txt, which makes it more like how HAOS
currently works on other Raspberry Pis.

* Deploy new kernel/device-tree to correct slot on installation

* Increase boot size to 128MB

This makes sure we can store up to three kernels (slot A, B and an
temporary one while installing the OTA update).

* Initial tryboot implementation using os_prefix

* Make sure to delete the old slot completely

* Add Busybox xargs for tryboot bootloader script

* Compare tryboot bootloader file silently

* Revert "Increase boot size to 128MB"

This reverts commit 7f2c69b58f02f500d6aeee4f0a419046899b5e38.

* Use compressed kernel

* Address shellcheck

* Address shellcheck issue in rauc-hook

* Fix shellcheck for rpi-tryboot.sh

* Do not follow source - it gets checked separately

* Correctly set the slot to boot

* Apply suggestions from code review

Co-authored-by: Jan Čermák <sairon@users.noreply.github.com>

* Drop serial console from default cmdline.txt

* Resync rpi5_64_defconfig with rpi4_64_defconfig

* Improve machine-id match

Only match actual hexadecimal characters.

* Deploy firmware overlays to OS prefix directory

* Add Raspberry Pi 5 to documentation

* Bump buildroot

* buildroot fd1dc86f40...f13ad03408 (1):
  > linux: add in-tree device tree overlay support

* Install device tree overlays from Kernel sources

* Drop RPi RF modules for now

No Raspberry Pi 5 specific device tree overlays are  available, drop RPi
RF mod for now.

* Use Raspberry 5 specific identifiers for Supervisor/OS Agent

* Bump buildroot

* buildroot f13ad03408...07e08e01b2 (1):
  > linux: fix add in-tree device tree overlay support

* Revert "Drop RPi RF modules for now"

This reverts commit 46fc1701e4.

---------

Co-authored-by: Jan Čermák <sairon@users.noreply.github.com>
2023-12-12 13:19:26 +01:00
Stefan Agner
ac089a2d8e Linux: Update kernel 6.1.67 (#2984) 2023-12-12 09:20:50 +01:00
dependabot[bot]
77c7def4e3 Bump actions/setup-python from 4 to 5 (#2981)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4 to 5.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-11 15:24:01 +01:00
dependabot[bot]
c6ca14182b Bump actions/stale from 8.0.0 to 9.0.0 (#2980)
Bumps [actions/stale](https://github.com/actions/stale) from 8.0.0 to 9.0.0.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v8.0.0...v9.0.0)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-11 15:23:33 +01:00
Jan Čermák
1e6deab48b Linux: Update kernel 6.1.66 (#2979) 2023-12-11 10:51:20 +01:00
Jan Čermák
dff282ff00 Bump brcmfmac_sdio-firmware-rpi to sync with RPi OS (#2971)
* buildroot 836f7e7b5e...fd1dc86f40 (1):
  > brcmfmac_sdio-firmware-rpi: update to sync firmware with RPi OS, add new symlinks
2023-12-08 13:23:27 +01:00
Jan Čermák
1211b24c7f Add image size check to hdd-image.sh (#2965)
There is no sanity check when creating OS images, so when some of the
partitions gets too big, part of its data may get overwritten by the
following partition, resulting in corrupted image. Add checks for the
defined partition sizes and bail out if they're too big.
2023-12-05 11:38:33 +01:00
Stefan Agner
d427248a05 Merge branch 'main' into dev 2023-12-04 16:12:59 +01:00
Stefan Agner
6579b978d0 Bump OS to release version 11.2 2023-12-04 15:00:06 +01:00
Stefan Agner
1ffaec3acb Fix Supervisor image corruption detection (#2953)
* Fix Supervisor image corruption detection

When multiple images match the reference, multiple IDs are passed as a
single argument to docker image rm, leading to an error:
Error response from daemon: page not found

Make sure to pass the ids as separate argument to make the delete work
in any case.

* Cleanup reusing Supervisor from an old/unused reference

As noted in #2113, we don't need this logic anymore after a major OS
releases. So simply drop the logic to also make the image corruption
detection work again.

* Make sure image IDs are sorted to make them unique
2023-12-04 14:58:08 +01:00
Jan Čermák
934273e344 Backport support for Netgear AXE3000/A8000 and Comfast CF-952AX (#2962)
Current mainline contains support for two more WiFi cards in the mt7921u
driver that only use a proprietary VID/PID but are compatible with the
standard driver. Backport support for those via a simple driver patch.

Fixes #2926
2023-12-04 13:23:22 +01:00
Jan Čermák
da40ca2271 Linux: Update kernel 6.1.65 (#2960) 2023-12-04 13:23:13 +01:00
Jan Čermák
a79e3b270c RaspberryPi: Update kernel 6.1.63 - stable_20231123 (#2956)
* RaspberryPi: Update kernel 6.1.63 - stable_20231123

* Bump rpi-firmware to latest stable version

* buildroot 2b6996211e...836f7e7b5e (1):
  > package/rpi-firmware: bump to version for stable_20231123 kernel
2023-12-01 18:14:01 +01:00
Stefan Agner
20295a5f0b Fix RAUC certificate check (#2955)
Check the right environment variable when determining if RAUC
certificates through secrets are provided.
2023-11-30 17:49:16 +01:00
Stefan Agner
26e96caef6 Linux: Update kernel 6.1.64 (#2954) 2023-11-30 14:45:55 +01:00
Stefan Agner
c59c887a53 Fix Supervisor image corruption detection (#2953)
* Fix Supervisor image corruption detection

When multiple images match the reference, multiple IDs are passed as a
single argument to docker image rm, leading to an error:
Error response from daemon: page not found

Make sure to pass the ids as separate argument to make the delete work
in any case.

* Cleanup reusing Supervisor from an old/unused reference

As noted in #2113, we don't need this logic anymore after a major OS
releases. So simply drop the logic to also make the image corruption
detection work again.

* Make sure image IDs are sorted to make them unique
2023-11-30 14:41:44 +01:00
Jan Čermák
2c6d0de965 Enable more WiFi drivers for all platforms (#2951)
Preemptively enable larger set of WiFi drivers for all platforms and add more firmwares for them with the aim to harmonize WiFi device support among all boards and to have implicit support of devices that users might want to use.  Targets `generic_aarch64`, `generic_x86_64` and `ova` also include options and firmwares for cards that are using PCI/PCIe bus - support for these is in a separate config fragment.

Especially the `generic_x86_64` is currently very tight with the rootfs space, so I had to do some triaging and select only sensible drivers and firmwares - especially archaic PCMCIA devices or devices not supporting only 802.11g or lower standards were among the first that I removed during the triaging - we can consider enabling those but this time on an someone's explicit need to have them enabled.

This closes #2815 and replaces large part of #2761, also potentially addresses (at least) these: #2806, #2783, #2841, #2776, #2725, #2600

-------------

* Remove WiFi options from generic and board kernel config fragments
* Enable MMC in OVA kernel
   This is needed for SDIO drivers to work. Use the same options as we
   currently use for generic_x86_64.
* Add CRYPTO_MICHAEL_MIC to the common kernel config
   This is requirement for TKIP and is a dependency of ATH11K driver.
* Add kernel config fragments with wireless cards support
* Add firmwares for WiFi cards
* Enable more Bluetooth device drivers
2023-11-30 14:19:05 +01:00
Stefan Agner
e524a5e03d Bump OS to pre-release version 11.2.rc2 2023-11-28 17:24:46 +01:00
Stefan Agner
eab18076ad Remove kernel HCI driver if no WiFi/Bluetooth module present (#2944) (#2948)
* Remove kernel HCI driver if no WiFi/Bluetooth module present (#2944)

If the WiFi/Bluetooth module is not present on the SDIO bus, remove the
HCI driver. This avoids hci0 interface to be present. Current Home
Assistant Core versions show a Bluetooth device as soon as a hci device
is present. With this change there won't be a Bluetooth device shown.

* Update buildroot-external/package/pi-bluetooth/hcidisable.service

Co-authored-by: Jan Čermák <sairon@users.noreply.github.com>

---------

Co-authored-by: Jan Čermák <sairon@users.noreply.github.com>
2023-11-28 17:24:09 +01:00
Stefan Agner
376e4f9296 Do not start hciuart.service/bthelper@hci0.service if krnbt is used (#2947)
* Do not start hciuart.service if krnbt is used

Avoid starting (and failing to start) hciuart.service if krnbt is used.
This avoid unnecessary failed services showing up.

* Update buildroot-external/package/pi-bluetooth/hciuart.service

Co-authored-by: Jan Čermák <sairon@users.noreply.github.com>

* Drop duplicate bluetooth in path

* Avoid bthelper@hci0.service failing

* Revert "Avoid bthelper@hci0.service failing"

This reverts commit f79777e63e.

* Add ExecConditiono to bthelper@.service as well

---------

Co-authored-by: Jan Čermák <sairon@users.noreply.github.com>
2023-11-28 17:24:04 +01:00
Stefan Agner
9235649bbd Remove kernel HCI driver if no WiFi/Bluetooth module present (#2944) (#2948)
* Remove kernel HCI driver if no WiFi/Bluetooth module present (#2944)

If the WiFi/Bluetooth module is not present on the SDIO bus, remove the
HCI driver. This avoids hci0 interface to be present. Current Home
Assistant Core versions show a Bluetooth device as soon as a hci device
is present. With this change there won't be a Bluetooth device shown.

* Update buildroot-external/package/pi-bluetooth/hcidisable.service

Co-authored-by: Jan Čermák <sairon@users.noreply.github.com>

---------

Co-authored-by: Jan Čermák <sairon@users.noreply.github.com>
2023-11-28 17:23:08 +01:00
Stefan Agner
93a2d8a19b Do not start hciuart.service/bthelper@hci0.service if krnbt is used (#2947)
* Do not start hciuart.service if krnbt is used

Avoid starting (and failing to start) hciuart.service if krnbt is used.
This avoid unnecessary failed services showing up.

* Update buildroot-external/package/pi-bluetooth/hciuart.service

Co-authored-by: Jan Čermák <sairon@users.noreply.github.com>

* Drop duplicate bluetooth in path

* Avoid bthelper@hci0.service failing

* Revert "Avoid bthelper@hci0.service failing"

This reverts commit f79777e63e.

* Add ExecConditiono to bthelper@.service as well

---------

Co-authored-by: Jan Čermák <sairon@users.noreply.github.com>
2023-11-28 17:18:50 +01:00
Stefan Agner
c3b9912e2e Generate self-signed certificates for development (#2943)
* Generate self-signed certificates for development

To simplify development generate a self-signed certificate on first
build. Also make sure that the self-signed certificate is being added
the RAUC keyring so that manual updates can be performed.

* Add self-signed certificat independent of deployment type

* Add a warning when building with self-signed certificate
2023-11-27 18:36:12 +01:00
dependabot[bot]
741498c92b Bump dessant/label-actions from 4.0.0 to 4.0.1 (#2946)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-27 14:38:45 +01:00
Stefan Agner
d7f49ab9ff Bump OS to development version 11.3.dev0 2023-11-21 10:03:33 +01:00
Stefan Agner
b37dc33e5c Bump OS to pre-release version 11.2.rc1 2023-11-21 09:54:06 +01:00
Jens Maus
5891250bd1 Bump rpi-rf-mod dt overlay to latest version (#2921)
* Bump rpi-rf-mod dt overlay to latest version

* updated to 1.13.1
2023-11-21 09:52:03 +01:00
Jan Čermák
1ea0bb7bf4 Linux: Update kernel 6.1.63 (#2937) 2023-11-20 17:28:25 +01:00
Jan Čermák
f986d7f690 Bump buildroot to v2023.02.7 (#2936)
* buildroot 04e4585bec...2b6996211e (2):
  > Merge tag '2023.02.7' into 2023.02.x-haos
  > Merge tag '2023.02.6' into 2023.02.x-haos
2023-11-20 17:19:49 +01:00
dependabot[bot]
9fd789cdb5 Bump docker/build-push-action from 5.0.0 to 5.1.0 (#2935)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 5.0.0 to 5.1.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v5.0.0...v5.1.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>
2023-11-20 14:15:27 +01:00
dependabot[bot]
1848fd7555 Bump actions/github-script from 6 to 7 (#2934)
Bumps [actions/github-script](https://github.com/actions/github-script) from 6 to 7.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-20 14:14:51 +01:00
Jan Čermák
5d11e16150 Fix miniUART on Yellow with kernel HCI init enabled (#2931)
Bluetooth initialization was broken on Yellow because RPi's kernel
started to use initialization by the kernel driver by default, yet
changes from the miniuart-bt overlay are applied directly to Yellow
DTS and had to be updated too. This commit replaces the previous
patch forcing the miniUART usage for Bluetooth with a new one which
is based on the current miniuart-bt-overlay.dts.
2023-11-16 15:55:14 +01:00
Jan Čermák
7c3cee049b Bump buildroot to fix rpi-firmware hash (#2930)
* buildroot a48cc458e7...04e4585bec (1):
  > package/rpi-firmware: update package tarball hash
2023-11-16 11:47:46 +01:00
Jan Čermák
c94b29a9cc Bump Raspberry Pi firmware to latest stable version (#2929)
Also added a little warning to the RPi kernel bump script, so the
future me/us don't do the same mistake as I did.

* buildroot 20ea6bedda...a48cc458e7 (1):
  > package/rpi-firmware: bump to version for stable_20231030 kernel
2023-11-15 18:52:27 +01:00
Jan Čermák
b06a89b264 Reduce Tinker and Amlogic kernel configs to defconfigs (#2925)
Reduce fully-expanded configs versioned in our repository to defconfigs
containing only the necessary options. Just like #2923, this change does
not alter the resulting kernel .config in any way for the affected
platforms (Tinker, Odroid C2/C4/N2).
2023-11-14 14:12:42 +01:00
Bertrand GRESSIER
5d9244b92a fix: disable uas for wavlink adaptor (#2924)
this adaptor doesn't work and the hard disk is not able to work correctly.
Need to disable UAS to fallback to the usb-storage module
2023-11-14 10:21:57 +01:00
Jan Čermák
5b534e3b58 Update old full Kernel configs to newly generated ones
For tinker and amlogic-based targets we're using checked-in kernel
configs generated by kconfig for some old kernel revisions. Check in
current config before we clean it up and reduce to a smaller stub later.
2023-11-13 15:04:42 +01:00
Jan Čermák
0f2b7c49f2 Clean up inconsistencies in kernel configs
Clean up all kernel configs and fragments from non-existing kernel
options, invalid choice values and choices that trigger warnings
during kernel package configuration.

Here's an example of warnings triggered for Yellow:

.config:8531:warning: override: MODULE_COMPRESS_NONE changes choice state
.config:8536:warning: override: ZSWAP_COMPRESSOR_DEFAULT_LZ4 changes choice state
.config:8537:warning: override: ZSWAP_ZPOOL_DEFAULT_ZSMALLOC changes choice state
.config:8543:warning: override: CPU_FREQ_DEFAULT_GOV_ONDEMAND changes choice state
.config:8717:warning: override: reassigning to symbol CGROUP_HUGETLB
.config:8767:warning: symbol value 'm' invalid for XFRM
.config:8852:warning: symbol value 'm' invalid for MEDIA_CONTROLLER_DVB
.config:8972:warning: symbol value 'm' invalid for SND_HDA_I915

There were also some options that are set in our or default configs
but end up patched by `KCONFIG_(DIS|EN)ABLE_OPT` in package makefiles,
these options are now explicitly set in our fragments too. For example
this was toggled for `generic_aarch64`:

CONFIG_DEFAULT_SECURITY_APPARMOR n -> y
CONFIG_DEFAULT_SECURITY_DAC y -> n
CONFIG_GCC_PLUGINS y -> n

The only goal of this commit is to make sure no warnings appear
anymore and the resulting kernel configs remain unchanged. This will
allow us to create tools for sanity checks of our kernel config
overrides. There is one single change in `ova` config resulting from
previously invalid `m` option for a bool value:

-# CONFIG_9P_FS_POSIX_ACL is not set
+CONFIG_9P_FS_POSIX_ACL=y
2023-11-13 14:55:40 +01:00
dependabot[bot]
754bec30fd Bump dessant/label-actions from 3.1.0 to 4.0.0 (#2922)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-13 14:30:44 +01:00
Stefan Agner
1238527b49 Linux: Update kernel 6.1.62 (#2917) 2023-11-09 22:09:04 +01:00
Stefan Agner
196c48ee5e Use kernel local version for HAOS compiled Linux kernel (#2912)
* Use kernel local version for HAOS compiled Linux kernel

Use the local version config option to add "haos" to the system's Linux
kernel version to indicate the kernel is built specifically for Home
Assistant OS. This makes sure to overwrite any other local version (e.g.
provided by Raspberry Pi kernel's defconfig) and makes it easier to
verify something is running on HAOS since the string will be visible in
any Container using `uname -a`.

* Add dash in front
2023-11-09 13:46:46 +01:00
Jan Čermák
5e80f74b7a Bump buildroot to add RTL885x firmware (#2911)
* buildroot 2a3f23fc4b...20ea6bedda (1):
  > package/linux-firmware: add RTL8851/RTL8852 firmware
2023-11-07 21:10:53 +01:00
Stefan Agner
11c2eab58a Generic AArch64: Enable options required for virtiofs (#2909) (#2910)
* Generic AArch64: Enable options required for virtiofs (#2909)

* Update buildroot-external/board/arm-uefi/generic-aarch64/kernel.config

Co-authored-by: Jan Čermák <sairon@users.noreply.github.com>

---------

Co-authored-by: Jan Čermák <sairon@users.noreply.github.com>
2023-11-06 17:13:16 +01:00
Jens Maus
e0d6cc15d5 fixed incorrect uppercase Y kconfig use (#2908) 2023-11-06 11:53:04 +01:00
Stefan Agner
1a6b7418f0 Improve Bluetooth cache cleanup command (#2906)
Use the find's delete flag to delete the files instead of spanning a
shell for each file.
2023-11-06 11:52:57 +01:00
Stefan Agner
fccb11cad1 Revert "Upload artifacts index even on partial builds (#2901)" (#2905)
This reverts commit 49f26c3d2e.

The steps is not valid in that context. Let's revert the commit to get a
green build first.
2023-11-02 16:35:26 +01:00
Jan Čermák
5314324c61 RaspberryPi: Update kernel 6.1.58 - stable_20231030 (#2904) 2023-11-02 16:26:47 +01:00
Jan Čermák
53d139df97 Linux: Update kernel 6.1.61 (#2903) 2023-11-02 16:19:57 +01:00
Stefan Agner
49f26c3d2e Upload artifacts index even on partial builds (#2901)
Make sure that the artifacts index always gets updated. This allows to
use builds even when not all of them are available.
2023-11-02 13:46:12 +01:00
Jan Čermák
d9b49bbcb8 Add pruning of object file cache (#2899) 2023-11-02 13:45:56 +01:00
Jan Čermák
26bfeb6c40 Refresh all boards' defconfigs (#2895)
Make sure the order of options is the same as generated by Kconfig by
running savedefconfig on an unchanged configuration.
2023-11-02 13:45:40 +01:00
Stefan Agner
586f2ea021 Fix Artifacts index bump when using workflow_call (#2900)
Use inputs.version which is available for workflow_call as well as
workflow_dispatch.
2023-11-02 11:33:55 +01:00
xtsrthm
6df79b13e9 generic-x86-64: Add missing dependency for #2800 to kernel.config (#2813)
* Add missing dependency to kernel.config

* Move CONFIG_IIO up to follow Kconfig hieararchy

---------

Co-authored-by: Jan Čermák <sairon@users.noreply.github.com>
2023-11-01 17:42:27 +01:00
218 changed files with 13549 additions and 20373 deletions

View File

@@ -30,6 +30,7 @@ body:
- odroid-c2 (Hardkernel ODROID-C2)
- odroid-c4 (Hardkernel ODROID-C4)
- odroid-m1 (Hardkernel ODROID-M1)
- odroid-m1s (Hardkernel ODROID-M1S)
- odroid-n2 (Hardkernel ODROID-N2/N2+)
- odroid-xu4 (Hardkernel ODROID-XU4)
- ova (for Virtual Machines)
@@ -38,6 +39,7 @@ body:
- rpi3-64 (Raspberry Pi 3 64-bit OS)
- rpi4 (Raspberry Pi 4/400 32-bit OS)
- rpi4-64 (Raspberry Pi 4/400 64-bit OS)
- rpi5-64 (Raspberry Pi 5 64-bit OS)
- tinker (ASUS Tinker Board/Tinker Board S)
- yellow (Home Assistant Yellow)
- green (Home Assistant Green)
@@ -80,10 +82,10 @@ body:
attributes:
label: Anything in the Supervisor logs that might be useful for us?
description: >
Supervisor Logs can be found in [Settings -> System -> Logs](https://my.home-assistant.io/redirect/logs/)
then choose `Supervisor` in the top right.
Supervisor Logs can be found in [Settings -> System -> Logs](https://my.home-assistant.io/redirect/logs/?provider=supervisor)
then choose `Supervisor` in the top right. Alternatively enter `ha supervisor logs` in the Home Assistant CLI.
[![Open your Home Assistant instance and show your Supervisor system logs.](https://my.home-assistant.io/badges/supervisor_logs.svg)](https://my.home-assistant.io/redirect/supervisor_logs/)
[![Open your Home Assistant instance and show your Supervisor system logs.](https://my.home-assistant.io/badges/supervisor_logs.svg)](https://my.home-assistant.io/redirect/logs/?provider=supervisor)
render: txt
- type: textarea
validations:
@@ -91,8 +93,8 @@ body:
attributes:
label: Anything in the Host logs that might be useful for us?
description: >
Host Logs can be found in [Settings -> System -> Logs](https://my.home-assistant.io/redirect/logs/)
then choose `Host` in the top right.
Host Logs can be found in [Settings -> System -> Logs](https://my.home-assistant.io/redirect/logs/?provider=host)
then choose `Host` in the top right. Alternatively enter `ha host logs` in the Home Assistant CLI.
render: txt
- type: textarea
attributes:

View File

@@ -82,6 +82,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"
- shell: bash
env:

View File

@@ -44,7 +44,7 @@ jobs:
persist-credentials: false
- name: Setup Python version ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
@@ -59,10 +59,10 @@ jobs:
aws s3api list-objects-v2 \
--bucket "${{ secrets.R2_OS_ARTIFACTS_BUCKET }}" \
--endpoint-url "${{ secrets.R2_OS_ARTIFACTS_ENDPOINT }}" \
--prefix "${{ github.event.inputs.version }}/" \
--query 'Contents[].Key' | jq 'map(split("/")[1]) | sort' > "${{ github.event.inputs.version }}.json"
--prefix "${{ inputs.version }}/" \
--query 'Contents[].Key' | jq 'map(split("/")[1]) | sort' > "${{ inputs.version }}.json"
aws s3 cp \
"${{ github.event.inputs.version }}.json" \
"${{ inputs.version }}.json" \
s3://${{ secrets.R2_OS_ARTIFACTS_BUCKET }}/indexes/ \
--endpoint-url "${{ secrets.R2_OS_ARTIFACTS_ENDPOINT }}"

View File

@@ -11,6 +11,11 @@ on:
description: 'List of boards to build (comma separated identifiers)'
required: false
type: string
publish:
description: 'Publish build artifacts to R2 (not applicable to forks)'
required: true
type: boolean
default: true
env:
PYTHON_VERSION: "3.10"
@@ -30,18 +35,40 @@ jobs:
channel: ${{ steps.channel.outputs.channel }}
matrix: ${{ steps.generate_matrix.outputs.result }}
build_container_image: ghcr.io/${{ github.repository_owner }}/haos-builder@${{ steps.build_haos_builder.outputs.digest }}
publish_build: ${{ steps.check_publish.outputs.publish_build }}
self_signed_cert: ${{ steps.generate_signing_key.outputs.self_signed_cert }}
steps:
- name: Checkout source
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Check if build should be published
id: check_publish
env:
PUBLISH_FLAG: ${{ inputs.publish }}
run: |
if [ "${{ github.repository }}" == "home-assistant/operating-system" ]; then
if [ "${PUBLISH_FLAG}" != "true" ] && [ "${{ github.event_name }}" != "release" ]; then
echo "publish_build=false" >> "$GITHUB_OUTPUT"
else
echo "publish_build=true" >> "$GITHUB_OUTPUT"
fi
else
echo "publish_build=false" >> "$GITHUB_OUTPUT"
fi
- name: Generate development version
shell: bash
id: version_dev
if: ${{ github.event_name != 'release' }}
env:
PUBLISH_BUILD: ${{ steps.check_publish.outputs.publish_build }}
run: |
version_dev="dev$(date --utc +'%Y%m%d')"
if [ "${{ env.PUBLISH_BUILD }}" != "true" ]; then
version_dev="dev$(date +%s)"
fi
echo "Development version \"${version_dev}\""
echo "version_dev=${version_dev}" >> $GITHUB_OUTPUT
@@ -88,7 +115,7 @@ jobs:
fi
- name: Create build matrix
uses: actions/github-script@v6
uses: actions/github-script@v7
id: generate_matrix
with:
script: |
@@ -109,24 +136,44 @@ jobs:
}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.0.0
uses: docker/setup-buildx-action@v3.3.0
- name: Log in to the GitHub container registry
uses: docker/login-action@v3.0.0
uses: docker/login-action@v3.1.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push
uses: docker/build-push-action@v5.0.0
uses: docker/build-push-action@v5.3.0
id: build_haos_builder
with:
context: .
file: Dockerfile
tags: ghcr.io/${{ github.repository_owner }}/haos-builder
cache-from: ghcr.io/${{ github.repository_owner }}/haos-builder:cache-${{ steps.version_main.outputs.version_main }}
cache-to: ghcr.io/${{ github.repository_owner }}/haos-builder:cache-${{ steps.version_main.outputs.version_main }}
cache-from: ghcr.io/${{ github.repository_owner }}/haos-builder:cache-${{ steps.version.outputs.version_main }}
cache-to: ghcr.io/${{ github.repository_owner }}/haos-builder:cache-${{ steps.version.outputs.version_main }}
push: true
- name: Generate self-signed certificate
id: generate_signing_key
env:
RAUC_CERTIFICATE: ${{ secrets.RAUC_CERTIFICATE }}
RAUC_PRIVATE_KEY: ${{ secrets.RAUC_PRIVATE_KEY }}
if: env.RAUC_CERTIFICATE == '' || env.RAUC_PRIVATE_KEY == ''
run: |
echo "::warning:: RAUC certificate or key is missing in the repository secrets. Building with a public self-signed certificate!"
buildroot-external/scripts/generate-signing-key.sh cert.pem key.pem
echo "self_signed_cert=true" >> $GITHUB_OUTPUT
- name: Create signing key
uses: actions/upload-artifact@v4
if: steps.generate_signing_key.outcome == 'success'
with:
name: signing-key
path: |
cert.pem
key.pem
build:
name: Build for ${{ matrix.board.id }}
permissions:
@@ -146,12 +193,12 @@ jobs:
- name: Setup Python version ${{ env.PYTHON_VERSION }}
if: ${{ github.event_name != 'release' }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install AWS CLI
if: ${{ github.event_name != 'release' }}
if: ${{ github.event_name != 'release' && needs.prepare.outputs.publish_build == 'true' }}
run: pip install awscli
- name: Set version suffix
@@ -162,6 +209,7 @@ jobs:
sed -i -E "s/(^VERSION_SUFFIX=\").*(\"$)/\1${VERSION_DEV}\2/" buildroot-external/meta
- name: 'Add release PKI certs'
if: ${{ needs.prepare.outputs.self_signed_cert != 'true' }}
env:
RAUC_CERTIFICATE: ${{ secrets.RAUC_CERTIFICATE }}
RAUC_PRIVATE_KEY: ${{ secrets.RAUC_PRIVATE_KEY }}
@@ -169,17 +217,30 @@ jobs:
echo -e "-----BEGIN CERTIFICATE-----\n${RAUC_CERTIFICATE}\n-----END CERTIFICATE-----" > cert.pem
echo -e "-----BEGIN PRIVATE KEY-----\n${RAUC_PRIVATE_KEY}\n-----END PRIVATE KEY-----" > key.pem
- name: Get self-signed certificate from the prepare job
if: ${{ needs.prepare.outputs.self_signed_cert == 'true' }}
uses: actions/download-artifact@v4
with:
name: signing-key
- name: Free space on build drive
run: |
# Inspired by https://github.com/easimon/maximize-build-space/blob/v7/action.yml
df -h
sudo rm -rf /usr/local/lib/android/sdk/ndk
sudo rm -rf /opt/hostedtoolcache/CodeQL
# Make sure cache action can restore this lcoation
sudo mkdir /mnt/cache
sudo chown -R runner:runner /mnt/cache
sudo mkdir /mnt/output
WORKSPACE_OWNER="$(stat -c '%U:%G' "${GITHUB_WORKSPACE}")"
# output directory is symlinked for easier access from workspace
# but for build container it must be mounted as a volume
sudo ln -sf /mnt/output "${GITHUB_WORKSPACE}/output"
sudo chown -R "${WORKSPACE_OWNER}" /mnt/cache
sudo chown -R "${WORKSPACE_OWNER}" /mnt/output
df -h
- name: "Restore cache: object files"
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4
with:
path: /mnt/cache/cc
key: haos-cc-${{ matrix.board.id }}
@@ -188,14 +249,27 @@ jobs:
run: |
BUILDER_UID="$(id -u)"
BUILDER_GID="$(id -g)"
docker run --rm --privileged -v "${GITHUB_WORKSPACE}:/build" \
docker run --rm --privileged \
-e BUILDER_UID="${BUILDER_UID}" -e BUILDER_GID="${BUILDER_GID}" \
-v "${GITHUB_WORKSPACE}:/build" \
-v "/mnt/cache:/cache" \
-v "/mnt/output:/build/output" \
${{ needs.prepare.outputs.build_container_image }} \
make BUILDDIR=/build ${{ matrix.board.defconfig }}
- name: Check Linux config
run: |
docker run --rm --privileged \
-e BUILDER_UID="$(id -u)" -e BUILDER_GID="$(id -g)" \
-v "${GITHUB_WORKSPACE}:/build" \
-v "/mnt/cache:/cache" \
-v "/mnt/output:/build/output" \
${{ needs.prepare.outputs.build_container_image }} \
make -C buildroot O="/build/output" BR2_EXTERNAL="/build/buildroot-external" \
BR2_CHECK_DOTCONFIG_OPTS="--github-format --strip-path-prefix=/build/" linux-check-dotconfig
- name: Upload artifacts
if: ${{ github.event_name != 'release' }}
if: ${{ github.event_name != 'release' && needs.prepare.outputs.publish_build == 'true' }}
working-directory: output/images/
env:
AWS_ACCESS_KEY_ID: ${{ secrets.R2_OS_ARTIFACTS_ID }}
@@ -219,31 +293,100 @@ jobs:
run: |
echo "Cache size: $(du -sh /mnt/cache/cc)"
echo "Files total: $(find /mnt/cache/cc -mindepth 1 -type f | wc -l)"
echo "Old files: $(find /mnt/cache/cc -mindepth 1 -type f -not -anewer output/Makefile | wc -l)"
echo "Old files to remove: $(find /mnt/cache/cc -mindepth 1 -type f -not -anewer output/Makefile | wc -l)"
find /mnt/cache/cc -mindepth 1 -type f -not -anewer output/Makefile -delete
echo "Cache size after pruning: $(du -sh /mnt/cache/cc)"
- name: "Save cache: object files"
if: github.ref == 'refs/heads/dev'
uses: actions/cache/save@v3
uses: actions/cache/save@v4
with:
path: /mnt/cache/cc
key: haos-cc-${{ matrix.board.id }}-${{ github.run_id }}
- name: Upload ova image to artifacts for test job
uses: actions/upload-artifact@v3
if: ${{ matrix.board.id == 'ova' }}
- name: Generate build summary
run: |
echo "# ${{ matrix.board.id }} build summary" >> $GITHUB_STEP_SUMMARY
echo "## Artifacts" >> $GITHUB_STEP_SUMMARY
echo "| File | Size (bytes) | Size (formatted) |" >> $GITHUB_STEP_SUMMARY
echo "|:-|:-|:-|" >> $GITHUB_STEP_SUMMARY
for f in output/images/haos_*; do
echo "| $(basename $f) | $(du -b $f | cut -f1) | $(du -bh $f | cut -f1) |" >> $GITHUB_STEP_SUMMARY
done
echo "## Partitions" >> $GITHUB_STEP_SUMMARY
echo "| File | Size (bytes) | Size (formatted) |" >> $GITHUB_STEP_SUMMARY
echo "|:-|:-|:-|" >> $GITHUB_STEP_SUMMARY
for f in boot.vfat kernel.img rootfs.squashfs overlay.ext4 data.ext4; do
echo "| ${f} | $(du -b output/images/$f | cut -f1) | $(du -bh output/images/$f | cut -f1) |" >> $GITHUB_STEP_SUMMARY
done
- name: Upload OS image artifact
uses: actions/upload-artifact@v4
if: ${{ github.event_name != 'release' && needs.prepare.outputs.publish_build != 'true' && matrix.board.id != 'ova' }}
with:
name: ova-image
name: haos_${{ matrix.board.id }}-${{ needs.prepare.outputs.version_full }}.img.xz
path: |
output/images/haos_ova*.qcow2.xz
output/images/haos_${{ matrix.board.id }}-${{ needs.prepare.outputs.version_full }}.img.xz
- name: Upload RAUC bundle artifact
uses: actions/upload-artifact@v4
if: ${{ github.event_name != 'release' && needs.prepare.outputs.publish_build != 'true' }}
with:
name: haos_${{ matrix.board.id }}-${{ needs.prepare.outputs.version_full }}.raucb
path: |
output/images/haos_${{ matrix.board.id }}-${{ needs.prepare.outputs.version_full }}.raucb
- name: Upload Open Virtualization Format (OVA) artifact
uses: actions/upload-artifact@v4
if: ${{ github.event_name != 'release' && needs.prepare.outputs.publish_build != 'true' && matrix.board.id == 'ova' }}
with:
name: haos_${{ matrix.board.id }}-${{ needs.prepare.outputs.version_full }}.ova
path: |
output/images/haos_${{ matrix.board.id }}-${{ needs.prepare.outputs.version_full }}.ova
- name: Upload QEMU disk image artifact
uses: actions/upload-artifact@v4
# Create artifact for ova every time - it's used by the called tests workflow
if: ${{ matrix.board.id == 'ova' || (github.event_name != 'release' && needs.prepare.outputs.publish_build != 'true' && matrix.board.id == 'generic-aarch64') }}
with:
name: haos_${{ matrix.board.id }}-${{ needs.prepare.outputs.version_full }}.qcow2.xz
path: |
output/images/haos_${{ matrix.board.id }}-${{ needs.prepare.outputs.version_full }}.qcow2.xz
- name: Upload VMware Virtual Machine Disk (VMDK) artifact
uses: actions/upload-artifact@v4
if: ${{ github.event_name != 'release' && needs.prepare.outputs.publish_build != 'true' && (matrix.board.id == 'generic-aarch64' || matrix.board.id == 'ova') }}
with:
name: haos_${{ matrix.board.id }}-${{ needs.prepare.outputs.version_full }}.vmdk.zip
path: |
output/images/haos_${{ matrix.board.id }}-${{ needs.prepare.outputs.version_full }}.vmdk.zip
- name: Upload VirtualBox Virtual Disk Image (VDI) artifact
uses: actions/upload-artifact@v4
if: ${{ github.event_name != 'release' && needs.prepare.outputs.publish_build != 'true' && matrix.board.id == 'ova' }}
with:
name: haos_${{ matrix.board.id }}-${{ needs.prepare.outputs.version_full }}.vdi.zip
path: |
output/images/haos_${{ matrix.board.id }}-${{ needs.prepare.outputs.version_full }}.vdi.zip
- name: Upload Virtual Hard Disk v2 (VHDX) artifact
uses: actions/upload-artifact@v4
if: ${{ github.event_name != 'release' && needs.prepare.outputs.publish_build != 'true' && matrix.board.id == 'ova' }}
with:
name: haos_${{ matrix.board.id }}-${{ needs.prepare.outputs.version_full }}.vhdx.zip
path: |
output/images/haos_${{ matrix.board.id }}-${{ needs.prepare.outputs.version_full }}.vhdx.zip
test:
name: Test OS image
needs: [ build, prepare ]
uses: ./.github/workflows/test.yaml
with:
version: ${{ needs.prepare.outputs.version_full }}
update_index:
name: Update artifacts index
if: ${{ github.event_name != 'release' }}
if: ${{ github.event_name != 'release' && needs.prepare.outputs.publish_build == 'true' }}
needs: [ build, prepare ]
uses: home-assistant/operating-system/.github/workflows/artifacts-index.yaml@dev
with:
@@ -258,7 +401,7 @@ jobs:
bump_version:
name: Bump ${{ needs.prepare.outputs.channel }} channel version
if: ${{ github.repository == 'home-assistant/operating-system' }}
if: ${{ github.repository == 'home-assistant/operating-system' && needs.prepare.outputs.publish_build == 'true' }}
environment: ${{ needs.prepare.outputs.channel }}
needs: [ build, prepare ]
runs-on: ubuntu-22.04

View File

@@ -14,4 +14,4 @@ jobs:
action:
runs-on: ubuntu-latest
steps:
- uses: dessant/label-actions@v3.1.0
- uses: dessant/label-actions@v4.0.1

View File

@@ -41,6 +41,12 @@
"architecture": "aarch64",
"label": "board/odroid"
},
{
"id": "odroid-m1s",
"defconfig": "odroid_m1s",
"architecture": "aarch64",
"label": "board/odroid"
},
{
"id": "odroid-n2",
"defconfig": "odroid_n2",
@@ -83,6 +89,12 @@
"architecture": "aarch64",
"label": "board/raspberrypi"
},
{
"id": "rpi5-64",
"defconfig": "rpi5_64",
"architecture": "aarch64",
"label": "board/raspberrypi"
},
{
"id": "yellow",
"defconfig": "yellow",

View File

@@ -8,6 +8,12 @@ jobs:
linters:
runs-on: ubuntu-22.04
steps:
- name: Install additional dependencies
run: |
sudo apt-get update
sudo apt-get -y install \
python3-flake8
- name: Check out code
uses: actions/checkout@v4
with:
@@ -21,8 +27,8 @@ jobs:
- name: Check shell scripts
uses: ludeeus/action-shellcheck@2.0.0
with:
ignore: buildroot
ignore_paths: buildroot
- name: Check buildroot-external packages
run: |
buildroot/utils/check-package --exclude PackageHeader --br2-external buildroot-external/package/*/*
buildroot/utils/check-package --exclude PackageHeader --exclude Upstream --br2-external buildroot-external/package/*/*

View File

@@ -13,6 +13,6 @@ jobs:
pull-requests: read # for release-drafter/release-drafter to read PR content and labels
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v5
- uses: release-drafter/release-drafter@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

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@v8.0.0
uses: actions/stale@v9.0.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 90

View File

@@ -19,14 +19,15 @@ on:
required: false
type: boolean
default: true
version:
description: Version of HAOS to test (as used in the name of the qcow2 image artifact)
required: true
type: string
jobs:
test:
if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}
env:
NO_KVM: 1
name: Test in QEMU
runs-on: ubuntu-22.04
steps:
@@ -41,7 +42,7 @@ jobs:
sudo apt install -y qemu-system-x86 ovmf
- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.12
@@ -56,21 +57,27 @@ jobs:
- name: Get OS image artifact
if: ${{ inputs.use-artifact }}
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ova-image
name: haos_ova-${{ inputs.version }}.qcow2.xz
- name: Extract OS image
run: |
xz -dc haos*.qcow2.xz > tests/haos.qcow2
rm haos*.qcow2.xz
- name: Enable KVM group perms
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: Run tests
run: |
./tests/run_tests.sh
- name: Archive logs
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: logs
@@ -78,7 +85,7 @@ jobs:
tests/lg_logs/**
- name: Archive JUnit reports
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: junit_reports

View File

@@ -12,8 +12,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
gpg \
dirmngr \
software-properties-common \
&& curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - \
&& add-apt-repository "deb https://download.docker.com/linux/debian $(lsb_release -cs) stable" \
&& curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/trusted.gpg.d/docker.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/trusted.gpg.d/docker.gpg] \
https://download.docker.com/linux/debian $(lsb_release -cs) stable" > /etc/apt/sources.list.d/docker.list \
&& apt-get update && apt-get install -y --no-install-recommends \
docker-ce \
&& rm -rf /var/lib/apt/lists/*

View File

@@ -4,16 +4,20 @@
The following boards/devices are supported:
- Nabu Casa
- [Home Assistant Green](https://www.home-assistant.io/green/)
- [Home Assistant Yellow](https://www.home-assistant.io/yellow/) (based custom carrier board and powered by a Raspberry Pi 4 Compute Module)
- [Home Assistant Blue](https://www.home-assistant.io/blue/) (based on ODROID-N2+)
- Raspberry Pi
- Pi 5 ([4 GB](https://www.raspberrypi.com/products/raspberry-pi-5/?variant=raspberry-pi-5-4gb) and [8 GB](https://www.raspberrypi.com/products/raspberry-pi-5/?variant=raspberry-pi-5-8gb) model) 64-bit
- Pi 4 Model B ([1 GB](https://www.raspberrypi.com/products/raspberry-pi-4-model-b/?variant=raspberry-pi-4-model-b-1gb), [2 GB](https://www.raspberrypi.com/products/raspberry-pi-4-model-b/?variant=raspberry-pi-4-model-b-2gb), [4 GB](https://www.raspberrypi.com/products/raspberry-pi-4-model-b/?variant=raspberry-pi-4-model-b-4gb) and [8 GB](https://www.raspberrypi.com/products/raspberry-pi-4-model-b/?variant=raspberry-pi-4-model-b-8gb) model) 32-bit or 64-bit (recommended)
- [Pi 3 Model B](https://www.raspberrypi.com/products/raspberry-pi-3-model-b/) and [B+](https://www.raspberrypi.com/products/raspberry-pi-3-model-b-plus/) 32-bit or 64-bit (recommended)
- [Pi 2](https://www.raspberrypi.com/products/raspberry-pi-2-model-b/) (not recommended)
- [Pi Zero-W](https://www.raspberrypi.com/products/raspberry-pi-zero-w/) (not recommended)
- [Pi](https://www.raspberrypi.com/products/raspberry-pi-1-model-b-plus/) (not recommended)
- Hardkernel
- [ODROID-C2](https://www.hardkernel.com/shop/odroid-c2/) (discontinued)
- [ODROID-C4](https://www.hardkernel.com/shop/odroid-c4/)
- [ODROID-M1](https://www.hardkernel.com/shop/odroid-m1/)
- ODROID-M1S [4 GB](https://www.hardkernel.com/shop/odroid-m1s-with-4gbyte-ram/) or [8 GB](https://www.hardkernel.com/shop/odroid-m1s-with-8gbyte-ram/)
- [ODROID-N2](https://www.hardkernel.com/shop/odroid-n2/) (discontinued)
- ODROID-N2+ [2 GB](https://www.hardkernel.com/shop/odroid-n2-with-2gbyte-ram-2/) or [4 GB](https://www.hardkernel.com/shop/odroid-n2-with-4gbyte-ram-2/)
- [ODROID-XU4](https://www.hardkernel.com/shop/odroid-xu4-special-price/)
@@ -39,6 +43,9 @@ Notes:
|Board|Build|Config|Docs|
|-----|----|------|----|
|Green |`make green` |[green](../../buildroot-external/configs/green_defconfig)|-|
|Yellow |`make yellow` |[yellow](../../buildroot-external/configs/yellow_defconfig)|-|
|Pi5 64-bit |`make rpi5_64` |[rpi5_64](../../buildroot-external/configs/rpi5_64_defconfig)|[raspberrypi](./raspberrypi/)|
|Pi4B 64-bit |`make rpi4_64` |[rpi4_64](../../buildroot-external/configs/rpi4_64_defconfig)|[raspberrypi](./raspberrypi/)|
|Pi4B 32-bit |`make rpi4` |[rpi4](../../buildroot-external/configs/rpi4_defconfig)|[raspberrypi](./raspberrypi/)|
|Pi3B 64-bit |`make rpi3_64` |[rpi3_64](../../buildroot-external/configs/rpi3_64_defconfig)|[raspberrypi](./raspberrypi/)|
@@ -47,6 +54,7 @@ Notes:
|ODROID-C2 |`make odroid_c2` |[odroid_c2](../../buildroot-external/configs/odroid_c2_defconfig)|[hardkernel](./hardkernel/)|
|ODROID-C4 |`make odroid_c4` |[odroid_c4](../../buildroot-external/configs/odroid_c4_defconfig)|[hardkernel](./hardkernel/)|
|ODROID-M1 |`make odroid_m1` |[odroid_m1](../../buildroot-external/configs/odroid_m1_defconfig)|[hardkernel](./hardkernel/)|
|ODROID-M1S |`make odroid_m1s` |[odroid_m1s](../../buildroot-external/configs/odroid_m1s_defconfig)|[hardkernel](./hardkernel/)|
|ODROID-N2/N2+ |`make odroid_n2` |[odroid_n2](../../buildroot-external/configs/odroid_n2_defconfig)|[hardkernel](./hardkernel/)|
|ODROID-XU4 |`make odroid_xu4` |[odroid_xu4](../../buildroot-external/configs/odroid_xu4_defconfig)|[hardkernel](./hardkernel/)|
|Tinker Board |`make tinker` |[tinker](../../buildroot-external/configs/tinker_defconfig)|[asus](./asus/)|

View File

@@ -7,6 +7,7 @@
| ODROID-C2 | 2016 | yes | [odroid_c2](../../../buildroot-external/configs/odroid_c2_defconfig) |
| ODROID-C4 | 2020 | yes | [odroid_c4](../../../buildroot-external/configs/odroid_c4_defconfig) |
| ODROID-M1 | 2022 | yes | [odroid_m1](../../../buildroot-external/configs/odroid_m1_defconfig) |
| ODROID-M1S | 2023 | yes | [odroid_m1s](../../../buildroot-external/configs/odroid_m1s_defconfig)|
| ODROID-N2 | 2019 | yes | [odroid_n2](../../../buildroot-external/configs/odroid_n2_defconfig) |
| ODROID-XU4 | 2015 | yes | [odroid_xu4](../../../buildroot-external/configs/odroid_xu4_defconfig)|

View File

@@ -8,18 +8,18 @@ SD-card boot is supported via on-board bootloader (SPL) or recovery button.
## eMMC
eMMC boot via on-board bootloader requires the latest version of Petitboot
(spiboot 20230328). To install the latest version download the SPI boot image
eMMC boot via on-board bootloader requires a newer version of Petitboot
(spiboot 20230328 or later). To install the latest version download the SPI boot image
from [linuxfactory.or.kr][1] as follows:
1. Download `spiupdate_odroidm1_20220304.img.xz`
1. Download `spiupdate_odroidm1_20240415.img.xz`
2. Use balenaEtcher or another tool to flash the updater onto an SD card
3. Download `spiboot-20230328.img`
4. Rename the `spiboot-20230328.img` file to`spiboot.img`.
3. Download `spiboot-20240109.img`
4. Rename the `spiboot-20240109.img` file to`spiboot.img`.
5. Paste the `spiboot.img` file onto the FAT partition of that same SD card.
6. Plug-in that SD card to your ODROID-M1. Petitboot will update itself, you can verify the progress on the HDMI output.
7. If you see the version 20230328 in the top right corner, the installation was successful.
* If you see any other version there, the installation failed.
7. If you see the version 20240109 in the top left corner, the installation was successful.\
If you see any other version there, the installation failed.
Once Petitboot is updated you can flash Home Assistant OS directly onto an eMMC.

View File

@@ -0,0 +1,58 @@
# ODROID-M1S
Home Assistant OS 12 and newer support the ODROID-M1S board.
## SD-card
ODROID-M1S can boot HAOS directly from an SD card, as it has higher priority than the system on the eMMC. Simply flash the image to the SD card using your favorite tool and insert it to the micro SD slot on the board. This works even when the eMMC is wiped, or when it contains the factory-default U-Boot SPL loader, which is still able to load U-Boot provided in the HAOS image. In the second case, however, if the SD card fails to probe (e.g. due to a hardware failure), the system on the eMMC may be booted instead of HAOS.
## eMMC
HAOS can be installed directly to the eMMC using a special boot image, to do that:
1. Download [`ODROID-M1S_EMMC2UMS.img`][1]
2. Use balenaEtcher or another tool to flash the UMS utility onto an SD card.
3. Plug-in that SD card to your ODROID-M1S and boot it. Connect your PC to the Micro USB OTG port.
4. The eMMC will show as a drive on your PC and you can directly flash the HAOS image with balenaEther.
Installing HAOS replaces the firmware and SPL on the eMMC with the mainline version provided by HAOS. As a result, it is not possible to use the SD card with the EMMC2UMS image anymore, because the mainline SPL is not compatible with U-Boot in the EMMC2UMS image at this time (February 2024). This does not pose any problem for standard use, just makes it more complicated in case you want to return to the Hardkernel-provided OS.
A reliable way of reflashing the eMMC in this case is to use HAOS booted from an SD card. To do that, insert the SD card with HAOS to the micro SD slot and plug the board in. Once the device boots to the HA CLI, enter `login` to enter the root shell and use `curl` to download an image and `dd` it to the eMMC block device:
```sh
curl https://dn.odroid.com/RK3566/ODROID-M1S/Installer/ODROID-M1S_EMMC2UMS.img | dd of=/dev/mmcblk0
```
This way the device will start in the UMS mode on the next boot with the SD card removed. Alternatively you can use the [Hardkernel installer image][2] directly instead of the EMMC2UMS image.
## NVMe
Booting directly from NVMe is not supported. The NVMe card can be used as a data disk.
## Technical notes on boot flow
The Home Assistant OS image is bootable by the SoC directly. Refer to the [boot sequence documentation][3] for the details on what part of the boot is executed from the eMMC and what from the SD card. The steps documented above should however cover all scenarios that a standard user may encounter during usage.
## Console
By default, console access is available on the serial header (UART) and on HDMI.
The serial console's baudrate is 1500000 by default.
The systemd startup messages will only appear on the serial console by default.
To show the messages on the HDMI console instead, add the console manually
to the `cmdline.txt` file on the boot partition (e.g. `console=tty0`).
## GPIO
Odroid-M1S introduces a new 14pin expansion header. Refer to [the ODROID wiki][4].
At this point not all functionality is supported by the upstream kernel used by Home Assistant OS.
Supported modules include:
- UPS
- Internal USB
- Mini IO board (partial support)
[1]: https://dn.odroid.com/RK3566/ODROID-M1S/Installer/ODROID-M1S_EMMC2UMS.img
[2]: https://wiki.odroid.com/odroid-m1s/getting_started/os_installation_guide#user_installer
[3]: https://wiki.odroid.com/odroid-m1s/board_support/boot_sequence
[4]: https://wiki.odroid.com/odroid-m1s/hardware/expansion_connectors

View File

@@ -4,10 +4,10 @@
| Device | Release Date | Support | Config |
|---------------------|---------------|-----------------|--------------------|
| Raspberry Pi B/B+/A+|2012/2014/2014 | not recommended | [rpi](../../../buildroot-external/configs/rpi_defconfig) |
| Raspberry Pi 2 B |2015 | not recommended | [rpi2](../../../buildroot-external/configs/rpi2_defconfig) |
| Raspberry Pi 3 B/B+ |2016/2018 | yes | [rpi3](../../../buildroot-external/configs/rpi3_defconfig) / [rpi3_64](../../../buildroot-external/configs/rpi3_64_defconfig) |
| Raspberry Pi 4 B |2019 | yes | [rpi4](../../../buildroot-external/configs/rpi4_defconfig) / [rpi4_64](../../../buildroot-external/configs/rpi4_64_defconfig) |
| Raspberry Pi 5 |2023 | yes (beta) | [rpi5_64](../../../buildroot-external/configs/rpi5_64_defconfig) |
## Serial console

View File

@@ -5,20 +5,22 @@ Default Kernel tree: 6.1
| Board | Version |
|-------|---------|
| Open Virtual Appliance | 6.1.60 |
| Raspberry Pi | 6.1.58 |
| Raspberry Pi 0-W | 6.1.58 |
| Raspberry Pi 2 | 6.1.58 |
| Raspberry Pi 3 | 6.1.58 |
| Raspberry Pi 4 | 6.1.58 |
| Home Assistant Yellow | 6.1.58 |
| Home Assistant Green | 6.1.60 |
| Tinker Board | 6.1.60 |
| ODROID-C2 | 6.1.60 |
| ODROID-C4 | 6.1.60 |
| ODROID-M1 | 6.1.60 |
| ODROID-N2 | 6.1.60 |
| ODROID-XU4 | 6.1.60 |
| Generic aarch64 | 6.1.60 |
| Generic x86-64 | 6.1.60 |
| Khadas VIM3 | 6.1.60 |
| Open Virtual Appliance | 6.6.29 |
| Raspberry Pi | 6.6.28 |
| Raspberry Pi 0-W | 6.6.28 |
| Raspberry Pi 2 | 6.6.28 |
| Raspberry Pi 3 | 6.6.28 |
| Raspberry Pi 4 | 6.6.28 |
| Raspberry Pi 5 | 6.6.28 |
| Home Assistant Yellow | 6.6.28 |
| Home Assistant Green | 6.6.29 |
| Tinker Board | 6.6.29 |
| ODROID-C2 | 6.6.29 |
| ODROID-C4 | 6.6.29 |
| ODROID-M1 | 6.6.29 |
| ODROID-M1S | 6.6.29 |
| ODROID-N2 | 6.6.29 |
| ODROID-XU4 | 6.6.29 |
| Generic aarch64 | 6.6.29 |
| Generic x86-64 | 6.6.29 |
| Khadas VIM3 | 6.6.29 |

View File

@@ -14,6 +14,7 @@ Home Assistant Operating System uses Docker as its container engine. By default
## Supported hardware
- Nabu Casa
- Raspberry Pi
- Hardkernel ODROID
- Asus Tinker Board

View File

@@ -1,17 +1,43 @@
CONFIG_EFI_STUB=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL is not set
CONFIG_CONNECTOR=y
CONFIG_VSOCKETS=y
CONFIG_VIRTIO=y
CONFIG_VIRTIO_PCI=y
CONFIG_VIRTIO_NET=y
CONFIG_VIRTIO_BALLOON=m
CONFIG_VIRTIO_MEM=m
CONFIG_VIRTIO_INPUT=m
CONFIG_VIRTIO_BLK=y
CONFIG_VIRTIO_BLK_SCSI=y
CONFIG_VIRTIO_CONSOLE=m
CONFIG_VIRTIO_VSOCKETS=m
CONFIG_VIRTIO_MMIO=y
CONFIG_SCSI_VIRTIO=y
CONFIG_HW_RANDOM_VIRTIO=y
CONFIG_HW_RANDOM_VIRTIO=m
CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES=y
CONFIG_VIRTIO_IOMMU=m
CONFIG_CRYPTO_ENGINE=m
CONFIG_CRYPTO_DEV_VIRTIO=m
# options for backward compatibility
CONFIG_ARMV8_DEPRECATED=y
CONFIG_SWP_EMULATION=y
CONFIG_CP15_BARRIER_EMULATION=y
CONFIG_SETEND_EMULATION=y
# These options are needed for virtio-fs
CONFIG_FUSE_FS=y
CONFIG_VIRTIO_FS=y
CONFIG_DAX=y
CONFIG_FS_DAX=y
CONFIG_ZONE_DEVICE=y
CONFIG_DMI_SYSFS=m
CONFIG_FW_CFG_SYSFS=m
CONFIG_NVME_CORE=y
CONFIG_BLK_DEV_NVME=y
@@ -19,7 +45,6 @@ CONFIG_NVME_HWMON=y
CONFIG_DRM_VIRTIO_GPU=m
CONFIG_HYPERVISOR_GUEST=y
CONFIG_HYPERV=y
CONFIG_HYPERV_UTILS=m
CONFIG_HYPERV_BALLOON=m

View File

@@ -19,8 +19,7 @@ function hassos_pre_image() {
# SPL
create_spl_image
dd if="${BINARIES_DIR}/idbloader.img" of="${SPL_IMG}" conv=notrunc bs=512 seek=64
dd if="${BINARIES_DIR}/u-boot-dtb.img" of="${SPL_IMG}" conv=notrunc bs=512 seek=8192
dd if="${BINARIES_DIR}/u-boot-rockchip.bin" of="${SPL_IMG}" conv=notrunc bs=512 seek=64
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,4 @@
From 3553f8a938dbb498aa1846a37ea343b7f53739da Mon Sep 17 00:00:00 2001
Message-Id: <3553f8a938dbb498aa1846a37ea343b7f53739da.1676488094.git.stefan@agner.ch>
From b4d676729c5bee4b9adb85362f6f2e32f833b6c2 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
@@ -7,13 +6,13 @@ Subject: [PATCH] Revert "ARM: dts: rockchip: use DMA channels for UARTs for
This reverts commit 3425fe335c29310f6628faf9a7947d07f32d8962.
---
arch/arm/boot/dts/rk3288.dtsi | 8 --------
arch/arm/boot/dts/rockchip/rk3288.dtsi | 8 --------
1 file changed, 8 deletions(-)
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
index 487b0e03d4b4..1569b1824c89 100644
--- a/arch/arm/boot/dts/rk3288.dtsi
+++ b/arch/arm/boot/dts/rk3288.dtsi
diff --git a/arch/arm/boot/dts/rockchip/rk3288.dtsi b/arch/arm/boot/dts/rockchip/rk3288.dtsi
index cb9cdaddffd4..51f1273d6beb 100644
--- a/arch/arm/boot/dts/rockchip/rk3288.dtsi
+++ b/arch/arm/boot/dts/rockchip/rk3288.dtsi
@@ -378,8 +378,6 @@ uart0: serial@ff180000 {
reg-io-width = <4>;
clocks = <&cru SCLK_UART0>, <&cru PCLK_UART0>;
@@ -50,6 +49,3 @@ index 487b0e03d4b4..1569b1824c89 100644
pinctrl-names = "default";
pinctrl-0 = <&uart4_xfer>;
status = "disabled";
--
2.39.1

View File

@@ -1,7 +1,4 @@
From 695638c05c0bb6f7bcc65e172dd132b3aa280b47 Mon Sep 17 00:00:00 2001
Message-Id: <695638c05c0bb6f7bcc65e172dd132b3aa280b47.1676488094.git.stefan@agner.ch>
In-Reply-To: <3553f8a938dbb498aa1846a37ea343b7f53739da.1676488094.git.stefan@agner.ch>
References: <3553f8a938dbb498aa1846a37ea343b7f53739da.1676488094.git.stefan@agner.ch>
From 02c7d9bb23f497993d52f5a41341ed955e6a2745 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
@@ -17,13 +14,13 @@ Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
[move change to rk3288-tinker.dtsi]
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
arch/arm/boot/dts/rk3288-tinker.dtsi | 19 +++++++++++++++++++
arch/arm/boot/dts/rockchip/rk3288-tinker.dtsi | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi
diff --git a/arch/arm/boot/dts/rockchip/rk3288-tinker.dtsi b/arch/arm/boot/dts/rockchip/rk3288-tinker.dtsi
index 09618bb7d872..30430d2e64b9 100644
--- a/arch/arm/boot/dts/rk3288-tinker.dtsi
+++ b/arch/arm/boot/dts/rk3288-tinker.dtsi
--- a/arch/arm/boot/dts/rockchip/rk3288-tinker.dtsi
+++ b/arch/arm/boot/dts/rockchip/rk3288-tinker.dtsi
@@ -483,6 +483,25 @@ &sdio0 {
status = "okay";
};
@@ -50,6 +47,3 @@ index 09618bb7d872..30430d2e64b9 100644
&tsadc {
rockchip,hw-tshut-mode = <1>; /* tshut mode 0:CRU 1:GPIO */
rockchip,hw-tshut-polarity = <1>; /* tshut polarity 0:LOW 1:HIGH */
--
2.39.1

View File

@@ -1,7 +1,4 @@
From d04122215cb56b57458e05b475e41744b8126533 Mon Sep 17 00:00:00 2001
Message-Id: <d04122215cb56b57458e05b475e41744b8126533.1676488094.git.stefan@agner.ch>
In-Reply-To: <3553f8a938dbb498aa1846a37ea343b7f53739da.1676488094.git.stefan@agner.ch>
References: <3553f8a938dbb498aa1846a37ea343b7f53739da.1676488094.git.stefan@agner.ch>
From bf7869033cf3caa50912cbdfa548428a6571c104 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
@@ -10,13 +7,13 @@ Enable I2C devices which are accessible via 40-pin header.
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
arch/arm/boot/dts/rk3288-tinker.dtsi | 8 ++++++++
arch/arm/boot/dts/rockchip/rk3288-tinker.dtsi | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi
diff --git a/arch/arm/boot/dts/rockchip/rk3288-tinker.dtsi b/arch/arm/boot/dts/rockchip/rk3288-tinker.dtsi
index 30430d2e64b9..395afc2b2283 100644
--- a/arch/arm/boot/dts/rk3288-tinker.dtsi
+++ b/arch/arm/boot/dts/rk3288-tinker.dtsi
--- 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 {
};
};
@@ -36,6 +33,3 @@ index 30430d2e64b9..395afc2b2283 100644
&i2c5 {
status = "okay";
};
--
2.39.1

View File

@@ -1,7 +1,4 @@
From 7d37754f29c379c5066c6abf38c8d01d654b1613 Mon Sep 17 00:00:00 2001
Message-Id: <7d37754f29c379c5066c6abf38c8d01d654b1613.1676488094.git.stefan@agner.ch>
In-Reply-To: <3553f8a938dbb498aa1846a37ea343b7f53739da.1676488094.git.stefan@agner.ch>
References: <3553f8a938dbb498aa1846a37ea343b7f53739da.1676488094.git.stefan@agner.ch>
From a0ef6a86e96920a9cf703d8c65d0126494037d37 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
@@ -13,13 +10,13 @@ This patch is taken from the patches provided by the ARMbian team.
Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
---
arch/arm/boot/dts/rk3288.dtsi | 2 +-
arch/arm/boot/dts/rockchip/rk3288.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
index 1569b1824c89..478fd1bb85df 100644
--- a/arch/arm/boot/dts/rk3288.dtsi
+++ b/arch/arm/boot/dts/rk3288.dtsi
diff --git a/arch/arm/boot/dts/rockchip/rk3288.dtsi b/arch/arm/boot/dts/rockchip/rk3288.dtsi
index 51f1273d6beb..d8663928bfe2 100644
--- a/arch/arm/boot/dts/rockchip/rk3288.dtsi
+++ b/arch/arm/boot/dts/rockchip/rk3288.dtsi
@@ -311,7 +311,7 @@ spi2: spi@ff130000 {
dma-names = "tx", "rx";
interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
@@ -29,6 +26,3 @@ index 1569b1824c89..478fd1bb85df 100644
reg = <0x0 0xff130000 0x0 0x1000>;
#address-cells = <1>;
#size-cells = <0>;
--
2.39.1

View File

@@ -1,7 +1,4 @@
From 05fde1d1dbbe7805a58a8c445b8fb19e0df59826 Mon Sep 17 00:00:00 2001
Message-Id: <05fde1d1dbbe7805a58a8c445b8fb19e0df59826.1676488094.git.stefan@agner.ch>
In-Reply-To: <3553f8a938dbb498aa1846a37ea343b7f53739da.1676488094.git.stefan@agner.ch>
References: <3553f8a938dbb498aa1846a37ea343b7f53739da.1676488094.git.stefan@agner.ch>
From e828e0fc2be98e5ad20c93981681505fc97b063b 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
@@ -10,13 +7,13 @@ Taken from the various patches provided by @TonyMac32 .
Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
---
arch/arm/boot/dts/rk3288-tinker.dtsi | 2 +-
arch/arm/boot/dts/rockchip/rk3288-tinker.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi
diff --git a/arch/arm/boot/dts/rockchip/rk3288-tinker.dtsi b/arch/arm/boot/dts/rockchip/rk3288-tinker.dtsi
index 395afc2b2283..c7e79e594720 100644
--- a/arch/arm/boot/dts/rk3288-tinker.dtsi
+++ b/arch/arm/boot/dts/rk3288-tinker.dtsi
--- 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 {
regulator-always-on;
regulator-boot-on;
@@ -26,6 +23,3 @@ index 395afc2b2283..c7e79e594720 100644
regulator-name = "vdd_arm";
regulator-ramp-delay = <6000>;
regulator-state-mem {
--
2.39.1

View File

@@ -1,7 +1,4 @@
From 940d61e1e04929166d5a2bcbc1934aa931952ca5 Mon Sep 17 00:00:00 2001
Message-Id: <940d61e1e04929166d5a2bcbc1934aa931952ca5.1676488094.git.stefan@agner.ch>
In-Reply-To: <3553f8a938dbb498aa1846a37ea343b7f53739da.1676488094.git.stefan@agner.ch>
References: <3553f8a938dbb498aa1846a37ea343b7f53739da.1676488094.git.stefan@agner.ch>
From ad1ffd6be5f54a0871e3c303602548687dfe0ffc 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
@@ -24,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 2a99f15f527f..181718374429 100644
index b07190ba4b7a..0badaa1b404e 100644
--- a/drivers/mmc/host/dw_mmc-rockchip.c
+++ b/drivers/mmc/host/dw_mmc-rockchip.c
@@ -12,6 +12,11 @@
@@ -114,6 +111,3 @@ index 2a99f15f527f..181718374429 100644
return 0;
}
--
2.39.1

View File

@@ -1,7 +1,4 @@
From 479e2acb95c09b15382b3766391294790ebd200b Mon Sep 17 00:00:00 2001
Message-Id: <479e2acb95c09b15382b3766391294790ebd200b.1676488094.git.stefan@agner.ch>
In-Reply-To: <3553f8a938dbb498aa1846a37ea343b7f53739da.1676488094.git.stefan@agner.ch>
References: <3553f8a938dbb498aa1846a37ea343b7f53739da.1676488094.git.stefan@agner.ch>
From 4e6c3d013c847f199664a3075934f5ca52d8cba4 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
@@ -11,13 +8,13 @@ for Realtek rtl8723bs Bluetooth device.
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
arch/arm/boot/dts/rk3288-tinker.dtsi | 26 ++++++++++++++++++++++++++
arch/arm/boot/dts/rockchip/rk3288-tinker.dtsi | 26 +++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi
diff --git a/arch/arm/boot/dts/rockchip/rk3288-tinker.dtsi b/arch/arm/boot/dts/rockchip/rk3288-tinker.dtsi
index c7e79e594720..5d261fae6e72 100644
--- a/arch/arm/boot/dts/rk3288-tinker.dtsi
+++ b/arch/arm/boot/dts/rk3288-tinker.dtsi
--- 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 {
};
};
@@ -58,6 +55,3 @@ index c7e79e594720..5d261fae6e72 100644
};
&uart1 {
--
2.39.1

View File

@@ -0,0 +1,32 @@
From f597ec583c262ed4c3264ddf661e22b503fb8a11 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
Converted to git-series patch from the original plain git diff file
buildroot-external/board/asus/tinker/patches/linux/3001_Tinkerboard-4.19-audio.patch
Co-authored-by: Pascal Vizeli <pascal.vizeli@syshack.ch>
---
sound/usb/card.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/sound/usb/card.c b/sound/usb/card.c
index 1b2edc0fd2e9..3069ac5b6759 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,
}
strim(card->shortname);
+
+ /* Tinker Board ALC4040 CODEC */
+
+ if(USB_ID_VENDOR(chip->usb_id) == 0x0bda &&
+ USB_ID_PRODUCT(chip->usb_id) == 0x481a) {
+ strlcat(card->shortname, " OnBoard", sizeof(card->shortname));
+ }
+
}
static void usb_audio_make_longname(struct usb_device *dev,

View File

@@ -1,19 +0,0 @@
diff --git a/sound/usb/card.c b/sound/usb/card.c
index 2bfe4e80a..cea93aaf5 100644
--- a/sound/usb/card.c
+++ b/sound/usb/card.c
@@ -382,6 +382,14 @@ static void usb_audio_make_shortname(struct usb_device *dev,
}
strim(card->shortname);
+
+ /* Tinker Board ALC4040 CODEC */
+
+ if(USB_ID_VENDOR(chip->usb_id) == 0x0bda &&
+ USB_ID_PRODUCT(chip->usb_id) == 0x481a) {
+ strlcat(card->shortname, " OnBoard", sizeof(card->shortname));
+ }
+
}
static void usb_audio_make_longname(struct usb_device *dev,

View File

@@ -1,37 +0,0 @@
From 966cd1782632bc8279667955ec315e93c89495e6 Mon Sep 17 00:00:00 2001
Message-Id: <966cd1782632bc8279667955ec315e93c89495e6.1645627366.git.stefan@agner.ch>
From: Pascal Vizeli <pvizeli@syshack.ch>
Date: Fri, 24 Apr 2020 12:41:50 +0000
Subject: [PATCH 1/2] SPL: modify load address of U-Boot
Default load address of U-Boot is at sector 16384, which is where HAOS
has its first partition. Use 0x2000 (8192) instead.
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
configs/tinker-rk3288_defconfig | 1 +
configs/tinker-s-rk3288_defconfig | 1 +
2 files changed, 2 insertions(+)
diff --git a/configs/tinker-rk3288_defconfig b/configs/tinker-rk3288_defconfig
index a9c9a122f6..b839fdb570 100644
--- a/configs/tinker-rk3288_defconfig
+++ b/configs/tinker-rk3288_defconfig
@@ -92,3 +92,4 @@ CONFIG_VIDEO_ROCKCHIP=y
CONFIG_DISPLAY_ROCKCHIP_HDMI=y
CONFIG_CMD_DHRYSTONE=y
CONFIG_ERRNO_STR=y
+CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x2000
diff --git a/configs/tinker-s-rk3288_defconfig b/configs/tinker-s-rk3288_defconfig
index f367c9370f..c52b0753ec 100644
--- a/configs/tinker-s-rk3288_defconfig
+++ b/configs/tinker-s-rk3288_defconfig
@@ -94,3 +94,4 @@ CONFIG_DISPLAY_ROCKCHIP_HDMI=y
CONFIG_CONSOLE_SCROLL_LINES=10
CONFIG_CMD_DHRYSTONE=y
CONFIG_ERRNO_STR=y
+CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x2000
--
2.35.1

View File

@@ -1,10 +1,7 @@
From 98674c65a6595e7ac554f7ec9d6f0228556756f6 Mon Sep 17 00:00:00 2001
Message-Id: <98674c65a6595e7ac554f7ec9d6f0228556756f6.1645627366.git.stefan@agner.ch>
In-Reply-To: <966cd1782632bc8279667955ec315e93c89495e6.1645627366.git.stefan@agner.ch>
References: <966cd1782632bc8279667955ec315e93c89495e6.1645627366.git.stefan@agner.ch>
From defc964eaa9f4ccc9cd1568ade4e4d81f35b9e07 Mon Sep 17 00:00:00 2001
From: Pascal Vizeli <pvizeli@syshack.ch>
Date: Fri, 24 Apr 2020 11:37:55 +0000
Subject: [PATCH 2/2] pmic: enable LDO2 vcc33_mipi at bootup
Subject: [PATCH] pmic: enable LDO2 vcc33_mipi at bootup
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
---
@@ -64,5 +61,5 @@ index f85209c649..6fa1bb0c66 100644
+}
+#endif
--
2.35.1
2.43.0

View File

@@ -1,3 +1,6 @@
# CONFIG_USB_STORAGE is not set
# CONFIG_DOS_PARTITION is not set
CONFIG_OF_LIBFDT_OVERLAY=y
CONFIG_SPL_PAD_TO=0x3f8000
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x2000
# CONFIG_ENV_IS_IN_MMC is not set

File diff suppressed because it is too large Load Diff

View File

@@ -14,8 +14,7 @@ function hassos_pre_image() {
# SPL
create_spl_image
dd if="${BINARIES_DIR}/idbloader.img" of="${SPL_IMG}" conv=notrunc bs=512 seek=64
dd if="${BINARIES_DIR}/u-boot.itb" of="${SPL_IMG}" conv=notrunc bs=512 seek=16384
dd if="${BINARIES_DIR}/u-boot-rockchip.bin" of="${SPL_IMG}" conv=notrunc bs=512 seek=64
}

View File

@@ -1,3 +1,4 @@
# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
CONFIG_THERMAL_GOV_BANG_BANG=y

View File

@@ -1,455 +0,0 @@
From d388735d551e09b00317a509859fca51776b9826 Mon Sep 17 00:00:00 2001
Message-ID: <d388735d551e09b00317a509859fca51776b9826.1688490481.git.stefan@agner.ch>
From: Dongjin Kim <tobetter@gmail.com>
Date: Fri, 30 Sep 2022 07:12:35 +0200
Subject: [PATCH] arm64: dts: rockchip: Add Hardkernel ODROID-M1 board
This patch is to add a device tree for new board Hardkernel ODROID-M1
based on Rockchip RK3568, includes basic peripherals -
uart/eMMC/uSD/i2c and on-board ethernet.
Signed-off-by: Dongjin Kim <tobetter@gmail.com>
[aurelien@aurel32.net: addressed issues from initial review]
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Tested-by: Dan Johansen <strit@manjaro.org>
Link: https://lore.kernel.org/r/20220930051246.391614-3-aurelien@aurel32.net
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
arch/arm64/boot/dts/rockchip/Makefile | 1 +
.../boot/dts/rockchip/rk3568-odroid-m1.dts | 414 ++++++++++++++++++
2 files changed, 415 insertions(+)
create mode 100644 arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile
index 8c15593c0ca4..5dc1607b3ecf 100644
--- a/arch/arm64/boot/dts/rockchip/Makefile
+++ b/arch/arm64/boot/dts/rockchip/Makefile
@@ -71,4 +71,5 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-roc-pc.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-soquartz-cm4.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-bpi-r2-pro.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-evb1-v10.dtb
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-odroid-m1.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-rock-3a.dtb
diff --git a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
new file mode 100644
index 000000000000..b3016437640b
--- /dev/null
+++ b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
@@ -0,0 +1,414 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2022 Hardkernel Co., Ltd.
+ *
+ */
+
+/dts-v1/;
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/leds/common.h>
+#include <dt-bindings/pinctrl/rockchip.h>
+#include "rk3568.dtsi"
+
+/ {
+ model = "Hardkernel ODROID-M1";
+ compatible = "rockchip,rk3568-odroid-m1", "rockchip,rk3568";
+
+ aliases {
+ ethernet0 = &gmac0;
+ i2c0 = &i2c3;
+ i2c3 = &i2c0;
+ mmc0 = &sdhci;
+ mmc1 = &sdmmc0;
+ serial0 = &uart1;
+ serial1 = &uart0;
+ };
+
+ chosen {
+ stdout-path = "serial2:1500000n8";
+ };
+
+ dc_12v: dc-12v-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "dc_12v";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <12000000>;
+ regulator-max-microvolt = <12000000>;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: led-0 {
+ gpios = <&gpio0 RK_PC6 GPIO_ACTIVE_HIGH>;
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_RED>;
+ default-state = "keep";
+ linux,default-trigger = "default-on";
+ pinctrl-names = "default";
+ pinctrl-0 = <&led_power_pin>;
+ };
+ led_work: led-1 {
+ gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>;
+ function = LED_FUNCTION_HEARTBEAT;
+ color = <LED_COLOR_ID_BLUE>;
+ linux,default-trigger = "heartbeat";
+ pinctrl-names = "default";
+ pinctrl-0 = <&led_work_pin>;
+ };
+ };
+
+ vcc3v3_sys: vcc3v3-sys-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc3v3_sys";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ vin-supply = <&dc_12v>;
+ };
+};
+
+&cpu0 {
+ cpu-supply = <&vdd_cpu>;
+};
+
+&cpu1 {
+ cpu-supply = <&vdd_cpu>;
+};
+
+&cpu2 {
+ cpu-supply = <&vdd_cpu>;
+};
+
+&cpu3 {
+ cpu-supply = <&vdd_cpu>;
+};
+
+&gmac0 {
+ assigned-clocks = <&cru SCLK_GMAC0_RX_TX>, <&cru SCLK_GMAC0>;
+ assigned-clock-parents = <&cru SCLK_GMAC0_RGMII_SPEED>;
+ assigned-clock-rates = <0>, <125000000>;
+ clock_in_out = "output";
+ phy-handle = <&rgmii_phy0>;
+ phy-mode = "rgmii";
+ phy-supply = <&vcc3v3_sys>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&gmac0_miim
+ &gmac0_tx_bus2
+ &gmac0_rx_bus2
+ &gmac0_rgmii_clk
+ &gmac0_rgmii_bus>;
+ status = "okay";
+
+ tx_delay = <0x4f>;
+ rx_delay = <0x2d>;
+};
+
+&i2c0 {
+ status = "okay";
+
+ vdd_cpu: regulator@1c {
+ compatible = "tcs,tcs4525";
+ reg = <0x1c>;
+ fcs,suspend-voltage-selector = <1>;
+ regulator-name = "vdd_cpu";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <800000>;
+ regulator-max-microvolt = <1150000>;
+ regulator-ramp-delay = <2300>;
+ vin-supply = <&vcc3v3_sys>;
+
+ 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>;
+ #clock-cells = <1>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pmic_int_l>;
+ rockchip,system-power-controller;
+ 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-name = "vdd_logic";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-init-microvolt = <900000>;
+ regulator-initial-mode = <0x2>;
+ regulator-min-microvolt = <500000>;
+ regulator-max-microvolt = <1350000>;
+ regulator-ramp-delay = <6001>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_gpu: DCDC_REG2 {
+ regulator-name = "vdd_gpu";
+ regulator-always-on;
+ regulator-init-microvolt = <900000>;
+ regulator-initial-mode = <0x2>;
+ regulator-min-microvolt = <500000>;
+ regulator-max-microvolt = <1350000>;
+ regulator-ramp-delay = <6001>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc_ddr: DCDC_REG3 {
+ regulator-name = "vcc_ddr";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-initial-mode = <0x2>;
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ };
+ };
+
+ vdd_npu: DCDC_REG4 {
+ regulator-name = "vdd_npu";
+ regulator-init-microvolt = <900000>;
+ regulator-initial-mode = <0x2>;
+ regulator-min-microvolt = <500000>;
+ regulator-max-microvolt = <1350000>;
+ regulator-ramp-delay = <6001>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc_1v8: DCDC_REG5 {
+ regulator-name = "vcc_1v8";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdda0v9_image: LDO_REG1 {
+ regulator-name = "vdda0v9_image";
+ regulator-always-on;
+ regulator-min-microvolt = <900000>;
+ regulator-max-microvolt = <900000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdda_0v9: LDO_REG2 {
+ regulator-name = "vdda_0v9";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <900000>;
+ regulator-max-microvolt = <900000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdda0v9_pmu: LDO_REG3 {
+ regulator-name = "vdda0v9_pmu";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <900000>;
+ regulator-max-microvolt = <900000>;
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <900000>;
+ };
+ };
+
+ vccio_acodec: LDO_REG4 {
+ regulator-name = "vccio_acodec";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vccio_sd: LDO_REG5 {
+ regulator-name = "vccio_sd";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc3v3_pmu: LDO_REG6 {
+ regulator-name = "vcc3v3_pmu";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <3300000>;
+ };
+ };
+
+ vcca_1v8: LDO_REG7 {
+ regulator-name = "vcca_1v8";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcca1v8_pmu: LDO_REG8 {
+ regulator-name = "vcca1v8_pmu";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <1800000>;
+ };
+ };
+
+ vcca1v8_image: LDO_REG9 {
+ regulator-name = "vcca1v8_image";
+ regulator-always-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc_3v3: SWITCH_REG1 {
+ regulator-name = "vcc_3v3";
+ regulator-always-on;
+ regulator-boot-on;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc3v3_sd: SWITCH_REG2 {
+ regulator-name = "vcc3v3_sd";
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+ };
+ };
+};
+
+&mdio0 {
+ rgmii_phy0: 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>;
+ };
+};
+
+&pinctrl {
+ leds {
+ led_power_pin: led-power-pin {
+ rockchip,pins = <0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ led_work_pin: led-work-pin {
+ rockchip,pins = <0 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
+ pmic {
+ pmic_int_l: pmic-int-l {
+ rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+ };
+};
+
+&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_1v8>;
+ vccio5-supply = <&vcc_3v3>;
+ vccio6-supply = <&vcc_3v3>;
+ vccio7-supply = <&vcc_3v3>;
+ status = "okay";
+};
+
+&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-sdr50;
+ vmmc-supply = <&vcc3v3_sd>;
+ vqmmc-supply = <&vccio_sd>;
+ status = "okay";
+};
+
+&uart2 {
+ status = "okay";
+};
--
2.41.0

View File

@@ -1,38 +0,0 @@
From 24048c1753916bd983746542b16d19d2b399eeb7 Mon Sep 17 00:00:00 2001
Message-ID: <24048c1753916bd983746542b16d19d2b399eeb7.1688490481.git.stefan@agner.ch>
In-Reply-To: <d388735d551e09b00317a509859fca51776b9826.1688490481.git.stefan@agner.ch>
References: <d388735d551e09b00317a509859fca51776b9826.1688490481.git.stefan@agner.ch>
From: Aurelien Jarno <aurelien@aurel32.net>
Date: Fri, 30 Sep 2022 07:12:36 +0200
Subject: [PATCH] arm64: dts: rockchip: add thermal support to ODROID-M1
Add the thermal nodes for the ODROID-M1.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Tested-by: Dan Johansen <strit@manjaro.org>
Link: https://lore.kernel.org/r/20220930051246.391614-4-aurelien@aurel32.net
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
index b3016437640b..112c65af3f55 100644
--- a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
@@ -409,6 +409,12 @@ &sdmmc0 {
status = "okay";
};
+&tsadc {
+ rockchip,hw-tshut-mode = <1>;
+ rockchip,hw-tshut-polarity = <0>;
+ status = "okay";
+};
+
&uart2 {
status = "okay";
};
--
2.41.0

View File

@@ -1,103 +0,0 @@
From 982bb2beab8e38a7c0a365770be2ad9c5221a650 Mon Sep 17 00:00:00 2001
Message-ID: <982bb2beab8e38a7c0a365770be2ad9c5221a650.1688490481.git.stefan@agner.ch>
In-Reply-To: <d388735d551e09b00317a509859fca51776b9826.1688490481.git.stefan@agner.ch>
References: <d388735d551e09b00317a509859fca51776b9826.1688490481.git.stefan@agner.ch>
From: Aurelien Jarno <aurelien@aurel32.net>
Date: Fri, 30 Sep 2022 07:12:37 +0200
Subject: [PATCH] arm64: dts: rockchip: Add NOR flash to ODROID-M1
Enable the Rockchip Serial Flash Controller for the ODROID-M1 and add
the corresponding SPI NOR flash entry. The SFC is used in dual I/O mode
and not quad I/O mode, as the FSPI_D2 pin is shared with the EMMC_RSTn
pin.
The partitions addresses and sizes are taken from the ODROID-M1
Partition Table page on the ODROID wiki.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Tested-by: Dan Johansen <strit@manjaro.org>
Link: https://lore.kernel.org/r/20220930051246.391614-5-aurelien@aurel32.net
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
.../boot/dts/rockchip/rk3568-odroid-m1.dts | 58 +++++++++++++++++++
1 file changed, 58 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
index 112c65af3f55..94e839c9afab 100644
--- a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
@@ -351,6 +351,20 @@ rgmii_phy0: ethernet-phy@0 {
};
&pinctrl {
+ fspi {
+ fspi_dual_io_pins: fspi-dual-io-pins {
+ rockchip,pins =
+ /* fspi_clk */
+ <1 RK_PD0 1 &pcfg_pull_none>,
+ /* fspi_cs0n */
+ <1 RK_PD3 1 &pcfg_pull_none>,
+ /* fspi_d0 */
+ <1 RK_PD1 1 &pcfg_pull_none>,
+ /* fspi_d1 */
+ <1 RK_PD2 1 &pcfg_pull_none>;
+ };
+ };
+
leds {
led_power_pin: led-power-pin {
rockchip,pins = <0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
@@ -409,6 +423,50 @@ &sdmmc0 {
status = "okay";
};
+&sfc {
+ /* Dual I/O mode as the D2 pin conflicts with the eMMC */
+ pinctrl-0 = <&fspi_dual_io_pins>;
+ pinctrl-names = "default";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <100000000>;
+ spi-rx-bus-width = <2>;
+ spi-tx-bus-width = <1>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "SPL";
+ reg = <0x0 0xe0000>;
+ };
+ partition@e0000 {
+ label = "U-Boot Env";
+ reg = <0xe0000 0x20000>;
+ };
+ partition@100000 {
+ label = "U-Boot";
+ reg = <0x100000 0x200000>;
+ };
+ partition@300000 {
+ label = "splash";
+ reg = <0x300000 0x100000>;
+ };
+ partition@400000 {
+ label = "Filesystem";
+ reg = <0x400000 0xc00000>;
+ };
+ };
+ };
+};
+
&tsadc {
rockchip,hw-tshut-mode = <1>;
rockchip,hw-tshut-polarity = <0>;
--
2.41.0

View File

@@ -1,102 +0,0 @@
From ae25f92a09abb7dd16a9ad3b74e0c105b385f214 Mon Sep 17 00:00:00 2001
Message-ID: <ae25f92a09abb7dd16a9ad3b74e0c105b385f214.1688490481.git.stefan@agner.ch>
In-Reply-To: <d388735d551e09b00317a509859fca51776b9826.1688490481.git.stefan@agner.ch>
References: <d388735d551e09b00317a509859fca51776b9826.1688490481.git.stefan@agner.ch>
From: Aurelien Jarno <aurelien@aurel32.net>
Date: Fri, 30 Sep 2022 07:12:38 +0200
Subject: [PATCH] arm64: dts: rockchip: Add analog audio on ODROID-M1
On the ODROID-M1, the I2S1 TDM controller is connected to the rk809
codec in I2S mode. It is used to provide a stereo headphones output and
a mono speaker output. A GPIO with an external pullup is used as an
headphone detection input.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Tested-by: Dan Johansen <strit@manjaro.org>
Link: https://lore.kernel.org/r/20220930051246.391614-6-aurelien@aurel32.net
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
.../boot/dts/rockchip/rk3568-odroid-m1.dts | 43 ++++++++++++++++++-
1 file changed, 42 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
index 94e839c9afab..634c1bd80b4e 100644
--- a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
@@ -59,6 +59,31 @@ led_work: led-1 {
};
};
+ rk809-sound {
+ compatible = "simple-audio-card";
+ pinctrl-names = "default";
+ pinctrl-0 = <&hp_det_pin>;
+ simple-audio-card,name = "Analog RK817";
+ simple-audio-card,format = "i2s";
+ simple-audio-card,hp-det-gpio = <&gpio0 RK_PB0 GPIO_ACTIVE_HIGH>;
+ simple-audio-card,mclk-fs = <256>;
+ simple-audio-card,widgets =
+ "Headphone", "Headphones",
+ "Speaker", "Speaker";
+ simple-audio-card,routing =
+ "Headphones", "HPOL",
+ "Headphones", "HPOR",
+ "Speaker", "SPKO";
+
+ simple-audio-card,cpu {
+ sound-dai = <&i2s1_8ch>;
+ };
+
+ simple-audio-card,codec {
+ sound-dai = <&rk809>;
+ };
+ };
+
vcc3v3_sys: vcc3v3-sys-regulator {
compatible = "regulator-fixed";
regulator-name = "vcc3v3_sys";
@@ -131,10 +156,15 @@ rk809: pmic@20 {
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_l>;
+ pinctrl-0 = <&pmic_int_l>, <&i2s1m0_mclk>;
rockchip,system-power-controller;
+ #sound-dai-cells = <0>;
vcc1-supply = <&vcc3v3_sys>;
vcc2-supply = <&vcc3v3_sys>;
vcc3-supply = <&vcc3v3_sys>;
@@ -340,6 +370,11 @@ regulator-state-mem {
};
};
+&i2s1_8ch {
+ rockchip,trcm-sync-tx-only;
+ status = "okay";
+};
+
&mdio0 {
rgmii_phy0: ethernet-phy@0 {
compatible = "ethernet-phy-ieee802.3-c22";
@@ -379,6 +414,12 @@ pmic_int_l: pmic-int-l {
rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
+
+ rk809 {
+ hp_det_pin: hp-det-pin {
+ rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
};
&pmu_io_domains {
--
2.41.0

View File

@@ -1,97 +0,0 @@
From 3a1be3d8719ef6335385d4e5e456371e7bf7383f Mon Sep 17 00:00:00 2001
Message-ID: <3a1be3d8719ef6335385d4e5e456371e7bf7383f.1688490481.git.stefan@agner.ch>
In-Reply-To: <d388735d551e09b00317a509859fca51776b9826.1688490481.git.stefan@agner.ch>
References: <d388735d551e09b00317a509859fca51776b9826.1688490481.git.stefan@agner.ch>
From: Aurelien Jarno <aurelien@aurel32.net>
Date: Fri, 30 Sep 2022 07:12:39 +0200
Subject: [PATCH] arm64: dts: rockchip: Enable vop2 and hdmi tx on ODROID-M1
Enable the RK356x Video Output Processor (VOP) 2 on ODROID M1.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Tested-by: Dan Johansen <strit@manjaro.org>
Link: https://lore.kernel.org/r/20220930051246.391614-7-aurelien@aurel32.net
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
.../boot/dts/rockchip/rk3568-odroid-m1.dts | 47 +++++++++++++++++++
1 file changed, 47 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
index 634c1bd80b4e..126b893048fe 100644
--- a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
@@ -8,6 +8,7 @@
#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 "rk3568.dtsi"
/ {
@@ -37,6 +38,17 @@ dc_12v: dc-12v-regulator {
regulator-max-microvolt = <12000000>;
};
+ hdmi-con {
+ compatible = "hdmi-connector";
+ type = "a";
+
+ port {
+ hdmi_con_in: endpoint {
+ remote-endpoint = <&hdmi_out_con>;
+ };
+ };
+ };
+
leds {
compatible = "gpio-leds";
@@ -131,6 +143,24 @@ &gmac0_rgmii_clk
rx_delay = <0x2d>;
};
+&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>;
+ };
+};
+
&i2c0 {
status = "okay";
@@ -517,3 +547,20 @@ &tsadc {
&uart2 {
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.41.0

View File

@@ -1,48 +0,0 @@
From ded87dc761951205b8b9ba8ee4081e28a850a3db Mon Sep 17 00:00:00 2001
Message-ID: <ded87dc761951205b8b9ba8ee4081e28a850a3db.1688490481.git.stefan@agner.ch>
In-Reply-To: <d388735d551e09b00317a509859fca51776b9826.1688490481.git.stefan@agner.ch>
References: <d388735d551e09b00317a509859fca51776b9826.1688490481.git.stefan@agner.ch>
From: Aurelien Jarno <aurelien@aurel32.net>
Date: Fri, 30 Sep 2022 07:12:40 +0200
Subject: [PATCH] arm64: dts: rockchip: Enable HDMI audio on ODROID-M1.
This enables the i2s0 controller and the hdmi-sound node on the
ODROID-M1.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Tested-by: Dan Johansen <strit@manjaro.org>
Link: https://lore.kernel.org/r/20220930051246.391614-8-aurelien@aurel32.net
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
index 126b893048fe..ac4e94d18feb 100644
--- a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
@@ -161,6 +161,10 @@ hdmi_out_con: endpoint {
};
};
+&hdmi_sound {
+ status = "okay";
+};
+
&i2c0 {
status = "okay";
@@ -400,6 +404,10 @@ regulator-state-mem {
};
};
+&i2s0_8ch {
+ status = "okay";
+};
+
&i2s1_8ch {
rockchip,trcm-sync-tx-only;
status = "okay";
--
2.41.0

View File

@@ -1,37 +0,0 @@
From 13438a717627cae086cc3a1126552cffa2f4bd16 Mon Sep 17 00:00:00 2001
Message-ID: <13438a717627cae086cc3a1126552cffa2f4bd16.1688490481.git.stefan@agner.ch>
In-Reply-To: <d388735d551e09b00317a509859fca51776b9826.1688490481.git.stefan@agner.ch>
References: <d388735d551e09b00317a509859fca51776b9826.1688490481.git.stefan@agner.ch>
From: Aurelien Jarno <aurelien@aurel32.net>
Date: Fri, 30 Sep 2022 07:12:41 +0200
Subject: [PATCH] arm64: dts: rockchip: Enable the GPU on ODROID-M1
Enable the GPU core on the Rockchip RK3568 ODROID-M1.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Tested-by: Dan Johansen <strit@manjaro.org>
Link: https://lore.kernel.org/r/20220930051246.391614-9-aurelien@aurel32.net
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
index ac4e94d18feb..e4b7699d3eea 100644
--- a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
@@ -143,6 +143,11 @@ &gmac0_rgmii_clk
rx_delay = <0x2d>;
};
+&gpu {
+ mali-supply = <&vdd_gpu>;
+ status = "okay";
+};
+
&hdmi {
avdd-0v9-supply = <&vdda0v9_image>;
avdd-1v8-supply = <&vcca1v8_image>;
--
2.41.0

View File

@@ -1,111 +0,0 @@
From 0f0a85a289b4d0fbd5c39eb5ddbb681a37ad490c Mon Sep 17 00:00:00 2001
Message-ID: <0f0a85a289b4d0fbd5c39eb5ddbb681a37ad490c.1688490481.git.stefan@agner.ch>
In-Reply-To: <d388735d551e09b00317a509859fca51776b9826.1688490481.git.stefan@agner.ch>
References: <d388735d551e09b00317a509859fca51776b9826.1688490481.git.stefan@agner.ch>
From: Aurelien Jarno <aurelien@aurel32.net>
Date: Fri, 30 Sep 2022 07:12:42 +0200
Subject: [PATCH] arm64: dts: rockchip: Enable the USB 2.0 ports on ODROID-M1
The Rockchip RK3568 has two USB OHCI/EHCI controllers connected to a PHY
providing one host-only port and one OTG port. On the ODROID-M1, they
are both used in host mode. The USB ports are powered by a DC/DC
converter providing 5V and named VCC5V0_SYS on the schematics, followed
by a power switch.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Tested-by: Dan Johansen <strit@manjaro.org>
Link: https://lore.kernel.org/r/20220930051246.391614-10-aurelien@aurel32.net
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
.../boot/dts/rockchip/rk3568-odroid-m1.dts | 61 +++++++++++++++++++
1 file changed, 61 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
index e4b7699d3eea..2e4cc20bd676 100644
--- a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
@@ -105,6 +105,28 @@ vcc3v3_sys: vcc3v3-sys-regulator {
regulator-max-microvolt = <3300000>;
vin-supply = <&dc_12v>;
};
+
+ vcc5v0_sys: vcc5v0-sys-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc5v0_sys";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&dc_12v>;
+ };
+
+ vcc5v0_usb_host: vcc5v0-usb-host-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc5v0_usb_host";
+ enable-active-high;
+ gpio = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&vcc5v0_usb_host_en_pin>;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&vcc5v0_sys>;
+ };
};
&cpu0 {
@@ -463,6 +485,15 @@ hp_det_pin: hp-det-pin {
rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
+
+ usb {
+ vcc5v0_usb_host_en_pin: vcc5v0-usb-host-en-pin {
+ rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ vcc5v0_usb_otg_en_pin: vcc5v0-usb-otg-en-pin {
+ rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
};
&pmu_io_domains {
@@ -561,6 +592,36 @@ &uart2 {
status = "okay";
};
+&usb_host0_ehci {
+ status = "okay";
+};
+
+&usb_host0_ohci {
+ status = "okay";
+};
+
+&usb_host1_ehci {
+ status = "okay";
+};
+
+&usb_host1_ohci {
+ status = "okay";
+};
+
+&usb2phy1 {
+ status = "okay";
+};
+
+&usb2phy1_host {
+ phy-supply = <&vcc5v0_usb_host>;
+ status = "okay";
+};
+
+&usb2phy1_otg {
+ phy-supply = <&vcc5v0_usb_host>;
+ status = "okay";
+};
+
&vop {
assigned-clocks = <&cru DCLK_VOP0>, <&cru DCLK_VOP1>;
assigned-clock-parents = <&pmucru PLL_HPLL>, <&cru PLL_VPLL>;
--
2.41.0

View File

@@ -1,114 +0,0 @@
From d8abc451c669a8fd36b31db5cb96ec49da819124 Mon Sep 17 00:00:00 2001
Message-ID: <d8abc451c669a8fd36b31db5cb96ec49da819124.1688490481.git.stefan@agner.ch>
In-Reply-To: <d388735d551e09b00317a509859fca51776b9826.1688490481.git.stefan@agner.ch>
References: <d388735d551e09b00317a509859fca51776b9826.1688490481.git.stefan@agner.ch>
From: Aurelien Jarno <aurelien@aurel32.net>
Date: Fri, 30 Sep 2022 07:12:43 +0200
Subject: [PATCH] arm64: dts: rockchip: Enable the USB 3.0 ports on ODROID-M1
The Rockchip RK3568 has two USB XHCI controllers. The USB 2.0 signals
are connected to a PHY providing one host-only port and one OTG port.
The USB 3.0 signals are connected to two USB3.0/PCIE/SATA combo PHY.
The ODROID M1 has 2 type A USB 3.0 connectors, with the USB 3.0 signals
connected to the two combo PHYs. For the USB 2.0 signals, one connector
is connected to the host-only PHY and uses the same power switch as the
USB 2.0 ports. The other connector has its own power switch and is
connected to the OTG PHY, which is also connected to a device only
micro-USB connector. The purpose of this micro-USB connector is for
firmware update using the Rockusb vendor specific USB class. Therefore
it does not make sense to enable this port on Linux, and the PHY is
forced to host mode.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Tested-by: Dan Johansen <strit@manjaro.org>
Link: https://lore.kernel.org/r/20220930051246.391614-11-aurelien@aurel32.net
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
.../boot/dts/rockchip/rk3568-odroid-m1.dts | 49 ++++++++++++++++++-
1 file changed, 48 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
index 2e4cc20bd676..9a84a7e76d7a 100644
--- a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
@@ -127,6 +127,30 @@ vcc5v0_usb_host: vcc5v0-usb-host-regulator {
regulator-max-microvolt = <5000000>;
vin-supply = <&vcc5v0_sys>;
};
+
+ vcc5v0_usb_otg: vcc5v0-usb-otg-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc5v0_usb_otg";
+ enable-active-high;
+ gpio = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&vcc5v0_usb_otg_en_pin>;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&vcc5v0_sys>;
+ };
+};
+
+&combphy0 {
+ /* Used for USB3 */
+ phy-supply = <&vcc5v0_usb_host>;
+ status = "okay";
+};
+
+&combphy1 {
+ /* Used for USB3 */
+ phy-supply = <&vcc5v0_usb_otg>;
+ status = "okay";
};
&cpu0 {
@@ -490,7 +514,7 @@ usb {
vcc5v0_usb_host_en_pin: vcc5v0-usb-host-en-pin {
rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
};
- vcc5v0_usb_otg_en_pin: vcc5v0-usb-otg-en-pin {
+ vcc5v0_usb_otg_en_pin: vcc5v0-usb-dr-en-pin {
rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
@@ -600,6 +624,11 @@ &usb_host0_ohci {
status = "okay";
};
+&usb_host0_xhci {
+ dr_mode = "host";
+ status = "okay";
+};
+
&usb_host1_ehci {
status = "okay";
};
@@ -608,6 +637,24 @@ &usb_host1_ohci {
status = "okay";
};
+&usb_host1_xhci {
+ status = "okay";
+};
+
+&usb2phy0 {
+ status = "okay";
+};
+
+&usb2phy0_host {
+ phy-supply = <&vcc5v0_usb_host>;
+ status = "okay";
+};
+
+&usb2phy0_otg {
+ phy-supply = <&vcc5v0_usb_otg>;
+ status = "okay";
+};
+
&usb2phy1 {
status = "okay";
};
--
2.41.0

View File

@@ -1,48 +0,0 @@
From 2f6d4521403932ca22cb4dabef9033f1d52232ba Mon Sep 17 00:00:00 2001
Message-ID: <2f6d4521403932ca22cb4dabef9033f1d52232ba.1688490481.git.stefan@agner.ch>
In-Reply-To: <d388735d551e09b00317a509859fca51776b9826.1688490481.git.stefan@agner.ch>
References: <d388735d551e09b00317a509859fca51776b9826.1688490481.git.stefan@agner.ch>
From: Aurelien Jarno <aurelien@aurel32.net>
Date: Fri, 30 Sep 2022 07:12:44 +0200
Subject: [PATCH] arm64: dts: rockchip: Add SATA support to ODROID-M1
Enable the Combo PHY and SATA nodes in ODROID-M1.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Tested-by: Dan Johansen <strit@manjaro.org>
Link: https://lore.kernel.org/r/20220930051246.391614-12-aurelien@aurel32.net
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
index 9a84a7e76d7a..bd24ccf94e76 100644
--- a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
@@ -153,6 +153,11 @@ &combphy1 {
status = "okay";
};
+&combphy2 {
+ /* used for SATA */
+ status = "okay";
+};
+
&cpu0 {
cpu-supply = <&vdd_cpu>;
};
@@ -538,6 +543,10 @@ &saradc {
status = "okay";
};
+&sata2 {
+ status = "okay";
+};
+
&sdhci {
bus-width = <8>;
max-frequency = <200000000>;
--
2.41.0

View File

@@ -1,80 +0,0 @@
From 1572a9c5d9fa9f654fbc1909528ae5940ad34aa3 Mon Sep 17 00:00:00 2001
Message-ID: <1572a9c5d9fa9f654fbc1909528ae5940ad34aa3.1688490481.git.stefan@agner.ch>
In-Reply-To: <d388735d551e09b00317a509859fca51776b9826.1688490481.git.stefan@agner.ch>
References: <d388735d551e09b00317a509859fca51776b9826.1688490481.git.stefan@agner.ch>
From: Aurelien Jarno <aurelien@aurel32.net>
Date: Fri, 30 Sep 2022 07:12:45 +0200
Subject: [PATCH] arm64: dts: rockchip: Add PCIEe v3 nodes to ODROID-M1
Add nodes to ODROID-M1 to support PCIe v3 on the M2 slot.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Tested-by: Dan Johansen <strit@manjaro.org>
Link: https://lore.kernel.org/r/20220930051246.391614-13-aurelien@aurel32.net
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
.../boot/dts/rockchip/rk3568-odroid-m1.dts | 34 +++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
index bd24ccf94e76..2f685c606bb9 100644
--- a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
@@ -96,6 +96,19 @@ simple-audio-card,codec {
};
};
+ vcc3v3_pcie: vcc3v3-pcie-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc3v3_pcie";
+ enable-active-high;
+ gpio = <&gpio4 RK_PA7 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&vcc3v3_pcie_en_pin>;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ startup-delay-us = <5000>;
+ vin-supply = <&vcc3v3_sys>;
+ };
+
vcc3v3_sys: vcc3v3-sys-regulator {
compatible = "regulator-fixed";
regulator-name = "vcc3v3_sys";
@@ -479,6 +492,18 @@ rgmii_phy0: ethernet-phy@0 {
};
};
+&pcie30phy {
+ status = "okay";
+};
+
+&pcie3x2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pcie_reset_pin>;
+ reset-gpios = <&gpio2 RK_PD6 GPIO_ACTIVE_HIGH>;
+ vpcie3v3-supply = <&vcc3v3_pcie>;
+ status = "okay";
+};
+
&pinctrl {
fspi {
fspi_dual_io_pins: fspi-dual-io-pins {
@@ -503,6 +528,15 @@ led_work_pin: led-work-pin {
};
};
+ pcie {
+ pcie_reset_pin: pcie-reset-pin {
+ rockchip,pins = <2 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ vcc3v3_pcie_en_pin: vcc3v3-pcie-en-pin {
+ rockchip,pins = <4 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
pmic {
pmic_int_l: pmic-int-l {
rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
--
2.41.0

View File

@@ -1,54 +0,0 @@
From b2eae73eeb32dd9383571de6af18fc8bd39aac3a Mon Sep 17 00:00:00 2001
Message-ID: <b2eae73eeb32dd9383571de6af18fc8bd39aac3a.1688490481.git.stefan@agner.ch>
In-Reply-To: <d388735d551e09b00317a509859fca51776b9826.1688490481.git.stefan@agner.ch>
References: <d388735d551e09b00317a509859fca51776b9826.1688490481.git.stefan@agner.ch>
From: Aurelien Jarno <aurelien@aurel32.net>
Date: Fri, 30 Sep 2022 07:12:46 +0200
Subject: [PATCH] arm64: dts: rockchip: Add IR receiver node to ODROID-M1
Add the infrared receiver and its associated pinctrl entry. Note that
there is an external pullup to VCC3V3_SYS.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Tested-by: Dan Johansen <strit@manjaro.org>
Link: https://lore.kernel.org/r/20220930051246.391614-14-aurelien@aurel32.net
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
index 2f685c606bb9..59ecf868dbd0 100644
--- a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
@@ -49,6 +49,13 @@ hdmi_con_in: endpoint {
};
};
+ ir-receiver {
+ compatible = "gpio-ir-receiver";
+ gpios = <&gpio0 RK_PC2 GPIO_ACTIVE_LOW>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&ir_receiver_pin>;
+ };
+
leds {
compatible = "gpio-leds";
@@ -519,6 +526,13 @@ fspi_dual_io_pins: fspi-dual-io-pins {
};
};
+ ir-receiver {
+ ir_receiver_pin: ir-receiver-pin {
+ /* external pullup to VCC3V3_SYS */
+ rockchip,pins = <0 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
leds {
led_power_pin: led-power-pin {
rockchip,pins = <0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
--
2.41.0

View File

@@ -1,48 +0,0 @@
From acadbae38f91965f204d6a5d49eb8b578970b818 Mon Sep 17 00:00:00 2001
Message-ID: <acadbae38f91965f204d6a5d49eb8b578970b818.1689147150.git.stefan@agner.ch>
From: Jonas Karlman <jonas@kwiboo.se>
Date: Sun, 2 Jul 2023 20:47:17 +0000
Subject: [PATCH] ata: dwc_ahci: Fix support for other platforms
The dwc_ahci driver use platform specific defines, place the platform
specific code behind a ifdef CONFIG_ARCH_OMAP2PLUS to allow build and
use of the driver on Rockchip platform.
Fixes: 02a4b4297901 ("drivers: block: dwc_ahci: Implement a driver for Synopsys DWC sata device")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
---
drivers/ata/dwc_ahci.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/ata/dwc_ahci.c b/drivers/ata/dwc_ahci.c
index 826fea71cc..1dc91e7fce 100644
--- a/drivers/ata/dwc_ahci.c
+++ b/drivers/ata/dwc_ahci.c
@@ -13,7 +13,9 @@
#include <ahci.h>
#include <scsi.h>
#include <sata.h>
+#ifdef CONFIG_ARCH_OMAP2PLUS
#include <asm/arch/sata.h>
+#endif
#include <asm/io.h>
#include <generic-phy.h>
@@ -72,12 +74,14 @@ static int dwc_ahci_probe(struct udevice *dev)
return ret;
}
+#ifdef CONFIG_ARCH_OMAP2PLUS
if (priv->wrapper_base) {
u32 val = TI_SATA_IDLE_NO | TI_SATA_STANDBY_NO;
/* Enable SATA module, No Idle, No Standby */
writel(val, priv->wrapper_base + TI_SATA_SYSCONFIG);
}
+#endif
return ahci_probe_scsi(dev, (ulong)priv->base);
}
--
2.41.0

View File

@@ -1,5 +1,2 @@
CONFIG_DOS_PARTITION=y
# CONFIG_EFI_PARTITION is not set
# CONFIG_USB_STORAGE is not set
CONFIG_DISPLAY_BOARDINFO=y
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
# CONFIG_DWC_ETH_QOS is not set
# CONFIG_DWC_ETH_QOS_ROCKCHIP is not set

View File

@@ -0,0 +1,24 @@
#!/bin/bash
# shellcheck disable=SC2155
function hassos_pre_image() {
local BOOT_DATA="$(path_boot_dir)"
local SPL_IMG="$(path_spl_img)"
cp "${BINARIES_DIR}/boot.scr" "${BOOT_DATA}/boot.scr"
cp "${BINARIES_DIR}"/*.dtb "${BOOT_DATA}/"
cp "${BOARD_DIR}/boot-env.txt" "${BOOT_DATA}/haos-config.txt"
cp "${BOARD_DIR}/cmdline.txt" "${BOOT_DATA}/cmdline.txt"
# SPL
create_spl_image
dd if="${BINARIES_DIR}/u-boot-rockchip.bin" of="${SPL_IMG}" conv=notrunc bs=512 seek=64
}
function hassos_post_image() {
convert_disk_image_xz
}

View File

@@ -0,0 +1,12 @@
# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
CONFIG_THERMAL_GOV_BANG_BANG=y
CONFIG_SENSORS_GPIO_FAN=y
CONFIG_KEYBOARD_GPIO=y
CONFIG_KEYBOARD_GPIO_POLLED=y
CONFIG_MMC_SDHCI_OF_DWCMSHC=y
# CONFIG_DW_WATCHDOG is not set

View File

@@ -0,0 +1,12 @@
BOARD_ID=odroid-m1s
BOARD_NAME="Hardkernel ODROID-M1S"
CHASSIS=embedded
BOOTLOADER=uboot
KERNEL_FILE=Image
BOOT_SYS=gpt
BOOT_SIZE=16M
BOOT_SPL=true
BOOT_SPL_SIZE=16M
BOOT_ENV_SIZE=0x8000
SUPERVISOR_MACHINE=odroid-m1
SUPERVISOR_ARCH=aarch64

View File

@@ -0,0 +1,896 @@
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

@@ -0,0 +1,335 @@
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

@@ -0,0 +1,43 @@
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

@@ -0,0 +1,51 @@
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,73 +1,59 @@
From e52e7ff196b942c8bf8bee9e74d4f24619934a1b Mon Sep 17 00:00:00 2001
Message-ID: <e52e7ff196b942c8bf8bee9e74d4f24619934a1b.1689147150.git.stefan@agner.ch>
In-Reply-To: <acadbae38f91965f204d6a5d49eb8b578970b818.1689147150.git.stefan@agner.ch>
References: <acadbae38f91965f204d6a5d49eb8b578970b818.1689147150.git.stefan@agner.ch>
From: Jonas Karlman <jonas@kwiboo.se>
Date: Sun, 2 Jul 2023 20:47:19 +0000
Subject: [PATCH] board: rockchip: Add Hardkernel ODROID-M1
From f7bc9a62a5ff7e8b95d902103b12c6ace208d11a Mon Sep 17 00:00:00 2001
From: Dongjin Kim <tobetter@gmail.com>
Date: Thu, 25 Jan 2024 16:02:51 +0900
Subject: [PATCH] board: rockchip: Add Hardkernel ODROID-M1S
Hardkernel ODROID-M1 is a single board computer with a RK3568B2 SoC,
a slightly modified version of the RK3568 SoC.
Hardkernel ODROID-M1S is a single board computer with a RK3566 SoC,
a slightly modified version of the RK3566 SoC.
Features tested on a ODROID-M1 8GB v1.0 2022-06-13:
Features tested on a ODROID-M1S 8GB v1.0 2023-08-10:
- SD-card boot
- eMMC boot
- SPI Flash boot
- PCIe/NVMe/AHCI
- SATA port
- USB host
- PCIe/NVMe
Device tree is imported from linux v6.4.
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Dongjin Kim <tobetter@gmail.com>
Message ID: 20240125070252.2057679-1-tobetter@gmail.com
---
arch/arm/dts/Makefile | 1 +
arch/arm/dts/rk3568-odroid-m1-u-boot.dtsi | 46 ++
arch/arm/dts/rk3568-odroid-m1.dts | 744 ++++++++++++++++++++++
board/rockchip/evb_rk3568/MAINTAINERS | 7 +
configs/odroid-m1-rk3568_defconfig | 103 +++
arch/arm/dts/rk3566-odroid-m1s-u-boot.dtsi | 28 +
arch/arm/dts/rk3566-odroid-m1s.dts | 665 +++++++++++++++++++++
arch/arm/mach-rockchip/rk3568/Kconfig | 6 +
board/hardkernel/odroid_m1s/Kconfig | 15 +
board/hardkernel/odroid_m1s/MAINTAINERS | 9 +
board/hardkernel/odroid_m1s/Makefile | 7 +
board/hardkernel/odroid_m1s/board.c | 81 +++
configs/odroid-m1s-rk3566_defconfig | 109 ++++
doc/board/rockchip/rockchip.rst | 1 +
6 files changed, 902 insertions(+)
create mode 100644 arch/arm/dts/rk3568-odroid-m1-u-boot.dtsi
create mode 100644 arch/arm/dts/rk3568-odroid-m1.dts
create mode 100644 configs/odroid-m1-rk3568_defconfig
include/configs/odroid_m1s.h | 12 +
10 files changed, 933 insertions(+)
create mode 100644 arch/arm/dts/rk3566-odroid-m1s-u-boot.dtsi
create mode 100644 arch/arm/dts/rk3566-odroid-m1s.dts
create mode 100644 board/hardkernel/odroid_m1s/Kconfig
create mode 100644 board/hardkernel/odroid_m1s/MAINTAINERS
create mode 100644 board/hardkernel/odroid_m1s/Makefile
create mode 100644 board/hardkernel/odroid_m1s/board.c
create mode 100644 configs/odroid-m1s-rk3566_defconfig
create mode 100644 include/configs/odroid_m1s.h
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 480269fa60..334c1bafda 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -169,6 +169,7 @@ dtb-$(CONFIG_ROCKCHIP_RK3568) += \
rk3566-anbernic-rgxx3.dtb \
rk3566-radxa-cm3-io.dtb \
rk3568-evb.dtb \
+ rk3568-odroid-m1.dtb \
rk3568-rock-3a.dtb
dtb-$(CONFIG_ROCKCHIP_RK3588) += \
diff --git a/arch/arm/dts/rk3568-odroid-m1-u-boot.dtsi b/arch/arm/dts/rk3568-odroid-m1-u-boot.dtsi
diff --git a/arch/arm/dts/rk3566-odroid-m1s-u-boot.dtsi b/arch/arm/dts/rk3566-odroid-m1s-u-boot.dtsi
new file mode 100644
index 0000000000..dc8ad98715
index 0000000000..33a1d142b8
--- /dev/null
+++ b/arch/arm/dts/rk3568-odroid-m1-u-boot.dtsi
@@ -0,0 +1,46 @@
+// SPDX-License-Identifier: GPL-2.0+
+++ b/arch/arm/dts/rk3566-odroid-m1s-u-boot.dtsi
@@ -0,0 +1,28 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+
+#include "rk356x-u-boot.dtsi"
+
+/ {
+ aliases {
+ spi0 = &sfc;
+ };
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/leds/common.h>
+
+/ {
+ chosen {
+ stdout-path = &uart2;
+ u-boot,spl-boot-order = &sdmmc0, &sdhci;
+ };
+};
+
+&fspi_dual_io_pins {
+ bootph-all;
+};
+
+&sdhci {
+ cap-mmc-highspeed;
+ mmc-ddr-1_8v;
@@ -77,34 +63,20 @@ index 0000000000..dc8ad98715
+ pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd &emmc_datastrobe>;
+};
+
+&sfc {
+ bootph-pre-ram;
+ u-boot,spl-sfc-no-dma;
+
+ flash@0 {
+ bootph-pre-ram;
+ };
+};
+
+&uart2 {
+ bootph-all;
+ clock-frequency = <24000000>;
+ status = "okay";
+};
+
+&vcc5v0_usb_host {
+ /* Workaround until regulator implement basic reference counter */
+ regulator-always-on;
+};
diff --git a/arch/arm/dts/rk3568-odroid-m1.dts b/arch/arm/dts/rk3568-odroid-m1.dts
diff --git a/arch/arm/dts/rk3566-odroid-m1s.dts b/arch/arm/dts/rk3566-odroid-m1s.dts
new file mode 100644
index 0000000000..59ecf868db
index 0000000000..73e29d80c7
--- /dev/null
+++ b/arch/arm/dts/rk3568-odroid-m1.dts
@@ -0,0 +1,744 @@
+++ b/arch/arm/dts/rk3566-odroid-m1s.dts
@@ -0,0 +1,665 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2022 Hardkernel Co., Ltd.
+ * Copyright (c) 2024 Hardkernel Co., Ltd.
+ *
+ */
+
@@ -113,14 +85,14 @@ index 0000000000..59ecf868db
+#include <dt-bindings/leds/common.h>
+#include <dt-bindings/pinctrl/rockchip.h>
+#include <dt-bindings/soc/rockchip,vop2.h>
+#include "rk3568.dtsi"
+#include "rk3566.dtsi"
+
+/ {
+ model = "Hardkernel ODROID-M1";
+ compatible = "rockchip,rk3568-odroid-m1", "rockchip,rk3568";
+ model = "Hardkernel ODROID-M1S";
+ compatible = "hardkernel,rk3568-odroid-m1s", "rockchip,rk3568";
+
+ aliases {
+ ethernet0 = &gmac0;
+ ethernet0 = &gmac1;
+ i2c0 = &i2c3;
+ i2c3 = &i2c0;
+ mmc0 = &sdhci;
@@ -133,13 +105,11 @@ index 0000000000..59ecf868db
+ stdout-path = "serial2:1500000n8";
+ };
+
+ dc_12v: dc-12v-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "dc_12v";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <12000000>;
+ regulator-max-microvolt = <12000000>;
+ gmac1_clkin: external-gmac1-clock {
+ compatible = "fixed-clock";
+ clock-frequency = <125000000>;
+ clock-output-names = "gmac1_clkin";
+ #clock-cells = <0>;
+ };
+
+ hdmi-con {
@@ -153,13 +123,6 @@ index 0000000000..59ecf868db
+ };
+ };
+
+ ir-receiver {
+ compatible = "gpio-ir-receiver";
+ gpios = <&gpio0 RK_PC2 GPIO_ACTIVE_LOW>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&ir_receiver_pin>;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
@@ -182,13 +145,21 @@ index 0000000000..59ecf868db
+ };
+ };
+
+ pcie20_3v3: pcie20-3v3-regulator {
+ compatible = "regulator-fixed";
+ enable-active-high;
+ gpios = <&gpio2 RK_PC2 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&vcc3v3_pcie20_en_pin>;
+ regulator-name = "pcie20_3v3";
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ rk809-sound {
+ compatible = "simple-audio-card";
+ pinctrl-names = "default";
+ pinctrl-0 = <&hp_det_pin>;
+ simple-audio-card,name = "Analog RK817";
+ simple-audio-card,format = "i2s";
+ simple-audio-card,hp-det-gpio = <&gpio0 RK_PB0 GPIO_ACTIVE_HIGH>;
+ simple-audio-card,mclk-fs = <256>;
+ simple-audio-card,widgets =
+ "Headphone", "Headphones",
@@ -207,17 +178,23 @@ index 0000000000..59ecf868db
+ };
+ };
+
+ vcc3v3_pcie: vcc3v3-pcie-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc3v3_pcie";
+ enable-active-high;
+ gpio = <&gpio4 RK_PA7 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&vcc3v3_pcie_en_pin>;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ startup-delay-us = <5000>;
+ vin-supply = <&vcc3v3_sys>;
+ 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-regulator {
@@ -227,7 +204,7 @@ index 0000000000..59ecf868db
+ regulator-boot-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ vin-supply = <&dc_12v>;
+ vin-supply = <&vcc5v0_sys>;
+ };
+
+ vcc5v0_sys: vcc5v0-sys-regulator {
@@ -237,48 +214,49 @@ index 0000000000..59ecf868db
+ regulator-boot-on;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&dc_12v>;
+ vin-supply = <&vcc5v_dcin>;
+ };
+
+ vcc5v_dcin: vcc5v0-dcin {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc-5v0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ };
+
+ vcc5v0_usb_host: vcc5v0-usb-host-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc5v0_usb_host";
+ enable-active-high;
+ gpio = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ gpio = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>;
+ pinctrl-0 = <&vcc5v0_usb_host_en_pin>;
+ regulator-min-microvolt = <5000000>;
+ pinctrl-names = "default";
+ regulator-max-microvolt = <5000000>;
+ regulator-min-microvolt = <5000000>;
+ regulator-name = "vcc5v0_usb_host";
+ vin-supply = <&vcc5v0_sys>;
+ };
+
+ vcc5v0_usb_otg: vcc5v0-usb-otg-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc5v0_usb_otg";
+ enable-active-high;
+ gpio = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ gpio = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
+ pinctrl-0 = <&vcc5v0_usb_otg_en_pin>;
+ regulator-min-microvolt = <5000000>;
+ pinctrl-names = "default";
+ regulator-max-microvolt = <5000000>;
+ regulator-min-microvolt = <5000000>;
+ regulator-name = "vcc5v0_usb_otg";
+ vin-supply = <&vcc5v0_sys>;
+ };
+};
+
+&combphy0 {
+ /* Used for USB3 */
+&combphy1 {
+ phy-supply = <&vcc5v0_usb_host>;
+ status = "okay";
+};
+
+&combphy1 {
+ /* Used for USB3 */
+ phy-supply = <&vcc5v0_usb_otg>;
+ status = "okay";
+};
+
+&combphy2 {
+ /* used for SATA */
+ status = "okay";
+};
+
@@ -298,20 +276,21 @@ index 0000000000..59ecf868db
+ cpu-supply = <&vdd_cpu>;
+};
+
+&gmac0 {
+ assigned-clocks = <&cru SCLK_GMAC0_RX_TX>, <&cru SCLK_GMAC0>;
+ assigned-clock-parents = <&cru SCLK_GMAC0_RGMII_SPEED>;
+&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";
+ phy-handle = <&rgmii_phy0>;
+ phy-handle = <&rgmii_phy1>;
+ phy-mode = "rgmii";
+ phy-supply = <&vcc3v3_sys>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&gmac0_miim
+ &gmac0_tx_bus2
+ &gmac0_rx_bus2
+ &gmac0_rgmii_clk
+ &gmac0_rgmii_bus>;
+ pinctrl-0 = <&gmac1m1_miim
+ &gmac1m1_tx_bus2
+ &gmac1m1_rx_bus2
+ &gmac1m1_rgmii_clk
+ &gmac1m1_rgmii_bus
+ &gmac1m1_clkinout>;
+ status = "okay";
+
+ tx_delay = <0x4f>;
@@ -593,50 +572,21 @@ index 0000000000..59ecf868db
+ status = "okay";
+};
+
+&mdio0 {
+ rgmii_phy0: ethernet-phy@0 {
+&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>;
+ };
+};
+
+&pcie30phy {
+ status = "okay";
+};
+
+&pcie3x2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pcie_reset_pin>;
+ reset-gpios = <&gpio2 RK_PD6 GPIO_ACTIVE_HIGH>;
+ vpcie3v3-supply = <&vcc3v3_pcie>;
+&pcie2x1 {
+ pinctrl-0 = <&pcie20m2_pins>;
+ reset-gpios = <&gpio1 RK_PB2 GPIO_ACTIVE_HIGH>;
+ status = "okay";
+ vpcie3v3-supply = <&pcie20_3v3>;
+};
+
+&pinctrl {
+ fspi {
+ fspi_dual_io_pins: fspi-dual-io-pins {
+ rockchip,pins =
+ /* fspi_clk */
+ <1 RK_PD0 1 &pcfg_pull_none>,
+ /* fspi_cs0n */
+ <1 RK_PD3 1 &pcfg_pull_none>,
+ /* fspi_d0 */
+ <1 RK_PD1 1 &pcfg_pull_none>,
+ /* fspi_d1 */
+ <1 RK_PD2 1 &pcfg_pull_none>;
+ };
+ };
+
+ ir-receiver {
+ ir_receiver_pin: ir-receiver-pin {
+ /* external pullup to VCC3V3_SYS */
+ rockchip,pins = <0 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
+ leds {
+ led_power_pin: led-power-pin {
+ rockchip,pins = <0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
@@ -647,11 +597,8 @@ index 0000000000..59ecf868db
+ };
+
+ pcie {
+ pcie_reset_pin: pcie-reset-pin {
+ rockchip,pins = <2 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ vcc3v3_pcie_en_pin: vcc3v3-pcie-en-pin {
+ rockchip,pins = <4 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>;
+ vcc3v3_pcie20_en_pin: vcc3v3-pcie20-en-pin {
+ rockchip,pins = <2 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
@@ -661,18 +608,12 @@ index 0000000000..59ecf868db
+ };
+ };
+
+ rk809 {
+ hp_det_pin: hp-det-pin {
+ rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
+ usb {
+ vcc5v0_usb_host_en_pin: vcc5v0-usb-host-en-pin {
+ rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
+ rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ vcc5v0_usb_otg_en_pin: vcc5v0-usb-dr-en-pin {
+ rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
+ rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+};
@@ -683,7 +624,7 @@ index 0000000000..59ecf868db
+ vccio1-supply = <&vccio_acodec>;
+ vccio2-supply = <&vcc_1v8>;
+ vccio3-supply = <&vccio_sd>;
+ vccio4-supply = <&vcc_1v8>;
+ vccio4-supply = <&vcc_3v3>;
+ vccio5-supply = <&vcc_3v3>;
+ vccio6-supply = <&vcc_3v3>;
+ vccio7-supply = <&vcc_3v3>;
@@ -695,10 +636,6 @@ index 0000000000..59ecf868db
+ status = "okay";
+};
+
+&sata2 {
+ status = "okay";
+};
+
+&sdhci {
+ bus-width = <8>;
+ max-frequency = <200000000>;
@@ -723,50 +660,6 @@ index 0000000000..59ecf868db
+ status = "okay";
+};
+
+&sfc {
+ /* Dual I/O mode as the D2 pin conflicts with the eMMC */
+ pinctrl-0 = <&fspi_dual_io_pins>;
+ pinctrl-names = "default";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <100000000>;
+ spi-rx-bus-width = <2>;
+ spi-tx-bus-width = <1>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "SPL";
+ reg = <0x0 0xe0000>;
+ };
+ partition@e0000 {
+ label = "U-Boot Env";
+ reg = <0xe0000 0x20000>;
+ };
+ partition@100000 {
+ label = "U-Boot";
+ reg = <0x100000 0x200000>;
+ };
+ partition@300000 {
+ label = "splash";
+ reg = <0x300000 0x100000>;
+ };
+ partition@400000 {
+ label = "Filesystem";
+ reg = <0x400000 0xc00000>;
+ };
+ };
+ };
+};
+
+&tsadc {
+ rockchip,hw-tshut-mode = <1>;
+ rockchip,hw-tshut-polarity = <0>;
@@ -786,7 +679,7 @@ index 0000000000..59ecf868db
+};
+
+&usb_host0_xhci {
+ dr_mode = "host";
+ dr_mode = "otg";
+ status = "okay";
+};
+
@@ -846,30 +739,172 @@ index 0000000000..59ecf868db
+ remote-endpoint = <&hdmi_in_vp0>;
+ };
+};
diff --git a/board/rockchip/evb_rk3568/MAINTAINERS b/board/rockchip/evb_rk3568/MAINTAINERS
index 6b2e7c7575..a5b59da0f7 100644
--- a/board/rockchip/evb_rk3568/MAINTAINERS
+++ b/board/rockchip/evb_rk3568/MAINTAINERS
@@ -7,6 +7,13 @@ F: configs/evb-rk3568_defconfig
F: arch/arm/dts/rk3568-evb-boot.dtsi
F: arch/arm/dts/rk3568-evb.dts
diff --git a/arch/arm/mach-rockchip/rk3568/Kconfig b/arch/arm/mach-rockchip/rk3568/Kconfig
index baa51349f4..2f03b983ee 100644
--- a/arch/arm/mach-rockchip/rk3568/Kconfig
+++ b/arch/arm/mach-rockchip/rk3568/Kconfig
@@ -22,6 +22,11 @@ config TARGET_ODROID_M1_RK3568
help
Hardkernel ODROID-M1 single board computer with a RK3568B2 SoC.
+ODROID-M1
+M: Jonas Karlman <jonas@kwiboo.se>
+S: Maintained
+F: configs/odroid-m1-rk3568_defconfig
+F: arch/arm/dts/rk3568-odroid-m1-u-boot.dtsi
+F: arch/arm/dts/rk3568-odroid-m1.dts
+config TARGET_ODROID_M1S_RK3566
+ bool "ODROID-M1S"
+ help
+ Hardkernel ODROID-M1S single board computer with a RK3566 SoC.
+
RADXA-CM3
M: Jagan Teki <jagan@amarulasolutions.com>
S: Maintained
diff --git a/configs/odroid-m1-rk3568_defconfig b/configs/odroid-m1-rk3568_defconfig
config TARGET_QUARTZ64_RK3566
bool "Pine64 Quartz64"
help
@@ -44,6 +49,7 @@ config SYS_MALLOC_F_LEN
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/pine64/quartz64_rk3566/Kconfig"
endif
diff --git a/board/hardkernel/odroid_m1s/Kconfig b/board/hardkernel/odroid_m1s/Kconfig
new file mode 100644
index 0000000000..d090196219
index 0000000000..0acea61dac
--- /dev/null
+++ b/configs/odroid-m1-rk3568_defconfig
@@ -0,0 +1,103 @@
+++ b/board/hardkernel/odroid_m1s/Kconfig
@@ -0,0 +1,15 @@
+if TARGET_ODROID_M1S_RK3566
+
+config SYS_BOARD
+ default "odroid_m1s"
+
+config SYS_VENDOR
+ default "hardkernel"
+
+config SYS_CONFIG_NAME
+ default "odroid_m1s"
+
+config BOARD_SPECIFIC_OPTIONS # dummy
+ def_bool y
+
+endif
diff --git a/board/hardkernel/odroid_m1s/MAINTAINERS b/board/hardkernel/odroid_m1s/MAINTAINERS
new file mode 100644
index 0000000000..20fc277ccc
--- /dev/null
+++ b/board/hardkernel/odroid_m1s/MAINTAINERS
@@ -0,0 +1,9 @@
+ODROID-M1S
+M: Dongjin Kim <tobetter@gmail.com>
+S: Maintained
+F: arch/arm/dts/rk3566-odroid-m1s-u-boot.dtsi
+F: arch/arm/dts/rk3566-odroid-m1s.dts
+F: board/hardkernel/odroid_m1s/
+F: board/hardkernel/odroid_m1s/board.c
+F: configs/odroid-m1s-rk3566_defconfig
+F: include/configs/odroid_m1s.h
diff --git a/board/hardkernel/odroid_m1s/Makefile b/board/hardkernel/odroid_m1s/Makefile
new file mode 100644
index 0000000000..6ca49c49b7
--- /dev/null
+++ b/board/hardkernel/odroid_m1s/Makefile
@@ -0,0 +1,7 @@
+#
+# Copyright (c) 2024 Hardkernel Co,. Ltd
+#
+# SPDX-License-Identifier: GPL-2.0+
+#
+
+obj-y += board.o
diff --git a/board/hardkernel/odroid_m1s/board.c b/board/hardkernel/odroid_m1s/board.c
new file mode 100644
index 0000000000..e87cfc4797
--- /dev/null
+++ b/board/hardkernel/odroid_m1s/board.c
@@ -0,0 +1,81 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * (C) Copyright 2024 Hardkernel Co., Ltd
+ */
+
+#include <asm/unaligned.h>
+#include <mmc.h>
+#include <net.h>
+#include <vsprintf.h>
+#include <asm/arch-rockchip/misc.h>
+
+#ifdef CONFIG_MISC_INIT_R
+
+/* Read first block 512 bytes from the first BOOT partition of eMMC
+ * that stores device identifcation sting in UUID type 1, this string
+ * is written in factory to give device seranl number and MAC address.
+ */
+static int odroid_setup_macaddr(void)
+{
+ struct mmc *mmc;
+ struct blk_desc *desc;
+ unsigned long mac_addr;
+ unsigned long count;
+ int ret;
+ u8 buf[512];
+
+ mmc = find_mmc_device(0);
+ if (!mmc)
+ return -ENODEV;
+
+ desc = mmc_get_blk_desc(mmc);
+
+ // Switch to the first BOOT partition
+ ret = blk_select_hwpart_devnum(UCLASS_MMC, 0, 1);
+ if (ret)
+ return -EIO;
+
+ count = blk_dread(desc, 0, 1, (void *)buf);
+
+ // Switch back to USER partition
+ ret = blk_dselect_hwpart(desc, 0);
+ if (ret || count != 1)
+ return -EIO;
+
+ *(char *)(buf + 36) = 0;
+
+ // Serial number
+ env_set("serial#", (char *)buf);
+
+ // MAC address
+ mac_addr = cpu_to_be64(simple_strtoul((char *)buf + 24, NULL, 16)) >> 16;
+
+ eth_env_set_enetaddr("ethaddr", (unsigned char *)&mac_addr);
+ eth_env_set_enetaddr("eth1addr", (unsigned char *)&mac_addr);
+
+ return 0;
+}
+
+int misc_init_r(void)
+{
+ const u32 cpuid_offset = CFG_CPUID_OFFSET;
+ const u32 cpuid_length = 0x10;
+ u8 cpuid[cpuid_length];
+ int ret;
+
+ ret = odroid_setup_macaddr();
+ if (ret) {
+ ret = rockchip_setup_macaddr();
+ if (ret)
+ return ret;
+ }
+
+ ret = rockchip_cpuid_from_efuse(cpuid_offset, cpuid_length, cpuid);
+ if (ret)
+ return ret;
+
+ ret = rockchip_cpuid_set(cpuid, cpuid_length);
+
+ return ret;
+}
+#endif
diff --git a/configs/odroid-m1s-rk3566_defconfig b/configs/odroid-m1s-rk3566_defconfig
new file mode 100644
index 0000000000..d70a10dc08
--- /dev/null
+++ b/configs/odroid-m1s-rk3566_defconfig
@@ -0,0 +1,109 @@
+CONFIG_ARM=y
+CONFIG_SKIP_LOWLEVEL_INIT=y
+CONFIG_COUNTER_FREQUENCY=24000000
@@ -882,12 +917,13 @@ index 0000000000..d090196219
+CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0xc00000
+CONFIG_SF_DEFAULT_SPEED=24000000
+CONFIG_SF_DEFAULT_MODE=0x1000
+CONFIG_DEFAULT_DEVICE_TREE="rk3568-odroid-m1"
+CONFIG_DEFAULT_DEVICE_TREE="rk3566-odroid-m1s"
+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_ODROID_M1S_RK3566=y
+CONFIG_SPL_STACK=0x400000
+CONFIG_DEBUG_UART_BASE=0xFE660000
+CONFIG_DEBUG_UART_CLOCK=24000000
@@ -902,7 +938,7 @@ index 0000000000..d090196219
+CONFIG_SPL_FIT_SIGNATURE=y
+CONFIG_SPL_LOAD_FIT=y
+CONFIG_LEGACY_IMAGE_FORMAT=y
+CONFIG_DEFAULT_FDT_FILE="rockchip/rk3568-odroid-m1.dtb"
+CONFIG_DEFAULT_FDT_FILE="rockchip/rk3566-odroid-m1s.dtb"
+# CONFIG_DISPLAY_CPUINFO is not set
+CONFIG_DISPLAY_BOARDINFO_LATE=y
+CONFIG_SPL_MAX_SIZE=0x40000
@@ -923,12 +959,15 @@ index 0000000000..d090196219
+CONFIG_CMD_PCI=y
+CONFIG_CMD_USB=y
+# CONFIG_CMD_SETEXPR is not set
+CONFIG_CMD_INI=y
+CONFIG_CMD_PMIC=y
+CONFIG_CMD_REGULATOR=y
+CONFIG_CMD_CRAMFS=y
+# CONFIG_SPL_DOS_PARTITION is not set
+CONFIG_SPL_OF_CONTROL=y
+CONFIG_OF_LIVE=y
+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
+CONFIG_SPL_SYSCON=y
+CONFIG_AHCI_PCI=y
@@ -943,14 +982,15 @@ index 0000000000..d090196219
+CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_SDMA=y
+CONFIG_MMC_SDHCI_ROCKCHIP=y
+CONFIG_SPI_FLASH_SFDP_SUPPORT=y
+CONFIG_SPI_FLASH_MACRONIX=y
+CONFIG_ETH_DESIGNWARE=y
+CONFIG_GMAC_ROCKCHIP=y
+CONFIG_SF_DEFAULT_BUS=4
+CONFIG_PHY_REALTEK=y
+CONFIG_DWC_ETH_QOS=y
+CONFIG_DWC_ETH_QOS_ROCKCHIP=y
+CONFIG_NVME_PCI=y
+CONFIG_PCIE_DW_ROCKCHIP=y
+CONFIG_PHY_ROCKCHIP_INNO_USB2=y
+CONFIG_PHY_ROCKCHIP_NANENG_COMBOPHY=y
+CONFIG_PHY_ROCKCHIP_PCIE=y
+CONFIG_SPL_PINCTRL=y
+CONFIG_DM_PMIC=y
+CONFIG_PMIC_RK8XX=y
@@ -962,7 +1002,6 @@ index 0000000000..d090196219
+CONFIG_BAUDRATE=1500000
+CONFIG_DEBUG_UART_SHIFT=2
+CONFIG_SYS_NS16550_MEM32=y
+CONFIG_ROCKCHIP_SFC=y
+CONFIG_SYSRESET=y
+CONFIG_USB=y
+CONFIG_USB_XHCI_HCD=y
@@ -972,19 +1011,39 @@ index 0000000000..d090196219
+CONFIG_USB_OHCI_GENERIC=y
+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
diff --git a/doc/board/rockchip/rockchip.rst b/doc/board/rockchip/rockchip.rst
index 99376fb54c..b3de15b36a 100644
index 18d0b6f089..3ce9966fc1 100644
--- a/doc/board/rockchip/rockchip.rst
+++ b/doc/board/rockchip/rockchip.rst
@@ -95,6 +95,7 @@ List of mainline supported Rockchip boards:
@@ -93,6 +93,7 @@ List of mainline supported Rockchip boards:
* rk3568
- Rockchip Evb-RK3568 (evb-rk3568)
+ - Hardkernel ODROID-M1 (odroid-m1-rk3568)
* rk3588
- Rockchip EVB (evb-rk3588)
* rk3566
- Anbernic RGxx3 (anbernic-rgxx3-rk3566)
+ - Hardkernel ODROID-M1S (odroid-m1s-rk3566)
- Pine64 Quartz64-A Board (quartz64-a-rk3566)
- Pine64 Quartz64-B Board (quartz64-b-rk3566)
- Pine64 SOQuartz on Blade (soquartz-blade-rk3566)
diff --git a/include/configs/odroid_m1s.h b/include/configs/odroid_m1s.h
new file mode 100644
index 0000000000..b271861388
--- /dev/null
+++ b/include/configs/odroid_m1s.h
@@ -0,0 +1,12 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+
+#ifndef __ODROID_M1S_H
+#define __ODROID_M1S_H
+
+#include <configs/rk3568_common.h>
+
+#define ROCKCHIP_DEVICE_SETTINGS \
+ "stdout=serial\0" \
+ "stderr=serial\0"
+
+#endif
--
2.41.0
2.40.1

View File

@@ -0,0 +1,48 @@
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

@@ -0,0 +1,44 @@
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

@@ -0,0 +1,52 @@
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

@@ -0,0 +1,98 @@
part start ${devtype} ${devnum} hassos-bootstate mmc_env
${devtype} dev ${devnum}
setenv loadbootstate " \
echo 'loading env...'; \
${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; \
${devtype} write ${ramdisk_addr_r} ${mmc_env} 0x40;"
run loadbootstate
test -n "${BOOT_ORDER}" || setenv BOOT_ORDER "A B"
test -n "${BOOT_A_LEFT}" || setenv BOOT_A_LEFT 3
test -n "${BOOT_B_LEFT}" || setenv BOOT_B_LEFT 3
# Allows ConditionFirstBoot=
test -n "${MACHINE_ID}" || setenv BOOT_CONDITION "systemd.condition-first-boot=true"
# HassOS bootargs
setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 systemd.machine_id=${MACHINE_ID} fsck.repair=yes ${BOOT_CONDITION}"
# HassOS system A/B
setenv bootargs_a "root=PARTUUID=8d3d53e3-6d49-4c38-8349-aff6859e82fd rootfstype=squashfs ro rootwait"
setenv bootargs_b "root=PARTUUID=a3ec664e-32ce-4665-95ea-7ae90ce9aa20 rootfstype=squashfs ro rootwait"
part number ${devtype} ${devnum} hassos-boot boot_partnum
# Load environment from 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 ${devtype} ${devnum}:${boot_partnum} ${ramdisk_addr_r} cmdline.txt cmdline
# Load device tree
setenv fdtfile rk3566-odroid-m1s.dtb
echo "Loading standard device tree ${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 ${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 ${devtype} ${devnum}:${boot_partnum} ${fdt_addr_r} ${fdtfile}
fi
setenv bootargs
for BOOT_SLOT in "${BOOT_ORDER}"; do
if test "x${bootargs}" != "x"; then
# skip remaining slots
elif test "x${BOOT_SLOT}" = "xA"; then
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 ${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
elif test "x${BOOT_SLOT}" = "xB"; then
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 ${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
fi
done
if test -n "${bootargs}"; then
run storebootstate
else
echo "No valid slot found, resetting tries to 3"
setenv BOOT_A_LEFT 3
setenv BOOT_B_LEFT 3
run storebootstate
reset
fi
echo "Starting kernel"
booti ${kernel_addr_r} - ${fdt_addr_r}
echo "Boot failed, resetting..."
reset

View File

@@ -0,0 +1 @@

View File

@@ -1,3 +1,4 @@
# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
CONFIG_THERMAL_GOV_BANG_BANG=y

View File

@@ -1 +1,6 @@
CONFIG_KERNEL_LZ4=y
# CONFIG_KERNEL_GZIP is not set
# CONFIG_S3C2410_WATCHDOG is not set
# CONFIG_PROVE_LOCKING is not set

View File

@@ -1,61 +0,0 @@
From d6b82edb420c7df4fa8bb0924dae2476beb649a2 Mon Sep 17 00:00:00 2001
Message-Id: <d6b82edb420c7df4fa8bb0924dae2476beb649a2.1622398359.git.stefan@agner.ch>
From: "charles.park" <charles.park@hardkernel.com>
Date: Fri, 1 Jun 2018 18:12:01 +0900
Subject: [PATCH] ODROID-XU4: Update hack avoiding the invalid temperature by
TMU broken
Change-Id: I6092834427950a50746535458e99bf7089212044
---
drivers/thermal/thermal_helpers.c | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/drivers/thermal/thermal_helpers.c b/drivers/thermal/thermal_helpers.c
index c94bc824e5d3..2880126c5861 100644
--- a/drivers/thermal/thermal_helpers.c
+++ b/drivers/thermal/thermal_helpers.c
@@ -75,6 +75,10 @@ EXPORT_SYMBOL(get_thermal_instance);
*
* Return: On success returns 0, an error code otherwise
*/
+
+#define CRITICAL_TEMP 120000
+int thermal_zone_data[4] = { 0, };
+
int thermal_zone_get_temp(struct thermal_zone_device *tz, int *temp)
{
int ret = -EINVAL;
@@ -108,6 +112,30 @@ int thermal_zone_get_temp(struct thermal_zone_device *tz, int *temp)
*temp = tz->emul_temperature;
}
+ /* save thermal_zone data */
+ if (!ret)
+ thermal_zone_data[tz->id] = *temp;
+ /*
+ * This case is that the thermal sensor is broken.
+ * That's not real temperature. Set the fake temperature value in order to
+ * avoid reaching the ciritical temperature.
+ */
+ if ((thermal_zone_data[tz->id] > CRITICAL_TEMP) && (tz->id != 4)) {
+ int i, broken_sensor = 0, correct_temp = 0;
+ for (i = 0; i < 4; i++) {
+ if ((thermal_zone_data[i] <= CRITICAL_TEMP) &&
+ (correct_temp <= thermal_zone_data[i]))
+ correct_temp = thermal_zone_data[i];
+ if (thermal_zone_data[i] > CRITICAL_TEMP)
+ broken_sensor++;
+ }
+ /*
+ * if all thermal sensor broken then critical temperature data send
+ * for system poweroff.
+ */
+ *temp = (broken_sensor == 4) ? CRITICAL_TEMP : correct_temp;
+ }
+
mutex_unlock(&tz->lock);
exit:
return ret;
--
2.31.1

View File

@@ -1,5 +1,4 @@
From e7d59e0444170873e945a0675ed1565a65c99e17 Mon Sep 17 00:00:00 2001
Message-Id: <e7d59e0444170873e945a0675ed1565a65c99e17.1676489173.git.stefan@agner.ch>
From c51639443d3c90127a77f1534e39dd01fac1577f 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
@@ -17,7 +16,7 @@ Signed-off-by: Marian Mihailescu <mihailescu2m@gmail.com>
1 file changed, 55 insertions(+)
diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c
index ebc67e3ddd4f..51f128076db9 100644
index 570b61420f3a..286b606660a4 100644
--- a/drivers/regulator/s2mps11.c
+++ b/drivers/regulator/s2mps11.c
@@ -1117,6 +1117,57 @@ static const struct regulator_desc s2mpu02_regulators[] = {
@@ -89,6 +88,3 @@ index ebc67e3ddd4f..51f128076db9 100644
out:
kfree(rdata);
--
2.39.1

View File

@@ -1,30 +0,0 @@
From 24252c65cfea76c5724044381bafb587a9fecd6a Mon Sep 17 00:00:00 2001
Message-Id: <24252c65cfea76c5724044381bafb587a9fecd6a.1676446297.git.stefan@agner.ch>
From: Stefan Agner <stefan@agner.ch>
Date: Wed, 15 Feb 2023 08:30:41 +0100
Subject: [PATCH] samsung: common: ignore if CROS EC is not supported
If the CROS device class is not compiled in, uclass returns not
supported. Ignore this case as well.
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
board/samsung/common/board.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/board/samsung/common/board.c b/board/samsung/common/board.c
index 16ce5cb892..663d7ca991 100644
--- a/board/samsung/common/board.c
+++ b/board/samsung/common/board.c
@@ -223,7 +223,7 @@ int board_late_init(void)
char mmcbootdev_str[16];
ret = uclass_first_device_err(UCLASS_CROS_EC, &dev);
- if (ret && ret != -ENODEV) {
+ if (ret && ret != -ENODEV && ret != -EPFNOSUPPORT) {
/* Force console on */
gd->flags &= ~GD_FLG_SILENT;
--
2.39.1

View File

@@ -1,5 +1,4 @@
From 86f6a398d2c080f92d51048ededf45efbe3a96d4 Mon Sep 17 00:00:00 2001
Message-Id: <86f6a398d2c080f92d51048ededf45efbe3a96d4.1676488652.git.stefan@agner.ch>
From e780a5f405a02e3102c471415f7b0ad73a5cc036 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
@@ -10,15 +9,15 @@ button press is triggered.
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 11 +++++++++++
arch/arm64/boot/dts/amlogic/meson-g12b-odroid.dtsi | 11 +++++++++++
1 file changed, 11 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 fd3fa82e4c33..06bdba57b04c 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
@@ -39,6 +39,17 @@ emmc_pwrseq: emmc-pwrseq {
reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>;
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
--- 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 {
#cooling-cells = <2>;
};
+ gpio-keys-polled {
@@ -35,6 +34,3 @@ index fd3fa82e4c33..06bdba57b04c 100644
leds {
compatible = "gpio-leds";
--
2.39.1

View File

@@ -1,7 +1,4 @@
From e269c47ef68371dbed1ff5919a67fcc385d8c6da Mon Sep 17 00:00:00 2001
Message-Id: <e269c47ef68371dbed1ff5919a67fcc385d8c6da.1676488652.git.stefan@agner.ch>
In-Reply-To: <86f6a398d2c080f92d51048ededf45efbe3a96d4.1676488652.git.stefan@agner.ch>
References: <86f6a398d2c080f92d51048ededf45efbe3a96d4.1676488652.git.stefan@agner.ch>
From cff7ba94733d9103487d87a6474e2ab026bd718c 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
@@ -12,15 +9,15 @@ cannot be modulated.
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 11 +++++++++++
arch/arm64/boot/dts/amlogic/meson-g12b-odroid.dtsi | 11 +++++++++++
1 file changed, 11 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 06bdba57b04c..bcf6d8eacd6e 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
@@ -39,6 +39,17 @@ emmc_pwrseq: emmc-pwrseq {
reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>;
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
--- 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 {
};
};
+ /*
@@ -34,9 +31,6 @@ index 06bdba57b04c..bcf6d8eacd6e 100644
+ status = "okay";
+ };
+
gpio-keys-polled {
compatible = "gpio-keys-polled";
poll-interval = <100>;
--
2.39.1
leds {
compatible = "gpio-leds";

View File

@@ -1,7 +1,4 @@
From 8c3e65cf09d62797a2fe50234f30f33f6e4eda44 Mon Sep 17 00:00:00 2001
Message-Id: <8c3e65cf09d62797a2fe50234f30f33f6e4eda44.1676488652.git.stefan@agner.ch>
In-Reply-To: <86f6a398d2c080f92d51048ededf45efbe3a96d4.1676488652.git.stefan@agner.ch>
References: <86f6a398d2c080f92d51048ededf45efbe3a96d4.1676488652.git.stefan@agner.ch>
From 8d781fc504780a3aa8ef751724e3749c2bfda7a9 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
@@ -16,14 +13,14 @@ downstream kernel.
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
.../dts/amlogic/meson-g12b-odroid-n2.dtsi | 38 +++++++++++++++++++
.../boot/dts/amlogic/meson-g12b-odroid.dtsi | 38 +++++++++++++++++++
1 file changed, 38 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 bcf6d8eacd6e..6dcf990e0efc 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
@@ -390,6 +390,44 @@ &clkc_audio {
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
--- 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 {
status = "okay";
};
@@ -68,6 +65,3 @@ index bcf6d8eacd6e..6dcf990e0efc 100644
&cpu0 {
cpu-supply = <&vddcpu_b>;
operating-points-v2 = <&cpu_opp_table_0>;
--
2.39.1

View File

@@ -1,7 +1,4 @@
From 433c5a06b1195e2e689f8d260ec471caca2fa1b6 Mon Sep 17 00:00:00 2001
Message-Id: <433c5a06b1195e2e689f8d260ec471caca2fa1b6.1676488652.git.stefan@agner.ch>
In-Reply-To: <86f6a398d2c080f92d51048ededf45efbe3a96d4.1676488652.git.stefan@agner.ch>
References: <86f6a398d2c080f92d51048ededf45efbe3a96d4.1676488652.git.stefan@agner.ch>
From 01ac730fa92a030690a7701c9b8781bc4ef7bcae 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
@@ -11,23 +8,23 @@ available as UART by default.
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 7 +++++++
arch/arm64/boot/dts/amlogic/meson-g12b-odroid.dtsi | 7 +++++++
1 file changed, 7 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 6dcf990e0efc..7eaaced7893b 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
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
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid.dtsi
@@ -12,6 +12,7 @@
/ {
aliases {
serial0 = &uart_AO;
+ serial1 = &uart_A;
ethernet0 = &ethmac;
rtc0 = &rtc;
rtc1 = &vrtc;
@@ -730,6 +731,12 @@ &toddr_c {
status = "okay";
};
@@ -496,6 +497,12 @@ &uart_AO {
pinctrl-names = "default";
};
+&uart_A {
@@ -36,9 +33,6 @@ index 6dcf990e0efc..7eaaced7893b 100644
+ pinctrl-names = "default";
+};
+
&uart_AO {
&usb {
status = "okay";
pinctrl-0 = <&uart_ao_a_pins>;
--
2.39.1
};

View File

@@ -1,7 +1,4 @@
From 00129576fb656015b66958f4d7370ee7e2d990e2 Mon Sep 17 00:00:00 2001
Message-Id: <00129576fb656015b66958f4d7370ee7e2d990e2.1676488652.git.stefan@agner.ch>
In-Reply-To: <86f6a398d2c080f92d51048ededf45efbe3a96d4.1676488652.git.stefan@agner.ch>
References: <86f6a398d2c080f92d51048ededf45efbe3a96d4.1676488652.git.stefan@agner.ch>
From f5676219e12b48a0f591e911797304fae05ca78c 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+
@@ -16,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 7eaaced7893b..8d183253389c 100644
index 91c9769fda20..ececc6b17639 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
@@ -588,6 +588,12 @@ &ir {
linux,rc-map-name = "rc-odroid";
@@ -248,6 +248,12 @@ usb-hub-hog {
};
};
+&i2c2 {
@@ -32,6 +29,3 @@ index 7eaaced7893b..8d183253389c 100644
&i2c3 {
status = "okay";
pinctrl-0 = <&i2c3_sda_a_pins>, <&i2c3_sck_a_pins>;
--
2.39.1

View File

@@ -1,7 +1,4 @@
From d6b1ddfb5816b887470452920d273661e361632d Mon Sep 17 00:00:00 2001
Message-Id: <d6b1ddfb5816b887470452920d273661e361632d.1676488652.git.stefan@agner.ch>
In-Reply-To: <86f6a398d2c080f92d51048ededf45efbe3a96d4.1676488652.git.stefan@agner.ch>
References: <86f6a398d2c080f92d51048ededf45efbe3a96d4.1676488652.git.stefan@agner.ch>
From 1c9c3ca476adf09884295e9f8298288ea497e5ac 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
@@ -11,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 ddb1b345397f..49b88c1e11cd 100644
index 1db2327bbd13..e67869fbb460 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 @@
@@ -25,7 +22,7 @@ index ddb1b345397f..49b88c1e11cd 100644
};
chosen {
@@ -450,6 +451,12 @@ &tohdmitx {
@@ -449,6 +450,12 @@ &tohdmitx {
status = "okay";
};
@@ -38,6 +35,3 @@ index ddb1b345397f..49b88c1e11cd 100644
&uart_AO {
status = "okay";
pinctrl-0 = <&uart_ao_a_pins>;
--
2.39.1

View File

@@ -1,7 +1,4 @@
From a78a968b4a51a32f44c170c591a46b27326b97f2 Mon Sep 17 00:00:00 2001
Message-Id: <a78a968b4a51a32f44c170c591a46b27326b97f2.1676488652.git.stefan@agner.ch>
In-Reply-To: <86f6a398d2c080f92d51048ededf45efbe3a96d4.1676488652.git.stefan@agner.ch>
References: <86f6a398d2c080f92d51048ededf45efbe3a96d4.1676488652.git.stefan@agner.ch>
From 9cd343da01d9b69ad33444105208949775c909b4 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
@@ -11,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 49b88c1e11cd..b8d88310ae3a 100644
index e67869fbb460..90d2eea7fe24 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 @@
@@ -23,7 +20,7 @@ index 49b88c1e11cd..b8d88310ae3a 100644
serial0 = &uart_AO;
serial1 = &uart_A;
};
@@ -387,6 +389,57 @@ &ir {
@@ -386,6 +388,57 @@ &ir {
pinctrl-names = "default";
};
@@ -81,6 +78,3 @@ index 49b88c1e11cd..b8d88310ae3a 100644
&pwm_AO_cd {
pinctrl-0 = <&pwm_ao_d_e_pins>;
pinctrl-names = "default";
--
2.39.1

View File

@@ -1,7 +1,4 @@
From 8263e17f170296c28d3a781d5b05e59778fe4a27 Mon Sep 17 00:00:00 2001
Message-Id: <8263e17f170296c28d3a781d5b05e59778fe4a27.1676488652.git.stefan@agner.ch>
In-Reply-To: <86f6a398d2c080f92d51048ededf45efbe3a96d4.1676488652.git.stefan@agner.ch>
References: <86f6a398d2c080f92d51048ededf45efbe3a96d4.1676488652.git.stefan@agner.ch>
From 299d45dd82df026c0164e170d476b56eada4aa77 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
@@ -12,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 201596247fd9..b2cb12fb46fd 100644
index e6d2de7c45a9..c6a38d890db5 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 @@ / {
@@ -24,7 +21,7 @@ index 201596247fd9..b2cb12fb46fd 100644
ethernet0 = &ethmac;
};
@@ -399,6 +401,18 @@ &uart_AO {
@@ -383,6 +385,18 @@ &uart_AO {
pinctrl-names = "default";
};
@@ -43,6 +40,3 @@ index 201596247fd9..b2cb12fb46fd 100644
&usb0_phy {
status = "disabled";
phy-supply = <&usb_otg_pwr>;
--
2.39.1

View File

@@ -1,7 +1,4 @@
From ceef8d62bcf0c2c7b3e96831e85a872009657cf0 Mon Sep 17 00:00:00 2001
Message-Id: <ceef8d62bcf0c2c7b3e96831e85a872009657cf0.1676488652.git.stefan@agner.ch>
In-Reply-To: <86f6a398d2c080f92d51048ededf45efbe3a96d4.1676488652.git.stefan@agner.ch>
References: <86f6a398d2c080f92d51048ededf45efbe3a96d4.1676488652.git.stefan@agner.ch>
From 61a378b42a2f61589cc62ff85334dd607014cb6d 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
@@ -12,7 +9,7 @@ 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 7c029f552a23..b3c22861b022 100644
index 12ef6e81c8bd..90ae81493de2 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
@@ -333,6 +333,8 @@ &hwrng {
@@ -33,6 +30,3 @@ index 7c029f552a23..b3c22861b022 100644
};
&i2c_C {
--
2.39.1

View File

@@ -1,16 +1,18 @@
From 5d2feca5947f84259bae41730ce54231578b37be Mon Sep 17 00:00:00 2001
Message-Id: <5d2feca5947f84259bae41730ce54231578b37be.1645627508.git.stefan@agner.ch>
From: Neil Armstrong <narmstrong@baylibre.com>
Date: Mon, 2 Sep 2019 15:42:04 +0200
Subject: [PATCH] HACK: mmc: meson-gx: limit to 24MHz
From 820e6f6e3745e988246a1acca4aaacdd759b778f Mon Sep 17 00:00:00 2001
From: Stefan Agner <stefan@agner.ch>
Date: Thu, 18 Apr 2024 18:01:54 +0200
Subject: [PATCH] HACK: mmc: meson-gx: limit to 40MHz
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
This is the limit used by downstream U-Boot for ODROID-N2(+) (odroidg12
branch).
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
drivers/mmc/meson_gx_mmc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mmc/meson_gx_mmc.c b/drivers/mmc/meson_gx_mmc.c
index fcf4f03d1e..6ded4b619b 100644
index fcf4f03d1e..c578ac0f74 100644
--- a/drivers/mmc/meson_gx_mmc.c
+++ b/drivers/mmc/meson_gx_mmc.c
@@ -279,7 +279,7 @@ static int meson_mmc_probe(struct udevice *dev)
@@ -18,10 +20,10 @@ index fcf4f03d1e..6ded4b619b 100644
MMC_MODE_HS_52MHz | MMC_MODE_HS;
cfg->f_min = DIV_ROUND_UP(SD_EMMC_CLKSRC_24M, CLK_MAX_DIV);
- cfg->f_max = 100000000; /* 100 MHz */
+ cfg->f_max = SD_EMMC_CLKSRC_24M;
+ cfg->f_max = 40000000; /* 40 MHz */
cfg->b_max = 511; /* max 512 - 1 blocks */
cfg->name = dev->name;
--
2.35.1
2.44.0

View File

@@ -6,8 +6,6 @@ CONFIG_PREEMPT=y
CONFIG_IRQ_TIME_ACCOUNTING=y
CONFIG_BSD_PROCESS_ACCT=y
CONFIG_BSD_PROCESS_ACCT_V3=y
CONFIG_TASK_XACCT=y
CONFIG_TASK_IO_ACCOUNTING=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_MEMCG=y
@@ -160,10 +158,9 @@ CONFIG_PCI_IOV=y
CONFIG_HOTPLUG_PCI=y
CONFIG_PCI_HOST_GENERIC=y
CONFIG_PCIE_DW_PLAT_HOST=y
# CONFIG_PCI_MESON is not set
CONFIG_PCI_MESON=y
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
CONFIG_SIMPLE_PM_BUS=y
CONFIG_MTD=y
CONFIG_MTD_BLOCK=y
CONFIG_MTD_RAW_NAND=y
@@ -262,7 +259,6 @@ CONFIG_RTL8192CU=m
CONFIG_WL18XX=m
CONFIG_WLCORE_SDIO=m
# CONFIG_XEN_NETDEV_FRONTEND is not set
CONFIG_INPUT_POLLDEV=m
CONFIG_INPUT_MATRIXKMAP=y
CONFIG_INPUT_EVDEV=y
# CONFIG_KEYBOARD_ATKBD is not set
@@ -294,11 +290,11 @@ CONFIG_IPMI_HANDLER=m
CONFIG_IPMI_DEVICE_INTERFACE=m
CONFIG_IPMI_SI=m
CONFIG_HW_RANDOM=y
CONFIG_HW_RANDOM_CAVIUM=m
CONFIG_HW_RANDOM_OPTEE=m
CONFIG_TCG_TPM=y
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
@@ -306,11 +302,9 @@ CONFIG_I2C_MESON=y
CONFIG_I2C_RK3X=y
CONFIG_SPI=y
CONFIG_SPI_BITBANG=m
CONFIG_SPI_NXP_FLEXSPI=y
CONFIG_SPI_MESON_SPICC=m
CONFIG_SPI_MESON_SPIFC=m
CONFIG_SPI_PL022=y
CONFIG_SPI_ROCKCHIP=y
CONFIG_SPI_SPIDEV=m
CONFIG_PINCTRL=y
CONFIG_GENERIC_PINCTRL_GROUPS=y
@@ -363,7 +357,7 @@ CONFIG_MFD_BD9571MWV=y
CONFIG_MFD_AXP20X_I2C=y
CONFIG_MFD_HI6421_PMIC=y
CONFIG_MFD_MAX77620=y
CONFIG_MFD_RK808=y
CONFIG_MFD_RK8XX_I2C=y
CONFIG_MFD_SEC_CORE=y
CONFIG_MFD_ROHM_BD718XX=y
CONFIG_MFD_KHADAS_MCU=y
@@ -449,21 +443,14 @@ CONFIG_USB_GSPCA_VICAM=m
CONFIG_USB_GSPCA_XIRLINK_CIT=m
CONFIG_USB_GSPCA_ZC3XX=m
CONFIG_USB_PWC=m
CONFIG_VIDEO_CPIA2=m
CONFIG_USB_ZR364XX=m
CONFIG_USB_STKWEBCAM=m
CONFIG_USB_S2255=m
CONFIG_VIDEO_USBTV=m
CONFIG_VIDEO_PVRUSB2=m
CONFIG_VIDEO_HDPVR=m
CONFIG_VIDEO_STK1160_COMMON=m
CONFIG_VIDEO_AU0828=m
CONFIG_VIDEO_CX231XX=m
CONFIG_VIDEO_CX231XX_ALSA=m
CONFIG_VIDEO_CX231XX_DVB=m
CONFIG_VIDEO_TM6000=m
CONFIG_VIDEO_TM6000_ALSA=m
CONFIG_VIDEO_TM6000_DVB=m
CONFIG_VIDEO_EM28XX=m
CONFIG_VIDEO_EM28XX_V4L2=m
CONFIG_VIDEO_EM28XX_ALSA=m
@@ -484,6 +471,7 @@ CONFIG_DRM_PANFROST=m
CONFIG_FB=y
CONFIG_BACKLIGHT_CLASS_DEVICE=y
CONFIG_BACKLIGHT_PWM=m
CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_SOUND=y
CONFIG_SND=y
CONFIG_SND_DYNAMIC_MINORS=y
@@ -494,16 +482,15 @@ CONFIG_SND_SOC=y
CONFIG_SND_MESON_AXG_SOUND_CARD=y
CONFIG_SND_MESON_GX_SOUND_CARD=y
CONFIG_SND_SOC_AK4613=m
CONFIG_SND_SOC_DMIC=m
CONFIG_SND_SOC_DMIC=y
CONFIG_SND_SOC_ES7134=m
CONFIG_SND_SOC_ES7241=m
CONFIG_SND_SOC_MAX98357A=y
CONFIG_SND_SOC_SIMPLE_AMPLIFIER=m
CONFIG_SND_SOC_SPDIF=m
CONFIG_SND_SOC_SPDIF=y
CONFIG_SND_SIMPLE_CARD=m
CONFIG_SND_AUDIO_GRAPH_CARD=m
CONFIG_HIDRAW=y
CONFIG_I2C_HID=m
CONFIG_USB=y
CONFIG_USB_OTG=y
CONFIG_USB_XHCI_HCD=y
@@ -591,12 +578,9 @@ CONFIG_VIRTIO_MMIO=y
# CONFIG_XEN_GNTDEV is not set
# CONFIG_XEN_GRANT_DEV_ALLOC is not set
CONFIG_STAGING=y
CONFIG_STAGING_GASKET_FRAMEWORK=m
CONFIG_STAGING_APEX_DRIVER=m
CONFIG_COMMON_CLK_RK808=y
CONFIG_COMMON_CLK_CS2000_CP=y
CONFIG_COMMON_CLK_S2MPS11=y
CONFIG_CLK_QORIQ=y
CONFIG_COMMON_CLK_XGENE=y
CONFIG_COMMON_CLK_PWM=y
CONFIG_HWSPINLOCK=y
@@ -613,11 +597,8 @@ CONFIG_SENSORS_ISL29018=m
CONFIG_MPL3115=m
CONFIG_PWM=y
CONFIG_PWM_MESON=y
CONFIG_PHY_XGENE=y
CONFIG_PHY_FSL_IMX8MQ_USB=y
CONFIG_PHY_QCOM_USB_HS=y
CONFIG_PHY_SAMSUNG_USB2=y
CONFIG_MESON_EFUSE=y
CONFIG_TEE=y
CONFIG_OPTEE=y
CONFIG_EXT3_FS=m
@@ -630,7 +611,7 @@ CONFIG_F2FS_FS=m
CONFIG_FANOTIFY=y
CONFIG_FANOTIFY_ACCESS_PERMISSIONS=y
CONFIG_QUOTA=y
CONFIG_AUTOFS4_FS=y
CONFIG_AUTOFS_FS=y
CONFIG_FUSE_FS=m
CONFIG_CUSE=m
CONFIG_OVERLAY_FS=y

View File

@@ -14,8 +14,7 @@ function hassos_pre_image() {
# SPL
create_spl_image
dd if="${BINARIES_DIR}/idbloader.img" of="${SPL_IMG}" conv=notrunc bs=512 seek=64
dd if="${BINARIES_DIR}/u-boot.itb" of="${SPL_IMG}" conv=notrunc bs=512 seek=16384
dd if="${BINARIES_DIR}/u-boot-rockchip.bin" of="${SPL_IMG}" conv=notrunc bs=512 seek=64
}

View File

@@ -1,3 +1,4 @@
# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
CONFIG_THERMAL_GOV_BANG_BANG=y
@@ -8,7 +9,6 @@ CONFIG_KEYBOARD_GPIO_POLLED=y
CONFIG_MMC_SDHCI_OF_DWCMSHC=y
CONFIG_REGULATOR_RK808=y
CONFIG_REGULATOR_RK860X=y
# CONFIG_RTC_DRV_RK808 is not set
# CONFIG_DW_WATCHDOG is not set

View File

@@ -1,29 +1,37 @@
From 2a76efca88402072b61e4cb83d6707400da8dfae Mon Sep 17 00:00:00 2001
From 9b1367f47f2e790f155d4aab39878233eedf7b22 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 2/2] arm64: dts: rockchip: Add NabuCasa Green board
Subject: [PATCH] arm64: dts: rockchip: Add NabuCasa Green board
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[Replaced custom rk860x driver with upstream fan53555]
Signed-off-by: Jan Čermák <sairon@sairon.cz>
---
arch/arm64/boot/dts/rockchip/Makefile | 1 +
.../boot/dts/rockchip/rk3566-ha-green.dts | 685 ++++++++++++++++++
2 files changed, 686 insertions(+)
.../boot/dts/rockchip/rk3566-ha-green.dts | 684 ++++++++++++++++++
2 files changed, 685 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 8c15593c0..997051975 100644
index e7728007fd1b..475becd793ac 100644
--- a/arch/arm64/boot/dts/rockchip/Makefile
+++ b/arch/arm64/boot/dts/rockchip/Makefile
@@ -72,3 +72,4 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-soquartz-cm4.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-bpi-r2-pro.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-evb1-v10.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-rock-3a.dtb
@@ -75,6 +75,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
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 000000000..d0830df48
index 000000000000..b5e4a67b3fc7
--- /dev/null
+++ b/arch/arm64/boot/dts/rockchip/rk3566-ha-green.dts
@@ -0,0 +1,685 @@
@@ -0,0 +1,684 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2023 Seeed Co., Ltd.
@@ -228,16 +236,15 @@ index 000000000..d0830df48
+&i2c0 {
+ status = "okay";
+
+ vdd_cpu: rk8601@41 {
+ compatible = "rockchip,rk8601";
+ vdd_cpu: regulator@41 {
+ compatible = "rockchip,rk8600";
+ reg = <0x41>;
+ vin-supply = <&vcc5v0_sys>;
+ regulator-compatible = "rk860x-reg";
+ regulator-name = "vdd_cpu";
+ regulator-min-microvolt = <712500>;
+ regulator-max-microvolt = <1500000>;
+ regulator-ramp-delay = <2300>;
+ rockchip,suspend-voltage-selector = <1>;
+ fcs,suspend-voltage-selector = <1>;
+ regulator-boot-on;
+ regulator-always-on;
+ regulator-state-mem {
@@ -709,6 +716,3 @@ index 000000000..d0830df48
+ remote-endpoint = <&hdmi_in_vp0>;
+ };
+};
--
2.25.1

View File

@@ -1,662 +0,0 @@
From b7957b94fe2649a1e8032b10ea293b106cda4532 Mon Sep 17 00:00:00 2001
From: Zhangqun Ming <north_sea@qq.com>
Date: Thu, 6 Jul 2023 10:04:39 +0000
Subject: [PATCH 1/2] drivers: regulator: Supports rk860x
---
drivers/regulator/Kconfig | 11 +
drivers/regulator/Makefile | 1 +
drivers/regulator/rk860x-regulator.c | 607 +++++++++++++++++++++++++++
3 files changed, 619 insertions(+)
create mode 100644 drivers/regulator/rk860x-regulator.c
diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig
index 070e4403c..6a3c00c24 100644
--- a/drivers/regulator/Kconfig
+++ b/drivers/regulator/Kconfig
@@ -1047,6 +1047,17 @@ config REGULATOR_RK808
through regulator interface. The device supports multiple DCDC/LDO
outputs which can be controlled by i2c communication.
+config REGULATOR_RK860X
+ tristate "Rockchip RK860X Regulator"
+ depends on I2C
+ select REGMAP_I2C
+ help
+ This driver supports Rockchip RK860X Digitally Programmable
+ Buck Regulator. The RK860X is a step-down switching voltage
+ regulator that delivers a digitally programmable output from an
+ input voltage supply of 2.5V to 5.5V. The output voltage is
+ programmed through an I2C interface.
+
config REGULATOR_RN5T618
tristate "Ricoh RN5T567/618 voltage regulators"
depends on MFD_RN5T618
diff --git a/drivers/regulator/Makefile b/drivers/regulator/Makefile
index 5962307e1..76a156e98 100644
--- a/drivers/regulator/Makefile
+++ b/drivers/regulator/Makefile
@@ -125,6 +125,7 @@ obj-$(CONFIG_REGULATOR_PCF50633) += pcf50633-regulator.o
obj-$(CONFIG_REGULATOR_RASPBERRYPI_TOUCHSCREEN_ATTINY) += rpi-panel-attiny-regulator.o
obj-$(CONFIG_REGULATOR_RC5T583) += rc5t583-regulator.o
obj-$(CONFIG_REGULATOR_RK808) += rk808-regulator.o
+obj-$(CONFIG_REGULATOR_RK860X) += rk860x-regulator.o
obj-$(CONFIG_REGULATOR_RN5T618) += rn5t618-regulator.o
obj-$(CONFIG_REGULATOR_ROHM) += rohm-regulator.o
obj-$(CONFIG_REGULATOR_RT4801) += rt4801-regulator.o
diff --git a/drivers/regulator/rk860x-regulator.c b/drivers/regulator/rk860x-regulator.c
new file mode 100644
index 000000000..4596761bd
--- /dev/null
+++ b/drivers/regulator/rk860x-regulator.c
@@ -0,0 +1,607 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2021 Fuzhou Rockchip Electronics Co., Ltd
+ */
+#include <linux/err.h>
+#include <linux/gpio.h>
+#include <linux/i2c.h>
+#include <linux/module.h>
+#include <linux/of_device.h>
+#include <linux/of_gpio.h>
+#include <linux/param.h>
+#include <linux/platform_device.h>
+#include <linux/regmap.h>
+#include <linux/regulator/driver.h>
+#include <linux/regulator/machine.h>
+#include <linux/regulator/of_regulator.h>
+#include <linux/slab.h>
+
+/* Voltage setting */
+
+#define RK860X_VSEL0_A 0x00
+#define RK860X_VSEL1_A 0x01
+#define RK860X_VSEL0_B 0x06
+#define RK860X_VSEL1_B 0x07
+#define RK860X_MAX_SET 0x08
+
+/* Control register */
+#define RK860X_CONTROL 0x02
+/* IC Type */
+#define RK860X_ID1 0x03
+/* IC mask version */
+#define RK860X_ID2 0x04
+/* Monitor register */
+#define RK860X_MONITOR 0x05
+
+/* VSEL bit definitions */
+#define VSEL_BUCK_EN BIT(7)
+#define VSEL_MODE BIT(6)
+#define VSEL_A_NSEL_MASK 0x3F
+#define VSEL_B_NSEL_MASK 0xff
+
+/* Chip ID */
+#define DIE_ID 0x0f
+#define DIE_REV 0x0f
+/* Control bit definitions */
+#define CTL_OUTPUT_DISCHG BIT(7)
+#define CTL_SLEW_MASK (0x7 << 4)
+#define CTL_SLEW_SHIFT 4
+#define CTL_RESET BIT(2)
+
+#define RK860X_NVOLTAGES_64 64
+#define RK860X_NVOLTAGES_160 160
+
+/* IC Type */
+enum {
+ RK860X_CHIP_ID_00 = 0,
+ RK860X_CHIP_ID_01,
+ RK860X_CHIP_ID_02,
+ RK860X_CHIP_ID_03,
+};
+
+struct rk860x_platform_data {
+ struct regulator_init_data *regulator;
+ unsigned int slew_rate;
+ /* Sleep VSEL ID */
+ unsigned int sleep_vsel_id;
+ int limit_volt;
+ struct gpio_desc *vsel_gpio;
+};
+
+struct rk860x_device_info {
+ struct regmap *regmap;
+ struct device *dev;
+ struct regulator_desc desc;
+ struct regulator_dev *rdev;
+ struct regulator_init_data *regulator;
+ /* IC Type and Rev */
+ int chip_id;
+ /* Voltage setting register */
+ unsigned int vol_reg;
+ unsigned int sleep_reg;
+ unsigned int en_reg;
+ unsigned int sleep_en_reg;
+ unsigned int mode_reg;
+ unsigned int vol_mask;
+ unsigned int mode_mask;
+ unsigned int slew_reg;
+ unsigned int slew_mask;
+ unsigned int slew_shift;
+ /* Voltage range and step(linear) */
+ unsigned int vsel_min;
+ unsigned int vsel_step;
+ unsigned int n_voltages;
+ /* Voltage slew rate limiting */
+ unsigned int slew_rate;
+ struct gpio_desc *vsel_gpio;
+ unsigned int sleep_vsel_id;
+};
+
+static unsigned int rk860x_map_mode(unsigned int mode)
+{
+ return mode == REGULATOR_MODE_FAST ?
+ REGULATOR_MODE_FAST : REGULATOR_MODE_NORMAL;
+}
+
+static int rk860x_get_voltage(struct regulator_dev *rdev)
+{
+ struct rk860x_device_info *di = rdev_get_drvdata(rdev);
+ unsigned int val;
+ int ret;
+
+ ret = regmap_read(di->regmap, RK860X_MAX_SET, &val);
+ if (ret < 0)
+ return ret;
+ ret = regulator_get_voltage_sel_regmap(rdev);
+ if (ret > val)
+ return val;
+
+ return ret;
+}
+
+static int rk860x_set_suspend_voltage(struct regulator_dev *rdev, int uV)
+{
+ struct rk860x_device_info *di = rdev_get_drvdata(rdev);
+ int ret;
+
+ ret = regulator_map_voltage_linear(rdev, uV, uV);
+ if (ret < 0)
+ return ret;
+ ret = regmap_update_bits(di->regmap, di->sleep_reg,
+ di->vol_mask, ret);
+ if (ret < 0)
+ return ret;
+
+ return 0;
+}
+
+static int rk860x_set_suspend_enable(struct regulator_dev *rdev)
+{
+ struct rk860x_device_info *di = rdev_get_drvdata(rdev);
+
+ return regmap_update_bits(di->regmap, di->sleep_en_reg,
+ VSEL_BUCK_EN, VSEL_BUCK_EN);
+}
+
+static int rk860x_set_suspend_disable(struct regulator_dev *rdev)
+{
+ struct rk860x_device_info *di = rdev_get_drvdata(rdev);
+
+ return regmap_update_bits(di->regmap, di->sleep_en_reg,
+ VSEL_BUCK_EN, 0);
+}
+
+static int rk860x_resume(struct regulator_dev *rdev)
+{
+ int ret;
+
+ if (!rdev->constraints->state_mem.changeable)
+ return 0;
+
+ ret = rk860x_set_suspend_enable(rdev);
+ if (ret)
+ return ret;
+
+ return regulator_suspend_enable(rdev, PM_SUSPEND_MEM);
+}
+
+static int rk860x_set_enable(struct regulator_dev *rdev)
+{
+ struct rk860x_device_info *di = rdev_get_drvdata(rdev);
+
+ if (di->vsel_gpio) {
+ gpiod_set_raw_value(di->vsel_gpio, !di->sleep_vsel_id);
+ return 0;
+ }
+
+ return regmap_update_bits(di->regmap, di->en_reg,
+ VSEL_BUCK_EN, VSEL_BUCK_EN);
+}
+
+static int rk860x_set_disable(struct regulator_dev *rdev)
+{
+ struct rk860x_device_info *di = rdev_get_drvdata(rdev);
+
+ if (di->vsel_gpio) {
+ gpiod_set_raw_value(di->vsel_gpio, di->sleep_vsel_id);
+ return 0;
+ }
+
+ return regmap_update_bits(di->regmap, di->en_reg,
+ VSEL_BUCK_EN, 0);
+}
+
+static int rk860x_is_enabled(struct regulator_dev *rdev)
+{
+ struct rk860x_device_info *di = rdev_get_drvdata(rdev);
+ unsigned int val;
+ int ret = 0;
+
+ if (di->vsel_gpio) {
+ if (di->sleep_vsel_id)
+ return !gpiod_get_raw_value(di->vsel_gpio);
+ else
+ return gpiod_get_raw_value(di->vsel_gpio);
+ }
+
+ ret = regmap_read(di->regmap, di->en_reg, &val);
+ if (ret < 0)
+ return ret;
+ if (val & VSEL_BUCK_EN)
+ return 1;
+ else
+ return 0;
+}
+
+static int rk860x_set_mode(struct regulator_dev *rdev, unsigned int mode)
+{
+ struct rk860x_device_info *di = rdev_get_drvdata(rdev);
+
+ switch (mode) {
+ case REGULATOR_MODE_FAST:
+ regmap_update_bits(di->regmap, di->mode_reg,
+ di->mode_mask, di->mode_mask);
+ break;
+ case REGULATOR_MODE_NORMAL:
+ regmap_update_bits(di->regmap, di->mode_reg, di->mode_mask, 0);
+ break;
+ default:
+ return -EINVAL;
+ }
+ return 0;
+}
+
+static unsigned int rk860x_get_mode(struct regulator_dev *rdev)
+{
+ struct rk860x_device_info *di = rdev_get_drvdata(rdev);
+ unsigned int val;
+ int ret = 0;
+
+ ret = regmap_read(di->regmap, di->mode_reg, &val);
+ if (ret < 0)
+ return ret;
+ if (val & di->mode_mask)
+ return REGULATOR_MODE_FAST;
+ else
+ return REGULATOR_MODE_NORMAL;
+}
+
+static const int slew_rates[] = {
+ 64000,
+ 32000,
+ 16000,
+ 8000,
+ 4000,
+ 2000,
+ 1000,
+ 500,
+};
+
+static int rk860x_set_ramp(struct regulator_dev *rdev, int ramp)
+{
+ struct rk860x_device_info *di = rdev_get_drvdata(rdev);
+ int regval = -1, i;
+ const int *slew_rate_t;
+ int slew_rate_n;
+
+ slew_rate_t = slew_rates;
+ slew_rate_n = ARRAY_SIZE(slew_rates);
+
+ for (i = 0; i < slew_rate_n; i++) {
+ if (ramp <= slew_rate_t[i])
+ regval = i;
+ else
+ break;
+ }
+
+ if (regval < 0) {
+ dev_err(di->dev, "unsupported ramp value %d\n", ramp);
+ return -EINVAL;
+ }
+
+ return regmap_update_bits(di->regmap, di->slew_reg,
+ di->slew_mask, regval << di->slew_shift);
+}
+
+static const struct regulator_ops rk860x_regulator_ops = {
+ .set_voltage_sel = regulator_set_voltage_sel_regmap,
+ .get_voltage_sel = rk860x_get_voltage,
+ .set_voltage_time_sel = regulator_set_voltage_time_sel,
+ .map_voltage = regulator_map_voltage_linear,
+ .list_voltage = regulator_list_voltage_linear,
+ .set_suspend_voltage = rk860x_set_suspend_voltage,
+ .enable = rk860x_set_enable,
+ .disable = rk860x_set_disable,
+ .is_enabled = rk860x_is_enabled,
+ .set_mode = rk860x_set_mode,
+ .get_mode = rk860x_get_mode,
+ .set_ramp_delay = rk860x_set_ramp,
+ .set_suspend_enable = rk860x_set_suspend_enable,
+ .set_suspend_disable = rk860x_set_suspend_disable,
+ .resume = rk860x_resume,
+};
+
+/* For 00,01 options:
+ * VOUT = 0.7125V + NSELx * 12.5mV, from 0.7125 to 1.5V.
+ * For 02,03 options:
+ * VOUT = 0.5V + NSELx * 6.25mV, from 0.5 to 1.5V.
+ */
+static int rk860x_device_setup(struct rk860x_device_info *di,
+ struct rk860x_platform_data *pdata)
+{
+ int ret = 0;
+ u32 val = 0;
+
+ switch (di->chip_id) {
+ case RK860X_CHIP_ID_00:
+ case RK860X_CHIP_ID_01:
+ di->vsel_min = 712500;
+ di->vsel_step = 12500;
+ di->n_voltages = RK860X_NVOLTAGES_64;
+ di->vol_mask = VSEL_A_NSEL_MASK;
+ if (di->sleep_vsel_id) {
+ di->sleep_reg = RK860X_VSEL1_A;
+ di->vol_reg = RK860X_VSEL0_A;
+ di->mode_reg = RK860X_VSEL0_A;
+ di->en_reg = RK860X_VSEL0_A;
+ di->sleep_en_reg = RK860X_VSEL1_A;
+ } else {
+ di->sleep_reg = RK860X_VSEL0_A;
+ di->vol_reg = RK860X_VSEL1_A;
+ di->mode_reg = RK860X_VSEL1_A;
+ di->en_reg = RK860X_VSEL1_A;
+ di->sleep_en_reg = RK860X_VSEL0_A;
+ }
+ break;
+ case RK860X_CHIP_ID_02:
+ case RK860X_CHIP_ID_03:
+ di->vsel_min = 500000;
+ di->vsel_step = 6250;
+ di->n_voltages = RK860X_NVOLTAGES_160;
+ di->vol_mask = VSEL_B_NSEL_MASK;
+ if (di->sleep_vsel_id) {
+ di->sleep_reg = RK860X_VSEL1_B;
+ di->vol_reg = RK860X_VSEL0_B;
+ di->mode_reg = RK860X_VSEL0_A;
+ di->en_reg = RK860X_VSEL0_A;
+ di->sleep_en_reg = RK860X_VSEL1_A;
+ } else {
+ di->sleep_reg = RK860X_VSEL0_B;
+ di->vol_reg = RK860X_VSEL1_B;
+ di->mode_reg = RK860X_VSEL1_A;
+ di->en_reg = RK860X_VSEL1_A;
+ di->sleep_en_reg = RK860X_VSEL0_A;
+ }
+ break;
+ default:
+ dev_err(di->dev, "Chip ID %d not supported!\n", di->chip_id);
+ return -EINVAL;
+ }
+
+ di->mode_mask = VSEL_MODE;
+ di->slew_reg = RK860X_CONTROL;
+ di->slew_mask = CTL_SLEW_MASK;
+ di->slew_shift = CTL_SLEW_SHIFT;
+
+ if (pdata->limit_volt) {
+ if (pdata->limit_volt < di->vsel_min ||
+ pdata->limit_volt > 1500000)
+ pdata->limit_volt = 1500000;
+ val = (pdata->limit_volt - di->vsel_min) / di->vsel_step;
+ ret = regmap_write(di->regmap, RK860X_MAX_SET, val);
+ if (ret < 0) {
+ dev_err(di->dev, "Failed to set limit voltage!\n");
+ return ret;
+ }
+ }
+
+ return ret;
+}
+
+static int rk860x_regulator_register(struct rk860x_device_info *di,
+ struct regulator_config *config)
+{
+ struct regulator_desc *rdesc = &di->desc;
+
+ rdesc->name = "rk860x-reg";
+ rdesc->supply_name = "vin";
+ rdesc->ops = &rk860x_regulator_ops;
+ rdesc->type = REGULATOR_VOLTAGE;
+ rdesc->n_voltages = di->n_voltages;
+ rdesc->enable_reg = di->en_reg;
+ rdesc->enable_mask = VSEL_BUCK_EN;
+ rdesc->min_uV = di->vsel_min;
+ rdesc->uV_step = di->vsel_step;
+ rdesc->vsel_reg = di->vol_reg;
+ rdesc->vsel_mask = di->vol_mask;
+ rdesc->owner = THIS_MODULE;
+ rdesc->enable_time = 400;
+
+ di->rdev = devm_regulator_register(di->dev, &di->desc, config);
+ return PTR_ERR_OR_ZERO(di->rdev);
+}
+
+static const struct regmap_config rk860x_regmap_config = {
+ .reg_bits = 8,
+ .val_bits = 8,
+};
+
+static struct rk860x_platform_data *
+rk860x_parse_dt(struct device *dev, struct device_node *np,
+ const struct regulator_desc *desc)
+{
+ struct rk860x_platform_data *pdata;
+ int ret, flag, limit_volt;
+ u32 tmp;
+
+ pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
+ if (!pdata)
+ return NULL;
+
+ pdata->regulator = of_get_regulator_init_data(dev, np, desc);
+ pdata->regulator->constraints.initial_state = PM_SUSPEND_MEM;
+
+ if (!(of_property_read_u32(np, "limit-microvolt", &limit_volt)))
+ pdata->limit_volt = limit_volt;
+
+ ret = of_property_read_u32(np, "rockchip,suspend-voltage-selector",
+ &tmp);
+ if (!ret)
+ pdata->sleep_vsel_id = tmp;
+
+ if (pdata->sleep_vsel_id)
+ flag = GPIOD_OUT_LOW;
+ else
+ flag = GPIOD_OUT_HIGH;
+
+ pdata->vsel_gpio = devm_gpiod_get_index_optional(dev, "vsel", 0, flag);
+ if (IS_ERR(pdata->vsel_gpio)) {
+ ret = PTR_ERR(pdata->vsel_gpio);
+ dev_err(dev, "failed to get vesl gpio (%d)\n", ret);
+ pdata->vsel_gpio = NULL;
+ }
+
+ return pdata;
+}
+
+static const struct of_device_id rk860x_dt_ids[] = {
+ {
+ .compatible = "rockchip,rk8600",
+ .data = (void *)RK860X_CHIP_ID_00
+ },
+ {
+ .compatible = "rockchip,rk8601",
+ .data = (void *)RK860X_CHIP_ID_01
+ },
+ {
+ .compatible = "rockchip,rk8602",
+ .data = (void *)RK860X_CHIP_ID_02
+ },
+ {
+ .compatible = "rockchip,rk8603",
+ .data = (void *)RK860X_CHIP_ID_03
+ },
+
+ { }
+};
+MODULE_DEVICE_TABLE(of, rk860x_dt_ids);
+
+static int rk860x_regulator_probe(struct i2c_client *client,
+ const struct i2c_device_id *id)
+{
+ struct device_node *np = client->dev.of_node;
+ struct rk860x_device_info *di;
+ struct rk860x_platform_data *pdata;
+ struct regulator_config config = { };
+ unsigned int val;
+ int ret;
+
+ di = devm_kzalloc(&client->dev, sizeof(*di), GFP_KERNEL);
+ if (!di)
+ return -ENOMEM;
+
+ di->desc.of_map_mode = rk860x_map_mode;
+
+ pdata = dev_get_platdata(&client->dev);
+ if (!pdata)
+ pdata = rk860x_parse_dt(&client->dev, np, &di->desc);
+
+ if (!pdata || !pdata->regulator) {
+ dev_err(&client->dev, "Platform data not found!\n");
+ return -ENODEV;
+ }
+
+ di->vsel_gpio = pdata->vsel_gpio;
+ di->sleep_vsel_id = pdata->sleep_vsel_id;
+
+ di->regulator = pdata->regulator;
+ if (client->dev.of_node) {
+ di->chip_id =
+ (unsigned long)of_device_get_match_data(&client->dev);
+ } else {
+ /* if no ramp constraint set, get the pdata ramp_delay */
+ if (!di->regulator->constraints.ramp_delay) {
+ int slew_idx = (pdata->slew_rate & 0x7)
+ ? pdata->slew_rate : 0;
+
+ di->regulator->constraints.ramp_delay =
+ slew_rates[slew_idx];
+ }
+ di->chip_id = id->driver_data;
+ }
+
+ di->regmap = devm_regmap_init_i2c(client, &rk860x_regmap_config);
+ if (IS_ERR(di->regmap)) {
+ dev_err(&client->dev, "Failed to allocate regmap!\n");
+ return PTR_ERR(di->regmap);
+ }
+ di->dev = &client->dev;
+ i2c_set_clientdata(client, di);
+ /* Get chip ID */
+ ret = regmap_read(di->regmap, RK860X_ID1, &val);
+ if (ret < 0) {
+ dev_err(&client->dev, "Failed to get chip ID!\n");
+ return ret;
+ }
+
+ switch (di->chip_id) {
+ case RK860X_CHIP_ID_00:
+ case RK860X_CHIP_ID_01:
+ if ((val & DIE_ID) != 0x8) {
+ dev_err(&client->dev, "Failed to match chip ID!\n");
+ return -EINVAL;
+ }
+ break;
+ case RK860X_CHIP_ID_02:
+ case RK860X_CHIP_ID_03:
+ if ((val & DIE_ID) != 0xa) {
+ dev_err(&client->dev, "Failed to match chip ID!\n");
+ return -EINVAL;
+ }
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ /* Device init */
+ ret = rk860x_device_setup(di, pdata);
+ if (ret < 0) {
+ dev_err(&client->dev, "Failed to setup device!\n");
+ return ret;
+ }
+ /* Register regulator */
+ config.dev = di->dev;
+ config.init_data = di->regulator;
+ config.regmap = di->regmap;
+ config.driver_data = di;
+ config.of_node = np;
+
+ ret = rk860x_regulator_register(di, &config);
+ if (ret < 0)
+ dev_err(&client->dev, "Failed to register regulator!\n");
+
+ return ret;
+}
+
+static void rk860x_regulator_shutdown(struct i2c_client *client)
+{
+ struct rk860x_device_info *di;
+ int ret;
+
+ di = i2c_get_clientdata(client);
+
+ dev_info(di->dev, "rk860..... reset\n");
+
+ ret = regmap_update_bits(di->regmap, di->slew_reg,
+ CTL_RESET, CTL_RESET);
+
+ if (ret < 0)
+ dev_err(di->dev, "force rk860x_reset error! ret=%d\n", ret);
+ else
+ dev_info(di->dev, "force rk860x_reset ok!\n");
+}
+
+static const struct i2c_device_id rk860x_id[] = {
+ { .name = "rk8600", .driver_data = RK860X_CHIP_ID_00 },
+ { .name = "rk8601", .driver_data = RK860X_CHIP_ID_01 },
+ { .name = "rk8602", .driver_data = RK860X_CHIP_ID_02 },
+ { .name = "rk8603", .driver_data = RK860X_CHIP_ID_03 },
+ {},
+};
+MODULE_DEVICE_TABLE(i2c, rk860x_id);
+
+static struct i2c_driver rk860x_regulator_driver = {
+ .driver = {
+ .name = "rk860-regulator",
+ .of_match_table = of_match_ptr(rk860x_dt_ids),
+ },
+ .probe = rk860x_regulator_probe,
+ .shutdown = rk860x_regulator_shutdown,
+ .id_table = rk860x_id,
+};
+
+module_i2c_driver(rk860x_regulator_driver);
+
+MODULE_AUTHOR("Elaine Zhang <zhangqing@rock-chips.com>");
+MODULE_DESCRIPTION("rk860x regulator driver");
+MODULE_LICENSE("GPL v2");
--
2.25.1

View File

@@ -1,18 +1,18 @@
From e86272fa8063a047a55a9548400a95742f1c2d2a Mon Sep 17 00:00:00 2001
From be773999495258994d1df04448a4de43d58db9c4 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
---
drivers/mfd/rk808.c | 1 +
drivers/mfd/rk8xx-core.c | 1 +
include/linux/mfd/rk808.h | 5 +++++
2 files changed, 6 insertions(+)
diff --git a/drivers/mfd/rk808.c b/drivers/mfd/rk808.c
index e00da7c7e..ae3c99809 100644
--- a/drivers/mfd/rk808.c
+++ b/drivers/mfd/rk808.c
@@ -300,6 +300,7 @@ static const struct rk808_reg_data rk817_pre_init_reg[] = {
diff --git a/drivers/mfd/rk8xx-core.c b/drivers/mfd/rk8xx-core.c
index a577f950c632..418a4506c99e 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[] = {
{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 e00da7c7e..ae3c99809 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 9af1f3105..d02e56e09 100644
index 78e167a92483..0bd7031966d6 100644
--- a/include/linux/mfd/rk808.h
+++ b/include/linux/mfd/rk808.h
@@ -644,6 +644,11 @@ enum rk809_reg_id {
@@ -1052,6 +1052,11 @@ enum rk809_reg_id {
#define RK817_ON_SOURCE_REG 0xf5
#define RK817_OFF_SOURCE_REG 0xf6
@@ -36,6 +36,3 @@ index 9af1f3105..d02e56e09 100644
/* INTERRUPT REGISTER */
#define RK817_INT_STS_REG0 0xf8
#define RK817_INT_STS_MSK_REG0 0xf9
--
2.25.1

View File

@@ -1,4 +1,4 @@
From 5f1f9863bf1031e608537945fdc97e099cb9e42c Mon Sep 17 00:00:00 2001
From 41026603d639007895de1f48437813f78edb62ea 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 d0830df48..66ef38600 100644
index b5e4a67b3fc7..debb9459a5aa 100644
--- a/arch/arm64/boot/dts/rockchip/rk3566-ha-green.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3566-ha-green.dts
@@ -566,36 +566,9 @@ &sfc {
@@ -565,36 +565,9 @@ &sfc {
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
@@ -50,6 +50,3 @@ index d0830df48..66ef38600 100644
};
};
--
2.25.1

View File

@@ -1,7 +1,4 @@
From 32ee0c67a53f541f42b3a953e992bac12d5375d6 Mon Sep 17 00:00:00 2001
Message-ID: <32ee0c67a53f541f42b3a953e992bac12d5375d6.1689754249.git.stefan@agner.ch>
In-Reply-To: <fa0e84b5fbb7b6ce0b161bfcfe495f3648d02110.1689754249.git.stefan@agner.ch>
References: <fa0e84b5fbb7b6ce0b161bfcfe495f3648d02110.1689754249.git.stefan@agner.ch>
From 0c8b1453993f15715836123bfc7c164e568913f2 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
@@ -36,6 +33,3 @@ index 76873aa005b4..139419033c84 100644
input_sync(pwr);
return IRQ_HANDLED;
--
2.41.0

View File

@@ -1,4 +1,4 @@
From 10c2c3afa62f58c4f795a0777aa8635428e3c78a Mon Sep 17 00:00:00 2001
From 858d26179ee3a06fc7ebadf2c49dc337a7a98485 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 f742b904a..3b564950f 100644
index debb9459a5aa..e4b1e80641b9 100644
--- a/arch/arm64/boot/dts/rockchip/rk3566-ha-green.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3566-ha-green.dts
@@ -533,6 +533,7 @@ &saradc {
@@ -532,6 +532,7 @@ &saradc {
&sdhci {
bus-width = <8>;
@@ -19,6 +19,3 @@ index f742b904a..3b564950f 100644
max-frequency = <200000000>;
non-removable;
pinctrl-names = "default";
--
2.25.1

View File

@@ -1,7 +1,4 @@
From 6c1abc949a978492bd9a1b30f4faaa2329d93068 Mon Sep 17 00:00:00 2001
Message-ID: <6c1abc949a978492bd9a1b30f4faaa2329d93068.1693860223.git.stefan@agner.ch>
In-Reply-To: <fa0e84b5fbb7b6ce0b161bfcfe495f3648d02110.1693860223.git.stefan@agner.ch>
References: <fa0e84b5fbb7b6ce0b161bfcfe495f3648d02110.1693860223.git.stefan@agner.ch>
From 6b926b041e939655d3a88202bde32f4901459a65 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
@@ -12,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 5be4368767a1..d4bd90b7f0d6 100644
index e4b1e80641b9..1d0db11db3e0 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 {
@@ -47,6 +44,3 @@ index 5be4368767a1..d4bd90b7f0d6 100644
gpios = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>;
function = LED_FUNCTION_HEARTBEAT;
color = <LED_COLOR_ID_YELLOW>;
--
2.42.0

View File

@@ -1,8 +1,7 @@
From 2ab36c774a9f16c10a2bffeb602a9c914ffacd00 Mon Sep 17 00:00:00 2001
Message-ID: <2ab36c774a9f16c10a2bffeb602a9c914ffacd00.1692346980.git.stefan@agner.ch>
From 501ac314ef709d6ecac3047310d5e48a473df638 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 1/9] arch: arm: dts: Add NabuCasa Green board
Subject: [PATCH] arch: arm: dts: Add NabuCasa Green board
---
arch/arm/dts/Makefile | 1 +
@@ -15,17 +14,17 @@ Subject: [PATCH 1/9] arch: arm: dts: Add NabuCasa Green board
create mode 100644 configs/green_defconfig
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 480269fa60..b82ebfe371 100644
index 9d28a485be..f78839f9cc 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -167,6 +167,7 @@ dtb-$(CONFIG_ROCKCHIP_RK3399) += \
@@ -172,6 +172,7 @@ dtb-$(CONFIG_ROCKCHIP_RK3399) += \
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 \
rk3568-evb.dtb \
rk3568-rock-3a.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
@@ -832,5 +831,5 @@ index 0000000000..0617d308aa
+# CONFIG_BINMAN_FDT is not set
+CONFIG_ERRNO_STR=y
--
2.41.0
2.43.0

View File

@@ -1,10 +1,7 @@
From d4f52bc53540341dcb3408a3f2d4ec8bd1fe260a Mon Sep 17 00:00:00 2001
Message-ID: <d4f52bc53540341dcb3408a3f2d4ec8bd1fe260a.1692346980.git.stefan@agner.ch>
In-Reply-To: <2ab36c774a9f16c10a2bffeb602a9c914ffacd00.1692346980.git.stefan@agner.ch>
References: <2ab36c774a9f16c10a2bffeb602a9c914ffacd00.1692346980.git.stefan@agner.ch>
From 6441bdb22a25649ff8fd69aa8f8a7285d9c37266 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 2/9] configs: green: Support USB boot
Subject: [PATCH] configs: green: Support USB boot
---
configs/green_defconfig | 52 ++++++++++++++++++++++++++++-------------
@@ -116,5 +113,5 @@ index 0617d308aa..14960b67d2 100644
+CONFIG_USB_DWC3=y
CONFIG_ERRNO_STR=y
--
2.41.0
2.43.0

View File

@@ -1,10 +1,7 @@
From c59235f8be1bdd261e1677177c1bef1bee1025ea Mon Sep 17 00:00:00 2001
Message-ID: <c59235f8be1bdd261e1677177c1bef1bee1025ea.1692346980.git.stefan@agner.ch>
In-Reply-To: <2ab36c774a9f16c10a2bffeb602a9c914ffacd00.1692346980.git.stefan@agner.ch>
References: <2ab36c774a9f16c10a2bffeb602a9c914ffacd00.1692346980.git.stefan@agner.ch>
From d8b8b614d19dbb3fa004677a2c2e50b685a80192 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 3/9] arch: arm: dts: rk3566: green: boot order
Subject: [PATCH] arch: arm: dts: rk3566: green: boot order
---
arch/arm/dts/rk3566-ha-green-u-boot.dtsi | 6 +++++-
@@ -49,5 +46,5 @@ index 15d2b73433..bf0f81c3a1 100644
reg = <0>;
spi-max-frequency = <100000000>;
--
2.41.0
2.43.0

View File

@@ -1,10 +1,7 @@
From e525d29174f335fe9aa72da8642699609631b2be Mon Sep 17 00:00:00 2001
Message-ID: <e525d29174f335fe9aa72da8642699609631b2be.1692346980.git.stefan@agner.ch>
In-Reply-To: <2ab36c774a9f16c10a2bffeb602a9c914ffacd00.1692346980.git.stefan@agner.ch>
References: <2ab36c774a9f16c10a2bffeb602a9c914ffacd00.1692346980.git.stefan@agner.ch>
From e14d7d56b293ba01c5b73a4b3483795d78c75172 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 4/9] arch: arm: dts: green: spi nor uboot
Subject: [PATCH] arch: arm: dts: green: spi nor uboot
---
arch/arm/dts/rk3566-ha-green-u-boot.dtsi | 88 +++++++++++++++++++++++-
@@ -154,5 +151,5 @@ index 14960b67d2..5f94c06279 100644
CONFIG_GMAC_ROCKCHIP=y
CONFIG_PHY_ROCKCHIP_INNO_USB2=y
--
2.41.0
2.43.0

View File

@@ -1,11 +1,7 @@
From 0088369711a0b57b598121dad60b52de0426a180 Mon Sep 17 00:00:00 2001
Message-ID: <0088369711a0b57b598121dad60b52de0426a180.1692346980.git.stefan@agner.ch>
In-Reply-To: <2ab36c774a9f16c10a2bffeb602a9c914ffacd00.1692346980.git.stefan@agner.ch>
References: <2ab36c774a9f16c10a2bffeb602a9c914ffacd00.1692346980.git.stefan@agner.ch>
From acec57c77e10230fc32820046301cb2a59c431d4 Mon Sep 17 00:00:00 2001
From: Stefan Agner <stefan@agner.ch>
Date: Thu, 17 Aug 2023 17:38:13 +0200
Subject: [PATCH 5/9] board: green: add Green board to read board specific
EEPROM
Subject: [PATCH] board: green: add Green board to read board specific EEPROM
Use board specific code to read serial number and MAC address from
on-board I2C EEPROM.
@@ -44,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 94e04b79e7..5858c3921d 100644
index baa51349f4..42652dec03 100644
--- a/arch/arm/mach-rockchip/rk3568/Kconfig
+++ b/arch/arm/mach-rockchip/rk3568/Kconfig
@@ -17,6 +17,12 @@ config TARGET_ANBERNIC_RGXX3_RK3566
@@ -57,14 +53,15 @@ index 94e04b79e7..5858c3921d 100644
+ Nabu Casa's Home Assistant Green single board computer with a RK3566
+ SoC.
+
endchoice
config ROCKCHIP_BOOT_MODE_REG
@@ -33,5 +39,6 @@ config SYS_MALLOC_F_LEN
config TARGET_ODROID_M1_RK3568
bool "ODROID-M1"
help
@@ -44,6 +50,7 @@ config SYS_MALLOC_F_LEN
source "board/rockchip/evb_rk3568/Kconfig"
source "board/anbernic/rgxx3_rk3566/Kconfig"
source "board/hardkernel/odroid_m1/Kconfig"
+source "board/nabucasa/ha-green/Kconfig"
source "board/pine64/quartz64_rk3566/Kconfig"
endif
diff --git a/board/nabucasa/ha-green/Kconfig b/board/nabucasa/ha-green/Kconfig
@@ -207,5 +204,5 @@ index 0000000000..e42d9c8e8c
+
+#endif
--
2.41.0
2.43.0

View File

@@ -1,10 +1,7 @@
From 9fd3b62354064d44fd391907f48d7800c6839c8a Mon Sep 17 00:00:00 2001
Message-ID: <9fd3b62354064d44fd391907f48d7800c6839c8a.1692346980.git.stefan@agner.ch>
In-Reply-To: <2ab36c774a9f16c10a2bffeb602a9c914ffacd00.1692346980.git.stefan@agner.ch>
References: <2ab36c774a9f16c10a2bffeb602a9c914ffacd00.1692346980.git.stefan@agner.ch>
From 51f1bdec59b8f62ac00a37e97a7bb8ebfc9f61d7 Mon Sep 17 00:00:00 2001
From: syan <syan.cham@gmail.com>
Date: Mon, 31 Jul 2023 09:39:55 +0000
Subject: [PATCH 6/9] green: spl loader uboot order: sd-emmc-spi_nor
Subject: [PATCH] green: spl loader uboot order: sd-emmc-spi_nor
---
arch/arm/dts/rk3566-ha-green-u-boot.dtsi | 2 +-
@@ -24,5 +21,5 @@ index fa98078fce..48d7b61513 100644
};
--
2.41.0
2.43.0

View File

@@ -1,10 +1,7 @@
From 24c253f85e04cc09b675c41490bad0c69338c2c6 Mon Sep 17 00:00:00 2001
Message-ID: <24c253f85e04cc09b675c41490bad0c69338c2c6.1692346980.git.stefan@agner.ch>
In-Reply-To: <2ab36c774a9f16c10a2bffeb602a9c914ffacd00.1692346980.git.stefan@agner.ch>
References: <2ab36c774a9f16c10a2bffeb602a9c914ffacd00.1692346980.git.stefan@agner.ch>
From 0142d1a99d2aa4a6dad7181dcd74958b2ee0fe31 Mon Sep 17 00:00:00 2001
From: Stefan Agner <stefan@agner.ch>
Date: Thu, 17 Aug 2023 17:51:07 +0200
Subject: [PATCH 8/9] green: Fix SPI Flash alias
Subject: [PATCH] green: Fix SPI Flash alias
Use the commonly used SPI flash bus 4. This allows to access SPI NOR
flash from regular U-Boot as well.
@@ -42,5 +39,5 @@ index a97391f295..71c9257d7d 100644
CONFIG_GMAC_ROCKCHIP=y
CONFIG_PHY_ROCKCHIP_INNO_USB2=y
--
2.41.0
2.43.0

View File

@@ -1,76 +0,0 @@
From 59eeea1cb0b1a0b254c759dceeface686aa8f24b Mon Sep 17 00:00:00 2001
Message-ID: <59eeea1cb0b1a0b254c759dceeface686aa8f24b.1692346980.git.stefan@agner.ch>
In-Reply-To: <2ab36c774a9f16c10a2bffeb602a9c914ffacd00.1692346980.git.stefan@agner.ch>
References: <2ab36c774a9f16c10a2bffeb602a9c914ffacd00.1692346980.git.stefan@agner.ch>
From: Jonas Karlman <jonas@kwiboo.se>
Date: Fri, 28 Jul 2023 12:05:40 +0000
Subject: [PATCH 7/9] rockchip: rk3568-rock-3a: Fix SPI Flash alias
The commit 64f79f88a751 ("rockchip: rk3568-rock-3a: Enable boot from SPI
NOR flash") enabled SPI flash support by overriding the spi0 alias.
Correct this by adding a new spi4 alias in rk356x-u-boot.dtsi and
SF_DEFAULT_BUS=4 and SPL_DM_SEQ_ALIAS=y in defconfig. Also enabled
support for parsing and auto discovery of parameters, SFDP.
Fixes: 64f79f88a751 ("rockchip: rk3568-rock-3a: Enable boot from SPI NOR flash")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 52f6b96d27c8aabca697ac395e86a3481f1c53b7)
---
arch/arm/dts/rk3568-rock-3a-u-boot.dtsi | 4 ----
arch/arm/dts/rk356x-u-boot.dtsi | 1 +
configs/rock-3a-rk3568_defconfig | 3 +++
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/arm/dts/rk3568-rock-3a-u-boot.dtsi b/arch/arm/dts/rk3568-rock-3a-u-boot.dtsi
index bbf54f888f..cb40dc31d1 100644
--- a/arch/arm/dts/rk3568-rock-3a-u-boot.dtsi
+++ b/arch/arm/dts/rk3568-rock-3a-u-boot.dtsi
@@ -7,10 +7,6 @@
#include "rk356x-u-boot.dtsi"
/ {
- aliases {
- spi0 = &sfc;
- };
-
chosen {
stdout-path = &uart2;
};
diff --git a/arch/arm/dts/rk356x-u-boot.dtsi b/arch/arm/dts/rk356x-u-boot.dtsi
index c340c2bba6..e7b46bb2d4 100644
--- a/arch/arm/dts/rk356x-u-boot.dtsi
+++ b/arch/arm/dts/rk356x-u-boot.dtsi
@@ -9,6 +9,7 @@
aliases {
mmc0 = &sdhci;
mmc1 = &sdmmc0;
+ spi4 = &sfc;
};
chosen {
diff --git a/configs/rock-3a-rk3568_defconfig b/configs/rock-3a-rk3568_defconfig
index 753d03914d..92eb6b3f1c 100644
--- a/configs/rock-3a-rk3568_defconfig
+++ b/configs/rock-3a-rk3568_defconfig
@@ -54,6 +54,7 @@ CONFIG_CMD_REGULATOR=y
CONFIG_SPL_OF_CONTROL=y
CONFIG_OF_LIVE=y
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
CONFIG_SPL_SYSCON=y
CONFIG_SPL_CLK=y
@@ -66,6 +67,8 @@ 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_MACRONIX=y
CONFIG_SPI_FLASH_XTX=y
CONFIG_ETH_DESIGNWARE=y
--
2.41.0

View File

@@ -1,10 +1,7 @@
From c0ee04d554802a7b7af3e6ec6b3d9b4160c75126 Mon Sep 17 00:00:00 2001
Message-ID: <c0ee04d554802a7b7af3e6ec6b3d9b4160c75126.1692346980.git.stefan@agner.ch>
In-Reply-To: <2ab36c774a9f16c10a2bffeb602a9c914ffacd00.1692346980.git.stefan@agner.ch>
References: <2ab36c774a9f16c10a2bffeb602a9c914ffacd00.1692346980.git.stefan@agner.ch>
From 846df62342a4904a91aace66e9204ae3ed4ca0af Mon Sep 17 00:00:00 2001
From: Stefan Agner <stefan@agner.ch>
Date: Fri, 18 Aug 2023 10:06:24 +0200
Subject: [PATCH 9/9] arch: arm: dts: green: drop SPI NOR flash partitions
Subject: [PATCH] arch: arm: dts: green: drop SPI NOR flash partitions
---
arch/arm/dts/rk3566-ha-green.dts | 27 ---------------------------
@@ -49,5 +46,5 @@ index 91afadf0e6..68d836911e 100644
};
--
2.41.0
2.43.0

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