xref: /freebsd/sys/contrib/device-tree/Bindings/pinctrl/renesas,rzn1-pinctrl.yaml (revision aa1a8ff2d6dbc51ef058f46f3db5a8bb77967145)
16be33864SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
26be33864SEmmanuel Vadot%YAML 1.2
36be33864SEmmanuel Vadot---
46be33864SEmmanuel Vadot$id: http://devicetree.org/schemas/pinctrl/renesas,rzn1-pinctrl.yaml#
56be33864SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
66be33864SEmmanuel Vadot
76be33864SEmmanuel Vadottitle: Renesas RZ/N1 Pin Controller
86be33864SEmmanuel Vadot
96be33864SEmmanuel Vadotmaintainers:
10*fac71e4eSEmmanuel Vadot  - Fabrizio Castro <fabrizio.castro.jz@renesas.com>
116be33864SEmmanuel Vadot  - Geert Uytterhoeven <geert+renesas@glider.be>
126be33864SEmmanuel Vadot
136be33864SEmmanuel Vadotproperties:
146be33864SEmmanuel Vadot  compatible:
156be33864SEmmanuel Vadot    items:
166be33864SEmmanuel Vadot      - enum:
176be33864SEmmanuel Vadot          - renesas,r9a06g032-pinctrl # RZ/N1D
186be33864SEmmanuel Vadot          - renesas,r9a06g033-pinctrl # RZ/N1S
196be33864SEmmanuel Vadot      - const: renesas,rzn1-pinctrl   # Generic RZ/N1
206be33864SEmmanuel Vadot
216be33864SEmmanuel Vadot  reg:
226be33864SEmmanuel Vadot    items:
236be33864SEmmanuel Vadot      - description: GPIO Multiplexing Level1 Register Block
246be33864SEmmanuel Vadot      - description: GPIO Multiplexing Level2 Register Block
256be33864SEmmanuel Vadot
266be33864SEmmanuel Vadot  clocks:
276be33864SEmmanuel Vadot    maxItems: 1
286be33864SEmmanuel Vadot
296be33864SEmmanuel Vadot  clock-names:
306be33864SEmmanuel Vadot    const: bus
316be33864SEmmanuel Vadot    description:
326be33864SEmmanuel Vadot      The bus clock, sometimes described as pclk, for register accesses.
336be33864SEmmanuel Vadot
34e67e8565SEmmanuel VadotallOf:
35*fac71e4eSEmmanuel Vadot  - $ref: pinctrl.yaml#
36e67e8565SEmmanuel Vadot
376be33864SEmmanuel Vadotrequired:
386be33864SEmmanuel Vadot  - compatible
396be33864SEmmanuel Vadot  - reg
406be33864SEmmanuel Vadot  - clocks
416be33864SEmmanuel Vadot  - clock-names
426be33864SEmmanuel Vadot
436be33864SEmmanuel VadotadditionalProperties:
446be33864SEmmanuel Vadot  anyOf:
456be33864SEmmanuel Vadot    - type: object
466be33864SEmmanuel Vadot      allOf:
476be33864SEmmanuel Vadot        - $ref: pincfg-node.yaml#
486be33864SEmmanuel Vadot        - $ref: pinmux-node.yaml#
496be33864SEmmanuel Vadot
506be33864SEmmanuel Vadot      description:
516be33864SEmmanuel Vadot        A pin multiplexing sub-node describes how to configure a set of (or a
526be33864SEmmanuel Vadot        single) pin in some desired alternate function mode.
536be33864SEmmanuel Vadot        A single sub-node may define several pin configurations.
546be33864SEmmanuel Vadot
556be33864SEmmanuel Vadot      properties:
566be33864SEmmanuel Vadot        pinmux:
576be33864SEmmanuel Vadot          description: |
586be33864SEmmanuel Vadot            Integer array representing pin number and pin multiplexing
596be33864SEmmanuel Vadot            configuration.
606be33864SEmmanuel Vadot            When a pin has to be configured in alternate function mode, use
616be33864SEmmanuel Vadot            this property to identify the pin by its global index, and provide
626be33864SEmmanuel Vadot            its alternate function configuration number along with it.
636be33864SEmmanuel Vadot            When multiple pins are required to be configured as part of the
646be33864SEmmanuel Vadot            same alternate function they shall be specified as members of the
656be33864SEmmanuel Vadot            same argument list of a single "pinmux" property.
666be33864SEmmanuel Vadot            Integers values in the "pinmux" argument list are assembled as:
676be33864SEmmanuel Vadot            (PIN | MUX_FUNC << 8)
686be33864SEmmanuel Vadot            where PIN directly corresponds to the pl_gpio pin number and
696be33864SEmmanuel Vadot            MUX_FUNC is one of the alternate function identifiers defined in:
706be33864SEmmanuel Vadot            <include/dt-bindings/pinctrl/rzn1-pinctrl.h>
716be33864SEmmanuel Vadot            These identifiers collapse the IO Multiplex Configuration Level 1
726be33864SEmmanuel Vadot            and Level 2 numbers that are detailed in the hardware reference
736be33864SEmmanuel Vadot            manual into a single number. The identifiers for Level 2 are simply
746be33864SEmmanuel Vadot            offset by 10.  Additional identifiers are provided to specify the
756be33864SEmmanuel Vadot            MDIO source peripheral.
766be33864SEmmanuel Vadot
776be33864SEmmanuel Vadot        bias-disable: true
786be33864SEmmanuel Vadot        bias-pull-up:
796be33864SEmmanuel Vadot          description: Pull up the pin with 50 kOhm
806be33864SEmmanuel Vadot        bias-pull-down:
816be33864SEmmanuel Vadot          description: Pull down the pin with 50 kOhm
826be33864SEmmanuel Vadot        bias-high-impedance: true
836be33864SEmmanuel Vadot        drive-strength:
846be33864SEmmanuel Vadot          enum: [ 4, 6, 8, 12 ]
856be33864SEmmanuel Vadot
866be33864SEmmanuel Vadot      required:
876be33864SEmmanuel Vadot        - pinmux
886be33864SEmmanuel Vadot
896be33864SEmmanuel Vadot      additionalProperties:
906be33864SEmmanuel Vadot        $ref: "#/additionalProperties/anyOf/0"
916be33864SEmmanuel Vadot
926be33864SEmmanuel Vadot    - type: object
936be33864SEmmanuel Vadot      additionalProperties:
946be33864SEmmanuel Vadot        $ref: "#/additionalProperties/anyOf/0"
956be33864SEmmanuel Vadot
966be33864SEmmanuel Vadotexamples:
976be33864SEmmanuel Vadot  - |
986be33864SEmmanuel Vadot    #include <dt-bindings/clock/r9a06g032-sysctrl.h>
996be33864SEmmanuel Vadot    #include <dt-bindings/pinctrl/rzn1-pinctrl.h>
1006be33864SEmmanuel Vadot    pinctrl: pinctrl@40067000 {
1016be33864SEmmanuel Vadot            compatible = "renesas,r9a06g032-pinctrl", "renesas,rzn1-pinctrl";
1026be33864SEmmanuel Vadot            reg = <0x40067000 0x1000>, <0x51000000 0x480>;
1036be33864SEmmanuel Vadot            clocks = <&sysctrl R9A06G032_HCLK_PINCONFIG>;
1046be33864SEmmanuel Vadot            clock-names = "bus";
1056be33864SEmmanuel Vadot
1066be33864SEmmanuel Vadot            /*
1076be33864SEmmanuel Vadot             * A serial communication interface with a TX output pin and an RX
1086be33864SEmmanuel Vadot             * input pin.
1096be33864SEmmanuel Vadot             */
1106be33864SEmmanuel Vadot            pins_uart0: pins_uart0 {
1116be33864SEmmanuel Vadot                    pinmux = <
1126be33864SEmmanuel Vadot                            RZN1_PINMUX(103, RZN1_FUNC_UART0_I) /* UART0_TXD */
1136be33864SEmmanuel Vadot                            RZN1_PINMUX(104, RZN1_FUNC_UART0_I) /* UART0_RXD */
1146be33864SEmmanuel Vadot                    >;
1156be33864SEmmanuel Vadot            };
1166be33864SEmmanuel Vadot
1176be33864SEmmanuel Vadot            /*
1186be33864SEmmanuel Vadot             * Set the pull-up on the RXD pin of the UART.
1196be33864SEmmanuel Vadot             */
1206be33864SEmmanuel Vadot            pins_uart0_alt: pins_uart0_alt {
1216be33864SEmmanuel Vadot                    pinmux = <RZN1_PINMUX(103, RZN1_FUNC_UART0_I)>;
1226be33864SEmmanuel Vadot
1236be33864SEmmanuel Vadot                    pins_uart6_rx {
1246be33864SEmmanuel Vadot                            pinmux = <RZN1_PINMUX(104, RZN1_FUNC_UART0_I)>;
1256be33864SEmmanuel Vadot                            bias-pull-up;
1266be33864SEmmanuel Vadot                    };
1276be33864SEmmanuel Vadot            };
1286be33864SEmmanuel Vadot    };
129