From patchwork Mon Mar 25 08:51:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ChunHau Tan X-Patchwork-Id: 13601781 X-Patchwork-Delegate: kuba@kernel.org Received: from CHN02-SH0-obe.outbound.protection.partner.outlook.cn (mail-sh0chn02on2136.outbound.protection.partner.outlook.cn [139.219.146.136]) (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 C162213776B; Mon, 25 Mar 2024 08:51:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=139.219.146.136 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711356723; cv=fail; b=jLA15Crvq8CbJAxKYEjcTy0vELBwoNQ89rpmn49/TxXomNJ9dluRMaCxD/KlA0T0tH3ZUyJ8cyqEupwCmIJKOTRhpYZIhTr3DTm1fZg1IaOetXTnk5v3Ue8Yt8zz7/kjpfc42vXVNo2TZZsTrtNJ7m8PRdd7k+dvX5FjCuikgCE= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711356723; c=relaxed/simple; bh=xfVqAnJnXQhNQY+7/9+xW7boZuOLbLGlQ+2l8hpABsM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=PXvV2fYdjZtBWiB6lvW/JcbdPBNW06FQtU7E4q2BrgSRXCpv1DQ6c/PgcLWAIuq+WLc38oS7gvbl//b+r6RVng94I1brVlJoBsfhieOhOWGzywIC0PhOQN3H/eXVsmyyIGn2h+OVKpEscNSiniBov5h8aqYyEPqodABzZglvuWc= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=starfivetech.com; spf=pass smtp.mailfrom=starfivetech.com; arc=fail smtp.client-ip=139.219.146.136 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=starfivetech.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=starfivetech.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Gv7V+0siv9MmLD8qd4e3ToRkX4s/CgUoPyTR8FN9xbLTpGrj3MmS7m49A3Dda8/gAwJedw2PY6N+IBNIUX3X62SQRwrZbXqE7vjS1CDIhCL9R1J2iH1RfdOIPXW8wpTfABa53JT1y3mMJQ4uj0FxQ6XGaINe9amkWIZ3XfcqhXnQUgNzrhMBiHoYcPve6NeXjk699yQuEqOrZCwUQLxp/Ir7EAxqaCjqeKoAfE0rsbhD624sL2XIpJ3GdjPDHbyQKNPLzrRVJdS4XeRDIcRtT4q/ELuH07x91sV+qTpwYShQPzv6eKAWBk2trSEyBv1TIkwmXlJFakn5+LI/La3VdQ== 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=PRJ7ol/QflDOrJxK3kbJ/VLH32Zx9yhLkXArOZkVLyI=; b=YXlvr7yw3n0G/uetPybW0YOC77ozzB09rR3lYYJAOtgikTb1M0zlE9LmK705T86xfhuKkR9ZdAhtdDirpD5GwsoDwTlSbZfHNXVFu6GpuOue47nQjLe+6pnJJC8jpADx8UI8pd7YeRdfOHrZjLrfg/GHPbscxUg82T8OrCxQHn1hVZvI/LWVUyG319ntybkMLubAl25rHNmJja7aubfZBNxFrfo5G2TNd7VHm/0RGVCPxPsG1ticJt0Ja3Ikde9U2et7loBJLR9uC5ZqIJMlG+R26C29miPmEOwbjkwfejyiYY+l+UwBOpbW0L3dTQR+mggBvxoyL1QAvdD0uxVq1A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=starfivetech.com; dmarc=pass action=none header.from=starfivetech.com; dkim=pass header.d=starfivetech.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=starfivetech.com; Received: from BJSPR01MB0595.CHNPR01.prod.partner.outlook.cn (2406:e500:c211:e::20) by BJSPR01MB0451.CHNPR01.prod.partner.outlook.cn (2406:e500:c211:d::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.31; Mon, 25 Mar 2024 08:51:50 +0000 Received: from BJSPR01MB0595.CHNPR01.prod.partner.outlook.cn ([fe80::d0cf:5e2e:fd40:4aef]) by BJSPR01MB0595.CHNPR01.prod.partner.outlook.cn ([fe80::d0cf:5e2e:fd40:4aef%4]) with mapi id 15.20.7409.028; Mon, 25 Mar 2024 08:51:49 +0000 From: Tan Chun Hau To: "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Emil Renner Berthing , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maxime Coquelin , Alexandre Torgue , Simon Horman , Bartosz Golaszewski , Andrew Halaney , Jisheng Zhang , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Russell King Cc: Ley Foon Tan , Jee Heng Sia , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-riscv@lists.infradead.org Subject: [PATCH v3 1/1] dt-bindings: net: starfive,jh7110-dwmac: Add StarFive JH8100 support Date: Mon, 25 Mar 2024 01:51:31 -0700 Message-Id: <20240325085131.182657-2-chunhau.tan@starfivetech.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240325085131.182657-1-chunhau.tan@starfivetech.com> References: <20240325085131.182657-1-chunhau.tan@starfivetech.com> X-ClientProxiedBy: SHXPR01CA0005.CHNPR01.prod.partner.outlook.cn (2406:e500:c311:1b::14) To BJSPR01MB0595.CHNPR01.prod.partner.outlook.cn (2406:e500:c211:e::20) Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BJSPR01MB0595:EE_|BJSPR01MB0451:EE_ X-MS-Office365-Filtering-Correlation-Id: eb3a83e1-dc35-41f5-b2af-08dc4ca8cf53 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: uSFSbun4ILwVoOTkpjxVATph4sVvZ20YlShmk+tcpgx7+FklMuXH17M63Kx/hdEAm7lXvaRwmugugAh4PhbQufyYRtT6BOLZ8ObCkiQMbiSOuca2SABi0Ij2T8rv2ItdE8oTOYynZoNB8HQfUaWOwQsiugTyFaQG3Y2gPQFrbeXYD2esHdBqQxqQ1tubDMuNY2KB+vIImXVmbtuREEIdoSJs+jWA0GVN20IOZcLZRYUT0VQt1j9LrAssmV83wuT7d3S1HNKTHoLF8E4N0UqdIQfaVDYqaBuskIRoojm6uC9RX0gwMmaYiAhPLYfk5tSm6FPGK5N2h2jsGDauUTtG1GYA5KQ7kOV/2m/PdhkakI9lODijhWiafAlUNufLwNy0B/y6EiR8T/vcV8/3Yh+IR6vmxAivy5ynu1BDEWvvyEnJS0Mp097fhoC7rJXh172TDbQH5XEHTQwL6MNuyN3StATeVsnW4mtWglfZJu4NDpDAIi77Cn2nKVnoPxAbGZvbVrgIPVrBk5EuXEMTzd3/131Wcpz2dDyI8/ISCUaKnU3/8nRd7JtSaFRR9PJJDc63zjulDmCfGlH1uK2y7BlyBVgf3D0Ame7TJ3xgBWjAUH7CngDf9s7G7lLPdU8DwV9zlcJoHOMFVVEFa4D9+lchzw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BJSPR01MB0595.CHNPR01.prod.partner.outlook.cn;PTR:;CAT:NONE;SFS:(13230031)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2zIr27CrdA3zJPbsR19U9uXD8Zv3eWhJnpwOPGZfxMpiqdAAHDBC7P6sdexIt1TiT9y9K5CKqBGNtENYeczIUUMnH3Krt/PG6XUL0apmh3nWxH6NrAKwAz0aiyR1BGKcH2/wvgNHAmJNW1AxMSjizwXwXm9qUmfdCkgVFR04k1J+lJxJQtabGjUplIux/PXK+QsJZuGFsazR9SEbahZwxCRG9jKS5dpYh/ErXfLWwSdDbqk7822aKm4xmAoGpInLU4wwyzYuZBSS0ifCzleib4uqPjAkgFXr2e6hk1lJHyxdZNqaEOvR2PgYRgMA1eZqdcXezn4mfVn7jA+o9h9FShtAOO4FWBCmRQTd7tzAZcbQGGooveqCqRcS69dWSScp8qcEj8wkaHdpK39/8aAU5cp36wCBU+mWST7Ky+Tr2UErpZB0wVrzZhGJbx094lFQb//ClCc3WnJQEk0xQtF8OhKfkKIuo/3gRjesZ2E0HZ+ymY5UYoltrVctxiJtQRXy4jaKab7rUl/lLfHUe9jdJU6UUh2fhe94D2RvWLrRxjkNj3dBx4c9YeCgp5V/KQS1f7GzXsTUTVnhacFNTVk99KpKlmiYUYlGDY8Ow+ffnI2YPB8PQ48RiirUWNfU9bvIp+R59JOTFv0nZnUWiG9eDYYUim30g5Oqp4Ot7H1q7w== X-OriginatorOrg: starfivetech.com X-MS-Exchange-CrossTenant-Network-Message-Id: eb3a83e1-dc35-41f5-b2af-08dc4ca8cf53 X-MS-Exchange-CrossTenant-AuthSource: BJSPR01MB0595.CHNPR01.prod.partner.outlook.cn X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Mar 2024 08:51:49.8581 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 06fe3fa3-1221-43d3-861b-5a4ee687a85c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: HkUOMn3qh/n7guxPgMCX2REGoeolOo3dUZwlZbRO6FQya8jKQibHKCfbqvAOoXUofx26mfBsY1IvJ2jy9jSXx1e0WBWU1BmJK+WNm+ynXh4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BJSPR01MB0451 X-Patchwork-Delegate: kuba@kernel.org Add StarFive JH8100 dwmac support. The JH8100 dwmac shares the same driver code as the JH7110 dwmac and has only one reset signal. Please refer to below: JH8100: reset-names = "stmmaceth"; JH7110: reset-names = "stmmaceth", "ahb"; JH7100: reset-names = "ahb"; Example usage of JH8100 in the device tree: gmac0: ethernet@16030000 { compatible = "starfive,jh8100-dwmac", "starfive,jh7110-dwmac", "snps,dwmac-5.20"; ... }; Signed-off-by: Tan Chun Hau --- .../devicetree/bindings/net/snps,dwmac.yaml | 1 + .../bindings/net/starfive,jh7110-dwmac.yaml | 82 +++++++++++++------ 2 files changed, 58 insertions(+), 25 deletions(-) diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml index 6b0341a8e0ea..a6d596b7dcf4 100644 --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml @@ -97,6 +97,7 @@ properties: - snps,dwxgmac-2.10 - starfive,jh7100-dwmac - starfive,jh7110-dwmac + - starfive,jh8100-dwmac reg: minItems: 1 diff --git a/Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml b/Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml index 0d1962980f57..da3cc984fec9 100644 --- a/Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml +++ b/Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml @@ -18,6 +18,7 @@ select: enum: - starfive,jh7100-dwmac - starfive,jh7110-dwmac + - starfive,jh8100-dwmac required: - compatible @@ -30,6 +31,10 @@ properties: - items: - const: starfive,jh7110-dwmac - const: snps,dwmac-5.20 + - items: + - const: starfive,jh8100-dwmac + - const: starfive,jh7110-dwmac + - const: snps,dwmac-5.20 reg: maxItems: 1 @@ -83,29 +88,13 @@ allOf: - if: properties: compatible: - contains: - const: starfive,jh7100-dwmac - then: - properties: - interrupts: - minItems: 2 - maxItems: 2 - - interrupt-names: - minItems: 2 - maxItems: 2 - - resets: - maxItems: 1 - - reset-names: - const: ahb - - - if: - properties: - compatible: - contains: - const: starfive,jh7110-dwmac + allOf: + - contains: + enum: + - starfive,jh8100-dwmac + - contains: + enum: + - starfive,jh7110-dwmac then: properties: interrupts: @@ -117,10 +106,53 @@ allOf: maxItems: 3 resets: - minItems: 2 + maxItems: 1 reset-names: - minItems: 2 + const: stmmaceth + + else: + if: + properties: + compatible: + contains: + const: starfive,jh7100-dwmac + then: + properties: + interrupts: + minItems: 2 + maxItems: 2 + + interrupt-names: + minItems: 2 + maxItems: 2 + + resets: + maxItems: 1 + + reset-names: + const: ahb + + if: + properties: + compatible: + contains: + const: starfive,jh7110-dwmac + then: + properties: + interrupts: + minItems: 3 + maxItems: 3 + + interrupt-names: + minItems: 3 + maxItems: 3 + + resets: + minItems: 2 + + reset-names: + minItems: 2 unevaluatedProperties: false