bcm53xx: add support for Phicomm K3
[openwrt/openwrt.git] / target / linux / bcm53xx / patches-4.19 / 322-ARM-dts-BCM5301X-Add-basic-DT-for-Phicomm-K3.patch
1 From 8ab0ea8e9275c03f253f84dc83ee86cdbeb1fcf4 Mon Sep 17 00:00:00 2001
2 From: Hao Dong <halbertdong@gmail.com>
3 Date: Sat, 19 Jan 2019 17:25:29 +0000
4 Subject: [PATCH] ARM: dts: BCM5301X: Add basic DT for Phicomm K3
5
6 This router has BCM4709C0, 128MB NAND flash (MX30LF1G18AC-TI),
7 and 512MB memory, with 3 x LAN and 1 x WAN. WL chips are
8 BCM4366C0 x 2. The router has a small LCD and 3 capactive keys
9 driven by a PIC microcontroller, which is in turn wired to
10 UART1 of main board.
11
12 Everything except the LCD works. Hamster has activated LCD through
13 UART1, but further programming, i.e., a independent package, is
14 required to make sure its working properly.
15
16 Since the firmware of Broadcom 4366c0 has been provided by
17 openwrt.org, now its wireless is functional but limited. The
18 "official" firmware cannot work properly in some 5G Hz channel.
19
20 Signed-off-by: Hao Dong <halbertdong@gmail.com>
21 ---
22 arch/arm/boot/dts/Makefile | 1 +
23 arch/arm/boot/dts/bcm47094-phicomm-k3.dts | 75 +++++++++++++++++++++++
24 2 files changed, 76 insertions(+)
25 create mode 100644 arch/arm/boot/dts/bcm47094-phicomm-k3.dts
26
27 --- a/arch/arm/boot/dts/Makefile
28 +++ b/arch/arm/boot/dts/Makefile
29 @@ -115,6 +115,7 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \
30 bcm47094-luxul-xwr-3100.dtb \
31 bcm47094-luxul-xwr-3150-v1.dtb \
32 bcm47094-netgear-r8500.dtb \
33 + bcm47094-phicomm-k3.dtb \
34 bcm94708.dtb \
35 bcm94709.dtb \
36 bcm953012er.dtb \
37 --- /dev/null
38 +++ b/arch/arm/boot/dts/bcm47094-phicomm-k3.dts
39 @@ -0,0 +1,75 @@
40 +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
41 +/*
42 +* Copyright (C) 2017 Hamster Tian <haotia@gmail.com>
43 +* Copyright (C) 2019 Hao Dong <halbertdong@gmail.com>
44 +*/
45 +
46 +/dts-v1/;
47 +
48 +#include "bcm47094.dtsi"
49 +#include "bcm5301x-nand-cs0-bch4.dtsi"
50 +
51 +/ {
52 + compatible = "phicomm,k3", "brcm,bcm47094", "brcm,bcm4708";
53 + model = "Phicomm K3";
54 +
55 + chosen {
56 + bootargs = "console=ttyS0,115200";
57 + };
58 +
59 + memory {
60 + reg = <0x00000000 0x08000000
61 + 0x88000000 0x18000000>;
62 + };
63 +
64 + gpio-keys {
65 + compatible = "gpio-keys";
66 + #address-cells = <1>;
67 + #size-cells = <0>;
68 +
69 + restart {
70 + label = "Reset";
71 + linux,code = <KEY_RESTART>;
72 + gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>;
73 + };
74 + };
75 +};
76 +
77 +&uart1 {
78 + status = "okay";
79 +};
80 +
81 +&usb3_phy {
82 + status = "okay";
83 +};
84 +
85 +&nandcs {
86 + partitions {
87 + compatible = "fixed-partitions";
88 + #address-cells = <1>;
89 + #size-cells = <1>;
90 +
91 + partition@0 {
92 + label = "boot";
93 + reg = <0x0000000 0x0080000>;
94 + read-only;
95 + };
96 +
97 + partition@80000 {
98 + label = "nvram";
99 + reg = <0x0080000 0x0100000>;
100 + };
101 +
102 + partition@180000{
103 + label = "phicomm";
104 + reg = <0x0180000 0x0280000>;
105 + read-only;
106 + };
107 +
108 + partition@400000 {
109 + label = "firmware";
110 + reg = <0x0400000 0x7C00000>;
111 + compatible = "brcm,trx";
112 + };
113 + };
114 +};