From patchwork Mon Jan 9 18:23:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 13094099 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 05331C5479D for ; Mon, 9 Jan 2023 18:34:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=fQ+PTkKDkcbKzzxbyzQADI1AuRvneJCVZKUKmXN0XH0=; b=MQeIa7gOinoKAl VAq0H5q4XJTR5ttUA0oKBilUs86QxhnXmBynODtBDxZ51JqIkqyAmTnrndzVjlyWGCDZGTXiMFUL1 0y2XZ2bfxDK04gkAg2elWqYMik6fEvw5W/gFGRtuViFaHNYLiR219BHyf4Kg2BMfAL5/edXnXJRB1 UfQE1i4tOMaNFIEbBz7NnB2eSarfLkZ4pNePBZPWDBebanKJ+6KvDiwuqR5du4Fx+rUTTZDG0WnZG YnEbfUEt3oKoVWx2+lOiLYGEUV1t6NOdzslv7ZB6zz7b47rpbrFPbWUwoMon66+U0Z+h3nHjVofEs OohwRZ8Pj3znoywKQTvg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pEwxp-003KEB-3U; Mon, 09 Jan 2023 18:33:42 +0000 Received: from mail-ej1-x62a.google.com ([2a00:1450:4864:20::62a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pEwoX-003Fqp-Qu for linux-arm-kernel@lists.infradead.org; Mon, 09 Jan 2023 18:24:07 +0000 Received: by mail-ej1-x62a.google.com with SMTP id gh17so22359987ejb.6 for ; Mon, 09 Jan 2023 10:24:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=WuawNslRJtsC33cN3DASsrMzq8m1GQBJdWGYFmYOzJw=; b=EvX5z8BtDHA/tpP4TdClX6p9QyU7vTeuCoFpfbsvBch8crM2wOTQdD0N+LWid1Y4Hi sdb17cI8noDMjRV3oaXGCHXRn9C5PAasKWX+ddcgZavXrzVlC9Z/8IJ7/jTmgNWbZzQx nHu2+lTunBFMOSMcN4lJwnotIT/JIEIK7qJd0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding: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=WuawNslRJtsC33cN3DASsrMzq8m1GQBJdWGYFmYOzJw=; b=UAvmY41tnGrUj9O0Jrv2N2Z4y608L2A6a/15unSLjAuLJKzoRnrlbiQejsAYIsz/Eg S4X2dZss20JlNl7tN2UIhy+rQSvH/gGeu8Hr8GN3MG+8HYSR+yWL2suDUaRbqiCd/8N+ ALeG7CgSLG2oZ0+nKU7t6CRj2q+Kjqa26QYFRkS/MxGGznwvUD9Klkaz2Lmhhg/rBlrK 8cZMIoWK7q7PQmafYysqXGPqqkt70MsjxlmOKFKbn6DHwD8vH7KGQCOT7f5TcOk4FONk Zf4vgLZ16TdIumzIUjlAojp5416/f0riPtYPWmxOgx/04hpQBwQvuaLXQA2cFOb/bNlw fuDw== X-Gm-Message-State: AFqh2kqBG1cSXaK0azfaW9HwWJfyZ/J8T0rAhTSwkwGg+ft71SlwiDn8 m5Q1daYvbhQl0ryfEfgr39VDBA== X-Google-Smtp-Source: AMrXdXu9XapodJ1buz2gI4WFDCokc5RQLSW2MgnTRMY3L/mjPS/hd0a93SqhLVB/LYFYpnZDilgwZA== X-Received: by 2002:a17:906:9d04:b0:84d:3822:2fc7 with SMTP id fn4-20020a1709069d0400b0084d38222fc7mr6672405ejc.77.1673288642599; Mon, 09 Jan 2023 10:24:02 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.pdxnet.pdxeng.ch (host-80-180-23-57.retail.telecomitalia.it. [80.180.23.57]) by smtp.gmail.com with ESMTPSA id kz22-20020a17090777d600b007c1633cea13sm4093653ejc.12.2023.01.09.10.24.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Jan 2023 10:24:02 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Vincent Mailhol , Amarula patchwork , Marc Kleine-Budde , Alexandre Torgue , michael@amarulasolutions.com, Krzysztof Kozlowski , Rob Herring , Dario Binacchi , Alexandre Belloni , Christophe Roullier , Krzysztof Kozlowski , Mark Brown , Matti Vaittinen , Maxime Coquelin , Rob Herring , Viresh Kumar , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com Subject: [PATCH v6 1/5] dt-bindings: arm: stm32: add compatible for syscon gcan node Date: Mon, 9 Jan 2023 19:23:51 +0100 Message-Id: <20230109182356.141849-2-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20230109182356.141849-1-dario.binacchi@amarulasolutions.com> References: <20230109182356.141849-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230109_102405_917015_841C958C X-CRM114-Status: GOOD ( 11.41 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Since commit ad440432d1f9 ("dt-bindings: mfd: Ensure 'syscon' has a more specific compatible") It is required to provide at least 2 compatibles string for syscon node. This patch documents the new compatible for stm32f4 SoC to support global/shared CAN registers access for bxCAN controllers. Signed-off-by: Dario Binacchi Acked-by: Rob Herring --- (no changes since v5) Changes in v5: - Add Rob Herring's Acked-by tag. .../devicetree/bindings/arm/stm32/st,stm32-syscon.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml b/Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml index b2b156cc160a..ad8e51aa01b0 100644 --- a/Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml +++ b/Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml @@ -20,6 +20,7 @@ properties: - st,stm32-syscfg - st,stm32-power-config - st,stm32-tamp + - st,stm32f4-gcan - const: syscon - items: - const: st,stm32-tamp @@ -42,6 +43,7 @@ if: contains: enum: - st,stm32mp157-syscfg + - st,stm32f4-gcan then: required: - clocks From patchwork Mon Jan 9 18:23:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 13094101 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AAF4AC5479D for ; Mon, 9 Jan 2023 18:37:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=deAcTrQLDjOSq19F6hYwX5LlFa1Bjl1AP1v2Q/6Ejmg=; b=By1P9TrOG0D3Se 5HEyhlv+RRbQsS30VJuS9ARKceUSblruRyGT2AJbdaKDjdox70NQCf5fgeQhIBN9l0Hy5XgQEIQ8u nHlQTrNqtlrQijeRHjj1m0JBjrTAnfkynB8yLh5Qe9NhXsYsSHQFe5ls3ORXKxOgJEhR+OLqK1l9k pte7l4vT0c8TyStSHDH8MpJQS/MnMDyLW2nqlN1npg2ISc6Fh9+t2r8vgfgjVYYLXT15WGZhF8zVp a+ic2IdApMTJ7iGJL+/FoEpLxpwdLklbKt1imbBp1v7Mvtd0UvW16KkkSfs9Q87Z0VsS9t0vCVygS mC+JnQplRhXeiReiOo3g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pEwzl-003L89-7O; Mon, 09 Jan 2023 18:35:42 +0000 Received: from mail-ej1-x641.google.com ([2a00:1450:4864:20::641]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pEwoY-003FrZ-Uk for linux-arm-kernel@lists.infradead.org; Mon, 09 Jan 2023 18:24:09 +0000 Received: by mail-ej1-x641.google.com with SMTP id gh17so22360183ejb.6 for ; Mon, 09 Jan 2023 10:24:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Kod5siM2bcM+dDVpz/GqL4BGUBIqfHoecSZkZ5xWujI=; b=GyE7ITR0+FnjT49DluItNpOqb76uJ7XVa5e1xXP+/66FXqVsYdkgibhh46ZUpObu98 vFZo2Z55wV+xE4w09jTCP6sR02CXie6cXWN/IEKYqC9AxLzsIalUbHwAorjhUIxK9gtB iuduJNnYOMOMaus9MOtoHjuqYc8NgnuTtqnH0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding: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=Kod5siM2bcM+dDVpz/GqL4BGUBIqfHoecSZkZ5xWujI=; b=kGLU46Xs4J4rXYNQ/MMG9q2dq8fw/LdAmJv+/P2q7Z7RgN/YQrfo0CXnGavCYNW6Ui 9Veuhj2ko1Kzq/xdKVmOzrhTRpzdifzJCYeUzTMHLLdvIX4JQl83BXP918RMsZO96vxt jBbkCAvJehhPkiq/W1Q9mYmYfzX3DaZ41s0mQAQWvJnjX67s4El2ycvRnHjGa2EQc9lM GYQ6jwomeUHdwJ883J/Q3HWHlHMfO/6/G509+Re4CNS4zgnL+HBl6o7nR7MLC1fDBjuI MozVG62LVN3SJDSURRMA+qQETY50qX4pANHrIB6l/iQYbhE57Cgha4hexygReMUFBUOT bweA== X-Gm-Message-State: AFqh2kqik2othyUnTECBsI+w5B/H6NyvzzDJed46L4U0xIqIUWISbetn t9sw+THs4pVtwO13KgZsClJHdw== X-Google-Smtp-Source: AMrXdXuCNTNH85dN7pgG6D12czosI11Fun5zVxCvhi9KOFoiG/umgBpQC35uAuW3xdkJeziT9fMIdA== X-Received: by 2002:a17:907:c30a:b0:7c1:18b1:fd93 with SMTP id tl10-20020a170907c30a00b007c118b1fd93mr59827873ejc.44.1673288644393; Mon, 09 Jan 2023 10:24:04 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.pdxnet.pdxeng.ch (host-80-180-23-57.retail.telecomitalia.it. [80.180.23.57]) by smtp.gmail.com with ESMTPSA id kz22-20020a17090777d600b007c1633cea13sm4093653ejc.12.2023.01.09.10.24.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Jan 2023 10:24:04 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Vincent Mailhol , Amarula patchwork , Marc Kleine-Budde , Alexandre Torgue , michael@amarulasolutions.com, Krzysztof Kozlowski , Rob Herring , Dario Binacchi , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Krzysztof Kozlowski , 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 v6 2/5] dt-bindings: net: can: add STM32 bxcan DT bindings Date: Mon, 9 Jan 2023 19:23:52 +0100 Message-Id: <20230109182356.141849-3-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20230109182356.141849-1-dario.binacchi@amarulasolutions.com> References: <20230109182356.141849-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230109_102407_069051_8FC33561 X-CRM114-Status: GOOD ( 17.16 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add documentation of device tree bindings for the STM32 basic extended CAN (bxcan) controller. Signed-off-by: Dario Binacchi Reviewed-by: Rob Herring --- (no changes since v5) Changes in v5: - Add Rob Herring's Reviewed-by tag. Changes in v4: - Remove "st,stm32f4-bxcan-core" compatible. In this way the can nodes (compatible "st,stm32f4-bxcan") are no longer children of a parent node with compatible "st,stm32f4-bxcan-core". - Add the "st,gcan" property (global can memory) to can nodes which references a "syscon" node containing the shared clock and memory addresses. Changes in v3: - Remove 'Dario Binacchi ' SOB. - Add description to the parent of the two child nodes. - Move "patterProperties:" after "properties: in top level before "required". - Add "clocks" to the "required:" list of the child nodes. Changes in v2: - Change the file name into 'st,stm32-bxcan-core.yaml'. - Rename compatibles: - st,stm32-bxcan-core -> st,stm32f4-bxcan-core - st,stm32-bxcan -> st,stm32f4-bxcan - Rename master property to st,can-master. - Remove the status property from the example. - Put the node child properties as required. .../bindings/net/can/st,stm32-bxcan.yaml | 83 +++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/can/st,stm32-bxcan.yaml diff --git a/Documentation/devicetree/bindings/net/can/st,stm32-bxcan.yaml b/Documentation/devicetree/bindings/net/can/st,stm32-bxcan.yaml new file mode 100644 index 000000000000..c9194345d202 --- /dev/null +++ b/Documentation/devicetree/bindings/net/can/st,stm32-bxcan.yaml @@ -0,0 +1,83 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/can/st,stm32-bxcan.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: STMicroelectronics bxCAN controller + +description: STMicroelectronics BxCAN controller for CAN bus + +maintainers: + - Dario Binacchi + +allOf: + - $ref: can-controller.yaml# + +properties: + compatible: + enum: + - st,stm32f4-bxcan + + st,can-master: + description: + Master and slave mode of the bxCAN peripheral is only relevant + if the chip has two CAN peripherals. In that case they share + some of the required logic. + type: boolean + + reg: + maxItems: 1 + + interrupts: + items: + - description: transmit interrupt + - description: FIFO 0 receive interrupt + - description: FIFO 1 receive interrupt + - description: status change error interrupt + + interrupt-names: + items: + - const: tx + - const: rx0 + - const: rx1 + - const: sce + + resets: + maxItems: 1 + + clocks: + maxItems: 1 + + st,gcan: + $ref: "/schemas/types.yaml#/definitions/phandle-array" + description: + The phandle to the gcan node which allows to access the 512-bytes + SRAM memory shared by the two bxCAN cells (CAN1 master and CAN2 + slave) in dual CAN peripheral configuration. + +required: + - compatible + - reg + - interrupts + - resets + - clocks + - st,gcan + +additionalProperties: false + +examples: + - | + #include + #include + + 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>; + }; From patchwork Mon Jan 9 18:23:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 13094102 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 13D54C5479D for ; Mon, 9 Jan 2023 18:38:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=wsAEFEIfRLKmIWyUy9KJOtgffGH3hV++/4Hp34s4L1E=; b=FxEPAwpD9Qn3M0 rBTEc8nL7sroIkdsST1mpqO7GktLdmxJo/u/7rfsTEQi9UT2tB3kkq6opDxN56COhVAOv/l8d3Bob nO1Y6ysxoY+XuW92XUO2mXFfJIOgqAh7Rcso6IidpyDC863nJBjQkdhm1fF4KeBrNF3wvi0EvfI/S LKBygMd19k+yZfsSemryPUazPmeiH0ZLNLIjsyhq1fvPeoDex2OpbkL2vROowwpipSobNWKKcox5R TNkhtwj03hru8EPteODU52rIQBh/n2TO9NdWvmKpkFaidKqgEpyf+/JgPo4W/0sK8KMKgreMALKiY 34XyFxqhgVIfs5AVm++Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pEx0f-003LTu-Tl; Mon, 09 Jan 2023 18:36:45 +0000 Received: from mail-ej1-x635.google.com ([2a00:1450:4864:20::635]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pEwoa-003FsS-U2 for linux-arm-kernel@lists.infradead.org; Mon, 09 Jan 2023 18:24:12 +0000 Received: by mail-ej1-x635.google.com with SMTP id gh17so22360337ejb.6 for ; Mon, 09 Jan 2023 10:24:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=IyvoS4lwvIpyEoyklIwrERImFtUVOqbD9XwAm5ABwfM=; b=Em2qQJ7rFEjYkZdoCry2iyVJCDZzqkWRMTzhgGNjO+cpHZb1MqFbrE3G8pZC7dkfKh xQjLkDRJr04LNOnP3omQC1x0RLQclqRc/G13V4NXXA446J5edO08vTeBMC9IbS1F1Rwu Dvg0X6VxJH9iChHXi5Bnr1oSSfI2gOpxEbOcU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding: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=IyvoS4lwvIpyEoyklIwrERImFtUVOqbD9XwAm5ABwfM=; b=vrmmW/YxfX9aypePEUDr91YG6/1bzMhletviBTZvmdtXuXdV+6aHFQn6YVBje4fZ5r oL1eTFwwtOV6fBD66E3Ta7WQ9q9l3gbBMKwAgym6YkXzlQXv0uYraCmYSJi77402Clvv 9Vvxo+fR9HTNvi0mm223O2mCAktDFuY+v05OvMLwVA6kyTb8fZikF6u0LAdhTrYBAphG FfU147N90vGuWPZ7KtLJ2/T3++Fm7h3oSC3y+3mk7A09ytV44w5xfKZpBRJU1GaRvsnz JzZTtyGWdsCNA/RIScM2sL5ykI1gJjJgnrrXBr8h2izGlUoin3TOehg3MhtvzKCDJrIq P5Dw== X-Gm-Message-State: AFqh2kpkMAdQjVHAkwROpFGCsFh8ye+1wHabOlyUOKXVI1i2oHTzcpuw 8SGdTEnu/ILUrYAV2DufE4PfFQ== X-Google-Smtp-Source: AMrXdXuAWf3obP0O2U9Of1B+8WU1d8adQ+eaAjxTYDRZkG9FzhsZfn5BB6FfOrkaxBgYFCusBIeDWw== X-Received: by 2002:a17:907:2388:b0:7c0:e0d9:d20d with SMTP id vf8-20020a170907238800b007c0e0d9d20dmr53677519ejb.37.1673288645715; Mon, 09 Jan 2023 10:24:05 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.pdxnet.pdxeng.ch (host-80-180-23-57.retail.telecomitalia.it. [80.180.23.57]) by smtp.gmail.com with ESMTPSA id kz22-20020a17090777d600b007c1633cea13sm4093653ejc.12.2023.01.09.10.24.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Jan 2023 10:24:05 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Vincent Mailhol , Amarula patchwork , Marc Kleine-Budde , Alexandre Torgue , michael@amarulasolutions.com, Krzysztof Kozlowski , Rob Herring , 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: [PATCH v6 3/5] ARM: dts: stm32: add CAN support on stm32f429 Date: Mon, 9 Jan 2023 19:23:53 +0100 Message-Id: <20230109182356.141849-4-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20230109182356.141849-1-dario.binacchi@amarulasolutions.com> References: <20230109182356.141849-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230109_102410_170927_C9F081AA X-CRM114-Status: GOOD ( 13.71 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 --- 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>; From patchwork Mon Jan 9 18:23:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 13094103 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 01BD6C54EBD for ; Mon, 9 Jan 2023 18:38:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ir3DYatowPjTtzMduEgskHtLX/QkmeuYSWm6gXEcHok=; b=EFyL3andVHBceC IVI7IulaoHwWygWruAfxOiCuFco23SNl3kYWgGqCAJmnwvwagIACFEo281Y8ULg4/qC7e3s3vSemF cT4txlcSayvwEKt4nQIy4ogz7qlANVb9wi0GbVeLVtefEUkkFPl15dJb0RcSuRKiarXnu/1yfylP+ xvErdOW1BpSOAT6JLr/JrN6rSyf1S+24RDwxlsD4sCd9wxUc1//7HE6XaGAydPykmUik9y9TRYUZI sEOO7PgWQ29eLRQNsRiPDpYlLNw2v0wCvmeeCVzsL7uznKsHsQ6XDBQ+8EfNGC/oOlbHrOQ4MNBvr 9lJk3s3lUXOJdY0Koa8g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pEx1h-003Lwu-NT; Mon, 09 Jan 2023 18:37:43 +0000 Received: from mail-ej1-x635.google.com ([2a00:1450:4864:20::635]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pEwoa-003FtS-Uw for linux-arm-kernel@lists.infradead.org; Mon, 09 Jan 2023 18:24:12 +0000 Received: by mail-ej1-x635.google.com with SMTP id u19so22263781ejm.8 for ; Mon, 09 Jan 2023 10:24:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=jfErmyZAWFClEhl0ayKENaiIcOOkglWFws7K0nbLI8s=; b=keYgJ2y3nl5URethgnUoaSGHv3Qr1qCaZizWzyh3ecUHLBUFAOR+b0RCOE0XQ/QD0X dhlXZZ4fBWTRdK5q3Ef7VW5Cs9igbU9BkjasBP0WiF2ebvrFYvw9xBJe/tyRlKNdendY mN1/SXhIEecvDAHuF1wycidjyRVeJ3uPadn2s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding: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=jfErmyZAWFClEhl0ayKENaiIcOOkglWFws7K0nbLI8s=; b=C4KFRnDB39luJYufgUtAKnYtSfZWzPZDKMyiwttGg0V8cekQeDTjVaJjyMy8bvoYMh 5lHdivXDWga6P9HyysrWqXZkC1QRlQZzLeYR1EXaa7uP3riD3DrBcYCwnwuNfgofKk1o Uhsmtl9fVgshCPmrV5vNF5Frto6vu62V0PkW0svqnUF+jECwGf/CQH3U+fKWczTiVp0r NGWj571kMQFB/izSQ5r1guVqOEfe3ookc/jSJlOUXRQSGg4gcybP7tE13UQ2hv2on9bD 4Ky1DSxZQbILIYCzbBDfFciwFjRzoJafveTbelVliSUKaYU7M7VcSAgM7Xkr3VRVJEO0 Ry+g== X-Gm-Message-State: AFqh2krunAyuCm7wytd67vy4wq7JxMXB+QwDV2TFi4qR8+CluNqXIdYn O9B5AE/svk4SAz2/QjrghKE6oP8aWqAy4omroFE= X-Google-Smtp-Source: AMrXdXtO6fIJ3sOc41BMC9psPV+e6x5DXYY7cI4VJRUluWdF9f+T6K4XqawFGBAk0fbrbk81UWuMbw== X-Received: by 2002:a17:907:2113:b0:84d:4b39:1448 with SMTP id qn19-20020a170907211300b0084d4b391448mr3081519ejb.67.1673288647150; Mon, 09 Jan 2023 10:24:07 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.pdxnet.pdxeng.ch (host-80-180-23-57.retail.telecomitalia.it. [80.180.23.57]) by smtp.gmail.com with ESMTPSA id kz22-20020a17090777d600b007c1633cea13sm4093653ejc.12.2023.01.09.10.24.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Jan 2023 10:24:06 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Vincent Mailhol , Amarula patchwork , Marc Kleine-Budde , Alexandre Torgue , michael@amarulasolutions.com, Krzysztof Kozlowski , Rob Herring , 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: [PATCH v6 4/5] ARM: dts: stm32: add pin map for CAN controller on stm32f4 Date: Mon, 9 Jan 2023 19:23:54 +0100 Message-Id: <20230109182356.141849-5-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20230109182356.141849-1-dario.binacchi@amarulasolutions.com> References: <20230109182356.141849-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230109_102410_172412_0E9CE834 X-CRM114-Status: GOOD ( 10.87 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add pin configurations for using CAN controller on stm32f469-disco board. They are located on the Arduino compatible connector CN5 (CAN1) and on the extension connector CN12 (CAN2). Signed-off-by: Dario Binacchi --- (no changes since v3) Changes in v3: - Remove 'Dario Binacchi ' SOB. - Remove a blank line. Changes in v2: - Remove a blank line. arch/arm/boot/dts/stm32f4-pinctrl.dtsi | 30 ++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/arch/arm/boot/dts/stm32f4-pinctrl.dtsi b/arch/arm/boot/dts/stm32f4-pinctrl.dtsi index 500bcc302d42..8a4d51f97248 100644 --- a/arch/arm/boot/dts/stm32f4-pinctrl.dtsi +++ b/arch/arm/boot/dts/stm32f4-pinctrl.dtsi @@ -448,6 +448,36 @@ pins2 { slew-rate = <2>; }; }; + + can1_pins_a: can1-0 { + 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; + }; + }; }; }; };