Skip to content

Commit

Permalink
soc/cores/i2c: add dts support
Browse files Browse the repository at this point in the history
Will require target integration
  • Loading branch information
Andrew Dennison committed Jul 28, 2024
1 parent e7111a5 commit 715098f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion litex/soc/cores/i2c.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 *

Expand Down Expand Up @@ -203,6 +204,10 @@ def __init__(self, clock_width):
# ("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)
Expand Down

0 comments on commit 715098f

Please # to comment.