Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp3386686rwl; Mon, 27 Mar 2023 13:17:51 -0700 (PDT) X-Google-Smtp-Source: AKy350bo3vQpBPleZ4T50El5W2CkUm7DL2AG5kR+CdIMFDhqWa6D7m99RBVaOK5FCSJaGUZWC5S9 X-Received: by 2002:a17:906:a399:b0:930:9385:ce51 with SMTP id k25-20020a170906a39900b009309385ce51mr13635910ejz.68.1679948270978; Mon, 27 Mar 2023 13:17:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679948270; cv=none; d=google.com; s=arc-20160816; b=p6seEi435+5+VUR94nFZYSapxM2NHpDuys4p24vbWWC/t03bxCWdv/EvDHUW7C5mpA f1RAkgpJUz4pKjuiwVQMT/lut7IJcFoDKM5GaQD+7BcUFTJd+4c+xkk4KKt8oYarZ53W HEjdyetRn94rt+7PDNroDS78FHwmgVMuf4Bu9D3fGgfVRz4gA2A0qk2GMMOh2t4AHwlr Bzl+/77VJAhbTs094DOqvXiHDtXN91rPU10hyU7YE2arRE1vZwGGqSzgej/moCe+5ZL1 7Ts1RzPBG2y65VbTNIeSZximlvIIS63v48IdKHgiwlfBDXXZ/8j6JRPhbIrMRDNJukZX EJDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=kfP3t3lS3idk7NC8xKbJ1ZUbNQe0L9Qw+EDLBJRD4xA=; b=RT9Ct07GDrRMyRKvg6ZibU7UWizf5WLVcIIV/CRHNjkSvZidnsNQw+kzfr924GY2h4 TYd0fTcJP0Q9c+1gwQKCPc4RK+zjpxxUdM+999/KKB1Jd3ntmrfptj0FL1B17xDgc9j1 /R07v43Ix70sSHUQ2nQzjQz7AvW3bJqfddbs6TbHYgKj6h2qeQsTLnkjjKo8tPN8WvBO sOYzTDidyqhP+5pszF3PfahrvEaN9eNlMnzHXgzk/Of5YK5tf54pc8MFH6FrE0C9+vFj o/WMLoQPVAc5Z7sDibkiVvb5c88DrBEhyah1Cat9150Vq4KRcyAXso37t2C9FavlR5CE +dqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="VwgC/3Jb"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ne27-20020a1709077b9b00b00939c366a4bfsi18763686ejc.785.2023.03.27.13.17.26; Mon, 27 Mar 2023 13:17:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="VwgC/3Jb"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232710AbjC0URH (ORCPT + 99 others); Mon, 27 Mar 2023 16:17:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43276 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232716AbjC0URA (ORCPT ); Mon, 27 Mar 2023 16:17:00 -0400 Received: from mail-il1-x131.google.com (mail-il1-x131.google.com [IPv6:2607:f8b0:4864:20::131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1F5DD40C7 for ; Mon, 27 Mar 2023 13:16:54 -0700 (PDT) Received: by mail-il1-x131.google.com with SMTP id v5so2689660ilj.4 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=RcrMHq+slZCuuueQGXzgNR5/5+0f0I0GxYBCZNxwIao25YsyvYq54IiYxgzgNYxrBk lkn+fmwuoz69m5AxASs4LBctHGWOnJSBYWQh2rD2bEYbkDRAG9PXVqIOpHcP1HehgiyI 8m+sDY7ceniZE08sW0lE73V++c1cgRnNpowPz+xVL73DHy+kPk1JUuNqGB5r40aQepr+ 1JdM4X0knwkxISvEGs8vQcWEFSkyMmWpVbfvpn8FvqX8CaqupVVf+EIjb/avMvrU6hNY SOmgWWLnGQn+/qLOyIj+mDM5GsRQrWm2S3gqIwQ1B2ge/KkbChXStM+QDzk77VXyH3Xw igbw== X-Gm-Message-State: AAQBX9fhXB2cBEmceww2fNqzXWAibiQMIwpc7IRd1CjBkzn/gQ4yo97T kVgx/6NdSwiqg7cemPZ1lSAuLqo/Ws7BppGnGAJ8zw== 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 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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>; + }; -- 2.32.0