| Message ID | 20230427204540.3126234-6-dario.binacchi@amarulasolutions.com |
|---|---|
| State | New |
| Headers |
Return-Path: <linux-amarula+bncBCQ4XFG47UFRBA56VORAMGQEI3YEKHQ@amarulasolutions.com> X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 8484E3F334 for <linux-amarula@patchwork.amarulasolutions.com>; Thu, 27 Apr 2023 22:45:56 +0200 (CEST) Received: by mail-ed1-f71.google.com with SMTP id 4fb4d7f45d1cf-50684e6414asf8891088a12.1 for <linux-amarula@patchwork.amarulasolutions.com>; Thu, 27 Apr 2023 13:45:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1682628356; cv=pass; d=google.com; s=arc-20160816; b=LLv05guLjBq5fZOtmzRaJMJIw1Ha0tqhy1fByC666ZGbVmN6DHMgvdW4YVGt0usPdH OOMawvzEOV9Ro+tJ2soy60K0o19gRGQca1yiet/m5ehw3dC+CpMlAbvuHIwfwmhIxiHR ekvhOpya5Rp15HgCX65Z0oA9kbhU4xuX05vrNSNZexUgZOst9SjtvGxF0E/PgdlIFfLh KMUddBCvE/zlrjvwQ/IJEfHz9G+u5EcIpOSDbESEhrJQ5sUUHN5OMQ1bvpbchds8Yolt GBEkoJ6UlrkHiAffD3fQR6EEk7xWoMDVmTgS3S+OQ/ASpk8zfENWlJnRNCIdm1WKHjey vyhA== 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=s8ZZdPaeF3e2dhnbYBIHxs7C8k7CpenLMzkEhId1duE=; b=cr8Iu8VNYb228OVa2ZKvrKg/7zztJaR3h+ZxDYodEv46duD6Gg5bB3tGBLwC3W2Q2p Sor2SqPL7PhTzFLXJlfDEQHRELnfxHgZCSqgZtPemwwMYwEqPNfKAx6QRzQsVV6o21Mc GOuO7w3RFZlHvI1rIpJ8riat9l7qaj//mu1zzcj6RGTTwIEcXcT+CXCztLHPPlN/8fG+ +lbpELk5SvhE/MscHhxPTpzccJEDVYuoClQypbQhMfISsklnMXWNrE/tqsy0w9hE5KFG 9mbFd2lkNAi29m4m83rpDuA9Y2ZCTSRbk1Jv9i7xM85amlnmanQYk7QaClVveQLD8iWI iCLg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=YFXpenH2; 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; t=1682628356; x=1685220356; 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=s8ZZdPaeF3e2dhnbYBIHxs7C8k7CpenLMzkEhId1duE=; b=OH+wrUwt2INSXGMr6yVZJt5RjMzs3FYTZS8f2XNwYDkxVpXxCbiaqdyRuztwCLdfe7 FWY83vyBCSvijau6BOb5jMfRzgnxPMEsJvw9UaKNuf9JB6h8sJP+dymu2a50lheBo0lz 4Um60Pgd9dtBzbmfJfDVLGkP9NhNKYGc5db8o= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682628356; x=1685220356; 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-beenthere:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=s8ZZdPaeF3e2dhnbYBIHxs7C8k7CpenLMzkEhId1duE=; b=X2z7D3BAKAyf4n9J3J59s/WpCsQB2QgWsxPxbB9GGpNp1qIuBbX4kBixp+Xqj19bYW 0dOmzE/2l3du8GP3OP/qWI03I/voAi9XMqSJe8qqiGUyVAokWPZfgfYchGDs+knIRJH7 vv2oImWGHf8ELoV5Yk7zo+H5vnZ8xluj3Gn3F2NAyiSqpr8lpumIz0afW4ekf9q/mN48 gpge4Wro4c+zUhP0C2sO0fxqWChLU/mFydCY+ML/u47aAOAyUE2zGSTgt0TzWmsqwlK8 YH+R7H/xaYRA0rLtxdB3ITOEvBGjJomi9cyKCUQf3VGjzT3tN+t0ItneZbphtAcbnN/s gcZw== X-Gm-Message-State: AC+VfDynAcfkSG7NaLsagB2dS0BpkbVD9mmrsUdokzlGqLeCLiLIkPZH gOw7VHPEGZOIJvO+G0oChcSEPy8/ X-Google-Smtp-Source: ACHHUZ7jaaSMySgUBGPQy/U7hru8pHH/lDCnhb39BPkLpwIgBPSVXjGezXWFPiIDbRAncEJFyC74LA== X-Received: by 2002:a50:9f61:0:b0:4fc:1608:68c8 with SMTP id b88-20020a509f61000000b004fc160868c8mr1293963edf.1.1682628355932; Thu, 27 Apr 2023 13:45:55 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:907:a30e:b0:958:bc8c:ecba with SMTP id rc14-20020a170907a30e00b00958bc8cecbals1417385ejc.2.-pod-prod-gmail; Thu, 27 Apr 2023 13:45:54 -0700 (PDT) X-Received: by 2002:a17:907:2cf1:b0:94e:e0b7:96d6 with SMTP id hz17-20020a1709072cf100b0094ee0b796d6mr6534168ejc.14.1682628354412; Thu, 27 Apr 2023 13:45:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682628354; cv=none; d=google.com; s=arc-20160816; b=yhojwJZ/mRavQG8L/7vZ9q6zX1UfxcxyV+Gm30xxc21/1DFtxR67ex5eoIX8Mwbs9q BiyWh0ucJF18pkyH19C9yxrmqIkpNvRlL5lF3kw5N/vKvRiVmFDCb+syHk+EwsHdtAwY lH4CUgHj+zt78KGg/6so9zIYNDQNbfukKPD+AIDui4Qx4wdPeOXhAenjexGnwrj6UuPj HctfdyG/pUc7Hxv9k4wFkdWxjwZqnox9JoU0OTvS9BiZGYhI9Dc28k7hB9HiN2KejdXS 9yUzA0p90TYeD8UPbkUI4si9EUmqPQpZTYymhx8dPyMivS1CLF7cMHFxWfw+bM5CFo7N XQfg== 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=pOyJLwrnL8b7sS3XOE4C9Z2ANwLoqbgl4r9TqJMyALQ=; b=eMM8V6svgZAYgSERytykLRNiuOvrYe19JVJ02htyM/3QUjHfOTBYUw3TZCZrZEhoJO iV41n6Fj+80JShFawWMromRN7nU/lo1o/5SK3NjvbFHFlBjEayYTbw9Tk/hRvzpf67uV rbTIfcMaO61p1WeTJ74tIEjLxnqZ9RZopfMQimmH5jSCz3N0bQXS+SFtPPeAVVsVKXYC ymDkIyV0zzUAo5d0ffqK7a0DyxuA5CrRLF29WP9+NbRR1fkTVPKoncGuomEjxEmh8rTo 2zC/kR/YOq3UtqNmJJq61WoTPuGbSf5OFpHgX+GakWiUWFZbnJ5Glly/B98Gg1GlgPwD zhjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=YFXpenH2; 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 rv9-20020a17090710c900b0094edd0cfd65sor10783327ejb.11.2023.04.27.13.45.54 for <linux-amarula@amarulasolutions.com> (Google Transport Security); Thu, 27 Apr 2023 13:45:54 -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:8687:b0:94e:ffab:4ce3 with SMTP id qa7-20020a170907868700b0094effab4ce3mr3151905ejc.32.1682628354060; Thu, 27 Apr 2023 13:45:54 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-87-5-99-194.retail.telecomitalia.it. [87.5.99.194]) by smtp.gmail.com with ESMTPSA id s12-20020a170906bc4c00b00947ed087a2csm10171360ejv.154.2023.04.27.13.45.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Apr 2023 13:45:53 -0700 (PDT) From: Dario Binacchi <dario.binacchi@amarulasolutions.com> To: linux-kernel@vger.kernel.org Cc: michael@amarulasolutions.com, Amarula patchwork <linux-amarula@amarulasolutions.com>, Dario Binacchi <dario.binacchi@amarulasolutions.com>, Alexandre Torgue <alexandre.torgue@foss.st.com>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Maxime Coquelin <mcoquelin.stm32@gmail.com>, Rob Herring <robh+dt@kernel.org>, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com Subject: [PATCH v2 5/5] ARM: dts: stm32: add CAN support on stm32f746 Date: Thu, 27 Apr 2023 22:45:40 +0200 Message-Id: <20230427204540.3126234-6-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20230427204540.3126234-1-dario.binacchi@amarulasolutions.com> References: <20230427204540.3126234-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=YFXpenH2; 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: <linux-amarula.amarulasolutions.com> X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: <https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/post>, <mailto:linux-amarula@amarulasolutions.com> List-Help: <https://support.google.com/a/amarulasolutions.com/bin/topic.py?topic=25838>, <mailto:linux-amarula+help@amarulasolutions.com> List-Archive: <https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/> List-Unsubscribe: <mailto:googlegroups-manage+476853432473+unsubscribe@googlegroups.com>, <https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/subscribe> |
| Series |
can: bxcan: add support for single peripheral configuration
|
|
Commit Message
Dario Binacchi
April 27, 2023, 8:45 p.m. UTC
Add support for bxcan (Basic eXtended CAN controller) to STM32F746. The
chip contains three CAN peripherals, CAN1 and CAN2 in dual peripheral
configuration and CAN3 in single peripheral configuration:
- Dual CAN peripheral configuration:
* CAN1: Primary bxCAN for managing the communication between a secondary
bxCAN and the 512-byte SRAM memory.
* CAN2: Secondary bxCAN with no direct access to the SRAM memory.
This means that the two bxCAN cells share the 512-byte SRAM memory and
CAN2 can't be used without enabling CAN1.
- Single CAN peripheral configuration:
* CAN3: Primary bxCAN with dedicated Memory Access Controller unit and
512-byte SRAM memory.
-------------------------------------------------------------------------
| features | CAN1 | CAN2 | CAN 3 |
-------------------------------------------------------------------------
| SRAM | 512-byte shared between CAN1 & CAN2 | 512-byte |
-------------------------------------------------------------------------
| Filters | 26 filters shared between CAN1 & CAN2 | 14 filters |
-------------------------------------------------------------------------
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
Changes in v2:
- Move after the patch "can: bxcan: add support for single peripheral configuration".
- Add node gcan3.
- Rename gcan as gcan1.
- Add property "st,can-secondary" to can2 node.
- Drop patch "dt-bindings: mfd: stm32f7: add binding definition for CAN3"
because it has been accepted.
- Add patch "ARM: dts: stm32f429: put can2 in secondary mode".
- Add patch "dt-bindings: net: can: add "st,can-secondary" property".
arch/arm/boot/dts/stm32f746.dtsi | 47 ++++++++++++++++++++++++++++++++
1 file changed, 47 insertions(+)
Comments
Hi Dario,
kernel test robot noticed the following build errors:
[auto build test ERROR on mkl-can-next/testing]
[also build test ERROR on net-next/main net/main linus/master next-20230427]
[cannot apply to atorgue-stm32/stm32-next v6.3]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Dario-Binacchi/dt-bindings-net-can-add-st-can-secondary-property/20230428-044723
base: https://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next.git testing
patch link: https://lore.kernel.org/r/20230427204540.3126234-6-dario.binacchi%40amarulasolutions.com
patch subject: [PATCH v2 5/5] ARM: dts: stm32: add CAN support on stm32f746
config: arm-randconfig-r011-20230427 (https://download.01.org/0day-ci/archive/20230428/202304281111.wSsZVm5t-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/efdb48d32dc845ff8f52bfe8c7345b61c9671940
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Dario-Binacchi/dt-bindings-net-can-add-st-can-secondary-property/20230428-044723
git checkout efdb48d32dc845ff8f52bfe8c7345b61c9671940
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202304281111.wSsZVm5t-lkp@intel.com/
All errors (new ones prefixed by >>):
>> Error: arch/arm/boot/dts/stm32f746.dtsi:265.20-21 syntax error
FATAL ERROR: Unable to parse input tree
On 27.04.2023 22:45:40, Dario Binacchi wrote: > Add support for bxcan (Basic eXtended CAN controller) to STM32F746. The > chip contains three CAN peripherals, CAN1 and CAN2 in dual peripheral > configuration and CAN3 in single peripheral configuration: > - Dual CAN peripheral configuration: > * CAN1: Primary bxCAN for managing the communication between a secondary > bxCAN and the 512-byte SRAM memory. > * CAN2: Secondary bxCAN with no direct access to the SRAM memory. > This means that the two bxCAN cells share the 512-byte SRAM memory and > CAN2 can't be used without enabling CAN1. > - Single CAN peripheral configuration: > * CAN3: Primary bxCAN with dedicated Memory Access Controller unit and > 512-byte SRAM memory. > > ------------------------------------------------------------------------- > | features | CAN1 | CAN2 | CAN 3 | > ------------------------------------------------------------------------- > | SRAM | 512-byte shared between CAN1 & CAN2 | 512-byte | > ------------------------------------------------------------------------- > | Filters | 26 filters shared between CAN1 & CAN2 | 14 filters | > ------------------------------------------------------------------------- > > Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> I initially upstreamed this patch as 0920ccdf41e3 ("ARM: dts: stm32: add CAN support on stm32f746"), but it depends on "dt-bindings: mfd: stm32f7: add binding definition for CAN3" [1], which is missing in net/main, resulting in parsing errors in the "stm32f746.dtsi". This patch is reverted by [2], so please upstream it via the platform maintainers. regards, Marc [1] https://lore.kernel.org/all/20230423172528.1398158-2-dario.binacchi@amarulasolutions.com [2] https://lore.kernel.org/all/20230517181950.1106697-1-mkl@pengutronix.de
diff --git a/arch/arm/boot/dts/stm32f746.dtsi b/arch/arm/boot/dts/stm32f746.dtsi index dc868e6da40e..973698bc9ef4 100644 --- a/arch/arm/boot/dts/stm32f746.dtsi +++ b/arch/arm/boot/dts/stm32f746.dtsi @@ -257,6 +257,23 @@ rtc: rtc@40002800 { status = "disabled"; }; + can3: can@40003400 { + compatible = "st,stm32f4-bxcan"; + reg = <0x40003400 0x200>; + interrupts = <104>, <105>, <106>, <107>; + interrupt-names = "tx", "rx0", "rx1", "sce"; + resets = <&rcc STM32F7_APB1_RESET(CAN3)>; + clocks = <&rcc 0 STM32F7_APB1_CLOCK(CAN3)>; + st,gcan = <&gcan3>; + status = "disabled"; + }; + + gcan3: gcan@40003600 { + compatible = "st,stm32f4-gcan", "syscon"; + reg = <0x40003600 0x200>; + clocks = <&rcc 0 STM32F7_APB1_CLOCK(CAN3)>; + }; + usart2: serial@40004400 { compatible = "st,stm32f7-uart"; reg = <0x40004400 0x400>; @@ -337,6 +354,36 @@ i2c4: i2c@40006000 { 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 STM32F7_APB1_RESET(CAN1)>; + clocks = <&rcc 0 STM32F7_APB1_CLOCK(CAN1)>; + st,can-primary; + st,gcan = <&gcan1>; + status = "disabled"; + }; + + gcan1: gcan@40006600 { + compatible = "st,stm32f4-gcan", "syscon"; + reg = <0x40006600 0x200>; + clocks = <&rcc 0 STM32F7_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 STM32F7_APB1_RESET(CAN2)>; + clocks = <&rcc 0 STM32F7_APB1_CLOCK(CAN2)>; + st,can-secondary; + st,gcan = <&gcan1>; + status = "disabled"; + }; + cec: cec@40006c00 { compatible = "st,stm32-cec"; reg = <0x40006C00 0x400>;