mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-26 08:51:13 +00:00
145 lines
2.9 KiB
Diff
145 lines
2.9 KiB
Diff
|
From 500a3fc1ce1b216ef4f4df73e4e048170764189e Mon Sep 17 00:00:00 2001
|
||
|
From: Samuel Holland <samuel@sholland.org>
|
||
|
Date: Wed, 17 Aug 2022 02:20:49 -0500
|
||
|
Subject: [PATCH 042/117] riscv: dts: allwinner: Add DMIC sound cards
|
||
|
|
||
|
Signed-off-by: Samuel Holland <samuel@sholland.org>
|
||
|
---
|
||
|
.../sun20i-d1-lichee-rv-86-panel.dtsi | 43 ++++++++++++++++++
|
||
|
.../allwinner/sun20i-d1-lichee-rv-dock.dts | 45 +++++++++++++++++++
|
||
|
2 files changed, 88 insertions(+)
|
||
|
|
||
|
--- a/arch/riscv/boot/dts/allwinner/sun20i-d1-lichee-rv-86-panel.dtsi
|
||
|
+++ b/arch/riscv/boot/dts/allwinner/sun20i-d1-lichee-rv-86-panel.dtsi
|
||
|
@@ -9,6 +9,33 @@
|
||
|
ethernet1 = &xr829;
|
||
|
};
|
||
|
|
||
|
+ dmic_codec: dmic-codec {
|
||
|
+ compatible = "dmic-codec";
|
||
|
+ num-channels = <2>;
|
||
|
+ #sound-dai-cells = <0>;
|
||
|
+ };
|
||
|
+
|
||
|
+ dmic-sound {
|
||
|
+ compatible = "simple-audio-card";
|
||
|
+ simple-audio-card,name = "DMIC";
|
||
|
+ #address-cells = <1>;
|
||
|
+ #size-cells = <0>;
|
||
|
+
|
||
|
+ simple-audio-card,dai-link@0 {
|
||
|
+ format = "pdm";
|
||
|
+ frame-master = <&link0_cpu>;
|
||
|
+ bitclock-master = <&link0_cpu>;
|
||
|
+
|
||
|
+ link0_cpu: cpu {
|
||
|
+ sound-dai = <&dmic>;
|
||
|
+ };
|
||
|
+
|
||
|
+ link0_codec: codec {
|
||
|
+ sound-dai = <&dmic_codec>;
|
||
|
+ };
|
||
|
+ };
|
||
|
+ };
|
||
|
+
|
||
|
/* PC1 is repurposed as BT_WAKE_AP */
|
||
|
/delete-node/ leds;
|
||
|
|
||
|
@@ -24,6 +51,12 @@
|
||
|
};
|
||
|
};
|
||
|
|
||
|
+&dmic {
|
||
|
+ pinctrl-0 = <&dmic_pb11_d0_pin>, <&dmic_pe17_clk_pin>;
|
||
|
+ pinctrl-names = "default";
|
||
|
+ status = "okay";
|
||
|
+};
|
||
|
+
|
||
|
&ehci1 {
|
||
|
status = "okay";
|
||
|
};
|
||
|
@@ -69,6 +102,16 @@
|
||
|
pins = "PG11";
|
||
|
function = "clk";
|
||
|
};
|
||
|
+
|
||
|
+ dmic_pb11_d0_pin: dmic-pb11-d0-pin {
|
||
|
+ pins = "PB11";
|
||
|
+ function = "dmic";
|
||
|
+ };
|
||
|
+
|
||
|
+ dmic_pe17_clk_pin: dmic-pe17-clk-pin {
|
||
|
+ pins = "PE17";
|
||
|
+ function = "dmic";
|
||
|
+ };
|
||
|
};
|
||
|
|
||
|
&uart1 {
|
||
|
--- a/arch/riscv/boot/dts/allwinner/sun20i-d1-lichee-rv-dock.dts
|
||
|
+++ b/arch/riscv/boot/dts/allwinner/sun20i-d1-lichee-rv-dock.dts
|
||
|
@@ -15,12 +15,45 @@
|
||
|
ethernet1 = &rtl8723ds;
|
||
|
};
|
||
|
|
||
|
+ dmic_codec: dmic-codec {
|
||
|
+ compatible = "dmic-codec";
|
||
|
+ num-channels = <2>;
|
||
|
+ #sound-dai-cells = <0>;
|
||
|
+ };
|
||
|
+
|
||
|
+ dmic-sound {
|
||
|
+ compatible = "simple-audio-card";
|
||
|
+ simple-audio-card,name = "DMIC";
|
||
|
+ #address-cells = <1>;
|
||
|
+ #size-cells = <0>;
|
||
|
+
|
||
|
+ simple-audio-card,dai-link@0 {
|
||
|
+ format = "pdm";
|
||
|
+ frame-master = <&link0_cpu>;
|
||
|
+ bitclock-master = <&link0_cpu>;
|
||
|
+
|
||
|
+ link0_cpu: cpu {
|
||
|
+ sound-dai = <&dmic>;
|
||
|
+ };
|
||
|
+
|
||
|
+ link0_codec: codec {
|
||
|
+ sound-dai = <&dmic_codec>;
|
||
|
+ };
|
||
|
+ };
|
||
|
+ };
|
||
|
+
|
||
|
wifi_pwrseq: wifi-pwrseq {
|
||
|
compatible = "mmc-pwrseq-simple";
|
||
|
reset-gpios = <&pio 6 12 GPIO_ACTIVE_LOW>; /* PG12 */
|
||
|
};
|
||
|
};
|
||
|
|
||
|
+&dmic {
|
||
|
+ pinctrl-0 = <&dmic_pb11_d0_pin>, <&dmic_pe17_clk_pin>;
|
||
|
+ pinctrl-names = "default";
|
||
|
+ status = "okay";
|
||
|
+};
|
||
|
+
|
||
|
&ehci1 {
|
||
|
status = "okay";
|
||
|
};
|
||
|
@@ -55,6 +88,18 @@
|
||
|
status = "okay";
|
||
|
};
|
||
|
|
||
|
+&pio {
|
||
|
+ dmic_pb11_d0_pin: dmic-pb11-d0-pin {
|
||
|
+ pins = "PB11";
|
||
|
+ function = "dmic";
|
||
|
+ };
|
||
|
+
|
||
|
+ dmic_pe17_clk_pin: dmic-pe17-clk-pin {
|
||
|
+ pins = "PE17";
|
||
|
+ function = "dmic";
|
||
|
+ };
|
||
|
+};
|
||
|
+
|
||
|
&uart1 {
|
||
|
uart-has-rtscts;
|
||
|
pinctrl-0 = <&uart1_pg6_pins>, <&uart1_pg8_rts_cts_pins>;
|