Update EasePi A2/R2 board configs and device trees for improved hardware support#9907
Conversation
📝 WalkthroughWalkthroughComprehensive rebranding and refactoring of EasePi A2/R2 board support under LinkEase vendor identity. Board configs transition from inline peripheral setup to modular BSP asset provisioning; device-tree files across multiple kernel versions receive compatible-string prepends, structural reorganizations (pinctrl, power domains, HDMI), and hardware enablement; U-Boot defconfig and DTS enhanced for RK3588 boot and peripheral support. ChangesEasePi Board Consolidation under LinkEase
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…nch, update OLED daemon to v1.2.0, add Ethernet udev rule for EasePi-A2
- Add missing power domain (vcc5v0_sys), SD/MMC (sdmmc, sdhci), PCIe, USB (u2phy0-3, usbdrd3_0/1, usbdp_phy1), SATA (sata1, sata2), combphy, and SARADC nodes to U-Boot DTS - Fix ADC keys to use SARADC channel 0 with press-threshold=878uV and KEY_RESTART, preventing unintended USB download mode entry - Correct model string to 'EasePi R2' and compatible strings - Add CONFIG_ROCKCHIP_USB_BOOT, CONFIG_GPIO_HOG, CONFIG_I2C_MUX, CONFIG_PHY_ROCKCHIP_NANENG_COMBOPHY, CONFIG_PHY_ROCKCHIP_USBDP, CONFIG_CMD_SETEXPR, CONFIG_AHCI, CONFIG_SCSI, CONFIG_SATA to defconfig - Remove CONFIG_ROCKCHIP_BOOTDEV to let U-Boot auto-detect boot device - Adjust CONFIG_FASTBOOT_BUF_SIZE and CONFIG_MTD_BLK_U_BOOT_OFFS Resolves the immediate boot failure where the device entered USB download mode instead of proceeding to kernel boot.
|
Is this ready? Current code breaks compilation of bleedingedge branch, this doesn't. |
|
@igorpecovnik merge this first, please armbian/linux-rockchip#491 |
Added USB and Type-C configuration for vbus5v0_usb and related components.
u-boot-radxa-rk35xx: Clean up EasePi R2 device tree by removing unuse…
- Remove file logging, only output to stdio - Update SHA-256 hash for v1.3.0 binary - Update GitHub Release URL
There was a problem hiding this comment.
Actionable comments posted: 4
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
config/boards/easepi-a2.conf (1)
1-1:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winExpand the hardware summary comment.
The first-line description is still too sparse for the interactive compiler menu; it omits the A2-specific peripherals this file now provisions, such as Bluetooth, IR, and OLED.
Suggested update
-# Rockchip RK3568 quad core 4GB SoC GBe eMMC USB3 +# Rockchip RK3568 quad core 4GB GBe eMMC USB3 WiFi BT IR OLEDBased on learnings: Enforce that the first line comment in Armbian board configuration files contains a dedicated hardware feature description with SoC model, core count, RAM options, and key features because this text is used during interactive compilation.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@config/boards/easepi-a2.conf` at line 1, Update the first-line hardware summary comment (the very first comment line in the board config for easepi-a2) to include a concise, dedicated feature description: SoC model (Rockchip RK3568), core count (quad-core), RAM option (4GB), and key peripherals now provisioned (Gigabit Ethernet, eMMC, USB3, Bluetooth, IR, OLED) so the interactive compiler menu shows the full A2-specific hardware summary; replace the current sparse comment with a single-line description containing those items.config/boards/easepi-r2.conf (1)
1-1:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winExpand the hardware summary comment.
The first-line description still underspecifies the R2 for the interactive compiler menu; it misses peripherals this config now wires up, including Bluetooth and IR.
Suggested update
-# Rockchip RK3588 octa core 8-32GB SoC 4x2.5GBe eMMC USB3 NVMe SATA +# Rockchip RK3588 octa core 8-32GB 4x2.5GBe eMMC USB3 NVMe SATA WiFi BT IRBased on learnings: Enforce that the first line comment in Armbian board configuration files contains a dedicated hardware feature description with SoC model, core count, RAM options, and key features because this text is used during interactive compilation.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@config/boards/easepi-r2.conf` at line 1, Update the first-line header comment in config/boards/easepi-r2.conf (the existing line starting with "# Rockchip RK3588 octa core 8-32GB SoC 4x2.5GBe eMMC USB3 NVMe SATA") to a single, dedicated hardware feature summary that includes SoC model (RK3588), core count (octa-core), RAM options (8–32GB), and the key peripherals now wired up (e.g., 4x2.5GBe, eMMC, USB3, NVMe, SATA, Bluetooth, IR), so the interactive compiler menu gets a complete hardware description; keep it concise and on one line.
🧹 Nitpick comments (2)
config/boards/easepi-r2.conf (1)
141-144: ⚡ Quick winCreate
/etc/apt/keyringsbefore dearmoring the Jellyfin key.Like the A2 copy of this helper, this writes into a directory it never creates. If
/etc/apt/keyringsis absent in the target rootfs, the repository setup fails here.Suggested fix
+ install -d "${SDCARD}/etc/apt/keyrings" curl -fsSL "$keyring_url" -o "${SDCARD}"/tmp/jellyfin.gpg.key || return 1 gpg --yes --dearmor -o "${SDCARD}"/etc/apt/keyrings/jellyfin.gpg "${SDCARD}"/tmp/jellyfin.gpg.key || return 1🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@config/boards/easepi-r2.conf` around lines 141 - 144, The script writes the dearmored key into "${SDCARD}/etc/apt/keyrings/jellyfin.gpg" but never ensures the "${SDCARD}/etc/apt/keyrings" directory exists; before running `gpg --dearmor` (the line invoking gpg with -o "${SDCARD}"/etc/apt/keyrings/jellyfin.gpg), create the directory (mkdir -p "${SDCARD}/etc/apt/keyrings") and handle errors similarly to the surrounding commands so the dearmor step cannot fail due to a missing directory.config/boards/easepi-a2.conf (1)
195-198: ⚡ Quick winCreate
/etc/apt/keyringsbefore dearmoring the Jellyfin key.This hook writes into a directory it never creates. When the rootfs does not already provide
/etc/apt/keyrings,gpg --dearmor -o ...fails and the repo setup is skipped.Suggested fix
+ install -d "${SDCARD}/etc/apt/keyrings" curl -fsSL "$keyring_url" -o "${SDCARD}"/tmp/jellyfin.gpg.key || return 1 gpg --yes --dearmor -o "${SDCARD}"/etc/apt/keyrings/jellyfin.gpg "${SDCARD}"/tmp/jellyfin.gpg.key || return 1🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@config/boards/easepi-a2.conf` around lines 195 - 198, Before running the gpg --dearmor step, ensure the target keyrings directory exists: add a mkdir -p using the same "${SDCARD}" root variable to create the apt keyrings directory (where the jellyfin.gpg key will be written) before invoking gpg --dearmor on "${SDCARD}"/tmp/jellyfin.gpg.key and before writing the sources list; this guarantees gpg can write the dearmored file and prevents the repo setup from being skipped.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@config/boards/easepi-r2.conf`:
- Around line 50-54: The R2 board is preloading the A2 GPIO IR modules
(gpio_ir_recv, ir_nec_decoder) which is wrong for the R2 LIRC/I2C
implementation; replace those entries in the modules-load.d file with the R2
LIRC/I2C kernel modules (e.g., lirc_i2c and lirc_dev) and remove gpio_ir_recv
and ir_nec_decoder so the boot loads the LIRC/I2C stack used by ir.service and
the R2 device class.
In `@packages/bsp/easepi/eth-order.sh`:
- Around line 1-5: The script currently allows failures in device_to_iface()
lookups and the critical rename_iface "$iface" "$toiface" to go unnoticed; add
robust failure handling by enabling safer shell options (e.g., set -o pipefail
and set -u or set -e) at the top and explicitly check return values from
device_to_iface and the ip rename command, exiting non-zero on any failure.
Concretely, ensure device_to_iface returns a non-empty/zero status before
proceeding, and after calling rename_iface (the ip link set ... name operation)
test its exit status and call exit 1 with a clear error log if it fails so the
boot service cannot report success when a lookup or rename failed.
In `@packages/bsp/easepi/ir.sh`:
- Around line 59-69: The quick_setup function currently masks failures: first
check for the ir-keytable binary (e.g. using command -v or test -x) and
log_error+exit 1 if missing; when iterating devices, run /usr/bin/ir-keytable -c
-w "$KEYMAP_FILE" and /usr/bin/ir-keytable -p nec and capture their exit codes,
logging errors with log_error including which command failed and exiting
non-zero on failure (do not ignore stderr); if no device is found after the
loop, change the log_warn "No IR device found" to log_error and exit 1 so
--quick returns failure when setup did not occur; keep log_info "Found IR
device: $dev" but only proceed to keymap/program steps if both commands succeed.
In `@patch/u-boot/legacy/u-boot-radxa-rk35xx/dt/rk3588-easepi-r2.dts`:
- Around line 16-30: The adc-keys node references an ADC provider but &saradc is
left disabled in rk3588.dtsi so the Mask Rom button (button-maskrom / adc-keys)
will never probe; add an override for &saradc that sets status = "okay" and
supplies the board-specific vref-supply (match the regulator phandle/name used
on this board) so the io-channels consumer can be probed; ensure the override
uses the same &saradc node name and aligns the vref-supply property with the
board regulator used elsewhere in this DTS.
---
Outside diff comments:
In `@config/boards/easepi-a2.conf`:
- Line 1: Update the first-line hardware summary comment (the very first comment
line in the board config for easepi-a2) to include a concise, dedicated feature
description: SoC model (Rockchip RK3568), core count (quad-core), RAM option
(4GB), and key peripherals now provisioned (Gigabit Ethernet, eMMC, USB3,
Bluetooth, IR, OLED) so the interactive compiler menu shows the full A2-specific
hardware summary; replace the current sparse comment with a single-line
description containing those items.
In `@config/boards/easepi-r2.conf`:
- Line 1: Update the first-line header comment in config/boards/easepi-r2.conf
(the existing line starting with "# Rockchip RK3588 octa core 8-32GB SoC
4x2.5GBe eMMC USB3 NVMe SATA") to a single, dedicated hardware feature summary
that includes SoC model (RK3588), core count (octa-core), RAM options (8–32GB),
and the key peripherals now wired up (e.g., 4x2.5GBe, eMMC, USB3, NVMe, SATA,
Bluetooth, IR), so the interactive compiler menu gets a complete hardware
description; keep it concise and on one line.
---
Nitpick comments:
In `@config/boards/easepi-a2.conf`:
- Around line 195-198: Before running the gpg --dearmor step, ensure the target
keyrings directory exists: add a mkdir -p using the same "${SDCARD}" root
variable to create the apt keyrings directory (where the jellyfin.gpg key will
be written) before invoking gpg --dearmor on "${SDCARD}"/tmp/jellyfin.gpg.key
and before writing the sources list; this guarantees gpg can write the dearmored
file and prevents the repo setup from being skipped.
In `@config/boards/easepi-r2.conf`:
- Around line 141-144: The script writes the dearmored key into
"${SDCARD}/etc/apt/keyrings/jellyfin.gpg" but never ensures the
"${SDCARD}/etc/apt/keyrings" directory exists; before running `gpg --dearmor`
(the line invoking gpg with -o "${SDCARD}"/etc/apt/keyrings/jellyfin.gpg),
create the directory (mkdir -p "${SDCARD}/etc/apt/keyrings") and handle errors
similarly to the surrounding commands so the dearmor step cannot fail due to a
missing directory.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 53aa7472-1353-4fbc-8ac6-ace3615fc082
📒 Files selected for processing (21)
config/boards/easepi-a2.confconfig/boards/easepi-r2.confpackages/bsp/easepi/bt-hciattach.servicepackages/bsp/easepi/bt-hciattach.shpackages/bsp/easepi/easepi-a2/71-net.rulespackages/bsp/easepi/easepi-a2/oled.servicepackages/bsp/easepi/easepi-r2/71-net.rulespackages/bsp/easepi/easepi-r2/eth_orderpackages/bsp/easepi/eth-order.servicepackages/bsp/easepi/eth-order.shpackages/bsp/easepi/ir.servicepackages/bsp/easepi/ir.shpackages/bsp/easepi/ir_remotepatch/kernel/archive/rockchip64-6.18/dt/rk3568-easepi-a2.dtspatch/kernel/archive/rockchip64-6.18/dt/rk3588-easepi-r2.dtspatch/kernel/archive/rockchip64-7.0/dt/rk3568-easepi-a2.dtspatch/kernel/archive/rockchip64-7.0/dt/rk3588-easepi-r2.dtspatch/kernel/archive/rockchip64-7.1/dt/rk3568-easepi-a2.dtspatch/kernel/archive/rockchip64-7.1/dt/rk3588-easepi-r2.dtspatch/u-boot/legacy/u-boot-radxa-rk35xx/defconfig/easepi-r2-rk3588_defconfigpatch/u-boot/legacy/u-boot-radxa-rk35xx/dt/rk3588-easepi-r2.dts
✅ Files skipped from review due to trivial changes (7)
- packages/bsp/easepi/ir.service
- packages/bsp/easepi/bt-hciattach.service
- packages/bsp/easepi/easepi-a2/71-net.rules
- packages/bsp/easepi/easepi-r2/71-net.rules
- packages/bsp/easepi/ir_remote
- packages/bsp/easepi/easepi-r2/eth_order
- packages/bsp/easepi/bt-hciattach.sh
🚧 Files skipped from review as they are similar to previous changes (3)
- packages/bsp/easepi/easepi-a2/oled.service
- patch/kernel/archive/rockchip64-7.0/dt/rk3588-easepi-r2.dts
- patch/u-boot/legacy/u-boot-radxa-rk35xx/defconfig/easepi-r2-rk3588_defconfig
|
Check Rabbit's comments. |
|
Do you want to cleanup your commit series (force push)? Otherwise I recommend squash. |
|
Summary
This PR initializes and matures EasePi-A2 and EasePi-R2 support across board
configs, kernel DTS, boot configuration, peripherals, and BSP packaging.
It includes:
packages/bsp/easepi/layout
conflicts
Changes
1. Initialize EasePi-A2 and EasePi-R2 board support
.cscto.confBOARD_MAINTAINER="ifroncy01"2. Refine boot and package configuration
bootdelay=23. Improve peripheral support
lirc_devandlirc_i2chciattachsupport for both boards4. Refactor BSP packaging and board files
packages/bsp/easepi/config/boards/*.conf5. Add robust network rename solution for EasePi-R2
easepi-net-rename.serviceandeasepi-net-rename.sheth_order, sysfs, and/etc/eth_orderfallback
Affected files
Testing
Notes
This PR is focused on stabilizing EasePi board support, improving board
packaging, and replacing embedded config blocks with a maintainable BSP
structure.
Summary by CodeRabbit
New Features
Bug Fixes & Improvements
Chores