Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp3386646rwl; Mon, 27 Mar 2023 13:17:48 -0700 (PDT) X-Google-Smtp-Source: AKy350a/k8S3z8nrcNc7UqG7ulukXgZvjpqfbp2I1MjCHL+9BS0n7lo1JYny8ouBQpX9V0lx+e02 X-Received: by 2002:a17:90b:298:b0:240:c4c:59ea with SMTP id az24-20020a17090b029800b002400c4c59eamr18964577pjb.11.1679948268614; Mon, 27 Mar 2023 13:17:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679948268; cv=none; d=google.com; s=arc-20160816; b=O7rNg1XEIydeEi1NIVPb00Ce94wHZqrcZhbPInE7+UVFHjWclsAGdNp5iAD1N0CHxF 5H/TCn5x7q/zq24Ux3jUe0GwOx/3HFf4Tw4CeOnXm5z5Bd7vUXNQw05BVgGn6vf8ooG2 9K8HBtnpCkRV+TSBXX2hJqUHQn9RXHKIE9PDO8INQ1bazS++OGPxJaztwybmp5q1tVUa Km7cFcgglYW6lOXYS9KS8bCt84pqrAU2BjRWhmpCYTKJXDDevXb55u3u/RA3A8SbCUq6 hxwA2L5+tSoR/H3RcuwwL0yYuwYal3mLcVJ1xPdNEdKD3sGxP4fYdvqkdI4IJprPFn3f WsIA== 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=PQBAqyGpgtibuEQ07wkfyoJFQhHr9Hz8PDMB/KLLeHM=; b=nwx0VMrdBtICQUsD+LmGVQZSxv0hm6NeWLNI6tGxCWH5GHeBAwr+3KzxKkASB/ij5I aGQbkGSVwUf9vtg0moSEU6jeLBLKjhRbtTY6VUCkW4ejpKADdoQK9yAsEhpGnjt+kS6e CR9C3V66YTiwAk71vQpzKPBWi0JM46E6vr9axEhjkSFaP97Qjy+tVvfRc4p9ad3eb2MS puW8E6fDRUWerIufwCKX5wz5PlrliAWoBTbaPqTxgo/gEWxTXWxUQqRDm0rfk/xij1nD r1GhCe+Axzl5+kZzadI6dQObEt0/83Zl2evaf+P5KbfvelCDhVP1ewlRBRHc61m1WYRV JjSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=JTjIYf+c; 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 ml1-20020a17090b360100b00230a8355ff1si6449811pjb.181.2023.03.27.13.17.37; Mon, 27 Mar 2023 13:17:48 -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=JTjIYf+c; 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 S232717AbjC0URP (ORCPT + 99 others); Mon, 27 Mar 2023 16:17:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232700AbjC0URF (ORCPT ); Mon, 27 Mar 2023 16:17:05 -0400 Received: from mail-il1-x136.google.com (mail-il1-x136.google.com [IPv6:2607:f8b0:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C66E940F7 for ; Mon, 27 Mar 2023 13:16:57 -0700 (PDT) Received: by mail-il1-x136.google.com with SMTP id v5so2689760ilj.4 for ; Mon, 27 Mar 2023 13:16:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1679948217; 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=PQBAqyGpgtibuEQ07wkfyoJFQhHr9Hz8PDMB/KLLeHM=; b=JTjIYf+c214XaxQnu0kKEL9Eo7jLRGqw+K7R8lqR0oNNC8MVwOVZPZ2fxTrYbvC1Ri CCAZZSSlnBkr3Coou+GNmEyPu1mNmlpeThmdRoKJGRmCh3COBylHJZ4SR5LNWhhRZ4xe x6jcC2+eZ77HFwsra4tlZUWwIsLlZBi1Q4Qto= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679948217; 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=PQBAqyGpgtibuEQ07wkfyoJFQhHr9Hz8PDMB/KLLeHM=; b=DHaTqXF/kPNzis8usliZLFlx4i+rSJ006pi/QcXIPbfvrpynW5OHwDM8W365VkD8Uy 5zSKKCR9kAKZdjpCXiIEbPyIJEbwAwiFqD981yBVSBknh2ybj/jrBZEGoMoLArIYpOa+ zkIaogSs7E9I3D7XwnU5kBtOrDn1PxgHL0Zgu24ZYUEMoDqLEYeNYTIb7OQ03U9BFAZ0 IJNr6KwWaZIr5anMOrJGlQ108UjDOKdwOeH+8mcXl+mOwSALQUsYVgTjNxPKI+QGSRE7 y59qjUwcZ5BBd0rK8te4Eku4gUCtThE+eAxjUmGpeTLWobf8/aN9QT85Pu6H6X9exaAk HrLg== X-Gm-Message-State: AAQBX9dniisXsaziXLJGrd34fFtyYhy6DqUA53eqYy9tgmTM0ZQvJj9U AdBW6HKaIGn1QUf+wOYfCAvwB3THnu1VfW/7ID8yCg== X-Received: by 2002:a05:6e02:1212:b0:325:dc0c:73f5 with SMTP id a18-20020a056e02121200b00325dc0c73f5mr8544921ilq.14.1679948216966; Mon, 27 Mar 2023 13:16:56 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.pdxnet.pdxeng.ch (host-87-0-102-254.retail.telecomitalia.it. [87.0.102.254]) by smtp.gmail.com with ESMTPSA id u26-20020a02b1da000000b003a958f51423sm5594759jah.167.2023.03.27.13.16.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Mar 2023 13:16:56 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Marc Kleine-Budde , Alexandre Torgue , Rob Herring , Amarula patchwork , Vincent Mailhol , michael@amarulasolutions.com, 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 v9 3/5] ARM: dts: stm32: add CAN support on stm32f429 Date: Mon, 27 Mar 2023 22:16:28 +0200 Message-Id: <20230327201630.3874028-4-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20230327201630.3874028-1-dario.binacchi@amarulasolutions.com> References: <20230327201630.3874028-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 --- 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