From patchwork Mon Nov 28 05:48:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chester Lin X-Patchwork-Id: 13057044 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 8E7C6C46467 for ; Mon, 28 Nov 2022 05:50:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=2kAxrpFi+BFkvbBL7uIJUA7Ti+5Aj88laQ0GKSRpZ38=; b=srGg/H5e45OSLc 0AlofXpqZP/6GPMacla9xDBc2odE7NiWtcKDuuNB5WULKTnBIhwu1V6y4YpPEusn9T4jA168rKrMC NBshkXBoakBb9nLlKD83tHiOup4KZJbnCwnEjHbqhIio3OMqoqYrJNeln8WXeXQmnA1ivIUsZBb9T xzt4La42j6VZDcaic6LthYnZ7+W6CKYKGFNNwwd6zv6t2G5PJEsLjRL7ctHnd6QupuPNn0qwdW8cH Bz41CmZwpbroxypPJWyMk1MJuHq8pLlvUZcBUHWKz1S3fFPxrhLwv5H1nybzdqRJYUhxezO9qOLOT eGDhRLzc6EL3x00MV4nA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ozX0r-00GTOo-3T; Mon, 28 Nov 2022 05:49:05 +0000 Received: from mail-db5eur02on2060f.outbound.protection.outlook.com ([2a01:111:f400:fe12::60f] helo=EUR02-DB5-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ozX0f-00GTHd-TA for linux-arm-kernel@lists.infradead.org; Mon, 28 Nov 2022 05:48:55 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ra0DNn47z44Dda5HaApPtOnPTKwtDSxk7LWpAPPBMJ/MeLa7kIPA/Tsgm+y4MCO9nrjlzV3gPB73BSFTiKKKUPbMG3tFzEx9KkXt1t7K4UEAD3+u/j32STW9WoqxaH5Sxh0ZaP43eP8p+/h6gQzfCRDyMohsOAkXQE6WrHudpl8hmgJzc75pQTucn5fvHSFr4wz2oqRUVX5VQi9lT2+vfdFiPMqpERMrpMF3CeLqrIhInhTtKbbKMZwX7jI96ESIvHi6c0Jnr/W1FJWAhWOnYm9SUruJvcOMYqEvQul7+9IxVClplUizpbX0yOAkHOvCFwKLENftzyOs6YyK/oR6Ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=NKootHdzoY9t+MnBDuNh8njB/oNRECpNI7qyTn6GUSg=; b=nvBFGqXrJ4rdiEoDyvUn57ET4otJDF0AUieDi8E5oqWYioSPz5JC+1yRCk4zTo+dNkP6lLMFOp/+agyyzhngefQhhCdJ7+4LhhXBmOrYJeOZqHw+0A6qq4PlFOioWDvStzW0GNHBpWEm1F9b4g8IEEJX5PmZIvN7noHkJlfou9iEbS2UEDNBQxhwo7/pDxwP7r83jdtEHGlqqYJb4NkGwsZZrdlrUowvsuL/y+kDyOBNETJggo3zjsGe5SHpBMeE3NgqP8fR/jClJ+bxQw14P5NRW33GQwszPpaSLwviM8h1WwGmB3OltfWVpfr3/xCxu5zy++IVkuvRGgwE7M0mfg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NKootHdzoY9t+MnBDuNh8njB/oNRECpNI7qyTn6GUSg=; b=zMj6Yig0U7tP7b9nkCB9U56K2gKZuonL4X73UEJFzjI2bu8xoUQIbFZeTlmyStCF8MXDP9TPgedz/1/bguzRdUz4kaLV8aqnRELlg8CehHH9lgmQplKTecQMamaUspsoxc8d66A1ER35g6sSG+60Jhpm4D2olcfDI6qUQkff1GWP60zNNTjaoMkUBFM/HSpq0/yoWATw+EOXSB98//dI6XtPb5MLipWNypUv4h7+zVfKLQkJ0UtL1lUYmQiR1Uy6mICZOb8ifAnGEsDfpOWuGaIHP213qgYaF+tMw7Wpq14LbcHrX/5LfcfW+3Qgn2P19227Ny7x5JX/b1gL2ehedA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com; Received: from VI1PR0402MB3439.eurprd04.prod.outlook.com (2603:10a6:803:4::13) by AS8PR04MB7829.eurprd04.prod.outlook.com (2603:10a6:20b:2a7::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5857.21; Mon, 28 Nov 2022 05:48:49 +0000 Received: from VI1PR0402MB3439.eurprd04.prod.outlook.com ([fe80::28d6:1b8:94d9:89f5]) by VI1PR0402MB3439.eurprd04.prod.outlook.com ([fe80::28d6:1b8:94d9:89f5%7]) with mapi id 15.20.5857.023; Mon, 28 Nov 2022 05:48:49 +0000 From: Chester Lin To: Rob Herring , Linus Walleij , Krzysztof Kozlowski Cc: Chester Lin , s32@nxp.com, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Larisa Grigore , Ghennadi Procopciuc , Andrei Stefanescu , =?utf-8?q?Andreas_F=C3=A4rbe?= =?utf-8?q?r?= , Matthias Brugger Subject: [PATCH v2 1/2] dt-bindings: pinctrl: add schema for NXP S32 SoCs Date: Mon, 28 Nov 2022 13:48:19 +0800 Message-Id: <20221128054820.1771-2-clin@suse.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221128054820.1771-1-clin@suse.com> References: <20221128054820.1771-1-clin@suse.com> X-ClientProxiedBy: TYCP286CA0137.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:31b::15) To VI1PR0402MB3439.eurprd04.prod.outlook.com (2603:10a6:803:4::13) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VI1PR0402MB3439:EE_|AS8PR04MB7829:EE_ X-MS-Office365-Filtering-Correlation-Id: 84060feb-66f5-49fa-355f-08dad10438db X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kvaHHMo6kJbFpw52VMLEKBzAJ3r4ugyVaXeLFE5njCKDCgdXOY5IRPCuKLQ4y3KA8Cl7yw03W+AhZ/rb1FqnkVCVxIpdV8sJ6tWb1FjnBk6gcwOPc7aiJOPsRe3Bo6+1DPYsI+2+8KOKFAIogW0m94Rg70cnHJQhdBiKS22s6Uoy9X/kSCvbCT3VjUiHsy0gb7IZtWonredlOTZbgU/EVLxramJueUVUTahQpoJcoZfNfntOZOwI1lJ2w8itxN9WXVQ98+FNTInKMycD12MrJUX0fAZ1dMdlMjwuPdEb4y6vG5V9wq60xwVz5yjkBFFZzdmV5jDmijArhszqZDDbFWBJ0upIH4Gn1GAXbextOdUxKYlutPkyFyu0Tudm1VhXGJJDveQx/vy7PC5xpZ7ZcKBEWpyt4nhk6MMD/tBee8gbr2sUONnwYkgvydo+mnxqyce2LRFD3NX20Yjw+SjlA3sL4ByqFWloMiVfLK0QBVeYQWHeUAeh5QfxALVVlfBo2yN6MdgSi1BH1FlwStBB97PASQiTJHsrWj/jmrfkZTZjgdiCz5PX/escbL3NFMs7ukaJzYaGArydlo8lFd+l/TXu3Gpi8NIE5ngm3gf53Iat297rN7Kr0lCVvgcJLOyLNijS8JNyDUxj+LfkYOGMeF7Gfj92JnT2UpegfSq8ZAc= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR0402MB3439.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(6029001)(39860400002)(396003)(366004)(376002)(136003)(346002)(451199015)(86362001)(36756003)(186003)(316002)(1076003)(54906003)(41300700001)(66556008)(66476007)(66946007)(8676002)(110136005)(107886003)(2616005)(5660300002)(6666004)(6512007)(6506007)(4326008)(478600001)(966005)(6486002)(7416002)(8936002)(38100700002)(2906002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: dc1SozxD8dNeu/sQUa78O8BQ/zBpXmVdsyqG8ASsMji/M2RqtWQLTr9q8srDUiSycd5kipwRVITQiXOAQ23oJr+8nWbMRC0LBQG8z34KtFG36Z0XfvlSmlkQBxjV9DHujACQOE6PKER6Oyzk8PPaGU1tAo3TozkGgsSshvu0+BFpmvaRt0oZA8cmZmnCFQgH7noG+CNOhd0AnG0Bb8VBc2LrI3X9sXPs32bflNBlwmISvPhae8+jvJr2cCbkwHJpX2J/DMe1cxiuk40qIuW4oYQA37M8OO4bpG8QR83Ye3gpODEzxaOvZ5Cng7unrprSV/AE8UmELqK55cS07UXKRtDrOV5250GiuGQUxb/XVabttIJiXzQD8+kH1MBjS+UC49avMh7MFg1UySsbIdvvyElOSinuTKoOFZV/EIO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E5JsHhfton6t1+sk5MPgVaW3kWlZ4jY9PWtkpHSrEEz2mRWpJfPidHwRvWKQo+rxGdwpO6LFlpGPsneQTg9iRQFO7eeP93BhTNDJ1CVLEwxt/mcZieDPVshX4A4GsABiIDEB6k+abebaUDWjt5VSqmo+Ezmh1Olm X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 84060feb-66f5-49fa-355f-08dad10438db X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3439.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Nov 2022 05:48:49.3904 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: /i/ckeyvXOtBJ5cEUdhsead4h0xqmT8iNJWOvXigOUphV7O4vCpQdGm7Sf3bv7w6 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB7829 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221127_214853_993556_5BF95AAE X-CRM114-Status: GOOD ( 20.38 ) 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 DT schema for the pinctrl driver of NXP S32 SoC family. Signed-off-by: Larisa Grigore Signed-off-by: Ghennadi Procopciuc Signed-off-by: Andrei Stefanescu Signed-off-by: Chester Lin --- Changes in v2: - Remove the "nxp,pins" property since it has been moved into the driver. - Add descriptions for reg entries. - Refine the compatible name from "nxp,s32g-..." to "nxp,s32g2-...". - Fix schema issues and revise the example. - Fix the copyright format suggested by NXP. .../pinctrl/nxp,s32cc-siul2-pinctrl.yaml | 125 ++++++++++++++++++ 1 file changed, 125 insertions(+) create mode 100644 Documentation/devicetree/bindings/pinctrl/nxp,s32cc-siul2-pinctrl.yaml diff --git a/Documentation/devicetree/bindings/pinctrl/nxp,s32cc-siul2-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/nxp,s32cc-siul2-pinctrl.yaml new file mode 100644 index 000000000000..2fc25a9362af --- /dev/null +++ b/Documentation/devicetree/bindings/pinctrl/nxp,s32cc-siul2-pinctrl.yaml @@ -0,0 +1,125 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright 2022 NXP +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pinctrl/nxp,s32cc-siul2-pinctrl.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NXP S32 Common Chassis SIUL2 iomux controller + +maintainers: + - Ghennadi Procopciuc + - Chester Lin + +description: | + Core driver for the pin controller found on S32 Common Chassis SoC. + +properties: + compatible: + enum: + - nxp,s32g2-siul2-pinctrl + + reg: + description: + A list of MSCR/IMCR register regions to be reserved. + - MSCR (Multiplexed Signal Configuration Register) + An MSCR register can configure the associated pin as either a GPIO pin + or a function output pin depends on the selected signal source. + - IMCR (Input Multiplexed Signal Configuration Register) + An IMCR register can configure the associated pin as function input + pin depends on the selected signal source. + minItems: 5 + items: + - description: MSCR registers group 0 managed by the SIUL2 controller 0 + - description: MSCR registers group 1 managed by the SIUL2 controller 1 + - description: MSCR registers group 2 managed by the SIUL2 controller 1 + - description: IMCR registers group 0 managed by the SIUL2 controller 0 + - description: IMCR registers group 1 managed by the SIUL2 controller 1 + - description: IMCR registers group 2 managed by the SIUL2 controller 1 + +required: + - compatible + - reg + +patternProperties: + '-pins$': + type: object + additionalProperties: false + + patternProperties: + '-grp[0-9]$': + type: object + allOf: + - $ref: pinmux-node.yaml# + - $ref: pincfg-node.yaml# + unevaluatedProperties: false + description: + Pinctrl node's client devices specify pin muxes using subnodes, + which in turn use the standard properties. + +additionalProperties: false + +examples: + - | + + /* Pins functions (SSS field) */ + #define FUNC0 0 + #define FUNC1 1 + #define FUNC2 2 + #define FUNC3 3 + #define FUNC4 4 + #define FUNC5 5 + #define FUNC6 6 + #define FUNC7 7 + + #define S32CC_PINMUX(PIN, FUNC) (((PIN) << 4) | (FUNC)) + + #define S32CC_SLEW_208MHZ 0 + #define S32CC_SLEW_166MHZ 4 + #define S32CC_SLEW_150MHZ 5 + #define S32CC_SLEW_133MHZ 6 + #define S32CC_SLEW_83MHZ 7 + + pinctrl@4009c240 { + compatible = "nxp,s32g2-siul2-pinctrl"; + + /* + * There are two SIUL2 controllers in S32G2: + * + * siul2_0 @ 0x4009c000 + * siul2_1 @ 0x44010000 + * + * Every SIUL2 controller has multiple register types, and here + * only MSCR and IMCR registers need to be revealed for kernel + * to configure pinmux. Please note that some indexes are reserved, + * such as MSCR102-MSCR111 in the following reg property. + */ + + /* MSCR0-MSCR101 registers on siul2_0 */ + reg = <0x4009c240 0x198>, + /* MSCR112-MSCR122 registers on siul2_1 */ + <0x44010400 0x2c>, + /* MSCR144-MSCR190 registers on siul2_1 */ + <0x44010480 0xbc>, + /* IMCR0-IMCR83 registers on siul2_0 */ + <0x4009ca40 0x150>, + /* IMCR119-IMCR397 registers on siul2_1 */ + <0x44010c1c 0x45c>, + /* IMCR430-IMCR495 registers on siul2_1 */ + <0x440110f8 0x108>; + + llce-can0-pins { + llce-can0-grp0 { + pinmux = ; + input-enable; + slew-rate = ; + }; + + llce-can0-grp1 { + pinmux = ; + output-enable; + slew-rate = ; + }; + }; + }; +...