qcom-mdm9615-wp8548-mangoh-green.dts 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281
  1. /*
  2. * Device Tree Source for mangOH Green Board with WP8548 Module
  3. *
  4. * Copyright (C) 2016 BayLibre, SAS.
  5. * Author : Neil Armstrong <[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. #include <dt-bindings/input/input.h>
  46. #include "qcom-mdm9615-wp8548.dtsi"
  47. #include <dt-bindings/interrupt-controller/irq.h>
  48. #include <dt-bindings/gpio/gpio.h>
  49. / {
  50. model = "MangOH Green with WP8548 Module";
  51. compatible = "swir,mangoh-green-wp8548", "swir,wp8548", "qcom,mdm9615";
  52. aliases {
  53. spi0 = &gsbi3_spi;
  54. serial0 = &gsbi4_serial;
  55. serial1 = &gsbi5_serial;
  56. i2c0 = &gsbi5_i2c;
  57. mmc0 = &sdcc1;
  58. };
  59. chosen {
  60. stdout-path = "serial1:115200n8";
  61. };
  62. };
  63. &msmgpio {
  64. /* MangOH GPIO Mapping :
  65. * - 2 : GPIOEXP_INT2
  66. * - 7 : IOT1_GPIO2
  67. * - 8 : IOT0_GPIO4
  68. * - 13: IOT0_GPIO3
  69. * - 21: IOT1_GPIO4
  70. * - 22: IOT2_GPIO1
  71. * - 23: IOT2_GPIO2
  72. * - 24: IOT2_GPIO3
  73. * - 25: IOT1_GPIO1
  74. * - 32: IOT1_GPIO3
  75. * - 33: IOT0_GPIO2
  76. * - 42: IOT0_GPIO1 and SD Card Detect
  77. */
  78. gpioext1_pins: gpioext1_pins {
  79. pins {
  80. pins = "gpio2";
  81. function = "gpio";
  82. input-enable;
  83. bias-disable;
  84. };
  85. };
  86. sdc_cd_pins: sdc_cd_pins {
  87. pins {
  88. pins = "gpio42";
  89. function = "gpio";
  90. drive-strength = <2>;
  91. bias-pull-up;
  92. };
  93. };
  94. };
  95. &gsbi3_spi {
  96. spi@0 {
  97. compatible = "swir,mangoh-iotport-spi";
  98. spi-max-frequency = <24000000>;
  99. reg = <0>;
  100. };
  101. };
  102. &gsbi5_i2c {
  103. mux@71 {
  104. compatible = "nxp,pca9548";
  105. #address-cells = <1>;
  106. #size-cells = <0>;
  107. reg = <0x71>;
  108. i2c_iot0: i2c@0 {
  109. #address-cells = <1>;
  110. #size-cells = <0>;
  111. reg = <0>;
  112. };
  113. i2c_iot1: i2c@1 {
  114. #address-cells = <1>;
  115. #size-cells = <0>;
  116. reg = <1>;
  117. };
  118. i2c_iot2: i2c@2 {
  119. #address-cells = <1>;
  120. #size-cells = <0>;
  121. reg = <2>;
  122. };
  123. i2c@3 {
  124. #address-cells = <1>;
  125. #size-cells = <0>;
  126. reg = <3>;
  127. usbhub: hub@8 {
  128. compatible = "smsc,usb3503a";
  129. reg = <0x8>;
  130. connect-gpios = <&gpioext2 1 GPIO_ACTIVE_HIGH>;
  131. intn-gpios = <&gpioext2 0 GPIO_ACTIVE_HIGH>;
  132. initial-mode = <1>;
  133. };
  134. };
  135. i2c@4 {
  136. #address-cells = <1>;
  137. #size-cells = <0>;
  138. reg = <4>;
  139. gpioext0: gpio@3e {
  140. /* GPIO Expander 0 Mapping :
  141. * - 0: ARDUINO_RESET_Level shift
  142. * - 1: BattChrgr_PG_N
  143. * - 2: BattGauge_GPIO
  144. * - 3: LED_ON (out active high)
  145. * - 4: ATmega_reset_GPIO
  146. * - 5: X
  147. * - 6: PCM_ANALOG_SELECT (out active high)
  148. * - 7: X
  149. * - 8: Board_rev_res1 (in)
  150. * - 9: Board_rev_res2 (in)
  151. * - 10: UART_EXP1_ENn (out active low / pull-down)
  152. * - 11: UART_EXP1_IN (out pull-down)
  153. * - 12: UART_EXP2_IN (out pull-down)
  154. * - 13: SDIO_SEL (out pull-down)
  155. * - 14: SPI_EXP1_ENn (out active low / pull-down)
  156. * - 15: SPI_EXP1_IN (out pull-down)
  157. */
  158. #gpio-cells = <2>;
  159. #interrupt-cells = <2>;
  160. compatible = "semtech,sx1509q";
  161. reg = <0x3e>;
  162. interrupt-parent = <&gpioext1>;
  163. interrupts = <0 IRQ_TYPE_EDGE_FALLING>;
  164. probe-reset;
  165. gpio-controller;
  166. interrupt-controller;
  167. };
  168. };
  169. i2c@5 {
  170. #address-cells = <1>;
  171. #size-cells = <0>;
  172. reg = <5>;
  173. gpioext1: gpio@3f {
  174. /* GPIO Expander 1 Mapping :
  175. * - 0: GPIOEXP_INT1
  176. * - 1: Battery detect
  177. * - 2: GPIO_SCF3_RESET
  178. * - 3: LED_CARD_DETECT_IOT0 (in)
  179. * - 4: LED_CARD_DETECT_IOT1 (in)
  180. * - 5: LED_CARD_DETECT_IOT2 (in)
  181. * - 6: UIM2_PWM_SELECT
  182. * - 7: UIM2_M2_S_SELECT
  183. * - 8: TP900
  184. * - 9: SENSOR_INT1 (in)
  185. * - 10: SENSOR_INT2 (in)
  186. * - 11: CARD_DETECT_IOT0 (in pull-up)
  187. * - 12: CARD_DETECT_IOT2 (in pull-up)
  188. * - 13: CARD_DETECT_IOT1 (in pull-up)
  189. * - 14: GPIOEXP_INT3 (in active low / pull-up)
  190. * - 15: BattChrgr_INT_N
  191. */
  192. pinctrl-0 = <&gpioext1_pins>;
  193. pinctrl-names = "default";
  194. #gpio-cells = <2>;
  195. #interrupt-cells = <2>;
  196. compatible = "semtech,sx1509q";
  197. reg = <0x3f>;
  198. interrupt-parent = <&msmgpio>;
  199. interrupts = <0 IRQ_TYPE_EDGE_FALLING>;
  200. probe-reset;
  201. gpio-controller;
  202. interrupt-controller;
  203. };
  204. };
  205. i2c@6 {
  206. #address-cells = <1>;
  207. #size-cells = <0>;
  208. reg = <6>;
  209. gpioext2: gpio@70 {
  210. /* GPIO Expander 2 Mapping :
  211. * - 0: USB_HUB_INTn
  212. * - 1: HUB_CONNECT
  213. * - 2: GPIO_IOT2_RESET (out active low / pull-up)
  214. * - 3: GPIO_IOT1_RESET (out active low / pull-up)
  215. * - 4: GPIO_IOT0_RESET (out active low / pull-up)
  216. * - 5: TP901
  217. * - 6: TP902
  218. * - 7: TP903
  219. * - 8: UART_EXP2_ENn (out active low / pull-down)
  220. * - 9: PCM_EXP1_ENn (out active low)
  221. * - 10: PCM_EXP1_SEL (out)
  222. * - 11: ARD_FTDI
  223. * - 12: TP904
  224. * - 13: TP905
  225. * - 14: TP906
  226. * - 15: RS232_Enable (out active high / pull-up)
  227. */
  228. #gpio-cells = <2>;
  229. #interrupt-cells = <2>;
  230. compatible = "semtech,sx1509q";
  231. reg = <0x70>;
  232. interrupt-parent = <&gpioext1>;
  233. interrupts = <14 IRQ_TYPE_EDGE_FALLING>;
  234. probe-reset;
  235. gpio-controller;
  236. interrupt-controller;
  237. };
  238. };
  239. i2c@7 {
  240. #address-cells = <1>;
  241. #size-cells = <0>;
  242. reg = <7>;
  243. };
  244. };
  245. };
  246. &sdcc1 {
  247. pinctrl-0 = <&sdc_cd_pins>;
  248. pinctrl-names = "default";
  249. disable-wp;
  250. cd-gpios = <&msmgpio 42 GPIO_ACTIVE_LOW>; /* Active low CD */
  251. };