Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1443978 > unrolled thread

[PATCH 0/4] Qualcomm IPQ4019 Audio driver addition

Started bynjaigane@codeaurora.org
First post2016-07-15 09:10 +0200
Last post2016-07-15 15:00 +0200
Articles 8 — 5 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 0/4] Qualcomm IPQ4019 Audio driver addition njaigane@codeaurora.org - 2016-07-15 09:10 +0200
    [PATCH 1/4] qcom: ipq4019: Add ipq4019 ASoC device tree changes njaigane@codeaurora.org - 2016-07-15 09:10 +0200
      Re: [PATCH 1/4] qcom: ipq4019: Add ipq4019 ASoC device tree changes Rob Herring <robh@kernel.org> - 2016-07-17 22:10 +0200
    [PATCH 3/4] qcom: ipq4019: ASoC tlmm/pinctrl support njaigane@codeaurora.org - 2016-07-15 09:10 +0200
      Re: [PATCH 3/4] qcom: ipq4019: ASoC tlmm/pinctrl support Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-07-15 21:20 +0200
      Re: [PATCH 3/4] qcom: ipq4019: ASoC tlmm/pinctrl support Andy Gross <andy.gross@linaro.org> - 2016-07-15 22:30 +0200
    Re: [PATCH 4/4] qcom: ipq4019: Add ASoC driver modules Mark Brown <broonie@kernel.org> - 2016-07-15 15:00 +0200
    Re: [PATCH 0/4] Qualcomm IPQ4019 Audio driver addition Mark Brown <broonie@kernel.org> - 2016-07-15 15:00 +0200

#1443978 — [PATCH 0/4] Qualcomm IPQ4019 Audio driver addition

Fromnjaigane@codeaurora.org
Date2016-07-15 09:10 +0200
Subject[PATCH 0/4] Qualcomm IPQ4019 Audio driver addition
Message-ID<rV5q1-3U6-9@gated-at.bofh.it>
From: Jaiganesh Narayanan <njaigane@codeaurora.org>

These patches add the support for Qualcomm IPQ4019 ASoC
with the ALSA based audio drivers. The patches are broken

1. Device Tree support
2. Audio clock driver support
3. TLMM / Pinctrl support
4. ALSA based audio drivers

Jaiganesh Narayanan (4):
  qcom: ipq4019: Add ipq4019 ASoC device tree changes
  qcom: ipq4019: ASoC clock driver support
  qcom: ipq4019: ASoC tlmm/pinctrl support
  qcom: ipq4019: Add ASoC driver modules

 .../bindings/sound/qca,ipq4019-audio-adss.txt      |  20 +
 .../bindings/sound/qca,ipq4019-audio.txt           |  13 +
 .../bindings/sound/qca,ipq4019-codec.txt           |  15 +
 .../devicetree/bindings/sound/qca,ipq4019-i2s.txt  |  33 +
 .../devicetree/bindings/sound/qca,ipq4019-i2s1.txt |  29 +
 .../devicetree/bindings/sound/qca,ipq4019-i2s2.txt |  29 +
 .../devicetree/bindings/sound/qca,ipq4019-mbox.txt |  23 +
 .../bindings/sound/qca,ipq4019-pcm-i2s.txt         |  15 +
 .../bindings/sound/qca,ipq4019-pcm-i2s1.txt        |  15 +
 .../bindings/sound/qca,ipq4019-pcm-i2s2.txt        |  15 +
 .../bindings/sound/qca,ipq4019-pcm-spdif.txt       |  15 +
 .../bindings/sound/qca,ipq4019-pcm-tdm.txt         |  15 +
 .../bindings/sound/qca,ipq4019-spdif.txt           |  35 +
 .../bindings/sound/qca,ipq4019-stereo.txt          |  17 +
 .../devicetree/bindings/sound/qca,ipq4019-tdm.txt  |  33 +
 arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1.dtsi      | 195 ++++-
 arch/arm/boot/dts/qcom-ipq4019.dtsi                | 247 +++++-
 drivers/clk/qcom/Kconfig                           |   8 +
 drivers/clk/qcom/Makefile                          |   2 +
 drivers/clk/qcom/adcc-ipq4019.c                    | 700 +++++++++++++++++
 drivers/clk/qcom/clk-qcapll.c                      | 197 +++++
 drivers/clk/qcom/clk-qcapll.h                      |  60 ++
 drivers/clk/qcom/clk-rcg.h                         |  68 +-
 drivers/clk/qcom/clk-rcg2.c                        | 699 ++++++++++++++++-
 drivers/clk/qcom/common.c                          |   9 +-
 drivers/clk/qcom/common.h                          |   3 +-
 drivers/pinctrl/qcom/pinctrl-ipq4019.c             | 116 ++-
 include/dt-bindings/clock/qca,adcc-ipq4019.h       |  45 ++
 include/dt-bindings/clock/qcom,gcc-ipq4019.h       |   4 +-
 include/dt-bindings/sound/ipq4019-audio.h          |  37 +
 sound/soc/qcom/Kconfig                             |  47 ++
 sound/soc/qcom/Makefile                            |   1 +
 sound/soc/qcom/ipq4019/Makefile                    |  16 +
 sound/soc/qcom/ipq4019/ipq4019-adss.c              | 407 ++++++++++
 sound/soc/qcom/ipq4019/ipq4019-adss.h              | 432 +++++++++++
 sound/soc/qcom/ipq4019/ipq4019-codec.c             | 475 ++++++++++++
 sound/soc/qcom/ipq4019/ipq4019-codec.h             |  91 +++
 sound/soc/qcom/ipq4019/ipq4019-cpu-dai.c           | 687 +++++++++++++++++
 sound/soc/qcom/ipq4019/ipq4019-mbox.c              | 825 +++++++++++++++++++++
 sound/soc/qcom/ipq4019/ipq4019-mbox.h              | 146 ++++
 sound/soc/qcom/ipq4019/ipq4019-pcm-i2s.c           | 609 +++++++++++++++
 sound/soc/qcom/ipq4019/ipq4019-pcm-spdif.c         | 664 +++++++++++++++++
 sound/soc/qcom/ipq4019/ipq4019-pcm-tdm.c           | 609 +++++++++++++++
 sound/soc/qcom/ipq4019/ipq4019-pcm.h               |  37 +
 sound/soc/qcom/ipq4019/ipq4019-stereo.c            | 313 ++++++++
 sound/soc/qcom/ipq4019/ipq4019.c                   | 121 +++
 46 files changed, 8135 insertions(+), 57 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/sound/qca,ipq4019-audio-adss.txt
 create mode 100644 Documentation/devicetree/bindings/sound/qca,ipq4019-audio.txt
 create mode 100644 Documentation/devicetree/bindings/sound/qca,ipq4019-codec.txt
 create mode 100644 Documentation/devicetree/bindings/sound/qca,ipq4019-i2s.txt
 create mode 100644 Documentation/devicetree/bindings/sound/qca,ipq4019-i2s1.txt
 create mode 100644 Documentation/devicetree/bindings/sound/qca,ipq4019-i2s2.txt
 create mode 100644 Documentation/devicetree/bindings/sound/qca,ipq4019-mbox.txt
 create mode 100644 Documentation/devicetree/bindings/sound/qca,ipq4019-pcm-i2s.txt
 create mode 100644 Documentation/devicetree/bindings/sound/qca,ipq4019-pcm-i2s1.txt
 create mode 100644 Documentation/devicetree/bindings/sound/qca,ipq4019-pcm-i2s2.txt
 create mode 100644 Documentation/devicetree/bindings/sound/qca,ipq4019-pcm-spdif.txt
 create mode 100644 Documentation/devicetree/bindings/sound/qca,ipq4019-pcm-tdm.txt
 create mode 100644 Documentation/devicetree/bindings/sound/qca,ipq4019-spdif.txt
 create mode 100644 Documentation/devicetree/bindings/sound/qca,ipq4019-stereo.txt
 create mode 100644 Documentation/devicetree/bindings/sound/qca,ipq4019-tdm.txt
 create mode 100644 drivers/clk/qcom/adcc-ipq4019.c
 create mode 100644 drivers/clk/qcom/clk-qcapll.c
 create mode 100644 drivers/clk/qcom/clk-qcapll.h
 create mode 100644 include/dt-bindings/clock/qca,adcc-ipq4019.h
 create mode 100644 include/dt-bindings/sound/ipq4019-audio.h
 create mode 100644 sound/soc/qcom/ipq4019/Makefile
 create mode 100644 sound/soc/qcom/ipq4019/ipq4019-adss.c
 create mode 100644 sound/soc/qcom/ipq4019/ipq4019-adss.h
 create mode 100644 sound/soc/qcom/ipq4019/ipq4019-codec.c
 create mode 100644 sound/soc/qcom/ipq4019/ipq4019-codec.h
 create mode 100644 sound/soc/qcom/ipq4019/ipq4019-cpu-dai.c
 create mode 100644 sound/soc/qcom/ipq4019/ipq4019-mbox.c
 create mode 100644 sound/soc/qcom/ipq4019/ipq4019-mbox.h
 create mode 100644 sound/soc/qcom/ipq4019/ipq4019-pcm-i2s.c
 create mode 100644 sound/soc/qcom/ipq4019/ipq4019-pcm-spdif.c
 create mode 100644 sound/soc/qcom/ipq4019/ipq4019-pcm-tdm.c
 create mode 100644 sound/soc/qcom/ipq4019/ipq4019-pcm.h
 create mode 100644 sound/soc/qcom/ipq4019/ipq4019-stereo.c
 create mode 100644 sound/soc/qcom/ipq4019/ipq4019.c

-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

[toc] | [next] | [standalone]


#1443980 — [PATCH 1/4] qcom: ipq4019: Add ipq4019 ASoC device tree changes

Fromnjaigane@codeaurora.org
Date2016-07-15 09:10 +0200
Subject[PATCH 1/4] qcom: ipq4019: Add ipq4019 ASoC device tree changes
Message-ID<rV5q2-3U6-25@gated-at.bofh.it>
In reply to#1443978
From: Jaiganesh Narayanan <njaigane@codeaurora.org>

This patch adds the ipq4019 ASoC device tree changes and the
binding documentation for pcm, spdif, tdm, stereo, codec, mbox,
adss modules

Signed-off-by: Jaiganesh Narayanan <njaigane@codeaurora.org>
---
 .../bindings/sound/qca,ipq4019-audio-adss.txt      |  20 ++
 .../bindings/sound/qca,ipq4019-audio.txt           |  13 ++
 .../bindings/sound/qca,ipq4019-codec.txt           |  15 ++
 .../devicetree/bindings/sound/qca,ipq4019-i2s.txt  |  33 +++
 .../devicetree/bindings/sound/qca,ipq4019-i2s1.txt |  29 +++
 .../devicetree/bindings/sound/qca,ipq4019-i2s2.txt |  29 +++
 .../devicetree/bindings/sound/qca,ipq4019-mbox.txt |  23 ++
 .../bindings/sound/qca,ipq4019-pcm-i2s.txt         |  15 ++
 .../bindings/sound/qca,ipq4019-pcm-i2s1.txt        |  15 ++
 .../bindings/sound/qca,ipq4019-pcm-i2s2.txt        |  15 ++
 .../bindings/sound/qca,ipq4019-pcm-spdif.txt       |  15 ++
 .../bindings/sound/qca,ipq4019-pcm-tdm.txt         |  15 ++
 .../bindings/sound/qca,ipq4019-spdif.txt           |  35 +++
 .../bindings/sound/qca,ipq4019-stereo.txt          |  17 ++
 .../devicetree/bindings/sound/qca,ipq4019-tdm.txt  |  33 +++
 arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1.dtsi      | 195 ++++++++++++++--
 arch/arm/boot/dts/qcom-ipq4019.dtsi                | 247 ++++++++++++++++++++-
 17 files changed, 742 insertions(+), 22 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/sound/qca,ipq4019-audio-adss.txt
 create mode 100644 Documentation/devicetree/bindings/sound/qca,ipq4019-audio.txt
 create mode 100644 Documentation/devicetree/bindings/sound/qca,ipq4019-codec.txt
 create mode 100644 Documentation/devicetree/bindings/sound/qca,ipq4019-i2s.txt
 create mode 100644 Documentation/devicetree/bindings/sound/qca,ipq4019-i2s1.txt
 create mode 100644 Documentation/devicetree/bindings/sound/qca,ipq4019-i2s2.txt
 create mode 100644 Documentation/devicetree/bindings/sound/qca,ipq4019-mbox.txt
 create mode 100644 Documentation/devicetree/bindings/sound/qca,ipq4019-pcm-i2s.txt
 create mode 100644 Documentation/devicetree/bindings/sound/qca,ipq4019-pcm-i2s1.txt
 create mode 100644 Documentation/devicetree/bindings/sound/qca,ipq4019-pcm-i2s2.txt
 create mode 100644 Documentation/devicetree/bindings/sound/qca,ipq4019-pcm-spdif.txt
 create mode 100644 Documentation/devicetree/bindings/sound/qca,ipq4019-pcm-tdm.txt
 create mode 100644 Documentation/devicetree/bindings/sound/qca,ipq4019-spdif.txt
 create mode 100644 Documentation/devicetree/bindings/sound/qca,ipq4019-stereo.txt
 create mode 100644 Documentation/devicetree/bindings/sound/qca,ipq4019-tdm.txt

diff --git a/Documentation/devicetree/bindings/sound/qca,ipq4019-audio-adss.txt b/Documentation/devicetree/bindings/sound/qca,ipq4019-audio-adss.txt
new file mode 100644
index 0000000..5ba2b9d
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/qca,ipq4019-audio-adss.txt
@@ -0,0 +1,20 @@
+* Qualcomm Technologies IPQ4019 ASoC audio subsystem driver
+
+This node models the Qualcomm Technologies IPQ4019 ASoC audio subsystem driver
+
+Required properties:
+
+- compatible	: "qca,ipq4019-audio-adss"
+- reg		: should have the stereo register address, length
+- resets	: references to the reset controllers
+- reset-names	: should be "blk_rst"
+
+
+Example:
+audio: audio@7700000 {
+	compatible = "qca,ipq4019-audio-adss";
+	reg = <0x7700000 0x34>;
+	resets = <&gcc AUDIO_BLK_ARES>;
+	reset-names = "blk_rst";
+	status = "disabled";
+};
diff --git a/Documentation/devicetree/bindings/sound/qca,ipq4019-audio.txt b/Documentation/devicetree/bindings/sound/qca,ipq4019-audio.txt
new file mode 100644
index 0000000..fde039f
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/qca,ipq4019-audio.txt
@@ -0,0 +1,13 @@
+* Qualcomm Technologies IPQ4019 ASoC machine driver
+
+This node models the Qualcomm Technologies IPQ4019 ASoC machine driver
+
+Required properties:
+
+- compatible		: "qca,ipq4019-audio"
+
+Example:
+
+sound: sound {
+	compatible = "qca,ipq4019-audio";
+};
diff --git a/Documentation/devicetree/bindings/sound/qca,ipq4019-codec.txt b/Documentation/devicetree/bindings/sound/qca,ipq4019-codec.txt
new file mode 100644
index 0000000..3df7742d
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/qca,ipq4019-codec.txt
@@ -0,0 +1,15 @@
+* Qualcomm Technologies IPQ4019 ASoC Codec driver
+
+This node models the Qualcomm Technologies IPQ4019 ASoC Codec driver
+
+Required properties:
+
+- compatible	: "qca,ipq4019-codec"
+- reg		: should have the stereo i2c register address
+
+Example:
+qca_codec: qca_codec@12 {
+	compatible = "qca,ipq4019-codec";
+	reg = <0x12>;
+	status = "disabled";
+};
diff --git a/Documentation/devicetree/bindings/sound/qca,ipq4019-i2s.txt b/Documentation/devicetree/bindings/sound/qca,ipq4019-i2s.txt
new file mode 100644
index 0000000..af9b63e
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/qca,ipq4019-i2s.txt
@@ -0,0 +1,33 @@
+* Qualcomm Technologies IPQ4019 ASoC PCM driver
+
+This node models the Qualcomm Technologies IPQ4019 ASoC I2S PCM driver
+
+Required properties:
+
+- compatible	 : "qca,ipq4019-i2s"
+- dma-tx-channel : should have the mbox tx channel id
+- dma-rx-channel : should have the mbox rx channel id
+- stereo-tx-port : should have the stereo tx id
+- stereo-rx-port : should have the stereo rx id
+- clocks	 : should have the audio tx bit clock, tx master clock,
+		   rx bit clock, rx master clock id
+- clock-names	 : should be "audio_tx_bclk", "audio_tx_mclk", "audio_rx_bclk",
+		   "audio_rx_mclk"
+
+Example:
+i2s: ipq4019-pcm-i2s@0 {
+	compatible = "qca,ipq4019-i2s";
+	dma-tx-channel = <MBOX0_TX_ID>;
+	dma-rx-channel = <MBOX3_RX_ID>;
+	stereo-tx-port = <STEREO0_ID>;
+	stereo-rx-port = <STEREO3_ID>;
+	clocks = <&adcc ADCC_TXB_CLK_SRC>,
+		<&adcc ADCC_TXM_CLK_SRC>,
+		<&adcc ADCC_RXB_CLK_SRC>,
+		<&adcc ADCC_RXM_CLK_SRC>;
+	clock-names = "audio_tx_bclk",
+		"audio_tx_mclk",
+		"audio_rx_bclk",
+		"audio_rx_mclk";
+	status = "disabled";
+};
diff --git a/Documentation/devicetree/bindings/sound/qca,ipq4019-i2s1.txt b/Documentation/devicetree/bindings/sound/qca,ipq4019-i2s1.txt
new file mode 100644
index 0000000..47333b3
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/qca,ipq4019-i2s1.txt
@@ -0,0 +1,29 @@
+* Qualcomm Technologies IPQ4019 ASoC I2S PCM driver
+
+This node models the Qualcomm Technologies IPQ4019 ASoC I2S PCM driver
+
+Required properties:
+
+- compatible	 : "qca,ipq4019-i2s1"
+- dma-tx-channel : should have the mbox tx channel id
+- stereo-tx-port : should have the stereo tx id
+- clocks	 : should have the audio tx bit clock, tx master clock,
+		   rx bit clock, rx master clock id
+- clock-names	 : should be "audio_tx_bclk", "audio_tx_mclk", "audio_rx_bclk",
+		   "audio_rx_mclk"
+
+Example:
+i2s1: ipq4019-pcm-i2s1@0 {
+	compatible = "qca,ipq4019-i2s1";
+	dma-tx-channel = <MBOX1_TX_ID>;
+	stereo-tx-port = <STEREO1_ID>;
+	clocks = <&adcc ADCC_TXB_CLK_SRC>,
+		<&adcc ADCC_TXM_CLK_SRC>,
+		<&adcc ADCC_RXB_CLK_SRC>,
+		<&adcc ADCC_RXM_CLK_SRC>;
+	clock-names = "audio_tx_bclk",
+		"audio_tx_mclk",
+		"audio_rx_bclk",
+		"audio_rx_mclk";
+	status = "disabled";
+};
diff --git a/Documentation/devicetree/bindings/sound/qca,ipq4019-i2s2.txt b/Documentation/devicetree/bindings/sound/qca,ipq4019-i2s2.txt
new file mode 100644
index 0000000..9af0113
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/qca,ipq4019-i2s2.txt
@@ -0,0 +1,29 @@
+* Qualcomm Technologies IPQ4019 ASoC I2S PCM driver
+
+This node models the Qualcomm Technologies IPQ4019 ASoC I2S PCM driver
+
+Required properties:
+
+- compatible	 : "qca,ipq4019-i2s2"
+- dma-tx-channel : should have the mbox tx channel id
+- stereo-tx-port : should have the stereo tx id
+- clocks	 : should have the audio tx bit clock, tx master clock,
+		   rx bit clock, rx master clock id
+- clock-names	 : should be "audio_tx_bclk", "audio_tx_mclk", "audio_rx_bclk",
+		   "audio_rx_mclk"
+
+Example:
+i2s1: ipq4019-pcm-i2s2@0 {
+	compatible = "qca,ipq4019-i2s2";
+	dma-tx-channel = <MBOX2_TX_ID>;
+	stereo-tx-port = <STEREO2_ID>;
+	clocks = <&adcc ADCC_TXB_CLK_SRC>,
+		<&adcc ADCC_TXM_CLK_SRC>,
+		<&adcc ADCC_RXB_CLK_SRC>,
+		<&adcc ADCC_RXM_CLK_SRC>;
+	clock-names = "audio_tx_bclk",
+		"audio_tx_mclk",
+		"audio_rx_bclk",
+		"audio_rx_mclk";
+	status = "disabled";
+};
diff --git a/Documentation/devicetree/bindings/sound/qca,ipq4019-mbox.txt b/Documentation/devicetree/bindings/sound/qca,ipq4019-mbox.txt
new file mode 100644
index 0000000..51d6c51
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/qca,ipq4019-mbox.txt
@@ -0,0 +1,23 @@
+* Qualcomm Technologies IPQ4019 ASoC MBOX driver
+
+This node models the Qualcomm Technologies IPQ4019 ASoC mbox driver
+
+Required properties:
+
+- compatible	 : "qca,ipq4019-mbox"
+- dma-index	 : should have the mbox dma index
+- reg		 : should have the stereo register address, length
+- interrupts	 : should have the mbox interrupt no
+- tx-channel	 : should have the mbox tx id
+- rx-channel	 : should have the mbox rx id
+
+Example:
+mbox0: mbox@7708000 {
+	compatible = "qca,ipq4019-mbox";
+	dma-index = <0>;
+	reg = <0x7708000 0x1000>;
+	interrupts = <0 156 0>;
+	tx-channel = <MBOX0_TX_ID>;
+	rx-channel = <MBOX0_RX_ID>;
+	status = "disabled";
+};
diff --git a/Documentation/devicetree/bindings/sound/qca,ipq4019-pcm-i2s.txt b/Documentation/devicetree/bindings/sound/qca,ipq4019-pcm-i2s.txt
new file mode 100644
index 0000000..a47c7fb
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/qca,ipq4019-pcm-i2s.txt
@@ -0,0 +1,15 @@
+* Qualcomm Technologies IPQ4019 ASoC platform driver
+
+This node models the Qualcomm Technologies IPQ4019 ASoC platform driver
+
+Required properties:
+
+- compatible	 : "qca,ipq4019-pcm-i2s"
+- reg		 : should have the stereo register address, length
+
+Example:
+i2splatform: qca-pcm-i2s@7709000 {
+	compatible = "qca,ipq4019-pcm-i2s";
+	reg = <0x7709000 0x1000>;
+	status = "disabled";
+};
diff --git a/Documentation/devicetree/bindings/sound/qca,ipq4019-pcm-i2s1.txt b/Documentation/devicetree/bindings/sound/qca,ipq4019-pcm-i2s1.txt
new file mode 100644
index 0000000..cf23ca0b
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/qca,ipq4019-pcm-i2s1.txt
@@ -0,0 +1,15 @@
+* Qualcomm Technologies IPQ4019 ASoC platform driver
+
+This node models the Qualcomm Technologies IPQ4019 ASoC platform driver
+
+Required properties:
+
+- compatible	 : "qca,ipq4019-pcm-i2s1"
+- reg		 : should have the stereo register address, length
+
+Example:
+i2s1platform: qca-pcm-i2s1@770b000 {
+	compatible = "qca,ipq4019-pcm-i2s1";
+	reg = <0x770b000 0x1000>;
+	status = "disabled";
+};
diff --git a/Documentation/devicetree/bindings/sound/qca,ipq4019-pcm-i2s2.txt b/Documentation/devicetree/bindings/sound/qca,ipq4019-pcm-i2s2.txt
new file mode 100644
index 0000000..ae04380
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/qca,ipq4019-pcm-i2s2.txt
@@ -0,0 +1,15 @@
+* Qualcomm Technologies IPQ4019 ASoC platform driver
+
+This node models the Qualcomm Technologies IPQ4019 ASoC platform driver
+
+Required properties:
+
+- compatible	 : "qca,ipq4019-pcm-i2s2"
+- reg		 : should have the stereo register address, length
+
+Example:
+i2s2platform: qca-pcm-i2s1@770d000 {
+	compatible = "qca,ipq4019-pcm-i2s2";
+	reg = <0x770d000 0x1000>;
+	status = "disabled";
+};
diff --git a/Documentation/devicetree/bindings/sound/qca,ipq4019-pcm-spdif.txt b/Documentation/devicetree/bindings/sound/qca,ipq4019-pcm-spdif.txt
new file mode 100644
index 0000000..b47c02c
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/qca,ipq4019-pcm-spdif.txt
@@ -0,0 +1,15 @@
+* Qualcomm Technologies IPQ4019 ASoC SPDIF platform driver
+
+This node models the Qualcomm Technologies IPQ4019 ASoC SPDIF platform driver
+
+Required properties:
+
+- compatible	 : "qca,ipq4019-pcm-spdif"
+- reg		 : should have the stereo register address, length
+
+Example:
+tdmplatform: qca-pcm-spdif@7707000 {
+	compatible = "qca,ipq4019-pcm-spdif";
+	reg = <0x7709000 0x1000>;
+	status = "disabled";
+};
diff --git a/Documentation/devicetree/bindings/sound/qca,ipq4019-pcm-tdm.txt b/Documentation/devicetree/bindings/sound/qca,ipq4019-pcm-tdm.txt
new file mode 100644
index 0000000..bd3aaa3
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/qca,ipq4019-pcm-tdm.txt
@@ -0,0 +1,15 @@
+* Qualcomm Technologies IPQ4019 ASoC TDM platform driver
+
+This node models the Qualcomm Technologies IPQ4019 ASoC TDM platform driver
+
+Required properties:
+
+- compatible	 : "qca,ipq4019-pcm-tdm"
+- reg		 : should have the stereo register address, length
+
+Example:
+tdmplatform: qca-pcm-tdm@7709000 {
+	compatible = "qca,ipq4019-pcm-tdm";
+	reg = <0x7709000 0x1000>;
+	status = "disabled";
+};
diff --git a/Documentation/devicetree/bindings/sound/qca,ipq4019-spdif.txt b/Documentation/devicetree/bindings/sound/qca,ipq4019-spdif.txt
new file mode 100644
index 0000000..5a80bbe
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/qca,ipq4019-spdif.txt
@@ -0,0 +1,35 @@
+* Qualcomm Technologies IPQ4019 ASoC SPDIF driver
+
+This node models the Qualcomm Technologies IPQ4019 ASoC SPDIF driver
+
+Required properties:
+
+- compatible	 : "qca,ipq4019-spdif"
+- dma-tx-channel : should have the mbox tx channel id
+- dma-rx-channel : should have the mbox rx channel id
+- stereo-tx-port : should have the stereo tx id
+- stereo-rx-port : should have the stereo tx id
+- clocks	 : should have the audio tx bit clock, tx master clock,
+		   spdif clock, spdif divider clock, spdif in fast clock
+- clock-names	 : should be "audio_tx_bclk", "audio_tx_mclk", "audio_spdif_src",
+		   "audio_spdif_div2", "audio_spdifinfast_src"
+
+Example:
+spdif: spdif@0 {
+	compatible = "qca,ipq4019-spdif";
+	dma-tx-channel = <MBOX0_TX_ID>;
+	dma-rx-channel = <MBOX3_RX_ID>;
+	stereo-tx-port = <STEREO0_ID>;
+	stereo-rx-port = <STEREO3_ID>;
+	clocks = <&adcc ADCC_TXB_CLK_SRC>,
+		<&adcc ADCC_TXM_CLK_SRC>,
+		<&adcc ADCC_SPDIF_SRC>,
+		<&adcc ADCC_SPDIFDIV2_SRC>,
+		<&adcc ADCC_AUDIO_SPDIFINFAST_SRC>;
+	clock-names = "audio_tx_bclk",
+		"audio_tx_mclk",
+		"audio_spdif_src",
+		"audio_spdif_div2",
+		"audio_spdifinfast_src";
+	status = "disabled";
+};
diff --git a/Documentation/devicetree/bindings/sound/qca,ipq4019-stereo.txt b/Documentation/devicetree/bindings/sound/qca,ipq4019-stereo.txt
new file mode 100644
index 0000000..35b4815
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/qca,ipq4019-stereo.txt
@@ -0,0 +1,17 @@
+* Qualcomm Technologies IPQ4019 ASoC stereo driver
+
+This node models the Qualcomm Technologies IPQ4019 ASoC stereo driver
+
+Required properties:
+
+- compatible	 : "qca,ipq4019-stereo"
+- reg		 : should have the stereo register address, length
+- stereo-index	 : should have the stereo port index
+
+Example:
+stereo0: stereo@7709000 {
+	compatible = "qca,ipq4019-stereo";
+	reg = <0x7709000 0x1000>;
+	stereo-index = <STEREO0_ID>;
+	status = "disabled";
+};
diff --git a/Documentation/devicetree/bindings/sound/qca,ipq4019-tdm.txt b/Documentation/devicetree/bindings/sound/qca,ipq4019-tdm.txt
new file mode 100644
index 0000000..c2bf38c
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/qca,ipq4019-tdm.txt
@@ -0,0 +1,33 @@
+* Qualcomm Technologies IPQ4019 ASoC TDM driver
+
+This node models the Qualcomm Technologies IPQ4019 ASoC TDM driver
+
+Required properties:
+
+- compatible	 : "qca,ipq4019-tdm"
+- dma-tx-channel : should have the mbox tx channel id
+- dma-rx-channel : should have the mbox rx channel id
+- stereo-tx-port : should have the stereo tx id
+- stereo-rx-port : should have the stereo tx id
+- clocks	 : should have the audio tx bit clock, tx master clock,
+		   rx bit clock, rx master clock id
+- clock-names	 : should be "audio_tx_bclk", "audio_tx_mclk", "audio_rx_bclk",
+		   "audio_rx_mclk"
+
+Example:
+tdm: tdm@0 {
+	compatible = "qca,ipq4019-tdm";
+	dma-tx-channel = <MBOX0_TX_ID>;
+	dma-rx-channel = <MBOX3_RX_ID>;
+	stereo-tx-port = <STEREO0_ID>;
+	stereo-rx-port = <STEREO3_ID>;
+	clocks = <&adcc ADCC_TXB_CLK_SRC>,
+		<&adcc ADCC_TXM_CLK_SRC>,
+		<&adcc ADCC_RXB_CLK_SRC>,
+		<&adcc ADCC_RXM_CLK_SRC>;
+	clock-names = "audio_tx_bclk",
+		"audio_tx_mclk",
+		"audio_rx_bclk",
+		"audio_rx_mclk";
+	status = "disabled";
+};
diff --git a/arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1.dtsi b/arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1.dtsi
index b9457dd2..e2ab95a 100644
--- a/arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1.dtsi
+++ b/arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1.dtsi
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
@@ -20,26 +20,7 @@
 	model = "Qualcomm Technologies, Inc. IPQ4019/AP-DK01.1";
 	compatible = "qcom,ipq4019";
 
-	clocks {
-                xo: xo {
-                        compatible = "fixed-clock";
-                        clock-frequency = <48000000>;
-                        #clock-cells = <0>;
-                };
-	};
-
 	soc {
-
-
-		timer {
-			compatible = "arm,armv7-timer";
-			interrupts = <1 2 0xf08>,
-				     <1 3 0xf08>,
-				     <1 4 0xf08>,
-				     <1 1 0xf08>;
-			clock-frequency = <48000000>;
-		};
-
 		pinctrl@0x01000000 {
 			serial_pins: serial_pinmux {
 				mux {
@@ -69,6 +50,81 @@
 					bias-disable;
 					output-high;
 				};
+
+			};
+
+			audio_pins: audio_pinmux {
+				mux_1 {
+					pins = "gpio25", "gpio53", "gpio60";
+					function = "i2s_tx_bclk";
+					bias-pull,up;
+				};
+
+				mux_2 {
+					pins = "gpio27", "gpio54", "gpio63";
+					function = "i2s_txd1";
+					bias-pull,up;
+				};
+
+				mux_3 {
+					pins = "gpio28", "gpio55";
+					function = "i2s_txd2";
+					bias-pull,up;
+				};
+
+				mux_4 {
+					pins = "gpio29", "gpio56";
+					function = "i2s_txd3";
+					bias-pull,up;
+				};
+
+				mux_5 {
+					pins = "gpio24", "gpio52";
+					function = "i2s_tx_mclk";
+					bias-pull,up;
+				};
+
+				mux_6 {
+					pins = "gpio26", "gpio57", "gpio61";
+					function = "i2s_tx_fsync";
+					bias-pull,up;
+				};
+
+				mux_7 {
+					pins = "gpio2", "gpio23", "gpio63";
+					function = "i2s_rxd";
+					bias-pull,up;
+				};
+
+				mux_8 {
+					pins = "gpio20", "gpio58";
+					function = "i2s_rx_mclk";
+					bias-pull,up;
+				};
+
+				mux_9 {
+					pins = "gpio0", "gpio21", "gpio60";
+					function = "i2s_rx_bclk";
+					bias-pull,up;
+				};
+
+				mux_10 {
+					pins = "gpio1", "gpio22", "gpio61";
+					function = "i2s_rx_fsync";
+					bias-pull,up;
+				};
+
+				mux_11 {
+					pins = "gpio34", "gpio59", "gpio63";
+					function = "i2s_spdif_in";
+					bias-pull,up;
+				};
+
+				mux_12 {
+					pins = "gpio35", "gpio62", "gpio63";
+					function = "i2s_spdif_out";
+					bias-pull,up;
+				};
 			};
 		};
 
@@ -108,5 +164,104 @@
 		watchdog@b017000 {
 			status = "ok";
 		};
+
+		adcc: clock-controller@7700038 {
+			status = "ok";
+		};
+
+		audio: audio@7700000 {
+			status = "ok";
+		};
+
+		mbox0: mbox@7708000 {
+			status = "ok";
+		};
+
+		mbox1: mbox@770a000 {
+			status = "ok";
+		};
+
+		mbox2: mbox@770c000 {
+			status = "ok";
+		};
+
+		mbox3: mbox@770e000 {
+			status = "ok";
+		};
+
+		mbox4: mbox@7706000 {
+			status = "ok";
+		};
+
+		stereo0: stereo@7709000 {
+			status = "ok";
+		};
+
+		stereo1: stereo@770b000 {
+			status = "ok";
+		};
+
+		stereo2: stereo@770d000 {
+			status = "ok";
+		};
+
+		stereo3: stereo@770f000 {
+			status = "ok";
+		};
+
+		/* Enable Audio Interfaces */
+		i2s: ipq4019-pcm-i2s@0 {
+			status = "ok";
+		};
+
+		i2splatform: qca-pcm-i2s@7709000 {
+			status = "ok";
+		};
+
+		i2s1platform: qca-pcm-i2s1@770b000 {
+			status = "ok";
+		};
+
+		i2s1: ipq4019-pcm-i2s1@0 {
+			status = "ok";
+		};
+
+		i2s2platform: qca-pcm-i2s2@770d000 {
+			status = "ok";
+		};
+
+		i2s2: ipq4019-pcm-i2s2@0 {
+			status = "ok";
+		};
+
+		tdmplatform: qca-pcm-tdm@7709000 {
+			status = "ok";
+		};
+
+		tdm: tdm@0 {
+			status = "ok";
+		};
+
+		spdifplatform: qca-pcm-spdif@7707000 {
+			status = "ok";
+		};
+
+		spdif: spdif@0 {
+			status = "ok";
+		};
+
+		sound: sound@0 {
+			pinctrl-0 = <&audio_pins>;
+			pinctrl-names = "default";
+			status = "ok";
+		};
+
+		i2c_0: i2c@78b7000 { /* BLSP1 QUP2 */
+			status = "ok";
+
+			qca_codec: qca_codec@12 {
+				status = "ok";
+			};
+		};
 	};
 };
diff --git a/arch/arm/boot/dts/qcom-ipq4019.dtsi b/arch/arm/boot/dts/qcom-ipq4019.dtsi
index 5c08d19..e2b4810 100644
--- a/arch/arm/boot/dts/qcom-ipq4019.dtsi
+++ b/arch/arm/boot/dts/qcom-ipq4019.dtsi
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 and
@@ -15,6 +15,8 @@
 
 #include "skeleton.dtsi"
 #include <dt-bindings/clock/qcom,gcc-ipq4019.h>
+#include <dt-bindings/clock/qca,adcc-ipq4019.h>
+#include <dt-bindings/sound/ipq4019-audio.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include <dt-bindings/interrupt-controller/irq.h>
 
@@ -90,6 +92,21 @@
 			clock-frequency = <32768>;
 			#clock-cells = <0>;
 		};
+
+		xo: xo {
+			compatible = "fixed-clock";
+			clock-frequency = <48000000>;
+			#clock-cells = <0>;
+		};
+	};
+
+	timer {
+		compatible = "arm,armv7-timer";
+		interrupts = <1 2 0xf08>,
+			     <1 3 0xf08>,
+			     <1 4 0xf08>,
+			     <1 1 0xf08>;
+		clock-frequency = <48000000>;
 	};
 
 	soc {
@@ -156,8 +173,13 @@
 			#address-cells = <1>;
 			#size-cells = <0>;
 			status = "disabled";
-		};
 
+			qca_codec: qca_codec@12 {
+				compatible = "qca,ipq4019-codec";
+				reg = <0x12>;
+				status = "disabled";
+			};
+		};
 
 		cryptobam: dma@8e04000 {
 			compatible = "qcom,bam-v1.7.0";
@@ -263,5 +285,226 @@
 			compatible = "qcom,pshold";
 			reg = <0x4ab000 0x4>;
 		};
+
+		adcc: clock-controller@7700038 {
+			compatible = "qcom,adcc-ipq4019";
+			#clock-cells = <1>;
+			#reset-cells = <1>;
+			reg = <0x7700038 0x1DC>;
+			status = "disabled";
+		};
+
+		audio: audio@7700000 {
+			compatible = "qca,ipq4019-audio-adss";
+			reg = <0x7700000 0x34>,
+				<0x7707000 0x20>;
+			resets = <&gcc AUDIO_BLK_ARES>;
+			reset-names = "blk_rst";
+			status = "disabled";
+		};
+
+		pcm: pcm@7704000 {
+			compatible = "qca,ipq4019-pcm";
+			reg = <0x7704000 0x2000>;
+			dma-tx-channel = <MBOX3_TX_ID>;
+			dma-rx-channel = <MBOX0_RX_ID>;
+			stereo-tx-port = <STEREO3_ID>;
+			stereo-rx-port = <STEREO0_ID>;
+			clocks = <&adcc ADCC_PCM_CLK_SRC>;
+			clock-names = "audio_pcm_clk";
+			status = "disabled";
+		};
+
+		mbox0: mbox@7708000 {
+			dma-index = <0>;
+			compatible = "qca,ipq4019-mbox";
+			reg = <0x7708000 0x1000>;
+			interrupts = <0 156 0>;
+			tx-channel = <MBOX0_TX_ID>;
+			rx-channel = <MBOX0_RX_ID>;
+			status = "disabled";
+		};
+
+		mbox1: mbox@770a000 {
+			dma-index = <1>;
+			compatible = "qca,ipq4019-mbox";
+			reg = <0x770A000 0x1000>;
+			interrupts = <0 157 0>;
+			tx-channel = <MBOX1_TX_ID>;
+			status = "disabled";
+		};
+
+		mbox2: mbox@770c000 {
+			dma-index = <2>;
+			compatible = "qca,ipq4019-mbox";
+			reg = <0x770C000 0x1000>;
+			interrupts = <0 158 0>;
+			tx-channel = <MBOX2_TX_ID>;
+			status = "disabled";
+		};
+
+		mbox3: mbox@770e000 {
+			dma-index = <3>;
+			compatible = "qca,ipq4019-mbox";
+			reg = <0x770E000 0x1000>;
+			interrupts = <0 159 0>;
+			tx-channel = <MBOX3_TX_ID>;
+			rx-channel = <MBOX3_RX_ID>;
+			status = "disabled";
+		};
+
+		mbox4: mbox@7706000 {
+			dma-index = <4>;
+			compatible = "qca,ipq4019-mbox";
+			reg = <0x7706000 0x1000>;
+			interrupts = <0 163 0>;
+			rx-channel = <MBOX_SPDIF_RX_ID>;
+			status = "disabled";
+		};
+
+		stereo0: stereo@7709000 {
+			stereo-index = <STEREO0_ID>;
+			compatible = "qca,ipq4019-stereo";
+			reg = <0x7709000 0x1000>;
+			status = "disabled";
+		};
+
+		stereo1: stereo@770b000 {
+			stereo-index = <STEREO1_ID>;
+			compatible = "qca,ipq4019-stereo";
+			reg = <0x770B000 0x1000>;
+			status = "disabled";
+		};
+
+		stereo2: stereo@770d000 {
+			stereo-index = <STEREO2_ID>;
+			compatible = "qca,ipq4019-stereo";
+			reg = <0x770D000 0x1000>;
+			status = "disabled";
+		};
+
+		stereo3: stereo@770f000 {
+			stereo-index = <STEREO3_ID>;
+			compatible = "qca,ipq4019-stereo";
+			reg = <0x770F000 0x1000>;
+			status = "disabled";
+		};
+
+		i2splatform: qca-pcm-i2s@7709000 {
+			compatible = "qca,ipq4019-pcm-i2s";
+			reg = <0x7709000 0x1000>;
+			status = "disabled";
+		};
+
+		i2s: ipq4019-pcm-i2s@0 {
+			compatible = "qca,ipq4019-i2s";
+			dma-tx-channel = <MBOX0_TX_ID>;
+			stereo-tx-port = <STEREO0_ID>;
+			dma-rx-channel = <MBOX3_RX_ID>;
+			stereo-rx-port = <STEREO3_ID>;
+			clocks = <&adcc ADCC_TXB_CLK_SRC>,
+				<&adcc ADCC_TXM_CLK_SRC>,
+				<&adcc ADCC_RXB_CLK_SRC>,
+				<&adcc ADCC_RXM_CLK_SRC>;
+			clock-names = "audio_tx_bclk",
+				"audio_tx_mclk",
+				"audio_rx_bclk",
+				"audio_rx_mclk";
+			status = "disabled";
+		};
+
+		i2s1platform: qca-pcm-i2s1@770b000 {
+			compatible = "qca,ipq4019-pcm-i2s1";
+			reg = <0x770b000 0x1000>;
+			status = "disabled";
+		};
+
+		i2s1: ipq4019-pcm-i2s1@0 {
+			compatible = "qca,ipq4019-i2s1";
+			dma-tx-channel = <MBOX1_TX_ID>;
+			stereo-tx-port = <STEREO1_ID>;
+			clocks = <&adcc ADCC_TXB_CLK_SRC>,
+				<&adcc ADCC_TXM_CLK_SRC>,
+				<&adcc ADCC_RXB_CLK_SRC>,
+				<&adcc ADCC_RXM_CLK_SRC>;
+			clock-names = "audio_tx_bclk",
+				"audio_tx_mclk",
+				"audio_rx_bclk",
+				"audio_rx_mclk";
+			status = "disabled";
+		};
+
+		i2s2platform: qca-pcm-i2s2@770d000 {
+			compatible = "qca,ipq4019-pcm-i2s2";
+			reg = <0x770d000 0x1000>;
+			status = "disabled";
+		};
+
+		i2s2: ipq4019-pcm-i2s2@0 {
+			compatible = "qca,ipq4019-i2s2";
+			dma-tx-channel = <MBOX2_TX_ID>;
+			stereo-tx-port = <STEREO2_ID>;
+			clocks = <&adcc ADCC_TXB_CLK_SRC>,
+				<&adcc ADCC_TXM_CLK_SRC>,
+				<&adcc ADCC_RXB_CLK_SRC>,
+				<&adcc ADCC_RXM_CLK_SRC>;
+			clock-names = "audio_tx_bclk",
+				"audio_tx_mclk",
+				"audio_rx_bclk",
+				"audio_rx_mclk";
+			status = "disabled";
+		};
+
+		tdmplatform: qca-pcm-tdm@7709000 {
+			compatible = "qca,ipq4019-pcm-tdm";
+			reg = <0x7709000 0x1000>;
+			status = "disabled";
+		};
+
+		tdm: tdm@0 {
+			compatible = "qca,ipq4019-tdm";
+			dma-tx-channel = <MBOX0_TX_ID>;
+			dma-rx-channel = <MBOX3_RX_ID>;
+			stereo-tx-port = <STEREO0_ID>;
+			stereo-rx-port = <STEREO3_ID>;
+			clocks = <&adcc ADCC_TXB_CLK_SRC>,
+				<&adcc ADCC_TXM_CLK_SRC>,
+				<&adcc ADCC_RXB_CLK_SRC>,
+				<&adcc ADCC_RXM_CLK_SRC>;
+			clock-names = "audio_tx_bclk",
+				"audio_tx_mclk",
+				"audio_rx_bclk",
+				"audio_rx_mclk";
+			status = "disabled";
+		};
+
+		spdifplatform: qca-pcm-spdif@7707000 {
+			compatible = "qca,ipq4019-pcm-spdif";
+			reg = <0x7707000 0x1000>;
+			status = "disabled";
+		};
+
+		spdif: spdif@0 {
+			compatible = "qca,ipq4019-spdif";
+			dma-tx-channel = <MBOX0_TX_ID>;
+			dma-rx-channel = <MBOX_SPDIF_RX_ID>;
+			stereo-tx-port = <STEREO0_ID>;
+			clocks = <&adcc ADCC_TXB_CLK_SRC>,
+				<&adcc ADCC_TXM_CLK_SRC>,
+				<&adcc ADCC_SPDIF_SRC>,
+				<&adcc ADCC_SPDIFDIV2_SRC >,
+				<&adcc ADCC_AUDIO_SPDIFINFAST_SRC>;
+			clock-names = "audio_tx_bclk",
+				"audio_tx_mclk",
+				"audio_spdif_src",
+				"audio_spdif_div2",
+				"audio_spdifinfast_src";
+			status = "disabled";
+		};
+
+		sound: sound@0 {
+			compatible = "qca,ipq4019-audio";
+			status = "disabled";
+		};
 	};
 };
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

[toc] | [prev] | [next] | [standalone]


#1445099 — Re: [PATCH 1/4] qcom: ipq4019: Add ipq4019 ASoC device tree changes

FromRob Herring <robh@kernel.org>
Date2016-07-17 22:10 +0200
SubjectRe: [PATCH 1/4] qcom: ipq4019: Add ipq4019 ASoC device tree changes
Message-ID<rW0xY-59Z-3@gated-at.bofh.it>
In reply to#1443980
On Fri, Jul 15, 2016 at 12:37:03PM +0530, njaigane@codeaurora.org wrote:
> From: Jaiganesh Narayanan <njaigane@codeaurora.org>
> 
> This patch adds the ipq4019 ASoC device tree changes and the
> binding documentation for pcm, spdif, tdm, stereo, codec, mbox,
> adss modules
> 
> Signed-off-by: Jaiganesh Narayanan <njaigane@codeaurora.org>
> ---
>  .../bindings/sound/qca,ipq4019-audio-adss.txt      |  20 ++
>  .../bindings/sound/qca,ipq4019-audio.txt           |  13 ++
>  .../bindings/sound/qca,ipq4019-codec.txt           |  15 ++
>  .../devicetree/bindings/sound/qca,ipq4019-i2s.txt  |  33 +++
>  .../devicetree/bindings/sound/qca,ipq4019-i2s1.txt |  29 +++
>  .../devicetree/bindings/sound/qca,ipq4019-i2s2.txt |  29 +++
>  .../devicetree/bindings/sound/qca,ipq4019-mbox.txt |  23 ++
>  .../bindings/sound/qca,ipq4019-pcm-i2s.txt         |  15 ++
>  .../bindings/sound/qca,ipq4019-pcm-i2s1.txt        |  15 ++
>  .../bindings/sound/qca,ipq4019-pcm-i2s2.txt        |  15 ++
>  .../bindings/sound/qca,ipq4019-pcm-spdif.txt       |  15 ++
>  .../bindings/sound/qca,ipq4019-pcm-tdm.txt         |  15 ++
>  .../bindings/sound/qca,ipq4019-spdif.txt           |  35 +++
>  .../bindings/sound/qca,ipq4019-stereo.txt          |  17 ++
>  .../devicetree/bindings/sound/qca,ipq4019-tdm.txt  |  33 +++
>  arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1.dtsi      | 195 ++++++++++++++--
>  arch/arm/boot/dts/qcom-ipq4019.dtsi                | 247 ++++++++++++++++++++-
>  17 files changed, 742 insertions(+), 22 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/sound/qca,ipq4019-audio-adss.txt
>  create mode 100644 Documentation/devicetree/bindings/sound/qca,ipq4019-audio.txt
>  create mode 100644 Documentation/devicetree/bindings/sound/qca,ipq4019-codec.txt
>  create mode 100644 Documentation/devicetree/bindings/sound/qca,ipq4019-i2s.txt
>  create mode 100644 Documentation/devicetree/bindings/sound/qca,ipq4019-i2s1.txt
>  create mode 100644 Documentation/devicetree/bindings/sound/qca,ipq4019-i2s2.txt
>  create mode 100644 Documentation/devicetree/bindings/sound/qca,ipq4019-mbox.txt
>  create mode 100644 Documentation/devicetree/bindings/sound/qca,ipq4019-pcm-i2s.txt
>  create mode 100644 Documentation/devicetree/bindings/sound/qca,ipq4019-pcm-i2s1.txt
>  create mode 100644 Documentation/devicetree/bindings/sound/qca,ipq4019-pcm-i2s2.txt
>  create mode 100644 Documentation/devicetree/bindings/sound/qca,ipq4019-pcm-spdif.txt
>  create mode 100644 Documentation/devicetree/bindings/sound/qca,ipq4019-pcm-tdm.txt
>  create mode 100644 Documentation/devicetree/bindings/sound/qca,ipq4019-spdif.txt
>  create mode 100644 Documentation/devicetree/bindings/sound/qca,ipq4019-stereo.txt
>  create mode 100644 Documentation/devicetree/bindings/sound/qca,ipq4019-tdm.txt
> 
> diff --git a/Documentation/devicetree/bindings/sound/qca,ipq4019-audio-adss.txt b/Documentation/devicetree/bindings/sound/qca,ipq4019-audio-adss.txt
> new file mode 100644
> index 0000000..5ba2b9d
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/qca,ipq4019-audio-adss.txt
> @@ -0,0 +1,20 @@
> +* Qualcomm Technologies IPQ4019 ASoC audio subsystem driver
> +
> +This node models the Qualcomm Technologies IPQ4019 ASoC audio subsystem driver
> +
> +Required properties:
> +
> +- compatible	: "qca,ipq4019-audio-adss"
> +- reg		: should have the stereo register address, length
> +- resets	: references to the reset controllers
> +- reset-names	: should be "blk_rst"
> +
> +
> +Example:
> +audio: audio@7700000 {
> +	compatible = "qca,ipq4019-audio-adss";
> +	reg = <0x7700000 0x34>;
> +	resets = <&gcc AUDIO_BLK_ARES>;
> +	reset-names = "blk_rst";
> +	status = "disabled";
> +};
> diff --git a/Documentation/devicetree/bindings/sound/qca,ipq4019-audio.txt b/Documentation/devicetree/bindings/sound/qca,ipq4019-audio.txt
> new file mode 100644
> index 0000000..fde039f
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/qca,ipq4019-audio.txt
> @@ -0,0 +1,13 @@
> +* Qualcomm Technologies IPQ4019 ASoC machine driver
> +
> +This node models the Qualcomm Technologies IPQ4019 ASoC machine driver

ASoC machine driver is a Linuxism.

> +
> +Required properties:
> +
> +- compatible		: "qca,ipq4019-audio"
> +
> +Example:
> +
> +sound: sound {
> +	compatible = "qca,ipq4019-audio";

I'd expect something else in here like phandle links to sub blocks. This 
alone just for purposes of instantiating a driver is not acceptible.

> +};
> diff --git a/Documentation/devicetree/bindings/sound/qca,ipq4019-codec.txt b/Documentation/devicetree/bindings/sound/qca,ipq4019-codec.txt
> new file mode 100644
> index 0000000..3df7742d
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/qca,ipq4019-codec.txt
> @@ -0,0 +1,15 @@
> +* Qualcomm Technologies IPQ4019 ASoC Codec driver
> +
> +This node models the Qualcomm Technologies IPQ4019 ASoC Codec driver
> +
> +Required properties:
> +
> +- compatible	: "qca,ipq4019-codec"
> +- reg		: should have the stereo i2c register address
> +
> +Example:
> +qca_codec: qca_codec@12 {

Don't use '_' in node names, just 'codec@...'.

> +	compatible = "qca,ipq4019-codec";
> +	reg = <0x12>;
> +	status = "disabled";
> +};
> diff --git a/Documentation/devicetree/bindings/sound/qca,ipq4019-i2s.txt b/Documentation/devicetree/bindings/sound/qca,ipq4019-i2s.txt
> new file mode 100644
> index 0000000..af9b63e
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/qca,ipq4019-i2s.txt
> @@ -0,0 +1,33 @@
> +* Qualcomm Technologies IPQ4019 ASoC PCM driver

Bindings describe h/w, not ASoC or drivers.

> +
> +This node models the Qualcomm Technologies IPQ4019 ASoC I2S PCM driver
> +
> +Required properties:
> +
> +- compatible	 : "qca,ipq4019-i2s"
> +- dma-tx-channel : should have the mbox tx channel id
> +- dma-rx-channel : should have the mbox rx channel id
> +- stereo-tx-port : should have the stereo tx id
> +- stereo-rx-port : should have the stereo rx id
> +- clocks	 : should have the audio tx bit clock, tx master clock,
> +		   rx bit clock, rx master clock id
> +- clock-names	 : should be "audio_tx_bclk", "audio_tx_mclk", "audio_rx_bclk",
> +		   "audio_rx_mclk"
> +
> +Example:
> +i2s: ipq4019-pcm-i2s@0 {

Just i2s@... Though 0 here is not valid without a reg property. There's 
no registers?

> +	compatible = "qca,ipq4019-i2s";
> +	dma-tx-channel = <MBOX0_TX_ID>;
> +	dma-rx-channel = <MBOX3_RX_ID>;
> +	stereo-tx-port = <STEREO0_ID>;
> +	stereo-rx-port = <STEREO3_ID>;
> +	clocks = <&adcc ADCC_TXB_CLK_SRC>,
> +		<&adcc ADCC_TXM_CLK_SRC>,
> +		<&adcc ADCC_RXB_CLK_SRC>,
> +		<&adcc ADCC_RXM_CLK_SRC>;
> +	clock-names = "audio_tx_bclk",
> +		"audio_tx_mclk",
> +		"audio_rx_bclk",
> +		"audio_rx_mclk";
> +	status = "disabled";
> +};
> diff --git a/Documentation/devicetree/bindings/sound/qca,ipq4019-i2s1.txt b/Documentation/devicetree/bindings/sound/qca,ipq4019-i2s1.txt
> new file mode 100644
> index 0000000..47333b3
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/qca,ipq4019-i2s1.txt
> @@ -0,0 +1,29 @@
> +* Qualcomm Technologies IPQ4019 ASoC I2S PCM driver

ditto

> +
> +This node models the Qualcomm Technologies IPQ4019 ASoC I2S PCM driver
> +
> +Required properties:
> +
> +- compatible	 : "qca,ipq4019-i2s1"

What's the difference between this and the previous one.

> +- dma-tx-channel : should have the mbox tx channel id
> +- stereo-tx-port : should have the stereo tx id
> +- clocks	 : should have the audio tx bit clock, tx master clock,
> +		   rx bit clock, rx master clock id
> +- clock-names	 : should be "audio_tx_bclk", "audio_tx_mclk", "audio_rx_bclk",
> +		   "audio_rx_mclk"
> +
> +Example:
> +i2s1: ipq4019-pcm-i2s1@0 {
> +	compatible = "qca,ipq4019-i2s1";
> +	dma-tx-channel = <MBOX1_TX_ID>;
> +	stereo-tx-port = <STEREO1_ID>;
> +	clocks = <&adcc ADCC_TXB_CLK_SRC>,
> +		<&adcc ADCC_TXM_CLK_SRC>,
> +		<&adcc ADCC_RXB_CLK_SRC>,
> +		<&adcc ADCC_RXM_CLK_SRC>;
> +	clock-names = "audio_tx_bclk",
> +		"audio_tx_mclk",
> +		"audio_rx_bclk",
> +		"audio_rx_mclk";
> +	status = "disabled";
> +};
> diff --git a/Documentation/devicetree/bindings/sound/qca,ipq4019-i2s2.txt b/Documentation/devicetree/bindings/sound/qca,ipq4019-i2s2.txt
> new file mode 100644
> index 0000000..9af0113
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/qca,ipq4019-i2s2.txt
> @@ -0,0 +1,29 @@
> +* Qualcomm Technologies IPQ4019 ASoC I2S PCM driver
> +
> +This node models the Qualcomm Technologies IPQ4019 ASoC I2S PCM driver
> +
> +Required properties:
> +
> +- compatible	 : "qca,ipq4019-i2s2"
> +- dma-tx-channel : should have the mbox tx channel id
> +- stereo-tx-port : should have the stereo tx id
> +- clocks	 : should have the audio tx bit clock, tx master clock,
> +		   rx bit clock, rx master clock id
> +- clock-names	 : should be "audio_tx_bclk", "audio_tx_mclk", "audio_rx_bclk",
> +		   "audio_rx_mclk"
> +
> +Example:
> +i2s1: ipq4019-pcm-i2s2@0 {
> +	compatible = "qca,ipq4019-i2s2";
> +	dma-tx-channel = <MBOX2_TX_ID>;
> +	stereo-tx-port = <STEREO2_ID>;
> +	clocks = <&adcc ADCC_TXB_CLK_SRC>,
> +		<&adcc ADCC_TXM_CLK_SRC>,
> +		<&adcc ADCC_RXB_CLK_SRC>,
> +		<&adcc ADCC_RXM_CLK_SRC>;
> +	clock-names = "audio_tx_bclk",
> +		"audio_tx_mclk",
> +		"audio_rx_bclk",
> +		"audio_rx_mclk";
> +	status = "disabled";
> +};
> diff --git a/Documentation/devicetree/bindings/sound/qca,ipq4019-mbox.txt b/Documentation/devicetree/bindings/sound/qca,ipq4019-mbox.txt
> new file mode 100644
> index 0000000..51d6c51
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/qca,ipq4019-mbox.txt
> @@ -0,0 +1,23 @@
> +* Qualcomm Technologies IPQ4019 ASoC MBOX driver
> +
> +This node models the Qualcomm Technologies IPQ4019 ASoC mbox driver
> +
> +Required properties:
> +
> +- compatible	 : "qca,ipq4019-mbox"
> +- dma-index	 : should have the mbox dma index

What is this exactly?

> +- reg		 : should have the stereo register address, length
> +- interrupts	 : should have the mbox interrupt no
> +- tx-channel	 : should have the mbox tx id
> +- rx-channel	 : should have the mbox rx id
> +
> +Example:
> +mbox0: mbox@7708000 {
> +	compatible = "qca,ipq4019-mbox";
> +	dma-index = <0>;
> +	reg = <0x7708000 0x1000>;
> +	interrupts = <0 156 0>;
> +	tx-channel = <MBOX0_TX_ID>;
> +	rx-channel = <MBOX0_RX_ID>;
> +	status = "disabled";
> +};
> diff --git a/Documentation/devicetree/bindings/sound/qca,ipq4019-pcm-i2s.txt b/Documentation/devicetree/bindings/sound/qca,ipq4019-pcm-i2s.txt
> new file mode 100644
> index 0000000..a47c7fb
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/qca,ipq4019-pcm-i2s.txt
> @@ -0,0 +1,15 @@
> +* Qualcomm Technologies IPQ4019 ASoC platform driver
> +
> +This node models the Qualcomm Technologies IPQ4019 ASoC platform driver
> +
> +Required properties:
> +
> +- compatible	 : "qca,ipq4019-pcm-i2s"
> +- reg		 : should have the stereo register address, length
> +
> +Example:
> +i2splatform: qca-pcm-i2s@7709000 {
> +	compatible = "qca,ipq4019-pcm-i2s";
> +	reg = <0x7709000 0x1000>;
> +	status = "disabled";
> +};
> diff --git a/Documentation/devicetree/bindings/sound/qca,ipq4019-pcm-i2s1.txt b/Documentation/devicetree/bindings/sound/qca,ipq4019-pcm-i2s1.txt
> new file mode 100644
> index 0000000..cf23ca0b
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/qca,ipq4019-pcm-i2s1.txt
> @@ -0,0 +1,15 @@
> +* Qualcomm Technologies IPQ4019 ASoC platform driver
> +
> +This node models the Qualcomm Technologies IPQ4019 ASoC platform driver

Now I'm confused. How does this relate to the machine driver above? An 
overview of the audio subsystem and its components would be helpful.

> +
> +Required properties:
> +
> +- compatible	 : "qca,ipq4019-pcm-i2s1"
> +- reg		 : should have the stereo register address, length
> +
> +Example:
> +i2s1platform: qca-pcm-i2s1@770b000 {
> +	compatible = "qca,ipq4019-pcm-i2s1";
> +	reg = <0x770b000 0x1000>;
> +	status = "disabled";
> +};
> diff --git a/Documentation/devicetree/bindings/sound/qca,ipq4019-pcm-i2s2.txt b/Documentation/devicetree/bindings/sound/qca,ipq4019-pcm-i2s2.txt
> new file mode 100644
> index 0000000..ae04380
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/qca,ipq4019-pcm-i2s2.txt
> @@ -0,0 +1,15 @@
> +* Qualcomm Technologies IPQ4019 ASoC platform driver
> +
> +This node models the Qualcomm Technologies IPQ4019 ASoC platform driver
> +
> +Required properties:
> +
> +- compatible	 : "qca,ipq4019-pcm-i2s2"

Again, why the indexing here?

> +- reg		 : should have the stereo register address, length
> +
> +Example:
> +i2s2platform: qca-pcm-i2s1@770d000 {
> +	compatible = "qca,ipq4019-pcm-i2s2";
> +	reg = <0x770d000 0x1000>;
> +	status = "disabled";
> +};
> diff --git a/Documentation/devicetree/bindings/sound/qca,ipq4019-pcm-spdif.txt b/Documentation/devicetree/bindings/sound/qca,ipq4019-pcm-spdif.txt
> new file mode 100644
> index 0000000..b47c02c
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/qca,ipq4019-pcm-spdif.txt
> @@ -0,0 +1,15 @@
> +* Qualcomm Technologies IPQ4019 ASoC SPDIF platform driver
> +
> +This node models the Qualcomm Technologies IPQ4019 ASoC SPDIF platform driver
> +
> +Required properties:
> +
> +- compatible	 : "qca,ipq4019-pcm-spdif"
> +- reg		 : should have the stereo register address, length
> +
> +Example:
> +tdmplatform: qca-pcm-spdif@7707000 {
> +	compatible = "qca,ipq4019-pcm-spdif";
> +	reg = <0x7709000 0x1000>;
> +	status = "disabled";
> +};
> diff --git a/Documentation/devicetree/bindings/sound/qca,ipq4019-pcm-tdm.txt b/Documentation/devicetree/bindings/sound/qca,ipq4019-pcm-tdm.txt
> new file mode 100644
> index 0000000..bd3aaa3
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/qca,ipq4019-pcm-tdm.txt
> @@ -0,0 +1,15 @@
> +* Qualcomm Technologies IPQ4019 ASoC TDM platform driver
> +
> +This node models the Qualcomm Technologies IPQ4019 ASoC TDM platform driver
> +
> +Required properties:
> +
> +- compatible	 : "qca,ipq4019-pcm-tdm"
> +- reg		 : should have the stereo register address, length
> +
> +Example:
> +tdmplatform: qca-pcm-tdm@7709000 {
> +	compatible = "qca,ipq4019-pcm-tdm";
> +	reg = <0x7709000 0x1000>;
> +	status = "disabled";
> +};
> diff --git a/Documentation/devicetree/bindings/sound/qca,ipq4019-spdif.txt b/Documentation/devicetree/bindings/sound/qca,ipq4019-spdif.txt
> new file mode 100644
> index 0000000..5a80bbe
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/qca,ipq4019-spdif.txt
> @@ -0,0 +1,35 @@
> +* Qualcomm Technologies IPQ4019 ASoC SPDIF driver
> +
> +This node models the Qualcomm Technologies IPQ4019 ASoC SPDIF driver
> +
> +Required properties:
> +
> +- compatible	 : "qca,ipq4019-spdif"
> +- dma-tx-channel : should have the mbox tx channel id
> +- dma-rx-channel : should have the mbox rx channel id
> +- stereo-tx-port : should have the stereo tx id
> +- stereo-rx-port : should have the stereo tx id
> +- clocks	 : should have the audio tx bit clock, tx master clock,
> +		   spdif clock, spdif divider clock, spdif in fast clock
> +- clock-names	 : should be "audio_tx_bclk", "audio_tx_mclk", "audio_spdif_src",
> +		   "audio_spdif_div2", "audio_spdifinfast_src"
> +
> +Example:
> +spdif: spdif@0 {
> +	compatible = "qca,ipq4019-spdif";
> +	dma-tx-channel = <MBOX0_TX_ID>;
> +	dma-rx-channel = <MBOX3_RX_ID>;
> +	stereo-tx-port = <STEREO0_ID>;
> +	stereo-rx-port = <STEREO3_ID>;
> +	clocks = <&adcc ADCC_TXB_CLK_SRC>,
> +		<&adcc ADCC_TXM_CLK_SRC>,
> +		<&adcc ADCC_SPDIF_SRC>,
> +		<&adcc ADCC_SPDIFDIV2_SRC>,
> +		<&adcc ADCC_AUDIO_SPDIFINFAST_SRC>;
> +	clock-names = "audio_tx_bclk",
> +		"audio_tx_mclk",
> +		"audio_spdif_src",
> +		"audio_spdif_div2",
> +		"audio_spdifinfast_src";
> +	status = "disabled";
> +};
> diff --git a/Documentation/devicetree/bindings/sound/qca,ipq4019-stereo.txt b/Documentation/devicetree/bindings/sound/qca,ipq4019-stereo.txt
> new file mode 100644
> index 0000000..35b4815
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/qca,ipq4019-stereo.txt
> @@ -0,0 +1,17 @@
> +* Qualcomm Technologies IPQ4019 ASoC stereo driver
> +
> +This node models the Qualcomm Technologies IPQ4019 ASoC stereo driver
> +
> +Required properties:
> +
> +- compatible	 : "qca,ipq4019-stereo"
> +- reg		 : should have the stereo register address, length
> +- stereo-index	 : should have the stereo port index
> +
> +Example:
> +stereo0: stereo@7709000 {
> +	compatible = "qca,ipq4019-stereo";
> +	reg = <0x7709000 0x1000>;
> +	stereo-index = <STEREO0_ID>;
> +	status = "disabled";
> +};
> diff --git a/Documentation/devicetree/bindings/sound/qca,ipq4019-tdm.txt b/Documentation/devicetree/bindings/sound/qca,ipq4019-tdm.txt
> new file mode 100644
> index 0000000..c2bf38c
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/qca,ipq4019-tdm.txt
> @@ -0,0 +1,33 @@
> +* Qualcomm Technologies IPQ4019 ASoC TDM driver
> +
> +This node models the Qualcomm Technologies IPQ4019 ASoC TDM driver
> +
> +Required properties:
> +
> +- compatible	 : "qca,ipq4019-tdm"
> +- dma-tx-channel : should have the mbox tx channel id
> +- dma-rx-channel : should have the mbox rx channel id
> +- stereo-tx-port : should have the stereo tx id
> +- stereo-rx-port : should have the stereo tx id
> +- clocks	 : should have the audio tx bit clock, tx master clock,
> +		   rx bit clock, rx master clock id
> +- clock-names	 : should be "audio_tx_bclk", "audio_tx_mclk", "audio_rx_bclk",
> +		   "audio_rx_mclk"
> +
> +Example:
> +tdm: tdm@0 {
> +	compatible = "qca,ipq4019-tdm";
> +	dma-tx-channel = <MBOX0_TX_ID>;
> +	dma-rx-channel = <MBOX3_RX_ID>;
> +	stereo-tx-port = <STEREO0_ID>;
> +	stereo-rx-port = <STEREO3_ID>;
> +	clocks = <&adcc ADCC_TXB_CLK_SRC>,
> +		<&adcc ADCC_TXM_CLK_SRC>,
> +		<&adcc ADCC_RXB_CLK_SRC>,
> +		<&adcc ADCC_RXM_CLK_SRC>;
> +	clock-names = "audio_tx_bclk",
> +		"audio_tx_mclk",
> +		"audio_rx_bclk",
> +		"audio_rx_mclk";
> +	status = "disabled";
> +};
> diff --git a/arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1.dtsi b/arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1.dtsi
> index b9457dd2..e2ab95a 100644
> --- a/arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1.dtsi
> +++ b/arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1.dtsi

This should be a separate patch.

> @@ -1,4 +1,4 @@
> -/* Copyright (c) 2015, The Linux Foundation. All rights reserved.
> +/* Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
>   *
>   * Permission to use, copy, modify, and/or distribute this software for any
>   * purpose with or without fee is hereby granted, provided that the above
> @@ -20,26 +20,7 @@
>  	model = "Qualcomm Technologies, Inc. IPQ4019/AP-DK01.1";
>  	compatible = "qcom,ipq4019";
>  
> -	clocks {
> -                xo: xo {
> -                        compatible = "fixed-clock";
> -                        clock-frequency = <48000000>;
> -                        #clock-cells = <0>;
> -                };
> -	};
> -
>  	soc {
> -
> -
> -		timer {
> -			compatible = "arm,armv7-timer";
> -			interrupts = <1 2 0xf08>,
> -				     <1 3 0xf08>,
> -				     <1 4 0xf08>,
> -				     <1 1 0xf08>;
> -			clock-frequency = <48000000>;
> -		};
> -

This hunk looks unrelated.

>  		pinctrl@0x01000000 {
>  			serial_pins: serial_pinmux {
>  				mux {
> @@ -69,6 +50,81 @@
>  					bias-disable;
>  					output-high;
>  				};
> +
> +			};
> +
> +			audio_pins: audio_pinmux {
> +				mux_1 {
> +					pins = "gpio25", "gpio53", "gpio60";
> +					function = "i2s_tx_bclk";
> +					bias-pull,up;
> +				};
> +
> +				mux_2 {
> +					pins = "gpio27", "gpio54", "gpio63";
> +					function = "i2s_txd1";
> +					bias-pull,up;
> +				};
> +
> +				mux_3 {
> +					pins = "gpio28", "gpio55";
> +					function = "i2s_txd2";
> +					bias-pull,up;
> +				};
> +
> +				mux_4 {
> +					pins = "gpio29", "gpio56";
> +					function = "i2s_txd3";
> +					bias-pull,up;
> +				};
> +
> +				mux_5 {
> +					pins = "gpio24", "gpio52";
> +					function = "i2s_tx_mclk";
> +					bias-pull,up;
> +				};
> +
> +				mux_6 {
> +					pins = "gpio26", "gpio57", "gpio61";
> +					function = "i2s_tx_fsync";
> +					bias-pull,up;
> +				};
> +
> +				mux_7 {
> +					pins = "gpio2", "gpio23", "gpio63";
> +					function = "i2s_rxd";
> +					bias-pull,up;
> +				};
> +
> +				mux_8 {
> +					pins = "gpio20", "gpio58";
> +					function = "i2s_rx_mclk";
> +					bias-pull,up;
> +				};
> +
> +				mux_9 {
> +					pins = "gpio0", "gpio21", "gpio60";
> +					function = "i2s_rx_bclk";
> +					bias-pull,up;
> +				};
> +
> +				mux_10 {
> +					pins = "gpio1", "gpio22", "gpio61";
> +					function = "i2s_rx_fsync";
> +					bias-pull,up;
> +				};
> +
> +				mux_11 {
> +					pins = "gpio34", "gpio59", "gpio63";
> +					function = "i2s_spdif_in";
> +					bias-pull,up;
> +				};
> +
> +				mux_12 {
> +					pins = "gpio35", "gpio62", "gpio63";
> +					function = "i2s_spdif_out";
> +					bias-pull,up;
> +				};
>  			};
>  		};
>  
> @@ -108,5 +164,104 @@
>  		watchdog@b017000 {
>  			status = "ok";
>  		};
> +
> +		adcc: clock-controller@7700038 {
> +			status = "ok";
> +		};
> +
> +		audio: audio@7700000 {
> +			status = "ok";
> +		};
> +
> +		mbox0: mbox@7708000 {
> +			status = "ok";
> +		};
> +
> +		mbox1: mbox@770a000 {
> +			status = "ok";
> +		};
> +
> +		mbox2: mbox@770c000 {
> +			status = "ok";
> +		};
> +
> +		mbox3: mbox@770e000 {
> +			status = "ok";
> +		};
> +
> +		mbox4: mbox@7706000 {
> +			status = "ok";
> +		};
> +
> +		stereo0: stereo@7709000 {
> +			status = "ok";
> +		};
> +
> +		stereo1: stereo@770b000 {
> +			status = "ok";
> +		};
> +
> +		stereo2: stereo@770d000 {
> +			status = "ok";
> +		};
> +
> +		stereo3: stereo@770f000 {
> +			status = "ok";
> +		};
> +
> +		/* Enable Audio Interfaces */
> +		i2s: ipq4019-pcm-i2s@0 {
> +			status = "ok";
> +		};
> +
> +		i2splatform: qca-pcm-i2s@7709000 {
> +			status = "ok";
> +		};
> +
> +		i2s1platform: qca-pcm-i2s1@770b000 {
> +			status = "ok";
> +		};
> +
> +		i2s1: ipq4019-pcm-i2s1@0 {
> +			status = "ok";
> +		};
> +
> +		i2s2platform: qca-pcm-i2s2@770d000 {
> +			status = "ok";
> +		};
> +
> +		i2s2: ipq4019-pcm-i2s2@0 {
> +			status = "ok";
> +		};
> +
> +		tdmplatform: qca-pcm-tdm@7709000 {
> +			status = "ok";
> +		};
> +
> +		tdm: tdm@0 {
> +			status = "ok";
> +		};
> +
> +		spdifplatform: qca-pcm-spdif@7707000 {
> +			status = "ok";
> +		};
> +
> +		spdif: spdif@0 {
> +			status = "ok";
> +		};
> +
> +		sound: sound@0 {
> +			pinctrl-0 = <&audio_pins>;
> +			pinctrl-names = "default";
> +			status = "ok";
> +		};
> +
> +		i2c_0: i2c@78b7000 { /* BLSP1 QUP2 */
> +			status = "ok";
> +
> +			qca_codec: qca_codec@12 {
> +				status = "ok";
> +			};
> +		};
>  	};
>  };
> diff --git a/arch/arm/boot/dts/qcom-ipq4019.dtsi b/arch/arm/boot/dts/qcom-ipq4019.dtsi
> index 5c08d19..e2b4810 100644
> --- a/arch/arm/boot/dts/qcom-ipq4019.dtsi
> +++ b/arch/arm/boot/dts/qcom-ipq4019.dtsi
> @@ -1,5 +1,5 @@
>  /*
> - * Copyright (c) 2015, The Linux Foundation. All rights reserved.
> + * Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
>   *
>   * This program is free software; you can redistribute it and/or modify
>   * it under the terms of the GNU General Public License version 2 and
> @@ -15,6 +15,8 @@
>  
>  #include "skeleton.dtsi"
>  #include <dt-bindings/clock/qcom,gcc-ipq4019.h>
> +#include <dt-bindings/clock/qca,adcc-ipq4019.h>
> +#include <dt-bindings/sound/ipq4019-audio.h>
>  #include <dt-bindings/interrupt-controller/arm-gic.h>
>  #include <dt-bindings/interrupt-controller/irq.h>
>  
> @@ -90,6 +92,21 @@
>  			clock-frequency = <32768>;
>  			#clock-cells = <0>;
>  		};
> +
> +		xo: xo {
> +			compatible = "fixed-clock";
> +			clock-frequency = <48000000>;
> +			#clock-cells = <0>;
> +		};
> +	};
> +
> +	timer {
> +		compatible = "arm,armv7-timer";
> +		interrupts = <1 2 0xf08>,
> +			     <1 3 0xf08>,
> +			     <1 4 0xf08>,
> +			     <1 1 0xf08>;
> +		clock-frequency = <48000000>;
>  	};
>  
>  	soc {
> @@ -156,8 +173,13 @@
>  			#address-cells = <1>;
>  			#size-cells = <0>;
>  			status = "disabled";
> -		};
>  
> +			qca_codec: qca_codec@12 {
> +				compatible = "qca,ipq4019-codec";
> +				reg = <0x12>;
> +				status = "disabled";
> +			};
> +		};
>  
>  		cryptobam: dma@8e04000 {
>  			compatible = "qcom,bam-v1.7.0";
> @@ -263,5 +285,226 @@
>  			compatible = "qcom,pshold";
>  			reg = <0x4ab000 0x4>;
>  		};
> +
> +		adcc: clock-controller@7700038 {
> +			compatible = "qcom,adcc-ipq4019";
> +			#clock-cells = <1>;
> +			#reset-cells = <1>;
> +			reg = <0x7700038 0x1DC>;
> +			status = "disabled";
> +		};
> +
> +		audio: audio@7700000 {
> +			compatible = "qca,ipq4019-audio-adss";
> +			reg = <0x7700000 0x34>,
> +				<0x7707000 0x20>;
> +			resets = <&gcc AUDIO_BLK_ARES>;
> +			reset-names = "blk_rst";
> +			status = "disabled";
> +		};
> +
> +		pcm: pcm@7704000 {
> +			compatible = "qca,ipq4019-pcm";
> +			reg = <0x7704000 0x2000>;
> +			dma-tx-channel = <MBOX3_TX_ID>;
> +			dma-rx-channel = <MBOX0_RX_ID>;
> +			stereo-tx-port = <STEREO3_ID>;
> +			stereo-rx-port = <STEREO0_ID>;
> +			clocks = <&adcc ADCC_PCM_CLK_SRC>;
> +			clock-names = "audio_pcm_clk";
> +			status = "disabled";
> +		};
> +
> +		mbox0: mbox@7708000 {
> +			dma-index = <0>;
> +			compatible = "qca,ipq4019-mbox";
> +			reg = <0x7708000 0x1000>;
> +			interrupts = <0 156 0>;
> +			tx-channel = <MBOX0_TX_ID>;
> +			rx-channel = <MBOX0_RX_ID>;
> +			status = "disabled";
> +		};
> +
> +		mbox1: mbox@770a000 {
> +			dma-index = <1>;
> +			compatible = "qca,ipq4019-mbox";
> +			reg = <0x770A000 0x1000>;
> +			interrupts = <0 157 0>;
> +			tx-channel = <MBOX1_TX_ID>;
> +			status = "disabled";
> +		};
> +
> +		mbox2: mbox@770c000 {
> +			dma-index = <2>;
> +			compatible = "qca,ipq4019-mbox";
> +			reg = <0x770C000 0x1000>;
> +			interrupts = <0 158 0>;
> +			tx-channel = <MBOX2_TX_ID>;
> +			status = "disabled";
> +		};
> +
> +		mbox3: mbox@770e000 {
> +			dma-index = <3>;
> +			compatible = "qca,ipq4019-mbox";
> +			reg = <0x770E000 0x1000>;
> +			interrupts = <0 159 0>;
> +			tx-channel = <MBOX3_TX_ID>;
> +			rx-channel = <MBOX3_RX_ID>;
> +			status = "disabled";
> +		};
> +
> +		mbox4: mbox@7706000 {
> +			dma-index = <4>;
> +			compatible = "qca,ipq4019-mbox";
> +			reg = <0x7706000 0x1000>;
> +			interrupts = <0 163 0>;
> +			rx-channel = <MBOX_SPDIF_RX_ID>;
> +			status = "disabled";
> +		};
> +
> +		stereo0: stereo@7709000 {
> +			stereo-index = <STEREO0_ID>;
> +			compatible = "qca,ipq4019-stereo";
> +			reg = <0x7709000 0x1000>;
> +			status = "disabled";
> +		};
> +
> +		stereo1: stereo@770b000 {
> +			stereo-index = <STEREO1_ID>;
> +			compatible = "qca,ipq4019-stereo";
> +			reg = <0x770B000 0x1000>;
> +			status = "disabled";
> +		};
> +
> +		stereo2: stereo@770d000 {
> +			stereo-index = <STEREO2_ID>;
> +			compatible = "qca,ipq4019-stereo";
> +			reg = <0x770D000 0x1000>;
> +			status = "disabled";
> +		};
> +
> +		stereo3: stereo@770f000 {
> +			stereo-index = <STEREO3_ID>;
> +			compatible = "qca,ipq4019-stereo";
> +			reg = <0x770F000 0x1000>;
> +			status = "disabled";
> +		};
> +
> +		i2splatform: qca-pcm-i2s@7709000 {
> +			compatible = "qca,ipq4019-pcm-i2s";
> +			reg = <0x7709000 0x1000>;
> +			status = "disabled";
> +		};
> +
> +		i2s: ipq4019-pcm-i2s@0 {
> +			compatible = "qca,ipq4019-i2s";
> +			dma-tx-channel = <MBOX0_TX_ID>;
> +			stereo-tx-port = <STEREO0_ID>;
> +			dma-rx-channel = <MBOX3_RX_ID>;
> +			stereo-rx-port = <STEREO3_ID>;
> +			clocks = <&adcc ADCC_TXB_CLK_SRC>,
> +				<&adcc ADCC_TXM_CLK_SRC>,
> +				<&adcc ADCC_RXB_CLK_SRC>,
> +				<&adcc ADCC_RXM_CLK_SRC>;
> +			clock-names = "audio_tx_bclk",
> +				"audio_tx_mclk",
> +				"audio_rx_bclk",
> +				"audio_rx_mclk";
> +			status = "disabled";
> +		};
> +
> +		i2s1platform: qca-pcm-i2s1@770b000 {
> +			compatible = "qca,ipq4019-pcm-i2s1";
> +			reg = <0x770b000 0x1000>;
> +			status = "disabled";
> +		};
> +
> +		i2s1: ipq4019-pcm-i2s1@0 {
> +			compatible = "qca,ipq4019-i2s1";
> +			dma-tx-channel = <MBOX1_TX_ID>;
> +			stereo-tx-port = <STEREO1_ID>;
> +			clocks = <&adcc ADCC_TXB_CLK_SRC>,
> +				<&adcc ADCC_TXM_CLK_SRC>,
> +				<&adcc ADCC_RXB_CLK_SRC>,
> +				<&adcc ADCC_RXM_CLK_SRC>;
> +			clock-names = "audio_tx_bclk",
> +				"audio_tx_mclk",
> +				"audio_rx_bclk",
> +				"audio_rx_mclk";
> +			status = "disabled";
> +		};
> +
> +		i2s2platform: qca-pcm-i2s2@770d000 {
> +			compatible = "qca,ipq4019-pcm-i2s2";
> +			reg = <0x770d000 0x1000>;
> +			status = "disabled";
> +		};
> +
> +		i2s2: ipq4019-pcm-i2s2@0 {
> +			compatible = "qca,ipq4019-i2s2";
> +			dma-tx-channel = <MBOX2_TX_ID>;
> +			stereo-tx-port = <STEREO2_ID>;
> +			clocks = <&adcc ADCC_TXB_CLK_SRC>,
> +				<&adcc ADCC_TXM_CLK_SRC>,
> +				<&adcc ADCC_RXB_CLK_SRC>,
> +				<&adcc ADCC_RXM_CLK_SRC>;
> +			clock-names = "audio_tx_bclk",
> +				"audio_tx_mclk",
> +				"audio_rx_bclk",
> +				"audio_rx_mclk";
> +			status = "disabled";
> +		};
> +
> +		tdmplatform: qca-pcm-tdm@7709000 {
> +			compatible = "qca,ipq4019-pcm-tdm";
> +			reg = <0x7709000 0x1000>;
> +			status = "disabled";
> +		};
> +
> +		tdm: tdm@0 {
> +			compatible = "qca,ipq4019-tdm";
> +			dma-tx-channel = <MBOX0_TX_ID>;
> +			dma-rx-channel = <MBOX3_RX_ID>;
> +			stereo-tx-port = <STEREO0_ID>;
> +			stereo-rx-port = <STEREO3_ID>;
> +			clocks = <&adcc ADCC_TXB_CLK_SRC>,
> +				<&adcc ADCC_TXM_CLK_SRC>,
> +				<&adcc ADCC_RXB_CLK_SRC>,
> +				<&adcc ADCC_RXM_CLK_SRC>;
> +			clock-names = "audio_tx_bclk",
> +				"audio_tx_mclk",
> +				"audio_rx_bclk",
> +				"audio_rx_mclk";
> +			status = "disabled";
> +		};
> +
> +		spdifplatform: qca-pcm-spdif@7707000 {
> +			compatible = "qca,ipq4019-pcm-spdif";
> +			reg = <0x7707000 0x1000>;
> +			status = "disabled";
> +		};
> +
> +		spdif: spdif@0 {
> +			compatible = "qca,ipq4019-spdif";
> +			dma-tx-channel = <MBOX0_TX_ID>;
> +			dma-rx-channel = <MBOX_SPDIF_RX_ID>;
> +			stereo-tx-port = <STEREO0_ID>;
> +			clocks = <&adcc ADCC_TXB_CLK_SRC>,
> +				<&adcc ADCC_TXM_CLK_SRC>,
> +				<&adcc ADCC_SPDIF_SRC>,
> +				<&adcc ADCC_SPDIFDIV2_SRC >,
> +				<&adcc ADCC_AUDIO_SPDIFINFAST_SRC>;
> +			clock-names = "audio_tx_bclk",
> +				"audio_tx_mclk",
> +				"audio_spdif_src",
> +				"audio_spdif_div2",
> +				"audio_spdifinfast_src";
> +			status = "disabled";
> +		};
> +
> +		sound: sound@0 {
> +			compatible = "qca,ipq4019-audio";
> +			status = "disabled";
> +		};
>  	};
>  };
> -- 
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> a Linux Foundation Collaborative Project
> 

[toc] | [prev] | [next] | [standalone]


#1443983 — [PATCH 3/4] qcom: ipq4019: ASoC tlmm/pinctrl support

Fromnjaigane@codeaurora.org
Date2016-07-15 09:10 +0200
Subject[PATCH 3/4] qcom: ipq4019: ASoC tlmm/pinctrl support
Message-ID<rV5q2-3U6-37@gated-at.bofh.it>
In reply to#1443978
From: Jaiganesh Narayanan <njaigane@codeaurora.org>

This patch adds the tlmm/pinctrl support for IPQ4019 ASoC.

Signed-off-by: Jaiganesh Narayanan <njaigane@codeaurora.org>
---
 drivers/pinctrl/qcom/pinctrl-ipq4019.c | 116 +++++++++++++++++++++++++--------
 1 file changed, 88 insertions(+), 28 deletions(-)

diff --git a/drivers/pinctrl/qcom/pinctrl-ipq4019.c b/drivers/pinctrl/qcom/pinctrl-ipq4019.c
index b68ae42..bc22597 100644
--- a/drivers/pinctrl/qcom/pinctrl-ipq4019.c
+++ b/drivers/pinctrl/qcom/pinctrl-ipq4019.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 and
@@ -283,6 +283,18 @@ enum ipq4019_functions {
 	qca_mux_blsp_uart0,
 	qca_mux_blsp_spi1,
 	qca_mux_blsp_spi0,
+	qca_mux_i2s_rx_mclk,
+	qca_mux_i2s_rx_bclk,
+	qca_mux_i2s_rx_fsync,
+	qca_mux_i2s_rxd,
+	qca_mux_i2s_tx_mclk,
+	qca_mux_i2s_tx_bclk,
+	qca_mux_i2s_tx_fsync,
+	qca_mux_i2s_txd1,
+	qca_mux_i2s_txd2,
+	qca_mux_i2s_txd3,
+	qca_mux_i2s_spdif_out,
+	qca_mux_i2s_spdif_in,
 	qca_mux_NA,
 };
 
@@ -304,6 +316,42 @@ static const char * const gpio_groups[] = {
 	"gpio99",
 };
 
+static const char * const i2s_rx_bclk_groups[] = {
+	"gpio0", "gpio21", "gpio60",
+};
+static const char * const i2s_rx_mclk_groups[] = {
+	"gpio20", "gpio58",
+};
+static const char * const i2s_rx_fsync_groups[] = {
+	"gpio1", "gpio22", "gpio61",
+};
+static const char * const i2s_rxd_groups[] = {
+	"gpio2", "gpio23", "gpio63",
+};
+static const char * const i2s_tx_bclk_groups[] = {
+	"gpio25", "gpio53", "gpio60",
+};
+static const char * const i2s_tx_mclk_groups[] = {
+	"gpio24", "gpio52",
+};
+static const char * const i2s_tx_fsync_groups[] = {
+	"gpio26", "gpio57", "gpio61",
+};
+static const char * const i2s_txd1_groups[] = {
+	"gpio27", "gpio54", "gpio63",
+};
+static const char * const i2s_txd2_groups[] = {
+	"gpio28", "gpio55",
+};
+static const char * const i2s_txd3_groups[] = {
+	"gpio29", "gpio56",
+};
+static const char * const i2s_spdif_out_groups[] = {
+	"gpio35", "gpio62", "gpio63",
+};
+static const char * const i2s_spdif_in_groups[] = {
+	"gpio34", "gpio59", "gpio63",
+};
 static const char * const blsp_uart1_groups[] = {
 	"gpio8", "gpio9", "gpio10", "gpio11",
 };
@@ -332,12 +380,24 @@ static const struct msm_function ipq4019_functions[] = {
 	FUNCTION(blsp_uart0),
 	FUNCTION(blsp_spi1),
 	FUNCTION(blsp_spi0),
+	FUNCTION(i2s_rx_mclk),
+	FUNCTION(i2s_rx_bclk),
+	FUNCTION(i2s_rx_fsync),
+	FUNCTION(i2s_rxd),
+	FUNCTION(i2s_tx_mclk),
+	FUNCTION(i2s_tx_bclk),
+	FUNCTION(i2s_tx_fsync),
+	FUNCTION(i2s_txd1),
+	FUNCTION(i2s_txd2),
+	FUNCTION(i2s_txd3),
+	FUNCTION(i2s_spdif_out),
+	FUNCTION(i2s_spdif_in),
 };
 
 static const struct msm_pingroup ipq4019_groups[] = {
-	PINGROUP(0, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
-	PINGROUP(1, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
-	PINGROUP(2, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+	PINGROUP(0, NA, NA, i2s_rx_bclk, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+	PINGROUP(1, NA, NA, i2s_rx_fsync, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+	PINGROUP(2, NA, NA, i2s_rxd, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
 	PINGROUP(3, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
 	PINGROUP(4, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
 	PINGROUP(5, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
@@ -355,22 +415,22 @@ static const struct msm_pingroup ipq4019_groups[] = {
 	PINGROUP(17, blsp_uart0, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
 	PINGROUP(18, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
 	PINGROUP(19, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
-	PINGROUP(20, blsp_i2c0, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
-	PINGROUP(21, blsp_i2c0, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
-	PINGROUP(22, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
-	PINGROUP(23, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
-	PINGROUP(24, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
-	PINGROUP(25, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
-	PINGROUP(26, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
-	PINGROUP(27, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
-	PINGROUP(28, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
-	PINGROUP(29, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+	PINGROUP(20, blsp_i2c0, i2s_rx_mclk, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+	PINGROUP(21, blsp_i2c0, i2s_rx_bclk, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+	PINGROUP(22, NA, i2s_rx_fsync, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+	PINGROUP(23, NA, NA, i2s_rxd, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+	PINGROUP(24, NA, NA, i2s_tx_mclk, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+	PINGROUP(25, NA, NA, i2s_tx_bclk, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+	PINGROUP(26, NA, NA, i2s_tx_fsync, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+	PINGROUP(27, NA, NA, i2s_txd1, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+	PINGROUP(28, NA, NA, i2s_txd2, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+	PINGROUP(29, NA, NA, i2s_txd3, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
 	PINGROUP(30, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
 	PINGROUP(31, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
 	PINGROUP(32, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
 	PINGROUP(33, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
-	PINGROUP(34, blsp_i2c1, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
-	PINGROUP(35, blsp_i2c1, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+	PINGROUP(34, blsp_i2c1, i2s_spdif_in, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+	PINGROUP(35, blsp_i2c1, i2s_spdif_out, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
 	PINGROUP(36, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
 	PINGROUP(37, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
 	PINGROUP(38, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
@@ -387,18 +447,18 @@ static const struct msm_pingroup ipq4019_groups[] = {
 	PINGROUP(49, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
 	PINGROUP(50, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
 	PINGROUP(51, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
-	PINGROUP(52, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
-	PINGROUP(53, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
-	PINGROUP(54, NA, blsp_spi0, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
-	PINGROUP(55, NA, blsp_spi0, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
-	PINGROUP(56, NA, blsp_spi0, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
-	PINGROUP(57, NA, blsp_spi0, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
-	PINGROUP(58, NA, NA, blsp_i2c0, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
-	PINGROUP(59, NA, blsp_i2c0, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
-	PINGROUP(60, NA, blsp_uart0, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
-	PINGROUP(61, NA, blsp_uart0, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
-	PINGROUP(62, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
-	PINGROUP(63, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+	PINGROUP(52, NA, NA, NA, i2s_tx_mclk, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+	PINGROUP(53, NA, NA, i2s_tx_bclk, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+	PINGROUP(54, NA, blsp_spi0, i2s_txd1, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+	PINGROUP(55, NA, blsp_spi0, i2s_txd2, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+	PINGROUP(56, NA, blsp_spi0, i2s_txd3, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+	PINGROUP(57, NA, blsp_spi0, i2s_tx_fsync, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+	PINGROUP(58, NA, NA, blsp_i2c0, NA, NA, i2s_rx_mclk, NA, NA, NA, NA, NA, NA, NA, NA),
+	PINGROUP(59, NA, blsp_i2c0, NA, NA, i2s_spdif_in, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+	PINGROUP(60, NA, blsp_uart0, NA, NA, NA, i2s_tx_bclk, i2s_rx_bclk, NA, NA, NA, NA, NA, NA, NA),
+	PINGROUP(61, NA, blsp_uart0, NA, NA, NA, i2s_tx_fsync, i2s_rx_fsync, NA, NA, NA, NA, NA, NA, NA),
+	PINGROUP(62, NA, NA, NA, NA, i2s_spdif_out, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+	PINGROUP(63, NA, NA, NA, NA, i2s_txd1, i2s_rxd, i2s_spdif_out, i2s_spdif_in, NA, NA, NA, NA, NA, NA),
 	PINGROUP(64, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
 	PINGROUP(65, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
 	PINGROUP(66, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

[toc] | [prev] | [next] | [standalone]


#1444528 — Re: [PATCH 3/4] qcom: ipq4019: ASoC tlmm/pinctrl support

FromBjorn Andersson <bjorn.andersson@linaro.org>
Date2016-07-15 21:20 +0200
SubjectRe: [PATCH 3/4] qcom: ipq4019: ASoC tlmm/pinctrl support
Message-ID<rVgOt-2mh-9@gated-at.bofh.it>
In reply to#1443983
On Fri 15 Jul 00:07 PDT 2016, njaigane@codeaurora.org wrote:

> From: Jaiganesh Narayanan <njaigane@codeaurora.org>
> 
> This patch adds the tlmm/pinctrl support for IPQ4019 ASoC.
> 
> Signed-off-by: Jaiganesh Narayanan <njaigane@codeaurora.org>
> ---
>  drivers/pinctrl/qcom/pinctrl-ipq4019.c | 116 +++++++++++++++++++++++++--------
>  1 file changed, 88 insertions(+), 28 deletions(-)
> 
> diff --git a/drivers/pinctrl/qcom/pinctrl-ipq4019.c b/drivers/pinctrl/qcom/pinctrl-ipq4019.c
[..]
> +	qca_mux_i2s_rx_mclk,
> +	qca_mux_i2s_rx_bclk,
> +	qca_mux_i2s_rx_fsync,
> +	qca_mux_i2s_rxd,
> +	qca_mux_i2s_tx_mclk,
> +	qca_mux_i2s_tx_bclk,
> +	qca_mux_i2s_tx_fsync,
> +	qca_mux_i2s_txd1,
> +	qca_mux_i2s_txd2,
> +	qca_mux_i2s_txd3,
> +	qca_mux_i2s_spdif_out,
> +	qca_mux_i2s_spdif_in,

I would recommend reducing this to "i2s_rx", "i2s_tx", "spdif_rx"
and "spdif_tx", as this will make the dts cleaner.

Regards,
Bjorn

[toc] | [prev] | [next] | [standalone]


#1444555 — Re: [PATCH 3/4] qcom: ipq4019: ASoC tlmm/pinctrl support

FromAndy Gross <andy.gross@linaro.org>
Date2016-07-15 22:30 +0200
SubjectRe: [PATCH 3/4] qcom: ipq4019: ASoC tlmm/pinctrl support
Message-ID<rVhUd-2YB-3@gated-at.bofh.it>
In reply to#1443983
On Fri, Jul 15, 2016 at 12:37:05PM +0530, njaigane@codeaurora.org wrote:
> From: Jaiganesh Narayanan <njaigane@codeaurora.org>
> 
> This patch adds the tlmm/pinctrl support for IPQ4019 ASoC.
> 
> Signed-off-by: Jaiganesh Narayanan <njaigane@codeaurora.org>
> ---
>  drivers/pinctrl/qcom/pinctrl-ipq4019.c | 116 +++++++++++++++++++++++++--------
>  1 file changed, 88 insertions(+), 28 deletions(-)
> 
> diff --git a/drivers/pinctrl/qcom/pinctrl-ipq4019.c b/drivers/pinctrl/qcom/pinctrl-ipq4019.c
> index b68ae42..bc22597 100644
> --- a/drivers/pinctrl/qcom/pinctrl-ipq4019.c
> +++ b/drivers/pinctrl/qcom/pinctrl-ipq4019.c
> @@ -1,5 +1,5 @@
>  /*
> - * Copyright (c) 2015, The Linux Foundation. All rights reserved.
> + * Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
>   *
>   * This program is free software; you can redistribute it and/or modify
>   * it under the terms of the GNU General Public License version 2 and
> @@ -283,6 +283,18 @@ enum ipq4019_functions {
>  	qca_mux_blsp_uart0,
>  	qca_mux_blsp_spi1,
>  	qca_mux_blsp_spi0,
> +	qca_mux_i2s_rx_mclk,
> +	qca_mux_i2s_rx_bclk,
> +	qca_mux_i2s_rx_fsync,
> +	qca_mux_i2s_rxd,
> +	qca_mux_i2s_tx_mclk,
> +	qca_mux_i2s_tx_bclk,
> +	qca_mux_i2s_tx_fsync,
> +	qca_mux_i2s_txd1,
> +	qca_mux_i2s_txd2,
> +	qca_mux_i2s_txd3,
> +	qca_mux_i2s_spdif_out,
> +	qca_mux_i2s_spdif_in,

You'll also need to add all of these to the
Documentation/devicetree/bindings/pinctrl/qcom,ipq4019-pinctrl.txt

I was also going to suggest just using qca_i2s and having a single function, but
it seems like there is at least 1 pin that supports more than one i2s mode.

Regards,
Andy

[toc] | [prev] | [next] | [standalone]


#1444273 — Re: [PATCH 4/4] qcom: ipq4019: Add ASoC driver modules

FromMark Brown <broonie@kernel.org>
Date2016-07-15 15:00 +0200
SubjectRe: [PATCH 4/4] qcom: ipq4019: Add ASoC driver modules
Message-ID<rVaSK-70X-3@gated-at.bofh.it>
In reply to#1443978

[Multipart message — attachments visible in raw view] — view raw

On Fri, Jul 15, 2016 at 12:37:06PM +0530, njaigane@codeaurora.org wrote:

>  sound/soc/qcom/Kconfig                     |  47 ++
>  sound/soc/qcom/Makefile                    |   1 +
>  sound/soc/qcom/ipq4019/Makefile            |  16 +
>  sound/soc/qcom/ipq4019/ipq4019-adss.c      | 407 ++++++++++++++
>  sound/soc/qcom/ipq4019/ipq4019-adss.h      | 432 +++++++++++++++
>  sound/soc/qcom/ipq4019/ipq4019-codec.c     | 475 +++++++++++++++++
>  sound/soc/qcom/ipq4019/ipq4019-codec.h     |  91 ++++
>  sound/soc/qcom/ipq4019/ipq4019-cpu-dai.c   | 687 ++++++++++++++++++++++++
>  sound/soc/qcom/ipq4019/ipq4019-mbox.c      | 825 +++++++++++++++++++++++++++++
>  sound/soc/qcom/ipq4019/ipq4019-mbox.h      | 146 +++++
>  sound/soc/qcom/ipq4019/ipq4019-pcm-i2s.c   | 609 +++++++++++++++++++++
>  sound/soc/qcom/ipq4019/ipq4019-pcm-spdif.c | 664 +++++++++++++++++++++++
>  sound/soc/qcom/ipq4019/ipq4019-pcm-tdm.c   | 609 +++++++++++++++++++++
>  sound/soc/qcom/ipq4019/ipq4019-pcm.h       |  37 ++
>  sound/soc/qcom/ipq4019/ipq4019-stereo.c    | 313 +++++++++++
>  sound/soc/qcom/ipq4019/ipq4019.c           | 121 +++++

This is *far* too big to be a single patch.  Please at the very least
split this up into one patch per driver, look at the git history of
other drivers for examples of splitting things up.

[toc] | [prev] | [next] | [standalone]


#1444275

FromMark Brown <broonie@kernel.org>
Date2016-07-15 15:00 +0200
Message-ID<rVaSK-70X-15@gated-at.bofh.it>
In reply to#1443978

[Multipart message — attachments visible in raw view] — view raw

On Fri, Jul 15, 2016 at 12:37:02PM +0530, njaigane@codeaurora.org wrote:
> From: Jaiganesh Narayanan <njaigane@codeaurora.org>
> 
> These patches add the support for Qualcomm IPQ4019 ASoC
> with the ALSA based audio drivers. The patches are broken
> 
> 1. Device Tree support
> 2. Audio clock driver support
> 3. TLMM / Pinctrl support
> 4. ALSA based audio drivers

You need to completely rework how you're posting this so it can be
reviewed, probably splitting it into separate patch serieses - please
see SubmittingPatches for an overview of what people are expecting, and
as I said in reply to one of the patches looking at git can also be
helpful.  I'd suggest sending the drivers for each subsystem as a
separate patch series, there will be some interdependency in terms of
getting things running but not in terms of getting the patches applied.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web