diff mbox series

[v6,5/6] dt-bindings: display: sii902x: Add HDMI audio bindings

Message ID 4a0573f42112a1070c2d48ecc4a4e89838842cfc.1554146714.git.jsarha@ti.com (mailing list archive)
State New, archived
Headers show
Series drm/bridge: sii902x: HDMI-audio support and some fixes | expand

Commit Message

Jyri Sarha April 2, 2019, 7:29 a.m. UTC
The sii902x chip family supports also HDMI audio. Add binding for
describing the necessary i2s and mclk wiring for it.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
---
 .../bindings/display/bridge/sii902x.txt       | 37 +++++++++++++++++++
 1 file changed, 37 insertions(+)

Comments

Peter Ujfalusi April 2, 2019, 8:27 a.m. UTC | #1
On 02/04/2019 10.29, Jyri Sarha wrote:
> The sii902x chip family supports also HDMI audio. Add binding for
> describing the necessary i2s and mclk wiring for it.

Reviewed-by: Peter Ujfalusi <peter.ujfalusi@ti.com>

> Signed-off-by: Jyri Sarha <jsarha@ti.com>
> ---
>  .../bindings/display/bridge/sii902x.txt       | 37 +++++++++++++++++++
>  1 file changed, 37 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/display/bridge/sii902x.txt b/Documentation/devicetree/bindings/display/bridge/sii902x.txt
> index c4c1855ca654..d124a5fedab1 100644
> --- a/Documentation/devicetree/bindings/display/bridge/sii902x.txt
> +++ b/Documentation/devicetree/bindings/display/bridge/sii902x.txt
> @@ -9,6 +9,37 @@ Optional properties:
>  	  about hotplug events.
>  	- reset-gpios: OF device-tree gpio specification for RST_N pin.
>  
> +	HDMI audio properties:
> +	- #sound-dai-cells: <0> or <1>. <0> if only i2s or spdif pin
> +	   is wired, <1> if the both are wired. HDMI audio is
> +	   configured only if this property is found.
> +	- sil,i2s-data-lanes: Array of up to 4 integers with values of 0-3
> +	   Each integer indicates which i2s pin is connected to which
> +	   audio fifo. The first integer selects i2s audio pin for the
> +	   first audio fifo#0 (HDMI channels 1&2), second for fifo#1
> +	   (HDMI channels 3&4), and so on. There is 4 fifos and 4 i2s
> +	   pins (SD0 - SD3). Any i2s pin can be connected to any fifo,
> +	   but there can be no gaps. E.g. an i2s pin must be mapped to
> +	   fifo#0 and fifo#1 before mapping a channel to fifo#2. Default
> +	   value is <0>, describing SD0 pin beiging routed to hdmi audio
> +	   fifo #0.
> +	- clocks: phandle and clock specifier for each clock listed in
> +           the clock-names property
> +	- clock-names: "mclk"
> +	   Describes SII902x MCLK input. MCLK is used to produce
> +	   HDMI audio CTS values. This property is required if
> +	   "#sound-dai-cells"-property is present. This property follows
> +	   Documentation/devicetree/bindings/clock/clock-bindings.txt
> +	   consumer binding.
> +
> +	If HDMI audio is configured the sii902x device becomes an ASoC
> +	codec component, that can be used in configuring full audio
> +	devices with ASoC simple-card or audio-graph-card. See their
> +	binding documents on how to describe how the sii902x device is
> +	connected to the rest of the audio system:
> +	Documentation/devicetree/bindings/sound/simple-card.txt
> +	Documentation/devicetree/bindings/sound/audio-graph-card.txt
> +
>  Optional subnodes:
>  	- video input: this subnode can contain a video input port node
>  	  to connect the bridge to a display controller output (See this
> @@ -21,6 +52,12 @@ Example:
>  		compatible = "sil,sii9022";
>  		reg = <0x39>;
>  		reset-gpios = <&pioA 1 0>;
> +
> +		#sound-dai-cells = <0>;
> +		i2s-data-lanes = < 0 1 2 >;
> +		clocks = <&mclk>;
> +		clock-names = "mclk";
> +
>  		ports {
>  			#address-cells = <1>;
>  			#size-cells = <0>;
> 

- Péter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
Rob Herring (Arm) April 6, 2019, 6:06 a.m. UTC | #2
On Tue, Apr 02, 2019 at 10:29:14AM +0300, Jyri Sarha wrote:
> The sii902x chip family supports also HDMI audio. Add binding for
> describing the necessary i2s and mclk wiring for it.
> 
> Signed-off-by: Jyri Sarha <jsarha@ti.com>
> ---
>  .../bindings/display/bridge/sii902x.txt       | 37 +++++++++++++++++++
>  1 file changed, 37 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/display/bridge/sii902x.txt b/Documentation/devicetree/bindings/display/bridge/sii902x.txt
> index c4c1855ca654..d124a5fedab1 100644
> --- a/Documentation/devicetree/bindings/display/bridge/sii902x.txt
> +++ b/Documentation/devicetree/bindings/display/bridge/sii902x.txt
> @@ -9,6 +9,37 @@ Optional properties:
>  	  about hotplug events.
>  	- reset-gpios: OF device-tree gpio specification for RST_N pin.
>  
> +	HDMI audio properties:
> +	- #sound-dai-cells: <0> or <1>. <0> if only i2s or spdif pin
> +	   is wired, <1> if the both are wired. HDMI audio is
> +	   configured only if this property is found.
> +	- sil,i2s-data-lanes: Array of up to 4 integers with values of 0-3
> +	   Each integer indicates which i2s pin is connected to which
> +	   audio fifo. The first integer selects i2s audio pin for the
> +	   first audio fifo#0 (HDMI channels 1&2), second for fifo#1
> +	   (HDMI channels 3&4), and so on. There is 4 fifos and 4 i2s
> +	   pins (SD0 - SD3). Any i2s pin can be connected to any fifo,
> +	   but there can be no gaps. E.g. an i2s pin must be mapped to
> +	   fifo#0 and fifo#1 before mapping a channel to fifo#2. Default
> +	   value is <0>, describing SD0 pin beiging routed to hdmi audio
> +	   fifo #0.
> +	- clocks: phandle and clock specifier for each clock listed in
> +           the clock-names property
> +	- clock-names: "mclk"
> +	   Describes SII902x MCLK input. MCLK is used to produce
> +	   HDMI audio CTS values. This property is required if
> +	   "#sound-dai-cells"-property is present. This property follows
> +	   Documentation/devicetree/bindings/clock/clock-bindings.txt
> +	   consumer binding.
> +
> +	If HDMI audio is configured the sii902x device becomes an ASoC
> +	codec component, that can be used in configuring full audio
> +	devices with ASoC simple-card or audio-graph-card. See their

ASoC is a Linux thing.

> +	binding documents on how to describe how the sii902x device is
> +	connected to the rest of the audio system:
> +	Documentation/devicetree/bindings/sound/simple-card.txt
> +	Documentation/devicetree/bindings/sound/audio-graph-card.txt
> +
>  Optional subnodes:
>  	- video input: this subnode can contain a video input port node
>  	  to connect the bridge to a display controller output (See this
> @@ -21,6 +52,12 @@ Example:
>  		compatible = "sil,sii9022";
>  		reg = <0x39>;
>  		reset-gpios = <&pioA 1 0>;
> +
> +		#sound-dai-cells = <0>;
> +		i2s-data-lanes = < 0 1 2 >;
> +		clocks = <&mclk>;
> +		clock-names = "mclk";
> +
>  		ports {
>  			#address-cells = <1>;
>  			#size-cells = <0>;
> -- 
> Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
>
Jyri Sarha April 6, 2019, 12:53 p.m. UTC | #3
On 06/04/2019 09:06, Rob Herring wrote:
> On Tue, Apr 02, 2019 at 10:29:14AM +0300, Jyri Sarha wrote:
>> The sii902x chip family supports also HDMI audio. Add binding for
>> describing the necessary i2s and mclk wiring for it.
>>
>> Signed-off-by: Jyri Sarha <jsarha@ti.com>
>> ---
>>  .../bindings/display/bridge/sii902x.txt       | 37 +++++++++++++++++++
>>  1 file changed, 37 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/display/bridge/sii902x.txt b/Documentation/devicetree/bindings/display/bridge/sii902x.txt
>> index c4c1855ca654..d124a5fedab1 100644
>> --- a/Documentation/devicetree/bindings/display/bridge/sii902x.txt
>> +++ b/Documentation/devicetree/bindings/display/bridge/sii902x.txt
>> @@ -9,6 +9,37 @@ Optional properties:
>>  	  about hotplug events.
>>  	- reset-gpios: OF device-tree gpio specification for RST_N pin.
>>  
>> +	HDMI audio properties:
>> +	- #sound-dai-cells: <0> or <1>. <0> if only i2s or spdif pin
>> +	   is wired, <1> if the both are wired. HDMI audio is
>> +	   configured only if this property is found.
>> +	- sil,i2s-data-lanes: Array of up to 4 integers with values of 0-3
>> +	   Each integer indicates which i2s pin is connected to which
>> +	   audio fifo. The first integer selects i2s audio pin for the
>> +	   first audio fifo#0 (HDMI channels 1&2), second for fifo#1
>> +	   (HDMI channels 3&4), and so on. There is 4 fifos and 4 i2s
>> +	   pins (SD0 - SD3). Any i2s pin can be connected to any fifo,
>> +	   but there can be no gaps. E.g. an i2s pin must be mapped to
>> +	   fifo#0 and fifo#1 before mapping a channel to fifo#2. Default
>> +	   value is <0>, describing SD0 pin beiging routed to hdmi audio
>> +	   fifo #0.
>> +	- clocks: phandle and clock specifier for each clock listed in
>> +           the clock-names property
>> +	- clock-names: "mclk"
>> +	   Describes SII902x MCLK input. MCLK is used to produce
>> +	   HDMI audio CTS values. This property is required if
>> +	   "#sound-dai-cells"-property is present. This property follows
>> +	   Documentation/devicetree/bindings/clock/clock-bindings.txt
>> +	   consumer binding.
>> +
>> +	If HDMI audio is configured the sii902x device becomes an ASoC
>> +	codec component, that can be used in configuring full audio
>> +	devices with ASoC simple-card or audio-graph-card. See their
> 
> ASoC is a Linux thing.

Yes it is. Does it mean that I should not use the term in the binding
document?

E.g. Write it like this:

If HDMI audio is configured the sii902x device becomes an I2S and/or
spdif audio codec component (e.g a digital audio sink), that can be used
in configuring a full audio devices with simple-card or audio-graph-card
binding. See their binding documents on how to describe the way the
sii902x device is connected to the rest of the audio system:
Documentation/devicetree/bindings/sound/simple-card.txt
Documentation/devicetree/bindings/sound/audio-graph-card.txt

> 
>> +	binding documents on how to describe how the sii902x device is
>> +	connected to the rest of the audio system:
>> +	Documentation/devicetree/bindings/sound/simple-card.txt
>> +	Documentation/devicetree/bindings/sound/audio-graph-card.txt
>> +
>>  Optional subnodes:
>>  	- video input: this subnode can contain a video input port node
>>  	  to connect the bridge to a display controller output (See this
>> @@ -21,6 +52,12 @@ Example:
>>  		compatible = "sil,sii9022";
>>  		reg = <0x39>;
>>  		reset-gpios = <&pioA 1 0>;
>> +
>> +		#sound-dai-cells = <0>;
>> +		i2s-data-lanes = < 0 1 2 >;
>> +		clocks = <&mclk>;
>> +		clock-names = "mclk";
>> +
>>  		ports {
>>  			#address-cells = <1>;
>>  			#size-cells = <0>;
>> -- 
>> Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
>>
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/display/bridge/sii902x.txt b/Documentation/devicetree/bindings/display/bridge/sii902x.txt
index c4c1855ca654..d124a5fedab1 100644
--- a/Documentation/devicetree/bindings/display/bridge/sii902x.txt
+++ b/Documentation/devicetree/bindings/display/bridge/sii902x.txt
@@ -9,6 +9,37 @@  Optional properties:
 	  about hotplug events.
 	- reset-gpios: OF device-tree gpio specification for RST_N pin.
 
+	HDMI audio properties:
+	- #sound-dai-cells: <0> or <1>. <0> if only i2s or spdif pin
+	   is wired, <1> if the both are wired. HDMI audio is
+	   configured only if this property is found.
+	- sil,i2s-data-lanes: Array of up to 4 integers with values of 0-3
+	   Each integer indicates which i2s pin is connected to which
+	   audio fifo. The first integer selects i2s audio pin for the
+	   first audio fifo#0 (HDMI channels 1&2), second for fifo#1
+	   (HDMI channels 3&4), and so on. There is 4 fifos and 4 i2s
+	   pins (SD0 - SD3). Any i2s pin can be connected to any fifo,
+	   but there can be no gaps. E.g. an i2s pin must be mapped to
+	   fifo#0 and fifo#1 before mapping a channel to fifo#2. Default
+	   value is <0>, describing SD0 pin beiging routed to hdmi audio
+	   fifo #0.
+	- clocks: phandle and clock specifier for each clock listed in
+           the clock-names property
+	- clock-names: "mclk"
+	   Describes SII902x MCLK input. MCLK is used to produce
+	   HDMI audio CTS values. This property is required if
+	   "#sound-dai-cells"-property is present. This property follows
+	   Documentation/devicetree/bindings/clock/clock-bindings.txt
+	   consumer binding.
+
+	If HDMI audio is configured the sii902x device becomes an ASoC
+	codec component, that can be used in configuring full audio
+	devices with ASoC simple-card or audio-graph-card. See their
+	binding documents on how to describe how the sii902x device is
+	connected to the rest of the audio system:
+	Documentation/devicetree/bindings/sound/simple-card.txt
+	Documentation/devicetree/bindings/sound/audio-graph-card.txt
+
 Optional subnodes:
 	- video input: this subnode can contain a video input port node
 	  to connect the bridge to a display controller output (See this
@@ -21,6 +52,12 @@  Example:
 		compatible = "sil,sii9022";
 		reg = <0x39>;
 		reset-gpios = <&pioA 1 0>;
+
+		#sound-dai-cells = <0>;
+		i2s-data-lanes = < 0 1 2 >;
+		clocks = <&mclk>;
+		clock-names = "mclk";
+
 		ports {
 			#address-cells = <1>;
 			#size-cells = <0>;