0001 // SPDX-License-Identifier: GPL-2.0
0002 /*
0003 * Device Tree common file for LaCie 2Big and 5Big Network v2
0004 *
0005 * Copyright (C) 2014
0006 *
0007 * Andrew Lunn <andrew@lunn.ch>
0008 *
0009 * Based on netxbig_v2-setup.c,
0010 * Copyright (C) 2010 Simon Guinot <sguinot@lacie.com>
0011 *
0012 */
0013
0014 #include <dt-bindings/leds/leds-netxbig.h>
0015 #include "kirkwood.dtsi"
0016 #include "kirkwood-6281.dtsi"
0017
0018 / {
0019 chosen {
0020 bootargs = "console=ttyS0,115200n8";
0021 stdout-path = &uart0;
0022 };
0023
0024 ocp@f1000000 {
0025 serial@12000 {
0026 status = "okay";
0027 };
0028
0029 spi@10600 {
0030 status = "okay";
0031
0032 flash@0 {
0033 #address-cells = <1>;
0034 #size-cells = <1>;
0035 compatible = "mxicy,mx25l4005a", "jedec,spi-nor";
0036 reg = <0>;
0037 spi-max-frequency = <20000000>;
0038 mode = <0>;
0039
0040 partition@0 {
0041 reg = <0x0 0x80000>;
0042 label = "u-boot";
0043 };
0044 };
0045 };
0046
0047 sata@80000 {
0048 status = "okay";
0049 nr-ports = <2>;
0050 };
0051
0052 };
0053
0054 gpio-keys {
0055 compatible = "gpio-keys";
0056 #address-cells = <1>;
0057 #size-cells = <0>;
0058
0059 /*
0060 * esc and power represent a three position rocker
0061 * switch. Thus the conventional KEY_POWER does not fit
0062 */
0063 exc {
0064 label = "Back power switch (on|auto)";
0065 linux,code = <KEY_ESC>;
0066 linux,input-type = <5>;
0067 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
0068 };
0069 power {
0070 label = "Back power switch (auto|off)";
0071 linux,code = <KEY_1>;
0072 linux,input-type = <5>;
0073 gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
0074 };
0075 option {
0076 label = "Function button";
0077 linux,code = <KEY_OPTION>;
0078 gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
0079 };
0080
0081 };
0082
0083 gpio-poweroff {
0084 compatible = "gpio-poweroff";
0085 gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
0086 };
0087
0088 regulators: regulators {
0089 status = "okay";
0090 compatible = "simple-bus";
0091 #address-cells = <1>;
0092 #size-cells = <0>;
0093 pinctrl-names = "default";
0094
0095 regulator@1 {
0096 compatible = "regulator-fixed";
0097 reg = <1>;
0098 regulator-name = "hdd0power";
0099 regulator-min-microvolt = <5000000>;
0100 regulator-max-microvolt = <5000000>;
0101 enable-active-high;
0102 regulator-always-on;
0103 regulator-boot-on;
0104 gpio = <&gpio0 16 GPIO_ACTIVE_HIGH>;
0105 };
0106 };
0107
0108 netxbig_gpio_ext: netxbig-gpio-ext {
0109 compatible = "lacie,netxbig-gpio-ext";
0110
0111 addr-gpios = <&gpio1 15 GPIO_ACTIVE_HIGH
0112 &gpio1 16 GPIO_ACTIVE_HIGH
0113 &gpio1 17 GPIO_ACTIVE_HIGH>;
0114 data-gpios = <&gpio1 12 GPIO_ACTIVE_HIGH
0115 &gpio1 13 GPIO_ACTIVE_HIGH
0116 &gpio1 14 GPIO_ACTIVE_HIGH>;
0117 enable-gpio = <&gpio0 29 GPIO_ACTIVE_HIGH>;
0118 };
0119
0120 netxbig-leds {
0121 compatible = "lacie,netxbig-leds";
0122
0123 gpio-ext = <&netxbig_gpio_ext>;
0124
0125 timers = <NETXBIG_LED_TIMER1 500 500
0126 NETXBIG_LED_TIMER2 500 1000>;
0127
0128 blue-power {
0129 label = "netxbig:blue:power";
0130 mode-addr = <0>;
0131 mode-val = <NETXBIG_LED_OFF 0
0132 NETXBIG_LED_ON 1
0133 NETXBIG_LED_TIMER1 3
0134 NETXBIG_LED_TIMER2 7>;
0135 bright-addr = <1>;
0136 max-brightness = <7>;
0137 };
0138 red-power {
0139 label = "netxbig:red:power";
0140 mode-addr = <0>;
0141 mode-val = <NETXBIG_LED_OFF 0
0142 NETXBIG_LED_ON 2
0143 NETXBIG_LED_TIMER1 4>;
0144 bright-addr = <1>;
0145 max-brightness = <7>;
0146 };
0147 blue-sata0 {
0148 label = "netxbig:blue:sata0";
0149 mode-addr = <3>;
0150 mode-val = <NETXBIG_LED_OFF 0
0151 NETXBIG_LED_ON 7
0152 NETXBIG_LED_SATA 1
0153 NETXBIG_LED_TIMER1 3>;
0154 bright-addr = <2>;
0155 max-brightness = <7>;
0156 };
0157 red-sata0 {
0158 label = "netxbig:red:sata0";
0159 mode-addr = <3>;
0160 mode-val = <NETXBIG_LED_OFF 0
0161 NETXBIG_LED_ON 2
0162 NETXBIG_LED_TIMER1 4>;
0163 bright-addr = <2>;
0164 max-brightness = <7>;
0165 };
0166 blue-sata1 {
0167 label = "netxbig:blue:sata1";
0168 mode-addr = <4>;
0169 mode-val = <NETXBIG_LED_OFF 0
0170 NETXBIG_LED_ON 7
0171 NETXBIG_LED_SATA 1
0172 NETXBIG_LED_TIMER1 3>;
0173 bright-addr = <2>;
0174 max-brightness = <7>;
0175 };
0176 red-sata1 {
0177 label = "netxbig:red:sata1";
0178 mode-addr = <4>;
0179 mode-val = <NETXBIG_LED_OFF 0
0180 NETXBIG_LED_ON 2
0181 NETXBIG_LED_TIMER1 4>;
0182 bright-addr = <2>;
0183 max-brightness = <7>;
0184 };
0185 };
0186 };
0187
0188 &mdio {
0189 status = "okay";
0190
0191 ethphy0: ethernet-phy@0 {
0192 reg = <8>;
0193 };
0194
0195 ethphy1: ethernet-phy@1 {
0196 reg = <0>;
0197 };
0198 };
0199
0200 ð0 {
0201 status = "okay";
0202 ethernet0-port@0 {
0203 phy-handle = <ðphy0>;
0204 };
0205 };
0206
0207 &pinctrl {
0208 pinctrl-names = "default";
0209
0210 pmx_button_function: pmx-button-function {
0211 marvell,pins = "mpp34";
0212 marvell,function = "gpio";
0213 };
0214 pmx_button_power_off: pmx-button-power-off {
0215 marvell,pins = "mpp15";
0216 marvell,function = "gpio";
0217 };
0218 pmx_button_power_on: pmx-button-power-on {
0219 marvell,pins = "mpp13";
0220 marvell,function = "gpio";
0221 };
0222 };
0223
0224 &i2c0 {
0225 status = "okay";
0226
0227 eeprom@50 {
0228 compatible = "atmel,24c04";
0229 pagesize = <16>;
0230 reg = <0x50>;
0231 };
0232 };