ite,it8801-mfd (on i2c bus)

Vendor: ITE Tech. Inc.

Note

An implementation of a driver matching this compatible is available in drivers/mfd/mfd_ite_it8801.c.

Description

ITE IT8801 ioexpander multi-function device drivers.
This ioexpander provides a GPIO/PWM/Keyboard function via I2C bus.

An example configuration:

&i2c4 {
    status = "okay";
    clock-frequency = <I2C_BITRATE_STANDARD>;
    pinctrl-0 = <&i2c4_clk_gpe0_default
                 &i2c4_data_gpe7_default>;
    pinctrl-names = "default";

    it8801_mfd: it8801@38 {
        compatible = "ite,it8801-mfd";
        /*
         * SMBus address (7-bit without R/W)
         * SMB_ADDR pin is 0, SMBus address is 0x38
         * SMB_ADDR pin is 1, SMBus address is 0x39
         */
        reg = <0x38>;
        irq-gpios = <&gpioa 1 0>; /* SMB_INT# */
        #address-cells = <1>;
        #size-cells = <1>;

        ioex_it8801_port0: it8801_port@0  {
            compatible = "ite,it8801-gpio";
            reg = <0x00 1   /* GPIPSR */
                   0x05 1   /* GPSOVR */
                   0x0a 8   /* GPCR */
                   0x32 1   /* GPISR */
                   0x37 1>; /* GPIER */
            gpio-controller;
            #gpio-cells = <2>;
            ngpios = <8>;
            pin-mask = <0xdb>;
        };

        ioex_it8801_port1: it8801_port@1 {
            compatible = "ite,it8801-gpio";
            reg = <0x01 1   /* GPIPSR */
                   0x06 1   /* GPSOVR */
                   0x12 8   /* GPCR */
                   0x33 1   /* GPISR */
                   0x38 1>; /* GPIER */
            gpio-controller;
            #gpio-cells = <2>;
            ngpios = <8>;
            pin-mask = <0x3f>;
        };

        ioex_it8801_port2: it8801_port@2 {
            compatible = "ite,it8801-gpio";
            reg = <0x02 1   /* GPIPSR */
                   0x07 1   /* GPSOVR */
                   0x1a 8   /* GPCR */
                   0x34 1   /* GPISR */
                   0x39 1>; /* GPIER */
            gpio-controller;
            #gpio-cells = <2>;
            ngpios = <8>;
            pin-mask = <0x0f>;
        };

        ioex_it8801_kbd: it8801_kbd@40 {
            compatible = "ite,it8801-kbd";
            reg = <0x40 1   /* KSOMCR */
                   0x41 1   /* KSIDR */
                   0x42 1   /* KSIEER */
                   0x43 1>; /* KSIIER */
            kso-mapping = <0 1 20 3 4 5 6
                           17 18 16 15 11 12>;
            mfdctrl = <&kso18_gp01_default
                       &kso20_gp23_default>;
            row-size = <8>;
            col-size = <13>;

            kscan_input: kscan-input {
                compatible = "zephyr,kscan-input";
            };
        };

        ioex_it8801_pwm: it8801_pwm@90 {
            compatible = "ite,it8801-pwm";
            mfdctrl = <&pwm7_gp20_default>;
            reg = <0x90 1   /* PWMMCR */
                   0x94 1>; /* PWMDCR */
            channel = <7>;
            #pwm-cells = <3>;
        };
    };
};

Properties

Properties not inherited from the base binding file.

Name

Type

Details

irq-gpios

phandle-array

An interrupt can be asserted on SMB_INT# pin to notify
the host-side since an effective interrupt occurs.

supply-gpios

phandle-array

GPIO specifier that controls power to the device.

This property should be provided when the device has a dedicated
switch that controls power to the device.  The supply state is
entirely the responsibility of the device driver.

Contrast with vin-supply.

vin-supply

phandle

Reference to the regulator that controls power to the device.
The referenced devicetree node must have a regulator compatible.

This property should be provided when device power is supplied
by a shared regulator.  The supply state is dependent on the
request status of all devices fed by the regulator.

Contrast with supply-gpios.  If both properties are provided
then the regulator must be requested before the supply GPIOS is
set to an active state, and the supply GPIOS must be set to an
inactive state before releasing the regulator.