diff mbox

[v6,04/24] ASoC: qdsp6: dt-bindings: Add q6afe dt bindings

Message ID 20180426094606.4775-5-srinivas.kandagatla@linaro.org (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Srinivas Kandagatla April 26, 2018, 9:45 a.m. UTC
From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>

This patch add DT bindings for AFE (Audio Frontend) DSP module.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-and-tested-by: Rohit kumar <rohitkr@codeaurora.org>
---
 .../devicetree/bindings/sound/qcom,q6afe.txt       | 88 ++++++++++++++++++++++
 include/dt-bindings/sound/qcom,q6afe.h             | 31 ++++++++
 2 files changed, 119 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/qcom,q6afe.txt
 create mode 100644 include/dt-bindings/sound/qcom,q6afe.h

Comments

Rob Herring April 27, 2018, 2:13 p.m. UTC | #1
On Thu, Apr 26, 2018 at 10:45:46AM +0100, srinivas.kandagatla@linaro.org wrote:
> From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> 
> This patch add DT bindings for AFE (Audio Frontend) DSP module.
> 
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> Reviewed-and-tested-by: Rohit kumar <rohitkr@codeaurora.org>
> ---
>  .../devicetree/bindings/sound/qcom,q6afe.txt       | 88 ++++++++++++++++++++++
>  include/dt-bindings/sound/qcom,q6afe.h             | 31 ++++++++
>  2 files changed, 119 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/sound/qcom,q6afe.txt
>  create mode 100644 include/dt-bindings/sound/qcom,q6afe.h
> 
> diff --git a/Documentation/devicetree/bindings/sound/qcom,q6afe.txt b/Documentation/devicetree/bindings/sound/qcom,q6afe.txt
> new file mode 100644
> index 000000000000..05208a63dd3c
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/qcom,q6afe.txt
> @@ -0,0 +1,88 @@
> +Qualcomm Audio Front End (Q6AFE) binding
> +
> +AFE is one of the APR audio service on Q6DSP
> +Please refer to qcom,apr.txt for details of the common apr service bindings
> +used by all apr services.
> +
> +- but must contain the following property:
> +
> +- compatible:
> +	Usage: required
> +	Value type: <stringlist>
> +	Definition: must be "qcom,q6afe-v<MAJOR-NUMBER>.<MINOR-NUMBER>"
> +		  Or "qcom,q6afe" where the version number can be queried
> +		  from DSP.
> +		  example "qcom,q6afe"

reg too.

> +
> += AFE DAIs (Digial Audio Interface)
> +"dais" subnode of the AFE node represents dai specific configuration
> +
> +- #sound-dai-cells
> +	Usage: required
> +	Value type: <u32>
> +	Definition: Must be 1
> +
> +- reg

It's not clear here these are in a grandchild node.

> +	Usage: required
> +	Value type: <u32>
> +	Definition: Must be dai id
> +
> +- qcom,sd-lines
> +	Usage: required for mi2s interface
> +	Value type: <prop-encoded-array>
> +	Definition: Must be list of serial data lines used by this dai.
> +	should be one or more of the 1-4 sd lines.
--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Srinivas Kandagatla April 27, 2018, 2:58 p.m. UTC | #2
Thanks for the review.

On 27/04/18 15:13, Rob Herring wrote:
> On Thu, Apr 26, 2018 at 10:45:46AM +0100, srinivas.kandagatla@linaro.org wrote:
>> From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
>>
>> This patch add DT bindings for AFE (Audio Frontend) DSP module.
>>
>> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
>> Reviewed-and-tested-by: Rohit kumar <rohitkr@codeaurora.org>
>> ---
>>   .../devicetree/bindings/sound/qcom,q6afe.txt       | 88 ++++++++++++++++++++++
>>   include/dt-bindings/sound/qcom,q6afe.h             | 31 ++++++++
>>   2 files changed, 119 insertions(+)
>>   create mode 100644 Documentation/devicetree/bindings/sound/qcom,q6afe.txt
>>   create mode 100644 include/dt-bindings/sound/qcom,q6afe.h
>>
>> diff --git a/Documentation/devicetree/bindings/sound/qcom,q6afe.txt b/Documentation/devicetree/bindings/sound/qcom,q6afe.txt
>> new file mode 100644
>> index 000000000000..05208a63dd3c
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/sound/qcom,q6afe.txt
>> @@ -0,0 +1,88 @@
>> +Qualcomm Audio Front End (Q6AFE) binding
>> +
>> +AFE is one of the APR audio service on Q6DSP
>> +Please refer to qcom,apr.txt for details of the common apr service bindings
>> +used by all apr services.
>> +
>> +- but must contain the following property:
>> +
>> +- compatible:
>> +	Usage: required
>> +	Value type: <stringlist>
>> +	Definition: must be "qcom,q6afe-v<MAJOR-NUMBER>.<MINOR-NUMBER>"
>> +		  Or "qcom,q6afe" where the version number can be queried
>> +		  from DSP.
>> +		  example "qcom,q6afe"
> 
> reg too.

I did not want to repeat what is already mandated for apr children in 
qcom,apr.txt
So skipped repeating reg property in here.

> 
>> +
>> += AFE DAIs (Digial Audio Interface)
>> +"dais" subnode of the AFE node represents dai specific configuration
>> +
>> +- #sound-dai-cells
>> +	Usage: required
>> +	Value type: <u32>
>> +	Definition: Must be 1
>> +
>> +- reg
> 
> It's not clear here these are in a grandchild node.
> 
Every afe port/dai has some board specifics, to allow that we need dai 
specific child nodes.

>> +	Usage: required
>> +	Value type: <u32>
>> +	Definition: Must be dai id
>> +
>> +- qcom,sd-lines
>> +	Usage: required for mi2s interface
>> +	Value type: <prop-encoded-array>
>> +	Definition: Must be list of serial data lines used by this dai.
>> +	should be one or more of the 1-4 sd lines.


--srini
--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Rob Herring April 27, 2018, 6:32 p.m. UTC | #3
On Fri, Apr 27, 2018 at 9:58 AM, Srinivas Kandagatla
<srinivas.kandagatla@linaro.org> wrote:
> Thanks for the review.
>
>
> On 27/04/18 15:13, Rob Herring wrote:
>>
>> On Thu, Apr 26, 2018 at 10:45:46AM +0100, srinivas.kandagatla@linaro.org
>> wrote:
>>>
>>> From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
>>>
>>> This patch add DT bindings for AFE (Audio Frontend) DSP module.
>>>
>>> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
>>> Reviewed-and-tested-by: Rohit kumar <rohitkr@codeaurora.org>
>>> ---
>>>   .../devicetree/bindings/sound/qcom,q6afe.txt       | 88
>>> ++++++++++++++++++++++
>>>   include/dt-bindings/sound/qcom,q6afe.h             | 31 ++++++++
>>>   2 files changed, 119 insertions(+)
>>>   create mode 100644
>>> Documentation/devicetree/bindings/sound/qcom,q6afe.txt
>>>   create mode 100644 include/dt-bindings/sound/qcom,q6afe.h
>>>
>>> diff --git a/Documentation/devicetree/bindings/sound/qcom,q6afe.txt
>>> b/Documentation/devicetree/bindings/sound/qcom,q6afe.txt
>>> new file mode 100644
>>> index 000000000000..05208a63dd3c
>>> --- /dev/null
>>> +++ b/Documentation/devicetree/bindings/sound/qcom,q6afe.txt
>>> @@ -0,0 +1,88 @@
>>> +Qualcomm Audio Front End (Q6AFE) binding
>>> +
>>> +AFE is one of the APR audio service on Q6DSP
>>> +Please refer to qcom,apr.txt for details of the common apr service
>>> bindings
>>> +used by all apr services.
>>> +
>>> +- but must contain the following property:
>>> +
>>> +- compatible:
>>> +       Usage: required
>>> +       Value type: <stringlist>
>>> +       Definition: must be "qcom,q6afe-v<MAJOR-NUMBER>.<MINOR-NUMBER>"
>>> +                 Or "qcom,q6afe" where the version number can be queried
>>> +                 from DSP.
>>> +                 example "qcom,q6afe"
>>
>>
>> reg too.
>
>
> I did not want to repeat what is already mandated for apr children in
> qcom,apr.txt
> So skipped repeating reg property in here.

Okay.

>>> +
>>> += AFE DAIs (Digial Audio Interface)
>>> +"dais" subnode of the AFE node represents dai specific configuration
>>> +
>>> +- #sound-dai-cells
>>> +       Usage: required
>>> +       Value type: <u32>
>>> +       Definition: Must be 1
>>> +
>>> +- reg
>>
>>
>> It's not clear here these are in a grandchild node.
>>
> Every afe port/dai has some board specifics, to allow that we need dai
> specific child nodes.

Yes, but what I mean is #sound-dai-cells is a property of the dais
node, but reg and qcom,sd-lines are properties of child nodes under
the dais node. It is evident in the example, but not without the
example.

Also, anywhere with reg needs #address-cells and #size-cells in the parent node.

Rob
--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Srinivas Kandagatla April 27, 2018, 7:16 p.m. UTC | #4
On 27/04/18 19:32, Rob Herring wrote:
>>>> +
>>>> += AFE DAIs (Digial Audio Interface)
>>>> +"dais" subnode of the AFE node represents dai specific configuration
>>>> +
>>>> +- #sound-dai-cells
>>>> +       Usage: required
>>>> +       Value type: <u32>
>>>> +       Definition: Must be 1
>>>> +
>>>> +- reg
>>>
>>> It's not clear here these are in a grandchild node.
>>>
>> Every afe port/dai has some board specifics, to allow that we need dai
>> specific child nodes.
> Yes, but what I mean is #sound-dai-cells is a property of the dais
> node, but reg and qcom,sd-lines are properties of child nodes under
> the dais node. It is evident in the example, but not without the
> example. >
> Also, anywhere with reg needs #address-cells and #size-cells in the parent node.
>
Yep, #address-cells and #size-cells are missing, Will add them along 
with some notes.

thanks,
srini




> Rob
--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/Documentation/devicetree/bindings/sound/qcom,q6afe.txt b/Documentation/devicetree/bindings/sound/qcom,q6afe.txt
new file mode 100644
index 000000000000..05208a63dd3c
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/qcom,q6afe.txt
@@ -0,0 +1,88 @@ 
+Qualcomm Audio Front End (Q6AFE) binding
+
+AFE is one of the APR audio service on Q6DSP
+Please refer to qcom,apr.txt for details of the common apr service bindings
+used by all apr services.
+
+- but must contain the following property:
+
+- compatible:
+	Usage: required
+	Value type: <stringlist>
+	Definition: must be "qcom,q6afe-v<MAJOR-NUMBER>.<MINOR-NUMBER>"
+		  Or "qcom,q6afe" where the version number can be queried
+		  from DSP.
+		  example "qcom,q6afe"
+
+= AFE DAIs (Digial Audio Interface)
+"dais" subnode of the AFE node represents dai specific configuration
+
+- #sound-dai-cells
+	Usage: required
+	Value type: <u32>
+	Definition: Must be 1
+
+- reg
+	Usage: required
+	Value type: <u32>
+	Definition: Must be dai id
+
+- qcom,sd-lines
+	Usage: required for mi2s interface
+	Value type: <prop-encoded-array>
+	Definition: Must be list of serial data lines used by this dai.
+	should be one or more of the 1-4 sd lines.
+
+= EXAMPLE
+
+q6afe@4 {
+	compatible = "qcom,q6afe";
+	reg = <APR_SVC_AFE>;
+
+	dais {
+		#sound-dai-cells = <1>;
+		hdmi@1 {
+			reg = <1>;
+		};
+
+		prim-mi2s-rx@16 {
+			reg = <16>;
+			qcom,sd-lines = <1 3>;
+		};
+
+		prim-mi2s-tx@17 {
+			reg = <17>;
+			qcom,sd-lines = <2>;
+		};
+
+		sec-mi2s-rx@18 {
+			reg = <18>;
+			qcom,sd-lines = <1 4>;
+		};
+
+		sec-mi2s-tx@19 {
+			reg = <19>;
+			qcom,sd-lines = <2>;
+		};
+
+		tert-mi2s-rx@20 {
+			reg = <20>;
+			qcom,sd-lines = <2 4>;
+		};
+
+		tert-mi2s-tx@21 {
+			reg = <21>;
+			qcom,sd-lines = <1>;
+		};
+
+		quat-mi2s-rx@22 {
+			reg = <22>;
+			qcom,sd-lines = <1>;
+		};
+
+		quat-mi2s-tx@23 {
+			reg = <23>;
+			qcom,sd-lines = <2>;
+		};
+	};
+};
diff --git a/include/dt-bindings/sound/qcom,q6afe.h b/include/dt-bindings/sound/qcom,q6afe.h
new file mode 100644
index 000000000000..e162045f5dc9
--- /dev/null
+++ b/include/dt-bindings/sound/qcom,q6afe.h
@@ -0,0 +1,31 @@ 
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef __DT_BINDINGS_Q6_AFE_H__
+#define __DT_BINDINGS_Q6_AFE_H__
+
+/* Audio Front End (AFE) virtual ports IDs */
+#define HDMI_RX		1
+#define SLIMBUS_0_RX    2
+#define SLIMBUS_0_TX    3
+#define SLIMBUS_1_RX    4
+#define SLIMBUS_1_TX    5
+#define SLIMBUS_2_RX    6
+#define SLIMBUS_2_TX    7
+#define SLIMBUS_3_RX    8
+#define SLIMBUS_3_TX    9
+#define SLIMBUS_4_RX    10
+#define SLIMBUS_4_TX    11
+#define SLIMBUS_5_RX    12
+#define SLIMBUS_5_TX    13
+#define SLIMBUS_6_RX    14
+#define SLIMBUS_6_TX    15
+#define PRIMARY_MI2S_RX		16
+#define PRIMARY_MI2S_TX		17
+#define SECONDARY_MI2S_RX	18
+#define SECONDARY_MI2S_TX	19
+#define TERTIARY_MI2S_RX	20
+#define TERTIARY_MI2S_TX	21
+#define QUATERNARY_MI2S_RX	22
+#define QUATERNARY_MI2S_TX	23
+
+#endif /* __DT_BINDINGS_Q6_AFE_H__ */
+