Skip to content

Commit

Permalink
Pisound: Set the spi-speed-hz for Pisound in the Device Tree overlay,…
Browse files Browse the repository at this point in the history
… and specify spi-speed-hz override for Pi 5.

Signed-off-by: Giedrius Trainavičius <giedrius@blokas.io>
  • Loading branch information
gtrainavicius authored and pelwell committed Apr 5, 2024
1 parent d10d556 commit 94d9c11
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 2 deletions.
1 change: 1 addition & 0 deletions arch/arm/boot/dts/overlays/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
piscreen.dtbo \
piscreen2r.dtbo \
pisound.dtbo \
pisound-pi5.dtbo \
pitft22.dtbo \
pitft28-capacitive.dtbo \
pitft28-resistive.dtbo \
Expand Down
8 changes: 7 additions & 1 deletion arch/arm/boot/dts/overlays/README
Original file line number Diff line number Diff line change
Expand Up @@ -3496,11 +3496,17 @@ Params: speed Display SPI bus speed


Name: pisound
Info: Configures the Blokas Labs pisound card
Info: Configures the Blokas Labs Pisound card
Load: dtoverlay=pisound
Params: <None>


Name: pisound-pi5
Info: Pi 5 specific overlay override for Blokas Labs Pisound card, see pisound
Load: dtoverlay=pisound-pi5
Params: <None>


Name: pitft22
Info: Adafruit PiTFT 2.2" screen
Load: dtoverlay=pitft22,<param>=<val>
Expand Down
10 changes: 10 additions & 0 deletions arch/arm/boot/dts/overlays/overlay_map.dts
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,16 @@
renamed = "miniuart-bt";
};

pisound {
bcm2835;
bcm2711;
bcm2712 = "pisound-pi5";
};

pisound-pi5 {
bcm2712;
};

pwm1 {
bcm2711;
};
Expand Down
4 changes: 3 additions & 1 deletion arch/arm/boot/dts/overlays/pisound-overlay.dts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Pisound Linux kernel module.
* Copyright (C) 2016-2017 Vilniaus Blokas UAB, https://blokas.io/pisound
* Copyright (C) 2016-2024 Vilniaus Blokas UAB, https://blokas.io/pisound
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
Expand Down Expand Up @@ -56,6 +56,7 @@
compatible = "blokaslabs,pisound-spi";
reg = <0>;
spi-max-frequency = <1000000>;
spi-speed-hz = <150000>;
};
};
};
Expand All @@ -76,6 +77,7 @@
__overlay__ {
compatible = "blokaslabs,pisound";
i2s-controller = <&i2s_clk_consumer>;
spi-controller = <&pisound_spi>;
status = "okay";

pinctrl-names = "default";
Expand Down
31 changes: 31 additions & 0 deletions arch/arm/boot/dts/overlays/pisound-pi5-overlay.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
* Pisound Linux kernel module.
* Copyright (C) 2016-2024 Vilniaus Blokas UAB, https://blokas.io/pisound
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; version 2 of the
* License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

/dts-v1/;
/plugin/;

#include "pisound-overlay.dts"

&pisound_spi {
spi-speed-hz = <100000>;
};

/ {
compatible = "brcm,bcm2712";
};

0 comments on commit 94d9c11

Please sign in to comment.