From patchwork Sun Nov 13 18:13:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 2493 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 8174240F5A for ; Sun, 13 Nov 2022 19:13:36 +0100 (CET) Received: by mail-ed1-f69.google.com with SMTP id q13-20020a056402518d00b00462b0599644sf6912680edd.20 for ; Sun, 13 Nov 2022 10:13:36 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1668363216; cv=pass; d=google.com; s=arc-20160816; b=SWBBt+HT0M+fyqrCblyh2DsMWHHqyf4+DP6S3CYKFXw5OpQ7XiFTpagzGbuzTa6TAs +uyVTv3X0cfX7fe01NTmDguK8gSdqXcyGLrnxXB7CA8aEKBU17tRZNemnoQE96gImXRS S7HUHP9acGPzNSpnwlyEiDqxhPKxu3DV5IPDp4H/G1z4jhA1FcDzDNUEJd/I/oWOjGmN 7tyANk4KJKjEgxtpMBIu4JqdWCw3DOuDOSH5unsGWxVOqrsW9g5uQokXh8cilroxnoVI avDKvjxbfvbOb1NjJ7HG0SOlTCaX+XbLQ4/be8LnkFryQr0quzusVNHhhoKb0xH3YW0J iSSQ== 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=9uXyyl4mB0X1UXCq6iweUtQjg9GnC213tXfz4itOiiU=; b=YIcux37yw9+m21o1qiMbMriVeEcw8tRrwytAaPJPoIaPkhlwA6x+7kDM9BMLBWYj6c IgZyZja/I7YIbPxG1JXMw0LCxcNvw5ybf6bQAAPkAtVgnDEhA8zJMLrNww4/HQ6MxBTs z4q96UnMVrmWh/G37lLfWtgwGSecvCNHJw7nKyOmxWBXBRJ2PknvagZN5XXLgW9hwWey okOgSfXwHr8nylBtgppd4qEbfuXT4Xsq6YrEN5fCbq9ezkE/oAOARUqBiOzTIfRfr/J9 MIbmmgeUhaPaw5NwkPJZRSXfc/oJ5v4qcxdh++nPw97BGt9kpeMMR0uaQjpQtlIecmLM T7eQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=LcgO6u9a; 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=9uXyyl4mB0X1UXCq6iweUtQjg9GnC213tXfz4itOiiU=; b=UfOkK8hCjEPWWjKz5ZV7Nzo9GS/FO96Xyge8yEICSUfXRCBOnZafRSawquH1DC0aDk JIWQKj1KutPjh2JGy1oREw9Sb3uPPA+Psm1ehsRo0nxEVTbf7uHWkbw62kpVkyienmVD pI257Ns/wgCmO1MaLD8odU3MnU4G1swmjDIc8= 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=9uXyyl4mB0X1UXCq6iweUtQjg9GnC213tXfz4itOiiU=; b=YFBSYyf+T5vVepGsoMnpLwSqnevO01tWSnm3FxbceMnN5XbhxtnlSv4DKnkpHE9MbI 9Qyg0xY9cYTBP2ZwQRV+Tro5YIWx51Bv1d8YWtIVLwVxCBgL8ys5Z86mkLX6Ava84ngV OCJ8RMfxSpUyvhDIIGy7pbGjV+duQvZndqEeuHVR8e8uoWZ96791imVGXJTCeliJIJSd 5wsavL+diDYoB4ze+PWwujGT8p1aO/Rn1NSPB+6Rn/PyCCIyw/EvqDT3jAaMPzRhw4tr N/0nljXMC5d7m83ew+SyBocJo9QrSfd4BwV7ZqQ55B97CIXN6cVLNFssJ6r14USKhRfc +A7Q== X-Gm-Message-State: ANoB5pmUs+LhEGZMcJI1aeQGnoOnf+pmYQFtOqPntDTt+d+Bcirbjzvj jV+Flp0Rn97Q8DD+s4LQPxsZoRnA X-Google-Smtp-Source: AA0mqf4MPjLrbpbU6tq0iTMD6x0KflbW5RrvdEfzDG6S/7PovCQAAJUDPrDIc2u4VwHRnOCpmsZsSg== X-Received: by 2002:aa7:cb0d:0:b0:463:ba10:9e2d with SMTP id s13-20020aa7cb0d000000b00463ba109e2dmr8697217edt.43.1668363216324; Sun, 13 Nov 2022 10:13:36 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:2708:b0:457:99eb:cba9 with SMTP id y8-20020a056402270800b0045799ebcba9ls2531651edd.0.-pod-prod-gmail; Sun, 13 Nov 2022 10:13:35 -0800 (PST) X-Received: by 2002:aa7:df93:0:b0:458:cd82:91a with SMTP id b19-20020aa7df93000000b00458cd82091amr8547561edy.15.1668363215205; Sun, 13 Nov 2022 10:13:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668363215; cv=none; d=google.com; s=arc-20160816; b=MhaJllHyMSCpwwhIbN0FglPyjIXizQe08+W9eN6UrB3EFWm0cL6b4xSPHQN0rFF1Qx QN3P4VdWni4D9bzVHMm9QuAItd1h57SMHhmZqowTgRGWgPGXfU4M0iasZxAYQrTtWJtQ rVhVWAEtipXiFqgSEo2VRmMll5txRryiPcTxq098Z6SsUlWqdGU7+bPPIrd9sGciETRL tXHxKrkX/FB4gMCg3iwybI70cAxWmONxWw/hxTNi31Nq9jzhSeFTwkC8hexoUMwxLkxP 5HF3O28kDSJI6rCDnMT7N7LWZfghX4u005YcMUFBzQKMwP/rLsMT54JZ6asdAL9MT1je klOA== 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=ytjq+5ZqtJJOKrYEaXmPKz3aw/q9ijl/XXCtqz4EuF4=; b=udUeiABcRjwlyb9+jxmqf8hbg2jW8LuwYCt5oCdT38NKu9bvQYOMFrvWd/nc/BUpOu jbNTRqWFtg4VCT7+NtWcIBmD9cE+cncTPMmWMhUBWJYzRrOnaz6h5lrEg2jREOHDCcg7 aDRBJ3saPdCpOwB0meTDYk4HR57H6tHybm+qhscto0kTZQUy0TnVUsozM7lWuNyr1w1h mGiQrBoyXO0UCwV50RpcvX13uiw3iuxHVE869+Cmmq5UocRmu53YWyyAXzjR8+lABuFm gqDP3LjyjleTU5oK8uI4mhK95FNHkIe8iAJrwxRTtE224bPfEjkoALgv7FhD9+7l3OIT ySJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=LcgO6u9a; 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 q19-20020a50c353000000b00458a650f3f8sor3618981edb.5.2022.11.13.10.13.35 for (Google Transport Security); Sun, 13 Nov 2022 10:13:35 -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:aa7:cd13:0:b0:45d:2a5:2db8 with SMTP id b19-20020aa7cd13000000b0045d02a52db8mr8700763edw.105.1668363214952; Sun, 13 Nov 2022 10:13:34 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-79-40-103-33.business.telecomitalia.it. [79.40.103.33]) by smtp.gmail.com with ESMTPSA id iy6-20020a170907818600b0078de26f66b9sm3225487ejc.114.2022.11.13.10.13.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Nov 2022 10:13:34 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski , Marc Kleine-Budde , Rob Herring , Amarula patchwork , michael@amarulasolutions.com, Vincent Mailhol , Alexandre Torgue , 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 RFC PATCH v5 3/5] ARM: dts: stm32: add CAN support on stm32f429 Date: Sun, 13 Nov 2022 19:13:20 +0100 Message-Id: <20221113181322.1627084-4-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20221113181322.1627084-1-dario.binacchi@amarulasolutions.com> References: <20221113181322.1627084-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=LcgO6u9a; 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 v4) 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..ce08872109b8 100644 --- a/arch/arm/boot/dts/stm32f429.dtsi +++ b/arch/arm/boot/dts/stm32f429.dtsi @@ -362,6 +362,35 @@ i2c3: i2c@40005c00 { status = "disabled"; }; + gcan: gcan@40006600 { + compatible = "st,stm32f4-gcan", "syscon"; + reg = <0x40006600 0x200>; + clocks = <&rcc 0 STM32F4_APB1_CLOCK(CAN1)>; + }; + + 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"; + }; + + 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>;