imx6qdl-dhcom-drc02.dtsi 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. // SPDX-License-Identifier: GPL-2.0+
  2. /*
  3. * Copyright (C) 2021 DH electronics GmbH
  4. */
  5. / {
  6. chosen {
  7. stdout-path = "serial0:115200n8";
  8. };
  9. };
  10. /*
  11. * Special SoM hardware required which uses the pins from micro SD card. The
  12. * pins SD3_DAT0 and SD3_DAT1 are muxed as can2 Tx and Rx. The signals for can2
  13. * Tx and Rx are routed to the DHCOM UART1 rts/cts pins. Therefore the micro SD
  14. * card must be disabled and the uart1 rts/cts must be output on other DHCOM
  15. * pins, see uart1 and usdhc3 node below.
  16. */
  17. &can2 {
  18. status = "okay";
  19. };
  20. &gpio1 {
  21. /*
  22. * NOTE: On DRC02, the RS485_RX_En is controlled by a separate
  23. * GPIO line, however the i.MX6 UART driver assumes RX happens
  24. * during TX anyway and that it only controls drive enable DE
  25. * line. Hence, the RX is always enabled here.
  26. */
  27. rs485-rx-en-hog {
  28. gpio-hog;
  29. gpios = <18 0>; /* GPIO Q */
  30. line-name = "rs485-rx-en";
  31. output-low;
  32. };
  33. };
  34. &gpio3 {
  35. gpio-line-names =
  36. "", "", "", "", "", "", "", "",
  37. "", "", "", "", "", "", "", "",
  38. "", "", "", "", "", "", "", "",
  39. "", "", "", "DRC02-In1", "", "", "", "";
  40. };
  41. &gpio4 {
  42. gpio-line-names =
  43. "", "", "", "", "", "DHCOM-E", "DRC02-In2", "DHCOM-H",
  44. "DHCOM-I", "DRC02-HW0", "", "", "", "", "", "",
  45. "", "", "", "", "DRC02-Out1", "", "", "",
  46. "", "", "", "", "", "", "", "";
  47. };
  48. &gpio6 {
  49. gpio-line-names =
  50. "", "", "", "DRC02-Out2", "", "", "SOM-HW1", "",
  51. "", "", "", "", "", "", "DRC02-HW2", "DRC02-HW1",
  52. "", "", "", "", "", "", "", "",
  53. "", "", "", "", "", "", "", "";
  54. };
  55. &i2c1 {
  56. eeprom@50 {
  57. compatible = "atmel,24c04";
  58. reg = <0x50>;
  59. pagesize = <16>;
  60. };
  61. };
  62. &uart1 {
  63. /*
  64. * Due to the use of can2 the signals for can2 Tx and Rx are routed to
  65. * DHCOM UART1 rts/cts pins. Therefore this UART have to use DHCOM GPIOs
  66. * for rts/cts. So configure DHCOM GPIO I as rts and GPIO M as cts.
  67. */
  68. /delete-property/ uart-has-rtscts;
  69. cts-gpios = <&gpio7 0 GPIO_ACTIVE_HIGH>; /* GPIO M */
  70. pinctrl-0 = <&pinctrl_uart1 &pinctrl_dhcom_i &pinctrl_dhcom_m>;
  71. pinctrl-names = "default";
  72. rts-gpios = <&gpio4 8 GPIO_ACTIVE_HIGH>; /* GPIO I */
  73. };
  74. &uart5 {
  75. /*
  76. * On DRC02 this UART is used as RS485 interface and RS485_TX_En is
  77. * controlled by DHCOM GPIO P. So remove rts/cts pins and the property
  78. * uart-has-rtscts from this UART and add the DHCOM GPIO P pin via
  79. * rts-gpios. The RS485_RX_En is controlled by DHCOM GPIO Q, see gpio1
  80. * node above.
  81. */
  82. /delete-property/ uart-has-rtscts;
  83. linux,rs485-enabled-at-boot-time;
  84. pinctrl-0 = <&pinctrl_uart5_core &pinctrl_dhcom_p &pinctrl_dhcom_q>;
  85. pinctrl-names = "default";
  86. rts-gpios = <&gpio7 13 GPIO_ACTIVE_HIGH>; /* GPIO P */
  87. };
  88. &usbh1 {
  89. disable-over-current;
  90. };
  91. &usdhc2 { /* SD card */
  92. status = "okay";
  93. };
  94. &usdhc3 {
  95. /*
  96. * Due to the use of can2 the micro SD card on module have to be
  97. * disabled, because the pins SD3_DAT0 and SD3_DAT1 are muxed as
  98. * can2 Tx and Rx.
  99. */
  100. status = "disabled";
  101. };
  102. &iomuxc {
  103. pinctrl-0 = <
  104. /*
  105. * The following DHCOM GPIOs are used on this board.
  106. * Therefore, they have been removed from the list below.
  107. * I: uart1 rts
  108. * M: uart1 cts
  109. * P: uart5 rs485-tx-en
  110. * Q: uart5 rs485-rx-en
  111. */
  112. &pinctrl_hog_base
  113. &pinctrl_dhcom_a &pinctrl_dhcom_b &pinctrl_dhcom_c
  114. &pinctrl_dhcom_d &pinctrl_dhcom_e &pinctrl_dhcom_f
  115. &pinctrl_dhcom_g &pinctrl_dhcom_h
  116. &pinctrl_dhcom_j &pinctrl_dhcom_k &pinctrl_dhcom_l
  117. &pinctrl_dhcom_n &pinctrl_dhcom_o
  118. &pinctrl_dhcom_r
  119. &pinctrl_dhcom_s &pinctrl_dhcom_t &pinctrl_dhcom_u
  120. &pinctrl_dhcom_v &pinctrl_dhcom_w &pinctrl_dhcom_int
  121. >;
  122. pinctrl-names = "default";
  123. pinctrl_uart5_core: uart5-core-grp {
  124. fsl,pins = <
  125. MX6QDL_PAD_CSI0_DAT14__UART5_TX_DATA 0x1b0b1
  126. MX6QDL_PAD_CSI0_DAT15__UART5_RX_DATA 0x1b0b1
  127. >;
  128. };
  129. };