[PATCH 4/4] dts: bcm283x.dtsi: Add analog audio/headphone jack for bcm2835

Stefan Wahren stefan.wahren at i2se.com
Tue Mar 14 01:05:54 PDT 2017


Am 12.03.2017 um 07:38 schrieb Michael Zoran:
> Add the DT nodes for the analog audio/headphone jack for the BCM2835
>
> Signed-off-by: Michael Zoran <mzoran at crowfest.net>
> ---
>  arch/arm/boot/dts/bcm283x.dtsi | 18 +++++++++++++++++-
>  1 file changed, 17 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/boot/dts/bcm283x.dtsi b/arch/arm/boot/dts/bcm283x.dtsi
> index 9798bc9293d8..bf2cd463a6e6 100644
> --- a/arch/arm/boot/dts/bcm283x.dtsi
> +++ b/arch/arm/boot/dts/bcm283x.dtsi
> @@ -338,7 +338,12 @@
>  				brcm,pins = <42 43>;
>  				brcm,function = <BCM2835_FSEL_ALT5>;
>  			};
> -		};
> +
> +                        analog_audio_pins: analog_audio_pins {
> +                                brcm,pins = <40 45>;
> +                                brcm,function = <4 4>; /* Alt0 */

Please look at the other pin groups and adapt accordingly (defines, naming).

> +                        };
> +                };
>  
>  		uart0: serial at 7e201000 {
>  			compatible = "brcm,bcm2835-pl011", "arm,pl011", "arm,primecell";
> @@ -464,6 +469,17 @@
>  			status = "disabled";
>  		};
>  
> +                analogaudio: analogaudio at 7e20c000 {
> +                        compatible = "brcm,bcm2835-analog-audio";
> +                        reg = <0x7e20c000 0x28>;
> +                        clocks = <&clocks BCM2835_CLOCK_PWM>;
> +                        assigned-clocks = <&clocks BCM2835_CLOCK_PWM>;
> +                        pinctrl-names = "default";
> +                        pinctrl-0 = <&analog_audio_pins>;

This isn't future-proof. Don't define pintrl at SoC level. This should
be done on board level.

AFAIK the Raspberry Pi 3 uses pin 40 and 41.

Thanks
Stefan

> +                        dmas = <&dma 5>;
> +                        dma-names = "tx";
> +                };
> +
>  		sdhci: sdhci at 7e300000 {
>  			compatible = "brcm,bcm2835-sdhci";
>  			reg = <0x7e300000 0x100>;




More information about the linux-rpi-kernel mailing list