|
| 1 | +# Copyright (c) 2025 Renesas Electronics Corporation |
| 2 | +# SPDX-License-Identifier: Apache-2.0 |
| 3 | + |
| 4 | +description: | |
| 5 | + The Renesas RZ/T2L 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 <zephyr/dt-bindings/pinctrl/renesas/pinctrl-rzt-common.h> |
| 25 | +
|
| 26 | + &pinctrl { |
| 27 | + uart0_default: uart0_default { |
| 28 | + group1 { |
| 29 | + pinmux = <RZT_PINMUX(PORT_16, 5, 1)>; |
| 30 | + }; |
| 31 | + group2 { |
| 32 | + pinmux = <RZT_PINMUX(PORT_16, 6, 2)>; |
| 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 | +
|
| 49 | +compatible: "renesas,rzt-pinctrl" |
| 50 | + |
| 51 | +include: base.yaml |
| 52 | + |
| 53 | +child-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 | + - output-enable |
| 63 | + - output-high |
| 64 | + - bias-pull-up |
| 65 | + - bias-pull-down |
| 66 | + - input-schmitt-enable |
| 67 | + |
| 68 | + properties: |
| 69 | + pinmux: |
| 70 | + required: true |
| 71 | + type: array |
| 72 | + description: | |
| 73 | + An array of pins sharing the same group properties. Each |
| 74 | + element of the array is an integer constructed from the |
| 75 | + pin number and the alternative function of the pin. |
| 76 | + drive-strength: |
| 77 | + type: string |
| 78 | + enum: |
| 79 | + - "low" |
| 80 | + - "middle" |
| 81 | + - "high" |
| 82 | + - "ultrahigh" |
| 83 | + default: "low" |
| 84 | + description: | |
| 85 | + The drive strength of a pin, relative to full-driver strength. |
| 86 | + The default value is "low", which is the reset value. |
| 87 | + slew-rate: |
| 88 | + type: string |
| 89 | + enum: |
| 90 | + - "slow" |
| 91 | + - "fast" |
| 92 | + default: "slow" |
| 93 | + description: | |
| 94 | + Select slew rate for a pin. The default is slow, which is the reset value. |
0 commit comments