GNU Linux-libre 4.14.290-gnu1
[releases.git] / arch / arc / boot / dts / hsdk.dts
1 /*
2  * Copyright (C) 2017 Synopsys, Inc. (www.synopsys.com)
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation.
7  */
8
9 /*
10  * Device Tree for ARC HS Development Kit
11  */
12 /dts-v1/;
13
14 #include <dt-bindings/net/ti-dp83867.h>
15 #include <dt-bindings/reset/snps,hsdk-reset.h>
16
17 / {
18         model = "snps,hsdk";
19         compatible = "snps,hsdk";
20
21         #address-cells = <1>;
22         #size-cells = <1>;
23
24         chosen {
25                 bootargs = "earlycon=uart8250,mmio32,0xf0005000,115200n8 console=ttyS0,115200n8 debug print-fatal-signals=1";
26         };
27
28         cpus {
29                 #address-cells = <1>;
30                 #size-cells = <0>;
31
32                 cpu@0 {
33                         device_type = "cpu";
34                         compatible = "snps,archs38";
35                         reg = <0>;
36                         clocks = <&core_clk>;
37                 };
38
39                 cpu@1 {
40                         device_type = "cpu";
41                         compatible = "snps,archs38";
42                         reg = <1>;
43                         clocks = <&core_clk>;
44                 };
45
46                 cpu@2 {
47                         device_type = "cpu";
48                         compatible = "snps,archs38";
49                         reg = <2>;
50                         clocks = <&core_clk>;
51                 };
52
53                 cpu@3 {
54                         device_type = "cpu";
55                         compatible = "snps,archs38";
56                         reg = <3>;
57                         clocks = <&core_clk>;
58                 };
59         };
60
61         input_clk: input-clk {
62                 #clock-cells = <0>;
63                 compatible = "fixed-clock";
64                 clock-frequency = <33333333>;
65         };
66
67         cpu_intc: cpu-interrupt-controller {
68                 compatible = "snps,archs-intc";
69                 interrupt-controller;
70                 #interrupt-cells = <1>;
71         };
72
73         idu_intc: idu-interrupt-controller {
74                 compatible = "snps,archs-idu-intc";
75                 interrupt-controller;
76                 #interrupt-cells = <1>;
77                 interrupt-parent = <&cpu_intc>;
78         };
79
80         arcpct: pct {
81                 compatible = "snps,archs-pct";
82                 interrupt-parent = <&cpu_intc>;
83                 interrupts = <20>;
84         };
85
86         /* TIMER0 with interrupt for clockevent */
87         timer {
88                 compatible = "snps,arc-timer";
89                 interrupts = <16>;
90                 interrupt-parent = <&cpu_intc>;
91                 clocks = <&core_clk>;
92         };
93
94         /* 64-bit Global Free Running Counter */
95         gfrc {
96                 compatible = "snps,archs-timer-gfrc";
97                 clocks = <&core_clk>;
98         };
99
100         soc {
101                 compatible = "simple-bus";
102                 #address-cells = <1>;
103                 #size-cells = <1>;
104                 interrupt-parent = <&idu_intc>;
105
106                 ranges = <0x00000000 0xf0000000 0x10000000>;
107
108                 cgu_rst: reset-controller@8a0 {
109                         compatible = "snps,hsdk-reset";
110                         #reset-cells = <1>;
111                         reg = <0x8A0 0x4>, <0xFF0 0x4>;
112                 };
113
114                 core_clk: core-clk@0 {
115                         compatible = "snps,hsdk-core-pll-clock";
116                         reg = <0x00 0x10>, <0x14B8 0x4>;
117                         #clock-cells = <0>;
118                         clocks = <&input_clk>;
119                 };
120
121                 serial: serial@5000 {
122                         compatible = "snps,dw-apb-uart";
123                         reg = <0x5000 0x100>;
124                         clock-frequency = <33330000>;
125                         interrupts = <6>;
126                         baud = <115200>;
127                         reg-shift = <2>;
128                         reg-io-width = <4>;
129                 };
130
131                 gmacclk: gmacclk {
132                         compatible = "fixed-clock";
133                         clock-frequency = <400000000>;
134                         #clock-cells = <0>;
135                 };
136
137                 mmcclk_ciu: mmcclk-ciu {
138                         compatible = "fixed-clock";
139                         /*
140                          * DW sdio controller has external ciu clock divider
141                          * controlled via register in SDIO IP. Due to its
142                          * unexpected default value (it should divide by 1
143                          * but it divides by 8) SDIO IP uses wrong clock and
144                          * works unstable (see STAR 9001204800)
145                          * We switched to the minimum possible value of the
146                          * divisor (div-by-2) in HSDK platform code.
147                          * So add temporary fix and change clock frequency
148                          * to 50000000 Hz until we fix dw sdio driver itself.
149                          */
150                         clock-frequency = <50000000>;
151                         #clock-cells = <0>;
152                 };
153
154                 mmcclk_biu: mmcclk-biu {
155                         compatible = "fixed-clock";
156                         clock-frequency = <400000000>;
157                         #clock-cells = <0>;
158                 };
159
160                 ethernet@8000 {
161                         #interrupt-cells = <1>;
162                         compatible = "snps,dwmac";
163                         reg = <0x8000 0x2000>;
164                         interrupts = <10>;
165                         interrupt-names = "macirq";
166                         phy-mode = "rgmii-id";
167                         snps,pbl = <32>;
168                         snps,multicast-filter-bins = <256>;
169                         clocks = <&gmacclk>;
170                         clock-names = "stmmaceth";
171                         phy-handle = <&phy0>;
172                         resets = <&cgu_rst HSDK_ETH_RESET>;
173                         reset-names = "stmmaceth";
174
175                         tx-fifo-depth = <4096>;
176                         rx-fifo-depth = <4096>;
177
178                         mdio {
179                                 #address-cells = <1>;
180                                 #size-cells = <0>;
181                                 compatible = "snps,dwmac-mdio";
182                                 phy0: ethernet-phy@0 { /* Micrel KSZ9031 */
183                                         reg = <0>;
184                                         ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
185                                         ti,tx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
186                                         ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
187                                 };
188                         };
189                 };
190
191                 ohci@60000 {
192                         compatible = "snps,hsdk-v1.0-ohci", "generic-ohci";
193                         reg = <0x60000 0x100>;
194                         interrupts = <15>;
195                 };
196
197                 ehci@40000 {
198                         compatible = "snps,hsdk-v1.0-ehci", "generic-ehci";
199                         reg = <0x40000 0x100>;
200                         interrupts = <15>;
201                 };
202
203                 mmc@a000 {
204                         compatible = "altr,socfpga-dw-mshc";
205                         reg = <0xa000 0x400>;
206                         num-slots = <1>;
207                         fifo-depth = <16>;
208                         card-detect-delay = <200>;
209                         clocks = <&mmcclk_biu>, <&mmcclk_ciu>;
210                         clock-names = "biu", "ciu";
211                         interrupts = <12>;
212                         bus-width = <4>;
213                 };
214         };
215
216         memory@80000000 {
217                 #address-cells = <1>;
218                 #size-cells = <1>;
219                 device_type = "memory";
220                 reg = <0x80000000 0x40000000>;  /* 1 GiB */
221         };
222 };