Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp6637692rwl; Mon, 9 Jan 2023 10:53:57 -0800 (PST) X-Google-Smtp-Source: AMrXdXsN+iB0Qp5aM3tHgcRpVu0yniGTxRT4LYyoJvU7Hfe/CNeKw7qFpsHHtrF4U//pczhkO/la X-Received: by 2002:a17:906:9141:b0:7b2:757a:1411 with SMTP id y1-20020a170906914100b007b2757a1411mr63919134ejw.9.1673290437336; Mon, 09 Jan 2023 10:53:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673290437; cv=none; d=google.com; s=arc-20160816; b=iPvJFtPg1p8k8N1PMddm4Bn+e7Z0mNtpDzePGAxEduVZ0fGiPhktpMcTbRek0RLZj3 YjlnJhGruLbU22DwIyq4MxK/br/MZ/bx2RCI8iBH4x6Ux36rQlO2wR9NpDF0WZm2f4YZ AlRORCzD7Uba6JmgoKyjz0A3YvKFvTB7v7gXISWGCJRSm05C18jz3nTw6dXv57PzJ+Hp XWzGLdfbsUTi/l5wwXVRh26/6ko7YxYqB8owL1SlL8+NUIdtsNuF2vxALbJL/6ssBzhk GDBb64VVl3EQ9geGLck7WOuBXlrnfituB153rAanyRp8PzsWsVOhozf90ANVow9fC3Mv aIVg== 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=IyvoS4lwvIpyEoyklIwrERImFtUVOqbD9XwAm5ABwfM=; b=H/2EshxqelN+9v96MzEoB0jEj5tSDQ1EAtd8y9Ho5231cUDdfgcVEdnPow+fwFHlgR +gKh5qO6Ab71iG8x5sSQO5es3v6+vnhXkpCO8YYhTtwLEcUd4DbWlt/Q16AwyIPYH4O+ cVVjAsqzVmuHv2DLAu5BKN6/s6H9H8AA44LIy9dPgoo6UkpbBXzxmrhVVedwoHO4v87N qEBcnEQ9AJ16LZJJwLdLnAkBLayOE/7PugaoS03yFo6NxbaMdaHyJQYqsftjK9DMmwuH tcbIB+2Jvqfa+27KZ2nY79Fk/rBrSBd0FZEiYi0UmkwO0rz8xxy+MhV6s1uUXheSd6Ja acVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Em2qQJ7r; 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 uk41-20020a170907ca2900b0084c439a1d98si7273263ejc.454.2023.01.09.10.53.44; Mon, 09 Jan 2023 10:53:57 -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=Em2qQJ7r; 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 S237653AbjAIS1K (ORCPT + 53 others); Mon, 9 Jan 2023 13:27:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44502 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237435AbjAIS0d (ORCPT ); Mon, 9 Jan 2023 13:26:33 -0500 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 403E565B6 for ; Mon, 9 Jan 2023 10:24:07 -0800 (PST) Received: by mail-ej1-x634.google.com with SMTP id ss4so15068556ejb.11 for ; Mon, 09 Jan 2023 10:24:07 -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=IyvoS4lwvIpyEoyklIwrERImFtUVOqbD9XwAm5ABwfM=; b=Em2qQJ7rFEjYkZdoCry2iyVJCDZzqkWRMTzhgGNjO+cpHZb1MqFbrE3G8pZC7dkfKh xQjLkDRJr04LNOnP3omQC1x0RLQclqRc/G13V4NXXA446J5edO08vTeBMC9IbS1F1Rwu Dvg0X6VxJH9iChHXi5Bnr1oSSfI2gOpxEbOcU= 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=IyvoS4lwvIpyEoyklIwrERImFtUVOqbD9XwAm5ABwfM=; b=hocP9xWog+3m/hz+Us+ofZ7/fmVgLxp+10DNbd4O1RQ84RlLDqhHYm4aI1JlkBU9VW aQlYbbjvcTXpZa86DzzaGQC9AF69i3w78gtvrahmPW0TLo/OvWkNqXuc/iw4rDdEUnst K+7SV4rU4EXa44rDoedpz/ifWteXlwXJc0ne8xHZxy9Wy+QpBsjA4PWd10e5z1U5GPPT fEZKjEKaualf09bjW/fy0jLsLAasCIFWXgkKiSMhRl/W18g6bjuFDs+ohgf0+NhVziNj /0EKmzY0hoTLrZ3QZOOrBJCNoOTKUjUD9xUwFNseqgOuWTStE+56OzKhyijlc9TFCvE0 9HQA== X-Gm-Message-State: AFqh2kr7yXWfXxYqRpTBKVvPGal8CNQgC8z1l2C3CmWGi9jkeUjMT9/r K3Zh/BCptVe3fgJO+NjF2rtBMctk6rdGaFbRcVY= X-Received: by 2002:a17:907:2388:b0:7c0:e0d9:d20d with SMTP id vf8-20020a170907238800b007c0e0d9d20dmr53677519ejb.37.1673288645715; Mon, 09 Jan 2023 10:24:05 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.pdxnet.pdxeng.ch (host-80-180-23-57.retail.telecomitalia.it. [80.180.23.57]) by smtp.gmail.com with ESMTPSA id kz22-20020a17090777d600b007c1633cea13sm4093653ejc.12.2023.01.09.10.24.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Jan 2023 10:24:05 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Vincent Mailhol , Amarula patchwork , Marc Kleine-Budde , Alexandre Torgue , michael@amarulasolutions.com, 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: [PATCH v6 3/5] ARM: dts: stm32: add CAN support on stm32f429 Date: Mon, 9 Jan 2023 19:23:53 +0100 Message-Id: <20230109182356.141849-4-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20230109182356.141849-1-dario.binacchi@amarulasolutions.com> References: <20230109182356.141849-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 --- 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