From nobody Mon Feb 9 03:45:57 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CC3DAC76195 for ; Tue, 28 Mar 2023 07:34:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230472AbjC1HeN (ORCPT ); Tue, 28 Mar 2023 03:34:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43520 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231359AbjC1Hdx (ORCPT ); Tue, 28 Mar 2023 03:33:53 -0400 Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF1A140CB for ; Tue, 28 Mar 2023 00:33:48 -0700 (PDT) Received: by mail-ed1-x52c.google.com with SMTP id ew6so45730363edb.7 for ; Tue, 28 Mar 2023 00:33:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1679988828; 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=2+OmgATyAVN/2E72/iiXhgNbt/jehihFpqYxcu4ydlU=; b=Jkq1icJEBGpJzWE3a+ydM2EXTLlKYwWHnWFUygAagMjBSNS6rgEOOj/KGQyeQ+mRb1 1ZCA3bwF/hz9WpdoFQaK3MAQiwsnMuC/FFA28ORzEcKygJQtWVFg1gQ16jQRKybxd27Y Rjorhs+fyynAn9r36WF7etT+lSKs2V+/dnesI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679988828; 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=2+OmgATyAVN/2E72/iiXhgNbt/jehihFpqYxcu4ydlU=; b=HB5mnzXR84P5OC6Ly8oNZ43m0U6UVHjrWTcryIMEDAlNgmFkOXdEk9TtPzXpZTyllC 3K/YKkLjh5wu1uGYKrN9THMbmvABDGECNPPbceicxu67d+XBTJ4zmCUpzdus2cdbsui9 uuKrjdGxV9DVoOEXRsj7GsxJUzSu4hDpa855QwKTujCA2uPngwAoR8mxtwc/+bBVDiE4 /NGAj4XhhGKXwJC99aJc9T5N9bVnGLftGo+oIhdz7M/QvNiXT+bWH6x2oRg81kmrGatK MGIZQ6N8DhtLArnDcr6Dt/XqDGJ9WtyUrOhqtn+xHirF2GGObWtdRgkgc2TmprGRAyrx RpHQ== X-Gm-Message-State: AAQBX9cPkMQ1qlF2LUzmH8KTzrlebS0wz311u+/CTNoY8i2tBmQ/NugR dQn76ZEZTclFm0mfkFleBnKJ2zot2XndZDxF7kVl/w== X-Google-Smtp-Source: AKy350b/J4ht0zqALGVEyDhlsi9kU5K82wFoT3CC1p9mmKbTwqqU3WrYl1fOHJnUUa9g1cEOkRcMAQ== X-Received: by 2002:a17:906:b351:b0:931:d36f:8965 with SMTP id cd17-20020a170906b35100b00931d36f8965mr16661879ejb.13.1679988828000; Tue, 28 Mar 2023 00:33:48 -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 15-20020a508e4f000000b004fa99a22c3bsm15478850edx.61.2023.03.28.00.33.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Mar 2023 00:33:47 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Vincent Mailhol , Rob Herring , Amarula patchwork , michael@amarulasolutions.com, Marc Kleine-Budde , Alexandre Torgue , Krzysztof Kozlowski , 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 v10 3/5] ARM: dts: stm32: add CAN support on stm32f429 Date: Tue, 28 Mar 2023 09:33:26 +0200 Message-Id: <20230328073328.3949796-4-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20230328073328.3949796-1-dario.binacchi@amarulasolutions.com> References: <20230328073328.3949796-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Add support for bxcan (Basic eXtended CAN controller) to STM32F429. The chip contains two CAN peripherals, CAN1 the primary and CAN2 the secondary, that share some of the required logic like clock and filters. This means that the secondary CAN can't be used without the primary CAN. Signed-off-by: Dario Binacchi --- (no changes since v9) Changes in v9: - Replace master/slave terms with primary/secondary. 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..c9e05e3540d6 100644 --- a/arch/arm/boot/dts/stm32f429.dtsi +++ b/arch/arm/boot/dts/stm32f429.dtsi @@ -362,6 +362,35 @@ i2c3: i2c@40005c00 { status =3D "disabled"; }; =20 + can1: can@40006400 { + compatible =3D "st,stm32f4-bxcan"; + reg =3D <0x40006400 0x200>; + interrupts =3D <19>, <20>, <21>, <22>; + interrupt-names =3D "tx", "rx0", "rx1", "sce"; + resets =3D <&rcc STM32F4_APB1_RESET(CAN1)>; + clocks =3D <&rcc 0 STM32F4_APB1_CLOCK(CAN1)>; + st,can-primary; + st,gcan =3D <&gcan>; + status =3D "disabled"; + }; + + gcan: gcan@40006600 { + compatible =3D "st,stm32f4-gcan", "syscon"; + reg =3D <0x40006600 0x200>; + clocks =3D <&rcc 0 STM32F4_APB1_CLOCK(CAN1)>; + }; + + can2: can@40006800 { + compatible =3D "st,stm32f4-bxcan"; + reg =3D <0x40006800 0x200>; + interrupts =3D <63>, <64>, <65>, <66>; + interrupt-names =3D "tx", "rx0", "rx1", "sce"; + resets =3D <&rcc STM32F4_APB1_RESET(CAN2)>; + clocks =3D <&rcc 0 STM32F4_APB1_CLOCK(CAN2)>; + st,gcan =3D <&gcan>; + status =3D "disabled"; + }; + dac: dac@40007400 { compatible =3D "st,stm32f4-dac-core"; reg =3D <0x40007400 0x400>; --=20 2.32.0