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: 12957260 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 90C3FC0502F for ; Sun, 28 Aug 2022 13:35:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=g1oUj0j4vuhL7QYJXXvQcf1wmGwgu8LjvPZfOlB20es=; b=Z7/v0GUAc5JXox KrMhlB/XJfs4iDedzZJV1rwv5DYb6A7AbH+Oo+rWalwkNPIc/ReA0pJL5tFhVTnpecA/CYLyZMNhL 8bU03LAm50T6nEz7v7jC+tlMCWY2sAM3/DEG9Ake4/5j8RhkLsE+qQj7RvbLwoJnhOgvIf46JRQdD N/un1nsC5OqoVqvFc02SQ/Ov5qUQBclEPXMBZBnZiKLTkoj/v8yJUD1lCcC1Zhcy8iQkkc0fWS7fq pIv8z8vqwP58MASoSHNtMwpc3oYrUDlXI+KtGxQQgcdU4TyXINUDsFB6o+T4emm7vz+MTWVqkRTqH FGfYwFi21lpGVPsuVyyA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oSIQN-00H8TO-SY; Sun, 28 Aug 2022 13:34:04 +0000 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oSIQ3-00H8HW-57 for linux-arm-kernel@lists.infradead.org; Sun, 28 Aug 2022 13:33:44 +0000 Received: by mail-ed1-x536.google.com with SMTP id s11so7244929edd.13 for ; Sun, 28 Aug 2022 06:33:41 -0700 (PDT) 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; bh=RJr2H0obYN3pbdXZsdt8e1JbQn4d3baYnjPncxC8Sds=; b=J46e2leNHzPU4TQrl7M2tfofAsrAQ/U9ei/aP9tvHa5eHX1ABsGsXCprvYYIAGt+/S RLg1sDK21NULsyjqqNbkPTRCFdCxlXxSad2gXYyJ4hfNyEQk67PEb41jERPh/zgG/ZVo f88xaaVo36j8JDCJqp+4IJbtf+VZnvmG1hgzU= 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; bh=RJr2H0obYN3pbdXZsdt8e1JbQn4d3baYnjPncxC8Sds=; b=M0Cosc0vU0jlT75bkocTWRb+4VEqIwWHsNxsMPkZ11vDICuZ5jIzO7y4OzNPZg74Dn aU6YEsSanp6H9B14baRu90adEn+ZS6hoF4llr7iVAuZ1ngmWcjH2zoH6dxuTLEmTV3jK kJXAW9b3+y88iAe9l3r7fhSxBe6GB0/QVLSCke+P1gpsy6XiRR9qe5dB5wGVcDrQk1gM f8kx1HpLJIfsz1/8VYOTQxZoMq41Zxgma/ePsiZYjKRskVUMSd78XwnxjaBDvywwFguV Er5m1VYMQ3I9tUaTPn4EP4XU3BnVv6XAwrKGBnK1WiamuXjOaWvrLF75/kfiPH/Mxfi9 QAXw== X-Gm-Message-State: ACgBeo1+Lzd1W1jZvItMyb9pRLC6vJwRgaJnFxbbjnqUAOlBROtf6Ps+ S3HN4Sdsur1nzTCkUANBogLYdQ== X-Google-Smtp-Source: AA6agR6pEdfi+YcBAUXSwmbacRCfYOgXN1othTOfvrhzGRq2bayOsuG5Mnhl9CV1tJrsk8vlN3hMNA== 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220828_063343_255076_9D817B6F X-CRM114-Status: GOOD ( 12.18 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 --- 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>;