From patchwork Mon Jan 16 17:51:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 13103542 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 B1112C46467 for ; Mon, 16 Jan 2023 17:53: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=fQ+PTkKDkcbKzzxbyzQADI1AuRvneJCVZKUKmXN0XH0=; b=JaRvRbaCqAiPKo /aliXlyERIexmNpEReuV212L0eEVW/2jmCZtt/B5UYIaJyHyztd6OMQtM+lu3IubGGO+MnmKP1ZlD 5WuJvKa92pmx70IGiJNxqSZOmREZepo3POOvEInrbAANSjZHT+tcAUVUtT08E5EDWp/ySHB4NIbsP 68kGAkR2J+Gdhs/4DVfz0diG+1TK/IVCBIQfjdzrTklObje+4obC0gsJKJwvz5lPbGncBzMeMscAm 3ci4GCKkEhuUSLl3x8o+YxgTqlaNoM2hr6Kq4o6cQmyImBBPsXlEwB4YP6cKr01XIT4xynzegPXeD km7F2RdJE0arJ3r95h6A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pHTee-00BaW1-Mu; Mon, 16 Jan 2023 17:52:20 +0000 Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pHTeT-00BaSO-Sc for linux-arm-kernel@lists.infradead.org; Mon, 16 Jan 2023 17:52:11 +0000 Received: by mail-ed1-x52e.google.com with SMTP id 18so41683660edw.7 for ; Mon, 16 Jan 2023 09:52:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; 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=IsPu9qMd42kSD40SCQ9Fi7QyXCwIlj/By2JmmXKMk5ztpv+s7NDmWOxQ89zMMgDPF2 CwvhY0dj5ukEWCnE5DGgpDNocrxRwj3rqSBPeJ9Ycq+HBI+O0ybYHz9Kp0xriQ43ekUP J2gqQEw9DUo80K6VU46YkNtsuER9DuHGBoy6U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=aI/BxPigsY+Fd9sL7gkmngqAwhAjeH0bYiuVW/jiIJllH1ps20hVRdKZz9bTBfxN2z C2udLNv0XYk931J/c+EFREy2RQ9EAysiE/n2sDglIZml9o6b1dKYui/SBainYXCpAZA0 Y97++/DfaVFUK0hie16loftuJH67AbGRH/epFz0eQxd+PUubH6d3e492AEqSLpGZW4n5 N8mMa2xKznw+hd7YWZYZeaNmuRQ626vyLvZdYz4n1Ge0f7acxGfsdPqiMmkWP5yZNdpe FfnYIbQ+H1DZmE4O/fJFbUY4m5VjWUAKt1B+wyF/u+PC0yGUbsQHH01yeRXlPNzp5lSD E7kQ== X-Gm-Message-State: AFqh2kqyrnKzG4FqrT11p/kwEDQHzhLZqozoSuwLP9Dcq6QbTuCQ0hWx wT4xI6zlwqm56Yeud3f50NlQsA== X-Google-Smtp-Source: AMrXdXur8S23m3ID7vP1dEixFgYQMqyKqPsLtX7xtLrQSRE/CtFRXBaQPX1K3MZrCIKX1TE+meg6mA== X-Received: by 2002:a05:6402:548f:b0:49c:1fe4:9efc with SMTP id fg15-20020a056402548f00b0049c1fe49efcmr65450edb.40.1673891526165; Mon, 16 Jan 2023 09:52:06 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.. (mob-5-90-75-145.net.vodafone.it. [5.90.75.145]) by smtp.gmail.com with ESMTPSA id fd7-20020a056402388700b00483dd234ac6sm11490723edb.96.2023.01.16.09.52.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Jan 2023 09:52:05 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Vincent Mailhol , Amarula patchwork , Krzysztof Kozlowski , michael@amarulasolutions.com, Rob Herring , Alexandre Torgue , Marc Kleine-Budde , Dario Binacchi , Alexandre Belloni , Christophe Roullier , Krzysztof Kozlowski , Maxime Coquelin , Rob Herring , Sebastian Reichel , Stephen Boyd , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com Subject: [PATCH v7 1/5] dt-bindings: arm: stm32: add compatible for syscon gcan node Date: Mon, 16 Jan 2023 18:51:48 +0100 Message-Id: <20230116175152.2839455-2-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20230116175152.2839455-1-dario.binacchi@amarulasolutions.com> References: <20230116175152.2839455-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-20230116_095209_941344_A4060FE6 X-CRM114-Status: GOOD ( 10.84 ) 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 Mon Jan 16 17:51:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 13103557 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 1494EC54EBE for ; Mon, 16 Jan 2023 17:53:40 +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=2Fp3BdcRfYvkSN kdtOA78i/wfkSJX4TQgEdtKisV6/jTjVrULrM/v0ziU4DfitykJ66FRzN2GEaL47N9ZYMdTmTdeVR lxU4lNBQk2gBWGnOLrQTxYgd3PjLCGfzaN1D+1J3czcYqvXmWBj4h/hgALUrnmjcV512+tn3VAXiP yYF9FEgisMqtRfWQrWkMBhfkIiI4plAuTxAN6AaE1qgsbItueiurcZspp3bJp9i+YYX+mCXS0y/jM v+pzTsio1CWzg3OIgMO38/kl9sn466JSbn6/M8I2OrIkiEi50YBXZU8ZXauLww6u36THdUMJcyDKY n9sHTa/mylZXHxjeERWg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pHTew-00BaZK-5P; Mon, 16 Jan 2023 17:52:38 +0000 Received: from mail-ed1-x532.google.com ([2a00:1450:4864:20::532]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pHTeV-00BaSh-LR for linux-arm-kernel@lists.infradead.org; Mon, 16 Jan 2023 17:52:13 +0000 Received: by mail-ed1-x532.google.com with SMTP id w14so24380401edi.5 for ; Mon, 16 Jan 2023 09:52:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; 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=atn/yL9aYqCqIVAt/lTz3zyQdiLguZ46x02s5JJjy4KWUlwgj+mlPmlbffUKNQ07lw ffqZpcUBGxrdpJBIH+2rogWZf6lex8s8Nhp+FJCNv5wVLmyq2GDiLAXd4YCZf7X1NMRH AP4SUP4QQwK2/QBITwDHCXuJkVXJhIdEdo150= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=J5jnvNhPzZFIAzCDP9QL8Fhtl2VKrL5C4CTALf4URNDtKqKH23t8J2wRTaVk9OU3t+ FkKVPHBOqD3woKZmmTz46fMIsa9O0H+GM1HRYb3w3eu5+8yp7IKoDGdIleiJNlSaYCYw Sl9bHuULlD+JhzxVzZ26JgdNyCTQYHE+AUy+9Sct4m+TEpuZQEQ/kuMfXftYaVycehKo MA9sdIjVa8zBxMEhGIr0CJRtzm/RqeX57LxzaiN1mSK7wTpBELrZySihkhljfv2qvK1u /vW7hMztMemXE85LkStAsnabhmBLtQJtxHaEXONrD0eGcHXycOxaf/IADfHU4ZRFR7Lo J7yw== X-Gm-Message-State: AFqh2kr6FiXbfiLZF5n32+Z7YE2FWfAzEkeaQnUgvL4O49twk7ICE7C5 ATOpvTEdvA2mbGnu/Kd0PT6Rug== X-Google-Smtp-Source: AMrXdXv1Zyt6i+r4onf48ykCmvbF8MjXUJfj270t6n6IGqxzIfbrrU/jTeOuE+smT6vO5tue0TpDcg== X-Received: by 2002:a05:6402:2208:b0:49d:57:f538 with SMTP id cq8-20020a056402220800b0049d0057f538mr104114edb.15.1673891528058; Mon, 16 Jan 2023 09:52:08 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.. (mob-5-90-75-145.net.vodafone.it. [5.90.75.145]) by smtp.gmail.com with ESMTPSA id fd7-20020a056402388700b00483dd234ac6sm11490723edb.96.2023.01.16.09.52.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Jan 2023 09:52:07 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Vincent Mailhol , Amarula patchwork , Krzysztof Kozlowski , michael@amarulasolutions.com, Rob Herring , Alexandre Torgue , 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: [PATCH v7 2/5] dt-bindings: net: can: add STM32 bxcan DT bindings Date: Mon, 16 Jan 2023 18:51:49 +0100 Message-Id: <20230116175152.2839455-3-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20230116175152.2839455-1-dario.binacchi@amarulasolutions.com> References: <20230116175152.2839455-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-20230116_095211_719643_A8D9E220 X-CRM114-Status: GOOD ( 16.79 ) 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 Mon Jan 16 17:51:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 13103543 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 D3066C54EBE for ; Mon, 16 Jan 2023 17:53:28 +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=Q4Ao52L5y415A3 1svuWxiEhEU+pYUGZeyjxmIntVn9c5cpnvqSPKyUWUiljgWE6DAvFA8yDuiSzbl5nN9G1hliRahXE MRF2VV0kxuJ5Mhd2zBXdAJSRoRp6FMyHavhtlyGoir/XIRao/xeaQioXAD58ggrtUP2F+e09KommI WhBt9ieiFagqyJqa5FrEDixlfX5JLxbUsBDxwSdw3puVvMA2TcpU0gnwCTrbhEwoa5OFbBOK23h8n tk9gHYsPrSOT5dMRmWK/KxUfZ5ZGQNCgLRjZFumj+JgwgmyF/Q49c+4FYnf2S4g0BMlyg4iMcv519 S2H/+sTG0sDONt5lwdHg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pHTem-00BaXM-RL; Mon, 16 Jan 2023 17:52:28 +0000 Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pHTeV-00BaTR-5v for linux-arm-kernel@lists.infradead.org; Mon, 16 Jan 2023 17:52:12 +0000 Received: by mail-ed1-x533.google.com with SMTP id v10so40483454edi.8 for ; Mon, 16 Jan 2023 09:52:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; 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=How2XRdbZenvgAgDDrGZ3FiFGN7XicMI8CK7CT+WcPv+zhkDqpFO0pv8WM97miGJba b/AgKl/u9xHbzb2Bj1XV58DKNSW0UfRKVj+iGEaBeohGSwMDTIhJfFfZrunvLYB8bAfI uULDDmDREOJel7THZ/PkRVinm1ERgd2qw55tQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=rMzAQJ3+NXNOE+AnmJpLcruttLcwDQgV5O1sC7K958yTr3QOtwLW4l1Z/paPk4wOTB wjeiWoeKx/IHbp31GzxoSWG2coAa2RvDnDx4uO6XYjPCRVHwL2b26cz/LAioEOVA2xmp ZuDRHQsz1eTZkowlV/9em6+CfeYqpSbu03Qj2d0uTo+YsD4PLd3snvT8HfJWJWG+ZlLG PhVfRDwC3walERAVBBLCnPUn+CgxnCucEg/Sdicy1oo6YUJGm52HqBOo8E1a0WVYFSca U+WKNWLuozdNHMV5lm8tR5RoAc0AoVh1Y3LuUN0oPVK7rUzmM//xIujC56AkjBtKniHS GzjA== X-Gm-Message-State: AFqh2kp7LOksMz+PfnoU/sI81QnzZtzUtQeA68JjYzCO+brRUKzOjf6i YAHzvoAt01ldo+jSViRZ5cey3w== X-Google-Smtp-Source: AMrXdXvLIUtgc18nQo18/rCI08eqevpA8jFciJzOYpzezbtssyTeg+6Ha/4JYDcEa0JWE6h7/Ect3w== X-Received: by 2002:a50:ff17:0:b0:499:d208:e8f4 with SMTP id a23-20020a50ff17000000b00499d208e8f4mr127949edu.19.1673891530023; Mon, 16 Jan 2023 09:52:10 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.. (mob-5-90-75-145.net.vodafone.it. [5.90.75.145]) by smtp.gmail.com with ESMTPSA id fd7-20020a056402388700b00483dd234ac6sm11490723edb.96.2023.01.16.09.52.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Jan 2023 09:52:09 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Vincent Mailhol , Amarula patchwork , Krzysztof Kozlowski , michael@amarulasolutions.com, Rob Herring , Alexandre Torgue , 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: [PATCH v7 3/5] ARM: dts: stm32: add CAN support on stm32f429 Date: Mon, 16 Jan 2023 18:51:50 +0100 Message-Id: <20230116175152.2839455-4-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20230116175152.2839455-1-dario.binacchi@amarulasolutions.com> References: <20230116175152.2839455-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-20230116_095211_240174_558F798D X-CRM114-Status: GOOD ( 13.29 ) 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 Mon Jan 16 17:51:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 13103558 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 1D7FFC54EBE for ; Mon, 16 Jan 2023 17:53: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: 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=ir3DYatowPjTtzMduEgskHtLX/QkmeuYSWm6gXEcHok=; b=273rSZE/CVMNBO ZXlaKaDUXknxDdCqtVlDyz/FCugByE77ygA8kTRNwOX3OZ+Tx/fPDM7KqUy13Q6ipZWtowJy+Xz8a WGgVMyriPAqYPGhPAz5iENdExHtM1DxR3qfj8KSiuPtcav2l6x+Rv+PyejWC6qFxhWJhfnYBXqWK0 AmsEnz6AVqSEY6xzUJqE/+MDwannutE/WVHl2YGY0nDEEktKRNgKZVYjFJfQJ0AMYc92D1AgR+uqr Dlsq3oNfaR/07CDRlMAHP5onasoE4roSUJN7lCPto/gIJTNL15OfcbeKapQxHyCKSNUhg5TY6QHZh q2wVDGla3jd11djjXnvw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pHTf5-00BacX-NK; Mon, 16 Jan 2023 17:52:47 +0000 Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pHTeZ-00BaUL-7A for linux-arm-kernel@lists.infradead.org; Mon, 16 Jan 2023 17:52:16 +0000 Received: by mail-ej1-x629.google.com with SMTP id mp20so23235492ejc.7 for ; Mon, 16 Jan 2023 09:52:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; 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=jfErmyZAWFClEhl0ayKENaiIcOOkglWFws7K0nbLI8s=; b=CiZDRrup74sgUxRVU6m1gLeEbwHwbulx2ngc8VyZ9sGs5XEKXQbDgMycQM7zOa3nBU TxmnS1YBlX44zfqBABDkM4kQBhkFaKjSNGH0XDKCt0ob4HEhX0IS/+yi6DT10yJkk32T Oauww02NGbHbMvSiZpCcZsbGRMP1ICMU1VlKc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=jfErmyZAWFClEhl0ayKENaiIcOOkglWFws7K0nbLI8s=; b=Xhml+LLMRMH0gprO6Tm2FPZHxYjUC7BePLs+6+IpZ63GtT4RGjt963babvP3dY0/pq QQTZ27G06YkGLH8MRdZzNiB6fJtPf8HcNg9mROhi6wvIXOTJ45amoUpBMZF5WD92+/G2 YEPGj/EF+4Zk2uwpOzCBZmziJaRgqoEtpELIOF4WZisyYnrdnEVxfcoIeygtVBTQIKAd Tv2E2BWQv1gLdkUYo+Ef5nhWyFBd7TGkxg+pz5WK+S/tiKyYRQfTpQqFUdc3jNspSMZ6 Rdc3sIOzvjxnM0vqJvoTbbO3aG/+xnZY4ffItFzQxSZJLzJBHUB5cEkqK2nbowjCw8Ig mHCQ== X-Gm-Message-State: AFqh2koV5J2UPb29C7FKujUYH7rXu6Yzc58cPtJYTeuWOFa7xzcOiwU9 sPdPPgqyg9/HZV/4NLreNH8toQ== X-Google-Smtp-Source: AMrXdXvdC7qxR/+ZPsAJ4YfSSBzNByhVR25GX6cvTzrlWTZzZJOOu7qLFg1I78xQoouF74gkllv2pQ== X-Received: by 2002:a17:906:1dcd:b0:84c:c121:dc53 with SMTP id v13-20020a1709061dcd00b0084cc121dc53mr46331606ejh.34.1673891531473; Mon, 16 Jan 2023 09:52:11 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.. (mob-5-90-75-145.net.vodafone.it. [5.90.75.145]) by smtp.gmail.com with ESMTPSA id fd7-20020a056402388700b00483dd234ac6sm11490723edb.96.2023.01.16.09.52.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Jan 2023 09:52:11 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Vincent Mailhol , Amarula patchwork , Krzysztof Kozlowski , michael@amarulasolutions.com, Rob Herring , Alexandre Torgue , 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: [PATCH v7 4/5] ARM: dts: stm32: add pin map for CAN controller on stm32f4 Date: Mon, 16 Jan 2023 18:51:51 +0100 Message-Id: <20230116175152.2839455-5-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20230116175152.2839455-1-dario.binacchi@amarulasolutions.com> References: <20230116175152.2839455-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-20230116_095215_280674_9F994FAB X-CRM114-Status: GOOD ( 10.74 ) 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 500bcc302d42..8a4d51f97248 100644 --- a/arch/arm/boot/dts/stm32f4-pinctrl.dtsi +++ b/arch/arm/boot/dts/stm32f4-pinctrl.dtsi @@ -448,6 +448,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; + }; + }; }; }; };