Difference between revisions of "AOM-3841 SPI CN1&SPI)CN2&CN2 I2C——I2C/SPI"
From ESS-WIKI
Xingxing.li (talk | contribs) (Created page with " == '''I2C Pin Header''' == '''AOM-3841 has two I2C-PIN-Header channels.''' === '''CN2_I2C''' === {| border="1" cellpadding="1" cellspacing="1" style="width: 409px;" |- | c...") |
Xingxing.li (talk | contribs) |
||
| (3 intermediate revisions by the same user not shown) | |||
| Line 34: | Line 34: | ||
| style="width: 38px;" | | | style="width: 38px;" | | ||
| style="width: 203px;" | 1.8V Source | | style="width: 203px;" | 1.8V Source | ||
| + | |} | ||
| + | |||
| + | === '''CN4_I2C''' === | ||
| + | |||
| + | {| border="1" cellpadding="1" cellspacing="1" style="width: 409px;" | ||
| + | |- | ||
| + | | colspan="4" style="width: 399px;" | '''CN4 CN4 Connector Pin Definition''' | ||
| + | |- | ||
| + | | style="width: 61px;" | '''Pin''' | ||
| + | | style="width: 92px;" | '''Signal''' | ||
| + | | style="width: 36px;" | '''I/O''' | ||
| + | | style="width: 197px;" | '''Description''' | ||
| + | |- | ||
| + | | style="width: 61px;" | 1 | ||
| + | | style="width: 92px;" | GND | ||
| + | | style="width: 36px;" | | ||
| + | | style="width: 197px;" | Ground | ||
| + | |- | ||
| + | | style="width: 61px;" | 2 | ||
| + | | style="width: 92px;" | I2C1_DATA | ||
| + | | style="width: 36px;" | I/O | ||
| + | | style="width: 197px;" | I2C1 Data | ||
| + | |- | ||
| + | | style="width: 61px;" | 3 | ||
| + | | style="width: 92px;" | I2C1_CLK | ||
| + | | style="width: 36px;" | I | ||
| + | | style="width: 197px;" | I2C0 clock input from host. | ||
| + | |- | ||
| + | | style="width: 61px;" | 4 | ||
| + | | style="width: 92px;" | +V1.8 | ||
| + | | style="width: 36px;" | | ||
| + | | style="width: 197px;" | 1.8V Source | ||
|} | |} | ||
| Line 70: | Line 102: | ||
# i2ctransfer -y 7 w4@0x53 0x1f 0xf0 0x22 0x33 | # i2ctransfer -y 7 w4@0x53 0x1f 0xf0 0x22 0x33 | ||
# i2ctransfer -y 7 w2@0x53 0x1f 0xf0 r2 | # i2ctransfer -y 7 w2@0x53 0x1f 0xf0 r2 | ||
| − | 0x22 0x33 | + | 0x22 0x33 |
</pre> | </pre> | ||
| + | |||
| + | [[File:AOM-3841 I2C function.png|RTENOTITLE]] | ||
| + | <pre># i2cdetect -y 7 | ||
| + | # i2ctransfer -y 7 w4@0x57 0x1f 0xf0 0x22 0x33 | ||
| + | # i2ctransfer -y 7 w2@0x57 0x1f 0xf0 r2 | ||
| + | 0x22 0x33</pre> | ||
| + | |||
| + | [[File:AOM-3841 I2C function1.png|RTENOTITLE]] | ||
| + | |||
| + | == '''SPI PIN Header''' == | ||
| + | |||
| + | AOM-3841 has two SPI-PIN-Header channels. SPIs on AOM-DB3500 have multifunctions, change to SPI PIN Header. | ||
| + | |||
| + | === '''SPI_CN1''' === | ||
| + | |||
| + | {| border="1" cellpadding="1" cellspacing="1" | ||
| + | |- | ||
| + | | colspan="4" | '''SPI_CN1 Connector Pin Definition''' | ||
| + | |- | ||
| + | | '''Pin''' | ||
| + | | '''Signal''' | ||
| + | | '''I/O''' | ||
| + | | '''Description''' | ||
| + | |- | ||
| + | | 1 | ||
| + | | +V1.8 | ||
| + | | | ||
| + | | Power Supply | ||
| + | |- | ||
| + | | 2 | ||
| + | | GND | ||
| + | | | ||
| + | | Ground | ||
| + | |- | ||
| + | | 3 | ||
| + | | SPI1_CS0# | ||
| + | | I | ||
| + | | SPI1Chip Select Inpu | ||
| + | |- | ||
| + | | 4 | ||
| + | | SPI1_CLK | ||
| + | | I | ||
| + | | SPI1 Serial Clock Input | ||
| + | |- | ||
| + | | 5 | ||
| + | | SPI1_MISO | ||
| + | | I | ||
| + | | SPI1 Master Out Slave in | ||
| + | |- | ||
| + | | 6 | ||
| + | | SPI1_MOSI | ||
| + | | O | ||
| + | | SPI1 Master In Slave Out | ||
| + | |- | ||
| + | | 7 | ||
| + | | NA | ||
| + | | | ||
| + | | Not Applicable | ||
| + | |- | ||
| + | | 8 | ||
| + | | SPI1_CS1# | ||
| + | | I | ||
| + | | SPI Chip Select Input | ||
| + | |} | ||
| + | |||
| + | === '''SPI_CN2''' === | ||
| + | |||
| + | {| border="1" cellpadding="1" cellspacing="1" | ||
| + | |- | ||
| + | | colspan="4" | '''SPI_CN2 Connector Pin Definition''' | ||
| + | |- | ||
| + | | '''Pin''' | ||
| + | | '''Signal''' | ||
| + | | '''I/O''' | ||
| + | | '''Description''' | ||
| + | |- | ||
| + | | 1 | ||
| + | | +V1.8 | ||
| + | | | ||
| + | | Power Supply | ||
| + | |- | ||
| + | | 2 | ||
| + | | GND | ||
| + | | | ||
| + | | Ground | ||
| + | |- | ||
| + | | 3 | ||
| + | | SPI0_CS0# | ||
| + | | I | ||
| + | | SPI0Chip Select Inpu | ||
| + | |- | ||
| + | | 4 | ||
| + | | SPI0_CLK | ||
| + | | I | ||
| + | | SPI0 Serial Clock Input | ||
| + | |- | ||
| + | | 5 | ||
| + | | SPI0_MISO | ||
| + | | I | ||
| + | | SPI0 Master Out Slave in | ||
| + | |- | ||
| + | | 6 | ||
| + | | SPI0_MOSI | ||
| + | | O | ||
| + | | SPI0 Master In Slave Out | ||
| + | |- | ||
| + | | 7 | ||
| + | | NA | ||
| + | | | ||
| + | | Not Applicable | ||
| + | |- | ||
| + | | 8 | ||
| + | | SPI0_CS1# | ||
| + | | I | ||
| + | | SPI Chip Select Input | ||
| + | |} | ||
| | ||
| + | |||
| + | === '''Jumper Setting:''' === | ||
| + | |||
| + | {| border="1" cellpadding="1" cellspacing="1" style="width: 472px;" | ||
| + | |- | ||
| + | | colspan="2" style="width: 462px;" | '''SPI Select''' | ||
| + | |- | ||
| + | | style="width: 102px;" | Pin | ||
| + | | style="width: 354px;" | Function | ||
| + | |- | ||
| + | | style="width: 102px;" | J6(1-2) | ||
| + | | style="width: 354px;" | Switch SPI0 to the SPI1 flash on the baseboard. | ||
| + | |- | ||
| + | | style="width: 102px;" | J6(2-3) | ||
| + | | style="width: 354px;" | SPI0 is switched to the baseboard SPI_CN2 | ||
| + | |- | ||
| + | | style="width: 102px;" | J5(1-2) | ||
| + | | style="width: 354px;" | Switch from SPI1 to SPI2 flash | ||
| + | |- | ||
| + | | style="width: 102px;" | J5(2-3) | ||
| + | | style="width: 354px;" | SPI1 is switched to SPI_CN1 | ||
| + | |} | ||
| + | |||
| + | === '''<span style="font-size: 13px;">Using EG70 Test Board to read SPI flash.</span>''' === | ||
| + | |||
| + | Test one SPI port alternatively: | ||
| + | <pre># cat /proc/mtd | grep –c mtd01</pre> | ||
| + | |||
| + | Test two SPI ports at the same time: | ||
| + | <pre># cat /proc/mtd | grep -c mtd11 | ||
| + | </pre> | ||
| + | |||
| + | === '''RK Tool Test:''' === | ||
| + | <pre># /tools/test/adv/spi/spi_test.sh 0 | ||
| + | # /tools/test/adv/spi/spi_test.sh 1</pre> | ||
| + | |||
| + | [[File:AOM-3841 SPI function1.png|RTENOTITLE]] | ||
Latest revision as of 08:10, 19 March 2026
Contents
I2C Pin Header
AOM-3841 has two I2C-PIN-Header channels.
CN2_I2C
| CN2 CN2 Connector Pin Definition | |||
| Pin | Signal | I/O | Description |
| 1 | GND | Ground | |
| 2 | I2C0_DATA | I/O | I2C0 Data |
| 3 | I2C0_CLK | I | I2C0 clock input from host. |
| 4 | +V1.8 | 1.8V Source | |
CN4_I2C
| CN4 CN4 Connector Pin Definition | |||
| Pin | Signal | I/O | Description |
| 1 | GND | Ground | |
| 2 | I2C1_DATA | I/O | I2C1 Data |
| 3 | I2C1_CLK | I | I2C0 clock input from host. |
| 4 | +V1.8 | 1.8V Source | |
Number
| I2C-PIN-Header | |||
| I2C Number | Bus Number | I2C Address | AOM-DB3500 Number |
| I2C0 | 0 | 0x53 | CN2 |
| I2C1 | 7 | 0x57 | CN4 |
# i2cdetect -y 0 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- 0c -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- UU -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- 53 -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- 71 -- -- -- -- -- -- # i2cdetect -y 7 # i2ctransfer -y 7 w4@0x53 0x1f 0xf0 0x22 0x33 # i2ctransfer -y 7 w2@0x53 0x1f 0xf0 r2 0x22 0x33
# i2cdetect -y 7 # i2ctransfer -y 7 w4@0x57 0x1f 0xf0 0x22 0x33 # i2ctransfer -y 7 w2@0x57 0x1f 0xf0 r2 0x22 0x33
SPI PIN Header
AOM-3841 has two SPI-PIN-Header channels. SPIs on AOM-DB3500 have multifunctions, change to SPI PIN Header.
SPI_CN1
| SPI_CN1 Connector Pin Definition | |||
| Pin | Signal | I/O | Description |
| 1 | +V1.8 | Power Supply | |
| 2 | GND | Ground | |
| 3 | SPI1_CS0# | I | SPI1Chip Select Inpu |
| 4 | SPI1_CLK | I | SPI1 Serial Clock Input |
| 5 | SPI1_MISO | I | SPI1 Master Out Slave in |
| 6 | SPI1_MOSI | O | SPI1 Master In Slave Out |
| 7 | NA | Not Applicable | |
| 8 | SPI1_CS1# | I | SPI Chip Select Input |
SPI_CN2
| SPI_CN2 Connector Pin Definition | |||
| Pin | Signal | I/O | Description |
| 1 | +V1.8 | Power Supply | |
| 2 | GND | Ground | |
| 3 | SPI0_CS0# | I | SPI0Chip Select Inpu |
| 4 | SPI0_CLK | I | SPI0 Serial Clock Input |
| 5 | SPI0_MISO | I | SPI0 Master Out Slave in |
| 6 | SPI0_MOSI | O | SPI0 Master In Slave Out |
| 7 | NA | Not Applicable | |
| 8 | SPI0_CS1# | I | SPI Chip Select Input |
Jumper Setting:
| SPI Select | |
| Pin | Function |
| J6(1-2) | Switch SPI0 to the SPI1 flash on the baseboard. |
| J6(2-3) | SPI0 is switched to the baseboard SPI_CN2 |
| J5(1-2) | Switch from SPI1 to SPI2 flash |
| J5(2-3) | SPI1 is switched to SPI_CN1 |
Using EG70 Test Board to read SPI flash.
Test one SPI port alternatively:
# cat /proc/mtd | grep –c mtd01
Test two SPI ports at the same time:
# cat /proc/mtd | grep -c mtd11
RK Tool Test:
# /tools/test/adv/spi/spi_test.sh 0 # /tools/test/adv/spi/spi_test.sh 1


