From patchwork Thu Oct 24 06:53:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Fang X-Patchwork-Id: 2001467 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=nxp.com header.i=@nxp.com header.a=rsa-sha256 header.s=selector1 header.b=UpC8hV+I; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2604:1380:4601:e00::3; helo=am.mirrors.kernel.org; envelope-from=devicetree+bounces-115055-incoming-dt=patchwork.ozlabs.org@vger.kernel.org; receiver=patchwork.ozlabs.org) Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [IPv6:2604:1380:4601:e00::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XYxrG3xJ2z1xw0 for ; Thu, 24 Oct 2024 18:10:06 +1100 (AEDT) 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 51FD71F21182 for ; Thu, 24 Oct 2024 07:10:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4F53D18A947; Thu, 24 Oct 2024 07:09:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="UpC8hV+I" X-Original-To: devicetree@vger.kernel.org Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2054.outbound.protection.outlook.com [40.107.22.54]) (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 78B4D1A76DD; Thu, 24 Oct 2024 07:09:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.22.54 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729753743; cv=fail; b=UKAbg8c/HNWxSf7rtOPIIOH0IVFIcWWv61iSTm3VArusMrLP+Q+Sl0glHHnvB+aMVxsYsmhGqZk2WS0Go1T0aMAfGe3Zi2XM2JmcOgwlEDYrmgXgUYEG0v4ktK4a/HOciu3VMYknY0tzZ3o5PR9eY+nZtdUssC7/rzxQhyGdGo4= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729753743; c=relaxed/simple; bh=L6AvRQhlt4OHN8voqkHc5K3vgOP9V9znkwVrvSEa2cM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=WSosxhX4UmmWLAvskWbij7LfM/ccHGXw5d9Tzz8w+pExq8RWyr0PJSPYf69Y9pIueAz6O2VXw8UkXCHF9lREOPCCFlFF9WXhFVrT7mQt3RRDnz5WJ9y2rispY9o9MkCK+ORmS7RAIVQitNmVTNZHEf1Mrff91mluI4SS2+FLDi8= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=UpC8hV+I; arc=fail smtp.client-ip=40.107.22.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=iO2Rnbb9z0s/1Wuqe5xwWJE3m76L9hr5ImtGCSNJBoGQpIzqhAkXMZl+SrgumwSiI3enxeUF7/3jJRvmkWC0gKwVU3j2wPfvfSUbHyxfIg0Mdvhzxs//1P/ptaAe2kG5/JsPFari+DG8cxcm0mG9k9abKv207hqQ1jVK4XQXhMKaYZfGXGSG6rcl59UpW/ddnai486YZKktPQgrgvefjoPXT4RER9PPYTP3DXQxGy9EqVVgGhvQyC9YmqHjYpdUzU+Hv2+qHSe+IVSaAZMfDjVFoEuQ1ImLQnH+Xlco193GaS8hXG+7sD4EWmkyThXbIm7tGVnjJZzzCfjKZgKYG6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=UKrh9kk9xSm0bZHZNQWQvwxoSP/BC5SLqXmCtoou8c4=; b=u+z7rdQKRdZbf9Phx147c7VpUtzwJ8WbW91Rg7GZzVbVHURUA7+ERl/fQ9X/cnoBLjB0SXM7ZQqQ4CsQgQHK+DlGX3xh7LgOXLwnHQxHAP8ACVSA6sqynIEoSp/VtxWm1ZBAJk4Lbqh2PuKuTz8QrUQlQV6GdG8oO3LWYzvBlLNbQzG/FJqCT98Lox0u+1T0SBaSZ/64z9aXOO7ywgkFoYpG5C6TXQvjgm2AY598GakMrdd99kGSd6ovky0zna7B5fBpVRquW4UAjo00dvppOgdFVKITSS/slkct3on4N6u0bdwPA6vWDsADs0tOn/99ZNbBpwH3LFKJAnv804p58w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UKrh9kk9xSm0bZHZNQWQvwxoSP/BC5SLqXmCtoou8c4=; b=UpC8hV+IfR23gNaLtoF3rq2GNhWjwezNnBTifnBNwgzT+Di6TDRFLbIAB3+iczWfFFAo3lq0thqzfAhkevubfW16OLLCcY8b/J6g5CyetBSejHjsrcl64WOR2TRLLT0Cogd9simwdbvFKIG7scN/RsWwjH0VzzY2vs/FdqRKJzn+wB7nDQDPM/ArVmKMPAZXZ4QRsAlinTO/fyRVwPYdK23ikHIs+rfGbI3csHZF9NAonV3GH12LpaObFknGcopyAQeExkMwfGU2m6FB1eck/AnS9iXIIl2ZIaQ7IkfQo+dLBsyv7V0zDOEWGxQ7sFadm1UZQFOJ9f2ZjofHvLrW/Q== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB8510.eurprd04.prod.outlook.com (2603:10a6:102:211::7) by PAXPR04MB9153.eurprd04.prod.outlook.com (2603:10a6:102:22b::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.18; Thu, 24 Oct 2024 07:08:57 +0000 Received: from PAXPR04MB8510.eurprd04.prod.outlook.com ([fe80::a7c2:e2fa:8e04:40db]) by PAXPR04MB8510.eurprd04.prod.outlook.com ([fe80::a7c2:e2fa:8e04:40db%7]) with mapi id 15.20.8069.027; Thu, 24 Oct 2024 07:08:57 +0000 From: Wei Fang To: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, vladimir.oltean@nxp.com, claudiu.manoil@nxp.com, xiaoning.wang@nxp.com, Frank.Li@nxp.com, christophe.leroy@csgroup.eu, linux@armlinux.org.uk, bhelgaas@google.com, horms@kernel.org Cc: imx@lists.linux.dev, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, alexander.stein@ew.tq-group.com Subject: [PATCH v5 net-next 03/13] dt-bindings: net: add bindings for NETC blocks control Date: Thu, 24 Oct 2024 14:53:18 +0800 Message-Id: <20241024065328.521518-4-wei.fang@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241024065328.521518-1-wei.fang@nxp.com> References: <20241024065328.521518-1-wei.fang@nxp.com> X-ClientProxiedBy: SI2PR04CA0011.apcprd04.prod.outlook.com (2603:1096:4:197::10) To PAXPR04MB8510.eurprd04.prod.outlook.com (2603:10a6:102:211::7) Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB8510:EE_|PAXPR04MB9153:EE_ X-MS-Office365-Filtering-Correlation-Id: 5b7ab1a0-6f6f-4838-2de2-08dcf3faba01 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|52116014|366016|7416014|376014|1800799024|38350700014|921020; X-Microsoft-Antispam-Message-Info: zjtJdjAFgVGJZ87wxTt7awc334Ew93twkixBHJ6/0c2s/pYR0FYlFdCw24CGk4BbkEy6ky1A3e7S/e15z4wgY8BjCRQ/rlbhJlabD589Nt1PYt0bAtwAna8pXcFFbYGA9llnijbtRtgmdjZZMMK9+OoG1fBPKox9bHJDIKoRdY0uYhzVjavVkVDMZGCQ3pJ8jB3eW4KOnmmfyKjIpL/qJjrBA5ziDfEK2ysTZ0BMe0A9kHs6Igr+FTDAKO4abfelNUpojqa+IXVcyBTYOBhsYQY69cdPIRL5EEEBeZltXoTIH2YEWvplqacsUkXcVZXJ/f3zUPE1ZYfpPvffuQ7VKTJj8UrMw8Mw9PmTcT0dwJIuFOVwdMUdgfEDvxT9xa79deVo1e/nZ9FtFpMW+UYRUkVQ1M8kgd6J4uBjQwgFXDMGuSKC+XcpCWue9w5dSANIULMLDV9VkldVKIkY4XSGxSVWTGLsNvHBL7NZQvMidz2s3ChuWZyqLVcATN+Q4tte2P+9xaFXjjpaC3UxtRk9V70A1Jiw8scnIYNZfHjkz3ZBbQKBiT9E763/BmvTGKxJyiY7PE0qArpSqMAEIYW78CKSYqS97j5tpUxKHqpII6oDxGf2Akk1V9YPdukoCFQuzVxBmVhP+A2ff0cYiCVFku/yeI916kJaBaANvBKrDY5H1VNE61D4Cmq7gxCyo+7nm/kAKdRD7zPpmCJNy5hyNYdCIat0TsDUSm/B5uxVkh4bIOA/hNOTmlLnK6bOx0uApp0axlJJxBav2MS3CG4jo7PsSU8zEvk09WRc8ljNrJyCZIgwoC20Hbidzb+VwgRXNbmYvh4/BboMnq7IGI8GDuFD4nZOfNWoawVGoLfdoAfHsCWF8IA8VQtsCb/vH34JDhwXHFS3XXP1YRf52wks51FiOWXKw3hskr/SwrNfXwwbyflVRR4+S/TaGr/dmqan1eYsL1E/aob//EdaY6eUX1c77y00GKeIn/Lt5SDbb0umJqo+LhQ9IyKs6ZHe5s2w7qN0F3+Iv04DqOXHIcKbrqPrYNtNKg6cSznBn+3HvA9w0iTKEcX6/CCpJZlWt0HMLQ9j3OhOisZIYUB8IFm6W7lrE2wHZzJOT0CJc2WpLK2SxaAWvKWXHck+z0nAEp8kbJLN8XUQIuXeR3Pcp2WuB0qLR09R4VSi8GSTNU6vSNMxgEXOkefiLfM209ZVI5FSIG7SirbkX9P87bZ0D1HGG7tyYZ04IhNAUq5QBA6mIfDQwP0RIvV+7LSQiLm19RAZDIBWPsBjqEP1p+UW1JofKrJvIsTUd1bfhTuLch1roFQcXOlR0cXjfL0ikQeP5vhSFzytRQipBTctwzhMCC9aBw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB8510.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(52116014)(366016)(7416014)(376014)(1800799024)(38350700014)(921020);DIR:OUT;SFP:1101; X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FO6lIrjrzjyYPuPYrHNbBg4vOd1DjEQPs4SSA96Xczx/prFeq3SbdvWMy+SuEMnkCBT3JZKTgcCqdtixZfHjRzU6OjppCa3BUXX9xVvy4/nUO9sRbeTsQViiWi5/jsxNf8wORxrLzR2CW1N6WLBhxaUZQG+lz7EKWv7QZ6fXrNGwqkE3r8RcxUIsz5MTBi6VHuvo1FtBmJJ3lDiyDfdSfkXkwCsS2fiOgnspZKfwmvgSvq3Pz42tpXJgjkFr5L2I+u4N7petEpg/fSVCWJxSBDmRLvZVzdp1GI3IKghFDgCO12KIt6lT0qNC6fJygvzR8AujZuBfqTm3dEtBJa7tu6V9zHkBQf6U5CVuh4nReb4wsFBrNbtM6J8Kty39sgDbqaGFcHN7QGvsLfW4cZqNqB1Z/URDJ6kOlF47KUGDLzHhCW7sPZ/U93jHqmp6BQw+VvOxRjpKRjaVnswkinlp3CDHL92vsnaYKLLxufCMmarN5gE8vGdGCwF7qM9DCojVDI0hYE9AcWnQcwjuQkVtEwXrlWmPOQsdOSesB37lqRmxK0TLopvHsOlB9eVDkYOL4TO3Ja3nos4+v1 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5b7ab1a0-6f6f-4838-2de2-08dcf3faba01 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB8510.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Oct 2024 07:08:56.9598 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ctHVwH0MNzYrBbuoAAIRp37RjzIXeevCVDlJA7nuXtOcZO7BjNG4KXYtwlJwZM73Z6Vv77KmcpNmmaip0JkRhw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB9153 Add bindings for NXP NETC blocks control. Usually, NETC has 2 blocks of 64KB registers, integrated endpoint register block (IERB) and privileged register block (PRB). IERB is used for pre-boot initialization for all NETC devices, such as ENETC, Timer, EMDIO and so on. And PRB controls global reset and global error handling for NETC. Moreover, for the i.MX platform, there is also a NETCMIX block for link configuration, such as MII protocol, PCS protocol, etc. Signed-off-by: Wei Fang Reviewed-by: Rob Herring (Arm) --- v2 changes: 1. Rephrase the commit message. 2. Change unevaluatedProperties to additionalProperties. 3. Remove the useless lables from examples. v3 changes: 1. Remove the items from clocks and clock-names, add maxItems to clocks and rename the clock. v4 changes: 1. Reorder the required properties. 2. Add assigned-clocks, assigned-clock-parents and assigned-clock-rates. v5 changes: 1. Remove assigned-clocks, assigned-clock-parents and assigned-clock-rates 2. Remove minItems from reg and reg-names 3. Rename the node in the examples to be more general --- .../bindings/net/nxp,netc-blk-ctrl.yaml | 104 ++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/nxp,netc-blk-ctrl.yaml diff --git a/Documentation/devicetree/bindings/net/nxp,netc-blk-ctrl.yaml b/Documentation/devicetree/bindings/net/nxp,netc-blk-ctrl.yaml new file mode 100644 index 000000000000..97389fd5dbbf --- /dev/null +++ b/Documentation/devicetree/bindings/net/nxp,netc-blk-ctrl.yaml @@ -0,0 +1,104 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/nxp,netc-blk-ctrl.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NETC Blocks Control + +description: + Usually, NETC has 2 blocks of 64KB registers, integrated endpoint register + block (IERB) and privileged register block (PRB). IERB is used for pre-boot + initialization for all NETC devices, such as ENETC, Timer, EMIDO and so on. + And PRB controls global reset and global error handling for NETC. Moreover, + for the i.MX platform, there is also a NETCMIX block for link configuration, + such as MII protocol, PCS protocol, etc. + +maintainers: + - Wei Fang + - Clark Wang + +properties: + compatible: + enum: + - nxp,imx95-netc-blk-ctrl + + reg: + maxItems: 3 + + reg-names: + items: + - const: ierb + - const: prb + - const: netcmix + + "#address-cells": + const: 2 + + "#size-cells": + const: 2 + + ranges: true + + clocks: + maxItems: 1 + + clock-names: + items: + - const: ipg + + power-domains: + maxItems: 1 + +patternProperties: + "^pcie@[0-9a-f]+$": + $ref: /schemas/pci/host-generic-pci.yaml# + +required: + - compatible + - reg + - reg-names + - "#address-cells" + - "#size-cells" + - ranges + +additionalProperties: false + +examples: + - | + bus { + #address-cells = <2>; + #size-cells = <2>; + + system-controller@4cde0000 { + compatible = "nxp,imx95-netc-blk-ctrl"; + reg = <0x0 0x4cde0000 0x0 0x10000>, + <0x0 0x4cdf0000 0x0 0x10000>, + <0x0 0x4c81000c 0x0 0x18>; + reg-names = "ierb", "prb", "netcmix"; + #address-cells = <2>; + #size-cells = <2>; + ranges; + clocks = <&scmi_clk 98>; + clock-names = "ipg"; + power-domains = <&scmi_devpd 18>; + + pcie@4cb00000 { + compatible = "pci-host-ecam-generic"; + reg = <0x0 0x4cb00000 0x0 0x100000>; + #address-cells = <3>; + #size-cells = <2>; + device_type = "pci"; + bus-range = <0x1 0x1>; + ranges = <0x82000000 0x0 0x4cce0000 0x0 0x4cce0000 0x0 0x20000 + 0xc2000000 0x0 0x4cd10000 0x0 0x4cd10000 0x0 0x10000>; + + mdio@0,0 { + compatible = "pci1131,ee00"; + reg = <0x010000 0 0 0 0>; + #address-cells = <1>; + #size-cells = <0>; + }; + }; + }; + };