Difference between revisions of "RIALTO SBC/Interfaces and Connectors/Led and buttons"

From DAVE Developer's Wiki
Jump to: navigation, search
(Created page with "<section begin="History" /> {| style="border-collapse:collapse; " ! colspan="4" style="width:100%; text-align:left" ; border-bottom:solid 2px #ededed" |History |- ! style="bo...")
 
(Signals)
Line 18: Line 18:
  
 
=== Description  ===
 
=== Description  ===
RIALTO SBC can drive up to five leds and detect two key buttons at the expansion connector J70.  
+
RIALTO SBC can drive up to six leds and detect two key buttons at the expansion connector J70.  
  
J71 is a 10x1x2.54mm pin strip header connector.
+
J70 is a 10x1x2.54mm pin strip header connector.
  
  
[[File:RIALTO_SBC-J70-connector.png|thumb|center|500px|Led and buttons connector (J60)]]
+
[[File:RIALTO_SBC-J70-connector.png|thumb|center|500px|Led and buttons connector (J70)]]
  
 
===Signals ===
 
===Signals ===
  
The following table describes the interface signals:
+
The six LED output are driven by a PCA9551PW integrated circuit. In the following table describes the IC output pins to the connector J70:
  
 
{| class="wikitable"
 
{| class="wikitable"
 
! latexfontsize="scriptsize" |Pin#
 
! latexfontsize="scriptsize" |Pin#
 
! latexfontsize="scriptsize" |Pin name
 
! latexfontsize="scriptsize" |Pin name
! latexfontsize="scriptsize" |Alternate function
+
! latexfontsize="scriptsize" |PCA9551 output
! latexfontsize="scriptsize" |GPIO
+
!PCA9551 pin
!Pin notes
 
 
|-
 
|-
 
|1
 
|1
|VIN
+
|3V3_IO
|
 
 
|
 
|
 
|
 
|
 
|-
 
|-
 
|2
 
|2
|PMIC_5V
+
|AUX_LED0
|
+
|LED7
|
+
|12
|
 
 
|-
 
|-
 
|3
 
|3
|3V3_AUX
+
|AUX_LED1
|
+
|LED6
|
+
|11
|
 
 
|-
 
|-
 
|4
 
|4
|VDD_ADC
+
|AUX_LED2
|
+
|LED5
|
+
|10
|
 
 
|-
 
|-
 
|5
 
|5
|GPIO1_IO01
+
|AUX_LED3
|WDOG1_WDOG_B
+
|LED4
|GPIO1_IO01
+
|9
|
 
 
|-
 
|-
 
|6
 
|6
|GPIO1_IO02
+
|AUX_LED4
|I2C1_SCL
+
|LED0
|GPIO1_IO02
+
|4
|
 
 
|-
 
|-
 
|7
 
|7
|GPIO1_IO03
+
|AUX_LED5
|I2C1_SDA
+
|LED1
|GPIO1_IO03
+
|5
 +
|-
 +
|10
 +
|DGND
 
|
 
|
 +
|
 +
|}
 +
 +
The two KEY input are connected to the i.MX6UL SoC or (optionally) to the PCA9551PW IC. The following table describes the interface signals:
 +
 +
{| class="wikitable"
 +
! latexfontsize="scriptsize" |Pin#
 +
! latexfontsize="scriptsize" |Pin name
 +
! latexfontsize="scriptsize" |PCA9551 input
 +
!PCA9551 pin
 +
!GPIO
 
|-
 
|-
 
|8
 
|8
|GPIO1_IO04
+
|LCD_RESET
|UART5_TX, PWM3
+
|LED2
|GPIO1_IO04
+
|6
|
+
|GPIO3_IO04
 
|-
 
|-
 
|9
 
|9
|GPIO1_IO05
+
|LCD_ENABLE
|UART5_RX, PWM4
+
|LED3
|GPIO1_IO05
+
|7
|
+
|GPIO3_IO01
|-
 
|10
 
|DGND
 
|Ground
 
|
 
|
 
 
|}
 
|}
  
Line 101: Line 102:
 
=== Device mapping ===
 
=== Device mapping ===
  
GPIOs are mapped into banks each of which contains 32 pins. They are named as GPIO<bank>_IO<pin>
+
The led are mapped to a sysfs led class interface. The button are mapped to the input event device handler.
 
 
Each pin can be addressed with an incremental number, calculated as follows: GPIO = 32 x (<bank> - 1) + <pin>
 
  
 
=== Device usage ===
 
=== Device usage ===
  
Under Linux the GPIOs can be manipulated su <code>sysfs</code> export or with the <code>gpiod</code> tools in Linux.<section end="Body" />
+
Under Linux:
 
+
* the LEDs can be manipulated via <code>/sys/class/leds/pca955x</code> ''syfs'' interface
 +
* the KEY buttons can be detected via <code>/dev/input/event1</code> input devices
 +
** KEY0 is mapped to <code>KEY_F1</code>
 +
** KEY1 is mapped to <code>KEY2</code>
 +
** the mapping can be easily modified in the device tree file
 +
<section end="Body" />
 
[[Category:RIALTO SBC]]
 
[[Category:RIALTO SBC]]

Revision as of 18:12, 13 January 2024

History
Issue Date Notes
2024/01/13 First documentation release



Led and buttons connector[edit | edit source]

Description[edit | edit source]

RIALTO SBC can drive up to six leds and detect two key buttons at the expansion connector J70.

J70 is a 10x1x2.54mm pin strip header connector.


Led and buttons connector (J70)

Signals[edit | edit source]

The six LED output are driven by a PCA9551PW integrated circuit. In the following table describes the IC output pins to the connector J70:

Pin# Pin name PCA9551 output PCA9551 pin
1 3V3_IO
2 AUX_LED0 LED7 12
3 AUX_LED1 LED6 11
4 AUX_LED2 LED5 10
5 AUX_LED3 LED4 9
6 AUX_LED4 LED0 4
7 AUX_LED5 LED1 5
10 DGND

The two KEY input are connected to the i.MX6UL SoC or (optionally) to the PCA9551PW IC. The following table describes the interface signals:

Pin# Pin name PCA9551 input PCA9551 pin GPIO
8 LCD_RESET LED2 6 GPIO3_IO04
9 LCD_ENABLE LED3 7 GPIO3_IO01

All the GPIO signals are 0-3.3V level.

Device mapping[edit | edit source]

The led are mapped to a sysfs led class interface. The button are mapped to the input event device handler.

Device usage[edit | edit source]

Under Linux:

  • the LEDs can be manipulated via /sys/class/leds/pca955x syfs interface
  • the KEY buttons can be detected via /dev/input/event1 input devices
    • KEY0 is mapped to KEY_F1
    • KEY1 is mapped to KEY2
    • the mapping can be easily modified in the device tree file