18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0-only
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * Pinctrl data for Wondermedia WM8505 SoC
48c2ecf20Sopenharmony_ci *
58c2ecf20Sopenharmony_ci * Copyright (c) 2013 Tony Prisk <linux@prisktech.co.nz>
68c2ecf20Sopenharmony_ci */
78c2ecf20Sopenharmony_ci
88c2ecf20Sopenharmony_ci#include <linux/io.h>
98c2ecf20Sopenharmony_ci#include <linux/init.h>
108c2ecf20Sopenharmony_ci#include <linux/pinctrl/pinctrl.h>
118c2ecf20Sopenharmony_ci#include <linux/platform_device.h>
128c2ecf20Sopenharmony_ci#include <linux/slab.h>
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_ci#include "pinctrl-wmt.h"
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_ci/*
178c2ecf20Sopenharmony_ci * Describe the register offsets within the GPIO memory space
188c2ecf20Sopenharmony_ci * The dedicated external GPIO's should always be listed in bank 0
198c2ecf20Sopenharmony_ci * so they are exported in the 0..31 range which is what users
208c2ecf20Sopenharmony_ci * expect.
218c2ecf20Sopenharmony_ci *
228c2ecf20Sopenharmony_ci * Do not reorder these banks as it will change the pin numbering
238c2ecf20Sopenharmony_ci */
248c2ecf20Sopenharmony_cistatic const struct wmt_pinctrl_bank_registers wm8505_banks[] = {
258c2ecf20Sopenharmony_ci	WMT_PINCTRL_BANK(0x64, 0x8C, 0xB4, 0xDC, NO_REG, NO_REG),	/* 0 */
268c2ecf20Sopenharmony_ci	WMT_PINCTRL_BANK(0x40, 0x68, 0x90, 0xB8, NO_REG, NO_REG),	/* 1 */
278c2ecf20Sopenharmony_ci	WMT_PINCTRL_BANK(0x44, 0x6C, 0x94, 0xBC, NO_REG, NO_REG),	/* 2 */
288c2ecf20Sopenharmony_ci	WMT_PINCTRL_BANK(0x48, 0x70, 0x98, 0xC0, NO_REG, NO_REG),	/* 3 */
298c2ecf20Sopenharmony_ci	WMT_PINCTRL_BANK(0x4C, 0x74, 0x9C, 0xC4, NO_REG, NO_REG),	/* 4 */
308c2ecf20Sopenharmony_ci	WMT_PINCTRL_BANK(0x50, 0x78, 0xA0, 0xC8, NO_REG, NO_REG),	/* 5 */
318c2ecf20Sopenharmony_ci	WMT_PINCTRL_BANK(0x54, 0x7C, 0xA4, 0xD0, NO_REG, NO_REG),	/* 6 */
328c2ecf20Sopenharmony_ci	WMT_PINCTRL_BANK(0x58, 0x80, 0xA8, 0xD4, NO_REG, NO_REG),	/* 7 */
338c2ecf20Sopenharmony_ci	WMT_PINCTRL_BANK(0x5C, 0x84, 0xAC, 0xD8, NO_REG, NO_REG),	/* 8 */
348c2ecf20Sopenharmony_ci	WMT_PINCTRL_BANK(0x60, 0x88, 0xB0, 0xDC, NO_REG, NO_REG),	/* 9 */
358c2ecf20Sopenharmony_ci	WMT_PINCTRL_BANK(0x500, 0x504, 0x508, 0x50C, NO_REG, NO_REG),	/* 10 */
368c2ecf20Sopenharmony_ci};
378c2ecf20Sopenharmony_ci
388c2ecf20Sopenharmony_ci/* Please keep sorted by bank/bit */
398c2ecf20Sopenharmony_ci#define WMT_PIN_EXTGPIO0	WMT_PIN(0, 0)
408c2ecf20Sopenharmony_ci#define WMT_PIN_EXTGPIO1	WMT_PIN(0, 1)
418c2ecf20Sopenharmony_ci#define WMT_PIN_EXTGPIO2	WMT_PIN(0, 2)
428c2ecf20Sopenharmony_ci#define WMT_PIN_EXTGPIO3	WMT_PIN(0, 3)
438c2ecf20Sopenharmony_ci#define WMT_PIN_EXTGPIO4	WMT_PIN(0, 4)
448c2ecf20Sopenharmony_ci#define WMT_PIN_EXTGPIO5	WMT_PIN(0, 5)
458c2ecf20Sopenharmony_ci#define WMT_PIN_EXTGPIO6	WMT_PIN(0, 6)
468c2ecf20Sopenharmony_ci#define WMT_PIN_EXTGPIO7	WMT_PIN(0, 7)
478c2ecf20Sopenharmony_ci#define WMT_PIN_WAKEUP0		WMT_PIN(0, 16)
488c2ecf20Sopenharmony_ci#define WMT_PIN_WAKEUP1		WMT_PIN(0, 17)
498c2ecf20Sopenharmony_ci#define WMT_PIN_WAKEUP2		WMT_PIN(0, 18)
508c2ecf20Sopenharmony_ci#define WMT_PIN_WAKEUP3		WMT_PIN(0, 19)
518c2ecf20Sopenharmony_ci#define WMT_PIN_SUSGPIO0	WMT_PIN(0, 21)
528c2ecf20Sopenharmony_ci#define WMT_PIN_SDDATA0		WMT_PIN(1, 0)
538c2ecf20Sopenharmony_ci#define WMT_PIN_SDDATA1		WMT_PIN(1, 1)
548c2ecf20Sopenharmony_ci#define WMT_PIN_SDDATA2		WMT_PIN(1, 2)
558c2ecf20Sopenharmony_ci#define WMT_PIN_SDDATA3		WMT_PIN(1, 3)
568c2ecf20Sopenharmony_ci#define WMT_PIN_MMCDATA0	WMT_PIN(1, 4)
578c2ecf20Sopenharmony_ci#define WMT_PIN_MMCDATA1	WMT_PIN(1, 5)
588c2ecf20Sopenharmony_ci#define WMT_PIN_MMCDATA2	WMT_PIN(1, 6)
598c2ecf20Sopenharmony_ci#define WMT_PIN_MMCDATA3	WMT_PIN(1, 7)
608c2ecf20Sopenharmony_ci#define WMT_PIN_VDIN0		WMT_PIN(2, 0)
618c2ecf20Sopenharmony_ci#define WMT_PIN_VDIN1		WMT_PIN(2, 1)
628c2ecf20Sopenharmony_ci#define WMT_PIN_VDIN2		WMT_PIN(2, 2)
638c2ecf20Sopenharmony_ci#define WMT_PIN_VDIN3		WMT_PIN(2, 3)
648c2ecf20Sopenharmony_ci#define WMT_PIN_VDIN4		WMT_PIN(2, 4)
658c2ecf20Sopenharmony_ci#define WMT_PIN_VDIN5		WMT_PIN(2, 5)
668c2ecf20Sopenharmony_ci#define WMT_PIN_VDIN6		WMT_PIN(2, 6)
678c2ecf20Sopenharmony_ci#define WMT_PIN_VDIN7		WMT_PIN(2, 7)
688c2ecf20Sopenharmony_ci#define WMT_PIN_VDOUT0		WMT_PIN(2, 8)
698c2ecf20Sopenharmony_ci#define WMT_PIN_VDOUT1		WMT_PIN(2, 9)
708c2ecf20Sopenharmony_ci#define WMT_PIN_VDOUT2		WMT_PIN(2, 10)
718c2ecf20Sopenharmony_ci#define WMT_PIN_VDOUT3		WMT_PIN(2, 11)
728c2ecf20Sopenharmony_ci#define WMT_PIN_VDOUT4		WMT_PIN(2, 12)
738c2ecf20Sopenharmony_ci#define WMT_PIN_VDOUT5		WMT_PIN(2, 13)
748c2ecf20Sopenharmony_ci#define WMT_PIN_VDOUT6		WMT_PIN(2, 14)
758c2ecf20Sopenharmony_ci#define WMT_PIN_VDOUT7		WMT_PIN(2, 15)
768c2ecf20Sopenharmony_ci#define WMT_PIN_VDOUT8		WMT_PIN(2, 16)
778c2ecf20Sopenharmony_ci#define WMT_PIN_VDOUT9		WMT_PIN(2, 17)
788c2ecf20Sopenharmony_ci#define WMT_PIN_VDOUT10		WMT_PIN(2, 18)
798c2ecf20Sopenharmony_ci#define WMT_PIN_VDOUT11		WMT_PIN(2, 19)
808c2ecf20Sopenharmony_ci#define WMT_PIN_VDOUT12		WMT_PIN(2, 20)
818c2ecf20Sopenharmony_ci#define WMT_PIN_VDOUT13		WMT_PIN(2, 21)
828c2ecf20Sopenharmony_ci#define WMT_PIN_VDOUT14		WMT_PIN(2, 22)
838c2ecf20Sopenharmony_ci#define WMT_PIN_VDOUT15		WMT_PIN(2, 23)
848c2ecf20Sopenharmony_ci#define WMT_PIN_VDOUT16		WMT_PIN(2, 24)
858c2ecf20Sopenharmony_ci#define WMT_PIN_VDOUT17		WMT_PIN(2, 25)
868c2ecf20Sopenharmony_ci#define WMT_PIN_VDOUT18		WMT_PIN(2, 26)
878c2ecf20Sopenharmony_ci#define WMT_PIN_VDOUT19		WMT_PIN(2, 27)
888c2ecf20Sopenharmony_ci#define WMT_PIN_VDOUT20		WMT_PIN(2, 28)
898c2ecf20Sopenharmony_ci#define WMT_PIN_VDOUT21		WMT_PIN(2, 29)
908c2ecf20Sopenharmony_ci#define WMT_PIN_VDOUT22		WMT_PIN(2, 30)
918c2ecf20Sopenharmony_ci#define WMT_PIN_VDOUT23		WMT_PIN(2, 31)
928c2ecf20Sopenharmony_ci#define WMT_PIN_VHSYNC		WMT_PIN(3, 0)
938c2ecf20Sopenharmony_ci#define WMT_PIN_VVSYNC		WMT_PIN(3, 1)
948c2ecf20Sopenharmony_ci#define WMT_PIN_VGAHSYNC	WMT_PIN(3, 2)
958c2ecf20Sopenharmony_ci#define WMT_PIN_VGAVSYNC	WMT_PIN(3, 3)
968c2ecf20Sopenharmony_ci#define WMT_PIN_VDHSYNC		WMT_PIN(3, 4)
978c2ecf20Sopenharmony_ci#define WMT_PIN_VDVSYNC		WMT_PIN(3, 5)
988c2ecf20Sopenharmony_ci#define WMT_PIN_NORD0		WMT_PIN(4, 0)
998c2ecf20Sopenharmony_ci#define WMT_PIN_NORD1		WMT_PIN(4, 1)
1008c2ecf20Sopenharmony_ci#define WMT_PIN_NORD2		WMT_PIN(4, 2)
1018c2ecf20Sopenharmony_ci#define WMT_PIN_NORD3		WMT_PIN(4, 3)
1028c2ecf20Sopenharmony_ci#define WMT_PIN_NORD4		WMT_PIN(4, 4)
1038c2ecf20Sopenharmony_ci#define WMT_PIN_NORD5		WMT_PIN(4, 5)
1048c2ecf20Sopenharmony_ci#define WMT_PIN_NORD6		WMT_PIN(4, 6)
1058c2ecf20Sopenharmony_ci#define WMT_PIN_NORD7		WMT_PIN(4, 7)
1068c2ecf20Sopenharmony_ci#define WMT_PIN_NORD8		WMT_PIN(4, 8)
1078c2ecf20Sopenharmony_ci#define WMT_PIN_NORD9		WMT_PIN(4, 9)
1088c2ecf20Sopenharmony_ci#define WMT_PIN_NORD10		WMT_PIN(4, 10)
1098c2ecf20Sopenharmony_ci#define WMT_PIN_NORD11		WMT_PIN(4, 11)
1108c2ecf20Sopenharmony_ci#define WMT_PIN_NORD12		WMT_PIN(4, 12)
1118c2ecf20Sopenharmony_ci#define WMT_PIN_NORD13		WMT_PIN(4, 13)
1128c2ecf20Sopenharmony_ci#define WMT_PIN_NORD14		WMT_PIN(4, 14)
1138c2ecf20Sopenharmony_ci#define WMT_PIN_NORD15		WMT_PIN(4, 15)
1148c2ecf20Sopenharmony_ci#define WMT_PIN_NORA0		WMT_PIN(5, 0)
1158c2ecf20Sopenharmony_ci#define WMT_PIN_NORA1		WMT_PIN(5, 1)
1168c2ecf20Sopenharmony_ci#define WMT_PIN_NORA2		WMT_PIN(5, 2)
1178c2ecf20Sopenharmony_ci#define WMT_PIN_NORA3		WMT_PIN(5, 3)
1188c2ecf20Sopenharmony_ci#define WMT_PIN_NORA4		WMT_PIN(5, 4)
1198c2ecf20Sopenharmony_ci#define WMT_PIN_NORA5		WMT_PIN(5, 5)
1208c2ecf20Sopenharmony_ci#define WMT_PIN_NORA6		WMT_PIN(5, 6)
1218c2ecf20Sopenharmony_ci#define WMT_PIN_NORA7		WMT_PIN(5, 7)
1228c2ecf20Sopenharmony_ci#define WMT_PIN_NORA8		WMT_PIN(5, 8)
1238c2ecf20Sopenharmony_ci#define WMT_PIN_NORA9		WMT_PIN(5, 9)
1248c2ecf20Sopenharmony_ci#define WMT_PIN_NORA10		WMT_PIN(5, 10)
1258c2ecf20Sopenharmony_ci#define WMT_PIN_NORA11		WMT_PIN(5, 11)
1268c2ecf20Sopenharmony_ci#define WMT_PIN_NORA12		WMT_PIN(5, 12)
1278c2ecf20Sopenharmony_ci#define WMT_PIN_NORA13		WMT_PIN(5, 13)
1288c2ecf20Sopenharmony_ci#define WMT_PIN_NORA14		WMT_PIN(5, 14)
1298c2ecf20Sopenharmony_ci#define WMT_PIN_NORA15		WMT_PIN(5, 15)
1308c2ecf20Sopenharmony_ci#define WMT_PIN_NORA16		WMT_PIN(5, 16)
1318c2ecf20Sopenharmony_ci#define WMT_PIN_NORA17		WMT_PIN(5, 17)
1328c2ecf20Sopenharmony_ci#define WMT_PIN_NORA18		WMT_PIN(5, 18)
1338c2ecf20Sopenharmony_ci#define WMT_PIN_NORA19		WMT_PIN(5, 19)
1348c2ecf20Sopenharmony_ci#define WMT_PIN_NORA20		WMT_PIN(5, 20)
1358c2ecf20Sopenharmony_ci#define WMT_PIN_NORA21		WMT_PIN(5, 21)
1368c2ecf20Sopenharmony_ci#define WMT_PIN_NORA22		WMT_PIN(5, 22)
1378c2ecf20Sopenharmony_ci#define WMT_PIN_NORA23		WMT_PIN(5, 23)
1388c2ecf20Sopenharmony_ci#define WMT_PIN_NORA24		WMT_PIN(5, 24)
1398c2ecf20Sopenharmony_ci#define WMT_PIN_AC97SDI		WMT_PIN(6, 0)
1408c2ecf20Sopenharmony_ci#define WMT_PIN_AC97SYNC	WMT_PIN(6, 1)
1418c2ecf20Sopenharmony_ci#define WMT_PIN_AC97SDO		WMT_PIN(6, 2)
1428c2ecf20Sopenharmony_ci#define WMT_PIN_AC97BCLK	WMT_PIN(6, 3)
1438c2ecf20Sopenharmony_ci#define WMT_PIN_AC97RST		WMT_PIN(6, 4)
1448c2ecf20Sopenharmony_ci#define WMT_PIN_SFDO		WMT_PIN(7, 0)
1458c2ecf20Sopenharmony_ci#define WMT_PIN_SFCS0		WMT_PIN(7, 1)
1468c2ecf20Sopenharmony_ci#define WMT_PIN_SFCS1		WMT_PIN(7, 2)
1478c2ecf20Sopenharmony_ci#define WMT_PIN_SFCLK		WMT_PIN(7, 3)
1488c2ecf20Sopenharmony_ci#define WMT_PIN_SFDI		WMT_PIN(7, 4)
1498c2ecf20Sopenharmony_ci#define WMT_PIN_SPI0CLK		WMT_PIN(8, 0)
1508c2ecf20Sopenharmony_ci#define WMT_PIN_SPI0MISO	WMT_PIN(8, 1)
1518c2ecf20Sopenharmony_ci#define WMT_PIN_SPI0MOSI	WMT_PIN(8, 2)
1528c2ecf20Sopenharmony_ci#define WMT_PIN_SPI0SS		WMT_PIN(8, 3)
1538c2ecf20Sopenharmony_ci#define WMT_PIN_SPI1CLK		WMT_PIN(8, 4)
1548c2ecf20Sopenharmony_ci#define WMT_PIN_SPI1MISO	WMT_PIN(8, 5)
1558c2ecf20Sopenharmony_ci#define WMT_PIN_SPI1MOSI	WMT_PIN(8, 6)
1568c2ecf20Sopenharmony_ci#define WMT_PIN_SPI1SS		WMT_PIN(8, 7)
1578c2ecf20Sopenharmony_ci#define WMT_PIN_SPI2CLK		WMT_PIN(8, 8)
1588c2ecf20Sopenharmony_ci#define WMT_PIN_SPI2MISO	WMT_PIN(8, 9)
1598c2ecf20Sopenharmony_ci#define WMT_PIN_SPI2MOSI	WMT_PIN(8, 10)
1608c2ecf20Sopenharmony_ci#define WMT_PIN_SPI2SS		WMT_PIN(8, 11)
1618c2ecf20Sopenharmony_ci#define WMT_PIN_UART0_RTS	WMT_PIN(9, 0)
1628c2ecf20Sopenharmony_ci#define WMT_PIN_UART0_TXD	WMT_PIN(9, 1)
1638c2ecf20Sopenharmony_ci#define WMT_PIN_UART0_CTS	WMT_PIN(9, 2)
1648c2ecf20Sopenharmony_ci#define WMT_PIN_UART0_RXD	WMT_PIN(9, 3)
1658c2ecf20Sopenharmony_ci#define WMT_PIN_UART1_RTS	WMT_PIN(9, 4)
1668c2ecf20Sopenharmony_ci#define WMT_PIN_UART1_TXD	WMT_PIN(9, 5)
1678c2ecf20Sopenharmony_ci#define WMT_PIN_UART1_CTS	WMT_PIN(9, 6)
1688c2ecf20Sopenharmony_ci#define WMT_PIN_UART1_RXD	WMT_PIN(9, 7)
1698c2ecf20Sopenharmony_ci#define WMT_PIN_UART2_RTS	WMT_PIN(9, 8)
1708c2ecf20Sopenharmony_ci#define WMT_PIN_UART2_TXD	WMT_PIN(9, 9)
1718c2ecf20Sopenharmony_ci#define WMT_PIN_UART2_CTS	WMT_PIN(9, 10)
1728c2ecf20Sopenharmony_ci#define WMT_PIN_UART2_RXD	WMT_PIN(9, 11)
1738c2ecf20Sopenharmony_ci#define WMT_PIN_UART3_RTS	WMT_PIN(9, 12)
1748c2ecf20Sopenharmony_ci#define WMT_PIN_UART3_TXD	WMT_PIN(9, 13)
1758c2ecf20Sopenharmony_ci#define WMT_PIN_UART3_CTS	WMT_PIN(9, 14)
1768c2ecf20Sopenharmony_ci#define WMT_PIN_UART3_RXD	WMT_PIN(9, 15)
1778c2ecf20Sopenharmony_ci#define WMT_PIN_I2C0SCL		WMT_PIN(10, 0)
1788c2ecf20Sopenharmony_ci#define WMT_PIN_I2C0SDA		WMT_PIN(10, 1)
1798c2ecf20Sopenharmony_ci#define WMT_PIN_I2C1SCL		WMT_PIN(10, 2)
1808c2ecf20Sopenharmony_ci#define WMT_PIN_I2C1SDA		WMT_PIN(10, 3)
1818c2ecf20Sopenharmony_ci#define WMT_PIN_I2C2SCL		WMT_PIN(10, 4)
1828c2ecf20Sopenharmony_ci#define WMT_PIN_I2C2SDA		WMT_PIN(10, 5)
1838c2ecf20Sopenharmony_ci
1848c2ecf20Sopenharmony_cistatic const struct pinctrl_pin_desc wm8505_pins[] = {
1858c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_EXTGPIO0, "extgpio0"),
1868c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_EXTGPIO1, "extgpio1"),
1878c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_EXTGPIO2, "extgpio2"),
1888c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_EXTGPIO3, "extgpio3"),
1898c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_EXTGPIO4, "extgpio4"),
1908c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_EXTGPIO5, "extgpio5"),
1918c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_EXTGPIO6, "extgpio6"),
1928c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_EXTGPIO7, "extgpio7"),
1938c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_WAKEUP0, "wakeup0"),
1948c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_WAKEUP1, "wakeup1"),
1958c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_WAKEUP2, "wakeup2"),
1968c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_WAKEUP3, "wakeup3"),
1978c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_SUSGPIO0, "susgpio0"),
1988c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_SDDATA0, "sd_data0"),
1998c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_SDDATA1, "sd_data1"),
2008c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_SDDATA2, "sd_data2"),
2018c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_SDDATA3, "sd_data3"),
2028c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_MMCDATA0, "mmc_data0"),
2038c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_MMCDATA1, "mmc_data1"),
2048c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_MMCDATA2, "mmc_data2"),
2058c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_MMCDATA3, "mmc_data3"),
2068c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_VDIN0, "vdin0"),
2078c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_VDIN1, "vdin1"),
2088c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_VDIN2, "vdin2"),
2098c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_VDIN3, "vdin3"),
2108c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_VDIN4, "vdin4"),
2118c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_VDIN5, "vdin5"),
2128c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_VDIN6, "vdin6"),
2138c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_VDIN7, "vdin7"),
2148c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_VDOUT0, "vdout0"),
2158c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_VDOUT1, "vdout1"),
2168c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_VDOUT2, "vdout2"),
2178c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_VDOUT3, "vdout3"),
2188c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_VDOUT4, "vdout4"),
2198c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_VDOUT5, "vdout5"),
2208c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_VDOUT6, "vdout6"),
2218c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_VDOUT7, "vdout7"),
2228c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_VDOUT8, "vdout8"),
2238c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_VDOUT9, "vdout9"),
2248c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_VDOUT10, "vdout10"),
2258c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_VDOUT11, "vdout11"),
2268c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_VDOUT12, "vdout12"),
2278c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_VDOUT13, "vdout13"),
2288c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_VDOUT14, "vdout14"),
2298c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_VDOUT15, "vdout15"),
2308c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_VDOUT16, "vdout16"),
2318c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_VDOUT17, "vdout17"),
2328c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_VDOUT18, "vdout18"),
2338c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_VDOUT19, "vdout19"),
2348c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_VDOUT20, "vdout20"),
2358c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_VDOUT21, "vdout21"),
2368c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_VDOUT22, "vdout22"),
2378c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_VDOUT23, "vdout23"),
2388c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_VHSYNC, "v_hsync"),
2398c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_VVSYNC, "v_vsync"),
2408c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_VGAHSYNC, "vga_hsync"),
2418c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_VGAVSYNC, "vga_vsync"),
2428c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_VDHSYNC, "vd_hsync"),
2438c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_VDVSYNC, "vd_vsync"),
2448c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_NORD0, "nor_d0"),
2458c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_NORD1, "nor_d1"),
2468c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_NORD2, "nor_d2"),
2478c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_NORD3, "nor_d3"),
2488c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_NORD4, "nor_d4"),
2498c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_NORD5, "nor_d5"),
2508c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_NORD6, "nor_d6"),
2518c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_NORD7, "nor_d7"),
2528c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_NORD8, "nor_d8"),
2538c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_NORD9, "nor_d9"),
2548c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_NORD10, "nor_d10"),
2558c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_NORD11, "nor_d11"),
2568c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_NORD12, "nor_d12"),
2578c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_NORD13, "nor_d13"),
2588c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_NORD14, "nor_d14"),
2598c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_NORD15, "nor_d15"),
2608c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_NORA0, "nor_a0"),
2618c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_NORA1, "nor_a1"),
2628c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_NORA2, "nor_a2"),
2638c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_NORA3, "nor_a3"),
2648c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_NORA4, "nor_a4"),
2658c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_NORA5, "nor_a5"),
2668c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_NORA6, "nor_a6"),
2678c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_NORA7, "nor_a7"),
2688c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_NORA8, "nor_a8"),
2698c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_NORA9, "nor_a9"),
2708c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_NORA10, "nor_a10"),
2718c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_NORA11, "nor_a11"),
2728c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_NORA12, "nor_a12"),
2738c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_NORA13, "nor_a13"),
2748c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_NORA14, "nor_a14"),
2758c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_NORA15, "nor_a15"),
2768c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_NORA16, "nor_a16"),
2778c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_NORA17, "nor_a17"),
2788c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_NORA18, "nor_a18"),
2798c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_NORA19, "nor_a19"),
2808c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_NORA20, "nor_a20"),
2818c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_NORA21, "nor_a21"),
2828c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_NORA22, "nor_a22"),
2838c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_NORA23, "nor_a23"),
2848c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_NORA24, "nor_a24"),
2858c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_AC97SDI, "ac97_sdi"),
2868c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_AC97SYNC, "ac97_sync"),
2878c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_AC97SDO, "ac97_sdo"),
2888c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_AC97BCLK, "ac97_bclk"),
2898c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_AC97RST, "ac97_rst"),
2908c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_SFDO, "sf_do"),
2918c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_SFCS0, "sf_cs0"),
2928c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_SFCS1, "sf_cs1"),
2938c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_SFCLK, "sf_clk"),
2948c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_SFDI, "sf_di"),
2958c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_SPI0CLK, "spi0_clk"),
2968c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_SPI0MISO, "spi0_miso"),
2978c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_SPI0MOSI, "spi0_mosi"),
2988c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_SPI0SS, "spi0_ss"),
2998c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_SPI1CLK, "spi1_clk"),
3008c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_SPI1MISO, "spi1_miso"),
3018c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_SPI1MOSI, "spi1_mosi"),
3028c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_SPI1SS, "spi1_ss"),
3038c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_SPI2CLK, "spi2_clk"),
3048c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_SPI2MISO, "spi2_miso"),
3058c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_SPI2MOSI, "spi2_mosi"),
3068c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_SPI2SS, "spi2_ss"),
3078c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_UART0_RTS, "uart0_rts"),
3088c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_UART0_TXD, "uart0_txd"),
3098c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_UART0_CTS, "uart0_cts"),
3108c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_UART0_RXD, "uart0_rxd"),
3118c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_UART1_RTS, "uart1_rts"),
3128c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_UART1_TXD, "uart1_txd"),
3138c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_UART1_CTS, "uart1_cts"),
3148c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_UART1_RXD, "uart1_rxd"),
3158c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_UART2_RTS, "uart2_rts"),
3168c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_UART2_TXD, "uart2_txd"),
3178c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_UART2_CTS, "uart2_cts"),
3188c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_UART2_RXD, "uart2_rxd"),
3198c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_UART3_RTS, "uart3_rts"),
3208c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_UART3_TXD, "uart3_txd"),
3218c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_UART3_CTS, "uart3_cts"),
3228c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_UART3_RXD, "uart3_rxd"),
3238c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_I2C0SCL, "i2c0_scl"),
3248c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_I2C0SDA, "i2c0_sda"),
3258c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_I2C1SCL, "i2c1_scl"),
3268c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_I2C1SDA, "i2c1_sda"),
3278c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_I2C2SCL, "i2c2_scl"),
3288c2ecf20Sopenharmony_ci	PINCTRL_PIN(WMT_PIN_I2C2SDA, "i2c2_sda"),
3298c2ecf20Sopenharmony_ci};
3308c2ecf20Sopenharmony_ci
3318c2ecf20Sopenharmony_ci/* Order of these names must match the above list */
3328c2ecf20Sopenharmony_cistatic const char * const wm8505_groups[] = {
3338c2ecf20Sopenharmony_ci	"extgpio0",
3348c2ecf20Sopenharmony_ci	"extgpio1",
3358c2ecf20Sopenharmony_ci	"extgpio2",
3368c2ecf20Sopenharmony_ci	"extgpio3",
3378c2ecf20Sopenharmony_ci	"extgpio4",
3388c2ecf20Sopenharmony_ci	"extgpio5",
3398c2ecf20Sopenharmony_ci	"extgpio6",
3408c2ecf20Sopenharmony_ci	"extgpio7",
3418c2ecf20Sopenharmony_ci	"wakeup0",
3428c2ecf20Sopenharmony_ci	"wakeup1",
3438c2ecf20Sopenharmony_ci	"wakeup2",
3448c2ecf20Sopenharmony_ci	"wakeup3",
3458c2ecf20Sopenharmony_ci	"susgpio0",
3468c2ecf20Sopenharmony_ci	"sd_data0",
3478c2ecf20Sopenharmony_ci	"sd_data1",
3488c2ecf20Sopenharmony_ci	"sd_data2",
3498c2ecf20Sopenharmony_ci	"sd_data3",
3508c2ecf20Sopenharmony_ci	"mmc_data0",
3518c2ecf20Sopenharmony_ci	"mmc_data1",
3528c2ecf20Sopenharmony_ci	"mmc_data2",
3538c2ecf20Sopenharmony_ci	"mmc_data3",
3548c2ecf20Sopenharmony_ci	"vdin0",
3558c2ecf20Sopenharmony_ci	"vdin1",
3568c2ecf20Sopenharmony_ci	"vdin2",
3578c2ecf20Sopenharmony_ci	"vdin3",
3588c2ecf20Sopenharmony_ci	"vdin4",
3598c2ecf20Sopenharmony_ci	"vdin5",
3608c2ecf20Sopenharmony_ci	"vdin6",
3618c2ecf20Sopenharmony_ci	"vdin7",
3628c2ecf20Sopenharmony_ci	"vdout0",
3638c2ecf20Sopenharmony_ci	"vdout1",
3648c2ecf20Sopenharmony_ci	"vdout2",
3658c2ecf20Sopenharmony_ci	"vdout3",
3668c2ecf20Sopenharmony_ci	"vdout4",
3678c2ecf20Sopenharmony_ci	"vdout5",
3688c2ecf20Sopenharmony_ci	"vdout6",
3698c2ecf20Sopenharmony_ci	"vdout7",
3708c2ecf20Sopenharmony_ci	"vdout8",
3718c2ecf20Sopenharmony_ci	"vdout9",
3728c2ecf20Sopenharmony_ci	"vdout10",
3738c2ecf20Sopenharmony_ci	"vdout11",
3748c2ecf20Sopenharmony_ci	"vdout12",
3758c2ecf20Sopenharmony_ci	"vdout13",
3768c2ecf20Sopenharmony_ci	"vdout14",
3778c2ecf20Sopenharmony_ci	"vdout15",
3788c2ecf20Sopenharmony_ci	"vdout16",
3798c2ecf20Sopenharmony_ci	"vdout17",
3808c2ecf20Sopenharmony_ci	"vdout18",
3818c2ecf20Sopenharmony_ci	"vdout19",
3828c2ecf20Sopenharmony_ci	"vdout20",
3838c2ecf20Sopenharmony_ci	"vdout21",
3848c2ecf20Sopenharmony_ci	"vdout22",
3858c2ecf20Sopenharmony_ci	"vdout23",
3868c2ecf20Sopenharmony_ci	"v_hsync",
3878c2ecf20Sopenharmony_ci	"v_vsync",
3888c2ecf20Sopenharmony_ci	"vga_hsync",
3898c2ecf20Sopenharmony_ci	"vga_vsync",
3908c2ecf20Sopenharmony_ci	"vd_hsync",
3918c2ecf20Sopenharmony_ci	"vd_vsync",
3928c2ecf20Sopenharmony_ci	"nor_d0",
3938c2ecf20Sopenharmony_ci	"nor_d1",
3948c2ecf20Sopenharmony_ci	"nor_d2",
3958c2ecf20Sopenharmony_ci	"nor_d3",
3968c2ecf20Sopenharmony_ci	"nor_d4",
3978c2ecf20Sopenharmony_ci	"nor_d5",
3988c2ecf20Sopenharmony_ci	"nor_d6",
3998c2ecf20Sopenharmony_ci	"nor_d7",
4008c2ecf20Sopenharmony_ci	"nor_d8",
4018c2ecf20Sopenharmony_ci	"nor_d9",
4028c2ecf20Sopenharmony_ci	"nor_d10",
4038c2ecf20Sopenharmony_ci	"nor_d11",
4048c2ecf20Sopenharmony_ci	"nor_d12",
4058c2ecf20Sopenharmony_ci	"nor_d13",
4068c2ecf20Sopenharmony_ci	"nor_d14",
4078c2ecf20Sopenharmony_ci	"nor_d15",
4088c2ecf20Sopenharmony_ci	"nor_a0",
4098c2ecf20Sopenharmony_ci	"nor_a1",
4108c2ecf20Sopenharmony_ci	"nor_a2",
4118c2ecf20Sopenharmony_ci	"nor_a3",
4128c2ecf20Sopenharmony_ci	"nor_a4",
4138c2ecf20Sopenharmony_ci	"nor_a5",
4148c2ecf20Sopenharmony_ci	"nor_a6",
4158c2ecf20Sopenharmony_ci	"nor_a7",
4168c2ecf20Sopenharmony_ci	"nor_a8",
4178c2ecf20Sopenharmony_ci	"nor_a9",
4188c2ecf20Sopenharmony_ci	"nor_a10",
4198c2ecf20Sopenharmony_ci	"nor_a11",
4208c2ecf20Sopenharmony_ci	"nor_a12",
4218c2ecf20Sopenharmony_ci	"nor_a13",
4228c2ecf20Sopenharmony_ci	"nor_a14",
4238c2ecf20Sopenharmony_ci	"nor_a15",
4248c2ecf20Sopenharmony_ci	"nor_a16",
4258c2ecf20Sopenharmony_ci	"nor_a17",
4268c2ecf20Sopenharmony_ci	"nor_a18",
4278c2ecf20Sopenharmony_ci	"nor_a19",
4288c2ecf20Sopenharmony_ci	"nor_a20",
4298c2ecf20Sopenharmony_ci	"nor_a21",
4308c2ecf20Sopenharmony_ci	"nor_a22",
4318c2ecf20Sopenharmony_ci	"nor_a23",
4328c2ecf20Sopenharmony_ci	"nor_a24",
4338c2ecf20Sopenharmony_ci	"ac97_sdi",
4348c2ecf20Sopenharmony_ci	"ac97_sync",
4358c2ecf20Sopenharmony_ci	"ac97_sdo",
4368c2ecf20Sopenharmony_ci	"ac97_bclk",
4378c2ecf20Sopenharmony_ci	"ac97_rst",
4388c2ecf20Sopenharmony_ci	"sf_do",
4398c2ecf20Sopenharmony_ci	"sf_cs0",
4408c2ecf20Sopenharmony_ci	"sf_cs1",
4418c2ecf20Sopenharmony_ci	"sf_clk",
4428c2ecf20Sopenharmony_ci	"sf_di",
4438c2ecf20Sopenharmony_ci	"spi0_clk",
4448c2ecf20Sopenharmony_ci	"spi0_miso",
4458c2ecf20Sopenharmony_ci	"spi0_mosi",
4468c2ecf20Sopenharmony_ci	"spi0_ss",
4478c2ecf20Sopenharmony_ci	"spi1_clk",
4488c2ecf20Sopenharmony_ci	"spi1_miso",
4498c2ecf20Sopenharmony_ci	"spi1_mosi",
4508c2ecf20Sopenharmony_ci	"spi1_ss",
4518c2ecf20Sopenharmony_ci	"spi2_clk",
4528c2ecf20Sopenharmony_ci	"spi2_miso",
4538c2ecf20Sopenharmony_ci	"spi2_mosi",
4548c2ecf20Sopenharmony_ci	"spi2_ss",
4558c2ecf20Sopenharmony_ci	"uart0_rts",
4568c2ecf20Sopenharmony_ci	"uart0_txd",
4578c2ecf20Sopenharmony_ci	"uart0_cts",
4588c2ecf20Sopenharmony_ci	"uart0_rxd",
4598c2ecf20Sopenharmony_ci	"uart1_rts",
4608c2ecf20Sopenharmony_ci	"uart1_txd",
4618c2ecf20Sopenharmony_ci	"uart1_cts",
4628c2ecf20Sopenharmony_ci	"uart1_rxd",
4638c2ecf20Sopenharmony_ci	"uart2_rts",
4648c2ecf20Sopenharmony_ci	"uart2_txd",
4658c2ecf20Sopenharmony_ci	"uart2_cts",
4668c2ecf20Sopenharmony_ci	"uart2_rxd",
4678c2ecf20Sopenharmony_ci	"uart3_rts",
4688c2ecf20Sopenharmony_ci	"uart3_txd",
4698c2ecf20Sopenharmony_ci	"uart3_cts",
4708c2ecf20Sopenharmony_ci	"uart3_rxd",
4718c2ecf20Sopenharmony_ci	"i2c0_scl",
4728c2ecf20Sopenharmony_ci	"i2c0_sda",
4738c2ecf20Sopenharmony_ci	"i2c1_scl",
4748c2ecf20Sopenharmony_ci	"i2c1_sda",
4758c2ecf20Sopenharmony_ci	"i2c2_scl",
4768c2ecf20Sopenharmony_ci	"i2c2_sda",
4778c2ecf20Sopenharmony_ci};
4788c2ecf20Sopenharmony_ci
4798c2ecf20Sopenharmony_cistatic int wm8505_pinctrl_probe(struct platform_device *pdev)
4808c2ecf20Sopenharmony_ci{
4818c2ecf20Sopenharmony_ci	struct wmt_pinctrl_data *data;
4828c2ecf20Sopenharmony_ci
4838c2ecf20Sopenharmony_ci	data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL);
4848c2ecf20Sopenharmony_ci	if (!data)
4858c2ecf20Sopenharmony_ci		return -ENOMEM;
4868c2ecf20Sopenharmony_ci
4878c2ecf20Sopenharmony_ci	data->banks = wm8505_banks;
4888c2ecf20Sopenharmony_ci	data->nbanks = ARRAY_SIZE(wm8505_banks);
4898c2ecf20Sopenharmony_ci	data->pins = wm8505_pins;
4908c2ecf20Sopenharmony_ci	data->npins = ARRAY_SIZE(wm8505_pins);
4918c2ecf20Sopenharmony_ci	data->groups = wm8505_groups;
4928c2ecf20Sopenharmony_ci	data->ngroups = ARRAY_SIZE(wm8505_groups);
4938c2ecf20Sopenharmony_ci
4948c2ecf20Sopenharmony_ci	return wmt_pinctrl_probe(pdev, data);
4958c2ecf20Sopenharmony_ci}
4968c2ecf20Sopenharmony_ci
4978c2ecf20Sopenharmony_cistatic const struct of_device_id wmt_pinctrl_of_match[] = {
4988c2ecf20Sopenharmony_ci	{ .compatible = "wm,wm8505-pinctrl" },
4998c2ecf20Sopenharmony_ci	{ /* sentinel */ },
5008c2ecf20Sopenharmony_ci};
5018c2ecf20Sopenharmony_ci
5028c2ecf20Sopenharmony_cistatic struct platform_driver wmt_pinctrl_driver = {
5038c2ecf20Sopenharmony_ci	.probe	= wm8505_pinctrl_probe,
5048c2ecf20Sopenharmony_ci	.driver = {
5058c2ecf20Sopenharmony_ci		.name	= "pinctrl-wm8505",
5068c2ecf20Sopenharmony_ci		.of_match_table	= wmt_pinctrl_of_match,
5078c2ecf20Sopenharmony_ci		.suppress_bind_attrs = true,
5088c2ecf20Sopenharmony_ci	},
5098c2ecf20Sopenharmony_ci};
5108c2ecf20Sopenharmony_cibuiltin_platform_driver(wmt_pinctrl_driver);
511