From patchwork Mon Jan 16 17:51:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 2628 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 B90C93F1F4 for ; Mon, 16 Jan 2023 18:52:09 +0100 (CET) Received: by mail-ed1-f70.google.com with SMTP id t17-20020a056402525100b0049e0d2dd9b1sf2704731edd.11 for ; Mon, 16 Jan 2023 09:52:09 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1673891529; cv=pass; d=google.com; s=arc-20160816; b=VxYu0auZl79yForVE/CXhZLFeb6JPL8G2unoucqk17CvIYaWY0FL4Yz7UZe7VpMS4d NsTi9Fhu3UXWuhqO5YOVvrY1cathMDAA70RlorLs2J8ciCbJ1vRNc4mzfACnJppuvqy/ J4SXhcwQN4lucCLvz+E7pIkJSZ9MMkKYzTQpKxMg+nKBXqHtSWisiO8r5WzYT/WYiG1b Vogr2g77TJS8ZqOXub3Y5vNwgYod/Z5XoN61wSTdWqTyNUmLsZyOHhghOMXQ3RPlZ61h 4n5aJjuCjUwEn8SbtFhPNazzr8BjO7m5m0i2UELLhpIxH4/f/EYMDEPI0/uafuw6iMF6 i4gg== 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=D8dq6rNGcYmqcKxOx3Mms+Rtik0SmTcf29F040LSBnOQmxOTdEILnUP3CSiR0S9rnD nMrZn+u6rVOj5vp4jJ9iFUJERBlle2/Nz1rm1aOPP4XXM4eH1T8ZaEc36kt6ogjrc/0O riOQSkODNQerERJfMKl7jhK/6RO8eDtKLW+llq4flR/WxFUGPUVOkX2Eu7Y3eh6x+Vi7 eJ4cAXEdNqtT0oGo5gRpFHQYmvhfOGziQKBT2/gnCUhHwO8RBijgNFEPw5aC7zOdP8hr teCcD8ZTjc/m4nqlk+gANh2dRVPDT8CZ2zpmKL4ouBpQIvnaAr0r/Jw4OAKvYGHx4L17 S/LA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="atn/yL9a"; 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; 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=J7TV3CgnrJMeMxUjjY/aFczq/CyuODTCIslf635MSRPgJDdTdmfpErkwzii++fsci3 RVei7wrQ8SAwM2q4nMzzIxqYdIv20DLCAF6IRCc9/HEDb2CLRhlVZlvRPhAnJPDYMS3w RdlYkZhFWF3ujj7kHJRwHcDo7ccmsw3IgUcnA= 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=blRZ7QD/YGGBrOfxJYNXsV2GHqbulqs2ZPZlU4D6B86cw/wKUoTZ/ddtIQ4Sa1C4JB 7F9fJjlaLhlQqVLV9QPJa9np8VMlt5osFq236S+RqQB3CCfoHI1VKI0VHxVvauZgXiPo TmGXqr5itc7hu37BMrIfoX0FbTD+HTIS9Mfkd7oRhPhI06cjwuMTsRp2M+X6a2BEXNQt wxv580vGnHnhUu8CL+a90rmCsjX41CG3+32uTP6V9nNN+ALWM2Smpc5EappOmn2P3hoM WbUAS4IaWXQE0rvhh+vKyDP/qKH9pZJiU7cNE/00qksK38ysEoEVPhQsfGJrN8RSAUOg g2+w== X-Gm-Message-State: AFqh2krDMUOZthyyGSZcrf9vtX4LjPWmmaoosfJLo8na+sFsvZzMBCVS 1e3UayzGbrZ6p2/GIuq/TREASIk9 X-Google-Smtp-Source: AMrXdXuMlREUTF70xYARVWjEv1b6R1egbCCdtes+cFyzLzK7UEHEP7aa5ueLBqNbvMT90rRisfq7FA== X-Received: by 2002:aa7:c64e:0:b0:49d:f444:ecea with SMTP id z14-20020aa7c64e000000b0049df444eceamr8097edr.358.1673891529578; Mon, 16 Jan 2023 09:52:09 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:520a:b0:43d:b3c4:cd21 with SMTP id s10-20020a056402520a00b0043db3c4cd21ls1113827edd.2.-pod-prod-gmail; Mon, 16 Jan 2023 09:52:08 -0800 (PST) X-Received: by 2002:a05:6402:3715:b0:499:cc2c:bf6f with SMTP id ek21-20020a056402371500b00499cc2cbf6fmr78594edb.35.1673891528254; Mon, 16 Jan 2023 09:52:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673891528; cv=none; d=google.com; s=arc-20160816; b=NJj819x+z5B5xejvX3ljvTnl9hqs41kGxBc9U3CjXeeEmG27DgQYMDSwzmUfBtyrtt Wg9p1U9JkWuGRuYDV6uXQ1obbGUG6kFK84BgCO3QVw4BjP8oSKDOwLJ7chq5brsGf7e+ eJe1uPOG+cOAc3W1VOsQcSKR8GOIDoR8yqlxUEYpE0TZFPqIg09VhwyTvsdRiTCQbRcb oGxW7iWu1jwbZEBKNKwIM8jCLbci3dk3h9SMzb6S1mHqPmOfCL0yA5PdZtrdyQ+55aki Q2dxWEiyMvcJLd1EtyqcrbLTFXGIlR6ChvXQS/tlJ89YeDjN3BDYfymYhm8TQS5VZvOr 9K1A== 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=A/PGJZZxxYn5uG/SXtruWwjfZQrJED70eh2gG8RbfRDjidWppWrA5gIXKmlDm2OQIR RcSK05qMaidwP4Cv7fZbPjUCYGDPRj7pOzyg/g8KYb1+BDRLEy9DT3wJh4oKky1675wU AiEXc8qYgLUUiw4SkgUhh4etenotaPyeUcfYGFS9JAh8g2Ls5i+hjczSn9WycB8vPblA FP1Cpn88g649io9M9f5OO5a1zEFnXzGHr2FSQhyYUOGuqfwSijJ75nnzDMEct6Ctfwkw nIi4wZxYZRN1Yj0aZlX2sxBSHonzi3YR0tbHdEH1n+hGSRsVbf5MK+gaAOZaifCRrJiO UGCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="atn/yL9a"; 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 bq19-20020a056402215300b004892fc9e1dbsor15850151edb.28.2023.01.16.09.52.08 for (Google Transport Security); Mon, 16 Jan 2023 09:52:08 -0800 (PST) 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:2208:b0:49d:57:f538 with SMTP id cq8-20020a056402220800b0049d0057f538mr104114edb.15.1673891528058; Mon, 16 Jan 2023 09:52:08 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.. (mob-5-90-75-145.net.vodafone.it. [5.90.75.145]) by smtp.gmail.com with ESMTPSA id fd7-20020a056402388700b00483dd234ac6sm11490723edb.96.2023.01.16.09.52.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Jan 2023 09:52:07 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Vincent Mailhol , Amarula patchwork , Krzysztof Kozlowski , michael@amarulasolutions.com, Rob Herring , Alexandre Torgue , Marc Kleine-Budde , 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 v7 2/5] dt-bindings: net: can: add STM32 bxcan DT bindings Date: Mon, 16 Jan 2023 18:51:49 +0100 Message-Id: <20230116175152.2839455-3-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20230116175152.2839455-1-dario.binacchi@amarulasolutions.com> References: <20230116175152.2839455-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="atn/yL9a"; 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 --- (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>; + };