Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp4900561rwb; Wed, 17 Aug 2022 07:52:13 -0700 (PDT) X-Google-Smtp-Source: AA6agR7sYThiiQQZB+i+8Waq23de/TFrBnzjLosvGJWgJVEMYvgpGfiQflAjtkM3jSHpcPzBUQAe X-Received: by 2002:a17:907:9606:b0:72f:826d:21b4 with SMTP id gb6-20020a170907960600b0072f826d21b4mr16785823ejc.510.1660747932969; Wed, 17 Aug 2022 07:52:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660747932; cv=none; d=google.com; s=arc-20160816; b=pdpuwCNot/BjKR2GSq9S75R1RFQNqCS06qC9VnMkzXsnzxMv/JM4bZ0SPY4X8gw6Ea QPOmDAnIwBXnMx3NAuICXMO1S36hw36VrCepMKy/PU3NHpd73rKY3JertiDqdH2omRIl aCbBcqq1yGAWAz4p/27sWfurfSp15hqcfiL6fZb5SgyH3IXK7QX3Rrfj6tMs/oP4Y4vY q3nsIsa3LGGNYRT5Ux1mcD6Bq1eVhu/ehhcjTQxi+lvn9SPOrqH7/X/VedoRgOt7XzAv 6oJWH4ocFhOBeKhRihekT1T7OhvwB+7yR/gGdP8MhVYGWOIu/kFeNGYZQYgQWcJxJZS5 JQQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=vUjsIUj0sjtjNDnJJ6/7r96WzwA0T1BZA3Wt0Kn9xQk=; b=Mk/FDqR0BGPN6Q7DfuFPQ59xjZHmWXU9EVuouav5z8ONs+QpCLf6PISa8jZ9EgB8q+ HXjyVhbskih9E4RJLk5OzVU2aiAhAnLz/ikUGNwWMziQzMsgVJKtoOUdAaQjGm83guMM vDU3y0dWtgdoJBw6dauvn65vRh0j8rco6Y5stvP56su+0konSdEZvCJcZxuDBXDaCHcH CFOh7jqslgZ4WZV9BfryKYzsasecDqWKbijI7iZRNF+v5HspbbM27fIzxaLw4PlKkVfd TGzqjKBmA1bDuI6lvtt5sJTJaanTajKi0+EB4J2/HHb5k6Y9SIb4sXXw+zGKAcSByMxZ 0qkQ== 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 linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v8-20020a056402348800b0043e18c7dee7si13157713edc.634.2022.08.17.07.51.47; Wed, 17 Aug 2022 07:52:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=f1d9zEDh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240229AbiHQOh0 (ORCPT + 99 others); Wed, 17 Aug 2022 10:37:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38368 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240278AbiHQOg7 (ORCPT ); Wed, 17 Aug 2022 10:36:59 -0400 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 47B2A9C2C1 for ; Wed, 17 Aug 2022 07:36:30 -0700 (PDT) Received: by mail-ej1-x634.google.com with SMTP id k26so24895771ejx.5 for ; Wed, 17 Aug 2022 07:36:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=vUjsIUj0sjtjNDnJJ6/7r96WzwA0T1BZA3Wt0Kn9xQk=; b=f1d9zEDhKwLi6aKZxl6lUTN1nF5BWPylGCKU+citrsGjBzPd8sBQ8y1ikUFGBZl5Gc L1/QPCBhfBtqqBHhnVoNaFqkkmSmySU5QFU1XaKk8OO5kpq5AtE4MrDA25qlLcYxU5pQ FFml/YhaAroEbSeCrZ/dQrmLmIRD+HIgY40nk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=vUjsIUj0sjtjNDnJJ6/7r96WzwA0T1BZA3Wt0Kn9xQk=; b=4cfGup0YkN1at+60jYi3HpMoy06BKL/QgzMNguxM3jnI70e6J7rpK3J/TRm5Z5YyAh MsUhzQX744gFtiqh8pGIWWI4cF8LUqdc7c3hS/wepLog+17MXfhp+ilSVQm1qOgrVVJd NlCN+zS0bH7wVwjpEDNNCDKkw9hm5xIBZ/nAeXnNYr+NtzQAvlx2hkZKFk8ofaCySw0A lVLoqkzwiNOYwe1v5xBwIDF49ka8mh8tVUIEgOKkXLKwiYt1tieRUt3yGcVZrE0/LcNM 1PfWrvBPCK5cj730XdtStRVmLnaFZR/eUoDA52BQh1Eo6sz54NVPsgCUQNl78Nssfzei IPHA== X-Gm-Message-State: ACgBeo2besrW2dr1ILmUueRyzcGgpplLyueMFMw5f085aD1NVC9aiSiZ vSpf0bOVFp1Dv37JF8i7+fhDDjDgnnJxuw== 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 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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"; + }; + }; -- 2.32.0