ramips: add support for Kingston MLW221
authorJohn Crispin <john@openwrt.org>
Sat, 26 Jul 2014 20:36:22 +0000 (20:36 +0000)
committerJohn Crispin <john@openwrt.org>
Sat, 26 Jul 2014 20:36:22 +0000 (20:36 +0000)
This patch adds support for the Kingston Mobilelite Wireless (MLW-221)

http://wiki.openwrt.org/toh/kingston/mlw221

Signed-off-by: L. D. Pinney <ldpinney@gmail.com>
SVN-Revision: 41841

target/linux/ramips/base-files/etc/diag.sh
target/linux/ramips/base-files/etc/uci-defaults/01_leds
target/linux/ramips/base-files/etc/uci-defaults/02_network
target/linux/ramips/base-files/lib/ramips.sh
target/linux/ramips/base-files/lib/upgrade/platform.sh
target/linux/ramips/dts/MLW221.dts [new file with mode: 0644]
target/linux/ramips/image/Makefile

index 908547e50e563ec492724637eb2d4fe583e472ef..088760652a14f80ea2f3f58d7c878d83c85b648e 100755 (executable)
@@ -73,6 +73,9 @@ get_status_led() {
        m4)
                status_led="m4:blue:status"
                ;;
+       mlw221)
+               status_led="kingston:green:status"
+               ;;
        mofi3500-3gn)
                status_led="mofi3500-3gn:green:status"
                ;;
index 19ec4f59042ab4c09d2f4273b52d8382a35c8162..359281efa993dcc05f407a9ea1c2ad6f02f715ae 100755 (executable)
@@ -113,6 +113,9 @@ case $board in
        hw550-3g)
                set_usb_led "hw550-3g:green:usb"
                ;;
+       mlw221)
+               set_wifi_led "kingston:blue:wifi"
+               ;;
        mofi3500-3gn)
                set_usb_led "mofi3500-3gn:green:usb"
                ;;
index f65388f6134f5e767d68726fc45521abb0b167a2..40c60fee5cf5121c639162e6209f79b5d84be21b 100755 (executable)
@@ -51,6 +51,10 @@ ramips_setup_interfaces()
                ;;
 
        3g-6200nl | \
+       mlw221)
+                ucidef_set_interface_lan "eth0.2"
+                ;;
+
        wl-330n | \
        wmr300)
                ucidef_set_interface_lan "eth0.1"
index ff3c2a5e5deb04760327efbfb2333759fccb8812..f7e04b7391176c480ad257f795befdbf78d6461f 100755 (executable)
@@ -160,6 +160,9 @@ ramips_board_detect() {
        *"HAME MPR-A2")
                name="mpr-a2"
                ;;
+       *"Kingston MLW221")
+               name="mlw221"
+               ;;
        *"Planex MZK-750DHP")
                name="mzk-750dhp"
                ;;
index 1ab3ab510f3acba2f60e32358231f67f1d61c6d1..4a706910842e48d9251cf13ed7b55900344eeb0f 100755 (executable)
@@ -55,6 +55,7 @@ platform_check_image() {
        ip2202 | \
        m3 | \
        m4 | \
+       mlw221 | \
        mofi3500-3gn | \
        mpr-a1 | \
        mpr-a2 | \
diff --git a/target/linux/ramips/dts/MLW221.dts b/target/linux/ramips/dts/MLW221.dts
new file mode 100644 (file)
index 0000000..f220e97
--- /dev/null
@@ -0,0 +1,119 @@
+/dts-v1/;
+
+/include/ "mt7620n.dtsi"
+
+/ {
+       compatible = "mlw221", "ralink,mt7620n-soc";
+       model = "Kingston MLW221";
+
+       palmbus@10000000 {
+               gpio0: gpio@600 {
+               status = "okay";
+               };
+
+               gpio2: gpio@660 {
+                       status = "okay";
+               };
+
+               gpio3: gpio@688 {
+                       status = "okay";
+               };
+
+               spi@b00 {
+                       status = "okay";
+
+                       m25p80@0 {
+                               #address-cells = <1>;
+                               #size-cells = <1>;
+                               compatible = "s25fl129p1";
+                               reg = <0 0>;
+                               linux,modalias = "m25p80", "s25fl129p1";
+                               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 0xf60000>;
+                               };
+
+                               partition@fb0000 {
+                                       label = "user-config";
+                                       reg = <0xfb0000 0x50000>;
+
+                               };
+                       };
+               };
+       };
+
+       ehci@101c0000 {
+               status = "okay";
+       };
+
+       ohci@101c1000 {
+               status = "okay";
+       };
+
+       ethernet@10100000 {
+               mtd-mac-address = <&factory 0x4>;
+               ralink,port-map = "wllll";
+       };
+
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
+       pinctrl {
+               state_default: pinctrl0 {
+                       default {
+                               ralink,group = "i2c", "ephy", "wled";
+                               ralink,function = "gpio";
+                       };
+               };
+       };
+
+       gpio-leds {
+               compatible = "gpio-leds";
+               system {
+                       label = "kingston:blue:system";
+                       gpios = <&gpio2 3 1>;
+               };
+               wifi {
+                       label = "kingston:blue:wifi";
+                       gpios = <&gpio3 0 1>;
+               };
+       };
+
+       gpio-keys-polled {
+               compatible = "gpio-keys-polled";
+               #address-cells = <1>;
+               #size-cells = <0>;
+               poll-interval = <20>;
+               reset {
+                       label = "reset";
+                       gpios = <&gpio0 1 1>;
+                       linux,code = <0x198>;
+               };
+               system {
+                       label = "system";
+                       gpios = <&gpio0 2 1>;
+                       linux,code = <0x211>;
+               };
+       };
+};
index ef019ef2f7b22e93590e9154adbff8cb252e3acf..62992cd607d080a73101b892b4b43e51de7f15a8 100644 (file)
@@ -738,6 +738,7 @@ endif
 # MT7620N Profiles
 #
 
+Image/Build/Profile/MLW221=$(call BuildFirmware/Default16M/$(1),$(1),mlw221,MLW221)
 Image/Build/Profile/WMR300=$(call BuildFirmware/Default8M/$(1),$(1),wmr-300,WMR300)
 Image/Build/Profile/RT-N14U=$(call BuildFirmware/Default8M/$(1),$(1),rt-n14u,RT-N14U)
 Image/Build/Profile/WR8305RT=$(call BuildFirmware/Default8M/$(1),$(1),wr8305rt,WR8305RT)
@@ -746,6 +747,7 @@ Image/Build/Profile/ZBT-WA05=$(call BuildFirmware/Default8M/$(1),$(1),zbt-wa05,Z
 
 ifeq ($(SUBTARGET),mt7620n)
 define Image/Build/Profile/Default
+       $(call Image/Build/Profile/MLW221,$(1))
        $(call Image/Build/Profile/WMR300,$(1))
        $(call Image/Build/Profile/RT-N14U,$(1))
        $(call Image/Build/Profile/WR8305RT,$(1))