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
6 Separate GPIOs connected to wm5102 and wm8804 into 2 pinctrl
7 blocks and properly reference them from the DT nodes to have
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.
13 Signed-off-by: Matthias Reichl <hias@horus.com>
15 .../overlays/rpi-cirrus-wm5102-overlay.dts | 40 ++++++++++++++-----
16 1 file changed, 30 insertions(+), 10 deletions(-)
18 --- a/arch/arm/boot/dts/overlays/rpi-cirrus-wm5102-overlay.dts
19 +++ b/arch/arm/boot/dts/overlays/rpi-cirrus-wm5102-overlay.dts
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>;
32 - BCM2835_FSEL_GPIO_OUT
35 + wlf_8804_pins: wlf_8804_pins {
37 + brcm,function = <BCM2835_FSEL_GPIO_OUT>;
43 + target = <&spi0_cs_pins>;
46 + brcm,function = <BCM2835_FSEL_GPIO_OUT>;
54 rpi_cirrus_reg_1v8: rpi_cirrus_reg_1v8 {
82 + cs-gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
86 compatible = "wlf,wm5102";
90 + pinctrl-names = "default";
91 + pinctrl-0 = <&wlf_5102_pins>;
93 spi-max-frequency = <500000>;
105 compatible = "wlf,wm8804";
109 + pinctrl-names = "default";
110 + pinctrl-0 = <&wlf_8804_pins>;
112 PVDD-supply = <&vdd_3v3_reg>;
113 DVDD-supply = <&vdd_3v3_reg>;
114 wlf,reset-gpio = <&gpio 8 GPIO_ACTIVE_HIGH>;
123 compatible = "wlf,rpi-cirrus";