Skip to content

Commit a91cbf5

Browse files
committed
Merge tag 'renesas-pinctrl-for-v7.1-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel
pinctrl: renesas: Updates for v7.1 - Add pin configuration support for RZ/T2H and RZ/N2H, - Fix save/restore of registers for ports with variable pincfg per pin on RZ/G3E, RZ/V2H(P), RZ/V2N, and RZ/Five, - Drop a superfluous blank line. Signed-off-by: Linus Walleij <linusw@kernel.org>
2 parents b4e93cb + 3f92867 commit a91cbf5

4 files changed

Lines changed: 291 additions & 9 deletions

File tree

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,23 @@ definitions:
8383
input: true
8484
input-enable: true
8585
output-enable: true
86+
bias-disable: true
87+
bias-pull-down: true
88+
bias-pull-up: true
89+
input-schmitt-enable: true
90+
input-schmitt-disable: true
91+
slew-rate:
92+
description: 0 is slow slew rate, 1 is fast slew rate
93+
enum: [0, 1]
94+
drive-strength-microamp:
95+
description: |
96+
Four discrete levels are supported (via registers DRCTLm), corresponding
97+
to the following nominal values:
98+
- 2500 (Low strength)
99+
- 5000 (Middle strength)
100+
- 9000 (High strength)
101+
- 11800 (Ultra High strength)
102+
enum: [2500, 5000, 9000, 11800]
86103
oneOf:
87104
- required: [pinmux]
88105
- required: [pins]

drivers/pinctrl/renesas/pinctrl-rza1.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ static inline unsigned int rza1_get_bit(struct rza1_port *port,
589589
{
590590
void __iomem *mem = RZA1_ADDR(port->base, reg, port->id);
591591

592-
return ioread16(mem) & BIT(bit);
592+
return !!(ioread16(mem) & BIT(bit));
593593
}
594594

595595
/**

drivers/pinctrl/renesas/pinctrl-rzg2l.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1475,7 +1475,6 @@ static int rzg2l_pinctrl_pinconf_set(struct pinctrl_dev *pctldev,
14751475
arg = pinconf_to_config_argument(_configs[i]);
14761476
switch (param) {
14771477
case PIN_CONFIG_INPUT_ENABLE:
1478-
14791478
if (!(cfg & PIN_CFG_IEN))
14801479
return -EINVAL;
14811480

@@ -3012,6 +3011,13 @@ static void rzg2l_pinctrl_pm_setup_regs(struct rzg2l_pinctrl *pctrl, bool suspen
30123011
off = RZG2L_PIN_CFG_TO_PORT_OFFSET(cfg);
30133012
pincnt = hweight8(FIELD_GET(PIN_CFG_PIN_MAP_MASK, cfg));
30143013

3014+
if (cfg & RZG2L_VARIABLE_CFG) {
3015+
unsigned int pin = port * RZG2L_PINS_PER_PORT;
3016+
3017+
for (unsigned int i = 0; i < RZG2L_PINS_PER_PORT; i++)
3018+
cfg |= *(u64 *)pctrl->desc.pins[pin + i].drv_data;
3019+
}
3020+
30153021
caps = FIELD_GET(PIN_CFG_MASK, cfg);
30163022
has_iolh = !!(caps & (PIN_CFG_IOLH_A | PIN_CFG_IOLH_B | PIN_CFG_IOLH_C));
30173023
has_ien = !!(caps & PIN_CFG_IEN);

0 commit comments

Comments
 (0)