From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.remote-ip=67.231.154.164 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=fail; t=1796169133; b=modjyWX4iz9OcvjE0SuVlRxS13RCh6oAZZBgLmpEyl8egCF10zwIe3H0pWKsNVYBcA0V YiFrdNRLlG4G6xA4t6cTg2pTpxYGlsOKhQqdV+dPBCvJg6I8PZJntnJhbhIpsmdTCIBvs yC21gjlBgo+qlIMGMWNv6w0w07AQoCv6T6Xf3yJLkC5aLgtYoaxYLiuiGFKjPrI7EPWqs tsF7JDys6cOxi3nhiVK6kHExRxXq13TwLsLWObCYPeie1zRZUhJu6FDM4UB+r0aSzhzwo HDeCObaV0BaJA7lYTxWiAhDRnUIMr6LgDmpxRiJTuIVsCx6w01QRVxmVhC2cSxToN3w== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796169133; h=DMARC-Filter:DKIM-Signature:X-Virus-Scanned:Received:DKIM-Signature: Received:Received:From:To:CC:Subject:Thread-Topic:Thread-Index:Date: Message-ID:References:In-Reply-To:Accept-Language:Content-Language: X-MS-Has-Attach:X-MS-TNEF-Correlator:x-ms-publictraffictype: x-ms-traffictypediagnostic:x-ms-office365-filtering-correlation-id: x-ms-exchange-senderadcheck:x-ms-exchange-antispam-relay: x-microsoft-antispam:x-microsoft-antispam-message-info: x-forefront-antispam-report: x-ms-exchange-antispam-messagedata-chunkcount: x-ms-exchange-antispam-messagedata-0:Content-Type: Content-Transfer-Encoding:MIME-Version: X-Exchange-RoutingPolicyChecked:X-OriginatorOrg: X-MS-Exchange-CrossTenant-AuthAs:X-MS-Exchange-CrossTenant-AuthSource: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-originalarrivaltime: X-MS-Exchange-CrossTenant-fromentityheader: X-MS-Exchange-CrossTenant-id:X-MS-Exchange-CrossTenant-mailboxtype: X-MS-Exchange-CrossTenant-userprincipalname: X-MS-Exchange-Transport-CrossTenantHeadersStamped:X-MDID:X-PPE-STACK: X-MDID-O:X-PPE-TRUSTED; bh=P/yMK5V2dOQ2+9FypNiKs3vYYj5k2KxAdznAxKb4Qn0=; b=v/wdrwKyJfHv16E2507W90B5IqPJKOk0jFahxNtPyTk/6Bocm6m4yZr+wyLUu4PMh/wP tz9Zdf5CD8lSz6eNcGWFLYyGFEC3L2F8Zrw6kvMXQE3B++kbAuwCdoXcF9PQi8mgWPiNF cyVuwS84XOFV+k/NqNxbytCV2oPdEzGp4vr7qTfs/xpwcTuBy5GPNbsLE+URhZmhAl6ls rt70romzpFRDx0Ll70cTfKAUGVeFGmm6YUn59ZAfSR/kV9fHzpVq4DwEofLfa7Sz2gMx4 84Zzxybt5xzhnZ203Nkyb9D1J4epamIjQsEXZxf+tzJ1YkD3l9ntbNzD8kzPuEV2nxQ== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass header.from=sitime.com; spf=pass smtp.mailfrom=sitime.com; dkim=pass header.d=sitime.com header.i=@sitime.com header.a=rsa-sha256 header.s=mail header.b=YxUYaPxC; dkim=pass header.d=Sitime.onmicrosoft.com header.i=@Sitime.onmicrosoft.com header.a=rsa-sha256 header.s=selector1-Sitime-onmicrosoft-com header.b=hQ7kpbV5; arc=fail smtp.remote-ip=67.231.154.164 Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [67.231.154.164]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CF753606A6AB; Tue, 1 Dec 2026 23:52:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org CF753606A6AB Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sitime.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sitime.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sitime.com header.i=@sitime.com header.a=rsa-sha256 header.s=mail header.b=YxUYaPxC; dkim=pass (2048-bit key) header.d=Sitime.onmicrosoft.com header.i=@Sitime.onmicrosoft.com header.a=rsa-sha256 header.s=selector1-Sitime-onmicrosoft-com header.b=hQ7kpbV5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sitime.com; h=cc:cc:content-transfer-encoding:content-transfer-encoding:content-type:content-type:date:date:from:from:in-reply-to:in-reply-to:message-id:message-id:mime-version:mime-version:references:references:subject:subject:to:to; s=mail; bh=P/yMK5V2dOQ2+9FypNiKs3vYYj5k2KxAdznAxKb4Qn0=; b=YxUYaPxCGUm33GwdGNARPWko1haIoImfy5JqyLkWLT/oWfMPxaB2jZi284QLDgBnNdpCyVrM4Lg7fKeVKdPsVW1agiVzqkcDBEkWIU31Psm9grLWtK+GL39VJYn3Ev12PQga+Rbo+adF3uD5t7vPeeOz7eIT4Iok9uNZBSdfC5eAIRKZ9cy4OJEyOYmHOA3EZWzJZ8X2vmoO19uPTWmFXuDp6kXHXJVQKWhXcj2tW7oHHlnPYsi8EOjUqohkTklw13NcblH4bYPGQrYmVVRGbmZZMTLlZwylD9K0Z10INnJn9g1coTys8S7yy6kkkb/AUboLRwribvQqWQ+DAtDkUg== X-Virus-Scanned: Proofpoint Essentials engine Received: from PH7PR06CU001.outbound.protection.outlook.com (mail-westus3azon11020082.outbound.protection.outlook.com [52.101.201.82]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id B24A1C00083; Tue, 1 Dec 2026 23:52:09 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=sGEeCkQMkPTruddk3sN76wdhR4ddTD5IorUwexPAlbcRIQxQK7X/9cPqJtPdrwwV8UklIoqjF1UL7rHAGhwor84ZACImzAnkNqFKNGvFIHY+iNsrHGCNnPKqumUyeX+njXNDGJJKouxElsYMTVa316C5NK6dp8FFNX1Hrt8i4X+SvwZHo6PIOXN9QXAy9+lUZAUIBraT63Kd21cwLCSM31HPAaZTu2tDdjA5rCNZZt0odNTWigWbmSSojeE5JQEfHeTfQpEahbexmsQ9tvxmmNwKYNN5pDbXazRTTrgzomwIiDM0EYZgTalZ6UdJ3Nsv55Gr1k80U9Ry0Yo+Sv5ATQ== 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=P/yMK5V2dOQ2+9FypNiKs3vYYj5k2KxAdznAxKb4Qn0=; b=OLfB6ifUejfxJgaccE6psbJr8gisDWxtffHu7LAUY4eVRmRg92LLTSspIwMBOxi4sTU0tHVxDSoQHgO2fsLMhcZQWRz3FgsZCCw5Eq+ZbEob/DhslUW414ED8C84TsMTWxXP/1Crh8lyLFjXH/MKEobqtLuI/JO7yZFrr2sSdaFZO3eBF5cdgSGn2x4c3h4hYIKMjmDiA6ycWNgViM0ucr7WdvIfrBXiDFYkp3o9Glb/hrdu3+oMFGEYz/q5t3ztxiChJWSt2ni7vqVQwBwlPa4LIf8U1z0122KVA7xgauKAQN8BxeUBol5japVDfOTe6dY9mM0L/fGntMQQPsozCQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=sitime.com; dmarc=pass action=none header.from=sitime.com; dkim=pass header.d=sitime.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Sitime.onmicrosoft.com; s=selector1-Sitime-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=P/yMK5V2dOQ2+9FypNiKs3vYYj5k2KxAdznAxKb4Qn0=; b=hQ7kpbV50N/lkDvQwFGD03JTQvU17vOW/D3r0r1toPlvtdVxMhC44+1pBINR4lB6C0xSBYam8mLADYzQTQHCXl27z8Tq8piVQTAySIaS8VHJuH93mwtl7TtzP4EJe30+r+Nj6Tccb7Dg9J2p8PavEiTejuraVNfCrZK52mBXxz2pbL9Uy7t84F/wRzn9ei3NbiJizCvDse0aB8rZxzd8QTdeD6BBQWUCHutVjk4eXU405+gnM+S9Xn9qxVOz9dHihuKB6fF7nkVxxF8eb+uf60O61Ye1YkH/LBB8S8F62sREZeLCbdT6GYUh8jA9ER78nJETaXveSmzX7Ojt1pDPrQ== Received: from LVWPR20MB994915.namprd20.prod.outlook.com (2603:10b6:408:3bf::16) by SJ2PR20MB6330.namprd20.prod.outlook.com (2603:10b6:a03:502::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.688.10; Tue, 1 Dec 2026 23:52:05 +0000 Received: from LVWPR20MB994915.namprd20.prod.outlook.com ([fe80::9551:3864:128b:8c01]) by LVWPR20MB994915.namprd20.prod.outlook.com ([fe80::9551:3864:128b:8c01%4]) with mapi id 15.21.0688.009; Tue, 1 Dec 2026 23:52:05 +0000 From: Ali Rouhi To: "jiri@resnulli.us" CC: "ivecera@redhat.com" , "vadim.fedorenko@linux.dev" , "arkadiusz.kubalewski@intel.com" , "kuba@kernel.org" , "pabeni@redhat.com" , "robh@kernel.org" , "krzk+dt@kernel.org" , "conor+dt@kernel.org" , "prabhakar.mahadev-lad.rj@bp.renesas.com" , "cjubran@nvidia.com" , "Oleg.Zadorozhnyi@devoxsoftware.com" , "netdev@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: [PATCH net-next v17 05/13] dpll: sit9531x: read DPLL types and pin properties from system firmware Thread-Topic: [PATCH net-next v17 05/13] dpll: sit9531x: read DPLL types and pin properties from system firmware Thread-Index: AQHdge738kFgiDv6g0qc/letjeAcmQ== Date: Tue, 1 Dec 2026 23:52:05 +0000 Message-ID: <20261201235202.97645-6-arouhi@sitime.com> References: <20261201235202.97645-1-arouhi@sitime.com> In-Reply-To: <20261201235202.97645-1-arouhi@sitime.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: mx.microsoft.com 1; dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=sitime.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: LVWPR20MB994915:EE_|SJ2PR20MB6330:EE_ x-ms-office365-filtering-correlation-id: aa8a6ed6-cafb-49a3-b4c3-08df50061a6c x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0;ARA:13230040|376014|1800799024|23010399003|366016|38070700021|10067099003|56012099006|5023799004|261026121527099003|261021123027099003|261021121427099003|261026140227099003|261022105027099003|261028144727099003|261102123227099003|261009223027099003|261009220027099003|261009223327099003|261009221727099003|261009221227099003|22082099003|18002099003|6133799003|3023799007; x-microsoft-antispam-message-info: NnvP4WKZR5VkL08lSMAHwdLXUCib5P5WucaP+56IZUzPd2rsJAXTrzcTkeR1d1p4H6NtXFTy437evduYnpIx/fn/C6BjVZCwTbQJ7ux7LsrfL2abCcjAJqei27QHIkUTeK/oyzaCeOJZhK7JmcaqnyGgxH6GPG9ALYxGw38IwACkUt+TilwQdrGRAALyVzrkxyucfNVsBkWvpZMXBUAGC7JbPwY5JFNeC+i2d8BWLPTkbr45wsXrY15J3LexMYiz7DDssMqU2S5w/whdSJn2K30p1Ji0kZn7u+U2rAwtgjA6b3MHLwfyoQ16IovxSYRJN/GZqq3ERNIZsHnyWT6rft5th6yeodrNDHjhHdyTokWKqCVTHEq/PKu11jgu6G1WVBClAjEQHtl/AFGiXOi1LKT5rK2uUxltIrAi6+CA4Ktzx5wPKLugYBvvVFwcbV/ToBWJfxDlJZYdsxKwQLLArQ6R7+C8mnj0vbkoVVIFFiFXb9s1QU8ojiOgvAU+eZ5yojM3ZVmT6m/BDMCqzsJtkrxLwjiRnWo81lNtYKp+FEawU6caklp6lJkKrkd5iRwm/TFHPnlgWNUVvrGohPYBCtm1/pXJL1t4tpqcmlZgAKkoK4zC7WWGN6Yn3YqwY2BqgiCJXIrUGiBjlgLO+4nCcy4Tyely7P3GQdhinL8CNKRdcMVyrqWmd9V3RtdbZBtGBy/q2GPAVo26Fwuq3kvMejhwVhmAch5kdB9rojjSo+s= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:LVWPR20MB994915.namprd20.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(1800799024)(23010399003)(366016)(38070700021)(10067099003)(56012099006)(5023799004)(261026121527099003)(261021123027099003)(261021121427099003)(261026140227099003)(261022105027099003)(261028144727099003)(261102123227099003)(261009223027099003)(261009220027099003)(261009223327099003)(261009221727099003)(261009221227099003)(22082099003)(18002099003)(6133799003)(3023799007);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?8vRgB1bpyhOg5N8nwIWKBI/P6u/e29WMLJru40vZKNPsSzf5pnihhLX8IZ?= =?iso-8859-1?Q?i6uWPqQ7mgs3qTCJbcaZYFa4wJrXFWga/dEASlftdEtRd5sPNhF48HPdmm?= =?iso-8859-1?Q?QmfV3WVfzEVNZCTdtH/b+R037TIeuHfV3VDtePJ8lX3nBWH3GGQcok8Xuk?= =?iso-8859-1?Q?TDoLVpa7tKZmzOGxPsyv7lwrYjIkj3S2FdQxCLuL/ZkMS0KNtDdgHc9aDc?= =?iso-8859-1?Q?s6b3v+UiuycxeoChIvhLyhvvf5LJK/VRtxB0o7leNvGTb/AznYvRkKkbgC?= =?iso-8859-1?Q?U+bder1y4aPx3W5KdFhptafmSufhzcwKPlQauUhJzI3jj8LOd3TCMMsiwM?= =?iso-8859-1?Q?6NIWkNwemmQpOPhLa9+tr09+jqIH21YZdxJTdJREYvqiueZtUi5XGBtpfX?= =?iso-8859-1?Q?GIy7nj7GU9IKpQm6MYs5Exh/9zfuKfB/2RA9SHLjYD+TaFO5Ph3tUWSmjl?= =?iso-8859-1?Q?7QybEQ6rpZ/N9x2P04Rf4lwJQD1TiMc60HzpfbsvQ2Mj3VLvhYVT1BtSGQ?= =?iso-8859-1?Q?XGgMKZNHrBqXMy/7oAwL4KYR6bj/+P5hwX/j+bn76OIc1cmacpICIAzj/t?= =?iso-8859-1?Q?bN2i4nOH4F5ymP2Mogo2CAeLXblMFMTYbDmFTLyPUCxbMaWHCyW09Yno7t?= =?iso-8859-1?Q?cE77cX9QHxx05HzOcFixZb6CfoojHjbPXK8Hmf0cB3hlI9jqvvPWNC0LGu?= =?iso-8859-1?Q?nVuJzYxJnnFHGyrwiFVeMWwbFeLK3eSMZop05X07WD2TdFIjUrJSM/v+gf?= =?iso-8859-1?Q?hYLMtirXwwpod99juY1mRIuo4vxYOitMtbTmh4qsr+hI5i8KtgPfPyryMo?= =?iso-8859-1?Q?NNm58kpwBQuiMm2MMvt0dCwCNHzrAIPu5iZ/E0uh/K3n+CO2LDO7eQuai8?= =?iso-8859-1?Q?xaDr8dP+s40y/TgQ2yBHFTmk4MfyPOKY96stJB7ZZKPFDUZ+XSHkpvXDvu?= =?iso-8859-1?Q?mWph01Na55BLEq9FBrBgMzijhAKdvajRKekKnuy4o/wbLF62ZIYiU8kMo9?= =?iso-8859-1?Q?yAHtOTNLU9DeBcAxqBFM59WuEOuAYny19X4S0ThP6N7HdWE0a0KRQBTKho?= =?iso-8859-1?Q?gVItrYGUG5TouIkpF1g9KVtQ3UBo58jOY8qw1unY8H+1IY6usoVgozFNQG?= =?iso-8859-1?Q?pnZUt77XuacvOU4+9FtvzzVqsyz/RTO0aTcf1/IQvPWWw7JJl8ZLZCnZpr?= =?iso-8859-1?Q?jXF/ELClZ8PKaJ4ya1ecYF8zUb/DfnXCXtrgn4EZRIcyMIvIDUE/GSDthn?= =?iso-8859-1?Q?XWk96e6lQzVurT9NQfLm7lNV3P+EGLtb1fc70ODLPlYFvaCQtdl/SRx4Qt?= =?iso-8859-1?Q?LsUx22wgzAYuiAJfaprNTYl+zkCJ7wolmwSsPNQakCTt7GTIWha5FibkJD?= =?iso-8859-1?Q?6qTVk/lKdSfbo5gb0IVP3sRvh4oYWlUPNPLScmbYReTk8PPJ0zRtmx1ocx?= =?iso-8859-1?Q?DsosaLwWjF37Xg6D97X3OU1VvYyfN+gAwjV3VYP1Gj5VrGGn/ah8qlSwmo?= =?iso-8859-1?Q?5rtdXnMQcpmTAkh6Xc5JhmrjSczCekxPrGRDbYgXz6J4zivM1ve5KYYHYz?= =?iso-8859-1?Q?XGh5E3wa9BDSfCtwDhLrd2SgvUSVPy93EAzWHX+VucrG7KMhxJJjtQ4tfW?= =?iso-8859-1?Q?OPna0bNIsde2MFE/EhUHXRhdRQvmtwgIuyOpdnyWsYY2/zXh6czzefJRQ4?= =?iso-8859-1?Q?F5kNXN318TVhu7I+9HGHwcx3cy+zzFSSnBHaroMH5aPWL8BDbMnsPZLpRH?= =?iso-8859-1?Q?K2lBcIstO1HApRRNN9SymJ4Af3Kqu4rWaRc0tw9GwXB9KI?= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-Exchange-RoutingPolicyChecked: DBGEXMqmadzE4p+p8xT4RYPmw9oMl34SiMXoCEGPZVFNNauBr4YlJ4KNYXVsSz1sxHohZWC5yghLSJUR2/CN4eeI/0x0t8Bbodwp4Jgiy4SHM4FA1xp42WFuLm2hRIhcEmo/+IOva9PNc4K69IcJuF5JTEQbDT4TmCnfBAYjE4IsOnq+23VUBP8YEdlxDlplZUBJEC5vujeUggtkd3QbN7KMa/Mx6hfmtoncP1JHU4zgyzbgKjTmK8ix9Bb6yYfUZGmZbhJ37/Up27VbTgGWUg0AG/DCcTOfBiAgGwf6IIaRmCcB3DPBK4/MxsbJaxNHgkMS6kQYyxsuCAPW3eT00g== X-OriginatorOrg: sitime.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: LVWPR20MB994915.namprd20.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: aa8a6ed6-cafb-49a3-b4c3-08df50061a6c X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Dec 2026 23:52:05.2645 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 8fb55916-cf10-4b0d-96f4-cf3952657263 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: v/jLO4aP/IFFTazqFiVYYf6MfZkA51NiOIt8JrOQtzcButlyFGQ5cno9Vr8W4M5J2Si4+E5QxtCF99aOX9ypbw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR20MB6330 X-MDID: 1796169131-6brYzhu_6wab X-PPE-STACK: {"stack":"us1"} X-MDID-O: us1;at1;1796169131;6brYzhu_6wab;;ba04557de9d2da8490f5f1e6de07b967 X-PPE-TRUSTED: V=1;DIR=OUT; From: Oleg Zadorozhnyi =0A= =0A= Read the DPLL type from the firmware node and, for each pin, its label,=0A= connection type and supported frequencies. The caller gives the=0A= direction, which selects the sub-node; the capabilities are fixed per pin= =0A= class. A=0A= node that gives none of these gets defaults.=0A= =0A= Inputs are the P and N lanes of four pairs: a pair run single-ended=0A= gives two inputs, a differential pair one. Outputs are labeled OUTn by=0A= the driver's index, while reg stays the die slot the binding defines, so=0A= one binding serves both variants.=0A= =0A= The first listed rate is used as an input's rate. An output with no=0A= supported-frequencies-hz is advertised with the output rates of the=0A= datasheet, since the core refuses every frequency request on a pin with=0A= none: every rate from 1 Hz to 800 MHz, and 61.44 MHz times 15, 20, 24,=0A= 30, 32, 40 and 48 above it.=0A= =0A= Signed-off-by: Oleg Zadorozhnyi =0A= Co-developed-by: Ali Rouhi =0A= Signed-off-by: Ali Rouhi =0A= ---=0A= drivers/dpll/sit9531x/Makefile | 2 +-=0A= drivers/dpll/sit9531x/core.h | 53 +++++=0A= drivers/dpll/sit9531x/prop.c | 350 +++++++++++++++++++++++++++++++++=0A= drivers/dpll/sit9531x/prop.h | 37 ++++=0A= 4 files changed, 441 insertions(+), 1 deletion(-)=0A= create mode 100644 drivers/dpll/sit9531x/prop.c=0A= create mode 100644 drivers/dpll/sit9531x/prop.h=0A= =0A= diff --git a/drivers/dpll/sit9531x/Makefile b/drivers/dpll/sit9531x/Makefil= e=0A= index a221fe55386a..819af61123f5 100644=0A= --- a/drivers/dpll/sit9531x/Makefile=0A= +++ b/drivers/dpll/sit9531x/Makefile=0A= @@ -1,4 +1,4 @@=0A= # SPDX-License-Identifier: GPL-2.0-only=0A= =0A= obj-$(CONFIG_SIT9531X_DPLL) +=3D sit9531x.o=0A= -sit9531x-y :=3D core.o=0A= +sit9531x-y :=3D core.o prop.o=0A= diff --git a/drivers/dpll/sit9531x/core.h b/drivers/dpll/sit9531x/core.h=0A= index 8ebda010ed08..0b2dd3074122 100644=0A= --- a/drivers/dpll/sit9531x/core.h=0A= +++ b/drivers/dpll/sit9531x/core.h=0A= @@ -21,6 +21,22 @@=0A= =0A= #include "regs.h"=0A= =0A= +#define SIT9531X_NUM_PLLS 4=0A= +#define SIT9531X_MAX_INPUTS 8=0A= +#define SIT9531X_MAX_OUTPUTS 12=0A= +/*=0A= + * Output rates of the datasheet, Table 6: continuous up to 800 MHz, above= it=0A= + * 61.44 MHz times 15, 20, 24, 30, 32, 40 or 48.=0A= + */=0A= +#define SIT9531X_OUT_FREQ_CONT_MAX_HZ 800000000ULL=0A= +#define SIT9531X_OUT_FREQ_STEP_HZ 61440000ULL=0A= +/*=0A= + * INTSYNC, the inter-PLL sync line, is two pins: an input pin on the PLL = that=0A= + * locks to it, numbered after the inputs and the xtal, and an output pin = on the=0A= + * PLL that drives it, numbered after the outputs.=0A= + */=0A= +#define SIT9531X_INTSYNC_PIN_ID (SIT9531X_MAX_INPUTS + 1)=0A= +#define SIT9531X_INTSYNC_OUT_PIN_ID SIT9531X_MAX_OUTPUTS=0A= /* TSTART: no I2C access is valid until 10 ms after the supplies are up */= =0A= #define SIT9531X_START_US 10000=0A= =0A= @@ -40,6 +56,26 @@ struct sit9531x_chip_info {=0A= const u8 *clkout_map;=0A= };=0A= =0A= +/*=0A= + * enum sit9531x_signal_mode - input signal electrical mode=0A= + * @SIT9531X_MODE_SE: single-ended=0A= + * @SIT9531X_MODE_DE: differential=0A= + */=0A= +enum sit9531x_signal_mode {=0A= + SIT9531X_MODE_SE =3D 0,=0A= + SIT9531X_MODE_DE,=0A= +};=0A= +=0A= +/*=0A= + * struct sit9531x_ref - input reference state=0A= + * @freq: configured frequency in Hz=0A= + * @sig_mode: signal mode of the input pair=0A= + */=0A= +struct sit9531x_ref {=0A= + u64 freq;=0A= + enum sit9531x_signal_mode sig_mode;=0A= +};=0A= +=0A= /*=0A= * struct sit9531x_dev - SiT9531x device instance=0A= * @dev: parent device=0A= @@ -50,6 +86,7 @@ struct sit9531x_chip_info {=0A= * @page_lock: held across a page select and its transfer; nests inside=0A= * @multiop_lock=0A= * @page: current page, -1 when unknown=0A= + * @ref: input reference states=0A= * @xtal_freq: crystal frequency in Hz=0A= * @reset_gpio: optional reset line, NULL if absent=0A= */=0A= @@ -64,11 +101,27 @@ struct sit9531x_dev {=0A= struct mutex page_lock;=0A= int page;=0A= =0A= + struct sit9531x_ref ref[SIT9531X_MAX_INPUTS + 1]; /* +1 for xtal */=0A= u32 xtal_freq;=0A= =0A= struct gpio_desc *reset_gpio;=0A= };=0A= =0A= +/*=0A= + * Input index 2n is the P lane and 2n + 1 the N lane of pair n; index=0A= + * SIT9531X_MAX_INPUTS is the XO.=0A= + */=0A= +=0A= +static inline u8 sit9531x_input_pair(u8 index)=0A= +{=0A= + return index >> 1;=0A= +}=0A= +=0A= +static inline bool sit9531x_input_is_n(u8 index)=0A= +{=0A= + return index & 1;=0A= +}=0A= +=0A= int sit9531x_read_u8(struct sit9531x_dev *sitdev, unsigned int reg, u8 *va= l);=0A= =0A= #endif /* _SIT9531X_CORE_H */=0A= diff --git a/drivers/dpll/sit9531x/prop.c b/drivers/dpll/sit9531x/prop.c=0A= new file mode 100644=0A= index 000000000000..495bed45c238=0A= --- /dev/null=0A= +++ b/drivers/dpll/sit9531x/prop.c=0A= @@ -0,0 +1,350 @@=0A= +// SPDX-License-Identifier: GPL-2.0=0A= +/*=0A= + * SiTime SiT9531x firmware node property parsing=0A= + *=0A= + * Copyright (C) 2026 SiTime Corp.=0A= + * Author: Ali Rouhi =0A= + * Author: Oleg Zadorozhnyi =0A= + *=0A= + * Retrieves pin properties from Device Tree firmware nodes (or=0A= + * applies defaults when no firmware node exists).=0A= + */=0A= +=0A= +#include =0A= +#include =0A= +#include =0A= +#include =0A= +#include =0A= +#include =0A= +#include =0A= +=0A= +#include "core.h"=0A= +#include "prop.h"=0A= +=0A= +/* Multiples of SIT9531X_OUT_FREQ_STEP_HZ an output runs above 800 MHz */= =0A= +static const u8 sit9531x_out_freq_mult[] =3D { 15, 20, 24, 30, 32, 40, 48 = };=0A= +=0A= +static void sit9531x_input_pin_label(struct sit9531x_dev *sitdev,=0A= + struct sit9531x_pin_props *props, u8 id)=0A= +{=0A= + u8 pair =3D sit9531x_input_pair(id);=0A= +=0A= + if (sitdev->ref[id].sig_mode =3D=3D SIT9531X_MODE_DE)=0A= + snprintf(props->package_label,=0A= + sizeof(props->package_label), "IN%u", pair);=0A= + else=0A= + snprintf(props->package_label,=0A= + sizeof(props->package_label), "IN%u%c", pair,=0A= + sit9531x_input_is_n(id) ? 'N' : 'P');=0A= +}=0A= +=0A= +/* A differential input pair is labeled IN; its N lane is not registere= d. */=0A= +static void=0A= +sit9531x_prop_pin_package_label_set(struct sit9531x_dev *sitdev,=0A= + struct sit9531x_pin_props *props,=0A= + enum dpll_pin_direction dir, u8 id)=0A= +{=0A= + if (dir =3D=3D DPLL_PIN_DIRECTION_INPUT &&=0A= + id =3D=3D SIT9531X_INTSYNC_PIN_ID) {=0A= + strscpy(props->package_label, "INTSYNC",=0A= + sizeof(props->package_label));=0A= + props->dpll_props.package_label =3D props->package_label;=0A= + return;=0A= + }=0A= +=0A= + if (dir =3D=3D DPLL_PIN_DIRECTION_INPUT && id =3D=3D SIT9531X_MAX_INPUTS)= {=0A= + strscpy(props->package_label, "XO",=0A= + sizeof(props->package_label));=0A= + props->dpll_props.package_label =3D props->package_label;=0A= + return;=0A= + }=0A= +=0A= + if (dir =3D=3D DPLL_PIN_DIRECTION_OUTPUT &&=0A= + id =3D=3D SIT9531X_INTSYNC_OUT_PIN_ID) {=0A= + strscpy(props->package_label, "SYNCOUT",=0A= + sizeof(props->package_label));=0A= + props->dpll_props.package_label =3D props->package_label;=0A= + return;=0A= + }=0A= +=0A= + if (dir =3D=3D DPLL_PIN_DIRECTION_INPUT)=0A= + sit9531x_input_pin_label(sitdev, props, id);=0A= + else=0A= + /*=0A= + * Package numbering; on the SiT95317 it differs from the chip=0A= + * slot that the registers and the binding's reg use.=0A= + */=0A= + snprintf(props->package_label, sizeof(props->package_label),=0A= + "OUT%u", id);=0A= +=0A= + props->dpll_props.package_label =3D props->package_label;=0A= +}=0A= +=0A= +/* An output's reg is the chip slot it drives, not the driver's index. */= =0A= +static int=0A= +sit9531x_prop_pin_fwnode_get(struct sit9531x_dev *sitdev,=0A= + struct sit9531x_pin_props *props,=0A= + enum dpll_pin_direction dir, u8 id)=0A= +{=0A= + struct fwnode_handle *pins_node, *pin_node;=0A= + const char *node_name;=0A= +=0A= + if (dir =3D=3D DPLL_PIN_DIRECTION_INPUT) {=0A= + node_name =3D "input-pins";=0A= + } else {=0A= + node_name =3D "output-pins";=0A= + if (id < sitdev->info->num_outputs)=0A= + id =3D sitdev->info->clkout_map[id];=0A= + }=0A= +=0A= + pins_node =3D device_get_named_child_node(sitdev->dev, node_name);=0A= + if (!pins_node) {=0A= + dev_dbg(sitdev->dev, "'%s' sub-node is missing\n", node_name);=0A= + return -ENOENT;=0A= + }=0A= +=0A= + fwnode_for_each_child_node(pins_node, pin_node) {=0A= + u32 reg;=0A= +=0A= + if (fwnode_property_read_u32(pin_node, "reg", ®))=0A= + continue;=0A= +=0A= + if (id =3D=3D reg)=0A= + break;=0A= + }=0A= +=0A= + fwnode_handle_put(pins_node);=0A= +=0A= + props->fwnode =3D pin_node;=0A= +=0A= + dev_dbg(sitdev->dev, "Firmware node for %s %sfound\n",=0A= + props->package_label, pin_node ? "" : "NOT ");=0A= +=0A= + return pin_node ? 0 : -ENOENT;=0A= +}=0A= +=0A= +/* Free the result with sit9531x_pin_props_put(). */=0A= +struct sit9531x_pin_props *=0A= +sit9531x_pin_props_get(struct sit9531x_dev *sitdev,=0A= + enum dpll_pin_direction dir, u8 index)=0A= +{=0A= + bool sync_in =3D dir =3D=3D DPLL_PIN_DIRECTION_INPUT &&=0A= + index =3D=3D SIT9531X_INTSYNC_PIN_ID;=0A= + bool sync_out =3D dir =3D=3D DPLL_PIN_DIRECTION_OUTPUT &&=0A= + index =3D=3D SIT9531X_INTSYNC_OUT_PIN_ID;=0A= + bool xo =3D dir =3D=3D DPLL_PIN_DIRECTION_INPUT &&=0A= + index =3D=3D SIT9531X_MAX_INPUTS;=0A= + struct dpll_pin_frequency *ranges;=0A= + struct sit9531x_pin_props *props;=0A= + int i, j, num_freqs =3D 0, rc;=0A= + u32 *freqs =3D NULL;=0A= + const char *type;=0A= + u64 curr_freq;=0A= +=0A= + props =3D kzalloc_obj(*props, GFP_KERNEL);=0A= + if (!props)=0A= + return ERR_PTR(-ENOMEM);=0A= +=0A= + if (sync_in) {=0A= + /* INTSYNC destination: a reference the PLL can lock to. */=0A= + props->dpll_props.type =3D DPLL_PIN_TYPE_INT_OSCILLATOR;=0A= + props->dpll_props.capabilities =3D=0A= + DPLL_PIN_CAPABILITIES_STATE_CAN_CHANGE;=0A= + curr_freq =3D 0;=0A= + } else if (sync_out) {=0A= + /* INTSYNC source: driving it is not a reference selection */=0A= + props->dpll_props.type =3D DPLL_PIN_TYPE_INT_OSCILLATOR;=0A= + props->dpll_props.capabilities =3D=0A= + DPLL_PIN_CAPABILITIES_STATE_CAN_CHANGE;=0A= + curr_freq =3D 0;=0A= + } else if (xo) {=0A= + props->dpll_props.type =3D DPLL_PIN_TYPE_INT_OSCILLATOR;=0A= + props->dpll_props.capabilities =3D 0;=0A= + curr_freq =3D sitdev->xtal_freq;=0A= + } else if (dir =3D=3D DPLL_PIN_DIRECTION_INPUT) {=0A= + props->dpll_props.type =3D DPLL_PIN_TYPE_EXT;=0A= + props->dpll_props.capabilities =3D=0A= + DPLL_PIN_CAPABILITIES_STATE_CAN_CHANGE;=0A= + curr_freq =3D sitdev->ref[index].freq;=0A= + } else {=0A= + props->dpll_props.type =3D DPLL_PIN_TYPE_EXT;=0A= + props->dpll_props.capabilities =3D=0A= + DPLL_PIN_CAPABILITIES_STATE_CAN_CHANGE;=0A= + curr_freq =3D 0;=0A= + }=0A= +=0A= + sit9531x_prop_pin_package_label_set(sitdev, props, dir, index);=0A= +=0A= + /* Internal pins take no properties from the firmware node. */=0A= + if (sync_in || sync_out || xo)=0A= + goto skip_fwnode_props;=0A= +=0A= + rc =3D sit9531x_prop_pin_fwnode_get(sitdev, props, dir, index);=0A= + if (rc)=0A= + goto skip_fwnode_props;=0A= +=0A= + fwnode_property_read_string(props->fwnode, "label",=0A= + &props->dpll_props.board_label);=0A= +=0A= + if (!fwnode_property_read_string(props->fwnode, "connection-type",=0A= + &type)) {=0A= + if (!strcmp(type, "ext"))=0A= + props->dpll_props.type =3D DPLL_PIN_TYPE_EXT;=0A= + else if (!strcmp(type, "gnss"))=0A= + props->dpll_props.type =3D DPLL_PIN_TYPE_GNSS;=0A= + else if (!strcmp(type, "int"))=0A= + props->dpll_props.type =3D DPLL_PIN_TYPE_INT_OSCILLATOR;=0A= + else if (!strcmp(type, "synce"))=0A= + props->dpll_props.type =3D DPLL_PIN_TYPE_SYNCE_ETH_PORT;=0A= + else if (!strcmp(type, "mux"))=0A= + props->dpll_props.type =3D DPLL_PIN_TYPE_MUX;=0A= + else=0A= + dev_warn(sitdev->dev,=0A= + "Unknown pin type '%s'\n", type);=0A= + }=0A= +=0A= + if (!fwnode_property_present(props->fwnode,=0A= + "supported-frequencies-hz"))=0A= + goto skip_fwnode_props;=0A= +=0A= + /* A -hz property is 32-bit; no rate of this part needs more. */=0A= + num_freqs =3D fwnode_property_count_u32(props->fwnode,=0A= + "supported-frequencies-hz");=0A= + if (num_freqs <=3D 0) {=0A= + rc =3D num_freqs ? num_freqs : -EINVAL;=0A= + dev_err(sitdev->dev,=0A= + "malformed supported-frequencies-hz for %s: %d\n",=0A= + props->package_label, rc);=0A= + goto err_alloc_freqs;=0A= + }=0A= +=0A= + freqs =3D kcalloc(num_freqs, sizeof(*freqs), GFP_KERNEL);=0A= + if (!freqs) {=0A= + rc =3D -ENOMEM;=0A= + goto err_alloc_freqs;=0A= + }=0A= +=0A= + rc =3D fwnode_property_read_u32_array(props->fwnode,=0A= + "supported-frequencies-hz",=0A= + freqs, num_freqs);=0A= + if (rc) {=0A= + dev_warn(sitdev->dev,=0A= + "failed to parse supported-frequencies-hz for %s: %d\n",=0A= + props->package_label, rc);=0A= + goto err_alloc_ranges;=0A= + }=0A= +=0A= + /* The first listed rate seeds the input's rate */=0A= + if (num_freqs > 0 && dir =3D=3D DPLL_PIN_DIRECTION_INPUT && !xo)=0A= + curr_freq =3D freqs[0];=0A= +=0A= +skip_fwnode_props:=0A= + if (sync_in || sync_out)=0A= + return props;=0A= +=0A= + /* A rate written as a 64-bit cell reads as 0, then the rate */=0A= + for (i =3D 0; i < num_freqs; i++) {=0A= + if (!freqs[i]) {=0A= + rc =3D -EINVAL;=0A= + dev_err(sitdev->dev,=0A= + "malformed supported-frequencies-hz for %s: 0 Hz\n",=0A= + props->package_label);=0A= + goto err_alloc_ranges;=0A= + }=0A= + }=0A= +=0A= + /*=0A= + * An output with no listed rates gets the output rates of the=0A= + * datasheet; the XO gets its one rate.=0A= + */=0A= + ranges =3D kcalloc(num_freqs + 1 + ARRAY_SIZE(sit9531x_out_freq_mult),=0A= + sizeof(*ranges), GFP_KERNEL);=0A= + if (!ranges) {=0A= + rc =3D -ENOMEM;=0A= + goto err_alloc_ranges;=0A= + }=0A= +=0A= + /* Set after the last allocation that can fail */=0A= + if (curr_freq && dir =3D=3D DPLL_PIN_DIRECTION_INPUT)=0A= + sitdev->ref[index].freq =3D curr_freq;=0A= +=0A= + j =3D 0;=0A= +=0A= + for (i =3D 0; i < num_freqs; i++) {=0A= + struct dpll_pin_frequency freq =3D DPLL_PIN_FREQUENCY(freqs[i]);=0A= +=0A= + ranges[j++] =3D freq;=0A= + }=0A= +=0A= + if (!num_freqs && dir =3D=3D DPLL_PIN_DIRECTION_OUTPUT) {=0A= + /* Datasheet minimum 0.5 Hz; the core counts whole hertz */=0A= + ranges[j].min =3D 1;=0A= + ranges[j].max =3D SIT9531X_OUT_FREQ_CONT_MAX_HZ;=0A= + j++;=0A= + for (i =3D 0; i < ARRAY_SIZE(sit9531x_out_freq_mult); i++) {=0A= + u64 hz =3D SIT9531X_OUT_FREQ_STEP_HZ *=0A= + sit9531x_out_freq_mult[i];=0A= + struct dpll_pin_frequency f =3D DPLL_PIN_FREQUENCY(hz);=0A= +=0A= + ranges[j++] =3D f;=0A= + }=0A= + } else if (!num_freqs && curr_freq) {=0A= + struct dpll_pin_frequency f =3D DPLL_PIN_FREQUENCY(curr_freq);=0A= +=0A= + ranges[j++] =3D f;=0A= + }=0A= +=0A= + if (j > 0) {=0A= + props->dpll_props.freq_supported =3D ranges;=0A= + props->dpll_props.freq_supported_num =3D j;=0A= + } else {=0A= + kfree(ranges);=0A= + props->dpll_props.freq_supported =3D NULL;=0A= + props->dpll_props.freq_supported_num =3D 0;=0A= + }=0A= +=0A= + kfree(freqs);=0A= +=0A= + return props;=0A= +=0A= +err_alloc_ranges:=0A= + kfree(freqs);=0A= +err_alloc_freqs:=0A= + fwnode_handle_put(props->fwnode);=0A= + kfree(props);=0A= +=0A= + return ERR_PTR(rc);=0A= +}=0A= +=0A= +void sit9531x_pin_props_put(struct sit9531x_pin_props *props)=0A= +{=0A= + kfree(props->dpll_props.freq_supported);=0A= +=0A= + if (props->fwnode)=0A= + fwnode_handle_put(props->fwnode);=0A= +=0A= + kfree(props);=0A= +}=0A= +=0A= +enum dpll_type=0A= +sit9531x_prop_dpll_type_get(struct sit9531x_dev *sitdev, u8 index)=0A= +{=0A= + const char *types[SIT9531X_NUM_PLLS];=0A= + int count;=0A= +=0A= + count =3D device_property_read_string_array(sitdev->dev, "dpll-types",=0A= + types, ARRAY_SIZE(types));=0A= +=0A= + if (index >=3D count || !types[index])=0A= + return DPLL_TYPE_PPS;=0A= +=0A= + if (!strcmp(types[index], "pps"))=0A= + return DPLL_TYPE_PPS;=0A= + else if (!strcmp(types[index], "eec"))=0A= + return DPLL_TYPE_EEC;=0A= +=0A= + dev_warn(sitdev->dev, "Unknown DPLL type '%s', using default\n",=0A= + types[index]);=0A= +=0A= + return DPLL_TYPE_PPS;=0A= +}=0A= diff --git a/drivers/dpll/sit9531x/prop.h b/drivers/dpll/sit9531x/prop.h=0A= new file mode 100644=0A= index 000000000000..b16db0bc51c6=0A= --- /dev/null=0A= +++ b/drivers/dpll/sit9531x/prop.h=0A= @@ -0,0 +1,37 @@=0A= +/* SPDX-License-Identifier: GPL-2.0 */=0A= +/*=0A= + * SiTime SiT9531x firmware node property parsing=0A= + *=0A= + * Copyright (C) 2026 SiTime Corp.=0A= + * Author: Ali Rouhi =0A= + * Author: Oleg Zadorozhnyi =0A= + */=0A= +=0A= +#ifndef _SIT9531X_PROP_H=0A= +#define _SIT9531X_PROP_H=0A= +=0A= +#include =0A= +#include =0A= +=0A= +struct sit9531x_dev;=0A= +=0A= +/*=0A= + * struct sit9531x_pin_props - pin properties from firmware=0A= + * @fwnode: firmware node handle, NULL if no DT node=0A= + * @dpll_props: DPLL core pin properties=0A= + * @package_label: pin package label (e.g. "IN0", "OUT3")=0A= + */=0A= +struct sit9531x_pin_props {=0A= + struct fwnode_handle *fwnode;=0A= + struct dpll_pin_properties dpll_props;=0A= + char package_label[8];=0A= +};=0A= +=0A= +enum dpll_type sit9531x_prop_dpll_type_get(struct sit9531x_dev *sitdev,=0A= + u8 index);=0A= +struct sit9531x_pin_props *sit9531x_pin_props_get(struct sit9531x_dev *sit= dev,=0A= + enum dpll_pin_direction dir,=0A= + u8 index);=0A= +void sit9531x_pin_props_put(struct sit9531x_pin_props *props);=0A= +=0A= +#endif /* _SIT9531X_PROP_H */=0A= -- =0A= 2.39.2 (Apple Git-143)=0A= =0A=