From patchwork Mon Aug 10 15:16:33 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?77ygU1JDSEFDSy5PUkc=?= X-Patchwork-Id: 505663 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 B6C2E14012C for ; Tue, 11 Aug 2015 01:17:08 +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=Mp5cKvbP; dkim-atps=neutral Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 76D6628BD43; Mon, 10 Aug 2015 17:16:15 +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 CD4EA28BC81 for ; Mon, 10 Aug 2015 17:16:05 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 CL_IP_EQ_HELO_IP=-2 (check from: .gmail. - helo: .mail-pd0-f174.google. - helo-domain: .google.) FROM/MX_MATCHES_HELO(DOMAIN)=-2; rate: -8.5 Received: from mail-pd0-f174.google.com (mail-pd0-f174.google.com [209.85.192.174]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Mon, 10 Aug 2015 17:16:04 +0200 (CEST) Received: by pdrg1 with SMTP id g1so72604508pdr.2 for ; Mon, 10 Aug 2015 08:16:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=psBAAa1l5qsz8yrCkuTgIxynAFolp82cGPHF491lTl4=; b=Mp5cKvbPwJMDhrKQE3Drg0zVouEfzCv54OkCK8xQSngjb5ZhIbc2e6fn38tdFdgaHs hnnY8P8wuxnA/MltLocJUfe7eZZNHJxPHh33teH1AbQj4C5jDxhu838TGNka6EsJukH1 1hM7XVUMdGXdISvORlPc1g9weHTejbkZ+OMcB2AupTRf39bvRdiN2P2gYaDuBMo92oW3 l5s2WqwusUuI7VGtJjJwtc6L9URkP6geKluTaNHud4y5MUEXEBA+N8trB4A1Vysi9A5P ZewhjbBYLu9+vieaS0jr5ExqiVwr4WlJuWCFS6iYRxmEguGjfovX8sdmq9LaZ/Hznh3I /LtA== X-Received: by 10.70.123.37 with SMTP id lx5mr46020276pdb.158.1439219803813; Mon, 10 Aug 2015 08:16:43 -0700 (PDT) Received: from mt7620.srchack.org (7c2945b5.i-revonet.jp. [124.41.69.181]) by smtp.gmail.com with ESMTPSA id ea4sm20262847pbc.48.2015.08.10.08.16.41 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 10 Aug 2015 08:16:42 -0700 (PDT) From: YuheiOKAWA To: openwrt-devel@lists.openwrt.org Date: Tue, 11 Aug 2015 00:16:33 +0900 Message-Id: <1439219793-18015-1-git-send-email-tochiro.srchack@gmail.com> X-Mailer: git-send-email 1.9.1 Subject: [OpenWrt-Devel] [PATCH] ramips: add support for Planex DB-WRT01 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" This patch add support for Planex DB-WRT01. DANBOARD route on the MT7620A SoC with two Ethernet port and a 802.11n 2.4 GHz radio. DANBOARD is Cartoon character. Signed-off-by: YuheiOKAWA --- target/linux/ramips/base-files/etc/board.d/01_leds | 3 + .../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 + .../ramips/base-files/lib/upgrade/platform.sh | 1 + target/linux/ramips/dts/DB-WRT01.dts | 99 ++++++++++++++++++++++ target/linux/ramips/image/Makefile | 2 + 7 files changed, 112 insertions(+) create mode 100644 target/linux/ramips/dts/DB-WRT01.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 c6bfd7e..2d4fb92 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,9 @@ case $board in ucidef_set_led_default "power" "POWER" "d105:red:power" "1" set_usb_led "d105:green:usb" ;; + db-wrt01) + ucidef_set_led_default "power" "power" "dbwrt01:orange:power" "1" + ;; dcs-930l-b1) ucidef_set_led_default "power" "POWER" "d-link:red:power" "1" ucidef_set_led_netdev "wifi" "WiFi" "d-link:blue:wps" 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 da1854a..083081e 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -126,6 +126,7 @@ ramips_setup_interfaces() 3g-6200n | \ ai-br100 | \ + db-wrt01 | \ dir-610-a1 | \ dir-300-b7 | \ dir-320-b1 | \ diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh index e63f0df..8e1bc92 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() { d105) status_led="d105:red:power" ;; + db-wrt01) + status_led="dbwrt01:orange:power" + ;; 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" ;; diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh index 7db6d37..e745db9 100755 --- a/target/linux/ramips/base-files/lib/ramips.sh +++ b/target/linux/ramips/base-files/lib/ramips.sh @@ -211,6 +211,9 @@ ramips_board_detect() { *"Linksys RE6500") name="re6500" ;; + *"Planex DB-WRT01") + name="db-wrt01" + ;; *"Planex MZK-750DHP") name="mzk-750dhp" ;; diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh index 8221997..d09fc80 100755 --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh @@ -36,6 +36,7 @@ platform_check_image() { cf-wr800n | \ d105 | \ dap-1350 | \ + db-wrt01 | \ dcs-930 | \ dcs-930l-b1 | \ dir-300-b1 | \ diff --git a/target/linux/ramips/dts/DB-WRT01.dts b/target/linux/ramips/dts/DB-WRT01.dts new file mode 100644 index 0000000..c396cab --- /dev/null +++ b/target/linux/ramips/dts/DB-WRT01.dts @@ -0,0 +1,99 @@ +/dts-v1/; + +/include/ "mt7620a.dtsi" + +/ { + compatible = "ralink,mt7620a-soc"; + model = "Planex DB-WRT01"; + + palmbus@10000000 { + gpio1: gpio@638 { + status = "okay"; + }; + + spi@b00 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "en25q64"; + reg = <0 0>; + linux,modalias = "m25p80", "mx25l6405d"; + 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>; + }; + }; + }; + }; + + pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "spi refclk", "rgmii1"; + ralink,function = "gpio"; + }; + }; + }; + + ethernet@10100000 { + pinctrl-names = "default"; + pinctrl-0 = <&ephy_pins>; + + mtd-mac-address = <&factory 0x4>; + ralink,port-map = "llllw"; + }; + + gsw@10110000 { + ralink,port4 = "ephy"; + }; + + wmac@10180000 { + ralink,mtd-eeprom = <&factory 0>; + }; + + pcie@10140000 { + status = "okay"; + }; + + gpio-leds { + compatible = "gpio-leds"; + power { + label = "dbwrt01:orange:power"; + gpios = <&gpio1 1 1>; + }; + }; + + gpio-keys-polled { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <20>; + s1 { + label = "wps"; + gpios = <&gpio0 2 1>; + linux,code = <0x211>; + }; + }; +}; diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile index 409ff26..088cf5a 100644 --- a/target/linux/ramips/image/Makefile +++ b/target/linux/ramips/image/Makefile @@ -857,6 +857,7 @@ Image/Build/Profile/MT7620a_MT7530=$(call BuildFirmware/Default8M/$(1),$(1),mt76 Image/Build/Profile/MT7620a_V22SG=$(call BuildFirmware/Default8M/$(1),$(1),mt7620a_v22sg,MT7620a_V22SG) br100_mtd_size=8126464 Image/Build/Profile/AIBR100=$(call BuildFirmware/CustomFlash/$(1),$(1),ai-br100,AIBR100,$(br100_mtd_size),Ai-BR) +Image/Build/Profile/DB-WRT01=$(call BuildFirmware/Default8M/$(1),$(1),db-wrt01,DB-WRT01) Image/Build/Profile/RP-N53=$(call BuildFirmware/Default8M/$(1),$(1),rp_n53,RP-N53) whr_300hp2_mtd_size=7012352 Image/Build/Profile/WHR300HP2=$(call BuildFirmware/CustomFlash/$(1),$(1),whr-300hp2,WHR-300HP2,$(whr_300hp2_mtd_size)) @@ -895,6 +896,7 @@ define Image/Build/Profile/Default $(call Image/Build/Profile/MT7620a_MT7530,$(1)) $(call Image/Build/Profile/MT7620a_V22SG,$(1)) $(call Image/Build/Profile/AIBR100,$(1)) + $(call Image/Build/Profile/DB-WRT01,$(1)) $(call Image/Build/Profile/CF-WR800N,$(1)) $(call Image/Build/Profile/RP-N53,$(1)) $(call Image/Build/Profile/DIR-810L,$(1))