/
pisound-overlay.dts
120 lines (102 loc) · 2.38 KB
/
pisound-overlay.dts
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
/*
* Pisound Linux kernel module.
* Copyright (C) 2016-2017 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 <dt-bindings/gpio/gpio.h>
/ {
compatible = "brcm,bcm2835";
fragment@0 {
target = <&spi0>;
__overlay__ {
status = "okay";
};
};
fragment@1 {
target = <&spidev0>;
__overlay__ {
status = "disabled";
};
};
fragment@2 {
target = <&spidev1>;
__overlay__ {
status = "okay";
};
};
fragment@3 {
target = <&spi0>;
__overlay__ {
#address-cells = <1>;
#size-cells = <0>;
pisound_spi: pisound_spi@0{
compatible = "blokaslabs,pisound-spi";
reg = <0>;
pinctrl-names = "default";
pinctrl-0 = <&spi0_pins>;
spi-max-frequency = <1000000>;
};
};
};
fragment@4 {
target-path = "/";
__overlay__ {
pcm5102a-codec {
#sound-dai-cells = <0>;
compatible = "ti,pcm5102a";
status = "okay";
};
};
};
fragment@5 {
target = <&sound>;
__overlay__ {
compatible = "blokaslabs,pisound";
i2s-controller = <&i2s>;
status = "okay";
pinctrl-0 = <&pisound_button_pins>;
osr-gpios =
<&gpio 13 GPIO_ACTIVE_HIGH>,
<&gpio 26 GPIO_ACTIVE_HIGH>,
<&gpio 16 GPIO_ACTIVE_HIGH>;
reset-gpios =
<&gpio 12 GPIO_ACTIVE_HIGH>,
<&gpio 24 GPIO_ACTIVE_HIGH>;
data_available-gpios = <&gpio 25 GPIO_ACTIVE_HIGH>;
button-gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
};
};
fragment@6 {
target = <&gpio>;
__overlay__ {
pinctrl-names = "default";
pinctrl-0 = <&pisound_button_pins>;
pisound_button_pins: pisound_button_pins {
brcm,pins = <17>;
brcm,function = <0>; // Input
brcm,pull = <2>; // Pull-Up
};
};
};
fragment@7 {
target = <&i2s>;
__overlay__ {
status = "okay";
};
};
};