3067af84dfc021d5ef4434071df1e168221ec2db
[openwrt/openwrt.git] / target / linux / bcm53xx / patches-4.9 / 030-0007-ARM-BCM5301X-Add-DT-for-Luxul-XWR-3100.patch
1 From ef3bc318adeb15b38688df6a583bafea2befce43 Mon Sep 17 00:00:00 2001
2 From: Dan Haab <dhaab@luxul.com>
3 Date: Tue, 27 Sep 2016 11:27:11 -0600
4 Subject: [PATCH] ARM: BCM5301X: Add DT for Luxul XWR-3100
5
6 Luxul XWR-3100 is a wireless router based on BCM47094 SoC with two
7 4366c0 FullMAC PCIe cards on the PCB. It uses NAND with BCH-4 ECC
8 algorithm.
9
10 Signed-off-by: Dan Haab <dhaab@luxul.com>
11 Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
12 ---
13 arch/arm/boot/dts/Makefile | 1 +
14 arch/arm/boot/dts/bcm47094-luxul-xwr-3100.dts | 111 ++++++++++++++++++++++++++
15 arch/arm/boot/dts/bcm5301x-nand-cs0-bch4.dtsi | 13 +++
16 3 files changed, 125 insertions(+)
17 create mode 100644 arch/arm/boot/dts/bcm47094-luxul-xwr-3100.dts
18 create mode 100644 arch/arm/boot/dts/bcm5301x-nand-cs0-bch4.dtsi
19
20 --- a/arch/arm/boot/dts/Makefile
21 +++ b/arch/arm/boot/dts/Makefile
22 @@ -78,6 +78,7 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \
23 bcm4709-netgear-r7000.dtb \
24 bcm4709-netgear-r8000.dtb \
25 bcm47094-dlink-dir-885l.dtb \
26 + bcm47094-luxul-xwr-3100.dtb \
27 bcm47094-netgear-r8500.dtb \
28 bcm94708.dtb \
29 bcm94709.dtb \
30 --- /dev/null
31 +++ b/arch/arm/boot/dts/bcm47094-luxul-xwr-3100.dts
32 @@ -0,0 +1,111 @@
33 +/*
34 + * Copyright 2016 Luxul Inc.
35 + *
36 + * Licensed under the ISC license.
37 + */
38 +
39 +/dts-v1/;
40 +
41 +#include "bcm47094.dtsi"
42 +#include "bcm5301x-nand-cs0-bch4.dtsi"
43 +
44 +/ {
45 + compatible = "luxul,xwr-3100v1", "brcm,bcm47094", "brcm,bcm4708";
46 + model = "Luxul XWR-3100 V1";
47 +
48 + chosen {
49 + bootargs = "console=ttyS0,115200 earlycon";
50 + };
51 +
52 + memory {
53 + reg = <0x00000000 0x08000000>;
54 + };
55 +
56 + leds {
57 + compatible = "gpio-leds";
58 +
59 + power {
60 + label = "bcm53xx:green:power";
61 + gpios = <&chipcommon 0 GPIO_ACTIVE_LOW>;
62 + linux,default-trigger = "default-on";
63 + };
64 +
65 + lan3 {
66 + label = "bcm53xx:green:lan1";
67 + gpios = <&chipcommon 1 GPIO_ACTIVE_LOW>;
68 + linux,default-trigger = "default-off";
69 + };
70 +
71 + lan4 {
72 + label = "bcm53xx:green:lan0";
73 + gpios = <&chipcommon 2 GPIO_ACTIVE_LOW>;
74 + linux,default-trigger = "default-off";
75 + };
76 +
77 + wan {
78 + label = "bcm53xx:green:wan";
79 + gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>;
80 + linux,default-trigger = "default-off";
81 + };
82 +
83 + lan1 {
84 + label = "bcm53xx:green:lan3";
85 + gpios = <&chipcommon 4 GPIO_ACTIVE_LOW>;
86 + linux,default-trigger = "default-off";
87 + };
88 +
89 + lan2 {
90 + label = "bcm53xx:green:lan2";
91 + gpios = <&chipcommon 6 GPIO_ACTIVE_LOW>;
92 + linux,default-trigger = "default-off";
93 + };
94 +
95 + usb3 {
96 + label = "bcm53xx:green:usb3";
97 + gpios = <&chipcommon 8 GPIO_ACTIVE_LOW>;
98 + linux,default-trigger = "default-off";
99 + };
100 +
101 + status {
102 + label = "bcm53xx:green:status";
103 + gpios = <&chipcommon 10 GPIO_ACTIVE_LOW>;
104 + linux,default-trigger = "timer";
105 + };
106 +
107 + 2ghz {
108 + label = "bcm53xx:green:2ghz";
109 + gpios = <&chipcommon 13 GPIO_ACTIVE_LOW>;
110 + linux,default-trigger = "default-off";
111 + };
112 +
113 + 5ghz {
114 + label = "bcm53xx:green:5ghz";
115 + gpios = <&chipcommon 14 GPIO_ACTIVE_LOW>;
116 + linux,default-trigger = "default-off";
117 + };
118 + };
119 +
120 + gpio-keys {
121 + compatible = "gpio-keys";
122 + #address-cells = <1>;
123 + #size-cells = <0>;
124 +
125 + restart {
126 + label = "Reset";
127 + linux,code = <KEY_RESTART>;
128 + gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>;
129 + };
130 + };
131 +};
132 +
133 +&uart0 {
134 + status = "okay";
135 +};
136 +
137 +&usb3 {
138 + vcc-gpio = <&chipcommon 18 GPIO_ACTIVE_HIGH>;
139 +};
140 +
141 +&spi_nor {
142 + status = "okay";
143 +};
144 --- /dev/null
145 +++ b/arch/arm/boot/dts/bcm5301x-nand-cs0-bch4.dtsi
146 @@ -0,0 +1,13 @@
147 +/*
148 + * Copyright 2016 Luxul Inc.
149 + *
150 + * Licensed under the ISC license.
151 + */
152 +
153 +#include "bcm5301x-nand-cs0.dtsi"
154 +
155 +&nandcs {
156 + nand-ecc-algo = "bch";
157 + nand-ecc-strength = <4>;
158 + nand-ecc-step-size = <512>;
159 +};