diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 34f4da798..e129a72e1 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -6,7 +6,7 @@ on: pull_request: types: [ opened, synchronize, reopened ] jobs: - run: + TactilityTests: runs-on: ubuntu-latest steps: - name: "Checkout repo" @@ -27,3 +27,17 @@ jobs: run: build/Tests/Tactility/TactilityTests - name: "Run TactilityKernel Tests" run: build/Tests/TactilityKernel/TactilityKernelTests + DevicetreeTests: + runs-on: ubuntu-latest + steps: + - name: "Checkout repo" + uses: actions/checkout@v2 + with: + submodules: recursive + - name: "Install Python Dependencies" + shell: bash + run: pip install lark==1.3.1 pyyaml==6.0.3 + - name: "Run Devicetree Tests" + shell: bash + working-directory: Buildscripts/DevicetreeCompiler/tests + run: python test_integration.py diff --git a/Buildscripts/DevicetreeCompiler/compile.py b/Buildscripts/DevicetreeCompiler/compile.py index b5db6034c..9f21731e7 100644 --- a/Buildscripts/DevicetreeCompiler/compile.py +++ b/Buildscripts/DevicetreeCompiler/compile.py @@ -24,5 +24,6 @@ def print_help(): is_verbose = "--verbose" in sys.argv devicetree_yaml_config = args[0] output_path = args[1] - main(devicetree_yaml_config, output_path, is_verbose) + result = main(devicetree_yaml_config, output_path, is_verbose) + sys.exit(result) diff --git a/Buildscripts/DevicetreeCompiler/source/binding_files.py b/Buildscripts/DevicetreeCompiler/source/binding_files.py index d69733109..504036dda 100644 --- a/Buildscripts/DevicetreeCompiler/source/binding_files.py +++ b/Buildscripts/DevicetreeCompiler/source/binding_files.py @@ -1,4 +1,5 @@ import os +from .exception import DevicetreeException def find_bindings(directory_path: str) -> list[str]: yaml_files = [] @@ -14,6 +15,6 @@ def find_all_bindings(directory_paths: list[str]) -> list[str]: for directory_path in directory_paths: new_paths = find_bindings(directory_path) if len(new_paths) == 0: - raise Exception(f"No bindings found in {directory_path}") + raise DevicetreeException(f"No bindings found in {directory_path}") yaml_files += new_paths return yaml_files \ No newline at end of file diff --git a/Buildscripts/DevicetreeCompiler/source/binding_parser.py b/Buildscripts/DevicetreeCompiler/source/binding_parser.py index b6f7f116f..2b4889431 100644 --- a/Buildscripts/DevicetreeCompiler/source/binding_parser.py +++ b/Buildscripts/DevicetreeCompiler/source/binding_parser.py @@ -44,6 +44,7 @@ def parse_binding(file_path: str, binding_dirs: list[str]) -> Binding: type=details.get('type', 'unknown'), required=details.get('required', False), description=details.get('description', '').strip(), + default=details.get('default', None), ) properties_dict[name] = prop filename = os.path.basename(file_path) diff --git a/Buildscripts/DevicetreeCompiler/source/exception.py b/Buildscripts/DevicetreeCompiler/source/exception.py new file mode 100644 index 000000000..2e6e3ae17 --- /dev/null +++ b/Buildscripts/DevicetreeCompiler/source/exception.py @@ -0,0 +1,2 @@ +class DevicetreeException(Exception): + pass diff --git a/Buildscripts/DevicetreeCompiler/source/generator.py b/Buildscripts/DevicetreeCompiler/source/generator.py index cf7f80f6c..d2bad4bd5 100644 --- a/Buildscripts/DevicetreeCompiler/source/generator.py +++ b/Buildscripts/DevicetreeCompiler/source/generator.py @@ -1,7 +1,7 @@ import os.path from textwrap import dedent - from source.models import * +from .exception import DevicetreeException def write_include(file, include: IncludeC, verbose: bool): if verbose: @@ -26,9 +26,9 @@ def get_device_node_name_safe(device: Device): def get_device_type_name(device: Device, bindings: list[Binding]): device_binding = find_device_binding(device, bindings) if device_binding is None: - raise Exception(f"Binding not found for {device.node_name}") + raise DevicetreeException(f"Binding not found for {device.node_name}") if device_binding.compatible is None: - raise Exception(f"Couldn't find compatible binding for {device.node_name}") + raise DevicetreeException(f"Couldn't find compatible binding for {device.node_name}") compatible_safe = device_binding.compatible.split(",")[-1] return compatible_safe.replace("-", "_") @@ -41,7 +41,7 @@ def find_device_property(device: Device, name: str) -> DeviceProperty: def find_device_binding(device: Device, bindings: list[Binding]) -> Binding: compatible_property = find_device_property(device, "compatible") if compatible_property is None: - raise Exception(f"property 'compatible' not found in device {device.node_name}") + raise DevicetreeException(f"property 'compatible' not found in device {device.node_name}") for binding in bindings: if binding.compatible == compatible_property.value: return binding @@ -57,44 +57,69 @@ def find_phandle(devices: list[Device], phandle: str): for device in devices: if device.node_name == phandle or device.node_alias == phandle: return f"&{get_device_node_name_safe(device)}" - raise Exception(f"phandle '{phandle}' not found in device tree") + raise DevicetreeException(f"phandle '{phandle}' not found in device tree") def property_to_string(property: DeviceProperty, devices: list[Device]) -> str: type = property.type - if type == "value": + 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: - raise Exception(f"property_to_string() has an unsupported type: {type}") + raise DevicetreeException(f"property_to_string() has an unsupported type: {type}") def resolve_parameters_from_bindings(device: Device, bindings: list[Binding], devices: list[Device]) -> list: compatible_property = find_device_property(device, "compatible") if compatible_property is None: - raise Exception(f"Cannot find 'compatible' property for {device.node_name}") + raise DevicetreeException(f"Cannot find 'compatible' property for {device.node_name}") device_binding = find_binding(compatible_property.value, bindings) if device_binding is None: - raise Exception(f"Binding not found for {device.node_name} and compatible '{compatible_property.value}'") + raise DevicetreeException(f"Binding not found for {device.node_name} and compatible '{compatible_property.value}'") # Filter out system properties binding_properties = [] + binding_property_names = set() for property in device_binding.properties: if property.name != "compatible": binding_properties.append(property) + binding_property_names.add(property.name) + + # Check for invalid properties in device + for device_property in device.properties: + if device_property.name in ["compatible"]: + continue + if device_property.name not in binding_property_names: + raise DevicetreeException(f"Device '{device.node_name}' has invalid property '{device_property.name}'") + # Allocate total expected configuration arguments result = [0] * len(binding_properties) for index, binding_property in enumerate(binding_properties): device_property = find_device_property(device, binding_property.name) if device_property is None: - if binding_property.required: - raise Exception(f"device {device.node_name} doesn't have property '{binding_property.name}'") + if binding_property.default is not None: + temp_prop = DeviceProperty( + name=binding_property.name, + type=binding_property.type, + value=binding_property.default + ) + result[index] = property_to_string(temp_prop, devices) + elif binding_property.required: + raise DevicetreeException(f"device {device.node_name} doesn't have property '{binding_property.name}'") + elif binding_property.type == "bool": + result[index] = "false" else: - result[index] = '0' + raise DevicetreeException(f"Device {device.node_name} doesn't have property '{binding_property.name}' and no default value is set") else: result[index] = property_to_string(device_property, devices) return result @@ -121,7 +146,7 @@ def write_device_structs(file, device: Device, parent_device: Device, bindings: type_name = get_device_type_name(device, bindings) compatible_property = find_device_property(device, "compatible") if compatible_property is None: - raise Exception(f"Cannot find 'compatible' property for {device.node_name}") + raise DevicetreeException(f"Cannot find 'compatible' property for {device.node_name}") node_name = get_device_node_name_safe(device) config_variable_name = f"{node_name}_config" if parent_device is not None: @@ -148,7 +173,7 @@ def write_device_init(file, device: Device, bindings: list[Binding], verbose: bo # Assemble some pre-requisites compatible_property = find_device_property(device, "compatible") if compatible_property is None: - raise Exception(f"Cannot find 'compatible' property for {device.node_name}") + raise DevicetreeException(f"Cannot find 'compatible' property for {device.node_name}") # Type & instance names node_name = get_device_node_name_safe(device) device_variable = node_name diff --git a/Buildscripts/DevicetreeCompiler/source/main.py b/Buildscripts/DevicetreeCompiler/source/main.py index 97b7f0be1..b26deba7e 100644 --- a/Buildscripts/DevicetreeCompiler/source/main.py +++ b/Buildscripts/DevicetreeCompiler/source/main.py @@ -9,38 +9,45 @@ from source.binding_files import find_all_bindings from source.binding_parser import parse_binding from source.config import * +from source.exception import DevicetreeException -def main(config_path: str, output_path: str, verbose: bool): +def main(config_path: str, output_path: str, verbose: bool) -> int: print(f"Generating devicetree code\n config: {config_path}\n output: {output_path}") if not os.path.isdir(config_path): - raise Exception(f"Directory not found: {config_path}") + print(f"Directory not found: {config_path}") + return 1 config = parse_config(config_path, os.getcwd()) if verbose: pprint(config) - project_dir = os.path.dirname(os.path.realpath(__file__)) - grammar_path = os.path.join(project_dir, "grammar.lark") - lark_data = read_file(grammar_path) - dts_data = read_file(config.dts) - lark = Lark(lark_data) - parsed = lark.parse(dts_data) - if verbose: - print(parsed.pretty()) - transformed = DtsTransformer().transform(parsed) - if verbose: - pprint(transformed) - binding_files = find_all_bindings(config.bindings) - if verbose: - print(f"Bindings found:") + try: + project_dir = os.path.dirname(os.path.realpath(__file__)) + grammar_path = os.path.join(project_dir, "grammar.lark") + lark_data = read_file(grammar_path) + dts_data = read_file(config.dts) + lark = Lark(lark_data) + parsed = lark.parse(dts_data) + if verbose: + print(parsed.pretty()) + transformed = DtsTransformer().transform(parsed) + if verbose: + pprint(transformed) + binding_files = find_all_bindings(config.bindings) + if verbose: + print("Bindings found:") + for binding_file in binding_files: + print(f" {binding_file}") + if verbose: + print("Parsing bindings") + bindings = [] for binding_file in binding_files: - print(f" {binding_file}") - if verbose: - print(f"Parsing bindings") - bindings = [] - for binding_file in binding_files: - bindings.append(parse_binding(binding_file, config.bindings)) - if verbose: - for binding in bindings: - pprint(binding) - generate(output_path, transformed, bindings, verbose) + bindings.append(parse_binding(binding_file, config.bindings)) + if verbose: + for binding in bindings: + pprint(binding) + generate(output_path, transformed, bindings, verbose) + return 0 + except DevicetreeException as caught: + print("\033[31mError: ", caught, "\033[0m") + return 1 diff --git a/Buildscripts/DevicetreeCompiler/source/models.py b/Buildscripts/DevicetreeCompiler/source/models.py index a865c698f..3b5747535 100644 --- a/Buildscripts/DevicetreeCompiler/source/models.py +++ b/Buildscripts/DevicetreeCompiler/source/models.py @@ -36,6 +36,7 @@ class BindingProperty: type: str required: bool description: str + default: object = None @dataclass class Binding: diff --git a/Buildscripts/DevicetreeCompiler/source/transformer.py b/Buildscripts/DevicetreeCompiler/source/transformer.py index bb70e3cde..ffd6441cf 100644 --- a/Buildscripts/DevicetreeCompiler/source/transformer.py +++ b/Buildscripts/DevicetreeCompiler/source/transformer.py @@ -4,6 +4,7 @@ from lark import Token from source.models import * from dataclasses import dataclass +from .exception import DevicetreeException def flatten_token_array(tokens: List[Token], name: str): result_list = list() @@ -23,7 +24,7 @@ def start(self, tokens): def dts_version(self, tokens: List[Token]): version = tokens[0].value if version != "dts-v1": - raise Exception(f"Unsupported DTS version: {version}") + raise DevicetreeException(f"Unsupported DTS version: {version}") return DtsVersion(version) def device(self, tokens: list): node_name = None @@ -46,12 +47,12 @@ def device_property(self, objects: List[object]): if (len(objects) == 1) or (objects[1] is None): return DeviceProperty(name, "boolean", True) if type(objects[1]) is not PropertyValue: - raise Exception(f"Object was not converted to PropertyValue: {objects[1]}") + raise DevicetreeException(f"Object was not converted to PropertyValue: {objects[1]}") return DeviceProperty(name, objects[1].type, objects[1].value) def property_value(self, tokens: List): token = tokens[0] if type(token) is Token: - raise Exception(f"Failed to convert token to PropertyValue: {token}") + raise DevicetreeException(f"Failed to convert token to PropertyValue: {token}") return token def PHANDLE(self, token: Token): return PropertyValue(type="phandle", value=token.value[1:]) diff --git a/Buildscripts/DevicetreeCompiler/tests/data/bindings/test,device.yaml b/Buildscripts/DevicetreeCompiler/tests/data/bindings/test,device.yaml new file mode 100644 index 000000000..cbb16527b --- /dev/null +++ b/Buildscripts/DevicetreeCompiler/tests/data/bindings/test,device.yaml @@ -0,0 +1,14 @@ +description: Test device binding +compatible: "test,device" +properties: + reg: + type: int + required: true + status: + type: string + boolean-prop: + type: boolean + int-prop: + type: int + string-prop: + type: string diff --git a/Buildscripts/DevicetreeCompiler/tests/data/bindings/test,root.yaml b/Buildscripts/DevicetreeCompiler/tests/data/bindings/test,root.yaml new file mode 100644 index 000000000..3d2b130b6 --- /dev/null +++ b/Buildscripts/DevicetreeCompiler/tests/data/bindings/test,root.yaml @@ -0,0 +1,5 @@ +description: Test root binding +compatible: "test,root" +properties: + model: + type: string diff --git a/Buildscripts/DevicetreeCompiler/tests/data/devicetree.yaml b/Buildscripts/DevicetreeCompiler/tests/data/devicetree.yaml new file mode 100644 index 000000000..52538f38e --- /dev/null +++ b/Buildscripts/DevicetreeCompiler/tests/data/devicetree.yaml @@ -0,0 +1,2 @@ +dts: test.dts +bindings: bindings diff --git a/Buildscripts/DevicetreeCompiler/tests/data/test.dts b/Buildscripts/DevicetreeCompiler/tests/data/test.dts new file mode 100644 index 000000000..787022777 --- /dev/null +++ b/Buildscripts/DevicetreeCompiler/tests/data/test.dts @@ -0,0 +1,17 @@ +/dts-v1/; + +#include + +/ { + compatible = "test,root"; + model = "Test Model"; + + test_device: test-device@0 { + compatible = "test,device"; + reg = <0>; + status = "okay"; + boolean-prop; + int-prop = <42>; + string-prop = "hello"; + }; +}; diff --git a/Buildscripts/DevicetreeCompiler/tests/test_integration.py b/Buildscripts/DevicetreeCompiler/tests/test_integration.py new file mode 100644 index 000000000..deaeee0b6 --- /dev/null +++ b/Buildscripts/DevicetreeCompiler/tests/test_integration.py @@ -0,0 +1,102 @@ +import os +import subprocess +import shutil +import sys +import tempfile + +# Path to the compile.py script +# We assume this script is in Buildscripts/DevicetreeCompiler/tests/ +SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) +PROJECT_ROOT = os.path.abspath(os.path.join(SCRIPT_DIR, "..")) +COMPILE_SCRIPT = os.path.join(PROJECT_ROOT, "compile.py") +TEST_DATA_DIR = os.path.join(SCRIPT_DIR, "data") + +def run_compiler(config_path, output_path): + result = subprocess.run( + [sys.executable, COMPILE_SCRIPT, config_path, output_path], + capture_output=True, + text=True, + cwd=PROJECT_ROOT, + timeout=60 + ) + return result + +def test_compile_success(): + print("Running test_compile_success...") + with tempfile.TemporaryDirectory() as output_dir: + result = run_compiler(TEST_DATA_DIR, output_dir) + + if result.returncode != 0: + print(f"FAILED: Compilation failed: {result.stderr}") + return False + + if not os.path.exists(os.path.join(output_dir, "devicetree.c")): + print("FAILED: devicetree.c not generated") + return False + + if not os.path.exists(os.path.join(output_dir, "devicetree.h")): + print("FAILED: devicetree.h not generated") + return False + + print("PASSED") + return True + +def test_compile_invalid_dts(): + print("Running test_compile_invalid_dts...") + with tempfile.TemporaryDirectory() as tmp_dir: + bad_data_dir = os.path.join(tmp_dir, "bad_data") + os.makedirs(bad_data_dir) + output_dir = os.path.join(tmp_dir, "output") + os.makedirs(output_dir) + + with open(os.path.join(bad_data_dir, "devicetree.yaml"), "w") as f: + f.write("dts: bad.dts\nbindings: bindings") + + with open(os.path.join(bad_data_dir, "bad.dts"), "w") as f: + f.write("/dts-v1/;\n / { invalid syntax }") + + os.makedirs(os.path.join(bad_data_dir, "bindings")) + + result = run_compiler(bad_data_dir, output_dir) + + if result.returncode == 0: + print("FAILED: Compilation should have failed but succeeded") + return False + + print("PASSED") + return True + +def test_compile_missing_config(): + print("Running test_compile_missing_config...") + with tempfile.TemporaryDirectory() as output_dir: + result = run_compiler("/non/existent/path", output_dir) + + if result.returncode == 0: + print("FAILED: Compilation should have failed for non-existent path") + return False + + if "Directory not found" not in result.stdout: + print(f"FAILED: Expected 'Directory not found' error message, got: {result.stdout}") + return False + + print("PASSED") + return True + +if __name__ == "__main__": + tests = [ + test_compile_success, + test_compile_invalid_dts, + test_compile_missing_config + ] + + failed = 0 + for test in tests: + if not test(): + failed += 1 + + if failed > 0: + print(f"\n{failed} tests failed") + sys.exit(1) + else: + print("\nAll tests passed") + sys.exit(0) diff --git a/Devices/cyd-2432s024c/cyd,2432s024c.dts b/Devices/cyd-2432s024c/cyd,2432s024c.dts index d925d05fa..6c3fe31fb 100644 --- a/Devices/cyd-2432s024c/cyd,2432s024c.dts +++ b/Devices/cyd-2432s024c/cyd,2432s024c.dts @@ -28,9 +28,6 @@ pin-mosi = <13>; pin-miso = ; pin-sclk = <14>; - pin-wp = ; - pin-hd = ; - max-transfer-size = <0>; }; sdcard_spi: spi1 { @@ -39,8 +36,5 @@ pin-mosi = <23>; pin-miso = <19>; pin-sclk = <18>; - pin-wp = ; - pin-hd = ; - max-transfer-size = <0>; }; }; diff --git a/Devices/cyd-2432s028r/cyd,2432s028r.dts b/Devices/cyd-2432s028r/cyd,2432s028r.dts index 34b3f218c..d85ec1e01 100644 --- a/Devices/cyd-2432s028r/cyd,2432s028r.dts +++ b/Devices/cyd-2432s028r/cyd,2432s028r.dts @@ -29,9 +29,6 @@ pin-mosi = <13>; pin-miso = <12>; pin-sclk = <14>; - pin-wp = ; - pin-hd = ; - max-transfer-size = <0>; }; sdcard_spi: spi1 { @@ -40,9 +37,6 @@ pin-mosi = <23>; pin-miso = <19>; pin-sclk = <18>; - pin-wp = ; - pin-hd = ; - max-transfer-size = <0>; }; uart1 { @@ -50,7 +44,5 @@ port = ; pin-tx = <3>; pin-rx = <1>; - pin-cts = ; - pin-rts = ; }; }; diff --git a/Devices/cyd-2432s028rv3/cyd,2432s028rv3.dts b/Devices/cyd-2432s028rv3/cyd,2432s028rv3.dts index 14f9b551c..950fc49d5 100644 --- a/Devices/cyd-2432s028rv3/cyd,2432s028rv3.dts +++ b/Devices/cyd-2432s028rv3/cyd,2432s028rv3.dts @@ -29,9 +29,6 @@ pin-mosi = <13>; pin-miso = <12>; pin-sclk = <14>; - pin-wp = ; - pin-hd = ; - max-transfer-size = <0>; }; sdcard_spi: spi1 { @@ -40,9 +37,6 @@ pin-mosi = <23>; pin-miso = <19>; pin-sclk = <18>; - pin-wp = ; - pin-hd = ; - max-transfer-size = <0>; }; uart1 { @@ -50,7 +44,5 @@ port = ; pin-tx = <3>; pin-rx = <1>; - pin-cts = ; - pin-rts = ; }; }; diff --git a/Devices/cyd-2432s032c/cyd,2432s032c.dts b/Devices/cyd-2432s032c/cyd,2432s032c.dts index 4333ca03e..078215ae1 100644 --- a/Devices/cyd-2432s032c/cyd,2432s032c.dts +++ b/Devices/cyd-2432s032c/cyd,2432s032c.dts @@ -28,9 +28,6 @@ pin-mosi = <13>; pin-miso = ; pin-sclk = <14>; - pin-wp = ; - pin-hd = ; - max-transfer-size = <0>; }; sdcard_spi: spi1 { @@ -39,8 +36,5 @@ pin-mosi = <23>; pin-miso = <19>; pin-sclk = <18>; - pin-wp = ; - pin-hd = ; - max-transfer-size = <0>; }; }; diff --git a/Devices/cyd-4848s040c/cyd,4848s040c.dts b/Devices/cyd-4848s040c/cyd,4848s040c.dts index 1ec85d2b7..39e08ddc2 100644 --- a/Devices/cyd-4848s040c/cyd,4848s040c.dts +++ b/Devices/cyd-4848s040c/cyd,4848s040c.dts @@ -28,8 +28,6 @@ pin-mosi = <47>; pin-miso = <41>; pin-sclk = <48>; - pin-wp = ; pin-hd = <42>; - max-transfer-size = <0>; }; }; diff --git a/Devices/cyd-8048s043c/cyd,8048s043c.dts b/Devices/cyd-8048s043c/cyd,8048s043c.dts index d0c4c449d..3382fb88c 100644 --- a/Devices/cyd-8048s043c/cyd,8048s043c.dts +++ b/Devices/cyd-8048s043c/cyd,8048s043c.dts @@ -37,9 +37,6 @@ pin-mosi = <11>; pin-miso = <13>; pin-sclk = <12>; - pin-wp = ; - pin-hd = ; - max-transfer-size = <0>; }; uart1 { @@ -47,7 +44,5 @@ port = ; pin-tx = <18>; pin-rx = <17>; - pin-cts = ; - pin-rts = ; }; }; diff --git a/Devices/cyd-e32r28t/cyd,e32r28t.dts b/Devices/cyd-e32r28t/cyd,e32r28t.dts index 49dd689be..19abe22ae 100644 --- a/Devices/cyd-e32r28t/cyd,e32r28t.dts +++ b/Devices/cyd-e32r28t/cyd,e32r28t.dts @@ -19,9 +19,6 @@ pin-mosi = <13>; pin-miso = <12>; pin-sclk = <14>; - pin-wp = ; - pin-hd = ; - max-transfer-size = <0>; }; sdcard_spi: spi1 { @@ -30,8 +27,5 @@ pin-mosi = <23>; pin-miso = <19>; pin-sclk = <18>; - pin-wp = ; - pin-hd = ; - max-transfer-size = <0>; }; }; diff --git a/Devices/cyd-e32r32p/cyd,e32r32p.dts b/Devices/cyd-e32r32p/cyd,e32r32p.dts index 720ffc1ec..100bc526e 100644 --- a/Devices/cyd-e32r32p/cyd,e32r32p.dts +++ b/Devices/cyd-e32r32p/cyd,e32r32p.dts @@ -28,9 +28,6 @@ pin-mosi = <13>; pin-miso = <12>; pin-sclk = <14>; - pin-wp = ; - pin-hd = ; - max-transfer-size = <0>; }; sdcard_spi: spi1 { @@ -39,8 +36,5 @@ pin-mosi = <23>; pin-miso = <19>; pin-sclk = <18>; - pin-wp = ; - pin-hd = ; - max-transfer-size = <0>; }; }; diff --git a/Devices/elecrow-crowpanel-advance-28/elecrow,crowpanel-advance-28.dts b/Devices/elecrow-crowpanel-advance-28/elecrow,crowpanel-advance-28.dts index 9e49dbdcd..ecccc4678 100644 --- a/Devices/elecrow-crowpanel-advance-28/elecrow,crowpanel-advance-28.dts +++ b/Devices/elecrow-crowpanel-advance-28/elecrow,crowpanel-advance-28.dts @@ -27,11 +27,7 @@ compatible = "espressif,esp32-spi"; host = ; pin-mosi = <39>; - pin-miso = ; pin-sclk = <42>; - pin-wp = ; - pin-hd = ; - max-transfer-size = <0>; }; sdcard_spi: spi1 { @@ -40,9 +36,6 @@ pin-mosi = <6>; pin-miso = <4>; pin-sclk = <5>; - pin-wp = ; - pin-hd = ; - max-transfer-size = <0>; }; uart0 { @@ -50,8 +43,6 @@ port = ; pin-tx = <43>; pin-rx = <44>; - pin-cts = ; - pin-rts = ; }; uart1 { @@ -59,7 +50,5 @@ port = ; pin-tx = <17>; pin-rx = <18>; - pin-cts = ; - pin-rts = ; }; }; diff --git a/Devices/elecrow-crowpanel-advance-35/elecrow,crowpanel-advance-35.dts b/Devices/elecrow-crowpanel-advance-35/elecrow,crowpanel-advance-35.dts index 74abc8b0a..cd034a61b 100644 --- a/Devices/elecrow-crowpanel-advance-35/elecrow,crowpanel-advance-35.dts +++ b/Devices/elecrow-crowpanel-advance-35/elecrow,crowpanel-advance-35.dts @@ -29,9 +29,6 @@ pin-mosi = <39>; pin-miso = ; pin-sclk = <42>; - pin-wp = ; - pin-hd = ; - max-transfer-size = <0>; }; sdcard_spi: spi1 { @@ -40,9 +37,6 @@ pin-mosi = <6>; pin-miso = <4>; pin-sclk = <5>; - pin-wp = ; - pin-hd = ; - max-transfer-size = <0>; }; uart0 { @@ -50,8 +44,6 @@ port = ; pin-tx = <43>; pin-rx = <44>; - pin-cts = ; - pin-rts = ; }; uart1 { @@ -59,7 +51,5 @@ port = ; pin-tx = <17>; pin-rx = <18>; - pin-cts = ; - pin-rts = ; }; }; diff --git a/Devices/elecrow-crowpanel-advance-50/elecrow,crowpanel-advance-50.dts b/Devices/elecrow-crowpanel-advance-50/elecrow,crowpanel-advance-50.dts index 828f36130..53a7ab724 100644 --- a/Devices/elecrow-crowpanel-advance-50/elecrow,crowpanel-advance-50.dts +++ b/Devices/elecrow-crowpanel-advance-50/elecrow,crowpanel-advance-50.dts @@ -29,9 +29,6 @@ pin-mosi = <6>; pin-miso = <4>; pin-sclk = <5>; - pin-wp = ; - pin-hd = ; - max-transfer-size = <0>; }; uart0 { @@ -39,8 +36,6 @@ port = ; pin-tx = <43>; pin-rx = <44>; - pin-cts = ; - pin-rts = ; }; uart1 { @@ -48,7 +43,5 @@ port = ; pin-tx = <20>; pin-rx = <19>; - pin-cts = ; - pin-rts = ; }; }; diff --git a/Devices/elecrow-crowpanel-basic-28/elecrow,crowpanel-basic-28.dts b/Devices/elecrow-crowpanel-basic-28/elecrow,crowpanel-basic-28.dts index 50563f6d7..21d5e7ac4 100644 --- a/Devices/elecrow-crowpanel-basic-28/elecrow,crowpanel-basic-28.dts +++ b/Devices/elecrow-crowpanel-basic-28/elecrow,crowpanel-basic-28.dts @@ -29,8 +29,6 @@ pin-mosi = <13>; pin-miso = <12>; pin-sclk = <14>; - pin-wp = ; - pin-hd = ; max-transfer-size = <65536>; }; @@ -40,9 +38,6 @@ pin-mosi = <23>; pin-miso = <19>; pin-sclk = <18>; - pin-wp = ; - pin-hd = ; - max-transfer-size = <0>; }; uart1 { @@ -50,7 +45,5 @@ port = ; pin-tx = <17>; pin-rx = <16>; - pin-cts = ; - pin-rts = ; }; }; diff --git a/Devices/elecrow-crowpanel-basic-35/elecrow,crowpanel-basic-35.dts b/Devices/elecrow-crowpanel-basic-35/elecrow,crowpanel-basic-35.dts index 310036720..e9f160d15 100644 --- a/Devices/elecrow-crowpanel-basic-35/elecrow,crowpanel-basic-35.dts +++ b/Devices/elecrow-crowpanel-basic-35/elecrow,crowpanel-basic-35.dts @@ -29,8 +29,6 @@ pin-mosi = <13>; pin-miso = <33>; pin-sclk = <14>; - pin-wp = ; - pin-hd = ; max-transfer-size = <65536>; }; @@ -40,9 +38,6 @@ pin-mosi = <23>; pin-miso = <19>; pin-sclk = <18>; - pin-wp = ; - pin-hd = ; - max-transfer-size = <0>; }; uart1 { @@ -50,7 +45,5 @@ port = ; pin-tx = <1>; pin-rx = <3>; - pin-cts = ; - pin-rts = ; }; }; diff --git a/Devices/elecrow-crowpanel-basic-50/elecrow,crowpanel-basic-50.dts b/Devices/elecrow-crowpanel-basic-50/elecrow,crowpanel-basic-50.dts index 9e2cf2612..3a28c1189 100644 --- a/Devices/elecrow-crowpanel-basic-50/elecrow,crowpanel-basic-50.dts +++ b/Devices/elecrow-crowpanel-basic-50/elecrow,crowpanel-basic-50.dts @@ -29,9 +29,6 @@ pin-mosi = <11>; pin-miso = <13>; pin-sclk = <12>; - pin-wp = ; - pin-hd = ; - max-transfer-size = <0>; }; uart0 { @@ -39,7 +36,5 @@ port = ; pin-tx = <43>; pin-rx = <44>; - pin-cts = ; - pin-rts = ; }; }; diff --git a/Devices/guition-jc2432w328c/guition,jc2432w328c.dts b/Devices/guition-jc2432w328c/guition,jc2432w328c.dts index 82735e0cd..99c77be93 100644 --- a/Devices/guition-jc2432w328c/guition,jc2432w328c.dts +++ b/Devices/guition-jc2432w328c/guition,jc2432w328c.dts @@ -36,11 +36,7 @@ compatible = "espressif,esp32-spi"; host = ; pin-mosi = <13>; - pin-miso = ; pin-sclk = <14>; - pin-wp = ; - pin-hd = ; - max-transfer-size = <0>; }; sdcard_spi: spi1 { @@ -49,9 +45,6 @@ pin-mosi = <23>; pin-miso = <19>; pin-sclk = <18>; - pin-wp = ; - pin-hd = ; - max-transfer-size = <0>; }; // CN1 header, JST SH 1.25, GND / IO22 / IO21 / 3.3V @@ -60,7 +53,5 @@ port = ; pin-tx = <22>; pin-rx = <21>; - pin-cts = ; - pin-rts = ; }; }; diff --git a/Devices/guition-jc3248w535c/guition,jc3248w535c.dts b/Devices/guition-jc3248w535c/guition,jc3248w535c.dts index c16e55000..5cc090266 100644 --- a/Devices/guition-jc3248w535c/guition,jc3248w535c.dts +++ b/Devices/guition-jc3248w535c/guition,jc3248w535c.dts @@ -39,7 +39,6 @@ pin-sclk = <47>; pin-wp = <40>; pin-hd = <39>; - max-transfer-size = <0>; }; sdcard_spi: spi1 { @@ -48,9 +47,6 @@ pin-mosi = <11>; pin-miso = <13>; pin-sclk = <12>; - pin-wp = ; - pin-hd = ; - max-transfer-size = <0>; }; // P1 header @@ -59,7 +55,5 @@ port = ; pin-tx = <43>; pin-rx = <44>; - pin-cts = ; - pin-rts = ; }; }; diff --git a/Devices/guition-jc8048w550c/guition,jc8048w550c.dts b/Devices/guition-jc8048w550c/guition,jc8048w550c.dts index 2661aaae8..28d867d75 100644 --- a/Devices/guition-jc8048w550c/guition,jc8048w550c.dts +++ b/Devices/guition-jc8048w550c/guition,jc8048w550c.dts @@ -37,9 +37,6 @@ pin-mosi = <11>; pin-miso = <13>; pin-sclk = <12>; - pin-wp = ; - pin-hd = ; - max-transfer-size = <0>; }; uart1 { @@ -47,7 +44,5 @@ port = ; pin-tx = <18>; pin-rx = <17>; - pin-cts = ; - pin-rts = ; }; }; diff --git a/Devices/lilygo-tdeck/lilygo,tdeck.dts b/Devices/lilygo-tdeck/lilygo,tdeck.dts index eca24c0fd..12d262803 100644 --- a/Devices/lilygo-tdeck/lilygo,tdeck.dts +++ b/Devices/lilygo-tdeck/lilygo,tdeck.dts @@ -39,8 +39,6 @@ pin-bclk = <7>; pin-ws = <5>; pin-data-out = <6>; - pin-data-in = ; - pin-mclk = ; }; spi0 { @@ -49,9 +47,6 @@ pin-mosi = <41>; pin-miso = <38>; pin-sclk = <40>; - pin-wp = ; - pin-hd = ; - max-transfer-size = <0>; }; uart1 { @@ -59,7 +54,5 @@ port = ; pin-tx = <43>; pin-rx = <44>; - pin-cts = ; - pin-rts = ; }; }; diff --git a/Devices/lilygo-tdisplay-s3/lilygo,tdisplay-s3.dts b/Devices/lilygo-tdisplay-s3/lilygo,tdisplay-s3.dts index 723d6dcd5..27a7261f8 100644 --- a/Devices/lilygo-tdisplay-s3/lilygo,tdisplay-s3.dts +++ b/Devices/lilygo-tdisplay-s3/lilygo,tdisplay-s3.dts @@ -18,10 +18,6 @@ compatible = "espressif,esp32-spi"; host = ; pin-mosi = <7>; - pin-miso = ; pin-sclk = <6>; - pin-wp = ; - pin-hd = ; - max-transfer-size = <0>; }; }; diff --git a/Devices/lilygo-tdisplay/lilygo,tdisplay.dts b/Devices/lilygo-tdisplay/lilygo,tdisplay.dts index 994b065c4..87da67c7f 100644 --- a/Devices/lilygo-tdisplay/lilygo,tdisplay.dts +++ b/Devices/lilygo-tdisplay/lilygo,tdisplay.dts @@ -18,10 +18,6 @@ compatible = "espressif,esp32-spi"; host = ; pin-mosi = <19>; - pin-miso = ; pin-sclk = <18>; - pin-wp = ; - pin-hd = ; - max-transfer-size = <0>; }; }; diff --git a/Devices/lilygo-tdongle-s3/lilygo,tdongle-s3.dts b/Devices/lilygo-tdongle-s3/lilygo,tdongle-s3.dts index 964c30e88..73ff62855 100644 --- a/Devices/lilygo-tdongle-s3/lilygo,tdongle-s3.dts +++ b/Devices/lilygo-tdongle-s3/lilygo,tdongle-s3.dts @@ -27,11 +27,7 @@ compatible = "espressif,esp32-spi"; host = ; pin-mosi = <3>; - pin-miso = ; pin-sclk = <5>; - pin-wp = ; - pin-hd = ; - max-transfer-size = <0>; }; stemma_qt: uart1 { @@ -39,7 +35,5 @@ port = ; pin-tx = <43>; pin-rx = <44>; - pin-cts = ; - pin-rts = ; }; }; diff --git a/Devices/lilygo-tlora-pager/lilygo,tlora-pager.dts b/Devices/lilygo-tlora-pager/lilygo,tlora-pager.dts index ec60078b5..ade37809b 100644 --- a/Devices/lilygo-tlora-pager/lilygo,tlora-pager.dts +++ b/Devices/lilygo-tlora-pager/lilygo,tlora-pager.dts @@ -31,9 +31,6 @@ pin-mosi = <34>; pin-miso = <33>; pin-sclk = <35>; - pin-wp = ; - pin-hd = ; - max-transfer-size = <0>; }; // ES8311 @@ -53,8 +50,6 @@ port = ; pin-tx = <12>; pin-rx = <4>; - pin-cts = ; - pin-rts = ; }; uart_external: uart1 { @@ -62,7 +57,5 @@ port = ; pin-tx = <43>; pin-rx = <44>; - pin-cts = ; - pin-rts = ; }; }; diff --git a/Devices/m5stack-cardputer-adv/m5stack,cardputer-adv.dts b/Devices/m5stack-cardputer-adv/m5stack,cardputer-adv.dts index 63ee256b7..41d8db195 100644 --- a/Devices/m5stack-cardputer-adv/m5stack,cardputer-adv.dts +++ b/Devices/m5stack-cardputer-adv/m5stack,cardputer-adv.dts @@ -37,11 +37,7 @@ compatible = "espressif,esp32-spi"; host = ; pin-mosi = <35>; - pin-miso = ; pin-sclk = <36>; - pin-wp = ; - pin-hd = ; - max-transfer-size = <0>; }; sdcard_spi: spi1 { @@ -50,9 +46,6 @@ pin-mosi = <14>; pin-miso = <39>; pin-sclk = <40>; - pin-wp = ; - pin-hd = ; - max-transfer-size = <0>; }; // Speaker and microphone (ES8311) @@ -63,7 +56,6 @@ pin-ws = <43>; pin-data-out = <42>; pin-data-in = <46>; - pin-mclk = ; }; uart_port_a: uart1 { @@ -71,7 +63,5 @@ port = ; pin-tx = <1>; pin-rx = <2>; - pin-cts = ; - pin-rts = ; }; }; diff --git a/Devices/m5stack-cardputer/m5stack,cardputer.dts b/Devices/m5stack-cardputer/m5stack,cardputer.dts index 8904f8988..55914b5fd 100644 --- a/Devices/m5stack-cardputer/m5stack,cardputer.dts +++ b/Devices/m5stack-cardputer/m5stack,cardputer.dts @@ -29,11 +29,7 @@ compatible = "espressif,esp32-spi"; host = ; pin-mosi = <35>; - pin-miso = ; pin-sclk = <36>; - pin-wp = ; - pin-hd = ; - max-transfer-size = <0>; }; sdcard_spi: spi1 { @@ -42,9 +38,6 @@ pin-mosi = <14>; pin-miso = <39>; pin-sclk = <40>; - pin-wp = ; - pin-hd = ; - max-transfer-size = <0>; }; // Speaker and microphone @@ -56,7 +49,6 @@ pin-ws = <43>; pin-data-out = <42>; pin-data-in = <46>; - pin-mclk = ; }; uart_port_a: uart1 { @@ -64,7 +56,5 @@ port = ; pin-tx = <1>; pin-rx = <2>; - pin-cts = ; - pin-rts = ; }; }; diff --git a/Devices/m5stack-core2/m5stack,core2.dts b/Devices/m5stack-core2/m5stack,core2.dts index 4346415e0..b45df25ea 100644 --- a/Devices/m5stack-core2/m5stack,core2.dts +++ b/Devices/m5stack-core2/m5stack,core2.dts @@ -39,9 +39,6 @@ pin-mosi = <23>; pin-miso = <38>; pin-sclk = <18>; - pin-wp = ; - pin-hd = ; - max-transfer-size = <0>; }; // NS4168: Speaker and microphone @@ -53,7 +50,6 @@ pin-ws = <0>; pin-data-out = <2>; pin-data-in = <34>; - pin-mclk = ; }; uart_port_a: uart1 { @@ -61,7 +57,5 @@ port = ; pin-tx = <33>; pin-rx = <32>; - pin-cts = ; - pin-rts = ; }; }; diff --git a/Devices/m5stack-cores3/m5stack,cores3.dts b/Devices/m5stack-cores3/m5stack,cores3.dts index a4e7b6793..0745584bd 100644 --- a/Devices/m5stack-cores3/m5stack,cores3.dts +++ b/Devices/m5stack-cores3/m5stack,cores3.dts @@ -55,9 +55,6 @@ pin-mosi = <37>; pin-miso = <35>; pin-sclk = <36>; - pin-wp = ; - pin-hd = ; - max-transfer-size = <0>; }; // TODO: Enable speaker via ES7210 I2C: https://github.com/m5stack/M5Unified/blob/a6256725481f1bc366655fa48cf03b6095e30ad1/src/M5Unified.cpp#L417 @@ -79,7 +76,5 @@ port = ; pin-tx = <1>; pin-rx = <2>; - pin-cts = ; - pin-rts = ; }; }; diff --git a/Devices/m5stack-papers3/m5stack,papers3.dts b/Devices/m5stack-papers3/m5stack,papers3.dts index 29d30b4ec..6e1ff50fd 100644 --- a/Devices/m5stack-papers3/m5stack,papers3.dts +++ b/Devices/m5stack-papers3/m5stack,papers3.dts @@ -28,8 +28,6 @@ pin-mosi = <38>; pin-miso = <40>; pin-sclk = <39>; - pin-wp = ; - pin-hd = ; max-transfer-size = <4096>; }; }; diff --git a/Devices/m5stack-stickc-plus/m5stack,stickc-plus.dts b/Devices/m5stack-stickc-plus/m5stack,stickc-plus.dts index 4fab2a0cb..f50a41d35 100644 --- a/Devices/m5stack-stickc-plus/m5stack,stickc-plus.dts +++ b/Devices/m5stack-stickc-plus/m5stack,stickc-plus.dts @@ -35,11 +35,7 @@ compatible = "espressif,esp32-spi"; host = ; pin-mosi = <15>; - pin-miso = ; pin-sclk = <13>; - pin-wp = ; - pin-hd = ; - max-transfer-size = <0>; }; uart_grove: uart1 { @@ -47,7 +43,5 @@ port = ; pin-tx = <33>; pin-rx = <32>; - pin-cts = ; - pin-rts = ; }; }; diff --git a/Devices/m5stack-stickc-plus2/m5stack,stickc-plus2.dts b/Devices/m5stack-stickc-plus2/m5stack,stickc-plus2.dts index 76166f4ce..ac7dad3d4 100644 --- a/Devices/m5stack-stickc-plus2/m5stack,stickc-plus2.dts +++ b/Devices/m5stack-stickc-plus2/m5stack,stickc-plus2.dts @@ -34,11 +34,7 @@ compatible = "espressif,esp32-spi"; host = ; pin-mosi = <15>; - pin-miso = ; pin-sclk = <13>; - pin-wp = ; - pin-hd = ; - max-transfer-size = <0>; }; uart_grove: uart1 { @@ -46,7 +42,5 @@ port = ; pin-tx = <33>; pin-rx = <32>; - pin-cts = ; - pin-rts = ; }; }; diff --git a/Devices/m5stack-tab5/m5stack,tab5.dts b/Devices/m5stack-tab5/m5stack,tab5.dts index bb6c82fbd..e160e6313 100644 --- a/Devices/m5stack-tab5/m5stack,tab5.dts +++ b/Devices/m5stack-tab5/m5stack,tab5.dts @@ -36,8 +36,5 @@ pin-mosi = <44>; pin-miso = <39>; pin-sclk = <43>; - pin-wp = ; - pin-hd = ; - max-transfer-size = <0>; }; }; diff --git a/Devices/unphone/unphone.dts b/Devices/unphone/unphone.dts index 354d759f8..6a4de1df1 100644 --- a/Devices/unphone/unphone.dts +++ b/Devices/unphone/unphone.dts @@ -28,8 +28,6 @@ pin-mosi = <40>; pin-miso = <41>; pin-sclk = <39>; - pin-wp = ; - pin-hd = ; max-transfer-size = <65536>; }; }; diff --git a/Devices/waveshare-esp32-s3-geek/waveshare,esp32-s3-geek.dts b/Devices/waveshare-esp32-s3-geek/waveshare,esp32-s3-geek.dts index d38b3084f..53cc57788 100644 --- a/Devices/waveshare-esp32-s3-geek/waveshare,esp32-s3-geek.dts +++ b/Devices/waveshare-esp32-s3-geek/waveshare,esp32-s3-geek.dts @@ -27,11 +27,7 @@ compatible = "espressif,esp32-spi"; host = ; pin-mosi = <11>; - pin-miso = ; pin-sclk = <12>; - pin-wp = ; - pin-hd = ; - max-transfer-size = <0>; }; uart0 { @@ -39,7 +35,5 @@ port = ; pin-tx = <43>; pin-rx = <44>; - pin-cts = ; - pin-rts = ; }; }; diff --git a/Devices/waveshare-s3-lcd-13/waveshare,s3-lcd-13.dts b/Devices/waveshare-s3-lcd-13/waveshare,s3-lcd-13.dts index ba44bd3c3..4879e6d99 100644 --- a/Devices/waveshare-s3-lcd-13/waveshare,s3-lcd-13.dts +++ b/Devices/waveshare-s3-lcd-13/waveshare,s3-lcd-13.dts @@ -27,11 +27,7 @@ compatible = "espressif,esp32-spi"; host = ; pin-mosi = <41>; - pin-miso = ; pin-sclk = <40>; - pin-wp = ; - pin-hd = ; - max-transfer-size = <0>; }; spi1 { @@ -40,8 +36,5 @@ pin-mosi = <18>; pin-miso = <16>; pin-sclk = <21>; - pin-wp = ; - pin-hd = ; - max-transfer-size = <0>; }; }; diff --git a/Devices/waveshare-s3-touch-lcd-128/waveshare,s3-touch-lcd-128.dts b/Devices/waveshare-s3-touch-lcd-128/waveshare,s3-touch-lcd-128.dts index aaedb2f08..a4a8c1cf7 100644 --- a/Devices/waveshare-s3-touch-lcd-128/waveshare,s3-touch-lcd-128.dts +++ b/Devices/waveshare-s3-touch-lcd-128/waveshare,s3-touch-lcd-128.dts @@ -29,9 +29,6 @@ pin-mosi = <11>; pin-miso = <12>; pin-sclk = <10>; - pin-wp = ; - pin-hd = ; - max-transfer-size = <0>; }; sdcard_spi: spi1 { @@ -40,8 +37,5 @@ pin-mosi = <16>; pin-miso = <15>; pin-sclk = <17>; - pin-wp = ; - pin-hd = ; - max-transfer-size = <0>; }; }; diff --git a/Devices/waveshare-s3-touch-lcd-147/waveshare,s3-touch-lcd-147.dts b/Devices/waveshare-s3-touch-lcd-147/waveshare,s3-touch-lcd-147.dts index 544306b29..cdb67db73 100644 --- a/Devices/waveshare-s3-touch-lcd-147/waveshare,s3-touch-lcd-147.dts +++ b/Devices/waveshare-s3-touch-lcd-147/waveshare,s3-touch-lcd-147.dts @@ -29,9 +29,6 @@ pin-mosi = <39>; pin-miso = ; pin-sclk = <38>; - pin-wp = ; - pin-hd = ; - max-transfer-size = <0>; }; sdcard_spi: spi1 { @@ -40,8 +37,5 @@ pin-mosi = <15>; pin-miso = <17>; pin-sclk = <16>; - pin-wp = ; - pin-hd = ; - max-transfer-size = <0>; }; }; diff --git a/Devices/waveshare-s3-touch-lcd-43/waveshare,s3-touch-lcd-43.dts b/Devices/waveshare-s3-touch-lcd-43/waveshare,s3-touch-lcd-43.dts index 7400203c0..957eb36df 100644 --- a/Devices/waveshare-s3-touch-lcd-43/waveshare,s3-touch-lcd-43.dts +++ b/Devices/waveshare-s3-touch-lcd-43/waveshare,s3-touch-lcd-43.dts @@ -29,9 +29,6 @@ pin-mosi = <11>; pin-miso = <13>; pin-sclk = <12>; - pin-wp = ; - pin-hd = ; - max-transfer-size = <0>; }; uart1 { @@ -39,7 +36,5 @@ port = ; pin-tx = <43>; pin-rx = <44>; - pin-cts = ; - pin-rts = ; }; }; diff --git a/Devices/wireless-tag-wt32-sc01-plus/wireless-tag,wt32-sc01-plus.dts b/Devices/wireless-tag-wt32-sc01-plus/wireless-tag,wt32-sc01-plus.dts index f96775ffe..ca0144509 100644 --- a/Devices/wireless-tag-wt32-sc01-plus/wireless-tag,wt32-sc01-plus.dts +++ b/Devices/wireless-tag-wt32-sc01-plus/wireless-tag,wt32-sc01-plus.dts @@ -28,8 +28,5 @@ pin-mosi = <40>; pin-miso = <38>; pin-sclk = <39>; - pin-wp = ; - pin-hd = ; - max-transfer-size = <0>; }; }; diff --git a/Documentation/ideas.md b/Documentation/ideas.md index 41c63a426..ed7fed5bb 100644 --- a/Documentation/ideas.md +++ b/Documentation/ideas.md @@ -12,8 +12,6 @@ ## Higher Priority - Make a root device type so it can be discovered more easily. -- DTS/yaml: Consider support for default values. -- DTS: throw custom exceptions and catch them to show cleaner error messages. - When device.py selects a new device, it should automatically delete the build dirs (build/, cmake-*/) when it detects that the platform has changed. - Add font design tokens such as "regular", "title" and "smaller". Perhaps via the LVGL kernel module. - Add kernel listening mechanism so that the root device init can be notified when a device becomes available: @@ -69,8 +67,6 @@ ## Lower Priority -- Rename `Lock::lock()` and `Lock::unlock()` to `Lock::acquire()` and `Lock::release()`? -- Implement system suspend that turns off the screen - The boot button on some devices can be used as GPIO_NUM_0 at runtime - Localize all apps - Support hot-plugging SD card (note: this is not possible if they require the CS pin hack) diff --git a/Firmware/CMakeLists.txt b/Firmware/CMakeLists.txt index 85d632d79..2327ea82e 100644 --- a/Firmware/CMakeLists.txt +++ b/Firmware/CMakeLists.txt @@ -51,7 +51,7 @@ add_custom_target(AlwaysRun add_custom_command( OUTPUT "${GENERATED_DIR}/devicetree.c" "${GENERATED_DIR}/devicetree.h" - COMMAND pip install lark pyyaml + COMMAND pip install lark==1.3.1 pyyaml==6.0.3 COMMAND python "${CMAKE_SOURCE_DIR}/Buildscripts/DevicetreeCompiler/compile.py" "${DEVICETREE_LOCATION}" "${GENERATED_DIR}" WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" diff --git a/Platforms/PlatformEsp32/Bindings/espressif,esp32-i2c.yaml b/Platforms/PlatformEsp32/Bindings/espressif,esp32-i2c.yaml index 553fbf805..fff784b74 100644 --- a/Platforms/PlatformEsp32/Bindings/espressif,esp32-i2c.yaml +++ b/Platforms/PlatformEsp32/Bindings/espressif,esp32-i2c.yaml @@ -7,16 +7,20 @@ compatible: "espressif,esp32-i2c" properties: port: type: int + required: true description: | The port number, defined by i2c_port_t. Depending on the hardware, these values are available: I2C_NUM_0, I2C_NUM_1, LP_I2C_NUM_0 clock-frequency: type: int + required: true description: Initial clock frequency in Hz pin-sda: type: int + required: true pin-scl: type: int + required: true pin-sda-pull-up: type: bool description: enable internal pull-up resistor for SDA pin diff --git a/Platforms/PlatformEsp32/Bindings/espressif,esp32-i2s.yaml b/Platforms/PlatformEsp32/Bindings/espressif,esp32-i2s.yaml index ee2712934..c3d3732a3 100644 --- a/Platforms/PlatformEsp32/Bindings/espressif,esp32-i2s.yaml +++ b/Platforms/PlatformEsp32/Bindings/espressif,esp32-i2s.yaml @@ -21,13 +21,14 @@ properties: description: WS pin pin-data-out: type: int - required: true + default: GPIO_PIN_NONE description: DATA OUT pin pin-data-in: type: int - required: true + default: GPIO_PIN_NONE description: DATA IN pin pin-mclk: type: int - required: true + required: false + default: GPIO_PIN_NONE description: MCLK pin diff --git a/Platforms/PlatformEsp32/Bindings/espressif,esp32-spi.yaml b/Platforms/PlatformEsp32/Bindings/espressif,esp32-spi.yaml index d6555dbc1..ab3f1db23 100644 --- a/Platforms/PlatformEsp32/Bindings/espressif,esp32-spi.yaml +++ b/Platforms/PlatformEsp32/Bindings/espressif,esp32-spi.yaml @@ -13,11 +13,11 @@ properties: Defined by spi_host_device_t (e.g. SPI2_HOST, SPI3_HOST). pin-mosi: type: int - required: true + default: GPIO_PIN_NONE description: MOSI (Data 0) pin pin-miso: type: int - required: true + default: GPIO_PIN_NONE description: MISO (Data 1) pin pin-sclk: type: int @@ -25,12 +25,15 @@ properties: description: Clock pin pin-wp: type: int + default: GPIO_PIN_NONE description: WP (Data 2) pin pin-hd: type: int + default: GPIO_PIN_NONE description: HD (Data 3) pin max-transfer-size: type: int + default: 0 description: | Data transfer size limit in bytes. 0 means the platform decides the limit. diff --git a/Platforms/PlatformEsp32/Bindings/espressif,esp32-uart.yaml b/Platforms/PlatformEsp32/Bindings/espressif,esp32-uart.yaml index f39b11c64..c6a077e74 100644 --- a/Platforms/PlatformEsp32/Bindings/espressif,esp32-uart.yaml +++ b/Platforms/PlatformEsp32/Bindings/espressif,esp32-uart.yaml @@ -21,7 +21,9 @@ properties: description: RX pin pin-cts: type: int + default: GPIO_PIN_NONE description: CTS pin pin-rts: type: int + default: GPIO_PIN_NONE description: RTS pin