ARM: dts: iwg23s-sbc: Add HDMI support
[platform/kernel/linux-starfive.git] / arch / arm / boot / dts / r8a77470-iwg23s-sbc.dts
1 // SPDX-License-Identifier: GPL-2.0
2 /*
3  * Device Tree Source for the iWave-RZ/G1C single board computer
4  *
5  * Copyright (C) 2018 Renesas Electronics Corp.
6  */
7
8 /dts-v1/;
9 #include <dt-bindings/gpio/gpio.h>
10 #include "r8a77470.dtsi"
11 / {
12         model = "iWave iW-RainboW-G23S single board computer based on RZ/G1C";
13         compatible = "iwave,g23s", "renesas,r8a77470";
14
15         aliases {
16                 ethernet0 = &avb;
17                 serial1 = &scif1;
18         };
19
20         chosen {
21                 bootargs = "ignore_loglevel rw root=/dev/nfs ip=dhcp";
22                 stdout-path = "serial1:115200n8";
23         };
24
25         hdmi-out {
26                 compatible = "hdmi-connector";
27                 type = "a";
28
29                 port {
30                         hdmi_con: endpoint {
31                                 remote-endpoint = <&bridge_out>;
32                         };
33                 };
34         };
35
36         memory@40000000 {
37                 device_type = "memory";
38                 reg = <0 0x40000000 0 0x20000000>;
39         };
40
41         reg_1p8v: reg-1p8v {
42                 compatible = "regulator-fixed";
43                 regulator-name = "fixed-1.8V";
44                 regulator-min-microvolt = <1800000>;
45                 regulator-max-microvolt = <1800000>;
46                 regulator-boot-on;
47                 regulator-always-on;
48         };
49
50         reg_3p3v: reg-3p3v {
51                 compatible = "regulator-fixed";
52                 regulator-name = "fixed-3.3V";
53                 regulator-min-microvolt = <3300000>;
54                 regulator-max-microvolt = <3300000>;
55                 regulator-boot-on;
56                 regulator-always-on;
57         };
58
59         vccq_sdhi2: regulator-vccq-sdhi2 {
60                 compatible = "regulator-gpio";
61
62                 regulator-name = "SDHI2 VccQ";
63                 regulator-min-microvolt = <1800000>;
64                 regulator-max-microvolt = <3300000>;
65
66                 gpios = <&gpio2 24 GPIO_ACTIVE_LOW>;
67                 gpios-states = <1>;
68                 states = <3300000 1
69                           1800000 0>;
70         };
71 };
72
73 &avb {
74         pinctrl-0 = <&avb_pins>;
75         pinctrl-names = "default";
76
77         phy-handle = <&phy3>;
78         phy-mode = "gmii";
79         renesas,no-ether-link;
80         status = "okay";
81
82         phy3: ethernet-phy@3 {
83                 reg = <3>;
84                 interrupt-parent = <&gpio5>;
85                 interrupts = <16 IRQ_TYPE_LEVEL_LOW>;
86                 micrel,led-mode = <1>;
87         };
88 };
89
90 &cmt0 {
91         status = "okay";
92 };
93
94 &du {
95         pinctrl-0 = <&du0_pins>;
96         pinctrl-names = "default";
97
98         status = "okay";
99
100         ports {
101                 port@0 {
102                         endpoint {
103                                 remote-endpoint = <&bridge_in>;
104                         };
105                 };
106         };
107 };
108
109 &extal_clk {
110         clock-frequency = <20000000>;
111 };
112
113 &gpio2 {
114         interrupt-fixup {
115                 gpio-hog;
116                 gpios = <29 GPIO_ACTIVE_HIGH>;
117                 line-name = "hdmi-hpd-int";
118                 input;
119         };
120 };
121
122 &i2c3 {
123         pinctrl-0 = <&i2c3_pins>;
124         pinctrl-names = "default";
125
126         status = "okay";
127         clock-frequency = <400000>;
128
129         rtc@51 {
130                 compatible = "nxp,pcf85263";
131                 reg = <0x51>;
132         };
133 };
134
135 &i2c4 {
136         pinctrl-0 = <&i2c4_pins>;
137         pinctrl-names = "default";
138
139         status = "okay";
140         clock-frequency = <100000>;
141
142         hdmi@39 {
143                 compatible = "sil,sii9022";
144                 reg = <0x39>;
145                 interrupt-parent = <&gpio2>;
146                 interrupts = <29 IRQ_TYPE_LEVEL_LOW>;
147
148                 ports {
149                         #address-cells = <1>;
150                         #size-cells = <0>;
151
152                         port@0 {
153                                 reg = <0>;
154                                 bridge_in: endpoint {
155                                         remote-endpoint = <&du_out_rgb0>;
156                                 };
157                         };
158
159                         port@1 {
160                                 reg = <1>;
161                                 bridge_out: endpoint {
162                                         remote-endpoint = <&hdmi_con>;
163                                 };
164                         };
165                 };
166         };
167 };
168
169 &pfc {
170         avb_pins: avb {
171                 groups = "avb_mdio", "avb_gmii_tx_rx";
172                 function = "avb";
173         };
174
175         du0_pins: du0 {
176                 groups = "du0_rgb888", "du0_sync", "du0_disp", "du0_clk0_out";
177                 function = "du0";
178         };
179
180         i2c4_pins: i2c4 {
181                 groups = "i2c4_e";
182                 function = "i2c4";
183         };
184
185         i2c3_pins: i2c3 {
186                 groups = "i2c3_c";
187                 function = "i2c3";
188         };
189
190         mmc_pins_uhs: mmc_uhs {
191                 groups = "mmc_data8", "mmc_ctrl";
192                 function = "mmc";
193                 power-source = <1800>;
194         };
195
196         qspi0_pins: qspi0 {
197                 groups = "qspi0_ctrl", "qspi0_data2";
198                 function = "qspi0";
199         };
200
201         scif1_pins: scif1 {
202                 groups = "scif1_data_b";
203                 function = "scif1";
204         };
205
206         sdhi2_pins: sd2 {
207                 groups = "sdhi2_data4", "sdhi2_ctrl";
208                 function = "sdhi2";
209                 power-source = <3300>;
210         };
211
212         sdhi2_pins_uhs: sd2_uhs {
213                 groups = "sdhi2_data4", "sdhi2_ctrl";
214                 function = "sdhi2";
215                 power-source = <1800>;
216         };
217 };
218
219 &qspi0 {
220         pinctrl-0 = <&qspi0_pins>;
221         pinctrl-names = "default";
222
223         status = "okay";
224
225         /* WARNING - This device contains the bootloader. Handle with care. */
226         flash: flash@0 {
227                 #address-cells = <1>;
228                 #size-cells = <1>;
229                 compatible = "issi,is25lp016d", "jedec,spi-nor";
230                 reg = <0>;
231                 spi-max-frequency = <133000000>;
232                 spi-tx-bus-width = <1>;
233                 spi-rx-bus-width = <1>;
234                 m25p,fast-read;
235                 spi-cpol;
236                 spi-cpha;
237         };
238 };
239
240 &rwdt {
241         timeout-sec = <60>;
242         status = "okay";
243 };
244
245 &scif1 {
246         pinctrl-0 = <&scif1_pins>;
247         pinctrl-names = "default";
248
249         status = "okay";
250 };
251
252 &sdhi1 {
253         pinctrl-0 = <&mmc_pins_uhs>;
254         pinctrl-names = "state_uhs";
255
256         vmmc-supply = <&reg_3p3v>;
257         vqmmc-supply = <&reg_1p8v>;
258         bus-width = <8>;
259         mmc-hs200-1_8v;
260         non-removable;
261         fixed-emmc-driver-type = <1>;
262         status = "okay";
263 };
264
265 &sdhi2 {
266         pinctrl-0 = <&sdhi2_pins>;
267         pinctrl-1 = <&sdhi2_pins_uhs>;
268         pinctrl-names = "default", "state_uhs";
269
270         vmmc-supply = <&reg_3p3v>;
271         vqmmc-supply = <&vccq_sdhi2>;
272         bus-width = <4>;
273         cd-gpios = <&gpio4 20 GPIO_ACTIVE_LOW>;
274         sd-uhs-sdr50;
275         status = "okay";
276 };