Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp3987882rwl; Tue, 28 Mar 2023 00:35:14 -0700 (PDT) X-Google-Smtp-Source: AKy350ZFJMi11aNkDJZAEiJOcV3+RpELUs7erHdSq4Rk0BBfPRngEj0Bc9/j61Ek+V7E64thI/w+ X-Received: by 2002:a17:90b:164a:b0:23d:3549:82b7 with SMTP id il10-20020a17090b164a00b0023d354982b7mr14763748pjb.46.1679988914501; Tue, 28 Mar 2023 00:35:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679988914; cv=none; d=google.com; s=arc-20160816; b=X38DKMd1L5AGiP/oJF4bQW7mpNf9lQeFfl5NeA+WeCI56xy8FBOu7k0diaaOO1FcWn sxmGpSQHI38XJAEGHP4NF4ZQNTqN2m3pJwcFeMIrvMRIS8A3EZievPyGBejX0qJnAbRO CddAgxbnubGh6m9X3sp/kOxFi7dn3M0XAzhcTutm8Lv7FetPIDj1xGvzT43TDfQnFcEG TC5dTAD3K/vsPM18o54ir9AXT9hUsBIqJfFlqvFqMHMrqTq7hA3dhZBws6cvdH7hNYd5 WVM6NeffvP/yJp/IM4JRpFSwp02H5uu/3BbbYG6kdOyqRP4+ZTM4RSyr7KutvlbIYC4y Gshw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=2+OmgATyAVN/2E72/iiXhgNbt/jehihFpqYxcu4ydlU=; b=X9Bh0vi8KOjwUWjeEnwd5J/JZLfCnc6olvj2PT2czrLPBmS7Hiyqt/VZVXi55GNWdZ 1h6P/V5MnX5DQDJROjMER+7PbWTLxMX5sHxZQe1n39z/uRHLGvEK5oDqWx6UTH0S+GK+ 6D9/niQ9jCr9wN+MhBI3nRU6CnNG5nZBSSqbdPPSbZPStWGr7uLvtcsRVDZ95drtd587 uBPiiuoxHUUH5CHhrLmKqk8sTkYNellxsHiOxMB4PpdzMso6/9laeshni3w6A88VrH96 eTfx63SKyHtZPLqaC0xgRHFQOudxxrVrblG0NdIvTfhGTXMe/TNszROtQOox7WuUwez0 RB3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Jkq1icJE; 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=amarulasolutions.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lp13-20020a17090b4a8d00b0023d3c08258fsi13482102pjb.1.2023.03.28.00.35.00; Tue, 28 Mar 2023 00:35:14 -0700 (PDT) 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=@amarulasolutions.com header.s=google header.b=Jkq1icJE; 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=amarulasolutions.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231990AbjC1HeK (ORCPT + 99 others); Tue, 28 Mar 2023 03:34:10 -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-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: 8bit X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 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 = "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-primary; + 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>; -- 2.32.0