2d93f03c25
RT1718S is an i2c-based TCPC chip that supports 3 additional GPIOs. The pins can be used for USB-C operations e.g. handling FRS, but they can also work as usual GPIOs. Add a driver for the RT1718S GPIO and a handler for an alert signal from the chip. The handler reads the alert register once asserted and calls the GPIO interrupt handler if needed(Vendor-defined alert). gpio_rt1718s.c file and "richtek,rt1718s" node collect common properties and data for all RS1718S functionalities. The file can be extended for TCPC driver. rt1718s.h file also defines inline functions with i2c operations common for all drivers. The common header and source files can be moved to tcpc directories once the tcpc driver is added since it is the main functionality. Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com>
29 lines
692 B
YAML
29 lines
692 B
YAML
# Copyright 2022 Google LLC
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
description: |
|
|
Richtek RT1718S TCPC chip GPIO port
|
|
|
|
"richtek,rt1718s-gpio-port" node handles GPIO feature of the RT1718S TCPC
|
|
chip.
|
|
|
|
Example:
|
|
&i2c2_0 {
|
|
rt1718s_port0: rt1718s@40 {
|
|
compatible = "richtek,rt1718s";
|
|
reg = <0x40>;
|
|
|
|
rt1718s_gpio_port0: rt1718s_gpio {
|
|
compatible = "richtek,rt1718s-gpio-port";
|
|
|
|
gpio-controller;
|
|
#gpio-cells = <2>;
|
|
ngpios = <3>;
|
|
};
|
|
};
|
|
};
|
|
|
|
include: [gpio-controller.yaml, base.yaml]
|
|
|
|
compatible: "richtek,rt1718s-gpio-port"
|