ath79: ar: convert to nvmem-layout
[openwrt/staging/hauke.git] / target / linux / ath79 / dts / ar9331_glinet_gl-usb150.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "ar9331.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "glinet,gl-usb150", "qca,ar9331";
10 model = "GL.iNet GL-USB150";
11
12 aliases {
13 led-boot = &led_power;
14 led-failsafe = &led_power;
15 led-running = &led_power;
16 led-upgrade = &led_power;
17 label-mac-device = &eth0;
18 };
19
20 leds {
21 compatible = "gpio-leds";
22
23 wlan {
24 label = "green:wlan";
25 gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
26 linux,default-trigger = "phy0tpt";
27 };
28
29 led_power: power {
30 label = "green:power";
31 gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
32 default-state = "on";
33 };
34 };
35
36 keys {
37 compatible = "gpio-keys";
38
39 reset {
40 label = "reset";
41 linux,code = <KEY_RESTART>;
42 gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
43 debounce-interval = <60>;
44 };
45 };
46
47 gpio-export {
48 compatible = "gpio-export";
49
50 gpio_lan_reset {
51 gpio-export,name = "lan:reset";
52 gpio-export,output = <0>;
53 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
54 };
55 };
56 };
57
58 &eth0 {
59 status = "okay";
60
61 nvmem-cells = <&macaddr_art_0>;
62 nvmem-cell-names = "mac-address";
63
64 gmac-config {
65 device = <&gmac>;
66 switch-phy-addr-swap = <0>;
67 switch-phy-swap = <0>;
68 };
69 };
70
71 &eth1 {
72 status = "okay";
73
74 compatible = "syscon", "simple-mfd";
75 };
76
77 &spi {
78 status = "okay";
79
80 flash@0 {
81 compatible = "jedec,spi-nor";
82 spi-max-frequency = <33000000>;
83 reg = <0>;
84
85 partitions {
86 compatible = "fixed-partitions";
87 #address-cells = <1>;
88 #size-cells = <1>;
89
90 partition@0 {
91 label = "u-boot";
92 reg = <0x000000 0x040000>;
93 read-only;
94 };
95
96 partition@40000 {
97 label = "u-boot-env";
98 reg = <0x040000 0x010000>;
99 };
100
101 partition@50000 {
102 compatible = "denx,uimage";
103 label = "firmware";
104 reg = <0x050000 0xfa0000>;
105 };
106
107 art: partition@ff0000 {
108 label = "art";
109 reg = <0xff0000 0x010000>;
110 read-only;
111
112 nvmem-layout {
113 compatible = "fixed-layout";
114 #address-cells = <1>;
115 #size-cells = <1>;
116
117 macaddr_art_0: macaddr@0 {
118 reg = <0x0 0x6>;
119 };
120 };
121 };
122 };
123 };
124 };
125
126 &wmac {
127 status = "okay";
128
129 mtd-cal-data = <&art 0x1000>;
130 };