|
49 | 49 | PORT_GP_CFG_21(7, fn, sfx, CFG_FLAGS), \ |
50 | 50 | PORT_GP_CFG_14(8, fn, sfx, CFG_FLAGS | SH_PFC_PIN_CFG_IO_VOLTAGE_18_33) |
51 | 51 |
|
| 52 | +#define CPU_ALL_NOGP(fn) \ |
| 53 | + PIN_NOGP_CFG(VDDQ_AVB0, "VDDQ_AVB0", fn, SH_PFC_PIN_CFG_IO_VOLTAGE_18_25), \ |
| 54 | + PIN_NOGP_CFG(VDDQ_AVB1, "VDDQ_AVB1", fn, SH_PFC_PIN_CFG_IO_VOLTAGE_18_25), \ |
| 55 | + PIN_NOGP_CFG(VDDQ_AVB2, "VDDQ_AVB2", fn, SH_PFC_PIN_CFG_IO_VOLTAGE_18_25), \ |
| 56 | + PIN_NOGP_CFG(VDDQ_TSN0, "VDDQ_TSN0", fn, SH_PFC_PIN_CFG_IO_VOLTAGE_18_25) |
| 57 | + |
52 | 58 | /* GPSR0 */ |
53 | 59 | #define GPSR0_18 F_(MSIOF2_RXD, IP2SR0_11_8) |
54 | 60 | #define GPSR0_17 F_(MSIOF2_SCK, IP2SR0_7_4) |
@@ -1221,10 +1227,12 @@ static const u16 pinmux_data[] = { |
1221 | 1227 | */ |
1222 | 1228 | enum { |
1223 | 1229 | GP_ASSIGN_LAST(), |
| 1230 | + NOGP_ALL(), |
1224 | 1231 | }; |
1225 | 1232 |
|
1226 | 1233 | static const struct sh_pfc_pin pinmux_pins[] = { |
1227 | 1234 | PINMUX_GPIO_GP_ALL(), |
| 1235 | + PINMUX_NOGP_ALL(), |
1228 | 1236 | }; |
1229 | 1237 |
|
1230 | 1238 | /* - AUDIO CLOCK ----------------------------------------- */ |
@@ -3973,23 +3981,42 @@ static int r8a779g0_pin_to_pocctrl(unsigned int pin, u32 *pocctrl) |
3973 | 3981 | { |
3974 | 3982 | int bit = pin & 0x1f; |
3975 | 3983 |
|
3976 | | - *pocctrl = pinmux_ioctrl_regs[POC0].reg; |
3977 | | - if (pin >= RCAR_GP_PIN(0, 0) && pin <= RCAR_GP_PIN(0, 18)) |
| 3984 | + switch (pin) { |
| 3985 | + case RCAR_GP_PIN(0, 0) ... RCAR_GP_PIN(0, 18): |
| 3986 | + *pocctrl = pinmux_ioctrl_regs[POC0].reg; |
3978 | 3987 | return bit; |
3979 | 3988 |
|
3980 | | - *pocctrl = pinmux_ioctrl_regs[POC1].reg; |
3981 | | - if (pin >= RCAR_GP_PIN(1, 0) && pin <= RCAR_GP_PIN(1, 22)) |
| 3989 | + case RCAR_GP_PIN(1, 0) ... RCAR_GP_PIN(1, 22): |
| 3990 | + *pocctrl = pinmux_ioctrl_regs[POC1].reg; |
3982 | 3991 | return bit; |
3983 | 3992 |
|
3984 | | - *pocctrl = pinmux_ioctrl_regs[POC3].reg; |
3985 | | - if (pin >= RCAR_GP_PIN(3, 0) && pin <= RCAR_GP_PIN(3, 12)) |
| 3993 | + case RCAR_GP_PIN(3, 0) ... RCAR_GP_PIN(3, 12): |
| 3994 | + *pocctrl = pinmux_ioctrl_regs[POC3].reg; |
3986 | 3995 | return bit; |
3987 | 3996 |
|
3988 | | - *pocctrl = pinmux_ioctrl_regs[POC8].reg; |
3989 | | - if (pin >= RCAR_GP_PIN(8, 0) && pin <= RCAR_GP_PIN(8, 13)) |
| 3997 | + case PIN_VDDQ_TSN0: |
| 3998 | + *pocctrl = pinmux_ioctrl_regs[POC4].reg; |
| 3999 | + return 0; |
| 4000 | + |
| 4001 | + case PIN_VDDQ_AVB2: |
| 4002 | + *pocctrl = pinmux_ioctrl_regs[POC5].reg; |
| 4003 | + return 0; |
| 4004 | + |
| 4005 | + case PIN_VDDQ_AVB1: |
| 4006 | + *pocctrl = pinmux_ioctrl_regs[POC6].reg; |
| 4007 | + return 0; |
| 4008 | + |
| 4009 | + case PIN_VDDQ_AVB0: |
| 4010 | + *pocctrl = pinmux_ioctrl_regs[POC7].reg; |
| 4011 | + return 0; |
| 4012 | + |
| 4013 | + case RCAR_GP_PIN(8, 0) ... RCAR_GP_PIN(8, 13): |
| 4014 | + *pocctrl = pinmux_ioctrl_regs[POC8].reg; |
3990 | 4015 | return bit; |
3991 | 4016 |
|
3992 | | - return -EINVAL; |
| 4017 | + default: |
| 4018 | + return -EINVAL; |
| 4019 | + } |
3993 | 4020 | } |
3994 | 4021 |
|
3995 | 4022 | static const struct pinmux_bias_reg pinmux_bias_regs[] = { |
|
0 commit comments