7cbd205acc5e9ffa2e512a19ab68748bc73a1aec
[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 };
36 };
37
38 gpio-keys-polled {
39 compatible = "gpio-keys-polled";
40 poll-interval = <20>;
41 wps {
42 label = "wps";
43 gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
44 linux,code = <KEY_WPS_BUTTON>;
45 };
46 reset {
47 label = "reset";
48 gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
49 linux,code = <KEY_RESTART>;
50 };
51 };
52 };
53
54 &spi0 {
55 status = "okay";
56
57 m25p80@0 {
58 compatible = "jedec,spi-nor";
59 reg = <0>;
60 spi-max-frequency = <10000000>;
61 m25p,chunked-io = <32>;
62
63 partitions {
64 compatible = "fixed-partitions";
65 #address-cells = <1>;
66 #size-cells = <1>;
67
68 partition@0 {
69 label = "u-boot";
70 reg = <0x0 0x30000>;
71 read-only;
72 };
73
74 partition@30000 {
75 label = "u-boot-env";
76 reg = <0x30000 0x10000>;
77 };
78
79 factory: partition@40000 {
80 label = "factory";
81 reg = <0x40000 0x10000>;
82 read-only;
83 };
84
85 partition@50000 {
86 label = "firmware";
87 reg = <0x50000 0xfb0000>;
88 };
89 };
90 };
91 };
92
93 &pcie {
94 status = "okay";
95 };
96
97 &pcie0 {
98 mt76@0,0 {
99 reg = <0x0000 0 0 0 0>;
100 mediatek,mtd-eeprom = <&factory 0x8000>;
101 ieee80211-freq-limit = <5000000 6000000>;
102 };
103 };
104
105 &pcie1 {
106 mt76@0,0 {
107 reg = <0x0000 0 0 0 0>;
108 mediatek,mtd-eeprom = <&factory 0x0000>;
109 };
110 };
111
112 &ethernet {
113 mtd-mac-address = <&factory 0xe000>;
114 };
115
116 &pinctrl {
117 state_default: pinctrl0 {
118 gpio {
119 ralink,group = "i2c", "uart2", "uart3", "rgmii2", "sdhci";
120 ralink,function = "gpio";
121 };
122 };
123 };