Skip to main content

Hardware Interface Specifications

Chip Block Diagram

rk3399 block diagram

Physical Photos

ROCK 4A interfaces

Interface Specifications

40-PIN GPIO Header

  • GPIO Voltage

RK3399 and OP1 have three IO voltage levels: 1.8V/3.0V/3.3V. The following are the default voltages:

GPIOVoltage LevelTolerance
GPIO3_C03.3V3.465V
ADC_IN01.8V1.98V
Other GPIO3.0V3.14V
  • GPIO Interface

The ROCK 4 series features a 40-pin expansion header with color-coded pins, compatible with most sensor applications on the market.

The following pinout applies to all products in the ROCK 4 series.

caution

Not all hardware functions can be enabled simultaneously. At any given time, a pin can only be assigned one hardware function.

GPIO numberFunction2Function1GPIOPin#Pin#GPIOFunction1Function2GPIO number
+3.3V
1
2
+5.0V
71I2C7_SDAGPIO2_A7
3
4
+5.0V
72I2C7_SCLGPIO2_B0
5
6
GND
75SPI2_CLKGPIO2_B3
7
8
GPIO4_C4
UART2_TXD
148
GND
9
10
GPIO4_C3
UART2_RXD
147
146PWM0GPIO4_C2
11
12
GPIO4_A3I2S1_SCLK131
150PWM1GPIO4_C6
13
14
GND
149SPDIF_TXGPIO4_C5
15
16
GPIO4_D2154
+3.3V
17
18
GPIO4_D4156
40UART4_TXD
SPI1_TXD
GPIO1_B0
19
20
GND
39UART4_RXD
SPI1_RXD
GPIO1_A7
21
22
GPIO4_D5157
41
SPI1_CLK
GPIO1_B1
23
24
GPIO1_B2
SPI1_CSn
42
GND
25
26
ADC_IN0
64I2C2_SDAGPIO2_A0
27
28
GPIO2_A1I2C2_CLK65
74I2C6_SCLSPI2_TXDGPIO2_B2
29
30
GND
73I2C6_SDASPI2_RXDGPIO2_B1
31
32
GPIO3_C0SPDIF_TXUART3_CTSn112
76SPI2_CSnGPIO2_B4
33
34
GND
133I2S1_LRCK_TXGPIO4_A5
35
36
GPIO4_A4I2S1_LRCK_RX132
158GPIO4_D6
37
38
GPIO4_A6I2S1_SDI134
GND
39
40
GPIO4_A7I2S1_SDO135
  • Notes about the 40-pin header

    • Functions marked in orange are the default functions for those pins.

    • All pins, except for power pins, are directly connected to the SoC.

    • Pins 3, 5, 27, 28, 29, and 31 are each connected to the 3.0V power supply through a 4.7K pull-up resistor.

    • Pin 7 is directly connected to the MIPI CSI pins on the board.

    • SPI

      • Pins 19, 21, 23, and 24 are also connected to the SPI flash memory pins on the board. If SPI flash memory is soldered on the ROCK 4 series board, the SPI function will not be available on the GPIO header.
    • UART

      • UART2 is enabled by default as the U-boot and Linux serial console. It can be used by selecting Rockpi4/dev/serial-console. To disable the serial console on UART2, select Rockpi4/hardware/devtree_overlays.

      • UART2 and UART4 support multiple baud rates, including but not limited to: 115200bps, 500000bps, 1500000bps, etc.

      • On some boards with onboard SPI flash memory soldered, the UART4 pins are used for SPI functionality.

    • For I2C-2 and I2C-7

      • We have tested using an I2C EEPROM device. You need to open the I2C device file first, then perform read or write operations.

eMMC Connector

PinNamePinName
1VCC_1V82VCC3V3_SYS
3VCC_1V84VCC3V3_SYS
5VCC_1V86VCC3V3_SYS
7VCC_1V88VCC3V3_SYS
9VCC_1V810GND
11GND12eMMC_RST
13GND14eMMC_CLK
15GND16eMMC_CMD
17GND18eMMC_D7
19GND20eMMC_D6
21GND22eMMC_D5
23GND24eMMC_D4
25GND26eMMC_D3
27GND28eMMC_D2
29GND30eMMC_D1
31GND32eMMC_D0
33NC34eMMC_DQS
35NC36NC
37NC38NC
3940NC
4142NC

HDMI

PinNamePinName
1HDMI_TX2P2GND
3HDMI_TX2N4HDMI_TX1P
5GND6HDMI_TX1N
7HDMI_TX0P8GND
9HDMI_TX0N10HDMI_TXCP
11GND12HDMI_TXCN
13PORT_CEC14NC
15DDC_SCL16DDC_SDA
17GND18VCC5V0_HDMI
19HDMI_HPD20GND
21GND22GND
23GND24

MicroSD

PinName
1SDMMC0_D2
2SDMMC0_D3
3SDMMC0_CMD
4VCC3V3_SYS
5SDMMC0_CLK
6GND
7SDMMC0_D0
8SDMMC0_D1
9SDMMC0_DET_L
10GND
11GND
12GND
13GND

MIPI CSI

PinName
1VCC_CAM
2I2C4_SCL
3I2C4_SDA
4CAM_MCLK
5CAM_GPIO1
6GND
7MIPI_RX0_CLKP
8MIPI_RX0_CLKN
9GND
10MIPI_RX0_D1P
11MIPI_RX0_D1N
12GND
13MIPI_RX0_D0P
14MIPI_RX0_D0N
15GND

MIPI DSI

PinName
1VCC_MIPI
2VCC_MIPI
3GND
4I2C_SDA_AUDIO
5I2C_SCL_AUDIO
6GND
7MIPI_TX/RX_D0P
8MIPI_TX/RX_D0N
9GND
10MIPI_TX/RX_CLKP
11MIPI_TX/RX_CLKN
12GND
13MIPI_TX/RX_D1P
14MIPI_TX/RX_D1N
15GND

PCIe

PinNamePinName
1GND2VCC3V3_PCIE
3GND4VCC3V3_PCIE
5PCIE_RX3_N6NC
7PCIE_RX3_P8NC
9GND10NC
11PCIE_TX3N12VCC3V3_PCIE
13PCIE_TX3P14VCC3V3_PCIE
15GND16VCC3V3_PCIE
17PCIE_RX2_N18VCC3V3_PCIE
19PCIE_RX2_P20NC
21GND22NC
23PCIE_TX2N24NC
25PCIE_TX2P26NC
27GND28NC
29PCIE_RX1_N30NC
31PCIE_RX1_P32NC
33GND34NC
35PCIE_TX1N36NC
37PCIE_TX1P38NC
39GND40NC
41PCIE_RX0_N42NC
43PCIE_RX0_P44NC
45GND46NC
47PCIE_TX0N48NC
49PCIE_TX0P50PCIE_PERST_L
51GND52PCIE_CLKREQ_L
53PCIE_REF_CLK_N54NC
55PCIE_REF_CLK_P56NC
57GND58NC
67NC68NC
69NC70VCC3V3_PCIE
71GND72VCC3V3_PCIE
73GND74VCC3V3_PCIE
75GND76GND
77GND

USB

  • USB 2.0
PinName
1HOST0_DP
2HOST0_DM
3TYPEC0_DP
4TYPEC0_DM
5TYPEC0_ID
6TYPEC0_U2VBUSDET
7GND
8HOST1_DP
9HOST1_DM
10USB3_DP
11USB3_DM
12NC
13NC
14GND
15VCC_0V9
16VCCA_1V8
17VCC3V3_SYS
  • USB 3.0
PinName
1USB3_SSTX1P
2USB3_SSTX1N
3USB3_SSRX1P
4USB3_SSRX1N
5NC
6NC
7NC
8NC
9NC
10NC
11NC
12NC
13NC
14NC
15NC
16NC
17NC
18GND
19VCC_0V9
20VCC_0V9
21VCCA_1V8
22VCC3V3_SYS