From patchwork Sun Jan 21 12:40:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ziyang Huang X-Patchwork-Id: 13524556 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01olkn2095.outbound.protection.outlook.com [40.92.107.95]) (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 EE9DE364A9; Sun, 21 Jan 2024 12:41:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.92.107.95 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705840906; cv=fail; b=C+IyHUqEymcYtFji2OYqpAvh3WH6V402gt0lyIkqgLFdxkevKNlyJH4ylho3xDxP3fvpK+16heZQIemcbEaFpmOzDBDgxWflU3++Y9RUBHoaybJqkJQvwD0VEtLKnsUF67kGq3owH1GCQZUnRgFg8OLn6UnDRht4mV3zYEyZ4TY= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705840906; c=relaxed/simple; bh=GMJLZFym36h9jqm99/2yM7zrW5FLKAZCLY1KHQDEYHM=; h=From:To:Cc:Subject:Date:Message-ID:Content-Type:MIME-Version; b=S/A+x2qYc5vp4aGjEc16jdQO2UraZ4WwdXdMq9nPkn2lUz0HOuktOAgUmsIhamSNcB2IR0nlQA5t15w6X+ToytzHHz+NCtxvd+MkhS2er3dzDmQmtMwQOhbx9YPe2Gf1Fjh8PxvWBC/m9JwO08d/OzVc1RI4maaAAVjNpeDmkEQ= 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=Yt6tDlHv; arc=fail smtp.client-ip=40.92.107.95 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=outlook.com header.i=@outlook.com header.b="Yt6tDlHv" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=alnx7Nv66GqduNj04ccav/kWiWYcOXIhyUcQdyv+shqf4dfFiB0bSXI3gPSO0xnIj1X6OxTRzWb/sASzzdN9FYAMPW3IQrjXniF3xUGdRjV0SHtsO6PZb2avciTEt+xC6BkKU2ykWTMSjHwGRz6fF+gbgM25yALyX9QORFwwZ3juf0aNVEYO3SfPNx2VBxJAis1KxkXEDsD4b3Ra0HgUaRA1Omkz8vgMBN53ynrO+ezKQvoPRTwkw9nQQv2OMFM497JSdQHRJcV3furu+65LN4tCsJRl2RVf/4j7nQVFlLQ5Sga66Qq2AVaFSdLYhVpISOtlC0i42WETv5Zy1Cv5Pg== 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=rKndGcaFr+VI64e8Vu/mjV/lynKbFFTYkXoRG1OAVK4=; b=KIAEHkmAlANsfn4ZCm3quq+tRSF8qjMX1bwb2Aaj8c1ngDDBJ7Pgn2hDzts0DG50KdebS1LV4ScOn/nyAgvvQrlzIucPj3NOsArAMoz+4qtavoEHE9b6hEq4NM3TqrmgRzrnmSbeJb6fE3jJ04ju/AV+jnGhoqbTy0D1ScjWOPxZpFWxDw4ceaFrUW199HsTvk03a6F1aXpCwTEW7NWrV3tRcqyk0ic4coAIIF1LudLsAUpkGIiRuObpa2XmKt+fHXTJnoGFLciBNRODIH9gPdkOCYWkVN5bmH4q+XSKsXAb7TuzDLVov05yYbnLbZp0oZusZB2hP6m0GJFQwisJHA== 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=rKndGcaFr+VI64e8Vu/mjV/lynKbFFTYkXoRG1OAVK4=; b=Yt6tDlHvb84ZJGL1HPx2Xu1tj40lgCkhwYfVyAdpPbxrFg10RGO7Upg2slibgjd9IlRAZyLRwRv1Ysk4zuc2YxWpJa5eAFq2PW86pIZ1YZDTCJa85bFZvLqVm/LaZ6UagBkfPmpGS0deiLX6oL77+1PZkTMzvxcsHG2J73jgWxSWk9btL9eULTQqXxSOi4ZdZyn5auXc3RMlXWYSCR07OupYShqrzCKaa0RNSI7ZxTMbemtq3QpCXEK8ScqsDd8DukmjER42n5fJH4eQuInJryaXyHOB3E/iEn8gxKoOTRtYrJrEiYGfO7H1Lh2zb5mDMVcrDDqH/ftjJZAEdD+IzA== Received: from TYZPR01MB5556.apcprd01.prod.exchangelabs.com (2603:1096:400:363::9) by OSQPR01MB6119.apcprd01.prod.exchangelabs.com (2603:1096:604:27b::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.30; Sun, 21 Jan 2024 12:41:41 +0000 Received: from TYZPR01MB5556.apcprd01.prod.exchangelabs.com ([fe80::bcb7:50f4:7a16:4ec0]) by TYZPR01MB5556.apcprd01.prod.exchangelabs.com ([fe80::bcb7:50f4:7a16:4ec0%7]) with mapi id 15.20.7181.019; Sun, 21 Jan 2024 12:41:41 +0000 From: Ziyang Huang To: mcoquelin.stm32@gmail.com Cc: alexandre.torgue@foss.st.com, richardcochran@gmail.com, p.zabel@pengutronix.de, matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, linux-mediatek@lists.infradead.org, Ziyang Huang Subject: [PATCH 0/8] ipq5018: enable ethernet support Date: Sun, 21 Jan 2024 20:40:39 +0800 Message-ID: X-Mailer: git-send-email 2.40.1 X-TMN: [ert9Mh57VppqbQ2FUxLhaMiZ3rYoe/qMQBXWesUVLUI+xdghwV9kEw==] X-ClientProxiedBy: PH8PR15CA0023.namprd15.prod.outlook.com (2603:10b6:510:2d2::22) To TYZPR01MB5556.apcprd01.prod.exchangelabs.com (2603:1096:400:363::9) X-Microsoft-Original-Message-ID: <20240121124039.3328587-1-hzyitc@outlook.com> Precedence: bulk X-Mailing-List: netdev@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: TYZPR01MB5556:EE_|OSQPR01MB6119:EE_ X-MS-Office365-Filtering-Correlation-Id: 085daddb-4539-429f-0f58-08dc1a7e50c5 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kSfuwsfaLKSVFzAGt7VVfRCVyh5JN2bSPQGKTX67Ch5P/r5g7zXCdgOxDkBPE1iCuqg48/VBdYM2ksBukBxXDnxKGFX+yb2BlYE7UrWCUqd4nKuq0NseqlNxbbpixMA30TbOaN33zQ3TpReUW2qmRNzBDCU/gkDAi/8/dN5TR+deUsl/D2Ri7OJ3KY5VN5KA8qhz8g3jeXbYqW8etWjbJq9ZGe/ehuhZrReYWh6Gib+Od6XdisdJ6yp+WGOlBVaZQZku2beFqWHp8dYhB3k5acjjAiBRu9gyDSOl1bHDzbvV9C5fF8LMhLUp7F59feMHvwYGAPPPAG8fUi7LCayKGpyPxVXhgR6dh7HeYMiZwPapRG2SPzPNVwla7S2Lfcym29uXlzdKIjkDxBuPriSFEmp3lhgme5qcwnO2/xunoKrdwmY5sQBIYeYD4WSxS2Ka6uAuM44CvCy4pIj04eW/p2i2dIZBrpf704c9WJwzZkC2U4W1fjW6rAnsYOxhvSwUzcJW+IMjFy4Xprp7twcQMo1zkuOrzr/tmswXe0N4dNys7PbxwGeiIol0JCf/yQVPiJuj4+bSAExGICSlOkOV1Uf6A8vQMfrYvZW24lHQVr+3BQSpRAQsE61nObyc58W/ X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?hDzKI3bJ9QNMTXBwv0Oid5Y3wSeT?= =?utf-8?q?bNxh5ox7DW4AF19Te074yqo3P/Cbi7xpnJhycarUhKz0OIayZkiV6mVBlwQ4Iw5PS?= =?utf-8?q?rWtEUgqeyVPok4PCsHWwD+CYnYxVRNWe61xpzGQ1vvAX4ptGvN9dmIrq2TvF8kloj?= =?utf-8?q?o4JMwi/eroFFTB4tqNCGBbxHUeowCIDSG628CyBGPwGyxzuFRGSldJUsXGk+nyZm5?= =?utf-8?q?brutsGIzOxcSfChSKfvlBMH737yXv10VpbmolyP+ytK/NX5d57G8UkxfdC/udCoMi?= =?utf-8?q?EcW+3FNewxtoq4vCHCVl+1t6dOk72y5ieP4J9boE1oHeAK1Ay4jjm9H/nWnUgbEs+?= =?utf-8?q?5lrhvtfG8KdgcsQGlvzyHgEdIhjjkdqIcNQUY6GSLMKww36/FmaBe+IWplGjpkKnM?= =?utf-8?q?szB9i0p6+ajFDqAEcHO5LgDDril+rsZXV36UXhb4WRWL791+eM4y9LWTvYBshhC7b?= =?utf-8?q?skcJ7ohvMBLv6Km08WMTt2jDPIT7TK+XRNmwU71pggbpoF+nCviSJWoN8t2hee4Uh?= =?utf-8?q?uvbH+7a3SadFKABp+sa/flD0pLrw02lvFwqOa6K2pYYD3irmvQtwxlQHxVGfupjMm?= =?utf-8?q?TLlsjOzx4rJ8HGR7n9ePuar/chgC1+xOvVV2uSVip8zC0QKrwHR9V7o+PRtAv3flb?= =?utf-8?q?JIGYG+LlMgVC8aBanQmse1vAXZHBjTZr6sKCQUbHnwR/21LoR68yLzA2uEd6d5hoq?= =?utf-8?q?YkWqfC6JVcWkvT8j4ulGFxLhFlTnsnIGyOnESMhiwu3gPljHt5+OnmjMhxB1P9XpX?= =?utf-8?q?BLBHCMC8/FcKTffwS+Lr0HceFMHWc2FpKn3nWMJpGVBNWZtD/gKrahViwdxJCkgSQ?= =?utf-8?q?YJuhZWV0rZ2gWKYY0ngQ+MHr/hYgMLhPEEFXvDtLZnyCtPlrZL++8qEAGem5RUzYZ?= =?utf-8?q?JYApeMp7iCJOpY7qrPwL1qAKxKHG9A0pr8IFTDoDyvykzig8cseavoBY7OO6l1rwc?= =?utf-8?q?Vt3SvSfwRZ+EbLmWvSHIlIyfUW3lhtQBQRKpYbnv0p0aYSgzoP0CIeEJ2xepowjVG?= =?utf-8?q?vl6fvOtnE0V25u76SdAJqTkQabQhY8zPoi40njmfPwWSV/R8lqSFo+kEA7rsSHpPD?= =?utf-8?q?ExU0hlFSGIY3ZsDSYqF1ZxkpOJx3Ldet8V+OCSYVTxlGADs6WjJffBFqz4Halqljr?= =?utf-8?q?IK20lJxT79iRC960lzoeHM/y8bdZVjZr6aSmL8BUPZ1yWcN8kiIMIWiO06qY5gFXw?= =?utf-8?q?KLDwSMFBF6Mm+fiKQ?= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 085daddb-4539-429f-0f58-08dc1a7e50c5 X-MS-Exchange-CrossTenant-AuthSource: TYZPR01MB5556.apcprd01.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jan 2024 12:41:40.7119 (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: OSQPR01MB6119 Enable ethernet support for IPQ5018. Praveenkumar I (1): clk: qcom: support for duplicate freq in RCG2 freq table Ziyang Huang (7): net: phy: Introduce Qualcomm IPQ5018 internal PHY driver phy: Introduce Qualcomm ethernet uniphy driver net: stmmac: Introduce Qualcomm IPQ50xx DWMAC driver clk: qcom: gcc-ipq5018: correct gcc_gmac0_sys_clk reg net: mdio: ipq4019: support reset control arm64: dts: qcom: ipq5018: enable ethernet support arm64: dts: qcom: ipq5018-rdp432-c2: enable ethernet support .../arm64/boot/dts/qcom/ipq5018-rdp432-c2.dts | 52 ++ arch/arm64/boot/dts/qcom/ipq5018.dtsi | 120 ++++- drivers/clk/qcom/clk-rcg2.c | 86 ++- drivers/clk/qcom/gcc-ipq5018.c | 2 +- drivers/net/ethernet/stmicro/stmmac/Kconfig | 7 + drivers/net/ethernet/stmicro/stmmac/Makefile | 1 + .../ethernet/stmicro/stmmac/dwmac-ipq50xx.c | 155 ++++++ drivers/net/mdio/mdio-ipq4019.c | 10 + drivers/net/phy/Kconfig | + drivers/net/phy/Makefile | 1 + drivers/net/phy/ipq5018-internal.c | 125 +++++ drivers/phy/qualcomm/Kconfig | 7 + drivers/phy/qualcomm/Makefile | 2 + drivers/phy/qualcomm/phy-qcom-eth-uniphy.c | 494 ++++++++++++++++++ include/dt-bindings/phy/qcom-eth-uniphy.h | 15 + 15 files changed, 1057 insertions(+), 25 deletions(-) create mode 100644 drivers/net/ethernet/stmicro/stmmac/dwmac-ipq50xx.c create mode 100644 drivers/net/phy/ipq5018-internal.c create mode 100644 drivers/phy/qualcomm/phy-qcom-eth-uniphy.c create mode 100644 include/dt-bindings/phy/qcom-eth-uniphy.h