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 0E0FDC001E0 for ; Wed, 2 Aug 2023 19:43:04 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 31C0F8685D; Wed, 2 Aug 2023 21:43:03 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kwiboo.se Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kwiboo.se header.i=@kwiboo.se header.b="G6ustWzN"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9307E8686F; Wed, 2 Aug 2023 21:43:01 +0200 (CEST) Received: from wfbtzhsw.outbound-mail.sendgrid.net (wfbtzhsw.outbound-mail.sendgrid.net [159.183.224.105]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 4D38886842 for ; Wed, 2 Aug 2023 21:42:59 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kwiboo.se Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=bounces+31435339-7456-u-boot=lists.denx.de@em2124.kwiboo.se DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kwiboo.se; h=from:subject:in-reply-to:references:mime-version:to:cc: content-transfer-encoding:content-type:cc:content-type:from:subject:to; s=s1; bh=4y6uVRgaNHjrsqsj7y0bGud2dH0lh7JIOp38TSp3nUo=; b=G6ustWzN/Xq5UY80ajHV6UKt03gVkXiF+xqYfxHE7B4Qap4gauZpCHw7VqKq51SDGmgW W2NXabHgDN/pUxL6U2sGPR2zYdOlXeyYYZ3Pk2sWT5Yh/tu+DzSjAxDH8W20DjNbiXHQxQ zsRooUT5DQ6G2ggQlrNUkrfBGyNi1m1qbeqTNTOJnq3YUI08MwRNWCnq0uszDJUpU70236 mvSMqaSbsm7GOvpqFHpr2UKV85QZ6TbLgLZ4/zYznwJ7oFndXw8MDVB9D+EIZpujF3hZ1A Gy0xy1ND+K/+0LV/MBUML/ykutiCShkSg14FxX/+ltQKmw1v/dVLpTkTjn3bFjcA== Received: by filterdrecv-77869f68cc-4fn5s with SMTP id filterdrecv-77869f68cc-4fn5s-1-64CAB162-2F 2023-08-02 19:41:22.768424723 +0000 UTC m=+4657240.196153475 Received: from bionic.localdomain (unknown) by geopod-ismtpd-3 (SG) with ESMTP id f4qb0P5zSl2TY9rqnaF2Hw for ; Wed, 02 Aug 2023 19:41:22.583 +0000 (UTC) From: Jonas Karlman Subject: [PATCH v2 6/7] phy: rockchip: naneng-combphy: Use signal from comb PHY on RK3588 Date: Wed, 02 Aug 2023 19:41:22 +0000 (UTC) Message-ID: <20230802190424.2963185-7-jonas@kwiboo.se> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230802190424.2963185-1-jonas@kwiboo.se> References: <20230802190424.2963185-1-jonas@kwiboo.se> MIME-Version: 1.0 X-SG-EID: =?us-ascii?Q?TdbjyGynYnRZWhH+7lKUQJL+ZxmxpowvO2O9SQF5CwCVrYgcwUXgU5DKUU3QxA?= =?us-ascii?Q?fZekEeQsTe+RrMu3cja6a0h6mKReGXdTG8BcdnV?= =?us-ascii?Q?SiTAbDoEjHmo0QM24nCmN5TOEjtX6p5pcc4JCbH?= =?us-ascii?Q?jGw8r2or7HuJ1BOEfG2c2WqFuNALZUFnLe61=2F67?= =?us-ascii?Q?NXgWQZXDKbJ+SkrujV8lKRqIFZCu8OfHRUbgsZy?= =?us-ascii?Q?RKbGI511=2FLnQhtx7nj4522mp=2FQbOv1EbbSJRm2?= To: Kever Yang , Simon Glass , Philipp Tomsich , Jon Lin , Eugen Hristev Cc: FUKAUMI Naoki , John Clark , u-boot@lists.denx.de, Jonas Karlman X-Entity-ID: P7KYpSJvGCELWjBME/J5tg== Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii 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.8 at phobos.denx.de X-Virus-Status: Clean Route signal from comb PHY instead of PCIe3 PHY to PCIe1l0 and PCIe1l1. Fixes use of pcie2x1l0 on ROCK 5B. Code imported from mainline linux driver. Fixes: c5b4a012bca8 ("phy: rockchip: naneng-combphy: Support rk3588") Signed-off-by: Jonas Karlman --- v2: - New patch drivers/phy/rockchip/phy-rockchip-naneng-combphy.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c b/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c index d5408ccac976..9ca66bf8db92 100644 --- a/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c +++ b/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c @@ -61,6 +61,8 @@ struct rockchip_combphy_grfcfg { struct combphy_reg pipe_con1_for_sata; struct combphy_reg pipe_sgmii_mac_sel; struct combphy_reg pipe_xpcs_phy_ready; + struct combphy_reg pipe_pcie1l0_sel; + struct combphy_reg pipe_pcie1l1_sel; struct combphy_reg u3otg0_port_en; struct combphy_reg u3otg1_port_en; }; @@ -435,6 +437,8 @@ static int rk3588_combphy_cfg(struct rockchip_combphy_priv *priv) param_write(priv->phy_grf, &cfg->con1_for_pcie, true); param_write(priv->phy_grf, &cfg->con2_for_pcie, true); param_write(priv->phy_grf, &cfg->con3_for_pcie, true); + param_write(priv->pipe_grf, &cfg->pipe_pcie1l0_sel, true); + param_write(priv->pipe_grf, &cfg->pipe_pcie1l1_sel, true); break; case PHY_TYPE_USB3: param_write(priv->phy_grf, &cfg->pipe_txcomp_sel, false); @@ -507,6 +511,8 @@ static const struct rockchip_combphy_grfcfg rk3588_combphy_grfcfgs = { /* pipe-grf */ .pipe_con0_for_sata = { 0x0000, 11, 5, 0x00, 0x22 }, .pipe_con1_for_sata = { 0x0000, 2, 0, 0x00, 0x2 }, + .pipe_pcie1l0_sel = { 0x0100, 0, 0, 0x01, 0x0 }, + .pipe_pcie1l1_sel = { 0x0100, 1, 1, 0x01, 0x0 }, }; static const struct rockchip_combphy_cfg rk3588_combphy_cfgs = { -- 2.41.0