1# Copyright (c) 2023 Antmicro <www.antmicro.com>
2# SPDX-License-Identifier: Apache-2.0
3
4description: |
5    The Renesas RZ/T2M pin controller is a node responsible for controlling
6    pin function selection and pin properties, such as routing the TX and RX of UART0
7    to pin 5 and pin 6 of port 16.
8
9    The node has the 'pinctrl' node label set in your SoC's devicetree,
10    so you can modify it like this:
11
12      &pinctrl {
13              /* your modifications go here */
14      };
15
16    All device pin configurations should be placed in child nodes of the
17    'pinctrl' node, as shown in this example:
18
19      /* You can put this in places like a board-pinctrl.dtsi file in
20       * your board directory, or a devicetree overlay in your application.
21       */
22
23      /* include pre-defined combinations for the SoC variant used by the board */
24      #include <dt-bindings/pinctrl/renesas-rzt2m-pinctrl.h>
25
26      &pinctrl {
27        uart0_default: uart0_default {
28          group1 {
29            pinmux = <UART0TX_P16_5>;
30          };
31          group2 {
32            pinmux = <UART0RX_P16_6>;
33            input-enable;
34          };
35        };
36      };
37
38    The 'uart0_default' child node encodes the pin configurations for a
39    particular state of a device; in this case, the default (that is, active)
40    state.
41
42    As shown, pin configurations are organized in groups within each child node.
43    Each group can specify a list of pin function selections in the 'pinmux'
44    property.
45
46    A group can also specify shared pin properties common to all the specified
47    pins, such as the 'input-enable' property in group 2.
48
49compatible: "renesas,rzt2m-pinctrl"
50
51include: base.yaml
52
53child-binding:
54  description: |
55    Definitions for a pinctrl state.
56  child-binding:
57
58    include:
59      - name: pincfg-node.yaml
60        property-allowlist:
61          - input-enable
62          - bias-pull-up
63          - bias-pull-down
64          - bias-high-impedance
65          - input-schmitt-enable
66
67    properties:
68      pinmux:
69        required: true
70        type: array
71        description: |
72          An array of pins sharing the same group properties. Each
73          element of the array is an integer constructed from the
74          pin number and the alternative function of the pin.
75      drive-strength:
76        type: string
77        enum:
78          - "low"
79          - "middle"
80          - "high"
81          - "ultrahigh"
82        default: "low"
83        description: |
84          The drive strength of a pin, relative to full-driver strength.
85          The default value is "low", which is the reset value.
86      slew-rate:
87        type: string
88        enum:
89          - "slow"
90          - "fast"
91        default: "slow"
92        description: |
93          Select slew rate for a pin. The default is slow, which is the reset value.
94