bcm27xx-gpu-fw: update to latest version
[openwrt/openwrt.git] / target / linux / bcm27xx / patches-5.4 / 950-0360-rpi-cirrus-wm5102-overlay-fix-pinctrl-configuration.patch
1 From 01f45f7d4403e40f28f626296bec3ccae1b1f65b Mon Sep 17 00:00:00 2001
2 From: Matthias Reichl <hias@horus.com>
3 Date: Sat, 30 Nov 2019 23:10:26 +0100
4 Subject: [PATCH] rpi-cirrus-wm5102-overlay: fix pinctrl configuration
5
6 Separate GPIOs connected to wm5102 and wm8804 into 2 pinctrl
7 blocks and properly reference them from the DT nodes to have
8 correct pinmux owners.
9
10 Setup spi0 to use only one CS line on GPIO7 so that GPIO8 is
11 no longer claimed by spi0 but can be used by wm8804.
12
13 Signed-off-by: Matthias Reichl <hias@horus.com>
14 ---
15 .../overlays/rpi-cirrus-wm5102-overlay.dts | 40 ++++++++++++++-----
16 1 file changed, 30 insertions(+), 10 deletions(-)
17
18 --- a/arch/arm/boot/dts/overlays/rpi-cirrus-wm5102-overlay.dts
19 +++ b/arch/arm/boot/dts/overlays/rpi-cirrus-wm5102-overlay.dts
20 @@ -18,19 +18,31 @@
21 fragment@1 {
22 target = <&gpio>;
23 __overlay__ {
24 - wlf_pins: wlf_pins {
25 - brcm,pins = <17 22 27 8>;
26 + wlf_5102_pins: wlf_5102_pins {
27 + brcm,pins = <17 22 27>;
28 brcm,function = <
29 BCM2835_FSEL_GPIO_OUT
30 BCM2835_FSEL_GPIO_OUT
31 BCM2835_FSEL_GPIO_IN
32 - BCM2835_FSEL_GPIO_OUT
33 >;
34 };
35 + wlf_8804_pins: wlf_8804_pins {
36 + brcm,pins = <8>;
37 + brcm,function = <BCM2835_FSEL_GPIO_OUT>;
38 + };
39 };
40 };
41
42 fragment@2 {
43 + target = <&spi0_cs_pins>;
44 + __overlay__ {
45 + brcm,pins = <7>;
46 + brcm,function = <BCM2835_FSEL_GPIO_OUT>;
47 + };
48 + };
49 +
50 +
51 + fragment@3 {
52 target-path = "/";
53 __overlay__ {
54 rpi_cirrus_reg_1v8: rpi_cirrus_reg_1v8 {
55 @@ -43,30 +55,34 @@
56 };
57 };
58
59 - fragment@3 {
60 + fragment@4 {
61 target = <&spidev0>;
62 __overlay__ {
63 status = "disabled";
64 };
65 };
66
67 - fragment@4 {
68 + fragment@5 {
69 target = <&spidev1>;
70 __overlay__ {
71 status = "disabled";
72 };
73 };
74
75 - fragment@5 {
76 + fragment@6 {
77 target = <&spi0>;
78 __overlay__ {
79 #address-cells = <1>;
80 #size-cells = <0>;
81 status = "okay";
82 + cs-gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
83
84 - wm5102@1{
85 + wm5102@0{
86 compatible = "wlf,wm5102";
87 - reg = <1>;
88 + reg = <0>;
89 +
90 + pinctrl-names = "default";
91 + pinctrl-0 = <&wlf_5102_pins>;
92
93 spi-max-frequency = <500000>;
94
95 @@ -123,7 +139,7 @@
96 };
97 };
98
99 - fragment@6 {
100 + fragment@7 {
101 target = <&i2c1>;
102 __overlay__ {
103 status = "okay";
104 @@ -134,6 +150,10 @@
105 compatible = "wlf,wm8804";
106 reg = <0x3b>;
107 status = "okay";
108 +
109 + pinctrl-names = "default";
110 + pinctrl-0 = <&wlf_8804_pins>;
111 +
112 PVDD-supply = <&vdd_3v3_reg>;
113 DVDD-supply = <&vdd_3v3_reg>;
114 wlf,reset-gpio = <&gpio 8 GPIO_ACTIVE_HIGH>;
115 @@ -141,7 +161,7 @@
116 };
117 };
118
119 - fragment@7 {
120 + fragment@8 {
121 target = <&sound>;
122 __overlay__ {
123 compatible = "wlf,rpi-cirrus";