From c924718ded382a2d763aa994b9b5161cdcfc7998 Mon Sep 17 00:00:00 2001 From: The-going <48602507+The-going@users.noreply.github.com> Date: Tue, 25 Jan 2022 21:18:21 +0300 Subject: [PATCH] arm:dts: sun8i-r40 bananapi-m2-ultra add codec analog --- .../boot/dts/sun8i-r40-bananapi-m2-ultra.dts | 10 ++++++++++ arch/arm/boot/dts/sun8i-r40.dtsi | 18 ++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts b/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts index 3508633a8..ebb2bd322 100644 --- a/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts +++ b/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts @@ -118,6 +118,16 @@ &cpu0 { cpu-supply = <®_dcdc2>; }; +&codec { + allwinner,audio-routing = + "Headphone", "HP", + "Headphone", "HPCOM", + "MIC1", "Mic", + "Mic", "MBIAS"; + allwinner,codec-analog-controls = <&codec_analog>; + status = "okay"; +}; + &de { status = "okay"; }; diff --git a/arch/arm/boot/dts/sun8i-r40.dtsi b/arch/arm/boot/dts/sun8i-r40.dtsi index f4c8e442a..83562328b 100644 --- a/arch/arm/boot/dts/sun8i-r40.dtsi +++ b/arch/arm/boot/dts/sun8i-r40.dtsi @@ -837,6 +837,24 @@ i2s2: i2s@1c22800 { dma-names = "rx", "tx"; }; + codec: codec@1c22c00 { + #sound-dai-cells = <1>; + compatible = "allwinner,sun8i-h3-codec"; + reg = <0x01c22c00 0x300>; + interrupts = ; + clocks = <&ccu CLK_BUS_CODEC>, <&ccu CLK_CODEC>; + clock-names = "apb", "codec"; + resets = <&ccu RST_BUS_CODEC>; + dmas = <&dma 19>, <&dma 19>; + dma-names = "rx", "tx"; + status = "disabled"; + }; + + codec_analog: codec-analog@1c22f00 { + compatible = "allwinner,sun8i-a23-codec-analog"; + reg = <0x01c22f00 0x4>; + }; + ths: thermal-sensor@1c24c00 { compatible = "allwinner,sun8i-r40-ths"; reg = <0x01c24c00 0x100>; -- 2.35.3