From patchwork Mon Mar 27 20:16: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: 13190072 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 2EF97C77B61 for ; Mon, 27 Mar 2023 20:17:58 +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=0VHUuUndbYol2uROimTvgpCBk+BXTnIHy2sHmwwvOwg=; b=xfHD3FlEapmbzm SW99Xub+fw0KWWwpFIzCqqDzSop6+EcGaVoIs8/w9DpLOZq7gQgfSORlmh9KxG/6zHuyeKlDazI/j zdn/6KwEEN/t3AVmACyik6rydHPn7SVUAF1QteW/D89rxG1Y0RwUUBc9V+9u6ZX2+/AM2MCEwQa6x qbkhG3IJiMjXeWuxHNv4APkXMyWxm5pPMjW342hsK84Nwcb8FqbjNyTOCdkSF0pcJsC3BZkN1qfNG GFRochzr5NqtegjPRrlC6IqwDE9kxAkQ0d2LhQWPwrZX6df2SUM7fo2Bwe5G9F1UYbG5Gndz6agz5 Gf17xCCkc59kEdI+Fjtw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pgtGz-00CIuN-0Q; Mon, 27 Mar 2023 20:16:57 +0000 Received: from mail-io1-xd34.google.com ([2607:f8b0:4864:20::d34]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pgtGq-00CIsT-0g for linux-arm-kernel@lists.infradead.org; Mon, 27 Mar 2023 20:16:49 +0000 Received: by mail-io1-xd34.google.com with SMTP id p17so4423594ioj.10 for ; Mon, 27 Mar 2023 13:16:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1679948207; 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=naF6lvSQb9TRc8Fh22LBxD4avClkKSEDkyx9CDmChC0=; b=CxSVI6/XYwWD1PMufblibS7y0Jl3dfs4ZwMdKkJFfdb6WmW7yVJffiah3hYVF5VaDZ M5g3fL/txQlETgSWwwXvtjv8LPmDpoHAu/vhSjKeJjtfcceikIoTr+YeObcooC+tZP2c iW/vA9JTskbIaRD5v2OLWtM9aaRF2TZB75q/g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679948207; 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=naF6lvSQb9TRc8Fh22LBxD4avClkKSEDkyx9CDmChC0=; b=tHR50MM0NlEI0pVSuSs5zZAD/JNwHW8JSK0SQUEvDVfgg1yPPfXpzEmVoBcAUPGySX DLJm8rMQR8TGOq41hMZEsbs/IKh13gCdCR46pVuMN5yGmKiBosahUOVpmuQ4kg/vsHY3 33pJ0fLnudDrfkp4Ia6YGqaigh1dS1OtV2aQ9X07E4NyjmK76wzPdxTOsSQ6ujVVKbDp wsADgpjnmAAGEjpqRsAt/3G7vKAIJaViqXBNJQwEHTnpXkf5O9nl66BRYsp9ciitaUIH 2IrDjXW9tvpPEYkkt36k58gK8TS/m6WJuxSmB8Q37Mq2qKpmPVnqP+2SKxDdDFSwsOKb Bjsg== X-Gm-Message-State: AO0yUKVS7ywvlifPZpvTJPSeo9kwNMLuCWdPFCzs4Rhj1fADqH8BNg6q JE31aNpcefUGYD0XVCaFtvE58kmYi4sgv+8yGX0VeA== X-Google-Smtp-Source: AK7set8BKUE0k2yqKIwOZ7LQxWzIh8H8MHkfhDWKLbsA5N7LFJXFTP9lyZONEBlLhRe5TuBLZmPYng== X-Received: by 2002:a05:6602:408b:b0:758:9e69:13f1 with SMTP id bl11-20020a056602408b00b007589e6913f1mr13224545iob.9.1679948207250; Mon, 27 Mar 2023 13:16:47 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.pdxnet.pdxeng.ch (host-87-0-102-254.retail.telecomitalia.it. [87.0.102.254]) by smtp.gmail.com with ESMTPSA id u26-20020a02b1da000000b003a958f51423sm5594759jah.167.2023.03.27.13.16.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Mar 2023 13:16:46 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Marc Kleine-Budde , Alexandre Torgue , Rob Herring , Amarula patchwork , Vincent Mailhol , michael@amarulasolutions.com, Krzysztof Kozlowski , Dario Binacchi , Christophe Roullier , Dmitry Torokhov , Krzysztof Kozlowski , Maxime Coquelin , Rob Herring , Sebastian Reichel , Ulf Hansson , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com Subject: [PATCH v9 1/5] dt-bindings: arm: stm32: add compatible for syscon gcan node Date: Mon, 27 Mar 2023 22:16:26 +0200 Message-Id: <20230327201630.3874028-2-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20230327201630.3874028-1-dario.binacchi@amarulasolutions.com> References: <20230327201630.3874028-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-20230327_131648_250279_027ACFC0 X-CRM114-Status: GOOD ( 11.68 ) 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 --- Changes in v9: - Fix commit description formatting. No semantic changes have been made. 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 Mar 27 20:16: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: 13190073 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 2CDE9C77B60 for ; Mon, 27 Mar 2023 20:17:57 +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=hxC+pHqei4Th8Ju0nK62AXohTW2RxCPoY2rmImx5iUA=; b=TVR7FYf65AnsPb y06zHMkUjrXxeRXr5+JeGTapE5AGcquy/VwmGKMufvUHQSrIyoV0bxQj8HxspQ5ZBU7o5GtFYKagI TJSlJR/ZwmQk4ZvTq4F3qM5XE7ck3NFIEDsoQkjrqOF+0i3Ci9gxSKc66Zy1nJfDXZWLjstSF1KnY BztrwnINTHKyhr1niLTezNZVkeP81FFNHHDG7kTdyBzkShfqub6q1uKTc5sq45fb+t1HT9TRlX/7P VvYy4/CPQ1zjqx6D75L76eGfc+r/gIwoa9nEQ/WmqzH7oKSTkWYLwppFXEvILVRqFmgwUeDYVXxvq YP1kb2gHqaUM9KAIEnQQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pgtH7-00CIwF-1J; Mon, 27 Mar 2023 20:17:05 +0000 Received: from mail-il1-x134.google.com ([2607:f8b0:4864:20::134]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pgtGy-00CItZ-18 for linux-arm-kernel@lists.infradead.org; Mon, 27 Mar 2023 20:16:57 +0000 Received: by mail-il1-x134.google.com with SMTP id x6so5269676ile.3 for ; Mon, 27 Mar 2023 13:16:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1679948213; 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=kfP3t3lS3idk7NC8xKbJ1ZUbNQe0L9Qw+EDLBJRD4xA=; b=VwgC/3Jbpiajm/rjRUxGFMRaUjOhF+7V4XzdSJlsh73n4fQe4KM6V1Yl45ddtzdeV/ lWXSnytdZd6EZidJodupWglswTSyBb7wj6wRBAG++9SYQS8jlixJsi5ScXtr+C04kes5 +iViBbRJNGvjjt+ov/dY1Svs2lN9VphZrmQbI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679948213; 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=kfP3t3lS3idk7NC8xKbJ1ZUbNQe0L9Qw+EDLBJRD4xA=; b=MlBw5zMdbq6UPVdlPbfgdlGWG6j0tZOTC5/xJXJBaGcNrHyo9SuzW2n3Kw+3DBVEOk jxIyJpCcR/A1howTd1EBoJtONazXrE9GcwMpJepiX/JaD2Bs7MUdKH6zVwqbFsQZfpSi /miGCEZXp5fkQzfx2JqDWluwQQldWtx6zixBEf+3Hj5uo3+Z5WStBqF3ERzGVAvlIR7c CZgHlFr+Rp9sLakhZEiWZoOJ03O8+eX4VpysFR1DhisvES61DyNeyxIbo9FinENf5UHx tvpwT1P5EZgJomX+bitqdKM+DfrPl0YWGQa2i3nzkjfObuzmdraQIu/IZAjaJ1puyyUy JJUg== X-Gm-Message-State: AAQBX9fwNbinZFwUP3+jCXPhMZLufCi5abonuz64qVCg+X0iysppvSdI w+pqDdD10Cv9UE37arVtwan8Q3wXl/y/H1MzFzmspA== X-Google-Smtp-Source: AKy350Z+9Lu21nwk5mtTuZ6xpDKjz4jXUqvEC5RWgQ8Q+IxVtypujMaYPZdhAb3F6TNMDD8rJMRilg== X-Received: by 2002:a92:d242:0:b0:318:ae1e:ccd5 with SMTP id v2-20020a92d242000000b00318ae1eccd5mr11543956ilg.28.1679948212885; Mon, 27 Mar 2023 13:16:52 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.pdxnet.pdxeng.ch (host-87-0-102-254.retail.telecomitalia.it. [87.0.102.254]) by smtp.gmail.com with ESMTPSA id u26-20020a02b1da000000b003a958f51423sm5594759jah.167.2023.03.27.13.16.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Mar 2023 13:16:52 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Marc Kleine-Budde , Alexandre Torgue , Rob Herring , Amarula patchwork , Vincent Mailhol , michael@amarulasolutions.com, Krzysztof Kozlowski , 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 v9 2/5] dt-bindings: net: can: add STM32 bxcan DT bindings Date: Mon, 27 Mar 2023 22:16:27 +0200 Message-Id: <20230327201630.3874028-3-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20230327201630.3874028-1-dario.binacchi@amarulasolutions.com> References: <20230327201630.3874028-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-20230327_131656_398952_C1C55182 X-CRM114-Status: GOOD ( 16.90 ) 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 --- Changes in v9: - Replace master/slave terms with primary/secondary. 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 | 85 +++++++++++++++++++ 1 file changed, 85 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..ca97ba3c2b05 --- /dev/null +++ b/Documentation/devicetree/bindings/net/can/st,stm32-bxcan.yaml @@ -0,0 +1,85 @@ +# 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-primary: + description: + Primary and secondary 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. + Note: The ST documentation uses master/slave terms instead of + primary/secondary. + 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 primary and CAN2 + secondary) 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-primary; + st,gcan = <&gcan>; + }; From patchwork Mon Mar 27 20:16: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: 13190070 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 D951BC6FD1D for ; Mon, 27 Mar 2023 20:17:55 +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=II68tE8RZlCrOdJriFSOTuT4yQaFwhKubfXEWFWP8xU=; b=VEOhvl8r4kq+iE HZ/IUUZ+7xc86cJg1RKrnE/1M/lGYRmBlXwyytdvUW8jg5q+321MbuAfBoPfill5q3osByiMKhfkI 2TQ2WSz9IrmlcnnZOvWd4N+8wZngbqQQnzExefVcDaQhWP+W54KN+iGjkXTuOjKyr94ZqcGAQj5C8 qpJf8hspn4R6yD+fgd7nq8Ev83jF5we+Cnzvfvq2fTUwXd2M7bq5PXJu00FlCx0KEC1zX27IewuqL TLM6hI2x6sRCeHTu6erhKCMFTZFMzRMeaHHXMW+CqSdEcr45eyNO7DL9TWTBihghb2xzD2/TOzN3/ tCdiwSLyUuDl9iTFx34A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pgtH8-00CIwZ-1s; Mon, 27 Mar 2023 20:17:06 +0000 Received: from mail-il1-x132.google.com ([2607:f8b0:4864:20::132]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pgtH1-00CIuT-0E for linux-arm-kernel@lists.infradead.org; Mon, 27 Mar 2023 20:17:00 +0000 Received: by mail-il1-x132.google.com with SMTP id j6so5252265ilr.7 for ; Mon, 27 Mar 2023 13:16:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1679948217; 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=PQBAqyGpgtibuEQ07wkfyoJFQhHr9Hz8PDMB/KLLeHM=; b=JTjIYf+c214XaxQnu0kKEL9Eo7jLRGqw+K7R8lqR0oNNC8MVwOVZPZ2fxTrYbvC1Ri CCAZZSSlnBkr3Coou+GNmEyPu1mNmlpeThmdRoKJGRmCh3COBylHJZ4SR5LNWhhRZ4xe x6jcC2+eZ77HFwsra4tlZUWwIsLlZBi1Q4Qto= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679948217; 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=PQBAqyGpgtibuEQ07wkfyoJFQhHr9Hz8PDMB/KLLeHM=; b=4vcBNRU+EHb03j7eyJYxnhrJEngdvCcGIoAvvUtLqiPFciVLP9WtbBtPypZanMFIel 5DMSSamq/gS8KN4grgn8L84Dy5CxMhOZpDBbmUsTtLtziEfGINIhSAB9N2IgFH5UOy18 qB8zuB6DMed8X1Bs6KSeaizWh4HGBxrAEp/0mKexhaN+SHU4COyqFnTF/npU7q7jHyPS QioWqf5sKP8MXtM7x9k9Eq84bNsp8djs1RuhTOq0q2JU77N90yLM2pEAuca/ovbQ6iaO itdWim6m1PMTVQsDImrNsYbOck74HNuHQgxsgkZH8klNvM+jwcZrE8tsr9l9RJds0fga QmIQ== X-Gm-Message-State: AAQBX9cy9TdpN1s/6QxCF40WxWvV6S/LbNVwRDHhuUhrvE7Gbsd8PhRh 9YOqOXXEpZb8cpBN9BqwXuowjg== X-Google-Smtp-Source: AKy350adLi+OaoxxRwg4JjV3hshajTUMAPaxd6bf7+Kdg4CU5S3sd2AFjyNuz2UKvfj6cTH0OVf8Uw== X-Received: by 2002:a05:6e02:1212:b0:325:dc0c:73f5 with SMTP id a18-20020a056e02121200b00325dc0c73f5mr8544921ilq.14.1679948216966; Mon, 27 Mar 2023 13:16:56 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.pdxnet.pdxeng.ch (host-87-0-102-254.retail.telecomitalia.it. [87.0.102.254]) by smtp.gmail.com with ESMTPSA id u26-20020a02b1da000000b003a958f51423sm5594759jah.167.2023.03.27.13.16.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Mar 2023 13:16:56 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Marc Kleine-Budde , Alexandre Torgue , Rob Herring , Amarula patchwork , Vincent Mailhol , michael@amarulasolutions.com, Krzysztof Kozlowski , 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 v9 3/5] ARM: dts: stm32: add CAN support on stm32f429 Date: Mon, 27 Mar 2023 22:16:28 +0200 Message-Id: <20230327201630.3874028-4-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20230327201630.3874028-1-dario.binacchi@amarulasolutions.com> References: <20230327201630.3874028-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-20230327_131659_110836_0AEF87BE X-CRM114-Status: GOOD ( 13.54 ) 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 primary and CAN2 the secondary, that share some of the required logic like clock and filters. This means that the secondary CAN can't be used without the primary CAN. Signed-off-by: Dario Binacchi --- Changes in v9: - Replace master/slave terms with primary/secondary. 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..c9e05e3540d6 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-primary; + 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 Mar 27 20:16:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 13190074 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 0B830C761A6 for ; Mon, 27 Mar 2023 20:17:56 +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=yt8ZPmTnDr+rI73F/wVcHtWWW0AjihB/QZS/gch7c2s=; b=auKS8LlbHPO2xX EpVv3oDKMCTdb0QlRXkl91ihAYGX6wEPvCO0R6YLuAzO1LcZUMux9Z60W/afsjEdwXFbfHcnJscWo hPUiB0kATNG0SFJvcE3hXJjRa9qNTdOw/f/eZyJavkY58352WVUZj9sEIYYK1I7kAUhdY7KDJmsiq 2luFUzx7MboPIxEj2SgwAsZ0cQDN06ldFlMgsyN6SybIoi+xUg+01mykpHE94IlC8bM3R2HEyHpmV Q2XAu/d3yn9kp4Zwr1aNEwWlRH5bQPqWDpbMLOCmIlhR7iFihO2wMzZBv0oAl4yCQjVZe6qLE2srS iXnTFrhyTIBAH0nxRfDg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pgtH9-00CIwt-2G; Mon, 27 Mar 2023 20:17:07 +0000 Received: from mail-io1-xd2c.google.com ([2607:f8b0:4864:20::d2c]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pgtH4-00CIvX-2T for linux-arm-kernel@lists.infradead.org; Mon, 27 Mar 2023 20:17:04 +0000 Received: by mail-io1-xd2c.google.com with SMTP id o14so4432396ioa.3 for ; Mon, 27 Mar 2023 13:17:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1679948221; 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=QV3iGa8KiUlr1LClhXl1D1BGw0maVF3hcUmABXx2qKM=; b=frMVCmupB0FHFKpyJU1n8GWHF7S/mmcD8SbntDNhdLvpLXdVvkU+eukIa0ls1L0X0W wLYN8A1kbmvq1MQP2phYVMnEd914VROkeQ0Hc1bSE7gC1cF6LCcKK3ISj2xUz+hVgjyC cRbX1fk1iNd5tidmkIQSv3bsqGIS451XJr64A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679948221; 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=QV3iGa8KiUlr1LClhXl1D1BGw0maVF3hcUmABXx2qKM=; b=2F/TKP2jjiy8YxGgqKVLAAolVoVj9+ga5pt/Pbxa36cSkOoPWQEoF6o0LzB8UZbrOm j4usjTWWH+xPlTNf2yf5XFnyHCHNdNoPatFRDSOEm8PdjUBZ1xy6iQaPS3UAY0Zmuv2K Dg4LqHvUVvceCJP686TU/Dl1shuFlz5MRCCxikx+bBR95LqoQRBn8YTFKcOl4Z5ekwMN Yh6BrwVla9jrPrIMY21a1/Zr9OHmbyYOLR8qVnh+CkXDIuZHogK0qauw9JPn3ZKBxqhq 4qmzL+f6WLcdhxc/tjbOnH7Keu1FZ5dBYeFugmGnQ5TskyFQQXX3EFygVYVwgodW69Wf CmnA== X-Gm-Message-State: AAQBX9f9RMfG/4a14ToH3hDPex4whN+zm6gtXyMBGYtfzCxwXQl8SSFH FnOUWYVGM8okPv/NDEruuDhpAQ== X-Google-Smtp-Source: AKy350YJ8bkQ9g33O6WbkXo24i23Qsh/9clE8FLxMP+MDsv7aHOF/KaKoAsvEO/Fpuide3NpVJCCCA== X-Received: by 2002:a6b:c90d:0:b0:75c:90f1:4622 with SMTP id z13-20020a6bc90d000000b0075c90f14622mr195013iof.0.1679948220980; Mon, 27 Mar 2023 13:17:00 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.pdxnet.pdxeng.ch (host-87-0-102-254.retail.telecomitalia.it. [87.0.102.254]) by smtp.gmail.com with ESMTPSA id u26-20020a02b1da000000b003a958f51423sm5594759jah.167.2023.03.27.13.16.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Mar 2023 13:17:00 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Marc Kleine-Budde , Alexandre Torgue , Rob Herring , Amarula patchwork , Vincent Mailhol , michael@amarulasolutions.com, Krzysztof Kozlowski , 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 v9 4/5] ARM: dts: stm32: add pin map for CAN controller on stm32f4 Date: Mon, 27 Mar 2023 22:16:29 +0200 Message-Id: <20230327201630.3874028-5-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20230327201630.3874028-1-dario.binacchi@amarulasolutions.com> References: <20230327201630.3874028-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-20230327_131702_800990_764D49B3 X-CRM114-Status: GOOD ( 10.73 ) 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 4523c63475e4..3bb812d6399e 100644 --- a/arch/arm/boot/dts/stm32f4-pinctrl.dtsi +++ b/arch/arm/boot/dts/stm32f4-pinctrl.dtsi @@ -447,6 +447,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; + }; + }; }; }; };