|
1 | 1 | # Copyright (c) 2024 Renesas Electronics Corporation
|
2 | 2 | # SPDX-License-Identifier: Apache-2.0
|
3 | 3 |
|
| 4 | +title: Renesas RX Pin Controller |
| 5 | + |
4 | 6 | description: |
|
5 |
| - description: | |
6 |
| - The Renesas RX pin controller is a node responsible for controlling |
7 |
| - pin function selection and pin properties |
| 7 | + The Renesas RX pin controller is a node responsible for controlling |
| 8 | + pin function selection and pin properties |
8 | 9 |
|
9 |
| - The node has the 'pinctrl' node label set in your SoC's devicetree, |
10 |
| - so you can modify it like this: |
| 10 | + The node has the 'pinctrl' node label set in your SoC's devicetree, |
| 11 | + so you can modify it like this: |
11 | 12 |
|
12 |
| - &pinctrl { |
13 |
| - /* your modifications go here */ |
14 |
| - }; |
| 13 | + &pinctrl { |
| 14 | + /* your modifications go here */ |
| 15 | + }; |
| 16 | +
|
| 17 | + All device pin configurations should be placed in child nodes of the |
| 18 | + 'pinctrl' node, as shown in this example: |
15 | 19 |
|
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/rx-pinctrl.h> |
25 |
| -
|
26 |
| - &pinctrl { |
27 |
| - sci1_default: sci1_default { |
28 |
| - group1 { |
29 |
| - psels = <RX_PSEL(RX_PSEL_SCI_1, 2, 6)>; /* TX */ |
30 |
| - drive-strength = "medium"; |
31 |
| - }; |
32 |
| - group2 { |
33 |
| - psels = <RX_PSEL(RX_PSEL_SCI_1, 3, 0)>; /* RX */ |
34 |
| - drive-strength = "medium"; |
35 |
| - }; |
| 20 | + /* You can put this in places like a board-pinctrl.dtsi file in |
| 21 | + * your board directory, or a devicetree overlay in your application. |
| 22 | + */ |
| 23 | +
|
| 24 | + /* include pre-defined combinations for the SoC variant used by the board */ |
| 25 | + #include <dt-bindings/pinctrl/renesas/rx-pinctrl.h> |
| 26 | +
|
| 27 | + &pinctrl { |
| 28 | + sci1_default: sci1_default { |
| 29 | + group1 { |
| 30 | + psels = <RX_PSEL(RX_PSEL_SCI_1, 2, 6)>; /* TX */ |
| 31 | + drive-strength = "medium"; |
| 32 | + }; |
| 33 | + group2 { |
| 34 | + psels = <RX_PSEL(RX_PSEL_SCI_1, 3, 0)>; /* RX */ |
| 35 | + drive-strength = "medium"; |
36 | 36 | };
|
37 | 37 | };
|
| 38 | + }; |
38 | 39 |
|
39 |
| - The 'sci1_default' child node encodes the pin configurations for a |
40 |
| - particular state of a device; in this case, the default (that is, active) |
41 |
| - state. |
| 40 | + The 'sci1_default' child node encodes the pin configurations for a |
| 41 | + particular state of a device; in this case, the default (that is, active) |
| 42 | + state. |
42 | 43 |
|
43 |
| - As shown, pin configurations are organized in groups within each child node. |
44 |
| - Each group can specify a list of pin function selections in the 'psels' |
45 |
| - property. |
| 44 | + As shown, pin configurations are organized in groups within each child node. |
| 45 | + Each group can specify a list of pin function selections in the 'psels' |
| 46 | + property. |
46 | 47 |
|
47 |
| - A group can also specify shared pin properties common to all the specified |
48 |
| - pins, such as the 'input-enable' property in group 2. Here is a list of |
49 |
| - supported standard pin properties: |
| 48 | + A group can also specify shared pin properties common to all the specified |
| 49 | + pins, such as the 'input-enable' property in group 2. Here is a list of |
| 50 | + supported standard pin properties: |
50 | 51 |
|
51 |
| - - bias-disable: Disable pull-up/down (default, not required). |
52 |
| - - bias-pull-up: Enable pull-up resistor. |
53 |
| - - input-enable: Enable input from the pin. |
54 |
| - - drive-strength: Set the drive strength of the pin. Possible |
55 |
| - values are: normal, high. |
| 52 | + - bias-disable: Disable pull-up/down (default, not required). |
| 53 | + - bias-pull-up: Enable pull-up resistor. |
| 54 | + - input-enable: Enable input from the pin. |
| 55 | + - drive-strength: Set the drive strength of the pin. Possible |
| 56 | + values are: normal, high. |
56 | 57 |
|
57 |
| - To link pin configurations with a device, use a pinctrl-N property for some |
58 |
| - number N, like this example you could place in your board's DTS file: |
| 58 | + To link pin configurations with a device, use a pinctrl-N property for some |
| 59 | + number N, like this example you could place in your board's DTS file: |
59 | 60 |
|
60 |
| - #include "board-pinctrl.dtsi" |
| 61 | + #include "board-pinctrl.dtsi" |
61 | 62 |
|
62 |
| - &sci1 { |
63 |
| - pinctrl-0 = <&uart0_default>; |
64 |
| - pinctrl-1 = <&uart0_sleep>; |
65 |
| - pinctrl-names = "default", "sleep"; |
66 |
| - }; |
| 63 | + &sci1 { |
| 64 | + pinctrl-0 = <&uart0_default>; |
| 65 | + pinctrl-1 = <&uart0_sleep>; |
| 66 | + pinctrl-names = "default", "sleep"; |
| 67 | + }; |
67 | 68 |
|
68 | 69 | compatible: "renesas,rx-pinctrl"
|
69 | 70 |
|
|
0 commit comments