diff mbox

[PATCHv5,1/5] dt-bindings: mfd: motorola-cpcap: document audio-codec

Message ID 20180223200254.25685-2-sebastian.reichel@collabora.co.uk (mailing list archive)
State New, archived
Headers show

Commit Message

Sebastian Reichel Feb. 23, 2018, 8:02 p.m. UTC
This adds the DT binding for the audio-codec sub-module found
inside the Motorola CPCAP PMIC.

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
---
 .../devicetree/bindings/mfd/motorola-cpcap.txt     | 42 ++++++++++++++++++++++
 1 file changed, 42 insertions(+)

Comments

Mark Brown Feb. 26, 2018, 10:08 a.m. UTC | #1
On Fri, Feb 23, 2018 at 09:02:50PM +0100, Sebastian Reichel wrote:
> This adds the DT binding for the audio-codec sub-module found
> inside the Motorola CPCAP PMIC.

Acked-by: Mark Brown <broonie@kernel.org>
Rob Herring (Arm) March 2, 2018, 7:07 p.m. UTC | #2
On Fri, Feb 23, 2018 at 09:02:50PM +0100, Sebastian Reichel wrote:
> This adds the DT binding for the audio-codec sub-module found
> inside the Motorola CPCAP PMIC.
> 
> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
> ---
>  .../devicetree/bindings/mfd/motorola-cpcap.txt     | 42 ++++++++++++++++++++++
>  1 file changed, 42 insertions(+)

Reviewed-by: Rob Herring <robh@kernel.org>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Lee Jones March 7, 2018, 4:30 p.m. UTC | #3
On Fri, 23 Feb 2018, Sebastian Reichel wrote:

> This adds the DT binding for the audio-codec sub-module found
> inside the Motorola CPCAP PMIC.
> 
> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
> ---
>  .../devicetree/bindings/mfd/motorola-cpcap.txt     | 42 ++++++++++++++++++++++
>  1 file changed, 42 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/mfd/motorola-cpcap.txt b/Documentation/devicetree/bindings/mfd/motorola-cpcap.txt
> index 15bc885f9df4..82c3a7140660 100644
> --- a/Documentation/devicetree/bindings/mfd/motorola-cpcap.txt
> +++ b/Documentation/devicetree/bindings/mfd/motorola-cpcap.txt
> @@ -12,6 +12,30 @@ Required properties:
>  - spi-max-frequency	: Typically set to 3000000
>  - spi-cs-high		: SPI chip select direction
>  
> +Optional subnodes:
> +
> +The sub-functions of CPCAP get their own node with their own compatible values,
> +which are described in the following files:
> +
> +- Documentation/devicetree/bindings/power/supply/cpcap-battery.txt
> +- Documentation/devicetree/bindings/power/supply/cpcap-charger.txt
> +- Documentation/devicetree/bindings/regulator/cpcap-regulator.txt
> +- Documentation/devicetree/bindings/phy/phy-cpcap-usb.txt
> +- Documentation/devicetree/bindings/input/cpcap-pwrbutton.txt
> +- Documentation/devicetree/bindings/rtc/cpcap-rtc.txt
> +- Documentation/devicetree/bindings/leds/leds-cpcap.txt
> +- Documentation/devicetree/bindings/iio/adc/cpcap-adc.txt

Nit: Best to use relative path names here (hint: DT docs might not
live in there kernel forever).

Other than that:

For my own reference:
  Acked-for-MFD-by: Lee Jones <lee.jones@linaro.org>
diff mbox

Patch

diff --git a/Documentation/devicetree/bindings/mfd/motorola-cpcap.txt b/Documentation/devicetree/bindings/mfd/motorola-cpcap.txt
index 15bc885f9df4..82c3a7140660 100644
--- a/Documentation/devicetree/bindings/mfd/motorola-cpcap.txt
+++ b/Documentation/devicetree/bindings/mfd/motorola-cpcap.txt
@@ -12,6 +12,30 @@  Required properties:
 - spi-max-frequency	: Typically set to 3000000
 - spi-cs-high		: SPI chip select direction
 
+Optional subnodes:
+
+The sub-functions of CPCAP get their own node with their own compatible values,
+which are described in the following files:
+
+- Documentation/devicetree/bindings/power/supply/cpcap-battery.txt
+- Documentation/devicetree/bindings/power/supply/cpcap-charger.txt
+- Documentation/devicetree/bindings/regulator/cpcap-regulator.txt
+- Documentation/devicetree/bindings/phy/phy-cpcap-usb.txt
+- Documentation/devicetree/bindings/input/cpcap-pwrbutton.txt
+- Documentation/devicetree/bindings/rtc/cpcap-rtc.txt
+- Documentation/devicetree/bindings/leds/leds-cpcap.txt
+- Documentation/devicetree/bindings/iio/adc/cpcap-adc.txt
+
+The only exception is the audio codec. Instead of a compatible value its
+node must be named "audio-codec".
+
+Required properties for the audio-codec subnode:
+
+- #sound-dai-cells = <1>;
+
+The audio-codec provides two DAIs. The first one is connected to the
+Stereo HiFi DAC and the second one is connected to the Voice DAC.
+
 Example:
 
 &mcspi1 {
@@ -26,6 +50,24 @@  Example:
 		#size-cells = <0>;
 		spi-max-frequency = <3000000>;
 		spi-cs-high;
+
+		audio-codec {
+			#sound-dai-cells = <1>;
+
+			/* HiFi */
+			port@0 {
+				endpoint {
+					remote-endpoint = <&cpu_dai1>;
+				};
+			};
+
+			/* Voice */
+			port@1 {
+				endpoint {
+					remote-endpoint = <&cpu_dai2>;
+				};
+			};
+		};
 	};
 };