Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

riscv: dts: allwinner: d1: Enable I2S on MangoPi MQ-Pro #5

Open
wants to merge 1 commit into
base: d1/all
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions arch/riscv/boot/dts/allwinner/sun20i-d1-mangopi-mq-pro.dts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@
};
};

pcm5102a: pcm5102a-codec {
compatible = "ti,pcm5102a";
status = "okay";
#sound-dai-cells = <0>;
};

reg_avdd2v8: avdd2v8 {
compatible = "regulator-fixed";
regulator-name = "avdd2v8";
Expand All @@ -69,6 +75,22 @@
vin-supply = <&reg_vcc>;
};

soc {
sound {
compatible = "simple-audio-card";
simple-audio-card,name = "i2s";
simple-audio-card,format = "i2s";
simple-audio-card,mclk-fs = <256>;
status = "okay";
simple-audio-card,cpu {
sound-dai = <&i2s2>;
};
simple-audio-card,codec {
sound-dai = <&pcm5102a>;
};
};
};

wifi_pwrseq: wifi-pwrseq {
compatible = "mmc-pwrseq-simple";
reset-gpios = <&pio 6 17 GPIO_ACTIVE_LOW>; /* PG17 */
Expand Down Expand Up @@ -101,6 +123,12 @@
status = "okay";
};

&i2s2 {
pinctrl-0 = <&i2s2_pb567_pins>, <&i2s2_pb3_din_pin>, <&i2s2_pb4_dout_pin>;
pinctrl-names = "default";
status = "okay";
};

&mmc0 {
bus-width = <4>;
cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */
Expand Down
18 changes: 18 additions & 0 deletions arch/riscv/boot/dts/allwinner/sun20i-d1.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,24 @@
function = "i2c2";
};

/omit-if-no-ref/
i2s2_pb567_pins: i2s2-pb567-pins {
pins = "PB5", "PB6", "PB7";
function = "i2s2";
};

/omit-if-no-ref/
i2s2_pb3_din_pin: i2s2-pb3-din-pin {
pins = "PB3";
function = "i2s2_din";
};

/omit-if-no-ref/
i2s2_pb4_dout_pin: i2s2-pb4-dout-pin {
pins = "PB4";
function = "i2s2_dout";
};

/omit-if-no-ref/
lcd_rgb666_pins: lcd-rgb666-pins {
pins = "PD0", "PD1", "PD2", "PD3", "PD4", "PD5",
Expand Down