From patchwork Sun Aug 28 13:33:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 2314 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 8D46740F47 for ; Sun, 28 Aug 2022 15:33:42 +0200 (CEST) Received: by mail-ej1-f69.google.com with SMTP id gn30-20020a1709070d1e00b0074144af99d1sf453154ejc.17 for ; Sun, 28 Aug 2022 06:33:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1661693622; cv=pass; d=google.com; s=arc-20160816; b=XziIgmahce00Z/V6KdmrLnQDHR89vsEJ0diAkUtaHZ109DmyTmTANxHstRYBOAQ8Qj 7WLbWEvIjbGEDtvZkJ/f8CKpuvnDdfDTXw+fadIj4Hum57oDMXs2S6hjYtsBncsPVnvl nfDxyp/kGa/fq7xJ729hYvmE4IPoqaEqTeUdc07E51Hd6Ke2KdNMerfbMl7079GexlnS EpFsQlElC7PH0I6tezkbRcdApsx6aw7Q372pkT3R41zBowvkx0Z5RKIOnOnY2i8V0aRM 9jJzeZ7UOy6RG1LqOMjei6oqIs/gzmfg3kCuSfzWD0Ye5LaZOm5IrvMtQ7aCjzVyJVOQ Ierw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=Zk56aSo+9z4P7U+osQTtGljp9np4/I1jB685lUEYwr0=; b=MGGrmhGuj11a9PvVccM0h1UMNpTjiw3ddcAJayMepC6KEXc3wP/GclS6l9jotQMKrL pG6BchxVTLV/tkCusafWtICazKI2WrchyL77dkW7bJ2PXYbQLWm+TP3LKLu6rb6PSt1W DMEgquf6bMV8oRfL/b5UcbT96RZU52cxDkoaSGO3mI5Hi5S1IDEhH7Fa9Z/L4WJjNuun BJ1C80uEgn+TgVAMmxui2c3Ik/25ush1LlNcHTBeJi01cZjLXRUff0VkdvlA3sEPS2lz WdWxpCHbEdfDfpDGrjCTAKcR7wMq5tdmsHPBTLY+EN0vtsJhJsr/4vf9lorU8QvKykak A8JQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=J46e2leN; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:from:to:cc; bh=Zk56aSo+9z4P7U+osQTtGljp9np4/I1jB685lUEYwr0=; b=lnyxAHfHsTBF+g7St+wh37N39SmDlsegNB2ugTQ9zUFM57DYoTmm9DMfXcAz0uK0Ti hYEZuItBsefUwapsb50+j6kKlNohtMmu37KHLoJonGc7/46dji0oT6PPQEPH/OZbJ46Q QmPvASjEQDEFwmOYgx1lmlsSeIcaimrMoldZI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc; bh=Zk56aSo+9z4P7U+osQTtGljp9np4/I1jB685lUEYwr0=; b=GZqZ5/edd5oxssN/x8bh1ouecFrjNEobHofhnKCEGPX1Kbg2PVL+29QZ5NH3OYI+ZD ZLrmDdJG4+Wxf/cXk9ojI32sZk1o5dVg9YkihOtQ63eQzszCssdLpb2URZ9xz+uXTorx fOPYzQsXtWUI0Aj7eG87thzndFbidIuWUt8fNp0HwgCwIHy//6LFP/XOQu63CnuCTUHe OmpAh8oaTl7BYxPhJGLkXAojwhXVEYRJYD3weqvVHYFM8cFI4EAQpKMvvrC+aXdakRNz 3ntFptk/s5kOvaRBZk73A2mPpSUmn1BvGE5z13GfybZrNns/BwMRoJlliQ7VxN59QcAI waKA== X-Gm-Message-State: ACgBeo2VmSXoP/0N57VczEjBbhy74GxBxtwxi3xdNjNdBhJUL5HHXWwk On+yXdJEutBYZ2zQCvnPpOiTBl+L X-Google-Smtp-Source: AA6agR5UX9MTPNunHpF7fHcvElMbI9jTAcsuocgoCxGa4MYLFEULmd03pwvwZrY8KCiBXU7v2eOwQQ== X-Received: by 2002:a17:906:ee8e:b0:730:3646:d178 with SMTP id wt14-20020a170906ee8e00b007303646d178mr10849113ejb.426.1661693622181; Sun, 28 Aug 2022 06:33:42 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:906:a409:b0:73d:11ed:5035 with SMTP id l9-20020a170906a40900b0073d11ed5035ls3919480ejz.0.-pod-prod-gmail; Sun, 28 Aug 2022 06:33:41 -0700 (PDT) X-Received: by 2002:a17:906:9c82:b0:6e1:1d6c:914c with SMTP id fj2-20020a1709069c8200b006e11d6c914cmr10431591ejc.769.1661693620941; Sun, 28 Aug 2022 06:33:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661693620; cv=none; d=google.com; s=arc-20160816; b=WnjOTVZlvK89bjFJuXWerPqQ06C4MzoSK7a4RN47dJ/bfo/osWD90oTLv66W4fW5jB 5W4WBgmj4uwGnydXbarwxAtMHDThDxvCkq6Z/hVA4nLB7GiqvIdw11hdKUBxSlOcYkA8 NxcOoaTXT4B2ywdqBteNou5Ux7FBUcWcGGtuZ/+yB3pMbOwTcI4+W1BoYZTm+PHYpd1x /ACsp8IvTKx7KsDHcbJvBZZVWhEtti/fIgvA0qAGQUWwcPsqEM6TdLadXggvf5QAcqJ3 h9gODhnwiDluVENykYCiXyUL1nVlofAYJUHLCHKi9k2AInYopogLNW3TpoaEPXhlLxCK 4teA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=RJr2H0obYN3pbdXZsdt8e1JbQn4d3baYnjPncxC8Sds=; b=sdNFSl7GFvVvkqchl82wTJF6ISMVyDJ22Y4SGdo3glaZuypiX1UHLSircIybNP/D4y 1EovE99ymoaiTpbqNLCKGgNu7qundiO2Jb6BDIk0KkoDYfBszOSYYHPhwEIzYSfG9pNe FTPSfGv1o3eA4NhKGN88rykd5xQa49ljJ8QwGJgXrXRGux4Eg+V/9JX39JTuX1Yehr9I 3oc+5i3cecJ2FPjThHojF70mEhFN9Ra8r2Qw9NgIxI3GnwijEf6ItJQcd/Twa3XPCl+e 5cZUkoZNubZtEzL3Rd9LfTtY6grDCehOig0+tqRR8aaoRxpcyDyA8r1w/oMieVJ08Axc kIVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=J46e2leN; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id n24-20020a5099d8000000b00446ad76b8b3sor3087892edb.25.2022.08.28.06.33.40 for (Google Transport Security); Sun, 28 Aug 2022 06:33:40 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:aa7:cfcb:0:b0:447:b4e5:22fb with SMTP id r11-20020aa7cfcb000000b00447b4e522fbmr12466111edy.190.1661693620710; Sun, 28 Aug 2022 06:33:40 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-79-31-31-9.retail.telecomitalia.it. [79.31.31.9]) by smtp.gmail.com with ESMTPSA id u26-20020a1709064ada00b007313a25e56esm3247669ejt.29.2022.08.28.06.33.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Aug 2022 06:33:40 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Marc Kleine-Budde , Alexandre Torgue , michael@amarulasolutions.com, Amarula patchwork , Vincent Mailhol , Krzysztof Kozlowski , Rob Herring , 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: [RFC PATCH v3 2/4] ARM: dts: stm32: add CAN support on stm32f429 Date: Sun, 28 Aug 2022 15:33:27 +0200 Message-Id: <20220828133329.793324-3-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220828133329.793324-1-dario.binacchi@amarulasolutions.com> References: <20220828133329.793324-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=J46e2leN; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 --- Changes in v3: - Remove 'Dario Binacchi ' SOB. - Add "clocks" to can@0 node. arch/arm/boot/dts/stm32f429.dtsi | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/arch/arm/boot/dts/stm32f429.dtsi b/arch/arm/boot/dts/stm32f429.dtsi index c31ceb821231..e04cf73a8caa 100644 --- a/arch/arm/boot/dts/stm32f429.dtsi +++ b/arch/arm/boot/dts/stm32f429.dtsi @@ -362,6 +362,37 @@ i2c3: i2c@40005c00 { status = "disabled"; }; + can: can@40006400 { + compatible = "st,stm32f4-bxcan-core"; + reg = <0x40006400 0x800>; + resets = <&rcc STM32F4_APB1_RESET(CAN1)>; + clocks = <&rcc 0 STM32F4_APB1_CLOCK(CAN1)>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + + can1: can@0 { + compatible = "st,stm32f4-bxcan"; + reg = <0x0>; + 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; + status = "disabled"; + }; + + can2: can@400 { + compatible = "st,stm32f4-bxcan"; + reg = <0x400>; + interrupts = <63>, <64>, <65>, <66>; + interrupt-names = "tx", "rx0", "rx1", "sce"; + resets = <&rcc STM32F4_APB1_RESET(CAN2)>; + clocks = <&rcc 0 STM32F4_APB1_CLOCK(CAN2)>; + status = "disabled"; + }; + }; + dac: dac@40007400 { compatible = "st,stm32f4-dac-core"; reg = <0x40007400 0x400>;