From patchwork Wed Mar 15 21:10:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 13176660 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 5AFD8C6FD1D for ; Wed, 15 Mar 2023 21:12:17 +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=fQ+PTkKDkcbKzzxbyzQADI1AuRvneJCVZKUKmXN0XH0=; b=JN6Qq9+UzdyYi4 eBj6WQgvUgQwxVaTf11U3GKGAwsqP0BqtDafStUXxhwaFr3+lf9SH+dpTDiBMJdyYSSeXoPhJyqKs 0zK4HeyBZemNG/mfRsZQHfiH7Xr4iOs93Pms5X+XNpHzqcQNwnkvZUiJdnwwPeS4Gck0udrn9pTwo Cq8ppjI70cU+KG62s9CV8vjQtjAc3f033n0qteyjLqA6xxLOshvgsJ/HOrzCOzjflFJrI0cW1Q9eL s9tBvGq3X/r7brZk6UfrITiBoINGZvXMTZGcKAPlH5lQbqMv8uWKH8gkH9RIOO8QDAwBVjznvNdZp FBRVMax/QumjS5Nfvmcg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pcYOq-00EQmy-1c; Wed, 15 Mar 2023 21:11:08 +0000 Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pcYOl-00EQkq-1s for linux-arm-kernel@lists.infradead.org; Wed, 15 Mar 2023 21:11:06 +0000 Received: by mail-ed1-x52e.google.com with SMTP id z21so15378458edb.4 for ; Wed, 15 Mar 2023 14:11:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1678914660; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=WuawNslRJtsC33cN3DASsrMzq8m1GQBJdWGYFmYOzJw=; b=Hm4Jn73YCvnNFAAptrzyqMve7nU/PmLdlqQ0AVEJwPboIH0zEKaOnv8wO7gglsKXcx WX8I0FXCivA8E6ZCRvj+ONY+7poyRpgTsW+HbDAZQ+6NOPq95YIOlhSQrkcTNWzzqR7j VOEeIGZSGElSdKcekINhcDP7tY65lziwvVfrI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678914660; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WuawNslRJtsC33cN3DASsrMzq8m1GQBJdWGYFmYOzJw=; b=n/kIng7u0dwcW4hL6JvhqW8wlwpIGCxFImDGjqH4Y9niTZA0SmXKlQj4KCwDSjdFYY EVMMXQNZs0bawYQo5VUwOVTPPU+HfJR3Uw7N9nFBIHVNpbgQwhccE5VKpLueREdrplfz pgvW1XWPRUhfLvmO6+WV8Wb2wQ4snTIVKh7ZLYIqnWEy0nnFV7v38URwl+1BWJolPu2i QAcWop/eQ9zK9bHzf2IvIyvr01pMM8tTjlrtOBJYcDZ/6Uly10nw9eNcPlP/MSKWYSJG 5nossrI/ae6o33xRh/lbA4QjyXMbhJ00GidLIGNya5bAZa2Q47O0ZxIGbyhUBhtRY/Lj ewRw== X-Gm-Message-State: AO0yUKV+fJVwJt9sUv9zm+7cG8U1/d47H0pOOV2MF/e5ygci6hmietLy GMFK0oLkvQG6NGz8TlnIS22tMA== X-Google-Smtp-Source: AK7set/HsncufAKHkG0YqxX7s7PSud+PvzcNbyfIIX8XKDKEbQVS95BgIh70VhfY/KPT2TYhLvUVEw== X-Received: by 2002:a17:907:742:b0:92e:b1dd:cff2 with SMTP id xc2-20020a170907074200b0092eb1ddcff2mr5202283ejb.28.1678914659863; Wed, 15 Mar 2023 14:10:59 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-87-0-96-89.retail.telecomitalia.it. [87.0.96.89]) by smtp.gmail.com with ESMTPSA id o15-20020a170906600f00b0092b5384d6desm2965366ejj.153.2023.03.15.14.10.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Mar 2023 14:10:59 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski , Amarula patchwork , Vincent Mailhol , Alexandre Torgue , michael@amarulasolutions.com, Rob Herring , Marc Kleine-Budde , Dario Binacchi , Christophe Roullier , Krzysztof Kozlowski , Mark Brown , Maxime Coquelin , Rob Herring , Sebastian Reichel , Viresh Kumar , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com Subject: [RESEND PATCH v7 1/5] dt-bindings: arm: stm32: add compatible for syscon gcan node Date: Wed, 15 Mar 2023 22:10:36 +0100 Message-Id: <20230315211040.2455855-2-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20230315211040.2455855-1-dario.binacchi@amarulasolutions.com> References: <20230315211040.2455855-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230315_141103_616048_9DE173A0 X-CRM114-Status: GOOD ( 11.07 ) 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 Since commit ad440432d1f9 ("dt-bindings: mfd: Ensure 'syscon' has a more specific compatible") It is required to provide at least 2 compatibles string for syscon node. This patch documents the new compatible for stm32f4 SoC to support global/shared CAN registers access for bxCAN controllers. Signed-off-by: Dario Binacchi Acked-by: Rob Herring --- (no changes since v5) Changes in v5: - Add Rob Herring's Acked-by tag. .../devicetree/bindings/arm/stm32/st,stm32-syscon.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml b/Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml index b2b156cc160a..ad8e51aa01b0 100644 --- a/Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml +++ b/Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml @@ -20,6 +20,7 @@ properties: - st,stm32-syscfg - st,stm32-power-config - st,stm32-tamp + - st,stm32f4-gcan - const: syscon - items: - const: st,stm32-tamp @@ -42,6 +43,7 @@ if: contains: enum: - st,stm32mp157-syscfg + - st,stm32f4-gcan then: required: - clocks From patchwork Wed Mar 15 21:10:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 13176658 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 98953C61DA4 for ; Wed, 15 Mar 2023 21:12:14 +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=deAcTrQLDjOSq19F6hYwX5LlFa1Bjl1AP1v2Q/6Ejmg=; b=arreuZ98b5gNGn vp/LtUn9+7RuFUvk38fXkJhyN0nL0mcmCSYOp6GZVcE9Au5MjLzhDPmskdAXQoeLvIkXJfeBx3JvK RCb0RaFFjKjJvVsBvXBetDIRZ9Di7OAgoQ7ZZfLm2Kimc8oJ+cL3qZ5M/p60qgrrL+npgnSKB4BX3 Fu8ADNlpHhz3VE/iymcdPtc+oTHi152obSNXaV6VGv4PAWIqrrBO3jl5pID6eDsVFzrljMjnCshz9 elflHqIxLV03Qe9Gdf/n7ZKlN8GgpNAvDoCivGmu9PBYUn4moSSSQ5or95DSvFGUKcBU6sJ/cBru7 uByWE0PwIXaigSX5c1CQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pcYOs-00EQnZ-0c; Wed, 15 Mar 2023 21:11:10 +0000 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pcYOn-00EQl6-0U for linux-arm-kernel@lists.infradead.org; Wed, 15 Mar 2023 21:11:07 +0000 Received: by mail-ed1-x529.google.com with SMTP id cn21so50531589edb.0 for ; Wed, 15 Mar 2023 14:11:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1678914661; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Kod5siM2bcM+dDVpz/GqL4BGUBIqfHoecSZkZ5xWujI=; b=OcTQbnJsEFByoCuJ3P6wqVfwXlZxux+7GzvH/tEr5Qa9R77NpeKH3nIk4w0v54c2bZ uOVuPgHUHf9O2YEPkPorbOgGNbxgxegNPuAo1qZ8PBwgEB1vJuueTx7V6wyw44etHP22 jxHV8XLENwlNdab2K4WffBqUxLx3mbmx3o9/o= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678914661; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Kod5siM2bcM+dDVpz/GqL4BGUBIqfHoecSZkZ5xWujI=; b=XZAPhF8eLjak36Ryoq3iOPNh18aIgJLCfOgnVZpsNa8HJCsVNmLptkeuS8ffTW0U5k KVTGJBND94lXE7iHu5OLWLoc258Ysj7tu//5R/raa9/d424bIDspuDDoxxiGk+YZhT01 Q65db0fTH+57UrpCjrkVWenw1s/FULgatUHh+Ezi0n1FYRBp3pWLu2sGJRoAZOla5zjz VUqQpvVDCip1/edzF4alAvfWb52cSHjJFqaXHIQmklAIcftL+TLCbgKUTyXOBSU6iJ2Z nt42WlM9rTrtmhJjgJZwip7oXWtq6Yfh1JjR6ClG0yeiqQIZVb+0GggLWKyOcQ2CcddK uMZg== X-Gm-Message-State: AO0yUKUahDHpAkliHmhGEDhUk8COeMR6wC6WnIYm0EHIvauam6vxO/H2 xgktW7In+irU/xFUReJKzsrKWA== X-Google-Smtp-Source: AK7set/SFU8Ve/CtpZXZI7aa0yyeCXwHleMpdiWNQkU2o/KMWqOAGCXqcjSa+wtXFHJGorKy0q0C7Q== X-Received: by 2002:a17:906:8609:b0:8b2:8876:2a11 with SMTP id o9-20020a170906860900b008b288762a11mr6862160ejx.28.1678914661511; Wed, 15 Mar 2023 14:11:01 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-87-0-96-89.retail.telecomitalia.it. [87.0.96.89]) by smtp.gmail.com with ESMTPSA id o15-20020a170906600f00b0092b5384d6desm2965366ejj.153.2023.03.15.14.11.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Mar 2023 14:11:01 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski , Amarula patchwork , Vincent Mailhol , Alexandre Torgue , michael@amarulasolutions.com, Rob Herring , Marc Kleine-Budde , Dario Binacchi , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Krzysztof Kozlowski , Maxime Coquelin , Paolo Abeni , Rob Herring , Wolfgang Grandegger , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-can@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, netdev@vger.kernel.org Subject: [RESEND PATCH v7 2/5] dt-bindings: net: can: add STM32 bxcan DT bindings Date: Wed, 15 Mar 2023 22:10:37 +0100 Message-Id: <20230315211040.2455855-3-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20230315211040.2455855-1-dario.binacchi@amarulasolutions.com> References: <20230315211040.2455855-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230315_141105_189871_6550C477 X-CRM114-Status: GOOD ( 17.30 ) 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 documentation of device tree bindings for the STM32 basic extended CAN (bxcan) controller. Signed-off-by: Dario Binacchi Reviewed-by: Rob Herring --- (no changes since v5) Changes in v5: - Add Rob Herring's Reviewed-by tag. Changes in v4: - Remove "st,stm32f4-bxcan-core" compatible. In this way the can nodes (compatible "st,stm32f4-bxcan") are no longer children of a parent node with compatible "st,stm32f4-bxcan-core". - Add the "st,gcan" property (global can memory) to can nodes which references a "syscon" node containing the shared clock and memory addresses. Changes in v3: - Remove 'Dario Binacchi ' SOB. - Add description to the parent of the two child nodes. - Move "patterProperties:" after "properties: in top level before "required". - Add "clocks" to the "required:" list of the child nodes. Changes in v2: - Change the file name into 'st,stm32-bxcan-core.yaml'. - Rename compatibles: - st,stm32-bxcan-core -> st,stm32f4-bxcan-core - st,stm32-bxcan -> st,stm32f4-bxcan - Rename master property to st,can-master. - Remove the status property from the example. - Put the node child properties as required. .../bindings/net/can/st,stm32-bxcan.yaml | 83 +++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/can/st,stm32-bxcan.yaml diff --git a/Documentation/devicetree/bindings/net/can/st,stm32-bxcan.yaml b/Documentation/devicetree/bindings/net/can/st,stm32-bxcan.yaml new file mode 100644 index 000000000000..c9194345d202 --- /dev/null +++ b/Documentation/devicetree/bindings/net/can/st,stm32-bxcan.yaml @@ -0,0 +1,83 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/can/st,stm32-bxcan.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: STMicroelectronics bxCAN controller + +description: STMicroelectronics BxCAN controller for CAN bus + +maintainers: + - Dario Binacchi + +allOf: + - $ref: can-controller.yaml# + +properties: + compatible: + enum: + - st,stm32f4-bxcan + + st,can-master: + description: + Master and slave mode of the bxCAN peripheral is only relevant + if the chip has two CAN peripherals. In that case they share + some of the required logic. + type: boolean + + reg: + maxItems: 1 + + interrupts: + items: + - description: transmit interrupt + - description: FIFO 0 receive interrupt + - description: FIFO 1 receive interrupt + - description: status change error interrupt + + interrupt-names: + items: + - const: tx + - const: rx0 + - const: rx1 + - const: sce + + resets: + maxItems: 1 + + clocks: + maxItems: 1 + + st,gcan: + $ref: "/schemas/types.yaml#/definitions/phandle-array" + description: + The phandle to the gcan node which allows to access the 512-bytes + SRAM memory shared by the two bxCAN cells (CAN1 master and CAN2 + slave) in dual CAN peripheral configuration. + +required: + - compatible + - reg + - interrupts + - resets + - clocks + - st,gcan + +additionalProperties: false + +examples: + - | + #include + #include + + can1: can@40006400 { + compatible = "st,stm32f4-bxcan"; + reg = <0x40006400 0x200>; + interrupts = <19>, <20>, <21>, <22>; + interrupt-names = "tx", "rx0", "rx1", "sce"; + resets = <&rcc STM32F4_APB1_RESET(CAN1)>; + clocks = <&rcc 0 STM32F4_APB1_CLOCK(CAN1)>; + st,can-master; + st,gcan = <&gcan>; + }; From patchwork Wed Mar 15 21:10:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 13176659 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 EC975C7618A for ; Wed, 15 Mar 2023 21:12:15 +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=dFX93JeJjqJp8aMb0SPJAaRcYsEBy3iB/ANiXMa2fT0=; b=ScJyj90WOPqdm5 OBWM6gDo+F7qQ6nvOvALnAQOWl4t3NDzC1d5LhFuFHEngQUtCJsUpd1YHZHVxw7lUXVEVq+tb97MF zeqfWFT3Um6amG2a0FAq1EDS32nKZ5H0O9E+nqElXQEPCmp07IYtYYJZr4fbNI1Dy0yX+73a8YYyl fqo0QARE26cTd9gWZ9x6EoYyQVTGuxkqRhcyW/8qv95NVfGtD/tvrDi8FPMNckSVRlQUXHN1pCXpG G0Tood//u7vtwamon97wtiI/1+vtkCJ8Pid0jLin7ha5eJlNofZ/6wt/C5/GpDGjSUuRrrfHusSjl MBVQvjeTLjlB28g/CbaA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pcYP6-00EQqI-24; Wed, 15 Mar 2023 21:11:24 +0000 Received: from mail-ed1-x535.google.com ([2a00:1450:4864:20::535]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pcYOo-00EQlC-2q for linux-arm-kernel@lists.infradead.org; Wed, 15 Mar 2023 21:11:08 +0000 Received: by mail-ed1-x535.google.com with SMTP id ek18so49567961edb.6 for ; Wed, 15 Mar 2023 14:11:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1678914663; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=90w47meUN1AAVQio6KlRg3XgdW53vJW4u/H89twTllI=; b=MsegcRcehzpSfT5JL7t9qBs5Z3LzXzq0kKxWEXzGvwAeNH052yuBvC5uly3NyO9c5K GiYXtHo0nZt4qmquwRQ3nhbLkvf74B4x1pnXLKn7ofcjD0MmmSqti2Fujsb12xizNztg rDW2bikIcpwXUxQGPbagyiFzDWd3jpvTtT1ts= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678914663; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=90w47meUN1AAVQio6KlRg3XgdW53vJW4u/H89twTllI=; b=IAwg1houPmJ1ZwxukgsDCZcx01V26PWPyUHJqJAYanQ5w+l3mN7gpV4OQdFghmUiBp WfC89J1dVq11dTI7N3jg90+JexXR/58TSCtGrKzfByJQSE1BiHDN9ww3r0T3sTRRvs7l VeojEkY8bzKv833KFEFLEgNwARJflvblBuCB3qjJypAzSZrWwgP9bi46A550S83YWtgA mkUvoj9ujMWnHBStRvI+yz1/K/DVMLJpLWDR6V7Z/OFiCwq4tLHboZH9St2p0dQ85MvG uIjilrm3TxqLBJ6xvCgQ2xqnvC8p5dAwnJICxQ7qd/O6v/B0cP8O8PVbLAqTsP0Apr0b 1XKw== X-Gm-Message-State: AO0yUKVuoq+RnYTKcCfLqnsailKgzJrJ57OQ9Rfmsb4zVM9FrT0DDhGt jrQgfBNw0JNJ/1B+w2zXPpwHtg== X-Google-Smtp-Source: AK7set/6gZCgZuysHt4eIbR8wps4ZYsDjM2t04rbduqEPsWRQRNIUfAvDR4zTQM9gyudtep7KGqQ1A== X-Received: by 2002:a17:906:fc0a:b0:91f:c56a:4dd2 with SMTP id ov10-20020a170906fc0a00b0091fc56a4dd2mr7906865ejb.62.1678914662947; Wed, 15 Mar 2023 14:11:02 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-87-0-96-89.retail.telecomitalia.it. [87.0.96.89]) by smtp.gmail.com with ESMTPSA id o15-20020a170906600f00b0092b5384d6desm2965366ejj.153.2023.03.15.14.11.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Mar 2023 14:11:02 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski , Amarula patchwork , Vincent Mailhol , Alexandre Torgue , michael@amarulasolutions.com, Rob Herring , Marc Kleine-Budde , Dario Binacchi , Krzysztof Kozlowski , Maxime Coquelin , Rob Herring , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com Subject: [RESEND PATCH v7 3/5] ARM: dts: stm32: add CAN support on stm32f429 Date: Wed, 15 Mar 2023 22:10:38 +0100 Message-Id: <20230315211040.2455855-4-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20230315211040.2455855-1-dario.binacchi@amarulasolutions.com> References: <20230315211040.2455855-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230315_141106_917297_3E79A113 X-CRM114-Status: GOOD ( 13.33 ) 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 support for bxcan (Basic eXtended CAN controller) to STM32F429. The chip contains two CAN peripherals, CAN1 the master and CAN2 the slave, that share some of the required logic like clock and filters. This means that the slave CAN can't be used without the master CAN. Signed-off-by: Dario Binacchi --- (no changes since v6) Changes in v6: - move can1 node before gcan to keep ordering by address. Changes in v4: - Replace the node can@40006400 (compatible "st,stm32f4-bxcan-core") with the gcan@40006600 node ("sysnode" compatible). The gcan node contains clocks and memory addresses shared by the two can nodes of which it's no longer the parent. - Add to can nodes the "st,gcan" property (global can memory) which references the gcan@40006600 node ("sysnode compatibble). Changes in v3: - Remove 'Dario Binacchi ' SOB. - Add "clocks" to can@0 node. arch/arm/boot/dts/stm32f429.dtsi | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/arch/arm/boot/dts/stm32f429.dtsi b/arch/arm/boot/dts/stm32f429.dtsi index c31ceb821231..809b2842ded9 100644 --- a/arch/arm/boot/dts/stm32f429.dtsi +++ b/arch/arm/boot/dts/stm32f429.dtsi @@ -362,6 +362,35 @@ i2c3: i2c@40005c00 { status = "disabled"; }; + can1: can@40006400 { + compatible = "st,stm32f4-bxcan"; + reg = <0x40006400 0x200>; + interrupts = <19>, <20>, <21>, <22>; + interrupt-names = "tx", "rx0", "rx1", "sce"; + resets = <&rcc STM32F4_APB1_RESET(CAN1)>; + clocks = <&rcc 0 STM32F4_APB1_CLOCK(CAN1)>; + st,can-master; + st,gcan = <&gcan>; + status = "disabled"; + }; + + gcan: gcan@40006600 { + compatible = "st,stm32f4-gcan", "syscon"; + reg = <0x40006600 0x200>; + clocks = <&rcc 0 STM32F4_APB1_CLOCK(CAN1)>; + }; + + can2: can@40006800 { + compatible = "st,stm32f4-bxcan"; + reg = <0x40006800 0x200>; + interrupts = <63>, <64>, <65>, <66>; + interrupt-names = "tx", "rx0", "rx1", "sce"; + resets = <&rcc STM32F4_APB1_RESET(CAN2)>; + clocks = <&rcc 0 STM32F4_APB1_CLOCK(CAN2)>; + st,gcan = <&gcan>; + status = "disabled"; + }; + dac: dac@40007400 { compatible = "st,stm32f4-dac-core"; reg = <0x40007400 0x400>; From patchwork Wed Mar 15 21:10:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 13176662 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 50B63C61DA4 for ; Wed, 15 Mar 2023 21:12:18 +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=yt8ZPmTnDr+rI73F/wVcHtWWW0AjihB/QZS/gch7c2s=; b=k/UrtG+WJJlfaf hxFLaF4gHcQRkFeGRGB4vnH7+I3ceXum9q2I5nNh1ABIWYkxZBIqONXrDvIS2guivZh3Pl7I4OGE4 tHlnr0vmQqb/oQcRKhc6KmuHU9vEVOiGcXndyAPGVnX0dF7OSRbn/O8TI97vYzIG0BvXVpIz4/fkb /ORV7HKYSW2XM7AbcbA8heJtH2o4lfEyHaUCkKoCCtv+HUF0h7bycPi6eN515x18u8X2laK4/54II 0+O6wNXWftgoszeHG4UCnbrbeTIYZTgV9JkYaEDxnErJoECGjrcDd5xx70ywoTfuS9dGNL1VmXBmh nZ0Pp5AOJSK3TYNemfbw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pcYP7-00EQqf-2D; Wed, 15 Mar 2023 21:11:25 +0000 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pcYOq-00EQmm-25 for linux-arm-kernel@lists.infradead.org; Wed, 15 Mar 2023 21:11:09 +0000 Received: by mail-ed1-x52c.google.com with SMTP id w9so9911469edc.3 for ; Wed, 15 Mar 2023 14:11:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1678914666; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=QV3iGa8KiUlr1LClhXl1D1BGw0maVF3hcUmABXx2qKM=; b=ohOAJfTr7KdZGoWacsyDi1q2g6iQWcxDkyS31OPkkLXWzu65VmmNVOAW2rrfOba+OK nZKj634RL1nZLy3BUnbpqDGxSIiO1KiFLIoFwqDfXRBVtiG3pbeoJW5R341asYxjydba HbJ/YHH9KBOMgap+SHjm8iAaiFMqZ+Ufz8pPw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678914666; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QV3iGa8KiUlr1LClhXl1D1BGw0maVF3hcUmABXx2qKM=; b=lBi3SjwXLcrPB16KcgZu+Ik28YJhD3uqKXeFCW45iJ3x4nTKy14apW7kDwwd1hkIY7 a17RWyXDgRrjcaBUGBqPwDsO3LSXarM0+H4wNUkglZZ+avP22YkbqbgTYAMaiSC/sEoj mbMztQ0wHTXk9UQnMwuaEtuj2dW7L8OQXOPk4R+fwTh6Vbuvdv29D5sJqAX425S4KXgC PkOUz84/q9fX3hNJS9hXNialjJrgxJCx6gI6eTtn8uggk5GLMCw6+NNdALH3suQcN7Dg 2/nUXhqNaNfUn6BDadDk7GdKT7AElLL/HOzxJAjM+zRZfo6hn+xpndVBxLZRbPtJ9fKj lL8Q== X-Gm-Message-State: AO0yUKV4CfF6QXyw8Ypnk0RwzJa6o9oW22H39vj1vEZBmo1N+lYQI6ac OeOJzTwsC2Ov2Pq1g3wJ/TjnUg== X-Google-Smtp-Source: AK7set+7qbhTZf0gnRIKNdrZ64AhZR6PoCD9a/ttHDAz8LZ5/kkhFKxcBjVJTkOpXjg9hsXiTU+qog== X-Received: by 2002:a17:907:b021:b0:92f:b8d0:746c with SMTP id fu33-20020a170907b02100b0092fb8d0746cmr1467931ejc.20.1678914666235; Wed, 15 Mar 2023 14:11:06 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-87-0-96-89.retail.telecomitalia.it. [87.0.96.89]) by smtp.gmail.com with ESMTPSA id o15-20020a170906600f00b0092b5384d6desm2965366ejj.153.2023.03.15.14.11.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Mar 2023 14:11:06 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski , Amarula patchwork , Vincent Mailhol , Alexandre Torgue , michael@amarulasolutions.com, Rob Herring , Marc Kleine-Budde , Dario Binacchi , Krzysztof Kozlowski , Maxime Coquelin , Rob Herring , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com Subject: [RESEND PATCH v7 4/5] ARM: dts: stm32: add pin map for CAN controller on stm32f4 Date: Wed, 15 Mar 2023 22:10:39 +0100 Message-Id: <20230315211040.2455855-5-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20230315211040.2455855-1-dario.binacchi@amarulasolutions.com> References: <20230315211040.2455855-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230315_141108_687284_51785DC5 X-CRM114-Status: GOOD ( 10.88 ) 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 pin configurations for using CAN controller on stm32f469-disco board. They are located on the Arduino compatible connector CN5 (CAN1) and on the extension connector CN12 (CAN2). Signed-off-by: Dario Binacchi --- (no changes since v3) Changes in v3: - Remove 'Dario Binacchi ' SOB. - Remove a blank line. Changes in v2: - Remove a blank line. arch/arm/boot/dts/stm32f4-pinctrl.dtsi | 30 ++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/arch/arm/boot/dts/stm32f4-pinctrl.dtsi b/arch/arm/boot/dts/stm32f4-pinctrl.dtsi index 4523c63475e4..3bb812d6399e 100644 --- a/arch/arm/boot/dts/stm32f4-pinctrl.dtsi +++ b/arch/arm/boot/dts/stm32f4-pinctrl.dtsi @@ -447,6 +447,36 @@ pins2 { slew-rate = <2>; }; }; + + can1_pins_a: can1-0 { + pins1 { + pinmux = ; /* CAN1_TX */ + }; + pins2 { + pinmux = ; /* CAN1_RX */ + bias-pull-up; + }; + }; + + can2_pins_a: can2-0 { + pins1 { + pinmux = ; /* CAN2_TX */ + }; + pins2 { + pinmux = ; /* CAN2_RX */ + bias-pull-up; + }; + }; + + can2_pins_b: can2-1 { + pins1 { + pinmux = ; /* CAN2_TX */ + }; + pins2 { + pinmux = ; /* CAN2_RX */ + bias-pull-up; + }; + }; }; }; };