diff mbox

[v2,6/7] ASoC: add simple-graph-card document

Message ID 87r3327mdo.wl%kuninori.morimoto.gx@renesas.com
State Changes Requested, archived
Headers show

Commit Message

Kuninori Morimoto Feb. 13, 2017, 4:22 a.m. UTC
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
v1 -> v2

 - no change

 .../bindings/sound/simple-graph-card.txt           | 137 +++++++++++++++++++++
 1 file changed, 137 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/simple-graph-card.txt

Comments

Rob Herring (Arm) Feb. 22, 2017, 3:07 p.m. UTC | #1
On Mon, Feb 13, 2017 at 04:22:54AM +0000, Kuninori Morimoto wrote:
> 
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> 
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
> v1 -> v2
> 
>  - no change
> 
>  .../bindings/sound/simple-graph-card.txt           | 137 +++++++++++++++++++++

Drop the "simple". Just graph-card is enough.

>  1 file changed, 137 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/sound/simple-graph-card.txt
> 
> diff --git a/Documentation/devicetree/bindings/sound/simple-graph-card.txt b/Documentation/devicetree/bindings/sound/simple-graph-card.txt
> new file mode 100644
> index 0000000..5fa7b74
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/simple-graph-card.txt
> @@ -0,0 +1,137 @@
> +Simple-Graph-Card:
> +
> +Simple-Graph-Card specifies audio DAI connections of SoC <-> codec.
> +It is based on common bindings for device graphs.
> +see ${LINUX}/Documentation/devicetree/bindings/graph.txt
> +
> +Basically, Simple-Graph-Card property is same as Simple-Card.
> +see ${LINUX}/Documentation/devicetree/bindings/sound/simple-card.txt
> +
> +Below are same as Simple-Card.
> +
> +- simple-audio-card,name
> +- simple-audio-card,format
> +- simple-audio-card,frame-master
> +- simple-audio-card,bitclock-master
> +- simple-audio-card,bitclock-inversion
> +- simple-audio-card,frame-inversion
> +- simple-audio-card,dai-tdm-slot-num
> +- simple-audio-card,dai-tdm-slot-width
> +- clocks / system-clock-frequency
> +
> +These should be implemented

What do you mean by implemented? These are new? For anything new, I 
think you should drop "simple-audio-card,".

> +- simple-audio-card,widgets
> +- simple-audio-card,routing
> +- simple-audio-card,mclk-fs
> +- simple-audio-card,hp-det-gpio
> +- simple-audio-card,mic-det-gpio

-gpios

> +
> +Required properties:
> +
> +- compatible				: "asoc-simple-graph-card";
> +- dais					: list of CPU DAI port{s}
> +
> +Example: Single DAI case
> +
> +	sound_card: sound {
> +		compatible = "asoc-simple-graph-card";
> +
> +		dais = <&cpu_port>;
> +	};
> +
> +	codec {
> +		...
> +		port {
> +			codec_endpoint: endpoint {
> +				remote-endpoint = <&cpu_endpoint>;
> +			};
> +		};
> +	};
> +
> +	cpu {

cpu is already a standard node name, so you need something different. 
This would be the I2S/SSI controller typically, right? Perhaps 
"dai-controller" for a standard name. 

> +		...
> +		cpu_port: port@0 {
> +			cpu_endpoint: endpoint {
> +				remote-endpoint = <&codec_endpoint>;
> +
> +				simple-audio-card,format = "left_j";
> +				simple-audio-card,bitclock-master = <&cpu_endpoint>;
> +				simple-audio-card,frame-master = <&cpu_endpoint>;

It looks silly to have a phandle to yourself. Perhaps these should be 
boolean. Define new properties if you need to.


> +				...
> +			};
> +		};
> +	};
> +
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Kuninori Morimoto Feb. 27, 2017, 3:05 a.m. UTC | #2
Hi Rob

Thank you for your feedback

> On Mon, Feb 13, 2017 at 04:22:54AM +0000, Kuninori Morimoto wrote:
> > 
> > From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> > 
> > Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> > ---
> > v1 -> v2
> > 
> >  - no change
> > 
> >  .../bindings/sound/simple-graph-card.txt           | 137 +++++++++++++++++++++
> 
> Drop the "simple". Just graph-card is enough.

1 question about this.
If I used "graph-card" for it, it sounds like "generic" driver,
but this is not generic driver.
But using "graph-card" is OK ? no confusion ?
--
To unsubscribe from this list: send the line "unsubscribe devicetree" 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/simple-graph-card.txt b/Documentation/devicetree/bindings/sound/simple-graph-card.txt
new file mode 100644
index 0000000..5fa7b74
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/simple-graph-card.txt
@@ -0,0 +1,137 @@ 
+Simple-Graph-Card:
+
+Simple-Graph-Card specifies audio DAI connections of SoC <-> codec.
+It is based on common bindings for device graphs.
+see ${LINUX}/Documentation/devicetree/bindings/graph.txt
+
+Basically, Simple-Graph-Card property is same as Simple-Card.
+see ${LINUX}/Documentation/devicetree/bindings/sound/simple-card.txt
+
+Below are same as Simple-Card.
+
+- simple-audio-card,name
+- simple-audio-card,format
+- simple-audio-card,frame-master
+- simple-audio-card,bitclock-master
+- simple-audio-card,bitclock-inversion
+- simple-audio-card,frame-inversion
+- simple-audio-card,dai-tdm-slot-num
+- simple-audio-card,dai-tdm-slot-width
+- clocks / system-clock-frequency
+
+These should be implemented
+- simple-audio-card,widgets
+- simple-audio-card,routing
+- simple-audio-card,mclk-fs
+- simple-audio-card,hp-det-gpio
+- simple-audio-card,mic-det-gpio
+
+Required properties:
+
+- compatible				: "asoc-simple-graph-card";
+- dais					: list of CPU DAI port{s}
+
+Example: Single DAI case
+
+	sound_card: sound {
+		compatible = "asoc-simple-graph-card";
+
+		dais = <&cpu_port>;
+	};
+
+	codec {
+		...
+		port {
+			codec_endpoint: endpoint {
+				remote-endpoint = <&cpu_endpoint>;
+			};
+		};
+	};
+
+	cpu {
+		...
+		cpu_port: port@0 {
+			cpu_endpoint: endpoint {
+				remote-endpoint = <&codec_endpoint>;
+
+				simple-audio-card,format = "left_j";
+				simple-audio-card,bitclock-master = <&cpu_endpoint>;
+				simple-audio-card,frame-master = <&cpu_endpoint>;
+				...
+			};
+		};
+	};
+
+Example: Multi DAI case
+
+	sound_card: sound {
+		compatible = "asoc-simple-graph-card";
+
+		dais = <&cpu_port0
+			&cpu_port1
+			&cpu_port2>;
+	};
+
+	codec0 {
+		...
+		port {
+			codec0_endpoint: endpoint {
+				remote-endpoint = <&cpu_endpoint0>;
+			};
+		};
+	};
+
+	codec1 {
+		...
+		port {
+			codec1_endpoint: endpoint {
+				remote-endpoint = <&cpu_endpoint1>;
+			};
+		};
+	};
+
+	codec2 {
+		...
+		port {
+			codec2_endpoint: endpoint {
+				remote-endpoint = <&cpu_endpoint2>;
+			};
+		};
+	};
+
+	cpu {
+		...
+		ports {
+			cpu_port0: port@0 {
+				cpu_endpoint0: endpoint {
+					remote-endpoint = <&codec0_endpoint>;
+
+					simple-audio-card,format = "left_j";
+					simple-audio-card,bitclock-master = <&cpu_endpoint0>;
+					simple-audio-card,frame-master = <&cpu_endpoint0>;
+					...
+				};
+			};
+			cpu_port1: port@1 {
+				cpu_endpoint1: endpoint {
+					remote-endpoint = <&codec1_endpoint>;
+
+					simple-audio-card,format = "i2s";
+					simple-audio-card,bitclock-master = <&cpu_endpoint1>;
+					simple-audio-card,frame-master = <&cpu_endpoint1>;
+					...
+				};
+			};
+			cpu_port2: port@2 {
+				cpu_endpoint2: endpoint {
+					remote-endpoint = <&codec2_endpoint>;
+
+					simple-audio-card,format = "i2s";
+					simple-audio-card,bitclock-master = <&cpu_endpoint2>;
+					simple-audio-card,frame-master = <&cpu_endpoint2>;
+					...
+				};
+			};
+		};
+	};
+