Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'pinctrl-v4.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl

Pull pin control updates from Linus Walleij:
"This is the bulk of pin control changes for the v4.9 cycle.

General improvements:

- nicer debugfs output with one pin/config pair per line.

- continued efforts to strictify module vs bool.

- constification and similar from Coccinelle engineers.

- return error from pinctrl_bind_pins()

- pulling in the ability to selectively disable mapping of unusable
IRQs from the GPIO subsystem.

New drivers:

- new driver for the Aspeed pin controller family: AST2400 (G4) and
AST2500 (G5) are supported. These are used by OpenBMC on the IBM
Witherspoon platform.

- new subdriver for the Allwinner sunxi GR8.

Driver improvements:

- drop default IRQ trigger types assigned during IRQ mapping on AT91
and Nomadik. This error was identified by improvements in the IRQ
core by Marc Zyngier.

- active high/low types on the GPIO IRQs for the ST pin controller.

- IRQ support on GPIOs on the STM32 pin controller.

- Renesas Super-H/ARM sh-pfc: continued massive developments.

- misc MXC improvements.

- SPDIF on the Allwiner A31 SoC

- IR remote and SPI NOR flash, NAND flash, I2C pins on the AMLogic
SoC.

- PWM pins on the Meson.

- do not map unusable IRQs (taken by BIOS) on the Intel Cherryview.

- add GPIO IRQ wakeup support to the Intel driver so we can wake up
from button pushes.

Deprecation:

- delete the obsolete STiH415/6 SoC support"

* tag 'pinctrl-v4.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (75 commits)
pinctrl: qcom: fix masking of pinmux functions
pinctrl: intel: Configure GPIO chip IRQ as wakeup interrupts
pinctrl: cherryview: Convert to use devm_gpiochip_add_data()
pinctrl: cherryview: Do not add all southwest and north GPIOs to IRQ domain
gpiolib: Make it possible to exclude GPIOs from IRQ domain
pinctrl: nomadik: don't default-flag IRQs as falling
pinctrl: st: Remove obsolete platforms from pinctrl-st dt doc
pinctrl: st: Remove STiH415/6 SoC pinctrl driver support.
pinctrl: amlogic: gxbb: add i2c pins
pinctrl: amlogic: gxbb: add nand pins
pinctrl: stm32: add IRQ_DOMAIN_HIERARCHY dependency
pinctrl: amlogic: gxbb: add spi nor pins
pinctrl: sh-pfc: r8a7794: Implement voltage switching for SDHI
pinctrl: sh-pfc: r8a7791: Implement voltage switching for SDHI
pinctrl: sh-pfc: Add PORT_GP_24 helper macro
pinctrl: Fix "st,syscfg" definition for STM32 pinctrl
driver: base: pinctrl: return error from pinctrl_bind_pins()
pinctrl: meson-gxbb: add the missing SDIO interrupt pin
pinctrl: aspeed: fix regmap error handling
pinctrl: mediatek: constify gpio_chip structures
...

+10355 -517
+1
Documentation/devicetree/bindings/pinctrl/allwinner,sunxi-pinctrl.txt
··· 23 23 "allwinner,sun8i-h3-pinctrl" 24 24 "allwinner,sun8i-h3-r-pinctrl" 25 25 "allwinner,sun50i-a64-pinctrl" 26 + "nextthing,gr8-pinctrl" 26 27 27 28 - reg: Should contain the register physical address and length for the 28 29 pin controller.
+65
Documentation/devicetree/bindings/pinctrl/pinctrl-aspeed.txt
··· 1 + Aspeed Pin Controllers 2 + ---------------------- 3 + 4 + The Aspeed SoCs vary in functionality inside a generation but have a common mux 5 + device register layout. 6 + 7 + Required properties: 8 + - compatible : Should be any one of the following: 9 + "aspeed,ast2400-pinctrl" 10 + "aspeed,g4-pinctrl" 11 + "aspeed,ast2500-pinctrl" 12 + "aspeed,g5-pinctrl" 13 + 14 + The pin controller node should be a child of a syscon node with the required 15 + property: 16 + - compatible: "syscon", "simple-mfd" 17 + 18 + Refer to the the bindings described in 19 + Documentation/devicetree/bindings/mfd/syscon.txt 20 + 21 + Subnode Format 22 + -------------- 23 + 24 + The required properties of child nodes are (as defined in pinctrl-bindings): 25 + - function 26 + - groups 27 + 28 + Each function has only one associated pin group. Each group is named by its 29 + function. The following values for the function and groups properties are 30 + supported: 31 + 32 + aspeed,ast2400-pinctrl, aspeed,g4-pinctrl: 33 + 34 + ACPI BMCINT DDCCLK DDCDAT FLACK FLBUSY FLWP GPID0 GPIE0 GPIE2 GPIE4 GPIE6 I2C10 35 + I2C11 I2C12 I2C13 I2C3 I2C4 I2C5 I2C6 I2C7 I2C8 I2C9 LPCPD LPCPME LPCSMI MDIO1 36 + MDIO2 NCTS1 NCTS3 NCTS4 NDCD1 NDCD3 NDCD4 NDSR1 NDSR3 NDTR1 NDTR3 NRI1 NRI3 37 + NRI4 NRTS1 NRTS3 PWM0 PWM1 PWM2 PWM3 PWM4 PWM5 PWM6 PWM7 RGMII1 RMII1 ROM16 38 + ROM8 ROMCS1 ROMCS2 ROMCS3 ROMCS4 RXD1 RXD3 RXD4 SD1 SGPMI SIOPBI SIOPBO TIMER3 39 + TIMER5 TIMER6 TIMER7 TIMER8 TXD1 TXD3 TXD4 UART6 VGAHS VGAVS VPI18 VPI24 VPI30 40 + VPO12 VPO24 41 + 42 + aspeed,ast2500-pinctrl, aspeed,g5-pinctrl: 43 + 44 + GPID0 GPID2 GPIE0 I2C10 I2C11 I2C12 I2C13 I2C14 I2C3 I2C4 I2C5 I2C6 I2C7 I2C8 45 + I2C9 MAC1LINK MDIO1 MDIO2 OSCCLK PEWAKE PWM0 PWM1 PWM2 PWM3 PWM4 PWM5 PWM6 PWM7 46 + RGMII1 RGMII2 RMII1 RMII2 SD1 SPI1 TIMER4 TIMER5 TIMER6 TIMER7 TIMER8 47 + 48 + Examples: 49 + 50 + syscon: scu@1e6e2000 { 51 + compatible = "syscon", "simple-mfd"; 52 + reg = <0x1e6e2000 0x1a8>; 53 + 54 + pinctrl: pinctrl { 55 + compatible = "aspeed,g4-pinctrl"; 56 + 57 + pinctrl_i2c3_default: i2c3_default { 58 + function = "I2C3"; 59 + groups = "I2C3"; 60 + }; 61 + }; 62 + }; 63 + 64 + Please refer to pinctrl-bindings.txt in this directory for details of the 65 + common pinctrl bindings used by client devices.
+20 -17
Documentation/devicetree/bindings/pinctrl/pinctrl-st.txt
··· 30 30 31 31 Pin controller node: 32 32 Required properties: 33 - - compatible : should be "st,<SOC>-<pio-block>-pinctrl" 34 - like st,stih415-sbc-pinctrl, st,stih415-front-pinctrl and so on. 33 + - compatible : should be "st,stih407-<pio-block>-pinctrl" 35 34 - st,syscfg : Should be a phandle of the syscfg node. 36 35 - st,retime-pin-mask : Should be mask to specify which pins can be retimed. 37 36 If the property is not present, it is assumed that all the pins in the ··· 49 50 GPIO controller/bank node. 50 51 Required properties: 51 52 - gpio-controller : Indicates this device is a GPIO controller 52 - - #gpio-cells : Should be one. The first cell is the pin number. 53 + - #gpio-cells : Must be two. 54 + - First cell: specifies the pin number inside the controller 55 + - Second cell: specifies whether the pin is logically inverted. 56 + - 0 = active high 57 + - 1 = active low 53 58 - st,bank-name : Should be a name string for this bank as specified in 54 59 datasheet. 55 60 ··· 79 76 80 77 Example: 81 78 pin-controller-sbc { 82 - #address-cells = <1>; 83 - #size-cells = <1>; 84 - compatible = "st,stih415-sbc-pinctrl"; 85 - st,syscfg = <&syscfg_sbc>; 86 - reg = <0xfe61f080 0x4>; 87 - reg-names = "irqmux"; 88 - interrupts = <GIC_SPI 180 IRQ_TYPE_LEVEL_HIGH>; 89 - interrupt-names = "irqmux"; 90 - ranges = <0 0xfe610000 0x5000>; 79 + #address-cells = <1>; 80 + #size-cells = <1>; 81 + compatible = "st,stih407-sbc-pinctrl"; 82 + st,syscfg = <&syscfg_sbc>; 83 + reg = <0x0961f080 0x4>; 84 + reg-names = "irqmux"; 85 + interrupts = <GIC_SPI 188 IRQ_TYPE_NONE>; 86 + interrupt-names = "irqmux"; 87 + ranges = <0 0x09610000 0x6000>; 91 88 92 - PIO0: gpio@fe610000 { 89 + pio0: gpio@09610000 { 93 90 gpio-controller; 94 - #gpio-cells = <1>; 91 + #gpio-cells = <2>; 95 92 interrupt-controller; 96 93 #interrupt-cells = <2>; 97 - reg = <0 0x100>; 98 - st,bank-name = "PIO0"; 94 + reg = <0x0 0x100>; 95 + st,bank-name = "PIO0"; 99 96 }; 100 97 ... 101 98 pin-functions nodes follow... ··· 165 162 166 163 sdhci0:sdhci@fe810000{ 167 164 ... 168 - interrupt-parent = <&PIO3>; 165 + interrupt-parent = <&pio3>; 169 166 #interrupt-cells = <2>; 170 167 interrupts = <3 IRQ_TYPE_LEVEL_HIGH>; /* Interrupt line via PIO3-3 */ 171 168 interrupt-names = "card-detect";
+4 -1
Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.txt
··· 17 17 "qcom,pm8994-gpio" 18 18 "qcom,pma8084-gpio" 19 19 20 + And must contain either "qcom,spmi-gpio" or "qcom,ssbi-gpio" 21 + if the device is on an spmi bus or an ssbi bus respectively 22 + 20 23 - reg: 21 24 Usage: required 22 25 Value type: <prop-encoded-array> ··· 186 183 Example: 187 184 188 185 pm8921_gpio: gpio@150 { 189 - compatible = "qcom,pm8921-gpio"; 186 + compatible = "qcom,pm8921-gpio", "qcom,ssbi-gpio"; 190 187 reg = <0x150 0x160>; 191 188 interrupts = <192 1>, <193 1>, <194 1>, 192 189 <195 1>, <196 1>, <197 1>,
+4 -1
Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.txt
··· 19 19 "qcom,pm8994-mpp", 20 20 "qcom,pma8084-mpp", 21 21 22 + And must contain either "qcom,spmi-mpp" or "qcom,ssbi-mpp" 23 + if the device is on an spmi bus or an ssbi bus respectively. 24 + 22 25 - reg: 23 26 Usage: required 24 27 Value type: <prop-encoded-array> ··· 161 158 Example: 162 159 163 160 mpps@a000 { 164 - compatible = "qcom,pm8841-mpp"; 161 + compatible = "qcom,pm8841-mpp", "qcom,spmi-mpp"; 165 162 reg = <0xa000>; 166 163 gpio-controller; 167 164 #gpio-cells = <2>;
+2
Documentation/devicetree/bindings/pinctrl/renesas,pfc-pinctrl.txt
··· 17 17 - "renesas,pfc-r8a7779": for R8A7779 (R-Car H1) compatible pin-controller. 18 18 - "renesas,pfc-r8a7790": for R8A7790 (R-Car H2) compatible pin-controller. 19 19 - "renesas,pfc-r8a7791": for R8A7791 (R-Car M2-W) compatible pin-controller. 20 + - "renesas,pfc-r8a7792": for R8A7792 (R-Car V2H) compatible pin-controller. 20 21 - "renesas,pfc-r8a7793": for R8A7793 (R-Car M2-N) compatible pin-controller. 21 22 - "renesas,pfc-r8a7794": for R8A7794 (R-Car E2) compatible pin-controller. 22 23 - "renesas,pfc-r8a7795": for R8A7795 (R-Car H3) compatible pin-controller. 24 + - "renesas,pfc-r8a7796": for R8A7796 (R-Car M3-W) compatible pin-controller. 23 25 - "renesas,pfc-sh73a0": for SH73A0 (SH-Mobile AG5) compatible pin-controller. 24 26 25 27 - reg: Base address and length of each memory resource used by the pin
+5
Documentation/devicetree/bindings/pinctrl/st,stm32-pinctrl.txt
··· 14 14 - #size-cells : The value of this property must be 1 15 15 - ranges : defines mapping between pin controller node (parent) to 16 16 gpio-bank node (children). 17 + - interrupt-parent: phandle of the interrupt parent to which the external 18 + GPIO interrupts are forwarded to. 19 + - st,syscfg: Should be phandle/offset pair. The phandle to the syscon node 20 + which includes IRQ mux selection register, and the offset of the IRQ mux 21 + selection register. 17 22 - pins-are-numbered: Specify the subnodes are using numbered pinmux to 18 23 specify pins. 19 24
+6
Documentation/gpio/driver.txt
··· 262 262 to the container using container_of(). 263 263 (See Documentation/driver-model/design-patterns.txt) 264 264 265 + If there is a need to exclude certain GPIOs from the IRQ domain, one can 266 + set .irq_need_valid_mask of the gpiochip before gpiochip_add_data() is 267 + called. This allocates .irq_valid_mask with as many bits set as there are 268 + GPIOs in the chip. Drivers can exclude GPIOs by clearing bits from this 269 + mask. The mask must be filled in before gpiochip_irqchip_add() is called. 270 + 265 271 * gpiochip_set_chained_irqchip(): sets up a chained irq handler for a 266 272 gpio_chip from a parent IRQ and passes the struct gpio_chip* as handler 267 273 data. (Notice handler data, since the irqchip data is likely used by the
+8 -4
drivers/base/pinctrl.c
··· 91 91 devm_kfree(dev, dev->pins); 92 92 dev->pins = NULL; 93 93 94 - /* Only return deferrals */ 95 - if (ret != -EPROBE_DEFER) 96 - ret = 0; 94 + /* Return deferrals */ 95 + if (ret == -EPROBE_DEFER) 96 + return ret; 97 + /* Return serious errors */ 98 + if (ret == -EINVAL) 99 + return ret; 100 + /* We ignore errors like -ENOENT meaning no pinctrl state */ 97 101 98 - return ret; 102 + return 0; 99 103 }
+6 -1
drivers/gpio/gpio-mxc.c
··· 458 458 if (err) 459 459 goto out_bgio; 460 460 461 + if (of_property_read_bool(np, "gpio-ranges")) { 462 + port->gc.request = gpiochip_generic_request; 463 + port->gc.free = gpiochip_generic_free; 464 + } 465 + 461 466 port->gc.to_irq = mxc_gpio_to_irq; 462 467 port->gc.base = (pdev->id < 0) ? of_alias_get_id(np, "gpio") * 32 : 463 468 pdev->id * 32; ··· 515 510 { 516 511 return platform_driver_register(&mxc_gpio_driver); 517 512 } 518 - postcore_initcall(gpio_mxc_init); 513 + subsys_initcall(gpio_mxc_init); 519 514 520 515 MODULE_AUTHOR("Freescale Semiconductor, " 521 516 "Daniel Mack <danielncaiaq.de>, "
+63 -3
drivers/gpio/gpiolib.c
··· 71 71 72 72 static void gpiochip_free_hogs(struct gpio_chip *chip); 73 73 static void gpiochip_irqchip_remove(struct gpio_chip *gpiochip); 74 + static int gpiochip_irqchip_init_valid_mask(struct gpio_chip *gpiochip); 75 + static void gpiochip_irqchip_free_valid_mask(struct gpio_chip *gpiochip); 74 76 75 77 static bool gpiolib_initialized; 76 78 ··· 1169 1167 if (status) 1170 1168 goto err_remove_from_list; 1171 1169 1170 + status = gpiochip_irqchip_init_valid_mask(chip); 1171 + if (status) 1172 + goto err_remove_from_list; 1173 + 1172 1174 status = of_gpiochip_add(chip); 1173 1175 if (status) 1174 1176 goto err_remove_chip; ··· 1198 1192 acpi_gpiochip_remove(chip); 1199 1193 gpiochip_free_hogs(chip); 1200 1194 of_gpiochip_remove(chip); 1195 + gpiochip_irqchip_free_valid_mask(chip); 1201 1196 err_remove_from_list: 1202 1197 spin_lock_irqsave(&gpio_lock, flags); 1203 1198 list_del(&gdev->list); ··· 1408 1401 * The following is irqchip helper code for gpiochips. 1409 1402 */ 1410 1403 1404 + static int gpiochip_irqchip_init_valid_mask(struct gpio_chip *gpiochip) 1405 + { 1406 + int i; 1407 + 1408 + if (!gpiochip->irq_need_valid_mask) 1409 + return 0; 1410 + 1411 + gpiochip->irq_valid_mask = kcalloc(BITS_TO_LONGS(gpiochip->ngpio), 1412 + sizeof(long), GFP_KERNEL); 1413 + if (!gpiochip->irq_valid_mask) 1414 + return -ENOMEM; 1415 + 1416 + /* Assume by default all GPIOs are valid */ 1417 + for (i = 0; i < gpiochip->ngpio; i++) 1418 + set_bit(i, gpiochip->irq_valid_mask); 1419 + 1420 + return 0; 1421 + } 1422 + 1423 + static void gpiochip_irqchip_free_valid_mask(struct gpio_chip *gpiochip) 1424 + { 1425 + kfree(gpiochip->irq_valid_mask); 1426 + gpiochip->irq_valid_mask = NULL; 1427 + } 1428 + 1429 + static bool gpiochip_irqchip_irq_valid(const struct gpio_chip *gpiochip, 1430 + unsigned int offset) 1431 + { 1432 + /* No mask means all valid */ 1433 + if (likely(!gpiochip->irq_valid_mask)) 1434 + return true; 1435 + return test_bit(offset, gpiochip->irq_valid_mask); 1436 + } 1437 + 1411 1438 /** 1412 1439 * gpiochip_set_chained_irqchip() - sets a chained irqchip to a gpiochip 1413 1440 * @gpiochip: the gpiochip to set the irqchip chain to ··· 1483 1442 } 1484 1443 1485 1444 /* Set the parent IRQ for all affected IRQs */ 1486 - for (offset = 0; offset < gpiochip->ngpio; offset++) 1445 + for (offset = 0; offset < gpiochip->ngpio; offset++) { 1446 + if (!gpiochip_irqchip_irq_valid(gpiochip, offset)) 1447 + continue; 1487 1448 irq_set_parent(irq_find_mapping(gpiochip->irqdomain, offset), 1488 1449 parent_irq); 1450 + } 1489 1451 } 1490 1452 EXPORT_SYMBOL_GPL(gpiochip_set_chained_irqchip); 1491 1453 ··· 1595 1551 1596 1552 /* Remove all IRQ mappings and delete the domain */ 1597 1553 if (gpiochip->irqdomain) { 1598 - for (offset = 0; offset < gpiochip->ngpio; offset++) 1554 + for (offset = 0; offset < gpiochip->ngpio; offset++) { 1555 + if (!gpiochip_irqchip_irq_valid(gpiochip, offset)) 1556 + continue; 1599 1557 irq_dispose_mapping( 1600 1558 irq_find_mapping(gpiochip->irqdomain, offset)); 1559 + } 1601 1560 irq_domain_remove(gpiochip->irqdomain); 1602 1561 } 1603 1562 ··· 1609 1562 gpiochip->irqchip->irq_release_resources = NULL; 1610 1563 gpiochip->irqchip = NULL; 1611 1564 } 1565 + 1566 + gpiochip_irqchip_free_valid_mask(gpiochip); 1612 1567 } 1613 1568 1614 1569 /** ··· 1646 1597 struct lock_class_key *lock_key) 1647 1598 { 1648 1599 struct device_node *of_node; 1600 + bool irq_base_set = false; 1649 1601 unsigned int offset; 1650 1602 unsigned irq_base = 0; 1651 1603 ··· 1696 1646 * necessary to allocate descriptors for all IRQs. 1697 1647 */ 1698 1648 for (offset = 0; offset < gpiochip->ngpio; offset++) { 1649 + if (!gpiochip_irqchip_irq_valid(gpiochip, offset)) 1650 + continue; 1699 1651 irq_base = irq_create_mapping(gpiochip->irqdomain, offset); 1700 - if (offset == 0) 1652 + if (!irq_base_set) { 1701 1653 /* 1702 1654 * Store the base into the gpiochip to be used when 1703 1655 * unmapping the irqs. 1704 1656 */ 1705 1657 gpiochip->irq_base = irq_base; 1658 + irq_base_set = true; 1659 + } 1706 1660 } 1707 1661 1708 1662 acpi_gpiochip_request_interrupts(gpiochip); ··· 1718 1664 #else /* CONFIG_GPIOLIB_IRQCHIP */ 1719 1665 1720 1666 static void gpiochip_irqchip_remove(struct gpio_chip *gpiochip) {} 1667 + static inline int gpiochip_irqchip_init_valid_mask(struct gpio_chip *gpiochip) 1668 + { 1669 + return 0; 1670 + } 1671 + static inline void gpiochip_irqchip_free_valid_mask(struct gpio_chip *gpiochip) 1672 + { } 1721 1673 1722 1674 #endif /* CONFIG_GPIOLIB_IRQCHIP */ 1723 1675
+1
drivers/pinctrl/Kconfig
··· 254 254 help 255 255 This selects the pinctrl driver for Xilinx Zynq. 256 256 257 + source "drivers/pinctrl/aspeed/Kconfig" 257 258 source "drivers/pinctrl/bcm/Kconfig" 258 259 source "drivers/pinctrl/berlin/Kconfig" 259 260 source "drivers/pinctrl/freescale/Kconfig"
+1
drivers/pinctrl/Makefile
··· 37 37 obj-$(CONFIG_PINCTRL_ST) += pinctrl-st.o 38 38 obj-$(CONFIG_PINCTRL_ZYNQ) += pinctrl-zynq.o 39 39 40 + obj-$(CONFIG_ARCH_ASPEED) += aspeed/ 40 41 obj-y += bcm/ 41 42 obj-$(CONFIG_PINCTRL_BERLIN) += berlin/ 42 43 obj-y += freescale/
+24
drivers/pinctrl/aspeed/Kconfig
··· 1 + config PINCTRL_ASPEED 2 + bool 3 + depends on (ARCH_ASPEED || COMPILE_TEST) && OF 4 + depends on MFD_SYSCON 5 + select PINMUX 6 + select PINCONF 7 + select GENERIC_PINCONF 8 + select REGMAP_MMIO 9 + 10 + config PINCTRL_ASPEED_G4 11 + bool "Aspeed G4 SoC pin control" 12 + depends on (MACH_ASPEED_G4 || COMPILE_TEST) && OF 13 + select PINCTRL_ASPEED 14 + help 15 + Say Y here to enable pin controller support for Aspeed's 4th 16 + generation SoCs. GPIO is provided by a separate GPIO driver. 17 + 18 + config PINCTRL_ASPEED_G5 19 + bool "Aspeed G5 SoC pin control" 20 + depends on (MACH_ASPEED_G5 || COMPILE_TEST) && OF 21 + select PINCTRL_ASPEED 22 + help 23 + Say Y here to enable pin controller support for Aspeed's 5th 24 + generation SoCs. GPIO is provided by a separate GPIO driver.
+6
drivers/pinctrl/aspeed/Makefile
··· 1 + # Aspeed pinctrl support 2 + 3 + ccflags-y += -Woverride-init 4 + obj-$(CONFIG_PINCTRL_ASPEED) += pinctrl-aspeed.o 5 + obj-$(CONFIG_PINCTRL_ASPEED_G4) += pinctrl-aspeed-g4.o 6 + obj-$(CONFIG_PINCTRL_ASPEED_G5) += pinctrl-aspeed-g5.o
+1231
drivers/pinctrl/aspeed/pinctrl-aspeed-g4.c
··· 1 + /* 2 + * Copyright (C) 2016 IBM Corp. 3 + * 4 + * This program is free software; you can redistribute it and/or modify 5 + * it under the terms of the GNU General Public License as published by 6 + * the Free Software Foundation; either version 2 of the License, or 7 + * (at your option) any later version. 8 + */ 9 + #include <linux/bitops.h> 10 + #include <linux/init.h> 11 + #include <linux/io.h> 12 + #include <linux/kernel.h> 13 + #include <linux/mutex.h> 14 + #include <linux/of.h> 15 + #include <linux/platform_device.h> 16 + #include <linux/pinctrl/pinctrl.h> 17 + #include <linux/pinctrl/pinmux.h> 18 + #include <linux/pinctrl/pinconf.h> 19 + #include <linux/pinctrl/pinconf-generic.h> 20 + #include <linux/string.h> 21 + #include <linux/types.h> 22 + 23 + #include "../core.h" 24 + #include "../pinctrl-utils.h" 25 + #include "pinctrl-aspeed.h" 26 + 27 + /* 28 + * Uses undefined macros for symbol naming and references, eg GPIOA0, MAC1LINK, 29 + * TIMER3 etc. 30 + * 31 + * Pins are defined in GPIO bank order: 32 + * 33 + * GPIOA0: 0 34 + * ... 35 + * GPIOA7: 7 36 + * GPIOB0: 8 37 + * ... 38 + * GPIOZ7: 207 39 + * GPIOAA0: 208 40 + * ... 41 + * GPIOAB3: 219 42 + * 43 + * Not all pins have their signals defined (yet). 44 + */ 45 + 46 + #define A4 2 47 + SSSF_PIN_DECL(A4, GPIOA2, TIMER3, SIG_DESC_SET(SCU80, 2)); 48 + 49 + #define I2C9_DESC SIG_DESC_SET(SCU90, 22) 50 + 51 + #define C5 4 52 + SIG_EXPR_LIST_DECL_SINGLE(SCL9, I2C9, I2C9_DESC); 53 + SIG_EXPR_LIST_DECL_SINGLE(TIMER5, TIMER5, SIG_DESC_SET(SCU80, 4)); 54 + MS_PIN_DECL(C5, GPIOA4, SCL9, TIMER5); 55 + 56 + FUNC_GROUP_DECL(TIMER5, C5); 57 + 58 + #define B4 5 59 + SIG_EXPR_LIST_DECL_SINGLE(SDA9, I2C9, I2C9_DESC); 60 + SIG_EXPR_LIST_DECL_SINGLE(TIMER6, TIMER6, SIG_DESC_SET(SCU80, 5)); 61 + MS_PIN_DECL(B4, GPIOA5, SDA9, TIMER6); 62 + 63 + FUNC_GROUP_DECL(TIMER6, B4); 64 + FUNC_GROUP_DECL(I2C9, C5, B4); 65 + 66 + #define MDIO2_DESC SIG_DESC_SET(SCU90, 2) 67 + 68 + #define A3 6 69 + SIG_EXPR_LIST_DECL_SINGLE(MDC2, MDIO2, MDIO2_DESC); 70 + SIG_EXPR_LIST_DECL_SINGLE(TIMER7, TIMER7, SIG_DESC_SET(SCU80, 6)); 71 + MS_PIN_DECL(A3, GPIOA6, MDC2, TIMER7); 72 + 73 + FUNC_GROUP_DECL(TIMER7, A3); 74 + 75 + #define D5 7 76 + SIG_EXPR_LIST_DECL_SINGLE(MDIO2, MDIO2, MDIO2_DESC); 77 + SIG_EXPR_LIST_DECL_SINGLE(TIMER8, TIMER8, SIG_DESC_SET(SCU80, 7)); 78 + MS_PIN_DECL(D5, GPIOA7, MDIO2, TIMER8); 79 + 80 + FUNC_GROUP_DECL(TIMER8, D5); 81 + FUNC_GROUP_DECL(MDIO2, A3, D5); 82 + 83 + #define H19 13 84 + #define H19_DESC SIG_DESC_SET(SCU80, 13) 85 + SIG_EXPR_LIST_DECL_SINGLE(LPCPD, LPCPD, H19_DESC); 86 + SIG_EXPR_LIST_DECL_SINGLE(LPCSMI, LPCSMI, H19_DESC); 87 + MS_PIN_DECL(H19, GPIOB5, LPCPD, LPCSMI); 88 + 89 + FUNC_GROUP_DECL(LPCPD, H19); 90 + FUNC_GROUP_DECL(LPCSMI, H19); 91 + 92 + #define H20 14 93 + SSSF_PIN_DECL(H20, GPIOB6, LPCPME, SIG_DESC_SET(SCU80, 14)); 94 + 95 + #define SD1_DESC SIG_DESC_SET(SCU90, 0) 96 + #define I2C10_DESC SIG_DESC_SET(SCU90, 23) 97 + 98 + #define C4 16 99 + SIG_EXPR_LIST_DECL_SINGLE(SD1CLK, SD1, SD1_DESC); 100 + SIG_EXPR_LIST_DECL_SINGLE(SCL10, I2C10, I2C10_DESC); 101 + MS_PIN_DECL(C4, GPIOC0, SD1CLK, SCL10); 102 + 103 + #define B3 17 104 + SIG_EXPR_LIST_DECL_SINGLE(SD1CMD, SD1, SD1_DESC); 105 + SIG_EXPR_LIST_DECL_SINGLE(SDA10, I2C10, I2C10_DESC); 106 + MS_PIN_DECL(B3, GPIOC1, SD1CMD, SDA10); 107 + 108 + FUNC_GROUP_DECL(I2C10, C4, B3); 109 + 110 + #define I2C11_DESC SIG_DESC_SET(SCU90, 24) 111 + 112 + #define A2 18 113 + SIG_EXPR_LIST_DECL_SINGLE(SD1DAT0, SD1, SD1_DESC); 114 + SIG_EXPR_LIST_DECL_SINGLE(SCL11, I2C11, I2C11_DESC); 115 + MS_PIN_DECL(A2, GPIOC2, SD1DAT0, SCL11); 116 + 117 + #define E5 19 118 + SIG_EXPR_LIST_DECL_SINGLE(SD1DAT1, SD1, SD1_DESC); 119 + SIG_EXPR_LIST_DECL_SINGLE(SDA11, I2C11, I2C11_DESC); 120 + MS_PIN_DECL(E5, GPIOC3, SD1DAT1, SDA11); 121 + 122 + FUNC_GROUP_DECL(I2C11, A2, E5); 123 + 124 + #define I2C12_DESC SIG_DESC_SET(SCU90, 25) 125 + 126 + #define D4 20 127 + SIG_EXPR_LIST_DECL_SINGLE(SD1DAT2, SD1, SD1_DESC); 128 + SIG_EXPR_LIST_DECL_SINGLE(SCL12, I2C12, I2C12_DESC); 129 + MS_PIN_DECL(D4, GPIOC4, SD1DAT2, SCL12); 130 + 131 + #define C3 21 132 + SIG_EXPR_LIST_DECL_SINGLE(SD1DAT3, SD1, SD1_DESC); 133 + SIG_EXPR_LIST_DECL_SINGLE(SDA12, I2C12, I2C12_DESC); 134 + MS_PIN_DECL(C3, GPIOC5, SD1DAT3, SDA12); 135 + 136 + FUNC_GROUP_DECL(I2C12, D4, C3); 137 + 138 + #define I2C13_DESC SIG_DESC_SET(SCU90, 26) 139 + 140 + #define B2 22 141 + SIG_EXPR_LIST_DECL_SINGLE(SD1CD, SD1, SD1_DESC); 142 + SIG_EXPR_LIST_DECL_SINGLE(SCL13, I2C13, I2C13_DESC); 143 + MS_PIN_DECL(B2, GPIOC6, SD1CD, SCL13); 144 + 145 + #define A1 23 146 + SIG_EXPR_LIST_DECL_SINGLE(SD1WP, SD1, SD1_DESC); 147 + SIG_EXPR_LIST_DECL_SINGLE(SDA13, I2C13, I2C13_DESC); 148 + MS_PIN_DECL(A1, GPIOC7, SD1WP, SDA13); 149 + 150 + FUNC_GROUP_DECL(I2C13, B2, A1); 151 + FUNC_GROUP_DECL(SD1, C4, B3, A2, E5, D4, C3, B2, A1); 152 + 153 + #define SD2_DESC SIG_DESC_SET(SCU90, 1) 154 + #define GPID_DESC SIG_DESC_SET(HW_STRAP1, 21) 155 + #define GPID0_DESC SIG_DESC_SET(SCU8C, 8) 156 + 157 + #define A18 24 158 + SIG_EXPR_LIST_DECL_SINGLE(SD2CLK, SD2, SD2_DESC); 159 + SIG_EXPR_DECL(GPID0IN, GPID0, GPID0_DESC); 160 + SIG_EXPR_DECL(GPID0IN, GPID, GPID_DESC); 161 + SIG_EXPR_LIST_DECL_DUAL(GPID0IN, GPID0, GPID); 162 + MS_PIN_DECL(A18, GPIOD0, SD2CLK, GPID0IN); 163 + 164 + #define D16 25 165 + SIG_EXPR_LIST_DECL_SINGLE(SD2CMD, SD2, SD2_DESC); 166 + SIG_EXPR_DECL(GPID0OUT, GPID0, GPID0_DESC); 167 + SIG_EXPR_DECL(GPID0OUT, GPID, GPID_DESC); 168 + SIG_EXPR_LIST_DECL_DUAL(GPID0OUT, GPID0, GPID); 169 + MS_PIN_DECL(D16, GPIOD1, SD2CMD, GPID0OUT); 170 + 171 + FUNC_GROUP_DECL(GPID0, A18, D16); 172 + 173 + #define GPIE_DESC SIG_DESC_SET(HW_STRAP1, 22) 174 + #define GPIE0_DESC SIG_DESC_SET(SCU8C, 12) 175 + #define GPIE2_DESC SIG_DESC_SET(SCU8C, 13) 176 + #define GPIE4_DESC SIG_DESC_SET(SCU8C, 14) 177 + #define GPIE6_DESC SIG_DESC_SET(SCU8C, 15) 178 + 179 + #define D15 32 180 + SIG_EXPR_LIST_DECL_SINGLE(NCTS3, NCTS3, SIG_DESC_SET(SCU80, 16)); 181 + SIG_EXPR_DECL(GPIE0IN, GPIE0, GPIE0_DESC); 182 + SIG_EXPR_DECL(GPIE0IN, GPIE, GPIE_DESC); 183 + SIG_EXPR_LIST_DECL_DUAL(GPIE0IN, GPIE0, GPIE); 184 + MS_PIN_DECL(D15, GPIOE0, NCTS3, GPIE0IN); 185 + 186 + FUNC_GROUP_DECL(NCTS3, D15); 187 + 188 + #define C15 33 189 + SIG_EXPR_LIST_DECL_SINGLE(NDCD3, NDCD3, SIG_DESC_SET(SCU80, 17)); 190 + SIG_EXPR_DECL(GPIE0OUT, GPIE0, GPIE0_DESC); 191 + SIG_EXPR_DECL(GPIE0OUT, GPIE, GPIE_DESC); 192 + SIG_EXPR_LIST_DECL_DUAL(GPIE0OUT, GPIE0, GPIE); 193 + MS_PIN_DECL(C15, GPIOE1, NDCD3, GPIE0OUT); 194 + 195 + FUNC_GROUP_DECL(NDCD3, C15); 196 + FUNC_GROUP_DECL(GPIE0, D15, C15); 197 + 198 + #define B15 34 199 + SIG_EXPR_LIST_DECL_SINGLE(NDSR3, NDSR3, SIG_DESC_SET(SCU80, 18)); 200 + SIG_EXPR_DECL(GPIE2IN, GPIE2, GPIE2_DESC); 201 + SIG_EXPR_DECL(GPIE2IN, GPIE, GPIE_DESC); 202 + SIG_EXPR_LIST_DECL_DUAL(GPIE2IN, GPIE2, GPIE); 203 + MS_PIN_DECL(B15, GPIOE2, NDSR3, GPIE2IN); 204 + 205 + FUNC_GROUP_DECL(NDSR3, B15); 206 + 207 + #define A15 35 208 + SIG_EXPR_LIST_DECL_SINGLE(NRI3, NRI3, SIG_DESC_SET(SCU80, 19)); 209 + SIG_EXPR_DECL(GPIE2OUT, GPIE2, GPIE2_DESC); 210 + SIG_EXPR_DECL(GPIE2OUT, GPIE, GPIE_DESC); 211 + SIG_EXPR_LIST_DECL_DUAL(GPIE2OUT, GPIE2, GPIE); 212 + MS_PIN_DECL(A15, GPIOE3, NRI3, GPIE2OUT); 213 + 214 + FUNC_GROUP_DECL(NRI3, A15); 215 + FUNC_GROUP_DECL(GPIE2, B15, A15); 216 + 217 + #define E14 36 218 + SIG_EXPR_LIST_DECL_SINGLE(NDTR3, NDTR3, SIG_DESC_SET(SCU80, 20)); 219 + SIG_EXPR_DECL(GPIE4IN, GPIE4, GPIE4_DESC); 220 + SIG_EXPR_DECL(GPIE4IN, GPIE, GPIE_DESC); 221 + SIG_EXPR_LIST_DECL_DUAL(GPIE4IN, GPIE4, GPIE); 222 + MS_PIN_DECL(E14, GPIOE4, NDTR3, GPIE4IN); 223 + 224 + FUNC_GROUP_DECL(NDTR3, E14); 225 + 226 + #define D14 37 227 + SIG_EXPR_LIST_DECL_SINGLE(NRTS3, NRTS3, SIG_DESC_SET(SCU80, 21)); 228 + SIG_EXPR_DECL(GPIE4OUT, GPIE4, GPIE4_DESC); 229 + SIG_EXPR_DECL(GPIE4OUT, GPIE, GPIE_DESC); 230 + SIG_EXPR_LIST_DECL_DUAL(GPIE4OUT, GPIE4, GPIE); 231 + MS_PIN_DECL(D14, GPIOE5, NRTS3, GPIE4OUT); 232 + 233 + FUNC_GROUP_DECL(NRTS3, D14); 234 + FUNC_GROUP_DECL(GPIE4, E14, D14); 235 + 236 + #define C14 38 237 + SIG_EXPR_LIST_DECL_SINGLE(TXD3, TXD3, SIG_DESC_SET(SCU80, 22)); 238 + SIG_EXPR_DECL(GPIE6IN, GPIE6, GPIE6_DESC); 239 + SIG_EXPR_DECL(GPIE6IN, GPIE, GPIE_DESC); 240 + SIG_EXPR_LIST_DECL_DUAL(GPIE6IN, GPIE6, GPIE); 241 + MS_PIN_DECL(C14, GPIOE6, TXD3, GPIE6IN); 242 + 243 + FUNC_GROUP_DECL(TXD3, C14); 244 + 245 + #define B14 39 246 + SIG_EXPR_LIST_DECL_SINGLE(RXD3, RXD3, SIG_DESC_SET(SCU80, 23)); 247 + SIG_EXPR_DECL(GPIE6OUT, GPIE6, GPIE6_DESC); 248 + SIG_EXPR_DECL(GPIE6OUT, GPIE, GPIE_DESC); 249 + SIG_EXPR_LIST_DECL_DUAL(GPIE6OUT, GPIE6, GPIE); 250 + MS_PIN_DECL(B14, GPIOE7, RXD3, GPIE6OUT); 251 + 252 + FUNC_GROUP_DECL(RXD3, B14); 253 + FUNC_GROUP_DECL(GPIE6, C14, B14); 254 + 255 + #define D18 40 256 + SSSF_PIN_DECL(D18, GPIOF0, NCTS4, SIG_DESC_SET(SCU80, 24)); 257 + 258 + #define ACPI_DESC SIG_DESC_BIT(HW_STRAP1, 19, 0) 259 + 260 + #define B19 41 261 + SIG_EXPR_LIST_DECL_SINGLE(NDCD4, NDCD4, SIG_DESC_SET(SCU80, 25)); 262 + SIG_EXPR_DECL(SIOPBI, SIOPBI, SIG_DESC_SET(SCUA4, 12)); 263 + SIG_EXPR_DECL(SIOPBI, ACPI, ACPI_DESC); 264 + SIG_EXPR_LIST_DECL_DUAL(SIOPBI, SIOPBI, ACPI); 265 + MS_PIN_DECL(B19, GPIOF1, NDCD4, SIOPBI); 266 + FUNC_GROUP_DECL(NDCD4, B19); 267 + FUNC_GROUP_DECL(SIOPBI, B19); 268 + 269 + #define D17 43 270 + SIG_EXPR_LIST_DECL_SINGLE(NRI4, NRI4, SIG_DESC_SET(SCU80, 27)); 271 + SIG_EXPR_DECL(SIOPBO, SIOPBO, SIG_DESC_SET(SCUA4, 14)); 272 + SIG_EXPR_DECL(SIOPBO, ACPI, ACPI_DESC); 273 + SIG_EXPR_LIST_DECL_DUAL(SIOPBO, SIOPBO, ACPI); 274 + MS_PIN_DECL(D17, GPIOF3, NRI4, SIOPBO); 275 + FUNC_GROUP_DECL(NRI4, D17); 276 + FUNC_GROUP_DECL(SIOPBO, D17); 277 + 278 + FUNC_GROUP_DECL(ACPI, B19, D17); 279 + 280 + #define E16 46 281 + SSSF_PIN_DECL(E16, GPIOF6, TXD4, SIG_DESC_SET(SCU80, 30)); 282 + 283 + #define C17 47 284 + SSSF_PIN_DECL(C17, GPIOF7, RXD4, SIG_DESC_SET(SCU80, 31)); 285 + 286 + #define AA22 54 287 + SSSF_PIN_DECL(AA22, GPIOG6, FLBUSY, SIG_DESC_SET(SCU84, 6)); 288 + 289 + #define U18 55 290 + SSSF_PIN_DECL(U18, GPIOG7, FLWP, SIG_DESC_SET(SCU84, 7)); 291 + 292 + #define UART6_DESC SIG_DESC_SET(SCU90, 7) 293 + #define ROM16_DESC SIG_DESC_SET(SCU90, 6) 294 + #define FLASH_WIDE SIG_DESC_SET(HW_STRAP1, 4) 295 + #define BOOT_SRC_NOR { HW_STRAP1, GENMASK(1, 0), 0, 0 } 296 + 297 + #define A8 56 298 + SIG_EXPR_DECL(ROMD8, ROM16, ROM16_DESC); 299 + SIG_EXPR_DECL(ROMD8, ROM16S, FLASH_WIDE, BOOT_SRC_NOR); 300 + SIG_EXPR_LIST_DECL_DUAL(ROMD8, ROM16, ROM16S); 301 + SIG_EXPR_LIST_DECL_SINGLE(NCTS6, NCTS6, UART6_DESC); 302 + MS_PIN_DECL(A8, GPIOH0, ROMD8, NCTS6); 303 + 304 + #define C7 57 305 + SIG_EXPR_DECL(ROMD9, ROM16, ROM16_DESC); 306 + SIG_EXPR_DECL(ROMD9, ROM16S, FLASH_WIDE, BOOT_SRC_NOR); 307 + SIG_EXPR_LIST_DECL_DUAL(ROMD9, ROM16, ROM16S); 308 + SIG_EXPR_LIST_DECL_SINGLE(NDCD6, NDCD6, UART6_DESC); 309 + MS_PIN_DECL(C7, GPIOH1, ROMD9, NDCD6); 310 + 311 + #define B7 58 312 + SIG_EXPR_DECL(ROMD10, ROM16, ROM16_DESC); 313 + SIG_EXPR_DECL(ROMD10, ROM16S, FLASH_WIDE, BOOT_SRC_NOR); 314 + SIG_EXPR_LIST_DECL_DUAL(ROMD10, ROM16, ROM16S); 315 + SIG_EXPR_LIST_DECL_SINGLE(NDSR6, NDSR6, UART6_DESC); 316 + MS_PIN_DECL(B7, GPIOH2, ROMD10, NDSR6); 317 + 318 + #define A7 59 319 + SIG_EXPR_DECL(ROMD11, ROM16, ROM16_DESC); 320 + SIG_EXPR_DECL(ROMD11, ROM16S, FLASH_WIDE, BOOT_SRC_NOR); 321 + SIG_EXPR_LIST_DECL_DUAL(ROMD11, ROM16, ROM16S); 322 + SIG_EXPR_LIST_DECL_SINGLE(NRI6, NRI6, UART6_DESC); 323 + MS_PIN_DECL(A7, GPIOH3, ROMD11, NRI6); 324 + 325 + #define D7 60 326 + SIG_EXPR_DECL(ROMD12, ROM16, ROM16_DESC); 327 + SIG_EXPR_DECL(ROMD12, ROM16S, FLASH_WIDE, BOOT_SRC_NOR); 328 + SIG_EXPR_LIST_DECL_DUAL(ROMD12, ROM16, ROM16S); 329 + SIG_EXPR_LIST_DECL_SINGLE(NDTR6, NDTR6, UART6_DESC); 330 + MS_PIN_DECL(D7, GPIOH4, ROMD12, NDTR6); 331 + 332 + #define B6 61 333 + SIG_EXPR_DECL(ROMD13, ROM16, ROM16_DESC); 334 + SIG_EXPR_DECL(ROMD13, ROM16S, FLASH_WIDE, BOOT_SRC_NOR); 335 + SIG_EXPR_LIST_DECL_DUAL(ROMD13, ROM16, ROM16S); 336 + SIG_EXPR_LIST_DECL_SINGLE(NRTS6, NRTS6, UART6_DESC); 337 + MS_PIN_DECL(B6, GPIOH5, ROMD13, NRTS6); 338 + 339 + #define A6 62 340 + SIG_EXPR_DECL(ROMD14, ROM16, ROM16_DESC); 341 + SIG_EXPR_DECL(ROMD14, ROM16S, FLASH_WIDE, BOOT_SRC_NOR); 342 + SIG_EXPR_LIST_DECL_DUAL(ROMD14, ROM16, ROM16S); 343 + SIG_EXPR_LIST_DECL_SINGLE(TXD6, TXD6, UART6_DESC); 344 + MS_PIN_DECL(A6, GPIOH6, ROMD14, TXD6); 345 + 346 + #define E7 63 347 + SIG_EXPR_DECL(ROMD15, ROM16, ROM16_DESC); 348 + SIG_EXPR_DECL(ROMD15, ROM16S, FLASH_WIDE, BOOT_SRC_NOR); 349 + SIG_EXPR_LIST_DECL_DUAL(ROMD15, ROM16, ROM16S); 350 + SIG_EXPR_LIST_DECL_SINGLE(RXD6, RXD6, UART6_DESC); 351 + MS_PIN_DECL(E7, GPIOH7, ROMD15, RXD6); 352 + 353 + FUNC_GROUP_DECL(UART6, A8, C7, B7, A7, D7, B6, A6, E7); 354 + 355 + #define J3 75 356 + SSSF_PIN_DECL(J3, GPIOJ3, SGPMI, SIG_DESC_SET(SCU84, 11)); 357 + 358 + #define T4 76 359 + SSSF_PIN_DECL(T4, GPIOJ4, VGAHS, SIG_DESC_SET(SCU84, 12)); 360 + 361 + #define U2 77 362 + SSSF_PIN_DECL(U2, GPIOJ5, VGAVS, SIG_DESC_SET(SCU84, 13)); 363 + 364 + #define T2 78 365 + SSSF_PIN_DECL(T2, GPIOJ6, DDCCLK, SIG_DESC_SET(SCU84, 14)); 366 + 367 + #define T1 79 368 + SSSF_PIN_DECL(T1, GPIOJ7, DDCDAT, SIG_DESC_SET(SCU84, 15)); 369 + 370 + #define I2C5_DESC SIG_DESC_SET(SCU90, 18) 371 + 372 + #define E3 80 373 + SIG_EXPR_LIST_DECL_SINGLE(SCL5, I2C5, I2C5_DESC); 374 + SS_PIN_DECL(E3, GPIOK0, SCL5); 375 + 376 + #define D2 81 377 + SIG_EXPR_LIST_DECL_SINGLE(SDA5, I2C5, I2C5_DESC); 378 + SS_PIN_DECL(D2, GPIOK1, SDA5); 379 + 380 + FUNC_GROUP_DECL(I2C5, E3, D2); 381 + 382 + #define I2C6_DESC SIG_DESC_SET(SCU90, 19) 383 + 384 + #define C1 82 385 + SIG_EXPR_LIST_DECL_SINGLE(SCL6, I2C6, I2C6_DESC); 386 + SS_PIN_DECL(C1, GPIOK2, SCL6); 387 + 388 + #define F4 83 389 + SIG_EXPR_LIST_DECL_SINGLE(SDA6, I2C6, I2C6_DESC); 390 + SS_PIN_DECL(F4, GPIOK3, SDA6); 391 + 392 + FUNC_GROUP_DECL(I2C6, C1, F4); 393 + 394 + #define I2C7_DESC SIG_DESC_SET(SCU90, 20) 395 + 396 + #define E2 84 397 + SIG_EXPR_LIST_DECL_SINGLE(SCL7, I2C7, I2C7_DESC); 398 + SS_PIN_DECL(E2, GPIOK4, SCL7); 399 + 400 + #define D1 85 401 + SIG_EXPR_LIST_DECL_SINGLE(SDA7, I2C7, I2C7_DESC); 402 + SS_PIN_DECL(D1, GPIOK5, SDA7); 403 + 404 + FUNC_GROUP_DECL(I2C7, E2, D1); 405 + 406 + #define I2C8_DESC SIG_DESC_SET(SCU90, 21) 407 + 408 + #define G5 86 409 + SIG_EXPR_LIST_DECL_SINGLE(SCL8, I2C8, I2C8_DESC); 410 + SS_PIN_DECL(G5, GPIOK6, SCL8); 411 + 412 + #define F3 87 413 + SIG_EXPR_LIST_DECL_SINGLE(SDA8, I2C8, I2C8_DESC); 414 + SS_PIN_DECL(F3, GPIOK7, SDA8); 415 + 416 + FUNC_GROUP_DECL(I2C8, G5, F3); 417 + 418 + #define U1 88 419 + SSSF_PIN_DECL(U1, GPIOL0, NCTS1, SIG_DESC_SET(SCU84, 16)); 420 + 421 + #define VPI18_DESC { SCU90, GENMASK(5, 4), 1, 0 } 422 + #define VPI24_DESC { SCU90, GENMASK(5, 4), 2, 0 } 423 + #define VPI30_DESC { SCU90, GENMASK(5, 4), 3, 0 } 424 + 425 + #define T5 89 426 + #define T5_DESC SIG_DESC_SET(SCU84, 17) 427 + SIG_EXPR_DECL(VPIDE, VPI18, VPI18_DESC, T5_DESC); 428 + SIG_EXPR_DECL(VPIDE, VPI24, VPI24_DESC, T5_DESC); 429 + SIG_EXPR_DECL(VPIDE, VPI30, VPI30_DESC, T5_DESC); 430 + SIG_EXPR_LIST_DECL(VPIDE, SIG_EXPR_PTR(VPIDE, VPI18), 431 + SIG_EXPR_PTR(VPIDE, VPI24), 432 + SIG_EXPR_PTR(VPIDE, VPI30)); 433 + SIG_EXPR_LIST_DECL_SINGLE(NDCD1, NDCD1, T5_DESC); 434 + MS_PIN_DECL(T5, GPIOL1, VPIDE, NDCD1); 435 + FUNC_GROUP_DECL(NDCD1, T5); 436 + 437 + #define U3 90 438 + #define U3_DESC SIG_DESC_SET(SCU84, 18) 439 + SIG_EXPR_DECL(VPIODD, VPI18, VPI18_DESC, U3_DESC); 440 + SIG_EXPR_DECL(VPIODD, VPI24, VPI24_DESC, U3_DESC); 441 + SIG_EXPR_DECL(VPIODD, VPI30, VPI30_DESC, U3_DESC); 442 + SIG_EXPR_LIST_DECL(VPIODD, SIG_EXPR_PTR(VPIODD, VPI18), 443 + SIG_EXPR_PTR(VPIODD, VPI24), 444 + SIG_EXPR_PTR(VPIODD, VPI30)); 445 + SIG_EXPR_LIST_DECL_SINGLE(NDSR1, NDSR1, U3_DESC); 446 + MS_PIN_DECL(U3, GPIOL2, VPIODD, NDSR1); 447 + FUNC_GROUP_DECL(NDSR1, U3); 448 + 449 + #define V1 91 450 + #define V1_DESC SIG_DESC_SET(SCU84, 19) 451 + SIG_EXPR_DECL(VPIHS, VPI18, VPI18_DESC, V1_DESC); 452 + SIG_EXPR_DECL(VPIHS, VPI24, VPI24_DESC, V1_DESC); 453 + SIG_EXPR_DECL(VPIHS, VPI30, VPI30_DESC, V1_DESC); 454 + SIG_EXPR_LIST_DECL(VPIHS, SIG_EXPR_PTR(VPIHS, VPI18), 455 + SIG_EXPR_PTR(VPIHS, VPI24), 456 + SIG_EXPR_PTR(VPIHS, VPI30)); 457 + SIG_EXPR_LIST_DECL_SINGLE(NRI1, NRI1, V1_DESC); 458 + MS_PIN_DECL(V1, GPIOL3, VPIHS, NRI1); 459 + FUNC_GROUP_DECL(NRI1, V1); 460 + 461 + #define U4 92 462 + #define U4_DESC SIG_DESC_SET(SCU84, 20) 463 + SIG_EXPR_DECL(VPIVS, VPI18, VPI18_DESC, U4_DESC); 464 + SIG_EXPR_DECL(VPIVS, VPI24, VPI24_DESC, U4_DESC); 465 + SIG_EXPR_DECL(VPIVS, VPI30, VPI30_DESC, U4_DESC); 466 + SIG_EXPR_LIST_DECL(VPIVS, SIG_EXPR_PTR(VPIVS, VPI18), 467 + SIG_EXPR_PTR(VPIVS, VPI24), 468 + SIG_EXPR_PTR(VPIVS, VPI30)); 469 + SIG_EXPR_LIST_DECL_SINGLE(NDTR1, NDTR1, U4_DESC); 470 + MS_PIN_DECL(U4, GPIOL4, VPIVS, NDTR1); 471 + FUNC_GROUP_DECL(NDTR1, U4); 472 + 473 + #define V2 93 474 + #define V2_DESC SIG_DESC_SET(SCU84, 21) 475 + SIG_EXPR_DECL(VPICLK, VPI18, VPI18_DESC, V2_DESC); 476 + SIG_EXPR_DECL(VPICLK, VPI24, VPI24_DESC, V2_DESC); 477 + SIG_EXPR_DECL(VPICLK, VPI30, VPI30_DESC, V2_DESC); 478 + SIG_EXPR_LIST_DECL(VPICLK, SIG_EXPR_PTR(VPICLK, VPI18), 479 + SIG_EXPR_PTR(VPICLK, VPI24), 480 + SIG_EXPR_PTR(VPICLK, VPI30)); 481 + SIG_EXPR_LIST_DECL_SINGLE(NRTS1, NRTS1, V2_DESC); 482 + MS_PIN_DECL(V2, GPIOL5, VPICLK, NRTS1); 483 + FUNC_GROUP_DECL(NRTS1, V2); 484 + 485 + #define W1 94 486 + #define W1_DESC SIG_DESC_SET(SCU84, 22) 487 + SIG_EXPR_LIST_DECL_SINGLE(VPIB0, VPI30, VPI30_DESC, W1_DESC); 488 + SIG_EXPR_LIST_DECL_SINGLE(TXD1, TXD1, W1_DESC); 489 + MS_PIN_DECL(W1, GPIOL6, VPIB0, TXD1); 490 + FUNC_GROUP_DECL(TXD1, W1); 491 + 492 + #define U5 95 493 + #define U5_DESC SIG_DESC_SET(SCU84, 23) 494 + SIG_EXPR_LIST_DECL_SINGLE(VPIB1, VPI30, VPI30_DESC, U5_DESC); 495 + SIG_EXPR_LIST_DECL_SINGLE(RXD1, RXD1, U5_DESC); 496 + MS_PIN_DECL(U5, GPIOL7, VPIB1, RXD1); 497 + FUNC_GROUP_DECL(RXD1, U5); 498 + 499 + #define W4 104 500 + #define W4_DESC SIG_DESC_SET(SCU88, 0) 501 + SIG_EXPR_LIST_DECL_SINGLE(VPIG0, VPI30, VPI30_DESC, W4_DESC); 502 + SIG_EXPR_LIST_DECL_SINGLE(PWM0, PWM0, W4_DESC); 503 + MS_PIN_DECL(W4, GPION0, VPIG0, PWM0); 504 + FUNC_GROUP_DECL(PWM0, W4); 505 + 506 + #define Y3 105 507 + #define Y3_DESC SIG_DESC_SET(SCU88, 1) 508 + SIG_EXPR_LIST_DECL_SINGLE(VPIG1, VPI30, VPI30_DESC, Y3_DESC); 509 + SIG_EXPR_LIST_DECL_SINGLE(PWM1, PWM1, Y3_DESC); 510 + MS_PIN_DECL(Y3, GPION1, VPIG1, PWM1); 511 + FUNC_GROUP_DECL(PWM1, Y3); 512 + 513 + #define AA2 106 514 + #define AA2_DESC SIG_DESC_SET(SCU88, 2) 515 + SIG_EXPR_DECL(VPIG2, VPI18, VPI18_DESC, AA2_DESC); 516 + SIG_EXPR_DECL(VPIG2, VPI24, VPI24_DESC, AA2_DESC); 517 + SIG_EXPR_DECL(VPIG2, VPI30, VPI30_DESC, AA2_DESC); 518 + SIG_EXPR_LIST_DECL(VPIG2, SIG_EXPR_PTR(VPIG2, VPI18), 519 + SIG_EXPR_PTR(VPIG2, VPI24), 520 + SIG_EXPR_PTR(VPIG2, VPI30)); 521 + SIG_EXPR_LIST_DECL_SINGLE(PWM2, PWM2, AA2_DESC); 522 + MS_PIN_DECL(AA2, GPION2, VPIG2, PWM2); 523 + FUNC_GROUP_DECL(PWM2, AA2); 524 + 525 + #define AB1 107 526 + #define AB1_DESC SIG_DESC_SET(SCU88, 3) 527 + SIG_EXPR_DECL(VPIG3, VPI18, VPI18_DESC, AB1_DESC); 528 + SIG_EXPR_DECL(VPIG3, VPI24, VPI24_DESC, AB1_DESC); 529 + SIG_EXPR_DECL(VPIG3, VPI30, VPI30_DESC, AB1_DESC); 530 + SIG_EXPR_LIST_DECL(VPIG3, SIG_EXPR_PTR(VPIG3, VPI18), 531 + SIG_EXPR_PTR(VPIG2, VPI24), 532 + SIG_EXPR_PTR(VPIG2, VPI30)); 533 + SIG_EXPR_LIST_DECL_SINGLE(PWM3, PWM3, AB1_DESC); 534 + MS_PIN_DECL(AB1, GPION3, VPIG3, PWM3); 535 + FUNC_GROUP_DECL(PWM3, AB1); 536 + 537 + #define W5 108 538 + #define W5_DESC SIG_DESC_SET(SCU88, 4) 539 + SIG_EXPR_DECL(VPIG4, VPI18, VPI18_DESC, W5_DESC); 540 + SIG_EXPR_DECL(VPIG4, VPI24, VPI24_DESC, W5_DESC); 541 + SIG_EXPR_DECL(VPIG4, VPI30, VPI30_DESC, W5_DESC); 542 + SIG_EXPR_LIST_DECL(VPIG4, SIG_EXPR_PTR(VPIG4, VPI18), 543 + SIG_EXPR_PTR(VPIG2, VPI24), 544 + SIG_EXPR_PTR(VPIG2, VPI30)); 545 + SIG_EXPR_LIST_DECL_SINGLE(PWM4, PWM4, W5_DESC); 546 + MS_PIN_DECL(W5, GPION4, VPIG4, PWM4); 547 + FUNC_GROUP_DECL(PWM4, W5); 548 + 549 + #define Y4 109 550 + #define Y4_DESC SIG_DESC_SET(SCU88, 5) 551 + SIG_EXPR_DECL(VPIG5, VPI18, VPI18_DESC, Y4_DESC); 552 + SIG_EXPR_DECL(VPIG5, VPI24, VPI24_DESC, Y4_DESC); 553 + SIG_EXPR_DECL(VPIG5, VPI30, VPI30_DESC, Y4_DESC); 554 + SIG_EXPR_LIST_DECL(VPIG5, SIG_EXPR_PTR(VPIG5, VPI18), 555 + SIG_EXPR_PTR(VPIG2, VPI24), 556 + SIG_EXPR_PTR(VPIG2, VPI30)); 557 + SIG_EXPR_LIST_DECL_SINGLE(PWM5, PWM5, Y4_DESC); 558 + MS_PIN_DECL(Y4, GPION5, VPIG5, PWM5); 559 + FUNC_GROUP_DECL(PWM5, Y4); 560 + 561 + #define AA3 110 562 + #define AA3_DESC SIG_DESC_SET(SCU88, 6) 563 + SIG_EXPR_LIST_DECL_SINGLE(VPIG6, VPI30, VPI30_DESC, AA3_DESC); 564 + SIG_EXPR_LIST_DECL_SINGLE(PWM6, PWM6, AA3_DESC); 565 + MS_PIN_DECL(AA3, GPION6, VPIG6, PWM6); 566 + FUNC_GROUP_DECL(PWM6, AA3); 567 + 568 + #define AB2 111 569 + #define AB2_DESC SIG_DESC_SET(SCU88, 7) 570 + SIG_EXPR_LIST_DECL_SINGLE(VPIG7, VPI30, VPI30_DESC, AB2_DESC); 571 + SIG_EXPR_LIST_DECL_SINGLE(PWM7, PWM7, AB2_DESC); 572 + MS_PIN_DECL(AB2, GPION7, VPIG7, PWM7); 573 + FUNC_GROUP_DECL(PWM7, AB2); 574 + 575 + #define V6 112 576 + SIG_EXPR_LIST_DECL_SINGLE(VPIG8, VPI24, VPI24_DESC, SIG_DESC_SET(SCU88, 8)); 577 + SS_PIN_DECL(V6, GPIOO0, VPIG8); 578 + 579 + #define Y5 113 580 + SIG_EXPR_LIST_DECL_SINGLE(VPIG9, VPI24, VPI24_DESC, SIG_DESC_SET(SCU88, 9)); 581 + SS_PIN_DECL(Y5, GPIOO1, VPIG9); 582 + 583 + FUNC_GROUP_DECL(VPI18, T5, U3, V1, U4, V2, AA22, W5, Y4, AA3, AB2); 584 + FUNC_GROUP_DECL(VPI24, T5, U3, V1, U4, V2, AA22, W5, Y4, AA3, AB2, V6, Y5); 585 + FUNC_GROUP_DECL(VPI30, T5, U3, V1, U4, V2, W1, U5, W4, Y3, AA22, W5, Y4, AA3, 586 + AB2); 587 + 588 + #define Y7 125 589 + SIG_EXPR_LIST_DECL_SINGLE(GPIOP5, GPIOP5); 590 + MS_PIN_DECL_(Y7, SIG_EXPR_LIST_PTR(GPIOP5)); 591 + 592 + #define AA7 126 593 + SSSF_PIN_DECL(AA7, GPIOP6, BMCINT, SIG_DESC_SET(SCU88, 22)); 594 + 595 + #define AB7 127 596 + SSSF_PIN_DECL(AB7, GPIOP7, FLACK, SIG_DESC_SET(SCU88, 23)); 597 + 598 + #define I2C3_DESC SIG_DESC_SET(SCU90, 16) 599 + 600 + #define D3 128 601 + SIG_EXPR_LIST_DECL_SINGLE(SCL3, I2C3, I2C3_DESC); 602 + SS_PIN_DECL(D3, GPIOQ0, SCL3); 603 + 604 + #define C2 129 605 + SIG_EXPR_LIST_DECL_SINGLE(SDA3, I2C3, I2C3_DESC); 606 + SS_PIN_DECL(C2, GPIOQ1, SDA3); 607 + 608 + FUNC_GROUP_DECL(I2C3, D3, C2); 609 + 610 + #define I2C4_DESC SIG_DESC_SET(SCU90, 17) 611 + 612 + #define B1 130 613 + SIG_EXPR_LIST_DECL_SINGLE(SCL4, I2C4, I2C4_DESC); 614 + SS_PIN_DECL(B1, GPIOQ2, SCL4); 615 + 616 + #define F5 131 617 + SIG_EXPR_LIST_DECL_SINGLE(SDA4, I2C4, I2C4_DESC); 618 + SS_PIN_DECL(F5, GPIOQ3, SDA4); 619 + 620 + FUNC_GROUP_DECL(I2C4, B1, F5); 621 + 622 + #define DASH9028_DESC SIG_DESC_SET(SCU90, 28) 623 + 624 + #define H2 134 625 + SIG_EXPR_LIST_DECL_SINGLE(DASHH2, DASHH2, DASH9028_DESC); 626 + SS_PIN_DECL(H2, GPIOQ6, DASHH2); 627 + 628 + #define H1 135 629 + SIG_EXPR_LIST_DECL_SINGLE(DASHH1, DASHH1, DASH9028_DESC); 630 + SS_PIN_DECL(H1, GPIOQ7, DASHH1); 631 + 632 + #define V20 136 633 + SSSF_PIN_DECL(V20, GPIOR0, ROMCS1, SIG_DESC_SET(SCU88, 24)); 634 + 635 + #define W21 137 636 + SSSF_PIN_DECL(W21, GPIOR1, ROMCS2, SIG_DESC_SET(SCU88, 25)); 637 + 638 + #define Y22 138 639 + SSSF_PIN_DECL(Y22, GPIOR2, ROMCS3, SIG_DESC_SET(SCU88, 26)); 640 + 641 + #define U19 139 642 + SSSF_PIN_DECL(U19, GPIOR3, ROMCS4, SIG_DESC_SET(SCU88, 27)); 643 + 644 + #define VPOOFF0_DESC { SCU94, GENMASK(1, 0), 0, 0 } 645 + #define VPO12_DESC { SCU94, GENMASK(1, 0), 1, 0 } 646 + #define VPO24_DESC { SCU94, GENMASK(1, 0), 2, 0 } 647 + #define VPOOFF1_DESC { SCU94, GENMASK(1, 0), 3, 0 } 648 + #define VPO_OFF_12 { SCU94, 0x2, 0, 0 } 649 + #define VPO_24_OFF SIG_DESC_SET(SCU94, 1) 650 + 651 + #define V21 140 652 + #define V21_DESC SIG_DESC_SET(SCU88, 28) 653 + SIG_EXPR_DECL(ROMA24, ROM8, V21_DESC, VPO_OFF_12); 654 + SIG_EXPR_DECL(ROMA24, ROM16, V21_DESC, VPO_OFF_12); 655 + SIG_EXPR_DECL(ROMA24, ROM16S, V21_DESC, VPO_OFF_12); 656 + SIG_EXPR_LIST_DECL(ROMA24, SIG_EXPR_PTR(ROMA24, ROM8), 657 + SIG_EXPR_PTR(ROMA24, ROM16), 658 + SIG_EXPR_PTR(ROMA24, ROM16S)); 659 + SIG_EXPR_LIST_DECL_SINGLE(VPOR6, VPO24, V21_DESC, VPO_24_OFF); 660 + MS_PIN_DECL(V21, GPIOR4, ROMA24, VPOR6); 661 + 662 + #define W22 141 663 + #define W22_DESC SIG_DESC_SET(SCU88, 29) 664 + SIG_EXPR_DECL(ROMA25, ROM8, W22_DESC, VPO_OFF_12); 665 + SIG_EXPR_DECL(ROMA25, ROM16, W22_DESC, VPO_OFF_12); 666 + SIG_EXPR_DECL(ROMA25, ROM16S, W22_DESC, VPO_OFF_12); 667 + SIG_EXPR_LIST_DECL(ROMA25, SIG_EXPR_PTR(ROMA25, ROM8), 668 + SIG_EXPR_PTR(ROMA25, ROM16), 669 + SIG_EXPR_PTR(ROMA25, ROM16S)); 670 + SIG_EXPR_LIST_DECL_SINGLE(VPOR7, VPO24, W22_DESC, VPO_24_OFF); 671 + MS_PIN_DECL(W22, GPIOR5, ROMA25, VPOR7); 672 + 673 + #define C6 142 674 + SIG_EXPR_LIST_DECL_SINGLE(MDC1, MDIO1, SIG_DESC_SET(SCU88, 30)); 675 + SS_PIN_DECL(C6, GPIOR6, MDC1); 676 + 677 + #define A5 143 678 + SIG_EXPR_LIST_DECL_SINGLE(MDIO1, MDIO1, SIG_DESC_SET(SCU88, 31)); 679 + SS_PIN_DECL(A5, GPIOR7, MDIO1); 680 + 681 + FUNC_GROUP_DECL(MDIO1, C6, A5); 682 + 683 + #define U21 144 684 + #define U21_DESC SIG_DESC_SET(SCU8C, 0) 685 + SIG_EXPR_DECL(ROMD4, ROM8, U21_DESC, VPOOFF0_DESC); 686 + SIG_EXPR_DECL(ROMD4, ROM16, U21_DESC, VPOOFF0_DESC); 687 + SIG_EXPR_DECL(ROMD4, ROM16S, U21_DESC, VPOOFF0_DESC); 688 + SIG_EXPR_LIST_DECL(ROMD4, SIG_EXPR_PTR(ROMD4, ROM8), 689 + SIG_EXPR_PTR(ROMD4, ROM16), 690 + SIG_EXPR_PTR(ROMD4, ROM16S)); 691 + SIG_EXPR_DECL(VPODE, VPO12, U21_DESC, VPO12_DESC); 692 + SIG_EXPR_DECL(VPODE, VPO24, U21_DESC, VPO12_DESC); 693 + SIG_EXPR_LIST_DECL_DUAL(VPODE, VPO12, VPO24); 694 + MS_PIN_DECL(U21, GPIOS0, ROMD4, VPODE); 695 + 696 + #define T19 145 697 + #define T19_DESC SIG_DESC_SET(SCU8C, 1) 698 + SIG_EXPR_DECL(ROMD5, ROM8, T19_DESC, VPOOFF0_DESC); 699 + SIG_EXPR_DECL(ROMD5, ROM16, T19_DESC, VPOOFF0_DESC); 700 + SIG_EXPR_DECL(ROMD5, ROM16S, T19_DESC, VPOOFF0_DESC); 701 + SIG_EXPR_LIST_DECL(ROMD5, SIG_EXPR_PTR(ROMD5, ROM8), 702 + SIG_EXPR_PTR(ROMD5, ROM16), 703 + SIG_EXPR_PTR(ROMD5, ROM16S)); 704 + SIG_EXPR_DECL(VPOHS, VPO12, T19_DESC, VPO12_DESC); 705 + SIG_EXPR_DECL(VPOHS, VPO24, T19_DESC, VPO24_DESC); 706 + SIG_EXPR_LIST_DECL_DUAL(VPOHS, VPO12, VPO24); 707 + MS_PIN_DECL(T19, GPIOS1, ROMD5, VPOHS); 708 + 709 + #define V22 146 710 + #define V22_DESC SIG_DESC_SET(SCU8C, 2) 711 + SIG_EXPR_DECL(ROMD6, ROM8, V22_DESC, VPOOFF0_DESC); 712 + SIG_EXPR_DECL(ROMD6, ROM16, V22_DESC, VPOOFF0_DESC); 713 + SIG_EXPR_DECL(ROMD6, ROM16S, V22_DESC, VPOOFF0_DESC); 714 + SIG_EXPR_LIST_DECL(ROMD6, SIG_EXPR_PTR(ROMD6, ROM8), 715 + SIG_EXPR_PTR(ROMD6, ROM16), 716 + SIG_EXPR_PTR(ROMD6, ROM16S)); 717 + SIG_EXPR_DECL(VPOVS, VPO12, V22_DESC, VPO12_DESC); 718 + SIG_EXPR_DECL(VPOVS, VPO24, V22_DESC, VPO24_DESC); 719 + SIG_EXPR_LIST_DECL_DUAL(VPOVS, VPO12, VPO24); 720 + MS_PIN_DECL(V22, GPIOS2, ROMD6, VPOVS); 721 + 722 + #define U20 147 723 + #define U20_DESC SIG_DESC_SET(SCU8C, 3) 724 + SIG_EXPR_DECL(ROMD7, ROM8, U20_DESC, VPOOFF0_DESC); 725 + SIG_EXPR_DECL(ROMD7, ROM16, U20_DESC, VPOOFF0_DESC); 726 + SIG_EXPR_DECL(ROMD7, ROM16S, U20_DESC, VPOOFF0_DESC); 727 + SIG_EXPR_LIST_DECL(ROMD7, SIG_EXPR_PTR(ROMD7, ROM8), 728 + SIG_EXPR_PTR(ROMD7, ROM16), 729 + SIG_EXPR_PTR(ROMD7, ROM16S)); 730 + SIG_EXPR_DECL(VPOCLK, VPO12, U20_DESC, VPO12_DESC); 731 + SIG_EXPR_DECL(VPOCLK, VPO24, U20_DESC, VPO24_DESC); 732 + SIG_EXPR_LIST_DECL_DUAL(VPOCLK, VPO12, VPO24); 733 + MS_PIN_DECL(U20, GPIOS3, ROMD7, VPOCLK); 734 + 735 + #define R18 148 736 + #define ROMOE_DESC SIG_DESC_SET(SCU8C, 4) 737 + SIG_EXPR_LIST_DECL_SINGLE(GPIOS4, GPIOS4); 738 + SIG_EXPR_DECL(ROMOE, ROM8, ROMOE_DESC); 739 + SIG_EXPR_DECL(ROMOE, ROM16, ROMOE_DESC); 740 + SIG_EXPR_DECL(ROMOE, ROM16S, ROMOE_DESC); 741 + SIG_EXPR_LIST_DECL(ROMOE, SIG_EXPR_PTR(ROMOE, ROM8), 742 + SIG_EXPR_PTR(ROMOE, ROM16), 743 + SIG_EXPR_PTR(ROMOE, ROM16S)); 744 + MS_PIN_DECL_(R18, SIG_EXPR_LIST_PTR(ROMOE), SIG_EXPR_LIST_PTR(GPIOS4)); 745 + 746 + #define N21 149 747 + #define ROMWE_DESC SIG_DESC_SET(SCU8C, 5) 748 + SIG_EXPR_LIST_DECL_SINGLE(GPIOS5, GPIOS5); 749 + SIG_EXPR_DECL(ROMWE, ROM8, ROMWE_DESC); 750 + SIG_EXPR_DECL(ROMWE, ROM16, ROMWE_DESC); 751 + SIG_EXPR_DECL(ROMWE, ROM16S, ROMWE_DESC); 752 + SIG_EXPR_LIST_DECL(ROMWE, SIG_EXPR_PTR(ROMWE, ROM8), 753 + SIG_EXPR_PTR(ROMWE, ROM16), 754 + SIG_EXPR_PTR(ROMWE, ROM16S)); 755 + MS_PIN_DECL_(N21, SIG_EXPR_LIST_PTR(ROMWE), SIG_EXPR_LIST_PTR(GPIOS5)); 756 + 757 + #define L22 150 758 + #define L22_DESC SIG_DESC_SET(SCU8C, 6) 759 + SIG_EXPR_DECL(ROMA22, ROM8, L22_DESC, VPO_OFF_12); 760 + SIG_EXPR_DECL(ROMA22, ROM16, L22_DESC, VPO_OFF_12); 761 + SIG_EXPR_DECL(ROMA22, ROM16S, L22_DESC, VPO_OFF_12); 762 + SIG_EXPR_LIST_DECL(ROMA22, SIG_EXPR_PTR(ROMA22, ROM8), 763 + SIG_EXPR_PTR(ROMA22, ROM16), 764 + SIG_EXPR_PTR(ROMA22, ROM16S)); 765 + SIG_EXPR_LIST_DECL_SINGLE(VPOR4, VPO24, L22_DESC, VPO_24_OFF); 766 + MS_PIN_DECL(L22, GPIOS6, ROMA22, VPOR4); 767 + 768 + #define K18 151 769 + #define K18_DESC SIG_DESC_SET(SCU8C, 7) 770 + SIG_EXPR_DECL(ROMA23, ROM8, K18_DESC, VPO_OFF_12); 771 + SIG_EXPR_DECL(ROMA23, ROM16, K18_DESC, VPO_OFF_12); 772 + SIG_EXPR_DECL(ROMA23, ROM16S, K18_DESC, VPO_OFF_12); 773 + SIG_EXPR_LIST_DECL(ROMA23, SIG_EXPR_PTR(ROMA23, ROM8), 774 + SIG_EXPR_PTR(ROMA23, ROM16), 775 + SIG_EXPR_PTR(ROMA23, ROM16S)); 776 + SIG_EXPR_LIST_DECL_SINGLE(VPOR5, VPO24, K18_DESC, VPO_24_OFF); 777 + MS_PIN_DECL(K18, GPIOS7, ROMA23, VPOR5); 778 + 779 + FUNC_GROUP_DECL(ROM8, V20, U21, T19, V22, U20, R18, N21, L22, K18, W21, Y22, 780 + U19); 781 + FUNC_GROUP_DECL(ROM16, V20, U21, T19, V22, U20, R18, N21, L22, K18, 782 + A8, C7, B7, A7, D7, B6, A6, E7, W21, Y22, U19); 783 + FUNC_GROUP_DECL(VPO12, U21, T19, V22, U20); 784 + FUNC_GROUP_DECL(VPO24, U21, T19, V22, U20, L22, K18, V21, W22); 785 + 786 + #define RMII1_DESC SIG_DESC_BIT(HW_STRAP1, 6, 0) 787 + 788 + #define A12 152 789 + SIG_EXPR_LIST_DECL_SINGLE(GPIOT0, GPIOT0, SIG_DESC_SET(SCUA0, 0)); 790 + SIG_EXPR_LIST_DECL_SINGLE(RMII1TXEN, RMII1, RMII1_DESC); 791 + SIG_EXPR_LIST_DECL_SINGLE(RGMII1TXCK, RGMII1); 792 + MS_PIN_DECL_(A12, SIG_EXPR_LIST_PTR(GPIOT0), SIG_EXPR_LIST_PTR(RMII1TXEN), 793 + SIG_EXPR_LIST_PTR(RGMII1TXCK)); 794 + 795 + #define B12 153 796 + SIG_EXPR_LIST_DECL_SINGLE(GPIOT1, GPIOT1, SIG_DESC_SET(SCUA0, 1)); 797 + SIG_EXPR_LIST_DECL_SINGLE(DASHB12, RMII1, RMII1_DESC); 798 + SIG_EXPR_LIST_DECL_SINGLE(RGMII1TXCTL, RGMII1); 799 + MS_PIN_DECL_(B12, SIG_EXPR_LIST_PTR(GPIOT1), SIG_EXPR_LIST_PTR(DASHB12), 800 + SIG_EXPR_LIST_PTR(RGMII1TXCTL)); 801 + 802 + #define C12 154 803 + SIG_EXPR_LIST_DECL_SINGLE(GPIOT2, GPIOT2, SIG_DESC_SET(SCUA0, 2)); 804 + SIG_EXPR_LIST_DECL_SINGLE(RMII1TXD0, RMII1, RMII1_DESC); 805 + SIG_EXPR_LIST_DECL_SINGLE(RGMII1TXD0, RGMII1); 806 + MS_PIN_DECL_(C12, SIG_EXPR_LIST_PTR(GPIOT2), SIG_EXPR_LIST_PTR(RMII1TXD0), 807 + SIG_EXPR_LIST_PTR(RGMII1TXD0)); 808 + 809 + #define D12 155 810 + SIG_EXPR_LIST_DECL_SINGLE(GPIOT3, GPIOT3, SIG_DESC_SET(SCUA0, 3)); 811 + SIG_EXPR_LIST_DECL_SINGLE(RMII1TXD1, RMII1, RMII1_DESC); 812 + SIG_EXPR_LIST_DECL_SINGLE(RGMII1TXD1, RGMII1); 813 + MS_PIN_DECL_(D12, SIG_EXPR_LIST_PTR(GPIOT3), SIG_EXPR_LIST_PTR(RMII1TXD1), 814 + SIG_EXPR_LIST_PTR(RGMII1TXD1)); 815 + 816 + #define E12 156 817 + SIG_EXPR_LIST_DECL_SINGLE(GPIOT4, GPIOT4, SIG_DESC_SET(SCUA0, 4)); 818 + SIG_EXPR_LIST_DECL_SINGLE(DASHE12, RMII1, RMII1_DESC); 819 + SIG_EXPR_LIST_DECL_SINGLE(RGMII1TXD2, RGMII1); 820 + MS_PIN_DECL_(E12, SIG_EXPR_LIST_PTR(GPIOT4), SIG_EXPR_LIST_PTR(DASHE12), 821 + SIG_EXPR_LIST_PTR(RGMII1TXD2)); 822 + 823 + #define A13 157 824 + SIG_EXPR_LIST_DECL_SINGLE(GPIOT5, GPIOT5, SIG_DESC_SET(SCUA0, 5)); 825 + SIG_EXPR_LIST_DECL_SINGLE(DASHA13, RMII1, RMII1_DESC); 826 + SIG_EXPR_LIST_DECL_SINGLE(RGMII1TXD3, RGMII1); 827 + MS_PIN_DECL_(A13, SIG_EXPR_LIST_PTR(GPIOT5), SIG_EXPR_LIST_PTR(DASHA13), 828 + SIG_EXPR_LIST_PTR(RGMII1TXD3)); 829 + 830 + #define E11 164 831 + SIG_EXPR_LIST_DECL_SINGLE(GPIOU4, GPIOU4, SIG_DESC_SET(SCUA0, 12)); 832 + SIG_EXPR_LIST_DECL_SINGLE(RMII1RCLK, RMII1, RMII1_DESC); 833 + SIG_EXPR_LIST_DECL_SINGLE(RGMII1RXCK, RGMII1); 834 + MS_PIN_DECL_(E11, SIG_EXPR_LIST_PTR(GPIOU4), SIG_EXPR_LIST_PTR(RMII1RCLK), 835 + SIG_EXPR_LIST_PTR(RGMII1RXCK)); 836 + 837 + #define D11 165 838 + SIG_EXPR_LIST_DECL_SINGLE(GPIOU5, GPIOU5, SIG_DESC_SET(SCUA0, 13)); 839 + SIG_EXPR_LIST_DECL_SINGLE(DASHD11, RMII1, RMII1_DESC); 840 + SIG_EXPR_LIST_DECL_SINGLE(RGMII1RXCTL, RGMII1); 841 + MS_PIN_DECL_(D11, SIG_EXPR_LIST_PTR(GPIOU5), SIG_EXPR_LIST_PTR(DASHD11), 842 + SIG_EXPR_LIST_PTR(RGMII1RXCTL)); 843 + 844 + #define C11 166 845 + SIG_EXPR_LIST_DECL_SINGLE(GPIOU6, GPIOU6, SIG_DESC_SET(SCUA0, 14)); 846 + SIG_EXPR_LIST_DECL_SINGLE(RMII1RXD0, RMII1, RMII1_DESC); 847 + SIG_EXPR_LIST_DECL_SINGLE(RGMII1RXD0, RGMII1); 848 + MS_PIN_DECL_(C11, SIG_EXPR_LIST_PTR(GPIOU6), SIG_EXPR_LIST_PTR(RMII1RXD0), 849 + SIG_EXPR_LIST_PTR(RGMII1RXD0)); 850 + 851 + #define B11 167 852 + SIG_EXPR_LIST_DECL_SINGLE(GPIOU7, GPIOU7, SIG_DESC_SET(SCUA0, 15)); 853 + SIG_EXPR_LIST_DECL_SINGLE(RMII1RXD1, RMII1, RMII1_DESC); 854 + SIG_EXPR_LIST_DECL_SINGLE(RGMII1RXD1, RGMII1); 855 + MS_PIN_DECL_(B11, SIG_EXPR_LIST_PTR(GPIOU7), SIG_EXPR_LIST_PTR(RMII1RXD1), 856 + SIG_EXPR_LIST_PTR(RGMII1RXD1)); 857 + 858 + #define A11 168 859 + SIG_EXPR_LIST_DECL_SINGLE(GPIOV0, GPIOV0, SIG_DESC_SET(SCUA0, 16)); 860 + SIG_EXPR_LIST_DECL_SINGLE(RMII1CRSDV, RMII1, RMII1_DESC); 861 + SIG_EXPR_LIST_DECL_SINGLE(RGMII1RXD2, RGMII1); 862 + MS_PIN_DECL_(A11, SIG_EXPR_LIST_PTR(GPIOV0), SIG_EXPR_LIST_PTR(RMII1CRSDV), 863 + SIG_EXPR_LIST_PTR(RGMII1RXD2)); 864 + 865 + #define E10 169 866 + SIG_EXPR_LIST_DECL_SINGLE(GPIOV1, GPIOV1, SIG_DESC_SET(SCUA0, 17)); 867 + SIG_EXPR_LIST_DECL_SINGLE(RMII1RXER, RMII1, RMII1_DESC); 868 + SIG_EXPR_LIST_DECL_SINGLE(RGMII1RXD3, RGMII1); 869 + MS_PIN_DECL_(E10, SIG_EXPR_LIST_PTR(GPIOV1), SIG_EXPR_LIST_PTR(RMII1RXER), 870 + SIG_EXPR_LIST_PTR(RGMII1RXD3)); 871 + 872 + FUNC_GROUP_DECL(RMII1, A12, B12, C12, D12, E12, A13, E11, D11, C11, B11, A11, 873 + E10); 874 + FUNC_GROUP_DECL(RGMII1, A12, B12, C12, D12, E12, A13, E11, D11, C11, B11, A11, 875 + E10); 876 + 877 + /* Note we account for GPIOY4-GPIOY7 even though they're not valid, thus 216 878 + * pins becomes 220. 879 + */ 880 + #define ASPEED_G4_NR_PINS 220 881 + 882 + /* Pins, groups and functions are sort(1):ed alphabetically for sanity */ 883 + 884 + static struct pinctrl_pin_desc aspeed_g4_pins[ASPEED_G4_NR_PINS] = { 885 + ASPEED_PINCTRL_PIN(A1), 886 + ASPEED_PINCTRL_PIN(A11), 887 + ASPEED_PINCTRL_PIN(A12), 888 + ASPEED_PINCTRL_PIN(A13), 889 + ASPEED_PINCTRL_PIN(A15), 890 + ASPEED_PINCTRL_PIN(A18), 891 + ASPEED_PINCTRL_PIN(A2), 892 + ASPEED_PINCTRL_PIN(A3), 893 + ASPEED_PINCTRL_PIN(A4), 894 + ASPEED_PINCTRL_PIN(A5), 895 + ASPEED_PINCTRL_PIN(A6), 896 + ASPEED_PINCTRL_PIN(A7), 897 + ASPEED_PINCTRL_PIN(A8), 898 + ASPEED_PINCTRL_PIN(AA2), 899 + ASPEED_PINCTRL_PIN(AA22), 900 + ASPEED_PINCTRL_PIN(AA3), 901 + ASPEED_PINCTRL_PIN(AA7), 902 + ASPEED_PINCTRL_PIN(AB1), 903 + ASPEED_PINCTRL_PIN(AB2), 904 + ASPEED_PINCTRL_PIN(AB7), 905 + ASPEED_PINCTRL_PIN(B1), 906 + ASPEED_PINCTRL_PIN(B11), 907 + ASPEED_PINCTRL_PIN(B12), 908 + ASPEED_PINCTRL_PIN(B14), 909 + ASPEED_PINCTRL_PIN(B15), 910 + ASPEED_PINCTRL_PIN(B19), 911 + ASPEED_PINCTRL_PIN(B2), 912 + ASPEED_PINCTRL_PIN(B3), 913 + ASPEED_PINCTRL_PIN(B4), 914 + ASPEED_PINCTRL_PIN(B6), 915 + ASPEED_PINCTRL_PIN(B7), 916 + ASPEED_PINCTRL_PIN(C1), 917 + ASPEED_PINCTRL_PIN(C11), 918 + ASPEED_PINCTRL_PIN(C12), 919 + ASPEED_PINCTRL_PIN(C14), 920 + ASPEED_PINCTRL_PIN(C15), 921 + ASPEED_PINCTRL_PIN(C17), 922 + ASPEED_PINCTRL_PIN(C2), 923 + ASPEED_PINCTRL_PIN(C3), 924 + ASPEED_PINCTRL_PIN(C4), 925 + ASPEED_PINCTRL_PIN(C5), 926 + ASPEED_PINCTRL_PIN(C6), 927 + ASPEED_PINCTRL_PIN(C7), 928 + ASPEED_PINCTRL_PIN(D1), 929 + ASPEED_PINCTRL_PIN(D11), 930 + ASPEED_PINCTRL_PIN(D12), 931 + ASPEED_PINCTRL_PIN(D14), 932 + ASPEED_PINCTRL_PIN(D15), 933 + ASPEED_PINCTRL_PIN(D16), 934 + ASPEED_PINCTRL_PIN(D17), 935 + ASPEED_PINCTRL_PIN(D18), 936 + ASPEED_PINCTRL_PIN(D2), 937 + ASPEED_PINCTRL_PIN(D3), 938 + ASPEED_PINCTRL_PIN(D4), 939 + ASPEED_PINCTRL_PIN(D5), 940 + ASPEED_PINCTRL_PIN(D7), 941 + ASPEED_PINCTRL_PIN(E10), 942 + ASPEED_PINCTRL_PIN(E11), 943 + ASPEED_PINCTRL_PIN(E12), 944 + ASPEED_PINCTRL_PIN(E14), 945 + ASPEED_PINCTRL_PIN(E16), 946 + ASPEED_PINCTRL_PIN(E2), 947 + ASPEED_PINCTRL_PIN(E3), 948 + ASPEED_PINCTRL_PIN(E5), 949 + ASPEED_PINCTRL_PIN(E7), 950 + ASPEED_PINCTRL_PIN(F3), 951 + ASPEED_PINCTRL_PIN(F4), 952 + ASPEED_PINCTRL_PIN(F5), 953 + ASPEED_PINCTRL_PIN(G5), 954 + ASPEED_PINCTRL_PIN(H1), 955 + ASPEED_PINCTRL_PIN(H19), 956 + ASPEED_PINCTRL_PIN(H2), 957 + ASPEED_PINCTRL_PIN(H20), 958 + ASPEED_PINCTRL_PIN(J3), 959 + ASPEED_PINCTRL_PIN(K18), 960 + ASPEED_PINCTRL_PIN(L22), 961 + ASPEED_PINCTRL_PIN(N21), 962 + ASPEED_PINCTRL_PIN(R18), 963 + ASPEED_PINCTRL_PIN(T1), 964 + ASPEED_PINCTRL_PIN(T19), 965 + ASPEED_PINCTRL_PIN(T2), 966 + ASPEED_PINCTRL_PIN(T4), 967 + ASPEED_PINCTRL_PIN(T5), 968 + ASPEED_PINCTRL_PIN(U1), 969 + ASPEED_PINCTRL_PIN(U18), 970 + ASPEED_PINCTRL_PIN(U19), 971 + ASPEED_PINCTRL_PIN(U2), 972 + ASPEED_PINCTRL_PIN(U20), 973 + ASPEED_PINCTRL_PIN(U21), 974 + ASPEED_PINCTRL_PIN(U3), 975 + ASPEED_PINCTRL_PIN(U4), 976 + ASPEED_PINCTRL_PIN(U5), 977 + ASPEED_PINCTRL_PIN(V1), 978 + ASPEED_PINCTRL_PIN(V2), 979 + ASPEED_PINCTRL_PIN(V20), 980 + ASPEED_PINCTRL_PIN(V21), 981 + ASPEED_PINCTRL_PIN(V22), 982 + ASPEED_PINCTRL_PIN(V6), 983 + ASPEED_PINCTRL_PIN(W1), 984 + ASPEED_PINCTRL_PIN(W21), 985 + ASPEED_PINCTRL_PIN(W22), 986 + ASPEED_PINCTRL_PIN(W4), 987 + ASPEED_PINCTRL_PIN(W5), 988 + ASPEED_PINCTRL_PIN(Y22), 989 + ASPEED_PINCTRL_PIN(Y3), 990 + ASPEED_PINCTRL_PIN(Y4), 991 + ASPEED_PINCTRL_PIN(Y5), 992 + ASPEED_PINCTRL_PIN(Y7), 993 + }; 994 + 995 + static const struct aspeed_pin_group aspeed_g4_groups[] = { 996 + ASPEED_PINCTRL_GROUP(ACPI), 997 + ASPEED_PINCTRL_GROUP(BMCINT), 998 + ASPEED_PINCTRL_GROUP(DDCCLK), 999 + ASPEED_PINCTRL_GROUP(DDCDAT), 1000 + ASPEED_PINCTRL_GROUP(FLACK), 1001 + ASPEED_PINCTRL_GROUP(FLBUSY), 1002 + ASPEED_PINCTRL_GROUP(FLWP), 1003 + ASPEED_PINCTRL_GROUP(GPID0), 1004 + ASPEED_PINCTRL_GROUP(GPIE0), 1005 + ASPEED_PINCTRL_GROUP(GPIE2), 1006 + ASPEED_PINCTRL_GROUP(GPIE4), 1007 + ASPEED_PINCTRL_GROUP(GPIE6), 1008 + ASPEED_PINCTRL_GROUP(I2C10), 1009 + ASPEED_PINCTRL_GROUP(I2C11), 1010 + ASPEED_PINCTRL_GROUP(I2C12), 1011 + ASPEED_PINCTRL_GROUP(I2C13), 1012 + ASPEED_PINCTRL_GROUP(I2C3), 1013 + ASPEED_PINCTRL_GROUP(I2C4), 1014 + ASPEED_PINCTRL_GROUP(I2C5), 1015 + ASPEED_PINCTRL_GROUP(I2C6), 1016 + ASPEED_PINCTRL_GROUP(I2C7), 1017 + ASPEED_PINCTRL_GROUP(I2C8), 1018 + ASPEED_PINCTRL_GROUP(I2C9), 1019 + ASPEED_PINCTRL_GROUP(LPCPD), 1020 + ASPEED_PINCTRL_GROUP(LPCPME), 1021 + ASPEED_PINCTRL_GROUP(LPCPME), 1022 + ASPEED_PINCTRL_GROUP(LPCSMI), 1023 + ASPEED_PINCTRL_GROUP(MDIO1), 1024 + ASPEED_PINCTRL_GROUP(MDIO2), 1025 + ASPEED_PINCTRL_GROUP(NCTS1), 1026 + ASPEED_PINCTRL_GROUP(NCTS3), 1027 + ASPEED_PINCTRL_GROUP(NCTS4), 1028 + ASPEED_PINCTRL_GROUP(NDCD1), 1029 + ASPEED_PINCTRL_GROUP(NDCD3), 1030 + ASPEED_PINCTRL_GROUP(NDCD4), 1031 + ASPEED_PINCTRL_GROUP(NDSR1), 1032 + ASPEED_PINCTRL_GROUP(NDSR3), 1033 + ASPEED_PINCTRL_GROUP(NDTR1), 1034 + ASPEED_PINCTRL_GROUP(NDTR3), 1035 + ASPEED_PINCTRL_GROUP(NRI1), 1036 + ASPEED_PINCTRL_GROUP(NRI3), 1037 + ASPEED_PINCTRL_GROUP(NRI4), 1038 + ASPEED_PINCTRL_GROUP(NRTS1), 1039 + ASPEED_PINCTRL_GROUP(NRTS3), 1040 + ASPEED_PINCTRL_GROUP(PWM0), 1041 + ASPEED_PINCTRL_GROUP(PWM1), 1042 + ASPEED_PINCTRL_GROUP(PWM2), 1043 + ASPEED_PINCTRL_GROUP(PWM3), 1044 + ASPEED_PINCTRL_GROUP(PWM4), 1045 + ASPEED_PINCTRL_GROUP(PWM5), 1046 + ASPEED_PINCTRL_GROUP(PWM6), 1047 + ASPEED_PINCTRL_GROUP(PWM7), 1048 + ASPEED_PINCTRL_GROUP(RGMII1), 1049 + ASPEED_PINCTRL_GROUP(RMII1), 1050 + ASPEED_PINCTRL_GROUP(ROM16), 1051 + ASPEED_PINCTRL_GROUP(ROM8), 1052 + ASPEED_PINCTRL_GROUP(ROMCS1), 1053 + ASPEED_PINCTRL_GROUP(ROMCS2), 1054 + ASPEED_PINCTRL_GROUP(ROMCS3), 1055 + ASPEED_PINCTRL_GROUP(ROMCS4), 1056 + ASPEED_PINCTRL_GROUP(RXD1), 1057 + ASPEED_PINCTRL_GROUP(RXD3), 1058 + ASPEED_PINCTRL_GROUP(RXD4), 1059 + ASPEED_PINCTRL_GROUP(SD1), 1060 + ASPEED_PINCTRL_GROUP(SGPMI), 1061 + ASPEED_PINCTRL_GROUP(SIOPBI), 1062 + ASPEED_PINCTRL_GROUP(SIOPBO), 1063 + ASPEED_PINCTRL_GROUP(TIMER3), 1064 + ASPEED_PINCTRL_GROUP(TIMER5), 1065 + ASPEED_PINCTRL_GROUP(TIMER6), 1066 + ASPEED_PINCTRL_GROUP(TIMER7), 1067 + ASPEED_PINCTRL_GROUP(TIMER8), 1068 + ASPEED_PINCTRL_GROUP(TXD1), 1069 + ASPEED_PINCTRL_GROUP(TXD3), 1070 + ASPEED_PINCTRL_GROUP(TXD4), 1071 + ASPEED_PINCTRL_GROUP(UART6), 1072 + ASPEED_PINCTRL_GROUP(VGAHS), 1073 + ASPEED_PINCTRL_GROUP(VGAVS), 1074 + ASPEED_PINCTRL_GROUP(VPI18), 1075 + ASPEED_PINCTRL_GROUP(VPI24), 1076 + ASPEED_PINCTRL_GROUP(VPI30), 1077 + ASPEED_PINCTRL_GROUP(VPO12), 1078 + ASPEED_PINCTRL_GROUP(VPO24), 1079 + }; 1080 + 1081 + static const struct aspeed_pin_function aspeed_g4_functions[] = { 1082 + ASPEED_PINCTRL_FUNC(ACPI), 1083 + ASPEED_PINCTRL_FUNC(BMCINT), 1084 + ASPEED_PINCTRL_FUNC(DDCCLK), 1085 + ASPEED_PINCTRL_FUNC(DDCDAT), 1086 + ASPEED_PINCTRL_FUNC(FLACK), 1087 + ASPEED_PINCTRL_FUNC(FLBUSY), 1088 + ASPEED_PINCTRL_FUNC(FLWP), 1089 + ASPEED_PINCTRL_FUNC(GPID0), 1090 + ASPEED_PINCTRL_FUNC(GPIE0), 1091 + ASPEED_PINCTRL_FUNC(GPIE2), 1092 + ASPEED_PINCTRL_FUNC(GPIE4), 1093 + ASPEED_PINCTRL_FUNC(GPIE6), 1094 + ASPEED_PINCTRL_FUNC(I2C10), 1095 + ASPEED_PINCTRL_FUNC(I2C11), 1096 + ASPEED_PINCTRL_FUNC(I2C12), 1097 + ASPEED_PINCTRL_FUNC(I2C13), 1098 + ASPEED_PINCTRL_FUNC(I2C3), 1099 + ASPEED_PINCTRL_FUNC(I2C4), 1100 + ASPEED_PINCTRL_FUNC(I2C5), 1101 + ASPEED_PINCTRL_FUNC(I2C6), 1102 + ASPEED_PINCTRL_FUNC(I2C7), 1103 + ASPEED_PINCTRL_FUNC(I2C8), 1104 + ASPEED_PINCTRL_FUNC(I2C9), 1105 + ASPEED_PINCTRL_FUNC(LPCPD), 1106 + ASPEED_PINCTRL_FUNC(LPCPME), 1107 + ASPEED_PINCTRL_FUNC(LPCSMI), 1108 + ASPEED_PINCTRL_FUNC(MDIO1), 1109 + ASPEED_PINCTRL_FUNC(MDIO2), 1110 + ASPEED_PINCTRL_FUNC(NCTS1), 1111 + ASPEED_PINCTRL_FUNC(NCTS3), 1112 + ASPEED_PINCTRL_FUNC(NCTS4), 1113 + ASPEED_PINCTRL_FUNC(NDCD1), 1114 + ASPEED_PINCTRL_FUNC(NDCD3), 1115 + ASPEED_PINCTRL_FUNC(NDCD4), 1116 + ASPEED_PINCTRL_FUNC(NDSR1), 1117 + ASPEED_PINCTRL_FUNC(NDSR3), 1118 + ASPEED_PINCTRL_FUNC(NDTR1), 1119 + ASPEED_PINCTRL_FUNC(NDTR3), 1120 + ASPEED_PINCTRL_FUNC(NRI1), 1121 + ASPEED_PINCTRL_FUNC(NRI3), 1122 + ASPEED_PINCTRL_FUNC(NRI4), 1123 + ASPEED_PINCTRL_FUNC(NRTS1), 1124 + ASPEED_PINCTRL_FUNC(NRTS3), 1125 + ASPEED_PINCTRL_FUNC(PWM0), 1126 + ASPEED_PINCTRL_FUNC(PWM1), 1127 + ASPEED_PINCTRL_FUNC(PWM2), 1128 + ASPEED_PINCTRL_FUNC(PWM3), 1129 + ASPEED_PINCTRL_FUNC(PWM4), 1130 + ASPEED_PINCTRL_FUNC(PWM5), 1131 + ASPEED_PINCTRL_FUNC(PWM6), 1132 + ASPEED_PINCTRL_FUNC(PWM7), 1133 + ASPEED_PINCTRL_FUNC(RGMII1), 1134 + ASPEED_PINCTRL_FUNC(RMII1), 1135 + ASPEED_PINCTRL_FUNC(ROM16), 1136 + ASPEED_PINCTRL_FUNC(ROM8), 1137 + ASPEED_PINCTRL_FUNC(ROMCS1), 1138 + ASPEED_PINCTRL_FUNC(ROMCS2), 1139 + ASPEED_PINCTRL_FUNC(ROMCS3), 1140 + ASPEED_PINCTRL_FUNC(ROMCS4), 1141 + ASPEED_PINCTRL_FUNC(RXD1), 1142 + ASPEED_PINCTRL_FUNC(RXD3), 1143 + ASPEED_PINCTRL_FUNC(RXD4), 1144 + ASPEED_PINCTRL_FUNC(SD1), 1145 + ASPEED_PINCTRL_FUNC(SGPMI), 1146 + ASPEED_PINCTRL_FUNC(SIOPBI), 1147 + ASPEED_PINCTRL_FUNC(SIOPBO), 1148 + ASPEED_PINCTRL_FUNC(TIMER3), 1149 + ASPEED_PINCTRL_FUNC(TIMER5), 1150 + ASPEED_PINCTRL_FUNC(TIMER6), 1151 + ASPEED_PINCTRL_FUNC(TIMER7), 1152 + ASPEED_PINCTRL_FUNC(TIMER8), 1153 + ASPEED_PINCTRL_FUNC(TXD1), 1154 + ASPEED_PINCTRL_FUNC(TXD3), 1155 + ASPEED_PINCTRL_FUNC(TXD4), 1156 + ASPEED_PINCTRL_FUNC(UART6), 1157 + ASPEED_PINCTRL_FUNC(VGAHS), 1158 + ASPEED_PINCTRL_FUNC(VGAVS), 1159 + ASPEED_PINCTRL_FUNC(VPI18), 1160 + ASPEED_PINCTRL_FUNC(VPI24), 1161 + ASPEED_PINCTRL_FUNC(VPI30), 1162 + ASPEED_PINCTRL_FUNC(VPO12), 1163 + ASPEED_PINCTRL_FUNC(VPO24), 1164 + }; 1165 + 1166 + static struct aspeed_pinctrl_data aspeed_g4_pinctrl_data = { 1167 + .pins = aspeed_g4_pins, 1168 + .npins = ARRAY_SIZE(aspeed_g4_pins), 1169 + .groups = aspeed_g4_groups, 1170 + .ngroups = ARRAY_SIZE(aspeed_g4_groups), 1171 + .functions = aspeed_g4_functions, 1172 + .nfunctions = ARRAY_SIZE(aspeed_g4_functions), 1173 + }; 1174 + 1175 + static struct pinmux_ops aspeed_g4_pinmux_ops = { 1176 + .get_functions_count = aspeed_pinmux_get_fn_count, 1177 + .get_function_name = aspeed_pinmux_get_fn_name, 1178 + .get_function_groups = aspeed_pinmux_get_fn_groups, 1179 + .set_mux = aspeed_pinmux_set_mux, 1180 + .gpio_request_enable = aspeed_gpio_request_enable, 1181 + .strict = true, 1182 + }; 1183 + 1184 + static struct pinctrl_ops aspeed_g4_pinctrl_ops = { 1185 + .get_groups_count = aspeed_pinctrl_get_groups_count, 1186 + .get_group_name = aspeed_pinctrl_get_group_name, 1187 + .get_group_pins = aspeed_pinctrl_get_group_pins, 1188 + .pin_dbg_show = aspeed_pinctrl_pin_dbg_show, 1189 + .dt_node_to_map = pinconf_generic_dt_node_to_map_pin, 1190 + .dt_free_map = pinctrl_utils_free_map, 1191 + }; 1192 + 1193 + static struct pinctrl_desc aspeed_g4_pinctrl_desc = { 1194 + .name = "aspeed-g4-pinctrl", 1195 + .pins = aspeed_g4_pins, 1196 + .npins = ARRAY_SIZE(aspeed_g4_pins), 1197 + .pctlops = &aspeed_g4_pinctrl_ops, 1198 + .pmxops = &aspeed_g4_pinmux_ops, 1199 + }; 1200 + 1201 + static int aspeed_g4_pinctrl_probe(struct platform_device *pdev) 1202 + { 1203 + int i; 1204 + 1205 + for (i = 0; i < ARRAY_SIZE(aspeed_g4_pins); i++) 1206 + aspeed_g4_pins[i].number = i; 1207 + 1208 + return aspeed_pinctrl_probe(pdev, &aspeed_g4_pinctrl_desc, 1209 + &aspeed_g4_pinctrl_data); 1210 + } 1211 + 1212 + static const struct of_device_id aspeed_g4_pinctrl_of_match[] = { 1213 + { .compatible = "aspeed,ast2400-pinctrl", }, 1214 + { .compatible = "aspeed,g4-pinctrl", }, 1215 + { }, 1216 + }; 1217 + 1218 + static struct platform_driver aspeed_g4_pinctrl_driver = { 1219 + .probe = aspeed_g4_pinctrl_probe, 1220 + .driver = { 1221 + .name = "aspeed-g4-pinctrl", 1222 + .of_match_table = aspeed_g4_pinctrl_of_match, 1223 + }, 1224 + }; 1225 + 1226 + static int aspeed_g4_pinctrl_init(void) 1227 + { 1228 + return platform_driver_register(&aspeed_g4_pinctrl_driver); 1229 + } 1230 + 1231 + arch_initcall(aspeed_g4_pinctrl_init);
+808
drivers/pinctrl/aspeed/pinctrl-aspeed-g5.c
··· 1 + /* 2 + * Copyright (C) 2016 IBM Corp. 3 + * 4 + * This program is free software; you can redistribute it and/or modify 5 + * it under the terms of the GNU General Public License as published by 6 + * the Free Software Foundation; either version 2 of the License, or 7 + * (at your option) any later version. 8 + */ 9 + #include <linux/bitops.h> 10 + #include <linux/init.h> 11 + #include <linux/io.h> 12 + #include <linux/kernel.h> 13 + #include <linux/mutex.h> 14 + #include <linux/of.h> 15 + #include <linux/platform_device.h> 16 + #include <linux/pinctrl/pinctrl.h> 17 + #include <linux/pinctrl/pinmux.h> 18 + #include <linux/pinctrl/pinconf.h> 19 + #include <linux/pinctrl/pinconf-generic.h> 20 + #include <linux/string.h> 21 + #include <linux/types.h> 22 + 23 + #include "../core.h" 24 + #include "../pinctrl-utils.h" 25 + #include "pinctrl-aspeed.h" 26 + 27 + #define ASPEED_G5_NR_PINS 228 28 + 29 + #define COND1 SIG_DESC_BIT(SCU90, 6, 0) 30 + #define COND2 { SCU94, GENMASK(1, 0), 0, 0 } 31 + 32 + #define B14 0 33 + SSSF_PIN_DECL(B14, GPIOA0, MAC1LINK, SIG_DESC_SET(SCU80, 0)); 34 + 35 + #define E13 3 36 + SSSF_PIN_DECL(E13, GPIOA3, TIMER4, SIG_DESC_SET(SCU80, 3)); 37 + 38 + #define I2C9_DESC SIG_DESC_SET(SCU90, 22) 39 + 40 + #define C14 4 41 + SIG_EXPR_LIST_DECL_SINGLE(SCL9, I2C9, I2C9_DESC, COND1); 42 + SIG_EXPR_LIST_DECL_SINGLE(TIMER5, TIMER5, SIG_DESC_SET(SCU80, 4), COND1); 43 + MS_PIN_DECL(C14, GPIOA4, SCL9, TIMER5); 44 + 45 + FUNC_GROUP_DECL(TIMER5, C14); 46 + 47 + #define A13 5 48 + SIG_EXPR_LIST_DECL_SINGLE(SDA9, I2C9, I2C9_DESC, COND1); 49 + SIG_EXPR_LIST_DECL_SINGLE(TIMER6, TIMER6, SIG_DESC_SET(SCU80, 5), COND1); 50 + MS_PIN_DECL(A13, GPIOA5, SDA9, TIMER6); 51 + 52 + FUNC_GROUP_DECL(TIMER6, A13); 53 + 54 + FUNC_GROUP_DECL(I2C9, C14, A13); 55 + 56 + #define MDIO2_DESC SIG_DESC_SET(SCU90, 2) 57 + 58 + #define C13 6 59 + SIG_EXPR_LIST_DECL_SINGLE(MDC2, MDIO2, MDIO2_DESC, COND1); 60 + SIG_EXPR_LIST_DECL_SINGLE(TIMER7, TIMER7, SIG_DESC_SET(SCU80, 6), COND1); 61 + MS_PIN_DECL(C13, GPIOA6, MDC2, TIMER7); 62 + 63 + FUNC_GROUP_DECL(TIMER7, C13); 64 + 65 + #define B13 7 66 + SIG_EXPR_LIST_DECL_SINGLE(MDIO2, MDIO2, MDIO2_DESC, COND1); 67 + SIG_EXPR_LIST_DECL_SINGLE(TIMER8, TIMER8, SIG_DESC_SET(SCU80, 7), COND1); 68 + MS_PIN_DECL(B13, GPIOA7, MDIO2, TIMER8); 69 + 70 + FUNC_GROUP_DECL(TIMER8, B13); 71 + 72 + FUNC_GROUP_DECL(MDIO2, C13, B13); 73 + 74 + #define H20 15 75 + GPIO_PIN_DECL(H20, GPIOB7); 76 + 77 + #define SD1_DESC SIG_DESC_SET(SCU90, 0) 78 + 79 + #define C12 16 80 + #define I2C10_DESC SIG_DESC_SET(SCU90, 23) 81 + SIG_EXPR_LIST_DECL_SINGLE(SD1CLK, SD1, SD1_DESC); 82 + SIG_EXPR_LIST_DECL_SINGLE(SCL10, I2C10, I2C10_DESC); 83 + MS_PIN_DECL(C12, GPIOC0, SD1CLK, SCL10); 84 + 85 + #define A12 17 86 + SIG_EXPR_LIST_DECL_SINGLE(SD1CMD, SD1, SD1_DESC); 87 + SIG_EXPR_LIST_DECL_SINGLE(SDA10, I2C10, I2C10_DESC); 88 + MS_PIN_DECL(A12, GPIOC1, SD1CMD, SDA10); 89 + 90 + FUNC_GROUP_DECL(I2C10, C12, A12); 91 + 92 + #define B12 18 93 + #define I2C11_DESC SIG_DESC_SET(SCU90, 24) 94 + SIG_EXPR_LIST_DECL_SINGLE(SD1DAT0, SD1, SD1_DESC); 95 + SIG_EXPR_LIST_DECL_SINGLE(SCL11, I2C11, I2C11_DESC); 96 + MS_PIN_DECL(B12, GPIOC2, SD1DAT0, SCL11); 97 + 98 + #define D9 19 99 + SIG_EXPR_LIST_DECL_SINGLE(SD1DAT1, SD1, SD1_DESC); 100 + SIG_EXPR_LIST_DECL_SINGLE(SDA11, I2C11, I2C11_DESC); 101 + MS_PIN_DECL(D9, GPIOC3, SD1DAT1, SDA11); 102 + 103 + FUNC_GROUP_DECL(I2C11, B12, D9); 104 + 105 + #define D10 20 106 + #define I2C12_DESC SIG_DESC_SET(SCU90, 25) 107 + SIG_EXPR_LIST_DECL_SINGLE(SD1DAT2, SD1, SD1_DESC); 108 + SIG_EXPR_LIST_DECL_SINGLE(SCL12, I2C12, I2C12_DESC); 109 + MS_PIN_DECL(D10, GPIOC4, SD1DAT2, SCL12); 110 + 111 + #define E12 21 112 + SIG_EXPR_LIST_DECL_SINGLE(SD1DAT3, SD1, SD1_DESC); 113 + SIG_EXPR_LIST_DECL_SINGLE(SDA12, I2C12, I2C12_DESC); 114 + MS_PIN_DECL(E12, GPIOC5, SD1DAT3, SDA12); 115 + 116 + FUNC_GROUP_DECL(I2C12, D10, E12); 117 + 118 + #define C11 22 119 + #define I2C13_DESC SIG_DESC_SET(SCU90, 26) 120 + SIG_EXPR_LIST_DECL_SINGLE(SD1CD, SD1, SD1_DESC); 121 + SIG_EXPR_LIST_DECL_SINGLE(SCL13, I2C13, I2C13_DESC); 122 + MS_PIN_DECL(C11, GPIOC6, SD1CD, SCL13); 123 + 124 + #define B11 23 125 + SIG_EXPR_LIST_DECL_SINGLE(SD1WP, SD1, SD1_DESC); 126 + SIG_EXPR_LIST_DECL_SINGLE(SDA13, I2C13, I2C13_DESC); 127 + MS_PIN_DECL(B11, GPIOC7, SD1WP, SDA13); 128 + 129 + FUNC_GROUP_DECL(I2C13, C11, B11); 130 + FUNC_GROUP_DECL(SD1, C12, A12, B12, D9, D10, E12, C11, B11); 131 + 132 + #define SD2_DESC SIG_DESC_SET(SCU90, 1) 133 + #define GPID0_DESC SIG_DESC_SET(SCU8C, 8) 134 + #define GPID_DESC SIG_DESC_SET(HW_STRAP1, 21) 135 + 136 + #define F19 24 137 + SIG_EXPR_LIST_DECL_SINGLE(SD2CLK, SD2, SD2_DESC); 138 + SIG_EXPR_DECL(GPID0IN, GPID0, GPID0_DESC); 139 + SIG_EXPR_DECL(GPID0IN, GPID, GPID_DESC); 140 + SIG_EXPR_LIST_DECL_DUAL(GPID0IN, GPID0, GPID); 141 + MS_PIN_DECL(F19, GPIOD0, SD2CLK, GPID0IN); 142 + 143 + #define E21 25 144 + SIG_EXPR_LIST_DECL_SINGLE(SD2CMD, SD2, SD2_DESC); 145 + SIG_EXPR_DECL(GPID0OUT, GPID0, GPID0_DESC); 146 + SIG_EXPR_DECL(GPID0OUT, GPID, GPID_DESC); 147 + SIG_EXPR_LIST_DECL_DUAL(GPID0OUT, GPID0, GPID); 148 + MS_PIN_DECL(E21, GPIOD1, SD2CMD, GPID0OUT); 149 + 150 + FUNC_GROUP_DECL(GPID0, F19, E21); 151 + 152 + #define GPID2_DESC SIG_DESC_SET(SCU8C, 9) 153 + 154 + #define D20 26 155 + SIG_EXPR_LIST_DECL_SINGLE(SD2DAT0, SD2, SD2_DESC); 156 + SIG_EXPR_DECL(GPID2IN, GPID2, GPID2_DESC); 157 + SIG_EXPR_DECL(GPID2IN, GPID, GPID_DESC); 158 + SIG_EXPR_LIST_DECL_DUAL(GPID2IN, GPID2, GPID); 159 + MS_PIN_DECL(D20, GPIOD2, SD2DAT0, GPID2IN); 160 + 161 + #define D21 27 162 + SIG_EXPR_LIST_DECL_SINGLE(SD2DAT1, SD2, SD2_DESC); 163 + SIG_EXPR_DECL(GPID2OUT, GPID2, GPID2_DESC); 164 + SIG_EXPR_DECL(GPID2OUT, GPID, GPID_DESC); 165 + SIG_EXPR_LIST_DECL_DUAL(GPID2OUT, GPID2, GPID); 166 + MS_PIN_DECL(D21, GPIOD3, SD2DAT1, GPID2OUT); 167 + 168 + FUNC_GROUP_DECL(GPID2, D20, D21); 169 + 170 + #define GPIE_DESC SIG_DESC_SET(HW_STRAP1, 21) 171 + #define GPIE0_DESC SIG_DESC_SET(SCU8C, 12) 172 + 173 + #define B20 32 174 + SIG_EXPR_LIST_DECL_SINGLE(NCTS3, NCTS3, SIG_DESC_SET(SCU80, 16)); 175 + SIG_EXPR_DECL(GPIE0IN, GPIE0, GPIE0_DESC); 176 + SIG_EXPR_DECL(GPIE0IN, GPIE, GPIE_DESC); 177 + SIG_EXPR_LIST_DECL_DUAL(GPIE0IN, GPIE0, GPIE); 178 + MS_PIN_DECL(B20, GPIOE0, NCTS3, GPIE0IN); 179 + 180 + #define C20 33 181 + SIG_EXPR_LIST_DECL_SINGLE(NDCD3, NDCD3, SIG_DESC_SET(SCU80, 17)); 182 + SIG_EXPR_DECL(GPIE0OUT, GPIE0, GPIE0_DESC); 183 + SIG_EXPR_DECL(GPIE0OUT, GPIE, GPIE_DESC); 184 + SIG_EXPR_LIST_DECL_DUAL(GPIE0OUT, GPIE0, GPIE); 185 + MS_PIN_DECL(C20, GPIE0, NDCD3, GPIE0OUT); 186 + 187 + FUNC_GROUP_DECL(GPIE0, B20, C20); 188 + 189 + #define SPI1_DESC SIG_DESC_SET(HW_STRAP1, 13) 190 + #define C18 64 191 + SIG_EXPR_LIST_DECL_SINGLE(SYSCS, SPI1, COND1, SPI1_DESC); 192 + SS_PIN_DECL(C18, GPIOI0, SYSCS); 193 + 194 + #define E15 65 195 + SIG_EXPR_LIST_DECL_SINGLE(SYSCK, SPI1, COND1, SPI1_DESC); 196 + SS_PIN_DECL(E15, GPIOI1, SYSCK); 197 + 198 + #define A14 66 199 + SIG_EXPR_LIST_DECL_SINGLE(SYSMOSI, SPI1, COND1, SPI1_DESC); 200 + SS_PIN_DECL(A14, GPIOI2, SYSMOSI); 201 + 202 + #define C16 67 203 + SIG_EXPR_LIST_DECL_SINGLE(SYSMISO, SPI1, COND1, SPI1_DESC); 204 + SS_PIN_DECL(C16, GPIOI3, SYSMISO); 205 + 206 + FUNC_GROUP_DECL(SPI1, C18, E15, A14, C16); 207 + 208 + #define L2 73 209 + SIG_EXPR_LIST_DECL_SINGLE(SGPMLD, SGPM, SIG_DESC_SET(SCU84, 9)); 210 + SS_PIN_DECL(L2, GPIOJ1, SGPMLD); 211 + 212 + #define N3 74 213 + SIG_EXPR_LIST_DECL_SINGLE(SGPMO, SGPM, SIG_DESC_SET(SCU84, 10)); 214 + SS_PIN_DECL(N3, GPIOJ2, SGPMO); 215 + 216 + #define N4 75 217 + SIG_EXPR_LIST_DECL_SINGLE(SGPMI, SGPM, SIG_DESC_SET(SCU84, 11)); 218 + SS_PIN_DECL(N4, GPIOJ3, SGPMI); 219 + 220 + #define I2C5_DESC SIG_DESC_SET(SCU90, 18) 221 + 222 + #define L3 80 223 + SIG_EXPR_LIST_DECL_SINGLE(SCL5, I2C5, I2C5_DESC); 224 + SS_PIN_DECL(L3, GPIOK0, SCL5); 225 + 226 + #define L4 81 227 + SIG_EXPR_LIST_DECL_SINGLE(SDA5, I2C5, I2C5_DESC); 228 + SS_PIN_DECL(L4, GPIOK1, SDA5); 229 + 230 + FUNC_GROUP_DECL(I2C5, L3, L4); 231 + 232 + #define I2C6_DESC SIG_DESC_SET(SCU90, 19) 233 + 234 + #define L1 82 235 + SIG_EXPR_LIST_DECL_SINGLE(SCL6, I2C6, I2C6_DESC); 236 + SS_PIN_DECL(L1, GPIOK2, SCL6); 237 + 238 + #define N2 83 239 + SIG_EXPR_LIST_DECL_SINGLE(SDA6, I2C6, I2C6_DESC); 240 + SS_PIN_DECL(N2, GPIOK3, SDA6); 241 + 242 + FUNC_GROUP_DECL(I2C6, L1, N2); 243 + 244 + #define I2C7_DESC SIG_DESC_SET(SCU90, 20) 245 + 246 + #define N1 84 247 + SIG_EXPR_LIST_DECL_SINGLE(SCL7, I2C7, I2C7_DESC); 248 + SS_PIN_DECL(N1, GPIOK4, SCL7); 249 + 250 + #define P1 85 251 + SIG_EXPR_LIST_DECL_SINGLE(SDA7, I2C7, I2C7_DESC); 252 + SS_PIN_DECL(P1, GPIOK5, SDA7); 253 + 254 + FUNC_GROUP_DECL(I2C7, N1, P1); 255 + 256 + #define I2C8_DESC SIG_DESC_SET(SCU90, 21) 257 + 258 + #define P2 86 259 + SIG_EXPR_LIST_DECL_SINGLE(SCL8, I2C8, I2C8_DESC); 260 + SS_PIN_DECL(P2, GPIOK6, SCL8); 261 + 262 + #define R1 87 263 + SIG_EXPR_LIST_DECL_SINGLE(SDA8, I2C8, I2C8_DESC); 264 + SS_PIN_DECL(R1, GPIOK7, SDA8); 265 + 266 + FUNC_GROUP_DECL(I2C8, P2, R1); 267 + 268 + #define VPIOFF0_DESC { SCU90, GENMASK(5, 4), 0, 0 } 269 + #define VPIOFF1_DESC { SCU90, GENMASK(5, 4), 1, 0 } 270 + #define VPI24_DESC { SCU90, GENMASK(5, 4), 2, 0 } 271 + #define VPIRSVD_DESC { SCU90, GENMASK(5, 4), 3, 0 } 272 + 273 + #define V2 104 274 + #define V2_DESC SIG_DESC_SET(SCU88, 0) 275 + SIG_EXPR_LIST_DECL_SINGLE(DASHN0, DASHN0, VPIRSVD_DESC, V2_DESC); 276 + SIG_EXPR_LIST_DECL_SINGLE(PWM0, PWM0, V2_DESC, COND2); 277 + MS_PIN_DECL(V2, GPION0, DASHN0, PWM0); 278 + FUNC_GROUP_DECL(PWM0, V2); 279 + 280 + #define W2 105 281 + #define W2_DESC SIG_DESC_SET(SCU88, 1) 282 + SIG_EXPR_LIST_DECL_SINGLE(DASHN1, DASHN1, VPIRSVD_DESC, W2_DESC); 283 + SIG_EXPR_LIST_DECL_SINGLE(PWM1, PWM1, W2_DESC, COND2); 284 + MS_PIN_DECL(W2, GPION1, DASHN1, PWM1); 285 + FUNC_GROUP_DECL(PWM1, W2); 286 + 287 + #define V3 106 288 + #define V3_DESC SIG_DESC_SET(SCU88, 2) 289 + SIG_EXPR_DECL(VPIG2, VPI24, VPI24_DESC, V3_DESC, COND2); 290 + SIG_EXPR_DECL(VPIG2, VPIRSVD, VPIRSVD_DESC, V3_DESC, COND2); 291 + SIG_EXPR_LIST_DECL_DUAL(VPIG2, VPI24, VPIRSVD); 292 + SIG_EXPR_LIST_DECL_SINGLE(PWM2, PWM2, V3_DESC, COND2); 293 + MS_PIN_DECL(V3, GPION2, VPIG2, PWM2); 294 + FUNC_GROUP_DECL(PWM2, V3); 295 + 296 + #define U3 107 297 + #define U3_DESC SIG_DESC_SET(SCU88, 3) 298 + SIG_EXPR_DECL(VPIG3, VPI24, VPI24_DESC, U3_DESC, COND2); 299 + SIG_EXPR_DECL(VPIG3, VPIRSVD, VPIRSVD_DESC, U3_DESC, COND2); 300 + SIG_EXPR_LIST_DECL_DUAL(VPIG3, VPI24, VPIRSVD); 301 + SIG_EXPR_LIST_DECL_SINGLE(PWM3, PWM3, U3_DESC, COND2); 302 + MS_PIN_DECL(U3, GPION3, VPIG3, PWM3); 303 + FUNC_GROUP_DECL(PWM3, U3); 304 + 305 + #define W3 108 306 + #define W3_DESC SIG_DESC_SET(SCU88, 4) 307 + SIG_EXPR_DECL(VPIG4, VPI24, VPI24_DESC, W3_DESC, COND2); 308 + SIG_EXPR_DECL(VPIG4, VPIRSVD, VPIRSVD_DESC, W3_DESC, COND2); 309 + SIG_EXPR_LIST_DECL_DUAL(VPIG4, VPI24, VPIRSVD); 310 + SIG_EXPR_LIST_DECL_SINGLE(PWM4, PWM4, W3_DESC, COND2); 311 + MS_PIN_DECL(W3, GPION4, VPIG4, PWM4); 312 + FUNC_GROUP_DECL(PWM4, W3); 313 + 314 + #define AA3 109 315 + #define AA3_DESC SIG_DESC_SET(SCU88, 5) 316 + SIG_EXPR_DECL(VPIG5, VPI24, VPI24_DESC, AA3_DESC, COND2); 317 + SIG_EXPR_DECL(VPIG5, VPIRSVD, VPIRSVD_DESC, AA3_DESC, COND2); 318 + SIG_EXPR_LIST_DECL_DUAL(VPIG5, VPI24, VPIRSVD); 319 + SIG_EXPR_LIST_DECL_SINGLE(PWM5, PWM5, AA3_DESC, COND2); 320 + MS_PIN_DECL(AA3, GPION5, VPIG5, PWM5); 321 + FUNC_GROUP_DECL(PWM5, AA3); 322 + 323 + #define Y3 110 324 + #define Y3_DESC SIG_DESC_SET(SCU88, 6) 325 + SIG_EXPR_LIST_DECL_SINGLE(VPIG6, VPI24, VPI24_DESC, Y3_DESC); 326 + SIG_EXPR_LIST_DECL_SINGLE(PWM6, PWM6, Y3_DESC, COND2); 327 + MS_PIN_DECL(Y3, GPION6, VPIG6, PWM6); 328 + FUNC_GROUP_DECL(PWM6, Y3); 329 + 330 + #define T4 111 331 + #define T4_DESC SIG_DESC_SET(SCU88, 7) 332 + SIG_EXPR_LIST_DECL_SINGLE(VPIG7, VPI24, VPI24_DESC, T4_DESC); 333 + SIG_EXPR_LIST_DECL_SINGLE(PWM7, PWM7, T4_DESC, COND2); 334 + MS_PIN_DECL(T4, GPION7, VPIG7, PWM7); 335 + FUNC_GROUP_DECL(PWM7, T4); 336 + 337 + #define V6 127 338 + SIG_EXPR_LIST_DECL_SINGLE(DASHV6, DASHV6, SIG_DESC_SET(SCU90, 28), 339 + SIG_DESC_SET(SCU88, 23)); 340 + SS_PIN_DECL(V6, GPIOP7, DASHV6); 341 + 342 + #define I2C3_DESC SIG_DESC_SET(SCU90, 16) 343 + 344 + #define A11 128 345 + SIG_EXPR_LIST_DECL_SINGLE(SCL3, I2C3, I2C3_DESC); 346 + SS_PIN_DECL(A11, GPIOQ0, SCL3); 347 + 348 + #define A10 129 349 + SIG_EXPR_LIST_DECL_SINGLE(SDA3, I2C3, I2C3_DESC); 350 + SS_PIN_DECL(A10, GPIOQ1, SDA3); 351 + 352 + FUNC_GROUP_DECL(I2C3, A11, A10); 353 + 354 + #define I2C4_DESC SIG_DESC_SET(SCU90, 17) 355 + 356 + #define A9 130 357 + SIG_EXPR_LIST_DECL_SINGLE(SCL4, I2C4, I2C4_DESC); 358 + SS_PIN_DECL(A9, GPIOQ2, SCL4); 359 + 360 + #define B9 131 361 + SIG_EXPR_LIST_DECL_SINGLE(SDA4, I2C4, I2C4_DESC); 362 + SS_PIN_DECL(B9, GPIOQ3, SDA4); 363 + 364 + FUNC_GROUP_DECL(I2C4, A9, B9); 365 + 366 + #define I2C14_DESC SIG_DESC_SET(SCU90, 27) 367 + 368 + #define N21 132 369 + SIG_EXPR_LIST_DECL_SINGLE(SCL14, I2C14, I2C14_DESC); 370 + SS_PIN_DECL(N21, GPIOQ4, SCL14); 371 + 372 + #define N22 133 373 + SIG_EXPR_LIST_DECL_SINGLE(SDA14, I2C14, I2C14_DESC); 374 + SS_PIN_DECL(N22, GPIOQ5, SDA14); 375 + 376 + FUNC_GROUP_DECL(I2C14, N21, N22); 377 + 378 + #define B10 134 379 + SSSF_PIN_DECL(B10, GPIOQ6, OSCCLK, SIG_DESC_SET(SCU2C, 1)); 380 + 381 + #define N20 135 382 + SSSF_PIN_DECL(N20, GPIOQ7, PEWAKE, SIG_DESC_SET(SCU2C, 29)); 383 + 384 + #define D8 142 385 + SIG_EXPR_LIST_DECL_SINGLE(MDC1, MDIO1, SIG_DESC_SET(SCU88, 30)); 386 + SS_PIN_DECL(D8, GPIOR6, MDC1); 387 + 388 + #define E10 143 389 + SIG_EXPR_LIST_DECL_SINGLE(MDIO1, MDIO1, SIG_DESC_SET(SCU88, 31)); 390 + SS_PIN_DECL(E10, GPIOR7, MDIO1); 391 + 392 + FUNC_GROUP_DECL(MDIO1, D8, E10); 393 + 394 + /* RGMII1/RMII1 */ 395 + 396 + #define RMII1_DESC SIG_DESC_BIT(HW_STRAP1, 6, 0) 397 + #define RMII2_DESC SIG_DESC_BIT(HW_STRAP1, 7, 0) 398 + 399 + #define B5 152 400 + SIG_EXPR_LIST_DECL_SINGLE(GPIOT0, GPIOT0, SIG_DESC_SET(SCUA0, 0)); 401 + SIG_EXPR_LIST_DECL_SINGLE(RMII1RCLKO, RMII1, RMII1_DESC, 402 + SIG_DESC_SET(SCU48, 29)); 403 + SIG_EXPR_LIST_DECL_SINGLE(RGMII1TXCK, RGMII1); 404 + MS_PIN_DECL_(B5, SIG_EXPR_LIST_PTR(GPIOT0), SIG_EXPR_LIST_PTR(RMII1RCLKO), 405 + SIG_EXPR_LIST_PTR(RGMII1TXCK)); 406 + 407 + #define E9 153 408 + SIG_EXPR_LIST_DECL_SINGLE(GPIOT1, GPIOT1, SIG_DESC_SET(SCUA0, 1)); 409 + SIG_EXPR_LIST_DECL_SINGLE(RMII1TXEN, RMII1, RMII1_DESC); 410 + SIG_EXPR_LIST_DECL_SINGLE(RGMII1TXCTL, RGMII1); 411 + MS_PIN_DECL_(E9, SIG_EXPR_LIST_PTR(GPIOT1), SIG_EXPR_LIST_PTR(RMII1TXEN), 412 + SIG_EXPR_LIST_PTR(RGMII1TXCTL)); 413 + 414 + #define F9 154 415 + SIG_EXPR_LIST_DECL_SINGLE(GPIOT2, GPIOT2, SIG_DESC_SET(SCUA0, 2)); 416 + SIG_EXPR_LIST_DECL_SINGLE(RMII1TXD0, RMII1, RMII1_DESC); 417 + SIG_EXPR_LIST_DECL_SINGLE(RGMII1TXD0, RGMII1); 418 + MS_PIN_DECL_(F9, SIG_EXPR_LIST_PTR(GPIOT2), SIG_EXPR_LIST_PTR(RMII1TXD0), 419 + SIG_EXPR_LIST_PTR(RGMII1TXD0)); 420 + 421 + #define A5 155 422 + SIG_EXPR_LIST_DECL_SINGLE(GPIOT3, GPIOT3, SIG_DESC_SET(SCUA0, 3)); 423 + SIG_EXPR_LIST_DECL_SINGLE(RMII1TXD1, RMII1, RMII1_DESC); 424 + SIG_EXPR_LIST_DECL_SINGLE(RGMII1TXD1, RGMII1); 425 + MS_PIN_DECL_(A5, SIG_EXPR_LIST_PTR(GPIOT3), SIG_EXPR_LIST_PTR(RMII1TXD1), 426 + SIG_EXPR_LIST_PTR(RGMII1TXD1)); 427 + 428 + #define E7 156 429 + SIG_EXPR_LIST_DECL_SINGLE(GPIOT4, GPIOT4, SIG_DESC_SET(SCUA0, 4)); 430 + SIG_EXPR_LIST_DECL_SINGLE(RMII1DASH0, RMII1, RMII1_DESC); 431 + SIG_EXPR_LIST_DECL_SINGLE(RGMII1TXD2, RGMII1); 432 + MS_PIN_DECL_(E7, SIG_EXPR_LIST_PTR(GPIOT4), SIG_EXPR_LIST_PTR(RMII1DASH0), 433 + SIG_EXPR_LIST_PTR(RGMII1TXD2)); 434 + 435 + #define D7 157 436 + SIG_EXPR_LIST_DECL_SINGLE(GPIOT5, GPIOT5, SIG_DESC_SET(SCUA0, 5)); 437 + SIG_EXPR_LIST_DECL_SINGLE(RMII1DASH1, RMII1, RMII1_DESC); 438 + SIG_EXPR_LIST_DECL_SINGLE(RGMII1TXD3, RGMII1); 439 + MS_PIN_DECL_(D7, SIG_EXPR_LIST_PTR(GPIOT5), SIG_EXPR_LIST_PTR(RMII1DASH1), 440 + SIG_EXPR_LIST_PTR(RGMII1TXD3)); 441 + 442 + #define B2 158 443 + SIG_EXPR_LIST_DECL_SINGLE(GPIOT6, GPIOT6, SIG_DESC_SET(SCUA0, 6)); 444 + SIG_EXPR_LIST_DECL_SINGLE(RMII2RCLKO, RMII2, RMII2_DESC, 445 + SIG_DESC_SET(SCU48, 30)); 446 + SIG_EXPR_LIST_DECL_SINGLE(RGMII2TXCK, RGMII2); 447 + MS_PIN_DECL_(B2, SIG_EXPR_LIST_PTR(GPIOT6), SIG_EXPR_LIST_PTR(RMII2RCLKO), 448 + SIG_EXPR_LIST_PTR(RGMII2TXCK)); 449 + 450 + #define B1 159 451 + SIG_EXPR_LIST_DECL_SINGLE(GPIOT7, GPIOT7, SIG_DESC_SET(SCUA0, 7)); 452 + SIG_EXPR_LIST_DECL_SINGLE(RMII2TXEN, RMII2, RMII2_DESC); 453 + SIG_EXPR_LIST_DECL_SINGLE(RGMII2TXCTL, RGMII2); 454 + MS_PIN_DECL_(B1, SIG_EXPR_LIST_PTR(GPIOT7), SIG_EXPR_LIST_PTR(RMII2TXEN), 455 + SIG_EXPR_LIST_PTR(RGMII2TXCTL)); 456 + 457 + #define A2 160 458 + SIG_EXPR_LIST_DECL_SINGLE(GPIOU0, GPIOU0, SIG_DESC_SET(SCUA0, 8)); 459 + SIG_EXPR_LIST_DECL_SINGLE(RMII2TXD0, RMII2, RMII2_DESC); 460 + SIG_EXPR_LIST_DECL_SINGLE(RGMII2TXD0, RGMII2); 461 + MS_PIN_DECL_(A2, SIG_EXPR_LIST_PTR(GPIOU0), SIG_EXPR_LIST_PTR(RMII2TXD0), 462 + SIG_EXPR_LIST_PTR(RGMII2TXD0)); 463 + 464 + #define B3 161 465 + SIG_EXPR_LIST_DECL_SINGLE(GPIOU1, GPIOU1, SIG_DESC_SET(SCUA0, 9)); 466 + SIG_EXPR_LIST_DECL_SINGLE(RMII2TXD1, RMII2, RMII2_DESC); 467 + SIG_EXPR_LIST_DECL_SINGLE(RGMII2TXD1, RGMII2); 468 + MS_PIN_DECL_(B3, SIG_EXPR_LIST_PTR(GPIOU1), SIG_EXPR_LIST_PTR(RMII2TXD1), 469 + SIG_EXPR_LIST_PTR(RGMII2TXD1)); 470 + 471 + #define D5 162 472 + SIG_EXPR_LIST_DECL_SINGLE(GPIOU2, GPIOU2, SIG_DESC_SET(SCUA0, 10)); 473 + SIG_EXPR_LIST_DECL_SINGLE(RMII2DASH0, RMII2, RMII2_DESC); 474 + SIG_EXPR_LIST_DECL_SINGLE(RGMII2TXD2, RGMII2); 475 + MS_PIN_DECL_(D5, SIG_EXPR_LIST_PTR(GPIOU2), SIG_EXPR_LIST_PTR(RMII2DASH0), 476 + SIG_EXPR_LIST_PTR(RGMII2TXD2)); 477 + 478 + #define D4 163 479 + SIG_EXPR_LIST_DECL_SINGLE(GPIOU3, GPIOU3, SIG_DESC_SET(SCUA0, 11)); 480 + SIG_EXPR_LIST_DECL_SINGLE(RMII2DASH1, RMII2, RMII2_DESC); 481 + SIG_EXPR_LIST_DECL_SINGLE(RGMII2TXD3, RGMII2); 482 + MS_PIN_DECL_(D4, SIG_EXPR_LIST_PTR(GPIOU3), SIG_EXPR_LIST_PTR(RMII2DASH1), 483 + SIG_EXPR_LIST_PTR(RGMII2TXD3)); 484 + 485 + #define B4 164 486 + SIG_EXPR_LIST_DECL_SINGLE(GPIOU4, GPIOU4, SIG_DESC_SET(SCUA0, 12)); 487 + SIG_EXPR_LIST_DECL_SINGLE(RMII1RCLKI, RMII1, RMII1_DESC); 488 + SIG_EXPR_LIST_DECL_SINGLE(RGMII1RXCK, RGMII1); 489 + MS_PIN_DECL_(B4, SIG_EXPR_LIST_PTR(GPIOU4), SIG_EXPR_LIST_PTR(RMII1RCLKI), 490 + SIG_EXPR_LIST_PTR(RGMII1RXCK)); 491 + 492 + #define A4 165 493 + SIG_EXPR_LIST_DECL_SINGLE(GPIOU5, GPIOU5, SIG_DESC_SET(SCUA0, 13)); 494 + SIG_EXPR_LIST_DECL_SINGLE(RMII1DASH2, RMII1, RMII1_DESC); 495 + SIG_EXPR_LIST_DECL_SINGLE(RGMII1RXCTL, RGMII1); 496 + MS_PIN_DECL_(A4, SIG_EXPR_LIST_PTR(GPIOU5), SIG_EXPR_LIST_PTR(RMII1DASH2), 497 + SIG_EXPR_LIST_PTR(RGMII1RXCTL)); 498 + 499 + #define A3 166 500 + SIG_EXPR_LIST_DECL_SINGLE(GPIOU6, GPIOU6, SIG_DESC_SET(SCUA0, 14)); 501 + SIG_EXPR_LIST_DECL_SINGLE(RMII1RXD0, RMII1, RMII1_DESC); 502 + SIG_EXPR_LIST_DECL_SINGLE(RGMII1RXD0, RGMII1); 503 + MS_PIN_DECL_(A3, SIG_EXPR_LIST_PTR(GPIOU6), SIG_EXPR_LIST_PTR(RMII1RXD0), 504 + SIG_EXPR_LIST_PTR(RGMII1RXD0)); 505 + 506 + #define D6 167 507 + SIG_EXPR_LIST_DECL_SINGLE(GPIOU7, GPIOU7, SIG_DESC_SET(SCUA0, 15)); 508 + SIG_EXPR_LIST_DECL_SINGLE(RMII1RXD1, RMII1, RMII1_DESC); 509 + SIG_EXPR_LIST_DECL_SINGLE(RGMII1RXD1, RGMII1); 510 + MS_PIN_DECL_(D6, SIG_EXPR_LIST_PTR(GPIOU7), SIG_EXPR_LIST_PTR(RMII1RXD1), 511 + SIG_EXPR_LIST_PTR(RGMII1RXD1)); 512 + 513 + #define C5 168 514 + SIG_EXPR_LIST_DECL_SINGLE(GPIOV0, GPIOV0, SIG_DESC_SET(SCUA0, 16)); 515 + SIG_EXPR_LIST_DECL_SINGLE(RMII1CRSDV, RMII1, RMII1_DESC); 516 + SIG_EXPR_LIST_DECL_SINGLE(RGMII1RXD2, RGMII1); 517 + MS_PIN_DECL_(C5, SIG_EXPR_LIST_PTR(GPIOV0), SIG_EXPR_LIST_PTR(RMII1CRSDV), 518 + SIG_EXPR_LIST_PTR(RGMII1RXD2)); 519 + 520 + #define C4 169 521 + SIG_EXPR_LIST_DECL_SINGLE(GPIOV1, GPIOV1, SIG_DESC_SET(SCUA0, 17)); 522 + SIG_EXPR_LIST_DECL_SINGLE(RMII1RXER, RMII1, RMII1_DESC); 523 + SIG_EXPR_LIST_DECL_SINGLE(RGMII1RXD3, RGMII1); 524 + MS_PIN_DECL_(C4, SIG_EXPR_LIST_PTR(GPIOV1), SIG_EXPR_LIST_PTR(RMII1RXER), 525 + SIG_EXPR_LIST_PTR(RGMII1RXD3)); 526 + 527 + FUNC_GROUP_DECL(RGMII1, B4, A4, A3, D6, C5, C4, B5, E9, F9, A5, E7, D7); 528 + FUNC_GROUP_DECL(RMII1, B4, A3, D6, C5, C4, B5, E9, F9, A5); 529 + 530 + #define C2 170 531 + SIG_EXPR_LIST_DECL_SINGLE(GPIOV2, GPIOV2, SIG_DESC_SET(SCUA0, 18)); 532 + SIG_EXPR_LIST_DECL_SINGLE(RMII2RCLKI, RMII2, RMII2_DESC); 533 + SIG_EXPR_LIST_DECL_SINGLE(RGMII2RXCK, RGMII2); 534 + MS_PIN_DECL_(C2, SIG_EXPR_LIST_PTR(GPIOV2), SIG_EXPR_LIST_PTR(RMII2RCLKI), 535 + SIG_EXPR_LIST_PTR(RGMII2RXCK)); 536 + 537 + #define C1 171 538 + SIG_EXPR_LIST_DECL_SINGLE(GPIOV3, GPIOV3, SIG_DESC_SET(SCUA0, 19)); 539 + SIG_EXPR_LIST_DECL_SINGLE(RMII2DASH2, RMII2, RMII2_DESC); 540 + SIG_EXPR_LIST_DECL_SINGLE(RGMII2RXCTL, RGMII2); 541 + MS_PIN_DECL_(C1, SIG_EXPR_LIST_PTR(GPIOV3), SIG_EXPR_LIST_PTR(RMII2DASH2), 542 + SIG_EXPR_LIST_PTR(RGMII2RXCTL)); 543 + 544 + #define C3 172 545 + SIG_EXPR_LIST_DECL_SINGLE(GPIOV4, GPIOV4, SIG_DESC_SET(SCUA0, 20)); 546 + SIG_EXPR_LIST_DECL_SINGLE(RMII2RXD0, RMII2, RMII2_DESC); 547 + SIG_EXPR_LIST_DECL_SINGLE(RGMII2RXD0, RGMII2); 548 + MS_PIN_DECL_(C3, SIG_EXPR_LIST_PTR(GPIOV4), SIG_EXPR_LIST_PTR(RMII2RXD0), 549 + SIG_EXPR_LIST_PTR(RGMII2RXD0)); 550 + 551 + #define D1 173 552 + SIG_EXPR_LIST_DECL_SINGLE(GPIOV5, GPIOV5, SIG_DESC_SET(SCUA0, 21)); 553 + SIG_EXPR_LIST_DECL_SINGLE(RMII2RXD1, RMII2, RMII2_DESC); 554 + SIG_EXPR_LIST_DECL_SINGLE(RGMII2RXD1, RGMII2); 555 + MS_PIN_DECL_(D1, SIG_EXPR_LIST_PTR(GPIOV5), SIG_EXPR_LIST_PTR(RMII2RXD1), 556 + SIG_EXPR_LIST_PTR(RGMII2RXD1)); 557 + 558 + #define D2 174 559 + SIG_EXPR_LIST_DECL_SINGLE(GPIOV6, GPIOV6, SIG_DESC_SET(SCUA0, 22)); 560 + SIG_EXPR_LIST_DECL_SINGLE(RMII2CRSDV, RMII2, RMII2_DESC); 561 + SIG_EXPR_LIST_DECL_SINGLE(RGMII2RXD2, RGMII2); 562 + MS_PIN_DECL_(D2, SIG_EXPR_LIST_PTR(GPIOV6), SIG_EXPR_LIST_PTR(RMII2CRSDV), 563 + SIG_EXPR_LIST_PTR(RGMII2RXD2)); 564 + 565 + #define E6 175 566 + SIG_EXPR_LIST_DECL_SINGLE(GPIOV7, GPIOV7, SIG_DESC_SET(SCUA0, 23)); 567 + SIG_EXPR_LIST_DECL_SINGLE(RMII2RXER, RMII2, RMII2_DESC); 568 + SIG_EXPR_LIST_DECL_SINGLE(RGMII2RXD3, RGMII2); 569 + MS_PIN_DECL_(E6, SIG_EXPR_LIST_PTR(GPIOV7), SIG_EXPR_LIST_PTR(RMII2RXER), 570 + SIG_EXPR_LIST_PTR(RGMII2RXD3)); 571 + 572 + FUNC_GROUP_DECL(RGMII2, B2, B1, A2, B3, D5, D4, C2, C1, C3, D1, D2, E6); 573 + FUNC_GROUP_DECL(RMII2, B2, B1, A2, B3, C2, C3, D1, D2, E6); 574 + 575 + /* Pins, groups and functions are sort(1):ed alphabetically for sanity */ 576 + 577 + static struct pinctrl_pin_desc aspeed_g5_pins[ASPEED_G5_NR_PINS] = { 578 + ASPEED_PINCTRL_PIN(A10), 579 + ASPEED_PINCTRL_PIN(A11), 580 + ASPEED_PINCTRL_PIN(A12), 581 + ASPEED_PINCTRL_PIN(A13), 582 + ASPEED_PINCTRL_PIN(A14), 583 + ASPEED_PINCTRL_PIN(A2), 584 + ASPEED_PINCTRL_PIN(A3), 585 + ASPEED_PINCTRL_PIN(A4), 586 + ASPEED_PINCTRL_PIN(A5), 587 + ASPEED_PINCTRL_PIN(A9), 588 + ASPEED_PINCTRL_PIN(AA3), 589 + ASPEED_PINCTRL_PIN(B1), 590 + ASPEED_PINCTRL_PIN(B10), 591 + ASPEED_PINCTRL_PIN(B11), 592 + ASPEED_PINCTRL_PIN(B12), 593 + ASPEED_PINCTRL_PIN(B13), 594 + ASPEED_PINCTRL_PIN(B14), 595 + ASPEED_PINCTRL_PIN(B2), 596 + ASPEED_PINCTRL_PIN(B20), 597 + ASPEED_PINCTRL_PIN(B3), 598 + ASPEED_PINCTRL_PIN(B4), 599 + ASPEED_PINCTRL_PIN(B5), 600 + ASPEED_PINCTRL_PIN(B9), 601 + ASPEED_PINCTRL_PIN(C1), 602 + ASPEED_PINCTRL_PIN(C11), 603 + ASPEED_PINCTRL_PIN(C12), 604 + ASPEED_PINCTRL_PIN(C13), 605 + ASPEED_PINCTRL_PIN(C14), 606 + ASPEED_PINCTRL_PIN(C16), 607 + ASPEED_PINCTRL_PIN(C18), 608 + ASPEED_PINCTRL_PIN(C2), 609 + ASPEED_PINCTRL_PIN(C20), 610 + ASPEED_PINCTRL_PIN(C3), 611 + ASPEED_PINCTRL_PIN(C4), 612 + ASPEED_PINCTRL_PIN(C5), 613 + ASPEED_PINCTRL_PIN(D1), 614 + ASPEED_PINCTRL_PIN(D10), 615 + ASPEED_PINCTRL_PIN(D2), 616 + ASPEED_PINCTRL_PIN(D20), 617 + ASPEED_PINCTRL_PIN(D21), 618 + ASPEED_PINCTRL_PIN(D4), 619 + ASPEED_PINCTRL_PIN(D5), 620 + ASPEED_PINCTRL_PIN(D6), 621 + ASPEED_PINCTRL_PIN(D7), 622 + ASPEED_PINCTRL_PIN(D8), 623 + ASPEED_PINCTRL_PIN(D9), 624 + ASPEED_PINCTRL_PIN(E10), 625 + ASPEED_PINCTRL_PIN(E12), 626 + ASPEED_PINCTRL_PIN(E13), 627 + ASPEED_PINCTRL_PIN(E15), 628 + ASPEED_PINCTRL_PIN(E21), 629 + ASPEED_PINCTRL_PIN(E6), 630 + ASPEED_PINCTRL_PIN(E7), 631 + ASPEED_PINCTRL_PIN(E9), 632 + ASPEED_PINCTRL_PIN(F19), 633 + ASPEED_PINCTRL_PIN(F9), 634 + ASPEED_PINCTRL_PIN(H20), 635 + ASPEED_PINCTRL_PIN(L1), 636 + ASPEED_PINCTRL_PIN(L2), 637 + ASPEED_PINCTRL_PIN(L3), 638 + ASPEED_PINCTRL_PIN(L4), 639 + ASPEED_PINCTRL_PIN(N1), 640 + ASPEED_PINCTRL_PIN(N2), 641 + ASPEED_PINCTRL_PIN(N20), 642 + ASPEED_PINCTRL_PIN(N21), 643 + ASPEED_PINCTRL_PIN(N22), 644 + ASPEED_PINCTRL_PIN(N3), 645 + ASPEED_PINCTRL_PIN(N4), 646 + ASPEED_PINCTRL_PIN(P1), 647 + ASPEED_PINCTRL_PIN(P2), 648 + ASPEED_PINCTRL_PIN(R1), 649 + ASPEED_PINCTRL_PIN(T4), 650 + ASPEED_PINCTRL_PIN(U3), 651 + ASPEED_PINCTRL_PIN(V2), 652 + ASPEED_PINCTRL_PIN(V3), 653 + ASPEED_PINCTRL_PIN(V6), 654 + ASPEED_PINCTRL_PIN(W2), 655 + ASPEED_PINCTRL_PIN(W3), 656 + ASPEED_PINCTRL_PIN(Y3), 657 + }; 658 + 659 + static const struct aspeed_pin_group aspeed_g5_groups[] = { 660 + ASPEED_PINCTRL_GROUP(GPID0), 661 + ASPEED_PINCTRL_GROUP(GPID2), 662 + ASPEED_PINCTRL_GROUP(GPIE0), 663 + ASPEED_PINCTRL_GROUP(I2C10), 664 + ASPEED_PINCTRL_GROUP(I2C11), 665 + ASPEED_PINCTRL_GROUP(I2C12), 666 + ASPEED_PINCTRL_GROUP(I2C13), 667 + ASPEED_PINCTRL_GROUP(I2C14), 668 + ASPEED_PINCTRL_GROUP(I2C3), 669 + ASPEED_PINCTRL_GROUP(I2C4), 670 + ASPEED_PINCTRL_GROUP(I2C5), 671 + ASPEED_PINCTRL_GROUP(I2C6), 672 + ASPEED_PINCTRL_GROUP(I2C7), 673 + ASPEED_PINCTRL_GROUP(I2C8), 674 + ASPEED_PINCTRL_GROUP(I2C9), 675 + ASPEED_PINCTRL_GROUP(MAC1LINK), 676 + ASPEED_PINCTRL_GROUP(MDIO1), 677 + ASPEED_PINCTRL_GROUP(MDIO2), 678 + ASPEED_PINCTRL_GROUP(OSCCLK), 679 + ASPEED_PINCTRL_GROUP(PEWAKE), 680 + ASPEED_PINCTRL_GROUP(PWM0), 681 + ASPEED_PINCTRL_GROUP(PWM1), 682 + ASPEED_PINCTRL_GROUP(PWM2), 683 + ASPEED_PINCTRL_GROUP(PWM3), 684 + ASPEED_PINCTRL_GROUP(PWM4), 685 + ASPEED_PINCTRL_GROUP(PWM5), 686 + ASPEED_PINCTRL_GROUP(PWM6), 687 + ASPEED_PINCTRL_GROUP(PWM7), 688 + ASPEED_PINCTRL_GROUP(RGMII1), 689 + ASPEED_PINCTRL_GROUP(RGMII2), 690 + ASPEED_PINCTRL_GROUP(RMII1), 691 + ASPEED_PINCTRL_GROUP(RMII2), 692 + ASPEED_PINCTRL_GROUP(SD1), 693 + ASPEED_PINCTRL_GROUP(SPI1), 694 + ASPEED_PINCTRL_GROUP(TIMER4), 695 + ASPEED_PINCTRL_GROUP(TIMER5), 696 + ASPEED_PINCTRL_GROUP(TIMER6), 697 + ASPEED_PINCTRL_GROUP(TIMER7), 698 + ASPEED_PINCTRL_GROUP(TIMER8), 699 + }; 700 + 701 + static const struct aspeed_pin_function aspeed_g5_functions[] = { 702 + ASPEED_PINCTRL_FUNC(GPID0), 703 + ASPEED_PINCTRL_FUNC(GPID2), 704 + ASPEED_PINCTRL_FUNC(GPIE0), 705 + ASPEED_PINCTRL_FUNC(I2C10), 706 + ASPEED_PINCTRL_FUNC(I2C11), 707 + ASPEED_PINCTRL_FUNC(I2C12), 708 + ASPEED_PINCTRL_FUNC(I2C13), 709 + ASPEED_PINCTRL_FUNC(I2C14), 710 + ASPEED_PINCTRL_FUNC(I2C3), 711 + ASPEED_PINCTRL_FUNC(I2C4), 712 + ASPEED_PINCTRL_FUNC(I2C5), 713 + ASPEED_PINCTRL_FUNC(I2C6), 714 + ASPEED_PINCTRL_FUNC(I2C7), 715 + ASPEED_PINCTRL_FUNC(I2C8), 716 + ASPEED_PINCTRL_FUNC(I2C9), 717 + ASPEED_PINCTRL_FUNC(MAC1LINK), 718 + ASPEED_PINCTRL_FUNC(MDIO1), 719 + ASPEED_PINCTRL_FUNC(MDIO2), 720 + ASPEED_PINCTRL_FUNC(OSCCLK), 721 + ASPEED_PINCTRL_FUNC(PEWAKE), 722 + ASPEED_PINCTRL_FUNC(PWM0), 723 + ASPEED_PINCTRL_FUNC(PWM1), 724 + ASPEED_PINCTRL_FUNC(PWM2), 725 + ASPEED_PINCTRL_FUNC(PWM3), 726 + ASPEED_PINCTRL_FUNC(PWM4), 727 + ASPEED_PINCTRL_FUNC(PWM5), 728 + ASPEED_PINCTRL_FUNC(PWM6), 729 + ASPEED_PINCTRL_FUNC(PWM7), 730 + ASPEED_PINCTRL_FUNC(RGMII1), 731 + ASPEED_PINCTRL_FUNC(RGMII2), 732 + ASPEED_PINCTRL_FUNC(RMII1), 733 + ASPEED_PINCTRL_FUNC(RMII2), 734 + ASPEED_PINCTRL_FUNC(SD1), 735 + ASPEED_PINCTRL_FUNC(SPI1), 736 + ASPEED_PINCTRL_FUNC(TIMER4), 737 + ASPEED_PINCTRL_FUNC(TIMER5), 738 + ASPEED_PINCTRL_FUNC(TIMER6), 739 + ASPEED_PINCTRL_FUNC(TIMER7), 740 + ASPEED_PINCTRL_FUNC(TIMER8), 741 + }; 742 + 743 + static struct aspeed_pinctrl_data aspeed_g5_pinctrl_data = { 744 + .pins = aspeed_g5_pins, 745 + .npins = ARRAY_SIZE(aspeed_g5_pins), 746 + .groups = aspeed_g5_groups, 747 + .ngroups = ARRAY_SIZE(aspeed_g5_groups), 748 + .functions = aspeed_g5_functions, 749 + .nfunctions = ARRAY_SIZE(aspeed_g5_functions), 750 + }; 751 + 752 + static struct pinmux_ops aspeed_g5_pinmux_ops = { 753 + .get_functions_count = aspeed_pinmux_get_fn_count, 754 + .get_function_name = aspeed_pinmux_get_fn_name, 755 + .get_function_groups = aspeed_pinmux_get_fn_groups, 756 + .set_mux = aspeed_pinmux_set_mux, 757 + .gpio_request_enable = aspeed_gpio_request_enable, 758 + .strict = true, 759 + }; 760 + 761 + static struct pinctrl_ops aspeed_g5_pinctrl_ops = { 762 + .get_groups_count = aspeed_pinctrl_get_groups_count, 763 + .get_group_name = aspeed_pinctrl_get_group_name, 764 + .get_group_pins = aspeed_pinctrl_get_group_pins, 765 + .pin_dbg_show = aspeed_pinctrl_pin_dbg_show, 766 + .dt_node_to_map = pinconf_generic_dt_node_to_map_pin, 767 + .dt_free_map = pinctrl_utils_free_map, 768 + }; 769 + 770 + static struct pinctrl_desc aspeed_g5_pinctrl_desc = { 771 + .name = "aspeed-g5-pinctrl", 772 + .pins = aspeed_g5_pins, 773 + .npins = ARRAY_SIZE(aspeed_g5_pins), 774 + .pctlops = &aspeed_g5_pinctrl_ops, 775 + .pmxops = &aspeed_g5_pinmux_ops, 776 + }; 777 + 778 + static int aspeed_g5_pinctrl_probe(struct platform_device *pdev) 779 + { 780 + int i; 781 + 782 + for (i = 0; i < ARRAY_SIZE(aspeed_g5_pins); i++) 783 + aspeed_g5_pins[i].number = i; 784 + 785 + return aspeed_pinctrl_probe(pdev, &aspeed_g5_pinctrl_desc, 786 + &aspeed_g5_pinctrl_data); 787 + } 788 + 789 + static const struct of_device_id aspeed_g5_pinctrl_of_match[] = { 790 + { .compatible = "aspeed,ast2500-pinctrl", }, 791 + { .compatible = "aspeed,g5-pinctrl", }, 792 + { }, 793 + }; 794 + 795 + static struct platform_driver aspeed_g5_pinctrl_driver = { 796 + .probe = aspeed_g5_pinctrl_probe, 797 + .driver = { 798 + .name = "aspeed-g5-pinctrl", 799 + .of_match_table = aspeed_g5_pinctrl_of_match, 800 + }, 801 + }; 802 + 803 + static int aspeed_g5_pinctrl_init(void) 804 + { 805 + return platform_driver_register(&aspeed_g5_pinctrl_driver); 806 + } 807 + 808 + arch_initcall(aspeed_g5_pinctrl_init);
+498
drivers/pinctrl/aspeed/pinctrl-aspeed.c
··· 1 + /* 2 + * Copyright (C) 2016 IBM Corp. 3 + * 4 + * This program is free software; you can redistribute it and/or modify 5 + * it under the terms of the GNU General Public License as published by 6 + * the Free Software Foundation; either version 2 of the License, or 7 + * (at your option) any later version. 8 + */ 9 + 10 + #include <linux/mfd/syscon.h> 11 + #include <linux/platform_device.h> 12 + #include <linux/slab.h> 13 + #include <linux/string.h> 14 + #include "../core.h" 15 + #include "pinctrl-aspeed.h" 16 + 17 + int aspeed_pinctrl_get_groups_count(struct pinctrl_dev *pctldev) 18 + { 19 + struct aspeed_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev); 20 + 21 + return pdata->ngroups; 22 + } 23 + 24 + const char *aspeed_pinctrl_get_group_name(struct pinctrl_dev *pctldev, 25 + unsigned int group) 26 + { 27 + struct aspeed_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev); 28 + 29 + return pdata->groups[group].name; 30 + } 31 + 32 + int aspeed_pinctrl_get_group_pins(struct pinctrl_dev *pctldev, 33 + unsigned int group, const unsigned int **pins, 34 + unsigned int *npins) 35 + { 36 + struct aspeed_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev); 37 + 38 + *pins = &pdata->groups[group].pins[0]; 39 + *npins = pdata->groups[group].npins; 40 + 41 + return 0; 42 + } 43 + 44 + void aspeed_pinctrl_pin_dbg_show(struct pinctrl_dev *pctldev, 45 + struct seq_file *s, unsigned int offset) 46 + { 47 + seq_printf(s, " %s", dev_name(pctldev->dev)); 48 + } 49 + 50 + int aspeed_pinmux_get_fn_count(struct pinctrl_dev *pctldev) 51 + { 52 + struct aspeed_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev); 53 + 54 + return pdata->nfunctions; 55 + } 56 + 57 + const char *aspeed_pinmux_get_fn_name(struct pinctrl_dev *pctldev, 58 + unsigned int function) 59 + { 60 + struct aspeed_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev); 61 + 62 + return pdata->functions[function].name; 63 + } 64 + 65 + int aspeed_pinmux_get_fn_groups(struct pinctrl_dev *pctldev, 66 + unsigned int function, 67 + const char * const **groups, 68 + unsigned int * const num_groups) 69 + { 70 + struct aspeed_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev); 71 + 72 + *groups = pdata->functions[function].groups; 73 + *num_groups = pdata->functions[function].ngroups; 74 + 75 + return 0; 76 + } 77 + 78 + static inline void aspeed_sig_desc_print_val( 79 + const struct aspeed_sig_desc *desc, bool enable, u32 rv) 80 + { 81 + pr_debug("SCU%x[0x%08x]=0x%x, got 0x%x from 0x%08x\n", desc->reg, 82 + desc->mask, enable ? desc->enable : desc->disable, 83 + (rv & desc->mask) >> __ffs(desc->mask), rv); 84 + } 85 + 86 + /** 87 + * Query the enabled or disabled state of a signal descriptor 88 + * 89 + * @desc: The signal descriptor of interest 90 + * @enabled: True to query the enabled state, false to query disabled state 91 + * @regmap: The SCU regmap instance 92 + * 93 + * @return True if the descriptor's bitfield is configured to the state 94 + * selected by @enabled, false otherwise 95 + * 96 + * Evaluation of descriptor state is non-trivial in that it is not a binary 97 + * outcome: The bitfields can be greater than one bit in size and thus can take 98 + * a value that is neither the enabled nor disabled state recorded in the 99 + * descriptor (typically this means a different function to the one of interest 100 + * is enabled). Thus we must explicitly test for either condition as required. 101 + */ 102 + static bool aspeed_sig_desc_eval(const struct aspeed_sig_desc *desc, 103 + bool enabled, struct regmap *map) 104 + { 105 + unsigned int raw; 106 + u32 want; 107 + 108 + if (regmap_read(map, desc->reg, &raw) < 0) 109 + return false; 110 + 111 + aspeed_sig_desc_print_val(desc, enabled, raw); 112 + want = enabled ? desc->enable : desc->disable; 113 + 114 + return ((raw & desc->mask) >> __ffs(desc->mask)) == want; 115 + } 116 + 117 + /** 118 + * Query the enabled or disabled state for a mux function's signal on a pin 119 + * 120 + * @expr: An expression controlling the signal for a mux function on a pin 121 + * @enabled: True to query the enabled state, false to query disabled state 122 + * @regmap: The SCU regmap instance 123 + * 124 + * @return True if the expression composed by @enabled evaluates true, false 125 + * otherwise 126 + * 127 + * A mux function is enabled or disabled if the function's signal expression 128 + * for each pin in the function's pin group evaluates true for the desired 129 + * state. An signal expression evaluates true if all of its associated signal 130 + * descriptors evaluate true for the desired state. 131 + * 132 + * If an expression's state is described by more than one bit, either through 133 + * multi-bit bitfields in a single signal descriptor or through multiple signal 134 + * descriptors of a single bit then it is possible for the expression to be in 135 + * neither the enabled nor disabled state. Thus we must explicitly test for 136 + * either condition as required. 137 + */ 138 + static bool aspeed_sig_expr_eval(const struct aspeed_sig_expr *expr, 139 + bool enabled, struct regmap *map) 140 + { 141 + int i; 142 + 143 + for (i = 0; i < expr->ndescs; i++) { 144 + const struct aspeed_sig_desc *desc = &expr->descs[i]; 145 + 146 + if (!aspeed_sig_desc_eval(desc, enabled, map)) 147 + return false; 148 + } 149 + 150 + return true; 151 + } 152 + 153 + /** 154 + * Configure a pin's signal by applying an expression's descriptor state for 155 + * all descriptors in the expression. 156 + * 157 + * @expr: The expression associated with the function whose signal is to be 158 + * configured 159 + * @enable: true to enable an function's signal through a pin's signal 160 + * expression, false to disable the function's signal 161 + * @map: The SCU's regmap instance for pinmux register access. 162 + * 163 + * @return true if the expression is configured as requested, false otherwise 164 + */ 165 + static bool aspeed_sig_expr_set(const struct aspeed_sig_expr *expr, 166 + bool enable, struct regmap *map) 167 + { 168 + int i; 169 + bool ret; 170 + 171 + ret = aspeed_sig_expr_eval(expr, enable, map); 172 + if (ret) 173 + return ret; 174 + 175 + for (i = 0; i < expr->ndescs; i++) { 176 + const struct aspeed_sig_desc *desc = &expr->descs[i]; 177 + u32 pattern = enable ? desc->enable : desc->disable; 178 + 179 + /* 180 + * Strap registers are configured in hardware or by early-boot 181 + * firmware. Treat them as read-only despite that we can write 182 + * them. This may mean that certain functions cannot be 183 + * deconfigured and is the reason we re-evaluate after writing 184 + * all descriptor bits. 185 + */ 186 + if (desc->reg == HW_STRAP1 || desc->reg == HW_STRAP2) 187 + continue; 188 + 189 + ret = regmap_update_bits(map, desc->reg, desc->mask, 190 + pattern << __ffs(desc->mask)) == 0; 191 + 192 + if (!ret) 193 + return ret; 194 + } 195 + 196 + return aspeed_sig_expr_eval(expr, enable, map); 197 + } 198 + 199 + static bool aspeed_sig_expr_enable(const struct aspeed_sig_expr *expr, 200 + struct regmap *map) 201 + { 202 + return aspeed_sig_expr_set(expr, true, map); 203 + } 204 + 205 + static bool aspeed_sig_expr_disable(const struct aspeed_sig_expr *expr, 206 + struct regmap *map) 207 + { 208 + return aspeed_sig_expr_set(expr, false, map); 209 + } 210 + 211 + /** 212 + * Disable a signal on a pin by disabling all provided signal expressions. 213 + * 214 + * @exprs: The list of signal expressions (from a priority level on a pin) 215 + * @map: The SCU's regmap instance for pinmux register access. 216 + * 217 + * @return true if all expressions in the list are successfully disabled, false 218 + * otherwise 219 + */ 220 + static bool aspeed_disable_sig(const struct aspeed_sig_expr **exprs, 221 + struct regmap *map) 222 + { 223 + bool disabled = true; 224 + 225 + if (!exprs) 226 + return true; 227 + 228 + while (*exprs) { 229 + bool ret; 230 + 231 + ret = aspeed_sig_expr_disable(*exprs, map); 232 + disabled = disabled && ret; 233 + 234 + exprs++; 235 + } 236 + 237 + return disabled; 238 + } 239 + 240 + /** 241 + * Search for the signal expression needed to enable the pin's signal for the 242 + * requested function. 243 + * 244 + * @exprs: List of signal expressions (haystack) 245 + * @name: The name of the requested function (needle) 246 + * 247 + * @return A pointer to the signal expression whose function tag matches the 248 + * provided name, otherwise NULL. 249 + * 250 + */ 251 + static const struct aspeed_sig_expr *aspeed_find_expr_by_name( 252 + const struct aspeed_sig_expr **exprs, const char *name) 253 + { 254 + while (*exprs) { 255 + if (strcmp((*exprs)->function, name) == 0) 256 + return *exprs; 257 + exprs++; 258 + } 259 + 260 + return NULL; 261 + } 262 + 263 + static char *get_defined_attribute(const struct aspeed_pin_desc *pdesc, 264 + const char *(*get)( 265 + const struct aspeed_sig_expr *)) 266 + { 267 + char *found = NULL; 268 + size_t len = 0; 269 + const struct aspeed_sig_expr ***prios, **funcs, *expr; 270 + 271 + prios = pdesc->prios; 272 + 273 + while ((funcs = *prios)) { 274 + while ((expr = *funcs)) { 275 + const char *str = get(expr); 276 + size_t delta = strlen(str) + 2; 277 + char *expanded; 278 + 279 + expanded = krealloc(found, len + delta + 1, GFP_KERNEL); 280 + if (!expanded) { 281 + kfree(found); 282 + return expanded; 283 + } 284 + 285 + found = expanded; 286 + found[len] = '\0'; 287 + len += delta; 288 + 289 + strcat(found, str); 290 + strcat(found, ", "); 291 + 292 + funcs++; 293 + } 294 + prios++; 295 + } 296 + 297 + if (len < 2) { 298 + kfree(found); 299 + return NULL; 300 + } 301 + 302 + found[len - 2] = '\0'; 303 + 304 + return found; 305 + } 306 + 307 + static const char *aspeed_sig_expr_function(const struct aspeed_sig_expr *expr) 308 + { 309 + return expr->function; 310 + } 311 + 312 + static char *get_defined_functions(const struct aspeed_pin_desc *pdesc) 313 + { 314 + return get_defined_attribute(pdesc, aspeed_sig_expr_function); 315 + } 316 + 317 + static const char *aspeed_sig_expr_signal(const struct aspeed_sig_expr *expr) 318 + { 319 + return expr->signal; 320 + } 321 + 322 + static char *get_defined_signals(const struct aspeed_pin_desc *pdesc) 323 + { 324 + return get_defined_attribute(pdesc, aspeed_sig_expr_signal); 325 + } 326 + 327 + int aspeed_pinmux_set_mux(struct pinctrl_dev *pctldev, unsigned int function, 328 + unsigned int group) 329 + { 330 + int i; 331 + const struct aspeed_pinctrl_data *pdata = 332 + pinctrl_dev_get_drvdata(pctldev); 333 + const struct aspeed_pin_group *pgroup = &pdata->groups[group]; 334 + const struct aspeed_pin_function *pfunc = 335 + &pdata->functions[function]; 336 + 337 + for (i = 0; i < pgroup->npins; i++) { 338 + int pin = pgroup->pins[i]; 339 + const struct aspeed_pin_desc *pdesc = pdata->pins[pin].drv_data; 340 + const struct aspeed_sig_expr *expr = NULL; 341 + const struct aspeed_sig_expr **funcs; 342 + const struct aspeed_sig_expr ***prios; 343 + 344 + if (!pdesc) 345 + return -EINVAL; 346 + 347 + prios = pdesc->prios; 348 + 349 + if (!prios) 350 + continue; 351 + 352 + /* Disable functions at a higher priority than that requested */ 353 + while ((funcs = *prios)) { 354 + expr = aspeed_find_expr_by_name(funcs, pfunc->name); 355 + 356 + if (expr) 357 + break; 358 + 359 + if (!aspeed_disable_sig(funcs, pdata->map)) 360 + return -EPERM; 361 + 362 + prios++; 363 + } 364 + 365 + if (!expr) { 366 + char *functions = get_defined_functions(pdesc); 367 + char *signals = get_defined_signals(pdesc); 368 + 369 + pr_warn("No function %s found on pin %s (%d). Found signal(s) %s for function(s) %s\n", 370 + pfunc->name, pdesc->name, pin, signals, 371 + functions); 372 + kfree(signals); 373 + kfree(functions); 374 + 375 + return -ENXIO; 376 + } 377 + 378 + if (!aspeed_sig_expr_enable(expr, pdata->map)) 379 + return -EPERM; 380 + } 381 + 382 + return 0; 383 + } 384 + 385 + static bool aspeed_expr_is_gpio(const struct aspeed_sig_expr *expr) 386 + { 387 + /* 388 + * The signal type is GPIO if the signal name has "GPIO" as a prefix. 389 + * strncmp (rather than strcmp) is used to implement the prefix 390 + * requirement. 391 + * 392 + * expr->signal might look like "GPIOT3" in the GPIO case. 393 + */ 394 + return strncmp(expr->signal, "GPIO", 4) == 0; 395 + } 396 + 397 + static bool aspeed_gpio_in_exprs(const struct aspeed_sig_expr **exprs) 398 + { 399 + if (!exprs) 400 + return false; 401 + 402 + while (*exprs) { 403 + if (aspeed_expr_is_gpio(*exprs)) 404 + return true; 405 + exprs++; 406 + } 407 + 408 + return false; 409 + } 410 + 411 + int aspeed_gpio_request_enable(struct pinctrl_dev *pctldev, 412 + struct pinctrl_gpio_range *range, 413 + unsigned int offset) 414 + { 415 + const struct aspeed_pinctrl_data *pdata = 416 + pinctrl_dev_get_drvdata(pctldev); 417 + const struct aspeed_pin_desc *pdesc = pdata->pins[offset].drv_data; 418 + const struct aspeed_sig_expr ***prios, **funcs, *expr; 419 + 420 + if (!pdesc) 421 + return -EINVAL; 422 + 423 + prios = pdesc->prios; 424 + 425 + if (!prios) 426 + return -ENXIO; 427 + 428 + /* Disable any functions of higher priority than GPIO */ 429 + while ((funcs = *prios)) { 430 + if (aspeed_gpio_in_exprs(funcs)) 431 + break; 432 + 433 + if (!aspeed_disable_sig(funcs, pdata->map)) 434 + return -EPERM; 435 + 436 + prios++; 437 + } 438 + 439 + if (!funcs) { 440 + char *signals = get_defined_signals(pdesc); 441 + 442 + pr_warn("No GPIO signal type found on pin %s (%d). Found: %s\n", 443 + pdesc->name, offset, signals); 444 + kfree(signals); 445 + 446 + return -ENXIO; 447 + } 448 + 449 + expr = *funcs; 450 + 451 + /* 452 + * Disabling all higher-priority expressions is enough to enable the 453 + * lowest-priority signal type. As such it has no associated 454 + * expression. 455 + */ 456 + if (!expr) 457 + return 0; 458 + 459 + /* 460 + * If GPIO is not the lowest priority signal type, assume there is only 461 + * one expression defined to enable the GPIO function 462 + */ 463 + if (!aspeed_sig_expr_enable(expr, pdata->map)) 464 + return -EPERM; 465 + 466 + return 0; 467 + } 468 + 469 + int aspeed_pinctrl_probe(struct platform_device *pdev, 470 + struct pinctrl_desc *pdesc, 471 + struct aspeed_pinctrl_data *pdata) 472 + { 473 + struct device *parent; 474 + struct pinctrl_dev *pctl; 475 + 476 + parent = pdev->dev.parent; 477 + if (!parent) { 478 + dev_err(&pdev->dev, "No parent for syscon pincontroller\n"); 479 + return -ENODEV; 480 + } 481 + 482 + pdata->map = syscon_node_to_regmap(parent->of_node); 483 + if (IS_ERR(pdata->map)) { 484 + dev_err(&pdev->dev, "No regmap for syscon pincontroller parent\n"); 485 + return PTR_ERR(pdata->map); 486 + } 487 + 488 + pctl = pinctrl_register(pdesc, &pdev->dev, pdata); 489 + 490 + if (IS_ERR(pctl)) { 491 + dev_err(&pdev->dev, "Failed to register pinctrl\n"); 492 + return PTR_ERR(pctl); 493 + } 494 + 495 + platform_set_drvdata(pdev, pdata); 496 + 497 + return 0; 498 + }
+569
drivers/pinctrl/aspeed/pinctrl-aspeed.h
··· 1 + /* 2 + * Copyright (C) 2016 IBM Corp. 3 + * 4 + * This program is free software; you can redistribute it and/or modify 5 + * it under the terms of the GNU General Public License as published by 6 + * the Free Software Foundation; either version 2 of the License, or 7 + * (at your option) any later version. 8 + */ 9 + 10 + #ifndef PINCTRL_ASPEED 11 + #define PINCTRL_ASPEED 12 + 13 + #include <linux/pinctrl/pinctrl.h> 14 + #include <linux/pinctrl/pinmux.h> 15 + #include <linux/pinctrl/pinconf.h> 16 + #include <linux/pinctrl/pinconf-generic.h> 17 + #include <linux/regmap.h> 18 + 19 + /* 20 + * The ASPEED SoCs provide typically more than 200 pins for GPIO and other 21 + * functions. The SoC function enabled on a pin is determined on a priority 22 + * basis where a given pin can provide a number of different signal types. 23 + * 24 + * The signal active on a pin is described by both a priority level and 25 + * compound logical expressions involving multiple operators, registers and 26 + * bits. Some difficulty arises as the pin's function bit masks for each 27 + * priority level are frequently not the same (i.e. cannot just flip a bit to 28 + * change from a high to low priority signal), or even in the same register. 29 + * Further, not all signals can be unmuxed, as some expressions depend on 30 + * values in the hardware strapping register (which is treated as read-only). 31 + * 32 + * SoC Multi-function Pin Expression Examples 33 + * ------------------------------------------ 34 + * 35 + * Here are some sample mux configurations from the AST2400 and AST2500 36 + * datasheets to illustrate the corner cases, roughly in order of least to most 37 + * corner. The signal priorities are in decending order from P0 (highest). 38 + * 39 + * D6 is a pin with a single function (beside GPIO); a high priority signal 40 + * that participates in one function: 41 + * 42 + * Ball | Default | P0 Signal | P0 Expression | P1 Signal | P1 Expression | Other 43 + * -----+---------+-----------+-----------------------------+-----------+---------------+---------- 44 + * D6 GPIOA0 MAC1LINK SCU80[0]=1 GPIOA0 45 + * -----+---------+-----------+-----------------------------+-----------+---------------+---------- 46 + * 47 + * C5 is a multi-signal pin (high and low priority signals). Here we touch 48 + * different registers for the different functions that enable each signal: 49 + * 50 + * -----+---------+-----------+-----------------------------+-----------+---------------+---------- 51 + * C5 GPIOA4 SCL9 SCU90[22]=1 TIMER5 SCU80[4]=1 GPIOA4 52 + * -----+---------+-----------+-----------------------------+-----------+---------------+---------- 53 + * 54 + * E19 is a single-signal pin with two functions that influence the active 55 + * signal. In this case both bits have the same meaning - enable a dedicated 56 + * LPC reset pin. However it's not always the case that the bits in the 57 + * OR-relationship have the same meaning. 58 + * 59 + * -----+---------+-----------+-----------------------------+-----------+---------------+---------- 60 + * E19 GPIOB4 LPCRST# SCU80[12]=1 | Strap[14]=1 GPIOB4 61 + * -----+---------+-----------+-----------------------------+-----------+---------------+---------- 62 + * 63 + * For example, pin B19 has a low-priority signal that's enabled by two 64 + * distinct SoC functions: A specific SIOPBI bit in register SCUA4, and an ACPI 65 + * bit in the STRAP register. The ACPI bit configures signals on pins in 66 + * addition to B19. Both of the low priority functions as well as the high 67 + * priority function must be disabled for GPIOF1 to be used. 68 + * 69 + * Ball | Default | P0 Signal | P0 Expression | P1 Signal | P1 Expression | Other 70 + * -----+---------+-----------+-----------------------------------------+-----------+----------------------------------------+---------- 71 + * B19 GPIOF1 NDCD4 SCU80[25]=1 SIOPBI# SCUA4[12]=1 | Strap[19]=0 GPIOF1 72 + * -----+---------+-----------+-----------------------------------------+-----------+----------------------------------------+---------- 73 + * 74 + * For pin E18, the SoC ANDs the expected state of three bits to determine the 75 + * pin's active signal: 76 + * 77 + * * SCU3C[3]: Enable external SOC reset function 78 + * * SCU80[15]: Enable SPICS1# or EXTRST# function pin 79 + * * SCU90[31]: Select SPI interface CS# output 80 + * 81 + * -----+---------+-----------+-----------------------------------------+-----------+----------------------------------------+---------- 82 + * E18 GPIOB7 EXTRST# SCU3C[3]=1 & SCU80[15]=1 & SCU90[31]=0 SPICS1# SCU3C[3]=1 & SCU80[15]=1 & SCU90[31]=1 GPIOB7 83 + * -----+---------+-----------+-----------------------------------------+-----------+----------------------------------------+---------- 84 + * 85 + * (Bits SCU3C[3] and SCU80[15] appear to only be used in the expressions for 86 + * selecting the signals on pin E18) 87 + * 88 + * Pin T5 is a multi-signal pin with a more complex configuration: 89 + * 90 + * Ball | Default | P0 Signal | P0 Expression | P1 Signal | P1 Expression | Other 91 + * -----+---------+-----------+------------------------------+-----------+---------------+---------- 92 + * T5 GPIOL1 VPIDE SCU90[5:4]!=0 & SCU84[17]=1 NDCD1 SCU84[17]=1 GPIOL1 93 + * -----+---------+-----------+------------------------------+-----------+---------------+---------- 94 + * 95 + * The high priority signal configuration is best thought of in terms of its 96 + * exploded form, with reference to the SCU90[5:4] bits: 97 + * 98 + * * SCU90[5:4]=00: disable 99 + * * SCU90[5:4]=01: 18 bits (R6/G6/B6) video mode. 100 + * * SCU90[5:4]=10: 24 bits (R8/G8/B8) video mode. 101 + * * SCU90[5:4]=11: 30 bits (R10/G10/B10) video mode. 102 + * 103 + * Re-writing: 104 + * 105 + * -----+---------+-----------+------------------------------+-----------+---------------+---------- 106 + * T5 GPIOL1 VPIDE (SCU90[5:4]=1 & SCU84[17]=1) NDCD1 SCU84[17]=1 GPIOL1 107 + * | (SCU90[5:4]=2 & SCU84[17]=1) 108 + * | (SCU90[5:4]=3 & SCU84[17]=1) 109 + * -----+---------+-----------+------------------------------+-----------+---------------+---------- 110 + * 111 + * For reference the SCU84[17] bit configure the "UART1 NDCD1 or Video VPIDE 112 + * function pin", where the signal itself is determined by whether SCU94[5:4] 113 + * is disabled or in one of the 18, 24 or 30bit video modes. 114 + * 115 + * Other video-input-related pins require an explicit state in SCU90[5:4], e.g. 116 + * W1 and U5: 117 + * 118 + * -----+---------+-----------+------------------------------+-----------+---------------+---------- 119 + * W1 GPIOL6 VPIB0 SCU90[5:4]=3 & SCU84[22]=1 TXD1 SCU84[22]=1 GPIOL6 120 + * U5 GPIOL7 VPIB1 SCU90[5:4]=3 & SCU84[23]=1 RXD1 SCU84[23]=1 GPIOL7 121 + * -----+---------+-----------+------------------------------+-----------+---------------+---------- 122 + * 123 + * The examples of T5 and W1 are particularly fertile, as they also demonstrate 124 + * that despite operating as part of the video input bus each signal needs to 125 + * be enabled individually via it's own SCU84 (in the cases of T5 and W1) 126 + * register bit. This is a little crazy if the bus doesn't have optional 127 + * signals, but is used to decent effect with some of the UARTs where not all 128 + * signals are required. However, this isn't done consistently - UART1 is 129 + * enabled on a per-pin basis, and by contrast, all signals for UART6 are 130 + * enabled by a single bit. 131 + * 132 + * Further, the high and low priority signals listed in the table above share 133 + * a configuration bit. The VPI signals should operate in concert in a single 134 + * function, but the UART signals should retain the ability to be configured 135 + * independently. This pushes the implementation down the path of tagging a 136 + * signal's expressions with the function they participate in, rather than 137 + * defining masks affecting multiple signals per function. The latter approach 138 + * fails in this instance where applying the configuration for the UART pin of 139 + * interest will stomp on the state of other UART signals when disabling the 140 + * VPI functions on the current pin. 141 + * 142 + * Ball | Default | P0 Signal | P0 Expression | P1 Signal | P1 Expression | Other 143 + * -----+------------+-----------+---------------------------+-----------+---------------+------------ 144 + * A12 RGMII1TXCK GPIOT0 SCUA0[0]=1 RMII1TXEN Strap[6]=0 RGMII1TXCK 145 + * B12 RGMII1TXCTL GPIOT1 SCUA0[1]=1 – Strap[6]=0 RGMII1TXCTL 146 + * -----+------------+-----------+---------------------------+-----------+---------------+------------ 147 + * 148 + * A12 demonstrates that the "Other" signal isn't always GPIO - in this case 149 + * GPIOT0 is a high-priority signal and RGMII1TXCK is Other. Thus, GPIO 150 + * should be treated like any other signal type with full function expression 151 + * requirements, and not assumed to be the default case. Separately, GPIOT0 and 152 + * GPIOT1's signal descriptor bits are distinct, therefore we must iterate all 153 + * pins in the function's group to disable the higher-priority signals such 154 + * that the signal for the function of interest is correctly enabled. 155 + * 156 + * Finally, three priority levels aren't always enough; the AST2500 brings with 157 + * it 18 pins of five priority levels, however the 18 pins only use three of 158 + * the five priority levels. 159 + * 160 + * Ultimately the requirement to control pins in the examples above drive the 161 + * design: 162 + * 163 + * * Pins provide signals according to functions activated in the mux 164 + * configuration 165 + * 166 + * * Pins provide up to five signal types in a priority order 167 + * 168 + * * For priorities levels defined on a pin, each priority provides one signal 169 + * 170 + * * Enabling lower priority signals requires higher priority signals be 171 + * disabled 172 + * 173 + * * A function represents a set of signals; functions are distinct if their 174 + * sets of signals are not equal 175 + * 176 + * * Signals participate in one or more functions 177 + * 178 + * * A function is described by an expression of one or more signal 179 + * descriptors, which compare bit values in a register 180 + * 181 + * * A signal expression is the smallest set of signal descriptors whose 182 + * comparisons must evaluate 'true' for a signal to be enabled on a pin. 183 + * 184 + * * A function's signal is active on a pin if evaluating all signal 185 + * descriptors in the pin's signal expression for the function yields a 'true' 186 + * result 187 + * 188 + * * A signal at a given priority on a given pin is active if any of the 189 + * functions in which the signal participates are active, and no higher 190 + * priority signal on the pin is active 191 + * 192 + * * GPIO is configured per-pin 193 + * 194 + * And so: 195 + * 196 + * * To disable a signal, any function(s) activating the signal must be 197 + * disabled 198 + * 199 + * * Each pin must know the signal expressions of functions in which it 200 + * participates, for the purpose of enabling the Other function. This is done 201 + * by deactivating all functions that activate higher priority signals on the 202 + * pin. 203 + * 204 + * As a concrete example: 205 + * 206 + * * T5 provides three signals types: VPIDE, NDCD1 and GPIO 207 + * 208 + * * The VPIDE signal participates in 3 functions: VPI18, VPI24 and VPI30 209 + * 210 + * * The NDCD1 signal participates in just its own NDCD1 function 211 + * 212 + * * VPIDE is high priority, NDCD1 is low priority, and GPIOL1 is the least 213 + * prioritised 214 + * 215 + * * The prerequisit for activating the NDCD1 signal is that the VPI18, VPI24 216 + * and VPI30 functions all be disabled 217 + * 218 + * * Similarly, all of VPI18, VPI24, VPI30 and NDCD1 functions must be disabled 219 + * to provide GPIOL6 220 + * 221 + * Considerations 222 + * -------------- 223 + * 224 + * If pinctrl allows us to allocate a pin we can configure a function without 225 + * concern for the function of already allocated pins, if pin groups are 226 + * created with respect to the SoC functions in which they participate. This is 227 + * intuitive, but it did not feel obvious from the bit/pin relationships. 228 + * 229 + * Conversely, failing to allocate all pins in a group indicates some bits (as 230 + * well as pins) required for the group's configuration will already be in use, 231 + * likely in a way that's inconsistent with the requirements of the failed 232 + * group. 233 + */ 234 + 235 + /* 236 + * The "Multi-function Pins Mapping and Control" table in the SoC datasheet 237 + * references registers by the device/offset mnemonic. The register macros 238 + * below are named the same way to ease transcription and verification (as 239 + * opposed to naming them e.g. PINMUX_CTRL_[0-9]). Further, signal expressions 240 + * reference registers beyond those dedicated to pinmux, such as the system 241 + * reset control and MAC clock configuration registers. The AST2500 goes a step 242 + * further and references registers in the graphics IP block, but that isn't 243 + * handled yet. 244 + */ 245 + #define SCU2C 0x2C /* Misc. Control Register */ 246 + #define SCU3C 0x3C /* System Reset Control/Status Register */ 247 + #define SCU48 0x48 /* MAC Interface Clock Delay Setting */ 248 + #define HW_STRAP1 0x70 /* AST2400 strapping is 33 bits, is split */ 249 + #define SCU80 0x80 /* Multi-function Pin Control #1 */ 250 + #define SCU84 0x84 /* Multi-function Pin Control #2 */ 251 + #define SCU88 0x88 /* Multi-function Pin Control #3 */ 252 + #define SCU8C 0x8C /* Multi-function Pin Control #4 */ 253 + #define SCU90 0x90 /* Multi-function Pin Control #5 */ 254 + #define SCU94 0x94 /* Multi-function Pin Control #6 */ 255 + #define SCUA0 0xA0 /* Multi-function Pin Control #7 */ 256 + #define SCUA4 0xA4 /* Multi-function Pin Control #8 */ 257 + #define SCUA8 0xA8 /* Multi-function Pin Control #9 */ 258 + #define HW_STRAP2 0xD0 /* Strapping */ 259 + 260 + /** 261 + * A signal descriptor, which describes the register, bits and the 262 + * enable/disable values that should be compared or written. 263 + * 264 + * @reg: The register offset from base in bytes 265 + * @mask: The mask to apply to the register. The lowest set bit of the mask is 266 + * used to derive the shift value. 267 + * @enable: The value that enables the function. Value should be in the LSBs, 268 + * not at the position of the mask. 269 + * @disable: The value that disables the function. Value should be in the 270 + * LSBs, not at the position of the mask. 271 + */ 272 + struct aspeed_sig_desc { 273 + unsigned int reg; 274 + u32 mask; 275 + u32 enable; 276 + u32 disable; 277 + }; 278 + 279 + /** 280 + * Describes a signal expression. The expression is evaluated by ANDing the 281 + * evaluation of the descriptors. 282 + * 283 + * @signal: The signal name for the priority level on the pin. If the signal 284 + * type is GPIO, then the signal name must begin with the string 285 + * "GPIO", e.g. GPIOA0, GPIOT4 etc. 286 + * @function: The name of the function the signal participates in for the 287 + * associated expression 288 + * @ndescs: The number of signal descriptors in the expression 289 + * @descs: Pointer to an array of signal descriptors that comprise the 290 + * function expression 291 + */ 292 + struct aspeed_sig_expr { 293 + const char *signal; 294 + const char *function; 295 + int ndescs; 296 + const struct aspeed_sig_desc *descs; 297 + }; 298 + 299 + /** 300 + * A struct capturing the list of expressions enabling signals at each priority 301 + * for a given pin. The signal configuration for a priority level is evaluated 302 + * by ORing the evaluation of the signal expressions in the respective 303 + * priority's list. 304 + * 305 + * @name: A name for the pin 306 + * @prios: A pointer to an array of expression list pointers 307 + * 308 + */ 309 + struct aspeed_pin_desc { 310 + const char *name; 311 + const struct aspeed_sig_expr ***prios; 312 + }; 313 + 314 + /* Macro hell */ 315 + 316 + /** 317 + * Short-hand macro for describing a configuration enabled by the state of one 318 + * bit. The disable value is derived. 319 + * 320 + * @reg: The signal's associated register, offset from base 321 + * @idx: The signal's bit index in the register 322 + * @val: The value (0 or 1) that enables the function 323 + */ 324 + #define SIG_DESC_BIT(reg, idx, val) \ 325 + { reg, BIT_MASK(idx), val, (((val) + 1) & 1) } 326 + 327 + /** 328 + * A further short-hand macro describing a configuration enabled with a set bit. 329 + * 330 + * @reg: The configuration's associated register, offset from base 331 + * @idx: The configuration's bit index in the register 332 + */ 333 + #define SIG_DESC_SET(reg, idx) SIG_DESC_BIT(reg, idx, 1) 334 + 335 + #define SIG_DESC_LIST_SYM(sig, func) sig_descs_ ## sig ## _ ## func 336 + #define SIG_DESC_LIST_DECL(sig, func, ...) \ 337 + static const struct aspeed_sig_desc SIG_DESC_LIST_SYM(sig, func)[] = \ 338 + { __VA_ARGS__ } 339 + 340 + #define SIG_EXPR_SYM(sig, func) sig_expr_ ## sig ## _ ## func 341 + #define SIG_EXPR_DECL_(sig, func) \ 342 + static const struct aspeed_sig_expr SIG_EXPR_SYM(sig, func) = \ 343 + { \ 344 + .signal = #sig, \ 345 + .function = #func, \ 346 + .ndescs = ARRAY_SIZE(SIG_DESC_LIST_SYM(sig, func)), \ 347 + .descs = &(SIG_DESC_LIST_SYM(sig, func))[0], \ 348 + } 349 + 350 + /** 351 + * Declare a signal expression. 352 + * 353 + * @sig: A macro symbol name for the signal (is subjected to stringification 354 + * and token pasting) 355 + * @func: The function in which the signal is participating 356 + * @...: Signal descriptors that define the signal expression 357 + * 358 + * For example, the following declares the ROMD8 signal for the ROM16 function: 359 + * 360 + * SIG_EXPR_DECL(ROMD8, ROM16, SIG_DESC_SET(SCU90, 6)); 361 + * 362 + * And with multiple signal descriptors: 363 + * 364 + * SIG_EXPR_DECL(ROMD8, ROM16S, SIG_DESC_SET(HW_STRAP1, 4), 365 + * { HW_STRAP1, GENMASK(1, 0), 0, 0 }); 366 + */ 367 + #define SIG_EXPR_DECL(sig, func, ...) \ 368 + SIG_DESC_LIST_DECL(sig, func, __VA_ARGS__); \ 369 + SIG_EXPR_DECL_(sig, func) 370 + 371 + /** 372 + * Declare a pointer to a signal expression 373 + * 374 + * @sig: The macro symbol name for the signal (subjected to token pasting) 375 + * @func: The macro symbol name for the function (subjected to token pasting) 376 + */ 377 + #define SIG_EXPR_PTR(sig, func) (&SIG_EXPR_SYM(sig, func)) 378 + 379 + #define SIG_EXPR_LIST_SYM(sig) sig_exprs_ ## sig 380 + 381 + /** 382 + * Declare a signal expression list for reference in a struct aspeed_pin_prio. 383 + * 384 + * @sig: A macro symbol name for the signal (is subjected to token pasting) 385 + * @...: Signal expression structure pointers (use SIG_EXPR_PTR()) 386 + * 387 + * For example, the 16-bit ROM bus can be enabled by one of two possible signal 388 + * expressions: 389 + * 390 + * SIG_EXPR_DECL(ROMD8, ROM16, SIG_DESC_SET(SCU90, 6)); 391 + * SIG_EXPR_DECL(ROMD8, ROM16S, SIG_DESC_SET(HW_STRAP1, 4), 392 + * { HW_STRAP1, GENMASK(1, 0), 0, 0 }); 393 + * SIG_EXPR_LIST_DECL(ROMD8, SIG_EXPR_PTR(ROMD8, ROM16), 394 + * SIG_EXPR_PTR(ROMD8, ROM16S)); 395 + */ 396 + #define SIG_EXPR_LIST_DECL(sig, ...) \ 397 + static const struct aspeed_sig_expr *SIG_EXPR_LIST_SYM(sig)[] = \ 398 + { __VA_ARGS__, NULL } 399 + 400 + /** 401 + * A short-hand macro for declaring a function expression and an expression 402 + * list with a single function. 403 + * 404 + * @func: A macro symbol name for the function (is subjected to token pasting) 405 + * @...: Function descriptors that define the function expression 406 + * 407 + * For example, signal NCTS6 participates in its own function with one group: 408 + * 409 + * SIG_EXPR_LIST_DECL_SINGLE(NCTS6, NCTS6, SIG_DESC_SET(SCU90, 7)); 410 + */ 411 + #define SIG_EXPR_LIST_DECL_SINGLE(sig, func, ...) \ 412 + SIG_DESC_LIST_DECL(sig, func, __VA_ARGS__); \ 413 + SIG_EXPR_DECL_(sig, func); \ 414 + SIG_EXPR_LIST_DECL(sig, SIG_EXPR_PTR(sig, func)) 415 + 416 + #define SIG_EXPR_LIST_DECL_DUAL(sig, f0, f1) \ 417 + SIG_EXPR_LIST_DECL(sig, SIG_EXPR_PTR(sig, f0), SIG_EXPR_PTR(sig, f1)) 418 + 419 + #define SIG_EXPR_LIST_PTR(sig) (&SIG_EXPR_LIST_SYM(sig)[0]) 420 + 421 + #define PIN_EXPRS_SYM(pin) pin_exprs_ ## pin 422 + #define PIN_EXPRS_PTR(pin) (&PIN_EXPRS_SYM(pin)[0]) 423 + #define PIN_SYM(pin) pin_ ## pin 424 + 425 + #define MS_PIN_DECL_(pin, ...) \ 426 + static const struct aspeed_sig_expr **PIN_EXPRS_SYM(pin)[] = \ 427 + { __VA_ARGS__, NULL }; \ 428 + static const struct aspeed_pin_desc PIN_SYM(pin) = \ 429 + { #pin, PIN_EXPRS_PTR(pin) } 430 + 431 + /** 432 + * Declare a multi-signal pin 433 + * 434 + * @pin: The pin number 435 + * @other: Macro name for "other" functionality (subjected to stringification) 436 + * @high: Macro name for the highest priority signal functions 437 + * @low: Macro name for the low signal functions 438 + * 439 + * For example: 440 + * 441 + * #define A8 56 442 + * SIG_EXPR_DECL(ROMD8, ROM16, SIG_DESC_SET(SCU90, 6)); 443 + * SIG_EXPR_DECL(ROMD8, ROM16S, SIG_DESC_SET(HW_STRAP1, 4), 444 + * { HW_STRAP1, GENMASK(1, 0), 0, 0 }); 445 + * SIG_EXPR_LIST_DECL(ROMD8, SIG_EXPR_PTR(ROMD8, ROM16), 446 + * SIG_EXPR_PTR(ROMD8, ROM16S)); 447 + * SIG_EXPR_LIST_DECL_SINGLE(NCTS6, NCTS6, SIG_DESC_SET(SCU90, 7)); 448 + * MS_PIN_DECL(A8, GPIOH0, ROMD8, NCTS6); 449 + */ 450 + #define MS_PIN_DECL(pin, other, high, low) \ 451 + SIG_EXPR_LIST_DECL_SINGLE(other, other); \ 452 + MS_PIN_DECL_(pin, \ 453 + SIG_EXPR_LIST_PTR(high), \ 454 + SIG_EXPR_LIST_PTR(low), \ 455 + SIG_EXPR_LIST_PTR(other)) 456 + 457 + #define PIN_GROUP_SYM(func) pins_ ## func 458 + #define FUNC_GROUP_SYM(func) groups_ ## func 459 + #define FUNC_GROUP_DECL(func, ...) \ 460 + static const int PIN_GROUP_SYM(func)[] = { __VA_ARGS__ }; \ 461 + static const char *FUNC_GROUP_SYM(func)[] = { #func } 462 + 463 + /** 464 + * Declare a single signal pin 465 + * 466 + * @pin: The pin number 467 + * @other: Macro name for "other" functionality (subjected to stringification) 468 + * @sig: Macro name for the signal (subjected to stringification) 469 + * 470 + * For example: 471 + * 472 + * #define E3 80 473 + * SIG_EXPR_LIST_DECL_SINGLE(SCL5, I2C5, I2C5_DESC); 474 + * SS_PIN_DECL(E3, GPIOK0, SCL5); 475 + */ 476 + #define SS_PIN_DECL(pin, other, sig) \ 477 + SIG_EXPR_LIST_DECL_SINGLE(other, other); \ 478 + MS_PIN_DECL_(pin, SIG_EXPR_LIST_PTR(sig), SIG_EXPR_LIST_PTR(other)) 479 + 480 + /** 481 + * Single signal, single function pin declaration 482 + * 483 + * @pin: The pin number 484 + * @other: Macro name for "other" functionality (subjected to stringification) 485 + * @sig: Macro name for the signal (subjected to stringification) 486 + * @...: Signal descriptors that define the function expression 487 + * 488 + * For example: 489 + * 490 + * SSSF_PIN_DECL(A4, GPIOA2, TIMER3, SIG_DESC_SET(SCU80, 2)); 491 + */ 492 + #define SSSF_PIN_DECL(pin, other, sig, ...) \ 493 + SIG_EXPR_LIST_DECL_SINGLE(sig, sig, __VA_ARGS__); \ 494 + SIG_EXPR_LIST_DECL_SINGLE(other, other); \ 495 + MS_PIN_DECL_(pin, SIG_EXPR_LIST_PTR(sig), SIG_EXPR_LIST_PTR(other)); \ 496 + FUNC_GROUP_DECL(sig, pin) 497 + 498 + #define GPIO_PIN_DECL(pin, gpio) \ 499 + SIG_EXPR_LIST_DECL_SINGLE(gpio, gpio); \ 500 + MS_PIN_DECL_(pin, SIG_EXPR_LIST_PTR(gpio)) 501 + 502 + struct aspeed_pinctrl_data { 503 + struct regmap *map; 504 + 505 + const struct pinctrl_pin_desc *pins; 506 + const unsigned int npins; 507 + 508 + const struct aspeed_pin_group *groups; 509 + const unsigned int ngroups; 510 + 511 + const struct aspeed_pin_function *functions; 512 + const unsigned int nfunctions; 513 + }; 514 + 515 + #define ASPEED_PINCTRL_PIN(name_) \ 516 + [name_] = { \ 517 + .number = name_, \ 518 + .name = #name_, \ 519 + .drv_data = (void *) &(PIN_SYM(name_)) \ 520 + } 521 + 522 + struct aspeed_pin_group { 523 + const char *name; 524 + const unsigned int *pins; 525 + const unsigned int npins; 526 + }; 527 + 528 + #define ASPEED_PINCTRL_GROUP(name_) { \ 529 + .name = #name_, \ 530 + .pins = &(PIN_GROUP_SYM(name_))[0], \ 531 + .npins = ARRAY_SIZE(PIN_GROUP_SYM(name_)), \ 532 + } 533 + 534 + struct aspeed_pin_function { 535 + const char *name; 536 + const char *const *groups; 537 + unsigned int ngroups; 538 + }; 539 + 540 + #define ASPEED_PINCTRL_FUNC(name_, ...) { \ 541 + .name = #name_, \ 542 + .groups = &FUNC_GROUP_SYM(name_)[0], \ 543 + .ngroups = ARRAY_SIZE(FUNC_GROUP_SYM(name_)), \ 544 + } 545 + 546 + int aspeed_pinctrl_get_groups_count(struct pinctrl_dev *pctldev); 547 + const char *aspeed_pinctrl_get_group_name(struct pinctrl_dev *pctldev, 548 + unsigned int group); 549 + int aspeed_pinctrl_get_group_pins(struct pinctrl_dev *pctldev, 550 + unsigned int group, const unsigned int **pins, 551 + unsigned int *npins); 552 + void aspeed_pinctrl_pin_dbg_show(struct pinctrl_dev *pctldev, 553 + struct seq_file *s, unsigned int offset); 554 + int aspeed_pinmux_get_fn_count(struct pinctrl_dev *pctldev); 555 + const char *aspeed_pinmux_get_fn_name(struct pinctrl_dev *pctldev, 556 + unsigned int function); 557 + int aspeed_pinmux_get_fn_groups(struct pinctrl_dev *pctldev, 558 + unsigned int function, const char * const **groups, 559 + unsigned int * const num_groups); 560 + int aspeed_pinmux_set_mux(struct pinctrl_dev *pctldev, unsigned int function, 561 + unsigned int group); 562 + int aspeed_gpio_request_enable(struct pinctrl_dev *pctldev, 563 + struct pinctrl_gpio_range *range, 564 + unsigned int offset); 565 + int aspeed_pinctrl_probe(struct platform_device *pdev, 566 + struct pinctrl_desc *pdesc, 567 + struct aspeed_pinctrl_data *pdata); 568 + 569 + #endif /* PINCTRL_ASPEED */
+2 -2
drivers/pinctrl/bcm/pinctrl-bcm281xx.c
··· 1018 1018 seq_printf(s, " %s", dev_name(pctldev->dev)); 1019 1019 } 1020 1020 1021 - static struct pinctrl_ops bcm281xx_pinctrl_ops = { 1021 + static const struct pinctrl_ops bcm281xx_pinctrl_ops = { 1022 1022 .get_groups_count = bcm281xx_pinctrl_get_groups_count, 1023 1023 .get_group_name = bcm281xx_pinctrl_get_group_name, 1024 1024 .get_group_pins = bcm281xx_pinctrl_get_group_pins, ··· 1080 1080 return rc; 1081 1081 } 1082 1082 1083 - static struct pinmux_ops bcm281xx_pinctrl_pinmux_ops = { 1083 + static const struct pinmux_ops bcm281xx_pinctrl_pinmux_ops = { 1084 1084 .get_functions_count = bcm281xx_pinctrl_get_fcns_count, 1085 1085 .get_function_name = bcm281xx_pinctrl_get_fcn_name, 1086 1086 .get_function_groups = bcm281xx_pinctrl_get_fcn_groups,
+2 -2
drivers/pinctrl/bcm/pinctrl-ns2-mux.c
··· 531 531 seq_printf(s, " %s", dev_name(pctrl_dev->dev)); 532 532 } 533 533 534 - static struct pinctrl_ops ns2_pinctrl_ops = { 534 + static const struct pinctrl_ops ns2_pinctrl_ops = { 535 535 .get_groups_count = ns2_get_groups_count, 536 536 .get_group_name = ns2_get_group_name, 537 537 .get_group_pins = ns2_get_group_pins, ··· 959 959 out: 960 960 return ret; 961 961 } 962 - static struct pinmux_ops ns2_pinmux_ops = { 962 + static const struct pinmux_ops ns2_pinmux_ops = { 963 963 .get_functions_count = ns2_get_functions_count, 964 964 .get_function_name = ns2_get_function_name, 965 965 .get_function_groups = ns2_get_function_groups,
+2 -2
drivers/pinctrl/bcm/pinctrl-nsp-mux.c
··· 348 348 seq_printf(s, " %s", dev_name(pctrl_dev->dev)); 349 349 } 350 350 351 - static struct pinctrl_ops nsp_pinctrl_ops = { 351 + static const struct pinctrl_ops nsp_pinctrl_ops = { 352 352 .get_groups_count = nsp_get_groups_count, 353 353 .get_group_name = nsp_get_group_name, 354 354 .get_group_pins = nsp_get_group_pins, ··· 518 518 spin_unlock_irqrestore(&pinctrl->lock, flags); 519 519 } 520 520 521 - static struct pinmux_ops nsp_pinmux_ops = { 521 + static const struct pinmux_ops nsp_pinmux_ops = { 522 522 .get_functions_count = nsp_get_functions_count, 523 523 .get_function_name = nsp_get_function_name, 524 524 .get_function_groups = nsp_get_function_groups,
+3 -3
drivers/pinctrl/freescale/pinctrl-imx.c
··· 315 315 316 316 /* Currently implementation only for shared mux/conf register */ 317 317 if (!(info->flags & SHARE_MUX_CONF_REG)) 318 - return -EINVAL; 318 + return 0; 319 319 320 320 pin_reg = &info->pin_regs[offset]; 321 321 if (pin_reg->mux_reg == -1) ··· 380 380 * They are part of the shared mux/conf register. 381 381 */ 382 382 if (!(info->flags & SHARE_MUX_CONF_REG)) 383 - return -EINVAL; 383 + return 0; 384 384 385 385 pin_reg = &info->pin_regs[offset]; 386 386 if (pin_reg->mux_reg == -1) ··· 501 501 ret = imx_pinconf_get(pctldev, pin->pin, &config); 502 502 if (ret) 503 503 return; 504 - seq_printf(s, "%s: 0x%lx", name, config); 504 + seq_printf(s, " %s: 0x%lx\n", name, config); 505 505 } 506 506 } 507 507
+36 -19
drivers/pinctrl/intel/pinctrl-cherryview.c
··· 134 134 * @gpio_ranges: An array of GPIO ranges in this community 135 135 * @ngpio_ranges: Number of GPIO ranges 136 136 * @ngpios: Total number of GPIOs in this community 137 + * @nirqs: Total number of IRQs this community can generate 137 138 */ 138 139 struct chv_community { 139 140 const char *uid; ··· 147 146 const struct chv_gpio_pinrange *gpio_ranges; 148 147 size_t ngpio_ranges; 149 148 size_t ngpios; 149 + size_t nirqs; 150 150 }; 151 151 152 152 struct chv_pin_context { ··· 398 396 .gpio_ranges = southwest_gpio_ranges, 399 397 .ngpio_ranges = ARRAY_SIZE(southwest_gpio_ranges), 400 398 .ngpios = ARRAY_SIZE(southwest_pins), 399 + /* 400 + * Southwest community can benerate GPIO interrupts only for the 401 + * first 8 interrupts. The upper half (8-15) can only be used to 402 + * trigger GPEs. 403 + */ 404 + .nirqs = 8, 401 405 }; 402 406 403 407 static const struct pinctrl_pin_desc north_pins[] = { ··· 487 479 .gpio_ranges = north_gpio_ranges, 488 480 .ngpio_ranges = ARRAY_SIZE(north_gpio_ranges), 489 481 .ngpios = ARRAY_SIZE(north_pins), 482 + /* 483 + * North community can benerate GPIO interrupts only for the first 484 + * 8 interrupts. The upper half (8-15) can only be used to trigger 485 + * GPEs. 486 + */ 487 + .nirqs = 8, 490 488 }; 491 489 492 490 static const struct pinctrl_pin_desc east_pins[] = { ··· 535 521 .gpio_ranges = east_gpio_ranges, 536 522 .ngpio_ranges = ARRAY_SIZE(east_gpio_ranges), 537 523 .ngpios = ARRAY_SIZE(east_pins), 524 + .nirqs = 16, 538 525 }; 539 526 540 527 static const struct pinctrl_pin_desc southeast_pins[] = { ··· 661 646 .gpio_ranges = southeast_gpio_ranges, 662 647 .ngpio_ranges = ARRAY_SIZE(southeast_gpio_ranges), 663 648 .ngpios = ARRAY_SIZE(southeast_pins), 649 + .nirqs = 16, 664 650 }; 665 651 666 652 static const struct chv_community *chv_communities[] = { ··· 1513 1497 chained_irq_enter(chip, desc); 1514 1498 1515 1499 pending = readl(pctrl->regs + CHV_INTSTAT); 1516 - for_each_set_bit(intr_line, &pending, 16) { 1500 + for_each_set_bit(intr_line, &pending, pctrl->community->nirqs) { 1517 1501 unsigned irq, offset; 1518 1502 1519 1503 offset = pctrl->intr_lines[intr_line]; ··· 1536 1520 chip->label = dev_name(pctrl->dev); 1537 1521 chip->parent = pctrl->dev; 1538 1522 chip->base = -1; 1523 + chip->irq_need_valid_mask = true; 1539 1524 1540 - ret = gpiochip_add_data(chip, pctrl); 1525 + ret = devm_gpiochip_add_data(pctrl->dev, chip, pctrl); 1541 1526 if (ret) { 1542 1527 dev_err(pctrl->dev, "Failed to register gpiochip\n"); 1543 1528 return ret; ··· 1550 1533 range->base, range->npins); 1551 1534 if (ret) { 1552 1535 dev_err(pctrl->dev, "failed to add GPIO pin range\n"); 1553 - goto fail; 1536 + return ret; 1554 1537 } 1555 1538 1556 1539 offset += range->npins; 1540 + } 1541 + 1542 + /* Do not add GPIOs that can only generate GPEs to the IRQ domain */ 1543 + for (i = 0; i < pctrl->community->npins; i++) { 1544 + const struct pinctrl_pin_desc *desc; 1545 + u32 intsel; 1546 + 1547 + desc = &pctrl->community->pins[i]; 1548 + 1549 + intsel = readl(chv_padreg(pctrl, desc->number, CHV_PADCTRL0)); 1550 + intsel &= CHV_PADCTRL0_INTSEL_MASK; 1551 + intsel >>= CHV_PADCTRL0_INTSEL_SHIFT; 1552 + 1553 + if (intsel >= pctrl->community->nirqs) 1554 + clear_bit(i, chip->irq_valid_mask); 1557 1555 } 1558 1556 1559 1557 /* Clear all interrupts */ ··· 1578 1546 handle_bad_irq, IRQ_TYPE_NONE); 1579 1547 if (ret) { 1580 1548 dev_err(pctrl->dev, "failed to add IRQ chip\n"); 1581 - goto fail; 1549 + return ret; 1582 1550 } 1583 1551 1584 1552 gpiochip_set_chained_irqchip(chip, &chv_gpio_irqchip, irq, 1585 1553 chv_gpio_irq_handler); 1586 1554 return 0; 1587 - 1588 - fail: 1589 - gpiochip_remove(chip); 1590 - 1591 - return ret; 1592 1555 } 1593 1556 1594 1557 static int chv_pinctrl_probe(struct platform_device *pdev) ··· 1647 1620 return ret; 1648 1621 1649 1622 platform_set_drvdata(pdev, pctrl); 1650 - 1651 - return 0; 1652 - } 1653 - 1654 - static int chv_pinctrl_remove(struct platform_device *pdev) 1655 - { 1656 - struct chv_pinctrl *pctrl = platform_get_drvdata(pdev); 1657 - 1658 - gpiochip_remove(&pctrl->chip); 1659 1623 1660 1624 return 0; 1661 1625 } ··· 1747 1729 1748 1730 static struct platform_driver chv_pinctrl_driver = { 1749 1731 .probe = chv_pinctrl_probe, 1750 - .remove = chv_pinctrl_remove, 1751 1732 .driver = { 1752 1733 .name = "cherryview-pinctrl", 1753 1734 .pm = &chv_pinctrl_pm_ops,
+5 -28
drivers/pinctrl/intel/pinctrl-intel.c
··· 86 86 * @communities: All communities in this pin controller 87 87 * @ncommunities: Number of communities in this pin controller 88 88 * @context: Configuration saved over system sleep 89 + * @irq: pinctrl/GPIO chip irq number 89 90 */ 90 91 struct intel_pinctrl { 91 92 struct device *dev; ··· 98 97 struct intel_community *communities; 99 98 size_t ncommunities; 100 99 struct intel_pinctrl_context context; 100 + int irq; 101 101 }; 102 102 103 103 #define pin_to_padno(c, p) ((p) - (c)->pin_base) ··· 795 793 { 796 794 struct gpio_chip *gc = irq_data_get_irq_chip_data(d); 797 795 struct intel_pinctrl *pctrl = gpiochip_get_data(gc); 798 - const struct intel_community *community; 799 796 unsigned pin = irqd_to_hwirq(d); 800 - unsigned padno, gpp, gpp_offset; 801 - unsigned long flags; 802 - u32 gpe_en; 803 797 804 - community = intel_get_community(pctrl, pin); 805 - if (!community) 806 - return -EINVAL; 807 - 808 - raw_spin_lock_irqsave(&pctrl->lock, flags); 809 - 810 - padno = pin_to_padno(community, pin); 811 - gpp = padno / community->gpp_size; 812 - gpp_offset = padno % community->gpp_size; 813 - 814 - /* Clear the existing wake status */ 815 - writel(BIT(gpp_offset), community->regs + GPI_GPE_STS + gpp * 4); 816 - 817 - /* 818 - * The controller will generate wake when GPE of the corresponding 819 - * pad is enabled and it is not routed to SCI (GPIROUTSCI is not 820 - * set). 821 - */ 822 - gpe_en = readl(community->regs + GPI_GPE_EN + gpp * 4); 823 798 if (on) 824 - gpe_en |= BIT(gpp_offset); 799 + enable_irq_wake(pctrl->irq); 825 800 else 826 - gpe_en &= ~BIT(gpp_offset); 827 - writel(gpe_en, community->regs + GPI_GPE_EN + gpp * 4); 828 - 829 - raw_spin_unlock_irqrestore(&pctrl->lock, flags); 801 + disable_irq_wake(pctrl->irq); 830 802 831 803 dev_dbg(pctrl->dev, "%sable wake for pin %u\n", on ? "en" : "dis", pin); 832 804 return 0; ··· 881 905 pctrl->chip.label = dev_name(pctrl->dev); 882 906 pctrl->chip.parent = pctrl->dev; 883 907 pctrl->chip.base = -1; 908 + pctrl->irq = irq; 884 909 885 910 ret = gpiochip_add_data(&pctrl->chip, pctrl); 886 911 if (ret) {
+1 -1
drivers/pinctrl/intel/pinctrl-merrifield.c
··· 854 854 */ 855 855 nfamilies = ARRAY_SIZE(mrfld_families), 856 856 families = devm_kmemdup(&pdev->dev, mrfld_families, 857 - nfamilies * sizeof(mrfld_families), 857 + sizeof(mrfld_families), 858 858 GFP_KERNEL); 859 859 if (!families) 860 860 return -ENOMEM;
+1 -6
drivers/pinctrl/mediatek/pinctrl-mtk-common.c
··· 15 15 16 16 #include <linux/io.h> 17 17 #include <linux/gpio/driver.h> 18 - #include <linux/module.h> 19 18 #include <linux/of.h> 20 19 #include <linux/of_address.h> 21 20 #include <linux/of_device.h> ··· 1054 1055 return 0; 1055 1056 } 1056 1057 1057 - static struct gpio_chip mtk_gpio_chip = { 1058 + static const struct gpio_chip mtk_gpio_chip = { 1058 1059 .owner = THIS_MODULE, 1059 1060 .request = gpiochip_generic_request, 1060 1061 .free = gpiochip_generic_free, ··· 1495 1496 gpiochip_remove(pctl->chip); 1496 1497 return ret; 1497 1498 } 1498 - 1499 - MODULE_LICENSE("GPL"); 1500 - MODULE_DESCRIPTION("MediaTek Pinctrl Driver"); 1501 - MODULE_AUTHOR("Hongzhou Yang <hongzhou.yang@mediatek.com>");
+183 -18
drivers/pinctrl/meson/pinctrl-meson-gxbb.c
··· 156 156 static const unsigned int emmc_cmd_pins[] = { PIN(BOOT_10, EE_OFF) }; 157 157 static const unsigned int emmc_ds_pins[] = { PIN(BOOT_15, EE_OFF) }; 158 158 159 + static const unsigned int nor_d_pins[] = { PIN(BOOT_11, EE_OFF) }; 160 + static const unsigned int nor_q_pins[] = { PIN(BOOT_12, EE_OFF) }; 161 + static const unsigned int nor_c_pins[] = { PIN(BOOT_13, EE_OFF) }; 162 + static const unsigned int nor_cs_pins[] = { PIN(BOOT_15, EE_OFF) }; 163 + 159 164 static const unsigned int sdcard_d0_pins[] = { PIN(CARD_1, EE_OFF) }; 160 165 static const unsigned int sdcard_d1_pins[] = { PIN(CARD_0, EE_OFF) }; 161 166 static const unsigned int sdcard_d2_pins[] = { PIN(CARD_5, EE_OFF) }; 162 167 static const unsigned int sdcard_d3_pins[] = { PIN(CARD_4, EE_OFF) }; 163 168 static const unsigned int sdcard_cmd_pins[] = { PIN(CARD_3, EE_OFF) }; 164 169 static const unsigned int sdcard_clk_pins[] = { PIN(CARD_2, EE_OFF) }; 170 + 171 + static const unsigned int sdio_d0_pins[] = { PIN(GPIOX_0, EE_OFF) }; 172 + static const unsigned int sdio_d1_pins[] = { PIN(GPIOX_1, EE_OFF) }; 173 + static const unsigned int sdio_d2_pins[] = { PIN(GPIOX_2, EE_OFF) }; 174 + static const unsigned int sdio_d3_pins[] = { PIN(GPIOX_3, EE_OFF) }; 175 + static const unsigned int sdio_cmd_pins[] = { PIN(GPIOX_4, EE_OFF) }; 176 + static const unsigned int sdio_clk_pins[] = { PIN(GPIOX_5, EE_OFF) }; 177 + static const unsigned int sdio_irq_pins[] = { PIN(GPIOX_7, EE_OFF) }; 178 + 179 + static const unsigned int nand_ce0_pins[] = { PIN(BOOT_8, EE_OFF) }; 180 + static const unsigned int nand_ce1_pins[] = { PIN(BOOT_9, EE_OFF) }; 181 + static const unsigned int nand_rb0_pins[] = { PIN(BOOT_10, EE_OFF) }; 182 + static const unsigned int nand_ale_pins[] = { PIN(BOOT_11, EE_OFF) }; 183 + static const unsigned int nand_cle_pins[] = { PIN(BOOT_12, EE_OFF) }; 184 + static const unsigned int nand_wen_clk_pins[] = { PIN(BOOT_13, EE_OFF) }; 185 + static const unsigned int nand_ren_wr_pins[] = { PIN(BOOT_14, EE_OFF) }; 186 + static const unsigned int nand_dqs_pins[] = { PIN(BOOT_15, EE_OFF) }; 165 187 166 188 static const unsigned int uart_tx_a_pins[] = { PIN(GPIOX_12, EE_OFF) }; 167 189 static const unsigned int uart_rx_a_pins[] = { PIN(GPIOX_13, EE_OFF) }; ··· 200 178 static const unsigned int uart_cts_c_pins[] = { PIN(GPIOX_11, EE_OFF) }; 201 179 static const unsigned int uart_rts_c_pins[] = { PIN(GPIOX_12, EE_OFF) }; 202 180 181 + static const unsigned int i2c_sck_a_pins[] = { PIN(GPIODV_25, EE_OFF) }; 182 + static const unsigned int i2c_sda_a_pins[] = { PIN(GPIODV_24, EE_OFF) }; 183 + 184 + static const unsigned int i2c_sck_b_pins[] = { PIN(GPIODV_27, EE_OFF) }; 185 + static const unsigned int i2c_sda_b_pins[] = { PIN(GPIODV_26, EE_OFF) }; 186 + 187 + static const unsigned int i2c_sck_c_pins[] = { PIN(GPIODV_29, EE_OFF) }; 188 + static const unsigned int i2c_sda_c_pins[] = { PIN(GPIODV_28, EE_OFF) }; 189 + 203 190 static const unsigned int eth_mdio_pins[] = { PIN(GPIOZ_0, EE_OFF) }; 204 191 static const unsigned int eth_mdc_pins[] = { PIN(GPIOZ_1, EE_OFF) }; 205 192 static const unsigned int eth_clk_rx_clk_pins[] = { PIN(GPIOZ_2, EE_OFF) }; ··· 223 192 static const unsigned int eth_txd1_pins[] = { PIN(GPIOZ_11, EE_OFF) }; 224 193 static const unsigned int eth_txd2_pins[] = { PIN(GPIOZ_12, EE_OFF) }; 225 194 static const unsigned int eth_txd3_pins[] = { PIN(GPIOZ_13, EE_OFF) }; 195 + 196 + static const unsigned int pwm_a_x_pins[] = { PIN(GPIOX_6, EE_OFF) }; 197 + static const unsigned int pwm_a_y_pins[] = { PIN(GPIOY_16, EE_OFF) }; 198 + static const unsigned int pwm_b_pins[] = { PIN(GPIODV_29, EE_OFF) }; 199 + static const unsigned int pwm_d_pins[] = { PIN(GPIODV_28, EE_OFF) }; 200 + static const unsigned int pwm_e_pins[] = { PIN(GPIOX_19, EE_OFF) }; 201 + static const unsigned int pwm_f_x_pins[] = { PIN(GPIOX_7, EE_OFF) }; 202 + static const unsigned int pwm_f_y_pins[] = { PIN(GPIOY_15, EE_OFF) }; 226 203 227 204 static const struct pinctrl_pin_desc meson_gxbb_aobus_pins[] = { 228 205 MESON_PIN(GPIOAO_0, 0), ··· 263 224 static const unsigned int i2c_sda_ao_pins[] = {PIN(GPIOAO_5, 0) }; 264 225 static const unsigned int i2c_slave_sck_ao_pins[] = {PIN(GPIOAO_4, 0) }; 265 226 static const unsigned int i2c_slave_sda_ao_pins[] = {PIN(GPIOAO_5, 0) }; 227 + 228 + static const unsigned int remote_input_ao_pins[] = {PIN(GPIOAO_7, 0) }; 229 + 230 + static const unsigned int pwm_ao_a_3_pins[] = { PIN(GPIOAO_3, 0) }; 231 + static const unsigned int pwm_ao_a_6_pins[] = { PIN(GPIOAO_6, 0) }; 232 + static const unsigned int pwm_ao_a_12_pins[] = { PIN(GPIOAO_12, 0) }; 233 + static const unsigned int pwm_ao_b_pins[] = { PIN(GPIOAO_13, 0) }; 266 234 267 235 static struct meson_pmx_group meson_gxbb_periphs_groups[] = { 268 236 GPIO_GROUP(GPIOZ_0, EE_OFF), ··· 401 355 GPIO_GROUP(GPIO_TEST_N, EE_OFF), 402 356 403 357 /* Bank X */ 358 + GROUP(sdio_d0, 8, 5), 359 + GROUP(sdio_d1, 8, 4), 360 + GROUP(sdio_d2, 8, 3), 361 + GROUP(sdio_d3, 8, 2), 362 + GROUP(sdio_cmd, 8, 1), 363 + GROUP(sdio_clk, 8, 0), 364 + GROUP(sdio_irq, 8, 11), 404 365 GROUP(uart_tx_a, 4, 13), 405 366 GROUP(uart_rx_a, 4, 12), 406 367 GROUP(uart_cts_a, 4, 11), 407 368 GROUP(uart_rts_a, 4, 10), 369 + GROUP(pwm_a_x, 3, 17), 370 + GROUP(pwm_e, 2, 30), 371 + GROUP(pwm_f_x, 3, 18), 408 372 409 373 /* Bank Y */ 410 374 GROUP(uart_cts_c, 1, 19), 411 375 GROUP(uart_rts_c, 1, 18), 412 376 GROUP(uart_tx_c, 1, 17), 413 377 GROUP(uart_rx_c, 1, 16), 378 + GROUP(pwm_a_y, 1, 21), 379 + GROUP(pwm_f_y, 1, 20), 414 380 415 381 /* Bank Z */ 416 382 GROUP(eth_mdio, 6, 1), ··· 445 387 GROUP(uart_rx_b, 2, 28), 446 388 GROUP(uart_cts_b, 2, 27), 447 389 GROUP(uart_rts_b, 2, 26), 390 + GROUP(pwm_b, 3, 21), 391 + GROUP(pwm_d, 3, 20), 392 + GROUP(i2c_sck_a, 7, 27), 393 + GROUP(i2c_sda_a, 7, 26), 394 + GROUP(i2c_sck_b, 7, 25), 395 + GROUP(i2c_sda_b, 7, 24), 396 + GROUP(i2c_sck_c, 7, 23), 397 + GROUP(i2c_sda_c, 7, 22), 448 398 449 399 /* Bank BOOT */ 450 400 GROUP(emmc_nand_d07, 4, 30), 451 401 GROUP(emmc_clk, 4, 18), 452 402 GROUP(emmc_cmd, 4, 19), 453 403 GROUP(emmc_ds, 4, 31), 404 + GROUP(nor_d, 5, 1), 405 + GROUP(nor_q, 5, 3), 406 + GROUP(nor_c, 5, 2), 407 + GROUP(nor_cs, 5, 0), 408 + GROUP(nand_ce0, 4, 26), 409 + GROUP(nand_ce1, 4, 27), 410 + GROUP(nand_rb0, 4, 25), 411 + GROUP(nand_ale, 4, 24), 412 + GROUP(nand_cle, 4, 23), 413 + GROUP(nand_wen_clk, 4, 22), 414 + GROUP(nand_ren_wr, 4, 21), 415 + GROUP(nand_dqs, 4, 20), 454 416 455 417 /* Bank CARD */ 456 418 GROUP(sdcard_d1, 2, 14), ··· 510 432 GROUP(i2c_sda_ao, 0, 5), 511 433 GROUP(i2c_slave_sck_ao, 0, 2), 512 434 GROUP(i2c_slave_sda_ao, 0, 1), 435 + GROUP(remote_input_ao, 0, 0), 436 + GROUP(pwm_ao_a_3, 0, 22), 437 + GROUP(pwm_ao_a_6, 0, 18), 438 + GROUP(pwm_ao_a_12, 0, 17), 439 + GROUP(pwm_ao_b, 0, 3), 513 440 }; 514 441 515 442 static const char * const gpio_periphs_groups[] = { ··· 558 475 "emmc_nand_d07", "emmc_clk", "emmc_cmd", "emmc_ds", 559 476 }; 560 477 478 + static const char * const nor_groups[] = { 479 + "nor_d", "nor_q", "nor_c", "nor_cs", 480 + }; 481 + 561 482 static const char * const sdcard_groups[] = { 562 483 "sdcard_d0", "sdcard_d1", "sdcard_d2", "sdcard_d3", 563 484 "sdcard_cmd", "sdcard_clk", 485 + }; 486 + 487 + static const char * const sdio_groups[] = { 488 + "sdio_d0", "sdio_d1", "sdio_d2", "sdio_d3", 489 + "sdio_cmd", "sdio_clk", "sdio_irq", 490 + }; 491 + 492 + static const char * const nand_groups[] = { 493 + "nand_ce0", "nand_ce1", "nand_rb0", "nand_ale", "nand_cle", 494 + "nand_wen_clk", "nand_ren_wr", "nand_dqs", 564 495 }; 565 496 566 497 static const char * const uart_a_groups[] = { ··· 589 492 "uart_tx_c", "uart_rx_c", "uart_cts_c", "uart_rts_c", 590 493 }; 591 494 495 + static const char * const i2c_a_groups[] = { 496 + "i2c_sck_a", "i2c_sda_a", 497 + }; 498 + 499 + static const char * const i2c_b_groups[] = { 500 + "i2c_sck_b", "i2c_sda_b", 501 + }; 502 + 503 + static const char * const i2c_c_groups[] = { 504 + "i2c_sck_c", "i2c_sda_c", 505 + }; 506 + 592 507 static const char * const eth_groups[] = { 593 508 "eth_mdio", "eth_mdc", "eth_clk_rx_clk", "eth_rx_dv", 594 509 "eth_rxd0", "eth_rxd1", "eth_rxd2", "eth_rxd3", 595 510 "eth_rgmii_tx_clk", "eth_tx_en", 596 511 "eth_txd0", "eth_txd1", "eth_txd2", "eth_txd3", 512 + }; 513 + 514 + static const char * const pwm_a_x_groups[] = { 515 + "pwm_a_x", 516 + }; 517 + 518 + static const char * const pwm_a_y_groups[] = { 519 + "pwm_a_y", 520 + }; 521 + 522 + static const char * const pwm_b_groups[] = { 523 + "pwm_b", 524 + }; 525 + 526 + static const char * const pwm_d_groups[] = { 527 + "pwm_d", 528 + }; 529 + 530 + static const char * const pwm_e_groups[] = { 531 + "pwm_e", 532 + }; 533 + 534 + static const char * const pwm_f_x_groups[] = { 535 + "pwm_f_x", 536 + }; 537 + 538 + static const char * const pwm_f_y_groups[] = { 539 + "pwm_f_y", 597 540 }; 598 541 599 542 static const char * const gpio_aobus_groups[] = { ··· 658 521 "i2c_slave_sdk_ao", "i2c_slave_sda_ao", 659 522 }; 660 523 524 + static const char * const remote_input_ao_groups[] = { 525 + "remote_input_ao", 526 + }; 527 + 528 + static const char * const pwm_ao_a_3_groups[] = { 529 + "pwm_ao_a_3", 530 + }; 531 + 532 + static const char * const pwm_ao_a_6_groups[] = { 533 + "pwm_ao_a_6", 534 + }; 535 + 536 + static const char * const pwm_ao_a_12_groups[] = { 537 + "pwm_ao_a_12", 538 + }; 539 + 540 + static const char * const pwm_ao_b_groups[] = { 541 + "pwm_ao_b", 542 + }; 543 + 661 544 static struct meson_pmx_func meson_gxbb_periphs_functions[] = { 662 545 FUNCTION(gpio_periphs), 663 546 FUNCTION(emmc), 547 + FUNCTION(nor), 664 548 FUNCTION(sdcard), 549 + FUNCTION(sdio), 550 + FUNCTION(nand), 665 551 FUNCTION(uart_a), 666 552 FUNCTION(uart_b), 667 553 FUNCTION(uart_c), 554 + FUNCTION(i2c_a), 555 + FUNCTION(i2c_b), 556 + FUNCTION(i2c_c), 668 557 FUNCTION(eth), 558 + FUNCTION(pwm_a_x), 559 + FUNCTION(pwm_a_y), 560 + FUNCTION(pwm_b), 561 + FUNCTION(pwm_d), 562 + FUNCTION(pwm_e), 563 + FUNCTION(pwm_f_x), 564 + FUNCTION(pwm_f_y), 669 565 }; 670 566 671 567 static struct meson_pmx_func meson_gxbb_aobus_functions[] = { ··· 707 537 FUNCTION(uart_ao_b), 708 538 FUNCTION(i2c_ao), 709 539 FUNCTION(i2c_slave_ao), 540 + FUNCTION(remote_input_ao), 541 + FUNCTION(pwm_ao_a_3), 542 + FUNCTION(pwm_ao_a_6), 543 + FUNCTION(pwm_ao_a_12), 544 + FUNCTION(pwm_ao_b), 710 545 }; 711 546 712 547 static struct meson_bank meson_gxbb_periphs_banks[] = { ··· 731 556 BANK("AO", PIN(GPIOAO_0, 0), PIN(GPIOAO_13, 0), 0, 0, 0, 16, 0, 0, 0, 16, 1, 0), 732 557 }; 733 558 734 - static struct meson_domain_data meson_gxbb_periphs_domain_data = { 735 - .name = "periphs-banks", 736 - .banks = meson_gxbb_periphs_banks, 737 - .num_banks = ARRAY_SIZE(meson_gxbb_periphs_banks), 738 - .pin_base = 14, 739 - .num_pins = 120, 740 - }; 741 - 742 - static struct meson_domain_data meson_gxbb_aobus_domain_data = { 743 - .name = "aobus-banks", 744 - .banks = meson_gxbb_aobus_banks, 745 - .num_banks = ARRAY_SIZE(meson_gxbb_aobus_banks), 746 - .pin_base = 0, 747 - .num_pins = 14, 748 - }; 749 - 750 559 struct meson_pinctrl_data meson_gxbb_periphs_pinctrl_data = { 560 + .name = "periphs-banks", 561 + .pin_base = 14, 751 562 .pins = meson_gxbb_periphs_pins, 752 563 .groups = meson_gxbb_periphs_groups, 753 564 .funcs = meson_gxbb_periphs_functions, 754 - .domain_data = &meson_gxbb_periphs_domain_data, 565 + .banks = meson_gxbb_periphs_banks, 755 566 .num_pins = ARRAY_SIZE(meson_gxbb_periphs_pins), 756 567 .num_groups = ARRAY_SIZE(meson_gxbb_periphs_groups), 757 568 .num_funcs = ARRAY_SIZE(meson_gxbb_periphs_functions), 569 + .num_banks = ARRAY_SIZE(meson_gxbb_periphs_banks), 758 570 }; 759 571 760 572 struct meson_pinctrl_data meson_gxbb_aobus_pinctrl_data = { 573 + .name = "aobus-banks", 574 + .pin_base = 0, 761 575 .pins = meson_gxbb_aobus_pins, 762 576 .groups = meson_gxbb_aobus_groups, 763 577 .funcs = meson_gxbb_aobus_functions, 764 - .domain_data = &meson_gxbb_aobus_domain_data, 578 + .banks = meson_gxbb_aobus_banks, 765 579 .num_pins = ARRAY_SIZE(meson_gxbb_aobus_pins), 766 580 .num_groups = ARRAY_SIZE(meson_gxbb_aobus_groups), 767 581 .num_funcs = ARRAY_SIZE(meson_gxbb_aobus_functions), 582 + .num_banks = ARRAY_SIZE(meson_gxbb_aobus_banks), 768 583 };
+86 -134
drivers/pinctrl/meson/pinctrl-meson.c
··· 21 21 * domain which can't be powered off; the bank also uses a set of 22 22 * registers different from the other banks. 23 23 * 24 - * For each of the two power domains (regular and always-on) there are 25 - * 4 different register ranges that control the following properties 26 - * of the pins: 24 + * For each pin controller there are 4 different register ranges that 25 + * control the following properties of the pins: 27 26 * 1) pin muxing 28 27 * 2) pull enable/disable 29 28 * 3) pull up/down ··· 32 33 * direction are the same and thus there are only 3 register ranges. 33 34 * 34 35 * Every pinmux group can be enabled by a specific bit in the first 35 - * register range of the domain; when all groups for a given pin are 36 - * disabled the pin acts as a GPIO. 36 + * register range; when all groups for a given pin are disabled the 37 + * pin acts as a GPIO. 37 38 * 38 39 * For the pull and GPIO configuration every bank uses a contiguous 39 40 * set of bits in the register sets described above; the same register ··· 65 66 /** 66 67 * meson_get_bank() - find the bank containing a given pin 67 68 * 68 - * @domain: the domain containing the pin 69 + * @pc: the pinctrl instance 69 70 * @pin: the pin number 70 71 * @bank: the found bank 71 72 * 72 73 * Return: 0 on success, a negative value on error 73 74 */ 74 - static int meson_get_bank(struct meson_domain *domain, unsigned int pin, 75 + static int meson_get_bank(struct meson_pinctrl *pc, unsigned int pin, 75 76 struct meson_bank **bank) 76 77 { 77 78 int i; 78 79 79 - for (i = 0; i < domain->data->num_banks; i++) { 80 - if (pin >= domain->data->banks[i].first && 81 - pin <= domain->data->banks[i].last) { 82 - *bank = &domain->data->banks[i]; 80 + for (i = 0; i < pc->data->num_banks; i++) { 81 + if (pin >= pc->data->banks[i].first && 82 + pin <= pc->data->banks[i].last) { 83 + *bank = &pc->data->banks[i]; 83 84 return 0; 84 85 } 85 - } 86 - 87 - return -EINVAL; 88 - } 89 - 90 - /** 91 - * meson_get_domain_and_bank() - find domain and bank containing a given pin 92 - * 93 - * @pc: Meson pin controller device 94 - * @pin: the pin number 95 - * @domain: the found domain 96 - * @bank: the found bank 97 - * 98 - * Return: 0 on success, a negative value on error 99 - */ 100 - static int meson_get_domain_and_bank(struct meson_pinctrl *pc, unsigned int pin, 101 - struct meson_domain **domain, 102 - struct meson_bank **bank) 103 - { 104 - struct meson_domain *d; 105 - 106 - d = pc->domain; 107 - 108 - if (pin >= d->data->pin_base && 109 - pin < d->data->pin_base + d->data->num_pins) { 110 - *domain = d; 111 - return meson_get_bank(d, pin, bank); 112 86 } 113 87 114 88 return -EINVAL; ··· 162 190 unsigned int pin, int sel_group) 163 191 { 164 192 struct meson_pmx_group *group; 165 - struct meson_domain *domain; 166 193 int i, j; 167 194 168 195 for (i = 0; i < pc->data->num_groups; i++) { ··· 172 201 for (j = 0; j < group->num_pins; j++) { 173 202 if (group->pins[j] == pin) { 174 203 /* We have found a group using the pin */ 175 - domain = pc->domain; 176 - regmap_update_bits(domain->reg_mux, 204 + regmap_update_bits(pc->reg_mux, 177 205 group->reg * 4, 178 206 BIT(group->bit), 0); 179 207 } ··· 186 216 struct meson_pinctrl *pc = pinctrl_dev_get_drvdata(pcdev); 187 217 struct meson_pmx_func *func = &pc->data->funcs[func_num]; 188 218 struct meson_pmx_group *group = &pc->data->groups[group_num]; 189 - struct meson_domain *domain = pc->domain; 190 219 int i, ret = 0; 191 220 192 221 dev_dbg(pc->dev, "enable function %s, group %s\n", func->name, ··· 200 231 201 232 /* Function 0 (GPIO) doesn't need any additional setting */ 202 233 if (func_num) 203 - ret = regmap_update_bits(domain->reg_mux, group->reg * 4, 234 + ret = regmap_update_bits(pc->reg_mux, group->reg * 4, 204 235 BIT(group->bit), BIT(group->bit)); 205 236 206 237 return ret; ··· 256 287 unsigned long *configs, unsigned num_configs) 257 288 { 258 289 struct meson_pinctrl *pc = pinctrl_dev_get_drvdata(pcdev); 259 - struct meson_domain *domain; 260 290 struct meson_bank *bank; 261 291 enum pin_config_param param; 262 292 unsigned int reg, bit; 263 293 int i, ret; 264 294 u16 arg; 265 295 266 - ret = meson_get_domain_and_bank(pc, pin, &domain, &bank); 296 + ret = meson_get_bank(pc, pin, &bank); 267 297 if (ret) 268 298 return ret; 269 299 ··· 275 307 dev_dbg(pc->dev, "pin %u: disable bias\n", pin); 276 308 277 309 meson_calc_reg_and_bit(bank, pin, REG_PULL, &reg, &bit); 278 - ret = regmap_update_bits(domain->reg_pull, reg, 310 + ret = regmap_update_bits(pc->reg_pull, reg, 279 311 BIT(bit), 0); 280 312 if (ret) 281 313 return ret; ··· 285 317 286 318 meson_calc_reg_and_bit(bank, pin, REG_PULLEN, 287 319 &reg, &bit); 288 - ret = regmap_update_bits(domain->reg_pullen, reg, 320 + ret = regmap_update_bits(pc->reg_pullen, reg, 289 321 BIT(bit), BIT(bit)); 290 322 if (ret) 291 323 return ret; 292 324 293 325 meson_calc_reg_and_bit(bank, pin, REG_PULL, &reg, &bit); 294 - ret = regmap_update_bits(domain->reg_pull, reg, 326 + ret = regmap_update_bits(pc->reg_pull, reg, 295 327 BIT(bit), BIT(bit)); 296 328 if (ret) 297 329 return ret; ··· 301 333 302 334 meson_calc_reg_and_bit(bank, pin, REG_PULLEN, 303 335 &reg, &bit); 304 - ret = regmap_update_bits(domain->reg_pullen, reg, 336 + ret = regmap_update_bits(pc->reg_pullen, reg, 305 337 BIT(bit), BIT(bit)); 306 338 if (ret) 307 339 return ret; 308 340 309 341 meson_calc_reg_and_bit(bank, pin, REG_PULL, &reg, &bit); 310 - ret = regmap_update_bits(domain->reg_pull, reg, 342 + ret = regmap_update_bits(pc->reg_pull, reg, 311 343 BIT(bit), 0); 312 344 if (ret) 313 345 return ret; ··· 322 354 323 355 static int meson_pinconf_get_pull(struct meson_pinctrl *pc, unsigned int pin) 324 356 { 325 - struct meson_domain *domain; 326 357 struct meson_bank *bank; 327 358 unsigned int reg, bit, val; 328 359 int ret, conf; 329 360 330 - ret = meson_get_domain_and_bank(pc, pin, &domain, &bank); 361 + ret = meson_get_bank(pc, pin, &bank); 331 362 if (ret) 332 363 return ret; 333 364 334 365 meson_calc_reg_and_bit(bank, pin, REG_PULLEN, &reg, &bit); 335 366 336 - ret = regmap_read(domain->reg_pullen, reg, &val); 367 + ret = regmap_read(pc->reg_pullen, reg, &val); 337 368 if (ret) 338 369 return ret; 339 370 ··· 341 374 } else { 342 375 meson_calc_reg_and_bit(bank, pin, REG_PULL, &reg, &bit); 343 376 344 - ret = regmap_read(domain->reg_pull, reg, &val); 377 + ret = regmap_read(pc->reg_pull, reg, &val); 345 378 if (ret) 346 379 return ret; 347 380 ··· 419 452 420 453 static void meson_gpio_free(struct gpio_chip *chip, unsigned gpio) 421 454 { 422 - struct meson_domain *domain = gpiochip_get_data(chip); 455 + struct meson_pinctrl *pc = gpiochip_get_data(chip); 423 456 424 - pinctrl_free_gpio(domain->data->pin_base + gpio); 457 + pinctrl_free_gpio(pc->data->pin_base + gpio); 425 458 } 426 459 427 460 static int meson_gpio_direction_input(struct gpio_chip *chip, unsigned gpio) 428 461 { 429 - struct meson_domain *domain = gpiochip_get_data(chip); 462 + struct meson_pinctrl *pc = gpiochip_get_data(chip); 430 463 unsigned int reg, bit, pin; 431 464 struct meson_bank *bank; 432 465 int ret; 433 466 434 - pin = domain->data->pin_base + gpio; 435 - ret = meson_get_bank(domain, pin, &bank); 467 + pin = pc->data->pin_base + gpio; 468 + ret = meson_get_bank(pc, pin, &bank); 436 469 if (ret) 437 470 return ret; 438 471 439 472 meson_calc_reg_and_bit(bank, pin, REG_DIR, &reg, &bit); 440 473 441 - return regmap_update_bits(domain->reg_gpio, reg, BIT(bit), BIT(bit)); 474 + return regmap_update_bits(pc->reg_gpio, reg, BIT(bit), BIT(bit)); 442 475 } 443 476 444 477 static int meson_gpio_direction_output(struct gpio_chip *chip, unsigned gpio, 445 478 int value) 446 479 { 447 - struct meson_domain *domain = gpiochip_get_data(chip); 480 + struct meson_pinctrl *pc = gpiochip_get_data(chip); 448 481 unsigned int reg, bit, pin; 449 482 struct meson_bank *bank; 450 483 int ret; 451 484 452 - pin = domain->data->pin_base + gpio; 453 - ret = meson_get_bank(domain, pin, &bank); 485 + pin = pc->data->pin_base + gpio; 486 + ret = meson_get_bank(pc, pin, &bank); 454 487 if (ret) 455 488 return ret; 456 489 457 490 meson_calc_reg_and_bit(bank, pin, REG_DIR, &reg, &bit); 458 - ret = regmap_update_bits(domain->reg_gpio, reg, BIT(bit), 0); 491 + ret = regmap_update_bits(pc->reg_gpio, reg, BIT(bit), 0); 459 492 if (ret) 460 493 return ret; 461 494 462 495 meson_calc_reg_and_bit(bank, pin, REG_OUT, &reg, &bit); 463 - return regmap_update_bits(domain->reg_gpio, reg, BIT(bit), 496 + return regmap_update_bits(pc->reg_gpio, reg, BIT(bit), 464 497 value ? BIT(bit) : 0); 465 498 } 466 499 467 500 static void meson_gpio_set(struct gpio_chip *chip, unsigned gpio, int value) 468 501 { 469 - struct meson_domain *domain = gpiochip_get_data(chip); 502 + struct meson_pinctrl *pc = gpiochip_get_data(chip); 470 503 unsigned int reg, bit, pin; 471 504 struct meson_bank *bank; 472 505 int ret; 473 506 474 - pin = domain->data->pin_base + gpio; 475 - ret = meson_get_bank(domain, pin, &bank); 507 + pin = pc->data->pin_base + gpio; 508 + ret = meson_get_bank(pc, pin, &bank); 476 509 if (ret) 477 510 return; 478 511 479 512 meson_calc_reg_and_bit(bank, pin, REG_OUT, &reg, &bit); 480 - regmap_update_bits(domain->reg_gpio, reg, BIT(bit), 513 + regmap_update_bits(pc->reg_gpio, reg, BIT(bit), 481 514 value ? BIT(bit) : 0); 482 515 } 483 516 484 517 static int meson_gpio_get(struct gpio_chip *chip, unsigned gpio) 485 518 { 486 - struct meson_domain *domain = gpiochip_get_data(chip); 519 + struct meson_pinctrl *pc = gpiochip_get_data(chip); 487 520 unsigned int reg, bit, val, pin; 488 521 struct meson_bank *bank; 489 522 int ret; 490 523 491 - pin = domain->data->pin_base + gpio; 492 - ret = meson_get_bank(domain, pin, &bank); 524 + pin = pc->data->pin_base + gpio; 525 + ret = meson_get_bank(pc, pin, &bank); 493 526 if (ret) 494 527 return ret; 495 528 496 529 meson_calc_reg_and_bit(bank, pin, REG_IN, &reg, &bit); 497 - regmap_read(domain->reg_gpio, reg, &val); 530 + regmap_read(pc->reg_gpio, reg, &val); 498 531 499 532 return !!(val & BIT(bit)); 500 533 } ··· 529 562 530 563 static int meson_gpiolib_register(struct meson_pinctrl *pc) 531 564 { 532 - struct meson_domain *domain; 533 565 int ret; 534 566 535 - domain = pc->domain; 567 + pc->chip.label = pc->data->name; 568 + pc->chip.parent = pc->dev; 569 + pc->chip.request = meson_gpio_request; 570 + pc->chip.free = meson_gpio_free; 571 + pc->chip.direction_input = meson_gpio_direction_input; 572 + pc->chip.direction_output = meson_gpio_direction_output; 573 + pc->chip.get = meson_gpio_get; 574 + pc->chip.set = meson_gpio_set; 575 + pc->chip.base = pc->data->pin_base; 576 + pc->chip.ngpio = pc->data->num_pins; 577 + pc->chip.can_sleep = false; 578 + pc->chip.of_node = pc->of_node; 579 + pc->chip.of_gpio_n_cells = 2; 536 580 537 - domain->chip.label = domain->data->name; 538 - domain->chip.parent = pc->dev; 539 - domain->chip.request = meson_gpio_request; 540 - domain->chip.free = meson_gpio_free; 541 - domain->chip.direction_input = meson_gpio_direction_input; 542 - domain->chip.direction_output = meson_gpio_direction_output; 543 - domain->chip.get = meson_gpio_get; 544 - domain->chip.set = meson_gpio_set; 545 - domain->chip.base = domain->data->pin_base; 546 - domain->chip.ngpio = domain->data->num_pins; 547 - domain->chip.can_sleep = false; 548 - domain->chip.of_node = domain->of_node; 549 - domain->chip.of_gpio_n_cells = 2; 550 - 551 - ret = gpiochip_add_data(&domain->chip, domain); 581 + ret = gpiochip_add_data(&pc->chip, pc); 552 582 if (ret) { 553 583 dev_err(pc->dev, "can't add gpio chip %s\n", 554 - domain->data->name); 584 + pc->data->name); 555 585 goto fail; 556 586 } 557 587 558 - ret = gpiochip_add_pin_range(&domain->chip, dev_name(pc->dev), 559 - 0, domain->data->pin_base, 560 - domain->chip.ngpio); 588 + ret = gpiochip_add_pin_range(&pc->chip, dev_name(pc->dev), 589 + 0, pc->data->pin_base, 590 + pc->chip.ngpio); 561 591 if (ret) { 562 592 dev_err(pc->dev, "can't add pin range\n"); 563 593 goto fail; ··· 562 598 563 599 return 0; 564 600 fail: 565 - gpiochip_remove(&pc->domain->chip); 601 + gpiochip_remove(&pc->chip); 566 602 567 603 return ret; 568 604 } ··· 601 637 static int meson_pinctrl_parse_dt(struct meson_pinctrl *pc, 602 638 struct device_node *node) 603 639 { 604 - struct device_node *np; 605 - struct meson_domain *domain; 606 - int num_domains = 0; 640 + struct device_node *np, *gpio_np = NULL; 607 641 608 642 for_each_child_of_node(node, np) { 609 643 if (!of_find_property(np, "gpio-controller", NULL)) 610 644 continue; 611 - num_domains++; 645 + if (gpio_np) { 646 + dev_err(pc->dev, "multiple gpio nodes\n"); 647 + return -EINVAL; 648 + } 649 + gpio_np = np; 612 650 } 613 651 614 - if (num_domains != 1) { 615 - dev_err(pc->dev, "wrong number of subnodes\n"); 652 + if (!gpio_np) { 653 + dev_err(pc->dev, "no gpio node found\n"); 616 654 return -EINVAL; 617 655 } 618 656 619 - pc->domain = devm_kzalloc(pc->dev, sizeof(struct meson_domain), GFP_KERNEL); 620 - if (!pc->domain) 621 - return -ENOMEM; 657 + pc->of_node = gpio_np; 622 658 623 - domain = pc->domain; 624 - domain->data = pc->data->domain_data; 659 + pc->reg_mux = meson_map_resource(pc, gpio_np, "mux"); 660 + if (IS_ERR(pc->reg_mux)) { 661 + dev_err(pc->dev, "mux registers not found\n"); 662 + return PTR_ERR(pc->reg_mux); 663 + } 625 664 626 - for_each_child_of_node(node, np) { 627 - if (!of_find_property(np, "gpio-controller", NULL)) 628 - continue; 665 + pc->reg_pull = meson_map_resource(pc, gpio_np, "pull"); 666 + if (IS_ERR(pc->reg_pull)) { 667 + dev_err(pc->dev, "pull registers not found\n"); 668 + return PTR_ERR(pc->reg_pull); 669 + } 629 670 630 - domain->of_node = np; 671 + pc->reg_pullen = meson_map_resource(pc, gpio_np, "pull-enable"); 672 + /* Use pull region if pull-enable one is not present */ 673 + if (IS_ERR(pc->reg_pullen)) 674 + pc->reg_pullen = pc->reg_pull; 631 675 632 - domain->reg_mux = meson_map_resource(pc, np, "mux"); 633 - if (IS_ERR(domain->reg_mux)) { 634 - dev_err(pc->dev, "mux registers not found\n"); 635 - return PTR_ERR(domain->reg_mux); 636 - } 637 - 638 - domain->reg_pull = meson_map_resource(pc, np, "pull"); 639 - if (IS_ERR(domain->reg_pull)) { 640 - dev_err(pc->dev, "pull registers not found\n"); 641 - return PTR_ERR(domain->reg_pull); 642 - } 643 - 644 - domain->reg_pullen = meson_map_resource(pc, np, "pull-enable"); 645 - /* Use pull region if pull-enable one is not present */ 646 - if (IS_ERR(domain->reg_pullen)) 647 - domain->reg_pullen = domain->reg_pull; 648 - 649 - domain->reg_gpio = meson_map_resource(pc, np, "gpio"); 650 - if (IS_ERR(domain->reg_gpio)) { 651 - dev_err(pc->dev, "gpio registers not found\n"); 652 - return PTR_ERR(domain->reg_gpio); 653 - } 654 - 655 - break; 676 + pc->reg_gpio = meson_map_resource(pc, gpio_np, "gpio"); 677 + if (IS_ERR(pc->reg_gpio)) { 678 + dev_err(pc->dev, "gpio registers not found\n"); 679 + return PTR_ERR(pc->reg_gpio); 656 680 } 657 681 658 682 return 0;
+10 -42
drivers/pinctrl/meson/pinctrl-meson.h
··· 95 95 struct meson_reg_desc regs[NUM_REG]; 96 96 }; 97 97 98 - /** 99 - * struct meson_domain_data - domain platform data 100 - * 101 - * @name: name of the domain 102 - * @banks: set of banks belonging to the domain 103 - * @num_banks: number of banks in the domain 104 - */ 105 - struct meson_domain_data { 106 - const char *name; 107 - struct meson_bank *banks; 108 - unsigned int num_banks; 109 - unsigned int pin_base; 110 - unsigned int num_pins; 111 - }; 112 - 113 - /** 114 - * struct meson_domain 115 - * 116 - * @reg_mux: registers for mux settings 117 - * @reg_pullen: registers for pull-enable settings 118 - * @reg_pull: registers for pull settings 119 - * @reg_gpio: registers for gpio settings 120 - * @chip: gpio chip associated with the domain 121 - * @data; platform data for the domain 122 - * @node: device tree node for the domain 123 - * 124 - * A domain represents a set of banks controlled by the same set of 125 - * registers. 126 - */ 127 - struct meson_domain { 128 - struct regmap *reg_mux; 129 - struct regmap *reg_pullen; 130 - struct regmap *reg_pull; 131 - struct regmap *reg_gpio; 132 - 133 - struct gpio_chip chip; 134 - struct meson_domain_data *data; 135 - struct device_node *of_node; 136 - }; 137 - 138 98 struct meson_pinctrl_data { 99 + const char *name; 139 100 const struct pinctrl_pin_desc *pins; 140 101 struct meson_pmx_group *groups; 141 102 struct meson_pmx_func *funcs; 142 - struct meson_domain_data *domain_data; 103 + unsigned int pin_base; 143 104 unsigned int num_pins; 144 105 unsigned int num_groups; 145 106 unsigned int num_funcs; 107 + struct meson_bank *banks; 108 + unsigned int num_banks; 146 109 }; 147 110 148 111 struct meson_pinctrl { ··· 113 150 struct pinctrl_dev *pcdev; 114 151 struct pinctrl_desc desc; 115 152 struct meson_pinctrl_data *data; 116 - struct meson_domain *domain; 153 + struct regmap *reg_mux; 154 + struct regmap *reg_pullen; 155 + struct regmap *reg_pull; 156 + struct regmap *reg_gpio; 157 + struct gpio_chip chip; 158 + struct device_node *of_node; 117 159 }; 118 160 119 161 #define PIN(x, b) (b + x)
+8 -18
drivers/pinctrl/meson/pinctrl-meson8.c
··· 931 931 BANK("AO", PIN(GPIOAO_0, AO_OFF), PIN(GPIO_TEST_N, AO_OFF), 0, 0, 0, 16, 0, 0, 0, 16, 1, 0), 932 932 }; 933 933 934 - static struct meson_domain_data meson8_cbus_domain_data = { 935 - .name = "cbus-banks", 936 - .banks = meson8_cbus_banks, 937 - .num_banks = ARRAY_SIZE(meson8_cbus_banks), 938 - .pin_base = 0, 939 - .num_pins = 120, 940 - }; 941 - 942 - static struct meson_domain_data meson8_aobus_domain_data = { 943 - .name = "ao-bank", 944 - .banks = meson8_aobus_banks, 945 - .num_banks = ARRAY_SIZE(meson8_aobus_banks), 946 - .pin_base = 120, 947 - .num_pins = 16, 948 - }; 949 - 950 934 struct meson_pinctrl_data meson8_cbus_pinctrl_data = { 935 + .name = "cbus-banks", 936 + .pin_base = 0, 951 937 .pins = meson8_cbus_pins, 952 938 .groups = meson8_cbus_groups, 953 939 .funcs = meson8_cbus_functions, 954 - .domain_data = &meson8_cbus_domain_data, 940 + .banks = meson8_cbus_banks, 955 941 .num_pins = ARRAY_SIZE(meson8_cbus_pins), 956 942 .num_groups = ARRAY_SIZE(meson8_cbus_groups), 957 943 .num_funcs = ARRAY_SIZE(meson8_cbus_functions), 944 + .num_banks = ARRAY_SIZE(meson8_cbus_banks), 958 945 }; 959 946 960 947 struct meson_pinctrl_data meson8_aobus_pinctrl_data = { 948 + .name = "ao-bank", 949 + .pin_base = 120, 961 950 .pins = meson8_aobus_pins, 962 951 .groups = meson8_aobus_groups, 963 952 .funcs = meson8_aobus_functions, 964 - .domain_data = &meson8_aobus_domain_data, 953 + .banks = meson8_aobus_banks, 965 954 .num_pins = ARRAY_SIZE(meson8_aobus_pins), 966 955 .num_groups = ARRAY_SIZE(meson8_aobus_groups), 967 956 .num_funcs = ARRAY_SIZE(meson8_aobus_functions), 957 + .num_banks = ARRAY_SIZE(meson8_aobus_banks), 968 958 };
+8 -18
drivers/pinctrl/meson/pinctrl-meson8b.c
··· 896 896 BANK("AO", PIN(GPIOAO_0, AO_OFF), PIN(GPIO_TEST_N, AO_OFF), 0, 0, 0, 16, 0, 0, 0, 16, 1, 0), 897 897 }; 898 898 899 - static struct meson_domain_data meson8b_cbus_domain_data = { 900 - .name = "cbus-banks", 901 - .banks = meson8b_cbus_banks, 902 - .num_banks = ARRAY_SIZE(meson8b_cbus_banks), 903 - .pin_base = 0, 904 - .num_pins = 130, 905 - }; 906 - 907 - static struct meson_domain_data meson8b_aobus_domain_data = { 908 - .name = "aobus-banks", 909 - .banks = meson8b_aobus_banks, 910 - .num_banks = ARRAY_SIZE(meson8b_aobus_banks), 911 - .pin_base = 130, 912 - .num_pins = 16, 913 - }; 914 - 915 899 struct meson_pinctrl_data meson8b_cbus_pinctrl_data = { 900 + .name = "cbus-banks", 901 + .pin_base = 0, 916 902 .pins = meson8b_cbus_pins, 917 903 .groups = meson8b_cbus_groups, 918 904 .funcs = meson8b_cbus_functions, 919 - .domain_data = &meson8b_cbus_domain_data, 905 + .banks = meson8b_cbus_banks, 920 906 .num_pins = ARRAY_SIZE(meson8b_cbus_pins), 921 907 .num_groups = ARRAY_SIZE(meson8b_cbus_groups), 922 908 .num_funcs = ARRAY_SIZE(meson8b_cbus_functions), 909 + .num_banks = ARRAY_SIZE(meson8b_cbus_banks), 923 910 }; 924 911 925 912 struct meson_pinctrl_data meson8b_aobus_pinctrl_data = { 913 + .name = "aobus-banks", 914 + .pin_base = 130, 926 915 .pins = meson8b_aobus_pins, 927 916 .groups = meson8b_aobus_groups, 928 917 .funcs = meson8b_aobus_functions, 929 - .domain_data = &meson8b_aobus_domain_data, 918 + .banks = meson8b_aobus_banks, 930 919 .num_pins = ARRAY_SIZE(meson8b_aobus_pins), 931 920 .num_groups = ARRAY_SIZE(meson8b_aobus_groups), 932 921 .num_funcs = ARRAY_SIZE(meson8b_aobus_functions), 922 + .num_banks = ARRAY_SIZE(meson8b_aobus_banks), 933 923 };
+2 -6
drivers/pinctrl/nomadik/pinctrl-abx500.c
··· 4 4 * Author: Patrice Chotard <patrice.chotard@st.com> 5 5 * License terms: GNU General Public License (GPL) version 2 6 6 * 7 + * Driver allows to use AxB5xx unused pins to be used as GPIO 8 + * 7 9 * This program is free software; you can redistribute it and/or modify 8 10 * it under the terms of the GNU General Public License version 2 as 9 11 * published by the Free Software Foundation. ··· 14 12 #include <linux/types.h> 15 13 #include <linux/slab.h> 16 14 #include <linux/init.h> 17 - #include <linux/module.h> 18 15 #include <linux/err.h> 19 16 #include <linux/of.h> 20 17 #include <linux/of_device.h> ··· 1270 1269 return platform_driver_register(&abx500_gpio_driver); 1271 1270 } 1272 1271 core_initcall(abx500_gpio_init); 1273 - 1274 - MODULE_AUTHOR("Patrice Chotard <patrice.chotard@st.com>"); 1275 - MODULE_DESCRIPTION("Driver allows to use AxB5xx unused pins to be used as GPIO"); 1276 - MODULE_ALIAS("platform:abx500-gpio"); 1277 - MODULE_LICENSE("GPL v2");
+3 -10
drivers/pinctrl/nomadik/pinctrl-nomadik.c
··· 11 11 * published by the Free Software Foundation. 12 12 */ 13 13 #include <linux/kernel.h> 14 - #include <linux/module.h> 15 14 #include <linux/init.h> 16 15 #include <linux/device.h> 17 16 #include <linux/platform_device.h> ··· 1109 1110 return PTR_ERR(nmk_chip); 1110 1111 } 1111 1112 1112 - if (of_get_property(np, "st,supports-sleepmode", NULL)) 1113 - supports_sleepmode = true; 1114 - else 1115 - supports_sleepmode = false; 1113 + supports_sleepmode = 1114 + of_property_read_bool(np, "st,supports-sleepmode"); 1116 1115 1117 1116 /* Correct platform device ID */ 1118 1117 dev->id = nmk_chip->bank; ··· 1177 1180 irqchip, 1178 1181 0, 1179 1182 handle_edge_irq, 1180 - IRQ_TYPE_EDGE_FALLING); 1183 + IRQ_TYPE_NONE); 1181 1184 if (ret) { 1182 1185 dev_err(&dev->dev, "could not add irqchip\n"); 1183 1186 gpiochip_remove(&nmk_chip->chip); ··· 1982 1985 return platform_driver_register(&nmk_pinctrl_driver); 1983 1986 } 1984 1987 core_initcall(nmk_pinctrl_init); 1985 - 1986 - MODULE_AUTHOR("Prafulla WADASKAR and Alessandro Rubini"); 1987 - MODULE_DESCRIPTION("Nomadik GPIO Driver"); 1988 - MODULE_LICENSE("GPL");
+14
drivers/pinctrl/pinctrl-amd.c
··· 383 383 int ret = 0; 384 384 u32 pin_reg; 385 385 unsigned long flags; 386 + bool level_trig; 387 + u32 active_level; 386 388 struct gpio_chip *gc = irq_data_get_irq_chip_data(d); 387 389 struct amd_gpio *gpio_dev = gpiochip_get_data(gc); 388 390 389 391 spin_lock_irqsave(&gpio_dev->lock, flags); 390 392 pin_reg = readl(gpio_dev->base + (d->hwirq)*4); 393 + 394 + /* 395 + * When level_trig is set EDGE and active_level is set HIGH in BIOS 396 + * default settings, ignore incoming settings from client and use 397 + * BIOS settings to configure GPIO register. 398 + */ 399 + level_trig = !(pin_reg & (LEVEL_TRIGGER << LEVEL_TRIG_OFF)); 400 + active_level = pin_reg & (ACTIVE_LEVEL_MASK << ACTIVE_LEVEL_OFF); 401 + 402 + if(level_trig && 403 + ((active_level >> ACTIVE_LEVEL_OFF) == ACTIVE_HIGH)) 404 + type = IRQ_TYPE_EDGE_FALLING; 391 405 392 406 switch (type & IRQ_TYPE_SENSE_MASK) { 393 407 case IRQ_TYPE_EDGE_RISING:
+1 -1
drivers/pinctrl/pinctrl-at91.c
··· 1614 1614 &gpio_irqchip, 1615 1615 0, 1616 1616 handle_edge_irq, 1617 - IRQ_TYPE_EDGE_BOTH); 1617 + IRQ_TYPE_NONE); 1618 1618 if (ret) { 1619 1619 dev_err(&pdev->dev, "at91_gpio.%d: Couldn't add irqchip to gpiochip.\n", 1620 1620 at91_gpio->pioc_idx);
+1 -3
drivers/pinctrl/pinctrl-palmas.c
··· 1004 1004 bool enable_dvfs2 = false; 1005 1005 1006 1006 if (pdev->dev.of_node) { 1007 - const struct of_device_id *match; 1008 - match = of_match_device(palmas_pinctrl_of_match, &pdev->dev); 1009 - pinctrl_data = match->data; 1007 + pinctrl_data = of_device_get_match_data(&pdev->dev); 1010 1008 enable_dvfs1 = of_property_read_bool(pdev->dev.of_node, 1011 1009 "ti,palmas-enable-dvfs1"); 1012 1010 enable_dvfs2 = of_property_read_bool(pdev->dev.of_node,
+1 -6
drivers/pinctrl/pinctrl-rockchip.c
··· 23 23 * GNU General Public License for more details. 24 24 */ 25 25 26 - #include <linux/module.h> 26 + #include <linux/init.h> 27 27 #include <linux/platform_device.h> 28 28 #include <linux/io.h> 29 29 #include <linux/bitops.h> ··· 2704 2704 .data = (void *)&rk3399_pin_ctrl }, 2705 2705 {}, 2706 2706 }; 2707 - MODULE_DEVICE_TABLE(of, rockchip_pinctrl_dt_match); 2708 2707 2709 2708 static struct platform_driver rockchip_pinctrl_driver = { 2710 2709 .probe = rockchip_pinctrl_probe, ··· 2719 2720 return platform_driver_register(&rockchip_pinctrl_driver); 2720 2721 } 2721 2722 postcore_initcall(rockchip_pinctrl_drv_register); 2722 - 2723 - MODULE_AUTHOR("Heiko Stuebner <heiko@sntech.de>"); 2724 - MODULE_DESCRIPTION("Rockchip pinctrl driver"); 2725 - MODULE_LICENSE("GPL v2");
+14 -79
drivers/pinctrl/pinctrl-st.c
··· 335 335 }; 336 336 337 337 /* SOC specific data */ 338 - /* STiH415 data */ 339 - static const unsigned int stih415_input_delays[] = {0, 500, 1000, 1500}; 340 - static const unsigned int stih415_output_delays[] = {0, 1000, 2000, 3000}; 341 338 342 - #define STIH415_PCTRL_COMMON_DATA \ 343 - .rt_style = st_retime_style_packed, \ 344 - .input_delays = stih415_input_delays, \ 345 - .ninput_delays = ARRAY_SIZE(stih415_input_delays), \ 346 - .output_delays = stih415_output_delays, \ 347 - .noutput_delays = ARRAY_SIZE(stih415_output_delays) 348 - 349 - static const struct st_pctl_data stih415_sbc_data = { 350 - STIH415_PCTRL_COMMON_DATA, 351 - .alt = 0, .oe = 5, .pu = 7, .od = 9, .rt = 16, 352 - }; 353 - 354 - static const struct st_pctl_data stih415_front_data = { 355 - STIH415_PCTRL_COMMON_DATA, 356 - .alt = 0, .oe = 8, .pu = 10, .od = 12, .rt = 16, 357 - }; 358 - 359 - static const struct st_pctl_data stih415_rear_data = { 360 - STIH415_PCTRL_COMMON_DATA, 361 - .alt = 0, .oe = 6, .pu = 8, .od = 10, .rt = 38, 362 - }; 363 - 364 - static const struct st_pctl_data stih415_left_data = { 365 - STIH415_PCTRL_COMMON_DATA, 366 - .alt = 0, .oe = 3, .pu = 4, .od = 5, .rt = 6, 367 - }; 368 - 369 - static const struct st_pctl_data stih415_right_data = { 370 - STIH415_PCTRL_COMMON_DATA, 371 - .alt = 0, .oe = 5, .pu = 7, .od = 9, .rt = 11, 372 - }; 373 - 374 - /* STiH416 data */ 375 - static const unsigned int stih416_delays[] = {0, 300, 500, 750, 1000, 1250, 339 + static const unsigned int stih407_delays[] = {0, 300, 500, 750, 1000, 1250, 376 340 1500, 1750, 2000, 2250, 2500, 2750, 3000, 3250 }; 377 341 378 - static const struct st_pctl_data stih416_data = { 379 - .rt_style = st_retime_style_dedicated, 380 - .input_delays = stih416_delays, 381 - .ninput_delays = ARRAY_SIZE(stih416_delays), 382 - .output_delays = stih416_delays, 383 - .noutput_delays = ARRAY_SIZE(stih416_delays), 342 + static const struct st_pctl_data stih407_data = { 343 + .rt_style = st_retime_style_dedicated, 344 + .input_delays = stih407_delays, 345 + .ninput_delays = ARRAY_SIZE(stih407_delays), 346 + .output_delays = stih407_delays, 347 + .noutput_delays = ARRAY_SIZE(stih407_delays), 384 348 .alt = 0, .oe = 40, .pu = 50, .od = 60, .rt = 100, 385 349 }; 386 350 387 351 static const struct st_pctl_data stih407_flashdata = { 388 352 .rt_style = st_retime_style_none, 389 - .input_delays = stih416_delays, 390 - .ninput_delays = ARRAY_SIZE(stih416_delays), 391 - .output_delays = stih416_delays, 392 - .noutput_delays = ARRAY_SIZE(stih416_delays), 353 + .input_delays = stih407_delays, 354 + .ninput_delays = ARRAY_SIZE(stih407_delays), 355 + .output_delays = stih407_delays, 356 + .noutput_delays = ARRAY_SIZE(stih407_delays), 393 357 .alt = 0, 394 358 .oe = -1, /* Not Available */ 395 359 .pu = -1, /* Not Available */ ··· 761 797 } 762 798 763 799 return (direction == ST_GPIO_DIRECTION_IN); 764 - } 765 - 766 - static int st_gpio_xlate(struct gpio_chip *gc, 767 - const struct of_phandle_args *gpiospec, u32 *flags) 768 - { 769 - if (WARN_ON(gc->of_gpio_n_cells < 1)) 770 - return -EINVAL; 771 - 772 - if (WARN_ON(gpiospec->args_count < gc->of_gpio_n_cells)) 773 - return -EINVAL; 774 - 775 - if (gpiospec->args[0] > gc->ngpio) 776 - return -EINVAL; 777 - 778 - return gpiospec->args[0]; 779 800 } 780 801 781 802 /* Pinctrl Groups */ ··· 1435 1486 .direction_output = st_gpio_direction_output, 1436 1487 .get_direction = st_gpio_get_direction, 1437 1488 .ngpio = ST_GPIO_PINS_PER_BANK, 1438 - .of_gpio_n_cells = 1, 1439 - .of_xlate = st_gpio_xlate, 1440 1489 }; 1441 1490 1442 1491 static struct irq_chip st_gpio_irqchip = { ··· 1526 1579 } 1527 1580 1528 1581 static const struct of_device_id st_pctl_of_match[] = { 1529 - { .compatible = "st,stih415-sbc-pinctrl", .data = &stih415_sbc_data }, 1530 - { .compatible = "st,stih415-rear-pinctrl", .data = &stih415_rear_data }, 1531 - { .compatible = "st,stih415-left-pinctrl", .data = &stih415_left_data }, 1532 - { .compatible = "st,stih415-right-pinctrl", 1533 - .data = &stih415_right_data }, 1534 - { .compatible = "st,stih415-front-pinctrl", 1535 - .data = &stih415_front_data }, 1536 - { .compatible = "st,stih416-sbc-pinctrl", .data = &stih416_data}, 1537 - { .compatible = "st,stih416-front-pinctrl", .data = &stih416_data}, 1538 - { .compatible = "st,stih416-rear-pinctrl", .data = &stih416_data}, 1539 - { .compatible = "st,stih416-fvdp-fe-pinctrl", .data = &stih416_data}, 1540 - { .compatible = "st,stih416-fvdp-lite-pinctrl", .data = &stih416_data}, 1541 - { .compatible = "st,stih407-sbc-pinctrl", .data = &stih416_data}, 1542 - { .compatible = "st,stih407-front-pinctrl", .data = &stih416_data}, 1543 - { .compatible = "st,stih407-rear-pinctrl", .data = &stih416_data}, 1582 + { .compatible = "st,stih407-sbc-pinctrl", .data = &stih407_data}, 1583 + { .compatible = "st,stih407-front-pinctrl", .data = &stih407_data}, 1584 + { .compatible = "st,stih407-rear-pinctrl", .data = &stih407_data}, 1544 1585 { .compatible = "st,stih407-flash-pinctrl", .data = &stih407_flashdata}, 1545 1586 { /* sentinel */ } 1546 1587 };
+1 -1
drivers/pinctrl/pinctrl-zynq.c
··· 233 233 static const unsigned int sdio1_0_pins[] = {10, 11, 12, 13, 14, 15}; 234 234 static const unsigned int sdio1_1_pins[] = {22, 23, 24, 25, 26, 27}; 235 235 static const unsigned int sdio1_2_pins[] = {34, 35, 36, 37, 38, 39}; 236 - static const unsigned int sdio1_3_pins[] = {46, 47, 48, 49, 40, 51}; 236 + static const unsigned int sdio1_3_pins[] = {46, 47, 48, 49, 50, 51}; 237 237 static const unsigned int sdio0_emio_wp_pins[] = {54}; 238 238 static const unsigned int sdio0_emio_cd_pins[] = {55}; 239 239 static const unsigned int sdio1_emio_wp_pins[] = {56};
+1 -1
drivers/pinctrl/qcom/pinctrl-msm.c
··· 156 156 spin_lock_irqsave(&pctrl->lock, flags); 157 157 158 158 val = readl(pctrl->regs + g->ctl_reg); 159 - val &= mask; 159 + val &= ~mask; 160 160 val |= i << g->mux_bit; 161 161 writel(val, pctrl->regs + g->ctl_reg); 162 162
+1
drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
··· 800 800 { .compatible = "qcom,pm8941-gpio" }, /* 36 GPIO's */ 801 801 { .compatible = "qcom,pm8994-gpio" }, /* 22 GPIO's */ 802 802 { .compatible = "qcom,pma8084-gpio" }, /* 22 GPIO's */ 803 + { .compatible = "qcom,spmi-gpio" }, /* Generic */ 803 804 { }, 804 805 }; 805 806
+1
drivers/pinctrl/qcom/pinctrl-spmi-mpp.c
··· 914 914 { .compatible = "qcom,pm8941-mpp" }, /* 8 MPP's */ 915 915 { .compatible = "qcom,pm8994-mpp" }, /* 8 MPP's */ 916 916 { .compatible = "qcom,pma8084-mpp" }, /* 8 MPP's */ 917 + { .compatible = "qcom,spmi-mpp" }, /* Generic */ 917 918 { }, 918 919 }; 919 920
+1 -5
drivers/pinctrl/samsung/pinctrl-exynos.c
··· 428 428 int eint_irq; 429 429 430 430 chained_irq_enter(chip, desc); 431 - chip->irq_mask(&desc->irq_data); 432 - 433 - if (chip->irq_ack) 434 - chip->irq_ack(&desc->irq_data); 435 431 436 432 eint_irq = irq_linear_revmap(bank->irq_domain, eintd->irq); 437 433 generic_handle_irq(eint_irq); 438 - chip->irq_unmask(&desc->irq_data); 434 + 439 435 chained_irq_exit(chip, desc); 440 436 } 441 437
+1 -9
drivers/pinctrl/samsung/pinctrl-samsung.c
··· 1041 1041 struct resource *res; 1042 1042 int ret; 1043 1043 1044 - if (!dev->of_node) { 1045 - dev_err(dev, "device tree node not found\n"); 1046 - return -ENODEV; 1047 - } 1048 - 1049 1044 drvdata = devm_kzalloc(dev, sizeof(*drvdata), GFP_KERNEL); 1050 - if (!drvdata) { 1051 - dev_err(dev, "failed to allocate memory for driver's " 1052 - "private data\n"); 1045 + if (!drvdata) 1053 1046 return -ENOMEM; 1054 - } 1055 1047 1056 1048 ctrl = samsung_pinctrl_get_soc_data(drvdata, pdev); 1057 1049 if (IS_ERR(ctrl)) {
+10
drivers/pinctrl/sh-pfc/Kconfig
··· 54 54 depends on ARCH_R8A7791 55 55 select PINCTRL_SH_PFC 56 56 57 + config PINCTRL_PFC_R8A7792 58 + def_bool y 59 + depends on ARCH_R8A7792 60 + select PINCTRL_SH_PFC 61 + 57 62 config PINCTRL_PFC_R8A7793 58 63 def_bool y 59 64 depends on ARCH_R8A7793 ··· 73 68 def_bool y 74 69 depends on ARCH_R8A7795 75 70 select PINCTRL_SH_PFC 71 + 72 + config PINCTRL_PFC_R8A7796 73 + def_bool y 74 + depends on ARCH_R8A7796 75 + select PINCTRL_SH_PFC 76 76 77 77 config PINCTRL_PFC_SH7203 78 78 def_bool y
+2
drivers/pinctrl/sh-pfc/Makefile
··· 7 7 obj-$(CONFIG_PINCTRL_PFC_R8A7779) += pfc-r8a7779.o 8 8 obj-$(CONFIG_PINCTRL_PFC_R8A7790) += pfc-r8a7790.o 9 9 obj-$(CONFIG_PINCTRL_PFC_R8A7791) += pfc-r8a7791.o 10 + obj-$(CONFIG_PINCTRL_PFC_R8A7792) += pfc-r8a7792.o 10 11 obj-$(CONFIG_PINCTRL_PFC_R8A7793) += pfc-r8a7791.o 11 12 obj-$(CONFIG_PINCTRL_PFC_R8A7794) += pfc-r8a7794.o 12 13 obj-$(CONFIG_PINCTRL_PFC_R8A7795) += pfc-r8a7795.o 14 + obj-$(CONFIG_PINCTRL_PFC_R8A7796) += pfc-r8a7796.o 13 15 obj-$(CONFIG_PINCTRL_PFC_SH7203) += pfc-sh7203.o 14 16 obj-$(CONFIG_PINCTRL_PFC_SH7264) += pfc-sh7264.o 15 17 obj-$(CONFIG_PINCTRL_PFC_SH7269) += pfc-sh7269.o
+12
drivers/pinctrl/sh-pfc/core.c
··· 494 494 .data = &r8a7791_pinmux_info, 495 495 }, 496 496 #endif 497 + #ifdef CONFIG_PINCTRL_PFC_R8A7792 498 + { 499 + .compatible = "renesas,pfc-r8a7792", 500 + .data = &r8a7792_pinmux_info, 501 + }, 502 + #endif 497 503 #ifdef CONFIG_PINCTRL_PFC_R8A7793 498 504 { 499 505 .compatible = "renesas,pfc-r8a7793", ··· 516 510 { 517 511 .compatible = "renesas,pfc-r8a7795", 518 512 .data = &r8a7795_pinmux_info, 513 + }, 514 + #endif 515 + #ifdef CONFIG_PINCTRL_PFC_R8A7796 516 + { 517 + .compatible = "renesas,pfc-r8a7796", 518 + .data = &r8a7796_pinmux_info, 519 519 }, 520 520 #endif 521 521 #ifdef CONFIG_PINCTRL_PFC_SH73A0
+28 -1
drivers/pinctrl/sh-pfc/pfc-r8a7791.c
··· 13 13 14 14 #include "sh_pfc.h" 15 15 16 + /* 17 + * Pins 0-23 assigned to GPIO bank 6 can be used for SD interfaces in 18 + * which case they support both 3.3V and 1.8V signalling. 19 + */ 16 20 #define CPU_ALL_PORT(fn, sfx) \ 17 21 PORT_GP_32(0, fn, sfx), \ 18 22 PORT_GP_26(1, fn, sfx), \ ··· 24 20 PORT_GP_32(3, fn, sfx), \ 25 21 PORT_GP_32(4, fn, sfx), \ 26 22 PORT_GP_32(5, fn, sfx), \ 27 - PORT_GP_32(6, fn, sfx), \ 23 + PORT_GP_CFG_24(6, fn, sfx, SH_PFC_PIN_CFG_IO_VOLTAGE), \ 24 + PORT_GP_1(6, 24, fn, sfx), \ 25 + PORT_GP_1(6, 25, fn, sfx), \ 26 + PORT_GP_1(6, 26, fn, sfx), \ 27 + PORT_GP_1(6, 27, fn, sfx), \ 28 + PORT_GP_1(6, 28, fn, sfx), \ 29 + PORT_GP_1(6, 29, fn, sfx), \ 30 + PORT_GP_1(6, 30, fn, sfx), \ 31 + PORT_GP_1(6, 31, fn, sfx), \ 28 32 PORT_GP_26(7, fn, sfx) 29 33 30 34 enum { ··· 6416 6404 { }, 6417 6405 }; 6418 6406 6407 + static int r8a7791_pin_to_pocctrl(struct sh_pfc *pfc, unsigned int pin, u32 *pocctrl) 6408 + { 6409 + if (pin < RCAR_GP_PIN(6, 0) || pin > RCAR_GP_PIN(6, 23)) 6410 + return -EINVAL; 6411 + 6412 + *pocctrl = 0xe606008c; 6413 + 6414 + return 31 - (pin & 0x1f); 6415 + } 6416 + 6417 + static const struct sh_pfc_soc_operations r8a7791_pinmux_ops = { 6418 + .pin_to_pocctrl = r8a7791_pin_to_pocctrl, 6419 + }; 6420 + 6419 6421 #ifdef CONFIG_PINCTRL_PFC_R8A7791 6420 6422 const struct sh_pfc_soc_info r8a7791_pinmux_info = { 6421 6423 .name = "r8a77910_pfc", 6424 + .ops = &r8a7791_pinmux_ops, 6422 6425 .unlock_reg = 0xe6060000, /* PMMR */ 6423 6426 6424 6427 .function = { PINMUX_FUNCTION_BEGIN, PINMUX_FUNCTION_END },
+2739
drivers/pinctrl/sh-pfc/pfc-r8a7792.c
··· 1 + /* 2 + * r8a7792 processor support - PFC hardware block. 3 + * 4 + * Copyright (C) 2013-2014 Renesas Electronics Corporation 5 + * Copyright (C) 2016 Cogent Embedded, Inc., <source@cogentembedded.com> 6 + * 7 + * This program is free software; you can redistribute it and/or modify 8 + * it under the terms of the GNU General Public License version 2 9 + * as published by the Free Software Foundation. 10 + */ 11 + 12 + #include <linux/kernel.h> 13 + 14 + #include "core.h" 15 + #include "sh_pfc.h" 16 + 17 + #define CPU_ALL_PORT(fn, sfx) \ 18 + PORT_GP_29(0, fn, sfx), \ 19 + PORT_GP_23(1, fn, sfx), \ 20 + PORT_GP_32(2, fn, sfx), \ 21 + PORT_GP_28(3, fn, sfx), \ 22 + PORT_GP_17(4, fn, sfx), \ 23 + PORT_GP_17(5, fn, sfx), \ 24 + PORT_GP_17(6, fn, sfx), \ 25 + PORT_GP_17(7, fn, sfx), \ 26 + PORT_GP_17(8, fn, sfx), \ 27 + PORT_GP_17(9, fn, sfx), \ 28 + PORT_GP_32(10, fn, sfx), \ 29 + PORT_GP_30(11, fn, sfx) 30 + 31 + enum { 32 + PINMUX_RESERVED = 0, 33 + 34 + PINMUX_DATA_BEGIN, 35 + GP_ALL(DATA), 36 + PINMUX_DATA_END, 37 + 38 + PINMUX_FUNCTION_BEGIN, 39 + GP_ALL(FN), 40 + 41 + /* GPSR0 */ 42 + FN_IP0_0, FN_IP0_1, FN_IP0_2, FN_IP0_3, FN_IP0_4, FN_IP0_5, 43 + FN_IP0_6, FN_IP0_7, FN_IP0_8, FN_IP0_9, FN_IP0_10, FN_IP0_11, 44 + FN_IP0_12, FN_IP0_13, FN_IP0_14, FN_IP0_15, FN_IP0_16, 45 + FN_IP0_17, FN_IP0_18, FN_IP0_19, FN_IP0_20, FN_IP0_21, 46 + FN_IP0_22, FN_IP0_23, FN_IP1_0, FN_IP1_1, FN_IP1_2, 47 + FN_IP1_3, FN_IP1_4, 48 + 49 + /* GPSR1 */ 50 + FN_IP1_5, FN_IP1_6, FN_IP1_7, FN_IP1_8, FN_IP1_9, FN_IP1_10, 51 + FN_IP1_11, FN_IP1_12, FN_IP1_13, FN_IP1_14, FN_IP1_15, FN_IP1_16, 52 + FN_DU1_DB2_C0_DATA12, FN_DU1_DB3_C1_DATA13, FN_DU1_DB4_C2_DATA14, 53 + FN_DU1_DB5_C3_DATA15, FN_DU1_DB6_C4, FN_DU1_DB7_C5, 54 + FN_DU1_EXHSYNC_DU1_HSYNC, FN_DU1_EXVSYNC_DU1_VSYNC, 55 + FN_DU1_EXODDF_DU1_ODDF_DISP_CDE, FN_DU1_DISP, FN_DU1_CDE, 56 + 57 + /* GPSR2 */ 58 + FN_D0, FN_D1, FN_D2, FN_D3, FN_D4, FN_D5, FN_D6, FN_D7, 59 + FN_D8, FN_D9, FN_D10, FN_D11, FN_D12, FN_D13, FN_D14, FN_D15, 60 + FN_A0, FN_A1, FN_A2, FN_A3, FN_A4, FN_A5, FN_A6, FN_A7, 61 + FN_A8, FN_A9, FN_A10, FN_A11, FN_A12, FN_A13, FN_A14, FN_A15, 62 + 63 + /* GPSR3 */ 64 + FN_A16, FN_A17, FN_A18, FN_A19, FN_IP1_17, FN_IP1_18, 65 + FN_CS1_N_A26, FN_EX_CS0_N, FN_EX_CS1_N, FN_EX_CS2_N, FN_EX_CS3_N, 66 + FN_EX_CS4_N, FN_EX_CS5_N, FN_BS_N, FN_RD_N, FN_RD_WR_N, 67 + FN_WE0_N, FN_WE1_N, FN_EX_WAIT0, FN_IRQ0, FN_IRQ1, FN_IRQ2, FN_IRQ3, 68 + FN_IP1_19, FN_IP1_20, FN_IP1_21, FN_IP1_22, FN_CS0_N, 69 + 70 + /* GPSR4 */ 71 + FN_VI0_CLK, FN_VI0_CLKENB, FN_VI0_HSYNC_N, FN_VI0_VSYNC_N, 72 + FN_VI0_D0_B0_C0, FN_VI0_D1_B1_C1, FN_VI0_D2_B2_C2, FN_VI0_D3_B3_C3, 73 + FN_VI0_D4_B4_C4, FN_VI0_D5_B5_C5, FN_VI0_D6_B6_C6, FN_VI0_D7_B7_C7, 74 + FN_VI0_D8_G0_Y0, FN_VI0_D9_G1_Y1, FN_VI0_D10_G2_Y2, FN_VI0_D11_G3_Y3, 75 + FN_VI0_FIELD, 76 + 77 + /* GPSR5 */ 78 + FN_VI1_CLK, FN_VI1_CLKENB, FN_VI1_HSYNC_N, FN_VI1_VSYNC_N, 79 + FN_VI1_D0_B0_C0, FN_VI1_D1_B1_C1, FN_VI1_D2_B2_C2, FN_VI1_D3_B3_C3, 80 + FN_VI1_D4_B4_C4, FN_VI1_D5_B5_C5, FN_VI1_D6_B6_C6, FN_VI1_D7_B7_C7, 81 + FN_VI1_D8_G0_Y0, FN_VI1_D9_G1_Y1, FN_VI1_D10_G2_Y2, FN_VI1_D11_G3_Y3, 82 + FN_VI1_FIELD, 83 + 84 + /* GPSR6 */ 85 + FN_IP2_0, FN_IP2_1, FN_IP2_2, FN_IP2_3, FN_IP2_4, FN_IP2_5, FN_IP2_6, 86 + FN_IP2_7, FN_IP2_8, FN_IP2_9, FN_IP2_10, FN_IP2_11, FN_IP2_12, 87 + FN_IP2_13, FN_IP2_14, FN_IP2_15, FN_IP2_16, 88 + 89 + /* GPSR7 */ 90 + FN_IP3_0, FN_IP3_1, FN_IP3_2, FN_IP3_3, FN_IP3_4, FN_IP3_5, FN_IP3_6, 91 + FN_IP3_7, FN_IP3_8, FN_IP3_9, FN_IP3_10, FN_IP3_11, FN_IP3_12, 92 + FN_IP3_13, FN_VI3_D10_Y2, FN_IP3_14, FN_VI3_FIELD, 93 + 94 + /* GPSR8 */ 95 + FN_VI4_CLK, FN_IP4_0, FN_IP4_1, FN_IP4_3_2, FN_IP4_4, FN_IP4_6_5, 96 + FN_IP4_8_7, FN_IP4_10_9, FN_IP4_12_11, FN_IP4_14_13, FN_IP4_16_15, 97 + FN_IP4_18_17, FN_IP4_20_19, FN_IP4_21, FN_IP4_22, FN_IP4_23, FN_IP4_24, 98 + 99 + /* GPSR9 */ 100 + FN_VI5_CLK, FN_IP5_0, FN_IP5_1, FN_IP5_2, FN_IP5_3, FN_IP5_4, FN_IP5_5, 101 + FN_IP5_6, FN_IP5_7, FN_IP5_8, FN_IP5_9, FN_IP5_10, FN_IP5_11, 102 + FN_VI5_D9_Y1, FN_VI5_D10_Y2, FN_VI5_D11_Y3, FN_VI5_FIELD, 103 + 104 + /* GPSR10 */ 105 + FN_IP6_0, FN_IP6_1, FN_HRTS0_N, FN_IP6_2, FN_IP6_3, FN_IP6_4, FN_IP6_5, 106 + FN_HCTS1_N, FN_IP6_6, FN_IP6_7, FN_SCK0, FN_CTS0_N, FN_RTS0_N, 107 + FN_TX0, FN_RX0, FN_SCK1, FN_CTS1_N, FN_RTS1_N, FN_TX1, FN_RX1, 108 + FN_IP6_9_8, FN_IP6_11_10, FN_IP6_13_12, FN_IP6_15_14, FN_IP6_16, 109 + FN_IP6_18_17, FN_SCIF_CLK, FN_CAN0_TX, FN_CAN0_RX, FN_CAN_CLK, 110 + FN_CAN1_TX, FN_CAN1_RX, 111 + 112 + /* GPSR11 */ 113 + FN_IP7_1_0, FN_IP7_3_2, FN_IP7_5_4, FN_IP7_6, FN_IP7_7, FN_SD0_CLK, 114 + FN_SD0_CMD, FN_SD0_DAT0, FN_SD0_DAT1, FN_SD0_DAT2, FN_SD0_DAT3, 115 + FN_SD0_CD, FN_SD0_WP, FN_IP7_9_8, FN_IP7_11_10, FN_IP7_13_12, 116 + FN_IP7_15_14, FN_IP7_16, FN_IP7_17, FN_IP7_18, FN_IP7_19, FN_IP7_20, 117 + FN_ADICLK, FN_ADICS_SAMP, FN_ADIDATA, FN_ADICHS0, FN_ADICHS1, 118 + FN_ADICHS2, FN_AVS1, FN_AVS2, 119 + 120 + /* IPSR0 */ 121 + FN_DU0_DR0_DATA0, FN_DU0_DR1_DATA1, FN_DU0_DR2_Y4_DATA2, 122 + FN_DU0_DR3_Y5_DATA3, FN_DU0_DR4_Y6_DATA4, FN_DU0_DR5_Y7_DATA5, 123 + FN_DU0_DR6_Y8_DATA6, FN_DU0_DR7_Y9_DATA7, FN_DU0_DG0_DATA8, 124 + FN_DU0_DG1_DATA9, FN_DU0_DG2_C6_DATA10, FN_DU0_DG3_C7_DATA11, 125 + FN_DU0_DG4_Y0_DATA12, FN_DU0_DG5_Y1_DATA13, FN_DU0_DG6_Y2_DATA14, 126 + FN_DU0_DG7_Y3_DATA15, FN_DU0_DB0, FN_DU0_DB1, FN_DU0_DB2_C0, 127 + FN_DU0_DB3_C1, FN_DU0_DB4_C2, FN_DU0_DB5_C3, FN_DU0_DB6_C4, 128 + FN_DU0_DB7_C5, 129 + 130 + /* IPSR1 */ 131 + FN_DU0_EXHSYNC_DU0_HSYNC, FN_DU0_EXVSYNC_DU0_VSYNC, 132 + FN_DU0_EXODDF_DU0_ODDF_DISP_CDE, FN_DU0_DISP, FN_DU0_CDE, 133 + FN_DU1_DR2_Y4_DATA0, FN_DU1_DR3_Y5_DATA1, FN_DU1_DR4_Y6_DATA2, 134 + FN_DU1_DR5_Y7_DATA3, FN_DU1_DR6_DATA4, FN_DU1_DR7_DATA5, 135 + FN_DU1_DG2_C6_DATA6, FN_DU1_DG3_C7_DATA7, FN_DU1_DG4_Y0_DATA8, 136 + FN_DU1_DG5_Y1_DATA9, FN_DU1_DG6_Y2_DATA10, FN_DU1_DG7_Y3_DATA11, 137 + FN_A20, FN_MOSI_IO0, FN_A21, FN_MISO_IO1, FN_A22, FN_IO2, 138 + FN_A23, FN_IO3, FN_A24, FN_SPCLK, FN_A25, FN_SSL, 139 + 140 + /* IPSR2 */ 141 + FN_VI2_CLK, FN_AVB_RX_CLK, FN_VI2_CLKENB, FN_AVB_RX_DV, 142 + FN_VI2_HSYNC_N, FN_AVB_RXD0, FN_VI2_VSYNC_N, FN_AVB_RXD1, 143 + FN_VI2_D0_C0, FN_AVB_RXD2, FN_VI2_D1_C1, FN_AVB_RXD3, 144 + FN_VI2_D2_C2, FN_AVB_RXD4, FN_VI2_D3_C3, FN_AVB_RXD5, 145 + FN_VI2_D4_C4, FN_AVB_RXD6, FN_VI2_D5_C5, FN_AVB_RXD7, 146 + FN_VI2_D6_C6, FN_AVB_RX_ER, FN_VI2_D7_C7, FN_AVB_COL, 147 + FN_VI2_D8_Y0, FN_AVB_TXD3, FN_VI2_D9_Y1, FN_AVB_TX_EN, 148 + FN_VI2_D10_Y2, FN_AVB_TXD0, FN_VI2_D11_Y3, FN_AVB_TXD1, 149 + FN_VI2_FIELD, FN_AVB_TXD2, 150 + 151 + /* IPSR3 */ 152 + FN_VI3_CLK, FN_AVB_TX_CLK, FN_VI3_CLKENB, FN_AVB_TXD4, 153 + FN_VI3_HSYNC_N, FN_AVB_TXD5, FN_VI3_VSYNC_N, FN_AVB_TXD6, 154 + FN_VI3_D0_C0, FN_AVB_TXD7, FN_VI3_D1_C1, FN_AVB_TX_ER, 155 + FN_VI3_D2_C2, FN_AVB_GTX_CLK, FN_VI3_D3_C3, FN_AVB_MDC, 156 + FN_VI3_D4_C4, FN_AVB_MDIO, FN_VI3_D5_C5, FN_AVB_LINK, 157 + FN_VI3_D6_C6, FN_AVB_MAGIC, FN_VI3_D7_C7, FN_AVB_PHY_INT, 158 + FN_VI3_D8_Y0, FN_AVB_CRS, FN_VI3_D9_Y1, FN_AVB_GTXREFCLK, 159 + FN_VI3_D11_Y3, FN_AVB_AVTP_MATCH, 160 + 161 + /* IPSR4 */ 162 + FN_VI4_CLKENB, FN_VI0_D12_G4_Y4, FN_VI4_HSYNC_N, FN_VI0_D13_G5_Y5, 163 + FN_VI4_VSYNC_N, FN_VI0_D14_G6_Y6, FN_RDR_CLKOUT, 164 + FN_VI4_D0_C0, FN_VI0_D15_G7_Y7, 165 + FN_VI4_D1_C1, FN_VI0_D16_R0, FN_VI1_D12_G4_Y4, 166 + FN_VI4_D2_C2, FN_VI0_D17_R1, FN_VI1_D13_G5_Y5, 167 + FN_VI4_D3_C3, FN_VI0_D18_R2, FN_VI1_D14_G6_Y6, 168 + FN_VI4_D4_C4, FN_VI0_D19_R3, FN_VI1_D15_G7_Y7, 169 + FN_VI4_D5_C5, FN_VI0_D20_R4, FN_VI2_D12_Y4, 170 + FN_VI4_D6_C6, FN_VI0_D21_R5, FN_VI2_D13_Y5, 171 + FN_VI4_D7_C7, FN_VI0_D22_R6, FN_VI2_D14_Y6, 172 + FN_VI4_D8_Y0, FN_VI0_D23_R7, FN_VI2_D15_Y7, 173 + FN_VI4_D9_Y1, FN_VI3_D12_Y4, FN_VI4_D10_Y2, FN_VI3_D13_Y5, 174 + FN_VI4_D11_Y3, FN_VI3_D14_Y6, FN_VI4_FIELD, FN_VI3_D15_Y7, 175 + 176 + /* IPSR5 */ 177 + FN_VI5_CLKENB, FN_VI1_D12_G4_Y4_B, FN_VI5_HSYNC_N, FN_VI1_D13_G5_Y5_B, 178 + FN_VI5_VSYNC_N, FN_VI1_D14_G6_Y6_B, FN_VI5_D0_C0, FN_VI1_D15_G7_Y7_B, 179 + FN_VI5_D1_C1, FN_VI1_D16_R0, FN_VI5_D2_C2, FN_VI1_D17_R1, 180 + FN_VI5_D3_C3, FN_VI1_D18_R2, FN_VI5_D4_C4, FN_VI1_D19_R3, 181 + FN_VI5_D5_C5, FN_VI1_D20_R4, FN_VI5_D6_C6, FN_VI1_D21_R5, 182 + FN_VI5_D7_C7, FN_VI1_D22_R6, FN_VI5_D8_Y0, FN_VI1_D23_R7, 183 + 184 + /* IPSR6 */ 185 + FN_MSIOF0_SCK, FN_HSCK0, FN_MSIOF0_SYNC, FN_HCTS0_N, 186 + FN_MSIOF0_TXD, FN_HTX0, FN_MSIOF0_RXD, FN_HRX0, 187 + FN_MSIOF1_SCK, FN_HSCK1, FN_MSIOF1_SYNC, FN_HRTS1_N, 188 + FN_MSIOF1_TXD, FN_HTX1, FN_MSIOF1_RXD, FN_HRX1, 189 + FN_DRACK0, FN_SCK2, FN_DACK0, FN_TX2, FN_DREQ0_N, FN_RX2, 190 + FN_DACK1, FN_SCK3, FN_TX3, FN_DREQ1_N, FN_RX3, 191 + 192 + /* IPSR7 */ 193 + FN_PWM0, FN_TCLK1, FN_FSO_CFE_0, FN_PWM1, FN_TCLK2, FN_FSO_CFE_1, 194 + FN_PWM2, FN_TCLK3, FN_FSO_TOE, FN_PWM3, FN_PWM4, 195 + FN_SSI_SCK34, FN_TPU0TO0, FN_SSI_WS34, FN_TPU0TO1, 196 + FN_SSI_SDATA3, FN_TPU0TO2, FN_SSI_SCK4, FN_TPU0TO3, 197 + FN_SSI_WS4, FN_SSI_SDATA4, FN_AUDIO_CLKOUT, 198 + FN_AUDIO_CLKA, FN_AUDIO_CLKB, 199 + 200 + /* MOD_SEL */ 201 + FN_SEL_VI1_0, FN_SEL_VI1_1, 202 + PINMUX_FUNCTION_END, 203 + 204 + PINMUX_MARK_BEGIN, 205 + DU1_DB2_C0_DATA12_MARK, DU1_DB3_C1_DATA13_MARK, 206 + DU1_DB4_C2_DATA14_MARK, DU1_DB5_C3_DATA15_MARK, 207 + DU1_DB6_C4_MARK, DU1_DB7_C5_MARK, DU1_EXHSYNC_DU1_HSYNC_MARK, 208 + DU1_EXVSYNC_DU1_VSYNC_MARK, DU1_EXODDF_DU1_ODDF_DISP_CDE_MARK, 209 + DU1_DISP_MARK, DU1_CDE_MARK, 210 + 211 + D0_MARK, D1_MARK, D2_MARK, D3_MARK, D4_MARK, D5_MARK, D6_MARK, 212 + D7_MARK, D8_MARK, D9_MARK, D10_MARK, D11_MARK, D12_MARK, D13_MARK, 213 + D14_MARK, D15_MARK, A0_MARK, A1_MARK, A2_MARK, A3_MARK, A4_MARK, 214 + A5_MARK, A6_MARK, A7_MARK, A8_MARK, A9_MARK, A10_MARK, A11_MARK, 215 + A12_MARK, A13_MARK, A14_MARK, A15_MARK, 216 + 217 + A16_MARK, A17_MARK, A18_MARK, A19_MARK, CS1_N_A26_MARK, 218 + EX_CS0_N_MARK, EX_CS1_N_MARK, EX_CS2_N_MARK, EX_CS3_N_MARK, 219 + EX_CS4_N_MARK, EX_CS5_N_MARK, BS_N_MARK, RD_N_MARK, RD_WR_N_MARK, 220 + WE0_N_MARK, WE1_N_MARK, EX_WAIT0_MARK, 221 + IRQ0_MARK, IRQ1_MARK, IRQ2_MARK, IRQ3_MARK, CS0_N_MARK, 222 + 223 + VI0_CLK_MARK, VI0_CLKENB_MARK, VI0_HSYNC_N_MARK, VI0_VSYNC_N_MARK, 224 + VI0_D0_B0_C0_MARK, VI0_D1_B1_C1_MARK, VI0_D2_B2_C2_MARK, 225 + VI0_D3_B3_C3_MARK, VI0_D4_B4_C4_MARK, VI0_D5_B5_C5_MARK, 226 + VI0_D6_B6_C6_MARK, VI0_D7_B7_C7_MARK, VI0_D8_G0_Y0_MARK, 227 + VI0_D9_G1_Y1_MARK, VI0_D10_G2_Y2_MARK, VI0_D11_G3_Y3_MARK, 228 + VI0_FIELD_MARK, 229 + 230 + VI1_CLK_MARK, VI1_CLKENB_MARK, VI1_HSYNC_N_MARK, VI1_VSYNC_N_MARK, 231 + VI1_D0_B0_C0_MARK, VI1_D1_B1_C1_MARK, VI1_D2_B2_C2_MARK, 232 + VI1_D3_B3_C3_MARK, VI1_D4_B4_C4_MARK, VI1_D5_B5_C5_MARK, 233 + VI1_D6_B6_C6_MARK, VI1_D7_B7_C7_MARK, VI1_D8_G0_Y0_MARK, 234 + VI1_D9_G1_Y1_MARK, VI1_D10_G2_Y2_MARK, VI1_D11_G3_Y3_MARK, 235 + VI1_FIELD_MARK, 236 + 237 + VI3_D10_Y2_MARK, VI3_FIELD_MARK, 238 + 239 + VI4_CLK_MARK, 240 + 241 + VI5_CLK_MARK, VI5_D9_Y1_MARK, VI5_D10_Y2_MARK, VI5_D11_Y3_MARK, 242 + VI5_FIELD_MARK, 243 + 244 + HRTS0_N_MARK, HCTS1_N_MARK, SCK0_MARK, CTS0_N_MARK, RTS0_N_MARK, 245 + TX0_MARK, RX0_MARK, SCK1_MARK, CTS1_N_MARK, RTS1_N_MARK, 246 + TX1_MARK, RX1_MARK, SCIF_CLK_MARK, CAN0_TX_MARK, CAN0_RX_MARK, 247 + CAN_CLK_MARK, CAN1_TX_MARK, CAN1_RX_MARK, 248 + 249 + SD0_CLK_MARK, SD0_CMD_MARK, SD0_DAT0_MARK, SD0_DAT1_MARK, 250 + SD0_DAT2_MARK, SD0_DAT3_MARK, SD0_CD_MARK, SD0_WP_MARK, 251 + ADICLK_MARK, ADICS_SAMP_MARK, ADIDATA_MARK, ADICHS0_MARK, 252 + ADICHS1_MARK, ADICHS2_MARK, AVS1_MARK, AVS2_MARK, 253 + 254 + /* IPSR0 */ 255 + DU0_DR0_DATA0_MARK, DU0_DR1_DATA1_MARK, DU0_DR2_Y4_DATA2_MARK, 256 + DU0_DR3_Y5_DATA3_MARK, DU0_DR4_Y6_DATA4_MARK, DU0_DR5_Y7_DATA5_MARK, 257 + DU0_DR6_Y8_DATA6_MARK, DU0_DR7_Y9_DATA7_MARK, DU0_DG0_DATA8_MARK, 258 + DU0_DG1_DATA9_MARK, DU0_DG2_C6_DATA10_MARK, DU0_DG3_C7_DATA11_MARK, 259 + DU0_DG4_Y0_DATA12_MARK, DU0_DG5_Y1_DATA13_MARK, DU0_DG6_Y2_DATA14_MARK, 260 + DU0_DG7_Y3_DATA15_MARK, DU0_DB0_MARK, DU0_DB1_MARK, 261 + DU0_DB2_C0_MARK, DU0_DB3_C1_MARK, DU0_DB4_C2_MARK, DU0_DB5_C3_MARK, 262 + DU0_DB6_C4_MARK, DU0_DB7_C5_MARK, 263 + 264 + /* IPSR1 */ 265 + DU0_EXHSYNC_DU0_HSYNC_MARK, DU0_EXVSYNC_DU0_VSYNC_MARK, 266 + DU0_EXODDF_DU0_ODDF_DISP_CDE_MARK, DU0_DISP_MARK, DU0_CDE_MARK, 267 + DU1_DR2_Y4_DATA0_MARK, DU1_DR3_Y5_DATA1_MARK, DU1_DR4_Y6_DATA2_MARK, 268 + DU1_DR5_Y7_DATA3_MARK, DU1_DR6_DATA4_MARK, DU1_DR7_DATA5_MARK, 269 + DU1_DG2_C6_DATA6_MARK, DU1_DG3_C7_DATA7_MARK, DU1_DG4_Y0_DATA8_MARK, 270 + DU1_DG5_Y1_DATA9_MARK, DU1_DG6_Y2_DATA10_MARK, DU1_DG7_Y3_DATA11_MARK, 271 + A20_MARK, MOSI_IO0_MARK, A21_MARK, MISO_IO1_MARK, A22_MARK, IO2_MARK, 272 + A23_MARK, IO3_MARK, A24_MARK, SPCLK_MARK, A25_MARK, SSL_MARK, 273 + 274 + /* IPSR2 */ 275 + VI2_CLK_MARK, AVB_RX_CLK_MARK, VI2_CLKENB_MARK, AVB_RX_DV_MARK, 276 + VI2_HSYNC_N_MARK, AVB_RXD0_MARK, VI2_VSYNC_N_MARK, AVB_RXD1_MARK, 277 + VI2_D0_C0_MARK, AVB_RXD2_MARK, VI2_D1_C1_MARK, AVB_TX_CLK_MARK, 278 + VI2_D2_C2_MARK, AVB_RXD4_MARK, VI2_D3_C3_MARK, AVB_RXD5_MARK, 279 + VI2_D4_C4_MARK, AVB_RXD6_MARK, VI2_D5_C5_MARK, AVB_RXD7_MARK, 280 + VI2_D6_C6_MARK, AVB_RX_ER_MARK, VI2_D7_C7_MARK, AVB_COL_MARK, 281 + VI2_D8_Y0_MARK, AVB_RXD3_MARK, VI2_D9_Y1_MARK, AVB_TX_EN_MARK, 282 + VI2_D10_Y2_MARK, AVB_TXD0_MARK, 283 + VI2_D11_Y3_MARK, AVB_TXD1_MARK, VI2_FIELD_MARK, AVB_TXD2_MARK, 284 + 285 + /* IPSR3 */ 286 + VI3_CLK_MARK, AVB_TXD3_MARK, VI3_CLKENB_MARK, AVB_TXD4_MARK, 287 + VI3_HSYNC_N_MARK, AVB_TXD5_MARK, VI3_VSYNC_N_MARK, AVB_TXD6_MARK, 288 + VI3_D0_C0_MARK, AVB_TXD7_MARK, VI3_D1_C1_MARK, AVB_TX_ER_MARK, 289 + VI3_D2_C2_MARK, AVB_GTX_CLK_MARK, VI3_D3_C3_MARK, AVB_MDC_MARK, 290 + VI3_D4_C4_MARK, AVB_MDIO_MARK, VI3_D5_C5_MARK, AVB_LINK_MARK, 291 + VI3_D6_C6_MARK, AVB_MAGIC_MARK, VI3_D7_C7_MARK, AVB_PHY_INT_MARK, 292 + VI3_D8_Y0_MARK, AVB_CRS_MARK, VI3_D9_Y1_MARK, AVB_GTXREFCLK_MARK, 293 + VI3_D11_Y3_MARK, AVB_AVTP_MATCH_MARK, 294 + 295 + /* IPSR4 */ 296 + VI4_CLKENB_MARK, VI0_D12_G4_Y4_MARK, VI4_HSYNC_N_MARK, 297 + VI0_D13_G5_Y5_MARK, VI4_VSYNC_N_MARK, VI0_D14_G6_Y6_MARK, 298 + RDR_CLKOUT_MARK, VI4_D0_C0_MARK, VI0_D15_G7_Y7_MARK, VI4_D1_C1_MARK, 299 + VI0_D16_R0_MARK, VI1_D12_G4_Y4_MARK, VI4_D2_C2_MARK, VI0_D17_R1_MARK, 300 + VI1_D13_G5_Y5_MARK, VI4_D3_C3_MARK, VI0_D18_R2_MARK, VI1_D14_G6_Y6_MARK, 301 + VI4_D4_C4_MARK, VI0_D19_R3_MARK, VI1_D15_G7_Y7_MARK, VI4_D5_C5_MARK, 302 + VI0_D20_R4_MARK, VI2_D12_Y4_MARK, VI4_D6_C6_MARK, VI0_D21_R5_MARK, 303 + VI2_D13_Y5_MARK, VI4_D7_C7_MARK, VI0_D22_R6_MARK, VI2_D14_Y6_MARK, 304 + VI4_D8_Y0_MARK, VI0_D23_R7_MARK, VI2_D15_Y7_MARK, VI4_D9_Y1_MARK, 305 + VI3_D12_Y4_MARK, VI4_D10_Y2_MARK, VI3_D13_Y5_MARK, VI4_D11_Y3_MARK, 306 + VI3_D14_Y6_MARK, VI4_FIELD_MARK, VI3_D15_Y7_MARK, 307 + 308 + /* IPSR5 */ 309 + VI5_CLKENB_MARK, VI1_D12_G4_Y4_B_MARK, VI5_HSYNC_N_MARK, 310 + VI1_D13_G5_Y5_B_MARK, VI5_VSYNC_N_MARK, VI1_D14_G6_Y6_B_MARK, 311 + VI5_D0_C0_MARK, VI1_D15_G7_Y7_B_MARK, VI5_D1_C1_MARK, VI1_D16_R0_MARK, 312 + VI5_D2_C2_MARK, VI1_D17_R1_MARK, VI5_D3_C3_MARK, VI1_D18_R2_MARK, 313 + VI5_D4_C4_MARK, VI1_D19_R3_MARK, VI5_D5_C5_MARK, VI1_D20_R4_MARK, 314 + VI5_D6_C6_MARK, VI1_D21_R5_MARK, VI5_D7_C7_MARK, VI1_D22_R6_MARK, 315 + VI5_D8_Y0_MARK, VI1_D23_R7_MARK, 316 + 317 + /* IPSR6 */ 318 + MSIOF0_SCK_MARK, HSCK0_MARK, MSIOF0_SYNC_MARK, HCTS0_N_MARK, 319 + MSIOF0_TXD_MARK, HTX0_MARK, MSIOF0_RXD_MARK, HRX0_MARK, 320 + MSIOF1_SCK_MARK, HSCK1_MARK, MSIOF1_SYNC_MARK, HRTS1_N_MARK, 321 + MSIOF1_TXD_MARK, HTX1_MARK, MSIOF1_RXD_MARK, HRX1_MARK, 322 + DRACK0_MARK, SCK2_MARK, DACK0_MARK, TX2_MARK, DREQ0_N_MARK, 323 + RX2_MARK, DACK1_MARK, SCK3_MARK, TX3_MARK, DREQ1_N_MARK, 324 + RX3_MARK, 325 + 326 + /* IPSR7 */ 327 + PWM0_MARK, TCLK1_MARK, FSO_CFE_0_MARK, PWM1_MARK, TCLK2_MARK, 328 + FSO_CFE_1_MARK, PWM2_MARK, TCLK3_MARK, FSO_TOE_MARK, PWM3_MARK, 329 + PWM4_MARK, SSI_SCK34_MARK, TPU0TO0_MARK, SSI_WS34_MARK, TPU0TO1_MARK, 330 + SSI_SDATA3_MARK, TPU0TO2_MARK, SSI_SCK4_MARK, TPU0TO3_MARK, 331 + SSI_WS4_MARK, SSI_SDATA4_MARK, AUDIO_CLKOUT_MARK, AUDIO_CLKA_MARK, 332 + AUDIO_CLKB_MARK, 333 + PINMUX_MARK_END, 334 + }; 335 + 336 + static const u16 pinmux_data[] = { 337 + PINMUX_DATA_GP_ALL(), /* PINMUX_DATA(GP_M_N_DATA, GP_M_N_FN...), */ 338 + 339 + PINMUX_SINGLE(DU1_DB2_C0_DATA12), 340 + PINMUX_SINGLE(DU1_DB3_C1_DATA13), 341 + PINMUX_SINGLE(DU1_DB4_C2_DATA14), 342 + PINMUX_SINGLE(DU1_DB5_C3_DATA15), 343 + PINMUX_SINGLE(DU1_DB6_C4), 344 + PINMUX_SINGLE(DU1_DB7_C5), 345 + PINMUX_SINGLE(DU1_EXHSYNC_DU1_HSYNC), 346 + PINMUX_SINGLE(DU1_EXVSYNC_DU1_VSYNC), 347 + PINMUX_SINGLE(DU1_EXODDF_DU1_ODDF_DISP_CDE), 348 + PINMUX_SINGLE(DU1_DISP), 349 + PINMUX_SINGLE(DU1_CDE), 350 + PINMUX_SINGLE(D0), 351 + PINMUX_SINGLE(D1), 352 + PINMUX_SINGLE(D2), 353 + PINMUX_SINGLE(D3), 354 + PINMUX_SINGLE(D4), 355 + PINMUX_SINGLE(D5), 356 + PINMUX_SINGLE(D6), 357 + PINMUX_SINGLE(D7), 358 + PINMUX_SINGLE(D8), 359 + PINMUX_SINGLE(D9), 360 + PINMUX_SINGLE(D10), 361 + PINMUX_SINGLE(D11), 362 + PINMUX_SINGLE(D12), 363 + PINMUX_SINGLE(D13), 364 + PINMUX_SINGLE(D14), 365 + PINMUX_SINGLE(D15), 366 + PINMUX_SINGLE(A0), 367 + PINMUX_SINGLE(A1), 368 + PINMUX_SINGLE(A2), 369 + PINMUX_SINGLE(A3), 370 + PINMUX_SINGLE(A4), 371 + PINMUX_SINGLE(A5), 372 + PINMUX_SINGLE(A6), 373 + PINMUX_SINGLE(A7), 374 + PINMUX_SINGLE(A8), 375 + PINMUX_SINGLE(A9), 376 + PINMUX_SINGLE(A10), 377 + PINMUX_SINGLE(A11), 378 + PINMUX_SINGLE(A12), 379 + PINMUX_SINGLE(A13), 380 + PINMUX_SINGLE(A14), 381 + PINMUX_SINGLE(A15), 382 + PINMUX_SINGLE(A16), 383 + PINMUX_SINGLE(A17), 384 + PINMUX_SINGLE(A18), 385 + PINMUX_SINGLE(A19), 386 + PINMUX_SINGLE(CS1_N_A26), 387 + PINMUX_SINGLE(EX_CS0_N), 388 + PINMUX_SINGLE(EX_CS1_N), 389 + PINMUX_SINGLE(EX_CS2_N), 390 + PINMUX_SINGLE(EX_CS3_N), 391 + PINMUX_SINGLE(EX_CS4_N), 392 + PINMUX_SINGLE(EX_CS5_N), 393 + PINMUX_SINGLE(BS_N), 394 + PINMUX_SINGLE(RD_N), 395 + PINMUX_SINGLE(RD_WR_N), 396 + PINMUX_SINGLE(WE0_N), 397 + PINMUX_SINGLE(WE1_N), 398 + PINMUX_SINGLE(EX_WAIT0), 399 + PINMUX_SINGLE(IRQ0), 400 + PINMUX_SINGLE(IRQ1), 401 + PINMUX_SINGLE(IRQ2), 402 + PINMUX_SINGLE(IRQ3), 403 + PINMUX_SINGLE(CS0_N), 404 + PINMUX_SINGLE(VI0_CLK), 405 + PINMUX_SINGLE(VI0_CLKENB), 406 + PINMUX_SINGLE(VI0_HSYNC_N), 407 + PINMUX_SINGLE(VI0_VSYNC_N), 408 + PINMUX_SINGLE(VI0_D0_B0_C0), 409 + PINMUX_SINGLE(VI0_D1_B1_C1), 410 + PINMUX_SINGLE(VI0_D2_B2_C2), 411 + PINMUX_SINGLE(VI0_D3_B3_C3), 412 + PINMUX_SINGLE(VI0_D4_B4_C4), 413 + PINMUX_SINGLE(VI0_D5_B5_C5), 414 + PINMUX_SINGLE(VI0_D6_B6_C6), 415 + PINMUX_SINGLE(VI0_D7_B7_C7), 416 + PINMUX_SINGLE(VI0_D8_G0_Y0), 417 + PINMUX_SINGLE(VI0_D9_G1_Y1), 418 + PINMUX_SINGLE(VI0_D10_G2_Y2), 419 + PINMUX_SINGLE(VI0_D11_G3_Y3), 420 + PINMUX_SINGLE(VI0_FIELD), 421 + PINMUX_SINGLE(VI1_CLK), 422 + PINMUX_SINGLE(VI1_CLKENB), 423 + PINMUX_SINGLE(VI1_HSYNC_N), 424 + PINMUX_SINGLE(VI1_VSYNC_N), 425 + PINMUX_SINGLE(VI1_D0_B0_C0), 426 + PINMUX_SINGLE(VI1_D1_B1_C1), 427 + PINMUX_SINGLE(VI1_D2_B2_C2), 428 + PINMUX_SINGLE(VI1_D3_B3_C3), 429 + PINMUX_SINGLE(VI1_D4_B4_C4), 430 + PINMUX_SINGLE(VI1_D5_B5_C5), 431 + PINMUX_SINGLE(VI1_D6_B6_C6), 432 + PINMUX_SINGLE(VI1_D7_B7_C7), 433 + PINMUX_SINGLE(VI1_D8_G0_Y0), 434 + PINMUX_SINGLE(VI1_D9_G1_Y1), 435 + PINMUX_SINGLE(VI1_D10_G2_Y2), 436 + PINMUX_SINGLE(VI1_D11_G3_Y3), 437 + PINMUX_SINGLE(VI1_FIELD), 438 + PINMUX_SINGLE(VI3_D10_Y2), 439 + PINMUX_SINGLE(VI3_FIELD), 440 + PINMUX_SINGLE(VI4_CLK), 441 + PINMUX_SINGLE(VI5_CLK), 442 + PINMUX_SINGLE(VI5_D9_Y1), 443 + PINMUX_SINGLE(VI5_D10_Y2), 444 + PINMUX_SINGLE(VI5_D11_Y3), 445 + PINMUX_SINGLE(VI5_FIELD), 446 + PINMUX_SINGLE(HRTS0_N), 447 + PINMUX_SINGLE(HCTS1_N), 448 + PINMUX_SINGLE(SCK0), 449 + PINMUX_SINGLE(CTS0_N), 450 + PINMUX_SINGLE(RTS0_N), 451 + PINMUX_SINGLE(TX0), 452 + PINMUX_SINGLE(RX0), 453 + PINMUX_SINGLE(SCK1), 454 + PINMUX_SINGLE(CTS1_N), 455 + PINMUX_SINGLE(RTS1_N), 456 + PINMUX_SINGLE(TX1), 457 + PINMUX_SINGLE(RX1), 458 + PINMUX_SINGLE(SCIF_CLK), 459 + PINMUX_SINGLE(CAN0_TX), 460 + PINMUX_SINGLE(CAN0_RX), 461 + PINMUX_SINGLE(CAN_CLK), 462 + PINMUX_SINGLE(CAN1_TX), 463 + PINMUX_SINGLE(CAN1_RX), 464 + PINMUX_SINGLE(SD0_CLK), 465 + PINMUX_SINGLE(SD0_CMD), 466 + PINMUX_SINGLE(SD0_DAT0), 467 + PINMUX_SINGLE(SD0_DAT1), 468 + PINMUX_SINGLE(SD0_DAT2), 469 + PINMUX_SINGLE(SD0_DAT3), 470 + PINMUX_SINGLE(SD0_CD), 471 + PINMUX_SINGLE(SD0_WP), 472 + PINMUX_SINGLE(ADICLK), 473 + PINMUX_SINGLE(ADICS_SAMP), 474 + PINMUX_SINGLE(ADIDATA), 475 + PINMUX_SINGLE(ADICHS0), 476 + PINMUX_SINGLE(ADICHS1), 477 + PINMUX_SINGLE(ADICHS2), 478 + PINMUX_SINGLE(AVS1), 479 + PINMUX_SINGLE(AVS2), 480 + 481 + /* IPSR0 */ 482 + PINMUX_IPSR_GPSR(IP0_0, DU0_DR0_DATA0), 483 + PINMUX_IPSR_GPSR(IP0_1, DU0_DR1_DATA1), 484 + PINMUX_IPSR_GPSR(IP0_2, DU0_DR2_Y4_DATA2), 485 + PINMUX_IPSR_GPSR(IP0_3, DU0_DR3_Y5_DATA3), 486 + PINMUX_IPSR_GPSR(IP0_4, DU0_DR4_Y6_DATA4), 487 + PINMUX_IPSR_GPSR(IP0_5, DU0_DR5_Y7_DATA5), 488 + PINMUX_IPSR_GPSR(IP0_6, DU0_DR6_Y8_DATA6), 489 + PINMUX_IPSR_GPSR(IP0_7, DU0_DR7_Y9_DATA7), 490 + PINMUX_IPSR_GPSR(IP0_8, DU0_DG0_DATA8), 491 + PINMUX_IPSR_GPSR(IP0_9, DU0_DG1_DATA9), 492 + PINMUX_IPSR_GPSR(IP0_10, DU0_DG2_C6_DATA10), 493 + PINMUX_IPSR_GPSR(IP0_11, DU0_DG3_C7_DATA11), 494 + PINMUX_IPSR_GPSR(IP0_12, DU0_DG4_Y0_DATA12), 495 + PINMUX_IPSR_GPSR(IP0_13, DU0_DG5_Y1_DATA13), 496 + PINMUX_IPSR_GPSR(IP0_14, DU0_DG6_Y2_DATA14), 497 + PINMUX_IPSR_GPSR(IP0_15, DU0_DG7_Y3_DATA15), 498 + PINMUX_IPSR_GPSR(IP0_16, DU0_DB0), 499 + PINMUX_IPSR_GPSR(IP0_17, DU0_DB1), 500 + PINMUX_IPSR_GPSR(IP0_18, DU0_DB2_C0), 501 + PINMUX_IPSR_GPSR(IP0_19, DU0_DB3_C1), 502 + PINMUX_IPSR_GPSR(IP0_20, DU0_DB4_C2), 503 + PINMUX_IPSR_GPSR(IP0_21, DU0_DB5_C3), 504 + PINMUX_IPSR_GPSR(IP0_22, DU0_DB6_C4), 505 + PINMUX_IPSR_GPSR(IP0_23, DU0_DB7_C5), 506 + 507 + /* IPSR1 */ 508 + PINMUX_IPSR_GPSR(IP1_0, DU0_EXHSYNC_DU0_HSYNC), 509 + PINMUX_IPSR_GPSR(IP1_1, DU0_EXVSYNC_DU0_VSYNC), 510 + PINMUX_IPSR_GPSR(IP1_2, DU0_EXODDF_DU0_ODDF_DISP_CDE), 511 + PINMUX_IPSR_GPSR(IP1_3, DU0_DISP), 512 + PINMUX_IPSR_GPSR(IP1_4, DU0_CDE), 513 + PINMUX_IPSR_GPSR(IP1_5, DU1_DR2_Y4_DATA0), 514 + PINMUX_IPSR_GPSR(IP1_6, DU1_DR3_Y5_DATA1), 515 + PINMUX_IPSR_GPSR(IP1_7, DU1_DR4_Y6_DATA2), 516 + PINMUX_IPSR_GPSR(IP1_8, DU1_DR5_Y7_DATA3), 517 + PINMUX_IPSR_GPSR(IP1_9, DU1_DR6_DATA4), 518 + PINMUX_IPSR_GPSR(IP1_10, DU1_DR7_DATA5), 519 + PINMUX_IPSR_GPSR(IP1_11, DU1_DG2_C6_DATA6), 520 + PINMUX_IPSR_GPSR(IP1_12, DU1_DG3_C7_DATA7), 521 + PINMUX_IPSR_GPSR(IP1_13, DU1_DG4_Y0_DATA8), 522 + PINMUX_IPSR_GPSR(IP1_14, DU1_DG5_Y1_DATA9), 523 + PINMUX_IPSR_GPSR(IP1_15, DU1_DG6_Y2_DATA10), 524 + PINMUX_IPSR_GPSR(IP1_16, DU1_DG7_Y3_DATA11), 525 + PINMUX_IPSR_GPSR(IP1_17, A20), 526 + PINMUX_IPSR_GPSR(IP1_17, MOSI_IO0), 527 + PINMUX_IPSR_GPSR(IP1_18, A21), 528 + PINMUX_IPSR_GPSR(IP1_18, MISO_IO1), 529 + PINMUX_IPSR_GPSR(IP1_19, A22), 530 + PINMUX_IPSR_GPSR(IP1_19, IO2), 531 + PINMUX_IPSR_GPSR(IP1_20, A23), 532 + PINMUX_IPSR_GPSR(IP1_20, IO3), 533 + PINMUX_IPSR_GPSR(IP1_21, A24), 534 + PINMUX_IPSR_GPSR(IP1_21, SPCLK), 535 + PINMUX_IPSR_GPSR(IP1_22, A25), 536 + PINMUX_IPSR_GPSR(IP1_22, SSL), 537 + 538 + /* IPSR2 */ 539 + PINMUX_IPSR_GPSR(IP2_0, VI2_CLK), 540 + PINMUX_IPSR_GPSR(IP2_0, AVB_RX_CLK), 541 + PINMUX_IPSR_GPSR(IP2_1, VI2_CLKENB), 542 + PINMUX_IPSR_GPSR(IP2_1, AVB_RX_DV), 543 + PINMUX_IPSR_GPSR(IP2_2, VI2_HSYNC_N), 544 + PINMUX_IPSR_GPSR(IP2_2, AVB_RXD0), 545 + PINMUX_IPSR_GPSR(IP2_3, VI2_VSYNC_N), 546 + PINMUX_IPSR_GPSR(IP2_3, AVB_RXD1), 547 + PINMUX_IPSR_GPSR(IP2_4, VI2_D0_C0), 548 + PINMUX_IPSR_GPSR(IP2_4, AVB_RXD2), 549 + PINMUX_IPSR_GPSR(IP2_5, VI2_D1_C1), 550 + PINMUX_IPSR_GPSR(IP2_5, AVB_RXD3), 551 + PINMUX_IPSR_GPSR(IP2_6, VI2_D2_C2), 552 + PINMUX_IPSR_GPSR(IP2_6, AVB_RXD4), 553 + PINMUX_IPSR_GPSR(IP2_7, VI2_D3_C3), 554 + PINMUX_IPSR_GPSR(IP2_7, AVB_RXD5), 555 + PINMUX_IPSR_GPSR(IP2_8, VI2_D4_C4), 556 + PINMUX_IPSR_GPSR(IP2_8, AVB_RXD6), 557 + PINMUX_IPSR_GPSR(IP2_9, VI2_D5_C5), 558 + PINMUX_IPSR_GPSR(IP2_9, AVB_RXD7), 559 + PINMUX_IPSR_GPSR(IP2_10, VI2_D6_C6), 560 + PINMUX_IPSR_GPSR(IP2_10, AVB_RX_ER), 561 + PINMUX_IPSR_GPSR(IP2_11, VI2_D7_C7), 562 + PINMUX_IPSR_GPSR(IP2_11, AVB_COL), 563 + PINMUX_IPSR_GPSR(IP2_12, VI2_D8_Y0), 564 + PINMUX_IPSR_GPSR(IP2_12, AVB_TXD3), 565 + PINMUX_IPSR_GPSR(IP2_13, VI2_D9_Y1), 566 + PINMUX_IPSR_GPSR(IP2_13, AVB_TX_EN), 567 + PINMUX_IPSR_GPSR(IP2_14, VI2_D10_Y2), 568 + PINMUX_IPSR_GPSR(IP2_14, AVB_TXD0), 569 + PINMUX_IPSR_GPSR(IP2_15, VI2_D11_Y3), 570 + PINMUX_IPSR_GPSR(IP2_15, AVB_TXD1), 571 + PINMUX_IPSR_GPSR(IP2_16, VI2_FIELD), 572 + PINMUX_IPSR_GPSR(IP2_16, AVB_TXD2), 573 + 574 + /* IPSR3 */ 575 + PINMUX_IPSR_GPSR(IP3_0, VI3_CLK), 576 + PINMUX_IPSR_GPSR(IP3_0, AVB_TX_CLK), 577 + PINMUX_IPSR_GPSR(IP3_1, VI3_CLKENB), 578 + PINMUX_IPSR_GPSR(IP3_1, AVB_TXD4), 579 + PINMUX_IPSR_GPSR(IP3_2, VI3_HSYNC_N), 580 + PINMUX_IPSR_GPSR(IP3_2, AVB_TXD5), 581 + PINMUX_IPSR_GPSR(IP3_3, VI3_VSYNC_N), 582 + PINMUX_IPSR_GPSR(IP3_3, AVB_TXD6), 583 + PINMUX_IPSR_GPSR(IP3_4, VI3_D0_C0), 584 + PINMUX_IPSR_GPSR(IP3_4, AVB_TXD7), 585 + PINMUX_IPSR_GPSR(IP3_5, VI3_D1_C1), 586 + PINMUX_IPSR_GPSR(IP3_5, AVB_TX_ER), 587 + PINMUX_IPSR_GPSR(IP3_6, VI3_D2_C2), 588 + PINMUX_IPSR_GPSR(IP3_6, AVB_GTX_CLK), 589 + PINMUX_IPSR_GPSR(IP3_7, VI3_D3_C3), 590 + PINMUX_IPSR_GPSR(IP3_7, AVB_MDC), 591 + PINMUX_IPSR_GPSR(IP3_8, VI3_D4_C4), 592 + PINMUX_IPSR_GPSR(IP3_8, AVB_MDIO), 593 + PINMUX_IPSR_GPSR(IP3_9, VI3_D5_C5), 594 + PINMUX_IPSR_GPSR(IP3_9, AVB_LINK), 595 + PINMUX_IPSR_GPSR(IP3_10, VI3_D6_C6), 596 + PINMUX_IPSR_GPSR(IP3_10, AVB_MAGIC), 597 + PINMUX_IPSR_GPSR(IP3_11, VI3_D7_C7), 598 + PINMUX_IPSR_GPSR(IP3_11, AVB_PHY_INT), 599 + PINMUX_IPSR_GPSR(IP3_12, VI3_D8_Y0), 600 + PINMUX_IPSR_GPSR(IP3_12, AVB_CRS), 601 + PINMUX_IPSR_GPSR(IP3_13, VI3_D9_Y1), 602 + PINMUX_IPSR_GPSR(IP3_13, AVB_GTXREFCLK), 603 + PINMUX_IPSR_GPSR(IP3_14, VI3_D11_Y3), 604 + PINMUX_IPSR_GPSR(IP3_14, AVB_AVTP_MATCH), 605 + 606 + /* IPSR4 */ 607 + PINMUX_IPSR_GPSR(IP4_0, VI4_CLKENB), 608 + PINMUX_IPSR_GPSR(IP4_0, VI0_D12_G4_Y4), 609 + PINMUX_IPSR_GPSR(IP4_1, VI4_HSYNC_N), 610 + PINMUX_IPSR_GPSR(IP4_1, VI0_D13_G5_Y5), 611 + PINMUX_IPSR_GPSR(IP4_3_2, VI4_VSYNC_N), 612 + PINMUX_IPSR_GPSR(IP4_3_2, VI0_D14_G6_Y6), 613 + PINMUX_IPSR_GPSR(IP4_4, VI4_D0_C0), 614 + PINMUX_IPSR_GPSR(IP4_4, VI0_D15_G7_Y7), 615 + PINMUX_IPSR_GPSR(IP4_6_5, VI4_D1_C1), 616 + PINMUX_IPSR_GPSR(IP4_6_5, VI0_D16_R0), 617 + PINMUX_IPSR_MSEL(IP4_6_5, VI1_D12_G4_Y4, SEL_VI1_0), 618 + PINMUX_IPSR_GPSR(IP4_8_7, VI4_D2_C2), 619 + PINMUX_IPSR_GPSR(IP4_8_7, VI0_D17_R1), 620 + PINMUX_IPSR_MSEL(IP4_8_7, VI1_D13_G5_Y5, SEL_VI1_0), 621 + PINMUX_IPSR_GPSR(IP4_10_9, VI4_D3_C3), 622 + PINMUX_IPSR_GPSR(IP4_10_9, VI0_D18_R2), 623 + PINMUX_IPSR_MSEL(IP4_10_9, VI1_D14_G6_Y6, SEL_VI1_0), 624 + PINMUX_IPSR_GPSR(IP4_12_11, VI4_D4_C4), 625 + PINMUX_IPSR_GPSR(IP4_12_11, VI0_D19_R3), 626 + PINMUX_IPSR_MSEL(IP4_12_11, VI1_D15_G7_Y7, SEL_VI1_0), 627 + PINMUX_IPSR_GPSR(IP4_14_13, VI4_D5_C5), 628 + PINMUX_IPSR_GPSR(IP4_14_13, VI0_D20_R4), 629 + PINMUX_IPSR_GPSR(IP4_14_13, VI2_D12_Y4), 630 + PINMUX_IPSR_GPSR(IP4_16_15, VI4_D6_C6), 631 + PINMUX_IPSR_GPSR(IP4_16_15, VI0_D21_R5), 632 + PINMUX_IPSR_GPSR(IP4_16_15, VI2_D13_Y5), 633 + PINMUX_IPSR_GPSR(IP4_18_17, VI4_D7_C7), 634 + PINMUX_IPSR_GPSR(IP4_18_17, VI0_D22_R6), 635 + PINMUX_IPSR_GPSR(IP4_18_17, VI2_D14_Y6), 636 + PINMUX_IPSR_GPSR(IP4_20_19, VI4_D8_Y0), 637 + PINMUX_IPSR_GPSR(IP4_20_19, VI0_D23_R7), 638 + PINMUX_IPSR_GPSR(IP4_20_19, VI2_D15_Y7), 639 + PINMUX_IPSR_GPSR(IP4_21, VI4_D9_Y1), 640 + PINMUX_IPSR_GPSR(IP4_21, VI3_D12_Y4), 641 + PINMUX_IPSR_GPSR(IP4_22, VI4_D10_Y2), 642 + PINMUX_IPSR_GPSR(IP4_22, VI3_D13_Y5), 643 + PINMUX_IPSR_GPSR(IP4_23, VI4_D11_Y3), 644 + PINMUX_IPSR_GPSR(IP4_23, VI3_D14_Y6), 645 + PINMUX_IPSR_GPSR(IP4_24, VI4_FIELD), 646 + PINMUX_IPSR_GPSR(IP4_24, VI3_D15_Y7), 647 + 648 + /* IPSR5 */ 649 + PINMUX_IPSR_GPSR(IP5_0, VI5_CLKENB), 650 + PINMUX_IPSR_MSEL(IP5_0, VI1_D12_G4_Y4_B, SEL_VI1_1), 651 + PINMUX_IPSR_GPSR(IP5_1, VI5_HSYNC_N), 652 + PINMUX_IPSR_MSEL(IP5_1, VI1_D13_G5_Y5_B, SEL_VI1_1), 653 + PINMUX_IPSR_GPSR(IP5_2, VI5_VSYNC_N), 654 + PINMUX_IPSR_MSEL(IP5_2, VI1_D14_G6_Y6_B, SEL_VI1_1), 655 + PINMUX_IPSR_GPSR(IP5_3, VI5_D0_C0), 656 + PINMUX_IPSR_MSEL(IP5_3, VI1_D15_G7_Y7_B, SEL_VI1_1), 657 + PINMUX_IPSR_GPSR(IP5_4, VI5_D1_C1), 658 + PINMUX_IPSR_GPSR(IP5_4, VI1_D16_R0), 659 + PINMUX_IPSR_GPSR(IP5_5, VI5_D2_C2), 660 + PINMUX_IPSR_GPSR(IP5_5, VI1_D17_R1), 661 + PINMUX_IPSR_GPSR(IP5_6, VI5_D3_C3), 662 + PINMUX_IPSR_GPSR(IP5_6, VI1_D18_R2), 663 + PINMUX_IPSR_GPSR(IP5_7, VI5_D4_C4), 664 + PINMUX_IPSR_GPSR(IP5_7, VI1_D19_R3), 665 + PINMUX_IPSR_GPSR(IP5_8, VI5_D5_C5), 666 + PINMUX_IPSR_GPSR(IP5_8, VI1_D20_R4), 667 + PINMUX_IPSR_GPSR(IP5_9, VI5_D6_C6), 668 + PINMUX_IPSR_GPSR(IP5_9, VI1_D21_R5), 669 + PINMUX_IPSR_GPSR(IP5_10, VI5_D7_C7), 670 + PINMUX_IPSR_GPSR(IP5_10, VI1_D22_R6), 671 + PINMUX_IPSR_GPSR(IP5_11, VI5_D8_Y0), 672 + PINMUX_IPSR_GPSR(IP5_11, VI1_D23_R7), 673 + 674 + /* IPSR6 */ 675 + PINMUX_IPSR_GPSR(IP6_0, MSIOF0_SCK), 676 + PINMUX_IPSR_GPSR(IP6_0, HSCK0), 677 + PINMUX_IPSR_GPSR(IP6_1, MSIOF0_SYNC), 678 + PINMUX_IPSR_GPSR(IP6_1, HCTS0_N), 679 + PINMUX_IPSR_GPSR(IP6_2, MSIOF0_TXD), 680 + PINMUX_IPSR_GPSR(IP6_2, HTX0), 681 + PINMUX_IPSR_GPSR(IP6_3, MSIOF0_RXD), 682 + PINMUX_IPSR_GPSR(IP6_3, HRX0), 683 + PINMUX_IPSR_GPSR(IP6_4, MSIOF1_SCK), 684 + PINMUX_IPSR_GPSR(IP6_4, HSCK1), 685 + PINMUX_IPSR_GPSR(IP6_5, MSIOF1_SYNC), 686 + PINMUX_IPSR_GPSR(IP6_5, HRTS1_N), 687 + PINMUX_IPSR_GPSR(IP6_6, MSIOF1_TXD), 688 + PINMUX_IPSR_GPSR(IP6_6, HTX1), 689 + PINMUX_IPSR_GPSR(IP6_7, MSIOF1_RXD), 690 + PINMUX_IPSR_GPSR(IP6_7, HRX1), 691 + PINMUX_IPSR_GPSR(IP6_9_8, DRACK0), 692 + PINMUX_IPSR_GPSR(IP6_9_8, SCK2), 693 + PINMUX_IPSR_GPSR(IP6_11_10, DACK0), 694 + PINMUX_IPSR_GPSR(IP6_11_10, TX2), 695 + PINMUX_IPSR_GPSR(IP6_13_12, DREQ0_N), 696 + PINMUX_IPSR_GPSR(IP6_13_12, RX2), 697 + PINMUX_IPSR_GPSR(IP6_15_14, DACK1), 698 + PINMUX_IPSR_GPSR(IP6_15_14, SCK3), 699 + PINMUX_IPSR_GPSR(IP6_16, TX3), 700 + PINMUX_IPSR_GPSR(IP6_18_17, DREQ1_N), 701 + PINMUX_IPSR_GPSR(IP6_18_17, RX3), 702 + 703 + /* IPSR7 */ 704 + PINMUX_IPSR_GPSR(IP7_1_0, PWM0), 705 + PINMUX_IPSR_GPSR(IP7_1_0, TCLK1), 706 + PINMUX_IPSR_GPSR(IP7_1_0, FSO_CFE_0), 707 + PINMUX_IPSR_GPSR(IP7_3_2, PWM1), 708 + PINMUX_IPSR_GPSR(IP7_3_2, TCLK2), 709 + PINMUX_IPSR_GPSR(IP7_3_2, FSO_CFE_1), 710 + PINMUX_IPSR_GPSR(IP7_5_4, PWM2), 711 + PINMUX_IPSR_GPSR(IP7_5_4, TCLK3), 712 + PINMUX_IPSR_GPSR(IP7_5_4, FSO_TOE), 713 + PINMUX_IPSR_GPSR(IP7_6, PWM3), 714 + PINMUX_IPSR_GPSR(IP7_7, PWM4), 715 + PINMUX_IPSR_GPSR(IP7_9_8, SSI_SCK34), 716 + PINMUX_IPSR_GPSR(IP7_9_8, TPU0TO0), 717 + PINMUX_IPSR_GPSR(IP7_11_10, SSI_WS34), 718 + PINMUX_IPSR_GPSR(IP7_11_10, TPU0TO1), 719 + PINMUX_IPSR_GPSR(IP7_13_12, SSI_SDATA3), 720 + PINMUX_IPSR_GPSR(IP7_13_12, TPU0TO2), 721 + PINMUX_IPSR_GPSR(IP7_15_14, SSI_SCK4), 722 + PINMUX_IPSR_GPSR(IP7_15_14, TPU0TO3), 723 + PINMUX_IPSR_GPSR(IP7_16, SSI_WS4), 724 + PINMUX_IPSR_GPSR(IP7_17, SSI_SDATA4), 725 + PINMUX_IPSR_GPSR(IP7_18, AUDIO_CLKOUT), 726 + PINMUX_IPSR_GPSR(IP7_19, AUDIO_CLKA), 727 + PINMUX_IPSR_GPSR(IP7_20, AUDIO_CLKB), 728 + }; 729 + 730 + static const struct sh_pfc_pin pinmux_pins[] = { 731 + PINMUX_GPIO_GP_ALL(), 732 + }; 733 + 734 + /* - AVB -------------------------------------------------------------------- */ 735 + static const unsigned int avb_link_pins[] = { 736 + RCAR_GP_PIN(7, 9), 737 + }; 738 + static const unsigned int avb_link_mux[] = { 739 + AVB_LINK_MARK, 740 + }; 741 + static const unsigned int avb_magic_pins[] = { 742 + RCAR_GP_PIN(7, 10), 743 + }; 744 + static const unsigned int avb_magic_mux[] = { 745 + AVB_MAGIC_MARK, 746 + }; 747 + static const unsigned int avb_phy_int_pins[] = { 748 + RCAR_GP_PIN(7, 11), 749 + }; 750 + static const unsigned int avb_phy_int_mux[] = { 751 + AVB_PHY_INT_MARK, 752 + }; 753 + static const unsigned int avb_mdio_pins[] = { 754 + RCAR_GP_PIN(7, 7), RCAR_GP_PIN(7, 8), 755 + }; 756 + static const unsigned int avb_mdio_mux[] = { 757 + AVB_MDC_MARK, AVB_MDIO_MARK, 758 + }; 759 + static const unsigned int avb_mii_pins[] = { 760 + RCAR_GP_PIN(6, 14), RCAR_GP_PIN(6, 15), RCAR_GP_PIN(6, 16), 761 + RCAR_GP_PIN(6, 12), 762 + 763 + RCAR_GP_PIN(6, 2), RCAR_GP_PIN(6, 3), RCAR_GP_PIN(6, 4), 764 + RCAR_GP_PIN(6, 5), 765 + 766 + RCAR_GP_PIN(6, 10), RCAR_GP_PIN(6, 0), RCAR_GP_PIN(6, 1), 767 + RCAR_GP_PIN(7, 12), RCAR_GP_PIN(6, 13), RCAR_GP_PIN(7, 5), 768 + RCAR_GP_PIN(7, 0), RCAR_GP_PIN(6, 11), 769 + }; 770 + static const unsigned int avb_mii_mux[] = { 771 + AVB_TXD0_MARK, AVB_TXD1_MARK, AVB_TXD2_MARK, 772 + AVB_TXD3_MARK, 773 + 774 + AVB_RXD0_MARK, AVB_RXD1_MARK, AVB_RXD2_MARK, 775 + AVB_RXD3_MARK, 776 + 777 + AVB_RX_ER_MARK, AVB_RX_CLK_MARK, AVB_RX_DV_MARK, 778 + AVB_CRS_MARK, AVB_TX_EN_MARK, AVB_TX_ER_MARK, 779 + AVB_TX_CLK_MARK, AVB_COL_MARK, 780 + }; 781 + static const unsigned int avb_gmii_pins[] = { 782 + RCAR_GP_PIN(6, 14), RCAR_GP_PIN(6, 15), RCAR_GP_PIN(6, 16), 783 + RCAR_GP_PIN(6, 12), RCAR_GP_PIN(7, 1), RCAR_GP_PIN(7, 2), 784 + RCAR_GP_PIN(7, 3), RCAR_GP_PIN(7, 4), 785 + 786 + RCAR_GP_PIN(6, 2), RCAR_GP_PIN(6, 3), RCAR_GP_PIN(6, 4), 787 + RCAR_GP_PIN(6, 5), RCAR_GP_PIN(6, 6), RCAR_GP_PIN(6, 7), 788 + RCAR_GP_PIN(6, 8), RCAR_GP_PIN(6, 9), 789 + 790 + RCAR_GP_PIN(6, 10), RCAR_GP_PIN(6, 0), RCAR_GP_PIN(6, 1), 791 + RCAR_GP_PIN(7, 12), RCAR_GP_PIN(7, 6), RCAR_GP_PIN(7, 13), 792 + RCAR_GP_PIN(6, 13), RCAR_GP_PIN(7, 5), RCAR_GP_PIN(7, 0), 793 + RCAR_GP_PIN(6, 11), 794 + }; 795 + static const unsigned int avb_gmii_mux[] = { 796 + AVB_TXD0_MARK, AVB_TXD1_MARK, AVB_TXD2_MARK, 797 + AVB_TXD3_MARK, AVB_TXD4_MARK, AVB_TXD5_MARK, 798 + AVB_TXD6_MARK, AVB_TXD7_MARK, 799 + 800 + AVB_RXD0_MARK, AVB_RXD1_MARK, AVB_RXD2_MARK, 801 + AVB_RXD3_MARK, AVB_RXD4_MARK, AVB_RXD5_MARK, 802 + AVB_RXD6_MARK, AVB_RXD7_MARK, 803 + 804 + AVB_RX_ER_MARK, AVB_RX_CLK_MARK, AVB_RX_DV_MARK, 805 + AVB_CRS_MARK, AVB_GTX_CLK_MARK, AVB_GTXREFCLK_MARK, 806 + AVB_TX_EN_MARK, AVB_TX_ER_MARK, AVB_TX_CLK_MARK, 807 + AVB_COL_MARK, 808 + }; 809 + static const unsigned int avb_avtp_match_pins[] = { 810 + RCAR_GP_PIN(7, 15), 811 + }; 812 + static const unsigned int avb_avtp_match_mux[] = { 813 + AVB_AVTP_MATCH_MARK, 814 + }; 815 + /* - CAN -------------------------------------------------------------------- */ 816 + static const unsigned int can0_data_pins[] = { 817 + /* TX, RX */ 818 + RCAR_GP_PIN(10, 27), RCAR_GP_PIN(10, 28), 819 + }; 820 + static const unsigned int can0_data_mux[] = { 821 + CAN0_TX_MARK, CAN0_RX_MARK, 822 + }; 823 + static const unsigned int can1_data_pins[] = { 824 + /* TX, RX */ 825 + RCAR_GP_PIN(10, 30), RCAR_GP_PIN(10, 31), 826 + }; 827 + static const unsigned int can1_data_mux[] = { 828 + CAN1_TX_MARK, CAN1_RX_MARK, 829 + }; 830 + static const unsigned int can_clk_pins[] = { 831 + /* CAN_CLK */ 832 + RCAR_GP_PIN(10, 29), 833 + }; 834 + static const unsigned int can_clk_mux[] = { 835 + CAN_CLK_MARK, 836 + }; 837 + /* - DU --------------------------------------------------------------------- */ 838 + static const unsigned int du0_rgb666_pins[] = { 839 + /* R[7:2], G[7:2], B[7:2] */ 840 + RCAR_GP_PIN(0, 7), RCAR_GP_PIN(0, 6), RCAR_GP_PIN(0, 5), 841 + RCAR_GP_PIN(0, 4), RCAR_GP_PIN(0, 3), RCAR_GP_PIN(0, 2), 842 + RCAR_GP_PIN(0, 15), RCAR_GP_PIN(0, 14), RCAR_GP_PIN(0, 13), 843 + RCAR_GP_PIN(0, 12), RCAR_GP_PIN(0, 11), RCAR_GP_PIN(0, 10), 844 + RCAR_GP_PIN(0, 23), RCAR_GP_PIN(0, 22), RCAR_GP_PIN(0, 21), 845 + RCAR_GP_PIN(0, 20), RCAR_GP_PIN(0, 19), RCAR_GP_PIN(0, 18), 846 + }; 847 + static const unsigned int du0_rgb666_mux[] = { 848 + DU0_DR7_Y9_DATA7_MARK, DU0_DR6_Y8_DATA6_MARK, DU0_DR5_Y7_DATA5_MARK, 849 + DU0_DR4_Y6_DATA4_MARK, DU0_DR3_Y5_DATA3_MARK, DU0_DR2_Y4_DATA2_MARK, 850 + DU0_DG7_Y3_DATA15_MARK, DU0_DG6_Y2_DATA14_MARK, DU0_DG5_Y1_DATA13_MARK, 851 + DU0_DG4_Y0_DATA12_MARK, DU0_DG3_C7_DATA11_MARK, DU0_DG2_C6_DATA10_MARK, 852 + DU0_DB7_C5_MARK, DU0_DB6_C4_MARK, DU0_DB5_C3_MARK, 853 + DU0_DB4_C2_MARK, DU0_DB3_C1_MARK, DU0_DB2_C0_MARK, 854 + }; 855 + static const unsigned int du0_rgb888_pins[] = { 856 + /* R[7:0], G[7:0], B[7:0] */ 857 + RCAR_GP_PIN(0, 7), RCAR_GP_PIN(0, 6), RCAR_GP_PIN(0, 5), 858 + RCAR_GP_PIN(0, 4), RCAR_GP_PIN(0, 3), RCAR_GP_PIN(0, 2), 859 + RCAR_GP_PIN(0, 1), RCAR_GP_PIN(0, 0), 860 + RCAR_GP_PIN(0, 15), RCAR_GP_PIN(0, 14), RCAR_GP_PIN(0, 13), 861 + RCAR_GP_PIN(0, 12), RCAR_GP_PIN(0, 11), RCAR_GP_PIN(0, 10), 862 + RCAR_GP_PIN(0, 9), RCAR_GP_PIN(0, 8), 863 + RCAR_GP_PIN(0, 23), RCAR_GP_PIN(0, 22), RCAR_GP_PIN(0, 21), 864 + RCAR_GP_PIN(0, 20), RCAR_GP_PIN(0, 19), RCAR_GP_PIN(0, 18), 865 + RCAR_GP_PIN(0, 17), RCAR_GP_PIN(0, 16), 866 + }; 867 + static const unsigned int du0_rgb888_mux[] = { 868 + DU0_DR7_Y9_DATA7_MARK, DU0_DR6_Y8_DATA6_MARK, DU0_DR5_Y7_DATA5_MARK, 869 + DU0_DR4_Y6_DATA4_MARK, DU0_DR3_Y5_DATA3_MARK, DU0_DR2_Y4_DATA2_MARK, 870 + DU0_DR1_DATA1_MARK, DU0_DR0_DATA0_MARK, 871 + DU0_DG7_Y3_DATA15_MARK, DU0_DG6_Y2_DATA14_MARK, DU0_DG5_Y1_DATA13_MARK, 872 + DU0_DG4_Y0_DATA12_MARK, DU0_DG3_C7_DATA11_MARK, DU0_DG2_C6_DATA10_MARK, 873 + DU0_DG1_DATA9_MARK, DU0_DG0_DATA8_MARK, 874 + DU0_DB7_C5_MARK, DU0_DB6_C4_MARK, DU0_DB5_C3_MARK, 875 + DU0_DB4_C2_MARK, DU0_DB3_C1_MARK, DU0_DB2_C0_MARK, 876 + DU0_DB1_MARK, DU0_DB0_MARK, 877 + }; 878 + static const unsigned int du0_sync_pins[] = { 879 + /* EXVSYNC/VSYNC, EXHSYNC/HSYNC */ 880 + RCAR_GP_PIN(0, 25), RCAR_GP_PIN(0, 24), 881 + }; 882 + static const unsigned int du0_sync_mux[] = { 883 + DU0_EXVSYNC_DU0_VSYNC_MARK, DU0_EXHSYNC_DU0_HSYNC_MARK, 884 + }; 885 + static const unsigned int du0_oddf_pins[] = { 886 + /* EXODDF/ODDF/DISP/CDE */ 887 + RCAR_GP_PIN(0, 26), 888 + }; 889 + static const unsigned int du0_oddf_mux[] = { 890 + DU0_EXODDF_DU0_ODDF_DISP_CDE_MARK 891 + }; 892 + static const unsigned int du0_disp_pins[] = { 893 + /* DISP */ 894 + RCAR_GP_PIN(0, 27), 895 + }; 896 + static const unsigned int du0_disp_mux[] = { 897 + DU0_DISP_MARK, 898 + }; 899 + static const unsigned int du0_cde_pins[] = { 900 + /* CDE */ 901 + RCAR_GP_PIN(0, 28), 902 + }; 903 + static const unsigned int du0_cde_mux[] = { 904 + DU0_CDE_MARK, 905 + }; 906 + static const unsigned int du1_rgb666_pins[] = { 907 + /* R[7:2], G[7:2], B[7:2] */ 908 + RCAR_GP_PIN(1, 5), RCAR_GP_PIN(1, 4), RCAR_GP_PIN(1, 3), 909 + RCAR_GP_PIN(1, 2), RCAR_GP_PIN(1, 1), RCAR_GP_PIN(1, 0), 910 + RCAR_GP_PIN(1, 11), RCAR_GP_PIN(1, 10), RCAR_GP_PIN(1, 9), 911 + RCAR_GP_PIN(1, 8), RCAR_GP_PIN(1, 7), RCAR_GP_PIN(1, 6), 912 + RCAR_GP_PIN(1, 17), RCAR_GP_PIN(1, 16), RCAR_GP_PIN(1, 15), 913 + RCAR_GP_PIN(1, 14), RCAR_GP_PIN(1, 13), RCAR_GP_PIN(1, 12), 914 + }; 915 + static const unsigned int du1_rgb666_mux[] = { 916 + DU1_DR7_DATA5_MARK, DU1_DR6_DATA4_MARK, DU1_DR5_Y7_DATA3_MARK, 917 + DU1_DR4_Y6_DATA2_MARK, DU1_DR3_Y5_DATA1_MARK, DU1_DR2_Y4_DATA0_MARK, 918 + DU1_DG7_Y3_DATA11_MARK, DU1_DG6_Y2_DATA10_MARK, DU1_DG5_Y1_DATA9_MARK, 919 + DU1_DG4_Y0_DATA8_MARK, DU1_DG3_C7_DATA7_MARK, DU1_DG2_C6_DATA6_MARK, 920 + DU1_DB7_C5_MARK, DU1_DB6_C4_MARK, DU1_DB5_C3_DATA15_MARK, 921 + DU1_DB4_C2_DATA14_MARK, DU1_DB3_C1_DATA13_MARK, DU1_DB2_C0_DATA12_MARK, 922 + }; 923 + static const unsigned int du1_sync_pins[] = { 924 + /* EXVSYNC/VSYNC, EXHSYNC/HSYNC */ 925 + RCAR_GP_PIN(1, 19), RCAR_GP_PIN(1, 18), 926 + }; 927 + static const unsigned int du1_sync_mux[] = { 928 + DU1_EXVSYNC_DU1_VSYNC_MARK, DU1_EXHSYNC_DU1_HSYNC_MARK, 929 + }; 930 + static const unsigned int du1_oddf_pins[] = { 931 + /* EXODDF/ODDF/DISP/CDE */ 932 + RCAR_GP_PIN(1, 20), 933 + }; 934 + static const unsigned int du1_oddf_mux[] = { 935 + DU1_EXODDF_DU1_ODDF_DISP_CDE_MARK 936 + }; 937 + static const unsigned int du1_disp_pins[] = { 938 + /* DISP */ 939 + RCAR_GP_PIN(1, 21), 940 + }; 941 + static const unsigned int du1_disp_mux[] = { 942 + DU1_DISP_MARK, 943 + }; 944 + static const unsigned int du1_cde_pins[] = { 945 + /* CDE */ 946 + RCAR_GP_PIN(1, 22), 947 + }; 948 + static const unsigned int du1_cde_mux[] = { 949 + DU1_CDE_MARK, 950 + }; 951 + /* - INTC ------------------------------------------------------------------- */ 952 + static const unsigned int intc_irq0_pins[] = { 953 + /* IRQ0 */ 954 + RCAR_GP_PIN(3, 19), 955 + }; 956 + static const unsigned int intc_irq0_mux[] = { 957 + IRQ0_MARK, 958 + }; 959 + static const unsigned int intc_irq1_pins[] = { 960 + /* IRQ1 */ 961 + RCAR_GP_PIN(3, 20), 962 + }; 963 + static const unsigned int intc_irq1_mux[] = { 964 + IRQ1_MARK, 965 + }; 966 + static const unsigned int intc_irq2_pins[] = { 967 + /* IRQ2 */ 968 + RCAR_GP_PIN(3, 21), 969 + }; 970 + static const unsigned int intc_irq2_mux[] = { 971 + IRQ2_MARK, 972 + }; 973 + static const unsigned int intc_irq3_pins[] = { 974 + /* IRQ3 */ 975 + RCAR_GP_PIN(3, 22), 976 + }; 977 + static const unsigned int intc_irq3_mux[] = { 978 + IRQ3_MARK, 979 + }; 980 + /* - LBSC ------------------------------------------------------------------- */ 981 + static const unsigned int lbsc_cs0_pins[] = { 982 + /* CS0# */ 983 + RCAR_GP_PIN(3, 27), 984 + }; 985 + static const unsigned int lbsc_cs0_mux[] = { 986 + CS0_N_MARK, 987 + }; 988 + static const unsigned int lbsc_cs1_pins[] = { 989 + /* CS1#_A26 */ 990 + RCAR_GP_PIN(3, 6), 991 + }; 992 + static const unsigned int lbsc_cs1_mux[] = { 993 + CS1_N_A26_MARK, 994 + }; 995 + static const unsigned int lbsc_ex_cs0_pins[] = { 996 + /* EX_CS0# */ 997 + RCAR_GP_PIN(3, 7), 998 + }; 999 + static const unsigned int lbsc_ex_cs0_mux[] = { 1000 + EX_CS0_N_MARK, 1001 + }; 1002 + static const unsigned int lbsc_ex_cs1_pins[] = { 1003 + /* EX_CS1# */ 1004 + RCAR_GP_PIN(3, 8), 1005 + }; 1006 + static const unsigned int lbsc_ex_cs1_mux[] = { 1007 + EX_CS1_N_MARK, 1008 + }; 1009 + static const unsigned int lbsc_ex_cs2_pins[] = { 1010 + /* EX_CS2# */ 1011 + RCAR_GP_PIN(3, 9), 1012 + }; 1013 + static const unsigned int lbsc_ex_cs2_mux[] = { 1014 + EX_CS2_N_MARK, 1015 + }; 1016 + static const unsigned int lbsc_ex_cs3_pins[] = { 1017 + /* EX_CS3# */ 1018 + RCAR_GP_PIN(3, 10), 1019 + }; 1020 + static const unsigned int lbsc_ex_cs3_mux[] = { 1021 + EX_CS3_N_MARK, 1022 + }; 1023 + static const unsigned int lbsc_ex_cs4_pins[] = { 1024 + /* EX_CS4# */ 1025 + RCAR_GP_PIN(3, 11), 1026 + }; 1027 + static const unsigned int lbsc_ex_cs4_mux[] = { 1028 + EX_CS4_N_MARK, 1029 + }; 1030 + static const unsigned int lbsc_ex_cs5_pins[] = { 1031 + /* EX_CS5# */ 1032 + RCAR_GP_PIN(3, 12), 1033 + }; 1034 + static const unsigned int lbsc_ex_cs5_mux[] = { 1035 + EX_CS5_N_MARK, 1036 + }; 1037 + /* - MSIOF0 ----------------------------------------------------------------- */ 1038 + static const unsigned int msiof0_clk_pins[] = { 1039 + /* SCK */ 1040 + RCAR_GP_PIN(10, 0), 1041 + }; 1042 + static const unsigned int msiof0_clk_mux[] = { 1043 + MSIOF0_SCK_MARK, 1044 + }; 1045 + static const unsigned int msiof0_sync_pins[] = { 1046 + /* SYNC */ 1047 + RCAR_GP_PIN(10, 1), 1048 + }; 1049 + static const unsigned int msiof0_sync_mux[] = { 1050 + MSIOF0_SYNC_MARK, 1051 + }; 1052 + static const unsigned int msiof0_rx_pins[] = { 1053 + /* RXD */ 1054 + RCAR_GP_PIN(10, 4), 1055 + }; 1056 + static const unsigned int msiof0_rx_mux[] = { 1057 + MSIOF0_RXD_MARK, 1058 + }; 1059 + static const unsigned int msiof0_tx_pins[] = { 1060 + /* TXD */ 1061 + RCAR_GP_PIN(10, 3), 1062 + }; 1063 + static const unsigned int msiof0_tx_mux[] = { 1064 + MSIOF0_TXD_MARK, 1065 + }; 1066 + /* - MSIOF1 ----------------------------------------------------------------- */ 1067 + static const unsigned int msiof1_clk_pins[] = { 1068 + /* SCK */ 1069 + RCAR_GP_PIN(10, 5), 1070 + }; 1071 + static const unsigned int msiof1_clk_mux[] = { 1072 + MSIOF1_SCK_MARK, 1073 + }; 1074 + static const unsigned int msiof1_sync_pins[] = { 1075 + /* SYNC */ 1076 + RCAR_GP_PIN(10, 6), 1077 + }; 1078 + static const unsigned int msiof1_sync_mux[] = { 1079 + MSIOF1_SYNC_MARK, 1080 + }; 1081 + static const unsigned int msiof1_rx_pins[] = { 1082 + /* RXD */ 1083 + RCAR_GP_PIN(10, 9), 1084 + }; 1085 + static const unsigned int msiof1_rx_mux[] = { 1086 + MSIOF1_RXD_MARK, 1087 + }; 1088 + static const unsigned int msiof1_tx_pins[] = { 1089 + /* TXD */ 1090 + RCAR_GP_PIN(10, 8), 1091 + }; 1092 + static const unsigned int msiof1_tx_mux[] = { 1093 + MSIOF1_TXD_MARK, 1094 + }; 1095 + /* - QSPI ------------------------------------------------------------------- */ 1096 + static const unsigned int qspi_ctrl_pins[] = { 1097 + /* SPCLK, SSL */ 1098 + RCAR_GP_PIN(3, 25), RCAR_GP_PIN(3, 26), 1099 + }; 1100 + static const unsigned int qspi_ctrl_mux[] = { 1101 + SPCLK_MARK, SSL_MARK, 1102 + }; 1103 + static const unsigned int qspi_data2_pins[] = { 1104 + /* MOSI_IO0, MISO_IO1 */ 1105 + RCAR_GP_PIN(3, 4), RCAR_GP_PIN(3, 5), 1106 + }; 1107 + static const unsigned int qspi_data2_mux[] = { 1108 + MOSI_IO0_MARK, MISO_IO1_MARK, 1109 + }; 1110 + static const unsigned int qspi_data4_pins[] = { 1111 + /* MOSI_IO0, MISO_IO1, IO2, IO3 */ 1112 + RCAR_GP_PIN(3, 4), RCAR_GP_PIN(3, 5), RCAR_GP_PIN(3, 23), 1113 + RCAR_GP_PIN(3, 24), 1114 + }; 1115 + static const unsigned int qspi_data4_mux[] = { 1116 + MOSI_IO0_MARK, MISO_IO1_MARK, IO2_MARK, IO3_MARK, 1117 + }; 1118 + /* - SCIF0 ------------------------------------------------------------------ */ 1119 + static const unsigned int scif0_data_pins[] = { 1120 + /* RX, TX */ 1121 + RCAR_GP_PIN(10, 14), RCAR_GP_PIN(10, 13), 1122 + }; 1123 + static const unsigned int scif0_data_mux[] = { 1124 + RX0_MARK, TX0_MARK, 1125 + }; 1126 + static const unsigned int scif0_clk_pins[] = { 1127 + /* SCK */ 1128 + RCAR_GP_PIN(10, 10), 1129 + }; 1130 + static const unsigned int scif0_clk_mux[] = { 1131 + SCK0_MARK, 1132 + }; 1133 + static const unsigned int scif0_ctrl_pins[] = { 1134 + /* RTS, CTS */ 1135 + RCAR_GP_PIN(10, 12), RCAR_GP_PIN(10, 11), 1136 + }; 1137 + static const unsigned int scif0_ctrl_mux[] = { 1138 + RTS0_N_MARK, CTS0_N_MARK, 1139 + }; 1140 + /* - SCIF3 ------------------------------------------------------------------ */ 1141 + static const unsigned int scif3_data_pins[] = { 1142 + /* RX, TX */ 1143 + RCAR_GP_PIN(10, 25), RCAR_GP_PIN(10, 24), 1144 + }; 1145 + static const unsigned int scif3_data_mux[] = { 1146 + RX3_MARK, TX3_MARK, 1147 + }; 1148 + static const unsigned int scif3_clk_pins[] = { 1149 + /* SCK */ 1150 + RCAR_GP_PIN(10, 23), 1151 + }; 1152 + static const unsigned int scif3_clk_mux[] = { 1153 + SCK3_MARK, 1154 + }; 1155 + /* - SDHI0 ------------------------------------------------------------------ */ 1156 + static const unsigned int sdhi0_data1_pins[] = { 1157 + /* DAT0 */ 1158 + RCAR_GP_PIN(11, 7), 1159 + }; 1160 + static const unsigned int sdhi0_data1_mux[] = { 1161 + SD0_DAT0_MARK, 1162 + }; 1163 + static const unsigned int sdhi0_data4_pins[] = { 1164 + /* DAT[0-3] */ 1165 + RCAR_GP_PIN(11, 7), RCAR_GP_PIN(11, 8), 1166 + RCAR_GP_PIN(11, 9), RCAR_GP_PIN(11, 10), 1167 + }; 1168 + static const unsigned int sdhi0_data4_mux[] = { 1169 + SD0_DAT0_MARK, SD0_DAT1_MARK, SD0_DAT2_MARK, SD0_DAT3_MARK, 1170 + }; 1171 + static const unsigned int sdhi0_ctrl_pins[] = { 1172 + /* CLK, CMD */ 1173 + RCAR_GP_PIN(11, 5), RCAR_GP_PIN(11, 6), 1174 + }; 1175 + static const unsigned int sdhi0_ctrl_mux[] = { 1176 + SD0_CLK_MARK, SD0_CMD_MARK, 1177 + }; 1178 + static const unsigned int sdhi0_cd_pins[] = { 1179 + /* CD */ 1180 + RCAR_GP_PIN(11, 11), 1181 + }; 1182 + static const unsigned int sdhi0_cd_mux[] = { 1183 + SD0_CD_MARK, 1184 + }; 1185 + static const unsigned int sdhi0_wp_pins[] = { 1186 + /* WP */ 1187 + RCAR_GP_PIN(11, 12), 1188 + }; 1189 + static const unsigned int sdhi0_wp_mux[] = { 1190 + SD0_WP_MARK, 1191 + }; 1192 + /* - VIN0 ------------------------------------------------------------------- */ 1193 + static const union vin_data vin0_data_pins = { 1194 + .data24 = { 1195 + /* B */ 1196 + RCAR_GP_PIN(4, 4), RCAR_GP_PIN(4, 5), 1197 + RCAR_GP_PIN(4, 6), RCAR_GP_PIN(4, 7), 1198 + RCAR_GP_PIN(4, 8), RCAR_GP_PIN(4, 9), 1199 + RCAR_GP_PIN(4, 10), RCAR_GP_PIN(4, 11), 1200 + /* G */ 1201 + RCAR_GP_PIN(4, 12), RCAR_GP_PIN(4, 13), 1202 + RCAR_GP_PIN(4, 14), RCAR_GP_PIN(4, 15), 1203 + RCAR_GP_PIN(8, 1), RCAR_GP_PIN(8, 2), 1204 + RCAR_GP_PIN(8, 3), RCAR_GP_PIN(8, 4), 1205 + /* R */ 1206 + RCAR_GP_PIN(8, 5), RCAR_GP_PIN(8, 6), 1207 + RCAR_GP_PIN(8, 7), RCAR_GP_PIN(8, 8), 1208 + RCAR_GP_PIN(8, 9), RCAR_GP_PIN(8, 10), 1209 + RCAR_GP_PIN(8, 11), RCAR_GP_PIN(8, 12), 1210 + }, 1211 + }; 1212 + static const union vin_data vin0_data_mux = { 1213 + .data24 = { 1214 + /* B */ 1215 + VI0_D0_B0_C0_MARK, VI0_D1_B1_C1_MARK, 1216 + VI0_D2_B2_C2_MARK, VI0_D3_B3_C3_MARK, 1217 + VI0_D4_B4_C4_MARK, VI0_D5_B5_C5_MARK, 1218 + VI0_D6_B6_C6_MARK, VI0_D7_B7_C7_MARK, 1219 + /* G */ 1220 + VI0_D8_G0_Y0_MARK, VI0_D9_G1_Y1_MARK, 1221 + VI0_D10_G2_Y2_MARK, VI0_D11_G3_Y3_MARK, 1222 + VI0_D12_G4_Y4_MARK, VI0_D13_G5_Y5_MARK, 1223 + VI0_D14_G6_Y6_MARK, VI0_D15_G7_Y7_MARK, 1224 + /* R */ 1225 + VI0_D16_R0_MARK, VI0_D17_R1_MARK, 1226 + VI0_D18_R2_MARK, VI0_D19_R3_MARK, 1227 + VI0_D20_R4_MARK, VI0_D21_R5_MARK, 1228 + VI0_D22_R6_MARK, VI0_D23_R7_MARK, 1229 + }, 1230 + }; 1231 + static const unsigned int vin0_data18_pins[] = { 1232 + /* B */ 1233 + RCAR_GP_PIN(4, 6), RCAR_GP_PIN(4, 7), 1234 + RCAR_GP_PIN(4, 8), RCAR_GP_PIN(4, 9), 1235 + RCAR_GP_PIN(4, 10), RCAR_GP_PIN(4, 11), 1236 + /* G */ 1237 + RCAR_GP_PIN(4, 14), RCAR_GP_PIN(4, 15), 1238 + RCAR_GP_PIN(8, 1), RCAR_GP_PIN(8, 2), 1239 + RCAR_GP_PIN(8, 3), RCAR_GP_PIN(8, 4), 1240 + /* R */ 1241 + RCAR_GP_PIN(8, 7), RCAR_GP_PIN(8, 8), 1242 + RCAR_GP_PIN(8, 9), RCAR_GP_PIN(8, 10), 1243 + RCAR_GP_PIN(8, 11), RCAR_GP_PIN(8, 12), 1244 + }; 1245 + static const unsigned int vin0_data18_mux[] = { 1246 + /* B */ 1247 + VI0_D2_B2_C2_MARK, VI0_D3_B3_C3_MARK, 1248 + VI0_D4_B4_C4_MARK, VI0_D5_B5_C5_MARK, 1249 + VI0_D6_B6_C6_MARK, VI0_D7_B7_C7_MARK, 1250 + /* G */ 1251 + VI0_D10_G2_Y2_MARK, VI0_D11_G3_Y3_MARK, 1252 + VI0_D12_G4_Y4_MARK, VI0_D13_G5_Y5_MARK, 1253 + VI0_D14_G6_Y6_MARK, VI0_D15_G7_Y7_MARK, 1254 + /* R */ 1255 + VI0_D18_R2_MARK, VI0_D19_R3_MARK, 1256 + VI0_D20_R4_MARK, VI0_D21_R5_MARK, 1257 + VI0_D22_R6_MARK, VI0_D23_R7_MARK, 1258 + }; 1259 + static const unsigned int vin0_sync_pins[] = { 1260 + /* HSYNC#, VSYNC# */ 1261 + RCAR_GP_PIN(4, 2), RCAR_GP_PIN(4, 3), 1262 + }; 1263 + static const unsigned int vin0_sync_mux[] = { 1264 + VI0_HSYNC_N_MARK, VI0_VSYNC_N_MARK, 1265 + }; 1266 + static const unsigned int vin0_field_pins[] = { 1267 + RCAR_GP_PIN(4, 16), 1268 + }; 1269 + static const unsigned int vin0_field_mux[] = { 1270 + VI0_FIELD_MARK, 1271 + }; 1272 + static const unsigned int vin0_clkenb_pins[] = { 1273 + RCAR_GP_PIN(4, 1), 1274 + }; 1275 + static const unsigned int vin0_clkenb_mux[] = { 1276 + VI0_CLKENB_MARK, 1277 + }; 1278 + static const unsigned int vin0_clk_pins[] = { 1279 + RCAR_GP_PIN(4, 0), 1280 + }; 1281 + static const unsigned int vin0_clk_mux[] = { 1282 + VI0_CLK_MARK, 1283 + }; 1284 + /* - VIN1 ------------------------------------------------------------------- */ 1285 + static const union vin_data vin1_data_pins = { 1286 + .data24 = { 1287 + /* B */ 1288 + RCAR_GP_PIN(5, 4), RCAR_GP_PIN(5, 5), 1289 + RCAR_GP_PIN(5, 6), RCAR_GP_PIN(5, 7), 1290 + RCAR_GP_PIN(5, 8), RCAR_GP_PIN(5, 9), 1291 + RCAR_GP_PIN(5, 10), RCAR_GP_PIN(5, 11), 1292 + /* G */ 1293 + RCAR_GP_PIN(5, 12), RCAR_GP_PIN(5, 13), 1294 + RCAR_GP_PIN(5, 14), RCAR_GP_PIN(5, 15), 1295 + RCAR_GP_PIN(8, 5), RCAR_GP_PIN(8, 6), 1296 + RCAR_GP_PIN(8, 7), RCAR_GP_PIN(8, 8), 1297 + /* R */ 1298 + RCAR_GP_PIN(9, 5), RCAR_GP_PIN(9, 6), 1299 + RCAR_GP_PIN(9, 7), RCAR_GP_PIN(9, 8), 1300 + RCAR_GP_PIN(9, 9), RCAR_GP_PIN(9, 10), 1301 + RCAR_GP_PIN(9, 11), RCAR_GP_PIN(9, 12), 1302 + }, 1303 + }; 1304 + static const union vin_data vin1_data_mux = { 1305 + .data24 = { 1306 + /* B */ 1307 + VI1_D0_B0_C0_MARK, VI1_D1_B1_C1_MARK, 1308 + VI1_D2_B2_C2_MARK, VI1_D3_B3_C3_MARK, 1309 + VI1_D4_B4_C4_MARK, VI1_D5_B5_C5_MARK, 1310 + VI1_D6_B6_C6_MARK, VI1_D7_B7_C7_MARK, 1311 + /* G */ 1312 + VI1_D8_G0_Y0_MARK, VI1_D9_G1_Y1_MARK, 1313 + VI1_D10_G2_Y2_MARK, VI1_D11_G3_Y3_MARK, 1314 + VI1_D12_G4_Y4_MARK, VI1_D13_G5_Y5_MARK, 1315 + VI1_D14_G6_Y6_MARK, VI1_D15_G7_Y7_MARK, 1316 + /* R */ 1317 + VI1_D16_R0_MARK, VI1_D17_R1_MARK, 1318 + VI1_D18_R2_MARK, VI1_D19_R3_MARK, 1319 + VI1_D20_R4_MARK, VI1_D21_R5_MARK, 1320 + VI1_D22_R6_MARK, VI1_D23_R7_MARK, 1321 + }, 1322 + }; 1323 + static const unsigned int vin1_data18_pins[] = { 1324 + /* B */ 1325 + RCAR_GP_PIN(5, 6), RCAR_GP_PIN(5, 7), 1326 + RCAR_GP_PIN(5, 8), RCAR_GP_PIN(5, 9), 1327 + RCAR_GP_PIN(5, 10), RCAR_GP_PIN(5, 11), 1328 + /* G */ 1329 + RCAR_GP_PIN(5, 14), RCAR_GP_PIN(5, 15), 1330 + RCAR_GP_PIN(8, 5), RCAR_GP_PIN(8, 6), 1331 + RCAR_GP_PIN(8, 7), RCAR_GP_PIN(8, 8), 1332 + /* R */ 1333 + RCAR_GP_PIN(9, 7), RCAR_GP_PIN(9, 8), 1334 + RCAR_GP_PIN(9, 9), RCAR_GP_PIN(9, 10), 1335 + RCAR_GP_PIN(9, 11), RCAR_GP_PIN(9, 12), 1336 + }; 1337 + static const unsigned int vin1_data18_mux[] = { 1338 + /* B */ 1339 + VI1_D2_B2_C2_MARK, VI1_D3_B3_C3_MARK, 1340 + VI1_D4_B4_C4_MARK, VI1_D5_B5_C5_MARK, 1341 + VI1_D6_B6_C6_MARK, VI1_D7_B7_C7_MARK, 1342 + /* G */ 1343 + VI1_D10_G2_Y2_MARK, VI1_D11_G3_Y3_MARK, 1344 + VI1_D12_G4_Y4_MARK, VI1_D13_G5_Y5_MARK, 1345 + VI1_D14_G6_Y6_MARK, VI1_D15_G7_Y7_MARK, 1346 + /* R */ 1347 + VI1_D18_R2_MARK, VI1_D19_R3_MARK, 1348 + VI1_D20_R4_MARK, VI1_D21_R5_MARK, 1349 + VI1_D22_R6_MARK, VI1_D23_R7_MARK, 1350 + }; 1351 + static const union vin_data vin1_data_b_pins = { 1352 + .data24 = { 1353 + /* B */ 1354 + RCAR_GP_PIN(5, 4), RCAR_GP_PIN(5, 5), 1355 + RCAR_GP_PIN(5, 6), RCAR_GP_PIN(5, 7), 1356 + RCAR_GP_PIN(5, 8), RCAR_GP_PIN(5, 9), 1357 + RCAR_GP_PIN(5, 10), RCAR_GP_PIN(5, 11), 1358 + /* G */ 1359 + RCAR_GP_PIN(5, 12), RCAR_GP_PIN(5, 13), 1360 + RCAR_GP_PIN(5, 14), RCAR_GP_PIN(5, 15), 1361 + RCAR_GP_PIN(9, 1), RCAR_GP_PIN(9, 2), 1362 + RCAR_GP_PIN(9, 3), RCAR_GP_PIN(9, 4), 1363 + /* R */ 1364 + RCAR_GP_PIN(9, 5), RCAR_GP_PIN(9, 6), 1365 + RCAR_GP_PIN(9, 7), RCAR_GP_PIN(9, 8), 1366 + RCAR_GP_PIN(9, 9), RCAR_GP_PIN(9, 10), 1367 + RCAR_GP_PIN(9, 11), RCAR_GP_PIN(9, 12), 1368 + }, 1369 + }; 1370 + static const union vin_data vin1_data_b_mux = { 1371 + .data24 = { 1372 + /* B */ 1373 + VI1_D0_B0_C0_MARK, VI1_D1_B1_C1_MARK, 1374 + VI1_D2_B2_C2_MARK, VI1_D3_B3_C3_MARK, 1375 + VI1_D4_B4_C4_MARK, VI1_D5_B5_C5_MARK, 1376 + VI1_D6_B6_C6_MARK, VI1_D7_B7_C7_MARK, 1377 + /* G */ 1378 + VI1_D8_G0_Y0_MARK, VI1_D9_G1_Y1_MARK, 1379 + VI1_D10_G2_Y2_MARK, VI1_D11_G3_Y3_MARK, 1380 + VI1_D12_G4_Y4_B_MARK, VI1_D13_G5_Y5_B_MARK, 1381 + VI1_D14_G6_Y6_B_MARK, VI1_D15_G7_Y7_B_MARK, 1382 + /* R */ 1383 + VI1_D16_R0_MARK, VI1_D17_R1_MARK, 1384 + VI1_D18_R2_MARK, VI1_D19_R3_MARK, 1385 + VI1_D20_R4_MARK, VI1_D21_R5_MARK, 1386 + VI1_D22_R6_MARK, VI1_D23_R7_MARK, 1387 + }, 1388 + }; 1389 + static const unsigned int vin1_data18_b_pins[] = { 1390 + /* B */ 1391 + RCAR_GP_PIN(5, 6), RCAR_GP_PIN(5, 7), 1392 + RCAR_GP_PIN(5, 8), RCAR_GP_PIN(5, 9), 1393 + RCAR_GP_PIN(5, 10), RCAR_GP_PIN(5, 11), 1394 + /* G */ 1395 + RCAR_GP_PIN(5, 14), RCAR_GP_PIN(5, 15), 1396 + RCAR_GP_PIN(9, 1), RCAR_GP_PIN(9, 2), 1397 + RCAR_GP_PIN(9, 3), RCAR_GP_PIN(9, 4), 1398 + /* R */ 1399 + RCAR_GP_PIN(9, 7), RCAR_GP_PIN(9, 8), 1400 + RCAR_GP_PIN(9, 9), RCAR_GP_PIN(9, 10), 1401 + RCAR_GP_PIN(9, 11), RCAR_GP_PIN(9, 12), 1402 + }; 1403 + static const unsigned int vin1_data18_b_mux[] = { 1404 + /* B */ 1405 + VI1_D2_B2_C2_MARK, VI1_D3_B3_C3_MARK, 1406 + VI1_D4_B4_C4_MARK, VI1_D5_B5_C5_MARK, 1407 + VI1_D6_B6_C6_MARK, VI1_D7_B7_C7_MARK, 1408 + /* G */ 1409 + VI1_D10_G2_Y2_MARK, VI1_D11_G3_Y3_MARK, 1410 + VI1_D12_G4_Y4_B_MARK, VI1_D13_G5_Y5_B_MARK, 1411 + VI1_D14_G6_Y6_B_MARK, VI1_D15_G7_Y7_B_MARK, 1412 + /* R */ 1413 + VI1_D18_R2_MARK, VI1_D19_R3_MARK, 1414 + VI1_D20_R4_MARK, VI1_D21_R5_MARK, 1415 + VI1_D22_R6_MARK, VI1_D23_R7_MARK, 1416 + }; 1417 + static const unsigned int vin1_sync_pins[] = { 1418 + /* HSYNC#, VSYNC# */ 1419 + RCAR_GP_PIN(5, 2), RCAR_GP_PIN(5, 3), 1420 + }; 1421 + static const unsigned int vin1_sync_mux[] = { 1422 + VI1_HSYNC_N_MARK, VI1_VSYNC_N_MARK, 1423 + }; 1424 + static const unsigned int vin1_field_pins[] = { 1425 + RCAR_GP_PIN(5, 16), 1426 + }; 1427 + static const unsigned int vin1_field_mux[] = { 1428 + VI1_FIELD_MARK, 1429 + }; 1430 + static const unsigned int vin1_clkenb_pins[] = { 1431 + RCAR_GP_PIN(5, 1), 1432 + }; 1433 + static const unsigned int vin1_clkenb_mux[] = { 1434 + VI1_CLKENB_MARK, 1435 + }; 1436 + static const unsigned int vin1_clk_pins[] = { 1437 + RCAR_GP_PIN(5, 0), 1438 + }; 1439 + static const unsigned int vin1_clk_mux[] = { 1440 + VI1_CLK_MARK, 1441 + }; 1442 + /* - VIN2 ------------------------------------------------------------------- */ 1443 + static const union vin_data vin2_data_pins = { 1444 + .data16 = { 1445 + RCAR_GP_PIN(6, 4), RCAR_GP_PIN(6, 5), 1446 + RCAR_GP_PIN(6, 6), RCAR_GP_PIN(6, 7), 1447 + RCAR_GP_PIN(6, 8), RCAR_GP_PIN(6, 9), 1448 + RCAR_GP_PIN(6, 10), RCAR_GP_PIN(6, 11), 1449 + RCAR_GP_PIN(6, 12), RCAR_GP_PIN(6, 13), 1450 + RCAR_GP_PIN(6, 14), RCAR_GP_PIN(6, 15), 1451 + RCAR_GP_PIN(8, 9), RCAR_GP_PIN(8, 10), 1452 + RCAR_GP_PIN(8, 11), RCAR_GP_PIN(8, 12), 1453 + }, 1454 + }; 1455 + static const union vin_data vin2_data_mux = { 1456 + .data16 = { 1457 + VI2_D0_C0_MARK, VI2_D1_C1_MARK, 1458 + VI2_D2_C2_MARK, VI2_D3_C3_MARK, 1459 + VI2_D4_C4_MARK, VI2_D5_C5_MARK, 1460 + VI2_D6_C6_MARK, VI2_D7_C7_MARK, 1461 + VI2_D8_Y0_MARK, VI2_D9_Y1_MARK, 1462 + VI2_D10_Y2_MARK, VI2_D11_Y3_MARK, 1463 + VI2_D12_Y4_MARK, VI2_D13_Y5_MARK, 1464 + VI2_D14_Y6_MARK, VI2_D15_Y7_MARK, 1465 + }, 1466 + }; 1467 + static const unsigned int vin2_sync_pins[] = { 1468 + /* HSYNC#, VSYNC# */ 1469 + RCAR_GP_PIN(6, 2), RCAR_GP_PIN(6, 3), 1470 + }; 1471 + static const unsigned int vin2_sync_mux[] = { 1472 + VI2_HSYNC_N_MARK, VI2_VSYNC_N_MARK, 1473 + }; 1474 + static const unsigned int vin2_field_pins[] = { 1475 + RCAR_GP_PIN(6, 16), 1476 + }; 1477 + static const unsigned int vin2_field_mux[] = { 1478 + VI2_FIELD_MARK, 1479 + }; 1480 + static const unsigned int vin2_clkenb_pins[] = { 1481 + RCAR_GP_PIN(6, 1), 1482 + }; 1483 + static const unsigned int vin2_clkenb_mux[] = { 1484 + VI2_CLKENB_MARK, 1485 + }; 1486 + static const unsigned int vin2_clk_pins[] = { 1487 + RCAR_GP_PIN(6, 0), 1488 + }; 1489 + static const unsigned int vin2_clk_mux[] = { 1490 + VI2_CLK_MARK, 1491 + }; 1492 + /* - VIN3 ------------------------------------------------------------------- */ 1493 + static const union vin_data vin3_data_pins = { 1494 + .data16 = { 1495 + RCAR_GP_PIN(7, 4), RCAR_GP_PIN(7, 5), 1496 + RCAR_GP_PIN(7, 6), RCAR_GP_PIN(7, 7), 1497 + RCAR_GP_PIN(7, 8), RCAR_GP_PIN(7, 9), 1498 + RCAR_GP_PIN(7, 10), RCAR_GP_PIN(7, 11), 1499 + RCAR_GP_PIN(7, 12), RCAR_GP_PIN(7, 13), 1500 + RCAR_GP_PIN(7, 14), RCAR_GP_PIN(7, 15), 1501 + RCAR_GP_PIN(8, 13), RCAR_GP_PIN(8, 14), 1502 + RCAR_GP_PIN(8, 15), RCAR_GP_PIN(8, 16), 1503 + }, 1504 + }; 1505 + static const union vin_data vin3_data_mux = { 1506 + .data16 = { 1507 + VI3_D0_C0_MARK, VI3_D1_C1_MARK, 1508 + VI3_D2_C2_MARK, VI3_D3_C3_MARK, 1509 + VI3_D4_C4_MARK, VI3_D5_C5_MARK, 1510 + VI3_D6_C6_MARK, VI3_D7_C7_MARK, 1511 + VI3_D8_Y0_MARK, VI3_D9_Y1_MARK, 1512 + VI3_D10_Y2_MARK, VI3_D11_Y3_MARK, 1513 + VI3_D12_Y4_MARK, VI3_D13_Y5_MARK, 1514 + VI3_D14_Y6_MARK, VI3_D15_Y7_MARK, 1515 + }, 1516 + }; 1517 + static const unsigned int vin3_sync_pins[] = { 1518 + /* HSYNC#, VSYNC# */ 1519 + RCAR_GP_PIN(7, 2), RCAR_GP_PIN(7, 3), 1520 + }; 1521 + static const unsigned int vin3_sync_mux[] = { 1522 + VI3_HSYNC_N_MARK, VI3_VSYNC_N_MARK, 1523 + }; 1524 + static const unsigned int vin3_field_pins[] = { 1525 + RCAR_GP_PIN(7, 16), 1526 + }; 1527 + static const unsigned int vin3_field_mux[] = { 1528 + VI3_FIELD_MARK, 1529 + }; 1530 + static const unsigned int vin3_clkenb_pins[] = { 1531 + RCAR_GP_PIN(7, 1), 1532 + }; 1533 + static const unsigned int vin3_clkenb_mux[] = { 1534 + VI3_CLKENB_MARK, 1535 + }; 1536 + static const unsigned int vin3_clk_pins[] = { 1537 + RCAR_GP_PIN(7, 0), 1538 + }; 1539 + static const unsigned int vin3_clk_mux[] = { 1540 + VI3_CLK_MARK, 1541 + }; 1542 + /* - VIN4 ------------------------------------------------------------------- */ 1543 + static const union vin_data vin4_data_pins = { 1544 + .data12 = { 1545 + RCAR_GP_PIN(8, 4), RCAR_GP_PIN(8, 5), 1546 + RCAR_GP_PIN(8, 6), RCAR_GP_PIN(8, 7), 1547 + RCAR_GP_PIN(8, 8), RCAR_GP_PIN(8, 9), 1548 + RCAR_GP_PIN(8, 10), RCAR_GP_PIN(8, 11), 1549 + RCAR_GP_PIN(8, 12), RCAR_GP_PIN(8, 13), 1550 + RCAR_GP_PIN(8, 14), RCAR_GP_PIN(8, 15), 1551 + }, 1552 + }; 1553 + static const union vin_data vin4_data_mux = { 1554 + .data12 = { 1555 + VI4_D0_C0_MARK, VI4_D1_C1_MARK, 1556 + VI4_D2_C2_MARK, VI4_D3_C3_MARK, 1557 + VI4_D4_C4_MARK, VI4_D5_C5_MARK, 1558 + VI4_D6_C6_MARK, VI4_D7_C7_MARK, 1559 + VI4_D8_Y0_MARK, VI4_D9_Y1_MARK, 1560 + VI4_D10_Y2_MARK, VI4_D11_Y3_MARK, 1561 + }, 1562 + }; 1563 + static const unsigned int vin4_sync_pins[] = { 1564 + /* HSYNC#, VSYNC# */ 1565 + RCAR_GP_PIN(8, 2), RCAR_GP_PIN(8, 3), 1566 + }; 1567 + static const unsigned int vin4_sync_mux[] = { 1568 + VI4_HSYNC_N_MARK, VI4_VSYNC_N_MARK, 1569 + }; 1570 + static const unsigned int vin4_field_pins[] = { 1571 + RCAR_GP_PIN(8, 16), 1572 + }; 1573 + static const unsigned int vin4_field_mux[] = { 1574 + VI4_FIELD_MARK, 1575 + }; 1576 + static const unsigned int vin4_clkenb_pins[] = { 1577 + RCAR_GP_PIN(8, 1), 1578 + }; 1579 + static const unsigned int vin4_clkenb_mux[] = { 1580 + VI4_CLKENB_MARK, 1581 + }; 1582 + static const unsigned int vin4_clk_pins[] = { 1583 + RCAR_GP_PIN(8, 0), 1584 + }; 1585 + static const unsigned int vin4_clk_mux[] = { 1586 + VI4_CLK_MARK, 1587 + }; 1588 + /* - VIN5 ------------------------------------------------------------------- */ 1589 + static const union vin_data vin5_data_pins = { 1590 + .data12 = { 1591 + RCAR_GP_PIN(9, 4), RCAR_GP_PIN(9, 5), 1592 + RCAR_GP_PIN(9, 6), RCAR_GP_PIN(9, 7), 1593 + RCAR_GP_PIN(9, 8), RCAR_GP_PIN(9, 9), 1594 + RCAR_GP_PIN(9, 10), RCAR_GP_PIN(9, 11), 1595 + RCAR_GP_PIN(9, 12), RCAR_GP_PIN(9, 13), 1596 + RCAR_GP_PIN(9, 14), RCAR_GP_PIN(9, 15), 1597 + }, 1598 + }; 1599 + static const union vin_data vin5_data_mux = { 1600 + .data12 = { 1601 + VI5_D0_C0_MARK, VI5_D1_C1_MARK, 1602 + VI5_D2_C2_MARK, VI5_D3_C3_MARK, 1603 + VI5_D4_C4_MARK, VI5_D5_C5_MARK, 1604 + VI5_D6_C6_MARK, VI5_D7_C7_MARK, 1605 + VI5_D8_Y0_MARK, VI5_D9_Y1_MARK, 1606 + VI5_D10_Y2_MARK, VI5_D11_Y3_MARK, 1607 + }, 1608 + }; 1609 + static const unsigned int vin5_sync_pins[] = { 1610 + /* HSYNC#, VSYNC# */ 1611 + RCAR_GP_PIN(9, 2), RCAR_GP_PIN(9, 3), 1612 + }; 1613 + static const unsigned int vin5_sync_mux[] = { 1614 + VI5_HSYNC_N_MARK, VI5_VSYNC_N_MARK, 1615 + }; 1616 + static const unsigned int vin5_field_pins[] = { 1617 + RCAR_GP_PIN(9, 16), 1618 + }; 1619 + static const unsigned int vin5_field_mux[] = { 1620 + VI5_FIELD_MARK, 1621 + }; 1622 + static const unsigned int vin5_clkenb_pins[] = { 1623 + RCAR_GP_PIN(9, 1), 1624 + }; 1625 + static const unsigned int vin5_clkenb_mux[] = { 1626 + VI5_CLKENB_MARK, 1627 + }; 1628 + static const unsigned int vin5_clk_pins[] = { 1629 + RCAR_GP_PIN(9, 0), 1630 + }; 1631 + static const unsigned int vin5_clk_mux[] = { 1632 + VI5_CLK_MARK, 1633 + }; 1634 + 1635 + static const struct sh_pfc_pin_group pinmux_groups[] = { 1636 + SH_PFC_PIN_GROUP(avb_link), 1637 + SH_PFC_PIN_GROUP(avb_magic), 1638 + SH_PFC_PIN_GROUP(avb_phy_int), 1639 + SH_PFC_PIN_GROUP(avb_mdio), 1640 + SH_PFC_PIN_GROUP(avb_mii), 1641 + SH_PFC_PIN_GROUP(avb_gmii), 1642 + SH_PFC_PIN_GROUP(avb_avtp_match), 1643 + SH_PFC_PIN_GROUP(can0_data), 1644 + SH_PFC_PIN_GROUP(can1_data), 1645 + SH_PFC_PIN_GROUP(can_clk), 1646 + SH_PFC_PIN_GROUP(du0_rgb666), 1647 + SH_PFC_PIN_GROUP(du0_rgb888), 1648 + SH_PFC_PIN_GROUP(du0_sync), 1649 + SH_PFC_PIN_GROUP(du0_oddf), 1650 + SH_PFC_PIN_GROUP(du0_disp), 1651 + SH_PFC_PIN_GROUP(du0_cde), 1652 + SH_PFC_PIN_GROUP(du1_rgb666), 1653 + SH_PFC_PIN_GROUP(du1_sync), 1654 + SH_PFC_PIN_GROUP(du1_oddf), 1655 + SH_PFC_PIN_GROUP(du1_disp), 1656 + SH_PFC_PIN_GROUP(du1_cde), 1657 + SH_PFC_PIN_GROUP(intc_irq0), 1658 + SH_PFC_PIN_GROUP(intc_irq1), 1659 + SH_PFC_PIN_GROUP(intc_irq2), 1660 + SH_PFC_PIN_GROUP(intc_irq3), 1661 + SH_PFC_PIN_GROUP(lbsc_cs0), 1662 + SH_PFC_PIN_GROUP(lbsc_cs1), 1663 + SH_PFC_PIN_GROUP(lbsc_ex_cs0), 1664 + SH_PFC_PIN_GROUP(lbsc_ex_cs1), 1665 + SH_PFC_PIN_GROUP(lbsc_ex_cs2), 1666 + SH_PFC_PIN_GROUP(lbsc_ex_cs3), 1667 + SH_PFC_PIN_GROUP(lbsc_ex_cs4), 1668 + SH_PFC_PIN_GROUP(lbsc_ex_cs5), 1669 + SH_PFC_PIN_GROUP(msiof0_clk), 1670 + SH_PFC_PIN_GROUP(msiof0_sync), 1671 + SH_PFC_PIN_GROUP(msiof0_rx), 1672 + SH_PFC_PIN_GROUP(msiof0_tx), 1673 + SH_PFC_PIN_GROUP(msiof1_clk), 1674 + SH_PFC_PIN_GROUP(msiof1_sync), 1675 + SH_PFC_PIN_GROUP(msiof1_rx), 1676 + SH_PFC_PIN_GROUP(msiof1_tx), 1677 + SH_PFC_PIN_GROUP(qspi_ctrl), 1678 + SH_PFC_PIN_GROUP(qspi_data2), 1679 + SH_PFC_PIN_GROUP(qspi_data4), 1680 + SH_PFC_PIN_GROUP(scif0_data), 1681 + SH_PFC_PIN_GROUP(scif0_clk), 1682 + SH_PFC_PIN_GROUP(scif0_ctrl), 1683 + SH_PFC_PIN_GROUP(scif3_data), 1684 + SH_PFC_PIN_GROUP(scif3_clk), 1685 + SH_PFC_PIN_GROUP(sdhi0_data1), 1686 + SH_PFC_PIN_GROUP(sdhi0_data4), 1687 + SH_PFC_PIN_GROUP(sdhi0_ctrl), 1688 + SH_PFC_PIN_GROUP(sdhi0_cd), 1689 + SH_PFC_PIN_GROUP(sdhi0_wp), 1690 + VIN_DATA_PIN_GROUP(vin0_data, 24), 1691 + VIN_DATA_PIN_GROUP(vin0_data, 20), 1692 + SH_PFC_PIN_GROUP(vin0_data18), 1693 + VIN_DATA_PIN_GROUP(vin0_data, 16), 1694 + VIN_DATA_PIN_GROUP(vin0_data, 12), 1695 + VIN_DATA_PIN_GROUP(vin0_data, 10), 1696 + VIN_DATA_PIN_GROUP(vin0_data, 8), 1697 + SH_PFC_PIN_GROUP(vin0_sync), 1698 + SH_PFC_PIN_GROUP(vin0_field), 1699 + SH_PFC_PIN_GROUP(vin0_clkenb), 1700 + SH_PFC_PIN_GROUP(vin0_clk), 1701 + VIN_DATA_PIN_GROUP(vin1_data, 24), 1702 + VIN_DATA_PIN_GROUP(vin1_data, 20), 1703 + SH_PFC_PIN_GROUP(vin1_data18), 1704 + VIN_DATA_PIN_GROUP(vin1_data, 16), 1705 + VIN_DATA_PIN_GROUP(vin1_data, 12), 1706 + VIN_DATA_PIN_GROUP(vin1_data, 10), 1707 + VIN_DATA_PIN_GROUP(vin1_data, 8), 1708 + VIN_DATA_PIN_GROUP(vin1_data_b, 24), 1709 + VIN_DATA_PIN_GROUP(vin1_data_b, 20), 1710 + SH_PFC_PIN_GROUP(vin1_data18_b), 1711 + VIN_DATA_PIN_GROUP(vin1_data_b, 16), 1712 + SH_PFC_PIN_GROUP(vin1_sync), 1713 + SH_PFC_PIN_GROUP(vin1_field), 1714 + SH_PFC_PIN_GROUP(vin1_clkenb), 1715 + SH_PFC_PIN_GROUP(vin1_clk), 1716 + VIN_DATA_PIN_GROUP(vin2_data, 16), 1717 + VIN_DATA_PIN_GROUP(vin2_data, 12), 1718 + VIN_DATA_PIN_GROUP(vin2_data, 10), 1719 + VIN_DATA_PIN_GROUP(vin2_data, 8), 1720 + SH_PFC_PIN_GROUP(vin2_sync), 1721 + SH_PFC_PIN_GROUP(vin2_field), 1722 + SH_PFC_PIN_GROUP(vin2_clkenb), 1723 + SH_PFC_PIN_GROUP(vin2_clk), 1724 + VIN_DATA_PIN_GROUP(vin3_data, 16), 1725 + VIN_DATA_PIN_GROUP(vin3_data, 12), 1726 + VIN_DATA_PIN_GROUP(vin3_data, 10), 1727 + VIN_DATA_PIN_GROUP(vin3_data, 8), 1728 + SH_PFC_PIN_GROUP(vin3_sync), 1729 + SH_PFC_PIN_GROUP(vin3_field), 1730 + SH_PFC_PIN_GROUP(vin3_clkenb), 1731 + SH_PFC_PIN_GROUP(vin3_clk), 1732 + VIN_DATA_PIN_GROUP(vin4_data, 12), 1733 + VIN_DATA_PIN_GROUP(vin4_data, 10), 1734 + VIN_DATA_PIN_GROUP(vin4_data, 8), 1735 + SH_PFC_PIN_GROUP(vin4_sync), 1736 + SH_PFC_PIN_GROUP(vin4_field), 1737 + SH_PFC_PIN_GROUP(vin4_clkenb), 1738 + SH_PFC_PIN_GROUP(vin4_clk), 1739 + VIN_DATA_PIN_GROUP(vin5_data, 12), 1740 + VIN_DATA_PIN_GROUP(vin5_data, 10), 1741 + VIN_DATA_PIN_GROUP(vin5_data, 8), 1742 + SH_PFC_PIN_GROUP(vin5_sync), 1743 + SH_PFC_PIN_GROUP(vin5_field), 1744 + SH_PFC_PIN_GROUP(vin5_clkenb), 1745 + SH_PFC_PIN_GROUP(vin5_clk), 1746 + }; 1747 + 1748 + static const char * const avb_groups[] = { 1749 + "avb_link", 1750 + "avb_magic", 1751 + "avb_phy_int", 1752 + "avb_mdio", 1753 + "avb_mii", 1754 + "avb_gmii", 1755 + "avb_avtp_match", 1756 + }; 1757 + 1758 + static const char * const can0_groups[] = { 1759 + "can0_data", 1760 + "can_clk", 1761 + }; 1762 + 1763 + static const char * const can1_groups[] = { 1764 + "can1_data", 1765 + "can_clk", 1766 + }; 1767 + 1768 + static const char * const du0_groups[] = { 1769 + "du0_rgb666", 1770 + "du0_rgb888", 1771 + "du0_sync", 1772 + "du0_oddf", 1773 + "du0_disp", 1774 + "du0_cde", 1775 + }; 1776 + 1777 + static const char * const du1_groups[] = { 1778 + "du1_rgb666", 1779 + "du1_sync", 1780 + "du1_oddf", 1781 + "du1_disp", 1782 + "du1_cde", 1783 + }; 1784 + 1785 + static const char * const intc_groups[] = { 1786 + "intc_irq0", 1787 + "intc_irq1", 1788 + "intc_irq2", 1789 + "intc_irq3", 1790 + }; 1791 + 1792 + static const char * const lbsc_groups[] = { 1793 + "lbsc_cs0", 1794 + "lbsc_cs1", 1795 + "lbsc_ex_cs0", 1796 + "lbsc_ex_cs1", 1797 + "lbsc_ex_cs2", 1798 + "lbsc_ex_cs3", 1799 + "lbsc_ex_cs4", 1800 + "lbsc_ex_cs5", 1801 + }; 1802 + 1803 + static const char * const msiof0_groups[] = { 1804 + "msiof0_clk", 1805 + "msiof0_sync", 1806 + "msiof0_rx", 1807 + "msiof0_tx", 1808 + }; 1809 + 1810 + static const char * const msiof1_groups[] = { 1811 + "msiof1_clk", 1812 + "msiof1_sync", 1813 + "msiof1_rx", 1814 + "msiof1_tx", 1815 + }; 1816 + 1817 + static const char * const qspi_groups[] = { 1818 + "qspi_ctrl", 1819 + "qspi_data2", 1820 + "qspi_data4", 1821 + }; 1822 + 1823 + static const char * const scif0_groups[] = { 1824 + "scif0_data", 1825 + "scif0_clk", 1826 + "scif0_ctrl", 1827 + }; 1828 + 1829 + static const char * const scif3_groups[] = { 1830 + "scif3_data", 1831 + "scif3_clk", 1832 + }; 1833 + 1834 + static const char * const sdhi0_groups[] = { 1835 + "sdhi0_data1", 1836 + "sdhi0_data4", 1837 + "sdhi0_ctrl", 1838 + "sdhi0_cd", 1839 + "sdhi0_wp", 1840 + }; 1841 + 1842 + static const char * const vin0_groups[] = { 1843 + "vin0_data24", 1844 + "vin0_data20", 1845 + "vin0_data18", 1846 + "vin0_data16", 1847 + "vin0_data12", 1848 + "vin0_data10", 1849 + "vin0_data8", 1850 + "vin0_sync", 1851 + "vin0_field", 1852 + "vin0_clkenb", 1853 + "vin0_clk", 1854 + }; 1855 + 1856 + static const char * const vin1_groups[] = { 1857 + "vin1_data24", 1858 + "vin1_data20", 1859 + "vin1_data18", 1860 + "vin1_data16", 1861 + "vin1_data12", 1862 + "vin1_data10", 1863 + "vin1_data8", 1864 + "vin1_data24_b", 1865 + "vin1_data20_b", 1866 + "vin1_data16_b", 1867 + "vin1_sync", 1868 + "vin1_field", 1869 + "vin1_clkenb", 1870 + "vin1_clk", 1871 + }; 1872 + 1873 + static const char * const vin2_groups[] = { 1874 + "vin2_data16", 1875 + "vin2_data12", 1876 + "vin2_data10", 1877 + "vin2_data8", 1878 + "vin2_sync", 1879 + "vin2_field", 1880 + "vin2_clkenb", 1881 + "vin2_clk", 1882 + }; 1883 + 1884 + static const char * const vin3_groups[] = { 1885 + "vin3_data16", 1886 + "vin3_data12", 1887 + "vin3_data10", 1888 + "vin3_data8", 1889 + "vin3_sync", 1890 + "vin3_field", 1891 + "vin3_clkenb", 1892 + "vin3_clk", 1893 + }; 1894 + 1895 + static const char * const vin4_groups[] = { 1896 + "vin4_data12", 1897 + "vin4_data10", 1898 + "vin4_data8", 1899 + "vin4_sync", 1900 + "vin4_field", 1901 + "vin4_clkenb", 1902 + "vin4_clk", 1903 + }; 1904 + 1905 + static const char * const vin5_groups[] = { 1906 + "vin5_data12", 1907 + "vin5_data10", 1908 + "vin5_data8", 1909 + "vin5_sync", 1910 + "vin5_field", 1911 + "vin5_clkenb", 1912 + "vin5_clk", 1913 + }; 1914 + 1915 + static const struct sh_pfc_function pinmux_functions[] = { 1916 + SH_PFC_FUNCTION(avb), 1917 + SH_PFC_FUNCTION(can0), 1918 + SH_PFC_FUNCTION(can1), 1919 + SH_PFC_FUNCTION(du0), 1920 + SH_PFC_FUNCTION(du1), 1921 + SH_PFC_FUNCTION(intc), 1922 + SH_PFC_FUNCTION(lbsc), 1923 + SH_PFC_FUNCTION(msiof0), 1924 + SH_PFC_FUNCTION(msiof1), 1925 + SH_PFC_FUNCTION(qspi), 1926 + SH_PFC_FUNCTION(scif0), 1927 + SH_PFC_FUNCTION(scif3), 1928 + SH_PFC_FUNCTION(sdhi0), 1929 + SH_PFC_FUNCTION(vin0), 1930 + SH_PFC_FUNCTION(vin1), 1931 + SH_PFC_FUNCTION(vin2), 1932 + SH_PFC_FUNCTION(vin3), 1933 + SH_PFC_FUNCTION(vin4), 1934 + SH_PFC_FUNCTION(vin5), 1935 + }; 1936 + 1937 + static const struct pinmux_cfg_reg pinmux_config_regs[] = { 1938 + { PINMUX_CFG_REG("GPSR0", 0xE6060004, 32, 1) { 1939 + 0, 0, 1940 + 0, 0, 1941 + 0, 0, 1942 + GP_0_28_FN, FN_IP1_4, 1943 + GP_0_27_FN, FN_IP1_3, 1944 + GP_0_26_FN, FN_IP1_2, 1945 + GP_0_25_FN, FN_IP1_1, 1946 + GP_0_24_FN, FN_IP1_0, 1947 + GP_0_23_FN, FN_IP0_23, 1948 + GP_0_22_FN, FN_IP0_22, 1949 + GP_0_21_FN, FN_IP0_21, 1950 + GP_0_20_FN, FN_IP0_20, 1951 + GP_0_19_FN, FN_IP0_19, 1952 + GP_0_18_FN, FN_IP0_18, 1953 + GP_0_17_FN, FN_IP0_17, 1954 + GP_0_16_FN, FN_IP0_16, 1955 + GP_0_15_FN, FN_IP0_15, 1956 + GP_0_14_FN, FN_IP0_14, 1957 + GP_0_13_FN, FN_IP0_13, 1958 + GP_0_12_FN, FN_IP0_12, 1959 + GP_0_11_FN, FN_IP0_11, 1960 + GP_0_10_FN, FN_IP0_10, 1961 + GP_0_9_FN, FN_IP0_9, 1962 + GP_0_8_FN, FN_IP0_8, 1963 + GP_0_7_FN, FN_IP0_7, 1964 + GP_0_6_FN, FN_IP0_6, 1965 + GP_0_5_FN, FN_IP0_5, 1966 + GP_0_4_FN, FN_IP0_4, 1967 + GP_0_3_FN, FN_IP0_3, 1968 + GP_0_2_FN, FN_IP0_2, 1969 + GP_0_1_FN, FN_IP0_1, 1970 + GP_0_0_FN, FN_IP0_0 } 1971 + }, 1972 + { PINMUX_CFG_REG("GPSR1", 0xE6060008, 32, 1) { 1973 + 0, 0, 1974 + 0, 0, 1975 + 0, 0, 1976 + 0, 0, 1977 + 0, 0, 1978 + 0, 0, 1979 + 0, 0, 1980 + 0, 0, 1981 + 0, 0, 1982 + GP_1_22_FN, FN_DU1_CDE, 1983 + GP_1_21_FN, FN_DU1_DISP, 1984 + GP_1_20_FN, FN_DU1_EXODDF_DU1_ODDF_DISP_CDE, 1985 + GP_1_19_FN, FN_DU1_EXVSYNC_DU1_VSYNC, 1986 + GP_1_18_FN, FN_DU1_EXHSYNC_DU1_HSYNC, 1987 + GP_1_17_FN, FN_DU1_DB7_C5, 1988 + GP_1_16_FN, FN_DU1_DB6_C4, 1989 + GP_1_15_FN, FN_DU1_DB5_C3_DATA15, 1990 + GP_1_14_FN, FN_DU1_DB4_C2_DATA14, 1991 + GP_1_13_FN, FN_DU1_DB3_C1_DATA13, 1992 + GP_1_12_FN, FN_DU1_DB2_C0_DATA12, 1993 + GP_1_11_FN, FN_IP1_16, 1994 + GP_1_10_FN, FN_IP1_15, 1995 + GP_1_9_FN, FN_IP1_14, 1996 + GP_1_8_FN, FN_IP1_13, 1997 + GP_1_7_FN, FN_IP1_12, 1998 + GP_1_6_FN, FN_IP1_11, 1999 + GP_1_5_FN, FN_IP1_10, 2000 + GP_1_4_FN, FN_IP1_9, 2001 + GP_1_3_FN, FN_IP1_8, 2002 + GP_1_2_FN, FN_IP1_7, 2003 + GP_1_1_FN, FN_IP1_6, 2004 + GP_1_0_FN, FN_IP1_5, } 2005 + }, 2006 + { PINMUX_CFG_REG("GPSR2", 0xE606000C, 32, 1) { 2007 + GP_2_31_FN, FN_A15, 2008 + GP_2_30_FN, FN_A14, 2009 + GP_2_29_FN, FN_A13, 2010 + GP_2_28_FN, FN_A12, 2011 + GP_2_27_FN, FN_A11, 2012 + GP_2_26_FN, FN_A10, 2013 + GP_2_25_FN, FN_A9, 2014 + GP_2_24_FN, FN_A8, 2015 + GP_2_23_FN, FN_A7, 2016 + GP_2_22_FN, FN_A6, 2017 + GP_2_21_FN, FN_A5, 2018 + GP_2_20_FN, FN_A4, 2019 + GP_2_19_FN, FN_A3, 2020 + GP_2_18_FN, FN_A2, 2021 + GP_2_17_FN, FN_A1, 2022 + GP_2_16_FN, FN_A0, 2023 + GP_2_15_FN, FN_D15, 2024 + GP_2_14_FN, FN_D14, 2025 + GP_2_13_FN, FN_D13, 2026 + GP_2_12_FN, FN_D12, 2027 + GP_2_11_FN, FN_D11, 2028 + GP_2_10_FN, FN_D10, 2029 + GP_2_9_FN, FN_D9, 2030 + GP_2_8_FN, FN_D8, 2031 + GP_2_7_FN, FN_D7, 2032 + GP_2_6_FN, FN_D6, 2033 + GP_2_5_FN, FN_D5, 2034 + GP_2_4_FN, FN_D4, 2035 + GP_2_3_FN, FN_D3, 2036 + GP_2_2_FN, FN_D2, 2037 + GP_2_1_FN, FN_D1, 2038 + GP_2_0_FN, FN_D0 } 2039 + }, 2040 + { PINMUX_CFG_REG("GPSR3", 0xE6060010, 32, 1) { 2041 + 0, 0, 2042 + 0, 0, 2043 + 0, 0, 2044 + 0, 0, 2045 + GP_3_27_FN, FN_CS0_N, 2046 + GP_3_26_FN, FN_IP1_22, 2047 + GP_3_25_FN, FN_IP1_21, 2048 + GP_3_24_FN, FN_IP1_20, 2049 + GP_3_23_FN, FN_IP1_19, 2050 + GP_3_22_FN, FN_IRQ3, 2051 + GP_3_21_FN, FN_IRQ2, 2052 + GP_3_20_FN, FN_IRQ1, 2053 + GP_3_19_FN, FN_IRQ0, 2054 + GP_3_18_FN, FN_EX_WAIT0, 2055 + GP_3_17_FN, FN_WE1_N, 2056 + GP_3_16_FN, FN_WE0_N, 2057 + GP_3_15_FN, FN_RD_WR_N, 2058 + GP_3_14_FN, FN_RD_N, 2059 + GP_3_13_FN, FN_BS_N, 2060 + GP_3_12_FN, FN_EX_CS5_N, 2061 + GP_3_11_FN, FN_EX_CS4_N, 2062 + GP_3_10_FN, FN_EX_CS3_N, 2063 + GP_3_9_FN, FN_EX_CS2_N, 2064 + GP_3_8_FN, FN_EX_CS1_N, 2065 + GP_3_7_FN, FN_EX_CS0_N, 2066 + GP_3_6_FN, FN_CS1_N_A26, 2067 + GP_3_5_FN, FN_IP1_18, 2068 + GP_3_4_FN, FN_IP1_17, 2069 + GP_3_3_FN, FN_A19, 2070 + GP_3_2_FN, FN_A18, 2071 + GP_3_1_FN, FN_A17, 2072 + GP_3_0_FN, FN_A16 } 2073 + }, 2074 + { PINMUX_CFG_REG("GPSR4", 0xE6060014, 32, 1) { 2075 + 0, 0, 2076 + 0, 0, 2077 + 0, 0, 2078 + 0, 0, 2079 + 0, 0, 2080 + 0, 0, 2081 + 0, 0, 2082 + 0, 0, 2083 + 0, 0, 2084 + 0, 0, 2085 + 0, 0, 2086 + 0, 0, 2087 + 0, 0, 2088 + 0, 0, 2089 + 0, 0, 2090 + GP_4_16_FN, FN_VI0_FIELD, 2091 + GP_4_15_FN, FN_VI0_D11_G3_Y3, 2092 + GP_4_14_FN, FN_VI0_D10_G2_Y2, 2093 + GP_4_13_FN, FN_VI0_D9_G1_Y1, 2094 + GP_4_12_FN, FN_VI0_D8_G0_Y0, 2095 + GP_4_11_FN, FN_VI0_D7_B7_C7, 2096 + GP_4_10_FN, FN_VI0_D6_B6_C6, 2097 + GP_4_9_FN, FN_VI0_D5_B5_C5, 2098 + GP_4_8_FN, FN_VI0_D4_B4_C4, 2099 + GP_4_7_FN, FN_VI0_D3_B3_C3, 2100 + GP_4_6_FN, FN_VI0_D2_B2_C2, 2101 + GP_4_5_FN, FN_VI0_D1_B1_C1, 2102 + GP_4_4_FN, FN_VI0_D0_B0_C0, 2103 + GP_4_3_FN, FN_VI0_VSYNC_N, 2104 + GP_4_2_FN, FN_VI0_HSYNC_N, 2105 + GP_4_1_FN, FN_VI0_CLKENB, 2106 + GP_4_0_FN, FN_VI0_CLK } 2107 + }, 2108 + { PINMUX_CFG_REG("GPSR5", 0xE6060018, 32, 1) { 2109 + 0, 0, 2110 + 0, 0, 2111 + 0, 0, 2112 + 0, 0, 2113 + 0, 0, 2114 + 0, 0, 2115 + 0, 0, 2116 + 0, 0, 2117 + 0, 0, 2118 + 0, 0, 2119 + 0, 0, 2120 + 0, 0, 2121 + 0, 0, 2122 + 0, 0, 2123 + 0, 0, 2124 + GP_5_16_FN, FN_VI1_FIELD, 2125 + GP_5_15_FN, FN_VI1_D11_G3_Y3, 2126 + GP_5_14_FN, FN_VI1_D10_G2_Y2, 2127 + GP_5_13_FN, FN_VI1_D9_G1_Y1, 2128 + GP_5_12_FN, FN_VI1_D8_G0_Y0, 2129 + GP_5_11_FN, FN_VI1_D7_B7_C7, 2130 + GP_5_10_FN, FN_VI1_D6_B6_C6, 2131 + GP_5_9_FN, FN_VI1_D5_B5_C5, 2132 + GP_5_8_FN, FN_VI1_D4_B4_C4, 2133 + GP_5_7_FN, FN_VI1_D3_B3_C3, 2134 + GP_5_6_FN, FN_VI1_D2_B2_C2, 2135 + GP_5_5_FN, FN_VI1_D1_B1_C1, 2136 + GP_5_4_FN, FN_VI1_D0_B0_C0, 2137 + GP_5_3_FN, FN_VI1_VSYNC_N, 2138 + GP_5_2_FN, FN_VI1_HSYNC_N, 2139 + GP_5_1_FN, FN_VI1_CLKENB, 2140 + GP_5_0_FN, FN_VI1_CLK } 2141 + }, 2142 + { PINMUX_CFG_REG("GPSR6", 0xE606001C, 32, 1) { 2143 + 0, 0, 2144 + 0, 0, 2145 + 0, 0, 2146 + 0, 0, 2147 + 0, 0, 2148 + 0, 0, 2149 + 0, 0, 2150 + 0, 0, 2151 + 0, 0, 2152 + 0, 0, 2153 + 0, 0, 2154 + 0, 0, 2155 + 0, 0, 2156 + 0, 0, 2157 + 0, 0, 2158 + GP_6_16_FN, FN_IP2_16, 2159 + GP_6_15_FN, FN_IP2_15, 2160 + GP_6_14_FN, FN_IP2_14, 2161 + GP_6_13_FN, FN_IP2_13, 2162 + GP_6_12_FN, FN_IP2_12, 2163 + GP_6_11_FN, FN_IP2_11, 2164 + GP_6_10_FN, FN_IP2_10, 2165 + GP_6_9_FN, FN_IP2_9, 2166 + GP_6_8_FN, FN_IP2_8, 2167 + GP_6_7_FN, FN_IP2_7, 2168 + GP_6_6_FN, FN_IP2_6, 2169 + GP_6_5_FN, FN_IP2_5, 2170 + GP_6_4_FN, FN_IP2_4, 2171 + GP_6_3_FN, FN_IP2_3, 2172 + GP_6_2_FN, FN_IP2_2, 2173 + GP_6_1_FN, FN_IP2_1, 2174 + GP_6_0_FN, FN_IP2_0 } 2175 + }, 2176 + { PINMUX_CFG_REG("GPSR7", 0xE6060020, 32, 1) { 2177 + 0, 0, 2178 + 0, 0, 2179 + 0, 0, 2180 + 0, 0, 2181 + 0, 0, 2182 + 0, 0, 2183 + 0, 0, 2184 + 0, 0, 2185 + 0, 0, 2186 + 0, 0, 2187 + 0, 0, 2188 + 0, 0, 2189 + 0, 0, 2190 + 0, 0, 2191 + 0, 0, 2192 + GP_7_16_FN, FN_VI3_FIELD, 2193 + GP_7_15_FN, FN_IP3_14, 2194 + GP_7_14_FN, FN_VI3_D10_Y2, 2195 + GP_7_13_FN, FN_IP3_13, 2196 + GP_7_12_FN, FN_IP3_12, 2197 + GP_7_11_FN, FN_IP3_11, 2198 + GP_7_10_FN, FN_IP3_10, 2199 + GP_7_9_FN, FN_IP3_9, 2200 + GP_7_8_FN, FN_IP3_8, 2201 + GP_7_7_FN, FN_IP3_7, 2202 + GP_7_6_FN, FN_IP3_6, 2203 + GP_7_5_FN, FN_IP3_5, 2204 + GP_7_4_FN, FN_IP3_4, 2205 + GP_7_3_FN, FN_IP3_3, 2206 + GP_7_2_FN, FN_IP3_2, 2207 + GP_7_1_FN, FN_IP3_1, 2208 + GP_7_0_FN, FN_IP3_0 } 2209 + }, 2210 + { PINMUX_CFG_REG("GPSR8", 0xE6060024, 32, 1) { 2211 + 0, 0, 2212 + 0, 0, 2213 + 0, 0, 2214 + 0, 0, 2215 + 0, 0, 2216 + 0, 0, 2217 + 0, 0, 2218 + 0, 0, 2219 + 0, 0, 2220 + 0, 0, 2221 + 0, 0, 2222 + 0, 0, 2223 + 0, 0, 2224 + 0, 0, 2225 + 0, 0, 2226 + GP_8_16_FN, FN_IP4_24, 2227 + GP_8_15_FN, FN_IP4_23, 2228 + GP_8_14_FN, FN_IP4_22, 2229 + GP_8_13_FN, FN_IP4_21, 2230 + GP_8_12_FN, FN_IP4_20_19, 2231 + GP_8_11_FN, FN_IP4_18_17, 2232 + GP_8_10_FN, FN_IP4_16_15, 2233 + GP_8_9_FN, FN_IP4_14_13, 2234 + GP_8_8_FN, FN_IP4_12_11, 2235 + GP_8_7_FN, FN_IP4_10_9, 2236 + GP_8_6_FN, FN_IP4_8_7, 2237 + GP_8_5_FN, FN_IP4_6_5, 2238 + GP_8_4_FN, FN_IP4_4, 2239 + GP_8_3_FN, FN_IP4_3_2, 2240 + GP_8_2_FN, FN_IP4_1, 2241 + GP_8_1_FN, FN_IP4_0, 2242 + GP_8_0_FN, FN_VI4_CLK } 2243 + }, 2244 + { PINMUX_CFG_REG("GPSR9", 0xE6060028, 32, 1) { 2245 + 0, 0, 2246 + 0, 0, 2247 + 0, 0, 2248 + 0, 0, 2249 + 0, 0, 2250 + 0, 0, 2251 + 0, 0, 2252 + 0, 0, 2253 + 0, 0, 2254 + 0, 0, 2255 + 0, 0, 2256 + 0, 0, 2257 + 0, 0, 2258 + 0, 0, 2259 + 0, 0, 2260 + GP_9_16_FN, FN_VI5_FIELD, 2261 + GP_9_15_FN, FN_VI5_D11_Y3, 2262 + GP_9_14_FN, FN_VI5_D10_Y2, 2263 + GP_9_13_FN, FN_VI5_D9_Y1, 2264 + GP_9_12_FN, FN_IP5_11, 2265 + GP_9_11_FN, FN_IP5_10, 2266 + GP_9_10_FN, FN_IP5_9, 2267 + GP_9_9_FN, FN_IP5_8, 2268 + GP_9_8_FN, FN_IP5_7, 2269 + GP_9_7_FN, FN_IP5_6, 2270 + GP_9_6_FN, FN_IP5_5, 2271 + GP_9_5_FN, FN_IP5_4, 2272 + GP_9_4_FN, FN_IP5_3, 2273 + GP_9_3_FN, FN_IP5_2, 2274 + GP_9_2_FN, FN_IP5_1, 2275 + GP_9_1_FN, FN_IP5_0, 2276 + GP_9_0_FN, FN_VI5_CLK } 2277 + }, 2278 + { PINMUX_CFG_REG("GPSR10", 0xE606002C, 32, 1) { 2279 + GP_10_31_FN, FN_CAN1_RX, 2280 + GP_10_30_FN, FN_CAN1_TX, 2281 + GP_10_29_FN, FN_CAN_CLK, 2282 + GP_10_28_FN, FN_CAN0_RX, 2283 + GP_10_27_FN, FN_CAN0_TX, 2284 + GP_10_26_FN, FN_SCIF_CLK, 2285 + GP_10_25_FN, FN_IP6_18_17, 2286 + GP_10_24_FN, FN_IP6_16, 2287 + GP_10_23_FN, FN_IP6_15_14, 2288 + GP_10_22_FN, FN_IP6_13_12, 2289 + GP_10_21_FN, FN_IP6_11_10, 2290 + GP_10_20_FN, FN_IP6_9_8, 2291 + GP_10_19_FN, FN_RX1, 2292 + GP_10_18_FN, FN_TX1, 2293 + GP_10_17_FN, FN_RTS1_N, 2294 + GP_10_16_FN, FN_CTS1_N, 2295 + GP_10_15_FN, FN_SCK1, 2296 + GP_10_14_FN, FN_RX0, 2297 + GP_10_13_FN, FN_TX0, 2298 + GP_10_12_FN, FN_RTS0_N, 2299 + GP_10_11_FN, FN_CTS0_N, 2300 + GP_10_10_FN, FN_SCK0, 2301 + GP_10_9_FN, FN_IP6_7, 2302 + GP_10_8_FN, FN_IP6_6, 2303 + GP_10_7_FN, FN_HCTS1_N, 2304 + GP_10_6_FN, FN_IP6_5, 2305 + GP_10_5_FN, FN_IP6_4, 2306 + GP_10_4_FN, FN_IP6_3, 2307 + GP_10_3_FN, FN_IP6_2, 2308 + GP_10_2_FN, FN_HRTS0_N, 2309 + GP_10_1_FN, FN_IP6_1, 2310 + GP_10_0_FN, FN_IP6_0 } 2311 + }, 2312 + { PINMUX_CFG_REG("GPSR11", 0xE6060030, 32, 1) { 2313 + 0, 0, 2314 + 0, 0, 2315 + GP_11_29_FN, FN_AVS2, 2316 + GP_11_28_FN, FN_AVS1, 2317 + GP_11_27_FN, FN_ADICHS2, 2318 + GP_11_26_FN, FN_ADICHS1, 2319 + GP_11_25_FN, FN_ADICHS0, 2320 + GP_11_24_FN, FN_ADIDATA, 2321 + GP_11_23_FN, FN_ADICS_SAMP, 2322 + GP_11_22_FN, FN_ADICLK, 2323 + GP_11_21_FN, FN_IP7_20, 2324 + GP_11_20_FN, FN_IP7_19, 2325 + GP_11_19_FN, FN_IP7_18, 2326 + GP_11_18_FN, FN_IP7_17, 2327 + GP_11_17_FN, FN_IP7_16, 2328 + GP_11_16_FN, FN_IP7_15_14, 2329 + GP_11_15_FN, FN_IP7_13_12, 2330 + GP_11_14_FN, FN_IP7_11_10, 2331 + GP_11_13_FN, FN_IP7_9_8, 2332 + GP_11_12_FN, FN_SD0_WP, 2333 + GP_11_11_FN, FN_SD0_CD, 2334 + GP_11_10_FN, FN_SD0_DAT3, 2335 + GP_11_9_FN, FN_SD0_DAT2, 2336 + GP_11_8_FN, FN_SD0_DAT1, 2337 + GP_11_7_FN, FN_SD0_DAT0, 2338 + GP_11_6_FN, FN_SD0_CMD, 2339 + GP_11_5_FN, FN_SD0_CLK, 2340 + GP_11_4_FN, FN_IP7_7, 2341 + GP_11_3_FN, FN_IP7_6, 2342 + GP_11_2_FN, FN_IP7_5_4, 2343 + GP_11_1_FN, FN_IP7_3_2, 2344 + GP_11_0_FN, FN_IP7_1_0 } 2345 + }, 2346 + { PINMUX_CFG_REG_VAR("IPSR0", 0xE6060040, 32, 2347 + 4, 4, 2348 + 1, 1, 1, 1, 1, 1, 1, 1, 2349 + 1, 1, 1, 1, 1, 1, 1, 1, 2350 + 1, 1, 1, 1, 1, 1, 1, 1) { 2351 + /* IP0_31_28 [4] */ 2352 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2353 + /* IP0_27_24 [4] */ 2354 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2355 + /* IP0_23 [1] */ 2356 + FN_DU0_DB7_C5, 0, 2357 + /* IP0_22 [1] */ 2358 + FN_DU0_DB6_C4, 0, 2359 + /* IP0_21 [1] */ 2360 + FN_DU0_DB5_C3, 0, 2361 + /* IP0_20 [1] */ 2362 + FN_DU0_DB4_C2, 0, 2363 + /* IP0_19 [1] */ 2364 + FN_DU0_DB3_C1, 0, 2365 + /* IP0_18 [1] */ 2366 + FN_DU0_DB2_C0, 0, 2367 + /* IP0_17 [1] */ 2368 + FN_DU0_DB1, 0, 2369 + /* IP0_16 [1] */ 2370 + FN_DU0_DB0, 0, 2371 + /* IP0_15 [1] */ 2372 + FN_DU0_DG7_Y3_DATA15, 0, 2373 + /* IP0_14 [1] */ 2374 + FN_DU0_DG6_Y2_DATA14, 0, 2375 + /* IP0_13 [1] */ 2376 + FN_DU0_DG5_Y1_DATA13, 0, 2377 + /* IP0_12 [1] */ 2378 + FN_DU0_DG4_Y0_DATA12, 0, 2379 + /* IP0_11 [1] */ 2380 + FN_DU0_DG3_C7_DATA11, 0, 2381 + /* IP0_10 [1] */ 2382 + FN_DU0_DG2_C6_DATA10, 0, 2383 + /* IP0_9 [1] */ 2384 + FN_DU0_DG1_DATA9, 0, 2385 + /* IP0_8 [1] */ 2386 + FN_DU0_DG0_DATA8, 0, 2387 + /* IP0_7 [1] */ 2388 + FN_DU0_DR7_Y9_DATA7, 0, 2389 + /* IP0_6 [1] */ 2390 + FN_DU0_DR6_Y8_DATA6, 0, 2391 + /* IP0_5 [1] */ 2392 + FN_DU0_DR5_Y7_DATA5, 0, 2393 + /* IP0_4 [1] */ 2394 + FN_DU0_DR4_Y6_DATA4, 0, 2395 + /* IP0_3 [1] */ 2396 + FN_DU0_DR3_Y5_DATA3, 0, 2397 + /* IP0_2 [1] */ 2398 + FN_DU0_DR2_Y4_DATA2, 0, 2399 + /* IP0_1 [1] */ 2400 + FN_DU0_DR1_DATA1, 0, 2401 + /* IP0_0 [1] */ 2402 + FN_DU0_DR0_DATA0, 0 } 2403 + }, 2404 + { PINMUX_CFG_REG_VAR("IPSR1", 0xE6060044, 32, 2405 + 4, 4, 2406 + 1, 1, 1, 1, 1, 1, 1, 1, 2407 + 1, 1, 1, 1, 1, 1, 1, 1, 2408 + 1, 1, 1, 1, 1, 1, 1, 1) { 2409 + /* IP1_31_28 [4] */ 2410 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2411 + /* IP1_27_24 [4] */ 2412 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2413 + /* IP1_23 [1] */ 2414 + 0, 0, 2415 + /* IP1_22 [1] */ 2416 + FN_A25, FN_SSL, 2417 + /* IP1_21 [1] */ 2418 + FN_A24, FN_SPCLK, 2419 + /* IP1_20 [1] */ 2420 + FN_A23, FN_IO3, 2421 + /* IP1_19 [1] */ 2422 + FN_A22, FN_IO2, 2423 + /* IP1_18 [1] */ 2424 + FN_A21, FN_MISO_IO1, 2425 + /* IP1_17 [1] */ 2426 + FN_A20, FN_MOSI_IO0, 2427 + /* IP1_16 [1] */ 2428 + FN_DU1_DG7_Y3_DATA11, 0, 2429 + /* IP1_15 [1] */ 2430 + FN_DU1_DG6_Y2_DATA10, 0, 2431 + /* IP1_14 [1] */ 2432 + FN_DU1_DG5_Y1_DATA9, 0, 2433 + /* IP1_13 [1] */ 2434 + FN_DU1_DG4_Y0_DATA8, 0, 2435 + /* IP1_12 [1] */ 2436 + FN_DU1_DG3_C7_DATA7, 0, 2437 + /* IP1_11 [1] */ 2438 + FN_DU1_DG2_C6_DATA6, 0, 2439 + /* IP1_10 [1] */ 2440 + FN_DU1_DR7_DATA5, 0, 2441 + /* IP1_9 [1] */ 2442 + FN_DU1_DR6_DATA4, 0, 2443 + /* IP1_8 [1] */ 2444 + FN_DU1_DR5_Y7_DATA3, 0, 2445 + /* IP1_7 [1] */ 2446 + FN_DU1_DR4_Y6_DATA2, 0, 2447 + /* IP1_6 [1] */ 2448 + FN_DU1_DR3_Y5_DATA1, 0, 2449 + /* IP1_5 [1] */ 2450 + FN_DU1_DR2_Y4_DATA0, 0, 2451 + /* IP1_4 [1] */ 2452 + FN_DU0_CDE, 0, 2453 + /* IP1_3 [1] */ 2454 + FN_DU0_DISP, 0, 2455 + /* IP1_2 [1] */ 2456 + FN_DU0_EXODDF_DU0_ODDF_DISP_CDE, 0, 2457 + /* IP1_1 [1] */ 2458 + FN_DU0_EXVSYNC_DU0_VSYNC, 0, 2459 + /* IP1_0 [1] */ 2460 + FN_DU0_EXHSYNC_DU0_HSYNC, 0 } 2461 + }, 2462 + { PINMUX_CFG_REG_VAR("IPSR2", 0xE6060048, 32, 2463 + 4, 4, 2464 + 4, 3, 1, 2465 + 1, 1, 1, 1, 1, 1, 1, 1, 2466 + 1, 1, 1, 1, 1, 1, 1, 1) { 2467 + /* IP2_31_28 [4] */ 2468 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2469 + /* IP2_27_24 [4] */ 2470 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2471 + /* IP2_23_20 [4] */ 2472 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2473 + /* IP2_19_17 [3] */ 2474 + 0, 0, 0, 0, 0, 0, 0, 0, 2475 + /* IP2_16 [1] */ 2476 + FN_VI2_FIELD, FN_AVB_TXD2, 2477 + /* IP2_15 [1] */ 2478 + FN_VI2_D11_Y3, FN_AVB_TXD1, 2479 + /* IP2_14 [1] */ 2480 + FN_VI2_D10_Y2, FN_AVB_TXD0, 2481 + /* IP2_13 [1] */ 2482 + FN_VI2_D9_Y1, FN_AVB_TX_EN, 2483 + /* IP2_12 [1] */ 2484 + FN_VI2_D8_Y0, FN_AVB_TXD3, 2485 + /* IP2_11 [1] */ 2486 + FN_VI2_D7_C7, FN_AVB_COL, 2487 + /* IP2_10 [1] */ 2488 + FN_VI2_D6_C6, FN_AVB_RX_ER, 2489 + /* IP2_9 [1] */ 2490 + FN_VI2_D5_C5, FN_AVB_RXD7, 2491 + /* IP2_8 [1] */ 2492 + FN_VI2_D4_C4, FN_AVB_RXD6, 2493 + /* IP2_7 [1] */ 2494 + FN_VI2_D3_C3, FN_AVB_RXD5, 2495 + /* IP2_6 [1] */ 2496 + FN_VI2_D2_C2, FN_AVB_RXD4, 2497 + /* IP2_5 [1] */ 2498 + FN_VI2_D1_C1, FN_AVB_RXD3, 2499 + /* IP2_4 [1] */ 2500 + FN_VI2_D0_C0, FN_AVB_RXD2, 2501 + /* IP2_3 [1] */ 2502 + FN_VI2_VSYNC_N, FN_AVB_RXD1, 2503 + /* IP2_2 [1] */ 2504 + FN_VI2_HSYNC_N, FN_AVB_RXD0, 2505 + /* IP2_1 [1] */ 2506 + FN_VI2_CLKENB, FN_AVB_RX_DV, 2507 + /* IP2_0 [1] */ 2508 + FN_VI2_CLK, FN_AVB_RX_CLK } 2509 + }, 2510 + { PINMUX_CFG_REG_VAR("IPSR3", 0xE606004C, 32, 2511 + 4, 4, 2512 + 4, 4, 2513 + 1, 1, 1, 1, 1, 1, 1, 1, 2514 + 1, 1, 1, 1, 1, 1, 1, 1) { 2515 + /* IP3_31_28 [4] */ 2516 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2517 + /* IP3_27_24 [4] */ 2518 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2519 + /* IP3_23_20 [4] */ 2520 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2521 + /* IP3_19_16 [4] */ 2522 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2523 + /* IP3_15 [1] */ 2524 + 0, 0, 2525 + /* IP3_14 [1] */ 2526 + FN_VI3_D11_Y3, FN_AVB_AVTP_MATCH, 2527 + /* IP3_13 [1] */ 2528 + FN_VI3_D9_Y1, FN_AVB_GTXREFCLK, 2529 + /* IP3_12 [1] */ 2530 + FN_VI3_D8_Y0, FN_AVB_CRS, 2531 + /* IP3_11 [1] */ 2532 + FN_VI3_D7_C7, FN_AVB_PHY_INT, 2533 + /* IP3_10 [1] */ 2534 + FN_VI3_D6_C6, FN_AVB_MAGIC, 2535 + /* IP3_9 [1] */ 2536 + FN_VI3_D5_C5, FN_AVB_LINK, 2537 + /* IP3_8 [1] */ 2538 + FN_VI3_D4_C4, FN_AVB_MDIO, 2539 + /* IP3_7 [1] */ 2540 + FN_VI3_D3_C3, FN_AVB_MDC, 2541 + /* IP3_6 [1] */ 2542 + FN_VI3_D2_C2, FN_AVB_GTX_CLK, 2543 + /* IP3_5 [1] */ 2544 + FN_VI3_D1_C1, FN_AVB_TX_ER, 2545 + /* IP3_4 [1] */ 2546 + FN_VI3_D0_C0, FN_AVB_TXD7, 2547 + /* IP3_3 [1] */ 2548 + FN_VI3_VSYNC_N, FN_AVB_TXD6, 2549 + /* IP3_2 [1] */ 2550 + FN_VI3_HSYNC_N, FN_AVB_TXD5, 2551 + /* IP3_1 [1] */ 2552 + FN_VI3_CLKENB, FN_AVB_TXD4, 2553 + /* IP3_0 [1] */ 2554 + FN_VI3_CLK, FN_AVB_TX_CLK } 2555 + }, 2556 + { PINMUX_CFG_REG_VAR("IPSR4", 0xE6060050, 32, 2557 + 4, 3, 1, 2558 + 1, 1, 1, 2, 2, 2, 2559 + 2, 2, 2, 2, 2, 1, 2, 1, 1) { 2560 + /* IP4_31_28 [4] */ 2561 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2562 + /* IP4_27_25 [3] */ 2563 + 0, 0, 0, 0, 0, 0, 0, 0, 2564 + /* IP4_24 [1] */ 2565 + FN_VI4_FIELD, FN_VI3_D15_Y7, 2566 + /* IP4_23 [1] */ 2567 + FN_VI4_D11_Y3, FN_VI3_D14_Y6, 2568 + /* IP4_22 [1] */ 2569 + FN_VI4_D10_Y2, FN_VI3_D13_Y5, 2570 + /* IP4_21 [1] */ 2571 + FN_VI4_D9_Y1, FN_VI3_D12_Y4, 2572 + /* IP4_20_19 [2] */ 2573 + FN_VI4_D8_Y0, FN_VI0_D23_R7, FN_VI2_D15_Y7, 0, 2574 + /* IP4_18_17 [2] */ 2575 + FN_VI4_D7_C7, FN_VI0_D22_R6, FN_VI2_D14_Y6, 0, 2576 + /* IP4_16_15 [2] */ 2577 + FN_VI4_D6_C6, FN_VI0_D21_R5, FN_VI2_D13_Y5, 0, 2578 + /* IP4_14_13 [2] */ 2579 + FN_VI4_D5_C5, FN_VI0_D20_R4, FN_VI2_D12_Y4, 0, 2580 + /* IP4_12_11 [2] */ 2581 + FN_VI4_D4_C4, FN_VI0_D19_R3, FN_VI1_D15_G7_Y7, 0, 2582 + /* IP4_10_9 [2] */ 2583 + FN_VI4_D3_C3, FN_VI0_D18_R2, FN_VI1_D14_G6_Y6, 0, 2584 + /* IP4_8_7 [2] */ 2585 + FN_VI4_D2_C2, 0, FN_VI0_D17_R1, FN_VI1_D13_G5_Y5, 2586 + /* IP4_6_5 [2] */ 2587 + FN_VI4_D1_C1, FN_VI0_D16_R0, FN_VI1_D12_G4_Y4, 0, 2588 + /* IP4_4 [1] */ 2589 + FN_VI4_D0_C0, FN_VI0_D15_G7_Y7, 2590 + /* IP4_3_2 [2] */ 2591 + FN_VI4_VSYNC_N, FN_VI0_D14_G6_Y6, 0, 0, 2592 + /* IP4_1 [1] */ 2593 + FN_VI4_HSYNC_N, FN_VI0_D13_G5_Y5, 2594 + /* IP4_0 [1] */ 2595 + FN_VI4_CLKENB, FN_VI0_D12_G4_Y4 } 2596 + }, 2597 + { PINMUX_CFG_REG_VAR("IPSR5", 0xE6060054, 32, 2598 + 4, 4, 2599 + 4, 4, 2600 + 4, 1, 1, 1, 1, 2601 + 1, 1, 1, 1, 1, 1, 1, 1) { 2602 + /* IP5_31_28 [4] */ 2603 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2604 + /* IP5_27_24 [4] */ 2605 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2606 + /* IP5_23_20 [4] */ 2607 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2608 + /* IP5_19_16 [4] */ 2609 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2610 + /* IP5_15_12 [4] */ 2611 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2612 + /* IP5_11 [1] */ 2613 + FN_VI5_D8_Y0, FN_VI1_D23_R7, 2614 + /* IP5_10 [1] */ 2615 + FN_VI5_D7_C7, FN_VI1_D22_R6, 2616 + /* IP5_9 [1] */ 2617 + FN_VI5_D6_C6, FN_VI1_D21_R5, 2618 + /* IP5_8 [1] */ 2619 + FN_VI5_D5_C5, FN_VI1_D20_R4, 2620 + /* IP5_7 [1] */ 2621 + FN_VI5_D4_C4, FN_VI1_D19_R3, 2622 + /* IP5_6 [1] */ 2623 + FN_VI5_D3_C3, FN_VI1_D18_R2, 2624 + /* IP5_5 [1] */ 2625 + FN_VI5_D2_C2, FN_VI1_D17_R1, 2626 + /* IP5_4 [1] */ 2627 + FN_VI5_D1_C1, FN_VI1_D16_R0, 2628 + /* IP5_3 [1] */ 2629 + FN_VI5_D0_C0, FN_VI1_D15_G7_Y7_B, 2630 + /* IP5_2 [1] */ 2631 + FN_VI5_VSYNC_N, FN_VI1_D14_G6_Y6_B, 2632 + /* IP5_1 [1] */ 2633 + FN_VI5_HSYNC_N, FN_VI1_D13_G5_Y5_B, 2634 + /* IP5_0 [1] */ 2635 + FN_VI5_CLKENB, FN_VI1_D12_G4_Y4_B } 2636 + }, 2637 + { PINMUX_CFG_REG_VAR("IPSR6", 0xE6060058, 32, 2638 + 4, 4, 2639 + 4, 1, 2, 1, 2640 + 2, 2, 2, 2, 2641 + 1, 1, 1, 1, 1, 1, 1, 1) { 2642 + /* IP6_31_28 [4] */ 2643 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2644 + /* IP6_27_24 [4] */ 2645 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2646 + /* IP6_23_20 [4] */ 2647 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2648 + /* IP6_19 [1] */ 2649 + 0, 0, 2650 + /* IP6_18_17 [2] */ 2651 + FN_DREQ1_N, FN_RX3, 0, 0, 2652 + /* IP6_16 [1] */ 2653 + FN_TX3, 0, 2654 + /* IP6_15_14 [2] */ 2655 + FN_DACK1, FN_SCK3, 0, 0, 2656 + /* IP6_13_12 [2] */ 2657 + FN_DREQ0_N, FN_RX2, 0, 0, 2658 + /* IP6_11_10 [2] */ 2659 + FN_DACK0, FN_TX2, 0, 0, 2660 + /* IP6_9_8 [2] */ 2661 + FN_DRACK0, FN_SCK2, 0, 0, 2662 + /* IP6_7 [1] */ 2663 + FN_MSIOF1_RXD, FN_HRX1, 2664 + /* IP6_6 [1] */ 2665 + FN_MSIOF1_TXD, FN_HTX1, 2666 + /* IP6_5 [1] */ 2667 + FN_MSIOF1_SYNC, FN_HRTS1_N, 2668 + /* IP6_4 [1] */ 2669 + FN_MSIOF1_SCK, FN_HSCK1, 2670 + /* IP6_3 [1] */ 2671 + FN_MSIOF0_RXD, FN_HRX0, 2672 + /* IP6_2 [1] */ 2673 + FN_MSIOF0_TXD, FN_HTX0, 2674 + /* IP6_1 [1] */ 2675 + FN_MSIOF0_SYNC, FN_HCTS0_N, 2676 + /* IP6_0 [1] */ 2677 + FN_MSIOF0_SCK, FN_HSCK0 } 2678 + }, 2679 + { PINMUX_CFG_REG_VAR("IPSR7", 0xE606005C, 32, 2680 + 4, 4, 2681 + 3, 1, 1, 1, 1, 1, 2682 + 2, 2, 2, 2, 2683 + 1, 1, 2, 2, 2) { 2684 + /* IP7_31_28 [4] */ 2685 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2686 + /* IP7_27_24 [4] */ 2687 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2688 + /* IP7_23_21 [3] */ 2689 + 0, 0, 0, 0, 0, 0, 0, 0, 2690 + /* IP7_20 [1] */ 2691 + FN_AUDIO_CLKB, 0, 2692 + /* IP7_19 [1] */ 2693 + FN_AUDIO_CLKA, 0, 2694 + /* IP7_18 [1] */ 2695 + FN_AUDIO_CLKOUT, 0, 2696 + /* IP7_17 [1] */ 2697 + FN_SSI_SDATA4, 0, 2698 + /* IP7_16 [1] */ 2699 + FN_SSI_WS4, 0, 2700 + /* IP7_15_14 [2] */ 2701 + FN_SSI_SCK4, FN_TPU0TO3, 0, 0, 2702 + /* IP7_13_12 [2] */ 2703 + FN_SSI_SDATA3, FN_TPU0TO2, 0, 0, 2704 + /* IP7_11_10 [2] */ 2705 + FN_SSI_WS34, FN_TPU0TO1, 0, 0, 2706 + /* IP7_9_8 [2] */ 2707 + FN_SSI_SCK34, FN_TPU0TO0, 0, 0, 2708 + /* IP7_7 [1] */ 2709 + FN_PWM4, 0, 2710 + /* IP7_6 [1] */ 2711 + FN_PWM3, 0, 2712 + /* IP7_5_4 [2] */ 2713 + FN_PWM2, FN_TCLK3, FN_FSO_TOE, 0, 2714 + /* IP7_3_2 [2] */ 2715 + FN_PWM1, FN_TCLK2, FN_FSO_CFE_1, 0, 2716 + /* IP7_1_0 [2] */ 2717 + FN_PWM0, FN_TCLK1, FN_FSO_CFE_0, 0 } 2718 + }, 2719 + { }, 2720 + }; 2721 + 2722 + const struct sh_pfc_soc_info r8a7792_pinmux_info = { 2723 + .name = "r8a77920_pfc", 2724 + .unlock_reg = 0xe6060000, /* PMMR */ 2725 + 2726 + .function = { PINMUX_FUNCTION_BEGIN, PINMUX_FUNCTION_END }, 2727 + 2728 + .pins = pinmux_pins, 2729 + .nr_pins = ARRAY_SIZE(pinmux_pins), 2730 + .groups = pinmux_groups, 2731 + .nr_groups = ARRAY_SIZE(pinmux_groups), 2732 + .functions = pinmux_functions, 2733 + .nr_functions = ARRAY_SIZE(pinmux_functions), 2734 + 2735 + .cfg_regs = pinmux_config_regs, 2736 + 2737 + .pinmux_data = pinmux_data, 2738 + .pinmux_data_size = ARRAY_SIZE(pinmux_data), 2739 + };
+27 -1
drivers/pinctrl/sh-pfc/pfc-r8a7794.c
··· 22 22 PORT_GP_32(3, fn, sfx), \ 23 23 PORT_GP_32(4, fn, sfx), \ 24 24 PORT_GP_28(5, fn, sfx), \ 25 - PORT_GP_26(6, fn, sfx) 25 + PORT_GP_CFG_24(6, fn, sfx, SH_PFC_PIN_CFG_IO_VOLTAGE), \ 26 + PORT_GP_1(6, 24, fn, sfx), \ 27 + PORT_GP_1(6, 25, fn, sfx) 26 28 27 29 enum { 28 30 PINMUX_RESERVED = 0, ··· 5162 5160 { }, 5163 5161 }; 5164 5162 5163 + static int r8a7794_pin_to_pocctrl(struct sh_pfc *pfc, unsigned int pin, u32 *pocctrl) 5164 + { 5165 + *pocctrl = 0xe606006c; 5166 + 5167 + switch (pin & 0x1f) { 5168 + case 6: return 23; 5169 + case 7: return 16; 5170 + case 14: return 15; 5171 + case 15: return 8; 5172 + case 0 ... 5: 5173 + case 8 ... 13: 5174 + return 22 - (pin & 0x1f); 5175 + case 16 ... 23: 5176 + return 47 - (pin & 0x1f); 5177 + } 5178 + 5179 + return -EINVAL; 5180 + } 5181 + 5182 + static const struct sh_pfc_soc_operations r8a7794_pinmux_ops = { 5183 + .pin_to_pocctrl = r8a7794_pin_to_pocctrl, 5184 + }; 5185 + 5165 5186 const struct sh_pfc_soc_info r8a7794_pinmux_info = { 5166 5187 .name = "r8a77940_pfc", 5188 + .ops = &r8a7794_pinmux_ops, 5167 5189 .unlock_reg = 0xe6060000, /* PMMR */ 5168 5190 5169 5191 .function = { PINMUX_FUNCTION_BEGIN, PINMUX_FUNCTION_END },
+343 -13
drivers/pinctrl/sh-pfc/pfc-r8a7795.c
··· 1 1 /* 2 - * R-Car Gen3 processor support - PFC hardware block. 2 + * R8A7795 processor support - PFC hardware block. 3 3 * 4 4 * Copyright (C) 2015 Renesas Electronics Corporation 5 5 * ··· 13 13 #include "core.h" 14 14 #include "sh_pfc.h" 15 15 16 + #define CFG_FLAGS (SH_PFC_PIN_CFG_DRIVE_STRENGTH | \ 17 + SH_PFC_PIN_CFG_PULL_UP | \ 18 + SH_PFC_PIN_CFG_PULL_DOWN) 19 + 16 20 #define CPU_ALL_PORT(fn, sfx) \ 17 - PORT_GP_CFG_16(0, fn, sfx, SH_PFC_PIN_CFG_DRIVE_STRENGTH), \ 18 - PORT_GP_CFG_28(1, fn, sfx, SH_PFC_PIN_CFG_DRIVE_STRENGTH), \ 19 - PORT_GP_CFG_15(2, fn, sfx, SH_PFC_PIN_CFG_DRIVE_STRENGTH), \ 20 - PORT_GP_CFG_12(3, fn, sfx, SH_PFC_PIN_CFG_DRIVE_STRENGTH | SH_PFC_PIN_CFG_IO_VOLTAGE), \ 21 - PORT_GP_CFG_1(3, 12, fn, sfx, SH_PFC_PIN_CFG_DRIVE_STRENGTH), \ 22 - PORT_GP_CFG_1(3, 13, fn, sfx, SH_PFC_PIN_CFG_DRIVE_STRENGTH), \ 23 - PORT_GP_CFG_1(3, 14, fn, sfx, SH_PFC_PIN_CFG_DRIVE_STRENGTH), \ 24 - PORT_GP_CFG_1(3, 15, fn, sfx, SH_PFC_PIN_CFG_DRIVE_STRENGTH), \ 25 - PORT_GP_CFG_18(4, fn, sfx, SH_PFC_PIN_CFG_DRIVE_STRENGTH | SH_PFC_PIN_CFG_IO_VOLTAGE), \ 26 - PORT_GP_CFG_26(5, fn, sfx, SH_PFC_PIN_CFG_DRIVE_STRENGTH), \ 27 - PORT_GP_CFG_32(6, fn, sfx, SH_PFC_PIN_CFG_DRIVE_STRENGTH), \ 28 - PORT_GP_CFG_4(7, fn, sfx, SH_PFC_PIN_CFG_DRIVE_STRENGTH) 21 + PORT_GP_CFG_16(0, fn, sfx, CFG_FLAGS), \ 22 + PORT_GP_CFG_28(1, fn, sfx, CFG_FLAGS), \ 23 + PORT_GP_CFG_15(2, fn, sfx, CFG_FLAGS), \ 24 + PORT_GP_CFG_12(3, fn, sfx, CFG_FLAGS | SH_PFC_PIN_CFG_IO_VOLTAGE), \ 25 + PORT_GP_CFG_1(3, 12, fn, sfx, CFG_FLAGS), \ 26 + PORT_GP_CFG_1(3, 13, fn, sfx, CFG_FLAGS), \ 27 + PORT_GP_CFG_1(3, 14, fn, sfx, CFG_FLAGS), \ 28 + PORT_GP_CFG_1(3, 15, fn, sfx, CFG_FLAGS), \ 29 + PORT_GP_CFG_18(4, fn, sfx, CFG_FLAGS | SH_PFC_PIN_CFG_IO_VOLTAGE), \ 30 + PORT_GP_CFG_26(5, fn, sfx, CFG_FLAGS), \ 31 + PORT_GP_CFG_32(6, fn, sfx, CFG_FLAGS), \ 32 + PORT_GP_CFG_4(7, fn, sfx, CFG_FLAGS) 29 33 /* 30 34 * F_() : just information 31 35 * FM() : macro for FN_xxx / xxx_MARK ··· 1875 1871 RIF3_D1_B_MARK, 1876 1872 }; 1877 1873 1874 + /* - DU --------------------------------------------------------------------- */ 1875 + static const unsigned int du_rgb666_pins[] = { 1876 + /* R[7:2], G[7:2], B[7:2] */ 1877 + RCAR_GP_PIN(0, 15), RCAR_GP_PIN(0, 14), RCAR_GP_PIN(0, 13), 1878 + RCAR_GP_PIN(0, 12), RCAR_GP_PIN(0, 11), RCAR_GP_PIN(0, 10), 1879 + RCAR_GP_PIN(1, 15), RCAR_GP_PIN(1, 14), RCAR_GP_PIN(1, 13), 1880 + RCAR_GP_PIN(1, 12), RCAR_GP_PIN(1, 19), RCAR_GP_PIN(1, 18), 1881 + RCAR_GP_PIN(1, 7), RCAR_GP_PIN(1, 6), RCAR_GP_PIN(1, 5), 1882 + RCAR_GP_PIN(1, 4), RCAR_GP_PIN(1, 3), RCAR_GP_PIN(1, 2), 1883 + }; 1884 + static const unsigned int du_rgb666_mux[] = { 1885 + DU_DR7_MARK, DU_DR6_MARK, DU_DR5_MARK, DU_DR4_MARK, 1886 + DU_DR3_MARK, DU_DR2_MARK, 1887 + DU_DG7_MARK, DU_DG6_MARK, DU_DG5_MARK, DU_DG4_MARK, 1888 + DU_DG3_MARK, DU_DG2_MARK, 1889 + DU_DB7_MARK, DU_DB6_MARK, DU_DB5_MARK, DU_DB4_MARK, 1890 + DU_DB3_MARK, DU_DB2_MARK, 1891 + }; 1892 + static const unsigned int du_rgb888_pins[] = { 1893 + /* R[7:0], G[7:0], B[7:0] */ 1894 + RCAR_GP_PIN(0, 15), RCAR_GP_PIN(0, 14), RCAR_GP_PIN(0, 13), 1895 + RCAR_GP_PIN(0, 12), RCAR_GP_PIN(0, 11), RCAR_GP_PIN(0, 10), 1896 + RCAR_GP_PIN(0, 9), RCAR_GP_PIN(0, 8), 1897 + RCAR_GP_PIN(1, 15), RCAR_GP_PIN(1, 14), RCAR_GP_PIN(1, 13), 1898 + RCAR_GP_PIN(1, 12), RCAR_GP_PIN(1, 19), RCAR_GP_PIN(1, 18), 1899 + RCAR_GP_PIN(1, 17), RCAR_GP_PIN(1, 16), 1900 + RCAR_GP_PIN(1, 7), RCAR_GP_PIN(1, 6), RCAR_GP_PIN(1, 5), 1901 + RCAR_GP_PIN(1, 4), RCAR_GP_PIN(1, 3), RCAR_GP_PIN(1, 2), 1902 + RCAR_GP_PIN(1, 1), RCAR_GP_PIN(1, 0), 1903 + }; 1904 + static const unsigned int du_rgb888_mux[] = { 1905 + DU_DR7_MARK, DU_DR6_MARK, DU_DR5_MARK, DU_DR4_MARK, 1906 + DU_DR3_MARK, DU_DR2_MARK, DU_DR1_MARK, DU_DR0_MARK, 1907 + DU_DG7_MARK, DU_DG6_MARK, DU_DG5_MARK, DU_DG4_MARK, 1908 + DU_DG3_MARK, DU_DG2_MARK, DU_DG1_MARK, DU_DG0_MARK, 1909 + DU_DB7_MARK, DU_DB6_MARK, DU_DB5_MARK, DU_DB4_MARK, 1910 + DU_DB3_MARK, DU_DB2_MARK, DU_DB1_MARK, DU_DB0_MARK, 1911 + }; 1912 + static const unsigned int du_clk_out_0_pins[] = { 1913 + /* CLKOUT */ 1914 + RCAR_GP_PIN(1, 27), 1915 + }; 1916 + static const unsigned int du_clk_out_0_mux[] = { 1917 + DU_DOTCLKOUT0_MARK 1918 + }; 1919 + static const unsigned int du_clk_out_1_pins[] = { 1920 + /* CLKOUT */ 1921 + RCAR_GP_PIN(2, 3), 1922 + }; 1923 + static const unsigned int du_clk_out_1_mux[] = { 1924 + DU_DOTCLKOUT1_MARK 1925 + }; 1926 + static const unsigned int du_sync_pins[] = { 1927 + /* EXVSYNC/VSYNC, EXHSYNC/HSYNC */ 1928 + RCAR_GP_PIN(2, 5), RCAR_GP_PIN(2, 4), 1929 + }; 1930 + static const unsigned int du_sync_mux[] = { 1931 + DU_EXVSYNC_DU_VSYNC_MARK, DU_EXHSYNC_DU_HSYNC_MARK 1932 + }; 1933 + static const unsigned int du_oddf_pins[] = { 1934 + /* EXDISP/EXODDF/EXCDE */ 1935 + RCAR_GP_PIN(2, 2), 1936 + }; 1937 + static const unsigned int du_oddf_mux[] = { 1938 + DU_EXODDF_DU_ODDF_DISP_CDE_MARK, 1939 + }; 1940 + static const unsigned int du_cde_pins[] = { 1941 + /* CDE */ 1942 + RCAR_GP_PIN(2, 0), 1943 + }; 1944 + static const unsigned int du_cde_mux[] = { 1945 + DU_CDE_MARK, 1946 + }; 1947 + static const unsigned int du_disp_pins[] = { 1948 + /* DISP */ 1949 + RCAR_GP_PIN(2, 1), 1950 + }; 1951 + static const unsigned int du_disp_mux[] = { 1952 + DU_DISP_MARK, 1953 + }; 1878 1954 /* - HSCIF0 ----------------------------------------------------------------- */ 1879 1955 static const unsigned int hscif0_data_pins[] = { 1880 1956 /* RX, TX */ ··· 3677 3593 SH_PFC_PIN_GROUP(drif3_ctrl_b), 3678 3594 SH_PFC_PIN_GROUP(drif3_data0_b), 3679 3595 SH_PFC_PIN_GROUP(drif3_data1_b), 3596 + SH_PFC_PIN_GROUP(du_rgb666), 3597 + SH_PFC_PIN_GROUP(du_rgb888), 3598 + SH_PFC_PIN_GROUP(du_clk_out_0), 3599 + SH_PFC_PIN_GROUP(du_clk_out_1), 3600 + SH_PFC_PIN_GROUP(du_sync), 3601 + SH_PFC_PIN_GROUP(du_oddf), 3602 + SH_PFC_PIN_GROUP(du_cde), 3603 + SH_PFC_PIN_GROUP(du_disp), 3680 3604 SH_PFC_PIN_GROUP(hscif0_data), 3681 3605 SH_PFC_PIN_GROUP(hscif0_clk), 3682 3606 SH_PFC_PIN_GROUP(hscif0_ctrl), ··· 4008 3916 "drif3_ctrl_b", 4009 3917 "drif3_data0_b", 4010 3918 "drif3_data1_b", 3919 + }; 3920 + 3921 + static const char * const du_groups[] = { 3922 + "du_rgb666", 3923 + "du_rgb888", 3924 + "du_clk_out_0", 3925 + "du_clk_out_1", 3926 + "du_sync", 3927 + "du_oddf", 3928 + "du_cde", 3929 + "du_disp", 4011 3930 }; 4012 3931 4013 3932 static const char * const hscif0_groups[] = { ··· 4368 4265 SH_PFC_FUNCTION(drif1), 4369 4266 SH_PFC_FUNCTION(drif2), 4370 4267 SH_PFC_FUNCTION(drif3), 4268 + SH_PFC_FUNCTION(du), 4371 4269 SH_PFC_FUNCTION(hscif0), 4372 4270 SH_PFC_FUNCTION(hscif1), 4373 4271 SH_PFC_FUNCTION(hscif2), ··· 5177 5073 return bit; 5178 5074 } 5179 5075 5076 + #define PUEN 0xe6060400 5077 + #define PUD 0xe6060440 5078 + 5079 + #define PU0 0x00 5080 + #define PU1 0x04 5081 + #define PU2 0x08 5082 + #define PU3 0x0c 5083 + #define PU4 0x10 5084 + #define PU5 0x14 5085 + #define PU6 0x18 5086 + 5087 + static const struct { 5088 + u16 reg : 11; 5089 + u16 bit : 5; 5090 + } pullups[] = { 5091 + [RCAR_GP_PIN(2, 11)] = { PU0, 31 }, /* AVB_PHY_INT */ 5092 + [RCAR_GP_PIN(2, 10)] = { PU0, 30 }, /* AVB_MAGIC */ 5093 + [RCAR_GP_PIN(2, 9)] = { PU0, 29 }, /* AVB_MDC */ 5094 + 5095 + [RCAR_GP_PIN(1, 19)] = { PU1, 31 }, /* A19 */ 5096 + [RCAR_GP_PIN(1, 18)] = { PU1, 30 }, /* A18 */ 5097 + [RCAR_GP_PIN(1, 17)] = { PU1, 29 }, /* A17 */ 5098 + [RCAR_GP_PIN(1, 16)] = { PU1, 28 }, /* A16 */ 5099 + [RCAR_GP_PIN(1, 15)] = { PU1, 27 }, /* A15 */ 5100 + [RCAR_GP_PIN(1, 14)] = { PU1, 26 }, /* A14 */ 5101 + [RCAR_GP_PIN(1, 13)] = { PU1, 25 }, /* A13 */ 5102 + [RCAR_GP_PIN(1, 12)] = { PU1, 24 }, /* A12 */ 5103 + [RCAR_GP_PIN(1, 11)] = { PU1, 23 }, /* A11 */ 5104 + [RCAR_GP_PIN(1, 10)] = { PU1, 22 }, /* A10 */ 5105 + [RCAR_GP_PIN(1, 9)] = { PU1, 21 }, /* A9 */ 5106 + [RCAR_GP_PIN(1, 8)] = { PU1, 20 }, /* A8 */ 5107 + [RCAR_GP_PIN(1, 7)] = { PU1, 19 }, /* A7 */ 5108 + [RCAR_GP_PIN(1, 6)] = { PU1, 18 }, /* A6 */ 5109 + [RCAR_GP_PIN(1, 5)] = { PU1, 17 }, /* A5 */ 5110 + [RCAR_GP_PIN(1, 4)] = { PU1, 16 }, /* A4 */ 5111 + [RCAR_GP_PIN(1, 3)] = { PU1, 15 }, /* A3 */ 5112 + [RCAR_GP_PIN(1, 2)] = { PU1, 14 }, /* A2 */ 5113 + [RCAR_GP_PIN(1, 1)] = { PU1, 13 }, /* A1 */ 5114 + [RCAR_GP_PIN(1, 0)] = { PU1, 12 }, /* A0 */ 5115 + [RCAR_GP_PIN(2, 8)] = { PU1, 11 }, /* PWM2_A */ 5116 + [RCAR_GP_PIN(2, 7)] = { PU1, 10 }, /* PWM1_A */ 5117 + [RCAR_GP_PIN(2, 6)] = { PU1, 9 }, /* PWM0 */ 5118 + [RCAR_GP_PIN(2, 5)] = { PU1, 8 }, /* IRQ5 */ 5119 + [RCAR_GP_PIN(2, 4)] = { PU1, 7 }, /* IRQ4 */ 5120 + [RCAR_GP_PIN(2, 3)] = { PU1, 6 }, /* IRQ3 */ 5121 + [RCAR_GP_PIN(2, 2)] = { PU1, 5 }, /* IRQ2 */ 5122 + [RCAR_GP_PIN(2, 1)] = { PU1, 4 }, /* IRQ1 */ 5123 + [RCAR_GP_PIN(2, 0)] = { PU1, 3 }, /* IRQ0 */ 5124 + [RCAR_GP_PIN(2, 14)] = { PU1, 2 }, /* AVB_AVTP_CAPTURE_A */ 5125 + [RCAR_GP_PIN(2, 13)] = { PU1, 1 }, /* AVB_AVTP_MATCH_A */ 5126 + [RCAR_GP_PIN(2, 12)] = { PU1, 0 }, /* AVB_LINK */ 5127 + 5128 + [RCAR_GP_PIN(7, 3)] = { PU2, 29 }, /* HDMI1_CEC */ 5129 + [RCAR_GP_PIN(7, 2)] = { PU2, 28 }, /* HDMI0_CEC */ 5130 + [RCAR_GP_PIN(7, 1)] = { PU2, 27 }, /* AVS2 */ 5131 + [RCAR_GP_PIN(7, 0)] = { PU2, 26 }, /* AVS1 */ 5132 + [RCAR_GP_PIN(0, 15)] = { PU2, 25 }, /* D15 */ 5133 + [RCAR_GP_PIN(0, 14)] = { PU2, 24 }, /* D14 */ 5134 + [RCAR_GP_PIN(0, 13)] = { PU2, 23 }, /* D13 */ 5135 + [RCAR_GP_PIN(0, 12)] = { PU2, 22 }, /* D12 */ 5136 + [RCAR_GP_PIN(0, 11)] = { PU2, 21 }, /* D11 */ 5137 + [RCAR_GP_PIN(0, 10)] = { PU2, 20 }, /* D10 */ 5138 + [RCAR_GP_PIN(0, 9)] = { PU2, 19 }, /* D9 */ 5139 + [RCAR_GP_PIN(0, 8)] = { PU2, 18 }, /* D8 */ 5140 + [RCAR_GP_PIN(0, 7)] = { PU2, 17 }, /* D7 */ 5141 + [RCAR_GP_PIN(0, 6)] = { PU2, 16 }, /* D6 */ 5142 + [RCAR_GP_PIN(0, 5)] = { PU2, 15 }, /* D5 */ 5143 + [RCAR_GP_PIN(0, 4)] = { PU2, 14 }, /* D4 */ 5144 + [RCAR_GP_PIN(0, 3)] = { PU2, 13 }, /* D3 */ 5145 + [RCAR_GP_PIN(0, 2)] = { PU2, 12 }, /* D2 */ 5146 + [RCAR_GP_PIN(0, 1)] = { PU2, 11 }, /* D1 */ 5147 + [RCAR_GP_PIN(0, 0)] = { PU2, 10 }, /* D0 */ 5148 + [RCAR_GP_PIN(1, 27)] = { PU2, 8 }, /* EX_WAIT0_A */ 5149 + [RCAR_GP_PIN(1, 26)] = { PU2, 7 }, /* WE1_N */ 5150 + [RCAR_GP_PIN(1, 25)] = { PU2, 6 }, /* WE0_N */ 5151 + [RCAR_GP_PIN(1, 24)] = { PU2, 5 }, /* RD_WR_N */ 5152 + [RCAR_GP_PIN(1, 23)] = { PU2, 4 }, /* RD_N */ 5153 + [RCAR_GP_PIN(1, 22)] = { PU2, 3 }, /* BS_N */ 5154 + [RCAR_GP_PIN(1, 21)] = { PU2, 2 }, /* CS1_N_A26 */ 5155 + [RCAR_GP_PIN(1, 20)] = { PU2, 1 }, /* CS0_N */ 5156 + 5157 + [RCAR_GP_PIN(4, 9)] = { PU3, 31 }, /* SD3_DAT0 */ 5158 + [RCAR_GP_PIN(4, 8)] = { PU3, 30 }, /* SD3_CMD */ 5159 + [RCAR_GP_PIN(4, 7)] = { PU3, 29 }, /* SD3_CLK */ 5160 + [RCAR_GP_PIN(4, 6)] = { PU3, 28 }, /* SD2_DS */ 5161 + [RCAR_GP_PIN(4, 5)] = { PU3, 27 }, /* SD2_DAT3 */ 5162 + [RCAR_GP_PIN(4, 4)] = { PU3, 26 }, /* SD2_DAT2 */ 5163 + [RCAR_GP_PIN(4, 3)] = { PU3, 25 }, /* SD2_DAT1 */ 5164 + [RCAR_GP_PIN(4, 2)] = { PU3, 24 }, /* SD2_DAT0 */ 5165 + [RCAR_GP_PIN(4, 1)] = { PU3, 23 }, /* SD2_CMD */ 5166 + [RCAR_GP_PIN(4, 0)] = { PU3, 22 }, /* SD2_CLK */ 5167 + [RCAR_GP_PIN(3, 11)] = { PU3, 21 }, /* SD1_DAT3 */ 5168 + [RCAR_GP_PIN(3, 10)] = { PU3, 20 }, /* SD1_DAT2 */ 5169 + [RCAR_GP_PIN(3, 9)] = { PU3, 19 }, /* SD1_DAT1 */ 5170 + [RCAR_GP_PIN(3, 8)] = { PU3, 18 }, /* SD1_DAT0 */ 5171 + [RCAR_GP_PIN(3, 7)] = { PU3, 17 }, /* SD1_CMD */ 5172 + [RCAR_GP_PIN(3, 6)] = { PU3, 16 }, /* SD1_CLK */ 5173 + [RCAR_GP_PIN(3, 5)] = { PU3, 15 }, /* SD0_DAT3 */ 5174 + [RCAR_GP_PIN(3, 4)] = { PU3, 14 }, /* SD0_DAT2 */ 5175 + [RCAR_GP_PIN(3, 3)] = { PU3, 13 }, /* SD0_DAT1 */ 5176 + [RCAR_GP_PIN(3, 2)] = { PU3, 12 }, /* SD0_DAT0 */ 5177 + [RCAR_GP_PIN(3, 1)] = { PU3, 11 }, /* SD0_CMD */ 5178 + [RCAR_GP_PIN(3, 0)] = { PU3, 10 }, /* SD0_CLK */ 5179 + 5180 + [RCAR_GP_PIN(5, 19)] = { PU4, 31 }, /* MSIOF0_SS1 */ 5181 + [RCAR_GP_PIN(5, 18)] = { PU4, 30 }, /* MSIOF0_SYNC */ 5182 + [RCAR_GP_PIN(5, 17)] = { PU4, 29 }, /* MSIOF0_SCK */ 5183 + [RCAR_GP_PIN(5, 16)] = { PU4, 28 }, /* HRTS0_N */ 5184 + [RCAR_GP_PIN(5, 15)] = { PU4, 27 }, /* HCTS0_N */ 5185 + [RCAR_GP_PIN(5, 14)] = { PU4, 26 }, /* HTX0 */ 5186 + [RCAR_GP_PIN(5, 13)] = { PU4, 25 }, /* HRX0 */ 5187 + [RCAR_GP_PIN(5, 12)] = { PU4, 24 }, /* HSCK0 */ 5188 + [RCAR_GP_PIN(5, 11)] = { PU4, 23 }, /* RX2_A */ 5189 + [RCAR_GP_PIN(5, 10)] = { PU4, 22 }, /* TX2_A */ 5190 + [RCAR_GP_PIN(5, 9)] = { PU4, 21 }, /* SCK2 */ 5191 + [RCAR_GP_PIN(5, 8)] = { PU4, 20 }, /* RTS1_N_TANS */ 5192 + [RCAR_GP_PIN(5, 7)] = { PU4, 19 }, /* CTS1_N */ 5193 + [RCAR_GP_PIN(5, 6)] = { PU4, 18 }, /* TX1_A */ 5194 + [RCAR_GP_PIN(5, 5)] = { PU4, 17 }, /* RX1_A */ 5195 + [RCAR_GP_PIN(5, 4)] = { PU4, 16 }, /* RTS0_N_TANS */ 5196 + [RCAR_GP_PIN(5, 3)] = { PU4, 15 }, /* CTS0_N */ 5197 + [RCAR_GP_PIN(5, 2)] = { PU4, 14 }, /* TX0 */ 5198 + [RCAR_GP_PIN(5, 1)] = { PU4, 13 }, /* RX0 */ 5199 + [RCAR_GP_PIN(5, 0)] = { PU4, 12 }, /* SCK0 */ 5200 + [RCAR_GP_PIN(3, 15)] = { PU4, 11 }, /* SD1_WP */ 5201 + [RCAR_GP_PIN(3, 14)] = { PU4, 10 }, /* SD1_CD */ 5202 + [RCAR_GP_PIN(3, 13)] = { PU4, 9 }, /* SD0_WP */ 5203 + [RCAR_GP_PIN(3, 12)] = { PU4, 8 }, /* SD0_CD */ 5204 + [RCAR_GP_PIN(4, 17)] = { PU4, 7 }, /* SD3_DS */ 5205 + [RCAR_GP_PIN(4, 16)] = { PU4, 6 }, /* SD3_DAT7 */ 5206 + [RCAR_GP_PIN(4, 15)] = { PU4, 5 }, /* SD3_DAT6 */ 5207 + [RCAR_GP_PIN(4, 14)] = { PU4, 4 }, /* SD3_DAT5 */ 5208 + [RCAR_GP_PIN(4, 13)] = { PU4, 3 }, /* SD3_DAT4 */ 5209 + [RCAR_GP_PIN(4, 12)] = { PU4, 2 }, /* SD3_DAT3 */ 5210 + [RCAR_GP_PIN(4, 11)] = { PU4, 1 }, /* SD3_DAT2 */ 5211 + [RCAR_GP_PIN(4, 10)] = { PU4, 0 }, /* SD3_DAT1 */ 5212 + 5213 + [RCAR_GP_PIN(6, 24)] = { PU5, 31 }, /* USB0_PWEN */ 5214 + [RCAR_GP_PIN(6, 23)] = { PU5, 30 }, /* AUDIO_CLKB_B */ 5215 + [RCAR_GP_PIN(6, 22)] = { PU5, 29 }, /* AUDIO_CLKA_A */ 5216 + [RCAR_GP_PIN(6, 21)] = { PU5, 28 }, /* SSI_SDATA9_A */ 5217 + [RCAR_GP_PIN(6, 20)] = { PU5, 27 }, /* SSI_SDATA8 */ 5218 + [RCAR_GP_PIN(6, 19)] = { PU5, 26 }, /* SSI_SDATA7 */ 5219 + [RCAR_GP_PIN(6, 18)] = { PU5, 25 }, /* SSI_WS78 */ 5220 + [RCAR_GP_PIN(6, 17)] = { PU5, 24 }, /* SSI_SCK78 */ 5221 + [RCAR_GP_PIN(6, 16)] = { PU5, 23 }, /* SSI_SDATA6 */ 5222 + [RCAR_GP_PIN(6, 15)] = { PU5, 22 }, /* SSI_WS6 */ 5223 + [RCAR_GP_PIN(6, 14)] = { PU5, 21 }, /* SSI_SCK6 */ 5224 + [RCAR_GP_PIN(6, 13)] = { PU5, 20 }, /* SSI_SDATA5 */ 5225 + [RCAR_GP_PIN(6, 12)] = { PU5, 19 }, /* SSI_WS5 */ 5226 + [RCAR_GP_PIN(6, 11)] = { PU5, 18 }, /* SSI_SCK5 */ 5227 + [RCAR_GP_PIN(6, 10)] = { PU5, 17 }, /* SSI_SDATA4 */ 5228 + [RCAR_GP_PIN(6, 9)] = { PU5, 16 }, /* SSI_WS4 */ 5229 + [RCAR_GP_PIN(6, 8)] = { PU5, 15 }, /* SSI_SCK4 */ 5230 + [RCAR_GP_PIN(6, 7)] = { PU5, 14 }, /* SSI_SDATA3 */ 5231 + [RCAR_GP_PIN(6, 6)] = { PU5, 13 }, /* SSI_WS34 */ 5232 + [RCAR_GP_PIN(6, 5)] = { PU5, 12 }, /* SSI_SCK34 */ 5233 + [RCAR_GP_PIN(6, 4)] = { PU5, 11 }, /* SSI_SDATA2_A */ 5234 + [RCAR_GP_PIN(6, 3)] = { PU5, 10 }, /* SSI_SDATA1_A */ 5235 + [RCAR_GP_PIN(6, 2)] = { PU5, 9 }, /* SSI_SDATA0 */ 5236 + [RCAR_GP_PIN(6, 1)] = { PU5, 8 }, /* SSI_WS01239 */ 5237 + [RCAR_GP_PIN(6, 0)] = { PU5, 7 }, /* SSI_SCK01239 */ 5238 + [RCAR_GP_PIN(5, 25)] = { PU5, 5 }, /* MLB_DAT */ 5239 + [RCAR_GP_PIN(5, 24)] = { PU5, 4 }, /* MLB_SIG */ 5240 + [RCAR_GP_PIN(5, 23)] = { PU5, 3 }, /* MLB_CLK */ 5241 + [RCAR_GP_PIN(5, 22)] = { PU5, 2 }, /* MSIOF0_RXD */ 5242 + [RCAR_GP_PIN(5, 21)] = { PU5, 1 }, /* MSIOF0_SS2 */ 5243 + [RCAR_GP_PIN(5, 20)] = { PU5, 0 }, /* MSIOF0_TXD */ 5244 + 5245 + [RCAR_GP_PIN(6, 31)] = { PU6, 6 }, /* USB31_OVC */ 5246 + [RCAR_GP_PIN(6, 30)] = { PU6, 5 }, /* USB31_PWEN */ 5247 + [RCAR_GP_PIN(6, 29)] = { PU6, 4 }, /* USB30_OVC */ 5248 + [RCAR_GP_PIN(6, 28)] = { PU6, 3 }, /* USB30_PWEN */ 5249 + [RCAR_GP_PIN(6, 27)] = { PU6, 2 }, /* USB1_OVC */ 5250 + [RCAR_GP_PIN(6, 26)] = { PU6, 1 }, /* USB1_PWEN */ 5251 + [RCAR_GP_PIN(6, 25)] = { PU6, 0 }, /* USB0_OVC */ 5252 + }; 5253 + 5254 + static unsigned int r8a7795_pinmux_get_bias(struct sh_pfc *pfc, 5255 + unsigned int pin) 5256 + { 5257 + u32 reg; 5258 + u32 bit; 5259 + 5260 + if (WARN_ON_ONCE(!pullups[pin].reg)) 5261 + return PIN_CONFIG_BIAS_DISABLE; 5262 + 5263 + reg = pullups[pin].reg; 5264 + bit = BIT(pullups[pin].bit); 5265 + 5266 + if (sh_pfc_read_reg(pfc, PUEN + reg, 32) & bit) { 5267 + if (sh_pfc_read_reg(pfc, PUD + reg, 32) & bit) 5268 + return PIN_CONFIG_BIAS_PULL_UP; 5269 + else 5270 + return PIN_CONFIG_BIAS_PULL_DOWN; 5271 + } else 5272 + return PIN_CONFIG_BIAS_DISABLE; 5273 + } 5274 + 5275 + static void r8a7795_pinmux_set_bias(struct sh_pfc *pfc, unsigned int pin, 5276 + unsigned int bias) 5277 + { 5278 + u32 enable, updown; 5279 + u32 reg; 5280 + u32 bit; 5281 + 5282 + if (WARN_ON_ONCE(!pullups[pin].reg)) 5283 + return; 5284 + 5285 + reg = pullups[pin].reg; 5286 + bit = BIT(pullups[pin].bit); 5287 + 5288 + enable = sh_pfc_read_reg(pfc, PUEN + reg, 32) & ~bit; 5289 + if (bias != PIN_CONFIG_BIAS_DISABLE) 5290 + enable |= bit; 5291 + 5292 + updown = sh_pfc_read_reg(pfc, PUD + reg, 32) & ~bit; 5293 + if (bias == PIN_CONFIG_BIAS_PULL_UP) 5294 + updown |= bit; 5295 + 5296 + sh_pfc_write_reg(pfc, PUD + reg, 32, updown); 5297 + sh_pfc_write_reg(pfc, PUEN + reg, 32, enable); 5298 + } 5299 + 5180 5300 static const struct sh_pfc_soc_operations r8a7795_pinmux_ops = { 5181 5301 .pin_to_pocctrl = r8a7795_pin_to_pocctrl, 5302 + .get_bias = r8a7795_pinmux_get_bias, 5303 + .set_bias = r8a7795_pinmux_set_bias, 5182 5304 }; 5183 5305 5184 5306 const struct sh_pfc_soc_info r8a7795_pinmux_info = {
+2671
drivers/pinctrl/sh-pfc/pfc-r8a7796.c
··· 1 + /* 2 + * R8A7796 processor support - PFC hardware block. 3 + * 4 + * Copyright (C) 2016 Renesas Electronics Corp. 5 + * 6 + * This file is based on the drivers/pinctrl/sh-pfc/pfc-r8a7795.c 7 + * 8 + * R-Car Gen3 processor support - PFC hardware block. 9 + * 10 + * Copyright (C) 2015 Renesas Electronics Corporation 11 + * 12 + * This program is free software; you can redistribute it and/or modify 13 + * it under the terms of the GNU General Public License as published by 14 + * the Free Software Foundation; version 2 of the License. 15 + */ 16 + 17 + #include <linux/kernel.h> 18 + 19 + #include "core.h" 20 + #include "sh_pfc.h" 21 + 22 + #define CPU_ALL_PORT(fn, sfx) \ 23 + PORT_GP_16(0, fn, sfx), \ 24 + PORT_GP_29(1, fn, sfx), \ 25 + PORT_GP_15(2, fn, sfx), \ 26 + PORT_GP_CFG_12(3, fn, sfx, SH_PFC_PIN_CFG_IO_VOLTAGE), \ 27 + PORT_GP_1(3, 12, fn, sfx), \ 28 + PORT_GP_1(3, 13, fn, sfx), \ 29 + PORT_GP_1(3, 14, fn, sfx), \ 30 + PORT_GP_1(3, 15, fn, sfx), \ 31 + PORT_GP_CFG_18(4, fn, sfx, SH_PFC_PIN_CFG_IO_VOLTAGE), \ 32 + PORT_GP_26(5, fn, sfx), \ 33 + PORT_GP_32(6, fn, sfx), \ 34 + PORT_GP_4(7, fn, sfx) 35 + /* 36 + * F_() : just information 37 + * FM() : macro for FN_xxx / xxx_MARK 38 + */ 39 + 40 + /* GPSR0 */ 41 + #define GPSR0_15 F_(D15, IP7_11_8) 42 + #define GPSR0_14 F_(D14, IP7_7_4) 43 + #define GPSR0_13 F_(D13, IP7_3_0) 44 + #define GPSR0_12 F_(D12, IP6_31_28) 45 + #define GPSR0_11 F_(D11, IP6_27_24) 46 + #define GPSR0_10 F_(D10, IP6_23_20) 47 + #define GPSR0_9 F_(D9, IP6_19_16) 48 + #define GPSR0_8 F_(D8, IP6_15_12) 49 + #define GPSR0_7 F_(D7, IP6_11_8) 50 + #define GPSR0_6 F_(D6, IP6_7_4) 51 + #define GPSR0_5 F_(D5, IP6_3_0) 52 + #define GPSR0_4 F_(D4, IP5_31_28) 53 + #define GPSR0_3 F_(D3, IP5_27_24) 54 + #define GPSR0_2 F_(D2, IP5_23_20) 55 + #define GPSR0_1 F_(D1, IP5_19_16) 56 + #define GPSR0_0 F_(D0, IP5_15_12) 57 + 58 + /* GPSR1 */ 59 + #define GPSR1_28 FM(CLKOUT) 60 + #define GPSR1_27 F_(EX_WAIT0_A, IP5_11_8) 61 + #define GPSR1_26 F_(WE1_N, IP5_7_4) 62 + #define GPSR1_25 F_(WE0_N, IP5_3_0) 63 + #define GPSR1_24 F_(RD_WR_N, IP4_31_28) 64 + #define GPSR1_23 F_(RD_N, IP4_27_24) 65 + #define GPSR1_22 F_(BS_N, IP4_23_20) 66 + #define GPSR1_21 F_(CS1_N_A26, IP4_19_16) 67 + #define GPSR1_20 F_(CS0_N, IP4_15_12) 68 + #define GPSR1_19 F_(A19, IP4_11_8) 69 + #define GPSR1_18 F_(A18, IP4_7_4) 70 + #define GPSR1_17 F_(A17, IP4_3_0) 71 + #define GPSR1_16 F_(A16, IP3_31_28) 72 + #define GPSR1_15 F_(A15, IP3_27_24) 73 + #define GPSR1_14 F_(A14, IP3_23_20) 74 + #define GPSR1_13 F_(A13, IP3_19_16) 75 + #define GPSR1_12 F_(A12, IP3_15_12) 76 + #define GPSR1_11 F_(A11, IP3_11_8) 77 + #define GPSR1_10 F_(A10, IP3_7_4) 78 + #define GPSR1_9 F_(A9, IP3_3_0) 79 + #define GPSR1_8 F_(A8, IP2_31_28) 80 + #define GPSR1_7 F_(A7, IP2_27_24) 81 + #define GPSR1_6 F_(A6, IP2_23_20) 82 + #define GPSR1_5 F_(A5, IP2_19_16) 83 + #define GPSR1_4 F_(A4, IP2_15_12) 84 + #define GPSR1_3 F_(A3, IP2_11_8) 85 + #define GPSR1_2 F_(A2, IP2_7_4) 86 + #define GPSR1_1 F_(A1, IP2_3_0) 87 + #define GPSR1_0 F_(A0, IP1_31_28) 88 + 89 + /* GPSR2 */ 90 + #define GPSR2_14 F_(AVB_AVTP_CAPTURE_A, IP0_23_20) 91 + #define GPSR2_13 F_(AVB_AVTP_MATCH_A, IP0_19_16) 92 + #define GPSR2_12 F_(AVB_LINK, IP0_15_12) 93 + #define GPSR2_11 F_(AVB_PHY_INT, IP0_11_8) 94 + #define GPSR2_10 F_(AVB_MAGIC, IP0_7_4) 95 + #define GPSR2_9 F_(AVB_MDC, IP0_3_0) 96 + #define GPSR2_8 F_(PWM2_A, IP1_27_24) 97 + #define GPSR2_7 F_(PWM1_A, IP1_23_20) 98 + #define GPSR2_6 F_(PWM0, IP1_19_16) 99 + #define GPSR2_5 F_(IRQ5, IP1_15_12) 100 + #define GPSR2_4 F_(IRQ4, IP1_11_8) 101 + #define GPSR2_3 F_(IRQ3, IP1_7_4) 102 + #define GPSR2_2 F_(IRQ2, IP1_3_0) 103 + #define GPSR2_1 F_(IRQ1, IP0_31_28) 104 + #define GPSR2_0 F_(IRQ0, IP0_27_24) 105 + 106 + /* GPSR3 */ 107 + #define GPSR3_15 F_(SD1_WP, IP11_23_20) 108 + #define GPSR3_14 F_(SD1_CD, IP11_19_16) 109 + #define GPSR3_13 F_(SD0_WP, IP11_15_12) 110 + #define GPSR3_12 F_(SD0_CD, IP11_11_8) 111 + #define GPSR3_11 F_(SD1_DAT3, IP8_31_28) 112 + #define GPSR3_10 F_(SD1_DAT2, IP8_27_24) 113 + #define GPSR3_9 F_(SD1_DAT1, IP8_23_20) 114 + #define GPSR3_8 F_(SD1_DAT0, IP8_19_16) 115 + #define GPSR3_7 F_(SD1_CMD, IP8_15_12) 116 + #define GPSR3_6 F_(SD1_CLK, IP8_11_8) 117 + #define GPSR3_5 F_(SD0_DAT3, IP8_7_4) 118 + #define GPSR3_4 F_(SD0_DAT2, IP8_3_0) 119 + #define GPSR3_3 F_(SD0_DAT1, IP7_31_28) 120 + #define GPSR3_2 F_(SD0_DAT0, IP7_27_24) 121 + #define GPSR3_1 F_(SD0_CMD, IP7_23_20) 122 + #define GPSR3_0 F_(SD0_CLK, IP7_19_16) 123 + 124 + /* GPSR4 */ 125 + #define GPSR4_17 F_(SD3_DS, IP11_11_8) 126 + #define GPSR4_16 F_(SD3_DAT7, IP10_7_4) 127 + #define GPSR4_15 F_(SD3_DAT6, IP10_3_0) 128 + #define GPSR4_14 F_(SD3_DAT5, IP9_31_28) 129 + #define GPSR4_13 F_(SD3_DAT4, IP9_27_24) 130 + #define GPSR4_12 F_(SD3_DAT3, IP10_19_16) 131 + #define GPSR4_11 F_(SD3_DAT2, IP10_15_12) 132 + #define GPSR4_10 F_(SD3_DAT1, IP10_11_8) 133 + #define GPSR4_9 F_(SD3_DAT0, IP10_7_4) 134 + #define GPSR4_8 F_(SD3_CMD, IP10_3_0) 135 + #define GPSR4_7 F_(SD3_CLK, IP9_31_28) 136 + #define GPSR4_6 F_(SD2_DS, IP9_23_20) 137 + #define GPSR4_5 F_(SD2_DAT3, IP9_19_16) 138 + #define GPSR4_4 F_(SD2_DAT2, IP9_15_12) 139 + #define GPSR4_3 F_(SD2_DAT1, IP9_11_8) 140 + #define GPSR4_2 F_(SD2_DAT0, IP9_7_4) 141 + #define GPSR4_1 F_(SD2_CMD, IP9_7_4) 142 + #define GPSR4_0 F_(SD2_CLK, IP9_3_0) 143 + 144 + /* GPSR5 */ 145 + #define GPSR5_25 F_(MLB_DAT, IP14_19_16) 146 + #define GPSR5_24 F_(MLB_SIG, IP14_15_12) 147 + #define GPSR5_23 F_(MLB_CLK, IP14_11_8) 148 + #define GPSR5_22 FM(MSIOF0_RXD) 149 + #define GPSR5_21 F_(MSIOF0_SS2, IP14_7_4) 150 + #define GPSR5_20 FM(MSIOF0_TXD) 151 + #define GPSR5_19 F_(MSIOF0_SS1, IP14_3_0) 152 + #define GPSR5_18 F_(MSIOF0_SYNC, IP13_31_28) 153 + #define GPSR5_17 FM(MSIOF0_SCK) 154 + #define GPSR5_16 F_(HRTS0_N, IP13_27_24) 155 + #define GPSR5_15 F_(HCTS0_N, IP13_23_20) 156 + #define GPSR5_14 F_(HTX0, IP13_19_16) 157 + #define GPSR5_13 F_(HRX0, IP13_15_12) 158 + #define GPSR5_12 F_(HSCK0, IP13_11_8) 159 + #define GPSR5_11 F_(RX2_A, IP13_7_4) 160 + #define GPSR5_10 F_(TX2_A, IP13_3_0) 161 + #define GPSR5_9 F_(SCK2, IP12_31_28) 162 + #define GPSR5_8 F_(RTS1_N_TANS, IP12_27_24) 163 + #define GPSR5_7 F_(CTS1_N, IP12_23_20) 164 + #define GPSR5_6 F_(TX1_A, IP12_19_16) 165 + #define GPSR5_5 F_(RX1_A, IP12_15_12) 166 + #define GPSR5_4 F_(RTS0_N_TANS, IP12_11_8) 167 + #define GPSR5_3 F_(CTS0_N, IP12_7_4) 168 + #define GPSR5_2 F_(TX0, IP12_3_0) 169 + #define GPSR5_1 F_(RX0, IP11_31_28) 170 + #define GPSR5_0 F_(SCK0, IP11_27_24) 171 + 172 + /* GPSR6 */ 173 + #define GPSR6_31 F_(GP6_31, IP18_7_4) 174 + #define GPSR6_30 F_(GP6_30, IP18_3_0) 175 + #define GPSR6_29 F_(USB30_OVC, IP17_31_28) 176 + #define GPSR6_28 F_(USB30_PWEN, IP17_27_24) 177 + #define GPSR6_27 F_(USB1_OVC, IP17_23_20) 178 + #define GPSR6_26 F_(USB1_PWEN, IP17_19_16) 179 + #define GPSR6_25 F_(USB0_OVC, IP17_15_12) 180 + #define GPSR6_24 F_(USB0_PWEN, IP17_11_8) 181 + #define GPSR6_23 F_(AUDIO_CLKB_B, IP17_7_4) 182 + #define GPSR6_22 F_(AUDIO_CLKA_A, IP17_3_0) 183 + #define GPSR6_21 F_(SSI_SDATA9_A, IP16_31_28) 184 + #define GPSR6_20 F_(SSI_SDATA8, IP16_27_24) 185 + #define GPSR6_19 F_(SSI_SDATA7, IP16_23_20) 186 + #define GPSR6_18 F_(SSI_WS78, IP16_19_16) 187 + #define GPSR6_17 F_(SSI_SCK78, IP16_15_12) 188 + #define GPSR6_16 F_(SSI_SDATA6, IP16_11_8) 189 + #define GPSR6_15 F_(SSI_WS6, IP16_7_4) 190 + #define GPSR6_14 F_(SSI_SCK6, IP16_3_0) 191 + #define GPSR6_13 FM(SSI_SDATA5) 192 + #define GPSR6_12 FM(SSI_WS5) 193 + #define GPSR6_11 FM(SSI_SCK5) 194 + #define GPSR6_10 F_(SSI_SDATA4, IP15_31_28) 195 + #define GPSR6_9 F_(SSI_WS4, IP15_27_24) 196 + #define GPSR6_8 F_(SSI_SCK4, IP15_23_20) 197 + #define GPSR6_7 F_(SSI_SDATA3, IP15_19_16) 198 + #define GPSR6_6 F_(SSI_WS34, IP15_15_12) 199 + #define GPSR6_5 F_(SSI_SCK34, IP15_11_8) 200 + #define GPSR6_4 F_(SSI_SDATA2_A, IP15_7_4) 201 + #define GPSR6_3 F_(SSI_SDATA1_A, IP15_3_0) 202 + #define GPSR6_2 F_(SSI_SDATA0, IP14_31_28) 203 + #define GPSR6_1 F_(SSI_WS0129, IP14_27_24) 204 + #define GPSR6_0 F_(SSI_SCK0129, IP14_23_20) 205 + 206 + /* GPSR7 */ 207 + #define GPSR7_3 FM(GP7_03) 208 + #define GPSR7_2 FM(HDMI0_CEC) 209 + #define GPSR7_1 FM(AVS2) 210 + #define GPSR7_0 FM(AVS1) 211 + 212 + 213 + /* IPSRx */ /* 0 */ /* 1 */ /* 2 */ /* 3 */ /* 4 */ /* 5 */ /* 6 */ /* 7 */ /* 8 */ /* 9 */ /* A */ /* B */ /* C - F */ 214 + #define IP0_3_0 FM(AVB_MDC) F_(0, 0) FM(MSIOF2_SS2_C) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 215 + #define IP0_7_4 FM(AVB_MAGIC) F_(0, 0) FM(MSIOF2_SS1_C) FM(SCK4_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 216 + #define IP0_11_8 FM(AVB_PHY_INT) F_(0, 0) FM(MSIOF2_SYNC_C) FM(RX4_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 217 + #define IP0_15_12 FM(AVB_LINK) F_(0, 0) FM(MSIOF2_SCK_C) FM(TX4_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 218 + #define IP0_19_16 FM(AVB_AVTP_MATCH_A) F_(0, 0) FM(MSIOF2_RXD_C) FM(CTS4_N_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 219 + #define IP0_23_20 FM(AVB_AVTP_CAPTURE_A) F_(0, 0) FM(MSIOF2_TXD_C) FM(RTS4_N_TANS_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 220 + #define IP0_27_24 FM(IRQ0) FM(QPOLB) F_(0, 0) FM(DU_CDE) FM(VI4_DATA0_B) FM(CAN0_TX_B) FM(CANFD0_TX_B) FM(MSIOF3_SS1_E) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 221 + #define IP0_31_28 FM(IRQ1) FM(QPOLA) F_(0, 0) FM(DU_DISP) FM(VI4_DATA1_B) FM(CAN0_RX_B) FM(CANFD0_RX_B) FM(MSIOF3_SS2_E) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 222 + #define IP1_3_0 FM(IRQ2) FM(QCPV_QDE) F_(0, 0) FM(DU_EXODDF_DU_ODDF_DISP_CDE) FM(VI4_DATA2_B) F_(0, 0) F_(0, 0) FM(MSIOF3_SYNC_E) F_(0, 0) FM(PWM3_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 223 + #define IP1_7_4 FM(IRQ3) FM(QSTVB_QVE) FM(A25) FM(DU_DOTCLKOUT1) FM(VI4_DATA3_B) F_(0, 0) F_(0, 0) FM(MSIOF3_SCK_E) F_(0, 0) FM(PWM4_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 224 + #define IP1_11_8 FM(IRQ4) FM(QSTH_QHS) FM(A24) FM(DU_EXHSYNC_DU_HSYNC) FM(VI4_DATA4_B) F_(0, 0) F_(0, 0) FM(MSIOF3_RXD_E) F_(0, 0) FM(PWM5_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 225 + #define IP1_15_12 FM(IRQ5) FM(QSTB_QHE) FM(A23) FM(DU_EXVSYNC_DU_VSYNC) FM(VI4_DATA5_B) F_(0, 0) F_(0, 0) FM(MSIOF3_TXD_E) F_(0, 0) FM(PWM6_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 226 + #define IP1_19_16 FM(PWM0) FM(AVB_AVTP_PPS)FM(A22) F_(0, 0) FM(VI4_DATA6_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) FM(IECLK_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 227 + #define IP1_23_20 FM(PWM1_A) F_(0, 0) FM(A21) FM(HRX3_D) FM(VI4_DATA7_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) FM(IERX_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 228 + #define IP1_27_24 FM(PWM2_A) F_(0, 0) FM(A20) FM(HTX3_D) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) FM(IETX_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 229 + #define IP1_31_28 FM(A0) FM(LCDOUT16) FM(MSIOF3_SYNC_B) F_(0, 0) FM(VI4_DATA8) F_(0, 0) FM(DU_DB0) F_(0, 0) F_(0, 0) FM(PWM3_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 230 + #define IP2_3_0 FM(A1) FM(LCDOUT17) FM(MSIOF3_TXD_B) F_(0, 0) FM(VI4_DATA9) F_(0, 0) FM(DU_DB1) F_(0, 0) F_(0, 0) FM(PWM4_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 231 + #define IP2_7_4 FM(A2) FM(LCDOUT18) FM(MSIOF3_SCK_B) F_(0, 0) FM(VI4_DATA10) F_(0, 0) FM(DU_DB2) F_(0, 0) F_(0, 0) FM(PWM5_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 232 + #define IP2_11_8 FM(A3) FM(LCDOUT19) FM(MSIOF3_RXD_B) F_(0, 0) FM(VI4_DATA11) F_(0, 0) FM(DU_DB3) F_(0, 0) F_(0, 0) FM(PWM6_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 233 + #define IP2_15_12 FM(A4) FM(LCDOUT20) FM(MSIOF3_SS1_B) F_(0, 0) FM(VI4_DATA12) FM(VI5_DATA12) FM(DU_DB4) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 234 + #define IP2_19_16 FM(A5) FM(LCDOUT21) FM(MSIOF3_SS2_B) FM(SCK4_B) FM(VI4_DATA13) FM(VI5_DATA13) FM(DU_DB5) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 235 + #define IP2_23_20 FM(A6) FM(LCDOUT22) FM(MSIOF2_SS1_A) FM(RX4_B) FM(VI4_DATA14) FM(VI5_DATA14) FM(DU_DB6) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 236 + #define IP2_27_24 FM(A7) FM(LCDOUT23) FM(MSIOF2_SS2_A) FM(TX4_B) FM(VI4_DATA15) FM(VI5_DATA15) FM(DU_DB7) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 237 + #define IP2_31_28 FM(A8) FM(RX3_B) FM(MSIOF2_SYNC_A) FM(HRX4_B) F_(0, 0) F_(0, 0) F_(0, 0) FM(SDA6_A) FM(AVB_AVTP_MATCH_B) FM(PWM1_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 238 + #define IP3_3_0 FM(A9) F_(0, 0) FM(MSIOF2_SCK_A) FM(CTS4_N_B) F_(0, 0) FM(VI5_VSYNC_N) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 239 + #define IP3_7_4 FM(A10) F_(0, 0) FM(MSIOF2_RXD_A) FM(RTS4_N_TANS_B) F_(0, 0) FM(VI5_HSYNC_N) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 240 + #define IP3_11_8 FM(A11) FM(TX3_B) FM(MSIOF2_TXD_A) FM(HTX4_B) FM(HSCK4) FM(VI5_FIELD) F_(0, 0) FM(SCL6_A) FM(AVB_AVTP_CAPTURE_B) FM(PWM2_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 241 + 242 + /* IPSRx */ /* 0 */ /* 1 */ /* 2 */ /* 3 */ /* 4 */ /* 5 */ /* 6 */ /* 7 */ /* 8 */ /* 9 */ /* A */ /* B */ /* C - F */ 243 + #define IP3_15_12 FM(A12) FM(LCDOUT12) FM(MSIOF3_SCK_C) F_(0, 0) FM(HRX4_A) FM(VI5_DATA8) FM(DU_DG4) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 244 + #define IP3_19_16 FM(A13) FM(LCDOUT13) FM(MSIOF3_SYNC_C) F_(0, 0) FM(HTX4_A) FM(VI5_DATA9) FM(DU_DG5) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 245 + #define IP3_23_20 FM(A14) FM(LCDOUT14) FM(MSIOF3_RXD_C) F_(0, 0) FM(HCTS4_N) FM(VI5_DATA10) FM(DU_DG6) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 246 + #define IP3_27_24 FM(A15) FM(LCDOUT15) FM(MSIOF3_TXD_C) F_(0, 0) FM(HRTS4_N) FM(VI5_DATA11) FM(DU_DG7) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 247 + #define IP3_31_28 FM(A16) FM(LCDOUT8) F_(0, 0) F_(0, 0) FM(VI4_FIELD) F_(0, 0) FM(DU_DG0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 248 + #define IP4_3_0 FM(A17) FM(LCDOUT9) F_(0, 0) F_(0, 0) FM(VI4_VSYNC_N) F_(0, 0) FM(DU_DG1) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 249 + #define IP4_7_4 FM(A18) FM(LCDOUT10) F_(0, 0) F_(0, 0) FM(VI4_HSYNC_N) F_(0, 0) FM(DU_DG2) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 250 + #define IP4_11_8 FM(A19) FM(LCDOUT11) F_(0, 0) F_(0, 0) FM(VI4_CLKENB) F_(0, 0) FM(DU_DG3) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 251 + #define IP4_15_12 FM(CS0_N) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) FM(VI5_CLKENB) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 252 + #define IP4_19_16 FM(CS1_N_A26) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) FM(VI5_CLK) F_(0, 0) FM(EX_WAIT0_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 253 + #define IP4_23_20 FM(BS_N) FM(QSTVA_QVS) FM(MSIOF3_SCK_D) FM(SCK3) FM(HSCK3) F_(0, 0) F_(0, 0) F_(0, 0) FM(CAN1_TX) FM(CANFD1_TX) FM(IETX_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 254 + #define IP4_27_24 FM(RD_N) F_(0, 0) FM(MSIOF3_SYNC_D) FM(RX3_A) FM(HRX3_A) F_(0, 0) F_(0, 0) F_(0, 0) FM(CAN0_TX_A) FM(CANFD0_TX_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 255 + #define IP4_31_28 FM(RD_WR_N) F_(0, 0) FM(MSIOF3_RXD_D) FM(TX3_A) FM(HTX3_A) F_(0, 0) F_(0, 0) F_(0, 0) FM(CAN0_RX_A) FM(CANFD0_RX_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 256 + #define IP5_3_0 FM(WE0_N) F_(0, 0) FM(MSIOF3_TXD_D) FM(CTS3_N) FM(HCTS3_N) F_(0, 0) F_(0, 0) FM(SCL6_B) FM(CAN_CLK) F_(0, 0) FM(IECLK_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 257 + #define IP5_7_4 FM(WE1_N) F_(0, 0) FM(MSIOF3_SS1_D) FM(RTS3_N_TANS) FM(HRTS3_N) F_(0, 0) F_(0, 0) FM(SDA6_B) FM(CAN1_RX) FM(CANFD1_RX) FM(IERX_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 258 + #define IP5_11_8 FM(EX_WAIT0_A) FM(QCLK) F_(0, 0) F_(0, 0) FM(VI4_CLK) F_(0, 0) FM(DU_DOTCLKOUT0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 259 + #define IP5_15_12 FM(D0) FM(MSIOF2_SS1_B)FM(MSIOF3_SCK_A) F_(0, 0) FM(VI4_DATA16) FM(VI5_DATA0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 260 + #define IP5_19_16 FM(D1) FM(MSIOF2_SS2_B)FM(MSIOF3_SYNC_A) F_(0, 0) FM(VI4_DATA17) FM(VI5_DATA1) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 261 + #define IP5_23_20 FM(D2) F_(0, 0) FM(MSIOF3_RXD_A) F_(0, 0) FM(VI4_DATA18) FM(VI5_DATA2) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 262 + #define IP5_27_24 FM(D3) F_(0, 0) FM(MSIOF3_TXD_A) F_(0, 0) FM(VI4_DATA19) FM(VI5_DATA3) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 263 + #define IP5_31_28 FM(D4) FM(MSIOF2_SCK_B)F_(0, 0) F_(0, 0) FM(VI4_DATA20) FM(VI5_DATA4) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 264 + #define IP6_3_0 FM(D5) FM(MSIOF2_SYNC_B)F_(0, 0) F_(0, 0) FM(VI4_DATA21) FM(VI5_DATA5) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 265 + #define IP6_7_4 FM(D6) FM(MSIOF2_RXD_B)F_(0, 0) F_(0, 0) FM(VI4_DATA22) FM(VI5_DATA6) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 266 + #define IP6_11_8 FM(D7) FM(MSIOF2_TXD_B)F_(0, 0) F_(0, 0) FM(VI4_DATA23) FM(VI5_DATA7) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 267 + #define IP6_15_12 FM(D8) FM(LCDOUT0) FM(MSIOF2_SCK_D) FM(SCK4_C) FM(VI4_DATA0_A) F_(0, 0) FM(DU_DR0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 268 + #define IP6_19_16 FM(D9) FM(LCDOUT1) FM(MSIOF2_SYNC_D) F_(0, 0) FM(VI4_DATA1_A) F_(0, 0) FM(DU_DR1) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 269 + #define IP6_23_20 FM(D10) FM(LCDOUT2) FM(MSIOF2_RXD_D) FM(HRX3_B) FM(VI4_DATA2_A) FM(CTS4_N_C) FM(DU_DR2) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 270 + #define IP6_27_24 FM(D11) FM(LCDOUT3) FM(MSIOF2_TXD_D) FM(HTX3_B) FM(VI4_DATA3_A) FM(RTS4_N_TANS_C)FM(DU_DR3) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 271 + #define IP6_31_28 FM(D12) FM(LCDOUT4) FM(MSIOF2_SS1_D) FM(RX4_C) FM(VI4_DATA4_A) F_(0, 0) FM(DU_DR4) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 272 + 273 + /* IPSRx */ /* 0 */ /* 1 */ /* 2 */ /* 3 */ /* 4 */ /* 5 */ /* 6 */ /* 7 */ /* 8 */ /* 9 */ /* A */ /* B */ /* C - F */ 274 + #define IP7_3_0 FM(D13) FM(LCDOUT5) FM(MSIOF2_SS2_D) FM(TX4_C) FM(VI4_DATA5_A) F_(0, 0) FM(DU_DR5) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 275 + #define IP7_7_4 FM(D14) FM(LCDOUT6) FM(MSIOF3_SS1_A) FM(HRX3_C) FM(VI4_DATA6_A) F_(0, 0) FM(DU_DR6) FM(SCL6_C) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 276 + #define IP7_11_8 FM(D15) FM(LCDOUT7) FM(MSIOF3_SS2_A) FM(HTX3_C) FM(VI4_DATA7_A) F_(0, 0) FM(DU_DR7) FM(SDA6_C) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 277 + #define IP7_15_12 FM(FSCLKST) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 278 + #define IP7_19_16 FM(SD0_CLK) F_(0, 0) FM(MSIOF1_SCK_E) F_(0, 0) F_(0, 0) F_(0, 0) FM(STP_OPWM_0_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 279 + #define IP7_23_20 FM(SD0_CMD) F_(0, 0) FM(MSIOF1_SYNC_E) F_(0, 0) F_(0, 0) F_(0, 0) FM(STP_IVCXO27_0_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 280 + #define IP7_27_24 FM(SD0_DAT0) F_(0, 0) FM(MSIOF1_RXD_E) F_(0, 0) F_(0, 0) FM(TS_SCK0_B) FM(STP_ISCLK_0_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 281 + #define IP7_31_28 FM(SD0_DAT1) F_(0, 0) FM(MSIOF1_TXD_E) F_(0, 0) F_(0, 0) FM(TS_SPSYNC0_B)FM(STP_ISSYNC_0_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 282 + #define IP8_3_0 FM(SD0_DAT2) F_(0, 0) FM(MSIOF1_SS1_E) F_(0, 0) F_(0, 0) FM(TS_SDAT0_B) FM(STP_ISD_0_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 283 + #define IP8_7_4 FM(SD0_DAT3) F_(0, 0) FM(MSIOF1_SS2_E) F_(0, 0) F_(0, 0) FM(TS_SDEN0_B) FM(STP_ISEN_0_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 284 + #define IP8_11_8 FM(SD1_CLK) F_(0, 0) FM(MSIOF1_SCK_G) F_(0, 0) F_(0, 0) FM(SIM0_CLK_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 285 + #define IP8_15_12 FM(SD1_CMD) F_(0, 0) FM(MSIOF1_SYNC_G) FM(NFCE_N_B) F_(0, 0) FM(SIM0_D_A) FM(STP_IVCXO27_1_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 286 + #define IP8_19_16 FM(SD1_DAT0) FM(SD2_DAT4) FM(MSIOF1_RXD_G) FM(NFWP_N_B) F_(0, 0) FM(TS_SCK1_B) FM(STP_ISCLK_1_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 287 + #define IP8_23_20 FM(SD1_DAT1) FM(SD2_DAT5) FM(MSIOF1_TXD_G) FM(NFDATA14_B) F_(0, 0) FM(TS_SPSYNC1_B)FM(STP_ISSYNC_1_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 288 + #define IP8_27_24 FM(SD1_DAT2) FM(SD2_DAT6) FM(MSIOF1_SS1_G) FM(NFDATA15_B) F_(0, 0) FM(TS_SDAT1_B) FM(STP_ISD_1_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 289 + #define IP8_31_28 FM(SD1_DAT3) FM(SD2_DAT7) FM(MSIOF1_SS2_G) FM(NFRB_N_B) F_(0, 0) FM(TS_SDEN1_B) FM(STP_ISEN_1_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 290 + #define IP9_3_0 FM(SD2_CLK) F_(0, 0) F_(0, 0) FM(NFDATA8) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 291 + #define IP9_7_4 FM(SD2_CMD) F_(0, 0) F_(0, 0) FM(NFDATA9) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 292 + #define IP9_11_8 FM(SD2_DAT0) F_(0, 0) F_(0, 0) FM(NFDATA10) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 293 + #define IP9_15_12 FM(SD2_DAT1) F_(0, 0) F_(0, 0) FM(NFDATA11) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 294 + #define IP9_19_16 FM(SD2_DAT2) F_(0, 0) F_(0, 0) FM(NFDATA12) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 295 + #define IP9_23_20 FM(SD2_DAT3) F_(0, 0) F_(0, 0) FM(NFDATA13) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 296 + #define IP9_27_24 FM(SD2_DS) F_(0, 0) F_(0, 0) FM(NFALE) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) FM(SATA_DEVSLP_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 297 + #define IP9_31_28 FM(SD3_CLK) F_(0, 0) F_(0, 0) FM(NFWE_N) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 298 + #define IP10_3_0 FM(SD3_CMD) F_(0, 0) F_(0, 0) FM(NFRE_N) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 299 + #define IP10_7_4 FM(SD3_DAT0) F_(0, 0) F_(0, 0) FM(NFDATA0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 300 + #define IP10_11_8 FM(SD3_DAT1) F_(0, 0) F_(0, 0) FM(NFDATA1) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 301 + #define IP10_15_12 FM(SD3_DAT2) F_(0, 0) F_(0, 0) FM(NFDATA2) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 302 + #define IP10_19_16 FM(SD3_DAT3) F_(0, 0) F_(0, 0) FM(NFDATA3) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 303 + #define IP10_23_20 FM(SD3_DAT4) FM(SD2_CD_A) F_(0, 0) FM(NFDATA4) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 304 + #define IP10_27_24 FM(SD3_DAT5) FM(SD2_WP_A) F_(0, 0) FM(NFDATA5) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 305 + #define IP10_31_28 FM(SD3_DAT6) FM(SD3_CD) F_(0, 0) FM(NFDATA6) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 306 + #define IP11_3_0 FM(SD3_DAT7) FM(SD3_WP) F_(0, 0) FM(NFDATA7) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 307 + #define IP11_7_4 FM(SD3_DS) F_(0, 0) F_(0, 0) FM(NFCLE) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 308 + #define IP11_11_8 FM(SD0_CD) F_(0, 0) FM(NFDATA14_A) F_(0, 0) FM(SCL2_B) FM(SIM0_RST_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 309 + 310 + /* IPSRx */ /* 0 */ /* 1 */ /* 2 */ /* 3 */ /* 4 */ /* 5 */ /* 6 */ /* 7 */ /* 8 */ /* 9 */ /* A */ /* B */ /* C - F */ 311 + #define IP11_15_12 FM(SD0_WP) F_(0, 0) FM(NFDATA15_A) F_(0, 0) FM(SDA2_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 312 + #define IP11_19_16 FM(SD1_CD) F_(0, 0) FM(NFRB_N_A) F_(0, 0) F_(0, 0) FM(SIM0_CLK_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 313 + #define IP11_23_20 FM(SD1_WP) F_(0, 0) FM(NFCE_N_A) F_(0, 0) F_(0, 0) FM(SIM0_D_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 314 + #define IP11_27_24 FM(SCK0) FM(HSCK1_B) FM(MSIOF1_SS2_B) FM(AUDIO_CLKC_B) FM(SDA2_A) FM(SIM0_RST_B) FM(STP_OPWM_0_C) FM(RIF0_CLK_B) F_(0, 0) FM(ADICHS2) FM(SCK5_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 315 + #define IP11_31_28 FM(RX0) FM(HRX1_B) F_(0, 0) F_(0, 0) F_(0, 0) FM(TS_SCK0_C) FM(STP_ISCLK_0_C) FM(RIF0_D0_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 316 + #define IP12_3_0 FM(TX0) FM(HTX1_B) F_(0, 0) F_(0, 0) F_(0, 0) FM(TS_SPSYNC0_C)FM(STP_ISSYNC_0_C) FM(RIF0_D1_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 317 + #define IP12_7_4 FM(CTS0_N) FM(HCTS1_N_B) FM(MSIOF1_SYNC_B) F_(0, 0) F_(0, 0) FM(TS_SPSYNC1_C)FM(STP_ISSYNC_1_C) FM(RIF1_SYNC_B) FM(AUDIO_CLKOUT_C) FM(ADICS_SAMP) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 318 + #define IP12_11_8 FM(RTS0_N_TANS) FM(HRTS1_N_B) FM(MSIOF1_SS1_B) FM(AUDIO_CLKA_B) FM(SCL2_A) F_(0, 0) FM(STP_IVCXO27_1_C) FM(RIF0_SYNC_B) FM(FSO_TOE_A) FM(ADICHS1) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 319 + #define IP12_15_12 FM(RX1_A) FM(HRX1_A) F_(0, 0) F_(0, 0) F_(0, 0) FM(TS_SDAT0_C) FM(STP_ISD_0_C) FM(RIF1_CLK_C) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 320 + #define IP12_19_16 FM(TX1_A) FM(HTX1_A) F_(0, 0) F_(0, 0) F_(0, 0) FM(TS_SDEN0_C) FM(STP_ISEN_0_C) FM(RIF1_D0_C) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 321 + #define IP12_23_20 FM(CTS1_N) FM(HCTS1_N_A) FM(MSIOF1_RXD_B) F_(0, 0) F_(0, 0) FM(TS_SDEN1_C) FM(STP_ISEN_1_C) FM(RIF1_D0_B) F_(0, 0) FM(ADIDATA) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 322 + #define IP12_27_24 FM(RTS1_N_TANS) FM(HRTS1_N_A) FM(MSIOF1_TXD_B) F_(0, 0) F_(0, 0) FM(TS_SDAT1_C) FM(STP_ISD_1_C) FM(RIF1_D1_B) F_(0, 0) FM(ADICHS0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 323 + #define IP12_31_28 FM(SCK2) FM(SCIF_CLK_B) FM(MSIOF1_SCK_B) F_(0, 0) F_(0, 0) FM(TS_SCK1_C) FM(STP_ISCLK_1_C) FM(RIF1_CLK_B) F_(0, 0) FM(ADICLK) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 324 + #define IP13_3_0 FM(TX2_A) F_(0, 0) F_(0, 0) FM(SD2_CD_B) FM(SCL1_A) F_(0, 0) FM(FMCLK_A) FM(RIF1_D1_C) F_(0, 0) FM(FSO_CFE_0_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 325 + #define IP13_7_4 FM(RX2_A) F_(0, 0) F_(0, 0) FM(SD2_WP_B) FM(SDA1_A) F_(0, 0) FM(FMIN_A) FM(RIF1_SYNC_C) F_(0, 0) FM(FSO_CFE_1_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 326 + #define IP13_11_8 FM(HSCK0) F_(0, 0) FM(MSIOF1_SCK_D) FM(AUDIO_CLKB_A) FM(SSI_SDATA1_B)FM(TS_SCK0_D) FM(STP_ISCLK_0_D) FM(RIF0_CLK_C) F_(0, 0) F_(0, 0) FM(RX5_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 327 + #define IP13_15_12 FM(HRX0) F_(0, 0) FM(MSIOF1_RXD_D) F_(0, 0) FM(SSI_SDATA2_B)FM(TS_SDEN0_D) FM(STP_ISEN_0_D) FM(RIF0_D0_C) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 328 + #define IP13_19_16 FM(HTX0) F_(0, 0) FM(MSIOF1_TXD_D) F_(0, 0) FM(SSI_SDATA9_B)FM(TS_SDAT0_D) FM(STP_ISD_0_D) FM(RIF0_D1_C) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 329 + #define IP13_23_20 FM(HCTS0_N) FM(RX2_B) FM(MSIOF1_SYNC_D) F_(0, 0) FM(SSI_SCK9_A) FM(TS_SPSYNC0_D)FM(STP_ISSYNC_0_D) FM(RIF0_SYNC_C) FM(AUDIO_CLKOUT1_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 330 + #define IP13_27_24 FM(HRTS0_N) FM(TX2_B) FM(MSIOF1_SS1_D) F_(0, 0) FM(SSI_WS9_A) F_(0, 0) FM(STP_IVCXO27_0_D) FM(BPFCLK_A) FM(AUDIO_CLKOUT2_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 331 + #define IP13_31_28 FM(MSIOF0_SYNC) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) FM(AUDIO_CLKOUT_A) F_(0, 0) FM(TX5_B) F_(0, 0) F_(0, 0) FM(BPFCLK_D) F_(0, 0) F_(0, 0) 332 + #define IP14_3_0 FM(MSIOF0_SS1) FM(RX5_A) FM(NFWP_N_A) FM(AUDIO_CLKA_C) FM(SSI_SCK2_A) F_(0, 0) FM(STP_IVCXO27_0_C) F_(0, 0) FM(AUDIO_CLKOUT3_A) F_(0, 0) FM(TCLK1_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 333 + #define IP14_7_4 FM(MSIOF0_SS2) FM(TX5_A) FM(MSIOF1_SS2_D) FM(AUDIO_CLKC_A) FM(SSI_WS2_A) F_(0, 0) FM(STP_OPWM_0_D) F_(0, 0) FM(AUDIO_CLKOUT_D) F_(0, 0) FM(SPEEDIN_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 334 + #define IP14_11_8 FM(MLB_CLK) F_(0, 0) FM(MSIOF1_SCK_F) F_(0, 0) FM(SCL1_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 335 + #define IP14_15_12 FM(MLB_SIG) FM(RX1_B) FM(MSIOF1_SYNC_F) F_(0, 0) FM(SDA1_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 336 + #define IP14_19_16 FM(MLB_DAT) FM(TX1_B) FM(MSIOF1_RXD_F) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 337 + #define IP14_23_20 FM(SSI_SCK0129) F_(0, 0) FM(MSIOF1_TXD_F) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 338 + #define IP14_27_24 FM(SSI_WS0129) F_(0, 0) FM(MSIOF1_SS1_F) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 339 + 340 + /* IPSRx */ /* 0 */ /* 1 */ /* 2 */ /* 3 */ /* 4 */ /* 5 */ /* 6 */ /* 7 */ /* 8 */ /* 9 */ /* A */ /* B */ /* C - F */ 341 + #define IP14_31_28 FM(SSI_SDATA0) F_(0, 0) FM(MSIOF1_SS2_F) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 342 + #define IP15_3_0 FM(SSI_SDATA1_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 343 + #define IP15_7_4 FM(SSI_SDATA2_A) F_(0, 0) F_(0, 0) F_(0, 0) FM(SSI_SCK1_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 344 + #define IP15_11_8 FM(SSI_SCK34) F_(0, 0) FM(MSIOF1_SS1_A) F_(0, 0) F_(0, 0) F_(0, 0) FM(STP_OPWM_0_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 345 + #define IP15_15_12 FM(SSI_WS34) FM(HCTS2_N_A) FM(MSIOF1_SS2_A) F_(0, 0) F_(0, 0) F_(0, 0) FM(STP_IVCXO27_0_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 346 + #define IP15_19_16 FM(SSI_SDATA3) FM(HRTS2_N_A) FM(MSIOF1_TXD_A) F_(0, 0) F_(0, 0) FM(TS_SCK0_A) FM(STP_ISCLK_0_A) FM(RIF0_D1_A) FM(RIF2_D0_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 347 + #define IP15_23_20 FM(SSI_SCK4) FM(HRX2_A) FM(MSIOF1_SCK_A) F_(0, 0) F_(0, 0) FM(TS_SDAT0_A) FM(STP_ISD_0_A) FM(RIF0_CLK_A) FM(RIF2_CLK_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 348 + #define IP15_27_24 FM(SSI_WS4) FM(HTX2_A) FM(MSIOF1_SYNC_A) F_(0, 0) F_(0, 0) FM(TS_SDEN0_A) FM(STP_ISEN_0_A) FM(RIF0_SYNC_A) FM(RIF2_SYNC_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 349 + #define IP15_31_28 FM(SSI_SDATA4) FM(HSCK2_A) FM(MSIOF1_RXD_A) F_(0, 0) F_(0, 0) FM(TS_SPSYNC0_A)FM(STP_ISSYNC_0_A) FM(RIF0_D0_A) FM(RIF2_D1_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 350 + #define IP16_3_0 FM(SSI_SCK6) F_(0, 0) F_(0, 0) FM(SIM0_RST_D) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 351 + #define IP16_7_4 FM(SSI_WS6) F_(0, 0) F_(0, 0) FM(SIM0_D_D) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 352 + #define IP16_11_8 FM(SSI_SDATA6) F_(0, 0) F_(0, 0) FM(SIM0_CLK_D) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 353 + #define IP16_15_12 FM(SSI_SCK78) FM(HRX2_B) FM(MSIOF1_SCK_C) F_(0, 0) F_(0, 0) FM(TS_SCK1_A) FM(STP_ISCLK_1_A) FM(RIF1_CLK_A) FM(RIF3_CLK_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 354 + #define IP16_19_16 FM(SSI_WS78) FM(HTX2_B) FM(MSIOF1_SYNC_C) F_(0, 0) F_(0, 0) FM(TS_SDAT1_A) FM(STP_ISD_1_A) FM(RIF1_SYNC_A) FM(RIF3_SYNC_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 355 + #define IP16_23_20 FM(SSI_SDATA7) FM(HCTS2_N_B) FM(MSIOF1_RXD_C) F_(0, 0) F_(0, 0) FM(TS_SDEN1_A) FM(STP_ISEN_1_A) FM(RIF1_D0_A) FM(RIF3_D0_A) F_(0, 0) FM(TCLK2_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 356 + #define IP16_27_24 FM(SSI_SDATA8) FM(HRTS2_N_B) FM(MSIOF1_TXD_C) F_(0, 0) F_(0, 0) FM(TS_SPSYNC1_A)FM(STP_ISSYNC_1_A) FM(RIF1_D1_A) FM(RIF3_D1_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 357 + #define IP16_31_28 FM(SSI_SDATA9_A) FM(HSCK2_B) FM(MSIOF1_SS1_C) FM(HSCK1_A) FM(SSI_WS1_B) FM(SCK1) FM(STP_IVCXO27_1_A) FM(SCK5_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 358 + #define IP17_3_0 FM(AUDIO_CLKA_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) FM(CC5_OSCOUT) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 359 + #define IP17_7_4 FM(AUDIO_CLKB_B) FM(SCIF_CLK_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) FM(STP_IVCXO27_1_D) FM(REMOCON_A) F_(0, 0) F_(0, 0) FM(TCLK1_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 360 + #define IP17_11_8 FM(USB0_PWEN) F_(0, 0) F_(0, 0) FM(SIM0_RST_C) F_(0, 0) FM(TS_SCK1_D) FM(STP_ISCLK_1_D) FM(BPFCLK_B) FM(RIF3_CLK_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) FM(HSCK2_C) F_(0, 0) F_(0, 0) 361 + #define IP17_15_12 FM(USB0_OVC) F_(0, 0) F_(0, 0) FM(SIM0_D_C) F_(0, 0) FM(TS_SDAT1_D) FM(STP_ISD_1_D) F_(0, 0) FM(RIF3_SYNC_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) FM(HRX2_C) F_(0, 0) F_(0, 0) 362 + #define IP17_19_16 FM(USB1_PWEN) F_(0, 0) F_(0, 0) FM(SIM0_CLK_C) FM(SSI_SCK1_A) FM(TS_SCK0_E) FM(STP_ISCLK_0_E) FM(FMCLK_B) FM(RIF2_CLK_B) F_(0, 0) FM(SPEEDIN_A) F_(0, 0) F_(0, 0) FM(HTX2_C) F_(0, 0) F_(0, 0) 363 + #define IP17_23_20 FM(USB1_OVC) F_(0, 0) FM(MSIOF1_SS2_C) F_(0, 0) FM(SSI_WS1_A) FM(TS_SDAT0_E) FM(STP_ISD_0_E) FM(FMIN_B) FM(RIF2_SYNC_B) F_(0, 0) FM(REMOCON_B) F_(0, 0) F_(0, 0) FM(HCTS2_N_C) F_(0, 0) F_(0, 0) 364 + #define IP17_27_24 FM(USB30_PWEN) F_(0, 0) F_(0, 0) FM(AUDIO_CLKOUT_B) FM(SSI_SCK2_B) FM(TS_SDEN1_D) FM(STP_ISEN_1_D) FM(STP_OPWM_0_E)FM(RIF3_D0_B) F_(0, 0) FM(TCLK2_B) FM(TPU0TO0) FM(BPFCLK_C) FM(HRTS2_N_C) F_(0, 0) F_(0, 0) 365 + #define IP17_31_28 FM(USB30_OVC) F_(0, 0) F_(0, 0) FM(AUDIO_CLKOUT1_B) FM(SSI_WS2_B) FM(TS_SPSYNC1_D)FM(STP_ISSYNC_1_D) FM(STP_IVCXO27_0_E)FM(RIF3_D1_B) F_(0, 0) FM(FSO_TOE_B) FM(TPU0TO1) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 366 + #define IP18_3_0 FM(GP6_30) F_(0, 0) F_(0, 0) FM(AUDIO_CLKOUT2_B) FM(SSI_SCK9_B) FM(TS_SDEN0_E) FM(STP_ISEN_0_E) F_(0, 0) FM(RIF2_D0_B) F_(0, 0) FM(FSO_CFE_0_A) FM(TPU0TO2) F_(0, 0) FM(FMCLK_C) FM(FMCLK_D) F_(0, 0) 367 + #define IP18_7_4 FM(GP6_31) F_(0, 0) F_(0, 0) FM(AUDIO_CLKOUT3_B) FM(SSI_WS9_B) FM(TS_SPSYNC0_E)FM(STP_ISSYNC_0_E) F_(0, 0) FM(RIF2_D1_B) F_(0, 0) FM(FSO_CFE_1_A) FM(TPU0TO3) F_(0, 0) FM(FMIN_C) FM(FMIN_D) F_(0, 0) 368 + 369 + #define PINMUX_GPSR \ 370 + \ 371 + GPSR6_31 \ 372 + GPSR6_30 \ 373 + GPSR6_29 \ 374 + GPSR1_28 GPSR6_28 \ 375 + GPSR1_27 GPSR6_27 \ 376 + GPSR1_26 GPSR6_26 \ 377 + GPSR1_25 GPSR5_25 GPSR6_25 \ 378 + GPSR1_24 GPSR5_24 GPSR6_24 \ 379 + GPSR1_23 GPSR5_23 GPSR6_23 \ 380 + GPSR1_22 GPSR5_22 GPSR6_22 \ 381 + GPSR1_21 GPSR5_21 GPSR6_21 \ 382 + GPSR1_20 GPSR5_20 GPSR6_20 \ 383 + GPSR1_19 GPSR5_19 GPSR6_19 \ 384 + GPSR1_18 GPSR5_18 GPSR6_18 \ 385 + GPSR1_17 GPSR4_17 GPSR5_17 GPSR6_17 \ 386 + GPSR1_16 GPSR4_16 GPSR5_16 GPSR6_16 \ 387 + GPSR0_15 GPSR1_15 GPSR3_15 GPSR4_15 GPSR5_15 GPSR6_15 \ 388 + GPSR0_14 GPSR1_14 GPSR2_14 GPSR3_14 GPSR4_14 GPSR5_14 GPSR6_14 \ 389 + GPSR0_13 GPSR1_13 GPSR2_13 GPSR3_13 GPSR4_13 GPSR5_13 GPSR6_13 \ 390 + GPSR0_12 GPSR1_12 GPSR2_12 GPSR3_12 GPSR4_12 GPSR5_12 GPSR6_12 \ 391 + GPSR0_11 GPSR1_11 GPSR2_11 GPSR3_11 GPSR4_11 GPSR5_11 GPSR6_11 \ 392 + GPSR0_10 GPSR1_10 GPSR2_10 GPSR3_10 GPSR4_10 GPSR5_10 GPSR6_10 \ 393 + GPSR0_9 GPSR1_9 GPSR2_9 GPSR3_9 GPSR4_9 GPSR5_9 GPSR6_9 \ 394 + GPSR0_8 GPSR1_8 GPSR2_8 GPSR3_8 GPSR4_8 GPSR5_8 GPSR6_8 \ 395 + GPSR0_7 GPSR1_7 GPSR2_7 GPSR3_7 GPSR4_7 GPSR5_7 GPSR6_7 \ 396 + GPSR0_6 GPSR1_6 GPSR2_6 GPSR3_6 GPSR4_6 GPSR5_6 GPSR6_6 \ 397 + GPSR0_5 GPSR1_5 GPSR2_5 GPSR3_5 GPSR4_5 GPSR5_5 GPSR6_5 \ 398 + GPSR0_4 GPSR1_4 GPSR2_4 GPSR3_4 GPSR4_4 GPSR5_4 GPSR6_4 \ 399 + GPSR0_3 GPSR1_3 GPSR2_3 GPSR3_3 GPSR4_3 GPSR5_3 GPSR6_3 GPSR7_3 \ 400 + GPSR0_2 GPSR1_2 GPSR2_2 GPSR3_2 GPSR4_2 GPSR5_2 GPSR6_2 GPSR7_2 \ 401 + GPSR0_1 GPSR1_1 GPSR2_1 GPSR3_1 GPSR4_1 GPSR5_1 GPSR6_1 GPSR7_1 \ 402 + GPSR0_0 GPSR1_0 GPSR2_0 GPSR3_0 GPSR4_0 GPSR5_0 GPSR6_0 GPSR7_0 403 + 404 + #define PINMUX_IPSR \ 405 + \ 406 + FM(IP0_3_0) IP0_3_0 FM(IP1_3_0) IP1_3_0 FM(IP2_3_0) IP2_3_0 FM(IP3_3_0) IP3_3_0 \ 407 + FM(IP0_7_4) IP0_7_4 FM(IP1_7_4) IP1_7_4 FM(IP2_7_4) IP2_7_4 FM(IP3_7_4) IP3_7_4 \ 408 + FM(IP0_11_8) IP0_11_8 FM(IP1_11_8) IP1_11_8 FM(IP2_11_8) IP2_11_8 FM(IP3_11_8) IP3_11_8 \ 409 + FM(IP0_15_12) IP0_15_12 FM(IP1_15_12) IP1_15_12 FM(IP2_15_12) IP2_15_12 FM(IP3_15_12) IP3_15_12 \ 410 + FM(IP0_19_16) IP0_19_16 FM(IP1_19_16) IP1_19_16 FM(IP2_19_16) IP2_19_16 FM(IP3_19_16) IP3_19_16 \ 411 + FM(IP0_23_20) IP0_23_20 FM(IP1_23_20) IP1_23_20 FM(IP2_23_20) IP2_23_20 FM(IP3_23_20) IP3_23_20 \ 412 + FM(IP0_27_24) IP0_27_24 FM(IP1_27_24) IP1_27_24 FM(IP2_27_24) IP2_27_24 FM(IP3_27_24) IP3_27_24 \ 413 + FM(IP0_31_28) IP0_31_28 FM(IP1_31_28) IP1_31_28 FM(IP2_31_28) IP2_31_28 FM(IP3_31_28) IP3_31_28 \ 414 + \ 415 + FM(IP4_3_0) IP4_3_0 FM(IP5_3_0) IP5_3_0 FM(IP6_3_0) IP6_3_0 FM(IP7_3_0) IP7_3_0 \ 416 + FM(IP4_7_4) IP4_7_4 FM(IP5_7_4) IP5_7_4 FM(IP6_7_4) IP6_7_4 FM(IP7_7_4) IP7_7_4 \ 417 + FM(IP4_11_8) IP4_11_8 FM(IP5_11_8) IP5_11_8 FM(IP6_11_8) IP6_11_8 FM(IP7_11_8) IP7_11_8 \ 418 + FM(IP4_15_12) IP4_15_12 FM(IP5_15_12) IP5_15_12 FM(IP6_15_12) IP6_15_12 FM(IP7_15_12) IP7_15_12 \ 419 + FM(IP4_19_16) IP4_19_16 FM(IP5_19_16) IP5_19_16 FM(IP6_19_16) IP6_19_16 FM(IP7_19_16) IP7_19_16 \ 420 + FM(IP4_23_20) IP4_23_20 FM(IP5_23_20) IP5_23_20 FM(IP6_23_20) IP6_23_20 FM(IP7_23_20) IP7_23_20 \ 421 + FM(IP4_27_24) IP4_27_24 FM(IP5_27_24) IP5_27_24 FM(IP6_27_24) IP6_27_24 FM(IP7_27_24) IP7_27_24 \ 422 + FM(IP4_31_28) IP4_31_28 FM(IP5_31_28) IP5_31_28 FM(IP6_31_28) IP6_31_28 FM(IP7_31_28) IP7_31_28 \ 423 + \ 424 + FM(IP8_3_0) IP8_3_0 FM(IP9_3_0) IP9_3_0 FM(IP10_3_0) IP10_3_0 FM(IP11_3_0) IP11_3_0 \ 425 + FM(IP8_7_4) IP8_7_4 FM(IP9_7_4) IP9_7_4 FM(IP10_7_4) IP10_7_4 FM(IP11_7_4) IP11_7_4 \ 426 + FM(IP8_11_8) IP8_11_8 FM(IP9_11_8) IP9_11_8 FM(IP10_11_8) IP10_11_8 FM(IP11_11_8) IP11_11_8 \ 427 + FM(IP8_15_12) IP8_15_12 FM(IP9_15_12) IP9_15_12 FM(IP10_15_12) IP10_15_12 FM(IP11_15_12) IP11_15_12 \ 428 + FM(IP8_19_16) IP8_19_16 FM(IP9_19_16) IP9_19_16 FM(IP10_19_16) IP10_19_16 FM(IP11_19_16) IP11_19_16 \ 429 + FM(IP8_23_20) IP8_23_20 FM(IP9_23_20) IP9_23_20 FM(IP10_23_20) IP10_23_20 FM(IP11_23_20) IP11_23_20 \ 430 + FM(IP8_27_24) IP8_27_24 FM(IP9_27_24) IP9_27_24 FM(IP10_27_24) IP10_27_24 FM(IP11_27_24) IP11_27_24 \ 431 + FM(IP8_31_28) IP8_31_28 FM(IP9_31_28) IP9_31_28 FM(IP10_31_28) IP10_31_28 FM(IP11_31_28) IP11_31_28 \ 432 + \ 433 + FM(IP12_3_0) IP12_3_0 FM(IP13_3_0) IP13_3_0 FM(IP14_3_0) IP14_3_0 FM(IP15_3_0) IP15_3_0 \ 434 + FM(IP12_7_4) IP12_7_4 FM(IP13_7_4) IP13_7_4 FM(IP14_7_4) IP14_7_4 FM(IP15_7_4) IP15_7_4 \ 435 + FM(IP12_11_8) IP12_11_8 FM(IP13_11_8) IP13_11_8 FM(IP14_11_8) IP14_11_8 FM(IP15_11_8) IP15_11_8 \ 436 + FM(IP12_15_12) IP12_15_12 FM(IP13_15_12) IP13_15_12 FM(IP14_15_12) IP14_15_12 FM(IP15_15_12) IP15_15_12 \ 437 + FM(IP12_19_16) IP12_19_16 FM(IP13_19_16) IP13_19_16 FM(IP14_19_16) IP14_19_16 FM(IP15_19_16) IP15_19_16 \ 438 + FM(IP12_23_20) IP12_23_20 FM(IP13_23_20) IP13_23_20 FM(IP14_23_20) IP14_23_20 FM(IP15_23_20) IP15_23_20 \ 439 + FM(IP12_27_24) IP12_27_24 FM(IP13_27_24) IP13_27_24 FM(IP14_27_24) IP14_27_24 FM(IP15_27_24) IP15_27_24 \ 440 + FM(IP12_31_28) IP12_31_28 FM(IP13_31_28) IP13_31_28 FM(IP14_31_28) IP14_31_28 FM(IP15_31_28) IP15_31_28 \ 441 + \ 442 + FM(IP16_3_0) IP16_3_0 FM(IP17_3_0) IP17_3_0 FM(IP18_3_0) IP18_3_0 \ 443 + FM(IP16_7_4) IP16_7_4 FM(IP17_7_4) IP17_7_4 FM(IP18_7_4) IP18_7_4 \ 444 + FM(IP16_11_8) IP16_11_8 FM(IP17_11_8) IP17_11_8 \ 445 + FM(IP16_15_12) IP16_15_12 FM(IP17_15_12) IP17_15_12 \ 446 + FM(IP16_19_16) IP16_19_16 FM(IP17_19_16) IP17_19_16 \ 447 + FM(IP16_23_20) IP16_23_20 FM(IP17_23_20) IP17_23_20 \ 448 + FM(IP16_27_24) IP16_27_24 FM(IP17_27_24) IP17_27_24 \ 449 + FM(IP16_31_28) IP16_31_28 FM(IP17_31_28) IP17_31_28 450 + 451 + /* MOD_SEL0 */ /* 0 */ /* 1 */ /* 2 */ /* 3 */ /* 4 */ /* 5 */ /* 6 */ /* 7 */ 452 + #define MOD_SEL0_31_30_29 FM(SEL_MSIOF3_0) FM(SEL_MSIOF3_1) FM(SEL_MSIOF3_2) FM(SEL_MSIOF3_3) FM(SEL_MSIOF3_4) F_(0, 0) F_(0, 0) F_(0, 0) 453 + #define MOD_SEL0_28_27 FM(SEL_MSIOF2_0) FM(SEL_MSIOF2_1) FM(SEL_MSIOF2_2) FM(SEL_MSIOF2_3) 454 + #define MOD_SEL0_26_25_24 FM(SEL_MSIOF1_0) FM(SEL_MSIOF1_1) FM(SEL_MSIOF1_2) FM(SEL_MSIOF1_3) FM(SEL_MSIOF1_4) FM(SEL_MSIOF1_5) FM(SEL_MSIOF1_6) F_(0, 0) 455 + #define MOD_SEL0_23 FM(SEL_LBSC_0) FM(SEL_LBSC_1) 456 + #define MOD_SEL0_22 FM(SEL_IEBUS_0) FM(SEL_IEBUS_1) 457 + #define MOD_SEL0_21 FM(SEL_I2C2_0) FM(SEL_I2C2_1) 458 + #define MOD_SEL0_20 FM(SEL_I2C1_0) FM(SEL_I2C1_1) 459 + #define MOD_SEL0_19 FM(SEL_HSCIF4_0) FM(SEL_HSCIF4_1) 460 + #define MOD_SEL0_18_17 FM(SEL_HSCIF3_0) FM(SEL_HSCIF3_1) FM(SEL_HSCIF3_2) FM(SEL_HSCIF3_3) 461 + #define MOD_SEL0_16 FM(SEL_HSCIF1_0) FM(SEL_HSCIF1_1) 462 + #define MOD_SEL0_15 FM(SEL_FSO_0) FM(SEL_FSO_1) 463 + #define MOD_SEL0_14_13 FM(SEL_HSCIF2_0) FM(SEL_HSCIF2_1) FM(SEL_HSCIF2_2) F_(0, 0) 464 + #define MOD_SEL0_12 FM(SEL_ETHERAVB_0) FM(SEL_ETHERAVB_1) 465 + #define MOD_SEL0_11 FM(SEL_DRIF3_0) FM(SEL_DRIF3_1) 466 + #define MOD_SEL0_10 FM(SEL_DRIF2_0) FM(SEL_DRIF2_1) 467 + #define MOD_SEL0_9_8 FM(SEL_DRIF1_0) FM(SEL_DRIF1_1) FM(SEL_DRIF1_2) F_(0, 0) 468 + #define MOD_SEL0_7_6 FM(SEL_DRIF0_0) FM(SEL_DRIF0_1) FM(SEL_DRIF0_2) F_(0, 0) 469 + #define MOD_SEL0_5 FM(SEL_CANFD0_0) FM(SEL_CANFD0_1) 470 + #define MOD_SEL0_4_3 FM(SEL_ADG_A_0) FM(SEL_ADG_A_1) FM(SEL_ADG_A_2) FM(SEL_ADG_A_3) 471 + #define MOD_SEL0_2 FM(SEL_5LINE_0) FM(SEL_5LINE_1) 472 + 473 + /* MOD_SEL1 */ /* 0 */ /* 1 */ /* 2 */ /* 3 */ /* 4 */ /* 5 */ /* 6 */ /* 7 */ 474 + #define MOD_SEL1_31_30 FM(SEL_TSIF1_0) FM(SEL_TSIF1_1) FM(SEL_TSIF1_2) FM(SEL_TSIF1_3) 475 + #define MOD_SEL1_29_28_27 FM(SEL_TSIF0_0) FM(SEL_TSIF0_1) FM(SEL_TSIF0_2) FM(SEL_TSIF0_3) FM(SEL_TSIF0_4) F_(0, 0) F_(0, 0) F_(0, 0) 476 + #define MOD_SEL1_26 FM(SEL_TIMER_TMU_0) FM(SEL_TIMER_TMU_1) 477 + #define MOD_SEL1_25_24 FM(SEL_SSP1_1_0) FM(SEL_SSP1_1_1) FM(SEL_SSP1_1_2) FM(SEL_SSP1_1_3) 478 + #define MOD_SEL1_23_22_21 FM(SEL_SSP1_0_0) FM(SEL_SSP1_0_1) FM(SEL_SSP1_0_2) FM(SEL_SSP1_0_3) FM(SEL_SSP1_0_4) F_(0, 0) F_(0, 0) F_(0, 0) 479 + #define MOD_SEL1_20 FM(SEL_SSI_0) FM(SEL_SSI_1) 480 + #define MOD_SEL1_19 FM(SEL_SPEED_PULSE_0) FM(SEL_SPEED_PULSE_1) 481 + #define MOD_SEL1_18_17 FM(SEL_SIMCARD_0) FM(SEL_SIMCARD_1) FM(SEL_SIMCARD_2) FM(SEL_SIMCARD_3) 482 + #define MOD_SEL1_16 FM(SEL_SDHI2_0) FM(SEL_SDHI2_1) 483 + #define MOD_SEL1_15_14 FM(SEL_SCIF4_0) FM(SEL_SCIF4_1) FM(SEL_SCIF4_2) F_(0, 0) 484 + #define MOD_SEL1_13 FM(SEL_SCIF3_0) FM(SEL_SCIF3_1) 485 + #define MOD_SEL1_12 FM(SEL_SCIF2_0) FM(SEL_SCIF2_1) 486 + #define MOD_SEL1_11 FM(SEL_SCIF1_0) FM(SEL_SCIF1_1) 487 + #define MOD_SEL1_10 FM(SEL_SATA_0) FM(SEL_SATA_1) 488 + #define MOD_SEL1_9 FM(SEL_REMOCON_0) FM(SEL_REMOCON_1) 489 + #define MOD_SEL1_6 FM(SEL_RCAN0_0) FM(SEL_RCAN0_1) 490 + #define MOD_SEL1_5 FM(SEL_PWM6_0) FM(SEL_PWM6_1) 491 + #define MOD_SEL1_4 FM(SEL_PWM5_0) FM(SEL_PWM5_1) 492 + #define MOD_SEL1_3 FM(SEL_PWM4_0) FM(SEL_PWM4_1) 493 + #define MOD_SEL1_2 FM(SEL_PWM3_0) FM(SEL_PWM3_1) 494 + #define MOD_SEL1_1 FM(SEL_PWM2_0) FM(SEL_PWM2_1) 495 + #define MOD_SEL1_0 FM(SEL_PWM1_0) FM(SEL_PWM1_1) 496 + 497 + /* MOD_SEL1 */ /* 0 */ /* 1 */ /* 2 */ /* 3 */ /* 4 */ /* 5 */ /* 6 */ /* 7 */ 498 + #define MOD_SEL2_31 FM(I2C_SEL_5_0) FM(I2C_SEL_5_1) 499 + #define MOD_SEL2_30 FM(I2C_SEL_3_0) FM(I2C_SEL_3_1) 500 + #define MOD_SEL2_29 FM(I2C_SEL_0_0) FM(I2C_SEL_0_1) 501 + #define MOD_SEL2_28_27 FM(SEL_FM_0) FM(SEL_FM_1) FM(SEL_FM_2) FM(SEL_FM_3) 502 + #define MOD_SEL2_26 FM(SEL_SCIF5_0) FM(SEL_SCIF5_1) 503 + #define MOD_SEL2_25_24_23 FM(SEL_I2C6_0) FM(SEL_I2C6_1) FM(SEL_I2C6_2) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 504 + #define MOD_SEL2_22 FM(SEL_NDF_0) FM(SEL_NDF_1) 505 + #define MOD_SEL2_21 FM(SEL_SSI2_0) FM(SEL_SSI2_1) 506 + #define MOD_SEL2_20 FM(SEL_SSI9_0) FM(SEL_SSI9_1) 507 + #define MOD_SEL2_19 FM(SEL_TIMER_TMU2_0) FM(SEL_TIMER_TMU2_1) 508 + #define MOD_SEL2_18 FM(SEL_ADG_B_0) FM(SEL_ADG_B_1) 509 + #define MOD_SEL2_17 FM(SEL_ADG_C_0) FM(SEL_ADG_C_1) 510 + #define MOD_SEL2_0 FM(SEL_VIN4_0) FM(SEL_VIN4_1) 511 + 512 + #define PINMUX_MOD_SELS \ 513 + \ 514 + MOD_SEL0_31_30_29 MOD_SEL1_31_30 MOD_SEL2_31 \ 515 + MOD_SEL2_30 \ 516 + MOD_SEL1_29_28_27 MOD_SEL2_29 \ 517 + MOD_SEL0_28_27 MOD_SEL2_28_27 \ 518 + MOD_SEL0_26_25_24 MOD_SEL1_26 MOD_SEL2_26 \ 519 + MOD_SEL1_25_24 MOD_SEL2_25_24_23 \ 520 + MOD_SEL0_23 MOD_SEL1_23_22_21 \ 521 + MOD_SEL0_22 MOD_SEL2_22 \ 522 + MOD_SEL0_21 MOD_SEL2_21 \ 523 + MOD_SEL0_20 MOD_SEL1_20 MOD_SEL2_20 \ 524 + MOD_SEL0_19 MOD_SEL1_19 MOD_SEL2_19 \ 525 + MOD_SEL0_18_17 MOD_SEL1_18_17 MOD_SEL2_18 \ 526 + MOD_SEL2_17 \ 527 + MOD_SEL0_16 MOD_SEL1_16 \ 528 + MOD_SEL0_15 MOD_SEL1_15_14 \ 529 + MOD_SEL0_14_13 \ 530 + MOD_SEL1_13 \ 531 + MOD_SEL0_12 MOD_SEL1_12 \ 532 + MOD_SEL0_11 MOD_SEL1_11 \ 533 + MOD_SEL0_10 MOD_SEL1_10 \ 534 + MOD_SEL0_9_8 MOD_SEL1_9 \ 535 + MOD_SEL0_7_6 \ 536 + MOD_SEL1_6 \ 537 + MOD_SEL0_5 MOD_SEL1_5 \ 538 + MOD_SEL0_4_3 MOD_SEL1_4 \ 539 + MOD_SEL1_3 \ 540 + MOD_SEL0_2 MOD_SEL1_2 \ 541 + MOD_SEL1_1 \ 542 + MOD_SEL1_0 MOD_SEL2_0 543 + 544 + enum { 545 + PINMUX_RESERVED = 0, 546 + 547 + PINMUX_DATA_BEGIN, 548 + GP_ALL(DATA), 549 + PINMUX_DATA_END, 550 + 551 + #define F_(x, y) 552 + #define FM(x) FN_##x, 553 + PINMUX_FUNCTION_BEGIN, 554 + GP_ALL(FN), 555 + PINMUX_GPSR 556 + PINMUX_IPSR 557 + PINMUX_MOD_SELS 558 + PINMUX_FUNCTION_END, 559 + #undef F_ 560 + #undef FM 561 + 562 + #define F_(x, y) 563 + #define FM(x) x##_MARK, 564 + PINMUX_MARK_BEGIN, 565 + PINMUX_GPSR 566 + PINMUX_IPSR 567 + PINMUX_MOD_SELS 568 + PINMUX_MARK_END, 569 + #undef F_ 570 + #undef FM 571 + }; 572 + 573 + static const u16 pinmux_data[] = { 574 + PINMUX_DATA_GP_ALL(), 575 + 576 + PINMUX_SINGLE(AVS1), 577 + PINMUX_SINGLE(AVS2), 578 + PINMUX_SINGLE(CLKOUT), 579 + PINMUX_SINGLE(GP7_03), 580 + PINMUX_SINGLE(HDMI0_CEC), 581 + PINMUX_SINGLE(MSIOF0_RXD), 582 + PINMUX_SINGLE(MSIOF0_SCK), 583 + PINMUX_SINGLE(MSIOF0_TXD), 584 + PINMUX_SINGLE(SSI_SCK5), 585 + PINMUX_SINGLE(SSI_SDATA5), 586 + PINMUX_SINGLE(SSI_WS5), 587 + 588 + /* IPSR0 */ 589 + PINMUX_IPSR_GPSR(IP0_3_0, AVB_MDC), 590 + PINMUX_IPSR_MSEL(IP0_3_0, MSIOF2_SS2_C, SEL_MSIOF2_2), 591 + 592 + PINMUX_IPSR_GPSR(IP0_7_4, AVB_MAGIC), 593 + PINMUX_IPSR_MSEL(IP0_7_4, MSIOF2_SS1_C, SEL_MSIOF2_2), 594 + PINMUX_IPSR_MSEL(IP0_7_4, SCK4_A, SEL_SCIF4_0), 595 + 596 + PINMUX_IPSR_GPSR(IP0_11_8, AVB_PHY_INT), 597 + PINMUX_IPSR_MSEL(IP0_11_8, MSIOF2_SYNC_C, SEL_MSIOF2_2), 598 + PINMUX_IPSR_MSEL(IP0_11_8, RX4_A, SEL_SCIF4_0), 599 + 600 + PINMUX_IPSR_GPSR(IP0_15_12, AVB_LINK), 601 + PINMUX_IPSR_MSEL(IP0_15_12, MSIOF2_SCK_C, SEL_MSIOF2_2), 602 + PINMUX_IPSR_MSEL(IP0_15_12, TX4_A, SEL_SCIF4_0), 603 + 604 + PINMUX_IPSR_MSEL(IP0_19_16, AVB_AVTP_MATCH_A, SEL_ETHERAVB_0), 605 + PINMUX_IPSR_MSEL(IP0_19_16, MSIOF2_RXD_C, SEL_MSIOF2_2), 606 + PINMUX_IPSR_MSEL(IP0_19_16, CTS4_N_A, SEL_SCIF4_0), 607 + 608 + PINMUX_IPSR_MSEL(IP0_23_20, AVB_AVTP_CAPTURE_A, SEL_ETHERAVB_0), 609 + PINMUX_IPSR_MSEL(IP0_23_20, MSIOF2_TXD_C, SEL_MSIOF2_2), 610 + PINMUX_IPSR_MSEL(IP0_23_20, RTS4_N_TANS_A, SEL_SCIF4_0), 611 + 612 + PINMUX_IPSR_GPSR(IP0_27_24, IRQ0), 613 + PINMUX_IPSR_GPSR(IP0_27_24, QPOLB), 614 + PINMUX_IPSR_GPSR(IP0_27_24, DU_CDE), 615 + PINMUX_IPSR_MSEL(IP0_27_24, VI4_DATA0_B, SEL_VIN4_1), 616 + PINMUX_IPSR_MSEL(IP0_27_24, CAN0_TX_B, SEL_RCAN0_1), 617 + PINMUX_IPSR_MSEL(IP0_27_24, CANFD0_TX_B, SEL_CANFD0_1), 618 + PINMUX_IPSR_MSEL(IP0_27_24, MSIOF3_SS2_E, SEL_MSIOF3_4), 619 + 620 + PINMUX_IPSR_GPSR(IP0_31_28, IRQ1), 621 + PINMUX_IPSR_GPSR(IP0_31_28, QPOLA), 622 + PINMUX_IPSR_GPSR(IP0_31_28, DU_DISP), 623 + PINMUX_IPSR_MSEL(IP0_31_28, VI4_DATA1_B, SEL_VIN4_1), 624 + PINMUX_IPSR_MSEL(IP0_31_28, CAN0_RX_B, SEL_RCAN0_1), 625 + PINMUX_IPSR_MSEL(IP0_31_28, CANFD0_RX_B, SEL_CANFD0_1), 626 + PINMUX_IPSR_MSEL(IP0_27_24, MSIOF3_SS1_E, SEL_MSIOF3_4), 627 + 628 + /* IPSR1 */ 629 + PINMUX_IPSR_GPSR(IP1_3_0, IRQ2), 630 + PINMUX_IPSR_GPSR(IP1_3_0, QCPV_QDE), 631 + PINMUX_IPSR_GPSR(IP1_3_0, DU_EXODDF_DU_ODDF_DISP_CDE), 632 + PINMUX_IPSR_MSEL(IP1_3_0, VI4_DATA2_B, SEL_VIN4_1), 633 + PINMUX_IPSR_MSEL(IP1_3_0, PWM3_B, SEL_PWM3_1), 634 + PINMUX_IPSR_MSEL(IP1_3_0, MSIOF3_SYNC_E, SEL_MSIOF3_4), 635 + 636 + PINMUX_IPSR_GPSR(IP1_7_4, IRQ3), 637 + PINMUX_IPSR_GPSR(IP1_7_4, QSTVB_QVE), 638 + PINMUX_IPSR_GPSR(IP1_7_4, A25), 639 + PINMUX_IPSR_GPSR(IP1_7_4, DU_DOTCLKOUT1), 640 + PINMUX_IPSR_MSEL(IP1_7_4, VI4_DATA3_B, SEL_VIN4_1), 641 + PINMUX_IPSR_MSEL(IP1_7_4, PWM4_B, SEL_PWM4_1), 642 + PINMUX_IPSR_MSEL(IP1_7_4, MSIOF3_SCK_E, SEL_MSIOF3_4), 643 + 644 + PINMUX_IPSR_GPSR(IP1_11_8, IRQ4), 645 + PINMUX_IPSR_GPSR(IP1_11_8, QSTH_QHS), 646 + PINMUX_IPSR_GPSR(IP1_11_8, A24), 647 + PINMUX_IPSR_GPSR(IP1_11_8, DU_EXHSYNC_DU_HSYNC), 648 + PINMUX_IPSR_MSEL(IP1_11_8, VI4_DATA4_B, SEL_VIN4_1), 649 + PINMUX_IPSR_MSEL(IP1_11_8, PWM5_B, SEL_PWM5_1), 650 + PINMUX_IPSR_MSEL(IP1_11_8, MSIOF3_RXD_E, SEL_MSIOF3_4), 651 + 652 + PINMUX_IPSR_GPSR(IP1_15_12, IRQ5), 653 + PINMUX_IPSR_GPSR(IP1_15_12, QSTB_QHE), 654 + PINMUX_IPSR_GPSR(IP1_15_12, A23), 655 + PINMUX_IPSR_GPSR(IP1_15_12, DU_EXVSYNC_DU_VSYNC), 656 + PINMUX_IPSR_MSEL(IP1_15_12, VI4_DATA5_B, SEL_VIN4_1), 657 + PINMUX_IPSR_MSEL(IP1_15_12, PWM6_B, SEL_PWM6_1), 658 + PINMUX_IPSR_MSEL(IP1_15_12, MSIOF3_TXD_E, SEL_MSIOF3_4), 659 + 660 + PINMUX_IPSR_GPSR(IP1_19_16, PWM0), 661 + PINMUX_IPSR_GPSR(IP1_19_16, AVB_AVTP_PPS), 662 + PINMUX_IPSR_GPSR(IP1_19_16, A22), 663 + PINMUX_IPSR_MSEL(IP1_19_16, VI4_DATA6_B, SEL_VIN4_1), 664 + PINMUX_IPSR_MSEL(IP1_19_16, IECLK_B, SEL_IEBUS_1), 665 + 666 + PINMUX_IPSR_MSEL(IP1_23_20, PWM1_A, SEL_PWM1_0), 667 + PINMUX_IPSR_GPSR(IP1_23_20, A21), 668 + PINMUX_IPSR_MSEL(IP1_23_20, HRX3_D, SEL_HSCIF3_3), 669 + PINMUX_IPSR_MSEL(IP1_23_20, VI4_DATA7_B, SEL_VIN4_1), 670 + PINMUX_IPSR_MSEL(IP1_23_20, IERX_B, SEL_IEBUS_1), 671 + 672 + PINMUX_IPSR_MSEL(IP1_27_24, PWM2_A, SEL_PWM2_0), 673 + PINMUX_IPSR_GPSR(IP1_27_24, A20), 674 + PINMUX_IPSR_MSEL(IP1_27_24, HTX3_D, SEL_HSCIF3_3), 675 + PINMUX_IPSR_MSEL(IP1_27_24, IETX_B, SEL_IEBUS_1), 676 + 677 + PINMUX_IPSR_GPSR(IP1_31_28, A0), 678 + PINMUX_IPSR_GPSR(IP1_31_28, LCDOUT16), 679 + PINMUX_IPSR_MSEL(IP1_31_28, MSIOF3_SYNC_B, SEL_MSIOF3_1), 680 + PINMUX_IPSR_GPSR(IP1_31_28, VI4_DATA8), 681 + PINMUX_IPSR_GPSR(IP1_31_28, DU_DB0), 682 + PINMUX_IPSR_MSEL(IP1_31_28, PWM3_A, SEL_PWM3_0), 683 + 684 + /* IPSR2 */ 685 + PINMUX_IPSR_GPSR(IP2_3_0, A1), 686 + PINMUX_IPSR_GPSR(IP2_3_0, LCDOUT17), 687 + PINMUX_IPSR_MSEL(IP2_3_0, MSIOF3_TXD_B, SEL_MSIOF3_1), 688 + PINMUX_IPSR_GPSR(IP2_3_0, VI4_DATA9), 689 + PINMUX_IPSR_GPSR(IP2_3_0, DU_DB1), 690 + PINMUX_IPSR_MSEL(IP2_3_0, PWM4_A, SEL_PWM4_0), 691 + 692 + PINMUX_IPSR_GPSR(IP2_7_4, A2), 693 + PINMUX_IPSR_GPSR(IP2_7_4, LCDOUT18), 694 + PINMUX_IPSR_MSEL(IP2_7_4, MSIOF3_SCK_B, SEL_MSIOF3_1), 695 + PINMUX_IPSR_GPSR(IP2_7_4, VI4_DATA10), 696 + PINMUX_IPSR_GPSR(IP2_7_4, DU_DB2), 697 + PINMUX_IPSR_MSEL(IP2_7_4, PWM5_A, SEL_PWM5_0), 698 + 699 + PINMUX_IPSR_GPSR(IP2_11_8, A3), 700 + PINMUX_IPSR_GPSR(IP2_11_8, LCDOUT19), 701 + PINMUX_IPSR_MSEL(IP2_11_8, MSIOF3_RXD_B, SEL_MSIOF3_1), 702 + PINMUX_IPSR_GPSR(IP2_11_8, VI4_DATA11), 703 + PINMUX_IPSR_GPSR(IP2_11_8, DU_DB3), 704 + PINMUX_IPSR_MSEL(IP2_11_8, PWM6_A, SEL_PWM6_0), 705 + 706 + PINMUX_IPSR_GPSR(IP2_15_12, A4), 707 + PINMUX_IPSR_GPSR(IP2_15_12, LCDOUT20), 708 + PINMUX_IPSR_MSEL(IP2_15_12, MSIOF3_SS1_B, SEL_MSIOF3_1), 709 + PINMUX_IPSR_GPSR(IP2_15_12, VI4_DATA12), 710 + PINMUX_IPSR_GPSR(IP2_15_12, VI5_DATA12), 711 + PINMUX_IPSR_GPSR(IP2_15_12, DU_DB4), 712 + 713 + PINMUX_IPSR_GPSR(IP2_19_16, A5), 714 + PINMUX_IPSR_GPSR(IP2_19_16, LCDOUT21), 715 + PINMUX_IPSR_MSEL(IP2_19_16, MSIOF3_SS2_B, SEL_MSIOF3_1), 716 + PINMUX_IPSR_MSEL(IP2_19_16, SCK4_B, SEL_SCIF4_1), 717 + PINMUX_IPSR_GPSR(IP2_19_16, VI4_DATA13), 718 + PINMUX_IPSR_GPSR(IP2_19_16, VI5_DATA13), 719 + PINMUX_IPSR_GPSR(IP2_19_16, DU_DB5), 720 + 721 + PINMUX_IPSR_GPSR(IP2_23_20, A6), 722 + PINMUX_IPSR_GPSR(IP2_23_20, LCDOUT22), 723 + PINMUX_IPSR_MSEL(IP2_23_20, MSIOF2_SS1_A, SEL_MSIOF2_0), 724 + PINMUX_IPSR_MSEL(IP2_23_20, RX4_B, SEL_SCIF4_1), 725 + PINMUX_IPSR_GPSR(IP2_23_20, VI4_DATA14), 726 + PINMUX_IPSR_GPSR(IP2_23_20, VI5_DATA14), 727 + PINMUX_IPSR_GPSR(IP2_23_20, DU_DB6), 728 + 729 + PINMUX_IPSR_GPSR(IP2_27_24, A7), 730 + PINMUX_IPSR_GPSR(IP2_27_24, LCDOUT23), 731 + PINMUX_IPSR_MSEL(IP2_27_24, MSIOF2_SS2_A, SEL_MSIOF2_0), 732 + PINMUX_IPSR_MSEL(IP2_27_24, TX4_B, SEL_SCIF4_1), 733 + PINMUX_IPSR_GPSR(IP2_27_24, VI4_DATA15), 734 + PINMUX_IPSR_GPSR(IP2_27_24, VI5_DATA15), 735 + PINMUX_IPSR_GPSR(IP2_27_24, DU_DB7), 736 + 737 + PINMUX_IPSR_GPSR(IP2_31_28, A8), 738 + PINMUX_IPSR_MSEL(IP2_31_28, RX3_B, SEL_SCIF3_1), 739 + PINMUX_IPSR_MSEL(IP2_31_28, MSIOF2_SYNC_A, SEL_MSIOF2_0), 740 + PINMUX_IPSR_MSEL(IP2_31_28, HRX4_B, SEL_HSCIF4_1), 741 + PINMUX_IPSR_MSEL(IP2_31_28, SDA6_A, SEL_I2C6_0), 742 + PINMUX_IPSR_MSEL(IP2_31_28, AVB_AVTP_MATCH_B, SEL_ETHERAVB_1), 743 + PINMUX_IPSR_MSEL(IP2_31_28, PWM1_B, SEL_PWM1_1), 744 + 745 + /* IPSR3 */ 746 + PINMUX_IPSR_GPSR(IP3_3_0, A9), 747 + PINMUX_IPSR_MSEL(IP3_3_0, MSIOF2_SCK_A, SEL_MSIOF2_0), 748 + PINMUX_IPSR_MSEL(IP3_3_0, CTS4_N_B, SEL_SCIF4_1), 749 + PINMUX_IPSR_GPSR(IP3_3_0, VI5_VSYNC_N), 750 + 751 + PINMUX_IPSR_GPSR(IP3_7_4, A10), 752 + PINMUX_IPSR_MSEL(IP3_7_4, MSIOF2_RXD_A, SEL_MSIOF2_0), 753 + PINMUX_IPSR_MSEL(IP3_7_4, RTS4_N_TANS_B, SEL_SCIF4_1), 754 + PINMUX_IPSR_GPSR(IP3_7_4, VI5_HSYNC_N), 755 + 756 + PINMUX_IPSR_GPSR(IP3_11_8, A11), 757 + PINMUX_IPSR_MSEL(IP3_11_8, TX3_B, SEL_SCIF3_1), 758 + PINMUX_IPSR_MSEL(IP3_11_8, MSIOF2_TXD_A, SEL_MSIOF2_0), 759 + PINMUX_IPSR_MSEL(IP3_11_8, HTX4_B, SEL_HSCIF4_1), 760 + PINMUX_IPSR_GPSR(IP3_11_8, HSCK4), 761 + PINMUX_IPSR_GPSR(IP3_11_8, VI5_FIELD), 762 + PINMUX_IPSR_MSEL(IP3_11_8, SCL6_A, SEL_I2C6_0), 763 + PINMUX_IPSR_MSEL(IP3_11_8, AVB_AVTP_CAPTURE_B, SEL_ETHERAVB_1), 764 + PINMUX_IPSR_MSEL(IP3_11_8, PWM2_B, SEL_PWM2_1), 765 + 766 + PINMUX_IPSR_GPSR(IP3_15_12, A12), 767 + PINMUX_IPSR_GPSR(IP3_15_12, LCDOUT12), 768 + PINMUX_IPSR_MSEL(IP3_15_12, MSIOF3_SCK_C, SEL_MSIOF3_2), 769 + PINMUX_IPSR_MSEL(IP3_15_12, HRX4_A, SEL_HSCIF4_0), 770 + PINMUX_IPSR_GPSR(IP3_15_12, VI5_DATA8), 771 + PINMUX_IPSR_GPSR(IP3_15_12, DU_DG4), 772 + 773 + PINMUX_IPSR_GPSR(IP3_19_16, A13), 774 + PINMUX_IPSR_GPSR(IP3_19_16, LCDOUT13), 775 + PINMUX_IPSR_MSEL(IP3_19_16, MSIOF3_SYNC_C, SEL_MSIOF3_2), 776 + PINMUX_IPSR_MSEL(IP3_19_16, HTX4_A, SEL_HSCIF4_0), 777 + PINMUX_IPSR_GPSR(IP3_19_16, VI5_DATA9), 778 + PINMUX_IPSR_GPSR(IP3_19_16, DU_DG5), 779 + 780 + PINMUX_IPSR_GPSR(IP3_23_20, A14), 781 + PINMUX_IPSR_GPSR(IP3_23_20, LCDOUT14), 782 + PINMUX_IPSR_MSEL(IP3_23_20, MSIOF3_RXD_C, SEL_MSIOF3_2), 783 + PINMUX_IPSR_GPSR(IP3_23_20, HCTS4_N), 784 + PINMUX_IPSR_GPSR(IP3_23_20, VI5_DATA10), 785 + PINMUX_IPSR_GPSR(IP3_23_20, DU_DG6), 786 + 787 + PINMUX_IPSR_GPSR(IP3_27_24, A15), 788 + PINMUX_IPSR_GPSR(IP3_27_24, LCDOUT15), 789 + PINMUX_IPSR_MSEL(IP3_27_24, MSIOF3_TXD_C, SEL_MSIOF3_2), 790 + PINMUX_IPSR_GPSR(IP3_27_24, HRTS4_N), 791 + PINMUX_IPSR_GPSR(IP3_27_24, VI5_DATA11), 792 + PINMUX_IPSR_GPSR(IP3_27_24, DU_DG7), 793 + 794 + PINMUX_IPSR_GPSR(IP3_31_28, A16), 795 + PINMUX_IPSR_GPSR(IP3_31_28, LCDOUT8), 796 + PINMUX_IPSR_GPSR(IP3_31_28, VI4_FIELD), 797 + PINMUX_IPSR_GPSR(IP3_31_28, DU_DG0), 798 + 799 + /* IPSR4 */ 800 + PINMUX_IPSR_GPSR(IP4_3_0, A17), 801 + PINMUX_IPSR_GPSR(IP4_3_0, LCDOUT9), 802 + PINMUX_IPSR_GPSR(IP4_3_0, VI4_VSYNC_N), 803 + PINMUX_IPSR_GPSR(IP4_3_0, DU_DG1), 804 + 805 + PINMUX_IPSR_GPSR(IP4_7_4, A18), 806 + PINMUX_IPSR_GPSR(IP4_7_4, LCDOUT10), 807 + PINMUX_IPSR_GPSR(IP4_7_4, VI4_HSYNC_N), 808 + PINMUX_IPSR_GPSR(IP4_7_4, DU_DG2), 809 + 810 + PINMUX_IPSR_GPSR(IP4_11_8, A19), 811 + PINMUX_IPSR_GPSR(IP4_11_8, LCDOUT11), 812 + PINMUX_IPSR_GPSR(IP4_11_8, VI4_CLKENB), 813 + PINMUX_IPSR_GPSR(IP4_11_8, DU_DG3), 814 + 815 + PINMUX_IPSR_GPSR(IP4_15_12, CS0_N), 816 + PINMUX_IPSR_GPSR(IP4_15_12, VI5_CLKENB), 817 + 818 + PINMUX_IPSR_GPSR(IP4_19_16, CS1_N_A26), 819 + PINMUX_IPSR_GPSR(IP4_19_16, VI5_CLK), 820 + PINMUX_IPSR_MSEL(IP4_19_16, EX_WAIT0_B, SEL_LBSC_1), 821 + 822 + PINMUX_IPSR_GPSR(IP4_23_20, BS_N), 823 + PINMUX_IPSR_GPSR(IP4_23_20, QSTVA_QVS), 824 + PINMUX_IPSR_MSEL(IP4_23_20, MSIOF3_SCK_D, SEL_MSIOF3_3), 825 + PINMUX_IPSR_GPSR(IP4_23_20, SCK3), 826 + PINMUX_IPSR_GPSR(IP4_23_20, HSCK3), 827 + PINMUX_IPSR_GPSR(IP4_23_20, CAN1_TX), 828 + PINMUX_IPSR_GPSR(IP4_23_20, CANFD1_TX), 829 + PINMUX_IPSR_MSEL(IP4_23_20, IETX_A, SEL_IEBUS_0), 830 + 831 + PINMUX_IPSR_GPSR(IP4_27_24, RD_N), 832 + PINMUX_IPSR_MSEL(IP4_27_24, MSIOF3_SYNC_D, SEL_MSIOF3_3), 833 + PINMUX_IPSR_MSEL(IP4_27_24, RX3_A, SEL_SCIF3_0), 834 + PINMUX_IPSR_MSEL(IP4_27_24, HRX3_A, SEL_HSCIF3_0), 835 + PINMUX_IPSR_MSEL(IP4_27_24, CAN0_TX_A, SEL_RCAN0_0), 836 + PINMUX_IPSR_MSEL(IP4_27_24, CANFD0_TX_A, SEL_CANFD0_0), 837 + 838 + PINMUX_IPSR_GPSR(IP4_31_28, RD_WR_N), 839 + PINMUX_IPSR_MSEL(IP4_31_28, MSIOF3_RXD_D, SEL_MSIOF3_3), 840 + PINMUX_IPSR_MSEL(IP4_31_28, TX3_A, SEL_SCIF3_0), 841 + PINMUX_IPSR_MSEL(IP4_31_28, HTX3_A, SEL_HSCIF3_0), 842 + PINMUX_IPSR_MSEL(IP4_31_28, CAN0_RX_A, SEL_RCAN0_0), 843 + PINMUX_IPSR_MSEL(IP4_31_28, CANFD0_RX_A, SEL_CANFD0_0), 844 + 845 + /* IPSR5 */ 846 + PINMUX_IPSR_GPSR(IP5_3_0, WE0_N), 847 + PINMUX_IPSR_MSEL(IP5_3_0, MSIOF3_TXD_D, SEL_MSIOF3_3), 848 + PINMUX_IPSR_GPSR(IP5_3_0, CTS3_N), 849 + PINMUX_IPSR_GPSR(IP5_3_0, HCTS3_N), 850 + PINMUX_IPSR_MSEL(IP5_3_0, SCL6_B, SEL_I2C6_1), 851 + PINMUX_IPSR_GPSR(IP5_3_0, CAN_CLK), 852 + PINMUX_IPSR_MSEL(IP5_3_0, IECLK_A, SEL_IEBUS_0), 853 + 854 + PINMUX_IPSR_GPSR(IP5_7_4, WE1_N), 855 + PINMUX_IPSR_MSEL(IP5_7_4, MSIOF3_SS1_D, SEL_MSIOF3_3), 856 + PINMUX_IPSR_GPSR(IP5_7_4, RTS3_N_TANS), 857 + PINMUX_IPSR_GPSR(IP5_7_4, HRTS3_N), 858 + PINMUX_IPSR_MSEL(IP5_7_4, SDA6_B, SEL_I2C6_1), 859 + PINMUX_IPSR_GPSR(IP5_7_4, CAN1_RX), 860 + PINMUX_IPSR_GPSR(IP5_7_4, CANFD1_RX), 861 + PINMUX_IPSR_MSEL(IP5_7_4, IERX_A, SEL_IEBUS_0), 862 + 863 + PINMUX_IPSR_MSEL(IP5_11_8, EX_WAIT0_A, SEL_LBSC_0), 864 + PINMUX_IPSR_GPSR(IP5_11_8, QCLK), 865 + PINMUX_IPSR_GPSR(IP5_11_8, VI4_CLK), 866 + PINMUX_IPSR_GPSR(IP5_11_8, DU_DOTCLKOUT0), 867 + 868 + PINMUX_IPSR_GPSR(IP5_15_12, D0), 869 + PINMUX_IPSR_MSEL(IP5_15_12, MSIOF2_SS1_B, SEL_MSIOF2_1), 870 + PINMUX_IPSR_MSEL(IP5_15_12, MSIOF3_SCK_A, SEL_MSIOF3_0), 871 + PINMUX_IPSR_GPSR(IP5_15_12, VI4_DATA16), 872 + PINMUX_IPSR_GPSR(IP5_15_12, VI5_DATA0), 873 + 874 + PINMUX_IPSR_GPSR(IP5_19_16, D1), 875 + PINMUX_IPSR_MSEL(IP5_19_16, MSIOF2_SS2_B, SEL_MSIOF2_1), 876 + PINMUX_IPSR_MSEL(IP5_19_16, MSIOF3_SYNC_A, SEL_MSIOF3_0), 877 + PINMUX_IPSR_GPSR(IP5_19_16, VI4_DATA17), 878 + PINMUX_IPSR_GPSR(IP5_19_16, VI5_DATA1), 879 + 880 + PINMUX_IPSR_GPSR(IP5_23_20, D2), 881 + PINMUX_IPSR_MSEL(IP5_23_20, MSIOF3_RXD_A, SEL_MSIOF3_0), 882 + PINMUX_IPSR_GPSR(IP5_23_20, VI4_DATA18), 883 + PINMUX_IPSR_GPSR(IP5_23_20, VI5_DATA2), 884 + 885 + PINMUX_IPSR_GPSR(IP5_27_24, D3), 886 + PINMUX_IPSR_MSEL(IP5_27_24, MSIOF3_TXD_A, SEL_MSIOF3_0), 887 + PINMUX_IPSR_GPSR(IP5_27_24, VI4_DATA19), 888 + PINMUX_IPSR_GPSR(IP5_27_24, VI5_DATA3), 889 + 890 + PINMUX_IPSR_GPSR(IP5_31_28, D4), 891 + PINMUX_IPSR_MSEL(IP5_31_28, MSIOF2_SCK_B, SEL_MSIOF2_1), 892 + PINMUX_IPSR_GPSR(IP5_31_28, VI4_DATA20), 893 + PINMUX_IPSR_GPSR(IP5_31_28, VI5_DATA4), 894 + 895 + /* IPSR6 */ 896 + PINMUX_IPSR_GPSR(IP6_3_0, D5), 897 + PINMUX_IPSR_MSEL(IP6_3_0, MSIOF2_SYNC_B, SEL_MSIOF2_1), 898 + PINMUX_IPSR_GPSR(IP6_3_0, VI4_DATA21), 899 + PINMUX_IPSR_GPSR(IP6_3_0, VI5_DATA5), 900 + 901 + PINMUX_IPSR_GPSR(IP6_7_4, D6), 902 + PINMUX_IPSR_MSEL(IP6_7_4, MSIOF2_RXD_B, SEL_MSIOF2_1), 903 + PINMUX_IPSR_GPSR(IP6_7_4, VI4_DATA22), 904 + PINMUX_IPSR_GPSR(IP6_7_4, VI5_DATA6), 905 + 906 + PINMUX_IPSR_GPSR(IP6_11_8, D7), 907 + PINMUX_IPSR_MSEL(IP6_11_8, MSIOF2_TXD_B, SEL_MSIOF2_1), 908 + PINMUX_IPSR_GPSR(IP6_11_8, VI4_DATA23), 909 + PINMUX_IPSR_GPSR(IP6_11_8, VI5_DATA7), 910 + 911 + PINMUX_IPSR_GPSR(IP6_15_12, D8), 912 + PINMUX_IPSR_GPSR(IP6_15_12, LCDOUT0), 913 + PINMUX_IPSR_MSEL(IP6_15_12, MSIOF2_SCK_D, SEL_MSIOF2_3), 914 + PINMUX_IPSR_MSEL(IP6_15_12, SCK4_C, SEL_SCIF4_2), 915 + PINMUX_IPSR_MSEL(IP6_15_12, VI4_DATA0_A, SEL_VIN4_0), 916 + PINMUX_IPSR_GPSR(IP6_15_12, DU_DR0), 917 + 918 + PINMUX_IPSR_GPSR(IP6_19_16, D9), 919 + PINMUX_IPSR_GPSR(IP6_19_16, LCDOUT1), 920 + PINMUX_IPSR_MSEL(IP6_19_16, MSIOF2_SYNC_D, SEL_MSIOF2_3), 921 + PINMUX_IPSR_MSEL(IP6_19_16, VI4_DATA1_A, SEL_VIN4_0), 922 + PINMUX_IPSR_GPSR(IP6_19_16, DU_DR1), 923 + 924 + PINMUX_IPSR_GPSR(IP6_23_20, D10), 925 + PINMUX_IPSR_GPSR(IP6_23_20, LCDOUT2), 926 + PINMUX_IPSR_MSEL(IP6_23_20, MSIOF2_RXD_D, SEL_MSIOF2_3), 927 + PINMUX_IPSR_MSEL(IP6_23_20, HRX3_B, SEL_HSCIF3_1), 928 + PINMUX_IPSR_MSEL(IP6_23_20, VI4_DATA2_A, SEL_VIN4_0), 929 + PINMUX_IPSR_MSEL(IP6_23_20, CTS4_N_C, SEL_SCIF4_2), 930 + PINMUX_IPSR_GPSR(IP6_23_20, DU_DR2), 931 + 932 + PINMUX_IPSR_GPSR(IP6_27_24, D11), 933 + PINMUX_IPSR_GPSR(IP6_27_24, LCDOUT3), 934 + PINMUX_IPSR_MSEL(IP6_27_24, MSIOF2_TXD_D, SEL_MSIOF2_3), 935 + PINMUX_IPSR_MSEL(IP6_27_24, HTX3_B, SEL_HSCIF3_1), 936 + PINMUX_IPSR_MSEL(IP6_27_24, VI4_DATA3_A, SEL_VIN4_0), 937 + PINMUX_IPSR_MSEL(IP6_27_24, RTS4_N_TANS_C, SEL_SCIF4_2), 938 + PINMUX_IPSR_GPSR(IP6_27_24, DU_DR3), 939 + 940 + PINMUX_IPSR_GPSR(IP6_31_28, D12), 941 + PINMUX_IPSR_GPSR(IP6_31_28, LCDOUT4), 942 + PINMUX_IPSR_MSEL(IP6_31_28, MSIOF2_SS1_D, SEL_MSIOF2_3), 943 + PINMUX_IPSR_MSEL(IP6_31_28, RX4_C, SEL_SCIF4_2), 944 + PINMUX_IPSR_MSEL(IP6_31_28, VI4_DATA4_A, SEL_VIN4_0), 945 + PINMUX_IPSR_GPSR(IP6_31_28, DU_DR4), 946 + 947 + /* IPSR7 */ 948 + PINMUX_IPSR_GPSR(IP7_3_0, D13), 949 + PINMUX_IPSR_GPSR(IP7_3_0, LCDOUT5), 950 + PINMUX_IPSR_MSEL(IP7_3_0, MSIOF2_SS2_D, SEL_MSIOF2_3), 951 + PINMUX_IPSR_MSEL(IP7_3_0, TX4_C, SEL_SCIF4_2), 952 + PINMUX_IPSR_MSEL(IP7_3_0, VI4_DATA5_A, SEL_VIN4_0), 953 + PINMUX_IPSR_GPSR(IP7_3_0, DU_DR5), 954 + 955 + PINMUX_IPSR_GPSR(IP7_7_4, D14), 956 + PINMUX_IPSR_GPSR(IP7_7_4, LCDOUT6), 957 + PINMUX_IPSR_MSEL(IP7_7_4, MSIOF3_SS1_A, SEL_MSIOF3_0), 958 + PINMUX_IPSR_MSEL(IP7_7_4, HRX3_C, SEL_HSCIF3_2), 959 + PINMUX_IPSR_MSEL(IP7_7_4, VI4_DATA6_A, SEL_VIN4_0), 960 + PINMUX_IPSR_GPSR(IP7_7_4, DU_DR6), 961 + PINMUX_IPSR_MSEL(IP7_7_4, SCL6_C, SEL_I2C6_2), 962 + 963 + PINMUX_IPSR_GPSR(IP7_11_8, D15), 964 + PINMUX_IPSR_GPSR(IP7_11_8, LCDOUT7), 965 + PINMUX_IPSR_MSEL(IP7_11_8, MSIOF3_SS2_A, SEL_MSIOF3_0), 966 + PINMUX_IPSR_MSEL(IP7_11_8, HTX3_C, SEL_HSCIF3_2), 967 + PINMUX_IPSR_MSEL(IP7_11_8, VI4_DATA7_A, SEL_VIN4_0), 968 + PINMUX_IPSR_GPSR(IP7_11_8, DU_DR7), 969 + PINMUX_IPSR_MSEL(IP7_11_8, SDA6_C, SEL_I2C6_2), 970 + 971 + PINMUX_IPSR_GPSR(IP7_15_12, FSCLKST), 972 + 973 + PINMUX_IPSR_GPSR(IP7_19_16, SD0_CLK), 974 + PINMUX_IPSR_MSEL(IP7_19_16, MSIOF1_SCK_E, SEL_MSIOF1_4), 975 + PINMUX_IPSR_MSEL(IP7_19_16, STP_OPWM_0_B, SEL_SSP1_0_1), 976 + 977 + PINMUX_IPSR_GPSR(IP7_23_20, SD0_CMD), 978 + PINMUX_IPSR_MSEL(IP7_23_20, MSIOF1_SYNC_E, SEL_MSIOF1_4), 979 + PINMUX_IPSR_MSEL(IP7_23_20, STP_IVCXO27_0_B, SEL_SSP1_0_1), 980 + 981 + PINMUX_IPSR_GPSR(IP7_27_24, SD0_DAT0), 982 + PINMUX_IPSR_MSEL(IP7_27_24, MSIOF1_RXD_E, SEL_MSIOF1_4), 983 + PINMUX_IPSR_MSEL(IP7_27_24, TS_SCK0_B, SEL_TSIF0_1), 984 + PINMUX_IPSR_MSEL(IP7_27_24, STP_ISCLK_0_B, SEL_SSP1_0_1), 985 + 986 + PINMUX_IPSR_GPSR(IP7_31_28, SD0_DAT1), 987 + PINMUX_IPSR_MSEL(IP7_31_28, MSIOF1_TXD_E, SEL_MSIOF1_4), 988 + PINMUX_IPSR_MSEL(IP7_31_28, TS_SPSYNC0_B, SEL_TSIF0_1), 989 + PINMUX_IPSR_MSEL(IP7_31_28, STP_ISSYNC_0_B, SEL_SSP1_0_1), 990 + 991 + /* IPSR8 */ 992 + PINMUX_IPSR_GPSR(IP8_3_0, SD0_DAT2), 993 + PINMUX_IPSR_MSEL(IP8_3_0, MSIOF1_SS1_E, SEL_MSIOF1_4), 994 + PINMUX_IPSR_MSEL(IP8_3_0, TS_SDAT0_B, SEL_TSIF0_1), 995 + PINMUX_IPSR_MSEL(IP8_3_0, STP_ISD_0_B, SEL_SSP1_0_1), 996 + 997 + PINMUX_IPSR_GPSR(IP8_7_4, SD0_DAT3), 998 + PINMUX_IPSR_MSEL(IP8_7_4, MSIOF1_SS2_E, SEL_MSIOF1_4), 999 + PINMUX_IPSR_MSEL(IP8_7_4, TS_SDEN0_B, SEL_TSIF0_1), 1000 + PINMUX_IPSR_MSEL(IP8_7_4, STP_ISEN_0_B, SEL_SSP1_0_1), 1001 + 1002 + PINMUX_IPSR_GPSR(IP8_11_8, SD1_CLK), 1003 + PINMUX_IPSR_MSEL(IP8_11_8, MSIOF1_SCK_G, SEL_MSIOF1_6), 1004 + PINMUX_IPSR_MSEL(IP8_11_8, SIM0_CLK_A, SEL_SIMCARD_0), 1005 + 1006 + PINMUX_IPSR_GPSR(IP8_15_12, SD1_CMD), 1007 + PINMUX_IPSR_MSEL(IP8_15_12, MSIOF1_SYNC_G, SEL_MSIOF1_6), 1008 + PINMUX_IPSR_MSEL(IP8_15_12, NFCE_N_B, SEL_NDF_1), 1009 + PINMUX_IPSR_MSEL(IP8_15_12, SIM0_D_A, SEL_SIMCARD_0), 1010 + PINMUX_IPSR_MSEL(IP8_15_12, STP_IVCXO27_1_B, SEL_SSP1_1_1), 1011 + 1012 + PINMUX_IPSR_GPSR(IP8_19_16, SD1_DAT0), 1013 + PINMUX_IPSR_GPSR(IP8_19_16, SD2_DAT4), 1014 + PINMUX_IPSR_MSEL(IP8_19_16, MSIOF1_RXD_G, SEL_MSIOF1_6), 1015 + PINMUX_IPSR_MSEL(IP8_19_16, NFWP_N_B, SEL_NDF_1), 1016 + PINMUX_IPSR_MSEL(IP8_19_16, TS_SCK1_B, SEL_TSIF1_1), 1017 + PINMUX_IPSR_MSEL(IP8_19_16, STP_ISCLK_1_B, SEL_SSP1_1_1), 1018 + 1019 + PINMUX_IPSR_GPSR(IP8_23_20, SD1_DAT1), 1020 + PINMUX_IPSR_GPSR(IP8_23_20, SD2_DAT5), 1021 + PINMUX_IPSR_MSEL(IP8_23_20, MSIOF1_TXD_G, SEL_MSIOF1_6), 1022 + PINMUX_IPSR_MSEL(IP8_23_20, NFDATA14_B, SEL_NDF_1), 1023 + PINMUX_IPSR_MSEL(IP8_23_20, TS_SPSYNC1_B, SEL_TSIF1_1), 1024 + PINMUX_IPSR_MSEL(IP8_23_20, STP_ISSYNC_1_B, SEL_SSP1_1_1), 1025 + 1026 + PINMUX_IPSR_GPSR(IP8_27_24, SD1_DAT2), 1027 + PINMUX_IPSR_GPSR(IP8_27_24, SD2_DAT6), 1028 + PINMUX_IPSR_MSEL(IP8_27_24, MSIOF1_SS1_G, SEL_MSIOF1_6), 1029 + PINMUX_IPSR_MSEL(IP8_27_24, NFDATA15_B, SEL_NDF_1), 1030 + PINMUX_IPSR_MSEL(IP8_27_24, TS_SDAT1_B, SEL_TSIF1_1), 1031 + PINMUX_IPSR_MSEL(IP8_27_24, STP_ISD_1_B, SEL_SSP1_1_1), 1032 + 1033 + PINMUX_IPSR_GPSR(IP8_31_28, SD1_DAT3), 1034 + PINMUX_IPSR_GPSR(IP8_31_28, SD2_DAT7), 1035 + PINMUX_IPSR_MSEL(IP8_31_28, MSIOF1_SS2_G, SEL_MSIOF1_6), 1036 + PINMUX_IPSR_MSEL(IP8_31_28, NFRB_N_B, SEL_NDF_1), 1037 + PINMUX_IPSR_MSEL(IP8_31_28, TS_SDEN1_B, SEL_TSIF1_1), 1038 + PINMUX_IPSR_MSEL(IP8_31_28, STP_ISEN_1_B, SEL_SSP1_1_1), 1039 + 1040 + /* IPSR9 */ 1041 + PINMUX_IPSR_GPSR(IP9_3_0, SD2_CLK), 1042 + PINMUX_IPSR_GPSR(IP9_3_0, NFDATA8), 1043 + 1044 + PINMUX_IPSR_GPSR(IP9_7_4, SD2_CMD), 1045 + PINMUX_IPSR_GPSR(IP9_7_4, NFDATA9), 1046 + 1047 + PINMUX_IPSR_GPSR(IP9_11_8, SD2_DAT0), 1048 + PINMUX_IPSR_GPSR(IP9_11_8, NFDATA10), 1049 + 1050 + PINMUX_IPSR_GPSR(IP9_15_12, SD2_DAT1), 1051 + PINMUX_IPSR_GPSR(IP9_15_12, NFDATA11), 1052 + 1053 + PINMUX_IPSR_GPSR(IP9_19_16, SD2_DAT2), 1054 + PINMUX_IPSR_GPSR(IP9_19_16, NFDATA12), 1055 + 1056 + PINMUX_IPSR_GPSR(IP9_23_20, SD2_DAT3), 1057 + PINMUX_IPSR_GPSR(IP9_23_20, NFDATA13), 1058 + 1059 + PINMUX_IPSR_GPSR(IP9_27_24, SD2_DS), 1060 + PINMUX_IPSR_GPSR(IP9_27_24, NFALE), 1061 + 1062 + PINMUX_IPSR_GPSR(IP9_31_28, SD3_CLK), 1063 + PINMUX_IPSR_GPSR(IP9_31_28, NFWE_N), 1064 + 1065 + /* IPSR10 */ 1066 + PINMUX_IPSR_GPSR(IP10_3_0, SD3_CMD), 1067 + PINMUX_IPSR_GPSR(IP10_3_0, NFRE_N), 1068 + 1069 + PINMUX_IPSR_GPSR(IP10_7_4, SD3_DAT0), 1070 + PINMUX_IPSR_GPSR(IP10_7_4, NFDATA0), 1071 + 1072 + PINMUX_IPSR_GPSR(IP10_11_8, SD3_DAT1), 1073 + PINMUX_IPSR_GPSR(IP10_11_8, NFDATA1), 1074 + 1075 + PINMUX_IPSR_GPSR(IP10_15_12, SD3_DAT2), 1076 + PINMUX_IPSR_GPSR(IP10_15_12, NFDATA2), 1077 + 1078 + PINMUX_IPSR_GPSR(IP10_19_16, SD3_DAT3), 1079 + PINMUX_IPSR_GPSR(IP10_19_16, NFDATA3), 1080 + 1081 + PINMUX_IPSR_GPSR(IP10_23_20, SD3_DAT4), 1082 + PINMUX_IPSR_MSEL(IP10_23_20, SD2_CD_A, SEL_SDHI2_0), 1083 + PINMUX_IPSR_GPSR(IP10_23_20, NFDATA4), 1084 + 1085 + PINMUX_IPSR_GPSR(IP10_27_24, SD3_DAT5), 1086 + PINMUX_IPSR_MSEL(IP10_27_24, SD2_WP_A, SEL_SDHI2_0), 1087 + PINMUX_IPSR_GPSR(IP10_27_24, NFDATA5), 1088 + 1089 + PINMUX_IPSR_GPSR(IP10_31_28, SD3_DAT6), 1090 + PINMUX_IPSR_GPSR(IP10_31_28, SD3_CD), 1091 + PINMUX_IPSR_GPSR(IP10_31_28, NFDATA6), 1092 + 1093 + /* IPSR11 */ 1094 + PINMUX_IPSR_GPSR(IP11_3_0, SD3_DAT7), 1095 + PINMUX_IPSR_GPSR(IP11_3_0, SD3_WP), 1096 + PINMUX_IPSR_GPSR(IP11_3_0, NFDATA7), 1097 + 1098 + PINMUX_IPSR_GPSR(IP11_7_4, SD3_DS), 1099 + PINMUX_IPSR_GPSR(IP11_7_4, NFCLE), 1100 + 1101 + PINMUX_IPSR_GPSR(IP11_11_8, SD0_CD), 1102 + PINMUX_IPSR_MSEL(IP11_11_8, SCL2_B, SEL_I2C2_1), 1103 + PINMUX_IPSR_MSEL(IP11_11_8, SIM0_RST_A, SEL_SIMCARD_0), 1104 + 1105 + PINMUX_IPSR_GPSR(IP11_15_12, SD0_WP), 1106 + PINMUX_IPSR_MSEL(IP11_15_12, SDA2_B, SEL_I2C2_1), 1107 + 1108 + PINMUX_IPSR_GPSR(IP11_19_16, SD1_CD), 1109 + PINMUX_IPSR_MSEL(IP11_19_16, SIM0_CLK_B, SEL_SIMCARD_1), 1110 + 1111 + PINMUX_IPSR_GPSR(IP11_23_20, SD1_WP), 1112 + PINMUX_IPSR_MSEL(IP11_23_20, SIM0_D_B, SEL_SIMCARD_1), 1113 + 1114 + PINMUX_IPSR_GPSR(IP11_27_24, SCK0), 1115 + PINMUX_IPSR_MSEL(IP11_27_24, HSCK1_B, SEL_HSCIF1_1), 1116 + PINMUX_IPSR_MSEL(IP11_27_24, MSIOF1_SS2_B, SEL_MSIOF1_1), 1117 + PINMUX_IPSR_MSEL(IP11_27_24, AUDIO_CLKC_B, SEL_ADG_C_1), 1118 + PINMUX_IPSR_MSEL(IP11_27_24, SDA2_A, SEL_I2C2_0), 1119 + PINMUX_IPSR_MSEL(IP11_27_24, SIM0_RST_B, SEL_SIMCARD_1), 1120 + PINMUX_IPSR_MSEL(IP11_27_24, STP_OPWM_0_C, SEL_SSP1_0_2), 1121 + PINMUX_IPSR_MSEL(IP11_27_24, RIF0_CLK_B, SEL_DRIF0_1), 1122 + PINMUX_IPSR_GPSR(IP11_27_24, ADICHS2), 1123 + PINMUX_IPSR_MSEL(IP11_27_24, SCK5_B, SEL_SCIF5_1), 1124 + 1125 + PINMUX_IPSR_GPSR(IP11_31_28, RX0), 1126 + PINMUX_IPSR_MSEL(IP11_31_28, HRX1_B, SEL_HSCIF1_1), 1127 + PINMUX_IPSR_MSEL(IP11_31_28, TS_SCK0_C, SEL_TSIF0_2), 1128 + PINMUX_IPSR_MSEL(IP11_31_28, STP_ISCLK_0_C, SEL_SSP1_0_2), 1129 + PINMUX_IPSR_MSEL(IP11_31_28, RIF0_D0_B, SEL_DRIF0_1), 1130 + 1131 + /* IPSR12 */ 1132 + PINMUX_IPSR_GPSR(IP12_3_0, TX0), 1133 + PINMUX_IPSR_MSEL(IP12_3_0, HTX1_B, SEL_HSCIF1_1), 1134 + PINMUX_IPSR_MSEL(IP12_3_0, TS_SPSYNC0_C, SEL_TSIF0_2), 1135 + PINMUX_IPSR_MSEL(IP12_3_0, STP_ISSYNC_0_C, SEL_SSP1_0_2), 1136 + PINMUX_IPSR_MSEL(IP12_3_0, RIF0_D1_B, SEL_DRIF0_1), 1137 + 1138 + PINMUX_IPSR_GPSR(IP12_7_4, CTS0_N), 1139 + PINMUX_IPSR_MSEL(IP12_7_4, HCTS1_N_B, SEL_HSCIF1_1), 1140 + PINMUX_IPSR_MSEL(IP12_7_4, MSIOF1_SYNC_B, SEL_MSIOF1_1), 1141 + PINMUX_IPSR_MSEL(IP12_7_4, TS_SPSYNC1_C, SEL_TSIF1_2), 1142 + PINMUX_IPSR_MSEL(IP12_7_4, STP_ISSYNC_1_C, SEL_SSP1_1_2), 1143 + PINMUX_IPSR_MSEL(IP12_7_4, RIF1_SYNC_B, SEL_DRIF1_1), 1144 + PINMUX_IPSR_GPSR(IP12_7_4, AUDIO_CLKOUT_C), 1145 + PINMUX_IPSR_GPSR(IP12_7_4, ADICS_SAMP), 1146 + 1147 + PINMUX_IPSR_GPSR(IP12_11_8, RTS0_N_TANS), 1148 + PINMUX_IPSR_MSEL(IP12_11_8, HRTS1_N_B, SEL_HSCIF1_1), 1149 + PINMUX_IPSR_MSEL(IP12_11_8, MSIOF1_SS1_B, SEL_MSIOF1_1), 1150 + PINMUX_IPSR_MSEL(IP12_11_8, AUDIO_CLKA_B, SEL_ADG_A_1), 1151 + PINMUX_IPSR_MSEL(IP12_11_8, SCL2_A, SEL_I2C2_0), 1152 + PINMUX_IPSR_MSEL(IP12_11_8, STP_IVCXO27_1_C, SEL_SSP1_1_2), 1153 + PINMUX_IPSR_MSEL(IP12_11_8, RIF0_SYNC_B, SEL_DRIF0_1), 1154 + PINMUX_IPSR_MSEL(IP12_11_8, FSO_TOE_A, SEL_FSO_0), 1155 + PINMUX_IPSR_GPSR(IP12_11_8, ADICHS1), 1156 + 1157 + PINMUX_IPSR_MSEL(IP12_15_12, RX1_A, SEL_SCIF1_0), 1158 + PINMUX_IPSR_MSEL(IP12_15_12, HRX1_A, SEL_HSCIF1_0), 1159 + PINMUX_IPSR_MSEL(IP12_15_12, TS_SDAT0_C, SEL_TSIF0_2), 1160 + PINMUX_IPSR_MSEL(IP12_15_12, STP_ISD_0_C, SEL_SSP1_0_2), 1161 + PINMUX_IPSR_MSEL(IP12_15_12, RIF1_CLK_C, SEL_DRIF1_2), 1162 + 1163 + PINMUX_IPSR_MSEL(IP12_19_16, TX1_A, SEL_SCIF1_0), 1164 + PINMUX_IPSR_MSEL(IP12_19_16, HTX1_A, SEL_HSCIF1_0), 1165 + PINMUX_IPSR_MSEL(IP12_19_16, TS_SDEN0_C, SEL_TSIF0_2), 1166 + PINMUX_IPSR_MSEL(IP12_19_16, STP_ISEN_0_C, SEL_SSP1_0_2), 1167 + PINMUX_IPSR_MSEL(IP12_19_16, RIF1_D0_C, SEL_DRIF1_2), 1168 + 1169 + PINMUX_IPSR_GPSR(IP12_23_20, CTS1_N), 1170 + PINMUX_IPSR_MSEL(IP12_23_20, HCTS1_N_A, SEL_HSCIF1_0), 1171 + PINMUX_IPSR_MSEL(IP12_23_20, MSIOF1_RXD_B, SEL_MSIOF1_1), 1172 + PINMUX_IPSR_MSEL(IP12_23_20, TS_SDEN1_C, SEL_TSIF1_2), 1173 + PINMUX_IPSR_MSEL(IP12_23_20, STP_ISEN_1_C, SEL_SSP1_1_2), 1174 + PINMUX_IPSR_MSEL(IP12_23_20, RIF1_D0_B, SEL_DRIF1_1), 1175 + PINMUX_IPSR_GPSR(IP12_23_20, ADIDATA), 1176 + 1177 + PINMUX_IPSR_GPSR(IP12_27_24, RTS1_N_TANS), 1178 + PINMUX_IPSR_MSEL(IP12_27_24, HRTS1_N_A, SEL_HSCIF1_0), 1179 + PINMUX_IPSR_MSEL(IP12_27_24, MSIOF1_TXD_B, SEL_MSIOF1_1), 1180 + PINMUX_IPSR_MSEL(IP12_27_24, TS_SDAT1_C, SEL_TSIF1_2), 1181 + PINMUX_IPSR_MSEL(IP12_27_24, STP_ISD_1_C, SEL_SSP1_1_2), 1182 + PINMUX_IPSR_MSEL(IP12_27_24, RIF1_D1_B, SEL_DRIF1_1), 1183 + PINMUX_IPSR_GPSR(IP12_27_24, ADICHS0), 1184 + 1185 + PINMUX_IPSR_GPSR(IP12_31_28, SCK2), 1186 + PINMUX_IPSR_MSEL(IP12_31_28, SCIF_CLK_B, SEL_SCIF1_1), 1187 + PINMUX_IPSR_MSEL(IP12_31_28, MSIOF1_SCK_B, SEL_MSIOF1_1), 1188 + PINMUX_IPSR_MSEL(IP12_31_28, TS_SCK1_C, SEL_TSIF1_2), 1189 + PINMUX_IPSR_MSEL(IP12_31_28, STP_ISCLK_1_C, SEL_SSP1_1_2), 1190 + PINMUX_IPSR_MSEL(IP12_31_28, RIF1_CLK_B, SEL_DRIF1_1), 1191 + PINMUX_IPSR_GPSR(IP12_31_28, ADICLK), 1192 + 1193 + /* IPSR13 */ 1194 + PINMUX_IPSR_MSEL(IP13_3_0, TX2_A, SEL_SCIF2_0), 1195 + PINMUX_IPSR_MSEL(IP13_3_0, SD2_CD_B, SEL_SDHI2_1), 1196 + PINMUX_IPSR_MSEL(IP13_3_0, SCL1_A, SEL_I2C1_0), 1197 + PINMUX_IPSR_MSEL(IP13_3_0, FMCLK_A, SEL_FM_0), 1198 + PINMUX_IPSR_MSEL(IP13_3_0, RIF1_D1_C, SEL_DRIF1_2), 1199 + PINMUX_IPSR_MSEL(IP13_3_0, FSO_CFE_0_B, SEL_FSO_1), 1200 + 1201 + PINMUX_IPSR_MSEL(IP13_7_4, RX2_A, SEL_SCIF2_0), 1202 + PINMUX_IPSR_MSEL(IP13_7_4, SD2_WP_B, SEL_SDHI2_1), 1203 + PINMUX_IPSR_MSEL(IP13_7_4, SDA1_A, SEL_I2C1_0), 1204 + PINMUX_IPSR_MSEL(IP13_7_4, FMIN_A, SEL_FM_0), 1205 + PINMUX_IPSR_MSEL(IP13_7_4, RIF1_SYNC_C, SEL_DRIF1_2), 1206 + PINMUX_IPSR_MSEL(IP13_7_4, FSO_CFE_1_B, SEL_FSO_1), 1207 + 1208 + PINMUX_IPSR_GPSR(IP13_11_8, HSCK0), 1209 + PINMUX_IPSR_MSEL(IP13_11_8, MSIOF1_SCK_D, SEL_MSIOF1_3), 1210 + PINMUX_IPSR_MSEL(IP13_11_8, AUDIO_CLKB_A, SEL_ADG_B_0), 1211 + PINMUX_IPSR_MSEL(IP13_11_8, SSI_SDATA1_B, SEL_SSI_1), 1212 + PINMUX_IPSR_MSEL(IP13_11_8, TS_SCK0_D, SEL_TSIF0_3), 1213 + PINMUX_IPSR_MSEL(IP13_11_8, STP_ISCLK_0_D, SEL_SSP1_0_3), 1214 + PINMUX_IPSR_MSEL(IP13_11_8, RIF0_CLK_C, SEL_DRIF0_2), 1215 + PINMUX_IPSR_MSEL(IP13_11_8, RX5_B, SEL_SCIF5_1), 1216 + 1217 + PINMUX_IPSR_GPSR(IP13_15_12, HRX0), 1218 + PINMUX_IPSR_MSEL(IP13_15_12, MSIOF1_RXD_D, SEL_MSIOF1_3), 1219 + PINMUX_IPSR_MSEL(IP13_15_12, SSI_SDATA2_B, SEL_SSI_1), 1220 + PINMUX_IPSR_MSEL(IP13_15_12, TS_SDEN0_D, SEL_TSIF0_3), 1221 + PINMUX_IPSR_MSEL(IP13_15_12, STP_ISEN_0_D, SEL_SSP1_0_3), 1222 + PINMUX_IPSR_MSEL(IP13_15_12, RIF0_D0_C, SEL_DRIF0_2), 1223 + 1224 + PINMUX_IPSR_GPSR(IP13_19_16, HTX0), 1225 + PINMUX_IPSR_MSEL(IP13_19_16, MSIOF1_TXD_D, SEL_MSIOF1_3), 1226 + PINMUX_IPSR_MSEL(IP13_19_16, SSI_SDATA9_B, SEL_SSI_1), 1227 + PINMUX_IPSR_MSEL(IP13_19_16, TS_SDAT0_D, SEL_TSIF0_3), 1228 + PINMUX_IPSR_MSEL(IP13_19_16, STP_ISD_0_D, SEL_SSP1_0_3), 1229 + PINMUX_IPSR_MSEL(IP13_19_16, RIF0_D1_C, SEL_DRIF0_2), 1230 + 1231 + PINMUX_IPSR_GPSR(IP13_23_20, HCTS0_N), 1232 + PINMUX_IPSR_MSEL(IP13_23_20, RX2_B, SEL_SCIF2_1), 1233 + PINMUX_IPSR_MSEL(IP13_23_20, MSIOF1_SYNC_D, SEL_MSIOF1_3), 1234 + PINMUX_IPSR_MSEL(IP13_23_20, SSI_SCK9_A, SEL_SSI_0), 1235 + PINMUX_IPSR_MSEL(IP13_23_20, TS_SPSYNC0_D, SEL_TSIF0_3), 1236 + PINMUX_IPSR_MSEL(IP13_23_20, STP_ISSYNC_0_D, SEL_SSP1_0_3), 1237 + PINMUX_IPSR_MSEL(IP13_23_20, RIF0_SYNC_C, SEL_DRIF0_2), 1238 + PINMUX_IPSR_GPSR(IP13_23_20, AUDIO_CLKOUT1_A), 1239 + 1240 + PINMUX_IPSR_GPSR(IP13_27_24, HRTS0_N), 1241 + PINMUX_IPSR_MSEL(IP13_27_24, TX2_B, SEL_SCIF2_1), 1242 + PINMUX_IPSR_MSEL(IP13_27_24, MSIOF1_SS1_D, SEL_MSIOF1_3), 1243 + PINMUX_IPSR_MSEL(IP13_27_24, SSI_WS9_A, SEL_SSI_0), 1244 + PINMUX_IPSR_MSEL(IP13_27_24, STP_IVCXO27_0_D, SEL_SSP1_0_3), 1245 + PINMUX_IPSR_MSEL(IP13_27_24, BPFCLK_A, SEL_FM_0), 1246 + PINMUX_IPSR_GPSR(IP13_27_24, AUDIO_CLKOUT2_A), 1247 + 1248 + PINMUX_IPSR_GPSR(IP13_31_28, MSIOF0_SYNC), 1249 + PINMUX_IPSR_GPSR(IP13_31_28, AUDIO_CLKOUT_A), 1250 + PINMUX_IPSR_MSEL(IP13_31_28, TX5_B, SEL_SCIF5_1), 1251 + PINMUX_IPSR_MSEL(IP13_31_28, BPFCLK_D, SEL_FM_3), 1252 + 1253 + /* IPSR14 */ 1254 + PINMUX_IPSR_GPSR(IP14_3_0, MSIOF0_SS1), 1255 + PINMUX_IPSR_MSEL(IP14_3_0, RX5_A, SEL_SCIF5_0), 1256 + PINMUX_IPSR_MSEL(IP14_3_0, NFWP_N_A, SEL_NDF_0), 1257 + PINMUX_IPSR_MSEL(IP14_3_0, AUDIO_CLKA_C, SEL_ADG_A_2), 1258 + PINMUX_IPSR_MSEL(IP14_3_0, SSI_SCK2_A, SEL_SSI_0), 1259 + PINMUX_IPSR_MSEL(IP14_3_0, STP_IVCXO27_0_C, SEL_SSP1_0_2), 1260 + PINMUX_IPSR_GPSR(IP14_3_0, AUDIO_CLKOUT3_A), 1261 + PINMUX_IPSR_MSEL(IP14_3_0, TCLK1_B, SEL_TIMER_TMU_1), 1262 + 1263 + PINMUX_IPSR_GPSR(IP14_7_4, MSIOF0_SS2), 1264 + PINMUX_IPSR_MSEL(IP14_7_4, TX5_A, SEL_SCIF5_0), 1265 + PINMUX_IPSR_MSEL(IP14_7_4, MSIOF1_SS2_D, SEL_MSIOF1_3), 1266 + PINMUX_IPSR_MSEL(IP14_7_4, AUDIO_CLKC_A, SEL_ADG_C_0), 1267 + PINMUX_IPSR_MSEL(IP14_7_4, SSI_WS2_A, SEL_SSI_0), 1268 + PINMUX_IPSR_MSEL(IP14_7_4, STP_OPWM_0_D, SEL_SSP1_0_3), 1269 + PINMUX_IPSR_GPSR(IP14_7_4, AUDIO_CLKOUT_D), 1270 + PINMUX_IPSR_MSEL(IP14_7_4, SPEEDIN_B, SEL_SPEED_PULSE_1), 1271 + 1272 + PINMUX_IPSR_GPSR(IP14_11_8, MLB_CLK), 1273 + PINMUX_IPSR_MSEL(IP14_11_8, MSIOF1_SCK_F, SEL_MSIOF1_5), 1274 + PINMUX_IPSR_MSEL(IP14_11_8, SCL1_B, SEL_I2C1_1), 1275 + 1276 + PINMUX_IPSR_GPSR(IP14_15_12, MLB_SIG), 1277 + PINMUX_IPSR_MSEL(IP14_15_12, RX1_B, SEL_SCIF1_1), 1278 + PINMUX_IPSR_MSEL(IP14_15_12, MSIOF1_SYNC_F, SEL_MSIOF1_5), 1279 + PINMUX_IPSR_MSEL(IP14_15_12, SDA1_B, SEL_I2C1_1), 1280 + 1281 + PINMUX_IPSR_GPSR(IP14_19_16, MLB_DAT), 1282 + PINMUX_IPSR_MSEL(IP14_19_16, TX1_B, SEL_SCIF1_1), 1283 + PINMUX_IPSR_MSEL(IP14_19_16, MSIOF1_RXD_F, SEL_MSIOF1_5), 1284 + 1285 + PINMUX_IPSR_GPSR(IP14_23_20, SSI_SCK0129), 1286 + PINMUX_IPSR_MSEL(IP14_23_20, MSIOF1_TXD_F, SEL_MSIOF1_5), 1287 + 1288 + PINMUX_IPSR_GPSR(IP14_27_24, SSI_WS0129), 1289 + PINMUX_IPSR_MSEL(IP14_27_24, MSIOF1_SS1_F, SEL_MSIOF1_5), 1290 + 1291 + PINMUX_IPSR_GPSR(IP14_31_28, SSI_SDATA0), 1292 + PINMUX_IPSR_MSEL(IP14_31_28, MSIOF1_SS2_F, SEL_MSIOF1_5), 1293 + 1294 + /* IPSR15 */ 1295 + PINMUX_IPSR_MSEL(IP15_3_0, SSI_SDATA1_A, SEL_SSI_0), 1296 + 1297 + PINMUX_IPSR_MSEL(IP15_7_4, SSI_SDATA2_A, SEL_SSI_0), 1298 + PINMUX_IPSR_MSEL(IP15_7_4, SSI_SCK1_B, SEL_SSI_1), 1299 + 1300 + PINMUX_IPSR_GPSR(IP15_11_8, SSI_SCK34), 1301 + PINMUX_IPSR_MSEL(IP15_11_8, MSIOF1_SS1_A, SEL_MSIOF1_0), 1302 + PINMUX_IPSR_MSEL(IP15_11_8, STP_OPWM_0_A, SEL_SSP1_0_0), 1303 + 1304 + PINMUX_IPSR_GPSR(IP15_15_12, SSI_WS34), 1305 + PINMUX_IPSR_MSEL(IP15_15_12, HCTS2_N_A, SEL_HSCIF2_0), 1306 + PINMUX_IPSR_MSEL(IP15_15_12, MSIOF1_SS2_A, SEL_MSIOF1_0), 1307 + PINMUX_IPSR_MSEL(IP15_15_12, STP_IVCXO27_0_A, SEL_SSP1_0_0), 1308 + 1309 + PINMUX_IPSR_GPSR(IP15_19_16, SSI_SDATA3), 1310 + PINMUX_IPSR_MSEL(IP15_19_16, HRTS2_N_A, SEL_HSCIF2_0), 1311 + PINMUX_IPSR_MSEL(IP15_19_16, MSIOF1_TXD_A, SEL_MSIOF1_0), 1312 + PINMUX_IPSR_MSEL(IP15_19_16, TS_SCK0_A, SEL_TSIF0_0), 1313 + PINMUX_IPSR_MSEL(IP15_19_16, STP_ISCLK_0_A, SEL_SSP1_0_0), 1314 + PINMUX_IPSR_MSEL(IP15_19_16, RIF0_D1_A, SEL_DRIF0_0), 1315 + PINMUX_IPSR_MSEL(IP15_19_16, RIF2_D0_A, SEL_DRIF2_0), 1316 + 1317 + PINMUX_IPSR_GPSR(IP15_23_20, SSI_SCK4), 1318 + PINMUX_IPSR_MSEL(IP15_23_20, HRX2_A, SEL_HSCIF2_0), 1319 + PINMUX_IPSR_MSEL(IP15_23_20, MSIOF1_SCK_A, SEL_MSIOF1_0), 1320 + PINMUX_IPSR_MSEL(IP15_23_20, TS_SDAT0_A, SEL_TSIF0_0), 1321 + PINMUX_IPSR_MSEL(IP15_23_20, STP_ISD_0_A, SEL_SSP1_0_0), 1322 + PINMUX_IPSR_MSEL(IP15_23_20, RIF0_CLK_A, SEL_DRIF0_0), 1323 + PINMUX_IPSR_MSEL(IP15_23_20, RIF2_CLK_A, SEL_DRIF2_0), 1324 + 1325 + PINMUX_IPSR_GPSR(IP15_27_24, SSI_WS4), 1326 + PINMUX_IPSR_MSEL(IP15_27_24, HTX2_A, SEL_HSCIF2_0), 1327 + PINMUX_IPSR_MSEL(IP15_27_24, MSIOF1_SYNC_A, SEL_MSIOF1_0), 1328 + PINMUX_IPSR_MSEL(IP15_27_24, TS_SDEN0_A, SEL_TSIF0_0), 1329 + PINMUX_IPSR_MSEL(IP15_27_24, STP_ISEN_0_A, SEL_SSP1_0_0), 1330 + PINMUX_IPSR_MSEL(IP15_27_24, RIF0_SYNC_A, SEL_DRIF0_0), 1331 + PINMUX_IPSR_MSEL(IP15_27_24, RIF2_SYNC_A, SEL_DRIF2_0), 1332 + 1333 + PINMUX_IPSR_GPSR(IP15_31_28, SSI_SDATA4), 1334 + PINMUX_IPSR_MSEL(IP15_31_28, HSCK2_A, SEL_HSCIF2_0), 1335 + PINMUX_IPSR_MSEL(IP15_31_28, MSIOF1_RXD_A, SEL_MSIOF1_0), 1336 + PINMUX_IPSR_MSEL(IP15_31_28, TS_SPSYNC0_A, SEL_TSIF0_0), 1337 + PINMUX_IPSR_MSEL(IP15_31_28, STP_ISSYNC_0_A, SEL_SSP1_0_0), 1338 + PINMUX_IPSR_MSEL(IP15_31_28, RIF0_D0_A, SEL_DRIF0_0), 1339 + PINMUX_IPSR_MSEL(IP15_31_28, RIF2_D1_A, SEL_DRIF2_0), 1340 + 1341 + /* IPSR16 */ 1342 + PINMUX_IPSR_GPSR(IP16_3_0, SSI_SCK6), 1343 + PINMUX_IPSR_MSEL(IP16_3_0, SIM0_RST_D, SEL_SIMCARD_3), 1344 + 1345 + PINMUX_IPSR_GPSR(IP16_7_4, SSI_WS6), 1346 + PINMUX_IPSR_MSEL(IP16_7_4, SIM0_D_D, SEL_SIMCARD_3), 1347 + 1348 + PINMUX_IPSR_GPSR(IP16_11_8, SSI_SDATA6), 1349 + PINMUX_IPSR_MSEL(IP16_11_8, SIM0_CLK_D, SEL_SIMCARD_3), 1350 + 1351 + PINMUX_IPSR_GPSR(IP16_15_12, SSI_SCK78), 1352 + PINMUX_IPSR_MSEL(IP16_15_12, HRX2_B, SEL_HSCIF2_1), 1353 + PINMUX_IPSR_MSEL(IP16_15_12, MSIOF1_SCK_C, SEL_MSIOF1_2), 1354 + PINMUX_IPSR_MSEL(IP16_15_12, TS_SCK1_A, SEL_TSIF1_0), 1355 + PINMUX_IPSR_MSEL(IP16_15_12, STP_ISCLK_1_A, SEL_SSP1_1_0), 1356 + PINMUX_IPSR_MSEL(IP16_15_12, RIF1_CLK_A, SEL_DRIF1_0), 1357 + PINMUX_IPSR_MSEL(IP16_15_12, RIF3_CLK_A, SEL_DRIF3_0), 1358 + 1359 + PINMUX_IPSR_GPSR(IP16_19_16, SSI_WS78), 1360 + PINMUX_IPSR_MSEL(IP16_19_16, HTX2_B, SEL_HSCIF2_1), 1361 + PINMUX_IPSR_MSEL(IP16_19_16, MSIOF1_SYNC_C, SEL_MSIOF1_2), 1362 + PINMUX_IPSR_MSEL(IP16_19_16, TS_SDAT1_A, SEL_TSIF1_0), 1363 + PINMUX_IPSR_MSEL(IP16_19_16, STP_ISD_1_A, SEL_SSP1_1_0), 1364 + PINMUX_IPSR_MSEL(IP16_19_16, RIF1_SYNC_A, SEL_DRIF1_0), 1365 + PINMUX_IPSR_MSEL(IP16_19_16, RIF3_SYNC_A, SEL_DRIF3_0), 1366 + 1367 + PINMUX_IPSR_GPSR(IP16_23_20, SSI_SDATA7), 1368 + PINMUX_IPSR_MSEL(IP16_23_20, HCTS2_N_B, SEL_HSCIF2_1), 1369 + PINMUX_IPSR_MSEL(IP16_23_20, MSIOF1_RXD_C, SEL_MSIOF1_2), 1370 + PINMUX_IPSR_MSEL(IP16_23_20, TS_SDEN1_A, SEL_TSIF1_0), 1371 + PINMUX_IPSR_MSEL(IP16_23_20, STP_ISEN_1_A, SEL_SSP1_1_0), 1372 + PINMUX_IPSR_MSEL(IP16_23_20, RIF1_D0_A, SEL_DRIF1_0), 1373 + PINMUX_IPSR_MSEL(IP16_23_20, RIF3_D0_A, SEL_DRIF3_0), 1374 + PINMUX_IPSR_MSEL(IP16_23_20, TCLK2_A, SEL_TIMER_TMU_0), 1375 + 1376 + PINMUX_IPSR_GPSR(IP16_27_24, SSI_SDATA8), 1377 + PINMUX_IPSR_MSEL(IP16_27_24, HRTS2_N_B, SEL_HSCIF2_1), 1378 + PINMUX_IPSR_MSEL(IP16_27_24, MSIOF1_TXD_C, SEL_MSIOF1_2), 1379 + PINMUX_IPSR_MSEL(IP16_27_24, TS_SPSYNC1_A, SEL_TSIF1_0), 1380 + PINMUX_IPSR_MSEL(IP16_27_24, STP_ISSYNC_1_A, SEL_SSP1_1_0), 1381 + PINMUX_IPSR_MSEL(IP16_27_24, RIF1_D1_A, SEL_DRIF1_0), 1382 + PINMUX_IPSR_MSEL(IP16_27_24, RIF3_D1_A, SEL_DRIF3_0), 1383 + 1384 + PINMUX_IPSR_MSEL(IP16_31_28, SSI_SDATA9_A, SEL_SSI_0), 1385 + PINMUX_IPSR_MSEL(IP16_31_28, HSCK2_B, SEL_HSCIF2_1), 1386 + PINMUX_IPSR_MSEL(IP16_31_28, MSIOF1_SS1_C, SEL_MSIOF1_2), 1387 + PINMUX_IPSR_MSEL(IP16_31_28, HSCK1_A, SEL_HSCIF1_0), 1388 + PINMUX_IPSR_MSEL(IP16_31_28, SSI_WS1_B, SEL_SSI_1), 1389 + PINMUX_IPSR_GPSR(IP16_31_28, SCK1), 1390 + PINMUX_IPSR_MSEL(IP16_31_28, STP_IVCXO27_1_A, SEL_SSP1_1_0), 1391 + PINMUX_IPSR_GPSR(IP16_31_28, SCK5_A), 1392 + 1393 + /* IPSR17 */ 1394 + PINMUX_IPSR_MSEL(IP17_3_0, AUDIO_CLKA_A, SEL_ADG_A_0), 1395 + PINMUX_IPSR_GPSR(IP17_3_0, CC5_OSCOUT), 1396 + 1397 + PINMUX_IPSR_MSEL(IP17_7_4, AUDIO_CLKB_B, SEL_ADG_B_1), 1398 + PINMUX_IPSR_MSEL(IP17_7_4, SCIF_CLK_A, SEL_SCIF1_0), 1399 + PINMUX_IPSR_MSEL(IP17_7_4, STP_IVCXO27_1_D, SEL_SSP1_1_3), 1400 + PINMUX_IPSR_MSEL(IP17_7_4, REMOCON_A, SEL_REMOCON_0), 1401 + PINMUX_IPSR_MSEL(IP17_7_4, TCLK1_A, SEL_TIMER_TMU_0), 1402 + 1403 + PINMUX_IPSR_GPSR(IP17_11_8, USB0_PWEN), 1404 + PINMUX_IPSR_MSEL(IP17_11_8, SIM0_RST_C, SEL_SIMCARD_2), 1405 + PINMUX_IPSR_MSEL(IP17_11_8, TS_SCK1_D, SEL_TSIF1_3), 1406 + PINMUX_IPSR_MSEL(IP17_11_8, STP_ISCLK_1_D, SEL_SSP1_1_3), 1407 + PINMUX_IPSR_MSEL(IP17_11_8, BPFCLK_B, SEL_FM_1), 1408 + PINMUX_IPSR_MSEL(IP17_11_8, RIF3_CLK_B, SEL_DRIF3_1), 1409 + PINMUX_IPSR_MSEL(IP17_11_8, HSCK2_C, SEL_HSCIF2_2), 1410 + 1411 + PINMUX_IPSR_GPSR(IP17_15_12, USB0_OVC), 1412 + PINMUX_IPSR_MSEL(IP17_15_12, SIM0_D_C, SEL_SIMCARD_2), 1413 + PINMUX_IPSR_MSEL(IP17_15_12, TS_SDAT1_D, SEL_TSIF1_3), 1414 + PINMUX_IPSR_MSEL(IP17_15_12, STP_ISD_1_D, SEL_SSP1_1_3), 1415 + PINMUX_IPSR_MSEL(IP17_15_12, RIF3_SYNC_B, SEL_DRIF3_1), 1416 + PINMUX_IPSR_MSEL(IP17_15_12, HRX2_C, SEL_HSCIF2_2), 1417 + 1418 + PINMUX_IPSR_GPSR(IP17_19_16, USB1_PWEN), 1419 + PINMUX_IPSR_MSEL(IP17_19_16, SIM0_CLK_C, SEL_SIMCARD_2), 1420 + PINMUX_IPSR_MSEL(IP17_19_16, SSI_SCK1_A, SEL_SSI_0), 1421 + PINMUX_IPSR_MSEL(IP17_19_16, TS_SCK0_E, SEL_TSIF0_4), 1422 + PINMUX_IPSR_MSEL(IP17_19_16, STP_ISCLK_0_E, SEL_SSP1_0_4), 1423 + PINMUX_IPSR_MSEL(IP17_19_16, FMCLK_B, SEL_FM_1), 1424 + PINMUX_IPSR_MSEL(IP17_19_16, RIF2_CLK_B, SEL_DRIF2_1), 1425 + PINMUX_IPSR_MSEL(IP17_19_16, SPEEDIN_A, SEL_SPEED_PULSE_0), 1426 + PINMUX_IPSR_MSEL(IP17_19_16, HTX2_C, SEL_HSCIF2_2), 1427 + 1428 + PINMUX_IPSR_GPSR(IP17_23_20, USB1_OVC), 1429 + PINMUX_IPSR_MSEL(IP17_23_20, MSIOF1_SS2_C, SEL_MSIOF1_2), 1430 + PINMUX_IPSR_MSEL(IP17_23_20, SSI_WS1_A, SEL_SSI_0), 1431 + PINMUX_IPSR_MSEL(IP17_23_20, TS_SDAT0_E, SEL_TSIF0_4), 1432 + PINMUX_IPSR_MSEL(IP17_23_20, STP_ISD_0_E, SEL_SSP1_0_4), 1433 + PINMUX_IPSR_MSEL(IP17_23_20, FMIN_B, SEL_FM_1), 1434 + PINMUX_IPSR_MSEL(IP17_23_20, RIF2_SYNC_B, SEL_DRIF2_1), 1435 + PINMUX_IPSR_MSEL(IP17_23_20, REMOCON_B, SEL_REMOCON_1), 1436 + PINMUX_IPSR_MSEL(IP17_23_20, HCTS2_N_C, SEL_HSCIF2_2), 1437 + 1438 + PINMUX_IPSR_GPSR(IP17_27_24, USB30_PWEN), 1439 + PINMUX_IPSR_GPSR(IP17_27_24, AUDIO_CLKOUT_B), 1440 + PINMUX_IPSR_MSEL(IP17_27_24, SSI_SCK2_B, SEL_SSI_1), 1441 + PINMUX_IPSR_MSEL(IP17_27_24, TS_SDEN1_D, SEL_TSIF1_3), 1442 + PINMUX_IPSR_MSEL(IP17_27_24, STP_ISEN_1_D, SEL_SSP1_1_2), 1443 + PINMUX_IPSR_MSEL(IP17_27_24, STP_OPWM_0_E, SEL_SSP1_0_4), 1444 + PINMUX_IPSR_MSEL(IP17_27_24, RIF3_D0_B, SEL_DRIF3_1), 1445 + PINMUX_IPSR_MSEL(IP17_27_24, TCLK2_B, SEL_TIMER_TMU_1), 1446 + PINMUX_IPSR_GPSR(IP17_27_24, TPU0TO0), 1447 + PINMUX_IPSR_MSEL(IP17_27_24, BPFCLK_C, SEL_FM_2), 1448 + PINMUX_IPSR_MSEL(IP17_27_24, HRTS2_N_C, SEL_HSCIF2_2), 1449 + 1450 + PINMUX_IPSR_GPSR(IP17_31_28, USB30_OVC), 1451 + PINMUX_IPSR_GPSR(IP17_31_28, AUDIO_CLKOUT1_B), 1452 + PINMUX_IPSR_MSEL(IP17_31_28, SSI_WS2_B, SEL_SSI_1), 1453 + PINMUX_IPSR_MSEL(IP17_31_28, TS_SPSYNC1_D, SEL_TSIF1_3), 1454 + PINMUX_IPSR_MSEL(IP17_31_28, STP_ISSYNC_1_D, SEL_SSP1_1_3), 1455 + PINMUX_IPSR_MSEL(IP17_31_28, STP_IVCXO27_0_E, SEL_SSP1_0_4), 1456 + PINMUX_IPSR_MSEL(IP17_31_28, RIF3_D1_B, SEL_DRIF3_1), 1457 + PINMUX_IPSR_MSEL(IP17_31_28, FSO_TOE_B, SEL_FSO_1), 1458 + PINMUX_IPSR_GPSR(IP17_31_28, TPU0TO1), 1459 + 1460 + /* IPSR18 */ 1461 + PINMUX_IPSR_GPSR(IP18_3_0, GP6_30), 1462 + PINMUX_IPSR_GPSR(IP18_3_0, AUDIO_CLKOUT2_B), 1463 + PINMUX_IPSR_MSEL(IP18_3_0, SSI_SCK9_B, SEL_SSI_1), 1464 + PINMUX_IPSR_MSEL(IP18_3_0, TS_SDEN0_E, SEL_TSIF0_4), 1465 + PINMUX_IPSR_MSEL(IP18_3_0, STP_ISEN_0_E, SEL_SSP1_0_4), 1466 + PINMUX_IPSR_MSEL(IP18_3_0, RIF2_D0_B, SEL_DRIF2_1), 1467 + PINMUX_IPSR_GPSR(IP18_3_0, TPU0TO2), 1468 + PINMUX_IPSR_MSEL(IP18_3_0, FSO_CFE_0_A, SEL_FSO_0), 1469 + PINMUX_IPSR_MSEL(IP18_3_0, FMCLK_C, SEL_FM_2), 1470 + PINMUX_IPSR_MSEL(IP18_3_0, FMCLK_D, SEL_FM_3), 1471 + 1472 + PINMUX_IPSR_GPSR(IP18_7_4, GP6_31), 1473 + PINMUX_IPSR_GPSR(IP18_7_4, AUDIO_CLKOUT3_B), 1474 + PINMUX_IPSR_MSEL(IP18_7_4, SSI_WS9_B, SEL_SSI_1), 1475 + PINMUX_IPSR_MSEL(IP18_7_4, TS_SPSYNC0_E, SEL_TSIF0_4), 1476 + PINMUX_IPSR_MSEL(IP18_7_4, STP_ISSYNC_0_E, SEL_SSP1_0_4), 1477 + PINMUX_IPSR_MSEL(IP18_7_4, RIF2_D1_B, SEL_DRIF2_1), 1478 + PINMUX_IPSR_GPSR(IP18_7_4, TPU0TO3), 1479 + PINMUX_IPSR_MSEL(IP18_7_4, FSO_CFE_1_A, SEL_FSO_0), 1480 + PINMUX_IPSR_MSEL(IP18_7_4, FMIN_C, SEL_FM_2), 1481 + PINMUX_IPSR_MSEL(IP18_7_4, FMIN_D, SEL_FM_3), 1482 + 1483 + /* I2C */ 1484 + PINMUX_IPSR_NOGP(0, I2C_SEL_0_1), 1485 + PINMUX_IPSR_NOGP(0, I2C_SEL_3_1), 1486 + PINMUX_IPSR_NOGP(0, I2C_SEL_5_1), 1487 + }; 1488 + 1489 + static const struct sh_pfc_pin pinmux_pins[] = { 1490 + PINMUX_GPIO_GP_ALL(), 1491 + }; 1492 + 1493 + /* - SCIF0 ------------------------------------------------------------------ */ 1494 + static const unsigned int scif0_data_pins[] = { 1495 + /* RX, TX */ 1496 + RCAR_GP_PIN(5, 1), RCAR_GP_PIN(5, 2), 1497 + }; 1498 + static const unsigned int scif0_data_mux[] = { 1499 + RX0_MARK, TX0_MARK, 1500 + }; 1501 + static const unsigned int scif0_clk_pins[] = { 1502 + /* SCK */ 1503 + RCAR_GP_PIN(5, 0), 1504 + }; 1505 + static const unsigned int scif0_clk_mux[] = { 1506 + SCK0_MARK, 1507 + }; 1508 + static const unsigned int scif0_ctrl_pins[] = { 1509 + /* RTS, CTS */ 1510 + RCAR_GP_PIN(5, 4), RCAR_GP_PIN(5, 3), 1511 + }; 1512 + static const unsigned int scif0_ctrl_mux[] = { 1513 + RTS0_N_TANS_MARK, CTS0_N_MARK, 1514 + }; 1515 + /* - SCIF1 ------------------------------------------------------------------ */ 1516 + static const unsigned int scif1_data_a_pins[] = { 1517 + /* RX, TX */ 1518 + RCAR_GP_PIN(5, 5), RCAR_GP_PIN(5, 6), 1519 + }; 1520 + static const unsigned int scif1_data_a_mux[] = { 1521 + RX1_A_MARK, TX1_A_MARK, 1522 + }; 1523 + static const unsigned int scif1_clk_pins[] = { 1524 + /* SCK */ 1525 + RCAR_GP_PIN(6, 21), 1526 + }; 1527 + static const unsigned int scif1_clk_mux[] = { 1528 + SCK1_MARK, 1529 + }; 1530 + static const unsigned int scif1_ctrl_pins[] = { 1531 + /* RTS, CTS */ 1532 + RCAR_GP_PIN(5, 8), RCAR_GP_PIN(5, 7), 1533 + }; 1534 + static const unsigned int scif1_ctrl_mux[] = { 1535 + RTS1_N_TANS_MARK, CTS1_N_MARK, 1536 + }; 1537 + 1538 + static const unsigned int scif1_data_b_pins[] = { 1539 + /* RX, TX */ 1540 + RCAR_GP_PIN(5, 24), RCAR_GP_PIN(5, 25), 1541 + }; 1542 + static const unsigned int scif1_data_b_mux[] = { 1543 + RX1_B_MARK, TX1_B_MARK, 1544 + }; 1545 + /* - SCIF2 ------------------------------------------------------------------ */ 1546 + static const unsigned int scif2_data_a_pins[] = { 1547 + /* RX, TX */ 1548 + RCAR_GP_PIN(5, 11), RCAR_GP_PIN(5, 10), 1549 + }; 1550 + static const unsigned int scif2_data_a_mux[] = { 1551 + RX2_A_MARK, TX2_A_MARK, 1552 + }; 1553 + static const unsigned int scif2_clk_pins[] = { 1554 + /* SCK */ 1555 + RCAR_GP_PIN(5, 9), 1556 + }; 1557 + static const unsigned int scif2_clk_mux[] = { 1558 + SCK2_MARK, 1559 + }; 1560 + static const unsigned int scif2_data_b_pins[] = { 1561 + /* RX, TX */ 1562 + RCAR_GP_PIN(5, 15), RCAR_GP_PIN(5, 16), 1563 + }; 1564 + static const unsigned int scif2_data_b_mux[] = { 1565 + RX2_B_MARK, TX2_B_MARK, 1566 + }; 1567 + /* - SCIF3 ------------------------------------------------------------------ */ 1568 + static const unsigned int scif3_data_a_pins[] = { 1569 + /* RX, TX */ 1570 + RCAR_GP_PIN(1, 23), RCAR_GP_PIN(1, 24), 1571 + }; 1572 + static const unsigned int scif3_data_a_mux[] = { 1573 + RX3_A_MARK, TX3_A_MARK, 1574 + }; 1575 + static const unsigned int scif3_clk_pins[] = { 1576 + /* SCK */ 1577 + RCAR_GP_PIN(1, 22), 1578 + }; 1579 + static const unsigned int scif3_clk_mux[] = { 1580 + SCK3_MARK, 1581 + }; 1582 + static const unsigned int scif3_ctrl_pins[] = { 1583 + /* RTS, CTS */ 1584 + RCAR_GP_PIN(1, 26), RCAR_GP_PIN(1, 25), 1585 + }; 1586 + static const unsigned int scif3_ctrl_mux[] = { 1587 + RTS3_N_TANS_MARK, CTS3_N_MARK, 1588 + }; 1589 + static const unsigned int scif3_data_b_pins[] = { 1590 + /* RX, TX */ 1591 + RCAR_GP_PIN(1, 8), RCAR_GP_PIN(1, 11), 1592 + }; 1593 + static const unsigned int scif3_data_b_mux[] = { 1594 + RX3_B_MARK, TX3_B_MARK, 1595 + }; 1596 + /* - SCIF4 ------------------------------------------------------------------ */ 1597 + static const unsigned int scif4_data_a_pins[] = { 1598 + /* RX, TX */ 1599 + RCAR_GP_PIN(2, 11), RCAR_GP_PIN(2, 12), 1600 + }; 1601 + static const unsigned int scif4_data_a_mux[] = { 1602 + RX4_A_MARK, TX4_A_MARK, 1603 + }; 1604 + static const unsigned int scif4_clk_a_pins[] = { 1605 + /* SCK */ 1606 + RCAR_GP_PIN(2, 10), 1607 + }; 1608 + static const unsigned int scif4_clk_a_mux[] = { 1609 + SCK4_A_MARK, 1610 + }; 1611 + static const unsigned int scif4_ctrl_a_pins[] = { 1612 + /* RTS, CTS */ 1613 + RCAR_GP_PIN(2, 14), RCAR_GP_PIN(2, 13), 1614 + }; 1615 + static const unsigned int scif4_ctrl_a_mux[] = { 1616 + RTS4_N_TANS_A_MARK, CTS4_N_A_MARK, 1617 + }; 1618 + static const unsigned int scif4_data_b_pins[] = { 1619 + /* RX, TX */ 1620 + RCAR_GP_PIN(1, 6), RCAR_GP_PIN(1, 7), 1621 + }; 1622 + static const unsigned int scif4_data_b_mux[] = { 1623 + RX4_B_MARK, TX4_B_MARK, 1624 + }; 1625 + static const unsigned int scif4_clk_b_pins[] = { 1626 + /* SCK */ 1627 + RCAR_GP_PIN(1, 5), 1628 + }; 1629 + static const unsigned int scif4_clk_b_mux[] = { 1630 + SCK4_B_MARK, 1631 + }; 1632 + static const unsigned int scif4_ctrl_b_pins[] = { 1633 + /* RTS, CTS */ 1634 + RCAR_GP_PIN(1, 10), RCAR_GP_PIN(1, 9), 1635 + }; 1636 + static const unsigned int scif4_ctrl_b_mux[] = { 1637 + RTS4_N_TANS_B_MARK, CTS4_N_B_MARK, 1638 + }; 1639 + static const unsigned int scif4_data_c_pins[] = { 1640 + /* RX, TX */ 1641 + RCAR_GP_PIN(0, 12), RCAR_GP_PIN(0, 13), 1642 + }; 1643 + static const unsigned int scif4_data_c_mux[] = { 1644 + RX4_C_MARK, TX4_C_MARK, 1645 + }; 1646 + static const unsigned int scif4_clk_c_pins[] = { 1647 + /* SCK */ 1648 + RCAR_GP_PIN(0, 8), 1649 + }; 1650 + static const unsigned int scif4_clk_c_mux[] = { 1651 + SCK4_C_MARK, 1652 + }; 1653 + static const unsigned int scif4_ctrl_c_pins[] = { 1654 + /* RTS, CTS */ 1655 + RCAR_GP_PIN(0, 11), RCAR_GP_PIN(0, 10), 1656 + }; 1657 + static const unsigned int scif4_ctrl_c_mux[] = { 1658 + RTS4_N_TANS_C_MARK, CTS4_N_C_MARK, 1659 + }; 1660 + /* - SCIF5 ------------------------------------------------------------------ */ 1661 + static const unsigned int scif5_data_a_pins[] = { 1662 + /* RX, TX */ 1663 + RCAR_GP_PIN(5, 19), RCAR_GP_PIN(5, 21), 1664 + }; 1665 + static const unsigned int scif5_data_a_mux[] = { 1666 + RX5_A_MARK, TX5_A_MARK, 1667 + }; 1668 + static const unsigned int scif5_clk_a_pins[] = { 1669 + /* SCK */ 1670 + RCAR_GP_PIN(6, 21), 1671 + }; 1672 + static const unsigned int scif5_clk_a_mux[] = { 1673 + SCK5_A_MARK, 1674 + }; 1675 + 1676 + static const unsigned int scif5_data_b_pins[] = { 1677 + /* RX, TX */ 1678 + RCAR_GP_PIN(5, 12), RCAR_GP_PIN(5, 18), 1679 + }; 1680 + static const unsigned int scif5_data_b_mux[] = { 1681 + RX5_B_MARK, TX5_B_MARK, 1682 + }; 1683 + static const unsigned int scif5_clk_b_pins[] = { 1684 + /* SCK */ 1685 + RCAR_GP_PIN(5, 0), 1686 + }; 1687 + static const unsigned int scif5_clk_b_mux[] = { 1688 + SCK5_B_MARK, 1689 + }; 1690 + 1691 + /* - SCIF Clock ------------------------------------------------------------- */ 1692 + static const unsigned int scif_clk_a_pins[] = { 1693 + /* SCIF_CLK */ 1694 + RCAR_GP_PIN(6, 23), 1695 + }; 1696 + static const unsigned int scif_clk_a_mux[] = { 1697 + SCIF_CLK_A_MARK, 1698 + }; 1699 + static const unsigned int scif_clk_b_pins[] = { 1700 + /* SCIF_CLK */ 1701 + RCAR_GP_PIN(5, 9), 1702 + }; 1703 + static const unsigned int scif_clk_b_mux[] = { 1704 + SCIF_CLK_B_MARK, 1705 + }; 1706 + 1707 + /* - SDHI0 ------------------------------------------------------------------ */ 1708 + static const unsigned int sdhi0_data1_pins[] = { 1709 + /* D0 */ 1710 + RCAR_GP_PIN(3, 2), 1711 + }; 1712 + static const unsigned int sdhi0_data1_mux[] = { 1713 + SD0_DAT0_MARK, 1714 + }; 1715 + static const unsigned int sdhi0_data4_pins[] = { 1716 + /* D[0:3] */ 1717 + RCAR_GP_PIN(3, 2), RCAR_GP_PIN(3, 3), 1718 + RCAR_GP_PIN(3, 4), RCAR_GP_PIN(3, 5), 1719 + }; 1720 + static const unsigned int sdhi0_data4_mux[] = { 1721 + SD0_DAT0_MARK, SD0_DAT1_MARK, 1722 + SD0_DAT2_MARK, SD0_DAT3_MARK, 1723 + }; 1724 + static const unsigned int sdhi0_ctrl_pins[] = { 1725 + /* CLK, CMD */ 1726 + RCAR_GP_PIN(3, 0), RCAR_GP_PIN(3, 1), 1727 + }; 1728 + static const unsigned int sdhi0_ctrl_mux[] = { 1729 + SD0_CLK_MARK, SD0_CMD_MARK, 1730 + }; 1731 + static const unsigned int sdhi0_cd_pins[] = { 1732 + /* CD */ 1733 + RCAR_GP_PIN(3, 12), 1734 + }; 1735 + static const unsigned int sdhi0_cd_mux[] = { 1736 + SD0_CD_MARK, 1737 + }; 1738 + static const unsigned int sdhi0_wp_pins[] = { 1739 + /* WP */ 1740 + RCAR_GP_PIN(3, 13), 1741 + }; 1742 + static const unsigned int sdhi0_wp_mux[] = { 1743 + SD0_WP_MARK, 1744 + }; 1745 + /* - SDHI1 ------------------------------------------------------------------ */ 1746 + static const unsigned int sdhi1_data1_pins[] = { 1747 + /* D0 */ 1748 + RCAR_GP_PIN(3, 8), 1749 + }; 1750 + static const unsigned int sdhi1_data1_mux[] = { 1751 + SD1_DAT0_MARK, 1752 + }; 1753 + static const unsigned int sdhi1_data4_pins[] = { 1754 + /* D[0:3] */ 1755 + RCAR_GP_PIN(3, 8), RCAR_GP_PIN(3, 9), 1756 + RCAR_GP_PIN(3, 10), RCAR_GP_PIN(3, 11), 1757 + }; 1758 + static const unsigned int sdhi1_data4_mux[] = { 1759 + SD1_DAT0_MARK, SD1_DAT1_MARK, 1760 + SD1_DAT2_MARK, SD1_DAT3_MARK, 1761 + }; 1762 + static const unsigned int sdhi1_ctrl_pins[] = { 1763 + /* CLK, CMD */ 1764 + RCAR_GP_PIN(3, 6), RCAR_GP_PIN(3, 7), 1765 + }; 1766 + static const unsigned int sdhi1_ctrl_mux[] = { 1767 + SD1_CLK_MARK, SD1_CMD_MARK, 1768 + }; 1769 + static const unsigned int sdhi1_cd_pins[] = { 1770 + /* CD */ 1771 + RCAR_GP_PIN(3, 14), 1772 + }; 1773 + static const unsigned int sdhi1_cd_mux[] = { 1774 + SD1_CD_MARK, 1775 + }; 1776 + static const unsigned int sdhi1_wp_pins[] = { 1777 + /* WP */ 1778 + RCAR_GP_PIN(3, 15), 1779 + }; 1780 + static const unsigned int sdhi1_wp_mux[] = { 1781 + SD1_WP_MARK, 1782 + }; 1783 + /* - SDHI2 ------------------------------------------------------------------ */ 1784 + static const unsigned int sdhi2_data1_pins[] = { 1785 + /* D0 */ 1786 + RCAR_GP_PIN(4, 2), 1787 + }; 1788 + static const unsigned int sdhi2_data1_mux[] = { 1789 + SD2_DAT0_MARK, 1790 + }; 1791 + static const unsigned int sdhi2_data4_pins[] = { 1792 + /* D[0:3] */ 1793 + RCAR_GP_PIN(4, 2), RCAR_GP_PIN(4, 3), 1794 + RCAR_GP_PIN(4, 4), RCAR_GP_PIN(4, 5), 1795 + }; 1796 + static const unsigned int sdhi2_data4_mux[] = { 1797 + SD2_DAT0_MARK, SD2_DAT1_MARK, 1798 + SD2_DAT2_MARK, SD2_DAT3_MARK, 1799 + }; 1800 + static const unsigned int sdhi2_data8_pins[] = { 1801 + /* D[0:7] */ 1802 + RCAR_GP_PIN(4, 2), RCAR_GP_PIN(4, 3), 1803 + RCAR_GP_PIN(4, 4), RCAR_GP_PIN(4, 5), 1804 + RCAR_GP_PIN(3, 8), RCAR_GP_PIN(3, 9), 1805 + RCAR_GP_PIN(3, 10), RCAR_GP_PIN(3, 11), 1806 + }; 1807 + static const unsigned int sdhi2_data8_mux[] = { 1808 + SD2_DAT0_MARK, SD2_DAT1_MARK, 1809 + SD2_DAT2_MARK, SD2_DAT3_MARK, 1810 + SD2_DAT4_MARK, SD2_DAT5_MARK, 1811 + SD2_DAT6_MARK, SD2_DAT7_MARK, 1812 + }; 1813 + static const unsigned int sdhi2_ctrl_pins[] = { 1814 + /* CLK, CMD */ 1815 + RCAR_GP_PIN(4, 0), RCAR_GP_PIN(4, 1), 1816 + }; 1817 + static const unsigned int sdhi2_ctrl_mux[] = { 1818 + SD2_CLK_MARK, SD2_CMD_MARK, 1819 + }; 1820 + static const unsigned int sdhi2_cd_a_pins[] = { 1821 + /* CD */ 1822 + RCAR_GP_PIN(4, 13), 1823 + }; 1824 + static const unsigned int sdhi2_cd_a_mux[] = { 1825 + SD2_CD_A_MARK, 1826 + }; 1827 + static const unsigned int sdhi2_cd_b_pins[] = { 1828 + /* CD */ 1829 + RCAR_GP_PIN(5, 10), 1830 + }; 1831 + static const unsigned int sdhi2_cd_b_mux[] = { 1832 + SD2_CD_B_MARK, 1833 + }; 1834 + static const unsigned int sdhi2_wp_a_pins[] = { 1835 + /* WP */ 1836 + RCAR_GP_PIN(4, 14), 1837 + }; 1838 + static const unsigned int sdhi2_wp_a_mux[] = { 1839 + SD2_WP_A_MARK, 1840 + }; 1841 + static const unsigned int sdhi2_wp_b_pins[] = { 1842 + /* WP */ 1843 + RCAR_GP_PIN(5, 11), 1844 + }; 1845 + static const unsigned int sdhi2_wp_b_mux[] = { 1846 + SD2_WP_B_MARK, 1847 + }; 1848 + static const unsigned int sdhi2_ds_pins[] = { 1849 + /* DS */ 1850 + RCAR_GP_PIN(4, 6), 1851 + }; 1852 + static const unsigned int sdhi2_ds_mux[] = { 1853 + SD2_DS_MARK, 1854 + }; 1855 + /* - SDHI3 ------------------------------------------------------------------ */ 1856 + static const unsigned int sdhi3_data1_pins[] = { 1857 + /* D0 */ 1858 + RCAR_GP_PIN(4, 9), 1859 + }; 1860 + static const unsigned int sdhi3_data1_mux[] = { 1861 + SD3_DAT0_MARK, 1862 + }; 1863 + static const unsigned int sdhi3_data4_pins[] = { 1864 + /* D[0:3] */ 1865 + RCAR_GP_PIN(4, 9), RCAR_GP_PIN(4, 10), 1866 + RCAR_GP_PIN(4, 11), RCAR_GP_PIN(4, 12), 1867 + }; 1868 + static const unsigned int sdhi3_data4_mux[] = { 1869 + SD3_DAT0_MARK, SD3_DAT1_MARK, 1870 + SD3_DAT2_MARK, SD3_DAT3_MARK, 1871 + }; 1872 + static const unsigned int sdhi3_data8_pins[] = { 1873 + /* D[0:7] */ 1874 + RCAR_GP_PIN(4, 9), RCAR_GP_PIN(4, 10), 1875 + RCAR_GP_PIN(4, 11), RCAR_GP_PIN(4, 12), 1876 + RCAR_GP_PIN(4, 13), RCAR_GP_PIN(4, 14), 1877 + RCAR_GP_PIN(4, 15), RCAR_GP_PIN(4, 16), 1878 + }; 1879 + static const unsigned int sdhi3_data8_mux[] = { 1880 + SD3_DAT0_MARK, SD3_DAT1_MARK, 1881 + SD3_DAT2_MARK, SD3_DAT3_MARK, 1882 + SD3_DAT4_MARK, SD3_DAT5_MARK, 1883 + SD3_DAT6_MARK, SD3_DAT7_MARK, 1884 + }; 1885 + static const unsigned int sdhi3_ctrl_pins[] = { 1886 + /* CLK, CMD */ 1887 + RCAR_GP_PIN(4, 7), RCAR_GP_PIN(4, 8), 1888 + }; 1889 + static const unsigned int sdhi3_ctrl_mux[] = { 1890 + SD3_CLK_MARK, SD3_CMD_MARK, 1891 + }; 1892 + static const unsigned int sdhi3_cd_pins[] = { 1893 + /* CD */ 1894 + RCAR_GP_PIN(4, 15), 1895 + }; 1896 + static const unsigned int sdhi3_cd_mux[] = { 1897 + SD3_CD_MARK, 1898 + }; 1899 + static const unsigned int sdhi3_wp_pins[] = { 1900 + /* WP */ 1901 + RCAR_GP_PIN(4, 16), 1902 + }; 1903 + static const unsigned int sdhi3_wp_mux[] = { 1904 + SD3_WP_MARK, 1905 + }; 1906 + static const unsigned int sdhi3_ds_pins[] = { 1907 + /* DS */ 1908 + RCAR_GP_PIN(4, 17), 1909 + }; 1910 + static const unsigned int sdhi3_ds_mux[] = { 1911 + SD3_DS_MARK, 1912 + }; 1913 + 1914 + static const struct sh_pfc_pin_group pinmux_groups[] = { 1915 + SH_PFC_PIN_GROUP(scif0_data), 1916 + SH_PFC_PIN_GROUP(scif0_clk), 1917 + SH_PFC_PIN_GROUP(scif0_ctrl), 1918 + SH_PFC_PIN_GROUP(scif1_data_a), 1919 + SH_PFC_PIN_GROUP(scif1_clk), 1920 + SH_PFC_PIN_GROUP(scif1_ctrl), 1921 + SH_PFC_PIN_GROUP(scif1_data_b), 1922 + SH_PFC_PIN_GROUP(scif2_data_a), 1923 + SH_PFC_PIN_GROUP(scif2_clk), 1924 + SH_PFC_PIN_GROUP(scif2_data_b), 1925 + SH_PFC_PIN_GROUP(scif3_data_a), 1926 + SH_PFC_PIN_GROUP(scif3_clk), 1927 + SH_PFC_PIN_GROUP(scif3_ctrl), 1928 + SH_PFC_PIN_GROUP(scif3_data_b), 1929 + SH_PFC_PIN_GROUP(scif4_data_a), 1930 + SH_PFC_PIN_GROUP(scif4_clk_a), 1931 + SH_PFC_PIN_GROUP(scif4_ctrl_a), 1932 + SH_PFC_PIN_GROUP(scif4_data_b), 1933 + SH_PFC_PIN_GROUP(scif4_clk_b), 1934 + SH_PFC_PIN_GROUP(scif4_ctrl_b), 1935 + SH_PFC_PIN_GROUP(scif4_data_c), 1936 + SH_PFC_PIN_GROUP(scif4_clk_c), 1937 + SH_PFC_PIN_GROUP(scif4_ctrl_c), 1938 + SH_PFC_PIN_GROUP(scif5_data_a), 1939 + SH_PFC_PIN_GROUP(scif5_clk_a), 1940 + SH_PFC_PIN_GROUP(scif5_data_b), 1941 + SH_PFC_PIN_GROUP(scif5_clk_b), 1942 + SH_PFC_PIN_GROUP(scif_clk_a), 1943 + SH_PFC_PIN_GROUP(scif_clk_b), 1944 + SH_PFC_PIN_GROUP(sdhi0_data1), 1945 + SH_PFC_PIN_GROUP(sdhi0_data4), 1946 + SH_PFC_PIN_GROUP(sdhi0_ctrl), 1947 + SH_PFC_PIN_GROUP(sdhi0_cd), 1948 + SH_PFC_PIN_GROUP(sdhi0_wp), 1949 + SH_PFC_PIN_GROUP(sdhi1_data1), 1950 + SH_PFC_PIN_GROUP(sdhi1_data4), 1951 + SH_PFC_PIN_GROUP(sdhi1_ctrl), 1952 + SH_PFC_PIN_GROUP(sdhi1_cd), 1953 + SH_PFC_PIN_GROUP(sdhi1_wp), 1954 + SH_PFC_PIN_GROUP(sdhi2_data1), 1955 + SH_PFC_PIN_GROUP(sdhi2_data4), 1956 + SH_PFC_PIN_GROUP(sdhi2_data8), 1957 + SH_PFC_PIN_GROUP(sdhi2_ctrl), 1958 + SH_PFC_PIN_GROUP(sdhi2_cd_a), 1959 + SH_PFC_PIN_GROUP(sdhi2_wp_a), 1960 + SH_PFC_PIN_GROUP(sdhi2_cd_b), 1961 + SH_PFC_PIN_GROUP(sdhi2_wp_b), 1962 + SH_PFC_PIN_GROUP(sdhi2_ds), 1963 + SH_PFC_PIN_GROUP(sdhi3_data1), 1964 + SH_PFC_PIN_GROUP(sdhi3_data4), 1965 + SH_PFC_PIN_GROUP(sdhi3_data8), 1966 + SH_PFC_PIN_GROUP(sdhi3_ctrl), 1967 + SH_PFC_PIN_GROUP(sdhi3_cd), 1968 + SH_PFC_PIN_GROUP(sdhi3_wp), 1969 + SH_PFC_PIN_GROUP(sdhi3_ds), 1970 + }; 1971 + 1972 + static const char * const scif0_groups[] = { 1973 + "scif0_data", 1974 + "scif0_clk", 1975 + "scif0_ctrl", 1976 + }; 1977 + 1978 + static const char * const scif1_groups[] = { 1979 + "scif1_data_a", 1980 + "scif1_clk", 1981 + "scif1_ctrl", 1982 + "scif1_data_b", 1983 + }; 1984 + 1985 + static const char * const scif2_groups[] = { 1986 + "scif2_data_a", 1987 + "scif2_clk", 1988 + "scif2_data_b", 1989 + }; 1990 + 1991 + static const char * const scif3_groups[] = { 1992 + "scif3_data_a", 1993 + "scif3_clk", 1994 + "scif3_ctrl", 1995 + "scif3_data_b", 1996 + }; 1997 + 1998 + static const char * const scif4_groups[] = { 1999 + "scif4_data_a", 2000 + "scif4_clk_a", 2001 + "scif4_ctrl_a", 2002 + "scif4_data_b", 2003 + "scif4_clk_b", 2004 + "scif4_ctrl_b", 2005 + "scif4_data_c", 2006 + "scif4_clk_c", 2007 + "scif4_ctrl_c", 2008 + }; 2009 + 2010 + static const char * const scif5_groups[] = { 2011 + "scif5_data_a", 2012 + "scif5_clk_a", 2013 + "scif5_data_b", 2014 + "scif5_clk_b", 2015 + }; 2016 + 2017 + static const char * const scif_clk_groups[] = { 2018 + "scif_clk_a", 2019 + "scif_clk_b", 2020 + }; 2021 + 2022 + static const char * const sdhi0_groups[] = { 2023 + "sdhi0_data1", 2024 + "sdhi0_data4", 2025 + "sdhi0_ctrl", 2026 + "sdhi0_cd", 2027 + "sdhi0_wp", 2028 + }; 2029 + 2030 + static const char * const sdhi1_groups[] = { 2031 + "sdhi1_data1", 2032 + "sdhi1_data4", 2033 + "sdhi1_ctrl", 2034 + "sdhi1_cd", 2035 + "sdhi1_wp", 2036 + }; 2037 + 2038 + static const char * const sdhi2_groups[] = { 2039 + "sdhi2_data1", 2040 + "sdhi2_data4", 2041 + "sdhi2_data8", 2042 + "sdhi2_ctrl", 2043 + "sdhi2_cd_a", 2044 + "sdhi2_wp_a", 2045 + "sdhi2_cd_b", 2046 + "sdhi2_wp_b", 2047 + "sdhi2_ds", 2048 + }; 2049 + 2050 + static const char * const sdhi3_groups[] = { 2051 + "sdhi3_data1", 2052 + "sdhi3_data4", 2053 + "sdhi3_data8", 2054 + "sdhi3_ctrl", 2055 + "sdhi3_cd", 2056 + "sdhi3_wp", 2057 + "sdhi3_ds", 2058 + }; 2059 + 2060 + static const struct sh_pfc_function pinmux_functions[] = { 2061 + SH_PFC_FUNCTION(scif0), 2062 + SH_PFC_FUNCTION(scif1), 2063 + SH_PFC_FUNCTION(scif2), 2064 + SH_PFC_FUNCTION(scif3), 2065 + SH_PFC_FUNCTION(scif4), 2066 + SH_PFC_FUNCTION(scif5), 2067 + SH_PFC_FUNCTION(scif_clk), 2068 + SH_PFC_FUNCTION(sdhi0), 2069 + SH_PFC_FUNCTION(sdhi1), 2070 + SH_PFC_FUNCTION(sdhi2), 2071 + SH_PFC_FUNCTION(sdhi3), 2072 + }; 2073 + 2074 + static const struct pinmux_cfg_reg pinmux_config_regs[] = { 2075 + #define F_(x, y) FN_##y 2076 + #define FM(x) FN_##x 2077 + { PINMUX_CFG_REG("GPSR0", 0xe6060100, 32, 1) { 2078 + 0, 0, 2079 + 0, 0, 2080 + 0, 0, 2081 + 0, 0, 2082 + 0, 0, 2083 + 0, 0, 2084 + 0, 0, 2085 + 0, 0, 2086 + 0, 0, 2087 + 0, 0, 2088 + 0, 0, 2089 + 0, 0, 2090 + 0, 0, 2091 + 0, 0, 2092 + 0, 0, 2093 + 0, 0, 2094 + GP_0_15_FN, GPSR0_15, 2095 + GP_0_14_FN, GPSR0_14, 2096 + GP_0_13_FN, GPSR0_13, 2097 + GP_0_12_FN, GPSR0_12, 2098 + GP_0_11_FN, GPSR0_11, 2099 + GP_0_10_FN, GPSR0_10, 2100 + GP_0_9_FN, GPSR0_9, 2101 + GP_0_8_FN, GPSR0_8, 2102 + GP_0_7_FN, GPSR0_7, 2103 + GP_0_6_FN, GPSR0_6, 2104 + GP_0_5_FN, GPSR0_5, 2105 + GP_0_4_FN, GPSR0_4, 2106 + GP_0_3_FN, GPSR0_3, 2107 + GP_0_2_FN, GPSR0_2, 2108 + GP_0_1_FN, GPSR0_1, 2109 + GP_0_0_FN, GPSR0_0, } 2110 + }, 2111 + { PINMUX_CFG_REG("GPSR1", 0xe6060104, 32, 1) { 2112 + 0, 0, 2113 + 0, 0, 2114 + 0, 0, 2115 + GP_1_28_FN, GPSR1_28, 2116 + GP_1_27_FN, GPSR1_27, 2117 + GP_1_26_FN, GPSR1_26, 2118 + GP_1_25_FN, GPSR1_25, 2119 + GP_1_24_FN, GPSR1_24, 2120 + GP_1_23_FN, GPSR1_23, 2121 + GP_1_22_FN, GPSR1_22, 2122 + GP_1_21_FN, GPSR1_21, 2123 + GP_1_20_FN, GPSR1_20, 2124 + GP_1_19_FN, GPSR1_19, 2125 + GP_1_18_FN, GPSR1_18, 2126 + GP_1_17_FN, GPSR1_17, 2127 + GP_1_16_FN, GPSR1_16, 2128 + GP_1_15_FN, GPSR1_15, 2129 + GP_1_14_FN, GPSR1_14, 2130 + GP_1_13_FN, GPSR1_13, 2131 + GP_1_12_FN, GPSR1_12, 2132 + GP_1_11_FN, GPSR1_11, 2133 + GP_1_10_FN, GPSR1_10, 2134 + GP_1_9_FN, GPSR1_9, 2135 + GP_1_8_FN, GPSR1_8, 2136 + GP_1_7_FN, GPSR1_7, 2137 + GP_1_6_FN, GPSR1_6, 2138 + GP_1_5_FN, GPSR1_5, 2139 + GP_1_4_FN, GPSR1_4, 2140 + GP_1_3_FN, GPSR1_3, 2141 + GP_1_2_FN, GPSR1_2, 2142 + GP_1_1_FN, GPSR1_1, 2143 + GP_1_0_FN, GPSR1_0, } 2144 + }, 2145 + { PINMUX_CFG_REG("GPSR2", 0xe6060108, 32, 1) { 2146 + 0, 0, 2147 + 0, 0, 2148 + 0, 0, 2149 + 0, 0, 2150 + 0, 0, 2151 + 0, 0, 2152 + 0, 0, 2153 + 0, 0, 2154 + 0, 0, 2155 + 0, 0, 2156 + 0, 0, 2157 + 0, 0, 2158 + 0, 0, 2159 + 0, 0, 2160 + 0, 0, 2161 + 0, 0, 2162 + 0, 0, 2163 + GP_2_14_FN, GPSR2_14, 2164 + GP_2_13_FN, GPSR2_13, 2165 + GP_2_12_FN, GPSR2_12, 2166 + GP_2_11_FN, GPSR2_11, 2167 + GP_2_10_FN, GPSR2_10, 2168 + GP_2_9_FN, GPSR2_9, 2169 + GP_2_8_FN, GPSR2_8, 2170 + GP_2_7_FN, GPSR2_7, 2171 + GP_2_6_FN, GPSR2_6, 2172 + GP_2_5_FN, GPSR2_5, 2173 + GP_2_4_FN, GPSR2_4, 2174 + GP_2_3_FN, GPSR2_3, 2175 + GP_2_2_FN, GPSR2_2, 2176 + GP_2_1_FN, GPSR2_1, 2177 + GP_2_0_FN, GPSR2_0, } 2178 + }, 2179 + { PINMUX_CFG_REG("GPSR3", 0xe606010c, 32, 1) { 2180 + 0, 0, 2181 + 0, 0, 2182 + 0, 0, 2183 + 0, 0, 2184 + 0, 0, 2185 + 0, 0, 2186 + 0, 0, 2187 + 0, 0, 2188 + 0, 0, 2189 + 0, 0, 2190 + 0, 0, 2191 + 0, 0, 2192 + 0, 0, 2193 + 0, 0, 2194 + 0, 0, 2195 + 0, 0, 2196 + GP_3_15_FN, GPSR3_15, 2197 + GP_3_14_FN, GPSR3_14, 2198 + GP_3_13_FN, GPSR3_13, 2199 + GP_3_12_FN, GPSR3_12, 2200 + GP_3_11_FN, GPSR3_11, 2201 + GP_3_10_FN, GPSR3_10, 2202 + GP_3_9_FN, GPSR3_9, 2203 + GP_3_8_FN, GPSR3_8, 2204 + GP_3_7_FN, GPSR3_7, 2205 + GP_3_6_FN, GPSR3_6, 2206 + GP_3_5_FN, GPSR3_5, 2207 + GP_3_4_FN, GPSR3_4, 2208 + GP_3_3_FN, GPSR3_3, 2209 + GP_3_2_FN, GPSR3_2, 2210 + GP_3_1_FN, GPSR3_1, 2211 + GP_3_0_FN, GPSR3_0, } 2212 + }, 2213 + { PINMUX_CFG_REG("GPSR4", 0xe6060110, 32, 1) { 2214 + 0, 0, 2215 + 0, 0, 2216 + 0, 0, 2217 + 0, 0, 2218 + 0, 0, 2219 + 0, 0, 2220 + 0, 0, 2221 + 0, 0, 2222 + 0, 0, 2223 + 0, 0, 2224 + 0, 0, 2225 + 0, 0, 2226 + 0, 0, 2227 + 0, 0, 2228 + GP_4_17_FN, GPSR4_17, 2229 + GP_4_16_FN, GPSR4_16, 2230 + GP_4_15_FN, GPSR4_15, 2231 + GP_4_14_FN, GPSR4_14, 2232 + GP_4_13_FN, GPSR4_13, 2233 + GP_4_12_FN, GPSR4_12, 2234 + GP_4_11_FN, GPSR4_11, 2235 + GP_4_10_FN, GPSR4_10, 2236 + GP_4_9_FN, GPSR4_9, 2237 + GP_4_8_FN, GPSR4_8, 2238 + GP_4_7_FN, GPSR4_7, 2239 + GP_4_6_FN, GPSR4_6, 2240 + GP_4_5_FN, GPSR4_5, 2241 + GP_4_4_FN, GPSR4_4, 2242 + GP_4_3_FN, GPSR4_3, 2243 + GP_4_2_FN, GPSR4_2, 2244 + GP_4_1_FN, GPSR4_1, 2245 + GP_4_0_FN, GPSR4_0, } 2246 + }, 2247 + { PINMUX_CFG_REG("GPSR5", 0xe6060114, 32, 1) { 2248 + 0, 0, 2249 + 0, 0, 2250 + 0, 0, 2251 + 0, 0, 2252 + 0, 0, 2253 + 0, 0, 2254 + GP_5_25_FN, GPSR5_25, 2255 + GP_5_24_FN, GPSR5_24, 2256 + GP_5_23_FN, GPSR5_23, 2257 + GP_5_22_FN, GPSR5_22, 2258 + GP_5_21_FN, GPSR5_21, 2259 + GP_5_20_FN, GPSR5_20, 2260 + GP_5_19_FN, GPSR5_19, 2261 + GP_5_18_FN, GPSR5_18, 2262 + GP_5_17_FN, GPSR5_17, 2263 + GP_5_16_FN, GPSR5_16, 2264 + GP_5_15_FN, GPSR5_15, 2265 + GP_5_14_FN, GPSR5_14, 2266 + GP_5_13_FN, GPSR5_13, 2267 + GP_5_12_FN, GPSR5_12, 2268 + GP_5_11_FN, GPSR5_11, 2269 + GP_5_10_FN, GPSR5_10, 2270 + GP_5_9_FN, GPSR5_9, 2271 + GP_5_8_FN, GPSR5_8, 2272 + GP_5_7_FN, GPSR5_7, 2273 + GP_5_6_FN, GPSR5_6, 2274 + GP_5_5_FN, GPSR5_5, 2275 + GP_5_4_FN, GPSR5_4, 2276 + GP_5_3_FN, GPSR5_3, 2277 + GP_5_2_FN, GPSR5_2, 2278 + GP_5_1_FN, GPSR5_1, 2279 + GP_5_0_FN, GPSR5_0, } 2280 + }, 2281 + { PINMUX_CFG_REG("GPSR6", 0xe6060118, 32, 1) { 2282 + GP_6_31_FN, GPSR6_31, 2283 + GP_6_30_FN, GPSR6_30, 2284 + GP_6_29_FN, GPSR6_29, 2285 + GP_6_28_FN, GPSR6_28, 2286 + GP_6_27_FN, GPSR6_27, 2287 + GP_6_26_FN, GPSR6_26, 2288 + GP_6_25_FN, GPSR6_25, 2289 + GP_6_24_FN, GPSR6_24, 2290 + GP_6_23_FN, GPSR6_23, 2291 + GP_6_22_FN, GPSR6_22, 2292 + GP_6_21_FN, GPSR6_21, 2293 + GP_6_20_FN, GPSR6_20, 2294 + GP_6_19_FN, GPSR6_19, 2295 + GP_6_18_FN, GPSR6_18, 2296 + GP_6_17_FN, GPSR6_17, 2297 + GP_6_16_FN, GPSR6_16, 2298 + GP_6_15_FN, GPSR6_15, 2299 + GP_6_14_FN, GPSR6_14, 2300 + GP_6_13_FN, GPSR6_13, 2301 + GP_6_12_FN, GPSR6_12, 2302 + GP_6_11_FN, GPSR6_11, 2303 + GP_6_10_FN, GPSR6_10, 2304 + GP_6_9_FN, GPSR6_9, 2305 + GP_6_8_FN, GPSR6_8, 2306 + GP_6_7_FN, GPSR6_7, 2307 + GP_6_6_FN, GPSR6_6, 2308 + GP_6_5_FN, GPSR6_5, 2309 + GP_6_4_FN, GPSR6_4, 2310 + GP_6_3_FN, GPSR6_3, 2311 + GP_6_2_FN, GPSR6_2, 2312 + GP_6_1_FN, GPSR6_1, 2313 + GP_6_0_FN, GPSR6_0, } 2314 + }, 2315 + { PINMUX_CFG_REG("GPSR7", 0xe606011c, 32, 1) { 2316 + 0, 0, 2317 + 0, 0, 2318 + 0, 0, 2319 + 0, 0, 2320 + 0, 0, 2321 + 0, 0, 2322 + 0, 0, 2323 + 0, 0, 2324 + 0, 0, 2325 + 0, 0, 2326 + 0, 0, 2327 + 0, 0, 2328 + 0, 0, 2329 + 0, 0, 2330 + 0, 0, 2331 + 0, 0, 2332 + 0, 0, 2333 + 0, 0, 2334 + 0, 0, 2335 + 0, 0, 2336 + 0, 0, 2337 + 0, 0, 2338 + 0, 0, 2339 + 0, 0, 2340 + 0, 0, 2341 + 0, 0, 2342 + 0, 0, 2343 + 0, 0, 2344 + GP_7_3_FN, GPSR7_3, 2345 + GP_7_2_FN, GPSR7_2, 2346 + GP_7_1_FN, GPSR7_1, 2347 + GP_7_0_FN, GPSR7_0, } 2348 + }, 2349 + #undef F_ 2350 + #undef FM 2351 + 2352 + #define F_(x, y) x, 2353 + #define FM(x) FN_##x, 2354 + { PINMUX_CFG_REG("IPSR0", 0xe6060200, 32, 4) { 2355 + IP0_31_28 2356 + IP0_27_24 2357 + IP0_23_20 2358 + IP0_19_16 2359 + IP0_15_12 2360 + IP0_11_8 2361 + IP0_7_4 2362 + IP0_3_0 } 2363 + }, 2364 + { PINMUX_CFG_REG("IPSR1", 0xe6060204, 32, 4) { 2365 + IP1_31_28 2366 + IP1_27_24 2367 + IP1_23_20 2368 + IP1_19_16 2369 + IP1_15_12 2370 + IP1_11_8 2371 + IP1_7_4 2372 + IP1_3_0 } 2373 + }, 2374 + { PINMUX_CFG_REG("IPSR2", 0xe6060208, 32, 4) { 2375 + IP2_31_28 2376 + IP2_27_24 2377 + IP2_23_20 2378 + IP2_19_16 2379 + IP2_15_12 2380 + IP2_11_8 2381 + IP2_7_4 2382 + IP2_3_0 } 2383 + }, 2384 + { PINMUX_CFG_REG("IPSR3", 0xe606020c, 32, 4) { 2385 + IP3_31_28 2386 + IP3_27_24 2387 + IP3_23_20 2388 + IP3_19_16 2389 + IP3_15_12 2390 + IP3_11_8 2391 + IP3_7_4 2392 + IP3_3_0 } 2393 + }, 2394 + { PINMUX_CFG_REG("IPSR4", 0xe6060210, 32, 4) { 2395 + IP4_31_28 2396 + IP4_27_24 2397 + IP4_23_20 2398 + IP4_19_16 2399 + IP4_15_12 2400 + IP4_11_8 2401 + IP4_7_4 2402 + IP4_3_0 } 2403 + }, 2404 + { PINMUX_CFG_REG("IPSR5", 0xe6060214, 32, 4) { 2405 + IP5_31_28 2406 + IP5_27_24 2407 + IP5_23_20 2408 + IP5_19_16 2409 + IP5_15_12 2410 + IP5_11_8 2411 + IP5_7_4 2412 + IP5_3_0 } 2413 + }, 2414 + { PINMUX_CFG_REG("IPSR6", 0xe6060218, 32, 4) { 2415 + IP6_31_28 2416 + IP6_27_24 2417 + IP6_23_20 2418 + IP6_19_16 2419 + IP6_15_12 2420 + IP6_11_8 2421 + IP6_7_4 2422 + IP6_3_0 } 2423 + }, 2424 + { PINMUX_CFG_REG("IPSR7", 0xe606021c, 32, 4) { 2425 + IP7_31_28 2426 + IP7_27_24 2427 + IP7_23_20 2428 + IP7_19_16 2429 + IP7_15_12 2430 + IP7_11_8 2431 + IP7_7_4 2432 + IP7_3_0 } 2433 + }, 2434 + { PINMUX_CFG_REG("IPSR8", 0xe6060220, 32, 4) { 2435 + IP8_31_28 2436 + IP8_27_24 2437 + IP8_23_20 2438 + IP8_19_16 2439 + IP8_15_12 2440 + IP8_11_8 2441 + IP8_7_4 2442 + IP8_3_0 } 2443 + }, 2444 + { PINMUX_CFG_REG("IPSR9", 0xe6060224, 32, 4) { 2445 + IP9_31_28 2446 + IP9_27_24 2447 + IP9_23_20 2448 + IP9_19_16 2449 + IP9_15_12 2450 + IP9_11_8 2451 + IP9_7_4 2452 + IP9_3_0 } 2453 + }, 2454 + { PINMUX_CFG_REG("IPSR10", 0xe6060228, 32, 4) { 2455 + IP10_31_28 2456 + IP10_27_24 2457 + IP10_23_20 2458 + IP10_19_16 2459 + IP10_15_12 2460 + IP10_11_8 2461 + IP10_7_4 2462 + IP10_3_0 } 2463 + }, 2464 + { PINMUX_CFG_REG("IPSR11", 0xe606022c, 32, 4) { 2465 + IP11_31_28 2466 + IP11_27_24 2467 + IP11_23_20 2468 + IP11_19_16 2469 + IP11_15_12 2470 + IP11_11_8 2471 + IP11_7_4 2472 + IP11_3_0 } 2473 + }, 2474 + { PINMUX_CFG_REG("IPSR12", 0xe6060230, 32, 4) { 2475 + IP12_31_28 2476 + IP12_27_24 2477 + IP12_23_20 2478 + IP12_19_16 2479 + IP12_15_12 2480 + IP12_11_8 2481 + IP12_7_4 2482 + IP12_3_0 } 2483 + }, 2484 + { PINMUX_CFG_REG("IPSR13", 0xe6060234, 32, 4) { 2485 + IP13_31_28 2486 + IP13_27_24 2487 + IP13_23_20 2488 + IP13_19_16 2489 + IP13_15_12 2490 + IP13_11_8 2491 + IP13_7_4 2492 + IP13_3_0 } 2493 + }, 2494 + { PINMUX_CFG_REG("IPSR14", 0xe6060238, 32, 4) { 2495 + IP14_31_28 2496 + IP14_27_24 2497 + IP14_23_20 2498 + IP14_19_16 2499 + IP14_15_12 2500 + IP14_11_8 2501 + IP14_7_4 2502 + IP14_3_0 } 2503 + }, 2504 + { PINMUX_CFG_REG("IPSR15", 0xe606023c, 32, 4) { 2505 + IP15_31_28 2506 + IP15_27_24 2507 + IP15_23_20 2508 + IP15_19_16 2509 + IP15_15_12 2510 + IP15_11_8 2511 + IP15_7_4 2512 + IP15_3_0 } 2513 + }, 2514 + { PINMUX_CFG_REG("IPSR16", 0xe6060240, 32, 4) { 2515 + IP16_31_28 2516 + IP16_27_24 2517 + IP16_23_20 2518 + IP16_19_16 2519 + IP16_15_12 2520 + IP16_11_8 2521 + IP16_7_4 2522 + IP16_3_0 } 2523 + }, 2524 + { PINMUX_CFG_REG("IPSR17", 0xe6060244, 32, 4) { 2525 + IP17_31_28 2526 + IP17_27_24 2527 + IP17_23_20 2528 + IP17_19_16 2529 + IP17_15_12 2530 + IP17_11_8 2531 + IP17_7_4 2532 + IP17_3_0 } 2533 + }, 2534 + { PINMUX_CFG_REG("IPSR18", 0xe6060248, 32, 4) { 2535 + /* IP18_31_28 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2536 + /* IP18_27_24 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2537 + /* IP18_23_20 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2538 + /* IP18_19_16 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2539 + /* IP18_15_12 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2540 + /* IP18_11_8 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2541 + IP18_7_4 2542 + IP18_3_0 } 2543 + }, 2544 + #undef F_ 2545 + #undef FM 2546 + 2547 + #define F_(x, y) x, 2548 + #define FM(x) FN_##x, 2549 + { PINMUX_CFG_REG_VAR("MOD_SEL0", 0xe6060500, 32, 2550 + 3, 2, 3, 1, 1, 1, 1, 1, 2, 1, 2551 + 1, 2, 1, 1, 1, 2, 2, 1, 2, 3) { 2552 + MOD_SEL0_31_30_29 2553 + MOD_SEL0_28_27 2554 + MOD_SEL0_26_25_24 2555 + MOD_SEL0_23 2556 + MOD_SEL0_22 2557 + MOD_SEL0_21 2558 + MOD_SEL0_20 2559 + MOD_SEL0_19 2560 + MOD_SEL0_18_17 2561 + MOD_SEL0_16 2562 + MOD_SEL0_15 2563 + MOD_SEL0_14_13 2564 + MOD_SEL0_12 2565 + MOD_SEL0_11 2566 + MOD_SEL0_10 2567 + MOD_SEL0_9_8 2568 + MOD_SEL0_7_6 2569 + MOD_SEL0_5 2570 + MOD_SEL0_4_3 2571 + /* RESERVED 2, 1, 0 */ 2572 + 0, 0, 0, 0, 0, 0, 0, 0 } 2573 + }, 2574 + { PINMUX_CFG_REG_VAR("MOD_SEL1", 0xe6060504, 32, 2575 + 2, 3, 1, 2, 3, 1, 1, 2, 1, 2576 + 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1) { 2577 + MOD_SEL1_31_30 2578 + MOD_SEL1_29_28_27 2579 + MOD_SEL1_26 2580 + MOD_SEL1_25_24 2581 + MOD_SEL1_23_22_21 2582 + MOD_SEL1_20 2583 + MOD_SEL1_19 2584 + MOD_SEL1_18_17 2585 + MOD_SEL1_16 2586 + MOD_SEL1_15_14 2587 + MOD_SEL1_13 2588 + MOD_SEL1_12 2589 + MOD_SEL1_11 2590 + MOD_SEL1_10 2591 + MOD_SEL1_9 2592 + 0, 0, 0, 0, /* RESERVED 8, 7 */ 2593 + MOD_SEL1_6 2594 + MOD_SEL1_5 2595 + MOD_SEL1_4 2596 + MOD_SEL1_3 2597 + MOD_SEL1_2 2598 + MOD_SEL1_1 2599 + MOD_SEL1_0 } 2600 + }, 2601 + { PINMUX_CFG_REG_VAR("MOD_SEL2", 0xe6060508, 32, 2602 + 1, 1, 1, 2, 1, 3, 1, 1, 1, 1, 1, 1, 1, 2603 + 4, 4, 4, 3, 1) { 2604 + MOD_SEL2_31 2605 + MOD_SEL2_30 2606 + MOD_SEL2_29 2607 + MOD_SEL2_28_27 2608 + MOD_SEL2_26 2609 + MOD_SEL2_25_24_23 2610 + MOD_SEL2_22 2611 + MOD_SEL2_21 2612 + MOD_SEL2_20 2613 + MOD_SEL2_19 2614 + MOD_SEL2_18 2615 + MOD_SEL2_17 2616 + /* RESERVED 16 */ 2617 + 0, 0, 2618 + /* RESERVED 15, 14, 13, 12 */ 2619 + 0, 0, 0, 0, 0, 0, 0, 0, 2620 + 0, 0, 0, 0, 0, 0, 0, 0, 2621 + /* RESERVED 11, 10, 9, 8 */ 2622 + 0, 0, 0, 0, 0, 0, 0, 0, 2623 + 0, 0, 0, 0, 0, 0, 0, 0, 2624 + /* RESERVED 7, 6, 5, 4 */ 2625 + 0, 0, 0, 0, 0, 0, 0, 0, 2626 + 0, 0, 0, 0, 0, 0, 0, 0, 2627 + /* RESERVED 3, 2, 1 */ 2628 + 0, 0, 0, 0, 0, 0, 0, 0, 2629 + MOD_SEL2_0 } 2630 + }, 2631 + { }, 2632 + }; 2633 + 2634 + static int r8a7796_pin_to_pocctrl(struct sh_pfc *pfc, unsigned int pin, u32 *pocctrl) 2635 + { 2636 + int bit = -EINVAL; 2637 + 2638 + *pocctrl = 0xe6060380; 2639 + 2640 + if (pin >= RCAR_GP_PIN(3, 0) && pin <= RCAR_GP_PIN(3, 11)) 2641 + bit = pin & 0x1f; 2642 + 2643 + if (pin >= RCAR_GP_PIN(4, 0) && pin <= RCAR_GP_PIN(4, 17)) 2644 + bit = (pin & 0x1f) + 12; 2645 + 2646 + return bit; 2647 + } 2648 + 2649 + static const struct sh_pfc_soc_operations r8a7796_pinmux_ops = { 2650 + .pin_to_pocctrl = r8a7796_pin_to_pocctrl, 2651 + }; 2652 + 2653 + const struct sh_pfc_soc_info r8a7796_pinmux_info = { 2654 + .name = "r8a77960_pfc", 2655 + .ops = &r8a7796_pinmux_ops, 2656 + .unlock_reg = 0xe6060000, /* PMMR */ 2657 + 2658 + .function = { PINMUX_FUNCTION_BEGIN, PINMUX_FUNCTION_END }, 2659 + 2660 + .pins = pinmux_pins, 2661 + .nr_pins = ARRAY_SIZE(pinmux_pins), 2662 + .groups = pinmux_groups, 2663 + .nr_groups = ARRAY_SIZE(pinmux_groups), 2664 + .functions = pinmux_functions, 2665 + .nr_functions = ARRAY_SIZE(pinmux_functions), 2666 + 2667 + .cfg_regs = pinmux_config_regs, 2668 + 2669 + .pinmux_data = pinmux_data, 2670 + .pinmux_data_size = ARRAY_SIZE(pinmux_data), 2671 + };
+5 -3
drivers/pinctrl/sh-pfc/pinctrl.c
··· 596 596 struct sh_pfc *pfc = pmx->pfc; 597 597 enum pin_config_param param = pinconf_to_config_param(*config); 598 598 unsigned long flags; 599 + unsigned int arg; 599 600 600 601 if (!sh_pfc_pinconf_validate(pfc, _pin, param)) 601 602 return -ENOTSUPP; ··· 617 616 if (bias != param) 618 617 return -EINVAL; 619 618 620 - *config = 0; 619 + arg = 0; 621 620 break; 622 621 } 623 622 ··· 628 627 if (ret < 0) 629 628 return ret; 630 629 631 - *config = ret; 630 + arg = ret; 632 631 break; 633 632 } 634 633 ··· 647 646 val = sh_pfc_read_reg(pfc, pocctrl, 32); 648 647 spin_unlock_irqrestore(&pfc->lock, flags); 649 648 650 - *config = (val & BIT(bit)) ? 3300 : 1800; 649 + arg = (val & BIT(bit)) ? 3300 : 1800; 651 650 break; 652 651 } 653 652 ··· 655 654 return -ENOTSUPP; 656 655 } 657 656 657 + *config = pinconf_to_config_packed(param, arg); 658 658 return 0; 659 659 } 660 660
+73 -40
drivers/pinctrl/sh-pfc/sh_pfc.h
··· 257 257 extern const struct sh_pfc_soc_info r8a7779_pinmux_info; 258 258 extern const struct sh_pfc_soc_info r8a7790_pinmux_info; 259 259 extern const struct sh_pfc_soc_info r8a7791_pinmux_info; 260 + extern const struct sh_pfc_soc_info r8a7792_pinmux_info; 260 261 extern const struct sh_pfc_soc_info r8a7793_pinmux_info; 261 262 extern const struct sh_pfc_soc_info r8a7794_pinmux_info; 262 263 extern const struct sh_pfc_soc_info r8a7795_pinmux_info; 264 + extern const struct sh_pfc_soc_info r8a7796_pinmux_info; 263 265 extern const struct sh_pfc_soc_info sh7203_pinmux_info; 264 266 extern const struct sh_pfc_soc_info sh7264_pinmux_info; 265 267 extern const struct sh_pfc_soc_info sh7269_pinmux_info; ··· 356 354 * GP port style (32 ports banks) 357 355 */ 358 356 359 - #define PORT_GP_CFG_1(bank, pin, fn, sfx, cfg) fn(bank, pin, GP_##bank##_##pin, sfx, cfg) 357 + #define PORT_GP_CFG_1(bank, pin, fn, sfx, cfg) \ 358 + fn(bank, pin, GP_##bank##_##pin, sfx, cfg) 360 359 #define PORT_GP_1(bank, pin, fn, sfx) PORT_GP_CFG_1(bank, pin, fn, sfx, 0) 361 360 362 - #define PORT_GP_CFG_4(bank, fn, sfx, cfg) \ 363 - PORT_GP_CFG_1(bank, 0, fn, sfx, cfg), PORT_GP_CFG_1(bank, 1, fn, sfx, cfg), \ 364 - PORT_GP_CFG_1(bank, 2, fn, sfx, cfg), PORT_GP_CFG_1(bank, 3, fn, sfx, cfg) 361 + #define PORT_GP_CFG_4(bank, fn, sfx, cfg) \ 362 + PORT_GP_CFG_1(bank, 0, fn, sfx, cfg), \ 363 + PORT_GP_CFG_1(bank, 1, fn, sfx, cfg), \ 364 + PORT_GP_CFG_1(bank, 2, fn, sfx, cfg), \ 365 + PORT_GP_CFG_1(bank, 3, fn, sfx, cfg) 365 366 #define PORT_GP_4(bank, fn, sfx) PORT_GP_CFG_4(bank, fn, sfx, 0) 366 367 367 - #define PORT_GP_CFG_8(bank, fn, sfx, cfg) \ 368 - PORT_GP_CFG_4(bank, fn, sfx, cfg), \ 369 - PORT_GP_CFG_1(bank, 4, fn, sfx, cfg), PORT_GP_CFG_1(bank, 5, fn, sfx, cfg), \ 370 - PORT_GP_CFG_1(bank, 6, fn, sfx, cfg), PORT_GP_CFG_1(bank, 7, fn, sfx, cfg) 368 + #define PORT_GP_CFG_8(bank, fn, sfx, cfg) \ 369 + PORT_GP_CFG_4(bank, fn, sfx, cfg), \ 370 + PORT_GP_CFG_1(bank, 4, fn, sfx, cfg), \ 371 + PORT_GP_CFG_1(bank, 5, fn, sfx, cfg), \ 372 + PORT_GP_CFG_1(bank, 6, fn, sfx, cfg), \ 373 + PORT_GP_CFG_1(bank, 7, fn, sfx, cfg) 371 374 #define PORT_GP_8(bank, fn, sfx) PORT_GP_CFG_8(bank, fn, sfx, 0) 372 375 373 - #define PORT_GP_CFG_9(bank, fn, sfx, cfg) \ 374 - PORT_GP_CFG_8(bank, fn, sfx, cfg), \ 376 + #define PORT_GP_CFG_9(bank, fn, sfx, cfg) \ 377 + PORT_GP_CFG_8(bank, fn, sfx, cfg), \ 375 378 PORT_GP_CFG_1(bank, 8, fn, sfx, cfg) 376 379 #define PORT_GP_9(bank, fn, sfx) PORT_GP_CFG_9(bank, fn, sfx, 0) 377 380 378 - #define PORT_GP_CFG_12(bank, fn, sfx, cfg) \ 379 - PORT_GP_CFG_8(bank, fn, sfx, cfg), \ 380 - PORT_GP_CFG_1(bank, 8, fn, sfx, cfg), PORT_GP_CFG_1(bank, 9, fn, sfx, cfg), \ 381 - PORT_GP_CFG_1(bank, 10, fn, sfx, cfg), PORT_GP_CFG_1(bank, 11, fn, sfx, cfg) 381 + #define PORT_GP_CFG_12(bank, fn, sfx, cfg) \ 382 + PORT_GP_CFG_9(bank, fn, sfx, cfg), \ 383 + PORT_GP_CFG_1(bank, 9, fn, sfx, cfg), \ 384 + PORT_GP_CFG_1(bank, 10, fn, sfx, cfg), \ 385 + PORT_GP_CFG_1(bank, 11, fn, sfx, cfg) 382 386 #define PORT_GP_12(bank, fn, sfx) PORT_GP_CFG_12(bank, fn, sfx, 0) 383 387 384 - #define PORT_GP_CFG_14(bank, fn, sfx, cfg) \ 385 - PORT_GP_CFG_12(bank, fn, sfx, cfg), \ 386 - PORT_GP_CFG_1(bank, 12, fn, sfx, cfg), PORT_GP_CFG_1(bank, 13, fn, sfx, cfg) 388 + #define PORT_GP_CFG_14(bank, fn, sfx, cfg) \ 389 + PORT_GP_CFG_12(bank, fn, sfx, cfg), \ 390 + PORT_GP_CFG_1(bank, 12, fn, sfx, cfg), \ 391 + PORT_GP_CFG_1(bank, 13, fn, sfx, cfg) 387 392 #define PORT_GP_14(bank, fn, sfx) PORT_GP_CFG_14(bank, fn, sfx, 0) 388 393 389 - #define PORT_GP_CFG_15(bank, fn, sfx, cfg) \ 390 - PORT_GP_CFG_14(bank, fn, sfx, cfg), \ 394 + #define PORT_GP_CFG_15(bank, fn, sfx, cfg) \ 395 + PORT_GP_CFG_14(bank, fn, sfx, cfg), \ 391 396 PORT_GP_CFG_1(bank, 14, fn, sfx, cfg) 392 397 #define PORT_GP_15(bank, fn, sfx) PORT_GP_CFG_15(bank, fn, sfx, 0) 393 398 394 - #define PORT_GP_CFG_16(bank, fn, sfx, cfg) \ 395 - PORT_GP_CFG_14(bank, fn, sfx, cfg), \ 396 - PORT_GP_CFG_1(bank, 14, fn, sfx, cfg), PORT_GP_CFG_1(bank, 15, fn, sfx, cfg) 399 + #define PORT_GP_CFG_16(bank, fn, sfx, cfg) \ 400 + PORT_GP_CFG_15(bank, fn, sfx, cfg), \ 401 + PORT_GP_CFG_1(bank, 15, fn, sfx, cfg) 397 402 #define PORT_GP_16(bank, fn, sfx) PORT_GP_CFG_16(bank, fn, sfx, 0) 398 403 399 - #define PORT_GP_CFG_18(bank, fn, sfx, cfg) \ 400 - PORT_GP_CFG_16(bank, fn, sfx, cfg), \ 401 - PORT_GP_CFG_1(bank, 16, fn, sfx, cfg), PORT_GP_CFG_1(bank, 17, fn, sfx, cfg) 404 + #define PORT_GP_CFG_17(bank, fn, sfx, cfg) \ 405 + PORT_GP_CFG_16(bank, fn, sfx, cfg), \ 406 + PORT_GP_CFG_1(bank, 16, fn, sfx, cfg) 407 + #define PORT_GP_17(bank, fn, sfx) PORT_GP_CFG_17(bank, fn, sfx, 0) 408 + 409 + #define PORT_GP_CFG_18(bank, fn, sfx, cfg) \ 410 + PORT_GP_CFG_17(bank, fn, sfx, cfg), \ 411 + PORT_GP_CFG_1(bank, 17, fn, sfx, cfg) 402 412 #define PORT_GP_18(bank, fn, sfx) PORT_GP_CFG_18(bank, fn, sfx, 0) 403 413 404 - #define PORT_GP_CFG_26(bank, fn, sfx, cfg) \ 405 - PORT_GP_CFG_18(bank, fn, sfx, cfg), \ 406 - PORT_GP_CFG_1(bank, 18, fn, sfx, cfg), PORT_GP_CFG_1(bank, 19, fn, sfx, cfg), \ 407 - PORT_GP_CFG_1(bank, 20, fn, sfx, cfg), PORT_GP_CFG_1(bank, 21, fn, sfx, cfg), \ 408 - PORT_GP_CFG_1(bank, 22, fn, sfx, cfg), PORT_GP_CFG_1(bank, 23, fn, sfx, cfg), \ 409 - PORT_GP_CFG_1(bank, 24, fn, sfx, cfg), PORT_GP_CFG_1(bank, 25, fn, sfx, cfg) 414 + #define PORT_GP_CFG_23(bank, fn, sfx, cfg) \ 415 + PORT_GP_CFG_18(bank, fn, sfx, cfg), \ 416 + PORT_GP_CFG_1(bank, 18, fn, sfx, cfg), \ 417 + PORT_GP_CFG_1(bank, 19, fn, sfx, cfg), \ 418 + PORT_GP_CFG_1(bank, 20, fn, sfx, cfg), \ 419 + PORT_GP_CFG_1(bank, 21, fn, sfx, cfg), \ 420 + PORT_GP_CFG_1(bank, 22, fn, sfx, cfg) 421 + #define PORT_GP_23(bank, fn, sfx) PORT_GP_CFG_23(bank, fn, sfx, 0) 422 + 423 + #define PORT_GP_CFG_24(bank, fn, sfx, cfg) \ 424 + PORT_GP_CFG_23(bank, fn, sfx, cfg), \ 425 + PORT_GP_CFG_1(bank, 23, fn, sfx, cfg) 426 + #define PORT_GP_24(bank, fn, sfx) PORT_GP_CFG_24(bank, fn, sfx, 0) 427 + 428 + #define PORT_GP_CFG_26(bank, fn, sfx, cfg) \ 429 + PORT_GP_CFG_24(bank, fn, sfx, cfg), \ 430 + PORT_GP_CFG_1(bank, 24, fn, sfx, cfg), \ 431 + PORT_GP_CFG_1(bank, 25, fn, sfx, cfg) 410 432 #define PORT_GP_26(bank, fn, sfx) PORT_GP_CFG_26(bank, fn, sfx, 0) 411 433 412 - #define PORT_GP_CFG_28(bank, fn, sfx, cfg) \ 413 - PORT_GP_CFG_26(bank, fn, sfx, cfg), \ 414 - PORT_GP_CFG_1(bank, 26, fn, sfx, cfg), PORT_GP_CFG_1(bank, 27, fn, sfx, cfg) 434 + #define PORT_GP_CFG_28(bank, fn, sfx, cfg) \ 435 + PORT_GP_CFG_26(bank, fn, sfx, cfg), \ 436 + PORT_GP_CFG_1(bank, 26, fn, sfx, cfg), \ 437 + PORT_GP_CFG_1(bank, 27, fn, sfx, cfg) 415 438 #define PORT_GP_28(bank, fn, sfx) PORT_GP_CFG_28(bank, fn, sfx, 0) 416 439 417 - #define PORT_GP_CFG_30(bank, fn, sfx, cfg) \ 418 - PORT_GP_CFG_28(bank, fn, sfx, cfg), \ 419 - PORT_GP_CFG_1(bank, 28, fn, sfx, cfg), PORT_GP_CFG_1(bank, 29, fn, sfx, cfg) 440 + #define PORT_GP_CFG_29(bank, fn, sfx, cfg) \ 441 + PORT_GP_CFG_28(bank, fn, sfx, cfg), \ 442 + PORT_GP_CFG_1(bank, 28, fn, sfx, cfg) 443 + #define PORT_GP_29(bank, fn, sfx) PORT_GP_CFG_29(bank, fn, sfx, 0) 444 + 445 + #define PORT_GP_CFG_30(bank, fn, sfx, cfg) \ 446 + PORT_GP_CFG_29(bank, fn, sfx, cfg), \ 447 + PORT_GP_CFG_1(bank, 29, fn, sfx, cfg) 420 448 #define PORT_GP_30(bank, fn, sfx) PORT_GP_CFG_30(bank, fn, sfx, 0) 421 449 422 - #define PORT_GP_CFG_32(bank, fn, sfx, cfg) \ 423 - PORT_GP_CFG_30(bank, fn, sfx, cfg), \ 424 - PORT_GP_CFG_1(bank, 30, fn, sfx, cfg), PORT_GP_CFG_1(bank, 31, fn, sfx, cfg) 450 + #define PORT_GP_CFG_32(bank, fn, sfx, cfg) \ 451 + PORT_GP_CFG_30(bank, fn, sfx, cfg), \ 452 + PORT_GP_CFG_1(bank, 30, fn, sfx, cfg), \ 453 + PORT_GP_CFG_1(bank, 31, fn, sfx, cfg) 425 454 #define PORT_GP_32(bank, fn, sfx) PORT_GP_CFG_32(bank, fn, sfx, 0) 426 455 427 456 #define PORT_GP_32_REV(bank, fn, sfx) \
+1 -4
drivers/pinctrl/sirf/pinctrl-atlas7.c
··· 7 7 * Licensed under GPLv2 or later. 8 8 */ 9 9 10 - #include <linux/module.h> 10 + #include <linux/init.h> 11 11 #include <linux/platform_device.h> 12 12 #include <linux/io.h> 13 13 #include <linux/bitops.h> ··· 6158 6158 return platform_driver_register(&atlas7_gpio_driver); 6159 6159 } 6160 6160 subsys_initcall(atlas7_gpio_init); 6161 - 6162 - MODULE_DESCRIPTION("SIRFSOC Atlas7 pin control driver"); 6163 - MODULE_LICENSE("GPL");
+5 -7
drivers/pinctrl/sirf/pinctrl-sirf.c
··· 1 1 /* 2 2 * pinmux driver for CSR SiRFprimaII 3 3 * 4 + * Authors: 5 + * Rongjun Ying <rongjun.ying@csr.com> 6 + * Yuping Luo <yuping.luo@csr.com> 7 + * Barry Song <baohua.song@csr.com> 8 + * 4 9 * Copyright (c) 2011 - 2014 Cambridge Silicon Radio Limited, a CSR plc group 5 10 * company. 6 11 * ··· 13 8 */ 14 9 15 10 #include <linux/init.h> 16 - #include <linux/module.h> 17 11 #include <linux/irq.h> 18 12 #include <linux/platform_device.h> 19 13 #include <linux/io.h> ··· 888 884 return sirfsoc_gpio_probe(np); 889 885 } 890 886 subsys_initcall(sirfsoc_gpio_init); 891 - 892 - MODULE_AUTHOR("Rongjun Ying <rongjun.ying@csr.com>"); 893 - MODULE_AUTHOR("Yuping Luo <yuping.luo@csr.com>"); 894 - MODULE_AUTHOR("Barry Song <baohua.song@csr.com>"); 895 - MODULE_DESCRIPTION("SIRFSOC pin control driver"); 896 - MODULE_LICENSE("GPL");
+3 -2
drivers/pinctrl/stm32/Kconfig
··· 6 6 select PINMUX 7 7 select GENERIC_PINCONF 8 8 select GPIOLIB 9 + select MFD_SYSCON 9 10 10 11 config PINCTRL_STM32F429 11 12 bool "STMicroelectronics STM32F429 pin control" if COMPILE_TEST && !MACH_STM32F429 12 - depends on OF 13 + depends on OF && IRQ_DOMAIN_HIERARCHY 13 14 default MACH_STM32F429 14 15 select PINCTRL_STM32 15 16 16 17 config PINCTRL_STM32F746 17 18 bool "STMicroelectronics STM32F746 pin control" if COMPILE_TEST && !MACH_STM32F746 18 - depends on OF 19 + depends on OF && IRQ_DOMAIN_HIERARCHY 19 20 default MACH_STM32F746 20 21 select PINCTRL_STM32 21 22
+163 -2
drivers/pinctrl/stm32/pinctrl-stm32.c
··· 8 8 #include <linux/clk.h> 9 9 #include <linux/gpio/driver.h> 10 10 #include <linux/io.h> 11 + #include <linux/irq.h> 12 + #include <linux/mfd/syscon.h> 11 13 #include <linux/module.h> 12 14 #include <linux/of.h> 13 15 #include <linux/of_address.h> ··· 22 20 #include <linux/pinctrl/pinctrl.h> 23 21 #include <linux/pinctrl/pinmux.h> 24 22 #include <linux/platform_device.h> 23 + #include <linux/regmap.h> 25 24 #include <linux/reset.h> 26 25 #include <linux/slab.h> 27 26 ··· 43 40 #define STM32_GPIO_AFRH 0x24 44 41 45 42 #define STM32_GPIO_PINS_PER_BANK 16 43 + #define STM32_GPIO_IRQ_LINE 16 46 44 47 45 #define gpio_range_to_bank(chip) \ 48 46 container_of(chip, struct stm32_gpio_bank, range) ··· 69 65 spinlock_t lock; 70 66 struct gpio_chip gpio_chip; 71 67 struct pinctrl_gpio_range range; 68 + struct fwnode_handle *fwnode; 69 + struct irq_domain *domain; 72 70 }; 73 71 74 72 struct stm32_pinctrl { ··· 83 77 struct stm32_gpio_bank *banks; 84 78 unsigned nbanks; 85 79 const struct stm32_pinctrl_match_data *match_data; 80 + struct irq_domain *domain; 81 + struct regmap *regmap; 82 + struct regmap_field *irqmux[STM32_GPIO_PINS_PER_BANK]; 86 83 }; 87 84 88 85 static inline int stm32_gpio_pin(int gpio) ··· 183 174 return 0; 184 175 } 185 176 186 - static struct gpio_chip stm32_gpio_template = { 177 + 178 + static int stm32_gpio_to_irq(struct gpio_chip *chip, unsigned int offset) 179 + { 180 + struct stm32_gpio_bank *bank = gpiochip_get_data(chip); 181 + struct irq_fwspec fwspec; 182 + 183 + fwspec.fwnode = bank->fwnode; 184 + fwspec.param_count = 2; 185 + fwspec.param[0] = offset; 186 + fwspec.param[1] = IRQ_TYPE_NONE; 187 + 188 + return irq_create_fwspec_mapping(&fwspec); 189 + } 190 + 191 + static const struct gpio_chip stm32_gpio_template = { 187 192 .request = stm32_gpio_request, 188 193 .free = stm32_gpio_free, 189 194 .get = stm32_gpio_get, 190 195 .set = stm32_gpio_set, 191 196 .direction_input = stm32_gpio_direction_input, 192 197 .direction_output = stm32_gpio_direction_output, 198 + .to_irq = stm32_gpio_to_irq, 199 + }; 200 + 201 + static struct irq_chip stm32_gpio_irq_chip = { 202 + .name = "stm32gpio", 203 + .irq_eoi = irq_chip_eoi_parent, 204 + .irq_mask = irq_chip_mask_parent, 205 + .irq_unmask = irq_chip_unmask_parent, 206 + .irq_set_type = irq_chip_set_type_parent, 207 + }; 208 + 209 + static int stm32_gpio_domain_translate(struct irq_domain *d, 210 + struct irq_fwspec *fwspec, 211 + unsigned long *hwirq, 212 + unsigned int *type) 213 + { 214 + if ((fwspec->param_count != 2) || 215 + (fwspec->param[0] >= STM32_GPIO_IRQ_LINE)) 216 + return -EINVAL; 217 + 218 + *hwirq = fwspec->param[0]; 219 + *type = fwspec->param[1]; 220 + return 0; 221 + } 222 + 223 + static void stm32_gpio_domain_activate(struct irq_domain *d, 224 + struct irq_data *irq_data) 225 + { 226 + struct stm32_gpio_bank *bank = d->host_data; 227 + struct stm32_pinctrl *pctl = dev_get_drvdata(bank->gpio_chip.parent); 228 + 229 + regmap_field_write(pctl->irqmux[irq_data->hwirq], bank->range.id); 230 + } 231 + 232 + static int stm32_gpio_domain_alloc(struct irq_domain *d, 233 + unsigned int virq, 234 + unsigned int nr_irqs, void *data) 235 + { 236 + struct stm32_gpio_bank *bank = d->host_data; 237 + struct stm32_pinctrl *pctl = dev_get_drvdata(bank->gpio_chip.parent); 238 + struct irq_fwspec *fwspec = data; 239 + struct irq_fwspec parent_fwspec; 240 + irq_hw_number_t hwirq; 241 + int ret; 242 + 243 + hwirq = fwspec->param[0]; 244 + parent_fwspec.fwnode = d->parent->fwnode; 245 + parent_fwspec.param_count = 2; 246 + parent_fwspec.param[0] = fwspec->param[0]; 247 + parent_fwspec.param[1] = fwspec->param[1]; 248 + 249 + irq_domain_set_hwirq_and_chip(d, virq, hwirq, &stm32_gpio_irq_chip, 250 + bank); 251 + 252 + ret = gpiochip_lock_as_irq(&bank->gpio_chip, hwirq); 253 + if (ret) { 254 + dev_err(pctl->dev, "Unable to configure STM32 %s%ld as IRQ\n", 255 + bank->gpio_chip.label, hwirq); 256 + return ret; 257 + } 258 + 259 + ret = irq_domain_alloc_irqs_parent(d, virq, nr_irqs, &parent_fwspec); 260 + if (ret) 261 + gpiochip_unlock_as_irq(&bank->gpio_chip, hwirq); 262 + 263 + return ret; 264 + } 265 + 266 + static void stm32_gpio_domain_free(struct irq_domain *d, unsigned int virq, 267 + unsigned int nr_irqs) 268 + { 269 + struct stm32_gpio_bank *bank = d->host_data; 270 + struct irq_data *data = irq_get_irq_data(virq); 271 + 272 + irq_domain_free_irqs_common(d, virq, nr_irqs); 273 + gpiochip_unlock_as_irq(&bank->gpio_chip, data->hwirq); 274 + } 275 + 276 + static const struct irq_domain_ops stm32_gpio_domain_ops = { 277 + .translate = stm32_gpio_domain_translate, 278 + .alloc = stm32_gpio_domain_alloc, 279 + .free = stm32_gpio_domain_free, 280 + .activate = stm32_gpio_domain_activate, 193 281 }; 194 282 195 283 /* Pinctrl functions */ 196 - 197 284 static struct stm32_pinctrl_group * 198 285 stm32_pctrl_find_group_by_pin(struct stm32_pinctrl *pctl, u32 pin) 199 286 { ··· 962 857 range->pin_base = range->base = range->id * STM32_GPIO_PINS_PER_BANK; 963 858 range->npins = bank->gpio_chip.ngpio; 964 859 range->gc = &bank->gpio_chip; 860 + 861 + /* create irq hierarchical domain */ 862 + bank->fwnode = of_node_to_fwnode(np); 863 + 864 + bank->domain = irq_domain_create_hierarchy(pctl->domain, 0, 865 + STM32_GPIO_IRQ_LINE, bank->fwnode, 866 + &stm32_gpio_domain_ops, bank); 867 + 868 + if (!bank->domain) 869 + return -ENODEV; 870 + 965 871 err = gpiochip_add_data(&bank->gpio_chip, bank); 966 872 if (err) { 967 873 dev_err(dev, "Failed to add gpiochip(%d)!\n", bank_nr); ··· 980 864 } 981 865 982 866 dev_info(dev, "%s bank added\n", range->name); 867 + return 0; 868 + } 869 + 870 + static int stm32_pctrl_dt_setup_irq(struct platform_device *pdev, 871 + struct stm32_pinctrl *pctl) 872 + { 873 + struct device_node *np = pdev->dev.of_node, *parent; 874 + struct device *dev = &pdev->dev; 875 + struct regmap *rm; 876 + int offset, ret, i; 877 + 878 + parent = of_irq_find_parent(np); 879 + if (!parent) 880 + return -ENXIO; 881 + 882 + pctl->domain = irq_find_host(parent); 883 + if (!pctl->domain) 884 + return -ENXIO; 885 + 886 + pctl->regmap = syscon_regmap_lookup_by_phandle(np, "st,syscfg"); 887 + if (IS_ERR(pctl->regmap)) 888 + return PTR_ERR(pctl->regmap); 889 + 890 + rm = pctl->regmap; 891 + 892 + ret = of_property_read_u32_index(np, "st,syscfg", 1, &offset); 893 + if (ret) 894 + return ret; 895 + 896 + for (i = 0; i < STM32_GPIO_PINS_PER_BANK; i++) { 897 + struct reg_field mux; 898 + 899 + mux.reg = offset + (i / 4) * 4; 900 + mux.lsb = (i % 4) * 4; 901 + mux.msb = mux.lsb + 3; 902 + 903 + pctl->irqmux[i] = devm_regmap_field_alloc(dev, rm, mux); 904 + if (IS_ERR(pctl->irqmux[i])) 905 + return PTR_ERR(pctl->irqmux[i]); 906 + } 907 + 983 908 return 0; 984 909 } 985 910 ··· 1091 934 dev_err(dev, "build state failed: %d\n", ret); 1092 935 return -EINVAL; 1093 936 } 937 + 938 + ret = stm32_pctrl_dt_setup_irq(pdev, pctl); 939 + if (ret) 940 + return ret; 1094 941 1095 942 for_each_child_of_node(np, child) 1096 943 if (of_property_read_bool(child, "gpio-controller"))
+4
drivers/pinctrl/sunxi/Kconfig
··· 17 17 def_bool MACH_SUN5I 18 18 select PINCTRL_SUNXI 19 19 20 + config PINCTRL_GR8 21 + def_bool MACH_SUN5I 22 + select PINCTRL_SUNXI_COMMON 23 + 20 24 config PINCTRL_SUN6I_A31 21 25 def_bool MACH_SUN6I 22 26 select PINCTRL_SUNXI
+1
drivers/pinctrl/sunxi/Makefile
··· 5 5 obj-$(CONFIG_PINCTRL_SUN4I_A10) += pinctrl-sun4i-a10.o 6 6 obj-$(CONFIG_PINCTRL_SUN5I_A10S) += pinctrl-sun5i-a10s.o 7 7 obj-$(CONFIG_PINCTRL_SUN5I_A13) += pinctrl-sun5i-a13.o 8 + obj-$(CONFIG_PINCTRL_GR8) += pinctrl-gr8.o 8 9 obj-$(CONFIG_PINCTRL_SUN6I_A31) += pinctrl-sun6i-a31.o 9 10 obj-$(CONFIG_PINCTRL_SUN6I_A31S) += pinctrl-sun6i-a31s.o 10 11 obj-$(CONFIG_PINCTRL_SUN6I_A31_R) += pinctrl-sun6i-a31-r.o
+541
drivers/pinctrl/sunxi/pinctrl-gr8.c
··· 1 + /* 2 + * NextThing GR8 SoCs pinctrl driver. 3 + * 4 + * Copyright (C) 2016 Mylene Josserand 5 + * 6 + * Based on pinctrl-sun5i-a13.c 7 + * 8 + * Mylene Josserand <mylene.josserand@free-electrons.com> 9 + * 10 + * This file is licensed under the terms of the GNU General Public 11 + * License version 2. This program is licensed "as is" without any 12 + * warranty of any kind, whether express or implied. 13 + */ 14 + 15 + #include <linux/module.h> 16 + #include <linux/platform_device.h> 17 + #include <linux/of.h> 18 + #include <linux/of_device.h> 19 + #include <linux/pinctrl/pinctrl.h> 20 + 21 + #include "pinctrl-sunxi.h" 22 + 23 + static const struct sunxi_desc_pin sun5i_gr8_pins[] = { 24 + /* Hole */ 25 + SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 0), 26 + SUNXI_FUNCTION(0x0, "gpio_in"), 27 + SUNXI_FUNCTION(0x1, "gpio_out"), 28 + SUNXI_FUNCTION(0x2, "i2c0")), /* SCK */ 29 + SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 1), 30 + SUNXI_FUNCTION(0x0, "gpio_in"), 31 + SUNXI_FUNCTION(0x1, "gpio_out"), 32 + SUNXI_FUNCTION(0x2, "i2c0")), /* SDA */ 33 + SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 2), 34 + SUNXI_FUNCTION(0x0, "gpio_in"), 35 + SUNXI_FUNCTION(0x1, "gpio_out"), 36 + SUNXI_FUNCTION(0x2, "pwm0"), 37 + SUNXI_FUNCTION(0x3, "spdif"), /* DO */ 38 + SUNXI_FUNCTION_IRQ(0x6, 16)), /* EINT16 */ 39 + SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 3), 40 + SUNXI_FUNCTION(0x0, "gpio_in"), 41 + SUNXI_FUNCTION(0x1, "gpio_out"), 42 + SUNXI_FUNCTION(0x2, "ir0"), /* TX */ 43 + SUNXI_FUNCTION_IRQ(0x6, 17)), /* EINT17 */ 44 + SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 4), 45 + SUNXI_FUNCTION(0x0, "gpio_in"), 46 + SUNXI_FUNCTION(0x1, "gpio_out"), 47 + SUNXI_FUNCTION(0x2, "ir0"), /* RX */ 48 + SUNXI_FUNCTION_IRQ(0x6, 18)), /* EINT18 */ 49 + SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 5), 50 + SUNXI_FUNCTION(0x0, "gpio_in"), 51 + SUNXI_FUNCTION(0x1, "gpio_out"), 52 + SUNXI_FUNCTION(0x2, "i2s0"), /* MCLK */ 53 + SUNXI_FUNCTION_IRQ(0x6, 19)), /* EINT19 */ 54 + SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 6), 55 + SUNXI_FUNCTION(0x0, "gpio_in"), 56 + SUNXI_FUNCTION(0x1, "gpio_out"), 57 + SUNXI_FUNCTION(0x2, "i2s0"), /* BCLK */ 58 + SUNXI_FUNCTION_IRQ(0x6, 20)), /* EINT20 */ 59 + SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 7), 60 + SUNXI_FUNCTION(0x0, "gpio_in"), 61 + SUNXI_FUNCTION(0x1, "gpio_out"), 62 + SUNXI_FUNCTION(0x2, "i2s0"), /* LRCK */ 63 + SUNXI_FUNCTION_IRQ(0x6, 21)), /* EINT21 */ 64 + SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 8), 65 + SUNXI_FUNCTION(0x0, "gpio_in"), 66 + SUNXI_FUNCTION(0x1, "gpio_out"), 67 + SUNXI_FUNCTION(0x2, "i2s0"), /* DO */ 68 + SUNXI_FUNCTION_IRQ(0x6, 22)), /* EINT22 */ 69 + SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 9), 70 + SUNXI_FUNCTION(0x0, "gpio_in"), 71 + SUNXI_FUNCTION(0x1, "gpio_out"), 72 + SUNXI_FUNCTION(0x2, "i2s0"), /* DI */ 73 + SUNXI_FUNCTION(0x3, "spdif"), /* DI */ 74 + SUNXI_FUNCTION_IRQ(0x6, 23)), /* EINT23 */ 75 + SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 10), 76 + SUNXI_FUNCTION(0x0, "gpio_in"), 77 + SUNXI_FUNCTION(0x1, "gpio_out"), 78 + SUNXI_FUNCTION(0x2, "spi2"), /* CS1 */ 79 + SUNXI_FUNCTION(0x3, "spdif"), /* DO */ 80 + SUNXI_FUNCTION_IRQ(0x6, 24)), /* EINT24 */ 81 + SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 11), 82 + SUNXI_FUNCTION(0x0, "gpio_in"), 83 + SUNXI_FUNCTION(0x1, "gpio_out"), 84 + SUNXI_FUNCTION(0x2, "spi2"), /* CS0 */ 85 + SUNXI_FUNCTION(0x3, "jtag"), /* MS0 */ 86 + SUNXI_FUNCTION_IRQ(0x6, 25)), /* EINT25 */ 87 + SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 12), 88 + SUNXI_FUNCTION(0x0, "gpio_in"), 89 + SUNXI_FUNCTION(0x1, "gpio_out"), 90 + SUNXI_FUNCTION(0x2, "spi2"), /* CLK */ 91 + SUNXI_FUNCTION(0x3, "jtag"), /* CK0 */ 92 + SUNXI_FUNCTION_IRQ(0x6, 26)), /* EINT26 */ 93 + SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 13), 94 + SUNXI_FUNCTION(0x0, "gpio_in"), 95 + SUNXI_FUNCTION(0x1, "gpio_out"), 96 + SUNXI_FUNCTION(0x2, "spi2"), /* MOSI */ 97 + SUNXI_FUNCTION(0x3, "jtag"), /* DO0 */ 98 + SUNXI_FUNCTION_IRQ(0x6, 27)), /* EINT27 */ 99 + SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 14), 100 + SUNXI_FUNCTION(0x0, "gpio_in"), 101 + SUNXI_FUNCTION(0x1, "gpio_out"), 102 + SUNXI_FUNCTION(0x2, "spi2"), /* MISO */ 103 + SUNXI_FUNCTION(0x3, "jtag"), /* DI0 */ 104 + SUNXI_FUNCTION_IRQ(0x6, 28)), /* EINT28 */ 105 + SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 15), 106 + SUNXI_FUNCTION(0x0, "gpio_in"), 107 + SUNXI_FUNCTION(0x1, "gpio_out"), 108 + SUNXI_FUNCTION(0x2, "i2c1")), /* SCK */ 109 + SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 16), 110 + SUNXI_FUNCTION(0x0, "gpio_in"), 111 + SUNXI_FUNCTION(0x1, "gpio_out"), 112 + SUNXI_FUNCTION(0x2, "i2c1")), /* SDA */ 113 + SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 17), 114 + SUNXI_FUNCTION(0x0, "gpio_in"), 115 + SUNXI_FUNCTION(0x1, "gpio_out"), 116 + SUNXI_FUNCTION(0x2, "i2c2")), /* SCK */ 117 + SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 18), 118 + SUNXI_FUNCTION(0x0, "gpio_in"), 119 + SUNXI_FUNCTION(0x1, "gpio_out"), 120 + SUNXI_FUNCTION(0x2, "i2c2")), /* SDA */ 121 + /* Hole */ 122 + SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 0), 123 + SUNXI_FUNCTION(0x0, "gpio_in"), 124 + SUNXI_FUNCTION(0x1, "gpio_out"), 125 + SUNXI_FUNCTION(0x2, "nand0"), /* NWE */ 126 + SUNXI_FUNCTION(0x3, "spi0")), /* MOSI */ 127 + SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 1), 128 + SUNXI_FUNCTION(0x0, "gpio_in"), 129 + SUNXI_FUNCTION(0x1, "gpio_out"), 130 + SUNXI_FUNCTION(0x2, "nand0"), /* NALE */ 131 + SUNXI_FUNCTION(0x3, "spi0")), /* MISO */ 132 + SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 2), 133 + SUNXI_FUNCTION(0x0, "gpio_in"), 134 + SUNXI_FUNCTION(0x1, "gpio_out"), 135 + SUNXI_FUNCTION(0x2, "nand0"), /* NCLE */ 136 + SUNXI_FUNCTION(0x3, "spi0")), /* CLK */ 137 + SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 3), 138 + SUNXI_FUNCTION(0x0, "gpio_in"), 139 + SUNXI_FUNCTION(0x1, "gpio_out"), 140 + SUNXI_FUNCTION(0x2, "nand0"), /* NCE1 */ 141 + SUNXI_FUNCTION(0x3, "spi0")), /* CS0 */ 142 + SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 4), 143 + SUNXI_FUNCTION(0x0, "gpio_in"), 144 + SUNXI_FUNCTION(0x1, "gpio_out"), 145 + SUNXI_FUNCTION(0x2, "nand0")), /* NCE0 */ 146 + SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 5), 147 + SUNXI_FUNCTION(0x0, "gpio_in"), 148 + SUNXI_FUNCTION(0x1, "gpio_out"), 149 + SUNXI_FUNCTION(0x2, "nand0")), /* NRE */ 150 + SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 6), 151 + SUNXI_FUNCTION(0x0, "gpio_in"), 152 + SUNXI_FUNCTION(0x1, "gpio_out"), 153 + SUNXI_FUNCTION(0x2, "nand0"), /* NRB0 */ 154 + SUNXI_FUNCTION(0x3, "mmc2")), /* CMD */ 155 + SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 7), 156 + SUNXI_FUNCTION(0x0, "gpio_in"), 157 + SUNXI_FUNCTION(0x1, "gpio_out"), 158 + SUNXI_FUNCTION(0x2, "nand0"), /* NRB1 */ 159 + SUNXI_FUNCTION(0x3, "mmc2")), /* CLK */ 160 + SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 8), 161 + SUNXI_FUNCTION(0x0, "gpio_in"), 162 + SUNXI_FUNCTION(0x1, "gpio_out"), 163 + SUNXI_FUNCTION(0x2, "nand0"), /* NDQ0 */ 164 + SUNXI_FUNCTION(0x3, "mmc2")), /* D0 */ 165 + SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 9), 166 + SUNXI_FUNCTION(0x0, "gpio_in"), 167 + SUNXI_FUNCTION(0x1, "gpio_out"), 168 + SUNXI_FUNCTION(0x2, "nand0"), /* NDQ1 */ 169 + SUNXI_FUNCTION(0x3, "mmc2")), /* D1 */ 170 + SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 10), 171 + SUNXI_FUNCTION(0x0, "gpio_in"), 172 + SUNXI_FUNCTION(0x1, "gpio_out"), 173 + SUNXI_FUNCTION(0x2, "nand0"), /* NDQ2 */ 174 + SUNXI_FUNCTION(0x3, "mmc2")), /* D2 */ 175 + SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 11), 176 + SUNXI_FUNCTION(0x0, "gpio_in"), 177 + SUNXI_FUNCTION(0x1, "gpio_out"), 178 + SUNXI_FUNCTION(0x2, "nand0"), /* NDQ3 */ 179 + SUNXI_FUNCTION(0x3, "mmc2")), /* D3 */ 180 + SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 12), 181 + SUNXI_FUNCTION(0x0, "gpio_in"), 182 + SUNXI_FUNCTION(0x1, "gpio_out"), 183 + SUNXI_FUNCTION(0x2, "nand0"), /* NDQ4 */ 184 + SUNXI_FUNCTION(0x3, "mmc2")), /* D4 */ 185 + SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 13), 186 + SUNXI_FUNCTION(0x0, "gpio_in"), 187 + SUNXI_FUNCTION(0x1, "gpio_out"), 188 + SUNXI_FUNCTION(0x2, "nand0"), /* NDQ5 */ 189 + SUNXI_FUNCTION(0x3, "mmc2")), /* D5 */ 190 + SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 14), 191 + SUNXI_FUNCTION(0x0, "gpio_in"), 192 + SUNXI_FUNCTION(0x1, "gpio_out"), 193 + SUNXI_FUNCTION(0x2, "nand0"), /* NDQ6 */ 194 + SUNXI_FUNCTION(0x3, "mmc2")), /* D6 */ 195 + SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 15), 196 + SUNXI_FUNCTION(0x0, "gpio_in"), 197 + SUNXI_FUNCTION(0x1, "gpio_out"), 198 + SUNXI_FUNCTION(0x2, "nand0"), /* NDQ7 */ 199 + SUNXI_FUNCTION(0x3, "mmc2")), /* D7 */ 200 + /* Hole */ 201 + SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 19), 202 + SUNXI_FUNCTION(0x0, "gpio_in"), 203 + SUNXI_FUNCTION(0x1, "gpio_out"), 204 + SUNXI_FUNCTION(0x2, "nand0"), /* NDQS */ 205 + SUNXI_FUNCTION(0x3, "uart2"), /* RX */ 206 + SUNXI_FUNCTION(0x4, "uart3")), /* RTS */ 207 + /* Hole */ 208 + SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 2), 209 + SUNXI_FUNCTION(0x0, "gpio_in"), 210 + SUNXI_FUNCTION(0x1, "gpio_out"), 211 + SUNXI_FUNCTION(0x2, "lcd0"), /* D2 */ 212 + SUNXI_FUNCTION(0x3, "uart2")), /* TX */ 213 + SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 3), 214 + SUNXI_FUNCTION(0x0, "gpio_in"), 215 + SUNXI_FUNCTION(0x1, "gpio_out"), 216 + SUNXI_FUNCTION(0x2, "lcd0"), /* D3 */ 217 + SUNXI_FUNCTION(0x3, "uart2")), /* RX */ 218 + SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 4), 219 + SUNXI_FUNCTION(0x0, "gpio_in"), 220 + SUNXI_FUNCTION(0x1, "gpio_out"), 221 + SUNXI_FUNCTION(0x2, "lcd0"), /* D4 */ 222 + SUNXI_FUNCTION(0x3, "uart2")), /* CTS */ 223 + SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 5), 224 + SUNXI_FUNCTION(0x0, "gpio_in"), 225 + SUNXI_FUNCTION(0x1, "gpio_out"), 226 + SUNXI_FUNCTION(0x2, "lcd0"), /* D5 */ 227 + SUNXI_FUNCTION(0x3, "uart2")), /* RTS */ 228 + SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 6), 229 + SUNXI_FUNCTION(0x0, "gpio_in"), 230 + SUNXI_FUNCTION(0x1, "gpio_out"), 231 + SUNXI_FUNCTION(0x2, "lcd0"), /* D6 */ 232 + SUNXI_FUNCTION(0x3, "emac")), /* ECRS */ 233 + SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 7), 234 + SUNXI_FUNCTION(0x0, "gpio_in"), 235 + SUNXI_FUNCTION(0x1, "gpio_out"), 236 + SUNXI_FUNCTION(0x2, "lcd0"), /* D7 */ 237 + SUNXI_FUNCTION(0x3, "emac")), /* ECOL */ 238 + /* Hole */ 239 + SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 10), 240 + SUNXI_FUNCTION(0x0, "gpio_in"), 241 + SUNXI_FUNCTION(0x1, "gpio_out"), 242 + SUNXI_FUNCTION(0x2, "lcd0"), /* D10 */ 243 + SUNXI_FUNCTION(0x3, "emac")), /* ERXD0 */ 244 + SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 11), 245 + SUNXI_FUNCTION(0x0, "gpio_in"), 246 + SUNXI_FUNCTION(0x1, "gpio_out"), 247 + SUNXI_FUNCTION(0x2, "lcd0"), /* D11 */ 248 + SUNXI_FUNCTION(0x3, "emac")), /* ERXD1 */ 249 + SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 12), 250 + SUNXI_FUNCTION(0x0, "gpio_in"), 251 + SUNXI_FUNCTION(0x1, "gpio_out"), 252 + SUNXI_FUNCTION(0x2, "lcd0"), /* D12 */ 253 + SUNXI_FUNCTION(0x3, "emac")), /* ERXD2 */ 254 + SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 13), 255 + SUNXI_FUNCTION(0x0, "gpio_in"), 256 + SUNXI_FUNCTION(0x1, "gpio_out"), 257 + SUNXI_FUNCTION(0x2, "lcd0"), /* D13 */ 258 + SUNXI_FUNCTION(0x3, "emac")), /* ERXD3 */ 259 + SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 14), 260 + SUNXI_FUNCTION(0x0, "gpio_in"), 261 + SUNXI_FUNCTION(0x1, "gpio_out"), 262 + SUNXI_FUNCTION(0x2, "lcd0"), /* D14 */ 263 + SUNXI_FUNCTION(0x3, "emac")), /* ERXCK */ 264 + SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 15), 265 + SUNXI_FUNCTION(0x0, "gpio_in"), 266 + SUNXI_FUNCTION(0x1, "gpio_out"), 267 + SUNXI_FUNCTION(0x2, "lcd0"), /* D15 */ 268 + SUNXI_FUNCTION(0x3, "emac")), /* ERXERR */ 269 + /* Hole */ 270 + SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 18), 271 + SUNXI_FUNCTION(0x0, "gpio_in"), 272 + SUNXI_FUNCTION(0x1, "gpio_out"), 273 + SUNXI_FUNCTION(0x2, "lcd0"), /* D18 */ 274 + SUNXI_FUNCTION(0x3, "emac")), /* ERXDV */ 275 + SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 19), 276 + SUNXI_FUNCTION(0x0, "gpio_in"), 277 + SUNXI_FUNCTION(0x1, "gpio_out"), 278 + SUNXI_FUNCTION(0x2, "lcd0"), /* D19 */ 279 + SUNXI_FUNCTION(0x3, "emac")), /* ETXD0 */ 280 + SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 20), 281 + SUNXI_FUNCTION(0x0, "gpio_in"), 282 + SUNXI_FUNCTION(0x1, "gpio_out"), 283 + SUNXI_FUNCTION(0x2, "lcd0"), /* D20 */ 284 + SUNXI_FUNCTION(0x3, "emac")), /* ETXD1 */ 285 + SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 21), 286 + SUNXI_FUNCTION(0x0, "gpio_in"), 287 + SUNXI_FUNCTION(0x1, "gpio_out"), 288 + SUNXI_FUNCTION(0x2, "lcd0"), /* D21 */ 289 + SUNXI_FUNCTION(0x3, "emac")), /* ETXD2 */ 290 + SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 22), 291 + SUNXI_FUNCTION(0x0, "gpio_in"), 292 + SUNXI_FUNCTION(0x1, "gpio_out"), 293 + SUNXI_FUNCTION(0x2, "lcd0"), /* D22 */ 294 + SUNXI_FUNCTION(0x3, "emac")), /* ETXD3 */ 295 + SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 23), 296 + SUNXI_FUNCTION(0x0, "gpio_in"), 297 + SUNXI_FUNCTION(0x1, "gpio_out"), 298 + SUNXI_FUNCTION(0x2, "lcd0"), /* D23 */ 299 + SUNXI_FUNCTION(0x3, "emac")), /* ETXEN */ 300 + SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 24), 301 + SUNXI_FUNCTION(0x0, "gpio_in"), 302 + SUNXI_FUNCTION(0x1, "gpio_out"), 303 + SUNXI_FUNCTION(0x2, "lcd0"), /* CLK */ 304 + SUNXI_FUNCTION(0x3, "emac")), /* ETXCK */ 305 + SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 25), 306 + SUNXI_FUNCTION(0x0, "gpio_in"), 307 + SUNXI_FUNCTION(0x1, "gpio_out"), 308 + SUNXI_FUNCTION(0x2, "lcd0"), /* DE */ 309 + SUNXI_FUNCTION(0x3, "emac")), /* ETXERR*/ 310 + SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 26), 311 + SUNXI_FUNCTION(0x0, "gpio_in"), 312 + SUNXI_FUNCTION(0x1, "gpio_out"), 313 + SUNXI_FUNCTION(0x2, "lcd0"), /* HSYNC */ 314 + SUNXI_FUNCTION(0x3, "emac")), /* EMDC */ 315 + SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 27), 316 + SUNXI_FUNCTION(0x0, "gpio_in"), 317 + SUNXI_FUNCTION(0x1, "gpio_out"), 318 + SUNXI_FUNCTION(0x2, "lcd0"), /* VSYNC */ 319 + SUNXI_FUNCTION(0x3, "emac")), /* EMDIO */ 320 + /* Hole */ 321 + SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 0), 322 + SUNXI_FUNCTION(0x0, "gpio_in"), 323 + SUNXI_FUNCTION(0x2, "ts0"), /* CLK */ 324 + SUNXI_FUNCTION(0x3, "csi0"), /* PCLK */ 325 + SUNXI_FUNCTION(0x4, "spi2"), /* CS0 */ 326 + SUNXI_FUNCTION_IRQ(0x6, 14)), /* EINT14 */ 327 + SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 1), 328 + SUNXI_FUNCTION(0x0, "gpio_in"), 329 + SUNXI_FUNCTION(0x2, "ts0"), /* ERR */ 330 + SUNXI_FUNCTION(0x3, "csi0"), /* MCLK */ 331 + SUNXI_FUNCTION(0x4, "spi2"), /* CLK */ 332 + SUNXI_FUNCTION_IRQ(0x6, 15)), /* EINT15 */ 333 + SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 2), 334 + SUNXI_FUNCTION(0x0, "gpio_in"), 335 + SUNXI_FUNCTION(0x2, "ts0"), /* SYNC */ 336 + SUNXI_FUNCTION(0x3, "csi0"), /* HSYNC */ 337 + SUNXI_FUNCTION(0x4, "spi2")), /* MOSI */ 338 + SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 3), 339 + SUNXI_FUNCTION(0x0, "gpio_in"), 340 + SUNXI_FUNCTION(0x1, "gpio_out"), 341 + SUNXI_FUNCTION(0x2, "ts0"), /* DVLD */ 342 + SUNXI_FUNCTION(0x3, "csi0"), /* VSYNC */ 343 + SUNXI_FUNCTION(0x4, "spi2")), /* MISO */ 344 + SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 4), 345 + SUNXI_FUNCTION(0x0, "gpio_in"), 346 + SUNXI_FUNCTION(0x1, "gpio_out"), 347 + SUNXI_FUNCTION(0x2, "ts0"), /* D0 */ 348 + SUNXI_FUNCTION(0x3, "csi0"), /* D0 */ 349 + SUNXI_FUNCTION(0x4, "mmc2")), /* D0 */ 350 + SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 5), 351 + SUNXI_FUNCTION(0x0, "gpio_in"), 352 + SUNXI_FUNCTION(0x1, "gpio_out"), 353 + SUNXI_FUNCTION(0x2, "ts0"), /* D1 */ 354 + SUNXI_FUNCTION(0x3, "csi0"), /* D1 */ 355 + SUNXI_FUNCTION(0x4, "mmc2")), /* D1 */ 356 + SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 6), 357 + SUNXI_FUNCTION(0x0, "gpio_in"), 358 + SUNXI_FUNCTION(0x1, "gpio_out"), 359 + SUNXI_FUNCTION(0x2, "ts0"), /* D2 */ 360 + SUNXI_FUNCTION(0x3, "csi0"), /* D2 */ 361 + SUNXI_FUNCTION(0x4, "mmc2")), /* D2 */ 362 + SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 7), 363 + SUNXI_FUNCTION(0x0, "gpio_in"), 364 + SUNXI_FUNCTION(0x1, "gpio_out"), 365 + SUNXI_FUNCTION(0x2, "ts0"), /* D3 */ 366 + SUNXI_FUNCTION(0x3, "csi0"), /* D3 */ 367 + SUNXI_FUNCTION(0x4, "mmc2")), /* D3 */ 368 + SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 8), 369 + SUNXI_FUNCTION(0x0, "gpio_in"), 370 + SUNXI_FUNCTION(0x1, "gpio_out"), 371 + SUNXI_FUNCTION(0x2, "ts0"), /* D4 */ 372 + SUNXI_FUNCTION(0x3, "csi0"), /* D4 */ 373 + SUNXI_FUNCTION(0x4, "mmc2")), /* CMD */ 374 + SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 9), 375 + SUNXI_FUNCTION(0x0, "gpio_in"), 376 + SUNXI_FUNCTION(0x1, "gpio_out"), 377 + SUNXI_FUNCTION(0x2, "ts0"), /* D5 */ 378 + SUNXI_FUNCTION(0x3, "csi0"), /* D5 */ 379 + SUNXI_FUNCTION(0x4, "mmc2")), /* CLK */ 380 + SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 10), 381 + SUNXI_FUNCTION(0x0, "gpio_in"), 382 + SUNXI_FUNCTION(0x1, "gpio_out"), 383 + SUNXI_FUNCTION(0x2, "ts0"), /* D6 */ 384 + SUNXI_FUNCTION(0x3, "csi0"), /* D6 */ 385 + SUNXI_FUNCTION(0x4, "uart1")), /* TX */ 386 + SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 11), 387 + SUNXI_FUNCTION(0x0, "gpio_in"), 388 + SUNXI_FUNCTION(0x1, "gpio_out"), 389 + SUNXI_FUNCTION(0x2, "ts0"), /* D7 */ 390 + SUNXI_FUNCTION(0x3, "csi0"), /* D7 */ 391 + SUNXI_FUNCTION(0x4, "uart1")), /* RX */ 392 + /* Hole */ 393 + SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 0), 394 + SUNXI_FUNCTION(0x0, "gpio_in"), 395 + SUNXI_FUNCTION(0x1, "gpio_out"), 396 + SUNXI_FUNCTION(0x2, "mmc0"), /* D1 */ 397 + SUNXI_FUNCTION(0x4, "jtag")), /* MS1 */ 398 + SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 1), 399 + SUNXI_FUNCTION(0x0, "gpio_in"), 400 + SUNXI_FUNCTION(0x1, "gpio_out"), 401 + SUNXI_FUNCTION(0x2, "mmc0"), /* D0 */ 402 + SUNXI_FUNCTION(0x4, "jtag")), /* DI1 */ 403 + SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 2), 404 + SUNXI_FUNCTION(0x0, "gpio_in"), 405 + SUNXI_FUNCTION(0x1, "gpio_out"), 406 + SUNXI_FUNCTION(0x2, "mmc0"), /* CLK */ 407 + SUNXI_FUNCTION(0x4, "uart0")), /* TX */ 408 + SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 3), 409 + SUNXI_FUNCTION(0x0, "gpio_in"), 410 + SUNXI_FUNCTION(0x1, "gpio_out"), 411 + SUNXI_FUNCTION(0x2, "mmc0"), /* CMD */ 412 + SUNXI_FUNCTION(0x4, "jtag")), /* DO1 */ 413 + SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 4), 414 + SUNXI_FUNCTION(0x0, "gpio_in"), 415 + SUNXI_FUNCTION(0x1, "gpio_out"), 416 + SUNXI_FUNCTION(0x2, "mmc0"), /* D3 */ 417 + SUNXI_FUNCTION(0x4, "uart0")), /* RX */ 418 + SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 5), 419 + SUNXI_FUNCTION(0x0, "gpio_in"), 420 + SUNXI_FUNCTION(0x1, "gpio_out"), 421 + SUNXI_FUNCTION(0x2, "mmc0"), /* D2 */ 422 + SUNXI_FUNCTION(0x4, "jtag")), /* CK1 */ 423 + /* Hole */ 424 + SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 0), 425 + SUNXI_FUNCTION(0x0, "gpio_in"), 426 + SUNXI_FUNCTION(0x2, "gps"), /* CLK */ 427 + SUNXI_FUNCTION_IRQ(0x6, 0)), /* EINT0 */ 428 + SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 1), 429 + SUNXI_FUNCTION(0x0, "gpio_in"), 430 + SUNXI_FUNCTION(0x2, "gps"), /* SIGN */ 431 + SUNXI_FUNCTION_IRQ(0x6, 1)), /* EINT1 */ 432 + SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 2), 433 + SUNXI_FUNCTION(0x0, "gpio_in"), 434 + SUNXI_FUNCTION(0x2, "gps"), /* MAG */ 435 + SUNXI_FUNCTION_IRQ(0x6, 2)), /* EINT2 */ 436 + SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 3), 437 + SUNXI_FUNCTION(0x0, "gpio_in"), 438 + SUNXI_FUNCTION(0x1, "gpio_out"), 439 + SUNXI_FUNCTION(0x2, "mmc1"), /* CMD */ 440 + SUNXI_FUNCTION(0x3, "ms"), /* BS */ 441 + SUNXI_FUNCTION(0x4, "uart1"), /* TX */ 442 + SUNXI_FUNCTION_IRQ(0x6, 3)), /* EINT3 */ 443 + SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 4), 444 + SUNXI_FUNCTION(0x0, "gpio_in"), 445 + SUNXI_FUNCTION(0x1, "gpio_out"), 446 + SUNXI_FUNCTION(0x2, "mmc1"), /* CLK */ 447 + SUNXI_FUNCTION(0x3, "ms"), /* CLK */ 448 + SUNXI_FUNCTION(0x4, "uart1"), /* RX */ 449 + SUNXI_FUNCTION_IRQ(0x6, 4)), /* EINT4 */ 450 + SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 5), 451 + SUNXI_FUNCTION(0x0, "gpio_in"), 452 + SUNXI_FUNCTION(0x1, "gpio_out"), 453 + SUNXI_FUNCTION(0x2, "mmc1"), /* D0 */ 454 + SUNXI_FUNCTION(0x3, "ms"), /* D0 */ 455 + SUNXI_FUNCTION(0x4, "uart1"), /* CTS */ 456 + SUNXI_FUNCTION_IRQ(0x6, 5)), /* EINT5 */ 457 + SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 6), 458 + SUNXI_FUNCTION(0x0, "gpio_in"), 459 + SUNXI_FUNCTION(0x1, "gpio_out"), 460 + SUNXI_FUNCTION(0x2, "mmc1"), /* D1 */ 461 + SUNXI_FUNCTION(0x3, "ms"), /* D1 */ 462 + SUNXI_FUNCTION(0x4, "uart1"), /* RTS */ 463 + SUNXI_FUNCTION(0x5, "uart2"), /* RTS */ 464 + SUNXI_FUNCTION_IRQ(0x6, 6)), /* EINT6 */ 465 + SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 7), 466 + SUNXI_FUNCTION(0x0, "gpio_in"), 467 + SUNXI_FUNCTION(0x1, "gpio_out"), 468 + SUNXI_FUNCTION(0x2, "mmc1"), /* D2 */ 469 + SUNXI_FUNCTION(0x3, "ms"), /* D2 */ 470 + SUNXI_FUNCTION(0x5, "uart2"), /* TX */ 471 + SUNXI_FUNCTION_IRQ(0x6, 7)), /* EINT7 */ 472 + SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 8), 473 + SUNXI_FUNCTION(0x0, "gpio_in"), 474 + SUNXI_FUNCTION(0x1, "gpio_out"), 475 + SUNXI_FUNCTION(0x2, "mmc1"), /* D3 */ 476 + SUNXI_FUNCTION(0x3, "ms"), /* D3 */ 477 + SUNXI_FUNCTION(0x5, "uart2"), /* RX */ 478 + SUNXI_FUNCTION_IRQ(0x6, 8)), /* EINT8 */ 479 + SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 9), 480 + SUNXI_FUNCTION(0x0, "gpio_in"), 481 + SUNXI_FUNCTION(0x1, "gpio_out"), 482 + SUNXI_FUNCTION(0x2, "spi1"), /* CS0 */ 483 + SUNXI_FUNCTION(0x3, "uart3"), /* TX */ 484 + SUNXI_FUNCTION_IRQ(0x6, 9)), /* EINT9 */ 485 + SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 10), 486 + SUNXI_FUNCTION(0x0, "gpio_in"), 487 + SUNXI_FUNCTION(0x1, "gpio_out"), 488 + SUNXI_FUNCTION(0x2, "spi1"), /* CLK */ 489 + SUNXI_FUNCTION(0x3, "uart3"), /* RX */ 490 + SUNXI_FUNCTION_IRQ(0x6, 10)), /* EINT10 */ 491 + SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 11), 492 + SUNXI_FUNCTION(0x0, "gpio_in"), 493 + SUNXI_FUNCTION(0x1, "gpio_out"), 494 + SUNXI_FUNCTION(0x2, "spi1"), /* MOSI */ 495 + SUNXI_FUNCTION(0x3, "uart3"), /* CTS */ 496 + SUNXI_FUNCTION_IRQ(0x6, 11)), /* EINT11 */ 497 + SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 12), 498 + SUNXI_FUNCTION(0x0, "gpio_in"), 499 + SUNXI_FUNCTION(0x1, "gpio_out"), 500 + SUNXI_FUNCTION(0x2, "spi1"), /* MISO */ 501 + SUNXI_FUNCTION(0x3, "uart3"), /* RTS */ 502 + SUNXI_FUNCTION_IRQ(0x6, 12)), /* EINT12 */ 503 + SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 13), 504 + SUNXI_FUNCTION(0x0, "gpio_in"), 505 + SUNXI_FUNCTION(0x1, "gpio_out"), 506 + SUNXI_FUNCTION(0x2, "spi1"), /* CS1 */ 507 + SUNXI_FUNCTION(0x3, "pwm1"), 508 + SUNXI_FUNCTION(0x5, "uart2"), /* CTS */ 509 + SUNXI_FUNCTION_IRQ(0x6, 13)), /* EINT13 */ 510 + }; 511 + 512 + static const struct sunxi_pinctrl_desc sun5i_gr8_pinctrl_data = { 513 + .pins = sun5i_gr8_pins, 514 + .npins = ARRAY_SIZE(sun5i_gr8_pins), 515 + .irq_banks = 1, 516 + }; 517 + 518 + static int sun5i_gr8_pinctrl_probe(struct platform_device *pdev) 519 + { 520 + return sunxi_pinctrl_init(pdev, 521 + &sun5i_gr8_pinctrl_data); 522 + } 523 + 524 + static const struct of_device_id sun5i_gr8_pinctrl_match[] = { 525 + { .compatible = "nextthing,gr8-pinctrl", }, 526 + {} 527 + }; 528 + MODULE_DEVICE_TABLE(of, sun5i_gr8_pinctrl_match); 529 + 530 + static struct platform_driver sun5i_gr8_pinctrl_driver = { 531 + .probe = sun5i_gr8_pinctrl_probe, 532 + .driver = { 533 + .name = "gr8-pinctrl", 534 + .of_match_table = sun5i_gr8_pinctrl_match, 535 + }, 536 + }; 537 + module_platform_driver(sun5i_gr8_pinctrl_driver); 538 + 539 + MODULE_AUTHOR("Mylene Josserand <mylene.josserand@free-electrons.com"); 540 + MODULE_DESCRIPTION("NextThing GR8 pinctrl driver"); 541 + MODULE_LICENSE("GPL");
+10 -2
drivers/pinctrl/sunxi/pinctrl-sun6i-a31.c
··· 896 896 SUNXI_FUNCTION(0x1, "gpio_out")), 897 897 SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 27), 898 898 SUNXI_FUNCTION(0x0, "gpio_in"), 899 - SUNXI_FUNCTION(0x1, "gpio_out")), 899 + SUNXI_FUNCTION(0x1, "gpio_out"), 900 + /* 901 + * The SPDIF block is not referenced at all in the A31 user 902 + * manual. However it is described in the code leaked and the 903 + * configuration files supplied by vendors. 904 + */ 905 + SUNXI_FUNCTION(0x3, "spdif")), /* SPDIF IN */ 900 906 SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 28), 901 907 SUNXI_FUNCTION(0x0, "gpio_in"), 902 - SUNXI_FUNCTION(0x1, "gpio_out")), 908 + SUNXI_FUNCTION(0x1, "gpio_out"), 909 + /* Undocumented mux function - see above */ 910 + SUNXI_FUNCTION(0x3, "spdif")), /* SPDIF OUT */ 903 911 SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 29), 904 912 SUNXI_FUNCTION(0x0, "gpio_in"), 905 913 SUNXI_FUNCTION(0x1, "gpio_out"),
-1
drivers/pinctrl/sunxi/pinctrl-sun8i-h3.c
··· 60 60 SUNXI_FUNCTION(0x0, "gpio_in"), 61 61 SUNXI_FUNCTION(0x1, "gpio_out"), 62 62 SUNXI_FUNCTION(0x2, "sim"), /* PWREN */ 63 - SUNXI_FUNCTION(0x3, "pwm1"), 64 63 SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 6)), /* PA_EINT6 */ 65 64 SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 7), 66 65 SUNXI_FUNCTION(0x0, "gpio_in"),
+6
include/linux/gpio/driver.h
··· 112 112 * initialization, provided by GPIO driver 113 113 * @irq_parent: GPIO IRQ chip parent/bank linux irq number, 114 114 * provided by GPIO driver 115 + * @irq_need_valid_mask: If set core allocates @irq_valid_mask with all 116 + * bits set to one 117 + * @irq_valid_mask: If not %NULL holds bitmask of GPIOs which are valid to 118 + * be included in IRQ domain of the chip 115 119 * @lock_key: per GPIO IRQ chip lockdep class 116 120 * 117 121 * A gpio_chip can help platforms abstract various sources of GPIOs so ··· 194 190 irq_flow_handler_t irq_handler; 195 191 unsigned int irq_default_type; 196 192 int irq_parent; 193 + bool irq_need_valid_mask; 194 + unsigned long *irq_valid_mask; 197 195 struct lock_class_key *lock_key; 198 196 #endif 199 197