Back to home page

OSCL-LXR

 
 

    


0001 * NXP - pca955x LED driver
0002 
0003 The PCA955x family of chips are I2C LED blinkers whose pins not used
0004 to control LEDs can be used as general purpose I/Os. The GPIO pins can
0005 be input or output, and output pins can also be pulse-width controlled.
0006 
0007 Required properties:
0008 - compatible : should be one of :
0009         "nxp,pca9550"
0010         "nxp,pca9551"
0011         "nxp,pca9552"
0012         "ibm,pca9552"
0013         "nxp,pca9553"
0014 - #address-cells: must be 1
0015 - #size-cells: must be 0
0016 - reg: I2C slave address. depends on the model.
0017 
0018 Optional properties:
0019 - gpio-controller: allows pins to be used as GPIOs.
0020 - #gpio-cells: must be 2.
0021 - gpio-line-names: define the names of the GPIO lines
0022 
0023 LED sub-node properties:
0024 - reg : number of LED line.
0025                 from 0 to  1 for the pca9550
0026                 from 0 to  7 for the pca9551
0027                 from 0 to 15 for the pca9552
0028                 from 0 to  3 for the pca9553
0029 - type: (optional) either
0030         PCA955X_TYPE_NONE
0031         PCA955X_TYPE_LED
0032         PCA955X_TYPE_GPIO
0033         see dt-bindings/leds/leds-pca955x.h (default to LED)
0034 - label : (optional)
0035         see Documentation/devicetree/bindings/leds/common.txt
0036 - linux,default-trigger : (optional)
0037         see Documentation/devicetree/bindings/leds/common.txt
0038 
0039 Examples:
0040 
0041 pca9552: pca9552@60 {
0042         compatible = "nxp,pca9552";
0043         #address-cells = <1>;
0044         #size-cells = <0>;
0045         reg = <0x60>;
0046 
0047         gpio-controller;
0048         #gpio-cells = <2>;
0049         gpio-line-names = "GPIO12", "GPIO13", "GPIO14", "GPIO15";
0050 
0051         gpio@12 {
0052                 reg = <12>;
0053                 type = <PCA955X_TYPE_GPIO>;
0054         };
0055         gpio@13 {
0056                 reg = <13>;
0057                 type = <PCA955X_TYPE_GPIO>;
0058         };
0059         gpio@14 {
0060                 reg = <14>;
0061                 type = <PCA955X_TYPE_GPIO>;
0062         };
0063         gpio@15 {
0064                 reg = <15>;
0065                 type = <PCA955X_TYPE_GPIO>;
0066         };
0067 
0068         led@0 {
0069                 label = "red:power";
0070                 linux,default-trigger = "default-on";
0071                 reg = <0>;
0072                 type = <PCA955X_TYPE_LED>;
0073         };
0074         led@1 {
0075                 label = "green:power";
0076                 reg = <1>;
0077                 type = <PCA955X_TYPE_LED>;
0078         };
0079         led@2 {
0080                 label = "pca9552:yellow";
0081                 reg = <2>;
0082                 type = <PCA955X_TYPE_LED>;
0083         };
0084         led@3 {
0085                 label = "pca9552:white";
0086                 reg = <3>;
0087                 type = <PCA955X_TYPE_LED>;
0088         };
0089 };