From c1710901c5cd47717e972798bbc6108f5be55652 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Wed, 3 Apr 2013 10:00:03 +0000 Subject: [PATCH] add profile for the Edimax 3g-6200NL board MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit http://patchwork.openwrt.org/patch/3214/ Signed-off-by: Cédric Le Moing SVN-Revision: 36172 --- .../etc/hotplug.d/firmware/10-rt2x00-eeprom | 1 + .../base-files/etc/uci-defaults/01_leds | 3 + .../base-files/etc/uci-defaults/02_network | 1 + .../base-files/lib/preinit/06_set_iface_mac | 1 + target/linux/ramips/base-files/lib/ramips.sh | 3 + .../ramips/base-files/lib/upgrade/platform.sh | 1 + target/linux/ramips/dts/3G-6200NL.dts | 78 +++++++++++++++++++ target/linux/ramips/image/Makefile | 5 +- 8 files changed, 92 insertions(+), 1 deletion(-) create mode 100644 target/linux/ramips/dts/3G-6200NL.dts diff --git a/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom b/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom index 40785287db..de5a542f38 100644 --- a/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom +++ b/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom @@ -52,6 +52,7 @@ case "$FIRMWARE" in ;; 3g-6200n | \ + 3g-6200nl | \ 3g300m | \ air3gii | \ all0239-3g | \ diff --git a/target/linux/ramips/base-files/etc/uci-defaults/01_leds b/target/linux/ramips/base-files/etc/uci-defaults/01_leds index 104f201fb9..65497266ee 100755 --- a/target/linux/ramips/base-files/etc/uci-defaults/01_leds +++ b/target/linux/ramips/base-files/etc/uci-defaults/01_leds @@ -18,6 +18,9 @@ case $board in set_wifi_led "edimax:amber:wlan" set_usb_led "edimax:blue:3g" ;; + 3g-6200nl) + set_wifi_led "edimax:green:wlan" + ;; 3g300m) set_usb_led "tenda:blue:3g" ;; diff --git a/target/linux/ramips/base-files/etc/uci-defaults/02_network b/target/linux/ramips/base-files/etc/uci-defaults/02_network index d6ab75afa5..7d30f72f08 100755 --- a/target/linux/ramips/base-files/etc/uci-defaults/02_network +++ b/target/linux/ramips/base-files/etc/uci-defaults/02_network @@ -46,6 +46,7 @@ ramips_setup_interfaces() ;; dir-615-h1 | \ + 3g-6200nl | \ wl-330n) ucidef_set_interface_lan "eth0.1" ;; diff --git a/target/linux/ramips/base-files/lib/preinit/06_set_iface_mac b/target/linux/ramips/base-files/lib/preinit/06_set_iface_mac index fcfb86bd59..e860309ec4 100644 --- a/target/linux/ramips/base-files/lib/preinit/06_set_iface_mac +++ b/target/linux/ramips/base-files/lib/preinit/06_set_iface_mac @@ -10,6 +10,7 @@ preinit_set_mac_address() { case $(ramips_board_name) in 3g-6200n |\ + 3g-6200nl |\ 3g300m | \ mzk-w300nh2 |\ wl-330n |\ diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh index 6638b0a001..2a713f8c65 100755 --- a/target/linux/ramips/base-files/lib/ramips.sh +++ b/target/linux/ramips/base-files/lib/ramips.sh @@ -33,6 +33,9 @@ ramips_board_detect() { *"Edimax 3g-6200n") name="3g-6200n" ;; + *"Edimax 3g-6200nl") + name="3g-6200nl" + ;; *"AirLive Air3GII") name="air3gii" ;; diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh index 97cc382b39..a6f52cd143 100755 --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh @@ -15,6 +15,7 @@ platform_check_image() { case "$board" in 3g-6200n | \ + 3g-6200nl | \ 3g300m | \ air3gii | \ all0239-3g | \ diff --git a/target/linux/ramips/dts/3G-6200NL.dts b/target/linux/ramips/dts/3G-6200NL.dts new file mode 100644 index 0000000000..f57ccfbc4f --- /dev/null +++ b/target/linux/ramips/dts/3G-6200NL.dts @@ -0,0 +1,78 @@ +/dts-v1/; + +/include/ "rt3050.dtsi" + +/ { + #address-cells = <1>; + #size-cells = <1>; + compatible = "3G-6200N", "ralink,rt3050-soc"; + model = "Edimax 3g-6200n"; + + 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,128k@0x3e0000(cimage)ro,3648k@0x50000(firmware)"; + }; + + palmbus@10000000 { + sysc@0 { + ralink,pinmmux = "i2c", "spi", "uartlite", "jtag", "mdio", "sdram", "rgmii"; + 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>; + }; + + ethernet@10100000 { + status = "okay"; + }; + + esw@10110000 { + status = "okay"; + ralink,portmap = <0x2f>; + }; + + gpio-leds { + compatible = "gpio-leds"; + wlan { + label = "edimax:amber:wlan"; + gpios = <&gpio0 14 1>; + }; + }; + + gpio-keys-polled { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <20>; + wps { + label = "wps"; + gpios = <&gpio0 12 1>; + linux,code = <0x211>; + }; + }; + + wmac@10180000 { + status = "okay"; + }; + + otg@101c0000 { + status = "okay"; + }; +}; diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile index bb889219be..01425b41d3 100644 --- a/target/linux/ramips/image/Makefile +++ b/target/linux/ramips/image/Makefile @@ -238,7 +238,9 @@ endif # edimax_3g6200n_mtd_size=3735552 -Image/Build/Profile/3G6200N=$(call BuildFirmware/CustomFlash/$(1),$(1),3g-6200n,3G-6200N,$(edimax_3g6200n_mtd_size)) +Image/Build/Profile/3G6200N=$(call BuildFirmware/Edimax/$(1),$(1),3g-6200n,3G-6200N,$(edimax_3g6200n_mtd_size),CSYS,3G62,0x50000,0xc0000) + +Image/Build/Profile/3G6200NL=$(call BuildFirmware/Edimax/$(1),$(1),3g-6200nl,3G-6200NL,$(edimax_3g6200n_mtd_size),CSYS,3G62,0x50000,0xc0000) Image/Build/Profile/3G300M=$(call BuildFirmware/CustomFlashFactory/$(1),$(1),3g300m,3G300M,$(ralink_default_fw_size_4M),3G150M_SPI Kernel Image,factory) @@ -397,6 +399,7 @@ Image/Build/Profile/XDXRN502J=$(call BuildFirmware/Default4M/$(1),$(1),xdxrn502j ifeq ($(SUBTARGET),rt305x) define Image/Build/Profile/Default $(call Image/Build/Profile/3G6200N,$(1)) + $(call Image/Build/Profile/3G6200NL,$(1)) $(call Image/Build/Profile/3G300M,$(1)) $(call Image/Build/Profile/AIR3GII,$(1)) $(call Image/Build/Profile/ALL02393G,$(1)) -- 2.25.1