18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0+
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * Actions Semi S500 SoC Pinctrl driver
48c2ecf20Sopenharmony_ci *
58c2ecf20Sopenharmony_ci * Copyright (c) 2014 Actions Semi Inc.
68c2ecf20Sopenharmony_ci * Copyright (c) 2020 Cristian Ciocaltea <cristian.ciocaltea@gmail.com>
78c2ecf20Sopenharmony_ci */
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ci#include <linux/module.h>
108c2ecf20Sopenharmony_ci#include <linux/of.h>
118c2ecf20Sopenharmony_ci#include <linux/platform_device.h>
128c2ecf20Sopenharmony_ci#include <linux/pinctrl/pinconf-generic.h>
138c2ecf20Sopenharmony_ci#include <linux/pinctrl/pinctrl.h>
148c2ecf20Sopenharmony_ci#include "pinctrl-owl.h"
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_ci/* Pinctrl registers offset */
178c2ecf20Sopenharmony_ci#define MFCTL0			(0x0040)
188c2ecf20Sopenharmony_ci#define MFCTL1			(0x0044)
198c2ecf20Sopenharmony_ci#define MFCTL2			(0x0048)
208c2ecf20Sopenharmony_ci#define MFCTL3			(0x004C)
218c2ecf20Sopenharmony_ci#define PAD_PULLCTL0		(0x0060)
228c2ecf20Sopenharmony_ci#define PAD_PULLCTL1		(0x0064)
238c2ecf20Sopenharmony_ci#define PAD_PULLCTL2		(0x0068)
248c2ecf20Sopenharmony_ci#define PAD_ST0			(0x006C)
258c2ecf20Sopenharmony_ci#define PAD_ST1			(0x0070)
268c2ecf20Sopenharmony_ci#define PAD_CTL			(0x0074)
278c2ecf20Sopenharmony_ci#define PAD_DRV0		(0x0080)
288c2ecf20Sopenharmony_ci#define PAD_DRV1		(0x0084)
298c2ecf20Sopenharmony_ci#define PAD_DRV2		(0x0088)
308c2ecf20Sopenharmony_ci
318c2ecf20Sopenharmony_ci#define _GPIOA(offset)		(offset)
328c2ecf20Sopenharmony_ci#define _GPIOB(offset)		(32 + (offset))
338c2ecf20Sopenharmony_ci#define _GPIOC(offset)		(64 + (offset))
348c2ecf20Sopenharmony_ci#define _GPIOD(offset)		(96 + (offset))
358c2ecf20Sopenharmony_ci#define _GPIOE(offset)		(128 + (offset))
368c2ecf20Sopenharmony_ci
378c2ecf20Sopenharmony_ci#define NUM_GPIOS		(_GPIOE(3) + 1)
388c2ecf20Sopenharmony_ci#define _PIN(offset)		(NUM_GPIOS + (offset))
398c2ecf20Sopenharmony_ci
408c2ecf20Sopenharmony_ci#define DNAND_DQS		_GPIOA(12)
418c2ecf20Sopenharmony_ci#define DNAND_DQSN		_GPIOA(13)
428c2ecf20Sopenharmony_ci#define ETH_TXD0		_GPIOA(14)
438c2ecf20Sopenharmony_ci#define ETH_TXD1		_GPIOA(15)
448c2ecf20Sopenharmony_ci#define ETH_TXEN		_GPIOA(16)
458c2ecf20Sopenharmony_ci#define ETH_RXER		_GPIOA(17)
468c2ecf20Sopenharmony_ci#define ETH_CRS_DV		_GPIOA(18)
478c2ecf20Sopenharmony_ci#define ETH_RXD1		_GPIOA(19)
488c2ecf20Sopenharmony_ci#define ETH_RXD0		_GPIOA(20)
498c2ecf20Sopenharmony_ci#define ETH_REF_CLK		_GPIOA(21)
508c2ecf20Sopenharmony_ci#define ETH_MDC			_GPIOA(22)
518c2ecf20Sopenharmony_ci#define ETH_MDIO		_GPIOA(23)
528c2ecf20Sopenharmony_ci#define SIRQ0			_GPIOA(24)
538c2ecf20Sopenharmony_ci#define SIRQ1			_GPIOA(25)
548c2ecf20Sopenharmony_ci#define SIRQ2			_GPIOA(26)
558c2ecf20Sopenharmony_ci#define I2S_D0			_GPIOA(27)
568c2ecf20Sopenharmony_ci#define I2S_BCLK0		_GPIOA(28)
578c2ecf20Sopenharmony_ci#define I2S_LRCLK0		_GPIOA(29)
588c2ecf20Sopenharmony_ci#define I2S_MCLK0		_GPIOA(30)
598c2ecf20Sopenharmony_ci#define I2S_D1			_GPIOA(31)
608c2ecf20Sopenharmony_ci
618c2ecf20Sopenharmony_ci#define I2S_BCLK1		_GPIOB(0)
628c2ecf20Sopenharmony_ci#define I2S_LRCLK1		_GPIOB(1)
638c2ecf20Sopenharmony_ci#define I2S_MCLK1		_GPIOB(2)
648c2ecf20Sopenharmony_ci#define KS_IN0			_GPIOB(3)
658c2ecf20Sopenharmony_ci#define KS_IN1			_GPIOB(4)
668c2ecf20Sopenharmony_ci#define KS_IN2			_GPIOB(5)
678c2ecf20Sopenharmony_ci#define KS_IN3			_GPIOB(6)
688c2ecf20Sopenharmony_ci#define KS_OUT0			_GPIOB(7)
698c2ecf20Sopenharmony_ci#define KS_OUT1			_GPIOB(8)
708c2ecf20Sopenharmony_ci#define KS_OUT2			_GPIOB(9)
718c2ecf20Sopenharmony_ci#define LVDS_OEP		_GPIOB(10)
728c2ecf20Sopenharmony_ci#define LVDS_OEN		_GPIOB(11)
738c2ecf20Sopenharmony_ci#define LVDS_ODP		_GPIOB(12)
748c2ecf20Sopenharmony_ci#define LVDS_ODN		_GPIOB(13)
758c2ecf20Sopenharmony_ci#define LVDS_OCP		_GPIOB(14)
768c2ecf20Sopenharmony_ci#define LVDS_OCN		_GPIOB(15)
778c2ecf20Sopenharmony_ci#define LVDS_OBP		_GPIOB(16)
788c2ecf20Sopenharmony_ci#define LVDS_OBN		_GPIOB(17)
798c2ecf20Sopenharmony_ci#define LVDS_OAP		_GPIOB(18)
808c2ecf20Sopenharmony_ci#define LVDS_OAN		_GPIOB(19)
818c2ecf20Sopenharmony_ci#define LVDS_EEP		_GPIOB(20)
828c2ecf20Sopenharmony_ci#define LVDS_EEN		_GPIOB(21)
838c2ecf20Sopenharmony_ci#define LVDS_EDP		_GPIOB(22)
848c2ecf20Sopenharmony_ci#define LVDS_EDN		_GPIOB(23)
858c2ecf20Sopenharmony_ci#define LVDS_ECP		_GPIOB(24)
868c2ecf20Sopenharmony_ci#define LVDS_ECN		_GPIOB(25)
878c2ecf20Sopenharmony_ci#define LVDS_EBP		_GPIOB(26)
888c2ecf20Sopenharmony_ci#define LVDS_EBN		_GPIOB(27)
898c2ecf20Sopenharmony_ci#define LVDS_EAP		_GPIOB(28)
908c2ecf20Sopenharmony_ci#define LVDS_EAN		_GPIOB(29)
918c2ecf20Sopenharmony_ci#define LCD0_D18		_GPIOB(30)
928c2ecf20Sopenharmony_ci#define LCD0_D17		_GPIOB(31)
938c2ecf20Sopenharmony_ci
948c2ecf20Sopenharmony_ci#define DSI_DP3			_GPIOC(0)
958c2ecf20Sopenharmony_ci#define DSI_DN3			_GPIOC(1)
968c2ecf20Sopenharmony_ci#define DSI_DP1			_GPIOC(2)
978c2ecf20Sopenharmony_ci#define DSI_DN1			_GPIOC(3)
988c2ecf20Sopenharmony_ci#define DSI_CP			_GPIOC(4)
998c2ecf20Sopenharmony_ci#define DSI_CN			_GPIOC(5)
1008c2ecf20Sopenharmony_ci#define DSI_DP0			_GPIOC(6)
1018c2ecf20Sopenharmony_ci#define DSI_DN0			_GPIOC(7)
1028c2ecf20Sopenharmony_ci#define DSI_DP2			_GPIOC(8)
1038c2ecf20Sopenharmony_ci#define DSI_DN2			_GPIOC(9)
1048c2ecf20Sopenharmony_ci#define SD0_D0			_GPIOC(10)
1058c2ecf20Sopenharmony_ci#define SD0_D1			_GPIOC(11)
1068c2ecf20Sopenharmony_ci#define SD0_D2			_GPIOC(12)
1078c2ecf20Sopenharmony_ci#define SD0_D3			_GPIOC(13)
1088c2ecf20Sopenharmony_ci#define SD1_D0			_GPIOC(14) /* SD0_D4 */
1098c2ecf20Sopenharmony_ci#define SD1_D1			_GPIOC(15) /* SD0_D5 */
1108c2ecf20Sopenharmony_ci#define SD1_D2			_GPIOC(16) /* SD0_D6 */
1118c2ecf20Sopenharmony_ci#define SD1_D3			_GPIOC(17) /* SD0_D7 */
1128c2ecf20Sopenharmony_ci#define SD0_CMD			_GPIOC(18)
1138c2ecf20Sopenharmony_ci#define SD0_CLK			_GPIOC(19)
1148c2ecf20Sopenharmony_ci#define SD1_CMD			_GPIOC(20)
1158c2ecf20Sopenharmony_ci#define SD1_CLK			_GPIOC(21)
1168c2ecf20Sopenharmony_ci#define SPI0_SCLK		_GPIOC(22)
1178c2ecf20Sopenharmony_ci#define SPI0_SS			_GPIOC(23)
1188c2ecf20Sopenharmony_ci#define SPI0_MISO		_GPIOC(24)
1198c2ecf20Sopenharmony_ci#define SPI0_MOSI		_GPIOC(25)
1208c2ecf20Sopenharmony_ci#define UART0_RX		_GPIOC(26)
1218c2ecf20Sopenharmony_ci#define UART0_TX		_GPIOC(27)
1228c2ecf20Sopenharmony_ci#define I2C0_SCLK		_GPIOC(28)
1238c2ecf20Sopenharmony_ci#define I2C0_SDATA		_GPIOC(29)
1248c2ecf20Sopenharmony_ci#define SENSOR0_PCLK		_GPIOC(31)
1258c2ecf20Sopenharmony_ci
1268c2ecf20Sopenharmony_ci#define SENSOR0_CKOUT		_GPIOD(10)
1278c2ecf20Sopenharmony_ci#define DNAND_ALE		_GPIOD(12)
1288c2ecf20Sopenharmony_ci#define DNAND_CLE		_GPIOD(13)
1298c2ecf20Sopenharmony_ci#define DNAND_CEB0		_GPIOD(14)
1308c2ecf20Sopenharmony_ci#define DNAND_CEB1		_GPIOD(15)
1318c2ecf20Sopenharmony_ci#define DNAND_CEB2		_GPIOD(16)
1328c2ecf20Sopenharmony_ci#define DNAND_CEB3		_GPIOD(17)
1338c2ecf20Sopenharmony_ci#define UART2_RX		_GPIOD(18)
1348c2ecf20Sopenharmony_ci#define UART2_TX		_GPIOD(19)
1358c2ecf20Sopenharmony_ci#define UART2_RTSB		_GPIOD(20)
1368c2ecf20Sopenharmony_ci#define UART2_CTSB		_GPIOD(21)
1378c2ecf20Sopenharmony_ci#define UART3_RX		_GPIOD(22)
1388c2ecf20Sopenharmony_ci#define UART3_TX		_GPIOD(23)
1398c2ecf20Sopenharmony_ci#define UART3_RTSB		_GPIOD(24)
1408c2ecf20Sopenharmony_ci#define UART3_CTSB		_GPIOD(25)
1418c2ecf20Sopenharmony_ci#define PCM1_IN			_GPIOD(28)
1428c2ecf20Sopenharmony_ci#define PCM1_CLK		_GPIOD(29)
1438c2ecf20Sopenharmony_ci#define PCM1_SYNC		_GPIOD(30)
1448c2ecf20Sopenharmony_ci#define PCM1_OUT		_GPIOD(31)
1458c2ecf20Sopenharmony_ci
1468c2ecf20Sopenharmony_ci#define I2C1_SCLK		_GPIOE(0)
1478c2ecf20Sopenharmony_ci#define I2C1_SDATA		_GPIOE(1)
1488c2ecf20Sopenharmony_ci#define I2C2_SCLK		_GPIOE(2)
1498c2ecf20Sopenharmony_ci#define I2C2_SDATA		_GPIOE(3)
1508c2ecf20Sopenharmony_ci
1518c2ecf20Sopenharmony_ci#define CSI_DN0			_PIN(0)
1528c2ecf20Sopenharmony_ci#define CSI_DP0			_PIN(1)
1538c2ecf20Sopenharmony_ci#define CSI_DN1			_PIN(2)
1548c2ecf20Sopenharmony_ci#define CSI_DP1			_PIN(3)
1558c2ecf20Sopenharmony_ci#define CSI_CN			_PIN(4)
1568c2ecf20Sopenharmony_ci#define CSI_CP			_PIN(5)
1578c2ecf20Sopenharmony_ci#define CSI_DN2			_PIN(6)
1588c2ecf20Sopenharmony_ci#define CSI_DP2			_PIN(7)
1598c2ecf20Sopenharmony_ci#define CSI_DN3			_PIN(8)
1608c2ecf20Sopenharmony_ci#define CSI_DP3			_PIN(9)
1618c2ecf20Sopenharmony_ci
1628c2ecf20Sopenharmony_ci#define DNAND_D0		_PIN(10)
1638c2ecf20Sopenharmony_ci#define DNAND_D1		_PIN(11)
1648c2ecf20Sopenharmony_ci#define DNAND_D2		_PIN(12)
1658c2ecf20Sopenharmony_ci#define DNAND_D3		_PIN(13)
1668c2ecf20Sopenharmony_ci#define DNAND_D4		_PIN(14)
1678c2ecf20Sopenharmony_ci#define DNAND_D5		_PIN(15)
1688c2ecf20Sopenharmony_ci#define DNAND_D6		_PIN(16)
1698c2ecf20Sopenharmony_ci#define DNAND_D7		_PIN(17)
1708c2ecf20Sopenharmony_ci#define DNAND_WRB		_PIN(18)
1718c2ecf20Sopenharmony_ci#define DNAND_RDB		_PIN(19)
1728c2ecf20Sopenharmony_ci#define DNAND_RDBN		_PIN(20)
1738c2ecf20Sopenharmony_ci#define DNAND_RB		_PIN(21)
1748c2ecf20Sopenharmony_ci
1758c2ecf20Sopenharmony_ci#define PORB			_PIN(22)
1768c2ecf20Sopenharmony_ci#define CLKO_25M		_PIN(23)
1778c2ecf20Sopenharmony_ci#define BSEL			_PIN(24)
1788c2ecf20Sopenharmony_ci#define PKG0			_PIN(25)
1798c2ecf20Sopenharmony_ci#define PKG1			_PIN(26)
1808c2ecf20Sopenharmony_ci#define PKG2			_PIN(27)
1818c2ecf20Sopenharmony_ci#define PKG3			_PIN(28)
1828c2ecf20Sopenharmony_ci
1838c2ecf20Sopenharmony_ci#define _FIRSTPAD		_GPIOA(0)
1848c2ecf20Sopenharmony_ci#define _LASTPAD		PKG3
1858c2ecf20Sopenharmony_ci#define NUM_PADS		(_PIN(28) + 1)
1868c2ecf20Sopenharmony_ci
1878c2ecf20Sopenharmony_cistatic const struct pinctrl_pin_desc s500_pads[] = {
1888c2ecf20Sopenharmony_ci	PINCTRL_PIN(DNAND_DQS, "dnand_dqs"),
1898c2ecf20Sopenharmony_ci	PINCTRL_PIN(DNAND_DQSN, "dnand_dqsn"),
1908c2ecf20Sopenharmony_ci	PINCTRL_PIN(ETH_TXD0, "eth_txd0"),
1918c2ecf20Sopenharmony_ci	PINCTRL_PIN(ETH_TXD1, "eth_txd1"),
1928c2ecf20Sopenharmony_ci	PINCTRL_PIN(ETH_TXEN, "eth_txen"),
1938c2ecf20Sopenharmony_ci	PINCTRL_PIN(ETH_RXER, "eth_rxer"),
1948c2ecf20Sopenharmony_ci	PINCTRL_PIN(ETH_CRS_DV, "eth_crs_dv"),
1958c2ecf20Sopenharmony_ci	PINCTRL_PIN(ETH_RXD1, "eth_rxd1"),
1968c2ecf20Sopenharmony_ci	PINCTRL_PIN(ETH_RXD0, "eth_rxd0"),
1978c2ecf20Sopenharmony_ci	PINCTRL_PIN(ETH_REF_CLK, "eth_ref_clk"),
1988c2ecf20Sopenharmony_ci	PINCTRL_PIN(ETH_MDC, "eth_mdc"),
1998c2ecf20Sopenharmony_ci	PINCTRL_PIN(ETH_MDIO, "eth_mdio"),
2008c2ecf20Sopenharmony_ci	PINCTRL_PIN(SIRQ0, "sirq0"),
2018c2ecf20Sopenharmony_ci	PINCTRL_PIN(SIRQ1, "sirq1"),
2028c2ecf20Sopenharmony_ci	PINCTRL_PIN(SIRQ2, "sirq2"),
2038c2ecf20Sopenharmony_ci	PINCTRL_PIN(I2S_D0, "i2s_d0"),
2048c2ecf20Sopenharmony_ci	PINCTRL_PIN(I2S_BCLK0, "i2s_bclk0"),
2058c2ecf20Sopenharmony_ci	PINCTRL_PIN(I2S_LRCLK0, "i2s_lrclk0"),
2068c2ecf20Sopenharmony_ci	PINCTRL_PIN(I2S_MCLK0, "i2s_mclk0"),
2078c2ecf20Sopenharmony_ci	PINCTRL_PIN(I2S_D1, "i2s_d1"),
2088c2ecf20Sopenharmony_ci	PINCTRL_PIN(I2S_BCLK1, "i2s_bclk1"),
2098c2ecf20Sopenharmony_ci	PINCTRL_PIN(I2S_LRCLK1, "i2s_lrclk1"),
2108c2ecf20Sopenharmony_ci	PINCTRL_PIN(I2S_MCLK1, "i2s_mclk1"),
2118c2ecf20Sopenharmony_ci	PINCTRL_PIN(KS_IN0, "ks_in0"),
2128c2ecf20Sopenharmony_ci	PINCTRL_PIN(KS_IN1, "ks_in1"),
2138c2ecf20Sopenharmony_ci	PINCTRL_PIN(KS_IN2, "ks_in2"),
2148c2ecf20Sopenharmony_ci	PINCTRL_PIN(KS_IN3, "ks_in3"),
2158c2ecf20Sopenharmony_ci	PINCTRL_PIN(KS_OUT0, "ks_out0"),
2168c2ecf20Sopenharmony_ci	PINCTRL_PIN(KS_OUT1, "ks_out1"),
2178c2ecf20Sopenharmony_ci	PINCTRL_PIN(KS_OUT2, "ks_out2"),
2188c2ecf20Sopenharmony_ci	PINCTRL_PIN(LVDS_OEP, "lvds_oep"),
2198c2ecf20Sopenharmony_ci	PINCTRL_PIN(LVDS_OEN, "lvds_oen"),
2208c2ecf20Sopenharmony_ci	PINCTRL_PIN(LVDS_ODP, "lvds_odp"),
2218c2ecf20Sopenharmony_ci	PINCTRL_PIN(LVDS_ODN, "lvds_odn"),
2228c2ecf20Sopenharmony_ci	PINCTRL_PIN(LVDS_OCP, "lvds_ocp"),
2238c2ecf20Sopenharmony_ci	PINCTRL_PIN(LVDS_OCN, "lvds_ocn"),
2248c2ecf20Sopenharmony_ci	PINCTRL_PIN(LVDS_OBP, "lvds_obp"),
2258c2ecf20Sopenharmony_ci	PINCTRL_PIN(LVDS_OBN, "lvds_obn"),
2268c2ecf20Sopenharmony_ci	PINCTRL_PIN(LVDS_OAP, "lvds_oap"),
2278c2ecf20Sopenharmony_ci	PINCTRL_PIN(LVDS_OAN, "lvds_oan"),
2288c2ecf20Sopenharmony_ci	PINCTRL_PIN(LVDS_EEP, "lvds_eep"),
2298c2ecf20Sopenharmony_ci	PINCTRL_PIN(LVDS_EEN, "lvds_een"),
2308c2ecf20Sopenharmony_ci	PINCTRL_PIN(LVDS_EDP, "lvds_edp"),
2318c2ecf20Sopenharmony_ci	PINCTRL_PIN(LVDS_EDN, "lvds_edn"),
2328c2ecf20Sopenharmony_ci	PINCTRL_PIN(LVDS_ECP, "lvds_ecp"),
2338c2ecf20Sopenharmony_ci	PINCTRL_PIN(LVDS_ECN, "lvds_ecn"),
2348c2ecf20Sopenharmony_ci	PINCTRL_PIN(LVDS_EBP, "lvds_ebp"),
2358c2ecf20Sopenharmony_ci	PINCTRL_PIN(LVDS_EBN, "lvds_ebn"),
2368c2ecf20Sopenharmony_ci	PINCTRL_PIN(LVDS_EAP, "lvds_eap"),
2378c2ecf20Sopenharmony_ci	PINCTRL_PIN(LVDS_EAN, "lvds_ean"),
2388c2ecf20Sopenharmony_ci	PINCTRL_PIN(LCD0_D18, "lcd0_d18"),
2398c2ecf20Sopenharmony_ci	PINCTRL_PIN(LCD0_D17, "lcd0_d17"),
2408c2ecf20Sopenharmony_ci	PINCTRL_PIN(DSI_DP3, "dsi_dp3"),
2418c2ecf20Sopenharmony_ci	PINCTRL_PIN(DSI_DN3, "dsi_dn3"),
2428c2ecf20Sopenharmony_ci	PINCTRL_PIN(DSI_DP1, "dsi_dp1"),
2438c2ecf20Sopenharmony_ci	PINCTRL_PIN(DSI_DN1, "dsi_dn1"),
2448c2ecf20Sopenharmony_ci	PINCTRL_PIN(DSI_CP, "dsi_cp"),
2458c2ecf20Sopenharmony_ci	PINCTRL_PIN(DSI_CN, "dsi_cn"),
2468c2ecf20Sopenharmony_ci	PINCTRL_PIN(DSI_DP0, "dsi_dp0"),
2478c2ecf20Sopenharmony_ci	PINCTRL_PIN(DSI_DN0, "dsi_dn0"),
2488c2ecf20Sopenharmony_ci	PINCTRL_PIN(DSI_DP2, "dsi_dp2"),
2498c2ecf20Sopenharmony_ci	PINCTRL_PIN(DSI_DN2, "dsi_dn2"),
2508c2ecf20Sopenharmony_ci	PINCTRL_PIN(SD0_D0, "sd0_d0"),
2518c2ecf20Sopenharmony_ci	PINCTRL_PIN(SD0_D1, "sd0_d1"),
2528c2ecf20Sopenharmony_ci	PINCTRL_PIN(SD0_D2, "sd0_d2"),
2538c2ecf20Sopenharmony_ci	PINCTRL_PIN(SD0_D3, "sd0_d3"),
2548c2ecf20Sopenharmony_ci	PINCTRL_PIN(SD1_D0, "sd1_d0"),
2558c2ecf20Sopenharmony_ci	PINCTRL_PIN(SD1_D1, "sd1_d1"),
2568c2ecf20Sopenharmony_ci	PINCTRL_PIN(SD1_D2, "sd1_d2"),
2578c2ecf20Sopenharmony_ci	PINCTRL_PIN(SD1_D3, "sd1_d3"),
2588c2ecf20Sopenharmony_ci	PINCTRL_PIN(SD0_CMD, "sd0_cmd"),
2598c2ecf20Sopenharmony_ci	PINCTRL_PIN(SD0_CLK, "sd0_clk"),
2608c2ecf20Sopenharmony_ci	PINCTRL_PIN(SD1_CMD, "sd1_cmd"),
2618c2ecf20Sopenharmony_ci	PINCTRL_PIN(SD1_CLK, "sd1_clk"),
2628c2ecf20Sopenharmony_ci	PINCTRL_PIN(SPI0_SCLK, "spi0_sclk"),
2638c2ecf20Sopenharmony_ci	PINCTRL_PIN(SPI0_SS, "spi0_ss"),
2648c2ecf20Sopenharmony_ci	PINCTRL_PIN(SPI0_MISO, "spi0_miso"),
2658c2ecf20Sopenharmony_ci	PINCTRL_PIN(SPI0_MOSI, "spi0_mosi"),
2668c2ecf20Sopenharmony_ci	PINCTRL_PIN(UART0_RX, "uart0_rx"),
2678c2ecf20Sopenharmony_ci	PINCTRL_PIN(UART0_TX, "uart0_tx"),
2688c2ecf20Sopenharmony_ci	PINCTRL_PIN(I2C0_SCLK, "i2c0_sclk"),
2698c2ecf20Sopenharmony_ci	PINCTRL_PIN(I2C0_SDATA, "i2c0_sdata"),
2708c2ecf20Sopenharmony_ci	PINCTRL_PIN(SENSOR0_PCLK, "sensor0_pclk"),
2718c2ecf20Sopenharmony_ci	PINCTRL_PIN(SENSOR0_CKOUT, "sensor0_ckout"),
2728c2ecf20Sopenharmony_ci	PINCTRL_PIN(DNAND_ALE, "dnand_ale"),
2738c2ecf20Sopenharmony_ci	PINCTRL_PIN(DNAND_CLE, "dnand_cle"),
2748c2ecf20Sopenharmony_ci	PINCTRL_PIN(DNAND_CEB0, "dnand_ceb0"),
2758c2ecf20Sopenharmony_ci	PINCTRL_PIN(DNAND_CEB1, "dnand_ceb1"),
2768c2ecf20Sopenharmony_ci	PINCTRL_PIN(DNAND_CEB2, "dnand_ceb2"),
2778c2ecf20Sopenharmony_ci	PINCTRL_PIN(DNAND_CEB3, "dnand_ceb3"),
2788c2ecf20Sopenharmony_ci	PINCTRL_PIN(UART2_RX, "uart2_rx"),
2798c2ecf20Sopenharmony_ci	PINCTRL_PIN(UART2_TX, "uart2_tx"),
2808c2ecf20Sopenharmony_ci	PINCTRL_PIN(UART2_RTSB, "uart2_rtsb"),
2818c2ecf20Sopenharmony_ci	PINCTRL_PIN(UART2_CTSB, "uart2_ctsb"),
2828c2ecf20Sopenharmony_ci	PINCTRL_PIN(UART3_RX, "uart3_rx"),
2838c2ecf20Sopenharmony_ci	PINCTRL_PIN(UART3_TX, "uart3_tx"),
2848c2ecf20Sopenharmony_ci	PINCTRL_PIN(UART3_RTSB, "uart3_rtsb"),
2858c2ecf20Sopenharmony_ci	PINCTRL_PIN(UART3_CTSB, "uart3_ctsb"),
2868c2ecf20Sopenharmony_ci	PINCTRL_PIN(PCM1_IN, "pcm1_in"),
2878c2ecf20Sopenharmony_ci	PINCTRL_PIN(PCM1_CLK, "pcm1_clk"),
2888c2ecf20Sopenharmony_ci	PINCTRL_PIN(PCM1_SYNC, "pcm1_sync"),
2898c2ecf20Sopenharmony_ci	PINCTRL_PIN(PCM1_OUT, "pcm1_out"),
2908c2ecf20Sopenharmony_ci	PINCTRL_PIN(I2C1_SCLK, "i2c1_sclk"),
2918c2ecf20Sopenharmony_ci	PINCTRL_PIN(I2C1_SDATA, "i2c1_sdata"),
2928c2ecf20Sopenharmony_ci	PINCTRL_PIN(I2C2_SCLK, "i2c2_sclk"),
2938c2ecf20Sopenharmony_ci	PINCTRL_PIN(I2C2_SDATA, "i2c2_sdata"),
2948c2ecf20Sopenharmony_ci	PINCTRL_PIN(CSI_DN0, "csi_dn0"),
2958c2ecf20Sopenharmony_ci	PINCTRL_PIN(CSI_DP0, "csi_dp0"),
2968c2ecf20Sopenharmony_ci	PINCTRL_PIN(CSI_DN1, "csi_dn1"),
2978c2ecf20Sopenharmony_ci	PINCTRL_PIN(CSI_DP1, "csi_dp1"),
2988c2ecf20Sopenharmony_ci	PINCTRL_PIN(CSI_DN2, "csi_dn2"),
2998c2ecf20Sopenharmony_ci	PINCTRL_PIN(CSI_DP2, "csi_dp2"),
3008c2ecf20Sopenharmony_ci	PINCTRL_PIN(CSI_DN3, "csi_dn3"),
3018c2ecf20Sopenharmony_ci	PINCTRL_PIN(CSI_DP3, "csi_dp3"),
3028c2ecf20Sopenharmony_ci	PINCTRL_PIN(CSI_CN, "csi_cn"),
3038c2ecf20Sopenharmony_ci	PINCTRL_PIN(CSI_CP, "csi_cp"),
3048c2ecf20Sopenharmony_ci	PINCTRL_PIN(DNAND_D0, "dnand_d0"),
3058c2ecf20Sopenharmony_ci	PINCTRL_PIN(DNAND_D1, "dnand_d1"),
3068c2ecf20Sopenharmony_ci	PINCTRL_PIN(DNAND_D2, "dnand_d2"),
3078c2ecf20Sopenharmony_ci	PINCTRL_PIN(DNAND_D3, "dnand_d3"),
3088c2ecf20Sopenharmony_ci	PINCTRL_PIN(DNAND_D4, "dnand_d4"),
3098c2ecf20Sopenharmony_ci	PINCTRL_PIN(DNAND_D5, "dnand_d5"),
3108c2ecf20Sopenharmony_ci	PINCTRL_PIN(DNAND_D6, "dnand_d6"),
3118c2ecf20Sopenharmony_ci	PINCTRL_PIN(DNAND_D7, "dnand_d7"),
3128c2ecf20Sopenharmony_ci	PINCTRL_PIN(DNAND_RB, "dnand_rb"),
3138c2ecf20Sopenharmony_ci	PINCTRL_PIN(DNAND_RDB, "dnand_rdb"),
3148c2ecf20Sopenharmony_ci	PINCTRL_PIN(DNAND_RDBN, "dnand_rdbn"),
3158c2ecf20Sopenharmony_ci	PINCTRL_PIN(DNAND_WRB, "dnand_wrb"),
3168c2ecf20Sopenharmony_ci	PINCTRL_PIN(PORB, "porb"),
3178c2ecf20Sopenharmony_ci	PINCTRL_PIN(CLKO_25M, "clko_25m"),
3188c2ecf20Sopenharmony_ci	PINCTRL_PIN(BSEL, "bsel"),
3198c2ecf20Sopenharmony_ci	PINCTRL_PIN(PKG0, "pkg0"),
3208c2ecf20Sopenharmony_ci	PINCTRL_PIN(PKG1, "pkg1"),
3218c2ecf20Sopenharmony_ci	PINCTRL_PIN(PKG2, "pkg2"),
3228c2ecf20Sopenharmony_ci	PINCTRL_PIN(PKG3, "pkg3"),
3238c2ecf20Sopenharmony_ci};
3248c2ecf20Sopenharmony_ci
3258c2ecf20Sopenharmony_cienum s500_pinmux_functions {
3268c2ecf20Sopenharmony_ci	S500_MUX_NOR,
3278c2ecf20Sopenharmony_ci	S500_MUX_ETH_RMII,
3288c2ecf20Sopenharmony_ci	S500_MUX_ETH_SMII,
3298c2ecf20Sopenharmony_ci	S500_MUX_SPI0,
3308c2ecf20Sopenharmony_ci	S500_MUX_SPI1,
3318c2ecf20Sopenharmony_ci	S500_MUX_SPI2,
3328c2ecf20Sopenharmony_ci	S500_MUX_SPI3,
3338c2ecf20Sopenharmony_ci	S500_MUX_SENS0,
3348c2ecf20Sopenharmony_ci	S500_MUX_SENS1,
3358c2ecf20Sopenharmony_ci	S500_MUX_UART0,
3368c2ecf20Sopenharmony_ci	S500_MUX_UART1,
3378c2ecf20Sopenharmony_ci	S500_MUX_UART2,
3388c2ecf20Sopenharmony_ci	S500_MUX_UART3,
3398c2ecf20Sopenharmony_ci	S500_MUX_UART4,
3408c2ecf20Sopenharmony_ci	S500_MUX_UART5,
3418c2ecf20Sopenharmony_ci	S500_MUX_UART6,
3428c2ecf20Sopenharmony_ci	S500_MUX_I2S0,
3438c2ecf20Sopenharmony_ci	S500_MUX_I2S1,
3448c2ecf20Sopenharmony_ci	S500_MUX_PCM1,
3458c2ecf20Sopenharmony_ci	S500_MUX_PCM0,
3468c2ecf20Sopenharmony_ci	S500_MUX_KS,
3478c2ecf20Sopenharmony_ci	S500_MUX_JTAG,
3488c2ecf20Sopenharmony_ci	S500_MUX_PWM0,
3498c2ecf20Sopenharmony_ci	S500_MUX_PWM1,
3508c2ecf20Sopenharmony_ci	S500_MUX_PWM2,
3518c2ecf20Sopenharmony_ci	S500_MUX_PWM3,
3528c2ecf20Sopenharmony_ci	S500_MUX_PWM4,
3538c2ecf20Sopenharmony_ci	S500_MUX_PWM5,
3548c2ecf20Sopenharmony_ci	S500_MUX_P0,
3558c2ecf20Sopenharmony_ci	S500_MUX_SD0,
3568c2ecf20Sopenharmony_ci	S500_MUX_SD1,
3578c2ecf20Sopenharmony_ci	S500_MUX_SD2,
3588c2ecf20Sopenharmony_ci	S500_MUX_I2C0,
3598c2ecf20Sopenharmony_ci	S500_MUX_I2C1,
3608c2ecf20Sopenharmony_ci	/*S500_MUX_I2C2,*/
3618c2ecf20Sopenharmony_ci	S500_MUX_I2C3,
3628c2ecf20Sopenharmony_ci	S500_MUX_DSI,
3638c2ecf20Sopenharmony_ci	S500_MUX_LVDS,
3648c2ecf20Sopenharmony_ci	S500_MUX_USB30,
3658c2ecf20Sopenharmony_ci	S500_MUX_CLKO_25M,
3668c2ecf20Sopenharmony_ci	S500_MUX_MIPI_CSI,
3678c2ecf20Sopenharmony_ci	S500_MUX_NAND,
3688c2ecf20Sopenharmony_ci	S500_MUX_SPDIF,
3698c2ecf20Sopenharmony_ci	/*S500_MUX_SIRQ0,*/
3708c2ecf20Sopenharmony_ci	/*S500_MUX_SIRQ1,*/
3718c2ecf20Sopenharmony_ci	/*S500_MUX_SIRQ2,*/
3728c2ecf20Sopenharmony_ci	S500_MUX_TS,
3738c2ecf20Sopenharmony_ci	S500_MUX_LCD0,
3748c2ecf20Sopenharmony_ci	S500_MUX_RESERVED,
3758c2ecf20Sopenharmony_ci};
3768c2ecf20Sopenharmony_ci
3778c2ecf20Sopenharmony_ci/* MFPCTL group data */
3788c2ecf20Sopenharmony_ci/* mfp0_31_26 reserved */
3798c2ecf20Sopenharmony_ci/* mfp0_25_23 */
3808c2ecf20Sopenharmony_cistatic unsigned int lcd0_d18_mfp_pads[]		= { LCD0_D18 };
3818c2ecf20Sopenharmony_cistatic unsigned int lcd0_d18_mfp_funcs[]	= { S500_MUX_NOR,
3828c2ecf20Sopenharmony_ci						    S500_MUX_SENS1,
3838c2ecf20Sopenharmony_ci						    S500_MUX_PWM2,
3848c2ecf20Sopenharmony_ci						    S500_MUX_PWM4,
3858c2ecf20Sopenharmony_ci						    S500_MUX_LCD0 };
3868c2ecf20Sopenharmony_ci/* mfp0_22_20 */
3878c2ecf20Sopenharmony_cistatic unsigned int rmii_crs_dv_mfp_pads[]	= { ETH_CRS_DV };
3888c2ecf20Sopenharmony_cistatic unsigned int rmii_crs_dv_mfp_funcs[]	= { S500_MUX_ETH_RMII,
3898c2ecf20Sopenharmony_ci						    S500_MUX_ETH_SMII,
3908c2ecf20Sopenharmony_ci						    S500_MUX_SPI2,
3918c2ecf20Sopenharmony_ci						    S500_MUX_UART4,
3928c2ecf20Sopenharmony_ci						    S500_MUX_PWM4 };
3938c2ecf20Sopenharmony_ci/* mfp0_18_16_eth_txd0 */
3948c2ecf20Sopenharmony_cistatic unsigned int rmii_txd0_mfp_pads[]	= { ETH_TXD0 };
3958c2ecf20Sopenharmony_cistatic unsigned int rmii_txd0_mfp_funcs[]	= { S500_MUX_ETH_RMII,
3968c2ecf20Sopenharmony_ci						    S500_MUX_ETH_SMII,
3978c2ecf20Sopenharmony_ci						    S500_MUX_SPI2,
3988c2ecf20Sopenharmony_ci						    S500_MUX_UART6,
3998c2ecf20Sopenharmony_ci						    S500_MUX_PWM4 };
4008c2ecf20Sopenharmony_ci/* mfp0_18_16_eth_txd1 */
4018c2ecf20Sopenharmony_cistatic unsigned int rmii_txd1_mfp_pads[]	= { ETH_TXD1 };
4028c2ecf20Sopenharmony_cistatic unsigned int rmii_txd1_mfp_funcs[]	= { S500_MUX_ETH_RMII,
4038c2ecf20Sopenharmony_ci						    S500_MUX_ETH_SMII,
4048c2ecf20Sopenharmony_ci						    S500_MUX_SPI2,
4058c2ecf20Sopenharmony_ci						    S500_MUX_UART6,
4068c2ecf20Sopenharmony_ci						    S500_MUX_PWM5 };
4078c2ecf20Sopenharmony_ci/* mfp0_15_13_rmii_txen */
4088c2ecf20Sopenharmony_cistatic unsigned int rmii_txen_mfp_pads[]	= { ETH_TXEN };
4098c2ecf20Sopenharmony_cistatic unsigned int rmii_txen_mfp_funcs[]	= { S500_MUX_ETH_RMII,
4108c2ecf20Sopenharmony_ci						    S500_MUX_UART2,
4118c2ecf20Sopenharmony_ci						    S500_MUX_SPI3,
4128c2ecf20Sopenharmony_ci						    S500_MUX_PWM0 };
4138c2ecf20Sopenharmony_ci/* mfp0_15_13_rmii_rxen */
4148c2ecf20Sopenharmony_cistatic unsigned int rmii_rxen_mfp_pads[]	= { ETH_RXER };
4158c2ecf20Sopenharmony_cistatic unsigned int rmii_rxen_mfp_funcs[]	= { S500_MUX_ETH_RMII,
4168c2ecf20Sopenharmony_ci						    S500_MUX_UART2,
4178c2ecf20Sopenharmony_ci						    S500_MUX_SPI3,
4188c2ecf20Sopenharmony_ci						    S500_MUX_PWM1 };
4198c2ecf20Sopenharmony_ci/* mfp0_12_11 reserved */
4208c2ecf20Sopenharmony_ci
4218c2ecf20Sopenharmony_ci/* mfp0_10_8_rmii_rxd1 */
4228c2ecf20Sopenharmony_cistatic unsigned int rmii_rxd1_mfp_pads[]	= { ETH_RXD1 };
4238c2ecf20Sopenharmony_cistatic unsigned int rmii_rxd1_mfp_funcs[]	= { S500_MUX_ETH_RMII,
4248c2ecf20Sopenharmony_ci						    S500_MUX_UART2,
4258c2ecf20Sopenharmony_ci						    S500_MUX_SPI3,
4268c2ecf20Sopenharmony_ci						    S500_MUX_PWM2,
4278c2ecf20Sopenharmony_ci						    S500_MUX_UART5 };
4288c2ecf20Sopenharmony_ci/* mfp0_10_8_rmii_rxd0 */
4298c2ecf20Sopenharmony_cistatic unsigned int rmii_rxd0_mfp_pads[]	= { ETH_RXD0 };
4308c2ecf20Sopenharmony_cistatic unsigned int rmii_rxd0_mfp_funcs[]	= { S500_MUX_ETH_RMII,
4318c2ecf20Sopenharmony_ci						    S500_MUX_UART2,
4328c2ecf20Sopenharmony_ci						    S500_MUX_SPI3,
4338c2ecf20Sopenharmony_ci						    S500_MUX_PWM3,
4348c2ecf20Sopenharmony_ci						    S500_MUX_UART5 };
4358c2ecf20Sopenharmony_ci/* mfp0_7_6 */
4368c2ecf20Sopenharmony_cistatic unsigned int rmii_ref_clk_mfp_pads[]	= { ETH_REF_CLK };
4378c2ecf20Sopenharmony_cistatic unsigned int rmii_ref_clk_mfp_funcs[]	= { S500_MUX_ETH_RMII,
4388c2ecf20Sopenharmony_ci						    S500_MUX_UART4,
4398c2ecf20Sopenharmony_ci						    S500_MUX_SPI2,
4408c2ecf20Sopenharmony_ci						    S500_MUX_RESERVED,
4418c2ecf20Sopenharmony_ci						    S500_MUX_ETH_SMII };
4428c2ecf20Sopenharmony_ci/* mfp0_5 */
4438c2ecf20Sopenharmony_cistatic unsigned int i2s_d0_mfp_pads[]		= { I2S_D0 };
4448c2ecf20Sopenharmony_cistatic unsigned int i2s_d0_mfp_funcs[]		= { S500_MUX_I2S0,
4458c2ecf20Sopenharmony_ci						    S500_MUX_NOR };
4468c2ecf20Sopenharmony_ci/* mfp0_4_3 */
4478c2ecf20Sopenharmony_cistatic unsigned int i2s_pcm1_mfp_pads[]		= { I2S_LRCLK0, I2S_MCLK0 };
4488c2ecf20Sopenharmony_cistatic unsigned int i2s_pcm1_mfp_funcs[]	= { S500_MUX_I2S0,
4498c2ecf20Sopenharmony_ci						    S500_MUX_NOR,
4508c2ecf20Sopenharmony_ci						    S500_MUX_PCM1 };
4518c2ecf20Sopenharmony_ci/* mfp0_2_1_i2s0 */
4528c2ecf20Sopenharmony_cistatic unsigned int i2s0_pcm0_mfp_pads[]	= { I2S_BCLK0 };
4538c2ecf20Sopenharmony_cistatic unsigned int i2s0_pcm0_mfp_funcs[]	= { S500_MUX_I2S0,
4548c2ecf20Sopenharmony_ci						    S500_MUX_NOR,
4558c2ecf20Sopenharmony_ci						    S500_MUX_PCM0 };
4568c2ecf20Sopenharmony_ci/* mfp0_2_1_i2s1 */
4578c2ecf20Sopenharmony_cistatic unsigned int i2s1_pcm0_mfp_pads[]	= { I2S_BCLK1, I2S_LRCLK1,
4588c2ecf20Sopenharmony_ci						    I2S_MCLK1 };
4598c2ecf20Sopenharmony_cistatic unsigned int i2s1_pcm0_mfp_funcs[]	= { S500_MUX_I2S1,
4608c2ecf20Sopenharmony_ci						    S500_MUX_NOR,
4618c2ecf20Sopenharmony_ci						    S500_MUX_PCM0 };
4628c2ecf20Sopenharmony_ci/* mfp0_0 */
4638c2ecf20Sopenharmony_cistatic unsigned int i2s_d1_mfp_pads[]		= { I2S_D1 };
4648c2ecf20Sopenharmony_cistatic unsigned int i2s_d1_mfp_funcs[]		= { S500_MUX_I2S1,
4658c2ecf20Sopenharmony_ci						    S500_MUX_NOR };
4668c2ecf20Sopenharmony_ci/* mfp1_31_29_ks_in0 */
4678c2ecf20Sopenharmony_cistatic unsigned int ks_in0_mfp_pads[]		= { KS_IN0 };
4688c2ecf20Sopenharmony_cistatic unsigned int ks_in0_mfp_funcs[]		= { S500_MUX_KS,
4698c2ecf20Sopenharmony_ci						    S500_MUX_JTAG,
4708c2ecf20Sopenharmony_ci						    S500_MUX_NOR,
4718c2ecf20Sopenharmony_ci						    S500_MUX_PWM0,
4728c2ecf20Sopenharmony_ci						    S500_MUX_PWM4,
4738c2ecf20Sopenharmony_ci						    S500_MUX_SENS1,
4748c2ecf20Sopenharmony_ci						    S500_MUX_PWM4,
4758c2ecf20Sopenharmony_ci						    S500_MUX_P0 };
4768c2ecf20Sopenharmony_ci/* mfp1_31_29_ks_in1 */
4778c2ecf20Sopenharmony_cistatic unsigned int ks_in1_mfp_pads[]		= { KS_IN1 };
4788c2ecf20Sopenharmony_cistatic unsigned int ks_in1_mfp_funcs[]		= { S500_MUX_KS,
4798c2ecf20Sopenharmony_ci						    S500_MUX_JTAG,
4808c2ecf20Sopenharmony_ci						    S500_MUX_NOR,
4818c2ecf20Sopenharmony_ci						    S500_MUX_PWM1,
4828c2ecf20Sopenharmony_ci						    S500_MUX_PWM5,
4838c2ecf20Sopenharmony_ci						    S500_MUX_SENS1,
4848c2ecf20Sopenharmony_ci						    S500_MUX_PWM1,
4858c2ecf20Sopenharmony_ci						    S500_MUX_USB30 };
4868c2ecf20Sopenharmony_ci/* mfp1_31_29_ks_in2 */
4878c2ecf20Sopenharmony_cistatic unsigned int ks_in2_mfp_pads[]		= { KS_IN2 };
4888c2ecf20Sopenharmony_cistatic unsigned int ks_in2_mfp_funcs[]		= { S500_MUX_KS,
4898c2ecf20Sopenharmony_ci						    S500_MUX_JTAG,
4908c2ecf20Sopenharmony_ci						    S500_MUX_NOR,
4918c2ecf20Sopenharmony_ci						    S500_MUX_PWM0,
4928c2ecf20Sopenharmony_ci						    S500_MUX_PWM0,
4938c2ecf20Sopenharmony_ci						    S500_MUX_SENS1,
4948c2ecf20Sopenharmony_ci						    S500_MUX_PWM0,
4958c2ecf20Sopenharmony_ci						    S500_MUX_P0 };
4968c2ecf20Sopenharmony_ci/* mfp1_28_26_ks_in3 */
4978c2ecf20Sopenharmony_cistatic unsigned int ks_in3_mfp_pads[]		= { KS_IN3 };
4988c2ecf20Sopenharmony_cistatic unsigned int ks_in3_mfp_funcs[]		= { S500_MUX_KS,
4998c2ecf20Sopenharmony_ci						    S500_MUX_JTAG,
5008c2ecf20Sopenharmony_ci						    S500_MUX_NOR,
5018c2ecf20Sopenharmony_ci						    S500_MUX_PWM1,
5028c2ecf20Sopenharmony_ci						    S500_MUX_RESERVED,
5038c2ecf20Sopenharmony_ci						    S500_MUX_SENS1 };
5048c2ecf20Sopenharmony_ci/* mfp1_28_26_ks_out0 */
5058c2ecf20Sopenharmony_cistatic unsigned int ks_out0_mfp_pads[]		= { KS_OUT0 };
5068c2ecf20Sopenharmony_cistatic unsigned int ks_out0_mfp_funcs[]		= { S500_MUX_KS,
5078c2ecf20Sopenharmony_ci						    S500_MUX_UART5,
5088c2ecf20Sopenharmony_ci						    S500_MUX_NOR,
5098c2ecf20Sopenharmony_ci						    S500_MUX_PWM2,
5108c2ecf20Sopenharmony_ci						    S500_MUX_RESERVED,
5118c2ecf20Sopenharmony_ci						    S500_MUX_SENS1,
5128c2ecf20Sopenharmony_ci						    S500_MUX_SD0 };
5138c2ecf20Sopenharmony_ci/* mfp1_28_26_ks_out1 */
5148c2ecf20Sopenharmony_cistatic unsigned int ks_out1_mfp_pads[]		= { KS_OUT1 };
5158c2ecf20Sopenharmony_cistatic unsigned int ks_out1_mfp_funcs[]		= { S500_MUX_KS,
5168c2ecf20Sopenharmony_ci						    S500_MUX_JTAG,
5178c2ecf20Sopenharmony_ci						    S500_MUX_NOR,
5188c2ecf20Sopenharmony_ci						    S500_MUX_PWM3,
5198c2ecf20Sopenharmony_ci						    S500_MUX_RESERVED,
5208c2ecf20Sopenharmony_ci						    S500_MUX_SENS1,
5218c2ecf20Sopenharmony_ci						    S500_MUX_SD0 };
5228c2ecf20Sopenharmony_ci/* mfp1_25_23 */
5238c2ecf20Sopenharmony_cistatic unsigned int ks_out2_mfp_pads[]		= { KS_OUT2 };
5248c2ecf20Sopenharmony_cistatic unsigned int ks_out2_mfp_funcs[]		= { S500_MUX_SD0,
5258c2ecf20Sopenharmony_ci						    S500_MUX_KS,
5268c2ecf20Sopenharmony_ci						    S500_MUX_NOR,
5278c2ecf20Sopenharmony_ci						    S500_MUX_PWM2,
5288c2ecf20Sopenharmony_ci						    S500_MUX_UART5,
5298c2ecf20Sopenharmony_ci						    S500_MUX_SENS1 };
5308c2ecf20Sopenharmony_ci/* mfp1_22_21 */
5318c2ecf20Sopenharmony_cistatic unsigned int lvds_o_pn_mfp_pads[]	= { LVDS_OEP, LVDS_OEN,
5328c2ecf20Sopenharmony_ci						    LVDS_ODP, LVDS_ODN,
5338c2ecf20Sopenharmony_ci						    LVDS_OCP, LVDS_OCN,
5348c2ecf20Sopenharmony_ci						    LVDS_OBP, LVDS_OBN,
5358c2ecf20Sopenharmony_ci						    LVDS_OAP, LVDS_OAN };
5368c2ecf20Sopenharmony_cistatic unsigned int lvds_o_pn_mfp_funcs[]	= { S500_MUX_LVDS,
5378c2ecf20Sopenharmony_ci						    S500_MUX_TS,
5388c2ecf20Sopenharmony_ci						    S500_MUX_LCD0 };
5398c2ecf20Sopenharmony_ci/* mfp1_20_19 */
5408c2ecf20Sopenharmony_cistatic unsigned int dsi_dn0_mfp_pads[]		= { DSI_DN0 };
5418c2ecf20Sopenharmony_cistatic unsigned int dsi_dn0_mfp_funcs[]		= { S500_MUX_DSI,
5428c2ecf20Sopenharmony_ci						    S500_MUX_UART2,
5438c2ecf20Sopenharmony_ci						    S500_MUX_SPI0 };
5448c2ecf20Sopenharmony_ci/* mfp1_18_17 */
5458c2ecf20Sopenharmony_cistatic unsigned int dsi_dp2_mfp_pads[]		= { DSI_DP2 };
5468c2ecf20Sopenharmony_cistatic unsigned int dsi_dp2_mfp_funcs[]		= { S500_MUX_DSI,
5478c2ecf20Sopenharmony_ci						    S500_MUX_UART2,
5488c2ecf20Sopenharmony_ci						    S500_MUX_SPI0,
5498c2ecf20Sopenharmony_ci						    S500_MUX_SD1 };
5508c2ecf20Sopenharmony_ci/* mfp1_16_14 */
5518c2ecf20Sopenharmony_cistatic unsigned int lcd0_d17_mfp_pads[]		= { LCD0_D17 };
5528c2ecf20Sopenharmony_cistatic unsigned int lcd0_d17_mfp_funcs[]	= { S500_MUX_NOR,
5538c2ecf20Sopenharmony_ci						    S500_MUX_SD0,
5548c2ecf20Sopenharmony_ci						    S500_MUX_SD1,
5558c2ecf20Sopenharmony_ci						    S500_MUX_PWM3,
5568c2ecf20Sopenharmony_ci						    S500_MUX_LCD0 };
5578c2ecf20Sopenharmony_ci/* mfp1_13_12 */
5588c2ecf20Sopenharmony_cistatic unsigned int dsi_dp3_mfp_pads[]		= { DSI_DP3 };
5598c2ecf20Sopenharmony_cistatic unsigned int dsi_dp3_mfp_funcs[]		= { S500_MUX_DSI,
5608c2ecf20Sopenharmony_ci						    S500_MUX_SD0,
5618c2ecf20Sopenharmony_ci						    S500_MUX_SD1,
5628c2ecf20Sopenharmony_ci						    S500_MUX_LCD0 };
5638c2ecf20Sopenharmony_ci/* mfp1_11_10 */
5648c2ecf20Sopenharmony_cistatic unsigned int dsi_dn3_mfp_pads[]		= { DSI_DN3 };
5658c2ecf20Sopenharmony_cistatic unsigned int dsi_dn3_mfp_funcs[]		= { S500_MUX_DSI,
5668c2ecf20Sopenharmony_ci						    S500_MUX_RESERVED,
5678c2ecf20Sopenharmony_ci						    S500_MUX_SD1,
5688c2ecf20Sopenharmony_ci						    S500_MUX_LCD0 };
5698c2ecf20Sopenharmony_ci/* mfp1_9_7 */
5708c2ecf20Sopenharmony_cistatic unsigned int dsi_dp0_mfp_pads[]		= { DSI_DP0 };
5718c2ecf20Sopenharmony_cistatic unsigned int dsi_dp0_mfp_funcs[]		= { S500_MUX_DSI,
5728c2ecf20Sopenharmony_ci						    S500_MUX_RESERVED,
5738c2ecf20Sopenharmony_ci						    S500_MUX_SD0,
5748c2ecf20Sopenharmony_ci						    S500_MUX_UART2,
5758c2ecf20Sopenharmony_ci						    S500_MUX_SPI0 };
5768c2ecf20Sopenharmony_ci/* mfp1_6_5 */
5778c2ecf20Sopenharmony_cistatic unsigned int lvds_ee_pn_mfp_pads[]	= { LVDS_EEP, LVDS_EEN };
5788c2ecf20Sopenharmony_cistatic unsigned int lvds_ee_pn_mfp_funcs[]	= { S500_MUX_LVDS,
5798c2ecf20Sopenharmony_ci						    S500_MUX_NOR,
5808c2ecf20Sopenharmony_ci						    S500_MUX_TS,
5818c2ecf20Sopenharmony_ci						    S500_MUX_LCD0 };
5828c2ecf20Sopenharmony_ci/* mfp1_4_3 */
5838c2ecf20Sopenharmony_cistatic unsigned int spi0_i2c_pcm_mfp_pads[]	= { SPI0_SCLK, SPI0_MOSI };
5848c2ecf20Sopenharmony_cistatic unsigned int spi0_i2c_pcm_mfp_funcs[]	= { S500_MUX_SPI0,
5858c2ecf20Sopenharmony_ci						    S500_MUX_NOR,
5868c2ecf20Sopenharmony_ci						    S500_MUX_I2C3,
5878c2ecf20Sopenharmony_ci						    S500_MUX_PCM0 };
5888c2ecf20Sopenharmony_ci/* mfp1_2_0 */
5898c2ecf20Sopenharmony_cistatic unsigned int spi0_i2s_pcm_mfp_pads[]	= { SPI0_SS, SPI0_MISO };
5908c2ecf20Sopenharmony_cistatic unsigned int spi0_i2s_pcm_mfp_funcs[]	= { S500_MUX_SPI0,
5918c2ecf20Sopenharmony_ci						    S500_MUX_NOR,
5928c2ecf20Sopenharmony_ci						    S500_MUX_I2S1,
5938c2ecf20Sopenharmony_ci						    S500_MUX_PCM1,
5948c2ecf20Sopenharmony_ci						    S500_MUX_PCM0 };
5958c2ecf20Sopenharmony_ci/* mfp2_31 reserved */
5968c2ecf20Sopenharmony_ci/* mfp2_30_29 */
5978c2ecf20Sopenharmony_cistatic unsigned int dsi_dnp1_cp_mfp_pads[]	= { DSI_DP1, DSI_CP, DSI_CN };
5988c2ecf20Sopenharmony_cistatic unsigned int dsi_dnp1_cp_mfp_funcs[]	= { S500_MUX_DSI,
5998c2ecf20Sopenharmony_ci						    S500_MUX_SD1,
6008c2ecf20Sopenharmony_ci						    S500_MUX_LCD0 };
6018c2ecf20Sopenharmony_ci/* mfp2_28_27 */
6028c2ecf20Sopenharmony_cistatic unsigned int lvds_e_pn_mfp_pads[]	= { LVDS_EDP, LVDS_EDN,
6038c2ecf20Sopenharmony_ci						    LVDS_ECP, LVDS_ECN,
6048c2ecf20Sopenharmony_ci						    LVDS_EBP, LVDS_EBN,
6058c2ecf20Sopenharmony_ci						    LVDS_EAP, LVDS_EAN };
6068c2ecf20Sopenharmony_cistatic unsigned int lvds_e_pn_mfp_funcs[]	= { S500_MUX_LVDS,
6078c2ecf20Sopenharmony_ci						    S500_MUX_NOR,
6088c2ecf20Sopenharmony_ci						    S500_MUX_LCD0 };
6098c2ecf20Sopenharmony_ci/* mfp2_26_24 */
6108c2ecf20Sopenharmony_cistatic unsigned int dsi_dn2_mfp_pads[]		= { DSI_DN2 };
6118c2ecf20Sopenharmony_cistatic unsigned int dsi_dn2_mfp_funcs[]		= { S500_MUX_DSI,
6128c2ecf20Sopenharmony_ci						    S500_MUX_RESERVED,
6138c2ecf20Sopenharmony_ci						    S500_MUX_SD1,
6148c2ecf20Sopenharmony_ci						    S500_MUX_UART2,
6158c2ecf20Sopenharmony_ci						    S500_MUX_SPI0 };
6168c2ecf20Sopenharmony_ci/* mfp2_23 */
6178c2ecf20Sopenharmony_cistatic unsigned int uart2_rtsb_mfp_pads[]	= { UART2_RTSB };
6188c2ecf20Sopenharmony_cistatic unsigned int uart2_rtsb_mfp_funcs[]	= { S500_MUX_UART2,
6198c2ecf20Sopenharmony_ci						    S500_MUX_UART0 };
6208c2ecf20Sopenharmony_ci/* mfp2_22 */
6218c2ecf20Sopenharmony_cistatic unsigned int uart2_ctsb_mfp_pads[]	= { UART2_CTSB };
6228c2ecf20Sopenharmony_cistatic unsigned int uart2_ctsb_mfp_funcs[]	= { S500_MUX_UART2,
6238c2ecf20Sopenharmony_ci						    S500_MUX_UART0 };
6248c2ecf20Sopenharmony_ci/* mfp2_21 */
6258c2ecf20Sopenharmony_cistatic unsigned int uart3_rtsb_mfp_pads[]	= { UART3_RTSB };
6268c2ecf20Sopenharmony_cistatic unsigned int uart3_rtsb_mfp_funcs[]	= { S500_MUX_UART3,
6278c2ecf20Sopenharmony_ci						    S500_MUX_UART5 };
6288c2ecf20Sopenharmony_ci/* mfp2_20 */
6298c2ecf20Sopenharmony_cistatic unsigned int uart3_ctsb_mfp_pads[]	= { UART3_CTSB };
6308c2ecf20Sopenharmony_cistatic unsigned int uart3_ctsb_mfp_funcs[]	= { S500_MUX_UART3,
6318c2ecf20Sopenharmony_ci						    S500_MUX_UART5 };
6328c2ecf20Sopenharmony_ci/* mfp2_19_17 */
6338c2ecf20Sopenharmony_cistatic unsigned int sd0_d0_mfp_pads[]		= { SD0_D0 };
6348c2ecf20Sopenharmony_cistatic unsigned int sd0_d0_mfp_funcs[]		= { S500_MUX_SD0,
6358c2ecf20Sopenharmony_ci						    S500_MUX_NOR,
6368c2ecf20Sopenharmony_ci						    S500_MUX_RESERVED,
6378c2ecf20Sopenharmony_ci						    S500_MUX_JTAG,
6388c2ecf20Sopenharmony_ci						    S500_MUX_UART2,
6398c2ecf20Sopenharmony_ci						    S500_MUX_UART5 };
6408c2ecf20Sopenharmony_ci/* mfp2_16_14 */
6418c2ecf20Sopenharmony_cistatic unsigned int sd0_d1_mfp_pads[]		= { SD0_D1 };
6428c2ecf20Sopenharmony_cistatic unsigned int sd0_d1_mfp_funcs[]		= { S500_MUX_SD0,
6438c2ecf20Sopenharmony_ci						    S500_MUX_NOR,
6448c2ecf20Sopenharmony_ci						    S500_MUX_RESERVED,
6458c2ecf20Sopenharmony_ci						    S500_MUX_RESERVED,
6468c2ecf20Sopenharmony_ci						    S500_MUX_UART2,
6478c2ecf20Sopenharmony_ci						    S500_MUX_UART5 };
6488c2ecf20Sopenharmony_ci/* mfp2_13_11 */
6498c2ecf20Sopenharmony_cistatic unsigned int sd0_d2_d3_mfp_pads[]	= { SD0_D2, SD0_D3 };
6508c2ecf20Sopenharmony_cistatic unsigned int sd0_d2_d3_mfp_funcs[]	= { S500_MUX_SD0,
6518c2ecf20Sopenharmony_ci						    S500_MUX_NOR,
6528c2ecf20Sopenharmony_ci						    S500_MUX_RESERVED,
6538c2ecf20Sopenharmony_ci						    S500_MUX_JTAG,
6548c2ecf20Sopenharmony_ci						    S500_MUX_UART2,
6558c2ecf20Sopenharmony_ci						    S500_MUX_UART1 };
6568c2ecf20Sopenharmony_ci/* mfp2_10_9 */
6578c2ecf20Sopenharmony_cistatic unsigned int sd1_d0_d3_mfp_pads[]	= { SD1_D0, SD1_D1,
6588c2ecf20Sopenharmony_ci						    SD1_D2, SD1_D3 };
6598c2ecf20Sopenharmony_cistatic unsigned int sd1_d0_d3_mfp_funcs[]	= { S500_MUX_SD0,
6608c2ecf20Sopenharmony_ci						    S500_MUX_NOR,
6618c2ecf20Sopenharmony_ci						    S500_MUX_RESERVED,
6628c2ecf20Sopenharmony_ci						    S500_MUX_SD1 };
6638c2ecf20Sopenharmony_ci/* mfp2_8_7 */
6648c2ecf20Sopenharmony_cistatic unsigned int sd0_cmd_mfp_pads[]		= { SD0_CMD };
6658c2ecf20Sopenharmony_cistatic unsigned int sd0_cmd_mfp_funcs[]		= { S500_MUX_SD0,
6668c2ecf20Sopenharmony_ci						    S500_MUX_NOR,
6678c2ecf20Sopenharmony_ci						    S500_MUX_RESERVED,
6688c2ecf20Sopenharmony_ci						    S500_MUX_JTAG };
6698c2ecf20Sopenharmony_ci/* mfp2_6_5 */
6708c2ecf20Sopenharmony_cistatic unsigned int sd0_clk_mfp_pads[]		= { SD0_CLK };
6718c2ecf20Sopenharmony_cistatic unsigned int sd0_clk_mfp_funcs[]		= { S500_MUX_SD0,
6728c2ecf20Sopenharmony_ci						    S500_MUX_RESERVED,
6738c2ecf20Sopenharmony_ci						    S500_MUX_JTAG };
6748c2ecf20Sopenharmony_ci/* mfp2_4_3 */
6758c2ecf20Sopenharmony_cistatic unsigned int sd1_cmd_mfp_pads[]		= { SD1_CMD };
6768c2ecf20Sopenharmony_cistatic unsigned int sd1_cmd_mfp_funcs[]		= { S500_MUX_SD1,
6778c2ecf20Sopenharmony_ci						    S500_MUX_NOR };
6788c2ecf20Sopenharmony_ci/* mfp2_2_0 */
6798c2ecf20Sopenharmony_cistatic unsigned int uart0_rx_mfp_pads[]		= { UART0_RX };
6808c2ecf20Sopenharmony_cistatic unsigned int uart0_rx_mfp_funcs[]	= { S500_MUX_UART0,
6818c2ecf20Sopenharmony_ci						    S500_MUX_UART2,
6828c2ecf20Sopenharmony_ci						    S500_MUX_SPI1,
6838c2ecf20Sopenharmony_ci						    S500_MUX_I2C0,
6848c2ecf20Sopenharmony_ci						    S500_MUX_PCM1,
6858c2ecf20Sopenharmony_ci						    S500_MUX_I2S1 };
6868c2ecf20Sopenharmony_ci/* mfp3_31 reserved */
6878c2ecf20Sopenharmony_ci/* mfp3_30 */
6888c2ecf20Sopenharmony_cistatic unsigned int clko_25m_mfp_pads[]		= { CLKO_25M };
6898c2ecf20Sopenharmony_cistatic unsigned int clko_25m_mfp_funcs[]	= { S500_MUX_RESERVED,
6908c2ecf20Sopenharmony_ci						    S500_MUX_CLKO_25M };
6918c2ecf20Sopenharmony_ci/* mfp3_29_28 */
6928c2ecf20Sopenharmony_cistatic unsigned int csi_cn_cp_mfp_pads[]	= { CSI_CN, CSI_CP };
6938c2ecf20Sopenharmony_cistatic unsigned int csi_cn_cp_mfp_funcs[]	= { S500_MUX_MIPI_CSI,
6948c2ecf20Sopenharmony_ci						    S500_MUX_SENS0 };
6958c2ecf20Sopenharmony_ci/* mfp3_27_24 reserved */
6968c2ecf20Sopenharmony_ci/* mfp3_23_22 */
6978c2ecf20Sopenharmony_cistatic unsigned int sens0_ckout_mfp_pads[]	= { SENSOR0_CKOUT };
6988c2ecf20Sopenharmony_cistatic unsigned int sens0_ckout_mfp_funcs[]	= { S500_MUX_SENS0,
6998c2ecf20Sopenharmony_ci						    S500_MUX_NOR,
7008c2ecf20Sopenharmony_ci						    S500_MUX_SENS1,
7018c2ecf20Sopenharmony_ci						    S500_MUX_PWM1 };
7028c2ecf20Sopenharmony_ci/* mfp3_21_19 */
7038c2ecf20Sopenharmony_cistatic unsigned int uart0_tx_mfp_pads[]		= { UART0_TX };
7048c2ecf20Sopenharmony_cistatic unsigned int uart0_tx_mfp_funcs[]	= { S500_MUX_UART0,
7058c2ecf20Sopenharmony_ci						    S500_MUX_UART2,
7068c2ecf20Sopenharmony_ci						    S500_MUX_SPI1,
7078c2ecf20Sopenharmony_ci						    S500_MUX_I2C0,
7088c2ecf20Sopenharmony_ci						    S500_MUX_SPDIF,
7098c2ecf20Sopenharmony_ci						    S500_MUX_PCM1,
7108c2ecf20Sopenharmony_ci						    S500_MUX_I2S1 };
7118c2ecf20Sopenharmony_ci/* mfp3_18_16 */
7128c2ecf20Sopenharmony_cistatic unsigned int i2c0_mfp_pads[]		= { I2C0_SCLK,
7138c2ecf20Sopenharmony_ci						    I2C0_SDATA };
7148c2ecf20Sopenharmony_cistatic unsigned int i2c0_mfp_funcs[]		= { S500_MUX_I2C0,
7158c2ecf20Sopenharmony_ci						    S500_MUX_UART2,
7168c2ecf20Sopenharmony_ci						    S500_MUX_I2C1,
7178c2ecf20Sopenharmony_ci						    S500_MUX_UART1,
7188c2ecf20Sopenharmony_ci						    S500_MUX_SPI1 };
7198c2ecf20Sopenharmony_ci/* mfp3_15_14 */
7208c2ecf20Sopenharmony_cistatic unsigned int csi_dn_dp_mfp_pads[]	= { CSI_DN0, CSI_DN1,
7218c2ecf20Sopenharmony_ci						    CSI_DN2, CSI_DN3,
7228c2ecf20Sopenharmony_ci						    CSI_DP0, CSI_DP1,
7238c2ecf20Sopenharmony_ci						    CSI_DP2, CSI_DP3 };
7248c2ecf20Sopenharmony_cistatic unsigned int csi_dn_dp_mfp_funcs[]	= { S500_MUX_MIPI_CSI,
7258c2ecf20Sopenharmony_ci						    S500_MUX_SENS0 };
7268c2ecf20Sopenharmony_ci/* mfp3_13_12 */
7278c2ecf20Sopenharmony_cistatic unsigned int sen0_pclk_mfp_pads[]	= { SENSOR0_PCLK };
7288c2ecf20Sopenharmony_cistatic unsigned int sen0_pclk_mfp_funcs[]	= { S500_MUX_SENS0,
7298c2ecf20Sopenharmony_ci						    S500_MUX_NOR,
7308c2ecf20Sopenharmony_ci						    S500_MUX_PWM0 };
7318c2ecf20Sopenharmony_ci/* mfp3_11_10 */
7328c2ecf20Sopenharmony_cistatic unsigned int pcm1_in_mfp_pads[]		= { PCM1_IN };
7338c2ecf20Sopenharmony_cistatic unsigned int pcm1_in_mfp_funcs[]		= { S500_MUX_PCM1,
7348c2ecf20Sopenharmony_ci						    S500_MUX_SENS1,
7358c2ecf20Sopenharmony_ci						    S500_MUX_UART4,
7368c2ecf20Sopenharmony_ci						    S500_MUX_PWM4 };
7378c2ecf20Sopenharmony_ci/* mfp3_9_8 */
7388c2ecf20Sopenharmony_cistatic unsigned int pcm1_clk_mfp_pads[]		= { PCM1_CLK };
7398c2ecf20Sopenharmony_cistatic unsigned int pcm1_clk_mfp_funcs[]	= { S500_MUX_PCM1,
7408c2ecf20Sopenharmony_ci						    S500_MUX_SENS1,
7418c2ecf20Sopenharmony_ci						    S500_MUX_UART4,
7428c2ecf20Sopenharmony_ci						    S500_MUX_PWM5 };
7438c2ecf20Sopenharmony_ci/* mfp3_7_6 */
7448c2ecf20Sopenharmony_cistatic unsigned int pcm1_sync_mfp_pads[]	= { PCM1_SYNC };
7458c2ecf20Sopenharmony_cistatic unsigned int pcm1_sync_mfp_funcs[]	= { S500_MUX_PCM1,
7468c2ecf20Sopenharmony_ci						    S500_MUX_SENS1,
7478c2ecf20Sopenharmony_ci						    S500_MUX_UART6,
7488c2ecf20Sopenharmony_ci						    S500_MUX_I2C3 };
7498c2ecf20Sopenharmony_ci/* mfp3_5_4 */
7508c2ecf20Sopenharmony_cistatic unsigned int pcm1_out_mfp_pads[]		= { PCM1_OUT };
7518c2ecf20Sopenharmony_cistatic unsigned int pcm1_out_mfp_funcs[]	= { S500_MUX_PCM1,
7528c2ecf20Sopenharmony_ci						    S500_MUX_SENS1,
7538c2ecf20Sopenharmony_ci						    S500_MUX_UART6,
7548c2ecf20Sopenharmony_ci						    S500_MUX_I2C3 };
7558c2ecf20Sopenharmony_ci/* mfp3_3 */
7568c2ecf20Sopenharmony_cistatic unsigned int dnand_data_wr_mfp_pads[]	= { DNAND_D0, DNAND_D1,
7578c2ecf20Sopenharmony_ci						    DNAND_D2, DNAND_D3,
7588c2ecf20Sopenharmony_ci						    DNAND_D4, DNAND_D5,
7598c2ecf20Sopenharmony_ci						    DNAND_D6, DNAND_D7,
7608c2ecf20Sopenharmony_ci						    DNAND_RDB, DNAND_RDBN };
7618c2ecf20Sopenharmony_cistatic unsigned int dnand_data_wr_mfp_funcs[]	= { S500_MUX_NAND,
7628c2ecf20Sopenharmony_ci						    S500_MUX_SD2 };
7638c2ecf20Sopenharmony_ci/* mfp3_2 */
7648c2ecf20Sopenharmony_cistatic unsigned int dnand_acle_ce0_mfp_pads[]	= { DNAND_ALE,
7658c2ecf20Sopenharmony_ci						    DNAND_CLE,
7668c2ecf20Sopenharmony_ci						    DNAND_CEB0,
7678c2ecf20Sopenharmony_ci						    DNAND_CEB1 };
7688c2ecf20Sopenharmony_cistatic unsigned int dnand_acle_ce0_mfp_funcs[]	= { S500_MUX_NAND,
7698c2ecf20Sopenharmony_ci						    S500_MUX_SPI2 };
7708c2ecf20Sopenharmony_ci/* mfp3_1_0_nand_ceb2 */
7718c2ecf20Sopenharmony_cistatic unsigned int nand_ceb2_mfp_pads[]	= { DNAND_CEB2 };
7728c2ecf20Sopenharmony_cistatic unsigned int nand_ceb2_mfp_funcs[]	= { S500_MUX_NAND,
7738c2ecf20Sopenharmony_ci						    S500_MUX_PWM5 };
7748c2ecf20Sopenharmony_ci/* mfp3_1_0_nand_ceb3 */
7758c2ecf20Sopenharmony_cistatic unsigned int nand_ceb3_mfp_pads[]	= { DNAND_CEB3 };
7768c2ecf20Sopenharmony_cistatic unsigned int nand_ceb3_mfp_funcs[]	= { S500_MUX_NAND,
7778c2ecf20Sopenharmony_ci						    S500_MUX_PWM4 };
7788c2ecf20Sopenharmony_ci
7798c2ecf20Sopenharmony_ci/* PADDRV group data */
7808c2ecf20Sopenharmony_ci/* paddrv0_29_28 */
7818c2ecf20Sopenharmony_cistatic unsigned int sirq_drv_pads[]		= { SIRQ0, SIRQ1, SIRQ2 };
7828c2ecf20Sopenharmony_ci/* paddrv0_23_22 */
7838c2ecf20Sopenharmony_cistatic unsigned int rmii_txd01_txen_drv_pads[]	= { ETH_TXD0, ETH_TXD1,
7848c2ecf20Sopenharmony_ci						    ETH_TXEN };
7858c2ecf20Sopenharmony_ci/* paddrv0_21_20 */
7868c2ecf20Sopenharmony_cistatic unsigned int rmii_rxer_drv_pads[]	= { ETH_RXER };
7878c2ecf20Sopenharmony_ci/* paddrv0_19_18 */
7888c2ecf20Sopenharmony_cistatic unsigned int rmii_crs_drv_pads[]		= { ETH_CRS_DV };
7898c2ecf20Sopenharmony_ci/* paddrv0_17_16 */
7908c2ecf20Sopenharmony_cistatic unsigned int rmii_rxd10_drv_pads[]	= { ETH_RXD0, ETH_RXD1 };
7918c2ecf20Sopenharmony_ci/* paddrv0_15_14 */
7928c2ecf20Sopenharmony_cistatic unsigned int rmii_ref_clk_drv_pads[]	= { ETH_REF_CLK };
7938c2ecf20Sopenharmony_ci/* paddrv0_13_12 */
7948c2ecf20Sopenharmony_cistatic unsigned int smi_mdc_mdio_drv_pads[]	= { ETH_MDC, ETH_MDIO };
7958c2ecf20Sopenharmony_ci/* paddrv0_11_10 */
7968c2ecf20Sopenharmony_cistatic unsigned int i2s_d0_drv_pads[]		= { I2S_D0 };
7978c2ecf20Sopenharmony_ci/* paddrv0_9_8 */
7988c2ecf20Sopenharmony_cistatic unsigned int i2s_bclk0_drv_pads[]	= { I2S_BCLK0 };
7998c2ecf20Sopenharmony_ci/* paddrv0_7_6 */
8008c2ecf20Sopenharmony_cistatic unsigned int i2s3_drv_pads[]		= { I2S_LRCLK0, I2S_MCLK0,
8018c2ecf20Sopenharmony_ci						    I2S_D1 };
8028c2ecf20Sopenharmony_ci/* paddrv0_5_4 */
8038c2ecf20Sopenharmony_cistatic unsigned int i2s13_drv_pads[]		= { I2S_BCLK1, I2S_LRCLK1,
8048c2ecf20Sopenharmony_ci						    I2S_MCLK1 };
8058c2ecf20Sopenharmony_ci/* paddrv0_3_2 */
8068c2ecf20Sopenharmony_cistatic unsigned int pcm1_drv_pads[]		= { PCM1_IN, PCM1_CLK,
8078c2ecf20Sopenharmony_ci						    PCM1_SYNC, PCM1_OUT };
8088c2ecf20Sopenharmony_ci/* paddrv0_1_0 */
8098c2ecf20Sopenharmony_cistatic unsigned int ks_in_drv_pads[]		= { KS_IN0, KS_IN1,
8108c2ecf20Sopenharmony_ci						    KS_IN2, KS_IN3 };
8118c2ecf20Sopenharmony_ci/* paddrv1_31_30 */
8128c2ecf20Sopenharmony_cistatic unsigned int ks_out_drv_pads[]		= { KS_OUT0, KS_OUT1, KS_OUT2 };
8138c2ecf20Sopenharmony_ci/* paddrv1_29_28 */
8148c2ecf20Sopenharmony_cistatic unsigned int lvds_all_drv_pads[]		= { LVDS_OEP, LVDS_OEN,
8158c2ecf20Sopenharmony_ci						    LVDS_ODP, LVDS_ODN,
8168c2ecf20Sopenharmony_ci						    LVDS_OCP, LVDS_OCN,
8178c2ecf20Sopenharmony_ci						    LVDS_OBP, LVDS_OBN,
8188c2ecf20Sopenharmony_ci						    LVDS_OAP, LVDS_OAN,
8198c2ecf20Sopenharmony_ci						    LVDS_EEP, LVDS_EEN,
8208c2ecf20Sopenharmony_ci						    LVDS_EDP, LVDS_EDN,
8218c2ecf20Sopenharmony_ci						    LVDS_ECP, LVDS_ECN,
8228c2ecf20Sopenharmony_ci						    LVDS_EBP, LVDS_EBN,
8238c2ecf20Sopenharmony_ci						    LVDS_EAP, LVDS_EAN };
8248c2ecf20Sopenharmony_ci/* paddrv1_27_26 */
8258c2ecf20Sopenharmony_cistatic unsigned int lcd_dsi_drv_pads[]		= { DSI_DP3, DSI_DN3, DSI_DP1,
8268c2ecf20Sopenharmony_ci						    DSI_DN1, DSI_CP, DSI_CN };
8278c2ecf20Sopenharmony_ci/* paddrv1_25_24 */
8288c2ecf20Sopenharmony_cistatic unsigned int dsi_drv_pads[]		= { DSI_DP0, DSI_DN0,
8298c2ecf20Sopenharmony_ci						    DSI_DP2, DSI_DN2 };
8308c2ecf20Sopenharmony_ci/* paddrv1_23_22 */
8318c2ecf20Sopenharmony_cistatic unsigned int sd0_d0_d3_drv_pads[]	= { SD0_D0, SD0_D1,
8328c2ecf20Sopenharmony_ci						    SD0_D2, SD0_D3 };
8338c2ecf20Sopenharmony_ci/* paddrv1_21_20 */
8348c2ecf20Sopenharmony_cistatic unsigned int sd1_d0_d3_drv_pads[]	= { SD1_D0, SD1_D1,
8358c2ecf20Sopenharmony_ci						    SD1_D2, SD1_D3 };
8368c2ecf20Sopenharmony_ci/* paddrv1_19_18 */
8378c2ecf20Sopenharmony_cistatic unsigned int sd0_cmd_drv_pads[]		= { SD0_CMD };
8388c2ecf20Sopenharmony_ci/* paddrv1_17_16 */
8398c2ecf20Sopenharmony_cistatic unsigned int sd0_clk_drv_pads[]		= { SD0_CLK };
8408c2ecf20Sopenharmony_ci/* paddrv1_15_14 */
8418c2ecf20Sopenharmony_cistatic unsigned int sd1_cmd_drv_pads[]		= { SD1_CMD };
8428c2ecf20Sopenharmony_ci/* paddrv1_13_12 */
8438c2ecf20Sopenharmony_cistatic unsigned int sd1_clk_drv_pads[]		= { SD1_CLK };
8448c2ecf20Sopenharmony_ci/* paddrv1_11_10 */
8458c2ecf20Sopenharmony_cistatic unsigned int spi0_all_drv_pads[]		= { SPI0_SCLK, SPI0_SS,
8468c2ecf20Sopenharmony_ci						    SPI0_MISO, SPI0_MOSI };
8478c2ecf20Sopenharmony_ci/* paddrv2_31_30 */
8488c2ecf20Sopenharmony_cistatic unsigned int uart0_rx_drv_pads[]		= { UART0_RX };
8498c2ecf20Sopenharmony_ci/* paddrv2_29_28 */
8508c2ecf20Sopenharmony_cistatic unsigned int uart0_tx_drv_pads[]		= { UART0_TX };
8518c2ecf20Sopenharmony_ci/* paddrv2_27_26 */
8528c2ecf20Sopenharmony_cistatic unsigned int uart2_all_drv_pads[]	= { UART2_RX, UART2_TX,
8538c2ecf20Sopenharmony_ci						    UART2_RTSB, UART2_CTSB };
8548c2ecf20Sopenharmony_ci/* paddrv2_24_23 */
8558c2ecf20Sopenharmony_cistatic unsigned int i2c0_all_drv_pads[]		= { I2C0_SCLK, I2C0_SDATA };
8568c2ecf20Sopenharmony_ci/* paddrv2_22_21 */
8578c2ecf20Sopenharmony_cistatic unsigned int i2c12_all_drv_pads[]	= { I2C1_SCLK, I2C1_SDATA,
8588c2ecf20Sopenharmony_ci						    I2C2_SCLK, I2C2_SDATA };
8598c2ecf20Sopenharmony_ci/* paddrv2_19_18 */
8608c2ecf20Sopenharmony_cistatic unsigned int sens0_pclk_drv_pads[]	= { SENSOR0_PCLK };
8618c2ecf20Sopenharmony_ci/* paddrv2_13_12 */
8628c2ecf20Sopenharmony_cistatic unsigned int sens0_ckout_drv_pads[]	= { SENSOR0_CKOUT };
8638c2ecf20Sopenharmony_ci/* paddrv2_3_2 */
8648c2ecf20Sopenharmony_cistatic unsigned int uart3_all_drv_pads[]	= { UART3_RX, UART3_TX,
8658c2ecf20Sopenharmony_ci						    UART3_RTSB, UART3_CTSB };
8668c2ecf20Sopenharmony_ci
8678c2ecf20Sopenharmony_ci/* Pinctrl groups */
8688c2ecf20Sopenharmony_cistatic const struct owl_pingroup s500_groups[] = {
8698c2ecf20Sopenharmony_ci	MUX_PG(lcd0_d18_mfp, 0, 23, 3),
8708c2ecf20Sopenharmony_ci	MUX_PG(rmii_crs_dv_mfp, 0, 20, 3),
8718c2ecf20Sopenharmony_ci	MUX_PG(rmii_txd0_mfp, 0, 16, 3),
8728c2ecf20Sopenharmony_ci	MUX_PG(rmii_txd1_mfp, 0, 16, 3),
8738c2ecf20Sopenharmony_ci	MUX_PG(rmii_txen_mfp, 0, 13, 3),
8748c2ecf20Sopenharmony_ci	MUX_PG(rmii_rxen_mfp, 0, 13, 3),
8758c2ecf20Sopenharmony_ci	MUX_PG(rmii_rxd1_mfp, 0, 8, 3),
8768c2ecf20Sopenharmony_ci	MUX_PG(rmii_rxd0_mfp, 0, 8, 3),
8778c2ecf20Sopenharmony_ci	MUX_PG(rmii_ref_clk_mfp, 0, 6, 2),
8788c2ecf20Sopenharmony_ci	MUX_PG(i2s_d0_mfp, 0, 5, 1),
8798c2ecf20Sopenharmony_ci	MUX_PG(i2s_pcm1_mfp, 0, 3, 2),
8808c2ecf20Sopenharmony_ci	MUX_PG(i2s0_pcm0_mfp, 0, 1, 2),
8818c2ecf20Sopenharmony_ci	MUX_PG(i2s1_pcm0_mfp, 0, 1, 2),
8828c2ecf20Sopenharmony_ci	MUX_PG(i2s_d1_mfp, 0, 0, 1),
8838c2ecf20Sopenharmony_ci	MUX_PG(ks_in2_mfp, 1, 29, 3),
8848c2ecf20Sopenharmony_ci	MUX_PG(ks_in1_mfp, 1, 29, 3),
8858c2ecf20Sopenharmony_ci	MUX_PG(ks_in0_mfp, 1, 29, 3),
8868c2ecf20Sopenharmony_ci	MUX_PG(ks_in3_mfp, 1, 26, 3),
8878c2ecf20Sopenharmony_ci	MUX_PG(ks_out0_mfp, 1, 26, 3),
8888c2ecf20Sopenharmony_ci	MUX_PG(ks_out1_mfp, 1, 26, 3),
8898c2ecf20Sopenharmony_ci	MUX_PG(ks_out2_mfp, 1, 23, 3),
8908c2ecf20Sopenharmony_ci	MUX_PG(lvds_o_pn_mfp, 1, 21, 2),
8918c2ecf20Sopenharmony_ci	MUX_PG(dsi_dn0_mfp, 1, 19, 2),
8928c2ecf20Sopenharmony_ci	MUX_PG(dsi_dp2_mfp, 1, 17, 2),
8938c2ecf20Sopenharmony_ci	MUX_PG(lcd0_d17_mfp, 1, 14, 3),
8948c2ecf20Sopenharmony_ci	MUX_PG(dsi_dp3_mfp, 1, 12, 2),
8958c2ecf20Sopenharmony_ci	MUX_PG(dsi_dn3_mfp, 1, 10, 2),
8968c2ecf20Sopenharmony_ci	MUX_PG(dsi_dp0_mfp, 1, 7, 3),
8978c2ecf20Sopenharmony_ci	MUX_PG(lvds_ee_pn_mfp, 1, 5, 2),
8988c2ecf20Sopenharmony_ci	MUX_PG(spi0_i2c_pcm_mfp, 1, 3, 2),
8998c2ecf20Sopenharmony_ci	MUX_PG(spi0_i2s_pcm_mfp, 1, 0, 3),
9008c2ecf20Sopenharmony_ci	MUX_PG(dsi_dnp1_cp_mfp, 2, 29, 2),
9018c2ecf20Sopenharmony_ci	MUX_PG(lvds_e_pn_mfp, 2, 27, 2),
9028c2ecf20Sopenharmony_ci	MUX_PG(dsi_dn2_mfp, 2, 24, 3),
9038c2ecf20Sopenharmony_ci	MUX_PG(uart2_rtsb_mfp, 2, 23, 1),
9048c2ecf20Sopenharmony_ci	MUX_PG(uart2_ctsb_mfp, 2, 22, 1),
9058c2ecf20Sopenharmony_ci	MUX_PG(uart3_rtsb_mfp, 2, 21, 1),
9068c2ecf20Sopenharmony_ci	MUX_PG(uart3_ctsb_mfp, 2, 20, 1),
9078c2ecf20Sopenharmony_ci	MUX_PG(sd0_d0_mfp, 2, 17, 3),
9088c2ecf20Sopenharmony_ci	MUX_PG(sd0_d1_mfp, 2, 14, 3),
9098c2ecf20Sopenharmony_ci	MUX_PG(sd0_d2_d3_mfp, 2, 11, 3),
9108c2ecf20Sopenharmony_ci	MUX_PG(sd1_d0_d3_mfp, 2, 9, 2),
9118c2ecf20Sopenharmony_ci	MUX_PG(sd0_cmd_mfp, 2, 7, 2),
9128c2ecf20Sopenharmony_ci	MUX_PG(sd0_clk_mfp, 2, 5, 2),
9138c2ecf20Sopenharmony_ci	MUX_PG(sd1_cmd_mfp, 2, 3, 2),
9148c2ecf20Sopenharmony_ci	MUX_PG(uart0_rx_mfp, 2, 0, 3),
9158c2ecf20Sopenharmony_ci	MUX_PG(clko_25m_mfp, 3, 30, 1),
9168c2ecf20Sopenharmony_ci	MUX_PG(csi_cn_cp_mfp, 3, 28, 2),
9178c2ecf20Sopenharmony_ci	MUX_PG(sens0_ckout_mfp, 3, 22, 2),
9188c2ecf20Sopenharmony_ci	MUX_PG(uart0_tx_mfp, 3, 19, 3),
9198c2ecf20Sopenharmony_ci	MUX_PG(i2c0_mfp, 3, 16, 3),
9208c2ecf20Sopenharmony_ci	MUX_PG(csi_dn_dp_mfp, 3, 14, 2),
9218c2ecf20Sopenharmony_ci	MUX_PG(sen0_pclk_mfp, 3, 12, 2),
9228c2ecf20Sopenharmony_ci	MUX_PG(pcm1_in_mfp, 3, 10, 2),
9238c2ecf20Sopenharmony_ci	MUX_PG(pcm1_clk_mfp, 3, 8, 2),
9248c2ecf20Sopenharmony_ci	MUX_PG(pcm1_sync_mfp, 3, 6, 2),
9258c2ecf20Sopenharmony_ci	MUX_PG(pcm1_out_mfp, 3, 4, 2),
9268c2ecf20Sopenharmony_ci	MUX_PG(dnand_data_wr_mfp, 3, 3, 1),
9278c2ecf20Sopenharmony_ci	MUX_PG(dnand_acle_ce0_mfp, 3, 2, 1),
9288c2ecf20Sopenharmony_ci	MUX_PG(nand_ceb2_mfp, 3, 0, 2),
9298c2ecf20Sopenharmony_ci	MUX_PG(nand_ceb3_mfp, 3, 0, 2),
9308c2ecf20Sopenharmony_ci
9318c2ecf20Sopenharmony_ci	DRV_PG(sirq_drv, 0, 28, 2),
9328c2ecf20Sopenharmony_ci	DRV_PG(rmii_txd01_txen_drv, 0, 22, 2),
9338c2ecf20Sopenharmony_ci	DRV_PG(rmii_rxer_drv, 0, 20, 2),
9348c2ecf20Sopenharmony_ci	DRV_PG(rmii_crs_drv, 0, 18, 2),
9358c2ecf20Sopenharmony_ci	DRV_PG(rmii_rxd10_drv, 0, 16, 2),
9368c2ecf20Sopenharmony_ci	DRV_PG(rmii_ref_clk_drv, 0, 14, 2),
9378c2ecf20Sopenharmony_ci	DRV_PG(smi_mdc_mdio_drv, 0, 12, 2),
9388c2ecf20Sopenharmony_ci	DRV_PG(i2s_d0_drv, 0, 10, 2),
9398c2ecf20Sopenharmony_ci	DRV_PG(i2s_bclk0_drv, 0, 8, 2),
9408c2ecf20Sopenharmony_ci	DRV_PG(i2s3_drv, 0, 6, 2),
9418c2ecf20Sopenharmony_ci	DRV_PG(i2s13_drv, 0, 4, 2),
9428c2ecf20Sopenharmony_ci	DRV_PG(pcm1_drv, 0, 2, 2),
9438c2ecf20Sopenharmony_ci	DRV_PG(ks_in_drv, 0, 0, 2),
9448c2ecf20Sopenharmony_ci	DRV_PG(ks_out_drv, 1, 30, 2),
9458c2ecf20Sopenharmony_ci	DRV_PG(lvds_all_drv, 1, 28, 2),
9468c2ecf20Sopenharmony_ci	DRV_PG(lcd_dsi_drv, 1, 26, 2),
9478c2ecf20Sopenharmony_ci	DRV_PG(dsi_drv, 1, 24, 2),
9488c2ecf20Sopenharmony_ci	DRV_PG(sd0_d0_d3_drv, 1, 22, 2),
9498c2ecf20Sopenharmony_ci	DRV_PG(sd1_d0_d3_drv, 1, 20, 2),
9508c2ecf20Sopenharmony_ci	DRV_PG(sd0_cmd_drv, 1, 18, 2),
9518c2ecf20Sopenharmony_ci	DRV_PG(sd0_clk_drv, 1, 16, 2),
9528c2ecf20Sopenharmony_ci	DRV_PG(sd1_cmd_drv, 1, 14, 2),
9538c2ecf20Sopenharmony_ci	DRV_PG(sd1_clk_drv, 1, 12, 2),
9548c2ecf20Sopenharmony_ci	DRV_PG(spi0_all_drv, 1, 10, 2),
9558c2ecf20Sopenharmony_ci	DRV_PG(uart0_rx_drv, 2, 30, 2),
9568c2ecf20Sopenharmony_ci	DRV_PG(uart0_tx_drv, 2, 28, 2),
9578c2ecf20Sopenharmony_ci	DRV_PG(uart2_all_drv, 2, 26, 2),
9588c2ecf20Sopenharmony_ci	DRV_PG(i2c0_all_drv, 2, 23, 2),
9598c2ecf20Sopenharmony_ci	DRV_PG(i2c12_all_drv, 2, 21, 2),
9608c2ecf20Sopenharmony_ci	DRV_PG(sens0_pclk_drv, 2, 18, 2),
9618c2ecf20Sopenharmony_ci	DRV_PG(sens0_ckout_drv, 2, 12, 2),
9628c2ecf20Sopenharmony_ci	DRV_PG(uart3_all_drv, 2, 2, 2),
9638c2ecf20Sopenharmony_ci};
9648c2ecf20Sopenharmony_ci
9658c2ecf20Sopenharmony_cistatic const char * const nor_groups[] = {
9668c2ecf20Sopenharmony_ci	"lcd0_d18_mfp",
9678c2ecf20Sopenharmony_ci	"i2s_d0_mfp",
9688c2ecf20Sopenharmony_ci	"i2s0_pcm0_mfp",
9698c2ecf20Sopenharmony_ci	"i2s1_pcm0_mfp",
9708c2ecf20Sopenharmony_ci	"i2s_d1_mfp",
9718c2ecf20Sopenharmony_ci	"ks_in2_mfp",
9728c2ecf20Sopenharmony_ci	"ks_in1_mfp",
9738c2ecf20Sopenharmony_ci	"ks_in0_mfp",
9748c2ecf20Sopenharmony_ci	"ks_in3_mfp",
9758c2ecf20Sopenharmony_ci	"ks_out0_mfp",
9768c2ecf20Sopenharmony_ci	"ks_out1_mfp",
9778c2ecf20Sopenharmony_ci	"ks_out2_mfp",
9788c2ecf20Sopenharmony_ci	"lcd0_d17_mfp",
9798c2ecf20Sopenharmony_ci	"lvds_ee_pn_mfp",
9808c2ecf20Sopenharmony_ci	"spi0_i2c_pcm_mfp",
9818c2ecf20Sopenharmony_ci	"spi0_i2s_pcm_mfp",
9828c2ecf20Sopenharmony_ci	"lvds_e_pn_mfp",
9838c2ecf20Sopenharmony_ci	"sd0_d0_mfp",
9848c2ecf20Sopenharmony_ci	"sd0_d1_mfp",
9858c2ecf20Sopenharmony_ci	"sd0_d2_d3_mfp",
9868c2ecf20Sopenharmony_ci	"sd1_d0_d3_mfp",
9878c2ecf20Sopenharmony_ci	"sd0_cmd_mfp",
9888c2ecf20Sopenharmony_ci	"sd1_cmd_mfp",
9898c2ecf20Sopenharmony_ci	"sens0_ckout_mfp",
9908c2ecf20Sopenharmony_ci	"sen0_pclk_mfp",
9918c2ecf20Sopenharmony_ci};
9928c2ecf20Sopenharmony_ci
9938c2ecf20Sopenharmony_cistatic const char * const eth_rmii_groups[] = {
9948c2ecf20Sopenharmony_ci	"rmii_crs_dv_mfp",
9958c2ecf20Sopenharmony_ci	"rmii_txd0_mfp",
9968c2ecf20Sopenharmony_ci	"rmii_txd1_mfp",
9978c2ecf20Sopenharmony_ci	"rmii_txen_mfp",
9988c2ecf20Sopenharmony_ci	"rmii_rxen_mfp",
9998c2ecf20Sopenharmony_ci	"rmii_rxd1_mfp",
10008c2ecf20Sopenharmony_ci	"rmii_rxd0_mfp",
10018c2ecf20Sopenharmony_ci	"rmii_ref_clk_mfp",
10028c2ecf20Sopenharmony_ci};
10038c2ecf20Sopenharmony_ci
10048c2ecf20Sopenharmony_cistatic const char * const eth_smii_groups[] = {
10058c2ecf20Sopenharmony_ci	"rmii_crs_dv_mfp",
10068c2ecf20Sopenharmony_ci	"rmii_txd0_mfp",
10078c2ecf20Sopenharmony_ci	"rmii_txd1_mfp",
10088c2ecf20Sopenharmony_ci	"rmii_ref_clk_mfp",
10098c2ecf20Sopenharmony_ci};
10108c2ecf20Sopenharmony_ci
10118c2ecf20Sopenharmony_cistatic const char * const spi0_groups[] = {
10128c2ecf20Sopenharmony_ci	"dsi_dn0_mfp",
10138c2ecf20Sopenharmony_ci	"dsi_dp2_mfp",
10148c2ecf20Sopenharmony_ci	"dsi_dp0_mfp",
10158c2ecf20Sopenharmony_ci	"spi0_i2c_pcm_mfp",
10168c2ecf20Sopenharmony_ci	"spi0_i2s_pcm_mfp",
10178c2ecf20Sopenharmony_ci	"dsi_dn2_mfp",
10188c2ecf20Sopenharmony_ci};
10198c2ecf20Sopenharmony_ci
10208c2ecf20Sopenharmony_cistatic const char * const spi1_groups[] = {
10218c2ecf20Sopenharmony_ci	"uart0_rx_mfp",
10228c2ecf20Sopenharmony_ci	"uart0_tx_mfp",
10238c2ecf20Sopenharmony_ci	"i2c0_mfp",
10248c2ecf20Sopenharmony_ci};
10258c2ecf20Sopenharmony_ci
10268c2ecf20Sopenharmony_cistatic const char * const spi2_groups[] = {
10278c2ecf20Sopenharmony_ci	"rmii_crs_dv_mfp",
10288c2ecf20Sopenharmony_ci	"rmii_txd0_mfp",
10298c2ecf20Sopenharmony_ci	"rmii_txd1_mfp",
10308c2ecf20Sopenharmony_ci	"rmii_ref_clk_mfp",
10318c2ecf20Sopenharmony_ci	"dnand_acle_ce0_mfp",
10328c2ecf20Sopenharmony_ci};
10338c2ecf20Sopenharmony_ci
10348c2ecf20Sopenharmony_cistatic const char * const spi3_groups[] = {
10358c2ecf20Sopenharmony_ci	"rmii_txen_mfp",
10368c2ecf20Sopenharmony_ci	"rmii_rxen_mfp",
10378c2ecf20Sopenharmony_ci	"rmii_rxd1_mfp",
10388c2ecf20Sopenharmony_ci	"rmii_rxd0_mfp",
10398c2ecf20Sopenharmony_ci};
10408c2ecf20Sopenharmony_ci
10418c2ecf20Sopenharmony_cistatic const char * const sens0_groups[] = {
10428c2ecf20Sopenharmony_ci	"csi_cn_cp_mfp",
10438c2ecf20Sopenharmony_ci	"sens0_ckout_mfp",
10448c2ecf20Sopenharmony_ci	"csi_dn_dp_mfp",
10458c2ecf20Sopenharmony_ci	"sen0_pclk_mfp",
10468c2ecf20Sopenharmony_ci};
10478c2ecf20Sopenharmony_ci
10488c2ecf20Sopenharmony_cistatic const char * const sens1_groups[] = {
10498c2ecf20Sopenharmony_ci	"lcd0_d18_mfp",
10508c2ecf20Sopenharmony_ci	"ks_in2_mfp",
10518c2ecf20Sopenharmony_ci	"ks_in1_mfp",
10528c2ecf20Sopenharmony_ci	"ks_in0_mfp",
10538c2ecf20Sopenharmony_ci	"ks_in3_mfp",
10548c2ecf20Sopenharmony_ci	"ks_out0_mfp",
10558c2ecf20Sopenharmony_ci	"ks_out1_mfp",
10568c2ecf20Sopenharmony_ci	"ks_out2_mfp",
10578c2ecf20Sopenharmony_ci	"sens0_ckout_mfp",
10588c2ecf20Sopenharmony_ci	"pcm1_in_mfp",
10598c2ecf20Sopenharmony_ci	"pcm1_clk_mfp",
10608c2ecf20Sopenharmony_ci	"pcm1_sync_mfp",
10618c2ecf20Sopenharmony_ci	"pcm1_out_mfp",
10628c2ecf20Sopenharmony_ci};
10638c2ecf20Sopenharmony_ci
10648c2ecf20Sopenharmony_cistatic const char * const uart0_groups[] = {
10658c2ecf20Sopenharmony_ci	"uart2_rtsb_mfp",
10668c2ecf20Sopenharmony_ci	"uart2_ctsb_mfp",
10678c2ecf20Sopenharmony_ci	"uart0_rx_mfp",
10688c2ecf20Sopenharmony_ci	"uart0_tx_mfp",
10698c2ecf20Sopenharmony_ci};
10708c2ecf20Sopenharmony_ci
10718c2ecf20Sopenharmony_cistatic const char * const uart1_groups[] = {
10728c2ecf20Sopenharmony_ci	"sd0_d2_d3_mfp",
10738c2ecf20Sopenharmony_ci	"i2c0_mfp",
10748c2ecf20Sopenharmony_ci};
10758c2ecf20Sopenharmony_ci
10768c2ecf20Sopenharmony_cistatic const char * const uart2_groups[] = {
10778c2ecf20Sopenharmony_ci	"rmii_txen_mfp",
10788c2ecf20Sopenharmony_ci	"rmii_rxen_mfp",
10798c2ecf20Sopenharmony_ci	"rmii_rxd1_mfp",
10808c2ecf20Sopenharmony_ci	"rmii_rxd0_mfp",
10818c2ecf20Sopenharmony_ci	"dsi_dn0_mfp",
10828c2ecf20Sopenharmony_ci	"dsi_dp2_mfp",
10838c2ecf20Sopenharmony_ci	"dsi_dp0_mfp",
10848c2ecf20Sopenharmony_ci	"dsi_dn2_mfp",
10858c2ecf20Sopenharmony_ci	"uart2_rtsb_mfp",
10868c2ecf20Sopenharmony_ci	"uart2_ctsb_mfp",
10878c2ecf20Sopenharmony_ci	"sd0_d0_mfp",
10888c2ecf20Sopenharmony_ci	"sd0_d1_mfp",
10898c2ecf20Sopenharmony_ci	"sd0_d2_d3_mfp",
10908c2ecf20Sopenharmony_ci	"uart0_rx_mfp",
10918c2ecf20Sopenharmony_ci	"uart0_tx_mfp",
10928c2ecf20Sopenharmony_ci	"i2c0_mfp",
10938c2ecf20Sopenharmony_ci};
10948c2ecf20Sopenharmony_ci
10958c2ecf20Sopenharmony_cistatic const char * const uart3_groups[] = {
10968c2ecf20Sopenharmony_ci	"uart3_rtsb_mfp",
10978c2ecf20Sopenharmony_ci	"uart3_ctsb_mfp",
10988c2ecf20Sopenharmony_ci};
10998c2ecf20Sopenharmony_ci
11008c2ecf20Sopenharmony_cistatic const char * const uart4_groups[] = {
11018c2ecf20Sopenharmony_ci	"rmii_crs_dv_mfp",
11028c2ecf20Sopenharmony_ci	"rmii_ref_clk_mfp",
11038c2ecf20Sopenharmony_ci	"pcm1_in_mfp",
11048c2ecf20Sopenharmony_ci	"pcm1_clk_mfp",
11058c2ecf20Sopenharmony_ci};
11068c2ecf20Sopenharmony_ci
11078c2ecf20Sopenharmony_cistatic const char * const uart5_groups[] = {
11088c2ecf20Sopenharmony_ci	"rmii_rxd1_mfp",
11098c2ecf20Sopenharmony_ci	"rmii_rxd0_mfp",
11108c2ecf20Sopenharmony_ci	"ks_out0_mfp",
11118c2ecf20Sopenharmony_ci	"ks_out2_mfp",
11128c2ecf20Sopenharmony_ci	"uart3_rtsb_mfp",
11138c2ecf20Sopenharmony_ci	"uart3_ctsb_mfp",
11148c2ecf20Sopenharmony_ci	"sd0_d0_mfp",
11158c2ecf20Sopenharmony_ci	"sd0_d1_mfp",
11168c2ecf20Sopenharmony_ci};
11178c2ecf20Sopenharmony_ci
11188c2ecf20Sopenharmony_cistatic const char * const uart6_groups[] = {
11198c2ecf20Sopenharmony_ci	"rmii_txd0_mfp",
11208c2ecf20Sopenharmony_ci	"rmii_txd1_mfp",
11218c2ecf20Sopenharmony_ci	"pcm1_sync_mfp",
11228c2ecf20Sopenharmony_ci	"pcm1_out_mfp",
11238c2ecf20Sopenharmony_ci};
11248c2ecf20Sopenharmony_ci
11258c2ecf20Sopenharmony_cistatic const char * const i2s0_groups[] = {
11268c2ecf20Sopenharmony_ci	"i2s_d0_mfp",
11278c2ecf20Sopenharmony_ci	"i2s_pcm1_mfp",
11288c2ecf20Sopenharmony_ci	"i2s0_pcm0_mfp",
11298c2ecf20Sopenharmony_ci};
11308c2ecf20Sopenharmony_ci
11318c2ecf20Sopenharmony_cistatic const char * const i2s1_groups[] = {
11328c2ecf20Sopenharmony_ci	"i2s1_pcm0_mfp",
11338c2ecf20Sopenharmony_ci	"i2s_d1_mfp",
11348c2ecf20Sopenharmony_ci	"spi0_i2s_pcm_mfp",
11358c2ecf20Sopenharmony_ci	"uart0_rx_mfp",
11368c2ecf20Sopenharmony_ci	"uart0_tx_mfp",
11378c2ecf20Sopenharmony_ci};
11388c2ecf20Sopenharmony_ci
11398c2ecf20Sopenharmony_cistatic const char * const pcm1_groups[] = {
11408c2ecf20Sopenharmony_ci	"i2s_pcm1_mfp",
11418c2ecf20Sopenharmony_ci	"spi0_i2s_pcm_mfp",
11428c2ecf20Sopenharmony_ci	"uart0_rx_mfp",
11438c2ecf20Sopenharmony_ci	"uart0_tx_mfp",
11448c2ecf20Sopenharmony_ci	"pcm1_in_mfp",
11458c2ecf20Sopenharmony_ci	"pcm1_clk_mfp",
11468c2ecf20Sopenharmony_ci	"pcm1_sync_mfp",
11478c2ecf20Sopenharmony_ci	"pcm1_out_mfp",
11488c2ecf20Sopenharmony_ci};
11498c2ecf20Sopenharmony_ci
11508c2ecf20Sopenharmony_cistatic const char * const pcm0_groups[] = {
11518c2ecf20Sopenharmony_ci	"i2s0_pcm0_mfp",
11528c2ecf20Sopenharmony_ci	"i2s1_pcm0_mfp",
11538c2ecf20Sopenharmony_ci	"spi0_i2c_pcm_mfp",
11548c2ecf20Sopenharmony_ci	"spi0_i2s_pcm_mfp",
11558c2ecf20Sopenharmony_ci};
11568c2ecf20Sopenharmony_ci
11578c2ecf20Sopenharmony_cistatic const char * const ks_groups[] = {
11588c2ecf20Sopenharmony_ci	"ks_in2_mfp",
11598c2ecf20Sopenharmony_ci	"ks_in1_mfp",
11608c2ecf20Sopenharmony_ci	"ks_in0_mfp",
11618c2ecf20Sopenharmony_ci	"ks_in3_mfp",
11628c2ecf20Sopenharmony_ci	"ks_out0_mfp",
11638c2ecf20Sopenharmony_ci	"ks_out1_mfp",
11648c2ecf20Sopenharmony_ci	"ks_out2_mfp",
11658c2ecf20Sopenharmony_ci};
11668c2ecf20Sopenharmony_ci
11678c2ecf20Sopenharmony_cistatic const char * const jtag_groups[] = {
11688c2ecf20Sopenharmony_ci	"ks_in2_mfp",
11698c2ecf20Sopenharmony_ci	"ks_in1_mfp",
11708c2ecf20Sopenharmony_ci	"ks_in0_mfp",
11718c2ecf20Sopenharmony_ci	"ks_in3_mfp",
11728c2ecf20Sopenharmony_ci	"ks_out1_mfp",
11738c2ecf20Sopenharmony_ci	"sd0_d0_mfp",
11748c2ecf20Sopenharmony_ci	"sd0_d2_d3_mfp",
11758c2ecf20Sopenharmony_ci	"sd0_cmd_mfp",
11768c2ecf20Sopenharmony_ci	"sd0_clk_mfp",
11778c2ecf20Sopenharmony_ci};
11788c2ecf20Sopenharmony_ci
11798c2ecf20Sopenharmony_cistatic const char * const pwm0_groups[] = {
11808c2ecf20Sopenharmony_ci	"ks_in2_mfp",
11818c2ecf20Sopenharmony_ci	"ks_in0_mfp",
11828c2ecf20Sopenharmony_ci	"rmii_txen_mfp",
11838c2ecf20Sopenharmony_ci	"sen0_pclk_mfp",
11848c2ecf20Sopenharmony_ci};
11858c2ecf20Sopenharmony_ci
11868c2ecf20Sopenharmony_cistatic const char * const pwm1_groups[] = {
11878c2ecf20Sopenharmony_ci	"rmii_rxen_mfp",
11888c2ecf20Sopenharmony_ci	"ks_in1_mfp",
11898c2ecf20Sopenharmony_ci	"ks_in3_mfp",
11908c2ecf20Sopenharmony_ci	"sens0_ckout_mfp",
11918c2ecf20Sopenharmony_ci};
11928c2ecf20Sopenharmony_ci
11938c2ecf20Sopenharmony_cistatic const char * const pwm2_groups[] = {
11948c2ecf20Sopenharmony_ci	"lcd0_d18_mfp",
11958c2ecf20Sopenharmony_ci	"rmii_rxd1_mfp",
11968c2ecf20Sopenharmony_ci	"ks_out0_mfp",
11978c2ecf20Sopenharmony_ci	"ks_out2_mfp",
11988c2ecf20Sopenharmony_ci};
11998c2ecf20Sopenharmony_ci
12008c2ecf20Sopenharmony_cistatic const char * const pwm3_groups[] = {
12018c2ecf20Sopenharmony_ci	"rmii_rxd0_mfp",
12028c2ecf20Sopenharmony_ci	"ks_out1_mfp",
12038c2ecf20Sopenharmony_ci	"lcd0_d17_mfp",
12048c2ecf20Sopenharmony_ci};
12058c2ecf20Sopenharmony_ci
12068c2ecf20Sopenharmony_cistatic const char * const pwm4_groups[] = {
12078c2ecf20Sopenharmony_ci	"lcd0_d18_mfp",
12088c2ecf20Sopenharmony_ci	"rmii_crs_dv_mfp",
12098c2ecf20Sopenharmony_ci	"rmii_txd0_mfp",
12108c2ecf20Sopenharmony_ci	"ks_in0_mfp",
12118c2ecf20Sopenharmony_ci	"pcm1_in_mfp",
12128c2ecf20Sopenharmony_ci	"nand_ceb3_mfp",
12138c2ecf20Sopenharmony_ci};
12148c2ecf20Sopenharmony_ci
12158c2ecf20Sopenharmony_cistatic const char * const pwm5_groups[] = {
12168c2ecf20Sopenharmony_ci	"rmii_txd1_mfp",
12178c2ecf20Sopenharmony_ci	"ks_in1_mfp",
12188c2ecf20Sopenharmony_ci	"pcm1_clk_mfp",
12198c2ecf20Sopenharmony_ci	"nand_ceb2_mfp",
12208c2ecf20Sopenharmony_ci};
12218c2ecf20Sopenharmony_ci
12228c2ecf20Sopenharmony_cistatic const char * const p0_groups[] = {
12238c2ecf20Sopenharmony_ci	"ks_in2_mfp",
12248c2ecf20Sopenharmony_ci	"ks_in0_mfp",
12258c2ecf20Sopenharmony_ci};
12268c2ecf20Sopenharmony_ci
12278c2ecf20Sopenharmony_cistatic const char * const sd0_groups[] = {
12288c2ecf20Sopenharmony_ci	"ks_out0_mfp",
12298c2ecf20Sopenharmony_ci	"ks_out1_mfp",
12308c2ecf20Sopenharmony_ci	"ks_out2_mfp",
12318c2ecf20Sopenharmony_ci	"lcd0_d17_mfp",
12328c2ecf20Sopenharmony_ci	"dsi_dp3_mfp",
12338c2ecf20Sopenharmony_ci	"dsi_dp0_mfp",
12348c2ecf20Sopenharmony_ci	"sd0_d0_mfp",
12358c2ecf20Sopenharmony_ci	"sd0_d1_mfp",
12368c2ecf20Sopenharmony_ci	"sd0_d2_d3_mfp",
12378c2ecf20Sopenharmony_ci	"sd1_d0_d3_mfp",
12388c2ecf20Sopenharmony_ci	"sd0_cmd_mfp",
12398c2ecf20Sopenharmony_ci	"sd0_clk_mfp",
12408c2ecf20Sopenharmony_ci};
12418c2ecf20Sopenharmony_ci
12428c2ecf20Sopenharmony_cistatic const char * const sd1_groups[] = {
12438c2ecf20Sopenharmony_ci	"dsi_dp2_mfp",
12448c2ecf20Sopenharmony_ci	"lcd0_d17_mfp",
12458c2ecf20Sopenharmony_ci	"dsi_dp3_mfp",
12468c2ecf20Sopenharmony_ci	"dsi_dn3_mfp",
12478c2ecf20Sopenharmony_ci	"dsi_dnp1_cp_mfp",
12488c2ecf20Sopenharmony_ci	"dsi_dn2_mfp",
12498c2ecf20Sopenharmony_ci	"sd1_d0_d3_mfp",
12508c2ecf20Sopenharmony_ci	"sd1_cmd_mfp",
12518c2ecf20Sopenharmony_ci};
12528c2ecf20Sopenharmony_ci
12538c2ecf20Sopenharmony_cistatic const char * const sd2_groups[] = {
12548c2ecf20Sopenharmony_ci	"dnand_data_wr_mfp",
12558c2ecf20Sopenharmony_ci};
12568c2ecf20Sopenharmony_ci
12578c2ecf20Sopenharmony_cistatic const char * const i2c0_groups[] = {
12588c2ecf20Sopenharmony_ci	"uart0_rx_mfp",
12598c2ecf20Sopenharmony_ci	"uart0_tx_mfp",
12608c2ecf20Sopenharmony_ci	"i2c0_mfp",
12618c2ecf20Sopenharmony_ci};
12628c2ecf20Sopenharmony_ci
12638c2ecf20Sopenharmony_cistatic const char * const i2c1_groups[] = {
12648c2ecf20Sopenharmony_ci	"i2c0_mfp",
12658c2ecf20Sopenharmony_ci};
12668c2ecf20Sopenharmony_ci
12678c2ecf20Sopenharmony_cistatic const char * const i2c3_groups[] = {
12688c2ecf20Sopenharmony_ci	"spi0_i2c_pcm_mfp",
12698c2ecf20Sopenharmony_ci	"pcm1_sync_mfp",
12708c2ecf20Sopenharmony_ci	"pcm1_out_mfp",
12718c2ecf20Sopenharmony_ci};
12728c2ecf20Sopenharmony_ci
12738c2ecf20Sopenharmony_cistatic const char * const lvds_groups[] = {
12748c2ecf20Sopenharmony_ci	"lvds_o_pn_mfp",
12758c2ecf20Sopenharmony_ci	"lvds_ee_pn_mfp",
12768c2ecf20Sopenharmony_ci	"lvds_e_pn_mfp",
12778c2ecf20Sopenharmony_ci};
12788c2ecf20Sopenharmony_ci
12798c2ecf20Sopenharmony_cistatic const char * const ts_groups[] = {
12808c2ecf20Sopenharmony_ci	"lvds_o_pn_mfp",
12818c2ecf20Sopenharmony_ci	"lvds_ee_pn_mfp",
12828c2ecf20Sopenharmony_ci};
12838c2ecf20Sopenharmony_ci
12848c2ecf20Sopenharmony_cistatic const char * const lcd0_groups[] = {
12858c2ecf20Sopenharmony_ci	"lcd0_d18_mfp",
12868c2ecf20Sopenharmony_ci	"lcd0_d17_mfp",
12878c2ecf20Sopenharmony_ci	"lvds_o_pn_mfp",
12888c2ecf20Sopenharmony_ci	"dsi_dp3_mfp",
12898c2ecf20Sopenharmony_ci	"dsi_dn3_mfp",
12908c2ecf20Sopenharmony_ci	"lvds_ee_pn_mfp",
12918c2ecf20Sopenharmony_ci	"dsi_dnp1_cp_mfp",
12928c2ecf20Sopenharmony_ci	"lvds_e_pn_mfp",
12938c2ecf20Sopenharmony_ci};
12948c2ecf20Sopenharmony_ci
12958c2ecf20Sopenharmony_cistatic const char * const usb30_groups[] = {
12968c2ecf20Sopenharmony_ci	"ks_in1_mfp",
12978c2ecf20Sopenharmony_ci};
12988c2ecf20Sopenharmony_ci
12998c2ecf20Sopenharmony_cistatic const char * const clko_25m_groups[] = {
13008c2ecf20Sopenharmony_ci	"clko_25m_mfp",
13018c2ecf20Sopenharmony_ci};
13028c2ecf20Sopenharmony_ci
13038c2ecf20Sopenharmony_cistatic const char * const mipi_csi_groups[] = {
13048c2ecf20Sopenharmony_ci	"csi_cn_cp_mfp",
13058c2ecf20Sopenharmony_ci	"csi_dn_dp_mfp",
13068c2ecf20Sopenharmony_ci};
13078c2ecf20Sopenharmony_ci
13088c2ecf20Sopenharmony_cistatic const char * const dsi_groups[] = {
13098c2ecf20Sopenharmony_ci	"dsi_dn0_mfp",
13108c2ecf20Sopenharmony_ci	"dsi_dp2_mfp",
13118c2ecf20Sopenharmony_ci	"dsi_dp3_mfp",
13128c2ecf20Sopenharmony_ci	"dsi_dn3_mfp",
13138c2ecf20Sopenharmony_ci	"dsi_dp0_mfp",
13148c2ecf20Sopenharmony_ci	"dsi_dnp1_cp_mfp",
13158c2ecf20Sopenharmony_ci	"dsi_dn2_mfp",
13168c2ecf20Sopenharmony_ci};
13178c2ecf20Sopenharmony_ci
13188c2ecf20Sopenharmony_cistatic const char * const nand_groups[] = {
13198c2ecf20Sopenharmony_ci	"dnand_data_wr_mfp",
13208c2ecf20Sopenharmony_ci	"dnand_acle_ce0_mfp",
13218c2ecf20Sopenharmony_ci	"nand_ceb2_mfp",
13228c2ecf20Sopenharmony_ci	"nand_ceb3_mfp",
13238c2ecf20Sopenharmony_ci};
13248c2ecf20Sopenharmony_ci
13258c2ecf20Sopenharmony_cistatic const char * const spdif_groups[] = {
13268c2ecf20Sopenharmony_ci	"uart0_tx_mfp",
13278c2ecf20Sopenharmony_ci};
13288c2ecf20Sopenharmony_ci
13298c2ecf20Sopenharmony_cistatic const struct owl_pinmux_func s500_functions[] = {
13308c2ecf20Sopenharmony_ci	[S500_MUX_NOR] = FUNCTION(nor),
13318c2ecf20Sopenharmony_ci	[S500_MUX_ETH_RMII] = FUNCTION(eth_rmii),
13328c2ecf20Sopenharmony_ci	[S500_MUX_ETH_SMII] = FUNCTION(eth_smii),
13338c2ecf20Sopenharmony_ci	[S500_MUX_SPI0] = FUNCTION(spi0),
13348c2ecf20Sopenharmony_ci	[S500_MUX_SPI1] = FUNCTION(spi1),
13358c2ecf20Sopenharmony_ci	[S500_MUX_SPI2] = FUNCTION(spi2),
13368c2ecf20Sopenharmony_ci	[S500_MUX_SPI3] = FUNCTION(spi3),
13378c2ecf20Sopenharmony_ci	[S500_MUX_SENS0] = FUNCTION(sens0),
13388c2ecf20Sopenharmony_ci	[S500_MUX_SENS1] = FUNCTION(sens1),
13398c2ecf20Sopenharmony_ci	[S500_MUX_UART0] = FUNCTION(uart0),
13408c2ecf20Sopenharmony_ci	[S500_MUX_UART1] = FUNCTION(uart1),
13418c2ecf20Sopenharmony_ci	[S500_MUX_UART2] = FUNCTION(uart2),
13428c2ecf20Sopenharmony_ci	[S500_MUX_UART3] = FUNCTION(uart3),
13438c2ecf20Sopenharmony_ci	[S500_MUX_UART4] = FUNCTION(uart4),
13448c2ecf20Sopenharmony_ci	[S500_MUX_UART5] = FUNCTION(uart5),
13458c2ecf20Sopenharmony_ci	[S500_MUX_UART6] = FUNCTION(uart6),
13468c2ecf20Sopenharmony_ci	[S500_MUX_I2S0] = FUNCTION(i2s0),
13478c2ecf20Sopenharmony_ci	[S500_MUX_I2S1] = FUNCTION(i2s1),
13488c2ecf20Sopenharmony_ci	[S500_MUX_PCM1] = FUNCTION(pcm1),
13498c2ecf20Sopenharmony_ci	[S500_MUX_PCM0] = FUNCTION(pcm0),
13508c2ecf20Sopenharmony_ci	[S500_MUX_KS] = FUNCTION(ks),
13518c2ecf20Sopenharmony_ci	[S500_MUX_JTAG] = FUNCTION(jtag),
13528c2ecf20Sopenharmony_ci	[S500_MUX_PWM0] = FUNCTION(pwm0),
13538c2ecf20Sopenharmony_ci	[S500_MUX_PWM1] = FUNCTION(pwm1),
13548c2ecf20Sopenharmony_ci	[S500_MUX_PWM2] = FUNCTION(pwm2),
13558c2ecf20Sopenharmony_ci	[S500_MUX_PWM3] = FUNCTION(pwm3),
13568c2ecf20Sopenharmony_ci	[S500_MUX_PWM4] = FUNCTION(pwm4),
13578c2ecf20Sopenharmony_ci	[S500_MUX_PWM5] = FUNCTION(pwm5),
13588c2ecf20Sopenharmony_ci	[S500_MUX_P0] = FUNCTION(p0),
13598c2ecf20Sopenharmony_ci	[S500_MUX_SD0] = FUNCTION(sd0),
13608c2ecf20Sopenharmony_ci	[S500_MUX_SD1] = FUNCTION(sd1),
13618c2ecf20Sopenharmony_ci	[S500_MUX_SD2] = FUNCTION(sd2),
13628c2ecf20Sopenharmony_ci	[S500_MUX_I2C0] = FUNCTION(i2c0),
13638c2ecf20Sopenharmony_ci	[S500_MUX_I2C1] = FUNCTION(i2c1),
13648c2ecf20Sopenharmony_ci	/*[S500_MUX_I2C2] = FUNCTION(i2c2),*/
13658c2ecf20Sopenharmony_ci	[S500_MUX_I2C3] = FUNCTION(i2c3),
13668c2ecf20Sopenharmony_ci	[S500_MUX_DSI] = FUNCTION(dsi),
13678c2ecf20Sopenharmony_ci	[S500_MUX_LVDS] = FUNCTION(lvds),
13688c2ecf20Sopenharmony_ci	[S500_MUX_USB30] = FUNCTION(usb30),
13698c2ecf20Sopenharmony_ci	[S500_MUX_CLKO_25M] = FUNCTION(clko_25m),
13708c2ecf20Sopenharmony_ci	[S500_MUX_MIPI_CSI] = FUNCTION(mipi_csi),
13718c2ecf20Sopenharmony_ci	[S500_MUX_NAND] = FUNCTION(nand),
13728c2ecf20Sopenharmony_ci	[S500_MUX_SPDIF] = FUNCTION(spdif),
13738c2ecf20Sopenharmony_ci	/*[S500_MUX_SIRQ0] = FUNCTION(sirq0),*/
13748c2ecf20Sopenharmony_ci	/*[S500_MUX_SIRQ1] = FUNCTION(sirq1),*/
13758c2ecf20Sopenharmony_ci	/*[S500_MUX_SIRQ2] = FUNCTION(sirq2),*/
13768c2ecf20Sopenharmony_ci	[S500_MUX_TS] = FUNCTION(ts),
13778c2ecf20Sopenharmony_ci	[S500_MUX_LCD0] = FUNCTION(lcd0),
13788c2ecf20Sopenharmony_ci};
13798c2ecf20Sopenharmony_ci
13808c2ecf20Sopenharmony_ci/* PAD_ST0 */
13818c2ecf20Sopenharmony_cistatic PAD_ST_CONF(I2C0_SDATA, 0, 30, 1);
13828c2ecf20Sopenharmony_cistatic PAD_ST_CONF(UART0_RX, 0, 29, 1);
13838c2ecf20Sopenharmony_cistatic PAD_ST_CONF(I2S_MCLK1, 0, 23, 1);
13848c2ecf20Sopenharmony_cistatic PAD_ST_CONF(ETH_REF_CLK, 0, 22, 1);
13858c2ecf20Sopenharmony_cistatic PAD_ST_CONF(ETH_TXEN, 0, 21, 1);
13868c2ecf20Sopenharmony_cistatic PAD_ST_CONF(ETH_TXD0, 0, 20, 1);
13878c2ecf20Sopenharmony_cistatic PAD_ST_CONF(I2S_LRCLK1, 0, 19, 1);
13888c2ecf20Sopenharmony_cistatic PAD_ST_CONF(DSI_DP0, 0, 16, 1);
13898c2ecf20Sopenharmony_cistatic PAD_ST_CONF(DSI_DN0, 0, 15, 1);
13908c2ecf20Sopenharmony_cistatic PAD_ST_CONF(UART0_TX, 0, 14, 1);
13918c2ecf20Sopenharmony_cistatic PAD_ST_CONF(SPI0_SCLK, 0, 13, 1);
13928c2ecf20Sopenharmony_cistatic PAD_ST_CONF(SD0_CLK, 0, 12, 1);
13938c2ecf20Sopenharmony_cistatic PAD_ST_CONF(KS_IN0, 0, 11, 1);
13948c2ecf20Sopenharmony_cistatic PAD_ST_CONF(SENSOR0_PCLK, 0, 9, 1);
13958c2ecf20Sopenharmony_cistatic PAD_ST_CONF(I2C0_SCLK, 0, 7, 1);
13968c2ecf20Sopenharmony_cistatic PAD_ST_CONF(KS_OUT0, 0, 6, 1);
13978c2ecf20Sopenharmony_cistatic PAD_ST_CONF(KS_OUT1, 0, 5, 1);
13988c2ecf20Sopenharmony_cistatic PAD_ST_CONF(KS_OUT2, 0, 4, 1);
13998c2ecf20Sopenharmony_ci
14008c2ecf20Sopenharmony_ci/* PAD_ST1 */
14018c2ecf20Sopenharmony_cistatic PAD_ST_CONF(DSI_DP2, 1, 31, 1);
14028c2ecf20Sopenharmony_cistatic PAD_ST_CONF(DSI_DN2, 1, 30, 1);
14038c2ecf20Sopenharmony_cistatic PAD_ST_CONF(I2S_LRCLK0, 1, 29, 1);
14048c2ecf20Sopenharmony_cistatic PAD_ST_CONF(UART3_CTSB, 1, 27, 1);
14058c2ecf20Sopenharmony_cistatic PAD_ST_CONF(UART3_RTSB, 1, 26, 1);
14068c2ecf20Sopenharmony_cistatic PAD_ST_CONF(UART3_RX, 1, 25, 1);
14078c2ecf20Sopenharmony_cistatic PAD_ST_CONF(UART2_RTSB, 1, 24, 1);
14088c2ecf20Sopenharmony_cistatic PAD_ST_CONF(UART2_CTSB, 1, 23, 1);
14098c2ecf20Sopenharmony_cistatic PAD_ST_CONF(UART2_RX, 1, 22, 1);
14108c2ecf20Sopenharmony_cistatic PAD_ST_CONF(ETH_RXD0, 1, 21, 1);
14118c2ecf20Sopenharmony_cistatic PAD_ST_CONF(ETH_RXD1, 1, 20, 1);
14128c2ecf20Sopenharmony_cistatic PAD_ST_CONF(ETH_CRS_DV, 1, 19, 1);
14138c2ecf20Sopenharmony_cistatic PAD_ST_CONF(ETH_RXER, 1, 18, 1);
14148c2ecf20Sopenharmony_cistatic PAD_ST_CONF(ETH_TXD1, 1, 17, 1);
14158c2ecf20Sopenharmony_cistatic PAD_ST_CONF(LVDS_OAP, 1, 12, 1);
14168c2ecf20Sopenharmony_cistatic PAD_ST_CONF(PCM1_CLK, 1, 11, 1);
14178c2ecf20Sopenharmony_cistatic PAD_ST_CONF(PCM1_IN, 1, 10, 1);
14188c2ecf20Sopenharmony_cistatic PAD_ST_CONF(PCM1_SYNC, 1, 9, 1);
14198c2ecf20Sopenharmony_cistatic PAD_ST_CONF(I2C1_SCLK, 1, 8, 1);
14208c2ecf20Sopenharmony_cistatic PAD_ST_CONF(I2C1_SDATA, 1, 7, 1);
14218c2ecf20Sopenharmony_cistatic PAD_ST_CONF(I2C2_SCLK, 1, 6, 1);
14228c2ecf20Sopenharmony_cistatic PAD_ST_CONF(I2C2_SDATA, 1, 5, 1);
14238c2ecf20Sopenharmony_cistatic PAD_ST_CONF(SPI0_MOSI, 1, 4, 1);
14248c2ecf20Sopenharmony_cistatic PAD_ST_CONF(SPI0_MISO, 1, 3, 1);
14258c2ecf20Sopenharmony_cistatic PAD_ST_CONF(SPI0_SS, 1, 2, 1);
14268c2ecf20Sopenharmony_cistatic PAD_ST_CONF(I2S_BCLK0, 1, 1, 1);
14278c2ecf20Sopenharmony_cistatic PAD_ST_CONF(I2S_MCLK0, 1, 0, 1);
14288c2ecf20Sopenharmony_ci
14298c2ecf20Sopenharmony_ci/* PAD_PULLCTL0 */
14308c2ecf20Sopenharmony_cistatic PAD_PULLCTL_CONF(PCM1_SYNC, 0, 30, 1);
14318c2ecf20Sopenharmony_cistatic PAD_PULLCTL_CONF(PCM1_OUT, 0, 29, 1);
14328c2ecf20Sopenharmony_cistatic PAD_PULLCTL_CONF(KS_OUT2, 0, 28, 1);
14338c2ecf20Sopenharmony_cistatic PAD_PULLCTL_CONF(LCD0_D17, 0, 27, 1);
14348c2ecf20Sopenharmony_cistatic PAD_PULLCTL_CONF(DSI_DN3, 0, 26, 1);
14358c2ecf20Sopenharmony_cistatic PAD_PULLCTL_CONF(ETH_RXER, 0, 16, 1);
14368c2ecf20Sopenharmony_cistatic PAD_PULLCTL_CONF(SIRQ0, 0, 14, 2);
14378c2ecf20Sopenharmony_cistatic PAD_PULLCTL_CONF(SIRQ1, 0, 12, 2);
14388c2ecf20Sopenharmony_cistatic PAD_PULLCTL_CONF(SIRQ2, 0, 10, 2);
14398c2ecf20Sopenharmony_cistatic PAD_PULLCTL_CONF(I2C0_SDATA, 0, 9, 1);
14408c2ecf20Sopenharmony_cistatic PAD_PULLCTL_CONF(I2C0_SCLK, 0, 8, 1);
14418c2ecf20Sopenharmony_cistatic PAD_PULLCTL_CONF(KS_IN0, 0, 7, 1);
14428c2ecf20Sopenharmony_cistatic PAD_PULLCTL_CONF(KS_IN1, 0, 6, 1);
14438c2ecf20Sopenharmony_cistatic PAD_PULLCTL_CONF(KS_IN2, 0, 5, 1);
14448c2ecf20Sopenharmony_cistatic PAD_PULLCTL_CONF(KS_IN3, 0, 4, 1);
14458c2ecf20Sopenharmony_cistatic PAD_PULLCTL_CONF(KS_OUT0, 0, 2, 1);
14468c2ecf20Sopenharmony_cistatic PAD_PULLCTL_CONF(KS_OUT1, 0, 1, 1);
14478c2ecf20Sopenharmony_cistatic PAD_PULLCTL_CONF(DSI_DP1, 0, 0, 1);
14488c2ecf20Sopenharmony_ci
14498c2ecf20Sopenharmony_ci/* PAD_PULLCTL1 */
14508c2ecf20Sopenharmony_cistatic PAD_PULLCTL_CONF(DSI_CP, 1, 31, 1);
14518c2ecf20Sopenharmony_cistatic PAD_PULLCTL_CONF(DSI_CN, 1, 30, 1);
14528c2ecf20Sopenharmony_cistatic PAD_PULLCTL_CONF(DSI_DN2, 1, 28, 1);
14538c2ecf20Sopenharmony_cistatic PAD_PULLCTL_CONF(DNAND_RDBN, 1, 25, 1);
14548c2ecf20Sopenharmony_cistatic PAD_PULLCTL_CONF(SD0_D0, 1, 17, 1);
14558c2ecf20Sopenharmony_cistatic PAD_PULLCTL_CONF(SD0_D1, 1, 16, 1);
14568c2ecf20Sopenharmony_cistatic PAD_PULLCTL_CONF(SD0_D2, 1, 15, 1);
14578c2ecf20Sopenharmony_cistatic PAD_PULLCTL_CONF(SD0_D3, 1, 14, 1);
14588c2ecf20Sopenharmony_cistatic PAD_PULLCTL_CONF(SD0_CMD, 1, 13, 1);
14598c2ecf20Sopenharmony_cistatic PAD_PULLCTL_CONF(SD0_CLK, 1, 12, 1);
14608c2ecf20Sopenharmony_cistatic PAD_PULLCTL_CONF(SD1_CMD, 1, 11, 1);
14618c2ecf20Sopenharmony_cistatic PAD_PULLCTL_CONF(SD1_D0, 1, 6, 1);
14628c2ecf20Sopenharmony_cistatic PAD_PULLCTL_CONF(SD1_D1, 1, 5, 1);
14638c2ecf20Sopenharmony_cistatic PAD_PULLCTL_CONF(SD1_D2, 1, 4, 1);
14648c2ecf20Sopenharmony_cistatic PAD_PULLCTL_CONF(SD1_D3, 1, 3, 1);
14658c2ecf20Sopenharmony_cistatic PAD_PULLCTL_CONF(UART0_RX, 1, 2, 1);
14668c2ecf20Sopenharmony_cistatic PAD_PULLCTL_CONF(UART0_TX, 1, 1, 1);
14678c2ecf20Sopenharmony_cistatic PAD_PULLCTL_CONF(CLKO_25M, 1, 0, 1);
14688c2ecf20Sopenharmony_ci
14698c2ecf20Sopenharmony_ci/* PAD_PULLCTL2 */
14708c2ecf20Sopenharmony_cistatic PAD_PULLCTL_CONF(SPI0_SCLK, 2, 12, 1);
14718c2ecf20Sopenharmony_cistatic PAD_PULLCTL_CONF(SPI0_MOSI, 2, 11, 1);
14728c2ecf20Sopenharmony_cistatic PAD_PULLCTL_CONF(I2C1_SDATA, 2, 10, 1);
14738c2ecf20Sopenharmony_cistatic PAD_PULLCTL_CONF(I2C1_SCLK, 2, 9, 1);
14748c2ecf20Sopenharmony_cistatic PAD_PULLCTL_CONF(I2C2_SDATA, 2, 8, 1);
14758c2ecf20Sopenharmony_cistatic PAD_PULLCTL_CONF(I2C2_SCLK, 2, 7, 1);
14768c2ecf20Sopenharmony_cistatic PAD_PULLCTL_CONF(DNAND_DQSN, 2, 5, 2);
14778c2ecf20Sopenharmony_cistatic PAD_PULLCTL_CONF(DNAND_DQS, 2, 3, 2);
14788c2ecf20Sopenharmony_cistatic PAD_PULLCTL_CONF(DNAND_D0, 2, 2, 1);
14798c2ecf20Sopenharmony_cistatic PAD_PULLCTL_CONF(DNAND_D1, 2, 2, 1);
14808c2ecf20Sopenharmony_cistatic PAD_PULLCTL_CONF(DNAND_D2, 2, 2, 1);
14818c2ecf20Sopenharmony_cistatic PAD_PULLCTL_CONF(DNAND_D3, 2, 2, 1);
14828c2ecf20Sopenharmony_cistatic PAD_PULLCTL_CONF(DNAND_D4, 2, 2, 1);
14838c2ecf20Sopenharmony_cistatic PAD_PULLCTL_CONF(DNAND_D5, 2, 2, 1);
14848c2ecf20Sopenharmony_cistatic PAD_PULLCTL_CONF(DNAND_D6, 2, 2, 1);
14858c2ecf20Sopenharmony_cistatic PAD_PULLCTL_CONF(DNAND_D7, 2, 2, 1);
14868c2ecf20Sopenharmony_ci
14878c2ecf20Sopenharmony_ci/* Pad info table */
14888c2ecf20Sopenharmony_cistatic struct owl_padinfo s500_padinfo[NUM_PADS] = {
14898c2ecf20Sopenharmony_ci	[DNAND_DQS] = PAD_INFO_PULLCTL(DNAND_DQS),
14908c2ecf20Sopenharmony_ci	[DNAND_DQSN] = PAD_INFO_PULLCTL(DNAND_DQSN),
14918c2ecf20Sopenharmony_ci	[ETH_TXD0] = PAD_INFO_ST(ETH_TXD0),
14928c2ecf20Sopenharmony_ci	[ETH_TXD1] = PAD_INFO_ST(ETH_TXD1),
14938c2ecf20Sopenharmony_ci	[ETH_TXEN] = PAD_INFO_ST(ETH_TXEN),
14948c2ecf20Sopenharmony_ci	[ETH_RXER] = PAD_INFO_PULLCTL_ST(ETH_RXER),
14958c2ecf20Sopenharmony_ci	[ETH_CRS_DV] = PAD_INFO_ST(ETH_CRS_DV),
14968c2ecf20Sopenharmony_ci	[ETH_RXD1] = PAD_INFO_ST(ETH_RXD1),
14978c2ecf20Sopenharmony_ci	[ETH_RXD0] = PAD_INFO_ST(ETH_RXD0),
14988c2ecf20Sopenharmony_ci	[ETH_REF_CLK] = PAD_INFO_ST(ETH_REF_CLK),
14998c2ecf20Sopenharmony_ci	[ETH_MDC] = PAD_INFO(ETH_MDC),
15008c2ecf20Sopenharmony_ci	[ETH_MDIO] = PAD_INFO(ETH_MDIO),
15018c2ecf20Sopenharmony_ci	[SIRQ0] = PAD_INFO_PULLCTL(SIRQ0),
15028c2ecf20Sopenharmony_ci	[SIRQ1] = PAD_INFO_PULLCTL(SIRQ1),
15038c2ecf20Sopenharmony_ci	[SIRQ2] = PAD_INFO_PULLCTL(SIRQ2),
15048c2ecf20Sopenharmony_ci	[I2S_D0] = PAD_INFO(I2S_D0),
15058c2ecf20Sopenharmony_ci	[I2S_BCLK0] = PAD_INFO_ST(I2S_BCLK0),
15068c2ecf20Sopenharmony_ci	[I2S_LRCLK0] = PAD_INFO_ST(I2S_LRCLK0),
15078c2ecf20Sopenharmony_ci	[I2S_MCLK0] = PAD_INFO_ST(I2S_MCLK0),
15088c2ecf20Sopenharmony_ci	[I2S_D1] = PAD_INFO(I2S_D1),
15098c2ecf20Sopenharmony_ci	[I2S_BCLK1] = PAD_INFO(I2S_BCLK1),
15108c2ecf20Sopenharmony_ci	[I2S_LRCLK1] = PAD_INFO_ST(I2S_LRCLK1),
15118c2ecf20Sopenharmony_ci	[I2S_MCLK1] = PAD_INFO_ST(I2S_MCLK1),
15128c2ecf20Sopenharmony_ci	[KS_IN0] = PAD_INFO_PULLCTL_ST(KS_IN0),
15138c2ecf20Sopenharmony_ci	[KS_IN1] = PAD_INFO_PULLCTL(KS_IN1),
15148c2ecf20Sopenharmony_ci	[KS_IN2] = PAD_INFO_PULLCTL(KS_IN2),
15158c2ecf20Sopenharmony_ci	[KS_IN3] = PAD_INFO_PULLCTL(KS_IN3),
15168c2ecf20Sopenharmony_ci	[KS_OUT0] = PAD_INFO_PULLCTL_ST(KS_OUT0),
15178c2ecf20Sopenharmony_ci	[KS_OUT1] = PAD_INFO_PULLCTL_ST(KS_OUT1),
15188c2ecf20Sopenharmony_ci	[KS_OUT2] = PAD_INFO_PULLCTL_ST(KS_OUT2),
15198c2ecf20Sopenharmony_ci	[LVDS_OEP] = PAD_INFO(LVDS_OEP),
15208c2ecf20Sopenharmony_ci	[LVDS_OEN] = PAD_INFO(LVDS_OEN),
15218c2ecf20Sopenharmony_ci	[LVDS_ODP] = PAD_INFO(LVDS_ODP),
15228c2ecf20Sopenharmony_ci	[LVDS_ODN] = PAD_INFO(LVDS_ODN),
15238c2ecf20Sopenharmony_ci	[LVDS_OCP] = PAD_INFO(LVDS_OCP),
15248c2ecf20Sopenharmony_ci	[LVDS_OCN] = PAD_INFO(LVDS_OCN),
15258c2ecf20Sopenharmony_ci	[LVDS_OBP] = PAD_INFO(LVDS_OBP),
15268c2ecf20Sopenharmony_ci	[LVDS_OBN] = PAD_INFO(LVDS_OBN),
15278c2ecf20Sopenharmony_ci	[LVDS_OAP] = PAD_INFO_ST(LVDS_OAP),
15288c2ecf20Sopenharmony_ci	[LVDS_OAN] = PAD_INFO(LVDS_OAN),
15298c2ecf20Sopenharmony_ci	[LVDS_EEP] = PAD_INFO(LVDS_EEP),
15308c2ecf20Sopenharmony_ci	[LVDS_EEN] = PAD_INFO(LVDS_EEN),
15318c2ecf20Sopenharmony_ci	[LVDS_EDP] = PAD_INFO(LVDS_EDP),
15328c2ecf20Sopenharmony_ci	[LVDS_EDN] = PAD_INFO(LVDS_EDN),
15338c2ecf20Sopenharmony_ci	[LVDS_ECP] = PAD_INFO(LVDS_ECP),
15348c2ecf20Sopenharmony_ci	[LVDS_ECN] = PAD_INFO(LVDS_ECN),
15358c2ecf20Sopenharmony_ci	[LVDS_EBP] = PAD_INFO(LVDS_EBP),
15368c2ecf20Sopenharmony_ci	[LVDS_EBN] = PAD_INFO(LVDS_EBN),
15378c2ecf20Sopenharmony_ci	[LVDS_EAP] = PAD_INFO(LVDS_EAP),
15388c2ecf20Sopenharmony_ci	[LVDS_EAN] = PAD_INFO(LVDS_EAN),
15398c2ecf20Sopenharmony_ci	[LCD0_D18] = PAD_INFO(LCD0_D18),
15408c2ecf20Sopenharmony_ci	[LCD0_D17] = PAD_INFO_PULLCTL(LCD0_D17),
15418c2ecf20Sopenharmony_ci	[DSI_DP3] = PAD_INFO(DSI_DP3),
15428c2ecf20Sopenharmony_ci	[DSI_DN3] = PAD_INFO_PULLCTL(DSI_DN3),
15438c2ecf20Sopenharmony_ci	[DSI_DP1] = PAD_INFO_PULLCTL(DSI_DP1),
15448c2ecf20Sopenharmony_ci	[DSI_DN1] = PAD_INFO(DSI_DN1),
15458c2ecf20Sopenharmony_ci	[DSI_CP] = PAD_INFO_PULLCTL(DSI_CP),
15468c2ecf20Sopenharmony_ci	[DSI_CN] = PAD_INFO_PULLCTL(DSI_CN),
15478c2ecf20Sopenharmony_ci	[DSI_DP0] = PAD_INFO_ST(DSI_DP0),
15488c2ecf20Sopenharmony_ci	[DSI_DN0] = PAD_INFO_ST(DSI_DN0),
15498c2ecf20Sopenharmony_ci	[DSI_DP2] = PAD_INFO_ST(DSI_DP2),
15508c2ecf20Sopenharmony_ci	[DSI_DN2] = PAD_INFO_PULLCTL_ST(DSI_DN2),
15518c2ecf20Sopenharmony_ci	[SD0_D0] = PAD_INFO_PULLCTL(SD0_D0),
15528c2ecf20Sopenharmony_ci	[SD0_D1] = PAD_INFO_PULLCTL(SD0_D1),
15538c2ecf20Sopenharmony_ci	[SD0_D2] = PAD_INFO_PULLCTL(SD0_D2),
15548c2ecf20Sopenharmony_ci	[SD0_D3] = PAD_INFO_PULLCTL(SD0_D3),
15558c2ecf20Sopenharmony_ci	[SD1_D0] = PAD_INFO_PULLCTL(SD1_D0),
15568c2ecf20Sopenharmony_ci	[SD1_D1] = PAD_INFO_PULLCTL(SD1_D1),
15578c2ecf20Sopenharmony_ci	[SD1_D2] = PAD_INFO_PULLCTL(SD1_D2),
15588c2ecf20Sopenharmony_ci	[SD1_D3] = PAD_INFO_PULLCTL(SD1_D3),
15598c2ecf20Sopenharmony_ci	[SD0_CMD] = PAD_INFO_PULLCTL(SD0_CMD),
15608c2ecf20Sopenharmony_ci	[SD0_CLK] = PAD_INFO_PULLCTL_ST(SD0_CLK),
15618c2ecf20Sopenharmony_ci	[SD1_CMD] = PAD_INFO_PULLCTL(SD1_CMD),
15628c2ecf20Sopenharmony_ci	[SD1_CLK] = PAD_INFO(SD1_CLK),
15638c2ecf20Sopenharmony_ci	[SPI0_SCLK] = PAD_INFO_PULLCTL_ST(SPI0_SCLK),
15648c2ecf20Sopenharmony_ci	[SPI0_SS] = PAD_INFO_ST(SPI0_SS),
15658c2ecf20Sopenharmony_ci	[SPI0_MISO] = PAD_INFO_ST(SPI0_MISO),
15668c2ecf20Sopenharmony_ci	[SPI0_MOSI] = PAD_INFO_PULLCTL_ST(SPI0_MOSI),
15678c2ecf20Sopenharmony_ci	[UART0_RX] = PAD_INFO_PULLCTL_ST(UART0_RX),
15688c2ecf20Sopenharmony_ci	[UART0_TX] = PAD_INFO_PULLCTL_ST(UART0_TX),
15698c2ecf20Sopenharmony_ci	[I2C0_SCLK] = PAD_INFO_PULLCTL_ST(I2C0_SCLK),
15708c2ecf20Sopenharmony_ci	[I2C0_SDATA] = PAD_INFO_PULLCTL_ST(I2C0_SDATA),
15718c2ecf20Sopenharmony_ci	[SENSOR0_PCLK] = PAD_INFO_ST(SENSOR0_PCLK),
15728c2ecf20Sopenharmony_ci	[SENSOR0_CKOUT] = PAD_INFO(SENSOR0_CKOUT),
15738c2ecf20Sopenharmony_ci	[DNAND_ALE] = PAD_INFO(DNAND_ALE),
15748c2ecf20Sopenharmony_ci	[DNAND_CLE] = PAD_INFO(DNAND_CLE),
15758c2ecf20Sopenharmony_ci	[DNAND_CEB0] = PAD_INFO(DNAND_CEB0),
15768c2ecf20Sopenharmony_ci	[DNAND_CEB1] = PAD_INFO(DNAND_CEB1),
15778c2ecf20Sopenharmony_ci	[DNAND_CEB2] = PAD_INFO(DNAND_CEB2),
15788c2ecf20Sopenharmony_ci	[DNAND_CEB3] = PAD_INFO(DNAND_CEB3),
15798c2ecf20Sopenharmony_ci	[UART2_RX] = PAD_INFO_ST(UART2_RX),
15808c2ecf20Sopenharmony_ci	[UART2_TX] = PAD_INFO(UART2_TX),
15818c2ecf20Sopenharmony_ci	[UART2_RTSB] = PAD_INFO_ST(UART2_RTSB),
15828c2ecf20Sopenharmony_ci	[UART2_CTSB] = PAD_INFO_ST(UART2_CTSB),
15838c2ecf20Sopenharmony_ci	[UART3_RX] = PAD_INFO_ST(UART3_RX),
15848c2ecf20Sopenharmony_ci	[UART3_TX] = PAD_INFO(UART3_TX),
15858c2ecf20Sopenharmony_ci	[UART3_RTSB] = PAD_INFO_ST(UART3_RTSB),
15868c2ecf20Sopenharmony_ci	[UART3_CTSB] = PAD_INFO_ST(UART3_CTSB),
15878c2ecf20Sopenharmony_ci	[PCM1_IN] = PAD_INFO_ST(PCM1_IN),
15888c2ecf20Sopenharmony_ci	[PCM1_CLK] = PAD_INFO_ST(PCM1_CLK),
15898c2ecf20Sopenharmony_ci	[PCM1_SYNC] = PAD_INFO_PULLCTL_ST(PCM1_SYNC),
15908c2ecf20Sopenharmony_ci	[PCM1_OUT] = PAD_INFO_PULLCTL(PCM1_OUT),
15918c2ecf20Sopenharmony_ci	[I2C1_SCLK] = PAD_INFO_PULLCTL_ST(I2C1_SCLK),
15928c2ecf20Sopenharmony_ci	[I2C1_SDATA] = PAD_INFO_PULLCTL_ST(I2C1_SDATA),
15938c2ecf20Sopenharmony_ci	[I2C2_SCLK] = PAD_INFO_PULLCTL_ST(I2C2_SCLK),
15948c2ecf20Sopenharmony_ci	[I2C2_SDATA] = PAD_INFO_PULLCTL_ST(I2C2_SDATA),
15958c2ecf20Sopenharmony_ci	[CSI_DN0] = PAD_INFO(CSI_DN0),
15968c2ecf20Sopenharmony_ci	[CSI_DP0] = PAD_INFO(CSI_DP0),
15978c2ecf20Sopenharmony_ci	[CSI_DN1] = PAD_INFO(CSI_DN1),
15988c2ecf20Sopenharmony_ci	[CSI_DP1] = PAD_INFO(CSI_DP1),
15998c2ecf20Sopenharmony_ci	[CSI_CN] = PAD_INFO(CSI_CN),
16008c2ecf20Sopenharmony_ci	[CSI_CP] = PAD_INFO(CSI_CP),
16018c2ecf20Sopenharmony_ci	[CSI_DN2] = PAD_INFO(CSI_DN2),
16028c2ecf20Sopenharmony_ci	[CSI_DP2] = PAD_INFO(CSI_DP2),
16038c2ecf20Sopenharmony_ci	[CSI_DN3] = PAD_INFO(CSI_DN3),
16048c2ecf20Sopenharmony_ci	[CSI_DP3] = PAD_INFO(CSI_DP3),
16058c2ecf20Sopenharmony_ci	[DNAND_D0] = PAD_INFO_PULLCTL(DNAND_D0),
16068c2ecf20Sopenharmony_ci	[DNAND_D1] = PAD_INFO_PULLCTL(DNAND_D1),
16078c2ecf20Sopenharmony_ci	[DNAND_D2] = PAD_INFO_PULLCTL(DNAND_D2),
16088c2ecf20Sopenharmony_ci	[DNAND_D3] = PAD_INFO_PULLCTL(DNAND_D3),
16098c2ecf20Sopenharmony_ci	[DNAND_D4] = PAD_INFO_PULLCTL(DNAND_D4),
16108c2ecf20Sopenharmony_ci	[DNAND_D5] = PAD_INFO_PULLCTL(DNAND_D5),
16118c2ecf20Sopenharmony_ci	[DNAND_D6] = PAD_INFO_PULLCTL(DNAND_D6),
16128c2ecf20Sopenharmony_ci	[DNAND_D7] = PAD_INFO_PULLCTL(DNAND_D7),
16138c2ecf20Sopenharmony_ci	[DNAND_WRB] = PAD_INFO(DNAND_WRB),
16148c2ecf20Sopenharmony_ci	[DNAND_RDB] = PAD_INFO(DNAND_RDB),
16158c2ecf20Sopenharmony_ci	[DNAND_RDBN] = PAD_INFO_PULLCTL(DNAND_RDBN),
16168c2ecf20Sopenharmony_ci	[DNAND_RB] = PAD_INFO(DNAND_RB),
16178c2ecf20Sopenharmony_ci	[PORB] = PAD_INFO(PORB),
16188c2ecf20Sopenharmony_ci	[CLKO_25M] = PAD_INFO_PULLCTL(CLKO_25M),
16198c2ecf20Sopenharmony_ci	[BSEL] = PAD_INFO(BSEL),
16208c2ecf20Sopenharmony_ci	[PKG0] = PAD_INFO(PKG0),
16218c2ecf20Sopenharmony_ci	[PKG1] = PAD_INFO(PKG1),
16228c2ecf20Sopenharmony_ci	[PKG2] = PAD_INFO(PKG2),
16238c2ecf20Sopenharmony_ci	[PKG3] = PAD_INFO(PKG3),
16248c2ecf20Sopenharmony_ci};
16258c2ecf20Sopenharmony_ci
16268c2ecf20Sopenharmony_cistatic const struct owl_gpio_port s500_gpio_ports[] = {
16278c2ecf20Sopenharmony_ci	OWL_GPIO_PORT(A, 0x0000, 32, 0x0, 0x4, 0x8, 0x204, 0x208, 0x20C, 0x230, 0),
16288c2ecf20Sopenharmony_ci	OWL_GPIO_PORT(B, 0x000C, 32, 0x0, 0x4, 0x8, 0x1F8, 0x204, 0x208, 0x22C, 1),
16298c2ecf20Sopenharmony_ci	OWL_GPIO_PORT(C, 0x0018, 32, 0x0, 0x4, 0x8, 0x1EC, 0x200, 0x204, 0x228, 2),
16308c2ecf20Sopenharmony_ci	OWL_GPIO_PORT(D, 0x0024, 32, 0x0, 0x4, 0x8, 0x1E0, 0x1FC, 0x200, 0x224, 3),
16318c2ecf20Sopenharmony_ci	OWL_GPIO_PORT(E, 0x0030,  4, 0x0, 0x4, 0x8, 0x1D4, 0x1F8, 0x1FC, 0x220, 4),
16328c2ecf20Sopenharmony_ci};
16338c2ecf20Sopenharmony_ci
16348c2ecf20Sopenharmony_cienum s500_pinconf_pull {
16358c2ecf20Sopenharmony_ci	OWL_PINCONF_PULL_DOWN,
16368c2ecf20Sopenharmony_ci	OWL_PINCONF_PULL_UP,
16378c2ecf20Sopenharmony_ci};
16388c2ecf20Sopenharmony_ci
16398c2ecf20Sopenharmony_cistatic int s500_pad_pinconf_arg2val(const struct owl_padinfo *info,
16408c2ecf20Sopenharmony_ci				    unsigned int param, u32 *arg)
16418c2ecf20Sopenharmony_ci{
16428c2ecf20Sopenharmony_ci	switch (param) {
16438c2ecf20Sopenharmony_ci	case PIN_CONFIG_BIAS_PULL_DOWN:
16448c2ecf20Sopenharmony_ci		*arg = OWL_PINCONF_PULL_DOWN;
16458c2ecf20Sopenharmony_ci		break;
16468c2ecf20Sopenharmony_ci	case PIN_CONFIG_BIAS_PULL_UP:
16478c2ecf20Sopenharmony_ci		*arg = OWL_PINCONF_PULL_UP;
16488c2ecf20Sopenharmony_ci		break;
16498c2ecf20Sopenharmony_ci	case PIN_CONFIG_INPUT_SCHMITT_ENABLE:
16508c2ecf20Sopenharmony_ci		*arg = (*arg >= 1 ? 1 : 0);
16518c2ecf20Sopenharmony_ci		break;
16528c2ecf20Sopenharmony_ci	default:
16538c2ecf20Sopenharmony_ci		return -EOPNOTSUPP;
16548c2ecf20Sopenharmony_ci	}
16558c2ecf20Sopenharmony_ci
16568c2ecf20Sopenharmony_ci	return 0;
16578c2ecf20Sopenharmony_ci}
16588c2ecf20Sopenharmony_ci
16598c2ecf20Sopenharmony_cistatic int s500_pad_pinconf_val2arg(const struct owl_padinfo *padinfo,
16608c2ecf20Sopenharmony_ci				    unsigned int param, u32 *arg)
16618c2ecf20Sopenharmony_ci{
16628c2ecf20Sopenharmony_ci	switch (param) {
16638c2ecf20Sopenharmony_ci	case PIN_CONFIG_BIAS_PULL_DOWN:
16648c2ecf20Sopenharmony_ci		*arg = *arg == OWL_PINCONF_PULL_DOWN;
16658c2ecf20Sopenharmony_ci		break;
16668c2ecf20Sopenharmony_ci	case PIN_CONFIG_BIAS_PULL_UP:
16678c2ecf20Sopenharmony_ci		*arg = *arg == OWL_PINCONF_PULL_UP;
16688c2ecf20Sopenharmony_ci		break;
16698c2ecf20Sopenharmony_ci	case PIN_CONFIG_INPUT_SCHMITT_ENABLE:
16708c2ecf20Sopenharmony_ci		*arg = *arg == 1;
16718c2ecf20Sopenharmony_ci		break;
16728c2ecf20Sopenharmony_ci	default:
16738c2ecf20Sopenharmony_ci		return -EOPNOTSUPP;
16748c2ecf20Sopenharmony_ci	}
16758c2ecf20Sopenharmony_ci
16768c2ecf20Sopenharmony_ci	return 0;
16778c2ecf20Sopenharmony_ci}
16788c2ecf20Sopenharmony_ci
16798c2ecf20Sopenharmony_cistatic struct owl_pinctrl_soc_data s500_pinctrl_data = {
16808c2ecf20Sopenharmony_ci	.padinfo = s500_padinfo,
16818c2ecf20Sopenharmony_ci	.pins = (const struct pinctrl_pin_desc *)s500_pads,
16828c2ecf20Sopenharmony_ci	.npins = ARRAY_SIZE(s500_pads),
16838c2ecf20Sopenharmony_ci	.functions = s500_functions,
16848c2ecf20Sopenharmony_ci	.nfunctions = ARRAY_SIZE(s500_functions),
16858c2ecf20Sopenharmony_ci	.groups = s500_groups,
16868c2ecf20Sopenharmony_ci	.ngroups = ARRAY_SIZE(s500_groups),
16878c2ecf20Sopenharmony_ci	.ngpios = NUM_GPIOS,
16888c2ecf20Sopenharmony_ci	.ports = s500_gpio_ports,
16898c2ecf20Sopenharmony_ci	.nports = ARRAY_SIZE(s500_gpio_ports),
16908c2ecf20Sopenharmony_ci	.padctl_arg2val = s500_pad_pinconf_arg2val,
16918c2ecf20Sopenharmony_ci	.padctl_val2arg = s500_pad_pinconf_val2arg,
16928c2ecf20Sopenharmony_ci};
16938c2ecf20Sopenharmony_ci
16948c2ecf20Sopenharmony_cistatic int s500_pinctrl_probe(struct platform_device *pdev)
16958c2ecf20Sopenharmony_ci{
16968c2ecf20Sopenharmony_ci	return owl_pinctrl_probe(pdev, &s500_pinctrl_data);
16978c2ecf20Sopenharmony_ci}
16988c2ecf20Sopenharmony_ci
16998c2ecf20Sopenharmony_cistatic const struct of_device_id s500_pinctrl_of_match[] = {
17008c2ecf20Sopenharmony_ci	{ .compatible = "actions,s500-pinctrl", },
17018c2ecf20Sopenharmony_ci	{ }
17028c2ecf20Sopenharmony_ci};
17038c2ecf20Sopenharmony_ci
17048c2ecf20Sopenharmony_cistatic struct platform_driver s500_pinctrl_driver = {
17058c2ecf20Sopenharmony_ci	.driver = {
17068c2ecf20Sopenharmony_ci		.name = "pinctrl-s500",
17078c2ecf20Sopenharmony_ci		.of_match_table = of_match_ptr(s500_pinctrl_of_match),
17088c2ecf20Sopenharmony_ci	},
17098c2ecf20Sopenharmony_ci	.probe = s500_pinctrl_probe,
17108c2ecf20Sopenharmony_ci};
17118c2ecf20Sopenharmony_ci
17128c2ecf20Sopenharmony_cistatic int __init s500_pinctrl_init(void)
17138c2ecf20Sopenharmony_ci{
17148c2ecf20Sopenharmony_ci	return platform_driver_register(&s500_pinctrl_driver);
17158c2ecf20Sopenharmony_ci}
17168c2ecf20Sopenharmony_ciarch_initcall(s500_pinctrl_init);
17178c2ecf20Sopenharmony_ci
17188c2ecf20Sopenharmony_cistatic void __exit s500_pinctrl_exit(void)
17198c2ecf20Sopenharmony_ci{
17208c2ecf20Sopenharmony_ci	platform_driver_unregister(&s500_pinctrl_driver);
17218c2ecf20Sopenharmony_ci}
17228c2ecf20Sopenharmony_cimodule_exit(s500_pinctrl_exit);
17238c2ecf20Sopenharmony_ci
17248c2ecf20Sopenharmony_ciMODULE_AUTHOR("Actions Semi Inc.");
17258c2ecf20Sopenharmony_ciMODULE_AUTHOR("Cristian Ciocaltea <cristian.ciocaltea@gmail.com>");
17268c2ecf20Sopenharmony_ciMODULE_DESCRIPTION("Actions Semi S500 SoC Pinctrl Driver");
17278c2ecf20Sopenharmony_ciMODULE_LICENSE("GPL");
1728