Re: [U-Boot] [PATCH v2 14/17] dm: i2c: dts: Add an I2C bus for sandbox

2014-11-19 Thread Masahiro Yamada
Hi Simon,



On Tue, 11 Nov 2014 10:46:30 -0700
Simon Glass s...@chromium.org wrote:

 diff --git a/arch/sandbox/dts/sandbox.dts b/arch/sandbox/dts/sandbox.dts
 index 7614715..11748ae 100644
 --- a/arch/sandbox/dts/sandbox.dts
 +++ b/arch/sandbox/dts/sandbox.dts
 @@ -134,6 +134,23 @@
   num-gpios = 20;
   };
  
 + i2c@0 {
 + #address-cells = 1;
 + #size-cells = 0;
 + reg = 0;
 + compatible = sandbox,i2c;
 + clock-frequency = 40;
 + eeprom@2c {
 + reg = 0x2c;
 + compatible = i2c-eeprom;
 + emul {
 + compatible = sandbox,i2c-eeprom;
 + sandbox,filename = i2c.bin;
 + sandbox,size = 128;
 + };
 + };
 + };
 +
   spi@0 {
   #address-cells = 1;
   #size-cells = 0;




It is not clear to me why sandbox,i2c-eeprom  is not placed right under 
i2c@0.

What does the intermediate node eeprom@2c do?
I checked drivers/misc/i2c_eeprom.c but it does not seem to do anything.


Best Regards
Masahiro Yamada

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 14/17] dm: i2c: dts: Add an I2C bus for sandbox

2014-11-19 Thread Simon Glass
Hi Masahiro,

On 19 November 2014 08:29, Masahiro Yamada yamad...@jp.panasonic.com wrote:
 Hi Simon,



 On Tue, 11 Nov 2014 10:46:30 -0700
 Simon Glass s...@chromium.org wrote:

 diff --git a/arch/sandbox/dts/sandbox.dts b/arch/sandbox/dts/sandbox.dts
 index 7614715..11748ae 100644
 --- a/arch/sandbox/dts/sandbox.dts
 +++ b/arch/sandbox/dts/sandbox.dts
 @@ -134,6 +134,23 @@
   num-gpios = 20;
   };

 + i2c@0 {
 + #address-cells = 1;
 + #size-cells = 0;
 + reg = 0;
 + compatible = sandbox,i2c;
 + clock-frequency = 40;
 + eeprom@2c {
 + reg = 0x2c;
 + compatible = i2c-eeprom;
 + emul {
 + compatible = sandbox,i2c-eeprom;
 + sandbox,filename = i2c.bin;
 + sandbox,size = 128;
 + };
 + };
 + };
 +
   spi@0 {
   #address-cells = 1;
   #size-cells = 0;




 It is not clear to me why sandbox,i2c-eeprom  is not placed right under 
 i2c@0.

 What does the intermediate node eeprom@2c do?
 I checked drivers/misc/i2c_eeprom.c but it does not seem to do anything.

Yes it doesn't yet, but could do in future.

The intermediate node is for the EEPROM driver, which we can build out
as needed. The emul node connects the sandbox EEPROM emulation to the
other side of the driver. On real hardware we don't have this, but we
must attach emulators to devices (SPI, I2C, etc.) when using sandbox.

Regards,
Simon
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 14/17] dm: i2c: dts: Add an I2C bus for sandbox

2014-11-16 Thread Tom Rini
On Tue, Nov 11, 2014 at 10:46:30AM -0700, Simon Glass wrote:

 Add an I2C bus to the device tree, with an EEPROM emulator attached to one
 of the addresses.
 
 Signed-off-by: Simon Glass s...@chromium.org

Reviewed-by: Tom Rini tr...@ti.com

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 14/17] dm: i2c: dts: Add an I2C bus for sandbox

2014-11-16 Thread Heiko Schocher

Hello Simon,

Am 11.11.2014 18:46, schrieb Simon Glass:

Add an I2C bus to the device tree, with an EEPROM emulator attached to one
of the addresses.

Signed-off-by: Simon Glass s...@chromium.org
---

Changes in v2: None

  arch/sandbox/dts/sandbox.dts | 17 +
  1 file changed, 17 insertions(+)


Acked-by: Heiko Schocher h...@denx.de

bye,
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v2 14/17] dm: i2c: dts: Add an I2C bus for sandbox

2014-11-11 Thread Simon Glass
Add an I2C bus to the device tree, with an EEPROM emulator attached to one
of the addresses.

Signed-off-by: Simon Glass s...@chromium.org
---

Changes in v2: None

 arch/sandbox/dts/sandbox.dts | 17 +
 1 file changed, 17 insertions(+)

diff --git a/arch/sandbox/dts/sandbox.dts b/arch/sandbox/dts/sandbox.dts
index 7614715..11748ae 100644
--- a/arch/sandbox/dts/sandbox.dts
+++ b/arch/sandbox/dts/sandbox.dts
@@ -134,6 +134,23 @@
num-gpios = 20;
};
 
+   i2c@0 {
+   #address-cells = 1;
+   #size-cells = 0;
+   reg = 0;
+   compatible = sandbox,i2c;
+   clock-frequency = 40;
+   eeprom@2c {
+   reg = 0x2c;
+   compatible = i2c-eeprom;
+   emul {
+   compatible = sandbox,i2c-eeprom;
+   sandbox,filename = i2c.bin;
+   sandbox,size = 128;
+   };
+   };
+   };
+
spi@0 {
#address-cells = 1;
#size-cells = 0;
-- 
2.1.0.rc2.206.gedb03e5

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot