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