Youyeetoo YY3588: Enable ES8388 audio support + RK3588 I2S MCLK gate fix #9534
Youyeetoo YY3588: Enable ES8388 audio support + RK3588 I2S MCLK gate fix #9534igorpecovnik merged 2 commits intoarmbian:mainfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds ALSA state and device-tree/clock support for an ES8323-based audio path (speaker amp, I2S0_8ch, I2C7) on the YouYeetoo YY3588 board, updates board config variables (kernel targets, removes SPI boot flags, adds asound state), and introduces an RK3588 GRF clock gate to route I2S0 8‑ch MCLK to an external IO pin. Changes
Sequence DiagramsequenceDiagram
participant Boot as Bootloader
participant CLK as Clock Manager
participant SYSGRF as SYS_GRF (syscon)
participant I2S as I2S0_8ch Controller
participant I2C as I2C7
participant CODEC as ES8323 Codec
participant AMP as Speaker Amp
participant OUT as Audio Output
Boot->>CLK: early_init clocks
CLK->>SYSGRF: register SYS_GRF (aux_grf_table)
CLK->>SYSGRF: enable I2S0_8CH_MCLKOUT_TO_IO gate
Note over CLK,SYSGRF: MCLK path gated to IO
CLK->>I2S: configure I2S0_8ch (mclk, format, pinctrl)
I2C->>CODEC: configure codec via I2C7
I2S->>CODEC: stream I2S audio
CODEC->>AMP: drive speaker amp (SHDN via GPIO)
CODEC->>OUT: route to Headphones / Speaker (hp_det GPIO)
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@config/boards/youyeetoo-yy3588.csc`:
- Around line 8-9: The board config is missing ASOUND_STATE so the new mixer
blob won't be installed; update the board config (where KERNEL_TARGET and
KERNEL_TEST_TARGET are defined) to add ASOUND_STATE set to the package name
added in the PR (asound.state.youyeetoo-yy3588) so the rootfs installer picks up
and installs that asound state blob.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 56b43a0f-ce28-473d-9742-07286ced4178
📒 Files selected for processing (6)
config/boards/youyeetoo-yy3588.cscpackages/blobs/asound.state/asound.state.youyeetoo-yy3588patch/kernel/archive/rockchip64-6.18/dt/rk3588-youyeetoo-yy3588.dtspatch/kernel/archive/rockchip64-6.18/general-rk3588-i2s-mclk-output-gate.patchpatch/kernel/archive/rockchip64-7.0/dt/rk3588-youyeetoo-yy3588.dtspatch/kernel/archive/rockchip64-7.0/general-rk3588-i2s-mclk-output-gate.patch
63eef0c to
990d50c
Compare
990d50c to
4463c87
Compare
On RK3588, the I2S0 MCLK output to the IO pin is gated by SYS_GRF_SOC_CON6 (offset 0x318, bit 0). Unlike RK3588S where this gate defaults to open, RK3588 defaults to closed, preventing MCLK from reaching external audio codecs. Add a GATE_GRF clock entry (I2S0_8CH_MCLKOUT_TO_IO) following the pattern established for RK3576 SAI MCLKs using clk-gate-grf.c.
Add ES8388 codec support via ES8323 driver on I2C7 with: - Headphones on LOUT2/ROUT2 with jack detection - Speaker via CS8120 amplifier on LOUT1/ROUT1 - Onboard microphone and microphone jack inputs - MCLK routed through I2S0_8CH_MCLKOUT_TO_IO gate clock - Default mixer state via asound.state - Board config: add current kernel target, update description
4463c87 to
4e2a991
Compare
|
✅ This PR has been reviewed and approved — all set for merge! |
Summary
Enable full audio support for the Youyeetoo YY3588 board (RK3588) with ES8388/ES8323 codec, and fix a missing I2S MCLK output gate clock that affects all RK3588 boards using I2S audio.
Root cause: On RK3588, the I2S0 MCLK output to the IO pin is gated by
SYS_GRF_SOC_CON6(offset 0x318, bit 0). Unlike RK3588S where this gate defaults to open after reset, RK3588 defaults to closed — the codec never receives MCLK. The mainline kernel lacks the clock gate entry because all existing boards were tested on RK3588S.Fix: Add a
GATE_GRFclock entry (I2S0_8CH_MCLKOUT_TO_IO) toclk-rk3588.cfollowing the same pattern used for RK3576 SAI MCLKs by Nicolas Frattaroli (Collabora). I've already reached out to him via email to discuss whether this affects all RK3588 boards or only specific variants. Reference: https://patchew.org/linux/20250502-rk3576-sai-v3-0-376cef19dd7c@collabora.com/Changes
general-rk3588-i2s-mclk-output-gate.patch): Register SYS_GRF as auxiliary GRF and addGATE_GRFfor I2S0 MCLK output — applied to both 6.18 and 7.0How Has This Been Tested?
Checklist
Summary by CodeRabbit