hw/mips/mips_ranchu.c: Add firmware node to DT

Platform information should be acquired from the
DT firmware node since init script does not parse
/proc/cpuinfo anymore :

https://android-review.googlesource.com/#/c/141740/

DT firmware node example :

firmware {
	android {
		revision = [31 00];
		hardware = "ranchu";
		compatible = "android,firmware";
	};
};

Change-Id: I120f7c998f5f191fa0aebff6899989a32c63a33d
diff --git a/hw/mips/mips_ranchu.c b/hw/mips/mips_ranchu.c
index 388387b..a6bad1d 100644
--- a/hw/mips/mips_ranchu.c
+++ b/hw/mips/mips_ranchu.c
@@ -36,6 +36,7 @@
 
 #define TYPE_MIPS_RANCHU "mips-ranchu"
 #define MIPS_RANCHU(obj) OBJECT_CHECK(RanchuState, (obj), TYPE_MIPS_RANCHU)
+#define MIPS_RANCHU_REV "1"
 
 typedef struct {
     SysBusDevice parent_obj;
@@ -443,6 +444,13 @@
     qemu_fdt_setprop_cell(fdt, "/", "#size-cells", 0x2);
     qemu_fdt_setprop_cell(fdt, "/", "interrupt-parent", devmap[RANCHU_GF_PIC].irq);
 
+    /* Firmware node */
+    qemu_fdt_add_subnode(fdt, "/firmware");
+    qemu_fdt_add_subnode(fdt, "/firmware/android");
+    qemu_fdt_setprop_string(fdt, "/firmware/android", "compatible", "android,firmware");
+    qemu_fdt_setprop_string(fdt, "/firmware/android", "hardware", "ranchu");
+    qemu_fdt_setprop_string(fdt, "/firmware/android", "revision", MIPS_RANCHU_REV);
+
     /* CPU node */
     qemu_fdt_add_subnode(fdt, "/cpus");
     qemu_fdt_add_subnode(fdt, "/cpus/cpu@0");