From patchwork Mon Jan 9 18:23:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 2622 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 1EE4D3F046 for ; Mon, 9 Jan 2023 19:24:06 +0100 (CET) Received: by mail-ed1-f70.google.com with SMTP id y21-20020a056402359500b0048123f0f8desf5864671edc.23 for ; Mon, 09 Jan 2023 10:24:06 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1673288646; cv=pass; d=google.com; s=arc-20160816; b=coazY7Pm/1Zs8pkYF3Qm6vg1RsYlD9v84KnFr9LrFhu8H3AY/kAfCWXTxijdYzuz64 iLJmyBbxtz21uBNqoJf/4VpRsogX+Mt7Wabn3zz3XgDRrTCRXgSaElGafy1YhKBllMUr 7CmI5717tuHziLHUbivU5HB4A2lmTGxONE7vLnz0k7809S1wyH4nMvBOFcdKtTwIinEH CrQrqzK6pGdhfQQZ1d/0csrJkliSlzwxF1H4X9GCz39++Lv3jjNvTWiuFldeZDwM007c EUUkNZG79SuQ5xv7rjuhEvjsaqgPiZLxCjF40kfwoEZxKYbtjarVV92LYq1Bdps+Bnkt 6sNQ== 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=c3keGljZK9pMIYlHCDcD5dMBkG59atWfPB7XJXGLOBM=; b=HPJLlt/17Xqdchth8gpFmFyl+y/0FiYp0s2ScWvvmBJPBHqanoqvgulKWa8Fjp2M+i 7T4a9NSVTQNPt6HgvETutCxKV/4XadgP3cd01URGCnX/cZGFIeEe47f9bQgxcGrN2H+N iUnFLCfbn4tOE10KSZxwpn0/HGepM5+kNxXlDebgcDPI/jVFMwX7T2HUTYpV/JCW61dk TdAhcE9w7dM85Zn0rn9p87cV+wBGTiLMgKEq4z45FFQq0K5uX9XIq7rhhu712XAKf+4f CvUZ2yFoC3uN6f2ccH4vVUu17tE/8IJLY27P0HrID/jSnFtEbYu7M3m6mYHWWtkSqZVl Tsbw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=GyE7ITR0; 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=c3keGljZK9pMIYlHCDcD5dMBkG59atWfPB7XJXGLOBM=; b=T8q3kNHfRWWpdj86ff/9f78+ORVdyUPoxfE9vw7QLeIg5maa2r1PKzZKV2Xv/TrlJO fVzps+7OCUUZbuiCCMuuvyLz5i+iJ5bMeDMThBAQUyh3uSfP/qbJSE94CgQliEcfCs91 AcJkwWOK/eD5nrlT1H/vxWkz5gk75J2r0PPN4= 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=c3keGljZK9pMIYlHCDcD5dMBkG59atWfPB7XJXGLOBM=; b=GnPeLytldkckNMSYQ/qkgFiScrKPU/xjSKybJQzz4amcB7AGnOHxVeezQhRCuVliw0 L1UHrjavKQ9179IHomtcHeoRNaR+FDkzVhmiY9Fheh2/zpkox0TFbmtV8G5KS/wpQQ4F xEE8nH0ye2m2e6/dF0CwdL0AA1G2wmn/YsoAMmA6TIyMEKccdCjhu41ygUeN20xhPlzI JP36mOYD1eobEhe4X9FHTVvTshCdhFrbxmwcWVRKLbJSgUuwqt0k5xdlHaJD88pwttMw 44FCuGf8918zhwliVwzNfpr+E9o6WURiJdfXhflwbgwtw4ORDwrrJHy7NZqvLcvoXN9p BmbA== X-Gm-Message-State: AFqh2kq6QKuOL9nXlP4U+sOYMzaVzW97V+2ublgcZI0XK0g/bhDMdZoZ WkrSu5M4bliAf0SUDHzDLUTHJFBs X-Google-Smtp-Source: AMrXdXtatsTwr0VGTe24T7dw2vkZmWivcwBQqOwFFY6x0THCwRiOx2IqTd/JUnrzihXhwtqTGIIn3Q== X-Received: by 2002:a17:906:a3cd:b0:7c1:9b74:d27a with SMTP id ca13-20020a170906a3cd00b007c19b74d27amr8072186ejb.601.1673288645738; Mon, 09 Jan 2023 10:24:05 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:907:2115:b0:78d:e7b8:d105 with SMTP id qn21-20020a170907211500b0078de7b8d105ls3437606ejb.8.-pod-prod-gmail; Mon, 09 Jan 2023 10:24:04 -0800 (PST) X-Received: by 2002:a17:906:524b:b0:7c1:5b5e:4d78 with SMTP id y11-20020a170906524b00b007c15b5e4d78mr58195119ejm.51.1673288644600; Mon, 09 Jan 2023 10:24:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673288644; cv=none; d=google.com; s=arc-20160816; b=aST6GyMbyzm5hf4qkRblLnibNMfm34EyOoKRGyqkDwFAx7E9IHIuBRC8AYiDcZNciK uC60WshJbW4M4z3ct4okS3VxWhfQMU/qHQTi0eBN0Cnob0Nn1VW7BpcSRIbmLzp3IdWE v7ajKmL+l7HMVbpYz+CLAk7rVPSec0IThYZMUd6Lks3t+VgF7rFNHs1OkljbKoJpiKzb G3EYIkr0hh5XKYAsMO/iUbJn7rnALi70hl9E533WMQvFpnbGnUSYCwB8gujIzUYiu3Rm zXfWkorMXL5jlnBwrAHuezkIxSd+YHVRJBl3wmB8YoZnGTALv9o4tbfNQGOqsBgSRe8U 9S8A== 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=Kod5siM2bcM+dDVpz/GqL4BGUBIqfHoecSZkZ5xWujI=; b=MVhbfj+GCZRZp3Wnvb0d4hH0ZQaT+7QzdKDBq++3zvwsnmQsvueqgq79v6CVjtVgZa dtRSAv//U/5T+E5SW4928rxacCV1RwqlFxCMvB51sjpPHYkYKv/zywNAW5hmQKd5BUKW S+w+r3MpN7Gp+zsvMpvsfgDnH/6ebfmHIuVjXqFxc7/m1HNhPwPCmr5zs2PFHz8QPCns MmE483sAjgCLTUr92rBXMqYo5k1fzgaXY05N94GsLoXfz0dp+Fp+WIU22iDD08osXRps /3uNB3aS44L5HUx5wR+HwJeUhsMKa9CBsCyvbF3hvaR29zkVX809xUmJhPr2aeNfeXms vfjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=GyE7ITR0; 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 d18-20020a17090692d200b007ad8415210fsor4016411ejx.127.2023.01.09.10.24.04 for (Google Transport Security); Mon, 09 Jan 2023 10:24:04 -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:a17:907:c30a:b0:7c1:18b1:fd93 with SMTP id tl10-20020a170907c30a00b007c118b1fd93mr59827873ejc.44.1673288644393; Mon, 09 Jan 2023 10:24:04 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.pdxnet.pdxeng.ch (host-80-180-23-57.retail.telecomitalia.it. [80.180.23.57]) by smtp.gmail.com with ESMTPSA id kz22-20020a17090777d600b007c1633cea13sm4093653ejc.12.2023.01.09.10.24.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Jan 2023 10:24:04 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Vincent Mailhol , Amarula patchwork , Marc Kleine-Budde , Alexandre Torgue , michael@amarulasolutions.com, Krzysztof Kozlowski , Rob Herring , 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 v6 2/5] dt-bindings: net: can: add STM32 bxcan DT bindings Date: Mon, 9 Jan 2023 19:23:52 +0100 Message-Id: <20230109182356.141849-3-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20230109182356.141849-1-dario.binacchi@amarulasolutions.com> References: <20230109182356.141849-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=GyE7ITR0; 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 --- (no changes since v5) 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>; + };