Merge tag 'v5.15.57' into rpi-5.15.y
[platform/kernel/linux-rpi.git] / arch / arm / boot / dts / overlays / audiosense-pi-overlay.dts
1 // Definitions for audiosense add on soundcard
2 /dts-v1/;
3 /plugin/;
4 #include <dt-bindings/pinctrl/bcm2835.h>
5 #include <dt-bindings/gpio/gpio.h>
6
7 / {
8         compatible = "brcm,bcm2835";
9
10         fragment@0 {
11                 target = <&i2s>;
12                 __overlay__ {
13                         status = "okay";
14                 };
15         };
16
17         fragment@1 {
18                 target-path = "/";
19                 __overlay__ {
20                         codec_reg_1v8: codec-reg-1v8 {
21                                 compatible = "regulator-fixed";
22                                 regulator-name = "tlv320aic3204_1v8";
23                                 regulator-min-microvolt = <1800000>;
24                                 regulator-max-microvolt = <1800000>;
25                                 regulator-always-on;
26                         };
27
28                         /* audio external oscillator */
29                         codec_osc: codec_osc {
30                                 compatible = "fixed-clock";
31                                 #clock-cells = <0>;
32                                 clock-frequency = <12000000>;   /* 12 MHz */
33                         };
34                 };
35         };
36
37         fragment@2 {
38                 target = <&gpio>;
39                 __overlay__ {
40                         codec_rst: codec-rst {
41                                 brcm,pins = <26>;
42                                 brcm,function = <BCM2835_FSEL_GPIO_OUT>;
43                         };
44                 };
45         };
46
47         fragment@3 {
48                 target = <&i2c1>;
49                 __overlay__ {
50                         #address-cells = <1>;
51                         #size-cells = <0>;
52                         status = "okay";
53
54                         codec: tlv320aic32x4@18 {
55                                 #sound-dai-cells = <0>;
56                                 compatible = "ti,tlv320aic32x4";
57                                 reg = <0x18>;
58
59                                 clocks = <&codec_osc>;
60                                 clock-names = "mclk";
61
62                                 iov-supply = <&vdd_3v3_reg>;
63                                 ldoin-supply = <&vdd_3v3_reg>;
64
65                                 gpio-controller;
66                                 #gpio-cells = <2>;
67                                 reset-gpios = <&gpio 26 GPIO_ACTIVE_HIGH>;
68
69                                 status = "okay";
70                         };
71                 };
72         };
73
74         fragment@4 {
75                 target = <&sound>;
76                 __overlay__ {
77                         compatible = "as,audiosense-pi";
78                         i2s-controller = <&i2s>;
79                         status = "okay";
80                 };
81         };
82 };