Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4E33EC25B4E for ; Tue, 24 Jan 2023 19:20:07 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 678C3856C4; Tue, 24 Jan 2023 20:20:05 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=189.cn Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 07A16856D2; Tue, 24 Jan 2023 20:20:03 +0100 (CET) Received: from 189.cn (ptr.189.cn [183.61.185.101]) by phobos.denx.de (Postfix) with ESMTP id ECAC9855B5 for ; Tue, 24 Jan 2023 20:19:57 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=189.cn Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=fatorangecat@189.cn HMM_SOURCE_IP: 10.64.8.43:38320.1486480034 HMM_ATTACHE_NUM: 0000 HMM_SOURCE_TYPE: SMTP Received: from clientip-175.153.168.29 (unknown [10.64.8.43]) by 189.cn (HERMES) with SMTP id 3131A1001E9; Wed, 25 Jan 2023 03:19:56 +0800 (CST) Received: from ([175.153.168.29]) by gateway-151646-dep-698c9d7bb7-s8g24 with ESMTP id 831762ee94104ff3976cd07bccfbb386 for u-boot@lists.denx.de; Wed, 25 Jan 2023 03:19:57 CST X-Transaction-ID: 831762ee94104ff3976cd07bccfbb386 X-Real-From: fatorangecat@189.cn X-Receive-IP: 175.153.168.29 X-MEDUSA-Status: 0 From: fatorangecat@189.cn To: u-boot@lists.denx.de Cc: jon.lin@rock-chips.com, kever.yang@rock-chips.com Subject: [PATCH 7/7] phy: phy-rockchip-snps-pcie3: Add pcie3_phymode setting Date: Wed, 25 Jan 2023 03:19:50 +0800 Message-Id: <20230124191950.88872-1-fatorangecat@189.cn> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean From: Jon Lin rk3588 pcie3 phy has a pcie3_phymode to decide how to use the four lanes, add support in dts so that we can customize in dts. The phy has two port and each port has two lane: pcie30_phy_mode[2:0] 2: aggregation 1: bifurcation for port 1 0: bifurcation for port 0 Signed-off-by: Kever Yang Signed-off-by: Jon Lin --- include/dt-bindings/phy/phy-snps-pcie3.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 include/dt-bindings/phy/phy-snps-pcie3.h diff --git a/include/dt-bindings/phy/phy-snps-pcie3.h b/include/dt-bindings/phy/phy-snps-pcie3.h new file mode 100644 index 0000000000..5006947f22 --- /dev/null +++ b/include/dt-bindings/phy/phy-snps-pcie3.h @@ -0,0 +1,21 @@ +/* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */ +/* + * Copyright (c) 2021 Rockchip Electronics Co., Ltd. + */ + +#ifndef _DT_BINDINGS_PHY_SNPS_PCIE3 +#define _DT_BINDINGS_PHY_SNPS_PCIE3 + +/* + * pcie30_phy_mode[2:0] + * bit2: aggregation + * bit1: bifurcation for port 1 + * bit0: bifurcation for port 0 + */ +#define PHY_MODE_PCIE_AGGREGATION 4 /* PCIe3x4 */ +#define PHY_MODE_PCIE_NANBNB 0 /* P1:PCIe3x2 + P0:PCIe3x2 */ +#define PHY_MODE_PCIE_NANBBI 1 /* P1:PCIe3x2 + P0:PCIe3x1*2 */ +#define PHY_MODE_PCIE_NABINB 2 /* P1:PCIe3x1*2 + P0:PCIe3x2 */ +#define PHY_MODE_PCIE_NABIBI 3 /* P1:PCIe3x1*2 + P0:PCIe3x1*2 */ + +#endif /* _DT_BINDINGS_PHY_SNPS_PCIE3 */ -- 2.39.1