AMLOGIC TL1 NEW EQDRC
AMLOGIC TL1 MIXER CONTROLS
AMLOGIC TL1 VAD DRIVER
+AMLOGIC SM1 SOUND CARD
M: Xing Wang <xing.wang@amlogic.com
F: arch/arm/boot/dts/amlogic/tl1_pxp.dts
F: include/dt-bindings/clock/amlogic,tl1-audio-clk.h
+F: include/dt-bindings/clock/amlogic,sm1-audio-clk.h
F: include/linux/amlogic/media/sound/misc.h
F: include/linux/amlogic/major.h
F: sound/soc/amlogic/auge/*
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/clock/amlogic,g12a-clkc.h>
-#include <dt-bindings/clock/amlogic,g12a-audio-clk.h>
+#include <dt-bindings/clock/amlogic,sm1-audio-clk.h>
#include <dt-bindings/iio/adc/amlogic-saradc.h>
#include <dt-bindings/gpio/meson-g12a-gpio.h>
#include <dt-bindings/pwm/pwm.h>
memory-region = <&ion_cma_reserved>;
};/* end of ion_dev*/
- audiobus: audiobus@0xff642000 {
+ audiobus: audiobus@0xFF660000 {
compatible = "amlogic, audio-controller", "simple-bus";
- reg = <0xff642000 0x2000>;
+ reg = <0xFF660000 0x4000>;
#address-cells = <1>;
#size-cells = <1>;
- ranges = <0x0 0xff642000 0x2000>;
+ ranges = <0x0 0xFF660000 0x4000>;
clkaudio: audio_clocks {
- compatible = "amlogic, g12a-audio-clocks";
+ compatible = "amlogic, sm1-audio-clocks";
#clock-cells = <1>;
reg = <0x0 0xb0>;
};
ddr_manager {
- compatible = "amlogic, g12a-audio-ddr-manager";
+ compatible = "amlogic, sm1-audio-ddr-manager";
interrupts = <
GIC_SPI 148 IRQ_TYPE_EDGE_RISING
GIC_SPI 149 IRQ_TYPE_EDGE_RISING
GIC_SPI 150 IRQ_TYPE_EDGE_RISING
+ GIC_SPI 49 IRQ_TYPE_EDGE_RISING
GIC_SPI 152 IRQ_TYPE_EDGE_RISING
GIC_SPI 153 IRQ_TYPE_EDGE_RISING
GIC_SPI 154 IRQ_TYPE_EDGE_RISING
+ GIC_SPI 50 IRQ_TYPE_EDGE_RISING
>;
interrupt-names =
"toddr_a", "toddr_b", "toddr_c",
- "frddr_a", "frddr_b", "frddr_c";
+ "toddr_d",
+ "frddr_a", "frddr_b", "frddr_c",
+ "frddr_d";
};
};/* end of audiobus*/
#size-cells=<1>;
ranges;
pdm_bus {
- reg = <0xFF640000 0x2000>;
+ reg = <0xFF661000 0x400>;
};
audiobus_base {
- reg = <0xFF642000 0x2000>;
+ reg = <0xFF660000 0x1000>;
};
audiolocker_base {
- reg = <0xFF64A000 0x2000>;
+ reg = <0xFF661400 0x400>;
};
eqdrc_base {
- reg = <0xFF642800 0x1800>;
+ reg = <0xFF662000 0x1000>;
};
reset_base {
reg = <0xFFD01000 0x1000>;
};
+ vad_base {
+ reg = <0xFF661800 0x400>;
+ };
+ earcrx_cdmc_base {
+ reg = <0xFF663800 0x30>;
+ };
+ earcrx_dmac_base {
+ reg = <0xFF663C00 0x20>;
+ };
+ earcrx_top_base {
+ reg = <0xFF663E00 0x10>;
+ };
};
vddcpu0: pwmao_d-regulator {
//continuous-clock;
//bitclock-inversion;
//frame-inversion;
- //bitclock-master = <&tdmacodec>;
- //frame-master = <&tdmacodec>;
+ /* master mode */
+ bitclock-master = <&tdma>;
+ frame-master = <&tdma>;
+ /* slave mode */
+ /*
+ * bitclock-master = <&tdmacodec>;
+ * frame-master = <&tdmacodec>;
+ */
tdmacpu: cpu {
- sound-dai = <&aml_tdma>;
+ sound-dai = <&tdma>;
dai-tdm-slot-tx-mask =
<1 1 1 1 1 1 1 1>;
dai-tdm-slot-rx-mask =
//continuous-clock;
//bitclock-inversion;
//frame-inversion;
- bitclock-master = <&aml_tdmb>;
- frame-master = <&aml_tdmb>;
+ /* master mode */
+ bitclock-master = <&tdmb>;
+ frame-master = <&tdmb>;
+ /* slave mode */
+ //bitclock-master = <&tdmbcodec>;
+ //frame-master = <&tdmbcodec>;
cpu {
- sound-dai = <&aml_tdmb>;
+ sound-dai = <&tdmb>;
dai-tdm-slot-tx-mask = <1 1>;
dai-tdm-slot-rx-mask = <1 1>;
dai-tdm-slot-num = <2>;
dai-tdm-slot-width = <32>;
system-clock-frequency = <12288000>;
};
- codec {
+ tdmbcodec: codec {
sound-dai = <&dummy_codec &dummy_codec>;
};
};
continuous-clock;
//bitclock-inversion;
//frame-inversion;
- bitclock-master = <&aml_tdmc>;
- frame-master = <&aml_tdmc>;
+ /* master mode */
+ bitclock-master = <&tdmc>;
+ frame-master = <&tdmc>;
+ /* slave mode */
+ //bitclock-master = <&tdmccodec>;
+ //frame-master = <&tdmccodec>;
cpu {
- sound-dai = <&aml_tdmc>;
+ sound-dai = <&tdmc>;
dai-tdm-slot-tx-mask = <1 1>;
dai-tdm-slot-rx-mask = <1 1>;
dai-tdm-slot-num = <2>;
dai-tdm-slot-width = <32>;
system-clock-frequency = <12288000>;
};
- codec {
+ tdmccodec: codec {
sound-dai = <&dummy_codec &dummy_codec>;
};
};
aml-audio-card,dai-link@3 {
mclk-fs = <64>;
cpu {
- sound-dai = <&aml_pdm>;
+ sound-dai = <&pdm>;
};
codec {
sound-dai = <&pdm_codec>;
aml-audio-card,dai-link@4 {
mclk-fs = <128>;
cpu {
- sound-dai = <&aml_spdif>;
+ sound-dai = <&spdifa>;
system-clock-frequency = <6144000>;
};
codec {
aml-audio-card,dai-link@5 {
mclk-fs = <128>;
cpu {
- sound-dai = <&aml_spdif_b>;
+ sound-dai = <&spdifb>;
system-clock-frequency = <6144000>;
};
codec {
};
&audiobus {
- aml_tdma: tdma {
- compatible = "amlogic, g12a-snd-tdma";
+ tdma: tdm@0 {
+ compatible = "amlogic, sm1-snd-tdma";
#sound-dai-cells = <0>;
dai-tdm-lane-slot-mask-in = <1 0>;
dai-tdm-lane-slot-mask-out = <0 1>;
clock-names = "mclk", "clk_srcpll";
pinctrl-names = "tdm_pins";
pinctrl-0 = <&tdmout_a &tdmin_a>;
+
+ status = "okay";
};
- aml_tdmb: tdmb {
- compatible = "amlogic, g12a-snd-tdmb";
+ tdmb: tdm@1 {
+ compatible = "amlogic, sm1-snd-tdmb";
#sound-dai-cells = <0>;
dai-tdm-lane-slot-mask-in = <1 1 1 1>;
dai-tdm-clk-sel = <1>;
pinctrl-0 = <&tdmb_mclk /*&tdmout_b &tdmin_b*/>;
};
- aml_tdmc: tdmc {
- compatible = "amlogic, g12a-snd-tdmc";
+ tdmc: tdm@2 {
+ compatible = "amlogic, sm1-snd-tdmc";
#sound-dai-cells = <0>;
dai-tdm-lane-slot-mask-in = <0 1 0 0>;
#dai-tdm-lane-slot-mask-out = <1 0 1 1>;
clock-names = "mclk", "clk_srcpll";
pinctrl-names = "tdm_pins";
pinctrl-0 = <&tdmc_mclk &tdmout_c &tdmin_c>;
+
+ status = "okay";
};
- aml_spdif: spdif {
- compatible = "amlogic, g12a-snd-spdif-a";
+ spdifa: spdif@0 {
+ compatible = "amlogic, sm1-snd-spdif-a";
#sound-dai-cells = <0>;
clocks = <&clkc CLKID_MPLL0
&clkc CLKID_FCLK_DIV4
+ &clkaudio CLKID_AUDIO_GATE_SPDIFIN
+ &clkaudio CLKID_AUDIO_GATE_SPDIFOUT_A
&clkaudio CLKID_AUDIO_SPDIFIN
- &clkaudio CLKID_AUDIO_SPDIFOUT
- &clkaudio CLKID_AUDIO_SPDIFIN_CTRL
- &clkaudio CLKID_AUDIO_SPDIFOUT_CTRL>;
+ &clkaudio CLKID_AUDIO_SPDIFOUT_A>;
clock-names = "sysclk", "fixed_clk", "gate_spdifin",
"gate_spdifout", "clk_spdifin", "clk_spdifout";
interrupts =
- <GIC_SPI 87 IRQ_TYPE_EDGE_RISING>;
+ <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
interrupt-names = "irq_spdifin";
pinctrl-names = "spdif_pins";
pinctrl-0 = <&spdifout &spdifin>;
+
status = "okay";
};
- aml_spdif_b: spdif_b {
- compatible = "amlogic, g12a-snd-spdif-b";
+ spdifb: spdif@1 {
+ compatible = "amlogic, sm1-snd-spdif-b";
#sound-dai-cells = <0>;
clocks = <&clkc CLKID_MPLL0 /*CLKID_HIFI_PLL*/
- &clkaudio CLKID_AUDIO_SPDIFOUTB
- &clkaudio CLKID_AUDIO_SPDIFOUTB_CTRL>;
+ &clkaudio CLKID_AUDIO_GATE_SPDIFOUT_B
+ &clkaudio CLKID_AUDIO_SPDIFOUT_B>;
clock-names = "sysclk",
"gate_spdifout", "clk_spdifout";
- pinctrl-names = "spdif_pins";
- pinctrl-0 = <&spdifout_b>;
+
status = "okay";
};
- aml_pdm: pdm {
- compatible = "amlogic, g12a-snd-pdm";
+ pdm: pdm {
+ compatible = "amlogic, sm1-snd-pdm";
#sound-dai-cells = <0>;
- clocks = <&clkaudio CLKID_AUDIO_PDM
+
+ clocks = <&clkaudio CLKID_AUDIO_GATE_PDM
&clkc CLKID_FCLK_DIV3
&clkc CLKID_MPLL3
&clkaudio CLKID_AUDIO_PDMIN0
"dclk_srcpll",
"pdm_dclk",
"pdm_sysclk";
+
pinctrl-names = "pdm_pins";
pinctrl-0 = <&pdmin>;
- filter_mode = <1>; /* mode 0~4, defalut:1 */
- status = "okay";
- };
- aml_pwrdet: pwrdet {
- compatible = "amlogic, g12a-power-detect";
- interrupts = <GIC_SPI 155 IRQ_TYPE_EDGE_RISING>;
- interrupt-names = "pwrdet_irq";
+ /* mode 0~4, defalut:1 */
+ filter_mode = <1>;
- /* pwrdet source sel
- * 7: loopback;
- * 6: tdmin_lb;
- * 5: reserved;
- * 4: pdmin;
- * 3: spdifin;
- * 2: tdmin_c;
- * 1: tdmin_b;
- * 0: tdmin_a;
- */
- pwrdet_src = <4>;
-
- hi_th = <0x70000>;
- lo_th = <0x16000>;
-
- status = "disabled";
+ status = "okay";
};
}; /* end of audiobus */
tdmout_index = <1>;
status = "okay";
};
- audio_effect:eqdrc{
- /*eq_enable = <1>;*/
- /*drc_enable = <1>;*/
- /*
- * 0:tdmout_a
- * 1:tdmout_b
- * 2:tdmout_c
- * 3:spdifout
- * 4:spdifout_b
- */
- eqdrc_module = <1>;
- /* max 0xf, each bit for one lane, usually one lane */
- lane_mask = <0x1>;
- /* max 0xff, each bit for one channel */
- channel_mask = <0x3>;
- };
+
auge_sound {
compatible = "amlogic, g12a-sound-card";
aml-audio-card,name = "AML-AUGESOUND";
- aml-audio-card,loopback = <&aml_loopback>;
- aml-audio-card,aux-devs = <&amlogic_codec>;
/*avout mute gpio*/
avout_mute-gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>;
- /*for audio effect ,eqdrc */
- aml-audio-card,effect = <&audio_effect>;
aml-audio-card,dai-link@0 {
format = "dsp_a";
//continuous-clock;
//bitclock-inversion;
//frame-inversion;
- //bitclock-master = <&tdmacodec>;
- //frame-master = <&tdmacodec>;
- /* suffix-name, sync with android audio hal
- * what's the dai link used for
+ /* master mode */
+ bitclock-master = <&tdma>;
+ frame-master = <&tdma>;
+ /* slave mode */
+ /*
+ * bitclock-master = <&tdmacodec>;
+ * frame-master = <&tdmacodec>;
*/
suffix-name = "alsaPORT-pcm";
tdmacpu: cpu {
- sound-dai = <&aml_tdma>;
+ sound-dai = <&tdma>;
dai-tdm-slot-tx-mask =
<1 1 1 1 1 1 1 1>;
dai-tdm-slot-rx-mask =
//continuous-clock;
//bitclock-inversion;
//frame-inversion;
- bitclock-master = <&aml_tdmb>;
- frame-master = <&aml_tdmb>;
+ /* master mode */
+ bitclock-master = <&tdmb>;
+ frame-master = <&tdmb>;
+ /* slave mode */
//bitclock-master = <&tdmbcodec>;
//frame-master = <&tdmbcodec>;
/* suffix-name, sync with android audio hal
*/
suffix-name = "alsaPORT-i2s";
cpu {
- sound-dai = <&aml_tdmb>;
+ sound-dai = <&tdmb>;
dai-tdm-slot-tx-mask = <1 1>;
dai-tdm-slot-rx-mask = <1 1>;
dai-tdm-slot-num = <2>;
//continuous-clock;
//bitclock-inversion;
//frame-inversion;
- bitclock-master = <&aml_tdmc>;
- frame-master = <&aml_tdmc>;
- /* suffix-name, sync with android audio hal
- * what's the dai link used for
- */
+ /* master mode */
+ bitclock-master = <&tdmc>;
+ frame-master = <&tdmc>;
+ /* slave mode */
+ //bitclock-master = <&tdmccodec>;
+ //frame-master = <&tdmccodec>;
+ /* suffix-name, sync with android audio hal used for */
//suffix-name = "alsaPORT-tdm";
cpu {
- sound-dai = <&aml_tdmc>;
+ sound-dai = <&tdmc>;
dai-tdm-slot-tx-mask = <1 1>;
dai-tdm-slot-rx-mask = <1 1>;
dai-tdm-slot-num = <2>;
dai-tdm-slot-width = <32>;
system-clock-frequency = <12288000>;
};
- codec {
- sound-dai = <&tlv320adc3101_32 &dummy_codec>;
+ tdmccodec: codec {
+ sound-dai = <&dummy_codec>;
};
};
*/
suffix-name = "alsaPORT-pdm";
cpu {
- sound-dai = <&aml_pdm>;
+ sound-dai = <&pdm>;
};
codec {
sound-dai = <&pdm_codec>;
aml-audio-card,dai-link@4 {
mclk-fs = <128>;
- continuous-clock;
- /* suffix-name, sync with android audio hal
- * what's the dai link used for
- */
- suffix-name = "alsaPORT-spdifb2hdmi";
+ /* suffix-name, sync with android audio hal used for */
+ suffix-name = "alsaPORT-spdif";
cpu {
- sound-dai = <&aml_spdif>;
+ sound-dai = <&spdifa>;
system-clock-frequency = <6144000>;
};
codec {
sound-dai = <&dummy_codec>;
};
};
- /* spdif_b to hdmi, only playback */
+
aml-audio-card,dai-link@5 {
mclk-fs = <128>;
continuous-clock;
/* suffix-name, sync with android audio hal
* what's the dai link used for
*/
- suffix-name = "alsaPORT-spdif";
+ suffix-name = "alsaPORT-spdifb";
cpu {
- sound-dai = <&aml_spdif_b>;
+ sound-dai = <&spdifb>;
system-clock-frequency = <6144000>;
};
codec {
sound-dai = <&dummy_codec>;
};
};
- /*
- * dai link for i2s to hdmix,
- * Notice to select a tdm lane not used by hw
- */
- /*
- * aml-audio-card,dai-link@6 {
- * format = "i2s";
- * mclk-fs = <256>;
- * //continuous-clock;
- * //bitclock-inversion;
- * //frame-inversion;
- * bitclock-master = <&aml_i2s2hdmi>;
- * frame-master = <&aml_i2s2hdmi>;
- * suffix-name = "alsaPORT-i2s2hdmi";
- * cpu {
- * sound-dai = <&aml_i2s2hdmi>;
- * dai-tdm-slot-tx-mask = <1 1>;
- * dai-tdm-slot-num = <2>;
- * dai-tdm-slot-width = <32>;
- * system-clock-frequency = <12288000>;
- * };
- * codec {
- * sound-dai = <&dummy_codec>;
- * };
- * };
- */
+ aml-audio-card,dai-link@6 {
+ mclk-fs = <256>;
+ suffix-name = "alsaPORT-earc";
+ cpu {
+ sound-dai = <&earc>;
+ system-clock-frequency = <12288000>;
+ };
+ codec {
+ sound-dai = <&dummy_codec>;
+ };
+ };
};
audiolocker: locker {
compatible = "amlogic, audiolocker";
interrupt-names = "irq";
frequency = <49000000>; /* pll */
dividor = <49>; /* locker's parent */
- status = "okay";
+ status = "disabled";
};
/* Audio Related end */
reset_pin = <&gpio GPIOA_5 0>;
};
- tlv320adc3101_32: tlv320adc3101_32@32 {
- compatible = "ti,tlv320adc3101";
- #sound-dai-cells = <0>;
- reg = <0x19>;
- differential_pair = <1>;
- status = "okay";
- };
-
- tas5707_36: tas5707_36@36 {
- compatible = "ti,tas5707";
- #sound-dai-cells = <0>;
- reg = <0x1b>;
- status = "disabled";
- reset_pin = <&gpio GPIOA_5 0>;
- };
-
bl_extern_i2c {
compatible = "bl_extern, i2c";
dev_name = "lp8556";
};
&audiobus {
- aml_tdma: tdma {
- compatible = "amlogic, g12a-snd-tdma";
+ tdma: tdm@0 {
+ compatible = "amlogic, sm1-snd-tdma";
#sound-dai-cells = <0>;
dai-tdm-lane-slot-mask-in = <0 1>;
dai-tdm-oe-lane-slot-mask-out = <1 0>;
clock-names = "mclk", "clk_srcpll";
pinctrl-names = "tdm_pins";
pinctrl-0 = <&tdmout_a &tdmin_a>;
+
+ status = "okay";
};
- aml_tdmb: tdmb {
- compatible = "amlogic, g12a-snd-tdmb";
+ tdmb: tdm@1 {
+ compatible = "amlogic, sm1-snd-tdmb";
#sound-dai-cells = <0>;
dai-tdm-lane-slot-mask-in = <0 1 0 0>;
dai-tdm-lane-slot-mask-out = <1 0 0 0>;
clock-names = "mclk", "clk_srcpll", "samesource_sysclk";
pinctrl-names = "tdm_pins";
pinctrl-0 = <&tdmb_mclk &tdmout_b &tdmin_b>;
+
+ mclk_pad = <0>; /* 0: mclk_0; 1: mclk_1 */
+
/*
* 0: tdmout_a;
* 1: tdmout_b;
* 4: spdifout_b;
*/
samesource_sel = <3>;
+
+ status = "okay";
};
- aml_tdmc: tdmc {
- compatible = "amlogic, g12a-snd-tdmc";
+ tdmc: tdm@2 {
+ compatible = "amlogic, sm1-snd-tdmc";
#sound-dai-cells = <0>;
dai-tdm-lane-slot-mask-in = <1 0 0 0>;
#dai-tdm-lane-slot-mask-out = <1 0 1 1>;
#dai-tdm-lane-oe-slot-mask-in = <0 0 0 0>;
#dai-tdm-lane-oe-slot-mask-out = <1 0 0 0>;
dai-tdm-clk-sel = <2>;
+
clocks = <&clkaudio CLKID_AUDIO_MCLK_C
&clkc CLKID_MPLL2>;
clock-names = "mclk", "clk_srcpll";
pinctrl-names = "tdm_pins";
pinctrl-0 = <&tdmc_mclk &tdmout_c &tdmin_c>;
- };
-
- /* copy a useless tdm to output for hdmi, no pinmux */
- aml_i2s2hdmi: i2s2hdmi {
- compatible = "amlogic, g12a-snd-tdmc";
- #sound-dai-cells = <0>;
- dai-tdm-lane-slot-mask-out = <1 1 1 1>;
- dai-tdm-clk-sel = <2>;
- clocks = <&clkaudio CLKID_AUDIO_MCLK_C
- &clkc CLKID_MPLL2>;
- clock-names = "mclk", "clk_srcpll";
+ mclk_pad = <0>; /* 0: mclk_0; 1: mclk_1 */
- i2s2hdmi = <1>;
-
- status = "disabled";
+ status = "okay";
};
- aml_spdif: spdif {
- compatible = "amlogic, g12a-snd-spdif-a";
+ spdifa: spdif@0 {
+ compatible = "amlogic, sm1-snd-spdif-a";
#sound-dai-cells = <0>;
clocks = <&clkc CLKID_MPLL0
&clkc CLKID_FCLK_DIV4
+ &clkaudio CLKID_AUDIO_GATE_SPDIFIN
+ &clkaudio CLKID_AUDIO_GATE_SPDIFOUT_A
&clkaudio CLKID_AUDIO_SPDIFIN
- &clkaudio CLKID_AUDIO_SPDIFOUT
- &clkaudio CLKID_AUDIO_SPDIFIN_CTRL
- &clkaudio CLKID_AUDIO_SPDIFOUT_CTRL>;
+ &clkaudio CLKID_AUDIO_SPDIFOUT_A>;
clock-names = "sysclk", "fixed_clk", "gate_spdifin",
"gate_spdifout", "clk_spdifin", "clk_spdifout";
interrupts =
interrupt-names = "irq_spdifin";
pinctrl-names = "spdif_pins";
pinctrl-0 = <&spdifout &spdifin>;
+
status = "okay";
};
- aml_spdif_b: spdif_b {
- compatible = "amlogic, g12a-snd-spdif-b";
+ spdifb: spdif@1 {
+ compatible = "amlogic, sm1-snd-spdif-b";
#sound-dai-cells = <0>;
clocks = <&clkc CLKID_MPLL0 /*CLKID_HIFI_PLL*/
- &clkaudio CLKID_AUDIO_SPDIFOUTB
- &clkaudio CLKID_AUDIO_SPDIFOUTB_CTRL>;
+ &clkaudio CLKID_AUDIO_GATE_SPDIFOUT_B
+ &clkaudio CLKID_AUDIO_SPDIFOUT_B>;
clock-names = "sysclk",
"gate_spdifout", "clk_spdifout";
+
status = "okay";
};
- aml_pdm: pdm {
- compatible = "amlogic, g12a-snd-pdm";
+ pdm: pdm {
+ compatible = "amlogic, sm1-snd-pdm";
#sound-dai-cells = <0>;
- clocks = <&clkaudio CLKID_AUDIO_PDM
+
+ clocks = <&clkaudio CLKID_AUDIO_GATE_PDM
&clkc CLKID_FCLK_DIV3
&clkc CLKID_MPLL3
&clkaudio CLKID_AUDIO_PDMIN0
"dclk_srcpll",
"pdm_dclk",
"pdm_sysclk";
+
pinctrl-names = "pdm_pins";
pinctrl-0 = <&pdmin>;
- filter_mode = <1>; /* mode 0~4, defalut:1 */
+
+ /* mode 0~4, defalut:1 */
+ filter_mode = <1>;
+
status = "okay";
};
- aml_loopback: loopback {
- compatible = "amlogic, snd-loopback";
- /*
- * 0: out rate = in data rate;
- * 1: out rate = loopback data rate;
- */
- lb_mode = <0>;
-
- /* datain src
- * 0: tdmin_a;
- * 1: tdmin_b;
- * 2: tdmin_c;
- * 3: spdifin;
- * 4: pdmin;
- */
- datain_src = <4>;
- datain_chnum = <8>;
- datain_chmask = <0x3f>;
-
- /* tdmin_lb src
- * 0: tdmoutA
- * 1: tdmoutB
- * 2: tdmoutC
- * 3: PAD_tdminA
- * 4: PAD_tdminB
- * 5: PAD_tdminC
- */
- datalb_src = <2>;
- datalb_chnum = <8>;
- datalb_chmask = <0x3>;
+
+ earc:earc {
+ compatible = "amlogic, sm1-snd-earc";
+ #sound-dai-cells = <0>;
+
+ clocks = <&clkaudio CLKID_AUDIO_GATE_EARCRX
+ &clkaudio CLKID_EARCRX_CMDC
+ &clkaudio CLKID_EARCRX_DMAC
+ &clkc CLKID_FCLK_DIV5
+ &clkc CLKID_FCLK_DIV3
+ >;
+ clock-names = "rx_gate",
+ "rx_cmdc",
+ "rx_dmac",
+ "rx_cmdc_srcpll",
+ "rx_dmac_srcpll";
+
+ interrupts = <
+ GIC_SPI 88 IRQ_TYPE_EDGE_RISING
+ GIC_SPI 87 IRQ_TYPE_EDGE_RISING
+ >;
+ interrupt-names = "rx_cmdc", "rx_dmac";
status = "okay";
};
- audioresample: resample {
- compatible = "amlogic, g12a-resample";
+ asrca: resample@0 {
+ compatible = "amlogic, sm1-resample";
clocks = <&clkc CLKID_MPLL3
&clkaudio CLKID_AUDIO_MCLK_F
- &clkaudio CLKID_AUDIO_RESAMPLE_CTRL>;
+ &clkaudio CLKID_AUDIO_RESAMPLE_A>;
clock-names = "resample_pll", "resample_src", "resample_clk";
/*same with toddr_src
* TDMIN_A, 0
* LOOPBACK, 7
*/
resample_module = <4>;
- status = "okay";
- };
- aml_pwrdet: pwrdet {
- compatible = "amlogic, g12a-power-detect";
-
- interrupts = <GIC_SPI 155 IRQ_TYPE_EDGE_RISING>;
- interrupt-names = "pwrdet_irq";
-
- /* pwrdet source sel
- * 7: loopback;
- * 6: tdmin_lb;
- * 5: reserved;
- * 4: pdmin;
- * 3: spdifin;
- * 2: tdmin_c;
- * 1: tdmin_b;
- * 0: tdmin_a;
- */
- pwrdet_src = <4>;
-
- hi_th = <0x70000>;
- lo_th = <0x16000>;
-
status = "disabled";
};
}; /* end of audiobus */
};
};
- /* GPIOH_4 */
- /*
- * spdifout: spdifout {
- * mux {
- * groups = "spdif_out_h";
- * function = "spdif_out";
- * };
- *};
- */
-
pdmin: pdmin {
- mux { /* gpioa_5, gpioa_6, gpioa_7, gpioa_8, gpioa_9*/
+ mux { /* GPIOA_5, GPIOA_6, GPIOA_8, GPIOA_9, GPIOA_7 */
groups = "pdm_din0_a",
/*"pdm_din1_a",*/
"pdm_din2_a",
}; /* end of pinctrl_periphs */
&pinctrl_aobus {
spdifout: spdifout {
- mux { /* gpiao_10 */
+ mux { /* GPIOAO_10 */
groups = "spdif_out_ao";
function = "spdif_out_ao";
};
tdmout_index = <1>;
status = "okay";
};
- audio_effect:eqdrc{
- /*eq_enable = <1>;*/
- /*drc_enable = <1>;*/
- /*
- * 0:tdmout_a
- * 1:tdmout_b
- * 2:tdmout_c
- * 3:spdifout
- * 4:spdifout_b
- */
- eqdrc_module = <1>;
- /* max 0xf, each bit for one lane, usually one lane */
- lane_mask = <0x1>;
- /* max 0xff, each bit for one channel */
- channel_mask = <0x3>;
- };
+
auge_sound {
compatible = "amlogic, g12a-sound-card";
aml-audio-card,name = "AML-AUGESOUND";
- aml-audio-card,loopback = <&aml_loopback>;
- aml-audio-card,aux-devs = <&amlogic_codec>;
/*avout mute gpio*/
avout_mute-gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>;
- /*for audio effect ,eqdrc */
- aml-audio-card,effect = <&audio_effect>;
aml-audio-card,dai-link@0 {
format = "dsp_a";
//continuous-clock;
//bitclock-inversion;
//frame-inversion;
- //bitclock-master = <&tdmacodec>;
- //frame-master = <&tdmacodec>;
- /* suffix-name, sync with android audio hal
- * what's the dai link used for
+ /* master mode */
+ bitclock-master = <&tdma>;
+ frame-master = <&tdma>;
+ /* slave mode */
+ /*
+ * bitclock-master = <&tdmacodec>;
+ * frame-master = <&tdmacodec>;
*/
suffix-name = "alsaPORT-pcm";
tdmacpu: cpu {
- sound-dai = <&aml_tdma>;
+ sound-dai = <&tdma>;
dai-tdm-slot-tx-mask =
<1 1 1 1 1 1 1 1>;
dai-tdm-slot-rx-mask =
//continuous-clock;
//bitclock-inversion;
//frame-inversion;
- bitclock-master = <&aml_tdmb>;
- frame-master = <&aml_tdmb>;
+ /* master mode */
+ bitclock-master = <&tdmb>;
+ frame-master = <&tdmb>;
+ /* slave mode */
//bitclock-master = <&tdmbcodec>;
//frame-master = <&tdmbcodec>;
/* suffix-name, sync with android audio hal
*/
suffix-name = "alsaPORT-i2s";
cpu {
- sound-dai = <&aml_tdmb>;
+ sound-dai = <&tdmb>;
dai-tdm-slot-tx-mask = <1 1>;
dai-tdm-slot-rx-mask = <1 1>;
dai-tdm-slot-num = <2>;
//continuous-clock;
//bitclock-inversion;
//frame-inversion;
- bitclock-master = <&aml_tdmc>;
- frame-master = <&aml_tdmc>;
- /* suffix-name, sync with android audio hal
- * what's the dai link used for
- */
+ /* master mode */
+ bitclock-master = <&tdmc>;
+ frame-master = <&tdmc>;
+ /* slave mode */
+ //bitclock-master = <&tdmccodec>;
+ //frame-master = <&tdmccodec>;
+ /* suffix-name, sync with android audio hal used for */
//suffix-name = "alsaPORT-tdm";
cpu {
- sound-dai = <&aml_tdmc>;
+ sound-dai = <&tdmc>;
dai-tdm-slot-tx-mask = <1 1>;
dai-tdm-slot-rx-mask = <1 1>;
dai-tdm-slot-num = <2>;
dai-tdm-slot-width = <32>;
system-clock-frequency = <12288000>;
};
- codec {
- sound-dai = <&tlv320adc3101_32 &dummy_codec>;
+ tdmccodec: codec {
+ sound-dai = <&dummy_codec>;
};
};
*/
suffix-name = "alsaPORT-pdm";
cpu {
- sound-dai = <&aml_pdm>;
+ sound-dai = <&pdm>;
};
codec {
sound-dai = <&pdm_codec>;
aml-audio-card,dai-link@4 {
mclk-fs = <128>;
- continuous-clock;
- /* suffix-name, sync with android audio hal
- * what's the dai link used for
- */
- suffix-name = "alsaPORT-spdifb2hdmi";
+ /* suffix-name, sync with android audio hal used for */
+ suffix-name = "alsaPORT-spdif";
cpu {
- sound-dai = <&aml_spdif>;
+ sound-dai = <&spdifa>;
system-clock-frequency = <6144000>;
};
codec {
sound-dai = <&dummy_codec>;
};
};
- /* spdif_b to hdmi, only playback */
+
aml-audio-card,dai-link@5 {
mclk-fs = <128>;
continuous-clock;
/* suffix-name, sync with android audio hal
* what's the dai link used for
*/
- suffix-name = "alsaPORT-spdif";
+ suffix-name = "alsaPORT-spdifb";
cpu {
- sound-dai = <&aml_spdif_b>;
+ sound-dai = <&spdifb>;
system-clock-frequency = <6144000>;
};
codec {
sound-dai = <&dummy_codec>;
};
};
- /*
- * dai link for i2s to hdmix,
- * Notice to select a tdm lane not used by hw
- */
- /*
- * aml-audio-card,dai-link@6 {
- * format = "i2s";
- * mclk-fs = <256>;
- * //continuous-clock;
- * //bitclock-inversion;
- * //frame-inversion;
- * bitclock-master = <&aml_i2s2hdmi>;
- * frame-master = <&aml_i2s2hdmi>;
- * suffix-name = "alsaPORT-i2s2hdmi";
- * cpu {
- * sound-dai = <&aml_i2s2hdmi>;
- * dai-tdm-slot-tx-mask = <1 1>;
- * dai-tdm-slot-num = <2>;
- * dai-tdm-slot-width = <32>;
- * system-clock-frequency = <12288000>;
- * };
- * codec {
- * sound-dai = <&dummy_codec>;
- * };
- * };
- */
+ aml-audio-card,dai-link@6 {
+ mclk-fs = <256>;
+ suffix-name = "alsaPORT-earc";
+ cpu {
+ sound-dai = <&earc>;
+ system-clock-frequency = <12288000>;
+ };
+ codec {
+ sound-dai = <&dummy_codec>;
+ };
+ };
};
audiolocker: locker {
compatible = "amlogic, audiolocker";
interrupt-names = "irq";
frequency = <49000000>; /* pll */
dividor = <49>; /* locker's parent */
- status = "okay";
+ status = "disabled";
};
/* Audio Related end */
reset_pin = <&gpio GPIOA_5 0>;
};
- tlv320adc3101_32: tlv320adc3101_32@32 {
- compatible = "ti,tlv320adc3101";
- #sound-dai-cells = <0>;
- reg = <0x19>;
- differential_pair = <1>;
- status = "okay";
- };
-
- tas5707_36: tas5707_36@36 {
- compatible = "ti,tas5707";
- #sound-dai-cells = <0>;
- reg = <0x1b>;
- status = "disabled";
- reset_pin = <&gpio GPIOA_5 0>;
- };
-
bl_extern_i2c {
compatible = "bl_extern, i2c";
dev_name = "lp8556";
};
&audiobus {
- aml_tdma: tdma {
- compatible = "amlogic, g12a-snd-tdma";
+ tdma: tdm@0 {
+ compatible = "amlogic, sm1-snd-tdma";
#sound-dai-cells = <0>;
dai-tdm-lane-slot-mask-in = <0 1>;
dai-tdm-oe-lane-slot-mask-out = <1 0>;
clock-names = "mclk", "clk_srcpll";
pinctrl-names = "tdm_pins";
pinctrl-0 = <&tdmout_a &tdmin_a>;
+
+ status = "okay";
};
- aml_tdmb: tdmb {
- compatible = "amlogic, g12a-snd-tdmb";
+ tdmb: tdm@1 {
+ compatible = "amlogic, sm1-snd-tdmb";
#sound-dai-cells = <0>;
dai-tdm-lane-slot-mask-in = <0 1 0 0>;
dai-tdm-lane-slot-mask-out = <1 0 0 0>;
clock-names = "mclk", "clk_srcpll", "samesource_sysclk";
pinctrl-names = "tdm_pins";
pinctrl-0 = <&tdmb_mclk &tdmout_b &tdmin_b>;
+
+ mclk_pad = <0>; /* 0: mclk_0; 1: mclk_1 */
+
/*
* 0: tdmout_a;
* 1: tdmout_b;
* 4: spdifout_b;
*/
samesource_sel = <3>;
+
+ status = "okay";
};
- aml_tdmc: tdmc {
- compatible = "amlogic, g12a-snd-tdmc";
+ tdmc: tdm@2 {
+ compatible = "amlogic, sm1-snd-tdmc";
#sound-dai-cells = <0>;
dai-tdm-lane-slot-mask-in = <1 0 0 0>;
#dai-tdm-lane-slot-mask-out = <1 0 1 1>;
#dai-tdm-lane-oe-slot-mask-in = <0 0 0 0>;
#dai-tdm-lane-oe-slot-mask-out = <1 0 0 0>;
dai-tdm-clk-sel = <2>;
+
clocks = <&clkaudio CLKID_AUDIO_MCLK_C
&clkc CLKID_MPLL2>;
clock-names = "mclk", "clk_srcpll";
pinctrl-names = "tdm_pins";
pinctrl-0 = <&tdmc_mclk &tdmout_c &tdmin_c>;
- };
+ mclk_pad = <0>; /* 0: mclk_0; 1: mclk_1 */
- /* copy a useless tdm to output for hdmi, no pinmux */
- aml_i2s2hdmi: i2s2hdmi {
- compatible = "amlogic, g12a-snd-tdmc";
- #sound-dai-cells = <0>;
- dai-tdm-lane-slot-mask-out = <1 1 1 1>;
- dai-tdm-clk-sel = <2>;
- clocks = <&clkaudio CLKID_AUDIO_MCLK_C
- &clkc CLKID_MPLL2>;
- clock-names = "mclk", "clk_srcpll";
-
- i2s2hdmi = <1>;
-
- status = "disabled";
+ status = "okay";
};
- aml_spdif: spdif {
- compatible = "amlogic, g12a-snd-spdif-a";
+ spdifa: spdif@0 {
+ compatible = "amlogic, sm1-snd-spdif-a";
#sound-dai-cells = <0>;
clocks = <&clkc CLKID_MPLL0
&clkc CLKID_FCLK_DIV4
+ &clkaudio CLKID_AUDIO_GATE_SPDIFIN
+ &clkaudio CLKID_AUDIO_GATE_SPDIFOUT_A
&clkaudio CLKID_AUDIO_SPDIFIN
- &clkaudio CLKID_AUDIO_SPDIFOUT
- &clkaudio CLKID_AUDIO_SPDIFIN_CTRL
- &clkaudio CLKID_AUDIO_SPDIFOUT_CTRL>;
+ &clkaudio CLKID_AUDIO_SPDIFOUT_A>;
clock-names = "sysclk", "fixed_clk", "gate_spdifin",
"gate_spdifout", "clk_spdifin", "clk_spdifout";
interrupts =
interrupt-names = "irq_spdifin";
pinctrl-names = "spdif_pins";
pinctrl-0 = <&spdifout &spdifin>;
+
status = "okay";
};
- aml_spdif_b: spdif_b {
- compatible = "amlogic, g12a-snd-spdif-b";
+ spdifb: spdif@1 {
+ compatible = "amlogic, sm1-snd-spdif-b";
#sound-dai-cells = <0>;
clocks = <&clkc CLKID_MPLL0 /*CLKID_HIFI_PLL*/
- &clkaudio CLKID_AUDIO_SPDIFOUTB
- &clkaudio CLKID_AUDIO_SPDIFOUTB_CTRL>;
+ &clkaudio CLKID_AUDIO_GATE_SPDIFOUT_B
+ &clkaudio CLKID_AUDIO_SPDIFOUT_B>;
clock-names = "sysclk",
"gate_spdifout", "clk_spdifout";
+
status = "okay";
};
- aml_pdm: pdm {
- compatible = "amlogic, g12a-snd-pdm";
+ pdm: pdm {
+ compatible = "amlogic, sm1-snd-pdm";
#sound-dai-cells = <0>;
- clocks = <&clkaudio CLKID_AUDIO_PDM
+
+ clocks = <&clkaudio CLKID_AUDIO_GATE_PDM
&clkc CLKID_FCLK_DIV3
&clkc CLKID_MPLL3
&clkaudio CLKID_AUDIO_PDMIN0
"dclk_srcpll",
"pdm_dclk",
"pdm_sysclk";
+
pinctrl-names = "pdm_pins";
pinctrl-0 = <&pdmin>;
- filter_mode = <1>; /* mode 0~4, defalut:1 */
+
+ /* mode 0~4, defalut:1 */
+ filter_mode = <1>;
+
status = "okay";
};
- aml_loopback: loopback {
- compatible = "amlogic, snd-loopback";
- /*
- * 0: out rate = in data rate;
- * 1: out rate = loopback data rate;
- */
- lb_mode = <0>;
-
- /* datain src
- * 0: tdmin_a;
- * 1: tdmin_b;
- * 2: tdmin_c;
- * 3: spdifin;
- * 4: pdmin;
- */
- datain_src = <4>;
- datain_chnum = <8>;
- datain_chmask = <0x3f>;
-
- /* tdmin_lb src
- * 0: tdmoutA
- * 1: tdmoutB
- * 2: tdmoutC
- * 3: PAD_tdminA
- * 4: PAD_tdminB
- * 5: PAD_tdminC
- */
- datalb_src = <2>;
- datalb_chnum = <8>;
- datalb_chmask = <0x3>;
+ earc:earc {
+ compatible = "amlogic, sm1-snd-earc";
+ #sound-dai-cells = <0>;
+
+ clocks = <&clkaudio CLKID_AUDIO_GATE_EARCRX
+ &clkaudio CLKID_EARCRX_CMDC
+ &clkaudio CLKID_EARCRX_DMAC
+ &clkc CLKID_FCLK_DIV5
+ &clkc CLKID_FCLK_DIV3
+ >;
+ clock-names = "rx_gate",
+ "rx_cmdc",
+ "rx_dmac",
+ "rx_cmdc_srcpll",
+ "rx_dmac_srcpll";
+
+ interrupts = <
+ GIC_SPI 88 IRQ_TYPE_EDGE_RISING
+ GIC_SPI 87 IRQ_TYPE_EDGE_RISING
+ >;
+ interrupt-names = "rx_cmdc", "rx_dmac";
status = "okay";
};
- audioresample: resample {
- compatible = "amlogic, g12a-resample";
+ asrca: resample@0 {
+ compatible = "amlogic, sm1-resample";
clocks = <&clkc CLKID_MPLL3
&clkaudio CLKID_AUDIO_MCLK_F
- &clkaudio CLKID_AUDIO_RESAMPLE_CTRL>;
+ &clkaudio CLKID_AUDIO_RESAMPLE_A>;
clock-names = "resample_pll", "resample_src", "resample_clk";
/*same with toddr_src
* TDMIN_A, 0
* LOOPBACK, 7
*/
resample_module = <4>;
- status = "okay";
- };
- aml_pwrdet: pwrdet {
- compatible = "amlogic, g12a-power-detect";
-
- interrupts = <GIC_SPI 155 IRQ_TYPE_EDGE_RISING>;
- interrupt-names = "pwrdet_irq";
-
- /* pwrdet source sel
- * 7: loopback;
- * 6: tdmin_lb;
- * 5: reserved;
- * 4: pdmin;
- * 3: spdifin;
- * 2: tdmin_c;
- * 1: tdmin_b;
- * 0: tdmin_a;
- */
- pwrdet_src = <4>;
-
- hi_th = <0x70000>;
- lo_th = <0x16000>;
-
status = "disabled";
};
}; /* end of audiobus */
};
};
- /* GPIOH_4 */
- /*
- * spdifout: spdifout {
- * mux {
- * groups = "spdif_out_h";
- * function = "spdif_out";
- * };
- *};
- */
-
pdmin: pdmin {
- mux { /* gpioa_5, gpioa_6, gpioa_7, gpioa_8, gpioa_9*/
+ mux { /* GPIOA_5, GPIOA_6, GPIOA_8, GPIOA_9, GPIOA_7 */
groups = "pdm_din0_a",
/*"pdm_din1_a",*/
"pdm_din2_a",
}; /* end of pinctrl_periphs */
&pinctrl_aobus {
spdifout: spdifout {
- mux { /* gpiao_10 */
+ mux { /* GPIOAO_10 */
groups = "spdif_out_ao";
function = "spdif_out_ao";
};
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/clock/amlogic,g12a-clkc.h>
-#include <dt-bindings/clock/amlogic,g12a-audio-clk.h>
+#include <dt-bindings/clock/amlogic,sm1-audio-clk.h>
#include <dt-bindings/iio/adc/amlogic-saradc.h>
#include <dt-bindings/gpio/meson-g12a-gpio.h>
#include <dt-bindings/pwm/pwm.h>
memory-region = <&ion_cma_reserved>;
};/* end of ion_dev*/
- audiobus: audiobus@0xff642000 {
+ audiobus: audiobus@0xFF660000 {
compatible = "amlogic, audio-controller", "simple-bus";
- reg = <0x0 0xff642000 0x0 0x2000>;
+ reg = <0x0 0xFF660000 0x0 0x4000>;
#address-cells = <2>;
#size-cells = <2>;
- ranges = <0x0 0x0 0x0 0xff642000 0x0 0x2000>;
+ ranges = <0x0 0x0 0x0 0xFF660000 0x0 0x4000>;
clkaudio: audio_clocks {
- compatible = "amlogic, g12a-audio-clocks";
+ compatible = "amlogic, sm1-audio-clocks";
#clock-cells = <1>;
reg = <0x0 0x0 0x0 0xb0>;
};
ddr_manager {
- compatible = "amlogic, g12a-audio-ddr-manager";
+ compatible = "amlogic, sm1-audio-ddr-manager";
interrupts = <
GIC_SPI 148 IRQ_TYPE_EDGE_RISING
GIC_SPI 149 IRQ_TYPE_EDGE_RISING
GIC_SPI 150 IRQ_TYPE_EDGE_RISING
+ GIC_SPI 49 IRQ_TYPE_EDGE_RISING
GIC_SPI 152 IRQ_TYPE_EDGE_RISING
GIC_SPI 153 IRQ_TYPE_EDGE_RISING
GIC_SPI 154 IRQ_TYPE_EDGE_RISING
+ GIC_SPI 50 IRQ_TYPE_EDGE_RISING
>;
interrupt-names =
"toddr_a", "toddr_b", "toddr_c",
- "frddr_a", "frddr_b", "frddr_c";
+ "toddr_d",
+ "frddr_a", "frddr_b", "frddr_c",
+ "frddr_d";
};
};/* end of audiobus*/
#size-cells=<2>;
ranges;
pdm_bus {
- reg = <0x0 0xFF640000 0x0 0x2000>;
+ reg = <0x0 0xFF661000 0x0 0x400>;
};
audiobus_base {
- reg = <0x0 0xFF642000 0x0 0x2000>;
+ reg = <0x0 0xFF660000 0x0 0x1000>;
};
audiolocker_base {
- reg = <0x0 0xFF64A000 0x0 0x2000>;
+ reg = <0x0 0xFF661400 0x0 0x400>;
};
eqdrc_base {
- reg = <0x0 0xFF642800 0x0 0x1800>;
+ reg = <0x0 0xFF662000 0x0 0x1000>;
};
reset_base {
reg = <0x0 0xFFD01000 0x0 0x1000>;
};
+ vad_base {
+ reg = <0x0 0xFF661800 0x0 0x400>;
+ };
+ earcrx_cdmc_base {
+ reg = <0x0 0xFF663800 0x0 0x30>;
+ };
+ earcrx_dmac_base {
+ reg = <0x0 0xFF663C00 0x0 0x20>;
+ };
+ earcrx_top_base {
+ reg = <0x0 0xFF663E00 0x0 0x10>;
+ };
};
vddcpu0: pwmao_d-regulator {
//continuous-clock;
//bitclock-inversion;
//frame-inversion;
- //bitclock-master = <&tdmacodec>;
- //frame-master = <&tdmacodec>;
+ /* master mode */
+ bitclock-master = <&tdma>;
+ frame-master = <&tdma>;
+ /* slave mode */
+ /*
+ * bitclock-master = <&tdmacodec>;
+ * frame-master = <&tdmacodec>;
+ */
tdmacpu: cpu {
- sound-dai = <&aml_tdma>;
+ sound-dai = <&tdma>;
dai-tdm-slot-tx-mask =
<1 1 1 1 1 1 1 1>;
dai-tdm-slot-rx-mask =
//continuous-clock;
//bitclock-inversion;
//frame-inversion;
- bitclock-master = <&aml_tdmb>;
- frame-master = <&aml_tdmb>;
+ /* master mode */
+ bitclock-master = <&tdmb>;
+ frame-master = <&tdmb>;
+ /* slave mode */
+ //bitclock-master = <&tdmbcodec>;
+ //frame-master = <&tdmbcodec>;
cpu {
- sound-dai = <&aml_tdmb>;
+ sound-dai = <&tdmb>;
dai-tdm-slot-tx-mask = <1 1>;
dai-tdm-slot-rx-mask = <1 1>;
dai-tdm-slot-num = <2>;
dai-tdm-slot-width = <32>;
system-clock-frequency = <12288000>;
};
- codec {
+ tdmbcodec: codec {
sound-dai = <&dummy_codec &dummy_codec>;
};
};
continuous-clock;
//bitclock-inversion;
//frame-inversion;
- bitclock-master = <&aml_tdmc>;
- frame-master = <&aml_tdmc>;
+ /* master mode */
+ bitclock-master = <&tdmc>;
+ frame-master = <&tdmc>;
+ /* slave mode */
+ //bitclock-master = <&tdmccodec>;
+ //frame-master = <&tdmccodec>;
cpu {
- sound-dai = <&aml_tdmc>;
+ sound-dai = <&tdmc>;
dai-tdm-slot-tx-mask = <1 1>;
dai-tdm-slot-rx-mask = <1 1>;
dai-tdm-slot-num = <2>;
dai-tdm-slot-width = <32>;
system-clock-frequency = <12288000>;
};
- codec {
+ tdmccodec: codec {
sound-dai = <&dummy_codec &dummy_codec>;
};
};
aml-audio-card,dai-link@3 {
mclk-fs = <64>;
cpu {
- sound-dai = <&aml_pdm>;
+ sound-dai = <&pdm>;
};
codec {
sound-dai = <&pdm_codec>;
aml-audio-card,dai-link@4 {
mclk-fs = <128>;
cpu {
- sound-dai = <&aml_spdif>;
+ sound-dai = <&spdifa>;
system-clock-frequency = <6144000>;
};
codec {
aml-audio-card,dai-link@5 {
mclk-fs = <128>;
cpu {
- sound-dai = <&aml_spdif_b>;
+ sound-dai = <&spdifb>;
system-clock-frequency = <6144000>;
};
codec {
};
&audiobus {
- aml_tdma: tdma {
- compatible = "amlogic, g12a-snd-tdma";
+ tdma: tdm@0 {
+ compatible = "amlogic, sm1-snd-tdma";
#sound-dai-cells = <0>;
dai-tdm-lane-slot-mask-in = <1 0>;
dai-tdm-lane-slot-mask-out = <0 1>;
clock-names = "mclk", "clk_srcpll";
pinctrl-names = "tdm_pins";
pinctrl-0 = <&tdmout_a &tdmin_a>;
+
+ status = "okay";
};
- aml_tdmb: tdmb {
- compatible = "amlogic, g12a-snd-tdmb";
+ tdmb: tdm@1 {
+ compatible = "amlogic, sm1-snd-tdmb";
#sound-dai-cells = <0>;
dai-tdm-lane-slot-mask-in = <1 1 1 1>;
dai-tdm-clk-sel = <1>;
pinctrl-0 = <&tdmb_mclk /*&tdmout_b &tdmin_b*/>;
};
- aml_tdmc: tdmc {
- compatible = "amlogic, g12a-snd-tdmc";
+ tdmc: tdm@2 {
+ compatible = "amlogic, sm1-snd-tdmc";
#sound-dai-cells = <0>;
dai-tdm-lane-slot-mask-in = <0 1 0 0>;
#dai-tdm-lane-slot-mask-out = <1 0 1 1>;
clock-names = "mclk", "clk_srcpll";
pinctrl-names = "tdm_pins";
pinctrl-0 = <&tdmc_mclk &tdmout_c &tdmin_c>;
+
+ status = "okay";
};
- aml_spdif: spdif {
- compatible = "amlogic, g12a-snd-spdif-a";
+ spdifa: spdif@0 {
+ compatible = "amlogic, sm1-snd-spdif-a";
#sound-dai-cells = <0>;
clocks = <&clkc CLKID_MPLL0
&clkc CLKID_FCLK_DIV4
+ &clkaudio CLKID_AUDIO_GATE_SPDIFIN
+ &clkaudio CLKID_AUDIO_GATE_SPDIFOUT_A
&clkaudio CLKID_AUDIO_SPDIFIN
- &clkaudio CLKID_AUDIO_SPDIFOUT
- &clkaudio CLKID_AUDIO_SPDIFIN_CTRL
- &clkaudio CLKID_AUDIO_SPDIFOUT_CTRL>;
+ &clkaudio CLKID_AUDIO_SPDIFOUT_A>;
clock-names = "sysclk", "fixed_clk", "gate_spdifin",
"gate_spdifout", "clk_spdifin", "clk_spdifout";
interrupts =
- <GIC_SPI 87 IRQ_TYPE_EDGE_RISING>;
+ <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
interrupt-names = "irq_spdifin";
pinctrl-names = "spdif_pins";
pinctrl-0 = <&spdifout &spdifin>;
+
status = "okay";
};
- aml_spdif_b: spdif_b {
- compatible = "amlogic, g12a-snd-spdif-b";
+ spdifb: spdif@1 {
+ compatible = "amlogic, sm1-snd-spdif-b";
#sound-dai-cells = <0>;
clocks = <&clkc CLKID_MPLL0 /*CLKID_HIFI_PLL*/
- &clkaudio CLKID_AUDIO_SPDIFOUTB
- &clkaudio CLKID_AUDIO_SPDIFOUTB_CTRL>;
+ &clkaudio CLKID_AUDIO_GATE_SPDIFOUT_B
+ &clkaudio CLKID_AUDIO_SPDIFOUT_B>;
clock-names = "sysclk",
"gate_spdifout", "clk_spdifout";
- pinctrl-names = "spdif_pins";
- pinctrl-0 = <&spdifout_b>;
+
status = "okay";
};
- aml_pdm: pdm {
- compatible = "amlogic, g12a-snd-pdm";
+ pdm: pdm {
+ compatible = "amlogic, sm1-snd-pdm";
#sound-dai-cells = <0>;
- clocks = <&clkaudio CLKID_AUDIO_PDM
+
+ clocks = <&clkaudio CLKID_AUDIO_GATE_PDM
&clkc CLKID_FCLK_DIV3
&clkc CLKID_MPLL3
&clkaudio CLKID_AUDIO_PDMIN0
"dclk_srcpll",
"pdm_dclk",
"pdm_sysclk";
+
pinctrl-names = "pdm_pins";
pinctrl-0 = <&pdmin>;
- filter_mode = <1>; /* mode 0~4, defalut:1 */
- status = "okay";
- };
- aml_pwrdet: pwrdet {
- compatible = "amlogic, g12a-power-detect";
- interrupts = <GIC_SPI 155 IRQ_TYPE_EDGE_RISING>;
- interrupt-names = "pwrdet_irq";
+ /* mode 0~4, defalut:1 */
+ filter_mode = <1>;
- /* pwrdet source sel
- * 7: loopback;
- * 6: tdmin_lb;
- * 5: reserved;
- * 4: pdmin;
- * 3: spdifin;
- * 2: tdmin_c;
- * 1: tdmin_b;
- * 0: tdmin_a;
- */
- pwrdet_src = <4>;
-
- hi_th = <0x70000>;
- lo_th = <0x16000>;
-
- status = "disabled";
+ status = "okay";
};
}; /* end of audiobus */
tdmout_index = <1>;
status = "okay";
};
- audio_effect:eqdrc{
- /*eq_enable = <1>;*/
- /*drc_enable = <1>;*/
- /*
- * 0:tdmout_a
- * 1:tdmout_b
- * 2:tdmout_c
- * 3:spdifout
- * 4:spdifout_b
- */
- eqdrc_module = <1>;
- /* max 0xf, each bit for one lane, usually one lane */
- lane_mask = <0x1>;
- /* max 0xff, each bit for one channel */
- channel_mask = <0x3>;
- };
+
auge_sound {
compatible = "amlogic, g12a-sound-card";
aml-audio-card,name = "AML-AUGESOUND";
- aml-audio-card,loopback = <&aml_loopback>;
- aml-audio-card,aux-devs = <&amlogic_codec>;
/*avout mute gpio*/
avout_mute-gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>;
- /*for audio effect ,eqdrc */
- aml-audio-card,effect = <&audio_effect>;
aml-audio-card,dai-link@0 {
format = "dsp_a";
//continuous-clock;
//bitclock-inversion;
//frame-inversion;
- //bitclock-master = <&tdmacodec>;
- //frame-master = <&tdmacodec>;
- /* suffix-name, sync with android audio hal
- * what's the dai link used for
+ /* master mode */
+ bitclock-master = <&tdma>;
+ frame-master = <&tdma>;
+ /* slave mode */
+ /*
+ * bitclock-master = <&tdmacodec>;
+ * frame-master = <&tdmacodec>;
*/
suffix-name = "alsaPORT-pcm";
tdmacpu: cpu {
- sound-dai = <&aml_tdma>;
+ sound-dai = <&tdma>;
dai-tdm-slot-tx-mask =
<1 1 1 1 1 1 1 1>;
dai-tdm-slot-rx-mask =
//continuous-clock;
//bitclock-inversion;
//frame-inversion;
- bitclock-master = <&aml_tdmb>;
- frame-master = <&aml_tdmb>;
+ /* master mode */
+ bitclock-master = <&tdmb>;
+ frame-master = <&tdmb>;
+ /* slave mode */
//bitclock-master = <&tdmbcodec>;
//frame-master = <&tdmbcodec>;
/* suffix-name, sync with android audio hal
*/
suffix-name = "alsaPORT-i2s";
cpu {
- sound-dai = <&aml_tdmb>;
+ sound-dai = <&tdmb>;
dai-tdm-slot-tx-mask = <1 1>;
dai-tdm-slot-rx-mask = <1 1>;
dai-tdm-slot-num = <2>;
//continuous-clock;
//bitclock-inversion;
//frame-inversion;
- bitclock-master = <&aml_tdmc>;
- frame-master = <&aml_tdmc>;
- /* suffix-name, sync with android audio hal
- * what's the dai link used for
- */
+ /* master mode */
+ bitclock-master = <&tdmc>;
+ frame-master = <&tdmc>;
+ /* slave mode */
+ //bitclock-master = <&tdmccodec>;
+ //frame-master = <&tdmccodec>;
+ /* suffix-name, sync with android audio hal used for */
//suffix-name = "alsaPORT-tdm";
cpu {
- sound-dai = <&aml_tdmc>;
+ sound-dai = <&tdmc>;
dai-tdm-slot-tx-mask = <1 1>;
dai-tdm-slot-rx-mask = <1 1>;
dai-tdm-slot-num = <2>;
dai-tdm-slot-width = <32>;
system-clock-frequency = <12288000>;
};
- codec {
- sound-dai = <&tlv320adc3101_32 &dummy_codec>;
+ tdmccodec: codec {
+ sound-dai = <&dummy_codec>;
};
};
*/
suffix-name = "alsaPORT-pdm";
cpu {
- sound-dai = <&aml_pdm>;
+ sound-dai = <&pdm>;
};
codec {
sound-dai = <&pdm_codec>;
aml-audio-card,dai-link@4 {
mclk-fs = <128>;
- continuous-clock;
- /* suffix-name, sync with android audio hal
- * what's the dai link used for
- */
- suffix-name = "alsaPORT-spdifb2hdmi";
+ /* suffix-name, sync with android audio hal used for */
+ suffix-name = "alsaPORT-spdif";
cpu {
- sound-dai = <&aml_spdif>;
+ sound-dai = <&spdifa>;
system-clock-frequency = <6144000>;
};
codec {
sound-dai = <&dummy_codec>;
};
};
- /* spdif_b to hdmi, only playback */
+
aml-audio-card,dai-link@5 {
mclk-fs = <128>;
continuous-clock;
/* suffix-name, sync with android audio hal
* what's the dai link used for
*/
- suffix-name = "alsaPORT-spdif";
+ suffix-name = "alsaPORT-spdifb";
cpu {
- sound-dai = <&aml_spdif_b>;
+ sound-dai = <&spdifb>;
system-clock-frequency = <6144000>;
};
codec {
sound-dai = <&dummy_codec>;
};
};
- /*
- * dai link for i2s to hdmix,
- * Notice to select a tdm lane not used by hw
- */
- /*
- * aml-audio-card,dai-link@6 {
- * format = "i2s";
- * mclk-fs = <256>;
- * //continuous-clock;
- * //bitclock-inversion;
- * //frame-inversion;
- * bitclock-master = <&aml_i2s2hdmi>;
- * frame-master = <&aml_i2s2hdmi>;
- * suffix-name = "alsaPORT-i2s2hdmi";
- * cpu {
- * sound-dai = <&aml_i2s2hdmi>;
- * dai-tdm-slot-tx-mask = <1 1>;
- * dai-tdm-slot-num = <2>;
- * dai-tdm-slot-width = <32>;
- * system-clock-frequency = <12288000>;
- * };
- * codec {
- * sound-dai = <&dummy_codec>;
- * };
- * };
- */
+ aml-audio-card,dai-link@6 {
+ mclk-fs = <256>;
+ suffix-name = "alsaPORT-earc";
+ cpu {
+ sound-dai = <&earc>;
+ system-clock-frequency = <12288000>;
+ };
+ codec {
+ sound-dai = <&dummy_codec>;
+ };
+ };
};
audiolocker: locker {
compatible = "amlogic, audiolocker";
interrupt-names = "irq";
frequency = <49000000>; /* pll */
dividor = <49>; /* locker's parent */
- status = "okay";
+ status = "disabled";
};
/* Audio Related end */
reset_pin = <&gpio GPIOA_5 0>;
};
- tlv320adc3101_32: tlv320adc3101_32@32 {
- compatible = "ti,tlv320adc3101";
- #sound-dai-cells = <0>;
- reg = <0x19>;
- differential_pair = <1>;
- status = "okay";
- };
-
- tas5707_36: tas5707_36@36 {
- compatible = "ti,tas5707";
- #sound-dai-cells = <0>;
- reg = <0x1b>;
- status = "disabled";
- reset_pin = <&gpio GPIOA_5 0>;
- };
-
bl_extern_i2c {
compatible = "bl_extern, i2c";
dev_name = "lp8556";
};
&audiobus {
- aml_tdma: tdma {
- compatible = "amlogic, g12a-snd-tdma";
+ tdma: tdm@0 {
+ compatible = "amlogic, sm1-snd-tdma";
#sound-dai-cells = <0>;
dai-tdm-lane-slot-mask-in = <0 1>;
dai-tdm-oe-lane-slot-mask-out = <1 0>;
clock-names = "mclk", "clk_srcpll";
pinctrl-names = "tdm_pins";
pinctrl-0 = <&tdmout_a &tdmin_a>;
+
+ status = "okay";
};
- aml_tdmb: tdmb {
- compatible = "amlogic, g12a-snd-tdmb";
+ tdmb: tdm@1 {
+ compatible = "amlogic, sm1-snd-tdmb";
#sound-dai-cells = <0>;
dai-tdm-lane-slot-mask-in = <0 1 0 0>;
dai-tdm-lane-slot-mask-out = <1 0 0 0>;
clock-names = "mclk", "clk_srcpll", "samesource_sysclk";
pinctrl-names = "tdm_pins";
pinctrl-0 = <&tdmb_mclk &tdmout_b &tdmin_b>;
+
+ mclk_pad = <0>; /* 0: mclk_0; 1: mclk_1 */
+
/*
* 0: tdmout_a;
* 1: tdmout_b;
* 4: spdifout_b;
*/
samesource_sel = <3>;
+
+ status = "okay";
};
- aml_tdmc: tdmc {
- compatible = "amlogic, g12a-snd-tdmc";
+ tdmc: tdm@2 {
+ compatible = "amlogic, sm1-snd-tdmc";
#sound-dai-cells = <0>;
dai-tdm-lane-slot-mask-in = <1 0 0 0>;
#dai-tdm-lane-slot-mask-out = <1 0 1 1>;
#dai-tdm-lane-oe-slot-mask-in = <0 0 0 0>;
#dai-tdm-lane-oe-slot-mask-out = <1 0 0 0>;
dai-tdm-clk-sel = <2>;
+
clocks = <&clkaudio CLKID_AUDIO_MCLK_C
&clkc CLKID_MPLL2>;
clock-names = "mclk", "clk_srcpll";
pinctrl-names = "tdm_pins";
pinctrl-0 = <&tdmc_mclk &tdmout_c &tdmin_c>;
- };
-
- /* copy a useless tdm to output for hdmi, no pinmux */
- aml_i2s2hdmi: i2s2hdmi {
- compatible = "amlogic, g12a-snd-tdmc";
- #sound-dai-cells = <0>;
- dai-tdm-lane-slot-mask-out = <1 1 1 1>;
- dai-tdm-clk-sel = <2>;
- clocks = <&clkaudio CLKID_AUDIO_MCLK_C
- &clkc CLKID_MPLL2>;
- clock-names = "mclk", "clk_srcpll";
+ mclk_pad = <0>; /* 0: mclk_0; 1: mclk_1 */
- i2s2hdmi = <1>;
-
- status = "disabled";
+ status = "okay";
};
- aml_spdif: spdif {
- compatible = "amlogic, g12a-snd-spdif-a";
+ spdifa: spdif@0 {
+ compatible = "amlogic, sm1-snd-spdif-a";
#sound-dai-cells = <0>;
clocks = <&clkc CLKID_MPLL0
&clkc CLKID_FCLK_DIV4
+ &clkaudio CLKID_AUDIO_GATE_SPDIFIN
+ &clkaudio CLKID_AUDIO_GATE_SPDIFOUT_A
&clkaudio CLKID_AUDIO_SPDIFIN
- &clkaudio CLKID_AUDIO_SPDIFOUT
- &clkaudio CLKID_AUDIO_SPDIFIN_CTRL
- &clkaudio CLKID_AUDIO_SPDIFOUT_CTRL>;
+ &clkaudio CLKID_AUDIO_SPDIFOUT_A>;
clock-names = "sysclk", "fixed_clk", "gate_spdifin",
"gate_spdifout", "clk_spdifin", "clk_spdifout";
interrupts =
interrupt-names = "irq_spdifin";
pinctrl-names = "spdif_pins";
- pinctrl-0 = <&spdifout &spdifin>;
+ pinctrl-0 = <&spdifout /* &spdifin */>;
+
status = "okay";
};
- aml_spdif_b: spdif_b {
- compatible = "amlogic, g12a-snd-spdif-b";
+ spdifb: spdif@1 {
+ compatible = "amlogic, sm1-snd-spdif-b";
#sound-dai-cells = <0>;
clocks = <&clkc CLKID_MPLL0 /*CLKID_HIFI_PLL*/
- &clkaudio CLKID_AUDIO_SPDIFOUTB
- &clkaudio CLKID_AUDIO_SPDIFOUTB_CTRL>;
+ &clkaudio CLKID_AUDIO_GATE_SPDIFOUT_B
+ &clkaudio CLKID_AUDIO_SPDIFOUT_B>;
clock-names = "sysclk",
"gate_spdifout", "clk_spdifout";
+
status = "okay";
};
- aml_pdm: pdm {
- compatible = "amlogic, g12a-snd-pdm";
+ pdm: pdm {
+ compatible = "amlogic, sm1-snd-pdm";
#sound-dai-cells = <0>;
- clocks = <&clkaudio CLKID_AUDIO_PDM
+
+ clocks = <&clkaudio CLKID_AUDIO_GATE_PDM
&clkc CLKID_FCLK_DIV3
&clkc CLKID_MPLL3
&clkaudio CLKID_AUDIO_PDMIN0
"dclk_srcpll",
"pdm_dclk",
"pdm_sysclk";
+
pinctrl-names = "pdm_pins";
pinctrl-0 = <&pdmin>;
- filter_mode = <1>; /* mode 0~4, defalut:1 */
+
+ /* mode 0~4, defalut:1 */
+ filter_mode = <1>;
+
status = "okay";
};
- aml_loopback: loopback {
- compatible = "amlogic, snd-loopback";
- /*
- * 0: out rate = in data rate;
- * 1: out rate = loopback data rate;
- */
- lb_mode = <0>;
-
- /* datain src
- * 0: tdmin_a;
- * 1: tdmin_b;
- * 2: tdmin_c;
- * 3: spdifin;
- * 4: pdmin;
- */
- datain_src = <4>;
- datain_chnum = <8>;
- datain_chmask = <0x3f>;
-
- /* tdmin_lb src
- * 0: tdmoutA
- * 1: tdmoutB
- * 2: tdmoutC
- * 3: PAD_tdminA
- * 4: PAD_tdminB
- * 5: PAD_tdminC
- */
- datalb_src = <2>;
- datalb_chnum = <8>;
- datalb_chmask = <0x3>;
+ earc:earc {
+ compatible = "amlogic, sm1-snd-earc";
+ #sound-dai-cells = <0>;
+
+ clocks = <&clkaudio CLKID_AUDIO_GATE_EARCRX
+ &clkaudio CLKID_EARCRX_CMDC
+ &clkaudio CLKID_EARCRX_DMAC
+ &clkc CLKID_FCLK_DIV5
+ &clkc CLKID_FCLK_DIV3
+ >;
+ clock-names = "rx_gate",
+ "rx_cmdc",
+ "rx_dmac",
+ "rx_cmdc_srcpll",
+ "rx_dmac_srcpll";
+
+ interrupts = <
+ GIC_SPI 88 IRQ_TYPE_EDGE_RISING
+ GIC_SPI 87 IRQ_TYPE_EDGE_RISING
+ >;
+ interrupt-names = "rx_cmdc", "rx_dmac";
status = "okay";
};
- audioresample: resample {
- compatible = "amlogic, g12a-resample";
+ asrca: resample@0 {
+ compatible = "amlogic, sm1-resample";
clocks = <&clkc CLKID_MPLL3
&clkaudio CLKID_AUDIO_MCLK_F
- &clkaudio CLKID_AUDIO_RESAMPLE_CTRL>;
+ &clkaudio CLKID_AUDIO_RESAMPLE_A>;
clock-names = "resample_pll", "resample_src", "resample_clk";
/*same with toddr_src
* TDMIN_A, 0
* LOOPBACK, 7
*/
resample_module = <4>;
- status = "okay";
- };
- aml_pwrdet: pwrdet {
- compatible = "amlogic, g12a-power-detect";
-
- interrupts = <GIC_SPI 155 IRQ_TYPE_EDGE_RISING>;
- interrupt-names = "pwrdet_irq";
-
- /* pwrdet source sel
- * 7: loopback;
- * 6: tdmin_lb;
- * 5: reserved;
- * 4: pdmin;
- * 3: spdifin;
- * 2: tdmin_c;
- * 1: tdmin_b;
- * 0: tdmin_a;
- */
- pwrdet_src = <4>;
-
- hi_th = <0x70000>;
- lo_th = <0x16000>;
-
status = "disabled";
};
}; /* end of audiobus */
};
tdmout_c:tdmout_c {
- mux { /* GPIOA_12, GPIOA_13, GPIOA_8, GPIOA_7*/
+ mux { /* GPIOA_12, GPIOA_13 */
groups = "tdmc_sclk_a",
- "tdmc_fs_a",
- "tdmc_dout0_a"
- /*, "tdmc_dout2",
- * "tdmc_dout3"
+ "tdmc_fs_a"
+ /*, "tdmc_dout0_a"
+ *, "tdmc_dout2"
+ *, "tdmc_dout3"
*/;
function = "tdmc_out";
};
};
};
- /* GPIOH_4 */
- /*
- * spdifout: spdifout {
- * mux {
- * groups = "spdif_out_h";
- * function = "spdif_out";
- * };
- *};
- */
-
pdmin: pdmin {
- mux { /* gpioa_5, gpioa_6, gpioa_7, gpioa_8, gpioa_9*/
+ mux { /* GPIOA_5, GPIOA_6, GPIOA_8, GPIOA_9, GPIOA_7 */
groups = "pdm_din0_a",
- /*"pdm_din1_a",*/
- "pdm_din2_a",
- /*"pdm_din3_a",*/
- "pdm_dclk_a";
+ "pdm_din1_a",
+ "pdm_din2_a",
+ /*"pdm_din3_a",*/
+ "pdm_dclk_a";
function = "pdm";
};
};
}; /* end of pinctrl_periphs */
+
&pinctrl_aobus {
spdifout: spdifout {
- mux { /* gpiao_10 */
+ mux { /* GPIOAO_10 */
groups = "spdif_out_ao";
function = "spdif_out_ao";
};
tdmout_index = <1>;
status = "okay";
};
- audio_effect:eqdrc{
- /*eq_enable = <1>;*/
- /*drc_enable = <1>;*/
- /*
- * 0:tdmout_a
- * 1:tdmout_b
- * 2:tdmout_c
- * 3:spdifout
- * 4:spdifout_b
- */
- eqdrc_module = <1>;
- /* max 0xf, each bit for one lane, usually one lane */
- lane_mask = <0x1>;
- /* max 0xff, each bit for one channel */
- channel_mask = <0x3>;
- };
+
auge_sound {
compatible = "amlogic, g12a-sound-card";
aml-audio-card,name = "AML-AUGESOUND";
- aml-audio-card,loopback = <&aml_loopback>;
- aml-audio-card,aux-devs = <&amlogic_codec>;
/*avout mute gpio*/
avout_mute-gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>;
- /*for audio effect ,eqdrc */
- aml-audio-card,effect = <&audio_effect>;
aml-audio-card,dai-link@0 {
format = "dsp_a";
//continuous-clock;
//bitclock-inversion;
//frame-inversion;
- //bitclock-master = <&tdmacodec>;
- //frame-master = <&tdmacodec>;
- /* suffix-name, sync with android audio hal
- * what's the dai link used for
+ /* master mode */
+ bitclock-master = <&tdma>;
+ frame-master = <&tdma>;
+ /* slave mode */
+ /*
+ * bitclock-master = <&tdmacodec>;
+ * frame-master = <&tdmacodec>;
*/
suffix-name = "alsaPORT-pcm";
tdmacpu: cpu {
- sound-dai = <&aml_tdma>;
+ sound-dai = <&tdma>;
dai-tdm-slot-tx-mask =
<1 1 1 1 1 1 1 1>;
dai-tdm-slot-rx-mask =
//continuous-clock;
//bitclock-inversion;
//frame-inversion;
- bitclock-master = <&aml_tdmb>;
- frame-master = <&aml_tdmb>;
+ /* master mode */
+ bitclock-master = <&tdmb>;
+ frame-master = <&tdmb>;
+ /* slave mode */
//bitclock-master = <&tdmbcodec>;
//frame-master = <&tdmbcodec>;
/* suffix-name, sync with android audio hal
*/
suffix-name = "alsaPORT-i2s";
cpu {
- sound-dai = <&aml_tdmb>;
+ sound-dai = <&tdmb>;
dai-tdm-slot-tx-mask = <1 1>;
dai-tdm-slot-rx-mask = <1 1>;
dai-tdm-slot-num = <2>;
//continuous-clock;
//bitclock-inversion;
//frame-inversion;
- bitclock-master = <&aml_tdmc>;
- frame-master = <&aml_tdmc>;
- /* suffix-name, sync with android audio hal
- * what's the dai link used for
- */
+ /* master mode */
+ bitclock-master = <&tdmc>;
+ frame-master = <&tdmc>;
+ /* slave mode */
+ //bitclock-master = <&tdmccodec>;
+ //frame-master = <&tdmccodec>;
+ /* suffix-name, sync with android audio hal used for */
//suffix-name = "alsaPORT-tdm";
cpu {
- sound-dai = <&aml_tdmc>;
+ sound-dai = <&tdmc>;
dai-tdm-slot-tx-mask = <1 1>;
dai-tdm-slot-rx-mask = <1 1>;
dai-tdm-slot-num = <2>;
dai-tdm-slot-width = <32>;
system-clock-frequency = <12288000>;
};
- codec {
- sound-dai = <&tlv320adc3101_32 &dummy_codec>;
+ tdmccodec: codec {
+ sound-dai = <&dummy_codec>;
};
};
*/
suffix-name = "alsaPORT-pdm";
cpu {
- sound-dai = <&aml_pdm>;
+ sound-dai = <&pdm>;
};
codec {
sound-dai = <&pdm_codec>;
aml-audio-card,dai-link@4 {
mclk-fs = <128>;
- continuous-clock;
- /* suffix-name, sync with android audio hal
- * what's the dai link used for
- */
- suffix-name = "alsaPORT-spdifb2hdmi";
+ /* suffix-name, sync with android audio hal used for */
+ suffix-name = "alsaPORT-spdif";
cpu {
- sound-dai = <&aml_spdif>;
+ sound-dai = <&spdifa>;
system-clock-frequency = <6144000>;
};
codec {
sound-dai = <&dummy_codec>;
};
};
- /* spdif_b to hdmi, only playback */
+
aml-audio-card,dai-link@5 {
mclk-fs = <128>;
continuous-clock;
/* suffix-name, sync with android audio hal
* what's the dai link used for
*/
- suffix-name = "alsaPORT-spdif";
+ suffix-name = "alsaPORT-spdifb";
cpu {
- sound-dai = <&aml_spdif_b>;
+ sound-dai = <&spdifb>;
system-clock-frequency = <6144000>;
};
codec {
sound-dai = <&dummy_codec>;
};
};
- /*
- * dai link for i2s to hdmix,
- * Notice to select a tdm lane not used by hw
- */
- /*
- * aml-audio-card,dai-link@6 {
- * format = "i2s";
- * mclk-fs = <256>;
- * //continuous-clock;
- * //bitclock-inversion;
- * //frame-inversion;
- * bitclock-master = <&aml_i2s2hdmi>;
- * frame-master = <&aml_i2s2hdmi>;
- * suffix-name = "alsaPORT-i2s2hdmi";
- * cpu {
- * sound-dai = <&aml_i2s2hdmi>;
- * dai-tdm-slot-tx-mask = <1 1>;
- * dai-tdm-slot-num = <2>;
- * dai-tdm-slot-width = <32>;
- * system-clock-frequency = <12288000>;
- * };
- * codec {
- * sound-dai = <&dummy_codec>;
- * };
- * };
- */
+ aml-audio-card,dai-link@6 {
+ mclk-fs = <256>;
+ suffix-name = "alsaPORT-earc";
+ cpu {
+ sound-dai = <&earc>;
+ system-clock-frequency = <12288000>;
+ };
+ codec {
+ sound-dai = <&dummy_codec>;
+ };
+ };
};
audiolocker: locker {
compatible = "amlogic, audiolocker";
interrupt-names = "irq";
frequency = <49000000>; /* pll */
dividor = <49>; /* locker's parent */
- status = "okay";
+ status = "disabled";
};
/* Audio Related end */
reset_pin = <&gpio GPIOA_5 0>;
};
- tlv320adc3101_32: tlv320adc3101_32@32 {
- compatible = "ti,tlv320adc3101";
- #sound-dai-cells = <0>;
- reg = <0x19>;
- differential_pair = <1>;
- status = "okay";
- };
-
- tas5707_36: tas5707_36@36 {
- compatible = "ti,tas5707";
- #sound-dai-cells = <0>;
- reg = <0x1b>;
- status = "disabled";
- reset_pin = <&gpio GPIOA_5 0>;
- };
-
bl_extern_i2c {
compatible = "bl_extern, i2c";
dev_name = "lp8556";
};
&audiobus {
- aml_tdma: tdma {
- compatible = "amlogic, g12a-snd-tdma";
+ tdma: tdm@0 {
+ compatible = "amlogic, sm1-snd-tdma";
#sound-dai-cells = <0>;
dai-tdm-lane-slot-mask-in = <0 1>;
dai-tdm-oe-lane-slot-mask-out = <1 0>;
clock-names = "mclk", "clk_srcpll";
pinctrl-names = "tdm_pins";
pinctrl-0 = <&tdmout_a &tdmin_a>;
+
+ status = "okay";
};
- aml_tdmb: tdmb {
- compatible = "amlogic, g12a-snd-tdmb";
+ tdmb: tdm@1 {
+ compatible = "amlogic, sm1-snd-tdmb";
#sound-dai-cells = <0>;
dai-tdm-lane-slot-mask-in = <0 1 0 0>;
dai-tdm-lane-slot-mask-out = <1 0 0 0>;
clock-names = "mclk", "clk_srcpll", "samesource_sysclk";
pinctrl-names = "tdm_pins";
pinctrl-0 = <&tdmb_mclk &tdmout_b &tdmin_b>;
+
+ mclk_pad = <0>; /* 0: mclk_0; 1: mclk_1 */
+
/*
* 0: tdmout_a;
* 1: tdmout_b;
* 4: spdifout_b;
*/
samesource_sel = <3>;
+
+ status = "okay";
};
- aml_tdmc: tdmc {
- compatible = "amlogic, g12a-snd-tdmc";
+ tdmc: tdm@2 {
+ compatible = "amlogic, sm1-snd-tdmc";
#sound-dai-cells = <0>;
dai-tdm-lane-slot-mask-in = <1 0 0 0>;
#dai-tdm-lane-slot-mask-out = <1 0 1 1>;
#dai-tdm-lane-oe-slot-mask-in = <0 0 0 0>;
#dai-tdm-lane-oe-slot-mask-out = <1 0 0 0>;
dai-tdm-clk-sel = <2>;
+
clocks = <&clkaudio CLKID_AUDIO_MCLK_C
&clkc CLKID_MPLL2>;
clock-names = "mclk", "clk_srcpll";
pinctrl-names = "tdm_pins";
pinctrl-0 = <&tdmc_mclk &tdmout_c &tdmin_c>;
- };
-
- /* copy a useless tdm to output for hdmi, no pinmux */
- aml_i2s2hdmi: i2s2hdmi {
- compatible = "amlogic, g12a-snd-tdmc";
- #sound-dai-cells = <0>;
- dai-tdm-lane-slot-mask-out = <1 1 1 1>;
- dai-tdm-clk-sel = <2>;
- clocks = <&clkaudio CLKID_AUDIO_MCLK_C
- &clkc CLKID_MPLL2>;
- clock-names = "mclk", "clk_srcpll";
+ mclk_pad = <0>; /* 0: mclk_0; 1: mclk_1 */
- i2s2hdmi = <1>;
-
- status = "disabled";
+ status = "okay";
};
- aml_spdif: spdif {
- compatible = "amlogic, g12a-snd-spdif-a";
+ spdifa: spdif@0 {
+ compatible = "amlogic, sm1-snd-spdif-a";
#sound-dai-cells = <0>;
clocks = <&clkc CLKID_MPLL0
&clkc CLKID_FCLK_DIV4
+ &clkaudio CLKID_AUDIO_GATE_SPDIFIN
+ &clkaudio CLKID_AUDIO_GATE_SPDIFOUT_A
&clkaudio CLKID_AUDIO_SPDIFIN
- &clkaudio CLKID_AUDIO_SPDIFOUT
- &clkaudio CLKID_AUDIO_SPDIFIN_CTRL
- &clkaudio CLKID_AUDIO_SPDIFOUT_CTRL>;
+ &clkaudio CLKID_AUDIO_SPDIFOUT_A>;
clock-names = "sysclk", "fixed_clk", "gate_spdifin",
"gate_spdifout", "clk_spdifin", "clk_spdifout";
interrupts =
interrupt-names = "irq_spdifin";
pinctrl-names = "spdif_pins";
pinctrl-0 = <&spdifout &spdifin>;
+
status = "okay";
};
- aml_spdif_b: spdif_b {
- compatible = "amlogic, g12a-snd-spdif-b";
+ spdifb: spdif@1 {
+ compatible = "amlogic, sm1-snd-spdif-b";
#sound-dai-cells = <0>;
clocks = <&clkc CLKID_MPLL0 /*CLKID_HIFI_PLL*/
- &clkaudio CLKID_AUDIO_SPDIFOUTB
- &clkaudio CLKID_AUDIO_SPDIFOUTB_CTRL>;
+ &clkaudio CLKID_AUDIO_GATE_SPDIFOUT_B
+ &clkaudio CLKID_AUDIO_SPDIFOUT_B>;
clock-names = "sysclk",
"gate_spdifout", "clk_spdifout";
+
status = "okay";
};
- aml_pdm: pdm {
- compatible = "amlogic, g12a-snd-pdm";
+ pdm: pdm {
+ compatible = "amlogic, sm1-snd-pdm";
#sound-dai-cells = <0>;
- clocks = <&clkaudio CLKID_AUDIO_PDM
+
+ clocks = <&clkaudio CLKID_AUDIO_GATE_PDM
&clkc CLKID_FCLK_DIV3
&clkc CLKID_MPLL3
&clkaudio CLKID_AUDIO_PDMIN0
"dclk_srcpll",
"pdm_dclk",
"pdm_sysclk";
+
pinctrl-names = "pdm_pins";
pinctrl-0 = <&pdmin>;
- filter_mode = <1>; /* mode 0~4, defalut:1 */
+
+ /* mode 0~4, defalut:1 */
+ filter_mode = <1>;
+
status = "okay";
};
- aml_loopback: loopback {
- compatible = "amlogic, snd-loopback";
- /*
- * 0: out rate = in data rate;
- * 1: out rate = loopback data rate;
- */
- lb_mode = <0>;
-
- /* datain src
- * 0: tdmin_a;
- * 1: tdmin_b;
- * 2: tdmin_c;
- * 3: spdifin;
- * 4: pdmin;
- */
- datain_src = <4>;
- datain_chnum = <8>;
- datain_chmask = <0x3f>;
-
- /* tdmin_lb src
- * 0: tdmoutA
- * 1: tdmoutB
- * 2: tdmoutC
- * 3: PAD_tdminA
- * 4: PAD_tdminB
- * 5: PAD_tdminC
- */
- datalb_src = <2>;
- datalb_chnum = <8>;
- datalb_chmask = <0x3>;
+
+ earc:earc {
+ compatible = "amlogic, sm1-snd-earc";
+ #sound-dai-cells = <0>;
+
+ clocks = <&clkaudio CLKID_AUDIO_GATE_EARCRX
+ &clkaudio CLKID_EARCRX_CMDC
+ &clkaudio CLKID_EARCRX_DMAC
+ &clkc CLKID_FCLK_DIV5
+ &clkc CLKID_FCLK_DIV3
+ >;
+ clock-names = "rx_gate",
+ "rx_cmdc",
+ "rx_dmac",
+ "rx_cmdc_srcpll",
+ "rx_dmac_srcpll";
+
+ interrupts = <
+ GIC_SPI 88 IRQ_TYPE_EDGE_RISING
+ GIC_SPI 87 IRQ_TYPE_EDGE_RISING
+ >;
+ interrupt-names = "rx_cmdc", "rx_dmac";
status = "okay";
};
- audioresample: resample {
- compatible = "amlogic, g12a-resample";
+ asrca: resample@0 {
+ compatible = "amlogic, sm1-resample";
clocks = <&clkc CLKID_MPLL3
&clkaudio CLKID_AUDIO_MCLK_F
- &clkaudio CLKID_AUDIO_RESAMPLE_CTRL>;
+ &clkaudio CLKID_AUDIO_RESAMPLE_A>;
clock-names = "resample_pll", "resample_src", "resample_clk";
/*same with toddr_src
* TDMIN_A, 0
* LOOPBACK, 7
*/
resample_module = <4>;
- status = "okay";
- };
- aml_pwrdet: pwrdet {
- compatible = "amlogic, g12a-power-detect";
-
- interrupts = <GIC_SPI 155 IRQ_TYPE_EDGE_RISING>;
- interrupt-names = "pwrdet_irq";
-
- /* pwrdet source sel
- * 7: loopback;
- * 6: tdmin_lb;
- * 5: reserved;
- * 4: pdmin;
- * 3: spdifin;
- * 2: tdmin_c;
- * 1: tdmin_b;
- * 0: tdmin_a;
- */
- pwrdet_src = <4>;
-
- hi_th = <0x70000>;
- lo_th = <0x16000>;
-
status = "disabled";
};
}; /* end of audiobus */
};
};
- /* GPIOH_4 */
- /*
- * spdifout: spdifout {
- * mux {
- * groups = "spdif_out_h";
- * function = "spdif_out";
- * };
- *};
- */
-
pdmin: pdmin {
- mux { /* gpioa_5, gpioa_6, gpioa_7, gpioa_8, gpioa_9*/
+ mux { /* GPIOA_5, GPIOA_6, GPIOA_8, GPIOA_9, GPIOA_7 */
groups = "pdm_din0_a",
/*"pdm_din1_a",*/
"pdm_din2_a",
}; /* end of pinctrl_periphs */
&pinctrl_aobus {
spdifout: spdifout {
- mux { /* gpiao_10 */
+ mux { /* GPIOAO_10 */
groups = "spdif_out_ao";
function = "spdif_out_ao";
};
--- /dev/null
+/*
+ * include/dt-bindings/clock/amlogic,sm1-audio-clk.h
+ *
+ * Copyright (C) 2019 Amlogic, Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ */
+
+#ifndef __SM1_AUDIO_CLK_H__
+#define __SM1_AUDIO_CLK_H__
+
+/*
+ * CLKID audio index values
+ */
+/* Gate En0 */
+#define CLKID_AUDIO_GATE_DDR_ARB 0
+#define CLKID_AUDIO_GATE_PDM 1
+#define CLKID_AUDIO_GATE_TDMINA 2
+#define CLKID_AUDIO_GATE_TDMINB 3
+#define CLKID_AUDIO_GATE_TDMINC 4
+#define CLKID_AUDIO_GATE_TDMINLB 5
+#define CLKID_AUDIO_GATE_TDMOUTA 6
+#define CLKID_AUDIO_GATE_TDMOUTB 7
+#define CLKID_AUDIO_GATE_TDMOUTC 8
+#define CLKID_AUDIO_GATE_FRDDRA 9
+#define CLKID_AUDIO_GATE_FRDDRB 10
+#define CLKID_AUDIO_GATE_FRDDRC 11
+#define CLKID_AUDIO_GATE_TODDRA 12
+#define CLKID_AUDIO_GATE_TODDRB 13
+#define CLKID_AUDIO_GATE_TODDRC 14
+#define CLKID_AUDIO_GATE_LOOPBACKA 15
+#define CLKID_AUDIO_GATE_SPDIFIN 16
+#define CLKID_AUDIO_GATE_SPDIFOUT_A 17
+#define CLKID_AUDIO_GATE_RESAMPLEA 18
+#define CLKID_AUDIO_GATE_RESERVED0 19
+#define CLKID_AUDIO_GATE_TORAM 20
+#define CLKID_AUDIO_GATE_SPDIFOUT_B 21
+#define CLKID_AUDIO_GATE_EQDRC 22
+#define CLKID_AUDIO_GATE_RESERVED1 23
+#define CLKID_AUDIO_GATE_RESERVED2 24
+#define CLKID_AUDIO_GATE_RESERVED3 25
+#define CLKID_AUDIO_GATE_RESAMPLEB 26
+#define CLKID_AUDIO_GATE_TOVAD 27
+#define CLKID_AUDIO_GATE_AUDIOLOCKER 28
+#define CLKID_AUDIO_GATE_SPDIFIN_LB 29
+#define CLKID_AUDIO_GATE_RESERVED4 30
+#define CLKID_AUDIO_GATE_RESERVED5 31
+
+/* Gate En1 */
+#define CLKID_AUDIO_GATE_FRDDRD 32
+#define CLKID_AUDIO_GATE_TODDRD 33
+#define CLKID_AUDIO_GATE_LOOPBACKB 34
+#define CLKID_AUDIO_GATE_EARCRX 35
+
+#define CLKID_AUDIO_GATE_MAX 36
+
+#define MCLK_BASE CLKID_AUDIO_GATE_MAX
+#define CLKID_AUDIO_MCLK_A (MCLK_BASE + 0)
+#define CLKID_AUDIO_MCLK_B (MCLK_BASE + 1)
+#define CLKID_AUDIO_MCLK_C (MCLK_BASE + 2)
+#define CLKID_AUDIO_MCLK_D (MCLK_BASE + 3)
+#define CLKID_AUDIO_MCLK_E (MCLK_BASE + 4)
+#define CLKID_AUDIO_MCLK_F (MCLK_BASE + 5)
+
+#define CLKID_AUDIO_SPDIFIN (MCLK_BASE + 6)
+#define CLKID_AUDIO_SPDIFOUT_A (MCLK_BASE + 7)
+#define CLKID_AUDIO_RESAMPLE_A (MCLK_BASE + 8)
+#define CLKID_AUDIO_LOCKER_OUT (MCLK_BASE + 9)
+#define CLKID_AUDIO_LOCKER_IN (MCLK_BASE + 10)
+#define CLKID_AUDIO_PDMIN0 (MCLK_BASE + 11)
+#define CLKID_AUDIO_PDMIN1 (MCLK_BASE + 12)
+#define CLKID_AUDIO_SPDIFOUT_B (MCLK_BASE + 13)
+#define CLKID_AUDIO_RESAMPLE_B (MCLK_BASE + 14)
+#define CLKID_AUDIO_SPDIFIN_LB (MCLK_BASE + 15)
+#define CLKID_AUDIO_EQDRC (MCLK_BASE + 16)
+#define CLKID_AUDIO_VAD (MCLK_BASE + 17)
+#define CLKID_EARCTX_CMDC (MCLK_BASE + 18)
+#define CLKID_EARCTX_DMAC (MCLK_BASE + 19)
+#define CLKID_EARCRX_CMDC (MCLK_BASE + 20)
+#define CLKID_EARCRX_DMAC (MCLK_BASE + 21)
+
+#define NUM_AUDIO_CLKS (MCLK_BASE + 22)
+#endif /* __SM1_AUDIO_CLK_H__ */