2020-11-26 10:37:20

by Chen-Yu Tsai

[permalink] [raw]
Subject: [PATCH 0/3] arm64: dts: rockchip: rk3328-roc-cc: Misc improvements

From: Chen-Yu Tsai <[email protected]>

Hi,

Here are some improvements for the ROC-RK3328-CC.

Patch 1 sets dr_mode to "host" for OTG. Since the board has a type A
host port wired to the OTG controller, setting this is appropriate.

Patch 2 enables HDMI audio.

Patch 3 enables analog audio.

I opted to use one simple-card for each audio interface since a) the
definitions are already in the .dtsi file and b) having one card per
interface with proper names makes them easier to identify.

The changes are quite trivial. Hope they can be merged for the next
release.


Regards
ChenYu

Chen-Yu Tsai (3):
arm64: dts: rockchip: rk3328-roc-cc: Set dr_mode to "host" for OTG
arm64: dts: rockchip: rk3328-roc-cc: Enable HDMI audio
arm64: dts: rockchip: rk3328-roc-cc: Enable analog audio

.../arm64/boot/dts/rockchip/rk3328-roc-cc.dts | 21 +++++++++++++++++++
1 file changed, 21 insertions(+)

--
2.29.2


2020-11-26 23:37:53

by Chen-Yu Tsai

[permalink] [raw]
Subject: [PATCH 3/3] arm64: dts: rockchip: rk3328-roc-cc: Enable analog audio

From: Chen-Yu Tsai <[email protected]>

Now that driver support for the RK3328's audio codec, and the plumbing
is defined at the SoC level, we can enable analog audio at the board
level.

Enable analog audio by enabling the codec and the I2S interface
connected and the simple-audio-card that binds them together.

Signed-off-by: Chen-Yu Tsai <[email protected]>
---
arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts | 12 ++++++++++++
1 file changed, 12 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts b/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts
index 697fce709031..19959bfba451 100644
--- a/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts
@@ -104,6 +104,14 @@ user_led: led-1 {
};
};

+&analog_sound {
+ status = "okay";
+};
+
+&codec {
+ status = "okay";
+};
+
&cpu0 {
cpu-supply = <&vdd_arm>;
};
@@ -278,6 +286,10 @@ &i2s0 {
status = "okay";
};

+&i2s1 {
+ status = "okay";
+};
+
&io_domains {
status = "okay";

--
2.29.2

2020-11-26 23:39:32

by Chen-Yu Tsai

[permalink] [raw]
Subject: [PATCH 2/3] arm64: dts: rockchip: rk3328-roc-cc: Enable HDMI audio

From: Chen-Yu Tsai <[email protected]>

The RK3328-ROC-CC already has HDMI display output enabled. Now that
audio for the HDMI controller is supported, it can be enabled as well.

Enable the simple-audio-card, and the I2S interface the audio is fed
from.

Signed-off-by: Chen-Yu Tsai <[email protected]>
---
arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts b/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts
index b76282e704de..697fce709031 100644
--- a/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts
@@ -161,6 +161,10 @@ &hdmiphy {
status = "okay";
};

+&hdmi_sound {
+ status = "okay";
+};
+
&i2c1 {
status = "okay";

@@ -270,6 +274,10 @@ regulator-state-mem {
};
};

+&i2s0 {
+ status = "okay";
+};
+
&io_domains {
status = "okay";

--
2.29.2

2020-11-27 02:33:03

by Chen-Yu Tsai

[permalink] [raw]
Subject: [PATCH 1/3] arm64: dts: rockchip: rk3328-roc-cc: Set dr_mode to "host" for OTG

From: Chen-Yu Tsai <[email protected]>

The board has a standard USB A female port connected to the USB OTG
controller's data pins. Set dr_mode in the OTG controller node to
indicate this usage, instead of having the implementation guess.

Fixes: 2171f4fdac06 ("arm64: dts: rockchip: add roc-rk3328-cc board")
Signed-off-by: Chen-Yu Tsai <[email protected]>
---
arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts b/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts
index b70ffb1c6a63..b76282e704de 100644
--- a/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts
@@ -334,6 +334,7 @@ &uart2 {
};

&usb20_otg {
+ dr_mode = "host";
status = "okay";
};

--
2.29.2

2020-11-30 01:55:33

by Heiko Stuebner

[permalink] [raw]
Subject: Re: [PATCH 0/3] arm64: dts: rockchip: rk3328-roc-cc: Misc improvements

On Thu, 26 Nov 2020 15:33:33 +0800, Chen-Yu Tsai wrote:
> Here are some improvements for the ROC-RK3328-CC.
>
> Patch 1 sets dr_mode to "host" for OTG. Since the board has a type A
> host port wired to the OTG controller, setting this is appropriate.
>
> Patch 2 enables HDMI audio.
>
> [...]

Applied, thanks!

[1/3] arm64: dts: rockchip: rk3328-roc-cc: Set dr_mode to "host" for OTG
commit: 4076a007bd0f6171434bdb119a0b8797749b0502
[2/3] arm64: dts: rockchip: rk3328-roc-cc: Enable HDMI audio
commit: 65f0b420dea7e70d70cd6ef0f12f9ff81ab90d23
[3/3] arm64: dts: rockchip: rk3328-roc-cc: Enable analog audio
commit: 5df4d4d16ce4c6e6a5cb9d4b684b187f28258219

Best regards,
--
Heiko Stuebner <[email protected]>