From patchwork Sun Mar 26 16:03:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 2805 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 246663F25A for ; Sun, 26 Mar 2023 18:03:36 +0200 (CEST) Received: by mail-ed1-f71.google.com with SMTP id i22-20020a05640242d600b004f5962985f4sf9206054edc.12 for ; Sun, 26 Mar 2023 09:03:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1679846616; cv=pass; d=google.com; s=arc-20160816; b=zUAXJ9sNiPQ4plggdHuRCLBLPmcIbPWVoONKIQjVvVDWy0iOSiRVhk9o8FBg5TCCtA iK2CGtOSD99xz3Lfpft0wCG3lsKCkipEsFQpcYNr/013ea/TXjBZgGh1/kLqxTNNhJOR FVEvni0bgZiDOIsGcVBrU4p1wLFAZhrlVSGm9wPbG6uMSFvKkcdr7rGwfEzoxwjwQekS IIKmxxcMpKqQKFo7knpHHrO9zaUolaieY8AzRkTXBqpKEhMjVYfwS9WT5+YRR0o47ihM abI4hqxI0GBK1kXpR/bRM8PCDe6o36hxjpajQARjLWyiCUr5acR9sqNe8vENV8Y1RwOC ec+A== 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=Rts1zjYxtS97kybPG4M+tNG8t2A8uqZUEeCQ3D+TdSU8Awe2BVe5Di8bh3HiSuZcZf VBYkJDVmj0hoFVQqUt5yv8JjYVcd5P3viS+NhExmObOv74yX76re9EiI89ZjyjGPgJlA BEntzYYtt798JR6tsWFYhILfM0oqp2nOLIo8FBZOrPbZsBChjMDa9+y1yZiwU/PQhEHB R1IuQb0IwnHQ1A/MnpTRmpYClXj8ayZwvhFO6x1LBUyy+mKIoGs8HNYqdrYRxHDvxyVJ Gp96RYwYQO/DdhWrhUeT3CqBYKTEuYQKi3E4S/Ykd4/QMaf6fiZUeWlkcNn7bfAT1Sut b+NQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Gye0T3mS; 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; t=1679846616; 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=G6SKun7l13nNelBmy1yAvqUM59SwuRMFvfyB0kdMg8qEA1rPKqfIkhjRkJ+qk5IX6/ o0RcJ2AQI7ZE+ylpJffbTUyTc0644Dj8ZXHid3kxyFP2P0ajgXfWhC+yUuyzHK6UoaEr DxnJqHtBJSTMqHPlWIGhLap6pj6YVsVB92v9w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679846616; 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=KnkBzhZBuXGRcqzuRPBLHqXfHjEUTtOqx2p2ohagFJizepGQMaQHFHk4njuy0sDyx5 9Ho3UR07Q2RTPTCvcBEflTmSBNHbG69sKOdBTyDbztMvABNSs4YVeh2yEsW0R6kQPBpL FgzA3jFmSEznOXQSCzDQTueFcDXCQJ4CVQ8xTOwzY2MJNeLdI2NRPo+e/CWmDzY6Z7r8 fA8pa/XbT/mxVwAFynn1CnExBu7SzyRtQ8HOBNhwCTzn5skKx5NDdLuzPFjydnchsf4q TL5+DFKDEoE5T2aXM0PdZUiNecdPhqT2g4t7djApcTOdk8dEfZWjWhTkpvkAuP44Nu4g 8zqw== X-Gm-Message-State: AAQBX9erN2K29l1I0tyEEUsIkGZB7xyQCmdWHtqUTCy4qfk2fCZ8oYCZ qoyKMc6dIR3p/KI6wioOjfUq//s7uCDui+wP X-Google-Smtp-Source: AKy350ZxQZ+Gr7tUgS/GyGzaAHL+dZmRAo4U9Kq7Ejl4M39gRzgDh1vBMuyGuJJp6PyDQmDm5id7XA== X-Received: by 2002:a17:906:8315:b0:93d:6382:d5b with SMTP id j21-20020a170906831500b0093d63820d5bmr3772091ejx.9.1679846615642; Sun, 26 Mar 2023 09:03:35 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:907:608c:b0:92a:da3e:a6b2 with SMTP id ht12-20020a170907608c00b0092ada3ea6b2ls3896195ejc.4.-pod-prod-gmail; Sun, 26 Mar 2023 09:03:34 -0700 (PDT) X-Received: by 2002:a17:907:7787:b0:939:90ee:e086 with SMTP id ky7-20020a170907778700b0093990eee086mr9213541ejc.28.1679846613925; Sun, 26 Mar 2023 09:03:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679846613; cv=none; d=google.com; s=arc-20160816; b=CNoO5565WpdEkL69FOO49Z+Ah21uAhFGzywnn5bUbPMkLTrQbOWapQoqvww6gx2l50 V6EBc5F48FyYvnMi9gdrMyLS8AXZgR6wOwu7AvdtJqFZtq3b+blc1yCFd6tCuYXViXQC rCV5LvIfJOc90VePpihIF+JsSKJdl3nhm7JBbsDu1ZGzFCjieMNwIjSQv0eyagM3JQWo wwh0oBgzoNygjN4LqVVuOwLW2F8cyy/4amdkS2e30hoQ8fMaDq6LLssa3tJwzz2Aw6ZB 3UXyURmDZLhLhtMHizjaapqdkh7Qv8KkQF7i6I8LggDwW2VQMLcVJIyjY3j537hc0uAZ b2yw== 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=zLNt8iJTSK2F6K5wgrFxdyWcGbDJtvR54nKolUYAiLFVCwrn2eW4SHlwpNBaPyjbKI 1oHxEFsYGQu/pFivgdGaUKFLGzpxwHzLsIrmTVhdM/qlt/btx5B+Hz6lmyo8PZ+QkRRl Iebqt9AZz6bSOWoC574M4iBMM+brESBju158Qgd/uchWP/kIqoJipISFbiy3JjaMpLKJ jr4JuA/SvpuXiDeLehYhYBXeFfUOPDVBiYZ/Mwlol1C2MSt1LbtAVz7fY0wYEmvXL1jS JLTQkwiA7a6pTAWa7giyz5XG0cutbF86iAUDs7Bsa0jJU5f3eqW4DnYaVYRnv0pPOFJv /tdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Gye0T3mS; 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 d15-20020a50f68f000000b004fc7879582csor12898066edn.47.2023.03.26.09.03.33 for (Google Transport Security); Sun, 26 Mar 2023 09:03:33 -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:aa7:cd8d:0:b0:4fe:1b62:4741 with SMTP id x13-20020aa7cd8d000000b004fe1b624741mr8976237edv.28.1679846613613; Sun, 26 Mar 2023 09:03:33 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-87-0-102-254.retail.telecomitalia.it. [87.0.102.254]) by smtp.gmail.com with ESMTPSA id m2-20020a50d7c2000000b00501fc87352fsm6869333edj.13.2023.03.26.09.03.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Mar 2023 09:03:33 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Amarula patchwork , Rob Herring , Krzysztof Kozlowski , Marc Kleine-Budde , 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: [PATCH v8 2/5] dt-bindings: net: can: add STM32 bxcan DT bindings Date: Sun, 26 Mar 2023 18:03:22 +0200 Message-Id: <20230326160325.3771891-3-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20230326160325.3771891-1-dario.binacchi@amarulasolutions.com> References: <20230326160325.3771891-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=Gye0T3mS; 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>; + };