From patchwork Tue Aug 27 02:05:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Leonard X-Patchwork-Id: 13778715 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C6E95C5321D for ; Tue, 27 Aug 2024 02:07:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-Type: Message-ID:Subject:cc:To:From:Date:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=dItNAseAbg1VBls9FArhRH8HvkLM11kb4Y31Sg6tLdw=; b=3RwKtwquA0dJZT4LSid45Cl4/O dp6hLYA141Sl2mp8+0HlanhAxy11H21/9NZqJcf1jRzt0TQ9dpViag9J5BAcRGbnMr1ln1ZUfo/GV vMMbF4/Sa3oUNpmP6duN5TaNiU52BLMbv0/GU1Vgt66mRhguh+aPdxVMt87tXIVNqOvnGlsUNUCJH IQPACzTe/jxAq8LQHIFQhm1Or8PbT2CVy6TmVx+emkgQ8pBqFwE4bmxr9py6nZxTvUxT97Xk7aAxX 9zILsSka1kH+3HiaNb2vOgfZ2r3Fe6oGPeVuVkQD6+/YtooS20pHDfstcq+oq1sxbdDQalsKpgFSa dyw5N82g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1silbd-00000009P12-2LcV; Tue, 27 Aug 2024 02:06:49 +0000 Received: from outbound-ip24a.ess.barracuda.com ([209.222.82.206]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1silaq-00000009Ovb-0F49 for linux-arm-kernel@lists.infradead.org; Tue, 27 Aug 2024 02:06:02 +0000 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2174.outbound.protection.outlook.com [104.47.59.174]) by mx-outbound-ea15-210.us-east-2a.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 27 Aug 2024 02:05:37 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=c7gzB9JTfbWJHkzIRx7yNJtZjbKmR5nMoDHtOC7K3ReJjFQr0Tkw9RzJazUasL4/xb/wL6ARiogpm2858lAZHxHzYHQesI6K1e93MvU2f1Blx28wJbVbspq6KkKLWjl6ZHsdpgvCJrAJrO3Tyb2AquOJWFbH5mDDYsRvkP5GHuvrqzKcuL/jhNxronr2/PNZI3nbDLpOtD3xZterGT/4WIJLXYdP6aoc6jDsEbHr5GBRFfo4QCcQcDFRO/YCYCjOfcjzk7WUkOtuvWCOkRV983Ftt3NxmdIcnpFcyO6tLoI8zJghHHpF0xjE+0eaza8e9arXn8LQRd5TflLFw15TtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=dItNAseAbg1VBls9FArhRH8HvkLM11kb4Y31Sg6tLdw=; b=ofOPRGelLUzVStXYpkPtryFMCQLKC1XJJT4nH4a2D4Tsfm1hrTZBi1rfHGcnF/4ModGpe0wAjCF/VlBar82q+xWyr12yrN5k4082ureMTKQDSgEBVQEchUi0LPONfTq6LDSfJAZUEGsil7NtT7mmy0yvA+RxvSy5wTccmTTH7NndyOTVh7ulipT+rtv9T44YeHmlP2bBdWGrkNErxn+Uk4ZRUYKXtwN6UBbiO8SaQUex/oYkYNzfvsLTCAf4wQeaj4G+GJRGIt/Px9z2D7xBfyd9qhIiwp71IT/WjeF5FZwkYXCHdxiftWVAHFnouBR8WYBDeE6A/ARmwe+uRQOj4g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=digi.com; dmarc=pass action=none header.from=digi.com; dkim=pass header.d=digi.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=digi.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dItNAseAbg1VBls9FArhRH8HvkLM11kb4Y31Sg6tLdw=; b=O1+zumqoJ8/xCsr7wO/5ZyLJ4IqXzGFvCkXGxUCEfv6JrfSdr1bLdBxHzwU3Fk9GcbIoRQ2aDKuK4V4e14Vc6axQT7VqQRW5RufxmqIb60sqhWRDVTnOozVSCtUu+i44Z4T0g+WoDAhSlAHsnWegq2wC6ZBHWg028DydgRVj6a49sEe1Tz0z5O+qBZuDEyoSIU2SdxAPGiF2ugkuT8ysaN1e1D0IpuqID8rohJJl1glQ1aom2cjKwfU2mGPcHkorZ+5bXmPuWeaTcLQoQc3bnRi53VViu7iogEc3AWdeM54dcIJZ2zfilCQFCnxYBacGJsfD7SjLtY5fqhIZQv97CA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=digi.com; Received: from DS0PR10MB6918.namprd10.prod.outlook.com (2603:10b6:8:136::8) by DM6PR10MB4122.namprd10.prod.outlook.com (2603:10b6:5:221::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.16; Tue, 27 Aug 2024 02:05:34 +0000 Received: from DS0PR10MB6918.namprd10.prod.outlook.com ([fe80::3697:c0ef:caee:24ae]) by DS0PR10MB6918.namprd10.prod.outlook.com ([fe80::3697:c0ef:caee:24ae%5]) with mapi id 15.20.7918.006; Tue, 27 Aug 2024 02:05:34 +0000 Date: Tue, 27 Aug 2024 12:05:24 +1000 (AEST) From: David Leonard To: linux-arm-kernel@lists.infradead.org cc: Dong Aisheng , Fabio Estevam , Shawn Guo , Jacky Bai , Pengutronix Kernel Team , Linus Walleij , linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org Subject: [PATCH 1/6] pinctrl: ls1012a: Add pinctrl driver support Message-ID: <8cd0b743-4fff-e17f-9543-d2d4d7879758@digi.com> Organization: Opengear Digi X-ClientProxiedBy: SY6PR01CA0021.ausprd01.prod.outlook.com (2603:10c6:10:eb::8) To DS0PR10MB6918.namprd10.prod.outlook.com (2603:10b6:8:136::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR10MB6918:EE_|DM6PR10MB4122:EE_ X-MS-Office365-Filtering-Correlation-Id: 64eab99f-0b86-4652-a2e6-08dcc63cbc4b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|366016; X-Microsoft-Antispam-Message-Info: +qRjNX1rQtK1rjkEKXb2CW3ccgt2v2P2NNawcWzkso6naIppvXSPTM0bw73fmvYEBZ/RlvlChxF7chRIZLNyf8+Ja877+2W0XshXQm0DvymUw/QC1+WveQSL5PXsLLQ7EmlLe9KOm0LREDoO4sZ9nG5VNZWaYYtZOmUFwqgMK4R6VkLOPdslbIaE0imulJr7YJL/Zxt8OYVGi4/TFRf0olAZgtedYU1Arr4QjM3jEmh3Md/kbuj+f7PE1jIsaP0Oclg2kCE2fYA4S29OPmANmiJDBKQLp4HZQqC0tAa8C3OMeloKGGx97rUs8fOVCgwNrfHyfxECpSrLtmRQmxH19tpJdII0ljqwlEl/fmn0Lk9Jx1QR/vl8EN/zRoLDn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ZDgIjyIg74MH1IZuwAD4ynXjY7DTDjBtW0biHh3IM+dN6aI8WlgshHTIdgr8E9T4PHRUsb4F+eiPyofrn+KvxFuJNoI5pp7lG9JQYsur+N9fmxIhOkbWKKQRDiRnDvCUW7Alx0H9IpaEu6ftIXRJxiM8t9wGWeGnCem70CEWeh/rwhVEN3OblT/Yxb8CQ8JMvONZHjsDLv5qqGBELhzNZHqayWE7bOxh/n/GVcKy5nYCAdyokjp/MTcf0kp1dJDD+Z796CC+sq28WSXbz3zAKRu+KJorFbhBhzWgJ5vZK7B0bGb8W7fnDh7B6y9BsEGaiDaQHytFR+08exD69DCu/qMDOeX7hXJcQI0OW7VgJN78neWUW8bTAaF9QuM9UiursSMXV+TnHNOIS5ZGTSmqbgmMvqLMGktJ/SZasNBKhLKMVz7cazlpRdr67HqvQoytNpQqSjIkHUmmh5FQz+dOIIm2VyRpcJTgRSIKC82/72U9Y6RtZ61FW1k3XS4cbQHZ80lyq8s7Tdm9St1BXkNnc6N49aC+tnsDo7LuX0hvQhJJUt8vqvYNTWcoVmIIImVWMz+OcGXf4jJKjCmcl8TEuOJStG3I5DHO0aspNuslcCLYn954BaV4XuSKIXprXRX+q88p3AkwsFij0dewuQHdt6cFPN59gISgGfG4x1gwUTIKz9uJoF90D2Q7NysmYIV44KNzAjvduer4qf1i X-OriginatorOrg: digi.com X-MS-Exchange-CrossTenant-Network-Message-Id: 64eab99f-0b86-4652-a2e6-08dcc63cbc4b X-MS-Exchange-CrossTenant-AuthSource: DS0PR10MB6918.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Aug 2024 02:05:34.0481 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: abb4cdb7-1b7e-483e-a143-7ebfd1184b9e X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: gfOYsjukHbBKg+CeBjhSfM8paq8j9GGT1yeqG4i5bf+Ijjlt2lUpUaWDbwZcW5L5uy/UsfLN8SAs1r1FIMR1yA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR10MB4122 X-BESS-ID: 1724724337-104050-25130-68743-1 X-BESS-VER: 2019.3_20240823.2007 X-BESS-Apparent-Source-IP: 104.47.59.174 X-BESS-Parts: H4sIAAAAAAACA4uuVkqtKFGyUioBkjpK+cVKVobGlkYWQGYGUNTcMNnMIskoxd gy2dzE0iDZKNXS2Mg00TLVLNU4Kc3cRKk2FgAJCZTkQgAAAA== X-BESS-Outbound-Spam-Score: 0.50 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.258621 [from cloudscan22-50.us-east-2b.ess.aws.cudaops.com] Rule breakdown below pts rule name description ---- ---------------------- -------------------------------- 0.50 BSF_RULE7568M META: Custom Rule 7568M 0.00 BSF_BESS_OUTBOUND META: BESS Outbound X-BESS-Outbound-Spam-Status: SCORE=0.50 using account:ESS112744 scores of KILL_LEVEL=7.0 tests=BSF_RULE7568M, BSF_BESS_OUTBOUND X-BESS-BRTS-Status: 1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240826_190600_276289_E3063231 X-CRM114-Status: GOOD ( 15.70 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add QorIQ LS1012A pinctrl driver, allowing i2c-core to exert GPIO control over the second I2C bus. Signed-off-by: David Leonard --- drivers/pinctrl/freescale/Kconfig | 8 + drivers/pinctrl/freescale/Makefile | 1 + drivers/pinctrl/freescale/pinctrl-ls1012a.c | 381 ++++++++++++++++++++ 3 files changed, 390 insertions(+) create mode 100644 drivers/pinctrl/freescale/pinctrl-ls1012a.c diff --git a/drivers/pinctrl/freescale/Kconfig b/drivers/pinctrl/freescale/Kconfig index 3b59d7189004..a2038042eeae 100644 --- a/drivers/pinctrl/freescale/Kconfig +++ b/drivers/pinctrl/freescale/Kconfig @@ -209,6 +209,14 @@ config PINCTRL_IMX93 help Say Y here to enable the imx93 pinctrl driver +config PINCTRL_LS1012A + tristate "LS1012A pinctrl driver" + depends on ARCH_LAYERSCAPE && OF || COMPILE_TEST + select PINMUX + select GENERIC_PINCONF + help + Say Y here to enable the ls1012a pinctrl driver + config PINCTRL_VF610 bool "Freescale Vybrid VF610 pinctrl driver" depends on SOC_VF610 diff --git a/drivers/pinctrl/freescale/Makefile b/drivers/pinctrl/freescale/Makefile index d27085c2b4c4..6926529d8635 100644 --- a/drivers/pinctrl/freescale/Makefile +++ b/drivers/pinctrl/freescale/Makefile @@ -35,3 +35,4 @@ obj-$(CONFIG_PINCTRL_IMX25) += pinctrl-imx25.o obj-$(CONFIG_PINCTRL_IMX28) += pinctrl-imx28.o obj-$(CONFIG_PINCTRL_IMXRT1050) += pinctrl-imxrt1050.o obj-$(CONFIG_PINCTRL_IMXRT1170) += pinctrl-imxrt1170.o +obj-$(CONFIG_PINCTRL_LS1012A) += pinctrl-ls1012a.o diff --git a/drivers/pinctrl/freescale/pinctrl-ls1012a.c b/drivers/pinctrl/freescale/pinctrl-ls1012a.c new file mode 100644 index 000000000000..d4c535ed6c07 --- /dev/null +++ b/drivers/pinctrl/freescale/pinctrl-ls1012a.c @@ -0,0 +1,381 @@ +// SPDX-License-Identifier: (GPL-2.0-only OR MIT) +/* + * Pin controller for NXP QorIQ LS1012A. + * + * Copyright (c) 2024 Digi International, Inc. + * Author: David Leonard + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +struct ls1012a_pinctrl_pdata { + struct pinctrl_dev *pctl_dev; + void __iomem *cr0mem; + bool big_endian; + u32 ssc; +}; + +/* Bitfield macros for masks and values that follow the datasheet's + * bit numbering schemes for registers of different bit-endianess. */ +#define BITV_BE(hi, v) ((v) << (31 - (hi) % 32)) +#define BITM_BE(hi, lo) (((1 << ((hi) - (lo) + 1)) - 1) << (31 - (hi) % 32)) +#define BITV_LE(lo, v) ((v) << ((lo) % 32)) +#define BITM_LE(lo, hi) (((1 << ((hi) - (lo) + 1)) - 1) << ((lo) % 32)) + +/* SCFG PMUXCR0 pinmux control register */ +#define SCFG_PMUXCR0 0x430 +#define QSPI_MUX_OVRD_MASK BITM_BE(0, 0) /* [0] */ +#define QSPI_MUX_DISABLE BITV_BE(0, 0) /* use RCW */ +#define QSPI_MUX_ENABLE BITV_BE(0, 1) /* use PMUXCR0 */ +#define QSPI_DATA0_GPIO_OVR_MASK BITM_BE(1, 1) /* [1] */ +#define QSPI_DATA0_GPIO_SEL_SPI BITV_BE(1, 0) /* DATA0,SCK,CS0 */ +#define QSPI_DATA0_GPIO_SEL_GPIO BITV_BE(1, 1) /* GPIO1[4,11,5] */ +#define QSPI_DATA1_GPIO_OVR_MASK BITM_BE(3, 2) /* [3:2] */ +#define QSPI_DATA1_GPIO_SEL_SPI BITV_BE(3, 0) /* DATA1 */ +#define QSPI_DATA1_GPIO_SEL_GPIO BITV_BE(3, 1) /* GPIO1[12] */ +#define QSPI_IIC2_OVR_MASK BITM_BE(5, 4) /* [5:4] */ +#define QSPI_IIC2_SEL_GPIO BITV_BE(5, 0) /* GPIO1[13,14] */ +#define QSPI_IIC2_SEL_I2C BITV_BE(5, 1) /* SCL,SDA (rev0) */ +#define QSPI_IIC2_SEL_SPI BITV_BE(5, 2) /* DATA2,DATA3 */ + +/* RCW SoC-specific configuration (read-only) */ +#define DCFG_RCWSR 0x100 +#define SOC_SPEC_CONFIG 416 /* word 13 */ +#define DCFG_SSC_REG (DCFG_RCWSR + SOC_SPEC_CONFIG / 8) +#define SSC_DATA0_GPIO_MASK BITM_LE(421, 421) +#define SSC_DATA0_GPIO_SEL_SPI BITV_LE(421, 0) /* DATA0,SCK,CS0 */ +#define SSC_DATA0_GPIO_SEL_GPIO BITV_LE(421, 1) /* GPIO1[11,4,5] */ +#define SSC_DATA1_GPIO_MASK BITM_LE(422, 423) +#define SSC_DATA1_GPIO_SEL_SPI BITV_LE(422, 0) /* DATA1 */ +#define SSC_DATA1_GPIO_SEL_GPIO BITV_LE(422, 2) /* GPIO1[12] */ +#define SSC_IIC2_MASK BITM_LE(424, 425) +#define SSC_IIC2_SEL_GPIO BITV_LE(424, 0) /* GPIO1[13,14] */ +#define SSC_IIC2_SEL_I2C BITV_LE(424, 2) /* SCL,SDA */ +#define SSC_IIC2_SEL_SPI BITV_LE(424, 1) /* DATA2,DATA3 */ +#define SSC_IIC2_SEL_GPIO_RESET BITV_LE(424, 3) /* GPIO1[13],RESET_REQ_B*/ + +const struct pinctrl_pin_desc ls1012a_pins[] = { + PINCTRL_PIN(60, "QSPI_A_DATA3/GPIO1_14/IIC2_SDA/RESET_REQ_B"), + PINCTRL_PIN(61, "QSPI_A_DATA1/GPIO1_12"), + PINCTRL_PIN(62, "QSPI_A_SCK/GPIO1_04"), + PINCTRL_PIN(122, "QSPI_A_DATA2/GPIO1_13/IIC2_SCL"), + PINCTRL_PIN(123, "QSPI_A_DATA0/GPIO1_11"), + PINCTRL_PIN(124, "QSPI_A_CS0/GPIO1_05"), +}; + +static const unsigned int qspi_1_grp[] = { 62, 123, 124 }; +static const unsigned int qspi_2_grp[] = { 61 }; +static const unsigned int qspi_3_grp[] = { 122, 60 }; + +#define GRP_qspi_1 0 /* SCK,CS0,DATA0 */ +#define GRP_qspi_2 1 /* DATA1 */ +#define GRP_qspi_3 2 /* DATA2,DATA3 */ +#define _GRP_max 3 + +#define _PINGROUP(name) \ + [GRP_##name] = PINCTRL_PINGROUP(#name "_grp", name##_grp, ARRAY_SIZE(name##_grp)) +static const struct pingroup ls1012a_groups[] = { + _PINGROUP(qspi_1), + _PINGROUP(qspi_2), + _PINGROUP(qspi_3), +}; + + +static void ls1012a_write_cr0(struct ls1012a_pinctrl_pdata *pd, u32 val) +{ + if (pd->big_endian) + iowrite32be(val, pd->cr0mem); + else + iowrite32(val, pd->cr0mem); +} + +static u32 ls1012a_read_cr0(struct ls1012a_pinctrl_pdata *pd) +{ + return pd->big_endian ? ioread32be(pd->cr0mem) : ioread32(pd->cr0mem); +} + +static int ls1012a_get_groups_count(struct pinctrl_dev *pcdev) +{ + return ARRAY_SIZE(ls1012a_groups); +} + +static const char *ls1012a_get_group_name(struct pinctrl_dev *pcdev, + unsigned int selector) +{ + return ls1012a_groups[selector].name; +} + +static int ls1012a_get_group_pins(struct pinctrl_dev *pcdev, + unsigned int selector, const unsigned int **pins, unsigned int *npins) +{ + *pins = ls1012a_groups[selector].pins; + *npins = ls1012a_groups[selector].npins; + return 0; +} + +static const struct pinctrl_ops ls1012a_pinctrl_ops = { + .get_groups_count = ls1012a_get_groups_count, + .get_group_name = ls1012a_get_group_name, + .get_group_pins = ls1012a_get_group_pins, + .dt_node_to_map = pinconf_generic_dt_node_to_map_group, + .dt_free_map = pinconf_generic_dt_free_map, +}; + +static const char * const i2c_groups[] = { "qspi_3_grp" }; +static const char * const spi_groups[] = { "qspi_1_grp", "qspi_2_grp", "qspi_3_grp" }; +static const char * const gpio_groups[] = { "qspi_1_grp", "qspi_2_grp", "qspi_3_grp" }; +static const char * const gpio_reset_groups[] = { "qspi_3_grp" }; + +#define FUNC_i2c 0 +#define FUNC_spi 1 +#define FUNC_gpio 2 +#define FUNC_gpio_reset 3 +#define _FUNC_max 4 + +#define _PINFUNC(name) \ + [FUNC_##name] = PINCTRL_PINFUNCTION(#name, name##_groups, ARRAY_SIZE(name##_groups)) +static const struct pinfunction ls1012a_functions[] = { + _PINFUNC(i2c), + _PINFUNC(spi), + _PINFUNC(gpio), + _PINFUNC(gpio_reset), +}; + +static int ls1012a_get_functions_count(struct pinctrl_dev *pctldev) +{ + return ARRAY_SIZE(ls1012a_functions); +} + +static const char *ls1012a_get_function_name(struct pinctrl_dev *pctldev, unsigned int func) +{ + return ls1012a_functions[func].name; +} + +static int ls1012a_get_function_groups(struct pinctrl_dev *pctldev, unsigned int func, + const char * const **groups, + unsigned int * const ngroups) +{ + *groups = ls1012a_functions[func].groups; + *ngroups = ls1012a_functions[func].ngroups; + return 0; +} + +/* + * LS1012A + * Group: qspi_1 qspi_2 qspi_3 + * ================== =========== ============= + * Pin: 62 123 124 61 122 60 + * ----- ------ ----- ----------- ------ ------ + * i2c SCL SDA (RCW only) + * spi SCK DATA0 + * spi SCK DATA0 DATA1 + * spi SCK DATA0 DATA1 DATA2 DATA3 + * gpio GPIO4 GPIO11 GPIO5 + * gpio GPIO12 + * gpio GPIO13 GPIO14 + * gpio_reset GPIO13 REQ_B (RCW only) + */ + +static const struct ls1012a_func_mux { + u32 cr0mask, cr0; /* mux control */ + u32 sscmask, ssc; /* equivalent in RCW */ +} ls1012a_func_mux[_FUNC_max][_GRP_max] = { + [FUNC_i2c] = { + [GRP_qspi_3] = { + .sscmask = SSC_IIC2_MASK, + .ssc = SSC_IIC2_SEL_I2C, + }, + }, + [FUNC_spi] = { + [GRP_qspi_1] = { + .cr0mask = QSPI_DATA0_GPIO_OVR_MASK, + .cr0 = QSPI_DATA0_GPIO_SEL_SPI, + .sscmask = SSC_DATA0_GPIO_MASK, + .ssc = SSC_DATA0_GPIO_SEL_SPI + }, + [GRP_qspi_2] = { + .cr0mask = QSPI_DATA1_GPIO_OVR_MASK, + .cr0 = QSPI_DATA1_GPIO_SEL_SPI, + .sscmask = SSC_DATA1_GPIO_MASK, + .ssc = SSC_DATA1_GPIO_SEL_SPI, + }, + [GRP_qspi_3] = { + .cr0mask = QSPI_IIC2_OVR_MASK, + .cr0 = QSPI_IIC2_SEL_SPI, + .sscmask = SSC_IIC2_MASK, + .ssc = SSC_IIC2_SEL_SPI, + }, + }, + [FUNC_gpio] = { + [GRP_qspi_1] = { + .cr0mask = QSPI_DATA0_GPIO_OVR_MASK, + .cr0 = QSPI_DATA0_GPIO_SEL_GPIO, + .sscmask = SSC_DATA0_GPIO_MASK, + .ssc = SSC_DATA0_GPIO_SEL_GPIO, + }, + [GRP_qspi_2] = { + .cr0mask = QSPI_DATA1_GPIO_OVR_MASK, + .cr0 = QSPI_DATA1_GPIO_SEL_GPIO, + .sscmask = SSC_DATA1_GPIO_MASK, + .ssc = SSC_DATA1_GPIO_SEL_GPIO, + }, + [GRP_qspi_3] = { + .cr0mask = QSPI_IIC2_OVR_MASK, + .cr0 = QSPI_IIC2_SEL_GPIO, + .sscmask = SSC_IIC2_MASK, + .ssc = SSC_IIC2_SEL_GPIO, + }, + }, + [FUNC_gpio_reset] = { + [GRP_qspi_3] = { + .sscmask = SSC_IIC2_MASK, + .ssc = SSC_IIC2_SEL_GPIO_RESET, + }, + }, +}; + +static int ls1012a_set_mux(struct pinctrl_dev *pcdev, + unsigned int func, unsigned int group) +{ + struct ls1012a_pinctrl_pdata *pd = pinctrl_dev_get_drvdata(pcdev); + const struct ls1012a_func_mux *fm = &ls1012a_func_mux[func][group]; + u32 cr0 = ls1012a_read_cr0(pd); + + if (!fm->cr0mask) { + if ((pd->ssc & fm->sscmask) != fm->ssc) + return -EOPNOTSUPP; + cr0 = (cr0 & ~QSPI_MUX_OVRD_MASK) | QSPI_MUX_DISABLE; + } else { + cr0 = (cr0 & ~fm->cr0mask) | fm->cr0; + if ((pd->ssc & fm->sscmask) != fm->ssc) + cr0 = (cr0 & ~QSPI_MUX_OVRD_MASK) | QSPI_MUX_ENABLE; + } + ls1012a_write_cr0(pd, cr0); + return 0; +} + +static void ls1012a_init_mux(struct ls1012a_pinctrl_pdata *pd) +{ + unsigned int func, group; + const struct ls1012a_func_mux *fm; + u32 cr0; + + cr0 = ls1012a_read_cr0(pd); + if ((cr0 & QSPI_MUX_OVRD_MASK) == QSPI_MUX_DISABLE) { + /* + * Prepare a disabled MUXCR0 to have a same/similar + * configuration as RCW SSC, and leave it disabled. + */ + for (func = 0; func < _FUNC_max; func++) { + for (group = 0; group < _GRP_max; group++) { + fm = &ls1012a_func_mux[func][group]; + if (fm->sscmask && + fm->ssc == (pd->ssc & fm->sscmask)) { + cr0 &= ~fm->cr0mask; + cr0 |= fm->cr0; + } + } + } + ls1012a_write_cr0(pd, cr0); + } +} + +static const struct pinmux_ops ls1012a_pinmux_ops = { + .get_functions_count = ls1012a_get_functions_count, + .get_function_name = ls1012a_get_function_name, + .get_function_groups = ls1012a_get_function_groups, + .set_mux = ls1012a_set_mux, +}; + +static struct pinctrl_desc ls1012a_pinctrl_desc = { + .name = "ls1012a", + .pins = ls1012a_pins, + .npins = ARRAY_SIZE(ls1012a_pins), + .pctlops = &ls1012a_pinctrl_ops, + .pmxops = &ls1012a_pinmux_ops, + .owner = THIS_MODULE, +}; + +static int ls1012a_pinctrl_probe(struct platform_device *pdev) +{ + struct ls1012a_pinctrl_pdata *pd; + int ret; + u32 dcfg_ssc; + struct regmap *dcfg_regmap; + + pd = devm_kzalloc(&pdev->dev, sizeof(*pd), GFP_KERNEL); + if (!pd) + return -ENOMEM; + platform_set_drvdata(pdev, pd); + + pd->big_endian = device_is_big_endian(&pdev->dev); + + /* SCFG PMUX0 */ + pd->cr0mem = devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(pd->cr0mem)) + return PTR_ERR(pd->cr0mem); + dev_dbg(&pdev->dev, "scfg pmuxcr0 at %px %s", pd->cr0mem, + pd->big_endian ? "be" : "le"); + + /* DCFG RCW SSC */ + dcfg_regmap = syscon_regmap_lookup_by_phandle( + dev_of_node(&pdev->dev), "dcfg-regmap"); + if (IS_ERR(dcfg_regmap)) { + dev_err(&pdev->dev, "dcfg regmap: %pe\n", dcfg_regmap); + return -EINVAL; + } + ret = regmap_read(dcfg_regmap, DCFG_SSC_REG, &dcfg_ssc); + if (ret) { + dev_err(&pdev->dev, "dcfg-regmap read: %d\n", ret); + return ret; + } + pd->ssc = swab32(dcfg_ssc); /* untwist RCW fields */ + + dev_dbg(&pdev->dev, "dcfg ssc = %08x (grp1=%s grp2=%s grp3=%s)\n", + pd->ssc, + (pd->ssc & SSC_DATA0_GPIO_MASK) == SSC_DATA0_GPIO_SEL_SPI ? "spi" : "gpio", + (pd->ssc & SSC_DATA1_GPIO_MASK) == SSC_DATA1_GPIO_SEL_SPI ? "spi" + : (pd->ssc & SSC_DATA1_GPIO_MASK) == SSC_DATA1_GPIO_SEL_GPIO ? "gpio" + : (pd->ssc & SSC_DATA1_GPIO_MASK) == 0x80 ? "10" : "11", + (pd->ssc & SSC_IIC2_MASK) == SSC_IIC2_SEL_GPIO ? "gpio" + : (pd->ssc & SSC_IIC2_MASK) == SSC_IIC2_SEL_I2C ? "i2c" + : (pd->ssc & SSC_IIC2_MASK) == SSC_IIC2_SEL_SPI ? "spi" + : "gpio+reset"); + + ls1012a_init_mux(pd); + + ret = devm_pinctrl_register_and_init(&pdev->dev, &ls1012a_pinctrl_desc, + pd, &pd->pctl_dev); + if (ret) + return dev_err_probe(&pdev->dev, ret, "Failed pinctrl init\n"); + + pinctrl_enable(pd->pctl_dev); + return ret; +} + +static const struct of_device_id ls1012a_pinctrl_match_table[] = { + { .compatible = "fsl,ls1012a-pinctrl" }, + { /* sentinel */ } +}; + +static struct platform_driver ls1012a_pinctrl_driver = { + .driver = { + .name = "ls1012a_pinctrl", + .of_match_table = ls1012a_pinctrl_match_table, + }, + .probe = ls1012a_pinctrl_probe, +}; + +builtin_platform_driver(ls1012a_pinctrl_driver) + +MODULE_DESCRIPTION("LS1012A pinctrl driver"); +MODULE_LICENSE("GPL"); From patchwork Tue Aug 27 02:07:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Leonard X-Patchwork-Id: 13778718 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3F824C5321D for ; Tue, 27 Aug 2024 02:09:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-Type: Message-ID:Subject:cc:To:From:Date:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=p15iNT2jIN0JR4e7Fvu4faxG9g0C9L3GM6KhxggCAHw=; b=v1K1VW+0WiOF9/pccqDF1eqtX4 uaLukiQiWc8kykouoTNtyZ+qK+sSla7PjUR/HEoOf5GSuQZ7vKxiG+NFslrjFdeGKEq/2my51Wbd9 EXzMUuIAztdKcs9LGSBcsHSo6EAmsu4etAvy5Zygz6auPPLYjkMbcY12EN6u5KwdngLQ8le55bQyA bgV5cjIZQl/Zm5BL6BSD1Z8ut7wYGGVNL0N2fIdwqidXF/t21E4kLAJvXJVUJRWYstucZpSTRb6as xhgMZKrFw45z59nle5dUGb1vadeujXzZ2IQBtZ84Yo0eXCiUWGEsW51iaasDW7SoByzf7jtB7lhRy Fas4Ym0A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sildZ-00000009PMr-0Q3Z; Tue, 27 Aug 2024 02:08:49 +0000 Received: from outbound-ip24b.ess.barracuda.com ([209.222.82.221]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1silcl-00000009PCB-1nKN for linux-arm-kernel@lists.infradead.org; Tue, 27 Aug 2024 02:08:00 +0000 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2049.outbound.protection.outlook.com [104.47.70.49]) by mx-outbound16-121.us-east-2b.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 27 Aug 2024 02:07:42 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=sfLWvXb2wFFKIfP0VmHAaLKHOEBTEZEe77VldNveZHzPWFTvTv39goP4wpQaDc2PK7D0KP1WsoKQ1xy9+gTmNb/vls6+9+NiAwo+7J68laqq0Z9zNlG93jWLVAQeZv3muAA71XKkA+cq3wqGoejjNgR6SMEG2/H5Sk3s6lW9Bd/T+ecjMqakH0SZHm/Ji177fIqZ8FRN4nu+UWxFksgrbOAVvjymfdtJBy2i0iWty8cZ+/JIuNOxac0+Qh9F6+AYJ0OgDWqaHhqvMuo4PATHlMrJd5nYJFMPD6ueXBPxov7cXxxIUTtDxXE5T1B0OY8c7e0vw2/3QKuhCu67ESIlbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=p15iNT2jIN0JR4e7Fvu4faxG9g0C9L3GM6KhxggCAHw=; b=lrh4F0cZJP0LnXUlXxzI0I/uEV6y2K0jxkZ49zEkSiMuVjjoT9gZnaeNx8W/ueT/7SoDUMLVqXMDilFwIAmG5sQZunfP797sa0bd3xHt2HX9poCeSU8+2Hw2iIGCNeBXNMlUNnLULuHDqYHus0LwTWIJtm7ljzLwimeGTlxVc/1AdVUGHqRWny1MVYFP07IK2AJhyZY1uc/Pk/6bvrMeivhX5W3bEHfqQm7L3b5ke24cW6TggnwNaL8FoEZRr08yWjdCgoOLvFWjLLWZJYYlhieQQlyPHgtIoMOGZiHNiZxa7mzW6Q0kkVOCdT1hUUo1AY/WjwtJA+/WhfZh20nNZg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=digi.com; dmarc=pass action=none header.from=digi.com; dkim=pass header.d=digi.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=digi.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=p15iNT2jIN0JR4e7Fvu4faxG9g0C9L3GM6KhxggCAHw=; b=PWsH8E/OJdPdiXEzrxpg3NJNSurbB1jthpk5UsMrAOyqDbRAXGlEtb8oFb2ivaNhAvyTGhhf7tzQX7IT/t5l8rOhg8P1K72Bb4fMRA35Mcwjt53j76z4F5E/mbn/qgxjA+5u82hSSRSI4PagPq/1TWBKXsOe5psZbwT3KAWeBXVpqdX0oZqH1rjQT2NHV/X9cEviPbx+XlDxMdP06A1leofTYKibQJCS7JBMVP01dwFYniTteiuJS4rBFQkP6hLN3qJAQN4+fEcGOMnllplEoX4XqXOY1AVAyMNPWHfVTECJdbZm0vpWJaa2P4t/K4O+UwZtQ1GfN15iga9x4o6J2Q== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=digi.com; Received: from DS0PR10MB6918.namprd10.prod.outlook.com (2603:10b6:8:136::8) by DS0PR10MB7432.namprd10.prod.outlook.com (2603:10b6:8:155::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.14; Tue, 27 Aug 2024 02:07:39 +0000 Received: from DS0PR10MB6918.namprd10.prod.outlook.com ([fe80::3697:c0ef:caee:24ae]) by DS0PR10MB6918.namprd10.prod.outlook.com ([fe80::3697:c0ef:caee:24ae%5]) with mapi id 15.20.7918.006; Tue, 27 Aug 2024 02:07:39 +0000 Date: Tue, 27 Aug 2024 12:07:34 +1000 (AEST) From: David Leonard To: linux-arm-kernel@lists.infradead.org cc: Shawn Guo , Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/6] arm64: dts: ls1012a: add pinctrl node Message-ID: Organization: Opengear Digi X-ClientProxiedBy: SY5P282CA0143.AUSP282.PROD.OUTLOOK.COM (2603:10c6:10:205::15) To DS0PR10MB6918.namprd10.prod.outlook.com (2603:10b6:8:136::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR10MB6918:EE_|DS0PR10MB7432:EE_ X-MS-Office365-Filtering-Correlation-Id: df8677b7-e145-4c38-bc29-08dcc63d06fc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|376014|1800799024; X-Microsoft-Antispam-Message-Info: SNcPLz3iyY6wT7h1xiblFaFUVn9E8vSngR08G/eR97jlnYFKEy7o+ZtFnIFL241+WoNLWohxzu+nzOB1qWn72VeWchytX3ZJuS5DV8SYblZJYLpn5cm7IvuyCTXZU1RGA1+NKRl+r7dAL5rR//Vx/AG7eBdFp8Ad3QHbGOF84jrISokqvR6WwE068CyxXiRWosts+zI8QlNzfDhyoyAh6c3R0StZt6fsLIRqK1D0tdZabhAViCHpF3ljamLWiwtgJk0SJ87q+615q0YtNuJClirz8U7W1bSy9ds0Gw0xCoeFVq9CKQaQZDX+6tHlJDOdnLV9RLz6Jj8bccDe8eb4bwze3fVe6UuwyKcBhq+Y870BASN0Mc0AZCCVDloZ9GUC6O7/UoKI4qtNEFReVvVIl2JTgqnxhShWwtx4SSzEe/9u6VAUxnA4JABzndkDPzzDp5/VX8LhwO5mL7z3w1OiqozSjuybffGmPR59or1Cx7eqZkVHrvc/MB9k3RLICm8PDTgMCOKDtNnf08GkVN21XAiaFpPCjau+Y3g4GCDxiD03HC9sRbNhKZv7QJAjTmGJBxKCFyuM9VtBFmH1nVtRer2oFWe/UwFU/3jqKstTbE5KO1K6/W+mbFGFMXJFrejv7jNQYZbrR4rIRMkLUGci0ne9o8JQhfYHMa0SSTtxDMwfepCC5XalyfC11RV3QEzpNVVWIjt4u+F8IcFSZH0dvVSMrQwUncYs8rkNcri07YiyGVyoy8QIQLuL3p3rwLbQLG7PlFb5NxL33lIkir+5110yWz0s8nLFBQeraj9JJ6Bm98bDYrMhYp6Xlhvh1foLKmkh5JtTdFoWMl7rQvlH88v9QSHG6w8XAK6+q54gFON1wDmSq6UeW/H3+Ib8PxHjDFmrXU0NwhUSRRHBeG4XAwkN0noRrPQSW3QJ63Khd87g67fIlDkiTwPxVCPjUwTfDA7eYwoNP603+xQl1fLiLysGb0rIm5r2jW+8WLIV5BMDdCIYysKtA3EcLZsxNWw8zbzLpju9b0ehWz/A929AP72VharvxUkcbqKeCtRbfCKLmLMVoF32NEO9OplgPNc5UljhuTzorrtQLY5063zVFOC1AYaY8Q8I5XHsy5RI0cnPFdDysSHU/3B+ePjjYpp95YeAbGtAnLkU5hxdthejT3RyruyEUz8jyjvJV+9riyPe1CmPL4Ajq9IWOshGrmTleb2WY4GXCxA0907y/h6Dq8yuxD+Mpsh727f0VW3XTJ+jsVWSYq+0aR3Moqe6QC98gMmGF1aj3StKskxbP5FoW3/DfgUhYJKbn9a/Bds6rnDNcY2MbXdbgxFifVCg+Pu+DWVeC8myJQM3xJ5lRFMIDw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS0PR10MB6918.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(376014)(1800799024);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: wGScf4/gxNDB7j6g9y3UAuiEOCTrZgFIleEqklEcP4cGiD4nmExm7hbh4uxVTcuRavz74RiS1O3CpQau+ulBw/sL6klgO1ZUa/3ppatRk0jEe817sOnCodtc1jcrU9CCZ3oejNgHj5SqIwrI98RM2GIQyAHJqmh56ak9hLW4o3Mb/1QJ+yhXsNPSHvkFTJ9ZER019oZg2Yy4O2q61U9SIO0tJ/BkfHIbQRUPX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A7mtj5aevBLDoFvDNCJkxIz87laJ1mfzOBQc4YuOmIL/eHDQOWisT42L9ZpVZ+CUrElNuo0vHFxclzMDi0RbucwMgJmczMR1vTvGnzvbZodLwjYirEePvVoKc2cYTa63HpfQbWyQnGLzptylkEL/nAgEMfjEoOfIcMUIzUMTwdLhtwYhUkipFZz9RqUN55rRy0LZnh3qkaSGaU8EodlESiMZh9TlTNAibArmbRRqGhwOVHQqF/7Oc85ru23RZjbAzi7FRVDGFF5ldpb3ZXVZnG3sMNGb66jFsME3ymxBueck9ZCtUxozPitwPGxag+nlxYgpgbrhLzhO95LHQFZ3aGyMHPJ0pCyLEruABqxNec+wekjrDJKW7sP X-OriginatorOrg: digi.com X-MS-Exchange-CrossTenant-Network-Message-Id: df8677b7-e145-4c38-bc29-08dcc63d06fc X-MS-Exchange-CrossTenant-AuthSource: DS0PR10MB6918.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Aug 2024 02:07:39.3142 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: abb4cdb7-1b7e-483e-a143-7ebfd1184b9e X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Esa5DLsWAsvZVYm3HhVtFIso9UZZ8MqsBa7f71SbKLFRm5VURFeW3jPHtzrBp0+V96mNr8cEt9VBXyezlQqoSQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR10MB7432 X-BESS-ID: 1724724462-104217-12803-28676-1 X-BESS-VER: 2019.1_20240823.2008 X-BESS-Apparent-Source-IP: 104.47.70.49 X-BESS-Parts: H4sIAAAAAAACA4uuVkqtKFGyUioBkjpK+cVKVkbGhkZAVgZQ0CI1OSUl2dDAOM 0wLdnC2Mw4zdLEKCkpxSjRwtQs0dJUqTYWAPBjqllBAAAA X-BESS-Outbound-Spam-Score: 0.50 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.258621 [from cloudscan23-19.us-east-2b.ess.aws.cudaops.com] Rule breakdown below pts rule name description ---- ---------------------- -------------------------------- 0.50 BSF_RULE7568M META: Custom Rule 7568M 0.00 BSF_BESS_OUTBOUND META: BESS Outbound X-BESS-Outbound-Spam-Status: SCORE=0.50 using account:ESS112744 scores of KILL_LEVEL=7.0 tests=BSF_RULE7568M, BSF_BESS_OUTBOUND X-BESS-BRTS-Status: 1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240826_190759_609876_FE1888FA X-CRM114-Status: GOOD ( 10.37 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add a node for the LS1012A's pinmux controller along with related pinctrl properties for the nodes using related GPIO and I2C functions. Signed-off-by: David Leonard --- .../arm64/boot/dts/freescale/fsl-ls1012a.dtsi | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi index e61ea7e0737e..d28416849b0f 100644 --- a/arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi +++ b/arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi @@ -175,6 +175,44 @@ scfg: scfg@1570000 { big-endian; }; + pinctrl: pinctrl@1570430 { + compatible = "fsl,ls1012a-pinctrl"; + reg = <0x0 0x1570430 0x0 0x4>; /* SCFG PMUXCR0 */ + big-endian; + + dcfg-regmap = <&dcfg>; + + pinctrl_qspi_1: pinctrl-qspi-1 { + groups = "qspi_1_grp"; + function = "spi"; + }; + pinctrl_qspi_2: pinctrl-qspi-2 { + groups = "qspi_1_grp", "qspi_2_grp"; + function = "spi"; + }; + pinctrl_qspi_4: pinctrl-qspi-4 { + groups = "qspi_1_grp", "qspi_2_grp", "qspi_3_grp"; + function = "spi"; + }; + + pinctrl_gpio4_5_11: pinctrl-gpio4_5_11 { + groups = "qspi_1_grp"; + function = "gpio"; + }; + pinctrl_gpio12: pinctrl-gpio12 { + groups = "qspi_2_grp"; + function = "gpio"; + }; + pinctrl_gpio1314: pinctrl-gpio1314 { + groups = "qspi_3_grp"; + function = "gpio"; + }; + pinctrl_i2c1: pinctrl-i2c1 { + groups = "qspi_3_grp"; + function = "i2c"; + }; + }; + esdhc1: mmc@1580000 { compatible = "fsl,ls1012a-esdhc", "fsl,esdhc"; reg = <0x0 0x1580000 0x0 0x10000>; @@ -371,6 +409,10 @@ i2c1: i2c@2190000 { clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL QORIQ_CLK_PLL_DIV(4)>; scl-gpios = <&gpio0 13 0>; + sda-gpios = <&gpio0 14 0>; + pinctrl-names = "default", "gpio"; + pinctrl-0 = <&pinctrl_i2c1>; + pinctrl-1 = <&pinctrl_gpio1314>; status = "disabled"; }; @@ -414,6 +456,12 @@ gpio0: gpio@2300000 { #gpio-cells = <2>; interrupt-controller; #interrupt-cells = <2>; + gpio-ranges = <&pinctrl 4 62 1>, + <&pinctrl 5 124 1>, + <&pinctrl 11 123 1>, + <&pinctrl 12 61 1>, + <&pinctrl 13 122 1>, + <&pinctrl 14 60 1>; }; gpio1: gpio@2310000 { From patchwork Tue Aug 27 02:10:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Leonard X-Patchwork-Id: 13778719 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1100EC5472D for ; Tue, 27 Aug 2024 02:12:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-Type: Message-ID:Subject:cc:To:From:Date:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=Et/TtYtSIRTd5m0+2fDxXyIfC54HNHWqrhTxyXJPmS0=; b=U8+tvXIVeIBCfUgscGK1Ofacbt fh0FhvqGNHdOVI0Faw8K786F4TOd9d665+fRmZNlKNilQoRH/8NS1BPGDluQzMeJ5B6Nr3+Jn2WlT W/4dRSCknc9e5CHeIzooW+j4Z/n0rovT9qTsANvt2pva6pGWv/teeEsi9E/o+MusLztRRO1eIT0Vd QOwbC9ZXDY+KgraKQMpQm2p29vMW0EEsH3GF6JKnvr3zUW2EnmdT94pmZFSKd09JXMVZGh6VycC1I z8n8GLth2BhTHuKRxHLDkgn5cxjYrCwLVzdZBrIMSTlM7fhpyWlO5jex4khMvZs9kiAoYO0YkY5Q0 IBj6JrcA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1silh2-00000009Pw6-37Bg; Tue, 27 Aug 2024 02:12:24 +0000 Received: from outbound-ip8b.ess.barracuda.com ([209.222.82.190]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1silfu-00000009Pk2-43Wi for linux-arm-kernel@lists.infradead.org; Tue, 27 Aug 2024 02:11:16 +0000 Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam02lp2046.outbound.protection.outlook.com [104.47.51.46]) by mx-outbound19-31.us-east-2b.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 27 Aug 2024 02:10:54 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ouUa/Ha7W1TVf0ixc5tM1CcyW5kUiQo351SCcxwPCqGDmIfaQSz/WTDGovI4fKHcmEgLKCkNelYgV86K4TX1DNtkqwBYCaSeC0o/KeZGrHgky/8IKGbC8PZtNAoNzf1XrkAVvLVt6eRlNM7xDjhvRfqqOE/izFs4m0s/d59R/OpgfAu+4EP0Dg3ioRFHsx6mHP/kZ4C5kDO36FA4Rs97OAVEiaum8/8E5FjhRRnoHxrQjYgRHugivFbSJrdGmJs6tw5C72sWWODQS5wdBAAiTiw5Q/Lg5ZGL5wMkmdmWaZTTFQqalnBEA0PRjMzoeevjgfJiUjdLAo9++SmO34kXCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Et/TtYtSIRTd5m0+2fDxXyIfC54HNHWqrhTxyXJPmS0=; b=FYe6LummUNqqmIf1dNRO3K+zG00J4pSferFnhDn0jP/8+8WKthtfpH2tCo+H/93tc6j3ujlmiiON2ITLR74YOaK1Mx+s8AMr9jEUpi7ChRjK04Luz53Zy1GADXP4AYULsx5MAqWYBHgV9f6xABeDHkN+NbKgzpdOU61WmxkQXukeEGeXrkvDuUW8l3hGKGPNCuFe5s1yBTRHDa4tgW9vHGUa8tpQSjffk6Vaqqc6Q5/npPNHHABbqNwrpFoulNqjFS4XWwg6ipkQwqDmrCplZCPZqZRM81DhJZWHOV2RtPyCVdC9v7sdFP2ZFeQUeFK5cntUUoyrmDZMCJTpnt6mgg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=digi.com; dmarc=pass action=none header.from=digi.com; dkim=pass header.d=digi.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=digi.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Et/TtYtSIRTd5m0+2fDxXyIfC54HNHWqrhTxyXJPmS0=; b=qHRa+6dSXGd24WCCjz3VCfYBjZlH6CTtadXHI6hgT1UQKVUhGpEaM9E/FEZP1Jq7cQzf9dODigvy41Z8L/ZQ+Jj6A+yu7URlDp6rsht71lsDWqUVyXL8PWDSa005SQyJLN8iNGWPDvlskf44xyziOR5fX4CbZDF0XbrKs1ZoXVWeu0PS4auLu1UB6kAye3Z/EZPyP1Nk7nq0g30ByF0yvSuQjOrlftibwqE9Zmbw1hjttHynOh4/ENYbyf6IAVSa8CWjB/qY6IdbRL7YmVq4aIxgV1p+ZWCvthjwlZQ1DJSZuyEDXSHyN9QvqrDAF8gkQkDC/IPFwGVDM/p6UjKKbw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=digi.com; Received: from DS0PR10MB6918.namprd10.prod.outlook.com (2603:10b6:8:136::8) by DS0PR10MB7432.namprd10.prod.outlook.com (2603:10b6:8:155::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.14; Tue, 27 Aug 2024 02:10:52 +0000 Received: from DS0PR10MB6918.namprd10.prod.outlook.com ([fe80::3697:c0ef:caee:24ae]) by DS0PR10MB6918.namprd10.prod.outlook.com ([fe80::3697:c0ef:caee:24ae%5]) with mapi id 15.20.7918.006; Tue, 27 Aug 2024 02:10:52 +0000 Date: Tue, 27 Aug 2024 12:10:44 +1000 (AEST) From: David Leonard To: linux-arm-kernel@lists.infradead.org cc: Dong Aisheng , Fabio Estevam , Shawn Guo , Jacky Bai , Pengutronix Kernel Team , Linus Walleij , Rob Herring , Krzysztof Kozlowski , Conor Dooley , David.Leonard@digi.com, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/6] dt-bindings: pinctrl: Add fsl,ls1012a-pinctrl yaml file Message-ID: Organization: Opengear Digi X-ClientProxiedBy: SY5P300CA0001.AUSP300.PROD.OUTLOOK.COM (2603:10c6:10:1fb::13) To DS0PR10MB6918.namprd10.prod.outlook.com (2603:10b6:8:136::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR10MB6918:EE_|DS0PR10MB7432:EE_ X-MS-Office365-Filtering-Correlation-Id: c29354a2-ae4f-40dc-c9dc-08dcc63d7a1f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|7416014|366016; X-Microsoft-Antispam-Message-Info: UCF+Zk8oNdqUem4QxBkBf+SzuzrCsyVKVPCwqUGdlJBJg5LrNFkHksfj7balJqJwgDJiS+CiSqR+wYISgwx8v3sYG3FkMEMG8WiCY3jMnfH5+Clu7OKk3OicvNxdljOCfXP7hgPy8OaTKVJ5wG3BVrwLT2OPLtWmUVjPhbZWGgXseUxOqiiLnABu7KAY3kZiAxPfUgUhovulwuHc0LJTKFYDQxDSUVd1XZ6HeiOQKgn1EeIG7/C0PRSmWxgrVWChOhL3TU/FDOj4rlA08Rujb497b/aKfQiN2zrwiPtUwg20ieAjotMQvcn02K1HyGjTvksteiv6qmW/Wqx8p9NQh7k6RNEWXArIUSrN2VbTAqsM9SLbf7oxUqVrXnBoRjeMwzH934pZnCT9IB4R0T9nG1vgMQGVM4kn9a/4Fzt7GfvGp4bzR+AsWD48nrxvI/U3Mgemuty9+dSO7a5BN6mffp4nPS20WWgFHYvMVo5P2ifH1tUyclH3dnw1Cexl3yrPJuFPqNn2LY7ZLwcuq2weBATMZtT+wagfFZ7FRaZzOIGJNfSuOcMEWgA40kr9j07vLiWTJONTt6JM1bVX7mjc1VUlvmeVppoTb68f4sf41OhB545qBjBpwz53Ht4VtLwRLA3u46JkaBp7cJm7eP3xJDXOXb//kQ3oNowV5BlolJLEyWzFvIJYszA0LOWXUVMaJaVOJiUeFnGLVv81oFeWSuWVj2yg9cF7ciJteJnJZQDaXK69r3VBBP97UWUyn3YLydzn/g6bPpdnpKblvalSJedwabNpVlsBZIa1Dv/Cs7/33tCess4d+/5muLdtSd746iOh30iVAJJk0AF+1LbiWPfaoxHrFJ3cBf/mGqdbqrIF+q/VR/bQaZqn96QGrby2pexQ8CfGjACu0zAjR4umjPZIzcdSM3GqHy10eBTUVAXTeCG32O86r7alIH1DbIG+G4Xjqj7wgxQzr0nHa9Mq8VwFc9bMh526oKWU72J9+79gzJgR9+2BNV9TYYti+TfKzcykXA74bcs8mH3p67YFl1WKORTlaA/zWzDx6buuQdpKy3OQ631OLUB6zI9rrOCnLMbKTqu4+3zHi0Hmbty7wlArJRgIYr7jTlJTdGExpL4a39g2p4fMIFr96zk+biMYShfd48hG80MpKUGjl2lwLdZRjSSAej9FlHEzB1RdDNGyD7bncyRYGMK5MpeJGISaJ1dH22wRygqAPLbhEWes0ML7giKudKDckBPCOeuwWj5p6wvLz8H1HBDvabjKta34Fu2DxcxxyzkYgZqNaxNVfAWdG62bpVHoHlWAG9vcH4k= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS0PR10MB6918.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(376014)(7416014)(366016);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: SEbw2gCLmUPGzjb3r6F22s/Nt+V2fhTrQK9mpteW+oT3QYMyJQsKSDX/G3rwscnY2jvYj8gJdcMn7kGFWwjOvKyDKDBB31IbpYXeJmif58/qKY+uLVic4zZtzZL7Pc2VN6S6BRXbZyMQLAUgrekS2c0jKang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eI14NVwYbHyjTro9ma0GDly6h8tb8SaVM9A5W1KYiVVMPIKGUtBf7XjuPGZ3iyY3mY17e5xz7NHIU/OBwfp/3dbLZrsyDpDmBbEGCo1XZ7KRBwYlHoBDU5AySoKZmaXYaYltxt3qwIhfPfj/yFHJufBZDUQUH6emIRo7FJLI1ACxEF+cwbWyE4Ohtf42CxuVHFX01VzTzpml9oY8dxvf39HAiSKRluJd3DMAjJVaytfM9BdRMmGt8CsKyry7ElIVQUhmHozcadEVMYrpIVplA+QEY4sdy1fE1vDNReUIjlYRqSq00tTvrYWZDVuu+C1U/132Zuhwoh6WSXMplgPdE4gnu6VN0vuy1U83OOV2ecdsvL3sryAc7AlCvgHYm4XYG0AxVnPH7dRuTzytpAjDtwDRtPDC+MA3rAAvdDeA7Vg+Tpy6I48f/cV+obIb X-OriginatorOrg: digi.com X-MS-Exchange-CrossTenant-Network-Message-Id: c29354a2-ae4f-40dc-c9dc-08dcc63d7a1f X-MS-Exchange-CrossTenant-AuthSource: DS0PR10MB6918.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Aug 2024 02:10:52.4828 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: abb4cdb7-1b7e-483e-a143-7ebfd1184b9e X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: adTmz9E04fHOQ2FkIwEEeyoYmUZuhWMhXe4ehwHznvhMJcA325fDUz6Dw5ySurNf4jSsDyNaAD64/O/rzfawuA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR10MB7432 X-BESS-ID: 1724724654-104895-12625-21148-1 X-BESS-VER: 2019.1_20240823.2008 X-BESS-Apparent-Source-IP: 104.47.51.46 X-BESS-Parts: H4sIAAAAAAACA4uuVkqtKFGyUioBkjpK+cVKVkZmFsZAVgZQMNEwydLAzDQtzd Ay2cjYIDkp2STJMjUxNTHZ0MLE2NJMqTYWAOMtX2NBAAAA X-BESS-Outbound-Spam-Score: 0.00 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.258621 [from cloudscan11-197.us-east-2a.ess.aws.cudaops.com] Rule breakdown below pts rule name description ---- ---------------------- -------------------------------- 0.00 BSF_BESS_OUTBOUND META: BESS Outbound X-BESS-Outbound-Spam-Status: SCORE=0.00 using account:ESS112744 scores of KILL_LEVEL=7.0 tests=BSF_BESS_OUTBOUND X-BESS-BRTS-Status: 1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240826_191115_226700_AD2A846D X-CRM114-Status: GOOD ( 14.76 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add a binding schema and examples for the LS1012A's pinctrl function. Signed-off-by: David Leonard --- .../bindings/pinctrl/fsl,ls1012a-pinctrl.yaml | 83 +++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 Documentation/devicetree/bindings/pinctrl/fsl,ls1012a-pinctrl.yaml diff --git a/Documentation/devicetree/bindings/pinctrl/fsl,ls1012a-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/fsl,ls1012a-pinctrl.yaml new file mode 100644 index 000000000000..599df49b44d4 --- /dev/null +++ b/Documentation/devicetree/bindings/pinctrl/fsl,ls1012a-pinctrl.yaml @@ -0,0 +1,83 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pinctrl/fsl,ls1012a-pinctrl.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NXP QorIQ LS1012A pin multiplexing + +maintainers: + - David.Leonard@digi.com + +description: > + Bindings for LS1012A pinmux control. + +properties: + compatible: + const: fsl,ls1012a-pinctrl + + reg: + description: Specifies the base address of the PMUXCR0 register. + maxItems: 2 + + big-endian: + description: If present, the PMUXCR0 register is implemented in big-endian. + type: boolean + + dcfg-regmap: + $ref: /schemas/types.yaml#/definitions/phandle + description: + The phandle of the syscon node for the DCFG registers. + +patternProperties: + '^pinctrl-': + type: object + $ref: pinmux-node.yaml# + unevaluatedProperties: false + + properties: + function: + enum: [ i2c, spi, gpio, gpio_reset ] + + groups: + items: + enum: [ qspi_1_grp, qspi_2_grp, qspi_3_grp ] + +allOf: + - $ref: pinctrl.yaml# + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + pinctrl: pinctrl@1570430 { + compatible = "fsl,ls1012a-pinctrl"; + reg = <0x0 0x1570430 0x0 0x4>; + big-endian; + dcfg-regmap = <&dcfg>; + pinctrl_qspi_1: pinctrl-qspi-1 { + groups = "qspi_1_grp"; + function = "spi"; + }; + pinctrl_qspi_2: pinctrl-qspi-2 { + groups = "qspi_1_grp", "qspi_2_grp"; + function = "spi"; + }; + pinctrl_qspi_4: pinctrl-qspi-4 { + groups = "qspi_1_grp", "qspi_2_grp", "qspi_3_grp"; + function = "spi"; + }; + }; + - | + qspi: quadspi@1550000 { + compatible = "fsl,ls1021a-qspi"; + reg = <0 0x1550000 0 0x10000>; + /* QSPI pins for buswidth 2 */ + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_qspi_2>; + status = "okay"; + }; From patchwork Tue Aug 27 02:12:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Leonard X-Patchwork-Id: 13778723 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id ACAAFC5472D for ; Tue, 27 Aug 2024 02:13:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-Type: Message-ID:Subject:cc:To:From:Date:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=RGo/qtI6DrVdCYOJbM1oovYF01KBW/lbe13pWeZjpQQ=; b=SwO2oNR3xvagIK3or7QLs3n2uy awEVwg4P8VEulcFioLuLU4pYppHWwG0qoSd61ROh0bZeIMXCjlDIMqKgkjeVE6FdALJFUOR8fLq/4 CxSdyD3tBfnL4oZg0pYmtR0x4vD9KDRRSaVq9SiPyl8PHnj8lVYveI9bOSJ0Lw3NNcwZ0o51Ysm/s FmQCoB4DlfFJQ6WD8KNWlTJuc8OLufiZe6GW5VDgd7LJMTMD+g3DdMAZGTwv3eZV1w7DCAxpkuCC1 scL91H90AYCza37GT5lvoxmBtT7NfMeMngp9GEXjLtbueVQFsrGAmt2z7D/vPZ3VDE4KC2rqP2Uxz NLbZRj4g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sili7-00000009QAM-2Sqd; Tue, 27 Aug 2024 02:13:31 +0000 Received: from outbound-ip8a.ess.barracuda.com ([209.222.82.175]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1silhJ-00000009Pyf-1KXu for linux-arm-kernel@lists.infradead.org; Tue, 27 Aug 2024 02:12:42 +0000 Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam02lp2045.outbound.protection.outlook.com [104.47.56.45]) by mx-outbound42-152.us-east-2c.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 27 Aug 2024 02:12:33 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=QiqShegcbUnu/hX2yyXG/zvj5RRUjlCriZ2lLqG5/lttBlr8kIUNPlzczKDcjBKrUPdF6OzY/2dqoe4AebTh8fYkfRhPJyHUXiqIv7KFF1jI/qqx+odVbvSMHOvYM0AOSRU56vdiuhjolzM2GXgU2OJo6MIZk2ZCQoLn+yduabPF7+9vauW0AhE0vRb7bYb03JiW6SlmokxkvtAUkGSIYzjGJ/gsE1iJMlUUBYH4iS7L4qxt8bJRrEXMM128mepa5XjBzFYy+T4cvv5KBtDM6Jhbsd8HGrrQJFCjkHzmdOnnvu3dR/ZU3TtMrDfkclc7sr54gozOite3vaqqN17jPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=RGo/qtI6DrVdCYOJbM1oovYF01KBW/lbe13pWeZjpQQ=; b=TnxhMdS9ePJmC9po6lv+GvFaIHuUgnJb+NqaBG8X1pSieUmBu+8moZfj6nyA82nIU5Trp/GYPaX/cbhfjfVqEkRFlPhDiVZZnXT2SRfCjfl7J/cBhojX8yCbeD8VGEM7lxqb5NcdT/pK4/kSX/IirC64s+JRoqj6L0xLmhN+MbK2i99qPfhgOXO4U0s0OacHdLeQBnrJzJSBijlKVyysTSH+ZDpRCA//WA3UnR8Q5PHIfsgSeBusW35tf2BJLgHhxqjQJVIKBffqg/Ydwhivfx3F5ZS9Jz0tx83uPNasSY7gcvAdKP472Rf14cIiWrNwzvRsYzrIHKUV8C0IPkNBVA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=digi.com; dmarc=pass action=none header.from=digi.com; dkim=pass header.d=digi.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=digi.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RGo/qtI6DrVdCYOJbM1oovYF01KBW/lbe13pWeZjpQQ=; b=E//XctzBi6x7xZ6aI5ggRzoEv8Jv6sXJCOpkQFdAHfokLPh+FPeTSxxcNrvKsILkQ9tbg1Lmf3SEUy7UtYIjvWpLz7KlzBOTn1RisCbh4N75sPU/VDe3zIXaU/4eKWkXL4pON71CuuKfDuUhoYPbELO565paUWQYxw4VhQkrLAUXBMq9nCBmiSZP0hPQcXc7y8zG/easd+E/vmAiiV7+XZC7L2t+S1ublViVv5xXkjXP57zd1C+yY7Wvgg0eL6N7isTGHPWNT4el0j+gYOdRy0YaWt6E5AturBKwZkznJLt96hVdYbWAlKeLtYy0+OSJhqs1RTmjiBgdDDN4Yq+WRQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=digi.com; Received: from DS0PR10MB6918.namprd10.prod.outlook.com (2603:10b6:8:136::8) by DS0PR10MB7432.namprd10.prod.outlook.com (2603:10b6:8:155::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.14; Tue, 27 Aug 2024 02:12:31 +0000 Received: from DS0PR10MB6918.namprd10.prod.outlook.com ([fe80::3697:c0ef:caee:24ae]) by DS0PR10MB6918.namprd10.prod.outlook.com ([fe80::3697:c0ef:caee:24ae%5]) with mapi id 15.20.7918.006; Tue, 27 Aug 2024 02:12:31 +0000 Date: Tue, 27 Aug 2024 12:12:24 +1000 (AEST) From: David Leonard To: linux-arm-kernel@lists.infradead.org cc: Dong Aisheng , Fabio Estevam , Shawn Guo , Jacky Bai , Pengutronix Kernel Team , Linus Walleij , linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org Subject: [PATCH 4/6] pinctrl: ls1046a: Add pinctrl driver support Message-ID: Organization: Opengear Digi X-ClientProxiedBy: SY6PR01CA0015.ausprd01.prod.outlook.com (2603:10c6:10:e8::20) To DS0PR10MB6918.namprd10.prod.outlook.com (2603:10b6:8:136::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR10MB6918:EE_|DS0PR10MB7432:EE_ X-MS-Office365-Filtering-Correlation-Id: d71f2753-6bab-4b0b-6976-08dcc63db53f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|366016; X-Microsoft-Antispam-Message-Info: Ux6HC1v/RtsNgg0ezk+QnXo55qhnfN4aUFxp10OXaShM7b2Jrls8wBiE9+22DJlTj6uUf45rpAVIgL3OFahzRXQO7YDLsJD+dp1V0WRyOGVFCh3danmYEGWluhJeYZW7jUxoT34Do98fCAjatUT+qwiWU069iRwR0nUYlRELp+Qr6AfKLBawx0UTXpg7qGoX8X8LQQ0tygoJ07NxJsnLGnhsUzSYgCtedkD4COouJrb7KfCY6DEV0po+e9wIflv64XUx/YnhMpOhFR7iPhie/SnwJ+s710NR9Q+lPDFV4tWXfYvohLeVGqiFSPDxNW1R6zZRCcu4ewrVJlOT2CmYb/yJZzv66IiVYprfbyWq6LDLqN56gEYHWR5Ka5tHVaLz5uL9PiQv/0u8TkPY9RCDZSg0NhTJoqF0y+kVZazZfBNfR6m/IphlM7Y5a3h69Q/jPd1OwPHJcpkkmZn4p9kHSCdpo9nYNa2TqLQoPaat9pElwczQ8jyP0Wp5PukKKi7P6Tg63hCb74YlVJeMCRMmT+uByTAK4mqkhqOJPJA170CGxlRbwv97HodhBsmLkBZIUxONyTHIF6q7XqmgfSyAfaPNJuHW8q1BsUdNHkRi+1OfvfT81mxmf2XJkUIZeHKg3comwQj3FAz9OVWmPSRfRZ7RMByNcVAg2hvgjQGL5w5nj7JSRnNYxwGEYTHcV96rYMBekkbbvWAFPfbPJLoKIHv3Rz8/JS3dTnpFeaUPkv5LJNzHV8b4MKLujppx/9TzrO/sK1Rzm9cQnCtvJTwmRvyaM6E8fQVFLCzBIeRVGK+LCROrYyzlY92Vda7TVLbwYeXDlmcZSXNgc8NcIZuLXJB2yzv4t8fCy4nmNUixpMJf6AOIZleXw2/AVCSs6DXIk9CnMW1WHR80D81uZy77SUg1xNDtKvEfWp7qCwoRe/Ouc8SVbRexqYw4yXK6JRXSWB2d+yR+oX8kRSbd/NkPuQOWUdG+2eNLagZgd9x9dD+dRN7w0OCCfe4SitdAsFepDJZDCvHr5ZkhH7RMLLqc2/FOIQps2QLAGj9+J9sebNZHYHajMYK/iAwzRCtS29KBAArskC2K2OgFKh3HvgC9HhHOHiV+NMxttAVl0bD47eV/RA+wOdVtzc3Ffcb5HOG1x2mTlOeoMbbLfbyivVpqS7g3YsbXE+YFxcCRsWX8M0YXVX0mLfQz5+tSbySYdS1Dp0N2qsnDsx47Bgnf4Z+if5QBRfxfhvizF3u0PYsRXTW0Oq38G1254Kt51iALL74+heboAPfxQSK6d8SwsWuMfd4YyucphjT5gSDXi/6S9F82atNPySJchYPfyyU0iL5HE6R5dXq78NqAb/by3OaPUQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS0PR10MB6918.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(376014)(366016);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 0gqkuPkeWoge1Ti8gR7Fly/ID+VnZUPQHcrocmSBeRPD5LWYFlPrWp5UIwrEvlOs68+9E2ECFsbRyRqT2tMLIuoDbEOjy8Kkfsak+RrSLFvYtJBgMEW2U9mpe26z1vr/qM2d9OjFduaLz+0m58tolE+qbDVMlAgDdww+3C+sXCz+nFHRwqxbrh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YGoJ293St3MOxm5yTPLm+qLog0En2bDjD/2e2UEZHgGlVKLtmFwWVN8dX/agAI1Q+wv/O2cxN+E/7CjgiadM1XVz9CPRH1JpNN+p6dB3Ecj6UnKK6FwoUmTsBR2WmJZHpHLqatrDkGrdQezRL6LdJS8vmwgYmoV09M08HJkP3Rr+UG3BIwALF7jyr8Ydcox8ZphXINX6cZUSwUm4ospdjblxYxR+qTJH1JqEy+Mt7aR3IGrnbTn5SUcMJoIfKNQFx2CyGyX9ovzPUVhVmaiofY1Df4Bv/hjqPHGB22EllpRaVW/cPDdPHcZKZivvJGaEcsCIXKskHMtnhbXdtzQ2FjIMqOP4vGiJdbJZU03SKH+iAYBH+ZjhVCCypCOOmo37r9ynWIaA48MMRgYpEtvNKFJ X-OriginatorOrg: digi.com X-MS-Exchange-CrossTenant-Network-Message-Id: d71f2753-6bab-4b0b-6976-08dcc63db53f X-MS-Exchange-CrossTenant-AuthSource: DS0PR10MB6918.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Aug 2024 02:12:31.6856 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: abb4cdb7-1b7e-483e-a143-7ebfd1184b9e X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: d7pMQIk0d/kkIht9HyKRMvdAfPaW0Dvf4/DUs8moft2RDy5V2hGloKZszqxbDtd/CDfK1mZiaDb1f6wla26C+A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR10MB7432 X-BESS-ID: 1724724752-110904-29531-65061-1 X-BESS-VER: 2019.1_20240823.2008 X-BESS-Apparent-Source-IP: 104.47.56.45 X-BESS-Parts: H4sIAAAAAAACA4uuVkqtKFGyUioBkjpK+cVKVhYmhgZAVgZQ0NDYxMTCODXRxD DFyDzJ2DLZItnA2CDZ3MjE3DjVNM1cqTYWAB6AWgRBAAAA X-BESS-Outbound-Spam-Score: 0.50 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.258621 [from cloudscan19-154.us-east-2b.ess.aws.cudaops.com] Rule breakdown below pts rule name description ---- ---------------------- -------------------------------- 0.50 BSF_RULE7568M META: Custom Rule 7568M 0.00 BSF_BESS_OUTBOUND META: BESS Outbound X-BESS-Outbound-Spam-Status: SCORE=0.50 using account:ESS112744 scores of KILL_LEVEL=7.0 tests=BSF_RULE7568M, BSF_BESS_OUTBOUND X-BESS-BRTS-Status: 1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240826_191241_525296_14B65788 X-CRM114-Status: GOOD ( 15.83 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add QorIQ LS1046A pinctrl driver allowing i2c-core to exert GPIO control over the third and fourth I2C buses. Signed-off-by: David Leonard --- drivers/pinctrl/freescale/Kconfig | 8 + drivers/pinctrl/freescale/Makefile | 1 + drivers/pinctrl/freescale/pinctrl-ls1046a.c | 224 ++++++++++++++++++++ 3 files changed, 233 insertions(+) create mode 100644 drivers/pinctrl/freescale/pinctrl-ls1046a.c diff --git a/drivers/pinctrl/freescale/Kconfig b/drivers/pinctrl/freescale/Kconfig index a2038042eeae..2641db6c64c7 100644 --- a/drivers/pinctrl/freescale/Kconfig +++ b/drivers/pinctrl/freescale/Kconfig @@ -217,6 +217,14 @@ config PINCTRL_LS1012A help Say Y here to enable the ls1012a pinctrl driver +config PINCTRL_LS1046A + tristate "LS1046A pinctrl driver" + depends on ARCH_LAYERSCAPE && OF || COMPILE_TEST + select PINMUX + select GENERIC_PINCONF + help + Say Y here to enable the ls1046a pinctrl driver + config PINCTRL_VF610 bool "Freescale Vybrid VF610 pinctrl driver" depends on SOC_VF610 diff --git a/drivers/pinctrl/freescale/Makefile b/drivers/pinctrl/freescale/Makefile index 6926529d8635..66fec747af73 100644 --- a/drivers/pinctrl/freescale/Makefile +++ b/drivers/pinctrl/freescale/Makefile @@ -36,3 +36,4 @@ obj-$(CONFIG_PINCTRL_IMX28) += pinctrl-imx28.o obj-$(CONFIG_PINCTRL_IMXRT1050) += pinctrl-imxrt1050.o obj-$(CONFIG_PINCTRL_IMXRT1170) += pinctrl-imxrt1170.o obj-$(CONFIG_PINCTRL_LS1012A) += pinctrl-ls1012a.o +obj-$(CONFIG_PINCTRL_LS1046A) += pinctrl-ls1046a.o diff --git a/drivers/pinctrl/freescale/pinctrl-ls1046a.c b/drivers/pinctrl/freescale/pinctrl-ls1046a.c new file mode 100644 index 000000000000..9f5ec31f1e05 --- /dev/null +++ b/drivers/pinctrl/freescale/pinctrl-ls1046a.c @@ -0,0 +1,224 @@ +// SPDX-License-Identifier: (GPL-2.0-only OR MIT) +/* + * Pin controller for NXP QorIQ LS1046A. + * + * Copyright (c) 2024 Digi International, Inc. + * Author: David Leonard + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include + +struct ls1046a_pinctrl_pdata { + struct pinctrl_dev *pctl_dev; + void __iomem *cr0mem; + bool big_endian; + u32 ssc; +}; + +/* + * L4 M4 M3 N3 + * i2c IIC3_SCL IIC3_SDA IIC4_SCL IIC4_SDA + * gpio GPIO_4[10] GPIO_4[11] GPIO_4[12] GPIO_4[13] + * evt EVT_B[5] EVT_B[6] EVT_B[7] EVT_B[8] + * usb USB2_DRVVBUS USB2_PWRFAULT USB3_DRVVBUS USB3_PWRFAULT + * ftm FTM8_CH0 FTM8_CH1 FTM3_FAULT FTM_EXT3CLK + */ + +/* SCFG_RCWPMUXCR0 pinmux control register */ +#define SCFG_RCWPMUXCR0 0x0157040c +#define RCWPMUXCR0_FIELD(shift, func) ((u32)(func) << (29 - (shift))) +#define RCWPMUXCR0_MASK(shift) RCWPMUXCR0_FIELD(shift, RCWPMUXCR0_FUNC_MASK) +#define RCWPMUXCR0_IIC3_SCL_SHIFT 17 +#define RCWPMUXCR0_IIC3_SDA_SHIFT 21 +#define RCWPMUXCR0_IIC4_SCL_SHIFT 25 +#define RCWPMUXCR0_IIC4_SDA_SHIFT 29 +#define RCWPMUXCR0_FUNC_I2C 0 +#define RCWPMUXCR0_FUNC_GPIO 1 +#define RCWPMUXCR0_FUNC_EVT 2 +#define RCWPMUXCR0_FUNC_USB 3 +#define RCWPMUXCR0_FUNC_FTM 5 +#define RCWPMUXCR0_FUNC_CLK 6 +#define RCWPMUXCR0_FUNC_MASK 7 + +#define PIN_L4 0 /* IIC3_SCL/GPIO_4[10]/EVT_B[5]/USB2_DRVVBUS/FTM8_CH0 */ +#define PIN_M4 1 /* IIC3_SDA/GPIO_4[11]/EVT_B[6]/USB2_PWRFAULT/FTM8_CH1 */ +#define PIN_M3 2 /* IIC4_SCL/GPIO_4[12]/EVT_B[7]/USB3_DRVVBUS/FTM3_FAULT */ +#define PIN_N3 3 /* IIC4_SDA/GPIO_4[13]/EVT_B[8]/USB3_PWRFAULT/FTM_EXT3CLK */ + +const struct pinctrl_pin_desc ls1046a_pins[] = { + PINCTRL_PIN(PIN_L4, "L4"), + PINCTRL_PIN(PIN_M4, "M4"), + PINCTRL_PIN(PIN_M3, "M3"), + PINCTRL_PIN(PIN_N3, "N3"), +}; + +/* Each pin is its own group */ +static const char * const ls1046a_groups[] = { "L4", "M4", "M3", "N3" }; + +static int ls1046a_get_groups_count(struct pinctrl_dev *pcdev) +{ + return ARRAY_SIZE(ls1046a_pins); +} + +static const char *ls1046a_get_group_name(struct pinctrl_dev *pcdev, + unsigned int selector) +{ + return ls1046a_pins[selector].name; +} + +static int ls1046a_get_group_pins(struct pinctrl_dev *pcdev, + unsigned int selector, const unsigned int **pins, unsigned int *npins) +{ + *pins = &ls1046a_pins[selector].number; + *npins = 1; + return 0; +} + +static const struct pinctrl_ops ls1046a_pinctrl_ops = { + .get_groups_count = ls1046a_get_groups_count, + .get_group_name = ls1046a_get_group_name, + .get_group_pins = ls1046a_get_group_pins, + .dt_node_to_map = pinconf_generic_dt_node_to_map_group, + .dt_free_map = pinconf_generic_dt_free_map, +}; + +/* Every pin has the same set of functions */ +#define FUNC_i2c 0 +#define FUNC_gpio 1 +#define FUNC_evt 2 +#define FUNC_usb 3 +#define FUNC_ftm 4 + +#define _PINFUNC(name) \ + [FUNC_##name] = PINCTRL_PINFUNCTION(#name, ls1046a_groups, ARRAY_SIZE(ls1046a_groups)) +static const struct pinfunction ls1046a_functions[] = { + _PINFUNC(i2c), + _PINFUNC(gpio), + _PINFUNC(evt), + _PINFUNC(usb), + _PINFUNC(ftm), +}; + +static int ls1046a_get_functions_count(struct pinctrl_dev *pctldev) +{ + return ARRAY_SIZE(ls1046a_functions); +} + +static const char *ls1046a_get_function_name(struct pinctrl_dev *pctldev, unsigned int func) +{ + return ls1046a_functions[func].name; +} + +static int ls1046a_get_function_groups(struct pinctrl_dev *pctldev, unsigned int func, + const char * const **groups, + unsigned int * const ngroups) +{ + *groups = ls1046a_functions[func].groups; + *ngroups = ls1046a_functions[func].ngroups; + return 0; +} + +static int ls1046a_set_mux(struct pinctrl_dev *pcdev, + unsigned int func, unsigned int pin) +{ + struct ls1046a_pinctrl_pdata *pd = pinctrl_dev_get_drvdata(pcdev); + static const u32 cr0_reg_func[] = { + [FUNC_i2c] = RCWPMUXCR0_FUNC_I2C, + [FUNC_gpio] = RCWPMUXCR0_FUNC_GPIO, + [FUNC_evt] = RCWPMUXCR0_FUNC_EVT, + [FUNC_usb] = RCWPMUXCR0_FUNC_USB, + [FUNC_ftm] = RCWPMUXCR0_FUNC_FTM, + }; + static const unsigned int cr0_pin_shift[] = { + [PIN_L4] = RCWPMUXCR0_IIC3_SCL_SHIFT, + [PIN_M4] = RCWPMUXCR0_IIC3_SDA_SHIFT, + [PIN_M3] = RCWPMUXCR0_IIC4_SCL_SHIFT, + [PIN_N3] = RCWPMUXCR0_IIC4_SDA_SHIFT, + }; + u32 cr0; + + if (pd->big_endian) + cr0 = ioread32be(pd->cr0mem); + else + cr0 = ioread32(pd->cr0mem); + + unsigned int pin_shift = cr0_pin_shift[pin]; + u32 reg_func = cr0_reg_func[func]; + u32 newcr0 = (cr0 & ~RCWPMUXCR0_MASK(pin_shift)) | + RCWPMUXCR0_FIELD(pin_shift, reg_func); + + if (pd->big_endian) + iowrite32be(newcr0, pd->cr0mem); + else + iowrite32(newcr0, pd->cr0mem); + return 0; +} + +static const struct pinmux_ops ls1046a_pinmux_ops = { + .get_functions_count = ls1046a_get_functions_count, + .get_function_name = ls1046a_get_function_name, + .get_function_groups = ls1046a_get_function_groups, + .set_mux = ls1046a_set_mux, +}; + +static const struct pinctrl_desc ls1046a_pinctrl_desc = { + .name = "ls1046a", + .pins = ls1046a_pins, + .npins = ARRAY_SIZE(ls1046a_pins), + .pctlops = &ls1046a_pinctrl_ops, + .pmxops = &ls1046a_pinmux_ops, + .owner = THIS_MODULE, +}; + +static int ls1046a_pinctrl_probe(struct platform_device *pdev) +{ + struct ls1046a_pinctrl_pdata *pd; + int ret; + + pd = devm_kzalloc(&pdev->dev, sizeof(*pd), GFP_KERNEL); + if (!pd) + return -ENOMEM; + platform_set_drvdata(pdev, pd); + + pd->big_endian = device_is_big_endian(&pdev->dev); + + /* SCFG PMUX0 */ + pd->cr0mem = devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(pd->cr0mem)) + return PTR_ERR(pd->cr0mem); + dev_dbg(&pdev->dev, "scfg pmuxcr0 at %px %s", pd->cr0mem, + pd->big_endian ? "be" : "le"); + + ret = devm_pinctrl_register_and_init(&pdev->dev, &ls1046a_pinctrl_desc, + pd, &pd->pctl_dev); + if (ret) + return dev_err_probe(&pdev->dev, ret, "Failed pinctrl init\n"); + + pinctrl_enable(pd->pctl_dev); + return ret; +} + +static const struct of_device_id ls1046a_pinctrl_match_table[] = { + { .compatible = "fsl,ls1046a-pinctrl" }, + { /* sentinel */ } +}; + +static struct platform_driver ls1046a_pinctrl_driver = { + .driver = { + .name = "ls1046a_pinctrl", + .of_match_table = ls1046a_pinctrl_match_table, + }, + .probe = ls1046a_pinctrl_probe, +}; + +builtin_platform_driver(ls1046a_pinctrl_driver) + +MODULE_DESCRIPTION("LS1046A pinctrl driver"); +MODULE_LICENSE("GPL"); From patchwork Tue Aug 27 02:13:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Leonard X-Patchwork-Id: 13778724 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3B8A7C5472D for ; Tue, 27 Aug 2024 02:14:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-Type: Message-ID:Subject:cc:To:From:Date:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=IPd0rzJD8VJgIw2m8ojLM4mcTxYa1xSWreBEvEoXSlU=; b=1ZiHnIGyP8W1bit3Eya9GL1oNR sjeWxW9/KUiQn8wCbyaWlD86fYtmkQyB+gTt+kYG+tKcXwEV8EocWKvskKfbtkgOkQ0KhajcQHefw UtXWsc0mzwoXg5g9Pa/lVex3zyQTS08lnBVXk78+cMglPfr32m0N8hmZn/mQlj21xEe/MYVck3c2H BbmPePIUAMC9cMlqKerRsqO+cQT9eBp/9iPZBs+fE7kQLQ1PsvL3Eo4pqa/PSNtGlyH0tzP6761b2 ZgzHb2vAhA9/8cMb/xADwrQ6Uc7zdkkCvi2COBr+E7rFty+TXvmsb+jXBCrOJ421lVfgCCay6dwXJ rwWGCSXg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1silj9-00000009QO3-0tC9; Tue, 27 Aug 2024 02:14:35 +0000 Received: from outbound-ip8a.ess.barracuda.com ([209.222.82.175]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1siliL-00000009QBV-43Vv for linux-arm-kernel@lists.infradead.org; Tue, 27 Aug 2024 02:13:47 +0000 Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam02lp2042.outbound.protection.outlook.com [104.47.56.42]) by mx-outbound44-158.us-east-2c.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 27 Aug 2024 02:13:38 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=THgiIM1n7JAqtyaphgTMoAUqryWlkoKwFHDYhkbka45vypsz6gBz1qynADl3Npws7TJkM4sexqgiHTnNCK9dB0C8azvrHrRjjGTGkQwt+AA8TqZ42ysdlJP9tuyHemGCT07QmjWr9T2VAbkasw960bIzfFa0UHeT1pPRTMgOw4Npykd4RweYPsXjxyhyGLQwLPXp1jTTcqVvE1qOxT2hnpvXe72me7j/GLjyMq6zEohPpZvEwWOts308NK7JtkhqOlC4XMkrNkL0h84QvmG6xbR+UQ1BHjIjKKlkRx7juNVSubeUQDFordF6Ot1kc+63O9CRvPhkGhbCSul2F7cgxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=IPd0rzJD8VJgIw2m8ojLM4mcTxYa1xSWreBEvEoXSlU=; b=r6ShZHSLnZQEFIuw1lx3GIDmelwSKUUJ+w4rrpFAdFI2jqoRBPV151JrscCR1N/XjLybk0EwqtYkblOLXdrBurbaZn3ItXnrcUElBZmzGow8AhHSaHIyaIIdU5Y8XWEhE9lVjt9+J31FVe+uAlDmlFv5rLZtnyB+m2H9wq0V7gPTYLOdz2RoY+wbz4Rp4nqhh+5rt3E96IGX9PsSSZrYKMyDAPcm3mxfd8dR4W6B7vgD2Nu3lPsBKgRqZ1QJyz1qwi7t1VJYDYQDMiJK7/F/jG8IHZrzXi4MzZjZzHSDSQxO2Qs2GHNYR/rm2F0pgo1olcixIyYI7dgAmzML9KFJcg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=digi.com; dmarc=pass action=none header.from=digi.com; dkim=pass header.d=digi.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=digi.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=IPd0rzJD8VJgIw2m8ojLM4mcTxYa1xSWreBEvEoXSlU=; b=bxjcHa6luWEKfQ5Qh5D6vu+aBAki7HKvHwKUuuCZ/WjXG92u5AvP6DsQmcn1yXHIIX+1T3IS9V5OVyBvhE/36t2xeZha+UWTkItAkjyAMp3Mrue9+KO/8oolLUKAXVD9DB0w/XBQ6HfuJxKImCiEtaxQCOQi/l8r5QuaWDhB1CJLiUHvey2B6kk0VIaMEwdi/EZTc0zfeif0C6V5jeu+ArWTKaQEU/T8usPRleTP3MDdSSCCK0Vj0xECXmaW1E+lLsdXtdFL8fY1/1Z2YLDptisnp4bEFEd/uG1+aJUjdiSom4bW0TQpCXj0ghH13afsXX1C+0VhcHISPIeu5kKxwg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=digi.com; Received: from DS0PR10MB6918.namprd10.prod.outlook.com (2603:10b6:8:136::8) by DS0PR10MB7432.namprd10.prod.outlook.com (2603:10b6:8:155::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.14; Tue, 27 Aug 2024 02:13:37 +0000 Received: from DS0PR10MB6918.namprd10.prod.outlook.com ([fe80::3697:c0ef:caee:24ae]) by DS0PR10MB6918.namprd10.prod.outlook.com ([fe80::3697:c0ef:caee:24ae%5]) with mapi id 15.20.7918.006; Tue, 27 Aug 2024 02:13:37 +0000 Date: Tue, 27 Aug 2024 12:13:30 +1000 (AEST) From: David Leonard To: linux-arm-kernel@lists.infradead.org cc: Shawn Guo , Rob Herring , Krzysztof Kozlowski , Conor Dooley , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 5/6] arm64: dts: ls1046a: add pinctrl node Message-ID: <1d7da01e-4f61-df0d-1795-5fbd78ae14b7@digi.com> Organization: Opengear Digi X-ClientProxiedBy: SY5P300CA0070.AUSP300.PROD.OUTLOOK.COM (2603:10c6:10:247::26) To DS0PR10MB6918.namprd10.prod.outlook.com (2603:10b6:8:136::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR10MB6918:EE_|DS0PR10MB7432:EE_ X-MS-Office365-Filtering-Correlation-Id: 0afde38e-faf8-4af3-dd23-08dcc63ddc46 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|366016; X-Microsoft-Antispam-Message-Info: g9Hqy6p3e9qGx5yFNNj6CUQ8h+rhjfD56WhnLGhIwoZDwLAxzB2nkXUW0Fta1U1yEaqj+yKblGVZwmCDEPaGZ/FOlf/0J3tgpM6+7x1CbXza1qxb5jCbn8Ve2eft2qG5Ng3yLDSlVuvotu13V4E35MIi/OD2NVIxoF+xtYA0HFC2S29UTw4ffUX4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Fe/Zk7twQ0K1wAHwuTycMXX+c9ZFt1GIgCatNtxJvKoQQQ0d6bcSgE0YOvwm71K1EIRM1M2eoav5WCGatMZgMACc5M1I6zueiSf/A== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS0PR10MB6918.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(376014)(366016);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: KrjYhQwkG1veFmjdAFITuK2Azmf2u06x1DGmz+QjhAZXkP4Qd69wji1LAAsK32xl+iWdvKmjyxihK2a4kDEGUv7vFSmsKR6D7JgdVk7InaWJOmReU21PVQdhKZjguRZewKY2YKnMJ98591HmVbjtcye3WI+R3/YqzSCct6jd2eJ4t+Df4/XZbaRnGos4kcB5r27NVIPm+nQ7MkRODODuIRHHE2ipyk4GScNgswsRPhmxSFo5aS9K/6f+ExdOe9v0waFuLaWJBHMy6voEh35nqeKiiEuPYr6LIbGOJt1MMrpM5xRgDohGYxqSfhE7hVwyzIdOn1+8sdUCdJW1y5Th7ru4XMY7IC6aOangK0G/3WS88jodT215FvTNBId5BkUo5/+Igz8oIDTo+HjJ/iMhDczEC/KQ7hdUvm4WVTjR9hdJaSltjqV3aDg48AnIkgomjqI+lbB+GLPgR/XPKYQeAUAShrTzR4E9fC/fU/AEvgiLtr4yYofw/r6VWFk68qIaSYL90IOjNaGdKNxogZQQTPGp4ghRsQzrSEpKMFBWH2csMnzDvhBZEJ7yoKFl5fgvBTUp04PUTCOS7i/H375zryL4JhvLiCRZGO3Ius7hSvbfKoSMmK8sNB8Qp5LnNiXLquViYr5lv/IMjod8S43tTze5m0wyphAi3ys+Syk4qimdjcCEnYq5m1Rv9Efium+LLj+5IRlgHHSoezP+CEpjRQOUasoqsJE3tmUt51tCH/16yihFH6iV+psDBJevALXHuLSHbU1tJkEpGacKiE6Qqpw0CZoaLDbchyJLqq6upXcDnmz3J15/ZRk2abpkfclGtpwOKh8/ftb/gPfAEyhrPE7GUDn2C+lrEfe1outdOPak/9/ST1Lntn4SWMi6uPMXXcF3pQOIquyczoqrHoU1nzRO6dlPeSlwkZ/nJKSySflkeXXEVznIL2jhhaHwjFm6tjX/eSWGesFncdXmRFEiA6vYjVE2DXF0VtAhT+imXDSj6rmq/GLQUkfL8WCg8PbPCfLSHoTeCWo/q7RhOR0h6qgHqUz0ZNr6sE9OKcAxN4dFQJXkUc1pNE9aJKuxlQCwhIR/2hAyueL7Hy24VfDe4khOZkhizy4TmNM7ayb51vk1mZp4Q/K1kH6m+Q0O0mPPHwYClvMgrWgVQYo4KoE8iykNYm9VxDh5sNxW+2u8NQkx11oTxAQcI1AVpHtXca7I/7/blSPSjQc5osC9ml1Jlc6F25fJj0IG/aUisqh2hCUfeI0CkZ3ouPuJ045IQyNjfvXIvrZUfwP2Y3mPNV2q4tq7IBZztBk7tbJsFLNRYE/Vn/4ySytl7VKQd1jFQYr90Rfh18wudhMho7APO0qD9RpFNAstd6pWXYhL5vt5vtDtnSxxtw+aD57a8k7ct4Aj+IglhyK0+ZndGoA4GsUbsqYPbsasljIqHfvpJmm2NgALjEkkL6P9yMNpfK3/ThDuhgRZmKpuGLPITP/nQnsYCdeBqFkF7m5yjSXSxnL5dfeuAaUpkiYaZyMeWZUE1NtrfMBcSTFAsOkpNnM7F/xqxNpD2SAYU9bPBEDR0X60hsIgIQngOtcBrwixXhpwyOO031pTZxTVQgZ9hBNwWzvxtUtk/ODAMmGACJet+vrKCwrLy9MtJoIzKKHVJ/jL4vVs X-OriginatorOrg: digi.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0afde38e-faf8-4af3-dd23-08dcc63ddc46 X-MS-Exchange-CrossTenant-AuthSource: DS0PR10MB6918.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Aug 2024 02:13:37.1613 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: abb4cdb7-1b7e-483e-a143-7ebfd1184b9e X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: KHRoYkkjZ1wYoXVVw94d5adYHnuX+IDbbCxqjrEEsOtwXM8quj5RYYsTomwbI/4yvgEHM2iV2fBLW9v8sBUSSw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR10MB7432 X-BESS-ID: 1724724818-111422-9544-67356-1 X-BESS-VER: 2019.1_20240823.2008 X-BESS-Apparent-Source-IP: 104.47.56.42 X-BESS-Parts: H4sIAAAAAAACA4uuVkqtKFGyUioBkjpK+cVKVkbGloZAVgZQMDnRxNjEKNHELD nJyMjAzNIoLc3CxCgtMcnQMtXIyMhMqTYWAAvNyLNBAAAA X-BESS-Outbound-Spam-Score: 0.00 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.258621 [from cloudscan22-34.us-east-2b.ess.aws.cudaops.com] Rule breakdown below pts rule name description ---- ---------------------- -------------------------------- 0.00 BSF_BESS_OUTBOUND META: BESS Outbound X-BESS-Outbound-Spam-Status: SCORE=0.00 using account:ESS112744 scores of KILL_LEVEL=7.0 tests=BSF_BESS_OUTBOUND X-BESS-BRTS-Status: 1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240826_191346_170824_740C9B1D X-CRM114-Status: GOOD ( 11.42 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add a node for the LS1046A's pinmux controller and related pinctrl properties for the nodes using the gpio and i2c functions it controls. Signed-off-by: David Leonard --- .../arm64/boot/dts/freescale/fsl-ls1046a.dtsi | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi index 200e52622f99..d2286fd6f972 100644 --- a/arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi +++ b/arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi @@ -350,6 +350,29 @@ extirq: interrupt-controller@1ac { }; }; + pinmux: pinmux@157040c { + compatible = "fsl,ls1046a-pinctrl"; + reg = <0 0x157040c 0 4>; + big-endian; + + pinctrl_i2c2: pinctrl-i2c2 { + groups = "L4", "M4"; + function = "i2c"; + }; + pinctrl_i2c2_gpio: pinctrl-i2c2-gpio { + groups = "L4", "M4"; + function = "gpio"; + }; + pinctrl_i2c3: pinctrl-i2c3 { + groups = "M3", "N3"; + function = "i2c"; + }; + pinctrl_i2c3_gpio: pinctrl-i2c3-gpio { + groups = "M3", "N3"; + function = "gpio"; + }; + }; + crypto: crypto@1700000 { compatible = "fsl,sec-v5.4", "fsl,sec-v5.0", "fsl,sec-v4.0"; @@ -537,6 +560,10 @@ i2c2: i2c@21a0000 { clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL QORIQ_CLK_PLL_DIV(2)>; scl-gpios = <&gpio3 10 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + sda-gpios = <&gpio3 11 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + pinctrl-names = "default", "gpio"; + pinctrl-0 = <&pinctrl_i2c2>; + pinctrl-1 = <&pinctrl_i2c2_gpio>; status = "disabled"; }; @@ -549,6 +576,10 @@ i2c3: i2c@21b0000 { clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL QORIQ_CLK_PLL_DIV(2)>; scl-gpios = <&gpio3 12 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + sda-gpios = <&gpio3 13 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + pinctrl-names = "default", "gpio"; + pinctrl-0 = <&pinctrl_i2c3>; + pinctrl-1 = <&pinctrl_i2c3_gpio>; status = "disabled"; }; @@ -626,6 +657,11 @@ gpio3: gpio@2330000 { #gpio-cells = <2>; interrupt-controller; #interrupt-cells = <2>; + gpio-ranges = <&pinmux 10 0 0>, + <&pinmux 11 0 0>, + <&pinmux 12 0 0>, + <&pinmux 13 0 0>; + gpio-ranges-group-names = "L4", "M4", "M3", "N3"; }; lpuart0: serial@2950000 { From patchwork Tue Aug 27 02:15:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Leonard X-Patchwork-Id: 13778725 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 36589C5472D for ; Tue, 27 Aug 2024 02:16:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-Type: Message-ID:Subject:cc:To:From:Date:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=IqhynpYRRE7X2CET7lJCGsJUE9ItoKxdurxCcIj66m4=; b=Qnnxsc6BCVswToEjunaBXZfRk/ 75pG0SVFJgtVjiU3MckNsCpdJbBSfvW2PfrQTJ7u8Nb+hsT5tVpZp6SNb0njUTxnILtJhBtTnJMQs NjuU8TavVqnK0Qy1/CAoWGzu+q4SaXxCHhojEzbTK/63Zs0ENaf/hG+yKyWD6p9R5F9fBLOWztoDC RD9khaIPRr5rMYgTC0PTVVam8SCkoCgpvY53V2zTdBAc5t4iu+Iapk02Piox9Ed/yBE4vyQu7tVVk XAvJldYB5OdvXpHXqRmSEEq/O5Nd803MknXqAYsUt0ihhdojqASeDRCW5dleZUGmYeHCw8PIn05Bg w6CwfvQg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1silkm-00000009Qbz-2xcp; Tue, 27 Aug 2024 02:16:16 +0000 Received: from outbound-ip8b.ess.barracuda.com ([209.222.82.190]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1siljz-00000009QVh-1ZfX for linux-arm-kernel@lists.infradead.org; Tue, 27 Aug 2024 02:15:29 +0000 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11lp2172.outbound.protection.outlook.com [104.47.56.172]) by mx-outbound19-31.us-east-2b.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 27 Aug 2024 02:15:17 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=egAzxOel6FT5YUpRWgSa52Ne5Aunn+HyxN3NUcvKkNAUd0rcvz5JJwmqaZ2q2o5ubGgTruJVWyIAhZ/yaWNte9YNX/kdZSxEXPW7PYLTG/cOn43qXX09n0Rb8yzPcPQjskJ+GZuVx0wXfsWKu0xfleKS6Ad2G6nVEF8ddYQoOWUjLEYquGy64TwcHORf0jj68vjjokyRpnfY7KXFBIKnZiEGpzo7hnvSxjl0r6PZSdDpJJh9/tcHPZLFN/jTg3Muf/A3RiaD3IlUSnej8oOw2efjXv/IDX4a4b+QjT7ZbV1cfEnYg74BymcId0lBa/R39bk8pB3RiDeCSkdbuH/6WQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=IqhynpYRRE7X2CET7lJCGsJUE9ItoKxdurxCcIj66m4=; b=uiyrXipZeVxY6qWv3ozsUv/evqdvNSsc3lEmFgZ7PsOPMJoMh3qBG6VtVQyDEeLocMh4DM2SIwqOubeLhYcE7AqshyIWFhTVqhJ0bZ98g3W9Dfzqmf6s0TjKuR1DbBli1wmsm55a9gVL1Xy1NNO4OhwQYu4jtQ4Mm3qBB16LH+/rlSUczLs5o1CGMRIVPXVQpUjva/WeJUbYIhcHFxUhWpV+kqHg0vM11ApBXmNxLZ42Lnz/E35PgJxjcyt4hxpeQeHeu4Yhg46KCEpYO6Ln0MGwgM2jxrCzKTSiyN1abRXS1NM/yeZEblQ828QkzStYeMwvXcxaNLUHR3Pn9fQ0EA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=digi.com; dmarc=pass action=none header.from=digi.com; dkim=pass header.d=digi.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=digi.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=IqhynpYRRE7X2CET7lJCGsJUE9ItoKxdurxCcIj66m4=; b=R3B+Ozve9Ewqnb1gzbIklBvXhoanjWjRIAh37hraK6i6UfauFQ3rSfhf+2xQ9abuQhEX5T3BOl70tsKD9l9E/PnBFo/YldtblprV7bTQrvIKRSW8//BsWSq2LI4/17uwrNv5qXHXYSme7Uno/CUWuQB1Dl+Y2N+kES1DpJt0jPApmUmr/pFIQE9KGdId11ZItH9Tin6EUP7sCupmvnqA4KU3JbS5ib74kpqpLdy5uaL/PxGfbH7fDER9HNdnPk7NIHYKX3loZMX2NVu0Ovjahbkxo0mazNjxJ6JBuKKXz1z3d6bhQmNrETDAhiEue5PrIHR3W7GMLNwtVRe7o8HDRg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=digi.com; Received: from DS0PR10MB6918.namprd10.prod.outlook.com (2603:10b6:8:136::8) by DS0PR10MB7432.namprd10.prod.outlook.com (2603:10b6:8:155::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.14; Tue, 27 Aug 2024 02:15:15 +0000 Received: from DS0PR10MB6918.namprd10.prod.outlook.com ([fe80::3697:c0ef:caee:24ae]) by DS0PR10MB6918.namprd10.prod.outlook.com ([fe80::3697:c0ef:caee:24ae%5]) with mapi id 15.20.7918.006; Tue, 27 Aug 2024 02:15:15 +0000 Date: Tue, 27 Aug 2024 12:15:08 +1000 (AEST) From: David Leonard To: linux-arm-kernel@lists.infradead.org cc: Dong Aisheng , Fabio Estevam , Shawn Guo , Jacky Bai , Pengutronix Kernel Team , Linus Walleij , Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 6/6] dt-bindings: pinctrl: Add fsl,ls1046a-pinctrl yaml file Message-ID: Organization: Opengear Digi X-ClientProxiedBy: SY5PR01CA0033.ausprd01.prod.outlook.com (2603:10c6:10:1f8::10) To DS0PR10MB6918.namprd10.prod.outlook.com (2603:10b6:8:136::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR10MB6918:EE_|DS0PR10MB7432:EE_ X-MS-Office365-Filtering-Correlation-Id: 7c46372e-ed22-454f-dc30-08dcc63e170a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|376014|7416014; X-Microsoft-Antispam-Message-Info: dXn9oCNJou5j9E1oEoMGwDuwAQpPTEQFbb9HD/Xkbs+SZZ/vzHy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H/kkl9r39aKLEX8DclnrxoNaUNOY8yXa7CVibf8L5V5Ym+OissSZLOXbVVjTsi/hyfKAuP6+2x+tcttytq0f+TP4JIvNcahhOGg2dE4xSi1k9dQO7HJctdd+9DrGVrGRR5Y0GeHqPK0tkd74Js5c/bZc/zOgF1IyHu90RFhGP04TXzYJlGQLjSmw= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS0PR10MB6918.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(376014)(7416014);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: QLQSmktRHl+VXls7ApzILvIUNnSruT9jeDIOWpzQGpJSgFgAaY7Ifoe2XfGz7bQMmmNwPyeIDIhGglW6h6d5aEjYCRqahoISpZl7PUdFtBhk+svoTCj3MMNoeF6LRA5f6E52NBrg4OaVq4v+v2ovTDRfiwN6V8a1QvK+FbZJ29LlhKFMJN98VTSNNhSeUFGmuBePoVphwwAq2hgoeltNvXSErDECHlDnmeau7RkVnantm5mlknJRZnJuPATI/IUSYGKO6A+7odSRLviKmlqoOnqAycBnUiopcHTFPYzO9vovLHtkp7EX/x/XNO0miPnv2Ij2B9hun3mXIT32s6PuL3dZPBB/zubvrbS5DuJuPr1/6Khmj2cXxcvqSJSLBE5wuMFQ3cbRAgrYlZhiySfDVI3GfvJbmywxaAGMGmt//gIoFpzhrJxzpWnwuj6pJak8O5iTPNApnX+b3d9fQrgUgz0x3zWK/+yxBiTBoJuqFlFcvqkecX7KoFm22j1T+3mZjgXwIuIeCh5fV4+mHFClxwNZ98EhVcfA3rbe9bzOSLhOrs93FMYcXW9Zyaw+2JjBGzKDMlx9YCErTuD9wrkQwo7atVodXq5APiaLcT+dUabRxhjZsHcijgEBUAFZxgMRk/zfXrAJibAN1edfePHO4Y7xbZ6ApLhJP2YIP6wmnyCfrqhB0sywQR2ksoS2JUBcTdW3BVA9Hy8AtbVOFiCZ8UafZa2iCfFCyPp+T8AdVog0ElJxcBJy4plgNLzUOfV/LVXnW30rOA8kJ04KQfunom+dB5DbCBcfvc+U34Qd2dzdkFArcAvI1nXruRb6i+PwLr3fAQsDVnZT9oBcArm7r3bvwVcqAse2iWstxdvpwtWMx1vNFrkDAC/JWtR0gvcpISffT7nLPoXjfORxTit48Zb0klv470oADg/+GgUCakDk7PW9RAldvCKHu6drn6RFkcqEFKc7MvylpG6sczD8N9ALDT7yD1Fe9vqYQHX269wjLTLp7EAsTj9cPxBPTer5P+n9biGo7F5F2WvsHp+7BWR6h+Bz1MUGusJlvZDs8HtcZFItL2fmO3xVxwshdbUl6EfmFbZ5xNPEwrJJ1EEQWpxl2/xwCUUzsIiL6yAt431XXpzOSR5b9dHAJLxyt5CPlihESNatCC5rFzAuubfTqwMWYkCKpQQlR2JFzjSzseXPJdpjB8+mQyAUmMa7Rc3qQmnCSppbAbMmNCP+3y3zLvKl4eek1oBszQFRkV0ynzGXCCpJABVrPnQgihAJTEHSdYQJBRXA7XuFvcesMjHuxJH7pVivl7JOI/mRjOBCTwlT2Xeg/I1VMIOuPgcsfcGHX3v4UARCc6WDrTmCucqjGmlHIX8j4brqwNt4cq6jzwus9IMRfukl9bbKxE2NwTpRzT1ZTX/8pBNKApnCWjhmue35nGFvzbuyLfUeAr1+wNaHCsDyIPUcVLrM9WPsoL5r9TvHdsZubO25OAZRkhuHn+Q0AoRnysOVkfzRYj7118BfNM5tNEwmUifsjBadpijPMKY5CPmKF/3aYXGuHIisfKkoqGtD4vwTy+jK/yZ9M0lVZnfpsZm5HBBt2XqDqqj8FJWe+4zBeKXbehzdcDDqfC/VQ2PlfpbAnkE5eCGOllZCwhCXTDeb5QqJmvDaZV6Q X-OriginatorOrg: digi.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7c46372e-ed22-454f-dc30-08dcc63e170a X-MS-Exchange-CrossTenant-AuthSource: DS0PR10MB6918.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Aug 2024 02:15:15.7520 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: abb4cdb7-1b7e-483e-a143-7ebfd1184b9e X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: vuWVDiLrfnjO/vbzzALPdPFLgRImapE8fr91590mzD+n9fg73sxIAlCjoHthOK/ujFVbbmAfYIsFf2kJAVuDjg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR10MB7432 X-BESS-ID: 1724724917-104895-12632-22242-1 X-BESS-VER: 2019.1_20240823.2008 X-BESS-Apparent-Source-IP: 104.47.56.172 X-BESS-Parts: H4sIAAAAAAACA4uuVkqtKFGyUioBkjpK+cVKVkZGxmZAVgZQMNkkzdwkxdLE2N jC3NIgOSnR0jTFKC3R2NLQ0NjI0jBZqTYWAIH8GeFBAAAA X-BESS-Outbound-Spam-Score: 0.00 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.258621 [from cloudscan9-54.us-east-2a.ess.aws.cudaops.com] Rule breakdown below pts rule name description ---- ---------------------- -------------------------------- 0.00 BSF_BESS_OUTBOUND META: BESS Outbound X-BESS-Outbound-Spam-Status: SCORE=0.00 using account:ESS112744 scores of KILL_LEVEL=7.0 tests=BSF_BESS_OUTBOUND X-BESS-BRTS-Status: 1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240826_191527_581995_33A4CCDA X-CRM114-Status: GOOD ( 14.18 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add a binding schema and examples for the LS1046A's pinctrl function. Signed-off-by: David Leonard --- .../bindings/pinctrl/fsl,ls1046a-pinctrl.yaml | 74 +++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 Documentation/devicetree/bindings/pinctrl/fsl,ls1046a-pinctrl.yaml diff --git a/Documentation/devicetree/bindings/pinctrl/fsl,ls1046a-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/fsl,ls1046a-pinctrl.yaml new file mode 100644 index 000000000000..3d49e42d33e8 --- /dev/null +++ b/Documentation/devicetree/bindings/pinctrl/fsl,ls1046a-pinctrl.yaml @@ -0,0 +1,74 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pinctrl/fsl,ls1046a-pinctrl.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NXP QorIQ LS1046A pin multiplexing + +maintainers: + - David.Leonard@digi.com + +description: > + Bindings for LS1046A pinmux control. + +properties: + compatible: + const: fsl,ls1046a-pinctrl + + reg: + description: > + Specifies the base address of SCFG_RCWPMUXCR0 + maxItems: 2 + + big-endian: + description: > + If present, the register is implemented in big endian mode. + type: boolean + +patternProperties: + '^pinctrl-': + type: object + $ref: pinmux-node.yaml# + unevaluatedProperties: false + + properties: + function: + enum: [ i2c, gpio, evt, usb, ftm ] + + groups: + items: + enum: [ L4, M4, M3, N3 ] + +allOf: + - $ref: pinctrl.yaml# + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + pinmux: pinmux@157040c { + compatible = "fsl,ls1046a-pinctrl"; + reg = <0 0x157040c 0 4>; + big-endian; + pinctrl_i2c2: pinctrl-i2c2 { + groups = "L4", "M4"; + function = "i2c"; + }; + pinctrl_i2c2_gpio: pinctrl-i2c2-gpio3 { + groups = "L4", "M4"; + function = "gpio"; + }; + pinctrl_i2c3: pinctrl-i2c3 { + groups = "M3", "N3"; + function = "i2c"; + }; + pinctrl_i2c3_gpio: pinctrl-i2c3-gpio { + groups = "M3", "N3"; + function = "gpio"; + }; + };