brcm47xx: remove linux 4.9 support
[openwrt/openwrt.git] / target / linux / kirkwood / patches-4.9 / 107-02-nsa310b.patch
1 kirkwood: add nsa310b dtb, a zyxel nsa310 variant
2
3 add support to a nsa310 variant with red/green usb led
4 and lm85 temp/fan controller
5
6 Signed-off-by: Alberto Bursi <alberto.bursi@outlook.it>
7
8 NOTE: this patch can be upstreamed as-is, LEDE-specific
9 nand partitions are set in another patch
10
11 --- a/arch/arm/boot/dts/Makefile
12 +++ b/arch/arm/boot/dts/Makefile
13 @@ -238,6 +238,7 @@ dtb-$(CONFIG_MACH_KIRKWOOD) += \
14 kirkwood-ns2mini.dtb \
15 kirkwood-nsa310.dtb \
16 kirkwood-nsa310a.dtb \
17 + kirkwood-nsa310b.dtb \
18 kirkwood-nsa320.dtb \
19 kirkwood-nsa325.dtb \
20 kirkwood-openblocks_a6.dtb \
21 --- /dev/null
22 +++ b/arch/arm/boot/dts/kirkwood-nsa310b.dts
23 @@ -0,0 +1,124 @@
24 +/dts-v1/;
25 +
26 +#include "kirkwood-nsa3x0-common.dtsi"
27 +
28 +/*
29 + * There are at least two different NSA310 designs. This variant has
30 + * a red/green USB Led (same as nsa310) and a lm85 temp/fan controller.
31 + */
32 +
33 +/ {
34 + model = "ZyXEL NSA310b";
35 + compatible = "zyxel,nsa310b", "zyxel,nsa310", "marvell,kirkwood-88f6281", "marvell,kirkwood";
36 +
37 + memory {
38 + device_type = "memory";
39 + reg = <0x00000000 0x10000000>;
40 + };
41 +
42 + chosen {
43 + bootargs = "console=ttyS0,115200";
44 + stdout-path = &uart0;
45 + };
46 +
47 + ocp@f1000000 {
48 + pinctrl: pin-controller@10000 {
49 + pinctrl-names = "default";
50 +
51 + pmx_led_esata_green: pmx-led-esata-green {
52 + marvell,pins = "mpp12";
53 + marvell,function = "gpio";
54 + };
55 +
56 + pmx_led_esata_red: pmx-led-esata-red {
57 + marvell,pins = "mpp13";
58 + marvell,function = "gpio";
59 + };
60 +
61 + pmx_led_usb_green: pmx-led-usb-green {
62 + marvell,pins = "mpp15";
63 + marvell,function = "gpio";
64 + };
65 +
66 + pmx_led_usb_red: pmx-led-usb-red {
67 + marvell,pins = "mpp16";
68 + marvell,function = "gpio";
69 + };
70 +
71 + pmx_led_sys_green: pmx-led-sys-green {
72 + marvell,pins = "mpp28";
73 + marvell,function = "gpio";
74 + };
75 +
76 + pmx_led_sys_red: pmx-led-sys-red {
77 + marvell,pins = "mpp29";
78 + marvell,function = "gpio";
79 + };
80 +
81 + pmx_led_hdd_green: pmx-led-hdd-green {
82 + marvell,pins = "mpp41";
83 + marvell,function = "gpio";
84 + };
85 +
86 + pmx_led_hdd_red: pmx-led-hdd-red {
87 + marvell,pins = "mpp42";
88 + marvell,function = "gpio";
89 + };
90 +
91 + };
92 +
93 + i2c@11000 {
94 + status = "okay";
95 +
96 + lm85: lm85@2e {
97 + compatible = "national,lm85";
98 + reg = <0x2e>;
99 + };
100 + };
101 + };
102 +
103 + gpio-leds {
104 + compatible = "gpio-leds";
105 +
106 + green-sys {
107 + label = "nsa310:green:sys";
108 + gpios = <&gpio0 28 GPIO_ACTIVE_HIGH>;
109 + };
110 + red-sys {
111 + label = "nsa310:red:sys";
112 + gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>;
113 + };
114 + green-hdd {
115 + label = "nsa310:green:hdd";
116 + gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>;
117 + };
118 + red-hdd {
119 + label = "nsa310:red:hdd";
120 + gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
121 + };
122 + green-esata {
123 + label = "nsa310:green:esata";
124 + gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
125 + };
126 + red-esata {
127 + label = "nsa310:red:esata";
128 + gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
129 + };
130 + green-usb {
131 + label = "nsa310:green:usb";
132 + gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
133 + };
134 + red-usb {
135 + label = "nsa310:red:usb";
136 + gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>;
137 + };
138 + green-copy {
139 + label = "nsa310:green:copy";
140 + gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
141 + };
142 + red-copy {
143 + label = "nsa310:red:copy";
144 + gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>;
145 + };
146 + };
147 +};