ramips: Add support of D-link DIR-620D1
authorJohn Crispin <john@openwrt.org>
Thu, 25 Apr 2013 19:02:48 +0000 (19:02 +0000)
committerJohn Crispin <john@openwrt.org>
Thu, 25 Apr 2013 19:02:48 +0000 (19:02 +0000)
Signed-off-by: Serge Vasilugin <vasilugin@yandex.ru>
Acked-by: John Crispin <blogic@openwrt.org>
SVN-Revision: 36432

target/linux/ramips/base-files/etc/diag.sh
target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom
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/preinit/06_set_iface_mac
target/linux/ramips/base-files/lib/ramips.sh
target/linux/ramips/base-files/lib/upgrade/platform.sh
target/linux/ramips/dts/DIR-620-D1.dts [new file with mode: 0644]
target/linux/ramips/image/Makefile

index fe925c0f0460d081f217e4acd12023ae41610084..a82e1ce34c6ee9e5e8f59e0abaa5871da1887c6d 100755 (executable)
@@ -24,7 +24,7 @@ get_status_led() {
        d105)
                status_led="d105:red:power"
                ;;
-       dir-300-b1 | dir-600-b1 | dir-600-b2 | dir-615-h1 | dir-615-d | dir-620-a1)
+       dir-300-b1 | dir-600-b1 | dir-600-b2 | dir-615-h1 | dir-615-d | dir-620-a1| dir-620-d1)
                status_led="d-link:green:status"
                ;;
        dir-645)
index 5915a02ef7b9e9aa122f528e9b744561db4be26e..5cd9313200144318ae84a5beca5e17b0af078646 100644 (file)
@@ -67,6 +67,7 @@ case "$FIRMWARE" in
        d105 | \
        dir-615-h1 | \
        dir-620-a1 | \
+       dir-620-d1 | \
        esr-9753 | \
        fonera20n | \
        rt-n13u | \
index cd17d7fa3872b3c23d2d7eb0da9f502bab43278b..cfe5c621c5250be508561b22da4cd8c2bdb98bec 100755 (executable)
@@ -65,6 +65,9 @@ case $board in
                ucidef_set_led_default "status" "Status LED (amber)" "d-link:amber:status" "0"
                set_wifi_led "rt2800pci-phy0::radio"
                ;;
+       dir-620-d1)
+               set_wifi_led "d-link:green:wifi"
+               ;;
        esr-9753)
                set_wifi_led "rt2800pci-phy0::radio"
                ;;
index e28f2b54694e8e9da926fb4a98ce70c07072e1f8..49c4f7f334c19a495bb87b1c8778d3542ae0fdaa 100755 (executable)
@@ -164,6 +164,7 @@ ramips_setup_macs()
        bc2 | \
        br6425 | \
        broadway | \
+       dir-620-d1 | \
        f5d8235-v1 | \
        mzk-w300nh2 | \
        nw718 | \
index 52bf115ccfd4c93e42f737d5792d0a05499804fb..d0309fd6eec541df0a6c423fd0dfa3c756f5b0ad 100644 (file)
@@ -12,6 +12,7 @@ preinit_set_mac_address() {
        3g-6200n |\
        3g-6200nl |\
        3g300m | \
+       dir-620-d1 |\
        w150m | \
        mzk-w300nh2 |\
        wl-330n |\
index 37b477a0640ac1d10f2fd7a96b2295d4d2698b9c..24823f6c0702a1e57c379d71fdcb501e047f742a 100755 (executable)
@@ -81,6 +81,9 @@ ramips_board_detect() {
        *"DIR-620 A1")
                name="dir-620-a1"
                ;;
+       *"DIR-620 D1")
+               name="dir-620-d1"
+               ;;
        *"DIR-615 H1")
                name="dir-615-h1"
                ;;
index ef150445b0167807db7f7c564094292d1c4d8fcd..89545597139581301063f2a5cc1120bac1f9c649 100755 (executable)
@@ -32,6 +32,7 @@ platform_check_image() {
        dir-615-h1 | \
        dir-615-d | \
        dir-620-a1 | \
+       dir-620-d1 | \
        dap-1350 | \
        esr-9753 | \
        fonera20n | \
diff --git a/target/linux/ramips/dts/DIR-620-D1.dts b/target/linux/ramips/dts/DIR-620-D1.dts
new file mode 100644 (file)
index 0000000..8913e26
--- /dev/null
@@ -0,0 +1,101 @@
+/dts-v1/;
+
+/include/ "rt3352.dtsi"
+
+/ {
+       compatible = "DIR-620-D1", "ralink,rt3352-soc";
+       model = "D-Link DIR-620 D1";
+
+       palmbus@10000000 {
+               sysc@0 {
+                       ralink,pinmux = "i2c", "spi", "uartlite", "mdio", "sdram", "rgmii";
+                       ralink,gpiomux = "jtag";
+                       ralink,uartmux = "gpio";
+                       ralink,wdtmux = <1>;
+               };
+
+               gpio0: gpio@600 {
+                       status = "okay";
+               };
+
+               spi@b00 {
+                       status = "okay";
+                       m25p80@0 {
+                               #address-cells = <1>;
+                               #size-cells = <1>;
+                               compatible = "mx25l6405d";
+                               reg = <0 0>;
+                               linux,modalias = "m25p80", "mx25l6405d";
+                               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 0x3b0000>;
+               };
+                       };
+               };
+       };
+
+       ethernet@10100000 {
+               status = "okay";
+       };
+
+       esw@10110000 {
+               status = "okay";
+               ralink,portmap = <0x2f>;
+       };
+
+       gpio-leds {
+               compatible = "gpio-leds";
+               status {
+                       label = "d-link:green:status";
+                       gpios = <&gpio0 9 1>;
+               };
+               wifi {
+                       label = "d-link:green:wifi";
+                       gpios = <&gpio0 17 1>;
+               };
+       };
+
+       gpio-keys-polled {
+               compatible = "gpio-keys-polled";
+               #address-cells = <1>;
+               #size-cells = <0>;
+               poll-interval = <20>;
+               reset_wps {
+                       label = "reset_wps";
+                       gpios = <&gpio0 7 1>;
+                       linux,code = <0x198>;
+               };
+       };
+
+       wmac@10180000 {
+               status = "okay";
+       };
+
+       ehci@101c0000 {
+               status = "okay";
+       };
+
+       ohci@101c1000 {
+               status = "okay";
+       };
+};
index 4e8cde7310d9f2086aba74a611158b629acb410c..703e1f09f6f259a81acb88f9c71bc3964b0ac68b 100644 (file)
@@ -291,6 +291,7 @@ Image/Build/Profile/DIR-600-B2=$(call BuildFirmware/DIR300B1/$(1),$(1),dir-600-b
 Image/Build/Profile/DIR-615-D=$(call BuildFirmware/DIR300B1/$(1),$(1),dir-615-d,DIR-615-D,wrgn23_dlwbr_dir615d)
 
 Image/Build/Profile/DIR-620-A1=$(call BuildFirmware/Default8M/$(1),$(1),dir-620-a1,DIR-620-A1)
+Image/Build/Profile/DIR-620-D1=$(call BuildFirmware/Default8M/$(1),$(1),dir-620-d1,DIR-620-D1)
 
 define BuildFirmware/DIR615H1/squashfs
        $(call BuildFirmware/Default4M/$(1),$(1),dir-615-h1,DIR-615-H1)
@@ -433,6 +434,7 @@ define Image/Build/Profile/Default
        $(call Image/Build/Profile/DIR-600-B2,$(1))
        $(call Image/Build/Profile/DIR-615-D,$(1))
        $(call Image/Build/Profile/DIR-620-A1,$(1))
+       $(call Image/Build/Profile/DIR-620-D1,$(1))
        $(call Image/Build/Profile/DIR615H1,$(1))
        $(call Image/Build/Profile/DAP1350,$(1))
        $(call Image/Build/Profile/DAP1350WW,$(1))