Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp1142486rdb; Fri, 1 Dec 2023 08:04:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IFv/yB7yf3l6uaBs653e1L5kFwH8U1Lxui/kBDB/JRjpFEZ8vD/ShzRJYvHSLM8dUoczVSe X-Received: by 2002:a05:6a21:a5a0:b0:18a:e40c:682f with SMTP id gd32-20020a056a21a5a000b0018ae40c682fmr29139879pzc.41.1701446660482; Fri, 01 Dec 2023 08:04:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701446660; cv=none; d=google.com; s=arc-20160816; b=L4DdaLDs4qI2BMTBKvEMvTk5GMQ1gjXjGDnqTD59xXke+N8X4zqz0+Nf8c3u5vSg4y lFXk0ue9vLIQM0iiaMiNqO5qtYp4GXQ+hy2AeCAGq3d7lbhxaFRlwD+Ak7XP1CULoYrS GXerARg88hGy4nFzTYHxUBStryzz1gXZezXB1GKiCLJgICn07dYlbnW8k49AJDsUFBRO n0k8pr5WG1kF57t3DIJ3iAJdulXpIG1vcoBRyg983cEORQOvKOAA5IZzGAhmNc/6NXt0 6R8bbiquAHFQVQ3Ydhz40YB86Qf3XwvfRd1fip5TMHiUIdpEGt2jK/Fa38FoC3MH5RMf 1p8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=cDIFu6ARtZgz9yFryHS+Fpgu2EW71QboHnIfcbUaIfk=; fh=JlEqaHo16olj+en4U8W3Hjk8eoILo98+/p0t6SVA+c0=; b=xxPbnR9uwkT3QwD6Lh0narthdEnoYHDCXYpiqtCIA8bflOHoy7ilr3OmLCR8FndjPL 705eMtsB65H4Jd4OYZ1cMz1ABpI/XTtMIyXkr7jwcaJS/r2m9MLA900hczT3UFtWv79R A7izenL3vpvs2gcTl2riqPWTOEtQLZQp95YjQuRju509ESDF0YaYo13xz51kTKuLEY4I 7xgp0zQ9TsHswZTIEt+cIKRag9OVEwujaQF5941ceecLRlDm0ri9teXCWd3XMsSpLIT2 RTJ+cqF/FjOoIE4jApuKeo5VfJUMjQfHsCR/QwFR39XqtXQ5rjIHSpitm35TkfukQooQ OsMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XNhq00bM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id u8-20020a6540c8000000b005add209e106si3309647pgp.442.2023.12.01.08.04.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Dec 2023 08:04:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XNhq00bM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 36DD781CA66A; Fri, 1 Dec 2023 08:04:11 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230036AbjLAQDt (ORCPT + 99 others); Fri, 1 Dec 2023 11:03:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229598AbjLAQDs (ORCPT ); Fri, 1 Dec 2023 11:03:48 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 674B219E for ; Fri, 1 Dec 2023 08:03:55 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 02BDEC433C9; Fri, 1 Dec 2023 16:03:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701446635; bh=9lz4V6T3s7FtzNYEF3vq/lL88rTOR/qPlr59bt0P74A=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=XNhq00bMc4W3OYvg+KnG1p0EHAme+QA1msyZ4YsLOg8LV/yL2bfZ/dJeyFKIvrPFP nBp6pDpqs4AGHBt47903+iJKJUPnZbOVewn0LJF0AwDKoiZZnvLm6a412q8ZdujTaw SVD0F6mV+MHbKNJwVA+JFl5CsiHNZ1f6fKAmzP8gf7JYwBHtgrCFWgyCh7Ch2JDP0l X5tTTS6e7C19CYeERPpT+76ltSJZPVdeanfpwBeWC1iwAeA4LeR+kwGWbjlhs95Czy 8+5zY+O2ZRTrzpwBvzIEdybZ8vERgq2LijNBfNs2vyGEs8F6Jknv5IY9BZdNKP5pWZ rao/idOUiPS/g== Date: Fri, 1 Dec 2023 16:03:50 +0000 From: Conor Dooley To: Tzuyi Chang Cc: Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Stanley Chang Subject: Re: [PATCH 1/2] dt-bindings: phy: realtek: Add Realtek DHC RTD SoC PCIe PHY Message-ID: <20231201-umbilical-unending-c8fa05cb42d2@spud> References: <20231201105207.11786-1-tychang@realtek.com> <20231201105207.11786-2-tychang@realtek.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="plkfvTK++KeNoCJp" Content-Disposition: inline In-Reply-To: <20231201105207.11786-2-tychang@realtek.com> X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Fri, 01 Dec 2023 08:04:11 -0800 (PST) --plkfvTK++KeNoCJp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Dec 01, 2023 at 06:52:06PM +0800, Tzuyi Chang wrote: > Add the device tree bindings for the Realtek DHC(Digital Home Center) > RTD SoCs PCIe PHY. >=20 > Signed-off-by: Tzuyi Chang > --- > .../bindings/phy/realtek,rtd-pcie-phy.yaml | 61 +++++++++++++++++++ > 1 file changed, 61 insertions(+) > create mode 100644 Documentation/devicetree/bindings/phy/realtek,rtd-pci= e-phy.yaml >=20 > diff --git a/Documentation/devicetree/bindings/phy/realtek,rtd-pcie-phy.y= aml b/Documentation/devicetree/bindings/phy/realtek,rtd-pcie-phy.yaml > new file mode 100644 > index 000000000000..44ff23f698e6 > --- /dev/null > +++ b/Documentation/devicetree/bindings/phy/realtek,rtd-pcie-phy.yaml > @@ -0,0 +1,61 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +# Copyright 2023 Realtek Semiconductor Corporation > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/phy/realtek,rtd-pcie-phy.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Realtek DHC PCIe PHY > + > +maintainers: > + - Tzuyi Chang > + > +description: > + Realtek PCIe PHY supports the DHC(Digital Home Center) RTD series SoCs. > + The PCIe PHY driver is designed to support physical layer functionality > + of the PCIe controller. > + > +properties: > + compatible: > + enum: > + - realtek,rtd1319-pcie0-phy > + - realtek,rtd1319-pcie1-phy > + - realtek,rtd1319-pcie2-phy > + - realtek,rtd1619b-pcie1-phy > + - realtek,rtd1619b-pcie2-phy Please explain why different PHYs on the same SoC need different compatibles. > + - realtek,rtd1319d-pcie1-phy > + - realtek,rtd1315e-pcie1-phy And why bother with the 1 here given there is no 0 or 2? This looks suspiciously like abuse of the compatible - especially since most of the ops are the same despite the differing compatibles. The case where that does not apply, it looks like the issue is down to the portion of the nvmem cell corresponding to the PHY, which has nothing to do with the programming model of the PHY itself IMO. Cheers, Conor. > + > + "#phy-cells": > + const: 0 > + > + nvmem-cells: > + maxItems: 1 > + description: > + Phandle to nvmem cell that contains 'Tx swing trim' > + tuning parameter value for PCIe phy. > + > + nvmem-cell-names: > + items: > + - const: tx_swing_trim > + > + realtek,pcie-syscon: > + $ref: /schemas/types.yaml#/definitions/phandle > + description: phandle of syscon used to control PCIe MDIO register. > + > +required: > + - compatible > + - realtek,pcie-syscon > + - "#phy-cells" > + > +additionalProperties: false > + > +examples: > + - | > + pcie1_phy { > + compatible =3D "realtek,rtd1319d-pcie1-phy"; > + realtek,pcie-syscon =3D <&pcie1>; > + #phy-cells =3D <0>; > + nvmem-cells =3D <&otp_pcie_tx_swing_trim>; > + nvmem-cell-names =3D "tx_swing_trim"; > + }; > --=20 > 2.43.0 > --plkfvTK++KeNoCJp Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZWoD5gAKCRB4tDGHoIJi 0kopAP969dS+RHyZaMFpNcKy3CvurjimEZqsYofY/GYH97aSxAEAjCob1GhCewzI nJVKasHS5PXypGlEsGDWIUIAFn+TKwk= =ndUt -----END PGP SIGNATURE----- --plkfvTK++KeNoCJp--