2018-06-06 19:39:46

by Mathieu Malaterre

[permalink] [raw]
Subject: [PATCH 1/3] MIPS: jz4780: Allow access to jz4740-i2s

Make it possible to select SND_JZ4740_SOC_I2S on MACH_JZ4780

Signed-off-by: Mathieu Malaterre <[email protected]>
---
sound/soc/jz4740/Kconfig | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/sound/soc/jz4740/Kconfig b/sound/soc/jz4740/Kconfig
index 1a354a6b6e87..35d82d96e781 100644
--- a/sound/soc/jz4740/Kconfig
+++ b/sound/soc/jz4740/Kconfig
@@ -1,20 +1,20 @@
config SND_JZ4740_SOC
- tristate "SoC Audio for Ingenic JZ4740 SoC"
- depends on MACH_JZ4740 || COMPILE_TEST
+ tristate "SoC Audio for Ingenic JZ4740/JZ4780 SoC"
+ depends on MACH_JZ4740 || MACH_JZ4780 || COMPILE_TEST
select SND_SOC_GENERIC_DMAENGINE_PCM
help
Say Y or M if you want to add support for codecs attached to
- the JZ4740 I2S interface. You will also need to select the audio
+ the JZ4740/JZ4780 I2S interface. You will also need to select the audio
interfaces to support below.

if SND_JZ4740_SOC

config SND_JZ4740_SOC_I2S
- tristate "SoC Audio (I2S protocol) for Ingenic JZ4740 SoC"
+ tristate "SoC Audio (I2S protocol) for Ingenic JZ4740/JZ4780 SoC"
depends on HAS_IOMEM
help
Say Y if you want to use I2S protocol and I2S codec on Ingenic JZ4740
- based boards.
+ or JZ4780 based boards.

config SND_JZ4740_SOC_QI_LB60
tristate "SoC Audio support for Qi LB60"
--
2.11.0



2018-06-06 19:39:21

by Mathieu Malaterre

[permalink] [raw]
Subject: [PATCH 3/3] MIPS: jz4780: DTS: Probe the jz4740-i2s driver from devicetree

Since commit 967beb2e8777 ("ASoC: jz4740: Add jz4780 support"), jz4740-i2s
driver supports jz4780 hardware. Use proper compatible string.

Signed-off-by: Mathieu Malaterre <[email protected]>
---
arch/mips/boot/dts/ingenic/jz4780.dtsi | 12 ++++++++++++
1 file changed, 12 insertions(+)

diff --git a/arch/mips/boot/dts/ingenic/jz4780.dtsi b/arch/mips/boot/dts/ingenic/jz4780.dtsi
index ae57976bc016..308079ee8dd3 100644
--- a/arch/mips/boot/dts/ingenic/jz4780.dtsi
+++ b/arch/mips/boot/dts/ingenic/jz4780.dtsi
@@ -57,6 +57,18 @@
clock-names = "rtc";
};

+ i2s: i2s@10020000 {
+ compatible = "ingenic,jz4780-i2s";
+ reg = <0x10020000 0x94>;
+
+ clocks = <&cgu JZ4780_CLK_AIC>, <&cgu JZ4780_CLK_I2SPLL>;
+ clock-names = "aic", "i2s";
+
+ dmas = <&dma 0 JZ4780_DMA_I2S0_RX 0xffffffff>,
+ <&dma JZ4780_DMA_I2S0_TX 0 0xffffffff>;
+ dma-names = "rx" , "tx";
+ };
+
pinctrl: pin-controller@10010000 {
compatible = "ingenic,jz4780-pinctrl";
reg = <0x10010000 0x600>;
--
2.11.0


2018-06-06 19:41:15

by Mathieu Malaterre

[permalink] [raw]
Subject: [PATCH 2/3] MIPS: Ci20: Enable SND_JZ4740_SOC driver

Update the Ci20's defconfig to enable the JZ4780's SND driver.

Signed-off-by: Mathieu Malaterre <[email protected]>
---
arch/mips/configs/ci20_defconfig | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/arch/mips/configs/ci20_defconfig b/arch/mips/configs/ci20_defconfig
index e1c14f6af824..0c08c7675b42 100644
--- a/arch/mips/configs/ci20_defconfig
+++ b/arch/mips/configs/ci20_defconfig
@@ -104,6 +104,10 @@ CONFIG_REGULATOR=y
CONFIG_REGULATOR_DEBUG=y
CONFIG_REGULATOR_FIXED_VOLTAGE=y
# CONFIG_VGA_CONSOLE is not set
+CONFIG_SOUND=y
+CONFIG_SND=y
+CONFIG_SND_SOC=y
+CONFIG_SND_JZ4740_SOC=y
# CONFIG_HID is not set
# CONFIG_USB_SUPPORT is not set
CONFIG_MMC=y
--
2.11.0


2018-07-24 20:49:21

by Paul Burton

[permalink] [raw]
Subject: Re: [PATCH 1/3] MIPS: jz4780: Allow access to jz4740-i2s

Hi Matthieu,

On Wed, Jun 06, 2018 at 09:38:08PM +0200, Mathieu Malaterre wrote:
> diff --git a/sound/soc/jz4740/Kconfig b/sound/soc/jz4740/Kconfig
> index 1a354a6b6e87..35d82d96e781 100644
> --- a/sound/soc/jz4740/Kconfig
> +++ b/sound/soc/jz4740/Kconfig
> @@ -1,20 +1,20 @@
> config SND_JZ4740_SOC
> - tristate "SoC Audio for Ingenic JZ4740 SoC"
> - depends on MACH_JZ4740 || COMPILE_TEST
> + tristate "SoC Audio for Ingenic JZ4740/JZ4780 SoC"
> + depends on MACH_JZ4740 || MACH_JZ4780 || COMPILE_TEST

Perhaps this could be MACH_INGENIC, or even just MIPS?

Thanks,
Paul

2018-08-31 20:39:19

by Paul Burton

[permalink] [raw]
Subject: Re: [PATCH 1/3] MIPS: jz4780: Allow access to jz4740-i2s

Hi Matthieu,

On Tue, Jul 24, 2018 at 01:47:57PM -0700, Paul Burton wrote:
> On Wed, Jun 06, 2018 at 09:38:08PM +0200, Mathieu Malaterre wrote:
> > diff --git a/sound/soc/jz4740/Kconfig b/sound/soc/jz4740/Kconfig
> > index 1a354a6b6e87..35d82d96e781 100644
> > --- a/sound/soc/jz4740/Kconfig
> > +++ b/sound/soc/jz4740/Kconfig
> > @@ -1,20 +1,20 @@
> > config SND_JZ4740_SOC
> > - tristate "SoC Audio for Ingenic JZ4740 SoC"
> > - depends on MACH_JZ4740 || COMPILE_TEST
> > + tristate "SoC Audio for Ingenic JZ4740/JZ4780 SoC"
> > + depends on MACH_JZ4740 || MACH_JZ4780 || COMPILE_TEST
>
> Perhaps this could be MACH_INGENIC, or even just MIPS?

Further to that, this series doesn't seem to work for me. With
v4.19-rc1, with the patch from [1] & then this series applied I see the
following when booting a ci20_defconfig kernel:

[ 0.846684] ALSA device list:
[ 0.849642] No soundcards found.

Nothing else looks obviously relevant, but here's the full boot log for
reference:

https://gist.github.com/paulburton/336fa3a6ed756f9bbb587f01dcd520e5/6a5042a258348ed5e5d3d0cb1a72076abf31d85b

Thanks,
Paul

2018-08-31 21:03:39

by Paul Burton

[permalink] [raw]
Subject: Re: [PATCH 1/3] MIPS: jz4780: Allow access to jz4740-i2s

On Fri, Aug 31, 2018 at 01:37:52PM -0700, Paul Burton wrote:
> Further to that, this series doesn't seem to work for me. With
> v4.19-rc1, with the patch from [1] & then this series applied I see the
> following when booting a ci20_defconfig kernel:
>
> [ 0.846684] ALSA device list:
> [ 0.849642] No soundcards found.

D'oh! Apparently I haven't drunk enough coffee today - missing link can
be found below:

[1] https://www.spinics.net/lists/linux-gpio/msg31965.html

Thanks,
Paul

2018-09-03 06:16:51

by Mathieu Malaterre

[permalink] [raw]
Subject: Re: [PATCH 1/3] MIPS: jz4780: Allow access to jz4740-i2s

On Fri, Aug 31, 2018 at 10:59 PM Paul Burton <[email protected]> wrote:
>
> On Fri, Aug 31, 2018 at 01:37:52PM -0700, Paul Burton wrote:
> > Further to that, this series doesn't seem to work for me. With
> > v4.19-rc1, with the patch from [1] & then this series applied I see the
> > following when booting a ci20_defconfig kernel:
> >
> > [ 0.846684] ALSA device list:
> > [ 0.849642] No soundcards found.
>
> D'oh! Apparently I haven't drunk enough coffee today - missing link can
> be found below:
>
> [1] https://www.spinics.net/lists/linux-gpio/msg31965.html

Awesome, thanks for testing. I'll return to this series once I receive
replacement for my laptop hard drive.

thanks,
-M

2018-10-17 20:27:16

by Mathieu Malaterre

[permalink] [raw]
Subject: Re: [PATCH 1/3] MIPS: jz4780: Allow access to jz4740-i2s

Paul,

On Mon, Sep 3, 2018 at 8:15 AM Mathieu Malaterre <[email protected]> wrote:
>
> On Fri, Aug 31, 2018 at 10:59 PM Paul Burton <[email protected]> wrote:
> >
> > On Fri, Aug 31, 2018 at 01:37:52PM -0700, Paul Burton wrote:
> > > Further to that, this series doesn't seem to work for me. With
> > > v4.19-rc1, with the patch from [1] & then this series applied I see the
> > > following when booting a ci20_defconfig kernel:
> > >
> > > [ 0.846684] ALSA device list:
> > > [ 0.849642] No soundcards found.
> >
> > D'oh! Apparently I haven't drunk enough coffee today - missing link can
> > be found below:
> >
> > [1] https://www.spinics.net/lists/linux-gpio/msg31965.html
>
> Awesome, thanks for testing. I'll return to this series once I receive
> replacement for my laptop hard drive.

I see it now :

[ 0.289701] bus: 'platform': really_probe: probing driver
jz4740-i2s with device 10020000.i2s
[ 0.289713] jz4740-i2s 10020000.i2s: no pinctrl handle
[ 0.289782] OF: /i2s@10020000: could not find phandle

I'll try to make sense of this.

> thanks,
> -M

2018-10-17 20:30:47

by Mathieu Malaterre

[permalink] [raw]
Subject: Re: [PATCH 2/3] MIPS: Ci20: Enable SND_JZ4740_SOC driver

On Wed, Jun 6, 2018 at 9:38 PM Mathieu Malaterre <[email protected]> wrote:
>
> Update the Ci20's defconfig to enable the JZ4780's SND driver.
>
> Signed-off-by: Mathieu Malaterre <[email protected]>
> ---
> arch/mips/configs/ci20_defconfig | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/arch/mips/configs/ci20_defconfig b/arch/mips/configs/ci20_defconfig
> index e1c14f6af824..0c08c7675b42 100644
> --- a/arch/mips/configs/ci20_defconfig
> +++ b/arch/mips/configs/ci20_defconfig
> @@ -104,6 +104,10 @@ CONFIG_REGULATOR=y
> CONFIG_REGULATOR_DEBUG=y
> CONFIG_REGULATOR_FIXED_VOLTAGE=y
> # CONFIG_VGA_CONSOLE is not set
> +CONFIG_SOUND=y
> +CONFIG_SND=y
> +CONFIG_SND_SOC=y
> +CONFIG_SND_JZ4740_SOC=y

technically I am also missing: CONFIG_SND_JZ4740_SOC_I2S=y

> # CONFIG_HID is not set
> # CONFIG_USB_SUPPORT is not set
> CONFIG_MMC=y
> --
> 2.11.0
>