diff mbox

[01/18] Documentation: Describe the ux500 realated audio related DT nodes

Message ID 1343393162-11938-2-git-send-email-lee.jones@linaro.org (mailing list archive)
State New, archived
Headers show

Commit Message

Lee Jones July 27, 2012, 12:45 p.m. UTC
Also explains the related AB8500 CODEC configuration properties.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 Documentation/devicetree/bindings/sound/ux500.txt |   62 +++++++++++++++++++++
 1 file changed, 62 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/ux500.txt

Comments

Mark Brown July 29, 2012, 8:31 p.m. UTC | #1
On Fri, Jul 27, 2012 at 01:45:45PM +0100, Lee Jones wrote:

> +++ b/Documentation/devicetree/bindings/sound/ux500.txt
> @@ -0,0 +1,62 @@
> +* ux500 Audio Driver and ab8500 Audio CODEC
> +
> +Required properties:
> + - compatible:
> +   - Machine Driver : "stericsson,snd-soc-mop500"
> +   - CPU-side DAI   : "stericsson,ux500-msp-i2s"
> +   - DMA (platform) : "stericsson,ux500-pcm"
> +   - Audio CODEC    : "stericsson,ab8500-codec"

What is this a binding document for?  It looks like the binding for a
machine driver...

> +Optional properties:
> + - reg              : Physical base address and length of the device's registers.
> + - interrupts       : The interrupt outputs from the device.
> + - interrupt-parent : The parent interrupt controller.
> + - <name>-supply    : Phandle to the regulator <name> supply

...but these don't look anything like machine driver properties.
Lee Jones July 30, 2012, 7:38 a.m. UTC | #2
On 29/07/12 21:31, Mark Brown wrote:
> On Fri, Jul 27, 2012 at 01:45:45PM +0100, Lee Jones wrote:
>
>> +++ b/Documentation/devicetree/bindings/sound/ux500.txt
>> @@ -0,0 +1,62 @@
>> +* ux500 Audio Driver and ab8500 Audio CODEC
>> +
>> +Required properties:
>> + - compatible:
>> +   - Machine Driver : "stericsson,snd-soc-mop500"
>> +   - CPU-side DAI   : "stericsson,ux500-msp-i2s"
>> +   - DMA (platform) : "stericsson,ux500-pcm"
>> +   - Audio CODEC    : "stericsson,ab8500-codec"
>
> What is this a binding document for?  It looks like the binding for a
> machine driver...

No, it's a binding document for all of the ux500 driver and CODEC 
blocks. Do you really want me to split it all up? I think the only 
component which could be sanely split-out is the ab8500-codec, which 
could (should?) live in [1].

>> +Optional properties:
>> + - reg              : Physical base address and length of the device's registers.
>> + - interrupts       : The interrupt outputs from the device.
>> + - interrupt-parent : The parent interrupt controller.
>> + - <name>-supply    : Phandle to the regulator <name> supply
>
> ...but these don't look anything like machine driver properties.

These properties are relevant for some, but not all of the components 
above, hence why the are listed at 'optional properties'.

[1] Documentation/devicetree/bindings/mfd/ab8500.
Mark Brown July 30, 2012, 1:48 p.m. UTC | #3
On Mon, Jul 30, 2012 at 08:38:49AM +0100, Lee Jones wrote:
> On 29/07/12 21:31, Mark Brown wrote:
> >On Fri, Jul 27, 2012 at 01:45:45PM +0100, Lee Jones wrote:

> >>+   - Machine Driver : "stericsson,snd-soc-mop500"
> >>+   - CPU-side DAI   : "stericsson,ux500-msp-i2s"
> >>+   - DMA (platform) : "stericsson,ux500-pcm"
> >>+   - Audio CODEC    : "stericsson,ab8500-codec"

> >What is this a binding document for?  It looks like the binding for a
> >machine driver...

> No, it's a binding document for all of the ux500 driver and CODEC
> blocks. Do you really want me to split it all up? I think the only
> component which could be sanely split-out is the ab8500-codec, which
> could (should?) live in [1].

Yes, of course!  Each device will have a separate binding with different
requirements.

> These properties are relevant for some, but not all of the
> components above, hence why the are listed at 'optional properties'.

Which is part of the problem here, it makes it much harder to tell what
you need to do for the individual devices.
Lee Jones July 30, 2012, 2:32 p.m. UTC | #4
On 30/07/12 14:48, Mark Brown wrote:
> On Mon, Jul 30, 2012 at 08:38:49AM +0100, Lee Jones wrote:
>> On 29/07/12 21:31, Mark Brown wrote:
>>> On Fri, Jul 27, 2012 at 01:45:45PM +0100, Lee Jones wrote:
>
>>>> +   - Machine Driver : "stericsson,snd-soc-mop500"
>>>> +   - CPU-side DAI   : "stericsson,ux500-msp-i2s"
>>>> +   - DMA (platform) : "stericsson,ux500-pcm"
>>>> +   - Audio CODEC    : "stericsson,ab8500-codec"
>
>>> What is this a binding document for?  It looks like the binding for a
>>> machine driver...
>
>> No, it's a binding document for all of the ux500 driver and CODEC
>> blocks. Do you really want me to split it all up? I think the only
>> component which could be sanely split-out is the ab8500-codec, which
>> could (should?) live in [1].
>
> Yes, of course!  Each device will have a separate binding with different
> requirements.
>
>> These properties are relevant for some, but not all of the
>> components above, hence why the are listed at 'optional properties'.
>
> Which is part of the problem here, it makes it much harder to tell what
> you need to do for the individual devices.

Once again, I'll split them out, but I think there are people talking 
about documentation consolidation, as it's going to become very messy, 
very quickly if we keep adding new files for each device. Soon the 
Documentation directory will be as large as the driver base. :)
Mark Brown July 30, 2012, 3:07 p.m. UTC | #5
On Mon, Jul 30, 2012 at 03:32:08PM +0100, Lee Jones wrote:
> On 30/07/12 14:48, Mark Brown wrote:

> >Which is part of the problem here, it makes it much harder to tell what
> >you need to do for the individual devices.

> Once again, I'll split them out, but I think there are people
> talking about documentation consolidation, as it's going to become
> very messy, very quickly if we keep adding new files for each
> device. Soon the Documentation directory will be as large as the
> driver base. :)

Well, that's device tree for you.  You can probably get away with a
single document if there's no differences but as soon as you get into
anything where you've got custom properties and no overlap you need to
start splitting things out.
diff mbox

Patch

diff --git a/Documentation/devicetree/bindings/sound/ux500.txt b/Documentation/devicetree/bindings/sound/ux500.txt
new file mode 100644
index 0000000..af1c902
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/ux500.txt
@@ -0,0 +1,62 @@ 
+* ux500 Audio Driver and ab8500 Audio CODEC
+
+Required properties:
+ - compatible:
+   - Machine Driver : "stericsson,snd-soc-mop500"
+   - CPU-side DAI   : "stericsson,ux500-msp-i2s"
+   - DMA (platform) : "stericsson,ux500-pcm"
+   - Audio CODEC    : "stericsson,ab8500-codec"
+
+Optional properties:
+ - reg              : Physical base address and length of the device's registers.
+ - interrupts       : The interrupt outputs from the device.
+ - interrupt-parent : The parent interrupt controller.
+ - <name>-supply    : Phandle to the regulator <name> supply
+
+Non-standard properties:
+ - Machine Driver:
+   - stericsson,platform-pcm-dma : Phandle to the DMA (platform) node
+   - stericsson,cpu-dai          : Phandle to the CPU-side DAI
+   - stericsson,audio-codec      : Phandle to the Audio CODEC
+ - CPU-side DAI:
+   - stericcson,use-pinctrl      : Indicates whether an MSP port has pinctrl support
+ - Audio CODEC:
+   - stericsson,amic[1|2]-type-single-ended : Single-ended Analoge Mic (default: differential)
+   - stericsson,amic1a-bias-vamic2          : Analoge Mic wishes to use a non-standard Vamic
+   - stericsson,amic1b-bias-vamic2          : Analoge Mic wishes to use a non-standard Vamic
+   - stericsson,amic2-bias-vamic1           : Analoge Mic wishes to use a non-standard Vamic
+   - stericsson,earpeice-cmv                : Earpeice voltage (only: 950 | 1100 | 1270 | 1580)
+
+Example:
+
+	sound {
+		compatible = "stericsson,snd-soc-mop500";
+
+		stericsson,platform-pcm-dma = <&pcm>;
+		stericsson,cpu-dai = <&msp1 &msp3>;
+		stericsson,audio-codec = <&codec>;
+	};
+
+	pcm: ux500-pcm {
+		compatible = "stericsson,ux500-pcm";
+	};
+
+	msp1: msp@80124000 {
+		compatible = "stericsson,ux500-msp-i2s";
+		reg = <0x80124000 0x1000>;
+		interrupts = <0 62 0x4>;
+		v-ape-supply = <&db8500_vape_reg>;
+		stericcson,use-pinctrl;
+	};
+
+	msp3: msp@80125000 {
+		compatible = "stericsson,ux500-msp-i2s";
+		reg = <0x80125000 0x1000>;
+		interrupts = <0 62 0x4>;
+		v-ape-supply = <&db8500_vape_reg>;
+	};
+
+	codec: ab8500-codec {
+		compatible = "stericsson,ab8500-codec";
+		stericsson,earpeice-cmv = <950>; /* Units in mV. */
+	};