mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-28 09:39:00 +00:00
99545b4bb1
This target adds support for the Allwinner D1 RISC-V based SoCs. - RISC-V single-core T-Head C906 (RV64GCV) - Tensilica HiFi4 DSP - DDR2/DDR3 support - 10/100/1000M ethernet - usual peripherals like USB2, SPI, I2C, PWM, etc. Four boards are supported: - Dongshan Nezha STU - 512Mb RAM - ethernet - LicheePi RV Dock - 512Mb RAM - wireless-only (RTL8723DS) - MangoPi MQ-Pro - 512Mb RAM - there are pads available for an SPI flash - wireless-only (RTL8723DS) - Nezha D1 - 512Mb/1Gb/2Gb RAM - 256Mb NAND flash - ethernet, wireless Installation: Standard SD-card installation via dd-ing the generated image to an SD-card of at least 256Mb. Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
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>;
|