Created
May 22, 2024 21:45
-
-
Save SjB/0317664bfc0d09f678be5d67c003a956 to your computer and use it in GitHub Desktop.
sun50i-h616-orangepi-zero2w.dts I2S patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git c/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2w.dts w/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2w.dts | |
index 27e817b379a4..fcb2d852d51b 100755 | |
--- c/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2w.dts | |
+++ w/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2w.dts | |
@@ -389,7 +389,7 @@ spidev@1 { | |
&codec { | |
allwinner,audio-routing = | |
- "Line Out", "LINEOUT"; | |
+ "Line Out", "LINEOUT"; | |
status = "okay"; | |
}; | |
@@ -409,6 +409,10 @@ &ahub1_mach { | |
status = "okay"; | |
}; | |
+&ahub_i2s2 { | |
+ status = "okay"; | |
+}; | |
+ | |
&cpu0 { | |
cpu-supply = <®_dcdc2>; | |
status = "okay"; | |
diff --git c/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi w/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi | |
index 2cd542d2a3ea..43cfe66d39fd 100755 | |
--- c/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi | |
+++ w/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi | |
@@ -176,11 +176,11 @@ mixer0_out_tcon_top_mixer0: endpoint { | |
gpu: gpu@1800000 { | |
compatible = "allwinner,sun50i-h616-mali", | |
- "arm,mali-bifrost"; | |
+ "arm,mali-bifrost"; | |
reg = <0x1800000 0x40000>; | |
interrupts = <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>, | |
- <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>, | |
- <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>; | |
+ <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>, | |
+ <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>; | |
interrupt-names = "job", "mmu", "gpu"; | |
clocks = <&ccu CLK_GPU0>, <&ccu CLK_BUS_GPU>; | |
clock-names = "core", "bus"; | |
@@ -414,6 +414,12 @@ i2s3_pins: i2s3-pins { | |
function = "i2s3"; | |
}; | |
+ /omit-if-no-ref/ | |
+ i2s2_pins: i2s2-pins { | |
+ pins = "PG10", "PG11", "PG12", "PG13", "PG14"; | |
+ function = "i2s2"; | |
+ }; | |
+ | |
ir_rx_pin: ir-rx-pin { | |
pins = "PH10"; | |
function = "ir_rx"; | |
@@ -698,13 +704,13 @@ ahub_dam_plat:ahub_dam_plat@5097000 { | |
reg = <0x05097000 0x1000>; | |
resets = <&ccu RST_BUS_AUDIO_HUB>; | |
clocks = <&ccu CLK_AUDIO_CODEC_1X>, | |
- <&ccu CLK_AUDIO_CODEC_4X>, | |
- <&ccu CLK_AUDIO_HUB>, | |
- <&ccu CLK_BUS_AUDIO_HUB>; | |
+ <&ccu CLK_AUDIO_CODEC_4X>, | |
+ <&ccu CLK_AUDIO_HUB>, | |
+ <&ccu CLK_BUS_AUDIO_HUB>; | |
clock-names = "clk_pll_audio", | |
- "clk_pll_audio_4x", | |
- "clk_audio_hub", | |
- "clk_bus_audio_hub"; | |
+ "clk_pll_audio_4x", | |
+ "clk_audio_hub", | |
+ "clk_bus_audio_hub"; | |
status = "disabled"; | |
}; | |
@@ -759,6 +765,30 @@ ahub1_codec: soundcard-mach,codec { | |
}; | |
}; | |
+ ahub_i2s2: ahub-i2s2@0x05097000 { | |
+ //#sound-dai-cells = <0>; | |
+ compatible = "allwinner,sunxi-ahub-daudio"; | |
+ reg = <0x5097000 0xadf>; | |
+ clocks = <&ccu CLK_BUS_AUDIO_HUB>, | |
+ <&ccu CLK_AUDIO_CODEC_1X>, | |
+ <&ccu CLK_AUDIO_CODEC_4X>, | |
+ <&ccu CLK_AUDIO_HUB>; | |
+ clock-names = "apb", "audio-codec-1x", "audio-codec-4x", "audio-hub"; | |
+ pinctrl-names = "default"; | |
+ pinctrl-0 = <&i2s2_pins>; | |
+ tdm_num = <0x2>; | |
+ pinconfig = <0x1>; | |
+ frametype = <0x0>; | |
+ pcm_lrck_period = <0x20>; | |
+ slot_width_select = <0x20>; | |
+ daudio_master = <0x4>; | |
+ audio_format = <0x1>; | |
+ signal_inversion = <0x1>; | |
+ tdm_config = <0x1>; | |
+ mclk_div = <0x4>; | |
+ status = "disabled"; | |
+ }; | |
+ | |
uart0: serial@5000000 { | |
compatible = "snps,dw-apb-uart"; | |
reg = <0x05000000 0x400>; | |
@@ -1454,9 +1484,9 @@ cooling-maps { | |
map0 { | |
trip = <&cpu_alert>; | |
cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, | |
- <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, | |
- <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, | |
- <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; | |
+ <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, | |
+ <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, | |
+ <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; | |
}; | |
}; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment