summaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree/bindings/pinctrl/brcm,bcm2712c0-pinctrl.yaml
blob: ae6c13a746b9c66bea5177c5a605f708c33d39df (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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/pinctrl/brcm,bcm2712c0-pinctrl.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Broadcom STB family pin controller

maintainers:
  - Ivan T. Ivanov <iivanov@suse.de>
  - A. della Porta <andrea.porta@suse.com>

description: >
  Broadcom's STB family of memory-mapped pin controllers.

  This includes the pin controllers inside the BCM2712 SoC which
  are instances of the STB family and has two silicon variants,
  C0 and D0, which differs slightly in terms of registers layout.

  The -aon- (Always On) variant is the same IP block but differs
  in the number of pins that are associated and the pinmux functions
  for each of those pins.

allOf:
  - $ref: pinctrl.yaml#

properties:
  compatible:
    enum:
      - brcm,bcm2712c0-pinctrl
      - brcm,bcm2712c0-aon-pinctrl
      - brcm,bcm2712d0-pinctrl
      - brcm,bcm2712d0-aon-pinctrl

  reg:
    maxItems: 1

patternProperties:
  '-state$':
    oneOf:
      - $ref: '#/$defs/brcmstb-pinctrl-state'
      - patternProperties:
          '-pins$':
            $ref: '#/$defs/brcmstb-pinctrl-state'
        additionalProperties: false

$defs:
  brcmstb-pinctrl-state:
    allOf:
      - $ref: pincfg-node.yaml#
      - $ref: pinmux-node.yaml#

    description: >
      Pin controller client devices use pin configuration subnodes (children
      and grandchildren) for desired pin configuration.

      Client device subnodes use below standard properties.

    properties:
      pins:
        description:
          List of gpio pins affected by the properties specified in this
          subnode (either this or "groups" must be specified).
        items:
          pattern: '^((aon_)?s?gpio[0-6]?[0-9])|(emmc_(clk|cmd|dat[0-7]|ds))$'

      function:
        description:
          Specify the alternative function to be configured for the specified
          pins.
        enum: [ gpio, alt1, alt2, alt3, alt4, alt5, alt6, alt7, alt8,
                aon_cpu_standbyb, aon_fp_4sec_resetb, aon_gpclk, aon_pwm,
                arm_jtag, aud_fs_clk0, avs_pmu_bsc, bsc_m0, bsc_m1, bsc_m2,
                bsc_m3, clk_observe, ctl_hdmi_5v, enet0, enet0_mii, enet0_rgmii,
                ext_sc_clk, fl0, fl1, gpclk0, gpclk1, gpclk2, hdmi_tx0_auto_i2c,
                hdmi_tx0_bsc, hdmi_tx1_auto_i2c, hdmi_tx1_bsc, i2s_in, i2s_out,
                ir_in, mtsif, mtsif_alt, mtsif_alt1, pdm, pkt, pm_led_out, sc0,
                sd0, sd2, sd_card_a, sd_card_b, sd_card_c, sd_card_d, sd_card_e,
                sd_card_f, sd_card_g, spdif_out, spi_m, spi_s, sr_edm_sense, te0,
                te1, tsio, uart0, uart1, uart2, usb_pwr, usb_vbus, uui, vc_i2c0,
                vc_i2c3, vc_i2c4, vc_i2c5, vc_i2csl, vc_pcm, vc_pwm0, vc_pwm1,
                vc_spi0, vc_spi3, vc_spi4, vc_spi5, vc_uart0, vc_uart2, vc_uart3,
                vc_uart4 ]

      bias-disable: true
      bias-pull-down: true
      bias-pull-up: true

    required:
      - pins

    if:
      properties:
        pins:
          not:
            contains:
              pattern: "^emmc_(clk|cmd|dat[0-7]|ds)$"
    then:
      required:
        - function
    else:
      properties:
        function: false

    additionalProperties: false

required:
  - compatible
  - reg

unevaluatedProperties: false

examples:
  - |
    pinctrl@7d504100 {
        compatible = "brcm,bcm2712c0-pinctrl";
        reg = <0x7d504100 0x30>;

        bt-shutdown-default-state {
            function = "gpio";
            pins = "gpio29";
        };

        uarta-default-state {
            rts-tx-pins {
                function = "uart0";
                pins = "gpio24", "gpio26";
                bias-disable;
            };

            cts-rx-pins {
                function = "uart0";
                pins = "gpio25", "gpio27";
                bias-pull-up;
            };
        };
    };