ce14ec3e01e69ef3183e44c23c46d35f2b905c7b
[openwrt/staging/hauke.git] / target / linux / ramips / dts / mt7620n_netgear_n300.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7620n.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 keys {
10 compatible = "gpio-keys";
11
12 reset {
13 label = "reset";
14 gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
15 linux,code = <KEY_RESTART>;
16 };
17 };
18 };
19
20 &gpio2 {
21 status = "okay";
22 };
23
24 &gpio3 {
25 status = "okay";
26 };
27
28 &spi0 {
29 status = "okay";
30
31 flash@0 {
32 compatible = "jedec,spi-nor";
33 reg = <0>;
34 spi-max-frequency = <30000000>;
35
36 partitions {
37 compatible = "fixed-partitions";
38 #address-cells = <1>;
39 #size-cells = <1>;
40
41 partition@0 {
42 label = "u-boot";
43 reg = <0x0 0x20000>;
44 read-only;
45 };
46
47 partition@20000 {
48 compatible = "denx,uimage";
49 label = "firmware";
50 reg = <0x20000 0x3c0000>;
51 };
52
53 partition@3e0000 {
54 label = "nvram";
55 reg = <0x3e0000 0x10000>;
56 read-only;
57 };
58
59 factory: partition@3f0000 {
60 compatible = "nvmem-cells";
61 label = "factory";
62 reg = <0x3f0000 0x10000>;
63 #address-cells = <1>;
64 #size-cells = <1>;
65 read-only;
66
67 eeprom_factory_0: eeprom@0 {
68 reg = <0x0 0x200>;
69 };
70
71 macaddr_factory_4: macaddr@4 {
72 reg = <0x4 0x6>;
73 };
74 };
75 };
76 };
77 };
78
79 &ethernet {
80 nvmem-cells = <&macaddr_factory_4>;
81 nvmem-cell-names = "mac-address";
82
83 mediatek,portmap = "llllw";
84 };
85
86 &wmac {
87 nvmem-cells = <&eeprom_factory_0>;
88 nvmem-cell-names = "eeprom";
89 };
90
91 &state_default {
92 default {
93 groups = "pa", "ephy", "wled";
94 function = "gpio";
95 };
96 };