kirkwood: set default state for status LEDs in device tree
[openwrt/staging/wigyori.git] / target / linux / kirkwood / patches-4.14 / 108-on100.patch
1 --- /dev/null
2 +++ b/arch/arm/boot/dts/kirkwood-on100.dts
3 @@ -0,0 +1,165 @@
4 +/dts-v1/;
5 +
6 +#include "kirkwood.dtsi"
7 +#include "kirkwood-6282.dtsi"
8 +
9 +/ {
10 + model = "Cisco Systems ON100";
11 + compatible = "cisco,on100", "marvell,kirkwood-88f6282", "marvell,kirkwood";
12 +
13 + memory {
14 + device_type = "memory";
15 + reg = <0x00000000 0x20000000>;
16 + };
17 +
18 + aliases {
19 + led-boot = &led_health_green;
20 + led-failsafe = &led_health_red;
21 + led-running = &led_health_green;
22 + led-upgrade = &led_health_red;
23 + serial0 = &uart0;
24 + };
25 +
26 + chosen {
27 + bootargs = "console=ttyS0,115200n8 earlyprintk";
28 + stdout-path = "serial0:115200n8";
29 + };
30 +
31 + gpio_keys {
32 + compatible = "gpio-keys";
33 + #address-cells = <1>;
34 + #size-cells = <0>;
35 + pinctrl-0 = <&pmx_btn_reset>;
36 + pinctrl-names = "default";
37 +
38 + button@1 {
39 + label = "Reset Button";
40 + linux,code = <KEY_RESTART>;
41 + gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
42 + };
43 + };
44 +
45 + gpio-leds {
46 + compatible = "gpio-leds";
47 + pinctrl-0 = < &pmx_led_health_r &pmx_led_health_g >;
48 + pinctrl-names = "default";
49 +
50 + led_health_green: health_green {
51 + label = "on100:green:health";
52 + gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
53 + default-state = "on";
54 + };
55 +
56 + led_health_red: health_red {
57 + label = "on100:red:health";
58 + gpios = <&gpio1 13 GPIO_ACTIVE_LOW>;
59 + };
60 +
61 + health2_green {
62 + label = "on100:green:health2";
63 + gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
64 + };
65 +
66 + health2_red {
67 + label = "on100:red:health2";
68 + gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
69 + };
70 + };
71 +};
72 +
73 +&eth0 {
74 + status = "okay";
75 +
76 + ethernet0-port@0 {
77 + phy-handle = <&ethphy0>;
78 + phy-connection-type = "rgmii-id";
79 + };
80 +};
81 +
82 +&eth1 {
83 + status = "okay";
84 +
85 + ethernet1-port@0 {
86 + phy-handle = <&ethphy1>;
87 + phy-connection-type = "rgmii-id";
88 + };
89 +};
90 +
91 +&mdio {
92 + status = "okay";
93 +
94 + ethphy0: ethernet-phy@0 {
95 + /* Marvell 88E1121R */
96 + compatible = "ethernet-phy-id0141.0cb0",
97 + "ethernet-phy-ieee802.3-c22";
98 + reg = <0>;
99 + };
100 +
101 + ethphy1: ethernet-phy@1 {
102 + /* Marvell 88E1121R */
103 + compatible = "ethernet-phy-id0141.0cb0",
104 + "ethernet-phy-ieee802.3-c22";
105 + reg = <1>;
106 + };
107 +};
108 +
109 +&nand {
110 + status = "okay";
111 +
112 + partition@0 {
113 + label = "u-boot";
114 + reg = <0x00000000 0x000a0000>;
115 + read-only;
116 + };
117 +
118 + partition@a0000 {
119 + label = "u-boot environment";
120 + reg = <0x000a0000 0x00020000>;
121 + read-only;
122 + };
123 +
124 + partition@c0000 {
125 + label = "kernel";
126 + reg = <0x000c0000 0x00540000>;
127 + };
128 +
129 + partition@600000 {
130 + label = "ubi";
131 + reg = <0x00600000 0x1fa00000>;
132 + };
133 +};
134 +
135 +&pinctrl {
136 + pmx_led_health_r: pmx-led-health-r {
137 + marvell,pins = "mpp45";
138 + marvell,function = "gpio";
139 + };
140 +
141 + pmx_led_health_g: pmx-led-health-g {
142 + marvell,pins = "mpp44";
143 + marvell,function = "gpio";
144 + };
145 +
146 + pmx_led_health2_r: pmx-led-health2-r {
147 + marvell,pins = "mpp47";
148 + marvell,function = "gpio";
149 + };
150 +
151 + pmx_led_health2_g: pmx-led-health2-g {
152 + marvell,pins = "mpp46";
153 + marvell,function = "gpio";
154 + };
155 +
156 + pmx_btn_reset: pmx-led-reset {
157 + marvell,pins = "mpp31";
158 + marvell,function = "gpio";
159 + };
160 +};
161 +
162 +&sdio {
163 + status = "okay";
164 +};
165 +
166 +&uart0 {
167 + status = "okay";
168 +};
169 --- a/arch/arm/boot/dts/Makefile
170 +++ b/arch/arm/boot/dts/Makefile
171 @@ -271,6 +271,7 @@ dtb-$(CONFIG_MACH_KIRKWOOD) += \
172 kirkwood-nsa310b.dtb \
173 kirkwood-nsa320.dtb \
174 kirkwood-nsa325.dtb \
175 + kirkwood-on100.dtb \
176 kirkwood-openblocks_a6.dtb \
177 kirkwood-openblocks_a7.dtb \
178 kirkwood-openrd-base.dtb \