From patchwork Mon Oct 17 16:42:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 2436 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 4B7A84147A for ; Mon, 17 Oct 2022 18:43:03 +0200 (CEST) Received: by mail-ed1-f72.google.com with SMTP id v13-20020a056402348d00b0045d36615696sf6519238edc.14 for ; Mon, 17 Oct 2022 09:43:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1666024983; cv=pass; d=google.com; s=arc-20160816; b=Y+Lh1zRi9UthH9x4he91maaoiJcfXCpNFJ1szNYoySE8ncGCZLspwllmwzzxX7NR9u MsyfVAQ9wGCQJo3LcZ6UvaUZV11IMrSR4PK3UvEHwwiOMgxR+IwuwXvRNRR6WgLnPxaC cxUP8cJP+uzdU2W+I4pWtCNGKjdgqVFH3/sL17EVXiogUc1GSIUdVj/tSeGl/tW5ocCq eGOvH7grYk3UHatlXw81XkqqL/zRH7VqwetsjyLnMPXNhnKtzHsYWsqZ0o8TYy6NuoXn 48G09E+NPY9uAclnrOseiIXsLGvLfzrygOZHGKO7Cu66eGyH5G1ICgCXb+ZVJJSByWZi ChKQ== 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=9uXyyl4mB0X1UXCq6iweUtQjg9GnC213tXfz4itOiiU=; b=q7agXjDx4Sp0a0RHSKa1Fk8XpZ+lYg5niDom0C+0SkZdNFrjDAwkF3D1Y1MuFTv26w vwo8c0qbuYbyCqy+fS2XtIYuWFl0o23UmhIqN4EB/eCPxCSkppS8HrAiEUC9wqU2Q67r YQfd14D0w3qruTyzdPHKVhQmhmEB6pcQherunXm26wYSG51A0dNGVncW/fTvIslcFznA /rQeb2TocoJncUR4F7Y7Lum1vueeapSUdd+8ivi0Pe+I5nevpogbhAPHvLj5adsp4KMC 2zmciwNdwcq8ediDj68+kW1GsCYwMdxc3eqjiXkn/2U0/KMWInawX2by3SCQHETYGW7o oO8Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="hsuH/17g"; 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=9uXyyl4mB0X1UXCq6iweUtQjg9GnC213tXfz4itOiiU=; b=Nf+LZeBt4JzQMFvvlpJ/1507tfGD/U3byURcJ+69+1XYhcIqyAGVUKcCcm1Af8k90o dfTO5CDTLMum4NH7VGy2uDFXoACQ47WxhAuzGB+eU1eaNmxdLzh8qpg0q7BO+wMTZEHU JbIrprmRdcr/H91nhPXOC+/rhQEaaGsdnwKxo= 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=9uXyyl4mB0X1UXCq6iweUtQjg9GnC213tXfz4itOiiU=; b=fKEjdC00T1MMAEeH0vaC2idbJfrb69cmtZbDK0NIFH70OOeHz8FNrR8VK67U/jJZfS HypKEBDw/gR7HLClBEAu4zO1G+mt1jOORMoJ6NMmXFfv/NydEHDgUyk/LoUM/RaJtyNW 2MU8bFPxp9AW+lUM6Y4R9irxKhXNFWB3c82Z+zjYmfcbAiz1SWoXK7WyWDbDrJTaZp+3 qVuKzCktYKT0JjbaTlfJR7RxnSC6M5vUlUZx18DLR/OaOMOIFVM0OiYzOXov3D8OFRCO zhT5/su7Zmf9Kvz0fAghdUWa5sVSxnIkI6DHLjDJUUTuNu0zQYKT4+IchKRGhh1fPAXb dBnQ== X-Gm-Message-State: ACrzQf1QBFapdju/6EbSBTTi2gfvPoYj2nB0G0jmE69OCph321X/ssr0 aBYJ05VmT8vVmUaHAaS3wGjgRruO X-Google-Smtp-Source: AMsMyM7EpYoAD14JuTTyp6M5E+XMyMZbYmYDE1IWzuv8PSwA3OHDwrGmkPuUQertpNfooFkbUkfdow== X-Received: by 2002:a17:906:846b:b0:78d:f3b9:aadf with SMTP id hx11-20020a170906846b00b0078df3b9aadfmr9505687ejc.731.1666024982922; Mon, 17 Oct 2022 09:43:02 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:430c:b0:457:99eb:cba9 with SMTP id m12-20020a056402430c00b0045799ebcba9ls11676207edc.0.-pod-prod-gmail; Mon, 17 Oct 2022 09:43:01 -0700 (PDT) X-Received: by 2002:a05:6402:10c2:b0:45c:3c87:721f with SMTP id p2-20020a05640210c200b0045c3c87721fmr11325783edu.251.1666024981769; Mon, 17 Oct 2022 09:43:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666024981; cv=none; d=google.com; s=arc-20160816; b=p3enXTI1SoXZBWBImo52gIJk3Iw4SZ+8H2pP+ykBjlWLNqQy7g6Ee0ZSMFhv7pXkxm TGoZ8qztws8cYCl6QYPu6/kb7Gpc9HYiXrma5NNMud1Ty2ECp8XtPSZ3LmWTqErBy/Jy y3zBUEAb08Hd2RUe8VhjSl6ma1tOLtSpNo44ext8Ge3lPDcSBrF/ft0l0QPmwxqA7m+y hn+50ruU7BKVWcD9/JvYcfaVHPQxVvaxZSm0KO7sxVxM2BwDxFH59OlIKhBwn/TTprGE nM4DWnPYlQIk7knSl+QHeNL+FE8a0Didztnx1MmU2p5y48cbsJ64/qZ1ROuBQJfEjBSH AatQ== 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=ytjq+5ZqtJJOKrYEaXmPKz3aw/q9ijl/XXCtqz4EuF4=; b=tuuy9Cbv0QSRw8uklwjrf3psLYQcdIClwJTszG6C24289uAfcEBlpydroJXgdowpPR wgX3DqxjMBz3k+St2+MMUg4iulp9R5wSObJlkTi0gM+ptDXWjuxqAR1T44pr9xqbct1W Cos/7SdMWRKabbhY+khGkFXvCzSMiJmT71PDy/QtW0IrjDhGXCLIpgq6qQViB7FWxD6p FuKk13EtOXvnc7LmsQoJR5EGIbJjZclUz7KLTrktcCMkMuh8438CbOsrD1vMv/rXCng9 WzKj4H6ZlO59Oblsr3qwarf9pDn/0scKkXUdyZu1Wti+bEYgsKXpCie81KXX16pfKPbr +mJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="hsuH/17g"; 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 r16-20020a1709062cd000b0078d3a2a56dcsor4079524ejr.48.2022.10.17.09.43.01 for (Google Transport Security); Mon, 17 Oct 2022 09:43:01 -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:a17:907:25c9:b0:77b:a343:bd62 with SMTP id ae9-20020a17090725c900b0077ba343bd62mr9568881ejc.660.1666024981531; Mon, 17 Oct 2022 09:43:01 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-95-244-101-110.retail.telecomitalia.it. [95.244.101.110]) by smtp.gmail.com with ESMTPSA id a24-20020a1709063a5800b0078128c89439sm6437388ejf.6.2022.10.17.09.43.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Oct 2022 09:43:01 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: michael@amarulasolutions.com, Vincent Mailhol , Krzysztof Kozlowski , Rob Herring , Marc Kleine-Budde , Amarula patchwork , Alexandre Torgue , 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 v5 3/5] ARM: dts: stm32: add CAN support on stm32f429 Date: Mon, 17 Oct 2022 18:42:29 +0200 Message-Id: <20221017164231.4192699-4-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20221017164231.4192699-1-dario.binacchi@amarulasolutions.com> References: <20221017164231.4192699-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="hsuH/17g"; 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 --- (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>;