Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002 /*
0003  * Copyright (C) 2022 Marek Vasut <marex@denx.de>
0004  */
0005 
0006 /dts-v1/;
0007 
0008 #include <dt-bindings/leds/common.h>
0009 #include <dt-bindings/net/qca-ar803x.h>
0010 #include <dt-bindings/phy/phy-imx8-pcie.h>
0011 #include "imx8mp-dhcom-som.dtsi"
0012 
0013 / {
0014         model = "DH electronics i.MX8M Plus DHCOM Premium Developer Kit (2)";
0015         compatible = "dh,imx8mp-dhcom-pdk2", "fsl,imx8mp";
0016 
0017         chosen {
0018                 stdout-path = &uart1;
0019         };
0020 
0021         gpio-keys {
0022                 compatible = "gpio-keys";
0023 
0024                 button-0 {
0025                         gpios = <&gpio1 9 GPIO_ACTIVE_LOW>; /* GPIO A */
0026                         label = "TA1-GPIO-A";
0027                         linux,code = <KEY_A>;
0028                         pinctrl-0 = <&pinctrl_dhcom_a>;
0029                         pinctrl-names = "default";
0030                         wakeup-source;
0031                 };
0032 
0033                 button-1 {
0034                         gpios = <&gpio1 8 GPIO_ACTIVE_LOW>; /* GPIO B */
0035                         label = "TA2-GPIO-B";
0036                         linux,code = <KEY_B>;
0037                         pinctrl-0 = <&pinctrl_dhcom_b>;
0038                         pinctrl-names = "default";
0039                         wakeup-source;
0040                 };
0041 
0042                 button-2 {
0043                         gpios = <&gpio5 2 GPIO_ACTIVE_LOW>; /* GPIO C */
0044                         label = "TA3-GPIO-C";
0045                         linux,code = <KEY_C>;
0046                         pinctrl-0 = <&pinctrl_dhcom_c>;
0047                         pinctrl-names = "default";
0048                         wakeup-source;
0049                 };
0050 
0051                 button-3 {
0052                         gpios = <&gpio4 27 GPIO_ACTIVE_LOW>; /* GPIO D */
0053                         label = "TA4-GPIO-D";
0054                         linux,code = <KEY_D>;
0055                         pinctrl-0 = <&pinctrl_dhcom_d>;
0056                         pinctrl-names = "default";
0057                         wakeup-source;
0058                 };
0059         };
0060 
0061         led {
0062                 compatible = "gpio-leds";
0063 
0064                 led-0 {
0065                         color = <LED_COLOR_ID_GREEN>;
0066                         default-state = "off";
0067                         function = LED_FUNCTION_INDICATOR;
0068                         gpios = <&gpio5 22 GPIO_ACTIVE_HIGH>; /* GPIO E */
0069                         pinctrl-0 = <&pinctrl_dhcom_e>;
0070                         pinctrl-names = "default";
0071                 };
0072 
0073                 led-1 {
0074                         color = <LED_COLOR_ID_GREEN>;
0075                         default-state = "off";
0076                         function = LED_FUNCTION_INDICATOR;
0077                         gpios = <&gpio5 23 GPIO_ACTIVE_HIGH>; /* GPIO F */
0078                         pinctrl-0 = <&pinctrl_dhcom_f>;
0079                         pinctrl-names = "default";
0080                 };
0081 
0082                 led-2 {
0083                         color = <LED_COLOR_ID_GREEN>;
0084                         default-state = "off";
0085                         function = LED_FUNCTION_INDICATOR;
0086                         gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>; /* GPIO H */
0087                         pinctrl-0 = <&pinctrl_dhcom_h>;
0088                         pinctrl-names = "default";
0089                 };
0090 
0091                 led-3 {
0092                         color = <LED_COLOR_ID_GREEN>;
0093                         default-state = "off";
0094                         function = LED_FUNCTION_INDICATOR;
0095                         gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>; /* GPIO I */
0096                         pinctrl-0 = <&pinctrl_dhcom_i>;
0097                         pinctrl-names = "default";
0098                 };
0099         };
0100 };
0101 
0102 /*
0103  * PDK2 carrier board uses SoM with KSZ9131 populated and connected to
0104  * SoM EQoS ethernet RGMII interface. Remove the other SoM PHY DT node.
0105  */
0106 /delete-node/ &ethphy0f;
0107 
0108 /*
0109  * PDK2 carrier board has KSZ9021 PHY populated and connected to SoM FEC
0110  * ethernet RGMII interface. The SoM is not populated with second FEC PHY.
0111  */
0112 /delete-node/ &ethphy1f;
0113 
0114 &fec {  /* Second ethernet */
0115         phy-handle = <&ethphypdk>;
0116 
0117         mdio {
0118                 ethphypdk: ethernet-phy@7 { /* KSZ 9021 */
0119                         compatible = "ethernet-phy-ieee802.3-c22";
0120                         pinctrl-0 = <&pinctrl_ethphy1>;
0121                         pinctrl-names = "default";
0122                         interrupt-parent = <&gpio4>;
0123                         interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
0124                         max-speed = <100>;
0125                         reg = <7>;
0126                         reset-assert-us = <1000>;
0127                         reset-deassert-us = <1000>;
0128                         reset-gpios = <&gpio4 2 GPIO_ACTIVE_LOW>;
0129                         rxc-skew-ps = <3000>;
0130                         rxd0-skew-ps = <0>;
0131                         rxd1-skew-ps = <0>;
0132                         rxd2-skew-ps = <0>;
0133                         rxd3-skew-ps = <0>;
0134                         rxdv-skew-ps = <0>;
0135                         txc-skew-ps = <3000>;
0136                         txd0-skew-ps = <0>;
0137                         txd1-skew-ps = <0>;
0138                         txd2-skew-ps = <0>;
0139                         txd3-skew-ps = <0>;
0140                         txen-skew-ps = <0>;
0141                 };
0142         };
0143 };
0144 
0145 &flexcan1 {
0146         status = "okay";
0147 };
0148 
0149 &usb3_1 {
0150         fsl,over-current-active-low;
0151 };
0152 
0153 &iomuxc {
0154         /*
0155          * GPIO_A,B,C,D are connected to buttons.
0156          * GPIO_E,F,H,I are connected to LEDs.
0157          * GPIO_M is connected to CLKOUT2.
0158          */
0159         pinctrl-0 = <&pinctrl_hog_base
0160                      &pinctrl_dhcom_g &pinctrl_dhcom_j
0161                      &pinctrl_dhcom_k &pinctrl_dhcom_l
0162                      &pinctrl_dhcom_int>;
0163 };