From patchwork Tue Feb 7 11:29:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 2700 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 6C0A440CCE for ; Tue, 7 Feb 2023 12:29:59 +0100 (CET) Received: by mail-wr1-f70.google.com with SMTP id g15-20020adfd1ef000000b002c3daec14f3sf1370669wrd.3 for ; Tue, 07 Feb 2023 03:29:59 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1675769399; cv=pass; d=google.com; s=arc-20160816; b=PKA0xoFy0eBbGgkvDtxAM/aosE70aj9L8pY6Hiw2bHEzTD5vSFm4pa6ASH5/ITevYv VPaFm/Z3Xxcj8gHirjtEXszlUj1GrbjOCqPbnqmz4XBdNEA+YQaKWSgeAbvV2WOCGu2+ SBWKRomF3/0SriHLJvE0V9ObsBvd26vKQIDZ3nMRIc4NqrlwXJBHQqTrFkEcWXO2z0x7 8ZKQK7fvRKEC9p42G9wmWaKs5nWQd+lJT2aj3kIDPnJohrBvCdKC4vM8D8IsQ0R8weWW Wtud9tiJCDBu42vhCuyMIlF8XCDGDq/tcyrZGzYLw4eITqymKarvpBWzEfXSWSPgfAj3 Z36Q== 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=M8BKI5a5MUzq6xW1ErezDQ312dshv7w+LpRemt48Dztzw58PbwLb0SmBT8GaaGfvcF iBTIU2pSYqvuw7PcyW2bZ9XEG2AibfyjJvviID/ucJbDNUkZoVBGnUmqpEg63xw7L0U5 ld3XpoAt+b6cDlSmVvEV/GmdD7WzyPRpIAb3pRgeQL86k/TwoCW9Q+a9MFpCG0J7mGjN diFL3mtlRdOPzoSpVzGGJxaRVywXoGrpKKtKZDPXYGmjIL4Ip7z5JVbcbHk01cfNiLRu hRyO5jXK1y8XbOz2WKSvsnGjAEOQrZ6X2ohNBhxZRd9N8HheH9o0U2/jSiTToOzffwYO ntWA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=gFoztI6P; 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=TW0KfHKRjU/OJWF7qv5GqEWUXv3d+bzW8oA9ZBBsbAJyag3Q+3PPh37WGdbQ+Z6GSl rECvhwpYxXFbFU1JFe+WA1pU+n2ENNihMfjXuzUelsH/Cxs3sR9N6fgZutXYr8hX5fg8 2zEwECxca/UlJmR7AcPeDuJsiPyNUgjvrTqX0= 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=tAoVR29KDMYFBZGpWOOcjiJKQ5+xZ31IIDUqbmC5Of2SDDZBBsQAwlEzhe+DMhNzx+ 4exx/9DwsQR3UmFIeGWfXa1VZDfGEcOEvTGgLDVWV1unxp77cc9oQbwHOTYXdOAF76p9 jm2ZtXoQAr6SFht6M0keYPnyN6pINm52dA5E6zn9vIhryKPmM9ibRTJKSrijCnQNTZNd 4g5lDT5G87jaATCx5sEvUxRImAQYDFTa0Ahq/AwDtJ6qlajh58j7qJG1fHoGGTk3ST84 GE/O4E22vvhWQhNwTT4t54gRGx98tB9qCjKq+JZTAAtGhbO8JFpIcKFKq9m46/1r7lxy qrxg== X-Gm-Message-State: AO0yUKUsipOlRzFE8guJ8gT6xl1ppe0NqVKknGpl7nl0KXhAg++qDS71 mXqgdMqo4Q/4pJ2Rj8bPpWTY5EKy X-Google-Smtp-Source: AK7set/ZnopUEGaWwekj2Gv7Xv4CzGsu5S1vWRm8abqDfoklURmOtXcdv/MYOaauu9/qvaq1uOQdfw== X-Received: by 2002:adf:efc1:0:b0:2c3:db3b:3780 with SMTP id i1-20020adfefc1000000b002c3db3b3780mr81960wrp.192.1675769399178; Tue, 07 Feb 2023 03:29:59 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:600c:1f1a:b0:3cd:d7d0:14b6 with SMTP id bd26-20020a05600c1f1a00b003cdd7d014b6ls8079569wmb.1.-pod-control-gmail; Tue, 07 Feb 2023 03:29:58 -0800 (PST) X-Received: by 2002:a05:600c:2b45:b0:3dc:561a:79d8 with SMTP id e5-20020a05600c2b4500b003dc561a79d8mr3384941wmf.35.1675769397756; Tue, 07 Feb 2023 03:29:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675769397; cv=none; d=google.com; s=arc-20160816; b=M5dviGh3QDfRjPAYHqLpB39hGX41ygqJRgJ43iEjVjHIZqzhz2bL0lvPyWeBXwD7X6 4qUiz0Oy4pHV691HPElNL57iycINL/nca+6AJtWjBp3nS2GffJdmbqOg0/Bwns20AQ7Z lHYwBQHj2v1o0Azr3sEmYxGPf6Kbry+2WG2Y6gXv03uuY3RGWD75cCd2XZs07Tg456wL dhoySHGVYrlFiVXNIxxJ7hkur2T7vE2N5bpuTAJfM0v5eR7sigZ4bI9xv2EIlNDwmUFN rhTD7s8wMf77CqbTVxpeKMGmfU1ssmxF9ZntjbGhxwi7VdcWZVtT47Kxy2SFFXJjod3p QdCA== 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=jb1/vUUkyjzyH2n97inYB9seEo7K+XynMtMwM/3SdgHGc9XxzlxH1qcE2Teml2P+bx /PZ+brDuHVFq9SH+0WRIWKzIfsfuLNe6jthLc3eb7f/14pwqlFhYf/aAgVu1/aGDLj+7 678yb+3NKdNQWp41uKIgMdLQh8JtajsD/qIeG/4pWZmyoQOkgmLUdhVzRGuauEMi9HMu CN6KInXA56XEmUrRGWYc5b9rhW0SEfY9Qidjdq518kwbqIilF4jaEleF+AozYMOJUT24 pbmEm4Ilbse4NwwI22hx3v8ELUIso+7XoEFfbhbC8WFEMOfeWoqTi7csPRbYdljuHiQ8 NaBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=gFoztI6P; 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 n21-20020a05600c3b9500b003cf684bef83sor772962wms.1.2023.02.07.03.29.57 for (Google Transport Security); Tue, 07 Feb 2023 03:29:57 -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:600c:330f:b0:3df:ef18:b0a1 with SMTP id q15-20020a05600c330f00b003dfef18b0a1mr3464952wmp.12.1675769397555; Tue, 07 Feb 2023 03:29:57 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com (mob-5-90-193-20.net.vodafone.it. [5.90.193.20]) by smtp.gmail.com with ESMTPSA id bi5-20020a05600c3d8500b003db012d49b7sm2020827wmb.2.2023.02.07.03.29.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Feb 2023 03:29:57 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Marc Kleine-Budde , Alexandre Torgue , michael@amarulasolutions.com, Krzysztof Kozlowski , Vincent Mailhol , Rob Herring , Amarula patchwork , 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 PATCH v7 2/5] dt-bindings: net: can: add STM32 bxcan DT bindings Date: Tue, 7 Feb 2023 12:29:23 +0100 Message-Id: <20230207112926.664773-3-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20230207112926.664773-1-dario.binacchi@amarulasolutions.com> References: <20230207112926.664773-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=gFoztI6P; 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>; + };