Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp5121128rwl; Sun, 8 Jan 2023 08:57:27 -0800 (PST) X-Google-Smtp-Source: AMrXdXuOU95MvyRVIERXOH8fbgLpgRmyGv1YQruaJj6JGus8+8lCrlbavQVuf7os64fGRaFhB/AC X-Received: by 2002:a17:902:f24a:b0:193:d12:f892 with SMTP id j10-20020a170902f24a00b001930d12f892mr7441146plc.0.1673197047646; Sun, 08 Jan 2023 08:57:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673197047; cv=none; d=google.com; s=arc-20160816; b=ZUxJAsClm7PCroyqwiw428DatiDDsx2MH0zCORKccxNCnAMVhWwpXdIHaMXf1Yqit4 w8sh3XX5mM7B+8+cde5F9dRYqO9kZYI1PZIvnonYKr59hudFnVemfwjQOg6xh6WTtIpd HxgPrW/3TGOGSVDMfaQc0WUAifY2CFrR81gG9rIpO1Pj/hUIj3iBraN655vSpjVDtOfc J61quqeZYwEEbml7UgM42Y9QjenVNzng+hCVubzo7a8JX8ZsI55x8VF5MKFnZqF8iEMK PeYbZmiFZ0dJlje7Xgzv1zeHu7JOKudnC+9szo4w24Y3KN8b/GlYSBsBg5C8IKoIkITG te7A== 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=D8/Md0NYJHUSKcz4MJWTxhKaskWW/ctRpyjjxqRRhnc=; b=Szt1Wkm3YsL54rAxJ9I0wp2PyJEhZYp2nSvwrkDcj0YEj/zprPLKnv/sMJR7Pz0TU2 exVnm954rB9xosRc/ZwMbaMV56AozefpKHTwsiFWLQV2WGF8zzCVHNueYb1za8bOqM1A 4+xjTwKRRt91AtzVycrWRZUM90zMpXK3yQuWAdDeKsxcLTAinZQgZQ4mgR9vrFs7ZHtv cIHosjqWEOohffbms8AqDPT9QTJqblD10OZMKPZ5dagaigj6jlrMKKrVBwnkJpUtCdB4 vfLtV8CI7hw2HTWq93sJorepechnOkQw115RsUuvy/pTKecFPrgRllFH/VdioOsVeNAV /soA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=KZUi81UE; 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 s13-20020a170902a50d00b001910b23667fsi2868480plq.213.2023.01.08.08.57.21; Sun, 08 Jan 2023 08:57:27 -0800 (PST) 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=KZUi81UE; 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 S233507AbjAHQ0Q (ORCPT + 51 others); Sun, 8 Jan 2023 11:26:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233376AbjAHQ0F (ORCPT ); Sun, 8 Jan 2023 11:26:05 -0500 Received: from mail-ed1-x542.google.com (mail-ed1-x542.google.com [IPv6:2a00:1450:4864:20::542]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8DF085FEE for ; Sun, 8 Jan 2023 08:26:03 -0800 (PST) Received: by mail-ed1-x542.google.com with SMTP id i9so9216018edj.4 for ; Sun, 08 Jan 2023 08:26:03 -0800 (PST) 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:subject:date :message-id:reply-to; bh=D8/Md0NYJHUSKcz4MJWTxhKaskWW/ctRpyjjxqRRhnc=; b=KZUi81UE7xYmzIHGfoEd+UN6IMAb9alIo+8JuTlJqRAManBoFzaJWQNhDG1wTsczz8 M3TYyhCIy4tTBraIwZPIIHpLba/IzWnYlBnClJKiZQDp62dcsIbGYFx9T8j2xrXOJr3t KH5USQgKslaBFd6DfxvlUkXx5WjJoTMXe0Jew= 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 :subject:date:message-id:reply-to; bh=D8/Md0NYJHUSKcz4MJWTxhKaskWW/ctRpyjjxqRRhnc=; b=3sCVc3ORl2wj6v8sC+z3MMc/5EY0T2pD6LabTdBQf3YLd9njsPhVsQsoHXt5q/cYRa 6dnPpoIhE1kLpD1WB3tWhUmYtHJUJ7E/0uLzSbytiMxEnBHE918yN5wOI41cQfYTVYnu +jDEXp1MAUwRRkjsypomrDbsQR2gL0aGFUgE8t7wiQ+mqNsKRc2FxsKFG1poCZKlbEjL fORz+50si5fnFPSmpxs0WmzTIUvG+Abcl02q3gX39YxYYOkYEL89fMTHlNonUhHLjWk5 TX43WfV2YfzT45XTAaKoF0re7mS1cee8ocx+/5j9w4NZyKg0XBbopFi6q7gwULzk9hsw DM6g== X-Gm-Message-State: AFqh2ko8GzX7HZaAVGLj20wXhm663D1a/CBchqRlydo/w4n0twH5F3Gd NVNtaoODJ+i9esa+GsErEPNmBhMgXQa/hAbxmd0= X-Received: by 2002:aa7:d61a:0:b0:499:376e:6b2d with SMTP id c26-20020aa7d61a000000b00499376e6b2dmr3505449edr.0.1673195162009; Sun, 08 Jan 2023 08:26:02 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-80-180-23-57.pool80180.interbusiness.it. [80.180.23.57]) by smtp.gmail.com with ESMTPSA id n3-20020aa7c443000000b00486074b4ce4sm2659614edr.68.2023.01.08.08.26.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 Jan 2023 08:26:01 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Vincent Mailhol , Amarula patchwork , Alexandre Torgue , Marc Kleine-Budde , Krzysztof Kozlowski , Rob Herring , michael@amarulasolutions.com, 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 RFC PATCH v5 2/5] dt-bindings: net: can: add STM32 bxcan DT bindings Date: Sun, 8 Jan 2023 17:25:51 +0100 Message-Id: <20230108162554.8375-3-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20230108162554.8375-1-dario.binacchi@amarulasolutions.com> References: <20230108162554.8375-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 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 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>; + }; -- 2.32.0