Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rockchip64: rk3308 tidy up and rockpi-s fixes #7519

Merged
merged 4 commits into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

130 changes: 130 additions & 0 deletions patch/kernel/archive/rockchip64-6.12/board-rockpis-dts-fixes.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
From 3bdc6856ef82b6619c527034206b49a69f3d1b91 Mon Sep 17 00:00:00 2001
From: Paolo Sabatino <[email protected]>
Date: Tue, 26 Nov 2024 12:13:24 +0100
Subject: [PATCH] rk3308: fixes for rock pi s dts

---
.../boot/dts/rockchip/rk3308-rock-pi-s.dts | 75 +++++++++++++++++++
1 file changed, 75 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 62d18ca769a1..8bcc57e9440c 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,54 @@ 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>;
+ };
+
+ };
+
+ };
+
+ pcm5102_sound: pcm5102-sound {
+ compatible = "simple-audio-card";
+ simple-audio-card,format = "i2s";
+ simple-audio-card,mclk-fs = <256>;
+ simple-audio-card,name = "pcm5102a";
+
+ simple-audio-card,dai-link@1 {
+ format = "i2s";
+ cpu {
+ sound-dai = <&i2s_8ch_0>;
+ };
+
+ codec {
+ sound-dai = <&pcm5102a>;
+ };
+ };
+ };
+
+ pcm5102a: pcm5102a {
+ #sound-dai-cells = <0>;
+ compatible = "ti,pcm5102a";
+ pcm510x,format = "i2s";
+ };
+
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>;
};
@@ -139,6 +192,7 @@ &emmc {
non-removable;
pinctrl-names = "default";
pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd>;
+ mmc-hs200-1_8v;
brentr marked this conversation as resolved.
Show resolved Hide resolved
vmmc-supply = <&vcc_io>;
status = "okay";
};
@@ -242,6 +296,19 @@ &io_domains {
status = "okay";
};

+&i2s_8ch_0 {
+ #sound-dai-cells = <0>;
+ assigned-clocks = <&cru SCLK_I2S0_8CH_RX>;
+ assigned-clock-parents = <&cru SCLK_I2S0_8CH_TX_MUX>;
+ rockchip,clk-trcm = <1>;
+ status = "okay";
+};
+
+&i2s_8ch_2 {
+ #sound-dai-cells = <0>;
+ status = "okay";
+};
+
&pinctrl {
pinctrl-names = "default";
pinctrl-0 = <&rtc_32k>;
@@ -333,10 +400,18 @@ &sdmmc {
cap-mmc-highspeed;
cap-sd-highspeed;
disable-wp;
+ pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_det &sdmmc_bus4>;
+ card-detect-delay = <800>;
brentr marked this conversation as resolved.
Show resolved Hide resolved
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";

--
2.43.0

Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
From aae322ad410b6ad891c1b6605811756124c3b1f9 Mon Sep 17 00:00:00 2001
From: Paolo Sabatino <[email protected]>
Date: Mon, 25 Nov 2024 17:23:22 +0100
Subject: [PATCH] rk3308: add cryptov2 dts node

---
arch/arm64/boot/dts/rockchip/rk3308.dtsi | 15 +++++++++++++++
1 file changed, 15 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3308.dtsi b/arch/arm64/boot/dts/rockchip/rk3308.dtsi
index 2ae4bb7d5e62..7c13709c522c 100644
--- a/arch/arm64/boot/dts/rockchip/rk3308.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3308.dtsi
@@ -164,6 +164,21 @@ xin24m: xin24m {
clock-output-names = "xin24m";
};

+ rng: rng@ff2f0000 {
+ compatible = "rockchip,cryptov2-rng";
+ reg = <0x0 0xff2f0000 0x0 0x4000>;
+ clocks = <&cru SCLK_CRYPTO>, <&cru SCLK_CRYPTO_APK>,
+ <&cru ACLK_CRYPTO>, <&cru HCLK_CRYPTO>;
+ clock-names = "clk_crypto", "clk_crypto_apk",
+ "aclk_crypto", "hclk_crypto";
+ assigned-clocks = <&cru SCLK_CRYPTO>, <&cru SCLK_CRYPTO_APK>,
+ <&cru ACLK_CRYPTO>, <&cru HCLK_CRYPTO>;
+ assigned-clock-rates = <150000000>, <150000000>,
+ <200000000>, <100000000>;
+ resets = <&cru SRST_CRYPTO>;
+ reset-names = "reset";
+ };
+
grf: grf@ff000000 {
compatible = "rockchip,rk3308-grf", "syscon", "simple-mfd";
reg = <0x0 0xff000000 0x0 0x08000>;
--
2.43.0

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/sound/soc/codecs/rk3308_codec.c b/sound/soc/codecs/rk3308_codec.c
index 8b51e87a1711..f3c8716215a8 100644
--- a/sound/soc/codecs/rk3308_codec.c
+++ b/sound/soc/codecs/rk3308_codec.c
@@ -854,7 +854,7 @@ static int rk3308_codec_get_version(struct rk3308_codec_priv *rk3308)
break;
case 0x3308:
rk3308->codec_ver = ACODEC_VERSION_B;
- return dev_err_probe(rk3308->dev, -EINVAL, "Chip version B not supported\n");
+ break;
case 0x3308c:
rk3308->codec_ver = ACODEC_VERSION_C;
break;
Loading
Loading