Upstream refresh for v1.5.0-rc1 : Upstream 19.07 : 4fb6b8c553f692eeb5bcb203e0f8ee8df0...
[librecmc/librecmc.git] / target / linux / ath79 / dts / ar9342_iodata_etg3-r.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /dts-v1/;
3
4 #include <dt-bindings/gpio/gpio.h>
5 #include <dt-bindings/input/input.h>
6
7 #include "ar9344.dtsi"
8
9 / {
10         compatible = "iodata,etg3-r", "qca,ar9344";
11         model = "I-O DATA ETG3-R";
12
13         aliases {
14                 led-boot = &power;
15                 led-failsafe = &power;
16                 led-running = &power;
17                 led-upgrade = &power;
18         };
19
20         leds {
21                 compatible = "gpio-leds";
22
23                 power: power {
24                         label = "etg3-r:green:power";
25                         gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
26                         default-state = "on";
27                 };
28
29                 notification {
30                         label = "etg3-r:green:notification";
31                         gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
32                 };
33         };
34
35         keys {
36                 compatible = "gpio-keys-polled";
37                 poll-interval = <20>;
38
39                 reset {
40                         label = "reset";
41                         linux,code = <KEY_RESTART>;
42                         gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
43                         debounce-interval = <60>;
44                 };
45         };
46 };
47
48 &ref {
49         clock-frequency = <40000000>;
50 };
51
52 &spi {
53         num-cs = <1>;
54         status = "okay";
55
56         flash@0 {
57                 compatible = "jedec,spi-nor";
58                 reg = <0>;
59                 spi-max-frequency = <25000000>;
60
61                 partitions {
62                         compatible = "fixed-partitions";
63                         #address-cells = <1>;
64                         #size-cells = <1>;
65
66                         partition@0 {
67                                 label = "u-boot";
68                                 reg = <0x000000 0x040000>;
69                                 read-only;
70                         };
71
72                         partition@40000 {
73                                 label = "u-boot-env";
74                                 reg = <0x040000 0x010000>;
75                         };
76
77                         partition@50000 {
78                                 compatible = "denx,uimage";
79                                 label = "firmware";
80                                 reg = <0x050000 0x780000>;
81                         };
82
83                         partition@7d0000 {
84                                 label = "Config";
85                                 reg = <0x07d0000 0x10000>;
86                                 read-only;
87                         };
88
89                         partition@7e0000 {
90                                 label = "Rsv";
91                                 reg = <0x07e0000 0x10000>;
92                                 read-only;
93                         };
94
95                         partition@7f0000 {
96                                 label = "art";
97                                 reg = <0x7f0000 0x010000>;
98                                 read-only;
99                         };
100                 };
101         };
102 };
103
104 &mdio0 {
105         status = "okay";
106
107         phy0: ethernet-phy@0 {
108                 reg = <0>;
109                 phy-mode = "rgmii";
110
111                 qca,ar8327-initvals = <
112                         0x04 0x07600000 /* PORT0 PAD MODE CTRL */
113                         0x50 0xffb7ffb7 /* LED_CTRL0 */
114                         0x54 0xffb7ffb7 /* LED_CTRL1 */
115                         0x58 0xffb7ffb7 /* LED_CTRL2 */
116                         0x5c 0x03ffff00 /* LED_CTRL3 */
117                         0x7c 0x0000007e /* PORT0_STATUS */
118                 >;
119         };
120 };
121
122 &eth0 {
123         status = "okay";
124
125         pll-data = <0x0e000000 0x00000101 0x00001616>;
126
127         phy-mode = "rgmii";
128         phy-handle = <&phy0>;
129
130         gmac-config {
131                 device = <&gmac>;
132
133                 rgmii-gmac0 = <1>;
134                 rxd-delay = <3>;
135                 rxdv-delay = <3>;
136         };
137 };
138
139 &uart {
140         status = "okay";
141 };