From patchwork Wed Aug 17 14:35:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 2299 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 7D2633F03E for ; Wed, 17 Aug 2022 16:36:31 +0200 (CEST) Received: by mail-ed1-f72.google.com with SMTP id t13-20020a056402524d00b0043db1fbefdesf8829268edd.2 for ; Wed, 17 Aug 2022 07:36:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1660746991; cv=pass; d=google.com; s=arc-20160816; b=cEnkltpGYqMm8uSytYszm36Gy/lLU8LFzhIMWAB2YwDpiSsABBCCjAb4RqfZejwGSl UJFMnJb7R3AdtahX/DtZ9vPiQPBCkfmii1yL/gqOKRDdbAuXIlnvMmsFpHgWXEPfH8V2 wTv67iwTt/RfhIhlH5pNCm06nfknSmCgEc+1mbdlYNrEmfp24Rfy95wJtT+DhToolO8Q +P3pqHbEc9zBmX5Z+8nBfeIYRfgOCY3FIvz+Dxaioh5yhxxSJZm2qLkPxDssmAscza0M bHe2lp/J3QEUIloLAvO/uCjW8ZAtb/SzBwiFGWIQheWZgeMkxNjetFpNrILN8bxfY26M Nllw== 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=yjxj7wdJ/W8/hSqbd9bf9zTvrvREkfFcwRVZNS73hbI=; b=F0fYv73PhQ7tsFXUTBegDDB/lyPHd6eXiILPdKpAXeTK55h5Ozll1QyWC4ZdsmblaK Ya/D2uPK9anl0quiWudhdkLjNmErEHeqOj74voh0G5zPAf6/er0+DFztDPCm6M/5Zukn LysG1EBeUF4IZES7kwvKM/0Z/KGDdgpqRj4roNwuCobIgnL69OTNNSedQOpp6oFI0fZ5 GBwe/32/7rgPvm/J+9Oq2yirjZLF04ChpplY6OpTOdoQbuayLA7oqfjEzgD1RQVSlPSR yx4dBoG//hHILXR+4UTWW8/Zmc1JsBtiZCHr1ubfxdorrR0qvaB0RNampQKe6n7y/Ibw WEGA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=f1d9zEDh; 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; bh=yjxj7wdJ/W8/hSqbd9bf9zTvrvREkfFcwRVZNS73hbI=; b=XBg6pqYPBO/eOI+RdJ5PutqMqpG7VA2lTmwAy1zXUcwK0OwV8BdxvJfr6sAJ9YVw66 gHpsxeDbFjdrNggH4Twd/m7jyorXBYQjC78krSUD1h+bNmxSK/zqNWZDCslQkOUvMjZV Ev7NLgLdskeRWsvybfW3k+U57TyGNWYtOpZkk= 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; bh=yjxj7wdJ/W8/hSqbd9bf9zTvrvREkfFcwRVZNS73hbI=; b=zgwuJOyueMwY0V04k24KhMztD9k294gr1r3czqECnmgSVvG/w7J4sXA2piCPdjeMFr KZr9NQmiy1XbjWibB6T1Lx+Tr2w4hOV642js4X7U5TPDyXkvcqFJ0DO0DceemcgFoajT WfHDAoUNicBzCIpsUDqGc1FFMkcCY5cDLMbsl5XaM9jEl/I34WwzDV3F+3HYESxwy4DB h5k/Xijiu9CXiD2QTauZiKt2BayleqoRl6l8x67f4xOaAOV6yaDadH00VM3cnYrV+j2O kwDgnQ+xMdYjuSMmhy0yAWYSXY0/1qSiBT72yMyHF4DvxxCU8tFTV3ap06hrXpQfu12c pyTg== X-Gm-Message-State: ACgBeo03kXbu/bGQra+Bqwbn/DRirhkj7tEj9kkbo+kYKO9QOVSsTUdk WE34A2ztXfDU/k98bT6TmZRrEmfV X-Google-Smtp-Source: AA6agR5Tvx6eAom1BxQRggeNVEn+bAADJa5/ZuO0QHIV9O7GQZA7bqChAu57AWj1hQsvljDqXfkArw== X-Received: by 2002:a17:907:7d86:b0:730:cd48:e2bc with SMTP id oz6-20020a1709077d8600b00730cd48e2bcmr16981901ejc.167.1660746991035; Wed, 17 Aug 2022 07:36:31 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:906:3f91:b0:726:abf9:5f2e with SMTP id b17-20020a1709063f9100b00726abf95f2els6074886ejj.9.-pod-prod-gmail; Wed, 17 Aug 2022 07:36:30 -0700 (PDT) X-Received: by 2002:a17:907:b0d:b0:730:aa17:a0b7 with SMTP id h13-20020a1709070b0d00b00730aa17a0b7mr16844429ejl.661.1660746989801; Wed, 17 Aug 2022 07:36:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660746989; cv=none; d=google.com; s=arc-20160816; b=edjzvUQIWkyAYF2vWXrRC3OY3D8KNk2yORGThaJRPENl/078w/vnNWdfkBuQo4AIHV SyRlC2SvRelMKCFNU5JO1yAOOYzTyuZL1PfG1wp75pxvLZgPXSRjFe5T7JGZSTmkrPyZ 0bXsAqyR9m/raiAHsGtjSm9sdZMysB5plKNpidMN5ZcozfNcoOODUfhQaqS3N39qSstf Hw6HliLYKa/4+WkrzPtbQbek8heAt6iPFMbwrMl9Sq3i22x+yC4XoiKpW7lVvgDw/lvs dHWU/8gu8YkbR25FUCKDlzSwp7nWTykLHqGsjKcaSJpEL35CS//wdLltTMxW3DGysQsh 0DSg== 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=vUjsIUj0sjtjNDnJJ6/7r96WzwA0T1BZA3Wt0Kn9xQk=; b=EqT/9IFKS+mJ27iq66c7yBpg6C8UdYkNG2Aaa9Cp6F4sIoUdMo7Hsl5rQH6hXz5TGt n7zReSAsekliJQ66bgc5oAal4njTuanmCsmw4vs1xuqWyBd3vHfLsyZhIJ16s14VHPlW PGZp6Jh1Z/lFSFz9P1D0ErbieL0lb8VDcGLMCdUlnqrJKiZOCuRy1x1HRa/fIJdjisz9 FnASxv5veFkClJ7ozuUjl8BHMrUS8T8ZtunyHfb3/DlPSUVF5Pok+ra8c7Nn3Xkdx0LM S6PuMHHNk0nS/ubEOjQqYQmbAXzs74tWF1j/oxzLtsuJIpKgCowGSedS0+S0oVIdu3O6 GY/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=f1d9zEDh; 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 yk15-20020a17090770cf00b0073841340cb3sor3698419ejb.111.2022.08.17.07.36.29 for (Google Transport Security); Wed, 17 Aug 2022 07:36:29 -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:2721:b0:731:2aeb:7940 with SMTP id d1-20020a170907272100b007312aeb7940mr17579840ejl.448.1660746989538; Wed, 17 Aug 2022 07:36:29 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-79-31-31-9.retail.telecomitalia.it. [79.31.31.9]) by smtp.gmail.com with ESMTPSA id o9-20020aa7c7c9000000b0043cab10f702sm10711982eds.90.2022.08.17.07.36.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Aug 2022 07:36:29 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Alexandre Torgue , Amarula patchwork , michael@amarulasolutions.com, Marc Kleine-Budde , Dario Binacchi , Dario Binacchi , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Krzysztof Kozlowski , Paolo Abeni , Rob Herring , Wolfgang Grandegger , devicetree@vger.kernel.org, linux-can@vger.kernel.org, netdev@vger.kernel.org Subject: [RFC PATCH 1/4] dt-bindings: net: can: add STM32 bxcan DT bindings Date: Wed, 17 Aug 2022 16:35:26 +0200 Message-Id: <20220817143529.257908-2-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220817143529.257908-1-dario.binacchi@amarulasolutions.com> References: <20220817143529.257908-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=f1d9zEDh; 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 Signed-off-by: Dario Binacchi --- .../devicetree/bindings/net/can/st,bxcan.yaml | 139 ++++++++++++++++++ 1 file changed, 139 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/can/st,bxcan.yaml diff --git a/Documentation/devicetree/bindings/net/can/st,bxcan.yaml b/Documentation/devicetree/bindings/net/can/st,bxcan.yaml new file mode 100644 index 000000000000..f4cfd26e4785 --- /dev/null +++ b/Documentation/devicetree/bindings/net/can/st,bxcan.yaml @@ -0,0 +1,139 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/can/st,bxcan.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: STMicroelectronics bxCAN controller Device Tree Bindings + +description: STMicroelectronics BxCAN controller for CAN bus + +maintainers: + - Dario Binacchi + +allOf: + - $ref: can-controller.yaml# + +properties: + compatible: + enum: + - st,stm32-bxcan-core + + reg: + maxItems: 1 + + resets: + maxItems: 1 + + clocks: + description: + Input clock for registers access + maxItems: 1 + + '#address-cells': + const: 1 + + '#size-cells': + const: 0 + +required: + - compatible + - reg + - resets + - clocks + - '#address-cells' + - '#size-cells' + +additionalProperties: false + +patternProperties: + "^can@[0-9]+$": + type: object + description: + A CAN block node contains two subnodes, representing each one a CAN + instance available on the machine. + + properties: + compatible: + enum: + - st,stm32-bxcan + + 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, and that means you cannot use the + slave CAN without the master CAN. + type: boolean + + reg: + description: | + Offset of CAN instance in CAN block. Valid values are: + - 0x0: CAN1 + - 0x400: CAN2 + 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: + description: + Input clock for registers access + maxItems: 1 + + additionalProperties: false + + required: + - compatible + - reg + - interrupts + - resets + +examples: + - | + #include + #include + + can: can@40006400 { + compatible = "st,stm32-bxcan-core"; + reg = <0x40006400 0x800>; + resets = <&rcc STM32F4_APB1_RESET(CAN1)>; + clocks = <&rcc 0 STM32F4_APB1_CLOCK(CAN1)>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + + can1: can@0 { + compatible = "st,stm32-bxcan"; + reg = <0x0>; + interrupts = <19>, <20>, <21>, <22>; + interrupt-names = "tx", "rx0", "rx1", "sce"; + resets = <&rcc STM32F4_APB1_RESET(CAN1)>; + master; + status = "disabled"; + }; + + can2: can@400 { + compatible = "st,stm32-bxcan"; + reg = <0x400>; + interrupts = <63>, <64>, <65>, <66>; + interrupt-names = "tx", "rx0", "rx1", "sce"; + resets = <&rcc STM32F4_APB1_RESET(CAN2)>; + clocks = <&rcc 0 STM32F4_APB1_CLOCK(CAN2)>; + status = "disabled"; + }; + };