]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
sandbox: dts: Add a serial console node
authorSimon Glass <sjg@chromium.org>
Thu, 4 Sep 2014 22:27:29 +0000 (16:27 -0600)
committerSimon Glass <sjg@chromium.org>
Wed, 10 Sep 2014 19:00:00 +0000 (13:00 -0600)
If the sandbox device tree is provided to U-Boot (with the -d flag) then it
will use the device tree version in preference to the built-in device. The
only difference is the colour.

Signed-off-by: Simon Glass <sjg@chromium.org>
arch/sandbox/dts/sandbox.dts
doc/device-tree-bindings/serial/sandbox-serial.txt [new file with mode: 0644]

index efffacba1d37b86f88fab96c19fb0bfcd535c024..797478a2c7f661294bb462d56d71048459652cd7 100644 (file)
@@ -1,6 +1,16 @@
 /dts-v1/;
 
 / {
 /dts-v1/;
 
 / {
+       chosen {
+               stdout-path = "/serial";
+       };
+
+       /* Needs to be available prior to relocation */
+       uart0: serial {
+               compatible = "sandbox,serial";
+               sandbox,text-colour = "cyan";
+       };
+
        triangle {
                compatible = "demo-shape";
                colour = "cyan";
        triangle {
                compatible = "demo-shape";
                colour = "cyan";
diff --git a/doc/device-tree-bindings/serial/sandbox-serial.txt b/doc/device-tree-bindings/serial/sandbox-serial.txt
new file mode 100644 (file)
index 0000000..f429c90
--- /dev/null
@@ -0,0 +1,13 @@
+Sandbox serial
+
+The sandbox serial device is an emulated device which displays its output
+on the host machine's console, and accepts input from its keyboard.
+
+Required properties:
+  compatible: "sandbox,serial"
+
+Optional properties:
+  sandbox,text-colour: If present, this is the colour of the console text.
+        Supported values are:
+        "black", "red", "green", "yellow", "blue", "megenta", "cyan",
+        "white"