Fresh pull from upstream
[librecmc/librecmc.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         model = "SamKnows Whitebox 8";
9
10         memory@0 {
11                 device_type = "memory";
12                 reg = <0x0 0x8000000>;
13         };
14
15         chosen {
16                 bootargs = "console=ttyS0,57600";
17         };
18
19         gpio-leds {
20                 compatible = "gpio-leds";
21
22                 wps {
23                         label = "sk-wb8:green:wps";
24                         gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
25                 };
26
27                 usb {
28                         label = "sk-wb8:green:usb";
29                         gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
30                 };
31         };
32
33         gpio-keys-polled {
34                 compatible = "gpio-keys-polled";
35                 #address-cells = <1>;
36                 #size-cells = <0>;
37                 poll-interval = <20>;
38                 wps {
39                         label = "wps";
40                         gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
41                         linux,code = <KEY_WPS_BUTTON>;
42                 };
43                 reset {
44                         label = "reset";
45                         gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
46                         linux,code = <KEY_RESTART>;
47                 };
48         };
49 };
50
51 &spi0 {
52         status = "okay";
53
54         m25p80@0 {
55                 #address-cells = <1>;
56                 #size-cells = <1>;
57                 compatible = "jedec,spi-nor";
58                 reg = <0>;
59                 spi-max-frequency = <10000000>;
60                 m25p,chunked-io = <32>;
61
62                 partition@0 {
63                         label = "u-boot";
64                         reg = <0x0 0x30000>;
65                         read-only;
66                 };
67
68                 partition@30000 {
69                         label = "u-boot-env";
70                         reg = <0x30000 0x10000>;
71                 };
72
73                 factory: partition@40000 {
74                         label = "factory";
75                         reg = <0x40000 0x10000>;
76                         read-only;
77                 };
78
79                 partition@50000 {
80                         label = "firmware";
81                         reg = <0x50000 0xfb0000>;
82                 };
83
84         };
85 };
86
87 &pcie {
88         status = "okay";
89
90         pcie0 {
91                 mt76@0,0 {
92                         reg = <0x0000 0 0 0 0>;
93                         device_type = "pci";
94                         mediatek,mtd-eeprom = <&factory 0x8000>;
95                         mediatek,2ghz = <0>;
96                 };
97         };
98
99         pcie1 {
100                 mt76@1,0 {
101                         reg = <0x0000 0 0 0 0>;
102                         device_type = "pci";
103                         mediatek,mtd-eeprom = <&factory 0x0000>;
104                         mediatek,5ghz = <0>;
105                 };
106         };
107 };
108
109 &ethernet {
110         mtd-mac-address = <&factory 0xe000>;
111 };
112
113 &pinctrl {
114         state_default: pinctrl0 {
115                 gpio {
116                         ralink,group = "i2c", "uart2", "uart3", "rgmii2", "sdhci";
117                         ralink,function = "gpio";
118                 };
119         };
120 };