ab957b6ae8dc6c596ecf820c6ec3c30d80b449ea
3 from spec
.base
import PinSpec
5 from spec
.ifaceprint
import display
, display_fns
, check_functions
6 from spec
.ifaceprint
import display_fixed
22 function_names
= {'EINT': 'External Interrupt',
23 'FB': 'MC68k FlexBus',
25 'JTAG0': 'JTAG (same as JTAG1, JTAG_SEL=LOW)',
26 'JTAG1': 'JTAG (same as JTAG0, JTAG_SEL=HIGH)',
27 'LCD': '24-pin RGB/TTL LCD',
28 'RG': 'RGMII Ethernet',
29 'MMC': 'eMMC 1/2/4/8 pin',
30 'PWM': 'PWM (pulse-width modulation)',
34 'SPI0': 'SPI (Serial Peripheral Interface) 0',
35 'SPI1': 'SPI (Serial Peripheral Interface) 1',
36 'QSPI': 'Quad SPI (Serial Peripheral Interface) 1',
40 'QUART0': 'UART (TX/RX/CTS/RTS) 0',
41 'QUART1': 'UART (TX/RX/CTS/RTS) 1',
42 'UART0': 'UART (TX/RX) 0',
43 'UART1': 'UART (TX/RX) 1',
44 'UART2': 'UART (TX/RX) 2',
45 'ULPI0': 'ULPI (USB Low Pin-count) 0',
46 'ULPI1': 'ULPI (USB Low Pin-count) 1',
47 'ULPI2': 'ULPI (USB Low Pin-count) 2',
50 ps
= PinSpec(pinbanks
, fixedpins
, function_names
,
59 ps
.gpio("", ('A', 0), 0, 0, 3)
60 #ps.uart("", ('A', 0), 1)
61 ps
.uart("0", ('A', 0), 1)
62 ps
.uart("1", ('A', 2), 1)
63 ps
.i2c("0", ('A', 1), 2)
64 ps
.i2c("0", ('A', 3), 3, limit
=1)
65 #ps.i2c("0", ('A', 1), 2)
66 #ps.i2c("1", ('A', 2), 4)
68 microtest
= ['UART0', 'TWI0', ]
76 'B1:LCD/22': '18-bit RGB/TTL LCD',
77 'ULPI0/8': 'user-facing: internal (on Card), USB-OTG ULPI PHY',
78 'ULPI1': 'dual USB2 Host ULPI PHY'
81 ps
.add_scenario("MicroTest", microtest
, microtest_eint
, microtest_pwm
,