c3ec73b681a25df6b087be044359d039b8c88297
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7620a_phicomm_psg1218.dtsi
1 #include "mt7620a.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "phicomm,psg1218", "ralink,mt7620a-soc";
8
9 aliases {
10 led-boot = &led_blue;
11 led-failsafe = &led_blue;
12 led-running = &led_blue;
13 led-upgrade = &led_blue;
14 };
15
16 keys {
17 compatible = "gpio-keys";
18
19 reset {
20 label = "reset";
21 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
22 linux,code = <KEY_RESTART>;
23 };
24 };
25
26 leds {
27 compatible = "gpio-leds";
28
29 led_blue: blue {
30 label = "blue:status";
31 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
32 default-state = "on";
33 };
34
35 yellow {
36 label = "yellow:status";
37 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
38 };
39
40 red {
41 label = "red:status";
42 gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
43 };
44 };
45 };
46
47 &spi0 {
48 status = "okay";
49
50 flash@0 {
51 compatible = "jedec,spi-nor";
52 reg = <0>;
53 spi-max-frequency = <10000000>;
54
55 partitions {
56 compatible = "fixed-partitions";
57 #address-cells = <1>;
58 #size-cells = <1>;
59
60 partition@0 {
61 label = "u-boot";
62 reg = <0x0 0x30000>;
63 read-only;
64 };
65
66 partition@20000 {
67 label = "u-boot-env";
68 reg = <0x30000 0x10000>;
69 read-only;
70 };
71
72 factory: partition@30000 {
73 label = "factory";
74 reg = <0x40000 0x10000>;
75 read-only;
76 };
77
78 partition@40000 {
79 compatible = "denx,uimage";
80 label = "firmware";
81 reg = <0x50000 0x7b0000>;
82 };
83 };
84 };
85 };
86
87 &state_default {
88 gpio {
89 groups = "i2c", "uartf";
90 function = "gpio";
91 };
92 };
93
94 &pcie {
95 status = "okay";
96 };
97
98 &pcie0 {
99 mt76@0,0 {
100 reg = <0x0000 0 0 0 0>;
101 mediatek,mtd-eeprom = <&factory 0x8000>;
102 ieee80211-freq-limit = <5000000 6000000>;
103 };
104 };
105
106 &wmac {
107 ralink,mtd-eeprom = <&factory 0x0>;
108 };