Hi all,
First of all, thanks for the tremendous effort in building the dietpi images!
I’m trying to get my head around a difficult issue…but the learning curve is a bit steep for me (as a linux noob), so many questions…few answers up to now
I want to connect an external DAC (PCM5102) to my Orange-Pi Lite via I2S (The USB DAC works, but I’m not satisfied with the quality). Since the newer kernels no longer support the “fex” concept, I have to use to device-tree overlays…there’s no ready made device-tree overlay available for the H3.
So, can I just copy an existing DT-overlay from another board to /boot/overlay_user and modify the pin specifications?
I2S Example I found for the sun7i:
/dts-v1/;
/plugin/;
/ {
compatible = "allwinner,sun7i-a20";
fragment@0 {
target = <&pio>;
__overlay__ {
i2s0_pins: i2s0 {
pins = "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12";
function = "i2s0";
};
};
};
fragment@1 {
target = <&i2s0>;
__overlay__ {
pinctrl-names = "default";
pinctrl-0 = <&i2s0_pins>;
status = "okay";
};
};
};
H3 OrangePi Lite pin-out would be:
- PA18, PA19, PA20, PA21 (LRCK, BCLK, DO, DI)
Would it just be a matter of changing the file, running “armbian-add-overlay” and magically it works? It’s probably not this simple…
What about defining the DAC (pcm5102)? Isn’t that needed at all in the overlay file?
Up to now I wasn’t able to find/get the “armbian-add-overlay” tool, any hints?
I found another overlay example on the another forum, but this one doesn’t contain pin-definitions at all…how could this ever work? This one does however contain the definition for the DAC (I’m puzzled).
/dts-v1/;
/plugin/;
/ {
compatible = "allwinner,sun8i-h3";
fragment@0 {
target-path = "/";
__overlay__ {
pcm5102a: pcm5102a {
#sound-dai-cells = <0>;
compatible = "ti,pcm5102a";
pcm510x,format = "i2s";
};
};
};
fragment@1 {
target = <&i2s0>;
__overlay__ {
status = "okay";
pinctrl-0 = <&i2s0_pins>;
sound-dai = <&pcm5102a>;
pinctrl-names = "default";
};
};
fragment@2 {
target-path = "/";
__overlay__ {
sound_i2s {
compatible = "simple-audio-card";
simple-audio-card,name = "I2S-master";
simple-audio-card,mclk-fs = <256>;
simple-audio-card,format = "i2s";
status = "okay";
simple-audio-card,cpu {
sound-dai = <&i2s0>;
};
simple-audio-card,codec {
sound-dai = <&pcm5102a>;
};
};
};
};
};
My gut feeling says that I need to define the bus (I2S) including pins to be used, and the DAC to be used over that bus.
Thanks for any help / hints to get me up the learning curve…
Best regards,
Eeg.