Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp610232rwl; Wed, 5 Apr 2023 05:31:31 -0700 (PDT) X-Google-Smtp-Source: AKy350a2tZ4XQaa5AQenci2qBmziGCI/s51sZuOazFGxBxkLJyDgGIhtmhQJwC6G0do/JVQTXtXy X-Received: by 2002:a17:906:b090:b0:933:12d1:d168 with SMTP id x16-20020a170906b09000b0093312d1d168mr2339612ejy.10.1680697891233; Wed, 05 Apr 2023 05:31:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680697891; cv=none; d=google.com; s=arc-20160816; b=qG/jy/QFyi1EGXqYDlMElQ8rkLTCuZfXsY6tvpMSXR+RKRNd5K+Xiqzb9MrfCuH1P7 OySrXqYT/660K+XUfvWEHu+CQOCedRN78WNo0s02h9rlLggiCtngvEONnliaCcUs5Pow 9XFeXykcfCJz586Hd/3uOivPWh+0Eh7Jl4qEsxJ5y75L3muihjaoF+gLZr9hIZWqR5S3 taA/P0gIGQEBuCMFohy8IbzRcTbXxuWkzJwC6z/6A3vpHvR5KagGiPZ9wOCALZPtlZJM mgdcC5t5Zen05QZxx7Cwj37I8jvX6mMQIqyoq24CcYLyCIBoinUeTr7LgOPsLBa0In6O EiYQ== 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=3+2VGm8z/Tpa/KlruzK7easb5RdQQJ0e4dPOmz+MI9A=; b=MT5/+6b3JrKWkevXUwWkS2Dm2afJgu3Qp3tjF2CMm/3GF/0CIB6eCbJxQH3200SX5k ngS12L14hB5kBZVnKNjZuqNEHa/fbAlUD1yF25dewo7EO0ONfWxldbqUIyPwfqjT8IWm 0EZtZA6b45i0r5DaZ8ZEWf5OiQDepyPL5jCK5mYGWvf0oFMPZ/Hoq4ljRjZt/ENLs8+1 MPvPx5tlpK+hjzZMvLt1fut0FXbO1UaGwXnRdrvzc04PKaEX9KncBl1c8/upbmEVxwtp fPeyIJK1NukJq3U0eHQybfl6QnHw08oSPqeIYPNGux5ttdferk1yU1UvcghIIpqqW+ct /5oQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=HNLeRFaF; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m1-20020a170906848100b0093581443200si6797956ejx.461.2023.04.05.05.31.00; Wed, 05 Apr 2023 05:31: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=@gmail.com header.s=20210112 header.b=HNLeRFaF; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237443AbjDEMaZ (ORCPT + 99 others); Wed, 5 Apr 2023 08:30:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230012AbjDEMaY (ORCPT ); Wed, 5 Apr 2023 08:30:24 -0400 Received: from mail-qt1-x82a.google.com (mail-qt1-x82a.google.com [IPv6:2607:f8b0:4864:20::82a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 99A571BE9; Wed, 5 Apr 2023 05:30:23 -0700 (PDT) Received: by mail-qt1-x82a.google.com with SMTP id cr18so30969373qtb.0; Wed, 05 Apr 2023 05:30:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680697822; x=1683289822; 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=3+2VGm8z/Tpa/KlruzK7easb5RdQQJ0e4dPOmz+MI9A=; b=HNLeRFaFdyCpoL4pVKJlJ+XTD47YzLkenQdxXKF0hRvkIX46JNGH6YU/SWOh28LFRz wFbWwBwH5k8lvVpPTM66lgX2jXxbff1q00KtUv5biTTme2BYoq8200ak2qfJo0ChFBOY KZKl1Q8BB5PhNJHlH0+OAtn6AJSJSZ5alWM2dpCrK71r6aMujObAbizJQDV7X9rFR//q tph3oz1U118uxSE9liBM0+XQ27puGgiss/+OF8TqReP0V4iUMqHxn4j5xwD4EoIyktcY +52YHa8Q2iFfFmSK3dOOhiQioJpOZqf1QbcvUwNaigHVk6obKlYMOw29Nm34b6rZz8w9 Izuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680697822; x=1683289822; 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=3+2VGm8z/Tpa/KlruzK7easb5RdQQJ0e4dPOmz+MI9A=; b=TMKxUEI0Na+vSKqebB1XjbrYjG0rOufVwjFM6EqGgAOWwQZ1ZsJPcP7GL7YfhZ+Xit owjrMq8hxQ1JyynRMvyw5iE0A2r77o3Eo94lcCUX2BmoSe7iXl9Btim1P/1pdczKHmh3 QVsHFmwlt8tleIQHnhtADfj/iAXC2fGeixda/NNIsDmtGTnf3hvJAxokuB5D29oavAmu R50Go755POkUZLiunPi8pdiyg4DJr2ZeWIMTfVZAMppVPZqYSC0uIgv1eO2bC3SUUIPQ EAwmGUMG75M4QFpde5KtV4QLNK06IlK65UUicvDpEK/FhbPMEa3B3FrU3emCun94S2A/ jEUA== X-Gm-Message-State: AAQBX9cUEvh+cOnvA035gB7NuwQrMQhkjChBfMT/nJ994v00OfCWhTKb yBKd8tqZ2bye0Y0icA0lT10= X-Received: by 2002:ac8:5a4e:0:b0:3d9:b59f:1ba9 with SMTP id o14-20020ac85a4e000000b003d9b59f1ba9mr4605799qta.12.1680697822394; Wed, 05 Apr 2023 05:30:22 -0700 (PDT) Received: from [192.168.1.105] (ip72-194-116-95.oc.oc.cox.net. [72.194.116.95]) by smtp.gmail.com with ESMTPSA id c195-20020ae9edcc000000b007484d284cdasm4424593qkg.93.2023.04.05.05.30.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 05 Apr 2023 05:30:15 -0700 (PDT) Message-ID: <956792db-c6a4-f16f-e7e4-b9d08c12f986@gmail.com> Date: Wed, 5 Apr 2023 05:30:09 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Subject: Re: [PATCH 05/12] net: phy: add phy_id_broken support Content-Language: en-US To: Andrew Lunn , Marco Felsch Cc: Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Florian Fainelli , Broadcom internal kernel review list , Richard Cochran , Radu Pirea , Shyam Sundar S K , Yisen Zhuang , Salil Mehta , Jassi Brar , Ilias Apalodimas , Iyappan Subramanian , Keyur Chudgar , Quan Nguyen , "Rafael J. Wysocki" , Len Brown , Rob Herring , Frank Rowand , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, devicetree@vger.kernel.org, kernel@pengutronix.de References: <20230405-net-next-topic-net-phy-reset-v1-0-7e5329f08002@pengutronix.de> <20230405-net-next-topic-net-phy-reset-v1-5-7e5329f08002@pengutronix.de> <6461467c-8f9d-41b6-b060-08190126e81f@lunn.ch> From: Florian Fainelli In-Reply-To: <6461467c-8f9d-41b6-b060-08190126e81f@lunn.ch> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,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 4/5/2023 5:27 AM, Andrew Lunn wrote: > On Wed, Apr 05, 2023 at 11:26:56AM +0200, Marco Felsch wrote: >> Some phy's don't report the correct phy-id, e.g. the TJA1102 dual-port >> report 0 for the 2nd port. To fix this a driver needs to supply the >> phyid instead and tell the phy framework to not try to readout the >> phyid. The latter case is done via the new 'phy_id_broken' flag which >> tells the phy framework to skip phyid readout for the corresponding phy. > > In general, we try to avoid work around for broken hardware in the > core. Please try to solve this within nxp-tja11xx.c. Agreed, and one way to solve working around broken PHY identification registers is to provide them through the compatible string via "ethernet-phyAAAA.BBBB". This forces the PHY library not to read from those registers yet instantiate the PHY device and force it to bind to a certain phy_driver. -- Florian