Tom Rini | 53633a8 | 2024-02-29 12:33:36 -0500 | [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>; |
| 35 | compatible = "mxicy,mx25l4005a", "jedec,spi-nor"; |
| 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"; |
Tom Rini | 53633a8 | 2024-02-29 12:33:36 -0500 | [diff] [blame] | 56 | |
| 57 | /* |
| 58 | * esc and power represent a three position rocker |
| 59 | * switch. Thus the conventional KEY_POWER does not fit |
| 60 | */ |
Tom Rini | 6b642ac | 2024-10-01 12:20:28 -0600 | [diff] [blame] | 61 | button-exc { |
Tom Rini | 53633a8 | 2024-02-29 12:33:36 -0500 | [diff] [blame] | 62 | label = "Back power switch (on|auto)"; |
| 63 | linux,code = <KEY_ESC>; |
| 64 | linux,input-type = <5>; |
| 65 | gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; |
| 66 | }; |
Tom Rini | 6b642ac | 2024-10-01 12:20:28 -0600 | [diff] [blame] | 67 | button-power { |
Tom Rini | 53633a8 | 2024-02-29 12:33:36 -0500 | [diff] [blame] | 68 | label = "Back power switch (auto|off)"; |
| 69 | linux,code = <KEY_1>; |
| 70 | linux,input-type = <5>; |
| 71 | gpios = <&gpio0 15 GPIO_ACTIVE_LOW>; |
| 72 | }; |
Tom Rini | 6b642ac | 2024-10-01 12:20:28 -0600 | [diff] [blame] | 73 | button-option { |
Tom Rini | 53633a8 | 2024-02-29 12:33:36 -0500 | [diff] [blame] | 74 | label = "Function button"; |
| 75 | linux,code = <KEY_OPTION>; |
| 76 | gpios = <&gpio1 2 GPIO_ACTIVE_LOW>; |
| 77 | }; |
| 78 | |
| 79 | }; |
| 80 | |
| 81 | gpio-poweroff { |
| 82 | compatible = "gpio-poweroff"; |
| 83 | gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>; |
| 84 | }; |
| 85 | |
| 86 | regulators: regulators { |
| 87 | status = "okay"; |
| 88 | compatible = "simple-bus"; |
| 89 | #address-cells = <1>; |
| 90 | #size-cells = <0>; |
| 91 | pinctrl-names = "default"; |
| 92 | |
| 93 | regulator@1 { |
| 94 | compatible = "regulator-fixed"; |
| 95 | reg = <1>; |
| 96 | regulator-name = "hdd0power"; |
| 97 | regulator-min-microvolt = <5000000>; |
| 98 | regulator-max-microvolt = <5000000>; |
| 99 | enable-active-high; |
| 100 | regulator-always-on; |
| 101 | regulator-boot-on; |
| 102 | gpio = <&gpio0 16 GPIO_ACTIVE_HIGH>; |
| 103 | }; |
| 104 | }; |
| 105 | |
| 106 | netxbig_gpio_ext: netxbig-gpio-ext { |
| 107 | compatible = "lacie,netxbig-gpio-ext"; |
| 108 | |
| 109 | addr-gpios = <&gpio1 15 GPIO_ACTIVE_HIGH |
| 110 | &gpio1 16 GPIO_ACTIVE_HIGH |
| 111 | &gpio1 17 GPIO_ACTIVE_HIGH>; |
| 112 | data-gpios = <&gpio1 12 GPIO_ACTIVE_HIGH |
| 113 | &gpio1 13 GPIO_ACTIVE_HIGH |
| 114 | &gpio1 14 GPIO_ACTIVE_HIGH>; |
| 115 | enable-gpio = <&gpio0 29 GPIO_ACTIVE_HIGH>; |
| 116 | }; |
| 117 | |
| 118 | netxbig-leds { |
| 119 | compatible = "lacie,netxbig-leds"; |
| 120 | |
| 121 | gpio-ext = <&netxbig_gpio_ext>; |
| 122 | |
| 123 | timers = <NETXBIG_LED_TIMER1 500 500 |
| 124 | NETXBIG_LED_TIMER2 500 1000>; |
| 125 | |
| 126 | blue-power { |
| 127 | label = "netxbig:blue:power"; |
| 128 | mode-addr = <0>; |
| 129 | mode-val = <NETXBIG_LED_OFF 0 |
| 130 | NETXBIG_LED_ON 1 |
| 131 | NETXBIG_LED_TIMER1 3 |
| 132 | NETXBIG_LED_TIMER2 7>; |
| 133 | bright-addr = <1>; |
| 134 | max-brightness = <7>; |
| 135 | }; |
| 136 | red-power { |
| 137 | label = "netxbig:red:power"; |
| 138 | mode-addr = <0>; |
| 139 | mode-val = <NETXBIG_LED_OFF 0 |
| 140 | NETXBIG_LED_ON 2 |
| 141 | NETXBIG_LED_TIMER1 4>; |
| 142 | bright-addr = <1>; |
| 143 | max-brightness = <7>; |
| 144 | }; |
| 145 | blue-sata0 { |
| 146 | label = "netxbig:blue:sata0"; |
| 147 | mode-addr = <3>; |
| 148 | mode-val = <NETXBIG_LED_OFF 0 |
| 149 | NETXBIG_LED_ON 7 |
| 150 | NETXBIG_LED_SATA 1 |
| 151 | NETXBIG_LED_TIMER1 3>; |
| 152 | bright-addr = <2>; |
| 153 | max-brightness = <7>; |
| 154 | }; |
| 155 | red-sata0 { |
| 156 | label = "netxbig:red:sata0"; |
| 157 | mode-addr = <3>; |
| 158 | mode-val = <NETXBIG_LED_OFF 0 |
| 159 | NETXBIG_LED_ON 2 |
| 160 | NETXBIG_LED_TIMER1 4>; |
| 161 | bright-addr = <2>; |
| 162 | max-brightness = <7>; |
| 163 | }; |
| 164 | blue-sata1 { |
| 165 | label = "netxbig:blue:sata1"; |
| 166 | mode-addr = <4>; |
| 167 | mode-val = <NETXBIG_LED_OFF 0 |
| 168 | NETXBIG_LED_ON 7 |
| 169 | NETXBIG_LED_SATA 1 |
| 170 | NETXBIG_LED_TIMER1 3>; |
| 171 | bright-addr = <2>; |
| 172 | max-brightness = <7>; |
| 173 | }; |
| 174 | red-sata1 { |
| 175 | label = "netxbig:red:sata1"; |
| 176 | mode-addr = <4>; |
| 177 | mode-val = <NETXBIG_LED_OFF 0 |
| 178 | NETXBIG_LED_ON 2 |
| 179 | NETXBIG_LED_TIMER1 4>; |
| 180 | bright-addr = <2>; |
| 181 | max-brightness = <7>; |
| 182 | }; |
| 183 | }; |
| 184 | }; |
| 185 | |
| 186 | &mdio { |
| 187 | status = "okay"; |
| 188 | |
| 189 | ethphy0: ethernet-phy@0 { |
| 190 | reg = <8>; |
| 191 | }; |
| 192 | |
| 193 | ethphy1: ethernet-phy@1 { |
| 194 | reg = <0>; |
| 195 | }; |
| 196 | }; |
| 197 | |
| 198 | ð0 { |
| 199 | status = "okay"; |
| 200 | ethernet0-port@0 { |
| 201 | phy-handle = <ðphy0>; |
| 202 | }; |
| 203 | }; |
| 204 | |
| 205 | &pinctrl { |
| 206 | pinctrl-names = "default"; |
| 207 | |
| 208 | pmx_button_function: pmx-button-function { |
| 209 | marvell,pins = "mpp34"; |
| 210 | marvell,function = "gpio"; |
| 211 | }; |
| 212 | pmx_button_power_off: pmx-button-power-off { |
| 213 | marvell,pins = "mpp15"; |
| 214 | marvell,function = "gpio"; |
| 215 | }; |
| 216 | pmx_button_power_on: pmx-button-power-on { |
| 217 | marvell,pins = "mpp13"; |
| 218 | marvell,function = "gpio"; |
| 219 | }; |
| 220 | }; |
| 221 | |
| 222 | &i2c0 { |
| 223 | status = "okay"; |
| 224 | |
| 225 | eeprom@50 { |
| 226 | compatible = "atmel,24c04"; |
| 227 | pagesize = <16>; |
| 228 | reg = <0x50>; |
| 229 | }; |
| 230 | }; |