159 lines · yaml
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)2%YAML 1.23---4$id: http://devicetree.org/schemas/pinctrl/cypress,cy8c95x0.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: Cypress CY8C95X0 I2C GPIO expander8 9maintainers:10 - Patrick Rudolph <patrick.rudolph@9elements.com>11 12description: |13 This supports the 20/40/60 pin Cypress CYC95x0 GPIO I2C expanders.14 Pin function configuration is performed on a per-pin basis.15 16properties:17 compatible:18 enum:19 - cypress,cy8c952020 - cypress,cy8c954021 - cypress,cy8c956022 23 reg:24 maxItems: 125 26 gpio-controller: true27 28 '#gpio-cells':29 description:30 The first cell is the GPIO number and the second cell specifies GPIO31 flags, as defined in <dt-bindings/gpio/gpio.h>.32 const: 233 34 interrupts:35 maxItems: 136 37 interrupt-controller: true38 39 '#interrupt-cells':40 const: 241 42 gpio-line-names: true43 44 gpio-ranges:45 maxItems: 146 47 gpio-reserved-ranges:48 minItems: 149 maxItems: 6050 51 vdd-supply:52 description:53 Optional power supply.54 55 reset-gpios:56 description: GPIO connected to the XRES pin57 maxItems: 158 59patternProperties:60 '-pins$':61 type: object62 description:63 Pinctrl node's client devices use subnodes for desired pin configuration.64 Client device subnodes use below standard properties.65 $ref: pincfg-node.yaml#66 67 properties:68 pins:69 description:70 List of gpio pins affected by the properties specified in this71 subnode.72 items:73 pattern: '^gp([0-7][0-7])$'74 minItems: 175 maxItems: 6076 77 function:78 description:79 Specify the alternative function to be configured for the specified80 pins.81 enum: [ gpio, pwm ]82 83 bias-pull-down: true84 85 bias-pull-up: true86 87 bias-disable: true88 89 input-enable: true90 91 output-high: true92 93 output-low: true94 95 drive-push-pull: true96 97 drive-open-drain: true98 99 drive-open-source: true100 101 required:102 - pins103 - function104 105 additionalProperties: false106 107required:108 - compatible109 - reg110 - interrupts111 - interrupt-controller112 - '#interrupt-cells'113 - gpio-controller114 - '#gpio-cells'115 116additionalProperties: false117 118allOf:119 - $ref: pinctrl.yaml#120 121examples:122 - |123 #include <dt-bindings/interrupt-controller/arm-gic.h>124 #include <dt-bindings/interrupt-controller/irq.h>125 126 i2c {127 #address-cells = <1>;128 #size-cells = <0>;129 130 pinctrl@20 {131 compatible = "cypress,cy8c9520";132 reg = <0x20>;133 gpio-controller;134 #gpio-cells = <2>;135 #interrupt-cells = <2>;136 interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>;137 interrupt-controller;138 vdd-supply = <&p3v3>;139 gpio-reserved-ranges = <1 2>, <6 1>, <10 1>, <15 1>;140 141 pinctrl-0 = <&U62160_pins>, <&U62160_ipins>;142 pinctrl-names = "default";143 144 U62160_pins: cfg-pins {145 pins = "gp03", "gp16", "gp20", "gp50", "gp51";146 function = "gpio";147 input-enable;148 bias-pull-up;149 };150 151 U62160_ipins: icfg-pins {152 pins = "gp04", "gp17", "gp21", "gp52", "gp53";153 function = "gpio";154 input-enable;155 bias-pull-up;156 };157 };158 };159