Commit 25491559 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven

pinctrl: sh-pfc: sh73a0: Use new macros for non-GPIO pins

Update the SH-Mobile AG5 pin control driver to use the new macros for
describing pins without GPIO functionality.  This replaces the use of
physical pin numbers on the SH-Mobile AG5 SoC (in 34x34 BGA package) by
symbolic enum values, referring to signal names.

Note that the user-visible names of these pins are still based on pin
numbers instead of signal names, to preserve DT backwards compatibility.
Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: default avatarNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
parent 7ad549ff
...@@ -43,6 +43,9 @@ ...@@ -43,6 +43,9 @@
PORT_1(288, fn, pfx##288, sfx), PORT_1(289, fn, pfx##289, sfx), \ PORT_1(288, fn, pfx##288, sfx), PORT_1(289, fn, pfx##289, sfx), \
PORT_10(290, fn, pfx##29, sfx), PORT_10(300, fn, pfx##30, sfx) PORT_10(290, fn, pfx##29, sfx), PORT_10(300, fn, pfx##30, sfx)
#define CPU_ALL_NOGP(fn) \
PIN_NOGP(A11, "F26", fn)
enum { enum {
PINMUX_RESERVED = 0, PINMUX_RESERVED = 0,
...@@ -1158,11 +1161,13 @@ static const u16 pinmux_data[] = { ...@@ -1158,11 +1161,13 @@ static const u16 pinmux_data[] = {
#define SH73A0_PIN_IO_PU_PD(pin) SH_PFC_PIN_CFG(pin, __IO | __PUD) #define SH73A0_PIN_IO_PU_PD(pin) SH_PFC_PIN_CFG(pin, __IO | __PUD)
#define SH73A0_PIN_O(pin) SH_PFC_PIN_CFG(pin, __O) #define SH73A0_PIN_O(pin) SH_PFC_PIN_CFG(pin, __O)
/* Pin numbers for pins without a corresponding GPIO port number are computed /*
* from the row and column numbers with a 1000 offset to avoid collisions with * Pins not associated with a GPIO port.
* GPIO port numbers.
*/ */
#define PIN_NUMBER(row, col) (1000+((row)-1)*34+(col)-1) enum {
PORT_ASSIGN_LAST(),
NOGP_ALL(),
};
static const struct sh_pfc_pin pinmux_pins[] = { static const struct sh_pfc_pin pinmux_pins[] = {
/* Table 25-1 (I/O and Pull U/D) */ /* Table 25-1 (I/O and Pull U/D) */
...@@ -1437,7 +1442,7 @@ static const struct sh_pfc_pin pinmux_pins[] = { ...@@ -1437,7 +1442,7 @@ static const struct sh_pfc_pin pinmux_pins[] = {
SH73A0_PIN_O(309), SH73A0_PIN_O(309),
/* Pins not associated with a GPIO port */ /* Pins not associated with a GPIO port */
SH_PFC_PIN_NAMED(6, 26, F26), PINMUX_NOGP_ALL(),
}; };
/* - BSC -------------------------------------------------------------------- */ /* - BSC -------------------------------------------------------------------- */
...@@ -1863,7 +1868,7 @@ static const unsigned int keysc_out7_2_mux[] = { ...@@ -1863,7 +1868,7 @@ static const unsigned int keysc_out7_2_mux[] = {
}; };
static const unsigned int keysc_out8_0_pins[] = { static const unsigned int keysc_out8_0_pins[] = {
/* KEYOUT8 */ /* KEYOUT8 */
PIN_NUMBER(6, 26), PIN_A11,
}; };
static const unsigned int keysc_out8_0_mux[] = { static const unsigned int keysc_out8_0_mux[] = {
KEYOUT8_MARK, KEYOUT8_MARK,
...@@ -3073,7 +3078,7 @@ static const unsigned int tpu4_to2_mux[] = { ...@@ -3073,7 +3078,7 @@ static const unsigned int tpu4_to2_mux[] = {
}; };
static const unsigned int tpu4_to3_pins[] = { static const unsigned int tpu4_to3_pins[] = {
/* TO */ /* TO */
PIN_NUMBER(6, 26), PIN_A11,
}; };
static const unsigned int tpu4_to3_mux[] = { static const unsigned int tpu4_to3_mux[] = {
TPU4TO3_MARK, TPU4TO3_MARK,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment