[OpenWrt-Devel] [PATCH] ramips: Add support for the D-Link DCS-930 B1
L. D. Pinney
ldpinney at gmail.com
Fri Jun 5 22:28:25 EDT 2015
http://wiki.openwrt.org/toh/d-link/dcs-930l
Signed-off-by: L. D. Pinney <ldpinney at gmail.com>
---
target/linux/ramips/base-files/etc/board.d/01_leds | 4 ++++
target/linux/ramips/base-files/etc/board.d/02_network | 1 +
target/linux/ramips/base-files/etc/diag.sh | 3 +++
target/linux/ramips/base-files/lib/ramips.sh | 3 +++
target/linux/ramips/base-files/lib/upgrade/platform.sh | 1 +
target/linux/ramips/image/Makefile | 2 ++
target/linux/ramips/rt305x/profiles/dlink.mk | 13 +++++++++++++
7 files changed, 27 insertions(+)
diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds
index ad0062a..64c2c2f 100755
--- a/target/linux/ramips/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/base-files/etc/board.d/01_leds
@@ -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|\
diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network
index 4982566..55af58f 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -53,6 +53,7 @@ ramips_setup_interfaces()
all5003 | \
broadway | \
dcs-930| \
+ dcs-930l-b1| \
ht-tm02| \
ncs601w | \
wnce2001)
diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh
index c5b2921..f62005e 100644
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -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"
;;
diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh
index 0cb02c7..912512b 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -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"
;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index 99cabbd..41e8ef0 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -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
index 0000000..f73a997
--- /dev/null
+++ b/target/linux/ramips/dts/DCS-930L-B1.dts
@@ -0,0 +1,103 @@
+/dts-v1/;
+
+/include/ "rt5350.dtsi"
+
+/ {
+ compatible = "DCS-930L-B1", "ralink,rt5350-soc";
+ model = "D-Link DCS-930L B1";
+
+ palmbus at 10000000 {
+ spi at b00 {
+ status = "okay";
+ m25p80 at 0 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "mx25l3205d";
+ reg = <0 0>;
+ linux,modalias = "m25p80", "s25fl064k";
+ spi-max-frequency = <10000000>;
+
+ partition at 0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition at 30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition at 40000 {
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ read-only;
+ };
+
+ partition at 50000 {
+ label = "firmware";
+ reg = <0x50000 0x3b0000>;
+ };
+ };
+ };
+ };
+
+ pinctrl {
+ state_default: pinctrl0 {
+ gpio {
+ ralink,group = "i2c", "jtag", "uartf", "led";
+ ralink,function = "gpio";
+ };
+ };
+ };
+
+ ethernet at 10100000 {
+ mtd-mac-address = <&factory 0x4>;
+ };
+
+ esw at 10110000 {
+ ralink,portmap = <0x2f>;
+ };
+
+ wmac at 10180000 {
+ ralink,mtd-eeprom = <&factory 0>;
+ };
+
+ ehci at 101c0000 {
+ status = "okay";
+ };
+
+ ohci at 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>;
+ };
+ };
+};
diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile
index 106cb2d..41edb4d 100644
--- a/target/linux/ramips/image/Makefile
+++ b/target/linux/ramips/image/Makefile
@@ -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))
diff --git a/target/linux/ramips/rt305x/profiles/dlink.mk b/target/linux/ramips/rt305x/profiles/dlink.mk
index 5253460..5fc5709 100644
--- a/target/linux/ramips/rt305x/profiles/dlink.mk
+++ b/target/linux/ramips/rt305x/profiles/dlink.mk
@@ -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
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list