diff options
author | Antony Pavlov <antonynpavlov@gmail.com> | 2016-03-16 23:34:19 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2016-05-13 08:01:46 -0400 |
commit | 2c3694d2e6ead3964aafb31e4e529de219ced92b (patch) | |
tree | ad5d1ee9d6f3fb1a5439a72e3d8d994576651a93 /arch/mips/boot/dts/qca | |
parent | 5ae5c452e3361612cd8182eb8bdfecf0ebf42288 (diff) |
MIPS: ath79: add initial support for TP-LINK MR3020
The following features are supported:
* UART;
* SPI-flash;
* USB host;
* GPIO keys and LEDs.
Links:
* http://www.tp-link.com/en/products/details/?model=TL-MR3020
* http://wiki.openwrt.org/toh/tp-link/tl-mr3020
* https://wikidevi.com/wiki/TP-LINK_TL-MR3020
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Cc: Gabor Juhos <juhosg@openwrt.org>
Cc: Alban Bedel <albeu@free.fr>
Cc: linux-mips@linux-mips.org
Cc: devicetree@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/12880/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/boot/dts/qca')
-rw-r--r-- | arch/mips/boot/dts/qca/Makefile | 1 | ||||
-rw-r--r-- | arch/mips/boot/dts/qca/ar9331_tl_mr3020.dts | 118 |
2 files changed, 119 insertions, 0 deletions
diff --git a/arch/mips/boot/dts/qca/Makefile b/arch/mips/boot/dts/qca/Makefile index 14bd22514283..5e2c20d64138 100644 --- a/arch/mips/boot/dts/qca/Makefile +++ b/arch/mips/boot/dts/qca/Makefile | |||
@@ -1,5 +1,6 @@ | |||
1 | # All DTBs | 1 | # All DTBs |
2 | dtb-$(CONFIG_ATH79) += ar9132_tl_wr1043nd_v1.dtb | 2 | dtb-$(CONFIG_ATH79) += ar9132_tl_wr1043nd_v1.dtb |
3 | dtb-$(CONFIG_ATH79) += ar9331_tl_mr3020.dtb | ||
3 | 4 | ||
4 | # Force kbuild to make empty built-in.o if necessary | 5 | # Force kbuild to make empty built-in.o if necessary |
5 | obj- += dummy.o | 6 | obj- += dummy.o |
diff --git a/arch/mips/boot/dts/qca/ar9331_tl_mr3020.dts b/arch/mips/boot/dts/qca/ar9331_tl_mr3020.dts new file mode 100644 index 000000000000..919cf3b854a5 --- /dev/null +++ b/arch/mips/boot/dts/qca/ar9331_tl_mr3020.dts | |||
@@ -0,0 +1,118 @@ | |||
1 | /dts-v1/; | ||
2 | |||
3 | #include <dt-bindings/gpio/gpio.h> | ||
4 | #include <dt-bindings/input/input.h> | ||
5 | |||
6 | #include "ar9331.dtsi" | ||
7 | |||
8 | / { | ||
9 | model = "TP-Link TL-MR3020"; | ||
10 | compatible = "tplink,tl-mr3020"; | ||
11 | |||
12 | aliases { | ||
13 | serial0 = &uart; | ||
14 | }; | ||
15 | |||
16 | memory@0 { | ||
17 | device_type = "memory"; | ||
18 | reg = <0x0 0x2000000>; | ||
19 | }; | ||
20 | |||
21 | leds { | ||
22 | compatible = "gpio-leds"; | ||
23 | |||
24 | wlan { | ||
25 | label = "tp-link:green:wlan"; | ||
26 | gpios = <&gpio 0 GPIO_ACTIVE_HIGH>; | ||
27 | default-state = "off"; | ||
28 | }; | ||
29 | |||
30 | lan { | ||
31 | label = "tp-link:green:lan"; | ||
32 | gpios = <&gpio 17 GPIO_ACTIVE_LOW>; | ||
33 | default-state = "off"; | ||
34 | }; | ||
35 | |||
36 | wps { | ||
37 | label = "tp-link:green:wps"; | ||
38 | gpios = <&gpio 26 GPIO_ACTIVE_LOW>; | ||
39 | default-state = "off"; | ||
40 | }; | ||
41 | |||
42 | led3g { | ||
43 | label = "tp-link:green:3g"; | ||
44 | gpios = <&gpio 27 GPIO_ACTIVE_LOW>; | ||
45 | default-state = "off"; | ||
46 | }; | ||
47 | }; | ||
48 | |||
49 | gpio-keys-polled { | ||
50 | compatible = "gpio-keys-polled"; | ||
51 | #address-cells = <1>; | ||
52 | #size-cells = <0>; | ||
53 | poll-interval = <100>; | ||
54 | |||
55 | button@0 { | ||
56 | label = "wps"; | ||
57 | linux,code = <KEY_WPS_BUTTON>; | ||
58 | gpios = <&gpio 11 GPIO_ACTIVE_HIGH>; | ||
59 | }; | ||
60 | |||
61 | button@1 { | ||
62 | label = "sw1"; | ||
63 | linux,code = <BTN_0>; | ||
64 | gpios = <&gpio 18 GPIO_ACTIVE_HIGH>; | ||
65 | }; | ||
66 | |||
67 | button@2 { | ||
68 | label = "sw2"; | ||
69 | linux,code = <BTN_1>; | ||
70 | gpios = <&gpio 20 GPIO_ACTIVE_HIGH>; | ||
71 | }; | ||
72 | }; | ||
73 | |||
74 | reg_usb_vbus: reg_usb_vbus { | ||
75 | compatible = "regulator-fixed"; | ||
76 | regulator-name = "usb_vbus"; | ||
77 | regulator-min-microvolt = <5000000>; | ||
78 | regulator-max-microvolt = <5000000>; | ||
79 | gpio = <&gpio 8 GPIO_ACTIVE_HIGH>; | ||
80 | enable-active-high; | ||
81 | }; | ||
82 | }; | ||
83 | |||
84 | &ref { | ||
85 | clock-frequency = <25000000>; | ||
86 | }; | ||
87 | |||
88 | &uart { | ||
89 | status = "okay"; | ||
90 | }; | ||
91 | |||
92 | &gpio { | ||
93 | status = "okay"; | ||
94 | }; | ||
95 | |||
96 | &usb { | ||
97 | dr_mode = "host"; | ||
98 | vbus-supply = <®_usb_vbus>; | ||
99 | status = "okay"; | ||
100 | }; | ||
101 | |||
102 | &usb_phy { | ||
103 | status = "okay"; | ||
104 | }; | ||
105 | |||
106 | &spi { | ||
107 | num-chipselects = <1>; | ||
108 | status = "okay"; | ||
109 | |||
110 | /* Spansion S25FL032PIF SPI flash */ | ||
111 | spiflash: s25sl032p@0 { | ||
112 | #address-cells = <1>; | ||
113 | #size-cells = <1>; | ||
114 | compatible = "spansion,s25sl032p", "jedec,spi-nor"; | ||
115 | spi-max-frequency = <104000000>; | ||
116 | reg = <0>; | ||
117 | }; | ||
118 | }; | ||