From patchwork Sun Nov 13 18:13:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 2492 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 2E35940F5A for ; Sun, 13 Nov 2022 19:13:35 +0100 (CET) Received: by mail-ed1-f69.google.com with SMTP id g14-20020a056402090e00b0046790cd9082sf2351503edz.21 for ; Sun, 13 Nov 2022 10:13:35 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1668363215; cv=pass; d=google.com; s=arc-20160816; b=P6aA/pEzzebfaAm2AJWjh9dSG3wPFscRNuAjvnW+mKcfb5PFeHF0+soQ/gyQShEt/R wPfEIEUT4/Rq/ByCsCxfhGLrPS2s+EPkusvPBNBvThhRgTzCWGpW2Po67519b+A/UtKJ ZXwAPREJ/YTFlg6JPB2NnKjrb1DVhgsVWShYJD6ZAFgJ3F3rF9iaaBivvif9yFuc4GPr YGxIdR5FAR+oB+7GbZnr1yiSAbq5cVuXKy8ptGdpZJTybG6lVvuRsLVM+pyEdGac2WUS ZkXBgCnJ0bPWGpeBhGT5aHz/mYSbIa7YM9gJIhK4oYxDy4GYQ3LsAMpF7D8WDbMiLt7D fUew== 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=Umsjis9dJ9SVeQWvt/An3wuE/qNl1tSpIwG2sIRSfJw=; b=qHB3/EMb5AaQGmQ/XUZBaJAvALzwETwBMhskz9aNiGssGrsMtfgETCyyaYU/2/lB+G 35+9dTuVF/Wk6anrKkkncJ151kty0pjCvlWkoJSy64UO/naETBXB/Lb1Uo2CNVkbMuM1 n7LC8mgqOeuN9c/sCC4Wo8lWQOkTnQK76myUy63eEn+YfMI87YXRiVTDeMPLGSzImR/W iyj8/KpalK2IFQevzSKEUL0d+sroro6xEOic6pkpUvUwCrsuoDcjpDUmXIFz+zDOkFb0 cY9panMsSJUnowWKntN7JDpI+zIrgfjvEdOfDVPDM61puu7GVOvRDE3TdQ3J0Mgt2Oyw ANcQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ZOmYYgrE; 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=Umsjis9dJ9SVeQWvt/An3wuE/qNl1tSpIwG2sIRSfJw=; b=OvRMWViYQg4MgjLLu6X7bHWrdFrrZobX7Zcc05L81nnlb2wdnAubtH3zVi8s1Wn4O2 UZIJziO18F9+rWbhrsMH+Fjho2L/2LNJr+dzcbDzY+6IvZjW3fPnVoB5Wz5unmCrMvVd gdZHTXNO5Ct4itdFEK3gRCWeFfTOuigBQYOqw= 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=Umsjis9dJ9SVeQWvt/An3wuE/qNl1tSpIwG2sIRSfJw=; b=DkJeD32Wn6BZT/bRrtxAL+yOspywU36jKvdiNLmkfFQ5QK0DtEOGD0K6oG0Dm33j/a ZYxtEQnVoCbNmslIptcmdz/GhAPsrfTqz7p+UmYrqFDMMECweNP/7+Tc3cQ5FGZ2dG45 r0DolxUulH0EEA1lX7wmhEVXpnuXxVs/YZ5C9hFSqAVeuXSIm3qCe1Mp3CUspNZxyPvq cxfOvtMhTcWiO31A4VN5+QfMV1ZesBLfXt8iYmWV9lx7i4D1fXG4L3h2NWOtuKQKZEA5 YnNldL939fMe7CRHvHMg3F+SnRbs1OV2t1v2opc+1ro1Xm+MhJ4MzLUgVXt2XqGjr6mj BGyg== X-Gm-Message-State: ANoB5pk46t7qhWwYXEQomOC9sxlal1due+3UmSKnOa5a/uzfSL3Tw8es RcGuSyOvBHWlWkmytgaj70PyJdtB X-Google-Smtp-Source: AA0mqf47rF1DQ3X00EEo7UFi+q7DnPir/gF6T2wwYM0b5Qwc0QCitGltSY6L1xPBVPQFHnmWJ3JKOg== X-Received: by 2002:a05:6402:515c:b0:461:b1b9:bed0 with SMTP id n28-20020a056402515c00b00461b1b9bed0mr8791569edd.122.1668363214966; Sun, 13 Nov 2022 10:13:34 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:906:3fce:b0:7ae:83f4:3bed with SMTP id k14-20020a1709063fce00b007ae83f43bedls5017120ejj.2.-pod-prod-gmail; Sun, 13 Nov 2022 10:13:34 -0800 (PST) X-Received: by 2002:a17:907:c70f:b0:78d:9723:d9c3 with SMTP id ty15-20020a170907c70f00b0078d9723d9c3mr7982908ejc.316.1668363213946; Sun, 13 Nov 2022 10:13:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668363213; cv=none; d=google.com; s=arc-20160816; b=gZBOcFZB3HOhkJzq/Jm+gH9c7ho2jFkdhlWlMj1n11/fPeUVTX83HGDrY9i9Y2FseV 9ClEJArvwlWmLOMUkLihPjB/gMMYvzAF9bCUJStczepVwPH4suSFdDlf1lbmowUjVHtE RUyeJYLPxCaxRI3Rk4NaezhL/b7LQOXX2F+4adWn5dCwvLbrTpGmALl4noZZDSlJ4cd3 PLB/fNqQ8YdzSatmudd24XkfTLEfPlg/8MDf7Cm95PAWaDUYGV5CB5rwWdGQrA/XXXDa 2DHYRZvudvVq8O8HHjYcQpdzDl6rvkrWfhp4ev7ecBwHZzp87mnTvbQH48wOICV24OpL bRYw== 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=D8/Md0NYJHUSKcz4MJWTxhKaskWW/ctRpyjjxqRRhnc=; b=fdZG7eJM7fltj68uMFyI0vH8M0PC7fcWOMH5gfXBwH0KnMQBNQfuiXDyzs6fRgo6Ox pWiNwWHDW9ynwSm7DxlUl9VcYtm7o49dNLPe+zaHfwcc5SxVPeeiSu3kLQ3Da+RSfyFK 9h9k9at+DhWKlQZVqn74f0SoSXjQw6bC9PlZfJvjGXTD25x3owm2sIkH5f3OFe8v/QUS FqMYl7s/JSYJpAHgCkazoVwvgczlrl47GIQaK+QHqCS7ct6v81EqVWsZjYJaBodf8cZ8 Ika25uzHsEb9wKAWmmXaqetOPsv2AlDsLdOTBop7M5EzAlXBAT3yaBSvv5JRqGHnATT4 Y6iA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ZOmYYgrE; 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 f4-20020a17090624c400b007ad9adaa970sor2962559ejb.27.2022.11.13.10.13.33 for (Google Transport Security); Sun, 13 Nov 2022 10:13:33 -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:a17:906:b855:b0:7ac:f8e3:d547 with SMTP id ga21-20020a170906b85500b007acf8e3d547mr8089231ejb.53.1668363213667; Sun, 13 Nov 2022 10:13:33 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-79-40-103-33.business.telecomitalia.it. [79.40.103.33]) by smtp.gmail.com with ESMTPSA id iy6-20020a170907818600b0078de26f66b9sm3225487ejc.114.2022.11.13.10.13.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Nov 2022 10:13:33 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski , Marc Kleine-Budde , Rob Herring , Amarula patchwork , michael@amarulasolutions.com, Vincent Mailhol , 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: [RESEND RFC PATCH v5 2/5] dt-bindings: net: can: add STM32 bxcan DT bindings Date: Sun, 13 Nov 2022 19:13:19 +0100 Message-Id: <20221113181322.1627084-3-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20221113181322.1627084-1-dario.binacchi@amarulasolutions.com> References: <20221113181322.1627084-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=ZOmYYgrE; 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 --- 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>; + };