Petr Palacky Posted Wednesday at 12:55 PM Posted Wednesday at 12:55 PM Hello friends, Has anyone here successfully activated the I2S pins for connecting a DAC? According to the official documentation, the PCM functionality should be available on physical pins 12 (GPIO4_A6), 35 (GPIO3_C2), 38 (GPIO3_C0), and 40 (GPIO3_B7) of the GPIO header. I've tried many options - in the DTS overlay I've enabled various I2S variants starting from "i2s0_8ch" up to "i2s9_8ch", including different "pinctrl" m[0-1] variants like "i2s1m0" or "i2s1m1", and alternatively "i2s2m0" or "i2s2m1", but I've never managed to get ALT3 mode on the mentioned pins (I assume I2S function = ALT3 mode). In certain combinations, I can at least achieve some half-working state where the system detects the sound card and it can be controlled (e.g., in alsamixer), but I've never managed to get any actual sound output. Has anyone managed to get I2S-DAC working on Orange Pi 5 MAX? I'm attaching the overlay I've been working with. Remember that I've tried all available i2s target combinations: /dts-v1/; /plugin/; / { compatible = "xunlong,orangepi-5-max", "rockchip,rk3588"; // Enable I2S fragment@0 { target = <&i2s1_8ch>; __overlay__ { status = "okay"; #address-cells = <1>; #size-cells = <0>; pinctrl-names = "default"; pinctrl-0 = <&i2s1m0_mclk &i2s1m0_lrck &i2s1m0_sclk &i2s1m0_sdo0 &i2s1m0_sdi0>; }; }; // Enable I2C fragment@1 { target = <&i2c2>; __overlay__ { status = "okay"; #address-cells = <1>; #size-cells = <0>; wm8960: wm8960@1a { compatible = "wlf,wm8960"; reg = <0x1a>; #sound-dai-cells = <0>; clocks = <&clk_fixed>; clock-names = "mclk"; wlf,shared-lrclk; }; }; }; // Define soundcard fragment@2 { target-path = "/"; __overlay__ { sound: sound { compatible = "simple-audio-card"; simple-audio-card,name = "WM8960 Audio"; simple-audio-card,format = "i2s"; simple-audio-card,bitclock-master = <&dailink0_cpu>; simple-audio-card,frame-master = <&dailink0_cpu>; simple-audio-card,widgets = "Speaker", "Speaker", "Headphone", "Headphone", "Microphone", "Mic"; simple-audio-card,routing = "Speaker", "SPK_LP", "Speaker", "SPK_LN", "Headphone", "HPOUTL", "Headphone", "HPOUTR", "IN1L", "Mic", "Mic", "Mic Bias"; simple-audio-card,cpu { sound-dai = <&i2s1_8ch>; dai-tdm-slot-num = <2>; dai-tdm-slot-width = <32>; }; dailink0_cpu: simple-audio-card,codec { sound-dai = <&wm8960>; }; }; }; }; // Define MCLK fragment@3 { target-path = "/"; __overlay__ { clk_fixed: clk_fixed { compatible = "fixed-clock"; #clock-cells = <0>; clock-frequency = <12288000>; // Typická MCLK pro WM8960 clock-output-names = "mclk"; }; }; }; }; 0 Quote
Petr Palacky Posted 6 hours ago Author Posted 6 hours ago Dear friends, in the end, I’ll answer myself... I have thoroughly studied the entire documentation from both Orange Pi and the RK3588 datasheet, and I am almost certain — unless I made a mistake — that there is no PCM function on the pins listed in the documentation for the Orange Pi 5 MAX. I have created a map of all the pins and their functions in various modes, and I hope it will be useful to someone. 0 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.