Merge pull request #1966 from maass-hamburg/dts_zepyhr_include_cpu

litex_json2dts_zephyr.py: include cpu
This commit is contained in:
enjoy-digital 2024-05-28 15:42:38 +02:00 committed by GitHub
commit 7a3b3dcfa2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 0 deletions

View File

@ -104,6 +104,10 @@ def dts_reg_names(regs):
def disabled_handler(name, parm, csr):
return indent('status = "disabled";\n')
def cpu_handler(name, parm, csr):
return indent("clock-frequency = <{}>;\n".format(
csr['constants']['config_clock_frequency']
))
def ram_handler(name, parm, csr):
mem_reg = {
@ -193,6 +197,10 @@ def peripheral_handler(name, parm, csr):
overlay_handlers = {
'cpu': {
'handler': cpu_handler,
'alias': 'cpu0',
},
'ctrl': {
'handler': peripheral_handler,
'alias': 'ctrl0',