xref: /freebsd/sys/contrib/device-tree/Bindings/pinctrl/renesas,rzn1-pinctrl.yaml (revision 6be3386466ab79a84b48429ae66244f21526d3df)
1*6be33864SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*6be33864SEmmanuel Vadot%YAML 1.2
3*6be33864SEmmanuel Vadot---
4*6be33864SEmmanuel Vadot$id: http://devicetree.org/schemas/pinctrl/renesas,rzn1-pinctrl.yaml#
5*6be33864SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*6be33864SEmmanuel Vadot
7*6be33864SEmmanuel Vadottitle: Renesas RZ/N1 Pin Controller
8*6be33864SEmmanuel Vadot
9*6be33864SEmmanuel Vadotmaintainers:
10*6be33864SEmmanuel Vadot  - Gareth Williams <gareth.williams.jx@renesas.com>
11*6be33864SEmmanuel Vadot  - Geert Uytterhoeven <geert+renesas@glider.be>
12*6be33864SEmmanuel Vadot
13*6be33864SEmmanuel Vadotproperties:
14*6be33864SEmmanuel Vadot  compatible:
15*6be33864SEmmanuel Vadot    items:
16*6be33864SEmmanuel Vadot      - enum:
17*6be33864SEmmanuel Vadot          - renesas,r9a06g032-pinctrl # RZ/N1D
18*6be33864SEmmanuel Vadot          - renesas,r9a06g033-pinctrl # RZ/N1S
19*6be33864SEmmanuel Vadot      - const: renesas,rzn1-pinctrl   # Generic RZ/N1
20*6be33864SEmmanuel Vadot
21*6be33864SEmmanuel Vadot  reg:
22*6be33864SEmmanuel Vadot    items:
23*6be33864SEmmanuel Vadot      - description: GPIO Multiplexing Level1 Register Block
24*6be33864SEmmanuel Vadot      - description: GPIO Multiplexing Level2 Register Block
25*6be33864SEmmanuel Vadot
26*6be33864SEmmanuel Vadot  clocks:
27*6be33864SEmmanuel Vadot    maxItems: 1
28*6be33864SEmmanuel Vadot
29*6be33864SEmmanuel Vadot  clock-names:
30*6be33864SEmmanuel Vadot    const: bus
31*6be33864SEmmanuel Vadot    description:
32*6be33864SEmmanuel Vadot      The bus clock, sometimes described as pclk, for register accesses.
33*6be33864SEmmanuel Vadot
34*6be33864SEmmanuel Vadotrequired:
35*6be33864SEmmanuel Vadot  - compatible
36*6be33864SEmmanuel Vadot  - reg
37*6be33864SEmmanuel Vadot  - clocks
38*6be33864SEmmanuel Vadot  - clock-names
39*6be33864SEmmanuel Vadot
40*6be33864SEmmanuel VadotadditionalProperties:
41*6be33864SEmmanuel Vadot  anyOf:
42*6be33864SEmmanuel Vadot    - type: object
43*6be33864SEmmanuel Vadot      allOf:
44*6be33864SEmmanuel Vadot        - $ref: pincfg-node.yaml#
45*6be33864SEmmanuel Vadot        - $ref: pinmux-node.yaml#
46*6be33864SEmmanuel Vadot
47*6be33864SEmmanuel Vadot      description:
48*6be33864SEmmanuel Vadot        A pin multiplexing sub-node describes how to configure a set of (or a
49*6be33864SEmmanuel Vadot        single) pin in some desired alternate function mode.
50*6be33864SEmmanuel Vadot        A single sub-node may define several pin configurations.
51*6be33864SEmmanuel Vadot
52*6be33864SEmmanuel Vadot      properties:
53*6be33864SEmmanuel Vadot        pinmux:
54*6be33864SEmmanuel Vadot          description: |
55*6be33864SEmmanuel Vadot            Integer array representing pin number and pin multiplexing
56*6be33864SEmmanuel Vadot            configuration.
57*6be33864SEmmanuel Vadot            When a pin has to be configured in alternate function mode, use
58*6be33864SEmmanuel Vadot            this property to identify the pin by its global index, and provide
59*6be33864SEmmanuel Vadot            its alternate function configuration number along with it.
60*6be33864SEmmanuel Vadot            When multiple pins are required to be configured as part of the
61*6be33864SEmmanuel Vadot            same alternate function they shall be specified as members of the
62*6be33864SEmmanuel Vadot            same argument list of a single "pinmux" property.
63*6be33864SEmmanuel Vadot            Integers values in the "pinmux" argument list are assembled as:
64*6be33864SEmmanuel Vadot            (PIN | MUX_FUNC << 8)
65*6be33864SEmmanuel Vadot            where PIN directly corresponds to the pl_gpio pin number and
66*6be33864SEmmanuel Vadot            MUX_FUNC is one of the alternate function identifiers defined in:
67*6be33864SEmmanuel Vadot            <include/dt-bindings/pinctrl/rzn1-pinctrl.h>
68*6be33864SEmmanuel Vadot            These identifiers collapse the IO Multiplex Configuration Level 1
69*6be33864SEmmanuel Vadot            and Level 2 numbers that are detailed in the hardware reference
70*6be33864SEmmanuel Vadot            manual into a single number. The identifiers for Level 2 are simply
71*6be33864SEmmanuel Vadot            offset by 10.  Additional identifiers are provided to specify the
72*6be33864SEmmanuel Vadot            MDIO source peripheral.
73*6be33864SEmmanuel Vadot
74*6be33864SEmmanuel Vadot        phandle: true
75*6be33864SEmmanuel Vadot        bias-disable: true
76*6be33864SEmmanuel Vadot        bias-pull-up:
77*6be33864SEmmanuel Vadot          description: Pull up the pin with 50 kOhm
78*6be33864SEmmanuel Vadot        bias-pull-down:
79*6be33864SEmmanuel Vadot          description: Pull down the pin with 50 kOhm
80*6be33864SEmmanuel Vadot        bias-high-impedance: true
81*6be33864SEmmanuel Vadot        drive-strength:
82*6be33864SEmmanuel Vadot          enum: [ 4, 6, 8, 12 ]
83*6be33864SEmmanuel Vadot
84*6be33864SEmmanuel Vadot      required:
85*6be33864SEmmanuel Vadot        - pinmux
86*6be33864SEmmanuel Vadot
87*6be33864SEmmanuel Vadot      additionalProperties:
88*6be33864SEmmanuel Vadot        $ref: "#/additionalProperties/anyOf/0"
89*6be33864SEmmanuel Vadot
90*6be33864SEmmanuel Vadot    - type: object
91*6be33864SEmmanuel Vadot      properties:
92*6be33864SEmmanuel Vadot        phandle: true
93*6be33864SEmmanuel Vadot
94*6be33864SEmmanuel Vadot      additionalProperties:
95*6be33864SEmmanuel Vadot        $ref: "#/additionalProperties/anyOf/0"
96*6be33864SEmmanuel Vadot
97*6be33864SEmmanuel Vadotexamples:
98*6be33864SEmmanuel Vadot  - |
99*6be33864SEmmanuel Vadot    #include <dt-bindings/clock/r9a06g032-sysctrl.h>
100*6be33864SEmmanuel Vadot    #include <dt-bindings/pinctrl/rzn1-pinctrl.h>
101*6be33864SEmmanuel Vadot    pinctrl: pinctrl@40067000 {
102*6be33864SEmmanuel Vadot            compatible = "renesas,r9a06g032-pinctrl", "renesas,rzn1-pinctrl";
103*6be33864SEmmanuel Vadot            reg = <0x40067000 0x1000>, <0x51000000 0x480>;
104*6be33864SEmmanuel Vadot            clocks = <&sysctrl R9A06G032_HCLK_PINCONFIG>;
105*6be33864SEmmanuel Vadot            clock-names = "bus";
106*6be33864SEmmanuel Vadot
107*6be33864SEmmanuel Vadot            /*
108*6be33864SEmmanuel Vadot             * A serial communication interface with a TX output pin and an RX
109*6be33864SEmmanuel Vadot             * input pin.
110*6be33864SEmmanuel Vadot             */
111*6be33864SEmmanuel Vadot            pins_uart0: pins_uart0 {
112*6be33864SEmmanuel Vadot                    pinmux = <
113*6be33864SEmmanuel Vadot                            RZN1_PINMUX(103, RZN1_FUNC_UART0_I) /* UART0_TXD */
114*6be33864SEmmanuel Vadot                            RZN1_PINMUX(104, RZN1_FUNC_UART0_I) /* UART0_RXD */
115*6be33864SEmmanuel Vadot                    >;
116*6be33864SEmmanuel Vadot            };
117*6be33864SEmmanuel Vadot
118*6be33864SEmmanuel Vadot            /*
119*6be33864SEmmanuel Vadot             * Set the pull-up on the RXD pin of the UART.
120*6be33864SEmmanuel Vadot             */
121*6be33864SEmmanuel Vadot            pins_uart0_alt: pins_uart0_alt {
122*6be33864SEmmanuel Vadot                    pinmux = <RZN1_PINMUX(103, RZN1_FUNC_UART0_I)>;
123*6be33864SEmmanuel Vadot
124*6be33864SEmmanuel Vadot                    pins_uart6_rx {
125*6be33864SEmmanuel Vadot                            pinmux = <RZN1_PINMUX(104, RZN1_FUNC_UART0_I)>;
126*6be33864SEmmanuel Vadot                            bias-pull-up;
127*6be33864SEmmanuel Vadot                    };
128*6be33864SEmmanuel Vadot            };
129*6be33864SEmmanuel Vadot    };
130