TCA6507 LED and GPIO controller

Schema identifier ($id): "http://devicetree.org/schemas/leds/ti,tca6507.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

Maintainers (maintainers): "NeilBrown <neilb@suse.de>"

The TCA6507 is a programmable LED controller connected via I2C that can drive 7 separate lines either by holding them low, or by pulsing them with modulated width.

Properties and child nodes (properties) #

compatible — not listed as required here #

Exact value (const): "ti,tca6507"

reg — not listed as required here #

I2C slave address of the controller.

Maximum number of items (maxItems): 1

#address-cells — not listed as required here #

Exact value (const): 1

#size-cells — not listed as required here #

Exact value (const): 0

gpio-controller — not listed as required here #

true — No constraints added by this property rule.

#gpio-cells — not listed as required here #

Exact value (const): 2

gpio-line-names — not listed as required here #

true — No constraints added by this property rule.

Properties matching a name pattern (patternProperties) #

^led@[0-6]$ — name matches this regular expression #

Value type (type): "object"

Shared schema rule ($ref): common.yaml#

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Properties and child nodes (properties) #

reg — required here

Minimum value (minimum): 0

Maximum value (maximum): 6

Required in this object (required): "reg"

^gpio@[0-6]$ — name matches this regular expression #

Value type (type): "object"

Properties and child nodes (properties) #

compatible — required here

Exact value (const): "gpio"

reg — required here

Minimum value (minimum): 0

Maximum value (maximum): 6

Properties not matched by properties or patternProperties in this schema (additionalProperties) #

false

Not allowed by this rule.

Required in this object (required): "reg", "compatible"

Condition (if) #

Properties matching a name pattern (patternProperties) #

^gpio@[0-6]$ — name matches this regular expression #

Value type (type): "object"

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Exact value (const): "gpio"

When the condition matches (then) #

Required in this object (required): "gpio-controller", "#gpio-cells"

Properties not matched by properties or patternProperties in this schema (additionalProperties) #

false

Not allowed by this rule.

Examples (examples) #


#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/leds/common.h>

i2c {
    #address-cells = <1>;
    #size-cells = <0>;

    led-controller@45 {
        compatible = "ti,tca6507";
        #address-cells = <1>;
        #size-cells = <0>;
        reg = <0x45>;

        gpio-controller;
        #gpio-cells = <2>;

        gpio-line-names = "wifi_reset@6";

        led@0 {
            label = "gta04:red:aux";
            reg = <0x0>;
        };

        led@1 {
            label = "gta04:green:aux";
            reg = <0x1>;
        };

        led@3 {
            reg = <0x3>;
            color = <LED_COLOR_ID_RED>;
            function = LED_FUNCTION_POWER;
            linux,default-trigger = "default-on";
        };

        led@4 {
            color = <LED_COLOR_ID_GREEN>;
            function = LED_FUNCTION_POWER;
            reg = <0x4>;
        };

        gpio@6 {
            compatible = "gpio";
            reg = <0x6>;
        };
    };
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: GPL-2.0-only

Edit this page