linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Agner <stefan@agner.ch>
To: linus.walleij@linaro.org, airlied@linux.ie, robh+dt@kernel.org,
	mark.rutland@arm.com, shawnguo@kernel.org,
	s.hauer@pengutronix.de, p.zabel@pengutronix.de
Cc: kernel@pengutronix.de, fabio.estevam@nxp.com, linux-imx@nxp.com,
	architt@codeaurora.org, a.hajda@samsung.com,
	Laurent.pinchart@ideasonboard.com, gustavo@padovan.org,
	maarten.lankhorst@linux.intel.com, sean@poorly.run,
	marcel.ziswiler@toradex.com, max.krummenacher@toradex.com,
	dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, Stefan Agner <stefan@agner.ch>
Subject: [PATCH 6/6] ARM: dts: imx6qdl-apalis: add GPIO I2C node for DDC
Date: Tue,  4 Sep 2018 22:21:13 -0700	[thread overview]
Message-ID: <20180905052113.21262-6-stefan@agner.ch> (raw)
In-Reply-To: <20180905052113.21262-1-stefan@agner.ch>

Currently, the DDC signals are controlled by the DWC HDMI I2C
master to be used for HDMI (DVI on the Apalis Evaluation Board).
However, the Apalis Evaluation board also allows to route the Apalis
DDC I2C to the LVDS or the VGA connector. By default, the signal
is routed to DVI (HDMI), and therefor the current default settings
are sensible.

To ease customization and to prepare for carrier boards with other
needs, add a GPIO I2C DDC node.

E.g. to reroute the Apalis DDC to the VGA connector on the Apalis
Evaluation Board, the following changes can be used:

vga {
	...
	ddc-i2c-bus = <&i2cddc>;
};

&hdmi {
	/delete-property/ pinctrl-0;
};

&i2cddc {
	status = "okay";
};

Signed-off-by: Stefan Agner <stefan@agner.ch>
---
 arch/arm/boot/dts/imx6qdl-apalis.dtsi | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/arch/arm/boot/dts/imx6qdl-apalis.dtsi b/arch/arm/boot/dts/imx6qdl-apalis.dtsi
index e8d0407e3e18..8340391796df 100644
--- a/arch/arm/boot/dts/imx6qdl-apalis.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-apalis.dtsi
@@ -61,6 +61,18 @@
 		status = "disabled";
 	};
 
+	/* DDC_I2C: I2C2_SDA/SCL on MXM3 205/207 */
+	i2cddc: i2c@0 {
+		compatible = "i2c-gpio";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_i2c_ddc>;
+		gpios = <&gpio3 16 GPIO_ACTIVE_HIGH /* sda */
+			 &gpio2 30 GPIO_ACTIVE_HIGH /* scl */
+			>;
+		i2c-gpio,delay-us = <2>;	/* ~100 kHz */
+		status = "disabled";
+	};
+
 	reg_module_3v3: regulator-module-3v3 {
 		compatible = "regulator-fixed";
 		regulator-name = "+V3.3";
@@ -688,6 +700,14 @@
 		>;
 	};
 
+	pinctrl_i2c_ddc: gpioi2cddcgrp {
+		fsl,pins = <
+			/* DDC bitbang */
+			MX6QDL_PAD_EIM_EB2__GPIO2_IO30 0x1b0b0
+			MX6QDL_PAD_EIM_D16__GPIO3_IO16 0x1b0b0
+		>;
+	};
+
 	pinctrl_i2c1: i2c1grp {
 		fsl,pins = <
 			MX6QDL_PAD_CSI0_DAT8__I2C1_SDA 0x4001b8b1
-- 
2.18.0


  parent reply	other threads:[~2018-09-05  5:22 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-05  5:21 [PATCH 1/6] drm/bridge: use bus flags in bridge timings Stefan Agner
2018-09-05  5:21 ` [PATCH 2/6] drm/bridge: allow to specify data-enable polarity Stefan Agner
2018-09-05  5:21 ` [PATCH 3/6] dt-bindings: display: add data-enable polarity property Stefan Agner
2018-09-05  7:07   ` Laurent Pinchart
2018-09-05 18:10     ` Stefan Agner
2018-09-05 20:50       ` Laurent Pinchart
2018-09-05  5:21 ` [PATCH 4/6] drm/imx: support handling bridge timings bus flags Stefan Agner
2018-09-05  5:21 ` [PATCH 5/6] ARM: dts: imx6qdl-apalis: add VGA support Stefan Agner
2018-09-05  5:21 ` Stefan Agner [this message]
2018-09-05  7:06 ` [PATCH 1/6] drm/bridge: use bus flags in bridge timings Laurent Pinchart
2018-09-05  7:44   ` Laurent Pinchart
2018-09-05 18:32     ` Stefan Agner
2018-09-06 11:07       ` Linus Walleij
2018-09-06 12:25         ` Laurent Pinchart
2018-09-06 16:48           ` Stefan Agner
2018-09-06 16:54             ` Laurent Pinchart
2018-09-06 17:27               ` Stefan Agner
2018-09-06 20:25         ` Stefan Agner
2018-09-07  7:10           ` Linus Walleij
2018-09-07 18:25             ` Stefan Agner
2018-09-14  9:55               ` Laurent Pinchart
2018-09-14  9:49           ` Laurent Pinchart
2018-09-14  9:57             ` Laurent Pinchart
2018-09-19  7:03             ` Stefan Agner

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=20180905052113.21262-6-stefan@agner.ch \
    --to=stefan@agner.ch \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=a.hajda@samsung.com \
    --cc=airlied@linux.ie \
    --cc=architt@codeaurora.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=fabio.estevam@nxp.com \
    --cc=gustavo@padovan.org \
    --cc=kernel@pengutronix.de \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=marcel.ziswiler@toradex.com \
    --cc=mark.rutland@arm.com \
    --cc=max.krummenacher@toradex.com \
    --cc=p.zabel@pengutronix.de \
    --cc=robh+dt@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=sean@poorly.run \
    --cc=shawnguo@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).