armbian-build/patch/kernel/archive/rockchip64-6.12/board-rockpis-dts-fixes.patch
brentr 224b35ab28
Restore RockPI-S audio again (#8360)
* set clocks to the old default rate if the codec never calls set_sysclk

After mainline kernel commit 21cfbeae7d7c54a6cdea4b00096150f438f4fbde
rockchip i2s requires that soc codecs call set_sysclk to explicity select a rate.
This patch simply reverts to the old behavior if the codec does call set_sysclk.
(rather that failing in that case with a bogus rate of 0hz)

Also adds rk3308 vendor ASoC support to 6.16 kernel

* Require use of device tree overlay to enable pcm5102a CODEC
2025-07-06 10:50:50 -07:00

90 lines
1.8 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Brent Roman <brent@mbari.org>
Date: Sat, 05 Jul 2025 11:48:31 -0800
Subject: rk3308: fixes for rock pi s dts (sans pcm5102)
---
arch/arm64/boot/dts/rockchip/rk3308-rock-pi-s.dts | 73 ++++++++++
1 file changed, 73 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3308-rock-pi-s.dts b/arch/arm64/boot/dts/rockchip/rk3308-rock-pi-s.dts
index 111111111111..222222222222 100644
--- a/arch/arm64/boot/dts/rockchip/rk3308-rock-pi-s.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3308-rock-pi-s.dts
@@ -48,6 +48,30 @@ blue-led {
};
};
+ analog_sound: analog-sound {
+ compatible = "simple-audio-card";
+ simple-audio-card,format = "i2s";
+ simple-audio-card,name = "analog";
+ simple-audio-card,mclk-fs = <256>;
+ simple-audio-card,codec-hp-det;
+ simple-audio-card,widgets =
+ "Headphone", "Headphones";
+
+ simple-audio-card,dai-link@1 {
+ format = "i2s";
+
+ cpu {
+ sound-dai = <&i2s_8ch_2>;
+ };
+
+ codec {
+ sound-dai = <&codec>;
+ };
+
+ };
+
+ };
+
sdio_pwrseq: sdio-pwrseq {
compatible = "mmc-pwrseq-simple";
pinctrl-0 = <&wifi_enable_h>;
@@ -128,6 +176,11 @@ vdd_log: vdd-log {
};
};
+&codec {
+ status = "okay";
+ #sound-dai-cells = <0>;
+};
+
&cpu0 {
cpu-supply = <&vdd_core>;
};
@@ -242,6 +295,11 @@ &io_domains {
status = "okay";
};
+&i2s_8ch_2 {
+ #sound-dai-cells = <0>;
+ status = "okay";
+};
+
&pinctrl {
pinctrl-names = "default";
pinctrl-0 = <&rtc_32k>;
@@ -333,10 +399,17 @@ &sdmmc {
cap-mmc-highspeed;
cap-sd-highspeed;
disable-wp;
+ card-detect-delay = <200>;
vmmc-supply = <&vcc_io>;
status = "okay";
};
+&tsadc {
+ rockchip,hw-tshut-mode = <0>; /* 0:CRU */
+ rockchip,hw-tshut-polarity = <1>; /* 1:HIGH */
+ status = "okay";
+};
+
&u2phy {
status = "okay";
--
Armbian