Message ID | 20230314151201.2317134-2-msp@baylibre.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1824292wrd; Tue, 14 Mar 2023 08:28:32 -0700 (PDT) X-Google-Smtp-Source: AK7set+5HEkJ8NkgzAvK4rcxHDwtNUNv6BEoUbZ9SHZFF7Xh/vMHCuOboUStCBS/Lu/5j5eYIrIa X-Received: by 2002:a17:902:c411:b0:1a0:50bd:31c0 with SMTP id k17-20020a170902c41100b001a050bd31c0mr7783379plk.24.1678807711987; Tue, 14 Mar 2023 08:28:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678807711; cv=none; d=google.com; s=arc-20160816; b=RENv+BP0lvFxtPGORl4yDGKsXvXwKtPTvYXYT9X1mvL6xuBuw8iVSIbwSq0JQatYII bXvfDC6ThBBjYKKRoBN7fLtDZDc4iojbAFKm9BKnIZ/78ncLXIti7Vu+Mtp0ydVknKnY iI1/ecCJiNiPJohx445T9Vh9DYJeyvChdLr4dpwTDDcjcYEZSk+FPO7V+MAsmLvTLQOC Q5eicZYSXp6yzmQBg4+avE6y2c133DIXH9iUDuUmR1UGDgGyYovoUdHoLHeyydUO4F26 VeEycnaJisVJtyvlozbQc8bLEl2T7T/YynlmBdIPMb66gIevtkE+aoi2PyDLeKc0EZGJ 5OTg== 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=iBdDt0cqpy6mqZcYqnHeD+1brhs0HmWk0OP3dY1LAIs=; b=HlLbI+JUvwdtAcONaC3qEL1DQkHRb4/+6T+YaHUqABZT3wx0WU8Q/cXmf4Gx05UGD5 7TufEXOqABdr6CtP8oYa/z3ogqXNa4RYE0esLiOyJPZPiiEU00Z1+5iStvdTM1ufmPNo jfoYwP/FWLcOQO77ySZGnVji6b3l9nAp7TZwUjOfWQ14Mjs6uCZVXwg/bvcPtcZ5D8n0 bhFbk7gTxnudxWisTtyk5YaArYrXyETsTTihEpGv80f9iV6Dd0zGsuMg34qOLy1VMzBs QeihpYOs8P3z9JvxKkZV31SblBp9InRGT5zoTqNmYH+77oimfu/yfM+4ZFjKfcbzVEj7 1ipQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=GFfmwFW8; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s18-20020a17090302d200b001a05a44093csi2746639plk.58.2023.03.14.08.28.17; Tue, 14 Mar 2023 08:28:31 -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=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=GFfmwFW8; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231528AbjCNPM2 (ORCPT <rfc822;realc9580@gmail.com> + 99 others); Tue, 14 Mar 2023 11:12:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54908 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231466AbjCNPMW (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 14 Mar 2023 11:12:22 -0400 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E9D0864B04 for <linux-kernel@vger.kernel.org>; Tue, 14 Mar 2023 08:12:18 -0700 (PDT) Received: by mail-wr1-x431.google.com with SMTP id p4so8484803wre.11 for <linux-kernel@vger.kernel.org>; Tue, 14 Mar 2023 08:12:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; t=1678806737; 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=iBdDt0cqpy6mqZcYqnHeD+1brhs0HmWk0OP3dY1LAIs=; b=GFfmwFW8xeMH5Re8QwmK4TF3WQrgLb14J2RNNuffrfGixpc2wJEDemqzYA1xuFrAYQ n26hInC07plbcBftba/DYI8Uc0JuD1Q+FiFljbmQ2tlCLqmdm5Hx1XkwqMQYbbouD5nt pLHbgSADUDrV/ep65O0ceyFvs13IJFpHhIODR5wM0Lx10r7lbWs18irGgQX995MrcjtQ hy9rk6MieRxr/+/v6++iEXl8WUnL/S/1lb/4lfLtXacuJPn3bo38/FEGv7U5UyKcnVNb N4gZqy35fqjuX+Y1t7cUud0mbRDj0NbcePXJpY90lYejri1sLMN7H6xDNXCwvSnCUrYg /eBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678806737; 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=iBdDt0cqpy6mqZcYqnHeD+1brhs0HmWk0OP3dY1LAIs=; b=UJAgqQeC25+3qBCydfOA9HYclG/qna4AXJUG2CF6XuV9mRgd0jQNyUrey/XxLhr85J 8VYLKgfIhE/pgZ93ACU2/wkOQYQXYmBDHZ3Myz1DXVyhf0XrFbQ8nc8PdDlfgcDJB7lr xM8QJZ1ZSfGoov92aif5d2FuQtHIb9+bK7wO485tSNUE7N/SqJZhW0xUJP07q4JN8Lod ToE10+S9L1KTbXUEWatVp9KWpiRQTnSFcXjosS0B5bfTkvekKES1Wmjp38I2MUP5+vWH be5GHc5/sJs9Sd+/CS95V5gn1q8MjCx9FHGGJoWCqW2ilA0DqIArKxb6gyNvce3dhppd yUIA== X-Gm-Message-State: AO0yUKWRqS40jWv6yii8tCMtSPTDeHaC/11MpBjD2aOeX5htmrdm8w7r Hp7Cqs1eTWs3ZPgKE0OhC1Cakw== X-Received: by 2002:adf:f30d:0:b0:2cf:e445:295f with SMTP id i13-20020adff30d000000b002cfe445295fmr3436047wro.61.1678806737399; Tue, 14 Mar 2023 08:12:17 -0700 (PDT) Received: from blmsp.fritz.box ([2001:4090:a247:8056:be7d:83e:a6a5:4659]) by smtp.gmail.com with ESMTPSA id d9-20020a5d4f89000000b002c707b336c9sm2320158wru.36.2023.03.14.08.12.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Mar 2023 08:12:17 -0700 (PDT) From: Markus Schneider-Pargmann <msp@baylibre.com> To: Marc Kleine-Budde <mkl@pengutronix.de>, Chandrasekar Ramakrishnan <rcsekar@samsung.com>, Wolfgang Grandegger <wg@grandegger.com>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org> Cc: Vincent MAILHOL <mailhol.vincent@wanadoo.fr>, Simon Horman <simon.horman@corigine.com>, linux-can@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Markus Schneider-Pargmann <msp@baylibre.com> Subject: [PATCH 1/5] dt-bindings: can: tcan4x5x: Add tcan4552 and tcan4553 variants Date: Tue, 14 Mar 2023 16:11:57 +0100 Message-Id: <20230314151201.2317134-2-msp@baylibre.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230314151201.2317134-1-msp@baylibre.com> References: <20230314151201.2317134-1-msp@baylibre.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760357475666665065?= X-GMAIL-MSGID: =?utf-8?q?1760357475666665065?= |
Series |
can: tcan4x5x: Introduce tcan4552/4553
|
|
Commit Message
Markus Schneider-Pargmann
March 14, 2023, 3:11 p.m. UTC
These two new chips do not have state or wake pins.
Signed-off-by: Markus Schneider-Pargmann <msp@baylibre.com>
---
.../devicetree/bindings/net/can/tcan4x5x.txt | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
Comments
On Tue, Mar 14, 2023 at 04:11:57PM +0100, Markus Schneider-Pargmann wrote: > These two new chips do not have state or wake pins. > > Signed-off-by: Markus Schneider-Pargmann <msp@baylibre.com> Not a requirement from my side, but perhaps it would be worth converting this binding to yaml at some point. > --- > .../devicetree/bindings/net/can/tcan4x5x.txt | 11 ++++++++--- > 1 file changed, 8 insertions(+), 3 deletions(-) > > diff --git a/Documentation/devicetree/bindings/net/can/tcan4x5x.txt b/Documentation/devicetree/bindings/net/can/tcan4x5x.txt > index e3501bfa22e9..38a2b5369b44 100644 > --- a/Documentation/devicetree/bindings/net/can/tcan4x5x.txt > +++ b/Documentation/devicetree/bindings/net/can/tcan4x5x.txt > @@ -4,7 +4,10 @@ Texas Instruments TCAN4x5x CAN Controller > This file provides device node information for the TCAN4x5x interface contains. > > Required properties: > - - compatible: "ti,tcan4x5x" > + - compatible: > + "ti,tcan4x5x" or > + "ti,tcan4552" or > + "ti,tcan4553" > - reg: 0 > - #address-cells: 1 > - #size-cells: 0 > @@ -21,8 +24,10 @@ Optional properties: > - reset-gpios: Hardwired output GPIO. If not defined then software > reset. > - device-state-gpios: Input GPIO that indicates if the device is in > - a sleep state or if the device is active. > - - device-wake-gpios: Wake up GPIO to wake up the TCAN device. > + a sleep state or if the device is active. Not > + available with tcan4552/4553. > + - device-wake-gpios: Wake up GPIO to wake up the TCAN device. Not > + available with tcan4552/4553. > > Example: > tcan4x5x: tcan4x5x@0 { > -- > 2.39.2 >
On 14/03/2023 16:11, Markus Schneider-Pargmann wrote: > These two new chips do not have state or wake pins. > > Signed-off-by: Markus Schneider-Pargmann <msp@baylibre.com> > --- > .../devicetree/bindings/net/can/tcan4x5x.txt | 11 ++++++++--- > 1 file changed, 8 insertions(+), 3 deletions(-) > > diff --git a/Documentation/devicetree/bindings/net/can/tcan4x5x.txt b/Documentation/devicetree/bindings/net/can/tcan4x5x.txt > index e3501bfa22e9..38a2b5369b44 100644 > --- a/Documentation/devicetree/bindings/net/can/tcan4x5x.txt > +++ b/Documentation/devicetree/bindings/net/can/tcan4x5x.txt > @@ -4,7 +4,10 @@ Texas Instruments TCAN4x5x CAN Controller > This file provides device node information for the TCAN4x5x interface contains. > > Required properties: > - - compatible: "ti,tcan4x5x" > + - compatible: > + "ti,tcan4x5x" or > + "ti,tcan4552" or > + "ti,tcan4553" Awesome, they nicely fit into wildcard... Would be useful to deprecate the wildcard at some point and switch to proper compatibles in such case, because now they became confusing. Anyway: Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Best regards, Krzysztof
Hi Krzysztof, On Tue, Mar 14, 2023 at 09:01:10PM +0100, Krzysztof Kozlowski wrote: > On 14/03/2023 16:11, Markus Schneider-Pargmann wrote: > > These two new chips do not have state or wake pins. > > > > Signed-off-by: Markus Schneider-Pargmann <msp@baylibre.com> > > --- > > .../devicetree/bindings/net/can/tcan4x5x.txt | 11 ++++++++--- > > 1 file changed, 8 insertions(+), 3 deletions(-) > > > > diff --git a/Documentation/devicetree/bindings/net/can/tcan4x5x.txt b/Documentation/devicetree/bindings/net/can/tcan4x5x.txt > > index e3501bfa22e9..38a2b5369b44 100644 > > --- a/Documentation/devicetree/bindings/net/can/tcan4x5x.txt > > +++ b/Documentation/devicetree/bindings/net/can/tcan4x5x.txt > > @@ -4,7 +4,10 @@ Texas Instruments TCAN4x5x CAN Controller > > This file provides device node information for the TCAN4x5x interface contains. > > > > Required properties: > > - - compatible: "ti,tcan4x5x" > > + - compatible: > > + "ti,tcan4x5x" or > > + "ti,tcan4552" or > > + "ti,tcan4553" > > Awesome, they nicely fit into wildcard... Would be useful to deprecate > the wildcard at some point and switch to proper compatibles in such > case, because now they became confusing. > > Anyway: > > Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Thank you. Indeed the old generic name could be replaced, unfortunately I don't have a list of devices that this generic wildcard matches. Best, Markus
On 14.03.2023 21:01:10, Krzysztof Kozlowski wrote: > On 14/03/2023 16:11, Markus Schneider-Pargmann wrote: > > These two new chips do not have state or wake pins. > > > > Signed-off-by: Markus Schneider-Pargmann <msp@baylibre.com> > > --- > > .../devicetree/bindings/net/can/tcan4x5x.txt | 11 ++++++++--- > > 1 file changed, 8 insertions(+), 3 deletions(-) > > > > diff --git a/Documentation/devicetree/bindings/net/can/tcan4x5x.txt b/Documentation/devicetree/bindings/net/can/tcan4x5x.txt > > index e3501bfa22e9..38a2b5369b44 100644 > > --- a/Documentation/devicetree/bindings/net/can/tcan4x5x.txt > > +++ b/Documentation/devicetree/bindings/net/can/tcan4x5x.txt > > @@ -4,7 +4,10 @@ Texas Instruments TCAN4x5x CAN Controller > > This file provides device node information for the TCAN4x5x interface contains. > > > > Required properties: > > - - compatible: "ti,tcan4x5x" > > + - compatible: > > + "ti,tcan4x5x" or > > + "ti,tcan4552" or > > + "ti,tcan4553" > > Awesome, they nicely fit into wildcard... Would be useful to deprecate > the wildcard at some point and switch to proper compatibles in such > case, because now they became confusing. I plead for DT stability! As I understand correctly, the exact version of the chip (4550, 4552, or 4553) can be detected via the ID2 register. regards, Marc
On 15.03.2023 11:49:14, Markus Schneider-Pargmann wrote: > Hi Krzysztof, > > On Tue, Mar 14, 2023 at 09:01:10PM +0100, Krzysztof Kozlowski wrote: > > On 14/03/2023 16:11, Markus Schneider-Pargmann wrote: > > > These two new chips do not have state or wake pins. > > > > > > Signed-off-by: Markus Schneider-Pargmann <msp@baylibre.com> > > > --- > > > .../devicetree/bindings/net/can/tcan4x5x.txt | 11 ++++++++--- > > > 1 file changed, 8 insertions(+), 3 deletions(-) > > > > > > diff --git a/Documentation/devicetree/bindings/net/can/tcan4x5x.txt b/Documentation/devicetree/bindings/net/can/tcan4x5x.txt > > > index e3501bfa22e9..38a2b5369b44 100644 > > > --- a/Documentation/devicetree/bindings/net/can/tcan4x5x.txt > > > +++ b/Documentation/devicetree/bindings/net/can/tcan4x5x.txt > > > @@ -4,7 +4,10 @@ Texas Instruments TCAN4x5x CAN Controller > > > This file provides device node information for the TCAN4x5x interface contains. > > > > > > Required properties: > > > - - compatible: "ti,tcan4x5x" > > > + - compatible: > > > + "ti,tcan4x5x" or > > > + "ti,tcan4552" or > > > + "ti,tcan4553" > > > > Awesome, they nicely fit into wildcard... Would be useful to deprecate > > the wildcard at some point and switch to proper compatibles in such > > case, because now they became confusing. > > > > Anyway: > > > > Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > > Thank you. Indeed the old generic name could be replaced, unfortunately > I don't have a list of devices that this generic wildcard matches. The mcp251xfd driver supports "microchip,mcp2517fd", "microchip,mcp2518fd", "microchip,mcp251863", and "microchip,mcp251xfd". It always does auto detection and throws a warning if the found chip is not consistent with the firmware (DT, ACPI). Marc
On 15/03/2023 12:25, Marc Kleine-Budde wrote: > On 14.03.2023 21:01:10, Krzysztof Kozlowski wrote: >> On 14/03/2023 16:11, Markus Schneider-Pargmann wrote: >>> These two new chips do not have state or wake pins. >>> >>> Signed-off-by: Markus Schneider-Pargmann <msp@baylibre.com> >>> --- >>> .../devicetree/bindings/net/can/tcan4x5x.txt | 11 ++++++++--- >>> 1 file changed, 8 insertions(+), 3 deletions(-) >>> >>> diff --git a/Documentation/devicetree/bindings/net/can/tcan4x5x.txt b/Documentation/devicetree/bindings/net/can/tcan4x5x.txt >>> index e3501bfa22e9..38a2b5369b44 100644 >>> --- a/Documentation/devicetree/bindings/net/can/tcan4x5x.txt >>> +++ b/Documentation/devicetree/bindings/net/can/tcan4x5x.txt >>> @@ -4,7 +4,10 @@ Texas Instruments TCAN4x5x CAN Controller >>> This file provides device node information for the TCAN4x5x interface contains. >>> >>> Required properties: >>> - - compatible: "ti,tcan4x5x" >>> + - compatible: >>> + "ti,tcan4x5x" or >>> + "ti,tcan4552" or >>> + "ti,tcan4553" >> >> Awesome, they nicely fit into wildcard... Would be useful to deprecate >> the wildcard at some point and switch to proper compatibles in such >> case, because now they became confusing. > > I plead for DT stability! > > As I understand correctly, the exact version of the chip (4550, 4552, or > 4553) can be detected via the ID2 register. So maybe there is no need for this patch at all? Or the new compatibles should be made compatible with generic fallback? Best regards, Krzysztof
On Wed, Mar 15, 2023 at 02:14:27PM +0100, Krzysztof Kozlowski wrote: > On 15/03/2023 12:25, Marc Kleine-Budde wrote: > > On 14.03.2023 21:01:10, Krzysztof Kozlowski wrote: > >> On 14/03/2023 16:11, Markus Schneider-Pargmann wrote: > >>> These two new chips do not have state or wake pins. > >>> > >>> Signed-off-by: Markus Schneider-Pargmann <msp@baylibre.com> > >>> --- > >>> .../devicetree/bindings/net/can/tcan4x5x.txt | 11 ++++++++--- > >>> 1 file changed, 8 insertions(+), 3 deletions(-) > >>> > >>> diff --git a/Documentation/devicetree/bindings/net/can/tcan4x5x.txt b/Documentation/devicetree/bindings/net/can/tcan4x5x.txt > >>> index e3501bfa22e9..38a2b5369b44 100644 > >>> --- a/Documentation/devicetree/bindings/net/can/tcan4x5x.txt > >>> +++ b/Documentation/devicetree/bindings/net/can/tcan4x5x.txt > >>> @@ -4,7 +4,10 @@ Texas Instruments TCAN4x5x CAN Controller > >>> This file provides device node information for the TCAN4x5x interface contains. > >>> > >>> Required properties: > >>> - - compatible: "ti,tcan4x5x" > >>> + - compatible: > >>> + "ti,tcan4x5x" or > >>> + "ti,tcan4552" or > >>> + "ti,tcan4553" > >> > >> Awesome, they nicely fit into wildcard... Would be useful to deprecate > >> the wildcard at some point and switch to proper compatibles in such > >> case, because now they became confusing. > > > > I plead for DT stability! > > > > As I understand correctly, the exact version of the chip (4550, 4552, or > > 4553) can be detected via the ID2 register. > > So maybe there is no need for this patch at all? Or the new compatibles > should be made compatible with generic fallback? I can use the value being read from the ID2 register to get the version. This at least holds the correct value for tcan4550, 4552 and 4553. But the state and wake gpios can't be used in case of a 4552 or 4553. So yes, it is possible to do it without the new compatibles but the changes for state and wake gpios need to stay. What do you two prefer? Best, Markus
On Wed, Mar 15, 2023 at 04:58:33PM +0100, Markus Schneider-Pargmann wrote: > On Wed, Mar 15, 2023 at 02:14:27PM +0100, Krzysztof Kozlowski wrote: > > On 15/03/2023 12:25, Marc Kleine-Budde wrote: > > > On 14.03.2023 21:01:10, Krzysztof Kozlowski wrote: > > >> On 14/03/2023 16:11, Markus Schneider-Pargmann wrote: > > >>> These two new chips do not have state or wake pins. > > >>> > > >>> Signed-off-by: Markus Schneider-Pargmann <msp@baylibre.com> > > >>> --- > > >>> .../devicetree/bindings/net/can/tcan4x5x.txt | 11 ++++++++--- > > >>> 1 file changed, 8 insertions(+), 3 deletions(-) > > >>> > > >>> diff --git a/Documentation/devicetree/bindings/net/can/tcan4x5x.txt b/Documentation/devicetree/bindings/net/can/tcan4x5x.txt > > >>> index e3501bfa22e9..38a2b5369b44 100644 > > >>> --- a/Documentation/devicetree/bindings/net/can/tcan4x5x.txt > > >>> +++ b/Documentation/devicetree/bindings/net/can/tcan4x5x.txt > > >>> @@ -4,7 +4,10 @@ Texas Instruments TCAN4x5x CAN Controller > > >>> This file provides device node information for the TCAN4x5x interface contains. > > >>> > > >>> Required properties: > > >>> - - compatible: "ti,tcan4x5x" > > >>> + - compatible: > > >>> + "ti,tcan4x5x" or > > >>> + "ti,tcan4552" or > > >>> + "ti,tcan4553" > > >> > > >> Awesome, they nicely fit into wildcard... Would be useful to deprecate > > >> the wildcard at some point and switch to proper compatibles in such > > >> case, because now they became confusing. > > > > > > I plead for DT stability! > > > > > > As I understand correctly, the exact version of the chip (4550, 4552, or > > > 4553) can be detected via the ID2 register. > > > > So maybe there is no need for this patch at all? Or the new compatibles > > should be made compatible with generic fallback? > > I can use the value being read from the ID2 register to get the version. > This at least holds the correct value for tcan4550, 4552 and 4553. But > the state and wake gpios can't be used in case of a 4552 or 4553. > > So yes, it is possible to do it without the new compatibles but the > changes for state and wake gpios need to stay. > > What do you two prefer? FWIIW, I think it is good to have the extra compat strings, even if the driver only uses the fallback string for now. This would allow the driver to take into account HW differences that come to light later, without needing to update the bindings.
On 15/03/2023 16:58, Markus Schneider-Pargmann wrote: > On Wed, Mar 15, 2023 at 02:14:27PM +0100, Krzysztof Kozlowski wrote: >> On 15/03/2023 12:25, Marc Kleine-Budde wrote: >>> On 14.03.2023 21:01:10, Krzysztof Kozlowski wrote: >>>> On 14/03/2023 16:11, Markus Schneider-Pargmann wrote: >>>>> These two new chips do not have state or wake pins. >>>>> >>>>> Signed-off-by: Markus Schneider-Pargmann <msp@baylibre.com> >>>>> --- >>>>> .../devicetree/bindings/net/can/tcan4x5x.txt | 11 ++++++++--- >>>>> 1 file changed, 8 insertions(+), 3 deletions(-) >>>>> >>>>> diff --git a/Documentation/devicetree/bindings/net/can/tcan4x5x.txt b/Documentation/devicetree/bindings/net/can/tcan4x5x.txt >>>>> index e3501bfa22e9..38a2b5369b44 100644 >>>>> --- a/Documentation/devicetree/bindings/net/can/tcan4x5x.txt >>>>> +++ b/Documentation/devicetree/bindings/net/can/tcan4x5x.txt >>>>> @@ -4,7 +4,10 @@ Texas Instruments TCAN4x5x CAN Controller >>>>> This file provides device node information for the TCAN4x5x interface contains. >>>>> >>>>> Required properties: >>>>> - - compatible: "ti,tcan4x5x" >>>>> + - compatible: >>>>> + "ti,tcan4x5x" or >>>>> + "ti,tcan4552" or >>>>> + "ti,tcan4553" >>>> >>>> Awesome, they nicely fit into wildcard... Would be useful to deprecate >>>> the wildcard at some point and switch to proper compatibles in such >>>> case, because now they became confusing. >>> >>> I plead for DT stability! >>> >>> As I understand correctly, the exact version of the chip (4550, 4552, or >>> 4553) can be detected via the ID2 register. >> >> So maybe there is no need for this patch at all? Or the new compatibles >> should be made compatible with generic fallback? > > I can use the value being read from the ID2 register to get the version. > This at least holds the correct value for tcan4550, 4552 and 4553. But > the state and wake gpios can't be used in case of a 4552 or 4553. > > So yes, it is possible to do it without the new compatibles but the > changes for state and wake gpios need to stay. > > What do you two prefer? Then specific with generic fallback compatibles, although for driver it still won't matter as you need to customize driver_data anyway. Best regards, Krzysztof
diff --git a/Documentation/devicetree/bindings/net/can/tcan4x5x.txt b/Documentation/devicetree/bindings/net/can/tcan4x5x.txt index e3501bfa22e9..38a2b5369b44 100644 --- a/Documentation/devicetree/bindings/net/can/tcan4x5x.txt +++ b/Documentation/devicetree/bindings/net/can/tcan4x5x.txt @@ -4,7 +4,10 @@ Texas Instruments TCAN4x5x CAN Controller This file provides device node information for the TCAN4x5x interface contains. Required properties: - - compatible: "ti,tcan4x5x" + - compatible: + "ti,tcan4x5x" or + "ti,tcan4552" or + "ti,tcan4553" - reg: 0 - #address-cells: 1 - #size-cells: 0 @@ -21,8 +24,10 @@ Optional properties: - reset-gpios: Hardwired output GPIO. If not defined then software reset. - device-state-gpios: Input GPIO that indicates if the device is in - a sleep state or if the device is active. - - device-wake-gpios: Wake up GPIO to wake up the TCAN device. + a sleep state or if the device is active. Not + available with tcan4552/4553. + - device-wake-gpios: Wake up GPIO to wake up the TCAN device. Not + available with tcan4552/4553. Example: tcan4x5x: tcan4x5x@0 {