All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shawn Guo <shawnguo@kernel.org>
To: Adam Ford <aford173@gmail.com>
Cc: linux-arm-kernel@lists.infradead.org, aford@beaconembedded.com,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>,
	NXP Linux Team <linux-imx@nxp.com>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] arm64: dts: imx8mn-beacon: Add HDMI video with sound
Date: Mon, 5 Jun 2023 08:17:30 +0800	[thread overview]
Message-ID: <20230605001730.GS4199@dragon> (raw)
In-Reply-To: <20230601031527.271232-2-aford173@gmail.com>

On Wed, May 31, 2023 at 10:15:25PM -0500, Adam Ford wrote:
> The Beacon Embedded imx8mn development kit has a DSI
> to HDMI bridge chip.  The bridge supports stereo audio
> and hot-plugging.
> 
> Signed-off-by: Adam Ford <aford173@gmail.com>
> 
> diff --git a/arch/arm64/boot/dts/freescale/imx8mn-beacon-kit.dts b/arch/arm64/boot/dts/freescale/imx8mn-beacon-kit.dts
> index 1392ce02587b..3758c46c7162 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mn-beacon-kit.dts
> +++ b/arch/arm64/boot/dts/freescale/imx8mn-beacon-kit.dts
> @@ -16,4 +16,138 @@ / {
>  	chosen {
>  		stdout-path = &uart2;
>  	};
> +
> +	connector {
> +		compatible = "hdmi-connector";
> +		type = "a";
> +
> +		port {
> +			hdmi_connector_in: endpoint {
> +				remote-endpoint = <&adv7535_out>;
> +			};
> +		};
> +	};
> +
> +	reg_hdmi: regulator-hdmi-dvdd {
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&pinctrl_reg_hdmi>;
> +		compatible = "regulator-fixed";

Can we start properties from 'compatible'?

> +		regulator-name = "hdmi_pwr_en";
> +		regulator-min-microvolt = <3300000>;
> +		regulator-max-microvolt = <3300000>;
> +		gpio = <&gpio2 11 GPIO_ACTIVE_HIGH>;
> +		enable-active-high;
> +		startup-delay-us = <70000>;
> +		regulator-always-on;
> +	};
> +
> +	sound-hdmi {
> +		compatible = "simple-audio-card";
> +		simple-audio-card,name = "sound-hdmi";
> +		simple-audio-card,format = "i2s";
> +
> +		simple-audio-card,cpu {
> +			sound-dai = <&sai5 0>;
> +			system-clock-direction-out;
> +		};
> +
> +		simple-audio-card,codec {
> +			sound-dai = <&adv_bridge>;
> +		};
> +	};
> +};
> +
> +&i2c2 {
> +	adv_bridge: hdmi@3d {
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&pinctrl_hdmi_bridge>;
> +		compatible = "adi,adv7535";

Same here.

Shawn

> +		reg = <0x3d>, <0x3b>;
> +		reg-names = "main", "cec";
> +		adi,dsi-lanes = <4>;
> +		adi,fixed-lanes;
> +		dvdd-supply = <&reg_hdmi>;
> +		v3p3-supply = <&reg_hdmi>;
> +		v1p2-supply = <&reg_hdmi>;
> +		a2vdd-supply = <&reg_hdmi>;
> +		avdd-supply = <&reg_hdmi>;
> +		pvdd-supply = <&reg_hdmi>;
> +		interrupt-parent = <&gpio1>;
> +		interrupts = <9 IRQ_TYPE_LEVEL_LOW>;
> +		#sound-dai-cells = <0>;
> +
> +		ports {
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +
> +			port@0 {
> +				reg = <0>;
> +
> +				adv7535_in: endpoint {
> +					remote-endpoint = <&dsi_out>;
> +				};
> +			};
> +
> +			port@1 {
> +				reg = <1>;
> +
> +				adv7535_out: endpoint {
> +					remote-endpoint = <&hdmi_connector_in>;
> +				};
> +			};
> +		};
> +	};
> +};
> +
> +&lcdif {
> +	assigned-clocks = <&clk IMX8MN_VIDEO_PLL1>;
> +	assigned-clock-rates = <594000000>;
> +	status = "okay";
> +};
> +
> +&mipi_dsi {
> +	samsung,esc-clock-frequency = <20000000>;
> +	status = "okay";
> +
> +	ports {
> +		port@1 {
> +			reg = <1>;
> +
> +			dsi_out: endpoint {
> +				remote-endpoint = <&adv7535_in>;
> +			};
> +		};
> +	};
> +};
> +
> +&sai5 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pinctrl_sai5>;
> +	assigned-clocks = <&clk IMX8MN_CLK_SAI5>;
> +	assigned-clock-parents = <&clk IMX8MN_AUDIO_PLL1_OUT>;
> +	assigned-clock-rates = <24576000>;
> +	#sound-dai-cells = <0>;
> +	status = "okay";
> +};
> +
> +&iomuxc {
> +	pinctrl_hdmi_bridge: hdmibridgegrp {
> +		fsl,pins = <
> +			MX8MN_IOMUXC_GPIO1_IO09_GPIO1_IO9		0x19
> +		>;
> +	};
> +
> +	pinctrl_reg_hdmi: reghdmigrp {
> +		fsl,pins = <
> +			MX8MN_IOMUXC_SD1_STROBE_GPIO2_IO11              0x16
> +		>;
> +	};
> +
> +	pinctrl_sai5: sai5grp {
> +		fsl,pins = <
> +			MX8MN_IOMUXC_SAI5_RXD3_SAI5_TX_DATA0	0xd6
> +			MX8MN_IOMUXC_SAI5_RXD2_SAI5_TX_BCLK	0xd6
> +			MX8MN_IOMUXC_SAI5_RXD1_SAI5_TX_SYNC	0xd6
> +		>;
> +	};
>  };
> -- 
> 2.39.2
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: Shawn Guo <shawnguo@kernel.org>
To: Adam Ford <aford173@gmail.com>
Cc: linux-arm-kernel@lists.infradead.org, aford@beaconembedded.com,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>,
	NXP Linux Team <linux-imx@nxp.com>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] arm64: dts: imx8mn-beacon: Add HDMI video with sound
Date: Mon, 5 Jun 2023 08:17:30 +0800	[thread overview]
Message-ID: <20230605001730.GS4199@dragon> (raw)
In-Reply-To: <20230601031527.271232-2-aford173@gmail.com>

On Wed, May 31, 2023 at 10:15:25PM -0500, Adam Ford wrote:
> The Beacon Embedded imx8mn development kit has a DSI
> to HDMI bridge chip.  The bridge supports stereo audio
> and hot-plugging.
> 
> Signed-off-by: Adam Ford <aford173@gmail.com>
> 
> diff --git a/arch/arm64/boot/dts/freescale/imx8mn-beacon-kit.dts b/arch/arm64/boot/dts/freescale/imx8mn-beacon-kit.dts
> index 1392ce02587b..3758c46c7162 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mn-beacon-kit.dts
> +++ b/arch/arm64/boot/dts/freescale/imx8mn-beacon-kit.dts
> @@ -16,4 +16,138 @@ / {
>  	chosen {
>  		stdout-path = &uart2;
>  	};
> +
> +	connector {
> +		compatible = "hdmi-connector";
> +		type = "a";
> +
> +		port {
> +			hdmi_connector_in: endpoint {
> +				remote-endpoint = <&adv7535_out>;
> +			};
> +		};
> +	};
> +
> +	reg_hdmi: regulator-hdmi-dvdd {
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&pinctrl_reg_hdmi>;
> +		compatible = "regulator-fixed";

Can we start properties from 'compatible'?

> +		regulator-name = "hdmi_pwr_en";
> +		regulator-min-microvolt = <3300000>;
> +		regulator-max-microvolt = <3300000>;
> +		gpio = <&gpio2 11 GPIO_ACTIVE_HIGH>;
> +		enable-active-high;
> +		startup-delay-us = <70000>;
> +		regulator-always-on;
> +	};
> +
> +	sound-hdmi {
> +		compatible = "simple-audio-card";
> +		simple-audio-card,name = "sound-hdmi";
> +		simple-audio-card,format = "i2s";
> +
> +		simple-audio-card,cpu {
> +			sound-dai = <&sai5 0>;
> +			system-clock-direction-out;
> +		};
> +
> +		simple-audio-card,codec {
> +			sound-dai = <&adv_bridge>;
> +		};
> +	};
> +};
> +
> +&i2c2 {
> +	adv_bridge: hdmi@3d {
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&pinctrl_hdmi_bridge>;
> +		compatible = "adi,adv7535";

Same here.

Shawn

> +		reg = <0x3d>, <0x3b>;
> +		reg-names = "main", "cec";
> +		adi,dsi-lanes = <4>;
> +		adi,fixed-lanes;
> +		dvdd-supply = <&reg_hdmi>;
> +		v3p3-supply = <&reg_hdmi>;
> +		v1p2-supply = <&reg_hdmi>;
> +		a2vdd-supply = <&reg_hdmi>;
> +		avdd-supply = <&reg_hdmi>;
> +		pvdd-supply = <&reg_hdmi>;
> +		interrupt-parent = <&gpio1>;
> +		interrupts = <9 IRQ_TYPE_LEVEL_LOW>;
> +		#sound-dai-cells = <0>;
> +
> +		ports {
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +
> +			port@0 {
> +				reg = <0>;
> +
> +				adv7535_in: endpoint {
> +					remote-endpoint = <&dsi_out>;
> +				};
> +			};
> +
> +			port@1 {
> +				reg = <1>;
> +
> +				adv7535_out: endpoint {
> +					remote-endpoint = <&hdmi_connector_in>;
> +				};
> +			};
> +		};
> +	};
> +};
> +
> +&lcdif {
> +	assigned-clocks = <&clk IMX8MN_VIDEO_PLL1>;
> +	assigned-clock-rates = <594000000>;
> +	status = "okay";
> +};
> +
> +&mipi_dsi {
> +	samsung,esc-clock-frequency = <20000000>;
> +	status = "okay";
> +
> +	ports {
> +		port@1 {
> +			reg = <1>;
> +
> +			dsi_out: endpoint {
> +				remote-endpoint = <&adv7535_in>;
> +			};
> +		};
> +	};
> +};
> +
> +&sai5 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pinctrl_sai5>;
> +	assigned-clocks = <&clk IMX8MN_CLK_SAI5>;
> +	assigned-clock-parents = <&clk IMX8MN_AUDIO_PLL1_OUT>;
> +	assigned-clock-rates = <24576000>;
> +	#sound-dai-cells = <0>;
> +	status = "okay";
> +};
> +
> +&iomuxc {
> +	pinctrl_hdmi_bridge: hdmibridgegrp {
> +		fsl,pins = <
> +			MX8MN_IOMUXC_GPIO1_IO09_GPIO1_IO9		0x19
> +		>;
> +	};
> +
> +	pinctrl_reg_hdmi: reghdmigrp {
> +		fsl,pins = <
> +			MX8MN_IOMUXC_SD1_STROBE_GPIO2_IO11              0x16
> +		>;
> +	};
> +
> +	pinctrl_sai5: sai5grp {
> +		fsl,pins = <
> +			MX8MN_IOMUXC_SAI5_RXD3_SAI5_TX_DATA0	0xd6
> +			MX8MN_IOMUXC_SAI5_RXD2_SAI5_TX_BCLK	0xd6
> +			MX8MN_IOMUXC_SAI5_RXD1_SAI5_TX_SYNC	0xd6
> +		>;
> +	};
>  };
> -- 
> 2.39.2
> 

  reply	other threads:[~2023-06-05  0:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-01  3:15 [PATCH 0/2] arm64: dts: imx8mn/imx8mm-beacon: Add HDMI Adam Ford
2023-06-01  3:15 ` Adam Ford
2023-06-01  3:15 ` [PATCH 1/2] arm64: dts: imx8mn-beacon: Add HDMI video with sound Adam Ford
2023-06-01  3:15   ` Adam Ford
2023-06-05  0:17   ` Shawn Guo [this message]
2023-06-05  0:17     ` Shawn Guo
2023-06-01  3:15 ` [PATCH 2/2] arm64: dts: imx8mm-beacon: " Adam Ford
2023-06-01  3:15   ` Adam Ford

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230605001730.GS4199@dragon \
    --to=shawnguo@kernel.org \
    --cc=aford173@gmail.com \
    --cc=aford@beaconembedded.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=s.hauer@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.