From patchwork Mon Oct 17 16:42:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 2435 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 267484147A for ; Mon, 17 Oct 2022 18:43:02 +0200 (CEST) Received: by mail-ej1-f69.google.com with SMTP id gb42-20020a170907962a00b0078d194624a9sf4968448ejc.11 for ; Mon, 17 Oct 2022 09:43:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1666024982; cv=pass; d=google.com; s=arc-20160816; b=IZC7fu0m+wbWUe4O+TX/DzWEo6XkobS9VtiAbZGfG/FLU5DdEHNwsNFI5uTpGTm2Mc f5OtNbJPpJ/5WzbJv/LnkrNpAMWX+g/dm2EM7RcelgzvUKRLkzGS8JUiph6y2Pr3/z3X yMK6DkjpTlXLMYWtqvCGX7UU8sMIE+8z1B2xcY5vmmDx576uIV1E3HuNNUy0VaWH/KZm HA6bJKyBFJCYHo9SPpcxMjKtjbpZgZWNnd8GMBVs0jrWBHWSdbuektoCUHoP2YNFEbEj iTMyRs7oG2PsniE3rYKUGrIUspt6mQ/W8nhRDRuU70HqEBm0JRYybG8+WIvUeFBavwl7 mM7A== 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=JNUAlB5ol4jrqMpZQZE0vZ+Smh6iI785zEWwvwzWAGbq+TYbOuB3FOIgMrfa6MTzkd n/w+bpKxObWpFOjZjeamnvJ9AsTYKi2h65N8aFn+X5KgpkhxRDdKC4VHBdhu6iM8Qj+u qKqooFKVmiNmdBxoF5x2iIQvmMghsD4sJW0iCnRzTqGO+ZJqvRZCgHxs/SJTOzjLn0q0 ADzcaRLLIeal+uof/s34qKCBkh8CE2CnWWVq5nW/6dyR1dwgD9u3b1+2pD9v+pmanYLU iFAB26kxvISHMezC1IKiWvlxuKhY7RiKArZs8oA/qk7BjX/nRx+pojKp4cLfA7VVXhwj +Spg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=MQqDeGmh; 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=OzdYgrUt6RutXjOHK60XHqB93BNve9c10zZbz14xsqRQ56awL16g7LUxmOU8QbXbaS B/2XlCECnQfNh+RbS3mZa9BVm2sy0Qou5mWeGHN0Slx/LMxqB3CEaxS5jqUYM1gdzC/Y nxhXTxlq+J15q7+BN7HVMNFDWDt/9uyABJ+nY= 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=nl0MU24hbbwliA9UNifHW+1J0LNJSL2LkQsroKV+Cmy+jBkLY7ZwfkB+n7iBGq82WF zv0TTmp3S5oFqOqTkvb3rrSEJwoTlRgZsRxUDJYqyuiLerEGJs1mukDaOAR8tSFMpGRU mhvRM/U2DiDUVrfB53N4jcfVwYMdT6eczjyT6Mxw+fFQ1lERkq9oMejLrEu3VPrEmO6K N7IXvxm5eUzHih4Fh3DFjg4YCYlLomSdUREpREyQWRfNf1hXLAD/vV9SCtAY6vsOXWad fA+22SS/dNFkbUAobwG7I+Tg53HJThwwVQuTFbDZfU+4GVSjTaxNy/GOixvGwRo1AuN7 iyhg== X-Gm-Message-State: ACrzQf1As1TxQmuVN4YOiYn3hJOLbmRxV10eiVLXkzBUQqlqAmjbrJxz tLXJzkLnlIDqcnC5NkESDGe8EvbW X-Google-Smtp-Source: AMsMyM5+fvssIhytKY2LSuuS11n12arLSuhxAqEiBREhO3wyFu5v2NwD5z6/mElgouDAITchPBzenw== X-Received: by 2002:a17:906:9be2:b0:78d:957d:9efa with SMTP id de34-20020a1709069be200b0078d957d9efamr9214693ejc.411.1666024981741; Mon, 17 Oct 2022 09:43:01 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:5193:b0:45c:bfd9:fb45 with SMTP id q19-20020a056402519300b0045cbfd9fb45ls12100280edd.3.-pod-prod-gmail; Mon, 17 Oct 2022 09:43:00 -0700 (PDT) X-Received: by 2002:aa7:dcc5:0:b0:45c:7613:65f6 with SMTP id w5-20020aa7dcc5000000b0045c761365f6mr11476501edu.142.1666024980506; Mon, 17 Oct 2022 09:43:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666024980; cv=none; d=google.com; s=arc-20160816; b=s8f7X6NunW6LpGKum0C3qOLk43+aqubVtK3KLEGo5SkNjKSobanwzhEImseCjQAoDC OPx4HtjEJs3jvyQXsa5aGzZ2V5Mnnu7stKqQmEt49q1EwaijKMHs2p1h7JB9mrR/Dubs gD2IwP7pTxef3RYMlMFi9HZKBRqJPY9C2yHCa0016wED/SF8v2DsRVzl/t9D7RzQy/oO pHXAk+eCK4Qh9613SYuV0IxLNouC/QLDyX4wDmhnL5ljvbjYPiAlL7UBPeHnD74No9bI OPcXA8t9Sd4Ct7DqR29nMPIt0OMedAtP5/Xyla4leao6REHNUcUbi0YBcT0lTJewBg9f /mGQ== 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=r/470KNAI23dl8JEpTk3LzSiTd6IGt/ckBs/DKn5ws43XtkwHnk7YnLdK69sAtxO03 yv0GhRXjhbW1o00JqYQ5BEUyHV3iueW7M5HpVswiZOWG+/iPHbYi+KRGTYXdecO//qqe sxkRTYfpWt9Pq1DFyRfwkeTKm0LByJxnGDj6X4oMQ6UGf/jgWfXx/Mw4Jb6yGMMIRkmE 9pOWfB9WdB9ukT2cwpetHfrs2tvgpH4XcZre0HeZjwFkvO9JyJEsu2J678MgWqe9d0AU kyErFY+eMyieGdvMdP4G/ox5l/BHes4i+TD/JdJ8UC3UyKhZh1eOzReJwjn8S/AuGDdn 3dnA== 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 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 i14-20020a170906698e00b007867dba53f6sor4066996ejr.25.2022.10.17.09.43.00 for (Google Transport Security); Mon, 17 Oct 2022 09:43:00 -0700 (PDT) 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: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 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=MQqDeGmh; 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>; + };