Merge tag 'v5.15.57' into rpi-5.15.y
[platform/kernel/linux-rpi.git] / arch / arm / boot / dts / overlays / draws-overlay.dts
1 #include <dt-bindings/clock/bcm2835.h>
2 /*
3  * Device tree overlay for the DRAWS Hardware
4  */
5
6 /dts-v1/;
7 /plugin/;
8
9 / {
10     compatible = "brcm,bcm2835";
11     fragment@0 {
12         target = <&i2s>;
13         __overlay__ {
14             status = "okay";
15         };
16     };
17
18     fragment@1 {
19         target-path = "/";
20         __overlay__ {
21             regulators {
22                 compatible = "simple-bus";
23                 #address-cells = <1>;
24                 #size-cells = <0>;
25
26                 udrc0_ldoin: udrc0_ldoin {
27                     compatible = "regulator-fixed";
28                     regulator-name = "ldoin";
29                     regulator-min-microvolt = <3300000>;
30                     regulator-max-microvolt = <3300000>;
31                     regulator-always-on;
32                 };
33
34                 sc16is752_clk: sc16is752_draws_clk {
35                     compatible = "fixed-clock";
36                     #clock-cells = <0>;
37                     clock-frequency = <1843200>;
38                 };
39             };
40
41             pps: pps {
42                 compatible = "pps-gpio";
43                 pinctrl-names = "default";
44                 pinctrl-0 = <&pps_pins>;
45                 gpios = <&gpio 7 0>;
46                 status = "okay";
47             };
48
49             iio-hwmon {
50                 compatible = "iio-hwmon";
51                 status = "okay";
52                 io-channels = <&tla2024 4>, <&tla2024 5>, <&tla2024 6>,
53                               <&tla2024 7>;
54             };
55         };
56     };
57
58     fragment@2 {
59         target = <&i2c_arm>;
60         __overlay__ {
61             #address-cells = <1>;
62             #size-cells = <0>;
63             status = "okay";
64
65             tlv320aic32x4: tlv320aic32x4@18 {
66                 compatible = "ti,tlv320aic32x4";
67                 reg = <0x18>;
68                 #sound-dai-cells = <0>;
69                 status = "okay";
70
71                 clocks = <&clocks BCM2835_CLOCK_GP0>;
72                 clock-names = "mclk";
73                 assigned-clocks = <&clocks BCM2835_CLOCK_GP0>;
74                 assigned-clock-rates = <25000000>;
75
76                 pinctrl-names = "default";
77                 pinctrl-0 = <&gpclk0_pin &aic3204_reset>;
78
79                 reset-gpios = <&gpio 13 0>;
80
81                 iov-supply = <&udrc0_ldoin>;
82                 ldoin-supply = <&udrc0_ldoin>;
83             };
84
85             sc16is752: sc16is752@50 {
86                 compatible = "nxp,sc16is752";
87                 reg = <0x50>;
88                 clocks = <&sc16is752_clk>;
89                 interrupt-parent = <&gpio>;
90                 interrupts = <17 2>; /* IRQ_TYPE_EDGE_FALLING */
91
92                 pinctrl-names = "default";
93                 pinctrl-0 = <&sc16is752_irq>;
94             };
95
96             tla2024: tla2024@48 {
97                 compatible = "ti,ads1015";
98                 reg = <0x48>;
99                 #address-cells = <1>;
100                 #size-cells = <0>;
101                 #io-channel-cells = <1>;
102
103                 adc_ch4: channel@4 {
104                     reg = <4>;
105                     ti,gain = <1>;
106                     ti,datarate = <4>;
107                 };
108
109                 adc_ch5: channel@5 {
110                     reg = <5>;
111                     ti,gain = <1>;
112                     ti,datarate = <4>;
113                 };
114
115                 adc_ch6: channel@6 {
116                     reg = <6>;
117                     ti,gain = <2>;
118                     ti,datarate = <4>;
119                 };
120
121                 adc_ch7: channel@7 {
122                     reg = <7>;
123                     ti,gain = <2>;
124                     ti,datarate = <4>;
125                 };
126             };
127         };
128     };
129
130     fragment@3 {
131         target = <&sound>;
132         snd: __overlay__ {
133             compatible = "simple-audio-card";
134             i2s-controller = <&i2s>;
135             status = "okay";
136
137             simple-audio-card,name = "draws";
138             simple-audio-card,format = "i2s";
139
140             simple-audio-card,bitclock-master = <&dailink0_master>;
141             simple-audio-card,frame-master = <&dailink0_master>;
142
143             simple-audio-card,widgets =
144                 "Line", "Line In",
145                 "Line", "Line Out";
146
147             simple-audio-card,routing =
148                 "IN1_R", "Line In",
149                 "IN1_L", "Line In",
150                 "CM_L", "Line In",
151                 "CM_R", "Line In",
152                 "Line Out", "LOR",
153                 "Line Out", "LOL";
154
155             dailink0_master: simple-audio-card,cpu {
156                 sound-dai = <&i2s>;
157             };
158
159             simple-audio-card,codec {
160                 sound-dai = <&tlv320aic32x4>;
161             };
162         };
163     };
164
165     fragment@4 {
166         target = <&gpio>;
167         __overlay__ {
168             gpclk0_pin: gpclk0_pin {
169                 brcm,pins = <4>;
170                 brcm,function = <4>;
171             };
172
173             aic3204_reset: aic3204_reset {
174                 brcm,pins = <13>;
175                 brcm,function = <1>;
176                 brcm,pull = <1>;
177             };
178
179             aic3204_gpio: aic3204_gpio {
180                 brcm,pins = <26>;
181             };
182
183             sc16is752_irq: sc16is752_irq {
184                 brcm,pins = <17>;
185                 brcm,function = <0>;
186                 brcm,pull = <2>;
187             };
188
189             pps_pins: pps_pins {
190                 brcm,pins = <7>;
191                 brcm,function = <0>;
192                 brcm,pull = <0>;
193             };
194         };
195     };
196
197     __overrides__ {
198         draws_adc_ch4_gain = <&adc_ch4>,"ti,gain:0";
199         draws_adc_ch4_datarate = <&adc_ch4>,"ti,datarate:0";
200         draws_adc_ch5_gain = <&adc_ch5>,"ti,gain:0";
201         draws_adc_ch5_datarate = <&adc_ch5>,"ti,datarate:0";
202         draws_adc_ch6_gain = <&adc_ch6>,"ti,gain:0";
203         draws_adc_ch6_datarate = <&adc_ch6>,"ti,datarate:0";
204         draws_adc_ch7_gain = <&adc_ch7>,"ti,gain:0";
205         draws_adc_ch7_datarate = <&adc_ch7>,"ti,datarate:0";
206         alsaname = <&snd>, "simple-audio-card,name";
207     };
208 };