Skip to content

Commit

Permalink
board-nanopi-m4v2-dts-add-sound-card(:1)
Browse files Browse the repository at this point in the history
Original-Subject: [ARCHEOLOGY] Initial addition of NanoPi M4V2
> X-Git-Archeology: - Revision c4eecbcef0d4dc499baf0155449e71dc774bc7c4: armbian/build@c4eecbc
> X-Git-Archeology:   Date: Thu, 28 Nov 2019 22:29:54 +0000
> X-Git-Archeology:   From: Piotr Szczepanik <piter75@gmail.com>
> X-Git-Archeology:   Subject: Initial addition of NanoPi M4V2
> X-Git-Archeology: 
> X-Git-Archeology: - Revision 40a3d4ecb9a75c17183e2129491b7bc03060a315: armbian/build@40a3d4e
> X-Git-Archeology:   Date: Sun, 17 May 2020 18:42:24 +0200
> X-Git-Archeology:   From: Piotr Szczepanik <piter75@gmail.com>
> X-Git-Archeology:   Subject: Fixed rt5651 codec probing after its driver was changed to module (#1969)
> X-Git-Archeology: 
> X-Git-Archeology: - Revision 0cdffb29b07305209efb12cf3b5ac6032d3a1153: armbian/build@0cdffb2
> X-Git-Archeology:   Date: Wed, 24 Mar 2021 19:01:53 +0100
> X-Git-Archeology:   From: Igor Pecovnik <igorpecovnik@users.noreply.github.com>
> X-Git-Archeology:   Subject: Renaming DEV branch to EDGE (#2704)
> X-Git-Archeology: 
> X-Git-Archeology: - Revision dd51f9f2afcbc83a3e10b32eb6a5061d91d1558e: armbian/build@dd51f9f
> X-Git-Archeology:   Date: Tue, 09 Nov 2021 18:06:34 +0100
> X-Git-Archeology:   From: Igor Pecovnik <igorpecovnik@users.noreply.github.com>
> X-Git-Archeology:   Subject: Bump imx6, xu4, rockchip64 and jetson-nano to 5.15 (#3238)
> X-Git-Archeology: 
> X-Git-Archeology: - Revision 401fb1fde426c93121c4639b34a450d8ff551c85: armbian/build@401fb1f
> X-Git-Archeology:   Date: Sat, 20 Nov 2021 19:49:22 +0100
> X-Git-Archeology:   From: simple <991605149@qq.com>
> X-Git-Archeology:   Subject: Fixed rt5651 codec build module (#3270)
> X-Git-Archeology: 
> X-Git-Archeology: - Revision 92f1a22d76b987afa7ba555d5b509adc51d689e7: armbian/build@92f1a22
> X-Git-Archeology:   Date: Fri, 16 Dec 2022 13:38:13 +0100
> X-Git-Archeology:   From: Igor Pecovnik <igorpecovnik@users.noreply.github.com>
> X-Git-Archeology:   Subject: Re-add rockchip64 6.0 patches (#4575)
> X-Git-Archeology: 
X-Armbian: Patch-File: board-nanopi-m4v2-dts-add-sound-card
X-Armbian: Patch-File-Counter: 1
X-Armbian: Patch-Rel-Directory: patch/kernel/archive/rockchip64-6.1
X-Armbian: Patch-Type: kernel
X-Armbian: Patch-Root-Type: core
X-Armbian: Patch-Sub-Type: common
X-Armbian: Original-Subject: [ARCHEOLOGY] Initial addition of NanoPi M4V2
  • Loading branch information
piter75 authored and Armbian AutoPatcher committed Nov 28, 2019
1 parent 65b748e commit eb5c27b
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
51 changes: 51 additions & 0 deletions arch/arm64/boot/dts/rockchip/rk3399-nanopi4.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,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>;
Expand Down Expand Up @@ -216,6 +237,10 @@
status = "okay";
};

&hdmi_sound {
status = "okay";
};

&i2c0 {
clock-frequency = <400000>;
i2c-scl-rising-time-ns = <160>;
Expand Down Expand Up @@ -464,6 +489,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 {
Expand Down Expand Up @@ -495,6 +530,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>;
Expand Down Expand Up @@ -760,3 +805,9 @@
&vopl_mmu {
status = "okay";
};

&spdif {
i2c-scl-rising-time-ns = <450>;
i2c-scl-falling-time-ns = <15>;
status = "okay";
};
9 changes: 9 additions & 0 deletions sound/soc/rockchip/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,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 && HAVE_CLK
Expand Down

0 comments on commit eb5c27b

Please sign in to comment.