build/patch/kernel/archive/odroidxu4-5.12/0094-ODROID-C4-arm64-dts-Add-basic-overlay-for-Hifi-Shiel.patch

110 lines
2.8 KiB
Diff

From c7897872fabfb2456c8a4191155f769b9ab85671 Mon Sep 17 00:00:00 2001
From: Dongjin Kim <tobetter@gmail.com>
Date: Tue, 20 Apr 2021 23:01:40 +0900
Subject: [PATCH 094/109] ODROID-C4: arm64/dts: Add basic overlay for
Hifi-Shield2
Support analog output only
BUG: channels are reversed which cannot be fixed by software
at this stage due to sharing with HDMI dai
Change-Id: I15fd0b96e996d092dce9845f13bbf3d8844a784e
Signed-off-by: Brad Harper <bjharper@gmail.com>
---
.../dts/amlogic/overlays/odroidc4/Makefile | 3 +-
.../amlogic/overlays/odroidc4/hifishield2.dts | 67 +++++++++++++++++++
2 files changed, 69 insertions(+), 1 deletion(-)
create mode 100644 arch/arm64/boot/dts/amlogic/overlays/odroidc4/hifishield2.dts
diff --git a/arch/arm64/boot/dts/amlogic/overlays/odroidc4/Makefile b/arch/arm64/boot/dts/amlogic/overlays/odroidc4/Makefile
index 6a308651b833..ba98b92bc449 100644
--- a/arch/arm64/boot/dts/amlogic/overlays/odroidc4/Makefile
+++ b/arch/arm64/boot/dts/amlogic/overlays/odroidc4/Makefile
@@ -9,7 +9,8 @@ dtbo-y += \
uart3.dtbo \
sx865x-i2c1.dtbo \
w1-gpio_p15.dtbo \
- w1-gpio_p22.dtbo
+ w1-gpio_p22.dtbo \
+ hifishield2.dtbo
targets += $(dtbo-y)
always-y := $(dtbo-y)
diff --git a/arch/arm64/boot/dts/amlogic/overlays/odroidc4/hifishield2.dts b/arch/arm64/boot/dts/amlogic/overlays/odroidc4/hifishield2.dts
new file mode 100644
index 000000000000..e1b94d6d0b34
--- /dev/null
+++ b/arch/arm64/boot/dts/amlogic/overlays/odroidc4/hifishield2.dts
@@ -0,0 +1,67 @@
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/clock/axg-audio-clkc.h>
+
+/ {
+ fragment@0 {
+ // i2c2 aliased with i2c0.
+ target = <&i2c2>;
+
+ __overlay__ {
+ status = "okay";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ pcm5122: pcm5122@4c {
+ #sound-dai-cells = <0>;
+ compatible = "ti,pcm5122";
+ reg = <0x4c>;
+ AVDD-supply = <&vddao_3v3>;
+ DVDD-supply = <&vddao_3v3>;
+ CPVDD-supply = <&vddao_3v3>;
+
+ status = "okay";
+ };
+ };
+ };
+
+ fragment@1 {
+ // add pcm5122 as seconday dai link to HDMI
+ target-path = "/sound";
+
+ sound_overlay: __overlay__ {
+
+ dai-link-3 {
+ codec-2 {
+ sound-dai = <&pcm5122>;
+ };
+ };
+ };
+ };
+
+ fragment@2 {
+ // set I2S master clocks and output on AO pins
+ target = <&tdmif_b>;
+
+ __overlay__ {
+ status = "okay";
+
+ pinctrl-0 = <&mclk0_ao_pins>,
+ <&tdm_ao_b_fs_pins>,
+ <&tdm_ao_b_sclk_pins>,
+ <&tdm_ao_b_dout0_pins>;
+
+ pinctrl-names = "default";
+
+ assigned-clocks = <&clkc_audio AUD_CLKID_TDM_MCLK_PAD0>,
+ <&clkc_audio AUD_CLKID_TDM_SCLK_PAD1>,
+ <&clkc_audio AUD_CLKID_TDM_LRCLK_PAD1>;
+ assigned-clock-parents = <&clkc_audio AUD_CLKID_MST_B_MCLK>,
+ <&clkc_audio AUD_CLKID_MST_B_SCLK>,
+ <&clkc_audio AUD_CLKID_MST_B_LRCLK>;
+ assigned-clock-rates = <0>, <0>, <0>;
+ };
+ };
+};
--
2.25.1