pumpkin-common.dtsi 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  1. // SPDX-License-Identifier: GPL-2.0
  2. /*
  3. * Copyright (c) 2019 BayLibre, SAS.
  4. * Author: Fabien Parent <[email protected]>
  5. */
  6. #include <dt-bindings/gpio/gpio.h>
  7. / {
  8. aliases {
  9. serial0 = &uart0;
  10. ethernet0 = &ethernet;
  11. };
  12. chosen {
  13. stdout-path = "serial0:921600n8";
  14. };
  15. firmware {
  16. optee: optee {
  17. compatible = "linaro,optee-tz";
  18. method = "smc";
  19. };
  20. };
  21. gpio-keys {
  22. compatible = "gpio-keys";
  23. pinctrl-names = "default";
  24. pinctrl-0 = <&gpio_keys_default>;
  25. key-volume-up {
  26. gpios = <&pio 42 GPIO_ACTIVE_LOW>;
  27. label = "volume_up";
  28. linux,code = <115>;
  29. wakeup-source;
  30. debounce-interval = <15>;
  31. };
  32. key-volume-down {
  33. gpios = <&pio 43 GPIO_ACTIVE_LOW>;
  34. label = "volume_down";
  35. linux,code = <114>;
  36. wakeup-source;
  37. debounce-interval = <15>;
  38. };
  39. };
  40. };
  41. &i2c0 {
  42. clock-div = <2>;
  43. pinctrl-names = "default";
  44. pinctrl-0 = <&i2c0_pins_a>;
  45. status = "okay";
  46. tca6416: gpio@20 {
  47. compatible = "ti,tca6416";
  48. reg = <0x20>;
  49. reset-gpios = <&pio 65 GPIO_ACTIVE_LOW>;
  50. pinctrl-names = "default";
  51. pinctrl-0 = <&tca6416_pins>;
  52. gpio-controller;
  53. #gpio-cells = <2>;
  54. eint20-mux-sel0-hog {
  55. gpio-hog;
  56. gpios = <0 0>;
  57. input;
  58. line-name = "eint20_mux_sel0";
  59. };
  60. expcon-mux-sel1-hog {
  61. gpio-hog;
  62. gpios = <1 0>;
  63. input;
  64. line-name = "expcon_mux_sel1";
  65. };
  66. mrg-di-mux-sel2-hog {
  67. gpio-hog;
  68. gpios = <2 0>;
  69. input;
  70. line-name = "mrg_di_mux_sel2";
  71. };
  72. sd-sdio-mux-sel3-hog {
  73. gpio-hog;
  74. gpios = <3 0>;
  75. input;
  76. line-name = "sd_sdio_mux_sel3";
  77. };
  78. sd-sdio-mux-ctrl7-hog {
  79. gpio-hog;
  80. gpios = <7 0>;
  81. output-low;
  82. line-name = "sd_sdio_mux_ctrl7";
  83. };
  84. hw-id0-hog {
  85. gpio-hog;
  86. gpios = <8 0>;
  87. input;
  88. line-name = "hw_id0";
  89. };
  90. hw-id1-hog {
  91. gpio-hog;
  92. gpios = <9 0>;
  93. input;
  94. line-name = "hw_id1";
  95. };
  96. hw-id2-hog {
  97. gpio-hog;
  98. gpios = <10 0>;
  99. input;
  100. line-name = "hw_id2";
  101. };
  102. fg-int-n-hog {
  103. gpio-hog;
  104. gpios = <11 0>;
  105. input;
  106. line-name = "fg_int_n";
  107. };
  108. usba-pwr-en-hog {
  109. gpio-hog;
  110. gpios = <12 0>;
  111. output-high;
  112. line-name = "usba_pwr_en";
  113. };
  114. wifi-3v3-pg-hog {
  115. gpio-hog;
  116. gpios = <13 0>;
  117. input;
  118. line-name = "wifi_3v3_pg";
  119. };
  120. cam-rst-hog {
  121. gpio-hog;
  122. gpios = <14 0>;
  123. output-low;
  124. line-name = "cam_rst";
  125. };
  126. cam-pwdn-hog {
  127. gpio-hog;
  128. gpios = <15 0>;
  129. output-low;
  130. line-name = "cam_pwdn";
  131. };
  132. };
  133. };
  134. &i2c2 {
  135. clock-div = <2>;
  136. pinctrl-names = "default";
  137. pinctrl-0 = <&i2c2_pins_a>;
  138. status = "okay";
  139. };
  140. &uart0 {
  141. status = "okay";
  142. };
  143. &ethernet {
  144. pinctrl-names = "default";
  145. pinctrl-0 = <&ethernet_pins_default>;
  146. phy-handle = <&eth_phy>;
  147. phy-mode = "rmii";
  148. mac-address = [00 00 00 00 00 00];
  149. status = "okay";
  150. mdio {
  151. #address-cells = <1>;
  152. #size-cells = <0>;
  153. eth_phy: ethernet-phy@0 {
  154. reg = <0>;
  155. };
  156. };
  157. };
  158. &usb0 {
  159. status = "okay";
  160. dr_mode = "peripheral";
  161. usb-role-switch;
  162. usb_con: connector {
  163. compatible = "usb-c-connector";
  164. label = "USB-C";
  165. };
  166. };
  167. &usb_phy {
  168. status = "okay";
  169. };
  170. &pio {
  171. gpio_keys_default: gpiodefault {
  172. pins_cmd_dat {
  173. pinmux = <MT8516_PIN_42_KPCOL0__FUNC_GPIO42>,
  174. <MT8516_PIN_43_KPCOL1__FUNC_GPIO43>;
  175. bias-pull-up;
  176. input-enable;
  177. };
  178. };
  179. i2c0_pins_a: i2c0 {
  180. pins1 {
  181. pinmux = <MT8516_PIN_58_SDA0__FUNC_SDA0_0>,
  182. <MT8516_PIN_59_SCL0__FUNC_SCL0_0>;
  183. bias-disable;
  184. };
  185. };
  186. i2c2_pins_a: i2c2 {
  187. pins1 {
  188. pinmux = <MT8516_PIN_60_SDA2__FUNC_SDA2_0>,
  189. <MT8516_PIN_61_SCL2__FUNC_SCL2_0>;
  190. bias-disable;
  191. };
  192. };
  193. tca6416_pins: pinmux_tca6416_pins {
  194. gpio_mux_rst_n_pin {
  195. pinmux = <MT8516_PIN_65_UTXD1__FUNC_GPIO65>;
  196. output-high;
  197. };
  198. gpio_mux_int_n_pin {
  199. pinmux = <MT8516_PIN_64_URXD1__FUNC_GPIO64>;
  200. input-enable;
  201. bias-pull-up;
  202. };
  203. };
  204. ethernet_pins_default: ethernet {
  205. pins_ethernet {
  206. pinmux = <MT8516_PIN_0_EINT0__FUNC_EXT_TXD0>,
  207. <MT8516_PIN_1_EINT1__FUNC_EXT_TXD1>,
  208. <MT8516_PIN_5_EINT5__FUNC_EXT_RXER>,
  209. <MT8516_PIN_6_EINT6__FUNC_EXT_RXC>,
  210. <MT8516_PIN_7_EINT7__FUNC_EXT_RXDV>,
  211. <MT8516_PIN_8_EINT8__FUNC_EXT_RXD0>,
  212. <MT8516_PIN_9_EINT9__FUNC_EXT_RXD1>,
  213. <MT8516_PIN_12_EINT12__FUNC_EXT_TXEN>,
  214. <MT8516_PIN_38_MRG_DI__FUNC_EXT_MDIO>,
  215. <MT8516_PIN_39_MRG_DO__FUNC_EXT_MDC>;
  216. };
  217. };
  218. };