Path: blob/master/Documentation/devicetree/bindings/gpio/gpio-mxs.yaml
29282 views
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)1%YAML 1.22---3$id: http://devicetree.org/schemas/gpio/gpio-mxs.yaml#4$schema: http://devicetree.org/meta-schemas/core.yaml#56title: Freescale MXS GPIO controller78maintainers:9- Shawn Guo <shawnguo@kernel.org>1011description: |12The Freescale MXS GPIO controller is part of MXS PIN controller.13The GPIOs are organized in port/bank, each port consists of 32 GPIOs.14As the GPIO controller is embedded in the PIN controller and all the15GPIO ports share the same IO space with PIN controller, the GPIO node16will be represented as sub-nodes of MXS pinctrl node.1718properties:19compatible:20items:21- enum:22- fsl,imx23-pinctrl23- fsl,imx28-pinctrl24# Over 10 years old devices, driver use simple-bus to probe child gpio25# Devices. Keep it as it to be compatible existed dts files.26- const: simple-bus2728'#address-cells':29const: 130'#size-cells':31const: 03233reg:34maxItems: 13536patternProperties:37"^(?!gpio@)[^@]+@[0-9]+$":38type: object39properties:40fsl,pinmux-ids:41$ref: /schemas/types.yaml#/definitions/uint32-array42description: |43An integer array. Each integer in the array specify a pin44with given mux function, with bank, pin and mux packed as below.4546[15..12] : bank number47[11..4] : pin number48[3..0] : mux selection4950This integer with mux selection packed is used as an entity by both group51and config nodes to identify a pin. The mux selection in the integer takes52effects only on group node, and will get ignored by driver with config node,53since config node is only meant to set up pin configurations.5455Valid values for these integers are listed below.5657reg:58items:59- description: |60pin group index. NOTE: it is supposed wrong use reg property61here. But it is over 10 years devices. Just keep it as it.6263fsl,drive-strength:64$ref: /schemas/types.yaml#/definitions/uint3265enum: [0, 1, 2, 3]66description: |670: MXS_DRIVE_4mA681: MXS_DRIVE_8mA692: MXS_DRIVE_12mA703: MXS_DRIVE_16mA7172fsl,voltage:73$ref: /schemas/types.yaml#/definitions/uint3274enum: [0, 1]75description: |760: MXS_VOLTAGE_LOW - 1.8 V771: MXS_VOLTAGE_HIGH - 3.3 V7879fsl,pull-up:80$ref: /schemas/types.yaml#/definitions/uint3281enum: [0, 1]82description: |830: MXS_PULL_DISABLE - Disable the internal pull-up841: MXS_PULL_ENABLE - Enable the internal pull-up8586Note that when enabling the pull-up, the internal pad keeper gets disabled.87Also, some pins doesn't have a pull up, in that case, setting the fsl,pull-up88will only disable the internal pad keeper.8990required:91- fsl,pinmux-ids9293additionalProperties: false9495"^gpio@[0-9]+$":96type: object97properties:98compatible:99enum:100- fsl,imx23-gpio101- fsl,imx28-gpio102103reg:104maxItems: 1105106interrupts:107description: Should be the port interrupt shared by all 32 pins.108maxItems: 1109110interrupt-controller: true111112"#interrupt-cells":113const: 2114115"#gpio-cells":116const: 2117118gpio-controller: true119120required:121- compatible122- reg123- interrupts124- interrupt-controller125- "#interrupt-cells"126- "#gpio-cells"127- gpio-controller128129additionalProperties: false130131required:132- compatible133- reg134- '#address-cells'135- '#size-cells'136137additionalProperties: false138139examples:140- |141pinctrl@80018000 {142#address-cells = <1>;143#size-cells = <0>;144compatible = "fsl,imx28-pinctrl", "simple-bus";145reg = <0x80018000 0x2000>;146147gpio@0 {148compatible = "fsl,imx28-gpio";149reg = <0>;150interrupts = <127>;151gpio-controller;152#gpio-cells = <2>;153interrupt-controller;154#interrupt-cells = <2>;155};156157gpio@1 {158compatible = "fsl,imx28-gpio";159reg = <1>;160interrupts = <126>;161gpio-controller;162#gpio-cells = <2>;163interrupt-controller;164#interrupt-cells = <2>;165};166167gpio@2 {168compatible = "fsl,imx28-gpio";169reg = <2>;170interrupts = <125>;171gpio-controller;172#gpio-cells = <2>;173interrupt-controller;174#interrupt-cells = <2>;175};176177gpio@3 {178compatible = "fsl,imx28-gpio";179reg = <3>;180interrupts = <124>;181gpio-controller;182#gpio-cells = <2>;183interrupt-controller;184#interrupt-cells = <2>;185};186187gpio@4 {188compatible = "fsl,imx28-gpio";189reg = <4>;190interrupts = <123>;191gpio-controller;192#gpio-cells = <2>;193interrupt-controller;194#interrupt-cells = <2>;195};196197lcdif-apx4@5 {198reg = <5>;199fsl,pinmux-ids = <0x1181 0x1191>;200fsl,drive-strength = <0>;201fsl,voltage = <0>;202fsl,pull-up = <0>;203};204};205206207