1 /* 1 /* 2 * Copyright (C) 2015 Benjamin Cama <benoar@dol 2 * Copyright (C) 2015 Benjamin Cama <benoar@dolka.fr> 3 * Copyright (C) 2014 Thomas Petazzoni <thomas. 3 * Copyright (C) 2014 Thomas Petazzoni <thomas.petazzoni@free-electrons.com> 4 * Based on the board file arch/arm/mach-orion 4 * Based on the board file arch/arm/mach-orion5x/lsmini-setup.c, 5 * Copyright (C) 2008 Alexey Kopytko <alexey@ko 5 * Copyright (C) 2008 Alexey Kopytko <alexey@kopytko.ru> 6 * 6 * 7 * This file is dual-licensed: you can use it 7 * This file is dual-licensed: you can use it either under the terms 8 * of the GPL or the X11 license, at your opti 8 * of the GPL or the X11 license, at your option. Note that this dual 9 * licensing only applies to this file, and no 9 * licensing only applies to this file, and not this project as a 10 * whole. 10 * whole. 11 * 11 * 12 * a) This file is free software; you can red 12 * a) This file is free software; you can redistribute it and/or 13 * modify it under the terms of the GNU Ge 13 * modify it under the terms of the GNU General Public License as 14 * published by the Free Software Foundati 14 * published by the Free Software Foundation; either version 2 of the 15 * License, or (at your option) any later 15 * License, or (at your option) any later version. 16 * 16 * 17 * This file is distributed in the hope th 17 * This file is distributed in the hope that it will be useful, 18 * but WITHOUT ANY WARRANTY; without even 18 * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 * MERCHANTABILITY or FITNESS FOR A PARTIC 19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 * GNU General Public License for more det 20 * GNU General Public License for more details. 21 * 21 * 22 * Or, alternatively, 22 * Or, alternatively, 23 * 23 * 24 * b) Permission is hereby granted, free of c 24 * b) Permission is hereby granted, free of charge, to any person 25 * obtaining a copy of this software and a 25 * obtaining a copy of this software and associated documentation 26 * files (the "Software"), to deal in the 26 * files (the "Software"), to deal in the Software without 27 * restriction, including without limitati 27 * restriction, including without limitation the rights to use, 28 * copy, modify, merge, publish, distribut 28 * copy, modify, merge, publish, distribute, sublicense, and/or 29 * sell copies of the Software, and to per 29 * sell copies of the Software, and to permit persons to whom the 30 * Software is furnished to do so, subject 30 * Software is furnished to do so, subject to the following 31 * conditions: 31 * conditions: 32 * 32 * 33 * The above copyright notice and this per 33 * The above copyright notice and this permission notice shall be 34 * included in all copies or substantial p 34 * included in all copies or substantial portions of the Software. 35 * 35 * 36 * THE SOFTWARE IS PROVIDED "AS IS", WITHO 36 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 37 * EXPRESS OR IMPLIED, INCLUDING BUT NOT L 37 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 38 * OF MERCHANTABILITY, FITNESS FOR A PARTI 38 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 39 * NONINFRINGEMENT. IN NO EVENT SHALL THE 39 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 40 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGE 40 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 41 * WHETHER IN AN ACTION OF CONTRACT, TORT 41 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 42 * FROM, OUT OF OR IN CONNECTION WITH THE 42 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 43 * OTHER DEALINGS IN THE SOFTWARE. 43 * OTHER DEALINGS IN THE SOFTWARE. 44 */ 44 */ 45 45 46 /dts-v1/; 46 /dts-v1/; 47 47 48 #include <dt-bindings/gpio/gpio.h> 48 #include <dt-bindings/gpio/gpio.h> 49 #include <dt-bindings/input/input.h> 49 #include <dt-bindings/input/input.h> 50 #include <dt-bindings/interrupt-controller/irq 50 #include <dt-bindings/interrupt-controller/irq.h> 51 #include "orion5x-mv88f5182.dtsi" 51 #include "orion5x-mv88f5182.dtsi" 52 52 53 / { 53 / { 54 model = "Buffalo Linkstation Mini (LS- 54 model = "Buffalo Linkstation Mini (LS-WSGL)"; 55 compatible = "buffalo,lswsgl", "marvel 55 compatible = "buffalo,lswsgl", "marvell,orion5x-88f5182", "marvell,orion5x"; 56 56 57 memory { 57 memory { 58 device_type = "memory"; 58 device_type = "memory"; 59 reg = <0x00000000 0x8000000>; 59 reg = <0x00000000 0x8000000>; /* 128 MB */ 60 }; 60 }; 61 61 62 chosen { 62 chosen { 63 bootargs = "console=ttyS0,1152 63 bootargs = "console=ttyS0,115200 earlyprintk"; 64 stdout-path = &uart0; 64 stdout-path = &uart0; 65 }; 65 }; 66 66 67 soc { 67 soc { 68 ranges = <MBUS_ID(0xf0, 0x01) 68 ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000>, 69 <MBUS_ID(0x09, 0x00) 69 <MBUS_ID(0x09, 0x00) 0 0xf2200000 0x800>, 70 <MBUS_ID(0x01, 0x0f) 70 <MBUS_ID(0x01, 0x0f) 0 0xf4000000 0x40000>; 71 }; 71 }; 72 72 73 gpio-keys { 73 gpio-keys { 74 compatible = "gpio-keys"; 74 compatible = "gpio-keys"; 75 pinctrl-0 = <&pmx_buttons>; 75 pinctrl-0 = <&pmx_buttons>; 76 pinctrl-names = "default"; 76 pinctrl-names = "default"; 77 77 78 key-func { 78 key-func { 79 label = "Function Butt 79 label = "Function Button"; 80 linux,code = <KEY_OPTI 80 linux,code = <KEY_OPTION>; 81 gpios = <&gpio0 15 GPI 81 gpios = <&gpio0 15 GPIO_ACTIVE_LOW>; 82 }; 82 }; 83 83 84 key-power { 84 key-power { 85 label = "Power-on Swit 85 label = "Power-on Switch"; 86 linux,input-type = <5> 86 linux,input-type = <5>; /* EV_SW */ 87 linux,code = <KEY_RESE 87 linux,code = <KEY_RESERVED>; /* LSMINI_SW_POWER */ 88 gpios = <&gpio0 18 GPI 88 gpios = <&gpio0 18 GPIO_ACTIVE_LOW>; 89 }; 89 }; 90 90 91 key-autopower { 91 key-autopower { 92 label = "Power-auto Sw 92 label = "Power-auto Switch"; 93 linux,input-type = <5> 93 linux,input-type = <5>; /* EV_SW */ 94 linux,code = <KEY_ESC> 94 linux,code = <KEY_ESC>; /* LSMINI_SW_AUTOPOWER */ 95 gpios = <&gpio0 17 GPI 95 gpios = <&gpio0 17 GPIO_ACTIVE_LOW>; 96 }; 96 }; 97 }; 97 }; 98 98 99 gpio-leds { 99 gpio-leds { 100 compatible = "gpio-leds"; 100 compatible = "gpio-leds"; 101 pinctrl-0 = <&pmx_led_alarm &p 101 pinctrl-0 = <&pmx_led_alarm &pmx_led_info &pmx_led_func 102 &pmx_led_power>; 102 &pmx_led_power>; 103 pinctrl-names = "default"; 103 pinctrl-names = "default"; 104 104 105 led-alarm { 105 led-alarm { 106 label = "lswsgl:alarm: 106 label = "lswsgl:alarm:red"; 107 gpios = <&gpio0 2 GPIO 107 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>; 108 }; 108 }; 109 109 110 led-info { 110 led-info { 111 label = "lswsgl:info:a 111 label = "lswsgl:info:amber"; 112 gpios = <&gpio0 3 GPIO 112 gpios = <&gpio0 3 GPIO_ACTIVE_LOW>; 113 }; 113 }; 114 114 115 led-func { 115 led-func { 116 label = "lswsgl:func:b 116 label = "lswsgl:func:blue:top"; 117 gpios = <&gpio0 9 GPIO 117 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; 118 }; 118 }; 119 119 120 led-power { 120 led-power { 121 label = "lswsgl:power: 121 label = "lswsgl:power:blue:bottom"; 122 gpios = <&gpio0 14 GPI 122 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; 123 default-state = "on"; 123 default-state = "on"; 124 }; 124 }; 125 }; 125 }; 126 126 127 restart_poweroff { 127 restart_poweroff { 128 compatible = "restart-poweroff 128 compatible = "restart-poweroff"; 129 }; 129 }; 130 130 131 regulators { 131 regulators { 132 compatible = "simple-bus"; 132 compatible = "simple-bus"; 133 #address-cells = <1>; 133 #address-cells = <1>; 134 #size-cells = <0>; 134 #size-cells = <0>; 135 pinctrl-0 = <&pmx_sata0_power 135 pinctrl-0 = <&pmx_sata0_power &pmx_sata1_power &pmx_usb_power>; 136 pinctrl-names = "default"; 136 pinctrl-names = "default"; 137 137 138 sata0_power: regulator@0 { 138 sata0_power: regulator@0 { 139 compatible = "regulato 139 compatible = "regulator-fixed"; 140 reg = <0>; 140 reg = <0>; 141 regulator-name = "SATA 141 regulator-name = "SATA0 Power"; 142 regulator-min-microvol 142 regulator-min-microvolt = <5000000>; 143 regulator-max-microvol 143 regulator-max-microvolt = <5000000>; 144 enable-active-high; 144 enable-active-high; 145 regulator-always-on; 145 regulator-always-on; 146 regulator-boot-on; 146 regulator-boot-on; 147 gpio = <&gpio0 1 GPIO_ 147 gpio = <&gpio0 1 GPIO_ACTIVE_HIGH>; 148 }; 148 }; 149 149 150 sata1_power: regulator@1 { 150 sata1_power: regulator@1 { 151 compatible = "regulato 151 compatible = "regulator-fixed"; 152 reg = <1>; 152 reg = <1>; 153 regulator-name = "SATA 153 regulator-name = "SATA1 Power"; 154 regulator-min-microvol 154 regulator-min-microvolt = <5000000>; 155 regulator-max-microvol 155 regulator-max-microvolt = <5000000>; 156 enable-active-high; 156 enable-active-high; 157 regulator-always-on; 157 regulator-always-on; 158 regulator-boot-on; 158 regulator-boot-on; 159 gpio = <&gpio0 19 GPIO 159 gpio = <&gpio0 19 GPIO_ACTIVE_HIGH>; 160 }; 160 }; 161 161 162 usb_power: regulator@2 { 162 usb_power: regulator@2 { 163 compatible = "regulato 163 compatible = "regulator-fixed"; 164 reg = <2>; 164 reg = <2>; 165 regulator-name = "USB 165 regulator-name = "USB Power"; 166 regulator-min-microvol 166 regulator-min-microvolt = <5000000>; 167 regulator-max-microvol 167 regulator-max-microvolt = <5000000>; 168 enable-active-high; 168 enable-active-high; 169 regulator-always-on; 169 regulator-always-on; 170 regulator-boot-on; 170 regulator-boot-on; 171 gpio = <&gpio0 16 GPIO 171 gpio = <&gpio0 16 GPIO_ACTIVE_HIGH>; 172 }; 172 }; 173 }; 173 }; 174 }; 174 }; 175 175 176 &devbus_bootcs { 176 &devbus_bootcs { 177 status = "okay"; 177 status = "okay"; 178 178 179 devbus,keep-config; 179 devbus,keep-config; 180 180 181 flash@0 { 181 flash@0 { 182 compatible = "cfi-flash"; 182 compatible = "cfi-flash"; 183 reg = <0 0x40000>; 183 reg = <0 0x40000>; 184 bank-width = <1>; 184 bank-width = <1>; 185 #address-cells = <1>; 185 #address-cells = <1>; 186 #size-cells = <1>; 186 #size-cells = <1>; 187 187 188 partition@0 { 188 partition@0 { 189 label = "Full256Kb"; 189 label = "Full256Kb"; 190 reg = <0 0x40000>; 190 reg = <0 0x40000>; 191 read-only; 191 read-only; 192 }; 192 }; 193 }; 193 }; 194 }; 194 }; 195 195 196 &mdio { 196 &mdio { 197 status = "okay"; 197 status = "okay"; 198 198 199 ethphy: ethernet-phy { 199 ethphy: ethernet-phy { 200 reg = <8>; 200 reg = <8>; 201 }; 201 }; 202 }; 202 }; 203 203 204 &ehci0 { 204 &ehci0 { 205 status = "okay"; 205 status = "okay"; 206 }; 206 }; 207 207 208 ð { 208 ð { 209 status = "okay"; 209 status = "okay"; 210 210 211 ethernet-port@0 { 211 ethernet-port@0 { 212 phy-handle = <ðphy>; 212 phy-handle = <ðphy>; 213 }; 213 }; 214 }; 214 }; 215 215 216 &i2c { 216 &i2c { 217 status = "okay"; 217 status = "okay"; 218 clock-frequency = <100000>; 218 clock-frequency = <100000>; 219 #address-cells = <1>; 219 #address-cells = <1>; 220 220 221 rtc@32 { 221 rtc@32 { 222 compatible = "ricoh,rs5c372a"; 222 compatible = "ricoh,rs5c372a"; 223 reg = <0x32>; 223 reg = <0x32>; 224 }; 224 }; 225 }; 225 }; 226 226 227 &pinctrl { 227 &pinctrl { 228 pmx_buttons: pmx-buttons { 228 pmx_buttons: pmx-buttons { 229 marvell,pins = "mpp15", "mpp17 229 marvell,pins = "mpp15", "mpp17", "mpp18"; 230 marvell,function = "gpio"; 230 marvell,function = "gpio"; 231 }; 231 }; 232 232 233 pmx_led_alarm: pmx-leds { 233 pmx_led_alarm: pmx-leds { 234 marvell,pins = "mpp2"; 234 marvell,pins = "mpp2"; 235 marvell,function = "gpio"; 235 marvell,function = "gpio"; 236 }; 236 }; 237 237 238 pmx_led_info: pmx-leds { 238 pmx_led_info: pmx-leds { 239 marvell,pins = "mpp3"; 239 marvell,pins = "mpp3"; 240 marvell,function = "gpio"; 240 marvell,function = "gpio"; 241 }; 241 }; 242 242 243 pmx_led_func: pmx-leds { 243 pmx_led_func: pmx-leds { 244 marvell,pins = "mpp9"; 244 marvell,pins = "mpp9"; 245 marvell,function = "gpio"; 245 marvell,function = "gpio"; 246 }; 246 }; 247 247 248 pmx_led_power: pmx-leds { 248 pmx_led_power: pmx-leds { 249 marvell,pins = "mpp14"; 249 marvell,pins = "mpp14"; 250 marvell,function = "gpio"; 250 marvell,function = "gpio"; 251 }; 251 }; 252 252 253 pmx_sata0_power: pmx-sata0-power { 253 pmx_sata0_power: pmx-sata0-power { 254 marvell,pins = "mpp1"; 254 marvell,pins = "mpp1"; 255 marvell,function = "gpio"; 255 marvell,function = "gpio"; 256 }; 256 }; 257 257 258 pmx_sata1_power: pmx-sata1-power { 258 pmx_sata1_power: pmx-sata1-power { 259 marvell,pins = "mpp19"; 259 marvell,pins = "mpp19"; 260 marvell,function = "gpio"; 260 marvell,function = "gpio"; 261 }; 261 }; 262 262 263 pmx_usb_power: pmx-usb-power { 263 pmx_usb_power: pmx-usb-power { 264 marvell,pins = "mpp16"; 264 marvell,pins = "mpp16"; 265 marvell,function = "gpio"; 265 marvell,function = "gpio"; 266 }; 266 }; 267 }; 267 }; 268 268 269 &sata { 269 &sata { 270 status = "okay"; 270 status = "okay"; 271 nr-ports = <2>; 271 nr-ports = <2>; 272 }; 272 }; 273 273 274 &uart0 { 274 &uart0 { 275 status = "okay"; 275 status = "okay"; 276 }; 276 };
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.