Unverified Commit 7d04763c authored by Mark Brown's avatar Mark Brown
Browse files

ASoC: Some issues about loongson i2s

Merge series from Binbin Zhou <zhoubinbin@loongson.cn>:

This patch set is mainly about Loongson i2s related issues.

Please allow me to briefly explain this patch set:
Patch 1-2: Add ES8323 codec required on Loongson-2K2000
Patch 3-4: Add uda1342 codec required on Loongson-2K1000
Patch 5: Fix the problem of unable to detect codec under FDT system.
Patch 6-7: Add Loongson i2s platform device support
parents 721c55be ba4c5fad
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -4,12 +4,13 @@
$id: http://devicetree.org/schemas/sound/everest,es8316.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Everest ES8311 and ES8316 audio CODECs
title: Everest ES8311, ES8316 and ES8323 audio CODECs

maintainers:
  - Daniel Drake <drake@endlessm.com>
  - Katsuhiro Suzuki <katsuhiro@katsuster.net>
  - Matteo Martelli <matteomartelli3@gmail.com>
  - Binbin Zhou <zhoubinbin@loongson.cn>

allOf:
  - $ref: dai-common.yaml#
@@ -19,6 +20,7 @@ properties:
    enum:
      - everest,es8311
      - everest,es8316
      - everest,es8323

  reg:
    maxItems: 1
+68 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/loongson,ls2k1000-i2s.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Loongson-2K1000 I2S controller

maintainers:
  - Binbin Zhou <zhoubinbin@loongson.cn>

allOf:
  - $ref: dai-common.yaml#

properties:
  compatible:
    const: loongson,ls2k1000-i2s

  reg:
    items:
      - description: Loongson I2S controller Registers.
      - description: APB DMA config register for Loongson I2S controller.

  interrupts:
    maxItems: 1

  clocks:
    maxItems: 1

  dmas:
    maxItems: 2

  dma-names:
    items:
      - const: tx
      - const: rx

  '#sound-dai-cells':
    const: 0

required:
  - compatible
  - reg
  - interrupts
  - clocks
  - dmas
  - dma-names
  - '#sound-dai-cells'

unevaluatedProperties: false

examples:
  - |
    #include <dt-bindings/clock/loongson,ls2k-clk.h>
    #include <dt-bindings/interrupt-controller/irq.h>

    i2s@1fe2d000 {
        compatible = "loongson,ls2k1000-i2s";
        reg = <0x1fe2d000 0x14>,
              <0x1fe00438 0x8>;
        interrupt-parent = <&liointc0>;
        interrupts = <5 IRQ_TYPE_LEVEL_HIGH>;
        clocks = <&clk LOONGSON2_APB_CLK>;
        dmas = <&apbdma2 0>, <&apbdma3 0>;
        dma-names = "tx", "rx";
        #sound-dai-cells = <0>;
    };
...
+42 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/nxp,uda1342.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: NXP uda1342 audio CODECs

maintainers:
  - Binbin Zhou <zhoubinbin@loongson.cn>

allOf:
  - $ref: dai-common.yaml#

properties:
  compatible:
    const: nxp,uda1342

  reg:
    maxItems: 1

  '#sound-dai-cells':
    const: 0

required:
  - compatible
  - reg
  - '#sound-dai-cells'

unevaluatedProperties: false

examples:
  - |
    i2c {
      #address-cells = <1>;
      #size-cells = <0>;
      codec@1a {
        compatible = "nxp,uda1342";
        reg = <0x1a>;
        #sound-dai-cells = <0>;
      };
    };
+13 −0
Original line number Diff line number Diff line
@@ -112,6 +112,7 @@ config SND_SOC_ALL_CODECS
	imply SND_SOC_DA9055
	imply SND_SOC_DMIC
	imply SND_SOC_ES8316
	imply SND_SOC_ES8323
	imply SND_SOC_ES8326
	imply SND_SOC_ES8328_SPI
	imply SND_SOC_ES8328_I2C
@@ -282,6 +283,7 @@ config SND_SOC_ALL_CODECS
	imply SND_SOC_TWL4030
	imply SND_SOC_TWL6040
	imply SND_SOC_UDA1334
	imply SND_SOC_UDA1342
	imply SND_SOC_UDA1380
	imply SND_SOC_WCD9335
	imply SND_SOC_WCD934X
@@ -1144,6 +1146,10 @@ config SND_SOC_ES8316
	tristate "Everest Semi ES8316 CODEC"
	depends on I2C

config SND_SOC_ES8323
	tristate "Everest Semi ES8323 CODEC"
	depends on I2C

config SND_SOC_ES8326
	tristate "Everest Semi ES8326 CODEC"
	depends on I2C
@@ -2126,6 +2132,13 @@ config SND_SOC_UDA1334
	  and has basic features such as de-emphasis (at 44.1 kHz sampling
	  rate) and mute.

config SND_SOC_UDA1342
	tristate "NXP UDA1342 CODEC"
	depends on I2C
	help
	  The UDA1342 is an NXP audio codec, support 2x Stereo audio ADC (4x PGA
	  mic inputs), stereo audio DAC, with basic audio processing.

config SND_SOC_UDA1380
	tristate
	depends on I2C
+4 −0
Original line number Diff line number Diff line
@@ -125,6 +125,7 @@ snd-soc-es7241-y := es7241.o
snd-soc-es83xx-dsm-common-y := es83xx-dsm-common.o
snd-soc-es8311-y := es8311.o
snd-soc-es8316-y := es8316.o
snd-soc-es8323-y := es8323.o
snd-soc-es8326-y := es8326.o
snd-soc-es8328-y := es8328.o
snd-soc-es8328-i2c-y := es8328-i2c.o
@@ -324,6 +325,7 @@ snd-soc-ts3a227e-y := ts3a227e.o
snd-soc-twl4030-y := twl4030.o
snd-soc-twl6040-y := twl6040.o
snd-soc-uda1334-y := uda1334.o
snd-soc-uda1342-y := uda1342.o
snd-soc-uda1380-y := uda1380.o
snd-soc-wcd-classh-y := wcd-clsh-v2.o
snd-soc-wcd-mbhc-y := wcd-mbhc-v2.o
@@ -537,6 +539,7 @@ obj-$(CONFIG_SND_SOC_ES7241) += snd-soc-es7241.o
obj-$(CONFIG_SND_SOC_ES83XX_DSM_COMMON)    += snd-soc-es83xx-dsm-common.o
obj-$(CONFIG_SND_SOC_ES8311)    += snd-soc-es8311.o
obj-$(CONFIG_SND_SOC_ES8316)    += snd-soc-es8316.o
obj-$(CONFIG_SND_SOC_ES8323)	+= snd-soc-es8323.o
obj-$(CONFIG_SND_SOC_ES8326)    += snd-soc-es8326.o
obj-$(CONFIG_SND_SOC_ES8328)	+= snd-soc-es8328.o
obj-$(CONFIG_SND_SOC_ES8328_I2C)+= snd-soc-es8328-i2c.o
@@ -733,6 +736,7 @@ obj-$(CONFIG_SND_SOC_TS3A227E) += snd-soc-ts3a227e.o
obj-$(CONFIG_SND_SOC_TWL4030)	+= snd-soc-twl4030.o
obj-$(CONFIG_SND_SOC_TWL6040)	+= snd-soc-twl6040.o
obj-$(CONFIG_SND_SOC_UDA1334)	+= snd-soc-uda1334.o
obj-$(CONFIG_SND_SOC_UDA1342)	+= snd-soc-uda1342.o
obj-$(CONFIG_SND_SOC_UDA1380)	+= snd-soc-uda1380.o
obj-$(CONFIG_SND_SOC_WCD_CLASSH)	+= snd-soc-wcd-classh.o
obj-$(CONFIG_SND_SOC_WCD_MBHC)	+= snd-soc-wcd-mbhc.o
Loading