1*29c10bceSNeil Armstrong# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2*29c10bceSNeil Armstrong# Copyright 2022 Linaro Ltd. 3*29c10bceSNeil Armstrong%YAML 1.2 4*29c10bceSNeil Armstrong--- 5*29c10bceSNeil Armstrong$id: http://devicetree.org/schemas/pinctrl/semtech,sx1501q.yaml# 6*29c10bceSNeil Armstrong$schema: http://devicetree.org/meta-schemas/core.yaml# 7*29c10bceSNeil Armstrong 8*29c10bceSNeil Armstrongtitle: Semtech SX150x GPIO expander 9*29c10bceSNeil Armstrong 10*29c10bceSNeil Armstrongmaintainers: 11*29c10bceSNeil Armstrong - Neil Armstrong <neil.armstrong@linaro.org> 12*29c10bceSNeil Armstrong 13*29c10bceSNeil Armstrongproperties: 14*29c10bceSNeil Armstrong compatible: 15*29c10bceSNeil Armstrong enum: 16*29c10bceSNeil Armstrong - semtech,sx1501q 17*29c10bceSNeil Armstrong - semtech,sx1502q 18*29c10bceSNeil Armstrong - semtech,sx1503q 19*29c10bceSNeil Armstrong - semtech,sx1504q 20*29c10bceSNeil Armstrong - semtech,sx1505q 21*29c10bceSNeil Armstrong - semtech,sx1506q 22*29c10bceSNeil Armstrong - semtech,sx1507q 23*29c10bceSNeil Armstrong - semtech,sx1508q 24*29c10bceSNeil Armstrong - semtech,sx1509q 25*29c10bceSNeil Armstrong 26*29c10bceSNeil Armstrong reg: 27*29c10bceSNeil Armstrong maxItems: 1 28*29c10bceSNeil Armstrong 29*29c10bceSNeil Armstrong interrupts: 30*29c10bceSNeil Armstrong maxItems: 1 31*29c10bceSNeil Armstrong 32*29c10bceSNeil Armstrong '#interrupt-cells': 33*29c10bceSNeil Armstrong const: 2 34*29c10bceSNeil Armstrong 35*29c10bceSNeil Armstrong interrupt-controller: true 36*29c10bceSNeil Armstrong 37*29c10bceSNeil Armstrong '#gpio-cells': 38*29c10bceSNeil Armstrong const: 2 39*29c10bceSNeil Armstrong 40*29c10bceSNeil Armstrong gpio-controller: true 41*29c10bceSNeil Armstrong 42*29c10bceSNeil Armstrong semtech,probe-reset: 43*29c10bceSNeil Armstrong description: Will trigger a reset of the GPIO expander on probe 44*29c10bceSNeil Armstrong type: boolean 45*29c10bceSNeil Armstrong 46*29c10bceSNeil ArmstrongpatternProperties: 47*29c10bceSNeil Armstrong '-cfg$': 48*29c10bceSNeil Armstrong type: object 49*29c10bceSNeil Armstrong properties: 50*29c10bceSNeil Armstrong pins: true 51*29c10bceSNeil Armstrong 52*29c10bceSNeil Armstrong bias-disable: true 53*29c10bceSNeil Armstrong bias-pull-up: true 54*29c10bceSNeil Armstrong bias-pull-down: true 55*29c10bceSNeil Armstrong bias-pull-pin-default: true 56*29c10bceSNeil Armstrong drive-push-pull: true 57*29c10bceSNeil Armstrong output-low: true 58*29c10bceSNeil Armstrong output-high: true 59*29c10bceSNeil Armstrong drive-open-drain: true 60*29c10bceSNeil Armstrong 61*29c10bceSNeil Armstrong required: 62*29c10bceSNeil Armstrong - pins 63*29c10bceSNeil Armstrong 64*29c10bceSNeil Armstrong allOf: 65*29c10bceSNeil Armstrong - $ref: "pincfg-node.yaml#" 66*29c10bceSNeil Armstrong - $ref: "pinmux-node.yaml#" 67*29c10bceSNeil Armstrong - if: 68*29c10bceSNeil Armstrong properties: 69*29c10bceSNeil Armstrong pins: 70*29c10bceSNeil Armstrong contains: 71*29c10bceSNeil Armstrong const: oscio 72*29c10bceSNeil Armstrong then: 73*29c10bceSNeil Armstrong properties: 74*29c10bceSNeil Armstrong bias-disable: false 75*29c10bceSNeil Armstrong bias-pull-up: false 76*29c10bceSNeil Armstrong bias-pull-down: false 77*29c10bceSNeil Armstrong bias-pull-pin-default: false 78*29c10bceSNeil Armstrong drive-open-drain: false 79*29c10bceSNeil Armstrong 80*29c10bceSNeil Armstrong additionalProperties: false 81*29c10bceSNeil Armstrong 82*29c10bceSNeil Armstrongrequired: 83*29c10bceSNeil Armstrong - compatible 84*29c10bceSNeil Armstrong - reg 85*29c10bceSNeil Armstrong - '#gpio-cells' 86*29c10bceSNeil Armstrong - gpio-controller 87*29c10bceSNeil Armstrong 88*29c10bceSNeil ArmstrongallOf: 89*29c10bceSNeil Armstrong - $ref: "pinctrl.yaml#" 90*29c10bceSNeil Armstrong - if: 91*29c10bceSNeil Armstrong not: 92*29c10bceSNeil Armstrong properties: 93*29c10bceSNeil Armstrong compatible: 94*29c10bceSNeil Armstrong contains: 95*29c10bceSNeil Armstrong enum: 96*29c10bceSNeil Armstrong - semtech,sx1507q 97*29c10bceSNeil Armstrong - semtech,sx1508q 98*29c10bceSNeil Armstrong - semtech,sx1509q 99*29c10bceSNeil Armstrong then: 100*29c10bceSNeil Armstrong properties: 101*29c10bceSNeil Armstrong semtech,probe-reset: false 102*29c10bceSNeil Armstrong - if: 103*29c10bceSNeil Armstrong properties: 104*29c10bceSNeil Armstrong compatible: 105*29c10bceSNeil Armstrong contains: 106*29c10bceSNeil Armstrong enum: 107*29c10bceSNeil Armstrong - semtech,sx1501q 108*29c10bceSNeil Armstrong - semtech,sx1504q 109*29c10bceSNeil Armstrong then: 110*29c10bceSNeil Armstrong patternProperties: 111*29c10bceSNeil Armstrong '-cfg$': 112*29c10bceSNeil Armstrong properties: 113*29c10bceSNeil Armstrong pins: 114*29c10bceSNeil Armstrong items: 115*29c10bceSNeil Armstrong pattern: '^gpio[0-3]$' 116*29c10bceSNeil Armstrong - if: 117*29c10bceSNeil Armstrong properties: 118*29c10bceSNeil Armstrong compatible: 119*29c10bceSNeil Armstrong contains: 120*29c10bceSNeil Armstrong enum: 121*29c10bceSNeil Armstrong - semtech,sx1502q 122*29c10bceSNeil Armstrong - semtech,sx1505q 123*29c10bceSNeil Armstrong then: 124*29c10bceSNeil Armstrong patternProperties: 125*29c10bceSNeil Armstrong '-cfg$': 126*29c10bceSNeil Armstrong properties: 127*29c10bceSNeil Armstrong pins: 128*29c10bceSNeil Armstrong items: 129*29c10bceSNeil Armstrong pattern: '^gpio[0-7]$' 130*29c10bceSNeil Armstrong - if: 131*29c10bceSNeil Armstrong properties: 132*29c10bceSNeil Armstrong compatible: 133*29c10bceSNeil Armstrong contains: 134*29c10bceSNeil Armstrong enum: 135*29c10bceSNeil Armstrong - semtech,sx1503q 136*29c10bceSNeil Armstrong - semtech,sx1506q 137*29c10bceSNeil Armstrong then: 138*29c10bceSNeil Armstrong patternProperties: 139*29c10bceSNeil Armstrong '-cfg$': 140*29c10bceSNeil Armstrong properties: 141*29c10bceSNeil Armstrong pins: 142*29c10bceSNeil Armstrong items: 143*29c10bceSNeil Armstrong pattern: '^gpio[0-15]$' 144*29c10bceSNeil Armstrong - if: 145*29c10bceSNeil Armstrong properties: 146*29c10bceSNeil Armstrong compatible: 147*29c10bceSNeil Armstrong contains: 148*29c10bceSNeil Armstrong const: semtech,sx1507q 149*29c10bceSNeil Armstrong then: 150*29c10bceSNeil Armstrong patternProperties: 151*29c10bceSNeil Armstrong '-cfg$': 152*29c10bceSNeil Armstrong properties: 153*29c10bceSNeil Armstrong pins: 154*29c10bceSNeil Armstrong items: 155*29c10bceSNeil Armstrong pattern: '^(oscio|gpio[0-3])$' 156*29c10bceSNeil Armstrong - if: 157*29c10bceSNeil Armstrong properties: 158*29c10bceSNeil Armstrong compatible: 159*29c10bceSNeil Armstrong contains: 160*29c10bceSNeil Armstrong const: semtech,sx1508q 161*29c10bceSNeil Armstrong then: 162*29c10bceSNeil Armstrong patternProperties: 163*29c10bceSNeil Armstrong '-cfg$': 164*29c10bceSNeil Armstrong properties: 165*29c10bceSNeil Armstrong pins: 166*29c10bceSNeil Armstrong items: 167*29c10bceSNeil Armstrong pattern: '^(oscio|gpio[0-7])$' 168*29c10bceSNeil Armstrong - if: 169*29c10bceSNeil Armstrong properties: 170*29c10bceSNeil Armstrong compatible: 171*29c10bceSNeil Armstrong contains: 172*29c10bceSNeil Armstrong const: semtech,sx1509q 173*29c10bceSNeil Armstrong then: 174*29c10bceSNeil Armstrong patternProperties: 175*29c10bceSNeil Armstrong '-cfg$': 176*29c10bceSNeil Armstrong properties: 177*29c10bceSNeil Armstrong pins: 178*29c10bceSNeil Armstrong items: 179*29c10bceSNeil Armstrong pattern: '^(oscio|gpio[0-15])$' 180*29c10bceSNeil Armstrong 181*29c10bceSNeil ArmstrongadditionalProperties: false 182*29c10bceSNeil Armstrong 183*29c10bceSNeil Armstrongexamples: 184*29c10bceSNeil Armstrong - | 185*29c10bceSNeil Armstrong #include <dt-bindings/interrupt-controller/irq.h> 186*29c10bceSNeil Armstrong i2c@1000 { 187*29c10bceSNeil Armstrong reg = <0x1000 0x80>; 188*29c10bceSNeil Armstrong #address-cells = <1>; 189*29c10bceSNeil Armstrong #size-cells = <0>; 190*29c10bceSNeil Armstrong 191*29c10bceSNeil Armstrong pinctrl@20 { 192*29c10bceSNeil Armstrong compatible = "semtech,sx1501q"; 193*29c10bceSNeil Armstrong reg = <0x20>; 194*29c10bceSNeil Armstrong 195*29c10bceSNeil Armstrong #gpio-cells = <2>; 196*29c10bceSNeil Armstrong #interrupt-cells = <2>; 197*29c10bceSNeil Armstrong 198*29c10bceSNeil Armstrong interrupts = <16 IRQ_TYPE_EDGE_FALLING>; 199*29c10bceSNeil Armstrong 200*29c10bceSNeil Armstrong gpio-controller; 201*29c10bceSNeil Armstrong interrupt-controller; 202*29c10bceSNeil Armstrong 203*29c10bceSNeil Armstrong gpio1-cfg { 204*29c10bceSNeil Armstrong pins = "gpio1"; 205*29c10bceSNeil Armstrong bias-pull-up; 206*29c10bceSNeil Armstrong }; 207*29c10bceSNeil Armstrong }; 208*29c10bceSNeil Armstrong }; 209