Marek Vasut | 4d573d5 | 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 | d1aebfa | 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 | 4d573d5 | 2022-05-21 16:56:26 +0200 | [diff] [blame] | 9 | */ |
| 10 | |
| 11 | /dts-v1/; |
| 12 | |
| 13 | #include <dt-bindings/leds/common.h> |
Marek Vasut | 4d573d5 | 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 | a5f29e7 | 2022-08-12 22:41:52 +0200 | [diff] [blame] | 19 | compatible = "dh,imx8mp-dhcom-pdk2", "dh,imx8mp-dhcom-som", |
Marcel Ziswiler | 0b42fdc | 2022-11-07 22:22:39 +0100 | [diff] [blame] | 20 | "fsl,imx8mp"; |
Marek Vasut | 4d573d5 | 2022-05-21 16:56:26 +0200 | [diff] [blame] | 21 | |
| 22 | chosen { |
| 23 | stdout-path = &uart1; |
| 24 | }; |
| 25 | |
| 26 | gpio-keys { |
Marek Vasut | 4d573d5 | 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 | 0b42fdc | 2022-11-07 22:22:39 +0100 | [diff] [blame] | 69 | led-0 { |
Marek Vasut | 4d573d5 | 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 | 0b42fdc | 2022-11-07 22:22:39 +0100 | [diff] [blame] | 78 | led-1 { |
Marek Vasut | 4d573d5 | 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 | 0b42fdc | 2022-11-07 22:22:39 +0100 | [diff] [blame] | 87 | led-2 { |
Marek Vasut | 4d573d5 | 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 | 0b42fdc | 2022-11-07 22:22:39 +0100 | [diff] [blame] | 96 | led-3 { |
Marek Vasut | 4d573d5 | 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 | |
Marek Vasut | 4d573d5 | 2022-05-21 16:56:26 +0200 | [diff] [blame] | 107 | &fec { /* Second ethernet */ |
Marek Vasut | 4007103 | 2023-02-11 23:38:00 +0100 | [diff] [blame] | 108 | pinctrl-0 = <&pinctrl_fec_rgmii>; |
Marek Vasut | 4d573d5 | 2022-05-21 16:56:26 +0200 | [diff] [blame] | 109 | phy-handle = <ðphypdk>; |
Marek Vasut | 4007103 | 2023-02-11 23:38:00 +0100 | [diff] [blame] | 110 | phy-mode = "rgmii"; |
Marek Vasut | 4d573d5 | 2022-05-21 16:56:26 +0200 | [diff] [blame] | 111 | |
| 112 | mdio { |
| 113 | ethphypdk: ethernet-phy@7 { /* KSZ 9021 */ |
| 114 | compatible = "ethernet-phy-ieee802.3-c22"; |
Marek Vasut | 4d573d5 | 2022-05-21 16:56:26 +0200 | [diff] [blame] | 115 | pinctrl-0 = <&pinctrl_ethphy1>; |
| 116 | pinctrl-names = "default"; |
Marcel Ziswiler | 0b42fdc | 2022-11-07 22:22:39 +0100 | [diff] [blame] | 117 | interrupt-parent = <&gpio4>; |
| 118 | interrupts = <3 IRQ_TYPE_LEVEL_LOW>; |
| 119 | max-speed = <100>; |
Marek Vasut | 4d573d5 | 2022-05-21 16:56:26 +0200 | [diff] [blame] | 120 | reg = <7>; |
| 121 | reset-assert-us = <1000>; |
| 122 | reset-deassert-us = <1000>; |
| 123 | reset-gpios = <&gpio4 2 GPIO_ACTIVE_LOW>; |
| 124 | rxc-skew-ps = <3000>; |
| 125 | rxd0-skew-ps = <0>; |
| 126 | rxd1-skew-ps = <0>; |
| 127 | rxd2-skew-ps = <0>; |
| 128 | rxd3-skew-ps = <0>; |
| 129 | rxdv-skew-ps = <0>; |
| 130 | txc-skew-ps = <3000>; |
| 131 | txd0-skew-ps = <0>; |
| 132 | txd1-skew-ps = <0>; |
| 133 | txd2-skew-ps = <0>; |
| 134 | txd3-skew-ps = <0>; |
| 135 | txen-skew-ps = <0>; |
Marek Vasut | 4d573d5 | 2022-05-21 16:56:26 +0200 | [diff] [blame] | 136 | }; |
| 137 | }; |
| 138 | }; |
| 139 | |
| 140 | &flexcan1 { |
| 141 | status = "okay"; |
| 142 | }; |
| 143 | |
| 144 | &usb3_1 { |
| 145 | fsl,over-current-active-low; |
| 146 | }; |
Marcel Ziswiler | 0b42fdc | 2022-11-07 22:22:39 +0100 | [diff] [blame] | 147 | |
| 148 | &iomuxc { |
| 149 | /* |
| 150 | * GPIO_A,B,C,D are connected to buttons. |
| 151 | * GPIO_E,F,H,I are connected to LEDs. |
| 152 | * GPIO_M is connected to CLKOUT2. |
| 153 | */ |
| 154 | pinctrl-0 = <&pinctrl_hog_base |
| 155 | &pinctrl_dhcom_g &pinctrl_dhcom_j |
| 156 | &pinctrl_dhcom_k &pinctrl_dhcom_l |
| 157 | &pinctrl_dhcom_int>; |
| 158 | }; |