Skip to content

Commit f497cad

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 77d6a23 commit f497cad

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
@@ -194,6 +194,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
194194
piscreen.dtbo \
195195
piscreen2r.dtbo \
196196
pisound.dtbo \
197+
pisound-pi5.dtbo \
197198
pitft22.dtbo \
198199
pitft28-capacitive.dtbo \
199200
pitft28-resistive.dtbo \

arch/arm/boot/dts/overlays/README

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

34973497

34983498
Name: pisound
3499-
Info: Configures the Blokas Labs pisound card
3499+
Info: Configures the Blokas Labs Pisound card
35003500
Load: dtoverlay=pisound
35013501
Params: <None>
35023502

35033503

3504+
Name: pisound-pi5
3505+
Info: Pi 5 specific overlay override for Blokas Labs Pisound card, see pisound
3506+
Load: dtoverlay=pisound-pi5
3507+
Params: <None>
3508+
3509+
35043510
Name: pitft22
35053511
Info: Adafruit PiTFT 2.2" screen
35063512
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
@@ -213,6 +213,16 @@
213213
renamed = "miniuart-bt";
214214
};
215215

216+
pisound {
217+
bcm2835;
218+
bcm2711;
219+
bcm2712 = "pisound-pi5";
220+
};
221+
222+
pisound-pi5 {
223+
bcm2712;
224+
};
225+
216226
pwm1 {
217227
bcm2711;
218228
};

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)