Advertisement
Guest User

LS-QVL DeviceTree

a guest
Jan 22nd, 2016
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.00 KB | None | 0 0
  1. /*
  2. * Device Tree file for Buffalo Linkstation LS-QVL
  3. *
  4. * Copyright (C) 2015, rogershimizu@gmail.com
  5. * Copyright (C) 2016, mario_lange@gmx.net
  6. *
  7. * This program is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU General Public License
  9. * as published by the Free Software Foundation; either version
  10. * 2 of the License, or (at your option) any later version.
  11. */
  12.  
  13. /dts-v1/;
  14.  
  15. #include "kirkwood.dtsi"
  16. #include "kirkwood-6282.dtsi"
  17.  
  18. / {
  19. model = "Buffalo Linkstation LS-QVL";
  20. compatible = "buffalo,lsqvl", "marvell,kirkwood-88f6282", "marvell,kirkwood";
  21.  
  22. memory { /* 256 MB */
  23. device_type = "memory";
  24. reg = <0x00000000 0x10000000>;
  25. };
  26.  
  27. chosen {
  28. bootargs = "console=ttyS0,115200n8 earlyprintk systemd.log_target=kmsg netconsole=@192.168.178.26/,6666@192.168.178.21/";
  29. stdout-path = &uart0;
  30. };
  31.  
  32. mbus {
  33. pcie-controller {
  34. status = "okay";
  35. pcie@1,0 {
  36. status = "okay";
  37. };
  38. };
  39. };
  40.  
  41. ocp@f1000000 {
  42. pinctrl: pin-controller@10000 {
  43. pmx_power_hdd0: pmx-power-hdd0 {
  44. marvell,pins = "mpp8";
  45. marvell,function = "gpio";
  46. };
  47. pmx_power_hdd1: pmx-power-hdd1 {
  48. marvell,pins = "mpp9";
  49. marvell,function = "gpio";
  50. };
  51. pmx_usb_vbus: pmx-usb-vbus {
  52. marvell,pins = "mpp12";
  53. marvell,function = "gpio";
  54. };
  55. pmx_fan_high: pmx-fan-high {
  56. marvell,pins = "mpp16";
  57. marvell,function = "gpio";
  58. };
  59. pmx_fan_low: pmx-fan-low {
  60. marvell,pins = "mpp17";
  61. marvell,function = "gpio";
  62. };
  63. pmx_fan_lock: pmx-fan-lock {
  64. marvell,pins = "mpp43";
  65. marvell,function = "gpio";
  66. };
  67. pmx_led_hdd0_red: pmx-led-hdd0-red {
  68. marvell,pins = "mpp34";
  69. marvell,function = "gpio";
  70. };
  71. pmx_led_hdd1_red: pmx-led-hdd1-red {
  72. marvell,pins = "mpp35";
  73. marvell,function = "gpio";
  74. };
  75. pmx_led_hdd2_red: pmx-led-hdd2-red {
  76. marvell,pins = "mpp24";
  77. marvell,function = "gpio";
  78. };
  79. pmx_led_hdd3_red: pmx-led-hdd3-red {
  80. marvell,pins = "mpp25";
  81. marvell,function = "gpio";
  82. };
  83. pmx_led_power_red: pmx-led-power-red {
  84. marvell,pins = "mpp36";
  85. marvell,function = "gpio";
  86. };
  87. pmx_led_function_red: pmx-led-function_red {
  88. marvell,pins = "mpp37";
  89. marvell,function = "gpio";
  90. };
  91. pmx_led_power_amber: pmx-led-power-amber {
  92. marvell,pins = "mpp38";
  93. marvell,function = "gpio";
  94. };
  95. pmx_led_function_blue: pmx-led-function-blue {
  96. marvell,pins = "mpp39";
  97. marvell,function = "gpio";
  98. };
  99. pmx_led_power_blue: pmx-led-power-blue {
  100. marvell,pins = "mpp40";
  101. marvell,function = "gpio";
  102. };
  103. pmx_button_function: pmx-button-function {
  104. marvell,pins = "mpp45";
  105. marvell,function = "gpio";
  106. };
  107. pmx_power_switch: pmx-button-power {
  108. marvell,pins = "mpp46";
  109. marvell,function = "gpio";
  110. };
  111. pmx_power_auto_switch: pmx-switch-auto-power {
  112. marvell,pins = "mpp47";
  113. marvell,function = "gpio";
  114. };
  115. };
  116.  
  117. serial@12000 {
  118. status = "okay";
  119. };
  120.  
  121. sata@80000 {
  122. status = "okay";
  123. nr-ports = <2>;
  124. };
  125.  
  126. spi@10600 {
  127. status = "okay";
  128.  
  129. m25p40@0 {
  130. #address-cells = <1>;
  131. #size-cells = <1>;
  132. compatible = "m25p40", "jedec,spi-nor";
  133. reg = <0>;
  134. spi-max-frequency = <25000000>;
  135. mode = <0>;
  136.  
  137. partition@0 {
  138. reg = <0x0 0x60000>;
  139. label = "uboot";
  140. read-only;
  141. };
  142.  
  143. partition@60000 {
  144. reg = <0x60000 0x10000>;
  145. label = "dtb";
  146. read-only;
  147. };
  148.  
  149. partition@70000 {
  150. reg = <0x70000 0x10000>;
  151. label = "uboot_env";
  152. };
  153. };
  154. };
  155. };
  156.  
  157.  
  158. gpio_keys {
  159. compatible = "gpio-keys";
  160. #address-cells = <1>;
  161. #size-cells = <0>;
  162. pinctrl-0 = <&pmx_button_function &pmx_power_switch
  163. &pmx_power_auto_switch>;
  164. pinctrl-names = "default";
  165. button@1 {
  166. label = "Function Button";
  167. linux,code = <KEY_OPTION>;
  168. gpios = <&gpio1 13 GPIO_ACTIVE_LOW>;
  169. };
  170. button@2 {
  171. label = "Power Button";
  172. linux,code = <KEY_POWER>;
  173. gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
  174. };
  175. button@3 {
  176. label = "Auto Button";
  177. linux,code = <KEY_ESC>;
  178. gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
  179. };
  180. };
  181.  
  182. gpio_leds {
  183. compatible = "gpio-leds";
  184. pinctrl-0 = <&pmx_led_power_red &pmx_led_function_red
  185. &pmx_led_power_amber &pmx_led_function_blue
  186. &pmx_led_power_blue &pmx_led_hdd0_red
  187. &pmx_led_hdd1_red &pmx_led_hdd2_red
  188. &pmx_led_hdd3_red>;
  189. pinctrl-names = "default";
  190. led@1 {
  191. label = "lsqvl:red:hdd0";
  192. gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
  193. };
  194. led@2 {
  195. label = "lsqvl:red:hdd1";
  196. gpios = <&gpio1 3 GPIO_ACTIVE_LOW>;
  197. };
  198. led@3 {
  199. label = "lsqvl:red:hdd2";
  200. gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
  201. };
  202. led@4 {
  203. label = "lsqvl:red:hdd3";
  204. gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
  205. };
  206. led@5 {
  207. label = "lsqvl:red:power";
  208. gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>;
  209. };
  210. led@6 {
  211. label = "lsqvl:red:func";
  212. gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>;
  213. };
  214. led@7 {
  215. label = "lsqvl:amber:power";
  216. gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>;
  217. };
  218.  
  219. led@8 {
  220. label = "lsqvl:blue:func";
  221. gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
  222. };
  223.  
  224. led@9 {
  225. label = "lsqvl:blue:power";
  226. gpios = <&gpio1 8 GPIO_ACTIVE_LOW>;
  227. default-state = "keep";
  228. };
  229. };
  230.  
  231. gpio_fan {
  232. compatible = "gpio-fan";
  233. pinctrl-0 = <&pmx_fan_low &pmx_fan_high &pmx_fan_lock>;
  234. pinctrl-names = "default";
  235. gpios = <&gpio0 17 GPIO_ACTIVE_LOW
  236. &gpio0 16 GPIO_ACTIVE_LOW>;
  237. gpio-fan,speed-map = <0 3
  238. 1500 2
  239. 3250 1
  240. 5000 0>;
  241. alarm-gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>;
  242. };
  243.  
  244. restart_poweroff {
  245. compatible = "restart-poweroff";
  246. };
  247.  
  248. regulators {
  249. compatible = "simple-bus";
  250. #address-cells = <1>;
  251. #size-cells = <0>;
  252. pinctrl-0 = <&pmx_power_hdd0 &pmx_power_hdd1 &pmx_usb_vbus>;
  253. pinctrl-names = "default";
  254.  
  255. usb_power: regulator@1 {
  256. compatible = "regulator-fixed";
  257. reg = <1>;
  258. regulator-name = "USB Power";
  259. regulator-min-microvolt = <5000000>;
  260. regulator-max-microvolt = <5000000>;
  261. enable-active-high;
  262. regulator-always-on;
  263. regulator-boot-on;
  264. gpio = <&gpio0 12 GPIO_ACTIVE_HIGH>;
  265. };
  266. hdd_power0: regulator@2 {
  267. compatible = "regulator-fixed";
  268. reg = <2>;
  269. regulator-name = "HDD0 Power";
  270. regulator-min-microvolt = <5000000>;
  271. regulator-max-microvolt = <5000000>;
  272. enable-active-high;
  273. regulator-always-on;
  274. regulator-boot-on;
  275. gpio = <&gpio0 8 GPIO_ACTIVE_HIGH>;
  276. };
  277. hdd_power1: regulator@3 {
  278. compatible = "regulator-fixed";
  279. reg = <3>;
  280. regulator-name = "HDD1 Power";
  281. regulator-min-microvolt = <5000000>;
  282. regulator-max-microvolt = <5000000>;
  283. enable-active-high;
  284. regulator-always-on;
  285. regulator-boot-on;
  286. gpio = <&gpio0 9 GPIO_ACTIVE_HIGH>;
  287. };
  288. };
  289. };
  290.  
  291. &mdio {
  292. status = "okay";
  293.  
  294. ethphy0: ethernet-phy@0 {
  295. device_type = "ethernet-phy";
  296. reg = <0>;
  297. };
  298. };
  299.  
  300. &eth0 {
  301. status = "okay";
  302.  
  303. ethernet0-port@0 {
  304. phy-handle = <&ethphy0>;
  305. };
  306. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement