From patchwork Tue Mar 28 07:33:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 2817 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 86F2B414B4 for ; Tue, 28 Mar 2023 09:33:48 +0200 (CEST) Received: by mail-ed1-f71.google.com with SMTP id x35-20020a50baa6000000b005021d1b1e9esf16291969ede.13 for ; Tue, 28 Mar 2023 00:33:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1679988828; cv=pass; d=google.com; s=arc-20160816; b=EF+ogYfVHyV+WDoBfvIVdQJVTzFAKj+d75COUsWVy6v0/ap1TQGNi1rCiaPtVCWT0c y0FBJ9NfF6rXYjRL06scHVrUPjH2OsggWG6koSTtVq322KUWLdANBUXgip+H2Tie9jNa 6FL2GGUWmcpucQaJO2HSHBsMFIpf+lDRklT6oxwH4pEpSaC71OAxuLC4kFKAu/UpxdTn 1/TiSwEUkrACgsfyVSX3UeuoAo9uKn7cVSX9o2Qg9eK47HPbwd4w3klnMesBKJJ3Anxu Z2W08wZmGh52CqXDE3rsfhZ1WpQJK9WywJw0nvIgYcIxZa/dOPp0xNS4dsHx2KffzhSt 0zHg== 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=YvFaecF6sOGadVHq0kp5ZkUoYd3jEngKK/y0UTnkptA=; b=ASkvOYGePD2KkxO6EtkTRZXfgt0caNTr3kA4cdGASg+uLzi6UBV1r0ro2rWfbyrPcM uSqONyg+xurvj1azUTJ0Oa9xtAm0gJ7EybO5w5dp55IznXsyNeDXUcTkUrSXLnbcUi2e TAUvH9oOei3KXJNxAZU0lvDMPiHQc2aOd+9c9Gs2Z0oou8pA0POkXMVu5NdUphhOcJ5e +5pURRTwtrRXFIInfz7iH4t/VM616FbqkX/+Ynq0Kq+u2qD6j4JXQZsi9PZUB48ZIwmr elU8OEqpMrpRPh2Lkj2PyEynpZS53WDyg7ru+Cya/peiBCyWx4Peytjh+doiv9741WbV Tx9g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="fHuz3/Jv"; 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=1679988828; 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=YvFaecF6sOGadVHq0kp5ZkUoYd3jEngKK/y0UTnkptA=; b=nMMLTfdHTtlavRmUJO/AmbQuDAuqIFKIYbMhrE4r1MzckVxE7k7ktH92aDbXuAZq5/ JL+arsrhAlqkfS/IeIdwoBDT9Jd3k8sfAQ1V2G0exoLkdY49Z0z+6RtO0nCSs97oMyoQ AokY2gxxQKs+5cLwRF6XX991PQ8ittCMIQS9o= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679988828; 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=YvFaecF6sOGadVHq0kp5ZkUoYd3jEngKK/y0UTnkptA=; b=mLhfjQAv+5CMxSo63oLpz86BAu/h7D7RTPizwRLduL6nlaKmneOeIsOmaC1F+cUsBK B7NqQW/wnje5NDVSbmXRSIebumvps7PFP4Z+R5DPTJV21+iL4E9H7+cFoDhhFXcgOOQt NLkFMu1q4ucPgq7MPemP6MobzdGdFQaq2RcUfI3kcA4GMsb2V0d5enIROmaR0HahRPZ0 xd6azAAj12beTpopjoxJ5XJVkHELe6p9JU3TJFPjugfofF9bWPfgfTXsap43bMUGVrTp 2xaGSADoq8793YVgYOHliiCBbBzmA47OM/m9cPRIioCN4mCgFxkv2HCmYbv+F/AMByXy hscQ== X-Gm-Message-State: AAQBX9eIVH8qxQU5W8pF7j8mePTYwpZ1OkiTjnqWB5jYTw1S2k+xnkV0 AJkClRM71anYy7TOC1CGIG6AOY8uq/cC0d/k X-Google-Smtp-Source: AKy350ZeFHS2hJqNEIWBgSiCtqeijfC1dlLi3Qv2F4j2SZPdXQhLPpbgmywKnk+Rf/Mle0H2mBEV1Q== X-Received: by 2002:a17:906:53ce:b0:931:51c0:7459 with SMTP id p14-20020a17090653ce00b0093151c07459mr7610805ejo.4.1679988828305; Tue, 28 Mar 2023 00:33:48 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:4311:b0:4ac:d2bc:e0cb with SMTP id m17-20020a056402431100b004acd2bce0cbls2842522edc.0.-pod-prod-gmail; Tue, 28 Mar 2023 00:33:47 -0700 (PDT) X-Received: by 2002:a05:6402:1a:b0:4fc:9329:bd0c with SMTP id d26-20020a056402001a00b004fc9329bd0cmr13385760edu.12.1679988826741; Tue, 28 Mar 2023 00:33:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679988826; cv=none; d=google.com; s=arc-20160816; b=Ed8iG03YjZFkbu9kaOSPzUeubAPj22REnwJkXCNgCMa72DHnmRwJihw1w/P71epRI1 easJUJ9ZYvkfpTO79i2/4ZPccCOr2HDNV8P2fJ06BZ//8sAadDci45O7EdYRXKV7+BKV Pc7Ns9+6kZ9v4n0QC5NfARHztlMLRtuQ1dVZovZabLjnPnMYcvtivYQZK+CCQhf+31Bk I3lfk9fXoDhzEnGQu+rVFFQszlTqpM17Gnex+MiWi28HObs9EehUTJe5naswO+92zHiC eMn/VN0lQ9TlGUk1e38exOxX9AzDk8+spZHX+vfn9XEVCo1mhPVDv+8ctemg65273gQm jhIw== 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=81V4WG2Py2oEHuOAf8mFt9n+MMzcYuintrA4k96hyCk=; b=eKnkSiEeLbHrY1/Ma2wBo5+ZX9pM7KvlTOfzu71DNGWrOVwGBBfBJ3aZgBvXsUarDP CHPHwhYkkUXuCQRaCTDqvMg9nVMMtgZTZm+7UcbFJz7ezWRWgO86ELl4EkMvPzLKmlox SYTEt2bz1naTzFMQDg/Ww3aJJ1C4IUW/XN+3P8L3rj+YP/7Hng0MJ275qNU7Hi84rZgh ch281aWp/kCRyOyHsDKA29/dXFsFJlrTVjxJFII8/nnft4FrJYtGTUjdWlVKeJGqN1n4 T/r4yrFxlrUDzkn71V508NQA5V5CCEdf4I5PqG43kWkmtzsuBbDwn5Y19sof2FPQ7iwg JC4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="fHuz3/Jv"; 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 v9-20020a509549000000b004c12a990e16sor15349863eda.55.2023.03.28.00.33.46 for (Google Transport Security); Tue, 28 Mar 2023 00:33:46 -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:712:b0:502:20f0:3ee1 with SMTP id w18-20020a056402071200b0050220f03ee1mr14140124edx.31.1679988826415; Tue, 28 Mar 2023 00:33:46 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-87-0-102-254.retail.telecomitalia.it. [87.0.102.254]) by smtp.gmail.com with ESMTPSA id 15-20020a508e4f000000b004fa99a22c3bsm15478850edx.61.2023.03.28.00.33.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Mar 2023 00:33:46 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Vincent Mailhol , Rob Herring , Amarula patchwork , michael@amarulasolutions.com, Marc Kleine-Budde , Alexandre Torgue , 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 v10 2/5] dt-bindings: net: can: add STM32 bxcan DT bindings Date: Tue, 28 Mar 2023 09:33:25 +0200 Message-Id: <20230328073328.3949796-3-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20230328073328.3949796-1-dario.binacchi@amarulasolutions.com> References: <20230328073328.3949796-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="fHuz3/Jv"; 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 v10: - Fix errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'. Fix the "st,can-primary" description removing the "Note:" word that caused the failure. 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..2bfac2089964 --- /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. + To avoid misunderstandings, it should be noted that ST documentation + uses the terms master/slave 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>; + };