1 Renesas RZ/A2 combined Pin and GPIO controller
3 The Renesas SoCs of the RZ/A2 series feature a combined Pin and GPIO controller.
4 Pin multiplexing and GPIO configuration is performed on a per-pin basis.
5 Each port features up to 8 pins, each of them configurable for GPIO
6 function (port mode) or in alternate function mode.
7 Up to 8 different alternate function modes exist for each single pin.
13 - compatible: shall be:
14 - "renesas,r7s9210-pinctrl": for RZ/A2M
16 Address base and length of the memory area where the pin controller
17 hardware is mapped to.
19 This pin controller also controls pins as GPIO
23 Expresses the total number of GPIO ports/pins in this SoC
25 Example: Pin controller node for RZ/A2M SoC (r7s9210)
27 pinctrl: pin-controller@fcffe000 {
28 compatible = "renesas,r7s9210-pinctrl";
29 reg = <0xfcffe000 0x1000>;
33 gpio-ranges = <&pinctrl 0 0 176>;
39 The child nodes of the pin controller designate pins to be used for
40 specific peripheral functions or as GPIO.
42 - Pin multiplexing sub-nodes:
43 A pin multiplexing sub-node describes how to configure a set of
44 (or a single) pin in some desired alternate function mode.
45 The values for the pinmux properties are a combination of port name, pin
46 number and the desired function index. Use the RZA2_PINMUX macro located
47 in include/dt-bindings/pinctrl/r7s9210-pinctrl.h to easily define these.
48 For assigning GPIO pins, use the macro RZA2_PIN also in r7s9210-pinctrl.h
49 to express the desired port pin.
53 integer array representing pin number and pin multiplexing configuration.
54 When a pin has to be configured in alternate function mode, use this
55 property to identify the pin by its global index, and provide its
56 alternate function configuration number along with it.
57 When multiple pins are required to be configured as part of the same
58 alternate function they shall be specified as members of the same
59 argument list of a single "pinmux" property.
60 Helper macros to ease assembling the pin index from its position
61 (port where it sits on and pin number) and alternate function identifier
62 are provided by the pin controller header file at:
63 <dt-bindings/pinctrl/r7s9210-pinctrl.h>
64 Integers values in "pinmux" argument list are assembled as:
65 ((PORT * 8 + PIN) | MUX_FUNC << 16)
67 Example: Board specific pins configuration
72 pinmux = <RZA2_PINMUX(PORT9, 0, 4)>, /* TxD4 */
73 <RZA2_PINMUX(PORT9, 1, 4)>; /* RxD4 */
77 Example: Assigning a GPIO:
81 compatible = "gpio-leds";
85 gpios = <&pinctrl RZA2_PIN(PORT6, 0) GPIO_ACTIVE_HIGH>;