Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp193684rwb; Thu, 18 Aug 2022 02:01:12 -0700 (PDT) X-Google-Smtp-Source: AA6agR5MdfRGM6W6d+vcEe+E4KyjxQYhauSVBa92Ph/YA5duFNppDtk8lO5YiT5SevK1Yi1fFY6L X-Received: by 2002:a17:907:7256:b0:730:f074:963c with SMTP id ds22-20020a170907725600b00730f074963cmr1343621ejc.201.1660813272323; Thu, 18 Aug 2022 02:01:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660813272; cv=none; d=google.com; s=arc-20160816; b=whuZtcOkSZOn8kM5ipT3V8QyyTwzXE7ANa8X0sw1rEPbNWsUwRtILDPhGj6JYhl6hp HHerZyVgylYwt8PhWnZk+Yzl1PMbpOvm+ENSeQumZBxdOZWHWZGLblMzrYPTdTgOu1ag 45dHIEMsyDxwLPBKkdq3Z1PzWv7OF5AXVea5ZcxS6S8vHRoUdye5yqWFwQ5doBqdqGuW dImjyRVv0+oJdAySTUWUC7KmUWW83rBJYiqfMsqU925uQSfBRmbq0LH6U3BpLjbMEtvO vkLyCpnYV7UrP6a2E0a3DNK+oIkj+oK5uXslQhK5FJ6bGmOgmRJgJjYwLMWqpCmqWgbt Xx9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=ZISBdhU5jjsQ/J0wTDtKXgSITQfAqU8864taLHzaYjM=; b=Ify0D7PB1ruoC3O5nCYMb9LUqb28fWyKKDkmZI+SfKlfWBLGemurnQvnt8+dfYdxVo EUEbrn6QF5q+Eq2ZYk87EsUgqxAsXYm8CSX6UUTNXLttMKgn3JXwkJKaplB5EKjJqgFx 0JNVTh181rNPgzn0Xlv7iaqG/bdSPojCzy2MwG9Jv4DtmJUFm/bdvLjcAWaXy7bcSJ3e hHpqAinM9+lIOJm/DQNoBq4mWpv5HLN3CQtfCr53ywiaXHP3kXbNr+845t2JsPHgKC/L NibiO1N587nMpSZHxl3qx27Ztwd/hezGc9eL/XmZ0/XhiaHEfZkgBXBbtcs8T4RMhgoj yKsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=h6ZJ2B4D; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gn17-20020a1709070d1100b007308550af97si948908ejc.735.2022.08.18.02.00.44; Thu, 18 Aug 2022 02:01: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=@linaro.org header.s=google header.b=h6ZJ2B4D; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239230AbiHRIWg (ORCPT + 99 others); Thu, 18 Aug 2022 04:22:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56464 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239095AbiHRIWd (ORCPT ); Thu, 18 Aug 2022 04:22:33 -0400 Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E445B80E98 for ; Thu, 18 Aug 2022 01:22:31 -0700 (PDT) Received: by mail-lf1-x134.google.com with SMTP id u9so1164433lfg.11 for ; Thu, 18 Aug 2022 01:22:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc; bh=ZISBdhU5jjsQ/J0wTDtKXgSITQfAqU8864taLHzaYjM=; b=h6ZJ2B4Dt3c05SoEFIulAnGd7MNkX38buE09h03m1YVDrOI4kULqre4pETeIfBeheU W4CL4F7IHfrDgJl36TqihuPkalIjzkhykUZXE9O3CD5dMKioWnXAzfzb8hbICqkMjwQM 7zTrM7xzfGBlIevNqpx+TCfp41NA9mFD5xdWbKedMY/ZorkWeQnTgsKHNbC96Ba0kYRH H54B3XA19tnygktHG7Vr/0atmyLax/Vp7obBCjy0P2kruxeOWNdCvKSyzL30r097UX3T BEz9W7ajXVd1YAA0Uwm2T4IByu/eOH3ZL2LVtDDxiP2oyJhDdoXNDckSsc0JkafpmMcf ei5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc; bh=ZISBdhU5jjsQ/J0wTDtKXgSITQfAqU8864taLHzaYjM=; b=siHPSqeDrxdYW6pFBqiXSXp9BbuG5PBhIXsXTmiR62mbOa56A2GYRFRExMav+taMLv gCtOkE5t3XZKykXTYcsRuUroamwpMjwAZ4GLADgafCM3e5+brSsWck4pqLfZ6NL+L7bU YR1IzaaAWDgamHbvRg6j0QZ9rTbjQhtzbD1yiVbfGkIoZMdHO3+H/eyIVyeWinsR/YOg GQXJaJ4XhEWQcda2fXj9w7uJ1BJY8fRie2wUuUDZI60aqZVL+mK7mcrLpmJ3pTsIu8Do NRnZVcH5DCgX8ITBfJ0TaquVI/GTa5IrLNLpwfu06aE5q/zIPPIyUN4e0ivvB//2Oiuq DTtw== X-Gm-Message-State: ACgBeo02xyxWxPSO72V6eKRIqZBm9uEMXLfLPEd0rM6+yfqLb52GPakW glrRswZqsc7A5fD93Py2B+13wg== X-Received: by 2002:a05:6512:31ca:b0:48b:c4c2:d6d4 with SMTP id j10-20020a05651231ca00b0048bc4c2d6d4mr557266lfe.423.1660810950225; Thu, 18 Aug 2022 01:22:30 -0700 (PDT) Received: from ?IPV6:2001:14bb:ae:539c:53ab:2635:d4f2:d6d5? (d15l54z9nf469l8226z-4.rev.dnainternet.fi. [2001:14bb:ae:539c:53ab:2635:d4f2:d6d5]) by smtp.gmail.com with ESMTPSA id a8-20020a2eb548000000b00261b05d9d54sm127426ljn.127.2022.08.18.01.22.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 18 Aug 2022 01:22:29 -0700 (PDT) Message-ID: Date: Thu, 18 Aug 2022 11:22:28 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: [RFC PATCH 1/4] dt-bindings: net: can: add STM32 bxcan DT bindings Content-Language: en-US To: Dario Binacchi , linux-kernel@vger.kernel.org Cc: Alexandre Torgue , Amarula patchwork , michael@amarulasolutions.com, Marc Kleine-Budde , 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 References: <20220817143529.257908-1-dario.binacchi@amarulasolutions.com> <20220817143529.257908-2-dario.binacchi@amarulasolutions.com> From: Krzysztof Kozlowski In-Reply-To: <20220817143529.257908-2-dario.binacchi@amarulasolutions.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham 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 On 17/08/2022 17:35, Dario Binacchi wrote: > Add documentation of device tree bindings for the STM32 basic extended > CAN (bxcan) controller. > > Signed-off-by: Dario Binacchi > Signed-off-by: Dario Binacchi You do not need two SoBs. Keep only one, matching the From field. > --- > > .../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 File name like compatible, so st,stm32-bxcan-core.yaml (or some other name, see comment later) > @@ -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 s/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 compatibles are supposed to be specific. If this is some type of micro-SoC, then it should have its name/number. If it is dedicated device, is the final name bxcan core? Google says the first is true, so you miss specific device part. > + > + 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: This goes after "properties: in top level (before "required"). > + "^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 Why exactly do you need compatible for the child? Is it an entierly separate device? Comments about specific part are applied here as well. > + > + master: Is this a standard property? I don't see it anywhere else. Non-standard properties require vendor prefix. > + 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"; No status in examples. > + > + 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"; No status in examples. > + }; > + > + 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"; No status in examples. > + }; > + }; Best regards, Krzysztof