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