imx8mp-dhcom-pdk2.dts 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2. /*
  3. * Copyright (C) 2022 Marek Vasut <[email protected]>
  4. *
  5. * DHCOM iMX8MP variant:
  6. * DHCM-iMX8ML8-C160-R409-F1638-SPI16-GE-CAN2-SD-RTC-WBTA-ADC-T-RGB-CSI2-HS-I-01D2
  7. * DHCOM PCB number: 660-100 or newer
  8. * PDK2 PCB number: 516-400 or newer
  9. */
  10. /dts-v1/;
  11. #include <dt-bindings/leds/common.h>
  12. #include <dt-bindings/phy/phy-imx8-pcie.h>
  13. #include "imx8mp-dhcom-som.dtsi"
  14. / {
  15. model = "DH electronics i.MX8M Plus DHCOM Premium Developer Kit (2)";
  16. compatible = "dh,imx8mp-dhcom-pdk2", "dh,imx8mp-dhcom-som",
  17. "fsl,imx8mp";
  18. chosen {
  19. stdout-path = &uart1;
  20. };
  21. gpio-keys {
  22. compatible = "gpio-keys";
  23. button-0 {
  24. gpios = <&gpio1 9 GPIO_ACTIVE_LOW>; /* GPIO A */
  25. label = "TA1-GPIO-A";
  26. linux,code = <KEY_A>;
  27. pinctrl-0 = <&pinctrl_dhcom_a>;
  28. pinctrl-names = "default";
  29. wakeup-source;
  30. };
  31. button-1 {
  32. gpios = <&gpio1 8 GPIO_ACTIVE_LOW>; /* GPIO B */
  33. label = "TA2-GPIO-B";
  34. linux,code = <KEY_B>;
  35. pinctrl-0 = <&pinctrl_dhcom_b>;
  36. pinctrl-names = "default";
  37. wakeup-source;
  38. };
  39. button-2 {
  40. gpios = <&gpio5 2 GPIO_ACTIVE_LOW>; /* GPIO C */
  41. label = "TA3-GPIO-C";
  42. linux,code = <KEY_C>;
  43. pinctrl-0 = <&pinctrl_dhcom_c>;
  44. pinctrl-names = "default";
  45. wakeup-source;
  46. };
  47. button-3 {
  48. gpios = <&gpio4 27 GPIO_ACTIVE_LOW>; /* GPIO D */
  49. label = "TA4-GPIO-D";
  50. linux,code = <KEY_D>;
  51. pinctrl-0 = <&pinctrl_dhcom_d>;
  52. pinctrl-names = "default";
  53. wakeup-source;
  54. };
  55. };
  56. led {
  57. compatible = "gpio-leds";
  58. led-0 {
  59. color = <LED_COLOR_ID_GREEN>;
  60. default-state = "off";
  61. function = LED_FUNCTION_INDICATOR;
  62. gpios = <&gpio5 22 GPIO_ACTIVE_HIGH>; /* GPIO E */
  63. pinctrl-0 = <&pinctrl_dhcom_e>;
  64. pinctrl-names = "default";
  65. };
  66. led-1 {
  67. color = <LED_COLOR_ID_GREEN>;
  68. default-state = "off";
  69. function = LED_FUNCTION_INDICATOR;
  70. gpios = <&gpio5 23 GPIO_ACTIVE_HIGH>; /* GPIO F */
  71. pinctrl-0 = <&pinctrl_dhcom_f>;
  72. pinctrl-names = "default";
  73. };
  74. led-2 {
  75. color = <LED_COLOR_ID_GREEN>;
  76. default-state = "off";
  77. function = LED_FUNCTION_INDICATOR;
  78. gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>; /* GPIO H */
  79. pinctrl-0 = <&pinctrl_dhcom_h>;
  80. pinctrl-names = "default";
  81. };
  82. led-3 {
  83. color = <LED_COLOR_ID_GREEN>;
  84. default-state = "off";
  85. function = LED_FUNCTION_INDICATOR;
  86. gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>; /* GPIO I */
  87. pinctrl-0 = <&pinctrl_dhcom_i>;
  88. pinctrl-names = "default";
  89. };
  90. };
  91. };
  92. /*
  93. * PDK2 carrier board uses SoM with KSZ9131 populated and connected to
  94. * SoM EQoS ethernet RGMII interface. Remove the other SoM PHY DT node.
  95. */
  96. /delete-node/ &ethphy0f;
  97. /*
  98. * PDK2 carrier board has KSZ9021 PHY populated and connected to SoM FEC
  99. * ethernet RGMII interface. The SoM is not populated with second FEC PHY.
  100. */
  101. /delete-node/ &ethphy1f;
  102. &fec { /* Second ethernet */
  103. phy-handle = <&ethphypdk>;
  104. mdio {
  105. ethphypdk: ethernet-phy@7 { /* KSZ 9021 */
  106. compatible = "ethernet-phy-ieee802.3-c22";
  107. pinctrl-0 = <&pinctrl_ethphy1>;
  108. pinctrl-names = "default";
  109. interrupt-parent = <&gpio4>;
  110. interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
  111. max-speed = <100>;
  112. reg = <7>;
  113. reset-assert-us = <1000>;
  114. reset-deassert-us = <1000>;
  115. reset-gpios = <&gpio4 2 GPIO_ACTIVE_LOW>;
  116. rxc-skew-ps = <3000>;
  117. rxd0-skew-ps = <0>;
  118. rxd1-skew-ps = <0>;
  119. rxd2-skew-ps = <0>;
  120. rxd3-skew-ps = <0>;
  121. rxdv-skew-ps = <0>;
  122. txc-skew-ps = <3000>;
  123. txd0-skew-ps = <0>;
  124. txd1-skew-ps = <0>;
  125. txd2-skew-ps = <0>;
  126. txd3-skew-ps = <0>;
  127. txen-skew-ps = <0>;
  128. };
  129. };
  130. };
  131. &flexcan1 {
  132. status = "okay";
  133. };
  134. &usb3_1 {
  135. fsl,over-current-active-low;
  136. };
  137. &iomuxc {
  138. /*
  139. * GPIO_A,B,C,D are connected to buttons.
  140. * GPIO_E,F,H,I are connected to LEDs.
  141. * GPIO_M is connected to CLKOUT2.
  142. */
  143. pinctrl-0 = <&pinctrl_hog_base
  144. &pinctrl_dhcom_g &pinctrl_dhcom_j
  145. &pinctrl_dhcom_k &pinctrl_dhcom_l
  146. &pinctrl_dhcom_int>;
  147. };