1 * Renesas Pin Function Controller (GPIO and Pin Mux/Config)
3 The Pin Function Controller (PFC) is a Pin Mux/Config controller. On SH7372,
4 SH73A0, R8A73A4 and R8A7740 it also acts as a GPIO controller.
12 - compatible: should be one of the following.
13 - "renesas,pfc-r8a73a4": for R8A73A4 (R-Mobile APE6) compatible pin-controller.
14 - "renesas,pfc-r8a7740": for R8A7740 (R-Mobile A1) compatible pin-controller.
15 - "renesas,pfc-r8a7778": for R8A7778 (R-Mobile M1) compatible pin-controller.
16 - "renesas,pfc-r8a7779": for R8A7779 (R-Car H1) compatible pin-controller.
17 - "renesas,pfc-r8a7790": for R8A7790 (R-Car H2) compatible pin-controller.
18 - "renesas,pfc-sh7372": for SH7372 (SH-Mobile AP4) compatible pin-controller.
19 - "renesas,pfc-sh73a0": for SH73A0 (SH-Mobile AG5) compatible pin-controller.
21 - reg: Base address and length of each memory resource used by the pin
22 controller hardware module.
26 - #gpio-range-cells: Mandatory when the PFC doesn't handle GPIO, forbidden
27 otherwise. Should be 3.
29 The PFC node also acts as a container for pin configuration nodes. Please refer
30 to pinctrl-bindings.txt in this directory for the definition of the term "pin
31 configuration node" and for the common pinctrl bindings used by client devices.
33 Each pin configuration node represents a desired configuration for a pin, a
34 pin group, or a list of pins or pin groups. The configuration can include the
35 function to select on those pin(s) and pin configuration parameters (such as
36 pull-up and pull-down).
38 Pin configuration nodes contain pin configuration properties, either directly
39 or grouped in child subnodes. Both pin muxing and configuration parameters can
40 be grouped in that way and referenced as a single pin configuration node by
43 A configuration node or subnode must reference at least one pin (through the
44 pins or pin groups properties) and contain at least a function or one
45 configuration parameter. When the function is present only pin groups can be
46 used to reference pins.
48 All pin configuration nodes and subnodes names are ignored. All of those nodes
49 are parsed through phandles and processed purely based on their content.
51 Pin Configuration Node Properties:
53 - renesas,pins : An array of strings, each string containing the name of a pin.
54 - renesas,groups : An array of strings, each string containing the name of a pin
57 - renesas,function: A string containing the name of the function to mux to the
58 pin group(s) specified by the renesas,groups property
60 Valid values for pin, group and function names can be found in the group and
61 function arrays of the PFC data file corresponding to the SoC
62 (drivers/pinctrl/sh-pfc/pfc-*.c)
64 The pin configuration parameters use the generic pinconf bindings defined in
65 pinctrl-bindings.txt in this directory. The supported parameters are
66 bias-disable, bias-pull-up and bias-pull-down.
72 On SH7372, SH73A0, R8A73A4 and R8A7740 the PFC node is also a GPIO controller
77 - gpio-controller: Marks the device node as a gpio controller.
79 - #gpio-cells: Should be 2. The first cell is the GPIO number and the second
80 cell specifies GPIO flags, as defined in <dt-bindings/gpio/gpio.h>. Only the
81 GPIO_ACTIVE_HIGH and GPIO_ACTIVE_LOW flags are supported.
83 The syntax of the gpio specifier used by client nodes should be the following
84 with values derived from the SoC user manual.
86 <[phandle of the gpio controller node]
87 [pin number within the gpio controller]
90 On other mach-shmobile platforms GPIO is handled by the gpio-rcar driver.
91 Please refer to Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt
92 for documentation of the GPIO device tree bindings on those platforms.
98 Example 1: SH73A0 (SH-Mobile AG5) pin controller node
101 compatible = "renesas,pfc-sh73a0";
102 reg = <0xe6050000 0x8000>,
108 Example 2: A GPIO LED node that references a GPIO
110 #include <dt-bindings/gpio/gpio.h>
113 compatible = "gpio-leds";
115 gpios = <&pfc 20 GPIO_ACTIVE_LOW>;
119 Example 3: KZM-A9-GT (SH-Mobile AG5) default pin state hog and pin control maps
120 for the MMCIF and SCIFA4 devices
123 pinctrl-0 = <&scifa4_pins>;
124 pinctrl-names = "default";
128 renesas,groups = "mmc0_data8_0", "mmc0_ctrl_0";
129 renesas,function = "mmc0";
132 renesas,groups = "mmc0_data8_0";
133 renesas,pins = "PORT279";
138 scifa4_pins: scifa4 {
139 renesas,groups = "scifa4_data", "scifa4_ctrl";
140 renesas,function = "scifa4";
144 Example 4: KZM-A9-GT (SH-Mobile AG5) default pin state for the MMCIF device
147 pinctrl-0 = <&mmcif_pins>;
148 pinctrl-names = "default";
151 vmmc-supply = <®_1p8v>;