ramips: Add support for the D-Link DCS-930 B1
authorJohn Crispin <john@openwrt.org>
Thu, 18 Jun 2015 18:20:46 +0000 (18:20 +0000)
committerJohn Crispin <john@openwrt.org>
Thu, 18 Jun 2015 18:20:46 +0000 (18:20 +0000)
http://wiki.openwrt.org/toh/d-link/dcs-930l

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

target/linux/ramips/base-files/etc/board.d/01_leds
target/linux/ramips/base-files/etc/board.d/02_network
target/linux/ramips/base-files/etc/diag.sh
target/linux/ramips/base-files/lib/ramips.sh
target/linux/ramips/base-files/lib/upgrade/platform.sh
target/linux/ramips/dts/DCS-930L-B1.dts [new file with mode: 0644]
target/linux/ramips/image/Makefile
target/linux/ramips/rt305x/profiles/dlink.mk

index c63ff47585ed564a59c4a641c97c77073add7c87..a5a8400775353c2c0be1a36488c71a21faf6d9e2 100755 (executable)
@@ -85,6 +85,10 @@ case $board in
                ucidef_set_led_default "power" "POWER" "d105:red:power" "1"
                set_usb_led "d105:green:usb"
                ;;
+       dcs-930l-b1)
+               ucidef_set_led_default "power" "POWER" "d-link:red:power" "1"
+               ucidef_set_led_netdev "wifi" "WiFi" "d-link:blue:wps"
+               ;;
        dir-300-b1|\
        dir-600-b1|\
        dir-600-b2|\
index b3dd1f1c3d6f42e92ebf40059f89406704cceada..4849238390e7b1af45cf351d232c9b1a694745c9 100755 (executable)
@@ -53,6 +53,7 @@ ramips_setup_interfaces()
        all5003 | \
        broadway | \
        dcs-930| \
+       dcs-930l-b1| \
        ht-tm02| \
        ncs601w | \
        wnce2001)
index bfc92e5e4e08aaded7c51c4b8eaa6e07eea71c5a..8bcc532d9874b3460ecf8257478a0b70dafbac2a 100644 (file)
@@ -48,6 +48,9 @@ get_status_led() {
        dcs-930 | dir-300-b1 | dir-600-b1 | dir-600-b2 | dir-610-a1 | dir-615-h1 | dir-615-d | dir-620-a1| dir-620-d1| dir-300-b7| dir-320-b1)
                status_led="d-link:green:status"
                ;;
+       dcs-930l-b1)
+               status_led="d-link:red:power"
+               ;;
        dir-645)
                status_led="d-link:green:wps"
                ;;
index 14ffc212d25e28589f1456cc7029158f57028d0e..2d007163f31b61da2e29611e78b8e3d050f60bb4 100755 (executable)
@@ -106,6 +106,9 @@ ramips_board_detect() {
        *"DCS-930")
                name="dcs-930"
                ;;
+       *"DCS-930L B1")
+               name="dcs-930l-b1"
+               ;;
        *"DIR-300 B1")
                name="dir-300-b1"
                ;;
index 8d5f74ff097ac8765b37f9357d5056c1279775a3..f3e8ed5e69b7b55159a066f7a6e6bbd27a0a3b1b 100755 (executable)
@@ -37,6 +37,7 @@ platform_check_image() {
        d105 | \
        dap-1350 | \
        dcs-930 | \
+       dcs-930l-b1 | \
        dir-300-b1 | \
        dir-300-b7 | \
        dir-320-b1 | \
diff --git a/target/linux/ramips/dts/DCS-930L-B1.dts b/target/linux/ramips/dts/DCS-930L-B1.dts
new file mode 100644 (file)
index 0000000..f73a997
--- /dev/null
@@ -0,0 +1,103 @@
+/dts-v1/;
+
+/include/ "rt5350.dtsi"
+
+/ {
+       compatible =  "DCS-930L-B1", "ralink,rt5350-soc";
+       model = "D-Link DCS-930L B1";
+
+       palmbus@10000000 {
+               spi@b00 {
+                       status = "okay";
+                       m25p80@0 {
+                               #address-cells = <1>;
+                               #size-cells = <1>;
+                               compatible = "mx25l3205d";
+                               reg = <0 0>;
+                               linux,modalias = "m25p80", "s25fl064k";
+                               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>;
+                               };
+                       };
+               };
+       };
+
+       pinctrl {
+               state_default: pinctrl0 {
+                       gpio {
+                               ralink,group = "i2c", "jtag", "uartf", "led";
+                               ralink,function = "gpio";
+                       };
+               };
+       };
+
+       ethernet@10100000 {
+               mtd-mac-address = <&factory 0x4>;
+       };
+
+       esw@10110000 {
+               ralink,portmap = <0x2f>;
+       };
+
+       wmac@10180000 {
+               ralink,mtd-eeprom = <&factory 0>;
+       };
+
+       ehci@101c0000 {
+               status = "okay";
+       };
+
+       ohci@101c1000 {
+               status = "okay";
+       };
+
+       gpio-leds {
+               compatible = "gpio-leds";
+               power {
+                       label = "d-link:red:power";
+                       gpios = <&gpio0 17 1>;
+               };
+               wps {
+                       label = "d-link:blue:wps";
+                       gpios = <&gpio0 19 1>;
+               };
+       };
+
+       gpio-keys-polled {
+               compatible = "gpio-keys-polled";
+               #address-cells = <1>;
+               #size-cells = <0>;
+               poll-interval = <20>;
+               reset {
+                       label = "reset";
+                       gpios = <&gpio0 0 1>;
+                       linux,code = <0x198>;
+               };
+               wps {
+                       label = "wps";
+                       gpios = <&gpio0 20 1>;
+                       linux,code = <0x211>;
+               };
+       };
+};
index afbe56770fbc516d7ceccc13531a21e1a952d74f..0c455c23f442e704de5490a65b5e22f219526230 100644 (file)
@@ -514,6 +514,7 @@ define BuildFirmware/DCS930/squashfs
 endef
 BuildFirmware/DCS930/initramfs=$(call BuildFirmware/OF/initramfs,$(1),$(2),$(3))
 Image/Build/Profile/DCS930=$(call BuildFirmware/DCS930/$(1),$(1),dcs-930,DCS-930)
+Image/Build/Profile/DCS930LB1=$(call BuildFirmware/DCS930/$(1),$(1),dcs-930l-b1,DCS-930L-B1)
 
 Image/Build/Profile/ESR-9753=$(call BuildFirmware/Default4M/$(1),$(1),esr-9753,ESR-9753)
 
@@ -717,6 +718,7 @@ define Image/Build/Profile/Default
        $(call Image/Build/Profile/DAP1350,$(1))
        $(call Image/Build/Profile/DAP1350WW,$(1))
        $(call Image/Build/Profile/DCS930,$(1))
+       $(call Image/Build/Profile/DCS930LB1,$(1))
        $(call Image/Build/Profile/ESR-9753,$(1))
        $(call Image/Build/Profile/F7C027,$(1))
        $(call Image/Build/Profile/F5D8235V2,$(1))
index 52534607864a1b2d31a07d99fb129276a03a2471..5fc5709d736078fd39b79ca54ff60afc19d8f666 100644 (file)
@@ -44,6 +44,19 @@ endef
 
 $(eval $(call Profile,DCS930))
 
+define Profile/DCS930LB1
+       NAME:=Dlink DCS-930L B1
+        PACKAGES:=kmod-video-core kmod-video-uvc \
+               kmod-sound-core kmod-usb-audio \
+               kmod-usb-core kmod-usb-ohci kmod-usb2
+endef
+
+define Profile/DCS930LB1/Description
+       Package set for Dlink DCS-930L B1 board
+endef
+
+$(eval $(call Profile,DCS930LB1))
+
 define Profile/DIR610A1
        NAME:=Dlink DIR-610 A1
        PACKAGES:=kmod-ledtrig-netdev kmod-ledtrig-timer