0216229c5eb641a9914c16dcddf80cc78218572e
[openwrt/staging/lynxis.git] / target / linux / ramips / dts / SK-WB8.dts
1 /dts-v1/;
2
3 #include "mt7621.dtsi"
4 #include <dt-bindings/input/input.h>
5 #include <dt-bindings/gpio/gpio.h>
6
7 / {
8 compatible = "samknows,whitebox-v8", "mediatek,mt7621-soc";
9 model = "SamKnows Whitebox 8";
10
11 aliases {
12 led-status = &led_wps;
13 };
14
15 memory@0 {
16 device_type = "memory";
17 reg = <0x0 0x8000000>;
18 };
19
20 chosen {
21 bootargs = "console=ttyS0,57600";
22 };
23
24 gpio-leds {
25 compatible = "gpio-leds";
26
27 led_wps: wps {
28 label = "sk-wb8:green:wps";
29 gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
30 };
31
32 usb {
33 label = "sk-wb8:green:usb";
34 gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
35 trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
36 linux,default-trigger = "usbport";
37 };
38 };
39
40 gpio-keys-polled {
41 compatible = "gpio-keys-polled";
42 poll-interval = <20>;
43 wps {
44 label = "wps";
45 gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
46 linux,code = <KEY_WPS_BUTTON>;
47 };
48 reset {
49 label = "reset";
50 gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
51 linux,code = <KEY_RESTART>;
52 };
53 };
54 };
55
56 &spi0 {
57 status = "okay";
58
59 m25p80@0 {
60 compatible = "jedec,spi-nor";
61 reg = <0>;
62 spi-max-frequency = <10000000>;
63 m25p,chunked-io = <32>;
64
65 partitions {
66 compatible = "fixed-partitions";
67 #address-cells = <1>;
68 #size-cells = <1>;
69
70 partition@0 {
71 label = "u-boot";
72 reg = <0x0 0x30000>;
73 read-only;
74 };
75
76 partition@30000 {
77 label = "u-boot-env";
78 reg = <0x30000 0x10000>;
79 };
80
81 factory: partition@40000 {
82 label = "factory";
83 reg = <0x40000 0x10000>;
84 read-only;
85 };
86
87 partition@50000 {
88 label = "firmware";
89 reg = <0x50000 0xfb0000>;
90 };
91 };
92 };
93 };
94
95 &pcie {
96 status = "okay";
97 };
98
99 &pcie0 {
100 mt76@0,0 {
101 reg = <0x0000 0 0 0 0>;
102 mediatek,mtd-eeprom = <&factory 0x8000>;
103 ieee80211-freq-limit = <5000000 6000000>;
104 };
105 };
106
107 &pcie1 {
108 mt76@0,0 {
109 reg = <0x0000 0 0 0 0>;
110 mediatek,mtd-eeprom = <&factory 0x0000>;
111 };
112 };
113
114 &ethernet {
115 mtd-mac-address = <&factory 0xe000>;
116 };
117
118 &pinctrl {
119 state_default: pinctrl0 {
120 gpio {
121 ralink,group = "i2c", "uart2", "uart3", "rgmii2", "sdhci";
122 ralink,function = "gpio";
123 };
124 };
125 };