0001 // SPDX-License-Identifier: GPL-2.0
0002 /dts-v1/;
0003
0004 #include <dt-bindings/gpio/gpio.h>
0005 #include <dt-bindings/input/input.h>
0006
0007 #include "ar9331.dtsi"
0008
0009 / {
0010 model = "TP-Link TL-MR3020";
0011 compatible = "tplink,tl-mr3020";
0012
0013 aliases {
0014 serial0 = &uart;
0015 };
0016
0017 memory@0 {
0018 device_type = "memory";
0019 reg = <0x0 0x2000000>;
0020 };
0021
0022 leds {
0023 compatible = "gpio-leds";
0024
0025 wlan {
0026 label = "tp-link:green:wlan";
0027 gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
0028 default-state = "off";
0029 };
0030
0031 lan {
0032 label = "tp-link:green:lan";
0033 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
0034 default-state = "off";
0035 };
0036
0037 wps {
0038 label = "tp-link:green:wps";
0039 gpios = <&gpio 26 GPIO_ACTIVE_LOW>;
0040 default-state = "off";
0041 };
0042
0043 led3g {
0044 label = "tp-link:green:3g";
0045 gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
0046 default-state = "off";
0047 };
0048 };
0049
0050 gpio-keys {
0051 compatible = "gpio-keys";
0052
0053 button-0 {
0054 label = "wps";
0055 linux,code = <KEY_WPS_BUTTON>;
0056 gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
0057 };
0058
0059 button-1 {
0060 label = "sw1";
0061 linux,code = <BTN_0>;
0062 gpios = <&gpio 18 GPIO_ACTIVE_HIGH>;
0063 };
0064
0065 button-2 {
0066 label = "sw2";
0067 linux,code = <BTN_1>;
0068 gpios = <&gpio 20 GPIO_ACTIVE_HIGH>;
0069 };
0070 };
0071
0072 reg_usb_vbus: reg_usb_vbus {
0073 compatible = "regulator-fixed";
0074 regulator-name = "usb_vbus";
0075 regulator-min-microvolt = <5000000>;
0076 regulator-max-microvolt = <5000000>;
0077 gpio = <&gpio 8 GPIO_ACTIVE_HIGH>;
0078 enable-active-high;
0079 };
0080 };
0081
0082 &ref {
0083 clock-frequency = <25000000>;
0084 };
0085
0086 &uart {
0087 status = "okay";
0088 };
0089
0090 &gpio {
0091 status = "okay";
0092 };
0093
0094 &usb {
0095 dr_mode = "host";
0096 vbus-supply = <®_usb_vbus>;
0097 status = "okay";
0098 };
0099
0100 &usb_phy {
0101 status = "okay";
0102 };
0103
0104 &spi {
0105 num-chipselects = <1>;
0106 status = "okay";
0107
0108 /* Spansion S25FL032PIF SPI flash */
0109 spiflash: s25sl032p@0 {
0110 #address-cells = <1>;
0111 #size-cells = <1>;
0112 compatible = "spansion,s25sl032p", "jedec,spi-nor";
0113 spi-max-frequency = <104000000>;
0114 reg = <0>;
0115 };
0116 };