Skip to content

Commit 2659f36

Browse files
author
Linus Walleij
committed
Merge tag 'renesas-pinctrl-for-v6.11-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel
pinctrl: renesas: Updates for v6.11 - Add support for the new RZ/V2H(P) (R9A09G057) Soc, - Miscellaneous fixes and improvements. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 parents c47d254 + 9bd95ac commit 2659f36

6 files changed

Lines changed: 652 additions & 236 deletions

File tree

Documentation/devicetree/bindings/pinctrl/renesas,rzg2l-pinctrl.yaml

Lines changed: 33 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ properties:
2626
- renesas,r9a07g043-pinctrl # RZ/G2UL{Type-1,Type-2} and RZ/Five
2727
- renesas,r9a07g044-pinctrl # RZ/G2{L,LC}
2828
- renesas,r9a08g045-pinctrl # RZ/G3S
29+
- renesas,r9a09g057-pinctrl # RZ/V2H(P)
2930

3031
- items:
3132
- enum:
@@ -66,10 +67,14 @@ properties:
6667
maxItems: 1
6768

6869
resets:
69-
items:
70-
- description: GPIO_RSTN signal
71-
- description: GPIO_PORT_RESETN signal
72-
- description: GPIO_SPARE_RESETN signal
70+
oneOf:
71+
- items:
72+
- description: GPIO_RSTN signal
73+
- description: GPIO_PORT_RESETN signal
74+
- description: GPIO_SPARE_RESETN signal
75+
- items:
76+
- description: PFC main reset
77+
- description: Reset for the control register related to WDTUDFCA and WDTUDFFCM pins
7378

7479
additionalProperties:
7580
anyOf:
@@ -79,21 +84,6 @@ additionalProperties:
7984
- $ref: pincfg-node.yaml#
8085
- $ref: pinmux-node.yaml#
8186

82-
- if:
83-
properties:
84-
compatible:
85-
contains:
86-
enum:
87-
- renesas,r9a08g045-pinctrl
88-
then:
89-
properties:
90-
drive-strength: false
91-
output-impedance-ohms: false
92-
slew-rate: false
93-
else:
94-
properties:
95-
drive-strength-microamp: false
96-
9787
description:
9888
Pin controller client devices use pin configuration subnodes (children
9989
and grandchildren) for desired pin configuration.
@@ -126,6 +116,16 @@ additionalProperties:
126116
output-high: true
127117
output-low: true
128118
line-name: true
119+
bias-disable: true
120+
bias-pull-down: true
121+
bias-pull-up: true
122+
renesas,output-impedance:
123+
description:
124+
Output impedance for pins on the RZ/V2H(P) SoC. The value provided by this
125+
property corresponds to register bit values that can be set in the PFC_IOLH_mn
126+
register, which adjusts the drive strength value and is pin-dependent.
127+
$ref: /schemas/types.yaml#/definitions/uint32
128+
enum: [0, 1, 2, 3]
129129

130130
- type: object
131131
additionalProperties:
@@ -134,6 +134,20 @@ additionalProperties:
134134
allOf:
135135
- $ref: pinctrl.yaml#
136136

137+
- if:
138+
properties:
139+
compatible:
140+
contains:
141+
const: renesas,r9a09g057-pinctrl
142+
then:
143+
properties:
144+
resets:
145+
maxItems: 2
146+
else:
147+
properties:
148+
resets:
149+
minItems: 3
150+
137151
required:
138152
- compatible
139153
- reg

drivers/pinctrl/renesas/pinctrl-rza1.c

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -852,7 +852,6 @@ static const struct gpio_chip rza1_gpiochip_template = {
852852
*/
853853
static int rza1_dt_node_pin_count(struct device_node *np)
854854
{
855-
struct device_node *child;
856855
struct property *of_pins;
857856
unsigned int npins;
858857

@@ -861,12 +860,10 @@ static int rza1_dt_node_pin_count(struct device_node *np)
861860
return of_pins->length / sizeof(u32);
862861

863862
npins = 0;
864-
for_each_child_of_node(np, child) {
863+
for_each_child_of_node_scoped(np, child) {
865864
of_pins = of_find_property(child, "pinmux", NULL);
866-
if (!of_pins) {
867-
of_node_put(child);
865+
if (!of_pins)
868866
return -EINVAL;
869-
}
870867

871868
npins += of_pins->length / sizeof(u32);
872869
}
@@ -986,7 +983,6 @@ static int rza1_dt_node_to_map(struct pinctrl_dev *pctldev,
986983
struct rza1_pinctrl *rza1_pctl = pinctrl_dev_get_drvdata(pctldev);
987984
struct rza1_mux_conf *mux_confs, *mux_conf;
988985
unsigned int *grpins, *grpin;
989-
struct device_node *child;
990986
const char *grpname;
991987
const char **fngrps;
992988
int ret, npins;
@@ -1023,13 +1019,11 @@ static int rza1_dt_node_to_map(struct pinctrl_dev *pctldev,
10231019

10241020
ret = rza1_parse_pinmux_node(rza1_pctl, np, mux_conf, grpin);
10251021
if (ret == -ENOENT)
1026-
for_each_child_of_node(np, child) {
1022+
for_each_child_of_node_scoped(np, child) {
10271023
ret = rza1_parse_pinmux_node(rza1_pctl, child, mux_conf,
10281024
grpin);
1029-
if (ret < 0) {
1030-
of_node_put(child);
1025+
if (ret < 0)
10311026
return ret;
1032-
}
10331027

10341028
grpin += ret;
10351029
mux_conf += ret;

0 commit comments

Comments
 (0)