diff mbox

[U-Boot,17/20] dm: sandbox: dts: Add a real-time clock attached to I2C

Message ID 1429555051-22335-18-git-send-email-sjg@chromium.org
State Accepted
Delegated to: Simon Glass
Headers show

Commit Message

Simon Glass April 20, 2015, 6:37 p.m. UTC
Add an emulated RTC device for sandbox, so that the 'date' command can be
used.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 arch/sandbox/dts/sandbox.dts | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

Comments

Simon Glass May 4, 2015, 2:20 p.m. UTC | #1
On 20 April 2015 at 12:37, Simon Glass <sjg@chromium.org> wrote:
> Add an emulated RTC device for sandbox, so that the 'date' command can be
> used.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
>  arch/sandbox/dts/sandbox.dts | 12 +++++++++++-
>  1 file changed, 11 insertions(+), 1 deletion(-)

Applied to u-boot-dm.
diff mbox

Patch

diff --git a/arch/sandbox/dts/sandbox.dts b/arch/sandbox/dts/sandbox.dts
index efa2097..82d186e 100644
--- a/arch/sandbox/dts/sandbox.dts
+++ b/arch/sandbox/dts/sandbox.dts
@@ -8,7 +8,9 @@ 
 
 	aliases {
 		eth5 = "/eth@90000000";
+		i2c0 = &i2c_0;
 		pci0 = &pci;
+		rtc0 = &rtc_0;
 	};
 
 	chosen {
@@ -90,7 +92,7 @@ 
 		num-gpios = <10>;
 	};
 
-	i2c@0 {
+	i2c_0: i2c@0 {
 		#address-cells = <1>;
 		#size-cells = <0>;
 		reg = <0 0>;
@@ -105,6 +107,14 @@ 
 				sandbox,size = <128>;
 			};
 		};
+
+		rtc_0: rtc@43 {
+			reg = <0x43>;
+			compatible = "sandbox-rtc";
+			emul {
+				compatible = "sandbox,i2c-rtc";
+			};
+		};
 	};
 
 	spi@0 {