boards: shields: Add support for Adafruit AW9523 board

Add support for Adafruit AW9523 GPIO Expander/LED Controller

Co-authored-by: Benjamin Cabé <kartben@gmail.com>
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
This commit is contained in:
TOKITA Hiroshi 2024-10-20 23:16:45 +09:00 committed by Benjamin Cabé
commit 538d34c1de
5 changed files with 77 additions and 1 deletions

View file

@ -0,0 +1,5 @@
# Copyright (c) 2024 TOKITA Hiroshi
# SPDX-License-Identifier: Apache-2.0
config SHIELD_ADAFRUIT_AW9523
def_bool $(shields_list_contains,adafruit_aw9523)

View file

@ -0,0 +1,22 @@
/*
* Copyright (c) 2024 TOKITA Hiroshi
*
* SPDX-License-Identifier: Apache-2.0
*/
&stemma_qt_i2c {
status = "okay";
adafruit_aw9523: aw9523b@58 {
status = "okay";
reg = <0x58>;
compatible = "awinic,aw9523b";
adafruit_aw9523_gpio: aw9523b-gpio {
status = "okay";
compatible = "awinic,aw9523b-gpio";
gpio-controller;
#gpio-cells = <2>;
};
};
};

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

View file

@ -0,0 +1,49 @@
.. _adafruit_aw9523:
Adafruit AW9523 GPIO Expander and LED Driver
############################################
Overview
********
The `Adafruit AW9523 GPIO Expander and LED Driver`_ provides
16-channel GPIO/LED controller function.
.. figure:: adafruit_aw9523.webp
:align: center
:alt: Adafruit AW9523
Adafruit AW9523 (Credit: Adafruit)
Pin Assignments
===============
+--------------------------+------------------------------------------+
| Shield Pin | Function |
+==========================+==========================================+
| SDA | AW9523B I2C SDA |
+--------------------------+------------------------------------------+
| SCL | AW9523B I2C SCL |
+--------------------------+------------------------------------------+
| INT (Pad on board) | AW9523B Interrupt output [1]_ |
+--------------------------+------------------------------------------+
| RST (Pad on board) | AW9523B Reset pin [2]_ |
+--------------------------+------------------------------------------+
.. [1] To receive interrupts, connect the INT pin to the SoC's GPIO and set the connected
GPIO in the ``int-gpios`` property in an additional overlay. The INT terminal must be
pulled up.
.. [2] If you want to control the reset pin from the SoC, connect it to a GPIO on the SoC
and define the ``reset-gpios`` property in an additional overlay.
Programming
***********
Set ``--shield adafruit_aw9523`` when you invoke ``west build``.
.. _Adafruit AW9523 GPIO Expander and LED Driver:
https://learn.adafruit.com/adafruit-aw9523-gpio-expander-and-led-driver
.. _Awinic AW9523B 16 MULTI-FUNCTION LED DRIVER AND GPIO CONTROLLER WITH I2C INTERFACE:
https://doc.awinic.com/doc/202403/deffbf3b-7e7b-4ff6-8e91-fd85e2d845d5.pdf

View file

@ -1,7 +1,7 @@
# Copyright (c) 2024 TOKITA Hiroshi
# SPDX-License-Identifier: Apache-2.0
description: Awinic AW9523B
description: Awinic AW9523B 16 multi-function LED driver and GPIO controller
compatible: "awinic,aw9523b"