Compare commits

...

364 Commits

Author SHA1 Message Date
Joakim Sørensen
f97c1b7c40 Add missing version to test action 2023-11-01 09:36:29 +01:00
Stefan Agner
204bd8bb56 Pass secrets to artifacts index generation workflow (#2893) 2023-10-31 23:22:10 +01:00
Jan Čermák
2888ccf28e Improve handling of timeouts in tests (#2890)
* Improve handling of timeouts in tests

Make timeout handling in tests more transparent. Added a custom shell
driver that allows to define global timeout for commands in the config
file, and replaced for/sleep constructs with infinite loops that will be
eventually terminated by pytest-timeout plugin. Current timeouts taken
from last runs on Github CI with some extra headroom.

* test_supervisor_is_updated shouldn't be skipped if no update was needed

* Allow more time for system startup

* Allow even more time for system startup
2023-10-31 18:16:49 +01:00
Stefan Agner
c33fc03fd6 Checkout source code when uploading artifacts index (#2892)
The index.html file comes from the repository source directory. Make sure
it is checked out when regenerating the artifacts index.
2023-10-31 14:37:02 +01:00
Jan Čermák
d7e3a8b985 Fix the condition for OS artifact download (#2891) 2023-10-31 14:08:49 +01:00
Stefan Agner
e4e4c62834 Fix quotes in artifact index generation (#2889) 2023-10-31 14:00:19 +01:00
Stefan Agner
2e8b66d283 Separate artifacts index update into separate workflow (#2888)
* Separate artifacts index update into separate workflow

* Apply suggestions from code review

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

---------

Co-authored-by: Jan Čermák <sairon@users.noreply.github.com>
2023-10-31 13:50:35 +01:00
Jan Čermák
54cab43ea3 Add a flag to determine tests were called from another workflow (#2887)
If a reusable workflow is called from another workflow, the event_type
in the child workflow is still the same as parent's. This is a known
"feature": https://github.com/actions/runner/discussions/1884

Add a flag to inputs that has default value set to true. This is in turn
set only if the workflow is called from another one, chosing the correct
step for obtaining the OS image.
2023-10-31 10:12:37 +01:00
Jan Čermák
d39a767bfb Bump HAOS beta when stable version is released (#2885)
Beta users should also get latest stable without the need for manual
bump.

Suggested here: https://github.com/home-assistant/operating-system/pull/2855#discussion_r1368678727
2023-10-31 10:12:29 +01:00
Jan Čermák
5e5462ddde Always use environment for bump_version job (#2884)
As discussed here: https://github.com/home-assistant/operating-system/pull/2855#discussion_r1368533496
2023-10-31 10:12:21 +01:00
Jan Čermák
39778e882a Add test suite for Supervisor tests (#2880)
* Add test suite for Supervisor tests

* test_supervisor_is_updated should depend on test_update_supervisor

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

---------

Co-authored-by: Stefan Agner <stefan@agner.ch>
2023-10-31 10:12:10 +01:00
Stefan Agner
e1be4f3efb Bump buildroot to update Docker to v24.0.7 (#2883)
* buildroot 82003cc280...2a3f23fc4b (2):
  > package/docker-cli: bump version to v24.0.7
  > package/docker-engine: bump version to v24.0.7
2023-10-30 15:42:13 +01:00
Jan Čermák
ae711734bf Run tests within build workflow (#2882) 2023-10-30 15:42:03 +01:00
Stefan Agner
6d7db27f84 Use the correct secret to clear cache on the Cloudflare frontend (#2881) 2023-10-30 14:54:22 +01:00
Stefan Agner
8133cfead8 Print object cache statistics before upload (#2874)
Print the object cache statistics before uploading them to the action
cache. The action cache accesses all files, this makes the statistics
of files used during build not useful.
2023-10-27 21:04:47 +02:00
Stefan Agner
91e82e40d9 Install AWS CLI tools in final build step (#2873) 2023-10-27 21:04:17 +02:00
Jan Čermák
6e8568c666 Optimize build cache for dev builds (#2872)
* Optimize build cache for dev builds

* Remove downloaded files cache, as it doesn't save that much time and
  it can't fit into the repo cache limit, randomly causing eviction of
  CC object cache for a single board.
* Limit saving of the object cache only to the dev branch, because
  of the restrictions for the cache access limit us from effectively
  using the cache for rc/main branches anyway.
* Adjust names of the steps a bit for clarity.

* Add printing of some cache stats

* Compare old ccache files' age to Makefile
2023-10-27 13:56:44 +02:00
Jan Čermák
252887cc0d RaspberryPi: Update kernel 6.1.58 - stable_20231024 (#2864)
* RaspberryPi: Update kernel 6.1.58 - stable_20231024

* Remove unnecessary Bluetooth patch

* Rebase Yellow patchset

---------

Co-authored-by: Stefan Agner <stefan@agner.ch>
2023-10-27 11:16:27 +02:00
Jan Čermák
4769d22b3c Add checkout step to bump_version job in the build workflow (#2871)
It's required both for the artifact index and to run the RPi Imager bump
local action.
2023-10-27 09:33:05 +02:00
Stefan Agner
28c13d7709 Fix GitHub action build.yaml (#2868) 2023-10-26 21:09:12 +02:00
Stefan Agner
9c021aa766 Linux: Update kernel 6.1.60 (#2867) 2023-10-26 20:45:06 +02:00
Stefan Agner
a1947336a8 Merge branch 'main' into dev 2023-10-26 20:25:16 +02:00
Stefan Agner
9e70ebe989 Maintain and upload artifacts index (#2839)
* Maintain and upload artifacts index

Make the artifacts browsable by maintaining a list of builds. This keeps
it up-to-date even when deleting images from the object storage, and
minimizes queries to the object storage.

* Add favicon

* Apply suggestions from code review

Co-authored-by: Joakim Sørensen <joasoe@gmail.com>

* Move index update outside of the build Matrix

* Add error handling and styling

* Exclude index files

* Add cache flush

* Use separate prefix for indexes

This allows to filter by prefix when generating the main index. Since
the list-objects-v2 is limited to 1000 entries, this will be a bottle
neck soon. Separating indexes allows to support up to 1000 nightly
builds.

* Add missing backslash

* Use cp and fix index format

* Sync index.html as well

* Move OS artifacts index file to root directory

This is not really GitHub related, so it shouldn't live in there.

* Adjust URL for dev builds

---------

Co-authored-by: Joakim Sørensen <joasoe@gmail.com>
2023-10-26 20:24:04 +02:00
Stefan Agner
12b3d62f9e Bump OS to release version 11.1 2023-10-26 11:53:26 +02:00
Jan Čermák
0ec13ca335 Add action for bumping OS version for RPi imager (#2861)
Automate bump of the rpi-imager-haos.json in the version repository on
stable release so we don't have to do it manually. Uses slightly
advanced jq magic to touch only the changed fields and keep the rest of
the JSON content intact.
2023-10-26 11:50:42 +02:00
Jan Čermák
ae42fbf235 Add action for bumping OS version for RPi imager (#2861)
Automate bump of the rpi-imager-haos.json in the version repository on
stable release so we don't have to do it manually. Uses slightly
advanced jq magic to touch only the changed fields and keep the rest of
the JSON content intact.
2023-10-26 10:21:31 +02:00
Stefan Agner
c5d21da0e8 Bump OS to development version 11.2.dev0 2023-10-23 23:09:40 +02:00
Stefan Agner
66c0435c7c Bump OS to pre-release version 11.1.rc1 2023-10-23 19:11:31 +02:00
Jan Čermák
b55e6c22c2 Do not use working-directory in test job (#2858) 2023-10-23 18:15:10 +02:00
Stefan Agner
aed1bb807c ODROID-M1: Fix environment read from SD card (#2822) (#2856)
Make sure the environment can be read and written to SD card as well.
This makes sure that first boot detection works properly too when
booting from SD card.
2023-10-23 14:25:52 +02:00
Jan Čermák
e928fa498f Use alternative environment for release build bump (#2855)
* Use alternative environment for release build bump

By using a separate environment, we can postpone the bump in the version
repository by adding a requirement for approval. Dev version will use
default (empty string) environment which doesn't have any constraints.

* Update build step name - it's not always dev build anymore

* Use dynamic environment name for beta/stable channels
2023-10-23 12:34:11 +02:00
Jan Čermák
b56f660316 Linux: Update kernel 6.1.59 (#2849) 2023-10-23 10:32:23 +02:00
Jens Maus
7f2d5c1524 Bump generic_raw_uart to 1.30 (#2847) 2023-10-23 10:32:01 +02:00
Jens Maus
f977067c18 bump qemu-guest-agent to 8.0.5 (#2846) 2023-10-23 10:30:43 +02:00
Stefan Agner
58accf39d7 Fix IPv6 routing failover for Thread (#2434) (#2845)
The patch added in #2434 is not working: IS_ENABLED requires the full
config symbol including CONFIG_ prefix.

Fix the patch to make automatic IPv6 route failover depening on IPv6
reachability probes actually work.
2023-10-20 00:10:34 +02:00
Jan Čermák
caf6611f7d Fix extraction of OVA image artifact in test step (#2842)
* Fix extraction of OVA image artifact in test step

If the test image is obtained from an artifact instead of downloading,
its name contains the version as well, in that case we still need to use
wildcard expansion.

* uncompress qcow2 to a stable filename
2023-10-19 22:58:00 +02:00
Jan Čermák
d7b32fd100 Fix path to test results in processing steps (#2837)
Working-directory is relevant only for run steps, the other steps need
full path relative to the repository root.
2023-10-18 11:31:23 +02:00
Jan Čermák
81d9a90729 Bump buildroot to update BlueZ to v5.70 (#2835)
* buildroot 81cb78a54b...82003cc280 (1):
  > package/{bluez5_utils, bluez5_utils-headers}: bump to version 5.70
2023-10-18 09:25:02 +02:00
Jan Čermák
d4cb408090 Fix test action by checking out source first (#2836)
The first action can't be action with simple run step, because it is
respecting the working-directory already. Put checkout step to the top.
2023-10-17 23:43:50 +02:00
Jan Čermák
3e36628c09 Create foundation for Labgrid-based OS tests (#2812)
* Create foundation for Labgrid-based OS tests

Add foundation for Labgrid-based tests of OS builds. Currently uses just
the QEMU driver, which starts a virtual machine with pristine OS, and
generates few log reports which are saved as build artifacts.

Workflow is currently triggered either manually by specifying an OS
version, or by OS build job, which now saves an artifact of the OVA
image. This allows for some modularity. If we eventually add the
possibility to run builds on PRs, we could also add the workflow_call
trigger and turn the workflow into a reusable one.

TBD (in future PRs): some meaningful tests and possibility to test on
real hardware (either local or distributed).

* Apply suggestions from @agners

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

* Wrap test command in a script, create venv for local tests

* Make shellcheck happy

---------

Co-authored-by: Stefan Agner <stefan@agner.ch>
2023-10-17 18:23:29 +02:00
Stefan Agner
56ccbf4b9e Bump buildroot to 2023.02.6 (#2831)
* buildroot b1c6a5e707...81cb78a54b (86):
  > Update for 2023.02.6
  > package/libhtp: bump to version 0.5.45
  > package/exim: security bump version to 4.96.2
  > package/mutt: fix libgpgme static build
  > board/raspberrypi: fix typo in comment
  > package/netsnmp: fix musl build
  > package/nmap: fix build with libressl >= 3.5.0
  > package/gcc: remove leftover from legacy PowerPC patch
  > package/samba4: security bump version to 4.18.8
  > package/libcue: security bump to version 2.3.0
  > package/go: security bump to version 1.20.10
  > {linux, linux-headers}: bump 4.{14, 19}.x / 5.{4, 10, 15}.x / 6.{1, 5}.x series
  > package/wireless-regdb: bump version to 2023.09.01
  > package/python3: bump version to 3.11.6
  > {linux, linux-headers}: bump 5.15.x / 6.{1, 5}.x series
  > package/gstreamer1-editing-services: bump to version 1.22.6
  > package/gst-omx: bump to version 1.22.6
  > package/gst1-rtsp-vaapi: bump to version 1.22.6
  > package/gst1-rtsp-server: bump to version 1.22.6
  > package/gst1-python: bump to version 1.22.6
  > package/gst1-libav: bump to version 1.22.6
  > package/gst1-devtools: bump to version 1.22.6
  > package/gst1-plugins-ugly: security bump to version 1.22.6
  > package/gst1-plugins-bad: security bump to version 1.22.6
  > package/gst1-plugins-good: security bump to version 1.22.6
  > package/gst1-plugins-base: security bump to version 1.22.6
  > package/gstreamer1: bump to version 1.22.6
  > package/cups: add upstream security fix for CVE-2023-4504
  > package/mbedtls: security bump to version 2.28.5
  > package/mbedtls: bump to version 2.28.4
  > package/mbedtls: bump to 2.28.3
  > DEVELOPERS: add Thomas Petazzoni for nodejs
  > package/exim: security bump version to 4.96.1
  > package/efl: bump to version 1.26.3
  > package/netsnmp: security bump to version 5.9.4
  > package/sslh: add SSLH_CPE_ID_VENDOR
  > package/gptfdisk: fix bug with util-linux 2.38
  > package/libmodplug: use a full-length hash as version
  > package/libmodplug: add a patch fixing cctype UB
  > package/enlightenment: security bump to version 0.25.4
  > package/wpewebkit: needs >= GCC 9
  > package/Makefile.in: set --shuffle=none for MAKE1
  > package/pkg-generic.mk: fix rule order for reinstall/rebuild/reconfigure
  > package/tar: security bump to version 1.35
  > package/go: fix installation
  > package/pkg-utils.mk: break hardlinks in global {TARGET, HOST}_DIR on per-package build
  > package/webkitgtk: require GCC 9 for the 2.40.x series
  > package/linux-tools: fix SysV init script
  > boot/at91bootstrap: disable PIE and stack-protector build flags
  > package/rockchip-mali: fix hash of generated archive
  > package/urandom-scripts: move seedrng init script to S01
  > package/opkg-utils: actually install to target
  > package/powertop: picutils is optional, not mandatory
  > package/gnu-efi: disable on mips64el
  > package/olsr: fix build with gpsd >= 3.25
  > package/python-mako: add optional runtime dependency on python-babel
  > package/python-mako: add optional runtime dependency on python-pygments
  > package/python-mako: add missing dependency on python-markupsafe
  > package/openblas: Add support for RISC-V architecture
  > package/pipewire: fix typo in Kconfig comment
  > package/go: cgo for the target needs the toolchain
  > package/go: security bump to version 1.20.9
  > package/go: security bump to version 1.20.8
  > package/go: security bump to v1.20.7
  > package/go: adjust Upstream header in patch
  > package/go: fix go-bootstrap when parent dir contains invalid .git
  > package/go-bootstrap-stage2: bump version to 1.19.11
  > package/go: bump to version 1.20.6
  > package/go: adjust comments
  > package/go-bootstrap: split into two stages: go1.4 and go1.19.10
  > package/{glibc, localedef}: security bump to version glibc-2.36-118-g22955ad85186ee05834e47e665056148ca07699c
  > package/neon: drop patches
  > package/libfastjson: security bump to version 0.99.9.1
  > package/libvpx: Add upstream security patch to fix CVE-2023-5217
  > package/libvpx: bump version to 1.13.0
  > package/mosquitto: bump to version 2.0.18
  > package/samba4: bump version to 4.18.7
  > package/php: bump version to 8.2.11
  > package/suricata: security bump to version 6.0.14
  > package/librsvg: security bump to version 2.50.9
  > unifdef: add missing license
  > package/{glibc, localedef}: security bump to 2.36-117
  > package/nodejs: fix parallel build further
  > package/libyang: security bump to version 2.1.111
  > package/bind: security bump to version 9.16.44
  > {linux, linux-headers}: bump 4.{14, 19}.x / 5.{4, 10, 15}.x / 6.{1, 4}.x series
2023-10-17 17:40:54 +02:00
Stefan Agner
44dc1781a5 Fix deployment on dev branch (#2834)
The deployment on dev channel should always be development. The change
came in from the main branch backmerge where the wrong merge strategy
has been used (the merge strategy "ort" along with option "ours" has
been used, instead of the "ours" merge strategy). And since the
deployment was a separate hunk, it resolved to the release branch.
2023-10-17 17:34:53 +02:00
Stefan Agner
157144eaa5 Linux: Update kernel 6.1.58 (#2829) 2023-10-17 10:51:43 +02:00
Stefan Agner
f946e098d6 Merge remote-tracking branch 'origin/dev' into dev 2023-10-16 14:49:14 +02:00
Stefan Agner
2a334e8c1a Merge branch 'main' into dev 2023-10-16 14:46:59 +02:00
Stefan Agner
7845199fa8 Add Home Assistant Green to GitHub infrastructure (#2828)
Add Home Assistant Green to the issue template and release drafter
configuration.
2023-10-16 14:32:36 +02:00
Stefan Agner
01e9b7d4f6 Merge branch 'main' into dev 2023-10-16 09:34:44 +02:00
Stefan Agner
f407c3de66 Use Docker 24 during build time (#2811)
use the same Docker version we deploy on Home Assistant OS during build.
2023-10-14 13:26:10 +02:00
Stefan Agner
6206f6a428 Linux: Update kernel 6.1.57 (#2807)
* Linux: Update kernel 6.1.57

* Remove now obsolete patch

* Keep Bluetooth patch for Raspberry Pi boards
2023-10-14 10:40:42 +02:00
Stefan Agner
a669a352d5 Bump OS to release version 11.0 (#2808) 2023-10-13 12:14:20 +02:00
Jan Čermák
ff7645ddaf Bump buildroot to update libcurl to v8.4.0 (#2804)
* buildroot f125c3e292...b1c6a5e707 (1):
  > package/libcurl: security bump to 8.4.0
2023-10-13 09:57:24 +02:00
Stefan Agner
30d3678c2d Bump OS to pre-release version 11.0.rc2 (#2803) 2023-10-11 22:22:08 +02:00
Jan Čermák
ff0a4b44e0 Bump buildroot to update libcurl to v8.4.0 (#2804)
* buildroot f125c3e292...b1c6a5e707 (1):
  > package/libcurl: security bump to 8.4.0
2023-10-11 10:44:50 +02:00
Stefan Agner
19ded665bd Drop uploading to the old development build server (#2802)
With the new development build uploads on R2 working, we no longer need
to upload development builds to the old server. Drop the build step.
2023-10-10 13:51:33 +02:00
xtsrthm
fc3c313509 generic-x86-64: Fix typo in kernel.config (#2801) 2023-10-10 09:31:22 +02:00
Stefan Agner
5b927389b8 Revert "RAUC update: Use verity bundle format (#2786)" (#2799)
This reverts commit 0ebcdcb9dc.

We only added verity support in HAOS 10.4. However, we currently have
an issue since HAOS 10.3 where certain Realtek network cards don't work
anymore (see issue #2630). For this systems, it won't be possible to
upgrade, even when using the console.

Only having two HAOS releases creates a rather "narrow" upgrade path
accross all boards. There could be more issues where this proves
problematic.

Currently we don't use any new feature of the verity format. Therefor
let's postpone the move to the new format for a couple of releases
for now.
2023-10-10 09:15:39 +02:00
Stefan Agner
a42ae2f25b Linux: Update kernel 6.1.56 (#2798) 2023-10-10 09:15:35 +02:00
xtsrthm
3e65e9a839 generic-x86-64: Add support for external i2c devices (#2800)
This commit adds support for usb to i2c adapters, the i2c chardev and the bme280  famaily environment sensors
2023-10-09 23:44:15 +02:00
Stefan Agner
ba23d68de7 Revert "RAUC update: Use verity bundle format (#2786)" (#2799)
This reverts commit 0ebcdcb9dc.

We only added verity support in HAOS 10.4. However, we currently have
an issue since HAOS 10.3 where certain Realtek network cards don't work
anymore (see issue #2630). For this systems, it won't be possible to
upgrade, even when using the console.

Only having two HAOS releases creates a rather "narrow" upgrade path
accross all boards. There could be more issues where this proves
problematic.

Currently we don't use any new feature of the verity format. Therefor
let's postpone the move to the new format for a couple of releases
for now.
2023-10-09 14:51:03 +02:00
Stefan Agner
b60fe22de8 Linux: Update kernel 6.1.56 (#2798) 2023-10-08 13:34:15 +02:00
Stefan Agner
f5d4379aed Bump OS to version 11.1.dev0 2023-10-05 12:08:48 +02:00
Stefan Agner
0d3cb42e47 Bump OS to pre-release version 11.0.rc1 (#2792) 2023-10-05 12:05:23 +02:00
Stefan Agner
1bec4e858b Set containerd root explicitly (#2476) (#2791)
With the move to Docker 23 containerd stores its metadata no longer
undernath the Docker data directory but at its default location at
/var/lib/containerd. Previously Docker passed a containerd configuration
toml file which explicitly set the metadata root underneath Docker's
data directory.

On Home Assistant OS, the new location /var/lib/containerd is on a tmpfs
file system. For unknown reasons, it seems that if containerd's root
directory is on a tmpfs this leads to significantly more syscalls and
hence CPU load.

Change the metadata location to be on the data partition again. Since
containerd is treated separately from Docker these days, use a new
root directory under /mnt/data for containerd as well. With this, the
CPU load of containerd is back to normal.
2023-10-05 11:24:43 +02:00
Dave T
8be78b1257 Improve grammar in README.md (#2790) 2023-10-05 08:26:23 +02:00
Stefan Agner
29ad504667 Remove unnecessary plug-ins from containerd (#2789)
* Bump buildroot

* buildroot a1bdf74b19...f125c3e292 (1):
  > package/containerd: add control for additional build tags

* Drop unnecessary containerd changes

Now that the snappshotter and the CRI plug-ins are disabled we don't
need to configure or disable them via configuration anymore. Drop the
unnecessary configs.
2023-10-04 18:19:27 +02:00
Stefan Agner
2cbaaf9f3b Fix fsfreeze freeze support (#2787)
Pass the script argument properly to make sure the script gets actually
called from the QEMU guest agent.
2023-10-03 16:21:57 +02:00
Stefan Agner
0ebcdcb9dc RAUC update: Use verity bundle format (#2786)
Move from the current plain format to the new verity bundle format. This
requires at least HAOS 10.4 to work. The Supervisor will make sure to
update to the latest minor release of the previous major release, so
updating will work in the regular use case.
2023-10-03 16:21:45 +02:00
Stefan Agner
893a49a3f3 Add fsfreeze support for QEMU/KVM/Proxmox installations (#2781)
* Add fsfreeze support for QEMU/KVM/Proxmox installations

Add fsfreeze scripts which calls the new Supervisor API to freeze Home
Assistant Core and add-ons which support the backup freeze scripts
(`backup_pre` and `backup_post`).

This allows to create safe snapshots with databases running.

* Fix lint issues
2023-10-02 08:30:20 +02:00
Joakim Sørensen
a72c6c0322 Add action job to upload artifacts to R2 (#2779) 2023-10-02 08:29:00 +02:00
Stefan Agner
56d96acd1b Bump buildroot to 2023.02.5 (#2775)
* buildroot df5fccafd8...a1bdf74b19 (1):
  > Merge tag '2023.02.5' into 2023.02.x-haos
2023-09-28 00:01:56 +02:00
clayton craft
469b109efd generic-x86-64: enable backlight support (#2772)
This enables backlight support on these hosts, which is useful if
running HASS on an old laptop or tablet and you want to (e.g.) conserve
power by controlling the backlight.
2023-09-27 23:57:37 +02:00
Stefan Agner
65271c797c Bump buildroot to update Docker to v24.0.6 (#2774)
* buildroot d6894cf55f...df5fccafd8 (3):
  > package/docker-cli: bump version to v24.0.6
  > package/docker-engine: bump version to v24.0.6
  > package/containerd: bump to version 1.7.6
2023-09-26 14:54:11 +02:00
Stefan Agner
39e867c352 Disable overlayfs features not used by Docker (#2773)
Currently `CONFIG_OVERLAY_FS_METACOPY` and
`CONFIG_OVERLAY_FS_REDIRECT_DIR` kernel options are enabled but not
preferred by Docker. The metadata copy feature is disabled by default,
and also not actively used by the overlayfs2 driver (see
2c3d1f7b4b).
So the metadata copy config is not really problematic per se. However,
it enables the redirect_dir feature. And a kernel which has the
redirect_dir feature compiled in also enables it by default. This
actually makes the overlayfs2 driver to fallback to naive diff, which
is, from what I understand, slower than the overlayfs native diff (see
also
49c3a7c4ba).
The Docker daemon is also reporting this on startup:

  Not using native diff for overlay2, this may cause degraded performance
  for building images: kernel has CONFIG_OVERLAY_FS_REDIRECT_DIR enabled

Currently `CONFIG_OVERLAY_FS_METACOPY` is enabled, and it also enables
`CONFIG_OVERLAY_FS_REDIRECT_DIR`. There was already a previous attempt
to disable the latter (see #2067).

Disable both configs explicitly until Docker is able to use them.
2023-09-26 14:54:01 +02:00
Stefan Agner
dd21a73031 Fix versioning set during build (#2771)
Respect quotes in the meta file. While at it, simplify version
validation as well.

Make sure development version is correctly set at build time.

While at it also simplify version check.
2023-09-25 18:32:57 +02:00
Stefan Agner
f9251252d9 Update and fix containerd v1.6.22 (#2770)
* Introduce containerd configuration

Configure the CNI config directory to a writeable location.

Disable unnecessary plug-ins to avoid unnecessary error messages during
containerd startup.

* Bump buildroot

* buildroot 8ea671337e...d6894cf55f (1):
  > Revert "Revert "package/containerd: bump version to v1.6.22""
2023-09-25 13:48:15 +02:00
Stefan Agner
5ea343289c Linux: Update kernel 6.1.55 (#2769) 2023-09-25 13:42:02 +02:00
Stefan Agner
3df2749171 Adjust Home Assistant OS versioning to prepare for new release strategy (#2767)
* Adjust Home Assistant versioning to prepare for new release strategy

With OS 11 we'll create rc pre-releases which will get directly pushed
to the beta channel. In contrast, release builds will get directly
pushed to the stable channel.

Similar to Home Assistant Core we'll create bump commits for all stable
and beta releases. This makes sure that the source code matches the
built binaries for all releases.

The development build will get a generated version. To avoid issues
with the new rc builds the dev build version will get injected on source
level now.

* Apply suggestions from code review
2023-09-25 13:41:50 +02:00
Stefan Agner
7870a1d78e Download latest stable Supervisor after device wipe (#2765)
* Download latest stable Supervisor after device wipe

Currently we download the latest tag after a device wipe, which gives us
the latest Supervisor (which quite likely can be a development version).
Use the stable version file instead to get the tag to be used to
download the Supervisor.

* Delete potentially corrupted updater info
2023-09-25 10:27:36 +02:00
Stefan Agner
8d6b4eb11b Unify release and dev GitHub actions (#2764)
Use a single workflow file for releases and dev builds. This avoids
duplication and enhances the release builds with some of the recent
improvements (e.g. shared build container).
2023-09-21 17:06:41 +02:00
Stefan Agner
49a487d4a2 Use latest Network device naming scheme (#2763)
This essentially reverts #2380, making sure that Home Assistant OS uses
systemd's latest network naming scheme.

We stick to a certain naming scheme to make sure NetworkManager still
applies the network configuration (which is matched by network interface
name by default).

With Supervisor [PR #4476](https://github.com/home-assistant/supervisor/pull/4476)
NetworkManager uses udev path by default. With this we can safely enable
the new interface naming and NetworkManager will still apply the
configuration based on udev path correctly.
2023-09-21 17:06:29 +02:00
Stefan Agner
86b172b9c2 Create swapfile even when not using the multi-user.target (#2762)
Pull in the swapfile creation service haos-swapfile.service when
swap.target is reached. This makes sure the service is started even when
other targets are used (e.g. rescue.target).
2023-09-21 15:30:24 +02:00
Stefan Agner
53567a86e8 Linux: Update kernel 6.1.54 (#2760) 2023-09-21 11:27:32 +02:00
dependabot[bot]
8d8327801f Bump docker/login-action from 2.2.0 to 3.0.0 (#2757)
Bumps [docker/login-action](https://github.com/docker/login-action) from 2.2.0 to 3.0.0.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v2.2.0...v3.0.0)

---
updated-dependencies:
- dependency-name: docker/login-action
  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-09-19 10:02:18 +02:00
dependabot[bot]
b7e958d498 Bump docker/build-push-action from 4.2.1 to 5.0.0 (#2758)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 4.2.1 to 5.0.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v4.2.1...v5.0.0)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  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-09-19 09:56:34 +02:00
dependabot[bot]
3e173ca77e Bump docker/setup-buildx-action from 2.10.0 to 3.0.0 (#2759)
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2.10.0 to 3.0.0.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v2.10.0...v3.0.0)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  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-09-19 09:55:24 +02:00
Stefan Agner
f8f2e61967 Delete Bluetooth device cache regularly (#2751)
* Delete Bluetooth device cache regularly

Delete stale Bluetooth devices from the BlueZ device cache every week.
This makes sure that the overlay partition doesn't run out of inodes
which has happened in real world scenarios where many new Bluetooth
devices are discovered.

BlueZ maintains these files on a best effort base. So removing them
while BlueZ is running should be safe.

An alternative considered  was to lower BlueZ GATT caching (e.g. by
using Cache=yes instead of always, to cache only paired devices).
However, this would hurt performance and battery lifetime of Bluetooth
devices due to additional unnecessary GATT attributes reads. This is in
particular true for Bluetooth 5.1 devices which support the Database
Hash charactristic. Caching has also helped reliability with
intermittent connections (see
https://github.com/bluez/bluez/issues/191).

More importantly, besides the GATT attribute cache the same files are
also used to cache the device names as well. This is independent of the
above mentioned GATT cache configuration (see device_store_cached_name
in BlueZ). So disabling the GATT caching alone wouldn't solve the
particular problem we are facing.

See also: https://github.com/home-assistant/supervisor/issues/4490

* Use access timestamp instead of modification timestamp

The modification timestamp gets updated regularly (on each connect) it
seems. However, using access timestamp might be more accurate, as it
seems to preserves slightly more cache files. This additional devices
might be devices we don't regularly connect but are still around (and
therefor we shouldn't reread the GATT attributes regularly).

So deleting cache entries with access time older than 7 days. Which
essentially deletes all the entries of devices which haven't been seen
the last 7 days.
2023-09-14 23:13:40 +02:00
Stefan Agner
26dd95cb03 Linux: Update kernel 6.1.53 (#2750) 2023-09-13 22:40:13 +02:00
Stefan Agner
0125e32ca6 Bump buildroot (#2749)
* buildroot da1eff0b0d...8ea671337e (1):
  > package/go: bump to v1.19.13
2023-09-13 22:36:57 +02:00
dependabot[bot]
3d7a17c59f Bump docker/build-push-action from 4.1.1 to 4.2.1 (#2748)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 4.1.1 to 4.2.1.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v4.1.1...v4.2.1)

---
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-09-11 22:35:32 +02:00
Stefan Agner
bf327c968a Don't combine GitHub action caches (#2745)
It turns out that the way concurrency works in GitHub action doesn't
allow to queue up multiple pending jobs. As soon as a second job gets
pending, the previous pending jobs get cancelled. So this does not allow
to sequentially run all cache combine jobs as we hoped for.

Let's use a single download cache and per board build cache for now.
2023-09-08 08:16:21 +02:00
Stefan Agner
ff1e4d2c31 Bump buildroot to revert containerd to v1.6.21 (#2744)
* buildroot 89d71acd74...da1eff0b0d (1):
  > Revert "package/containerd: bump version to v1.6.22"
2023-09-08 08:15:39 +02:00
Stefan Agner
25545b609e Combine downloads and compile cache in GitHub Action cache (#2743)
This combines all caches in a single cache to save space (assumption is
that quite some files are duplicated otherwise). With this we shouold
end up with 4 relevant cache files (build cache for each architecture
plus download cache).
2023-09-08 00:14:08 +02:00
Stefan Agner
98da692882 Linux: Update kernel 6.1.52 (#2740) 2023-09-08 00:13:39 +02:00
Stefan Agner
52a455c6ca Execute stale workflow only once a day (#2739) 2023-09-07 08:59:25 +02:00
Stefan Agner
cdfde693c7 Bump buildroot to 2023.02.4 (#2737)
* buildroot a3dced0daf...89d71acd74 (1):
  > Merge tag '2023.02.4' into 2023.02.x-haos
2023-09-06 12:06:45 +02:00
Stefan Agner
079bf06aa7 Enable ECC memory support via EDAC (#2708) (#2736) 2023-09-05 22:20:23 +02:00
Stefan Agner
de2d443cda Bump buildroot to update openvmtools (#2733) (#2735)
* buildroot 1ba9746c5a...a3dced0daf (1):
  > package/openvmtools: bump version to 12.3.0
2023-09-05 21:44:34 +02:00
Stefan Agner
0b115133fe Bump HAOS Agent to 1.6.0 (#2734) 2023-09-05 21:44:19 +02:00
Stefan Agner
41c3b6565d Improve GitHub Action caching (#2732)
Use more specific keys for GitHub Action caches to make sure we update
caches regularly. Also add board id to the downloads cache to get a
more specific cache file. This avoid redownloading large dependencies
of some boards.
2023-09-05 21:44:11 +02:00
Stefan Agner
79050fb820 Separate build step when loading container images (#2731)
Separate fetching the current release and loading the container image
into separate build steps. This allows to manually later the version
json file for testing.
2023-09-04 23:17:31 +02:00
Stefan Agner
e83f264e8c Improve LED representation in Home Assistant Green device tree (#2730) 2023-09-04 23:17:17 +02:00
dependabot[bot]
516cb71df9 Bump actions/checkout from 3 to 4 (#2728)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  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-09-04 23:14:03 +02:00
dependabot[bot]
76903af864 Bump docker/login-action from 2.1.0 to 2.2.0 (#2727)
Bumps [docker/login-action](https://github.com/docker/login-action) from 2.1.0 to 2.2.0.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v2.1.0...v2.2.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-04 23:13:56 +02:00
Stefan Agner
42648b664d Linux: Update kernel 6.1.51 (#2726) 2023-09-04 23:13:48 +02:00
Stefan Agner
d2006e9b72 Use full preemptible kernel in Home Assistant OS (#2721)
Enable fully preemptible kernel (low-latency desktop) configuration for
Home Assistant. Home Assistant can be considered as a soft real-time
system, where a lower latency is preferred over throughput.

A few tests using the rt_test development add-on didn't show measurable
improvements, but this could be due to rather synthetic test.

Currently some platform use voluntary preemptible kernel, and some fully
preemptible. So besides improving latency, this also aims to synchronize
the settings across all platforms.

Also make sure that debugging is not enable as it can have high runtime
overhead according to Kconfig.
2023-09-01 10:13:02 +02:00
Viacheslav Bocharov
2756709f4a Remove checkout twice in dev build workflow (#2719) 2023-09-01 10:12:54 +02:00
Stefan Agner
a2760f1d67 Linux: Update kernel 6.1.50 (#2716) 2023-08-30 23:19:18 +02:00
Stefan Agner
8297bc0e30 Bump buildroot (#2715)
* buildroot 005b88359c...1ba9746c5a (1):
  > package/{bluez5_utils, bluez5_utils-headers}: bump to version 5.69
2023-08-30 23:19:09 +02:00
Stefan Agner
fcf615614e Use proper fix for Bluetooth LE advertisement stall (#2598) (#2714)
Instead of reverting the new hci_sync based BLE scan disable logic
use the fix proposed by Luiz:
https://lore.kernel.org/linux-bluetooth/CABBYNZ+5RMqNVMyYKi+gOVaV+K6k8Z-C37KnfGa=qRUORc3dWg@mail.gmail.com/

This fix avoids BLE stalls just like the revert.
2023-08-30 23:19:02 +02:00
Stefan Agner
60ea200b88 configs: Enable LTO if available (#2713)
The BR2_GCC_ENABLE_LTO config used to enable LTO on compiler level. That
config symbol doesn't exist anymore. Instead, LTO is enabled by default
with GCC.

However, there is a new flag named BR2_ENABLE_LTO which enables LTO in
packages. So far it doesn't look like that packages we are using support
the flag, but that might get added in the feature. Opt-in already today.
2023-08-30 23:18:53 +02:00
Stefan Agner
d7dccf423a Linux: Update kernel 6.1.49 (#2711) 2023-08-29 18:30:43 +02:00
Stefan Agner
111eebfb49 GitHub action improvements and cleanup (#2710)
* Determine git reference in prepare step

We can determin the git reference used once in the prepare step.

* Build HAOS builder in prepare step

Instead of building the build container multiple times, simply build it
once in the prepare step. This saves some GitHub Runner time (as we only
need to create the builder once).

* Drop per PR builds

Drop the per PR builds which are based on pull_request_target. These
make things more complicated with the recent changes requiring two
deployment approvals since we use the environment in for the prepare
and build job now. It will also interfere with future expansions.

We should consider readding the feature using `pull_request` and
subsequent `workflow_run` trigger, as suggested by
https://securitylab.github.com/research/github-actions-preventing-pwn-requests/.

* Simplify board filter
2023-08-29 18:30:28 +02:00
Stefan Agner
02d85d73ef Create builder group only if required (#2709)
In case a group with the same id as used outside the container already
exists, do not create a group inside the container.

It seems that GitHub Action runners started to use primary group id 999
which is the default group id used by the Docker daemon.
2023-08-28 09:52:45 +02:00
Stefan Agner
c41cf9ad17 Linux: Update kernel 6.1.47 (#2703) 2023-08-27 23:11:00 +02:00
Stefan Agner
23237a0676 Linux: Update kernel 6.1.46 (#2697) 2023-08-23 19:52:03 +02:00
Stefan Agner
9253b7361b Add tools for SPI NOR flash storage (#2696)
Home Assistant Green uses a SPI NOR flash storage. One can use dd to
write to the SPI NOR flash, but this is problematic if a unit has bad
blocks. Add MTD tools, specifically flashcp, to enable SPI NOR
flashing support.
2023-08-23 19:51:54 +02:00
Stefan Agner
68c74db9d2 Update U-Boot patches and configuration (#2694)
Update U-Boot board configuration for Home Assistant Green. This moves
all Green specific board configuration into the U-Boot source code
patches. The "sf probe" command now picks up the correct SPI bus by
default.
2023-08-21 10:51:11 +02:00
Stefan Agner
e8da915a46 Add board support (#2687)
* Initial commit of Home Assistant Green board support

* Add Home Assistant Green boot files

* HA Green board configs

* board/nabucasa: Unsupport rtc rk808

* Use odroid-m1 as Supervisor machine for now

* Green: linux: pmic: set set PWRON_LP_OFF_TIME 12s

* green: Update U-Boot to 2023.07.02

* green: supports usb boot

* green: uboot-boot.ush use rk3566-ha-green.dtb

* green: spinor supports uboot

* green: use U-Boot provided devtype as boot device type

* green: Fix polarity of power key

The power key is low active. Add patch to avoid accidential long press
being reported to user space.

* green: uboot: eeprom: add CONFIG_ENV_OVERWRITE

* green: uboot: eerprom: add mac read

* green: fix-cpufreq null issue

* green: board aliases ethernet0

* green: uboot mac set ethernet0

* green: uboot add serial-number read

* green: Update kernel 6.1.39

* green: add green to the build matrix

* green: fix 339d13 & 9b9416 can not boot from usb

* green: changfe sd mode, change led default state

* green: uboot add board.c to read eeprom info

* green: enable uboot to read eeprom info

* green: delete boot.scr read eeprom function

* green: change spl loader uboot order:sd-emmc-spi_nor

* green: serialnum change to 18 bytes

* green: Update kernel 6.1.43

* green: use hwrng support from ODROID-M1

* green: Use latest Rockchip BL31/DDR binaries

* change led_act polarity

* green: Disable watchdog

The watchdog on Green seems to not reliably reset the system. For now
disable the driver to avoid systemd making use of it.

* green: Update kernel 6.1.44

* green: Fix Supervisor Machine

Use odroid-m1 for now as Supervisor machine (used to download the
landing page).

* green: emmc use hs200 to increase speed

* green: use green as Supervisor machine

* green: Update kernel 6.1.45

* green: add Green to the kernel documentation

---------

Co-authored-by: Zhangqun Ming <north_sea@qq.com>
Co-authored-by: syan <syan.cham@gmail.com>
2023-08-14 16:55:16 +02:00
Stefan Agner
23f857fcb4 Add USB serial console support (#2683) (#2686) 2023-08-14 11:45:53 +02:00
Stefan Agner
fd4a05d708 Linux: Update kernel 6.1.45 (#2685) 2023-08-14 11:45:45 +02:00
Stefan Agner
eba7099adc Use the correct Supervisor machine during build (#2681)
This makes sure the correct landing page gets installed during build so
the landing page container image doesn't need to get downloaded at first
boot.
2023-08-10 18:25:31 +02:00
Stefan Agner
61f473432e Use Docker 23.05 to install initial containers (#2680)
Use the same Docker version as deployed in Home Assistant OS (23.05
currently).
2023-08-10 18:25:17 +02:00
Stefan Agner
1836f04a87 Disable watchdog on ODROID-XU4 (#2675) (#2679)
In current Linux 6.1 kernel, the watchdog leads to a system freeze
instead of a reboot.
2023-08-09 12:17:12 +02:00
Stefan Agner
6ba07710e8 Disable watchdog on ODROID-M1 (#2675) (#2678)
In current Linux 6.1 kernel, the watchdog leads to a system freeze
instead of a reboot.
2023-08-09 12:17:04 +02:00
Stefan Agner
a160c674d6 Linux: Update kernel 6.1.44 (#2677) 2023-08-09 12:16:56 +02:00
Stefan Agner
4db2aa1a67 Use Rockchip binaries from official repository (#2673)
Use the official rkbin repository for Rockchip binaries. Use the
binaries from an older git hash which provide the very same binaries
(by hash). This makes sure we use the same DDR version as currently used
by the Hardkernel in their SPI flash bootloader (DDR v1.09).
2023-08-07 09:48:27 +02:00
Stefan Agner
ed6ef90fa1 Linux: Update kernel 6.1.43 (#2666) 2023-08-03 15:10:57 +02:00
Stefan Agner
f0015ba645 Support partial dev builds via Workflow dispatch (#2664) 2023-08-03 15:10:48 +02:00
Stefan Agner
65a17296f5 Linux: Update kernel 6.1.42 (#2660) 2023-07-31 15:22:14 +02:00
Darren Freimuth
f967485c75 Include the RTW8821ce driver module to support WiFi on the AK1 PRO micro PC (#2659)
* Including the RTW8821ce driver module to support Wifi on the KAMRUI AK1 PRO micro PC. It is a low-cost Intel Celeron N5105 that I think should work well for Home Assistant. However, it does not use Intel radios, it needs Realtek drivers.

* also need the firmware for the rtl8821ce
2023-07-31 15:22:03 +02:00
Stefan Agner
1f7185c913 Allow dev builds in forks (#2651)
Do not try to bump Home Assistant OS dev channel version in forks. This
allows to use the dev pipeline in forks.
2023-07-21 12:03:56 +02:00
Stefan Agner
8f3624382b Linux: Update kernel 6.1.39 (#2649) 2023-07-20 19:45:34 +02:00
Stefan Agner
b883b91a8c Bump buildroot to 2023.02.3 (#2645)
* buildroot 7e37cfe4f7...005b88359c (1):
  > Merge tag '2023.02.3' into 2023.02.x-haos
2023-07-19 00:57:27 +02:00
Stefan Agner
c4be219a85 Bump U-Boot for ODROID-M1 to 2023.07.02 (#2643) 2023-07-12 15:09:45 +02:00
Stefan Agner
51e3d0b875 Close rejected issus as "not planned" (#2641) 2023-07-12 15:06:48 +02:00
Stefan Agner
d662cfde9e Use hosted GitHub Action runners (#2638)
* Use hosted GitHub Action runners

Instead of using self-hosted runners use the hosted GitHub Action
runners. Officially the GitHub Action runners have a maximum of 14GB
free space available. However, a single Home Assistant OS build requires
up to 23GB (the ova board seems to require most because of the various
output image formats).

This PR adds some tricks to make use of the GitHub hosted GitHub Action
runners still, namely:
- Build and download cache is stored on /mnt which offers an additional
  10GB of disk space
- Some tools/SDKs on the runner get removed from the root disk to free
  up some disk space.

Other than that building on the hosted GitHub Action runners seems
straight forward. The build time is significantly longer (from ~30
minutes on the current AMD Ryzen 7950X build machine to 1 hours 30
minutes even with cache). But since we can build all boards in parallel
now, the overall build time will likely be shorted.

* Remove top-level release directory

The top-level release directory adds another copy of the images. This is
unnecessary for our release process now. Save the additional space and
time requirement. It comes with a slight downside for developers, but
also helps to save disk space on dev machines.
2023-07-11 23:18:01 +02:00
Irene Cheng Chi
7ae59b7023 ova: add support for various ethernet adapters (#2637)
* generic-x86-64: fragment for pcie kernel config

* ova: fragment for pcie kernel config

* generic-x64-64: remove duplicate config entry
2023-07-11 23:17:48 +02:00
Stefan Agner
9f5b9f8afe Use maintained GitHub Action to upload release assets (#2635)
The chosen GitHub action sets MIME types correctly and allows glob
uploads. Also upload directly from the output directory. This way we can
remove the unnecessary copy to the release directory in the future.
2023-07-11 14:25:51 +02:00
Stefan Agner
48c99c31b8 Linux: Update kernel 6.1.38 (#2634) 2023-07-07 01:09:00 +02:00
Stefan Agner
e43594f3cd Bump buildroot to update dbus-broker (#2633)
* buildroot 42e8c43f6f...7e37cfe4f7 (1):
  > package/dbus-broker: avoid blocking due to missing entropy
2023-07-07 01:08:51 +02:00
Stefan Agner
689faa0260 Improve service ordering for udisks2.service (#2632)
UDisks2 requires D-Bus and the systemd-journald, hence add the two sockets
as a requirement and order the service after them.
2023-07-05 02:40:50 +02:00
Stefan Agner
9cd3e438fa Add Rockchip RK3568 hardware number generator support (#2578) (#2631)
Add patches for the hardware random number generator part of the
Rockchip RK3568. This avoids dbus-broker startup failure seen on some
Hardkernel ODROID-M1 devices due to lack of entropy.
2023-07-05 02:40:42 +02:00
Steven Barth
742dea4165 Add support for iTCO and IT87 watchdogs on x86_64 (#2629) 2023-07-04 20:35:09 +02:00
Steven Barth
6776b23c32 Add overlay for systemd config to enable watchdog configuration (#2628) 2023-07-04 20:34:55 +02:00
Steven Barth
f33b3f2750 Add support for (emulated) i6300ESB watchdog (#2627)
I6300ESB is the watchdog device able to be emulated via qemu/kvm therefore enabling watchdog support based on an existing HA addon
2023-07-04 09:12:20 +02:00
Stefan Agner
67aa29da48 Linux: Update kernel 6.1.37 (#2626) 2023-07-03 18:23:53 +02:00
Adam Duff
642b8a132f Enable UHID to support Bluetooth input devices (#2623)
* Add UHID config to hassos.config
2023-07-03 18:18:08 +02:00
Stefan Agner
b10bf134c0 Add kernel configurations for RAUC verity format (#2622) 2023-07-01 21:16:12 +02:00
Stefan Agner
6bcad34dae Linux: Update kernel 6.1.36 (#2621) 2023-07-01 21:16:01 +02:00
Jens Maus
6eb48fea7c Add config options to enable 32-bit ARMv7 instruction support on ODROID-M1 (#2615)
So that legacy armv7 32bit applications can be correctly executed.
(This refs https://github.com/jens-maus/RaspberryMatic/issues/2349).
2023-06-27 23:10:40 +02:00
Stefan Agner
dc02955e31 Enable Intel Core/Core2/Atom temperature sensor (#2613) (#2614) 2023-06-27 23:10:09 +02:00
Stefan Agner
c9e3c496f5 Enable Realtek 802.11ac wireless chips support (#2600) (#2609) 2023-06-23 00:56:33 +02:00
Stefan Agner
0d346f9dc5 Linux: Update kernel 6.1.35 (#2608) 2023-06-23 00:55:58 +02:00
Stefan Agner
d9c19a8003 Bump buildroot (#2604)
* buildroot f1c8c3df11...42e8c43f6f (1):
  > Merge tag '2023.02.2' into 2023.02.x-haos
2023-06-19 23:53:04 +02:00
Stefan Agner
47de77406e Add patch to fix Bluetooth LE advertisement stall (#2598)
On some platforms (it seems to be pronounced on Intel NUC systems)
Bluetooth advertisements suddenly stop after a short while. Currently
there are work arounds in place to restart the HCI controller to keep
receiving the advertisements.

Advertisements have been received fine with Linux 5.15. This change
reverts a commit which has been isolated to be the culprit.
2023-06-15 16:23:53 +02:00
Stefan Agner
22424e591b Linux: Update kernel 6.1.34 (#2596) 2023-06-14 23:47:22 +02:00
Stefan Agner
276f531f35 Avoid waiting for time synchronization too early (#2594)
In case a system takes a bit longer to boot (e.g. due to SWAP
initialization on first boot, especially on a system with lots of memory
and not very fast strage, e.g. an ODROID-M1 using an SD card) we might
time-out waiting for time synchronization before the time
synchronization service even got started. By ordering the
systemd-time-wait-sync.service after the network is online, the timeout
of this service should be started much later. With that the
systemd-time-wait-sync.service shouldn't timeout any longer.
2023-06-14 00:07:25 +02:00
Stefan Agner
84659c2bf1 Add support for Intel GMAC Ethernet controller (#2589) (#2593)
Add support for Intel GMAC Ethernet controller as found on Intel Elkhart
Lake based SoC (e.g. Fitlet3)
2023-06-14 00:07:16 +02:00
dependabot[bot]
ad29aee1de Bump dessant/label-actions from 3.0.0 to 3.1.0 (#2590)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-12 21:39:04 +02:00
Stefan Agner
e7d6d6513b Linux: Update kernel 6.1.33 (#2584) 2023-06-10 00:43:59 +02:00
Stefan Agner
24217838e2 Start OS Agent only when boot partition is mounted (#2583)
To read the current LED configuration correctly /mnt/boot is required.
This change makes sure that the boot partition is mounted when the OS
Agent starts.
2023-06-10 00:43:51 +02:00
Stefan Agner
9261843a27 Make sure rpcbind gets started after systemd-tmpfiles is ready (#2582) 2023-06-10 00:43:35 +02:00
Stefan Agner
04449d98b5 Linux: Update kernel 6.1.32 (#2576) 2023-06-06 00:18:07 +02:00
Jens Maus
6b62c1e6b8 Remove rng-tools/rngd since it is not required with kernel 5.15+ (#2575) 2023-06-06 00:17:56 +02:00
clayton craft
1e67fe4b2a Add support for RTL8723BS SDIO WiFi modules (#2567)
Many x86_64 tablets (e.g. Cherry View) use SDIO WiFi modules, this
enables the driver for a common one I've come across in the wild.

This module requires firmware from the following, which are already
enabled for this platform:

  - BR2_PACKAGE_LINUX_FIRMWARE_RTL_87XX
  - BR2_PACKAGE_LINUX_FIRMWARE_RTL_87XX_BT

fixes #2422
2023-06-01 19:36:03 +02:00
Stefan Agner
0ed1ff27fb Linux: Update kernel 6.1.31 (#2569) 2023-06-01 19:35:56 +02:00
Jens Maus
875c8edcaf Add Yellow-specific rpi-rf-mod dts support (#2565)
* added first yellow-specific rpi-rf-mod dts support

* fix linter errors.

* added missing BR2_PACKAGE_RPI_RF_MOD_DTS to enable dts compilation for
yellow.
2023-06-01 19:35:48 +02:00
Stefan Agner
0f955f5141 Yellow: Always use mini-UART for Bluetooth (#2571)
* Yellow: Always use mini-UART for Bluetooth

Unfortunately, the mini-UART device tree adjusts the alias for serial1,
which we need to make ttyAMA1 the Zigbee UART (UART4).

However, we can no simply adjust that overlay, as the overlays are not
built as part of the Buildroot build. Instead, they are directly copied
from Raspberry Pi's Firmware repostiory.

Instead of using device tree overlays, just apply the changes to our
Yellow specific device tree. To avoid that the device tree gets loaded
anyhow, we could adjust config.txt but that has complications on its
own. Since the overlay might be conflicting with the Yellow device tree
anyways, just remove all of them.

Note: The miniuart-bt.dtbo overlay won't be present, while config.txt
of upgraded instances still reference it. It seems that this doesn't
cause problems at boot time. Leaving the dtoverlay=miniuart-bt present
also allows user to downgrade in case needed.

* Avoid duplicating 98-rpi.conf
2023-06-01 12:13:18 +02:00
Stefan Agner
afa8ca1714 Yellow: Rely on device tree alias for serial port numbering (#2568)
Use the device tree alias to enumerate the ttyAMA serial ports.
2023-05-31 11:11:04 +02:00
Stefan Agner
e7d98e9eda Linux: Update kernel 6.1.30 (#2566) 2023-05-31 00:53:25 +02:00
Jens Maus
cc63f37094 added missing rpi-rf-mod support for khadas_vim3 and odroid-m1 (#2563) 2023-05-30 09:31:05 +02:00
Jens Maus
6ea71953be Update generic_raw_uart to version 1.29 (#2562)
* updated generic_raw_uart to version 1.29 including its dependencies.

* use capital letters for ODROID naming.
2023-05-30 09:30:56 +02:00
errorb0t
3710f2079e Add device manufacturer link (#2561)
Fix Gigabyte GB-BPCE-3455 being the only listed device without a manufacturer link.
2023-05-30 09:18:14 +02:00
Stefan Agner
94311130c1 Enable PCIe WiFi cards to OVA (#2558) (#2559) 2023-05-24 19:36:47 +02:00
Mike Degatano
18cc4cb771 Set bind propagation for supervisor data (#2557) 2023-05-23 22:51:32 +02:00
Stefan Agner
0c5cc3d425 Bump buildroot (#2553)
* buildroot 553e6c5465...f1c8c3df11 (1):
  > package/linux-firmware: bump to version 20230515
2023-05-18 01:06:09 +02:00
Stefan Agner
6845bf43a5 Linux: Update kernel 6.1.29 (#2551) 2023-05-18 01:06:00 +02:00
Stefan Agner
e01993fffb Linux: Update kernel 6.1.28 (#2546) 2023-05-11 23:34:58 +02:00
c0ffeeca7
bf5691d3cd Make it clearer that the image file needs to be renamed (#2544)
* Make it clearer that the image file needs to be renamed

- add information that the update was only successful if version 20230328 is visible.

* Update Documentation/boards/hardkernel/odroid-m1.md

---------

Co-authored-by: Stefan Agner <stefan@agner.ch>
2023-05-11 21:54:23 +02:00
Stefan Agner
19117e98bd Bump buildroot (#2542)
* buildroot 5288737d35...553e6c5465 (1):
  > package/linux-firmware: bump to version 20230404
2023-05-11 00:19:49 +02:00
Stefan Agner
5254cda720 Bump buildroot (#2541)
* buildroot 21edbd975f...5288737d35 (1):
  > Merge tag '2023.02.1' into 2023.02.x-haos
2023-05-11 00:16:08 +02:00
Stefan Agner
22cccfc781 Bump buildroot (#2539)
* buildroot 8e1c933e7f...21edbd975f (4):
  > package/docker-cli: bump version to v23.0.6
  > package/docker-engine: bump version to v23.0.6
  > package/containerd: Bump to containerd 1.6.21
  > package/runc: bump to version 1.1.7
2023-05-10 00:37:22 +02:00
Stefan Agner
f179742600 Enable BCM943228HMB and other PCI based Broadcom devices (#2525) (#2530) 2023-05-01 23:02:22 +02:00
Stefan Agner
6ad36f2aab Add rpcbind to support NFSv3 (#2529) 2023-05-01 23:02:14 +02:00
Stefan Agner
9d45acdfba Linux: Update kernel 6.1.27 (#2528) 2023-05-01 23:02:06 +02:00
Stefan Agner
064772d0bb Bump buildroot (#2518)
* buildroot f3d7e0d7e5...8e1c933e7f (2):
  > package/docker-cli: bump version to v23.0.5
  > package/docker-engine: bump version to v23.0.5
2023-04-27 18:35:35 +02:00
Stefan Agner
217f3d97f7 Bump buildroot (#2516)
* buildroot b3eec5763d...f3d7e0d7e5 (1):
  > package/network-manager: bump version to 1.40.18
2023-04-27 18:22:02 +02:00
Stefan Agner
566811ae62 Linux: Update kernel 6.1.26 (#2515) 2023-04-27 16:27:42 +02:00
Sven Serlier
b0d113d7bb Documentation: Update and add URLs (#2471)
* Update URLs

* Add URLs

* Update Documentation/network.md

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

* Update Documentation/boards/README.md

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

* Update Documentation/boards/README.md

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

* Update Documentation/boards/README.md

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

---------

Co-authored-by: Stefan Agner <stefan@agner.ch>
2023-04-27 12:15:14 +02:00
Stefan Agner
08d4c39d6c Bump buildroot (#2509)
* buildroot ac537ff658...b3eec5763d (1):
  > package/readline: add upstream patch to fix crash with invalid locale specification
2023-04-24 23:58:27 +02:00
Stefan Agner
02ac8e90d6 Enable Gasket driver for Google Coral support on ODROID-M1 (#2508) 2023-04-24 21:27:30 +02:00
Stefan Agner
bf76a0b473 Avoid CLI restart on shutdown (#2507)
* Avoid CLI restart on shutdown

* Update buildroot-external/rootfs-overlay/usr/sbin/hassos-cli
2023-04-24 21:27:21 +02:00
Stefan Agner
27992e2b13 Bump buildroot (#2506)
* buildroot acec896cab...ac537ff658 (1):
  > package/systemd: bump to version 252.9
2023-04-24 18:23:19 +02:00
Stefan Agner
4e1ea18251 Fix boot on Raspberry Pi 4 32-bit (#2505)
With U-Boot 2023.01 booting on Raspberry Pi 4 32-bit (at least with 4
or 8GB of memory) freezes when trying to enumerate USB devices. It seems
that the PCIe initialization partially fails, which causes the USB XHCI
initialization to fail.

It seems that a new restriction on viable addresses for PCIe
initialization causes the problem. Revert the offending commit to make
U-Boot properly detect USB devices again.
2023-04-24 18:23:10 +02:00
Stefan Agner
9d167da919 Fix startup by using BindTo and After (#2496) (#2503)
Use BindTo and After settings from the QEMU guest agente service file
present in the QEMU source tree (contrib/systemd/qemu-guest-agent.service).
2023-04-24 18:22:56 +02:00
Stefan Agner
a3471cff76 Linux: Update kernel 6.1.25 (#2495) 2023-04-20 22:04:53 +02:00
Stefan Agner
355ec34ad1 Fix NVMe SSD boot for Raspberry Pi 4/CM4 (#2493)
The new U-Boot 2023.01 requires an additional config which is missing
from the generic Raspberry Pi U-Boot configuration (see #2234). Add
it to the generic Raspberry Pi U-Boot configuration so Yellow as well as
other CM4 based systems can boot from NVMe SSD again.
2023-04-20 22:04:44 +02:00
Stefan Agner
a44d573d3d Enable HDMI on Khadas VIM3 (#2491)
Use the same kernel configuration for Display/GPU/HDMI/CDC kernel
modules as ODROID-N2 which has proven to be working well.
2023-04-20 18:21:37 +02:00
b-uwe
888b4c852d Fix typo in ODROID-M1 documentation (#2474) 2023-04-18 14:45:25 +02:00
Stefan Agner
fbcc8e1c45 Enable Broadcom Ethernet PHYs support (#2413) (#2470) 2023-04-16 23:47:22 +02:00
Stefan Agner
bdcf4f124a Linux: Update kernel 6.1.24 (#2469) 2023-04-13 20:49:13 +02:00
Stefan Agner
bea888f8db Fix build without device tree overlays (#2467) 2023-04-13 07:38:43 +02:00
Stefan Agner
a6894512dd Add Broadcom NetXtreme/Tigon3 firmware (#2413) (#2466) 2023-04-12 22:11:01 +02:00
Stefan Agner
0dd621d444 Add firmware for Realtek RTL8152/RTL8153 USB Ethernet Adapters (#2456) (#2465) 2023-04-12 22:09:09 +02:00
Stefan Agner
f9484851a1 Add label action for frontend issues (#2464) 2023-04-12 22:01:01 +02:00
Stefan Agner
03c5efcd0a Remove RPI-RF-MOD/HM-MOD-RPI-PCB hat overlays for Yellow (#2408) (#2461)
The overlays do not properly support the Yellow hardware. Remove them to
avoid issues with Zigbee/Audio and possible other on-board hardware.
2023-04-12 21:41:55 +02:00
Stefan Agner
907ce276c2 Document eMMC boot for ODROID-M1 (#2460) 2023-04-12 21:41:46 +02:00
Stefan Agner
afe075ff56 Bump Raspberry Pi kernel and firmware to 1.20230405 (#2459)
* Bump buildroot

* buildroot ddc0ddca51...acec896cab (1):
  > package/rpi-firmware: bump version to 1.20230405

* RaspberryPi: Update kernel 6.1.21 - 1.20230405
2023-04-12 00:04:18 +02:00
Stefan Agner
1a01e2c98f Bump U-Boot for ODROID-M1 to 2023.04 (#2458) 2023-04-12 00:04:04 +02:00
Stefan Agner
99746aeed9 Linux: Update kernel 6.1.23 (#2453) 2023-04-07 00:17:45 +02:00
Stefan Agner
991a2e93d9 Bump buildroot to update Docker to 23.0.3 (#2452)
* buildroot befb515cdb...ddc0ddca51 (4):
  > package/docker-cli: bump version to v23.0.3
  > package/docker-engine: security bump version to v23.0.3
  > package/containerd: security bump to version 1.6.20
  > package/runc: security bump to version v1.1.5
2023-04-06 00:24:24 +02:00
Stefan Agner
01548af27e Use UTF-8 as default native language support (NLS) (#2450)
This makes sure that CIFS/SMB are mounted with the UTF-8 character set
by default on all boards.
2023-04-06 00:24:02 +02:00
Stefan Agner
19e2869261 Add support for NFS and SMB/CIFS network file systems (#2446)
* Add support for NFS and SMB/CIFS network file systems

* Remove server component
2023-04-03 18:38:19 +02:00
dependabot[bot]
b88deef758 Bump actions/stale from 7.0.0 to 8.0.0 (#2447)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-03 16:37:06 +02:00
Stefan Agner
c7588e9350 Enable Multi-Gen LRU (#2392)
* Enable Multi-Gen LRU

Multi-Gen LRU should improve performance under memory pressure. This is
especially useful for embedded platforms where memory is scarce.

* Add service to configure Multi-Gen LRU

Use min_ttl_ms of 1 which is the least aggressive in terms of lag. Since
we are a server application, we can tune trashing prevention with a
higher acceptable lag.
2023-03-31 23:28:43 +02:00
Stefan Agner
bdb3bd3ab1 Use zsmalloc for zswap (#2443)
The allocator is supposed to work well under low memory conditions.
2023-03-30 22:57:31 +02:00
Stefan Agner
3686a12d11 Bump buildroot to update NetworkManager to 1.40.16 (#2442)
* buildroot 90d1128033...befb515cdb (1):
  > package/network-manager: bump version to 1.40.16
2023-03-30 22:24:44 +02:00
Stefan Agner
94fe385ef4 Linux: Update kernel 6.1.22 (#2441) 2023-03-30 22:24:35 +02:00
Stefan Agner
f5e2919db1 Bump buildroot (#2439)
* buildroot 2ccc4c3f04...90d1128033 (2):
  > package/docker-cli: bump version to v23.0.2
  > package/docker-engine: bump version to v23.0.2
2023-03-29 15:33:52 +02:00
Stefan Agner
399997e83c Set umask on swapfile creation (#2436)
Make sure the swapfile is only readable by the owner.
2023-03-28 18:18:58 +02:00
Stefan Agner
1edb5c8c9e Limit systemd-journald log size to 500MB (#2226) (#2435) 2023-03-28 18:18:27 +02:00
Stefan Agner
c64c5b13ab Improve IPv6 NDP for non-local Thread Border routers (#2434)
* Add multiple routes support in NetworkManager

Support multiple routes to the same network learned via Router
Information Option. With this change, the kernel will have multiple
routing table entries to a given Thread network. The routes gateway
won't be updated with every new RIO any longer since every gateway
has its own entry.

* Enable IPv6 router reachability probing

Currently router reachability probing is disabled since HAOS enables
IPv6 forwarding and the necessary kernel options are not enabled. With
this change router reachability probing is enabled even though we are
a router on our own.

Note that Linux commit ea659e077528 ("[IPV6] ROUTE: Do not enable router
reachability probing in router mode.") by default disabled this
behavior. But since we are acting as a router as well as a host device,
we rather want this reachability probing.

See also: https://lore.kernel.org/netdev/b9182b02829b158d55acc53a0bcec1ed667b2668.1680000784.git.stefan@agner.ch/T/#u
2023-03-28 18:18:19 +02:00
Jens Maus
555c229519 updated generic_raw_uart to latest 1.28 version and updated rpi-rf-mod (#2431)
package to latest version as well.
2023-03-27 09:35:22 +02:00
Stefan Agner
4744a2f123 Fix swapfile creation for all memory sizes (#2427)
* Fix swapfile creation for all memory sizes

In certain situation awk prints the swapfile size in scientific
notation. The script can't deal with that, in which case swap file
creation fails.

Use int to convert the number to an integer.

Since pages are 4k, also make sure swapsize is aligned to 4k blocks.

* Add info message
2023-03-27 09:34:38 +02:00
Stefan Agner
9cd98003e8 Bump OS release version to 11 2023-03-25 09:19:26 +01:00
Stefan Agner
30634cd0af Partially revert "improve virtual hw support (#2138)" (#2425)
Drop PCIe hotplug since this causes network interfaces name changes
which aren't handled gracefully right now. People are left with no
network configuration.
2023-03-23 21:46:12 +01:00
Stefan Agner
a8f6f7aa43 Don't kill ssh connection on OOM (#2424)
By default systemd kills the service which causes an OOM. That make
sense for a typical service, however, for SSH we don't want this
behavior: The connection should continue, just the command which caused
OOM should be killed.
2023-03-23 21:45:57 +01:00
Stefan Agner
689089a949 Linux: Update kernel 6.1.21 (#2423) 2023-03-23 21:45:43 +01:00
Stefan Agner
75dcb932f8 Use zswap instead of swap in zram (#2420)
* Use zswap instead of swap in zram

This requires a swap file which will get generated automatically on
startup.

* Fix file size and free disk space comparison

* Set zswap factor to 33%

* Set vm.swappiness to 1

Decrease swapping to a minimum. This is also recommended for database
work loads by the MariaDB documentation. In practice it causes the least
amount of writes to disk when under memory pressure, while still making
swap available when needed.
2023-03-22 11:08:05 +01:00
Stefan Agner
5c6330f70f Bump U-Boot for ODROID-M1 to 2023.04-rc4 (#2419) 2023-03-17 17:14:42 +01:00
Stefan Agner
5cf2a0b052 Linux: Update kernel 6.1.20 (#2418) 2023-03-17 14:54:05 +01:00
Stefan Agner
c804b6b68d Linux: Update kernel 6.1.19 for Raspberry Pi systems (#2417) 2023-03-17 00:37:38 +01:00
Stefan Agner
3de96587b7 Bump HAOS Agent to 1.5.1 (#2416) 2023-03-17 00:37:27 +01:00
Stefan Agner
787fc22f83 Avoid moving data to same device (#2412)
* Avoid moving data to same device

When a data disk move is triggered when the data disk is already in use
the script currently renames that only data disk, rendering the system
unusable.

Don't continue if source and destination happens to be the same device.

* On failure rename to hassos-data-fail

The label hassos-data-failed is too long.
2023-03-15 22:47:31 +01:00
Stefan Agner
c8438faab5 Linux: Update kernel 6.1.19 (#2411) 2023-03-15 14:16:22 +01:00
Stefan Agner
5200096c4e Deactivate any external data disk device on first boot (#2390) (#2410)
* Deactivate any external data disk device on first boot (#2390)

* Use lsblk to determine the underlying device file

Comparing major number is not reliable, e.g. virtio disks have the same
major number despite being different devices. Use lsblk to find the
underlying device, and compare the device name instead.
2023-03-15 14:16:11 +01:00
Stefan Agner
24f3efdbe3 Support systemd ConditionFirstBoot (#2409)
By default ConditionFirstBoot is ankered to the presence of
/etc/machine-id. However, in our case /etc/machine-id is a bind mount,
which makes the first boot condition non-working.

Since machine-id is stored by the bootloader on HAOS, use the boot
loaders knowledge and pass the information to systemd.
2023-03-15 14:14:47 +01:00
Stefan Agner
2b0187604b Choose Security Module using Kernel configuration (#2407) 2023-03-14 18:29:01 +01:00
Stefan Agner
1d2de24cbe Capitalize ODROID as used by Hardkernel (#2406) 2023-03-14 00:45:39 +01:00
Stefan Agner
8531abcbeb Bump buildroot (#2404)
* buildroot 0a6be061e0...2ccc4c3f04 (1):
  > package/gptfdisk: fix another runtime failure with popt 1.19
2023-03-14 00:19:06 +01:00
Stefan Agner
29a740353a Fix U-Boot environment size for ODROID-M1 (#2403) 2023-03-14 00:18:54 +01:00
Stefan Agner
2f9ce078ee Add ODROID-M1 to documentation (#2402)
* Add ODROID-M1 to documentation

While at it, also use the new writing style for all Hardkernel boards by
changing Odroid to ODROID.

* Add ODROID-M1 board specific documentation

* Add NVMe information

* Apply suggestions from code review

Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
2023-03-14 00:18:39 +01:00
Stefan Agner
6914f92e59 Linux: Update kernel 6.1.18 (#2401) 2023-03-13 10:27:00 +01:00
Stefan Agner
8eef678e48 Add Multi-Gen LRU but disabled by default (#2400)
It seems that Raspberry Pi enabled Multi-Gen LRU by default. By my
testing, it performs worse in some situation. Add it by default for all
platforms, but disable it by default for now.
2023-03-13 00:53:33 +01:00
Stefan Agner
f48b00cb7f Bump buildroot (#2399)
* buildroot c8916b6ec3...0a6be061e0 (1):
  > Merge tag '2023.02' into 2023.02.x-haos
2023-03-13 00:52:45 +01:00
Stefan Agner
b0d9496595 Add ODROID-M1 support (#2387)
* Add ODROID-M1 board support

* Add Rockchip kernel config for ODROID-M1

Kernel defconfig for Rockchip is based on Armbian kernel defconfig
from config/kernel/linux-rk3568-odroid-edge.config (git hash
95c829f9e664).

* Add U-Boot/Kernel patches

* Add Rockchip blob support

Add package which provides Rockchip TPL and ATF firmware binaries.

* Use latest U-Boot for ODROID-M1

* Fix Rockchip blob support

* Update defconfig

* Use GPT by default

* Create uboot partition to support non-recovery boot

* Enable eMMC boot in U-Boot SPL

* Drop unnecessary mmc device selection

Distro boot already activates the right mmc device. The extra selection
seems to actually cause problems for eMMC boot.

* Make sure driver for eMMC is built-in

* Use odroid-m1 as Supervisor machine

* Add ODROID-M1 to CI pipeline and issue template

* Bump to Linux 6.1.16
2023-03-10 19:44:50 +01:00
Stefan Agner
c03236f937 Linux: Update kernel 6.1.16 (#2396) 2023-03-10 19:42:13 +01:00
Stefan Agner
7b17c2eff0 Bump buildroot (#2393)
* buildroot f757263ae4...c8916b6ec3 (2):
  > Merge tag '2023.02-rc3' into 2023.02.x-haos
  > boot/uboot: Hacky support binary files for Rockchip ATF/TPL
2023-03-09 16:32:52 +01:00
Stefan Agner
7c105f553f Bump QEMU guest agent to 7.2.0 (#2391) 2023-03-09 09:32:31 +01:00
Stefan Agner
a93781c360 Add libseccomp (#2389)
* Add security library libseccomp

Enable libseccomp to activate seccomp support in HAOS. This will compile
systemd and Docker with seccomp support.

Note: Traditionally Supervisor required to disable seccomp. This seems
no longer to be the case with current Supervisor, but it needs further
testing. All containers started by Supervisor get currently started with
seccomp disabled.

* Enable seccomp in the kernel
2023-03-08 00:38:28 +01:00
Stefan Agner
448c85788c Add label action for new features (#2388) 2023-03-07 08:21:08 +01:00
Stefan Agner
9ce0766353 Avoid custom GPT location (#2386)
Currently the only board supporting GPT partition table and SPL is the
ASUS Tinker board. Its Rockchip boot loader is stored at LBA 0x40 (64)
which is well past the last LBA of a regular GPT partition table which
is at LBA 33). Therefor a custom GPT main partition table location (via
sgdisk -j, --adjust-main-table=sector) is not necessary.

Technically we could copy anything after LBA 34 from the SPL image, but
since we don't support a board which needs that space for its SPL let's
stick with the well aligned Rockchip start at LBA 64.

Note: To preserve the layout we still add the SPL size to the regular
offset. Technically we could start the boot partition at LBA 16384, but
this would mean a different partition table compared to before and
different offset of subsequent partitions compared to other GPT
platforms.
2023-03-07 00:52:16 +01:00
Stefan Agner
923c22ff9e Support custom sized SPL/raw boot region (#2385)
* Support custom sized SPL/raw boot region

This is required for Rockchip which by default stores the U-Boot FIT
image at the 8MiB offset.

* Ignore shellcheck warning
2023-03-06 23:06:45 +01:00
Stefan Agner
eb3e2ab003 Linux: Update kernel 6.1.15 (#2383) 2023-03-03 18:10:36 +01:00
Stefan Agner
ca6bccbfa9 Use new containerd.sock location of Docker 23.0 (#2382) 2023-03-03 18:07:29 +01:00
Stefan Agner
a35ed97167 Enable Microsoft HyperV integration services (#2381) 2023-03-02 17:01:01 +01:00
Stefan Agner
239337b406 Use Network device naming scheme v250 (#2380)
The new systemd version v252 brings a new naming scheme, in particular
it seems that on device tree based systems (e.g. Raspberry Pis) the
Ethernet device name changes from eth0 to end0.

This breaks a previously made configuration.

Even worse, it seems that the default NetworkManager behavior is to only
configure a network device if there is no profile. But since profiles
are configured on a typical installation, NetworkManager doesn't bring
up any of the network interface, leaving the user stranded on an
unconnected system.

Ideally, we should have a plan how to migrate from one naming scheme to
the next. For now, just stick with the naming scheme HAOS 9.x has been
using.
2023-03-02 17:00:28 +01:00
Stefan Agner
78c5d40bb0 Enable NetworkManager command line utility nmcli explicitly (#2379)
With the Buildroot update 2023.02 nmcli is not enabled by default.
Enable it explicitly.
2023-03-02 17:00:19 +01:00
Stefan Agner
2081d3f7ed Bump buildroot (#2377)
* buildroot 4832525e6c...f757263ae4 (3):
  > package/docker-engine: bump version to v23.0.1
  > package/docker-engine: remove non-existing build tags
  > package/{bluez5_utils, bluez5_utils-headers}: bump to version 5.66
2023-03-02 00:06:52 +01:00
Stefan Agner
a69f94803b Increase net.core.optmem_max for OTBR (#2375)
The OTBR install scripts by default increases the net.core.optmem_max
ancillary buffer size to 64KiB to allow for a larger number of multicast
groups. Arch Linux as well recommends this size for high speed network
links.
2023-03-02 00:06:42 +01:00
Stefan Agner
7806f973bb Bump buildroot to 2023.02-rc2 (#2374)
* Update config for Buildroot 2023.02

* Use Buildroot's version of the rtl8821cu package

Buildroot provides a newer driver for the RTL8821CU based chipsets
provided by https://github.com/morrownr/8821cu-20210118.

* Pass argument when verifying partition table

This also avoids running into a segmentation fault in the current
version of sgdisk.

* Remove obsolte GRUB2/NetworkManager patches

* Bump buildroot

* buildroot 90aa1a6daa...4832525e6c (4596):
  > package/runc: add support for CGroup device permission updates
  > package/network-manager: fix build with -Dmodem_manager=false
  > package/dbus-broker: bump to release 33
  > package/iptables: Allow to use iptables with nf_tables backend
  > package/brcmfmac_sdio-firmware-rpi: bump to latest version
  > package/linux-firmware: Deploy fewer Intel WiFi 22000 series variants
  > package/linux-firmware: Add more Intel WiFi 22000 series variants
  > package/linux-firmware: Add Broadcom BNX2 firmware
  > package/rpi-firmware: bump version to 1.20230106
  > Update for 2023.02-rc2

* Use Ubuntu 22.04 for CI checks

* Bump xe-guest-utilities to 7.33.0

* Remove unnecessary shellcheck ignore for xe-guest-utilities

* Address new buildroot check-packages issues
2023-03-01 00:36:32 +01:00
Stefan Agner
b8a00ecbfa Symlink firmware update directory to Supervisor writeable location (#2225) 2023-03-01 00:36:22 +01:00
Stefan Agner
fd6bae5dc1 Linux: Update kernel 6.1.13 for Raspberry Pi systems (#2373) 2023-02-27 23:58:02 +01:00
Adam Duff
6f44dcf010 Enable CONFIG_UHID for generic x86-64 based installs (#2369) 2023-02-27 23:09:54 +01:00
Stefan Agner
c9fcf91a0d Linux: Update kernel 6.1.14 (#2372) 2023-02-27 23:07:54 +01:00
Jens Maus
acec461b62 updated generic-raw-uart to correctly reference the sub-directory commit (#2368)
id and updated also the rpi-rf-mod package to reference the latest
changes for kernel 6.1 compatibility.
2023-02-27 11:45:17 +01:00
Stefan Agner
9bd101431e Revert bridge support (#2345)
The bridge support is not complete and causes issues in Supervisor.
Supervisor first needs proper support for it before we can deploy it in
Operating System.

See also: https://github.com/home-assistant/supervisor/pull/4133
2023-02-22 12:08:13 +01:00
Stefan Agner
74ccbb8953 Fix rtl8821cu build for Linux 5.15 (#2360) 2023-02-16 18:51:55 +01:00
Stefan Agner
25c672a27f Linux: Update kernel 6.1.12 for non-Raspberry Pi systems (#2358)
* Linux: Update kernel 6.1.12

* Update generic_raw_uart to build with Linux 6.1

* Update Realtek rtl8821cu/rtl88x2bu to build with Linux 6.1

* Bump buildroot

* buildroot 43f82f01b9...90aa1a6daa (1):
  > rtl8812au-aircrack-ng: bump to latest rev d98018

* Fix eq3_char_loop to build with Linux 6.1

* rtl8821cu: make sure -Werror is disabled for the kernel build

* generic_raw_uart: make sure -Werror is disabled for the kernel build
2023-02-16 14:53:38 +01:00
Stefan Agner
26757f17e8 Linux: Update kernel 5.15.94 (#2356) 2023-02-15 11:01:50 +01:00
Stefan Agner
dddbf25228 Bump U-Boot to v2023.01 for ODROID/Tinker/VIM3 (#2355) 2023-02-15 11:01:40 +01:00
Stefan Agner
0786ef2641 Bump buildroot (#2354)
* buildroot c33bc08c0b...43f82f01b9 (1):
  > package/pkg-golang: disable version control information
2023-02-14 11:04:00 +01:00
Stefan Agner
0a9517f121 Linux: Update kernel 5.15.93 (#2351) 2023-02-13 21:23:21 +01:00
Stefan Agner
f4f1fd2a58 NetworkManager: DHCPv4 handle lease NAK properly (#2341) (#2346)
Backport bug fix which handles a failed lease properly.
2023-02-13 21:23:11 +01:00
Stefan Agner
0867e3c70c Linux: Update kernel 5.15.92 (#2343)
* Linux: Update kernel 5.15.92

* Drop patch which has been applied upstream
2023-02-06 12:28:58 +01:00
Stefan Agner
078c38c20c Bump buildroot (#2340)
* buildroot 14dcc6f72e...c33bc08c0b (1):
  > package/dbus-broker: bump to release 33
2023-02-06 12:03:26 +01:00
Stefan Agner
a14902002a Linux: Update kernel 5.15.91 (#2339) 2023-02-06 12:03:16 +01:00
Stefan Agner
acaba8c3ea Add RTL8723BE PCIe Wi-Fi chip support (#2329) (#2336) 2023-01-31 23:55:26 +01:00
Stefan Agner
ea48034806 Add iproute2 ip command (#2335)
Replace Busybox ip command with the full version from the iproute2
package. This removes ~20KiB from Busybox, but adds ~685KiB for full
iproute2.

The main reason is to get full ip -6 route command support to debug
Thread related routing problems.
2023-01-31 23:55:18 +01:00
dependabot[bot]
e3c92638b3 Bump ludeeus/action-shellcheck from 1.1.0 to 2.0.0 (#2331)
Bumps [ludeeus/action-shellcheck](https://github.com/ludeeus/action-shellcheck) from 1.1.0 to 2.0.0.
- [Release notes](https://github.com/ludeeus/action-shellcheck/releases)
- [Commits](https://github.com/ludeeus/action-shellcheck/compare/1.1.0...2.0.0)

---
updated-dependencies:
- dependency-name: ludeeus/action-shellcheck
  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-01-30 15:43:05 +01:00
Alex Williamson
56b094724b Add amdgpu driver and firmware (#2320)
This can reduce power consumption of the GPU hardware.
2023-01-30 15:42:43 +01:00
Stefan Agner
3654a43a90 Bump U-Boot to v2023.01 (#2316) 2023-01-24 11:14:23 +01:00
Stefan Agner
eeb0cb90ce Linux: Update kernel 5.15.90 (#2315) 2023-01-24 11:13:18 +01:00
Stefan Agner
b726b8691b RaspberryPi: Update kernel 5.15.84 - 1.20230106 (#2312)
* RaspberryPi: Update kernel 5.15.84 - 1.20230106

* Bump buildroot

* buildroot 94470c0e51...14dcc6f72e (1):
  > package/rpi-firmware: bump version to 1.20230106
2023-01-23 23:09:11 +01:00
Stefan Agner
e4d09097c0 Bump buildroot (#2313)
* buildroot 41bd49dba4...94470c0e51 (1):
  > Merge tag '2022.02.9' into 2022.02.x-haos
2023-01-23 22:26:38 +01:00
Stefan Agner
e394cea55c Linux: Update kernel 5.15.89 (#2311) 2023-01-23 14:04:19 +01:00
Stefan Agner
768bdef2bf Add ASMedia based devices to UAS block list (#2310)
This ASMedia Technology chip seems to cause problem with the UAS driver.
The chip is used in UGreen S-ATA to USB 3.0 adapters.
2023-01-23 14:00:15 +01:00
xonestonex
6d8faa90a7 WiFi Access Point / HotSpot management in NetworkManager (#2304)
* Enable wpa_supplicant access point funtionality, to allow NetworkManager to manage WiFi interfaces as HotSpots or access points.

* Add an exception, to allow NetworkManager to manage bridge interfaces whose name starts with 'bridge'.

* Update buildroot-external/rootfs-overlay/etc/NetworkManager/NetworkManager.conf

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

Co-authored-by: Stefan Agner <stefan@agner.ch>
2023-01-23 14:00:04 +01:00
Stefan Agner
d4deee3660 Linux: Update kernel 5.15.88 (#2305) 2023-01-16 23:33:05 +01:00
d-two
ae5cb3e980 Add HP Smart Array driver (#2302) 2023-01-16 09:56:16 +01:00
Stefan Agner
b82594a293 Linux: Update kernel 5.15.86 (#2301) 2023-01-11 23:30:21 +01:00
Stefan Agner
bfb665bb85 Fix remote tracking branch for Buildroot submodule (#2288)
Set 2022.02-haos as the default remote tracking branch. This should not
influence regular submodule updates/inits as they reference the git
hash tracked by the operating-system repository directly.
2022-12-27 09:05:39 +01:00
dependabot[bot]
18dfd059a0 Bump actions/stale from 6.0.1 to 7.0.0 (#2289)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-27 08:52:17 +01:00
Stefan Agner
93656904de Bump buildroot (#2286)
* buildroot 53a9b0095a...41bd49dba4 (1):
  > package/bluez5_utils: Fix Service detection on some devices
2022-12-23 00:34:57 +01:00
Stefan Agner
8f2c197e09 Linux: Update kernel 5.15.85 (#2284) 2022-12-22 00:20:02 +01:00
Stefan Agner
fb4df28671 Enable Realtek RTL8723AU/RTL8188[CR]U/RTL819[12][CE]U support (#2281) 2022-12-21 00:08:38 +01:00
Stefan Agner
875add54e4 Enable RTL8812AU WiFi support on additional boards (#2279)
Enable RTL8812AU WiFi driver on Generic x86-64/AArch64, OVA and Yellow.
2022-12-21 00:08:30 +01:00
Stefan Agner
6c242b8593 Bump buildroot (#2278)
* buildroot 80bb9553ec...53a9b0095a (1):
  > Merge tag '2022.02.8' into 2022.02.x-haos
2022-12-21 00:08:24 +01:00
Stefan Agner
1e1fd16977 Linux: Update kernel 5.15.84 (#2277) 2022-12-21 00:07:53 +01:00
Stefan Agner
76c6127851 Linux: Update kernel 5.15.83 (#2266) 2022-12-14 22:31:11 +01:00
dependabot[bot]
ab8fb12972 Bump dessant/label-actions from 2 to 3 (#2263)
* Bump dessant/label-actions from 2 to 3

Bumps [dessant/label-actions](https://github.com/dessant/label-actions) from 2 to 3.
- [Release notes](https://github.com/dessant/label-actions/releases)
- [Changelog](https://github.com/dessant/label-actions/blob/master/CHANGELOG.md)
- [Commits](https://github.com/dessant/label-actions/compare/v2...v3)

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

Signed-off-by: dependabot[bot] <support@github.com>

* Pin more strictly

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2022-12-14 22:30:23 +01:00
Stefan Agner
71281e0c69 Enable Hyper-V drivers for virtualization on ARM64 (#2256) (#2262) 2022-12-10 23:58:58 +01:00
Stefan Agner
17bb8b0d71 Linux: Update kernel 5.15.82 (#2261) 2022-12-10 23:58:52 +01:00
Stefan Agner
970bec6ac3 Use same class B network for Docker as Supervisor (#2246) (#2259)
Use a subnet in the same class B network for the Docker default bridge
is using. This avoids conflicting with more than one class B network.
2022-12-10 23:58:42 +01:00
Stefan Agner
07bd5079fa Bump buildroot (#2253)
* buildroot 54eff73a8f...80bb9553ec (1):
  > Merge tag '2022.02.7' into 2022.02.x-haos
2022-11-30 16:07:38 +01:00
Stefan Agner
f1ffc301c8 Enable release drafter on dev branch (#2252) 2022-11-30 12:22:37 +01:00
Stefan Agner
eaeac710eb Enable experimental APIs for Bluetooth daemon (#2251)
To get access to the experimental advertisement monitor api
experimental mode is required. This eanbles the experimental D-Bus API
by default.

See also: https://github.com/hbldh/bleak/pull/884
2022-11-29 11:31:59 +01:00
Stefan Agner
a170a8c6c2 Use iptables with NFT backend (#2250)
* Bump buildroot

* buildroot 215e54fe41...54eff73a8f (1):
  > package/iptables: Allow to use iptables with nf_tables backend

* Use iptables with NFT backend
2022-11-29 11:31:50 +01:00
Stefan Agner
0a54abc7c2 Linux: Update kernel 5.15.80 (#2249)
* Linux: Update kernel 5.15.80

* Drop unnecessary patch
2022-11-29 11:27:28 +01:00
Stefan Agner
ce16ee5d49 Decrease network size of Docker default bridge (#2246) 2022-11-25 13:24:45 +01:00
pergolafabio
5c57d5e26e Add v4l2loopback device (#2243) 2022-11-25 11:40:05 +01:00
Stefan Agner
7e8166b045 Bump U-Boot to v2023.01-rc1 (#2234)
* Bump Raspberry Pi/Yellow to U-Boot 2023.01-rc1

* Add necessary configurations for NVMe via PCIe support
2022-11-17 12:31:12 +01:00
Stefan Agner
c525ee9480 Bump Raspberry Pi kernel and firmware to 1.20221104 (#2178) (#2236)
* Bump buildroot

* buildroot 48c0c35f09...215e54fe41 (1):
  > package/rpi-firmware: bump version to 1.20221104

* RaspberryPi: Update kernel 5.15.76 - 1.20221104
2022-11-17 12:30:08 +01:00
Stefan Agner
7556985bc4 Linux: Update kernel 5.15.79 (#2233) 2022-11-17 12:26:22 +01:00
Stefan Agner
49c124177b Disable CONFIG_FW_LOADER_USER_HELPER(/_FALLBACK) (#2222) (#2229)
This slows down firmware loading which causes Bluetooth initialization
to delay unecessarily.
2022-11-14 23:20:12 +01:00
Stefan Agner
bd0f22de6e Linux: Update kernel 5.15.78 (#2228) 2022-11-14 20:42:22 +01:00
Stefan Agner
284d178103 Linux: Update kernel 5.15.77 (#2223) 2022-11-10 09:32:36 +01:00
Rob VDM
12bd4ad8dd Add MLX5 support to OVA build (#2214)
This adds MLX5 (ConnectX 4) NIC support to the OVA build, which allows this NIC to be used as a VF with SR-IOV NICs in a VM.
2022-11-10 09:08:44 +01:00
Lasse Bang Mikkelsen
8d406ee504 Add QEMU Guest Agent to generic_aarch64 target (#2213)
This is to allow graceful shutdown when run as QEMU VM.
2022-11-10 09:08:33 +01:00
Stefan Agner
6dbf4fd078 Disable Busybox' powertop (#2211)
The powertop command built-in BusyBox uses old timer_stats proc API
which has been removed since Linux 4.11. Hence the command is not
useful on HAOS. Remove it.
2022-11-10 09:07:42 +01:00
Stefan Agner
bb8445a416 Add patch to avoid dummy waits on CPU idle for AMD systems (#2210) 2022-11-02 14:46:37 +01:00
Stefan Agner
e1559cd1a9 Enable Intel specific CPU idle driver (#2209) 2022-11-02 11:05:11 +01:00
Stefan Agner
55fb15ae15 Linux: Update kernel 5.15.76 (#2208) 2022-10-31 20:26:15 +01:00
Stefan Agner
c682073da5 Linux: Update kernel 5.15.75 (#2204) 2022-10-26 17:28:06 +02:00
Stefan Agner
97e9a0372c Add fq_codel network packet scheduler algorithm by default (#2203)
The fq_codel network scheduler is the de-facto standard nowadays in most
distros. Systemd enables the scheduler by default if available. Make
sure all boards have the necessary kernel module activated.
2022-10-26 16:56:09 +02:00
Stefan Agner
86da5f9913 Bump buildroot (#2199)
* buildroot 8c952a2d00...48c0c35f09 (1):
  > boot/grub2: fix GRUB2 patch merge error
2022-10-20 21:35:44 +02:00
ioctl2
c68d8bfbe4 busybox: enable 'less' applet & correct MAXLINES val (#2189) 2022-10-20 16:02:51 +02:00
Stefan Agner
72273ed4f6 Bump buildroot (#2198)
* buildroot 325737ba29...8c952a2d00 (2):
  > package/containerd: bump to version 1.6.8
  > Merge tag '2022.02.6' into 2022.02.x-haos
2022-10-20 16:02:42 +02:00
Stefan Agner
02f8f0abbd Bump buildroot (#2195)
* buildroot 5468d36a26...325737ba29 (1):
  > package/openvmtools: fix local privilege escalation vulnerability
2022-10-19 19:48:41 +02:00
Stefan Agner
43642e2f46 Fix S-ATA on ODROID-HC1 (#2194)
The ODROID-XU4 is largely compatible with the ODROID-HC1. It seems that
the image used to work until recently, where a stable kernel update
broke access to the S-ATA disk.

Revert the offending stable kernel patch to fix S-ATA disk on
ODROID-HC1.
2022-10-19 10:54:01 +02:00
Stefan Agner
2e5c7c77f8 Linux: Update kernel 5.15.74 (#2191) 2022-10-17 16:00:45 +02:00
Stefan Agner
3d763f1d77 Replace set-output commands with GITHUB_OUTPUT environment vars (#2192)
The set-output commands via stdout are deprecated. Use the GITHUB_OUTPUT
environment variable as suggested by GitHub.
2022-10-17 14:32:41 +02:00
Stefan Agner
4c31c47a98 Linux: Update kernel 5.15.73 (#2185) 2022-10-13 23:00:15 +02:00
Mike Degatano
566d6d775e Update outdated ui references in issue template (#2175)
* Update outdated ui references in issue template

* Mention top right menu

* Remove health

* Remove health and fix directions

Co-authored-by: Stefan Agner <stefan@agner.ch>
2022-10-13 22:55:30 +02:00
dependabot[bot]
e5e0f99d52 Bump actions/stale from 6.0.0 to 6.0.1 (#2179)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-10 16:42:00 +02:00
Stefan Agner
340cbc4c6b Yellow: Support wipeing boot files on NVMe (#2173) 2022-10-06 23:49:47 +02:00
Stefan Agner
2870e04586 Linux: Update kernel 5.15.72 (#2171) 2022-10-06 13:38:41 +02:00
Pascal Vizeli
a3cc15f11f Streamline CONFIG_RT_GROUP_SCHED (#2169)
* Disable RT_GROUP_SCHED
2022-10-03 15:41:13 +02:00
Stefan Agner
ce86be7632 Remove HDMI fix applied in Linux 5.15.68 (#2166) 2022-10-02 23:23:58 +02:00
Stefan Agner
c28d913a7e Linux: Update kernel 5.15.71 (#2165) 2022-10-02 10:15:22 +02:00
Bryan York
2ac9dc1c75 Add LXD VM Guest Agent Support (#2145)
* Add LXD VM Guest Agent Support

* Add systemd patch, remove udev rules, change to kernel modules, fix linter

* Remove systemd patch, add conditionals to qemu-guest and lxd-agent

* Update buildroot-external/package/qemu-guest-agent/qemu-guest.service

Co-authored-by: Stefan Agner <stefan@agner.ch>
2022-10-02 10:06:56 +02:00
Carsten Hiort
e53196d176 Allow multicast forwarding for IPv4 (#2160)
* Allow multicast forwarding for IPv4

* Move MCast fordwarding to seperate group

* Remove whitespace
2022-09-30 13:50:53 +02:00
Pascal Vizeli
a0bc73903c Add OS-Agent 1.4.1 support (#2157)
* Add OS-Agent 1.4.0 support

* Update OS-Agent 1.4.1
2022-09-27 11:06:01 +02:00
dependabot[bot]
a82edf718b Bump actions/stale from 5 to 6.0.0 (#2158)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2022-09-26 19:20:13 +02:00
ioctl2
d698d0e9d2 Add comments, ignore vscode* (#2152) 2022-09-24 08:25:44 +02:00
Stefan Agner
6e5dbc0792 Linux: Update kernel 5.15.69 (#2150) 2022-09-21 10:47:42 +02:00
ioctl2
9eb95cbbdb Enable .config via /proc/config.gz + zcat via busybox (#2149) 2022-09-21 10:47:30 +02:00
Stefan Agner
b2925966a8 Linux: Update kernel 5.15.68 (#2146) 2022-09-19 12:28:08 +02:00
ioctl2
eafbf6159d Fix proxmox mem hotplug/improve virtual hw support (#2138) 2022-09-19 12:25:23 +02:00
Stefan Agner
1a7daf4844 Remove UI reference from configuration USB flash drive docs (#2129) (#2131) 2022-09-14 11:48:29 +02:00
Stefan Agner
c1a767695d Backport patch to fix ODROID-N2 HDMI (#2128) 2022-09-12 22:16:29 +02:00
Mike Degatano
0404657e74 Connectivity check interval to 10 minutes (#2127) 2022-09-12 22:16:17 +02:00
Stefan Agner
0af0905b2e Linux: Update kernel 5.15.67 (#2126) 2022-09-12 22:16:09 +02:00
Stefan Agner
41b452ff48 Fix Docker key.json corruption check (#2125)
* Fix Docker key.json corruption check

Since /etc/docker does not get bind mounted anymore (see #2116),
key.json from the overlay partition is used directly.

* Use -e flag for jq to get useful exit code
2022-09-12 22:16:00 +02:00
Stefan Agner
bd7a32fd3e Drop unused cgroup_enable=memory kernel parameter (#2124)
The cgroup_enable parameter is a Raspberry Pi kernel specific kernel
parameter. Upstream based kernel do not have the parameter, and hence
do not do anything.

This gets rid of the following message during boot:
Unknown kernel command line parameters "cgroup_enable=memory", will be passed to user space.
2022-09-12 22:15:34 +02:00
Stefan Agner
c6f51db4ed Add Qualcomm QCA6174/QCA6174A Bluetooth support (#2122) (#2123)
* Add Qualcomm QCA6174/QCA6174A Bluetooth support (#2122)
2022-09-12 22:15:21 +02:00
Stefan Agner
a6445af712 Remvoe image name from journald tag/identifier (#2118)
The image name is stored in a separate field IMAGE_NAME as well. This
allows to use the container name (e.g. `hassio_supervisor`) to get logs
of all Supervisors independent of the image name (which differs for
every version).
2022-09-08 12:20:02 +02:00
Stefan Agner
cb58b14e06 Bump Raspberry Pi kernel and firmware to 1.20220830 (#2117)
* RaspberryPi: Update kernel 5.15.61 - 1.20220830

* Add Yellow to the Raspberry Pi kernel update script

* Bump Yellow to kernel 5.15.61 - 1.20220830

Also drop the work around for the LED polarity as the new firmware
has been fixed.

* Explicitly select no kernel module compression

Home Assistant OS uses a compressed rootfs already, no compression for
kernel modules necessary.

* Bump buildroot

* buildroot d7e4c223e5...5468d36a26 (1):
  > package/rpi-firmware: bump version to 1.20220830
2022-09-07 19:21:30 +02:00
Stefan Agner
66c15adbbf Move Docker configuration to daemon.json (#2116)
This is more readable than passing arguments to the daemon directly. It
also shortens the ExecStart command significantly, which is stored in
every log entry in systemd-journald.
2022-09-07 19:13:47 +02:00
Stefan Agner
b7f8e22fbf Linux: Update kernel 5.15.65 (#2114) 2022-09-06 20:28:31 +02:00
Stefan Agner
cf11b5a745 Try using old image name of the Supervisor image (#2111) (#2113)
* Try using old image name of the Supervisor image

* Tag the old image with the new name so recreation works
2022-09-06 20:28:24 +02:00
Stefan Agner
30a0bb6d85 Try booting up to 3 times on GRUB2 based systems (#2112)
* Retry up to 3 times

By default, HAOS used to retry 3 times. That is still true for U-Boot
based boards. Apply the same logic for GRUB2 based systems for
consistency.

This can help to remedy intermittent internet/connectivity issuese.
Altough hacky, in practise it makes sense to give the newly installed OS
another go.

* Also apply to generic-aarch64
2022-09-06 20:28:14 +02:00
Stefan Agner
f4defcedfd Bump buildroot (#2109)
* buildroot 9dbf8d5e86...d7e4c223e5 (1):
  > Merge tag '2022.02.5' into 2022.02.x-haos
2022-09-03 13:06:21 +02:00
Stefan Agner
e51b9bf29e Bump OS release version to 10 2022-09-02 23:49:49 +02:00
268 changed files with 18399 additions and 2085 deletions

View File

@@ -29,6 +29,7 @@ body:
- khadas-vim3 (Khadas VIM3)
- odroid-c2 (Hardkernel ODROID-C2)
- odroid-c4 (Hardkernel ODROID-C4)
- odroid-m1 (Hardkernel ODROID-M1)
- odroid-n2 (Hardkernel ODROID-N2/N2+)
- odroid-xu4 (Hardkernel ODROID-XU4)
- ova (for Virtual Machines)
@@ -39,10 +40,11 @@ body:
- rpi4-64 (Raspberry Pi 4/400 64-bit OS)
- tinker (ASUS Tinker Board/Tinker Board S)
- yellow (Home Assistant Yellow)
- green (Home Assistant Green)
description: >
Can be found in the [Configuration panel -> Settings -> Info](https://my.home-assistant.io/redirect/info/). It is listed as the `Board` value.
Can be found in [Settings -> System -> Repairs -> System Information](https://my.home-assistant.io/redirect/system_health/). It is listed as the `Board` value.
[![Open your Home Assistant instance and show your Home Assistant version information.](https://my.home-assistant.io/badges/info.svg)](https://my.home-assistant.io/redirect/info/)
[![Open your Home Assistant instance and show health information about your system.](https://my.home-assistant.io/badges/system_health.svg)](https://my.home-assistant.io/redirect/system_health/)
- type: input
validations:
required: true
@@ -50,7 +52,7 @@ body:
label: What version of Home Assistant Operating System is installed?
placeholder: "6.6"
description: >
Can be found in the [Configuration panel -> Settings -> Info](https://my.home-assistant.io/redirect/info/). It is listed as the `Host Operating System` value.
Can be found in [Settings -> System -> Repairs -> System Information (top right menu)](https://my.home-assistant.io/redirect/system_health/). It is listed as the `Host Operating System` value.
- type: dropdown
validations:
required: true
@@ -78,7 +80,8 @@ body:
attributes:
label: Anything in the Supervisor logs that might be useful for us?
description: >
Supervisor Logs can be found under [Configuration panel -> Add-ons, Backup & Supervisor -> System](https://my.home-assistant.io/redirect/supervisor_logs/), then choose Log Provider `Supervisor`.
Supervisor Logs can be found in [Settings -> System -> Logs](https://my.home-assistant.io/redirect/logs/)
then choose `Supervisor` in the top right.
[![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/)
render: txt
@@ -88,16 +91,19 @@ body:
attributes:
label: Anything in the Host logs that might be useful for us?
description: >
Supervisor Logs can be found under [Configuration panel -> Add-ons, Backup & Supervisor -> System](https://my.home-assistant.io/redirect/supervisor_logs/), then choose Log Provider `Host`.
Host Logs can be found in [Settings -> System -> Logs](https://my.home-assistant.io/redirect/logs/)
then choose `Host` in the top right.
render: txt
- type: textarea
attributes:
label: System Health information
label: System information
description: >
**Optional** Copy the full System Health in this text area.
Can be found in the [Configuration panel -> Settings -> Info](https://my.home-assistant.io/redirect/info/).
Use the copy icon on top right and choose `For GitHub`.
System information can be found in [Settings -> System -> Repairs -> System Information (top right menu)](https://my.home-assistant.io/redirect/system_health/),
Click the copy button at the bottom of the pop-up and paste it here.
[![Open your Home Assistant instance and show health information about your system.](https://my.home-assistant.io/badges/system_health.svg)](https://my.home-assistant.io/redirect/system_health/)
- type: textarea
attributes:
label: Additional information

View File

@@ -0,0 +1,95 @@
name: 'Bump RPi Imager OS version'
description: 'Bump version of Home Assistant OS in RPi Imager'
inputs:
version:
required: true
description: "Version of Home Assistant OS to bump to."
release-date:
required: true
description: "Release date as ISO 8601 date string."
runs:
using: "composite"
steps:
- shell: bash
id: validate-input
env:
INPUTS_DATE: ${{ inputs.release-date }}
run: |
if [[ -z "$INPUTS_DATE" ]] || [[ ! "$INPUTS_DATE" =~ ^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})Z$ ]]; then
echo "::error::Argument 'release-date' must be an ISO 8601 date string."
exit 1
else
echo "date=$(date --date=${INPUTS_DATE} +'%Y-%m-%d')" >> "$GITHUB_OUTPUT"
fi
- shell: bash
run: git clone --depth 1 https://github.com/home-assistant/version.git /tmp/version
- shell: bash
env:
INPUTS_VERSION: ${{ inputs.version }}
run: |
function bump_entry() {
json=$1
version=$2
release_date=$3
image_id=$4
image_name=$5
url="https://github.com/home-assistant/operating-system/releases/download/${version}/haos_${image_id}-${version}.img.xz"
temp_image=$(mktemp --suffix=.img.xz)
temp_out=$(mktemp)
curl -fsL -o "$temp_image" "$url"
image_download_size=$(stat --printf="%s" "$temp_image")
image_download_sha256=$(sha256sum "$temp_image" | awk '{print $1}')
unxz "$temp_image"
temp_unpacked="${temp_image%.*}"
extract_size=$(stat --printf="%s" "$temp_unpacked")
extract_sha256=$(sha256sum "$temp_unpacked" | awk '{print $1}')
entry_name="Home Assistant OS ${version} (${image_name})"
jq '
. as $data
| $data
| .os_list = [
.os_list[]
| if .name | test("Home Assistant OS .* \\(" + $image_name + "\\)") then
.name = "Home Assistant OS " + $version + " (" + $image_name + ")"
| .url = $url
| .extract_size = ($extract_size | tonumber)
| .extract_sha256 = $extract_sha256
| .release_date = $release_date
| .image_download_size = ($image_download_size | tonumber)
| .image_download_sha256 = $image_download_sha256
else .
end
]' \
--arg version "$version" \
--arg image_name "$image_name" \
--arg entry_name "$entry_name" \
--arg release_date "$release_date" \
--arg url "$url" \
--arg image_download_size "$image_download_size" \
--arg image_download_sha256 "$image_download_sha256" \
--arg extract_size "$extract_size" \
--arg extract_sha256 "$extract_sha256" \
"$json" > "$temp_out"
mv "$temp_out" "$json"
rm -rf "$temp_unpacked" "$temp_out"
}
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"
- shell: bash
env:
INPUTS_VERSION: ${{ inputs.version }}
run: |
cd /tmp/version
git commit -am "Bump Home Assistant OS to ${INPUTS_VERSION} for RPi Imager"
git push
- shell: bash
run: rm -rf /tmp/version

View File

@@ -8,6 +8,7 @@ assume-fixed:
release. You can find the latest stable release at
https://github.com/home-assistant/operating-system/releases/latest
close: true
close-reason: not planned
core-issue:
comment: >
@@ -19,6 +20,19 @@ core-issue:
repository, the issue might have been reported already. Open a new issue
in that repository if you can't find a matching issue.
close: true
close-reason: not planned
frontend-issue:
comment: >
:wave: @{issue-author}, thanks for reporting an issue!
It looks like this issue is related to Home Assistant Frontend. Please
check the [Home Assistant Frontend](https://github.com/home-assistant/frontend/issues)
repository, the issue might have been reported already. Open a new issue
in that repository if you can't find a matching issue.
close: true
close-reason: not planned
supervisor-issue:
comment: >
@@ -30,3 +44,16 @@ supervisor-issue:
repository, the issue might have been reported already. Open a new issue
in that repository if you can't find a matching issue.
close: true
close-reason: not planned
new-feature:
comment: >
:wave: @{issue-author}, thanks for your input!
We use this issue tracker to track issues of currently supported features.
Your request appears to request a new feature. We track potential new
features in the [Feature Request section of our Community Forum](https://community.home-assistant.io/c/feature-requests/13).
Please check if someone already requested a similar feature, or create
a new feature request with the "haos" tag in that forum. Thank you!
close: true
close-reason: not planned

View File

@@ -1,4 +1,5 @@
name-template: Home Assistant OS $NEXT_MINOR_VERSION
name-template: Home Assistant OS $RESOLVED_VERSION
tag-template: $RESOLVED_VERSION
version-template: "$MAJOR.$MINOR"
categories:
- title: 'Home Assistant Operating System'
@@ -9,6 +10,8 @@ categories:
label: 'board/raspberrypi'
- title: 'Home Assistant Yellow'
label: 'board/yellow'
- title: 'Home Assistant Green'
label: 'board/green'
- title: 'Open Virtual Appliance'
label: 'board/ova'
- title: 'Generic x86-64'
@@ -26,3 +29,8 @@ template: |
## Changes
$CHANGES
version-resolver:
major:
labels:
- 'major'
default: minor

93
.github/workflows/artifacts-index.yaml vendored Normal file
View File

@@ -0,0 +1,93 @@
name: Update artifacts index
on:
# Manual run for specified version
workflow_dispatch:
inputs:
version:
description: Version of HAOS to build index for
required: true
type: string
# Called by other workflows (e.g. build.yaml)
workflow_call:
inputs:
version:
description: Version of HAOS to build index for
required: true
type: string
secrets:
R2_OS_ARTIFACTS_ID:
required: true
R2_OS_ARTIFACTS_KEY:
required: true
R2_OS_ARTIFACTS_BUCKET:
required: true
R2_OS_ARTIFACTS_ENDPOINT:
required: true
CF_ZONE:
required: true
CF_PURGE_TOKEN:
required: true
env:
PYTHON_VERSION: "3.10"
jobs:
build-index:
name: Build Home Assistant OS artifacts index
runs-on: ubuntu-22.04
steps:
- name: Checkout source
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Setup Python version ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install AWS CLI
run: pip install awscli
- name: Create build index
env:
AWS_ACCESS_KEY_ID: ${{ secrets.R2_OS_ARTIFACTS_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.R2_OS_ARTIFACTS_KEY }}
run: |
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"
aws s3 cp \
"${{ github.event.inputs.version }}.json" \
s3://${{ secrets.R2_OS_ARTIFACTS_BUCKET }}/indexes/ \
--endpoint-url "${{ secrets.R2_OS_ARTIFACTS_ENDPOINT }}"
- name: Regenerate artifacts index
env:
AWS_ACCESS_KEY_ID: ${{ secrets.R2_OS_ARTIFACTS_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.R2_OS_ARTIFACTS_KEY }}
run: |
aws s3api list-objects-v2 \
--bucket "${{ secrets.R2_OS_ARTIFACTS_BUCKET }}" \
--endpoint-url "${{ secrets.R2_OS_ARTIFACTS_ENDPOINT }}" \
--prefix "indexes/" \
--query 'Contents[].Key' | jq 'map(capture("indexes/(?<version>[[:digit:]].+).json").version) | sort' > .os-artifacts/index.json
aws s3 sync \
.os-artifacts/ \
s3://${{ secrets.R2_OS_ARTIFACTS_BUCKET }}/ \
--endpoint-url "${{ secrets.R2_OS_ARTIFACTS_ENDPOINT }}" \
- name: Flush CloudFlare cache
run: |
curl --silent --show-error --fail -X POST \
"https://api.cloudflare.com/client/v4/zones/${{ secrets.CF_ZONE }}/purge_cache" \
-H "Authorization: Bearer ${{ secrets.CF_PURGE_TOKEN }}" \
-H "Content-Type: application/json" \
--data '{"files": [
"https://os-artifacts.home-assistant.io/index.html",
"https://os-artifacts.home-assistant.io/index.json"
] }'

303
.github/workflows/build.yaml vendored Normal file
View File

@@ -0,0 +1,303 @@
# Home Assistant Operating System build workflow
name: OS build
on:
release:
types: [published]
workflow_dispatch:
inputs:
boards:
description: 'List of boards to build (comma separated identifiers)'
required: false
type: string
env:
PYTHON_VERSION: "3.10"
jobs:
prepare:
name: Prepare build
runs-on: ubuntu-22.04
permissions:
contents: read
pull-requests: read
packages: write
outputs:
version_dev: ${{ steps.version_dev.outputs.version_dev }}
version_main: ${{ steps.version.outputs.version_main }}
version_full: ${{ steps.version.outputs.version_full }}
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 }}
steps:
- name: Checkout source
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Generate development version
shell: bash
id: version_dev
if: ${{ github.event_name != 'release' }}
run: |
version_dev="dev$(date --utc +'%Y%m%d')"
echo "Development version \"${version_dev}\""
echo "version_dev=${version_dev}" >> $GITHUB_OUTPUT
- name: Set version suffix
if: ${{ github.event_name != 'release' }}
env:
VERSION_DEV: ${{ steps.version_dev.outputs.version_dev }}
run: |
sed -i -E "s/(^VERSION_SUFFIX=\").*(\"$)/\1${VERSION_DEV}\2/" buildroot-external/meta
- name: Get version
id: version
run: |
. ${GITHUB_WORKSPACE}/buildroot-external/meta
echo "version_main=${VERSION_MAJOR}.${VERSION_MINOR}" >> $GITHUB_OUTPUT
if [ -z "${VERSION_SUFFIX}" ]; then
version_full="${VERSION_MAJOR}.${VERSION_MINOR}"
else
version_full="${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_SUFFIX}"
fi
echo "version_full=${version_full}" >> $GITHUB_OUTPUT
echo "Full version number of this release is \"${version_full}\"."
- name: Validate version
id: version_check
if: ${{ github.event_name == 'release' }}
run: |
if [ "${{ steps.version.outputs.version_full }}" != "${{ github.event.release.tag_name }}" ]; then
echo "Version number in Buildroot metadata does not match tag (${{ steps.version.outputs.version_full }} vs ${{ github.event.release.tag_name }})."
exit 1
fi
- name: Get channel
id: channel
run: |
if [[ "${{ github.event_name }}" == "release" ]]; then
if [[ "${{ github.event.release.prerelease }}" == "true" ]]; then
echo "channel=beta" >> "$GITHUB_OUTPUT"
else
echo "channel=stable" >> "$GITHUB_OUTPUT"
fi
else
echo "channel=dev" >> "$GITHUB_OUTPUT"
fi
- name: Create build matrix
uses: actions/github-script@v6
id: generate_matrix
with:
script: |
const boards = require('./.github/workflows/matrix.json')
if ("${{ github.event_name }}" == "release") {
return { "board": boards }
}
const boardFilter = "${{ github.event.inputs.boards }}"
if (boardFilter == "") {
console.log("Run full build for all boards")
return { "board": boards }
} else {
console.log("Run partial build")
const boardSet = new Set(boardFilter.split(","))
const buildBoards = boards.filter(b => boardSet.has(b.id))
return { "board": buildBoards }
}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.0.0
- name: Log in to the GitHub container registry
uses: docker/login-action@v3.0.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
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 }}
push: true
build:
name: Build for ${{ matrix.board.id }}
permissions:
contents: write # for actions/upload-release-asset to upload release asset
needs: prepare
strategy:
fail-fast: ${{ github.event_name == 'release' }}
matrix: ${{ fromJson(needs.prepare.outputs.matrix) }}
runs-on: ubuntu-22.04
steps:
- name: Checkout source
uses: actions/checkout@v4
with:
submodules: true
persist-credentials: false
- name: Setup Python version ${{ env.PYTHON_VERSION }}
if: ${{ github.event_name != 'release' }}
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install AWS CLI
if: ${{ github.event_name != 'release' }}
run: pip install awscli
- name: Set version suffix
if: ${{ github.event_name != 'release' }}
env:
VERSION_DEV: ${{ needs.prepare.outputs.version_dev }}
run: |
sed -i -E "s/(^VERSION_SUFFIX=\").*(\"$)/\1${VERSION_DEV}\2/" buildroot-external/meta
- name: 'Add release PKI certs'
env:
RAUC_CERTIFICATE: ${{ secrets.RAUC_CERTIFICATE }}
RAUC_PRIVATE_KEY: ${{ secrets.RAUC_PRIVATE_KEY }}
run: |
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: Free space on build drive
run: |
# Inspired by https://github.com/easimon/maximize-build-space/blob/v7/action.yml
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
- name: "Restore cache: object files"
uses: actions/cache/restore@v3
with:
path: /mnt/cache/cc
key: haos-cc-${{ matrix.board.id }}
- name: Build
run: |
BUILDER_UID="$(id -u)"
BUILDER_GID="$(id -g)"
docker run --rm --privileged -v "${GITHUB_WORKSPACE}:/build" \
-e BUILDER_UID="${BUILDER_UID}" -e BUILDER_GID="${BUILDER_GID}" \
-v "/mnt/cache:/cache" \
${{ needs.prepare.outputs.build_container_image }} \
make BUILDDIR=/build ${{ matrix.board.defconfig }}
- name: Upload artifacts
if: ${{ github.event_name != 'release' }}
working-directory: output/images/
env:
AWS_ACCESS_KEY_ID: ${{ secrets.R2_OS_ARTIFACTS_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.R2_OS_ARTIFACTS_KEY }}
run: |
aws s3 sync \
./ \
s3://${{ secrets.R2_OS_ARTIFACTS_BUCKET }}/${{ needs.prepare.outputs.version_full }}/ \
--exclude "*" \
--include "haos_*" \
--endpoint-url ${{ secrets.R2_OS_ARTIFACTS_ENDPOINT }}
- name: Upload release assets
if: ${{ github.event_name == 'release' }}
uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: output/images/haos_*
- name: Print cache stats
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)"
- name: "Save cache: object files"
if: github.ref == 'refs/heads/dev'
uses: actions/cache/save@v3
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' }}
with:
name: ova-image
path: |
output/images/haos_ova*.qcow2.xz
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' }}
needs: [ build, prepare ]
uses: home-assistant/operating-system/.github/workflows/artifacts-index.yaml@dev
with:
version: ${{ needs.prepare.outputs.version_full }}
secrets:
R2_OS_ARTIFACTS_ID: ${{ secrets.R2_OS_ARTIFACTS_ID }}
R2_OS_ARTIFACTS_KEY: ${{ secrets.R2_OS_ARTIFACTS_KEY }}
R2_OS_ARTIFACTS_BUCKET: ${{ secrets.R2_OS_ARTIFACTS_BUCKET }}
R2_OS_ARTIFACTS_ENDPOINT: ${{ secrets.R2_OS_ARTIFACTS_ENDPOINT }}
CF_ZONE: ${{ secrets.CF_ZONE }}
CF_PURGE_TOKEN: ${{ secrets.CF_PURGE_TOKEN }}
bump_version:
name: Bump ${{ needs.prepare.outputs.channel }} channel version
if: ${{ github.repository == 'home-assistant/operating-system' }}
environment: ${{ needs.prepare.outputs.channel }}
needs: [ build, prepare ]
runs-on: ubuntu-22.04
steps:
- name: Checkout source
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Initialize git
uses: home-assistant/actions/helpers/git-init@master
with:
name: ${{ secrets.GIT_NAME }}
email: ${{ secrets.GIT_EMAIL }}
token: ${{ secrets.GIT_TOKEN }}
- name: Bump Home Assistant OS ${{ needs.prepare.outputs.channel }} channel version
uses: home-assistant/actions/helpers/version-push@master
with:
key: "hassos[]"
key-description: "Home Assistant OS"
version: ${{ needs.prepare.outputs.version_full }}
channel: ${{ needs.prepare.outputs.channel }}
- name: Bump Home Assistant OS beta channel version on stable release
if: ${{ needs.prepare.outputs.channel == 'stable' }}
uses: home-assistant/actions/helpers/version-push@master
with:
key: "hassos[]"
key-description: "Home Assistant OS"
version: ${{ needs.prepare.outputs.version_full }}
channel: beta
- name: Bump stable Home Assistant version for RPi Imager
if: ${{ github.event_name == 'release' && needs.prepare.outputs.channel == 'stable' }}
uses: "./.github/actions/bump-rpi-imager-version"
with:
version: ${{ needs.prepare.outputs.version_full }}
release-date: ${{ github.event.release.published_at }}

View File

@@ -1,143 +0,0 @@
# Home Assistant Operating System build workflow
name: Development build
on:
workflow_dispatch:
pull_request_target:
types: [opened,synchronize,labeled]
jobs:
prepare:
if: ${{ github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'run-dev-build') }}
name: Prepare build
runs-on: [ "ubuntu-20.04" ]
permissions:
contents: read
pull-requests: read
outputs:
version_main: ${{ steps.version_main.outputs.version_main }}
version_dev: ${{ steps.version_dev.outputs.version_dev }}${{ steps.version_pr.outputs.version_pr }}
matrix: ${{ steps.generate_matrix.outputs.result }}
steps:
- name: Generate Development build version
shell: bash
id: version_dev
run: |
version_dev="dev$(date --utc +'%Y%m%d')"
echo "Development version \"${version_dev}\""
echo "::set-output name=version_dev::${version_dev}"
- name: Generate Development build version for PR
if: ${{ github.event.pull_request }}
shell: bash
id: version_pr
run: |
version_pr=$(printf "%05d" ${{ github.event.pull_request.number }})
echo "Development build for PR #${{ github.event.pull_request.number }}"
echo "::set-output name=version_pr::${version_pr}"
- uses: actions/checkout@v3
- name: Get Major/Minor version
id: version_main
run: |
major=$(cat ${GITHUB_WORKSPACE}/buildroot-external/meta | grep VERSION_MAJOR | cut -d'=' -f2)
build=$(cat ${GITHUB_WORKSPACE}/buildroot-external/meta | grep VERSION_BUILD | cut -d'=' -f2)
echo "::set-output name=version_main::${major}.${build}"
- name: Create build matrix
uses: actions/github-script@v6
id: generate_matrix
with:
script: |
const boards = require('./.github/workflows/matrix.json')
if (context.eventName == "workflow_dispatch") {
console.log("Run full build for all boards")
return { "board": boards }
}
const labels = context.payload.pull_request.labels.map(l => l.name)
const labelsSet = new Set(labels)
const buildBoards = boards.filter(b => labelsSet.has(b.label))
return { "board": buildBoards }
build:
if: ${{ github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'run-dev-build') }}
name: Development build for ${{ matrix.board.id }}
environment: "dev_build"
needs: prepare
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.prepare.outputs.matrix) }}
runs-on: ${{ matrix.board.runner }}
steps:
- name: Define git reference
uses: actions/github-script@v6
id: generate_gitref
with:
script: |
if (context.eventName == "workflow_dispatch")
return { "ref": context.ref }
return { "ref": context.payload.pull_request.head.sha }
- name: Checkout source
uses: actions/checkout@v3
with:
submodules: true
persist-credentials: false
ref: ${{ fromJSON(steps.generate_gitref.outputs.result).ref }}
- name: Build container
run: docker build -t haos-builder .
- name: 'Add release PKI certs'
env:
RAUC_CERTIFICATE: ${{ secrets.RAUC_CERTIFICATE }}
RAUC_PRIVATE_KEY: ${{ secrets.RAUC_PRIVATE_KEY }}
run: |
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: Build
run: |
BUILDER_UID="$(id -u)"
BUILDER_GID="$(id -g)"
docker run --rm --privileged -v "${GITHUB_WORKSPACE}:/build" \
-e BUILDER_UID="${BUILDER_UID}" -e BUILDER_GID="${BUILDER_GID}" \
-v "${{ matrix.board.runner }}-build-cache:/cache" \
-v "/build/output" \
haos-builder make BUILDDIR=/build VERSION_DEV=${{ needs.prepare.outputs.version_dev }} ${{ matrix.board.defconfig }}
- name: Upload images
uses: burnett01/rsync-deployments@5.2
with:
rsh: -q
switches: -aW
path: release/
remote_path: ${{ secrets.DEV_TARGET_PATH }}/${{ needs.prepare.outputs.version_main }}.${{ needs.prepare.outputs.version_dev }}/
remote_host: ${{ secrets.DEV_HOST }}
remote_port: ${{ secrets.DEV_PORT }}
remote_user: ${{ secrets.DEV_USERNAME }}
remote_key: ${{ secrets.DEV_SSH_KEY }}
bump_version:
name: Bump dev channel version
if: ${{ github.event_name == 'workflow_dispatch' }}
needs: [ build, prepare ]
runs-on: [ "ubuntu-20.04" ]
steps:
- name: Initialize git
uses: home-assistant/actions/helpers/git-init@master
with:
name: ${{ secrets.GIT_NAME }}
email: ${{ secrets.GIT_EMAIL }}
token: ${{ secrets.GIT_TOKEN }}
- name: Bump Home Assistant OS dev channel version to ${{ needs.prepare.outputs.version_main }}.${{ needs.prepare.outputs.version_dev }}
uses: home-assistant/actions/helpers/version-push@master
with:
key: "hassos[]"
key-description: "Home Assistant OS"
version: ${{ needs.prepare.outputs.version_main }}.${{ needs.prepare.outputs.version_dev }}
channel: "dev"

View File

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

View File

@@ -2,91 +2,103 @@
{
"id": "ova",
"defconfig": "ova",
"runner": "x86-64-runner",
"architecture": "x86-64",
"label": "board/ova"
},
{
"id": "generic-x86-64",
"defconfig": "generic_x86_64",
"runner": "x86-64-runner",
"architecture": "x86-64",
"label": "board/generic-x86-64"
},
{
"id": "generic-aarch64",
"defconfig": "generic_aarch64",
"runner": "aarch64-runner",
"architecture": "aarch64",
"label": "board/generic-aarch64"
},
{
"id": "khadas-vim3",
"defconfig": "khadas_vim3",
"runner": "aarch64-runner",
"architecture": "aarch64",
"label": "board/khadas"
},
{
"id": "odroid-c2",
"defconfig": "odroid_c2",
"runner": "aarch64-runner",
"architecture": "aarch64",
"label": "board/odroid"
},
{
"id": "odroid-c4",
"defconfig": "odroid_c4",
"runner": "aarch64-runner",
"architecture": "aarch64",
"label": "board/odroid"
},
{
"id": "odroid-m1",
"defconfig": "odroid_m1",
"architecture": "aarch64",
"label": "board/odroid"
},
{
"id": "odroid-n2",
"defconfig": "odroid_n2",
"runner": "aarch64-runner",
"architecture": "aarch64",
"label": "board/odroid"
},
{
"id": "odroid-xu4",
"defconfig": "odroid_xu4",
"runner": "aarch64-runner",
"architecture": "aarch64",
"label": "board/odroid"
},
{
"id": "rpi2",
"defconfig": "rpi2",
"runner": "arm-runner",
"architecture": "arm",
"label": "board/raspberrypi"
},
{
"id": "rpi3",
"defconfig": "rpi3",
"runner": "arm-runner",
"architecture": "arm",
"label": "board/raspberrypi"
},
{
"id": "rpi3-64",
"defconfig": "rpi3_64",
"runner": "aarch64-runner",
"architecture": "aarch64",
"label": "board/raspberrypi"
},
{
"id": "rpi4",
"defconfig": "rpi4",
"runner": "arm-runner",
"architecture": "arm",
"label": "board/raspberrypi"
},
{
"id": "rpi4-64",
"defconfig": "rpi4_64",
"runner": "aarch64-runner",
"architecture": "aarch64",
"label": "board/raspberrypi"
},
{
"id": "yellow",
"defconfig": "yellow",
"runner": "aarch64-runner",
"architecture": "aarch64",
"label": "board/yellow"
},
{
"id": "green",
"defconfig": "green",
"architecture": "aarch64",
"label": "board/green"
},
{
"id": "tinker",
"defconfig": "tinker",
"runner": "arm-runner",
"architecture": "arm",
"label": "board/tinker"
}
]

View File

@@ -6,10 +6,10 @@ on: [pull_request]
jobs:
linters:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true
@@ -19,9 +19,9 @@ jobs:
dockerfile: Dockerfile
- name: Check shell scripts
uses: ludeeus/action-shellcheck@1.1.0
uses: ludeeus/action-shellcheck@2.0.0
with:
ignore: buildroot buildroot-external/package/xe-guest-utilities
ignore: buildroot
- name: Check buildroot-external packages
run: |

View File

@@ -3,6 +3,7 @@ name: Release Drafter
on:
push:
branches:
- dev
- rel-*
jobs:

View File

@@ -1,177 +0,0 @@
# Home Assistant Operating System release build workflow
name: Release build
on:
release:
types: [published]
jobs:
validate_release:
name: Validate release
runs-on: [ "ubuntu-20.04" ]
outputs:
version: ${{ steps.version_check.outputs.version }}
version_dev: ${{ steps.version_check.outputs.version_dev }}
matrix: ${{ steps.generate_matrix.outputs.result }}
steps:
- uses: actions/checkout@v3
- name: Validate version
id: version_check
run: |
major=$(cat ${GITHUB_WORKSPACE}/buildroot-external/meta | grep VERSION_MAJOR | cut -d'=' -f2)
build=$(cat ${GITHUB_WORKSPACE}/buildroot-external/meta | grep VERSION_BUILD | cut -d'=' -f2)
tag_major=$(echo "${{ github.event.release.tag_name }}" | cut -d '.' -f 1)
tag_build=$(echo "${{ github.event.release.tag_name }}" | cut -d '.' -f 2)
tag_dev=$(echo "${{ github.event.release.tag_name }}" | cut -d '.' -f 3)
if [ "${major}.${build}" != "${tag_major}.${tag_build}" ]; then
echo "Version number in Buildroot metadata is does not match tag (${major}.${build} vs ${{ github.event.release.tag_name }})."
exit 1
fi
if [ "" != "${tag_dev}" ]; then
echo "Note: Release build with custom dev part: ${tag_dev}."
echo "::set-output name=version::${major}.${build}.${tag_dev}"
else
echo "::set-output name=version::${major}.${build}"
fi
echo "::set-output name=version_dev::${tag_dev}"
- name: Create build matrix
uses: actions/github-script@v6
id: generate_matrix
with:
script: |
const boards = require('./.github/workflows/matrix.json')
return { "board": boards }
build:
permissions:
contents: write # for actions/upload-release-asset to upload release asset
name: Release build for ${{ matrix.board.id }}
needs: validate_release
strategy:
matrix: ${{ fromJson(needs.validate_release.outputs.matrix) }}
runs-on: ${{ matrix.board.runner }}
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
with:
submodules: true
- name: Build container
run: docker build -t haos-builder .
- name: 'Add release PKI certs'
env:
RAUC_CERTIFICATE: ${{ secrets.RAUC_CERTIFICATE }}
RAUC_PRIVATE_KEY: ${{ secrets.RAUC_PRIVATE_KEY }}
run: |
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: Build
run: |
BUILDER_UID="$(id -u)"
BUILDER_GID="$(id -g)"
docker run --rm --privileged -v "${GITHUB_WORKSPACE}:/build" \
-e BUILDER_UID="${BUILDER_UID}" -e BUILDER_GID="${BUILDER_GID}" \
-v "${{ matrix.board.runner }}-build-cache:/cache" \
-v "/build/output" \
haos-builder make BUILDDIR=/build VERSION_DEV=${{ needs.validate_release.outputs.version_dev }} ${{ matrix.board.defconfig }}
- name: Upload disk image
if: ${{ matrix.board.id != 'ova' }}
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ github.workspace }}/release/haos_${{ matrix.board.id }}-${{ needs.validate_release.outputs.version }}.img.xz
asset_name: haos_${{ matrix.board.id }}-${{ needs.validate_release.outputs.version }}.img.xz
asset_content_type: application/x-xz
- name: Upload rauc update
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ github.workspace }}/release/haos_${{ matrix.board.id }}-${{ needs.validate_release.outputs.version }}.raucb
asset_name: haos_${{ matrix.board.id }}-${{ needs.validate_release.outputs.version }}.raucb
asset_content_type: application/octet-stream
- name: Upload ova image
if: ${{ matrix.board.id == 'ova' }}
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ github.workspace }}/release/haos_${{ matrix.board.id }}-${{ needs.validate_release.outputs.version }}.ova
asset_name: haos_${{ matrix.board.id }}-${{ needs.validate_release.outputs.version }}.ova
asset_content_type: application/x-tar
- name: Upload qcow2 image
if: ${{ matrix.board.id == 'ova' || matrix.board.id == 'generic-aarch64' }}
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ github.workspace }}/release/haos_${{ matrix.board.id }}-${{ needs.validate_release.outputs.version }}.qcow2.xz
asset_name: haos_${{ matrix.board.id }}-${{ needs.validate_release.outputs.version }}.qcow2.xz
asset_content_type: application/x-xz
- name: Upload vdi image
if: ${{ matrix.board.id == 'ova' }}
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ github.workspace }}/release/haos_${{ matrix.board.id }}-${{ needs.validate_release.outputs.version }}.vdi.zip
asset_name: haos_${{ matrix.board.id }}-${{ needs.validate_release.outputs.version }}.vdi.zip
asset_content_type: application/zip
- name: Upload vhdx image
if: ${{ matrix.board.id == 'ova' }}
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ github.workspace }}/release/haos_${{ matrix.board.id }}-${{ needs.validate_release.outputs.version }}.vhdx.zip
asset_name: haos_${{ matrix.board.id }}-${{ needs.validate_release.outputs.version }}.vhdx.zip
asset_content_type: application/zip
- name: Upload vmdk image
if: ${{ matrix.board.id == 'ova' || matrix.board.id == 'generic-aarch64' }}
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ github.workspace }}/release/haos_${{ matrix.board.id }}-${{ needs.validate_release.outputs.version }}.vmdk.zip
asset_name: haos_${{ matrix.board.id }}-${{ needs.validate_release.outputs.version }}.vmdk.zip
asset_content_type: application/zip
bump_version:
name: Bump dev version to ${{ needs.validate_release.outputs.version }}
needs: [ build, validate_release ]
runs-on: [ "ubuntu-20.04" ]
steps:
- name: Initialize git
uses: home-assistant/actions/helpers/git-init@master
with:
name: ${{ secrets.GIT_NAME }}
email: ${{ secrets.GIT_EMAIL }}
token: ${{ secrets.GIT_TOKEN }}
- name: Bump Home Assistant OS beta version
uses: home-assistant/actions/helpers/version-push@master
with:
key: "hassos[]"
key-description: "Home Assistant OS"
version: ${{ needs.validate_release.outputs.version }}
channel: "beta"

View File

@@ -3,7 +3,7 @@ name: Stale
# yamllint disable-line rule:truthy
on:
schedule:
- cron: "0 * * * *"
- cron: "40 5 * * *"
workflow_dispatch:
jobs:
@@ -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@v5
uses: actions/stale@v8.0.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 90

94
.github/workflows/test.yaml vendored Normal file
View File

@@ -0,0 +1,94 @@
name: Test HAOS image
run-name: "Test HAOS ${{ inputs.version || format('(OS build #{0})', github.event.workflow_run.run_number) }}"
on:
# Manual test of specified version
workflow_dispatch:
inputs:
version:
description: Version of HAOS to test
required: true
type: string
# Called by other workflows (e.g. build.yaml)
workflow_call:
inputs:
use-artifact:
# Workaround for GH weirdness: https://github.com/actions/runner/discussions/1884
description: Download OS image using actions/download-artifact
required: false
type: boolean
default: true
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:
- name: Checkout source
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Install system dependencies
run: |
sudo apt update
sudo apt install -y qemu-system-x86 ovmf
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.12
- name: Install Python requirements
run:
pip install -r tests/requirements.txt
- name: Download HAOS image
if: ${{ !inputs.use-artifact }}
run: |
curl -sfL -o haos.qcow2.xz https://os-artifacts.home-assistant.io/${{github.event.inputs.version}}/haos_ova-${{github.event.inputs.version}}.qcow2.xz
- name: Get OS image artifact
if: ${{ inputs.use-artifact }}
uses: actions/download-artifact@v3
with:
name: ova-image
- name: Extract OS image
run: |
xz -dc haos*.qcow2.xz > tests/haos.qcow2
rm haos*.qcow2.xz
- name: Run tests
run: |
./tests/run_tests.sh
- name: Archive logs
uses: actions/upload-artifact@v3
if: always()
with:
name: logs
path: |
tests/lg_logs/**
- name: Archive JUnit reports
uses: actions/upload-artifact@v3
if: always()
with:
name: junit_reports
path: |
tests/junit_reports/*.xml
- name: Publish test report
uses: mikepenz/action-junit-report@v4
if: always()
with:
report_paths: 'tests/junit_reports/*.xml'
annotate_only: true
detailed_summary: true

10
.gitignore vendored
View File

@@ -1,4 +1,12 @@
# OS generated files
.DS_Store
# Build output dirs
/release
*.pem
output*/
# Certificates
*.pem
# vscode generated files
.vscode*

2
.gitmodules vendored
View File

@@ -1,4 +1,4 @@
[submodule "buildroot"]
path = buildroot
url = https://github.com/home-assistant/buildroot.git
branch = 2021.02.x-haos
branch = 2022.02.x-haos

82
.os-artifacts/index.html Normal file
View File

@@ -0,0 +1,82 @@
<!DOCTYPE html>
<html>
<head>
<title>Home Assistant OS - development builds</title>
<link rel="shortcut icon" href="https://brands.home-assistant.io/homeassistant/icon.png">
<style>
body {
font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
}
.error {
color: maroon;
}
</style>
</head>
<body>
<h1>Home Assistant OS - development builds</h1>
<select id="os-builds"></select>
<div id="os-builds-list"></div>
<script>
const buildSelect = document.getElementById('os-builds');
const osBuildsList = document.getElementById('os-builds-list');
const fillVersions = async () => {
try {
const response = await fetch('/index.json');
if (!response.ok) {
const p = document.createElement('p');
p.className = "error";
p.textContent = "Could not load version index file.";
osBuildsList.appendChild(p);
return;
}
const items = await response.json();
items.reverse();
items.forEach(buildVersion => {
buildSelect.appendChild(new Option(buildVersion, buildVersion));
});
buildSelect.dispatchEvent(new Event('change'));
} catch (error) {
console.error('Error fetching data:', error);
}
}
buildSelect.addEventListener('change', async function() {
osBuildsList.innerHTML = '';
const buildVersion = this.value;
try {
const response = await fetch(`/indexes/${buildVersion}.json`);
if (!response.ok) {
const p = document.createElement('p');
p.className = "error";
p.textContent = `Could not load index file for version ${buildVersion}.`;
osBuildsList.appendChild(p);
return;
}
const images = await response.json();
const ul = document.createElement('ul');
images.forEach(image => {
const li = document.createElement('li');
const a = document.createElement('a');
a.href =`/${buildVersion}/${image}`;
a.textContent = image;
li.appendChild(a);
ul.appendChild(li);
});
osBuildsList.appendChild(ul);
} catch (error) {
console.error('Error fetching images:', error);
}
});
fillVersions();
</script>
</body>
</html>

View File

@@ -5,26 +5,25 @@
The following boards/devices are supported:
- Raspberry Pi
- Pi 4 Model B (1 GB, 2 GB, 4 GB and 8 GB model) 64-bit (recommended)
- Pi 4 Model B (1 GB, 2 GB, 4 GB and 8 GB model) 32-bit
- Pi 3 Model B and B+ 64-bit (recommended)
- Pi 3 Model B and B+ 32-bit
- Pi 2 (not recommended)
- Pi Zero-W (not recommended)
- Pi (not recommended)
- 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-N2
- Odroid-N2+
- Odroid-C2
- Odroid-C4
- Odroid-XU4
- [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-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/)
- Asus
- Tinker Board
- [Tinker Board](https://tinker-board.asus.com/product/tinker-board.html)
- Generic x86-64 (UEFI, not suited for virtualization)
- Intel NUC5CPYH
- Intel NUC6CAYH
- Intel NUC10I3FNK2
- Gigabyte GB-BPCE-3455
- [Intel NUC5CPYH](https://www.intel.com/content/www/us/en/products/sku/85254/intel-nuc-kit-nuc5cpyh/specifications.html)
- [Intel NUC6CAYH](https://www.intel.com/content/www/us/en/products/sku/95062/intel-nuc-kit-nuc6cayh/specifications.html)
- [Intel NUC10I3FNK2](https://www.intel.com/content/www/us/en/products/sku/195503/intel-nuc-10-performance-kit-nuc10i3fnk/specifications.html)
- [Gigabyte GB-BPCE-3455](https://www.gigabyte.com/Mini-PcBarebone/GB-BPCE-3455-rev-10/sp#sp)
- Computers supporting x86-64 architecture and UEFI boot should generally work
- Virtual appliance (x86_64/UEFI):
- VMDK
@@ -45,10 +44,11 @@ Notes:
|Pi3B 64-bit |`make rpi3_64` |[rpi3_64](../../buildroot-external/configs/rpi3_64_defconfig)|[raspberrypi](./raspberrypi/)|
|Pi3B 32-bit |`make rpi3` |[rpi3](../../buildroot-external/configs/rpi3_defconfig)|[raspberrypi](./raspberrypi/)|
|Pi2 |`make rpi2` |[rpi2](../../buildroot-external/configs/rpi2_defconfig)|[raspberrypi](./raspberrypi/)|
|Odroid-N2/N2+ |`make odroid_n2` |[odroid_n2](../../buildroot-external/configs/odroid_n2_defconfig)|[hardkernel](./hardkernel/)|
|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-XU4 |`make odroid_xu4` |[odroid_xu4](../../buildroot-external/configs/odroid_xu4_defconfig)|[hardkernel](./hardkernel/)|
|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-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/)|
|Generic x86-64|`make generic_x86_64`|[generic_x86_64](../../buildroot-external/configs/generic_x86_64_defconfig)|[generic-x86-64](./generic-x86-64/)|
|OVA |`make ova` |[ova](../../buildroot-external/configs/ova_defconfig)|[ova](./ova/)|

View File

@@ -4,10 +4,11 @@
| Device | Release Date | Support | Config |
|----------------|---------------|--------------|-----------|
| ODROID-XU4 | 2015 | yes | [odroid_xu4](../../../buildroot-external/configs/odroid_xu4_defconfig)|
| ODROID-C2 | 2016 | yes | [odroid_c2](../../../buildroot-external/configs/odroid_c2_defconfig) |
| ODROID-C4 | 2020 | experimental | [odroid_c4](../../../buildroot-external/configs/odroid_c4_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-N2 | 2019 | yes | [odroid_n2](../../../buildroot-external/configs/odroid_n2_defconfig) |
| ODROID-XU4 | 2015 | yes | [odroid_xu4](../../../buildroot-external/configs/odroid_xu4_defconfig)|
See separate documentation for each board.

View File

@@ -1,4 +1,4 @@
# Odroid-C2
# ODROID-C2
## eMMC

View File

@@ -1,10 +1,10 @@
# Odroid-C4
# ODROID-C4
## Experimental
Odroid-C4 support is based heavily on the Odroid-C2 and N2 configurations. Given the similarity of the SoCs, as well as the comparable level of support in the Linux kernel, the C4 should hopefully present few surprises. However, Home Assistant support should be regarded as experimental.
ODROID-C4 support is based heavily on the Odroid-C2 and N2 configurations. Given the similarity of the SoCs, as well as the comparable level of support in the Linux kernel, the C4 should hopefully present few surprises. However, Home Assistant support should be regarded as experimental.
Please also refer to the documentation pages for the [Odroid-C2](./odroid-c2.md) and [Odroid-N2](./odroid-n2.md), as some of that information may apply to the C4 as well.
Please also refer to the documentation pages for the [ODROID-C2](./odroid-c2.md) and [Odroid-N2](./odroid-n2.md), as some of that information may apply to the C4 as well.
Common C4 issues that have been specifically tested and appear to be working:
- boot from SD

View File

@@ -0,0 +1,50 @@
# ODROID-M1
Home Assistant OS 10 and newer support the ODROID-M1 board.
## SD-card
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
from [linuxfactory.or.kr][1] as follows:
1. Download `spiupdate_odroidm1_20220304.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`.
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.
Once Petitboot is updated you can flash Home Assistant OS directly onto an eMMC.
## 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. This means that no help
from the Hardkernel provided and pre-installed bootloader Petitboot is necessary.
However, the ODROID-M1 automatically boots from internal SPI. To boot
directly off the SD-card or eMMC you need to press the recovery button.
The SPI flashed U-Boot SPL tries searches for an U-Boot binary on the SD-card
(and from eMMC with Petitboot 20230328 and later). This mechanism allows you to
boot the Home Assistant OS U-Boot without pressing the recovery button.
## Console
By default, console access is available on the serial header (CON1) 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`).
[1]: http://ppa.linuxfactory.or.kr/images/petitboot/odroidm1/

View File

@@ -1,4 +1,4 @@
# Odroid-N2
# ODROID-N2
## eMMC

View File

@@ -25,8 +25,7 @@ hassos-xy.raucb
Text files that are on USB stick must have Unix (LF) end of line characters. If you create USB stick on Windows machine, be sure to use Notepad++, Visual Studio Code or any other editor, that supports different line endings. In Notepad++ LF EOL can be enabled with setting `Edit -> EOL Conversion -> Unix (LF)`.
You can put this USB stick into the device and it will be read on startup and files written to the correct places. You can also trigger this process later over the
API/UI or by calling `systemctl restart hassos-config` on the host. *The USB Stick just needs to be inserted to the device during this setup process and can be disconnected afterwards.*
You can put this USB stick into the device and it will be read on startup and files written to the correct places. You can also trigger this process later using `ha os import` from the CLI or by calling `systemctl restart hassos-config` on the OS shell. *The USB Stick just needs to be inserted to the device during this setup process and can be removed afterwards.*
## Local
@@ -54,7 +53,7 @@ Our default NTP configuration look like:
```
[Time]
NTP=time1.google.com time2.google.com time3.google.com
NTP=time.cloudflare.com
FallbackNTP=0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org 3.pool.ntp.org
```

View File

@@ -1,22 +1,24 @@
# Kernel Version
Default Kernel tree: 5.15
Default Kernel tree: 6.1
| Board | Version |
|-------|---------|
| Open Virtual Appliance | 5.15.64 |
| Raspberry Pi | 5.15.32 |
| Raspberry Pi 0-W | 5.15.32 |
| Raspberry Pi 2 | 5.15.32 |
| Raspberry Pi 3 | 5.15.32 |
| Raspberry Pi 4 | 5.15.32 |
| Home Assistant Yellow | 5.15.32 |
| Tinker Board | 5.15.64 |
| Odroid-C2 | 5.15.64 |
| Odroid-C4 | 5.15.64 |
| Odroid-N2 | 5.15.64 |
| Odroid-XU4 | 5.15.64 |
| Generic aarch64 | 5.15.64 |
| Generic x86-64 | 5.15.64 |
| Khadas VIM3 | 5.15.64 |
| 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 |

View File

@@ -188,6 +188,6 @@ If you now view the default connection `cat /etc/NetworkManager/system-connectio
Doing a `nmcli con reload` does not always work, so restart the virtual machine or the physical system.
[nm-manual]: https://developer.gnome.org/NetworkManager/stable/manpages.html
[nm-manual]: https://networkmanager.dev/docs/api/1.40/manpages.html
[configuration-usb]: configuration.md
[uuid]: https://www.uuidgenerator.net/
[uuid]: https://www.uuidgenerator.net/version4

View File

@@ -1,11 +1,8 @@
BUILDDIR:=$(shell pwd)
RELEASE_DIR = $(BUILDDIR)/release
BUILDROOT=$(BUILDDIR)/buildroot
BUILDROOT_EXTERNAL=$(BUILDDIR)/buildroot-external
DEFCONFIG_DIR = $(BUILDROOT_EXTERNAL)/configs
VERSION_DATE := $(shell date --utc +'%Y%m%d')
VERSION_DEV := "dev$(VERSION_DATE)"
TARGETS := $(notdir $(patsubst %_defconfig,%,$(wildcard $(DEFCONFIG_DIR)/*_defconfig)))
TARGETS_CONFIG := $(notdir $(patsubst %_defconfig,%-config,$(wildcard $(DEFCONFIG_DIR)/*_defconfig)))
@@ -23,9 +20,6 @@ endif
all: $(TARGETS)
$(RELEASE_DIR):
mkdir -p $(RELEASE_DIR)
savedefconfig:
@echo "config $*"
$(MAKE) -C $(BUILDROOT) O=$(O) BR2_EXTERNAL=$(BUILDROOT_EXTERNAL) "savedefconfig"
@@ -34,10 +28,9 @@ $(TARGETS_CONFIG): %-config:
@echo "config $*"
$(MAKE) -C $(BUILDROOT) O=$(O) BR2_EXTERNAL=$(BUILDROOT_EXTERNAL) "$*_defconfig"
$(TARGETS): %: $(RELEASE_DIR) %-config
$(TARGETS): %: %-config
@echo "build $@"
$(MAKE) -C $(BUILDROOT) O=$(O) BR2_EXTERNAL=$(BUILDROOT_EXTERNAL) VERSION_DEV=$(VERSION_DEV)
cp -f $(O)/images/haos_* $(RELEASE_DIR)/
$(MAKE) -C $(BUILDROOT) O=$(O) BR2_EXTERNAL=$(BUILDROOT_EXTERNAL)
# Do not clean when building for one target
ifneq ($(words $(filter $(TARGETS),$(MAKECMDGOALS))), 1)

View File

@@ -2,7 +2,7 @@
Home Assistant Operating System (formerly HassOS) is a Linux based operating system optimized to host [Home Assistant](https://www.home-assistant.io) and its [Add-ons](https://www.home-assistant.io/addons/).
Home Assistant Operating System uses Docker as Container engine. It by default deploys the Home Assistant Supervisor as a container. Home Assistant Supervisor in turn uses the Docker container engine to control Home Assistant Core and Add-Ons in separate containers. Home Assistant Operating System is **not** based on a regular Linux distribution like Ubuntu. It is built using [Buildroot](https://buildroot.org/) and it is optimized to run Home Assistant. It targets single board compute (SBC) devices like the Raspberry Pi or ODROID but also supports x86-64 systems with UEFI.
Home Assistant Operating System uses Docker as its container engine. By default it deploys the Home Assistant Supervisor as a container. Home Assistant Supervisor in turn uses the Docker container engine to control Home Assistant Core and Add-Ons in separate containers. Home Assistant Operating System is **not** based on a regular Linux distribution like Ubuntu. It is built using [Buildroot](https://buildroot.org/) and it is optimized to run Home Assistant. It targets single board compute (SBC) devices like the Raspberry Pi or ODROID but also supports x86-64 systems with UEFI.
## Features
@@ -55,4 +55,4 @@ The Home Assistant Operating System documentation can be found on the [Home Assi
The Development build GitHub Action Workflow is a manually triggered workflow
which creates Home Assistant OS development builds. The development builds are
available at [os-builds.home-assistant.io](https://os-builds.home-assistant.io/).
available at [https://os-artifacts.home-assistant.io/index.html](https://os-artifacts.home-assistant.io/index.html).

View File

@@ -8,10 +8,11 @@ source "$BR2_EXTERNAL_HASSOS_PATH/package/khadas-boot/Config.in"
source "$BR2_EXTERNAL_HASSOS_PATH/package/os-agent/Config.in"
source "$BR2_EXTERNAL_HASSOS_PATH/package/pi-bluetooth/Config.in"
source "$BR2_EXTERNAL_HASSOS_PATH/package/qemu-guest-agent/Config.in"
source "$BR2_EXTERNAL_HASSOS_PATH/package/lxd-guest-agent/Config.in"
source "$BR2_EXTERNAL_HASSOS_PATH/package/rockchip-blobs/Config.in"
source "$BR2_EXTERNAL_HASSOS_PATH/package/rpi-eeprom/Config.in"
source "$BR2_EXTERNAL_HASSOS_PATH/package/rpi-rf-mod/Config.in"
source "$BR2_EXTERNAL_HASSOS_PATH/package/rtl88x2bu/Config.in"
source "$BR2_EXTERNAL_HASSOS_PATH/package/rtl8821cu/Config.in"
source "$BR2_EXTERNAL_HASSOS_PATH/package/tempio/Config.in.host"
source "$BR2_EXTERNAL_HASSOS_PATH/package/udisks2/Config.in"
source "$BR2_EXTERNAL_HASSOS_PATH/package/xe-guest-utilities/Config.in"

View File

@@ -15,34 +15,52 @@ for SLOT in $ORDER; do
INDEX=0
OK=$A_OK
TRY=$A_TRY
A_TRY=1
fi
if [ "$SLOT" == "B" ]; then
INDEX=1
OK=$B_OK
TRY=$B_TRY
B_TRY=1
fi
if [ "$OK" -eq 1 -a "$TRY" -eq 0 ]; then
if [ "$OK" -eq 1 -a "$TRY" -lt 3 ]; then
default=$INDEX
# increment attempts and save back to slot
if [ "$TRY" -eq 1 ]; then
TRY=2
elif [ "$TRY" -eq 2 ]; then
TRY=3
else
TRY=1
fi
if [ "$SLOT" == "A" ]; then
A_TRY=$TRY
fi
if [ "$SLOT" == "B" ]; then
B_TRY=$TRY
fi
break
fi
done
# reset booted flags
# No bootable slot found, choose rescue...
if [ "$default" -eq 99 ]; then
if [ "$A_OK" -eq 1 -a "$A_TRY" -eq 1 ]; then
A_TRY=0
if [ "$A_OK" -eq 1 ]; then
default=2
fi
if [ "$B_OK" -eq 1 -a "$B_TRY" -eq 1 ]; then
B_TRY=0
if [ "$B_OK" -eq 1 ]; then
default=3
fi
default=0
fi
if [ "$MACHINE_ID" == "" ]; then
boot_condition="systemd.condition-first-boot=true"
fi
save_env A_TRY A_OK B_TRY B_OK ORDER MACHINE_ID
default_cmdline="rootwait zram.enabled=1 zram.num_devices=3 apparmor=1 security=apparmor systemd.machine_id=$MACHINE_ID cgroup_enable=memory fsck.repair=yes"
default_cmdline="rootwait zram.enabled=1 zram.num_devices=3 systemd.machine_id=$MACHINE_ID fsck.repair=yes $boot_condition"
file_env -f ($root)/cmdline.txt cmdline
# root is a full HDD/partition definition in GRUB format like hd0,gpt1
@@ -57,3 +75,11 @@ menuentry "Slot A (OK=$A_OK TRY=$A_TRY)" {
menuentry "Slot B (OK=$B_OK TRY=$B_TRY)" {
linux (${boothd},gpt4)/Image root=PARTUUID=a3ec664e-32ce-4665-95ea-7ae90ce9aa20 $default_cmdline $cmdline rauc.slot=B
}
menuentry "Slot A (rescue shell)" {
linux (${boothd},gpt2)/Image root=PARTUUID=8d3d53e3-6d49-4c38-8349-aff6859e82fd $default_cmdline $cmdline rauc.slot=A systemd.unit=recovery.target
}
menuentry "Slot B (rescue shell)" {
linux (${boothd},gpt4)/Image root=PARTUUID=a3ec664e-32ce-4665-95ea-7ae90ce9aa20 $default_cmdline $cmdline rauc.slot=B systemd.unit=recovery.target
}

View File

@@ -18,3 +18,15 @@ CONFIG_BLK_DEV_NVME=y
CONFIG_NVME_HWMON=y
CONFIG_DRM_VIRTIO_GPU=m
CONFIG_HYPERVISOR_GUEST=y
CONFIG_HYPERV=y
CONFIG_HYPERV_UTILS=m
CONFIG_HYPERV_BALLOON=m
CONFIG_HYPERV_KEYBOARD=m
CONFIG_HYPERV_STORAGE=y
CONFIG_HYPERV_NET=y
CONFIG_HYPERV_VSOCKETS=m
CONFIG_PCI_HYPERV=m
CONFIG_PCI_HYPERV_INTERFACE=m
CONFIG_FB_HYPERV=y

View File

@@ -4,6 +4,7 @@ CHASSIS=embedded
BOOTLOADER=grub
KERNEL_FILE=Image
BOOT_SYS=efi
BOOT_SIZE=32M
BOOT_SPL=false
DISK_SIZE=6
SUPERVISOR_MACHINE=qemuarm-64

View File

@@ -4,7 +4,9 @@ CHASSIS=embedded
BOOTLOADER=uboot
KERNEL_FILE=zImage
BOOT_SYS=hybrid
BOOT_SIZE=24M
BOOT_SPL=true
BOOT_SPL_SIZE=8M
BOOT_ENV_SIZE=0x8000
SUPERVISOR_MACHINE=tinker
SUPERVISOR_ARCH=armv7

View File

@@ -1,5 +1,5 @@
From ff0c5c49024da05b47d4fcc4d115761c43eef7a6 Mon Sep 17 00:00:00 2001
Message-Id: <ff0c5c49024da05b47d4fcc4d115761c43eef7a6.1652225232.git.stefan@agner.ch>
From 3553f8a938dbb498aa1846a37ea343b7f53739da Mon Sep 17 00:00:00 2001
Message-Id: <3553f8a938dbb498aa1846a37ea343b7f53739da.1676488094.git.stefan@agner.ch>
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
@@ -11,7 +11,7 @@ This reverts commit 3425fe335c29310f6628faf9a7947d07f32d8962.
1 file changed, 8 deletions(-)
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
index 4dcdcf17c977..ff6faa82192b 100644
index 487b0e03d4b4..1569b1824c89 100644
--- a/arch/arm/boot/dts/rk3288.dtsi
+++ b/arch/arm/boot/dts/rk3288.dtsi
@@ -378,8 +378,6 @@ uart0: serial@ff180000 {
@@ -51,5 +51,5 @@ index 4dcdcf17c977..ff6faa82192b 100644
pinctrl-0 = <&uart4_xfer>;
status = "disabled";
--
2.36.1
2.39.1

View File

@@ -1,7 +1,7 @@
From e73b4b762a0842cc75b2784e4c4267f6f4fc50c4 Mon Sep 17 00:00:00 2001
Message-Id: <e73b4b762a0842cc75b2784e4c4267f6f4fc50c4.1652225232.git.stefan@agner.ch>
In-Reply-To: <ff0c5c49024da05b47d4fcc4d115761c43eef7a6.1652225232.git.stefan@agner.ch>
References: <ff0c5c49024da05b47d4fcc4d115761c43eef7a6.1652225232.git.stefan@agner.ch>
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: "Miouyouyou (Myy)" <myy@miouyouyou.fr>
Date: Mon, 5 Nov 2018 22:15:14 +0100
Subject: [PATCH] ARM: DTS: rk3288-tinker: Defining the SPI interface
@@ -21,10 +21,10 @@ Signed-off-by: Stefan Agner <stefan@agner.ch>
1 file changed, 19 insertions(+)
diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi
index 9c1e38c54eae..cf278bcc91ad 100644
index 09618bb7d872..30430d2e64b9 100644
--- a/arch/arm/boot/dts/rk3288-tinker.dtsi
+++ b/arch/arm/boot/dts/rk3288-tinker.dtsi
@@ -485,6 +485,25 @@ &sdio0 {
@@ -483,6 +483,25 @@ &sdio0 {
status = "okay";
};
@@ -51,5 +51,5 @@ index 9c1e38c54eae..cf278bcc91ad 100644
rockchip,hw-tshut-mode = <1>; /* tshut mode 0:CRU 1:GPIO */
rockchip,hw-tshut-polarity = <1>; /* tshut polarity 0:LOW 1:HIGH */
--
2.36.1
2.39.1

View File

@@ -1,7 +1,7 @@
From 00de5155d12a178b83961f459ddccd7fa08ec25c Mon Sep 17 00:00:00 2001
Message-Id: <00de5155d12a178b83961f459ddccd7fa08ec25c.1652225232.git.stefan@agner.ch>
In-Reply-To: <ff0c5c49024da05b47d4fcc4d115761c43eef7a6.1652225232.git.stefan@agner.ch>
References: <ff0c5c49024da05b47d4fcc4d115761c43eef7a6.1652225232.git.stefan@agner.ch>
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: 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
@@ -14,10 +14,10 @@ Signed-off-by: Stefan Agner <stefan@agner.ch>
1 file changed, 8 insertions(+)
diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi
index cf278bcc91ad..f23c6efd39d4 100644
index 30430d2e64b9..395afc2b2283 100644
--- a/arch/arm/boot/dts/rk3288-tinker.dtsi
+++ b/arch/arm/boot/dts/rk3288-tinker.dtsi
@@ -344,10 +344,18 @@ regulator-state-mem {
@@ -342,10 +342,18 @@ regulator-state-mem {
};
};
@@ -37,5 +37,5 @@ index cf278bcc91ad..f23c6efd39d4 100644
status = "okay";
};
--
2.36.1
2.39.1

View File

@@ -1,7 +1,7 @@
From e45da42e71e4f92995d5ec11679ca00b0971dbfe Mon Sep 17 00:00:00 2001
Message-Id: <e45da42e71e4f92995d5ec11679ca00b0971dbfe.1652225232.git.stefan@agner.ch>
In-Reply-To: <ff0c5c49024da05b47d4fcc4d115761c43eef7a6.1652225232.git.stefan@agner.ch>
References: <ff0c5c49024da05b47d4fcc4d115761c43eef7a6.1652225232.git.stefan@agner.ch>
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: Myy Miouyouyou <myy@miouyouyou.fr>
Date: Thu, 19 Oct 2017 21:24:47 +0200
Subject: [PATCH] RK3288: DTSI: rk3288.dtsi: Add missing SPI2 pinctrl
@@ -17,7 +17,7 @@ Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
index ff6faa82192b..5061c5418d75 100644
index 1569b1824c89..478fd1bb85df 100644
--- a/arch/arm/boot/dts/rk3288.dtsi
+++ b/arch/arm/boot/dts/rk3288.dtsi
@@ -311,7 +311,7 @@ spi2: spi@ff130000 {
@@ -30,5 +30,5 @@ index ff6faa82192b..5061c5418d75 100644
#address-cells = <1>;
#size-cells = <0>;
--
2.36.1
2.39.1

View File

@@ -1,7 +1,7 @@
From e33d3ba4c34d0893d9d07b62ad4eea41d2e8bbc0 Mon Sep 17 00:00:00 2001
Message-Id: <e33d3ba4c34d0893d9d07b62ad4eea41d2e8bbc0.1652225232.git.stefan@agner.ch>
In-Reply-To: <ff0c5c49024da05b47d4fcc4d115761c43eef7a6.1652225232.git.stefan@agner.ch>
References: <ff0c5c49024da05b47d4fcc4d115761c43eef7a6.1652225232.git.stefan@agner.ch>
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: "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
@@ -14,10 +14,10 @@ Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
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
index f23c6efd39d4..cdff130d1292 100644
index 395afc2b2283..c7e79e594720 100644
--- a/arch/arm/boot/dts/rk3288-tinker.dtsi
+++ b/arch/arm/boot/dts/rk3288-tinker.dtsi
@@ -186,7 +186,7 @@ vdd_cpu: DCDC_REG1 {
@@ -184,7 +184,7 @@ vdd_cpu: DCDC_REG1 {
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <750000>;
@@ -27,5 +27,5 @@ index f23c6efd39d4..cdff130d1292 100644
regulator-ramp-delay = <6000>;
regulator-state-mem {
--
2.36.1
2.39.1

View File

@@ -1,7 +1,7 @@
From e073d75cd0dbfbcbbf1b46e565b326db37b75e6a Mon Sep 17 00:00:00 2001
Message-Id: <e073d75cd0dbfbcbbf1b46e565b326db37b75e6a.1652225232.git.stefan@agner.ch>
In-Reply-To: <ff0c5c49024da05b47d4fcc4d115761c43eef7a6.1652225232.git.stefan@agner.ch>
References: <ff0c5c49024da05b47d4fcc4d115761c43eef7a6.1652225232.git.stefan@agner.ch>
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: 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 +24,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 d36991acd6df..a526927e29df 100644
index 2a99f15f527f..181718374429 100644
--- a/drivers/mmc/host/dw_mmc-rockchip.c
+++ b/drivers/mmc/host/dw_mmc-rockchip.c
@@ -12,6 +12,11 @@
@@ -39,7 +39,7 @@ index d36991acd6df..a526927e29df 100644
#include "dw_mmc.h"
#include "dw_mmc-pltfm.h"
@@ -330,6 +335,66 @@ static const struct of_device_id dw_mci_rockchip_match[] = {
@@ -340,6 +345,66 @@ static const struct of_device_id dw_mci_rockchip_match[] = {
};
MODULE_DEVICE_TABLE(of, dw_mci_rockchip_match);
@@ -106,7 +106,7 @@ index d36991acd6df..a526927e29df 100644
static int dw_mci_rockchip_probe(struct platform_device *pdev)
{
const struct dw_mci_drv_data *drv_data;
@@ -357,6 +422,7 @@ static int dw_mci_rockchip_probe(struct platform_device *pdev)
@@ -367,6 +432,7 @@ static int dw_mci_rockchip_probe(struct platform_device *pdev)
}
pm_runtime_put_autosuspend(&pdev->dev);
@@ -115,5 +115,5 @@ index d36991acd6df..a526927e29df 100644
return 0;
}
--
2.36.1
2.39.1

View File

@@ -1,7 +1,7 @@
From 392472dc977300a9f2a62159c105a6dfed878643 Mon Sep 17 00:00:00 2001
Message-Id: <392472dc977300a9f2a62159c105a6dfed878643.1652225232.git.stefan@agner.ch>
In-Reply-To: <ff0c5c49024da05b47d4fcc4d115761c43eef7a6.1652225232.git.stefan@agner.ch>
References: <ff0c5c49024da05b47d4fcc4d115761c43eef7a6.1652225232.git.stefan@agner.ch>
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: Stefan Agner <stefan@agner.ch>
Date: Tue, 10 May 2022 22:57:26 +0200
Subject: [PATCH] ARM: dts: rockchip: Add Bluetooth to rk3288-tinker
@@ -15,10 +15,10 @@ Signed-off-by: Stefan Agner <stefan@agner.ch>
1 file changed, 26 insertions(+)
diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi
index cdff130d1292..e904c130dedc 100644
index c7e79e594720..5d261fae6e72 100644
--- a/arch/arm/boot/dts/rk3288-tinker.dtsi
+++ b/arch/arm/boot/dts/rk3288-tinker.dtsi
@@ -388,6 +388,20 @@ bl_en: bl-en {
@@ -386,6 +386,20 @@ bl_en: bl-en {
};
};
@@ -39,7 +39,7 @@ index cdff130d1292..e904c130dedc 100644
buttons {
pwrbtn: pwrbtn {
rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
@@ -520,6 +534,18 @@ &tsadc {
@@ -518,6 +532,18 @@ &tsadc {
&uart0 {
status = "okay";
@@ -59,5 +59,5 @@ index cdff130d1292..e904c130dedc 100644
&uart1 {
--
2.36.1
2.39.1

View File

@@ -16,8 +16,11 @@ 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 apparmor=1 security=apparmor systemd.machine_id=${MACHINE_ID} cgroup_enable=memory fsck.repair=yes"
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"

View File

@@ -145,7 +145,6 @@ CONFIG_CGROUP_WRITEBACK=y
CONFIG_CGROUP_SCHED=y
CONFIG_FAIR_GROUP_SCHED=y
CONFIG_CFS_BANDWIDTH=y
CONFIG_RT_GROUP_SCHED=y
CONFIG_CGROUP_PIDS=y
# CONFIG_CGROUP_RDMA is not set
CONFIG_CGROUP_FREEZER=y
@@ -1617,8 +1616,6 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
CONFIG_FW_LOADER=y
CONFIG_FW_LOADER_PAGED_BUF=y
CONFIG_EXTRA_FIRMWARE=""
CONFIG_FW_LOADER_USER_HELPER=y
CONFIG_FW_LOADER_USER_HELPER_FALLBACK=y
# CONFIG_FW_LOADER_COMPRESS is not set
CONFIG_FW_CACHE=y
# end of Firmware loader

File diff suppressed because it is too large Load Diff

View File

@@ -1,10 +1,12 @@
BOARD_ID=odroid-c2
BOARD_NAME="Hardkernel Odroid-C2"
BOARD_NAME="Hardkernel ODROID-C2"
CHASSIS=embedded
BOOTLOADER=uboot
KERNEL_FILE=Image
BOOT_SYS=mbr
BOOT_SIZE=24M
BOOT_SPL=true
BOOT_SPL_SIZE=8M
BOOT_ENV_SIZE=0x2000
SUPERVISOR_MACHINE=odroid-c2
SUPERVISOR_ARCH=aarch64

View File

@@ -18,8 +18,11 @@ 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 apparmor=1 security=apparmor systemd.machine_id=${MACHINE_ID} cgroup_enable=memory fsck.repair=yes"
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=48617373-06 rootfstype=squashfs ro rootwait"

View File

@@ -1,10 +1,12 @@
BOARD_ID=odroid-c4
BOARD_NAME="Hardkernel Odroid-C4"
BOARD_NAME="Hardkernel ODROID-C4"
CHASSIS=embedded
BOOTLOADER=uboot
KERNEL_FILE=Image
BOOT_SYS=mbr
BOOT_SIZE=24M
BOOT_SPL=true
BOOT_SPL_SIZE=8M
BOOT_ENV_SIZE=0x2000
SUPERVISOR_MACHINE=odroid-c4
SUPERVISOR_ARCH=aarch64

View File

@@ -18,8 +18,11 @@ 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 apparmor=1 security=apparmor systemd.machine_id=${MACHINE_ID} cgroup_enable=memory clk_ignore_unused usb-storage.quirks=0x2537:0x1066:u,0x2537:0x1068:u"
setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 systemd.machine_id=${MACHINE_ID} clk_ignore_unused usb-storage.quirks=0x2537:0x1066:u,0x2537:0x1068:u ${BOOT_CONDITION}"
# HassOS system A/B
setenv bootargs_a "root=PARTUUID=48617373-06 rootfstype=squashfs ro rootwait"

View File

@@ -0,0 +1,25 @@
#!/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}/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
}
function hassos_post_image() {
convert_disk_image_xz
}

View File

@@ -0,0 +1,11 @@
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-m1
BOARD_NAME="Hardkernel ODROID-M1"
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,455 @@
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

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

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

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

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

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

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

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

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

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

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

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

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

@@ -0,0 +1,990 @@
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
Hardkernel ODROID-M1 is a single board computer with a RK3568B2 SoC,
a slightly modified version of the RK3568 SoC.
Features tested on a ODROID-M1 8GB v1.0 2022-06-13:
- SD-card boot
- eMMC boot
- SPI Flash boot
- PCIe/NVMe/AHCI
- SATA port
- USB host
Device tree is imported from linux v6.4.
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
---
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 +++
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
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
new file mode 100644
index 0000000000..dc8ad98715
--- /dev/null
+++ b/arch/arm/dts/rk3568-odroid-m1-u-boot.dtsi
@@ -0,0 +1,46 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+#include "rk356x-u-boot.dtsi"
+
+/ {
+ aliases {
+ spi0 = &sfc;
+ };
+
+ chosen {
+ stdout-path = &uart2;
+ };
+};
+
+&fspi_dual_io_pins {
+ bootph-all;
+};
+
+&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>;
+};
+
+&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
new file mode 100644
index 0000000000..59ecf868db
--- /dev/null
+++ b/arch/arm/dts/rk3568-odroid-m1.dts
@@ -0,0 +1,744 @@
+// 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 <dt-bindings/soc/rockchip,vop2.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>;
+ };
+
+ hdmi-con {
+ compatible = "hdmi-connector";
+ type = "a";
+
+ port {
+ hdmi_con_in: endpoint {
+ remote-endpoint = <&hdmi_out_con>;
+ };
+ };
+ };
+
+ 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";
+
+ 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>;
+ };
+ };
+
+ 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_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";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <3300000>;
+ 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>;
+ };
+
+ 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";
+};
+
+&combphy2 {
+ /* used for SATA */
+ status = "okay";
+};
+
+&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>;
+};
+
+&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 {
+ status = "okay";
+};
+
+&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>;
+ 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>, <&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-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;
+ };
+ };
+ };
+ };
+};
+
+&i2s0_8ch {
+ status = "okay";
+};
+
+&i2s1_8ch {
+ rockchip,trcm-sync-tx-only;
+ status = "okay";
+};
+
+&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>;
+ };
+};
+
+&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 {
+ 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>;
+ };
+ led_work_pin: led-work-pin {
+ rockchip,pins = <0 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
+ 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>;
+ };
+ };
+
+ 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>;
+ };
+ vcc5v0_usb_otg_en_pin: vcc5v0-usb-dr-en-pin {
+ 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_1v8>;
+ vccio5-supply = <&vcc_3v3>;
+ vccio6-supply = <&vcc_3v3>;
+ vccio7-supply = <&vcc_3v3>;
+ status = "okay";
+};
+
+&saradc {
+ vref-supply = <&vcca_1v8>;
+ status = "okay";
+};
+
+&sata2 {
+ 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";
+};
+
+&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>;
+ status = "okay";
+};
+
+&uart2 {
+ status = "okay";
+};
+
+&usb_host0_ehci {
+ status = "okay";
+};
+
+&usb_host0_ohci {
+ status = "okay";
+};
+
+&usb_host0_xhci {
+ dr_mode = "host";
+ 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 {
+ phy-supply = <&vcc5v0_usb_otg>;
+ 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>;
+ 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>;
+ };
+};
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
+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
+
RADXA-CM3
M: Jagan Teki <jagan@amarulasolutions.com>
S: Maintained
diff --git a/configs/odroid-m1-rk3568_defconfig b/configs/odroid-m1-rk3568_defconfig
new file mode 100644
index 0000000000..d090196219
--- /dev/null
+++ b/configs/odroid-m1-rk3568_defconfig
@@ -0,0 +1,103 @@
+CONFIG_ARM=y
+CONFIG_SKIP_LOWLEVEL_INIT=y
+CONFIG_COUNTER_FREQUENCY=24000000
+CONFIG_ARCH_ROCKCHIP=y
+CONFIG_TEXT_BASE=0x00a00000
+CONFIG_SPL_LIBCOMMON_SUPPORT=y
+CONFIG_SPL_LIBGENERIC_SUPPORT=y
+CONFIG_NR_DRAM_BANKS=2
+CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
+CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0xc00000
+CONFIG_SF_DEFAULT_SPEED=24000000
+CONFIG_SF_DEFAULT_MODE=0x1000
+CONFIG_DEFAULT_DEVICE_TREE="rk3568-odroid-m1"
+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_SPL_STACK=0x400000
+CONFIG_DEBUG_UART_BASE=0xFE660000
+CONFIG_DEBUG_UART_CLOCK=24000000
+CONFIG_SPL_SPI_FLASH_SUPPORT=y
+CONFIG_SPL_SPI=y
+CONFIG_SYS_LOAD_ADDR=0xc00800
+CONFIG_PCI=y
+CONFIG_DEBUG_UART=y
+CONFIG_AHCI=y
+CONFIG_FIT=y
+CONFIG_FIT_VERBOSE=y
+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_DISPLAY_CPUINFO is not set
+CONFIG_DISPLAY_BOARDINFO_LATE=y
+CONFIG_SPL_MAX_SIZE=0x40000
+CONFIG_SPL_PAD_TO=0x7f8000
+CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
+CONFIG_SPL_BSS_START_ADDR=0x4000000
+CONFIG_SPL_BSS_MAX_SIZE=0x4000
+# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
+# CONFIG_SPL_SHARES_INIT_SP_ADDR is not set
+CONFIG_SPL_STACK_R=y
+CONFIG_SPL_SPI_LOAD=y
+CONFIG_SYS_SPI_U_BOOT_OFFS=0x100000
+CONFIG_SPL_ATF=y
+CONFIG_CMD_GPIO=y
+CONFIG_CMD_GPT=y
+CONFIG_CMD_I2C=y
+CONFIG_CMD_MMC=y
+CONFIG_CMD_PCI=y
+CONFIG_CMD_USB=y
+# CONFIG_CMD_SETEXPR is not set
+CONFIG_CMD_PMIC=y
+CONFIG_CMD_REGULATOR=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_REGMAP=y
+CONFIG_SPL_SYSCON=y
+CONFIG_AHCI_PCI=y
+CONFIG_DWC_AHCI=y
+CONFIG_SPL_CLK=y
+CONFIG_ROCKCHIP_GPIO=y
+CONFIG_SYS_I2C_ROCKCHIP=y
+CONFIG_MISC=y
+CONFIG_SUPPORT_EMMC_RPMB=y
+CONFIG_MMC_DW=y
+CONFIG_MMC_DW_ROCKCHIP=y
+CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_SDMA=y
+CONFIG_MMC_SDHCI_ROCKCHIP=y
+CONFIG_SPI_FLASH_SFDP_SUPPORT=y
+CONFIG_SPI_FLASH_MACRONIX=y
+CONFIG_ETH_DESIGNWARE=y
+CONFIG_GMAC_ROCKCHIP=y
+CONFIG_NVME_PCI=y
+CONFIG_PCIE_DW_ROCKCHIP=y
+CONFIG_PHY_ROCKCHIP_INNO_USB2=y
+CONFIG_PHY_ROCKCHIP_NANENG_COMBOPHY=y
+CONFIG_SPL_PINCTRL=y
+CONFIG_DM_PMIC=y
+CONFIG_PMIC_RK8XX=y
+CONFIG_REGULATOR_RK8XX=y
+CONFIG_PWM_ROCKCHIP=y
+CONFIG_SPL_RAM=y
+CONFIG_SCSI=y
+CONFIG_DM_SCSI=y
+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
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_EHCI_GENERIC=y
+CONFIG_USB_OHCI_HCD=y
+CONFIG_USB_OHCI_GENERIC=y
+CONFIG_USB_DWC3=y
+CONFIG_USB_DWC3_GENERIC=y
+CONFIG_ERRNO_STR=y
diff --git a/doc/board/rockchip/rockchip.rst b/doc/board/rockchip/rockchip.rst
index 99376fb54c..b3de15b36a 100644
--- a/doc/board/rockchip/rockchip.rst
+++ b/doc/board/rockchip/rockchip.rst
@@ -95,6 +95,7 @@ List of mainline supported Rockchip boards:
* rk3568
- Rockchip Evb-RK3568 (evb-rk3568)
+ - Hardkernel ODROID-M1 (odroid-m1-rk3568)
* rk3588
- Rockchip EVB (evb-rk3588)
--
2.41.0

View File

@@ -0,0 +1,98 @@
part start mmc ${devnum} hassos-bootstate mmc_env
mmc dev ${devnum}
setenv loadbootstate " \
echo 'loading env...'; \
mmc read ${ramdisk_addr_r} ${mmc_env} 0x40; \
env import -c ${ramdisk_addr_r} 0x8000;"
setenv storebootstate " \
echo 'storing env...'; \
env export -c -s 0x8000 ${ramdisk_addr_r} BOOT_ORDER BOOT_A_LEFT BOOT_B_LEFT MACHINE_ID; \
mmc write ${ramdisk_addr_r} ${mmc_env} 0x40;"
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 mmc ${devnum} hassos-boot boot_partnum
# Load environment from haos-config.txt
if test -e mmc ${devnum}:${boot_partnum} haos-config.txt; then
fatload mmc ${devnum}:${boot_partnum} ${ramdisk_addr_r} haos-config.txt
env import -t ${ramdisk_addr_r} ${filesize}
fi
# Load extraargs
fileenv mmc ${devnum}:${boot_partnum} ${ramdisk_addr_r} cmdline.txt cmdline
# Load device tree
setenv fdtfile rk3568-odroid-m1.dtb
echo "Loading standard device tree ${fdtfile}"
fatload mmc ${devnum}:${boot_partnum} ${fdt_addr_r} ${fdtfile}
fdt addr ${fdt_addr_r}
# load dt overlays
fdt resize 65536
for overlay_file in ${overlays}; do
if fatload mmc ${devnum}:${boot_partnum} ${ramdisk_addr_r} overlays/${overlay_file}.dtbo; then
echo "Applying kernel provided DT overlay ${overlay_file}.dtbo"
fdt apply ${ramdisk_addr_r} || setenv overlay_error "true"
fi
done
if test "${overlay_error}" = "true"; then
echo "Error applying DT overlays, restoring original DT"
fatload mmc ${devnum}:${boot_partnum} ${fdt_addr_r} ${fdtfile}
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 mmc ${devnum} hassos-kernel0 kernel_partnum
if load mmc ${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 mmc ${devnum} hassos-kernel1 kernel_partnum
if load mmc ${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,5 @@
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

View File

@@ -1,10 +1,12 @@
BOARD_ID=odroid-n2
BOARD_NAME="Hardkernel Odroid-N2"
BOARD_NAME="Hardkernel ODROID-N2"
CHASSIS=embedded
BOOTLOADER=uboot
KERNEL_FILE=Image
BOOT_SYS=mbr
BOOT_SIZE=24M
BOOT_SPL=true
BOOT_SPL_SIZE=8M
BOOT_ENV_SIZE=0x2000
SUPERVISOR_MACHINE=odroid-n2
SUPERVISOR_ARCH=aarch64

View File

@@ -18,8 +18,11 @@ 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 apparmor=1 security=apparmor systemd.machine_id=${MACHINE_ID} cgroup_enable=memory fsck.repair=yes"
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=48617373-06 rootfstype=squashfs ro rootwait"

View File

@@ -0,0 +1 @@
# CONFIG_S3C2410_WATCHDOG is not set

View File

@@ -1,10 +1,12 @@
BOARD_ID=odroid-xu4
BOARD_NAME="Hardkernel Odroid-XU4"
BOARD_NAME="Hardkernel ODROID-XU4"
CHASSIS=embedded
BOOTLOADER=uboot
KERNEL_FILE=zImage
BOOT_SYS=mbr
BOOT_SIZE=24M
BOOT_SPL=true
BOOT_SPL_SIZE=8M
BOOT_ENV_SIZE=0x4000
SUPERVISOR_MACHINE=odroid-xu
SUPERVISOR_ARCH=armv7

View File

@@ -1,5 +1,5 @@
From 1fb890d987088f5b6b4c165d8d05480e15b8882e Mon Sep 17 00:00:00 2001
Message-Id: <1fb890d987088f5b6b4c165d8d05480e15b8882e.1662147854.git.stefan@agner.ch>
From e7d59e0444170873e945a0675ed1565a65c99e17 Mon Sep 17 00:00:00 2001
Message-Id: <e7d59e0444170873e945a0675ed1565a65c99e17.1676489173.git.stefan@agner.ch>
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
@@ -90,5 +90,5 @@ index ebc67e3ddd4f..51f128076db9 100644
kfree(rdata);
--
2.37.2
2.39.1

View File

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

@@ -20,8 +20,11 @@ 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 apparmor=1 security=apparmor systemd.machine_id=${MACHINE_ID} cgroup_enable=memory fsck.repair=yes"
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=48617373-06 rootfstype=squashfs ro rootwait"

View File

@@ -1,8 +1,8 @@
From 9f8390a715bc58e7423b65a18c4499761c84b819 Mon Sep 17 00:00:00 2001
Message-Id: <9f8390a715bc58e7423b65a18c4499761c84b819.1646168061.git.stefan@agner.ch>
From 86f6a398d2c080f92d51048ededf45efbe3a96d4 Mon Sep 17 00:00:00 2001
Message-Id: <86f6a398d2c080f92d51048ededf45efbe3a96d4.1676488652.git.stefan@agner.ch>
From: Stefan Agner <stefan@agner.ch>
Date: Mon, 11 Jan 2021 11:20:48 +0100
Subject: [PATCH 1/7] arm64: dts: meson: g12b: add power button support
Subject: [PATCH] arm64: dts: meson: g12b: add power button support
Add power button support on J2 pin 11 (GPIOX_3 on the SoC side). The
GPIO is low active, e.g. when connecting with pin 9 (GND) a power
@@ -14,7 +14,7 @@ Signed-off-by: Stefan Agner <stefan@agner.ch>
1 file changed, 11 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
index d33e54b5e196..5f0f036b1265 100644
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 {
@@ -36,5 +36,5 @@ index d33e54b5e196..5f0f036b1265 100644
compatible = "gpio-leds";
--
2.35.1
2.39.1

View File

@@ -1,10 +1,10 @@
From 26917e25696e7156a85d4dfcc578cb4cf4f42dde Mon Sep 17 00:00:00 2001
Message-Id: <26917e25696e7156a85d4dfcc578cb4cf4f42dde.1646168061.git.stefan@agner.ch>
In-Reply-To: <9f8390a715bc58e7423b65a18c4499761c84b819.1646168061.git.stefan@agner.ch>
References: <9f8390a715bc58e7423b65a18c4499761c84b819.1646168061.git.stefan@agner.ch>
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: Stefan Agner <stefan@agner.ch>
Date: Mon, 11 Jan 2021 11:38:54 +0100
Subject: [PATCH 2/7] arm64: dts: meson: g12b: add GPIO fan support
Subject: [PATCH] arm64: dts: meson: g12b: add GPIO fan support
Add simple GPIO fan node to support a fan on GPIO J8. Unfortunately the
pad used to control the fan does not support real PWM, hence the RPM
@@ -16,7 +16,7 @@ Signed-off-by: Stefan Agner <stefan@agner.ch>
1 file changed, 11 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
index 5f0f036b1265..36dbd2666015 100644
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 {
@@ -38,5 +38,5 @@ index 5f0f036b1265..36dbd2666015 100644
compatible = "gpio-keys-polled";
poll-interval = <100>;
--
2.35.1
2.39.1

View File

@@ -1,11 +1,10 @@
From 5b2b8c960269eba18f0557bf49990b9c28e5e6af Mon Sep 17 00:00:00 2001
Message-Id: <5b2b8c960269eba18f0557bf49990b9c28e5e6af.1646168061.git.stefan@agner.ch>
In-Reply-To: <9f8390a715bc58e7423b65a18c4499761c84b819.1646168061.git.stefan@agner.ch>
References: <9f8390a715bc58e7423b65a18c4499761c84b819.1646168061.git.stefan@agner.ch>
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: Stefan Agner <stefan@agner.ch>
Date: Mon, 11 Jan 2021 15:53:55 +0100
Subject: [PATCH 3/7] arm64: dts: meson: g12b: odroid-n2: add fan as cooling
device
Subject: [PATCH] arm64: dts: meson: g12b: odroid-n2: add fan as cooling device
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
@@ -21,10 +20,10 @@ Signed-off-by: Stefan Agner <stefan@agner.ch>
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 36dbd2666015..5ca75696bd5c 100644
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
@@ -388,6 +388,44 @@ &clkc_audio {
@@ -390,6 +390,44 @@ &clkc_audio {
status = "okay";
};
@@ -70,5 +69,5 @@ index 36dbd2666015..5ca75696bd5c 100644
cpu-supply = <&vddcpu_b>;
operating-points-v2 = <&cpu_opp_table_0>;
--
2.35.1
2.39.1

View File

@@ -1,10 +1,10 @@
From fee88e0053de7878977913311bdb153494aa6c61 Mon Sep 17 00:00:00 2001
Message-Id: <fee88e0053de7878977913311bdb153494aa6c61.1646168061.git.stefan@agner.ch>
In-Reply-To: <9f8390a715bc58e7423b65a18c4499761c84b819.1646168061.git.stefan@agner.ch>
References: <9f8390a715bc58e7423b65a18c4499761c84b819.1646168061.git.stefan@agner.ch>
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: Hyeonki Hong <hhk7734@gmail.com>
Date: Fri, 27 Mar 2020 17:05:22 +0900
Subject: [PATCH 4/7] arm64: dts: meson: add uart_A node
Subject: [PATCH] arm64: dts: meson: add uart_A node
The UART_A is available through J3 pin 8/10 and documented to be
available as UART by default.
@@ -15,7 +15,7 @@ Signed-off-by: Stefan Agner <stefan@agner.ch>
1 file changed, 7 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
index 5ca75696bd5c..738eb0339333 100644
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
@@ -12,6 +12,7 @@
@@ -26,7 +26,7 @@ index 5ca75696bd5c..738eb0339333 100644
ethernet0 = &ethmac;
rtc0 = &rtc;
rtc1 = &vrtc;
@@ -728,6 +729,12 @@ &toddr_c {
@@ -730,6 +731,12 @@ &toddr_c {
status = "okay";
};
@@ -40,5 +40,5 @@ index 5ca75696bd5c..738eb0339333 100644
status = "okay";
pinctrl-0 = <&uart_ao_a_pins>;
--
2.35.1
2.39.1

View File

@@ -1,10 +1,10 @@
From 51ded393003a60d3932081114bff142c4c69b293 Mon Sep 17 00:00:00 2001
Message-Id: <51ded393003a60d3932081114bff142c4c69b293.1646168061.git.stefan@agner.ch>
In-Reply-To: <9f8390a715bc58e7423b65a18c4499761c84b819.1646168061.git.stefan@agner.ch>
References: <9f8390a715bc58e7423b65a18c4499761c84b819.1646168061.git.stefan@agner.ch>
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: Stefan Agner <stefan@agner.ch>
Date: Thu, 29 Apr 2021 21:32:43 +0200
Subject: [PATCH 5/7] arm64: dts: meson: add i2c2 node to ODROID N2/N2+
Subject: [PATCH] arm64: dts: meson: add i2c2 node to ODROID N2/N2+
The J2 connectors pinout documents "I2C.SDA0/SCL0" on pin 3 and 5, which
are connected to GPIOX_17/18. This GPIO allow to mux I2C to the second
@@ -16,10 +16,10 @@ 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 738eb0339333..2e9fefc20b19 100644
index 7eaaced7893b..8d183253389c 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
@@ -586,6 +586,12 @@ &ir {
@@ -588,6 +588,12 @@ &ir {
linux,rc-map-name = "rc-odroid";
};
@@ -33,5 +33,5 @@ index 738eb0339333..2e9fefc20b19 100644
status = "okay";
pinctrl-0 = <&i2c3_sda_a_pins>, <&i2c3_sck_a_pins>;
--
2.35.1
2.39.1

View File

@@ -1,17 +1,17 @@
From 0ad900b2d6e895b1f1788d51e471863743727d71 Mon Sep 17 00:00:00 2001
Message-Id: <0ad900b2d6e895b1f1788d51e471863743727d71.1646168061.git.stefan@agner.ch>
In-Reply-To: <9f8390a715bc58e7423b65a18c4499761c84b819.1646168061.git.stefan@agner.ch>
References: <9f8390a715bc58e7423b65a18c4499761c84b819.1646168061.git.stefan@agner.ch>
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: Hyeonki Hong <hhk7734@gmail.com>
Date: Tue, 1 Mar 2022 21:51:50 +0100
Subject: [PATCH 6/7] ODROID-C4: arm64/dts: add uart_A node
Subject: [PATCH] ODROID-C4: arm64/dts: add uart_A node
---
arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi | 9 ++++++++-
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 76ad052fbf0c..690e4823a9d0 100644
index ddb1b345397f..49b88c1e11cd 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 +25,7 @@ index 76ad052fbf0c..690e4823a9d0 100644
};
chosen {
@@ -436,6 +437,12 @@ &tohdmitx {
@@ -450,6 +451,12 @@ &tohdmitx {
status = "okay";
};
@@ -39,5 +39,5 @@ index 76ad052fbf0c..690e4823a9d0 100644
status = "okay";
pinctrl-0 = <&uart_ao_a_pins>;
--
2.35.1
2.39.1

View File

@@ -1,17 +1,17 @@
From 105003d49a505e0f0e033a6f3d945f745912c7b1 Mon Sep 17 00:00:00 2001
Message-Id: <105003d49a505e0f0e033a6f3d945f745912c7b1.1646168061.git.stefan@agner.ch>
In-Reply-To: <9f8390a715bc58e7423b65a18c4499761c84b819.1646168061.git.stefan@agner.ch>
References: <9f8390a715bc58e7423b65a18c4499761c84b819.1646168061.git.stefan@agner.ch>
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: Hyeonki Hong <hhk7734@gmail.com>
Date: Tue, 1 Mar 2022 21:53:32 +0100
Subject: [PATCH 7/7] ODROID-C4: arm64/dts: add i2c2, i2c3 node
Subject: [PATCH] ODROID-C4: arm64/dts: add i2c2, i2c3 node
---
.../boot/dts/amlogic/meson-sm1-odroid.dtsi | 53 +++++++++++++++++++
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 690e4823a9d0..85637c1c846b 100644
index 49b88c1e11cd..b8d88310ae3a 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 +23,7 @@ index 690e4823a9d0..85637c1c846b 100644
serial0 = &uart_AO;
serial1 = &uart_A;
};
@@ -373,6 +375,57 @@ &ir {
@@ -387,6 +389,57 @@ &ir {
pinctrl-names = "default";
};
@@ -82,5 +82,5 @@ index 690e4823a9d0..85637c1c846b 100644
pinctrl-0 = <&pwm_ao_d_e_pins>;
pinctrl-names = "default";
--
2.35.1
2.39.1

View File

@@ -0,0 +1,48 @@
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: 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
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
.../arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 14 ++++++++++++++
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
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
@@ -17,6 +17,8 @@ / {
aliases {
serial0 = &uart_AO;
+ serial1 = &uart_A;
+ serial2 = &uart_C;
ethernet0 = &ethmac;
};
@@ -399,6 +401,18 @@ &uart_AO {
pinctrl-names = "default";
};
+&uart_A {
+ status = "disabled";
+ pinctrl-0 = <&uart_a_pins>;
+ pinctrl-names = "default";
+};
+
+&uart_C {
+ status = "disabled";
+ pinctrl-0 = <&uart_c_pins>;
+ pinctrl-names = "default";
+};
+
&usb0_phy {
status = "disabled";
phy-supply = <&usb_otg_pwr>;
--
2.39.1

View File

@@ -0,0 +1,38 @@
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: 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
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 4 ++++
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
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
@@ -333,6 +333,8 @@ &hwrng {
&i2c_A {
clocks = <&clkc CLKID_I2C>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c_a_pins>;
};
&i2c_AO {
@@ -341,6 +343,8 @@ &i2c_AO {
&i2c_B {
clocks = <&clkc CLKID_I2C>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c_b_pins>;
};
&i2c_C {
--
2.39.1

View File

@@ -1,32 +0,0 @@
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
index 1cc9dc6..9f48dff 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
@@ -16,6 +16,8 @@
aliases {
serial0 = &uart_AO;
+ serial1 = &uart_A;
+ serial2 = &uart_C;
ethernet0 = &ethmac;
};
@@ -290,6 +355,18 @@
pinctrl-names = "default";
};
+&uart_A {
+ status = "disabled";
+ pinctrl-0 = <&uart_a_pins>;
+ pinctrl-names = "default";
+};
+
+&uart_C {
+ status = "disabled";
+ pinctrl-0 = <&uart_c_pins>;
+ pinctrl-names = "default";
+};
+
&usb0_phy {
status = "okay";
phy-supply = <&usb_otg_pwr>;

View File

@@ -1,22 +0,0 @@
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
index 98cbba6..48ca119 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
@@ -321,6 +322,8 @@
&i2c_A {
clocks = <&clkc CLKID_I2C>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c_a_pins>;
};
&i2c_AO {
@@ -329,6 +332,8 @@
&i2c_B {
clocks = <&clkc CLKID_I2C>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c_b_pins>;
};
&i2c_C {

View File

@@ -13,7 +13,6 @@ CONFIG_IKCONFIG_PROC=y
CONFIG_MEMCG=y
CONFIG_BLK_CGROUP=y
CONFIG_CFS_BANDWIDTH=y
CONFIG_RT_GROUP_SCHED=y
CONFIG_CGROUP_PIDS=y
CONFIG_CGROUP_FREEZER=y
CONFIG_CGROUP_HUGETLB=y
@@ -164,8 +163,6 @@ CONFIG_PCIE_DW_PLAT_HOST=y
# CONFIG_PCI_MESON is not set
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
CONFIG_FW_LOADER_USER_HELPER=y
CONFIG_FW_LOADER_USER_HELPER_FALLBACK=y
CONFIG_SIMPLE_PM_BUS=y
CONFIG_MTD=y
CONFIG_MTD_BLOCK=y
@@ -472,15 +469,19 @@ CONFIG_VIDEO_EM28XX_V4L2=m
CONFIG_VIDEO_EM28XX_ALSA=m
CONFIG_VIDEO_EM28XX_DVB=m
CONFIG_MEDIA_PCI_SUPPORT=y
CONFIG_CEC_CORE=m
CONFIG_CEC_PIN=y
CONFIG_MEDIA_CEC_RC=y
CONFIG_DRM=y
CONFIG_DRM_PANEL_SIMPLE=m
CONFIG_DRM_DW_HDMI_CEC=y
CONFIG_DRM_MESON=y
CONFIG_DRM_DW_HDMI=m
CONFIG_DRM_DW_HDMI_I2S_AUDIO=m
CONFIG_DRM_MESON=m
CONFIG_DRM_MESON_DW_HDMI=m
CONFIG_DRM_PL111=m
CONFIG_DRM_LIMA=m
CONFIG_DRM_PANFROST=m
CONFIG_FB_MODE_HELPERS=y
CONFIG_FB_EFI=y
CONFIG_FB=y
CONFIG_BACKLIGHT_CLASS_DEVICE=y
CONFIG_BACKLIGHT_PWM=m
CONFIG_SOUND=y

View File

@@ -4,7 +4,9 @@ CHASSIS=embedded
BOOTLOADER=uboot
KERNEL_FILE=Image
BOOT_SYS=mbr
BOOT_SIZE=24M
BOOT_SPL=true
BOOT_SPL_SIZE=8M
BOOT_ENV_SIZE=0x2000
SUPERVISOR_MACHINE=khadas-vim3
SUPERVISOR_ARCH=aarch64

View File

@@ -18,8 +18,11 @@ 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 apparmor=1 security=apparmor systemd.machine_id=${MACHINE_ID} cgroup_enable=memory fsck.repair=yes"
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=48617373-06 rootfstype=squashfs ro rootwait"

View File

@@ -0,0 +1,25 @@
#!/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}/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
}
function hassos_post_image() {
convert_disk_image_xz
}

View File

@@ -0,0 +1,14 @@
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_REGULATOR_RK808=y
CONFIG_REGULATOR_RK860X=y
# CONFIG_DW_WATCHDOG is not set

View File

@@ -0,0 +1,12 @@
BOARD_ID=green
BOARD_NAME="Home Assistant Green"
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=green
SUPERVISOR_ARCH=aarch64

View File

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

@@ -0,0 +1,714 @@
From 2a76efca88402072b61e4cb83d6707400da8dfae 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
---
arch/arm64/boot/dts/rockchip/Makefile | 1 +
.../boot/dts/rockchip/rk3566-ha-green.dts | 685 ++++++++++++++++++
2 files changed, 686 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
--- 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
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-ha-green.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
--- /dev/null
+++ b/arch/arm64/boot/dts/rockchip/rk3566-ha-green.dts
@@ -0,0 +1,685 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2023 Seeed 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 = "Home Assistant Green";
+ compatible = "rockchip,rk3566-ha-green", "rockchip,rk3566";
+
+ aliases {
+ ethernet0 = &gmac1;
+ mmc0 = &sdhci;
+ mmc1 = &sdmmc0;
+ };
+
+ 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>;
+ };
+
+ hdmi-con {
+ compatible = "hdmi-connector";
+ type = "a";
+
+ port {
+ hdmi_con_in: endpoint {
+ remote-endpoint = <&hdmi_out_con>;
+ };
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: led-0 {
+ gpios = <&gpio0 RK_PB6 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_act: led-1 {
+ gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>;
+ function = LED_FUNCTION_ACTIVITY;
+ color = <LED_COLOR_ID_GREEN>;
+ linux,default-trigger = "activity";
+ pinctrl-names = "default";
+ pinctrl-0 = <&led_act_pin>;
+ };
+ led_user: led-2 {
+ gpios = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>;
+ function = LED_FUNCTION_HEARTBEAT;
+ color = <LED_COLOR_ID_YELLOW>;
+ linux,default-trigger = "heartbeat";
+ pinctrl-names = "default";
+ pinctrl-0 = <&led_usr_pin>;
+ };
+ };
+
+ rk809-sound {
+ compatible = "simple-audio-card";
+ simple-audio-card,name = "Analog RK817";
+ simple-audio-card,format = "i2s";
+ 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";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <3300000>;
+ 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 {
+ cpu-supply = <&vdd_cpu>;
+};
+
+&cpu1 {
+ cpu-supply = <&vdd_cpu>;
+};
+
+&cpu2 {
+ cpu-supply = <&vdd_cpu>;
+};
+
+&cpu3 {
+ cpu-supply = <&vdd_cpu>;
+};
+
+&gmac1 {
+ assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, <&cru SCLK_GMAC1>;
+ assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>;
+ assigned-clock-rates = <0>, <125000000>;
+ clock_in_out = "output";
+
+ snps,reset-gpio = <&gpio4 RK_PC2 GPIO_ACTIVE_LOW>;
+ snps,reset-active-low;
+ /* Reset time is 20ms, 100ms for rtl8211f */
+ snps,reset-delays-us = <0 20000 100000>;
+
+ phy-handle = <&rgmii_phy1>;
+ phy-mode = "rgmii";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&gmac1m0_miim
+ &gmac1m0_tx_bus2
+ &gmac1m0_rx_bus2
+ &gmac1m0_rgmii_clk
+ &gmac1m0_rgmii_bus>;
+ status = "okay";
+
+ tx_delay = <0x47>;
+ rx_delay = <0x27>;
+};
+
+&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 {
+ status = "okay";
+};
+
+&i2c0 {
+ status = "okay";
+
+ vdd_cpu: rk8601@41 {
+ compatible = "rockchip,rk8601";
+ 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>;
+ 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_l>, <&i2s1m0_mclk>;
+
+ rockchip,system-power-controller;
+ #sound-dai-cells = <0>;
+ wakeup-source;
+
+ 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>;
+
+ 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;
+ };
+ };
+ };
+ };
+};
+
+&i2c1 {
+ clock-frequency = <400000>;
+ status = "okay";
+
+ rtc: rtc@51 {
+ compatible = "nxp,pcf8563";
+ reg = <0x51>;
+ #clock-cells = <0>;
+ };
+};
+
+&i2s0_8ch {
+ status = "okay";
+};
+
+&i2s1_8ch {
+ rockchip,trcm-sync-tx-only;
+ status = "okay";
+};
+
+&mdio1 {
+ rgmii_phy1: ethernet-phy@0 {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <0x0>;
+ };
+};
+
+&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>;
+ };
+ };
+
+ ethernet {
+ eth_phy_rst: eth_phy_rst {
+ rockchip,pins = <4 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
+ leds {
+ led_power_pin: led-power-pin {
+ rockchip,pins = <0 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ led_act_pin: led-act-pin {
+ rockchip,pins = <0 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ led_usr_pin: led-user-pin {
+ rockchip,pins = <0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
+ pmic {
+ pmic_int_l: pmic-int-l {
+ rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+ };
+
+ usb {
+ vcc5v0_usb_host_en_pin: vcc5v0-usb-host-en-pin {
+ rockchip,pins = <0 RK_PA6 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_1v8>; /* float */
+ vccio5-supply = <&vcc_1v8>;
+ vccio6-supply = <&vcc_1v8>;
+ 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-sdr104;
+ vmmc-supply = <&vcc3v3_sd>;
+ vqmmc-supply = <&vccio_sd>;
+ 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 = <4>;
+ 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>;
+ status = "okay";
+};
+
+&uart2 {
+ status = "okay";
+};
+
+&usb_host0_ehci {
+ status = "okay";
+};
+
+&usb_host0_ohci {
+ status = "okay";
+};
+
+&usb_host0_xhci {
+ dr_mode = "host";
+ status = "okay";
+};
+
+&usb_host1_ehci {
+ status = "okay";
+};
+
+&usb_host1_ohci {
+ status = "okay";
+};
+
+&usb_host1_xhci {
+ status = "okay";
+ phys = <&usb2phy0_host>;
+ phy-names = "usb2-phy";
+ snps,dis_u2_susphy_quirk;
+ extcon = <&usb2phy0>;
+ maximum-speed = "high-speed";
+};
+
+&usb2phy0 {
+ status = "okay";
+};
+
+&usb2phy0_host {
+ phy-supply = <&vcc5v0_usb_host>;
+ status = "okay";
+};
+
+&usb2phy0_otg {
+ phy-supply = <&vcc5v0_usb_host>;
+ 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>;
+ 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.25.1

View File

@@ -0,0 +1,41 @@
From e86272fa8063a047a55a9548400a95742f1c2d2a 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 +
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[] = {
{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},
+ {RK817_PMIC_PWRON_KEY, RK817_PMIC_PWRON_KEY_MSK, RK817_PWRON_LP_OFF_TIME},
};
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
--- a/include/linux/mfd/rk808.h
+++ b/include/linux/mfd/rk808.h
@@ -644,6 +644,11 @@ enum rk809_reg_id {
#define RK817_ON_SOURCE_REG 0xf5
#define RK817_OFF_SOURCE_REG 0xf6
+#define RK817_PMIC_PWRON_KEY 0xf7
+#define RK817_PMIC_PWRON_KEY_MSK (0x3 << 4)
+/* 00: 6s, 01: 8s, 10: 10s, 11: 12s */
+#define RK817_PWRON_LP_OFF_TIME (0x3 << 4)
+
/* INTERRUPT REGISTER */
#define RK817_INT_STS_REG0 0xf8
#define RK817_INT_STS_MSK_REG0 0xf9
--
2.25.1

View File

@@ -0,0 +1,55 @@
From 5f1f9863bf1031e608537945fdc97e099cb9e42c 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
---
.../boot/dts/rockchip/rk3566-ha-green.dts | 31 ++-----------------
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
--- 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 {
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
- spi-max-frequency = <100000000>;
- spi-rx-bus-width = <4>;
+ spi-max-frequency = <25000000>;
+ spi-rx-bus-width = <1>;
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>;
- };
- };
};
};
--
2.25.1

View File

@@ -0,0 +1,41 @@
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: Stefan Agner <stefan@agner.ch>
Date: Wed, 19 Jul 2023 10:08:06 +0200
Subject: [PATCH] Input: rk805-pwrkey: reverse polarity of pwrkey
The power key is low active. Reverse logic to avoid involuntary long
press being reported to user space.
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
drivers/input/misc/rk805-pwrkey.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/input/misc/rk805-pwrkey.c b/drivers/input/misc/rk805-pwrkey.c
index 76873aa005b4..139419033c84 100644
--- a/drivers/input/misc/rk805-pwrkey.c
+++ b/drivers/input/misc/rk805-pwrkey.c
@@ -19,7 +19,7 @@ static irqreturn_t pwrkey_fall_irq(int irq, void *_pwr)
{
struct input_dev *pwr = _pwr;
- input_report_key(pwr, KEY_POWER, 1);
+ input_report_key(pwr, KEY_POWER, 0);
input_sync(pwr);
return IRQ_HANDLED;
@@ -29,7 +29,7 @@ static irqreturn_t pwrkey_rise_irq(int irq, void *_pwr)
{
struct input_dev *pwr = _pwr;
- input_report_key(pwr, KEY_POWER, 0);
+ input_report_key(pwr, KEY_POWER, 1);
input_sync(pwr);
return IRQ_HANDLED;
--
2.41.0

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