sandbox: i2c_emul_find() No emulators for device 'rtc@43'
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Sat, 5 Jan 2019 21:30:07 +0000 (22:30 +0100)
committerSimon Glass <sjg@chromium.org>
Tue, 15 Jan 2019 00:47:13 +0000 (17:47 -0700)
when running the date command on sandbox_defconfig an error occurs:

    ./u-boot -D u-boot.dtb

    => date
    i2c_emul_find() No emulators for device 'rtc@43'
    ## Get date failed

Correct the references to the emulator devices in the sandbox device trees
using test.dts as a reference.

Fixes: 031a650e1309 ("dm: sandbox: i2c: Use new emulator parent uclass")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Dropped unnecessary #address/size-cells property in i2c_emul:
Signed-off-by: Simon Glass <sjg@chromium.org>
arch/sandbox/dts/sandbox.dts
arch/sandbox/dts/sandbox64.dts

index ae3189ec8cfad3d5d1b35fa150d4706613b26c44..a41b5f052d7b47a7e845cfc421305c399f6d5f68 100644 (file)
                eeprom@2c {
                        reg = <0x2c>;
                        compatible = "i2c-eeprom";
+                       sandbox,emul = <&emul_eeprom>;
                };
 
                rtc_0: rtc@43 {
                        reg = <0x43>;
                        compatible = "sandbox-rtc";
+                       sandbox,emul = <&emul0>;
                };
                sandbox_pmic: sandbox_pmic {
                        reg = <0x40>;
                };
 
                i2c_emul: emul {
-                       #address-cells = <1>;
-                       #size-cells = <0>;
                        reg = <0xff>;
                        compatible = "sandbox,i2c-emul-parent";
-                       emul-eeprom {
-                               reg = <0x2c>;
+                       emul_eeprom: emul-eeprom {
                                compatible = "sandbox,i2c-eeprom";
                                sandbox,filename = "i2c.bin";
                                sandbox,size = <256>;
                        };
-                       emul0 {
-                               reg = <0x43>;
+                       emul0: emul0 {
                                compatible = "sandbox,i2c-rtc";
                        };
                };
index d30fd62a2a489d7c34b49811d2b8c045d44143e2..a3c95f2cdb2173899dd250f34c86df2a2e340d6a 100644 (file)
                eeprom@2c {
                        reg = <0x2c>;
                        compatible = "i2c-eeprom";
+                       sandbox,emul = <&emul_eeprom>;
                };
 
                rtc_0: rtc@43 {
                        reg = <0x43>;
                        compatible = "sandbox-rtc";
+                       sandbox,emul = <&emul0>;
                };
                sandbox_pmic: sandbox_pmic {
                        reg = <0x40>;
                i2c_emul: emul {
                        reg = <0xff>;
                        compatible = "sandbox,i2c-emul-parent";
-                       emul-eeprom {
+                       emul_eeprom: emul-eeprom {
                                compatible = "sandbox,i2c-eeprom";
                                sandbox,filename = "i2c.bin";
                                sandbox,size = <256>;
                        };
-                       emul0 {
+                       emul0: emul0 {
                                compatible = "sandbox,i2c-rtc";
                        };
                };