* [PATCH 0/3] arm64: dts: meson-axg: add pdm support
@ 2018-08-31 15:02 Jerome Brunet
2018-08-31 15:02 ` [PATCH 1/3] arm64: dts: meson-axg: add pdm Jerome Brunet
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Jerome Brunet @ 2018-08-31 15:02 UTC (permalink / raw)
To: Kevin Hilman, Carlo Caione
Cc: Jerome Brunet, linux-amlogic, linux-kernel, linux-arm-kernel
This patchset adds pdm support for amlogic AXG SoC.
It applies on top of the DT clean-up [0] I sent earlier
The related ASoC PDM patches can be found here [1]. While the ASoC patches
[2] are obviously needed to for the PDM to work, this series can be safely
applied without it.
[0]: https://lkml.kernel.org/r/20180829154551.26729-1-jbrunet@baylibre.com
[1]: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git/log/?h=for-4.20
[2]: https://lkml.kernel.org/r/20180829150051.18190-1-jbrunet@baylibre.com
Jerome Brunet (3):
arm64: dts: meson-axg: add pdm
arm64: dts: meson-axg: s400: add dmic codec
arm64: dts: meson-axg: s400: add pdm to the sound card
.../arm64/boot/dts/amlogic/meson-axg-s400.dts | 27 +++++++++++++++++++
arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 12 +++++++++
2 files changed, 39 insertions(+)
--
2.17.1
^ permalink raw reply [flat|nested] 7+ messages in thread* [PATCH 1/3] arm64: dts: meson-axg: add pdm 2018-08-31 15:02 [PATCH 0/3] arm64: dts: meson-axg: add pdm support Jerome Brunet @ 2018-08-31 15:02 ` Jerome Brunet 2018-08-31 15:02 ` [PATCH 2/3] arm64: dts: meson-axg: s400: add dmic codec Jerome Brunet ` (2 subsequent siblings) 3 siblings, 0 replies; 7+ messages in thread From: Jerome Brunet @ 2018-08-31 15:02 UTC (permalink / raw) To: Kevin Hilman, Carlo Caione Cc: Jerome Brunet, linux-amlogic, linux-kernel, linux-arm-kernel Add the PDM device of the axg audio subsystem Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> --- arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi index 36be63d69e7f..883ddfce2374 100644 --- a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi +++ b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi @@ -152,6 +152,18 @@ status = "disabled"; }; + pdm: audio-controller@ff632000 { + compatible = "amlogic,axg-pdm"; + reg = <0x0 0xff632000 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"; + }; + periphs: bus@ff634000 { compatible = "simple-bus"; reg = <0x0 0xff634000 0x0 0x2000>; -- 2.17.1 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/3] arm64: dts: meson-axg: s400: add dmic codec 2018-08-31 15:02 [PATCH 0/3] arm64: dts: meson-axg: add pdm support Jerome Brunet 2018-08-31 15:02 ` [PATCH 1/3] arm64: dts: meson-axg: add pdm Jerome Brunet @ 2018-08-31 15:02 ` Jerome Brunet 2018-09-01 21:24 ` Fabio Estevam 2018-08-31 15:02 ` [PATCH 3/3] arm64: dts: meson-axg: s400: add pdm to the sound card Jerome Brunet 2018-09-13 4:52 ` [PATCH 0/3] arm64: dts: meson-axg: add pdm support Kevin Hilman 3 siblings, 1 reply; 7+ messages in thread From: Jerome Brunet @ 2018-08-31 15:02 UTC (permalink / raw) To: Kevin Hilman, Carlo Caione Cc: Jerome Brunet, linux-amlogic, linux-kernel, linux-arm-kernel There are 7 digital mics on the MIC daughter board attached to the s400 board, so add the digital microphone codec to its DTS Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> --- arch/arm64/boot/dts/amlogic/meson-axg-s400.dts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts b/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts index ff64c429d432..f3e16cbbc61e 100644 --- a/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts +++ b/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts @@ -86,6 +86,15 @@ sound-name-prefix = "DIT"; }; + dmics: audio-codec@3 { + #sound-dai-cells = <0>; + compatible = "dmic-codec"; + num-channels = <7>; + wakeup-delay-ms = <50>; + status = "okay"; + sound-name-prefix = "MIC"; + }; + emmc_pwrseq: emmc-pwrseq { compatible = "mmc-pwrseq-emmc"; reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>; -- 2.17.1 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 2/3] arm64: dts: meson-axg: s400: add dmic codec 2018-08-31 15:02 ` [PATCH 2/3] arm64: dts: meson-axg: s400: add dmic codec Jerome Brunet @ 2018-09-01 21:24 ` Fabio Estevam 2018-09-03 9:57 ` Jerome Brunet 0 siblings, 1 reply; 7+ messages in thread From: Fabio Estevam @ 2018-09-01 21:24 UTC (permalink / raw) To: Jerome Brunet Cc: Kevin Hilman, Carlo Caione, linux-amlogic, linux-kernel, moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE Hi Jerome, On Fri, Aug 31, 2018 at 12:02 PM, Jerome Brunet <jbrunet@baylibre.com> wrote: > There are 7 digital mics on the MIC daughter board attached > to the s400 board, so add the digital microphone codec to > its DTS > > Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> > --- > arch/arm64/boot/dts/amlogic/meson-axg-s400.dts | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts b/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts > index ff64c429d432..f3e16cbbc61e 100644 > --- a/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts > +++ b/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts > @@ -86,6 +86,15 @@ > sound-name-prefix = "DIT"; > }; > > + dmics: audio-codec@3 { You pass @3 without a corresponding reg = <3>, which causes dtc warnings with W=1. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/3] arm64: dts: meson-axg: s400: add dmic codec 2018-09-01 21:24 ` Fabio Estevam @ 2018-09-03 9:57 ` Jerome Brunet 0 siblings, 0 replies; 7+ messages in thread From: Jerome Brunet @ 2018-09-03 9:57 UTC (permalink / raw) To: Fabio Estevam, Rob Herring, Martin Blumenstingl, devicetree Cc: Kevin Hilman, Carlo Caione, linux-amlogic, linux-kernel, moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE On Sat, 2018-09-01 at 18:24 -0300, Fabio Estevam wrote: > Hi Jerome, > > On Fri, Aug 31, 2018 at 12:02 PM, Jerome Brunet <jbrunet@baylibre.com> wrote: > > There are 7 digital mics on the MIC daughter board attached > > to the s400 board, so add the digital microphone codec to > > its DTS > > > > Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> > > --- > > arch/arm64/boot/dts/amlogic/meson-axg-s400.dts | 9 +++++++++ > > 1 file changed, 9 insertions(+) > > > > diff --git a/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts b/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts > > index ff64c429d432..f3e16cbbc61e 100644 > > --- a/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts > > +++ b/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts > > @@ -86,6 +86,15 @@ > > sound-name-prefix = "DIT"; > > }; > > > > + dmics: audio-codec@3 { > > You pass @3 without a corresponding reg = <3>, which causes dtc > warnings with W=1. Hi Fabio, Thanks for pointing this out. Martin also raised concerns about this but, unfortunately, we did not get to the bottom of it: https://lkml.kernel.org/r/ 90780f5a6b974ee9a4f9f9f2580fc83ef6bdd805.camel@baylibre.com In a nutshell, I numbered nodes (w/o a reg prop) to keep generic names as suggested in the DT spec. The idea came after working on sound cards, if you check Documentation/devicetree/bindings/sound/simple-card.txt, you'll see this kind of numbering is even in documentation examples. This is used by arch/arm/boot/dts/armada-370-db.dts. This is just an example I picked randomly, I'm not trying to single out the marvell folks here (or ASoC simple card). I'm actually doing exactly the same kind of multi link stuff on the amlogic cards. This looks to be a wide spread practice. Running `make dtbs W=1` on ARM and ARM64 arch, I've seen dozen of 'node has a unit name, but no reg property' examples, on things like clocks, buttons, leds, pinctrl, etc ... that being said, section 2.2.1 of the DT specs says: " If the node has no reg property, the @unit-address must be omitted and the node-name alone differentiates the node from other nodes at the same level in the tree " So apparently, this is used but not ok ? Maybe we should simply replace the '@' with a '-' everywhere this occurs ? If possible, I'd like to get the opinion of the DT gurus about this issue. Cheers Jerome ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 3/3] arm64: dts: meson-axg: s400: add pdm to the sound card 2018-08-31 15:02 [PATCH 0/3] arm64: dts: meson-axg: add pdm support Jerome Brunet 2018-08-31 15:02 ` [PATCH 1/3] arm64: dts: meson-axg: add pdm Jerome Brunet 2018-08-31 15:02 ` [PATCH 2/3] arm64: dts: meson-axg: s400: add dmic codec Jerome Brunet @ 2018-08-31 15:02 ` Jerome Brunet 2018-09-13 4:52 ` [PATCH 0/3] arm64: dts: meson-axg: add pdm support Kevin Hilman 3 siblings, 0 replies; 7+ messages in thread From: Jerome Brunet @ 2018-08-31 15:02 UTC (permalink / raw) To: Kevin Hilman, Carlo Caione Cc: Jerome Brunet, linux-amlogic, linux-kernel, linux-arm-kernel Enable the PDM input device on the S400 and it to the sound card Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> --- arch/arm64/boot/dts/amlogic/meson-axg-s400.dts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts b/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts index f3e16cbbc61e..92d3064d4966 100644 --- a/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts +++ b/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts @@ -240,6 +240,9 @@ "TODDR_A IN 2", "TDMIN_C OUT", "TODDR_B IN 2", "TDMIN_C OUT", "TODDR_C IN 2", "TDMIN_C OUT", + "TODDR_A IN 4", "PDM Capture", + "TODDR_B IN 4", "PDM Capture", + "TODDR_C IN 4", "PDM Capture", "TODDR_A IN 6", "TDMIN_LB OUT", "TODDR_B IN 6", "TDMIN_LB OUT", "TODDR_C IN 6", "TDMIN_LB OUT", @@ -312,6 +315,14 @@ sound-dai = <&spdif_dit>; }; }; + + dai-link@8 { + sound-dai = <&pdm>; + + codec { + sound-dai = <&dmics>; + }; + }; }; wifi32k: wifi32k { @@ -394,6 +405,13 @@ }; }; +&pdm { + pinctrl-0 = <&pdm_dclk_a14_pins>, <&pdm_din0_pins>, + <&pdm_din1_pins>, <&pdm_din2_pins>, <&pdm_din3_pins>; + pinctrl-names = "default"; + status = "okay"; +}; + &pwm_ab { status = "okay"; pinctrl-0 = <&pwm_a_x20_pins>; -- 2.17.1 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 0/3] arm64: dts: meson-axg: add pdm support 2018-08-31 15:02 [PATCH 0/3] arm64: dts: meson-axg: add pdm support Jerome Brunet ` (2 preceding siblings ...) 2018-08-31 15:02 ` [PATCH 3/3] arm64: dts: meson-axg: s400: add pdm to the sound card Jerome Brunet @ 2018-09-13 4:52 ` Kevin Hilman 3 siblings, 0 replies; 7+ messages in thread From: Kevin Hilman @ 2018-09-13 4:52 UTC (permalink / raw) To: Jerome Brunet; +Cc: Carlo Caione, linux-amlogic, linux-kernel, linux-arm-kernel Jerome Brunet <jbrunet@baylibre.com> writes: > This patchset adds pdm support for amlogic AXG SoC. > It applies on top of the DT clean-up [0] I sent earlier Applied to v4.20/dt64. > The related ASoC PDM patches can be found here [1]. While the ASoC patches > [2] are obviously needed to for the PDM to work, this series can be safely > applied without it. Thanks for the clear explanation of dependencies. Kevin ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2018-09-13 4:52 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2018-08-31 15:02 [PATCH 0/3] arm64: dts: meson-axg: add pdm support Jerome Brunet 2018-08-31 15:02 ` [PATCH 1/3] arm64: dts: meson-axg: add pdm Jerome Brunet 2018-08-31 15:02 ` [PATCH 2/3] arm64: dts: meson-axg: s400: add dmic codec Jerome Brunet 2018-09-01 21:24 ` Fabio Estevam 2018-09-03 9:57 ` Jerome Brunet 2018-08-31 15:02 ` [PATCH 3/3] arm64: dts: meson-axg: s400: add pdm to the sound card Jerome Brunet 2018-09-13 4:52 ` [PATCH 0/3] arm64: dts: meson-axg: add pdm support Kevin Hilman
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox