pinctrl: renesas: Add support for R-Car SoCs with pull-down only pins
authorGeert Uytterhoeven <geert+renesas@glider.be>
Wed, 3 Mar 2021 13:26:18 +0000 (14:26 +0100)
committerGeert Uytterhoeven <geert+renesas@glider.be>
Wed, 24 Mar 2021 09:38:29 +0000 (10:38 +0100)
commit1d3928a3e69cd6ec0ea837d3eeccb2ff604b5072
treef5655e5c270236bb7499accb10e8867c197b32d3
parent93d6c7d676d2640e223f6b3fac11c76173655a44
pinctrl: renesas: Add support for R-Car SoCs with pull-down only pins

Currently, the common R-Car bias handling supports pin controllers with
either:
  1. Separate pin Pull-Enable (PUEN) and pin Pull-Up/Down control (PUD)
     registers, for controlling both pin pull-up and pin pull-down,
  2. A single pin Pull-Up control register (PUPR), for controlling pin
     pull-up.

Add support for a variant of #2, where some bits in the single pin
Pull-Up control register (PUPR) control pin pull-down instead of pin
pull-up.  This is the case for the "ASEBRK#/ACK" pin on R-Car M2-W,
M2-N, and E2, and the "ACK" pin on RZ/G1M, RZ/G1N, RZ/G1E, and RZ/G1C.
To describe such a register, SoC-specific drivers need to provide two
instances of pinmux_bias_reg: a first one with the puen field filled in,
listing pins with pull-up functionality, and a second one with the pud
field filled in, listing pins with pull-down functionality.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Link: https://lore.kernel.org/r/20210303132619.3938128-6-geert+renesas@glider.be
drivers/pinctrl/renesas/pinctrl.c
drivers/pinctrl/renesas/sh_pfc.h