Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rockpi S #1110

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ ARM
* [96Boards](../master/docs/96boards.md)
* [ADLINK IPi-SMARC ARM](../master/docs/adlink_ipi_arm.md)
* [Rock Pi 4](../master/docs/rockpi4.md)
* [Rock Pi S](../master/docs/rockpiS.md)

MIPS
---
Expand Down
47 changes: 41 additions & 6 deletions api/mraa/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,13 @@ typedef enum {
MRAA_MTK_OMEGA2 = 18, /**< MT7688 based Onion Omega2 board */
MRAA_IEI_TANK = 19, /**< IEI Tank System*/
MRAA_ROCKPI4 = 20, /**< Radxa ROCK PI 4 Models A/B/C */
MRAA_ADLINK_IPI = 21, /**< Adlink Industrial PI */
MRAA_ADLINK_LEC_AL = 22, /**< Adlink LEC-AL*/
MRAA_ADLINK_LEC_AL_AI = 23, /**< Adlink LEC-AL*/
MRAA_UPXTREME = 24, /**< The UPXTREME Board */
MRAA_INTEL_ILK = 25, /**< Intel Learning Kit */
MRAA_SIEMENS_IOT2050 = 26, /**< Siemens IOT2050 board */
MRAA_ROCKPIS = 21, /**< Radxa ROCK PI S */
MRAA_ADLINK_IPI = 22, /**< Adlink Industrial PI */
MRAA_ADLINK_LEC_AL = 23, /**< Adlink LEC-AL*/
MRAA_ADLINK_LEC_AL_AI = 24, /**< Adlink LEC-AL*/
MRAA_UPXTREME = 25, /**< The UPXTREME Board */
MRAA_INTEL_ILK = 26, /**< Intel Learning Kit */
MRAA_SIEMENS_IOT2050 = 27, /**< Siemens IOT2050 board */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest AGAINST changing existing constant's value.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, Please dont ever change these constants. There might be downstream code that depends on it.

// USB platform extenders start at 256
MRAA_FTDI_FT4222 = 256, /**< FTDI FT4222 USB to i2c bridge */

Expand Down Expand Up @@ -208,6 +209,40 @@ typedef enum {
MRAA_ROCKPI4_PIN40 = 40
} mraa_rockpi4_wiring_t;

/**
* ROCKPIS GPIO numbering enum
*/
typedef enum {
MRAA_ROCKPIS_PIN3 = 3,
MRAA_ROCKPIS_PIN5 = 5,
MRAA_ROCKPIS_PIN7 = 7,
MRAA_ROCKPIS_PIN8 = 8,
MRAA_ROCKPIS_PIN10 = 10,
MRAA_ROCKPIS_PIN11 = 11,
MRAA_ROCKPIS_PIN12 = 12,
MRAA_ROCKPIS_PIN13 = 13,
MRAA_ROCKPIS_PIN15 = 15,
MRAA_ROCKPIS_PIN16 = 16,
MRAA_ROCKPIS_PIN18 = 18,
MRAA_ROCKPIS_PIN19 = 19,
MRAA_ROCKPIS_PIN21 = 21,
MRAA_ROCKPIS_PIN22 = 22,
MRAA_ROCKPIS_PIN23 = 23,
MRAA_ROCKPIS_PIN24 = 24,
MRAA_ROCKPIS_PIN28 = 28,
MRAA_ROCKPIS_PIN30 = 30,
MRAA_ROCKPIS_PIN32 = 32,
MRAA_ROCKPIS_PIN34 = 34,
MRAA_ROCKPIS_PIN39 = 39,
MRAA_ROCKPIS_PIN40 = 40,
MRAA_ROCKPIS_PIN41 = 41,
MRAA_ROCKPIS_PIN42 = 42,
MRAA_ROCKPIS_PIN43 = 43,
MRAA_ROCKPIS_PIN44 = 44,
MRAA_ROCKPIS_PIN45 = 45,
MRAA_ROCKPIS_PIN46 = 46
} mraa_rockpis_wiring_t;

/**
* Raspberry PI Wiring compatible numbering enum
*/
Expand Down
35 changes: 35 additions & 0 deletions api/mraa/types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ typedef enum {
MTK_OMEGA2 = 18, /**< MT7688 based Onion Omega2 board */
IEI_TANK = 19, /**< IEI Tank System*/
ROCKPI4 = 20, /**< Radxa ROCK PI 4 Models A/B/C */
ROCKPIS = 21, /**< Radxa ROCK PI S */
INTEL_UPXTREME = 24, /**< The UPXTREME Board */
SIEMENS_IOT2050 = 26, /**< Siemens IOT2050 board */

Expand Down Expand Up @@ -200,6 +201,40 @@ typedef enum {
ROCKPI4_PIN40 = 40
} RockPi4Wiring;

/**
* ROCKPIS GPIO numbering enum
*/
typedef enum {
ROCKPIS_PIN3 = 3,
ROCKPIS_PIN5 = 5,
ROCKPIS_PIN7 = 7,
ROCKPIS_PIN8 = 8,
ROCKPIS_PIN10 = 10,
ROCKPIS_PIN11 = 11,
ROCKPIS_PIN12 = 12,
ROCKPIS_PIN13 = 13,
ROCKPIS_PIN15 = 15,
ROCKPIS_PIN16 = 16,
ROCKPIS_PIN18 = 18,
ROCKPIS_PIN19 = 19,
ROCKPIS_PIN21 = 21,
ROCKPIS_PIN22 = 22,
ROCKPIS_PIN23 = 23,
ROCKPIS_PIN24 = 24,
ROCKPIS_PIN28 = 28,
ROCKPIS_PIN30 = 30,
ROCKPIS_PIN32 = 32,
ROCKPIS_PIN34 = 34,
ROCKPIS_PIN39 = 39,
ROCKPIS_PIN40 = 40,
ROCKPIS_PIN41 = 41,
ROCKPIS_PIN42 = 42,
ROCKPIS_PIN43 = 43,
ROCKPIS_PIN44 = 44,
ROCKPIS_PIN45 = 45,
ROCKPIS_PIN46 = 46
} RockPiSWiring;

/**
* Raspberry PI Wiring compatible numbering enum
*/
Expand Down
53 changes: 53 additions & 0 deletions docs/rockpiS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
Rock Pi S Single Board Computer {#_rockpi}
=============================

ROCK Pi S is a Rockchip RK3308 based SBC(Single Board Computer) by Radxa. It equips a 64bits quad core processor, USB, ethernet, wireless connectivity and voice detection engine at the size of 1.7 inch, make it perfect for IoT and voice applications. ROCK Pi S comes in two ram sizes 256MB or 512MB DDR3, and uses uSD card for OS and storage. Optionally, ROCK Pi S can provide on board storage version with 1Gb/2Gb/4Gb/8Gb NAND flash.

ROCK Pi S board comes with different versions. When you get the board, you need to know the hardware version like 'ROCK PI S V12', which is printed in the top side of the board.

Board Support
-------------

- [ROCK Pi S](https://wiki.radxa.com/RockpiS)

Interface notes
---------------

- **UART**: ttyS0, ttyS2, and ttyS4
- UART0 is enabled as U-boot and Linux serial console by default. Check RockpiS/dev/serial-console to use. Check /Device-tree-overlays to disable serial console on UART0.
- Function marked with color orange is the default function of this pin.
- Except Pins for power supply, all pins are laid out directly to Soc RK3308.
- RK3308 have two IO voltages, 1.8V/3.3V. For ROCK Pi S, the voltage level of GPIOs showed in the tables above are 3.3V and tolerance of those are 3.63V. For hardware V11 and V12, an ADC input is included (ADC_IN0). This ADC has an input voltage range of 0-1.8V.
- The pins, PIN#2 and PIN#4, can supply power of 5V. The maximum current that can output depends on the power adapter.
- The pins, PIN#1 and PIN#17, can supply power of 3.3V. The maximum current that can output is 200mA.

Pin Mapping
-----------

ROCK Pi 4 has two 26-pin expansion headers. Each pin is distinguished by color.
The function of each pin depends on the board version. The common functions between boards V11 to V13 on header 1 are shown below. GPIO names vary between board versions (V13 names are used below)), see /RockpiS/hardware/gpio.

| Additional FunctionS | Primary Function| PIN | PIN | Primary Function | Additional Functions |
|----------------------|------------------|:------|------:|--------------------|----------------------|
| | | +3.3V | 1 | 2 | +5.0V | | |
| | | I2C1_SDA | 3 | 4 | +5.0V | | |
| | | I2C1_SCL | 5 | 6 | GND | | |
| | | GPIO2_A4 | 7 | 8 | UART0_TXD | | |
| | | GND | 9 | 10 | UART0_RXD | | |
| | | PWM2 | 11 | 12 | GPIO2_A5 | | |
| | | PWM3 | 13 | 14 | GND | | |
| | | GPIO0_C1 | 15 | 16 | GPIO2_B2 | | |
| | | +3.3V | 17 | 18 | GPIO2_B1 | | |
| | UART2_TXD | SPI2_TXD | 19 | 20 | GND | | |
| | UART2_RXD | SPI2_RXD | 21 | 22 | GPIO2_A7 | | |
| I2C0_SDA | UART1_RXD | SPI2_CLK | 23 | 24 | SPI2_CSn | UART1_TXD | I2C0_SCL |
| | | GND | 25 | 26 | ADC_IN0 | | |

Resources
---------

The following links will take you to additional Rock Pi S resources

- [Armbian for Rock Pi S](https://www.armbian.com/rockpi-s/)
- [Forums](https://forum.radxa.com/c/rockpiS)
- [Github Repo](https://github.com/radxa)