From patchwork Sun Sep 25 17:52:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 2381 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 91B9F3F265 for ; Sun, 25 Sep 2022 19:52:21 +0200 (CEST) Received: by mail-ed1-f69.google.com with SMTP id m13-20020a056402510d00b004519332f0b1sf3703124edd.7 for ; Sun, 25 Sep 2022 10:52:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1664128341; cv=pass; d=google.com; s=arc-20160816; b=rp8awh4hQndfc9/XBvN3aIKSN5v3LiZrMPlqMMxCk/p1Ua+K5Hwb6Txs8vPRYMd7Eg I2XjHw0MbWJ2llFJvNbWaR+mr0TtVw+uZXj9nvt1G6lsOE9DzJ55JzBHyOLYTRBm54I2 p/15MeQuTneHMD5TSaS8gXsNn5CXfYP1f0uY7OAFIzvJ3kDz2foEhhHaJ4mYB1CAfxFH ESiavuGYJv2h13JlSDtHL57Ts4pT1x2wV6vXuftk2xH/IE87Kag/hWy/EQ1rGyE3TsT8 8WgGm8ewra1pPz8E9gA/SL4gnqqDeNflRu2Oqi9Df7QvpqtjlGSV6zcNu3+FyA1hiRCY /yhQ== 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=95upEO8HJ8NLi7B37YIuTgNhbtdyiUSSUdWtuIxPv1k=; b=qHQ3niFJmulDqHuvnIHmJdFSvdoZOW4dc74ESNbgp2KkQfhtyiixu4QJPLZyD8vZML TORWg25p55g3A6m2ZkA0QHPGb6LGnZindyv27EoAuCeGwpX6OOwvgd+UyZ5WLtV2JqrV mbjsMmWBadIGlSwgnntLPmSxwP4TsCNImu+C3yhBAulYsR0pEQkU9KHoeDtN4scs2jF3 xYtJnuHAYxH1PQQF7LyTOGRXIOVBeoQxZSOr5pStIRDJvuV8vrxgr/+pns6HF8MmrQkM je+jWT2Rs2y7v/zpiS/3Q9S3bwED9j80pQS0UWGiIgiPPsrlf6KIw0iMhMQaHSgWioIk z3Iw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=rE09vLhf; 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; bh=95upEO8HJ8NLi7B37YIuTgNhbtdyiUSSUdWtuIxPv1k=; b=R+YBIu5ngR0wA/NszDy29ddx9j3y94drdN31zvrJdPD4osnp4XvJ5n1fpfbQJPTgt9 2g/1TK+0fhx+yMjI+7lOD3UChlC6ZwBSO0XC83iZU/GubJyYZq9TaMrqlsPspnOKSzaI MpI+HySYAOxmkJzApiKdj4O2STDJmETcQmCHE= 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; bh=95upEO8HJ8NLi7B37YIuTgNhbtdyiUSSUdWtuIxPv1k=; b=HTVUpZ9nwuAbTNxV+NkC4IejIuCujBkKbxZxCzq5os2aAcG8LCr/orPWRXjg5pxdwb CeyhS1oG/EcxYz4J7VH9TI5S4gfsBk7fOnvjIh9w2kMGfQlyZ0UsOpi+WzyAB5e1y1Uq XQC34dpRmKq96teKwoFVIh9PEKMXtDD0FNZD8UarZcbFDg/Df1z+NOX8lf3V6l+L27OB A2k8G4gfqY0gc5kGld0G2PRX8Gq3JDZhgk/zTG6OFOCZy9R7L/ifumXMD2kLcV3+oRDS PrG3SXSLR1ZOEhttkDEndKdQIzVAWRWBbzYmpm9/NplS+zzEWNg4xSK3g3c++i5WrVmM lDdg== X-Gm-Message-State: ACrzQf0nWvmShOBkehfte90NimDF/xgqUu2+Tsut+Nb/ed1YyBG6HM9g kCdEecJhdJCaeNbzxXGFOFxFIquA X-Google-Smtp-Source: AMsMyM7Tfoph5OCH097nA5ghThquGbiLB2g+bAuy7GBJZlhhGNf+vZM3v9Qy9a1u/+/sRLGBwb5/Aw== X-Received: by 2002:a05:6402:2994:b0:453:4c5c:d31c with SMTP id eq20-20020a056402299400b004534c5cd31cmr18498450edb.412.1664128341088; Sun, 25 Sep 2022 10:52:21 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:268a:b0:43d:b3c4:cd21 with SMTP id w10-20020a056402268a00b0043db3c4cd21ls11803182edd.2.-pod-prod-gmail; Sun, 25 Sep 2022 10:52:20 -0700 (PDT) X-Received: by 2002:a05:6402:12c5:b0:456:f704:2ffd with SMTP id k5-20020a05640212c500b00456f7042ffdmr8186241edx.389.1664128339859; Sun, 25 Sep 2022 10:52:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664128339; cv=none; d=google.com; s=arc-20160816; b=I3oOpKuQADqLewEKKF5rleW+4u7nhuvkQfNFC4un4UPE/fROZnRXCxAmn0qSOP1GX3 KBLHGTHlrWm5Pjw/RpfSxDyYXIYTolAJ4MfDsrragglmEv3K5ox7rZHJORAsFFgj+2i6 5jwvFb+8mW3jG4AJ5QjFNp3BZjNgQE0fXzkkFyt8xpqJlQmj+aZ/SePR4K0gwrwutYRl aCE6Pv7cBfSUAS1Kg9RKbohXo5Rb3VM1/RjtSAFK8ZhCxGYMhFBGoJNpWh503paM7puz h3yWOo/NnrtO5rztpv+EPfBVXRpuOQKb4PyDS5GDvkkHW2roVPmNSOxyYgrz3bZ6Hcym x1Fg== 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=5r8NMkE9LIMyGMHe+fW9/TCXkKWGgaySDbokWa2bTfs=; b=PNDPcOQ163YvpAOnb95bNlg1jdoO3JuH0FuK7aV95j7jXuYsuuz7z21lu9Nf4F+SxH hhodVcMVJaYu0YGwr6OIC3KKqKZFCVBqRaslmiu8SYGaDVHSxCOuFJcdrgdl/HsZGSF5 XsuFTj02PsCNA+S+mEGTZO9vXsPFdhZUSKSzCfNJmaHx3io9ZcNiZM4sFYRchfyMgpQl YhdBMm+5ItAdtbyqYyHAPbZgbcmRiBBDN8jWkSBe910wtJ9mzuUs8zf5UDr/DY485p2K s/0OoKJQ+e9v48SInkFHpE8r3aO3OgLKkQ4AqLs2XfaWgGr9tnUS9oxeYnyadXeZkIZ8 GwQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=rE09vLhf; 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 q27-20020a50cc9b000000b004572a1eeb1dsor644848edi.43.2022.09.25.10.52.19 for (Google Transport Security); Sun, 25 Sep 2022 10:52:19 -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:a05:6402:2994:b0:453:4c5c:d31c with SMTP id eq20-20020a056402299400b004534c5cd31cmr18498376edb.412.1664128339645; Sun, 25 Sep 2022 10:52:19 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-95-232-92-192.retail.telecomitalia.it. [95.232.92.192]) by smtp.gmail.com with ESMTPSA id f23-20020a056402161700b0045703d699b9sm3252594edv.78.2022.09.25.10.52.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Sep 2022 10:52:19 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Rob Herring , Krzysztof Kozlowski , Marc Kleine-Budde , Vincent Mailhol , michael@amarulasolutions.com, Amarula patchwork , Alexandre Torgue , 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: [RFC PATCH v4 2/5] dt-bindings: net: can: add STM32 bxcan DT bindings Date: Sun, 25 Sep 2022 19:52:06 +0200 Message-Id: <20220925175209.1528960-3-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220925175209.1528960-1-dario.binacchi@amarulasolutions.com> References: <20220925175209.1528960-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=rE09vLhf; 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 --- 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>; + };