From patchwork Tue Feb 7 11:29: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: 2701 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id D49F040CCE for ; Tue, 7 Feb 2023 12:30:00 +0100 (CET) Received: by mail-wr1-f71.google.com with SMTP id h5-20020adff185000000b002c3e68f9d6fsf910784wro.10 for ; Tue, 07 Feb 2023 03:30:00 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1675769400; cv=pass; d=google.com; s=arc-20160816; b=ov1iO0qOSGE5tRJWXscTcXBaDjkbnvMFKqUpboazMSe5N3C1I4xycZNIPOqHd2Fd7k oY4+XK+ZBY73LxdFJ42GjikgXszCvmyXSqbLVbCa6CmruI3qPzrgwy4EWS+Gn9gHEnYK DUso6Neu9HjNU3bKUJqvDqu7+9UXAewTiesT0+BASoY9piBJVe0Xz2JLBYQMzcz/ZUsO KMXbQeuIQdgyM+CrIqQ3pVXzZTdX6361JcOYGc3duyrytGnQvQ6gWd3DKquE+ApOeZxQ hK5fxtxiATxN8WCqjvZCQ4AIiR7FzP8Y1BVLh6IscmlnGshH841EOgU261g/U0RrxwH2 G0OA== 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=f3cSV/Slt9kPATVc/BNcmtDo8rY0Fe4nvudWjA356B0=; b=Rz/NASI3aubuE49s6QrrYJq0vwUkpjIkRxubL0JvLLUxfcF65siU9iAqGi2hbfRWvj v6fytazRwFn8GetrYmlgKDwdkodO68kLin3phs9hbHod7tUa5HC2tCq00xO3ZvIdKVli 328eSP1f4TaEjJyBYJdmA6nq3WhOL2JQCKPXzi+KeTNKgVkeH4IVcShmRu/fcTGlcURZ FC/MN+PnbWS7/d0ZVrMiXbqElYnEaiKga6VyPS44bHzCMkpR50zQoPpQ8Xf7/K4Qv/C2 iy00neMXCDugZZze8LupqMG9EyIGPMD9YOQqLOxEZ+GfQUqFkGfzVtn3OCtm+WgBoSWt xGVA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=F53MYSdQ; 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=f3cSV/Slt9kPATVc/BNcmtDo8rY0Fe4nvudWjA356B0=; b=b8JzVcCzZQcPJIn05Em0WywhRA0gub9G0KEqQoHYL36/jAg+5T605cs+0T9nT5znR2 tjJuKOMcOqSXdER9Xz5YoTdcopbj1vIVRGoQKjlo8dLFrBuMFio8RhAjsLsjEpIKN23r gousY25OeQjxioZ3wPb6n2jCOhQe4lvE50VM4= 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=f3cSV/Slt9kPATVc/BNcmtDo8rY0Fe4nvudWjA356B0=; b=u4f65Z9/xoWIg7IGs01F69bNBTZCEd8e94fx6NfVR9LPRxf2cVDU2qehnPSaKCe5HJ 8D/xmRxLEeB76UthIIrgkW6UDxa5RTbhEkjT+FuSRsykD/DTyJthryktV7kYdCx+UayB w5gIZLDAUxnig0wNQmGYhBChaqpE0J/eUvoqAYv1M8mW6jcpJ345Ogp/3aHmNKfC6irQ x5fZy1c97PHCNIufklWe/K0HPiiLiIeJVZkohfwvQaX0OoNldpIo1iSBlaAiHsdwPHoX o0aov2OeQJAr6kfLNRlyL0h4dROFnhIvv3gGTW7L8N/fLWrx7LeljmzyrABlGxmtvjF1 ChdA== X-Gm-Message-State: AO0yUKUE2qjV5LKxRIfGiWmgETSjBaXgEXXz/ZyJZ4WoZFT+UlaM+N5/ yOYNm7Wv+9+2k6sZY69zzci1jWqf X-Google-Smtp-Source: AK7set9qsqRnL6ohRNxk6B7v3gGDql5i0IenIQ347VKnrSHjPC1TB3Wizl/H+kytk7uDv+f6WcIBJw== X-Received: by 2002:adf:e9d0:0:b0:2bd:e19b:2649 with SMTP id l16-20020adfe9d0000000b002bde19b2649mr94236wrn.13.1675769400618; Tue, 07 Feb 2023 03:30:00 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:600c:1f1a:b0:3cd:d7d0:14b6 with SMTP id bd26-20020a05600c1f1a00b003cdd7d014b6ls8079590wmb.1.-pod-control-gmail; Tue, 07 Feb 2023 03:29:59 -0800 (PST) X-Received: by 2002:a05:600c:44d4:b0:3df:f7f9:7bc6 with SMTP id f20-20020a05600c44d400b003dff7f97bc6mr2729017wmo.20.1675769399289; Tue, 07 Feb 2023 03:29:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675769399; cv=none; d=google.com; s=arc-20160816; b=jTMCCz+26S8cxj9WjK8hEJdcmLZdbfERo0hXVaGyg65oxoCgdcUmiqdXPlSkyRtaH6 htRq1hcka7aJl2KCLic8CWxo6BQ5u9DAr5LRR8jaZkaG0ALkNTqVzGiLfQL3y1EgViMC f/plozvZdHFlRb30f4kX4kVwbus9pfwYxzrMdX9vpOEHLiBtiWxkrEmDc/hctg0n7oQA APN350eQJHN9NCjZiTAm8kMkwbJAni2ToiSx5tKq58ks7y5ZDPxxoO7L/cccKQojhdHa DY0GU4c6aY3JB8WHpW/v9rWgA/4Iw3CXEVcrfTPD9eTJKlHH9Gjaw2cTMGUFOJvdqJCi gLcQ== 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=90w47meUN1AAVQio6KlRg3XgdW53vJW4u/H89twTllI=; b=NekkK4TXnMvSsQgMlNBci4yR4sN2QPGCFjlwS19WVnvpkuDjxigpqYPps9qmaWyWI5 aO9UOSEEq31VJP5rRSEJlHtdzXAzv1/j380T+QD/V+BnpPN/J7K46R2JTp28AeyZyoIg DN0JZZ6ATsXk2AMqSq0S+kYUcBL9Q0c8tadCt0qaArlO5c1gu0+YDc8Cjayon8ZY1qO3 hPi0uOQxkxSfuDULkz2YZiJxWNvRaQusIHOcUgjms+VL8KsAVvPD2m7lwQ1qtvszmup6 VAy7CkQEvRIIJqxxaDoJK80s1C8jCBiNBXR7HzVFVUHQeDx1CtjbL4ub7IH4UwphbJgu 2reg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=F53MYSdQ; 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 h5-20020a1ccc05000000b003cf68cf14ffsor6629501wmb.7.2023.02.07.03.29.59 for (Google Transport Security); Tue, 07 Feb 2023 03:29:59 -0800 (PST) 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:a05:600c:1887:b0:3dc:4318:d00d with SMTP id x7-20020a05600c188700b003dc4318d00dmr2720115wmp.11.1675769399083; Tue, 07 Feb 2023 03:29:59 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com (mob-5-90-193-20.net.vodafone.it. [5.90.193.20]) by smtp.gmail.com with ESMTPSA id bi5-20020a05600c3d8500b003db012d49b7sm2020827wmb.2.2023.02.07.03.29.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Feb 2023 03:29:58 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Marc Kleine-Budde , Alexandre Torgue , michael@amarulasolutions.com, Krzysztof Kozlowski , Vincent Mailhol , Rob Herring , Amarula patchwork , 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: [RESEND PATCH v7 3/5] ARM: dts: stm32: add CAN support on stm32f429 Date: Tue, 7 Feb 2023 12:29:24 +0100 Message-Id: <20230207112926.664773-4-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20230207112926.664773-1-dario.binacchi@amarulasolutions.com> References: <20230207112926.664773-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=F53MYSdQ; 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 v6) Changes in v6: - move can1 node before gcan to keep ordering by address. 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..809b2842ded9 100644 --- a/arch/arm/boot/dts/stm32f429.dtsi +++ b/arch/arm/boot/dts/stm32f429.dtsi @@ -362,6 +362,35 @@ i2c3: i2c@40005c00 { 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 STM32F4_APB1_RESET(CAN1)>; + clocks = <&rcc 0 STM32F4_APB1_CLOCK(CAN1)>; + st,can-master; + st,gcan = <&gcan>; + status = "disabled"; + }; + + gcan: gcan@40006600 { + compatible = "st,stm32f4-gcan", "syscon"; + reg = <0x40006600 0x200>; + clocks = <&rcc 0 STM32F4_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 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>;