Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * Copyright (C) 2015 Benjamin Cama <benoar@dolka.fr>
0003  * Copyright (C) 2014 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
0004  * Based on the board file arch/arm/mach-orion5x/lsmini-setup.c,
0005  * Copyright (C) 2008 Alexey Kopytko <alexey@kopytko.ru>
0006  *
0007  * This file is dual-licensed: you can use it either under the terms
0008  * of the GPL or the X11 license, at your option. Note that this dual
0009  * licensing only applies to this file, and not this project as a
0010  * whole.
0011  *
0012  *  a) This file is free software; you can redistribute it and/or
0013  *     modify it under the terms of the GNU General Public License as
0014  *     published by the Free Software Foundation; either version 2 of the
0015  *     License, or (at your option) any later version.
0016  *
0017  *     This file is distributed in the hope that it will be useful,
0018  *     but WITHOUT ANY WARRANTY; without even the implied warranty of
0019  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0020  *     GNU General Public License for more details.
0021  *
0022  * Or, alternatively,
0023  *
0024  *  b) Permission is hereby granted, free of charge, to any person
0025  *     obtaining a copy of this software and associated documentation
0026  *     files (the "Software"), to deal in the Software without
0027  *     restriction, including without limitation the rights to use,
0028  *     copy, modify, merge, publish, distribute, sublicense, and/or
0029  *     sell copies of the Software, and to permit persons to whom the
0030  *     Software is furnished to do so, subject to the following
0031  *     conditions:
0032  *
0033  *     The above copyright notice and this permission notice shall be
0034  *     included in all copies or substantial portions of the Software.
0035  *
0036  *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
0037  *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
0038  *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
0039  *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
0040  *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
0041  *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
0042  *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
0043  *     OTHER DEALINGS IN THE SOFTWARE.
0044  */
0045 
0046 /dts-v1/;
0047 
0048 #include <dt-bindings/gpio/gpio.h>
0049 #include <dt-bindings/input/input.h>
0050 #include <dt-bindings/interrupt-controller/irq.h>
0051 #include "orion5x-mv88f5182.dtsi"
0052 
0053 / {
0054         model = "Buffalo Linkstation Mini (LS-WSGL)";
0055         compatible = "buffalo,lswsgl", "marvell,orion5x-88f5182", "marvell,orion5x";
0056 
0057         memory {
0058                 device_type = "memory";
0059                 reg = <0x00000000 0x8000000>; /* 128 MB */
0060         };
0061 
0062         chosen {
0063                 bootargs = "console=ttyS0,115200 earlyprintk";
0064                 stdout-path = &uart0;
0065         };
0066 
0067         soc {
0068                 ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000>,
0069                          <MBUS_ID(0x09, 0x00) 0 0xf2200000 0x800>,
0070                          <MBUS_ID(0x01, 0x0f) 0 0xf4000000 0x40000>;
0071         };
0072 
0073         gpio-keys {
0074                 compatible = "gpio-keys";
0075                 pinctrl-0 = <&pmx_buttons>;
0076                 pinctrl-names = "default";
0077                 #address-cells = <1>;
0078                 #size-cells = <0>;
0079                 func {
0080                         label = "Function Button";
0081                         linux,code = <KEY_OPTION>;
0082                         gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
0083                 };
0084 
0085                 power {
0086                         label = "Power-on Switch";
0087                         linux,input-type = <5>; /* EV_SW */
0088                         linux,code = <KEY_RESERVED>; /* LSMINI_SW_POWER */
0089                         gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
0090                 };
0091 
0092                 autopower {
0093                         label = "Power-auto Switch";
0094                         linux,input-type = <5>; /* EV_SW */
0095                         linux,code = <KEY_ESC>; /* LSMINI_SW_AUTOPOWER */
0096                         gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
0097                 };
0098         };
0099 
0100         gpio-leds {
0101                 compatible = "gpio-leds";
0102                 pinctrl-0 = <&pmx_led_alarm &pmx_led_info &pmx_led_func
0103                              &pmx_led_power>;
0104                 pinctrl-names = "default";
0105 
0106                 alarm {
0107                         label = "lswsgl:alarm:red";
0108                         gpio = <&gpio0 2 GPIO_ACTIVE_LOW>;
0109                 };
0110 
0111                 info {
0112                         label = "lswsgl:info:amber";
0113                         gpio = <&gpio0 3 GPIO_ACTIVE_LOW>;
0114                 };
0115 
0116                 func {
0117                         label = "lswsgl:func:blue:top";
0118                         gpio = <&gpio0 9 GPIO_ACTIVE_LOW>;
0119                 };
0120 
0121                 power {
0122                         label = "lswsgl:power:blue:bottom";
0123                         gpio = <&gpio0 14 GPIO_ACTIVE_LOW>;
0124                         default-state = "on";
0125                 };
0126         };
0127 
0128         restart_poweroff {
0129                 compatible = "restart-poweroff";
0130         };
0131 
0132         regulators {
0133                 compatible = "simple-bus";
0134                 #address-cells = <1>;
0135                 #size-cells = <0>;
0136                 pinctrl-0 = <&pmx_sata0_power &pmx_sata1_power &pmx_usb_power>;
0137                 pinctrl-names = "default";
0138 
0139                 sata0_power: regulator@0 {
0140                         compatible = "regulator-fixed";
0141                         reg = <0>;
0142                         regulator-name = "SATA0 Power";
0143                         regulator-min-microvolt = <5000000>;
0144                         regulator-max-microvolt = <5000000>;
0145                         enable-active-high;
0146                         regulator-always-on;
0147                         regulator-boot-on;
0148                         gpio = <&gpio0 1 GPIO_ACTIVE_HIGH>;
0149                 };
0150 
0151                 sata1_power: regulator@1 {
0152                         compatible = "regulator-fixed";
0153                         reg = <1>;
0154                         regulator-name = "SATA1 Power";
0155                         regulator-min-microvolt = <5000000>;
0156                         regulator-max-microvolt = <5000000>;
0157                         enable-active-high;
0158                         regulator-always-on;
0159                         regulator-boot-on;
0160                         gpio = <&gpio0 19 GPIO_ACTIVE_HIGH>;
0161                 };
0162 
0163                 usb_power: regulator@2 {
0164                         compatible = "regulator-fixed";
0165                         reg = <2>;
0166                         regulator-name = "USB Power";
0167                         regulator-min-microvolt = <5000000>;
0168                         regulator-max-microvolt = <5000000>;
0169                         enable-active-high;
0170                         regulator-always-on;
0171                         regulator-boot-on;
0172                         gpio = <&gpio0 16 GPIO_ACTIVE_HIGH>;
0173                 };
0174         };
0175 };
0176 
0177 &devbus_bootcs {
0178         status = "okay";
0179 
0180         devbus,keep-config;
0181 
0182         flash@0 {
0183                 compatible = "cfi-flash";
0184                 reg = <0 0x40000>;
0185                 bank-width = <1>;
0186                 #address-cells = <1>;
0187                 #size-cells = <1>;
0188 
0189                 partition@0 {
0190                         label = "Full256Kb";
0191                         reg = <0 0x40000>;
0192                         read-only;
0193                 };
0194         };
0195 };
0196 
0197 &mdio {
0198         status = "okay";
0199 
0200         ethphy: ethernet-phy {
0201                 reg = <8>;
0202         };
0203 };
0204 
0205 &ehci0 {
0206         status = "okay";
0207 };
0208 
0209 &eth {
0210         status = "okay";
0211 
0212         ethernet-port@0 {
0213                 phy-handle = <&ethphy>;
0214         };
0215 };
0216 
0217 &i2c {
0218         status = "okay";
0219         clock-frequency = <100000>;
0220         #address-cells = <1>;
0221 
0222         rtc@32 {
0223                 compatible = "ricoh,rs5c372a";
0224                 reg = <0x32>;
0225         };
0226 };
0227 
0228 &pinctrl {
0229         pmx_buttons: pmx-buttons {
0230                 marvell,pins = "mpp15", "mpp17", "mpp18";
0231                 marvell,function = "gpio";
0232         };
0233 
0234         pmx_led_alarm: pmx-leds {
0235                 marvell,pins = "mpp2";
0236                 marvell,function = "gpio";
0237         };
0238 
0239         pmx_led_info: pmx-leds {
0240                 marvell,pins = "mpp3";
0241                 marvell,function = "gpio";
0242         };
0243 
0244         pmx_led_func: pmx-leds {
0245                 marvell,pins = "mpp9";
0246                 marvell,function = "gpio";
0247         };
0248 
0249         pmx_led_power: pmx-leds {
0250                 marvell,pins = "mpp14";
0251                 marvell,function = "gpio";
0252         };
0253 
0254         pmx_sata0_power: pmx-sata0-power {
0255                 marvell,pins = "mpp1";
0256                 marvell,function = "gpio";
0257         };
0258 
0259         pmx_sata1_power: pmx-sata1-power {
0260                 marvell,pins = "mpp19";
0261                 marvell,function = "gpio";
0262         };
0263 
0264         pmx_usb_power: pmx-usb-power {
0265                 marvell,pins = "mpp16";
0266                 marvell,function = "gpio";
0267         };
0268 };
0269 
0270 &sata {
0271         status = "okay";
0272         nr-ports = <2>;
0273 };
0274 
0275 &uart0 {
0276         status = "okay";
0277 };