boards: hsdk: add cy8c95xx I/O expander, LEDs support
hsdk has an on board cy8c95xx I/O expander, and 4 on board LEDs use the expander GPIO. Add the I/O expander and LEDs in hsdk dts, then add documents for them. Signed-off-by: Watson Zeng <zhiwei@synopsys.com>
This commit is contained in:
parent
a79a1e1718
commit
6cc84e6f1d
4 changed files with 126 additions and 1 deletions
|
@ -37,4 +37,18 @@ endif # SPI_DW
|
|||
|
||||
endif # SPI
|
||||
|
||||
if I2C
|
||||
|
||||
config I2C_DW
|
||||
default y
|
||||
|
||||
if I2C_DW
|
||||
|
||||
config I2C_DW_CLOCK_SPEED
|
||||
default 200
|
||||
|
||||
endif #I2C_DW
|
||||
|
||||
endif #I2C
|
||||
|
||||
endif # BOARD_HSDK
|
||||
|
|
|
@ -8,7 +8,7 @@ Overview
|
|||
|
||||
The DesignWare(R) ARC(R) HS Development Kit is a ready-to-use platform for
|
||||
rapid software development on the ARC HS3x family of processors. It supports
|
||||
single- and multi-core ARC HS34, HS36 and HS38 processors and offers a wide
|
||||
single-core and multi-core ARC HS34, HS36 and HS38 processors and offers a wide
|
||||
range of interfaces including Ethernet, WiFi, Bluetooth, USB, SDIO, I2C, SPI,
|
||||
UART, I2S, ADC, PWM and GPIO. A Vivante GPU is also contained in the ARC
|
||||
Development System SoC. This allows developers to build and debug complex
|
||||
|
@ -298,6 +298,56 @@ using the CREG_GPIO_MUX register (see Pinmux ). After a reset, all ports are con
|
|||
| IO13 | gpio[15] | - | spi2_clk |
|
||||
+-------+------------+-----------------+------------+
|
||||
|
||||
I/O expander
|
||||
============
|
||||
|
||||
The ARC HSDK board includes a CY8C9520A I/O expander from `Cypress CY8C9520A
|
||||
<https://www.cypress.com/file/37971/download>`__. The I/O
|
||||
expander offers additional GPIO signals and board control signals and can be accessed
|
||||
through the on-board I2C bus, we have implemented a basic driver for it.
|
||||
Tables below shows an overview of relevant I/O signals.
|
||||
|
||||
+------------+---------------------------------------------+
|
||||
| Pins | Usage |
|
||||
+------------+---------------------------------------------+
|
||||
| port0_bit0 | RS9113 Bluetooth I2S RX enable (active low) |
|
||||
+------------+---------------------------------------------+
|
||||
| port0_bit1 | mikroBUS Reset (active low) |
|
||||
+------------+---------------------------------------------+
|
||||
| port0_bit2 | GPIO for Arduino AD0 |
|
||||
+------------+---------------------------------------------+
|
||||
| port0_bit3 | GPIO for Arduino AD1 |
|
||||
+------------+---------------------------------------------+
|
||||
| port0_bit4 | GPIO for Arduino AD2 |
|
||||
+------------+---------------------------------------------+
|
||||
| port0_bit5 | GPIO for Arduino AD3 |
|
||||
+------------+---------------------------------------------+
|
||||
| port1_bit4 | On-board user LED0 |
|
||||
+------------+---------------------------------------------+
|
||||
| port1_bit5 | On-board user LED1 |
|
||||
+------------+---------------------------------------------+
|
||||
| port1_bit6 | On-board user LED2 |
|
||||
+------------+---------------------------------------------+
|
||||
| port1_bit7 | On-board user LED3 |
|
||||
+------------+---------------------------------------------+
|
||||
|
||||
On-board user LEDS
|
||||
==================
|
||||
|
||||
The ARC HSDK includes 4 user LEDs(active high), which can be controlled through the I/O expander pins.
|
||||
|
||||
+-------+-----------------+
|
||||
| LEDs | PINs |
|
||||
+-------+-----------------+
|
||||
| LED0 | GPX_port1_bit4 |
|
||||
+-------+-----------------+
|
||||
| LED1 | GPX_port1_bit5 |
|
||||
+-------+-----------------+
|
||||
| LED2 | GPX_port1_bit6 |
|
||||
+-------+-----------------+
|
||||
| LED3 | GPX_port1_bit7 |
|
||||
+-------+-----------------+
|
||||
|
||||
For hardware feature details, refer to : `Designware HS Development Kit website
|
||||
<https://www.synopsys.com/dw/ipdir.php?ds=arc-hs-development-kit>`__.
|
||||
|
||||
|
|
|
@ -12,6 +12,30 @@
|
|||
|
||||
aliases {
|
||||
uart-0 = &uart0;
|
||||
led0 = &led0;
|
||||
led1 = &led1;
|
||||
led2 = &led2;
|
||||
led3 = &led3;
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
led0: led_0 {
|
||||
gpios = <&cy8c95xx_port1 4 GPIO_ACTIVE_HIGH>;
|
||||
label = "LED 0";
|
||||
};
|
||||
led1: led_1 {
|
||||
gpios = <&cy8c95xx_port1 5 GPIO_ACTIVE_HIGH>;
|
||||
label = "LED 1";
|
||||
};
|
||||
led2: led_2 {
|
||||
gpios = <&cy8c95xx_port1 6 GPIO_ACTIVE_HIGH>;
|
||||
label = "LED 2";
|
||||
};
|
||||
led3: led_3 {
|
||||
gpios = <&cy8c95xx_port1 7 GPIO_ACTIVE_HIGH>;
|
||||
label = "LED 3";
|
||||
};
|
||||
};
|
||||
|
||||
chosen {
|
||||
|
@ -45,3 +69,38 @@
|
|||
status = "okay";
|
||||
clock-frequency = <33333333>;
|
||||
};
|
||||
|
||||
&i2c0 {
|
||||
status = "okay";
|
||||
clock-frequency = <I2C_BITRATE_STANDARD>;
|
||||
|
||||
cy8c95xx: cy8c95xx@20 {
|
||||
compatible = "cypress,cy8c95xx-gpio";
|
||||
reg = <0x20>;
|
||||
label = "cy8c95xx_gpio";
|
||||
|
||||
ranges;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
cy8c95xx_port0: cy8c95xx_port@0 {
|
||||
compatible = "cypress,cy8c95xx-gpio-port";
|
||||
reg = <0x00>;
|
||||
label = "cy8c95xx_port0";
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
ngpios = <8>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
cy8c95xx_port1: cy8c95xx_port@1 {
|
||||
compatible = "cypress,cy8c95xx-gpio-port";
|
||||
reg = <0x01>;
|
||||
label = "cy8c95xx_port1";
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
ngpios = <8>;
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -18,3 +18,5 @@ CONFIG_GPIO=y
|
|||
CONFIG_SPI=y
|
||||
CONFIG_SMP=y
|
||||
CONFIG_MP_NUM_CPUS=4
|
||||
CONFIG_I2C=y
|
||||
CONFIG_GPIO_CY8C95XX=y
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue