linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gabriel Fernandez <gabriel.fernandez.st@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Lee Jones <lee.jones@linaro.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Olivier Clergeaud <olivier.clergeaud@st.com>,
	Gabriel Fernandez <gabriel.fernandez@st.com>
Subject: [PATCH 3/3] ARM: u8540: DT: Set pinctrl mapping to i2c0,1,2,4 & 5
Date: Mon, 27 May 2013 15:30:55 +0200	[thread overview]
Message-ID: <1369661455-17839-4-git-send-email-gabriel.fernandez.st@gmail.com> (raw)
In-Reply-To: <1369661455-17839-1-git-send-email-gabriel.fernandez.st@gmail.com>

From: Gabriel Fernandez <gabriel.fernandez@st.com>

This patch configures pin map in device tree of i2c0,
1,2,4 & 5 for ccu8540 board.

Signed-off-by: Gabriel Fernandez <gabriel.fernandez@st.com>
---
 arch/arm/boot/dts/ccu8540-pinctrl.dtsi | 115 +++++++++++++++++++++++++++++++++
 arch/arm/boot/dts/ccu8540.dts          |  30 +++++++++
 2 files changed, 145 insertions(+)

diff --git a/arch/arm/boot/dts/ccu8540-pinctrl.dtsi b/arch/arm/boot/dts/ccu8540-pinctrl.dtsi
index 26e718b..57e8165 100644
--- a/arch/arm/boot/dts/ccu8540-pinctrl.dtsi
+++ b/arch/arm/boot/dts/ccu8540-pinctrl.dtsi
@@ -74,4 +74,119 @@
 			};
 		};
 	};
+
+	i2c0 {
+		i2c0_default_mux: i2c_mux {
+			default_mux {
+				ste,function = "i2c0";
+				ste,pins = "i2c0_a_1";
+			};
+		};
+
+		i2c0_default_mode: i2c_default {
+			default_cfg1 {
+				ste,pins = "GPIO147", "GPIO148";
+				ste,config = <&in_pu>;
+			};
+		};
+
+		i2c0_sleep_mode: i2c_sleep {
+			sleep_cfg1 {
+				ste,pins = "GPIO147", "GPIO148";
+				ste,config = <&slpm_in_pu>;
+			};
+		};
+	};
+
+	i2c1 {
+		i2c1_default_mux: i2c_mux {
+			default_mux {
+				ste,function = "i2c1";
+				ste,pins = "i2c1_b_2";
+			};
+		};
+
+		i2c1_default_mode: i2c_default {
+			default_cfg1 {
+				ste,pins = "GPIO16", "GPIO17";
+				ste,config = <&in_pu>;
+			};
+		};
+
+		i2c1_sleep_mode: i2c_sleep {
+			sleep_cfg1 {
+				ste,pins = "GPIO16", "GPIO17";
+				ste,config = <&slpm_in_pu>;
+			};
+		};
+	};
+
+	i2c2 {
+		i2c2_default_mux: i2c_mux {
+			default_mux {
+				ste,function = "i2c2";
+				ste,pins = "i2c2_b_2";
+			};
+		};
+
+		i2c2_default_mode: i2c_default {
+			default_cfg1 {
+				ste,pins = "GPIO10", "GPIO11";
+				ste,config = <&in_pu>;
+			};
+		};
+
+		i2c2_sleep_mode: i2c_sleep {
+			sleep_cfg1 {
+				ste,pins = "GPIO11", "GPIO11";
+				ste,config = <&slpm_in_pu>;
+			};
+		};
+	};
+
+	i2c4 {
+		i2c4_default_mux: i2c_mux {
+			default_mux {
+				ste,function = "i2c4";
+				ste,pins = "i2c4_b_2";
+			};
+		};
+
+		i2c4_default_mode: i2c_default {
+			default_cfg1 {
+				ste,pins = "GPIO122", "GPIO123";
+				ste,config = <&in_pu>;
+			};
+		};
+
+		i2c4_sleep_mode: i2c_sleep {
+			sleep_cfg1 {
+				ste,pins = "GPIO122", "GPIO123";
+				ste,config = <&slpm_in_pu>;
+			};
+		};
+	};
+
+	i2c5 {
+		i2c5_default_mux: i2c_mux {
+			default_mux {
+				ste,function = "i2c5";
+				ste,pins = "i2c5_c_2";
+			};
+		};
+
+		i2c5_default_mode: i2c_default {
+			default_cfg1 {
+				ste,pins = "GPIO118", "GPIO119";
+				ste,config = <&in_pu>;
+			};
+		};
+
+		i2c5_sleep_mode: i2c_sleep {
+			sleep_cfg1 {
+				ste,pins = "GPIO118", "GPIO119";
+				ste,config = <&slpm_in_pu>;
+			};
+		};
+	};
 };
diff --git a/arch/arm/boot/dts/ccu8540.dts b/arch/arm/boot/dts/ccu8540.dts
index 4f93795..3e7142b 100644
--- a/arch/arm/boot/dts/ccu8540.dts
+++ b/arch/arm/boot/dts/ccu8540.dts
@@ -44,5 +44,35 @@
 			pinctrl-1 = <&uart2_sleep_mode>;
 			status = "okay";
 		};
+
+		i2c0: i2c@80004000 {
+			pinctrl-names = "default","sleep";
+			pinctrl-0 = <&i2c0_default_mux>,<&i2c0_default_mode>;
+			pinctrl-1 = <&i2c0_sleep_mode>;
+		};
+
+		i2c1: i2c@80122000 {
+			pinctrl-names = "default","sleep";
+			pinctrl-0 = <&i2c1_default_mux>,<&i2c1_default_mode>;
+			pinctrl-1 = <&i2c1_sleep_mode>;
+		};
+
+		i2c2: i2c@80128000 {
+			pinctrl-names = "default","sleep";
+			pinctrl-0 = <&i2c2_default_mux>,<&i2c2_default_mode>;
+			pinctrl-1 = <&i2c2_sleep_mode>;
+		};
+
+		i2c4: i2c@8012a000 {
+			pinctrl-names = "default","sleep";
+			pinctrl-0 = <&i2c4_default_mux>,<&i2c4_default_mode>;
+			pinctrl-1 = <&i2c4_sleep_mode>;
+		};
+
+		i2c5: i2c@80001000 {
+			pinctrl-names = "default","sleep";
+			pinctrl-0 = <&i2c5_default_mux>,<&i2c5_default_mode>;
+			pinctrl-1 = <&i2c5_sleep_mode>;
+		};
 	};
 };
-- 
1.8.1.1


  parent reply	other threads:[~2013-05-27 13:32 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-27 13:30 [PATCH 0/3] Enable cc8540 pinctrl DT for uart and i2c Gabriel Fernandez
2013-05-27 13:30 ` [PATCH 1/3] ARM: ux500: use #include syntax to include *.dtsi Gabriel Fernandez
2013-05-28 10:10   ` Lee Jones
2013-05-29 16:39   ` Linus Walleij
2013-05-27 13:30 ` [PATCH 2/3] ARM: u8540: Add Pinctrl Device Tree settings for uart0, uart2 Gabriel Fernandez
2013-05-28 10:09   ` Lee Jones
2013-05-28 12:32     ` Gabriel Fernandez
2013-05-29 16:48     ` Linus Walleij
2013-05-29 19:05       ` Lee Jones
2013-05-29  8:55   ` Gabriel Fernandez
2013-05-27 13:30 ` Gabriel Fernandez [this message]
2013-05-28 10:12   ` [PATCH 3/3] ARM: u8540: DT: Set pinctrl mapping to i2c0,1,2,4 & 5 Lee Jones
2013-05-28 12:32     ` Gabriel Fernandez

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=1369661455-17839-4-git-send-email-gabriel.fernandez.st@gmail.com \
    --to=gabriel.fernandez.st@gmail.com \
    --cc=gabriel.fernandez@st.com \
    --cc=lee.jones@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=olivier.clergeaud@st.com \
    /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).