bcm27xx: 6.1: add kernel patches
[openwrt/staging/stintel.git] / target / linux / bcm27xx / patches-6.1 / 950-0449-overlays-pisound-Make-button-pins-owned-by-card.patch
1 From 028e7d32c62c7cd277b23990d29fc71e43f1f66b Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.com>
3 Date: Wed, 2 Nov 2022 09:54:39 +0000
4 Subject: [PATCH] overlays: pisound: Make button pins owned by card
5
6 The pisound overlay claims a number of GPIOs using a pinctrl node, but
7 for some reason hangs this claim on the main gpio node. This obscures
8 the ownership of the pins (as shown by gpioinfo and in the kernel logs)
9 and isn't scalable - only one overlay can use the trick at a time.
10
11 Change the overlay to make the pin ownership clear and avoid any future
12 conflicts, removing a bogus claim on pins_spi0 at the same time.
13
14 See: https://github.com/raspberrypi/linux/issues/5235
15
16 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
17 ---
18 arch/arm/boot/dts/overlays/pisound-overlay.dts | 6 +-----
19 1 file changed, 1 insertion(+), 5 deletions(-)
20
21 --- a/arch/arm/boot/dts/overlays/pisound-overlay.dts
22 +++ b/arch/arm/boot/dts/overlays/pisound-overlay.dts
23 @@ -55,8 +55,6 @@
24 pisound_spi: pisound_spi@0{
25 compatible = "blokaslabs,pisound-spi";
26 reg = <0>;
27 - pinctrl-names = "default";
28 - pinctrl-0 = <&spi0_pins>;
29 spi-max-frequency = <1000000>;
30 };
31 };
32 @@ -80,6 +78,7 @@
33 i2s-controller = <&i2s>;
34 status = "okay";
35
36 + pinctrl-names = "default";
37 pinctrl-0 = <&pisound_button_pins>;
38
39 osr-gpios =
40 @@ -100,9 +99,6 @@
41 fragment@6 {
42 target = <&gpio>;
43 __overlay__ {
44 - pinctrl-names = "default";
45 - pinctrl-0 = <&pisound_button_pins>;
46 -
47 pisound_button_pins: pisound_button_pins {
48 brcm,pins = <17>;
49 brcm,function = <0>; // Input