sun5i-gr8-chip-pro.dts 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238
  1. /*
  2. * Copyright 2016 Free Electrons
  3. * Copyright 2016 NextThing Co
  4. *
  5. * Maxime Ripard <[email protected]>
  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 "AS IS", 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. /dts-v1/;
  46. #include "sun5i-gr8.dtsi"
  47. #include "sunxi-common-regulators.dtsi"
  48. #include <dt-bindings/gpio/gpio.h>
  49. #include <dt-bindings/input/input.h>
  50. #include <dt-bindings/interrupt-controller/irq.h>
  51. / {
  52. model = "NextThing C.H.I.P. Pro";
  53. compatible = "nextthing,chip-pro", "nextthing,gr8";
  54. aliases {
  55. i2c0 = &i2c0;
  56. i2c1 = &i2c1;
  57. serial0 = &uart1;
  58. serial1 = &uart2;
  59. serial2 = &uart3;
  60. };
  61. chosen {
  62. stdout-path = "serial0:115200n8";
  63. };
  64. leds {
  65. compatible = "gpio-leds";
  66. status {
  67. label = "chip-pro:white:status";
  68. gpios = <&axp_gpio 2 GPIO_ACTIVE_HIGH>;
  69. default-state = "on";
  70. };
  71. };
  72. mmc0_pwrseq: mmc0_pwrseq {
  73. compatible = "mmc-pwrseq-simple";
  74. reset-gpios = <&pio 1 10 GPIO_ACTIVE_LOW>; /* PB10 */
  75. };
  76. };
  77. &codec {
  78. status = "okay";
  79. };
  80. &ehci0 {
  81. status = "okay";
  82. };
  83. &i2c0 {
  84. status = "okay";
  85. axp209: pmic@34 {
  86. reg = <0x34>;
  87. /*
  88. * The interrupt is routed through the "External Fast
  89. * Interrupt Request" pin (ball G13 of the module)
  90. * directly to the main interrupt controller, without
  91. * any other controller interfering.
  92. */
  93. interrupts = <0>;
  94. };
  95. };
  96. #include "axp209.dtsi"
  97. &i2c1 {
  98. status = "disabled";
  99. };
  100. &i2s0 {
  101. pinctrl-names = "default";
  102. pinctrl-0 = <&i2s0_mclk_pin>, <&i2s0_data_pins>;
  103. status = "disabled";
  104. };
  105. &mmc0 {
  106. vmmc-supply = <&reg_vcc3v3>;
  107. mmc-pwrseq = <&mmc0_pwrseq>;
  108. bus-width = <4>;
  109. non-removable;
  110. status = "okay";
  111. };
  112. &nfc {
  113. pinctrl-names = "default";
  114. pinctrl-0 = <&nand_pins &nand_cs0_pin &nand_rb0_pin>;
  115. status = "okay";
  116. nand@0 {
  117. reg = <0>;
  118. allwinner,rb = <0>;
  119. nand-ecc-mode = "hw";
  120. };
  121. };
  122. &ohci0 {
  123. status = "okay";
  124. };
  125. &otg_sram {
  126. status = "okay";
  127. };
  128. &pwm {
  129. pinctrl-names = "default";
  130. pinctrl-0 = <&pwm0_pin>, <&pwm1_pins>;
  131. status = "disabled";
  132. };
  133. &reg_dcdc2 {
  134. regulator-min-microvolt = <1000000>;
  135. regulator-max-microvolt = <1400000>;
  136. regulator-name = "vdd-cpu";
  137. regulator-always-on;
  138. };
  139. &reg_dcdc3 {
  140. regulator-min-microvolt = <1000000>;
  141. regulator-max-microvolt = <1300000>;
  142. regulator-name = "vdd-sys";
  143. regulator-always-on;
  144. };
  145. &reg_ldo1 {
  146. regulator-name = "vdd-rtc";
  147. };
  148. &reg_ldo2 {
  149. regulator-min-microvolt = <2700000>;
  150. regulator-max-microvolt = <3300000>;
  151. regulator-name = "avcc";
  152. regulator-always-on;
  153. };
  154. /*
  155. * Both LDO3 and LDO4 are used in parallel to power up the
  156. * WiFi/BT chip.
  157. */
  158. &reg_ldo3 {
  159. regulator-min-microvolt = <3300000>;
  160. regulator-max-microvolt = <3300000>;
  161. regulator-name = "vcc-wifi-1";
  162. regulator-always-on;
  163. };
  164. &reg_ldo4 {
  165. regulator-min-microvolt = <3300000>;
  166. regulator-max-microvolt = <3300000>;
  167. regulator-name = "vcc-wifi-2";
  168. regulator-always-on;
  169. };
  170. &uart1 {
  171. pinctrl-names = "default";
  172. pinctrl-0 = <&uart1_pg_pins>, <&uart1_cts_rts_pins>;
  173. status = "okay";
  174. };
  175. &uart2 {
  176. pinctrl-names = "default";
  177. pinctrl-0 = <&uart2_pd_pins>, <&uart2_cts_rts_pd_pins>;
  178. status = "disabled";
  179. };
  180. &uart3 {
  181. pinctrl-names = "default";
  182. pinctrl-0 = <&uart3_pg_pins>, <&uart3_cts_rts_pg_pins>;
  183. status = "okay";
  184. };
  185. &usb_otg {
  186. /*
  187. * The CHIP Pro doesn't have a controllable VBUS, nor does it
  188. * have any 5v rail on the board itself.
  189. *
  190. * If one wants to use it as a true OTG port, it should be
  191. * done in the baseboard, and its DT / overlay will add it.
  192. */
  193. dr_mode = "otg";
  194. status = "okay";
  195. };
  196. &usb_power_supply {
  197. status = "okay";
  198. };
  199. &usbphy {
  200. usb0_id_det-gpios = <&pio 6 2 GPIO_ACTIVE_HIGH>; /* PG2 */
  201. usb0_vbus_power-supply = <&usb_power_supply>;
  202. usb1_vbus-supply = <&reg_vcc5v0>;
  203. status = "okay";
  204. };