GNU Linux-libre 6.1.90-gnu
[releases.git] / arch / arm64 / boot / dts / renesas / r8a779g0-white-hawk-cpu.dtsi
1 // SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2 /*
3  * Device Tree Source for the White Hawk CPU board
4  *
5  * Copyright (C) 2022 Renesas Electronics Corp.
6  */
7
8 #include "r8a779g0.dtsi"
9
10 #include <dt-bindings/gpio/gpio.h>
11 #include <dt-bindings/input/input.h>
12 #include <dt-bindings/leds/common.h>
13
14 / {
15         model = "Renesas White Hawk CPU board";
16         compatible = "renesas,white-hawk-cpu", "renesas,r8a779g0";
17
18         aliases {
19                 ethernet0 = &avb0;
20                 serial0 = &hscif0;
21         };
22
23         chosen {
24                 bootargs = "ignore_loglevel rw root=/dev/nfs ip=on";
25                 stdout-path = "serial0:921600n8";
26         };
27
28         keys {
29                 compatible = "gpio-keys";
30
31                 pinctrl-0 = <&keys_pins>;
32                 pinctrl-names = "default";
33
34                 key-1 {
35                         gpios = <&gpio5 0 GPIO_ACTIVE_LOW>;
36                         linux,code = <KEY_1>;
37                         label = "SW47";
38                         wakeup-source;
39                         debounce-interval = <20>;
40                 };
41
42                 key-2 {
43                         gpios = <&gpio5 1 GPIO_ACTIVE_LOW>;
44                         linux,code = <KEY_2>;
45                         label = "SW48";
46                         wakeup-source;
47                         debounce-interval = <20>;
48                 };
49
50                 key-3 {
51                         gpios = <&gpio5 2 GPIO_ACTIVE_LOW>;
52                         linux,code = <KEY_3>;
53                         label = "SW49";
54                         wakeup-source;
55                         debounce-interval = <20>;
56                 };
57         };
58
59         leds {
60                 compatible = "gpio-leds";
61
62                 led-1 {
63                         gpios = <&gpio7 0 GPIO_ACTIVE_HIGH>;
64                         color = <LED_COLOR_ID_GREEN>;
65                         function = LED_FUNCTION_INDICATOR;
66                         function-enumerator = <1>;
67                 };
68
69                 led-2 {
70                         gpios = <&gpio7 1 GPIO_ACTIVE_HIGH>;
71                         color = <LED_COLOR_ID_GREEN>;
72                         function = LED_FUNCTION_INDICATOR;
73                         function-enumerator = <2>;
74                 };
75
76                 led-3 {
77                         gpios = <&gpio7 2 GPIO_ACTIVE_HIGH>;
78                         color = <LED_COLOR_ID_GREEN>;
79                         function = LED_FUNCTION_INDICATOR;
80                         function-enumerator = <3>;
81                 };
82         };
83
84         memory@48000000 {
85                 device_type = "memory";
86                 /* first 128MB is reserved for secure area. */
87                 reg = <0x0 0x48000000 0x0 0x78000000>;
88         };
89
90         memory@480000000 {
91                 device_type = "memory";
92                 reg = <0x4 0x80000000 0x0 0x80000000>;
93         };
94
95         memory@600000000 {
96                 device_type = "memory";
97                 reg = <0x6 0x00000000 0x1 0x00000000>;
98         };
99 };
100
101 &avb0 {
102         pinctrl-0 = <&avb0_pins>;
103         pinctrl-names = "default";
104         phy-handle = <&phy0>;
105         tx-internal-delay-ps = <2000>;
106         status = "okay";
107
108         phy0: ethernet-phy@0 {
109                 compatible = "ethernet-phy-id0022.1622",
110                              "ethernet-phy-ieee802.3-c22";
111                 rxc-skew-ps = <1500>;
112                 reg = <0>;
113                 interrupt-parent = <&gpio7>;
114                 interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
115                 reset-gpios = <&gpio7 10 GPIO_ACTIVE_LOW>;
116         };
117 };
118
119 &extal_clk {
120         clock-frequency = <16666666>;
121 };
122
123 &extalr_clk {
124         clock-frequency = <32768>;
125 };
126
127 &hscif0 {
128         pinctrl-0 = <&hscif0_pins>;
129         pinctrl-names = "default";
130
131         status = "okay";
132 };
133
134 &i2c0 {
135         pinctrl-0 = <&i2c0_pins>;
136         pinctrl-names = "default";
137
138         status = "okay";
139         clock-frequency = <400000>;
140
141         eeprom@50 {
142                 compatible = "rohm,br24g01", "atmel,24c01";
143                 label = "cpu-board";
144                 reg = <0x50>;
145                 pagesize = <8>;
146         };
147 };
148
149 &pfc {
150         pinctrl-0 = <&scif_clk_pins>;
151         pinctrl-names = "default";
152
153         avb0_pins: avb0 {
154                 mux {
155                         groups = "avb0_link", "avb0_mdio", "avb0_rgmii",
156                                  "avb0_txcrefclk";
157                         function = "avb0";
158                 };
159
160                 pins_mdio {
161                         groups = "avb0_mdio";
162                         drive-strength = <21>;
163                 };
164
165                 pins_mii {
166                         groups = "avb0_rgmii";
167                         drive-strength = <21>;
168                 };
169
170         };
171         hscif0_pins: hscif0 {
172                 groups = "hscif0_data";
173                 function = "hscif0";
174         };
175
176         i2c0_pins: i2c0 {
177                 groups = "i2c0";
178                 function = "i2c0";
179         };
180
181         keys_pins: keys {
182                 pins = "GP_5_0", "GP_5_1", "GP_5_2";
183                 bias-pull-up;
184         };
185
186         scif_clk_pins: scif_clk {
187                 groups = "scif_clk";
188                 function = "scif_clk";
189         };
190 };
191
192 &scif_clk {
193         clock-frequency = <24000000>;
194 };
195
196 &rwdt {
197         timeout-sec = <60>;
198         status = "okay";
199 };