zcu104: add I2C
This commit is contained in:
parent
b9ee3a797a
commit
ac1f1cd6a7
|
@ -43,6 +43,12 @@ _io = [
|
||||||
IOStandard("LVCMOS18")
|
IOStandard("LVCMOS18")
|
||||||
),
|
),
|
||||||
|
|
||||||
|
("i2c", 1,
|
||||||
|
Subsignal("sda", Pins("P12")),
|
||||||
|
Subsignal("scl", Pins("N12")),
|
||||||
|
IOStandard("LVCMOS33")
|
||||||
|
),
|
||||||
|
|
||||||
("ddram", 0,
|
("ddram", 0,
|
||||||
Subsignal("a", Pins(
|
Subsignal("a", Pins(
|
||||||
"AH16 AG14 AG15 AF15 AF16 AJ14 AH14 AF17",
|
"AH16 AG14 AG15 AF15 AF16 AJ14 AH14 AF17",
|
||||||
|
|
|
@ -16,6 +16,7 @@ from litex.soc.integration.soc_core import *
|
||||||
from litex.soc.integration.soc_sdram import *
|
from litex.soc.integration.soc_sdram import *
|
||||||
from litex.soc.integration.builder import *
|
from litex.soc.integration.builder import *
|
||||||
from litex.soc.cores.led import LedChaser
|
from litex.soc.cores.led import LedChaser
|
||||||
|
from litex.soc.cores.bitbang import I2CMaster
|
||||||
|
|
||||||
from litedram.modules import MTA4ATF51264HZ
|
from litedram.modules import MTA4ATF51264HZ
|
||||||
from litedram.phy import usddrphy
|
from litedram.phy import usddrphy
|
||||||
|
@ -77,6 +78,9 @@ class BaseSoC(SoCCore):
|
||||||
l2_cache_reverse = True
|
l2_cache_reverse = True
|
||||||
)
|
)
|
||||||
|
|
||||||
|
self.submodules.i2c = I2CMaster(platform.request("i2c", 1))
|
||||||
|
self.add_csr("i2c")
|
||||||
|
|
||||||
# Leds -------------------------------------------------------------------------------------
|
# Leds -------------------------------------------------------------------------------------
|
||||||
self.submodules.leds = LedChaser(
|
self.submodules.leds = LedChaser(
|
||||||
pads = Cat(*[platform.request("user_led", i) for i in range(4)]),
|
pads = Cat(*[platform.request("user_led", i) for i in range(4)]),
|
||||||
|
|
Loading…
Reference in New Issue