From patchwork Wed Mar 15 21:10:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 2799 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 176C544C0A for ; Wed, 15 Mar 2023 22:11:04 +0100 (CET) Received: by mail-ed1-f71.google.com with SMTP id z14-20020a05640235ce00b004e07ddbc2f8sf28513024edc.7 for ; Wed, 15 Mar 2023 14:11:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1678914663; cv=pass; d=google.com; s=arc-20160816; b=XeMrHOZ5rH+z3ACvggsRrdiu7oNBxbomiRjDSjtq4hxWvwy9uO7jxCL3xUj85gWwsC ad9RM2awhnxqGnL+NIZ92kyNG6d5poqCKGrzXeWZ4u1sQrlVp7R4xeR981djNtQQJcvn MVbC6PtB7IXwIqzZRofpQyESJv7FShA/3sF6XbCwEH29iTujPX1bBKXISgZHkA9gOZ+C Ai1PwJ/vQKG2QZQXMlEbz8XRKKvMo2nc4BRw2lxayRmJgn4XCxcioaKVuy3bw7RAHX1M 4K15PRU4+4MxWLL5rTXQXtI1ZutYlJPpP8aK1T0i+UKtgNIo79n42KhHgD7IfDb5Ir5z +eMA== 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=c3keGljZK9pMIYlHCDcD5dMBkG59atWfPB7XJXGLOBM=; b=Rh5G584G78CWa0ca7r7niaoxitWOfZ4Dm3UswaLqZr9hAPZub9q9g0a628/oMB3Dts gteaJG5kMmlvr8/38U1mX4mRyHQpFvxisjWiSTkBeyJYgiSa9A8B8WlHIGuhJ+TadkcA 7r/iztsPwtYiB09s5mfMfUJFv9v5Pzcm2Rv5eiCmawgIkkMA1MK7ohCE+Is/UMb+spO0 ySv+WgtcTlygXOJsJEDu58/iMq0U9ByF9tZc+NdSeUBld2CKAj8uvfoXtqpXw1M+9fr3 CjYPYfBwtBwjHLShejamTNeVk7KBkS1iIuo16kFf+Rnc8FYkD7cs2m+OBhl55RcD+ZtA Cxfg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=OcTQbnJs; 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=1678914663; 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=c3keGljZK9pMIYlHCDcD5dMBkG59atWfPB7XJXGLOBM=; b=WrOdUP6ngNcd0v+eUQv5jfRo5c/aEXB9Sf0NmMhPO78+7on/Mg07X1E2OLPwbN9gth iKZAaohLnMbEPz78c80C3mIUP20uiHPnDocZhVocQ6zp9p7WST336a/PT8CFAGyudoDC 0M0mse0lle6sYbQdpk5vQJqxr6aQXWSFGZP4s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678914663; 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=c3keGljZK9pMIYlHCDcD5dMBkG59atWfPB7XJXGLOBM=; b=kFlR0wYo8D3IVdJrp3EBoxYEWTKUIv6enPkmV4hdAdA/o5G0MVPU8mEdTIoam/GQ3N BbOkbE5JNvVja5goYXINw1KQ9ZP38XcY1GpKm9XhsrXQJzlS13cM/XbWsFzjHcY0sEjr cHCYHnQuaHmdgeRnu73LZB0QffIYysdKO6uHoqSh8i/aQ2iwefzPpH+ESvIoqRsH/xeC fdDuwSEd/SDw1QVaopTwGEJ3fzdLG1TiQj4Cm0aSI/+wGbqko8Bt2GE5GuzL8CoJzmXd CFNvJpnhk/Hu8tM/i8n6g/DVBGU1mdSqNF4NutCgcHaiJ7C6St7bvcCE3O2iypWtxfZs cHuw== X-Gm-Message-State: AO0yUKWHRw2IDlJTcBeb220foRs1C6JN6Xab3nd/D5BRHTTIQtONl4N0 +tSCLO6AJscWxfvQgzgP9sxI8ZfdeLWKTAE4 X-Google-Smtp-Source: AK7set+p+CNysnCujLzk3gVu4l9MauPfzDdmH4275DvAmRQ5Trn1Es14PNLPt0smkahhpq2/XLWoOQ== X-Received: by 2002:a50:d4d5:0:b0:4fb:adb4:d9b9 with SMTP id e21-20020a50d4d5000000b004fbadb4d9b9mr2179943edj.7.1678914663432; Wed, 15 Mar 2023 14:11:03 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:906:6ada:b0:8b1:4cc3:b99d with SMTP id q26-20020a1709066ada00b008b14cc3b99dls13459519ejs.9.-pod-prod-gmail; Wed, 15 Mar 2023 14:11:02 -0700 (PDT) X-Received: by 2002:a17:906:3682:b0:886:221b:44e5 with SMTP id a2-20020a170906368200b00886221b44e5mr7376016ejc.62.1678914661745; Wed, 15 Mar 2023 14:11:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678914661; cv=none; d=google.com; s=arc-20160816; b=A/VFjq24FCouGHfhfOxfJ0rp3jaQnSNPMuOaPmHlepZVHFG0PjgwOeU/et1kyCsrkm kibmHHQHzPk4gKGk63QUXiRUi+F5hPkKFeHaZesd2/UN5vkauADPB/Hl5k5tY/pyV4+d Va3uiqAo+tVVvIHiQ3GTwFtNKYgPxR6/3RG/UGGvPvPeaE952cGTKjBM5BjeDXiQflfz eFR1+Bw4hj9+sMc+uVW+uMgqVVtkHDF5dK5+IBoP1e9uc9FyznoEYaWYoMB0bPQISoD7 PsF1UmR/P0nanLAVvqt0TOL+FduVuqBzmwUexzsO6pWWn4FVIfFAJEEWxha6QmvsBALh eJXA== 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=Kod5siM2bcM+dDVpz/GqL4BGUBIqfHoecSZkZ5xWujI=; b=gVUzG4A4wLoENoskmqyF01bVynXnbwc0m9mYSEFlGszxSINXG0xLjE4vb6/NBpu4q/ e41o5D2tuqW8K/7+wNoTMRAXCm+YuthZusgJI7OqRKTHT5s78CQkdGpjkF90YgcDFMXW evqzwqsynoepT1NZiSw+ESp5Zp8zEvuy+xXOx8ilqvVvRErWIc9Zf+6GvIx5VBhuUi9l SCZ7+Ut/R0qu+OSLabWxkswZ81IEfCdB1mZIB7Sw/Vh3VFxp967CD/Mbm0YFvedP7job LtInQ4y1hqc9e8meCmC5OvPIsWajTrLWY7g79w2ldL5sd3LN69EbKSg5b75bH13ACzpp Yi4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=OcTQbnJs; 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 sa5-20020a1709076d0500b0092bef8b0b02sor4348703ejc.112.2023.03.15.14.11.01 for (Google Transport Security); Wed, 15 Mar 2023 14:11:01 -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:8609:b0:8b2:8876:2a11 with SMTP id o9-20020a170906860900b008b288762a11mr6862160ejx.28.1678914661511; Wed, 15 Mar 2023 14:11:01 -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.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Mar 2023 14:11:01 -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 , "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: [RESEND PATCH v7 2/5] dt-bindings: net: can: add STM32 bxcan DT bindings Date: Wed, 15 Mar 2023 22:10:37 +0100 Message-Id: <20230315211040.2455855-3-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=OcTQbnJs; 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 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>; + };