summaryrefslogtreecommitdiffstats
path: root/dts/Bindings/pinctrl/brcm,ns-pinmux.yaml
blob: 470aff599c2702d4ca34a78bfb0b6cc70b1fab51 (plain)
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
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/pinctrl/brcm,ns-pinmux.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Broadcom Northstar pins mux controller

maintainers:
  - Rafał Miłecki <rafal@milecki.pl>

description:
  Some of Northstar SoCs's pins can be used for various purposes thanks to the
  mux controller. This binding allows describing mux controller and listing
  available functions. They can be referenced later by other bindings to let
  system configure controller correctly.

  A list of pins varies across chipsets so few bindings are available.

  Node of the pinmux must be nested in the CRU (Central Resource Unit) "syscon"
  node.

properties:
  compatible:
    enum:
      - brcm,bcm4708-pinmux
      - brcm,bcm4709-pinmux
      - brcm,bcm53012-pinmux

  offset:
    description: offset of pin registers in the CRU block
    maxItems: 1
    $ref: /schemas/types.yaml#/definitions/uint32-array

patternProperties:
  '-pins$':
    type: object
    description: pin node
    $ref: pinmux-node.yaml#

    properties:
      function:
        enum: [ spi, i2c, pwm, uart1, mdio, uart2, sdio ]
      groups:
        minItems: 1
        maxItems: 4
        items:
          enum: [ spi_grp, i2c_grp, pwm0_grp, pwm1_grp, pwm2_grp, pwm3_grp,
                  uart1_grp, mdio_grp, uart2_grp, sdio_pwr_grp, sdio_1p8v_grp ]

    required:
      - function
      - groups

    additionalProperties: false

allOf:
  - if:
      properties:
        compatible:
          contains:
            const: brcm,bcm4708-pinmux
    then:
      patternProperties:
        '-pins$':
          properties:
            function:
              enum: [ spi, i2c, pwm, uart1 ]
            groups:
              items:
                enum: [ spi_grp, i2c_grp, pwm0_grp, pwm1_grp, pwm2_grp, pwm3_grp,
                        uart1_grp ]

required:
  - offset

additionalProperties: false

examples:
  - |
    cru@1800c100 {
        compatible = "syscon", "simple-mfd";
        reg = <0x1800c100 0x1a4>;

        pinctrl {
            compatible = "brcm,bcm4708-pinmux";
            offset = <0xc0>;

            spi-pins {
                function = "spi";
                groups = "spi_grp";
            };
        };
    };