Skip to content

Commit

Permalink
[#41544] Add xlnx,zynqmp-ipi-mailbox Python peripheral
Browse files Browse the repository at this point in the history
  • Loading branch information
p-woj committed Apr 12, 2023
1 parent cce29cd commit 51155e5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions dts2repl/dts2repl.py
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,16 @@ def generate(args):
indent.append('size: 0x100')
indent.append('initable: false')
indent.append('script: "request.value = 8<<4 | 1"')
elif compat == 'xlnx,zynqmp-ipi-mailbox':
# the address of the Xilinx ZynqMP IPI mailbox is defined in its child node
for child in node.nodes.values():
address = f'0x{child.unit_addr}'
break
else:
logging.info('ZynqMP mailbox has no children: {node}')
indent.append('size: 0x1000')
indent.append('initable: false')
indent.append('script: "request.value = {0x1e4: 0x10000}.get(request.offset, 0)"')
elif model == 'Python.PythonPeripheral':
indent.append('size: 0x1000')
indent.append('initable: true')
Expand Down
1 change: 1 addition & 0 deletions dts2repl/models.json
Original file line number Diff line number Diff line change
Expand Up @@ -171,5 +171,6 @@

"xlnx,xuartps": "UART.Cadence_UART",
"xlnx,zynq-slcr": "Python.PythonPeripheral",
"xlnx,zynqmp-ipi-mailbox": "Python.PythonPeripheral",
"xlnx,zynqmp-uart": "UART.Cadence_UART"
}

0 comments on commit 51155e5

Please sign in to comment.