All of lore.kernel.org
 help / color / mirror / Atom feed
From: rask@formelder.dk (Rask Ingemann Lambertsen)
To: linux-arm-kernel@lists.infradead.org
Subject: [linux-sunxi][PATCH] ARM: dts: sun8i-h3: orange-pi-2: Enable audio codec
Date: Mon, 20 Feb 2017 22:57:12 +0100	[thread overview]
Message-ID: <20170220215711.7i253mkl2ahcd766@localhost> (raw)
In-Reply-To: <20170220162052.21932-1-codekipper@gmail.com>

On Mon, Feb 20, 2017 at 05:20:52PM +0100, codekipper at gmail.com wrote:
> From: Marcus Cooper <codekipper@gmail.com>
> 
> The Orange Pi 2 routes the LINEOUT pins through a SGM8900 PA which
> needs to be enabled. The onboard microphone is routed to MIC1, with
> MBIAS providing power.
> 
> Signed-off-by: Marcus Cooper <codekipper@gmail.com>
> ---
>  arch/arm/boot/dts/sun8i-h3-orangepi-2.dts | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-2.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-2.dts
> index 047e9e1c6093..b0d2b99990cc 100644
> --- a/arch/arm/boot/dts/sun8i-h3-orangepi-2.dts
> +++ b/arch/arm/boot/dts/sun8i-h3-orangepi-2.dts
> @@ -105,6 +105,16 @@
>  	};
>  };
>  
> +&codec {
> +	pinctrl-0 = <&codec_pa_pin>;
> +	allwinner,pa-gpios = <&pio 0 16 GPIO_ACTIVE_HIGH>; /* PA16 */
> +	allwinner,audio-routing =
> +		"Speaker", "LINEOUT",
> +		"MIC1", "Mic",
> +		"Mic",  "MBIAS";
> +	status = "okay";
> +};
> +
>  &ehci1 {
>  	status = "okay";
>  };
> @@ -144,6 +154,11 @@
>  };
>  
>  &pio {
> +	codec_pa_pin: codec_pa_pin at 0 {
> +		pins = "PA16";
> +		function = "gpio_out";
> +	};
> +

There should not be underscores in node names. See e.g.:
https://www.mail-archive.com/linux-kernel%40vger.kernel.org/msg1122967.html
https://www.mail-archive.com/linux-kernel%40vger.kernel.org/msg1145633.html
https://www.mail-archive.com/netdev%40vger.kernel.org/msg90319.html

Pinmux nodes for GPIO usage are considered unnecessary or even harmful
these days, so you should just drop the node in this case (as well as the
reference to it). As a bonus, you avoid a duplicate definition.

-- 
Rask Ingemann Lambertsen

WARNING: multiple messages have this Message-ID (diff)
From: Rask Ingemann Lambertsen <rask-SivP7zSAdNDZaaYASwVUlg@public.gmane.org>
To: codekipper-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Cc: maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [linux-sunxi][PATCH] ARM: dts: sun8i-h3: orange-pi-2: Enable audio codec
Date: Mon, 20 Feb 2017 22:57:12 +0100	[thread overview]
Message-ID: <20170220215711.7i253mkl2ahcd766@localhost> (raw)
In-Reply-To: <20170220162052.21932-1-codekipper-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

On Mon, Feb 20, 2017 at 05:20:52PM +0100, codekipper-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:
> From: Marcus Cooper <codekipper-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> 
> The Orange Pi 2 routes the LINEOUT pins through a SGM8900 PA which
> needs to be enabled. The onboard microphone is routed to MIC1, with
> MBIAS providing power.
> 
> Signed-off-by: Marcus Cooper <codekipper-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
>  arch/arm/boot/dts/sun8i-h3-orangepi-2.dts | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-2.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-2.dts
> index 047e9e1c6093..b0d2b99990cc 100644
> --- a/arch/arm/boot/dts/sun8i-h3-orangepi-2.dts
> +++ b/arch/arm/boot/dts/sun8i-h3-orangepi-2.dts
> @@ -105,6 +105,16 @@
>  	};
>  };
>  
> +&codec {
> +	pinctrl-0 = <&codec_pa_pin>;
> +	allwinner,pa-gpios = <&pio 0 16 GPIO_ACTIVE_HIGH>; /* PA16 */
> +	allwinner,audio-routing =
> +		"Speaker", "LINEOUT",
> +		"MIC1", "Mic",
> +		"Mic",  "MBIAS";
> +	status = "okay";
> +};
> +
>  &ehci1 {
>  	status = "okay";
>  };
> @@ -144,6 +154,11 @@
>  };
>  
>  &pio {
> +	codec_pa_pin: codec_pa_pin@0 {
> +		pins = "PA16";
> +		function = "gpio_out";
> +	};
> +

There should not be underscores in node names. See e.g.:
https://www.mail-archive.com/linux-kernel%40vger.kernel.org/msg1122967.html
https://www.mail-archive.com/linux-kernel%40vger.kernel.org/msg1145633.html
https://www.mail-archive.com/netdev%40vger.kernel.org/msg90319.html

Pinmux nodes for GPIO usage are considered unnecessary or even harmful
these days, so you should just drop the node in this case (as well as the
reference to it). As a bonus, you avoid a duplicate definition.

-- 
Rask Ingemann Lambertsen
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2017-02-20 21:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-20 16:20 [linux-sunxi][PATCH] ARM: dts: sun8i-h3: orange-pi-2: Enable audio codec codekipper at gmail.com
2017-02-20 16:20 ` [PATCH] " codekipper-Re5JQEeQqe8AvxtiuMwx3w
2017-02-20 21:57 ` Rask Ingemann Lambertsen [this message]
2017-02-20 21:57   ` [linux-sunxi][PATCH] " Rask Ingemann Lambertsen
  -- strict thread matches above, loose matches on Subject: below --
2017-05-10 11:51 codekipper at gmail.com
2017-05-10 11:51 ` codekipper-Re5JQEeQqe8AvxtiuMwx3w
2017-05-10 12:51 ` Maxime Ripard
2017-05-10 12:51   ` Maxime Ripard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170220215711.7i253mkl2ahcd766@localhost \
    --to=rask@formelder.dk \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.