diff mbox

[RFC,4/6] ASoC: Add DT bindings documentation for max98504 amplifier

Message ID 1465815160-28504-5-git-send-email-s.nawrocki@samsung.com
State Changes Requested, archived
Headers show

Commit Message

Sylwester Nawrocki June 13, 2016, 10:52 a.m. UTC
This patch adds DT bindings documentation for Maxim MAX98504
speaker amplifier.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
---
 .../devicetree/bindings/sound/max98504.txt         | 44 ++++++++++++++++++++++
 1 file changed, 44 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/max98504.txt

Comments

Mark Brown June 13, 2016, 3:32 p.m. UTC | #1
On Mon, Jun 13, 2016 at 12:52:38PM +0200, Sylwester Nawrocki wrote:

> + - maxim,rx-path : indicates speaker source interface:
> +    0 - PCM monomix output,
> +    1 - Analog input,
> +    2 - left PDM channel (CH0),
> +    3 - right PDM channel (CH1)

This should be a DAPM control.

> + - maxim,rx-channel-mask : a bitmask indicating active PCM Rx channels,
> +   bits b7...b0 correspond to channels CH7...CH0

This should be done using the TDM API.
Sylwester Nawrocki June 14, 2016, 3:14 p.m. UTC | #2
On 06/13/2016 05:32 PM, Mark Brown wrote:
> On Mon, Jun 13, 2016 at 12:52:38PM +0200, Sylwester Nawrocki wrote:
> 
>> > + - maxim,rx-path : indicates speaker source interface:
>> > +    0 - PCM monomix output,
>> > +    1 - Analog input,
>> > +    2 - left PDM channel (CH0),
>> > +    3 - right PDM channel (CH1)
>
> This should be a DAPM control.
> 
>> > + - maxim,rx-channel-mask : a bitmask indicating active PCM Rx channels,
>> > +   bits b7...b0 correspond to channels CH7...CH0
>
> This should be done using the TDM API.

I suspected these don't belong here. I'll add a DAPM control for speaker
source and will learn about the TDM API. I'm inclined to simply omit
the PCM Rx channels configuration feature for now, as the MAX98504's PCM
interface is left unconnected on our board.


--
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
Mark Brown June 15, 2016, 9:25 a.m. UTC | #3
On Tue, Jun 14, 2016 at 05:14:58PM +0200, Sylwester Nawrocki wrote:

> I suspected these don't belong here. I'll add a DAPM control for speaker
> source and will learn about the TDM API. I'm inclined to simply omit
> the PCM Rx channels configuration feature for now, as the MAX98504's PCM
> interface is left unconnected on our board.

That works too.
Krzysztof Kozlowski June 16, 2016, 11:31 a.m. UTC | #4
On 06/13/2016 12:52 PM, Sylwester Nawrocki wrote:
> This patch adds DT bindings documentation for Maxim MAX98504
> speaker amplifier.
> 
> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
> ---
>  .../devicetree/bindings/sound/max98504.txt         | 44 ++++++++++++++++++++++
>  1 file changed, 44 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/sound/max98504.txt
> 

Acked-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>

Best regards,
Krzysztof

--
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/max98504.txt b/Documentation/devicetree/bindings/sound/max98504.txt
new file mode 100644
index 0000000..0cb75af
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/max98504.txt
@@ -0,0 +1,44 @@ 
+
+Maxim MAX98504 class D mono speaker amplifier
+
+Required properties:
+
+ - compatible : "maxim,max98504"
+ - reg : should contain the I2C slave device address
+
+Optional properties:
+
+ - maxim,rx-path : indicates speaker source interface:
+    0 - PCM monomix output,
+    1 - Analog input,
+    2 - left PDM channel (CH0),
+    3 - right PDM channel (CH1)
+
+ - maxim,rx-channel-mask : a bitmask indicating active PCM Rx channels,
+   bits b7...b0 correspond to channels CH7...CH0
+
+ - maxim,tx-path : indicates the V/I sense (feedback) Tx data interface used:
+    0 - PCM, 1 - TDM
+
+ - maxim,tx-channel-mask : a bitmask indicating active PCM or PDM Tx channels,
+   bits b7...b0 correspond to channels CH7...CH0, for PCM are meaningful
+   channels CH7...CH0, for PDM only channels CH1, CH0
+
+ - maxim,tx-channel-source : a bitmask indicating V/I sense source type for
+   each PCM or PDM Tx channel; bits b7...b0 correspond to channels CH7...CH0,
+   for PCM are meaningful channels CH7...CH0, for PDM only channels CH1, CH0:
+    0 - selects voltage measurement data (V),
+    1 - selects current measurement data (I)
+
+If any of the above optional properties is missing its value defaults to 0.
+
+Example:
+
+ max98504: max98504@31 {
+	compatible = "maxim,max98504";
+	reg = <0x31>;
+	maxim,rx-path = <1>;		// Analog input
+	maxim,tx-path = <1>;		// V/I sense PDM Tx
+	maxim,tx-channel-mask = <3>;	// channels CH1, CH0
+	maxim,tx-channel-source = <2>;	// CH1 current, CH0 voltage
+};