temporarily rename spi to mspi and quadspi to mquadspi
[pinmux.git] / src / spec / m_class.py
1 #!/usr/bin/env python
2
3 from spec.base import PinSpec
4
5
6 def pinspec():
7 pinbanks = {'A': (16, 4),
8 'B': (28, 4),
9 'C': (24, 4),
10 'D': (24, 4),
11 'E': (24, 4),
12 'F': (10, 4),
13 'G': (32, 4),
14 }
15 fixedpins = {
16 'DDR3': [
17 'SDQ0', 'SDQ1', 'SDQ2', 'SDQ3',
18 'SDQ4', 'SDQ5', 'SDQ6', 'SDQ7',
19 'SDQ8', 'SDQ9', 'SDQ10', 'SDQ11',
20 'SDQ12', 'SDQ13', 'SDQ14', 'SDQ15',
21 'SDQ16', 'SDQ17', 'SDQ18', 'SDQ19',
22 'SDQ20', 'SDQ21', 'SDQ22', 'SDQ23',
23 'SDQ24', 'SDQ25', 'SDQ26', 'SDQ27',
24 'SDQ28', 'SDQ29', 'SDQ30', 'SDQ31',
25 'SVREF0', 'SVREF1', 'SVREF2', 'SVREF3',
26 'SDQS0', 'SDQS0#', 'SDQS1', 'SDQS1#',
27 'SDQS2', 'SDQS2#', 'SDQS3', 'SDQS3#',
28 'SDQM0', 'SDQM1', 'SDQM2', 'SDQM3',
29 'SCK#', 'SCK', 'SCKE0', 'SCKE1',
30 'SA0', 'SA1', 'SA2', 'SA3',
31 'SA4', 'SA5', 'SA6', 'SA7',
32 'SA8', 'SA9', 'SA10', 'SA11',
33 'SA12', 'SA13', 'SA14',
34 'SBA0', 'SBA1', 'SBA2',
35 'SWE', 'SCAS', 'SRAS', 'SCS0',
36 'SCS1', 'SZQ', 'SRST',
37 'SDBG0', 'SDBG1', 'ADBG',
38 'ODT0', 'ODT1'],
39 'CTRL_SYS': [
40 'TEST', 'JTAG_SEL', 'UBOOT_SEL',
41 'NMI#', 'RESET#', 'CLK24M_IN', 'CLK24M_OUT',
42 'PLLTEST', 'PLLREGIO', 'PLLVP25',
43 'PLLDV', 'PLLVREG', 'PLLGND',
44 ],
45 'POWER_DRAM': [
46 'VCC0_DRAM', 'VCC1_DRAM', 'VCC2_DRAM', 'VCC3_DRAM',
47 'VCC4_DRAM', 'VCC5_DRAM', 'VCC6_DRAM', 'VCC7_DRAM',
48 'VCC8_DRAM', 'VCC9_DRAM',
49 'GND0_DRAM', 'GND1_DRAM', 'GND2_DRAM', 'GND3_DRAM',
50 'GND4_DRAM', 'GND5_DRAM', 'GND6_DRAM', 'GND7_DRAM',
51 'GND8_DRAM', 'GND9_DRAM',
52 ],
53 'POWER_CPU': [
54 'VDD0_CPU', 'VDD1_CPU', 'VDD2_CPU',
55 'VDD3_CPU', 'VDD4_CPU', 'VDD5_CPU',
56 'GND0_CPU', 'GND1_CPU', 'GND2_CPU',
57 'GND3_CPU', 'GND4_CPU', 'GND5_CPU',
58 ],
59 'POWER_DLL': [
60 'VDD0_DLL', 'VDD1_DLL', 'VDD2_DLL',
61 'GND0_DLL', 'GND1_DLL', 'GND2_DLL',
62 ],
63 'POWER_INT': [
64 'VDD0_INT', 'VDD1_INT', 'VDD2_INT', 'VDD3_INT', 'VDD4_INT',
65 'VDD5_INT', 'VDD6_INT', 'VDD7_INT', 'VDD8_INT', 'VDD9_INT',
66 'GND0_INT', 'GND1_INT', 'GND2_INT', 'GND3_INT', 'GND4_INT',
67 'GND5_INT', 'GND6_INT', 'GND7_INT', 'GND8_INT', 'GND9_INT',
68 ],
69 'POWER_GPIO': [
70 'VDD_GPIOA', 'VDD_GPIOB', 'VDD_GPIOC',
71 'VDD_GPIOD', 'VDD_GPIOE', 'VDD_GPIOF',
72 'VDD_GPIOG',
73 'GND_GPIOA', 'GND_GPIOB', 'GND_GPIOC',
74 'GND_GPIOD', 'GND_GPIOE', 'GND_GPIOF',
75 'GND_GPIOG',
76 ]}
77
78 function_names = {'EINT': 'External Interrupt',
79 'FB': 'MC68k FlexBus',
80 'IIS': 'I2S Audio',
81 'JTAG': 'JTAG (multiplexed in 2 places)',
82 'LCD': '24-pin RGB/TTL LCD',
83 'RG': 'RGMII Ethernet',
84 'EMMC': 'eMMC 1/2/4/8 pin',
85 'PWM': 'PWM (pulse-width modulation)',
86 'MMC0': 'SD/MMC 0',
87 'MMC1': 'SD/MMC 1',
88 'MMC2': 'SD/MMC 2',
89 'MSPI0': 'SPI (Serial Peripheral Interface) 0',
90 'MSPI1': 'SPI (Serial Peripheral Interface) 1',
91 'MQSPI': 'Quad SPI (Serial Peripheral Interface) 1',
92 'TWI0': 'I2C 1',
93 'TWI1': 'I2C 2',
94 'TWI2': 'I2C 3',
95 'QUART0': 'UART (TX/RX/CTS/RTS) 0',
96 'QUART1': 'UART (TX/RX/CTS/RTS) 1',
97 'UART0': 'UART (TX/RX) 0',
98 'UART1': 'UART (TX/RX) 1',
99 'UART2': 'UART (TX/RX) 2',
100 'ULPI0': 'ULPI (USB Low Pin-count) 1',
101 'ULPI1': 'ULPI (USB Low Pin-count) 2',
102 'ULPI2': 'ULPI (USB Low Pin-count) 3',
103 }
104
105 ps = PinSpec(pinbanks, fixedpins, function_names,
106 {'lcd': {'bus': 'fastbus',
107 'mmap': [['Cfg', 0x20000, 10]
108 ]},
109 'jtag': {'bus': 'fastbus'},
110 'fb': {'bus': 'fastbus'},
111 })
112
113 # Bank A, 0-15
114 ps.gpio("", ('A', 0), 0, 0, 16)
115 ps.mspi("0", ('A', 0), 3)
116 ps.uartfull("1", ('A', 0), 2)
117 ps.i2c("0", ('A', 4), 2)
118 ps.emmc("", ('A', 0), 1)
119 #ps.uart("0", ('A', 14), 1)
120 ps.mspi("1", ('A', 6), 2)
121 ps.eint("", ('A', 10), 1, start=0, limit=6)
122 ps.eint("", ('A', 4), 3, start=0, limit=6)
123 ps.sdmmc("0", ('A', 10), 2)
124 ps.jtag("", ('A', 10), 3)
125 ps.uart("0", ('A', 14), 3)
126
127 # Bank B, 16-47
128 ps.gpio("", ('B', 0), 0, 0, 28)
129 ps.rgbttl("0", ('B', 0), 1)
130 ps.mspi("0", ('B', 12), 2)
131 ps.mquadspi("", ('B', 4), 2, limit=4)
132 ps.uart("1", ('B', 16), 2)
133 ps.i2c("2", ('B', 18), 2)
134 ps.pwm("", ('B', 9), 2, start=0, limit=1)
135 ps.pwm("", ('B', 20), 2, start=1, limit=2)
136 ps.sdmmc("0", ('B', 22), 2)
137 ps.eint("", ('B', 0), 3, start=6, limit=4)
138 ps.flexbus2("", ('B', 4), 3)
139 ps.i2c("0", ('B', 0), 2)
140 ps.uart("0", ('B', 2), 2)
141 ps.uart("2", ('B', 10), 2)
142
143 # Bank C, 48-71
144 ps.gpio("", ("C", 0), 0, 0, 24)
145 ps.ulpi("0", ('C', 0), 1)
146 ps.ulpi("1", ('C', 12), 1)
147 ps.mspi("1", ('C', 8), 2)
148 #ps.mspi("1", ('C', 28), 2)
149 ps.uartfull("0", ('C', 20), 3)
150 ps.eint("", ('C', 0), 3, start=10, limit=8)
151 ps.jtag("", ('C', 8), 3)
152 ps.eint("", ('C', 12), 3, start=22, limit=8)
153 ps.uart("0", ('C', 22), 2)
154 ps.i2s("", ('C', 13), 2)
155 ps.pwm("", ('C', 21), 2, start=2, limit=1)
156
157 # Bank D, 72-96
158
159 # see comment in spec.interfaces.PinGen, this is complicated.
160 flexspec = {
161 'FB_TS': ('FB_ALE', 2),
162 'FB_CS2': ('FB_BWE2', 2),
163 'FB_A0': ('FB_BWE2', 3),
164 'FB_CS3': ('FB_BWE3', 2),
165 'FB_A1': ('FB_BWE3', 3),
166 'FB_TBST': ('FB_OE', 2),
167 'FB_TSIZ0': ('FB_BWE0', 2),
168 'FB_TSIZ1': ('FB_BWE1', 2),
169 }
170 #ps.mcu8080("", 72, 1)
171 ps.gpio("", ('D', 0), 0, 0, 24)
172 ps.flexbus1("", ('D', 0), 1, spec=flexspec)
173 ps.i2c("1", ('D', 8), 3)
174 ps.pwm("", ('D', 21), 1, start=0, limit=3)
175 ps.i2c("0", ('D', 10), 3)
176 ps.i2c("2", ('D', 19), 2)
177 ps.uartfull("0", ('D', 0), 2)
178 ps.uart("1", ('D', 21), 2)
179 ps.uart("2", ('D', 12), 2)
180 ps.eint("", ('D', 19), 3, start=18, limit=4)
181 ps.eint("", ('D', 23), 3, start=9, limit=1)
182 ps.eint("", ('D', 13), 3, start=5, limit=4)
183 ps.eint("", ('D', 0), 3, start=30, limit=2)
184 ps.i2c("1", ('D', 2), 3)
185 ps.sdmmc("1", ('D', 4), 2)
186
187 # Bank E
188 ps.gpio("", ('E', 0), 0, 0, 24)
189 ps.flexbus2("", ('E', 0), 1)
190 ps.sdmmc("1", ('E', 0), 2)
191 ps.sdmmc("2", ('E', 8), 2)
192 ps.mquadspi("", ('E', 18), 2)
193 ps.uartfull("1", ('E', 14), 2)
194 ps.i2c("1", ('E', 6), 2)
195 ps.eint("", ('E', 0), 3, start=10, limit=8)
196 ps.eint("", ('E', 8), 3, start=22, limit=6)
197 ps.emmc("", ('E', 14), 3)
198
199 # Bank F
200 ps.gpio("", ('F', 0), 0, 0, 10)
201 ps.i2s("", ('F', 0), 1)
202 ps.i2c("0", ('F', 6), 2)
203 ps.pwm("", ('F', 8), 2, start=0, limit=1)
204 ps.pwm("", ('F', 9), 2, start=1, limit=1)
205 ps.uart("2", ('F', 8), 1)
206 ps.sdmmc("2", ('F', 0), 2)
207 ps.eint("", ('F', 0), 3, start=18, limit=4)
208 ps.pwm("", ('F', 4), 3, start=2, limit=1)
209 ps.eint("", ('F', 5), 3, start=7, limit=1)
210 ps.eint("", ('F', 6), 3, start=28, limit=4)
211
212 # Bank G
213 ps.gpio("", ('G', 0), 0, 0, 32)
214 ps.rgmii("", ('G', 0), 1)
215 ps.ulpi("2", ('G', 20), 1)
216 ps.rgbttl("1", ('G', 0), 2)
217 ps.mquadspi("", ('G', 26), 3)
218 ps.flexbus2("", ('G', 0), 3)
219 ps.sdmmc("1", ('G', 24), 3, limit=2)
220 ps.sdmmc("1", ('G', 28), 2, start=2)
221
222 # EOMA68 scenario. not totally complete (some GPIO needed for PMIC)
223 # One interface to be connected to the MCU to give RTC and boot/dbg
224 # VBUS_EN, OTG_ID etc. are all not included below, there is plenty
225 # of spare GPIO.
226
227 eoma68 = ['B1:LCD/22', 'ULPI0/8', 'ULPI1', 'EMMC', 'MMC0', 'UART1',
228 'TWI2', 'MSPI1', 'E2:MMC1', ]
229 eoma68_eint = ['EINT_16', 'EINT_17', 'EINT_18', 'EINT_19']
230 eoma68_pwm = ['D1:PWM_2']
231 descriptions = {
232 'EMMC': 'internal (on Card)',
233 'MMC0': 'user-facing: internal (on Card), multiplexed with JTAG0\n'
234 'and UART0, for debug purposes',
235 'TWI2': 'EOMA68-compliance: must be entirely free of devices.\n'
236 'Address 0x51 used (externally) for EOMA68 EEPROM Id',
237 'E2:MMC1': 'EOMA68-compliance',
238 'MSPI1': 'EOMA68-compliance',
239 'UART1': 'EOMA68-compliance',
240 'B1:LCD/22': 'EOMA68-compliance, 18-bit RGB/TTL LCD',
241 'ULPI0/8': 'user-facing: internal (on Card), USB-OTG ULPI PHY',
242 'ULPI1': 'EOMA68-compliance: dual USB2 Host ULPI PHY'
243 }
244
245 ps.add_scenario("EOMA68", eoma68, eoma68_eint, eoma68_pwm, descriptions)
246
247 # Industrial scenario. not totally complete (some GPIO needed for PMIC)
248 # One interface to be connected to the MCU to give RTC, boot/dbg,
249 # option of CAN Bus, ADC, DAC, OWB, more GPIO, more PWM etc. etc.
250 # Focus is on getting as many UARTs, SPIs and TWIs as possible.
251 # OTG_ID (if to be used) would require dropping some functions in order
252 # to free up GPIO. LCD could be reduced to 15-bit (freeing 3).
253 # EMMC could be reduced to 4-bit-wide, used as SD/MMC (freeing 4).
254 # QSPI could be used in 1-bit (MOSI/MISO) mode (freeing up 2 more).
255
256 industrial = ['D1:FB/17', 'E1:FB/8', 'B1:LCD/22', 'ULPI0/8', 'ULPI1/8',
257 'EMMC', 'B2:MMC0',
258 'JTAG', 'A3:UART0', 'E2:QUART1', 'C3:QUART0',
259 'F2:TWI0', 'D2:TWI1', 'D2:TWI2', 'MSPI1', 'MQSPI', 'F2:MMC2']
260 industrial_pwm = ['F2:PWM_0', 'F2:PWM_1', 'D1:PWM_2']
261 industrial_eint = ['EINT_24', 'EINT_25', 'EINT_26', 'EINT_27',
262 'EINT_20', 'EINT_21', 'EINT_22', 'EINT_23']
263
264 ps.add_scenario("Industrial", industrial, industrial_eint,
265 industrial_pwm, None)
266
267 # Industrial scenario, using an SPI-based LCD instead of RGB/TTL
268 # not totally complete (some GPIO needed for PMIC)
269 # One interface to be connected to the MCU to give RTC, boot/dbg,
270 # option of CAN Bus, ADC, DAC, OWB, more GPIO, more PWM etc. etc.
271 # Focus is on getting as many UARTs, SPIs and TWIs as possible,
272 # leaving some GPIO spare from the RGB/TTL bank (SPI CS#)
273 # also possibility of freeing up FlexBus CS# with a little reorg.
274
275 industrial = ['D1:FB/17', 'E1:FB/8', 'B2:SPI0', 'ULPI0/8', 'ULPI1/8',
276 'EMMC', 'B2:MMC0',
277 'JTAG',
278 'A3:UART0', 'E2:QUART1', 'C3:QUART0', 'B2:UART2', 'B2:UART1',
279 'F2:TWI0', 'D2:TWI1', 'D2:TWI2', 'MSPI1', 'MQSPI', 'F2:MMC2']
280 industrial_pwm = ['F2:PWM_0', 'F2:PWM_1', 'D1:PWM_2']
281 industrial_eint = ['EINT_24', 'EINT_25', 'EINT_26', 'EINT_27',
282 'EINT_20', 'EINT_21', 'EINT_22', 'EINT_23']
283 ind_descriptions = {
284 'B2:SPI0': 'Used for 320x240 or 640x480 etc. SPI-based LCD.\n'
285 'Frees up large numbers of GPIO from RGB/TTL bank'
286 }
287
288 ps.add_scenario("Industrial with SPI-LCD",
289 industrial, industrial_eint, industrial_pwm,
290 ind_descriptions)
291
292 # Smartphone / Tablet - basically the same thing
293
294 tablet = ['B1:LCD/22', 'ULPI0/8', 'ULPI1/8',
295 'EMMC', 'MMC0',
296 'F1:IIS', # I2C Audio
297 'TWI1', # I2C Audio
298 'E2:QUART1', # WIFI/BT
299 'E2:MMC1', # WIFI
300 'C3:QUART0', # GPS
301 'D2:UART1',
302 'D2:UART2',
303 'D3:TWI0', 'D2:TWI2', 'MSPI1', 'MQSPI']
304 tablet_pwm = ['F2:PWM_0', # LCD_BACKLIGHT
305 'F2:PWM_1', 'D1:PWM_2']
306 tablet_eint = ['EINT_24', # BT_HOST_WAKE
307 'EINT_25', # WIFI_HOST_WAKE
308 'EINT_26', # CTP_INT
309 'EINT_27', # GSENSOR_INT
310 'EINT_8', # GPS_INT
311 'EINT_7', # TILT_SENSOR_INT
312 'EINT_22', # COMPASS_INT
313 'EINT_23', # MCU_INT
314 'EINT_16', # PMIC_INT
315 'EINT_17', # PWR_BUTTON_INT
316 'EINT_30', # OTG_ID
317 'EINT_31',
318 ]
319 descriptions = {
320 'B1:LCD/22':
321 'RGB/TTL LCD, 800x480 or use SN75LVDS83b for up to 1440x900',
322 'EMMC': 'eMMC: main internal storage',
323 'ULPI0/8': 'USB-OTG, connect to ULPI OTG PHY (for charging)\n'
324 'as well as USB Host or USB Device',
325 'ULPI1/8': 'USB2 Host, connect to ULPI PHY w/and 4-port USB2 Hub\n'
326 'for example GL850G or FE1.1. '
327 'Connects to 2/3/4G/LTE Modem, 2x USB-Camera (VC0345)',
328 'MMC0': 'internal, multiplexed with JTAG0\n'
329 'and UART0, for debug purposes',
330 'F1:IIS': 'I2C Audio, connect to AC97 Audio IC',
331 'TWI1': 'Connect to AC97 Audio IC',
332 'E2:QUART1': 'Connect to BT on AP6234/AP6335',
333 'E2:MMC1': 'Connect to WIFI on AP6234/AP6335',
334 'MQSPI': 'Boot Storage (connection to companion / debug / boot MCU)\n'
335 'Only actually needs MISO/MOSI, bootstrap loader v. small\n'
336 'Bootstrap loader checks eMMC, USB-OTG, SD/MMC, SPI, etc.',
337 'MSPI1': 'Spare? SPI, connect to higher-speed sensor?',
338 'D2:UART1': 'Spare? UART (or 2 extra GPIO / EINT)',
339 'D2:UART2': 'Spare? UART (or 2 extra GPIO)',
340 'D3:TWI0': 'Connect to PMIC',
341 'D2:TWI2': 'Connect to sensors (Trackpad? CTP GSENSOR TILT COMPASS)',
342 'GPIO': '9 spare GPIO pins for miscellaneous functions:\n'
343 'wake-up of BT, WIFI, LCD power, sensor power etc.\n'
344 '4 GPIO may be needed for PWM Audio from Modem.\n'
345 'LED lights for camera will be needed.\n'
346 'Some phones may have clam-shell or lid switch.\n'
347 'Some Modems have spare GPIO (over AT commandset).\n'
348 'AXP209 PMIC has 4x GPIO, accessible over I2C.\n'
349 'MSPI1, UART1-4, PWM1-2 may also be spare (10 extra GPIO).\n'
350 'If more needed, companion MCU may be used (48+ pin variant)\n'
351 'which also includes ADC, DAC, more PWM etc.',
352 'F2:PWM_0': 'LCD Backlight',
353 'F2:PWM_1': 'Spare? PWM (or extra GPIO / EINT)',
354 'D1:PWM_2': 'Spare? PWM (or extra GPIO / EINT)',
355 'EINT_24': 'BT_HOST_WAKE',
356 'EINT_25': 'WIFI_HOST_WAKE',
357 'EINT_26': 'CTP_INT',
358 'EINT_27': 'GSENSOR_INT',
359 'EINT_8': 'GPS_INT',
360 'EINT_7': 'TILT_SENSOR_INT',
361 'EINT_22': 'COMPASS_INT',
362 'EINT_23': 'MCU_INT',
363 'EINT_16': 'PMIC_INT',
364 'EINT_17': 'PWR_BUTTON_INT',
365 'EINT_30': 'OTG_ID',
366 'EINT_31': 'Spare?',
367 }
368
369 ps.add_scenario("Smartphone / Tablet",
370 tablet, tablet_eint, tablet_pwm,
371 descriptions)
372
373 # Laptop
374
375 laptop = ['D1:FB/17', 'E1:FB/8', 'B1:LCD/22', 'ULPI0/8', 'ULPI1/8',
376 'EMMC', 'MMC0',
377 'F1:IIS', # I2C Audio
378 'TWI1', # I2C Audio
379 'E2:QUART1', # WIFI/BT
380 'E2:MMC2', # WIFI
381 'D2:TWI2', 'MQSPI']
382 laptop_pwm = ['F2:PWM_0', # LCD_BACKLIGHT
383 ]
384 laptop_eint = ['EINT_20', # BT_HOST_WAKE
385 'EINT_21', # WIFI_HOST_WAKE
386 'EINT_9', # MCU_INT
387 'EINT_31', # PMIC_INT
388 ]
389 descriptions = {
390 'D1:FB/17': 'FlexBus. Connect to DM9000 or AX99896A MCU-style Bus\n'
391 '10/100 Ethernet PHY.',
392 'E1:FB/8': 'FlexBus bus bits 8-15, needed to make a 16-bit bus width',
393 'B1:LCD/22': 'RGB/TTL LCD, use SN75LVDS83b for '
394 'LVDS or SMMC2828 for MIPI,\n'
395 'or a Chrontel CH7039, CH7038, CH7034 or CH7018 for dual\n'
396 'display output (eDP/LVDS and HDMI/VGA) '
397 'conversion.',
398 'EMMC': 'eMMC: main internal storage',
399 'ULPI0/8': 'USB-OTG, connect to ULPI OTG PHY (for charging)\n'
400 'as well as USB Host or USB Device',
401 'ULPI1/8': 'USB2 Host, connect to ULPI PHY w/and 4-port USB2 Hub\n'
402 'for example GL850G or FE1.1. '
403 'Connects to USB-Camera (VC0345 and 3x external USB Ports)',
404 'MMC0': 'internal, multiplexed with JTAG0\n'
405 'and UART0, for debug purposes',
406 'F1:IIS': 'I2C Audio, connect to AC97 Audio IC',
407 'TWI1': 'Connect to AC97 Audio IC',
408 'E2:QUART1': 'Connect to BT on AP6234/AP6335',
409 'E2:MMC2': 'Connect to WIFI on AP6234/AP6335',
410 'MQSPI': 'Boot Storage (connection to companion / debug / boot MCU)\n'
411 'Only actually needs MISO/MOSI, bootstrap loader v. small\n'
412 'Bootstrap loader checks eMMC, USB-OTG, SD/MMC, SPI, etc.\n'
413 'MCU implements keyboard-matrix for keyboard (also trackpad?)',
414 'D2:TWI2': 'Connect to PMIC',
415 'GPIO': 'Plenty of spare GPIO pins for miscellaneous functions\n'
416 'MCU EINT-capable GPIO may be used to generate extra EINTs\n'
417 'on the single MCU_INT line, if really needed',
418 'F2:PWM_0': 'LCD Backlight',
419 'EINT_20': 'BT_HOST_WAKE',
420 'EINT_21': 'WIFI_HOST_WAKE',
421 'EINT_9': 'MCU_INT',
422 'EINT_31': 'PMIC_INT',
423 }
424 ps.add_scenario("Laptop / Netbook",
425 laptop, laptop_eint, laptop_pwm,
426 descriptions)
427
428 # IoT
429
430 iot = ['B1:LCD', 'ULPI1/8', 'ULPI0/8',
431 'EMMC', 'MMC0',
432 'F1:IIS', # I2C Audio
433 #'TWI1', # I2C Audio
434 'C3:QUART0', # HSPA UART
435 'E2:QUART1', # BT UART
436 'C2:SPI1', # HSPI SPI
437 'E2:MMC2', # WIFI
438 'D3:TWI0', # sensors CTP,
439 'D2:TWI2', 'MQSPI']
440 iot_pwm = ['F2:PWM_0', # LCD_BACKLIGHT
441 ]
442 iot_eint = ['EINT_5', # 'HSPA_MST_RDY',
443 'EINT_6', # 'HSPA_SL_RDY',
444 'EINT_7', # 'HSPA_RING',
445 'EINT_8', # 'WL_PMU_EN',
446 'EINT_9', # HSPA_GPIO1
447 'EINT_10', # IR_DT
448 'EINT_11', # 'BT_PCM_CLK',
449 'EINT_12', # 'BT_PCM_DIN',
450 'EINT_13', # 'BT_PCM_SYNC',
451 'EINT_14', # 'BT_PCM_DOUT',
452 'EINT_16', # 'USB_DRVVBUS',
453 'EINT_17', # 'USB_VBUSDET',
454 'EINT_21', # 'USB_ID',
455 'EINT_30', # 'CTP_INT',
456 'EINT_31', # 'SD_DET#',
457 ]
458 descriptions = {
459 'B1:LCD':
460 'RGB/TTL LCD, use SN75LVDS83b for LVDS or SMMC2828 for MIPI,\n'
461 'or a Chrontel CH7039, CH7038, CH7034 or CH7018 for dual\n'
462 'display output (eDP/LVDS and HDMI/VGA) '
463 'conversion.',
464 'EMMC': 'eMMC: main internal storage',
465 'F1:IIS': 'I2C Audio, connect to AC97 Audio IC',
466 'ULPI1/8': 'USB-OTG, connect to ULPI OTG PHY (for charging)\n'
467 'as well as USB Host or USB Device',
468 'ULPI0/8': 'USB2 Host, connect to ULPI PHY',
469 'MMC0': 'internal, multiplexed with JTAG0\n'
470 'and UART0, for debug purposes',
471 'C3:QUART0': 'Connect to HSPA UART',
472 'E2:QUART1': 'Connect to BT UART',
473 'E2:MMC2': 'Connect to WIFI',
474 'C2:SPI1': 'HSPA SPI',
475 'MQSPI': 'Boot Storage (connection to companion / debug / boot MCU)\n'
476 'Only actually needs MISO/MOSI, bootstrap loader v. small\n'
477 'Bootstrap loader checks eMMC, USB-OTG, SD/MMC, SPI, etc.\n'
478 'MCU implements keyboard-matrix for keyboard (also trackpad?)',
479 'D2:TWI2': 'Connect to PMIC',
480 'D3:TWI0': 'Connect to sensors CTP',
481 'GPIO': 'Plenty of spare GPIO pins for miscellaneous functions\n'
482 'MCU EINT-capable GPIO may be used to generate extra EINTs\n'
483 'on the single MCU_INT line, if really needed',
484 'F2:PWM_0': 'LCD Backlight',
485 'GPIOD_D4': 'WL_WAKE_AP',
486 'GPIOD_D5': 'BT_WAKE_AP',
487 'GPIOD_D6': 'AP_WAKE_BT',
488 'GPIOD_D7': 'AP_CK32KO',
489 'GPIOD_D8': 'HSPA_PWRON',
490 'GPIOD_D9': 'BT_RST_N',
491 'GPIOE_E5': 'HSPA_ON_OFF',
492 'GPIOD_D2': 'HSPA_SHUTDOWN',
493 'GPIOD_D3': 'CTP_RST',
494 'GPIOD_D12': 'LCD_RDN',
495 'GPIOD_D17': 'LCD_WRN',
496 'GPIOD_D18': 'LCD_RS',
497 'GPIOD_D21': 'LCD_CSN',
498
499 'EINT_5': 'HSPA_MST_RDY',
500 'EINT_6': 'HSPA_SL_RDY',
501 'EINT_7': 'HSPA_RING',
502 'EINT_8': 'WL_PMU_EN',
503 'EINT_9': 'HSPA_GPIO1',
504 'EINT_10': 'IR_DT',
505 'EINT_11': 'BT_PCM_CLK',
506 'EINT_12': 'BT_PCM_DIN',
507 'EINT_13': 'BT_PCM_SYNC',
508 'EINT_14': 'BT_PCM_DOUT',
509
510 'EINT_16': 'USB_DRVVBUS',
511 'EINT_17': 'USB_VBUSDET',
512 'EINT_21': 'USB_ID',
513 'EINT_30': 'CTP_INT',
514 'EINT_31': 'SD_DETN',
515 }
516 ps.add_scenario("IoT",
517 iot, iot_eint, iot_pwm,
518 descriptions)
519
520 return ps