All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 0/2] Refactor EEPROM device tree and add default offset length
@ 2015-02-03  5:13 Masahiro Yamada
  2015-02-03  5:13 ` [U-Boot] [PATCH 1/2] ARM: UniPhier: move EEPROM device node into a separate DTS Masahiro Yamada
  2015-02-03  5:13 ` [U-Boot] [PATCH 2/2] ARM: UniPhier: set I2C offset length of on-board EEPROM in DTS Masahiro Yamada
  0 siblings, 2 replies; 3+ messages in thread
From: Masahiro Yamada @ 2015-02-03  5:13 UTC (permalink / raw)
  To: u-boot




Masahiro Yamada (2):
  ARM: UniPhier: move EEPROM device node into a separate DTS
  ARM: UniPhier: set I2C offset length of on-board EEPROM in DTS

 arch/arm/dts/uniphier-ph1-ld4-ref.dts   |  5 +----
 arch/arm/dts/uniphier-ph1-pro4-ref.dts  |  5 +----
 arch/arm/dts/uniphier-ph1-sld3-ref.dts  |  5 +----
 arch/arm/dts/uniphier-ph1-sld8-ref.dts  |  5 +----
 arch/arm/dts/uniphier-ref-daughter.dtsi | 16 ++++++++++++++++
 5 files changed, 20 insertions(+), 16 deletions(-)
 create mode 100644 arch/arm/dts/uniphier-ref-daughter.dtsi

-- 
1.9.1

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCH 1/2] ARM: UniPhier: move EEPROM device node into a separate DTS
  2015-02-03  5:13 [U-Boot] [PATCH 0/2] Refactor EEPROM device tree and add default offset length Masahiro Yamada
@ 2015-02-03  5:13 ` Masahiro Yamada
  2015-02-03  5:13 ` [U-Boot] [PATCH 2/2] ARM: UniPhier: set I2C offset length of on-board EEPROM in DTS Masahiro Yamada
  1 sibling, 0 replies; 3+ messages in thread
From: Masahiro Yamada @ 2015-02-03  5:13 UTC (permalink / raw)
  To: u-boot

This EEPROM chip is installed on the expansion board commonly used
on UniPhier platform.  To avoid duplicated description, move the
EEPROM node to a separate file and include it from other device tree
sources.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
---

 arch/arm/dts/uniphier-ph1-ld4-ref.dts   |  5 +----
 arch/arm/dts/uniphier-ph1-pro4-ref.dts  |  5 +----
 arch/arm/dts/uniphier-ph1-sld3-ref.dts  |  5 +----
 arch/arm/dts/uniphier-ph1-sld8-ref.dts  |  5 +----
 arch/arm/dts/uniphier-ref-daughter.dtsi | 15 +++++++++++++++
 5 files changed, 19 insertions(+), 16 deletions(-)
 create mode 100644 arch/arm/dts/uniphier-ref-daughter.dtsi

diff --git a/arch/arm/dts/uniphier-ph1-ld4-ref.dts b/arch/arm/dts/uniphier-ph1-ld4-ref.dts
index 6855878..48678cc 100644
--- a/arch/arm/dts/uniphier-ph1-ld4-ref.dts
+++ b/arch/arm/dts/uniphier-ph1-ld4-ref.dts
@@ -9,6 +9,7 @@
 
 /dts-v1/;
 /include/ "uniphier-ph1-ld4.dtsi"
+/include/ "uniphier-ref-daughter.dtsi"
 
 / {
 	model = "Panasonic UniPhier PH1-LD4 Reference Board";
@@ -46,10 +47,6 @@
 
 &i2c0 {
 	status = "okay";
-	eeprom {
-		compatible = "i2c-eeprom";
-		reg = <0x50>;
-	};
 };
 
 &usb0 {
diff --git a/arch/arm/dts/uniphier-ph1-pro4-ref.dts b/arch/arm/dts/uniphier-ph1-pro4-ref.dts
index 1227b62..3ba779b 100644
--- a/arch/arm/dts/uniphier-ph1-pro4-ref.dts
+++ b/arch/arm/dts/uniphier-ph1-pro4-ref.dts
@@ -9,6 +9,7 @@
 
 /dts-v1/;
 /include/ "uniphier-ph1-pro4.dtsi"
+/include/ "uniphier-ref-daughter.dtsi"
 
 / {
 	model = "Panasonic UniPhier PH1-Pro4 Reference Board";
@@ -48,10 +49,6 @@
 
 &i2c0 {
 	status = "okay";
-	eeprom {
-		compatible = "i2c-eeprom";
-		reg = <0x50>;
-	};
 };
 
 &usb0 {
diff --git a/arch/arm/dts/uniphier-ph1-sld3-ref.dts b/arch/arm/dts/uniphier-ph1-sld3-ref.dts
index fefc592..4961be8 100644
--- a/arch/arm/dts/uniphier-ph1-sld3-ref.dts
+++ b/arch/arm/dts/uniphier-ph1-sld3-ref.dts
@@ -9,6 +9,7 @@
 
 /dts-v1/;
 /include/ "uniphier-ph1-sld3.dtsi"
+/include/ "uniphier-ref-daughter.dtsi"
 
 / {
 	model = "Panasonic UniPhier PH1-sLD3 Reference Board";
@@ -45,10 +46,6 @@
 
 &i2c0 {
 	status = "okay";
-	eeprom {
-		compatible = "i2c-eeprom";
-		reg = <0x50>;
-	};
 };
 
 &usb0 {
diff --git a/arch/arm/dts/uniphier-ph1-sld8-ref.dts b/arch/arm/dts/uniphier-ph1-sld8-ref.dts
index 9b6d95c..294c3eb 100644
--- a/arch/arm/dts/uniphier-ph1-sld8-ref.dts
+++ b/arch/arm/dts/uniphier-ph1-sld8-ref.dts
@@ -9,6 +9,7 @@
 
 /dts-v1/;
 /include/ "uniphier-ph1-sld8.dtsi"
+/include/ "uniphier-ref-daughter.dtsi"
 
 / {
 	model = "Panasonic UniPhier PH1-sLD8 Reference Board";
@@ -46,10 +47,6 @@
 
 &i2c0 {
 	status = "okay";
-	eeprom {
-		compatible = "i2c-eeprom";
-		reg = <0x50>;
-	};
 };
 
 &usb0 {
diff --git a/arch/arm/dts/uniphier-ref-daughter.dtsi b/arch/arm/dts/uniphier-ref-daughter.dtsi
new file mode 100644
index 0000000..7b681c6
--- /dev/null
+++ b/arch/arm/dts/uniphier-ref-daughter.dtsi
@@ -0,0 +1,15 @@
+/*
+ * Device Tree Source for UniPhier Reference Daughter Board
+ *
+ * Copyright (C) 2014 Panasonic Corporation
+ *   Author: Masahiro Yamada <yamada.m@jp.panasonic.com>
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+
+&i2c0 {
+	eeprom {
+		compatible = "i2c-eeprom";
+		reg = <0x50>;
+	};
+};
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCH 2/2] ARM: UniPhier: set I2C offset length of on-board EEPROM in DTS
  2015-02-03  5:13 [U-Boot] [PATCH 0/2] Refactor EEPROM device tree and add default offset length Masahiro Yamada
  2015-02-03  5:13 ` [U-Boot] [PATCH 1/2] ARM: UniPhier: move EEPROM device node into a separate DTS Masahiro Yamada
@ 2015-02-03  5:13 ` Masahiro Yamada
  1 sibling, 0 replies; 3+ messages in thread
From: Masahiro Yamada @ 2015-02-03  5:13 UTC (permalink / raw)
  To: u-boot

The EEPROM chip on the UniPhier reference daughter board expects
2-byte offset address.

Since 7132b9fd68a1 (dm: i2c: dts: Support an offset-len device tree
property), I2C sub-nodes can have "u-boot,i2c-offset-len" property.

It is convenient to set the default I2C offset address length in
Device Tree, so that we do not have to set it on the command line.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
---

 arch/arm/dts/uniphier-ref-daughter.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/dts/uniphier-ref-daughter.dtsi b/arch/arm/dts/uniphier-ref-daughter.dtsi
index 7b681c6..2bb7697 100644
--- a/arch/arm/dts/uniphier-ref-daughter.dtsi
+++ b/arch/arm/dts/uniphier-ref-daughter.dtsi
@@ -11,5 +11,6 @@
 	eeprom {
 		compatible = "i2c-eeprom";
 		reg = <0x50>;
+		u-boot,i2c-offset-len = <2>;
 	};
 };
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-02-03  5:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-03  5:13 [U-Boot] [PATCH 0/2] Refactor EEPROM device tree and add default offset length Masahiro Yamada
2015-02-03  5:13 ` [U-Boot] [PATCH 1/2] ARM: UniPhier: move EEPROM device node into a separate DTS Masahiro Yamada
2015-02-03  5:13 ` [U-Boot] [PATCH 2/2] ARM: UniPhier: set I2C offset length of on-board EEPROM in DTS Masahiro Yamada

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.