define schema for firmware info

Define the json schema for firmware which can expose various attributes
such as VendorIANA and device with which this firmware is compatible so
it can be used for image validation. This schema definition will be used
in other device/firmware definitions. This change is in response to
firmware design update
https://gerrit.openbmc.org/c/openbmc/docs/+/74653.

Change-Id: Id5fd9344fa96b010190f41f9029d2bcb63a1fe89
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>
diff --git a/meson.build b/meson.build
index d476f60..b8ef89d 100644
--- a/meson.build
+++ b/meson.build
@@ -113,6 +113,7 @@
     'virtual_sensor.json',
     'satellite_controller.json',
     'leak_detector.json',
+    'firmware.json',
 ]
 
 foreach s : schemas
diff --git a/schemas/firmware.json b/schemas/firmware.json
new file mode 100644
index 0000000..b5b1c64
--- /dev/null
+++ b/schemas/firmware.json
@@ -0,0 +1,20 @@
+{
+    "$schema": "http://json-schema.org/draft-07/schema#",
+    "$defs": {
+        "FirmwareInfoDef": {
+            "description": "This indicates the properties which apply to all firmwares",
+            "type": "object",
+            "properties": {
+                "VendorIANA": {
+                    "description": "The IANA Enterprise Id of the hardware vendor",
+                    "type": "number"
+                },
+                "CompatibleHardware": {
+                    "description": "The compatible hardware with name format com.<vendor>.Hardware.<XXX> specified by vendor in phosphor-dbus-interfaces",
+                    "type": "string"
+                }
+            },
+            "required": ["VendorIANA", "CompatibleName"]
+        }
+    }
+}