xref: /freebsd/sys/contrib/device-tree/Bindings/gpio/ti,omap-gpio.yaml (revision 8bab661a3316d8bd9b9fbd11a3b4371b91507bd2)
15956d97fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
25956d97fSEmmanuel Vadot%YAML 1.2
35956d97fSEmmanuel Vadot---
45956d97fSEmmanuel Vadot$id: http://devicetree.org/schemas/gpio/ti,omap-gpio.yaml#
55956d97fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
65956d97fSEmmanuel Vadot
7*8bab661aSEmmanuel Vadottitle: OMAP GPIO controller
85956d97fSEmmanuel Vadot
95956d97fSEmmanuel Vadotmaintainers:
105956d97fSEmmanuel Vadot  - Grygorii Strashko <grygorii.strashko@ti.com>
115956d97fSEmmanuel Vadot
125956d97fSEmmanuel Vadotdescription: |
135956d97fSEmmanuel Vadot  The general-purpose interface combines general-purpose input/output (GPIO) banks.
145956d97fSEmmanuel Vadot  Each GPIO banks provides up to 32 dedicated general-purpose pins with input
155956d97fSEmmanuel Vadot  and output capabilities; interrupt generation in active mode and wake-up
165956d97fSEmmanuel Vadot  request generation in idle mode upon the detection of external events.
175956d97fSEmmanuel Vadot
185956d97fSEmmanuel Vadotproperties:
195956d97fSEmmanuel Vadot  compatible:
205956d97fSEmmanuel Vadot    oneOf:
215956d97fSEmmanuel Vadot      - enum:
225956d97fSEmmanuel Vadot          - ti,omap2-gpio
235956d97fSEmmanuel Vadot          - ti,omap3-gpio
245956d97fSEmmanuel Vadot          - ti,omap4-gpio
255956d97fSEmmanuel Vadot      - items:
265956d97fSEmmanuel Vadot          - const: ti,am4372-gpio
275956d97fSEmmanuel Vadot          - const: ti,omap4-gpio
285956d97fSEmmanuel Vadot
295956d97fSEmmanuel Vadot  reg:
305956d97fSEmmanuel Vadot    maxItems: 1
315956d97fSEmmanuel Vadot
325956d97fSEmmanuel Vadot  gpio-controller: true
335956d97fSEmmanuel Vadot
345956d97fSEmmanuel Vadot  '#gpio-cells':
355956d97fSEmmanuel Vadot    const: 2
365956d97fSEmmanuel Vadot
375956d97fSEmmanuel Vadot  interrupt-controller: true
385956d97fSEmmanuel Vadot
395956d97fSEmmanuel Vadot  '#interrupt-cells':
405956d97fSEmmanuel Vadot    const: 2
415956d97fSEmmanuel Vadot
425956d97fSEmmanuel Vadot  interrupts:
435956d97fSEmmanuel Vadot    maxItems: 1
445956d97fSEmmanuel Vadot
455956d97fSEmmanuel Vadot  gpio-ranges: true
465956d97fSEmmanuel Vadot
475956d97fSEmmanuel Vadot  gpio-line-names:
485956d97fSEmmanuel Vadot    minItems: 1
495956d97fSEmmanuel Vadot    maxItems: 32
505956d97fSEmmanuel Vadot
515956d97fSEmmanuel Vadot  ti,gpio-always-on:
525956d97fSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/flag
535956d97fSEmmanuel Vadot    description:
545956d97fSEmmanuel Vadot      Indicates if a GPIO bank is always powered and will never lose its logic state.
555956d97fSEmmanuel Vadot
565956d97fSEmmanuel Vadot  ti,hwmods:
575956d97fSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/string
585956d97fSEmmanuel Vadot    deprecated: true
595956d97fSEmmanuel Vadot    description:
605956d97fSEmmanuel Vadot      Name of the hwmod associated with the GPIO. Needed on some legacy OMAP
615956d97fSEmmanuel Vadot      SoCs which have not been converted to the ti,sysc interconnect hierarachy.
625956d97fSEmmanuel Vadot
635956d97fSEmmanuel Vadot  ti,no-reset-on-init:
645956d97fSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/flag
655956d97fSEmmanuel Vadot    deprecated: true
665956d97fSEmmanuel Vadot    description:
675956d97fSEmmanuel Vadot      Do not reset on init. Used with ti,hwmods on some legacy OMAP SoCs which
685956d97fSEmmanuel Vadot      have not been converted to the ti,sysc interconnect hierarachy.
695956d97fSEmmanuel Vadot
705956d97fSEmmanuel VadotpatternProperties:
715956d97fSEmmanuel Vadot  "^(.+-hog(-[0-9]+)?)$":
725956d97fSEmmanuel Vadot    type: object
735956d97fSEmmanuel Vadot
745956d97fSEmmanuel Vadot    required:
755956d97fSEmmanuel Vadot      - gpio-hog
765956d97fSEmmanuel Vadot
775956d97fSEmmanuel Vadotrequired:
785956d97fSEmmanuel Vadot  - compatible
795956d97fSEmmanuel Vadot  - reg
805956d97fSEmmanuel Vadot  - gpio-controller
815956d97fSEmmanuel Vadot  - "#gpio-cells"
825956d97fSEmmanuel Vadot  - interrupt-controller
835956d97fSEmmanuel Vadot  - "#interrupt-cells"
845956d97fSEmmanuel Vadot  - interrupts
855956d97fSEmmanuel Vadot
865956d97fSEmmanuel VadotadditionalProperties: false
875956d97fSEmmanuel Vadot
885956d97fSEmmanuel Vadotexamples:
895956d97fSEmmanuel Vadot  - |
905956d97fSEmmanuel Vadot    #include <dt-bindings/gpio/gpio.h>
915956d97fSEmmanuel Vadot
925956d97fSEmmanuel Vadot    gpio0: gpio@0 {
935956d97fSEmmanuel Vadot        compatible = "ti,omap4-gpio";
945956d97fSEmmanuel Vadot        reg = <0x0 0x1000>;
955956d97fSEmmanuel Vadot        gpio-controller;
965956d97fSEmmanuel Vadot        #gpio-cells = <2>;
975956d97fSEmmanuel Vadot        interrupt-controller;
985956d97fSEmmanuel Vadot        #interrupt-cells = <2>;
995956d97fSEmmanuel Vadot        interrupts = <96>;
1005956d97fSEmmanuel Vadot        ti,gpio-always-on;
1015956d97fSEmmanuel Vadot
1025956d97fSEmmanuel Vadot        ls-buf-en-hog {
1035956d97fSEmmanuel Vadot            gpio-hog;
1045956d97fSEmmanuel Vadot            gpios = <10 GPIO_ACTIVE_HIGH>;
1055956d97fSEmmanuel Vadot            output-high;
1065956d97fSEmmanuel Vadot            line-name = "LS_BUF_EN";
1075956d97fSEmmanuel Vadot        };
1085956d97fSEmmanuel Vadot    };
109