xref: /freebsd/sys/contrib/device-tree/Bindings/pinctrl/nxp,s32g2-siul2-pinctrl.yaml (revision 84943d6f38e936ac3b7a3947ca26eeb27a39f938)
1fac71e4eSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2fac71e4eSEmmanuel Vadot# Copyright 2022 NXP
3fac71e4eSEmmanuel Vadot%YAML 1.2
4fac71e4eSEmmanuel Vadot---
5fac71e4eSEmmanuel Vadot$id: http://devicetree.org/schemas/pinctrl/nxp,s32g2-siul2-pinctrl.yaml#
6fac71e4eSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
7fac71e4eSEmmanuel Vadot
8fac71e4eSEmmanuel Vadottitle: NXP S32G2 pin controller
9fac71e4eSEmmanuel Vadot
10fac71e4eSEmmanuel Vadotmaintainers:
11fac71e4eSEmmanuel Vadot  - Ghennadi Procopciuc <Ghennadi.Procopciuc@oss.nxp.com>
12*84943d6fSEmmanuel Vadot  - Chester Lin <chester62515@gmail.com>
13fac71e4eSEmmanuel Vadot
14fac71e4eSEmmanuel Vadotdescription: |
15fac71e4eSEmmanuel Vadot  S32G2 pinmux is implemented in SIUL2 (System Integration Unit Lite2),
16fac71e4eSEmmanuel Vadot  whose memory map is split into two regions:
17fac71e4eSEmmanuel Vadot    SIUL2_0 @ 0x4009c000
18fac71e4eSEmmanuel Vadot    SIUL2_1 @ 0x44010000
19fac71e4eSEmmanuel Vadot
20fac71e4eSEmmanuel Vadot  Every SIUL2 region has multiple register types, and here only MSCR and
21fac71e4eSEmmanuel Vadot  IMCR registers need to be revealed for kernel to configure pinmux.
22fac71e4eSEmmanuel Vadot
23fac71e4eSEmmanuel Vadot  Please note that some register indexes are reserved in S32G2, such as
24fac71e4eSEmmanuel Vadot  MSCR102-MSCR111, MSCR123-MSCR143, IMCR84-IMCR118 and IMCR398-IMCR429.
25fac71e4eSEmmanuel Vadot
26fac71e4eSEmmanuel Vadotproperties:
27fac71e4eSEmmanuel Vadot  compatible:
28fac71e4eSEmmanuel Vadot    enum:
29fac71e4eSEmmanuel Vadot      - nxp,s32g2-siul2-pinctrl
30fac71e4eSEmmanuel Vadot
31fac71e4eSEmmanuel Vadot  reg:
32fac71e4eSEmmanuel Vadot    description: |
33fac71e4eSEmmanuel Vadot      A list of MSCR/IMCR register regions to be reserved.
34fac71e4eSEmmanuel Vadot      - MSCR (Multiplexed Signal Configuration Register)
35fac71e4eSEmmanuel Vadot        An MSCR register can configure the associated pin as either a GPIO pin
36fac71e4eSEmmanuel Vadot        or a function output pin depends on the selected signal source.
37fac71e4eSEmmanuel Vadot      - IMCR (Input Multiplexed Signal Configuration Register)
38fac71e4eSEmmanuel Vadot        An IMCR register can configure the associated pin as function input
39fac71e4eSEmmanuel Vadot        pin depends on the selected signal source.
40fac71e4eSEmmanuel Vadot    items:
41fac71e4eSEmmanuel Vadot      - description: MSCR registers group 0 in SIUL2_0
42fac71e4eSEmmanuel Vadot      - description: MSCR registers group 1 in SIUL2_1
43fac71e4eSEmmanuel Vadot      - description: MSCR registers group 2 in SIUL2_1
44fac71e4eSEmmanuel Vadot      - description: IMCR registers group 0 in SIUL2_0
45fac71e4eSEmmanuel Vadot      - description: IMCR registers group 1 in SIUL2_1
46fac71e4eSEmmanuel Vadot      - description: IMCR registers group 2 in SIUL2_1
47fac71e4eSEmmanuel Vadot
48fac71e4eSEmmanuel VadotpatternProperties:
49fac71e4eSEmmanuel Vadot  '-pins$':
50fac71e4eSEmmanuel Vadot    type: object
51fac71e4eSEmmanuel Vadot    additionalProperties: false
52fac71e4eSEmmanuel Vadot
53fac71e4eSEmmanuel Vadot    patternProperties:
54fac71e4eSEmmanuel Vadot      '-grp[0-9]$':
55fac71e4eSEmmanuel Vadot        type: object
56fac71e4eSEmmanuel Vadot        allOf:
57fac71e4eSEmmanuel Vadot          - $ref: pinmux-node.yaml#
58fac71e4eSEmmanuel Vadot          - $ref: pincfg-node.yaml#
59fac71e4eSEmmanuel Vadot        description: |
60fac71e4eSEmmanuel Vadot          Pinctrl node's client devices specify pin muxes using subnodes,
61fac71e4eSEmmanuel Vadot          which in turn use the standard properties below.
62fac71e4eSEmmanuel Vadot
63fac71e4eSEmmanuel Vadot        properties:
64fac71e4eSEmmanuel Vadot          bias-disable: true
65fac71e4eSEmmanuel Vadot          bias-high-impedance: true
66fac71e4eSEmmanuel Vadot          bias-pull-up: true
67fac71e4eSEmmanuel Vadot          bias-pull-down: true
68fac71e4eSEmmanuel Vadot          drive-open-drain: true
69fac71e4eSEmmanuel Vadot          input-enable: true
70fac71e4eSEmmanuel Vadot          output-enable: true
71fac71e4eSEmmanuel Vadot
72fac71e4eSEmmanuel Vadot          pinmux:
73fac71e4eSEmmanuel Vadot            description: |
74fac71e4eSEmmanuel Vadot              An integer array for representing pinmux configurations of
75fac71e4eSEmmanuel Vadot              a device. Each integer consists of a PIN_ID and a 4-bit
76fac71e4eSEmmanuel Vadot              selected signal source(SSS) as IOMUX setting, which is
77fac71e4eSEmmanuel Vadot              calculated as: pinmux = (PIN_ID << 4 | SSS)
78fac71e4eSEmmanuel Vadot
79fac71e4eSEmmanuel Vadot          slew-rate:
80fac71e4eSEmmanuel Vadot            description: Supported slew rate based on Fmax values (MHz)
81fac71e4eSEmmanuel Vadot            enum: [83, 133, 150, 166, 208]
82fac71e4eSEmmanuel Vadot
83fac71e4eSEmmanuel Vadot        additionalProperties: false
84fac71e4eSEmmanuel Vadot
85fac71e4eSEmmanuel Vadotrequired:
86fac71e4eSEmmanuel Vadot  - compatible
87fac71e4eSEmmanuel Vadot  - reg
88fac71e4eSEmmanuel Vadot
89fac71e4eSEmmanuel VadotadditionalProperties: false
90fac71e4eSEmmanuel Vadot
91fac71e4eSEmmanuel Vadotexamples:
92fac71e4eSEmmanuel Vadot  - |
93fac71e4eSEmmanuel Vadot    pinctrl@4009c240 {
94fac71e4eSEmmanuel Vadot        compatible = "nxp,s32g2-siul2-pinctrl";
95fac71e4eSEmmanuel Vadot
96fac71e4eSEmmanuel Vadot              /* MSCR0-MSCR101 registers on siul2_0 */
97fac71e4eSEmmanuel Vadot        reg = <0x4009c240 0x198>,
98fac71e4eSEmmanuel Vadot              /* MSCR112-MSCR122 registers on siul2_1 */
99fac71e4eSEmmanuel Vadot              <0x44010400 0x2c>,
100fac71e4eSEmmanuel Vadot              /* MSCR144-MSCR190 registers on siul2_1 */
101fac71e4eSEmmanuel Vadot              <0x44010480 0xbc>,
102fac71e4eSEmmanuel Vadot              /* IMCR0-IMCR83 registers on siul2_0 */
103fac71e4eSEmmanuel Vadot              <0x4009ca40 0x150>,
104fac71e4eSEmmanuel Vadot              /* IMCR119-IMCR397 registers on siul2_1 */
105fac71e4eSEmmanuel Vadot              <0x44010c1c 0x45c>,
106fac71e4eSEmmanuel Vadot              /* IMCR430-IMCR495 registers on siul2_1 */
107fac71e4eSEmmanuel Vadot              <0x440110f8 0x108>;
108fac71e4eSEmmanuel Vadot
109fac71e4eSEmmanuel Vadot        llce-can0-pins {
110fac71e4eSEmmanuel Vadot            llce-can0-grp0 {
111fac71e4eSEmmanuel Vadot                pinmux = <0x2b0>;
112fac71e4eSEmmanuel Vadot                input-enable;
113fac71e4eSEmmanuel Vadot                slew-rate = <208>;
114fac71e4eSEmmanuel Vadot            };
115fac71e4eSEmmanuel Vadot
116fac71e4eSEmmanuel Vadot            llce-can0-grp1 {
117fac71e4eSEmmanuel Vadot                pinmux = <0x2c2>;
118fac71e4eSEmmanuel Vadot                output-enable;
119fac71e4eSEmmanuel Vadot                slew-rate = <208>;
120fac71e4eSEmmanuel Vadot            };
121fac71e4eSEmmanuel Vadot        };
122fac71e4eSEmmanuel Vadot    };
123fac71e4eSEmmanuel Vadot...
124