From patchwork Sun Apr 23 17:25:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 2867 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 6505F3F259 for ; Sun, 23 Apr 2023 19:25:42 +0200 (CEST) Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-2ffa43cd733sf1936691f8f.1 for ; Sun, 23 Apr 2023 10:25:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1682270742; cv=pass; d=google.com; s=arc-20160816; b=HxcgL64BreSFJArbrBkk+AOAxzC4iMJJngk5pPyBCC4sii4mvc4uJbJvdiHhuld+IT r7ZWPBZ50UYsL1Dd0rTpzSgUTbpIMoUpZV5vcKZTBYruDuprcGx7K84btQVqON+O8ASU eJYJ6nfFv9GCDOBffzuxk1ULGK4+IbzgjP/M7fseVIkFZOrfJIewOv/azr5ImPhBYgpV RbGNYwbswZrIO7hKgBITdqj/CtzXr8C34FhRdhVT73gwqCax1iiVlbLHqNz3P2z9l8LO iJSF97t1+wJDld/IoAnkZ07XkhiExucEmqQJL3iiXifMw4zWwlCWrfrdrv5Oe4Sny7so kxmQ== 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=dgfMc3LzNiY3MoPcEfRGWpciG09UihEWFxQK8iIzFNk=; b=pQrBSQRNGzUeUepS8hGlOD10cp5Xbd0Iqzoqya3Vf6VQefvL3Ws/A2/mDB4NzlLMoB 6IVOw3ClTuii5YisnDVsHQZ6KkeOLqcdG2Dta2qEQkqQYrVf40pZr90FctsmWr7d5G5G qZawDkSzxL5tMsQjH3Vui0oBFMid8RNcvXn7ZPsDawKwotBbfF6EJIIsC9zEVznS9eFK I2rQVv7L0tiz53cFk3TMb5X1E4BUiNCoHun7+jAE29akVm9edxUoYA+JXYu15JOo9ug1 +Clqy4IlFYzTGM6Bx/apOLNZEPZCDSrLOiweVjVyUrW8lyTS0uAmpNGb03yZaXPo7Lar NmLQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=JADuU+he; 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=1682270742; x=1684862742; 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=dgfMc3LzNiY3MoPcEfRGWpciG09UihEWFxQK8iIzFNk=; b=FRPFjFHcLlt7+BtZ38ujhOKF5H65K0V+gFWVjxLH0yMnQAbbf8T1HDQir+tpJDRpbB Q4FECwNltelCsadWlZ1xFtsKKwm4Qs5sEAZvzMcfcmp89mez7Jl3HCPjC2S4t9t4Uc8y Ne+uwYxybanUZyTmuhK18w/rtNY/y0klEV/AU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682270742; x=1684862742; 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=dgfMc3LzNiY3MoPcEfRGWpciG09UihEWFxQK8iIzFNk=; b=FkbALZyI/vCc5g3JWsOXgI7j3wONv32FqLpefE9sB+pqdA449UsAf2CqHYxXn2MQXr dMzjB7GqPZqTVzUZ5Lw5+uV0mjv/psp+QpQdXId048Z+6SpEjbDhY2wS72GCpBaST6aF 07ETvYi99aBSZg7DL6+4M/KEwO9gYUzvz8TCwz5PRawQULBiiqk7xh4wopM2HJ7r0Vwj am5SbdcYd6ePtov2vyQNpYoLipKZeH1pF5joc35RkZWA1/JxDkVFABrBVPfD1YwKXgYf pT7QG0h83c3C2z5f06I5SinbOdULTefyam6PJ2vzN68eH79CDdsf4HsOubY1Zx+KRrdi GzMQ== X-Gm-Message-State: AAQBX9d/QsSUBpx9WwnL04DiPuYsStrYZXckHnKLEyCAy4ScH2O6EM7N 7qbhq/8MbGy6vyptYBvmxmbhcYsq X-Google-Smtp-Source: AKy350amKKRAOgVOwPzLFMyCaF8wcfGHJkNXWF7gtgINDOUfFtHv5BVRbvvlVVEvdKU33KjfDX1UXA== X-Received: by 2002:adf:f50f:0:b0:2f1:d979:e2f with SMTP id q15-20020adff50f000000b002f1d9790e2fmr1802777wro.12.1682270741856; Sun, 23 Apr 2023 10:25:41 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a5d:6f0f:0:b0:2f8:883:9c9c with SMTP id ay15-20020a5d6f0f000000b002f808839c9cls14100704wrb.0.-pod-prod-gmail; Sun, 23 Apr 2023 10:25:40 -0700 (PDT) X-Received: by 2002:a5d:428a:0:b0:2ef:f9d:6adf with SMTP id k10-20020a5d428a000000b002ef0f9d6adfmr7636455wrq.35.1682270740470; Sun, 23 Apr 2023 10:25:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682270740; cv=none; d=google.com; s=arc-20160816; b=rwbYMdAV6J+5xODeQvhOKsbKG0H8konz482ELHOOHUltvNGGXaxgldzS/WS3pJRR8W H6N+LhL01PReOC2aYzcfpvdgaUTccSiua6Yg0Wiobi4RXq9tF1XSk3lrlHCwjRk08m5y xZa6WChM8KzS2dJZbTLKzI+z08KZb/j0NlwSfBLLzTXTMwuYNSy3x22g5+Dc+a8ZrmCE HE719K9lsXIQMYq12JMDtQZbMrSnkucf4553NwrtHenNxNR2jBx/wsr5xa/KFhgdYgT8 DgM3jpyY/MVG465EFFUABgMtJ3Paxz8kmGBtGxGtimROuRoNxi58fkwj2JMEVGIkSLv8 WxCA== 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=6edtHrRUhMOVgTrX/B7WTyKMw10ZM0V+1t1+5ZMKBJE=; b=dDjfuvRAbxlVG77i4Kxasmb6XZ4pSSgSBJF3HBJuB7qRULPd7cv9a2v1iRHEH1gwEh gkC/2LfNj2c0irgFa2mSAfwibzZVRyy6PZGUax70GlnaNg2QsvNOB4auASBcX8mfgLWh VaeRLYI2kf7YOnZ0G1vG1T7uc9AMpOWnXxsDd9tCJrjSQ39LYLyiv1ZfENf8Mt66u8vV iVQlOJN/oLzKztxZC4+sV94KxVuZXsUxZXOMUe67zjHipkG4McrXTwuvWxegNCMcEBpj z+z12C7bDZJlNLkkeYG31Md5Fd1imFk6PxL5I9VjIM9L+j9S+ag/wqIIrsze2EN/ErQr rRyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=JADuU+he; 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 s15-20020a5d6a8f000000b002f00e4f4161sor3342483wru.42.2023.04.23.10.25.40 for (Google Transport Security); Sun, 23 Apr 2023 10:25:40 -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:adf:e28b:0:b0:2f8:24f7:cc4a with SMTP id v11-20020adfe28b000000b002f824f7cc4amr7634427wri.57.1682270740105; Sun, 23 Apr 2023 10:25:40 -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.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Apr 2023 10:25:39 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Amarula patchwork , michael@amarulasolutions.com, Dario Binacchi , Alexandre Torgue , Krzysztof Kozlowski , Lee Jones , Maxime Coquelin , Rob Herring , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com Subject: [PATCH 1/4] dt-bindings: mfd: stm32f7: add binding definition for CAN3 Date: Sun, 23 Apr 2023 19:25:25 +0200 Message-Id: <20230423172528.1398158-2-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20230423172528.1398158-1-dario.binacchi@amarulasolutions.com> References: <20230423172528.1398158-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=JADuU+he; 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 binding definition for CAN3 peripheral. Signed-off-by: Dario Binacchi --- include/dt-bindings/mfd/stm32f7-rcc.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/dt-bindings/mfd/stm32f7-rcc.h b/include/dt-bindings/mfd/stm32f7-rcc.h index a90f3613c584..8d73a9c51e2b 100644 --- a/include/dt-bindings/mfd/stm32f7-rcc.h +++ b/include/dt-bindings/mfd/stm32f7-rcc.h @@ -64,6 +64,7 @@ #define STM32F7_RCC_APB1_TIM14 8 #define STM32F7_RCC_APB1_LPTIM1 9 #define STM32F7_RCC_APB1_WWDG 11 +#define STM32F7_RCC_APB1_CAN3 13 #define STM32F7_RCC_APB1_SPI2 14 #define STM32F7_RCC_APB1_SPI3 15 #define STM32F7_RCC_APB1_SPDIFRX 16 From patchwork Sun Apr 23 17:25:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 2868 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 10F053F259 for ; Sun, 23 Apr 2023 19:25:44 +0200 (CEST) Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-3f16ef3be6esf20898755e9.3 for ; Sun, 23 Apr 2023 10:25:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1682270743; cv=pass; d=google.com; s=arc-20160816; b=mRNWRG5hYvfLm4O88iB3EzMnzR5qBayjfB9FBKoQhORaxXNFioEMua8X74hu/ftMra joxp1trRZvwQXsfNm9Cn8/brUH6engomMqxBI7vf7d9tVF7M1gi1gK9kRxT6V8YIeHgo yt/7dyPX2emk+aN6bvYhWACKx8+LMCgpzJebXRYuNnWqnHF/JUuUmPc7QTd5Id+soHOy aO/5iAHZWQQpbb2V4vg17Pg0vNX6pDqN8R3xwMqiZ8G5ZsBBM55a7RJhEMC+eIlwfklw qD4nnwWbB4/SrNPxQPcIDjIIkayUfYKgPgdpuZDmfdbytH8twGKM0mk9WIyMV0jHNgsv gChw== 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=UG59UemnRMDLHYqmEdQFrLqJ4qMGj9gGIjwjdK+wvPQ=; b=oUsNgzhznBZ6GOSrbF/2yxGY53B8+3R98Czvn2orBHbGWbQCwS6Mu1bKTJppyWWA+S gY5+3ZGvDTgXzZmXLj+O7OkOOEnatj6O8v8/Lz4OV+ItdguUk+EMmAvh7SWHR6Zw/UHv 3kKw4u7Afndt2z2ucdNqynxHe4Hyog1LNeYgn4f2Bx5Q/frSZJ+j/kheplI9hbKAhYmU BpaVfjYqYrfbFKZ8ytlrsHQBNf0ZzVAho7j6+DTdTSaLKO66TGf29Kn5/b8DC2riJUp7 hIYJD2op2acOGv2adS+wMLwNWSfs5TygXrV8h59QN6CkpFeGsaIUp+1dAAjDP71WQK8I qN5w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Ji3b5vRx; 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=1682270743; x=1684862743; 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=UG59UemnRMDLHYqmEdQFrLqJ4qMGj9gGIjwjdK+wvPQ=; b=IG4RHxc/Bojh4i4quaTlxdCghLBenKIOl5THFev2dgCSExc7te5PDYbH3OBgianrj4 PA85mLqtkSQHxSkZoNZqQuo20GmqltTU0OoY/OISaIry20KmvC+Naxl20M2skc87SuAR urEDPtvOFEXN6P51N14Y/yzvRnp93YwTOFwNw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682270743; x=1684862743; 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=UG59UemnRMDLHYqmEdQFrLqJ4qMGj9gGIjwjdK+wvPQ=; b=byD/5cL9IThw+1xxaiHndVm8ydQEG2aZF1zsVr+wWgyWxc76jY1V/Xm+1wTCr2H0l6 MjP2ebh04XzoDjryIBosTvEJKTsPJlKN+NriDIRjKGSelsBuCF6yXmTjquRVFrr+ANz6 W4tN0Tftz5MOoLY2JjS41hvMhuxA5Dn8MirMSikepbm02+gQahlMQAWlq8Rfdc+4HKsN jue+/7qH0Nba0S3j76m10PfpWMyW1KeGh+iCeiR9YTa+P5BUS/y4suKQI7sryRRIAU6d g7bCifTjDQPJrozKBvKBYHw18J6JApYgYrnb/21EzJEX30WUt+bG6Pyr90weS/L3AHG3 fh5Q== X-Gm-Message-State: AAQBX9d91tZImm3ALu8/bkzSqshexvaiHJfOdalW2EPjokT1MRSwe/Rv bw5Nt+afjS7xM1n5mfT/6ui1iMAF18q1pWZL X-Google-Smtp-Source: AKy350Z+GdzDbWv9wC+Jz23P9SeBGaUYYPM6p9/d6jsDBDSrgyjhPLSIlVxoRmfyGh4oo+SbXeJdeQ== X-Received: by 2002:a05:600c:2194:b0:3f1:6f3f:485d with SMTP id e20-20020a05600c219400b003f16f3f485dmr1490068wme.3.1682270743719; Sun, 23 Apr 2023 10:25:43 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a5d:4d8a:0:b0:2f4:1b04:ed8f with SMTP id b10-20020a5d4d8a000000b002f41b04ed8fls14083987wru.1.-pod-prod-gmail; Sun, 23 Apr 2023 10:25:42 -0700 (PDT) X-Received: by 2002:adf:e683:0:b0:2f9:cee4:b8e with SMTP id r3-20020adfe683000000b002f9cee40b8emr7402238wrm.68.1682270742329; Sun, 23 Apr 2023 10:25:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682270742; cv=none; d=google.com; s=arc-20160816; b=yPBPDyH8vnnnI+gw6OKE1XW2mDDJKBol4BQPK7lsxA/WVjSSul3pOxUcA8PsgokUvG GP9brg6ebroH56QO6LkRfdTQW/jEh7rW1R08NqqrvUz3qdAyiT8M2f3/iXRUbAAUqN8a zYC1Kz8VFCNBHea3NzV94AejE/sG6o9sCN6+uE2b3uyRFHkrRF/ym0PXBFZ4VXpRmtf9 XEAcVxfhX/25YHOEsAzNQ4wPnuTBdN6rkNv0AlPITuCwpaPDeLKpuM6c7kZ7Oy5dL4i2 7mR5KsyGlBE36DrxhZSNGoCgIwMdop9ytcAze8yNMUCeEpqzOCNN+Qlrwo31R+aiZ1PB phBA== 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=Nj3vUN1sCuMDZhLchBZ5ljBaRgoXn81VamEs7vmRecg=; b=d9R5TUw8H090O09nzgdRchK3ApexyX6QHRzRAyztZkkujlUi67uxazN1VJtU7I0p3z DrviYKjokMi9AJylz/RND71age/HaHiUrDExrMfISm9AOvhce6Y3aJmCaROhPX4CKNhl Vnp9eOKLbnd2O1ufvsX28utR1F+9vCL9/dm8U4YpWPsadxUUJHU+cFgs1jz6kyYYx+Pm n2dNv3NTV+4yZnOzdBDedrkONZiT9TWWR/C/mng+memxU4XtYdliUsmRLmAaTJRSrk/0 61tP1PZMamtjUvJdu1ftfcbwcZCeFYaZKzOiZwD0Sl4Oj1FPpA6OXJmY4iU61b6u0FqC ajRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Ji3b5vRx; 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 l18-20020a5d4812000000b002dbdc70be11sor3282315wrq.54.2023.04.23.10.25.42 for (Google Transport Security); Sun, 23 Apr 2023 10:25:42 -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:adf:e803:0:b0:2f7:a333:8cab with SMTP id o3-20020adfe803000000b002f7a3338cabmr8356900wrm.71.1682270742024; Sun, 23 Apr 2023 10:25:42 -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.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Apr 2023 10:25:41 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Amarula patchwork , michael@amarulasolutions.com, Dario Binacchi , Alexandre Torgue , 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 2/4] ARM: dts: stm32: add CAN support on stm32f746 Date: Sun, 23 Apr 2023 19:25:26 +0200 Message-Id: <20230423172528.1398158-3-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20230423172528.1398158-1-dario.binacchi@amarulasolutions.com> References: <20230423172528.1398158-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=Ji3b5vRx; 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 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 --- arch/arm/boot/dts/stm32f746.dtsi | 39 ++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/arch/arm/boot/dts/stm32f746.dtsi b/arch/arm/boot/dts/stm32f746.dtsi index dc868e6da40e..70371d9dbb7a 100644 --- a/arch/arm/boot/dts/stm32f746.dtsi +++ b/arch/arm/boot/dts/stm32f746.dtsi @@ -257,6 +257,16 @@ rtc: rtc@40002800 { status = "disabled"; }; + can3: can@40003400 { + compatible = "st,stm32f4-bxcan"; + reg = <0x40003400 0x400>; + interrupts = <104>, <105>, <106>, <107>; + interrupt-names = "tx", "rx0", "rx1", "sce"; + resets = <&rcc STM32F7_APB1_RESET(CAN3)>; + clocks = <&rcc 0 STM32F7_APB1_CLOCK(CAN3)>; + status = "disabled"; + }; + usart2: serial@40004400 { compatible = "st,stm32f7-uart"; reg = <0x40004400 0x400>; @@ -337,6 +347,35 @@ 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 = <&gcan>; + status = "disabled"; + }; + + gcan: 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,gcan = <&gcan>; + status = "disabled"; + }; + cec: cec@40006c00 { compatible = "st,stm32-cec"; reg = <0x40006C00 0x400>; From patchwork Sun Apr 23 17:25:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 2869 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id A36EF3F259 for ; Sun, 23 Apr 2023 19:25:45 +0200 (CEST) Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-3f195c06507sf17537835e9.1 for ; Sun, 23 Apr 2023 10:25:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1682270745; cv=pass; d=google.com; s=arc-20160816; b=Fpf46B0z3yDZ1ZXWfQ4K3tP7+U+TLklhpP7RcjgP3gJCG7Eltcr0G7htZFxu4cHJ8k SI9Uv0ZpDJZJ1eH8b89c4gnwHMAwmSpVAh5tj0IiPARFJoMD6tX8qzl1F6hUDRM/YEyY Ozx1L1AZaQU1S8Gi3eW9W5KAkE0rWO5oM1pA2/B4h2ynKV1xbfovGbitzdgjwKViBXio sJyXY0NX9N53AngmGWsfGyW12WeNNwjV8dOy8EY7ojzkCPRJ3FyBkkob3ItTzs52PRxR Gt0mFRXGNGKhhY5jhj8iLd/RRj9WHxxhSLOoFuyOXjM73E0T1z2OkhmbV3Vj/msC18ZK l1rQ== 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=jYHz8eDwFF9yqqUN2lJ/iMc4WsWdNajzbskf93qf/jg=; b=OnvQG0ur+WePVTT+SSN/dMWpBFhTrZzjTpMf+5y7HJPoCHt3Xv/x4bc5Awkrzf+rbj kKITkoEsIgIBh//qBpqv247jABDRAF9dWexYwIWuS0RF4AByjgHnHRF25jTRhQC47nTi QMn3VzTLk/H69js2A/aJSWOgC4YTjf2GcaYV5F2K0AGHRU9cjlkoWa+sal1OEObzRY7T j4eUq7iq+ACakdDRPy1xgr3ZpivkxT7+PFoXewskRykOZezCKqWXf8g7svMPGxqt0UFv IjDfxfSReRx4gyiHi44+x1oYB/trL2Rwy/SF+D8/hJIErhbv7S5Yd+fzmOOv9N2wE3AK QTng== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Cg0qM4kM; 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=1682270745; x=1684862745; 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=jYHz8eDwFF9yqqUN2lJ/iMc4WsWdNajzbskf93qf/jg=; b=pgKzTU2bpiy8UoF/fiS14FnLDM6GkM2uOHwK3qWxIgd4vUV+/bxEJLiEDhdK/8AUA8 8jrn1U61fdPLhsqxIUiYy5tn8M+8vNWFoFgy3KE/Pw4gwj8/wkWTt/8yd+/iGFQt4oSJ oxRleZ5MBfsAIjXTxq3iCX/Qb+KOrJBZHb22Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682270745; x=1684862745; 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=jYHz8eDwFF9yqqUN2lJ/iMc4WsWdNajzbskf93qf/jg=; b=hM/IJHp7hS5y00dHQH934LLGDjT6WHvl53IkgzKXEZCWbqlLVjicO1eX9qr3+0jiPS JkWwatSOnA7AUghtGaXHGLeTpjrIItXJpaktqT7fiqj9YZIC2O6hW/BDvsnc1pX6C1u2 rXuowWyrtE/mvzQzZmvbbh8danhByY6WkEhp71+MEIIx7W0fkFHgVW4RSq2NMp1Qnj3U 65slj+1bE8USlnSwcbYNLB3h7pWugY//jGaJmuHdNUxu7USgX/zeJ6rC0r12zX/tfCIJ 5jS5+C7p+7vbr8mcMXFpRVetf4DAYijCzEvG+lKUOCkmxKdImzq5fSV4GYWgLjSwK9Xq LjWg== X-Gm-Message-State: AAQBX9cMtTR57inu1Z8N30X6nxhutmmzcBPmdsEWA8fvUHNCd7OvjdOX pgDh7SyPUcZGsl3Ubay91e4LhgcU X-Google-Smtp-Source: AKy350YrM6+udFVf0jPuFVZRISXMsjuzvlUKy5jcVKQOLckCAb0q0r6USsoynx2SpqUACflVH5w9Lw== X-Received: by 2002:a05:600c:190e:b0:3f1:7013:45fe with SMTP id j14-20020a05600c190e00b003f1701345femr2230427wmq.1.1682270745376; Sun, 23 Apr 2023 10:25:45 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:600c:3b93:b0:3f1:70ff:9ecf with SMTP id n19-20020a05600c3b9300b003f170ff9ecfls6197153wms.2.-pod-canary-gmail; Sun, 23 Apr 2023 10:25:44 -0700 (PDT) X-Received: by 2002:a1c:f715:0:b0:3f0:5887:bea3 with SMTP id v21-20020a1cf715000000b003f05887bea3mr6345122wmh.27.1682270743970; Sun, 23 Apr 2023 10:25:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682270743; cv=none; d=google.com; s=arc-20160816; b=PZUpUy7Oy5BP4a9OavWS9kyPQHPy35eVu2gI3wktbHfZmzGzYRzX4668u6/Mt+EfH6 QuyBISYryVKkcB1zI03DTbLJUmMRoKAS9SlMIZyHYFbOsFZ1p+IZarnuafZWOpbeRR0M YNxXvmgTwqa7t0Xgjj3V05C3c4mjEfQcVRlsLALwJqZEL5xfsp3PNyrzLB/VSjUoIbTc ERhPC3thrJAT7AwDkFDyDWDEKCX57JpwRYzG9sfOIjnSfz0+4hEEmIK5tNRxNignn/td aGPceG1u7sjGhzD2fCkCpEbpNgGdg9X2r9jr4YUACAHvtpVNFURvIx30KjUlMHcsdScZ gDlw== 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=0FeM+sCDaiJjgHIKAN9KA5DToVUgObUF0WlB1aYKrng=; b=RE7Ga8ZNM7c47dKxfYE8CgmbVRMGMAaqlfzVAiM3MzsWvH56i1tFKXRtpoa3uCgChD ppnGCKIrM7wTMsFOlqNoSZH5jB/8CE6tsGc1t0QPOcQorRWLNO/KMtVncXMrhzuC136/ KrTazhtBrbora4Pj08hF59pgSWzCCsBToTdOWNbcwhtdVkya4GYnS6yb1aS/1HuWYi7J MAKfudpnR2xuD3Jei9axsxBQ1L09jDGkYJ8viE20Hvtmhrkh32c6J02WuruZqkuQ3QrL Grr7sx1OnSGRaMlPSXcnDsPIeYZXyCJQbYkWqL+VFjN56TFsrn+OVG+Gypt9V8KEObAl UVXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Cg0qM4kM; 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 j7-20020a5d6187000000b002f29555990dsor3314449wru.23.2023.04.23.10.25.43 for (Google Transport Security); Sun, 23 Apr 2023 10:25:43 -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:a5d:5272:0:b0:2f4:de63:a0b5 with SMTP id l18-20020a5d5272000000b002f4de63a0b5mr8057660wrc.69.1682270743681; Sun, 23 Apr 2023 10:25:43 -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.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Apr 2023 10:25:43 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Amarula patchwork , michael@amarulasolutions.com, Dario Binacchi , Alexandre Torgue , 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 3/4] ARM: dts: stm32: add pin map for CAN controller on stm32f7 Date: Sun, 23 Apr 2023 19:25:27 +0200 Message-Id: <20230423172528.1398158-4-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20230423172528.1398158-1-dario.binacchi@amarulasolutions.com> References: <20230423172528.1398158-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=Cg0qM4kM; 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 pin configurations for using CAN controller on stm32f7. Signed-off-by: Dario Binacchi --- arch/arm/boot/dts/stm32f7-pinctrl.dtsi | 82 ++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) diff --git a/arch/arm/boot/dts/stm32f7-pinctrl.dtsi b/arch/arm/boot/dts/stm32f7-pinctrl.dtsi index c8e6c52fb248..9f65403295ca 100644 --- a/arch/arm/boot/dts/stm32f7-pinctrl.dtsi +++ b/arch/arm/boot/dts/stm32f7-pinctrl.dtsi @@ -283,6 +283,88 @@ pins2 { slew-rate = <2>; }; }; + + can1_pins_a: can1-0 { + pins1 { + pinmux = ; /* CAN1_TX */ + }; + pins2 { + pinmux = ; /* CAN1_RX */ + bias-pull-up; + }; + }; + + can1_pins_b: can1-1 { + pins1 { + pinmux = ; /* CAN1_TX */ + }; + pins2 { + pinmux = ; /* CAN1_RX */ + bias-pull-up; + }; + }; + + can1_pins_c: can1-2 { + pins1 { + pinmux = ; /* CAN1_TX */ + }; + pins2 { + pinmux = ; /* CAN1_RX */ + bias-pull-up; + + }; + }; + + can1_pins_d: can1-3 { + pins1 { + pinmux = ; /* CAN1_TX */ + }; + pins2 { + pinmux = ; /* CAN1_RX */ + bias-pull-up; + + }; + }; + + can2_pins_a: can2-0 { + pins1 { + pinmux = ; /* CAN2_TX */ + }; + pins2 { + pinmux = ; /* CAN2_RX */ + bias-pull-up; + }; + }; + + can2_pins_b: can2-1 { + pins1 { + pinmux = ; /* CAN2_TX */ + }; + pins2 { + pinmux = ; /* CAN2_RX */ + bias-pull-up; + }; + }; + + can3_pins_a: can3-0 { + pins1 { + pinmux = ; /* CAN3_TX */ + }; + pins2 { + pinmux = ; /* CAN3_RX */ + bias-pull-up; + }; + }; + + can3_pins_b: can3-1 { + pins1 { + pinmux = ; /* CAN3_TX */ + }; + pins2 { + pinmux = ; /* CAN3_RX */ + bias-pull-up; + }; + }; }; }; }; From patchwork Sun Apr 23 17:25:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 2870 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 38DAE3F259 for ; Sun, 23 Apr 2023 19:25:47 +0200 (CEST) Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-3f1763fac8bsf22307825e9.1 for ; Sun, 23 Apr 2023 10:25:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1682270747; cv=pass; d=google.com; s=arc-20160816; b=jqn7U5i5nN+wA+oCMTK1jnfzuYH3ohM9U553f9tC2FO3VAUcLdauWe2xZChP2zMq9z HRJB6tCu5X+IG2FMOuosU1eIIdasoZh6Z+LtzGeiauKqI9pd4AtsSU2o276I+qeqrpkR 4IOHdvru87i4hRCaFy5X49pp3kb7rLZBuhoO9N6HJzNIc9D6YD1xBEuCfyCzSRhPXYPF UcGLR4kPIBhBasYo8+OoWOXPaNWBbgAIhzFut5Z6Azsy6SluU/v69tAfhJn6gvFNW3b5 QnjYAtxOfUGKIJ57djSJG+73KJ2zUwiSq7eQ1Qt2o4j5AuE10VSQCmbEi1+BkIT5W5uX Vg4A== 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=8BHpNH16XOUtq1X9NBUP5kWQ6oRpll83eugmsLKTG/c=; b=NC+m8ZQDvdIuiXKrsezXGOCYjSPA9stkobGRcsMDGBkJmUqVIW+Us82f9EbLxNU8iJ K4zUgkxCIuUA1X0dTPahOQUStL2flfpCayF3M9gAg1WLf7ufhuZRrW7Ll0sczNDWYDI8 ElVejt0JNSjPu6+Nlf84gikPgattEEUxQE9eOfez9nnj81V9P+JEJRUPiBuAr1cGRRas 19xVor9jJ4x3oJTmX6cjnDxvWGO7p6pGQ6LMcLMReWmURf5N6/CqYa5V26JO80JJmiu/ 5QY+mqCHbuXmDoZbYbTnD+7iPV8RkxAtimGuplSAb7nRmt1i5B5ONU8U3D76r4sed//v /ddQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=kFx5aT3Z; 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=1682270747; x=1684862747; 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=8BHpNH16XOUtq1X9NBUP5kWQ6oRpll83eugmsLKTG/c=; b=EyKteoQtdP+wNYqf0Jgwphhvqi1TsT10GL9rftS9V9NkWDKxdCer4jE2omGqEu87/4 79MBMPD5zA46Dmm6TbvH8JOkbRSa56DFdjzHOgIgVEkvysQdMOhi39ZIzBJQUVETpLJq s3QEYJ3GU+fxiPAOMpYhpWEYb9AM0bCoHKm5s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682270747; x=1684862747; 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=8BHpNH16XOUtq1X9NBUP5kWQ6oRpll83eugmsLKTG/c=; b=CrrST22p/QftRu5J9ejR+BX1IpEGGf19Za7c71YI0fdHf34goixVl/3UcyymYy3uES fxx0ez6DqwlB14SHmPPNzHWywgHWoyVvZXBzBpr+Xm9KpOgKfpi6AzzTa9dHL93NnAMU ef4LozL7Hw3BCw/hclIo+5h5eIzcn4ptKQpkW295NA/z2WwXSeXqH/lEEs1wAMIy2vxa D98VY5E+XLjawj74YZDbZdnpLgSER6i4qMSFwIq/Oq/jXpXopKqZ4tNX42XmrZkJyN04 gigsnTzKZ/+hEJmUbQHmqNVrJLGi3xp1iaG+X2qJ5C3tFmPJhoDk4pVAkLJMvLQ9enhG 1C+g== X-Gm-Message-State: AAQBX9dRhrL5PxRLwOG5D1LApNvYJyRcPHTjVANsHN3nZ3ax9GnAh7Ua PZwzZWYCixs5daFWeVKFCZrL4uCU X-Google-Smtp-Source: AKy350YsSU98p717Cze7p0Y1v8YzCnB15MK/y/YIrfahC0mR+PZt4ujXm6SCNGiF0qJkx/OXlAswGQ== X-Received: by 2002:a1c:ed07:0:b0:3f1:72ec:4011 with SMTP id l7-20020a1ced07000000b003f172ec4011mr1574780wmh.2.1682270747007; Sun, 23 Apr 2023 10:25:47 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:600c:1c27:b0:3f1:758c:dd3a with SMTP id j39-20020a05600c1c2700b003f1758cdd3als6204847wms.1.-pod-canary-gmail; Sun, 23 Apr 2023 10:25:45 -0700 (PDT) X-Received: by 2002:a05:600c:b99:b0:3f1:7619:f0f6 with SMTP id fl25-20020a05600c0b9900b003f17619f0f6mr6379551wmb.9.1682270745459; Sun, 23 Apr 2023 10:25:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682270745; cv=none; d=google.com; s=arc-20160816; b=wGwxELbXYM/Zoqz1X6dhvgVeXedU4VZ1+ar+N5fK+Gn6v1ah1mB5T7tGLeazUkWw02 rE6801hT6NSaCCZ7EWDxIT7fy97uo11PQd3HKTnrvLExKPS5N7ezTWCIISSu2HxP9q3+ V44yP5vJXD5/Xdz0wHD2SIUumSQzTgnxfWdU52Ftyk1sEJkjRcuaMDbMVRzp4mgEjCYU 543otPDjuFrQveIeMcse0MfP0Il8fwRDwboiWxXETuMPuC9ziNidD8+owy6OvzD/2EVs Dj/aa++Cnz/W6RWthLt/gsvYJgk1EqcNu+AjvgaBGAlO4w9NnENtfe97kMDhM8sonQhl p38Q== 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=MbxDPqhzMCS7xX3Keeglii9B+3fU/m4LAIoQKCOvlGw=; b=lba2NaJ19Js543KOcnAOWgi8XI2L+n/ZGxixhrBKxM1RPzs+knWcIuLbyw+xc4s614 1SL0xS6qiS8usn7fPiD4SoA924/WDIczwMOcOAs7e4lrD1Mveq2yS4g2lMaFuHge1EGB He2ZzKZ7ppOa1iIBS5EJ4f7ZmqAyri9A66i1Lqm6Q64FPMwe7Xy4/RbzON5EmwnohWLJ 8u1/PuWby+f2bSbuq60m+bHs3xX2jGlNgLA2w2IGoZQ5GulNMxPFmEPo79D8RGzncC+C qWkSwzdfZB3QjXXsoki0+nmNO+BKENEGP724AYxOE1jaMYR4O0/bTc1/xBezfZsI6XJr lARg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=kFx5aT3Z; 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 o7-20020a05600c378700b003f175d0615csor3190912wmr.44.2023.04.23.10.25.45 for (Google Transport Security); Sun, 23 Apr 2023 10:25:45 -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:a1c:e904:0:b0:3ed:3268:5f35 with SMTP id q4-20020a1ce904000000b003ed32685f35mr6156037wmc.18.1682270745255; Sun, 23 Apr 2023 10:25:45 -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.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Apr 2023 10:25:44 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Amarula patchwork , michael@amarulasolutions.com, Dario Binacchi , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Marc Kleine-Budde , Paolo Abeni , Wolfgang Grandegger , linux-can@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH 4/4] can: bxcan: add support for single peripheral configuration Date: Sun, 23 Apr 2023 19:25:28 +0200 Message-Id: <20230423172528.1398158-5-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20230423172528.1398158-1-dario.binacchi@amarulasolutions.com> References: <20230423172528.1398158-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=kFx5aT3Z; 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 controller in single peripheral configuration: - primary bxCAN - dedicated Memory Access Controller unit - 512-byte SRAM memory - 14 fiter banks Signed-off-by: Dario Binacchi --- drivers/net/can/bxcan.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/drivers/net/can/bxcan.c b/drivers/net/can/bxcan.c index e26ccd41e3cb..9bcbbb85da6e 100644 --- a/drivers/net/can/bxcan.c +++ b/drivers/net/can/bxcan.c @@ -155,6 +155,7 @@ struct bxcan_regs { u32 reserved0[88]; /* 0x20 */ struct bxcan_mb tx_mb[BXCAN_TX_MB_NUM]; /* 0x180 - tx mailbox */ struct bxcan_mb rx_mb[BXCAN_RX_MB_NUM]; /* 0x1b0 - rx mailbox */ + u32 reserved1[12]; /* 0x1d0 */ }; struct bxcan_priv { @@ -922,6 +923,12 @@ static int bxcan_get_berr_counter(const struct net_device *ndev, return 0; } +static const struct regmap_config bxcan_gcan_regmap_config = { + .reg_bits = 32, + .val_bits = 32, + .reg_stride = 4, +}; + static int bxcan_probe(struct platform_device *pdev) { struct device_node *np = pdev->dev.of_node; @@ -942,11 +949,18 @@ static int bxcan_probe(struct platform_device *pdev) gcan = syscon_regmap_lookup_by_phandle(np, "st,gcan"); if (IS_ERR(gcan)) { - dev_err(dev, "failed to get shared memory base address\n"); - return PTR_ERR(gcan); + primary = true; + gcan = devm_regmap_init_mmio(dev, + regs + sizeof(struct bxcan_regs), + &bxcan_gcan_regmap_config); + if (IS_ERR(gcan)) { + dev_err(dev, "failed to get filter base address\n"); + return PTR_ERR(gcan); + } + } else { + primary = of_property_read_bool(np, "st,can-primary"); } - primary = of_property_read_bool(np, "st,can-primary"); clk = devm_clk_get(dev, NULL); if (IS_ERR(clk)) { dev_err(dev, "failed to get clock\n");