Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp5110548rwl; Sun, 8 Jan 2023 08:44:55 -0800 (PST) X-Google-Smtp-Source: AMrXdXuBv/EExlq2IFv9UXLdk865XoibsI32UPCbV4w6aUtJfkLPKp+hWOU6nYqRPexwAiNDIwPP X-Received: by 2002:aa7:d689:0:b0:461:7ae:c244 with SMTP id d9-20020aa7d689000000b0046107aec244mr53661057edr.35.1673196295600; Sun, 08 Jan 2023 08:44:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673196295; cv=none; d=google.com; s=arc-20160816; b=Lh+4TzDCjonErk2XBn2OJSvY9CKTkTRV/uTJvoL6Qt7nTgtH6q0SKml+jEbRkbDcvG jBGgyFm4wRyf8CFLcL0e7AVk9vLgyHXtl/X9nHo+eoFSg/8LI8ummbyaYCnJkubKKw7c VMhA8grslfv+XwNdzkYJBSO7AGSKh5CVqnqJI5qBr57g9IopBOM1gd9JMkt8g4njfiK0 H311CLkfuAze27jBMXgDz+b4rKcCbmx9VyaYloFaPBYgbwXSRZqAYP0+vLI4KPegEvtu nEXiGc2lMC/Hsc3sJaSICFsYfIU0I9vj8OJHKOVYmMPjm3F1t3ifQZXz1n2jWc0h8cdt qnlw== 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=ytjq+5ZqtJJOKrYEaXmPKz3aw/q9ijl/XXCtqz4EuF4=; b=Ae4XQkw3vTbTt6OyVmrEWm9jhT8MlXExFnJd/Ix+hFzM89TQJPGpZuA5jsbXb3rE2T w9p/Wq6c2R+oA+V2lWkt2TsgLGidllXoMchGM6lsaESjrmAc7SKes4SeJKJC6OwIWSoo kfDGbVle+/Nw4QkGN/tndrZV/+aYRDXryhb40qj2ZYfTCk9s12ZPihcCkOUSXdiHD0Eo +vthq3UONThE0h/VOIFyfkeEtA7xp8qkNyZ7FKjmRSviOQOKOeRxL2DIEvOkXA7Op3KE 9MiXykaGlUTwvI9cdmfAdv2RR/rLdOZo2engodAMBippNgReUimQphV75Le3EXx+WTK7 Jjqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=nBxZMKG4; 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 z16-20020a056402275000b00483b197bbe2si9519909edd.122.2023.01.08.08.44.43; Sun, 08 Jan 2023 08:44:55 -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=nBxZMKG4; 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 S234231AbjAHQ0V (ORCPT + 51 others); Sun, 8 Jan 2023 11:26:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233389AbjAHQ0F (ORCPT ); Sun, 8 Jan 2023 11:26:05 -0500 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CBC4F3889 for ; Sun, 8 Jan 2023 08:26:04 -0800 (PST) Received: by mail-ej1-x632.google.com with SMTP id vm8so14577081ejc.2 for ; Sun, 08 Jan 2023 08:26:04 -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=ytjq+5ZqtJJOKrYEaXmPKz3aw/q9ijl/XXCtqz4EuF4=; b=nBxZMKG4Su3gcQuvTlNYvWV6p7aYI3RgYzZUCjj1g524It6NPjhM5uobWjWpHCObQM loxTQCIE9XEA/6FONiv3h7uTcqCO+HbOd3oqjkiw1SJCgHB89HGEkzlmJwo6tIwFatTW X79104sXn0Y52iCxX+ZDporPlQow5Nd8/4AEU= 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=ytjq+5ZqtJJOKrYEaXmPKz3aw/q9ijl/XXCtqz4EuF4=; b=WMhC05zrNRD2rqgG0YzXTZWaUXoringevfzGJBRo8c+fAsLz7TInrrVemFl/GEK61w QxVa/+jsS5cXfcaK59Hu9T/0FmtcWYJEqNS97S8c2mDdwyb/FPQc5kaoDXYw7dWdvIWX 0gv80z+H8RswZUdVYqQky7PE7Qjim4InmIBD56a6vH6JnPsVoPPYtdT6Uk5KUQhZg1aQ naM0dRAXfQtd+7fQxguBLSJsGf6Q0eJXqHl1zXDQtPIQZpYVoHnNotWIntgDVLpTr/yk qCZ4VRDM+EktVbVCxzFtTMogwyldrEKZoic+zU/xTp9ugX7j+0gFZGeySumVBgsXb0LT odSA== X-Gm-Message-State: AFqh2kpF2yRLoqDq5FSBhMo+40mML9JxUpzV/YoTQA166xJu2ze02hHW rT/OzlxbXUF5rZu3LvGemBmJbQ5vx4N9Wqd8Eec= X-Received: by 2002:a17:906:1398:b0:84d:47e3:fe49 with SMTP id f24-20020a170906139800b0084d47e3fe49mr420984ejc.39.1673195163226; Sun, 08 Jan 2023 08:26:03 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-80-180-23-57.pool80180.interbusiness.it. [80.180.23.57]) by smtp.gmail.com with ESMTPSA id n3-20020aa7c443000000b00486074b4ce4sm2659614edr.68.2023.01.08.08.26.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 Jan 2023 08:26:02 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Vincent Mailhol , Amarula patchwork , Alexandre Torgue , Marc Kleine-Budde , Krzysztof Kozlowski , Rob Herring , michael@amarulasolutions.com, 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: [RESEND RFC PATCH v5 3/5] ARM: dts: stm32: add CAN support on stm32f429 Date: Sun, 8 Jan 2023 17:25:52 +0100 Message-Id: <20230108162554.8375-4-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20230108162554.8375-1-dario.binacchi@amarulasolutions.com> References: <20230108162554.8375-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 v4) 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..ce08872109b8 100644 --- a/arch/arm/boot/dts/stm32f429.dtsi +++ b/arch/arm/boot/dts/stm32f429.dtsi @@ -362,6 +362,35 @@ i2c3: i2c@40005c00 { status = "disabled"; }; + gcan: gcan@40006600 { + compatible = "st,stm32f4-gcan", "syscon"; + reg = <0x40006600 0x200>; + clocks = <&rcc 0 STM32F4_APB1_CLOCK(CAN1)>; + }; + + 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"; + }; + + 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