129c10bceSNeil Armstrong# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 229c10bceSNeil Armstrong# Copyright 2022 Linaro Ltd. 329c10bceSNeil Armstrong%YAML 1.2 429c10bceSNeil Armstrong--- 529c10bceSNeil Armstrong$id: http://devicetree.org/schemas/pinctrl/semtech,sx1501q.yaml# 629c10bceSNeil Armstrong$schema: http://devicetree.org/meta-schemas/core.yaml# 729c10bceSNeil Armstrong 829c10bceSNeil Armstrongtitle: Semtech SX150x GPIO expander 929c10bceSNeil Armstrong 1029c10bceSNeil Armstrongmaintainers: 1129c10bceSNeil Armstrong - Neil Armstrong <neil.armstrong@linaro.org> 1229c10bceSNeil Armstrong 1329c10bceSNeil Armstrongproperties: 1429c10bceSNeil Armstrong compatible: 1529c10bceSNeil Armstrong enum: 1629c10bceSNeil Armstrong - semtech,sx1501q 1729c10bceSNeil Armstrong - semtech,sx1502q 1829c10bceSNeil Armstrong - semtech,sx1503q 1929c10bceSNeil Armstrong - semtech,sx1504q 2029c10bceSNeil Armstrong - semtech,sx1505q 2129c10bceSNeil Armstrong - semtech,sx1506q 2229c10bceSNeil Armstrong - semtech,sx1507q 2329c10bceSNeil Armstrong - semtech,sx1508q 2429c10bceSNeil Armstrong - semtech,sx1509q 2529c10bceSNeil Armstrong 2629c10bceSNeil Armstrong reg: 2729c10bceSNeil Armstrong maxItems: 1 2829c10bceSNeil Armstrong 2929c10bceSNeil Armstrong interrupts: 3029c10bceSNeil Armstrong maxItems: 1 3129c10bceSNeil Armstrong 3229c10bceSNeil Armstrong '#interrupt-cells': 3329c10bceSNeil Armstrong const: 2 3429c10bceSNeil Armstrong 3529c10bceSNeil Armstrong interrupt-controller: true 3629c10bceSNeil Armstrong 3729c10bceSNeil Armstrong '#gpio-cells': 3829c10bceSNeil Armstrong const: 2 3929c10bceSNeil Armstrong 4029c10bceSNeil Armstrong gpio-controller: true 4129c10bceSNeil Armstrong 4229c10bceSNeil Armstrong semtech,probe-reset: 4329c10bceSNeil Armstrong description: Will trigger a reset of the GPIO expander on probe 4429c10bceSNeil Armstrong type: boolean 4529c10bceSNeil Armstrong 4629c10bceSNeil ArmstrongpatternProperties: 4729c10bceSNeil Armstrong '-cfg$': 4829c10bceSNeil Armstrong type: object 4929c10bceSNeil Armstrong properties: 5029c10bceSNeil Armstrong pins: true 5129c10bceSNeil Armstrong 5229c10bceSNeil Armstrong bias-disable: true 5329c10bceSNeil Armstrong bias-pull-up: true 5429c10bceSNeil Armstrong bias-pull-down: true 5529c10bceSNeil Armstrong bias-pull-pin-default: true 5629c10bceSNeil Armstrong drive-push-pull: true 5729c10bceSNeil Armstrong output-low: true 5829c10bceSNeil Armstrong output-high: true 5929c10bceSNeil Armstrong drive-open-drain: true 6029c10bceSNeil Armstrong 6129c10bceSNeil Armstrong required: 6229c10bceSNeil Armstrong - pins 6329c10bceSNeil Armstrong 6429c10bceSNeil Armstrong allOf: 65*49cd1dd1SRob Herring - $ref: pincfg-node.yaml# 66*49cd1dd1SRob Herring - $ref: pinmux-node.yaml# 6729c10bceSNeil Armstrong - if: 6829c10bceSNeil Armstrong properties: 6929c10bceSNeil Armstrong pins: 7029c10bceSNeil Armstrong contains: 7129c10bceSNeil Armstrong const: oscio 7229c10bceSNeil Armstrong then: 7329c10bceSNeil Armstrong properties: 7429c10bceSNeil Armstrong bias-disable: false 7529c10bceSNeil Armstrong bias-pull-up: false 7629c10bceSNeil Armstrong bias-pull-down: false 7729c10bceSNeil Armstrong bias-pull-pin-default: false 7829c10bceSNeil Armstrong drive-open-drain: false 7929c10bceSNeil Armstrong 8029c10bceSNeil Armstrong additionalProperties: false 8129c10bceSNeil Armstrong 8229c10bceSNeil Armstrongrequired: 8329c10bceSNeil Armstrong - compatible 8429c10bceSNeil Armstrong - reg 8529c10bceSNeil Armstrong - '#gpio-cells' 8629c10bceSNeil Armstrong - gpio-controller 8729c10bceSNeil Armstrong 8829c10bceSNeil ArmstrongallOf: 89*49cd1dd1SRob Herring - $ref: pinctrl.yaml# 9029c10bceSNeil Armstrong - if: 9129c10bceSNeil Armstrong not: 9229c10bceSNeil Armstrong properties: 9329c10bceSNeil Armstrong compatible: 9429c10bceSNeil Armstrong contains: 9529c10bceSNeil Armstrong enum: 9629c10bceSNeil Armstrong - semtech,sx1507q 9729c10bceSNeil Armstrong - semtech,sx1508q 9829c10bceSNeil Armstrong - semtech,sx1509q 9929c10bceSNeil Armstrong then: 10029c10bceSNeil Armstrong properties: 10129c10bceSNeil Armstrong semtech,probe-reset: false 10229c10bceSNeil Armstrong - if: 10329c10bceSNeil Armstrong properties: 10429c10bceSNeil Armstrong compatible: 10529c10bceSNeil Armstrong contains: 10629c10bceSNeil Armstrong enum: 10729c10bceSNeil Armstrong - semtech,sx1501q 10829c10bceSNeil Armstrong - semtech,sx1504q 10929c10bceSNeil Armstrong then: 11029c10bceSNeil Armstrong patternProperties: 11129c10bceSNeil Armstrong '-cfg$': 11229c10bceSNeil Armstrong properties: 11329c10bceSNeil Armstrong pins: 11429c10bceSNeil Armstrong items: 11529c10bceSNeil Armstrong pattern: '^gpio[0-3]$' 11629c10bceSNeil Armstrong - if: 11729c10bceSNeil Armstrong properties: 11829c10bceSNeil Armstrong compatible: 11929c10bceSNeil Armstrong contains: 12029c10bceSNeil Armstrong enum: 12129c10bceSNeil Armstrong - semtech,sx1502q 12229c10bceSNeil Armstrong - semtech,sx1505q 12329c10bceSNeil Armstrong then: 12429c10bceSNeil Armstrong patternProperties: 12529c10bceSNeil Armstrong '-cfg$': 12629c10bceSNeil Armstrong properties: 12729c10bceSNeil Armstrong pins: 12829c10bceSNeil Armstrong items: 12929c10bceSNeil Armstrong pattern: '^gpio[0-7]$' 13029c10bceSNeil Armstrong - if: 13129c10bceSNeil Armstrong properties: 13229c10bceSNeil Armstrong compatible: 13329c10bceSNeil Armstrong contains: 13429c10bceSNeil Armstrong enum: 13529c10bceSNeil Armstrong - semtech,sx1503q 13629c10bceSNeil Armstrong - semtech,sx1506q 13729c10bceSNeil Armstrong then: 13829c10bceSNeil Armstrong patternProperties: 13929c10bceSNeil Armstrong '-cfg$': 14029c10bceSNeil Armstrong properties: 14129c10bceSNeil Armstrong pins: 14229c10bceSNeil Armstrong items: 143c8b2eb7aSNeil Armstrong pattern: '^(gpio[0-9]|gpio1[0-5])$' 14429c10bceSNeil Armstrong - if: 14529c10bceSNeil Armstrong properties: 14629c10bceSNeil Armstrong compatible: 14729c10bceSNeil Armstrong contains: 14829c10bceSNeil Armstrong const: semtech,sx1507q 14929c10bceSNeil Armstrong then: 15029c10bceSNeil Armstrong patternProperties: 15129c10bceSNeil Armstrong '-cfg$': 15229c10bceSNeil Armstrong properties: 15329c10bceSNeil Armstrong pins: 15429c10bceSNeil Armstrong items: 15529c10bceSNeil Armstrong pattern: '^(oscio|gpio[0-3])$' 15629c10bceSNeil Armstrong - if: 15729c10bceSNeil Armstrong properties: 15829c10bceSNeil Armstrong compatible: 15929c10bceSNeil Armstrong contains: 16029c10bceSNeil Armstrong const: semtech,sx1508q 16129c10bceSNeil Armstrong then: 16229c10bceSNeil Armstrong patternProperties: 16329c10bceSNeil Armstrong '-cfg$': 16429c10bceSNeil Armstrong properties: 16529c10bceSNeil Armstrong pins: 16629c10bceSNeil Armstrong items: 16729c10bceSNeil Armstrong pattern: '^(oscio|gpio[0-7])$' 16829c10bceSNeil Armstrong - if: 16929c10bceSNeil Armstrong properties: 17029c10bceSNeil Armstrong compatible: 17129c10bceSNeil Armstrong contains: 17229c10bceSNeil Armstrong const: semtech,sx1509q 17329c10bceSNeil Armstrong then: 17429c10bceSNeil Armstrong patternProperties: 17529c10bceSNeil Armstrong '-cfg$': 17629c10bceSNeil Armstrong properties: 17729c10bceSNeil Armstrong pins: 17829c10bceSNeil Armstrong items: 179c8b2eb7aSNeil Armstrong pattern: '^(oscio|gpio[0-9]|gpio1[0-5])$' 18029c10bceSNeil Armstrong 18129c10bceSNeil ArmstrongadditionalProperties: false 18229c10bceSNeil Armstrong 18329c10bceSNeil Armstrongexamples: 18429c10bceSNeil Armstrong - | 18529c10bceSNeil Armstrong #include <dt-bindings/interrupt-controller/irq.h> 18629c10bceSNeil Armstrong i2c@1000 { 18729c10bceSNeil Armstrong reg = <0x1000 0x80>; 18829c10bceSNeil Armstrong #address-cells = <1>; 18929c10bceSNeil Armstrong #size-cells = <0>; 19029c10bceSNeil Armstrong 19129c10bceSNeil Armstrong pinctrl@20 { 19229c10bceSNeil Armstrong compatible = "semtech,sx1501q"; 19329c10bceSNeil Armstrong reg = <0x20>; 19429c10bceSNeil Armstrong 19529c10bceSNeil Armstrong #gpio-cells = <2>; 19629c10bceSNeil Armstrong #interrupt-cells = <2>; 19729c10bceSNeil Armstrong 19829c10bceSNeil Armstrong interrupts = <16 IRQ_TYPE_EDGE_FALLING>; 19929c10bceSNeil Armstrong 20029c10bceSNeil Armstrong gpio-controller; 20129c10bceSNeil Armstrong interrupt-controller; 20229c10bceSNeil Armstrong 20329c10bceSNeil Armstrong gpio1-cfg { 20429c10bceSNeil Armstrong pins = "gpio1"; 20529c10bceSNeil Armstrong bias-pull-up; 20629c10bceSNeil Armstrong }; 20729c10bceSNeil Armstrong }; 20829c10bceSNeil Armstrong }; 209