Documentation / devicetree / bindings / pinctrl / mscc,ocelot-pinctrl.yaml


Based on kernel version 6.8. Page generated on 2024-03-11 21:26 EST.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/pinctrl/mscc,ocelot-pinctrl.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Microsemi Ocelot pin controller

maintainers:
  - Alexandre Belloni <alexandre.belloni@bootlin.com>
  - Lars Povlsen <lars.povlsen@microchip.com>

properties:
  compatible:
    enum:
      - microchip,lan966x-pinctrl
      - microchip,sparx5-pinctrl
      - mscc,jaguar2-pinctrl
      - mscc,luton-pinctrl
      - mscc,ocelot-pinctrl
      - mscc,serval-pinctrl
      - mscc,servalt-pinctrl

  reg:
    items:
      - description: Base address
      - description: Extended pin configuration registers
    minItems: 1

  gpio-controller: true
 
  '#gpio-cells':
    const: 2

  gpio-ranges: true

  interrupts:
    maxItems: 1

  interrupt-controller: true
 
  "#interrupt-cells":
    const: 2

  resets:
    maxItems: 1

  reset-names:
    description: Optional shared switch reset.
    items:
      - const: switch

patternProperties:
  '-pins$':
    type: object
    allOf:
      - $ref: pinmux-node.yaml
      - $ref: pincfg-node.yaml

    properties:
      function: true
      pins: true
      output-high: true
      output-low: true
      drive-strength: true

    required:
      - function
      - pins

    additionalProperties: false

required:
  - compatible
  - reg
  - gpio-controller
  - '#gpio-cells'
  - gpio-ranges

allOf:
  - $ref: pinctrl.yaml#
  - if:
      properties:
        compatible:
          contains:
            enum:
              - microchip,lan966x-pinctrl
              - microchip,sparx5-pinctrl
    then:
      properties:
        reg:
          minItems: 2

additionalProperties: false

examples:
  - |
    gpio: pinctrl@71070034 {
        compatible = "mscc,ocelot-pinctrl";
        reg = <0x71070034 0x28>;
        gpio-controller;
        #gpio-cells = <2>;
        gpio-ranges = <&gpio 0 0 22>;

        uart_pins: uart-pins {
            pins = "GPIO_6", "GPIO_7";
            function = "uart";
        };

        uart2_pins: uart2-pins {
            pins = "GPIO_12", "GPIO_13";
            function = "uart2";
        };
    };
 
...