ramips: add support for Sercomm CPJ routers
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7628an_hiwifi_hc5x61a.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7628an.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "hiwifi,hc5x61a", "mediatek,mt7628an-soc";
10
11 aliases {
12 led-boot = &led_system;
13 led-failsafe = &led_system;
14 led-running = &led_system;
15 led-upgrade = &led_system;
16 };
17
18 chosen {
19 bootargs = "console=ttyS0,115200";
20 };
21
22 keys {
23 compatible = "gpio-keys";
24
25 reset {
26 label = "reset";
27 gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
28 linux,code = <KEY_RESTART>;
29 };
30 };
31 };
32
33 &spi0 {
34 status = "okay";
35
36 flash@0 {
37 compatible = "jedec,spi-nor";
38 reg = <0>;
39 spi-max-frequency = <80000000>;
40 m25p,fast-read;
41
42 partitions {
43 compatible = "fixed-partitions";
44 #address-cells = <1>;
45 #size-cells = <1>;
46
47 partition@0 {
48 label = "u-boot";
49 reg = <0x0 0x30000>;
50 read-only;
51 };
52
53 partition@30000 {
54 label = "hw_panic";
55 reg = <0x30000 0x10000>;
56 read-only;
57 };
58
59 factory: partition@40000 {
60 compatible = "nvmem-cells";
61 label = "factory";
62 reg = <0x40000 0x10000>;
63 #address-cells = <1>;
64 #size-cells = <1>;
65 read-only;
66
67 eeprom_factory_0: eeprom@0 {
68 reg = <0x0 0x400>;
69 };
70
71 eeprom_factory_8000: eeprom@8000 {
72 reg = <0x8000 0x200>;
73 };
74
75 macaddr_factory_4: macaddr@4 {
76 reg = <0x4 0x6>;
77 };
78
79 macaddr_factory_2e: macaddr@2e {
80 reg = <0x2e 0x6>;
81 };
82 };
83
84 partition@50000 {
85 compatible = "denx,uimage";
86 label = "firmware";
87 reg = <0x50000 0xf70000>;
88 };
89
90 partition@fc0000 {
91 label = "oem";
92 reg = <0xfc0000 0x20000>;
93 read-only;
94 };
95
96 bdinfo: partition@fe0000 {
97 label = "bdinfo";
98 reg = <0xfe0000 0x10000>;
99 read-only;
100 };
101
102 partition@ff0000 {
103 label = "backup";
104 reg = <0xff0000 0x10000>;
105 read-only;
106 };
107 };
108 };
109 };
110
111 &ethernet {
112 nvmem-cells = <&macaddr_factory_4>;
113 nvmem-cell-names = "mac-address";
114 };
115
116 &wmac {
117 status = "okay";
118
119 nvmem-cells = <&eeprom_factory_0>;
120 nvmem-cell-names = "eeprom";
121 };