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>, <0x3c>, <0x3e>, <0x3f>;
66		reg-names = "main", "cec", "edid", "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	assigned-clocks = <&clk IMX8MN_VIDEO_PLL1>;
103	assigned-clock-rates = <594000000>;
104	status = "okay";
105};
106
107&mipi_dsi {
108	samsung,esc-clock-frequency = <20000000>;
109	status = "okay";
110
111	ports {
112		port@1 {
113			reg = <1>;
114
115			dsi_out: endpoint {
116				remote-endpoint = <&adv7535_in>;
117			};
118		};
119	};
120};
121
122&sai5 {
123	pinctrl-names = "default";
124	pinctrl-0 = <&pinctrl_sai5>;
125	assigned-clocks = <&clk IMX8MN_CLK_SAI5>;
126	assigned-clock-parents = <&clk IMX8MN_AUDIO_PLL1_OUT>;
127	assigned-clock-rates = <24576000>;
128	#sound-dai-cells = <0>;
129	status = "okay";
130};
131
132&iomuxc {
133	pinctrl_hdmi_bridge: hdmibridgegrp {
134		fsl,pins = <
135			MX8MN_IOMUXC_GPIO1_IO09_GPIO1_IO9		0x19
136		>;
137	};
138
139	pinctrl_reg_hdmi: reghdmigrp {
140		fsl,pins = <
141			MX8MN_IOMUXC_SD1_STROBE_GPIO2_IO11              0x16
142		>;
143	};
144
145	pinctrl_sai5: sai5grp {
146		fsl,pins = <
147			MX8MN_IOMUXC_SAI5_RXD3_SAI5_TX_DATA0	0xd6
148			MX8MN_IOMUXC_SAI5_RXD2_SAI5_TX_BCLK	0xd6
149			MX8MN_IOMUXC_SAI5_RXD1_SAI5_TX_SYNC	0xd6
150		>;
151	};
152};
153