Path: blob/master/Documentation/devicetree/bindings/gpio/gpio-mxs.yaml
52487 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: 13031'#size-cells':32const: 03334reg:35maxItems: 13637patternProperties:38'^(?!gpio@)[^@]+@[0-9]+$':39type: object40properties:41fsl,pinmux-ids:42$ref: /schemas/types.yaml#/definitions/uint32-array43description: |44An integer array. Each integer in the array specify a pin45with given mux function, with bank, pin and mux packed as below.4647[15..12] : bank number48[11..4] : pin number49[3..0] : mux selection5051This integer with mux selection packed is used as an entity by both group52and config nodes to identify a pin. The mux selection in the integer takes53effects only on group node, and will get ignored by driver with config node,54since config node is only meant to set up pin configurations.5556Valid values for these integers are listed below.5758reg:59items:60- description: |61pin group index. NOTE: it is supposed wrong use reg property62here. But it is over 10 years devices. Just keep it as it.6364fsl,drive-strength:65$ref: /schemas/types.yaml#/definitions/uint3266enum: [0, 1, 2, 3]67description: |680: MXS_DRIVE_4mA691: MXS_DRIVE_8mA702: MXS_DRIVE_12mA713: MXS_DRIVE_16mA7273fsl,voltage:74$ref: /schemas/types.yaml#/definitions/uint3275enum: [0, 1]76description: |770: MXS_VOLTAGE_LOW - 1.8 V781: MXS_VOLTAGE_HIGH - 3.3 V7980fsl,pull-up:81$ref: /schemas/types.yaml#/definitions/uint3282enum: [0, 1]83description: |840: MXS_PULL_DISABLE - Disable the internal pull-up851: MXS_PULL_ENABLE - Enable the internal pull-up8687Note that when enabling the pull-up, the internal pad keeper gets disabled.88Also, some pins doesn't have a pull up, in that case, setting the fsl,pull-up89will only disable the internal pad keeper.9091required:92- fsl,pinmux-ids9394additionalProperties: false9596'^gpio@[0-9]+$':97type: object98properties:99compatible:100enum:101- fsl,imx23-gpio102- fsl,imx28-gpio103104reg:105maxItems: 1106107interrupts:108description: Should be the port interrupt shared by all 32 pins.109maxItems: 1110111interrupt-controller: true112113'#interrupt-cells':114const: 2115116'#gpio-cells':117const: 2118119gpio-controller: true120121required:122- compatible123- reg124- interrupts125- interrupt-controller126- '#interrupt-cells'127- '#gpio-cells'128- gpio-controller129130additionalProperties: false131132required:133- compatible134- reg135- '#address-cells'136- '#size-cells'137138additionalProperties: false139140examples:141- |142pinctrl@80018000 {143#address-cells = <1>;144#size-cells = <0>;145compatible = "fsl,imx28-pinctrl", "simple-bus";146reg = <0x80018000 0x2000>;147148gpio@0 {149compatible = "fsl,imx28-gpio";150reg = <0>;151interrupts = <127>;152gpio-controller;153#gpio-cells = <2>;154interrupt-controller;155#interrupt-cells = <2>;156};157158gpio@1 {159compatible = "fsl,imx28-gpio";160reg = <1>;161interrupts = <126>;162gpio-controller;163#gpio-cells = <2>;164interrupt-controller;165#interrupt-cells = <2>;166};167168gpio@2 {169compatible = "fsl,imx28-gpio";170reg = <2>;171interrupts = <125>;172gpio-controller;173#gpio-cells = <2>;174interrupt-controller;175#interrupt-cells = <2>;176};177178gpio@3 {179compatible = "fsl,imx28-gpio";180reg = <3>;181interrupts = <124>;182gpio-controller;183#gpio-cells = <2>;184interrupt-controller;185#interrupt-cells = <2>;186};187188gpio@4 {189compatible = "fsl,imx28-gpio";190reg = <4>;191interrupts = <123>;192gpio-controller;193#gpio-cells = <2>;194interrupt-controller;195#interrupt-cells = <2>;196};197198lcdif-apx4@5 {199reg = <5>;200fsl,pinmux-ids = <0x1181 0x1191>;201fsl,drive-strength = <0>;202fsl,voltage = <0>;203fsl,pull-up = <0>;204};205};206207208