Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp102929rwe; Fri, 26 Aug 2022 01:17:44 -0700 (PDT) X-Google-Smtp-Source: AA6agR637OYseJZp+hUsgPpidSi5sdWlaahKz/pYNBMa+hHOl/STFtqq1nZKAoGXX9MYVH+p70vP X-Received: by 2002:a63:de01:0:b0:42b:31f7:b6ea with SMTP id f1-20020a63de01000000b0042b31f7b6eamr2312878pgg.587.1661501864217; Fri, 26 Aug 2022 01:17:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661501864; cv=none; d=google.com; s=arc-20160816; b=HRZLNGqaCNqHxGTP9nV7J1RG6xjw5hhe4wcLO92a/WuLUquZinNHDr/vNEmYFjE/yj hR9pV6EnHYCDYp69vopVh1EMS07HIRRo/y3Ns++RXocmkxPqWbZXb0ly8lwqCvinHfec ai1RfMMBpVuB5CdhRPN6MCSXXzcnPB2gkJPuOJoP5A4d29sN+b5MiL2J1PYwxjr3fYQD hU1jwoGLyNn3BinUz/wpqJ+bPu896wYPfkvSrdQ30XdilIrERIaYFmdyZnwb0JOMQEXe YggXvWpGROoOQGSt+/xYPyRCUOHKGgB0oUAwCD9uhBIeHqiWsnAya9DDLroshAN8lun6 VIig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=CEGNVel+DD71gCbMY4+NplXPx6ttJvqdwAiSfqWyuyc=; b=gRm5oZkClvdNTShzCsgA+7McyZwggwuZgGu1pwOxXOZzT415wMuUTPcCir8GIALfJy 07Ny8E+CzEtWNEnIcLKBdxlIb7583ObWJK+DjpIVw5qyoiaZUWprLcZsfDxwyJ5Fl4JK mWxq+GUr1BdQp8X2yRpEs8LKQiy7y3YDB3JLPCMd0McW4Z7xqL7rEABBikPZvEyG14Zx ZdSaWVh721EZ3K7vVEPOS3HulWm2V3cUmKwS6Jn/RGitvnZI0tUQsQ2/LAQkVfEAhecB cUJNUroGv+d0AL7Lh39h4EaRAnT05ISDaup5XlxJZae2Obtv1NbltzmUwhzvy2DswGiD pvBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=jQ86Y7gt; 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 d11-20020a63ed0b000000b00429a769c2acsi1168121pgi.340.2022.08.26.01.17.31; Fri, 26 Aug 2022 01:17:44 -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=jQ86Y7gt; 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 S245162AbiHZHUy (ORCPT + 99 others); Fri, 26 Aug 2022 03:20:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229873AbiHZHUt (ORCPT ); Fri, 26 Aug 2022 03:20:49 -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 37B1633A26 for ; Fri, 26 Aug 2022 00:20:48 -0700 (PDT) Received: by mail-lf1-x134.google.com with SMTP id l1so882779lfk.8 for ; Fri, 26 Aug 2022 00:20:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=CEGNVel+DD71gCbMY4+NplXPx6ttJvqdwAiSfqWyuyc=; b=jQ86Y7gtk1EpU4RztWNT1iTdh2AUuRrwXfiVeyrNKILZFHEST2uROvFtOFKzico+PW JdiP0jlcR/My88TNoWLOM2Dt+q69rIK++vjnpB/CrldlJdpweNn/cdutT1KaTsGdYAD0 Qy6yv5wVKl49zb+u45pbzd7pK90bqNa5NjHr0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=CEGNVel+DD71gCbMY4+NplXPx6ttJvqdwAiSfqWyuyc=; b=cbnILpxArC+8KqtBIrD7msx7zUo8lzHsmLEYH4dyem6g51o1WfKzoqlUVmAZCdanXo +DZ3yBo8bpMaqaLHJaAd/1MJwbn+8f4Gr/0HkGpjba0gyjjfOLEEgujQy857TZALiNod D2RikSbedkPea13+Zb7TUNJXl9NGw/XUQDX2XCPJB5AR33ybsNT3Ud9FFKjhYna8gOds zDqVfA40qL7xenoH/PviBh68/qC1JrjShhKaXLuR5qJe4FheO0pzkMHVmuTaTC/2Odpl /HN5iEUBjIvHZsY5BHEuu2iRvgZl8DNzC18kGVY6r+dGyLGriLnuUzSnYp9vBwnv7WrZ 8wpQ== X-Gm-Message-State: ACgBeo1oy2bCEpMEThCHr56T4jJ0C+1u10tWsql37Y1QVF9q8+X1u410 E2/p/zkVm4WMQeKBlrDEq4XIN29rVSL7yrxt0/hgwg== X-Received: by 2002:a05:6512:3503:b0:48a:6060:5ebb with SMTP id h3-20020a056512350300b0048a60605ebbmr1974187lfs.429.1661498446570; Fri, 26 Aug 2022 00:20:46 -0700 (PDT) MIME-Version: 1.0 References: <20220817143529.257908-1-dario.binacchi@amarulasolutions.com> <20220817143529.257908-2-dario.binacchi@amarulasolutions.com> In-Reply-To: From: Dario Binacchi Date: Fri, 26 Aug 2022 09:20:35 +0200 Message-ID: Subject: Re: [RFC PATCH 1/4] dt-bindings: net: can: add STM32 bxcan DT bindings To: Krzysztof Kozlowski 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 Content-Type: text/plain; charset="UTF-8" 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 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 Hi Krzysztof, On Mon, Aug 22, 2022 at 7:39 PM Krzysztof Kozlowski wrote: > > 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". Ok, I got it. > > > > >> > >>> --- > >>> > >>> .../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? STM32F4 > > > > >> > >>> + > >>> + 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? IMHO, I think so. Thanks and regards, Dario > > > Best regards, > Krzysztof -- Dario Binacchi Embedded Linux Developer dario.binacchi@amarulasolutions.com __________________________________ Amarula Solutions SRL Via Le Canevare 30, 31100 Treviso, Veneto, IT T. +39 042 243 5310 info@amarulasolutions.com www.amarulasolutions.com