From patchwork Sun Jan 8 16:25: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: 2616 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 84DEE3F0CC for ; Sun, 8 Jan 2023 17:26:03 +0100 (CET) Received: by mail-ej1-f71.google.com with SMTP id qk40-20020a1709077fa800b007eeb94ecdb5sf3978493ejc.12 for ; Sun, 08 Jan 2023 08:26:03 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1673195163; cv=pass; d=google.com; s=arc-20160816; b=iknNpNBT9ihchfGwRdr0Lx6f/9Al4t+/+egobMbMLfbxmI2MX9sFvkgCMsjYkKTQQG FKirJCREKRJRV/S8/iQRd6HHZE2UNkxFzVWYpad8G3n2u1G/EKrPnRE5OTM4w/z3R0I2 c8ux6a632ZVwGiEFsFYs7YGMP0FW3rNKfLOe3N42B8m+o5yCcXd+Lp667gTLOy9iTwWE fDRgMMWBF8NrZRjXvGh/92AMxfosO/NBrK9HAK76gVvn1TLDYi6iawiam7eFZoU3H4Db fYHHWtZ3aZWd5E4y7vI2+rvccaANAI8JZJLONB7Uc/DWEuaeLHEAJcs6ZgfqlQ5LzFDn R0GQ== 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=Umsjis9dJ9SVeQWvt/An3wuE/qNl1tSpIwG2sIRSfJw=; b=kAgeRE20xiNvHlv9CvUqR2BDgkEeff/QD/qpXPSVw+ZvEe07qTrTbsuHjTtNDhLGwy QAVfpmItqOWFy85ID7xamCTex0aLnLGpkUREAColzv/vb0IAvlMFfC9SkgA2WDTIAb/o ZHIgZ+tKmthaceGtH43OOnLnEukCaDtJzVHOoO7hiYmc9AWaBkqvYG56sBSKQc5xFbsN PjuDbdAOd6b/LFy4XUdPfYjHWT425e11+pP+IJnahAc/HlgX+nC+FyQf4BHb2BhE3oD1 fBKTVKCTan6/8CYiehni/FlM/JC2TuELqwcIqBr4OrN+smxJznRcsefs67Lzyk2FevQR kvEQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=KZUi81UE; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.65 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=Umsjis9dJ9SVeQWvt/An3wuE/qNl1tSpIwG2sIRSfJw=; b=R7aiC5gKTJdmgK+o3c4EeXJ4PcBEQeZJAGLDDDuAP6g7lX/QJcD85nrKbYU5F43fAp SmhTDn5BBeg3kr8wsvL71l+A7xwGmlpOOiT/QwL1x6pbJF7Lke8oS/td1ptklmMRS642 voLR7+f0xAbviMQObcvjvMANeEdxE9PAQhPzw= 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=Umsjis9dJ9SVeQWvt/An3wuE/qNl1tSpIwG2sIRSfJw=; b=wX5wZJmEo8F7TIyBbgyfR5G9ompmGQycCnx+pWWVwJkSKY8M9PAmib+Qubc3zhL5aW rfCgLgVNVKEKReeUJvuXkfAtvcFwEuHPXkd/hS9Hhb4w+NqKYrF3zyFTQwdcyA05Uycw xlrPzFh5LGkRKIl+k2ynCd1m82AZJcCtMXiJxD8a1lCUhPCrAejbmXacWE6Ctrjb4wC4 UDwZmgurFpah8Zn8KfbtOMXQDc+HTa6ScFnSsoaoneNAUJrLwq4iph2LxI7+XbCiub+z n1RY7kfDXfJi6znhSV0Y5nT8powDt01CZl4vWopnfy9mdMaUJ2nGztTzDNFDPN9Z3AUA leBQ== X-Gm-Message-State: AFqh2ko46sZ8mHuHkAUawqlct3vWVWbygx75fVv12B35fwXiY7iJSSiM foz4oLof6A+snEPuTq8felMyKs3Z X-Google-Smtp-Source: AMrXdXvBGi1qqzhNFpeHNdzRHArbPpckGKlR1sA94IJkpACxraLVtRkrg2qKNbNz9AeWXdDULV7Jvg== X-Received: by 2002:a17:907:c296:b0:84d:207a:9c41 with SMTP id tk22-20020a170907c29600b0084d207a9c41mr1034738ejc.528.1673195163355; Sun, 08 Jan 2023 08:26:03 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:907:118d:b0:84c:e355:4f0e with SMTP id uz13-20020a170907118d00b0084ce3554f0els1675277ejb.5.-pod-prod-gmail; Sun, 08 Jan 2023 08:26:02 -0800 (PST) X-Received: by 2002:a17:906:57c1:b0:84d:4646:1848 with SMTP id u1-20020a17090657c100b0084d46461848mr1465421ejr.44.1673195162229; Sun, 08 Jan 2023 08:26:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673195162; cv=none; d=google.com; s=arc-20160816; b=HUJGEb85a7rQ967R6ReouUUQw1x3oQee6uQORzyTRWFf63jkCNObKokVwtTDMPI4vl Y6nBIYAPSBCQGs4PQDgLiO212rd77enhRohdQpm+Y3cVpT0Ej7G7Nw5ScZFE3tDNhWlf LzdMsGcmH6UQ9njnXmLS2b8/hbWXJCFeGLZDf03AFZpEjujQ0xcweXHgKEs82tzs4bmx hVPA1jKs0qRY2VexYoF4DHLM9QAcp7u4+p+P6pl+g6bCB5BMiX9/05UUvNA383dQEqVm pt1UWIBIcC/zQMMmlRCqOD3DRXBF+BRLsJi/hR4gDqz+nxofAEToxq5ar+fH4jdru+4B Bwog== 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=D8/Md0NYJHUSKcz4MJWTxhKaskWW/ctRpyjjxqRRhnc=; b=bxlArqJqi0gqYuwH3vZChbki7Tzz91q7HFTNsIPNOSfjwqN0lFBJ4iygOt/FxPFDsz aCIua0RIba0WBkgRr2u+7pnO+H8XKtpWMaLdUNlS3YTefBMmimOtPbqUf0Y76FNjQImN LfroUhC8zQNXW6eP2vq3Qxi/sX+B9ao9Be/z8XD5DkH9l08/rNYecVmpixYNc7NyxiEw i5fbkYttPT44fZE5ey+5Vmcxk4FIl3lBtMvbmzGSxfUl3aoAH1kte8cSkV8EZ2wFoNLR eBjo92x7IdvkhOvkufuZVviGHhO6fFHL2b+/lM41sYYOxYGJeSn4n97UADfbfq4pysjt xiHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=KZUi81UE; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.65 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-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id w9-20020a50d789000000b0048ab48282c4sor3138116edi.42.2023.01.08.08.26.02 for (Google Transport Security); Sun, 08 Jan 2023 08:26:02 -0800 (PST) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:aa7:d61a:0:b0:499:376e:6b2d with SMTP id c26-20020aa7d61a000000b00499376e6b2dmr3505449edr.0.1673195162009; Sun, 08 Jan 2023 08:26:02 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-80-180-23-57.pool80180.interbusiness.it. [80.180.23.57]) by smtp.gmail.com with ESMTPSA id n3-20020aa7c443000000b00486074b4ce4sm2659614edr.68.2023.01.08.08.26.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 Jan 2023 08:26:01 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Vincent Mailhol , Amarula patchwork , Alexandre Torgue , Marc Kleine-Budde , Krzysztof Kozlowski , Rob Herring , michael@amarulasolutions.com, 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 RFC PATCH v5 2/5] dt-bindings: net: can: add STM32 bxcan DT bindings Date: Sun, 8 Jan 2023 17:25:51 +0100 Message-Id: <20230108162554.8375-3-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20230108162554.8375-1-dario.binacchi@amarulasolutions.com> References: <20230108162554.8375-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=KZUi81UE; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.65 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 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>; + };