From patchwork Sun Mar 26 16:03:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 13188351 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 6AB4AC74A5B for ; Sun, 26 Mar 2023 16:04:35 +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=SwRYEdkNf1mZnn aYBPdHN6MTJ1raBuZqSvIWupyleQqHTizX+cjrtryXUx7jRQ6vC1dB0xpjW3ELFqkWFPaW4jRYwon wujHoJs73BMQOTzaKyOsNT3PCA5or1o8TqxNBU/a27JOKAE5BbLpVrL2RprzDnfuIwdXD4z0//6+A lT1SCvw1+p4uqmSi4NjCkxayUg74gMUdLagHRQFYbEp3UJHJ2jvfuxI0Px0NaxKI2kC5mrTiPzbBo riG64zJLipcX3b8XvmWugtHg7Ohym2DLX4eZVicf5VFuah3ax4LEa8HIQzrtiUvrdoEXeuMlwJXzQ SHECPTB83zKVEMBjtIDA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pgSqR-008mxQ-32; Sun, 26 Mar 2023 16:03:47 +0000 Received: from mail-ed1-x530.google.com ([2a00:1450:4864:20::530]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pgSqE-008mtM-1F for linux-arm-kernel@lists.infradead.org; Sun, 26 Mar 2023 16:03:41 +0000 Received: by mail-ed1-x530.google.com with SMTP id cn12so26302264edb.4 for ; Sun, 26 Mar 2023 09:03:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1679846612; 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=lm3usrJkrAsmIhY5NhxHKhUVY5xUCinMtwbqhn383BjqiHdbGRd+y3qyw6p/5o8zGn /25+rfBhNPrTFBc6jkGaApquPi3VtarQ9Pr0oxUwkEqeRYowCvfPSP0MkFaviaf1wCT+ RwqPIidVdZv/z0EgNinYnkCBWsjFY3po5PUp4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679846612; 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=LaQEU1OhRBD/bIsnBnZOKDLUIZVXsIgLl8ReNpDJtaxM2w/7HRg03sqprMMq1J+ZWm 7kfADmz8fRcqV2cdRJ3jZOp9nKDYoBdVBVadw/uplCzGcl1uFTU0fUvwxQL4qk1wbe+n kjEOa4ANYpEjw2Q6o8Cf9LTHMX3IxkmbrPzLUL5PZsJeDZHacX6F8LyssbP2XqivI1fe r/hAVHYKW/uSZdSmAZrnxR0+ehUiPgtdYhN7JtNHc3ILKUUY5yXnA63q7POLVACjJgOG hkybYH2msaUXtxDK58QgPBBC5RzGKGNfsXtkL9+MMOIVZ1TFdZ6dUiRX+J64BrUI+SV1 q1GQ== X-Gm-Message-State: AAQBX9exVFdpcYXU+pOk07OuIT9A0heCe0nmTlp0YWP1oyACinOv/+5o GLopT2odncWBnPJRvMxu0eerVQ== X-Google-Smtp-Source: AKy350as+tRi3BA2dhFLxdS81jN8x1lgcW9Ng7ynZMWjcriz1sp/xBC13Ft0sKPnwfNlqdzjcrknuQ== X-Received: by 2002:a17:907:1c09:b0:930:f953:9608 with SMTP id nc9-20020a1709071c0900b00930f9539608mr13785177ejc.0.1679846612122; Sun, 26 Mar 2023 09:03:32 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-87-0-102-254.retail.telecomitalia.it. [87.0.102.254]) by smtp.gmail.com with ESMTPSA id m2-20020a50d7c2000000b00501fc87352fsm6869333edj.13.2023.03.26.09.03.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Mar 2023 09:03:31 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Amarula patchwork , Rob Herring , Krzysztof Kozlowski , Marc Kleine-Budde , michael@amarulasolutions.com, Vincent Mailhol , Alexandre Torgue , Dario Binacchi , Alexandre Belloni , Christophe Roullier , Hans Verkuil , Krzysztof Kozlowski , Matti Vaittinen , Maxime Coquelin , Rob Herring , Stephen Boyd , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com Subject: [PATCH v8 1/5] dt-bindings: arm: stm32: add compatible for syscon gcan node Date: Sun, 26 Mar 2023 18:03:21 +0200 Message-Id: <20230326160325.3771891-2-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20230326160325.3771891-1-dario.binacchi@amarulasolutions.com> References: <20230326160325.3771891-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-20230326_090334_418599_A76BCC22 X-CRM114-Status: GOOD ( 10.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 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 Sun Mar 26 16:03:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 13188355 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 18DB8C6FD1C for ; Sun, 26 Mar 2023 16:04:39 +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=fKsxo4XlPGbCtC 9lryaPTdq2NGv3nmVgIdr3q5hlepgh6uUtmo7FZFIqXUIpqq+OqEOZRsqN/sZhH/4wsANrCZ+gVw/ wtBDbGpPkildB9ovuzjZUa2o6Z8w0I1eh1RhheEq20tbHPbatTgoJhrCPeE5JyojYuPIYabMgIhuN MMkq//20LDb/ea70N0CC60kNecxwbziCT3XVOGW0I2NEkouGOU9IkOjnmYxZTTNGdbsLD1sBvF+iH gxw6CBBU6DDEDiVHA/Oy+tly3PTBDbiJ6Qjk5N/EkwWN1in0/a5cXZ9FOQOMTbPWwPQJlelM0bFME T3odSDRuGhNPN4jTB6/Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pgSqQ-008mwz-2s; Sun, 26 Mar 2023 16:03:46 +0000 Received: from mail-ed1-x530.google.com ([2a00:1450:4864:20::530]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pgSqE-008mta-2j for linux-arm-kernel@lists.infradead.org; Sun, 26 Mar 2023 16:03:41 +0000 Received: by mail-ed1-x530.google.com with SMTP id y4so26342014edo.2 for ; Sun, 26 Mar 2023 09:03:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1679846613; 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=Gye0T3mSAKu/KCA7d5RgF9fsYyJyVd7lXQsidrgXH1Eqo9gF2PE/PPbrxMmlQInLqC iKPHp+t5NVovkxeF0juFb89cE3w/SDzS4Oo2nzAnebcqo231WqHli0FKbvnYde0hGgvA jf9xgfbPJWb6+txtWcg/cbaOJN3qd5uYt1wYg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679846613; 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=f429FVREqA4qdbkNLxd4u/v9yFFdQ7PmyfeosBMhfw/Pto4K81LEyrfaNBWbWWy5+m rO0MWU2bfSBMcz3LkoNDiGVvjZ6681UWFWzjLZmJzzZnoNMUMBFTa2toxEWHhhrSsof8 u866QfobU8bo/aMMK+d7sZTf+rFyumg4fjk7Khr9zmM4ZGTJDuA/bxW13WFM8C0YX9C3 PV92XFHmhR5qGYBv0rXRzxuTWohoa5WCVFRh/jSGKXIGHnyWXYY5D/y630EKMcCM0Ir6 x4ZyEd8SIa9WrlvOvRSfvs80+0Yecn5xAcjWBigLqikJ3d1OkHT/soNHCP0AhqhbbCUC dKYw== X-Gm-Message-State: AAQBX9dkCMv7p1DB1GV8IkwO8I6+vWuCpuTilXk2MHDp2oY5fynVfUle Ocd5s0CpirhONgVYxX3Z3KFScA== X-Google-Smtp-Source: AKy350arxolBk/vjSQQ0TyraUQbcc8oXTrnHf+4lTyfT1Ri3vZx2dafkX3KmSoc900oU6UxNnr3/IQ== X-Received: by 2002:aa7:cd8d:0:b0:4fe:1b62:4741 with SMTP id x13-20020aa7cd8d000000b004fe1b624741mr8976237edv.28.1679846613613; Sun, 26 Mar 2023 09:03:33 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-87-0-102-254.retail.telecomitalia.it. [87.0.102.254]) by smtp.gmail.com with ESMTPSA id m2-20020a50d7c2000000b00501fc87352fsm6869333edj.13.2023.03.26.09.03.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Mar 2023 09:03:33 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Amarula patchwork , Rob Herring , Krzysztof Kozlowski , Marc Kleine-Budde , michael@amarulasolutions.com, Vincent Mailhol , Alexandre Torgue , 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: [PATCH v8 2/5] dt-bindings: net: can: add STM32 bxcan DT bindings Date: Sun, 26 Mar 2023 18:03:22 +0200 Message-Id: <20230326160325.3771891-3-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20230326160325.3771891-1-dario.binacchi@amarulasolutions.com> References: <20230326160325.3771891-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-20230326_090334_893778_7FF44D79 X-CRM114-Status: GOOD ( 16.61 ) 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 Sun Mar 26 16:03:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 13188353 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 9E596C77B61 for ; Sun, 26 Mar 2023 16:04: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: 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=WxhG/i6/1LQeXy 9/NQt2OnbXkgB1YNg8IzAtpO2zPcTqhOXUtY0OtaPFHXF6/x/nzPzIOe7HeT7t+QZyaBqESGtvdi7 gCUVttAsEmLY0u5G+1uqrsS2YXIV4chuddqTvFD+SL9axizQwkcq9RUhkolXrbdrGWSiJS0FE4zUO nChvqQMXhC4ekSS54sWoXmsJnM1mLlSBduX9aKGOCtCQYNHezj/WwEtSlpFRNi2wQq4CWyv76mu+t 7gZIje4MtYOD/qFMoeHI7OjWH811szUPX1+aJFNO3KpDqfvNIDV2Sgxlp+LmITXhQUqjDMTUi2z44 xIN82vmIHilNyTZ7Tu2g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pgSqT-008myL-03; Sun, 26 Mar 2023 16:03:49 +0000 Received: from mail-ed1-x52a.google.com ([2a00:1450:4864:20::52a]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pgSqG-008mu2-0Y for linux-arm-kernel@lists.infradead.org; Sun, 26 Mar 2023 16:03:41 +0000 Received: by mail-ed1-x52a.google.com with SMTP id r11so26271843edd.5 for ; Sun, 26 Mar 2023 09:03:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1679846615; 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=IGpkTrSY08rQpriigTycwI/pVPZuNL3LmyjzqBtRzJdVky7fNF+s2Lu/uDzVr8KNcn py8Se8tVeuwNXUJzn36teS2EI3MjrjVg1D1QEAj9s283J2z6gTmZXD0AwfKi1Rp9QaAb 259T4Bg8O5UZh2dVoHJQqkWmejCTLGGqecwbg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679846615; 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=Z9YhUeB3agHpHiGs87IjI95o9DMh4mR/FJNCsvAgnyhJQoIr2+rhODuR/Ppt/XxVpa r87AcGj5EqZdNA1kenSsmWNxvjuXRPIKrnCsBEvZxISuI9NIjcCuGdpqeyvQWkbbzXgY 4wMwxmpA22U6xU+4GIK1WXH26bPsahlEP9XEXqXtTY4qiV5o2+BrVX6qruohGw2Vsd/F wRpaIDXSGuJ9pRwfRv5pamulImebCVZLYYb2fXBego4C4iIg69C1DRjS49TuajzWVfaR Xd25GbzeOzg8nAok674qNymhNBJ6hpQ4Ju/5BrVFM6/C/VcPuQR5n4dpZ4zoRLquIsg8 Cy3Q== X-Gm-Message-State: AAQBX9djPlplayyv3oej6LEVoYz4opHtwmLYJJNtKm66y9mpbtfg8Ozq VFWl1atcd7umjIzpqh9HkytFJQ== X-Google-Smtp-Source: AKy350bIfwMFk2pvBaJBigXVw+T4hWlt844pXbucNzIoAEIMfanFS6jc1aUnie97VTAQDIpd5pTB2A== X-Received: by 2002:aa7:d14e:0:b0:500:58cb:3b05 with SMTP id r14-20020aa7d14e000000b0050058cb3b05mr8961649edo.27.1679846614987; Sun, 26 Mar 2023 09:03:34 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-87-0-102-254.retail.telecomitalia.it. [87.0.102.254]) by smtp.gmail.com with ESMTPSA id m2-20020a50d7c2000000b00501fc87352fsm6869333edj.13.2023.03.26.09.03.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Mar 2023 09:03:34 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Amarula patchwork , Rob Herring , Krzysztof Kozlowski , Marc Kleine-Budde , michael@amarulasolutions.com, Vincent Mailhol , Alexandre Torgue , 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: [PATCH v8 3/5] ARM: dts: stm32: add CAN support on stm32f429 Date: Sun, 26 Mar 2023 18:03:23 +0200 Message-Id: <20230326160325.3771891-4-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20230326160325.3771891-1-dario.binacchi@amarulasolutions.com> References: <20230326160325.3771891-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-20230326_090336_206739_2E0E82AB X-CRM114-Status: GOOD ( 13.08 ) 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 Sun Mar 26 16:03:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 13188354 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 A3132C77B62 for ; Sun, 26 Mar 2023 16:04: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: 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=3M+aAqHGf9GsFx v3kIJA7ci3porefyQbLe52n29OTo+VVoPflnF0ootPMSArfOXltoXlVsHEVjWyEIq/rwpa5j6bDkU c6+wZYi+Oy6K1VfHXNTl9hUyO13MDDTCFuco4FeHpWY+5ILmQeus4ecCA2Onhxze4ZBRqpqCg7bPA U1cxvbYfSea9ze3djEJkMaGeZ+Ihzfzvxzp1gt8kXD9aO58oJOvKBgvpVLu4q30oAYcb2elKpOFfi tkSTQT9M0FTrlFMAYZ1nrWNq6n8ZjGP2u9NNKeLDDytXhsM56zdN0GedM3Las+epuxv3rWMuZPhE7 mMs78WpTvh93ak0PVXXA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pgSqU-008myi-0O; Sun, 26 Mar 2023 16:03:50 +0000 Received: from mail-ed1-x532.google.com ([2a00:1450:4864:20::532]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pgSqI-008muI-1A for linux-arm-kernel@lists.infradead.org; Sun, 26 Mar 2023 16:03:42 +0000 Received: by mail-ed1-x532.google.com with SMTP id w9so26317310edc.3 for ; Sun, 26 Mar 2023 09:03:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1679846616; 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=rq5dyFnUl7RahLZHNlkhn8nQ8r1SCLpS07sZ1IVPZQJ3gVy0TCL2nFSO4YipbN3KkF cqTPtfp304/6vW5DlnooqxktttCdVjUHlOTqCWhTxmLShyqTJQYFn08BEWKvPXMfEDxa 6QhqrddIx+rQQal8P4izUsMxr75QpKTnFYBYo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679846616; 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=3krSBfofJrzsdkpAMDPXkhIQX+djq1N6ynktXGzU//5NcfLoWT3Y0i/fhI8Tbl/MD6 D7DQjQ+XyvorQc5OYz2G5H7R8moG+fzXve3bo+gIgsYzsV0PJaW6sUNpPfTWzMniRsdY I/rYy1ZW49u01Kkz91b8wIG93hnGSoLRU0vhtaPCCRqnhUw4ElvZfzD2E7snMRwrXbTX jQw7kWlGXSuC2GB+62aszYOuokod4iUVGODEM/HNu62EC9PTfXPCoUMggQo/B5I1zJej fu9rIHjZjE4M6qmymnCnGlaTlIk2JW/QrJdsAg4JthKeEywxISBxgc9Oz1lRDHt2DqxR mQww== X-Gm-Message-State: AAQBX9dHf/ZAyeCyKxS3InzPlqbZ59gY/ZVACmcLJqY2o68U7nzC9eDd zfVTfAwu6i51ZIYESAXx10p6YA== X-Google-Smtp-Source: AKy350aWHhGJriWVrLf6TakD+wy8UiRbEvNVXeYw5vTRA6TEpbcBjqXWsqfoa/9hQ0foQ3aDVKRFZA== X-Received: by 2002:a05:6402:70a:b0:4fb:9b54:ccb8 with SMTP id w10-20020a056402070a00b004fb9b54ccb8mr9305209edx.21.1679846616252; Sun, 26 Mar 2023 09:03:36 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-87-0-102-254.retail.telecomitalia.it. [87.0.102.254]) by smtp.gmail.com with ESMTPSA id m2-20020a50d7c2000000b00501fc87352fsm6869333edj.13.2023.03.26.09.03.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Mar 2023 09:03:36 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Amarula patchwork , Rob Herring , Krzysztof Kozlowski , Marc Kleine-Budde , michael@amarulasolutions.com, Vincent Mailhol , Alexandre Torgue , 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: [PATCH v8 4/5] ARM: dts: stm32: add pin map for CAN controller on stm32f4 Date: Sun, 26 Mar 2023 18:03:24 +0200 Message-Id: <20230326160325.3771891-5-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20230326160325.3771891-1-dario.binacchi@amarulasolutions.com> References: <20230326160325.3771891-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-20230326_090338_402547_0D270103 X-CRM114-Status: GOOD ( 10.43 ) 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; + }; + }; }; }; };