18c2ecf20Sopenharmony_ci/* 28c2ecf20Sopenharmony_ci * Driver for the Gemini pin controller 38c2ecf20Sopenharmony_ci * 48c2ecf20Sopenharmony_ci * Copyright (C) 2017 Linus Walleij <linus.walleij@linaro.org> 58c2ecf20Sopenharmony_ci * 68c2ecf20Sopenharmony_ci * This is a group-only pin controller. 78c2ecf20Sopenharmony_ci */ 88c2ecf20Sopenharmony_ci#include <linux/err.h> 98c2ecf20Sopenharmony_ci#include <linux/init.h> 108c2ecf20Sopenharmony_ci#include <linux/io.h> 118c2ecf20Sopenharmony_ci#include <linux/mfd/syscon.h> 128c2ecf20Sopenharmony_ci#include <linux/of.h> 138c2ecf20Sopenharmony_ci#include <linux/pinctrl/machine.h> 148c2ecf20Sopenharmony_ci#include <linux/pinctrl/pinctrl.h> 158c2ecf20Sopenharmony_ci#include <linux/pinctrl/pinmux.h> 168c2ecf20Sopenharmony_ci#include <linux/pinctrl/pinconf.h> 178c2ecf20Sopenharmony_ci#include <linux/pinctrl/pinconf-generic.h> 188c2ecf20Sopenharmony_ci#include <linux/platform_device.h> 198c2ecf20Sopenharmony_ci#include <linux/slab.h> 208c2ecf20Sopenharmony_ci#include <linux/regmap.h> 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_ci#include "pinctrl-utils.h" 238c2ecf20Sopenharmony_ci 248c2ecf20Sopenharmony_ci#define DRIVER_NAME "pinctrl-gemini" 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_ci/** 278c2ecf20Sopenharmony_ci * struct gemini_pin_conf - information about configuring a pin 288c2ecf20Sopenharmony_ci * @pin: the pin number 298c2ecf20Sopenharmony_ci * @reg: config register 308c2ecf20Sopenharmony_ci * @mask: the bits affecting the configuration of the pin 318c2ecf20Sopenharmony_ci */ 328c2ecf20Sopenharmony_cistruct gemini_pin_conf { 338c2ecf20Sopenharmony_ci unsigned int pin; 348c2ecf20Sopenharmony_ci u32 reg; 358c2ecf20Sopenharmony_ci u32 mask; 368c2ecf20Sopenharmony_ci}; 378c2ecf20Sopenharmony_ci 388c2ecf20Sopenharmony_ci/** 398c2ecf20Sopenharmony_ci * struct gemini_pmx - state holder for the gemini pin controller 408c2ecf20Sopenharmony_ci * @dev: a pointer back to containing device 418c2ecf20Sopenharmony_ci * @virtbase: the offset to the controller in virtual memory 428c2ecf20Sopenharmony_ci * @map: regmap to access registers 438c2ecf20Sopenharmony_ci * @is_3512: whether the SoC/package is the 3512 variant 448c2ecf20Sopenharmony_ci * @is_3516: whether the SoC/package is the 3516 variant 458c2ecf20Sopenharmony_ci * @flash_pin: whether the flash pin (extended pins for parallel 468c2ecf20Sopenharmony_ci * flash) is set 478c2ecf20Sopenharmony_ci * @confs: pin config information 488c2ecf20Sopenharmony_ci * @nconfs: number of pin config information items 498c2ecf20Sopenharmony_ci */ 508c2ecf20Sopenharmony_cistruct gemini_pmx { 518c2ecf20Sopenharmony_ci struct device *dev; 528c2ecf20Sopenharmony_ci struct pinctrl_dev *pctl; 538c2ecf20Sopenharmony_ci struct regmap *map; 548c2ecf20Sopenharmony_ci bool is_3512; 558c2ecf20Sopenharmony_ci bool is_3516; 568c2ecf20Sopenharmony_ci bool flash_pin; 578c2ecf20Sopenharmony_ci const struct gemini_pin_conf *confs; 588c2ecf20Sopenharmony_ci unsigned int nconfs; 598c2ecf20Sopenharmony_ci}; 608c2ecf20Sopenharmony_ci 618c2ecf20Sopenharmony_ci/** 628c2ecf20Sopenharmony_ci * struct gemini_pin_group - describes a Gemini pin group 638c2ecf20Sopenharmony_ci * @name: the name of this specific pin group 648c2ecf20Sopenharmony_ci * @pins: an array of discrete physical pins used in this group, taken 658c2ecf20Sopenharmony_ci * from the driver-local pin enumeration space 668c2ecf20Sopenharmony_ci * @num_pins: the number of pins in this group array, i.e. the number of 678c2ecf20Sopenharmony_ci * elements in .pins so we can iterate over that array 688c2ecf20Sopenharmony_ci * @mask: bits to clear to enable this when doing pin muxing 698c2ecf20Sopenharmony_ci * @value: bits to set to enable this when doing pin muxing 708c2ecf20Sopenharmony_ci * @driving_mask: bitmask for the IO Pad driving register for this 718c2ecf20Sopenharmony_ci * group, if it supports altering the driving strength of 728c2ecf20Sopenharmony_ci * its lines. 738c2ecf20Sopenharmony_ci */ 748c2ecf20Sopenharmony_cistruct gemini_pin_group { 758c2ecf20Sopenharmony_ci const char *name; 768c2ecf20Sopenharmony_ci const unsigned int *pins; 778c2ecf20Sopenharmony_ci const unsigned int num_pins; 788c2ecf20Sopenharmony_ci u32 mask; 798c2ecf20Sopenharmony_ci u32 value; 808c2ecf20Sopenharmony_ci u32 driving_mask; 818c2ecf20Sopenharmony_ci}; 828c2ecf20Sopenharmony_ci 838c2ecf20Sopenharmony_ci/* Some straight-forward control registers */ 848c2ecf20Sopenharmony_ci#define GLOBAL_WORD_ID 0x00 858c2ecf20Sopenharmony_ci#define GLOBAL_STATUS 0x04 868c2ecf20Sopenharmony_ci#define GLOBAL_STATUS_FLPIN BIT(20) 878c2ecf20Sopenharmony_ci#define GLOBAL_IODRIVE 0x10 888c2ecf20Sopenharmony_ci#define GLOBAL_GMAC_CTRL_SKEW 0x1c 898c2ecf20Sopenharmony_ci#define GLOBAL_GMAC0_DATA_SKEW 0x20 908c2ecf20Sopenharmony_ci#define GLOBAL_GMAC1_DATA_SKEW 0x24 918c2ecf20Sopenharmony_ci/* 928c2ecf20Sopenharmony_ci * Global Miscellaneous Control Register 938c2ecf20Sopenharmony_ci * This register controls all Gemini pad/pin multiplexing 948c2ecf20Sopenharmony_ci * 958c2ecf20Sopenharmony_ci * It is a tricky register though: 968c2ecf20Sopenharmony_ci * - For the bits named *_ENABLE, once you DISABLE something, it simply cannot 978c2ecf20Sopenharmony_ci * be brought back online, so it means permanent disablement of the 988c2ecf20Sopenharmony_ci * corresponding pads. 998c2ecf20Sopenharmony_ci * - For the bits named *_DISABLE, once you enable something, it cannot be 1008c2ecf20Sopenharmony_ci * DISABLED again. So you select a flash configuration once, and then 1018c2ecf20Sopenharmony_ci * you are stuck with it. 1028c2ecf20Sopenharmony_ci */ 1038c2ecf20Sopenharmony_ci#define GLOBAL_MISC_CTRL 0x30 1048c2ecf20Sopenharmony_ci#define GEMINI_GMAC_IOSEL_MASK GENMASK(28, 27) 1058c2ecf20Sopenharmony_ci/* Not really used */ 1068c2ecf20Sopenharmony_ci#define GEMINI_GMAC_IOSEL_GMAC0_GMII BIT(28) 1078c2ecf20Sopenharmony_ci/* Activated with GMAC1 */ 1088c2ecf20Sopenharmony_ci#define GEMINI_GMAC_IOSEL_GMAC0_GMAC1_RGMII BIT(27) 1098c2ecf20Sopenharmony_ci/* This will be the default */ 1108c2ecf20Sopenharmony_ci#define GEMINI_GMAC_IOSEL_GMAC0_RGMII_GMAC1_GPIO2 0 1118c2ecf20Sopenharmony_ci#define TVC_CLK_PAD_ENABLE BIT(20) 1128c2ecf20Sopenharmony_ci#define PCI_CLK_PAD_ENABLE BIT(17) 1138c2ecf20Sopenharmony_ci#define LPC_CLK_PAD_ENABLE BIT(16) 1148c2ecf20Sopenharmony_ci#define TVC_PADS_ENABLE BIT(9) 1158c2ecf20Sopenharmony_ci#define SSP_PADS_ENABLE BIT(8) 1168c2ecf20Sopenharmony_ci#define LCD_PADS_ENABLE BIT(7) 1178c2ecf20Sopenharmony_ci#define LPC_PADS_ENABLE BIT(6) 1188c2ecf20Sopenharmony_ci#define PCI_PADS_ENABLE BIT(5) 1198c2ecf20Sopenharmony_ci#define IDE_PADS_ENABLE BIT(4) 1208c2ecf20Sopenharmony_ci#define DRAM_PADS_POWERDOWN BIT(3) 1218c2ecf20Sopenharmony_ci#define NAND_PADS_DISABLE BIT(2) 1228c2ecf20Sopenharmony_ci#define PFLASH_PADS_DISABLE BIT(1) 1238c2ecf20Sopenharmony_ci#define SFLASH_PADS_DISABLE BIT(0) 1248c2ecf20Sopenharmony_ci#define PADS_MASK (GENMASK(9, 0) | BIT(16) | BIT(17) | BIT(20) | BIT(27)) 1258c2ecf20Sopenharmony_ci#define PADS_MAXBIT 27 1268c2ecf20Sopenharmony_ci 1278c2ecf20Sopenharmony_ci/* Ordered by bit index */ 1288c2ecf20Sopenharmony_cistatic const char * const gemini_padgroups[] = { 1298c2ecf20Sopenharmony_ci "serial flash", 1308c2ecf20Sopenharmony_ci "parallel flash", 1318c2ecf20Sopenharmony_ci "NAND flash", 1328c2ecf20Sopenharmony_ci "DRAM", 1338c2ecf20Sopenharmony_ci "IDE", 1348c2ecf20Sopenharmony_ci "PCI", 1358c2ecf20Sopenharmony_ci "LPC", 1368c2ecf20Sopenharmony_ci "LCD", 1378c2ecf20Sopenharmony_ci "SSP", 1388c2ecf20Sopenharmony_ci "TVC", 1398c2ecf20Sopenharmony_ci NULL, NULL, NULL, NULL, NULL, NULL, 1408c2ecf20Sopenharmony_ci "LPC CLK", 1418c2ecf20Sopenharmony_ci "PCI CLK", 1428c2ecf20Sopenharmony_ci NULL, NULL, 1438c2ecf20Sopenharmony_ci "TVC CLK", 1448c2ecf20Sopenharmony_ci NULL, NULL, NULL, NULL, NULL, 1458c2ecf20Sopenharmony_ci "GMAC1", 1468c2ecf20Sopenharmony_ci}; 1478c2ecf20Sopenharmony_ci 1488c2ecf20Sopenharmony_cistatic const struct pinctrl_pin_desc gemini_3512_pins[] = { 1498c2ecf20Sopenharmony_ci /* Row A */ 1508c2ecf20Sopenharmony_ci PINCTRL_PIN(0, "A1 VREF CTRL"), 1518c2ecf20Sopenharmony_ci PINCTRL_PIN(1, "A2 VCC2IO CTRL"), 1528c2ecf20Sopenharmony_ci PINCTRL_PIN(2, "A3 DRAM CK"), 1538c2ecf20Sopenharmony_ci PINCTRL_PIN(3, "A4 DRAM CK N"), 1548c2ecf20Sopenharmony_ci PINCTRL_PIN(4, "A5 DRAM A5"), 1558c2ecf20Sopenharmony_ci PINCTRL_PIN(5, "A6 DRAM CKE"), 1568c2ecf20Sopenharmony_ci PINCTRL_PIN(6, "A7 DRAM DQ11"), 1578c2ecf20Sopenharmony_ci PINCTRL_PIN(7, "A8 DRAM DQ0"), 1588c2ecf20Sopenharmony_ci PINCTRL_PIN(8, "A9 DRAM DQ5"), 1598c2ecf20Sopenharmony_ci PINCTRL_PIN(9, "A10 DRAM DQ6"), 1608c2ecf20Sopenharmony_ci PINCTRL_PIN(10, "A11 DRAM DRAM VREF"), 1618c2ecf20Sopenharmony_ci PINCTRL_PIN(11, "A12 DRAM BA1"), 1628c2ecf20Sopenharmony_ci PINCTRL_PIN(12, "A13 DRAM A2"), 1638c2ecf20Sopenharmony_ci PINCTRL_PIN(13, "A14 PCI GNT1 N"), 1648c2ecf20Sopenharmony_ci PINCTRL_PIN(14, "A15 PCI REQ9 N"), 1658c2ecf20Sopenharmony_ci PINCTRL_PIN(15, "A16 PCI REQ2 N"), 1668c2ecf20Sopenharmony_ci PINCTRL_PIN(16, "A17 PCI REQ3 N"), 1678c2ecf20Sopenharmony_ci PINCTRL_PIN(17, "A18 PCI AD31"), 1688c2ecf20Sopenharmony_ci /* Row B */ 1698c2ecf20Sopenharmony_ci PINCTRL_PIN(18, "B1 VCCK CTRL"), 1708c2ecf20Sopenharmony_ci PINCTRL_PIN(19, "B2 PWR EN"), 1718c2ecf20Sopenharmony_ci PINCTRL_PIN(20, "B3 RTC CLKI"), 1728c2ecf20Sopenharmony_ci PINCTRL_PIN(21, "B4 DRAM A4"), 1738c2ecf20Sopenharmony_ci PINCTRL_PIN(22, "B5 DRAM A6"), 1748c2ecf20Sopenharmony_ci PINCTRL_PIN(23, "B6 DRAM A12"), 1758c2ecf20Sopenharmony_ci PINCTRL_PIN(24, "B7 DRAM DQS1"), 1768c2ecf20Sopenharmony_ci PINCTRL_PIN(25, "B8 DRAM DQ15"), 1778c2ecf20Sopenharmony_ci PINCTRL_PIN(26, "B9 DRAM DQ4"), 1788c2ecf20Sopenharmony_ci PINCTRL_PIN(27, "B10 DRAM DQS0"), 1798c2ecf20Sopenharmony_ci PINCTRL_PIN(28, "B11 DRAM WE N"), 1808c2ecf20Sopenharmony_ci PINCTRL_PIN(29, "B12 DRAM A10"), 1818c2ecf20Sopenharmony_ci PINCTRL_PIN(30, "B13 DRAM A3"), 1828c2ecf20Sopenharmony_ci PINCTRL_PIN(31, "B14 PCI GNT0 N"), 1838c2ecf20Sopenharmony_ci PINCTRL_PIN(32, "B15 PCI GNT3 N"), 1848c2ecf20Sopenharmony_ci PINCTRL_PIN(33, "B16 PCI REQ1 N"), 1858c2ecf20Sopenharmony_ci PINCTRL_PIN(34, "B17 PCI AD30"), 1868c2ecf20Sopenharmony_ci PINCTRL_PIN(35, "B18 PCI AD29"), 1878c2ecf20Sopenharmony_ci /* Row C */ 1888c2ecf20Sopenharmony_ci PINCTRL_PIN(36, "C1 CIR RST N"), /* REALLY? CIR is not in 3512... */ 1898c2ecf20Sopenharmony_ci PINCTRL_PIN(37, "C2 XTALI"), 1908c2ecf20Sopenharmony_ci PINCTRL_PIN(38, "C3 PWR BTN"), 1918c2ecf20Sopenharmony_ci PINCTRL_PIN(39, "C4 RTC CLKO"), 1928c2ecf20Sopenharmony_ci PINCTRL_PIN(40, "C5 DRAM A7"), 1938c2ecf20Sopenharmony_ci PINCTRL_PIN(41, "C6 DRAM A11"), 1948c2ecf20Sopenharmony_ci PINCTRL_PIN(42, "C7 DRAM DQ10"), 1958c2ecf20Sopenharmony_ci PINCTRL_PIN(43, "C8 DRAM DQ14"), 1968c2ecf20Sopenharmony_ci PINCTRL_PIN(44, "C9 DRAM DQ3"), 1978c2ecf20Sopenharmony_ci PINCTRL_PIN(45, "C10 DRAM DQ7"), 1988c2ecf20Sopenharmony_ci PINCTRL_PIN(46, "C11 DRAM CAS N"), 1998c2ecf20Sopenharmony_ci PINCTRL_PIN(47, "C12 DRAM A0"), 2008c2ecf20Sopenharmony_ci PINCTRL_PIN(48, "C13 PCI INT0 N"), 2018c2ecf20Sopenharmony_ci PINCTRL_PIN(49, "C14 EXT RESET N"), 2028c2ecf20Sopenharmony_ci PINCTRL_PIN(50, "C15 PCI GNT2 N"), 2038c2ecf20Sopenharmony_ci PINCTRL_PIN(51, "C16 PCI AD28"), 2048c2ecf20Sopenharmony_ci PINCTRL_PIN(52, "C17 PCI AD27"), 2058c2ecf20Sopenharmony_ci PINCTRL_PIN(53, "C18 PCI AD26"), 2068c2ecf20Sopenharmony_ci /* Row D */ 2078c2ecf20Sopenharmony_ci PINCTRL_PIN(54, "D1 AVCCKHA"), 2088c2ecf20Sopenharmony_ci PINCTRL_PIN(55, "D2 AGNDIOHA"), 2098c2ecf20Sopenharmony_ci PINCTRL_PIN(56, "D3 XTALO"), 2108c2ecf20Sopenharmony_ci PINCTRL_PIN(57, "D4 AVCC3IOHA"), 2118c2ecf20Sopenharmony_ci PINCTRL_PIN(58, "D5 DRAM A8"), 2128c2ecf20Sopenharmony_ci PINCTRL_PIN(59, "D6 DRAM A9"), 2138c2ecf20Sopenharmony_ci PINCTRL_PIN(60, "D7 DRAM DQ9"), 2148c2ecf20Sopenharmony_ci PINCTRL_PIN(61, "D8 DRAM DQ13"), 2158c2ecf20Sopenharmony_ci PINCTRL_PIN(62, "D9 DRAM DQ2"), 2168c2ecf20Sopenharmony_ci PINCTRL_PIN(63, "D10 DRAM A13"), 2178c2ecf20Sopenharmony_ci PINCTRL_PIN(64, "D11 DRAM RAS N"), 2188c2ecf20Sopenharmony_ci PINCTRL_PIN(65, "D12 DRAM A1"), 2198c2ecf20Sopenharmony_ci PINCTRL_PIN(66, "D13 PCI INTC N"), 2208c2ecf20Sopenharmony_ci PINCTRL_PIN(67, "D14 PCI CLK"), 2218c2ecf20Sopenharmony_ci PINCTRL_PIN(68, "D15 PCI AD25"), 2228c2ecf20Sopenharmony_ci PINCTRL_PIN(69, "D16 PCI AD24"), 2238c2ecf20Sopenharmony_ci PINCTRL_PIN(70, "D17 PCI CBE3 N"), 2248c2ecf20Sopenharmony_ci PINCTRL_PIN(71, "D18 PCI AD23"), 2258c2ecf20Sopenharmony_ci /* Row E */ 2268c2ecf20Sopenharmony_ci PINCTRL_PIN(72, "E1 AVCC3IOHA"), 2278c2ecf20Sopenharmony_ci PINCTRL_PIN(73, "E2 EBG"), 2288c2ecf20Sopenharmony_ci PINCTRL_PIN(74, "E3 AVCC3IOHB"), 2298c2ecf20Sopenharmony_ci PINCTRL_PIN(75, "E4 REXT"), 2308c2ecf20Sopenharmony_ci PINCTRL_PIN(76, "E5 GND"), 2318c2ecf20Sopenharmony_ci PINCTRL_PIN(77, "E6 DRAM DQM1"), 2328c2ecf20Sopenharmony_ci PINCTRL_PIN(78, "E7 DRAM DQ8"), 2338c2ecf20Sopenharmony_ci PINCTRL_PIN(79, "E8 DRAM DQ12"), 2348c2ecf20Sopenharmony_ci PINCTRL_PIN(80, "E9 DRAM DQ1"), 2358c2ecf20Sopenharmony_ci PINCTRL_PIN(81, "E10 DRAM DQM0"), 2368c2ecf20Sopenharmony_ci PINCTRL_PIN(82, "E11 DRAM BA0"), 2378c2ecf20Sopenharmony_ci PINCTRL_PIN(83, "E12 PCI INTA N"), 2388c2ecf20Sopenharmony_ci PINCTRL_PIN(84, "E13 PCI INTB N"), 2398c2ecf20Sopenharmony_ci PINCTRL_PIN(85, "E14 GND"), 2408c2ecf20Sopenharmony_ci PINCTRL_PIN(86, "E15 PCI AD22"), 2418c2ecf20Sopenharmony_ci PINCTRL_PIN(87, "E16 PCI AD21"), 2428c2ecf20Sopenharmony_ci PINCTRL_PIN(88, "E17 PCI AD20"), 2438c2ecf20Sopenharmony_ci PINCTRL_PIN(89, "E18 PCI AD19"), 2448c2ecf20Sopenharmony_ci /* Row F */ 2458c2ecf20Sopenharmony_ci PINCTRL_PIN(90, "F1 SATA0 RXDP"), 2468c2ecf20Sopenharmony_ci PINCTRL_PIN(91, "F2 SATA0 RXDN"), 2478c2ecf20Sopenharmony_ci PINCTRL_PIN(92, "F3 AGNDK 0"), 2488c2ecf20Sopenharmony_ci PINCTRL_PIN(93, "F4 AVCC3 S"), 2498c2ecf20Sopenharmony_ci PINCTRL_PIN(94, "F5 AVCCK P"), 2508c2ecf20Sopenharmony_ci PINCTRL_PIN(95, "F6 GND"), 2518c2ecf20Sopenharmony_ci PINCTRL_PIN(96, "F7 VCC2IOHA 2"), 2528c2ecf20Sopenharmony_ci PINCTRL_PIN(97, "F8 VCC2IOHA 2"), 2538c2ecf20Sopenharmony_ci PINCTRL_PIN(98, "F9 V1"), 2548c2ecf20Sopenharmony_ci PINCTRL_PIN(99, "F10 V1"), 2558c2ecf20Sopenharmony_ci PINCTRL_PIN(100, "F11 VCC2IOHA 2"), 2568c2ecf20Sopenharmony_ci PINCTRL_PIN(101, "F12 VCC2IOHA 2"), 2578c2ecf20Sopenharmony_ci PINCTRL_PIN(102, "F13 GND"), 2588c2ecf20Sopenharmony_ci PINCTRL_PIN(103, "F14 PCI AD18"), 2598c2ecf20Sopenharmony_ci PINCTRL_PIN(104, "F15 PCI AD17"), 2608c2ecf20Sopenharmony_ci PINCTRL_PIN(105, "F16 PCI AD16"), 2618c2ecf20Sopenharmony_ci PINCTRL_PIN(106, "F17 PCI CBE2 N"), 2628c2ecf20Sopenharmony_ci PINCTRL_PIN(107, "F18 PCI FRAME N"), 2638c2ecf20Sopenharmony_ci /* Row G */ 2648c2ecf20Sopenharmony_ci PINCTRL_PIN(108, "G1 SATA0 TXDP"), 2658c2ecf20Sopenharmony_ci PINCTRL_PIN(109, "G2 SATA0 TXDN"), 2668c2ecf20Sopenharmony_ci PINCTRL_PIN(110, "G3 AGNDK 1"), 2678c2ecf20Sopenharmony_ci PINCTRL_PIN(111, "G4 AVCCK 0"), 2688c2ecf20Sopenharmony_ci PINCTRL_PIN(112, "G5 TEST CLKOUT"), 2698c2ecf20Sopenharmony_ci PINCTRL_PIN(113, "G6 AGND"), 2708c2ecf20Sopenharmony_ci PINCTRL_PIN(114, "G7 GND"), 2718c2ecf20Sopenharmony_ci PINCTRL_PIN(115, "G8 VCC2IOHA 2"), 2728c2ecf20Sopenharmony_ci PINCTRL_PIN(116, "G9 V1"), 2738c2ecf20Sopenharmony_ci PINCTRL_PIN(117, "G10 V1"), 2748c2ecf20Sopenharmony_ci PINCTRL_PIN(118, "G11 VCC2IOHA 2"), 2758c2ecf20Sopenharmony_ci PINCTRL_PIN(119, "G12 GND"), 2768c2ecf20Sopenharmony_ci PINCTRL_PIN(120, "G13 VCC3IOHA"), 2778c2ecf20Sopenharmony_ci PINCTRL_PIN(121, "G14 PCI IRDY N"), 2788c2ecf20Sopenharmony_ci PINCTRL_PIN(122, "G15 PCI TRDY N"), 2798c2ecf20Sopenharmony_ci PINCTRL_PIN(123, "G16 PCI DEVSEL N"), 2808c2ecf20Sopenharmony_ci PINCTRL_PIN(124, "G17 PCI STOP N"), 2818c2ecf20Sopenharmony_ci PINCTRL_PIN(125, "G18 PCI PAR"), 2828c2ecf20Sopenharmony_ci /* Row H */ 2838c2ecf20Sopenharmony_ci PINCTRL_PIN(126, "H1 SATA1 TXDP"), 2848c2ecf20Sopenharmony_ci PINCTRL_PIN(127, "H2 SATA1 TXDN"), 2858c2ecf20Sopenharmony_ci PINCTRL_PIN(128, "H3 AGNDK 2"), 2868c2ecf20Sopenharmony_ci PINCTRL_PIN(129, "H4 AVCCK 1"), 2878c2ecf20Sopenharmony_ci PINCTRL_PIN(130, "H5 AVCCK S"), 2888c2ecf20Sopenharmony_ci PINCTRL_PIN(131, "H6 AVCCKHB"), 2898c2ecf20Sopenharmony_ci PINCTRL_PIN(132, "H7 AGND"), 2908c2ecf20Sopenharmony_ci PINCTRL_PIN(133, "H8 GND"), 2918c2ecf20Sopenharmony_ci PINCTRL_PIN(134, "H9 GND"), 2928c2ecf20Sopenharmony_ci PINCTRL_PIN(135, "H10 GND"), 2938c2ecf20Sopenharmony_ci PINCTRL_PIN(136, "H11 GND"), 2948c2ecf20Sopenharmony_ci PINCTRL_PIN(137, "H12 VCC3IOHA"), 2958c2ecf20Sopenharmony_ci PINCTRL_PIN(138, "H13 VCC3IOHA"), 2968c2ecf20Sopenharmony_ci PINCTRL_PIN(139, "H14 PCI CBE1 N"), 2978c2ecf20Sopenharmony_ci PINCTRL_PIN(140, "H15 PCI AD15"), 2988c2ecf20Sopenharmony_ci PINCTRL_PIN(141, "H16 PCI AD14"), 2998c2ecf20Sopenharmony_ci PINCTRL_PIN(142, "H17 PCI AD13"), 3008c2ecf20Sopenharmony_ci PINCTRL_PIN(143, "H18 PCI AD12"), 3018c2ecf20Sopenharmony_ci /* Row J (for some reason I is skipped) */ 3028c2ecf20Sopenharmony_ci PINCTRL_PIN(144, "J1 SATA1 RXDP"), 3038c2ecf20Sopenharmony_ci PINCTRL_PIN(145, "J2 SATA1 RXDN"), 3048c2ecf20Sopenharmony_ci PINCTRL_PIN(146, "J3 AGNDK 3"), 3058c2ecf20Sopenharmony_ci PINCTRL_PIN(147, "J4 AVCCK 2"), 3068c2ecf20Sopenharmony_ci PINCTRL_PIN(148, "J5 IDE DA1"), 3078c2ecf20Sopenharmony_ci PINCTRL_PIN(149, "J6 V1"), 3088c2ecf20Sopenharmony_ci PINCTRL_PIN(150, "J7 V1"), 3098c2ecf20Sopenharmony_ci PINCTRL_PIN(151, "J8 GND"), 3108c2ecf20Sopenharmony_ci PINCTRL_PIN(152, "J9 GND"), 3118c2ecf20Sopenharmony_ci PINCTRL_PIN(153, "J10 GND"), 3128c2ecf20Sopenharmony_ci PINCTRL_PIN(154, "J11 GND"), 3138c2ecf20Sopenharmony_ci PINCTRL_PIN(155, "J12 V1"), 3148c2ecf20Sopenharmony_ci PINCTRL_PIN(156, "J13 V1"), 3158c2ecf20Sopenharmony_ci PINCTRL_PIN(157, "J14 PCI AD11"), 3168c2ecf20Sopenharmony_ci PINCTRL_PIN(158, "J15 PCI AD10"), 3178c2ecf20Sopenharmony_ci PINCTRL_PIN(159, "J16 PCI AD9"), 3188c2ecf20Sopenharmony_ci PINCTRL_PIN(160, "J17 PCI AD8"), 3198c2ecf20Sopenharmony_ci PINCTRL_PIN(161, "J18 PCI CBE0 N"), 3208c2ecf20Sopenharmony_ci /* Row K */ 3218c2ecf20Sopenharmony_ci PINCTRL_PIN(162, "K1 IDE CS1 N"), 3228c2ecf20Sopenharmony_ci PINCTRL_PIN(163, "K2 IDE CS0 N"), 3238c2ecf20Sopenharmony_ci PINCTRL_PIN(164, "K3 AVCCK 3"), 3248c2ecf20Sopenharmony_ci PINCTRL_PIN(165, "K4 IDE DA2"), 3258c2ecf20Sopenharmony_ci PINCTRL_PIN(166, "K5 IDE DA0"), 3268c2ecf20Sopenharmony_ci PINCTRL_PIN(167, "K6 V1"), 3278c2ecf20Sopenharmony_ci PINCTRL_PIN(168, "K7 V1"), 3288c2ecf20Sopenharmony_ci PINCTRL_PIN(169, "K8 GND"), 3298c2ecf20Sopenharmony_ci PINCTRL_PIN(170, "K9 GND"), 3308c2ecf20Sopenharmony_ci PINCTRL_PIN(171, "K10 GND"), 3318c2ecf20Sopenharmony_ci PINCTRL_PIN(172, "K11 GND"), 3328c2ecf20Sopenharmony_ci PINCTRL_PIN(173, "K12 V1"), 3338c2ecf20Sopenharmony_ci PINCTRL_PIN(174, "K13 V1"), 3348c2ecf20Sopenharmony_ci PINCTRL_PIN(175, "K14 PCI AD3"), 3358c2ecf20Sopenharmony_ci PINCTRL_PIN(176, "K15 PCI AD4"), 3368c2ecf20Sopenharmony_ci PINCTRL_PIN(177, "K16 PCI AD5"), 3378c2ecf20Sopenharmony_ci PINCTRL_PIN(178, "K17 PCI AD6"), 3388c2ecf20Sopenharmony_ci PINCTRL_PIN(179, "K18 PCI AD7"), 3398c2ecf20Sopenharmony_ci /* Row L */ 3408c2ecf20Sopenharmony_ci PINCTRL_PIN(180, "L1 IDE INTRQ"), 3418c2ecf20Sopenharmony_ci PINCTRL_PIN(181, "L2 IDE DMACK N"), 3428c2ecf20Sopenharmony_ci PINCTRL_PIN(182, "L3 IDE IORDY"), 3438c2ecf20Sopenharmony_ci PINCTRL_PIN(183, "L4 IDE DIOR N"), 3448c2ecf20Sopenharmony_ci PINCTRL_PIN(184, "L5 IDE DIOW N"), 3458c2ecf20Sopenharmony_ci PINCTRL_PIN(185, "L6 VCC3IOHA"), 3468c2ecf20Sopenharmony_ci PINCTRL_PIN(186, "L7 VCC3IOHA"), 3478c2ecf20Sopenharmony_ci PINCTRL_PIN(187, "L8 GND"), 3488c2ecf20Sopenharmony_ci PINCTRL_PIN(188, "L9 GND"), 3498c2ecf20Sopenharmony_ci PINCTRL_PIN(189, "L10 GND"), 3508c2ecf20Sopenharmony_ci PINCTRL_PIN(190, "L11 GND"), 3518c2ecf20Sopenharmony_ci PINCTRL_PIN(191, "L12 VCC3IOHA"), 3528c2ecf20Sopenharmony_ci PINCTRL_PIN(192, "L13 VCC3IOHA"), 3538c2ecf20Sopenharmony_ci PINCTRL_PIN(193, "L14 GPIO0 30"), 3548c2ecf20Sopenharmony_ci PINCTRL_PIN(194, "L15 GPIO0 31"), 3558c2ecf20Sopenharmony_ci PINCTRL_PIN(195, "L16 PCI AD0"), 3568c2ecf20Sopenharmony_ci PINCTRL_PIN(196, "L17 PCI AD1"), 3578c2ecf20Sopenharmony_ci PINCTRL_PIN(197, "L18 PCI AD2"), 3588c2ecf20Sopenharmony_ci /* Row M */ 3598c2ecf20Sopenharmony_ci PINCTRL_PIN(198, "M1 IDE DMARQ"), 3608c2ecf20Sopenharmony_ci PINCTRL_PIN(199, "M2 IDE DD15"), 3618c2ecf20Sopenharmony_ci PINCTRL_PIN(200, "M3 IDE DD0"), 3628c2ecf20Sopenharmony_ci PINCTRL_PIN(201, "M4 IDE DD14"), 3638c2ecf20Sopenharmony_ci PINCTRL_PIN(202, "M5 IDE DD1"), 3648c2ecf20Sopenharmony_ci PINCTRL_PIN(203, "M6 VCC3IOHA"), 3658c2ecf20Sopenharmony_ci PINCTRL_PIN(204, "M7 GND"), 3668c2ecf20Sopenharmony_ci PINCTRL_PIN(205, "M8 VCC2IOHA 1"), 3678c2ecf20Sopenharmony_ci PINCTRL_PIN(206, "M9 V1"), 3688c2ecf20Sopenharmony_ci PINCTRL_PIN(207, "M10 V1"), 3698c2ecf20Sopenharmony_ci PINCTRL_PIN(208, "M11 VCC3IOHA"), 3708c2ecf20Sopenharmony_ci PINCTRL_PIN(209, "M12 GND"), 3718c2ecf20Sopenharmony_ci PINCTRL_PIN(210, "M13 VCC3IOHA"), 3728c2ecf20Sopenharmony_ci PINCTRL_PIN(211, "M14 GPIO0 25"), 3738c2ecf20Sopenharmony_ci PINCTRL_PIN(212, "M15 GPIO0 26"), 3748c2ecf20Sopenharmony_ci PINCTRL_PIN(213, "M16 GPIO0 27"), 3758c2ecf20Sopenharmony_ci PINCTRL_PIN(214, "M17 GPIO0 28"), 3768c2ecf20Sopenharmony_ci PINCTRL_PIN(215, "M18 GPIO0 29"), 3778c2ecf20Sopenharmony_ci /* Row N */ 3788c2ecf20Sopenharmony_ci PINCTRL_PIN(216, "N1 IDE DD13"), 3798c2ecf20Sopenharmony_ci PINCTRL_PIN(217, "N2 IDE DD2"), 3808c2ecf20Sopenharmony_ci PINCTRL_PIN(218, "N3 IDE DD12"), 3818c2ecf20Sopenharmony_ci PINCTRL_PIN(219, "N4 IDE DD3"), 3828c2ecf20Sopenharmony_ci PINCTRL_PIN(220, "N5 IDE DD11"), 3838c2ecf20Sopenharmony_ci PINCTRL_PIN(221, "N6 GND"), 3848c2ecf20Sopenharmony_ci PINCTRL_PIN(222, "N7 VCC2IOHA 1"), 3858c2ecf20Sopenharmony_ci PINCTRL_PIN(223, "N8 VCC2IOHA 1"), 3868c2ecf20Sopenharmony_ci PINCTRL_PIN(224, "N9 V1"), 3878c2ecf20Sopenharmony_ci PINCTRL_PIN(225, "N10 V1"), 3888c2ecf20Sopenharmony_ci PINCTRL_PIN(226, "N11 VCC3IOHA"), 3898c2ecf20Sopenharmony_ci PINCTRL_PIN(227, "N12 VCC3IOHA"), 3908c2ecf20Sopenharmony_ci PINCTRL_PIN(228, "N13 GND"), 3918c2ecf20Sopenharmony_ci PINCTRL_PIN(229, "N14 GPIO0 20"), 3928c2ecf20Sopenharmony_ci PINCTRL_PIN(230, "N15 GPIO0 21"), 3938c2ecf20Sopenharmony_ci PINCTRL_PIN(231, "N16 GPIO0 22"), 3948c2ecf20Sopenharmony_ci PINCTRL_PIN(232, "N17 GPIO0 23"), 3958c2ecf20Sopenharmony_ci PINCTRL_PIN(233, "N18 GPIO0 24"), 3968c2ecf20Sopenharmony_ci /* Row P (for some reason O is skipped) */ 3978c2ecf20Sopenharmony_ci PINCTRL_PIN(234, "P1 IDE DD4"), 3988c2ecf20Sopenharmony_ci PINCTRL_PIN(235, "P2 IDE DD10"), 3998c2ecf20Sopenharmony_ci PINCTRL_PIN(236, "P3 IDE DD5"), 4008c2ecf20Sopenharmony_ci PINCTRL_PIN(237, "P4 IDE DD9"), 4018c2ecf20Sopenharmony_ci PINCTRL_PIN(238, "P5 GND"), 4028c2ecf20Sopenharmony_ci PINCTRL_PIN(239, "P6 USB XSCO"), 4038c2ecf20Sopenharmony_ci PINCTRL_PIN(240, "P7 GMAC0 TXD3"), 4048c2ecf20Sopenharmony_ci PINCTRL_PIN(241, "P8 GMAC0 TXEN"), 4058c2ecf20Sopenharmony_ci PINCTRL_PIN(242, "P9 GMAC0 RXD2"), 4068c2ecf20Sopenharmony_ci PINCTRL_PIN(243, "P10 GMAC1 TXC"), 4078c2ecf20Sopenharmony_ci PINCTRL_PIN(244, "P11 GMAC1 RXD1"), 4088c2ecf20Sopenharmony_ci PINCTRL_PIN(245, "P12 MODE SEL 1"), 4098c2ecf20Sopenharmony_ci PINCTRL_PIN(246, "P13 GPIO1 28"), 4108c2ecf20Sopenharmony_ci PINCTRL_PIN(247, "P14 GND"), 4118c2ecf20Sopenharmony_ci PINCTRL_PIN(248, "P15 GPIO0 5"), 4128c2ecf20Sopenharmony_ci PINCTRL_PIN(249, "P16 GPIO0 17"), 4138c2ecf20Sopenharmony_ci PINCTRL_PIN(250, "P17 GPIO0 18"), 4148c2ecf20Sopenharmony_ci PINCTRL_PIN(251, "P18 GPIO0 19"), 4158c2ecf20Sopenharmony_ci /* Row R (for some reason Q us skipped) */ 4168c2ecf20Sopenharmony_ci PINCTRL_PIN(252, "R1 IDE DD6"), 4178c2ecf20Sopenharmony_ci PINCTRL_PIN(253, "R2 IDE DD8"), 4188c2ecf20Sopenharmony_ci PINCTRL_PIN(254, "R3 IDE DD7"), 4198c2ecf20Sopenharmony_ci PINCTRL_PIN(255, "R4 IDE RESET N"), 4208c2ecf20Sopenharmony_ci PINCTRL_PIN(256, "R5 ICE0 DBGACK"), 4218c2ecf20Sopenharmony_ci PINCTRL_PIN(257, "R6 USB XSCI"), 4228c2ecf20Sopenharmony_ci PINCTRL_PIN(258, "R7 GMAC0 TXD2"), 4238c2ecf20Sopenharmony_ci PINCTRL_PIN(259, "R8 GMAC0 RXDV"), 4248c2ecf20Sopenharmony_ci PINCTRL_PIN(260, "R9 GMAC0 RXD3"), 4258c2ecf20Sopenharmony_ci PINCTRL_PIN(261, "R10 GMAC1 TXD0"), 4268c2ecf20Sopenharmony_ci PINCTRL_PIN(262, "R11 GMAC1 RXD0"), 4278c2ecf20Sopenharmony_ci PINCTRL_PIN(263, "R12 MODE SEL 0"), 4288c2ecf20Sopenharmony_ci PINCTRL_PIN(264, "R13 MODE SEL 3"), 4298c2ecf20Sopenharmony_ci PINCTRL_PIN(265, "R14 GPIO0 0"), 4308c2ecf20Sopenharmony_ci PINCTRL_PIN(266, "R15 GPIO0 4"), 4318c2ecf20Sopenharmony_ci PINCTRL_PIN(267, "R16 GPIO0 9"), 4328c2ecf20Sopenharmony_ci PINCTRL_PIN(268, "R17 GPIO0 15"), 4338c2ecf20Sopenharmony_ci PINCTRL_PIN(269, "R18 GPIO0 16"), 4348c2ecf20Sopenharmony_ci /* Row T (for some reason S is skipped) */ 4358c2ecf20Sopenharmony_ci PINCTRL_PIN(270, "T1 ICE0 DBGRQ"), 4368c2ecf20Sopenharmony_ci PINCTRL_PIN(271, "T2 ICE0 IDO"), 4378c2ecf20Sopenharmony_ci PINCTRL_PIN(272, "T3 ICE0 ICK"), 4388c2ecf20Sopenharmony_ci PINCTRL_PIN(273, "T4 ICE0 IMS"), 4398c2ecf20Sopenharmony_ci PINCTRL_PIN(274, "T5 ICE0 IDI"), 4408c2ecf20Sopenharmony_ci PINCTRL_PIN(275, "T6 USB RREF"), 4418c2ecf20Sopenharmony_ci PINCTRL_PIN(276, "T7 GMAC0 TXD1"), 4428c2ecf20Sopenharmony_ci PINCTRL_PIN(277, "T8 GMAC0 RXC"), 4438c2ecf20Sopenharmony_ci PINCTRL_PIN(278, "T9 GMAC0 CRS"), 4448c2ecf20Sopenharmony_ci PINCTRL_PIN(279, "T10 GMAC1 TXD1"), 4458c2ecf20Sopenharmony_ci PINCTRL_PIN(280, "T11 GMAC1 RXC"), 4468c2ecf20Sopenharmony_ci PINCTRL_PIN(281, "T12 GMAC1 CRS"), 4478c2ecf20Sopenharmony_ci PINCTRL_PIN(282, "T13 EXT CLK"), 4488c2ecf20Sopenharmony_ci PINCTRL_PIN(283, "T14 GPIO1 31"), 4498c2ecf20Sopenharmony_ci PINCTRL_PIN(284, "T15 GPIO0 3"), 4508c2ecf20Sopenharmony_ci PINCTRL_PIN(285, "T16 GPIO0 8"), 4518c2ecf20Sopenharmony_ci PINCTRL_PIN(286, "T17 GPIO0 12"), 4528c2ecf20Sopenharmony_ci PINCTRL_PIN(287, "T18 GPIO0 14"), 4538c2ecf20Sopenharmony_ci /* Row U */ 4548c2ecf20Sopenharmony_ci PINCTRL_PIN(288, "U1 ICE0 IRST N"), 4558c2ecf20Sopenharmony_ci PINCTRL_PIN(289, "U2 USB0 VCCHSRT"), 4568c2ecf20Sopenharmony_ci PINCTRL_PIN(290, "U3 USB0 DP"), 4578c2ecf20Sopenharmony_ci PINCTRL_PIN(291, "U4 USB VCCA U20"), 4588c2ecf20Sopenharmony_ci PINCTRL_PIN(292, "U5 USB1 DP"), 4598c2ecf20Sopenharmony_ci PINCTRL_PIN(293, "U6 USB1 GNDHSRT 1"), 4608c2ecf20Sopenharmony_ci PINCTRL_PIN(294, "U7 GMAC0 TXD0"), 4618c2ecf20Sopenharmony_ci PINCTRL_PIN(295, "U8 GMAC0 RXD0"), 4628c2ecf20Sopenharmony_ci PINCTRL_PIN(296, "U9 GMAC1 COL"), 4638c2ecf20Sopenharmony_ci PINCTRL_PIN(297, "U10 GMAC1 TXD2"), 4648c2ecf20Sopenharmony_ci PINCTRL_PIN(298, "U11 GMAC1 RXDV"), 4658c2ecf20Sopenharmony_ci PINCTRL_PIN(299, "U12 GMAC1 RXD3"), 4668c2ecf20Sopenharmony_ci PINCTRL_PIN(300, "U13 MODE SEL 2"), 4678c2ecf20Sopenharmony_ci PINCTRL_PIN(301, "U14 GPIO1 30"), 4688c2ecf20Sopenharmony_ci PINCTRL_PIN(302, "U15 GPIO0 2"), 4698c2ecf20Sopenharmony_ci PINCTRL_PIN(303, "U16 GPIO0 7"), 4708c2ecf20Sopenharmony_ci PINCTRL_PIN(304, "U17 GPIO0 11"), 4718c2ecf20Sopenharmony_ci PINCTRL_PIN(305, "U18 GPIO0 13"), 4728c2ecf20Sopenharmony_ci /* Row V */ 4738c2ecf20Sopenharmony_ci PINCTRL_PIN(306, "V1 USB0 GNDHSRT"), 4748c2ecf20Sopenharmony_ci PINCTRL_PIN(307, "V2 USB0 DM"), 4758c2ecf20Sopenharmony_ci PINCTRL_PIN(308, "V3 USB GNDA U20"), 4768c2ecf20Sopenharmony_ci PINCTRL_PIN(309, "V4 USB1 DM"), 4778c2ecf20Sopenharmony_ci PINCTRL_PIN(310, "V5 USB1 VCCHSRT1"), 4788c2ecf20Sopenharmony_ci PINCTRL_PIN(311, "V6 GMAC0 COL"), 4798c2ecf20Sopenharmony_ci PINCTRL_PIN(312, "V7 GMAC0 TXC"), 4808c2ecf20Sopenharmony_ci PINCTRL_PIN(313, "V8 GMAC0 RXD1"), 4818c2ecf20Sopenharmony_ci PINCTRL_PIN(314, "V9 REF CLK"), 4828c2ecf20Sopenharmony_ci PINCTRL_PIN(315, "V10 GMAC1 TXD3"), 4838c2ecf20Sopenharmony_ci PINCTRL_PIN(316, "V11 GMAC1 TXEN"), 4848c2ecf20Sopenharmony_ci PINCTRL_PIN(317, "V12 GMAC1 RXD2"), 4858c2ecf20Sopenharmony_ci PINCTRL_PIN(318, "V13 M30 CLK"), 4868c2ecf20Sopenharmony_ci PINCTRL_PIN(319, "V14 GPIO1 29"), 4878c2ecf20Sopenharmony_ci PINCTRL_PIN(320, "V15 GPIO0 1"), 4888c2ecf20Sopenharmony_ci PINCTRL_PIN(321, "V16 GPIO0 6"), 4898c2ecf20Sopenharmony_ci PINCTRL_PIN(322, "V17 GPIO0 10"), 4908c2ecf20Sopenharmony_ci PINCTRL_PIN(323, "V18 SYS RESET N"), 4918c2ecf20Sopenharmony_ci}; 4928c2ecf20Sopenharmony_ci 4938c2ecf20Sopenharmony_ci 4948c2ecf20Sopenharmony_ci/* Digital ground */ 4958c2ecf20Sopenharmony_cistatic const unsigned int gnd_3512_pins[] = { 4968c2ecf20Sopenharmony_ci 76, 85, 95, 102, 114, 119, 133, 134, 135, 136, 151, 152, 153, 154, 169, 4978c2ecf20Sopenharmony_ci 170, 171, 172, 187, 188, 189, 190, 204, 209, 221, 228, 238, 247 4988c2ecf20Sopenharmony_ci}; 4998c2ecf20Sopenharmony_ci 5008c2ecf20Sopenharmony_cistatic const unsigned int dram_3512_pins[] = { 5018c2ecf20Sopenharmony_ci 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 21, 22, 23, 24, 25, 26, 27, 28, 29, 5028c2ecf20Sopenharmony_ci 30, 40, 41, 42, 43, 44, 45, 46, 47, 58, 59, 60, 61, 62, 63, 64, 65, 77, 5038c2ecf20Sopenharmony_ci 78, 79, 80, 81, 82 5048c2ecf20Sopenharmony_ci}; 5058c2ecf20Sopenharmony_ci 5068c2ecf20Sopenharmony_cistatic const unsigned int rtc_3512_pins[] = { 57, 20, 39 }; 5078c2ecf20Sopenharmony_ci 5088c2ecf20Sopenharmony_cistatic const unsigned int power_3512_pins[] = { 19, 38, 36, 55, 37, 56, 54, 72 }; 5098c2ecf20Sopenharmony_ci 5108c2ecf20Sopenharmony_cistatic const unsigned int system_3512_pins[] = { 5118c2ecf20Sopenharmony_ci 318, 264, 300, 245, 263, 282, 314, 323, 49, 5128c2ecf20Sopenharmony_ci}; 5138c2ecf20Sopenharmony_ci 5148c2ecf20Sopenharmony_cistatic const unsigned int vcontrol_3512_pins[] = { 18, 0, 1 }; 5158c2ecf20Sopenharmony_ci 5168c2ecf20Sopenharmony_cistatic const unsigned int ice_3512_pins[] = { 256, 270, 271, 272, 273, 274, 288 }; 5178c2ecf20Sopenharmony_ci 5188c2ecf20Sopenharmony_cistatic const unsigned int ide_3512_pins[] = { 5198c2ecf20Sopenharmony_ci 162, 163, 165, 166, 148, 180, 181, 182, 183, 184, 198, 199, 200, 201, 202, 5208c2ecf20Sopenharmony_ci 216, 217, 218, 219, 220, 234, 235, 236, 237, 252, 253, 254, 255 5218c2ecf20Sopenharmony_ci}; 5228c2ecf20Sopenharmony_ci 5238c2ecf20Sopenharmony_cistatic const unsigned int sata_3512_pins[] = { 5248c2ecf20Sopenharmony_ci 75, 74, 73, 93, 94, 131, 112, 130, 92, 91, 90, 111, 110, 109, 108, 129, 5258c2ecf20Sopenharmony_ci 128, 127, 126, 147, 146, 145, 144, 164 5268c2ecf20Sopenharmony_ci}; 5278c2ecf20Sopenharmony_ci 5288c2ecf20Sopenharmony_cistatic const unsigned int usb_3512_pins[] = { 5298c2ecf20Sopenharmony_ci 306, 289, 307, 290, 239, 257, 275, 308, 291, 309, 292, 310, 293 5308c2ecf20Sopenharmony_ci}; 5318c2ecf20Sopenharmony_ci 5328c2ecf20Sopenharmony_ci/* GMII, ethernet pins */ 5338c2ecf20Sopenharmony_cistatic const unsigned int gmii_gmac0_3512_pins[] = { 5348c2ecf20Sopenharmony_ci 240, 241, 242, 258, 259, 260, 276, 277, 278, 294, 295, 311, 312, 313 5358c2ecf20Sopenharmony_ci}; 5368c2ecf20Sopenharmony_ci 5378c2ecf20Sopenharmony_cistatic const unsigned int gmii_gmac1_3512_pins[] = { 5388c2ecf20Sopenharmony_ci 243, 244, 261, 262, 279, 280, 281, 296, 297, 298, 299, 315, 316, 317 5398c2ecf20Sopenharmony_ci}; 5408c2ecf20Sopenharmony_ci 5418c2ecf20Sopenharmony_cistatic const unsigned int pci_3512_pins[] = { 5428c2ecf20Sopenharmony_ci 13, 14, 15, 16, 17, 31, 32, 33, 34, 35, 48, 50, 51, 52, 53, 66, 67, 68, 69, 5438c2ecf20Sopenharmony_ci 70, 71, 83, 84, 86, 87, 88, 89, 103, 104, 105, 106, 107, 121, 122, 123, 5448c2ecf20Sopenharmony_ci 124, 125, 139, 140, 141, 142, 143, 157, 158, 159, 160, 161, 175, 176, 177, 5458c2ecf20Sopenharmony_ci 178, 179, 195, 196, 197 5468c2ecf20Sopenharmony_ci}; 5478c2ecf20Sopenharmony_ci 5488c2ecf20Sopenharmony_ci/* 5498c2ecf20Sopenharmony_ci * Apparently the LPC interface is using the PCICLK for the clocking so 5508c2ecf20Sopenharmony_ci * PCI needs to be active at the same time. 5518c2ecf20Sopenharmony_ci */ 5528c2ecf20Sopenharmony_cistatic const unsigned int lpc_3512_pins[] = { 5538c2ecf20Sopenharmony_ci 285, /* LPC_LAD[0] */ 5548c2ecf20Sopenharmony_ci 304, /* LPC_SERIRQ */ 5558c2ecf20Sopenharmony_ci 286, /* LPC_LAD[2] */ 5568c2ecf20Sopenharmony_ci 305, /* LPC_LFRAME# */ 5578c2ecf20Sopenharmony_ci 287, /* LPC_LAD[3] */ 5588c2ecf20Sopenharmony_ci 268, /* LPC_LAD[1] */ 5598c2ecf20Sopenharmony_ci}; 5608c2ecf20Sopenharmony_ci 5618c2ecf20Sopenharmony_ci/* Character LCD */ 5628c2ecf20Sopenharmony_cistatic const unsigned int lcd_3512_pins[] = { 5638c2ecf20Sopenharmony_ci 262, 244, 317, 299, 246, 319, 301, 283, 269, 233, 211 5648c2ecf20Sopenharmony_ci}; 5658c2ecf20Sopenharmony_ci 5668c2ecf20Sopenharmony_cistatic const unsigned int ssp_3512_pins[] = { 5678c2ecf20Sopenharmony_ci 285, /* SSP_97RST# SSP AC97 Reset, active low */ 5688c2ecf20Sopenharmony_ci 304, /* SSP_FSC */ 5698c2ecf20Sopenharmony_ci 286, /* SSP_ECLK */ 5708c2ecf20Sopenharmony_ci 305, /* SSP_TXD */ 5718c2ecf20Sopenharmony_ci 287, /* SSP_RXD */ 5728c2ecf20Sopenharmony_ci 268, /* SSP_SCLK */ 5738c2ecf20Sopenharmony_ci}; 5748c2ecf20Sopenharmony_ci 5758c2ecf20Sopenharmony_cistatic const unsigned int uart_rxtx_3512_pins[] = { 5768c2ecf20Sopenharmony_ci 267, /* UART_SIN serial input, RX */ 5778c2ecf20Sopenharmony_ci 322, /* UART_SOUT serial output, TX */ 5788c2ecf20Sopenharmony_ci}; 5798c2ecf20Sopenharmony_ci 5808c2ecf20Sopenharmony_cistatic const unsigned int uart_modem_3512_pins[] = { 5818c2ecf20Sopenharmony_ci 285, /* UART_NDCD DCD carrier detect */ 5828c2ecf20Sopenharmony_ci 304, /* UART_NDTR DTR data terminal ready */ 5838c2ecf20Sopenharmony_ci 286, /* UART_NDSR DSR data set ready */ 5848c2ecf20Sopenharmony_ci 305, /* UART_NRTS RTS request to send */ 5858c2ecf20Sopenharmony_ci 287, /* UART_NCTS CTS clear to send */ 5868c2ecf20Sopenharmony_ci 268, /* UART_NRI RI ring indicator */ 5878c2ecf20Sopenharmony_ci}; 5888c2ecf20Sopenharmony_ci 5898c2ecf20Sopenharmony_cistatic const unsigned int tvc_3512_pins[] = { 5908c2ecf20Sopenharmony_ci 246, /* TVC_DATA[0] */ 5918c2ecf20Sopenharmony_ci 319, /* TVC_DATA[1] */ 5928c2ecf20Sopenharmony_ci 301, /* TVC_DATA[2] */ 5938c2ecf20Sopenharmony_ci 283, /* TVC_DATA[3] */ 5948c2ecf20Sopenharmony_ci 320, /* TVC_DATA[4] */ 5958c2ecf20Sopenharmony_ci 302, /* TVC_DATA[5] */ 5968c2ecf20Sopenharmony_ci 284, /* TVC_DATA[6] */ 5978c2ecf20Sopenharmony_ci 266, /* TVC_DATA[7] */ 5988c2ecf20Sopenharmony_ci}; 5998c2ecf20Sopenharmony_ci 6008c2ecf20Sopenharmony_cistatic const unsigned int tvc_clk_3512_pins[] = { 6018c2ecf20Sopenharmony_ci 265, /* TVC_CLK */ 6028c2ecf20Sopenharmony_ci}; 6038c2ecf20Sopenharmony_ci 6048c2ecf20Sopenharmony_ci/* NAND flash pins */ 6058c2ecf20Sopenharmony_cistatic const unsigned int nflash_3512_pins[] = { 6068c2ecf20Sopenharmony_ci 199, 200, 201, 202, 216, 217, 218, 219, 220, 234, 235, 236, 237, 252, 6078c2ecf20Sopenharmony_ci 253, 254, 249, 250, 232, 233, 211, 193, 194 6088c2ecf20Sopenharmony_ci}; 6098c2ecf20Sopenharmony_ci 6108c2ecf20Sopenharmony_ci/* Parallel (NOR) flash pins, D[0-15], A[16-25], CE0, CE1, RB, WE, OE, ALE */ 6118c2ecf20Sopenharmony_cistatic const unsigned int pflash_3512_pins[] = { 6128c2ecf20Sopenharmony_ci 162, 163, 165, 166, 148, 199, 200, 201, 202, 216, 217, 218, 219, 220, 6138c2ecf20Sopenharmony_ci 234, 235, 236, 237, 252, 253, 254, 251, 229, 232, 233, 211, 212, 213, 6148c2ecf20Sopenharmony_ci 214, 215, 193, 194 6158c2ecf20Sopenharmony_ci}; 6168c2ecf20Sopenharmony_ci 6178c2ecf20Sopenharmony_ci/* 6188c2ecf20Sopenharmony_ci * The parallel flash can be set up in a 26-bit address bus mode exposing 6198c2ecf20Sopenharmony_ci * A[0-15] (A[15] takes the place of ALE), but it has the 6208c2ecf20Sopenharmony_ci * side effect of stealing pins from GMAC1 and TVC so these blocks cannot be 6218c2ecf20Sopenharmony_ci * used at the same time. 6228c2ecf20Sopenharmony_ci */ 6238c2ecf20Sopenharmony_cistatic const unsigned int pflash_3512_pins_extended[] = { 6248c2ecf20Sopenharmony_ci 162, 163, 165, 166, 148, 199, 200, 201, 202, 216, 217, 218, 219, 220, 6258c2ecf20Sopenharmony_ci 234, 235, 236, 237, 252, 253, 254, 251, 229, 232, 233, 211, 212, 213, 6268c2ecf20Sopenharmony_ci 214, 215, 193, 194, 6278c2ecf20Sopenharmony_ci /* The extra pins */ 6288c2ecf20Sopenharmony_ci 296, 315, 297, 279, 261, 243, 316, 298, 280, 262, 244, 317, 299, 281, 6298c2ecf20Sopenharmony_ci 265, 6308c2ecf20Sopenharmony_ci}; 6318c2ecf20Sopenharmony_ci 6328c2ecf20Sopenharmony_ci/* Serial flash pins CE0, CE1, DI, DO, CK */ 6338c2ecf20Sopenharmony_cistatic const unsigned int sflash_3512_pins[] = { 230, 231, 232, 233, 211 }; 6348c2ecf20Sopenharmony_ci 6358c2ecf20Sopenharmony_ci/* The GPIO0A (0) pin overlap with TVC CLK and extended parallel flash */ 6368c2ecf20Sopenharmony_cistatic const unsigned int gpio0a_3512_pins[] = { 265 }; 6378c2ecf20Sopenharmony_ci 6388c2ecf20Sopenharmony_ci/* The GPIO0B (1-4) pins overlap with TVC and ICE */ 6398c2ecf20Sopenharmony_cistatic const unsigned int gpio0b_3512_pins[] = { 320, 302, 284, 266 }; 6408c2ecf20Sopenharmony_ci 6418c2ecf20Sopenharmony_ci/* The GPIO0C (5-7) pins overlap with ICE */ 6428c2ecf20Sopenharmony_cistatic const unsigned int gpio0c_3512_pins[] = { 248, 321, 303 }; 6438c2ecf20Sopenharmony_ci 6448c2ecf20Sopenharmony_ci/* The GPIO0D (9,10) pins overlap with UART RX/TX */ 6458c2ecf20Sopenharmony_cistatic const unsigned int gpio0d_3512_pins[] = { 267, 322 }; 6468c2ecf20Sopenharmony_ci 6478c2ecf20Sopenharmony_ci/* The GPIO0E (8,11-15) pins overlap with LPC, UART modem pins, SSP */ 6488c2ecf20Sopenharmony_cistatic const unsigned int gpio0e_3512_pins[] = { 285, 304, 286, 305, 287, 268 }; 6498c2ecf20Sopenharmony_ci 6508c2ecf20Sopenharmony_ci/* The GPIO0F (16) pins overlap with LCD */ 6518c2ecf20Sopenharmony_cistatic const unsigned int gpio0f_3512_pins[] = { 269 }; 6528c2ecf20Sopenharmony_ci 6538c2ecf20Sopenharmony_ci/* The GPIO0G (17,18) pins overlap with NAND flash CE0, CE1 */ 6548c2ecf20Sopenharmony_cistatic const unsigned int gpio0g_3512_pins[] = { 249, 250 }; 6558c2ecf20Sopenharmony_ci 6568c2ecf20Sopenharmony_ci/* The GPIO0H (19,20) pins overlap with parallel flash CE0, CE1 */ 6578c2ecf20Sopenharmony_cistatic const unsigned int gpio0h_3512_pins[] = { 251, 229 }; 6588c2ecf20Sopenharmony_ci 6598c2ecf20Sopenharmony_ci/* The GPIO0I (21,22) pins overlap with serial flash CE0, CE1 */ 6608c2ecf20Sopenharmony_cistatic const unsigned int gpio0i_3512_pins[] = { 230, 231 }; 6618c2ecf20Sopenharmony_ci 6628c2ecf20Sopenharmony_ci/* The GPIO0J (23) pins overlap with all flash */ 6638c2ecf20Sopenharmony_cistatic const unsigned int gpio0j_3512_pins[] = { 232 }; 6648c2ecf20Sopenharmony_ci 6658c2ecf20Sopenharmony_ci/* The GPIO0K (24,25) pins overlap with all flash and LCD */ 6668c2ecf20Sopenharmony_cistatic const unsigned int gpio0k_3512_pins[] = { 233, 211 }; 6678c2ecf20Sopenharmony_ci 6688c2ecf20Sopenharmony_ci/* The GPIO0L (26-29) pins overlap with parallel flash */ 6698c2ecf20Sopenharmony_cistatic const unsigned int gpio0l_3512_pins[] = { 212, 213, 214, 215 }; 6708c2ecf20Sopenharmony_ci 6718c2ecf20Sopenharmony_ci/* The GPIO0M (30,31) pins overlap with parallel flash and NAND flash */ 6728c2ecf20Sopenharmony_cistatic const unsigned int gpio0m_3512_pins[] = { 193, 194 }; 6738c2ecf20Sopenharmony_ci 6748c2ecf20Sopenharmony_ci/* The GPIO1A (0-4) pins that overlap with IDE and parallel flash */ 6758c2ecf20Sopenharmony_cistatic const unsigned int gpio1a_3512_pins[] = { 162, 163, 165, 166, 148 }; 6768c2ecf20Sopenharmony_ci 6778c2ecf20Sopenharmony_ci/* The GPIO1B (5-10, 27) pins overlap with just IDE */ 6788c2ecf20Sopenharmony_cistatic const unsigned int gpio1b_3512_pins[] = { 6798c2ecf20Sopenharmony_ci 180, 181, 182, 183, 184, 198, 255 6808c2ecf20Sopenharmony_ci}; 6818c2ecf20Sopenharmony_ci 6828c2ecf20Sopenharmony_ci/* The GPIO1C (11-26) pins overlap with IDE, parallel flash and NAND flash */ 6838c2ecf20Sopenharmony_cistatic const unsigned int gpio1c_3512_pins[] = { 6848c2ecf20Sopenharmony_ci 199, 200, 201, 202, 216, 217, 218, 219, 220, 234, 235, 236, 237, 6858c2ecf20Sopenharmony_ci 252, 253, 254 6868c2ecf20Sopenharmony_ci}; 6878c2ecf20Sopenharmony_ci 6888c2ecf20Sopenharmony_ci/* The GPIO1D (28-31) pins overlap with LCD and TVC */ 6898c2ecf20Sopenharmony_cistatic const unsigned int gpio1d_3512_pins[] = { 246, 319, 301, 283 }; 6908c2ecf20Sopenharmony_ci 6918c2ecf20Sopenharmony_ci/* The GPIO2A (0-3) pins overlap with GMII GMAC1 and extended parallel flash */ 6928c2ecf20Sopenharmony_cistatic const unsigned int gpio2a_3512_pins[] = { 315, 297, 279, 261 }; 6938c2ecf20Sopenharmony_ci 6948c2ecf20Sopenharmony_ci/* The GPIO2B (4-7) pins overlap with GMII GMAC1, extended parallel flash and LCD */ 6958c2ecf20Sopenharmony_cistatic const unsigned int gpio2b_3512_pins[] = { 262, 244, 317, 299 }; 6968c2ecf20Sopenharmony_ci 6978c2ecf20Sopenharmony_ci/* The GPIO2C (8-31) pins overlap with PCI */ 6988c2ecf20Sopenharmony_cistatic const unsigned int gpio2c_3512_pins[] = { 6998c2ecf20Sopenharmony_ci 17, 34, 35, 51, 52, 53, 68, 69, 71, 86, 87, 88, 89, 103, 104, 105, 7008c2ecf20Sopenharmony_ci 140, 141, 142, 143, 157, 158, 159, 160 7018c2ecf20Sopenharmony_ci}; 7028c2ecf20Sopenharmony_ci 7038c2ecf20Sopenharmony_ci/* Groups for the 3512 SoC/package */ 7048c2ecf20Sopenharmony_cistatic const struct gemini_pin_group gemini_3512_pin_groups[] = { 7058c2ecf20Sopenharmony_ci { 7068c2ecf20Sopenharmony_ci .name = "gndgrp", 7078c2ecf20Sopenharmony_ci .pins = gnd_3512_pins, 7088c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(gnd_3512_pins), 7098c2ecf20Sopenharmony_ci }, 7108c2ecf20Sopenharmony_ci { 7118c2ecf20Sopenharmony_ci .name = "dramgrp", 7128c2ecf20Sopenharmony_ci .pins = dram_3512_pins, 7138c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(dram_3512_pins), 7148c2ecf20Sopenharmony_ci .mask = DRAM_PADS_POWERDOWN, 7158c2ecf20Sopenharmony_ci }, 7168c2ecf20Sopenharmony_ci { 7178c2ecf20Sopenharmony_ci .name = "rtcgrp", 7188c2ecf20Sopenharmony_ci .pins = rtc_3512_pins, 7198c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(rtc_3512_pins), 7208c2ecf20Sopenharmony_ci }, 7218c2ecf20Sopenharmony_ci { 7228c2ecf20Sopenharmony_ci .name = "powergrp", 7238c2ecf20Sopenharmony_ci .pins = power_3512_pins, 7248c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(power_3512_pins), 7258c2ecf20Sopenharmony_ci }, 7268c2ecf20Sopenharmony_ci { 7278c2ecf20Sopenharmony_ci .name = "systemgrp", 7288c2ecf20Sopenharmony_ci .pins = system_3512_pins, 7298c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(system_3512_pins), 7308c2ecf20Sopenharmony_ci }, 7318c2ecf20Sopenharmony_ci { 7328c2ecf20Sopenharmony_ci .name = "vcontrolgrp", 7338c2ecf20Sopenharmony_ci .pins = vcontrol_3512_pins, 7348c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(vcontrol_3512_pins), 7358c2ecf20Sopenharmony_ci }, 7368c2ecf20Sopenharmony_ci { 7378c2ecf20Sopenharmony_ci .name = "icegrp", 7388c2ecf20Sopenharmony_ci .pins = ice_3512_pins, 7398c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(ice_3512_pins), 7408c2ecf20Sopenharmony_ci /* Conflict with some GPIO groups */ 7418c2ecf20Sopenharmony_ci }, 7428c2ecf20Sopenharmony_ci { 7438c2ecf20Sopenharmony_ci .name = "idegrp", 7448c2ecf20Sopenharmony_ci .pins = ide_3512_pins, 7458c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(ide_3512_pins), 7468c2ecf20Sopenharmony_ci /* Conflict with all flash usage */ 7478c2ecf20Sopenharmony_ci .value = IDE_PADS_ENABLE | NAND_PADS_DISABLE | 7488c2ecf20Sopenharmony_ci PFLASH_PADS_DISABLE | SFLASH_PADS_DISABLE, 7498c2ecf20Sopenharmony_ci .driving_mask = GENMASK(21, 20), 7508c2ecf20Sopenharmony_ci }, 7518c2ecf20Sopenharmony_ci { 7528c2ecf20Sopenharmony_ci .name = "satagrp", 7538c2ecf20Sopenharmony_ci .pins = sata_3512_pins, 7548c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(sata_3512_pins), 7558c2ecf20Sopenharmony_ci }, 7568c2ecf20Sopenharmony_ci { 7578c2ecf20Sopenharmony_ci .name = "usbgrp", 7588c2ecf20Sopenharmony_ci .pins = usb_3512_pins, 7598c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(usb_3512_pins), 7608c2ecf20Sopenharmony_ci }, 7618c2ecf20Sopenharmony_ci { 7628c2ecf20Sopenharmony_ci .name = "gmii_gmac0_grp", 7638c2ecf20Sopenharmony_ci .pins = gmii_gmac0_3512_pins, 7648c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(gmii_gmac0_3512_pins), 7658c2ecf20Sopenharmony_ci .driving_mask = GENMASK(17, 16), 7668c2ecf20Sopenharmony_ci }, 7678c2ecf20Sopenharmony_ci { 7688c2ecf20Sopenharmony_ci .name = "gmii_gmac1_grp", 7698c2ecf20Sopenharmony_ci .pins = gmii_gmac1_3512_pins, 7708c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(gmii_gmac1_3512_pins), 7718c2ecf20Sopenharmony_ci /* Bring out RGMII on the GMAC1 pins */ 7728c2ecf20Sopenharmony_ci .value = GEMINI_GMAC_IOSEL_GMAC0_GMAC1_RGMII, 7738c2ecf20Sopenharmony_ci .driving_mask = GENMASK(19, 18), 7748c2ecf20Sopenharmony_ci }, 7758c2ecf20Sopenharmony_ci { 7768c2ecf20Sopenharmony_ci .name = "pcigrp", 7778c2ecf20Sopenharmony_ci .pins = pci_3512_pins, 7788c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(pci_3512_pins), 7798c2ecf20Sopenharmony_ci /* Conflict only with GPIO2 */ 7808c2ecf20Sopenharmony_ci .value = PCI_PADS_ENABLE | PCI_CLK_PAD_ENABLE, 7818c2ecf20Sopenharmony_ci .driving_mask = GENMASK(23, 22), 7828c2ecf20Sopenharmony_ci }, 7838c2ecf20Sopenharmony_ci { 7848c2ecf20Sopenharmony_ci .name = "lpcgrp", 7858c2ecf20Sopenharmony_ci .pins = lpc_3512_pins, 7868c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(lpc_3512_pins), 7878c2ecf20Sopenharmony_ci /* Conflict with SSP and UART modem pins */ 7888c2ecf20Sopenharmony_ci .mask = SSP_PADS_ENABLE, 7898c2ecf20Sopenharmony_ci .value = LPC_PADS_ENABLE | LPC_CLK_PAD_ENABLE, 7908c2ecf20Sopenharmony_ci }, 7918c2ecf20Sopenharmony_ci { 7928c2ecf20Sopenharmony_ci .name = "lcdgrp", 7938c2ecf20Sopenharmony_ci .pins = lcd_3512_pins, 7948c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(lcd_3512_pins), 7958c2ecf20Sopenharmony_ci /* Conflict with TVC and ICE */ 7968c2ecf20Sopenharmony_ci .mask = TVC_PADS_ENABLE, 7978c2ecf20Sopenharmony_ci .value = LCD_PADS_ENABLE, 7988c2ecf20Sopenharmony_ci }, 7998c2ecf20Sopenharmony_ci { 8008c2ecf20Sopenharmony_ci .name = "sspgrp", 8018c2ecf20Sopenharmony_ci .pins = ssp_3512_pins, 8028c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(ssp_3512_pins), 8038c2ecf20Sopenharmony_ci /* Conflict with LPC and UART modem pins */ 8048c2ecf20Sopenharmony_ci .mask = LPC_PADS_ENABLE, 8058c2ecf20Sopenharmony_ci .value = SSP_PADS_ENABLE, 8068c2ecf20Sopenharmony_ci }, 8078c2ecf20Sopenharmony_ci { 8088c2ecf20Sopenharmony_ci .name = "uartrxtxgrp", 8098c2ecf20Sopenharmony_ci .pins = uart_rxtx_3512_pins, 8108c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(uart_rxtx_3512_pins), 8118c2ecf20Sopenharmony_ci /* No conflicts except GPIO */ 8128c2ecf20Sopenharmony_ci }, 8138c2ecf20Sopenharmony_ci { 8148c2ecf20Sopenharmony_ci .name = "uartmodemgrp", 8158c2ecf20Sopenharmony_ci .pins = uart_modem_3512_pins, 8168c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(uart_modem_3512_pins), 8178c2ecf20Sopenharmony_ci /* 8188c2ecf20Sopenharmony_ci * Conflict with LPC and SSP, 8198c2ecf20Sopenharmony_ci * so when those are both disabled, modem UART can thrive. 8208c2ecf20Sopenharmony_ci */ 8218c2ecf20Sopenharmony_ci .mask = LPC_PADS_ENABLE | SSP_PADS_ENABLE, 8228c2ecf20Sopenharmony_ci }, 8238c2ecf20Sopenharmony_ci { 8248c2ecf20Sopenharmony_ci .name = "tvcgrp", 8258c2ecf20Sopenharmony_ci .pins = tvc_3512_pins, 8268c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(tvc_3512_pins), 8278c2ecf20Sopenharmony_ci /* Conflict with character LCD and ICE */ 8288c2ecf20Sopenharmony_ci .mask = LCD_PADS_ENABLE, 8298c2ecf20Sopenharmony_ci .value = TVC_PADS_ENABLE, 8308c2ecf20Sopenharmony_ci }, 8318c2ecf20Sopenharmony_ci { 8328c2ecf20Sopenharmony_ci .name = "tvcclkgrp", 8338c2ecf20Sopenharmony_ci .pins = tvc_clk_3512_pins, 8348c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(tvc_clk_3512_pins), 8358c2ecf20Sopenharmony_ci .value = TVC_CLK_PAD_ENABLE, 8368c2ecf20Sopenharmony_ci }, 8378c2ecf20Sopenharmony_ci /* 8388c2ecf20Sopenharmony_ci * The construction is done such that it is possible to use a serial 8398c2ecf20Sopenharmony_ci * flash together with a NAND or parallel (NOR) flash, but it is not 8408c2ecf20Sopenharmony_ci * possible to use NAND and parallel flash together. To use serial 8418c2ecf20Sopenharmony_ci * flash with one of the two others, the muxbits need to be flipped 8428c2ecf20Sopenharmony_ci * around before any access. 8438c2ecf20Sopenharmony_ci */ 8448c2ecf20Sopenharmony_ci { 8458c2ecf20Sopenharmony_ci .name = "nflashgrp", 8468c2ecf20Sopenharmony_ci .pins = nflash_3512_pins, 8478c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(nflash_3512_pins), 8488c2ecf20Sopenharmony_ci /* Conflict with IDE, parallel and serial flash */ 8498c2ecf20Sopenharmony_ci .mask = NAND_PADS_DISABLE | IDE_PADS_ENABLE, 8508c2ecf20Sopenharmony_ci .value = PFLASH_PADS_DISABLE | SFLASH_PADS_DISABLE, 8518c2ecf20Sopenharmony_ci }, 8528c2ecf20Sopenharmony_ci { 8538c2ecf20Sopenharmony_ci .name = "pflashgrp", 8548c2ecf20Sopenharmony_ci .pins = pflash_3512_pins, 8558c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(pflash_3512_pins), 8568c2ecf20Sopenharmony_ci /* Conflict with IDE, NAND and serial flash */ 8578c2ecf20Sopenharmony_ci .mask = PFLASH_PADS_DISABLE | IDE_PADS_ENABLE, 8588c2ecf20Sopenharmony_ci .value = NAND_PADS_DISABLE | SFLASH_PADS_DISABLE, 8598c2ecf20Sopenharmony_ci }, 8608c2ecf20Sopenharmony_ci { 8618c2ecf20Sopenharmony_ci .name = "sflashgrp", 8628c2ecf20Sopenharmony_ci .pins = sflash_3512_pins, 8638c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(sflash_3512_pins), 8648c2ecf20Sopenharmony_ci /* Conflict with IDE, NAND and parallel flash */ 8658c2ecf20Sopenharmony_ci .mask = SFLASH_PADS_DISABLE | IDE_PADS_ENABLE, 8668c2ecf20Sopenharmony_ci .value = NAND_PADS_DISABLE | PFLASH_PADS_DISABLE, 8678c2ecf20Sopenharmony_ci }, 8688c2ecf20Sopenharmony_ci { 8698c2ecf20Sopenharmony_ci .name = "gpio0agrp", 8708c2ecf20Sopenharmony_ci .pins = gpio0a_3512_pins, 8718c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(gpio0a_3512_pins), 8728c2ecf20Sopenharmony_ci /* Conflict with TVC CLK */ 8738c2ecf20Sopenharmony_ci .mask = TVC_CLK_PAD_ENABLE, 8748c2ecf20Sopenharmony_ci }, 8758c2ecf20Sopenharmony_ci { 8768c2ecf20Sopenharmony_ci .name = "gpio0bgrp", 8778c2ecf20Sopenharmony_ci .pins = gpio0b_3512_pins, 8788c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(gpio0b_3512_pins), 8798c2ecf20Sopenharmony_ci /* Conflict with TVC and ICE */ 8808c2ecf20Sopenharmony_ci .mask = TVC_PADS_ENABLE, 8818c2ecf20Sopenharmony_ci }, 8828c2ecf20Sopenharmony_ci { 8838c2ecf20Sopenharmony_ci .name = "gpio0cgrp", 8848c2ecf20Sopenharmony_ci .pins = gpio0c_3512_pins, 8858c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(gpio0c_3512_pins), 8868c2ecf20Sopenharmony_ci /* Conflict with ICE */ 8878c2ecf20Sopenharmony_ci }, 8888c2ecf20Sopenharmony_ci { 8898c2ecf20Sopenharmony_ci .name = "gpio0dgrp", 8908c2ecf20Sopenharmony_ci .pins = gpio0d_3512_pins, 8918c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(gpio0d_3512_pins), 8928c2ecf20Sopenharmony_ci /* Conflict with UART RX/TX */ 8938c2ecf20Sopenharmony_ci }, 8948c2ecf20Sopenharmony_ci { 8958c2ecf20Sopenharmony_ci .name = "gpio0egrp", 8968c2ecf20Sopenharmony_ci .pins = gpio0e_3512_pins, 8978c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(gpio0e_3512_pins), 8988c2ecf20Sopenharmony_ci /* Conflict with LPC, UART modem pins, SSP */ 8998c2ecf20Sopenharmony_ci .mask = LPC_PADS_ENABLE | SSP_PADS_ENABLE, 9008c2ecf20Sopenharmony_ci }, 9018c2ecf20Sopenharmony_ci { 9028c2ecf20Sopenharmony_ci .name = "gpio0fgrp", 9038c2ecf20Sopenharmony_ci .pins = gpio0f_3512_pins, 9048c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(gpio0f_3512_pins), 9058c2ecf20Sopenharmony_ci /* Conflict with LCD */ 9068c2ecf20Sopenharmony_ci .mask = LCD_PADS_ENABLE, 9078c2ecf20Sopenharmony_ci }, 9088c2ecf20Sopenharmony_ci { 9098c2ecf20Sopenharmony_ci .name = "gpio0ggrp", 9108c2ecf20Sopenharmony_ci .pins = gpio0g_3512_pins, 9118c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(gpio0g_3512_pins), 9128c2ecf20Sopenharmony_ci /* Conflict with NAND flash */ 9138c2ecf20Sopenharmony_ci .value = NAND_PADS_DISABLE, 9148c2ecf20Sopenharmony_ci }, 9158c2ecf20Sopenharmony_ci { 9168c2ecf20Sopenharmony_ci .name = "gpio0hgrp", 9178c2ecf20Sopenharmony_ci .pins = gpio0h_3512_pins, 9188c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(gpio0h_3512_pins), 9198c2ecf20Sopenharmony_ci /* Conflict with parallel flash */ 9208c2ecf20Sopenharmony_ci .value = PFLASH_PADS_DISABLE, 9218c2ecf20Sopenharmony_ci }, 9228c2ecf20Sopenharmony_ci { 9238c2ecf20Sopenharmony_ci .name = "gpio0igrp", 9248c2ecf20Sopenharmony_ci .pins = gpio0i_3512_pins, 9258c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(gpio0i_3512_pins), 9268c2ecf20Sopenharmony_ci /* Conflict with serial flash */ 9278c2ecf20Sopenharmony_ci .value = SFLASH_PADS_DISABLE, 9288c2ecf20Sopenharmony_ci }, 9298c2ecf20Sopenharmony_ci { 9308c2ecf20Sopenharmony_ci .name = "gpio0jgrp", 9318c2ecf20Sopenharmony_ci .pins = gpio0j_3512_pins, 9328c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(gpio0j_3512_pins), 9338c2ecf20Sopenharmony_ci /* Conflict with all flash */ 9348c2ecf20Sopenharmony_ci .value = PFLASH_PADS_DISABLE | NAND_PADS_DISABLE | 9358c2ecf20Sopenharmony_ci SFLASH_PADS_DISABLE, 9368c2ecf20Sopenharmony_ci }, 9378c2ecf20Sopenharmony_ci { 9388c2ecf20Sopenharmony_ci .name = "gpio0kgrp", 9398c2ecf20Sopenharmony_ci .pins = gpio0k_3512_pins, 9408c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(gpio0k_3512_pins), 9418c2ecf20Sopenharmony_ci /* Conflict with all flash and LCD */ 9428c2ecf20Sopenharmony_ci .mask = LCD_PADS_ENABLE, 9438c2ecf20Sopenharmony_ci .value = PFLASH_PADS_DISABLE | NAND_PADS_DISABLE | 9448c2ecf20Sopenharmony_ci SFLASH_PADS_DISABLE, 9458c2ecf20Sopenharmony_ci }, 9468c2ecf20Sopenharmony_ci { 9478c2ecf20Sopenharmony_ci .name = "gpio0lgrp", 9488c2ecf20Sopenharmony_ci .pins = gpio0l_3512_pins, 9498c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(gpio0l_3512_pins), 9508c2ecf20Sopenharmony_ci /* Conflict with parallel flash */ 9518c2ecf20Sopenharmony_ci .value = PFLASH_PADS_DISABLE, 9528c2ecf20Sopenharmony_ci }, 9538c2ecf20Sopenharmony_ci { 9548c2ecf20Sopenharmony_ci .name = "gpio0mgrp", 9558c2ecf20Sopenharmony_ci .pins = gpio0m_3512_pins, 9568c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(gpio0m_3512_pins), 9578c2ecf20Sopenharmony_ci /* Conflict with parallel and NAND flash */ 9588c2ecf20Sopenharmony_ci .value = PFLASH_PADS_DISABLE | NAND_PADS_DISABLE, 9598c2ecf20Sopenharmony_ci }, 9608c2ecf20Sopenharmony_ci { 9618c2ecf20Sopenharmony_ci .name = "gpio1agrp", 9628c2ecf20Sopenharmony_ci .pins = gpio1a_3512_pins, 9638c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(gpio1a_3512_pins), 9648c2ecf20Sopenharmony_ci /* Conflict with IDE and parallel flash */ 9658c2ecf20Sopenharmony_ci .mask = IDE_PADS_ENABLE, 9668c2ecf20Sopenharmony_ci .value = PFLASH_PADS_DISABLE, 9678c2ecf20Sopenharmony_ci }, 9688c2ecf20Sopenharmony_ci { 9698c2ecf20Sopenharmony_ci .name = "gpio1bgrp", 9708c2ecf20Sopenharmony_ci .pins = gpio1b_3512_pins, 9718c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(gpio1b_3512_pins), 9728c2ecf20Sopenharmony_ci /* Conflict with IDE only */ 9738c2ecf20Sopenharmony_ci .mask = IDE_PADS_ENABLE, 9748c2ecf20Sopenharmony_ci }, 9758c2ecf20Sopenharmony_ci { 9768c2ecf20Sopenharmony_ci .name = "gpio1cgrp", 9778c2ecf20Sopenharmony_ci .pins = gpio1c_3512_pins, 9788c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(gpio1c_3512_pins), 9798c2ecf20Sopenharmony_ci /* Conflict with IDE, parallel and NAND flash */ 9808c2ecf20Sopenharmony_ci .mask = IDE_PADS_ENABLE, 9818c2ecf20Sopenharmony_ci .value = NAND_PADS_DISABLE | PFLASH_PADS_DISABLE, 9828c2ecf20Sopenharmony_ci }, 9838c2ecf20Sopenharmony_ci { 9848c2ecf20Sopenharmony_ci .name = "gpio1dgrp", 9858c2ecf20Sopenharmony_ci .pins = gpio1d_3512_pins, 9868c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(gpio1d_3512_pins), 9878c2ecf20Sopenharmony_ci /* Conflict with LCD and TVC */ 9888c2ecf20Sopenharmony_ci .mask = LCD_PADS_ENABLE | TVC_PADS_ENABLE, 9898c2ecf20Sopenharmony_ci }, 9908c2ecf20Sopenharmony_ci { 9918c2ecf20Sopenharmony_ci .name = "gpio2agrp", 9928c2ecf20Sopenharmony_ci .pins = gpio2a_3512_pins, 9938c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(gpio2a_3512_pins), 9948c2ecf20Sopenharmony_ci .mask = GEMINI_GMAC_IOSEL_GMAC0_GMAC1_RGMII, 9958c2ecf20Sopenharmony_ci /* Conflict with GMII GMAC1 and extended parallel flash */ 9968c2ecf20Sopenharmony_ci }, 9978c2ecf20Sopenharmony_ci { 9988c2ecf20Sopenharmony_ci .name = "gpio2bgrp", 9998c2ecf20Sopenharmony_ci .pins = gpio2b_3512_pins, 10008c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(gpio2b_3512_pins), 10018c2ecf20Sopenharmony_ci /* Conflict with GMII GMAC1, extended parallel flash and LCD */ 10028c2ecf20Sopenharmony_ci .mask = LCD_PADS_ENABLE | GEMINI_GMAC_IOSEL_GMAC0_GMAC1_RGMII, 10038c2ecf20Sopenharmony_ci }, 10048c2ecf20Sopenharmony_ci { 10058c2ecf20Sopenharmony_ci .name = "gpio2cgrp", 10068c2ecf20Sopenharmony_ci .pins = gpio2c_3512_pins, 10078c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(gpio2c_3512_pins), 10088c2ecf20Sopenharmony_ci /* Conflict with PCI */ 10098c2ecf20Sopenharmony_ci .mask = PCI_PADS_ENABLE, 10108c2ecf20Sopenharmony_ci }, 10118c2ecf20Sopenharmony_ci}; 10128c2ecf20Sopenharmony_ci 10138c2ecf20Sopenharmony_ci/* Pin names for the pinmux subsystem, 3516 variant */ 10148c2ecf20Sopenharmony_cistatic const struct pinctrl_pin_desc gemini_3516_pins[] = { 10158c2ecf20Sopenharmony_ci /* Row A */ 10168c2ecf20Sopenharmony_ci PINCTRL_PIN(0, "A1 AVCC3IOHA"), 10178c2ecf20Sopenharmony_ci PINCTRL_PIN(1, "A2 DRAM CK N"), 10188c2ecf20Sopenharmony_ci PINCTRL_PIN(2, "A3 DRAM CK"), 10198c2ecf20Sopenharmony_ci PINCTRL_PIN(3, "A4 DRAM DQM1"), 10208c2ecf20Sopenharmony_ci PINCTRL_PIN(4, "A5 DRAM DQ9"), 10218c2ecf20Sopenharmony_ci PINCTRL_PIN(5, "A6 DRAM DQ13"), 10228c2ecf20Sopenharmony_ci PINCTRL_PIN(6, "A7 DRAM DQ1"), 10238c2ecf20Sopenharmony_ci PINCTRL_PIN(7, "A8 DRAM DQ2"), 10248c2ecf20Sopenharmony_ci PINCTRL_PIN(8, "A9 DRAM DQ4"), 10258c2ecf20Sopenharmony_ci PINCTRL_PIN(9, "A10 DRAM VREF"), 10268c2ecf20Sopenharmony_ci PINCTRL_PIN(10, "A11 DRAM DQ24"), 10278c2ecf20Sopenharmony_ci PINCTRL_PIN(11, "A12 DRAM DQ28"), 10288c2ecf20Sopenharmony_ci PINCTRL_PIN(12, "A13 DRAM DQ30"), 10298c2ecf20Sopenharmony_ci PINCTRL_PIN(13, "A14 DRAM DQ18"), 10308c2ecf20Sopenharmony_ci PINCTRL_PIN(14, "A15 DRAM DQ21"), 10318c2ecf20Sopenharmony_ci PINCTRL_PIN(15, "A16 DRAM CAS_N"), 10328c2ecf20Sopenharmony_ci PINCTRL_PIN(16, "A17 DRAM BA1"), 10338c2ecf20Sopenharmony_ci PINCTRL_PIN(17, "A18 PCI INTA N"), 10348c2ecf20Sopenharmony_ci PINCTRL_PIN(18, "A19 PCI INTB N"), 10358c2ecf20Sopenharmony_ci PINCTRL_PIN(19, "A20 PCI INTC N"), 10368c2ecf20Sopenharmony_ci /* Row B */ 10378c2ecf20Sopenharmony_ci PINCTRL_PIN(20, "B1 PWR EN"), 10388c2ecf20Sopenharmony_ci PINCTRL_PIN(21, "B2 GND"), 10398c2ecf20Sopenharmony_ci PINCTRL_PIN(22, "B3 RTC CLKO"), 10408c2ecf20Sopenharmony_ci PINCTRL_PIN(23, "B4 DRAM A5"), 10418c2ecf20Sopenharmony_ci PINCTRL_PIN(24, "B5 DRAM A6"), 10428c2ecf20Sopenharmony_ci PINCTRL_PIN(25, "B6 DRAM DQS1"), 10438c2ecf20Sopenharmony_ci PINCTRL_PIN(26, "B7 DRAM DQ11"), 10448c2ecf20Sopenharmony_ci PINCTRL_PIN(27, "B8 DRAM DQ0"), 10458c2ecf20Sopenharmony_ci PINCTRL_PIN(28, "B9 DRAM DQS0"), 10468c2ecf20Sopenharmony_ci PINCTRL_PIN(29, "B10 DRAM DQ7"), 10478c2ecf20Sopenharmony_ci PINCTRL_PIN(30, "B11 DRAM DQS3"), 10488c2ecf20Sopenharmony_ci PINCTRL_PIN(31, "B12 DRAM DQ27"), 10498c2ecf20Sopenharmony_ci PINCTRL_PIN(32, "B13 DRAM DQ31"), 10508c2ecf20Sopenharmony_ci PINCTRL_PIN(33, "B14 DRAM DQ20"), 10518c2ecf20Sopenharmony_ci PINCTRL_PIN(34, "B15 DRAM DQS2"), 10528c2ecf20Sopenharmony_ci PINCTRL_PIN(35, "B16 DRAM WE N"), 10538c2ecf20Sopenharmony_ci PINCTRL_PIN(36, "B17 DRAM A10"), 10548c2ecf20Sopenharmony_ci PINCTRL_PIN(37, "B18 DRAM A2"), 10558c2ecf20Sopenharmony_ci PINCTRL_PIN(38, "B19 GND"), 10568c2ecf20Sopenharmony_ci PINCTRL_PIN(39, "B20 PCI GNT0 N"), 10578c2ecf20Sopenharmony_ci /* Row C */ 10588c2ecf20Sopenharmony_ci PINCTRL_PIN(40, "C1 AGNDIOHA"), 10598c2ecf20Sopenharmony_ci PINCTRL_PIN(41, "C2 XTALI"), 10608c2ecf20Sopenharmony_ci PINCTRL_PIN(42, "C3 GND"), 10618c2ecf20Sopenharmony_ci PINCTRL_PIN(43, "C4 RTC CLKI"), 10628c2ecf20Sopenharmony_ci PINCTRL_PIN(44, "C5 DRAM A12"), 10638c2ecf20Sopenharmony_ci PINCTRL_PIN(45, "C6 DRAM A11"), 10648c2ecf20Sopenharmony_ci PINCTRL_PIN(46, "C7 DRAM DQ8"), 10658c2ecf20Sopenharmony_ci PINCTRL_PIN(47, "C8 DRAM DQ10"), 10668c2ecf20Sopenharmony_ci PINCTRL_PIN(48, "C9 DRAM DQ3"), 10678c2ecf20Sopenharmony_ci PINCTRL_PIN(49, "C10 DRAM DQ6"), 10688c2ecf20Sopenharmony_ci PINCTRL_PIN(50, "C11 DRAM DQM0"), 10698c2ecf20Sopenharmony_ci PINCTRL_PIN(51, "C12 DRAM DQ26"), 10708c2ecf20Sopenharmony_ci PINCTRL_PIN(52, "C13 DRAM DQ16"), 10718c2ecf20Sopenharmony_ci PINCTRL_PIN(53, "C14 DRAM DQ22"), 10728c2ecf20Sopenharmony_ci PINCTRL_PIN(54, "C15 DRAM DQM2"), 10738c2ecf20Sopenharmony_ci PINCTRL_PIN(55, "C16 DRAM BA0"), 10748c2ecf20Sopenharmony_ci PINCTRL_PIN(56, "C17 DRAM A3"), 10758c2ecf20Sopenharmony_ci PINCTRL_PIN(57, "C18 GND"), 10768c2ecf20Sopenharmony_ci PINCTRL_PIN(58, "C19 PCI GNT1 N"), 10778c2ecf20Sopenharmony_ci PINCTRL_PIN(59, "C20 PCI REQ2 N"), 10788c2ecf20Sopenharmony_ci /* Row D */ 10798c2ecf20Sopenharmony_ci PINCTRL_PIN(60, "D1 AVCC3IOAHA"), 10808c2ecf20Sopenharmony_ci PINCTRL_PIN(61, "D2 AVCCKHA"), 10818c2ecf20Sopenharmony_ci PINCTRL_PIN(62, "D3 XTALO"), 10828c2ecf20Sopenharmony_ci PINCTRL_PIN(63, "D4 GND"), 10838c2ecf20Sopenharmony_ci PINCTRL_PIN(64, "D5 CIR RXD"), 10848c2ecf20Sopenharmony_ci PINCTRL_PIN(65, "D6 DRAM A7"), 10858c2ecf20Sopenharmony_ci PINCTRL_PIN(66, "D7 DRAM A4"), 10868c2ecf20Sopenharmony_ci PINCTRL_PIN(67, "D8 DRAM A8"), 10878c2ecf20Sopenharmony_ci PINCTRL_PIN(68, "D9 DRAM CKE"), 10888c2ecf20Sopenharmony_ci PINCTRL_PIN(69, "D10 DRAM DQ14"), 10898c2ecf20Sopenharmony_ci PINCTRL_PIN(70, "D11 DRAM DQ5"), 10908c2ecf20Sopenharmony_ci PINCTRL_PIN(71, "D12 DRAM DQ25"), 10918c2ecf20Sopenharmony_ci PINCTRL_PIN(72, "D13 DRAM DQ17"), 10928c2ecf20Sopenharmony_ci PINCTRL_PIN(73, "D14 DRAM DQ23"), 10938c2ecf20Sopenharmony_ci PINCTRL_PIN(74, "D15 DRAM RAS N"), 10948c2ecf20Sopenharmony_ci PINCTRL_PIN(75, "D16 DRAM A1"), 10958c2ecf20Sopenharmony_ci PINCTRL_PIN(76, "D17 GND"), 10968c2ecf20Sopenharmony_ci PINCTRL_PIN(77, "D18 EXT RESET N"), 10978c2ecf20Sopenharmony_ci PINCTRL_PIN(78, "D19 PCI REQ1 N"), 10988c2ecf20Sopenharmony_ci PINCTRL_PIN(79, "D20 PCI REQ3 N"), 10998c2ecf20Sopenharmony_ci /* Row E */ 11008c2ecf20Sopenharmony_ci PINCTRL_PIN(80, "E1 VCC2IO CTRL"), 11018c2ecf20Sopenharmony_ci PINCTRL_PIN(81, "E2 VREF CTRL"), 11028c2ecf20Sopenharmony_ci PINCTRL_PIN(82, "E3 CIR RST N"), 11038c2ecf20Sopenharmony_ci PINCTRL_PIN(83, "E4 PWR BTN"), 11048c2ecf20Sopenharmony_ci PINCTRL_PIN(84, "E5 GND"), 11058c2ecf20Sopenharmony_ci PINCTRL_PIN(85, "E6 CIR TXD"), 11068c2ecf20Sopenharmony_ci PINCTRL_PIN(86, "E7 VCCK CTRL"), 11078c2ecf20Sopenharmony_ci PINCTRL_PIN(87, "E8 DRAM A9"), 11088c2ecf20Sopenharmony_ci PINCTRL_PIN(88, "E9 DRAM DQ12"), 11098c2ecf20Sopenharmony_ci PINCTRL_PIN(89, "E10 DRAM DQ15"), 11108c2ecf20Sopenharmony_ci PINCTRL_PIN(90, "E11 DRAM DQM3"), 11118c2ecf20Sopenharmony_ci PINCTRL_PIN(91, "E12 DRAM DQ29"), 11128c2ecf20Sopenharmony_ci PINCTRL_PIN(92, "E13 DRAM DQ19"), 11138c2ecf20Sopenharmony_ci PINCTRL_PIN(93, "E14 DRAM A13"), 11148c2ecf20Sopenharmony_ci PINCTRL_PIN(94, "E15 DRAM A0"), 11158c2ecf20Sopenharmony_ci PINCTRL_PIN(95, "E16 GND"), 11168c2ecf20Sopenharmony_ci PINCTRL_PIN(96, "E17 PCI INTD N"), 11178c2ecf20Sopenharmony_ci PINCTRL_PIN(97, "E18 PCI GNT3 N"), 11188c2ecf20Sopenharmony_ci PINCTRL_PIN(98, "E19 PCI AD29"), 11198c2ecf20Sopenharmony_ci PINCTRL_PIN(99, "E20 PCI AD28"), 11208c2ecf20Sopenharmony_ci /* Row F */ 11218c2ecf20Sopenharmony_ci PINCTRL_PIN(100, "F1 AVCCKHB"), 11228c2ecf20Sopenharmony_ci PINCTRL_PIN(101, "F2 AVCCK P"), 11238c2ecf20Sopenharmony_ci PINCTRL_PIN(102, "F3 EBG"), 11248c2ecf20Sopenharmony_ci PINCTRL_PIN(103, "F4 REXT"), 11258c2ecf20Sopenharmony_ci PINCTRL_PIN(104, "F5 AVCC3IOHB"), 11268c2ecf20Sopenharmony_ci PINCTRL_PIN(105, "F6 GND"), 11278c2ecf20Sopenharmony_ci PINCTRL_PIN(106, "F7 VCC2IOHA 2"), 11288c2ecf20Sopenharmony_ci PINCTRL_PIN(107, "F8 VCC2IOHA 2"), 11298c2ecf20Sopenharmony_ci PINCTRL_PIN(108, "F9 VCC2IOHA 2"), 11308c2ecf20Sopenharmony_ci PINCTRL_PIN(109, "F10 V1"), 11318c2ecf20Sopenharmony_ci PINCTRL_PIN(110, "F11 V1"), 11328c2ecf20Sopenharmony_ci PINCTRL_PIN(111, "F12 VCC2IOHA 2"), 11338c2ecf20Sopenharmony_ci PINCTRL_PIN(112, "F13 VCC2IOHA 2"), 11348c2ecf20Sopenharmony_ci PINCTRL_PIN(113, "F14 VCC2IOHA 2"), 11358c2ecf20Sopenharmony_ci PINCTRL_PIN(114, "F15 GND"), 11368c2ecf20Sopenharmony_ci PINCTRL_PIN(115, "F16 PCI CLK"), 11378c2ecf20Sopenharmony_ci PINCTRL_PIN(116, "F17 PCI GNT2 N"), 11388c2ecf20Sopenharmony_ci PINCTRL_PIN(117, "F18 PCI AD31"), 11398c2ecf20Sopenharmony_ci PINCTRL_PIN(118, "F19 PCI AD26"), 11408c2ecf20Sopenharmony_ci PINCTRL_PIN(119, "F20 PCI CBE3 N"), 11418c2ecf20Sopenharmony_ci /* Row G */ 11428c2ecf20Sopenharmony_ci PINCTRL_PIN(120, "G1 SATA0 RXDP"), 11438c2ecf20Sopenharmony_ci PINCTRL_PIN(121, "G2 SATA0 RXDN"), 11448c2ecf20Sopenharmony_ci PINCTRL_PIN(122, "G3 AGNDK 0"), 11458c2ecf20Sopenharmony_ci PINCTRL_PIN(123, "G4 AVCCK S"), 11468c2ecf20Sopenharmony_ci PINCTRL_PIN(124, "G5 AVCC3 S"), 11478c2ecf20Sopenharmony_ci PINCTRL_PIN(125, "G6 VCC2IOHA 2"), 11488c2ecf20Sopenharmony_ci PINCTRL_PIN(126, "G7 GND"), 11498c2ecf20Sopenharmony_ci PINCTRL_PIN(127, "G8 VCC2IOHA 2"), 11508c2ecf20Sopenharmony_ci PINCTRL_PIN(128, "G9 V1"), 11518c2ecf20Sopenharmony_ci PINCTRL_PIN(129, "G10 V1"), 11528c2ecf20Sopenharmony_ci PINCTRL_PIN(130, "G11 V1"), 11538c2ecf20Sopenharmony_ci PINCTRL_PIN(131, "G12 V1"), 11548c2ecf20Sopenharmony_ci PINCTRL_PIN(132, "G13 VCC2IOHA 2"), 11558c2ecf20Sopenharmony_ci PINCTRL_PIN(133, "G14 GND"), 11568c2ecf20Sopenharmony_ci PINCTRL_PIN(134, "G15 VCC3IOHA"), 11578c2ecf20Sopenharmony_ci PINCTRL_PIN(135, "G16 PCI REQ0 N"), 11588c2ecf20Sopenharmony_ci PINCTRL_PIN(136, "G17 PCI AD30"), 11598c2ecf20Sopenharmony_ci PINCTRL_PIN(137, "G18 PCI AD24"), 11608c2ecf20Sopenharmony_ci PINCTRL_PIN(138, "G19 PCI AD23"), 11618c2ecf20Sopenharmony_ci PINCTRL_PIN(139, "G20 PCI AD21"), 11628c2ecf20Sopenharmony_ci /* Row H */ 11638c2ecf20Sopenharmony_ci PINCTRL_PIN(140, "H1 SATA0 TXDP"), 11648c2ecf20Sopenharmony_ci PINCTRL_PIN(141, "H2 SATA0 TXDN"), 11658c2ecf20Sopenharmony_ci PINCTRL_PIN(142, "H3 AGNDK 1"), 11668c2ecf20Sopenharmony_ci PINCTRL_PIN(143, "H4 AVCCK 0"), 11678c2ecf20Sopenharmony_ci PINCTRL_PIN(144, "H5 TEST CLKOUT"), 11688c2ecf20Sopenharmony_ci PINCTRL_PIN(145, "H6 AGND"), 11698c2ecf20Sopenharmony_ci PINCTRL_PIN(146, "H7 VCC2IOHA 2"), 11708c2ecf20Sopenharmony_ci PINCTRL_PIN(147, "H8 GND"), 11718c2ecf20Sopenharmony_ci PINCTRL_PIN(148, "H9 GND"), 11728c2ecf20Sopenharmony_ci PINCTRL_PIN(149, "H10 GDN"), 11738c2ecf20Sopenharmony_ci PINCTRL_PIN(150, "H11 GND"), 11748c2ecf20Sopenharmony_ci PINCTRL_PIN(151, "H12 GND"), 11758c2ecf20Sopenharmony_ci PINCTRL_PIN(152, "H13 GND"), 11768c2ecf20Sopenharmony_ci PINCTRL_PIN(153, "H14 VCC3IOHA"), 11778c2ecf20Sopenharmony_ci PINCTRL_PIN(154, "H15 VCC3IOHA"), 11788c2ecf20Sopenharmony_ci PINCTRL_PIN(155, "H16 PCI AD27"), 11798c2ecf20Sopenharmony_ci PINCTRL_PIN(156, "H17 PCI AD25"), 11808c2ecf20Sopenharmony_ci PINCTRL_PIN(157, "H18 PCI AD22"), 11818c2ecf20Sopenharmony_ci PINCTRL_PIN(158, "H19 PCI AD18"), 11828c2ecf20Sopenharmony_ci PINCTRL_PIN(159, "H20 PCI AD17"), 11838c2ecf20Sopenharmony_ci /* Row J (for some reason I is skipped) */ 11848c2ecf20Sopenharmony_ci PINCTRL_PIN(160, "J1 SATA1 TXDP"), 11858c2ecf20Sopenharmony_ci PINCTRL_PIN(161, "J2 SATA1 TXDN"), 11868c2ecf20Sopenharmony_ci PINCTRL_PIN(162, "J3 AGNDK 2"), 11878c2ecf20Sopenharmony_ci PINCTRL_PIN(163, "J4 AVCCK 1"), 11888c2ecf20Sopenharmony_ci PINCTRL_PIN(164, "J5 AGND"), 11898c2ecf20Sopenharmony_ci PINCTRL_PIN(165, "J6 AGND"), 11908c2ecf20Sopenharmony_ci PINCTRL_PIN(166, "J7 V1"), 11918c2ecf20Sopenharmony_ci PINCTRL_PIN(167, "J8 GND"), 11928c2ecf20Sopenharmony_ci PINCTRL_PIN(168, "J9 GND"), 11938c2ecf20Sopenharmony_ci PINCTRL_PIN(169, "J10 GND"), 11948c2ecf20Sopenharmony_ci PINCTRL_PIN(170, "J11 GND"), 11958c2ecf20Sopenharmony_ci PINCTRL_PIN(171, "J12 GND"), 11968c2ecf20Sopenharmony_ci PINCTRL_PIN(172, "J13 GND"), 11978c2ecf20Sopenharmony_ci PINCTRL_PIN(173, "J14 V1"), 11988c2ecf20Sopenharmony_ci PINCTRL_PIN(174, "J15 VCC3IOHA"), 11998c2ecf20Sopenharmony_ci PINCTRL_PIN(175, "J16 PCI AD19"), 12008c2ecf20Sopenharmony_ci PINCTRL_PIN(176, "J17 PCI AD20"), 12018c2ecf20Sopenharmony_ci PINCTRL_PIN(177, "J18 PCI AD16"), 12028c2ecf20Sopenharmony_ci PINCTRL_PIN(178, "J19 PCI CBE2 N"), 12038c2ecf20Sopenharmony_ci PINCTRL_PIN(179, "J20 PCI FRAME N"), 12048c2ecf20Sopenharmony_ci /* Row K */ 12058c2ecf20Sopenharmony_ci PINCTRL_PIN(180, "K1 SATA1 RXDP"), 12068c2ecf20Sopenharmony_ci PINCTRL_PIN(181, "K2 SATA1 RXDN"), 12078c2ecf20Sopenharmony_ci PINCTRL_PIN(182, "K3 AGNDK 3"), 12088c2ecf20Sopenharmony_ci PINCTRL_PIN(183, "K4 AVCCK 2"), 12098c2ecf20Sopenharmony_ci PINCTRL_PIN(184, "K5 AGND"), 12108c2ecf20Sopenharmony_ci PINCTRL_PIN(185, "K6 V1"), 12118c2ecf20Sopenharmony_ci PINCTRL_PIN(186, "K7 V1"), 12128c2ecf20Sopenharmony_ci PINCTRL_PIN(187, "K8 GND"), 12138c2ecf20Sopenharmony_ci PINCTRL_PIN(188, "K9 GND"), 12148c2ecf20Sopenharmony_ci PINCTRL_PIN(189, "K10 GND"), 12158c2ecf20Sopenharmony_ci PINCTRL_PIN(190, "K11 GND"), 12168c2ecf20Sopenharmony_ci PINCTRL_PIN(191, "K12 GND"), 12178c2ecf20Sopenharmony_ci PINCTRL_PIN(192, "K13 GND"), 12188c2ecf20Sopenharmony_ci PINCTRL_PIN(193, "K14 V1"), 12198c2ecf20Sopenharmony_ci PINCTRL_PIN(194, "K15 V1"), 12208c2ecf20Sopenharmony_ci PINCTRL_PIN(195, "K16 PCI TRDY N"), 12218c2ecf20Sopenharmony_ci PINCTRL_PIN(196, "K17 PCI IRDY N"), 12228c2ecf20Sopenharmony_ci PINCTRL_PIN(197, "K18 PCI DEVSEL N"), 12238c2ecf20Sopenharmony_ci PINCTRL_PIN(198, "K19 PCI STOP N"), 12248c2ecf20Sopenharmony_ci PINCTRL_PIN(199, "K20 PCI PAR"), 12258c2ecf20Sopenharmony_ci /* Row L */ 12268c2ecf20Sopenharmony_ci PINCTRL_PIN(200, "L1 IDE CS0 N"), 12278c2ecf20Sopenharmony_ci PINCTRL_PIN(201, "L2 IDE DA0"), 12288c2ecf20Sopenharmony_ci PINCTRL_PIN(202, "L3 AVCCK 3"), 12298c2ecf20Sopenharmony_ci PINCTRL_PIN(203, "L4 AGND"), 12308c2ecf20Sopenharmony_ci PINCTRL_PIN(204, "L5 IDE DIOR N"), 12318c2ecf20Sopenharmony_ci PINCTRL_PIN(205, "L6 V1"), 12328c2ecf20Sopenharmony_ci PINCTRL_PIN(206, "L7 V1"), 12338c2ecf20Sopenharmony_ci PINCTRL_PIN(207, "L8 GND"), 12348c2ecf20Sopenharmony_ci PINCTRL_PIN(208, "L9 GND"), 12358c2ecf20Sopenharmony_ci PINCTRL_PIN(209, "L10 GND"), 12368c2ecf20Sopenharmony_ci PINCTRL_PIN(210, "L11 GND"), 12378c2ecf20Sopenharmony_ci PINCTRL_PIN(211, "L12 GND"), 12388c2ecf20Sopenharmony_ci PINCTRL_PIN(212, "L13 GND"), 12398c2ecf20Sopenharmony_ci PINCTRL_PIN(213, "L14 V1"), 12408c2ecf20Sopenharmony_ci PINCTRL_PIN(214, "L15 V1"), 12418c2ecf20Sopenharmony_ci PINCTRL_PIN(215, "L16 PCI AD12"), 12428c2ecf20Sopenharmony_ci PINCTRL_PIN(216, "L17 PCI AD13"), 12438c2ecf20Sopenharmony_ci PINCTRL_PIN(217, "L18 PCI AD14"), 12448c2ecf20Sopenharmony_ci PINCTRL_PIN(218, "L19 PCI AD15"), 12458c2ecf20Sopenharmony_ci PINCTRL_PIN(219, "L20 PCI CBE1 N"), 12468c2ecf20Sopenharmony_ci /* Row M */ 12478c2ecf20Sopenharmony_ci PINCTRL_PIN(220, "M1 IDE DA1"), 12488c2ecf20Sopenharmony_ci PINCTRL_PIN(221, "M2 IDE CS1 N"), 12498c2ecf20Sopenharmony_ci PINCTRL_PIN(222, "M3 IDE DA2"), 12508c2ecf20Sopenharmony_ci PINCTRL_PIN(223, "M4 IDE DMACK N"), 12518c2ecf20Sopenharmony_ci PINCTRL_PIN(224, "M5 IDE DD1"), 12528c2ecf20Sopenharmony_ci PINCTRL_PIN(225, "M6 VCC3IOHA"), 12538c2ecf20Sopenharmony_ci PINCTRL_PIN(226, "M7 V1"), 12548c2ecf20Sopenharmony_ci PINCTRL_PIN(227, "M8 GND"), 12558c2ecf20Sopenharmony_ci PINCTRL_PIN(228, "M9 GND"), 12568c2ecf20Sopenharmony_ci PINCTRL_PIN(229, "M10 GND"), 12578c2ecf20Sopenharmony_ci PINCTRL_PIN(230, "M11 GND"), 12588c2ecf20Sopenharmony_ci PINCTRL_PIN(231, "M12 GND"), 12598c2ecf20Sopenharmony_ci PINCTRL_PIN(232, "M13 GND"), 12608c2ecf20Sopenharmony_ci PINCTRL_PIN(233, "M14 V1"), 12618c2ecf20Sopenharmony_ci PINCTRL_PIN(234, "M15 VCC3IOHA"), 12628c2ecf20Sopenharmony_ci PINCTRL_PIN(235, "M16 PCI AD7"), 12638c2ecf20Sopenharmony_ci PINCTRL_PIN(236, "M17 PCI AD6"), 12648c2ecf20Sopenharmony_ci PINCTRL_PIN(237, "M18 PCI AD9"), 12658c2ecf20Sopenharmony_ci PINCTRL_PIN(238, "M19 PCI AD10"), 12668c2ecf20Sopenharmony_ci PINCTRL_PIN(239, "M20 PCI AD11"), 12678c2ecf20Sopenharmony_ci /* Row N */ 12688c2ecf20Sopenharmony_ci PINCTRL_PIN(240, "N1 IDE IORDY"), 12698c2ecf20Sopenharmony_ci PINCTRL_PIN(241, "N2 IDE INTRQ"), 12708c2ecf20Sopenharmony_ci PINCTRL_PIN(242, "N3 IDE DIOW N"), 12718c2ecf20Sopenharmony_ci PINCTRL_PIN(243, "N4 IDE DD15"), 12728c2ecf20Sopenharmony_ci PINCTRL_PIN(244, "N5 IDE DMARQ"), 12738c2ecf20Sopenharmony_ci PINCTRL_PIN(245, "N6 VCC3IOHA"), 12748c2ecf20Sopenharmony_ci PINCTRL_PIN(246, "N7 VCC3IOHA"), 12758c2ecf20Sopenharmony_ci PINCTRL_PIN(247, "N8 GND"), 12768c2ecf20Sopenharmony_ci PINCTRL_PIN(248, "N9 GND"), 12778c2ecf20Sopenharmony_ci PINCTRL_PIN(249, "N10 GND"), 12788c2ecf20Sopenharmony_ci PINCTRL_PIN(250, "N11 GND"), 12798c2ecf20Sopenharmony_ci PINCTRL_PIN(251, "N12 GND"), 12808c2ecf20Sopenharmony_ci PINCTRL_PIN(252, "N13 GND"), 12818c2ecf20Sopenharmony_ci PINCTRL_PIN(253, "N14 VCC3IOHA"), 12828c2ecf20Sopenharmony_ci PINCTRL_PIN(254, "N15 VCC3IOHA"), 12838c2ecf20Sopenharmony_ci PINCTRL_PIN(255, "N16 PCI CLKRUN N"), 12848c2ecf20Sopenharmony_ci PINCTRL_PIN(256, "N17 PCI AD0"), 12858c2ecf20Sopenharmony_ci PINCTRL_PIN(257, "N18 PCI AD4"), 12868c2ecf20Sopenharmony_ci PINCTRL_PIN(258, "N19 PCI CBE0 N"), 12878c2ecf20Sopenharmony_ci PINCTRL_PIN(259, "N20 PCI AD8"), 12888c2ecf20Sopenharmony_ci /* Row P (for some reason O is skipped) */ 12898c2ecf20Sopenharmony_ci PINCTRL_PIN(260, "P1 IDE DD0"), 12908c2ecf20Sopenharmony_ci PINCTRL_PIN(261, "P2 IDE DD14"), 12918c2ecf20Sopenharmony_ci PINCTRL_PIN(262, "P3 IDE DD2"), 12928c2ecf20Sopenharmony_ci PINCTRL_PIN(263, "P4 IDE DD4"), 12938c2ecf20Sopenharmony_ci PINCTRL_PIN(264, "P5 IDE DD3"), 12948c2ecf20Sopenharmony_ci PINCTRL_PIN(265, "P6 VCC3IOHA"), 12958c2ecf20Sopenharmony_ci PINCTRL_PIN(266, "P7 GND"), 12968c2ecf20Sopenharmony_ci PINCTRL_PIN(267, "P8 VCC2IOHA 1"), 12978c2ecf20Sopenharmony_ci PINCTRL_PIN(268, "P9 V1"), 12988c2ecf20Sopenharmony_ci PINCTRL_PIN(269, "P10 V1"), 12998c2ecf20Sopenharmony_ci PINCTRL_PIN(270, "P11 V1"), 13008c2ecf20Sopenharmony_ci PINCTRL_PIN(271, "P12 V1"), 13018c2ecf20Sopenharmony_ci PINCTRL_PIN(272, "P13 VCC3IOHA"), 13028c2ecf20Sopenharmony_ci PINCTRL_PIN(273, "P14 GND"), 13038c2ecf20Sopenharmony_ci PINCTRL_PIN(274, "P15 VCC3IOHA"), 13048c2ecf20Sopenharmony_ci PINCTRL_PIN(275, "P16 GPIO0 30"), 13058c2ecf20Sopenharmony_ci PINCTRL_PIN(276, "P17 GPIO0 28"), 13068c2ecf20Sopenharmony_ci PINCTRL_PIN(277, "P18 PCI AD1"), 13078c2ecf20Sopenharmony_ci PINCTRL_PIN(278, "P19 PCI AD3"), 13088c2ecf20Sopenharmony_ci PINCTRL_PIN(279, "P20 PCI AD5"), 13098c2ecf20Sopenharmony_ci /* Row R (for some reason Q us skipped) */ 13108c2ecf20Sopenharmony_ci PINCTRL_PIN(280, "R1 IDE DD13"), 13118c2ecf20Sopenharmony_ci PINCTRL_PIN(281, "R2 IDE DD12"), 13128c2ecf20Sopenharmony_ci PINCTRL_PIN(282, "R3 IDE DD10"), 13138c2ecf20Sopenharmony_ci PINCTRL_PIN(283, "R4 IDE DD6"), 13148c2ecf20Sopenharmony_ci PINCTRL_PIN(284, "R5 ICE0 IDI"), 13158c2ecf20Sopenharmony_ci PINCTRL_PIN(285, "R6 GND"), 13168c2ecf20Sopenharmony_ci PINCTRL_PIN(286, "R7 VCC2IOHA 1"), 13178c2ecf20Sopenharmony_ci PINCTRL_PIN(287, "R8 VCC2IOHA 1"), 13188c2ecf20Sopenharmony_ci PINCTRL_PIN(288, "R9 VCC2IOHA 1"), 13198c2ecf20Sopenharmony_ci PINCTRL_PIN(289, "R10 V1"), 13208c2ecf20Sopenharmony_ci PINCTRL_PIN(290, "R11 V1"), 13218c2ecf20Sopenharmony_ci PINCTRL_PIN(291, "R12 VCC3IOHA"), 13228c2ecf20Sopenharmony_ci PINCTRL_PIN(292, "R13 VCC3IOHA"), 13238c2ecf20Sopenharmony_ci PINCTRL_PIN(293, "R14 VCC3IOHA"), 13248c2ecf20Sopenharmony_ci PINCTRL_PIN(294, "R15 GND"), 13258c2ecf20Sopenharmony_ci PINCTRL_PIN(295, "R16 GPIO0 23"), 13268c2ecf20Sopenharmony_ci PINCTRL_PIN(296, "R17 GPIO0 21"), 13278c2ecf20Sopenharmony_ci PINCTRL_PIN(297, "R18 GPIO0 26"), 13288c2ecf20Sopenharmony_ci PINCTRL_PIN(298, "R19 GPIO0 31"), 13298c2ecf20Sopenharmony_ci PINCTRL_PIN(299, "R20 PCI AD2"), 13308c2ecf20Sopenharmony_ci /* Row T (for some reason S is skipped) */ 13318c2ecf20Sopenharmony_ci PINCTRL_PIN(300, "T1 IDE DD11"), 13328c2ecf20Sopenharmony_ci PINCTRL_PIN(301, "T2 IDE DD5"), 13338c2ecf20Sopenharmony_ci PINCTRL_PIN(302, "T3 IDE DD8"), 13348c2ecf20Sopenharmony_ci PINCTRL_PIN(303, "T4 ICE0 IDO"), 13358c2ecf20Sopenharmony_ci PINCTRL_PIN(304, "T5 GND"), 13368c2ecf20Sopenharmony_ci PINCTRL_PIN(305, "T6 USB GNDA U20"), 13378c2ecf20Sopenharmony_ci PINCTRL_PIN(306, "T7 GMAC0 TXD0"), 13388c2ecf20Sopenharmony_ci PINCTRL_PIN(307, "T8 GMAC0 TXEN"), 13398c2ecf20Sopenharmony_ci PINCTRL_PIN(308, "T9 GMAC1 TXD3"), 13408c2ecf20Sopenharmony_ci PINCTRL_PIN(309, "T10 GMAC1 RXDV"), 13418c2ecf20Sopenharmony_ci PINCTRL_PIN(310, "T11 GMAC1 RXD2"), 13428c2ecf20Sopenharmony_ci PINCTRL_PIN(311, "T12 GPIO1 29"), 13438c2ecf20Sopenharmony_ci PINCTRL_PIN(312, "T13 GPIO0 3"), 13448c2ecf20Sopenharmony_ci PINCTRL_PIN(313, "T14 GPIO0 9"), 13458c2ecf20Sopenharmony_ci PINCTRL_PIN(314, "T15 GPIO0 16"), 13468c2ecf20Sopenharmony_ci PINCTRL_PIN(315, "T16 GND"), 13478c2ecf20Sopenharmony_ci PINCTRL_PIN(316, "T17 GPIO0 14"), 13488c2ecf20Sopenharmony_ci PINCTRL_PIN(317, "T18 GPIO0 19"), 13498c2ecf20Sopenharmony_ci PINCTRL_PIN(318, "T19 GPIO0 27"), 13508c2ecf20Sopenharmony_ci PINCTRL_PIN(319, "T20 GPIO0 29"), 13518c2ecf20Sopenharmony_ci /* Row U */ 13528c2ecf20Sopenharmony_ci PINCTRL_PIN(320, "U1 IDE DD9"), 13538c2ecf20Sopenharmony_ci PINCTRL_PIN(321, "U2 IDE DD7"), 13548c2ecf20Sopenharmony_ci PINCTRL_PIN(322, "U3 ICE0 ICK"), 13558c2ecf20Sopenharmony_ci PINCTRL_PIN(323, "U4 GND"), 13568c2ecf20Sopenharmony_ci PINCTRL_PIN(324, "U5 USB XSCO"), 13578c2ecf20Sopenharmony_ci PINCTRL_PIN(325, "U6 GMAC0 TXD1"), 13588c2ecf20Sopenharmony_ci PINCTRL_PIN(326, "U7 GMAC0 TXD3"), 13598c2ecf20Sopenharmony_ci PINCTRL_PIN(327, "U8 GMAC0 TXC"), 13608c2ecf20Sopenharmony_ci PINCTRL_PIN(328, "U9 GMAC0 RXD3"), 13618c2ecf20Sopenharmony_ci PINCTRL_PIN(329, "U10 GMAC1 TXD0"), 13628c2ecf20Sopenharmony_ci PINCTRL_PIN(330, "U11 GMAC1 CRS"), 13638c2ecf20Sopenharmony_ci PINCTRL_PIN(331, "U12 EXT CLK"), 13648c2ecf20Sopenharmony_ci PINCTRL_PIN(332, "U13 DEV DEF"), 13658c2ecf20Sopenharmony_ci PINCTRL_PIN(333, "U14 GPIO0 0"), 13668c2ecf20Sopenharmony_ci PINCTRL_PIN(334, "U15 GPIO0 4"), 13678c2ecf20Sopenharmony_ci PINCTRL_PIN(335, "U16 GPIO0 10"), 13688c2ecf20Sopenharmony_ci PINCTRL_PIN(336, "U17 GND"), 13698c2ecf20Sopenharmony_ci PINCTRL_PIN(337, "U18 GPIO0 17"), 13708c2ecf20Sopenharmony_ci PINCTRL_PIN(338, "U19 GPIO0 22"), 13718c2ecf20Sopenharmony_ci PINCTRL_PIN(339, "U20 GPIO0 25"), 13728c2ecf20Sopenharmony_ci /* Row V */ 13738c2ecf20Sopenharmony_ci PINCTRL_PIN(340, "V1 ICE0 DBGACK"), 13748c2ecf20Sopenharmony_ci PINCTRL_PIN(341, "V2 ICE0 DBGRQ"), 13758c2ecf20Sopenharmony_ci PINCTRL_PIN(342, "V3 GND"), 13768c2ecf20Sopenharmony_ci PINCTRL_PIN(343, "V4 ICE0 IRST N"), 13778c2ecf20Sopenharmony_ci PINCTRL_PIN(344, "V5 USB XSCI"), 13788c2ecf20Sopenharmony_ci PINCTRL_PIN(345, "V6 GMAC0 COL"), 13798c2ecf20Sopenharmony_ci PINCTRL_PIN(346, "V7 GMAC0 TXD2"), 13808c2ecf20Sopenharmony_ci PINCTRL_PIN(347, "V8 GMAC0 RXDV"), 13818c2ecf20Sopenharmony_ci PINCTRL_PIN(348, "V9 GMAC0 RXD1"), 13828c2ecf20Sopenharmony_ci PINCTRL_PIN(349, "V10 GMAC1 COL"), 13838c2ecf20Sopenharmony_ci PINCTRL_PIN(350, "V11 GMAC1 TXC"), 13848c2ecf20Sopenharmony_ci PINCTRL_PIN(351, "V12 GMAC1 RXD1"), 13858c2ecf20Sopenharmony_ci PINCTRL_PIN(352, "V13 MODE SEL1"), 13868c2ecf20Sopenharmony_ci PINCTRL_PIN(353, "V14 GPIO1 28"), 13878c2ecf20Sopenharmony_ci PINCTRL_PIN(354, "V15 GPIO0 1"), 13888c2ecf20Sopenharmony_ci PINCTRL_PIN(355, "V16 GPIO0 8"), 13898c2ecf20Sopenharmony_ci PINCTRL_PIN(356, "V17 GPIO0 11"), 13908c2ecf20Sopenharmony_ci PINCTRL_PIN(357, "V18 GND"), 13918c2ecf20Sopenharmony_ci PINCTRL_PIN(358, "V19 GPIO0 18"), 13928c2ecf20Sopenharmony_ci PINCTRL_PIN(359, "V20 GPIO0 24"), 13938c2ecf20Sopenharmony_ci /* Row W */ 13948c2ecf20Sopenharmony_ci PINCTRL_PIN(360, "W1 IDE RESET N"), 13958c2ecf20Sopenharmony_ci PINCTRL_PIN(361, "W2 GND"), 13968c2ecf20Sopenharmony_ci PINCTRL_PIN(362, "W3 USB0 VCCHSRT"), 13978c2ecf20Sopenharmony_ci PINCTRL_PIN(363, "W4 USB0 DP"), 13988c2ecf20Sopenharmony_ci PINCTRL_PIN(364, "W5 USB VCCA U20"), 13998c2ecf20Sopenharmony_ci PINCTRL_PIN(365, "W6 USB1 DP"), 14008c2ecf20Sopenharmony_ci PINCTRL_PIN(366, "W7 USB1 GNDHSRT"), 14018c2ecf20Sopenharmony_ci PINCTRL_PIN(367, "W8 GMAC0 RXD0"), 14028c2ecf20Sopenharmony_ci PINCTRL_PIN(368, "W9 GMAC0 CRS"), 14038c2ecf20Sopenharmony_ci PINCTRL_PIN(369, "W10 GMAC1 TXD2"), 14048c2ecf20Sopenharmony_ci PINCTRL_PIN(370, "W11 GMAC1 TXEN"), 14058c2ecf20Sopenharmony_ci PINCTRL_PIN(371, "W12 GMAC1 RXD3"), 14068c2ecf20Sopenharmony_ci PINCTRL_PIN(372, "W13 MODE SEL0"), 14078c2ecf20Sopenharmony_ci PINCTRL_PIN(373, "W14 MODE SEL3"), 14088c2ecf20Sopenharmony_ci PINCTRL_PIN(374, "W15 GPIO1 31"), 14098c2ecf20Sopenharmony_ci PINCTRL_PIN(375, "W16 GPIO0 5"), 14108c2ecf20Sopenharmony_ci PINCTRL_PIN(376, "W17 GPIO0 7"), 14118c2ecf20Sopenharmony_ci PINCTRL_PIN(377, "W18 GPIO0 12"), 14128c2ecf20Sopenharmony_ci PINCTRL_PIN(378, "W19 GND"), 14138c2ecf20Sopenharmony_ci PINCTRL_PIN(379, "W20 GPIO0 20"), 14148c2ecf20Sopenharmony_ci /* Row Y */ 14158c2ecf20Sopenharmony_ci PINCTRL_PIN(380, "Y1 ICE0 IMS"), 14168c2ecf20Sopenharmony_ci PINCTRL_PIN(381, "Y2 USB0 GNDHSRT"), 14178c2ecf20Sopenharmony_ci PINCTRL_PIN(382, "Y3 USB0 DM"), 14188c2ecf20Sopenharmony_ci PINCTRL_PIN(383, "Y4 USB RREF"), 14198c2ecf20Sopenharmony_ci PINCTRL_PIN(384, "Y5 USB1 DM"), 14208c2ecf20Sopenharmony_ci PINCTRL_PIN(385, "Y6 USB1 VCCHSRT"), 14218c2ecf20Sopenharmony_ci PINCTRL_PIN(386, "Y7 GMAC0 RXC"), 14228c2ecf20Sopenharmony_ci PINCTRL_PIN(387, "Y8 GMAC0 RXD2"), 14238c2ecf20Sopenharmony_ci PINCTRL_PIN(388, "Y9 REF CLK"), 14248c2ecf20Sopenharmony_ci PINCTRL_PIN(389, "Y10 GMAC1 TXD1"), 14258c2ecf20Sopenharmony_ci PINCTRL_PIN(390, "Y11 GMAC1 RXC"), 14268c2ecf20Sopenharmony_ci PINCTRL_PIN(391, "Y12 GMAC1 RXD0"), 14278c2ecf20Sopenharmony_ci PINCTRL_PIN(392, "Y13 M30 CLK"), 14288c2ecf20Sopenharmony_ci PINCTRL_PIN(393, "Y14 MODE SEL2"), 14298c2ecf20Sopenharmony_ci PINCTRL_PIN(394, "Y15 GPIO1 30"), 14308c2ecf20Sopenharmony_ci PINCTRL_PIN(395, "Y16 GPIO0 2"), 14318c2ecf20Sopenharmony_ci PINCTRL_PIN(396, "Y17 GPIO0 6"), 14328c2ecf20Sopenharmony_ci PINCTRL_PIN(397, "Y18 SYS RESET N"), 14338c2ecf20Sopenharmony_ci PINCTRL_PIN(398, "Y19 GPIO0 13"), 14348c2ecf20Sopenharmony_ci PINCTRL_PIN(399, "Y20 GPIO0 15"), 14358c2ecf20Sopenharmony_ci}; 14368c2ecf20Sopenharmony_ci 14378c2ecf20Sopenharmony_ci/* Digital ground */ 14388c2ecf20Sopenharmony_cistatic const unsigned int gnd_3516_pins[] = { 14398c2ecf20Sopenharmony_ci 21, 38, 42, 57, 63, 76, 84, 95, 105, 114, 126, 133, 147, 148, 149, 150, 14408c2ecf20Sopenharmony_ci 151, 152, 167, 168, 169, 170, 171, 172, 187, 188, 189, 190, 191, 192, 14418c2ecf20Sopenharmony_ci 207, 208, 209, 210, 211, 212, 227, 228, 229, 230, 231, 232, 247, 248, 14428c2ecf20Sopenharmony_ci 249, 250, 251, 252, 266, 273, 285, 294, 304, 315, 323, 336, 342, 357, 14438c2ecf20Sopenharmony_ci 361, 378 14448c2ecf20Sopenharmony_ci}; 14458c2ecf20Sopenharmony_ci 14468c2ecf20Sopenharmony_cistatic const unsigned int dram_3516_pins[] = { 14478c2ecf20Sopenharmony_ci 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 23, 24, 25, 26, 14488c2ecf20Sopenharmony_ci 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 44, 45, 46, 47, 48, 49, 50, 14498c2ecf20Sopenharmony_ci 51, 52, 53, 54, 55, 56, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 14508c2ecf20Sopenharmony_ci 87, 88, 89, 90, 91, 92, 93, 94 14518c2ecf20Sopenharmony_ci}; 14528c2ecf20Sopenharmony_ci 14538c2ecf20Sopenharmony_cistatic const unsigned int rtc_3516_pins[] = { 0, 43, 22 }; 14548c2ecf20Sopenharmony_ci 14558c2ecf20Sopenharmony_cistatic const unsigned int power_3516_pins[] = { 20, 83, 40, 41, 60, 61, 62 }; 14568c2ecf20Sopenharmony_ci 14578c2ecf20Sopenharmony_cistatic const unsigned int cir_3516_pins[] = { 85, 64, 82 }; 14588c2ecf20Sopenharmony_ci 14598c2ecf20Sopenharmony_cistatic const unsigned int system_3516_pins[] = { 14608c2ecf20Sopenharmony_ci 332, 392, 372, 373, 393, 352, 331, 388, 397, 77 14618c2ecf20Sopenharmony_ci}; 14628c2ecf20Sopenharmony_ci 14638c2ecf20Sopenharmony_cistatic const unsigned int vcontrol_3516_pins[] = { 86, 81, 80 }; 14648c2ecf20Sopenharmony_ci 14658c2ecf20Sopenharmony_cistatic const unsigned int ice_3516_pins[] = { 340, 341, 303, 322, 380, 284, 343 }; 14668c2ecf20Sopenharmony_ci 14678c2ecf20Sopenharmony_cistatic const unsigned int ide_3516_pins[] = { 14688c2ecf20Sopenharmony_ci 200, 201, 204, 220, 221, 222, 223, 224, 240, 241, 242, 243, 244, 260, 14698c2ecf20Sopenharmony_ci 261, 262, 263, 264, 280, 281, 282, 283, 300, 301, 302, 320, 321, 360 14708c2ecf20Sopenharmony_ci}; 14718c2ecf20Sopenharmony_ci 14728c2ecf20Sopenharmony_cistatic const unsigned int sata_3516_pins[] = { 14738c2ecf20Sopenharmony_ci 100, 101, 102, 103, 104, 120, 121, 122, 123, 124, 140, 141, 142, 143, 14748c2ecf20Sopenharmony_ci 144, 160, 161, 162, 163, 180, 181, 182, 183, 202 14758c2ecf20Sopenharmony_ci}; 14768c2ecf20Sopenharmony_ci 14778c2ecf20Sopenharmony_cistatic const unsigned int usb_3516_pins[] = { 14788c2ecf20Sopenharmony_ci 305, 324, 344, 362, 363, 364, 365, 366, 381, 382, 383, 384, 385 14798c2ecf20Sopenharmony_ci}; 14808c2ecf20Sopenharmony_ci 14818c2ecf20Sopenharmony_ci/* GMII, ethernet pins */ 14828c2ecf20Sopenharmony_cistatic const unsigned int gmii_gmac0_3516_pins[] = { 14838c2ecf20Sopenharmony_ci 306, 307, 325, 326, 327, 328, 345, 346, 347, 348, 367, 368, 386, 387 14848c2ecf20Sopenharmony_ci}; 14858c2ecf20Sopenharmony_ci 14868c2ecf20Sopenharmony_cistatic const unsigned int gmii_gmac1_3516_pins[] = { 14878c2ecf20Sopenharmony_ci 308, 309, 310, 329, 330, 349, 350, 351, 369, 370, 371, 389, 390, 391 14888c2ecf20Sopenharmony_ci}; 14898c2ecf20Sopenharmony_ci 14908c2ecf20Sopenharmony_cistatic const unsigned int pci_3516_pins[] = { 14918c2ecf20Sopenharmony_ci 17, 18, 19, 39, 58, 59, 78, 79, 96, 97, 98, 99, 115, 116, 117, 118, 14928c2ecf20Sopenharmony_ci 119, 135, 136, 137, 138, 139, 155, 156, 157, 158, 159, 175, 176, 177, 14938c2ecf20Sopenharmony_ci 178, 179, 195, 196, 197, 198, 199, 215, 216, 217, 218, 219, 235, 236, 14948c2ecf20Sopenharmony_ci 237, 238, 239, 255, 256, 257, 258, 259, 277, 278, 279, 299 14958c2ecf20Sopenharmony_ci}; 14968c2ecf20Sopenharmony_ci 14978c2ecf20Sopenharmony_ci/* 14988c2ecf20Sopenharmony_ci * Apparently the LPC interface is using the PCICLK for the clocking so 14998c2ecf20Sopenharmony_ci * PCI needs to be active at the same time. 15008c2ecf20Sopenharmony_ci */ 15018c2ecf20Sopenharmony_cistatic const unsigned int lpc_3516_pins[] = { 15028c2ecf20Sopenharmony_ci 355, /* LPC_LAD[0] */ 15038c2ecf20Sopenharmony_ci 356, /* LPC_SERIRQ */ 15048c2ecf20Sopenharmony_ci 377, /* LPC_LAD[2] */ 15058c2ecf20Sopenharmony_ci 398, /* LPC_LFRAME# */ 15068c2ecf20Sopenharmony_ci 316, /* LPC_LAD[3] */ 15078c2ecf20Sopenharmony_ci 399, /* LPC_LAD[1] */ 15088c2ecf20Sopenharmony_ci}; 15098c2ecf20Sopenharmony_ci 15108c2ecf20Sopenharmony_ci/* Character LCD */ 15118c2ecf20Sopenharmony_cistatic const unsigned int lcd_3516_pins[] = { 15128c2ecf20Sopenharmony_ci 391, 351, 310, 371, 353, 311, 394, 374, 314, 359, 339 15138c2ecf20Sopenharmony_ci}; 15148c2ecf20Sopenharmony_ci 15158c2ecf20Sopenharmony_cistatic const unsigned int ssp_3516_pins[] = { 15168c2ecf20Sopenharmony_ci 355, /* SSP_97RST# SSP AC97 Reset, active low */ 15178c2ecf20Sopenharmony_ci 356, /* SSP_FSC */ 15188c2ecf20Sopenharmony_ci 377, /* SSP_ECLK */ 15198c2ecf20Sopenharmony_ci 398, /* SSP_TXD */ 15208c2ecf20Sopenharmony_ci 316, /* SSP_RXD */ 15218c2ecf20Sopenharmony_ci 399, /* SSP_SCLK */ 15228c2ecf20Sopenharmony_ci}; 15238c2ecf20Sopenharmony_ci 15248c2ecf20Sopenharmony_cistatic const unsigned int uart_rxtx_3516_pins[] = { 15258c2ecf20Sopenharmony_ci 313, /* UART_SIN serial input, RX */ 15268c2ecf20Sopenharmony_ci 335, /* UART_SOUT serial output, TX */ 15278c2ecf20Sopenharmony_ci}; 15288c2ecf20Sopenharmony_ci 15298c2ecf20Sopenharmony_cistatic const unsigned int uart_modem_3516_pins[] = { 15308c2ecf20Sopenharmony_ci 355, /* UART_NDCD DCD carrier detect */ 15318c2ecf20Sopenharmony_ci 356, /* UART_NDTR DTR data terminal ready */ 15328c2ecf20Sopenharmony_ci 377, /* UART_NDSR DSR data set ready */ 15338c2ecf20Sopenharmony_ci 398, /* UART_NRTS RTS request to send */ 15348c2ecf20Sopenharmony_ci 316, /* UART_NCTS CTS clear to send */ 15358c2ecf20Sopenharmony_ci 399, /* UART_NRI RI ring indicator */ 15368c2ecf20Sopenharmony_ci}; 15378c2ecf20Sopenharmony_ci 15388c2ecf20Sopenharmony_cistatic const unsigned int tvc_3516_pins[] = { 15398c2ecf20Sopenharmony_ci 353, /* TVC_DATA[0] */ 15408c2ecf20Sopenharmony_ci 311, /* TVC_DATA[1] */ 15418c2ecf20Sopenharmony_ci 394, /* TVC_DATA[2] */ 15428c2ecf20Sopenharmony_ci 374, /* TVC_DATA[3] */ 15438c2ecf20Sopenharmony_ci 354, /* TVC_DATA[4] */ 15448c2ecf20Sopenharmony_ci 395, /* TVC_DATA[5] */ 15458c2ecf20Sopenharmony_ci 312, /* TVC_DATA[6] */ 15468c2ecf20Sopenharmony_ci 334, /* TVC_DATA[7] */ 15478c2ecf20Sopenharmony_ci}; 15488c2ecf20Sopenharmony_ci 15498c2ecf20Sopenharmony_cistatic const unsigned int tvc_clk_3516_pins[] = { 15508c2ecf20Sopenharmony_ci 333, /* TVC_CLK */ 15518c2ecf20Sopenharmony_ci}; 15528c2ecf20Sopenharmony_ci 15538c2ecf20Sopenharmony_ci/* NAND flash pins */ 15548c2ecf20Sopenharmony_cistatic const unsigned int nflash_3516_pins[] = { 15558c2ecf20Sopenharmony_ci 243, 260, 261, 224, 280, 262, 281, 264, 300, 263, 282, 301, 320, 283, 15568c2ecf20Sopenharmony_ci 302, 321, 337, 358, 295, 359, 339, 275, 298 15578c2ecf20Sopenharmony_ci}; 15588c2ecf20Sopenharmony_ci 15598c2ecf20Sopenharmony_ci/* Parallel (NOR) flash pins, D[0-15], A[16-25], CE0, CE1, RB, WE, OE, ALE */ 15608c2ecf20Sopenharmony_cistatic const unsigned int pflash_3516_pins[] = { 15618c2ecf20Sopenharmony_ci 221, 200, 222, 201, 220, 243, 260, 261, 224, 280, 262, 281, 264, 300, 15628c2ecf20Sopenharmony_ci 263, 282, 301, 320, 283, 302, 321, 317, 379, 295, 359, 339, 297, 318, 15638c2ecf20Sopenharmony_ci 276, 319, 275, 298 15648c2ecf20Sopenharmony_ci}; 15658c2ecf20Sopenharmony_ci 15668c2ecf20Sopenharmony_ci/* 15678c2ecf20Sopenharmony_ci * The parallel flash can be set up in a 26-bit address bus mode exposing 15688c2ecf20Sopenharmony_ci * A[0-15] (A[15] takes the place of ALE), but it has the 15698c2ecf20Sopenharmony_ci * side effect of stealing pins from GMAC1 and TVC so these blocks cannot be 15708c2ecf20Sopenharmony_ci * used at the same time. 15718c2ecf20Sopenharmony_ci */ 15728c2ecf20Sopenharmony_cistatic const unsigned int pflash_3516_pins_extended[] = { 15738c2ecf20Sopenharmony_ci 221, 200, 222, 201, 220, 243, 260, 261, 224, 280, 262, 281, 264, 300, 15748c2ecf20Sopenharmony_ci 263, 282, 301, 320, 283, 302, 321, 317, 379, 295, 359, 339, 297, 318, 15758c2ecf20Sopenharmony_ci 276, 319, 275, 298, 15768c2ecf20Sopenharmony_ci /* The extra pins */ 15778c2ecf20Sopenharmony_ci 349, 308, 369, 389, 329, 350, 370, 309, 390, 391, 351, 310, 371, 330, 15788c2ecf20Sopenharmony_ci 333 15798c2ecf20Sopenharmony_ci}; 15808c2ecf20Sopenharmony_ci 15818c2ecf20Sopenharmony_ci/* Serial flash pins CE0, CE1, DI, DO, CK */ 15828c2ecf20Sopenharmony_cistatic const unsigned int sflash_3516_pins[] = { 296, 338, 295, 359, 339 }; 15838c2ecf20Sopenharmony_ci 15848c2ecf20Sopenharmony_ci/* The GPIO0A (0-4) pins overlap with TVC and extended parallel flash */ 15858c2ecf20Sopenharmony_cistatic const unsigned int gpio0a_3516_pins[] = { 354, 395, 312, 334 }; 15868c2ecf20Sopenharmony_ci 15878c2ecf20Sopenharmony_ci/* The GPIO0B (5-7) pins overlap with ICE */ 15888c2ecf20Sopenharmony_cistatic const unsigned int gpio0b_3516_pins[] = { 375, 396, 376 }; 15898c2ecf20Sopenharmony_ci 15908c2ecf20Sopenharmony_ci/* The GPIO0C (8,11-15) pins overlap with LPC, UART and SSP */ 15918c2ecf20Sopenharmony_cistatic const unsigned int gpio0c_3516_pins[] = { 355, 356, 377, 398, 316, 399 }; 15928c2ecf20Sopenharmony_ci 15938c2ecf20Sopenharmony_ci/* The GPIO0D (9,10) pins overlap with UART RX/TX */ 15948c2ecf20Sopenharmony_cistatic const unsigned int gpio0d_3516_pins[] = { 313, 335 }; 15958c2ecf20Sopenharmony_ci 15968c2ecf20Sopenharmony_ci/* The GPIO0E (16) pins overlap with LCD */ 15978c2ecf20Sopenharmony_cistatic const unsigned int gpio0e_3516_pins[] = { 314 }; 15988c2ecf20Sopenharmony_ci 15998c2ecf20Sopenharmony_ci/* The GPIO0F (17,18) pins overlap with NAND flash CE0, CE1 */ 16008c2ecf20Sopenharmony_cistatic const unsigned int gpio0f_3516_pins[] = { 337, 358 }; 16018c2ecf20Sopenharmony_ci 16028c2ecf20Sopenharmony_ci/* The GPIO0G (19,20,26-29) pins overlap with parallel flash */ 16038c2ecf20Sopenharmony_cistatic const unsigned int gpio0g_3516_pins[] = { 317, 379, 297, 318, 276, 319 }; 16048c2ecf20Sopenharmony_ci 16058c2ecf20Sopenharmony_ci/* The GPIO0H (21,22) pins overlap with serial flash CE0, CE1 */ 16068c2ecf20Sopenharmony_cistatic const unsigned int gpio0h_3516_pins[] = { 296, 338 }; 16078c2ecf20Sopenharmony_ci 16088c2ecf20Sopenharmony_ci/* The GPIO0I (23) pins overlap with all flash */ 16098c2ecf20Sopenharmony_cistatic const unsigned int gpio0i_3516_pins[] = { 295 }; 16108c2ecf20Sopenharmony_ci 16118c2ecf20Sopenharmony_ci/* The GPIO0J (24,25) pins overlap with all flash and LCD */ 16128c2ecf20Sopenharmony_cistatic const unsigned int gpio0j_3516_pins[] = { 359, 339 }; 16138c2ecf20Sopenharmony_ci 16148c2ecf20Sopenharmony_ci/* The GPIO0K (30,31) pins overlap with NAND flash */ 16158c2ecf20Sopenharmony_cistatic const unsigned int gpio0k_3516_pins[] = { 275, 298 }; 16168c2ecf20Sopenharmony_ci 16178c2ecf20Sopenharmony_ci/* The GPIO0L (0) pins overlap with TVC_CLK */ 16188c2ecf20Sopenharmony_cistatic const unsigned int gpio0l_3516_pins[] = { 333 }; 16198c2ecf20Sopenharmony_ci 16208c2ecf20Sopenharmony_ci/* The GPIO1A (0-4) pins that overlap with IDE and parallel flash */ 16218c2ecf20Sopenharmony_cistatic const unsigned int gpio1a_3516_pins[] = { 221, 200, 222, 201, 220 }; 16228c2ecf20Sopenharmony_ci 16238c2ecf20Sopenharmony_ci/* The GPIO1B (5-10,27) pins overlap with just IDE */ 16248c2ecf20Sopenharmony_cistatic const unsigned int gpio1b_3516_pins[] = { 241, 223, 240, 204, 242, 244, 360 }; 16258c2ecf20Sopenharmony_ci 16268c2ecf20Sopenharmony_ci/* The GPIO1C (11-26) pins overlap with IDE, parallel flash and NAND flash */ 16278c2ecf20Sopenharmony_cistatic const unsigned int gpio1c_3516_pins[] = { 16288c2ecf20Sopenharmony_ci 243, 260, 261, 224, 280, 262, 281, 264, 300, 263, 282, 301, 320, 283, 16298c2ecf20Sopenharmony_ci 302, 321 16308c2ecf20Sopenharmony_ci}; 16318c2ecf20Sopenharmony_ci 16328c2ecf20Sopenharmony_ci/* The GPIO1D (28-31) pins overlap with TVC */ 16338c2ecf20Sopenharmony_cistatic const unsigned int gpio1d_3516_pins[] = { 353, 311, 394, 374 }; 16348c2ecf20Sopenharmony_ci 16358c2ecf20Sopenharmony_ci/* The GPIO2A (0-3) pins overlap with GMII GMAC1 and extended parallel flash */ 16368c2ecf20Sopenharmony_cistatic const unsigned int gpio2a_3516_pins[] = { 308, 369, 389, 329 }; 16378c2ecf20Sopenharmony_ci 16388c2ecf20Sopenharmony_ci/* The GPIO2B (4-7) pins overlap with GMII GMAC1, extended parallel flash and LCD */ 16398c2ecf20Sopenharmony_cistatic const unsigned int gpio2b_3516_pins[] = { 391, 351, 310, 371 }; 16408c2ecf20Sopenharmony_ci 16418c2ecf20Sopenharmony_ci/* The GPIO2C (8-31) pins overlap with PCI */ 16428c2ecf20Sopenharmony_cistatic const unsigned int gpio2c_3516_pins[] = { 16438c2ecf20Sopenharmony_ci 259, 237, 238, 239, 215, 216, 217, 218, 177, 159, 158, 175, 176, 139, 16448c2ecf20Sopenharmony_ci 157, 138, 137, 156, 118, 155, 99, 98, 136, 117 16458c2ecf20Sopenharmony_ci}; 16468c2ecf20Sopenharmony_ci 16478c2ecf20Sopenharmony_ci/* Groups for the 3516 SoC/package */ 16488c2ecf20Sopenharmony_cistatic const struct gemini_pin_group gemini_3516_pin_groups[] = { 16498c2ecf20Sopenharmony_ci { 16508c2ecf20Sopenharmony_ci .name = "gndgrp", 16518c2ecf20Sopenharmony_ci .pins = gnd_3516_pins, 16528c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(gnd_3516_pins), 16538c2ecf20Sopenharmony_ci }, 16548c2ecf20Sopenharmony_ci { 16558c2ecf20Sopenharmony_ci .name = "dramgrp", 16568c2ecf20Sopenharmony_ci .pins = dram_3516_pins, 16578c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(dram_3516_pins), 16588c2ecf20Sopenharmony_ci .mask = DRAM_PADS_POWERDOWN, 16598c2ecf20Sopenharmony_ci }, 16608c2ecf20Sopenharmony_ci { 16618c2ecf20Sopenharmony_ci .name = "rtcgrp", 16628c2ecf20Sopenharmony_ci .pins = rtc_3516_pins, 16638c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(rtc_3516_pins), 16648c2ecf20Sopenharmony_ci }, 16658c2ecf20Sopenharmony_ci { 16668c2ecf20Sopenharmony_ci .name = "powergrp", 16678c2ecf20Sopenharmony_ci .pins = power_3516_pins, 16688c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(power_3516_pins), 16698c2ecf20Sopenharmony_ci }, 16708c2ecf20Sopenharmony_ci { 16718c2ecf20Sopenharmony_ci .name = "cirgrp", 16728c2ecf20Sopenharmony_ci .pins = cir_3516_pins, 16738c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(cir_3516_pins), 16748c2ecf20Sopenharmony_ci }, 16758c2ecf20Sopenharmony_ci { 16768c2ecf20Sopenharmony_ci .name = "systemgrp", 16778c2ecf20Sopenharmony_ci .pins = system_3516_pins, 16788c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(system_3516_pins), 16798c2ecf20Sopenharmony_ci }, 16808c2ecf20Sopenharmony_ci { 16818c2ecf20Sopenharmony_ci .name = "vcontrolgrp", 16828c2ecf20Sopenharmony_ci .pins = vcontrol_3516_pins, 16838c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(vcontrol_3516_pins), 16848c2ecf20Sopenharmony_ci }, 16858c2ecf20Sopenharmony_ci { 16868c2ecf20Sopenharmony_ci .name = "icegrp", 16878c2ecf20Sopenharmony_ci .pins = ice_3516_pins, 16888c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(ice_3516_pins), 16898c2ecf20Sopenharmony_ci /* Conflict with some GPIO groups */ 16908c2ecf20Sopenharmony_ci }, 16918c2ecf20Sopenharmony_ci { 16928c2ecf20Sopenharmony_ci .name = "idegrp", 16938c2ecf20Sopenharmony_ci .pins = ide_3516_pins, 16948c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(ide_3516_pins), 16958c2ecf20Sopenharmony_ci /* Conflict with all flash usage */ 16968c2ecf20Sopenharmony_ci .value = IDE_PADS_ENABLE | NAND_PADS_DISABLE | 16978c2ecf20Sopenharmony_ci PFLASH_PADS_DISABLE | SFLASH_PADS_DISABLE, 16988c2ecf20Sopenharmony_ci .driving_mask = GENMASK(21, 20), 16998c2ecf20Sopenharmony_ci }, 17008c2ecf20Sopenharmony_ci { 17018c2ecf20Sopenharmony_ci .name = "satagrp", 17028c2ecf20Sopenharmony_ci .pins = sata_3516_pins, 17038c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(sata_3516_pins), 17048c2ecf20Sopenharmony_ci }, 17058c2ecf20Sopenharmony_ci { 17068c2ecf20Sopenharmony_ci .name = "usbgrp", 17078c2ecf20Sopenharmony_ci .pins = usb_3516_pins, 17088c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(usb_3516_pins), 17098c2ecf20Sopenharmony_ci }, 17108c2ecf20Sopenharmony_ci { 17118c2ecf20Sopenharmony_ci .name = "gmii_gmac0_grp", 17128c2ecf20Sopenharmony_ci .pins = gmii_gmac0_3516_pins, 17138c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(gmii_gmac0_3516_pins), 17148c2ecf20Sopenharmony_ci .mask = GEMINI_GMAC_IOSEL_MASK, 17158c2ecf20Sopenharmony_ci .driving_mask = GENMASK(17, 16), 17168c2ecf20Sopenharmony_ci }, 17178c2ecf20Sopenharmony_ci { 17188c2ecf20Sopenharmony_ci .name = "gmii_gmac1_grp", 17198c2ecf20Sopenharmony_ci .pins = gmii_gmac1_3516_pins, 17208c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(gmii_gmac1_3516_pins), 17218c2ecf20Sopenharmony_ci /* Bring out RGMII on the GMAC1 pins */ 17228c2ecf20Sopenharmony_ci .mask = GEMINI_GMAC_IOSEL_MASK, 17238c2ecf20Sopenharmony_ci .value = GEMINI_GMAC_IOSEL_GMAC0_GMAC1_RGMII, 17248c2ecf20Sopenharmony_ci .driving_mask = GENMASK(19, 18), 17258c2ecf20Sopenharmony_ci }, 17268c2ecf20Sopenharmony_ci { 17278c2ecf20Sopenharmony_ci .name = "pcigrp", 17288c2ecf20Sopenharmony_ci .pins = pci_3516_pins, 17298c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(pci_3516_pins), 17308c2ecf20Sopenharmony_ci /* Conflict only with GPIO2 */ 17318c2ecf20Sopenharmony_ci .value = PCI_PADS_ENABLE | PCI_CLK_PAD_ENABLE, 17328c2ecf20Sopenharmony_ci .driving_mask = GENMASK(23, 22), 17338c2ecf20Sopenharmony_ci }, 17348c2ecf20Sopenharmony_ci { 17358c2ecf20Sopenharmony_ci .name = "lpcgrp", 17368c2ecf20Sopenharmony_ci .pins = lpc_3516_pins, 17378c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(lpc_3516_pins), 17388c2ecf20Sopenharmony_ci /* Conflict with SSP */ 17398c2ecf20Sopenharmony_ci .mask = SSP_PADS_ENABLE, 17408c2ecf20Sopenharmony_ci .value = LPC_PADS_ENABLE | LPC_CLK_PAD_ENABLE, 17418c2ecf20Sopenharmony_ci }, 17428c2ecf20Sopenharmony_ci { 17438c2ecf20Sopenharmony_ci .name = "lcdgrp", 17448c2ecf20Sopenharmony_ci .pins = lcd_3516_pins, 17458c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(lcd_3516_pins), 17468c2ecf20Sopenharmony_ci .mask = TVC_PADS_ENABLE, 17478c2ecf20Sopenharmony_ci .value = LCD_PADS_ENABLE, 17488c2ecf20Sopenharmony_ci }, 17498c2ecf20Sopenharmony_ci { 17508c2ecf20Sopenharmony_ci .name = "sspgrp", 17518c2ecf20Sopenharmony_ci .pins = ssp_3516_pins, 17528c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(ssp_3516_pins), 17538c2ecf20Sopenharmony_ci /* Conflict with LPC */ 17548c2ecf20Sopenharmony_ci .mask = LPC_PADS_ENABLE, 17558c2ecf20Sopenharmony_ci .value = SSP_PADS_ENABLE, 17568c2ecf20Sopenharmony_ci }, 17578c2ecf20Sopenharmony_ci { 17588c2ecf20Sopenharmony_ci .name = "uartrxtxgrp", 17598c2ecf20Sopenharmony_ci .pins = uart_rxtx_3516_pins, 17608c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(uart_rxtx_3516_pins), 17618c2ecf20Sopenharmony_ci /* No conflicts except GPIO */ 17628c2ecf20Sopenharmony_ci }, 17638c2ecf20Sopenharmony_ci { 17648c2ecf20Sopenharmony_ci .name = "uartmodemgrp", 17658c2ecf20Sopenharmony_ci .pins = uart_modem_3516_pins, 17668c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(uart_modem_3516_pins), 17678c2ecf20Sopenharmony_ci /* 17688c2ecf20Sopenharmony_ci * Conflict with LPC and SSP, 17698c2ecf20Sopenharmony_ci * so when those are both disabled, modem UART can thrive. 17708c2ecf20Sopenharmony_ci */ 17718c2ecf20Sopenharmony_ci .mask = LPC_PADS_ENABLE | SSP_PADS_ENABLE, 17728c2ecf20Sopenharmony_ci }, 17738c2ecf20Sopenharmony_ci { 17748c2ecf20Sopenharmony_ci .name = "tvcgrp", 17758c2ecf20Sopenharmony_ci .pins = tvc_3516_pins, 17768c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(tvc_3516_pins), 17778c2ecf20Sopenharmony_ci /* Conflict with character LCD */ 17788c2ecf20Sopenharmony_ci .mask = LCD_PADS_ENABLE, 17798c2ecf20Sopenharmony_ci .value = TVC_PADS_ENABLE, 17808c2ecf20Sopenharmony_ci }, 17818c2ecf20Sopenharmony_ci { 17828c2ecf20Sopenharmony_ci .name = "tvcclkgrp", 17838c2ecf20Sopenharmony_ci .pins = tvc_clk_3516_pins, 17848c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(tvc_clk_3516_pins), 17858c2ecf20Sopenharmony_ci .value = TVC_CLK_PAD_ENABLE, 17868c2ecf20Sopenharmony_ci }, 17878c2ecf20Sopenharmony_ci /* 17888c2ecf20Sopenharmony_ci * The construction is done such that it is possible to use a serial 17898c2ecf20Sopenharmony_ci * flash together with a NAND or parallel (NOR) flash, but it is not 17908c2ecf20Sopenharmony_ci * possible to use NAND and parallel flash together. To use serial 17918c2ecf20Sopenharmony_ci * flash with one of the two others, the muxbits need to be flipped 17928c2ecf20Sopenharmony_ci * around before any access. 17938c2ecf20Sopenharmony_ci */ 17948c2ecf20Sopenharmony_ci { 17958c2ecf20Sopenharmony_ci .name = "nflashgrp", 17968c2ecf20Sopenharmony_ci .pins = nflash_3516_pins, 17978c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(nflash_3516_pins), 17988c2ecf20Sopenharmony_ci /* Conflict with IDE, parallel and serial flash */ 17998c2ecf20Sopenharmony_ci .mask = NAND_PADS_DISABLE | IDE_PADS_ENABLE, 18008c2ecf20Sopenharmony_ci .value = PFLASH_PADS_DISABLE | SFLASH_PADS_DISABLE, 18018c2ecf20Sopenharmony_ci }, 18028c2ecf20Sopenharmony_ci { 18038c2ecf20Sopenharmony_ci .name = "pflashgrp", 18048c2ecf20Sopenharmony_ci .pins = pflash_3516_pins, 18058c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(pflash_3516_pins), 18068c2ecf20Sopenharmony_ci /* Conflict with IDE, NAND and serial flash */ 18078c2ecf20Sopenharmony_ci .mask = PFLASH_PADS_DISABLE | IDE_PADS_ENABLE, 18088c2ecf20Sopenharmony_ci .value = NAND_PADS_DISABLE | SFLASH_PADS_DISABLE, 18098c2ecf20Sopenharmony_ci }, 18108c2ecf20Sopenharmony_ci { 18118c2ecf20Sopenharmony_ci .name = "sflashgrp", 18128c2ecf20Sopenharmony_ci .pins = sflash_3516_pins, 18138c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(sflash_3516_pins), 18148c2ecf20Sopenharmony_ci /* Conflict with IDE, NAND and parallel flash */ 18158c2ecf20Sopenharmony_ci .mask = SFLASH_PADS_DISABLE | IDE_PADS_ENABLE, 18168c2ecf20Sopenharmony_ci .value = NAND_PADS_DISABLE | PFLASH_PADS_DISABLE, 18178c2ecf20Sopenharmony_ci }, 18188c2ecf20Sopenharmony_ci { 18198c2ecf20Sopenharmony_ci .name = "gpio0agrp", 18208c2ecf20Sopenharmony_ci .pins = gpio0a_3516_pins, 18218c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(gpio0a_3516_pins), 18228c2ecf20Sopenharmony_ci /* Conflict with TVC and ICE */ 18238c2ecf20Sopenharmony_ci .mask = TVC_PADS_ENABLE, 18248c2ecf20Sopenharmony_ci }, 18258c2ecf20Sopenharmony_ci { 18268c2ecf20Sopenharmony_ci .name = "gpio0bgrp", 18278c2ecf20Sopenharmony_ci .pins = gpio0b_3516_pins, 18288c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(gpio0b_3516_pins), 18298c2ecf20Sopenharmony_ci /* Conflict with ICE */ 18308c2ecf20Sopenharmony_ci }, 18318c2ecf20Sopenharmony_ci { 18328c2ecf20Sopenharmony_ci .name = "gpio0cgrp", 18338c2ecf20Sopenharmony_ci .pins = gpio0c_3516_pins, 18348c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(gpio0c_3516_pins), 18358c2ecf20Sopenharmony_ci /* Conflict with LPC, UART and SSP */ 18368c2ecf20Sopenharmony_ci .mask = LPC_PADS_ENABLE | SSP_PADS_ENABLE, 18378c2ecf20Sopenharmony_ci }, 18388c2ecf20Sopenharmony_ci { 18398c2ecf20Sopenharmony_ci .name = "gpio0dgrp", 18408c2ecf20Sopenharmony_ci .pins = gpio0d_3516_pins, 18418c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(gpio0d_3516_pins), 18428c2ecf20Sopenharmony_ci /* Conflict with UART */ 18438c2ecf20Sopenharmony_ci }, 18448c2ecf20Sopenharmony_ci { 18458c2ecf20Sopenharmony_ci .name = "gpio0egrp", 18468c2ecf20Sopenharmony_ci .pins = gpio0e_3516_pins, 18478c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(gpio0e_3516_pins), 18488c2ecf20Sopenharmony_ci /* Conflict with LCD */ 18498c2ecf20Sopenharmony_ci .mask = LCD_PADS_ENABLE, 18508c2ecf20Sopenharmony_ci }, 18518c2ecf20Sopenharmony_ci { 18528c2ecf20Sopenharmony_ci .name = "gpio0fgrp", 18538c2ecf20Sopenharmony_ci .pins = gpio0f_3516_pins, 18548c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(gpio0f_3516_pins), 18558c2ecf20Sopenharmony_ci /* Conflict with NAND flash */ 18568c2ecf20Sopenharmony_ci .value = NAND_PADS_DISABLE, 18578c2ecf20Sopenharmony_ci }, 18588c2ecf20Sopenharmony_ci { 18598c2ecf20Sopenharmony_ci .name = "gpio0ggrp", 18608c2ecf20Sopenharmony_ci .pins = gpio0g_3516_pins, 18618c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(gpio0g_3516_pins), 18628c2ecf20Sopenharmony_ci /* Conflict with parallel flash */ 18638c2ecf20Sopenharmony_ci .value = PFLASH_PADS_DISABLE, 18648c2ecf20Sopenharmony_ci }, 18658c2ecf20Sopenharmony_ci { 18668c2ecf20Sopenharmony_ci .name = "gpio0hgrp", 18678c2ecf20Sopenharmony_ci .pins = gpio0h_3516_pins, 18688c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(gpio0h_3516_pins), 18698c2ecf20Sopenharmony_ci /* Conflict with serial flash */ 18708c2ecf20Sopenharmony_ci .value = SFLASH_PADS_DISABLE, 18718c2ecf20Sopenharmony_ci }, 18728c2ecf20Sopenharmony_ci { 18738c2ecf20Sopenharmony_ci .name = "gpio0igrp", 18748c2ecf20Sopenharmony_ci .pins = gpio0i_3516_pins, 18758c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(gpio0i_3516_pins), 18768c2ecf20Sopenharmony_ci /* Conflict with all flash */ 18778c2ecf20Sopenharmony_ci .value = PFLASH_PADS_DISABLE | NAND_PADS_DISABLE | 18788c2ecf20Sopenharmony_ci SFLASH_PADS_DISABLE, 18798c2ecf20Sopenharmony_ci }, 18808c2ecf20Sopenharmony_ci { 18818c2ecf20Sopenharmony_ci .name = "gpio0jgrp", 18828c2ecf20Sopenharmony_ci .pins = gpio0j_3516_pins, 18838c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(gpio0j_3516_pins), 18848c2ecf20Sopenharmony_ci /* Conflict with all flash and LCD */ 18858c2ecf20Sopenharmony_ci .mask = LCD_PADS_ENABLE, 18868c2ecf20Sopenharmony_ci .value = PFLASH_PADS_DISABLE | NAND_PADS_DISABLE | 18878c2ecf20Sopenharmony_ci SFLASH_PADS_DISABLE, 18888c2ecf20Sopenharmony_ci }, 18898c2ecf20Sopenharmony_ci { 18908c2ecf20Sopenharmony_ci .name = "gpio0kgrp", 18918c2ecf20Sopenharmony_ci .pins = gpio0k_3516_pins, 18928c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(gpio0k_3516_pins), 18938c2ecf20Sopenharmony_ci /* Conflict with parallel and NAND flash */ 18948c2ecf20Sopenharmony_ci .value = PFLASH_PADS_DISABLE | NAND_PADS_DISABLE, 18958c2ecf20Sopenharmony_ci }, 18968c2ecf20Sopenharmony_ci { 18978c2ecf20Sopenharmony_ci .name = "gpio0lgrp", 18988c2ecf20Sopenharmony_ci .pins = gpio0l_3516_pins, 18998c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(gpio0l_3516_pins), 19008c2ecf20Sopenharmony_ci /* Conflict with TVE CLK */ 19018c2ecf20Sopenharmony_ci .mask = TVC_CLK_PAD_ENABLE, 19028c2ecf20Sopenharmony_ci }, 19038c2ecf20Sopenharmony_ci { 19048c2ecf20Sopenharmony_ci .name = "gpio1agrp", 19058c2ecf20Sopenharmony_ci .pins = gpio1a_3516_pins, 19068c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(gpio1a_3516_pins), 19078c2ecf20Sopenharmony_ci /* Conflict with IDE and parallel flash */ 19088c2ecf20Sopenharmony_ci .mask = IDE_PADS_ENABLE, 19098c2ecf20Sopenharmony_ci .value = PFLASH_PADS_DISABLE, 19108c2ecf20Sopenharmony_ci }, 19118c2ecf20Sopenharmony_ci { 19128c2ecf20Sopenharmony_ci .name = "gpio1bgrp", 19138c2ecf20Sopenharmony_ci .pins = gpio1b_3516_pins, 19148c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(gpio1b_3516_pins), 19158c2ecf20Sopenharmony_ci /* Conflict with IDE only */ 19168c2ecf20Sopenharmony_ci .mask = IDE_PADS_ENABLE, 19178c2ecf20Sopenharmony_ci }, 19188c2ecf20Sopenharmony_ci { 19198c2ecf20Sopenharmony_ci .name = "gpio1cgrp", 19208c2ecf20Sopenharmony_ci .pins = gpio1c_3516_pins, 19218c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(gpio1c_3516_pins), 19228c2ecf20Sopenharmony_ci /* Conflict with IDE, parallel and NAND flash */ 19238c2ecf20Sopenharmony_ci .mask = IDE_PADS_ENABLE, 19248c2ecf20Sopenharmony_ci .value = NAND_PADS_DISABLE | PFLASH_PADS_DISABLE, 19258c2ecf20Sopenharmony_ci }, 19268c2ecf20Sopenharmony_ci { 19278c2ecf20Sopenharmony_ci .name = "gpio1dgrp", 19288c2ecf20Sopenharmony_ci .pins = gpio1d_3516_pins, 19298c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(gpio1d_3516_pins), 19308c2ecf20Sopenharmony_ci /* Conflict with TVC */ 19318c2ecf20Sopenharmony_ci .mask = TVC_PADS_ENABLE, 19328c2ecf20Sopenharmony_ci }, 19338c2ecf20Sopenharmony_ci { 19348c2ecf20Sopenharmony_ci .name = "gpio2agrp", 19358c2ecf20Sopenharmony_ci .pins = gpio2a_3516_pins, 19368c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(gpio2a_3516_pins), 19378c2ecf20Sopenharmony_ci .mask = GEMINI_GMAC_IOSEL_GMAC0_GMAC1_RGMII, 19388c2ecf20Sopenharmony_ci /* Conflict with GMII GMAC1 and extended parallel flash */ 19398c2ecf20Sopenharmony_ci }, 19408c2ecf20Sopenharmony_ci { 19418c2ecf20Sopenharmony_ci .name = "gpio2bgrp", 19428c2ecf20Sopenharmony_ci .pins = gpio2b_3516_pins, 19438c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(gpio2b_3516_pins), 19448c2ecf20Sopenharmony_ci /* Conflict with GMII GMAC1, extended parallel flash and LCD */ 19458c2ecf20Sopenharmony_ci .mask = LCD_PADS_ENABLE | GEMINI_GMAC_IOSEL_GMAC0_GMAC1_RGMII, 19468c2ecf20Sopenharmony_ci }, 19478c2ecf20Sopenharmony_ci { 19488c2ecf20Sopenharmony_ci .name = "gpio2cgrp", 19498c2ecf20Sopenharmony_ci .pins = gpio2c_3516_pins, 19508c2ecf20Sopenharmony_ci .num_pins = ARRAY_SIZE(gpio2c_3516_pins), 19518c2ecf20Sopenharmony_ci /* Conflict with PCI */ 19528c2ecf20Sopenharmony_ci .mask = PCI_PADS_ENABLE, 19538c2ecf20Sopenharmony_ci }, 19548c2ecf20Sopenharmony_ci}; 19558c2ecf20Sopenharmony_ci 19568c2ecf20Sopenharmony_cistatic int gemini_get_groups_count(struct pinctrl_dev *pctldev) 19578c2ecf20Sopenharmony_ci{ 19588c2ecf20Sopenharmony_ci struct gemini_pmx *pmx = pinctrl_dev_get_drvdata(pctldev); 19598c2ecf20Sopenharmony_ci 19608c2ecf20Sopenharmony_ci if (pmx->is_3512) 19618c2ecf20Sopenharmony_ci return ARRAY_SIZE(gemini_3512_pin_groups); 19628c2ecf20Sopenharmony_ci if (pmx->is_3516) 19638c2ecf20Sopenharmony_ci return ARRAY_SIZE(gemini_3516_pin_groups); 19648c2ecf20Sopenharmony_ci return 0; 19658c2ecf20Sopenharmony_ci} 19668c2ecf20Sopenharmony_ci 19678c2ecf20Sopenharmony_cistatic const char *gemini_get_group_name(struct pinctrl_dev *pctldev, 19688c2ecf20Sopenharmony_ci unsigned int selector) 19698c2ecf20Sopenharmony_ci{ 19708c2ecf20Sopenharmony_ci struct gemini_pmx *pmx = pinctrl_dev_get_drvdata(pctldev); 19718c2ecf20Sopenharmony_ci 19728c2ecf20Sopenharmony_ci if (pmx->is_3512) 19738c2ecf20Sopenharmony_ci return gemini_3512_pin_groups[selector].name; 19748c2ecf20Sopenharmony_ci if (pmx->is_3516) 19758c2ecf20Sopenharmony_ci return gemini_3516_pin_groups[selector].name; 19768c2ecf20Sopenharmony_ci return NULL; 19778c2ecf20Sopenharmony_ci} 19788c2ecf20Sopenharmony_ci 19798c2ecf20Sopenharmony_cistatic int gemini_get_group_pins(struct pinctrl_dev *pctldev, 19808c2ecf20Sopenharmony_ci unsigned int selector, 19818c2ecf20Sopenharmony_ci const unsigned int **pins, 19828c2ecf20Sopenharmony_ci unsigned int *num_pins) 19838c2ecf20Sopenharmony_ci{ 19848c2ecf20Sopenharmony_ci struct gemini_pmx *pmx = pinctrl_dev_get_drvdata(pctldev); 19858c2ecf20Sopenharmony_ci 19868c2ecf20Sopenharmony_ci /* The special case with the 3516 flash pin */ 19878c2ecf20Sopenharmony_ci if (pmx->flash_pin && 19888c2ecf20Sopenharmony_ci pmx->is_3512 && 19898c2ecf20Sopenharmony_ci !strcmp(gemini_3512_pin_groups[selector].name, "pflashgrp")) { 19908c2ecf20Sopenharmony_ci *pins = pflash_3512_pins_extended; 19918c2ecf20Sopenharmony_ci *num_pins = ARRAY_SIZE(pflash_3512_pins_extended); 19928c2ecf20Sopenharmony_ci return 0; 19938c2ecf20Sopenharmony_ci } 19948c2ecf20Sopenharmony_ci if (pmx->flash_pin && 19958c2ecf20Sopenharmony_ci pmx->is_3516 && 19968c2ecf20Sopenharmony_ci !strcmp(gemini_3516_pin_groups[selector].name, "pflashgrp")) { 19978c2ecf20Sopenharmony_ci *pins = pflash_3516_pins_extended; 19988c2ecf20Sopenharmony_ci *num_pins = ARRAY_SIZE(pflash_3516_pins_extended); 19998c2ecf20Sopenharmony_ci return 0; 20008c2ecf20Sopenharmony_ci } 20018c2ecf20Sopenharmony_ci if (pmx->is_3512) { 20028c2ecf20Sopenharmony_ci *pins = gemini_3512_pin_groups[selector].pins; 20038c2ecf20Sopenharmony_ci *num_pins = gemini_3512_pin_groups[selector].num_pins; 20048c2ecf20Sopenharmony_ci } 20058c2ecf20Sopenharmony_ci if (pmx->is_3516) { 20068c2ecf20Sopenharmony_ci *pins = gemini_3516_pin_groups[selector].pins; 20078c2ecf20Sopenharmony_ci *num_pins = gemini_3516_pin_groups[selector].num_pins; 20088c2ecf20Sopenharmony_ci } 20098c2ecf20Sopenharmony_ci return 0; 20108c2ecf20Sopenharmony_ci} 20118c2ecf20Sopenharmony_ci 20128c2ecf20Sopenharmony_cistatic void gemini_pin_dbg_show(struct pinctrl_dev *pctldev, struct seq_file *s, 20138c2ecf20Sopenharmony_ci unsigned int offset) 20148c2ecf20Sopenharmony_ci{ 20158c2ecf20Sopenharmony_ci seq_printf(s, " " DRIVER_NAME); 20168c2ecf20Sopenharmony_ci} 20178c2ecf20Sopenharmony_ci 20188c2ecf20Sopenharmony_cistatic const struct pinctrl_ops gemini_pctrl_ops = { 20198c2ecf20Sopenharmony_ci .get_groups_count = gemini_get_groups_count, 20208c2ecf20Sopenharmony_ci .get_group_name = gemini_get_group_name, 20218c2ecf20Sopenharmony_ci .get_group_pins = gemini_get_group_pins, 20228c2ecf20Sopenharmony_ci .pin_dbg_show = gemini_pin_dbg_show, 20238c2ecf20Sopenharmony_ci .dt_node_to_map = pinconf_generic_dt_node_to_map_all, 20248c2ecf20Sopenharmony_ci .dt_free_map = pinconf_generic_dt_free_map, 20258c2ecf20Sopenharmony_ci}; 20268c2ecf20Sopenharmony_ci 20278c2ecf20Sopenharmony_ci/** 20288c2ecf20Sopenharmony_ci * struct gemini_pmx_func - describes Gemini pinmux functions 20298c2ecf20Sopenharmony_ci * @name: the name of this specific function 20308c2ecf20Sopenharmony_ci * @groups: corresponding pin groups 20318c2ecf20Sopenharmony_ci */ 20328c2ecf20Sopenharmony_cistruct gemini_pmx_func { 20338c2ecf20Sopenharmony_ci const char *name; 20348c2ecf20Sopenharmony_ci const char * const *groups; 20358c2ecf20Sopenharmony_ci const unsigned int num_groups; 20368c2ecf20Sopenharmony_ci}; 20378c2ecf20Sopenharmony_ci 20388c2ecf20Sopenharmony_cistatic const char * const dramgrps[] = { "dramgrp" }; 20398c2ecf20Sopenharmony_cistatic const char * const rtcgrps[] = { "rtcgrp" }; 20408c2ecf20Sopenharmony_cistatic const char * const powergrps[] = { "powergrp" }; 20418c2ecf20Sopenharmony_cistatic const char * const cirgrps[] = { "cirgrp" }; 20428c2ecf20Sopenharmony_cistatic const char * const systemgrps[] = { "systemgrp" }; 20438c2ecf20Sopenharmony_cistatic const char * const vcontrolgrps[] = { "vcontrolgrp" }; 20448c2ecf20Sopenharmony_cistatic const char * const icegrps[] = { "icegrp" }; 20458c2ecf20Sopenharmony_cistatic const char * const idegrps[] = { "idegrp" }; 20468c2ecf20Sopenharmony_cistatic const char * const satagrps[] = { "satagrp" }; 20478c2ecf20Sopenharmony_cistatic const char * const usbgrps[] = { "usbgrp" }; 20488c2ecf20Sopenharmony_cistatic const char * const gmiigrps[] = { "gmii_gmac0_grp", "gmii_gmac1_grp" }; 20498c2ecf20Sopenharmony_cistatic const char * const pcigrps[] = { "pcigrp" }; 20508c2ecf20Sopenharmony_cistatic const char * const lpcgrps[] = { "lpcgrp" }; 20518c2ecf20Sopenharmony_cistatic const char * const lcdgrps[] = { "lcdgrp" }; 20528c2ecf20Sopenharmony_cistatic const char * const sspgrps[] = { "sspgrp" }; 20538c2ecf20Sopenharmony_cistatic const char * const uartgrps[] = { "uartrxtxgrp", "uartmodemgrp" }; 20548c2ecf20Sopenharmony_cistatic const char * const tvcgrps[] = { "tvcgrp" }; 20558c2ecf20Sopenharmony_cistatic const char * const nflashgrps[] = { "nflashgrp" }; 20568c2ecf20Sopenharmony_cistatic const char * const pflashgrps[] = { "pflashgrp", "pflashextgrp" }; 20578c2ecf20Sopenharmony_cistatic const char * const sflashgrps[] = { "sflashgrp" }; 20588c2ecf20Sopenharmony_cistatic const char * const gpio0grps[] = { "gpio0agrp", "gpio0bgrp", "gpio0cgrp", 20598c2ecf20Sopenharmony_ci "gpio0dgrp", "gpio0egrp", "gpio0fgrp", 20608c2ecf20Sopenharmony_ci "gpio0ggrp", "gpio0hgrp", "gpio0igrp", 20618c2ecf20Sopenharmony_ci "gpio0jgrp", "gpio0kgrp", "gpio0lgrp", 20628c2ecf20Sopenharmony_ci "gpio0mgrp" }; 20638c2ecf20Sopenharmony_cistatic const char * const gpio1grps[] = { "gpio1agrp", "gpio1bgrp", "gpio1cgrp", 20648c2ecf20Sopenharmony_ci "gpio1dgrp" }; 20658c2ecf20Sopenharmony_cistatic const char * const gpio2grps[] = { "gpio2agrp", "gpio2bgrp", "gpio2cgrp" }; 20668c2ecf20Sopenharmony_ci 20678c2ecf20Sopenharmony_cistatic const struct gemini_pmx_func gemini_pmx_functions[] = { 20688c2ecf20Sopenharmony_ci { 20698c2ecf20Sopenharmony_ci .name = "dram", 20708c2ecf20Sopenharmony_ci .groups = dramgrps, 20718c2ecf20Sopenharmony_ci .num_groups = ARRAY_SIZE(idegrps), 20728c2ecf20Sopenharmony_ci }, 20738c2ecf20Sopenharmony_ci { 20748c2ecf20Sopenharmony_ci .name = "rtc", 20758c2ecf20Sopenharmony_ci .groups = rtcgrps, 20768c2ecf20Sopenharmony_ci .num_groups = ARRAY_SIZE(rtcgrps), 20778c2ecf20Sopenharmony_ci }, 20788c2ecf20Sopenharmony_ci { 20798c2ecf20Sopenharmony_ci .name = "power", 20808c2ecf20Sopenharmony_ci .groups = powergrps, 20818c2ecf20Sopenharmony_ci .num_groups = ARRAY_SIZE(powergrps), 20828c2ecf20Sopenharmony_ci }, 20838c2ecf20Sopenharmony_ci { 20848c2ecf20Sopenharmony_ci /* This function is strictly unavailable on 3512 */ 20858c2ecf20Sopenharmony_ci .name = "cir", 20868c2ecf20Sopenharmony_ci .groups = cirgrps, 20878c2ecf20Sopenharmony_ci .num_groups = ARRAY_SIZE(cirgrps), 20888c2ecf20Sopenharmony_ci }, 20898c2ecf20Sopenharmony_ci { 20908c2ecf20Sopenharmony_ci .name = "system", 20918c2ecf20Sopenharmony_ci .groups = systemgrps, 20928c2ecf20Sopenharmony_ci .num_groups = ARRAY_SIZE(systemgrps), 20938c2ecf20Sopenharmony_ci }, 20948c2ecf20Sopenharmony_ci { 20958c2ecf20Sopenharmony_ci .name = "vcontrol", 20968c2ecf20Sopenharmony_ci .groups = vcontrolgrps, 20978c2ecf20Sopenharmony_ci .num_groups = ARRAY_SIZE(vcontrolgrps), 20988c2ecf20Sopenharmony_ci }, 20998c2ecf20Sopenharmony_ci { 21008c2ecf20Sopenharmony_ci .name = "ice", 21018c2ecf20Sopenharmony_ci .groups = icegrps, 21028c2ecf20Sopenharmony_ci .num_groups = ARRAY_SIZE(icegrps), 21038c2ecf20Sopenharmony_ci }, 21048c2ecf20Sopenharmony_ci { 21058c2ecf20Sopenharmony_ci .name = "ide", 21068c2ecf20Sopenharmony_ci .groups = idegrps, 21078c2ecf20Sopenharmony_ci .num_groups = ARRAY_SIZE(idegrps), 21088c2ecf20Sopenharmony_ci }, 21098c2ecf20Sopenharmony_ci { 21108c2ecf20Sopenharmony_ci .name = "sata", 21118c2ecf20Sopenharmony_ci .groups = satagrps, 21128c2ecf20Sopenharmony_ci .num_groups = ARRAY_SIZE(satagrps), 21138c2ecf20Sopenharmony_ci }, 21148c2ecf20Sopenharmony_ci { 21158c2ecf20Sopenharmony_ci .name = "usb", 21168c2ecf20Sopenharmony_ci .groups = usbgrps, 21178c2ecf20Sopenharmony_ci .num_groups = ARRAY_SIZE(usbgrps), 21188c2ecf20Sopenharmony_ci }, 21198c2ecf20Sopenharmony_ci { 21208c2ecf20Sopenharmony_ci .name = "gmii", 21218c2ecf20Sopenharmony_ci .groups = gmiigrps, 21228c2ecf20Sopenharmony_ci .num_groups = ARRAY_SIZE(gmiigrps), 21238c2ecf20Sopenharmony_ci }, 21248c2ecf20Sopenharmony_ci { 21258c2ecf20Sopenharmony_ci .name = "pci", 21268c2ecf20Sopenharmony_ci .groups = pcigrps, 21278c2ecf20Sopenharmony_ci .num_groups = ARRAY_SIZE(pcigrps), 21288c2ecf20Sopenharmony_ci }, 21298c2ecf20Sopenharmony_ci { 21308c2ecf20Sopenharmony_ci .name = "lpc", 21318c2ecf20Sopenharmony_ci .groups = lpcgrps, 21328c2ecf20Sopenharmony_ci .num_groups = ARRAY_SIZE(lpcgrps), 21338c2ecf20Sopenharmony_ci }, 21348c2ecf20Sopenharmony_ci { 21358c2ecf20Sopenharmony_ci .name = "lcd", 21368c2ecf20Sopenharmony_ci .groups = lcdgrps, 21378c2ecf20Sopenharmony_ci .num_groups = ARRAY_SIZE(lcdgrps), 21388c2ecf20Sopenharmony_ci }, 21398c2ecf20Sopenharmony_ci { 21408c2ecf20Sopenharmony_ci .name = "ssp", 21418c2ecf20Sopenharmony_ci .groups = sspgrps, 21428c2ecf20Sopenharmony_ci .num_groups = ARRAY_SIZE(sspgrps), 21438c2ecf20Sopenharmony_ci }, 21448c2ecf20Sopenharmony_ci { 21458c2ecf20Sopenharmony_ci .name = "uart", 21468c2ecf20Sopenharmony_ci .groups = uartgrps, 21478c2ecf20Sopenharmony_ci .num_groups = ARRAY_SIZE(uartgrps), 21488c2ecf20Sopenharmony_ci }, 21498c2ecf20Sopenharmony_ci { 21508c2ecf20Sopenharmony_ci .name = "tvc", 21518c2ecf20Sopenharmony_ci .groups = tvcgrps, 21528c2ecf20Sopenharmony_ci .num_groups = ARRAY_SIZE(tvcgrps), 21538c2ecf20Sopenharmony_ci }, 21548c2ecf20Sopenharmony_ci { 21558c2ecf20Sopenharmony_ci .name = "nflash", 21568c2ecf20Sopenharmony_ci .groups = nflashgrps, 21578c2ecf20Sopenharmony_ci .num_groups = ARRAY_SIZE(nflashgrps), 21588c2ecf20Sopenharmony_ci }, 21598c2ecf20Sopenharmony_ci { 21608c2ecf20Sopenharmony_ci .name = "pflash", 21618c2ecf20Sopenharmony_ci .groups = pflashgrps, 21628c2ecf20Sopenharmony_ci .num_groups = ARRAY_SIZE(pflashgrps), 21638c2ecf20Sopenharmony_ci }, 21648c2ecf20Sopenharmony_ci { 21658c2ecf20Sopenharmony_ci .name = "sflash", 21668c2ecf20Sopenharmony_ci .groups = sflashgrps, 21678c2ecf20Sopenharmony_ci .num_groups = ARRAY_SIZE(sflashgrps), 21688c2ecf20Sopenharmony_ci }, 21698c2ecf20Sopenharmony_ci { 21708c2ecf20Sopenharmony_ci .name = "gpio0", 21718c2ecf20Sopenharmony_ci .groups = gpio0grps, 21728c2ecf20Sopenharmony_ci .num_groups = ARRAY_SIZE(gpio0grps), 21738c2ecf20Sopenharmony_ci }, 21748c2ecf20Sopenharmony_ci { 21758c2ecf20Sopenharmony_ci .name = "gpio1", 21768c2ecf20Sopenharmony_ci .groups = gpio1grps, 21778c2ecf20Sopenharmony_ci .num_groups = ARRAY_SIZE(gpio1grps), 21788c2ecf20Sopenharmony_ci }, 21798c2ecf20Sopenharmony_ci { 21808c2ecf20Sopenharmony_ci .name = "gpio2", 21818c2ecf20Sopenharmony_ci .groups = gpio2grps, 21828c2ecf20Sopenharmony_ci .num_groups = ARRAY_SIZE(gpio2grps), 21838c2ecf20Sopenharmony_ci }, 21848c2ecf20Sopenharmony_ci}; 21858c2ecf20Sopenharmony_ci 21868c2ecf20Sopenharmony_ci 21878c2ecf20Sopenharmony_cistatic int gemini_pmx_set_mux(struct pinctrl_dev *pctldev, 21888c2ecf20Sopenharmony_ci unsigned int selector, 21898c2ecf20Sopenharmony_ci unsigned int group) 21908c2ecf20Sopenharmony_ci{ 21918c2ecf20Sopenharmony_ci struct gemini_pmx *pmx; 21928c2ecf20Sopenharmony_ci const struct gemini_pmx_func *func; 21938c2ecf20Sopenharmony_ci const struct gemini_pin_group *grp; 21948c2ecf20Sopenharmony_ci u32 before, after, expected; 21958c2ecf20Sopenharmony_ci unsigned long tmp; 21968c2ecf20Sopenharmony_ci int i; 21978c2ecf20Sopenharmony_ci 21988c2ecf20Sopenharmony_ci pmx = pinctrl_dev_get_drvdata(pctldev); 21998c2ecf20Sopenharmony_ci 22008c2ecf20Sopenharmony_ci func = &gemini_pmx_functions[selector]; 22018c2ecf20Sopenharmony_ci if (pmx->is_3512) 22028c2ecf20Sopenharmony_ci grp = &gemini_3512_pin_groups[group]; 22038c2ecf20Sopenharmony_ci else if (pmx->is_3516) 22048c2ecf20Sopenharmony_ci grp = &gemini_3516_pin_groups[group]; 22058c2ecf20Sopenharmony_ci else { 22068c2ecf20Sopenharmony_ci dev_err(pmx->dev, "invalid SoC type\n"); 22078c2ecf20Sopenharmony_ci return -ENODEV; 22088c2ecf20Sopenharmony_ci } 22098c2ecf20Sopenharmony_ci 22108c2ecf20Sopenharmony_ci dev_dbg(pmx->dev, 22118c2ecf20Sopenharmony_ci "ACTIVATE function \"%s\" with group \"%s\"\n", 22128c2ecf20Sopenharmony_ci func->name, grp->name); 22138c2ecf20Sopenharmony_ci 22148c2ecf20Sopenharmony_ci regmap_read(pmx->map, GLOBAL_MISC_CTRL, &before); 22158c2ecf20Sopenharmony_ci regmap_update_bits(pmx->map, GLOBAL_MISC_CTRL, 22168c2ecf20Sopenharmony_ci grp->mask | grp->value, 22178c2ecf20Sopenharmony_ci grp->value); 22188c2ecf20Sopenharmony_ci regmap_read(pmx->map, GLOBAL_MISC_CTRL, &after); 22198c2ecf20Sopenharmony_ci 22208c2ecf20Sopenharmony_ci /* Which bits changed */ 22218c2ecf20Sopenharmony_ci before &= PADS_MASK; 22228c2ecf20Sopenharmony_ci after &= PADS_MASK; 22238c2ecf20Sopenharmony_ci expected = before &= ~grp->mask; 22248c2ecf20Sopenharmony_ci expected |= grp->value; 22258c2ecf20Sopenharmony_ci expected &= PADS_MASK; 22268c2ecf20Sopenharmony_ci 22278c2ecf20Sopenharmony_ci /* Print changed states */ 22288c2ecf20Sopenharmony_ci tmp = grp->mask; 22298c2ecf20Sopenharmony_ci for_each_set_bit(i, &tmp, PADS_MAXBIT) { 22308c2ecf20Sopenharmony_ci bool enabled = !(i > 3); 22318c2ecf20Sopenharmony_ci 22328c2ecf20Sopenharmony_ci /* Did not go low though it should */ 22338c2ecf20Sopenharmony_ci if (after & BIT(i)) { 22348c2ecf20Sopenharmony_ci dev_err(pmx->dev, 22358c2ecf20Sopenharmony_ci "pin group %s could not be %s: " 22368c2ecf20Sopenharmony_ci "probably a hardware limitation\n", 22378c2ecf20Sopenharmony_ci gemini_padgroups[i], 22388c2ecf20Sopenharmony_ci enabled ? "enabled" : "disabled"); 22398c2ecf20Sopenharmony_ci dev_err(pmx->dev, 22408c2ecf20Sopenharmony_ci "GLOBAL MISC CTRL before: %08x, after %08x, expected %08x\n", 22418c2ecf20Sopenharmony_ci before, after, expected); 22428c2ecf20Sopenharmony_ci } else { 22438c2ecf20Sopenharmony_ci dev_dbg(pmx->dev, 22448c2ecf20Sopenharmony_ci "padgroup %s %s\n", 22458c2ecf20Sopenharmony_ci gemini_padgroups[i], 22468c2ecf20Sopenharmony_ci enabled ? "enabled" : "disabled"); 22478c2ecf20Sopenharmony_ci } 22488c2ecf20Sopenharmony_ci } 22498c2ecf20Sopenharmony_ci 22508c2ecf20Sopenharmony_ci tmp = grp->value; 22518c2ecf20Sopenharmony_ci for_each_set_bit(i, &tmp, PADS_MAXBIT) { 22528c2ecf20Sopenharmony_ci bool enabled = (i > 3); 22538c2ecf20Sopenharmony_ci 22548c2ecf20Sopenharmony_ci /* Did not go high though it should */ 22558c2ecf20Sopenharmony_ci if (!(after & BIT(i))) { 22568c2ecf20Sopenharmony_ci dev_err(pmx->dev, 22578c2ecf20Sopenharmony_ci "pin group %s could not be %s: " 22588c2ecf20Sopenharmony_ci "probably a hardware limitation\n", 22598c2ecf20Sopenharmony_ci gemini_padgroups[i], 22608c2ecf20Sopenharmony_ci enabled ? "enabled" : "disabled"); 22618c2ecf20Sopenharmony_ci dev_err(pmx->dev, 22628c2ecf20Sopenharmony_ci "GLOBAL MISC CTRL before: %08x, after %08x, expected %08x\n", 22638c2ecf20Sopenharmony_ci before, after, expected); 22648c2ecf20Sopenharmony_ci } else { 22658c2ecf20Sopenharmony_ci dev_dbg(pmx->dev, 22668c2ecf20Sopenharmony_ci "padgroup %s %s\n", 22678c2ecf20Sopenharmony_ci gemini_padgroups[i], 22688c2ecf20Sopenharmony_ci enabled ? "enabled" : "disabled"); 22698c2ecf20Sopenharmony_ci } 22708c2ecf20Sopenharmony_ci } 22718c2ecf20Sopenharmony_ci 22728c2ecf20Sopenharmony_ci return 0; 22738c2ecf20Sopenharmony_ci} 22748c2ecf20Sopenharmony_ci 22758c2ecf20Sopenharmony_cistatic int gemini_pmx_get_funcs_count(struct pinctrl_dev *pctldev) 22768c2ecf20Sopenharmony_ci{ 22778c2ecf20Sopenharmony_ci return ARRAY_SIZE(gemini_pmx_functions); 22788c2ecf20Sopenharmony_ci} 22798c2ecf20Sopenharmony_ci 22808c2ecf20Sopenharmony_cistatic const char *gemini_pmx_get_func_name(struct pinctrl_dev *pctldev, 22818c2ecf20Sopenharmony_ci unsigned int selector) 22828c2ecf20Sopenharmony_ci{ 22838c2ecf20Sopenharmony_ci return gemini_pmx_functions[selector].name; 22848c2ecf20Sopenharmony_ci} 22858c2ecf20Sopenharmony_ci 22868c2ecf20Sopenharmony_cistatic int gemini_pmx_get_groups(struct pinctrl_dev *pctldev, 22878c2ecf20Sopenharmony_ci unsigned int selector, 22888c2ecf20Sopenharmony_ci const char * const **groups, 22898c2ecf20Sopenharmony_ci unsigned int * const num_groups) 22908c2ecf20Sopenharmony_ci{ 22918c2ecf20Sopenharmony_ci *groups = gemini_pmx_functions[selector].groups; 22928c2ecf20Sopenharmony_ci *num_groups = gemini_pmx_functions[selector].num_groups; 22938c2ecf20Sopenharmony_ci return 0; 22948c2ecf20Sopenharmony_ci} 22958c2ecf20Sopenharmony_ci 22968c2ecf20Sopenharmony_cistatic const struct pinmux_ops gemini_pmx_ops = { 22978c2ecf20Sopenharmony_ci .get_functions_count = gemini_pmx_get_funcs_count, 22988c2ecf20Sopenharmony_ci .get_function_name = gemini_pmx_get_func_name, 22998c2ecf20Sopenharmony_ci .get_function_groups = gemini_pmx_get_groups, 23008c2ecf20Sopenharmony_ci .set_mux = gemini_pmx_set_mux, 23018c2ecf20Sopenharmony_ci}; 23028c2ecf20Sopenharmony_ci 23038c2ecf20Sopenharmony_ci#define GEMINI_CFGPIN(_n, _r, _lb, _hb) { \ 23048c2ecf20Sopenharmony_ci .pin = _n, \ 23058c2ecf20Sopenharmony_ci .reg = _r, \ 23068c2ecf20Sopenharmony_ci .mask = GENMASK(_hb, _lb) \ 23078c2ecf20Sopenharmony_ci} 23088c2ecf20Sopenharmony_ci 23098c2ecf20Sopenharmony_cistatic const struct gemini_pin_conf gemini_confs_3512[] = { 23108c2ecf20Sopenharmony_ci GEMINI_CFGPIN(259, GLOBAL_GMAC_CTRL_SKEW, 0, 3), /* GMAC0 RXDV */ 23118c2ecf20Sopenharmony_ci GEMINI_CFGPIN(277, GLOBAL_GMAC_CTRL_SKEW, 4, 7), /* GMAC0 RXC */ 23128c2ecf20Sopenharmony_ci GEMINI_CFGPIN(241, GLOBAL_GMAC_CTRL_SKEW, 8, 11), /* GMAC0 TXEN */ 23138c2ecf20Sopenharmony_ci GEMINI_CFGPIN(312, GLOBAL_GMAC_CTRL_SKEW, 12, 15), /* GMAC0 TXC */ 23148c2ecf20Sopenharmony_ci GEMINI_CFGPIN(298, GLOBAL_GMAC_CTRL_SKEW, 16, 19), /* GMAC1 RXDV */ 23158c2ecf20Sopenharmony_ci GEMINI_CFGPIN(280, GLOBAL_GMAC_CTRL_SKEW, 20, 23), /* GMAC1 RXC */ 23168c2ecf20Sopenharmony_ci GEMINI_CFGPIN(316, GLOBAL_GMAC_CTRL_SKEW, 24, 27), /* GMAC1 TXEN */ 23178c2ecf20Sopenharmony_ci GEMINI_CFGPIN(243, GLOBAL_GMAC_CTRL_SKEW, 28, 31), /* GMAC1 TXC */ 23188c2ecf20Sopenharmony_ci GEMINI_CFGPIN(295, GLOBAL_GMAC0_DATA_SKEW, 0, 3), /* GMAC0 RXD0 */ 23198c2ecf20Sopenharmony_ci GEMINI_CFGPIN(313, GLOBAL_GMAC0_DATA_SKEW, 4, 7), /* GMAC0 RXD1 */ 23208c2ecf20Sopenharmony_ci GEMINI_CFGPIN(242, GLOBAL_GMAC0_DATA_SKEW, 8, 11), /* GMAC0 RXD2 */ 23218c2ecf20Sopenharmony_ci GEMINI_CFGPIN(260, GLOBAL_GMAC0_DATA_SKEW, 12, 15), /* GMAC0 RXD3 */ 23228c2ecf20Sopenharmony_ci GEMINI_CFGPIN(294, GLOBAL_GMAC0_DATA_SKEW, 16, 19), /* GMAC0 TXD0 */ 23238c2ecf20Sopenharmony_ci GEMINI_CFGPIN(276, GLOBAL_GMAC0_DATA_SKEW, 20, 23), /* GMAC0 TXD1 */ 23248c2ecf20Sopenharmony_ci GEMINI_CFGPIN(258, GLOBAL_GMAC0_DATA_SKEW, 24, 27), /* GMAC0 TXD2 */ 23258c2ecf20Sopenharmony_ci GEMINI_CFGPIN(240, GLOBAL_GMAC0_DATA_SKEW, 28, 31), /* GMAC0 TXD3 */ 23268c2ecf20Sopenharmony_ci GEMINI_CFGPIN(262, GLOBAL_GMAC1_DATA_SKEW, 0, 3), /* GMAC1 RXD0 */ 23278c2ecf20Sopenharmony_ci GEMINI_CFGPIN(244, GLOBAL_GMAC1_DATA_SKEW, 4, 7), /* GMAC1 RXD1 */ 23288c2ecf20Sopenharmony_ci GEMINI_CFGPIN(317, GLOBAL_GMAC1_DATA_SKEW, 8, 11), /* GMAC1 RXD2 */ 23298c2ecf20Sopenharmony_ci GEMINI_CFGPIN(299, GLOBAL_GMAC1_DATA_SKEW, 12, 15), /* GMAC1 RXD3 */ 23308c2ecf20Sopenharmony_ci GEMINI_CFGPIN(261, GLOBAL_GMAC1_DATA_SKEW, 16, 19), /* GMAC1 TXD0 */ 23318c2ecf20Sopenharmony_ci GEMINI_CFGPIN(279, GLOBAL_GMAC1_DATA_SKEW, 20, 23), /* GMAC1 TXD1 */ 23328c2ecf20Sopenharmony_ci GEMINI_CFGPIN(297, GLOBAL_GMAC1_DATA_SKEW, 24, 27), /* GMAC1 TXD2 */ 23338c2ecf20Sopenharmony_ci GEMINI_CFGPIN(315, GLOBAL_GMAC1_DATA_SKEW, 28, 31), /* GMAC1 TXD3 */ 23348c2ecf20Sopenharmony_ci}; 23358c2ecf20Sopenharmony_ci 23368c2ecf20Sopenharmony_cistatic const struct gemini_pin_conf gemini_confs_3516[] = { 23378c2ecf20Sopenharmony_ci GEMINI_CFGPIN(347, GLOBAL_GMAC_CTRL_SKEW, 0, 3), /* GMAC0 RXDV */ 23388c2ecf20Sopenharmony_ci GEMINI_CFGPIN(386, GLOBAL_GMAC_CTRL_SKEW, 4, 7), /* GMAC0 RXC */ 23398c2ecf20Sopenharmony_ci GEMINI_CFGPIN(307, GLOBAL_GMAC_CTRL_SKEW, 8, 11), /* GMAC0 TXEN */ 23408c2ecf20Sopenharmony_ci GEMINI_CFGPIN(327, GLOBAL_GMAC_CTRL_SKEW, 12, 15), /* GMAC0 TXC */ 23418c2ecf20Sopenharmony_ci GEMINI_CFGPIN(309, GLOBAL_GMAC_CTRL_SKEW, 16, 19), /* GMAC1 RXDV */ 23428c2ecf20Sopenharmony_ci GEMINI_CFGPIN(390, GLOBAL_GMAC_CTRL_SKEW, 20, 23), /* GMAC1 RXC */ 23438c2ecf20Sopenharmony_ci GEMINI_CFGPIN(370, GLOBAL_GMAC_CTRL_SKEW, 24, 27), /* GMAC1 TXEN */ 23448c2ecf20Sopenharmony_ci GEMINI_CFGPIN(350, GLOBAL_GMAC_CTRL_SKEW, 28, 31), /* GMAC1 TXC */ 23458c2ecf20Sopenharmony_ci GEMINI_CFGPIN(367, GLOBAL_GMAC0_DATA_SKEW, 0, 3), /* GMAC0 RXD0 */ 23468c2ecf20Sopenharmony_ci GEMINI_CFGPIN(348, GLOBAL_GMAC0_DATA_SKEW, 4, 7), /* GMAC0 RXD1 */ 23478c2ecf20Sopenharmony_ci GEMINI_CFGPIN(387, GLOBAL_GMAC0_DATA_SKEW, 8, 11), /* GMAC0 RXD2 */ 23488c2ecf20Sopenharmony_ci GEMINI_CFGPIN(328, GLOBAL_GMAC0_DATA_SKEW, 12, 15), /* GMAC0 RXD3 */ 23498c2ecf20Sopenharmony_ci GEMINI_CFGPIN(306, GLOBAL_GMAC0_DATA_SKEW, 16, 19), /* GMAC0 TXD0 */ 23508c2ecf20Sopenharmony_ci GEMINI_CFGPIN(325, GLOBAL_GMAC0_DATA_SKEW, 20, 23), /* GMAC0 TXD1 */ 23518c2ecf20Sopenharmony_ci GEMINI_CFGPIN(346, GLOBAL_GMAC0_DATA_SKEW, 24, 27), /* GMAC0 TXD2 */ 23528c2ecf20Sopenharmony_ci GEMINI_CFGPIN(326, GLOBAL_GMAC0_DATA_SKEW, 28, 31), /* GMAC0 TXD3 */ 23538c2ecf20Sopenharmony_ci GEMINI_CFGPIN(391, GLOBAL_GMAC1_DATA_SKEW, 0, 3), /* GMAC1 RXD0 */ 23548c2ecf20Sopenharmony_ci GEMINI_CFGPIN(351, GLOBAL_GMAC1_DATA_SKEW, 4, 7), /* GMAC1 RXD1 */ 23558c2ecf20Sopenharmony_ci GEMINI_CFGPIN(310, GLOBAL_GMAC1_DATA_SKEW, 8, 11), /* GMAC1 RXD2 */ 23568c2ecf20Sopenharmony_ci GEMINI_CFGPIN(371, GLOBAL_GMAC1_DATA_SKEW, 12, 15), /* GMAC1 RXD3 */ 23578c2ecf20Sopenharmony_ci GEMINI_CFGPIN(329, GLOBAL_GMAC1_DATA_SKEW, 16, 19), /* GMAC1 TXD0 */ 23588c2ecf20Sopenharmony_ci GEMINI_CFGPIN(389, GLOBAL_GMAC1_DATA_SKEW, 20, 23), /* GMAC1 TXD1 */ 23598c2ecf20Sopenharmony_ci GEMINI_CFGPIN(369, GLOBAL_GMAC1_DATA_SKEW, 24, 27), /* GMAC1 TXD2 */ 23608c2ecf20Sopenharmony_ci GEMINI_CFGPIN(308, GLOBAL_GMAC1_DATA_SKEW, 28, 31), /* GMAC1 TXD3 */ 23618c2ecf20Sopenharmony_ci}; 23628c2ecf20Sopenharmony_ci 23638c2ecf20Sopenharmony_cistatic const struct gemini_pin_conf *gemini_get_pin_conf(struct gemini_pmx *pmx, 23648c2ecf20Sopenharmony_ci unsigned int pin) 23658c2ecf20Sopenharmony_ci{ 23668c2ecf20Sopenharmony_ci const struct gemini_pin_conf *retconf; 23678c2ecf20Sopenharmony_ci int i; 23688c2ecf20Sopenharmony_ci 23698c2ecf20Sopenharmony_ci for (i = 0; i < pmx->nconfs; i++) { 23708c2ecf20Sopenharmony_ci retconf = &pmx->confs[i]; 23718c2ecf20Sopenharmony_ci if (retconf->pin == pin) 23728c2ecf20Sopenharmony_ci return retconf; 23738c2ecf20Sopenharmony_ci } 23748c2ecf20Sopenharmony_ci return NULL; 23758c2ecf20Sopenharmony_ci} 23768c2ecf20Sopenharmony_ci 23778c2ecf20Sopenharmony_cistatic int gemini_pinconf_get(struct pinctrl_dev *pctldev, unsigned int pin, 23788c2ecf20Sopenharmony_ci unsigned long *config) 23798c2ecf20Sopenharmony_ci{ 23808c2ecf20Sopenharmony_ci struct gemini_pmx *pmx = pinctrl_dev_get_drvdata(pctldev); 23818c2ecf20Sopenharmony_ci enum pin_config_param param = pinconf_to_config_param(*config); 23828c2ecf20Sopenharmony_ci const struct gemini_pin_conf *conf; 23838c2ecf20Sopenharmony_ci u32 val; 23848c2ecf20Sopenharmony_ci 23858c2ecf20Sopenharmony_ci switch (param) { 23868c2ecf20Sopenharmony_ci case PIN_CONFIG_SKEW_DELAY: 23878c2ecf20Sopenharmony_ci conf = gemini_get_pin_conf(pmx, pin); 23888c2ecf20Sopenharmony_ci if (!conf) 23898c2ecf20Sopenharmony_ci return -ENOTSUPP; 23908c2ecf20Sopenharmony_ci regmap_read(pmx->map, conf->reg, &val); 23918c2ecf20Sopenharmony_ci val &= conf->mask; 23928c2ecf20Sopenharmony_ci val >>= (ffs(conf->mask) - 1); 23938c2ecf20Sopenharmony_ci *config = pinconf_to_config_packed(PIN_CONFIG_SKEW_DELAY, val); 23948c2ecf20Sopenharmony_ci break; 23958c2ecf20Sopenharmony_ci default: 23968c2ecf20Sopenharmony_ci return -ENOTSUPP; 23978c2ecf20Sopenharmony_ci } 23988c2ecf20Sopenharmony_ci 23998c2ecf20Sopenharmony_ci return 0; 24008c2ecf20Sopenharmony_ci} 24018c2ecf20Sopenharmony_ci 24028c2ecf20Sopenharmony_cistatic int gemini_pinconf_set(struct pinctrl_dev *pctldev, unsigned int pin, 24038c2ecf20Sopenharmony_ci unsigned long *configs, unsigned int num_configs) 24048c2ecf20Sopenharmony_ci{ 24058c2ecf20Sopenharmony_ci struct gemini_pmx *pmx = pinctrl_dev_get_drvdata(pctldev); 24068c2ecf20Sopenharmony_ci const struct gemini_pin_conf *conf; 24078c2ecf20Sopenharmony_ci enum pin_config_param param; 24088c2ecf20Sopenharmony_ci u32 arg; 24098c2ecf20Sopenharmony_ci int ret = 0; 24108c2ecf20Sopenharmony_ci int i; 24118c2ecf20Sopenharmony_ci 24128c2ecf20Sopenharmony_ci for (i = 0; i < num_configs; i++) { 24138c2ecf20Sopenharmony_ci param = pinconf_to_config_param(configs[i]); 24148c2ecf20Sopenharmony_ci arg = pinconf_to_config_argument(configs[i]); 24158c2ecf20Sopenharmony_ci 24168c2ecf20Sopenharmony_ci switch (param) { 24178c2ecf20Sopenharmony_ci case PIN_CONFIG_SKEW_DELAY: 24188c2ecf20Sopenharmony_ci if (arg > 0xf) 24198c2ecf20Sopenharmony_ci return -EINVAL; 24208c2ecf20Sopenharmony_ci conf = gemini_get_pin_conf(pmx, pin); 24218c2ecf20Sopenharmony_ci if (!conf) { 24228c2ecf20Sopenharmony_ci dev_err(pmx->dev, 24238c2ecf20Sopenharmony_ci "invalid pin for skew delay %d\n", pin); 24248c2ecf20Sopenharmony_ci return -ENOTSUPP; 24258c2ecf20Sopenharmony_ci } 24268c2ecf20Sopenharmony_ci arg <<= (ffs(conf->mask) - 1); 24278c2ecf20Sopenharmony_ci dev_dbg(pmx->dev, 24288c2ecf20Sopenharmony_ci "set pin %d to skew delay mask %08x, val %08x\n", 24298c2ecf20Sopenharmony_ci pin, conf->mask, arg); 24308c2ecf20Sopenharmony_ci regmap_update_bits(pmx->map, conf->reg, conf->mask, arg); 24318c2ecf20Sopenharmony_ci break; 24328c2ecf20Sopenharmony_ci default: 24338c2ecf20Sopenharmony_ci dev_err(pmx->dev, "Invalid config param %04x\n", param); 24348c2ecf20Sopenharmony_ci return -ENOTSUPP; 24358c2ecf20Sopenharmony_ci } 24368c2ecf20Sopenharmony_ci } 24378c2ecf20Sopenharmony_ci 24388c2ecf20Sopenharmony_ci return ret; 24398c2ecf20Sopenharmony_ci} 24408c2ecf20Sopenharmony_ci 24418c2ecf20Sopenharmony_cistatic int gemini_pinconf_group_set(struct pinctrl_dev *pctldev, 24428c2ecf20Sopenharmony_ci unsigned selector, 24438c2ecf20Sopenharmony_ci unsigned long *configs, 24448c2ecf20Sopenharmony_ci unsigned num_configs) 24458c2ecf20Sopenharmony_ci{ 24468c2ecf20Sopenharmony_ci struct gemini_pmx *pmx = pinctrl_dev_get_drvdata(pctldev); 24478c2ecf20Sopenharmony_ci const struct gemini_pin_group *grp = NULL; 24488c2ecf20Sopenharmony_ci enum pin_config_param param; 24498c2ecf20Sopenharmony_ci u32 arg; 24508c2ecf20Sopenharmony_ci u32 val; 24518c2ecf20Sopenharmony_ci int i; 24528c2ecf20Sopenharmony_ci 24538c2ecf20Sopenharmony_ci if (pmx->is_3512) 24548c2ecf20Sopenharmony_ci grp = &gemini_3512_pin_groups[selector]; 24558c2ecf20Sopenharmony_ci if (pmx->is_3516) 24568c2ecf20Sopenharmony_ci grp = &gemini_3516_pin_groups[selector]; 24578c2ecf20Sopenharmony_ci 24588c2ecf20Sopenharmony_ci /* First figure out if this group supports configs */ 24598c2ecf20Sopenharmony_ci if (!grp->driving_mask) { 24608c2ecf20Sopenharmony_ci dev_err(pmx->dev, "pin config group \"%s\" does " 24618c2ecf20Sopenharmony_ci "not support drive strength setting\n", 24628c2ecf20Sopenharmony_ci grp->name); 24638c2ecf20Sopenharmony_ci return -EINVAL; 24648c2ecf20Sopenharmony_ci } 24658c2ecf20Sopenharmony_ci 24668c2ecf20Sopenharmony_ci for (i = 0; i < num_configs; i++) { 24678c2ecf20Sopenharmony_ci param = pinconf_to_config_param(configs[i]); 24688c2ecf20Sopenharmony_ci arg = pinconf_to_config_argument(configs[i]); 24698c2ecf20Sopenharmony_ci 24708c2ecf20Sopenharmony_ci switch (param) { 24718c2ecf20Sopenharmony_ci case PIN_CONFIG_DRIVE_STRENGTH: 24728c2ecf20Sopenharmony_ci switch (arg) { 24738c2ecf20Sopenharmony_ci case 4: 24748c2ecf20Sopenharmony_ci val = 0; 24758c2ecf20Sopenharmony_ci break; 24768c2ecf20Sopenharmony_ci case 8: 24778c2ecf20Sopenharmony_ci val = 1; 24788c2ecf20Sopenharmony_ci break; 24798c2ecf20Sopenharmony_ci case 12: 24808c2ecf20Sopenharmony_ci val = 2; 24818c2ecf20Sopenharmony_ci break; 24828c2ecf20Sopenharmony_ci case 16: 24838c2ecf20Sopenharmony_ci val = 3; 24848c2ecf20Sopenharmony_ci break; 24858c2ecf20Sopenharmony_ci default: 24868c2ecf20Sopenharmony_ci dev_err(pmx->dev, 24878c2ecf20Sopenharmony_ci "invalid drive strength %d mA\n", 24888c2ecf20Sopenharmony_ci arg); 24898c2ecf20Sopenharmony_ci return -ENOTSUPP; 24908c2ecf20Sopenharmony_ci } 24918c2ecf20Sopenharmony_ci val <<= (ffs(grp->driving_mask) - 1); 24928c2ecf20Sopenharmony_ci regmap_update_bits(pmx->map, GLOBAL_IODRIVE, 24938c2ecf20Sopenharmony_ci grp->driving_mask, 24948c2ecf20Sopenharmony_ci val); 24958c2ecf20Sopenharmony_ci dev_dbg(pmx->dev, 24968c2ecf20Sopenharmony_ci "set group %s to %d mA drive strength mask %08x val %08x\n", 24978c2ecf20Sopenharmony_ci grp->name, arg, grp->driving_mask, val); 24988c2ecf20Sopenharmony_ci break; 24998c2ecf20Sopenharmony_ci default: 25008c2ecf20Sopenharmony_ci dev_err(pmx->dev, "invalid config param %04x\n", param); 25018c2ecf20Sopenharmony_ci return -ENOTSUPP; 25028c2ecf20Sopenharmony_ci } 25038c2ecf20Sopenharmony_ci } 25048c2ecf20Sopenharmony_ci 25058c2ecf20Sopenharmony_ci return 0; 25068c2ecf20Sopenharmony_ci} 25078c2ecf20Sopenharmony_ci 25088c2ecf20Sopenharmony_cistatic const struct pinconf_ops gemini_pinconf_ops = { 25098c2ecf20Sopenharmony_ci .pin_config_get = gemini_pinconf_get, 25108c2ecf20Sopenharmony_ci .pin_config_set = gemini_pinconf_set, 25118c2ecf20Sopenharmony_ci .pin_config_group_set = gemini_pinconf_group_set, 25128c2ecf20Sopenharmony_ci .is_generic = true, 25138c2ecf20Sopenharmony_ci}; 25148c2ecf20Sopenharmony_ci 25158c2ecf20Sopenharmony_cistatic struct pinctrl_desc gemini_pmx_desc = { 25168c2ecf20Sopenharmony_ci .name = DRIVER_NAME, 25178c2ecf20Sopenharmony_ci .pctlops = &gemini_pctrl_ops, 25188c2ecf20Sopenharmony_ci .pmxops = &gemini_pmx_ops, 25198c2ecf20Sopenharmony_ci .confops = &gemini_pinconf_ops, 25208c2ecf20Sopenharmony_ci .owner = THIS_MODULE, 25218c2ecf20Sopenharmony_ci}; 25228c2ecf20Sopenharmony_ci 25238c2ecf20Sopenharmony_cistatic int gemini_pmx_probe(struct platform_device *pdev) 25248c2ecf20Sopenharmony_ci{ 25258c2ecf20Sopenharmony_ci struct gemini_pmx *pmx; 25268c2ecf20Sopenharmony_ci struct regmap *map; 25278c2ecf20Sopenharmony_ci struct device *dev = &pdev->dev; 25288c2ecf20Sopenharmony_ci struct device *parent; 25298c2ecf20Sopenharmony_ci unsigned long tmp; 25308c2ecf20Sopenharmony_ci u32 val; 25318c2ecf20Sopenharmony_ci int ret; 25328c2ecf20Sopenharmony_ci int i; 25338c2ecf20Sopenharmony_ci 25348c2ecf20Sopenharmony_ci /* Create state holders etc for this driver */ 25358c2ecf20Sopenharmony_ci pmx = devm_kzalloc(&pdev->dev, sizeof(*pmx), GFP_KERNEL); 25368c2ecf20Sopenharmony_ci if (!pmx) 25378c2ecf20Sopenharmony_ci return -ENOMEM; 25388c2ecf20Sopenharmony_ci 25398c2ecf20Sopenharmony_ci pmx->dev = &pdev->dev; 25408c2ecf20Sopenharmony_ci parent = dev->parent; 25418c2ecf20Sopenharmony_ci if (!parent) { 25428c2ecf20Sopenharmony_ci dev_err(dev, "no parent to pin controller\n"); 25438c2ecf20Sopenharmony_ci return -ENODEV; 25448c2ecf20Sopenharmony_ci } 25458c2ecf20Sopenharmony_ci map = syscon_node_to_regmap(parent->of_node); 25468c2ecf20Sopenharmony_ci if (IS_ERR(map)) { 25478c2ecf20Sopenharmony_ci dev_err(dev, "no syscon regmap\n"); 25488c2ecf20Sopenharmony_ci return PTR_ERR(map); 25498c2ecf20Sopenharmony_ci } 25508c2ecf20Sopenharmony_ci pmx->map = map; 25518c2ecf20Sopenharmony_ci 25528c2ecf20Sopenharmony_ci /* Check that regmap works at first call, then no more */ 25538c2ecf20Sopenharmony_ci ret = regmap_read(map, GLOBAL_WORD_ID, &val); 25548c2ecf20Sopenharmony_ci if (ret) { 25558c2ecf20Sopenharmony_ci dev_err(dev, "cannot access regmap\n"); 25568c2ecf20Sopenharmony_ci return ret; 25578c2ecf20Sopenharmony_ci } 25588c2ecf20Sopenharmony_ci val >>= 8; 25598c2ecf20Sopenharmony_ci val &= 0xffff; 25608c2ecf20Sopenharmony_ci if (val == 0x3512) { 25618c2ecf20Sopenharmony_ci pmx->is_3512 = true; 25628c2ecf20Sopenharmony_ci pmx->confs = gemini_confs_3512; 25638c2ecf20Sopenharmony_ci pmx->nconfs = ARRAY_SIZE(gemini_confs_3512); 25648c2ecf20Sopenharmony_ci gemini_pmx_desc.pins = gemini_3512_pins; 25658c2ecf20Sopenharmony_ci gemini_pmx_desc.npins = ARRAY_SIZE(gemini_3512_pins); 25668c2ecf20Sopenharmony_ci dev_info(dev, "detected 3512 chip variant\n"); 25678c2ecf20Sopenharmony_ci } else if (val == 0x3516) { 25688c2ecf20Sopenharmony_ci pmx->is_3516 = true; 25698c2ecf20Sopenharmony_ci pmx->confs = gemini_confs_3516; 25708c2ecf20Sopenharmony_ci pmx->nconfs = ARRAY_SIZE(gemini_confs_3516); 25718c2ecf20Sopenharmony_ci gemini_pmx_desc.pins = gemini_3516_pins; 25728c2ecf20Sopenharmony_ci gemini_pmx_desc.npins = ARRAY_SIZE(gemini_3516_pins); 25738c2ecf20Sopenharmony_ci dev_info(dev, "detected 3516 chip variant\n"); 25748c2ecf20Sopenharmony_ci } else { 25758c2ecf20Sopenharmony_ci dev_err(dev, "unknown chip ID: %04x\n", val); 25768c2ecf20Sopenharmony_ci return -ENODEV; 25778c2ecf20Sopenharmony_ci } 25788c2ecf20Sopenharmony_ci 25798c2ecf20Sopenharmony_ci ret = regmap_read(map, GLOBAL_MISC_CTRL, &val); 25808c2ecf20Sopenharmony_ci dev_info(dev, "GLOBAL MISC CTRL at boot: 0x%08x\n", val); 25818c2ecf20Sopenharmony_ci /* Mask off relevant pads */ 25828c2ecf20Sopenharmony_ci val &= PADS_MASK; 25838c2ecf20Sopenharmony_ci /* Invert the meaning of the DRAM+flash pads */ 25848c2ecf20Sopenharmony_ci val ^= 0x0f; 25858c2ecf20Sopenharmony_ci /* Print initial state */ 25868c2ecf20Sopenharmony_ci tmp = val; 25878c2ecf20Sopenharmony_ci for_each_set_bit(i, &tmp, PADS_MAXBIT) { 25888c2ecf20Sopenharmony_ci dev_dbg(dev, "pad group %s %s\n", gemini_padgroups[i], 25898c2ecf20Sopenharmony_ci (val & BIT(i)) ? "enabled" : "disabled"); 25908c2ecf20Sopenharmony_ci } 25918c2ecf20Sopenharmony_ci 25928c2ecf20Sopenharmony_ci /* Check if flash pin is set */ 25938c2ecf20Sopenharmony_ci regmap_read(map, GLOBAL_STATUS, &val); 25948c2ecf20Sopenharmony_ci pmx->flash_pin = !!(val & GLOBAL_STATUS_FLPIN); 25958c2ecf20Sopenharmony_ci dev_info(dev, "flash pin is %s\n", pmx->flash_pin ? "set" : "not set"); 25968c2ecf20Sopenharmony_ci 25978c2ecf20Sopenharmony_ci pmx->pctl = devm_pinctrl_register(dev, &gemini_pmx_desc, pmx); 25988c2ecf20Sopenharmony_ci if (IS_ERR(pmx->pctl)) { 25998c2ecf20Sopenharmony_ci dev_err(dev, "could not register pinmux driver\n"); 26008c2ecf20Sopenharmony_ci return PTR_ERR(pmx->pctl); 26018c2ecf20Sopenharmony_ci } 26028c2ecf20Sopenharmony_ci 26038c2ecf20Sopenharmony_ci dev_info(dev, "initialized Gemini pin control driver\n"); 26048c2ecf20Sopenharmony_ci 26058c2ecf20Sopenharmony_ci return 0; 26068c2ecf20Sopenharmony_ci} 26078c2ecf20Sopenharmony_ci 26088c2ecf20Sopenharmony_cistatic const struct of_device_id gemini_pinctrl_match[] = { 26098c2ecf20Sopenharmony_ci { .compatible = "cortina,gemini-pinctrl" }, 26108c2ecf20Sopenharmony_ci {}, 26118c2ecf20Sopenharmony_ci}; 26128c2ecf20Sopenharmony_ci 26138c2ecf20Sopenharmony_cistatic struct platform_driver gemini_pmx_driver = { 26148c2ecf20Sopenharmony_ci .driver = { 26158c2ecf20Sopenharmony_ci .name = DRIVER_NAME, 26168c2ecf20Sopenharmony_ci .of_match_table = gemini_pinctrl_match, 26178c2ecf20Sopenharmony_ci }, 26188c2ecf20Sopenharmony_ci .probe = gemini_pmx_probe, 26198c2ecf20Sopenharmony_ci}; 26208c2ecf20Sopenharmony_ci 26218c2ecf20Sopenharmony_cistatic int __init gemini_pmx_init(void) 26228c2ecf20Sopenharmony_ci{ 26238c2ecf20Sopenharmony_ci return platform_driver_register(&gemini_pmx_driver); 26248c2ecf20Sopenharmony_ci} 26258c2ecf20Sopenharmony_ciarch_initcall(gemini_pmx_init); 2626