1 // SPDX-License-Identifier: (GPL-2.0 OR MIT)
2 /*
3  * Copyright 2020 Compass Electronics Group, LLC
4  */
5 
6 /dts-v1/;
7 
8 #include "imx8mn.dtsi"
9 #include "imx8mn-beacon-som.dtsi"
10 #include "imx8mn-beacon-baseboard.dtsi"
11 
12 / {
13 	model = "Beacon EmbeddedWorks i.MX8M Nano Development Kit";
14 	compatible = "beacon,imx8mn-beacon-kit", "fsl,imx8mn";
15 
16 	chosen {
17 		stdout-path = &uart2;
18 	};
19 
20 	connector {
21 		compatible = "hdmi-connector";
22 		type = "a";
23 
24 		port {
25 			hdmi_connector_in: endpoint {
26 				remote-endpoint = <&adv7535_out>;
27 			};
28 		};
29 	};
30 
31 	reg_hdmi: regulator-hdmi-dvdd {
32 		compatible = "regulator-fixed";
33 		pinctrl-names = "default";
34 		pinctrl-0 = <&pinctrl_reg_hdmi>;
35 		regulator-name = "hdmi_pwr_en";
36 		regulator-min-microvolt = <3300000>;
37 		regulator-max-microvolt = <3300000>;
38 		gpio = <&gpio2 11 GPIO_ACTIVE_HIGH>;
39 		enable-active-high;
40 		startup-delay-us = <70000>;
41 		regulator-always-on;
42 	};
43 
44 	sound-hdmi {
45 		compatible = "simple-audio-card";
46 		simple-audio-card,name = "sound-hdmi";
47 		simple-audio-card,format = "i2s";
48 
49 		simple-audio-card,cpu {
50 			sound-dai = <&sai5>;
51 			system-clock-direction-out;
52 		};
53 
54 		simple-audio-card,codec {
55 			sound-dai = <&adv_bridge>;
56 		};
57 	};
58 };
59 
60 &i2c2 {
61 	adv_bridge: hdmi@3d {
62 		compatible = "adi,adv7535";
63 		pinctrl-names = "default";
64 		pinctrl-0 = <&pinctrl_hdmi_bridge>;
65 		reg = <0x3d>, <0x3e>, <0x3c>, <0x3f>;
66 		reg-names = "main", "edid", "cec", "packet";
67 		adi,dsi-lanes = <4>;
68 		avdd-supply = <&reg_hdmi>;
69 		a2vdd-supply = <&reg_hdmi>;
70 		dvdd-supply = <&reg_hdmi>;
71 		pvdd-supply = <&reg_hdmi>;
72 		v1p2-supply = <&reg_hdmi>;
73 		v3p3-supply = <&reg_hdmi>;
74 		interrupt-parent = <&gpio1>;
75 		interrupts = <9 IRQ_TYPE_LEVEL_LOW>;
76 		#sound-dai-cells = <0>;
77 
78 		ports {
79 			#address-cells = <1>;
80 			#size-cells = <0>;
81 
82 			port@0 {
83 				reg = <0>;
84 
85 				adv7535_in: endpoint {
86 					remote-endpoint = <&dsi_out>;
87 				};
88 			};
89 
90 			port@1 {
91 				reg = <1>;
92 
93 				adv7535_out: endpoint {
94 					remote-endpoint = <&hdmi_connector_in>;
95 				};
96 			};
97 		};
98 	};
99 };
100 
101 &lcdif {
102 	status = "okay";
103 };
104 
105 &mipi_dsi {
106 	samsung,esc-clock-frequency = <20000000>;
107 	status = "okay";
108 
109 	ports {
110 		port@1 {
111 			reg = <1>;
112 
113 			dsi_out: endpoint {
114 				remote-endpoint = <&adv7535_in>;
115 			};
116 		};
117 	};
118 };
119 
120 &sai5 {
121 	pinctrl-names = "default";
122 	pinctrl-0 = <&pinctrl_sai5>;
123 	assigned-clocks = <&clk IMX8MN_CLK_SAI5>;
124 	assigned-clock-parents = <&clk IMX8MN_AUDIO_PLL1_OUT>;
125 	assigned-clock-rates = <24576000>;
126 	#sound-dai-cells = <0>;
127 	status = "okay";
128 };
129 
130 &iomuxc {
131 	pinctrl_hdmi_bridge: hdmibridgegrp {
132 		fsl,pins = <
133 			MX8MN_IOMUXC_GPIO1_IO09_GPIO1_IO9		0x19
134 		>;
135 	};
136 
137 	pinctrl_reg_hdmi: reghdmigrp {
138 		fsl,pins = <
139 			MX8MN_IOMUXC_SD1_STROBE_GPIO2_IO11              0x16
140 		>;
141 	};
142 
143 	pinctrl_sai5: sai5grp {
144 		fsl,pins = <
145 			MX8MN_IOMUXC_SAI5_RXD3_SAI5_TX_DATA0	0xd6
146 			MX8MN_IOMUXC_SAI5_RXD2_SAI5_TX_BCLK	0xd6
147 			MX8MN_IOMUXC_SAI5_RXD1_SAI5_TX_SYNC	0xd6
148 		>;
149 	};
150 };
151