Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp3647752rwb; Mon, 16 Jan 2023 10:48:12 -0800 (PST) X-Google-Smtp-Source: AMrXdXuh8/BsMdRBhnwxVekj857Wum9yrSqEXbTUt6W05ZAMFAEoofqW7v+ZgkIdFvuq1dcmx8aK X-Received: by 2002:a05:6402:f04:b0:480:cbe7:9ee2 with SMTP id i4-20020a0564020f0400b00480cbe79ee2mr320890eda.22.1673894892129; Mon, 16 Jan 2023 10:48:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673894892; cv=none; d=google.com; s=arc-20160816; b=YYEk6Ie+J9aRA/Snj+0aUf5CNLAC2Rn3S8c/SlHsMp2V3k9X7dldbf2bUL4FmENmvd D++iXirJXeZLfZupNYzY7BEphY5+lpH9N3qjp0ijjmJG+YUTDcnzfPJ9BZWEbWCG5uRy Nz+HimibaVAA6S2oe9VMsqu8N0ZUaLNeFnOqBqPT6rvreK5cyScSyeJ2yVcyidOORI96 hDbdQ6xqoe+21TGD4VkqflfkFGcuN/bBShoEI/o1Mo3M+vxLuFN2o/0Cf7qokM0qGGib KaV4nVo9aPPv9+8vj+RKmUQRD0LqLxoPf28ya806Z23xp083AMnTaPDWMrJLNEQdt3wd IqIQ== 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=90w47meUN1AAVQio6KlRg3XgdW53vJW4u/H89twTllI=; b=iMlE8XGeS733T1JDqWLERd7TGIVmQANuO35/VJLiFqUAcDCCzzvzYOhh9I6D4nRPrx ILfwRk2XcNhx1aq5dURDUMsQAR0swT3XEkjOQlAP2MRbhnVwjdBNl7rG8XvN/3g31T1C y01FxrTsxqOSh86PNaXBYj8Q4+kdvLHzca6P6+AwqAfxtRJ5+17lETzCei3SWPto1SYT J8NqR3WICT3/tTikuoWenq+aZkqsztQxDwlPnAucXM3cAg6TjBO1G98LBiGDeqTcH+Yu O+V554AlO1TXqbA1h/XNPaa9oYIMun4u85oj9PMcg9OM5V+4DT0xSBcILvQ9TGsPi6w5 7JkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=How2XRdb; 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 ho44-20020a1709070eac00b0086dab4e8bbbsi8488700ejc.125.2023.01.16.10.47.59; Mon, 16 Jan 2023 10:48:12 -0800 (PST) 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=How2XRdb; 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 S232546AbjAPSF7 (ORCPT + 50 others); Mon, 16 Jan 2023 13:05:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47120 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232793AbjAPSFX (ORCPT ); Mon, 16 Jan 2023 13:05:23 -0500 Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 971B22E0E4 for ; Mon, 16 Jan 2023 09:52:11 -0800 (PST) Received: by mail-ed1-x52f.google.com with SMTP id b4so22188805edf.0 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=Kout5XZqtoWvlCyXkILGvbLJclwv9ZCq1oCjnBpypjRNeTDAy9nJSi9sZX8m0tv+im I0wFcJJ8hYrsdV5d67WKEJ6B5jITlJ/E4PGL+yjND8vEtp8tDxQjBWbnRQUogQVve+Jo fcXmXqJocUpBHFOZDmkEowt9YQlIcAPayhzrLzLmYyJBHe7KKZ66AOlz6rlTBf81SdXt phokRq7MJ1wAsdBPnKqyYQjIRW0X6Swqes/avO+vGt3MiJKDN582Sk1X233cxIrDni2F OSjWE0QHl+QmEi1pC5/s86KVIqo9J+MijMhP4ZSwlmfAT4FqICCtEp/FiPIKgduA4O5V Fgkg== X-Gm-Message-State: AFqh2kprKIKrCE2gQDRzPFOKGrljkwh1ah5+dufILw4Fqeqw4jUVZDkR yBVOtasMJ/48JnxwBWn4PUyL2qd4BTbB0hIf 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 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,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 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>; -- 2.32.0