diff --git a/Buildscripts/DevicetreeCompiler/source/generator.py b/Buildscripts/DevicetreeCompiler/source/generator.py index abc1cf63..a583ddb1 100644 --- a/Buildscripts/DevicetreeCompiler/source/generator.py +++ b/Buildscripts/DevicetreeCompiler/source/generator.py @@ -63,12 +63,18 @@ def property_to_string(property: DeviceProperty, devices: list[Device]) -> str: type = property.type if type == "value" or type == "int": return property.value - elif type == "boolean": + elif type == "boolean" or type == "bool": return "true" elif type == "text": return f"\"{property.value}\"" elif type == "values": - return "{ " + ",".join(property.value) + " }" + value_list = list() + for item in property.value: + if isinstance(item, PropertyValue): + value_list.append(property_to_string(DeviceProperty(name="", type=item.type, value=item.value), devices)) + else: + value_list.append(str(item)) + return "{ " + ",".join(value_list) + " }" elif type == "phandle": return find_phandle(devices, property.value) else: