aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/dts/D240.dts
diff options
context:
space:
mode:
authorKristian Evensen <kristian.evensen@gmail.com>2017-02-04 21:28:52 +0100
committerMathias Kresin <dev@kresin.me>2017-02-05 22:23:28 +0100
commitbb7068f26c4bd89977f3205672f19be60924101c (patch)
tree77bc8176e276951dfa6fdb9207696fde862709db /target/linux/ramips/dts/D240.dts
parent40fb293f240f14013a203d553add70891d966e34 (diff)
downloadupstream-bb7068f26c4bd89977f3205672f19be60924101c.tar.gz
upstream-bb7068f26c4bd89977f3205672f19be60924101c.tar.bz2
upstream-bb7068f26c4bd89977f3205672f19be60924101c.zip
ramips: add support for Sanlinking D240
The Sanlinking Technologies D240 (http://www.sanlinking.com/en/29-dual-4g-wifi-router.html) is basically the same device as the ZBT WE826, so adding support for it in LEDE is straight forward. The differences is that the D240 has two mini-PCIe slots (instead of one), blue LEDs and supports PoE. Specification: * CPU: MT7620A * 1x 10/100Mbps POE (802.3af/802.3at) Ethernet, 4x 10/100Mbps. * 16 MB Flash. * 128 MB RAM. * 1x USB 2.0 port. * 2x mini-PCIe slots. * 2x SIM slots. * 1x 2.4Ghz WIFI. * 1x button. Wifi, USB, switch and both mini-PCIe slots are working. I have not been able to test the SD card reader. The device comes pre-installed with an older version of OpenWRT, including Luci. In order to install LEDE, you need to follow the existing procedure for updating OpenWRT/LEDE using Luci. I.e., you need to access the UI and update the firmware using the sysupgrade-image. Remember to select that you do not want to keep existing settings. The default router address is 192.168.10.1 and username/password admin/root (at least on my devices). If you brick the device, the procedure for recovery is the same as for the WE826. Please see the wiki page for that device for instructions. Signed-off-by: Kristian Evensen <kristian.evensen@gmail.com>
Diffstat (limited to 'target/linux/ramips/dts/D240.dts')
-rw-r--r--target/linux/ramips/dts/D240.dts157
1 files changed, 157 insertions, 0 deletions
diff --git a/target/linux/ramips/dts/D240.dts b/target/linux/ramips/dts/D240.dts
new file mode 100644
index 0000000000..3da96f2a9e
--- /dev/null
+++ b/target/linux/ramips/dts/D240.dts
@@ -0,0 +1,157 @@
+/*
+ * BSD LICENSE
+ *
+ * Copyright(c) 2017 Kristian Evensen <kristian.evensen@gmail.com>.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Broadcom Corporation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/dts-v1/;
+
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "d240", "ralink,mt7620a-soc";
+ model = "Sanlinking Technologies D240";
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ gpio-leds {
+ compatible = "gpio-leds";
+
+ power {
+ label = "d240:blue:power";
+ gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
+ };
+
+ usb {
+ label = "d240:blue:usb";
+ gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
+ };
+
+ air {
+ label = "d240:blue:wifi";
+ gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ gpio-keys-polled {
+ compatible = "gpio-keys-polled";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ poll-interval = <20>;
+
+ reset {
+ label = "reset";
+ gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+};
+
+&gpio1 {
+ status = "okay";
+};
+
+&gpio3 {
+ status = "okay";
+};
+
+&spi0 {
+ status = "okay";
+
+ en25q128@0 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition@50000 {
+ label = "firmware";
+ reg = <0x50000 0xfb0000>;
+ };
+ };
+};
+
+&sdhci {
+ status = "okay";
+};
+
+&ehci {
+ status = "okay";
+};
+
+&ohci {
+ status = "okay";
+};
+
+&ethernet {
+ mtd-mac-address = <&factory 0x4>;
+ ralink,port-map = "wllll";
+};
+
+&wmac {
+ ralink,mtd-eeprom = <&factory 0>;
+};
+
+&pinctrl {
+ state_default: pinctrl0 {
+ default {
+ ralink,group = "i2c", "uartf", "wled", "spi refclk", "pa";
+ ralink,function = "gpio";
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};