From 560edd3265adcb24211e2c541abd2ccf5aaea65e Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Fri, 30 Mar 2018 10:58:45 +0100 Subject: [PATCH] rename m_class spec jtag and ulpi numbers --- src/spec/m_class.py | 120 ++++++++++++++++++++++---------------------- 1 file changed, 60 insertions(+), 60 deletions(-) diff --git a/src/spec/m_class.py b/src/spec/m_class.py index 84639bc..57536a5 100644 --- a/src/spec/m_class.py +++ b/src/spec/m_class.py @@ -28,14 +28,14 @@ def pinspec(): pinouts.gpio("", ('A', 0), "A", 0, 16, 0) pinouts.spi("0", ('A', 0), "A", 3) pinouts.uartfull("1", ('A', 0), "A", 2) - pinouts.i2c("1", ('A', 4), "A", 2) + pinouts.i2c("0", ('A', 4), "A", 2) pinouts.emmc("", ('A', 0), "A", 1) #pinouts.uart("0", ('A', 14), "A", 1) pinouts.spi("1", ('A', 6), "A", 2) pinouts.eint("", ('A', 10), "A", 0, 6) pinouts.eint("", ('A', 4), "A", 0, 6, mux=3) pinouts.sdmmc("0", ('A', 10), "A", 2) - pinouts.jtag("1", ('A', 10), "A", 3) + pinouts.jtag("0", ('A', 10), "A", 3) pinouts.uart("0", ('A', 14), "A", 3) # Bank B, 16-47 @@ -44,25 +44,25 @@ def pinspec(): pinouts.spi("0", ('B', 12), "B", 2) pinouts.quadspi("", ('B', 4), "B", 2, limit=4) pinouts.uart("1", ('B', 16), "B", 2) - pinouts.i2c("3", ('B', 18), "B", 2) + pinouts.i2c("2", ('B', 18), "B", 2) pinouts.pwm("", ('B', 9), "B", 0, 1, mux=2) pinouts.pwm("", ('B', 20), "B", 1, 2, mux=2) pinouts.sdmmc("0", ('B', 22), "B", 2) pinouts.eint("", ('B', 0), "B", 6, 4, mux=3) pinouts.flexbus2("", ('B', 4), "B", 3) - pinouts.i2c("1", ('B', 0), "B", 2) + pinouts.i2c("0", ('B', 0), "B", 2) pinouts.uart("0", ('B', 2), "B", 2) pinouts.uart("2", ('B', 10), "B", 2) # Bank C, 48-71 pinouts.gpio("", ("C", 0), "C", 0, 24, 0) - pinouts.ulpi("1", ('C', 0), "C", 1) - pinouts.ulpi("2", ('C', 12), "C", 1) + pinouts.ulpi("0", ('C', 0), "C", 1) + pinouts.ulpi("1", ('C', 12), "C", 1) pinouts.spi("1", ('C', 8), "C", 2) #pinouts.spi("1", ('C', 28), "C", 2) pinouts.uartfull("0", ('C', 20), "C", 3) pinouts.eint("", ('C', 0), "C", 10, 8, mux=3) - pinouts.jtag("2", ('C', 8), "C", 3) + pinouts.jtag("1", ('C', 8), "C", 3) pinouts.eint("", ('C', 12), "C", 22, 8, mux=3) pinouts.uart("0", ('C', 22), "C", 2) pinouts.i2s("", ('C', 13), "C", 2) @@ -93,10 +93,10 @@ def pinspec(): #pinouts.mcu8080("", 72, "D", 1) pinouts.gpio("", ('D', 0), "D", 0, 24, 0) pinouts.flexbus1("", ('D', 0), "D", 1, spec=flexspec) - pinouts.i2c("2", ('D', 8), "D", 3) + pinouts.i2c("1", ('D', 8), "D", 3) pinouts.pwm("", ('D', 21), "D", 0, 3, mux=1) - pinouts.i2c("1", ('D', 10), "D", 3) - pinouts.i2c("3", ('D', 19), "D", 2) + pinouts.i2c("0", ('D', 10), "D", 3) + pinouts.i2c("2", ('D', 19), "D", 2) pinouts.uartfull("0", ('D', 0), "D", 2) pinouts.uart("1", ('D', 21), "D", 2) pinouts.uart("2", ('D', 13), "D", 2) @@ -104,7 +104,7 @@ def pinspec(): pinouts.eint("", ('D', 23), "D", 9, 1, mux=3) pinouts.eint("", ('D', 13), "D", 5, 4, mux=3) pinouts.eint("", ('D', 0), "D", 30, 2, mux=3) - pinouts.i2c("2", ('D', 2), "D", 3) + pinouts.i2c("1", ('D', 2), "D", 3) pinouts.sdmmc("1", ('D', 4), "D", 2) # Bank E @@ -114,7 +114,7 @@ def pinspec(): pinouts.sdmmc("2", ('E', 8), "E", 2) pinouts.quadspi("", ('E', 18), "E", 2) pinouts.uartfull("1", ('E', 14), "E", 2) - pinouts.i2c("2", ('E', 6), "E", 2) + pinouts.i2c("1", ('E', 6), "E", 2) pinouts.eint("", ('E', 0), "E", 10, 8, mux=3) pinouts.eint("", ('E', 8), "E", 22, 6, mux=3) pinouts.emmc("", ('E', 14), "E", 3) @@ -122,7 +122,7 @@ def pinspec(): # Bank F pinouts.gpio("", ('F', 0), "F", 0, 10, 0) pinouts.i2s("", ('F', 0), "F", 1) - pinouts.i2c("1", ('F', 6), "F", 2) + pinouts.i2c("0", ('F', 6), "F", 2) pinouts.pwm("", ('F', 8), "F", 0, 1, mux=2) pinouts.pwm("", ('F', 9), "F", 1, 1, mux=2) pinouts.uart("2", ('F', 8), "F", 1) @@ -135,7 +135,7 @@ def pinspec(): # Bank G pinouts.gpio("", ('G', 0), "G", 0, 32, 0) pinouts.rgmii("", ('G', 0), "G", 1) - pinouts.ulpi("3", ('G', 20), "G", 1) + pinouts.ulpi("2", ('G', 20), "G", 1) pinouts.rgbttl("1", ('G', 0), "G", 2) pinouts.quadspi("", ('G', 26), "G", 3) pinouts.flexbus2("", ('G', 0), "G", 3) @@ -343,8 +343,8 @@ auto-generated by [[pinouts.py]] function_names = {'EINT': 'External Interrupt', 'FB': 'MC68k FlexBus', 'IIS': 'I2S Audio', - 'JTAG1': 'JTAG (same as JTAG2, JTAG_SEL=LOW)', - 'JTAG2': 'JTAG (same as JTAG1, JTAG_SEL=HIGH)', + 'JTAG0': 'JTAG (same as JTAG1, JTAG_SEL=LOW)', + 'JTAG1': 'JTAG (same as JTAG0, JTAG_SEL=HIGH)', 'LCD': '24-pin RGB/TTL LCD', 'RG': 'RGMII Ethernet', 'MMC': 'eMMC 1/2/4/8 pin', @@ -355,17 +355,17 @@ auto-generated by [[pinouts.py]] 'SPI0': 'SPI (Serial Peripheral Interface) 0', 'SPI1': 'SPI (Serial Peripheral Interface) 1', 'QSPI': 'Quad SPI (Serial Peripheral Interface) 1', - 'TWI1': 'I2C 1', - 'TWI2': 'I2C 2', - 'TWI3': 'I2C 3', + 'TWI0': 'I2C 1', + 'TWI1': 'I2C 2', + 'TWI2': 'I2C 3', 'UARTQ0': 'UART (TX/RX/CTS/RTS) 0', 'UARTQ1': 'UART (TX/RX/CTS/RTS) 1', 'UART0': 'UART (TX/RX) 0', 'UART1': 'UART (TX/RX) 1', 'UART2': 'UART (TX/RX) 2', - 'ULPI1': 'ULPI (USB Low Pin-count) 1', - 'ULPI2': 'ULPI (USB Low Pin-count) 2', - 'ULPI3': 'ULPI (USB Low Pin-count) 3', + 'ULPI0': 'ULPI (USB Low Pin-count) 1', + 'ULPI1': 'ULPI (USB Low Pin-count) 2', + 'ULPI2': 'ULPI (USB Low Pin-count) 3', } fns = display_fns(bankspec, pinouts, function_names) @@ -383,22 +383,22 @@ auto-generated by [[pinouts.py]] # VBUS_EN, OTG_ID etc. are all not included below, there is plenty # of spare GPIO. - eoma68 = ['B1:LCD/22', 'ULPI1/8', 'ULPI2', 'MMC', 'SD0', 'UART1', - 'TWI3', 'SPI1', 'E2:SD1', ] + eoma68 = ['B1:LCD/22', 'ULPI0/8', 'ULPI1', 'MMC', 'SD0', 'UART1', + 'TWI2', 'SPI1', 'E2:SD1', ] eoma68_eint = ['EINT_16', 'EINT_17', 'EINT_18', 'EINT_19'] eoma68_pwm = ['D1:PWM_2'] descriptions = { 'MMC': 'internal (on Card)', - 'SD0': 'user-facing: internal (on Card), multiplexed with JTAG1\n' + 'SD0': 'user-facing: internal (on Card), multiplexed with JTAG0\n' 'and UART0, for debug purposes', - 'TWI3': 'EOMA68-compliance: must be entirely free of devices.\n' + 'TWI2': 'EOMA68-compliance: must be entirely free of devices.\n' 'Address 0x51 used (externally) for EOMA68 EEPROM Id', 'E2:SD1': 'EOMA68-compliance', 'SPI1': 'EOMA68-compliance', 'UART1': 'EOMA68-compliance', 'B1:LCD/22': 'EOMA68-compliance, 18-bit RGB/TTL LCD', - 'ULPI1/8': 'user-facing: internal (on Card), USB-OTG ULPI PHY', - 'ULPI2': 'EOMA68-compliance: dual USB2 Host ULPI PHY' + 'ULPI0/8': 'user-facing: internal (on Card), USB-OTG ULPI PHY', + 'ULPI1': 'EOMA68-compliance: dual USB2 Host ULPI PHY' } unused_pins = check_functions("EOMA68", bankspec, fns, pinouts, @@ -414,10 +414,10 @@ auto-generated by [[pinouts.py]] # MMC could be reduced to 4-bit-wide, used as SD/MMC (freeing 4). # QSPI could be used in 1-bit (MOSI/MISO) mode (freeing up 2 more). - industrial = ['D1:FB/17', 'E1:FB/8', 'B1:LCD/22', 'ULPI1/8', 'ULPI2/8', + industrial = ['D1:FB/17', 'E1:FB/8', 'B1:LCD/22', 'ULPI0/8', 'ULPI1/8', 'MMC', 'B2:SD0', - 'JTAG1', 'A3:UART0', 'E2:UARTQ1', 'C3:UART0', - 'F2:TWI1', 'D2:TWI2', 'D2:TWI3', 'SPI1', 'QSPI', 'F2:SD2'] + 'JTAG0', 'A3:UART0', 'E2:UARTQ1', 'C3:UART0', + 'F2:TWI0', 'D2:TWI1', 'D2:TWI2', 'SPI1', 'QSPI', 'F2:SD2'] industrial_pwm = ['F2:PWM_0', 'F2:PWM_1', 'D1:PWM_2'] industrial_eint = ['EINT_24', 'EINT_25', 'EINT_26', 'EINT_27', 'EINT_20', 'EINT_21', 'EINT_22', 'EINT_23'] @@ -433,11 +433,11 @@ auto-generated by [[pinouts.py]] # leaving some GPIO spare from the RGB/TTL bank (SPI CS#) # also possibility of freeing up FlexBus CS# with a little reorg. - industrial = ['D1:FB/17', 'E1:FB/8', 'B2:SPI0', 'ULPI1/8', 'ULPI2/8', + industrial = ['D1:FB/17', 'E1:FB/8', 'B2:SPI0', 'ULPI0/8', 'ULPI1/8', 'MMC', 'B2:SD0', - 'JTAG1', + 'JTAG0', 'A3:UART0', 'E2:UARTQ1', 'C3:UART0', 'B2:UART2', 'B2:UART1', - 'F2:TWI1', 'D2:TWI2', 'D2:TWI3', 'SPI1', 'QSPI', 'F2:SD2'] + 'F2:TWI0', 'D2:TWI1', 'D2:TWI2', 'SPI1', 'QSPI', 'F2:SD2'] industrial_pwm = ['F2:PWM_0', 'F2:PWM_1', 'D1:PWM_2'] industrial_eint = ['EINT_24', 'EINT_25', 'EINT_26', 'EINT_27', 'EINT_20', 'EINT_21', 'EINT_22', 'EINT_23'] @@ -452,16 +452,16 @@ auto-generated by [[pinouts.py]] # Smartphone / Tablet - basically the same thing - tablet = ['B1:LCD/22', 'ULPI1/8', 'ULPI2/8', + tablet = ['B1:LCD/22', 'ULPI0/8', 'ULPI1/8', 'MMC', 'SD0', 'F1:IIS', # I2C Audio - 'TWI2', # I2C Audio + 'TWI1', # I2C Audio 'E2:UARTQ1', # WIFI/BT 'E2:SD1', # WIFI 'C3:UARTQ0', # GPS 'D2:UART1', 'D2:UART2', - 'D3:TWI1', 'D2:TWI3', 'SPI1', 'QSPI'] + 'D3:TWI0', 'D2:TWI2', 'SPI1', 'QSPI'] tablet_pwm = ['F2:PWM_0', # LCD_BACKLIGHT 'F2:PWM_1', 'D1:PWM_2'] tablet_eint = ['EINT_24', # BT_HOST_WAKE @@ -481,15 +481,15 @@ auto-generated by [[pinouts.py]] 'B1:LCD/22': 'RGB/TTL LCD, 800x480 or use SN75LVDS83b for up to 1440x900', 'MMC': 'eMMC: main internal storage', - 'ULPI1/8': 'USB-OTG, connect to ULPI OTG PHY (for charging)\n' + 'ULPI0/8': 'USB-OTG, connect to ULPI OTG PHY (for charging)\n' 'as well as USB Host or USB Device', - 'ULPI2/8': 'USB2 Host, connect to ULPI PHY w/and 4-port USB2 Hub\n' + 'ULPI1/8': 'USB2 Host, connect to ULPI PHY w/and 4-port USB2 Hub\n' 'for example GL850G or FE1.1. ' 'Connects to 2/3/4G/LTE Modem, 2x USB-Camera (VC0345)', - 'SD0': 'internal, multiplexed with JTAG1\n' + 'SD0': 'internal, multiplexed with JTAG0\n' 'and UART0, for debug purposes', 'F1:IIS': 'I2C Audio, connect to AC97 Audio IC', - 'TWI2': 'Connect to AC97 Audio IC', + 'TWI1': 'Connect to AC97 Audio IC', 'E2:UARTQ1': 'Connect to BT on AP6234/AP6335', 'E2:SD1': 'Connect to WIFI on AP6234/AP6335', 'QSPI': 'Boot Storage (connection to companion / debug / boot MCU)\n' @@ -498,8 +498,8 @@ auto-generated by [[pinouts.py]] 'SPI1': 'Spare? SPI, connect to higher-speed sensor?', 'D2:UART1': 'Spare? UART (or 2 extra GPIO / EINT)', 'D2:UART2': 'Spare? UART (or 2 extra GPIO)', - 'D3:TWI1': 'Connect to PMIC', - 'D2:TWI3': 'Connect to sensors (Trackpad? CTP GSENSOR TILT COMPASS)', + 'D3:TWI0': 'Connect to PMIC', + 'D2:TWI2': 'Connect to sensors (Trackpad? CTP GSENSOR TILT COMPASS)', 'GPIO': '9 spare GPIO pins for miscellaneous functions:\n' 'wake-up of BT, WIFI, LCD power, sensor power etc.\n' '4 GPIO may be needed for PWM Audio from Modem.\n' @@ -533,13 +533,13 @@ auto-generated by [[pinouts.py]] # Laptop - laptop = ['D1:FB/17', 'E1:FB/8', 'B1:LCD/22', 'ULPI1/8', 'ULPI2/8', + laptop = ['D1:FB/17', 'E1:FB/8', 'B1:LCD/22', 'ULPI0/8', 'ULPI1/8', 'MMC', 'SD0', 'F1:IIS', # I2C Audio - 'TWI2', # I2C Audio + 'TWI1', # I2C Audio 'E2:UARTQ1', # WIFI/BT 'E2:SD2', # WIFI - 'D2:TWI3', 'QSPI'] + 'D2:TWI2', 'QSPI'] laptop_pwm = ['F2:PWM_0', # LCD_BACKLIGHT ] laptop_eint = ['EINT_20', # BT_HOST_WAKE @@ -557,22 +557,22 @@ auto-generated by [[pinouts.py]] 'display output (eDP/LVDS and HDMI/VGA) ' 'conversion.', 'MMC': 'eMMC: main internal storage', - 'ULPI1/8': 'USB-OTG, connect to ULPI OTG PHY (for charging)\n' + 'ULPI0/8': 'USB-OTG, connect to ULPI OTG PHY (for charging)\n' 'as well as USB Host or USB Device', - 'ULPI2/8': 'USB2 Host, connect to ULPI PHY w/and 4-port USB2 Hub\n' + 'ULPI1/8': 'USB2 Host, connect to ULPI PHY w/and 4-port USB2 Hub\n' 'for example GL850G or FE1.1. ' 'Connects to USB-Camera (VC0345 and 3x external USB Ports)', - 'SD0': 'internal, multiplexed with JTAG1\n' + 'SD0': 'internal, multiplexed with JTAG0\n' 'and UART0, for debug purposes', 'F1:IIS': 'I2C Audio, connect to AC97 Audio IC', - 'TWI2': 'Connect to AC97 Audio IC', + 'TWI1': 'Connect to AC97 Audio IC', 'E2:UARTQ1': 'Connect to BT on AP6234/AP6335', 'E2:SD2': 'Connect to WIFI on AP6234/AP6335', 'QSPI': 'Boot Storage (connection to companion / debug / boot MCU)\n' 'Only actually needs MISO/MOSI, bootstrap loader v. small\n' 'Bootstrap loader checks eMMC, USB-OTG, SD/MMC, SPI, etc.\n' 'MCU implements keyboard-matrix for keyboard (also trackpad?)', - 'D2:TWI3': 'Connect to PMIC', + 'D2:TWI2': 'Connect to PMIC', 'GPIO': 'Plenty of spare GPIO pins for miscellaneous functions\n' 'MCU EINT-capable GPIO may be used to generate extra EINTs\n' 'on the single MCU_INT line, if really needed', @@ -589,16 +589,16 @@ auto-generated by [[pinouts.py]] # IoT - iot = ['B1:LCD', 'ULPI2/8', 'ULPI1/8', + iot = ['B1:LCD', 'ULPI1/8', 'ULPI0/8', 'MMC', 'SD0', 'F1:IIS', # I2C Audio - #'TWI2', # I2C Audio + #'TWI1', # I2C Audio 'C3:UARTQ0', # HSPA UART 'E2:UARTQ1', # BT UART 'C2:SPI1', # HSPI SPI 'E2:SD2', # WIFI - 'D3:TWI1', # sensors CTP, - 'D2:TWI3', 'QSPI'] + 'D3:TWI0', # sensors CTP, + 'D2:TWI2', 'QSPI'] iot_pwm = ['F2:PWM_0', # LCD_BACKLIGHT ] iot_eint = ['EINT_5', # 'HSPA_MST_RDY', @@ -625,10 +625,10 @@ auto-generated by [[pinouts.py]] 'conversion.', 'MMC': 'eMMC: main internal storage', 'F1:IIS': 'I2C Audio, connect to AC97 Audio IC', - 'ULPI2/8': 'USB-OTG, connect to ULPI OTG PHY (for charging)\n' + 'ULPI1/8': 'USB-OTG, connect to ULPI OTG PHY (for charging)\n' 'as well as USB Host or USB Device', - 'ULPI1/8': 'USB2 Host, connect to ULPI PHY', - 'SD0': 'internal, multiplexed with JTAG1\n' + 'ULPI0/8': 'USB2 Host, connect to ULPI PHY', + 'SD0': 'internal, multiplexed with JTAG0\n' 'and UART0, for debug purposes', 'C3:UARTQ0': 'Connect to HSPA UART', 'E2:UARTQ1': 'Connect to BT UART', @@ -638,8 +638,8 @@ auto-generated by [[pinouts.py]] 'Only actually needs MISO/MOSI, bootstrap loader v. small\n' 'Bootstrap loader checks eMMC, USB-OTG, SD/MMC, SPI, etc.\n' 'MCU implements keyboard-matrix for keyboard (also trackpad?)', - 'D2:TWI3': 'Connect to PMIC', - 'D3:TWI1': 'Connect to sensors CTP', + 'D2:TWI2': 'Connect to PMIC', + 'D3:TWI0': 'Connect to sensors CTP', 'GPIO': 'Plenty of spare GPIO pins for miscellaneous functions\n' 'MCU EINT-capable GPIO may be used to generate extra EINTs\n' 'on the single MCU_INT line, if really needed', -- 2.30.2