Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp10111802rwl; Wed, 11 Jan 2023 14:49:32 -0800 (PST) X-Google-Smtp-Source: AMrXdXtO/8TC7wwySUXBuroi+kDPJnKDlnMHD/kUaSCOOqx50R4KR8rYXSZpbhB9xYYEVZ14OoMF X-Received: by 2002:a17:907:8748:b0:7c1:ad6:7331 with SMTP id qo8-20020a170907874800b007c10ad67331mr71001748ejc.27.1673477372020; Wed, 11 Jan 2023 14:49:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673477372; cv=none; d=google.com; s=arc-20160816; b=HMmRoaeigSXCEHskPPdWts7Rb84SnrGQxd3jC9Z5K74DoftTHTyTUvXTcfDGyP6QCH oHwNTNMRi0OLP3CPVKSzPsb5LbKD883Gi1maEoKZrk3yUEt7UnjiqXCXU4Z+wsWZ+PHK 9ngsvv3B0Iqdi8im1AelfEsIMdYHhwi4eGf/C6bU1+Ke86PClOA/f5Mg5CH1C7bPcgUV N1xXG7j4H1abysjF92jB/xC2I1mBS/PFLhXqG7rZ3jyxjA4eQbW99l/7EHDRJqvagRUL R6khRk/jcahh4AB8a1QA9/v1cjH13lMyQrU2IdltEE2BMWrmWyvbAwlZmdxzjTz/fyan kDSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:message-id:user-agent :references:in-reply-to:subject:cc:to:from:date:mime-version :dkim-signature; bh=AL3D6fuBAPLwBqIn3nADqpL5RfYmlL7iAJcDIl8hybk=; b=CgBUZQTAmAwWW7EkWn4whwUZ6wQ20aY5YE3wk1kI6trkSNYpa1sSnh/8Ee6m7FH/9W yIaILtBXeEljWSoJUY8rEkifP86uh9BedSJ+Xpbg2iqfTUEfQd8Ucf5S13IyeXkn7M+a 0/1a2ef+9d9Kh9qrYTfgKZfeuTd+K21Y6w0kG/GhLJfkydQcmQfaTA/E0Xwimu86U94t xHgeZVuzNQogdmr3MSN7PmnC6T1h2DpFIYCSYWbtb2yZ7B44UGOiwFnjnpfeaffhC8J/ 1j17k5OfeNt3UMgRtLA/WVdLfPott7Aw5tIw3NTX74x9iWWrGOWg85hMehDCDvuNXiQ4 6TOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2022082101 header.b=UnslZtSR; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=walle.cc Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gb24-20020a170907961800b0084d3d86379fsi11786973ejc.366.2023.01.11.14.49.19; Wed, 11 Jan 2023 14:49:31 -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=@walle.cc header.s=mail2022082101 header.b=UnslZtSR; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=walle.cc Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235248AbjAKWa4 (ORCPT + 52 others); Wed, 11 Jan 2023 17:30:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40152 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233181AbjAKWay (ORCPT ); Wed, 11 Jan 2023 17:30:54 -0500 Received: from mail.3ffe.de (0001.3ffe.de [159.69.201.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B991C76; Wed, 11 Jan 2023 14:30:52 -0800 (PST) Received: from 3ffe.de (0001.3ffe.de [IPv6:2a01:4f8:c0c:9d57::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.3ffe.de (Postfix) with ESMTPSA id 06414166C; Wed, 11 Jan 2023 23:30:50 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2022082101; t=1673476250; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AL3D6fuBAPLwBqIn3nADqpL5RfYmlL7iAJcDIl8hybk=; b=UnslZtSR/5gXE7MrC0DSsUaff5dWD5BJ6Cdmi9jtr0d2z1ACC0wJbXBi5roXDUeAXEVeLv 8XWxCUZ0B+t5QrPPJkkvLdiJaGCynENs94/8if6RIrj2TdmNJIBLpPjB8YeZJRqOImMd2v N7dbAt3aY1lD7IXV3adWN+iIO+8zmrnf2O95x5aP55ott4l7vfkD/1ZY+/MsXgnUttaI8M ZS0AEDXXmFl4fmuHq0rAr0anb5gOnErC9GAjjXZH993opNbne1owcEvJDWhy0+LOPUXIe4 7Fc67tocND1rpACUoh+mlNxhEU7W68tgQi0M/GMgX2TXs9TN/PiM/w0KITlRNA== MIME-Version: 1.0 Date: Wed, 11 Jan 2023 23:30:49 +0100 From: Michael Walle To: Rob Herring Cc: "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Krzysztof Kozlowski , Xu Liang , Andrew Lunn , Heiner Kallweit , Russell King , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next v3 2/4] dt-bindings: net: phy: add MaxLinear GPY2xx bindings In-Reply-To: <20230111202639.GA1236027-robh@kernel.org> References: <20230109123013.3094144-1-michael@walle.cc> <20230109123013.3094144-3-michael@walle.cc> <20230111202639.GA1236027-robh@kernel.org> User-Agent: Roundcube Webmail/1.4.13 Message-ID: <73f8aad30e0d5c3badbd62030e545ef6@walle.cc> X-Sender: michael@walle.cc Content-Type: text/plain; charset=US-ASCII; format=flowed 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,SPF_HELO_NONE,SPF_PASS 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 Am 2023-01-11 21:26, schrieb Rob Herring: > On Mon, Jan 09, 2023 at 01:30:11PM +0100, Michael Walle wrote: >> Add the device tree bindings for the MaxLinear GPY2xx PHYs, which >> essentially adds just one flag: maxlinear,use-broken-interrupts. >> >> One might argue, that if interrupts are broken, just don't use >> the interrupt property in the first place. But it needs to be more >> nuanced. First, this interrupt line is also used to wake up systems by >> WoL, which has nothing to do with the (broken) PHY interrupt handling. > > I don't understand how this is useful. If the interrupt line is > asserted > after the 1st interrupt, how is it ever deasserted later on to be > useful. Nobody said, that the interrupt line will stay asserted. The broken behavior is that of the PHY doesn't respond *immediately* with a deassertion of the interrupt line after the its internal status register is cleared. Instead there is a random delay of up to 2ms. There is already a workaround to avoid an interrupt storm by delaying the ISR until the line is actually cleared. *But* if this line is a shared one. The line is blocked by these 2ms and important interrupts (like PTP timestaming) of other devices on this line will get delayed. Therefore, the only viabale option is to disable the interrupts handling in the broken PHY altogether. I.e. the line will never be asserted by the broken PHY. > In any case, you could use 'wakeup-source' if that's the functionality > you need. Then just ignore the interrupt if 'wakeup-source' is not > present. Right, that would work for the first case. But not if someone really wants to use interrupts with the PHY, which is still a valid scenario if it has a dedicated interrupt line. >> Second and more importantly, there are devicetrees which have this >> property set. Thus, within the driver we have to switch off interrupt >> handling by default as a workaround. But OTOH, a systems designer who >> knows the hardware and knows there are no shared interrupts for >> example, >> can use this new property as a hint to the driver that it can enable >> the >> interrupt nonetheless. > > Pretty sure I said this already, but this schema has no effect. Add an > extra property to the example and see. No error despite your > 'unevaluatedProperties: false'. Or drop 'interrupts-extended' and no > dependency error... I know, I noticed this the first time I tested the schema. But then I've looked at all the other PHY binding and not one has a compatible. I presume if there is a compatible, the devicetrees also need a compatible. So basically, "required: compatible" in the schema, right? But that is where the PHY maintainers don't agree. > You won't get errors as there's no defined way to decide when to apply > this because it is based on node name or compatible unless you do a > custom select, but I don't see what you would key off of here... Actually, in the previous version I've asked why the custom select of ethernet-phy.yaml doesn't get applied here, when there is a "allOf: $ref ethernet-phy.yaml". -michael > The real answer here is add a compatible. But I'm tired of pointing > this > out to the networking maintainers every damn time. Ethernet PHYs are > not > special. > > Rob