2f8db38b8176f13e7e290b0008f57075d6591b92
[openwrt/staging/chunkeey.git] / target / linux / bcm27xx / patches-5.10 / 950-0366-PiFi-40-Devicetree-files.patch
1 From 5dd5b4625a4435f64ee6a1c9f47e3609e771f14b Mon Sep 17 00:00:00 2001
2 From: David Knell <david.knell@gmail.com>
3 Date: Wed, 28 Oct 2020 14:20:56 +0000
4 Subject: [PATCH] PiFi-40 Devicetree files
5
6 Signed-off-by: David Knell <david.knell@gmail.com>
7 ---
8 arch/arm/boot/dts/overlays/Makefile | 1 +
9 arch/arm/boot/dts/overlays/README | 6 +++
10 .../arm/boot/dts/overlays/pifi-40-overlay.dts | 50 +++++++++++++++++++
11 3 files changed, 57 insertions(+)
12 create mode 100644 arch/arm/boot/dts/overlays/pifi-40-overlay.dts
13
14 --- a/arch/arm/boot/dts/overlays/Makefile
15 +++ b/arch/arm/boot/dts/overlays/Makefile
16 @@ -125,6 +125,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
17 pca953x.dtbo \
18 pibell.dtbo \
19 pifacedigital.dtbo \
20 + pifi-40.dtbo \
21 piglow.dtbo \
22 piscreen.dtbo \
23 piscreen2r.dtbo \
24 --- a/arch/arm/boot/dts/overlays/README
25 +++ b/arch/arm/boot/dts/overlays/README
26 @@ -2000,6 +2000,12 @@ Params: spi-present-mask 8-bit in
27 0-3, which can be configured with JP1 and JP2.
28
29
30 +Name: pifi-40
31 +Info: Configures the PiFi 40W stereo amplifier
32 +Load: dtoverlay=pifi-40
33 +Params: <None>
34 +
35 +
36 Name: piglow
37 Info: Configures the PiGlow by pimoroni.com
38 Load: dtoverlay=piglow
39 --- /dev/null
40 +++ b/arch/arm/boot/dts/overlays/pifi-40-overlay.dts
41 @@ -0,0 +1,50 @@
42 +// Definitions for PiFi-40 Amp
43 +/dts-v1/;
44 +/plugin/;
45 +#include <dt-bindings/gpio/gpio.h>
46 +/ {
47 + compatible = "brcm,bcm2835";
48 +
49 + fragment@0 {
50 + target = <&i2s>;
51 + __overlay__ {
52 + status = "okay";
53 + };
54 + };
55 +
56 + fragment@1 {
57 + target = <&i2c1>;
58 + __overlay__ {
59 + #address-cells = <1>;
60 + #size-cells = <0>;
61 + status = "okay";
62 +
63 + tas5711l: audio-codec@1a {
64 + compatible = "ti,tas5711";
65 + reg = <0x1a>;
66 + #sound-dai-cells = <0>;
67 + sound-name-prefix = "Left";
68 + status = "okay";
69 + };
70 +
71 + tas5711r: audio-codec@1b {
72 + compatible = "ti,tas5711";
73 + reg = <0x1b>;
74 + #sound-dai-cells = <0>;
75 + sound-name-prefix = "Right";
76 + status = "okay";
77 + };
78 + };
79 + };
80 +
81 + fragment@2 {
82 + target = <&sound>;
83 + pifi_40: __overlay__ {
84 + compatible = "pifi,pifi-40";
85 + audio-codec = <&tas5711l &tas5711r>;
86 + i2s-controller = <&i2s>;
87 + pdn-gpios = <&gpio 23 1>;
88 + status = "okay";
89 + };
90 + };
91 +};