Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp6416836rwr; Mon, 24 Apr 2023 20:24:42 -0700 (PDT) X-Google-Smtp-Source: AKy350a2AFV5fWoLGiJbtK373hxAsao4Ry5t12+Tae0KKN2KwEp+T/67Z8kbjApRdSLeTETbyYMl X-Received: by 2002:a17:90a:e2d1:b0:246:fdad:28ca with SMTP id fr17-20020a17090ae2d100b00246fdad28camr14482348pjb.38.1682393082099; Mon, 24 Apr 2023 20:24:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682393082; cv=none; d=google.com; s=arc-20160816; b=P3ATaM5x/c5fKGdV1SvJsta1sYxXjscD26AWEgZ/0lnSXqHfNH5cR1etqfE+DghEo3 ek0rQlOQDX6wvyJCCQ072BwxXF1LSYQlp0q4TrpWGa63aEtdZFU+L2vlCJRPvqAIRXvm Wh22LIT2N7CeAMVNa6tICJUoGWKsDxDmVRwqhrhmOCUSXwNQ+q7T/f2kQkdGwmQ/elXJ Jhzx2a39/cHfywOrn2nglPxCn3YkdzeUVj0VW0aBOBhUXWOy92c0SEkqUIM1CmM4pEzv xctESQr8qxhBcjmnUDP4QVL1SM+/9h2SLntljCTkZBLJn6/tg88PrxTk0GsVuoc4qJdq pcTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=WEmClTcIG/yj2IJg2sMiouG+QJxouKRVrQEnosw5z4s=; b=uauFe7qP4WNvOiYY7MGomsIuX0+vg4yAZX87YrO7aIRgTj14YmCaQ31tZfEVO/t0+I w3cUovKXpGoJnymw5OAgc3o1EOyXPlIndpbtFNB2rmh6q/qXrFrf7qUYSasQP8f3TYlu 4vAjR1jyyacEJ85h7rJngIFBTZ5VD7vqx5OzQmL9IuRamC+D6kgs76RFT7SrjyV69DRY NFgpmw4IXwiX0PTBzY7uHj9kijLgzjHJ6PA/iwOzwN8XpFiCAlshTgQ3qZHPmkNtDode 0JncYStLmLLSlu5eFtiFlKOB/f5ItbLtQGx5EB2mmh+IIvzAp4WnFiZPGo5et82UwyIG AwRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=lHuHBQgx; 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=lunn.ch Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p13-20020a17090b010d00b002496cedea8esi12627616pjz.24.2023.04.24.20.24.28; Mon, 24 Apr 2023 20:24:42 -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=@lunn.ch header.s=20171124 header.b=lHuHBQgx; 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=lunn.ch Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233224AbjDYDVV (ORCPT + 99 others); Mon, 24 Apr 2023 23:21:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233193AbjDYDVR (ORCPT ); Mon, 24 Apr 2023 23:21:17 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A3F7EAD1F; Mon, 24 Apr 2023 20:20:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=WEmClTcIG/yj2IJg2sMiouG+QJxouKRVrQEnosw5z4s=; b=lHuHBQgxtGQ7hCHiZ49FHe946W 3+YvjIbp/kUPYSW8rNA2w6o/dbTaU1RGzEaFNqq70fbAzHQId0sA2mDQLFbQtHffsphxbRQ0nCeOr OlCMK6hXChNY2gokiMEfK+j5fwQHiYEjY70q5otsrSLxC+bomaXBb2E1X79/c8J+ndg0=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1pr9EJ-00B9Ke-UK; Tue, 25 Apr 2023 05:20:35 +0200 Date: Tue, 25 Apr 2023 05:20:35 +0200 From: Andrew Lunn To: Jakub Kicinski Cc: Daniel Golle , Heiner Kallweit , netdev@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Russell King , "David S. Miller" , Eric Dumazet , Paolo Abeni , Qingfang Deng , SkyLake Huang , Matthias Brugger , AngeloGioacchino Del Regno Subject: Re: [PATCH v2] net: phy: add driver for MediaTek SoC built-in GE PHYs Message-ID: <651ef153-7555-4ae1-a068-cbe5f0da7e34@lunn.ch> References: <20230424183755.3fac65b0@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230424183755.3fac65b0@kernel.org> 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_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 On Mon, Apr 24, 2023 at 06:37:55PM -0700, Jakub Kicinski wrote: > On Sat, 22 Apr 2023 13:36:58 +0100 Daniel Golle wrote: > > Some of MediaTek's Filogic SoCs come with built-in gigabit Ethernet > > PHYs which require calibration data from the SoC's efuse. > > Despite the similar design the driver doesn't share any code with the > > existing mediatek-ge.c, so add support for these PHYs by introducing a > > new driver for only MediaTek's ARM64 SoCs. > > Andrew, Heiner, how do you feel about this driver? It is 95% magic values in magic registers which nobody is every going to understand without the datasheet. Assuming any of it is actually in the data sheet. I really think the firmware in this PHY needs a re-write to avoid exposing all this to the OS. But i don't know if we have that level of NACK. Having said that, there is a nice quote in LWN from Thomas Gleixer about this: https://lwn.net/Articles/928946/ This does seem like a case of 'throw hardware/firmware over the fence and let software folks deal with it.' There is no other PHY like it in Linux. So i would like to reject it, but i then suspect we are punishing the wrong people, Daniel not MediaTek. I would also drop the LED configuration parts. Leave it at reset defaults for the moment. It seems like the generic support for controlling PHY LEDs is making progress and will be merged next cycle. Andrew