ath79: qca: convert to nvmem-layout
[openwrt/staging/hauke.git] / target / linux / ath79 / dts / qca9531_joyit_jt-or750i.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "qca953x.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "joyit,jt-or750i", "qca,qca9531";
10 model = "Joy-IT JT-OR750i";
11
12 aliases {
13 led-boot = &led_status_green;
14 led-failsafe = &led_status_red;
15 led-running = &led_status_green;
16 led-upgrade = &led_status_red;
17 label-mac-device = &eth0;
18 };
19
20 keys {
21 compatible = "gpio-keys";
22
23 reset {
24 label = "reset";
25 linux,code = <KEY_RESTART>;
26 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
27 };
28 };
29
30 leds {
31 compatible = "gpio-leds";
32
33 pinctrl-names = "default";
34 pinctrl-0 = <&jtag_disable_pins &pinmux_led_eth_pins>;
35
36 led_status_green: status_green {
37 label = "green:status";
38 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
39 default-state = "on";
40 };
41
42 led_status_red: status_red {
43 label = "red:status";
44 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
45 };
46 };
47 };
48
49 &pinmux {
50 pinmux_led_eth_pins: pinmux_led_eth_pins {
51 pinctrl-single,bits = \
52 /* GPIO 4: LED_LINK_5 (WAN) */ \
53 <0x04 0x0000002d 0x000000ff>, \
54 /* GPIO 14: LED_LINK_2 (LAN 3) */ \
55 /* GPIO 15: LED_LINK_3 (LAN 2) */ \
56 <0x0c 0x2b2a0000 0xffff0000>, \
57 /* GPIO 16: LED_LINK_4 (LAN 1) */ \
58 <0x10 0x0000002c 0x000000ff>;
59 };
60 };
61
62 &spi {
63 status = "okay";
64
65 flash@0 {
66 compatible = "jedec,spi-nor";
67 reg = <0>;
68 spi-max-frequency = <50000000>;
69
70 partitions {
71 compatible = "fixed-partitions";
72 #address-cells = <1>;
73 #size-cells = <1>;
74
75 partition@0 {
76 label = "u-boot";
77 reg = <0x0 0x40000>;
78 read-only;
79 };
80
81 partition@40000 {
82 label = "u-boot-env";
83 reg = <0x40000 0x10000>;
84 read-only;
85 };
86
87 partition@50000 {
88 label = "firmware";
89 reg = <0x50000 0xfa0000>;
90 compatible = "denx,uimage";
91 };
92
93 art: partition@ff0000 {
94 label = "art";
95 reg = <0xff0000 0x10000>;
96 read-only;
97
98 nvmem-layout {
99 compatible = "fixed-layout";
100 #address-cells = <1>;
101 #size-cells = <1>;
102
103 macaddr_art_0: macaddr@0 {
104 reg = <0x0 0x6>;
105 };
106
107 macaddr_art_6: macaddr@6 {
108 reg = <0x6 0x6>;
109 };
110 };
111 };
112 };
113 };
114 };
115
116 &eth0 {
117 status = "okay";
118
119 phy-handle = <&swphy4>;
120
121 nvmem-cells = <&macaddr_art_0>;
122 nvmem-cell-names = "mac-address";
123 };
124
125 &eth1 {
126 nvmem-cells = <&macaddr_art_6>;
127 nvmem-cell-names = "mac-address";
128 };
129
130 &pcie0 {
131 status = "okay";
132 };
133
134 &wmac {
135 status = "okay";
136
137 mtd-cal-data = <&art 0x1000>;
138 };