Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1785725rwl; Sun, 26 Mar 2023 09:04:25 -0700 (PDT) X-Google-Smtp-Source: AKy350aA+vvT2p/6Y2OczwHKh7c7R/ZYdpswPf978Rv4/owi5T7ZZu0Jxo9grP39fTiQ7ccagVJo X-Received: by 2002:a17:902:ea0d:b0:1a1:f6d9:2c26 with SMTP id s13-20020a170902ea0d00b001a1f6d92c26mr10441341plg.61.1679846665395; Sun, 26 Mar 2023 09:04:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679846665; cv=none; d=google.com; s=arc-20160816; b=yjAg2hOYLKLlYgyLLOJN46QOlBZDnpKgF7SFMtlLqxTLnJ/TGmfVbPK72dPBeYz2V3 cRtJ9w9+iptznu51v5JHQOLiXdLNSy5e+jyinXRqZ1LnqzKwuAXdYnf6veDVa0InrdC9 i7a+TAL701K9njWq8wYRykYWyvgbWBkxLSxB66juwcXOm77RlvQB66RdyLoF8YPVjKFG zuitJ2v5bhUBDDuez2HqTacYcyzyQbf3HQzg9c3+VxolFYCu/3sgB/XIpFOEH5ITrjif U5jMR1A/g6+D401Rnujp6pz6NvE2pc7sudQI45hOL8mbyZJMlDfGK7+pSP7IpgBizQ20 BsAA== 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=tO9wnz/2twmW7S4elBnut53OuemwuYQB7EC29MlHuiTna5ELbrVxNjIUmK8i9A+UNH qSEMO4vTp/3yTCoS7WY29PCJAlcqxfFcivLiARFMwHjefFWq/T8ZTZ1mUBhU20J3BHqP PSJ+aGdSNfH5G5SPQafmp1Kq6I8eZdMKLlmSPrkdAy6oFBMb+Le92zfirvLQ89Ga3fq1 NaI07PxmH7lszkhnboo/bOy6iSgObDhr170lA/n3TFsATnH1oA44DBjg+4Py6CXbkdYM 4JT0A8B/U/JE3POpX70T+yHD4TIU3JrmyuE/23ALBIiP9Wy5BBIqMjLiGeynWg9Wp6UJ CPUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=IGpkTrSY; 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 q5-20020a17090311c500b0019f34a15738si26902927plh.139.2023.03.26.09.04.13; Sun, 26 Mar 2023 09:04:25 -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=IGpkTrSY; 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 S232641AbjCZQDp (ORCPT + 99 others); Sun, 26 Mar 2023 12:03:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232604AbjCZQDi (ORCPT ); Sun, 26 Mar 2023 12:03:38 -0400 Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C27924233 for ; Sun, 26 Mar 2023 09:03:36 -0700 (PDT) Received: by mail-ed1-x52e.google.com with SMTP id x3so26184534edb.10 for ; Sun, 26 Mar 2023 09:03:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1679846615; 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=IGpkTrSY08rQpriigTycwI/pVPZuNL3LmyjzqBtRzJdVky7fNF+s2Lu/uDzVr8KNcn py8Se8tVeuwNXUJzn36teS2EI3MjrjVg1D1QEAj9s283J2z6gTmZXD0AwfKi1Rp9QaAb 259T4Bg8O5UZh2dVoHJQqkWmejCTLGGqecwbg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679846615; 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=71RXUYbXEam/P+xe1iPWD5ZMnM79JGA6caBCRz+ZPMKrzn9LNATTzrA36DmfI+pY6V KyjIplbLhcexHRz0+9GNxeEvf8Qki7Fpwm5DA+SYyo9/hEFkAr+l0SZSfAbB+jM2qIzc CJukdjo8WdvS9J6fXB4Gx5Hh807CFkUMaJxRu0MiO06uNv8vv6csJmWVREP4Qofyy641 jhTRQJMcAIaNpoNaufzR4YwRY2ah7HCryMcRG8xhFEsYel2cKFB/z/r6KBlIOl0+9Uii 1lHp+cYznat9JJluNhMbUpFHNEwWcHSSn8S0eDLdEaK1rTIlRTGO1PONI8dLZzGxgDwg Oayw== X-Gm-Message-State: AAQBX9epgN4b6W0SDByol1VbnkltGPhAOQUIENppe1urDWalA21CsB8e hTVvRbvY+2OGiJX4TqwDRR5N9zNqXAugCm8a0ro2rg== X-Received: by 2002:aa7:d14e:0:b0:500:58cb:3b05 with SMTP id r14-20020aa7d14e000000b0050058cb3b05mr8961649edo.27.1679846614987; Sun, 26 Mar 2023 09:03:34 -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 m2-20020a50d7c2000000b00501fc87352fsm6869333edj.13.2023.03.26.09.03.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Mar 2023 09:03:34 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Amarula patchwork , Rob Herring , Krzysztof Kozlowski , Marc Kleine-Budde , michael@amarulasolutions.com, Vincent Mailhol , Alexandre Torgue , 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 v8 3/5] ARM: dts: stm32: add CAN support on stm32f429 Date: Sun, 26 Mar 2023 18:03:23 +0200 Message-Id: <20230326160325.3771891-4-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20230326160325.3771891-1-dario.binacchi@amarulasolutions.com> References: <20230326160325.3771891-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 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