mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
soc/cores/i2c: add dts support
Will require target integration
This commit is contained in:
parent
e7111a5ee3
commit
715098f2f1
1 changed files with 6 additions and 1 deletions
|
@ -10,7 +10,8 @@
|
|||
# SPDX-License-Identifier: BSD-2-Clause
|
||||
|
||||
from migen import *
|
||||
from litex.gen import *
|
||||
|
||||
from litex.gen import LiteXModule, dts_property
|
||||
from litex.soc.interconnect import wishbone
|
||||
from litex.soc.interconnect.csr_eventmanager import *
|
||||
|
||||
|
@ -203,6 +204,10 @@ class I2CMasterMachine(LiteXModule):
|
|||
# ("idle", 1),
|
||||
# ])
|
||||
class I2CMaster(LiteXModule):
|
||||
dts_compatible = "litex,cores-i2c" # litex,i2c is used for bitbang.I2CMaster()
|
||||
dts_properties = dts_property("#address-cells", 1)
|
||||
dts_properties += dts_property("#size-cells", 0)
|
||||
|
||||
def __init__(self, pads, bus=None):
|
||||
if bus is None:
|
||||
bus = wishbone.Interface(data_width=32)
|
||||
|
|
Loading…
Reference in a new issue