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: 48*8e4cc358SNaresh Solanki minItems: 1 49*8e4cc358SNaresh Solanki maxItems: 60 508d39e55eSPatrick Rudolph 518d39e55eSPatrick Rudolph vdd-supply: 528d39e55eSPatrick Rudolph description: 538d39e55eSPatrick Rudolph Optional power supply. 548d39e55eSPatrick Rudolph 55a4f1d0ddSPatrick Rudolph reset-gpios: 56a4f1d0ddSPatrick Rudolph description: GPIO connected to the XRES pin 57a4f1d0ddSPatrick Rudolph maxItems: 1 58a4f1d0ddSPatrick Rudolph 598d39e55eSPatrick RudolphpatternProperties: 608d39e55eSPatrick Rudolph '-pins$': 618d39e55eSPatrick Rudolph type: object 628d39e55eSPatrick Rudolph description: 638d39e55eSPatrick Rudolph Pinctrl node's client devices use subnodes for desired pin configuration. 648d39e55eSPatrick Rudolph Client device subnodes use below standard properties. 658d39e55eSPatrick Rudolph $ref: pincfg-node.yaml# 668d39e55eSPatrick Rudolph 678d39e55eSPatrick Rudolph properties: 688d39e55eSPatrick Rudolph pins: 698d39e55eSPatrick Rudolph description: 708d39e55eSPatrick Rudolph List of gpio pins affected by the properties specified in this 718d39e55eSPatrick Rudolph subnode. 728d39e55eSPatrick Rudolph items: 738d39e55eSPatrick Rudolph pattern: '^gp([0-7][0-7])$' 748d39e55eSPatrick Rudolph minItems: 1 758d39e55eSPatrick Rudolph maxItems: 60 768d39e55eSPatrick Rudolph 778d39e55eSPatrick Rudolph function: 788d39e55eSPatrick Rudolph description: 798d39e55eSPatrick Rudolph Specify the alternative function to be configured for the specified 808d39e55eSPatrick Rudolph pins. 818d39e55eSPatrick Rudolph enum: [ gpio, pwm ] 828d39e55eSPatrick Rudolph 838d39e55eSPatrick Rudolph bias-pull-down: true 848d39e55eSPatrick Rudolph 858d39e55eSPatrick Rudolph bias-pull-up: true 868d39e55eSPatrick Rudolph 878d39e55eSPatrick Rudolph bias-disable: true 888d39e55eSPatrick Rudolph 89*8e4cc358SNaresh Solanki input-enable: true 90*8e4cc358SNaresh Solanki 918d39e55eSPatrick Rudolph output-high: true 928d39e55eSPatrick Rudolph 938d39e55eSPatrick Rudolph output-low: true 948d39e55eSPatrick Rudolph 958d39e55eSPatrick Rudolph drive-push-pull: true 968d39e55eSPatrick Rudolph 978d39e55eSPatrick Rudolph drive-open-drain: true 988d39e55eSPatrick Rudolph 998d39e55eSPatrick Rudolph drive-open-source: true 1008d39e55eSPatrick Rudolph 1018d39e55eSPatrick Rudolph required: 1028d39e55eSPatrick Rudolph - pins 1038d39e55eSPatrick Rudolph - function 1048d39e55eSPatrick Rudolph 1058d39e55eSPatrick Rudolph additionalProperties: false 1068d39e55eSPatrick Rudolph 1078d39e55eSPatrick Rudolphrequired: 1088d39e55eSPatrick Rudolph - compatible 1098d39e55eSPatrick Rudolph - reg 1108d39e55eSPatrick Rudolph - interrupts 1118d39e55eSPatrick Rudolph - interrupt-controller 1128d39e55eSPatrick Rudolph - '#interrupt-cells' 1138d39e55eSPatrick Rudolph - gpio-controller 1148d39e55eSPatrick Rudolph - '#gpio-cells' 1158d39e55eSPatrick Rudolph 1168d39e55eSPatrick RudolphadditionalProperties: false 1178d39e55eSPatrick Rudolph 1188d39e55eSPatrick RudolphallOf: 11949cd1dd1SRob Herring - $ref: pinctrl.yaml# 1208d39e55eSPatrick Rudolph 1218d39e55eSPatrick Rudolphexamples: 1228d39e55eSPatrick Rudolph - | 1238d39e55eSPatrick Rudolph #include <dt-bindings/interrupt-controller/arm-gic.h> 1248d39e55eSPatrick Rudolph #include <dt-bindings/interrupt-controller/irq.h> 1258d39e55eSPatrick Rudolph 1268d39e55eSPatrick Rudolph i2c { 1278d39e55eSPatrick Rudolph #address-cells = <1>; 1288d39e55eSPatrick Rudolph #size-cells = <0>; 1298d39e55eSPatrick Rudolph 1308d39e55eSPatrick Rudolph pinctrl@20 { 1318d39e55eSPatrick Rudolph compatible = "cypress,cy8c9520"; 1328d39e55eSPatrick Rudolph reg = <0x20>; 1338d39e55eSPatrick Rudolph gpio-controller; 1348d39e55eSPatrick Rudolph #gpio-cells = <2>; 1358d39e55eSPatrick Rudolph #interrupt-cells = <2>; 1368d39e55eSPatrick Rudolph interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>; 1378d39e55eSPatrick Rudolph interrupt-controller; 1388d39e55eSPatrick Rudolph vdd-supply = <&p3v3>; 139*8e4cc358SNaresh Solanki gpio-reserved-ranges = <1 2>, <6 1>, <10 1>, <15 1>; 140*8e4cc358SNaresh Solanki 141*8e4cc358SNaresh Solanki pinctrl-0 = <&U62160_pins>, <&U62160_ipins>; 142*8e4cc358SNaresh Solanki pinctrl-names = "default"; 143*8e4cc358SNaresh Solanki 144*8e4cc358SNaresh Solanki U62160_pins: cfg-pins { 145*8e4cc358SNaresh Solanki pins = "gp03", "gp16", "gp20", "gp50", "gp51"; 146*8e4cc358SNaresh Solanki function = "gpio"; 147*8e4cc358SNaresh Solanki input-enable; 148*8e4cc358SNaresh Solanki bias-pull-up; 149*8e4cc358SNaresh Solanki }; 150*8e4cc358SNaresh Solanki 151*8e4cc358SNaresh Solanki U62160_ipins: icfg-pins { 152*8e4cc358SNaresh Solanki pins = "gp04", "gp17", "gp21", "gp52", "gp53"; 153*8e4cc358SNaresh Solanki function = "gpio"; 154*8e4cc358SNaresh Solanki input-enable; 155*8e4cc358SNaresh Solanki bias-pull-up; 156*8e4cc358SNaresh Solanki }; 1578d39e55eSPatrick Rudolph }; 1588d39e55eSPatrick Rudolph }; 159