Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp850450rwb; Tue, 29 Nov 2022 06:11:52 -0800 (PST) X-Google-Smtp-Source: AA0mqf6X2AK/V0VLgiA0nrqmwROPuzAb7TZIjeJPV/oN1cRM+okKGl8b7Il6/2wn+vRJqLYiZoUB X-Received: by 2002:a63:1a55:0:b0:477:4ba4:c278 with SMTP id a21-20020a631a55000000b004774ba4c278mr32891607pgm.482.1669731112401; Tue, 29 Nov 2022 06:11:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669731112; cv=none; d=google.com; s=arc-20160816; b=NIzuMQe40Zl+S/VVzvE5M+oTIj4eIAQgmowtQ1cvS3x6ix+ke6Xzpc4rZ/eA9jk3Q4 4oJ3yMu0tURxRVjeljKtSIzhs0doejLQlcYruHCoBEfmYulOF9ihsd30cBcttINbZJyU haDkJCkiTRSiBbJ/rFv5plRHuvzhxTEz+CV95Ux3fFjZ67TsB9/SCEy4tHwNRyFDT+14 7IqkkE0I6rq/jmVwwdjwqO/YdtMpbFG9TXO4Stb4ueR2vYWmqu56zdwliRQJAUplG/PE 2tHbBOhDFnrIDHCPKPXkGQsAihNL3VRJRmrvoaBwL0VcYVTknIJ3lYrR7LsgJ+TRejyl jtHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature:dkim-signature; bh=bpKLT89bAqIFw7A8vMPMGL+OzHZcolGvYqS8fV4b+J4=; b=qM2vQ4FgBh36+19a5/IID5JDtjNsSNRBMDVWsSryBT3STlLodez+QYysTGm5bZtBAk Q05VA47YhcRXNUJy+v5AbfylvbPljWuX1FKzL4JGZiOyDO25a5KiwexK5yuk6vtdGWar +ktIwjyd5YzA7eSTWp8z9dJ6G/p1hWLfX0/RETY5JqLJCTCw/sZAAJNLm+qW4cI68axr TXXkRyY9LnheiBP46e1t/kUc0L40MEiy+68gvpHno1ep0tsmC9QucBaprAkJHUvVxgJX DXZe6kUIrLfZp6+bmr5XcQGytlvSyESlRYgNDxfcqmldg5VVl7BvKcCEViTUcmeLPK0/ 2FNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=Hb0yxkfQ; dkim=neutral (no key) header.i=@suse.de header.b=3zKSd089; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s9-20020a17090a760900b00213945884d5si1556169pjk.126.2022.11.29.06.11.40; Tue, 29 Nov 2022 06:11:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=Hb0yxkfQ; dkim=neutral (no key) header.i=@suse.de header.b=3zKSd089; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231225AbiK2OA6 (ORCPT + 83 others); Tue, 29 Nov 2022 09:00:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233851AbiK2OAz (ORCPT ); Tue, 29 Nov 2022 09:00:55 -0500 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0CAB0429B2; Tue, 29 Nov 2022 06:00:54 -0800 (PST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id ACAF61FDEC; Tue, 29 Nov 2022 14:00:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1669730452; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bpKLT89bAqIFw7A8vMPMGL+OzHZcolGvYqS8fV4b+J4=; b=Hb0yxkfQ7isRJHgS2FEn9/Yb3GKtqRiVg3rnfSQyAOWWARn1N9zCOJlV+cmpWzycmIxig0 ZgRLvEKG/xTlBEroL9hX7r5/5JsNB1TNYmfEw34k8aa60Ke8XFQrWNBdhHpG5mLUuAcNF1 e4DqfsxulmgtzWAWCeaHD75J9ZQPFUE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1669730452; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bpKLT89bAqIFw7A8vMPMGL+OzHZcolGvYqS8fV4b+J4=; b=3zKSd089fZWXd7pXvDLVQm810JBo3TM1kCmyCqZ9tQYE6tKq5RLAKRqYjgmi7fVYLJhGzg wC2igzMNZVs4LrDQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 91DDD13428; Tue, 29 Nov 2022 14:00:52 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id huEtI5QQhmOOQgAAMHmgww (envelope-from ); Tue, 29 Nov 2022 14:00:52 +0000 Message-ID: <6d328461-d705-9e82-ccf3-dec8885f17fe@suse.de> Date: Tue, 29 Nov 2022 15:00:52 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.0 Subject: Re: [PATCH v2 1/2] dt-bindings: pinctrl: add schema for NXP S32 SoCs Content-Language: en-US To: Chester Lin , Rob Herring , Linus Walleij , Krzysztof Kozlowski Cc: 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 , Matthias Brugger References: <20221128054820.1771-1-clin@suse.com> <20221128054820.1771-2-clin@suse.com> From: =?UTF-8?Q?Andreas_F=c3=a4rber?= In-Reply-To: <20221128054820.1771-2-clin@suse.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Chester, Am 28.11.22 um 06:48 schrieb Chester Lin: > 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-...". Thanks. > - 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) Any reason the code is GPL-2.0-or-later but the schema is GPL-2.0-only? > +# 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. SoC family > + > +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. Does this multi-paragraph text not need "description: |" like above? > + 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 I notice that neither this patch nor the following one introduces a dt-bindings header for these macros? Is the plan to only have them in TF-A sources? Thinking of DT overlays for SoMs, for example. Regards, Andreas > + > + 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 = ; > + }; > + }; > + }; > +... -- SUSE Software Solutions Germany GmbH Frankenstraße 146, 90461 Nürnberg, Germany GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman HRB 36809 (AG Nürnberg)