Andrew Lunn | 7e0a6b8 | 2014-05-26 21:29:49 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Device Tree common file for LaCie 2Big and 5Big Network v2 |
| 3 | * |
| 4 | * Copyright (C) 2014 |
| 5 | * |
| 6 | * Andrew Lunn <andrew@lunn.ch> |
| 7 | * |
| 8 | * Based on netxbig_v2-setup.c, |
| 9 | * Copyright (C) 2010 Simon Guinot <sguinot@lacie.com> |
| 10 | * |
| 11 | * This file is licensed under the terms of the GNU General Public |
| 12 | * License version 2. This program is licensed "as is" without any |
| 13 | * warranty of any kind, whether express or implied. |
| 14 | */ |
| 15 | |
Simon Guinot | 767361f | 2015-09-26 23:02:35 +0200 | [diff] [blame] | 16 | #include <dt-bindings/leds/leds-netxbig.h> |
Andrew Lunn | 7e0a6b8 | 2014-05-26 21:29:49 +0200 | [diff] [blame] | 17 | #include "kirkwood.dtsi" |
| 18 | #include "kirkwood-6281.dtsi" |
| 19 | |
| 20 | / { |
| 21 | chosen { |
| 22 | bootargs = "console=ttyS0,115200n8"; |
| 23 | stdout-path = &uart0; |
| 24 | }; |
| 25 | |
| 26 | ocp@f1000000 { |
| 27 | serial@12000 { |
| 28 | status = "okay"; |
| 29 | }; |
| 30 | |
| 31 | spi@10600 { |
| 32 | status = "okay"; |
| 33 | |
| 34 | flash@0 { |
| 35 | #address-cells = <1>; |
| 36 | #size-cells = <1>; |
Rafał Miłecki | 943d45a | 2015-05-19 13:40:16 +0200 | [diff] [blame] | 37 | compatible = "mxicy,mx25l4005a", "jedec,spi-nor"; |
Andrew Lunn | 7e0a6b8 | 2014-05-26 21:29:49 +0200 | [diff] [blame] | 38 | reg = <0>; |
| 39 | spi-max-frequency = <20000000>; |
| 40 | mode = <0>; |
| 41 | |
| 42 | partition@0 { |
| 43 | reg = <0x0 0x80000>; |
| 44 | label = "u-boot"; |
| 45 | }; |
| 46 | }; |
| 47 | }; |
| 48 | |
| 49 | sata@80000 { |
| 50 | status = "okay"; |
| 51 | nr-ports = <2>; |
| 52 | }; |
| 53 | |
| 54 | }; |
| 55 | |
| 56 | gpio-keys { |
| 57 | compatible = "gpio-keys"; |
| 58 | #address-cells = <1>; |
| 59 | #size-cells = <0>; |
| 60 | |
| 61 | /* |
Andrew Lunn | 395c755 | 2016-04-03 04:03:43 +0200 | [diff] [blame^] | 62 | * esc and power represent a three position rocker |
Andrew Lunn | 7e0a6b8 | 2014-05-26 21:29:49 +0200 | [diff] [blame] | 63 | * switch. Thus the conventional KEY_POWER does not fit |
| 64 | */ |
Andrew Lunn | 395c755 | 2016-04-03 04:03:43 +0200 | [diff] [blame^] | 65 | exc { |
Andrew Lunn | 7e0a6b8 | 2014-05-26 21:29:49 +0200 | [diff] [blame] | 66 | label = "Back power switch (on|auto)"; |
| 67 | linux,code = <KEY_ESC>; |
| 68 | linux,input-type = <5>; |
| 69 | gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; |
| 70 | }; |
Andrew Lunn | 395c755 | 2016-04-03 04:03:43 +0200 | [diff] [blame^] | 71 | power { |
Andrew Lunn | 7e0a6b8 | 2014-05-26 21:29:49 +0200 | [diff] [blame] | 72 | label = "Back power switch (auto|off)"; |
| 73 | linux,code = <KEY_1>; |
| 74 | linux,input-type = <5>; |
| 75 | gpios = <&gpio0 15 GPIO_ACTIVE_LOW>; |
| 76 | }; |
Andrew Lunn | 395c755 | 2016-04-03 04:03:43 +0200 | [diff] [blame^] | 77 | option { |
Andrew Lunn | 7e0a6b8 | 2014-05-26 21:29:49 +0200 | [diff] [blame] | 78 | label = "Function button"; |
| 79 | linux,code = <KEY_OPTION>; |
| 80 | gpios = <&gpio1 2 GPIO_ACTIVE_LOW>; |
| 81 | }; |
| 82 | |
| 83 | }; |
| 84 | |
| 85 | gpio-poweroff { |
| 86 | compatible = "gpio-poweroff"; |
| 87 | gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>; |
| 88 | }; |
| 89 | |
| 90 | regulators: regulators { |
| 91 | status = "okay"; |
| 92 | compatible = "simple-bus"; |
| 93 | #address-cells = <1>; |
| 94 | #size-cells = <0>; |
| 95 | pinctrl-names = "default"; |
| 96 | |
| 97 | regulator@1 { |
| 98 | compatible = "regulator-fixed"; |
| 99 | reg = <1>; |
| 100 | regulator-name = "hdd0power"; |
| 101 | regulator-min-microvolt = <5000000>; |
| 102 | regulator-max-microvolt = <5000000>; |
| 103 | enable-active-high; |
| 104 | regulator-always-on; |
| 105 | regulator-boot-on; |
| 106 | gpio = <&gpio0 16 GPIO_ACTIVE_HIGH>; |
| 107 | }; |
Andrew Lunn | 7e0a6b8 | 2014-05-26 21:29:49 +0200 | [diff] [blame] | 108 | }; |
Simon Guinot | 767361f | 2015-09-26 23:02:35 +0200 | [diff] [blame] | 109 | |
| 110 | netxbig_gpio_ext: netxbig-gpio-ext { |
| 111 | compatible = "lacie,netxbig-gpio-ext"; |
| 112 | |
| 113 | addr-gpios = <&gpio1 15 GPIO_ACTIVE_HIGH |
| 114 | &gpio1 16 GPIO_ACTIVE_HIGH |
| 115 | &gpio1 17 GPIO_ACTIVE_HIGH>; |
| 116 | data-gpios = <&gpio1 12 GPIO_ACTIVE_HIGH |
| 117 | &gpio1 13 GPIO_ACTIVE_HIGH |
| 118 | &gpio1 14 GPIO_ACTIVE_HIGH>; |
| 119 | enable-gpio = <&gpio0 29 GPIO_ACTIVE_HIGH>; |
| 120 | }; |
| 121 | |
| 122 | netxbig-leds { |
| 123 | compatible = "lacie,netxbig-leds"; |
| 124 | |
| 125 | gpio-ext = <&netxbig_gpio_ext>; |
| 126 | |
| 127 | timers = <NETXBIG_LED_TIMER1 500 500 |
| 128 | NETXBIG_LED_TIMER2 500 1000>; |
| 129 | |
| 130 | blue-power { |
| 131 | label = "netxbig:blue:power"; |
| 132 | mode-addr = <0>; |
| 133 | mode-val = <NETXBIG_LED_OFF 0 |
| 134 | NETXBIG_LED_ON 1 |
| 135 | NETXBIG_LED_TIMER1 3 |
| 136 | NETXBIG_LED_TIMER2 7>; |
| 137 | bright-addr = <1>; |
| 138 | max-brightness = <7>; |
| 139 | }; |
| 140 | red-power { |
| 141 | label = "netxbig:red:power"; |
| 142 | mode-addr = <0>; |
| 143 | mode-val = <NETXBIG_LED_OFF 0 |
| 144 | NETXBIG_LED_ON 2 |
| 145 | NETXBIG_LED_TIMER1 4>; |
| 146 | bright-addr = <1>; |
| 147 | max-brightness = <7>; |
| 148 | }; |
| 149 | blue-sata0 { |
| 150 | label = "netxbig:blue:sata0"; |
| 151 | mode-addr = <3>; |
| 152 | mode-val = <NETXBIG_LED_OFF 0 |
| 153 | NETXBIG_LED_ON 7 |
| 154 | NETXBIG_LED_SATA 1 |
| 155 | NETXBIG_LED_TIMER1 3>; |
| 156 | bright-addr = <2>; |
| 157 | max-brightness = <7>; |
| 158 | }; |
| 159 | red-sata0 { |
| 160 | label = "netxbig:red:sata0"; |
| 161 | mode-addr = <3>; |
| 162 | mode-val = <NETXBIG_LED_OFF 0 |
| 163 | NETXBIG_LED_ON 2 |
| 164 | NETXBIG_LED_TIMER1 4>; |
| 165 | bright-addr = <2>; |
| 166 | max-brightness = <7>; |
| 167 | }; |
| 168 | blue-sata1 { |
| 169 | label = "netxbig:blue:sata1"; |
| 170 | mode-addr = <4>; |
| 171 | mode-val = <NETXBIG_LED_OFF 0 |
| 172 | NETXBIG_LED_ON 7 |
| 173 | NETXBIG_LED_SATA 1 |
| 174 | NETXBIG_LED_TIMER1 3>; |
| 175 | bright-addr = <2>; |
| 176 | max-brightness = <7>; |
| 177 | }; |
| 178 | red-sata1 { |
| 179 | label = "netxbig:red:sata1"; |
| 180 | mode-addr = <4>; |
| 181 | mode-val = <NETXBIG_LED_OFF 0 |
| 182 | NETXBIG_LED_ON 2 |
| 183 | NETXBIG_LED_TIMER1 4>; |
| 184 | bright-addr = <2>; |
| 185 | max-brightness = <7>; |
| 186 | }; |
| 187 | }; |
Andrew Lunn | 7e0a6b8 | 2014-05-26 21:29:49 +0200 | [diff] [blame] | 188 | }; |
| 189 | |
| 190 | &mdio { |
| 191 | status = "okay"; |
| 192 | |
| 193 | ethphy0: ethernet-phy@0 { |
| 194 | reg = <8>; |
| 195 | }; |
| 196 | |
| 197 | ethphy1: ethernet-phy@1 { |
| 198 | reg = <0>; |
| 199 | }; |
| 200 | }; |
| 201 | |
| 202 | ð0 { |
| 203 | status = "okay"; |
| 204 | ethernet0-port@0 { |
| 205 | phy-handle = <ðphy0>; |
| 206 | }; |
| 207 | }; |
| 208 | |
| 209 | &pinctrl { |
| 210 | pinctrl-names = "default"; |
| 211 | |
| 212 | pmx_button_function: pmx-button-function { |
| 213 | marvell,pins = "mpp34"; |
| 214 | marvell,function = "gpio"; |
| 215 | }; |
| 216 | pmx_button_power_off: pmx-button-power-off { |
| 217 | marvell,pins = "mpp15"; |
| 218 | marvell,function = "gpio"; |
| 219 | }; |
| 220 | pmx_button_power_on: pmx-button-power-on { |
| 221 | marvell,pins = "mpp13"; |
| 222 | marvell,function = "gpio"; |
| 223 | }; |
| 224 | }; |
| 225 | |
| 226 | &i2c0 { |
| 227 | status = "okay"; |
| 228 | |
| 229 | eeprom@50 { |
| 230 | compatible = "atmel,24c04"; |
| 231 | pagesize = <16>; |
| 232 | reg = <0x50>; |
| 233 | }; |
Andrew Lunn | 7e0a6b8 | 2014-05-26 21:29:49 +0200 | [diff] [blame] | 234 | }; |