107 lines
2.8 KiB
Diff
107 lines
2.8 KiB
Diff
diff -u a/arch/arm64/boot/dts/rockchip/rk3399-nanopi4.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-nanopi4.dtsi
|
|
--- a/arch/arm64/boot/dts/rockchip/rk3399-nanopi4.dtsi 2019-10-17 23:47:33.000000000 +0300
|
|
+++ b/arch/arm64/boot/dts/rockchip/rk3399-nanopi4.dtsi 2019-10-27 22:34:55.988303874 +0300
|
|
@@ -105,6 +105,27 @@
|
|
};
|
|
};
|
|
|
|
+ rt5651-sound {
|
|
+ compatible = "simple-audio-card";
|
|
+ simple-audio-card,name = "realtek,rt5651-codec";
|
|
+ simple-audio-card,format = "i2s";
|
|
+ simple-audio-card,mclk-fs = <256>;
|
|
+ simple-audio-card,widgets =
|
|
+ "Microphone", "Mic Jack",
|
|
+ "Headphone", "Headphone Jack";
|
|
+ simple-audio-card,routing =
|
|
+ "Mic Jack", "micbias1",
|
|
+ "IN1P", "Mic Jack",
|
|
+ "Headphone Jack", "HPOL",
|
|
+ "Headphone Jack", "HPOR";
|
|
+ simple-audio-card,cpu {
|
|
+ sound-dai = <&i2s1>;
|
|
+ };
|
|
+ simple-audio-card,codec {
|
|
+ sound-dai = <&rt5651>;
|
|
+ };
|
|
+ };
|
|
+
|
|
sdio_pwrseq: sdio-pwrseq {
|
|
compatible = "mmc-pwrseq-simple";
|
|
clocks = <&rk808 1>;
|
|
@@ -184,6 +205,10 @@
|
|
status = "okay";
|
|
};
|
|
|
|
+&hdmi_sound {
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
&i2c0 {
|
|
clock-frequency = <400000>;
|
|
i2c-scl-rising-time-ns = <160>;
|
|
@@ -432,6 +457,16 @@
|
|
i2c-scl-rising-time-ns = <150>;
|
|
i2c-scl-falling-time-ns = <30>;
|
|
status = "okay";
|
|
+
|
|
+ rt5651: rt5651@1a {
|
|
+ compatible = "realtek,rt5651";
|
|
+ reg = <0x1a>;
|
|
+ clocks = <&cru SCLK_I2S_8CH_OUT>;
|
|
+ clock-names = "mclk";
|
|
+ hp-det-gpio = <&gpio4 RK_PC4 GPIO_ACTIVE_LOW>;
|
|
+ // spk-con-gpio = <&gpio0 RK_PB3 GPIO_ACTIVE_HIGH>;
|
|
+ #sound-dai-cells = <0>;
|
|
+ };
|
|
};
|
|
|
|
&i2c2 {
|
|
@@ -459,6 +494,16 @@
|
|
status = "okay";
|
|
};
|
|
|
|
+&i2s1 {
|
|
+ rockchip,playback-channels = <8>;
|
|
+ rockchip,capture-channels = <8>;
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&i2s2 {
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
&io_domains {
|
|
bt656-supply = <&vcc_1v8>;
|
|
audio-supply = <&vcca1v8_codec>;
|
|
@@ -724,3 +769,9 @@
|
|
&vopl_mmu {
|
|
status = "okay";
|
|
};
|
|
+
|
|
+&spdif {
|
|
+ i2c-scl-rising-time-ns = <450>;
|
|
+ i2c-scl-falling-time-ns = <15>;
|
|
+ status = "okay";
|
|
+};
|
|
diff --git a/sound/soc/rockchip/Kconfig b/sound/soc/rockchip/Kconfig
|
|
index b43657e6e..fb75c425e 100644
|
|
--- a/sound/soc/rockchip/Kconfig
|
|
+++ b/sound/soc/rockchip/Kconfig
|
|
@@ -53,6 +53,15 @@ config SND_SOC_ROCKCHIP_RT5645
|
|
Say Y or M here if you want to add support for SoC audio on Rockchip
|
|
boards using the RT5645/RT5650 codec, such as Veyron.
|
|
|
|
+config SND_SOC_ROCKCHIP_RT5651
|
|
+ tristate "ASoC support for Rockchip boards using a RT5651 codec"
|
|
+ depends on SND_SOC_ROCKCHIP && I2C && GPIOLIB && HAVE_CLK
|
|
+ select SND_SOC_ROCKCHIP_I2S
|
|
+ select SND_SOC_RT5651
|
|
+ help
|
|
+ Say Y or M here if you want to add support for SoC audio on Rockchip
|
|
+ boards using the RT5651 codec, such as FriendlyARM's Nano{Pi,PC} family.
|
|
+
|
|
config SND_SOC_RK3288_HDMI_ANALOG
|
|
tristate "ASoC support multiple codecs for Rockchip RK3288 boards"
|
|
depends on SND_SOC_ROCKCHIP && I2C && GPIOLIB && CLKDEV_LOOKUP
|