ramips: add proper system clock and reset driver support for mt7621
[openwrt/openwrt.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 label = "factory";
61 reg = <0x3f0000 0x10000>;
62 read-only;
63 };
64 };
65 };
66 };
67
68 &ethernet {
69 nvmem-cells = <&macaddr_factory_4>;
70 nvmem-cell-names = "mac-address";
71
72 mediatek,portmap = "llllw";
73 };
74
75 &wmac {
76 ralink,mtd-eeprom = <&factory 0x0>;
77 };
78
79 &state_default {
80 default {
81 groups = "pa", "ephy", "wled";
82 function = "gpio";
83 };
84 };
85
86 &factory {
87 compatible = "nvmem-cells";
88 #address-cells = <1>;
89 #size-cells = <1>;
90
91 macaddr_factory_4: macaddr@4 {
92 reg = <0x4 0x6>;
93 };
94 };