Merge tag 'v5.15.57' into rpi-5.15.y
[platform/kernel/linux-rpi.git] / arch / arm / boot / dts / bcm2710-rpi-2-b.dts
1 /dts-v1/;
2
3 #include "bcm2710.dtsi"
4 #include "bcm2709-rpi.dtsi"
5 #include "bcm283x-rpi-smsc9514.dtsi"
6 #include "bcm283x-rpi-csi1-2lane.dtsi"
7 #include "bcm283x-rpi-i2c0mux_0_28.dtsi"
8
9 / {
10         compatible = "raspberrypi,2-model-b-rev2", "brcm,bcm2837";
11         model = "Raspberry Pi 2 Model B rev 1.2";
12 };
13
14 &gpio {
15         /*
16          * Taken from rpi_SCH_2b_1p2_reduced.pdf and
17          * the official GPU firmware DT blob.
18          *
19          * Legend:
20          * "NC" = not connected (no rail from the SoC)
21          * "FOO" = GPIO line named "FOO" on the schematic
22          * "FOO_N" = GPIO line named "FOO" on schematic, active low
23          */
24         gpio-line-names = "ID_SDA",
25                           "ID_SCL",
26                           "SDA1",
27                           "SCL1",
28                           "GPIO_GCLK",
29                           "GPIO5",
30                           "GPIO6",
31                           "SPI_CE1_N",
32                           "SPI_CE0_N",
33                           "SPI_MISO",
34                           "SPI_MOSI",
35                           "SPI_SCLK",
36                           "GPIO12",
37                           "GPIO13",
38                           /* Serial port */
39                           "TXD0",
40                           "RXD0",
41                           "GPIO16",
42                           "GPIO17",
43                           "GPIO18",
44                           "GPIO19",
45                           "GPIO20",
46                           "GPIO21",
47                           "GPIO22",
48                           "GPIO23",
49                           "GPIO24",
50                           "GPIO25",
51                           "GPIO26",
52                           "GPIO27",
53                           "SDA0",
54                           "SCL0",
55                           "NC", /* GPIO30 */
56                           "LAN_RUN",
57                           "CAM_GPIO1",
58                           "NC", /* GPIO33 */
59                           "NC", /* GPIO34 */
60                           "PWR_LOW_N",
61                           "NC", /* GPIO36 */
62                           "NC", /* GPIO37 */
63                           "USB_LIMIT",
64                           "NC", /* GPIO39 */
65                           "PWM0_OUT",
66                           "CAM_GPIO0",
67                           "SMPS_SCL",
68                           "SMPS_SDA",
69                           "ETH_CLK",
70                           "PWM1_OUT",
71                           "HDMI_HPD_N",
72                           "STATUS_LED",
73                           /* Used by SD Card */
74                           "SD_CLK_R",
75                           "SD_CMD_R",
76                           "SD_DATA0_R",
77                           "SD_DATA1_R",
78                           "SD_DATA2_R",
79                           "SD_DATA3_R";
80
81         spi0_pins: spi0_pins {
82                 brcm,pins = <9 10 11>;
83                 brcm,function = <4>; /* alt0 */
84         };
85
86         spi0_cs_pins: spi0_cs_pins {
87                 brcm,pins = <8 7>;
88                 brcm,function = <1>; /* output */
89         };
90
91         i2c0_pins: i2c0 {
92                 brcm,pins = <0 1>;
93                 brcm,function = <4>;
94         };
95
96         i2c1_pins: i2c1 {
97                 brcm,pins = <2 3>;
98                 brcm,function = <4>;
99         };
100
101         i2s_pins: i2s {
102                 brcm,pins = <18 19 20 21>;
103                 brcm,function = <4>; /* alt0 */
104         };
105
106         audio_pins: audio_pins {
107                 brcm,pins = <40 45>;
108                 brcm,function = <4>;
109         };
110 };
111
112 &uart0 {
113         status = "okay";
114 };
115
116 &spi0 {
117         pinctrl-names = "default";
118         pinctrl-0 = <&spi0_pins &spi0_cs_pins>;
119         cs-gpios = <&gpio 8 1>, <&gpio 7 1>;
120
121         spidev0: spidev@0{
122                 compatible = "spidev";
123                 reg = <0>;      /* CE0 */
124                 #address-cells = <1>;
125                 #size-cells = <0>;
126                 spi-max-frequency = <125000000>;
127         };
128
129         spidev1: spidev@1{
130                 compatible = "spidev";
131                 reg = <1>;      /* CE1 */
132                 #address-cells = <1>;
133                 #size-cells = <0>;
134                 spi-max-frequency = <125000000>;
135         };
136 };
137
138 &i2c0if {
139         clock-frequency = <100000>;
140 };
141
142 &i2c1 {
143         pinctrl-names = "default";
144         pinctrl-0 = <&i2c1_pins>;
145         clock-frequency = <100000>;
146 };
147
148 &i2c2 {
149         clock-frequency = <100000>;
150 };
151
152 &i2s {
153         pinctrl-names = "default";
154         pinctrl-0 = <&i2s_pins>;
155 };
156
157 &leds {
158         act_led: led-act {
159                 label = "led0";
160                 linux,default-trigger = "mmc0";
161                 gpios = <&gpio 47 0>;
162         };
163
164         pwr_led: led-pwr {
165                 label = "led1";
166                 linux,default-trigger = "input";
167                 gpios = <&gpio 35 0>;
168         };
169 };
170
171 &hdmi {
172         hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
173 };
174
175 &audio {
176         pinctrl-names = "default";
177         pinctrl-0 = <&audio_pins>;
178 };
179
180 &cam1_reg {
181         gpio = <&gpio 41 GPIO_ACTIVE_HIGH>;
182 };
183
184 cam0_reg: &cam_dummy_reg {
185 };
186
187 / {
188         __overrides__ {
189                 act_led_gpio = <&act_led>,"gpios:4";
190                 act_led_activelow = <&act_led>,"gpios:8";
191                 act_led_trigger = <&act_led>,"linux,default-trigger";
192
193                 pwr_led_gpio = <&pwr_led>,"gpios:4";
194                 pwr_led_activelow = <&pwr_led>,"gpios:8";
195                 pwr_led_trigger = <&pwr_led>,"linux,default-trigger";
196         };
197 };