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