1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
|
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
# Copyright 2022, 2026 NXP
%YAML 1.2
---
$id: http://devicetree.org/schemas/pinctrl/nxp,s32g2-siul2-pinctrl.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: NXP S32G2 pin controller
maintainers:
- Ghennadi Procopciuc <Ghennadi.Procopciuc@oss.nxp.com>
- Chester Lin <chester62515@gmail.com>
description: |
S32G2 pinmux is implemented in SIUL2 (System Integration Unit Lite2),
whose memory map is split into two regions:
SIUL2_0 @ 0x4009c000
SIUL2_1 @ 0x44010000
Every SIUL2 region has multiple register types. MSCR and IMCR registers
need to be revealed for kernel to configure pinmux. PGPDO and PGPDI
registers are used for GPIO output/input operations. EIRQ registers
are used for external interrupt configuration.
Please note that some register indexes are reserved in S32G2, such as
MSCR102-MSCR111, MSCR123-MSCR143, IMCR84-IMCR118 and IMCR398-IMCR429.
properties:
compatible:
enum:
- nxp,s32g2-siul2-pinctrl
reg:
minItems: 6
description: |
A list of MSCR/IMCR/PGPDO/PGPDI/EIRQ register regions to be reserved.
- MSCR (Multiplexed Signal Configuration Register)
An MSCR register can configure the associated pin as either a GPIO pin
or a function output pin depends on the selected signal source.
- IMCR (Input Multiplexed Signal Configuration Register)
An IMCR register can configure the associated pin as function input
pin depends on the selected signal source.
- PGPDO (Parallel GPIO Pad Data Out Register)
A PGPDO register is used to set the output value of a GPIO pin.
- PGPDI (Parallel GPIO Pad Data In Register)
A PGPDI register is used to read the input value of a GPIO pin.
- EIRQ (External Interrupt Request)
EIRQ registers are used to configure and manage external interrupts.
items:
- description: MSCR registers group 0 in SIUL2_0
- description: MSCR registers group 1 in SIUL2_1
- description: MSCR registers group 2 in SIUL2_1
- description: IMCR registers group 0 in SIUL2_0
- description: IMCR registers group 1 in SIUL2_1
- description: IMCR registers group 2 in SIUL2_1
- description: PGPDO registers in SIUL2_0
- description: PGPDI registers in SIUL2_0
- description: PGPDO registers in SIUL2_1
- description: PGPDI registers in SIUL2_1
- description: EIRQ registers in SIUL2_1
gpio-controller: true
"#gpio-cells":
const: 2
gpio-ranges:
minItems: 1
maxItems: 4
interrupt-controller: true
"#interrupt-cells":
const: 2
interrupts:
maxItems: 1
patternProperties:
'-pins$':
type: object
additionalProperties: false
patternProperties:
'-grp[0-9]$':
type: object
allOf:
- $ref: pinmux-node.yaml#
- $ref: pincfg-node.yaml#
description: |
Pinctrl node's client devices specify pin muxes using subnodes,
which in turn use the standard properties below.
properties:
bias-disable: true
bias-high-impedance: true
bias-pull-up: true
bias-pull-down: true
drive-open-drain: true
input-enable: true
output-enable: true
pinmux:
description: |
An integer array for representing pinmux configurations of
a device. Each integer consists of a PIN_ID and a 4-bit
selected signal source(SSS) as IOMUX setting, which is
calculated as: pinmux = (PIN_ID << 4 | SSS)
slew-rate:
description: Supported slew rate based on Fmax values (MHz)
enum: [83, 133, 150, 166, 208]
additionalProperties: false
required:
- compatible
- reg
oneOf:
- description: Legacy pinctrl-only node
properties:
reg:
maxItems: 6
gpio-controller: false
"#gpio-cells": false
gpio-ranges: false
interrupt-controller: false
"#interrupt-cells": false
interrupts: false
- description: Pinctrl node with GPIO and external interrupt support
required:
- gpio-controller
- "#gpio-cells"
- gpio-ranges
- interrupt-controller
- "#interrupt-cells"
- interrupts
properties:
reg:
minItems: 11
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
pinctrl: pinctrl@4009c240 {
compatible = "nxp,s32g2-siul2-pinctrl";
/* MSCR0-MSCR101 registers on siul2_0 */
reg = <0x4009c240 0x198>,
/* MSCR112-MSCR122 registers on siul2_1 */
<0x44010400 0x2c>,
/* MSCR144-MSCR190 registers on siul2_1 */
<0x44010480 0xbc>,
/* IMCR0-IMCR83 registers on siul2_0 */
<0x4009ca40 0x150>,
/* IMCR119-IMCR397 registers on siul2_1 */
<0x44010c1c 0x45c>,
/* IMCR430-IMCR495 registers on siul2_1 */
<0x440110f8 0x108>,
/* PGPDO registers on siul2_0 */
<0x4009d700 0x10>,
/* PGPDI registers on siul2_0 */
<0x4009d740 0x10>,
/* PGPDO registers on siul2_1 */
<0x44011700 0x18>,
/* PGPDI registers on siul2_1 */
<0x44011740 0x18>,
/* EIRQ registers on siul2_1 */
<0x44010010 0x34>;
gpio-controller;
#gpio-cells = <2>;
gpio-ranges = <&pinctrl 0 0 102>,
<&pinctrl 112 112 79>;
interrupt-controller;
#interrupt-cells = <2>;
interrupts = <GIC_SPI 210 IRQ_TYPE_LEVEL_HIGH>;
llce-can0-pins {
llce-can0-grp0 {
pinmux = <0x2b0>;
input-enable;
slew-rate = <208>;
};
llce-can0-grp1 {
pinmux = <0x2c2>;
output-enable;
slew-rate = <208>;
};
};
};
...
|