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: 2866 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 1FFC13F259 for ; Sun, 23 Apr 2023 19:25:41 +0200 (CEST) Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-301a3715507sf1818015f8f.2 for ; Sun, 23 Apr 2023 10:25:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1682270740; cv=pass; d=google.com; s=arc-20160816; b=NKEMnU3NGPgkS5OZtX+86LGgklCuOEKCiEcFpmJhNqMC62Pm6710Hrsv5R/qTGWlAr 6OvtJauRBMbyhw+MunH8PcHvqSDX9bkP5pOVn7YRaM+ALROk5KZorgCc3XirWNJSvYIt fbZ4ImZjfkWhM7DzfCk3JZKPVJrcl3GAKii7hqp350wDcEeRy0Lvou6rP9jpV+DhTVYZ w+CMpuEDbwAh39pO798KLGxeSh21/RNKcjPCMZYoxBxopWfBPuSPZA+dQk+5vLtBRixY 3sYHo2Z1PGNn9Hnlu6jgYmsPh0mznFstX+QudmFcm5WrQXbzXXYNTuZZmftMTduMcO7X Lltw== 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:message-id:date:subject:cc:to :from:dkim-signature; bh=09IQm/PV/bYYtvDF0uOR/bu/ih5L/nkpspR6Zfhgnts=; b=y3LLwibsD3kOPxc/vVC6ZaAq/0NSQPX4nVrQVQhwx91G0edqrVkfBuvGCPNEja/eB1 eicWIxJXT7/8uNWoMJoyC9HUwYMc/14VVCIv08jSsqr4pWoVe2gai3WWyI4LFCoIGVKo sa1lOvAfHRbjWf4YesIBHIO+oPIL2N14FAqHP74YJZrtoHV5BYe5rhaw7InXs45IzG0s 4G1ZBkyEJdZ81HnUbDEPVW9bg+Fh7LrpmKwnUfepXvxnlUsVQPm+FSoSEmw0CHyC3XdF t+BHvC0fAT9CCUtbwvKO5GOhFE18FfBORotpoZ1aep1al4jEmNLGYkiY/kkZ7srKp0Lt YNAQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=mH0TBJ+Y; 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=1682270740; x=1684862740; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:message-id:date:subject:cc:to:from :from:to:cc:subject:date:message-id:reply-to; bh=09IQm/PV/bYYtvDF0uOR/bu/ih5L/nkpspR6Zfhgnts=; b=LV6beopqUl0GUNVOdLJTgzUgio4EeEzRnLy/Sb7t2A9dAhP3Y6H1VwTgmKftGYGFER vRIWUJhrWKpJsi7og3VqZ9LaG4f0Jsgnxoi8VP9O7lqacojcx4x7u8gA0dptxX8KN9ua boJYzxeAqZiLW2cp4XhI18c1O29yZroAULyaw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682270740; x=1684862740; 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 :message-id:date:subject:cc:to:from:x-beenthere:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=09IQm/PV/bYYtvDF0uOR/bu/ih5L/nkpspR6Zfhgnts=; b=hCuDtufdK7vVjbyCmHqs2Be2mBOD5o8UTlRr8V7ef23CVCflMXvwmUzbvSw90NiQ4e zTfkIy742aB5fxvvkIqiDXYFsEHTi/PBbqaYYl0Vkz6ZD428ivesvCi/qChrv4BT0HrX YphgSYTzhDNZSeaf41sSnylSyN7e+67CdwShC7TUKT5cLp+efICWfnNzRqEIVT+zyxMY 1H6ccQxup4yXXzB1SObvZFrje4dsDgmBLOdB0PtCjbqy1wpmATsQRpRcVv0A4fcc3oD7 wSFWWdbAp1u/ROD7ZtSRypsUQ2+En7+grAMGx6g8A8nxJ4kYWl1nRNxgzsab0h8ZLifA WOSw== X-Gm-Message-State: AAQBX9eyvcLwac1oFquIXp5L8dLSDq6BQw/FGeOhA9lgjNwHUpiB/RZT ixISh3rcHqADhvC++xj/xhkTkmWe X-Google-Smtp-Source: AKy350YEzeJRmdyDeWkref451lTLgB8f8fxTMolv/N/GdbnoJpc48XjFNQg/tir087btU0vNzGEXYg== X-Received: by 2002:adf:e0c1:0:b0:2e6:63d5:261f with SMTP id m1-20020adfe0c1000000b002e663d5261fmr1822058wri.4.1682270740438; Sun, 23 Apr 2023 10:25:40 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a5d:4d8a:0:b0:2f4:1b04:ed8f with SMTP id b10-20020a5d4d8a000000b002f41b04ed8fls14083847wru.1.-pod-prod-gmail; Sun, 23 Apr 2023 10:25:39 -0700 (PDT) X-Received: by 2002:adf:f749:0:b0:2f5:4b0b:a323 with SMTP id z9-20020adff749000000b002f54b0ba323mr8448875wrp.7.1682270738997; Sun, 23 Apr 2023 10:25:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682270738; cv=none; d=google.com; s=arc-20160816; b=xywErbn+TNLzfheAoYWowjjfDJZpDxGaW5K2CYRr3sm1s6p678c7R5zTna8utwHB1Z u/mYksumI39+Mi0zFWYlDPsCUi+DKQU4HkYWtOq4+M42fE2vz9wScD7QdKUFVmiCq3Bn 2LPsaZCC2Aaf+XB2LVsk+RRGQm2xb+mZauVi6YR6aWkOiGiLgEAO0zi1CG1K+9pK4BCQ 09a+/BPfPvavEiIw+jScW/dA9YJCSFjX9LNgQKMx3XMtVtEgT1PTUCrPPG0Z3OVQjzZ6 3ovv6k8PnuUEvCakt4mX4qKTI0cUjCh9pMzq5kAqa0GIcGLTvvaX7ipqhZ96N9xht1sF CLlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=uL5yPRaPsceCGbvCtDdOlsKWMRHlRugtX8iMSJPTZDk=; b=Nkvri5uXGkoRB+r8B32SI+RLTkzm89bViClgGg6RR9MzHuS7krNLSwhJ/Bm6hYqi3/ 6TIj6TrOuwkaueCauvv6D7m7XeQOFRb5nzx2VRUx3eggEcFe2bhkevyyjvuqOZWkXJuK 7+cR1oZW9EXOe5unJ7gqgkot4h4cXnkxXt9hH73Xt250+vfA2tDvNs0F+kx+QAMpeIGU HBIrUCSFG0LwJBuEz6IyKwNyA+OZY4TeEYgEAnCUwVxJKFrcDRBAKcVSM4QsUvfoX4K9 pkdhjhWcGyOvw1DBiKBoeg7VUP3ETDNjhzER9nIfeGgbhyr3v6KMox3byuRCbfXjcdaJ rwEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=mH0TBJ+Y; 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 v21-20020a7bcb55000000b003f172ec4029sor2261379wmj.15.2023.04.23.10.25.38 for (Google Transport Security); Sun, 23 Apr 2023 10:25:38 -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: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-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=mH0TBJ+Y; 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: , 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(-)