bcm27xx: update 6.1 patches from RPi foundation
[openwrt/staging/xback.git] / target / linux / bcm27xx / patches-6.1 / 950-1251-Pisound-Set-the-spi-speed-hz-for-Pisound-in-the-Devi.patch
1 From 92123f0abd5e24c150b54c56261813ced432ac87 Mon Sep 17 00:00:00 2001
2 From: Giedrius <giedrius@blokas.io>
3 Date: Mon, 22 Jan 2024 13:29:24 +0000
4 Subject: [PATCH 1251/1295] Pisound: Set the spi-speed-hz for Pisound in the
5 Device Tree overlay, and specify spi-speed-hz override for Pi 5.
6 MIME-Version: 1.0
7 Content-Type: text/plain; charset=UTF-8
8 Content-Transfer-Encoding: 8bit
9
10 Signed-off-by: Giedrius Trainavičius <giedrius@blokas.io>
11 ---
12 arch/arm/boot/dts/overlays/Makefile | 1 +
13 arch/arm/boot/dts/overlays/README | 8 ++++-
14 arch/arm/boot/dts/overlays/overlay_map.dts | 10 ++++++
15 .../arm/boot/dts/overlays/pisound-overlay.dts | 4 ++-
16 .../boot/dts/overlays/pisound-pi5-overlay.dts | 31 +++++++++++++++++++
17 5 files changed, 52 insertions(+), 2 deletions(-)
18 create mode 100644 arch/arm/boot/dts/overlays/pisound-pi5-overlay.dts
19
20 --- a/arch/arm/boot/dts/overlays/Makefile
21 +++ b/arch/arm/boot/dts/overlays/Makefile
22 @@ -192,6 +192,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
23 piscreen.dtbo \
24 piscreen2r.dtbo \
25 pisound.dtbo \
26 + pisound-pi5.dtbo \
27 pitft22.dtbo \
28 pitft28-capacitive.dtbo \
29 pitft28-resistive.dtbo \
30 --- a/arch/arm/boot/dts/overlays/README
31 +++ b/arch/arm/boot/dts/overlays/README
32 @@ -3486,11 +3486,17 @@ Params: speed Display
33
34
35 Name: pisound
36 -Info: Configures the Blokas Labs pisound card
37 +Info: Configures the Blokas Labs Pisound card
38 Load: dtoverlay=pisound
39 Params: <None>
40
41
42 +Name: pisound-pi5
43 +Info: Pi 5 specific overlay override for Blokas Labs Pisound card, see pisound
44 +Load: dtoverlay=pisound-pi5
45 +Params: <None>
46 +
47 +
48 Name: pitft22
49 Info: Adafruit PiTFT 2.2" screen
50 Load: dtoverlay=pitft22,<param>=<val>
51 --- a/arch/arm/boot/dts/overlays/overlay_map.dts
52 +++ b/arch/arm/boot/dts/overlays/overlay_map.dts
53 @@ -203,6 +203,16 @@
54 renamed = "miniuart-bt";
55 };
56
57 + pisound {
58 + bcm2835;
59 + bcm2711;
60 + bcm2712 = "pisound-pi5";
61 + };
62 +
63 + pisound-pi5 {
64 + bcm2712;
65 + };
66 +
67 pwm1 {
68 bcm2711;
69 };
70 --- a/arch/arm/boot/dts/overlays/pisound-overlay.dts
71 +++ b/arch/arm/boot/dts/overlays/pisound-overlay.dts
72 @@ -1,6 +1,6 @@
73 /*
74 * Pisound Linux kernel module.
75 - * Copyright (C) 2016-2017 Vilniaus Blokas UAB, https://blokas.io/pisound
76 + * Copyright (C) 2016-2024 Vilniaus Blokas UAB, https://blokas.io/pisound
77 *
78 * This program is free software; you can redistribute it and/or
79 * modify it under the terms of the GNU General Public License
80 @@ -56,6 +56,7 @@
81 compatible = "blokaslabs,pisound-spi";
82 reg = <0>;
83 spi-max-frequency = <1000000>;
84 + spi-speed-hz = <150000>;
85 };
86 };
87 };
88 @@ -76,6 +77,7 @@
89 __overlay__ {
90 compatible = "blokaslabs,pisound";
91 i2s-controller = <&i2s_clk_consumer>;
92 + spi-controller = <&pisound_spi>;
93 status = "okay";
94
95 pinctrl-names = "default";
96 --- /dev/null
97 +++ b/arch/arm/boot/dts/overlays/pisound-pi5-overlay.dts
98 @@ -0,0 +1,31 @@
99 +/*
100 + * Pisound Linux kernel module.
101 + * Copyright (C) 2016-2024 Vilniaus Blokas UAB, https://blokas.io/pisound
102 + *
103 + * This program is free software; you can redistribute it and/or
104 + * modify it under the terms of the GNU General Public License
105 + * as published by the Free Software Foundation; version 2 of the
106 + * License.
107 + *
108 + * This program is distributed in the hope that it will be useful,
109 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
110 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
111 + * GNU General Public License for more details.
112 + *
113 + * You should have received a copy of the GNU General Public License
114 + * along with this program; if not, write to the Free Software
115 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
116 + */
117 +
118 +/dts-v1/;
119 +/plugin/;
120 +
121 +#include "pisound-overlay.dts"
122 +
123 +&pisound_spi {
124 + spi-speed-hz = <100000>;
125 +};
126 +
127 +/ {
128 + compatible = "brcm,bcm2712";
129 +};