diff mbox

[6/9] ARM: dtsi: imx6qdl-sabresd: Add WM8962 CODEC support

Message ID d77dd407188926f61c787eb307dd142cf0b37e1b.1371123426.git.b42378@freescale.com (mailing list archive)
State New, archived
Headers show

Commit Message

Nicolin Chen June 13, 2013, 11:51 a.m. UTC
Add WM8962 CODEC support and enable its parent I2C bus.

Signed-off-by: Nicolin Chen <b42378@freescale.com>
---
 arch/arm/boot/dts/imx6qdl-sabresd.dtsi |   29 +++++++++++++++++++++++++++++
 1 files changed, 29 insertions(+), 0 deletions(-)

Comments

Shawn Guo June 14, 2013, 6:21 a.m. UTC | #1
On Thu, Jun 13, 2013 at 07:51:01PM +0800, Nicolin Chen wrote:
> Add WM8962 CODEC support and enable its parent I2C bus.
> 
> Signed-off-by: Nicolin Chen <b42378@freescale.com>
> ---
>  arch/arm/boot/dts/imx6qdl-sabresd.dtsi |   29 +++++++++++++++++++++++++++++
>  1 files changed, 29 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/imx6qdl-sabresd.dtsi b/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
> index 13af158..4ee2413 100644
> --- a/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
> +++ b/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
> @@ -92,3 +92,32 @@
>  	wp-gpios = <&gpio2 1 0>;
>  	status = "okay";
>  };
> +
> +&i2c1 {

The node should be sorted in label name, so I moved it to right after
"&fec".

> +	status = "okay";

We generally have it as the last property of a node, so I moved
it to ...

> +	clock-frequency = <100000>;
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pinctrl_i2c1_2>;

... here.

> +
> +	codec: wm8962@1a {
> +		compatible = "wlf,wm8962";
> +		reg = <0x1a>;
> +		clocks = <&clks 169>;
> +		DCVDD-supply = <&reg_audio>;	/* 1.8v */
> +		DBVDD-supply = <&reg_audio>;	/* 1.8v */
> +		AVDD-supply = <&reg_audio>;	/* 1.8v */
> +		CPVDD-supply = <&reg_audio>;	/* 1.8v */
> +		MICVDD-supply = <&reg_audio>;	/* 3.3v */
> +		PLLVDD-supply = <&reg_audio>;	/* 1.8v */
> +		SPKVDD1-supply = <&reg_audio>;	/* 4.2v */
> +		SPKVDD2-supply = <&reg_audio>;	/* 4.2v */

You comment these supplies with different voltages but they are actually
pointing to the same fixed regulator.

Shawn

> +		gpio-cfg = <
> +			0x0000 /* 0:Default */
> +			0x0000 /* 1:Default */
> +			0x0013 /* 2:FN_DMICCLK */
> +			0x0000 /* 3:Default */
> +			0x8014 /* 4:FN_DMICCDAT */
> +			0x0000 /* 5:Default */
> +		>;
> +       };
> +};
> -- 
> 1.7.1
> 
>
Nicolin Chen June 14, 2013, 6:23 a.m. UTC | #2
On Fri, Jun 14, 2013 at 02:21:49PM +0800, Shawn Guo wrote:
> > +
> > +	codec: wm8962@1a {
> > +		compatible = "wlf,wm8962";
> > +		reg = <0x1a>;
> > +		clocks = <&clks 169>;
> > +		DCVDD-supply = <&reg_audio>;	/* 1.8v */
> > +		DBVDD-supply = <&reg_audio>;	/* 1.8v */
> > +		AVDD-supply = <&reg_audio>;	/* 1.8v */
> > +		CPVDD-supply = <&reg_audio>;	/* 1.8v */
> > +		MICVDD-supply = <&reg_audio>;	/* 3.3v */
> > +		PLLVDD-supply = <&reg_audio>;	/* 1.8v */
> > +		SPKVDD1-supply = <&reg_audio>;	/* 4.2v */
> > +		SPKVDD2-supply = <&reg_audio>;	/* 4.2v */
> 
> You comment these supplies with different voltages but they are actually
> pointing to the same fixed regulator.

That's because they are all controlled by one GPIO pin. But you are right
these comments might be confusing.

And I think I don't need to send a V2 any more right? Since I saw you said
you did the fix-up for me.

Thank You
Nicolin Chen
Nicolin Chen June 14, 2013, 6:34 a.m. UTC | #3
On Fri, Jun 14, 2013 at 02:41:47PM +0800, Shawn Guo wrote:
> > That's because they are all controlled by one GPIO pin. But you are right
> > these comments might be confusing.
> > 
> > And I think I don't need to send a V2 any more right? Since I saw you said
> > you did the fix-up for me.
> 
> I just removed the comments.
> 
> Shawn

Thank you :)
Shawn Guo June 14, 2013, 6:41 a.m. UTC | #4
On Fri, Jun 14, 2013 at 02:23:14PM +0800, Nicolin Chen wrote:
> On Fri, Jun 14, 2013 at 02:21:49PM +0800, Shawn Guo wrote:
> > > +
> > > +	codec: wm8962@1a {
> > > +		compatible = "wlf,wm8962";
> > > +		reg = <0x1a>;
> > > +		clocks = <&clks 169>;
> > > +		DCVDD-supply = <&reg_audio>;	/* 1.8v */
> > > +		DBVDD-supply = <&reg_audio>;	/* 1.8v */
> > > +		AVDD-supply = <&reg_audio>;	/* 1.8v */
> > > +		CPVDD-supply = <&reg_audio>;	/* 1.8v */
> > > +		MICVDD-supply = <&reg_audio>;	/* 3.3v */
> > > +		PLLVDD-supply = <&reg_audio>;	/* 1.8v */
> > > +		SPKVDD1-supply = <&reg_audio>;	/* 4.2v */
> > > +		SPKVDD2-supply = <&reg_audio>;	/* 4.2v */
> > 
> > You comment these supplies with different voltages but they are actually
> > pointing to the same fixed regulator.
> 
> That's because they are all controlled by one GPIO pin. But you are right
> these comments might be confusing.
> 
> And I think I don't need to send a V2 any more right? Since I saw you said
> you did the fix-up for me.

I just removed the comments.

Shawn
diff mbox

Patch

diff --git a/arch/arm/boot/dts/imx6qdl-sabresd.dtsi b/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
index 13af158..4ee2413 100644
--- a/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
@@ -92,3 +92,32 @@ 
 	wp-gpios = <&gpio2 1 0>;
 	status = "okay";
 };
+
+&i2c1 {
+	status = "okay";
+	clock-frequency = <100000>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_i2c1_2>;
+
+	codec: wm8962@1a {
+		compatible = "wlf,wm8962";
+		reg = <0x1a>;
+		clocks = <&clks 169>;
+		DCVDD-supply = <&reg_audio>;	/* 1.8v */
+		DBVDD-supply = <&reg_audio>;	/* 1.8v */
+		AVDD-supply = <&reg_audio>;	/* 1.8v */
+		CPVDD-supply = <&reg_audio>;	/* 1.8v */
+		MICVDD-supply = <&reg_audio>;	/* 3.3v */
+		PLLVDD-supply = <&reg_audio>;	/* 1.8v */
+		SPKVDD1-supply = <&reg_audio>;	/* 4.2v */
+		SPKVDD2-supply = <&reg_audio>;	/* 4.2v */
+		gpio-cfg = <
+			0x0000 /* 0:Default */
+			0x0000 /* 1:Default */
+			0x0013 /* 2:FN_DMICCLK */
+			0x0000 /* 3:Default */
+			0x8014 /* 4:FN_DMICCDAT */
+			0x0000 /* 5:Default */
+		>;
+       };
+};