Skip to content

Commit

Permalink
[#41544] Add PythonPeripherals for tegra210 memory controller and i2c
Browse files Browse the repository at this point in the history
  • Loading branch information
p-woj committed Apr 12, 2023
1 parent c5990a8 commit 648ef46
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions dts2repl/dts2repl.py
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,14 @@ def generate(args):
indent.append('size: 0x100')
indent.append('initable: false')
indent.append('script: "request.value = 0xf8"')
elif compat == 'nvidia,tegra210-mc':
indent.append('size: 0x1000')
indent.append('initable: false')
indent.append('script: "request.value = 0x400"') # report 1024 MiB, 512 gets reserved as carveout
elif compat == 'nvidia,tegra210-i2c':
indent.append('size: 0x100')
indent.append('initable: false')
indent.append('script: "request.value = 8<<4 | 1"')
elif model == 'Python.PythonPeripheral':
indent.append('size: 0x1000')
indent.append('initable: true')
Expand Down
2 changes: 2 additions & 0 deletions dts2repl/models.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@
"ns16550a": "UART.NS16550",

"nvidia,tegra20-uart": "UART.NS16550",
"nvidia,tegra210-mc": "Python.PythonPeripheral",
"nvidia,tegra210-i2c": "Python.PythonPeripheral",

"nxp,flexpwm": "Timers.IMXRT_PWM",
"nxp,imx-code-bus": "Memory.MappedMemory",
Expand Down

0 comments on commit 648ef46

Please sign in to comment.