xref: /linux/Documentation/devicetree/bindings/pinctrl/cypress,cy8c95x0.yaml (revision a4f1d0dd9bd153ef5d326ad040c47f0a909361ca)
18d39e55eSPatrick Rudolph# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
28d39e55eSPatrick Rudolph%YAML 1.2
38d39e55eSPatrick Rudolph---
48d39e55eSPatrick Rudolph$id: http://devicetree.org/schemas/pinctrl/cypress,cy8c95x0.yaml#
58d39e55eSPatrick Rudolph$schema: http://devicetree.org/meta-schemas/core.yaml#
68d39e55eSPatrick Rudolph
78d39e55eSPatrick Rudolphtitle: Cypress CY8C95X0 I2C GPIO expander
88d39e55eSPatrick Rudolph
98d39e55eSPatrick Rudolphmaintainers:
108d39e55eSPatrick Rudolph  - Patrick Rudolph <patrick.rudolph@9elements.com>
118d39e55eSPatrick Rudolph
128d39e55eSPatrick Rudolphdescription: |
138d39e55eSPatrick Rudolph  This supports the 20/40/60 pin Cypress CYC95x0 GPIO I2C expanders.
148d39e55eSPatrick Rudolph  Pin function configuration is performed on a per-pin basis.
158d39e55eSPatrick Rudolph
168d39e55eSPatrick Rudolphproperties:
178d39e55eSPatrick Rudolph  compatible:
188d39e55eSPatrick Rudolph    enum:
198d39e55eSPatrick Rudolph      - cypress,cy8c9520
208d39e55eSPatrick Rudolph      - cypress,cy8c9540
218d39e55eSPatrick Rudolph      - cypress,cy8c9560
228d39e55eSPatrick Rudolph
238d39e55eSPatrick Rudolph  reg:
248d39e55eSPatrick Rudolph    maxItems: 1
258d39e55eSPatrick Rudolph
268d39e55eSPatrick Rudolph  gpio-controller: true
278d39e55eSPatrick Rudolph
288d39e55eSPatrick Rudolph  '#gpio-cells':
298d39e55eSPatrick Rudolph    description:
308d39e55eSPatrick Rudolph      The first cell is the GPIO number and the second cell specifies GPIO
318d39e55eSPatrick Rudolph      flags, as defined in <dt-bindings/gpio/gpio.h>.
328d39e55eSPatrick Rudolph    const: 2
338d39e55eSPatrick Rudolph
348d39e55eSPatrick Rudolph  interrupts:
358d39e55eSPatrick Rudolph    maxItems: 1
368d39e55eSPatrick Rudolph
378d39e55eSPatrick Rudolph  interrupt-controller: true
388d39e55eSPatrick Rudolph
398d39e55eSPatrick Rudolph  '#interrupt-cells':
408d39e55eSPatrick Rudolph    const: 2
418d39e55eSPatrick Rudolph
428d39e55eSPatrick Rudolph  gpio-line-names: true
438d39e55eSPatrick Rudolph
448d39e55eSPatrick Rudolph  gpio-ranges:
458d39e55eSPatrick Rudolph    maxItems: 1
468d39e55eSPatrick Rudolph
478d39e55eSPatrick Rudolph  gpio-reserved-ranges:
488d39e55eSPatrick Rudolph    maxItems: 1
498d39e55eSPatrick Rudolph
508d39e55eSPatrick Rudolph  vdd-supply:
518d39e55eSPatrick Rudolph    description:
528d39e55eSPatrick Rudolph      Optional power supply.
538d39e55eSPatrick Rudolph
54*a4f1d0ddSPatrick Rudolph  reset-gpios:
55*a4f1d0ddSPatrick Rudolph    description: GPIO connected to the XRES pin
56*a4f1d0ddSPatrick Rudolph    maxItems: 1
57*a4f1d0ddSPatrick Rudolph
588d39e55eSPatrick RudolphpatternProperties:
598d39e55eSPatrick Rudolph  '-pins$':
608d39e55eSPatrick Rudolph    type: object
618d39e55eSPatrick Rudolph    description:
628d39e55eSPatrick Rudolph      Pinctrl node's client devices use subnodes for desired pin configuration.
638d39e55eSPatrick Rudolph      Client device subnodes use below standard properties.
648d39e55eSPatrick Rudolph    $ref: pincfg-node.yaml#
658d39e55eSPatrick Rudolph
668d39e55eSPatrick Rudolph    properties:
678d39e55eSPatrick Rudolph      pins:
688d39e55eSPatrick Rudolph        description:
698d39e55eSPatrick Rudolph          List of gpio pins affected by the properties specified in this
708d39e55eSPatrick Rudolph          subnode.
718d39e55eSPatrick Rudolph        items:
728d39e55eSPatrick Rudolph          pattern: '^gp([0-7][0-7])$'
738d39e55eSPatrick Rudolph        minItems: 1
748d39e55eSPatrick Rudolph        maxItems: 60
758d39e55eSPatrick Rudolph
768d39e55eSPatrick Rudolph      function:
778d39e55eSPatrick Rudolph        description:
788d39e55eSPatrick Rudolph          Specify the alternative function to be configured for the specified
798d39e55eSPatrick Rudolph          pins.
808d39e55eSPatrick Rudolph        enum: [ gpio, pwm ]
818d39e55eSPatrick Rudolph
828d39e55eSPatrick Rudolph      bias-pull-down: true
838d39e55eSPatrick Rudolph
848d39e55eSPatrick Rudolph      bias-pull-up: true
858d39e55eSPatrick Rudolph
868d39e55eSPatrick Rudolph      bias-disable: true
878d39e55eSPatrick Rudolph
888d39e55eSPatrick Rudolph      output-high: true
898d39e55eSPatrick Rudolph
908d39e55eSPatrick Rudolph      output-low: true
918d39e55eSPatrick Rudolph
928d39e55eSPatrick Rudolph      drive-push-pull: true
938d39e55eSPatrick Rudolph
948d39e55eSPatrick Rudolph      drive-open-drain: true
958d39e55eSPatrick Rudolph
968d39e55eSPatrick Rudolph      drive-open-source: true
978d39e55eSPatrick Rudolph
988d39e55eSPatrick Rudolph    required:
998d39e55eSPatrick Rudolph      - pins
1008d39e55eSPatrick Rudolph      - function
1018d39e55eSPatrick Rudolph
1028d39e55eSPatrick Rudolph    additionalProperties: false
1038d39e55eSPatrick Rudolph
1048d39e55eSPatrick Rudolphrequired:
1058d39e55eSPatrick Rudolph  - compatible
1068d39e55eSPatrick Rudolph  - reg
1078d39e55eSPatrick Rudolph  - interrupts
1088d39e55eSPatrick Rudolph  - interrupt-controller
1098d39e55eSPatrick Rudolph  - '#interrupt-cells'
1108d39e55eSPatrick Rudolph  - gpio-controller
1118d39e55eSPatrick Rudolph  - '#gpio-cells'
1128d39e55eSPatrick Rudolph
1138d39e55eSPatrick RudolphadditionalProperties: false
1148d39e55eSPatrick Rudolph
1158d39e55eSPatrick RudolphallOf:
11649cd1dd1SRob Herring  - $ref: pinctrl.yaml#
1178d39e55eSPatrick Rudolph
1188d39e55eSPatrick Rudolphexamples:
1198d39e55eSPatrick Rudolph  - |
1208d39e55eSPatrick Rudolph    #include <dt-bindings/interrupt-controller/arm-gic.h>
1218d39e55eSPatrick Rudolph    #include <dt-bindings/interrupt-controller/irq.h>
1228d39e55eSPatrick Rudolph
1238d39e55eSPatrick Rudolph    i2c {
1248d39e55eSPatrick Rudolph      #address-cells = <1>;
1258d39e55eSPatrick Rudolph      #size-cells = <0>;
1268d39e55eSPatrick Rudolph
1278d39e55eSPatrick Rudolph      pinctrl@20 {
1288d39e55eSPatrick Rudolph        compatible = "cypress,cy8c9520";
1298d39e55eSPatrick Rudolph        reg = <0x20>;
1308d39e55eSPatrick Rudolph        gpio-controller;
1318d39e55eSPatrick Rudolph        #gpio-cells = <2>;
1328d39e55eSPatrick Rudolph        #interrupt-cells = <2>;
1338d39e55eSPatrick Rudolph        interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>;
1348d39e55eSPatrick Rudolph        interrupt-controller;
1358d39e55eSPatrick Rudolph        vdd-supply = <&p3v3>;
1368d39e55eSPatrick Rudolph        gpio-reserved-ranges = <5 1>;
1378d39e55eSPatrick Rudolph      };
1388d39e55eSPatrick Rudolph    };
139