From patchwork Wed Mar 15 21:10:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 2800 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 12F5544C06 for ; Wed, 15 Mar 2023 22:11:05 +0100 (CET) Received: by mail-ed1-f72.google.com with SMTP id w6-20020a05640234c600b004fc0e5b4433sf16048994edc.18 for ; Wed, 15 Mar 2023 14:11:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1678914664; cv=pass; d=google.com; s=arc-20160816; b=olZW8ETIKVtFubSMU2sb4d+js6Fk4+V45JI58PyYWgZaLWqSWHpriKy2T42OOp1W1f OL6i+qiWZKreUNVDlykjy4hWffGjPpH0H3rvdChWuE+kPV2v4jXSGNwo/hKteGZDgKQS ooUfXxj5eqknZSg6gWn4ptwSGAzZ538RYhjgnTSAh/CPr+F6+sd4Z5qpvbHp1Icxf43g ywTeJTpYbdLgWTfL/DCxhAY++/k39As9W/GzRagaKHXBrG0RFp6+5PSzbhkROQSsK/z7 SqRx3HFtEzoIYd6GK7ys4Ju2G0QP3C7PlIZRvnKok4sJ7uldasN1qWsi/fYofpGRlWrs rHmQ== 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=hBs3/qMQekMfxM0PQiaTsXBDwlOXmtyxxkuPnWclksxQaQnIVQHAfGR92gWQ2iABS0 0qp0ItPz1MW2ZTEhl8uf1ZAPtuhOb/Av7hfzeoB2ZE182uq1mSAKZWkssE7fX6zkdCbx 9B8T3KrG9V5crnmMfxCz1zVLAuFyaZ/ZavFaltOthlwn0LqMAw6HOvXYfVfUaFHz5whz WO6i2+D1X7KM97aXmAzQEVMvy2MfNATZNNcf2Fibrzn6MpjwRH03XEeNFcxqqZVyPkaC OrMkDjkofxp9hobx48JXIsgMgRv+T6pbtCiSvpWDFXxAbrffgR0d0goxtfsHRxPxSMyr uOOw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=MsegcRce; 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=1678914664; 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=c+B5+8Dte83Lb+LfP+VA2J6EDda4jL9kQz5MEvThX5fAblCcMqkDWgWDebivgl2koY LD0wxitZ0pF5WVzo2R3PzLEjqGxktk1G6BPJq1h6pSximLbbGT+XYtZCyL2yb6wzZxjO fSwYAXWDGLgJhsdf8KH3So1I8CH/8CSuO2AMI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678914664; 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=0kPh2yBWzYDJb0HftH3Tx9mjo3NUHxmbbyPJM4mcjaaZPB5+w2xBIbRTbDcFt95fNx x36Twd1RKsgCYKqG1rQq2KkojjVV0JKOJvkapO8p7IR2eED4drZ5o6tOWoVGGOn4YYQ8 OClje4mmVIayE7B6fOAFNpJRXwiGkl3EUpgpvRpZ8mjZ88l9MFlB6vipdqmWzSVBPLkS TlZFaBUIduKbyHjjK0uFtIWbfDK1zUrJzJUKqUihE4OA9CqEhnBCBmq9Y4T3d6CtBtq3 6d/4x1Zrifzwc0nDcdbO0XByfNikQ9oZLNHzClATACwEoOJLnCgD/cUes8YRDvicm7sa FH/A== X-Gm-Message-State: AO0yUKUs5cIo59zleQeTEY4/NoOKHBR2qSU3Qccn+cSDAoHAZ0PNPlTG 6uH2nt74KXcCGiI8/srlcK5UVjYZ X-Google-Smtp-Source: AK7set/xLUwqg1pxLhPw6l+dTbLtZ1cLiKd1bHnzJmXCJcJ7nJ1vgyqk3jwJykklusT8RpDGAHehNA== X-Received: by 2002:a17:907:3f81:b0:8b8:aef3:f2a9 with SMTP id hr1-20020a1709073f8100b008b8aef3f2a9mr4148657ejc.0.1678914664679; Wed, 15 Mar 2023 14:11:04 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:906:2487:b0:897:68a7:5262 with SMTP id e7-20020a170906248700b0089768a75262ls13455252ejb.10.-pod-prod-gmail; Wed, 15 Mar 2023 14:11:03 -0700 (PDT) X-Received: by 2002:a17:907:80ce:b0:8b1:e78f:598b with SMTP id io14-20020a17090780ce00b008b1e78f598bmr8509551ejc.50.1678914663260; Wed, 15 Mar 2023 14:11:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678914663; cv=none; d=google.com; s=arc-20160816; b=rYp2YarTVc6kFjGE8fF2i3wxZGutCloH5IP3TC7LZ5HAW3Skrf2m4UK9a+Y1mAA5R9 u2CvHb8d6F88YBxgrM4h3Xng6TdhT7rjZoHxwsDNnB4kghNctYu1z8GGevUtgdxjW91g lTwy+cIwAIK3u1bRyPGZJYQ6Nd5167P72ArovjtMXqqFESiW+PeIi53jp3ikzJ3ve816 r0NXtrQUU6V+UtWFnyYnqFkYgyCVZ2HvPAakiq2T5atxsrLNNHDpjF9sXv5eNWhThaGN Q+l0mqslKOjhIU3hkCUtzYLYkVS0Yak0Yw8UAj8FRTPRTgTyh5Z3twFIO7C2CwTjfzV/ ExSg== 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=RdVq+qeROpG9FiqsW6lym3gE2KVkLke0tyVA/2lwAM/3yR9t/LU6VnjK1dlCjhX33/ sLae8l5NLfwwiB63CQ/3D6aEmTR4RvZgapPZNrR/oU5w/3UfDVZVvWUGLM6gm86eCd39 mgLgHAxS9mt4ljeiv+FKnyPhqVKG+4gbAwt4hyAbBLRJMG7LVO8x2DHHM+OGEimyzwDi o+VhmkFigiLae+kuE4OcOY9684fRKdPvhBf1TywWhwCpBvcypsHFYSz6nViynkHva5Av JTipFyqte4cLpPlAF+boJxNKGT/kLOZr3FN1788+u4rqrZVOyICmxOWnqWkR4jKu63Ql h4/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=MsegcRce; 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 qu10-20020a170907110a00b008c930cd5acbsor4465355ejb.76.2023.03.15.14.11.03 for (Google Transport Security); Wed, 15 Mar 2023 14:11:03 -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:906:fc0a:b0:91f:c56a:4dd2 with SMTP id ov10-20020a170906fc0a00b0091fc56a4dd2mr7906865ejb.62.1678914662947; Wed, 15 Mar 2023 14:11:02 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-87-0-96-89.retail.telecomitalia.it. [87.0.96.89]) by smtp.gmail.com with ESMTPSA id o15-20020a170906600f00b0092b5384d6desm2965366ejj.153.2023.03.15.14.11.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Mar 2023 14:11:02 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski , Amarula patchwork , Vincent Mailhol , Alexandre Torgue , michael@amarulasolutions.com, Rob Herring , Marc Kleine-Budde , 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: Wed, 15 Mar 2023 22:10:38 +0100 Message-Id: <20230315211040.2455855-4-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20230315211040.2455855-1-dario.binacchi@amarulasolutions.com> References: <20230315211040.2455855-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=MsegcRce; 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>;