[ramips] add Huawei D105
authorJohn Crispin <john@openwrt.org>
Wed, 3 Apr 2013 10:00:08 +0000 (10:00 +0000)
committerJohn Crispin <john@openwrt.org>
Wed, 3 Apr 2013 10:00:08 +0000 (10:00 +0000)
http://patchwork.openwrt.org/patch/3510/

Signed-off-by: Cezary Jackiewicz <cezary.jackiewicz@gmail.com>
SVN-Revision: 36173

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/D105.dts [new file with mode: 0644]
target/linux/ramips/image/Makefile

index 0c2ae83c755219e29b1622dac8df9d711bc8dba0..dbde1f777583f48bb6bbd2b3029080b62adec185 100755 (executable)
@@ -21,6 +21,9 @@ get_status_led() {
        br6425)
                status_led="edimax:green:power"
                ;;
+       d105)
+               status_led="d105:red:power"
+               ;;
        dir-300-b1 | dir-600-b1 | dir-600-b2 | dir-615-h1 | dir-615-d | dir-620-a1)
                status_led="d-link:green:status"
                ;;
index de5a542f383428e510cd2f449db8eb147d4a9c7a..6dd36d74034a0f42964d0e8e7c88da9cf54b3d27 100644 (file)
@@ -64,6 +64,7 @@ case "$FIRMWARE" in
        broadway | \
        br6524n | \
        carambola | \
+       d105 | \
        dir-615-h1 | \
        dir-620-a1 | \
        esr-9753 | \
index 65497266ee8a8a7517896cd0b74f26982396f5fd..bb8a5dcbd041adfa2a2ff151922c82a0933d3cda 100755 (executable)
@@ -48,6 +48,10 @@ case $board in
        br6524n)
                set_wifi_led "edimax:blue:wlan"
                ;;
+       d105)
+               ucidef_set_led_default "power" "POWER" "d105:red:power" "1"
+               set_usb_led "d105:green:usb"
+               ;;
        dir-300-b1|\
        dir-600-b1|\
        dir-600-b2|\
index 7d30f72f086859f692e4e40c7c81d7a06d9cf5f7..d2400870c6d05a05f063af29f980fcdc38267a10 100755 (executable)
@@ -125,6 +125,7 @@ ramips_setup_interfaces()
                ucidef_set_interfaces_lan_wan "eth0.2" "eth0.1"
                ;;
 
+       d105 | \
        omni-emb-hpm|\
        wli-tx4-ag300n)
                ucidef_set_interface_lan "eth0"
@@ -249,6 +250,7 @@ ramips_setup_macs()
                wan_mac=$(macaddr_add "$lan_mac" 1)
                ;;
 
+       d105 | \
        wli-tx4-ag300n)
                lan_mac=$(mtd_get_mac_binary factory 4)
                ;;
index e860309ec49a0d01b59f280cb769e54b0715db46..985d1bc8f7516455663e5e56ab4609738c29ad8a 100644 (file)
@@ -20,6 +20,7 @@ preinit_set_mac_address() {
                ;;
        bc2 |\
        broadway |\
+       d105 |\
        dir-620-a1 |\
        esr-9753 |\
        freestation5 |\
index 2a713f8c65c9dcfdee31a0258bea2488fd14618d..4948e5b5cc4c4be4b928876fb0022c6f6a653ca8 100755 (executable)
@@ -105,6 +105,9 @@ ramips_board_detect() {
        *"Hauppauge Broadway")
                name="broadway"
                ;;
+       *"Huawei D105")
+               name="d105"
+               ;;
        *"La Fonera 2.0N")
                name="fonera20n"
                ;;
index a6f52cd1432fcee3b0b7c51a2422de2ff86549da..e2a55feabbbd327e9edb161e15dbb639e4d5d4e8 100755 (executable)
@@ -24,6 +24,7 @@ platform_check_image() {
        bc2 | \
        broadway | \
        carambola | \
+       d105 | \
        dir-300-b1 | \
        dir-600-b1 | \
        dir-600-b2 | \
diff --git a/target/linux/ramips/dts/D105.dts b/target/linux/ramips/dts/D105.dts
new file mode 100644 (file)
index 0000000..c6f420e
--- /dev/null
@@ -0,0 +1,83 @@
+/dts-v1/;
+
+/include/ "rt3050.dtsi"
+
+/ {
+       #address-cells = <1>;
+       #size-cells = <1>;
+       compatible = "D105", "ralink,rt3050-soc";
+       model = "Huawei D105";
+
+       memorydetect {
+               ralink,memory = <0x0 0x200000 0x4000000>;
+       };
+
+       chosen {
+               bootargs = "console=ttyS0,57600 mtdparts=1f000000.cfi:192k(u-boot)ro,64k(u-boot-env)ro,64k(factory)ro,3776k@0x50000(firmware)";
+       };
+
+       palmbus@10000000 {
+               sysc@0 {
+                       ralink,pinmmux = "i2c", "spi", "uartlite", "mdio", "sdram", "rgmii";
+                       ralink,gpiomux = "jtag";
+                       ralink,uartmux = "gpio";
+                       ralink,wdtmux = <1>;
+               };
+
+               gpio0: gpio@600 {
+                       status = "okay";
+               };
+
+       };
+
+       cfi@1f000000 {
+               compatible = "cfi-flash";
+               reg = <0x1f000000 0x800000>;
+
+               bank-width = <2>;
+               device-width = <2>;
+               #address-cells = <1>;
+               #size-cells = <1>;
+       };
+
+       gpio-leds {
+               compatible = "gpio-leds";
+               power {
+                       label = "d105:red:power";
+                       gpios = <&gpio0 0 1>;
+               };
+               wps {
+                       label = "d105:green:usb";
+                       gpios = <&gpio0 13 1>;
+               };
+       };
+
+       gpio-keys-polled {
+               compatible = "gpio-keys-polled";
+               #address-cells = <1>;
+               #size-cells = <0>;
+               poll-interval = <20>;
+               reset {
+                       label = "reset";
+                       gpios = <&gpio0 10 1>;
+                       linux,code = <0x198>;
+               };
+       };
+
+       ethernet@10100000 {
+               status = "okay";
+       };
+
+       esw@10110000 {
+               status = "okay";
+               ralink,portmap = <0x2f>;
+       };
+
+       wmac@10180000 {
+               status = "okay";
+       };
+
+       otg@101c0000 {
+               status = "okay";
+       };
+};
index 01425b41d3ae106017b2699712f602dff20c1f69..99ceb63f897f4a884a9d4669cb1d5cab1dcd4ba0 100644 (file)
@@ -268,6 +268,8 @@ Image/Build/Profile/BROADWAY=$(call BuildFirmware/CustomFlashFactory/$(1),$(1),b
 
 Image/Build/Profile/CARAMBOLA=$(call BuildFirmware/Default8M/$(1),$(1),carambola,CARAMBOLA)
 
+Image/Build/Profile/D105=$(call BuildFirmware/Default4M/$(1),$(1),d105,D105)
+
 define BuildFirmware/DIR300B1/squashfs
        $(call BuildFirmware/Default4M/$(1),$(1),$(2),$(3))
        -mkwrgimg -s $(4) -d /dev/mtdblock/2 \
@@ -409,6 +411,7 @@ define Image/Build/Profile/Default
        $(call Image/Build/Profile/BC2,$(1))
        $(call Image/Build/Profile/BROADWAY,$(1))
        $(call Image/Build/Profile/CARAMBOLA,$(1))
+       $(call Image/Build/Profile/D105,$(1))
        $(call Image/Build/Profile/DIR-300-B1,$(1))
        $(call Image/Build/Profile/DIR-600-B1,$(1))
        $(call Image/Build/Profile/DIR-600-B2,$(1))