Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp4757916rwi; Mon, 17 Oct 2022 10:15:12 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7f5ZVQE+GsS8hOJzY5R5UqPWMGyMeJTSyy/7yKrVq/Y6dbTTfwsmE2oRItjE/tIPmHQJ78 X-Received: by 2002:a17:90a:1c02:b0:1e0:df7:31f2 with SMTP id s2-20020a17090a1c0200b001e00df731f2mr33513023pjs.222.1666026911857; Mon, 17 Oct 2022 10:15:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666026911; cv=none; d=google.com; s=arc-20160816; b=LQMW5fLeNbTFtXsQBEIkSak44uOaGayOyqeRbr7s9k8qJO6BFQSHf9Zq1p1FLuJ7iT U2lCZBfMRNzXmpxJm28tFKPE5qamscx+FAl5aNPw1DHuagIr7lAc1edn5v99fUsdd08a KqZB08b9/C6WCRcLBs2IFsgZl6DAmAU2qR8KN9rFwjiMifXBqsqR0uwXgcxPRatYXzrB QU48NVLcWzT+GgvKg/UgAQNnyshFDmbzsaGdpITtQ/9Kf9Qpy73uZfaxAF3WhT3xgcn3 8ebWk681du7KZyXylTu3aH67a3/qqac/H8v2BPiKFloMDoS7EPOEsU9fSUnn1OAm+hRV lPMQ== 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=D8/Md0NYJHUSKcz4MJWTxhKaskWW/ctRpyjjxqRRhnc=; b=0m2MzB+RH3QBbpWPp71MEf47quJCVtdJa6gRJHkWuhvqgdCH4IWIpw3J7x/y/YMV+n 6mSGxX++HCfty46SV1E2WAzzqpEUXtGIpdkgpfFxmxU9ch42MSX6H40eWMNXHNU8AasA /RPaRrMDv08VixJ+ipc7065PZiiDtwgbdHbgImLgephDWacSG70aN2GXZ+YLNlTIsLsN Fd0dM9OR5pIl7nglIeCpIdfDoDtcG7MFWqWdCdvLqkpN1rRa+lx79h13ZhUBs03rgsv6 vLuTJ3qG1XKNQDBdb91yai6PzCok5krHrgrHtlVstPG6wHTWOrWJMTRyBp9VEm7j9jtM kFOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=MQqDeGmh; 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 s19-20020a056a00195300b0056594f6e700si14092065pfk.94.2022.10.17.10.14.59; Mon, 17 Oct 2022 10:15:11 -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=MQqDeGmh; 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 S230157AbiJQQnJ (ORCPT + 99 others); Mon, 17 Oct 2022 12:43:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229707AbiJQQnE (ORCPT ); Mon, 17 Oct 2022 12:43:04 -0400 Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0CEEA6F27A for ; Mon, 17 Oct 2022 09:43:02 -0700 (PDT) Received: by mail-ej1-x630.google.com with SMTP id y14so26210876ejd.9 for ; Mon, 17 Oct 2022 09:43:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; 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=D8/Md0NYJHUSKcz4MJWTxhKaskWW/ctRpyjjxqRRhnc=; b=MQqDeGmhfaHZojh/XCQv+q0XPLUePi2WVRcWzhdqpgGDSn7KUvowytrva0axseL/ji xFupNRehAAon4c1+nVPE/xoPe6KgppDovn6S/iPc/V3rXsNGUDXAhfEzh9vrISPv125c /MyBHlaX9dwHOEVkV7139J8m2mMI6t+LHst9k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=D8/Md0NYJHUSKcz4MJWTxhKaskWW/ctRpyjjxqRRhnc=; b=eF+jONDmIZmGNCiTDuPtfghZTEMNp1LdIeHRd783RI3ALRqwoYpoFJ8yGyq4tmqrGr Yr2GtD91fpXiV7i2UBKJF26yQWs9pprGwRCJ7Db0gNpvdJVYSMr9+o/4HBo90bFBlmUs y3ZIcwas5qy6DIlVQXK5pwf6xbTq/jZTP/rS1Jk+9vnBhVkKJTqJ1DBDilapQQUlPAMp ooobER9UzVauv41sVv74RriAKuDc0z83cZwjP6zQL+XN/Ef3Jv7QM7TudDKDts/S2U95 vG+jAd8cOzoIAKUdpwMV94znzrSzdqZkMQMyuufVyl4DZxbQlsqoUmPdy+ni+smK/jKh /iRw== X-Gm-Message-State: ACrzQf3I37iMniEymSCAzj65YpJYJWA4r9PRg1PMJgLE71jnKXoP06Tb IVAvbwVlJvm2SBChcF/fIxPASFcYfQL9GA== X-Received: by 2002:a17:907:d9e:b0:78e:2ff7:72f4 with SMTP id go30-20020a1709070d9e00b0078e2ff772f4mr9016694ejc.608.1666024980203; Mon, 17 Oct 2022 09:43:00 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-95-244-101-110.retail.telecomitalia.it. [95.244.101.110]) by smtp.gmail.com with ESMTPSA id a24-20020a1709063a5800b0078128c89439sm6437388ejf.6.2022.10.17.09.42.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Oct 2022 09:42:59 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: michael@amarulasolutions.com, Vincent Mailhol , Krzysztof Kozlowski , Rob Herring , Marc Kleine-Budde , 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 v5 2/5] dt-bindings: net: can: add STM32 bxcan DT bindings Date: Mon, 17 Oct 2022 18:42:28 +0200 Message-Id: <20221017164231.4192699-3-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20221017164231.4192699-1-dario.binacchi@amarulasolutions.com> References: <20221017164231.4192699-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,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 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>; + }; -- 2.32.0