Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: dts: kirkwood: split lswvl dts to linkstation lsvl and lswvl

LS-WVL/VL are both kirkwood-6282 based NAS devices, which share
many MPP pins. However they are slightly different:
- LS-WVL is 2-Bay NAS, and LS-VL is only 1-Bay.
- There're two red LED indicator on LS-WVL to show when HDD fails,
which is similar to LS-WXL, but there's no such on LS-VL.

So after the split, common part goes into .dtsi file:
- kirkwood-linkstation-6282.dtsi
while all rest part goes into device specific .dts file:
- kirkwood-linkstation-lsvl.dts
- kirkwood-linkstation-lswvl.dts

Signed-off-by: Roger Shimizu <rogershimizu@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>

authored by

Roger Shimizu and committed by
Gregory CLEMENT
60ff189c b05465ff

+189 -161
+2 -1
Documentation/devicetree/bindings/arm/marvell,kirkwood.txt
··· 19 19 And in addition, the compatible shall be extended with the specific 20 20 board. Currently known boards are: 21 21 22 + "buffalo,linkstation-lsvl" 22 23 "buffalo,linkstation-lswsxl" 23 24 "buffalo,linkstation-lswxl" 25 + "buffalo,linkstation-lswvl" 24 26 "buffalo,lschlv2" 25 - "buffalo,lswvl" 26 27 "buffalo,lsxhl" 27 28 "buffalo,lsxl" 28 29 "cloudengines,pogo02"
+2 -1
arch/arm/boot/dts/Makefile
··· 189 189 kirkwood-is2.dtb \ 190 190 kirkwood-km_kirkwood.dtb \ 191 191 kirkwood-laplug.dtb \ 192 + kirkwood-linkstation-lsvl.dtb \ 192 193 kirkwood-linkstation-lswsxl.dtb \ 194 + kirkwood-linkstation-lswvl.dtb \ 193 195 kirkwood-linkstation-lswxl.dtb \ 194 196 kirkwood-lschlv2.dtb \ 195 - kirkwood-lswvl.dtb \ 196 197 kirkwood-lsxhl.dtb \ 197 198 kirkwood-mplcec4.dtb \ 198 199 kirkwood-mv88f6281gtw-ge.dtb \
+57
arch/arm/boot/dts/kirkwood-linkstation-lsvl.dts
··· 1 + /* 2 + * Device Tree file for Buffalo Linkstation LS-VL 3 + * 4 + * Copyright (C) 2015, 2016 5 + * Roger Shimizu <rogershimizu@gmail.com> 6 + * 7 + * This file is dual-licensed: you can use it either under the terms 8 + * of the GPL or the X11 license, at your option. Note that this dual 9 + * licensing only applies to this file, and not this project as a 10 + * whole. 11 + * 12 + * a) This file is free software; you can redistribute it and/or 13 + * modify it under the terms of the GNU General Public License as 14 + * published by the Free Software Foundation; either version 2 of the 15 + * License, or (at your option) any later version. 16 + * 17 + * This file is distributed in the hope that it will be useful 18 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 + * GNU General Public License for more details. 21 + * 22 + * Or, alternatively 23 + * 24 + * b) Permission is hereby granted, free of charge, to any person 25 + * obtaining a copy of this software and associated documentation 26 + * files (the "Software"), to deal in the Software without 27 + * restriction, including without limitation the rights to use 28 + * copy, modify, merge, publish, distribute, sublicense, and/or 29 + * sell copies of the Software, and to permit persons to whom the 30 + * Software is furnished to do so, subject to the following 31 + * conditions: 32 + * 33 + * The above copyright notice and this permission notice shall be 34 + * included in all copies or substantial portions of the Software. 35 + * 36 + * THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND 37 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 38 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 39 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 40 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY 41 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 42 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 43 + * OTHER DEALINGS IN THE SOFTWARE. 44 + */ 45 + 46 + /dts-v1/; 47 + #include "kirkwood-linkstation-6282.dtsi" 48 + 49 + / { 50 + model = "Buffalo Linkstation LS-VL"; 51 + compatible = "buffalo,lsvl", "marvell,kirkwood-88f6282", "marvell,kirkwood"; 52 + 53 + memory { /* 256 MB */ 54 + device_type = "memory"; 55 + reg = <0x00000000 0x10000000>; 56 + }; 57 + };
+112
arch/arm/boot/dts/kirkwood-linkstation-lswvl.dts
··· 1 + /* 2 + * Device Tree file for Buffalo Linkstation LS-WVL 3 + * 4 + * Copyright (C) 2015, 2016 5 + * Roger Shimizu <rogershimizu@gmail.com> 6 + * 7 + * This file is dual-licensed: you can use it either under the terms 8 + * of the GPL or the X11 license, at your option. Note that this dual 9 + * licensing only applies to this file, and not this project as a 10 + * whole. 11 + * 12 + * a) This file is free software; you can redistribute it and/or 13 + * modify it under the terms of the GNU General Public License as 14 + * published by the Free Software Foundation; either version 2 of the 15 + * License, or (at your option) any later version. 16 + * 17 + * This file is distributed in the hope that it will be useful 18 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 + * GNU General Public License for more details. 21 + * 22 + * Or, alternatively 23 + * 24 + * b) Permission is hereby granted, free of charge, to any person 25 + * obtaining a copy of this software and associated documentation 26 + * files (the "Software"), to deal in the Software without 27 + * restriction, including without limitation the rights to use 28 + * copy, modify, merge, publish, distribute, sublicense, and/or 29 + * sell copies of the Software, and to permit persons to whom the 30 + * Software is furnished to do so, subject to the following 31 + * conditions: 32 + * 33 + * The above copyright notice and this permission notice shall be 34 + * included in all copies or substantial portions of the Software. 35 + * 36 + * THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND 37 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 38 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 39 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 40 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY 41 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 42 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 43 + * OTHER DEALINGS IN THE SOFTWARE. 44 + */ 45 + 46 + /dts-v1/; 47 + #include "kirkwood-linkstation-6282.dtsi" 48 + 49 + / { 50 + model = "Buffalo Linkstation LS-WVL"; 51 + compatible = "buffalo,lswvl","marvell,kirkwood-88f6282", "marvell,kirkwood"; 52 + 53 + memory { /* 256 MB */ 54 + device_type = "memory"; 55 + reg = <0x00000000 0x10000000>; 56 + }; 57 + 58 + ocp@f1000000 { 59 + pinctrl: pin-controller@10000 { 60 + pmx_power_hdd1: pmx-power-hdd1 { 61 + marvell,pins = "mpp9"; 62 + marvell,function = "gpio"; 63 + }; 64 + pmx_led_hdderr0: pmx-led-hdderr0 { 65 + marvell,pins = "mpp34"; 66 + marvell,function = "gpio"; 67 + }; 68 + pmx_led_hdderr1: pmx-led-hdderr1 { 69 + marvell,pins = "mpp35"; 70 + marvell,function = "gpio"; 71 + }; 72 + }; 73 + 74 + sata@80000 { 75 + nr-ports = <2>; 76 + }; 77 + }; 78 + 79 + gpio_leds { 80 + pinctrl-0 = <&pmx_led_function_red &pmx_led_alarm 81 + &pmx_led_info &pmx_led_power 82 + &pmx_led_function_blue 83 + &pmx_led_hdderr0 84 + &pmx_led_hdderr1>; 85 + 86 + red-hdderr0-led { 87 + label = "linkstation:red:hdderr0"; 88 + gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>; 89 + }; 90 + 91 + red-hdderr1-led { 92 + label = "linkstation:red:hdderr1"; 93 + gpios = <&gpio1 3 GPIO_ACTIVE_HIGH>; 94 + }; 95 + }; 96 + 97 + regulators { 98 + pinctrl-0 = <&pmx_power_hdd0 &pmx_power_hdd1 &pmx_usb_vbus>; 99 + 100 + hdd_power1: regulator@3 { 101 + compatible = "regulator-fixed"; 102 + reg = <3>; 103 + regulator-name = "HDD1 Power"; 104 + regulator-min-microvolt = <5000000>; 105 + regulator-max-microvolt = <5000000>; 106 + enable-active-high; 107 + regulator-always-on; 108 + regulator-boot-on; 109 + gpio = <&gpio0 9 GPIO_ACTIVE_HIGH>; 110 + }; 111 + }; 112 + };
+16 -159
arch/arm/boot/dts/kirkwood-lswvl.dts arch/arm/boot/dts/kirkwood-linkstation-6282.dtsi
··· 1 1 /* 2 - * Device Tree file for Buffalo Linkstation LS-WVL/VL 2 + * Device Tree common file for kirkwood-6282 based Buffalo Linkstation 3 3 * 4 4 * Copyright (C) 2015, 2016 5 5 * Roger Shimizu <rogershimizu@gmail.com> ··· 43 43 * OTHER DEALINGS IN THE SOFTWARE. 44 44 */ 45 45 46 - /dts-v1/; 47 - 48 46 #include "kirkwood.dtsi" 49 47 #include "kirkwood-6282.dtsi" 48 + #include "kirkwood-linkstation.dtsi" 50 49 51 50 / { 52 - model = "Buffalo Linkstation LS-WVL/VL"; 53 - compatible = "buffalo,lswvl", "buffalo,lsvl", "marvell,kirkwood-88f6282", "marvell,kirkwood"; 54 - 55 - memory { /* 256 MB */ 56 - device_type = "memory"; 57 - reg = <0x00000000 0x10000000>; 58 - }; 59 - 60 - chosen { 61 - bootargs = "console=ttyS0,115200n8 earlyprintk"; 62 - stdout-path = &uart0; 63 - }; 64 - 65 - mbus { 66 - pcie-controller { 67 - status = "okay"; 68 - pcie@1,0 { 69 - status = "okay"; 70 - }; 71 - }; 72 - }; 73 - 74 51 ocp@f1000000 { 75 52 pinctrl: pin-controller@10000 { 76 53 pmx_power_hdd0: pmx-power-hdd0 { 77 54 marvell,pins = "mpp8"; 78 - marvell,function = "gpio"; 79 - }; 80 - pmx_power_hdd1: pmx-power-hdd1 { 81 - marvell,pins = "mpp9"; 82 55 marvell,function = "gpio"; 83 56 }; 84 57 pmx_usb_vbus: pmx-usb-vbus { ··· 64 91 }; 65 92 pmx_fan_low: pmx-fan-low { 66 93 marvell,pins = "mpp17"; 67 - marvell,function = "gpio"; 68 - }; 69 - pmx_led_hdderr0: pmx-led-hdderr0 { 70 - marvell,pins = "mpp34"; 71 - marvell,function = "gpio"; 72 - }; 73 - pmx_led_hdderr1: pmx-led-hdderr1 { 74 - marvell,pins = "mpp35"; 75 94 marvell,function = "gpio"; 76 95 }; 77 96 pmx_led_alarm: pmx-led-alarm { ··· 103 138 marvell,function = "gpio"; 104 139 }; 105 140 }; 106 - 107 - serial@12000 { 108 - status = "okay"; 109 - }; 110 - 111 - sata@80000 { 112 - status = "okay"; 113 - nr-ports = <2>; 114 - }; 115 - 116 - spi@10600 { 117 - status = "okay"; 118 - 119 - m25p40@0 { 120 - #address-cells = <1>; 121 - #size-cells = <1>; 122 - compatible = "st,m25p40", "jedec,spi-nor"; 123 - reg = <0>; 124 - spi-max-frequency = <25000000>; 125 - mode = <0>; 126 - 127 - partition@0 { 128 - reg = <0x0 0x60000>; 129 - label = "uboot"; 130 - read-only; 131 - }; 132 - 133 - partition@60000 { 134 - reg = <0x60000 0x10000>; 135 - label = "dtb"; 136 - read-only; 137 - }; 138 - 139 - partition@70000 { 140 - reg = <0x70000 0x10000>; 141 - label = "uboot_env"; 142 - }; 143 - }; 144 - }; 145 141 }; 146 142 147 143 gpio_keys { 148 - compatible = "gpio-keys"; 149 - #address-cells = <1>; 150 - #size-cells = <0>; 151 - pinctrl-0 = <&pmx_button_function &pmx_power_switch 152 - &pmx_power_auto_switch>; 153 - pinctrl-names = "default"; 154 - 155 - button@1 { 156 - label = "Function Button"; 157 - linux,code = <KEY_OPTION>; 144 + function-button { 158 145 gpios = <&gpio1 13 GPIO_ACTIVE_LOW>; 159 146 }; 160 147 161 - button@2 { 162 - label = "Power-on Switch"; 163 - linux,code = <KEY_RESERVED>; 164 - linux,input-type = <5>; 148 + power-on-switch { 165 149 gpios = <&gpio1 14 GPIO_ACTIVE_LOW>; 166 150 }; 167 151 168 - button@3 { 169 - label = "Power-auto Switch"; 170 - linux,code = <KEY_ESC>; 171 - linux,input-type = <5>; 152 + power-auto-switch { 172 153 gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; 173 154 }; 174 155 }; 175 156 176 157 gpio_leds { 177 - compatible = "gpio-leds"; 178 - pinctrl-0 = <&pmx_led_function_red &pmx_led_alarm 179 - &pmx_led_info &pmx_led_power 180 - &pmx_led_function_blue 181 - &pmx_led_hdderr0 182 - &pmx_led_hdderr1>; 183 - pinctrl-names = "default"; 184 - 185 - led@1 { 186 - label = "lswvl:red:alarm"; 158 + red-alarm-led { 159 + label = "linkstation:red:alarm"; 187 160 gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>; 188 161 }; 189 162 190 - led@2 { 191 - label = "lswvl:red:func"; 163 + red-function-led { 164 + label = "linkstation:red:function"; 192 165 gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>; 193 166 }; 194 167 195 - led@3 { 196 - label = "lswvl:amber:info"; 168 + amber-info-led { 169 + label = "linkstation:amber:info"; 197 170 gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>; 198 171 }; 199 172 200 - led@4 { 201 - label = "lswvl:blue:func"; 173 + blue-function-led { 174 + label = "linkstation:blue:function"; 202 175 gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>; 203 176 }; 204 177 205 - led@5 { 206 - label = "lswvl:blue:power"; 178 + blue-power-led { 179 + label = "linkstation:blue:power"; 207 180 gpios = <&gpio1 8 GPIO_ACTIVE_LOW>; 208 181 default-state = "keep"; 209 - }; 210 - 211 - led@6 { 212 - label = "lswvl:red:hdderr0"; 213 - gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>; 214 - }; 215 - 216 - led@7 { 217 - label = "lswvl:red:hdderr1"; 218 - gpios = <&gpio1 3 GPIO_ACTIVE_HIGH>; 219 182 }; 220 183 }; 221 184 ··· 163 270 alarm-gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>; 164 271 }; 165 272 166 - restart_poweroff { 167 - compatible = "restart-poweroff"; 168 - }; 169 - 170 273 regulators { 171 - compatible = "simple-bus"; 172 - #address-cells = <1>; 173 - #size-cells = <0>; 174 - pinctrl-0 = <&pmx_power_hdd0 &pmx_power_hdd1 &pmx_usb_vbus>; 175 - pinctrl-names = "default"; 176 - 177 274 usb_power: regulator@1 { 178 - compatible = "regulator-fixed"; 179 - reg = <1>; 180 - regulator-name = "USB Power"; 181 - regulator-min-microvolt = <5000000>; 182 - regulator-max-microvolt = <5000000>; 183 - enable-active-high; 184 - regulator-always-on; 185 - regulator-boot-on; 186 275 gpio = <&gpio0 12 GPIO_ACTIVE_HIGH>; 187 276 }; 277 + 188 278 hdd_power0: regulator@2 { 189 - compatible = "regulator-fixed"; 190 - reg = <2>; 191 - regulator-name = "HDD0 Power"; 192 - regulator-min-microvolt = <5000000>; 193 - regulator-max-microvolt = <5000000>; 194 - enable-active-high; 195 - regulator-always-on; 196 - regulator-boot-on; 197 279 gpio = <&gpio0 8 GPIO_ACTIVE_HIGH>; 198 - }; 199 - hdd_power1: regulator@3 { 200 - compatible = "regulator-fixed"; 201 - reg = <3>; 202 - regulator-name = "HDD1 Power"; 203 - regulator-min-microvolt = <5000000>; 204 - regulator-max-microvolt = <5000000>; 205 - enable-active-high; 206 - regulator-always-on; 207 - regulator-boot-on; 208 - gpio = <&gpio0 9 GPIO_ACTIVE_HIGH>; 209 280 }; 210 281 }; 211 282 };