ramips: cleanup SPI flash device tree properties usage
[openwrt/openwrt.git] / target / linux / ramips / dts / PSG1218.dts
1 /dts-v1/;
2
3 #include "mt7620a.dtsi"
4
5 #include <dt-bindings/input/input.h>
6
7 / {
8 compatible = "PSG1218", "ralink,mt7620a-soc";
9 model = "Phicomm PSG1218";
10
11 gpio-leds {
12 compatible = "gpio-leds";
13
14 blue {
15 label = "psg1218:blue:status";
16 gpios = <&gpio0 10 1>;
17 };
18
19 yellow {
20 label = "psg1218:yellow:status";
21 gpios = <&gpio0 11 1>;
22 };
23
24 red {
25 label = "psg1218:red:status";
26 gpios = <&gpio0 8 0>;
27 };
28 };
29
30 gpio-keys-polled {
31 compatible = "gpio-keys-polled";
32 #address-cells = <1>;
33 #size-cells = <0>;
34 poll-interval = <20>;
35
36 reset {
37 label = "reset";
38 gpios = <&gpio0 1 1>;
39 linux,code = <KEY_RESTART>;
40 };
41 };
42 };
43
44 &gpio0 {
45 status = "okay";
46 };
47
48 &spi0 {
49 status = "okay";
50
51 m25p80@0 {
52 #address-cells = <1>;
53 #size-cells = <1>;
54 compatible = "jedec,spi-nor";
55 reg = <0>;
56 spi-max-frequency = <10000000>;
57
58 partition@0 {
59 label = "u-boot";
60 reg = <0x0 0x30000>;
61 read-only;
62 };
63
64 partition@20000 {
65 label = "u-boot-env";
66 reg = <0x30000 0x10000>;
67 read-only;
68 };
69
70 factory: partition@30000 {
71 label = "factory";
72 reg = <0x40000 0x10000>;
73 read-only;
74 };
75
76 partition@40000 {
77 label = "firmware";
78 reg = <0x50000 0x7b0000>;
79 };
80 };
81 };
82
83 &pinctrl {
84 state_default: pinctrl0 {
85 gpio {
86 ralink,group = "i2c", "uartf", "rgmii1", "rgmii2", "ephy", "wled", "nd_sd";
87 ralink,function = "gpio";
88 };
89
90 pa {
91 ralink,group = "pa";
92 ralink,function = "pa";
93 };
94 };
95 };
96
97 &ethernet {
98 pinctrl-names = "default";
99 pinctrl-0 = <&ephy_pins>;
100 mtd-mac-address = <&factory 0x28>;
101 mediatek,portmap = "llllw";
102 };
103
104 &pcie {
105 status = "okay";
106
107 pcie-bridge {
108 mt76@0,0 {
109 reg = <0x0000 0 0 0 0>;
110 device_type = "pci";
111 mediatek,mtd-eeprom = <&factory 0x8000>;
112 mediatek,2ghz = <0>;
113 };
114 };
115 };
116
117 &wmac {
118 ralink,mtd-eeprom = <&factory 0>;
119 };