Commit | Line | Data |
---|---|---|
e54e4b1b | 1 | /* |
b05465ff | 2 | * Device Tree common file for kirkwood based Buffalo Linkstation |
e54e4b1b | 3 | * |
144e08ab RS |
4 | * Copyright (C) 2015, 2016 |
5 | * Roger Shimizu <rogershimizu@gmail.com> | |
e54e4b1b | 6 | * |
3e2f2db8 RS |
7 | * This file is dual-licensed: you can use it either under the terms |
8 | * of the GPL or the X11 license, at your option. Note that this dual | |
9 | * licensing only applies to this file, and not this project as a | |
10 | * whole. | |
11 | * | |
12 | * a) This file is free software; you can redistribute it and/or | |
13 | * modify it under the terms of the GNU General Public License as | |
14 | * published by the Free Software Foundation; either version 2 of the | |
15 | * License, or (at your option) any later version. | |
16 | * | |
17 | * This file is distributed in the hope that it will be useful | |
18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
20 | * GNU General Public License for more details. | |
21 | * | |
22 | * Or, alternatively | |
23 | * | |
24 | * b) Permission is hereby granted, free of charge, to any person | |
25 | * obtaining a copy of this software and associated documentation | |
26 | * files (the "Software"), to deal in the Software without | |
27 | * restriction, including without limitation the rights to use | |
28 | * copy, modify, merge, publish, distribute, sublicense, and/or | |
29 | * sell copies of the Software, and to permit persons to whom the | |
30 | * Software is furnished to do so, subject to the following | |
31 | * conditions: | |
32 | * | |
33 | * The above copyright notice and this permission notice shall be | |
34 | * included in all copies or substantial portions of the Software. | |
35 | * | |
36 | * THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND | |
37 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | |
38 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | |
39 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | |
40 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY | |
41 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | |
42 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | |
43 | * OTHER DEALINGS IN THE SOFTWARE. | |
e54e4b1b RS |
44 | */ |
45 | ||
e54e4b1b | 46 | / { |
e54e4b1b RS |
47 | chosen { |
48 | bootargs = "console=ttyS0,115200n8 earlyprintk"; | |
49 | stdout-path = &uart0; | |
50 | }; | |
51 | ||
52 | mbus { | |
53 | pcie-controller { | |
54 | status = "okay"; | |
55 | pcie@1,0 { | |
56 | status = "okay"; | |
57 | }; | |
58 | }; | |
59 | }; | |
60 | ||
61 | ocp@f1000000 { | |
62 | pinctrl: pin-controller@10000 { | |
63 | pmx_power_hdd0: pmx-power-hdd0 { | |
e54e4b1b RS |
64 | marvell,function = "gpio"; |
65 | }; | |
66 | pmx_usb_vbus: pmx-usb-vbus { | |
e54e4b1b RS |
67 | marvell,function = "gpio"; |
68 | }; | |
69 | pmx_led_alarm: pmx-led-alarm { | |
e54e4b1b RS |
70 | marvell,function = "gpio"; |
71 | }; | |
72 | pmx_led_function_red: pmx-led-function-red { | |
e54e4b1b RS |
73 | marvell,function = "gpio"; |
74 | }; | |
75 | pmx_led_function_blue: pmx-led-function-blue { | |
e54e4b1b RS |
76 | marvell,function = "gpio"; |
77 | }; | |
78 | pmx_led_info: pmx-led-info { | |
e54e4b1b RS |
79 | marvell,function = "gpio"; |
80 | }; | |
81 | pmx_led_power: pmx-led-power { | |
e54e4b1b RS |
82 | marvell,function = "gpio"; |
83 | }; | |
84 | pmx_button_function: pmx-button-function { | |
e54e4b1b RS |
85 | marvell,function = "gpio"; |
86 | }; | |
87 | pmx_power_switch: pmx-power-switch { | |
e54e4b1b RS |
88 | marvell,function = "gpio"; |
89 | }; | |
90 | pmx_power_auto_switch: pmx-power-auto-switch { | |
e54e4b1b RS |
91 | marvell,function = "gpio"; |
92 | }; | |
93 | }; | |
94 | ||
95 | serial@12000 { | |
96 | status = "okay"; | |
97 | }; | |
98 | ||
99 | sata@80000 { | |
100 | status = "okay"; | |
b05465ff | 101 | nr-ports = <1>; |
e54e4b1b RS |
102 | }; |
103 | ||
104 | spi@10600 { | |
105 | status = "okay"; | |
106 | ||
107 | m25p40@0 { | |
108 | #address-cells = <1>; | |
109 | #size-cells = <1>; | |
110 | compatible = "st,m25p40", "jedec,spi-nor"; | |
111 | reg = <0>; | |
112 | spi-max-frequency = <25000000>; | |
113 | mode = <0>; | |
114 | ||
115 | partition@0 { | |
116 | reg = <0x0 0x60000>; | |
117 | label = "uboot"; | |
118 | read-only; | |
119 | }; | |
120 | ||
121 | partition@60000 { | |
122 | reg = <0x60000 0x10000>; | |
123 | label = "dtb"; | |
124 | read-only; | |
125 | }; | |
126 | ||
127 | partition@70000 { | |
128 | reg = <0x70000 0x10000>; | |
129 | label = "uboot_env"; | |
130 | }; | |
131 | }; | |
132 | }; | |
133 | }; | |
134 | ||
135 | gpio_keys { | |
136 | compatible = "gpio-keys"; | |
137 | #address-cells = <1>; | |
138 | #size-cells = <0>; | |
139 | pinctrl-0 = <&pmx_button_function &pmx_power_switch | |
140 | &pmx_power_auto_switch>; | |
141 | pinctrl-names = "default"; | |
142 | ||
b05465ff | 143 | function-button { |
e54e4b1b RS |
144 | label = "Function Button"; |
145 | linux,code = <KEY_OPTION>; | |
e54e4b1b RS |
146 | }; |
147 | ||
b05465ff | 148 | power-on-switch { |
e54e4b1b RS |
149 | label = "Power-on Switch"; |
150 | linux,code = <KEY_RESERVED>; | |
151 | linux,input-type = <5>; | |
e54e4b1b RS |
152 | }; |
153 | ||
b05465ff | 154 | power-auto-switch { |
e54e4b1b RS |
155 | label = "Power-auto Switch"; |
156 | linux,code = <KEY_ESC>; | |
157 | linux,input-type = <5>; | |
e54e4b1b RS |
158 | }; |
159 | }; | |
160 | ||
161 | gpio_leds { | |
162 | compatible = "gpio-leds"; | |
163 | pinctrl-0 = <&pmx_led_function_red &pmx_led_alarm | |
164 | &pmx_led_info &pmx_led_power | |
b05465ff | 165 | &pmx_led_function_blue>; |
e54e4b1b | 166 | pinctrl-names = "default"; |
e54e4b1b RS |
167 | }; |
168 | ||
169 | restart_poweroff { | |
170 | compatible = "restart-poweroff"; | |
171 | }; | |
172 | ||
173 | regulators { | |
174 | compatible = "simple-bus"; | |
175 | #address-cells = <1>; | |
176 | #size-cells = <0>; | |
b05465ff | 177 | pinctrl-0 = <&pmx_power_hdd0 &pmx_usb_vbus>; |
e54e4b1b RS |
178 | pinctrl-names = "default"; |
179 | ||
180 | usb_power: regulator@1 { | |
181 | compatible = "regulator-fixed"; | |
182 | reg = <1>; | |
183 | regulator-name = "USB Power"; | |
184 | regulator-min-microvolt = <5000000>; | |
185 | regulator-max-microvolt = <5000000>; | |
186 | enable-active-high; | |
187 | regulator-always-on; | |
188 | regulator-boot-on; | |
e54e4b1b | 189 | }; |
b05465ff | 190 | |
e54e4b1b RS |
191 | hdd_power0: regulator@2 { |
192 | compatible = "regulator-fixed"; | |
193 | reg = <2>; | |
194 | regulator-name = "HDD0 Power"; | |
195 | regulator-min-microvolt = <5000000>; | |
196 | regulator-max-microvolt = <5000000>; | |
197 | enable-active-high; | |
198 | regulator-always-on; | |
199 | regulator-boot-on; | |
e54e4b1b RS |
200 | }; |
201 | }; | |
202 | }; |