1 // SPDX-License-Identifier: GPL-2.0-or-later 2 /* 3 * Realtek DHC 1619B pin controller driver 4 * 5 * Copyright (c) 2023 Realtek Semiconductor Corp. 6 * 7 */ 8 9 #include <linux/module.h> 10 #include <linux/of.h> 11 #include <linux/platform_device.h> 12 #include <linux/pinctrl/pinctrl.h> 13 14 #include "pinctrl-rtd.h" 15 16 enum rtd16xxb_iso_pins { 17 RTD1619B_ISO_GPIO_0 = 0, 18 RTD1619B_ISO_GPIO_1, 19 RTD1619B_ISO_GPIO_2, 20 RTD1619B_ISO_GPIO_3, 21 RTD1619B_ISO_GPIO_4, 22 RTD1619B_ISO_GPIO_5, 23 RTD1619B_ISO_GPIO_6, 24 RTD1619B_ISO_GPIO_7, 25 RTD1619B_ISO_GPIO_8, 26 RTD1619B_ISO_GPIO_9, 27 RTD1619B_ISO_GPIO_10, 28 RTD1619B_ISO_GPIO_11, 29 RTD1619B_ISO_GPIO_12, 30 RTD1619B_ISO_GPIO_13, 31 RTD1619B_ISO_GPIO_14, 32 RTD1619B_ISO_GPIO_15, 33 RTD1619B_ISO_GPIO_16, 34 RTD1619B_ISO_GPIO_17, 35 RTD1619B_ISO_GPIO_18, 36 RTD1619B_ISO_GPIO_19, 37 RTD1619B_ISO_GPIO_20, 38 RTD1619B_ISO_GPIO_21, 39 RTD1619B_ISO_GPIO_22, 40 RTD1619B_ISO_GPIO_23, 41 RTD1619B_ISO_USB_CC2, 42 RTD1619B_ISO_GPIO_25, 43 RTD1619B_ISO_GPIO_26, 44 RTD1619B_ISO_GPIO_27, 45 RTD1619B_ISO_GPIO_28, 46 RTD1619B_ISO_GPIO_29, 47 RTD1619B_ISO_GPIO_30, 48 RTD1619B_ISO_GPIO_31, 49 RTD1619B_ISO_GPIO_32, 50 RTD1619B_ISO_GPIO_33, 51 RTD1619B_ISO_GPIO_34, 52 RTD1619B_ISO_GPIO_35, 53 RTD1619B_ISO_HIF_DATA, 54 RTD1619B_ISO_HIF_EN, 55 RTD1619B_ISO_HIF_RDY, 56 RTD1619B_ISO_HIF_CLK, 57 RTD1619B_ISO_GPIO_40, 58 RTD1619B_ISO_GPIO_41, 59 RTD1619B_ISO_GPIO_42, 60 RTD1619B_ISO_GPIO_43, 61 RTD1619B_ISO_GPIO_44, 62 RTD1619B_ISO_GPIO_45, 63 RTD1619B_ISO_GPIO_46, 64 RTD1619B_ISO_GPIO_47, 65 RTD1619B_ISO_GPIO_48, 66 RTD1619B_ISO_GPIO_49, 67 RTD1619B_ISO_GPIO_50, 68 RTD1619B_ISO_USB_CC1, 69 RTD1619B_ISO_GPIO_52, 70 RTD1619B_ISO_GPIO_53, 71 RTD1619B_ISO_IR_RX, 72 RTD1619B_ISO_UR0_RX, 73 RTD1619B_ISO_UR0_TX, 74 RTD1619B_ISO_GPIO_57, 75 RTD1619B_ISO_GPIO_58, 76 RTD1619B_ISO_GPIO_59, 77 RTD1619B_ISO_GPIO_60, 78 RTD1619B_ISO_GPIO_61, 79 RTD1619B_ISO_GPIO_62, 80 RTD1619B_ISO_GPIO_63, 81 RTD1619B_ISO_GPIO_64, 82 RTD1619B_ISO_GPIO_65, 83 RTD1619B_ISO_GPIO_66, 84 RTD1619B_ISO_GPIO_67, 85 RTD1619B_ISO_GPIO_68, 86 RTD1619B_ISO_GPIO_69, 87 RTD1619B_ISO_GPIO_70, 88 RTD1619B_ISO_GPIO_71, 89 RTD1619B_ISO_GPIO_72, 90 RTD1619B_ISO_GPIO_73, 91 RTD1619B_ISO_GPIO_74, 92 RTD1619B_ISO_GPIO_75, 93 RTD1619B_ISO_GPIO_76, 94 RTD1619B_ISO_EMMC_CMD, 95 RTD1619B_ISO_SPI_CE_N, 96 RTD1619B_ISO_SPI_SCK, 97 RTD1619B_ISO_SPI_SO, 98 RTD1619B_ISO_SPI_SI, 99 RTD1619B_ISO_EMMC_RST_N, 100 RTD1619B_ISO_EMMC_DD_SB, 101 RTD1619B_ISO_EMMC_CLK, 102 RTD1619B_ISO_EMMC_DATA_0, 103 RTD1619B_ISO_EMMC_DATA_1, 104 RTD1619B_ISO_EMMC_DATA_2, 105 RTD1619B_ISO_EMMC_DATA_3, 106 RTD1619B_ISO_EMMC_DATA_4, 107 RTD1619B_ISO_EMMC_DATA_5, 108 RTD1619B_ISO_EMMC_DATA_6, 109 RTD1619B_ISO_EMMC_DATA_7, 110 RTD1619B_ISO_UR2_LOC, 111 RTD1619B_ISO_GSPI_LOC, 112 RTD1619B_ISO_SDIO_LOC, 113 RTD1619B_ISO_HI_LOC, 114 RTD1619B_ISO_HI_WIDTH, 115 RTD1619B_ISO_SF_EN, 116 RTD1619B_ISO_ARM_TRACE_DBG_EN, 117 RTD1619B_ISO_PWM_01_OPEN_DRAIN_EN_LOC0, 118 RTD1619B_ISO_PWM_23_OPEN_DRAIN_EN_LOC0, 119 RTD1619B_ISO_PWM_01_OPEN_DRAIN_EN_LOC1, 120 RTD1619B_ISO_PWM_23_OPEN_DRAIN_EN_LOC1, 121 RTD1619B_ISO_EJTAG_ACPU_LOC, 122 RTD1619B_ISO_EJTAG_VCPU_LOC, 123 RTD1619B_ISO_EJTAG_SCPU_LOC, 124 RTD1619B_ISO_DMIC_LOC, 125 RTD1619B_ISO_ISO_GSPI_LOC, 126 RTD1619B_ISO_EJTAG_VE3_LOC, 127 RTD1619B_ISO_EJTAG_AUCPU0_LOC, 128 RTD1619B_ISO_EJTAG_AUCPU1_LOC, 129 }; 130 131 static const struct pinctrl_pin_desc rtd1619b_iso_pins[] = { 132 PINCTRL_PIN(RTD1619B_ISO_GPIO_0, "gpio_0"), 133 PINCTRL_PIN(RTD1619B_ISO_GPIO_1, "gpio_1"), 134 PINCTRL_PIN(RTD1619B_ISO_GPIO_2, "gpio_2"), 135 PINCTRL_PIN(RTD1619B_ISO_GPIO_3, "gpio_3"), 136 PINCTRL_PIN(RTD1619B_ISO_GPIO_4, "gpio_4"), 137 PINCTRL_PIN(RTD1619B_ISO_GPIO_5, "gpio_5"), 138 PINCTRL_PIN(RTD1619B_ISO_GPIO_6, "gpio_6"), 139 PINCTRL_PIN(RTD1619B_ISO_GPIO_7, "gpio_7"), 140 PINCTRL_PIN(RTD1619B_ISO_GPIO_8, "gpio_8"), 141 PINCTRL_PIN(RTD1619B_ISO_GPIO_9, "gpio_9"), 142 PINCTRL_PIN(RTD1619B_ISO_GPIO_10, "gpio_10"), 143 PINCTRL_PIN(RTD1619B_ISO_GPIO_11, "gpio_11"), 144 PINCTRL_PIN(RTD1619B_ISO_GPIO_12, "gpio_12"), 145 PINCTRL_PIN(RTD1619B_ISO_GPIO_13, "gpio_13"), 146 PINCTRL_PIN(RTD1619B_ISO_GPIO_14, "gpio_14"), 147 PINCTRL_PIN(RTD1619B_ISO_GPIO_15, "gpio_15"), 148 PINCTRL_PIN(RTD1619B_ISO_GPIO_16, "gpio_16"), 149 PINCTRL_PIN(RTD1619B_ISO_GPIO_17, "gpio_17"), 150 PINCTRL_PIN(RTD1619B_ISO_GPIO_18, "gpio_18"), 151 PINCTRL_PIN(RTD1619B_ISO_GPIO_19, "gpio_19"), 152 PINCTRL_PIN(RTD1619B_ISO_GPIO_20, "gpio_20"), 153 PINCTRL_PIN(RTD1619B_ISO_GPIO_21, "gpio_21"), 154 PINCTRL_PIN(RTD1619B_ISO_GPIO_22, "gpio_22"), 155 PINCTRL_PIN(RTD1619B_ISO_GPIO_23, "gpio_23"), 156 PINCTRL_PIN(RTD1619B_ISO_USB_CC2, "usb_cc2"), 157 PINCTRL_PIN(RTD1619B_ISO_GPIO_25, "gpio_25"), 158 PINCTRL_PIN(RTD1619B_ISO_GPIO_26, "gpio_26"), 159 PINCTRL_PIN(RTD1619B_ISO_GPIO_27, "gpio_27"), 160 PINCTRL_PIN(RTD1619B_ISO_GPIO_28, "gpio_28"), 161 PINCTRL_PIN(RTD1619B_ISO_GPIO_29, "gpio_29"), 162 PINCTRL_PIN(RTD1619B_ISO_GPIO_30, "gpio_30"), 163 PINCTRL_PIN(RTD1619B_ISO_GPIO_31, "gpio_31"), 164 PINCTRL_PIN(RTD1619B_ISO_GPIO_32, "gpio_32"), 165 PINCTRL_PIN(RTD1619B_ISO_GPIO_33, "gpio_33"), 166 PINCTRL_PIN(RTD1619B_ISO_GPIO_34, "gpio_34"), 167 PINCTRL_PIN(RTD1619B_ISO_GPIO_35, "gpio_35"), 168 PINCTRL_PIN(RTD1619B_ISO_HIF_DATA, "hif_data"), 169 PINCTRL_PIN(RTD1619B_ISO_HIF_EN, "hif_en"), 170 PINCTRL_PIN(RTD1619B_ISO_HIF_RDY, "hif_rdy"), 171 PINCTRL_PIN(RTD1619B_ISO_HIF_CLK, "hif_clk"), 172 PINCTRL_PIN(RTD1619B_ISO_GPIO_40, "gpio_40"), 173 PINCTRL_PIN(RTD1619B_ISO_GPIO_41, "gpio_41"), 174 PINCTRL_PIN(RTD1619B_ISO_GPIO_42, "gpio_42"), 175 PINCTRL_PIN(RTD1619B_ISO_GPIO_43, "gpio_43"), 176 PINCTRL_PIN(RTD1619B_ISO_GPIO_44, "gpio_44"), 177 PINCTRL_PIN(RTD1619B_ISO_GPIO_45, "gpio_45"), 178 PINCTRL_PIN(RTD1619B_ISO_GPIO_46, "gpio_46"), 179 PINCTRL_PIN(RTD1619B_ISO_GPIO_47, "gpio_47"), 180 PINCTRL_PIN(RTD1619B_ISO_GPIO_48, "gpio_48"), 181 PINCTRL_PIN(RTD1619B_ISO_GPIO_49, "gpio_49"), 182 PINCTRL_PIN(RTD1619B_ISO_GPIO_50, "gpio_50"), 183 PINCTRL_PIN(RTD1619B_ISO_USB_CC1, "usb_cc1"), 184 PINCTRL_PIN(RTD1619B_ISO_GPIO_52, "gpio_52"), 185 PINCTRL_PIN(RTD1619B_ISO_GPIO_53, "gpio_53"), 186 PINCTRL_PIN(RTD1619B_ISO_IR_RX, "ir_rx"), 187 PINCTRL_PIN(RTD1619B_ISO_UR0_RX, "ur0_rx"), 188 PINCTRL_PIN(RTD1619B_ISO_UR0_TX, "ur0_tx"), 189 PINCTRL_PIN(RTD1619B_ISO_GPIO_57, "gpio_57"), 190 PINCTRL_PIN(RTD1619B_ISO_GPIO_58, "gpio_58"), 191 PINCTRL_PIN(RTD1619B_ISO_GPIO_59, "gpio_59"), 192 PINCTRL_PIN(RTD1619B_ISO_GPIO_60, "gpio_60"), 193 PINCTRL_PIN(RTD1619B_ISO_GPIO_61, "gpio_61"), 194 PINCTRL_PIN(RTD1619B_ISO_GPIO_62, "gpio_62"), 195 PINCTRL_PIN(RTD1619B_ISO_GPIO_63, "gpio_63"), 196 PINCTRL_PIN(RTD1619B_ISO_GPIO_64, "gpio_64"), 197 PINCTRL_PIN(RTD1619B_ISO_GPIO_65, "gpio_65"), 198 PINCTRL_PIN(RTD1619B_ISO_GPIO_66, "gpio_66"), 199 PINCTRL_PIN(RTD1619B_ISO_GPIO_67, "gpio_67"), 200 PINCTRL_PIN(RTD1619B_ISO_GPIO_68, "gpio_68"), 201 PINCTRL_PIN(RTD1619B_ISO_GPIO_69, "gpio_69"), 202 PINCTRL_PIN(RTD1619B_ISO_GPIO_70, "gpio_70"), 203 PINCTRL_PIN(RTD1619B_ISO_GPIO_71, "gpio_71"), 204 PINCTRL_PIN(RTD1619B_ISO_GPIO_72, "gpio_72"), 205 PINCTRL_PIN(RTD1619B_ISO_GPIO_73, "gpio_73"), 206 PINCTRL_PIN(RTD1619B_ISO_GPIO_74, "gpio_74"), 207 PINCTRL_PIN(RTD1619B_ISO_GPIO_75, "gpio_75"), 208 PINCTRL_PIN(RTD1619B_ISO_GPIO_76, "gpio_76"), 209 PINCTRL_PIN(RTD1619B_ISO_EMMC_CMD, "emmc_cmd"), 210 PINCTRL_PIN(RTD1619B_ISO_SPI_CE_N, "spi_ce_n"), 211 PINCTRL_PIN(RTD1619B_ISO_SPI_SCK, "spi_sck"), 212 PINCTRL_PIN(RTD1619B_ISO_SPI_SO, "spi_so"), 213 PINCTRL_PIN(RTD1619B_ISO_SPI_SI, "spi_si"), 214 PINCTRL_PIN(RTD1619B_ISO_EMMC_RST_N, "emmc_rst_n"), 215 PINCTRL_PIN(RTD1619B_ISO_EMMC_DD_SB, "emmc_dd_sb"), 216 PINCTRL_PIN(RTD1619B_ISO_EMMC_CLK, "emmc_clk"), 217 PINCTRL_PIN(RTD1619B_ISO_EMMC_DATA_0, "emmc_data_0"), 218 PINCTRL_PIN(RTD1619B_ISO_EMMC_DATA_1, "emmc_data_1"), 219 PINCTRL_PIN(RTD1619B_ISO_EMMC_DATA_2, "emmc_data_2"), 220 PINCTRL_PIN(RTD1619B_ISO_EMMC_DATA_3, "emmc_data_3"), 221 PINCTRL_PIN(RTD1619B_ISO_EMMC_DATA_4, "emmc_data_4"), 222 PINCTRL_PIN(RTD1619B_ISO_EMMC_DATA_5, "emmc_data_5"), 223 PINCTRL_PIN(RTD1619B_ISO_EMMC_DATA_6, "emmc_data_6"), 224 PINCTRL_PIN(RTD1619B_ISO_EMMC_DATA_7, "emmc_data_7"), 225 PINCTRL_PIN(RTD1619B_ISO_UR2_LOC, "ur2_loc"), 226 PINCTRL_PIN(RTD1619B_ISO_GSPI_LOC, "gspi_loc"), 227 PINCTRL_PIN(RTD1619B_ISO_SDIO_LOC, "sdio_loc"), 228 PINCTRL_PIN(RTD1619B_ISO_HI_LOC, "hi_loc"), 229 PINCTRL_PIN(RTD1619B_ISO_HI_WIDTH, "hi_width"), 230 PINCTRL_PIN(RTD1619B_ISO_SF_EN, "sf_en"), 231 PINCTRL_PIN(RTD1619B_ISO_ARM_TRACE_DBG_EN, "arm_trace_dbg_en"), 232 PINCTRL_PIN(RTD1619B_ISO_PWM_01_OPEN_DRAIN_EN_LOC0, "pwm_01_open_drain_en_loc0"), 233 PINCTRL_PIN(RTD1619B_ISO_PWM_23_OPEN_DRAIN_EN_LOC0, "pwm_23_open_drain_en_loc0"), 234 PINCTRL_PIN(RTD1619B_ISO_PWM_01_OPEN_DRAIN_EN_LOC1, "pwm_01_open_drain_en_loc1"), 235 PINCTRL_PIN(RTD1619B_ISO_PWM_23_OPEN_DRAIN_EN_LOC1, "pwm_23_open_drain_en_loc1"), 236 PINCTRL_PIN(RTD1619B_ISO_EJTAG_ACPU_LOC, "ejtag_acpu_loc"), 237 PINCTRL_PIN(RTD1619B_ISO_EJTAG_VCPU_LOC, "ejtag_vcpu_loc"), 238 PINCTRL_PIN(RTD1619B_ISO_EJTAG_SCPU_LOC, "ejtag_scpu_loc"), 239 PINCTRL_PIN(RTD1619B_ISO_DMIC_LOC, "dmic_loc"), 240 PINCTRL_PIN(RTD1619B_ISO_ISO_GSPI_LOC, "iso_gspi_loc"), 241 PINCTRL_PIN(RTD1619B_ISO_EJTAG_VE3_LOC, "ejtag_ve3_loc"), 242 PINCTRL_PIN(RTD1619B_ISO_EJTAG_AUCPU0_LOC, "ejtag_aucpu0_loc"), 243 PINCTRL_PIN(RTD1619B_ISO_EJTAG_AUCPU1_LOC, "ejtag_aucpu1_loc"), 244 }; 245 246 #define DECLARE_RTD1619B_PIN(_pin, _name) \ 247 static const unsigned int rtd1619b_## _name ##_pins[] = { _pin } 248 249 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_0, gpio_0); 250 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_1, gpio_1); 251 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_2, gpio_2); 252 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_3, gpio_3); 253 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_4, gpio_4); 254 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_5, gpio_5); 255 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_6, gpio_6); 256 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_7, gpio_7); 257 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_8, gpio_8); 258 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_9, gpio_9); 259 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_10, gpio_10); 260 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_11, gpio_11); 261 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_12, gpio_12); 262 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_13, gpio_13); 263 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_14, gpio_14); 264 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_15, gpio_15); 265 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_16, gpio_16); 266 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_17, gpio_17); 267 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_18, gpio_18); 268 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_19, gpio_19); 269 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_20, gpio_20); 270 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_21, gpio_21); 271 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_22, gpio_22); 272 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_23, gpio_23); 273 DECLARE_RTD1619B_PIN(RTD1619B_ISO_USB_CC2, usb_cc2); 274 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_25, gpio_25); 275 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_26, gpio_26); 276 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_27, gpio_27); 277 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_28, gpio_28); 278 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_29, gpio_29); 279 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_30, gpio_30); 280 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_31, gpio_31); 281 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_32, gpio_32); 282 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_33, gpio_33); 283 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_34, gpio_34); 284 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_35, gpio_35); 285 DECLARE_RTD1619B_PIN(RTD1619B_ISO_HIF_DATA, hif_data); 286 DECLARE_RTD1619B_PIN(RTD1619B_ISO_HIF_EN, hif_en); 287 DECLARE_RTD1619B_PIN(RTD1619B_ISO_HIF_RDY, hif_rdy); 288 DECLARE_RTD1619B_PIN(RTD1619B_ISO_HIF_CLK, hif_clk); 289 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_40, gpio_40); 290 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_41, gpio_41); 291 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_42, gpio_42); 292 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_43, gpio_43); 293 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_44, gpio_44); 294 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_45, gpio_45); 295 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_46, gpio_46); 296 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_47, gpio_47); 297 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_48, gpio_48); 298 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_49, gpio_49); 299 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_50, gpio_50); 300 DECLARE_RTD1619B_PIN(RTD1619B_ISO_USB_CC1, usb_cc1); 301 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_52, gpio_52); 302 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_53, gpio_53); 303 DECLARE_RTD1619B_PIN(RTD1619B_ISO_IR_RX, ir_rx); 304 DECLARE_RTD1619B_PIN(RTD1619B_ISO_UR0_RX, ur0_rx); 305 DECLARE_RTD1619B_PIN(RTD1619B_ISO_UR0_TX, ur0_tx); 306 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_57, gpio_57); 307 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_58, gpio_58); 308 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_59, gpio_59); 309 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_60, gpio_60); 310 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_61, gpio_61); 311 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_62, gpio_62); 312 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_63, gpio_63); 313 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_64, gpio_64); 314 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_65, gpio_65); 315 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_66, gpio_66); 316 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_67, gpio_67); 317 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_68, gpio_68); 318 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_69, gpio_69); 319 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_70, gpio_70); 320 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_71, gpio_71); 321 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_72, gpio_72); 322 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_73, gpio_73); 323 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_74, gpio_74); 324 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_75, gpio_75); 325 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GPIO_76, gpio_76); 326 DECLARE_RTD1619B_PIN(RTD1619B_ISO_EMMC_CMD, emmc_cmd); 327 DECLARE_RTD1619B_PIN(RTD1619B_ISO_SPI_CE_N, spi_ce_n); 328 DECLARE_RTD1619B_PIN(RTD1619B_ISO_SPI_SCK, spi_sck); 329 DECLARE_RTD1619B_PIN(RTD1619B_ISO_SPI_SO, spi_so); 330 DECLARE_RTD1619B_PIN(RTD1619B_ISO_SPI_SI, spi_si); 331 DECLARE_RTD1619B_PIN(RTD1619B_ISO_EMMC_RST_N, emmc_rst_n); 332 DECLARE_RTD1619B_PIN(RTD1619B_ISO_EMMC_DD_SB, emmc_dd_sb); 333 DECLARE_RTD1619B_PIN(RTD1619B_ISO_EMMC_CLK, emmc_clk); 334 DECLARE_RTD1619B_PIN(RTD1619B_ISO_EMMC_DATA_0, emmc_data_0); 335 DECLARE_RTD1619B_PIN(RTD1619B_ISO_EMMC_DATA_1, emmc_data_1); 336 DECLARE_RTD1619B_PIN(RTD1619B_ISO_EMMC_DATA_2, emmc_data_2); 337 DECLARE_RTD1619B_PIN(RTD1619B_ISO_EMMC_DATA_3, emmc_data_3); 338 DECLARE_RTD1619B_PIN(RTD1619B_ISO_EMMC_DATA_4, emmc_data_4); 339 DECLARE_RTD1619B_PIN(RTD1619B_ISO_EMMC_DATA_5, emmc_data_5); 340 DECLARE_RTD1619B_PIN(RTD1619B_ISO_EMMC_DATA_6, emmc_data_6); 341 DECLARE_RTD1619B_PIN(RTD1619B_ISO_EMMC_DATA_7, emmc_data_7); 342 DECLARE_RTD1619B_PIN(RTD1619B_ISO_UR2_LOC, ur2_loc); 343 DECLARE_RTD1619B_PIN(RTD1619B_ISO_GSPI_LOC, gspi_loc); 344 DECLARE_RTD1619B_PIN(RTD1619B_ISO_SDIO_LOC, sdio_loc); 345 DECLARE_RTD1619B_PIN(RTD1619B_ISO_HI_LOC, hi_loc); 346 DECLARE_RTD1619B_PIN(RTD1619B_ISO_HI_WIDTH, hi_width); 347 DECLARE_RTD1619B_PIN(RTD1619B_ISO_SF_EN, sf_en); 348 DECLARE_RTD1619B_PIN(RTD1619B_ISO_ARM_TRACE_DBG_EN, arm_trace_dbg_en); 349 DECLARE_RTD1619B_PIN(RTD1619B_ISO_PWM_01_OPEN_DRAIN_EN_LOC0, pwm_01_open_drain_en_loc0); 350 DECLARE_RTD1619B_PIN(RTD1619B_ISO_PWM_23_OPEN_DRAIN_EN_LOC0, pwm_23_open_drain_en_loc0); 351 DECLARE_RTD1619B_PIN(RTD1619B_ISO_PWM_01_OPEN_DRAIN_EN_LOC1, pwm_01_open_drain_en_loc1); 352 DECLARE_RTD1619B_PIN(RTD1619B_ISO_PWM_23_OPEN_DRAIN_EN_LOC1, pwm_23_open_drain_en_loc1); 353 DECLARE_RTD1619B_PIN(RTD1619B_ISO_EJTAG_ACPU_LOC, ejtag_acpu_loc); 354 DECLARE_RTD1619B_PIN(RTD1619B_ISO_EJTAG_VCPU_LOC, ejtag_vcpu_loc); 355 DECLARE_RTD1619B_PIN(RTD1619B_ISO_EJTAG_SCPU_LOC, ejtag_scpu_loc); 356 DECLARE_RTD1619B_PIN(RTD1619B_ISO_DMIC_LOC, dmic_loc); 357 DECLARE_RTD1619B_PIN(RTD1619B_ISO_ISO_GSPI_LOC, iso_gspi_loc); 358 DECLARE_RTD1619B_PIN(RTD1619B_ISO_EJTAG_VE3_LOC, ejtag_ve3_loc); 359 DECLARE_RTD1619B_PIN(RTD1619B_ISO_EJTAG_AUCPU0_LOC, ejtag_aucpu0_loc); 360 DECLARE_RTD1619B_PIN(RTD1619B_ISO_EJTAG_AUCPU1_LOC, ejtag_aucpu1_loc); 361 362 #define RTD1619B_GROUP(_name) \ 363 { \ 364 .name = # _name, \ 365 .pins = rtd1619b_ ## _name ## _pins, \ 366 .num_pins = ARRAY_SIZE(rtd1619b_ ## _name ## _pins), \ 367 } 368 369 static const struct rtd_pin_group_desc rtd1619b_pin_groups[] = { 370 RTD1619B_GROUP(gpio_0), 371 RTD1619B_GROUP(gpio_1), 372 RTD1619B_GROUP(gpio_2), 373 RTD1619B_GROUP(gpio_3), 374 RTD1619B_GROUP(gpio_4), 375 RTD1619B_GROUP(gpio_5), 376 RTD1619B_GROUP(gpio_6), 377 RTD1619B_GROUP(gpio_7), 378 RTD1619B_GROUP(gpio_8), 379 RTD1619B_GROUP(gpio_9), 380 RTD1619B_GROUP(gpio_10), 381 RTD1619B_GROUP(gpio_11), 382 RTD1619B_GROUP(gpio_12), 383 RTD1619B_GROUP(gpio_13), 384 RTD1619B_GROUP(gpio_14), 385 RTD1619B_GROUP(gpio_15), 386 RTD1619B_GROUP(gpio_16), 387 RTD1619B_GROUP(gpio_17), 388 RTD1619B_GROUP(gpio_18), 389 RTD1619B_GROUP(gpio_19), 390 RTD1619B_GROUP(gpio_20), 391 RTD1619B_GROUP(gpio_21), 392 RTD1619B_GROUP(gpio_22), 393 RTD1619B_GROUP(gpio_23), 394 RTD1619B_GROUP(usb_cc2), 395 RTD1619B_GROUP(gpio_25), 396 RTD1619B_GROUP(gpio_26), 397 RTD1619B_GROUP(gpio_27), 398 RTD1619B_GROUP(gpio_28), 399 RTD1619B_GROUP(gpio_29), 400 RTD1619B_GROUP(gpio_30), 401 RTD1619B_GROUP(gpio_31), 402 RTD1619B_GROUP(gpio_32), 403 RTD1619B_GROUP(gpio_33), 404 RTD1619B_GROUP(gpio_34), 405 RTD1619B_GROUP(gpio_35), 406 RTD1619B_GROUP(hif_data), 407 RTD1619B_GROUP(hif_en), 408 RTD1619B_GROUP(hif_rdy), 409 RTD1619B_GROUP(hif_clk), 410 RTD1619B_GROUP(gpio_40), 411 RTD1619B_GROUP(gpio_41), 412 RTD1619B_GROUP(gpio_42), 413 RTD1619B_GROUP(gpio_43), 414 RTD1619B_GROUP(gpio_44), 415 RTD1619B_GROUP(gpio_45), 416 RTD1619B_GROUP(gpio_46), 417 RTD1619B_GROUP(gpio_47), 418 RTD1619B_GROUP(gpio_48), 419 RTD1619B_GROUP(gpio_49), 420 RTD1619B_GROUP(gpio_50), 421 RTD1619B_GROUP(usb_cc1), 422 RTD1619B_GROUP(gpio_52), 423 RTD1619B_GROUP(gpio_53), 424 RTD1619B_GROUP(ir_rx), 425 RTD1619B_GROUP(ur0_rx), 426 RTD1619B_GROUP(ur0_tx), 427 RTD1619B_GROUP(gpio_57), 428 RTD1619B_GROUP(gpio_58), 429 RTD1619B_GROUP(gpio_59), 430 RTD1619B_GROUP(gpio_60), 431 RTD1619B_GROUP(gpio_61), 432 RTD1619B_GROUP(gpio_62), 433 RTD1619B_GROUP(gpio_63), 434 RTD1619B_GROUP(gpio_64), 435 RTD1619B_GROUP(gpio_65), 436 RTD1619B_GROUP(gpio_66), 437 RTD1619B_GROUP(gpio_67), 438 RTD1619B_GROUP(gpio_68), 439 RTD1619B_GROUP(gpio_69), 440 RTD1619B_GROUP(gpio_70), 441 RTD1619B_GROUP(gpio_71), 442 RTD1619B_GROUP(gpio_72), 443 RTD1619B_GROUP(gpio_73), 444 RTD1619B_GROUP(gpio_74), 445 RTD1619B_GROUP(gpio_75), 446 RTD1619B_GROUP(gpio_76), 447 RTD1619B_GROUP(emmc_cmd), 448 RTD1619B_GROUP(spi_ce_n), 449 RTD1619B_GROUP(spi_sck), 450 RTD1619B_GROUP(spi_so), 451 RTD1619B_GROUP(spi_si), 452 RTD1619B_GROUP(emmc_rst_n), 453 RTD1619B_GROUP(emmc_dd_sb), 454 RTD1619B_GROUP(emmc_clk), 455 RTD1619B_GROUP(emmc_data_0), 456 RTD1619B_GROUP(emmc_data_1), 457 RTD1619B_GROUP(emmc_data_2), 458 RTD1619B_GROUP(emmc_data_3), 459 RTD1619B_GROUP(emmc_data_4), 460 RTD1619B_GROUP(emmc_data_5), 461 RTD1619B_GROUP(emmc_data_6), 462 RTD1619B_GROUP(emmc_data_7), 463 RTD1619B_GROUP(ur2_loc), 464 RTD1619B_GROUP(gspi_loc), 465 RTD1619B_GROUP(sdio_loc), 466 RTD1619B_GROUP(hi_loc), 467 RTD1619B_GROUP(hi_width), 468 RTD1619B_GROUP(sf_en), 469 RTD1619B_GROUP(arm_trace_dbg_en), 470 RTD1619B_GROUP(pwm_01_open_drain_en_loc0), 471 RTD1619B_GROUP(pwm_23_open_drain_en_loc0), 472 RTD1619B_GROUP(pwm_01_open_drain_en_loc1), 473 RTD1619B_GROUP(pwm_23_open_drain_en_loc1), 474 RTD1619B_GROUP(ejtag_acpu_loc), 475 RTD1619B_GROUP(ejtag_vcpu_loc), 476 RTD1619B_GROUP(ejtag_scpu_loc), 477 RTD1619B_GROUP(dmic_loc), 478 RTD1619B_GROUP(iso_gspi_loc), 479 RTD1619B_GROUP(ejtag_ve3_loc), 480 RTD1619B_GROUP(ejtag_aucpu0_loc), 481 RTD1619B_GROUP(ejtag_aucpu1_loc), 482 }; 483 484 static const char * const rtd1619b_gpio_groups[] = { 485 "gpio_0", "gpio_1", "gpio_2", "gpio_3", "gpio_4", 486 "gpio_5", "gpio_6", "gpio_7", "gpio_8", "gpio_9", 487 "gpio_10", "gpio_11", "gpio_12", "gpio_13", "gpio_14", 488 "gpio_15", "gpio_16", "gpio_17", "gpio_18", "gpio_19", 489 "gpio_20", "gpio_21", "gpio_22", "gpio_23", "usb_cc2", 490 "gpio_25", "gpio_26", "gpio_27", "gpio_28", "gpio_29", 491 "gpio_30", "gpio_31", "gpio_32", "gpio_33", "gpio_34", 492 "gpio_35", "hif_data", "hif_en", "hif_rdy", "hif_clk", 493 "gpio_40", "gpio_41", "gpio_42", "gpio_43", "gpio_44", 494 "gpio_45", "gpio_46", "gpio_47", "gpio_48", "gpio_49", 495 "gpio_50", "usb_cc1", "gpio_52", "gpio_53", "ir_rx", 496 "ur0_rx", "ur0_tx", "gpio_57", "gpio_58", "gpio_59", 497 "gpio_60", "gpio_61", "gpio_62", "gpio_63", "gpio_64", 498 "gpio_65", "gpio_66", "gpio_67", "gpio_68", "gpio_69", 499 "gpio_70", "gpio_71", "gpio_72", "gpio_73", "gpio_74", 500 "gpio_75", "gpio_76", "emmc_cmd", "spi_ce_n", "spi_sck", 501 "spi_so", "spi_si"}; 502 static const char * const rtd1619b_nf_groups[] = { 503 "emmc_rst_n", "emmc_clk", "emmc_cmd", "emmc_data_0", "emmc_data_1", 504 "emmc_data_2", "emmc_data_3", "emmc_data_4", 505 "emmc_data_5", "emmc_data_6", "emmc_data_7", "spi_ce_n", 506 "spi_sck", "spi_so", "spi_si" }; 507 static const char * const rtd1619b_nf_spi_groups[] = { 508 "emmc_data_0", "emmc_data_1", 509 "emmc_data_2", "emmc_data_3", "emmc_data_4", 510 "emmc_data_5" }; 511 static const char * const rtd1619b_spi_groups[] = { 512 "spi_ce_n", "spi_sck", "spi_so", "spi_si" }; 513 static const char * const rtd1619b_emmc_groups[] = { 514 "emmc_rst_n", "emmc_clk", "emmc_data_0", "emmc_data_1", 515 "emmc_data_2", "emmc_data_3", "emmc_data_4", 516 "emmc_data_5", "emmc_data_6", "emmc_data_7", 517 "emmc_dd_sb", "emmc_cmd"}; 518 519 static const char * const rtd1619b_pmic_groups[] = { "spi_ce_n" }; 520 static const char * const rtd1619b_spdif_groups[] = { "gpio_50" }; 521 static const char * const rtd1619b_spdif_coaxial_groups[] = { "gpio_1" }; 522 static const char * const rtd1619b_spdif_optical_loc0_groups[] = { "gpio_6" }; 523 static const char * const rtd1619b_spdif_optical_loc1_groups[] = { "gpio_21" }; 524 525 static const char * const rtd1619b_emmc_spi_groups[] = { 526 "gpio_1", "gpio_2", "gpio_3", "gpio_4", "gpio_5", "gpio_6" }; 527 static const char * const rtd1619b_sc1_groups[] = { 528 "gpio_2", "gpio_3", "gpio_4", "gpio_5" }; 529 static const char * const rtd1619b_uart0_groups[] = { "ur0_rx", "ur0_tx" }; 530 static const char * const rtd1619b_uart1_groups[] = { 531 "gpio_8", "gpio_9", "gpio_10", "gpio_11" }; 532 static const char * const rtd1619b_uart2_loc0_groups[] = { 533 "gpio_18", "gpio_19", "gpio_20", "gpio_31", "ur2_loc" }; 534 static const char * const rtd1619b_uart2_loc1_groups[] = { 535 "gpio_25", "gpio_26", "gpio_27", "gpio_28", "ur2_loc" }; 536 static const char * const rtd1619b_gspi_loc1_groups[] = { 537 "gpio_8", "gpio_9", "gpio_10", "gpio_11", "gspi_loc" }; 538 static const char * const rtd1619b_iso_gspi_loc1_groups[] = { 539 "gpio_8", "gpio_9", "gpio_10", "gpio_11", "iso_gspi_loc" }; 540 static const char * const rtd1619b_i2c0_groups[] = { "gpio_12", "gpio_13" }; 541 static const char * const rtd1619b_i2c1_groups[] = { "gpio_16", "gpio_17" }; 542 static const char * const rtd1619b_i2c3_groups[] = { "gpio_63", "gpio_64" }; 543 static const char * const rtd1619b_i2c4_groups[] = { "gpio_34", "gpio_35" }; 544 static const char * const rtd1619b_i2c5_groups[] = { "gpio_29", "gpio_46" }; 545 static const char * const rtd1619b_pwm0_groups[] = { "gpio_20", "gpio_26" }; 546 static const char * const rtd1619b_pwm1_groups[] = { "gpio_21", "gpio_27" }; 547 static const char * const rtd1619b_pwm2_groups[] = { "gpio_22", "gpio_28" }; 548 static const char * const rtd1619b_pwm3_groups[] = { "gpio_23", "gpio_47" }; 549 static const char * const rtd1619b_etn_led_groups[] = { "gpio_14", "gpio_15", "gpio_23" }; 550 static const char * const rtd1619b_etn_phy_groups[] = { "gpio_14", "gpio_15" }; 551 static const char * const rtd1619b_etn_clk_groups[] = { "gpio_14" }; 552 static const char * const rtd1619b_sc0_groups[] = { 553 "gpio_18", "gpio_19", "gpio_20", "gpio_31" }; 554 static const char * const rtd1619b_vfd_groups[] = { 555 "gpio_26", "gpio_27", "gpio_28" }; 556 557 static const char * const rtd1619b_gspi_loc0_groups[] = { 558 "gpio_18", "gpio_19", "gpio_20", "gpio_31", "gspi_loc" }; 559 static const char * const rtd1619b_iso_gspi_loc0_groups[] = { 560 "gpio_18", "gpio_19", "gpio_20", "gpio_31", "iso_gspi_loc" }; 561 static const char * const rtd1619b_pcie1_groups[] = { "gpio_25" }; 562 static const char * const rtd1619b_pcie2_groups[] = { "gpio_52" }; 563 static const char * const rtd1619b_sd_groups[] = { 564 "gpio_32", "gpio_33", "gpio_34", "gpio_35", "hif_data", 565 "hif_en", "hif_rdy", "hif_clk" }; 566 static const char * const rtd1619b_sdio_loc0_groups[] = { 567 "gpio_32", "gpio_33", "hif_data", "hif_en", 568 "hif_rdy", "hif_clk", "sdio_loc" }; 569 static const char * const rtd1619b_sdio_loc1_groups[] = { 570 "gpio_40", "gpio_41", "gpio_42", "gpio_43", "gpio_44", 571 "gpio_45", "sdio_loc" }; 572 static const char * const rtd1619b_hi_groups[] = { 573 "hif_data", "hif_en", "hif_rdy", "hif_clk" }; 574 static const char * const rtd1619b_hi_m_groups[] = { 575 "hif_data", "hif_en", "hif_rdy", "hif_clk" }; 576 static const char * const rtd1619b_dc_fan_groups[] = { "gpio_47" }; 577 static const char * const rtd1619b_pll_test_loc0_groups[] = { "gpio_52", "gpio_53" }; 578 static const char * const rtd1619b_pll_test_loc1_groups[] = { "gpio_48", "gpio_49" }; 579 static const char * const rtd1619b_tdm_ai_loc0_groups[] = { 580 "gpio_57", "gpio_58", "gpio_59", "gpio_60" }; 581 static const char * const rtd1619b_tdm_ai_loc1_groups[] = { 582 "hif_data", "hif_en", "hif_rdy", "hif_clk" }; 583 static const char * const rtd1619b_dmic_loc0_groups[] = { 584 "gpio_57", "gpio_58", "gpio_59", "gpio_60", "gpio_61", 585 "gpio_62", "gpio_63", "gpio_64", "dmic_loc"}; 586 static const char * const rtd1619b_dmic_loc1_groups[] = { 587 "gpio_32", "gpio_33", "gpio_34", "gpio_35", "hif_data", 588 "hif_en", "hif_rdy", "hif_clk", "dmic_loc" }; 589 static const char * const rtd1619b_ai_loc0_groups[] = { 590 "gpio_57", "gpio_58", "gpio_59", "gpio_60", "gpio_61", 591 "gpio_62", "gpio_63" }; 592 static const char * const rtd1619b_ai_loc1_groups[] = { 593 "gpio_32", "gpio_33", "gpio_34", "hif_data", 594 "hif_en", "hif_rdy", "hif_clk"}; 595 static const char * const rtd1619b_tp0_groups[] = { 596 "gpio_66", "gpio_67", "gpio_68", "gpio_69", 597 "gpio_70", "gpio_71", "gpio_72", "gpio_73", "gpio_74", 598 "gpio_75", "gpio_76" }; 599 static const char * const rtd1619b_tp1_groups[] = { 600 "gpio_69", "gpio_70", "gpio_71", "gpio_72" }; 601 static const char * const rtd1619b_ao_groups[] = { 602 "gpio_66", "gpio_67", "gpio_68", "gpio_69", 603 "gpio_70", "gpio_71", "gpio_72" }; 604 static const char * const rtd1619b_uart2_disable_groups[] = { "ur2_loc" }; 605 static const char * const rtd1619b_gspi_disable_groups[] = { "gspi_loc" }; 606 static const char * const rtd1619b_sdio_disable_groups[] = { "sdio_loc" }; 607 static const char * const rtd1619b_hi_loc_disable_groups[] = { "hi_loc" }; 608 static const char * const rtd1619b_hi_loc0_groups[] = { "hi_loc" }; 609 static const char * const rtd1619b_hi_width_disable_groups[] = { "hi_width" }; 610 static const char * const rtd1619b_hi_width_1bit_groups[] = { "hi_width" }; 611 612 static const char * const rtd1619b_vtc_i2si_loc0_groups[] = { 613 "gpio_32", "hif_data", "hif_en", "hif_rdy", "hif_clk" }; 614 static const char * const rtd1619b_vtc_tdm_loc0_groups[] = { 615 "hif_data", "hif_en", "hif_rdy", "hif_clk" }; 616 static const char * const rtd1619b_vtc_dmic_loc0_groups[] = { 617 "hif_data", "hif_en", "hif_rdy", "hif_clk" }; 618 static const char * const rtd1619b_vtc_i2si_loc1_groups[] = { 619 "gpio_57", "gpio_58", "gpio_59", "gpio_60", "gpio_61" }; 620 static const char * const rtd1619b_vtc_tdm_loc1_groups[] = { 621 "gpio_57", "gpio_58", "gpio_59", "gpio_60" }; 622 static const char * const rtd1619b_vtc_dmic_loc1_groups[] = { 623 "gpio_57", "gpio_58", "gpio_59", "gpio_60" }; 624 static const char * const rtd1619b_vtc_i2so_groups[] = { 625 "gpio_66", "gpio_67", "gpio_68", "gpio_69" }; 626 static const char * const rtd1619b_ve3_ejtag_loc0_groups[] = { 627 "gpio_2", "gpio_3", "gpio_4", 628 "gpio_5", "gpio_6", "ejtag_ve3_loc" }; 629 static const char * const rtd1619b_aucpu0_ejtag_loc0_groups[] = { 630 "gpio_2", "gpio_3", "gpio_4", 631 "gpio_5", "gpio_6", "ejtag_aucpu0_loc" }; 632 static const char * const rtd1619b_aucpu1_ejtag_loc0_groups[] = { 633 "gpio_2", "gpio_3", "gpio_4", 634 "gpio_5", "gpio_6", "ejtag_aucpu1_loc" }; 635 static const char * const rtd1619b_ve3_ejtag_loc1_groups[] = { 636 "gpio_32", "gpio_33", "hif_data", "hif_en", 637 "hif_clk", "ejtag_ve3_loc" }; 638 static const char * const rtd1619b_aucpu0_ejtag_loc1_groups[] = { 639 "gpio_32", "gpio_33", "hif_data", "hif_en", 640 "hif_clk", "ejtag_aucpu0_loc" }; 641 static const char * const rtd1619b_aucpu1_ejtag_loc1_groups[] = { 642 "gpio_32", "gpio_33", "hif_data", "hif_en", 643 "hif_clk", "ejtag_aucpu1_loc" }; 644 645 static const char * const rtd1619b_ve3_ejtag_loc2_groups[] = { 646 "gpio_71", "gpio_72", "gpio_73", "gpio_74", 647 "gpio_75", "gpio_76", "ejtag_ve3_loc" }; 648 static const char * const rtd1619b_aucpu0_ejtag_loc2_groups[] = { 649 "gpio_71", "gpio_72", "gpio_73", "gpio_74", 650 "gpio_75", "gpio_76", "ejtag_aucpu0_loc" }; 651 static const char * const rtd1619b_aucpu1_ejtag_loc2_groups[] = { 652 "gpio_71", "gpio_72", "gpio_73", "gpio_74", 653 "gpio_75", "gpio_76", "ejtag_aucpu1_loc" }; 654 655 static const char * const rtd1619b_scpu_ejtag_loc0_groups[] = { 656 "gpio_2", "gpio_3", "gpio_4", 657 "gpio_5", "gpio_6", "ejtag_scpu_loc" }; 658 static const char * const rtd1619b_acpu_ejtag_loc0_groups[] = { 659 "gpio_2", "gpio_3", "gpio_4", 660 "gpio_5", "gpio_6", "ejtag_acpu_loc" }; 661 static const char * const rtd1619b_vcpu_ejtag_loc0_groups[] = { 662 "gpio_2", "gpio_3", "gpio_4", 663 "gpio_5", "gpio_6", "ejtag_vcpu_loc" }; 664 static const char * const rtd1619b_scpu_ejtag_loc1_groups[] = { 665 "gpio_32", "gpio_33", "hif_data", "hif_en", 666 "hif_clk", "ejtag_scpu_loc" }; 667 static const char * const rtd1619b_acpu_ejtag_loc1_groups[] = { 668 "gpio_32", "gpio_33", "hif_data", "hif_en", 669 "hif_clk", "ejtag_acpu_loc" }; 670 static const char * const rtd1619b_vcpu_ejtag_loc1_groups[] = { 671 "gpio_32", "gpio_33", "hif_data", "hif_en", 672 "hif_clk", "ejtag_vcpu_loc" }; 673 674 static const char * const rtd1619b_scpu_ejtag_loc2_groups[] = { 675 "gpio_71", "gpio_72", "gpio_73", "gpio_74", 676 "gpio_75", "gpio_76", "ejtag_scpu_loc" }; 677 static const char * const rtd1619b_acpu_ejtag_loc2_groups[] = { 678 "gpio_71", "gpio_72", "gpio_73", "gpio_74", 679 "gpio_75", "gpio_76", "ejtag_acpu_loc" }; 680 static const char * const rtd1619b_vcpu_ejtag_loc2_groups[] = { 681 "gpio_71", "gpio_72", "gpio_73", "gpio_74", 682 "gpio_75", "gpio_76", "ejtag_vcpu_loc"}; 683 static const char * const rtd1619b_ve3_ejtag_disable_groups[] = { "ejtag_ve3_loc" }; 684 static const char * const rtd1619b_aucpu0_ejtag_disable_groups[] = { "ejtag_aucpu0_loc" }; 685 static const char * const rtd1619b_aucpu1_ejtag_disable_groups[] = { "ejtag_aucpu1_loc" }; 686 687 static const char * const rtd1619b_acpu_ejtag_disable_groups[] = { "ejtag_acpu_loc" }; 688 static const char * const rtd1619b_vcpu_ejtag_disable_groups[] = { "ejtag_vcpu_loc" }; 689 static const char * const rtd1619b_scpu_ejtag_disable_groups[] = { "ejtag_scpu_loc" }; 690 static const char * const rtd1619b_sf_disable_groups[] = { "sf_en" }; 691 static const char * const rtd1619b_sf_enable_groups[] = { "sf_en" }; 692 static const char * const rtd1619b_iso_gspi_disable_groups[] = { "iso_gspi_loc" }; 693 static const char * const rtd1619b_arm_trace_debug_disable_groups[] = { "arm_trace_dbg_en" }; 694 static const char * const rtd1619b_arm_trace_debug_enable_groups[] = { "arm_trace_dbg_en" }; 695 static const char * const rtd1619b_pwm_normal_groups[] = { 696 "pwm_01_open_drain_en_loc0", "pwm_23_open_drain_en_loc0", 697 "pwm_01_open_drain_en_loc1", "pwm_23_open_drain_en_loc1" }; 698 static const char * const rtd1619b_pwm_open_drain_groups[] = { 699 "pwm_01_open_drain_en_loc0", "pwm_23_open_drain_en_loc0", 700 "pwm_01_open_drain_en_loc1", "pwm_23_open_drain_en_loc1" }; 701 static const char * const rtd1619b_standby_dbg_groups[] = { 702 "gpio_2", "gpio_3", "ir_rx" }; 703 704 static const char * const rtd1619b_usb_cc1_groups[] = { "usb_cc1" }; 705 static const char * const rtd1619b_usb_cc2_groups[] = { "usb_cc2" }; 706 static const char * const rtd1619b_ir_rx_groups[] = { "ir_rx" }; 707 static const char * const rtd1619b_test_loop_dis_groups[] = { "gpio_50" }; 708 709 #define RTD1619B_FUNC(_name) \ 710 { \ 711 .name = # _name, \ 712 .groups = rtd1619b_ ## _name ## _groups, \ 713 .num_groups = ARRAY_SIZE(rtd1619b_ ## _name ## _groups), \ 714 } 715 716 static const struct rtd_pin_func_desc rtd1619b_pin_functions[] = { 717 RTD1619B_FUNC(gpio), 718 RTD1619B_FUNC(nf), 719 RTD1619B_FUNC(nf_spi), 720 RTD1619B_FUNC(spi), 721 RTD1619B_FUNC(pmic), 722 RTD1619B_FUNC(spdif), 723 RTD1619B_FUNC(spdif_coaxial), 724 RTD1619B_FUNC(spdif_optical_loc0), 725 RTD1619B_FUNC(spdif_optical_loc1), 726 RTD1619B_FUNC(emmc_spi), 727 RTD1619B_FUNC(emmc), 728 RTD1619B_FUNC(sc1), 729 RTD1619B_FUNC(uart0), 730 RTD1619B_FUNC(uart1), 731 RTD1619B_FUNC(uart2_loc0), 732 RTD1619B_FUNC(uart2_loc1), 733 RTD1619B_FUNC(gspi_loc1), 734 RTD1619B_FUNC(iso_gspi_loc1), 735 RTD1619B_FUNC(i2c0), 736 RTD1619B_FUNC(i2c1), 737 RTD1619B_FUNC(i2c3), 738 RTD1619B_FUNC(i2c4), 739 RTD1619B_FUNC(i2c5), 740 RTD1619B_FUNC(pwm0), 741 RTD1619B_FUNC(pwm1), 742 RTD1619B_FUNC(pwm2), 743 RTD1619B_FUNC(pwm3), 744 RTD1619B_FUNC(etn_led), 745 RTD1619B_FUNC(etn_phy), 746 RTD1619B_FUNC(etn_clk), 747 RTD1619B_FUNC(sc0), 748 RTD1619B_FUNC(vfd), 749 RTD1619B_FUNC(gspi_loc0), 750 RTD1619B_FUNC(iso_gspi_loc0), 751 RTD1619B_FUNC(pcie1), 752 RTD1619B_FUNC(pcie2), 753 RTD1619B_FUNC(sd), 754 RTD1619B_FUNC(sdio_loc0), 755 RTD1619B_FUNC(sdio_loc1), 756 RTD1619B_FUNC(hi), 757 RTD1619B_FUNC(hi_m), 758 RTD1619B_FUNC(dc_fan), 759 RTD1619B_FUNC(pll_test_loc0), 760 RTD1619B_FUNC(pll_test_loc1), 761 RTD1619B_FUNC(usb_cc1), 762 RTD1619B_FUNC(usb_cc2), 763 RTD1619B_FUNC(ir_rx), 764 RTD1619B_FUNC(tdm_ai_loc0), 765 RTD1619B_FUNC(tdm_ai_loc1), 766 RTD1619B_FUNC(dmic_loc0), 767 RTD1619B_FUNC(dmic_loc1), 768 RTD1619B_FUNC(ai_loc0), 769 RTD1619B_FUNC(ai_loc1), 770 RTD1619B_FUNC(tp0), 771 RTD1619B_FUNC(tp1), 772 RTD1619B_FUNC(ao), 773 RTD1619B_FUNC(uart2_disable), 774 RTD1619B_FUNC(gspi_disable), 775 RTD1619B_FUNC(sdio_disable), 776 RTD1619B_FUNC(hi_loc_disable), 777 RTD1619B_FUNC(hi_loc0), 778 RTD1619B_FUNC(hi_width_disable), 779 RTD1619B_FUNC(hi_width_1bit), 780 RTD1619B_FUNC(vtc_i2si_loc0), 781 RTD1619B_FUNC(vtc_tdm_loc0), 782 RTD1619B_FUNC(vtc_dmic_loc0), 783 RTD1619B_FUNC(vtc_i2si_loc1), 784 RTD1619B_FUNC(vtc_tdm_loc1), 785 RTD1619B_FUNC(vtc_dmic_loc1), 786 RTD1619B_FUNC(vtc_i2so), 787 RTD1619B_FUNC(ve3_ejtag_loc0), 788 RTD1619B_FUNC(aucpu0_ejtag_loc0), 789 RTD1619B_FUNC(aucpu1_ejtag_loc0), 790 RTD1619B_FUNC(ve3_ejtag_loc1), 791 RTD1619B_FUNC(aucpu0_ejtag_loc1), 792 RTD1619B_FUNC(aucpu1_ejtag_loc1), 793 RTD1619B_FUNC(ve3_ejtag_loc2), 794 RTD1619B_FUNC(aucpu0_ejtag_loc2), 795 RTD1619B_FUNC(aucpu1_ejtag_loc2), 796 RTD1619B_FUNC(scpu_ejtag_loc0), 797 RTD1619B_FUNC(acpu_ejtag_loc0), 798 RTD1619B_FUNC(vcpu_ejtag_loc0), 799 RTD1619B_FUNC(scpu_ejtag_loc1), 800 RTD1619B_FUNC(acpu_ejtag_loc1), 801 RTD1619B_FUNC(vcpu_ejtag_loc1), 802 RTD1619B_FUNC(scpu_ejtag_loc2), 803 RTD1619B_FUNC(acpu_ejtag_loc2), 804 RTD1619B_FUNC(vcpu_ejtag_loc2), 805 RTD1619B_FUNC(ve3_ejtag_disable), 806 RTD1619B_FUNC(aucpu0_ejtag_disable), 807 RTD1619B_FUNC(aucpu1_ejtag_disable), 808 RTD1619B_FUNC(acpu_ejtag_disable), 809 RTD1619B_FUNC(vcpu_ejtag_disable), 810 RTD1619B_FUNC(scpu_ejtag_disable), 811 RTD1619B_FUNC(iso_gspi_disable), 812 RTD1619B_FUNC(sf_disable), 813 RTD1619B_FUNC(sf_enable), 814 RTD1619B_FUNC(arm_trace_debug_disable), 815 RTD1619B_FUNC(arm_trace_debug_enable), 816 RTD1619B_FUNC(pwm_normal), 817 RTD1619B_FUNC(pwm_open_drain), 818 RTD1619B_FUNC(standby_dbg), 819 RTD1619B_FUNC(test_loop_dis), 820 }; 821 822 #undef RTD1619B_FUNC 823 824 static const struct rtd_pin_desc rtd1619b_iso_muxes[] = { 825 [RTD1619B_ISO_EMMC_RST_N] = RTK_PIN_MUX(emmc_rst_n, 0x0, GENMASK(1, 0), 826 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 0), "nf"), 827 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 0), "emmc")), 828 [RTD1619B_ISO_EMMC_DD_SB] = RTK_PIN_MUX(emmc_dd_sb, 0x0, GENMASK(3, 2), 829 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 2), "emmc")), 830 [RTD1619B_ISO_EMMC_CLK] = RTK_PIN_MUX(emmc_clk, 0x0, GENMASK(5, 4), 831 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 4), "nf"), 832 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 4), "emmc")), 833 [RTD1619B_ISO_EMMC_CMD] = RTK_PIN_MUX(emmc_cmd, 0x0, GENMASK(7, 6), 834 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 6), "gpio"), 835 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 6), "nf"), 836 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 6), "emmc")), 837 [RTD1619B_ISO_EMMC_DATA_0] = RTK_PIN_MUX(emmc_data_0, 0x0, GENMASK(9, 8), 838 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 8), "nf"), 839 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 8), "emmc"), 840 RTK_PIN_FUNC(SHIFT_LEFT(0x3, 8), "nf_spi")), 841 [RTD1619B_ISO_EMMC_DATA_1] = RTK_PIN_MUX(emmc_data_1, 0x0, GENMASK(11, 10), 842 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 10), "nf"), 843 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 10), "emmc"), 844 RTK_PIN_FUNC(SHIFT_LEFT(0x3, 10), "nf_spi")), 845 [RTD1619B_ISO_EMMC_DATA_2] = RTK_PIN_MUX(emmc_data_2, 0x0, GENMASK(13, 12), 846 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 12), "nf"), 847 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 12), "emmc"), 848 RTK_PIN_FUNC(SHIFT_LEFT(0x3, 12), "nf_spi")), 849 [RTD1619B_ISO_EMMC_DATA_3] = RTK_PIN_MUX(emmc_data_3, 0x0, GENMASK(15, 14), 850 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 14), "nf"), 851 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 14), "emmc"), 852 RTK_PIN_FUNC(SHIFT_LEFT(0x3, 14), "nf_spi")), 853 [RTD1619B_ISO_EMMC_DATA_4] = RTK_PIN_MUX(emmc_data_4, 0x0, GENMASK(17, 16), 854 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 16), "nf"), 855 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 16), "emmc"), 856 RTK_PIN_FUNC(SHIFT_LEFT(0x3, 16), "nf_spi")), 857 [RTD1619B_ISO_EMMC_DATA_5] = RTK_PIN_MUX(emmc_data_5, 0x0, GENMASK(19, 18), 858 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 18), "nf"), 859 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 18), "emmc"), 860 RTK_PIN_FUNC(SHIFT_LEFT(0x3, 18), "nf_spi")), 861 [RTD1619B_ISO_EMMC_DATA_6] = RTK_PIN_MUX(emmc_data_6, 0x0, GENMASK(21, 20), 862 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 20), "nf"), 863 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 20), "emmc")), 864 [RTD1619B_ISO_EMMC_DATA_7] = RTK_PIN_MUX(emmc_data_7, 0x0, GENMASK(23, 22), 865 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 22), "nf"), 866 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 22), "emmc")), 867 [RTD1619B_ISO_SPI_CE_N] = RTK_PIN_MUX(spi_ce_n, 0x0, GENMASK(25, 24), 868 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 24), "gpio"), 869 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 24), "nf"), 870 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 24), "spi"), 871 RTK_PIN_FUNC(SHIFT_LEFT(0x3, 24), "pmic")), 872 [RTD1619B_ISO_SPI_SCK] = RTK_PIN_MUX(spi_sck, 0x0, GENMASK(27, 26), 873 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 26), "gpio"), 874 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 26), "nf"), 875 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 26), "spi")), 876 [RTD1619B_ISO_SPI_SO] = RTK_PIN_MUX(spi_so, 0x0, GENMASK(29, 28), 877 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 28), "gpio"), 878 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 28), "nf"), 879 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 28), "spi")), 880 [RTD1619B_ISO_SPI_SI] = RTK_PIN_MUX(spi_si, 0x0, GENMASK(31, 30), 881 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 30), "gpio"), 882 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 30), "nf"), 883 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 30), "spi")), 884 885 [RTD1619B_ISO_GPIO_0] = RTK_PIN_MUX(gpio_0, 0x4, GENMASK(0, 0), 886 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 0), "gpio")), 887 [RTD1619B_ISO_GPIO_1] = RTK_PIN_MUX(gpio_1, 0x4, GENMASK(3, 1), 888 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 1), "gpio"), 889 RTK_PIN_FUNC(SHIFT_LEFT(0x3, 1), "emmc_spi"), 890 RTK_PIN_FUNC(SHIFT_LEFT(0x5, 1), "spdif_coaxial")), 891 [RTD1619B_ISO_GPIO_2] = RTK_PIN_MUX(gpio_2, 0x4, GENMASK(7, 4), 892 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 4), "gpio"), 893 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 4), "standby_dbg"), 894 RTK_PIN_FUNC(SHIFT_LEFT(0x3, 4), "emmc_spi"), 895 RTK_PIN_FUNC(SHIFT_LEFT(0x4, 4), "sc1"), 896 RTK_PIN_FUNC(SHIFT_LEFT(0x5, 4), "scpu_ejtag_loc0"), 897 RTK_PIN_FUNC(SHIFT_LEFT(0x6, 4), "acpu_ejtag_loc0"), 898 RTK_PIN_FUNC(SHIFT_LEFT(0x7, 4), "vcpu_ejtag_loc0"), 899 RTK_PIN_FUNC(SHIFT_LEFT(0x8, 4), "ve3_ejtag_loc0"), 900 RTK_PIN_FUNC(SHIFT_LEFT(0x9, 4), "aucpu0_ejtag_loc0"), 901 RTK_PIN_FUNC(SHIFT_LEFT(0x10, 4), "aucpu1_ejtag_loc0")), 902 [RTD1619B_ISO_GPIO_3] = RTK_PIN_MUX(gpio_3, 0x4, GENMASK(11, 8), 903 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 8), "gpio"), 904 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 8), "standby_dbg"), 905 RTK_PIN_FUNC(SHIFT_LEFT(0x3, 8), "emmc_spi"), 906 RTK_PIN_FUNC(SHIFT_LEFT(0x4, 8), "sc1"), 907 RTK_PIN_FUNC(SHIFT_LEFT(0x5, 8), "scpu_ejtag_loc0"), 908 RTK_PIN_FUNC(SHIFT_LEFT(0x6, 8), "acpu_ejtag_loc0"), 909 RTK_PIN_FUNC(SHIFT_LEFT(0x7, 8), "vcpu_ejtag_loc0"), 910 RTK_PIN_FUNC(SHIFT_LEFT(0x8, 8), "ve3_ejtag_loc0"), 911 RTK_PIN_FUNC(SHIFT_LEFT(0x9, 8), "aucpu0_ejtag_loc0"), 912 RTK_PIN_FUNC(SHIFT_LEFT(0x10, 8), "aucpu1_ejtag_loc0")), 913 [RTD1619B_ISO_GPIO_4] = RTK_PIN_MUX(gpio_4, 0x4, GENMASK(15, 12), 914 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 12), "gpio"), 915 RTK_PIN_FUNC(SHIFT_LEFT(0x3, 12), "emmc_spi"), 916 RTK_PIN_FUNC(SHIFT_LEFT(0x4, 12), "sc1"), 917 RTK_PIN_FUNC(SHIFT_LEFT(0x5, 12), "scpu_ejtag_loc0"), 918 RTK_PIN_FUNC(SHIFT_LEFT(0x6, 12), "acpu_ejtag_loc0"), 919 RTK_PIN_FUNC(SHIFT_LEFT(0x7, 12), "vcpu_ejtag_loc0"), 920 RTK_PIN_FUNC(SHIFT_LEFT(0x8, 12), "ve3_ejtag_loc0"), 921 RTK_PIN_FUNC(SHIFT_LEFT(0x9, 12), "aucpu0_ejtag_loc0"), 922 RTK_PIN_FUNC(SHIFT_LEFT(0x10, 12), "aucpu1_ejtag_loc0")), 923 [RTD1619B_ISO_GPIO_5] = RTK_PIN_MUX(gpio_5, 0x4, GENMASK(19, 16), 924 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 16), "gpio"), 925 RTK_PIN_FUNC(SHIFT_LEFT(0x3, 16), "emmc_spi"), 926 RTK_PIN_FUNC(SHIFT_LEFT(0x4, 16), "sc1"), 927 RTK_PIN_FUNC(SHIFT_LEFT(0x5, 16), "scpu_ejtag_loc0"), 928 RTK_PIN_FUNC(SHIFT_LEFT(0x6, 16), "acpu_ejtag_loc0"), 929 RTK_PIN_FUNC(SHIFT_LEFT(0x7, 16), "vcpu_ejtag_loc0"), 930 RTK_PIN_FUNC(SHIFT_LEFT(0x8, 16), "ve3_ejtag_loc0"), 931 RTK_PIN_FUNC(SHIFT_LEFT(0x9, 16), "aucpu0_ejtag_loc0"), 932 RTK_PIN_FUNC(SHIFT_LEFT(0x10, 16), "aucpu1_ejtag_loc0")), 933 [RTD1619B_ISO_GPIO_6] = RTK_PIN_MUX(gpio_6, 0x4, GENMASK(23, 20), 934 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 20), "gpio"), 935 RTK_PIN_FUNC(SHIFT_LEFT(0x3, 20), "emmc_spi"), 936 RTK_PIN_FUNC(SHIFT_LEFT(0x4, 20), "spdif_optical_loc0"), 937 RTK_PIN_FUNC(SHIFT_LEFT(0x5, 20), "scpu_ejtag_loc0"), 938 RTK_PIN_FUNC(SHIFT_LEFT(0x6, 20), "acpu_ejtag_loc0"), 939 RTK_PIN_FUNC(SHIFT_LEFT(0x7, 20), "vcpu_ejtag_loc0"), 940 RTK_PIN_FUNC(SHIFT_LEFT(0x8, 20), "ve3_ejtag_loc0"), 941 RTK_PIN_FUNC(SHIFT_LEFT(0x9, 20), "aucpu0_ejtag_loc0"), 942 RTK_PIN_FUNC(SHIFT_LEFT(0x10, 20), "aucpu1_ejtag_loc0")), 943 [RTD1619B_ISO_GPIO_7] = RTK_PIN_MUX(gpio_7, 0x4, GENMASK(24, 24), 944 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 24), "gpio")), 945 [RTD1619B_ISO_GPIO_8] = RTK_PIN_MUX(gpio_8, 0x4, GENMASK(27, 25), 946 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 25), "gpio"), 947 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 25), "uart1"), 948 RTK_PIN_FUNC(SHIFT_LEFT(0x3, 25), "gspi_loc1"), 949 RTK_PIN_FUNC(SHIFT_LEFT(0x5, 25), "iso_gspi_loc1")), 950 [RTD1619B_ISO_GPIO_9] = RTK_PIN_MUX(gpio_9, 0x4, GENMASK(30, 28), 951 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 28), "gpio"), 952 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 28), "uart1"), 953 RTK_PIN_FUNC(SHIFT_LEFT(0x3, 28), "gspi_loc1"), 954 RTK_PIN_FUNC(SHIFT_LEFT(0x5, 28), "iso_gspi_loc1")), 955 [RTD1619B_ISO_GPIO_10] = RTK_PIN_MUX(gpio_10, 0x8, GENMASK(2, 0), 956 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 0), "gpio"), 957 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 0), "uart1"), 958 RTK_PIN_FUNC(SHIFT_LEFT(0x3, 0), "gspi_loc1"), 959 RTK_PIN_FUNC(SHIFT_LEFT(0x5, 0), "iso_gspi_loc1")), 960 [RTD1619B_ISO_GPIO_11] = RTK_PIN_MUX(gpio_11, 0x8, GENMASK(5, 3), 961 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 3), "gpio"), 962 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 3), "uart1"), 963 RTK_PIN_FUNC(SHIFT_LEFT(0x3, 3), "gspi_loc1"), 964 RTK_PIN_FUNC(SHIFT_LEFT(0x5, 3), "iso_gspi_loc1")), 965 966 [RTD1619B_ISO_GPIO_12] = RTK_PIN_MUX(gpio_12, 0x8, GENMASK(6, 6), 967 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 6), "gpio"), 968 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 6), "i2c0")), 969 [RTD1619B_ISO_GPIO_13] = RTK_PIN_MUX(gpio_13, 0x8, GENMASK(7, 7), 970 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 7), "gpio"), 971 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 7), "i2c0")), 972 [RTD1619B_ISO_GPIO_14] = RTK_PIN_MUX(gpio_14, 0x8, GENMASK(10, 8), 973 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 8), "gpio"), 974 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 8), "etn_led"), 975 RTK_PIN_FUNC(SHIFT_LEFT(0x3, 8), "etn_phy"), 976 RTK_PIN_FUNC(SHIFT_LEFT(0x5, 8), "etn_clk")), 977 [RTD1619B_ISO_GPIO_15] = RTK_PIN_MUX(gpio_15, 0x8, GENMASK(12, 11), 978 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 11), "gpio"), 979 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 11), "etn_led"), 980 RTK_PIN_FUNC(SHIFT_LEFT(0x3, 11), "etn_phy")), 981 [RTD1619B_ISO_GPIO_16] = RTK_PIN_MUX(gpio_16, 0x8, GENMASK(13, 13), 982 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 13), "gpio"), 983 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 13), "i2c1")), 984 [RTD1619B_ISO_GPIO_17] = RTK_PIN_MUX(gpio_17, 0x8, GENMASK(14, 14), 985 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 14), "gpio"), 986 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 14), "i2c1")), 987 [RTD1619B_ISO_GPIO_18] = RTK_PIN_MUX(gpio_18, 0x8, GENMASK(17, 15), 988 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 15), "gpio"), 989 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 15), "uart2_loc0"), 990 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 15), "sc0"), 991 RTK_PIN_FUNC(SHIFT_LEFT(0x3, 15), "gspi_loc0"), 992 RTK_PIN_FUNC(SHIFT_LEFT(0x5, 15), "iso_gspi_loc0")), 993 [RTD1619B_ISO_GPIO_19] = RTK_PIN_MUX(gpio_19, 0x8, GENMASK(20, 18), 994 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 18), "gpio"), 995 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 18), "uart2_loc0"), 996 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 18), "sc0"), 997 RTK_PIN_FUNC(SHIFT_LEFT(0x3, 18), "gspi_loc0"), 998 RTK_PIN_FUNC(SHIFT_LEFT(0x5, 18), "iso_gspi_loc0")), 999 [RTD1619B_ISO_GPIO_20] = RTK_PIN_MUX(gpio_20, 0x8, GENMASK(23, 21), 1000 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 21), "gpio"), 1001 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 21), "uart2_loc0"), 1002 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 21), "pwm0"), 1003 RTK_PIN_FUNC(SHIFT_LEFT(0x3, 21), "gspi_loc0"), 1004 RTK_PIN_FUNC(SHIFT_LEFT(0x4, 21), "sc0"), 1005 RTK_PIN_FUNC(SHIFT_LEFT(0x5, 21), "iso_gspi_loc0")), 1006 [RTD1619B_ISO_GPIO_21] = RTK_PIN_MUX(gpio_21, 0x8, GENMASK(26, 24), 1007 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 24), "gpio"), 1008 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 24), "pwm1"), 1009 RTK_PIN_FUNC(SHIFT_LEFT(0x5, 24), "spdif_optical_loc1")), 1010 [RTD1619B_ISO_GPIO_22] = RTK_PIN_MUX(gpio_22, 0x8, GENMASK(28, 27), 1011 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 27), "gpio"), 1012 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 27), "pwm2")), 1013 [RTD1619B_ISO_GPIO_23] = RTK_PIN_MUX(gpio_23, 0x8, GENMASK(30, 29), 1014 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 29), "gpio"), 1015 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 29), "etn_led"), 1016 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 29), "pwm3")), 1017 [RTD1619B_ISO_USB_CC2] = RTK_PIN_MUX(usb_cc2, 0x8, GENMASK(31, 31), 1018 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 31), "gpio"), 1019 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 31), "usb_cc2")), 1020 [RTD1619B_ISO_GPIO_25] = RTK_PIN_MUX(gpio_25, 0xc, GENMASK(1, 0), 1021 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 0), "gpio"), 1022 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 0), "uart2_loc1"), 1023 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 0), "pcie1")), 1024 [RTD1619B_ISO_GPIO_26] = RTK_PIN_MUX(gpio_26, 0xc, GENMASK(3, 2), 1025 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 2), "gpio"), 1026 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 2), "uart2_loc1"), 1027 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 2), "vfd"), 1028 RTK_PIN_FUNC(SHIFT_LEFT(0x3, 2), "pwm0")), 1029 [RTD1619B_ISO_GPIO_27] = RTK_PIN_MUX(gpio_27, 0xc, GENMASK(5, 4), 1030 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 4), "gpio"), 1031 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 4), "uart2_loc1"), 1032 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 4), "vfd"), 1033 RTK_PIN_FUNC(SHIFT_LEFT(0x3, 4), "pwm1")), 1034 1035 [RTD1619B_ISO_GPIO_28] = RTK_PIN_MUX(gpio_28, 0xc, GENMASK(7, 6), 1036 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 6), "gpio"), 1037 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 6), "uart2_loc1"), 1038 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 6), "vfd"), 1039 RTK_PIN_FUNC(SHIFT_LEFT(0x3, 6), "pwm2")), 1040 [RTD1619B_ISO_GPIO_29] = RTK_PIN_MUX(gpio_29, 0xc, GENMASK(8, 8), 1041 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 8), "gpio"), 1042 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 8), "i2c5")), 1043 [RTD1619B_ISO_GPIO_30] = RTK_PIN_MUX(gpio_30, 0xc, GENMASK(9, 9), 1044 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 9), "gpio")), 1045 [RTD1619B_ISO_GPIO_31] = RTK_PIN_MUX(gpio_31, 0xc, GENMASK(12, 10), 1046 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 10), "gpio"), 1047 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 10), "uart2_loc0"), 1048 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 10), "sc0"), 1049 RTK_PIN_FUNC(SHIFT_LEFT(0x3, 10), "gspi_loc0"), 1050 RTK_PIN_FUNC(SHIFT_LEFT(0x5, 10), "iso_gspi_loc0")), 1051 [RTD1619B_ISO_GPIO_32] = RTK_PIN_MUX(gpio_32, 0xc, GENMASK(17, 13), 1052 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 13), "gpio"), 1053 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 13), "sd"), 1054 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 13), "sdio_loc0"), 1055 RTK_PIN_FUNC(SHIFT_LEFT(0x3, 13), "dmic_loc1"), 1056 RTK_PIN_FUNC(SHIFT_LEFT(0x4, 13), "ai_loc1"), 1057 RTK_PIN_FUNC(SHIFT_LEFT(0x5, 13), "scpu_ejtag_loc1"), 1058 RTK_PIN_FUNC(SHIFT_LEFT(0x6, 13), "acpu_ejtag_loc1"), 1059 RTK_PIN_FUNC(SHIFT_LEFT(0x7, 13), "vcpu_ejtag_loc1"), 1060 RTK_PIN_FUNC(SHIFT_LEFT(0x11, 13), "vtc_i2si_loc0"), 1061 RTK_PIN_FUNC(SHIFT_LEFT(0x14, 13), "ve3_ejtag_loc1"), 1062 RTK_PIN_FUNC(SHIFT_LEFT(0x15, 13), "aucpu0_ejtag_loc1"), 1063 RTK_PIN_FUNC(SHIFT_LEFT(0x16, 13), "aucpu1_ejtag_loc1")), 1064 [RTD1619B_ISO_GPIO_33] = RTK_PIN_MUX(gpio_33, 0xc, GENMASK(22, 18), 1065 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 18), "gpio"), 1066 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 18), "sd"), 1067 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 18), "sdio_loc0"), 1068 RTK_PIN_FUNC(SHIFT_LEFT(0x3, 18), "dmic_loc1"), 1069 RTK_PIN_FUNC(SHIFT_LEFT(0x4, 18), "ai_loc1"), 1070 RTK_PIN_FUNC(SHIFT_LEFT(0x5, 18), "scpu_ejtag_loc1"), 1071 RTK_PIN_FUNC(SHIFT_LEFT(0x6, 18), "acpu_ejtag_loc1"), 1072 RTK_PIN_FUNC(SHIFT_LEFT(0x7, 18), "vcpu_ejtag_loc1"), 1073 RTK_PIN_FUNC(SHIFT_LEFT(0x14, 18), "ve3_ejtag_loc1"), 1074 RTK_PIN_FUNC(SHIFT_LEFT(0x15, 18), "aucpu0_ejtag_loc1"), 1075 RTK_PIN_FUNC(SHIFT_LEFT(0x16, 18), "aucpu1_ejtag_loc1")), 1076 [RTD1619B_ISO_GPIO_34] = RTK_PIN_MUX(gpio_34, 0xc, GENMASK(25, 23), 1077 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 23), "gpio"), 1078 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 23), "sd"), 1079 RTK_PIN_FUNC(SHIFT_LEFT(0x3, 23), "dmic_loc1"), 1080 RTK_PIN_FUNC(SHIFT_LEFT(0x4, 23), "ai_loc1"), 1081 RTK_PIN_FUNC(SHIFT_LEFT(0x5, 23), "i2c4")), 1082 [RTD1619B_ISO_GPIO_35] = RTK_PIN_MUX(gpio_35, 0xc, GENMASK(28, 26), 1083 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 26), "gpio"), 1084 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 26), "sd"), 1085 RTK_PIN_FUNC(SHIFT_LEFT(0x3, 26), "dmic_loc1"), 1086 RTK_PIN_FUNC(SHIFT_LEFT(0x5, 26), "i2c4")), 1087 [RTD1619B_ISO_HIF_DATA] = RTK_PIN_MUX(hif_data, 0x10, GENMASK(4, 0), 1088 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 0), "gpio"), 1089 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 0), "sd"), 1090 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 0), "sdio_loc0"), 1091 RTK_PIN_FUNC(SHIFT_LEFT(0x3, 0), "dmic_loc1"), 1092 RTK_PIN_FUNC(SHIFT_LEFT(0x4, 0), "tdm_ai_loc1"), 1093 RTK_PIN_FUNC(SHIFT_LEFT(0x5, 0), "scpu_ejtag_loc1"), 1094 RTK_PIN_FUNC(SHIFT_LEFT(0x6, 0), "acpu_ejtag_loc1"), 1095 RTK_PIN_FUNC(SHIFT_LEFT(0x7, 0), "vcpu_ejtag_loc1"), 1096 RTK_PIN_FUNC(SHIFT_LEFT(0x8, 0), "ai_loc1"), 1097 RTK_PIN_FUNC(SHIFT_LEFT(0x9, 0), "hi"), 1098 RTK_PIN_FUNC(SHIFT_LEFT(0x10, 0), "hi_m"), 1099 RTK_PIN_FUNC(SHIFT_LEFT(0x11, 0), "vtc_i2si_loc0"), 1100 RTK_PIN_FUNC(SHIFT_LEFT(0x12, 0), "vtc_tdm_loc0"), 1101 RTK_PIN_FUNC(SHIFT_LEFT(0x13, 0), "vtc_dmic_loc0"), 1102 RTK_PIN_FUNC(SHIFT_LEFT(0x14, 0), "ve3_ejtag_loc1"), 1103 RTK_PIN_FUNC(SHIFT_LEFT(0x15, 0), "aucpu0_ejtag_loc1"), 1104 RTK_PIN_FUNC(SHIFT_LEFT(0x16, 0), "aucpu1_ejtag_loc1")), 1105 [RTD1619B_ISO_HIF_EN] = RTK_PIN_MUX(hif_en, 0x10, GENMASK(9, 5), 1106 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 5), "gpio"), 1107 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 5), "sd"), 1108 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 5), "sdio_loc0"), 1109 RTK_PIN_FUNC(SHIFT_LEFT(0x3, 5), "dmic_loc1"), 1110 RTK_PIN_FUNC(SHIFT_LEFT(0x4, 5), "tdm_ai_loc1"), 1111 RTK_PIN_FUNC(SHIFT_LEFT(0x5, 5), "scpu_ejtag_loc1"), 1112 RTK_PIN_FUNC(SHIFT_LEFT(0x6, 5), "acpu_ejtag_loc1"), 1113 RTK_PIN_FUNC(SHIFT_LEFT(0x7, 5), "vcpu_ejtag_loc1"), 1114 RTK_PIN_FUNC(SHIFT_LEFT(0x8, 5), "ai_loc1"), 1115 RTK_PIN_FUNC(SHIFT_LEFT(0x9, 5), "hi"), 1116 RTK_PIN_FUNC(SHIFT_LEFT(0x10, 5), "hi_m"), 1117 RTK_PIN_FUNC(SHIFT_LEFT(0x11, 5), "vtc_i2si_loc0"), 1118 RTK_PIN_FUNC(SHIFT_LEFT(0x12, 5), "vtc_tdm_loc0"), 1119 RTK_PIN_FUNC(SHIFT_LEFT(0x13, 5), "vtc_dmic_loc0"), 1120 RTK_PIN_FUNC(SHIFT_LEFT(0x14, 5), "ve3_ejtag_loc1"), 1121 RTK_PIN_FUNC(SHIFT_LEFT(0x15, 5), "aucpu0_ejtag_loc1"), 1122 RTK_PIN_FUNC(SHIFT_LEFT(0x16, 5), "aucpu1_ejtag_loc1")), 1123 [RTD1619B_ISO_HIF_RDY] = RTK_PIN_MUX(hif_rdy, 0x10, GENMASK(13, 10), 1124 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 10), "gpio"), 1125 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 10), "sd"), 1126 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 10), "sdio_loc0"), 1127 RTK_PIN_FUNC(SHIFT_LEFT(0x3, 10), "dmic_loc1"), 1128 RTK_PIN_FUNC(SHIFT_LEFT(0x4, 10), "tdm_ai_loc1"), 1129 RTK_PIN_FUNC(SHIFT_LEFT(0x8, 10), "ai_loc1"), 1130 RTK_PIN_FUNC(SHIFT_LEFT(0x9, 10), "hi"), 1131 RTK_PIN_FUNC(SHIFT_LEFT(0x10, 10), "hi_m"), 1132 RTK_PIN_FUNC(SHIFT_LEFT(0x11, 10), "vtc_i2si_loc0"), 1133 RTK_PIN_FUNC(SHIFT_LEFT(0x12, 10), "vtc_tdm_loc0"), 1134 RTK_PIN_FUNC(SHIFT_LEFT(0x13, 10), "vtc_dmic_loc0")), 1135 1136 [RTD1619B_ISO_HIF_CLK] = RTK_PIN_MUX(hif_clk, 0x10, GENMASK(18, 14), 1137 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 14), "gpio"), 1138 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 14), "sd"), 1139 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 14), "sdio_loc0"), 1140 RTK_PIN_FUNC(SHIFT_LEFT(0x3, 14), "dmic_loc1"), 1141 RTK_PIN_FUNC(SHIFT_LEFT(0x4, 14), "tdm_ai_loc1"), 1142 RTK_PIN_FUNC(SHIFT_LEFT(0x5, 14), "scpu_ejtag_loc1"), 1143 RTK_PIN_FUNC(SHIFT_LEFT(0x6, 14), "acpu_ejtag_loc1"), 1144 RTK_PIN_FUNC(SHIFT_LEFT(0x7, 14), "vcpu_ejtag_loc1"), 1145 RTK_PIN_FUNC(SHIFT_LEFT(0x8, 14), "ai_loc1"), 1146 RTK_PIN_FUNC(SHIFT_LEFT(0x9, 14), "hi"), 1147 RTK_PIN_FUNC(SHIFT_LEFT(0x10, 14), "hi_m"), 1148 RTK_PIN_FUNC(SHIFT_LEFT(0x11, 14), "vtc_i2si_loc0"), 1149 RTK_PIN_FUNC(SHIFT_LEFT(0x12, 14), "vtc_tdm_loc0"), 1150 RTK_PIN_FUNC(SHIFT_LEFT(0x13, 14), "vtc_dmic_loc0"), 1151 RTK_PIN_FUNC(SHIFT_LEFT(0x14, 14), "ve3_ejtag_loc1"), 1152 RTK_PIN_FUNC(SHIFT_LEFT(0x15, 14), "aucpu0_ejtag_loc1"), 1153 RTK_PIN_FUNC(SHIFT_LEFT(0x16, 14), "aucpu1_ejtag_loc1")), 1154 [RTD1619B_ISO_GPIO_40] = RTK_PIN_MUX(gpio_40, 0x10, GENMASK(20, 19), 1155 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 19), "gpio"), 1156 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 19), "sdio_loc1")), 1157 [RTD1619B_ISO_GPIO_41] = RTK_PIN_MUX(gpio_41, 0x10, GENMASK(22, 21), 1158 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 21), "gpio"), 1159 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 21), "sdio_loc1")), 1160 [RTD1619B_ISO_GPIO_42] = RTK_PIN_MUX(gpio_42, 0x10, GENMASK(24, 23), 1161 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 23), "gpio"), 1162 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 23), "sdio_loc1")), 1163 [RTD1619B_ISO_GPIO_43] = RTK_PIN_MUX(gpio_43, 0x10, GENMASK(26, 25), 1164 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 25), "gpio"), 1165 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 25), "sdio_loc1")), 1166 [RTD1619B_ISO_GPIO_44] = RTK_PIN_MUX(gpio_44, 0x10, GENMASK(28, 27), 1167 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 27), "gpio"), 1168 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 27), "sdio_loc1")), 1169 [RTD1619B_ISO_GPIO_45] = RTK_PIN_MUX(gpio_45, 0x10, GENMASK(30, 29), 1170 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 29), "gpio"), 1171 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 29), "sdio_loc1")), 1172 [RTD1619B_ISO_GPIO_46] = RTK_PIN_MUX(gpio_46, 0x10, GENMASK(31, 31), 1173 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 31), "gpio"), 1174 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 31), "i2c5")), 1175 [RTD1619B_ISO_GPIO_47] = RTK_PIN_MUX(gpio_47, 0x14, GENMASK(1, 0), 1176 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 0), "gpio"), 1177 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 0), "dc_fan"), 1178 RTK_PIN_FUNC(SHIFT_LEFT(0x3, 0), "pwm3")), 1179 [RTD1619B_ISO_GPIO_48] = RTK_PIN_MUX(gpio_48, 0x14, GENMASK(2, 2), 1180 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 2), "gpio"), 1181 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 2), "pll_test_loc1")), 1182 [RTD1619B_ISO_GPIO_49] = RTK_PIN_MUX(gpio_49, 0x14, GENMASK(3, 3), 1183 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 3), "gpio"), 1184 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 3), "pll_test_loc1")), 1185 [RTD1619B_ISO_GPIO_50] = RTK_PIN_MUX(gpio_50, 0x14, GENMASK(5, 4), 1186 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 4), "gpio"), 1187 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 4), "spdif"), 1188 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 4), "test_loop_dis")), 1189 [RTD1619B_ISO_USB_CC1] = RTK_PIN_MUX(usb_cc1, 0x14, GENMASK(6, 6), 1190 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 6), "gpio"), 1191 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 6), "usb_cc1")), 1192 [RTD1619B_ISO_GPIO_52] = RTK_PIN_MUX(gpio_52, 0x14, GENMASK(8, 7), 1193 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 7), "gpio"), 1194 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 7), "pll_test_loc0"), 1195 RTK_PIN_FUNC(SHIFT_LEFT(0x3, 7), "pcie2")), 1196 [RTD1619B_ISO_GPIO_53] = RTK_PIN_MUX(gpio_53, 0x14, GENMASK(9, 9), 1197 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 9), "gpio"), 1198 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 9), "pll_test_loc0")), 1199 [RTD1619B_ISO_IR_RX] = RTK_PIN_MUX(ir_rx, 0x14, GENMASK(11, 10), 1200 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 10), "gpio"), 1201 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 10), "ir_rx"), 1202 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 10), "standby_dbg")), 1203 [RTD1619B_ISO_UR0_RX] = RTK_PIN_MUX(ur0_rx, 0x14, GENMASK(12, 12), 1204 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 12), "gpio"), 1205 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 12), "uart0")), 1206 1207 [RTD1619B_ISO_UR0_TX] = RTK_PIN_MUX(ur0_tx, 0x14, GENMASK(13, 13), 1208 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 13), "gpio"), 1209 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 13), "uart0")), 1210 [RTD1619B_ISO_GPIO_57] = RTK_PIN_MUX(gpio_57, 0x14, GENMASK(17, 14), 1211 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 14), "gpio"), 1212 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 14), "tdm_ai_loc0"), 1213 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 14), "ai_loc0"), 1214 RTK_PIN_FUNC(SHIFT_LEFT(0x3, 14), "dmic_loc0"), 1215 RTK_PIN_FUNC(SHIFT_LEFT(0x11, 14), "vtc_i2si_loc1"), 1216 RTK_PIN_FUNC(SHIFT_LEFT(0x12, 14), "vtc_tdm_loc1"), 1217 RTK_PIN_FUNC(SHIFT_LEFT(0x13, 14), "vtc_dmic_loc1")), 1218 [RTD1619B_ISO_GPIO_58] = RTK_PIN_MUX(gpio_58, 0x14, GENMASK(21, 18), 1219 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 18), "gpio"), 1220 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 18), "tdm_ai_loc0"), 1221 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 18), "ai_loc0"), 1222 RTK_PIN_FUNC(SHIFT_LEFT(0x3, 18), "dmic_loc0"), 1223 RTK_PIN_FUNC(SHIFT_LEFT(0x11, 18), "vtc_i2si_loc1"), 1224 RTK_PIN_FUNC(SHIFT_LEFT(0x12, 18), "vtc_tdm_loc1"), 1225 RTK_PIN_FUNC(SHIFT_LEFT(0x13, 18), "vtc_dmic_loc1")), 1226 [RTD1619B_ISO_GPIO_59] = RTK_PIN_MUX(gpio_59, 0x14, GENMASK(25, 22), 1227 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 22), "gpio"), 1228 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 22), "tdm_ai_loc0"), 1229 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 22), "ai_loc0"), 1230 RTK_PIN_FUNC(SHIFT_LEFT(0x3, 22), "dmic_loc0"), 1231 RTK_PIN_FUNC(SHIFT_LEFT(0x11, 22), "vtc_i2si_loc1"), 1232 RTK_PIN_FUNC(SHIFT_LEFT(0x12, 22), "vtc_tdm_loc1"), 1233 RTK_PIN_FUNC(SHIFT_LEFT(0x13, 22), "vtc_dmic_loc1")), 1234 [RTD1619B_ISO_GPIO_60] = RTK_PIN_MUX(gpio_60, 0x14, GENMASK(29, 26), 1235 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 26), "gpio"), 1236 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 26), "tdm_ai_loc0"), 1237 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 26), "ai_loc0"), 1238 RTK_PIN_FUNC(SHIFT_LEFT(0x3, 26), "dmic_loc0"), 1239 RTK_PIN_FUNC(SHIFT_LEFT(0x11, 26), "vtc_i2si_loc1"), 1240 RTK_PIN_FUNC(SHIFT_LEFT(0x12, 26), "vtc_tdm_loc1"), 1241 RTK_PIN_FUNC(SHIFT_LEFT(0x13, 26), "vtc_dmic_loc1")), 1242 [RTD1619B_ISO_GPIO_61] = RTK_PIN_MUX(gpio_61, 0x18, GENMASK(3, 0), 1243 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 0), "gpio"), 1244 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 0), "ai_loc0"), 1245 RTK_PIN_FUNC(SHIFT_LEFT(0x3, 0), "dmic_loc0"), 1246 RTK_PIN_FUNC(SHIFT_LEFT(0x11, 0), "vtc_i2si_loc1")), 1247 [RTD1619B_ISO_GPIO_62] = RTK_PIN_MUX(gpio_62, 0x18, GENMASK(5, 4), 1248 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 4), "gpio"), 1249 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 4), "ai_loc0"), 1250 RTK_PIN_FUNC(SHIFT_LEFT(0x3, 4), "dmic_loc0")), 1251 [RTD1619B_ISO_GPIO_63] = RTK_PIN_MUX(gpio_63, 0x18, GENMASK(7, 6), 1252 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 6), "gpio"), 1253 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 6), "ai_loc0"), 1254 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 6), "i2c3"), 1255 RTK_PIN_FUNC(SHIFT_LEFT(0x3, 6), "dmic_loc0")), 1256 [RTD1619B_ISO_GPIO_64] = RTK_PIN_MUX(gpio_64, 0x18, GENMASK(9, 8), 1257 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 8), "gpio"), 1258 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 8), "i2c3"), 1259 RTK_PIN_FUNC(SHIFT_LEFT(0x3, 8), "dmic_loc0")), 1260 [RTD1619B_ISO_GPIO_65] = RTK_PIN_MUX(gpio_65, 0x18, GENMASK(10, 10), 1261 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 10), "gpio")), 1262 [RTD1619B_ISO_GPIO_66] = RTK_PIN_MUX(gpio_66, 0x18, GENMASK(14, 11), 1263 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 11), "gpio"), 1264 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 11), "tp0"), 1265 RTK_PIN_FUNC(SHIFT_LEFT(0x4, 11), "ao"), 1266 RTK_PIN_FUNC(SHIFT_LEFT(0x11, 11), "vtc_i2so")), 1267 [RTD1619B_ISO_GPIO_67] = RTK_PIN_MUX(gpio_67, 0x18, GENMASK(18, 15), 1268 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 15), "gpio"), 1269 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 15), "tp0"), 1270 RTK_PIN_FUNC(SHIFT_LEFT(0x4, 15), "ao"), 1271 RTK_PIN_FUNC(SHIFT_LEFT(0x11, 15), "vtc_i2so")), 1272 [RTD1619B_ISO_GPIO_68] = RTK_PIN_MUX(gpio_68, 0x18, GENMASK(22, 19), 1273 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 19), "gpio"), 1274 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 19), "tp0"), 1275 RTK_PIN_FUNC(SHIFT_LEFT(0x4, 19), "ao"), 1276 RTK_PIN_FUNC(SHIFT_LEFT(0x11, 19), "vtc_i2so")), 1277 [RTD1619B_ISO_GPIO_69] = RTK_PIN_MUX(gpio_69, 0x18, GENMASK(26, 23), 1278 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 23), "gpio"), 1279 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 23), "tp0"), 1280 RTK_PIN_FUNC(SHIFT_LEFT(0x3, 23), "tp1"), 1281 RTK_PIN_FUNC(SHIFT_LEFT(0x4, 23), "ao"), 1282 RTK_PIN_FUNC(SHIFT_LEFT(0x11, 23), "vtc_i2so")), 1283 1284 [RTD1619B_ISO_GPIO_70] = RTK_PIN_MUX(gpio_70, 0x18, GENMASK(29, 27), 1285 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 27), "gpio"), 1286 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 27), "tp0"), 1287 RTK_PIN_FUNC(SHIFT_LEFT(0x3, 27), "tp1"), 1288 RTK_PIN_FUNC(SHIFT_LEFT(0x4, 27), "ao")), 1289 [RTD1619B_ISO_GPIO_71] = RTK_PIN_MUX(gpio_71, 0x1c, GENMASK(2, 0), 1290 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 0), "gpio"), 1291 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 0), "tp0"), 1292 RTK_PIN_FUNC(SHIFT_LEFT(0x3, 0), "tp1"), 1293 RTK_PIN_FUNC(SHIFT_LEFT(0x4, 0), "ao"), 1294 RTK_PIN_FUNC(SHIFT_LEFT(0x5, 0), "scpu_ejtag_loc2"), 1295 RTK_PIN_FUNC(SHIFT_LEFT(0x6, 0), "acpu_ejtag_loc2"), 1296 RTK_PIN_FUNC(SHIFT_LEFT(0x7, 0), "vcpu_ejtag_loc2"), 1297 RTK_PIN_FUNC(SHIFT_LEFT(0x8, 0), "ve3_ejtag_loc2"), 1298 RTK_PIN_FUNC(SHIFT_LEFT(0x9, 0), "aucpu0_ejtag_loc2"), 1299 RTK_PIN_FUNC(SHIFT_LEFT(0x10, 0), "aucpu1_ejtag_loc2")), 1300 [RTD1619B_ISO_GPIO_72] = RTK_PIN_MUX(gpio_72, 0x1c, GENMASK(6, 3), 1301 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 3), "gpio"), 1302 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 3), "tp0"), 1303 RTK_PIN_FUNC(SHIFT_LEFT(0x3, 3), "tp1"), 1304 RTK_PIN_FUNC(SHIFT_LEFT(0x4, 3), "ao"), 1305 RTK_PIN_FUNC(SHIFT_LEFT(0x5, 3), "scpu_ejtag_loc2"), 1306 RTK_PIN_FUNC(SHIFT_LEFT(0x6, 3), "acpu_ejtag_loc2"), 1307 RTK_PIN_FUNC(SHIFT_LEFT(0x7, 3), "vcpu_ejtag_loc2"), 1308 RTK_PIN_FUNC(SHIFT_LEFT(0x8, 3), "ve3_ejtag_loc2"), 1309 RTK_PIN_FUNC(SHIFT_LEFT(0x9, 3), "aucpu0_ejtag_loc2"), 1310 RTK_PIN_FUNC(SHIFT_LEFT(0x10, 3), "aucpu1_ejtag_loc2")), 1311 [RTD1619B_ISO_GPIO_73] = RTK_PIN_MUX(gpio_73, 0x1c, GENMASK(10, 7), 1312 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 7), "gpio"), 1313 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 7), "tp0"), 1314 RTK_PIN_FUNC(SHIFT_LEFT(0x5, 7), "scpu_ejtag_loc2"), 1315 RTK_PIN_FUNC(SHIFT_LEFT(0x6, 7), "acpu_ejtag_loc2"), 1316 RTK_PIN_FUNC(SHIFT_LEFT(0x7, 7), "vcpu_ejtag_loc2"), 1317 RTK_PIN_FUNC(SHIFT_LEFT(0x8, 7), "ve3_ejtag_loc2"), 1318 RTK_PIN_FUNC(SHIFT_LEFT(0x9, 7), "aucpu0_ejtag_loc2"), 1319 RTK_PIN_FUNC(SHIFT_LEFT(0x10, 7), "aucpu1_ejtag_loc2")), 1320 [RTD1619B_ISO_GPIO_74] = RTK_PIN_MUX(gpio_74, 0x1c, GENMASK(14, 11), 1321 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 11), "gpio"), 1322 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 11), "tp0"), 1323 RTK_PIN_FUNC(SHIFT_LEFT(0x5, 11), "scpu_ejtag_loc2"), 1324 RTK_PIN_FUNC(SHIFT_LEFT(0x6, 11), "acpu_ejtag_loc2"), 1325 RTK_PIN_FUNC(SHIFT_LEFT(0x7, 11), "vcpu_ejtag_loc2"), 1326 RTK_PIN_FUNC(SHIFT_LEFT(0x8, 11), "ve3_ejtag_loc2"), 1327 RTK_PIN_FUNC(SHIFT_LEFT(0x9, 11), "aucpu0_ejtag_loc2"), 1328 RTK_PIN_FUNC(SHIFT_LEFT(0x10, 11), "aucpu1_ejtag_loc2")), 1329 [RTD1619B_ISO_GPIO_75] = RTK_PIN_MUX(gpio_75, 0x1c, GENMASK(18, 15), 1330 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 15), "gpio"), 1331 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 15), "tp0"), 1332 RTK_PIN_FUNC(SHIFT_LEFT(0x5, 15), "scpu_ejtag_loc2"), 1333 RTK_PIN_FUNC(SHIFT_LEFT(0x6, 15), "acpu_ejtag_loc2"), 1334 RTK_PIN_FUNC(SHIFT_LEFT(0x7, 15), "vcpu_ejtag_loc2"), 1335 RTK_PIN_FUNC(SHIFT_LEFT(0x8, 15), "ve3_ejtag_loc2"), 1336 RTK_PIN_FUNC(SHIFT_LEFT(0x9, 15), "aucpu0_ejtag_loc2"), 1337 RTK_PIN_FUNC(SHIFT_LEFT(0x10, 15), "aucpu1_ejtag_loc2")), 1338 [RTD1619B_ISO_GPIO_76] = RTK_PIN_MUX(gpio_76, 0x1c, GENMASK(22, 19), 1339 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 19), "gpio"), 1340 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 19), "tp0"), 1341 RTK_PIN_FUNC(SHIFT_LEFT(0x5, 19), "scpu_ejtag_loc2"), 1342 RTK_PIN_FUNC(SHIFT_LEFT(0x6, 19), "acpu_ejtag_loc2"), 1343 RTK_PIN_FUNC(SHIFT_LEFT(0x7, 19), "vcpu_ejtag_loc2"), 1344 RTK_PIN_FUNC(SHIFT_LEFT(0x8, 19), "ve3_ejtag_loc2"), 1345 RTK_PIN_FUNC(SHIFT_LEFT(0x9, 19), "aucpu0_ejtag_loc2"), 1346 RTK_PIN_FUNC(SHIFT_LEFT(0x10, 19), "aucpu1_ejtag_loc2")), 1347 1348 [RTD1619B_ISO_UR2_LOC] = RTK_PIN_MUX(ur2_loc, 0x120, GENMASK(1, 0), 1349 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 0), "uart2_disable"), 1350 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 0), "uart2_loc0"), 1351 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 0), "uart2_loc1")), 1352 [RTD1619B_ISO_GSPI_LOC] = RTK_PIN_MUX(gspi_loc, 0x120, GENMASK(3, 2), 1353 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 2), "gspi_disable"), 1354 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 2), "gspi_loc0"), 1355 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 2), "gspi_loc1")), 1356 [RTD1619B_ISO_SDIO_LOC] = RTK_PIN_MUX(sdio_loc, 0x120, GENMASK(5, 4), 1357 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 4), "sdio_disable"), 1358 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 4), "sdio_loc0"), 1359 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 4), "sdio_loc1")), 1360 [RTD1619B_ISO_HI_LOC] = RTK_PIN_MUX(hi_loc, 0x120, GENMASK(7, 6), 1361 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 6), "hi_loc_disable"), 1362 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 6), "hi_loc0")), 1363 [RTD1619B_ISO_HI_WIDTH] = RTK_PIN_MUX(hi_width, 0x120, GENMASK(9, 8), 1364 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 8), "hi_width_disable"), 1365 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 8), "hi_width_1bit")), 1366 [RTD1619B_ISO_SF_EN] = RTK_PIN_MUX(sf_en, 0x120, GENMASK(11, 11), 1367 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 11), "sf_disable"), 1368 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 11), "sf_enable")), 1369 [RTD1619B_ISO_ARM_TRACE_DBG_EN] = RTK_PIN_MUX(arm_trace_dbg_en, 0x120, GENMASK(12, 12), 1370 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 12), "arm_trace_debug_disable"), 1371 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 12), "arm_trace_debug_enable")), 1372 [RTD1619B_ISO_PWM_01_OPEN_DRAIN_EN_LOC0] = RTK_PIN_MUX(pwm_01_open_drain_en_loc0, 0x120, 1373 GENMASK(13, 13), 1374 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 13), "pwm_normal"), 1375 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 13), "pwm_open_drain")), 1376 [RTD1619B_ISO_PWM_23_OPEN_DRAIN_EN_LOC0] = RTK_PIN_MUX(pwm_23_open_drain_en_loc0, 0x120, 1377 GENMASK(14, 14), 1378 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 14), "pwm_normal"), 1379 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 14), "pwm_open_drain")), 1380 [RTD1619B_ISO_PWM_01_OPEN_DRAIN_EN_LOC1] = RTK_PIN_MUX(pwm_01_open_drain_en_loc1, 0x120, 1381 GENMASK(15, 15), 1382 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 15), "pwm_normal"), 1383 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 15), "pwm_open_drain")), 1384 [RTD1619B_ISO_PWM_23_OPEN_DRAIN_EN_LOC1] = RTK_PIN_MUX(pwm_23_open_drain_en_loc1, 0x120, 1385 GENMASK(16, 16), 1386 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 16), "pwm_normal"), 1387 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 16), "pwm_open_drain")), 1388 [RTD1619B_ISO_EJTAG_ACPU_LOC] = RTK_PIN_MUX(ejtag_acpu_loc, 0x120, GENMASK(19, 17), 1389 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 17), "acpu_ejtag_disable"), 1390 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 17), "acpu_ejtag_loc0"), 1391 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 17), "acpu_ejtag_loc1"), 1392 RTK_PIN_FUNC(SHIFT_LEFT(0x4, 17), "acpu_ejtag_loc2")), 1393 [RTD1619B_ISO_EJTAG_VCPU_LOC] = RTK_PIN_MUX(ejtag_vcpu_loc, 0x120, GENMASK(22, 20), 1394 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 20), "vcpu_ejtag_disable"), 1395 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 20), "vcpu_ejtag_loc0"), 1396 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 20), "vcpu_ejtag_loc1"), 1397 RTK_PIN_FUNC(SHIFT_LEFT(0x4, 20), "vcpu_ejtag_loc2")), 1398 [RTD1619B_ISO_EJTAG_SCPU_LOC] = RTK_PIN_MUX(ejtag_scpu_loc, 0x120, GENMASK(25, 23), 1399 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 23), "scpu_ejtag_disable"), 1400 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 23), "scpu_ejtag_loc0"), 1401 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 23), "scpu_ejtag_loc1"), 1402 RTK_PIN_FUNC(SHIFT_LEFT(0x4, 23), "scpu_ejtag_loc2")), 1403 [RTD1619B_ISO_DMIC_LOC] = RTK_PIN_MUX(dmic_loc, 0x120, GENMASK(27, 26), 1404 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 26), "dmic_loc0"), 1405 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 26), "dmic_loc1")), 1406 [RTD1619B_ISO_ISO_GSPI_LOC] = RTK_PIN_MUX(iso_gspi_loc, 0x120, GENMASK(29, 28), 1407 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 28), "iso_gspi_disable"), 1408 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 28), "iso_gspi_loc0"), 1409 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 28), "iso_gspi_loc1")), 1410 [RTD1619B_ISO_EJTAG_VE3_LOC] = RTK_PIN_MUX(ejtag_ve3_loc, 0x124, GENMASK(20, 18), 1411 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 18), "ve3_ejtag_disable"), 1412 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 18), "ve3_ejtag_loc0"), 1413 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 18), "ve3_ejtag_loc1"), 1414 RTK_PIN_FUNC(SHIFT_LEFT(0x4, 18), "ve3_ejtag_loc2")), 1415 [RTD1619B_ISO_EJTAG_AUCPU1_LOC] = RTK_PIN_MUX(ejtag_aucpu1_loc, 0x124, GENMASK(23, 21), 1416 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 21), "aucpu1_ejtag_disable"), 1417 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 21), "aucpu1_ejtag_loc0"), 1418 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 21), "aucpu1_ejtag_loc1"), 1419 RTK_PIN_FUNC(SHIFT_LEFT(0x4, 21), "aucpu1_ejtag_loc2")), 1420 [RTD1619B_ISO_EJTAG_AUCPU0_LOC] = RTK_PIN_MUX(ejtag_aucpu0_loc, 0x124, GENMASK(26, 24), 1421 RTK_PIN_FUNC(SHIFT_LEFT(0x0, 24), "aucpu0_ejtag_disable"), 1422 RTK_PIN_FUNC(SHIFT_LEFT(0x1, 24), "aucpu0_ejtag_loc0"), 1423 RTK_PIN_FUNC(SHIFT_LEFT(0x2, 24), "aucpu0_ejtag_loc1"), 1424 RTK_PIN_FUNC(SHIFT_LEFT(0x4, 24), "aucpu0_ejtag_loc2")), 1425 }; 1426 1427 static const struct rtd_pin_config_desc rtd1619b_iso_configs[] = { 1428 [RTD1619B_ISO_GPIO_17] = RTK_PIN_CONFIG(gpio_17, 0x20, 0, 1, 2, 0, 3, 4, PADDRI_4_8), 1429 [RTD1619B_ISO_GPIO_19] = RTK_PIN_CONFIG(gpio_19, 0x20, 5, 1, 2, 0, 3, 4, PADDRI_4_8), 1430 [RTD1619B_ISO_GPIO_50] = RTK_PIN_CONFIG(gpio_50, 0x20, 10, 1, 2, 0, 3, 4, PADDRI_4_8), 1431 [RTD1619B_ISO_GPIO_21] = RTK_PIN_CONFIG(gpio_21, 0x20, 15, 1, 2, 0, 3, 4, PADDRI_4_8), 1432 [RTD1619B_ISO_GPIO_66] = RTK_PIN_CONFIG(gpio_66, 0x20, 20, 1, 2, 0, 3, 4, PADDRI_4_8), 1433 [RTD1619B_ISO_GPIO_67] = RTK_PIN_CONFIG(gpio_67, 0x20, 25, 1, 2, 0, 3, 4, PADDRI_4_8), 1434 [RTD1619B_ISO_GPIO_68] = RTK_PIN_CONFIG(gpio_68, 0x24, 0, 1, 2, 0, 3, 4, PADDRI_4_8), 1435 [RTD1619B_ISO_GPIO_69] = RTK_PIN_CONFIG(gpio_69, 0x24, 5, 1, 2, 0, 3, 4, PADDRI_4_8), 1436 [RTD1619B_ISO_GPIO_70] = RTK_PIN_CONFIG(gpio_70, 0x24, 10, 1, 2, 0, 3, 4, PADDRI_4_8), 1437 [RTD1619B_ISO_GPIO_71] = RTK_PIN_CONFIG(gpio_71, 0x24, 15, 1, 2, 0, 3, 4, PADDRI_4_8), 1438 [RTD1619B_ISO_GPIO_72] = RTK_PIN_CONFIG(gpio_72, 0x24, 20, 1, 2, 0, 3, 4, PADDRI_4_8), 1439 [RTD1619B_ISO_GPIO_73] = RTK_PIN_CONFIG(gpio_73, 0x24, 25, 1, 2, 0, 3, 4, PADDRI_4_8), 1440 [RTD1619B_ISO_GPIO_74] = RTK_PIN_CONFIG(gpio_74, 0x28, 0, 1, 2, 0, 3, 4, PADDRI_4_8), 1441 [RTD1619B_ISO_GPIO_75] = RTK_PIN_CONFIG(gpio_75, 0x28, 5, 1, 2, 0, 3, 4, PADDRI_4_8), 1442 [RTD1619B_ISO_GPIO_76] = RTK_PIN_CONFIG(gpio_76, 0x28, 10, 1, 2, 0, 3, 4, PADDRI_4_8), 1443 [RTD1619B_ISO_SPI_SI] = RTK_PIN_CONFIG(spi_si, 0x28, 15, 0, 1, 3, 2, 12, NA), 1444 [RTD1619B_ISO_SPI_SCK] = RTK_PIN_CONFIG(spi_sck, 0x2c, 0, 0, 1, 3, 2, 12, NA), 1445 [RTD1619B_ISO_SPI_CE_N] = RTK_PIN_CONFIG(spi_ce_n, 0x2c, 13, 0, 1, 3, 2, 12, NA), 1446 [RTD1619B_ISO_SPI_SO] = RTK_PIN_CONFIG(spi_so, 0x2c, 26, 0, 1, 3, 2, 12, NA), 1447 [RTD1619B_ISO_EMMC_CLK] = RTK_PIN_CONFIG(emmc_clk, 0x30, 7, 0, 1, 3, 2, 12, NA), 1448 [RTD1619B_ISO_EMMC_CMD] = RTK_PIN_CONFIG(emmc_cmd, 0x34, 0, 0, 1, 3, 2, 13, NA), 1449 [RTD1619B_ISO_EMMC_RST_N] = RTK_PIN_CONFIG(emmc_rst_n, 0x34, 14, 0, 1, 3, 2, 12, NA), 1450 [RTD1619B_ISO_EMMC_DD_SB] = RTK_PIN_CONFIG(emmc_dd_sb, 0x34, 27, 0, 1, 3, 2, 12, NA), 1451 [RTD1619B_ISO_EMMC_DATA_5] = RTK_PIN_CONFIG(emmc_data_5, 0x38, 8, 0, 1, 3, 2, 12, NA), 1452 [RTD1619B_ISO_EMMC_DATA_3] = RTK_PIN_CONFIG(emmc_data_3, 0x3c, 0, 0, 1, 3, 2, 12, NA), 1453 [RTD1619B_ISO_EMMC_DATA_4] = RTK_PIN_CONFIG(emmc_data_4, 0x3c, 13, 0, 1, 3, 2, 12, NA), 1454 [RTD1619B_ISO_EMMC_DATA_0] = RTK_PIN_CONFIG(emmc_data_0, 0x3c, 26, 0, 1, 3, 2, 12, NA), 1455 [RTD1619B_ISO_EMMC_DATA_1] = RTK_PIN_CONFIG(emmc_data_1, 0x40, 7, 0, 1, 3, 2, 12, NA), 1456 [RTD1619B_ISO_EMMC_DATA_2] = RTK_PIN_CONFIG(emmc_data_2, 0x44, 0, 0, 1, 3, 2, 12, NA), 1457 [RTD1619B_ISO_EMMC_DATA_7] = RTK_PIN_CONFIG(emmc_data_7, 0x44, 13, 0, 1, 3, 2, 12, NA), 1458 [RTD1619B_ISO_EMMC_DATA_6] = RTK_PIN_CONFIG(emmc_data_6, 0x44, 26, 0, 1, 3, 2, 12, NA), 1459 [RTD1619B_ISO_USB_CC1] = RTK_PIN_CONFIG(usb_cc1, 0x48, 7, NA, NA, 0, 1, 9, PADDRI_4_8), 1460 [RTD1619B_ISO_USB_CC2] = RTK_PIN_CONFIG(usb_cc2, 0x48, 10, NA, NA, 0, 1, 9, PADDRI_4_8), 1461 [RTD1619B_ISO_GPIO_26] = RTK_PIN_CONFIG(gpio_26, 0x48, 13, 1, 2, 0, 3, 4, PADDRI_4_8), 1462 [RTD1619B_ISO_GPIO_27] = RTK_PIN_CONFIG(gpio_27, 0x48, 18, 1, 2, 0, 3, 4, PADDRI_4_8), 1463 [RTD1619B_ISO_GPIO_28] = RTK_PIN_CONFIG(gpio_28, 0x48, 23, 1, 2, 0, 3, 4, PADDRI_4_8), 1464 [RTD1619B_ISO_GPIO_29] = RTK_PIN_CONFIG(gpio_29, 0x4c, 0, 1, 2, 0, 3, 4, PADDRI_4_8), 1465 [RTD1619B_ISO_GPIO_46] = RTK_PIN_CONFIG(gpio_46, 0x4c, 5, 1, 2, 0, 3, 4, PADDRI_4_8), 1466 [RTD1619B_ISO_GPIO_48] = RTK_PIN_CONFIG(gpio_48, 0x4c, 10, 1, 2, 0, 3, 4, PADDRI_4_8), 1467 [RTD1619B_ISO_GPIO_49] = RTK_PIN_CONFIG(gpio_49, 0x4c, 15, 1, 2, 0, 3, 4, PADDRI_4_8), 1468 [RTD1619B_ISO_GPIO_53] = RTK_PIN_CONFIG(gpio_53, 0x4c, 20, 1, 2, 0, 3, 4, PADDRI_4_8), 1469 [RTD1619B_ISO_GPIO_65] = RTK_PIN_CONFIG(gpio_65, 0x4c, 25, 1, 2, 0, 3, 4, PADDRI_4_8), 1470 [RTD1619B_ISO_GPIO_14] = RTK_PIN_CONFIG(gpio_14, 0x50, 0, 1, 2, 0, 3, 4, PADDRI_4_8), 1471 [RTD1619B_ISO_GPIO_15] = RTK_PIN_CONFIG(gpio_15, 0x50, 5, 1, 2, 0, 3, 4, PADDRI_4_8), 1472 [RTD1619B_ISO_GPIO_23] = RTK_PIN_CONFIG(gpio_23, 0x50, 10, 1, 2, 0, 3, 4, PADDRI_4_8), 1473 [RTD1619B_ISO_IR_RX] = RTK_PIN_CONFIG(ir_rx, 0x50, 20, 1, 2, 0, 3, 4, PADDRI_4_8), 1474 [RTD1619B_ISO_GPIO_57] = RTK_PIN_CONFIG(gpio_57, 0x50, 25, 1, 2, 0, 3, 4, PADDRI_4_8), 1475 [RTD1619B_ISO_GPIO_58] = RTK_PIN_CONFIG(gpio_58, 0x50, 30, 1, 2, 0, 3, 4, PADDRI_4_8), 1476 [RTD1619B_ISO_GPIO_59] = RTK_PIN_CONFIG(gpio_59, 0x54, 3, 1, 2, 0, 3, 4, PADDRI_4_8), 1477 [RTD1619B_ISO_GPIO_60] = RTK_PIN_CONFIG(gpio_60, 0x54, 8, 1, 2, 0, 3, 4, PADDRI_4_8), 1478 [RTD1619B_ISO_GPIO_61] = RTK_PIN_CONFIG(gpio_61, 0x54, 13, 1, 2, 0, 3, 4, PADDRI_4_8), 1479 [RTD1619B_ISO_GPIO_62] = RTK_PIN_CONFIG(gpio_62, 0x54, 18, 1, 2, 0, 3, 4, PADDRI_4_8), 1480 [RTD1619B_ISO_GPIO_63] = RTK_PIN_CONFIG(gpio_63, 0x54, 23, 1, 2, 0, 3, 4, PADDRI_4_8), 1481 [RTD1619B_ISO_GPIO_64] = RTK_PIN_CONFIG(gpio_64, 0x58, 0, 1, 2, 0, 3, 4, PADDRI_4_8), 1482 [RTD1619B_ISO_UR0_TX] = RTK_PIN_CONFIG(ur0_tx, 0x58, 5, 1, 2, 0, 3, 4, PADDRI_4_8), 1483 [RTD1619B_ISO_UR0_RX] = RTK_PIN_CONFIG(ur0_rx, 0x58, 13, 1, 2, 0, 3, 4, PADDRI_4_8), 1484 [RTD1619B_ISO_GPIO_12] = RTK_PIN_CONFIG(gpio_12, 0x58, 18, 1, 2, 0, 3, 4, PADDRI_4_8), 1485 [RTD1619B_ISO_GPIO_13] = RTK_PIN_CONFIG(gpio_13, 0x58, 23, 1, 2, 0, 3, 4, PADDRI_4_8), 1486 [RTD1619B_ISO_GPIO_30] = RTK_PIN_CONFIG(gpio_30, 0x58, 28, 1, 2, 0, 3, 4, PADDRI_4_8), 1487 [RTD1619B_ISO_GPIO_7] = RTK_PIN_CONFIG(gpio_7, 0x5c, 1, 1, 2, 0, 3, 4, PADDRI_4_8), 1488 [RTD1619B_ISO_GPIO_16] = RTK_PIN_CONFIG(gpio_16, 0x5c, 6, 1, 2, 0, 3, 4, PADDRI_4_8), 1489 [RTD1619B_ISO_GPIO_18] = RTK_PIN_CONFIG(gpio_18, 0x5c, 11, 1, 2, 0, 3, 4, PADDRI_4_8), 1490 [RTD1619B_ISO_GPIO_20] = RTK_PIN_CONFIG(gpio_20, 0x5c, 16, 1, 2, 0, 3, 4, PADDRI_4_8), 1491 [RTD1619B_ISO_GPIO_22] = RTK_PIN_CONFIG(gpio_22, 0x5c, 21, 1, 2, 0, 3, 4, PADDRI_4_8), 1492 [RTD1619B_ISO_GPIO_31] = RTK_PIN_CONFIG(gpio_31, 0x5c, 26, 1, 2, 0, 3, 4, PADDRI_4_8), 1493 [RTD1619B_ISO_GPIO_47] = RTK_PIN_CONFIG(gpio_47, 0x60, 12, 1, 2, 0, 3, 4, PADDRI_4_8), 1494 [RTD1619B_ISO_GPIO_25] = RTK_PIN_CONFIG(gpio_25, 0x60, 17, 1, 2, 0, 3, 4, PADDRI_4_8), 1495 [RTD1619B_ISO_GPIO_6] = RTK_PIN_CONFIG(gpio_6, 0x60, 22, 1, 2, 0, 3, 4, PADDRI_4_8), 1496 [RTD1619B_ISO_GPIO_5] = RTK_PIN_CONFIG(gpio_5, 0x60, 27, 1, 2, 0, 3, 4, PADDRI_4_8), 1497 [RTD1619B_ISO_GPIO_4] = RTK_PIN_CONFIG(gpio_4, 0x64, 0, 1, 2, 0, 3, 4, PADDRI_4_8), 1498 [RTD1619B_ISO_GPIO_3] = RTK_PIN_CONFIG(gpio_3, 0x64, 5, 1, 2, 0, 3, 4, PADDRI_4_8), 1499 [RTD1619B_ISO_GPIO_2] = RTK_PIN_CONFIG(gpio_2, 0x64, 10, 1, 2, 0, 3, 4, PADDRI_4_8), 1500 [RTD1619B_ISO_GPIO_1] = RTK_PIN_CONFIG(gpio_1, 0x64, 15, 1, 2, 0, 3, 4, PADDRI_4_8), 1501 [RTD1619B_ISO_GPIO_0] = RTK_PIN_CONFIG(gpio_0, 0x64, 20, 1, 2, 0, 3, 4, PADDRI_4_8), 1502 [RTD1619B_ISO_GPIO_52] = RTK_PIN_CONFIG(gpio_52, 0x64, 25, 1, 2, 0, 3, 4, PADDRI_4_8), 1503 [RTD1619B_ISO_GPIO_35] = RTK_PIN_CONFIG(gpio_35, 0x68, 0, 1, 2, 0, 3, 4, PADDRI_4_8), 1504 [RTD1619B_ISO_GPIO_34] = RTK_PIN_CONFIG(gpio_34, 0x68, 5, 1, 2, 0, 3, 4, PADDRI_4_8), 1505 [RTD1619B_ISO_GPIO_40] = RTK_PIN_CONFIG(gpio_40, 0x68, 10, 0, 1, 3, 2, 12, NA), 1506 [RTD1619B_ISO_GPIO_41] = RTK_PIN_CONFIG(gpio_41, 0x6c, 0, 0, 1, 3, 2, 12, NA), 1507 [RTD1619B_ISO_GPIO_42] = RTK_PIN_CONFIG(gpio_42, 0x6c, 13, 0, 1, 3, 2, 12, NA), 1508 [RTD1619B_ISO_GPIO_43] = RTK_PIN_CONFIG(gpio_43, 0x70, 0, 0, 1, 3, 2, 12, NA), 1509 [RTD1619B_ISO_GPIO_44] = RTK_PIN_CONFIG(gpio_44, 0x70, 13, 0, 1, 3, 2, 12, NA), 1510 [RTD1619B_ISO_GPIO_45] = RTK_PIN_CONFIG(gpio_45, 0x70, 26, 0, 1, 3, 2, 12, NA), 1511 [RTD1619B_ISO_GPIO_8] = RTK_PIN_CONFIG(gpio_8, 0x74, 7, 1, 2, 0, 3, 4, PADDRI_4_8), 1512 [RTD1619B_ISO_GPIO_9] = RTK_PIN_CONFIG(gpio_9, 0x74, 12, 1, 2, 0, 3, 4, PADDRI_4_8), 1513 [RTD1619B_ISO_GPIO_10] = RTK_PIN_CONFIG(gpio_10, 0x74, 17, 1, 2, 0, 3, 4, PADDRI_4_8), 1514 [RTD1619B_ISO_GPIO_11] = RTK_PIN_CONFIG(gpio_11, 0x74, 22, 1, 2, 0, 3, 4, PADDRI_4_8), 1515 [RTD1619B_ISO_HIF_RDY] = RTK_PIN_CONFIG(hif_rdy, 0x78, 0, 0, 1, 3, 2, 12, NA), 1516 [RTD1619B_ISO_HIF_CLK] = RTK_PIN_CONFIG(hif_clk, 0x78, 13, 0, 1, 3, 2, 12, NA), 1517 [RTD1619B_ISO_GPIO_32] = RTK_PIN_CONFIG(gpio_32, 0x78, 26, 0, 1, 3, 2, 12, NA), 1518 [RTD1619B_ISO_GPIO_33] = RTK_PIN_CONFIG(gpio_33, 0x7c, 7, 0, 1, 3, 2, 12, NA), 1519 [RTD1619B_ISO_HIF_DATA] = RTK_PIN_CONFIG(hif_data, 0x80, 0, 0, 1, 3, 2, 12, NA), 1520 [RTD1619B_ISO_HIF_EN] = RTK_PIN_CONFIG(hif_en, 0x80, 13, 0, 1, 3, 2, 12, NA), 1521 }; 1522 1523 static const struct rtd_pin_sconfig_desc rtd1619b_iso_sconfigs[] = { 1524 RTK_PIN_SCONFIG(spi_si, 0x28, 18, 3, 21, 3, 24, 3), 1525 RTK_PIN_SCONFIG(spi_sck, 0x2c, 3, 3, 6, 3, 9, 3), 1526 RTK_PIN_SCONFIG(spi_ce_n, 0x2c, 16, 3, 19, 3, 22, 3), 1527 RTK_PIN_SCONFIG(spi_so, 0x2c, 29, 3, 32, 3, 35, 3), 1528 RTK_PIN_SCONFIG(emmc_clk, 0x30, 10, 3, 13, 3, 16, 3), 1529 RTK_PIN_SCONFIG(emmc_cmd, 0x34, 3, 3, 6, 3, 9, 3), 1530 RTK_PIN_SCONFIG(emmc_rst_n, 0x34, 17, 3, 20, 3, 23, 3), 1531 RTK_PIN_SCONFIG(emmc_dd_sb, 0x34, 30, 3, 33, 3, 36, 3), 1532 RTK_PIN_SCONFIG(emmc_data_5, 0x38, 11, 3, 14, 3, 17, 3), 1533 RTK_PIN_SCONFIG(emmc_data_3, 0x3c, 3, 3, 6, 3, 9, 3), 1534 RTK_PIN_SCONFIG(emmc_data_4, 0x3c, 16, 3, 19, 3, 22, 3), 1535 RTK_PIN_SCONFIG(emmc_data_0, 0x3c, 29, 3, 32, 3, 35, 3), 1536 RTK_PIN_SCONFIG(emmc_data_1, 0x40, 10, 3, 13, 3, 16, 3), 1537 RTK_PIN_SCONFIG(emmc_data_2, 0x44, 3, 3, 6, 3, 9, 3), 1538 RTK_PIN_SCONFIG(emmc_data_7, 0x44, 16, 3, 19, 3, 22, 3), 1539 RTK_PIN_SCONFIG(emmc_data_6, 0x44, 29, 3, 32, 3, 35, 3), 1540 RTK_PIN_SCONFIG(gpio_40, 0x68, 13, 3, 16, 3, 19, 3), 1541 RTK_PIN_SCONFIG(gpio_41, 0x6c, 3, 3, 6, 3, 9, 3), 1542 RTK_PIN_SCONFIG(gpio_42, 0x6c, 16, 3, 19, 3, 22, 3), 1543 RTK_PIN_SCONFIG(gpio_43, 0x70, 3, 3, 6, 3, 9, 3), 1544 RTK_PIN_SCONFIG(gpio_44, 0x70, 16, 3, 19, 3, 22, 3), 1545 RTK_PIN_SCONFIG(gpio_45, 0x70, 29, 3, 32, 3, 35, 3), 1546 RTK_PIN_SCONFIG(hif_rdy, 0x78, 3, 3, 6, 3, 9, 3), 1547 RTK_PIN_SCONFIG(hif_clk, 0x78, 16, 3, 19, 3, 22, 3), 1548 RTK_PIN_SCONFIG(gpio_32, 0x78, 29, 3, 32, 3, 35, 3), 1549 RTK_PIN_SCONFIG(gpio_33, 0x7c, 10, 3, 13, 3, 16, 3), 1550 RTK_PIN_SCONFIG(hif_data, 0x80, 3, 3, 6, 3, 9, 3), 1551 RTK_PIN_SCONFIG(hif_en, 0x80, 16, 3, 19, 3, 22, 3), 1552 }; 1553 1554 static const struct rtd_pinctrl_desc rtd1619b_iso_pinctrl_desc = { 1555 .pins = rtd1619b_iso_pins, 1556 .num_pins = ARRAY_SIZE(rtd1619b_iso_pins), 1557 .groups = rtd1619b_pin_groups, 1558 .num_groups = ARRAY_SIZE(rtd1619b_pin_groups), 1559 .functions = rtd1619b_pin_functions, 1560 .num_functions = ARRAY_SIZE(rtd1619b_pin_functions), 1561 .muxes = rtd1619b_iso_muxes, 1562 .num_muxes = ARRAY_SIZE(rtd1619b_iso_muxes), 1563 .configs = rtd1619b_iso_configs, 1564 .num_configs = ARRAY_SIZE(rtd1619b_iso_configs), 1565 .sconfigs = rtd1619b_iso_sconfigs, 1566 .num_sconfigs = ARRAY_SIZE(rtd1619b_iso_sconfigs), 1567 }; 1568 1569 static int rtd1619b_pinctrl_probe(struct platform_device *pdev) 1570 { 1571 return rtd_pinctrl_probe(pdev, &rtd1619b_iso_pinctrl_desc); 1572 } 1573 1574 static const struct of_device_id rtd1619b_pinctrl_of_match[] = { 1575 { .compatible = "realtek,rtd1619b-pinctrl", }, 1576 {}, 1577 }; 1578 1579 static struct platform_driver rtd1619b_pinctrl_driver = { 1580 .driver = { 1581 .name = "rtd1619b-pinctrl", 1582 .of_match_table = rtd1619b_pinctrl_of_match, 1583 }, 1584 .probe = rtd1619b_pinctrl_probe, 1585 }; 1586 1587 static int __init rtd1619b_pinctrl_init(void) 1588 { 1589 return platform_driver_register(&rtd1619b_pinctrl_driver); 1590 } 1591 arch_initcall(rtd1619b_pinctrl_init); 1592 1593 static void __exit rtd1619b_pinctrl_exit(void) 1594 { 1595 platform_driver_unregister(&rtd1619b_pinctrl_driver); 1596 } 1597 module_exit(rtd1619b_pinctrl_exit); 1598 1599 MODULE_LICENSE("GPL"); 1600 MODULE_AUTHOR("Realtek Semiconductor Corporation"); 1601 MODULE_DESCRIPTION("Realtek DHC SoC RTD1619B pinctrl driver"); 1602