aboutsummaryrefslogtreecommitdiff
path: root/target/linux/bcm27xx/patches-6.1/950-1251-Pisound-Set-the-spi-speed-hz-for-Pisound-in-the-Devi.patch
blob: b0ddd8f5abc8df76e21b5d403baa87c2cbcc4302 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
From 92123f0abd5e24c150b54c56261813ced432ac87 Mon Sep 17 00:00:00 2001
From: Giedrius <giedrius@blokas.io>
Date: Mon, 22 Jan 2024 13:29:24 +0000
Subject: [PATCH 1251/1295] Pisound: Set the spi-speed-hz for Pisound in the
 Device Tree overlay, and specify spi-speed-hz override for Pi 5.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Giedrius Trainavičius <giedrius@blokas.io>
---
 arch/arm/boot/dts/overlays/Makefile           |  1 +
 arch/arm/boot/dts/overlays/README             |  8 ++++-
 arch/arm/boot/dts/overlays/overlay_map.dts    | 10 ++++++
 .../arm/boot/dts/overlays/pisound-overlay.dts |  4 ++-
 .../boot/dts/overlays/pisound-pi5-overlay.dts | 31 +++++++++++++++++++
 5 files changed, 52 insertions(+), 2 deletions(-)
 create mode 100644 arch/arm/boot/dts/overlays/pisound-pi5-overlay.dts

--- a/arch/arm/boot/dts/overlays/Makefile
+++ b/arch/arm/boot/dts/overlays/Makefile
@@ -192,6 +192,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
 	piscreen.dtbo \
 	piscreen2r.dtbo \
 	pisound.dtbo \
+	pisound-pi5.dtbo \
 	pitft22.dtbo \
 	pitft28-capacitive.dtbo \
 	pitft28-resistive.dtbo \
--- a/arch/arm/boot/dts/overlays/README
+++ b/arch/arm/boot/dts/overlays/README
@@ -3486,11 +3486,17 @@ Params: speed                   Display
 
 
 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>
--- a/arch/arm/boot/dts/overlays/overlay_map.dts
+++ b/arch/arm/boot/dts/overlays/overlay_map.dts
@@ -203,6 +203,16 @@
 		renamed = "miniuart-bt";
 	};
 
+	pisound {
+		bcm2835;
+		bcm2711;
+		bcm2712 = "pisound-pi5";
+	};
+
+	pisound-pi5 {
+		bcm2712;
+	};
+
 	pwm1 {
 		bcm2711;
 	};
--- a/arch/arm/boot/dts/overlays/pisound-overlay.dts
+++ b/arch/arm/boot/dts/overlays/pisound-overlay.dts
@@ -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
@@ -56,6 +56,7 @@
 				compatible = "blokaslabs,pisound-spi";
 				reg = <0>;
 				spi-max-frequency = <1000000>;
+				spi-speed-hz = <150000>;
 			};
 		};
 	};
@@ -76,6 +77,7 @@
 		__overlay__ {
 			compatible = "blokaslabs,pisound";
 			i2s-controller = <&i2s_clk_consumer>;
+			spi-controller = <&pisound_spi>;
 			status = "okay";
 
 			pinctrl-names = "default";
--- /dev/null
+++ b/arch/arm/boot/dts/overlays/pisound-pi5-overlay.dts
@@ -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";
+};