Skip to content

Commit e41f926

Browse files
gtrainaviciuspopcornmix
authored andcommitted
Pisound: Set the spi-speed-hz for Pisound in the Device Tree overlay, and specify spi-speed-hz override for Pi 5.
Signed-off-by: Giedrius Trainavičius <[email protected]>
1 parent 2b48e57 commit e41f926

File tree

5 files changed

+52
-2
lines changed

5 files changed

+52
-2
lines changed

arch/arm/boot/dts/overlays/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
193193
piscreen.dtbo \
194194
piscreen2r.dtbo \
195195
pisound.dtbo \
196+
pisound-pi5.dtbo \
196197
pitft22.dtbo \
197198
pitft28-capacitive.dtbo \
198199
pitft28-resistive.dtbo \

arch/arm/boot/dts/overlays/README

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3492,11 +3492,17 @@ Params: speed Display SPI bus speed
34923492

34933493

34943494
Name: pisound
3495-
Info: Configures the Blokas Labs pisound card
3495+
Info: Configures the Blokas Labs Pisound card
34963496
Load: dtoverlay=pisound
34973497
Params: <None>
34983498

34993499

3500+
Name: pisound-pi5
3501+
Info: Pi 5 specific overlay override for Blokas Labs Pisound card, see pisound
3502+
Load: dtoverlay=pisound-pi5
3503+
Params: <None>
3504+
3505+
35003506
Name: pitft22
35013507
Info: Adafruit PiTFT 2.2" screen
35023508
Load: dtoverlay=pitft22,<param>=<val>

arch/arm/boot/dts/overlays/overlay_map.dts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,16 @@
203203
renamed = "miniuart-bt";
204204
};
205205

206+
pisound {
207+
bcm2835;
208+
bcm2711;
209+
bcm2712 = "pisound-pi5";
210+
};
211+
212+
pisound-pi5 {
213+
bcm2712;
214+
};
215+
206216
pwm1 {
207217
bcm2711;
208218
};

arch/arm/boot/dts/overlays/pisound-overlay.dts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* Pisound Linux kernel module.
3-
* Copyright (C) 2016-2017 Vilniaus Blokas UAB, https://blokas.io/pisound
3+
* Copyright (C) 2016-2024 Vilniaus Blokas UAB, https://blokas.io/pisound
44
*
55
* This program is free software; you can redistribute it and/or
66
* modify it under the terms of the GNU General Public License
@@ -56,6 +56,7 @@
5656
compatible = "blokaslabs,pisound-spi";
5757
reg = <0>;
5858
spi-max-frequency = <1000000>;
59+
spi-speed-hz = <150000>;
5960
};
6061
};
6162
};
@@ -76,6 +77,7 @@
7677
__overlay__ {
7778
compatible = "blokaslabs,pisound";
7879
i2s-controller = <&i2s_clk_consumer>;
80+
spi-controller = <&pisound_spi>;
7981
status = "okay";
8082

8183
pinctrl-names = "default";
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
* Pisound Linux kernel module.
3+
* Copyright (C) 2016-2024 Vilniaus Blokas UAB, https://blokas.io/pisound
4+
*
5+
* This program is free software; you can redistribute it and/or
6+
* modify it under the terms of the GNU General Public License
7+
* as published by the Free Software Foundation; version 2 of the
8+
* License.
9+
*
10+
* This program is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
* GNU General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU General Public License
16+
* along with this program; if not, write to the Free Software
17+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18+
*/
19+
20+
/dts-v1/;
21+
/plugin/;
22+
23+
#include "pisound-overlay.dts"
24+
25+
&pisound_spi {
26+
spi-speed-hz = <100000>;
27+
};
28+
29+
/ {
30+
compatible = "brcm,bcm2712";
31+
};

0 commit comments

Comments
 (0)