From patchwork Fri Jan 18 02:47:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hao Dong X-Patchwork-Id: 1027086 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="nWORCtYx"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="XVLZT640"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43glkF2pcdz9sBn for ; Fri, 18 Jan 2019 13:48:19 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:Message-Id: Date:To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=Efxy2jO5gQVeEZRcXXDf1T7yrpaXxCc7kImMpI2MoPI=; b=nWORCtYx6Ga5v+ lPTCmlr6bO3oTs0xMqPaKSzabheW9ohh4I+VpbeeZSDLnArePuwd3EKPeqtc0fhFjJnZOkuU0i8qT V0sejNCjHSM6I2s37urTF5+tWKvtv2RYPnWGl5vRubwlB/eQuZy44EHAQDn81KqGvdPiXySkuALbX afgu/axwudkCTzvgLrPfvnGYt9qNA/QuJEOXs95zNOblu1NXuEkGD+P5VTkj3eLSoQ8JMT1EMCLBf bhGgO2QDpu/6NCVEZ+o/QHbP0kMRoYEDayWAbuiE1/f0/CKvZSa48H9RAHtHDRW5VIwt4JCmQWVCW 3M2jEgK7TukMV5WoKR8g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gkKCK-00078y-FZ; Fri, 18 Jan 2019 02:47:56 +0000 Received: from mail-pl1-x642.google.com ([2607:f8b0:4864:20::642]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gkKCH-00077v-FT for openwrt-devel@lists.openwrt.org; Fri, 18 Jan 2019 02:47:55 +0000 Received: by mail-pl1-x642.google.com with SMTP id u18so5652814plq.7 for ; Thu, 17 Jan 2019 18:47:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=wKYxHrPQvtbQyYGkwx9cEv/IQnhmvmGGqpF3jy9IPxg=; b=XVLZT640sgu5F/WIgVfTs0TTxyTn/9B6FcIp/Eram9qmrum5U6OegkvoEmcp4T2FD3 2VH2fI9t5A5NTeHqxVJceEwv4BYo+VPzZY55Y/5aqFr1T7ah/6+b+gh8vH0vrudWNWrl UXX5f7cCvfxo1+cORDjbx04UxWeuL0GH/incRRoChxAfQ1aJnZYJAl7z7yHArS/Xtnc9 Gpw/i7OKg/JL3bVCGPxTfddqPV8vBXNZU5QS56wknZYbQfWLWi750hDLIHpsvkW3Fo6b yFTK3ipwjMAeLriLeLoksBAqoZx0qzBQOepcXezWuiF4ZOEVGnRkXI/LIcwoT4RGn3rC AOKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=wKYxHrPQvtbQyYGkwx9cEv/IQnhmvmGGqpF3jy9IPxg=; b=Hi9LlWY+FHC5KT5s8NRYyl+8+8YkD989NxeFys6J0IapFsJWxRge6Bp0y9nTy1Dvjg Q8k5SGBHAyXO7jKmv7mZHwbdntGOkrQIhv8CB7xsGvfFFCgSw7GbpxRF9iPkdlsZLntv 9favVO3PKnq1APF9+MWchKMcNlxIG1QUjUxtYAx3M8Lh9sJb/A4dh2rl0q2h7fKKow4t MlCVq0XHh8PRKR3JP2xgxsJ+Snofs/gYmgWRjiRFFCn1XZplb+jEnAFEus49xxQwBizV 6JrhRX5z/lJn/cB9MXApzIoLelTYG9SvrMiVILn6fzh8XQrynBE6pTvWY7H8okd/WIRp tzFg== X-Gm-Message-State: AJcUukchxG2WLmGR+WxP0NHwpU2CxKidJVIb7DWkFtE0t6ex1TN/Otag cY2k+1y11zhNlYdobwINgQLIhuzK9woO3Q== X-Google-Smtp-Source: ALg8bN793UiYryulHPN43QKi4Sbs0ChOlQEPN+0JXg5sDrswOtND3yHZc6ZjNTHPzeSjQ0dYC89fpg== X-Received: by 2002:a17:902:583:: with SMTP id f3mr17871621plf.202.1547779671261; Thu, 17 Jan 2019 18:47:51 -0800 (PST) Received: from localhost.localdomain ([47.91.214.193]) by smtp.gmail.com with ESMTPSA id v72sm5366618pfd.163.2019.01.17.18.47.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Jan 2019 18:47:50 -0800 (PST) From: Hao Dong To: openwrt-devel@lists.openwrt.org Date: Fri, 18 Jan 2019 02:47:04 +0000 Message-Id: <20190118024704.9750-1-halbertdong@gmail.com> X-Mailer: git-send-email 2.17.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190117_184753_515013_AC486367 X-CRM114-Status: GOOD ( 13.65 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:642 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (halbertdong[at]gmail.com) -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Subject: [OpenWrt-Devel] [PATCH] bcm5300: add support for Phicomm K3 X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= , Hao Dong , Florian Fainelli MIME-Version: 1.0 Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Hardware specifications: - CPU: Broadcom BCM4709C0 @1.4GHz (Dual-Core ARM) - RAM: 512 MB (DDR3) - Flash: 128 MB (NAND) - LAN ports: 3, LAN speed: 10/100/1000 - WAN ports: 1, WAN speed: 10/100/1000 - 2.4G: BCM4366 4x4 MIMO 1000Mbps -- Skyworks SE2623L 2.4GHz Power Amplifier (x4) - 5G: BCM4366 4x4 MIMO 2167Mbps -- RFMD RFPA5542 5GHz Power Amplifier Module (x4) - USB: 1x USB 3.0 port - 1x LED, 1x reset button, 1x power switch - 1x system status touch screen Flash: - Enter CFE - Upload the trx file - Reboot Signed-off-by: Hao Dong --- .../bcm53xx/base-files/etc/board.d/02_network | 6 + target/linux/bcm53xx/image/Makefile | 7 ++ ...M-dts-BCM5301X-Add-DT-for-PHICOMM-K3.patch | 118 ++++++++++++++++++ 3 files changed, 131 insertions(+) create mode 100644 target/linux/bcm53xx/patches-4.14/322-ARM-dts-BCM5301X-Add-DT-for-PHICOMM-K3.patch diff --git a/target/linux/bcm53xx/base-files/etc/board.d/02_network b/target/linux/bcm53xx/base-files/etc/board.d/02_network index dc17af4891..8c9e8b3f3f 100755 --- a/target/linux/bcm53xx/base-files/etc/board.d/02_network +++ b/target/linux/bcm53xx/base-files/etc/board.d/02_network @@ -24,6 +24,12 @@ buffalo,wzr-1750dhp) board_config_flush exit 0 ;; +phicomm,k3) + ucidef_add_switch "switch0" \ + "0:lan" "1:lan" "2:lan" "3:wan" "5@eth0" + board_config_flush + exit 0 + ;; esac wan_macaddr="$(nvram get wan_hwaddr)" diff --git a/target/linux/bcm53xx/image/Makefile b/target/linux/bcm53xx/image/Makefile index 55db479701..fc18a96232 100644 --- a/target/linux/bcm53xx/image/Makefile +++ b/target/linux/bcm53xx/image/Makefile @@ -313,6 +313,13 @@ define Device/smartrg-sr400ac endef TARGET_DEVICES += smartrg-sr400ac +define Device/phicomm-k3 + DEVICE_TITLE := PHICOMM K3 + DEVICE_PACKAGES := $(BRCMFMAC_4366C0) $(USB3_PACKAGES) + IMAGES := trx +endef +TARGET_DEVICES += phicomm-k3 + define Device/tenda-ac9 DEVICE_TITLE := Tenda AC9 DEVICE_PACKAGES := $(B43) $(USB2_PACKAGES) diff --git a/target/linux/bcm53xx/patches-4.14/322-ARM-dts-BCM5301X-Add-DT-for-PHICOMM-K3.patch b/target/linux/bcm53xx/patches-4.14/322-ARM-dts-BCM5301X-Add-DT-for-PHICOMM-K3.patch new file mode 100644 index 0000000000..6b76b4d5ed --- /dev/null +++ b/target/linux/bcm53xx/patches-4.14/322-ARM-dts-BCM5301X-Add-DT-for-PHICOMM-K3.patch @@ -0,0 +1,117 @@ +From c148c776aa784b6898bbe81f1fdc5dff648e2a9b Mon Sep 17 00:00:00 2001 +From: Hao Dong +Date: Fri, 18 Jan 2019 02:22:36 +0000 +Subject: [PATCH] ARM: dts: BCM5301X: Add DT for Phicomm K3 + +This router has BCM4709C0, 128MB NAND flash (MX30LF1G18AC-TI), +and 512MB memory, with 3 x LAN and 1 x WAN. WL chips are +BCM4366C0 x 2. The router has a small LCD and 3 capactive keys +driven by a PIC microcontroller, which is in turn wired to +UART1 of main board. + +Everything except the LCD and wireless works. + +The founder of the patch is: Tian Hao + +Signed-off-by: Hao Dong +--- + arch/arm/boot/dts/Makefile | 1 + + arch/arm/boot/dts/bcm47094-phicomm-k3.dts | 75 +++++++++++++++++++++++ + 2 files changed, 76 insertions(+) + create mode 100644 arch/arm/boot/dts/bcm47094-phicomm-k3.dts + +diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile +index a30092e..cd3e4bb 100644 +--- a/arch/arm/boot/dts/Makefile ++++ b/arch/arm/boot/dts/Makefile +@@ -109,6 +109,7 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \ + bcm47094-luxul-xwr-3100.dtb \ + bcm47094-luxul-xwr-3150-v1.dtb \ + bcm47094-netgear-r8500.dtb \ ++ bcm47094-phicomm-k3.dtb \ + bcm94708.dtb \ + bcm94709.dtb \ + bcm953012er.dtb \ +diff --git a/arch/arm/boot/dts/bcm47094-phicomm-k3.dts b/arch/arm/boot/dts/bcm47094-phicomm-k3.dts +new file mode 100644 +index 0000000..4b6e211 +--- /dev/null ++++ b/arch/arm/boot/dts/bcm47094-phicomm-k3.dts +@@ -0,0 +1,75 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later OR MIT ++/* ++* Copyright (C) 2017 Hamster Tian ++* Copyright (C) 2019 Hao Dong ++*/ ++ ++/dts-v1/; ++ ++#include "bcm47094.dtsi" ++#include "bcm5301x-nand-cs0-bch4.dtsi" ++ ++/ { ++ compatible = "phicomm,k3", "brcm,bcm47094", "brcm,bcm4708"; ++ model = "PHICOMM K3"; ++ ++ chosen { ++ bootargs = "console=ttyS0,115200"; ++ }; ++ ++ memory { ++ reg = <0x00000000 0x08000000 ++ 0x88000000 0x18000000>; ++ }; ++ ++ gpio-keys { ++ compatible = "gpio-keys"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ restart { ++ label = "Reset"; ++ linux,code = ; ++ gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++}; ++ ++&usb3 { ++ vcc-gpio = <&chipcommon 18 GPIO_ACTIVE_HIGH>; ++}; ++ ++&usb3_phy { ++ status = "okay"; ++}; ++ ++&nandcs { ++ partitions { ++ compatible = "fixed-partitions"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ boot@0 { ++ label = "boot"; ++ reg = <0x0000000 0x0080000>; ++ read-only; ++ }; ++ ++ nvram@80000 { ++ label = "nvram"; ++ reg = <0x0080000 0x0100000>; ++ }; ++ ++ phicomm@180000{ ++ label = "phicomm"; ++ reg = <0x0180000 0x0280000>; ++ read-only; ++ }; ++ ++ firmware@400000 { ++ label = "firmware"; ++ reg = <0x0400000 0x7C00000>; ++ compatible = "brcm,trx"; ++ }; ++ }; ++}; +-- +2.17.1