board: orangepi-5b: fix BT host-wake IRQ direction - #10372
Conversation
GPIO0_C5 boots as an output, so gpiochip_lock_as_irq() returns -EIO and the bcm_host_wake IRQ never registers. pcfg_pull_down sets bias only; PIN_CONFIG_INPUT_ENABLE forces the GPIO mux and calls direction_input(). Tested on Orange Pi 5B: the IRQ registers and delivers, WiFi and Bluetooth otherwise unchanged. Fixes armbian#10370.
📝 WalkthroughWalkthroughThe device trees add ChangesBluetooth host-wakeup configuration
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
Hey @defcom5-rockchip! 👋Thanks for submitting your first pull request to the Armbian project — we're excited to have you contributing! 🧡 If you'd like to stay informed about project updates or collaborate more closely with the team, Also, don’t forget to ⭐ star the repo if you haven’t already — and welcome aboard! 🚀 |
|
changes must go into 6.18 and 7.2 patchsets as well if applicable, otherwise on transition they will be lost |
The same bt_wake_host_irq pin config is present in rockchip64-6.18 and rockchip64-7.2, so the fix would otherwise be lost on transition to either branch. All three dts files are byte-identical, so this is the same two hunks applied unchanged. rockchip64-6.12 has no bt_wake_host_irq node and is not affected. Tested on hardware with 7.1 only; 6.18 and 7.2 carry the identical pin config and pinctrl-rockchip has implemented PIN_CONFIG_INPUT_ENABLE for many releases, but those branches are not separately boot-tested here.
|
Done — added to
Hardware-tested on 7.1 only — flagged in the commit message. |
|
✅ This PR has been reviewed and approved — all set for merge! |
Description
Fixes #10370.
GPIO0_C5 boots as an output, so
gpiochip_lock_as_irq()returns-EIOand theBT host-wake IRQ never registers - two error lines every boot, and wake-on-BT
does not work.
pcfg_pull_downsets bias only, not direction;PIN_CONFIG_INPUT_ENABLEforces the GPIO mux and callsdirection_input().rockchip-pinconf.dtsihas no pcfg node carryinginput-enable(onlypcfg_output_high/pcfg_output_low), so one is declared locally.Follow-up to #10289, which was untested on the 5B.
How Has This Been Tested?
Before:
gpioinfoshows line 21 asoutput, unclaimed; no host_wake entry in/proc/interrupts.After: line 21 reads
input, and the IRQ registers and delivers:WiFi and Bluetooth are otherwise unchanged. Verified on a mainline 7.1.3 kernel
using this DT wiring rather than via an Armbian build.
Checklist:
Summary by CodeRabbit