302-dt-sun7i-add-lamobo-r1.patch 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  1. --- a/arch/arm/boot/dts/Makefile
  2. +++ b/arch/arm/boot/dts/Makefile
  3. @@ -441,6 +441,7 @@ dtb-$(CONFIG_MACH_SUN7I) += \
  4. sun7i-a20-cubietruck.dtb \
  5. sun7i-a20-hummingbird.dtb \
  6. sun7i-a20-i12-tvbox.dtb \
  7. + sun7i-a20-lamobo-r1.dtb \
  8. sun7i-a20-olinuxino-lime.dtb \
  9. sun7i-a20-olinuxino-micro.dtb \
  10. sun7i-a20-pcduino3.dtb
  11. --- /dev/null
  12. +++ b/arch/arm/boot/dts/sun7i-a20-lamobo-r1.dts
  13. @@ -0,0 +1,235 @@
  14. +/*
  15. + * Copyright 2015 Daniel Golle <daniel@makrotopia.org>
  16. + * Copyright 2014 Hans de Goede <hdegoede@redhat.com>
  17. + *
  18. + * This file is dual-licensed: you can use it either under the terms
  19. + * of the GPL or the X11 license, at your option. Note that this dual
  20. + * licensing only applies to this file, and not this project as a
  21. + * whole.
  22. + *
  23. + * a) This library is free software; you can redistribute it and/or
  24. + * modify it under the terms of the GNU General Public License as
  25. + * published by the Free Software Foundation; either version 2 of the
  26. + * License, or (at your option) any later version.
  27. + *
  28. + * This library is distributed in the hope that it will be useful,
  29. + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  30. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  31. + * GNU General Public License for more details.
  32. + *
  33. + * You should have received a copy of the GNU General Public
  34. + * License along with this library; if not, write to the Free
  35. + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
  36. + * MA 02110-1301 USA
  37. + *
  38. + * Or, alternatively,
  39. + *
  40. + * b) Permission is hereby granted, free of charge, to any person
  41. + * obtaining a copy of this software and associated documentation
  42. + * files (the "Software"), to deal in the Software without
  43. + * restriction, including without limitation the rights to use,
  44. + * copy, modify, merge, publish, distribute, sublicense, and/or
  45. + * sell copies of the Software, and to permit persons to whom the
  46. + * Software is furnished to do so, subject to the following
  47. + * conditions:
  48. + *
  49. + * The above copyright notice and this permission notice shall be
  50. + * included in all copies or substantial portions of the Software.
  51. + *
  52. + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  53. + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  54. + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  55. + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  56. + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  57. + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  58. + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  59. + * OTHER DEALINGS IN THE SOFTWARE.
  60. + */
  61. +
  62. +/dts-v1/;
  63. +/include/ "sun7i-a20.dtsi"
  64. +/include/ "sunxi-common-regulators.dtsi"
  65. +#include <dt-bindings/input/input.h>
  66. +
  67. +/ {
  68. + model = "Lamobo R1";
  69. + compatible = "lamobo,lamobo-r1", "allwinner,sun7i-a20";
  70. +
  71. + soc@01c00000 {
  72. + spi0: spi@01c05000 {
  73. + pinctrl-names = "default";
  74. + pinctrl-0 = <&spi0_pins_a>;
  75. + status = "okay";
  76. + };
  77. +
  78. + mmc0: mmc@01c0f000 {
  79. + pinctrl-names = "default";
  80. + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_lamobo>;
  81. + vmmc-supply = <&reg_vcc3v3>;
  82. + bus-width = <4>;
  83. + cd-gpios = <&pio 7 10 0>; /* PH10 */
  84. + cd-inverted;
  85. + status = "okay";
  86. + };
  87. +
  88. + usbphy: phy@01c13400 {
  89. + usb1_vbus-supply = <&reg_usb1_vbus>;
  90. + usb2_vbus-supply = <&reg_usb2_vbus>;
  91. + status = "okay";
  92. + };
  93. +
  94. + ehci0: usb@01c14000 {
  95. + status = "okay";
  96. + };
  97. +
  98. + ohci0: usb@01c14400 {
  99. + status = "okay";
  100. + };
  101. +
  102. + ahci: sata@01c18000 {
  103. + target-supply = <&reg_ahci_5v>;
  104. + status = "okay";
  105. + };
  106. +
  107. + ehci1: usb@01c1c000 {
  108. + status = "okay";
  109. + };
  110. +
  111. + ohci1: usb@01c1c400 {
  112. + status = "okay";
  113. + };
  114. +
  115. + pinctrl@01c20800 {
  116. + mmc0_cd_pin_lamobo: mmc0_cd_pin@0 {
  117. + allwinner,pins = "PH10";
  118. + allwinner,function = "gpio_in";
  119. + allwinner,drive = <0>;
  120. + allwinner,pull = <1>;
  121. + };
  122. +
  123. + gmac_power_pin_lamobo: gmac_power_pin@0 {
  124. + allwinner,pins = "PH23";
  125. + allwinner,function = "gpio_out";
  126. + allwinner,drive = <0>;
  127. + allwinner,pull = <0>;
  128. + };
  129. +
  130. + led_pins_lamobo: led_pins@0 {
  131. + allwinner,pins = "PH2";
  132. + allwinner,function = "gpio_out";
  133. + allwinner,drive = <1>;
  134. + allwinner,pull = <0>;
  135. + };
  136. + };
  137. +
  138. + lradc: lradc@01c22800 {
  139. + allwinner,chan0-step = <200>;
  140. + linux,chan0-keycodes = <KEY_VOLUMEUP KEY_VOLUMEDOWN
  141. + KEY_MENU KEY_SEARCH KEY_HOME
  142. + KEY_ESC KEY_ENTER>;
  143. + status = "okay";
  144. + };
  145. +
  146. + ir0: ir@01c21800 {
  147. + pinctrl-names = "default";
  148. + pinctrl-0 = <&ir0_pins_a>;
  149. + status = "okay";
  150. + };
  151. +
  152. + uart0: serial@01c28000 {
  153. + pinctrl-names = "default";
  154. + pinctrl-0 = <&uart0_pins_a>;
  155. + status = "okay";
  156. + };
  157. +
  158. + uart3: serial@01c28c00 {
  159. + pinctrl-names = "default";
  160. + pinctrl-0 = <&uart3_pins_b>;
  161. + status = "okay";
  162. + };
  163. +
  164. + uart7: serial@01c29c00 {
  165. + pinctrl-names = "default";
  166. + pinctrl-0 = <&uart7_pins_a>;
  167. + status = "okay";
  168. + };
  169. +
  170. + i2c0: i2c@01c2ac00 {
  171. + pinctrl-names = "default";
  172. + pinctrl-0 = <&i2c0_pins_a>;
  173. + status = "okay";
  174. +
  175. + axp209: pmic@34 {
  176. + compatible = "x-powers,axp209";
  177. + reg = <0x34>;
  178. + interrupt-parent = <&nmi_intc>;
  179. + interrupts = <0 8>;
  180. +
  181. + interrupt-controller;
  182. + #interrupt-cells = <1>;
  183. + };
  184. + };
  185. +
  186. + i2c1: i2c@01c2b000 {
  187. + pinctrl-names = "default";
  188. + pinctrl-0 = <&i2c1_pins_a>;
  189. + status = "okay";
  190. + };
  191. +
  192. + i2c2: i2c@01c2b400 {
  193. + pinctrl-names = "default";
  194. + pinctrl-0 = <&i2c2_pins_a>;
  195. + status = "okay";
  196. + };
  197. +
  198. + gmac: ethernet@01c50000 {
  199. + pinctrl-names = "default";
  200. + pinctrl-0 = <&gmac_pins_rgmii_a>;
  201. + phy = <&phy1>;
  202. + phy-mode = "rgmii";
  203. + phy-supply = <&reg_gmac_3v3>;
  204. + status = "okay";
  205. +
  206. + phy1: ethernet-phy@1 {
  207. + reg = <1>;
  208. + };
  209. + };
  210. + };
  211. +
  212. + leds {
  213. + compatible = "gpio-leds";
  214. + pinctrl-names = "default";
  215. + pinctrl-0 = <&led_pins_lamobo>;
  216. +
  217. + green {
  218. + label = "lamobo:green:usr";
  219. + gpios = <&pio 7 24 0>;
  220. + default-state = "on";
  221. + };
  222. + };
  223. +
  224. + reg_ahci_5v: ahci-5v {
  225. + status = "okay";
  226. + };
  227. +
  228. + reg_usb1_vbus: usb1-vbus {
  229. + status = "okay";
  230. + };
  231. +
  232. + reg_usb2_vbus: usb2-vbus {
  233. + status = "okay";
  234. + };
  235. +
  236. + reg_gmac_3v3: gmac-3v3 {
  237. + compatible = "regulator-fixed";
  238. + pinctrl-names = "default";
  239. + pinctrl-0 = <&gmac_power_pin_lamobo>;
  240. + regulator-name = "gmac-3v3";
  241. + regulator-min-microvolt = <3300000>;
  242. + regulator-max-microvolt = <3300000>;
  243. + startup-delay-us = <100000>;
  244. + enable-active-high;
  245. + gpio = <&pio 7 23 0>;
  246. + status = "okay";
  247. + };
  248. +};