xref: /linux/arch/arm64/boot/dts/freescale/imx8mp-dhcom-pdk2.dts (revision 04a0b7b88402caf01fe5ebd0df28c3d956c61a50)
18d671269SMarek Vasut// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
28d671269SMarek Vasut/*
38d671269SMarek Vasut * Copyright (C) 2022 Marek Vasut <marex@denx.de>
4ceefe3d5SMarek Vasut *
5ceefe3d5SMarek Vasut * DHCOM iMX8MP variant:
6ceefe3d5SMarek Vasut * DHCM-iMX8ML8-C160-R409-F1638-SPI16-GE-CAN2-SD-RTC-WBTA-ADC-T-RGB-CSI2-HS-I-01D2
7ceefe3d5SMarek Vasut * DHCOM PCB number: 660-100 or newer
8ceefe3d5SMarek Vasut * PDK2 PCB number: 516-400 or newer
98d671269SMarek Vasut */
108d671269SMarek Vasut
118d671269SMarek Vasut/dts-v1/;
128d671269SMarek Vasut
138d671269SMarek Vasut#include <dt-bindings/leds/common.h>
148d671269SMarek Vasut#include <dt-bindings/phy/phy-imx8-pcie.h>
158d671269SMarek Vasut#include "imx8mp-dhcom-som.dtsi"
168d671269SMarek Vasut
178d671269SMarek Vasut/ {
188d671269SMarek Vasut	model = "DH electronics i.MX8M Plus DHCOM Premium Developer Kit (2)";
19dcc80ddbSMarek Vasut	compatible = "dh,imx8mp-dhcom-pdk2", "dh,imx8mp-dhcom-som",
20dcc80ddbSMarek Vasut		     "fsl,imx8mp";
218d671269SMarek Vasut
228d671269SMarek Vasut	chosen {
238d671269SMarek Vasut		stdout-path = &uart1;
248d671269SMarek Vasut	};
258d671269SMarek Vasut
26*04a0b7b8SMarek Vasut	clk_ext_audio_codec: clock-codec {
27*04a0b7b8SMarek Vasut		compatible = "fixed-clock";
28*04a0b7b8SMarek Vasut		#clock-cells = <0>;
29*04a0b7b8SMarek Vasut		clock-frequency = <24000000>;
30*04a0b7b8SMarek Vasut	};
31*04a0b7b8SMarek Vasut
328d671269SMarek Vasut	gpio-keys {
338d671269SMarek Vasut		compatible = "gpio-keys";
348d671269SMarek Vasut
358d671269SMarek Vasut		button-0 {
368d671269SMarek Vasut			gpios = <&gpio1 9 GPIO_ACTIVE_LOW>; /* GPIO A */
378d671269SMarek Vasut			label = "TA1-GPIO-A";
388d671269SMarek Vasut			linux,code = <KEY_A>;
398d671269SMarek Vasut			pinctrl-0 = <&pinctrl_dhcom_a>;
408d671269SMarek Vasut			pinctrl-names = "default";
418d671269SMarek Vasut			wakeup-source;
428d671269SMarek Vasut		};
438d671269SMarek Vasut
448d671269SMarek Vasut		button-1 {
458d671269SMarek Vasut			gpios = <&gpio1 8 GPIO_ACTIVE_LOW>; /* GPIO B */
468d671269SMarek Vasut			label = "TA2-GPIO-B";
478d671269SMarek Vasut			linux,code = <KEY_B>;
488d671269SMarek Vasut			pinctrl-0 = <&pinctrl_dhcom_b>;
498d671269SMarek Vasut			pinctrl-names = "default";
508d671269SMarek Vasut			wakeup-source;
518d671269SMarek Vasut		};
528d671269SMarek Vasut
538d671269SMarek Vasut		button-2 {
548d671269SMarek Vasut			gpios = <&gpio5 2 GPIO_ACTIVE_LOW>; /* GPIO C */
558d671269SMarek Vasut			label = "TA3-GPIO-C";
568d671269SMarek Vasut			linux,code = <KEY_C>;
578d671269SMarek Vasut			pinctrl-0 = <&pinctrl_dhcom_c>;
588d671269SMarek Vasut			pinctrl-names = "default";
598d671269SMarek Vasut			wakeup-source;
608d671269SMarek Vasut		};
618d671269SMarek Vasut
628d671269SMarek Vasut		button-3 {
638d671269SMarek Vasut			gpios = <&gpio4 27 GPIO_ACTIVE_LOW>; /* GPIO D */
648d671269SMarek Vasut			label = "TA4-GPIO-D";
658d671269SMarek Vasut			linux,code = <KEY_D>;
668d671269SMarek Vasut			pinctrl-0 = <&pinctrl_dhcom_d>;
678d671269SMarek Vasut			pinctrl-names = "default";
688d671269SMarek Vasut			wakeup-source;
698d671269SMarek Vasut		};
708d671269SMarek Vasut	};
718d671269SMarek Vasut
728d671269SMarek Vasut	led {
738d671269SMarek Vasut		compatible = "gpio-leds";
748d671269SMarek Vasut
758d671269SMarek Vasut		led-0 {
768d671269SMarek Vasut			color = <LED_COLOR_ID_GREEN>;
778d671269SMarek Vasut			default-state = "off";
788d671269SMarek Vasut			function = LED_FUNCTION_INDICATOR;
798d671269SMarek Vasut			gpios = <&gpio5 22 GPIO_ACTIVE_HIGH>; /* GPIO E */
808d671269SMarek Vasut			pinctrl-0 = <&pinctrl_dhcom_e>;
818d671269SMarek Vasut			pinctrl-names = "default";
828d671269SMarek Vasut		};
838d671269SMarek Vasut
848d671269SMarek Vasut		led-1 {
858d671269SMarek Vasut			color = <LED_COLOR_ID_GREEN>;
868d671269SMarek Vasut			default-state = "off";
878d671269SMarek Vasut			function = LED_FUNCTION_INDICATOR;
888d671269SMarek Vasut			gpios = <&gpio5 23 GPIO_ACTIVE_HIGH>; /* GPIO F */
898d671269SMarek Vasut			pinctrl-0 = <&pinctrl_dhcom_f>;
908d671269SMarek Vasut			pinctrl-names = "default";
918d671269SMarek Vasut		};
928d671269SMarek Vasut
938d671269SMarek Vasut		led-2 {
948d671269SMarek Vasut			color = <LED_COLOR_ID_GREEN>;
958d671269SMarek Vasut			default-state = "off";
968d671269SMarek Vasut			function = LED_FUNCTION_INDICATOR;
978d671269SMarek Vasut			gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>; /* GPIO H */
988d671269SMarek Vasut			pinctrl-0 = <&pinctrl_dhcom_h>;
998d671269SMarek Vasut			pinctrl-names = "default";
1008d671269SMarek Vasut		};
1018d671269SMarek Vasut
1028d671269SMarek Vasut		led-3 {
1038d671269SMarek Vasut			color = <LED_COLOR_ID_GREEN>;
1048d671269SMarek Vasut			default-state = "off";
1058d671269SMarek Vasut			function = LED_FUNCTION_INDICATOR;
1068d671269SMarek Vasut			gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>; /* GPIO I */
1078d671269SMarek Vasut			pinctrl-0 = <&pinctrl_dhcom_i>;
1088d671269SMarek Vasut			pinctrl-names = "default";
1098d671269SMarek Vasut		};
1108d671269SMarek Vasut	};
111*04a0b7b8SMarek Vasut
112*04a0b7b8SMarek Vasut	reg_3p3vdd: regulator-3p3vdd {	/* 3.3VDD */
113*04a0b7b8SMarek Vasut		compatible = "regulator-fixed";
114*04a0b7b8SMarek Vasut		regulator-always-on;
115*04a0b7b8SMarek Vasut		regulator-min-microvolt = <3300000>;
116*04a0b7b8SMarek Vasut		regulator-max-microvolt = <3300000>;
117*04a0b7b8SMarek Vasut		regulator-name = "3P3VDD";
118*04a0b7b8SMarek Vasut	};
119*04a0b7b8SMarek Vasut
120*04a0b7b8SMarek Vasut	sound {
121*04a0b7b8SMarek Vasut		compatible = "simple-audio-card";
122*04a0b7b8SMarek Vasut		simple-audio-card,name = "SGTL5000-Card";
123*04a0b7b8SMarek Vasut		simple-audio-card,format = "i2s";
124*04a0b7b8SMarek Vasut		simple-audio-card,bitclock-master = <&codec_dai>;
125*04a0b7b8SMarek Vasut		simple-audio-card,frame-master = <&codec_dai>;
126*04a0b7b8SMarek Vasut		simple-audio-card,widgets = "Headphone", "Headphone Jack";
127*04a0b7b8SMarek Vasut		simple-audio-card,routing = "Headphone Jack", "HP_OUT";
128*04a0b7b8SMarek Vasut
129*04a0b7b8SMarek Vasut		cpu_dai: simple-audio-card,cpu {
130*04a0b7b8SMarek Vasut			sound-dai = <&sai3>;
131*04a0b7b8SMarek Vasut		};
132*04a0b7b8SMarek Vasut
133*04a0b7b8SMarek Vasut		codec_dai: simple-audio-card,codec {
134*04a0b7b8SMarek Vasut			sound-dai = <&sgtl5000>;
135*04a0b7b8SMarek Vasut		};
136*04a0b7b8SMarek Vasut	};
137*04a0b7b8SMarek Vasut};
138*04a0b7b8SMarek Vasut
139*04a0b7b8SMarek Vasut&i2c5 {
140*04a0b7b8SMarek Vasut	sgtl5000: codec@a {
141*04a0b7b8SMarek Vasut		compatible = "fsl,sgtl5000";
142*04a0b7b8SMarek Vasut		reg = <0x0a>;
143*04a0b7b8SMarek Vasut		#sound-dai-cells = <0>;
144*04a0b7b8SMarek Vasut		clocks = <&clk_ext_audio_codec>;
145*04a0b7b8SMarek Vasut		VDDA-supply = <&reg_3p3vdd>;
146*04a0b7b8SMarek Vasut		VDDIO-supply = <&reg_vdd_3p3v_awo>;
147*04a0b7b8SMarek Vasut	};
1488d671269SMarek Vasut};
1498d671269SMarek Vasut
1508d671269SMarek Vasut&fec {	/* Second ethernet */
1513d274f8bSMarek Vasut	pinctrl-0 = <&pinctrl_fec_rgmii>;
1528d671269SMarek Vasut	phy-handle = <&ethphypdk>;
1533d274f8bSMarek Vasut	phy-mode = "rgmii";
1548d671269SMarek Vasut
1558d671269SMarek Vasut	mdio {
1568d671269SMarek Vasut		ethphypdk: ethernet-phy@7 { /* KSZ 9021 */
1578d671269SMarek Vasut			compatible = "ethernet-phy-ieee802.3-c22";
1588d671269SMarek Vasut			pinctrl-0 = <&pinctrl_ethphy1>;
1598d671269SMarek Vasut			pinctrl-names = "default";
1608d671269SMarek Vasut			interrupt-parent = <&gpio4>;
1618d671269SMarek Vasut			interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
1628d671269SMarek Vasut			max-speed = <100>;
1638d671269SMarek Vasut			reg = <7>;
1648d671269SMarek Vasut			reset-assert-us = <1000>;
1658d671269SMarek Vasut			reset-deassert-us = <1000>;
1668d671269SMarek Vasut			reset-gpios = <&gpio4 2 GPIO_ACTIVE_LOW>;
1678d671269SMarek Vasut			rxc-skew-ps = <3000>;
1688d671269SMarek Vasut			rxd0-skew-ps = <0>;
1698d671269SMarek Vasut			rxd1-skew-ps = <0>;
1708d671269SMarek Vasut			rxd2-skew-ps = <0>;
1718d671269SMarek Vasut			rxd3-skew-ps = <0>;
1728d671269SMarek Vasut			rxdv-skew-ps = <0>;
1738d671269SMarek Vasut			txc-skew-ps = <3000>;
1748d671269SMarek Vasut			txd0-skew-ps = <0>;
1758d671269SMarek Vasut			txd1-skew-ps = <0>;
1768d671269SMarek Vasut			txd2-skew-ps = <0>;
1778d671269SMarek Vasut			txd3-skew-ps = <0>;
1788d671269SMarek Vasut			txen-skew-ps = <0>;
1798d671269SMarek Vasut		};
1808d671269SMarek Vasut	};
1818d671269SMarek Vasut};
1828d671269SMarek Vasut
1838d671269SMarek Vasut&flexcan1 {
1848d671269SMarek Vasut	status = "okay";
1858d671269SMarek Vasut};
1868d671269SMarek Vasut
1872a136ee0SMarek Vasut&pcie_phy {
1882a136ee0SMarek Vasut	clock-names = "ref";
1892a136ee0SMarek Vasut	clocks = <&clk IMX8MP_SYS_PLL2_100M>;
1902a136ee0SMarek Vasut	fsl,clkreq-unsupported;
1912a136ee0SMarek Vasut	fsl,refclk-pad-mode = <IMX8_PCIE_REFCLK_PAD_UNUSED>;
1922a136ee0SMarek Vasut	status = "okay";
1932a136ee0SMarek Vasut};
1942a136ee0SMarek Vasut
1952a136ee0SMarek Vasut&pcie {
1962a136ee0SMarek Vasut	fsl,max-link-speed = <1>;
1972a136ee0SMarek Vasut	reset-gpio = <&gpio1 6 GPIO_ACTIVE_LOW>;	/* GPIO J */
1982a136ee0SMarek Vasut	status = "okay";
1992a136ee0SMarek Vasut};
2002a136ee0SMarek Vasut
201*04a0b7b8SMarek Vasut&sai3 {
202*04a0b7b8SMarek Vasut	#sound-dai-cells = <0>;
203*04a0b7b8SMarek Vasut	pinctrl-names = "default";
204*04a0b7b8SMarek Vasut	pinctrl-0 = <&pinctrl_sai3>;
205*04a0b7b8SMarek Vasut	assigned-clocks = <&clk IMX8MP_CLK_SAI3>;
206*04a0b7b8SMarek Vasut	assigned-clock-parents = <&clk IMX8MP_AUDIO_PLL1_OUT>;
207*04a0b7b8SMarek Vasut	assigned-clock-rates = <12288000>;
208*04a0b7b8SMarek Vasut	fsl,sai-mclk-direction-output;
209*04a0b7b8SMarek Vasut	status = "okay";
210*04a0b7b8SMarek Vasut};
211*04a0b7b8SMarek Vasut
2128d671269SMarek Vasut&usb3_1 {
2138d671269SMarek Vasut	fsl,over-current-active-low;
2148d671269SMarek Vasut};
2158d671269SMarek Vasut
2168d671269SMarek Vasut&iomuxc {
2178d671269SMarek Vasut	/*
2188d671269SMarek Vasut	 * GPIO_A,B,C,D are connected to buttons.
2198d671269SMarek Vasut	 * GPIO_E,F,H,I are connected to LEDs.
2203e431f25SMarek Vasut	 * GPIO_M is connected to CLKOUT1.
2218d671269SMarek Vasut	 */
2228d671269SMarek Vasut	pinctrl-0 = <&pinctrl_hog_base
2238d671269SMarek Vasut		     &pinctrl_dhcom_g &pinctrl_dhcom_j
2248d671269SMarek Vasut		     &pinctrl_dhcom_k &pinctrl_dhcom_l
2258d671269SMarek Vasut		     &pinctrl_dhcom_int>;
2268d671269SMarek Vasut};
227