Merge tag 'v5.15.57' into rpi-5.15.y
[platform/kernel/linux-rpi.git] / arch / arm / boot / dts / overlays / udrc-overlay.dts
1 #include <dt-bindings/clock/bcm2835.h>
2 /*
3  * Device tree overlay for the Universal Digital Radio Controller
4  */
5
6 /dts-v1/;
7 /plugin/;
8
9 / {
10     compatible = "brcm,bcm2835";
11     fragment@0 {
12         target = <&i2s>;
13         __overlay__ {
14             clocks = <&clocks BCM2835_CLOCK_PCM>;
15             clock-names = "pcm";
16             status = "okay";
17         };
18     };
19
20     fragment@1 {
21         target-path = "/";
22         __overlay__ {
23             regulators {
24                 compatible = "simple-bus";
25                 #address-cells = <1>;
26                 #size-cells = <0>;
27
28                 udrc0_ldoin: udrc0_ldoin {
29                     compatible = "regulator-fixed";
30                     regulator-name = "ldoin";
31                     regulator-min-microvolt = <3300000>;
32                     regulator-max-microvolt = <3300000>;
33                     regulator-always-on;
34                 };
35             };
36         };
37     };
38
39     fragment@2 {
40         target = <&i2c1>;
41         __overlay__ {
42             #address-cells = <1>;
43             #size-cells = <0>;
44             status = "okay";
45             clocks = <&clocks BCM2835_CLOCK_VPU>;
46             clock-frequency = <400000>;
47
48             tlv320aic32x4: tlv320aic32x4@18 {
49                 compatible = "ti,tlv320aic32x4";
50                 #sound-dai-cells = <0>;
51                 reg = <0x18>;
52                 status = "okay";
53
54                 clocks = <&clocks BCM2835_CLOCK_GP0>;
55                 clock-names = "mclk";
56                 assigned-clocks = <&clocks BCM2835_CLOCK_GP0>;
57                 assigned-clock-rates = <25000000>;
58
59                 pinctrl-names = "default";
60                 pinctrl-0 = <&gpclk0_pin &aic3204_reset>;
61
62                 reset-gpios = <&gpio 13 0>;
63
64                 iov-supply = <&udrc0_ldoin>;
65                 ldoin-supply = <&udrc0_ldoin>;
66             };
67         };
68     };
69
70     fragment@3 {
71         target = <&sound>;
72         snd: __overlay__ {
73             compatible = "simple-audio-card";
74             i2s-controller = <&i2s>;
75             status = "okay";
76
77             simple-audio-card,name = "udrc";
78             simple-audio-card,format = "i2s";
79
80             simple-audio-card,bitclock-master = <&dailink0_master>;
81             simple-audio-card,frame-master = <&dailink0_master>;
82
83             simple-audio-card,widgets =
84                 "Line", "Line In",
85                 "Line", "Line Out";
86
87             simple-audio-card,routing =
88                 "IN1_R", "Line In",
89                 "IN1_L", "Line In",
90                 "CM_L", "Line In",
91                 "CM_R", "Line In",
92                 "Line Out", "LOR",
93                 "Line Out", "LOL";
94
95             dailink0_master: simple-audio-card,cpu {
96                 sound-dai = <&i2s>;
97             };
98
99             simple-audio-card,codec {
100                 sound-dai = <&tlv320aic32x4>;
101             };
102         };
103     };
104
105     fragment@4 {
106         target = <&gpio>;
107         __overlay__ {
108             gpclk0_pin: gpclk0_pin {
109                 brcm,pins = <4>;
110                 brcm,function = <4>;
111             };
112
113             aic3204_reset: aic3204_reset {
114                 brcm,pins = <13>;
115                 brcm,function = <1>;
116                 brcm,pull = <1>;
117             };
118
119             aic3204_gpio: aic3204_gpio {
120                 brcm,pins = <26>;
121             };
122         };
123     };
124
125     __overrides__ {
126         alsaname = <&snd>, "simple-audio-card,name";
127     };
128 };