From patchwork Sun Apr 23 17:25:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 13221440 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BA3B0C6FD18 for ; Sun, 23 Apr 2023 17:26:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=vLEYCqifCZh/OsNywGAoedH2ytEgfYlIm+acx46eOXY=; b=30uumfXgaRiocV He8770/ojKGIPs42/niEQz7+M7uZHb5wnfaILGlwlCcXd9DIfOPMzWa+DxlgZk0cmPZwlYKlMSD/a /7fRswS9dEyGOSW6Ba5+/4ZyPsbpmSUoz2++5f4D62TBpW+pSwtHQrxS88z1XzZbmcT4iY9mL0Rrq doUVgyW3VCNqVf1dIdRepurnFlH/eOOLOV8ZBLARu+yuaHVq2xYcIVdHusdFa+nAmJ9WYTomupGlq XtHhqgvWcJ3bv5dZTM4mVyvN5eJ/wWS9RCt1TcHtudKLwe2KqSX3ziQW+bjU8z/SSujrUXbBXOXDy qLnHSGzXAwiaybD435eQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pqdT6-00EYnf-2V; Sun, 23 Apr 2023 17:25:44 +0000 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pqdT3-00EYmn-16 for linux-arm-kernel@lists.infradead.org; Sun, 23 Apr 2023 17:25:42 +0000 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-3f19afc4fd8so6737355e9.2 for ; Sun, 23 Apr 2023 10:25:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1682270738; x=1684862738; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=uL5yPRaPsceCGbvCtDdOlsKWMRHlRugtX8iMSJPTZDk=; b=mH0TBJ+YAOpAbtbc1vKOUVVwzrk15k/GVhEPrxPHJvV1gC4gYIpH8Jn37Y1287nzdZ uyd2mE82dzvqUKHv5JESijMtiCwVlPHGKy7Hv+b1CD7YGIbgTTrPAjzad6wzxpbgYCaS 2mzyqaG6llYkQOqYL7XWP6exZu4mULi+zs/JE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682270738; x=1684862738; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=uL5yPRaPsceCGbvCtDdOlsKWMRHlRugtX8iMSJPTZDk=; b=jZ3o4ln5E/s1zICRynXXbtFRBiu20JeO32pmmkUPCqGJwQWpseXpYUd5o7Ph+TSxav otqvdF/YmsIY+Pfzegq2yQ9AFIwZTbDEo6mzRS7mQRPeEQiqYU/kVMi68hKPwWGP4BGQ LpJ9FndMXk1WbsCwdW/OjAn8orbRWhy0T4THTxU6sYZUX3Cb/KgGQKjbskMSEOckyehn bdZRjyvRso2P5HodMLA/SgxCtjVbKmc2st54kqoEQYlb+XJ2jrgVeuk+cnrCh0KUG1OS e+47/3o9HsBrX1y4j4+rChTByPv4ivz8TCQSlmJyftIIPzyY+pMfFaK65i72ZsCVUwyf Ts3g== X-Gm-Message-State: AAQBX9ceBD2D8Ok8mcMCmaJ8i0flM7GeL3h29bFuidgO2FQ9GYIwrlpo MmV3MLhkkaMXEmguG/4y8Mfgpg== X-Google-Smtp-Source: AKy350YCZkiNToumnXq7+bIHyotRHqEZokos7hy69QN8FWGz3YKB3GeKCYoy3JtFDIpfTe7nhp6uOA== X-Received: by 2002:a7b:c84d:0:b0:3f1:7129:6b25 with SMTP id c13-20020a7bc84d000000b003f171296b25mr6361534wml.18.1682270738546; Sun, 23 Apr 2023 10:25:38 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.. ([37.159.119.249]) by smtp.gmail.com with ESMTPSA id j32-20020a05600c1c2000b003f173987ec2sm13511653wms.22.2023.04.23.10.25.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Apr 2023 10:25:38 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Amarula patchwork , michael@amarulasolutions.com, Dario Binacchi , Alexandre Torgue , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Krzysztof Kozlowski , Lee Jones , Marc Kleine-Budde , Maxime Coquelin , Paolo Abeni , Rob Herring , Wolfgang Grandegger , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-can@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, netdev@vger.kernel.org Subject: [PATCH 0/4] can: bxcan: add support for single peripheral configuration Date: Sun, 23 Apr 2023 19:25:24 +0200 Message-Id: <20230423172528.1398158-1-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230423_102541_449713_DF96D3C6 X-CRM114-Status: GOOD ( 13.50 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The series adds support for managing bxCAN controllers in single peripheral configuration. Unlike stm32f4 SOCs, where bxCAN controllers are only in dual peripheral configuration, stm32f7 SOCs contain 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. The driver has been tested on the stm32f769i-discovery board with a kernel version 5.19.0-rc2 in loopback + silent mode: ip link set can[0-2] type can bitrate 125000 loopback on listen-only on ip link set up can0 candump can[0-2] -L & cansend can[0-2] 300#AC.AB.AD.AE.75.49.AD.D1 Dario Binacchi (4): dt-bindings: mfd: stm32f7: add binding definition for CAN3 ARM: dts: stm32: add CAN support on stm32f746 ARM: dts: stm32: add pin map for CAN controller on stm32f7 can: bxcan: add support for single peripheral configuration arch/arm/boot/dts/stm32f7-pinctrl.dtsi | 82 ++++++++++++++++++++++++++ arch/arm/boot/dts/stm32f746.dtsi | 39 ++++++++++++ drivers/net/can/bxcan.c | 20 ++++++- include/dt-bindings/mfd/stm32f7-rcc.h | 1 + 4 files changed, 139 insertions(+), 3 deletions(-)