209 lines · yaml
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)2# Copyright 2022 Linaro Ltd.3%YAML 1.24---5$id: http://devicetree.org/schemas/pinctrl/semtech,sx1501q.yaml#6$schema: http://devicetree.org/meta-schemas/core.yaml#7 8title: Semtech SX150x GPIO expander9 10maintainers:11 - Neil Armstrong <neil.armstrong@linaro.org>12 13properties:14 compatible:15 enum:16 - semtech,sx1501q17 - semtech,sx1502q18 - semtech,sx1503q19 - semtech,sx1504q20 - semtech,sx1505q21 - semtech,sx1506q22 - semtech,sx1507q23 - semtech,sx1508q24 - semtech,sx1509q25 26 reg:27 maxItems: 128 29 interrupts:30 maxItems: 131 32 '#interrupt-cells':33 const: 234 35 interrupt-controller: true36 37 '#gpio-cells':38 const: 239 40 gpio-controller: true41 42 semtech,probe-reset:43 description: Will trigger a reset of the GPIO expander on probe44 type: boolean45 46patternProperties:47 '-cfg$':48 type: object49 properties:50 pins: true51 52 bias-disable: true53 bias-pull-up: true54 bias-pull-down: true55 bias-pull-pin-default: true56 drive-push-pull: true57 output-low: true58 output-high: true59 drive-open-drain: true60 61 required:62 - pins63 64 allOf:65 - $ref: pincfg-node.yaml#66 - $ref: pinmux-node.yaml#67 - if:68 properties:69 pins:70 contains:71 const: oscio72 then:73 properties:74 bias-disable: false75 bias-pull-up: false76 bias-pull-down: false77 bias-pull-pin-default: false78 drive-open-drain: false79 80 additionalProperties: false81 82required:83 - compatible84 - reg85 - '#gpio-cells'86 - gpio-controller87 88allOf:89 - $ref: pinctrl.yaml#90 - if:91 not:92 properties:93 compatible:94 contains:95 enum:96 - semtech,sx1507q97 - semtech,sx1508q98 - semtech,sx1509q99 then:100 properties:101 semtech,probe-reset: false102 - if:103 properties:104 compatible:105 contains:106 enum:107 - semtech,sx1501q108 - semtech,sx1504q109 then:110 patternProperties:111 '-cfg$':112 properties:113 pins:114 items:115 pattern: '^gpio[0-3]$'116 - if:117 properties:118 compatible:119 contains:120 enum:121 - semtech,sx1502q122 - semtech,sx1505q123 then:124 patternProperties:125 '-cfg$':126 properties:127 pins:128 items:129 pattern: '^gpio[0-7]$'130 - if:131 properties:132 compatible:133 contains:134 enum:135 - semtech,sx1503q136 - semtech,sx1506q137 then:138 patternProperties:139 '-cfg$':140 properties:141 pins:142 items:143 pattern: '^(gpio[0-9]|gpio1[0-5])$'144 - if:145 properties:146 compatible:147 contains:148 const: semtech,sx1507q149 then:150 patternProperties:151 '-cfg$':152 properties:153 pins:154 items:155 pattern: '^(oscio|gpio[0-3])$'156 - if:157 properties:158 compatible:159 contains:160 const: semtech,sx1508q161 then:162 patternProperties:163 '-cfg$':164 properties:165 pins:166 items:167 pattern: '^(oscio|gpio[0-7])$'168 - if:169 properties:170 compatible:171 contains:172 const: semtech,sx1509q173 then:174 patternProperties:175 '-cfg$':176 properties:177 pins:178 items:179 pattern: '^(oscio|gpio[0-9]|gpio1[0-5])$'180 181additionalProperties: false182 183examples:184 - |185 #include <dt-bindings/interrupt-controller/irq.h>186 i2c@1000 {187 reg = <0x1000 0x80>;188 #address-cells = <1>;189 #size-cells = <0>;190 191 pinctrl@20 {192 compatible = "semtech,sx1501q";193 reg = <0x20>;194 195 #gpio-cells = <2>;196 #interrupt-cells = <2>;197 198 interrupts = <16 IRQ_TYPE_EDGE_FALLING>;199 200 gpio-controller;201 interrupt-controller;202 203 gpio1-cfg {204 pins = "gpio1";205 bias-pull-up;206 };207 };208 };209