18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Marvell Berlin BG2 pinctrl driver. 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * Copyright (C) 2014 Marvell Technology Group Ltd. 68c2ecf20Sopenharmony_ci * 78c2ecf20Sopenharmony_ci * Antoine Ténart <antoine.tenart@free-electrons.com> 88c2ecf20Sopenharmony_ci */ 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ci#include <linux/init.h> 118c2ecf20Sopenharmony_ci#include <linux/of_device.h> 128c2ecf20Sopenharmony_ci#include <linux/platform_device.h> 138c2ecf20Sopenharmony_ci#include <linux/regmap.h> 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ci#include "berlin.h" 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_cistatic const struct berlin_desc_group berlin2_soc_pinctrl_groups[] = { 188c2ecf20Sopenharmony_ci /* G */ 198c2ecf20Sopenharmony_ci BERLIN_PINCTRL_GROUP("G0", 0x00, 0x1, 0x00, 208c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x0, "spi1"), /* SS0n */ 218c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x1, "gpio")), 228c2ecf20Sopenharmony_ci BERLIN_PINCTRL_GROUP("G1", 0x00, 0x2, 0x01, 238c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x0, "spi1"), /* SS1n */ 248c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x1, "gpio"), 258c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x2, "usb1")), 268c2ecf20Sopenharmony_ci BERLIN_PINCTRL_GROUP("G2", 0x00, 0x2, 0x02, 278c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), 288c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x1, "spi1"), /* SS2n */ 298c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x2, "pwm"), 308c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x3, "i2s0")), 318c2ecf20Sopenharmony_ci BERLIN_PINCTRL_GROUP("G3", 0x00, 0x2, 0x04, 328c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x0, "soc"), 338c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x1, "spi1"), /* SS3n */ 348c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x2, "gpio"), 358c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x3, "i2s1")), 368c2ecf20Sopenharmony_ci BERLIN_PINCTRL_GROUP("G4", 0x00, 0x2, 0x06, 378c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x0, "spi1"), /* CLK/SDI/SDO */ 388c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x1, "gpio"), 398c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x2, "pwm")), 408c2ecf20Sopenharmony_ci BERLIN_PINCTRL_GROUP("G5", 0x00, 0x3, 0x08, 418c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), 428c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x1, "sts1"), 438c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x2, "et"), 448c2ecf20Sopenharmony_ci /* 458c2ecf20Sopenharmony_ci * Mode 0x3 mux i2s2 mclk *and* i2s3 mclk: 468c2ecf20Sopenharmony_ci * add two functions so it can be used with other groups 478c2ecf20Sopenharmony_ci * within the same subnode in the device tree 488c2ecf20Sopenharmony_ci */ 498c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x3, "i2s2"), 508c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x3, "i2s3")), 518c2ecf20Sopenharmony_ci BERLIN_PINCTRL_GROUP("G6", 0x00, 0x2, 0x0b, 528c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), 538c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x1, "sts0"), 548c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x2, "et")), 558c2ecf20Sopenharmony_ci BERLIN_PINCTRL_GROUP("G7", 0x00, 0x3, 0x0d, 568c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), 578c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x1, "sts0"), 588c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x2, "et"), 598c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x3, "vdac")), 608c2ecf20Sopenharmony_ci BERLIN_PINCTRL_GROUP("G8", 0x00, 0x3, 0x10, 618c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), 628c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x1, "sd0"), 638c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x2, "et"), 648c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x3, "usb0_dbg"), 658c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x4, "sata_dbg"), 668c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x7, "usb1_dbg")), 678c2ecf20Sopenharmony_ci BERLIN_PINCTRL_GROUP("G9", 0x00, 0x3, 0x13, 688c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), 698c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x1, "sd0"), 708c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x2, "et"), 718c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x3, "usb0_dbg"), 728c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x4, "sata_dbg"), 738c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x7, "usb1_dbg")), 748c2ecf20Sopenharmony_ci BERLIN_PINCTRL_GROUP("G10", 0x00, 0x2, 0x16, 758c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x0, "soc"), 768c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x1, "twsi0"), 778c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x2, "gpio"), 788c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x3, "ptp")), 798c2ecf20Sopenharmony_ci BERLIN_PINCTRL_GROUP("G11", 0x00, 0x2, 0x18, 808c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x0, "soc"), 818c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x1, "twsi1"), 828c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x2, "gpio"), 838c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x3, "eddc")), 848c2ecf20Sopenharmony_ci BERLIN_PINCTRL_GROUP("G12", 0x00, 0x3, 0x1a, 858c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x0, "sts2"), 868c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x1, "sata"), 878c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x2, "sd1"), 888c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x3, "usb0_dbg"), 898c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x4, "sts1"), 908c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x7, "usb1_dbg")), 918c2ecf20Sopenharmony_ci BERLIN_PINCTRL_GROUP("G13", 0x04, 0x3, 0x00, 928c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), 938c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x1, "sata"), 948c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x2, "sd1"), 958c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x3, "usb0_dbg"), 968c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x4, "sts1"), 978c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x7, "usb1_dbg")), 988c2ecf20Sopenharmony_ci BERLIN_PINCTRL_GROUP("G14", 0x04, 0x1, 0x03, 998c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION_UNKNOWN), 1008c2ecf20Sopenharmony_ci BERLIN_PINCTRL_GROUP("G15", 0x04, 0x2, 0x04, 1018c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), 1028c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x2, "et"), 1038c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x3, "osco")), 1048c2ecf20Sopenharmony_ci BERLIN_PINCTRL_GROUP("G16", 0x04, 0x3, 0x06, 1058c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), 1068c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x1, "dvio"), 1078c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x2, "fp")), 1088c2ecf20Sopenharmony_ci BERLIN_PINCTRL_GROUP("G17", 0x04, 0x3, 0x09, 1098c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), 1108c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x1, "dvio"), 1118c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x2, "fp")), 1128c2ecf20Sopenharmony_ci BERLIN_PINCTRL_GROUP("G18", 0x04, 0x1, 0x0c, 1138c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x0, "pll"), 1148c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x1, "i2s0")), 1158c2ecf20Sopenharmony_ci BERLIN_PINCTRL_GROUP("G19", 0x04, 0x1, 0x0d, 1168c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x0, "i2s0"), 1178c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x1, "pwm")), 1188c2ecf20Sopenharmony_ci BERLIN_PINCTRL_GROUP("G20", 0x04, 0x1, 0x0e, 1198c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x0, "spdif"), 1208c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x1, "arc")), 1218c2ecf20Sopenharmony_ci BERLIN_PINCTRL_GROUP("G21", 0x04, 0x3, 0x0f, 1228c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), 1238c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x1, "dvio"), 1248c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x2, "fp"), 1258c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x3, "adac_dbg"), 1268c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x4, "pdm_a"), /* gpio17..19,pdm */ 1278c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x7, "pdm_b")), /* gpio12..14,pdm */ 1288c2ecf20Sopenharmony_ci BERLIN_PINCTRL_GROUP("G22", 0x04, 0x3, 0x12, 1298c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), 1308c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x1, "dv0"), 1318c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x2, "fp"), 1328c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x3, "twsi0"), 1338c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x4, "pwm")), 1348c2ecf20Sopenharmony_ci BERLIN_PINCTRL_GROUP("G23", 0x04, 0x3, 0x15, 1358c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x0, "vclki"), 1368c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x1, "dv0"), 1378c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x2, "fp"), 1388c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x3, "i2s0"), 1398c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x4, "pwm"), 1408c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x7, "pdm")), 1418c2ecf20Sopenharmony_ci BERLIN_PINCTRL_GROUP("G24", 0x04, 0x2, 0x18, 1428c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x0, "i2s2"), 1438c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x1, "i2s1")), 1448c2ecf20Sopenharmony_ci BERLIN_PINCTRL_GROUP("G25", 0x04, 0x2, 0x1a, 1458c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), 1468c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x1, "nand"), 1478c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x2, "i2s2")), 1488c2ecf20Sopenharmony_ci BERLIN_PINCTRL_GROUP("G26", 0x04, 0x1, 0x1c, 1498c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x0, "nand"), 1508c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x1, "emmc")), 1518c2ecf20Sopenharmony_ci BERLIN_PINCTRL_GROUP("G27", 0x04, 0x1, 0x1d, 1528c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), 1538c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x1, "nand")), 1548c2ecf20Sopenharmony_ci BERLIN_PINCTRL_GROUP("G28", 0x04, 0x2, 0x1e, 1558c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x0, "dvo"), 1568c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x2, "sp")), 1578c2ecf20Sopenharmony_ci}; 1588c2ecf20Sopenharmony_ci 1598c2ecf20Sopenharmony_cistatic const struct berlin_desc_group berlin2_sysmgr_pinctrl_groups[] = { 1608c2ecf20Sopenharmony_ci /* GSM */ 1618c2ecf20Sopenharmony_ci BERLIN_PINCTRL_GROUP("GSM0", 0x40, 0x2, 0x00, 1628c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), 1638c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x1, "spi2"), /* SS0n */ 1648c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x2, "eth1")), 1658c2ecf20Sopenharmony_ci BERLIN_PINCTRL_GROUP("GSM1", 0x40, 0x2, 0x02, 1668c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), 1678c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x1, "spi2"), /* SS1n */ 1688c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x2, "eth1")), 1698c2ecf20Sopenharmony_ci BERLIN_PINCTRL_GROUP("GSM2", 0x40, 0x2, 0x04, 1708c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x0, "twsi2"), 1718c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x1, "spi2")), /* SS2n/SS3n */ 1728c2ecf20Sopenharmony_ci BERLIN_PINCTRL_GROUP("GSM3", 0x40, 0x2, 0x06, 1738c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), 1748c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x1, "uart0"), /* CTS/RTS */ 1758c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x2, "uart2"), /* RX/TX */ 1768c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x3, "twsi2")), 1778c2ecf20Sopenharmony_ci BERLIN_PINCTRL_GROUP("GSM4", 0x40, 0x2, 0x08, 1788c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x0, "uart0"), /* RX/TX */ 1798c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x1, "irda0")), 1808c2ecf20Sopenharmony_ci BERLIN_PINCTRL_GROUP("GSM5", 0x40, 0x2, 0x0a, 1818c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), 1828c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x1, "uart1"), /* RX/TX */ 1838c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x2, "irda1"), 1848c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x3, "twsi3")), 1858c2ecf20Sopenharmony_ci BERLIN_PINCTRL_GROUP("GSM6", 0x40, 0x2, 0x0c, 1868c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), 1878c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x1, "spi2"), /* CLK/SDO */ 1888c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x1, "clki")), 1898c2ecf20Sopenharmony_ci BERLIN_PINCTRL_GROUP("GSM7", 0x40, 0x1, 0x0e, 1908c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), 1918c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x1, "hdmi")), 1928c2ecf20Sopenharmony_ci BERLIN_PINCTRL_GROUP("GSM8", 0x40, 0x1, 0x0f, 1938c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), 1948c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x1, "hdmi")), 1958c2ecf20Sopenharmony_ci BERLIN_PINCTRL_GROUP("GSM9", 0x40, 0x1, 0x10, 1968c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), 1978c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x1, "led")), 1988c2ecf20Sopenharmony_ci BERLIN_PINCTRL_GROUP("GSM10", 0x40, 0x1, 0x11, 1998c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), 2008c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x1, "led")), 2018c2ecf20Sopenharmony_ci BERLIN_PINCTRL_GROUP("GSM11", 0x40, 0x1, 0x12, 2028c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x0, "gpio"), 2038c2ecf20Sopenharmony_ci BERLIN_PINCTRL_FUNCTION(0x1, "led")), 2048c2ecf20Sopenharmony_ci}; 2058c2ecf20Sopenharmony_ci 2068c2ecf20Sopenharmony_cistatic const struct berlin_pinctrl_desc berlin2_soc_pinctrl_data = { 2078c2ecf20Sopenharmony_ci .groups = berlin2_soc_pinctrl_groups, 2088c2ecf20Sopenharmony_ci .ngroups = ARRAY_SIZE(berlin2_soc_pinctrl_groups), 2098c2ecf20Sopenharmony_ci}; 2108c2ecf20Sopenharmony_ci 2118c2ecf20Sopenharmony_cistatic const struct berlin_pinctrl_desc berlin2_sysmgr_pinctrl_data = { 2128c2ecf20Sopenharmony_ci .groups = berlin2_sysmgr_pinctrl_groups, 2138c2ecf20Sopenharmony_ci .ngroups = ARRAY_SIZE(berlin2_sysmgr_pinctrl_groups), 2148c2ecf20Sopenharmony_ci}; 2158c2ecf20Sopenharmony_ci 2168c2ecf20Sopenharmony_cistatic const struct of_device_id berlin2_pinctrl_match[] = { 2178c2ecf20Sopenharmony_ci { 2188c2ecf20Sopenharmony_ci .compatible = "marvell,berlin2-soc-pinctrl", 2198c2ecf20Sopenharmony_ci .data = &berlin2_soc_pinctrl_data 2208c2ecf20Sopenharmony_ci }, 2218c2ecf20Sopenharmony_ci { 2228c2ecf20Sopenharmony_ci .compatible = "marvell,berlin2-system-pinctrl", 2238c2ecf20Sopenharmony_ci .data = &berlin2_sysmgr_pinctrl_data 2248c2ecf20Sopenharmony_ci }, 2258c2ecf20Sopenharmony_ci {} 2268c2ecf20Sopenharmony_ci}; 2278c2ecf20Sopenharmony_ci 2288c2ecf20Sopenharmony_cistatic int berlin2_pinctrl_probe(struct platform_device *pdev) 2298c2ecf20Sopenharmony_ci{ 2308c2ecf20Sopenharmony_ci const struct of_device_id *match = 2318c2ecf20Sopenharmony_ci of_match_device(berlin2_pinctrl_match, &pdev->dev); 2328c2ecf20Sopenharmony_ci 2338c2ecf20Sopenharmony_ci return berlin_pinctrl_probe(pdev, match->data); 2348c2ecf20Sopenharmony_ci} 2358c2ecf20Sopenharmony_ci 2368c2ecf20Sopenharmony_cistatic struct platform_driver berlin2_pinctrl_driver = { 2378c2ecf20Sopenharmony_ci .probe = berlin2_pinctrl_probe, 2388c2ecf20Sopenharmony_ci .driver = { 2398c2ecf20Sopenharmony_ci .name = "berlin-bg2-pinctrl", 2408c2ecf20Sopenharmony_ci .of_match_table = berlin2_pinctrl_match, 2418c2ecf20Sopenharmony_ci }, 2428c2ecf20Sopenharmony_ci}; 2438c2ecf20Sopenharmony_cibuiltin_platform_driver(berlin2_pinctrl_driver); 244