Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp2644409rwa; Mon, 22 Aug 2022 11:00:38 -0700 (PDT) X-Google-Smtp-Source: AA6agR6xvo7/Sv1DLD+DutlVgKUH1uTBQdwsNj6AgqGZZ/ZauEJ+XdMIqHjhl7+2QbNpmE81c65A X-Received: by 2002:a17:907:7b8e:b0:73d:7c69:4d67 with SMTP id ne14-20020a1709077b8e00b0073d7c694d67mr4541094ejc.609.1661191238472; Mon, 22 Aug 2022 11:00:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661191238; cv=none; d=google.com; s=arc-20160816; b=mCHt20ecWlQM4p7aCozXueLEH2dFCR3TT6sYMuYYc398qETf9tzrU3vJt3JIADjfc2 zl5tavKiKHB6rV5Xrg4ts2ZNDssql3x+/oudiXW2VF24f9VjIsmNpaMTBpqWVUCZSHFo bCaerjUCWlxI368zxN0Uvn/5WlN5W8bWyLW2Gnd2BzGAGFoS1mPoEbFSWZcZ06+SDhF0 DmeJhsIHj5Oo93Ytg8QRqN84SiEwKPmdv2ygFDZGokNoQdsw7G3f0ADHukSlh6Hf+P8G Cg+w6Osglw+ViVtSXJ2c2I7T676r1GHFGLdPPSjIemx24e9Ovpr301Zme+PkmRVval9C 5/Tw== 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=oZtQ/WFsgMHD1ADUx1lXU0GWvfCZk4DciPrC4xHBmeo=; b=H/CQ8W0ilnN+DoAW0bKlbXzDbR7JDJK5hd/XOJ06Au0fA+OuVrQqRlvH4TLPiU+BX7 ESHHk/+jYCH3L3IlwgQ86coDbp2dH3itcoUc7sSDn8y45+m17xeL95jVnSX16RmHwk6l GKgBfOaBzqrGDqnq4Bq3sutCo3PrQeJKnUh5effmEfs6eQJdsQNS42Pd3vaBtORur0YX JiO3i0UMePZ3KyZMxSKYzGMQyT10NAg9hKEhv39IruD7IC+O0JD9pm8Hh8GmdnsCvjQL 4rbN9T1yLx7p+2odeqdhnn022j6VeihiVNeRddkecBfHTx6jDck5jd4r3fBf+OCxzW3H ERLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ESNJlDww; 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 oz44-20020a1709077dac00b0073301e9817dsi10032065ejc.620.2022.08.22.11.00.12; Mon, 22 Aug 2022 11:00:38 -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=ESNJlDww; 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 S237272AbiHVRkC (ORCPT + 99 others); Mon, 22 Aug 2022 13:40:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58200 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237048AbiHVRjx (ORCPT ); Mon, 22 Aug 2022 13:39:53 -0400 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EE46A40BD8 for ; Mon, 22 Aug 2022 10:39:50 -0700 (PDT) Received: by mail-lf1-x12a.google.com with SMTP id z25so16323405lfr.2 for ; Mon, 22 Aug 2022 10:39:50 -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=oZtQ/WFsgMHD1ADUx1lXU0GWvfCZk4DciPrC4xHBmeo=; b=ESNJlDwwLUrymdH68KLBiBoUbRDrU0LvEqC6sPEtHnwPtcOtngzkU78N0rz0NnYLij lsPZW+Z4Nq4PIUjlI6KYg6hG1Jg642JCGKGd4w8KCTiPq0cZl7NcIdxleU9M/fl7R5Aa 0l53PozQ0tmUIUrN/lVXWv9O6JpyWDm1U5C12Pwe2ZtbUbvZVODgdxmfV3hxS0qNlDtQ 2PiGETBptGNU2UUYw44vyFYRcwSmdRtMgRhK4gV8fWMicIqX9o5swC6ZG7dY50a6qzpb LhAyGA21Bze3OjYjn9NTddMLRPxDTM3Zv7YTrqhh3TqvEIAx25Sf8hJm4fN2BZCvGH0o poLQ== 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=oZtQ/WFsgMHD1ADUx1lXU0GWvfCZk4DciPrC4xHBmeo=; b=10eh8/5fmccHpzNIGhYgg3Iuk5bFxvkuhiUO9Et7eTpQsFXB2kjtxUsfByd72fkx4T AxbtTrZ2YRDK/efTaCCIR3qb9azyi0ClkgYl6ZMhPaXEjGRU9Q/zjA0WqL6tvjAnLwNX ONp17RS9M0BxAVQWnQQWliTHnxCWx0jAVfp1QA/7spMn6V2z1zVimfNG5Vma/U/RiScR v9asstUDHBVl+pd6PzmFfbBsYWb5pDvVnTtQMKgbZLop+OXyB+j311CxRXFkXCj5jPIm ht4oa2c+17rDIDhUihQ90Tw9U+cTA2Wi9gz8Cykw8UOxFTUIvVBsQWvmBJqDK3NZNbLf H16w== X-Gm-Message-State: ACgBeo1PbGjsDhAYNb4XEZoQUIvFDOgKmCv0yFn2uRWs7qAEtOcWdomG SQNFmH3pY2O03tf/rWbLj8VGsA== X-Received: by 2002:ac2:4e6a:0:b0:492:f027:218e with SMTP id y10-20020ac24e6a000000b00492f027218emr763637lfs.676.1661189989298; Mon, 22 Aug 2022 10:39:49 -0700 (PDT) Received: from [192.168.0.11] (89-27-92-210.bb.dnainternet.fi. [89.27.92.210]) by smtp.gmail.com with ESMTPSA id p5-20020a05651238c500b0048a83336343sm2020168lft.252.2022.08.22.10.39.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 22 Aug 2022 10:39:48 -0700 (PDT) Message-ID: Date: Mon, 22 Aug 2022 20:39:47 +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 Cc: linux-kernel@vger.kernel.org, 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: 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 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 On 20/08/2022 11:08, Dario Binacchi wrote: > Hi Krzysztof, > > On Thu, Aug 18, 2022 at 10:22 AM Krzysztof Kozlowski > wrote: >> >> 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. > > I started implementing this driver in my spare time, so my intention > was to keep track of it. SoB is not related to copyrights. Keep personal copyrights (with/next to work ones), but SoB is coming from a person and that's only one. Choose one "person". > >> >>> --- >>> >>> .../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. > > I don't know if I understand correctly, I hope the change in version 2 > is what you requested. What is the name of the SoC, where this is in? > >> >>> + >>> + 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? > > I took inspiration from other drivers for ST microcontroller > peripherals (e. g. drivers/iio/adc/stm32-adc-core.c, > drivers/iio/adc/stm32-adc.c) where > some resources are shared between the peripheral instances. In the > case of CAN, master (CAN1) and slave (CAN2) share the registers for > configuring the filters and the clock. > In the core module you can find the functions about the shared > resources, while the childrens implement the driver. In both cases you refer to the driver, but we talk here about bindings which are rather not related. So I repeat the question - is the child entirely separate device which can be used in other devices? Best regards, Krzysztof