Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp3987853rwl; Tue, 28 Mar 2023 00:35:13 -0700 (PDT) X-Google-Smtp-Source: AKy350Z3Cx5D5ooQWdrW6ezkUWGGdUv2lui26dFIFTblROIqWsK8CX0AJr1rlb+B75a0OOc+xt4P X-Received: by 2002:a17:90b:4b0a:b0:23f:7625:49b6 with SMTP id lx10-20020a17090b4b0a00b0023f762549b6mr16604084pjb.37.1679988913132; Tue, 28 Mar 2023 00:35:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679988913; cv=none; d=google.com; s=arc-20160816; b=uY6pqZ0tqERV1+rCsXcmpwh1AiAqwBZsSXkKjfwCk4rMBZU4vZ9d7+EL2iUs2UqsAr c7tpadnlP3OYx3ERuC67GSkgQSqsAGjNE+46DCKoRHDiOxqaW5xArf4tJXHyIU+5f6a8 CJl2icb5ANpBTh7pyCo2oijZIevO9ppm+LM9JvN2MhyotoZMXM/XDQtHEnIwjWDUSWsB +AnEj9B2wOsDya9sxnm2XPCsHTg/6u/r4BpZ+G4ml3X330pK4EnLsriB22owhVr/hZao YbCzqauQOhpZ/NhidP/ImZwypmB6qcZNFP6BbICAwo3HXr19J8EGGyOgR1CT/GG5eph2 Di+A== 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=81V4WG2Py2oEHuOAf8mFt9n+MMzcYuintrA4k96hyCk=; b=JQprdelPBEJIbjMao/gnryWZ7uOr2728E9YbMrzWOFFki+c+fXIhI+hVGkTaM7faWS HPyZC9ng62TG4DqglM8l88e2fNkiHCVH7JBtn6l0AhkyQQldj4fdWaGhhYJQzfDd4LSS M0VHNaBCoeEKlw8XUHv28VqZtNNACjFQgy7iFd/RKOodrRYNunzHbLLeghzlRVkk2/I0 4TK9UK7XzktPP+TIcbyQ6Uqvobb4YbMEAjkC61Ucpb7RO1aPw99ptSOj7olGpV/FPekh iE8j8kkHFaAZw2fDuyA8t3rudJwlJfgYJnoO3oERbR/lGlCVnwIZqKmtPHS4mLIe6xhP nwVw== 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 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 p19-20020a17090b011300b00233f0f06b4asi12132573pjz.52.2023.03.28.00.34.59; Tue, 28 Mar 2023 00:35:13 -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="fHuz3/Jv"; 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 S230378AbjC1HeF (ORCPT + 99 others); Tue, 28 Mar 2023 03:34:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43518 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230478AbjC1Hdx (ORCPT ); Tue, 28 Mar 2023 03:33:53 -0400 Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8725F3C22 for ; Tue, 28 Mar 2023 00:33:48 -0700 (PDT) Received: by mail-ed1-x533.google.com with SMTP id eh3so45701881edb.11 for ; Tue, 28 Mar 2023 00:33:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1679988826; 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=81V4WG2Py2oEHuOAf8mFt9n+MMzcYuintrA4k96hyCk=; b=fHuz3/JvHKFJl4aHOKVNqY0NVKXvM7/HcN8CMEL37x76Sg/gNZjWYcr8NzHQVIUyXv KH63ag8K8zkQrBFuY7R7nzt7zWFZv9TkG+dSrsYEXs/8x5EizacWfAX9BBM5Vgp76Igf wWewKdW6o6gmEOfftPj0hWrFVWypYG/ptgvZA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679988826; 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=81V4WG2Py2oEHuOAf8mFt9n+MMzcYuintrA4k96hyCk=; b=6/pf5L1gaYTojmMa/w2MuJKPcxzp6jN87AH2DzgZtpPVtbQydQbvRXJvR8bKPlqEGy uB7e6dHKjhb/AVkPdULav5XRO+oVxaYU+/reqSTKn3r7cI/hG85lC0p8995NPPV1idyL OhBeL5GfVBw7oNU98YqWToTLgPmHvK7zgiV2D+N81x8N+ZDXiO6FMiNhc7bqSI2IbTsJ e1/n8PKjDifrXjajq1PtHh8VwYp3JxkRxhpVw/uGKGqmVL8AVzNxTCgnCmExlNWPZVvW glcyfWcfqzswdl8GnNheNM2v/jLjox5IX6nYQrfZpSZdCz5QiXtievGOIQpOy2NMctUg XcNA== X-Gm-Message-State: AAQBX9dmoOhsx52ELXXgLaOnvGwK6h1luK+DqYNTizH8hAo+nS6evqvm /aXbKPysrgYr3jiIePO+ksLuSkh5a2+QccDU2dS6OA== 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 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 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>; + }; -- 2.32.0