From patchwork Mon Jan 9 18:23:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 2623 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 7C8193F046 for ; Mon, 9 Jan 2023 19:24:07 +0100 (CET) Received: by mail-ej1-f70.google.com with SMTP id qw20-20020a1709066a1400b007c1727f7c55sf5937508ejc.2 for ; Mon, 09 Jan 2023 10:24:07 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1673288647; cv=pass; d=google.com; s=arc-20160816; b=l+u35KAqKfWdzeI5Veo5Mt9msXNmdKMU0h+8d5O7cjoqjLWXU57hKsIfPFvaQiaf8D GAsxZF+FWmLEgVEn80IJY0x+rlWy6AE6j1GJrONVZ7k3AfWul1YiL8gWSB4QAh9cl1Tx efLec+26h242n1ZK1JzH0xuJ5V4Csge5N8W9616eysxSAoQ9pYnf/YbcmgzpfDTtjOCR zsWz+uAgufTlzCwR0hMgZtLNOgJMwYZTmn55N8h0RqsLT40P1+4hjzwZh342lDcG8n8O +4TnyKJcGqhOfWG2wd6gp6wjoKqxhb9cSVJsB5IBNGYjb2WwadNFPdhOq+1lQ/pBOJdc 5RQg== 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=ugue1CKEzewzzqLNpI93kqdEXEl1eAudvWGcYk3MuuM=; b=PJzCkIemV2aCFkv5q+j5+442SI9AP5Jpf571u9hgt4CzBG9hlZ3zYM/S3eMKpTk43u jP519tPvvE6qJseJDVKMM6IAsWx8t15kBA+bFtEz46MNNTitoHYdMffMKF2UczO87C3z /i9EAMxljrnIobRiDCTRnj4jil0sei3nswl3UGy6oLqXQZHFdHcsWVBcz31Cmq44PVd/ pUKwvVgXgh10VvrL+s3Ftx7Z+kJFfWQuZxOUK0s0YqspdA/Fygk18CN1AGUK3Labsk1y EG/nci6a9607UQxhoXeHBJ9IfgX0cWyERibus14S4SuKYl50TeNUv7w/gFUtnlIBHrwZ SHbg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Em2qQJ7r; 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:subject:date:message-id:reply-to; bh=ugue1CKEzewzzqLNpI93kqdEXEl1eAudvWGcYk3MuuM=; b=pyRaI9Zz/2Gqrp5ZIhknXtqEvZ6sN6Rw8zJv3P5cppjwAgwtbMFQvI+raHltO5ipVm dRCItD+5n/0jZuirPvW4Ay3YCtk9KmWxi2mKBISZU4Jo0AZ4HzLT06ZSeMVx+/r4ILyM Dm6q3DI+fnv35wKL7Q4SkYoYHlrojFPIT+v8A= 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:subject:date:message-id:reply-to; bh=ugue1CKEzewzzqLNpI93kqdEXEl1eAudvWGcYk3MuuM=; b=D0lcTZI/d3dtbQ9mojVOKSObXMvytIicpeGAhEEAI36w9UTK8HK/BV6OgrlQ0ti10D yIWeRvoXiP2F8YIF+pb7zKzlcNT8L9VL3m5lpXdxOR6wOhdt8avaHlizZW5P3JL2dwDE hyZZ4PwxVVvgnpPVfMyQoEkV7EPzp1/DkhzoWxC3ohivNc3kgcb8Exe1F16Qr8VmGQV8 OEvpoA8+bHW3yAEOUNZpx9UJ6kMDn9peqF5LIV7BEj8k3N65/txfbapocWu9ld0jWqPD f37CWbib0Ucezm5WFkZ+psyMcIDwxFy7GjICG6AC3o9wPr12IxFsUz3TtHHRlMjkP8/b TQDQ== X-Gm-Message-State: AFqh2kpPbJ1htcmt9RPcvbuN4X3WNDAXgZI8eUFcpQLn8vonvLvtLmON T0g4nPzH0FtJMnRG2RP2dg1bSw09 X-Google-Smtp-Source: AMrXdXthXkFI3yEc4jJMREe+XhWglD6Sat5T3pf8oH6UOjvUKAUiKXncITJmSqrti0qA2/2xpsZbyA== X-Received: by 2002:a05:6402:34cb:b0:48e:c20e:3fe with SMTP id w11-20020a05640234cb00b0048ec20e03femr2163430edc.151.1673288647058; Mon, 09 Jan 2023 10:24:07 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:51c9:b0:479:6c1:ef04 with SMTP id r9-20020a05640251c900b0047906c1ef04ls1234609edd.0.-pod-prod-gmail; Mon, 09 Jan 2023 10:24:06 -0800 (PST) X-Received: by 2002:a05:6402:4503:b0:472:d867:4c3d with SMTP id ez3-20020a056402450300b00472d8674c3dmr61934023edb.40.1673288645881; Mon, 09 Jan 2023 10:24:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673288645; cv=none; d=google.com; s=arc-20160816; b=ZCMkYRNHAj8i2TtJdyF4amBwtnPQJYP4ky5nGowXy50YS8/vlZQutkva3qRQ4soTMp uIwyGST+ELCYhHaSfoORE2eKyPed1Rr38DoClVd+ftbiburuGyHi0UIjEQcKtHvYtaJJ tYXf87gz2ru9ScZDWYgzR9Kq/f7xA7gfujb0upyhfNAqddmygzZUO8jJDsVZdu0W2RC9 s10D7rAlqCM29QlDjWdHnSnV6k+c8aMMEy868aZxhzE1SvcG/n3dp6V5Is/GNDR1zvVi YKTezayh8zYoj1+BLjqnlkzwABEw7ThHFbyp6IODOvQWNNytnxHdQ85ZcLtH2x+VA/eS 5mLw== 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=IyvoS4lwvIpyEoyklIwrERImFtUVOqbD9XwAm5ABwfM=; b=ITXmC4tmLGQxNTEoZBUezYWsCy3MnSOdE/0rz3Rh4IJbsX1I5aNg+EwWwPjaNSKOls mk+3KZpf55imcBXf211tQa4piy32ddD4v81YkxUUTd2HL/Dzv85eF2c948Xu0DlNrGYi 76YiZKaS1tv0THvGsazfUE+tt14XYgFmpljS73tNKCLGbtuyI92/G+p0nk9+1XqiaAjw Z7PSIPzz356D9GgQyg8z/5llDXKl6rgjVfC5dSjXHl85MjPPptkhC8dCYULOmbFkPqD4 OdvAehP4qT2MuU/IZhT0tNOt4Mi49Kqi5HN0uV4bkZDbKEPaSv7FIn90Kt/zpx2/iK+v 8Zxg== 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 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 vb4-20020a170907d04400b007b8e06976a3sor3983681ejc.49.2023.01.09.10.24.05 for (Google Transport Security); Mon, 09 Jan 2023 10:24:05 -0800 (PST) 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: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 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=Em2qQJ7r; 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 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>;