From patchwork Sun Jul 26 16:24:32 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Piotr Dymacz X-Patchwork-Id: 500067 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CD681402B3 for ; Mon, 27 Jul 2015 02:29:47 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=wQwKwA1Q; dkim-atps=neutral Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 5751728C082; Sun, 26 Jul 2015 18:26:44 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 943AE2803F2 for ; Sun, 26 Jul 2015 18:24:36 +0200 (CEST) X-policyd-weight: using cached result; rate:hard: -8.5 Received: from mail-lb0-f179.google.com (mail-lb0-f179.google.com [209.85.217.179]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Sun, 26 Jul 2015 18:24:24 +0200 (CEST) Received: by lbbzr7 with SMTP id zr7so40087279lbb.1 for ; Sun, 26 Jul 2015 09:24:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:in-reply-to:references; bh=7UnBh0NKjTkvaLc+OYXVLTQSLAUpsimXE+VJo8ozsng=; b=wQwKwA1QWaJpvaMf0/+WgafTzog0/g6caQsUpKma8pxvQhUab0HwU+2azSOTBaHU2S ItmGHCymWUF6N2osiG2yWE1OEf7at/HstK+56qo+2o2xNE7XU/WMNzGpHfjz3jHtbqRA 2EaVOTbSD3WWwreWQrvY9L/4xzjTH9C57gMFLdSTc3BhdBvsXbGOQY/hSV+NHd2tHtZf eX8exHWC6vQd8VWUbZ/EJgupca64aoGcTpq3OzDarainmA24CBo/GYRujcoqF5055iLT OkyOr6NE7YdPFJQIMsTYT8xO2U1s8xBFc2dMBJqlyEc9UhPx/z0rScIj9XSiKNRleKxV xTjg== X-Received: by 10.112.160.73 with SMTP id xi9mr22662491lbb.92.1437927894833; Sun, 26 Jul 2015 09:24:54 -0700 (PDT) Received: from localhost.localdomain (178235196055.warszawa.vectranet.pl. [178.235.196.55]) by smtp.gmail.com with ESMTPSA id wc1sm3337627lbb.44.2015.07.26.09.24.53 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 26 Jul 2015 09:24:53 -0700 (PDT) From: Piotr Dymacz To: openwrt-devel@lists.openwrt.org Date: Sun, 26 Jul 2015 18:24:32 +0200 Message-Id: <1437927878-30771-8-git-send-email-pepe2k@gmail.com> X-Mailer: git-send-email 2.4.6 In-Reply-To: <1437927878-30771-1-git-send-email-pepe2k@gmail.com> References: <1437927878-30771-1-git-send-email-pepe2k@gmail.com> Subject: [OpenWrt-Devel] [PATCH 07/13] ramips: change board name for Zbtlink WR8305RT to ZBT-WR8305RT X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" There is another Zbtlink board (ZBT-WA05) supported in ramips target, so use the same naming scheme for WR8305RT board and its DTS file. Signed-off-by: Piotr Dymacz --- target/linux/ramips/base-files/etc/board.d/01_leds | 2 +- .../linux/ramips/base-files/etc/board.d/02_network | 2 +- target/linux/ramips/base-files/etc/diag.sh | 2 +- target/linux/ramips/base-files/lib/ramips.sh | 4 +- .../ramips/base-files/lib/upgrade/platform.sh | 4 +- target/linux/ramips/dts/WR8305RT.dts | 112 --------------------- target/linux/ramips/dts/ZBT-WR8305RT.dts | 112 +++++++++++++++++++++ target/linux/ramips/image/Makefile | 4 +- 8 files changed, 121 insertions(+), 121 deletions(-) delete mode 100644 target/linux/ramips/dts/WR8305RT.dts create mode 100644 target/linux/ramips/dts/ZBT-WR8305RT.dts 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 d73ffe2..52da1ff 100755 --- a/target/linux/ramips/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/base-files/etc/board.d/01_leds @@ -232,7 +232,7 @@ whr-600d) wnce2001) set_wifi_led "netgear:green:wlan" ;; -wr8305rt) +zbt-wr8305rt) ucidef_set_led_default "power" "power" "zbtlink:green:sys" "1" set_usb_led "zbtlink:green:usb" set_wifi_led "zbtlink:green:wifi" 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 a781f46..038a66e 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -218,7 +218,7 @@ ramips_setup_interfaces() ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 6t" ucidef_add_switch_vlan "switch0" "2" "5 6t" ;; - wr8305rt) + zbt-wr8305rt) ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2" ucidef_add_switch "switch0" "1" "1" ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 4 6t" diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh index 91a931b..8c96b3b 100644 --- a/target/linux/ramips/base-files/etc/diag.sh +++ b/target/linux/ramips/base-files/etc/diag.sh @@ -228,7 +228,7 @@ get_status_led() { wr512-3gn) status_led="wr512:green:wps" ;; - wr8305rt) + zbt-wr8305rt) status_led="zbtlink:green:sys" ;; wt3020) diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh index 8643613..f9f3b5c 100755 --- a/target/linux/ramips/base-files/lib/ramips.sh +++ b/target/linux/ramips/base-files/lib/ramips.sh @@ -421,8 +421,8 @@ ramips_board_detect() { *"Xiaomi MiWiFi Mini") name="xiaomi-miwifi-mini" ;; - *"ZBT WR8305RT") - name="wr8305rt" + *"Zbtlink ZBT-WR8305RT") + name="zbt-wr8305rt" ;; *"Zbtlink ZBT-WA05") name="zbt-wa05" diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh index 8221997..7aab6a1 100755 --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh @@ -116,7 +116,6 @@ platform_check_image() { wnce2001 | \ wr512-3gn |\ wr6202 |\ - wr8305rt |\ wrtnode |\ oy-0001 |\ wt1520 |\ @@ -127,7 +126,8 @@ platform_check_image() { y1 |\ y1s |\ zte-q7 |\ - zbt-wa05) + zbt-wa05|\ + zbt-wr8305rt) [ "$magic" != "27051956" ] && { echo "Invalid image type." return 1 diff --git a/target/linux/ramips/dts/WR8305RT.dts b/target/linux/ramips/dts/WR8305RT.dts deleted file mode 100644 index 007473f..0000000 --- a/target/linux/ramips/dts/WR8305RT.dts +++ /dev/null @@ -1,112 +0,0 @@ -/dts-v1/; - -/include/ "mt7620n.dtsi" - -/ { - compatible = "wr8305rt", "ralink,mt7620n-soc"; - model = "ZBT WR8305RT"; - - palmbus@10000000 { - gpio1: gpio@638 { - status = "okay"; - }; - gpio3: gpio@688 { - status = "okay"; - }; - - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "mx25l6405d"; - reg = <0 0>; - linux,modalias = "m25p80", "en25q64"; - 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 0x7b0000>; - }; - }; - }; - }; - - ehci@101c0000 { - status = "okay"; - }; - - ohci@101c1000 { - status = "okay"; - }; - - ethernet@10100000 { - mtd-mac-address = <&factory 0x4>; - ralink,port-map = "llllw"; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - - pinctrl { - state_default: pinctrl0 { - ephy { - ralink,group = "ephy"; - ralink,function = "ephy"; - }; - default { - ralink,group = "i2c", "uartf", "spi refclk", "wled"; - ralink,function = "gpio"; - }; - }; - }; - - gpio-leds { - compatible = "gpio-leds"; - sys { - label = "zbtlink:green:sys"; - gpios = <&gpio1 14 1>; - }; - lan { - label = "zbtlink:green:usb"; - gpios = <&gpio1 15 1>; - }; - wifi { - label = "zbtlink:green:wifi"; - gpios = <&gpio3 0 1>; - }; - }; - - gpio-keys-polled { - compatible = "gpio-keys-polled"; - #address-cells = <1>; - #size-cells = <0>; - poll-interval = <20>; - reset { - label = "reset"; - gpios = <&gpio0 1 1>; - linux,code = <0x198>; - }; - }; -}; - diff --git a/target/linux/ramips/dts/ZBT-WR8305RT.dts b/target/linux/ramips/dts/ZBT-WR8305RT.dts new file mode 100644 index 0000000..a75fcd8 --- /dev/null +++ b/target/linux/ramips/dts/ZBT-WR8305RT.dts @@ -0,0 +1,112 @@ +/dts-v1/; + +/include/ "mt7620n.dtsi" + +/ { + compatible = "zbtlink,zbt-wr8305rt", "ralink,mt7620n-soc"; + model = "Zbtlink ZBT-WR8305RT"; + + palmbus@10000000 { + gpio1: gpio@638 { + status = "okay"; + }; + gpio3: gpio@688 { + status = "okay"; + }; + + spi@b00 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "mx25l6405d"; + reg = <0 0>; + linux,modalias = "m25p80", "en25q64"; + 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 0x7b0000>; + }; + }; + }; + }; + + ehci@101c0000 { + status = "okay"; + }; + + ohci@101c1000 { + status = "okay"; + }; + + ethernet@10100000 { + mtd-mac-address = <&factory 0x4>; + ralink,port-map = "llllw"; + }; + + wmac@10180000 { + ralink,mtd-eeprom = <&factory 0>; + }; + + pinctrl { + state_default: pinctrl0 { + ephy { + ralink,group = "ephy"; + ralink,function = "ephy"; + }; + default { + ralink,group = "i2c", "uartf", "spi refclk", "wled"; + ralink,function = "gpio"; + }; + }; + }; + + gpio-leds { + compatible = "gpio-leds"; + sys { + label = "zbtlink:green:sys"; + gpios = <&gpio1 14 1>; + }; + lan { + label = "zbtlink:green:usb"; + gpios = <&gpio1 15 1>; + }; + wifi { + label = "zbtlink:green:wifi"; + gpios = <&gpio3 0 1>; + }; + }; + + gpio-keys-polled { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <20>; + reset { + label = "reset"; + gpios = <&gpio0 1 1>; + linux,code = <0x198>; + }; + }; +}; + diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile index 409ff26..6071ae7 100644 --- a/target/linux/ramips/image/Makefile +++ b/target/linux/ramips/image/Makefile @@ -876,12 +876,12 @@ Image/Build/Profile/MLW221=$(call BuildFirmware/Default16M/$(1),$(1),mlw221,MLW2 Image/Build/Profile/MLWG2=$(call BuildFirmware/Default16M/$(1),$(1),mlwg2,MLWG2) Image/Build/Profile/WMR300=$(call BuildFirmware/Default8M/$(1),$(1),wmr-300,WMR300) Image/Build/Profile/RT-N14U=$(call BuildFirmware/Default8M/$(1),$(1),rt-n14u,RT-N14U) -Image/Build/Profile/WR8305RT=$(call BuildFirmware/Default8M/$(1),$(1),wr8305rt,WR8305RT) Image/Build/Profile/WRTNODE=$(call BuildFirmware/Default16M/$(1),$(1),wrtnode,WRTNODE) Image/Build/Profile/WT3020=$(call BuildFirmware/PorayDualSize/$(1),$(1),wt3020,WT3020) Image/Build/Profile/XIAOMI-MIWIFI-MINI=$(call BuildFirmware/Default16M/$(1),$(1),xiaomi-miwifi-mini,XIAOMI-MIWIFI-MINI) Image/Build/Profile/ZTE-Q7=$(call BuildFirmware/Default8M/$(1),$(1),zte-q7,ZTE-Q7) Image/Build/Profile/ZBT-WA05=$(call BuildFirmware/Default8M/$(1),$(1),zbt-wa05,ZBT-WA05) +Image/Build/Profile/ZBT-WR8305RT=$(call BuildFirmware/Default8M/$(1),$(1),zbt-wr8305rt,ZBT-WR8305RT) Image/Build/Profile/ArcherC20i=$(call BuildFirmware/Tplink/$(1),$(1),ArcherC20i,ArcherC20i) microwrt_mtd_size=16515072 Image/Build/Profile/MicroWRT=$(call BuildFirmware/CustomFlash/$(1),$(1),microwrt,MicroWRT,$(microwrt_mtd_size)) @@ -910,12 +910,12 @@ define Image/Build/Profile/Default $(call Image/Build/Profile/MLWG2,$(1)) $(call Image/Build/Profile/WMR300,$(1)) $(call Image/Build/Profile/RT-N14U,$(1)) - $(call Image/Build/Profile/WR8305RT,$(1)) $(call Image/Build/Profile/WRTNODE,$(1)) $(call Image/Build/Profile/WT3020,$(1)) $(call Image/Build/Profile/XIAOMI-MIWIFI-MINI,$(1)) $(call Image/Build/Profile/ZTE-Q7,$(1)) $(call Image/Build/Profile/ZBT-WA05,$(1)) + $(call Image/Build/Profile/ZBT-WR8305RT,$(1)) $(call Image/Build/Profile/ArcherC20i,$(1)) $(call Image/Build/Profile/MicroWRT,$(1)) endef