Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp1351726rdb; Mon, 19 Feb 2024 12:25:16 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXpuycbOCDL1s8H9a8uajn24YJPy8bQJ9XJ6qD+LmK9J9hNgUwr5fldARvlqIIMGYtqHOe8nV9LjW+o0pHGOM5qW6cyXr+seelcYTiynA== X-Google-Smtp-Source: AGHT+IGnNyoNAcwZpgdpXYl+XARUm/jVQw5NVJ1P6koC61jvWh0dMLd2m3Kva8qjNwHW17OQzrJH X-Received: by 2002:a17:902:bd86:b0:1d9:bf28:8bda with SMTP id q6-20020a170902bd8600b001d9bf288bdamr11794465pls.68.1708374316716; Mon, 19 Feb 2024 12:25:16 -0800 (PST) Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id lm6-20020a170903298600b001dbf2d899c3si2266024plb.67.2024.02.19.12.25.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 12:25:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-71946-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@outlook.com header.s=selector1 header.b=revfb3z5; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-71946-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71946-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=outlook.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 908A52890CD for ; Mon, 19 Feb 2024 20:15:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D4F345337A; Mon, 19 Feb 2024 20:14:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=outlook.com header.i=@outlook.com header.b="revfb3z5" Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01olkn2043.outbound.protection.outlook.com [40.92.52.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EBA7B524C0; Mon, 19 Feb 2024 20:14:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.92.52.43 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708373695; cv=fail; b=owpCWd9pbpg8PjI4p1DSBPGPA1FSGtK465H8/Mp3TRYBjGN7ukl+5ER4ZRIcOsM3qPVoVVUw9qlByOrnvLQq1qfpsEi7ld2Ke75Ta/prNpxOgRCB96YHdu86KG5zfxm5O0eAa03CdAQXJLhNpliSg744xojth3eTGSFsNu+2+Vs= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708373695; c=relaxed/simple; bh=Ii/uElq++1l20Zs+vtHDVPN8ID8xPuNdGfEy1jPWgQA=; h=Message-ID:Date:Subject:To:Cc:References:From:In-Reply-To: Content-Type:MIME-Version; b=ut7oeYtD8jTTP2UtKKJR6I22zA4Kr1e9xOD9r/AwbPeOKTfIpeB58jgMTGjOI2E1fRn9JNl+Gm4NQn0JyldtY0n6YNv/D+ozILRIa841BG8Z/tynTIvcVKAcdp8CbiqhDtTVfybyhEB4drmD4tHb9UuRDynjiXAoET92vTXZbYk= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=outlook.com; spf=pass smtp.mailfrom=outlook.com; dkim=pass (2048-bit key) header.d=outlook.com header.i=@outlook.com header.b=revfb3z5; arc=fail smtp.client-ip=40.92.52.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=outlook.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=outlook.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fGKKj8Ks3HOW0riEbd/qv477DIcDt5l0HOHCUYYexDrR7omgehPSX23E7zZ5WmHuxEoKeksMCR5aIT4NUZg7Ucx/nQKPsDwGusW+U86XlblsOx1LTEtyU67VVTNchG+YytyeB3qc2nTfCokM8HldHTFff2dLvjHbFPWdp0A+RhZQHZY+M3OD3zJaW7mDNe7/HBSBa91256+6ETcYT//2TLikw1PeYK3KWRL4mCwm/7/sNVySgEF8Ee5V5usOiPM8qcRsKyyHP8q5h7lbYEVyTzW2Y7zsn+hMTS8T13mtil1bi+ab/M1mfCWodvOFT3Jba1XwNt0N8Y3TFi/GnxX2BA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Jqf054I8NDFp650Vm0yCKqwF8EdiUoWxStggJGnXltU=; b=U3f79ZL1Fo/0Rbm+O/p9diNv64WVnYrT6lXhEfoji59FVqRSAYYIPIBjEn3slwiovvbs7XGD0ogfpSdCJgzNcjvqK4g1qQ12CC4lU0vvj5jIeEVdOG9CFZ4XxZao7y2a55AXYPKVd3Ewkoq+nWfIdQUdiGOl9ZL9tY2VhVX41Nyw3RuyEcu3VoRvT11L7K350cfkHu8tmPiWS9nhw6K4F3K9dhRDaVhh4DZE0ai1idpJhZccPddlkXUI2MoQ++V0kLOQWutDlCPw4CiZgC3x0FdNUW5lVzW99SyYRLRFnMyP/L7+tPwVOWAoOHXw2AsfwHQv0gdpbhm6tuEKQ5UKgw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Jqf054I8NDFp650Vm0yCKqwF8EdiUoWxStggJGnXltU=; b=revfb3z52MGnd5fsKi5owNOddWqM0faRBfXCySG7Dx0WFOJ4WYuIaqNkWVXYLE7FhIJM+hBVuWtjgGWPd4NL2s13xSg/ZUmyQJXjml5B3PrjMdZ+U66NL3BKajyoO3Jc94TeHdCgy1Bv1MEKVTnrWVZnU8OXOJP5fj/mPGKFJ7p9i9h7AFgIEx6wR51q5oyxREfrJNkl2ZsSLivYVMiYOIG63z1KAO0767xEKSE7foaFV5OewPuvs9t1KshgljZOwClSd9YW0f98MNgux6u5Pf+meN3GS5i/bKM+/aZ+q8vGovpOc/ti5/JjqFPZAu17rDcJ4g4hnUBrXX4+n8ojow== Received: from SEZPR06MB6959.apcprd06.prod.outlook.com (2603:1096:101:1ed::14) by SEZPR06MB5761.apcprd06.prod.outlook.com (2603:1096:101:ad::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7292.38; Mon, 19 Feb 2024 20:14:41 +0000 Received: from SEZPR06MB6959.apcprd06.prod.outlook.com ([fe80::53da:a8a:83cb:b9ad]) by SEZPR06MB6959.apcprd06.prod.outlook.com ([fe80::53da:a8a:83cb:b9ad%4]) with mapi id 15.20.7292.036; Mon, 19 Feb 2024 20:14:41 +0000 Message-ID: Date: Tue, 20 Feb 2024 04:14:36 +0800 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net-next v3 3/6] net: hisilicon: add support for hisi_femac core on Hi3798MV200 Content-Language: en-US To: Andrew Lunn Cc: Yisen Zhuang , Salil Mehta , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiner Kallweit , Russell King , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org References: <20240220-net-v3-0-b68e5b75e765@outlook.com> <20240220-net-v3-3-b68e5b75e765@outlook.com> <29fc21f0-0e46-4d0f-8d4b-c4dbd1689c55@lunn.ch> From: Yang Xiwen In-Reply-To: <29fc21f0-0e46-4d0f-8d4b-c4dbd1689c55@lunn.ch> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-TMN: [q95owkX9adtiriSmXbCKArF60re7INXc7ujYAR7UTkBcOPNY4lsIJYmXIIfTBdioBmYWaP2YLDk=] X-ClientProxiedBy: TYCP301CA0042.JPNP301.PROD.OUTLOOK.COM (2603:1096:400:380::10) To SEZPR06MB6959.apcprd06.prod.outlook.com (2603:1096:101:1ed::14) X-Microsoft-Original-Message-ID: <7590ea00-54a2-4e41-a25c-c15b3b180f72@outlook.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB6959:EE_|SEZPR06MB5761:EE_ X-MS-Office365-Filtering-Correlation-Id: f50fb0d7-7ed0-4bf5-dc80-08dc31876730 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kHcuP3IwTPWhKuATPRAILlwXnAX3WnG+VQOk01GdfCoazP2HKYX5GahRiupqqoREoLYDnRuq7BwG795FYfzPOll+hzPnwoU/1zIBCDQwc7Zuhtm8Y/1a78BAhdO0nQN+CnxV7MZjAoLX5StRNvcwC+x+NmFJfDNyAnMm7yxAhV3+vMul81WN0UMmRo653v987cXYHIKl2cO7ts6CaCPHWvrmibbgNA0PmupoxdRHhWYI9fsUCMRRg8dkhwbhmJYRIKMk3IphzgDiNBmSTW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Od0pwTVp3eHhqZ3p2Wk1O?= =?utf-8?B?U2JpMFhRVGt4WHk3TExaWGhpS0hHbVFJN3Q0OEcvZy8rQldkOXdjSUpNSGpU?= =?utf-8?B?cnFnazJiRmExRE82dHlLMVYvYSs3MTJuZGhlcGVaQktVQUdaWm80VjB2aXkr?= =?utf-8?B?QWpZYkhDeDhyZ3cyS3NVMERUZW82MHY2cUNEYlhqdW1qVEEzRlJ4NDc3Yklj?= =?utf-8?B?Q29yZ05BTGVjbWxyR2pGWis5SnhVZ1NPQSt3Yk5GYWZSQnZCVDZvWHhTQVFK?= =?utf-8?Q?vblmMdJS9GsZf7YWi6RHxIz1XFdIVwAxpqwkeij?= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f50fb0d7-7ed0-4bf5-dc80-08dc31876730 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB6959.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Feb 2024 20:14:40.5708 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEZPR06MB5761 On 2/20/2024 4:03 AM, Andrew Lunn wrote: >> Note it's unable to put the MDIO bus node outside of MAC controller >> (i.e. at the same level in the parent bus node). Because we need to >> control all clocks and resets in FEMAC driver due to the phy reset >> procedure. So the clocks can't be assigned to MDIO bus device, which is >> an essential resource for the MDIO bus to work. > What PHY driver is being used? If there a specific PHY driver for this > hardware? Does it implement soft reset? I'm using generic PHY driver. It implements IEEE C22 standard. So there is a soft reset in BMCR register. > > I'm wondering if you can skip hardware reset of the PHY and only do a > software reset. There must be someone to deassert the hardware reset control signal for the PHY. We can't rely on the boot loader to do that. And here even we choose to skip the hardware reset procedure, the sequence of deasserting the reset signals is also very important. (i.e. first PHY, then MAC and MACIF). Opposite to the normal sequence. (we normally first register MAC driver, and then PHY). And it might be possible that boot loaders screw all the things up and we are forced to do the hardware reset procedure in kernel. > > Andrew -- Regards, Yang Xiwen