[OpenWrt-Devel] [PATCH] bcm5300: add support for Phicomm K3

Hao Dong halbertdong at gmail.com
Thu Jan 17 21:47:04 EST 2019


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 <halbertdong at gmail.com>
---
 .../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 at 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 <halbertdong at gmail.com>
+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 <haotia at gmail.com>
+
+Signed-off-by: Hao Dong <halbertdong at gmail.com>
+---
+ 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 <haotia at gmail.com>
++* Copyright (C) 2019 Hao Dong <halbertdong at gmail.com>
++*/
++
++/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 = <KEY_RESTART>;
++			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 at 0 {
++			label = "boot";
++			reg = <0x0000000 0x0080000>;
++			read-only;
++		};
++
++		nvram at 80000 {
++			label = "nvram";
++			reg = <0x0080000 0x0100000>;
++		};
++
++		phicomm at 180000{
++			label = "phicomm";
++			reg = <0x0180000 0x0280000>;
++			read-only;
++		};
++
++		firmware at 400000 {
++			label = "firmware";
++			reg = <0x0400000 0x7C00000>;
++			compatible = "brcm,trx";
++		};
++	};
++};
+--
+2.17.1
-- 
2.17.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list