brintos

brintos / linux-shallow public Read only

0
0
Text · 3.2 KiB · 938d0e4 Raw
141 lines · yaml
1# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause2%YAML 1.23---4$id: http://devicetree.org/schemas/leds/nxp,pca963x.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: NXP PCA963x LED controllers8 9maintainers:10  - Laurent Pinchart <laurent.pinchart@ideasonboard.com>11 12description: |13  The NXP PCA963x are I2C-controlled LED drivers optimized for14  Red/Green/Blue/Amber (RGBA) color mixing applications. Each LED is15  individually controllable and has its own PWM controller.16 17  Datasheets are available at18 19  - https://www.nxp.com/docs/en/data-sheet/PCA9632.pdf20  - https://www.nxp.com/docs/en/data-sheet/PCA9633.pdf21  - https://www.nxp.com/docs/en/data-sheet/PCA9634.pdf22  - https://www.nxp.com/docs/en/data-sheet/PCA9635.pdf23 24properties:25  compatible:26    enum:27      - nxp,pca963228      - nxp,pca963329      - nxp,pca963430      - nxp,pca963531 32  reg:33    maxItems: 134 35  "#address-cells":36    const: 137 38  "#size-cells":39    const: 040 41  nxp,hw-blink:42    type: boolean43    description:44      Use hardware blinking instead of software blinking45 46  nxp,inverted-out:47    type: boolean48    description:49      Invert the polarity of the generated PWM.50 51  nxp,period-scale:52    $ref: /schemas/types.yaml#/definitions/uint3253    description:54      In some configurations, the chip blinks faster than expected. This55      parameter provides a scaling ratio (fixed point, decimal divided by 1000)56      to compensate, e.g. 1300=1.3x and 750=0.75x.57 58  nxp,totem-pole:59    type: boolean60    description:61      Use totem pole (push-pull) instead of open-drain (pca9632 defaults to62      open-drain, newer chips to totem pole).63 64patternProperties:65  "^led@[0-9a-f]+$":66    type: object67    $ref: common.yaml#68    unevaluatedProperties: false69 70    properties:71      reg:72        minimum: 073 74    required:75      - reg76 77allOf:78  - if:79      properties:80        compatible:81          contains:82            enum:83              - nxp,pca963284              - nxp,pca963385    then:86      patternProperties:87        "^led@[0-9a-f]+$":88          properties:89            reg:90              maximum: 391    else:92      patternProperties:93        "^led@[0-9a-f]+$":94          properties:95            reg:96              maximum: 797 98additionalProperties: false99 100examples:101  - |102    #include <dt-bindings/leds/common.h>103 104    i2c {105        #address-cells = <1>;106        #size-cells = <0>;107 108        led-controller@62 {109            compatible = "nxp,pca9632";110            reg = <0x62>;111            #address-cells = <1>;112            #size-cells = <0>;113 114            led@0 {115                    reg = <0>;116                    color = <LED_COLOR_ID_RED>;117                    function = LED_FUNCTION_STATUS;118            };119 120            led@1 {121                    reg = <1>;122                    color = <LED_COLOR_ID_GREEN>;123                    function = LED_FUNCTION_STATUS;124            };125 126            led@2 {127                    reg = <2>;128                    color = <LED_COLOR_ID_BLUE>;129                    function = LED_FUNCTION_STATUS;130            };131 132            led@3 {133                    reg = <3>;134                    color = <LED_COLOR_ID_WHITE>;135                    function = LED_FUNCTION_STATUS;136            };137        };138    };139 140...141