From: Biju Das <biju.das@bp.renesas.com>
To: Rob Herring <robh+dt@kernel.org>, Mark Rutland <mark.rutland@arm.com>
Cc: Wolfram Sang <wsa@the-dreams.de>,
Simon Horman <horms@verge.net.au>,
Magnus Damm <magnus.damm@gmail.com>,
Chris Paterson <chris.paterson2@renesas.com>,
devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
linux-i2c@vger.kernel.org, Biju Das <biju.das@bp.renesas.com>
Subject: [PATCH vY 2/2] ARM: dts: iwg22d-sodimm: use demuxer for I2C5
Date: Mon, 22 Jan 2018 11:29:23 +0000 [thread overview]
Message-ID: <1516620563-7965-3-git-send-email-biju.das@bp.renesas.com> (raw)
In-Reply-To: <1516620563-7965-1-git-send-email-biju.das@bp.renesas.com>
Create a separate bus for audiocodec related I2C5 and provide fallback to GPIO.
Based on work for r8a7794/Alt by Wolfram Sang: "ARM: dts: alt: use demuxer
for I2C1"
Signed-off-by: Biju Das <biju.das@bp.renesas.com>
Reviewed-by: Chris Paterson <chris.paterson2@renesas.com>
---
arch/arm/boot/dts/r8a7745-iwg22d-sodimm.dts | 44 +++++++++++++++++++++--------
1 file changed, 33 insertions(+), 11 deletions(-)
diff --git a/arch/arm/boot/dts/r8a7745-iwg22d-sodimm.dts b/arch/arm/boot/dts/r8a7745-iwg22d-sodimm.dts
index a4058f4..b2ea43f 100644
--- a/arch/arm/boot/dts/r8a7745-iwg22d-sodimm.dts
+++ b/arch/arm/boot/dts/r8a7745-iwg22d-sodimm.dts
@@ -42,6 +42,8 @@
ethernet0 = &avb;
serial3 = &scif4;
serial5 = &hscif1;
+ i2c9 = &gpioi2c5;
+ i2c11 = &i2caudiocodec;
};
chosen {
@@ -55,6 +57,36 @@
clock-frequency = <26000000>;
};
+ gpioi2c5: i2c-9 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "i2c-gpio";
+ status = "disabled";
+ scl-gpios = <&gpio0 14 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ sda-gpios = <&gpio0 15 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ i2c-gpio,delay-us = <5>;
+ };
+
+ /*
+ * A fallback to GPIO is provided for I2C5.
+ */
+ i2caudiocodec: i2c-11 {
+ compatible = "i2c-demux-pinctrl";
+ i2c-parent = <&i2c5>, <&gpioi2c5>;
+ i2c-bus-name = "i2c-audiocodec";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ sgtl5000: codec@a {
+ compatible = "fsl,sgtl5000";
+ #sound-dai-cells = <0>;
+ reg = <0x0a>;
+ clocks = <&audio_clock>;
+ VDDA-supply = <®_3p3v>;
+ VDDIO-supply = <®_3p3v>;
+ };
+ };
+
rsnd_sgtl5000: sound {
compatible = "simple-audio-card";
simple-audio-card,format = "i2s";
@@ -126,19 +158,9 @@
&i2c5 {
pinctrl-0 = <&i2c5_pins>;
- pinctrl-names = "default";
+ pinctrl-names = "i2c-audiocodec";
- status = "okay";
clock-frequency = <400000>;
-
- sgtl5000: codec@a {
- compatible = "fsl,sgtl5000";
- #sound-dai-cells = <0>;
- reg = <0x0a>;
- clocks = <&audio_clock>;
- VDDA-supply = <®_3p3v>;
- VDDIO-supply = <®_3p3v>;
- };
};
&pci1 {
--
2.7.4
next prev parent reply other threads:[~2018-01-22 11:29 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-22 11:29 [PATCH 0/2] Use demuxer for i2c1 and i2c5 Biju Das
2018-01-22 11:29 ` [PATCH vY 1/2] ARM: dts: iwg22d-sodimm-dbhd-ca: use demuxer for I2C1 Biju Das
2018-01-22 11:29 ` Biju Das [this message]
2018-01-22 11:40 ` [PATCH 0/2] Use demuxer for i2c1 and i2c5 Wolfram Sang
2018-01-22 11:55 ` Biju Das
2018-01-22 12:22 ` Wolfram Sang
2018-01-22 14:03 ` Biju Das
2018-01-22 14:08 ` Wolfram Sang
2018-01-23 13:39 ` Biju Das
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=1516620563-7965-3-git-send-email-biju.das@bp.renesas.com \
--to=biju.das@bp.renesas.com \
--cc=chris.paterson2@renesas.com \
--cc=devicetree@vger.kernel.org \
--cc=horms@verge.net.au \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=magnus.damm@gmail.com \
--cc=mark.rutland@arm.com \
--cc=robh+dt@kernel.org \
--cc=wsa@the-dreams.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 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).