Small router sold in Poland (by Cyfrowy Polsat) - CPU: RT3050F @ 320MHz - 4MB flash - 16MB RAM - 1x USB 2.0 - reset button - wifi: Chipset detected - rt: 2872, rf: 0005, rev: 0200.
Signed-off-by: Cezary Jackiewicz <cezary.jackiew...@gmail.com> --- Index: target/linux/ramips/image/Makefile =================================================================== --- target/linux/ramips/image/Makefile (wersja 36141) +++ target/linux/ramips/image/Makefile (kopia robocza) @@ -511,6 +511,10 @@ $(call Image/Build/Template/$(fs_squash)/$(1),GENERIC_8M,carambola,CARAMBOLA,ttyS1,115200,phys) endef +define Image/Build/Profile/D105 + $(call Image/Build/Template/$(fs_squash)/$(1),GENERIC_4M,d105,D105,ttyS1,57600,phys) +endef + define Image/Build/Profile/DIR300B1 $(call Image/Build/Template/$(fs_squash)/$(1),DIR300B1,dir-300-b1,DIR-300-B1,wrgn23_dlwbr_dir300b) $(call Image/Build/Template/$(fs_squash)/$(1),DIR300B1,dir-600-b1,DIR-600-B1,wrgn23_dlwbr_dir600b) @@ -661,6 +665,7 @@ $(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/DIR300B1,$(1)) $(call Image/Build/Profile/DIR615H1,$(1)) $(call Image/Build/Profile/DAP1350,$(1)) Index: target/linux/ramips/files/arch/mips/ralink/rt305x/Makefile =================================================================== --- target/linux/ramips/files/arch/mips/ralink/rt305x/Makefile (wersja 36141) +++ target/linux/ramips/files/arch/mips/ralink/rt305x/Makefile (kopia robocza) @@ -21,6 +21,7 @@ obj-$(CONFIG_RT305X_MACH_BR6425) += mach-br6425.o obj-$(CONFIG_RT305X_MACH_BROADWAY) += mach-broadway.o obj-$(CONFIG_RT305X_MACH_CARAMBOLA) += mach-carambola.o +obj-$(CONFIG_RT305X_MACH_D105) += mach-d105.o obj-$(CONFIG_RT305X_MACH_DIR_300_REVB) += mach-dir-300-revb.o obj-$(CONFIG_RT305X_MACH_DIR_615_H1) += mach-dir-615-h1.o obj-$(CONFIG_RT305X_MACH_DAP_1350) += mach-dap-1350.o Index: target/linux/ramips/files/arch/mips/ralink/rt305x/Kconfig =================================================================== --- target/linux/ramips/files/arch/mips/ralink/rt305x/Kconfig (wersja 36141) +++ target/linux/ramips/files/arch/mips/ralink/rt305x/Kconfig (kopia robocza) @@ -86,6 +86,11 @@ select RALINK_DEV_GPIO_BUTTONS select RALINK_DEV_GPIO_LEDS +config RT305X_MACH_D105 + bool "Huawei D105 board support" + select RALINK_DEV_GPIO_BUTTONS + select RALINK_DEV_GPIO_LEDS + config RT305X_MACH_DIR_300_REVB bool "D-Link DIR-300 revB board support" select RALINK_DEV_GPIO_BUTTONS Index: target/linux/ramips/files/arch/mips/ralink/rt305x/mach-d105.c =================================================================== --- target/linux/ramips/files/arch/mips/ralink/rt305x/mach-d105.c (wersja 0) +++ target/linux/ramips/files/arch/mips/ralink/rt305x/mach-d105.c (kopia robocza) @@ -0,0 +1,74 @@ +/* + * Huawei D105 board support + * + * Copyright (C) 2013 Cezary Jackiewicz <cezary.jackiew...@gmail.com> + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published + * by the Free Software Foundation. + */ + +#include <linux/init.h> +#include <linux/platform_device.h> + +#include <asm/mach-ralink/machine.h> +#include <asm/mach-ralink/dev-gpio-buttons.h> +#include <asm/mach-ralink/dev-gpio-leds.h> +#include <asm/mach-ralink/rt305x.h> +#include <asm/mach-ralink/rt305x_regs.h> + +#include "devices.h" + +#define D105_GPIO_BUTTON_RESET 10 +#define D105_GPIO_LED_POWER 0 +#define D105_GPIO_LED_USB 13 + +#define D105_KEYS_POLL_INTERVAL 20 +#define D105_KEYS_DEBOUNCE_INTERVAL (3 * D105_KEYS_POLL_INTERVAL) + +static struct gpio_led d105_leds_gpio[] __initdata = { + { + .name = "d105:red:power", + .gpio = D105_GPIO_LED_POWER, + .active_low = 1, + }, { + .name = "d105:green:usb", + .gpio = D105_GPIO_LED_USB, + .active_low = 1, + } +}; + +static struct gpio_keys_button d105_gpio_buttons[] __initdata = { + { + .desc = "reset", + .type = EV_KEY, + .code = KEY_RESTART, + .debounce_interval = D105_KEYS_DEBOUNCE_INTERVAL, + .gpio = D105_GPIO_BUTTON_RESET, + .active_low = 1, + } +}; + +static void __init d105_init(void) +{ + rt305x_gpio_init((RT305X_GPIO_MODE_GPIO << + RT305X_GPIO_MODE_UART0_SHIFT) | + RT305X_GPIO_MODE_JTAG); + + rt305x_register_flash(0); + + ramips_register_gpio_leds(-1, ARRAY_SIZE(d105_leds_gpio), + d105_leds_gpio); + ramips_register_gpio_buttons(-1, D105_KEYS_POLL_INTERVAL, + ARRAY_SIZE(d105_gpio_buttons), + d105_gpio_buttons); + + rt305x_esw_data.vlan_config = RT305X_ESW_VLAN_CONFIG_LLLLW; + rt305x_register_ethernet(); + rt305x_register_wifi(); + rt305x_register_wdt(); + rt305x_register_usb(); +} + +MIPS_MACHINE(RAMIPS_MACH_D105, "D105", "Huawei D105", + d105_init); Index: target/linux/ramips/files/arch/mips/include/asm/mach-ralink/machine.h =================================================================== --- target/linux/ramips/files/arch/mips/include/asm/mach-ralink/machine.h (wersja 36141) +++ target/linux/ramips/files/arch/mips/include/asm/mach-ralink/machine.h (kopia robocza) @@ -43,6 +43,7 @@ RAMIPS_MACH_BC2, /* NexAira BC2 */ RAMIPS_MACH_BR6425, /* Edimax BR-6425 */ RAMIPS_MACH_BROADWAY, /* Hauppauge Broadway */ + RAMIPS_MACH_D105, /* Huawei D105 */ RAMIPS_MACH_DAP_1350, /* D-Link DAP-1350 */ RAMIPS_MACH_ESR_9753, /* Senao / EnGenius ESR-9753*/ RAMIPS_MACH_F5D8235_V2, /* Belkin F5D8235 v2 */ Index: target/linux/ramips/rt305x/config-3.7 =================================================================== --- target/linux/ramips/rt305x/config-3.7 (wersja 36141) +++ target/linux/ramips/rt305x/config-3.7 (kopia robocza) @@ -112,6 +112,7 @@ CONFIG_RT305X_MACH_BR6425=y CONFIG_RT305X_MACH_BROADWAY=y CONFIG_RT305X_MACH_CARAMBOLA=y +CONFIG_RT305X_MACH_D105=y CONFIG_RT305X_MACH_DAP_1350=y CONFIG_RT305X_MACH_DIR_300_REVB=y CONFIG_RT305X_MACH_DIR_615_H1=y Index: target/linux/ramips/rt305x/config-3.8 =================================================================== --- target/linux/ramips/rt305x/config-3.8 (wersja 36141) +++ target/linux/ramips/rt305x/config-3.8 (kopia robocza) @@ -111,6 +111,7 @@ CONFIG_RT305X_MACH_BR6425=y CONFIG_RT305X_MACH_BROADWAY=y CONFIG_RT305X_MACH_CARAMBOLA=y +CONFIG_RT305X_MACH_D105=y CONFIG_RT305X_MACH_DAP_1350=y CONFIG_RT305X_MACH_DIR_300_REVB=y CONFIG_RT305X_MACH_DIR_615_H1=y Index: target/linux/ramips/base-files/lib/ramips.sh =================================================================== --- target/linux/ramips/base-files/lib/ramips.sh (wersja 36141) +++ target/linux/ramips/base-files/lib/ramips.sh (kopia robocza) @@ -102,6 +102,9 @@ *"Hauppauge Broadway") name="broadway" ;; + *"Huawei D105") + name="d105" + ;; *"La Fonera 2.0N") name="fonera20n" ;; Index: target/linux/ramips/base-files/lib/upgrade/platform.sh =================================================================== --- target/linux/ramips/base-files/lib/upgrade/platform.sh (wersja 36141) +++ target/linux/ramips/base-files/lib/upgrade/platform.sh (kopia robocza) @@ -23,6 +23,7 @@ bc2 | \ broadway | \ carambola | \ + d105 | \ dir-300-b1 | \ dir-600-b1 | \ dir-600-b2 | \ Index: target/linux/ramips/base-files/lib/preinit/06_set_iface_mac =================================================================== --- target/linux/ramips/base-files/lib/preinit/06_set_iface_mac (wersja 36141) +++ target/linux/ramips/base-files/lib/preinit/06_set_iface_mac (kopia robocza) @@ -19,6 +19,7 @@ ;; bc2 |\ broadway |\ + d105 |\ dir-620-a1 |\ esr-9753 |\ freestation5 |\ Index: target/linux/ramips/base-files/etc/diag.sh =================================================================== --- target/linux/ramips/base-files/etc/diag.sh (wersja 36141) +++ target/linux/ramips/base-files/etc/diag.sh (kopia robocza) @@ -21,6 +21,9 @@ 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: target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom =================================================================== --- target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom (wersja 36141) +++ target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom (kopia robocza) @@ -63,6 +63,7 @@ broadway | \ br6524n | \ carambola | \ + d105 | \ dir-615-h1 | \ dir-620-a1 | \ esr-9753 | \ Index: target/linux/ramips/base-files/etc/uci-defaults/02_network =================================================================== --- target/linux/ramips/base-files/etc/uci-defaults/02_network (wersja 36141) +++ target/linux/ramips/base-files/etc/uci-defaults/02_network (kopia robocza) @@ -124,6 +124,7 @@ ucidef_set_interfaces_lan_wan "eth0.2" "eth0.1" ;; + d105 | \ omni-emb-hpm|\ wli-tx4-ag300n) ucidef_set_interface_lan "eth0" @@ -248,6 +249,7 @@ wan_mac=$(macaddr_add "$lan_mac" 1) ;; + d105 | \ wli-tx4-ag300n) lan_mac=$(mtd_get_mac_binary factory 4) ;; Index: target/linux/ramips/base-files/etc/uci-defaults/01_leds =================================================================== --- target/linux/ramips/base-files/etc/uci-defaults/01_leds (wersja 36141) +++ target/linux/ramips/base-files/etc/uci-defaults/01_leds (kopia robocza) @@ -45,6 +45,10 @@ 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|\ -- Pozdrawiam, Cezary Jackiewicz _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel