Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp7150664rwb; Tue, 6 Dec 2022 01:43:52 -0800 (PST) X-Google-Smtp-Source: AA0mqf4UY2sPSfNnWEMpDps4Dia5feQ2QzkKBn5Qku84vbjYikTMxu/EASwv4wjMzzhvE29jMK7c X-Received: by 2002:aa7:d496:0:b0:46b:e7c0:9313 with SMTP id b22-20020aa7d496000000b0046be7c09313mr20735767edr.412.1670319832700; Tue, 06 Dec 2022 01:43:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670319832; cv=none; d=google.com; s=arc-20160816; b=UdlLVqqfJgC1zZAdG5r99s+VGWoEpUkk+tD7k1AsiPtSEkSESsXCEDQX7GmfFphdLf 9CkWBfrZjEYjFu3mLavTeIZhnbtxdbXn/UUpgqwX0HYx3MUuGCZtT4jRnrzpLq5/+00j gzowpCGGKre0gLKT90kbdFODjOkZtWcvjykDZO5Q0LE1PpOoxfyu9gvCVO2Lm08d2Byd kN3a5dusjyiIcC1J5wnbXoCjpLYTvTWMDCJsqfN2B45lzdQTJgPJbo/DJsalMNLOtwJa 9lpdeQQr+JbX6ReVOL5cAJWYgl9XMT8x1booehuvN0NxgLefubs4QI0SpSvj6ZMBlNbn QFvw== 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=ANyVsngf65a+eFmtwb0iMJHr0EeOJEcLYKSjm4qNpxI=; b=kZF5xlBcdEsLZRNaUFToKf/Yb2PGlAmnRBh+4Iq8W8On2cLClXlR266LVnK+9uLlmq WmzJVuw3D+RXgUslgT+7O9vWM0gFhX42/k2gaQzUuahC/DOFUGGMsvb9sveZdPCcJ8Kv rfO6/Db9vAR2qJqRX8KeKG5woSdTjhntKLLlTvmWcykax4qTo7dKz1VL977w1WJHKsVD 1erG+/TVo1ZixMGcMCqnpmK+eRz4bP+U2pnJCNP8TypFPcIN9sPwN5MfJwHv7HSaarwr IsukmFpqcaSN/1U5Wta5FF0sYx89irXE2guoymMVBSLxI5x2rdAXItDNqpJLdK+6wbpY Ls4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NJMk55P+; 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 j18-20020a05640211d200b0046c455300edsi1925936edw.292.2022.12.06.01.43.33; Tue, 06 Dec 2022 01:43:52 -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=@linaro.org header.s=google header.b=NJMk55P+; 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 S232543AbiLFIjS (ORCPT + 79 others); Tue, 6 Dec 2022 03:39:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234122AbiLFIiq (ORCPT ); Tue, 6 Dec 2022 03:38:46 -0500 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C2C172655 for ; Tue, 6 Dec 2022 00:38:44 -0800 (PST) Received: by mail-lf1-x12f.google.com with SMTP id x28so5212763lfn.6 for ; Tue, 06 Dec 2022 00:38:44 -0800 (PST) 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:subject:date:message-id:reply-to; bh=ANyVsngf65a+eFmtwb0iMJHr0EeOJEcLYKSjm4qNpxI=; b=NJMk55P+sC/tqvVTE5YgKq8nQusWlrdEnAyJYx0CsOvhX9rLKLkm4pnwSIvQk6SAZm ONCSQRQ1JXQIeAKiPGbM848T1ZIW2d7l+/tP6GaB06wKMQ1zq7TJupMR4/QJbvZ5AYzA KApImDchL4woQ6iEfLs7s0HrjmzKegSkNkD2M+/HxZDyfrsw9Jx1zbwGJH/Kk9Uly+lq zNtBHZXfMM1sNaFXNCHVqjnEJoph6+nUF/9/bZ9T+GjzR2z+j2IPdhMflij5zxKIwQwL FHdA+RgpZ0/9YNbYpGoZ2PzHSdM6qC735HYmAsZ2Ow4Ex7LA2iZ7foVSmULQ6AB52RdM W3Tg== 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:subject:date:message-id:reply-to; bh=ANyVsngf65a+eFmtwb0iMJHr0EeOJEcLYKSjm4qNpxI=; b=QVs/HvF6g2o+3dW6GOg0pOPSnOf0k92499UL0C/XPibaS5t05CFisZyA9/X2KbL9fe /0IvjQDql3hxNP2nBhHO4yOXom4Y/AtmxRpiTRq6QwfRq0GYQzoltruW6filesDvY2Wy z4RTg77M7slQnhPnyTL8ECZ++qqxeA8ySo7FHKkY0UddrmpHuu3bLwUMDi+WzHkW7sP1 xqerKcVH7J5lfcJzuucon/rXuezxB9BRvvemf4Tbr7rygoqEurf2uAz1Fx/lVVorEtsR +pD8iKh12SeGb8sq5DrWZGg8FgvuJ+RQyU9qiyHpKXTKWIfFrRpCgO1xKRhPe96HvvWS rWfA== X-Gm-Message-State: ANoB5pn2jbQ5Dc9aGUgjf4JG9PKy0F3reisUibnKIffOa6n+9nQfbsEx f48/1A+OL1zXMrh24snz7t/lvg== X-Received: by 2002:a05:6512:445:b0:4b5:8d2c:fc36 with SMTP id y5-20020a056512044500b004b58d2cfc36mr31490lfk.505.1670315922955; Tue, 06 Dec 2022 00:38:42 -0800 (PST) Received: from [192.168.0.20] (088156142067.dynamic-2-waw-k-3-2-0.vectranet.pl. [88.156.142.67]) by smtp.gmail.com with ESMTPSA id bi20-20020a05651c231400b002773ac59697sm1599383ljb.0.2022.12.06.00.38.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 06 Dec 2022 00:38:42 -0800 (PST) Message-ID: <2597b9e5-7c61-e91c-741c-3fe18247e27c@linaro.org> Date: Tue, 6 Dec 2022 09:38:41 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 Subject: Re: [PATCH net-next v1 3/4] dt-bindings: net: phy: add MaxLinear GPY2xx bindings Content-Language: en-US To: Michael Walle , Rob Herring Cc: Xu Liang , Andrew Lunn , Heiner Kallweit , Russell King , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Krzysztof Kozlowski , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org References: <20221202151204.3318592-1-michael@walle.cc> <20221202151204.3318592-4-michael@walle.cc> <20221205212924.GA2638223-robh@kernel.org> <99d4f476d4e0ce5945fa7e1823d9824a@walle.cc> <9c0506a6f654f72ea62fed864c1b2a26@walle.cc> From: Krzysztof Kozlowski In-Reply-To: <9c0506a6f654f72ea62fed864c1b2a26@walle.cc> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.4 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 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 06/12/2022 09:29, Michael Walle wrote: > Am 2022-12-05 22:53, schrieb Michael Walle: >> Am 2022-12-05 22:29, schrieb Rob Herring: >>> On Fri, Dec 02, 2022 at 04:12:03PM +0100, Michael Walle wrote: >>>> Add the device tree bindings for the MaxLinear GPY2xx PHYs. >>>> >>>> Signed-off-by: Michael Walle >>>> --- >>>> >>>> Is the filename ok? I was unsure because that flag is only for the >>>> GPY215 >>>> for now. But it might also apply to others. Also there is no >>>> compatible >>>> string, so.. >>>> >>>> .../bindings/net/maxlinear,gpy2xx.yaml | 47 >>>> +++++++++++++++++++ >>>> 1 file changed, 47 insertions(+) >>>> create mode 100644 >>>> Documentation/devicetree/bindings/net/maxlinear,gpy2xx.yaml >>>> >>>> diff --git >>>> a/Documentation/devicetree/bindings/net/maxlinear,gpy2xx.yaml >>>> b/Documentation/devicetree/bindings/net/maxlinear,gpy2xx.yaml >>>> new file mode 100644 >>>> index 000000000000..d71fa9de2b64 >>>> --- /dev/null >>>> +++ b/Documentation/devicetree/bindings/net/maxlinear,gpy2xx.yaml >>>> @@ -0,0 +1,47 @@ >>>> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause >>>> +%YAML 1.2 >>>> +--- >>>> +$id: http://devicetree.org/schemas/net/maxlinear,gpy2xx.yaml# >>>> +$schema: http://devicetree.org/meta-schemas/core.yaml# >>>> + >>>> +title: MaxLinear GPY2xx PHY >>>> + >>>> +maintainers: >>>> + - Andrew Lunn >>>> + - Michael Walle >>>> + >>>> +allOf: >>>> + - $ref: ethernet-phy.yaml# >>>> + >>>> +properties: >>>> + maxlinear,use-broken-interrupts: >>>> + description: | >>>> + Interrupts are broken on some GPY2xx PHYs in that they keep >>>> the >>>> + interrupt line asserted even after the interrupt status >>>> register is >>>> + cleared. Thus it is blocking the interrupt line which is >>>> usually bad >>>> + for shared lines. By default interrupts are disabled for this >>>> PHY and >>>> + polling mode is used. If one can live with the consequences, >>>> this >>>> + property can be used to enable interrupt handling. >>> >>> Just omit the interrupt property if you don't want interrupts and add >>> it >>> if you do. >> >> How does that work together with "the device tree describes >> the hardware and not the configuration". The interrupt line >> is there, its just broken sometimes and thus it's disabled >> by default for these PHY revisions/firmwares. With this >> flag the user can say, "hey on this hardware it is not >> relevant because we don't have shared interrupts or because >> I know what I'm doing". Yeah, that's a good question. In your case broken interrupts could be understood the same as "not connected", so property not present. When things are broken, you do not describe them fully in DTS for the completeness of hardware description, right? > > Specifically you can't do the following: Have the same device > tree and still being able to use it with a future PHY firmware > update/revision. Because according to your suggestion, this > won't have the interrupt property set. With this flag you can > have the following cases: > (1) the interrupt information is there and can be used in the > future by non-broken PHY revisions, > (2) broken PHYs will ignore the interrupt line > (3) except the system designer opts-in with this flag (because > maybe this is the only PHY on the interrupt line etc). I am not sure if I understand the case. You want to have a DTS with interrupts and "maxlinear,use-broken-interrupts", where the latter will be ignored by some future firmware? Isn't then the property not really correct? Broken for one firmware on the same device, working for other firmware on the same device? I would assume that in such cases you (or bootloader or overlay) should patch the DTS... Best regards, Krzysztof