From patchwork Fri Nov 20 13:06:06 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Prototik X-Patchwork-Id: 546913 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 28A421402C2 for ; Sat, 21 Nov 2015 00:06:27 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=prok.pw header.i=@prok.pw header.b=Fzaao+mg; dkim-atps=neutral Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 367E1284502; Fri, 20 Nov 2015 14:04:14 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=BAYES_00,RDNS_DYNAMIC, T_DKIM_INVALID autolearn=no version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 14E5F2805AA for ; Fri, 20 Nov 2015 14:04:10 +0100 (CET) X-policyd-weight: using cached result; rate: -7.6 Received: from prok.pw (stc.80.83.188.95.dsl.krasnet.ru [95.188.83.80]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Fri, 20 Nov 2015 14:04:09 +0100 (CET) Received: from prok-nb.localdomain (router [192.168.1.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by prok.pw (Postfix) with ESMTPSA id 521E111F771; Fri, 20 Nov 2015 20:06:07 +0700 (KRAT) DKIM-Filter: OpenDKIM Filter v2.10.3 prok.pw 521E111F771 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=prok.pw; s=prok.pw; t=1448024767; bh=A0+YppvlGm1fwZMxrH6kXWjsNMb+068r2/1/rrJjv9g=; h=From:To:Cc:Subject:Date; b=Fzaao+mganIDsijHHLVokgAF9QdfWODSYuH0x9lBAV3yybKV6o4DqvgLsnGQeLPy8 LCDO7hqsyaa0hCW9XeD3TniPPTaZraohdbknm9JMWjcg42yt50QGaeTKgLtWcI85X7 WsgfWiS2SGK1LqM4ff/h63+nNyf1czX53id5Olznbd175+lAIZfonu4Vgj5/faT6lI UWFb90kou5SxKx9MPehvA5rcGOqp9pCnZInUV7pXIWxXagW5NSCtvbZuo5bNotaiQ1 rdbDh1roP6tqPS0RMp4vhed/aWkCQIj49y59gPD5olL+Xr7bm7vk7pKLcCtuZztvVd +Zdf/8svge1bQ== From: Prototik To: Hauke Mehrtens Date: Fri, 20 Nov 2015 20:06:06 +0700 Message-Id: <1448024766-23726-1-git-send-email-me@prok.pw> X-Mailer: git-send-email 2.6.2 Cc: openwrt-devel@lists.openwrt.org Subject: [OpenWrt-Devel] [PATCH] Add support for Huawei WS880 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" --- target/linux/bcm53xx/image/Makefile | 14 +++ .../910-ARM-BCM5301X-Add-DT-for-Huawei-WS880.patch | 115 +++++++++++++++++++++ .../910-ARM-BCM5301X-Add-DT-for-Huawei-WS880.patch | 115 +++++++++++++++++++++ 3 files changed, 244 insertions(+) create mode 100644 target/linux/bcm53xx/patches-4.1/910-ARM-BCM5301X-Add-DT-for-Huawei-WS880.patch create mode 100644 target/linux/bcm53xx/patches-4.3/910-ARM-BCM5301X-Add-DT-for-Huawei-WS880.patch diff --git a/target/linux/bcm53xx/image/Makefile b/target/linux/bcm53xx/image/Makefile index c9987dd..2b46988 100644 --- a/target/linux/bcm53xx/image/Makefile +++ b/target/linux/bcm53xx/image/Makefile @@ -133,6 +133,19 @@ define Device/smartrg-sr400ac IMAGE/trx := trx-serial endef +define Device/huawei + IMAGES := trx + IMAGE/trx := trx-nand | asus-trx +endef + +define HuaweiDevice + define Device/huawei-$(1) + $$(Device/huawei) + PRODUCTID := $(2) + endef + TARGET_DEVICES += huawei-$(1) +endef + TARGET_DEVICES += \ buffalo-wzr-1750dhp buffalo-wzr-600dhp2 buffalo-wzr-900dhp \ buffalo-wxr-1900dhp \ @@ -145,5 +158,6 @@ $(eval $(call AsusDevice,rt-ac87u,RT-AC87U)) $(eval $(call AsusDevice,rt-n18u,RT-N18U)) $(eval $(call LinksysDevice,ea6300-v1)) $(eval $(call NetgearDevice,r7000,U12H270T00_NETGEAR)) +$(eval $(call HuaweiDevice,ws880,WS880)) $(eval $(call BuildImage)) diff --git a/target/linux/bcm53xx/patches-4.1/910-ARM-BCM5301X-Add-DT-for-Huawei-WS880.patch b/target/linux/bcm53xx/patches-4.1/910-ARM-BCM5301X-Add-DT-for-Huawei-WS880.patch new file mode 100644 index 0000000..1a73e64 --- /dev/null +++ b/target/linux/bcm53xx/patches-4.1/910-ARM-BCM5301X-Add-DT-for-Huawei-WS880.patch @@ -0,0 +1,115 @@ +From: Sergey Shatunov +Subject: [PATCH] ARM: BCM5301X: Add DT for Huawei WS880 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Sergey Shatunov +--- +--- a/arch/arm/boot/dts/Makefile ++++ b/arch/arm/boot/dts/Makefile +@@ -59,6 +59,7 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \ + bcm4708-asus-rt-ac56u.dtb \ + bcm4708-asus-rt-ac68u.dtb \ + bcm4708-buffalo-wzr-1750dhp.dtb \ ++ bcm4708-huawei-ws880.dtb \ + bcm4708-linksys-ea6300-v1.dtb \ + bcm4708-luxul-xwc-1000.dtb \ + bcm4708-netgear-r6250.dtb \ +--- /dev/null ++++ b/arch/arm/boot/dts/bcm4708-huawei-ws880.dts +@@ -0,0 +1,94 @@ ++/* ++ * Broadcom BCM470X / BCM5301X ARM platform code. ++ * DTS for Huawei WS880 ++ * ++ * Copyright (C) 2015 Sergey Shatunov ++ * ++ * Licensed under the GNU/GPL. See COPYING for details. ++ */ ++ ++/dts-v1/; ++ ++#include "bcm4708.dtsi" ++#include "bcm5301x-nand-cs0-bch8.dtsi" ++ ++/ { ++ compatible = "huawei,ws880", "brcm,bcm4708"; ++ model = "Huawei WS880 (BCM4708)"; ++ ++ chosen { ++ bootargs = "console=ttyS0,115200"; ++ }; ++ ++ memory { ++ reg = <0x00000000 0x08000000>; ++ }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ ++ wlan { ++ label = "bcm53xx:white:wlan"; ++ gpios = <&chipcommon 0 GPIO_ACTIVE_LOW>; ++ linux,default-trigger = "default-on"; ++ }; ++ ++ lan { ++ label = "bcm53xx:white:lan"; ++ gpios = <&chipcommon 1 GPIO_ACTIVE_LOW>; ++ linux,default-trigger = "default-on"; ++ }; ++ ++ wps { ++ label = "bcm53xx:white:wps"; ++ gpios = <&chipcommon 6 GPIO_ACTIVE_LOW>; ++ linux,default-trigger = "default-on"; ++ }; ++ ++ internet { ++ label = "bcm53xx:white:internet"; ++ gpios = <&chipcommon 12 GPIO_ACTIVE_HIGH>; ++ linux,default-trigger = "default-on"; ++ }; ++ ++ usb { ++ label = "bcm53xx:white:usb"; ++ gpios = <&chipcommon 14 GPIO_ACTIVE_LOW>; ++ linux,default-trigger = "default-on"; ++ }; ++ }; ++ ++ gpio-keys { ++ compatible = "gpio-keys"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ restart { ++ label = "Reset"; ++ linux,code = ; ++ gpios = <&chipcommon 2 GPIO_ACTIVE_LOW>; ++ }; ++ ++ wps { ++ label = "WPS"; ++ linux,code = ; ++ gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>; ++ }; ++ ++ power { ++ label = "Power"; ++ linux,code = ; ++ gpios = <&chipcommon 15 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++ ++ nand@18028000 { ++ nandcs@0 { ++ nand-ecc-strength = <4>; ++ }; ++ }; ++}; ++ ++&uart0 { ++ status = "okay"; ++}; diff --git a/target/linux/bcm53xx/patches-4.3/910-ARM-BCM5301X-Add-DT-for-Huawei-WS880.patch b/target/linux/bcm53xx/patches-4.3/910-ARM-BCM5301X-Add-DT-for-Huawei-WS880.patch new file mode 100644 index 0000000..1a73e64 --- /dev/null +++ b/target/linux/bcm53xx/patches-4.3/910-ARM-BCM5301X-Add-DT-for-Huawei-WS880.patch @@ -0,0 +1,115 @@ +From: Sergey Shatunov +Subject: [PATCH] ARM: BCM5301X: Add DT for Huawei WS880 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Sergey Shatunov +--- +--- a/arch/arm/boot/dts/Makefile ++++ b/arch/arm/boot/dts/Makefile +@@ -59,6 +59,7 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \ + bcm4708-asus-rt-ac56u.dtb \ + bcm4708-asus-rt-ac68u.dtb \ + bcm4708-buffalo-wzr-1750dhp.dtb \ ++ bcm4708-huawei-ws880.dtb \ + bcm4708-linksys-ea6300-v1.dtb \ + bcm4708-luxul-xwc-1000.dtb \ + bcm4708-netgear-r6250.dtb \ +--- /dev/null ++++ b/arch/arm/boot/dts/bcm4708-huawei-ws880.dts +@@ -0,0 +1,94 @@ ++/* ++ * Broadcom BCM470X / BCM5301X ARM platform code. ++ * DTS for Huawei WS880 ++ * ++ * Copyright (C) 2015 Sergey Shatunov ++ * ++ * Licensed under the GNU/GPL. See COPYING for details. ++ */ ++ ++/dts-v1/; ++ ++#include "bcm4708.dtsi" ++#include "bcm5301x-nand-cs0-bch8.dtsi" ++ ++/ { ++ compatible = "huawei,ws880", "brcm,bcm4708"; ++ model = "Huawei WS880 (BCM4708)"; ++ ++ chosen { ++ bootargs = "console=ttyS0,115200"; ++ }; ++ ++ memory { ++ reg = <0x00000000 0x08000000>; ++ }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ ++ wlan { ++ label = "bcm53xx:white:wlan"; ++ gpios = <&chipcommon 0 GPIO_ACTIVE_LOW>; ++ linux,default-trigger = "default-on"; ++ }; ++ ++ lan { ++ label = "bcm53xx:white:lan"; ++ gpios = <&chipcommon 1 GPIO_ACTIVE_LOW>; ++ linux,default-trigger = "default-on"; ++ }; ++ ++ wps { ++ label = "bcm53xx:white:wps"; ++ gpios = <&chipcommon 6 GPIO_ACTIVE_LOW>; ++ linux,default-trigger = "default-on"; ++ }; ++ ++ internet { ++ label = "bcm53xx:white:internet"; ++ gpios = <&chipcommon 12 GPIO_ACTIVE_HIGH>; ++ linux,default-trigger = "default-on"; ++ }; ++ ++ usb { ++ label = "bcm53xx:white:usb"; ++ gpios = <&chipcommon 14 GPIO_ACTIVE_LOW>; ++ linux,default-trigger = "default-on"; ++ }; ++ }; ++ ++ gpio-keys { ++ compatible = "gpio-keys"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ restart { ++ label = "Reset"; ++ linux,code = ; ++ gpios = <&chipcommon 2 GPIO_ACTIVE_LOW>; ++ }; ++ ++ wps { ++ label = "WPS"; ++ linux,code = ; ++ gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>; ++ }; ++ ++ power { ++ label = "Power"; ++ linux,code = ; ++ gpios = <&chipcommon 15 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++ ++ nand@18028000 { ++ nandcs@0 { ++ nand-ecc-strength = <4>; ++ }; ++ }; ++}; ++ ++&uart0 { ++ status = "okay"; ++};