arm64: meson: g12a: add audio devices
Subsystems (2)
Jerome Brunet
reviewercover arm64: meson: g12a: add audio devices
This patchset adds most the audio devices of the g12a SoCs.
Kevin, couple of things worth noting:
* This patch depends of the new audio clocks binding recently applied by Neil [0].
* You may get a warning about an undocumented compatible string. The related binding documentation has been merged through ASoC [1].
[0]: https://lkml.kernel.org/r/[email protected]
[1]: https://lkml.kernel.org/r/[email protected]
Jerome Brunet (7):
arm64: dts: meson: g12a: add audio clock controller
arm64: dts: meson: g12a: add audio memory arbitrer
arm64: dts: meson: g12a: add audio fifos
arm64: dts: meson: g12a: add tdm devices
arm64: dts: meson: g12a: add spdifouts
arm64: dts: meson: g12a: add pdm
arm64: dts: meson: g12a: add spdifin
arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 304 ++++++++++++++++++++ 1 file changed, 304 insertions(+)
Signature · 1 line
2.20.1
Jerome Brunet
reviewerPATCH 1/7 arm64: dts: meson: g12a: add audio clock controller
Add the controller dedicated to audio clocks found on the g12a SoC.
--- arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 37 +++++++++++++++++++++ 1 file changed, 37 insertions(+)
arch/arm64/boot/dts/amlogic/meson-g12a.dtsi +37 -0
@@ -7,6 +7,7 @@ #include <dt-bindings/clock/g12a-clkc.h> #include <dt-bindings/interrupt-controller/irq.h> #include <dt-bindings/interrupt-controller/arm-gic.h> +#include <dt-bindings/reset/amlogic,meson-g12a-reset.h> / { compatible = "amlogic,g12a";
@@ -202,6 +203,42 @@ }; }; }; + + audio: bus@42000 { + compatible = "simple-bus"; + reg = <0x0 0x42000 0x0 0x2000>; + #address-cells = <2>; + #size-cells = <2>; + ranges = <0x0 0x0 0x0 0x42000 0x0 0x2000>; + + clkc_audio: clock-controller@0 { + status = "disabled"; + compatible = "amlogic,g12a-audio-clkc"; + reg = <0x0 0x0 0x0 0xb4>; + #clock-cells = <1>; + + clocks = <&clkc CLKID_AUDIO>, + <&clkc CLKID_MPLL0>, + <&clkc CLKID_MPLL1>, + <&clkc CLKID_MPLL2>, + <&clkc CLKID_MPLL3>, + <&clkc CLKID_HIFI_PLL>, + <&clkc CLKID_FCLK_DIV3>, + <&clkc CLKID_FCLK_DIV4>, + <&clkc CLKID_GP0_PLL>; + clock-names = "pclk", + "mst_in0", + "mst_in1", + "mst_in2", + "mst_in3", + "mst_in4", + "mst_in5", + "mst_in6", + "mst_in7"; + + resets = <&reset RESET_AUDIO>; + }; + }; }; aobus: bus@ff800000 {
Signature · 1 line
2.20.1
Jerome Brunet
reviewerPATCH 2/7 arm64: dts: meson: g12a: add audio memory arbitrer
In reply to Jerome BrunetAdd the DDR memory arbitrer dedicated to audio subsystem of the g12a
--- arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+)
arch/arm64/boot/dts/amlogic/meson-g12a.dtsi +9 -0
@@ -4,6 +4,7 @@ */ #include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/clock/axg-audio-clkc.h> #include <dt-bindings/clock/g12a-clkc.h> #include <dt-bindings/interrupt-controller/irq.h> #include <dt-bindings/interrupt-controller/arm-gic.h>
@@ -238,6 +239,14 @@ resets = <&reset RESET_AUDIO>; }; + + arb: reset-controller@280 { + status = "disabled"; + compatible = "amlogic,meson-axg-audio-arb"; + reg = <0x0 0x280 0x0 0x4>; + #reset-cells = <1>; + clocks = <&clkc_audio AUD_CLKID_DDR_ARB>; + }; }; };
Signature · 1 line
2.20.1
Jerome Brunet
reviewerPATCH 3/7 arm64: dts: meson: g12a: add audio fifos
In reply to Jerome BrunetAdd the capture and playback audio fifos (DMA) of the g12a SoCs.
--- arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 73 +++++++++++++++++++++ 1 file changed, 73 insertions(+)
arch/arm64/boot/dts/amlogic/meson-g12a.dtsi +73 -0
@@ -8,6 +8,7 @@ #include <dt-bindings/clock/g12a-clkc.h> #include <dt-bindings/interrupt-controller/irq.h> #include <dt-bindings/interrupt-controller/arm-gic.h> +#include <dt-bindings/reset/amlogic,meson-axg-audio-arb.h> #include <dt-bindings/reset/amlogic,meson-g12a-reset.h> / {
@@ -240,6 +241,78 @@ resets = <&reset RESET_AUDIO>; }; + toddr_a: audio-controller@100 { + compatible = "amlogic,g12a-toddr", + "amlogic,axg-toddr"; + reg = <0x0 0x100 0x0 0x1c>; + #sound-dai-cells = <0>; + sound-name-prefix = "TODDR_A"; + interrupts = <GIC_SPI 148 IRQ_TYPE_EDGE_RISING>; + clocks = <&clkc_audio AUD_CLKID_TODDR_A>; + resets = <&arb AXG_ARB_TODDR_A>; + status = "disabled"; + }; + + toddr_b: audio-controller@140 { + compatible = "amlogic,g12a-toddr", + "amlogic,axg-toddr"; + reg = <0x0 0x140 0x0 0x1c>; + #sound-dai-cells = <0>; + sound-name-prefix = "TODDR_B"; + interrupts = <GIC_SPI 149 IRQ_TYPE_EDGE_RISING>; + clocks = <&clkc_audio AUD_CLKID_TODDR_B>; + resets = <&arb AXG_ARB_TODDR_B>; + status = "disabled"; + }; + + toddr_c: audio-controller@180 { + compatible = "amlogic,g12a-toddr", + "amlogic,axg-toddr"; + reg = <0x0 0x180 0x0 0x1c>; + #sound-dai-cells = <0>; + sound-name-prefix = "TODDR_C"; + interrupts = <GIC_SPI 150 IRQ_TYPE_EDGE_RISING>; + clocks = <&clkc_audio AUD_CLKID_TODDR_C>; + resets = <&arb AXG_ARB_TODDR_C>; + status = "disabled"; + }; + + frddr_a: audio-controller@1c0 { + compatible = "amlogic,g12a-frddr", + "amlogic,axg-frddr"; + reg = <0x0 0x1c0 0x0 0x1c>; + #sound-dai-cells = <0>; + sound-name-prefix = "FRDDR_A"; + interrupts = <GIC_SPI 152 IRQ_TYPE_EDGE_RISING>; + clocks = <&clkc_audio AUD_CLKID_FRDDR_A>; + resets = <&arb AXG_ARB_FRDDR_A>; + status = "disabled"; + }; + + frddr_b: audio-controller@200 { + compatible = "amlogic,g12a-frddr", + "amlogic,axg-frddr"; + reg = <0x0 0x200 0x0 0x1c>; + #sound-dai-cells = <0>; + sound-name-prefix = "FRDDR_B"; + interrupts = <GIC_SPI 153 IRQ_TYPE_EDGE_RISING>; + clocks = <&clkc_audio AUD_CLKID_FRDDR_B>; + resets = <&arb AXG_ARB_FRDDR_B>; + status = "disabled"; + }; + + frddr_c: audio-controller@240 { + compatible = "amlogic,g12a-frddr", + "amlogic,axg-frddr"; + reg = <0x0 0x240 0x0 0x1c>; + #sound-dai-cells = <0>; + sound-name-prefix = "FRDDR_C"; + interrupts = <GIC_SPI 154 IRQ_TYPE_EDGE_RISING>; + clocks = <&clkc_audio AUD_CLKID_FRDDR_C>; + resets = <&arb AXG_ARB_FRDDR_C>; + status = "disabled"; + }; + arb: reset-controller@280 { status = "disabled"; compatible = "amlogic,meson-axg-audio-arb";
Signature · 1 line
2.20.1
Jerome Brunet
reviewerPATCH 4/7 arm64: dts: meson: g12a: add tdm devices
In reply to Jerome BrunetAdd the tdm encoders, decoders and interfaces devices of the g12a SoC.
--- arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 135 ++++++++++++++++++++ 1 file changed, 135 insertions(+)
arch/arm64/boot/dts/amlogic/meson-g12a.dtsi +135 -0
@@ -18,6 +18,39 @@ #address-cells = <2>; #size-cells = <2>; + tdmif_a: audio-controller-0 { + compatible = "amlogic,axg-tdm-iface"; + #sound-dai-cells = <0>; + sound-name-prefix = "TDM_A"; + clocks = <&clkc_audio AUD_CLKID_MST_A_MCLK>, + <&clkc_audio AUD_CLKID_MST_A_SCLK>, + <&clkc_audio AUD_CLKID_MST_A_LRCLK>; + clock-names = "mclk", "sclk", "lrclk"; + status = "disabled"; + }; + + tdmif_b: audio-controller-1 { + compatible = "amlogic,axg-tdm-iface"; + #sound-dai-cells = <0>; + sound-name-prefix = "TDM_B"; + clocks = <&clkc_audio AUD_CLKID_MST_B_MCLK>, + <&clkc_audio AUD_CLKID_MST_B_SCLK>, + <&clkc_audio AUD_CLKID_MST_B_LRCLK>; + clock-names = "mclk", "sclk", "lrclk"; + status = "disabled"; + }; + + tdmif_c: audio-controller-2 { + compatible = "amlogic,axg-tdm-iface"; + #sound-dai-cells = <0>; + sound-name-prefix = "TDM_C"; + clocks = <&clkc_audio AUD_CLKID_MST_C_MCLK>, + <&clkc_audio AUD_CLKID_MST_C_SCLK>, + <&clkc_audio AUD_CLKID_MST_C_LRCLK>; + clock-names = "mclk", "sclk", "lrclk"; + status = "disabled"; + }; + cpus { #address-cells = <0x2>; #size-cells = <0x0>;
@@ -320,6 +353,108 @@ #reset-cells = <1>; clocks = <&clkc_audio AUD_CLKID_DDR_ARB>; }; + + tdmin_a: audio-controller@300 { + compatible = "amlogic,g12a-tdmin", + "amlogic,axg-tdmin"; + reg = <0x0 0x300 0x0 0x40>; + sound-name-prefix = "TDMIN_A"; + clocks = <&clkc_audio AUD_CLKID_TDMIN_A>, + <&clkc_audio AUD_CLKID_TDMIN_A_SCLK>, + <&clkc_audio AUD_CLKID_TDMIN_A_SCLK_SEL>, + <&clkc_audio AUD_CLKID_TDMIN_A_LRCLK>, + <&clkc_audio AUD_CLKID_TDMIN_A_LRCLK>; + clock-names = "pclk", "sclk", "sclk_sel", + "lrclk", "lrclk_sel"; + status = "disabled"; + }; + + tdmin_b: audio-controller@340 { + compatible = "amlogic,g12a-tdmin", + "amlogic,axg-tdmin"; + reg = <0x0 0x340 0x0 0x40>; + sound-name-prefix = "TDMIN_B"; + clocks = <&clkc_audio AUD_CLKID_TDMIN_B>, + <&clkc_audio AUD_CLKID_TDMIN_B_SCLK>, + <&clkc_audio AUD_CLKID_TDMIN_B_SCLK_SEL>, + <&clkc_audio AUD_CLKID_TDMIN_B_LRCLK>, + <&clkc_audio AUD_CLKID_TDMIN_B_LRCLK>; + clock-names = "pclk", "sclk", "sclk_sel", + "lrclk", "lrclk_sel"; + status = "disabled"; + }; + + tdmin_c: audio-controller@380 { + compatible = "amlogic,g12a-tdmin", + "amlogic,axg-tdmin"; + reg = <0x0 0x380 0x0 0x40>; + sound-name-prefix = "TDMIN_C"; + clocks = <&clkc_audio AUD_CLKID_TDMIN_C>, + <&clkc_audio AUD_CLKID_TDMIN_C_SCLK>, + <&clkc_audio AUD_CLKID_TDMIN_C_SCLK_SEL>, + <&clkc_audio AUD_CLKID_TDMIN_C_LRCLK>, + <&clkc_audio AUD_CLKID_TDMIN_C_LRCLK>; + clock-names = "pclk", "sclk", "sclk_sel", + "lrclk", "lrclk_sel"; + status = "disabled"; + }; + + tdmin_lb: audio-controller@3c0 { + compatible = "amlogic,g12a-tdmin", + "amlogic,axg-tdmin"; + reg = <0x0 0x3c0 0x0 0x40>; + sound-name-prefix = "TDMIN_LB"; + clocks = <&clkc_audio AUD_CLKID_TDMIN_LB>, + <&clkc_audio AUD_CLKID_TDMIN_LB_SCLK>, + <&clkc_audio AUD_CLKID_TDMIN_LB_SCLK_SEL>, + <&clkc_audio AUD_CLKID_TDMIN_LB_LRCLK>, + <&clkc_audio AUD_CLKID_TDMIN_LB_LRCLK>; + clock-names = "pclk", "sclk", "sclk_sel", + "lrclk", "lrclk_sel"; + status = "disabled"; + }; + + tdmout_a: audio-controller@500 { + compatible = "amlogic,g12a-tdmout"; + reg = <0x0 0x500 0x0 0x40>; + sound-name-prefix = "TDMOUT_A"; + clocks = <&clkc_audio AUD_CLKID_TDMOUT_A>, + <&clkc_audio AUD_CLKID_TDMOUT_A_SCLK>, + <&clkc_audio AUD_CLKID_TDMOUT_A_SCLK_SEL>, + <&clkc_audio AUD_CLKID_TDMOUT_A_LRCLK>, + <&clkc_audio AUD_CLKID_TDMOUT_A_LRCLK>; + clock-names = "pclk", "sclk", "sclk_sel", + "lrclk", "lrclk_sel"; + status = "disabled"; + }; + + tdmout_b: audio-controller@540 { + compatible = "amlogic,g12a-tdmout"; + reg = <0x0 0x540 0x0 0x40>; + sound-name-prefix = "TDMOUT_B"; + clocks = <&clkc_audio AUD_CLKID_TDMOUT_B>, + <&clkc_audio AUD_CLKID_TDMOUT_B_SCLK>, + <&clkc_audio AUD_CLKID_TDMOUT_B_SCLK_SEL>, + <&clkc_audio AUD_CLKID_TDMOUT_B_LRCLK>, + <&clkc_audio AUD_CLKID_TDMOUT_B_LRCLK>; + clock-names = "pclk", "sclk", "sclk_sel", + "lrclk", "lrclk_sel"; + status = "disabled"; + }; + + tdmout_c: audio-controller@580 { + compatible = "amlogic,g12a-tdmout"; + reg = <0x0 0x580 0x0 0x40>; + sound-name-prefix = "TDMOUT_C"; + clocks = <&clkc_audio AUD_CLKID_TDMOUT_C>, + <&clkc_audio AUD_CLKID_TDMOUT_C_SCLK>, + <&clkc_audio AUD_CLKID_TDMOUT_C_SCLK_SEL>, + <&clkc_audio AUD_CLKID_TDMOUT_C_LRCLK>, + <&clkc_audio AUD_CLKID_TDMOUT_C_LRCLK>; + clock-names = "pclk", "sclk", "sclk_sel", + "lrclk", "lrclk_sel"; + status = "disabled"; + }; }; };
Signature · 1 line
2.20.1
Jerome Brunet
reviewerPATCH 5/7 arm64: dts: meson: g12a: add spdifouts
In reply to Jerome BrunetAdd the spdif output devices of the g12a SoCs.
--- arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 24 +++++++++++++++++++++ 1 file changed, 24 insertions(+)
arch/arm64/boot/dts/amlogic/meson-g12a.dtsi +24 -0
@@ -414,6 +414,18 @@ status = "disabled"; }; + spdifout: audio-controller@480 { + compatible = "amlogic,g12a-spdifout", + "amlogic,axg-spdifout"; + reg = <0x0 0x480 0x0 0x50>; + #sound-dai-cells = <0>; + sound-name-prefix = "SPDIFOUT"; + clocks = <&clkc_audio AUD_CLKID_SPDIFOUT>, + <&clkc_audio AUD_CLKID_SPDIFOUT_CLK>; + clock-names = "pclk", "mclk"; + status = "disabled"; + }; + tdmout_a: audio-controller@500 { compatible = "amlogic,g12a-tdmout"; reg = <0x0 0x500 0x0 0x40>;
@@ -455,6 +467,18 @@ "lrclk", "lrclk_sel"; status = "disabled"; }; + + spdifout_b: audio-controller@680 { + compatible = "amlogic,g12a-spdifout", + "amlogic,axg-spdifout"; + reg = <0x0 0x680 0x0 0x50>; + #sound-dai-cells = <0>; + sound-name-prefix = "SPDIFOUT_B"; + clocks = <&clkc_audio AUD_CLKID_SPDIFOUT_B>, + <&clkc_audio AUD_CLKID_SPDIFOUT_B_CLK>; + clock-names = "pclk", "mclk"; + status = "disabled"; + }; }; };
Signature · 1 line
2.20.1
Jerome Brunet
reviewerPATCH 6/7 arm64: dts: meson: g12a: add pdm
In reply to Jerome BrunetAdd the PDM audio capture device of the g12a SoC.
--- arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 13 +++++++++++++ 1 file changed, 13 insertions(+)
arch/arm64/boot/dts/amlogic/meson-g12a.dtsi +13 -0
@@ -239,6 +239,19 @@ }; }; + pdm: audio-controller@40000 { + compatible = "amlogic,g12a-pdm", + "amlogic,axg-pdm"; + reg = <0x0 0x40000 0x0 0x34>; + #sound-dai-cells = <0>; + sound-name-prefix = "PDM"; + clocks = <&clkc_audio AUD_CLKID_PDM>, + <&clkc_audio AUD_CLKID_PDM_DCLK>, + <&clkc_audio AUD_CLKID_PDM_SYSCLK>; + clock-names = "pclk", "dclk", "sysclk"; + status = "disabled"; + }; + audio: bus@42000 { compatible = "simple-bus"; reg = <0x0 0x42000 0x0 0x2000>;
Signature · 1 line
2.20.1
Jerome Brunet
reviewerPATCH 7/7 arm64: dts: meson: g12a: add spdifin
In reply to Jerome BrunetAdd the spdif input device of the g12a SoC
--- arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 13 +++++++++++++ 1 file changed, 13 insertions(+)
arch/arm64/boot/dts/amlogic/meson-g12a.dtsi +13 -0
@@ -427,6 +427,19 @@ status = "disabled"; }; + spdifin: audio-controller@400 { + compatible = "amlogic,g12a-spdifin", + "amlogic,axg-spdifin"; + reg = <0x0 0x400 0x0 0x30>; + #sound-dai-cells = <0>; + sound-name-prefix = "SPDIFIN"; + interrupts = <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>; + clocks = <&clkc_audio AUD_CLKID_SPDIFIN>, + <&clkc_audio AUD_CLKID_SPDIFIN_CLK>; + clock-names = "pclk", "refclk"; + status = "disabled"; + }; + spdifout: audio-controller@480 { compatible = "amlogic,g12a-spdifout", "amlogic,axg-spdifout";
Signature · 1 line
2.20.1
Kevin Hilman
maintainerQuoted 5 lines · Jerome Brunet
This patchset adds most the audio devices of the g12a SoCs.
Kevin, couple of things worth noting:
* This patch depends of the new audio clocks binding recently applied by Neil [0].
Was this supposed to be part of the clk-headers dependency PR I received? /me looks... It looks like it's applied right after the tag I pulled, so I doesn't look like it.
If I should queue $SUBJECT series up for 5.2, I'll need another stable tag.
Kevin
Kevin Hilman
maintainerQuoted 9 lines · Kevin Hilman
Quoted 5 lines · Jerome Brunet
This patchset adds most the audio devices of the g12a SoCs.
Kevin, couple of things worth noting:
* This patch depends of the new audio clocks binding recently applied by Neil [0].
Quoted 6 lines
Was this supposed to be part of the clk-headers dependency PR I received? /me looks... It looks like it's applied right after the tag I pulled, so I doesn't look like it.
If I should queue $SUBJECT series up for 5.2, I'll need another stable tag.
Also, this doesn't apply cleanly anymore to my v5.2/dt64 branch. When the stable tag is ready, do you mind doing a rebase? (or telling me what it currently applies to, and I will do the rebase.)
Thanks,
Kevin
Jerome Brunet
reviewerQuoted 13 lines · Kevin Hilman
Quoted 12 lines · Kevin Hilman
Quoted 5 lines · Jerome Brunet
This patchset adds most the audio devices of the g12a SoCs.
Kevin, couple of things worth noting:
* This patch depends of the new audio clocks binding recently applied by Neil [0].Was this supposed to be part of the clk-headers dependency PR I received? /me looks... It looks like it's applied right after the tag I pulled, so I doesn't look like it.
Quoted 6 lines
Quoted 2 lines
If I should queue $SUBJECT series up for 5.2, I'll need another stable tag.
Also, this doesn't apply cleanly anymore to my v5.2/dt64 branch. When the stable tag is ready, do you mind doing a rebase? (or telling me what it currently applies to, and I will do the rebase.)
Hi Kevin,
Until we have a solution for the drive strength in pinctrl, I won't be able to submit the audio pins. I doubt it will happen in this cycle.
Without the pins, audio won't work anyway ... so no rush
If it is ok with you, I'll resend at the beginning of the next cycle. Clk and ASoC deps will be merged by then, so things should be more straight forward.
Quoted 4 lines
Thanks,
Kevin
Kevin Hilman
maintainerQuoted 23 lines · Jerome Brunet
Quoted 13 lines · Kevin Hilman
Quoted 12 lines · Kevin Hilman
Quoted 5 lines · Jerome Brunet
This patchset adds most the audio devices of the g12a SoCs.
Kevin, couple of things worth noting:
* This patch depends of the new audio clocks binding recently applied by Neil [0].Was this supposed to be part of the clk-headers dependency PR I received? /me looks... It looks like it's applied right after the tag I pulled, so I doesn't look like it.
Quoted 6 lines
Quoted 2 lines
If I should queue $SUBJECT series up for 5.2, I'll need another stable tag.
Also, this doesn't apply cleanly anymore to my v5.2/dt64 branch. When the stable tag is ready, do you mind doing a rebase? (or telling me what it currently applies to, and I will do the rebase.)
Hi Kevin,
Quoted 7 lines
Until we have a solution for the drive strength in pinctrl, I won't be able to submit the audio pins. I doubt it will happen in this cycle.
Without the pins, audio won't work anyway ... so no rush
If it is ok with you, I'll resend at the beginning of the next cycle. Clk and ASoC deps will be merged by then, so things should be more straight forward.
Works for me, thanks.
Kevin