From 0afb88d5a602488f877380ad1ec37cc20c927c68 Mon Sep 17 00:00:00 2001 From: Viorel Suman Date: Tue, 13 Oct 2020 15:17:33 +0300 Subject: ASoC: dt-bindings: fsl_xcvr: Add document for XCVR XCVR (Audio Transceiver) is a new IP module found on i.MX8MP. Signed-off-by: Viorel Suman Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201013121733.83684-3-viorel.suman@oss.nxp.com Signed-off-by: Mark Brown --- .../devicetree/bindings/sound/fsl,xcvr.yaml | 104 +++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/fsl,xcvr.yaml (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/sound/fsl,xcvr.yaml b/Documentation/devicetree/bindings/sound/fsl,xcvr.yaml new file mode 100644 index 000000000000..223b8ea693dc --- /dev/null +++ b/Documentation/devicetree/bindings/sound/fsl,xcvr.yaml @@ -0,0 +1,104 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/fsl,xcvr.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NXP Audio Transceiver (XCVR) Controller + +maintainers: + - Viorel Suman + +description: | + NXP XCVR (Audio Transceiver) is a on-chip functional module + that allows CPU to receive and transmit digital audio via + HDMI2.1 eARC, HDMI1.4 ARC and SPDIF. + +properties: + $nodename: + pattern: "^xcvr@.*" + + compatible: + enum: + - fsl,imx8mp-xcvr + + reg: + items: + - description: 20K RAM for code and data + - description: registers space + - description: RX FIFO address + - description: TX FIFO address + + reg-names: + items: + - const: ram + - const: regs + - const: rxfifo + - const: txfifo + + interrupts: + maxItems: 1 + + clocks: + items: + - description: Peripheral clock + - description: PHY clock + - description: SPBA clock + - description: PLL clock + + clock-names: + items: + - const: ipg + - const: phy + - const: spba + - const: pll_ipg + + dmas: + items: + - description: DMA controller phandle and request line for RX + - description: DMA controller phandle and request line for TX + + dma-names: + items: + - const: rx + - const: tx + + resets: + maxItems: 1 + +required: + - compatible + - reg + - reg-names + - interrupts + - clocks + - clock-names + - dmas + - dma-names + - resets + +additionalProperties: false + +examples: + - | + #include + #include + #include + + xcvr: xcvr@30cc0000 { + compatible = "fsl,imx8mp-xcvr"; + reg = <0x30cc0000 0x800>, + <0x30cc0800 0x400>, + <0x30cc0c00 0x080>, + <0x30cc0e00 0x080>; + reg-names = "ram", "regs", "rxfifo", "txfifo"; + interrupts = <0x0 128 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&audiomix_clk IMX8MP_CLK_AUDIOMIX_EARC_IPG>, + <&audiomix_clk IMX8MP_CLK_AUDIOMIX_EARC_PHY>, + <&audiomix_clk IMX8MP_CLK_AUDIOMIX_SPBA2_ROOT>, + <&audiomix_clk IMX8MP_CLK_AUDIOMIX_AUDPLL_ROOT>; + clock-names = "ipg", "phy", "spba", "pll_ipg"; + dmas = <&sdma2 30 2 0>, <&sdma2 31 2 0>; + dma-names = "rx", "tx"; + resets = <&audiomix_reset 0>; + }; -- cgit v1.2.3 From f24fd10bea5961629f22e1da0f56e8c918bdb2da Mon Sep 17 00:00:00 2001 From: Olivier Moysan Date: Tue, 20 Oct 2020 17:57:08 +0200 Subject: dt-bindings: stm32: dfsdm: update audio properties - Add missing compatible property in audio node. - Remove obsolete "st,stm32-dfsdm-pdm" compatible. - Remove useless comment in adc io-channels description. Signed-off-by: Olivier Moysan Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201020155709.2621-2-olivier.moysan@st.com Signed-off-by: Mark Brown --- Documentation/devicetree/bindings/iio/adc/st,stm32-dfsdm-adc.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/iio/adc/st,stm32-dfsdm-adc.yaml b/Documentation/devicetree/bindings/iio/adc/st,stm32-dfsdm-adc.yaml index d61bc011e820..6f2398cdc82d 100644 --- a/Documentation/devicetree/bindings/iio/adc/st,stm32-dfsdm-adc.yaml +++ b/Documentation/devicetree/bindings/iio/adc/st,stm32-dfsdm-adc.yaml @@ -199,8 +199,6 @@ patternProperties: description: From common IIO binding. Used to pipe external sigma delta modulator or internal ADC output to DFSDM channel. - This is not required for "st,stm32-dfsdm-pdm" compatibility as - PDM microphone is binded in Audio DT node. required: - io-channels @@ -235,6 +233,10 @@ patternProperties: description: child node properties: + compatible: + enum: + - st,stm32h7-dfsdm-dai + "#sound-dai-cells": const: 0 @@ -244,6 +246,7 @@ patternProperties: modulator or internal ADC output to DFSDM channel. required: + - compatible - "#sound-dai-cells" - io-channels -- cgit v1.2.3 From ea8650730332ee3c707883a2de37756ea9122981 Mon Sep 17 00:00:00 2001 From: Olivier Moysan Date: Tue, 20 Oct 2020 17:57:09 +0200 Subject: ASoC: dt-bindings: stm32: dfsdm: remove stm32-adfsdm.txt binding Device tree audio configuration for STM32 DFSDM is already covered in the following binding: Documentation/devicetree/bindings/iio/adc/st,stm32-dfsdm-adc.yaml Remove stm32-adfsdm.txt obsolete binding. Signed-off-by: Olivier Moysan Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201020155709.2621-3-olivier.moysan@st.com Signed-off-by: Mark Brown --- .../devicetree/bindings/sound/st,stm32-adfsdm.txt | 63 ---------------------- 1 file changed, 63 deletions(-) delete mode 100644 Documentation/devicetree/bindings/sound/st,stm32-adfsdm.txt (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/sound/st,stm32-adfsdm.txt b/Documentation/devicetree/bindings/sound/st,stm32-adfsdm.txt deleted file mode 100644 index 864f5b00b031..000000000000 --- a/Documentation/devicetree/bindings/sound/st,stm32-adfsdm.txt +++ /dev/null @@ -1,63 +0,0 @@ -STMicroelectronics Audio Digital Filter Sigma Delta modulators(DFSDM) - -The DFSDM allows PDM microphones capture through SPI interface. The Audio -interface is seems as a sub block of the DFSDM device. -For details on DFSDM bindings refer to ../iio/adc/st,stm32-dfsdm-adc.txt - -Required properties: - - compatible: "st,stm32h7-dfsdm-dai". - - - #sound-dai-cells : Must be equal to 0 - - - io-channels : phandle to iio dfsdm instance node. - -Example of a sound card using audio DFSDM node. - - sound_card { - compatible = "audio-graph-card"; - - dais = <&cpu_port>; - }; - - dfsdm: dfsdm@40017000 { - compatible = "st,stm32h7-dfsdm"; - reg = <0x40017000 0x400>; - clocks = <&rcc DFSDM1_CK>; - clock-names = "dfsdm"; - #interrupt-cells = <1>; - #address-cells = <1>; - #size-cells = <0>; - - dfsdm_adc0: filter@0 { - compatible = "st,stm32-dfsdm-dmic"; - reg = <0>; - interrupts = <110>; - dmas = <&dmamux1 101 0x400 0x00>; - dma-names = "rx"; - st,adc-channels = <1>; - st,adc-channel-names = "dmic0"; - st,adc-channel-types = "SPI_R"; - st,adc-channel-clk-src = "CLKOUT"; - st,filter-order = <5>; - - dfsdm_dai0: dfsdm-dai { - compatible = "st,stm32h7-dfsdm-dai"; - #sound-dai-cells = <0>; - io-channels = <&dfsdm_adc0 0>; - cpu_port: port { - dfsdm_endpoint: endpoint { - remote-endpoint = <&dmic0_endpoint>; - }; - }; - }; - }; - - dmic0: dmic@0 { - compatible = "dmic-codec"; - #sound-dai-cells = <0>; - port { - dmic0_endpoint: endpoint { - remote-endpoint = <&dfsdm_endpoint>; - }; - }; - }; -- cgit v1.2.3 From 765c37598494cdb6c8f833e8e46f494af5c7d39e Mon Sep 17 00:00:00 2001 From: Srinivas Kandagatla Date: Mon, 26 Oct 2020 17:09:46 +0000 Subject: ASoC: qcom: dt-bindings: Add SM8250 sound card bindings This patch adds bindings required for SM8250 based soundcards for example Qualcomm Robotics RB5 Development Kit which makes use of ADSP and Internal LPASS codec. Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20201026170947.10567-2-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown --- .../devicetree/bindings/sound/qcom,sm8250.yaml | 161 +++++++++++++++++++++ 1 file changed, 161 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/qcom,sm8250.yaml (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/sound/qcom,sm8250.yaml b/Documentation/devicetree/bindings/sound/qcom,sm8250.yaml new file mode 100644 index 000000000000..b8f97fe6e92c --- /dev/null +++ b/Documentation/devicetree/bindings/sound/qcom,sm8250.yaml @@ -0,0 +1,161 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/qcom,sm8250.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm Technologies Inc. SM8250 ASoC sound card driver + +maintainers: + - Srinivas Kandagatla + +description: + This bindings describes SC8250 SoC based sound cards + which uses LPASS internal codec for audio. + +properties: + compatible: + oneOf: + - const: qcom,qrb5165-rb5 + - items: + - const: qcom,sm8250 + - const: qcom,qrb5165-rb5 + + audio-routing: + $ref: /schemas/types.yaml#/definitions/non-unique-string-array + description: + A list of the connections between audio components. Each entry is a + pair of strings, the first being the connection's sink, the second + being the connection's source. Valid names could be power supplies, + MicBias of codec and the jacks on the board. + + model: + $ref: /schemas/types.yaml#/definitions/string + description: User visible long sound card name + +patternProperties: + ".*-dai-link$": + description: + Each subnode represents a dai link. Subnodes of each dai links would be + cpu/codec dais. + + type: object + + properties: + link-name: + description: Indicates dai-link name and PCM stream name. + $ref: /schemas/types.yaml#/definitions/string + maxItems: 1 + + cpu: + description: Holds subnode which indicates cpu dai. + type: object + properties: + sound-dai: true + + platform: + description: Holds subnode which indicates platform dai. + type: object + properties: + sound-dai: true + + codec: + description: Holds subnode which indicates codec dai. + type: object + properties: + sound-dai: true + + required: + - link-name + - cpu + + additionalProperties: false + +required: + - compatible + - model + +additionalProperties: false + +examples: + + - | + #include + #include + sound { + compatible = "qcom,qrb5165-rb5"; + model = "Qualcomm-qrb5165-RB5-WSA8815-Speakers-DMIC0"; + audio-routing = "SpkrLeft IN", "WSA_SPK1 OUT", + "SpkrRight IN", "WSA_SPK2 OUT", + "VA DMIC0", "vdd-micb", + "VA DMIC1", "vdd-micb", + "MM_DL1", "MultiMedia1 Playback", + "MM_DL2", "MultiMedia2 Playback", + "MultiMedia3 Capture", "MM_UL3"; + + mm1-dai-link { + link-name = "MultiMedia0"; + cpu { + sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA1>; + }; + }; + + mm2-dai-link { + link-name = "MultiMedia2"; + cpu { + sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA2>; + }; + }; + + mm3-dai-link { + link-name = "MultiMedia3"; + cpu { + sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA3>; + }; + }; + + hdmi-dai-link { + link-name = "HDMI Playback"; + cpu { + sound-dai = <&q6afedai TERTIARY_MI2S_RX>; + }; + + platform { + sound-dai = <&q6routing>; + }; + + codec { + sound-dai = <<9611_codec 0>; + }; + }; + + wsa-dai-link { + link-name = "WSA Playback"; + cpu { + sound-dai = <&q6afedai WSA_CODEC_DMA_RX_0>; + }; + + platform { + sound-dai = <&q6routing>; + }; + + codec { + sound-dai = <&left_spkr>, <&right_spkr>, <&swr0 0>, <&wsamacro>; + }; + }; + + va-dai-link { + link-name = "VA Capture"; + cpu { + sound-dai = <&q6afedai VA_CODEC_DMA_TX_0>; + }; + + platform { + sound-dai = <&q6routing>; + }; + + codec { + sound-dai = <&vamacro 0>; + }; + }; + }; -- cgit v1.2.3 From 49491418c1dceb11ccb2ab841e4e5590e844378c Mon Sep 17 00:00:00 2001 From: Olivier Moysan Date: Fri, 9 Oct 2020 16:10:51 +0200 Subject: ASoC: dt-bindings: stm32: convert sai to json-schema Convert the STM32 SAI bindings to DT schema format using json-schema. Signed-off-by: Olivier Moysan Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201009141051.27365-1-olivier.moysan@st.com Signed-off-by: Mark Brown --- .../devicetree/bindings/sound/st,stm32-sai.txt | 107 ----------- .../devicetree/bindings/sound/st,stm32-sai.yaml | 200 +++++++++++++++++++++ 2 files changed, 200 insertions(+), 107 deletions(-) delete mode 100644 Documentation/devicetree/bindings/sound/st,stm32-sai.txt create mode 100644 Documentation/devicetree/bindings/sound/st,stm32-sai.yaml (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/sound/st,stm32-sai.txt b/Documentation/devicetree/bindings/sound/st,stm32-sai.txt deleted file mode 100644 index c42b91e525fa..000000000000 --- a/Documentation/devicetree/bindings/sound/st,stm32-sai.txt +++ /dev/null @@ -1,107 +0,0 @@ -STMicroelectronics STM32 Serial Audio Interface (SAI). - -The SAI interface (Serial Audio Interface) offers a wide set of audio protocols -as I2S standards, LSB or MSB-justified, PCM/DSP, TDM, and AC'97. -The SAI contains two independent audio sub-blocks. Each sub-block has -its own clock generator and I/O lines controller. - -Required properties: - - compatible: Should be "st,stm32f4-sai" or "st,stm32h7-sai" - - reg: Base address and size of SAI common register set. - - clocks: Must contain phandle and clock specifier pairs for each entry - in clock-names. - - clock-names: Must contain "pclk" "x8k" and "x11k" - "pclk": Clock which feeds the peripheral bus interface. - Mandatory for "st,stm32h7-sai" compatible. - Not used for "st,stm32f4-sai" compatible. - "x8k": SAI parent clock for sampling rates multiple of 8kHz. - "x11k": SAI parent clock for sampling rates multiple of 11.025kHz. - - interrupts: cpu DAI interrupt line shared by SAI sub-blocks - -Optional properties: - - resets: Reference to a reset controller asserting the SAI - -SAI subnodes: -Two subnodes corresponding to SAI sub-block instances A et B can be defined. -Subnode can be omitted for unsused sub-block. - -SAI subnodes required properties: - - compatible: Should be "st,stm32-sai-sub-a" or "st,stm32-sai-sub-b" - for SAI sub-block A or B respectively. - - reg: Base address and size of SAI sub-block register set. - - clocks: Must contain one phandle and clock specifier pair - for sai_ck which feeds the internal clock generator. - If the SAI shares a master clock, with another SAI set as MCLK - clock provider, SAI provider phandle must be specified here. - - clock-names: Must contain "sai_ck". - Must also contain "MCLK", if SAI shares a master clock, - with a SAI set as MCLK clock provider. - - dmas: see Documentation/devicetree/bindings/dma/st,stm32-dma.yaml - - dma-names: identifier string for each DMA request line - "tx": if sai sub-block is configured as playback DAI - "rx": if sai sub-block is configured as capture DAI - - pinctrl-names: should contain only value "default" - - pinctrl-0: see Documentation/devicetree/bindings/pinctrl/st,stm32-pinctrl.yaml - -SAI subnodes Optional properties: - - st,sync: specify synchronization mode. - By default SAI sub-block is in asynchronous mode. - This property sets SAI sub-block as slave of another SAI sub-block. - Must contain the phandle and index of the sai sub-block providing - the synchronization. - - st,iec60958: support S/PDIF IEC6958 protocol for playback - IEC60958 protocol is not available for capture. - By default, custom protocol is assumed, meaning that protocol is - configured according to protocol defined in related DAI link node, - such as i2s, left justified, right justified, dsp and pdm protocols. - Note: ac97 protocol is not supported by SAI driver - - #clock-cells: should be 0. This property must be present if the SAI device - is a master clock provider, according to clocks bindings, described in - Documentation/devicetree/bindings/clock/clock-bindings.txt. - -The device node should contain one 'port' child node with one child 'endpoint' -node, according to the bindings defined in Documentation/devicetree/bindings/ -graph.txt. - -Example: -sound_card { - compatible = "audio-graph-card"; - dais = <&sai1b_port>; -}; - -sai1: sai1@40015800 { - compatible = "st,stm32h7-sai"; - #address-cells = <1>; - #size-cells = <1>; - ranges = <0 0x40015800 0x400>; - reg = <0x40015800 0x4>; - clocks = <&rcc SAI1_CK>, <&rcc PLL1_Q>, <&rcc PLL2_P>; - clock-names = "pclk", "x8k", "x11k"; - interrupts = <87>; - - sai1a: audio-controller@40015804 { - compatible = "st,stm32-sai-sub-a"; - reg = <0x4 0x1C>; - clocks = <&rcc SAI1_CK>; - clock-names = "sai_ck"; - dmas = <&dmamux1 1 87 0x400 0x0>; - dma-names = "tx"; - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_sai1a>; - - sai1b_port: port { - cpu_endpoint: endpoint { - remote-endpoint = <&codec_endpoint>; - format = "i2s"; - }; - }; - }; -}; - -audio-codec { - codec_port: port { - codec_endpoint: endpoint { - remote-endpoint = <&cpu_endpoint>; - }; - }; -}; diff --git a/Documentation/devicetree/bindings/sound/st,stm32-sai.yaml b/Documentation/devicetree/bindings/sound/st,stm32-sai.yaml new file mode 100644 index 000000000000..6ad48c7681c1 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/st,stm32-sai.yaml @@ -0,0 +1,200 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/st,stm32-sai.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: STMicroelectronics STM32 Serial Audio Interface (SAI) + +maintainers: + - Olivier Moysan + +description: + The SAI interface (Serial Audio Interface) offers a wide set of audio + protocols as I2S standards, LSB or MSB-justified, PCM/DSP, TDM, and AC'97. + The SAI contains two independent audio sub-blocks. Each sub-block has + its own clock generator and I/O lines controller. + +properties: + compatible: + enum: + - st,stm32f4-sai + - st,stm32h7-sai + + reg: + items: + - description: Base address and size of SAI common register set. + - description: Base address and size of SAI identification register set. + minItems: 1 + maxItems: 2 + + ranges: + maxItems: 1 + + interrupts: + maxItems: 1 + + resets: + maxItems: 1 + + "#address-cells": + const: 1 + + "#size-cells": + const: 1 + + clocks: + maxItems: 3 + + clock-names: + maxItems: 3 + +required: + - compatible + - reg + - ranges + - "#address-cells" + - "#size-cells" + - clocks + - clock-names + +patternProperties: + "^audio-controller@[0-9a-f]+$": + type: object + description: + Two subnodes corresponding to SAI sub-block instances A et B + can be defined. Subnode can be omitted for unsused sub-block. + + properties: + compatible: + description: Compatible for SAI sub-block A or B. + pattern: "st,stm32-sai-sub-[ab]" + + "#sound-dai-cells": + const: 0 + + reg: + maxItems: 1 + + clocks: + items: + - description: sai_ck clock feeding the internal clock generator. + - description: MCLK clock from a SAI set as master clock provider. + minItems: 1 + maxItems: 2 + + clock-names: + items: + - const: sai_ck + - const: MCLK + minItems: 1 + maxItems: 2 + + dmas: + maxItems: 1 + + dma-names: + description: | + rx: SAI sub-block is configured as a capture DAI. + tx: SAI sub-block is configured as a playback DAI. + enum: [ rx, tx ] + + st,sync: + description: + Configure the SAI sub-block as slave of another SAI sub-block. + By default SAI sub-block is in asynchronous mode. + Must contain the phandle and index of the SAI sub-block providing + the synchronization. + allOf: + - $ref: /schemas/types.yaml#definitions/phandle-array + - maxItems: 1 + + st,iec60958: + description: + If set, support S/PDIF IEC6958 protocol for playback. + IEC60958 protocol is not available for capture. + By default, custom protocol is assumed, meaning that protocol is + configured according to protocol defined in related DAI link node, + such as i2s, left justified, right justified, dsp and pdm protocols. + allOf: + - $ref: /schemas/types.yaml#definitions/flag + + "#clock-cells": + description: Configure the SAI device as master clock provider. + const: 0 + + required: + - compatible + - "#sound-dai-cells" + - reg + - clocks + - clock-names + - dmas + - dma-names + +allOf: + - if: + properties: + compatible: + contains: + const: st,stm32f4-sai + + - then: + properties: + clocks: + items: + - description: x8k, SAI parent clock for sampling rates multiple of 8kHz. + - description: x11k, SAI parent clock for sampling rates multiple of 11.025kHz. + + clock-names: + items: + - const: x8k + - const: x11k + + - else: + properties: + clocks: + items: + - description: pclk feeds the peripheral bus interface. + - description: x8k, SAI parent clock for sampling rates multiple of 8kHz. + - description: x11k, SAI parent clock for sampling rates multiple of 11.025kHz. + + clock-names: + items: + - const: pclk + - const: x8k + - const: x11k + +additionalProperties: false + +examples: + - | + #include + #include + #include + sai2: sai@4400b000 { + compatible = "st,stm32h7-sai"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0x4400b000 0x400>; + reg = <0x4400b000 0x4>, <0x4400b3f0 0x10>; + clocks = <&rcc SAI2>, <&rcc PLL3_Q>, <&rcc PLL3_R>; + clock-names = "pclk", "x8k", "x11k"; + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&sai2a_pins_a>, <&sai2b_pins_b>; + pinctrl-1 = <&sai2a_sleep_pins_a>, <&sai2b_sleep_pins_b>; + status = "okay"; + + sai2a: audio-controller@4400b004 { + #sound-dai-cells = <0>; + compatible = "st,stm32-sai-sub-a"; + reg = <0x4 0x1c>; + dmas = <&dmamux1 89 0x400 0x01>; + dma-names = "tx"; + clocks = <&rcc SAI2_K>; + clock-names = "sai_ck"; + status = "okay"; + }; + }; + +... -- cgit v1.2.3 From 87b2fc1139a13cf81d0a95fb2cbaba7daeee8908 Mon Sep 17 00:00:00 2001 From: Shengjiu Wang Date: Thu, 15 Oct 2020 13:28:47 +0800 Subject: ASoC: dt-bindings: fsl_spdif: Add new compatible string for i.MX8QM Add new compatible string "fsl,imx8qm-spdif" for supporting spdif module on i.MX8QM. Signed-off-by: Shengjiu Wang Acked-by: Rob Herring Link: https://lore.kernel.org/r/1602739728-4433-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown --- Documentation/devicetree/bindings/sound/fsl,spdif.yaml | 1 + 1 file changed, 1 insertion(+) (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/sound/fsl,spdif.yaml b/Documentation/devicetree/bindings/sound/fsl,spdif.yaml index 2ac671f5cb9b..50449b6d1048 100644 --- a/Documentation/devicetree/bindings/sound/fsl,spdif.yaml +++ b/Documentation/devicetree/bindings/sound/fsl,spdif.yaml @@ -20,6 +20,7 @@ properties: - fsl,imx35-spdif - fsl,vf610-spdif - fsl,imx6sx-spdif + - fsl,imx8qm-spdif reg: maxItems: 1 -- cgit v1.2.3 From e158d2d83cab59ec7f4661548627ac171c797c9d Mon Sep 17 00:00:00 2001 From: Cheng-Yi Chiang Date: Tue, 27 Oct 2020 11:22:33 +0800 Subject: ASoC: google: dt-bindings: Add sc7180-trogdor machine bindings Add devicetree bindings documentation file for sc7180 sound card. Signed-off-by: Cheng-Yi Chiang Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20201027032234.1705835-2-cychiang@chromium.org Signed-off-by: Mark Brown --- .../bindings/sound/google,sc7180-trogdor.yaml | 130 +++++++++++++++++++++ 1 file changed, 130 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/google,sc7180-trogdor.yaml (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/sound/google,sc7180-trogdor.yaml b/Documentation/devicetree/bindings/sound/google,sc7180-trogdor.yaml new file mode 100644 index 000000000000..efc34689d6b5 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/google,sc7180-trogdor.yaml @@ -0,0 +1,130 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/google,sc7180-trogdor.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Google SC7180-Trogdor ASoC sound card driver + +maintainers: + - Rohit kumar + - Cheng-Yi Chiang + +description: + This binding describes the SC7180 sound card which uses LPASS for audio. + +properties: + compatible: + const: google,sc7180-trogdor + + audio-routing: + $ref: /schemas/types.yaml#/definitions/non-unique-string-array + description: + A list of the connections between audio components. Each entry is a + pair of strings, the first being the connection's sink, the second + being the connection's source. + + model: + $ref: /schemas/types.yaml#/definitions/string + description: User specified audio sound card name + + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + +patternProperties: + "^dai-link(@[0-9])?$": + description: + Each subnode represents a dai link. Subnodes of each dai links would be + cpu/codec dais. + + type: object + + properties: + link-name: + description: Indicates dai-link name and PCM stream name. + $ref: /schemas/types.yaml#/definitions/string + maxItems: 1 + + reg: + description: dai link address. + + cpu: + description: Holds subnode which indicates cpu dai. + type: object + properties: + sound-dai: true + + codec: + description: Holds subnode which indicates codec dai. + type: object + properties: + sound-dai: true + + required: + - link-name + - cpu + - codec + + additionalProperties: false + +required: + - compatible + - model + - "#address-cells" + - "#size-cells" + +additionalProperties: false + +examples: + + - | + sound { + compatible = "google,sc7180-trogdor"; + model = "sc7180-rt5682-max98357a-1mic"; + + audio-routing = + "Headphone Jack", "HPOL", + "Headphone Jack", "HPOR"; + + #address-cells = <1>; + #size-cells = <0>; + + dai-link@0 { + link-name = "MultiMedia0"; + reg = <0>; + cpu { + sound-dai = <&lpass_cpu 0>; + }; + + codec { + sound-dai = <&alc5682 0>; + }; + }; + + dai-link@1 { + link-name = "MultiMedia1"; + reg = <1>; + cpu { + sound-dai = <&lpass_cpu 1>; + }; + + codec { + sound-dai = <&max98357a>; + }; + }; + + dai-link@2 { + link-name = "MultiMedia2"; + reg = <2>; + cpu { + sound-dai = <&lpass_hdmi 0>; + }; + + codec { + sound-dai = <&msm_dp>; + }; + }; + }; -- cgit v1.2.3 From a889583a19206636082c44625141b26392e46a62 Mon Sep 17 00:00:00 2001 From: Srinivas Kandagatla Date: Thu, 29 Oct 2020 10:15:49 +0000 Subject: ASoC: qcom: dt-bindings: sm8250: update compatibles Update compatible string as board compatible and device compatible should not be same!. New compatible is now suffixed with -sndcard to be inline with other Qualcomm Sound cards. This also fixes the warnings/error reported by dt_binding_check. Fixes: 765c37598494 ("ASoC: qcom: dt-bindings: Add SM8250 sound card bindings") Reported-by: Rob Herring Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20201029101550.31695-1-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown --- Documentation/devicetree/bindings/sound/qcom,sm8250.yaml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/sound/qcom,sm8250.yaml b/Documentation/devicetree/bindings/sound/qcom,sm8250.yaml index b8f97fe6e92c..72ad9ab91832 100644 --- a/Documentation/devicetree/bindings/sound/qcom,sm8250.yaml +++ b/Documentation/devicetree/bindings/sound/qcom,sm8250.yaml @@ -16,10 +16,8 @@ description: properties: compatible: oneOf: - - const: qcom,qrb5165-rb5 - - items: - - const: qcom,sm8250 - - const: qcom,qrb5165-rb5 + - const: qcom,sm8250-sndcard + - const: qcom,qrb5165-rb5-sndcard audio-routing: $ref: /schemas/types.yaml#/definitions/non-unique-string-array @@ -83,7 +81,7 @@ examples: #include #include sound { - compatible = "qcom,qrb5165-rb5"; + compatible = "qcom,qrb5165-rb5-sndcard"; model = "Qualcomm-qrb5165-RB5-WSA8815-Speakers-DMIC0"; audio-routing = "SpkrLeft IN", "WSA_SPK1 OUT", "SpkrRight IN", "WSA_SPK2 OUT", -- cgit v1.2.3 From e84f44ba4604e55a51e7caf01464f220d0eabef4 Mon Sep 17 00:00:00 2001 From: Jernej Skrabec Date: Fri, 30 Oct 2020 15:46:43 +0100 Subject: ASoC: sun4i-i2s: Add H6 compatible MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit H6 I2S is very similar to H3, except that it supports up to 16 channels and thus few registers have fields on different position. Signed-off-by: Jernej Skrabec Signed-off-by: Marcus Cooper Acked-by: Maxime Ripard Acked-by: Rob Herring Acked-by: Chen-Yu Tsai Signed-off-by: Clément Péron Link: https://lore.kernel.org/r/20201030144648.397824-11-peron.clem@gmail.com Signed-off-by: Mark Brown --- Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-i2s.yaml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-i2s.yaml b/Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-i2s.yaml index 112ae00d63c1..606ad2d884a8 100644 --- a/Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-i2s.yaml +++ b/Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-i2s.yaml @@ -24,6 +24,7 @@ properties: - items: - const: allwinner,sun50i-a64-i2s - const: allwinner,sun8i-h3-i2s + - const: allwinner,sun50i-h6-i2s reg: maxItems: 1 @@ -59,6 +60,7 @@ allOf: - allwinner,sun8i-a83t-i2s - allwinner,sun8i-h3-i2s - allwinner,sun50i-a64-codec-i2s + - allwinner,sun50i-h6-i2s then: required: -- cgit v1.2.3 From 0bc1bf241de551842535c3d0b080e0f38c11aed1 Mon Sep 17 00:00:00 2001 From: Clément Péron Date: Fri, 30 Oct 2020 15:46:47 +0100 Subject: ASoC: sun4i-i2s: Document H3 with missing RX channel possibility MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Like A83T the Allwinner H3 doesn't have the DMA reception available for some audio interfaces. As it's already documented for A83T convert this to an enum and add the H3 interface. Acked-by: Rob Herring Signed-off-by: Clément Péron Link: https://lore.kernel.org/r/20201030144648.397824-15-peron.clem@gmail.com Signed-off-by: Mark Brown --- Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-i2s.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-i2s.yaml b/Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-i2s.yaml index 606ad2d884a8..a16e37b01e1d 100644 --- a/Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-i2s.yaml +++ b/Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-i2s.yaml @@ -70,7 +70,9 @@ allOf: properties: compatible: contains: - const: allwinner,sun8i-a83t-i2s + enum: + - allwinner,sun8i-a83t-i2s + - allwinner,sun8i-h3-i2s then: properties: -- cgit v1.2.3 From 1afc60e00de3abbb6c559da409c5c1bb8c1d98ec Mon Sep 17 00:00:00 2001 From: Jiaxin Yu Date: Tue, 3 Nov 2020 15:59:36 +0800 Subject: dt-bindings: mediatek: mt8192: add audio afe document This patch adds mt8192 audio afe document. Signed-off-by: Jiaxin Yu Link: https://lore.kernel.org/r/1604390378-23993-8-git-send-email-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown --- .../devicetree/bindings/sound/mt8192-afe-pcm.yaml | 100 +++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/mt8192-afe-pcm.yaml (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/sound/mt8192-afe-pcm.yaml b/Documentation/devicetree/bindings/sound/mt8192-afe-pcm.yaml new file mode 100644 index 000000000000..0170c93802d2 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/mt8192-afe-pcm.yaml @@ -0,0 +1,100 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/mt8192-afe-pcm.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Mediatek AFE PCM controller for mt8192 + +maintainers: + - Jiaxin Yu + - Shane Chien + +properties: + compatible: + const: mediatek,mt8192-audio + + interrupts: + maxItems: 1 + + resets: + maxItems: 1 + + reset-names: + const: audiosys + + mediatek,apmixedsys: + $ref: "/schemas/types.yaml#/definitions/phandle" + description: The phandle of the mediatek apmixedsys controller + + mediatek,infracfg: + $ref: "/schemas/types.yaml#/definitions/phandle" + description: The phandle of the mediatek infracfg controller + + mediatek,topckgen: + $ref: "/schemas/types.yaml#/definitions/phandle" + description: The phandle of the mediatek topckgen controller + + power-domains: + maxItems: 1 + + clocks: + items: + - description: AFE clock + - description: ADDA DAC clock + - description: ADDA DAC pre-distortion clock + - description: audio infra sys clock + - description: audio infra 26M clock + + clock-names: + items: + - const: aud_afe_clk + - const: aud_dac_clk + - const: aud_dac_predis_clk + - const: aud_infra_clk + - const: aud_infra_26m_clk + +required: + - compatible + - interrupts + - resets + - reset-names + - mediatek,apmixedsys + - mediatek,infracfg + - mediatek,topckgen + - power-domains + - clocks + - clock-names + +additionalProperties: false + +examples: + - | + #include + #include + #include + #include + #include + + afe: mt8192-afe-pcm { + compatible = "mediatek,mt8192-audio"; + interrupts = ; + resets = <&watchdog MT8192_TOPRGU_AUDIO_SW_RST>; + reset-names = "audiosys"; + mediatek,apmixedsys = <&apmixedsys>; + mediatek,infracfg = <&infracfg>; + mediatek,topckgen = <&topckgen>; + power-domains = <&scpsys MT8192_POWER_DOMAIN_AUDIO>; + clocks = <&audsys CLK_AUD_AFE>, + <&audsys CLK_AUD_DAC>, + <&audsys CLK_AUD_DAC_PREDIS>, + <&infracfg CLK_INFRA_AUDIO>, + <&infracfg CLK_INFRA_AUDIO_26M_B>; + clock-names = "aud_afe_clk", + "aud_dac_clk", + "aud_dac_predis_clk", + "aud_infra_clk", + "aud_infra_26m_clk"; + }; + +... -- cgit v1.2.3 From 4a232122124bcbc241b8099c2f98a62c79699324 Mon Sep 17 00:00:00 2001 From: Jiaxin Yu Date: Tue, 3 Nov 2020 15:59:38 +0800 Subject: dt-bindings: mediatek: mt8192: add mt8192-mt6358-rt1015-rt5682 document This patch adds document for the machine board with mt6358, rt1015 and rt5682. Signed-off-by: Jiaxin Yu Link: https://lore.kernel.org/r/1604390378-23993-10-git-send-email-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown --- .../sound/mt8192-mt6359-rt1015-rt5682.yaml | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/mt8192-mt6359-rt1015-rt5682.yaml (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/sound/mt8192-mt6359-rt1015-rt5682.yaml b/Documentation/devicetree/bindings/sound/mt8192-mt6359-rt1015-rt5682.yaml new file mode 100644 index 000000000000..342232a61cfb --- /dev/null +++ b/Documentation/devicetree/bindings/sound/mt8192-mt6359-rt1015-rt5682.yaml @@ -0,0 +1,42 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/mt8192-mt6359-rt1015-rt5682.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Mediatek MT8192 with MT6359, RT1015 and RT5682 ASoC sound card driver + +maintainers: + - Jiaxin Yu + - Shane Chien + +description: + This binding describes the MT8192 sound card. + +properties: + compatible: + const: mediatek,mt8192_mt6359_rt1015_rt5682 + + mediatek,platform: + $ref: "/schemas/types.yaml#/definitions/phandle" + description: The phandle of MT8192 ASoC platform. + +additionalProperties: false + +required: + - compatible + - mediatek,platform + +examples: + - | + + sound: mt8192-sound { + compatible = "mediatek,mt8192-mt6359-rt1015-rt5682"; + mediatek,platform = <&afe>; + pinctrl-names = "aud_clk_mosi_off", + "aud_clk_mosi_on"; + pinctrl-0 = <&aud_clk_mosi_off>; + pinctrl-1 = <&aud_clk_mosi_on>; + }; + +... -- cgit v1.2.3 From 40f4c56d08f2a95f4f3b036987f171dde69ddd36 Mon Sep 17 00:00:00 2001 From: Shengjiu Wang Date: Mon, 2 Nov 2020 09:52:26 +0800 Subject: ASoC: dt-bindings: fsl_aud2htx: Add binding doc for aud2htx module AUD2HTX (Audio Subsystem TO HDMI TX Subsystem) is a new IP module found on i.MX8MP. Signed-off-by: Shengjiu Wang Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/1604281947-26874-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown --- .../devicetree/bindings/sound/fsl,aud2htx.yaml | 66 ++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/fsl,aud2htx.yaml (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/sound/fsl,aud2htx.yaml b/Documentation/devicetree/bindings/sound/fsl,aud2htx.yaml new file mode 100644 index 000000000000..aa4be7170717 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/fsl,aud2htx.yaml @@ -0,0 +1,66 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/fsl,aud2htx.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NXP Audio Subsystem to HDMI RTX Subsystem Controller + +maintainers: + - Shengjiu Wang + +properties: + compatible: + const: fsl,imx8mp-aud2htx + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + items: + - description: Peripheral clock + + clock-names: + items: + - const: bus + + dmas: + items: + - description: DMA controller phandle and request line for TX + + dma-names: + items: + - const: tx + + power-domains: + maxItems: 1 + +required: + - compatible + - reg + - interrupts + - clocks + - clock-names + - dmas + - dma-names + +additionalProperties: false + +examples: + - | + #include + #include + + aud2htx: aud2htx@30cb0000 { + compatible = "fsl,imx8mp-aud2htx"; + reg = <0x30cb0000 0x10000>; + interrupts = ; + clocks = <&audiomix_clk IMX8MP_CLK_AUDIOMIX_AUD2HTX_IPG>; + clock-names = "bus"; + dmas = <&sdma2 26 2 0>; + dma-names = "tx"; + power-domains = <&audiomix_pd>; + }; -- cgit v1.2.3 From 97198614f6c3b019299b1189106478ffb58481c9 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Thu, 5 Nov 2020 15:04:57 +0900 Subject: ASoC: audio-graph-card: switch to yaml base Documentation This patch switches from .txt base to .yaml base Document. Signed-off-by: Kuninori Morimoto Acked-by: Sameer Pujar Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/87d00sbawh.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown --- .../devicetree/bindings/sound/audio-graph-card.txt | 337 --------------------- .../bindings/sound/audio-graph-card.yaml | 153 ++++++++++ 2 files changed, 153 insertions(+), 337 deletions(-) delete mode 100644 Documentation/devicetree/bindings/sound/audio-graph-card.txt create mode 100644 Documentation/devicetree/bindings/sound/audio-graph-card.yaml (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/sound/audio-graph-card.txt b/Documentation/devicetree/bindings/sound/audio-graph-card.txt deleted file mode 100644 index d5f6919a2d69..000000000000 --- a/Documentation/devicetree/bindings/sound/audio-graph-card.txt +++ /dev/null @@ -1,337 +0,0 @@ -Audio Graph Card: - -Audio Graph Card specifies audio DAI connections of SoC <-> codec. -It is based on common bindings for device graphs. -see ${LINUX}/Documentation/devicetree/bindings/graph.txt - -Basically, Audio Graph Card property is same as Simple Card. -see ${LINUX}/Documentation/devicetree/bindings/sound/simple-card.yaml - -Below are same as Simple-Card. - -- label -- widgets -- routing -- dai-format -- frame-master -- bitclock-master -- bitclock-inversion -- frame-inversion -- mclk-fs -- hp-det-gpio -- mic-det-gpio -- dai-tdm-slot-num -- dai-tdm-slot-width -- clocks / system-clock-frequency - -Required properties: - -- compatible : "audio-graph-card"; -- dais : list of CPU DAI port{s} - -Optional properties: -- pa-gpios: GPIO used to control external amplifier. - ------------------------ -Example: Single DAI case ------------------------ - - sound_card { - compatible = "audio-graph-card"; - - dais = <&cpu_port>; - }; - - dai-controller { - ... - cpu_port: port { - cpu_endpoint: endpoint { - remote-endpoint = <&codec_endpoint>; - - dai-format = "left_j"; - ... - }; - }; - }; - - audio-codec { - ... - port { - codec_endpoint: endpoint { - remote-endpoint = <&cpu_endpoint>; - }; - }; - }; - ------------------------ -Example: Multi DAI case ------------------------ - - sound-card { - compatible = "audio-graph-card"; - - label = "sound-card"; - - dais = <&cpu_port0 - &cpu_port1 - &cpu_port2>; - }; - - audio-codec@0 { - ... - port { - codec0_endpoint: endpoint { - remote-endpoint = <&cpu_endpoint0>; - }; - }; - }; - - audio-codec@1 { - ... - port { - codec1_endpoint: endpoint { - remote-endpoint = <&cpu_endpoint1>; - }; - }; - }; - - audio-codec@2 { - ... - port { - codec2_endpoint: endpoint { - remote-endpoint = <&cpu_endpoint2>; - }; - }; - }; - - dai-controller { - ... - ports { - cpu_port0: port@0 { - cpu_endpoint0: endpoint { - remote-endpoint = <&codec0_endpoint>; - - dai-format = "left_j"; - ... - }; - }; - cpu_port1: port@1 { - cpu_endpoint1: endpoint { - remote-endpoint = <&codec1_endpoint>; - - dai-format = "i2s"; - ... - }; - }; - cpu_port2: port@2 { - cpu_endpoint2: endpoint { - remote-endpoint = <&codec2_endpoint>; - - dai-format = "i2s"; - ... - }; - }; - }; - }; - - ------------------------ -Example: Sampling Rate Conversion ------------------------ - - sound_card { - compatible = "audio-graph-card"; - - label = "sound-card"; - prefix = "codec"; - routing = "codec Playback", "DAI0 Playback", - "DAI0 Capture", "codec Capture"; - convert-rate = <48000>; - - dais = <&cpu_port>; - }; - - audio-codec { - ... - port { - codec_endpoint: endpoint { - remote-endpoint = <&cpu_endpoint>; - }; - }; - }; - - dai-controller { - ... - cpu_port: port { - cpu_endpoint: endpoint { - remote-endpoint = <&codec_endpoint>; - - dai-format = "left_j"; - ... - }; - }; - }; - ------------------------ -Example: 2 CPU 1 Codec (Mixing) ------------------------ - - sound_card { - compatible = "audio-graph-card"; - - label = "sound-card"; - routing = "codec Playback", "DAI0 Playback", - "codec Playback", "DAI1 Playback", - "DAI0 Capture", "codec Capture"; - - dais = <&cpu_port>; - }; - - audio-codec { - ... - - audio-graph-card,prefix = "codec"; - audio-graph-card,convert-rate = <48000>; - port { - reg = <0>; - codec_endpoint0: endpoint@0 { - remote-endpoint = <&cpu_endpoint0>; - }; - codec_endpoint1: endpoint@1 { - remote-endpoint = <&cpu_endpoint1>; - }; - }; - }; - - dai-controller { - ... - cpu_port: port { - cpu_endpoint0: endpoint@0 { - remote-endpoint = <&codec_endpoint0>; - - dai-format = "left_j"; - ... - }; - cpu_endpoint1: endpoint@1 { - remote-endpoint = <&codec_endpoint1>; - - dai-format = "left_j"; - ... - }; - }; - }; - ------------------------ -Example: Multi DAI with DPCM ------------------------ - - CPU0 ------ ak4613 - CPU1 ------ HDMI - CPU2 ------ PCM3168A-p /* DPCM 1ch/2ch */ - CPU3 --/ /* DPCM 3ch/4ch */ - CPU4 --/ /* DPCM 5ch/6ch */ - CPU5 --/ /* DPCM 7ch/8ch */ - CPU6 ------ PCM3168A-c - - sound_card: sound { - compatible = "audio-graph-card"; - - label = "sound-card"; - - routing = "pcm3168a Playback", "DAI2 Playback", - "pcm3168a Playback", "DAI3 Playback", - "pcm3168a Playback", "DAI4 Playback", - "pcm3168a Playback", "DAI5 Playback"; - - dais = <&snd_port0 /* ak4613 */ - &snd_port1 /* HDMI0 */ - &snd_port2 /* pcm3168a playback */ - &snd_port3 /* pcm3168a capture */ - >; - }; - - ak4613: codec@10 { - ... - port { - ak4613_endpoint: endpoint { - remote-endpoint = <&rsnd_endpoint0>; - }; - }; - }; - - pcm3168a: audio-codec@44 { - ... - audio-graph-card,prefix = "pcm3168a"; - audio-graph-card,convert-channels = <8>; /* TDM Split */ - ports { - port@0 { - reg = <0>; - pcm3168a_endpoint_p1: endpoint@1 { - remote-endpoint = <&rsnd_endpoint2>; - ... - }; - pcm3168a_endpoint_p2: endpoint@2 { - remote-endpoint = <&rsnd_endpoint3>; - ... - }; - pcm3168a_endpoint_p3: endpoint@3 { - remote-endpoint = <&rsnd_endpoint4>; - ... - }; - pcm3168a_endpoint_p4: endpoint@4 { - remote-endpoint = <&rsnd_endpoint5>; - ... - }; - }; - port@1 { - reg = <1>; - pcm3168a_endpoint_c: endpoint { - remote-endpoint = <&rsnd_endpoint6>; - ... - }; - }; - }; - }; - - &sound { - ports { - snd_port0: port@0 { - rsnd_endpoint0: endpoint { - remote-endpoint = <&ak4613_endpoint>; - ... - }; - }; - snd_port1: port@1 { - rsnd_endpoint1: endpoint { - remote-endpoint = <&dw_hdmi0_snd_in>; - ... - }; - }; - snd_port2: port@2 { - #address-cells = <1>; - #size-cells = <0>; - rsnd_endpoint2: endpoint@2 { - remote-endpoint = <&pcm3168a_endpoint_p1>; - ... - }; - rsnd_endpoint3: endpoint@3 { - remote-endpoint = <&pcm3168a_endpoint_p2>; - ... - }; - rsnd_endpoint4: endpoint@4 { - remote-endpoint = <&pcm3168a_endpoint_p3>; - ... - }; - rsnd_endpoint5: endpoint@5 { - remote-endpoint = <&pcm3168a_endpoint_p4>; - ... - }; - }; - snd_port3: port@6 { - rsnd_endpoint6: endpoint { - remote-endpoint = <&pcm3168a_endpoint_c>; - ... - }; - }; - }; - }; diff --git a/Documentation/devicetree/bindings/sound/audio-graph-card.yaml b/Documentation/devicetree/bindings/sound/audio-graph-card.yaml new file mode 100644 index 000000000000..2329aeb91db7 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/audio-graph-card.yaml @@ -0,0 +1,153 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/audio-graph-card.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Audio Graph Card Driver Device Tree Bindings + +maintainers: + - Kuninori Morimoto + +properties: + compatible: + enum: + - audio-graph-card + - audio-graph-scu-card + + dais: + $ref: /schemas/types.yaml#/definitions/phandle-array + label: + maxItems: 1 + prefix: + description: "device name prefix" + $ref: /schemas/types.yaml#/definitions/string + routing: + description: | + A list of the connections between audio components. + Each entry is a pair of strings, the first being the + connection's sink, the second being the connection's source. + $ref: /schemas/types.yaml#/definitions/non-unique-string-array + widgets: + description: User specified audio sound widgets. + $ref: /schemas/types.yaml#/definitions/non-unique-string-array + convert-rate: + description: CPU to Codec rate convert. + $ref: /schemas/types.yaml#/definitions/uint32 + convert-channels: + description: CPU to Codec rate channels. + $ref: /schemas/types.yaml#/definitions/uint32 + pa-gpios: + maxItems: 1 + hp-det-gpio: + maxItems: 1 + mic-det-gpio: + maxItems: 1 + + port: + description: single OF-Graph subnode + type: object + properties: + reg: + maxItems: 1 + prefix: + description: "device name prefix" + $ref: /schemas/types.yaml#/definitions/string + convert-rate: + description: CPU to Codec rate convert. + $ref: /schemas/types.yaml#/definitions/uint32 + convert-channels: + description: CPU to Codec rate channels. + $ref: /schemas/types.yaml#/definitions/uint32 + patternProperties: + "^endpoint(@[0-9a-f]+)?": + type: object + properties: + remote-endpoint: + maxItems: 1 + mclk-fs: + description: | + Multiplication factor between stream rate and codec mclk. + When defined, mclk-fs property defined in dai-link sub nodes are ignored. + $ref: /schemas/types.yaml#/definitions/uint32 + frame-inversion: + description: dai-link uses frame clock inversion + $ref: /schemas/types.yaml#/definitions/flag + bitclock-inversion: + description: dai-link uses bit clock inversion + $ref: /schemas/types.yaml#/definitions/flag + frame-master: + description: Indicates dai-link frame master. + $ref: /schemas/types.yaml#/definitions/phandle-array + maxItems: 1 + bitclock-master: + description: Indicates dai-link bit clock master + $ref: /schemas/types.yaml#/definitions/phandle-array + maxItems: 1 + dai-format: + description: audio format. + items: + enum: + - i2s + - right_j + - left_j + - dsp_a + - dsp_b + - ac97 + - pdm + - msb + - lsb + convert-rate: + description: CPU to Codec rate convert. + $ref: /schemas/types.yaml#/definitions/uint32 + convert-channels: + description: CPU to Codec rate channels. + $ref: /schemas/types.yaml#/definitions/uint32 + required: + - remote-endpoint + + ports: + description: multi OF-Graph subnode + type: object + patternProperties: + "^port(@[0-9a-f]+)?": + $ref: "#/properties/port" + +required: + - compatible + - dais + +additionalProperties: false + +examples: + - | + sound { + compatible = "audio-graph-card"; + + dais = <&cpu_port_a>; + }; + + cpu { + /* + * dai-controller own settings + */ + + port { + cpu_endpoint: endpoint { + remote-endpoint = <&codec_endpoint>; + dai-format = "left_j"; + }; + }; + }; + + codec { + /* + * codec own settings + */ + + port { + codec_endpoint: endpoint { + remote-endpoint = <&cpu_endpoint>; + }; + }; + }; -- cgit v1.2.3 From 2d8fc973646c8ae87b668e30730becc8b1a57a06 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Thu, 5 Nov 2020 15:05:10 +0900 Subject: ASoC: renesas, rsnd: switch to yaml base Documentation This patch switches from .txt base to .yaml base Document. It is still keeping detail explanations at .txt Signed-off-by: Kuninori Morimoto Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/87blgcbaw4.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown --- .../devicetree/bindings/sound/renesas,rsnd.txt | 520 --------------------- .../devicetree/bindings/sound/renesas,rsnd.yaml | 450 ++++++++++++++++++ 2 files changed, 450 insertions(+), 520 deletions(-) create mode 100644 Documentation/devicetree/bindings/sound/renesas,rsnd.yaml (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.txt b/Documentation/devicetree/bindings/sound/renesas,rsnd.txt index b39743d3f7c4..b731f16aea84 100644 --- a/Documentation/devicetree/bindings/sound/renesas,rsnd.txt +++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.txt @@ -253,523 +253,3 @@ This is example of TDM 6ch. Driver can automatically switches TDM <-> stereo mode in this case. see "Example: simple sound card for TDM" - -============================================= -Required properties: -============================================= - -- compatible : "renesas,rcar_sound-", fallbacks - "renesas,rcar_sound-gen1" if generation1, and - "renesas,rcar_sound-gen2" if generation2 (or RZ/G1) - "renesas,rcar_sound-gen3" if generation3 (or RZ/G2) - Examples with soctypes are: - - "renesas,rcar_sound-r8a7742" (RZ/G1H) - - "renesas,rcar_sound-r8a7743" (RZ/G1M) - - "renesas,rcar_sound-r8a7744" (RZ/G1N) - - "renesas,rcar_sound-r8a7745" (RZ/G1E) - - "renesas,rcar_sound-r8a77470" (RZ/G1C) - - "renesas,rcar_sound-r8a774a1" (RZ/G2M) - - "renesas,rcar_sound-r8a774b1" (RZ/G2N) - - "renesas,rcar_sound-r8a774c0" (RZ/G2E) - - "renesas,rcar_sound-r8a774e1" (RZ/G2H) - - "renesas,rcar_sound-r8a7778" (R-Car M1A) - - "renesas,rcar_sound-r8a7779" (R-Car H1) - - "renesas,rcar_sound-r8a7790" (R-Car H2) - - "renesas,rcar_sound-r8a7791" (R-Car M2-W) - - "renesas,rcar_sound-r8a7793" (R-Car M2-N) - - "renesas,rcar_sound-r8a7794" (R-Car E2) - - "renesas,rcar_sound-r8a7795" (R-Car H3) - - "renesas,rcar_sound-r8a7796" (R-Car M3-W) - - "renesas,rcar_sound-r8a77965" (R-Car M3-N) - - "renesas,rcar_sound-r8a77990" (R-Car E3) - - "renesas,rcar_sound-r8a77995" (R-Car D3) -- reg : Should contain the register physical address. - required register is - SRU/ADG/SSI if generation1 - SRU/ADG/SSIU/SSI/AUDIO-DMAC-periperi if generation2/generation3 - Select extended AUDIO-DMAC-periperi address if SoC has it, - otherwise select normal AUDIO-DMAC-periperi address. -- reg-names : Should contain the register names. - scu/adg/ssi if generation1 - scu/adg/ssiu/ssi/audmapp if generation2/generation3 -- rcar_sound,ssi : Should contain SSI feature. - The number of SSI subnode should be same as HW. - see below for detail. -- rcar_sound,ssiu : Should contain SSIU feature. - The number of SSIU subnode should be same as HW. - see below for detail. -- rcar_sound,src : Should contain SRC feature. - The number of SRC subnode should be same as HW. - see below for detail. -- rcar_sound,ctu : Should contain CTU feature. - The number of CTU subnode should be same as HW. - see below for detail. -- rcar_sound,mix : Should contain MIX feature. - The number of MIX subnode should be same as HW. - see below for detail. -- rcar_sound,dvc : Should contain DVC feature. - The number of DVC subnode should be same as HW. - see below for detail. -- rcar_sound,dai : DAI contents. - The number of DAI subnode should be same as HW. - see below for detail. -- #sound-dai-cells : it must be 0 if your system is using single DAI - it must be 1 if your system is using multi DAI -- clocks : References to SSI/SRC/MIX/CTU/DVC/AUDIO_CLK clocks. -- clock-names : List of necessary clock names. - "ssi-all", "ssi.X", "src.X", "mix.X", "ctu.X", - "dvc.X", "clk_a", "clk_b", "clk_c", "clk_i" - -Optional properties: -- #clock-cells : it must be 0 if your system has audio_clkout - it must be 1 if your system has audio_clkout0/1/2/3 -- clock-frequency : for all audio_clkout0/1/2/3 -- clkout-lr-asynchronous : boolean property. it indicates that audio_clkoutn - is asynchronizes with lr-clock. -- resets : References to SSI resets. -- reset-names : List of valid reset names. - "ssi-all", "ssi.X" - -SSI subnode properties: -- interrupts : Should contain SSI interrupt for PIO transfer -- shared-pin : if shared clock pin -- pio-transfer : use PIO transfer mode -- no-busif : BUSIF is not ussed when [mem -> SSI] via DMA case -- dma : Should contain Audio DMAC entry -- dma-names : SSI case "rx" (=playback), "tx" (=capture) - Deprecated: see SSIU subnode properties - SSIU case "rxu" (=playback), "txu" (=capture) - -SSIU subnode properties: -- dma : Should contain Audio DMAC entry -- dma-names : "rx" (=playback), "tx" (=capture) - -SRC subnode properties: -- dma : Should contain Audio DMAC entry -- dma-names : "rx" (=playback), "tx" (=capture) - -DVC subnode properties: -- dma : Should contain Audio DMAC entry -- dma-names : "tx" (=playback/capture) - -DAI subnode properties: -- playback : list of playback modules -- capture : list of capture modules - - -============================================= -Example: -============================================= - -rcar_sound: sound@ec500000 { - #sound-dai-cells = <1>; - compatible = "renesas,rcar_sound-r8a7791", "renesas,rcar_sound-gen2"; - reg = <0 0xec500000 0 0x1000>, /* SCU */ - <0 0xec5a0000 0 0x100>, /* ADG */ - <0 0xec540000 0 0x1000>, /* SSIU */ - <0 0xec541000 0 0x1280>, /* SSI */ - <0 0xec740000 0 0x200>; /* Audio DMAC peri peri*/ - reg-names = "scu", "adg", "ssiu", "ssi", "audmapp"; - - clocks = <&mstp10_clks R8A7790_CLK_SSI_ALL>, - <&mstp10_clks R8A7790_CLK_SSI9>, <&mstp10_clks R8A7790_CLK_SSI8>, - <&mstp10_clks R8A7790_CLK_SSI7>, <&mstp10_clks R8A7790_CLK_SSI6>, - <&mstp10_clks R8A7790_CLK_SSI5>, <&mstp10_clks R8A7790_CLK_SSI4>, - <&mstp10_clks R8A7790_CLK_SSI3>, <&mstp10_clks R8A7790_CLK_SSI2>, - <&mstp10_clks R8A7790_CLK_SSI1>, <&mstp10_clks R8A7790_CLK_SSI0>, - <&mstp10_clks R8A7790_CLK_SCU_SRC9>, <&mstp10_clks R8A7790_CLK_SCU_SRC8>, - <&mstp10_clks R8A7790_CLK_SCU_SRC7>, <&mstp10_clks R8A7790_CLK_SCU_SRC6>, - <&mstp10_clks R8A7790_CLK_SCU_SRC5>, <&mstp10_clks R8A7790_CLK_SCU_SRC4>, - <&mstp10_clks R8A7790_CLK_SCU_SRC3>, <&mstp10_clks R8A7790_CLK_SCU_SRC2>, - <&mstp10_clks R8A7790_CLK_SCU_SRC1>, <&mstp10_clks R8A7790_CLK_SCU_SRC0>, - <&mstp10_clks R8A7790_CLK_SCU_DVC0>, <&mstp10_clks R8A7790_CLK_SCU_DVC1>, - <&audio_clk_a>, <&audio_clk_b>, <&audio_clk_c>, <&m2_clk>; - clock-names = "ssi-all", - "ssi.9", "ssi.8", "ssi.7", "ssi.6", "ssi.5", - "ssi.4", "ssi.3", "ssi.2", "ssi.1", "ssi.0", - "src.9", "src.8", "src.7", "src.6", "src.5", - "src.4", "src.3", "src.2", "src.1", "src.0", - "dvc.0", "dvc.1", - "clk_a", "clk_b", "clk_c", "clk_i"; - - rcar_sound,dvc { - dvc0: dvc-0 { - dmas = <&audma0 0xbc>; - dma-names = "tx"; - }; - dvc1: dvc-1 { - dmas = <&audma0 0xbe>; - dma-names = "tx"; - }; - }; - - rcar_sound,mix { - mix0: mix-0 { }; - mix1: mix-1 { }; - }; - - rcar_sound,ctu { - ctu00: ctu-0 { }; - ctu01: ctu-1 { }; - ctu02: ctu-2 { }; - ctu03: ctu-3 { }; - ctu10: ctu-4 { }; - ctu11: ctu-5 { }; - ctu12: ctu-6 { }; - ctu13: ctu-7 { }; - }; - - rcar_sound,src { - src0: src-0 { - interrupts = <0 352 IRQ_TYPE_LEVEL_HIGH>; - dmas = <&audma0 0x85>, <&audma1 0x9a>; - dma-names = "rx", "tx"; - }; - src1: src-1 { - interrupts = <0 353 IRQ_TYPE_LEVEL_HIGH>; - dmas = <&audma0 0x87>, <&audma1 0x9c>; - dma-names = "rx", "tx"; - }; - src2: src-2 { - interrupts = <0 354 IRQ_TYPE_LEVEL_HIGH>; - dmas = <&audma0 0x89>, <&audma1 0x9e>; - dma-names = "rx", "tx"; - }; - src3: src-3 { - interrupts = <0 355 IRQ_TYPE_LEVEL_HIGH>; - dmas = <&audma0 0x8b>, <&audma1 0xa0>; - dma-names = "rx", "tx"; - }; - src4: src-4 { - interrupts = <0 356 IRQ_TYPE_LEVEL_HIGH>; - dmas = <&audma0 0x8d>, <&audma1 0xb0>; - dma-names = "rx", "tx"; - }; - src5: src-5 { - interrupts = <0 357 IRQ_TYPE_LEVEL_HIGH>; - dmas = <&audma0 0x8f>, <&audma1 0xb2>; - dma-names = "rx", "tx"; - }; - src6: src-6 { - interrupts = <0 358 IRQ_TYPE_LEVEL_HIGH>; - dmas = <&audma0 0x91>, <&audma1 0xb4>; - dma-names = "rx", "tx"; - }; - src7: src-7 { - interrupts = <0 359 IRQ_TYPE_LEVEL_HIGH>; - dmas = <&audma0 0x93>, <&audma1 0xb6>; - dma-names = "rx", "tx"; - }; - src8: src-8 { - interrupts = <0 360 IRQ_TYPE_LEVEL_HIGH>; - dmas = <&audma0 0x95>, <&audma1 0xb8>; - dma-names = "rx", "tx"; - }; - src9: src-9 { - interrupts = <0 361 IRQ_TYPE_LEVEL_HIGH>; - dmas = <&audma0 0x97>, <&audma1 0xba>; - dma-names = "rx", "tx"; - }; - }; - - rcar_sound,ssiu { - ssiu00: ssiu-0 { - dmas = <&audma0 0x15>, <&audma1 0x16>; - dma-names = "rx", "tx"; - }; - ssiu01: ssiu-1 { - dmas = <&audma0 0x35>, <&audma1 0x36>; - dma-names = "rx", "tx"; - }; - - ... - - ssiu95: ssiu-49 { - dmas = <&audma0 0xA5>, <&audma1 0xA6>; - dma-names = "rx", "tx"; - }; - ssiu96: ssiu-50 { - dmas = <&audma0 0xA7>, <&audma1 0xA8>; - dma-names = "rx", "tx"; - }; - ssiu97: ssiu-51 { - dmas = <&audma0 0xA9>, <&audma1 0xAA>; - dma-names = "rx", "tx"; - }; - }; - - rcar_sound,ssi { - ssi0: ssi-0 { - interrupts = <0 370 IRQ_TYPE_LEVEL_HIGH>; - dmas = <&audma0 0x01>, <&audma1 0x02>; - dma-names = "rx", "tx"; - }; - ssi1: ssi-1 { - interrupts = <0 371 IRQ_TYPE_LEVEL_HIGH>; - dmas = <&audma0 0x03>, <&audma1 0x04>; - dma-names = "rx", "tx"; - }; - - ... - - ssi8: ssi-8 { - interrupts = <0 378 IRQ_TYPE_LEVEL_HIGH>; - dmas = <&audma0 0x11>, <&audma1 0x12>; - dma-names = "rx", "tx"; - }; - ssi9: ssi-9 { - interrupts = <0 379 IRQ_TYPE_LEVEL_HIGH>; - dmas = <&audma0 0x13>, <&audma1 0x14>; - dma-names = "rx", "tx"; - }; - }; - - rcar_sound,dai { - dai0 { - playback = <&ssi5 &src5>; - capture = <&ssi6>; - }; - dai1 { - playback = <&ssi3>; - }; - dai2 { - capture = <&ssi4>; - }; - dai3 { - playback = <&ssi7>; - }; - dai4 { - capture = <&ssi8>; - }; - }; -}; - -============================================= -Example: simple sound card -============================================= - - rsnd_ak4643: sound { - compatible = "simple-audio-card"; - - simple-audio-card,format = "left_j"; - simple-audio-card,bitclock-master = <&sndcodec>; - simple-audio-card,frame-master = <&sndcodec>; - - sndcpu: simple-audio-card,cpu { - sound-dai = <&rcar_sound>; - }; - - sndcodec: simple-audio-card,codec { - sound-dai = <&ak4643>; - clocks = <&audio_clock>; - }; - }; - -&rcar_sound { - pinctrl-0 = <&sound_pins &sound_clk_pins>; - pinctrl-names = "default"; - - /* Single DAI */ - #sound-dai-cells = <0>; - - - rcar_sound,dai { - dai0 { - playback = <&ssi0 &src2 &dvc0>; - capture = <&ssi1 &src3 &dvc1>; - }; - }; -}; - -&ssi1 { - shared-pin; -}; - -============================================= -Example: simple sound card for Asynchronous mode -============================================= - -sound { - compatible = "simple-scu-audio-card"; - ... - /* - * SRC Asynchronous mode setting - * Playback: - * All input data will be converted to 48kHz - * Capture: - * Inputed 48kHz data will be converted to - * system specified Hz - */ - simple-audio-card,convert-rate = <48000>; - ... - simple-audio-card,cpu { - sound-dai = <&rcar_sound>; - }; - simple-audio-card,codec { - ... - }; -}; - -============================================= -Example: simple sound card for channel convert -============================================= - -sound { - compatible = "simple-scu-audio-card"; - ... - /* - * CTU setting - * All input data will be converted to 2ch - * as output data - */ - simple-audio-card,convert-channels = <2>; - ... - simple-audio-card,cpu { - sound-dai = <&rcar_sound>; - }; - simple-audio-card,codec { - ... - }; -}; - -============================================= -Example: simple sound card for MIXer -============================================= - -sound { - compatible = "simple-scu-audio-card"; - ... - simple-audio-card,cpu@0 { - sound-dai = <&rcar_sound 0>; - }; - simple-audio-card,cpu@1 { - sound-dai = <&rcar_sound 1>; - }; - simple-audio-card,codec { - ... - }; -}; - -&rcar_sound { - ... - rcar_sound,dai { - dai0 { - playback = <&src1 &ctu02 &mix0 &dvc0 &ssi0>; - }; - dai1 { - playback = <&src2 &ctu03 &mix0 &dvc0 &ssi0>; - }; - }; -}; - -============================================= -Example: simple sound card for TDM -============================================= - -rsnd_tdm: sound { - compatible = "simple-audio-card"; - - simple-audio-card,format = "left_j"; - simple-audio-card,bitclock-master = <&sndcodec>; - simple-audio-card,frame-master = <&sndcodec>; - - sndcpu: simple-audio-card,cpu { - sound-dai = <&rcar_sound>; - dai-tdm-slot-num = <6>; - }; - - sndcodec: simple-audio-card,codec { - sound-dai = <&xxx>; - }; -}; - -============================================= -Example: simple sound card for TDM Split -============================================= - -sound_card: sound { - compatible = "audio-graph-scu-card"; - prefix = "xxxx"; - routing = "xxxx Playback", "DAI0 Playback", - "xxxx Playback", "DAI1 Playback", - "xxxx Playback", "DAI2 Playback", - "xxxx Playback", "DAI3 Playback"; - convert-channels = <8>; /* TDM Split */ - - dais = <&rsnd_port0 /* playback ch1/ch2 */ - &rsnd_port1 /* playback ch3/ch4 */ - &rsnd_port2 /* playback ch5/ch6 */ - &rsnd_port3 /* playback ch7/ch8 */ - >; -}; - -audio-codec { - ... - port { - codec_0: endpoint@1 { - remote-endpoint = <&rsnd_ep0>; - }; - codec_1: endpoint@2 { - remote-endpoint = <&rsnd_ep1>; - }; - codec_2: endpoint@3 { - remote-endpoint = <&rsnd_ep2>; - }; - codec_3: endpoint@4 { - remote-endpoint = <&rsnd_ep3>; - }; - }; -}; - -&rcar_sound { - ... - ports { - rsnd_port0: port@0 { - rsnd_ep0: endpoint { - remote-endpoint = <&codec_0>; - ... - playback = <&ssiu30 &ssi3>; - }; - }; - rsnd_port1: port@1 { - rsnd_ep1: endpoint { - remote-endpoint = <&codec_1>; - ... - playback = <&ssiu31 &ssi3>; - }; - }; - rsnd_port2: port@2 { - rsnd_ep2: endpoint { - remote-endpoint = <&codec_2>; - ... - playback = <&ssiu32 &ssi3>; - }; - }; - rsnd_port3: port@3 { - rsnd_ep3: endpoint { - remote-endpoint = <&codec_3>; - ... - playback = <&ssiu33 &ssi3>; - }; - }; - }; -}; - -============================================= -Example: simple sound card for Multi channel -============================================= - -&rcar_sound { - pinctrl-0 = <&sound_pins &sound_clk_pins>; - pinctrl-names = "default"; - - /* Single DAI */ - #sound-dai-cells = <0>; - - - rcar_sound,dai { - dai0 { - playback = <&ssi0 &ssi1 &ssi2 &src0 &dvc0>; - }; - }; -}; diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml new file mode 100644 index 000000000000..ae41370f952c --- /dev/null +++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml @@ -0,0 +1,450 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/renesas,rsnd.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Renesas R-Car Sound Driver Device Tree Bindings + +maintainers: + - Kuninori Morimoto + +properties: + + compatible: + oneOf: + # for Gen1 SoC + - items: + - enum: + - renesas,rcar_sound-r8a7778 # R-Car M1A + - renesas,rcar_sound-r8a7779 # R-Car H1 + - enum: + - renesas,rcar_sound-gen1 + # for Gen2 SoC + - items: + - enum: + - renesas,rcar_sound-r8a7742 # RZ/G1H + - renesas,rcar_sound-r8a7743 # RZ/G1M + - renesas,rcar_sound-r8a7744 # RZ/G1N + - renesas,rcar_sound-r8a7745 # RZ/G1E + - renesas,rcar_sound-r8a77470 # RZ/G1C + - renesas,rcar_sound-r8a7790 # R-Car H2 + - renesas,rcar_sound-r8a7791 # R-Car M2-W + - renesas,rcar_sound-r8a7793 # R-Car M2-N + - renesas,rcar_sound-r8a7794 # R-Car E2 + - enum: + - renesas,rcar_sound-gen2 + # for Gen3 SoC + - items: + - enum: + - renesas,rcar_sound-r8a774a1 # RZ/G2M + - renesas,rcar_sound-r8a774b1 # RZ/G2N + - renesas,rcar_sound-r8a774c0 # RZ/G2E + - renesas,rcar_sound-r8a774e1 # RZ/G2H + - renesas,rcar_sound-r8a7795 # R-Car H3 + - renesas,rcar_sound-r8a7796 # R-Car M3-W + - renesas,rcar_sound-r8a77965 # R-Car M3-N + - renesas,rcar_sound-r8a77990 # R-Car E3 + - renesas,rcar_sound-r8a77995 # R-Car D3 + - enum: + - renesas,rcar_sound-gen3 + # for Generic + - items: + - enum: + - renesas,rcar_sound-gen1 + - renesas,rcar_sound-gen2 + - renesas,rcar_sound-gen3 + + reg: + minItems: 1 + maxItems: 5 + + reg-names: + minItems: 1 + maxItems: 5 + + "#sound-dai-cells": + description: | + it must be 0 if your system is using single DAI + it must be 1 if your system is using multi DAIs + enum: [0, 1] + + "#clock-cells": + description: | + it must be 0 if your system has audio_clkout + it must be 1 if your system has audio_clkout0/1/2/3 + enum: [0, 1] + + clock-frequency: + description: for audio_clkout0/1/2/3 + $ref: /schemas/types.yaml#/definitions/uint32-array + + clkout-lr-asynchronous: + description: audio_clkoutn is asynchronizes with lr-clock. + $ref: /schemas/types.yaml#/definitions/flag + + power-domains: true + + resets: + maxItems: 11 + + reset-names: + maxItems: 11 + + clocks: + description: References to SSI/SRC/MIX/CTU/DVC/AUDIO_CLK clocks. + minItems: 1 + maxItems: 31 + + clock-names: + description: List of necessary clock names. + minItems: 1 + maxItems: 31 + items: + oneOf: + - const: ssi-all + - pattern: '^ssi\.[0-9]$' + - pattern: '^src\.[0-9]$' + - pattern: '^mix\.[0-1]$' + - pattern: '^ctu\.[0-1]$' + - pattern: '^dvc\.[0-1]$' + - pattern: '^clk_(a|b|c|i)$' + + port: + description: OF-Graph subnode + $ref: "audio-graph-card.yaml#/properties/port" + + ports: + description: multi OF-Graph subnode + $ref: "audio-graph-card.yaml#/properties/ports" + +# use patternProperties to avoid naming "xxx,yyy" issue +patternProperties: + "^rcar_sound,dvc$": + description: DVC subnode. + type: object + patternProperties: + "^dvc-[0-1]$": + type: object + properties: + dmas: + maxItems: 1 + dma-names: + const: "tx" + required: + - dmas + - dma-names + additionalProperties: false + + "^rcar_sound,mix$": + description: MIX subnode. + type: object + patternProperties: + "^mix-[0-1]$": + type: object + # no properties + additionalProperties: false + + "^rcar_sound,ctu$": + description: CTU subnode. + type: object + patternProperties: + "^ctu-[0-7]$": + type: object + # no properties + additionalProperties: false + + "^rcar_sound,src$": + description: SRC subnode. + type: object + patternProperties: + "^src-[0-9]$": + type: object + properties: + interrupts: + maxItems: 1 + dmas: + maxItems: 2 + dma-names: + allOf: + - items: + enum: + - tx + - rx + required: + - interrupts + - dmas + - dma-names + additionalProperties: false + + "^rcar_sound,ssiu$": + description: SSIU subnode. + type: object + patternProperties: + "^ssiu-[0-9]+$": + type: object + properties: + dmas: + maxItems: 2 + dma-names: + allOf: + - items: + enum: + - tx + - rx + required: + - dmas + - dma-names + additionalProperties: false + + "^rcar_sound,ssi$": + description: SSI subnode. + type: object + patternProperties: + "^ssi-[0-9]$": + type: object + properties: + interrupts: + maxItems: 1 + dmas: + minItems: 2 + maxItems: 4 + dma-names: + allOf: + - items: + enum: + - tx + - rx + - txu # if no ssiu node + - rxu # if no ssiu node + + shared-pin: + description: shared clock pin + $ref: /schemas/types.yaml#/definitions/flag + pio-transfer: + description: PIO transfer mode + $ref: /schemas/types.yaml#/definitions/flag + no-busif: + description: BUSIF is not used when [mem -> SSI] via DMA case + $ref: /schemas/types.yaml#/definitions/flag + required: + - interrupts + - dmas + - dma-names + additionalProperties: false + + # For DAI base + "^rcar_sound,dai$": + description: DAI subnode. + type: object + patternProperties: + "^dai([0-9]+)?$": + type: object + properties: + playback: + $ref: /schemas/types.yaml#/definitions/phandle-array + capture: + $ref: /schemas/types.yaml#/definitions/phandle-array + anyOf: + - required: + - playback + - required: + - capture + additionalProperties: false + +required: + - compatible + - reg + - reg-names + - clocks + - clock-names + - "#sound-dai-cells" + +allOf: + - if: + properties: + compatible: + contains: + const: renesas,rcar_sound-gen1 + then: + properties: + reg: + maxItems: 3 + reg-names: + maxItems: 3 + items: + enum: + - scu + - ssi + - adg + else: + properties: + reg: + maxItems: 5 + reg-names: + maxItems: 5 + items: + enum: + - scu + - adg + - ssiu + - ssi + - audmapp + +additionalProperties: false + +examples: + - | + rcar_sound: sound@ec500000 { + #sound-dai-cells = <1>; + compatible = "renesas,rcar_sound-r8a7790", "renesas,rcar_sound-gen2"; + reg = <0xec500000 0x1000>, /* SCU */ + <0xec5a0000 0x100>, /* ADG */ + <0xec540000 0x1000>, /* SSIU */ + <0xec541000 0x1280>, /* SSI */ + <0xec740000 0x200>; /* Audio DMAC peri peri*/ + reg-names = "scu", "adg", "ssiu", "ssi", "audmapp"; + + clocks = <&mstp10_clks 1005>, /* SSI-ALL */ + <&mstp10_clks 1006>, <&mstp10_clks 1007>, /* SSI9, SSI8 */ + <&mstp10_clks 1008>, <&mstp10_clks 1009>, /* SSI7, SSI6 */ + <&mstp10_clks 1010>, <&mstp10_clks 1011>, /* SSI5, SSI4 */ + <&mstp10_clks 1012>, <&mstp10_clks 1013>, /* SSI3, SSI2 */ + <&mstp10_clks 1014>, <&mstp10_clks 1015>, /* SSI1, SSI0 */ + <&mstp10_clks 1022>, <&mstp10_clks 1023>, /* SRC9, SRC8 */ + <&mstp10_clks 1024>, <&mstp10_clks 1025>, /* SRC7, SRC6 */ + <&mstp10_clks 1026>, <&mstp10_clks 1027>, /* SRC5, SRC4 */ + <&mstp10_clks 1028>, <&mstp10_clks 1029>, /* SRC3, SRC2 */ + <&mstp10_clks 1030>, <&mstp10_clks 1031>, /* SRC1, SRC0 */ + <&mstp10_clks 1020>, <&mstp10_clks 1021>, /* MIX1, MIX0 */ + <&mstp10_clks 1020>, <&mstp10_clks 1021>, /* CTU1, CTU0 */ + <&mstp10_clks 1019>, <&mstp10_clks 1018>, /* DVC0, DVC1 */ + <&audio_clk_a>, <&audio_clk_b>, /* CLKA, CLKB */ + <&audio_clk_c>, <&audio_clk_i>; /* CLKC, CLKI */ + + clock-names = "ssi-all", + "ssi.9", "ssi.8", + "ssi.7", "ssi.6", + "ssi.5", "ssi.4", + "ssi.3", "ssi.2", + "ssi.1", "ssi.0", + "src.9", "src.8", + "src.7", "src.6", + "src.5", "src.4", + "src.3", "src.2", + "src.1", "src.0", + "mix.1", "mix.0", + "ctu.1", "ctu.0", + "dvc.0", "dvc.1", + "clk_a", "clk_b", + "clk_c", "clk_i"; + + rcar_sound,dvc { + dvc0: dvc-0 { + dmas = <&audma0 0xbc>; + dma-names = "tx"; + }; + dvc1: dvc-1 { + dmas = <&audma0 0xbe>; + dma-names = "tx"; + }; + }; + + rcar_sound,mix { + mix0: mix-0 { }; + mix1: mix-1 { }; + }; + + rcar_sound,ctu { + ctu00: ctu-0 { }; + ctu01: ctu-1 { }; + ctu02: ctu-2 { }; + ctu03: ctu-3 { }; + ctu10: ctu-4 { }; + ctu11: ctu-5 { }; + ctu12: ctu-6 { }; + ctu13: ctu-7 { }; + }; + + rcar_sound,src { + src0: src-0 { + status = "disabled"; + }; + src1: src-1 { + interrupts = <0 353 0>; + dmas = <&audma0 0x87>, <&audma1 0x9c>; + dma-names = "rx", "tx"; + }; + /* skip after src-2 */ + }; + + rcar_sound,ssiu { + ssiu00: ssiu-0 { + dmas = <&audma0 0x15>, <&audma1 0x16>; + dma-names = "rx", "tx"; + }; + ssiu01: ssiu-1 { + dmas = <&audma0 0x35>, <&audma1 0x36>; + dma-names = "rx", "tx"; + }; + /* skip after ssiu-2 */ + }; + + rcar_sound,ssi { + ssi0: ssi-0 { + interrupts = <0 370 1>; + dmas = <&audma0 0x01>, <&audma1 0x02>; + dma-names = "rx", "tx"; + }; + ssi1: ssi-1 { + interrupts = <0 371 1>; + dmas = <&audma0 0x03>, <&audma1 0x04>; + dma-names = "rx", "tx"; + }; + /* skip other ssi-2 */ + }; + + /* DAI base */ + rcar_sound,dai { + dai0 { + playback = <&ssi5 &src5>; + capture = <&ssi6>; + }; + dai1 { + playback = <&ssi3>; + }; + dai2 { + capture = <&ssi4>; + }; + dai3 { + playback = <&ssi7>; + }; + dai4 { + capture = <&ssi8>; + }; + }; + + /* assume audio-graph */ + port { + rsnd_endpoint: endpoint { + remote-endpoint = <&codec_endpoint>; + + dai-format = "left_j"; + bitclock-master = <&rsnd_endpoint0>; + frame-master = <&rsnd_endpoint0>; + + playback = <&ssi0 &src0 &dvc0>; + capture = <&ssi1 &src1 &dvc1>; + }; + }; + }; + + + /* assume audio-graph */ + codec { + port { + codec_endpoint: endpoint { + remote-endpoint = <&rsnd_endpoint>; + }; + }; + }; -- cgit v1.2.3 From 8d96ec9ba9e7bd606d5d0fead9f91f0c5a3366a0 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Thu, 5 Nov 2020 15:05:23 +0900 Subject: ASoC: renesas,rsnd: Add r8a77961 support Document R-Car M3-W+ (R8A77961) SoC bindings. Signed-off-by: Kuninori Morimoto Acked-by: Rob Herring Link: https://lore.kernel.org/r/87a6vwbavq.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown --- Documentation/devicetree/bindings/sound/renesas,rsnd.yaml | 1 + 1 file changed, 1 insertion(+) (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml index ae41370f952c..51f4dcaa970d 100644 --- a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml +++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml @@ -43,6 +43,7 @@ properties: - renesas,rcar_sound-r8a774e1 # RZ/G2H - renesas,rcar_sound-r8a7795 # R-Car H3 - renesas,rcar_sound-r8a7796 # R-Car M3-W + - renesas,rcar_sound-r8a77961 # R-Car M3-W+ - renesas,rcar_sound-r8a77965 # R-Car M3-N - renesas,rcar_sound-r8a77990 # R-Car E3 - renesas,rcar_sound-r8a77995 # R-Car D3 -- cgit v1.2.3 From 08651373808e16b01d3b12207f52504c17b6774c Mon Sep 17 00:00:00 2001 From: "Shane.Chien" Date: Tue, 10 Nov 2020 10:31:32 +0800 Subject: dt-bindings: mediatek: mt6359: Add new property for mt6359 This patch add "LDO_VAUD18-supply" property to control vaud18 regulator. It is labeled as required due to mt6359 audio path always need to enable vaud18. Signed-off-by: Shane.Chien Link: https://lore.kernel.org/r/1604975492-6142-3-git-send-email-shane.chien@mediatek.com Signed-off-by: Mark Brown --- Documentation/devicetree/bindings/sound/mt6359.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/sound/mt6359.yaml b/Documentation/devicetree/bindings/sound/mt6359.yaml index a54f466f769d..ef027c79032f 100644 --- a/Documentation/devicetree/bindings/sound/mt6359.yaml +++ b/Documentation/devicetree/bindings/sound/mt6359.yaml @@ -17,6 +17,11 @@ description: | Must be a child node of PMIC wrapper. properties: + LDO_VAUD18-supply: + $ref: /schemas/types.yaml#/definitions/phandle + description: | + Regulator of LDO VAUD18 at 1.8V. + mediatek,dmic-mode: $ref: /schemas/types.yaml#/definitions/uint32 description: | @@ -49,11 +54,15 @@ properties: description: | Specifies the type of mic type connected to adc2 +required: + - LDO_VAUD18-supply + additionalProperties: false examples: - | mt6359codec: mt6359codec { + LDO_VAUD18-supply = <&mt6359p_vaud18_reg>; mediatek,dmic-mode = <0>; mediatek,mic-type-0 = <2>; }; -- cgit v1.2.3 From 0e38d93493c7b11bc250113dd5b7b9d17ba8c54d Mon Sep 17 00:00:00 2001 From: Ajye Huang Date: Fri, 6 Nov 2020 14:14:32 +0800 Subject: ASoC: google: dt-bindings: modify machine bindings for two MICs case Add a property "dmic-gpios" for switching between two MICs. Signed-off-by: Ajye Huang Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201106061433.1483129-2-ajye_huang@compal.corp-partner.google.com Signed-off-by: Mark Brown --- .../devicetree/bindings/sound/google,sc7180-trogdor.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/sound/google,sc7180-trogdor.yaml b/Documentation/devicetree/bindings/sound/google,sc7180-trogdor.yaml index efc34689d6b5..ce050a9dec94 100644 --- a/Documentation/devicetree/bindings/sound/google,sc7180-trogdor.yaml +++ b/Documentation/devicetree/bindings/sound/google,sc7180-trogdor.yaml @@ -34,6 +34,10 @@ properties: "#size-cells": const: 0 + dmic-gpios: + maxItems: 1 + description: GPIO for switching between DMICs + patternProperties: "^dai-link(@[0-9])?$": description: @@ -83,7 +87,7 @@ examples: - | sound { compatible = "google,sc7180-trogdor"; - model = "sc7180-rt5682-max98357a-1mic"; + model = "sc7180-rt5682-max98357a-2mic"; audio-routing = "Headphone Jack", "HPOL", @@ -92,6 +96,8 @@ examples: #address-cells = <1>; #size-cells = <0>; + dmic-gpios = <&tlmm 86 0>; + dai-link@0 { link-name = "MultiMedia0"; reg = <0>; -- cgit v1.2.3 From 4d1a9952dda649284413e6ff12b81db3a2bc4115 Mon Sep 17 00:00:00 2001 From: David Lin Date: Mon, 2 Nov 2020 10:32:13 +0800 Subject: ASoC: nau8315: add codec driver Add codec driver for Nuvoton NAU8315. Signed-off-by: David Lin Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20201102023212.594137-1-CTLIN0@nuvoton.com Signed-off-by: Mark Brown --- .../devicetree/bindings/sound/nau8315.txt | 18 +++ sound/soc/codecs/Kconfig | 5 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/nau8315.c | 166 +++++++++++++++++++++ 4 files changed, 191 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/nau8315.txt create mode 100644 sound/soc/codecs/nau8315.c (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/sound/nau8315.txt b/Documentation/devicetree/bindings/sound/nau8315.txt new file mode 100644 index 000000000000..6eaec46f384c --- /dev/null +++ b/Documentation/devicetree/bindings/sound/nau8315.txt @@ -0,0 +1,18 @@ +Nuvoton NAU8315 Mono Class-D Amplifier + +Required properties: +- compatible : "nuvoton,nau8315" + +Optional properties: +- enable-gpios : GPIO specifier for the chip's device enable input(EN) pin. + If this option is not specified then driver does not manage + the pin state (e.g. chip is always on). + +Example: + +#include + +nau8315 { + compatible = "nuvoton,nau8315"; + enable-gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>; +}; diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig index 5791b7056af6..2b6eceb3573c 100644 --- a/sound/soc/codecs/Kconfig +++ b/sound/soc/codecs/Kconfig @@ -130,6 +130,7 @@ config SND_SOC_ALL_CODECS imply SND_SOC_MT6358 imply SND_SOC_MT6359 imply SND_SOC_MT6660 + imply SND_SOC_NAU8315 imply SND_SOC_NAU8540 imply SND_SOC_NAU8810 imply SND_SOC_NAU8822 @@ -1760,6 +1761,10 @@ config SND_SOC_MT6660 Select N if you don't have MT6660 on board. Select M to build this as module. +config SND_SOC_NAU8315 + tristate "Nuvoton Technology Corporation NAU8315 CODEC" + depends on GPIOLIB + config SND_SOC_NAU8540 tristate "Nuvoton Technology Corporation NAU85L40 CODEC" depends on I2C diff --git a/sound/soc/codecs/Makefile b/sound/soc/codecs/Makefile index 11ce98c25d6c..144d9256d4d5 100644 --- a/sound/soc/codecs/Makefile +++ b/sound/soc/codecs/Makefile @@ -129,6 +129,7 @@ snd-soc-mt6351-objs := mt6351.o snd-soc-mt6358-objs := mt6358.o snd-soc-mt6359-objs := mt6359.o snd-soc-mt6660-objs := mt6660.o +snd-soc-nau8315-objs := nau8315.o snd-soc-nau8540-objs := nau8540.o snd-soc-nau8810-objs := nau8810.o snd-soc-nau8822-objs := nau8822.o @@ -438,6 +439,7 @@ obj-$(CONFIG_SND_SOC_MT6351) += snd-soc-mt6351.o obj-$(CONFIG_SND_SOC_MT6358) += snd-soc-mt6358.o obj-$(CONFIG_SND_SOC_MT6359) += snd-soc-mt6359.o obj-$(CONFIG_SND_SOC_MT6660) += snd-soc-mt6660.o +obj-$(CONFIG_SND_SOC_NAU8315) += snd-soc-nau8315.o obj-$(CONFIG_SND_SOC_NAU8540) += snd-soc-nau8540.o obj-$(CONFIG_SND_SOC_NAU8810) += snd-soc-nau8810.o obj-$(CONFIG_SND_SOC_NAU8822) += snd-soc-nau8822.o diff --git a/sound/soc/codecs/nau8315.c b/sound/soc/codecs/nau8315.c new file mode 100644 index 000000000000..e6bc5c0a5036 --- /dev/null +++ b/sound/soc/codecs/nau8315.c @@ -0,0 +1,166 @@ +// SPDX-License-Identifier: GPL-2.0-only +// +// nau8315.c -- NAU8315 ALSA SoC Audio Amplifier Driver +// +// Copyright 2020 Nuvoton Technology Crop. +// +// Author: David Lin +// +// Based on MAX98357A.c + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +struct nau8315_priv { + struct gpio_desc *enable; + int enpin_switch; +}; + +static int nau8315_daiops_trigger(struct snd_pcm_substream *substream, + int cmd, struct snd_soc_dai *dai) +{ + struct snd_soc_component *component = dai->component; + struct nau8315_priv *nau8315 = + snd_soc_component_get_drvdata(component); + + if (!nau8315->enable) + return 0; + + switch (cmd) { + case SNDRV_PCM_TRIGGER_START: + case SNDRV_PCM_TRIGGER_RESUME: + case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: + if (nau8315->enpin_switch) { + gpiod_set_value(nau8315->enable, 1); + dev_dbg(component->dev, "set enable to 1"); + } + break; + case SNDRV_PCM_TRIGGER_STOP: + case SNDRV_PCM_TRIGGER_SUSPEND: + case SNDRV_PCM_TRIGGER_PAUSE_PUSH: + gpiod_set_value(nau8315->enable, 0); + dev_dbg(component->dev, "set enable to 0"); + break; + } + + return 0; +} + +static int nau8315_enpin_event(struct snd_soc_dapm_widget *w, + struct snd_kcontrol *kcontrol, int event) +{ + struct snd_soc_component *component = + snd_soc_dapm_to_component(w->dapm); + struct nau8315_priv *nau8315 = + snd_soc_component_get_drvdata(component); + + if (event & SND_SOC_DAPM_POST_PMU) + nau8315->enpin_switch = 1; + else if (event & SND_SOC_DAPM_POST_PMD) + nau8315->enpin_switch = 0; + + return 0; +} + +static const struct snd_soc_dapm_widget nau8315_dapm_widgets[] = { + SND_SOC_DAPM_OUTPUT("Speaker"), + SND_SOC_DAPM_OUT_DRV_E("EN_Pin", SND_SOC_NOPM, 0, 0, NULL, 0, + nau8315_enpin_event, + SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD), +}; + +static const struct snd_soc_dapm_route nau8315_dapm_routes[] = { + {"EN_Pin", NULL, "HiFi Playback"}, + {"Speaker", NULL, "EN_Pin"}, +}; + +static const struct snd_soc_component_driver nau8315_component_driver = { + .dapm_widgets = nau8315_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(nau8315_dapm_widgets), + .dapm_routes = nau8315_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(nau8315_dapm_routes), + .idle_bias_on = 1, + .use_pmdown_time = 1, + .endianness = 1, + .non_legacy_dai_naming = 1, +}; + +static const struct snd_soc_dai_ops nau8315_dai_ops = { + .trigger = nau8315_daiops_trigger, +}; + +#define NAU8315_RATES SNDRV_PCM_RATE_8000_96000 +#define NAU8315_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_3LE) + +static struct snd_soc_dai_driver nau8315_dai_driver = { + .name = "nau8315-hifi", + .playback = { + .stream_name = "HiFi Playback", + .formats = NAU8315_FORMATS, + .rates = NAU8315_RATES, + .channels_min = 1, + .channels_max = 2, + }, + .ops = &nau8315_dai_ops, +}; + +static int nau8315_platform_probe(struct platform_device *pdev) +{ + struct nau8315_priv *nau8315; + + nau8315 = devm_kzalloc(&pdev->dev, sizeof(*nau8315), GFP_KERNEL); + if (!nau8315) + return -ENOMEM; + + nau8315->enable = devm_gpiod_get_optional(&pdev->dev, + "enable", GPIOD_OUT_LOW); + if (IS_ERR(nau8315->enable)) + return PTR_ERR(nau8315->enable); + + dev_set_drvdata(&pdev->dev, nau8315); + + return devm_snd_soc_register_component(&pdev->dev, + &nau8315_component_driver, + &nau8315_dai_driver, 1); +} + +#ifdef CONFIG_OF +static const struct of_device_id nau8315_device_id[] = { + { .compatible = "nuvoton,nau8315" }, + {} +}; +MODULE_DEVICE_TABLE(of, nau8315_device_id); +#endif + +#ifdef CONFIG_ACPI +static const struct acpi_device_id nau8315_acpi_match[] = { + { "NVTN2010", 0 }, + {}, +}; +MODULE_DEVICE_TABLE(acpi, nau8315_acpi_match); +#endif + +static struct platform_driver nau8315_platform_driver = { + .driver = { + .name = "nau8315", + .of_match_table = of_match_ptr(nau8315_device_id), + .acpi_match_table = ACPI_PTR(nau8315_acpi_match), + }, + .probe = nau8315_platform_probe, +}; +module_platform_driver(nau8315_platform_driver); + +MODULE_DESCRIPTION("ASoC NAU8315 Mono Class-D Amplifier Driver"); +MODULE_AUTHOR("David Lin "); +MODULE_LICENSE("GPL v2"); -- cgit v1.2.3 From 80e2b1208d87fc46b6980da99a173130082c7af4 Mon Sep 17 00:00:00 2001 From: xuyuqing Date: Thu, 12 Nov 2020 09:43:27 +0800 Subject: ASoC: google: dt-bindings: add new compatible for sc7180-coachz Add devicetree bindings for coachz in documentation file Signed-off-by: xuyuqing Link: https://lore.kernel.org/r/20201112014328.695232-2-xuyuqing@huaqin.corp-partner.google.com Signed-off-by: Mark Brown --- Documentation/devicetree/bindings/sound/google,sc7180-trogdor.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/sound/google,sc7180-trogdor.yaml b/Documentation/devicetree/bindings/sound/google,sc7180-trogdor.yaml index ce050a9dec94..5095b780e2c7 100644 --- a/Documentation/devicetree/bindings/sound/google,sc7180-trogdor.yaml +++ b/Documentation/devicetree/bindings/sound/google,sc7180-trogdor.yaml @@ -15,7 +15,9 @@ description: properties: compatible: - const: google,sc7180-trogdor + enum: + - google,sc7180-trogdor + - google,sc7180-coachz audio-routing: $ref: /schemas/types.yaml#/definitions/non-unique-string-array -- cgit v1.2.3 From 33ee67b47ba09fc30840668c9ccec5ad18c94de0 Mon Sep 17 00:00:00 2001 From: Oder Chiou Date: Fri, 13 Nov 2020 13:54:00 +0800 Subject: ASoC: rt5682: Add a new property to the device tree. The patch adds a new property to the drice tree for the DMIC clcok driving. Signed-off-by: Oder Chiou Link: https://lore.kernel.org/r/20201113055400.11242-2-oder_chiou@realtek.com Signed-off-by: Mark Brown --- Documentation/devicetree/bindings/sound/rt5682.txt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/sound/rt5682.txt b/Documentation/devicetree/bindings/sound/rt5682.txt index 707fa98d1310..9c5fadb6ac82 100644 --- a/Documentation/devicetree/bindings/sound/rt5682.txt +++ b/Documentation/devicetree/bindings/sound/rt5682.txt @@ -44,6 +44,8 @@ Optional properties: - realtek,dmic-delay-ms : Set the delay time (ms) for the requirement of the particular DMIC. +- realtek,dmic-clk-driving-high : Set the high drving of the DMIC clock out. + Pins on the device (for linking into audio routes) for RT5682: * DMIC L1 -- cgit v1.2.3 From f077770b2675feb2ea2188ef7109d5a41545e7a9 Mon Sep 17 00:00:00 2001 From: Alexandru Ardelean Date: Tue, 10 Nov 2020 10:47:54 +0200 Subject: ASoC: adau1977: convert text binding to yaml format This change converts the old device-tree binding for ADAU1977 from text format to the new yaml format. Signed-off-by: Alexandru Ardelean Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201110084754.46756-1-alexandru.ardelean@analog.com Signed-off-by: Mark Brown --- .../devicetree/bindings/sound/adi,adau1977.txt | 61 -------------- .../devicetree/bindings/sound/adi,adau1977.yaml | 92 ++++++++++++++++++++++ 2 files changed, 92 insertions(+), 61 deletions(-) delete mode 100644 Documentation/devicetree/bindings/sound/adi,adau1977.txt create mode 100644 Documentation/devicetree/bindings/sound/adi,adau1977.yaml (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/sound/adi,adau1977.txt b/Documentation/devicetree/bindings/sound/adi,adau1977.txt deleted file mode 100644 index 37f8aad01203..000000000000 --- a/Documentation/devicetree/bindings/sound/adi,adau1977.txt +++ /dev/null @@ -1,61 +0,0 @@ -Analog Devices ADAU1977/ADAU1978/ADAU1979 - -Datasheets: -https://www.analog.com/media/en/technical-documentation/data-sheets/ADAU1977.pdf -https://www.analog.com/media/en/technical-documentation/data-sheets/ADAU1978.pdf -https://www.analog.com/media/en/technical-documentation/data-sheets/ADAU1979.pdf - -This driver supports both the I2C and SPI bus. - -Required properties: - - compatible: Should contain one of the following: - "adi,adau1977" - "adi,adau1978" - "adi,adau1979" - - - AVDD-supply: analog power supply for the device, please consult - Documentation/devicetree/bindings/regulator/regulator.txt - -Optional properties: - - reset-gpios: the reset pin for the chip, for more details consult - Documentation/devicetree/bindings/gpio/gpio.txt - - - DVDD-supply: supply voltage for the digital core, please consult - Documentation/devicetree/bindings/regulator/regulator.txt - -- adi,micbias: configures the voltage setting for the MICBIAS pin. - Select 0/1/2/3/4/5/6/7/8 to specify MICBIAS voltage - 5V/5.5V/6V/6.5V/7V/7.5V/8V/8.5V/9V - If not specified the default value will be "7" meaning 8.5 Volts. - This property is only valid for the ADAU1977 - -For required properties on SPI, please consult -Documentation/devicetree/bindings/spi/spi-bus.txt - -Required properties on I2C: - - - reg: The i2c address. Value depends on the state of ADDR0 - and ADDR1, as wired in hardware. - -Examples: - - adau1977_spi: adau1977@0 { - compatible = "adi,adau1977"; - spi-max-frequency = <600000>; - - AVDD-supply = <®ulator>; - DVDD-supply = <®ulator_digital>; - - adi,micbias = <3>; - reset-gpios = <&gpio 10 GPIO_ACTIVE_LOW>; - }; - - adau1977_i2c: adau1977@11 { - compatible = "adi,adau1977"; - reg = <0x11>; - - AVDD-supply = <®ulator>; - DVDD-supply = <®ulator_digital>; - - reset-gpios = <&gpio 10 GPIO_ACTIVE_LOW>; - }; diff --git a/Documentation/devicetree/bindings/sound/adi,adau1977.yaml b/Documentation/devicetree/bindings/sound/adi,adau1977.yaml new file mode 100644 index 000000000000..b80454ad97da --- /dev/null +++ b/Documentation/devicetree/bindings/sound/adi,adau1977.yaml @@ -0,0 +1,92 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/adi,adau1977.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Analog Devices ADAU1977/ADAU1978/ADAU1979 Quad ADC with Diagnostics + +maintainers: + - Lars-Peter Clausen + - Bogdan Togorean + +description: | + Analog Devices ADAU1977 and similar quad ADC with Diagnostics + https://www.analog.com/media/en/technical-documentation/data-sheets/ADAU1977.pdf + https://www.analog.com/media/en/technical-documentation/data-sheets/ADAU1978.pdf + https://www.analog.com/media/en/technical-documentation/data-sheets/ADAU1979.pdf + +properties: + compatible: + enum: + - adi,adau1977 + - adi,adau1978 + - adi,adau1979 + + reg: + maxItems: 1 + + "#sound-dai-cells": + const: 0 + + reset-gpios: + maxItems: 1 + + spi-max-frequency: true + + AVDD-supply: + description: Analog power support for the device. + + DVDD-supply: + description: Supply voltage for digital core. + + adi,micbias: + description: | + Configures the voltage setting for the MICBIAS pin. + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [0, 1, 2, 3, 4, 5, 6, 7, 8] + default: 7 + +required: + - reg + - compatible + - AVDD-supply + +additionalProperties: false + +examples: + - | + #include + + spi { + #address-cells = <1>; + #size-cells = <0>; + adau1977_spi: adau1977@0 { + compatible = "adi,adau1977"; + reg = <0>; + spi-max-frequency = <600000>; + + AVDD-supply = <®ulator>; + DVDD-supply = <®ulator_digital>; + + reset-gpios = <&gpio 10 GPIO_ACTIVE_LOW>; + + adi,micbias = <3>; + }; + }; + - | + #include + + i2c { + #address-cells = <1>; + #size-cells = <0>; + adau1977_i2c: adau1977@11 { + compatible = "adi,adau1977"; + reg = <0x11>; + + AVDD-supply = <®ulator>; + DVDD-supply = <®ulator_digital>; + + reset-gpios = <&gpio 10 GPIO_ACTIVE_LOW>; + }; + }; -- cgit v1.2.3 From e52f3f291152042f1759b2b8838e7ca24556997e Mon Sep 17 00:00:00 2001 From: Sameer Pujar Date: Mon, 16 Nov 2020 19:33:46 -0600 Subject: ASoC: audio-graph-card: Refactor schema There can be customized sound cards which are based on generic audio graph. In such cases most of the stuff is reused from generic audio graph. To facilitate this, refactor audio graph schema into multiple files and the base schema can be reused for specific sound cards. The graph card nodes and port nodes are separate entities, so they should be separate schemas. Signed-off-by: Sameer Pujar Cc: Kuninori Morimoto [robh: Split out port schema. Add graph.yaml in subsequent commit] Signed-off-by: Rob Herring Acked-by: Sameer Pujar Link: https://lore.kernel.org/r/20201117013349.2458416-2-robh@kernel.org Signed-off-by: Mark Brown --- .../bindings/sound/audio-graph-card.yaml | 106 +-------------------- .../bindings/sound/audio-graph-port.yaml | 86 +++++++++++++++++ .../devicetree/bindings/sound/audio-graph.yaml | 45 +++++++++ .../devicetree/bindings/sound/renesas,rsnd.yaml | 12 +-- 4 files changed, 141 insertions(+), 108 deletions(-) create mode 100644 Documentation/devicetree/bindings/sound/audio-graph-port.yaml create mode 100644 Documentation/devicetree/bindings/sound/audio-graph.yaml (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/sound/audio-graph-card.yaml b/Documentation/devicetree/bindings/sound/audio-graph-card.yaml index 2329aeb91db7..109e55f9e597 100644 --- a/Documentation/devicetree/bindings/sound/audio-graph-card.yaml +++ b/Documentation/devicetree/bindings/sound/audio-graph-card.yaml @@ -4,120 +4,24 @@ $id: http://devicetree.org/schemas/sound/audio-graph-card.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# -title: Audio Graph Card Driver Device Tree Bindings +title: Audio Graph Card Device Tree Bindings maintainers: - Kuninori Morimoto +allOf: + - $ref: /schemas/sound/audio-graph.yaml# + properties: compatible: enum: - audio-graph-card - audio-graph-scu-card - dais: - $ref: /schemas/types.yaml#/definitions/phandle-array - label: - maxItems: 1 - prefix: - description: "device name prefix" - $ref: /schemas/types.yaml#/definitions/string - routing: - description: | - A list of the connections between audio components. - Each entry is a pair of strings, the first being the - connection's sink, the second being the connection's source. - $ref: /schemas/types.yaml#/definitions/non-unique-string-array - widgets: - description: User specified audio sound widgets. - $ref: /schemas/types.yaml#/definitions/non-unique-string-array - convert-rate: - description: CPU to Codec rate convert. - $ref: /schemas/types.yaml#/definitions/uint32 - convert-channels: - description: CPU to Codec rate channels. - $ref: /schemas/types.yaml#/definitions/uint32 - pa-gpios: - maxItems: 1 - hp-det-gpio: - maxItems: 1 - mic-det-gpio: - maxItems: 1 - - port: - description: single OF-Graph subnode - type: object - properties: - reg: - maxItems: 1 - prefix: - description: "device name prefix" - $ref: /schemas/types.yaml#/definitions/string - convert-rate: - description: CPU to Codec rate convert. - $ref: /schemas/types.yaml#/definitions/uint32 - convert-channels: - description: CPU to Codec rate channels. - $ref: /schemas/types.yaml#/definitions/uint32 - patternProperties: - "^endpoint(@[0-9a-f]+)?": - type: object - properties: - remote-endpoint: - maxItems: 1 - mclk-fs: - description: | - Multiplication factor between stream rate and codec mclk. - When defined, mclk-fs property defined in dai-link sub nodes are ignored. - $ref: /schemas/types.yaml#/definitions/uint32 - frame-inversion: - description: dai-link uses frame clock inversion - $ref: /schemas/types.yaml#/definitions/flag - bitclock-inversion: - description: dai-link uses bit clock inversion - $ref: /schemas/types.yaml#/definitions/flag - frame-master: - description: Indicates dai-link frame master. - $ref: /schemas/types.yaml#/definitions/phandle-array - maxItems: 1 - bitclock-master: - description: Indicates dai-link bit clock master - $ref: /schemas/types.yaml#/definitions/phandle-array - maxItems: 1 - dai-format: - description: audio format. - items: - enum: - - i2s - - right_j - - left_j - - dsp_a - - dsp_b - - ac97 - - pdm - - msb - - lsb - convert-rate: - description: CPU to Codec rate convert. - $ref: /schemas/types.yaml#/definitions/uint32 - convert-channels: - description: CPU to Codec rate channels. - $ref: /schemas/types.yaml#/definitions/uint32 - required: - - remote-endpoint - - ports: - description: multi OF-Graph subnode - type: object - patternProperties: - "^port(@[0-9a-f]+)?": - $ref: "#/properties/port" - required: - compatible - - dais -additionalProperties: false +unevaluatedProperties: false examples: - | diff --git a/Documentation/devicetree/bindings/sound/audio-graph-port.yaml b/Documentation/devicetree/bindings/sound/audio-graph-port.yaml new file mode 100644 index 000000000000..9db19d4edc6a --- /dev/null +++ b/Documentation/devicetree/bindings/sound/audio-graph-port.yaml @@ -0,0 +1,86 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/audio-graph-port.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Audio Graph Card 'port' Node Bindings + +maintainers: + - Kuninori Morimoto + +select: false + +properties: + port: + description: single OF-Graph subnode + type: object + properties: + reg: + maxItems: 1 + prefix: + description: "device name prefix" + $ref: /schemas/types.yaml#/definitions/string + convert-rate: + description: CPU to Codec rate convert. + $ref: /schemas/types.yaml#/definitions/uint32 + convert-channels: + description: CPU to Codec rate channels. + $ref: /schemas/types.yaml#/definitions/uint32 + patternProperties: + "^endpoint(@[0-9a-f]+)?": + type: object + properties: + remote-endpoint: + maxItems: 1 + mclk-fs: + description: | + Multiplication factor between stream rate and codec mclk. + When defined, mclk-fs property defined in dai-link sub nodes are + ignored. + $ref: /schemas/types.yaml#/definitions/uint32 + frame-inversion: + description: dai-link uses frame clock inversion + $ref: /schemas/types.yaml#/definitions/flag + bitclock-inversion: + description: dai-link uses bit clock inversion + $ref: /schemas/types.yaml#/definitions/flag + frame-master: + description: Indicates dai-link frame master. + $ref: /schemas/types.yaml#/definitions/phandle-array + maxItems: 1 + bitclock-master: + description: Indicates dai-link bit clock master + $ref: /schemas/types.yaml#/definitions/phandle-array + maxItems: 1 + dai-format: + description: audio format. + items: + enum: + - i2s + - right_j + - left_j + - dsp_a + - dsp_b + - ac97 + - pdm + - msb + - lsb + convert-rate: + description: CPU to Codec rate convert. + $ref: /schemas/types.yaml#/definitions/uint32 + convert-channels: + description: CPU to Codec rate channels. + $ref: /schemas/types.yaml#/definitions/uint32 + + required: + - remote-endpoint + + ports: + description: multi OF-Graph subnode + type: object + patternProperties: + "^port(@[0-9a-f]+)?": + $ref: "#/properties/port" + +additionalProperties: true diff --git a/Documentation/devicetree/bindings/sound/audio-graph.yaml b/Documentation/devicetree/bindings/sound/audio-graph.yaml new file mode 100644 index 000000000000..4b46794e5153 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/audio-graph.yaml @@ -0,0 +1,45 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/audio-graph.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Audio Graph Device Tree Bindings + +maintainers: + - Kuninori Morimoto + +properties: + dais: + $ref: /schemas/types.yaml#/definitions/phandle-array + label: + maxItems: 1 + prefix: + description: "device name prefix" + $ref: /schemas/types.yaml#/definitions/string + routing: + description: | + A list of the connections between audio components. + Each entry is a pair of strings, the first being the + connection's sink, the second being the connection's source. + $ref: /schemas/types.yaml#/definitions/non-unique-string-array + widgets: + description: User specified audio sound widgets. + $ref: /schemas/types.yaml#/definitions/non-unique-string-array + convert-rate: + description: CPU to Codec rate convert. + $ref: /schemas/types.yaml#/definitions/uint32 + convert-channels: + description: CPU to Codec rate channels. + $ref: /schemas/types.yaml#/definitions/uint32 + pa-gpios: + maxItems: 1 + hp-det-gpio: + maxItems: 1 + mic-det-gpio: + maxItems: 1 + +required: + - dais + +additionalProperties: true diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml index 51f4dcaa970d..cbfd5914b432 100644 --- a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml +++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml @@ -9,6 +9,10 @@ title: Renesas R-Car Sound Driver Device Tree Bindings maintainers: - Kuninori Morimoto +allOf: + - $ref: audio-graph.yaml# + - $ref: audio-graph-port.yaml# + properties: compatible: @@ -111,13 +115,7 @@ properties: - pattern: '^dvc\.[0-1]$' - pattern: '^clk_(a|b|c|i)$' - port: - description: OF-Graph subnode - $ref: "audio-graph-card.yaml#/properties/port" - - ports: - description: multi OF-Graph subnode - $ref: "audio-graph-card.yaml#/properties/ports" + port: true # use patternProperties to avoid naming "xxx,yyy" issue patternProperties: -- cgit v1.2.3 From fd97ee45ec63759593b06be010a8ed395b299cce Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Mon, 16 Nov 2020 19:33:48 -0600 Subject: ASoC: dt-bindings: marvell, mmp-sspa: Use audio-graph-port schema Now that we have a graph schema, reference it from the marvell,mmp-sspa schema. Signed-off-by: Rob Herring Acked-by: Lubomir Rintel Link: https://lore.kernel.org/r/20201117013349.2458416-4-robh@kernel.org Signed-off-by: Mark Brown --- .../bindings/sound/marvell,mmp-sspa.yaml | 25 +++------------------- 1 file changed, 3 insertions(+), 22 deletions(-) (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/sound/marvell,mmp-sspa.yaml b/Documentation/devicetree/bindings/sound/marvell,mmp-sspa.yaml index 6d20a24a2ae9..234f64a32184 100644 --- a/Documentation/devicetree/bindings/sound/marvell,mmp-sspa.yaml +++ b/Documentation/devicetree/bindings/sound/marvell,mmp-sspa.yaml @@ -9,6 +9,9 @@ title: Marvel SSPA Digital Audio Interface Bindings maintainers: - Lubomir Rintel +allOf: + - $ref: audio-graph-port.yaml# + properties: $nodename: pattern: "^audio-controller(@.*)?$" @@ -58,29 +61,9 @@ properties: type: object properties: - remote-endpoint: true - - frame-master: - type: boolean - description: SoC generates the frame clock - - bitclock-master: - type: boolean - description: SoC generates the bit clock - dai-format: - $ref: /schemas/types.yaml#/definitions/string - description: The digital audio format const: i2s - required: - - remote-endpoint - - required: - - endpoint - - additionalProperties: false - required: - "#sound-dai-cells" - compatible @@ -112,8 +95,6 @@ examples: port { endpoint { remote-endpoint = <&rt5631_0>; - frame-master; - bitclock-master; dai-format = "i2s"; }; }; -- cgit v1.2.3 From 251bf658558f9feff8a92ddcde402ffa220d13b8 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Mon, 16 Nov 2020 19:33:49 -0600 Subject: ASoC: dt-bindings: Refine 'frame-master' and 'bitclock-master' type 'frame-master' and 'bitclock-master' are only a single phandle, so use the more specific 'phandle' type definition instead. Signed-off-by: Rob Herring Acked-by: Sameer Pujar Link: https://lore.kernel.org/r/20201117013349.2458416-5-robh@kernel.org Signed-off-by: Mark Brown --- Documentation/devicetree/bindings/sound/audio-graph-port.yaml | 6 ++---- Documentation/devicetree/bindings/sound/simple-card.yaml | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/sound/audio-graph-port.yaml b/Documentation/devicetree/bindings/sound/audio-graph-port.yaml index 9db19d4edc6a..2005014161be 100644 --- a/Documentation/devicetree/bindings/sound/audio-graph-port.yaml +++ b/Documentation/devicetree/bindings/sound/audio-graph-port.yaml @@ -47,12 +47,10 @@ properties: $ref: /schemas/types.yaml#/definitions/flag frame-master: description: Indicates dai-link frame master. - $ref: /schemas/types.yaml#/definitions/phandle-array - maxItems: 1 + $ref: /schemas/types.yaml#/definitions/phandle bitclock-master: description: Indicates dai-link bit clock master - $ref: /schemas/types.yaml#/definitions/phandle-array - maxItems: 1 + $ref: /schemas/types.yaml#/definitions/phandle dai-format: description: audio format. items: diff --git a/Documentation/devicetree/bindings/sound/simple-card.yaml b/Documentation/devicetree/bindings/sound/simple-card.yaml index 35e669020296..45fd9fd9eb54 100644 --- a/Documentation/devicetree/bindings/sound/simple-card.yaml +++ b/Documentation/devicetree/bindings/sound/simple-card.yaml @@ -13,13 +13,11 @@ definitions: frame-master: description: Indicates dai-link frame master. - $ref: /schemas/types.yaml#/definitions/phandle-array - maxItems: 1 + $ref: /schemas/types.yaml#/definitions/phandle bitclock-master: description: Indicates dai-link bit clock master - $ref: /schemas/types.yaml#/definitions/phandle-array - maxItems: 1 + $ref: /schemas/types.yaml#/definitions/phandle frame-inversion: description: dai-link uses frame clock inversion -- cgit v1.2.3 From 7d94ca3c8acd0117200f34523536ee01615e7dc3 Mon Sep 17 00:00:00 2001 From: Jiaxin Yu Date: Wed, 11 Nov 2020 16:05:20 +0800 Subject: ASoC: mt8192: revert "add audio afe document" This reverts commit 1afc60e00de3abbb6c559da409c5c1bb8c1d98ec (dt-bindings: mediatek: mt8192: add audio afe document). https://mailman.alsa-project.org/pipermail/alsa-devel/2020-November/176873.html These dependency are continuing to upstream, I will revert this patch first. After the dependencies are merged, I will send 'mt8192-afe-pcm.yaml' again. [Massaged commit message to put hint about issue being fixed into there rather than the trailer -- broonie] Signed-off-by: Jiaxin Yu Acked-by: Rob Herring Link: https://lore.kernel.org/r/1605081920-11848-1-git-send-email-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown --- .../devicetree/bindings/sound/mt8192-afe-pcm.yaml | 100 --------------------- 1 file changed, 100 deletions(-) delete mode 100644 Documentation/devicetree/bindings/sound/mt8192-afe-pcm.yaml (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/sound/mt8192-afe-pcm.yaml b/Documentation/devicetree/bindings/sound/mt8192-afe-pcm.yaml deleted file mode 100644 index 0170c93802d2..000000000000 --- a/Documentation/devicetree/bindings/sound/mt8192-afe-pcm.yaml +++ /dev/null @@ -1,100 +0,0 @@ -# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) -%YAML 1.2 ---- -$id: http://devicetree.org/schemas/sound/mt8192-afe-pcm.yaml# -$schema: http://devicetree.org/meta-schemas/core.yaml# - -title: Mediatek AFE PCM controller for mt8192 - -maintainers: - - Jiaxin Yu - - Shane Chien - -properties: - compatible: - const: mediatek,mt8192-audio - - interrupts: - maxItems: 1 - - resets: - maxItems: 1 - - reset-names: - const: audiosys - - mediatek,apmixedsys: - $ref: "/schemas/types.yaml#/definitions/phandle" - description: The phandle of the mediatek apmixedsys controller - - mediatek,infracfg: - $ref: "/schemas/types.yaml#/definitions/phandle" - description: The phandle of the mediatek infracfg controller - - mediatek,topckgen: - $ref: "/schemas/types.yaml#/definitions/phandle" - description: The phandle of the mediatek topckgen controller - - power-domains: - maxItems: 1 - - clocks: - items: - - description: AFE clock - - description: ADDA DAC clock - - description: ADDA DAC pre-distortion clock - - description: audio infra sys clock - - description: audio infra 26M clock - - clock-names: - items: - - const: aud_afe_clk - - const: aud_dac_clk - - const: aud_dac_predis_clk - - const: aud_infra_clk - - const: aud_infra_26m_clk - -required: - - compatible - - interrupts - - resets - - reset-names - - mediatek,apmixedsys - - mediatek,infracfg - - mediatek,topckgen - - power-domains - - clocks - - clock-names - -additionalProperties: false - -examples: - - | - #include - #include - #include - #include - #include - - afe: mt8192-afe-pcm { - compatible = "mediatek,mt8192-audio"; - interrupts = ; - resets = <&watchdog MT8192_TOPRGU_AUDIO_SW_RST>; - reset-names = "audiosys"; - mediatek,apmixedsys = <&apmixedsys>; - mediatek,infracfg = <&infracfg>; - mediatek,topckgen = <&topckgen>; - power-domains = <&scpsys MT8192_POWER_DOMAIN_AUDIO>; - clocks = <&audsys CLK_AUD_AFE>, - <&audsys CLK_AUD_DAC>, - <&audsys CLK_AUD_DAC_PREDIS>, - <&infracfg CLK_INFRA_AUDIO>, - <&infracfg CLK_INFRA_AUDIO_26M_B>; - clock-names = "aud_afe_clk", - "aud_dac_clk", - "aud_dac_predis_clk", - "aud_infra_clk", - "aud_infra_26m_clk"; - }; - -... -- cgit v1.2.3 From ccbd847f15b0f08f8c6ed3ab5384e5f7055b08e5 Mon Sep 17 00:00:00 2001 From: Srinivas Kandagatla Date: Thu, 5 Nov 2020 11:34:53 +0000 Subject: ASoC: qcom: dt-bindings: add bindings for lpass wsa macro codec This binding is for LPASS has internal codec WSA macro which is for connecting with WSA Smart speakers. Signed-off-by: Srinivas Kandagatla Reviewed-by: Rob Herring Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20201105113458.12360-2-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown --- .../bindings/sound/qcom,lpass-wsa-macro.yaml | 69 ++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/qcom,lpass-wsa-macro.yaml (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/sound/qcom,lpass-wsa-macro.yaml b/Documentation/devicetree/bindings/sound/qcom,lpass-wsa-macro.yaml new file mode 100644 index 000000000000..435b019a1e3d --- /dev/null +++ b/Documentation/devicetree/bindings/sound/qcom,lpass-wsa-macro.yaml @@ -0,0 +1,69 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/qcom,lpass-wsa-macro.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: LPASS(Low Power Audio Subsystem) VA Macro audio codec DT bindings + +maintainers: + - Srinivas Kandagatla + +properties: + compatible: + const: qcom,sm8250-lpass-wsa-macro + + reg: + maxItems: 1 + + "#sound-dai-cells": + const: 1 + + '#clock-cells': + const: 0 + + clocks: + maxItems: 5 + + clock-names: + items: + - const: mclk + - const: npl + - const: macro + - const: dcodec + - const: fsgen + + clock-output-names: + items: + - const: mclk + + qcom,dmic-sample-rate: + description: dmic sample rate + $ref: /schemas/types.yaml#/definitions/uint32 + + vdd-micb-supply: + description: phandle to voltage regulator of MIC Bias + +required: + - compatible + - reg + - "#sound-dai-cells" + +additionalProperties: false + +examples: + - | + #include + codec@3240000 { + compatible = "qcom,sm8250-lpass-wsa-macro"; + reg = <0x3240000 0x1000>; + #sound-dai-cells = <1>; + #clock-cells = <0>; + clocks = <&audiocc 1>, + <&audiocc 0>, + <&q6afecc LPASS_HW_MACRO_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>, + <&q6afecc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>, + <&vamacro>; + clock-names = "mclk", "npl", "macro", "dcodec", "fsgen"; + clock-output-names = "mclk"; + }; -- cgit v1.2.3 From 67d99b23c881b1411fc6907bc844d63565b536d6 Mon Sep 17 00:00:00 2001 From: Srinivas Kandagatla Date: Thu, 5 Nov 2020 11:34:56 +0000 Subject: ASoC: qcom: dt-bindings: add bindings for lpass va macro codec This binding is for LPASS has internal codec VA macro which is for connecting with DMICs. Signed-off-by: Srinivas Kandagatla Reviewed-by: Rob Herring Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20201105113458.12360-5-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown --- .../bindings/sound/qcom,lpass-va-macro.yaml | 67 ++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml b/Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml new file mode 100644 index 000000000000..679b49cbe30f --- /dev/null +++ b/Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml @@ -0,0 +1,67 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/qcom,lpass-va-macro.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: LPASS(Low Power Audio Subsystem) VA Macro audio codec DT bindings + +maintainers: + - Srinivas Kandagatla + +properties: + compatible: + const: qcom,sm8250-lpass-va-macro + + reg: + maxItems: 1 + + "#sound-dai-cells": + const: 1 + + '#clock-cells': + const: 0 + + clocks: + maxItems: 3 + + clock-names: + items: + - const: mclk + - const: core + - const: dcodec + + clock-output-names: + items: + - const: fsgen + + qcom,dmic-sample-rate: + description: dmic sample rate + $ref: /schemas/types.yaml#/definitions/uint32 + + vdd-micb-supply: + description: phandle to voltage regulator of MIC Bias + +required: + - compatible + - reg + - "#sound-dai-cells" + +additionalProperties: false + +examples: + - | + #include + codec@3370000 { + compatible = "qcom,sm8250-lpass-va-macro"; + reg = <0x3370000 0x1000>; + #sound-dai-cells = <1>; + #clock-cells = <0>; + clocks = <&aoncc 0>, + <&q6afecc LPASS_HW_MACRO_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>, + <&q6afecc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>; + clock-names = "mclk", "core", "dcodec"; + clock-output-names = "fsgen"; + qcom,dmic-sample-rate = <600000>; + vdd-micb-supply = <&vreg_s4a_1p8>; + }; -- cgit v1.2.3 From 6e85530496a496616ece6c444df23522afc81520 Mon Sep 17 00:00:00 2001 From: Jiaxin Yu Date: Fri, 20 Nov 2020 11:06:13 +0800 Subject: ASoC: mt6359: remove unused property for mt6359 This reverts commit 08651373808e16b01d3b12207f52504c17b6774c. ("dt-bindings: mediatek: mt6359: Add new property for mt6359") Remove unused property "LDO_VAUD18-supply" in mt6359codec. Signed-off-by: Jiaxin Yu Link: https://lore.kernel.org/r/1605841573-1442-3-git-send-email-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown --- Documentation/devicetree/bindings/sound/mt6359.yaml | 9 --------- 1 file changed, 9 deletions(-) (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/sound/mt6359.yaml b/Documentation/devicetree/bindings/sound/mt6359.yaml index ef027c79032f..a54f466f769d 100644 --- a/Documentation/devicetree/bindings/sound/mt6359.yaml +++ b/Documentation/devicetree/bindings/sound/mt6359.yaml @@ -17,11 +17,6 @@ description: | Must be a child node of PMIC wrapper. properties: - LDO_VAUD18-supply: - $ref: /schemas/types.yaml#/definitions/phandle - description: | - Regulator of LDO VAUD18 at 1.8V. - mediatek,dmic-mode: $ref: /schemas/types.yaml#/definitions/uint32 description: | @@ -54,15 +49,11 @@ properties: description: | Specifies the type of mic type connected to adc2 -required: - - LDO_VAUD18-supply - additionalProperties: false examples: - | mt6359codec: mt6359codec { - LDO_VAUD18-supply = <&mt6359p_vaud18_reg>; mediatek,dmic-mode = <0>; mediatek,mic-type-0 = <2>; }; -- cgit v1.2.3 From 73d2784ecf09d49e319631aea682cb360959355a Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Thu, 19 Nov 2020 10:18:48 -0600 Subject: ASoC: dt-bindings: renesas, rsnd: Fix duplicate 'allOf' entries Commit e52f3f291152 ("ASoC: audio-graph-card: Refactor schema") added an 'allOf' entry, but one is already present in the schema. Multiple keys is not valid and results in an error: ruamel.yaml.constructor.DuplicateKeyError: while constructing a mapping in "", line 4, column 1 found duplicate key "allOf" with value "[]" (original value: "[]") in "", line 262, column 1 Fixes: e52f3f291152 ("ASoC: audio-graph-card: Refactor schema") Cc: Liam Girdwood Cc: Mark Brown Cc: Kuninori Morimoto Cc: Sameer Pujar Cc: alsa-devel@alsa-project.org Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20201119161848.3379929-1-robh@kernel.org Signed-off-by: Mark Brown --- Documentation/devicetree/bindings/sound/renesas,rsnd.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml index cbfd5914b432..0fd37aa84947 100644 --- a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml +++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml @@ -9,10 +9,6 @@ title: Renesas R-Car Sound Driver Device Tree Bindings maintainers: - Kuninori Morimoto -allOf: - - $ref: audio-graph.yaml# - - $ref: audio-graph-port.yaml# - properties: compatible: @@ -260,6 +256,8 @@ required: - "#sound-dai-cells" allOf: + - $ref: audio-graph.yaml# + - $ref: audio-graph-port.yaml# - if: properties: compatible: -- cgit v1.2.3 From 62abd092f97b33a33fcdb98c30bc01f2b1c55d04 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Mon, 23 Nov 2020 09:53:45 +0100 Subject: ALSA: usb-audio: Add implicit_fb module option A new module option, implicit_fb, is added to specify the driver looking for the implicit feedback sync. This can be useful for a device that could be working better in the implicit feed back mode and user wants to test it quickly. When this works, we can add the quirk entry easily. Tested-by: Keith Milner Tested-by: Dylan Robinson Link: https://lore.kernel.org/r/20201123085347.19667-40-tiwai@suse.de Signed-off-by: Takashi Iwai --- Documentation/sound/alsa-configuration.rst | 5 +++++ sound/usb/card.c | 4 ++++ sound/usb/implicit.c | 4 ++++ sound/usb/usbaudio.h | 1 + 4 files changed, 14 insertions(+) (limited to 'Documentation') diff --git a/Documentation/sound/alsa-configuration.rst b/Documentation/sound/alsa-configuration.rst index c755b1c5e16f..fe52c314b763 100644 --- a/Documentation/sound/alsa-configuration.rst +++ b/Documentation/sound/alsa-configuration.rst @@ -2227,6 +2227,11 @@ quirk_alias Quirk alias list, pass strings like ``0123abcd:5678beef``, which applies the existing quirk for the device 5678:beef to a new device 0123:abcd. +implicit_fb + Apply the generic implicit feedback sync mode. When this is set + and the playback stream sync mode is ASYNC, the driver tries to + tie an adjacent ASYNC capture stream as the implicit feedback + source. use_vmalloc Use vmalloc() for allocations of the PCM buffers (default: yes). For architectures with non-coherent memory like ARM or MIPS, the diff --git a/sound/usb/card.c b/sound/usb/card.c index 7940b3bff5bc..cb0b6582dfee 100644 --- a/sound/usb/card.c +++ b/sound/usb/card.c @@ -72,6 +72,7 @@ static bool ignore_ctl_error; static bool autoclock = true; static char *quirk_alias[SNDRV_CARDS]; static char *delayed_register[SNDRV_CARDS]; +static bool implicit_fb[SNDRV_CARDS]; bool snd_usb_use_vmalloc = true; bool snd_usb_skip_validation; @@ -97,6 +98,8 @@ module_param_array(quirk_alias, charp, NULL, 0444); MODULE_PARM_DESC(quirk_alias, "Quirk aliases, e.g. 0123abcd:5678beef."); module_param_array(delayed_register, charp, NULL, 0444); MODULE_PARM_DESC(delayed_register, "Quirk for delayed registration, given by id:iface, e.g. 0123abcd:4."); +module_param_array(implicit_fb, bool, NULL, 0444); +MODULE_PARM_DESC(implicit_fb, "Apply generic implicit feedback sync mode."); module_param_named(use_vmalloc, snd_usb_use_vmalloc, bool, 0444); MODULE_PARM_DESC(use_vmalloc, "Use vmalloc for PCM intermediate buffers (default: yes)."); module_param_named(skip_validation, snd_usb_skip_validation, bool, 0444); @@ -596,6 +599,7 @@ static int snd_usb_audio_create(struct usb_interface *intf, chip->dev = dev; chip->card = card; chip->setup = device_setup[idx]; + chip->generic_implicit_fb = implicit_fb[idx]; chip->autoclock = autoclock; atomic_set(&chip->active, 1); /* avoid autopm during probing */ atomic_set(&chip->usage_count, 0); diff --git a/sound/usb/implicit.c b/sound/usb/implicit.c index 16b1fb55b7b9..1d87fcdae95b 100644 --- a/sound/usb/implicit.c +++ b/sound/usb/implicit.c @@ -269,6 +269,10 @@ static int audioformat_implicit_fb_quirk(struct snd_usb_audio *chip, return 1; } + /* Try the generic implicit fb if available */ + if (chip->generic_implicit_fb) + return add_generic_implicit_fb(chip, fmt, alts); + /* No quirk */ return 0; } diff --git a/sound/usb/usbaudio.h b/sound/usb/usbaudio.h index cc338e8e2597..980287aadd36 100644 --- a/sound/usb/usbaudio.h +++ b/sound/usb/usbaudio.h @@ -51,6 +51,7 @@ struct snd_usb_audio { struct list_head mixer_list; /* list of mixer interfaces */ int setup; /* from the 'device_setup' module param */ + bool generic_implicit_fb; /* from the 'implicit_fb' module param */ bool autoclock; /* from the 'autoclock' module param */ struct usb_host_interface *ctrl_intf; /* the audio control interface */ -- cgit v1.2.3 From 32025c7c50c602a6c0bc3bef0e9a774003e2e7ae Mon Sep 17 00:00:00 2001 From: Alexandre Belloni Date: Fri, 27 Nov 2020 13:30:29 +0100 Subject: ASoC: adau1372: Add bindings documentation Add device tree binding documentation for Analog Devices ADAU1372. Signed-off-by: Alexandre Belloni Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201127123030.1610574-1-alexandre.belloni@bootlin.com Signed-off-by: Mark Brown --- .../devicetree/bindings/sound/adi,adau1372.yaml | 67 ++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/adi,adau1372.yaml (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/sound/adi,adau1372.yaml b/Documentation/devicetree/bindings/sound/adi,adau1372.yaml new file mode 100644 index 000000000000..701449311fec --- /dev/null +++ b/Documentation/devicetree/bindings/sound/adi,adau1372.yaml @@ -0,0 +1,67 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/adi,adau1372.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + + +title: Analog Devices ADAU1372 CODEC + +maintainers: + - Alexandre Belloni + +description: | + Analog Devices ADAU1372 four inputs and two outputs codec. + https://www.analog.com/media/en/technical-documentation/data-sheets/ADAU1372.pdf + +properties: + compatible: + enum: + - adi,adau1372 + + reg: + maxItems: 1 + + "#sound-dai-cells": + const: 0 + + clocks: + maxItems: 1 + + clock-names: + const: "mclk" + + powerdown-gpios: + description: GPIO used for hardware power-down. + maxItems: 1 + +required: + - "#sound-dai-cells" + - compatible + - reg + - clocks + - clock-names + +additionalProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + audio-codec@3c { + compatible = "adi,adau1372"; + reg = <0x3c>; + #sound-dai-cells = <0>; + clock-names = "mclk"; + clocks = <&adau1372z_xtal>; + }; + }; + + adau1372z_xtal: clock { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <12288000>; + }; +... + -- cgit v1.2.3 From 6552c35de1915c8b423e4969ada1f1f8a53847e1 Mon Sep 17 00:00:00 2001 From: Tzung-Bi Shih Date: Tue, 1 Dec 2020 21:26:12 +0800 Subject: ASoC: dt-bindings: mt8192-mt6359: fix typo in the example Both driver "sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c" and DT binding property use underscore version compatible string. Fixes the typo in the example. Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20201201132614.1691352-5-tzungbi@google.com Signed-off-by: Mark Brown --- .../devicetree/bindings/sound/mt8192-mt6359-rt1015-rt5682.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/sound/mt8192-mt6359-rt1015-rt5682.yaml b/Documentation/devicetree/bindings/sound/mt8192-mt6359-rt1015-rt5682.yaml index 342232a61cfb..b336a42bbb16 100644 --- a/Documentation/devicetree/bindings/sound/mt8192-mt6359-rt1015-rt5682.yaml +++ b/Documentation/devicetree/bindings/sound/mt8192-mt6359-rt1015-rt5682.yaml @@ -31,7 +31,7 @@ examples: - | sound: mt8192-sound { - compatible = "mediatek,mt8192-mt6359-rt1015-rt5682"; + compatible = "mediatek,mt8192_mt6359_rt1015_rt5682"; mediatek,platform = <&afe>; pinctrl-names = "aud_clk_mosi_off", "aud_clk_mosi_on"; -- cgit v1.2.3 From 6986256fdfefc2eeaec5f21d7937d57850fd57fe Mon Sep 17 00:00:00 2001 From: Tzung-Bi Shih Date: Tue, 1 Dec 2020 21:26:13 +0800 Subject: ASoC: dt-bindings: mt8192-mt6359: add new compatible for using rt1015p Adds new compatible string "mt8192_mt6359_rt1015p_rt5682" for machines with rt1015p and rt5682. Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20201201132614.1691352-6-tzungbi@google.com Signed-off-by: Mark Brown --- .../devicetree/bindings/sound/mt8192-mt6359-rt1015-rt5682.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/sound/mt8192-mt6359-rt1015-rt5682.yaml b/Documentation/devicetree/bindings/sound/mt8192-mt6359-rt1015-rt5682.yaml index b336a42bbb16..bf8c8ba25009 100644 --- a/Documentation/devicetree/bindings/sound/mt8192-mt6359-rt1015-rt5682.yaml +++ b/Documentation/devicetree/bindings/sound/mt8192-mt6359-rt1015-rt5682.yaml @@ -15,7 +15,9 @@ description: properties: compatible: - const: mediatek,mt8192_mt6359_rt1015_rt5682 + enum: + - mediatek,mt8192_mt6359_rt1015_rt5682 + - mediatek,mt8192_mt6359_rt1015p_rt5682 mediatek,platform: $ref: "/schemas/types.yaml#/definitions/phandle" -- cgit v1.2.3 From 0b3355b070434f9901f641aac9000df93e2c96ad Mon Sep 17 00:00:00 2001 From: Shengjiu Wang Date: Mon, 30 Nov 2020 11:57:48 +0800 Subject: ASoC: bindings: fsl-asoc-card: add compatible string for si476x codec The si476x codec is used for FM radio function on i.MX6 auto board. Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1606708668-28786-2-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown --- Documentation/devicetree/bindings/sound/fsl-asoc-card.txt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/sound/fsl-asoc-card.txt b/Documentation/devicetree/bindings/sound/fsl-asoc-card.txt index f339be62e7e4..90d9e9d81624 100644 --- a/Documentation/devicetree/bindings/sound/fsl-asoc-card.txt +++ b/Documentation/devicetree/bindings/sound/fsl-asoc-card.txt @@ -40,6 +40,8 @@ The compatible list for this generic sound card currently: "fsl,imx-audio-tlv320aic32x4" + "fsl,imx-audio-si476x" + Required properties: - compatible : Contains one of entries in the compatible list. -- cgit v1.2.3 From e344cf5e4871f99495396f78d4401b8ac4c92465 Mon Sep 17 00:00:00 2001 From: Shengjiu Wang Date: Sun, 6 Dec 2020 18:41:58 +0800 Subject: ASoC: dt-bindings: imx-hdmi: Add binding doc for hdmi machine driver Imx-hdmi is a new added machine driver for supporting hdmi devices on i.MX platforms. There is HDMI IP or external HDMI modules connect with SAI or AUD2HTX interface. Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1607251319-5821-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown --- .../devicetree/bindings/sound/imx-audio-hdmi.yaml | 52 ++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/imx-audio-hdmi.yaml (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/sound/imx-audio-hdmi.yaml b/Documentation/devicetree/bindings/sound/imx-audio-hdmi.yaml new file mode 100644 index 000000000000..d5474f83ac2c --- /dev/null +++ b/Documentation/devicetree/bindings/sound/imx-audio-hdmi.yaml @@ -0,0 +1,52 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/imx-audio-hdmi.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NXP i.MX audio complex with HDMI + +maintainers: + - Shengjiu Wang + +properties: + compatible: + enum: + - fsl,imx-audio-hdmi + - fsl,imx-audio-sii902x + + model: + $ref: /schemas/types.yaml#/definitions/string + description: User specified audio sound card name + + audio-cpu: + description: The phandle of an CPU DAI controller + + hdmi-out: + description: | + This is a boolean property. If present, the transmitting function + of HDMI will be enabled, indicating there's a physical HDMI out + connector or jack on the board or it's connecting to some other IP + block, such as an HDMI encoder or display-controller. + + hdmi-in: + description: | + This is a boolean property. If present, the receiving function of + HDMI will be enabled, indicating there is a physical HDMI in + connector/jack on the board. + +required: + - compatible + - model + - audio-cpu + +additionalProperties: false + +examples: + - | + sound-hdmi { + compatible = "fsl,imx-audio-hdmi"; + model = "audio-hdmi"; + audio-cpu = <&aud2htx>; + hdmi-out; + }; -- cgit v1.2.3 From f17a7db22b8ff1688f30bb66aeeaa8cc088e5230 Mon Sep 17 00:00:00 2001 From: Alexandre Belloni Date: Sat, 5 Dec 2020 01:15:07 +0100 Subject: ASoC: add simple-audio-mux binding Add devicetree documentation for simple audio multiplexers Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201205001508.346439-1-alexandre.belloni@bootlin.com Signed-off-by: Mark Brown --- .../bindings/sound/simple-audio-mux.yaml | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/simple-audio-mux.yaml (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/sound/simple-audio-mux.yaml b/Documentation/devicetree/bindings/sound/simple-audio-mux.yaml new file mode 100644 index 000000000000..5986d1fcbb54 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/simple-audio-mux.yaml @@ -0,0 +1,41 @@ +# SPDX-License-Identifier: (GPL-2.0+ OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/simple-audio-mux.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Simple Audio Multiplexer + +maintainers: + - Alexandre Belloni + +description: | + Simple audio multiplexers are driven using gpios, allowing to select which of + their input line is connected to the output line. + +properties: + compatible: + const: simple-audio-mux + + mux-gpios: + description: | + GPIOs used to select the input line. + + sound-name-prefix: + $ref: /schemas/types.yaml#/definitions/string + description: + Used as prefix for sink/source names of the component. Must be a + unique string among multiple instances of the same component. + +required: + - compatible + - mux-gpios + +additionalProperties: false + +examples: + - | + mux { + compatible = "simple-audio-mux"; + mux-gpios = <&gpio 3 0>; + }; -- cgit v1.2.3 From 2d8f8955fe02c1f5d41c283f48d8c6a2a02ae17f Mon Sep 17 00:00:00 2001 From: Sameer Pujar Date: Thu, 3 Dec 2020 20:06:41 +0530 Subject: dt-bindings: tegra: Convert HDA doc to json-schema Convert Tegra HDA doc to YAML format. Signed-off-by: Sameer Pujar Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/1607006202-4078-2-git-send-email-spujar@nvidia.com Signed-off-by: Mark Brown --- .../bindings/sound/nvidia,tegra30-hda.txt | 35 -------- .../bindings/sound/nvidia,tegra30-hda.yaml | 98 ++++++++++++++++++++++ 2 files changed, 98 insertions(+), 35 deletions(-) delete mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra30-hda.txt create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra30-hda.yaml (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra30-hda.txt b/Documentation/devicetree/bindings/sound/nvidia,tegra30-hda.txt deleted file mode 100644 index 21cd310963b1..000000000000 --- a/Documentation/devicetree/bindings/sound/nvidia,tegra30-hda.txt +++ /dev/null @@ -1,35 +0,0 @@ -NVIDIA Tegra30 HDA controller - -Required properties: -- compatible : For Tegra30, must contain "nvidia,tegra30-hda". Otherwise, - must contain '"nvidia,-hda", "nvidia,tegra30-hda"', where is - tegra114, tegra124, or tegra132. -- reg : Should contain the HDA registers location and length. -- interrupts : The interrupt from the HDA controller. -- clocks : Must contain an entry for each required entry in clock-names. - See ../clocks/clock-bindings.txt for details. -- clock-names : Must include the following entries: hda, hda2hdmi, hda2codec_2x -- resets : Must contain an entry for each entry in reset-names. - See ../reset/reset.txt for details. -- reset-names : Must include the following entries: hda, hda2hdmi, hda2codec_2x - -Optional properties: -- nvidia,model : The user-visible name of this sound complex. Since the property - is optional, legacy boards can use default name provided in hda driver. - -Example: - -hda@70030000 { - compatible = "nvidia,tegra124-hda", "nvidia,tegra30-hda"; - reg = <0x0 0x70030000 0x0 0x10000>; - interrupts = ; - clocks = <&tegra_car TEGRA124_CLK_HDA>, - <&tegra_car TEGRA124_CLK_HDA2HDMI>, - <&tegra_car TEGRA124_CLK_HDA2CODEC_2X>; - clock-names = "hda", "hda2hdmi", "hda2codec_2x"; - resets = <&tegra_car 125>, /* hda */ - <&tegra_car 128>, /* hda2hdmi */ - <&tegra_car 111>; /* hda2codec_2x */ - reset-names = "hda", "hda2hdmi", "hda2codec_2x"; - nvidia,model = "jetson-tk1-hda"; -}; diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra30-hda.yaml b/Documentation/devicetree/bindings/sound/nvidia,tegra30-hda.yaml new file mode 100644 index 000000000000..3059bc3c7362 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/nvidia,tegra30-hda.yaml @@ -0,0 +1,98 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/nvidia,tegra30-hda.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NVIDIA Tegra HDA controller + +description: | + The High Definition Audio (HDA) block provides a serial interface to + audio codec. It supports multiple input and output streams. + +maintainers: + - Thierry Reding + - Jon Hunter + +properties: + $nodename: + pattern: "^hda@[0-9a-f]*$" + + compatible: + oneOf: + - const: nvidia,tegra30-hda + - items: + - enum: + - nvidia,tegra194-hda + - nvidia,tegra186-hda + - nvidia,tegra210-hda + - nvidia,tegra124-hda + - const: nvidia,tegra30-hda + - items: + - const: nvidia,tegra132-hda + - const: nvidia,tegra124-hda + - const: nvidia,tegra30-hda + + reg: + maxItems: 1 + + interrupts: + description: The interrupt from the HDA controller + maxItems: 1 + + clocks: + maxItems: 3 + + clock-names: + maxItems: 3 + items: + - const: hda + - const: hda2hdmi + - const: hda2codec_2x + + resets: + maxItems: 3 + + reset-names: + maxItems: 3 + items: + - const: hda + - const: hda2hdmi + - const: hda2codec_2x + + nvidia,model: + $ref: /schemas/types.yaml#/definitions/string + description: | + The user-visible name of this sound complex. If this property is + not specified then boards can use default name provided in hda driver. + +required: + - compatible + - reg + - interrupts + - clocks + - clock-names + +additionalProperties: false + +examples: + - | + #include + #include + + hda@70030000 { + compatible = "nvidia,tegra124-hda", "nvidia,tegra30-hda"; + reg = <0x70030000 0x10000>; + interrupts = ; + clocks = <&tegra_car TEGRA124_CLK_HDA>, + <&tegra_car TEGRA124_CLK_HDA2HDMI>, + <&tegra_car TEGRA124_CLK_HDA2CODEC_2X>; + clock-names = "hda", "hda2hdmi", "hda2codec_2x"; + resets = <&tegra_car 125>, /* hda */ + <&tegra_car 128>, /* hda2hdmi */ + <&tegra_car 111>; /* hda2codec_2x */ + reset-names = "hda", "hda2hdmi", "hda2codec_2x"; + nvidia,model = "jetson-tk1-hda"; + }; + +... -- cgit v1.2.3 From 3759d5edc07598d55124d87bd292a95f79f47997 Mon Sep 17 00:00:00 2001 From: Sameer Pujar Date: Thu, 3 Dec 2020 20:06:42 +0530 Subject: dt-bindings: tegra: Add missing HDA properties Document the missing properties which are currently required for Tegra186/Tegra194 DT files. Signed-off-by: Sameer Pujar Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/1607006202-4078-3-git-send-email-spujar@nvidia.com Signed-off-by: Mark Brown --- .../devicetree/bindings/sound/nvidia,tegra30-hda.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra30-hda.yaml b/Documentation/devicetree/bindings/sound/nvidia,tegra30-hda.yaml index 3059bc3c7362..e543a6123792 100644 --- a/Documentation/devicetree/bindings/sound/nvidia,tegra30-hda.yaml +++ b/Documentation/devicetree/bindings/sound/nvidia,tegra30-hda.yaml @@ -60,6 +60,20 @@ properties: - const: hda2hdmi - const: hda2codec_2x + power-domains: + maxItems: 1 + + interconnects: + maxItems: 2 + + interconnect-names: + items: + - const: dma-mem + - const: write + + iommus: + maxItems: 1 + nvidia,model: $ref: /schemas/types.yaml#/definitions/string description: | -- cgit v1.2.3