bcm53xx: add Linux 4.9 patches
[oweals/openwrt.git] / target / linux / bcm53xx / patches-4.9 / 032-0009-ARM-BCM5301X-Add-DT-for-Luxul-XWR-1200.patch
1 From 514647c9af870bd2df2e579134a26bff8d17b6b9 Mon Sep 17 00:00:00 2001
2 From: Dan Haab <dhaab@luxul.com>
3 Date: Sat, 14 Jan 2017 19:29:28 -0700
4 Subject: [PATCH] ARM: BCM5301X: Add DT for Luxul XWR-1200
5
6 Luxul XWR-1200 in a dual-band router based on BCM47081. It uses serial
7 flash (for bootloader and NVRAM) and NAND flash (for firmware).
8
9 Signed-off-by: Dan Haab <dhaab@luxul.com>
10 Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
11 ---
12  arch/arm/boot/dts/Makefile                    |   1 +
13  arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts | 107 ++++++++++++++++++++++++++
14  2 files changed, 108 insertions(+)
15  create mode 100644 arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts
16
17 --- a/arch/arm/boot/dts/Makefile
18 +++ b/arch/arm/boot/dts/Makefile
19 @@ -74,6 +74,7 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \
20         bcm47081-buffalo-wzr-600dhp2.dtb \
21         bcm47081-buffalo-wzr-900dhp.dtb \
22         bcm47081-luxul-xap-1410.dtb \
23 +       bcm47081-luxul-xwr-1200.dtb \
24         bcm4709-asus-rt-ac87u.dtb \
25         bcm4709-buffalo-wxr-1900dhp.dtb \
26         bcm4709-netgear-r7000.dtb \
27 --- /dev/null
28 +++ b/arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts
29 @@ -0,0 +1,107 @@
30 +/*
31 + * Copyright 2017 Luxul Inc.
32 + *
33 + * Licensed under the ISC license.
34 + */
35 +
36 +/dts-v1/;
37 +
38 +#include "bcm47081.dtsi"
39 +#include "bcm5301x-nand-cs0-bch4.dtsi"
40 +
41 +/ {
42 +       compatible = "luxul,xwr-1200v1", "brcm,bcm47081", "brcm,bcm4708";
43 +       model = "Luxul XWR-1200 V1";
44 +
45 +       chosen {
46 +               bootargs = "console=ttyS0,115200";
47 +       };
48 +
49 +       memory {
50 +               reg = <0x00000000 0x08000000>;
51 +       };
52 +
53 +       leds {
54 +               compatible = "gpio-leds";
55 +
56 +               power {
57 +                       label = "bcm53xx:green:power";
58 +                       gpios = <&chipcommon 0 GPIO_ACTIVE_LOW>;
59 +                       linux,default-trigger = "default-on";
60 +               };
61 +
62 +               lan3 {
63 +                       label = "bcm53xx:green:lan3";
64 +                       gpios = <&chipcommon 1 GPIO_ACTIVE_LOW>;
65 +                       linux,default-trigger = "none";
66 +               };
67 +
68 +               lan4 {
69 +                       label = "bcm53xx:green:lan4";
70 +                       gpios = <&chipcommon 2 GPIO_ACTIVE_LOW>;
71 +                       linux,default-trigger = "none";
72 +               };
73 +
74 +               wan {
75 +                       label = "bcm53xx:green:wan";
76 +                       gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>;
77 +                       linux,default-trigger = "none";
78 +               };
79 +
80 +               lan2 {
81 +                       label = "bcm53xx:green:lan2";
82 +                       gpios = <&chipcommon 6 GPIO_ACTIVE_LOW>;
83 +                       linux,default-trigger = "none";
84 +               };
85 +
86 +               usb {
87 +                       label = "bcm53xx:green:usb";
88 +                       gpios = <&chipcommon 8 GPIO_ACTIVE_LOW>;
89 +                       linux,default-trigger = "none";
90 +               };
91 +
92 +               status {
93 +                       label = "bcm53xx:green:status";
94 +                       gpios = <&chipcommon 10 GPIO_ACTIVE_LOW>;
95 +                       linux,default-trigger = "timer";
96 +               };
97 +
98 +               2ghz {
99 +                       label = "bcm53xx:green:2ghz";
100 +                       gpios = <&chipcommon 13 GPIO_ACTIVE_LOW>;
101 +                       linux,default-trigger = "none";
102 +               };
103 +
104 +               5ghz {
105 +                       label = "bcm53xx:green:5ghz";
106 +                       gpios = <&chipcommon 14 GPIO_ACTIVE_LOW>;
107 +                       linux,default-trigger = "none";
108 +               };
109 +
110 +               lan1 {
111 +                       label = "bcm53xx:green:lan1";
112 +                       gpios = <&chipcommon 15 GPIO_ACTIVE_LOW>;
113 +                       linux,default-trigger = "none";
114 +               };
115 +       };
116 +
117 +       gpio-keys {
118 +               compatible = "gpio-keys";
119 +               #address-cells = <1>;
120 +               #size-cells = <0>;
121 +
122 +               restart {
123 +                       label = "Reset";
124 +                       linux,code = <KEY_RESTART>;
125 +                       gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>;
126 +               };
127 +       };
128 +};
129 +
130 +&usb2 {
131 +       vcc-gpio = <&chipcommon 9 GPIO_ACTIVE_HIGH>;
132 +};
133 +
134 +&spi_nor {
135 +       status = "okay";
136 +};