Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1439874rwd; Thu, 15 Jun 2023 10:30:46 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4fwjGtVOCpSyxEdWxMArge1sSol///Agr/SueKl8v+gH3zU8ApTMUGRrsPBKyC+lqlzsb3 X-Received: by 2002:a05:6a21:3a93:b0:110:7edc:fb50 with SMTP id zv19-20020a056a213a9300b001107edcfb50mr90238pzb.9.1686850245635; Thu, 15 Jun 2023 10:30:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686850245; cv=none; d=google.com; s=arc-20160816; b=QPczmJxeMcYa9xA/CyD6PcrdidS+cGYrnWDiQy1ku8rIGlNKuz0nysIXf6eSPfKYjS bkVnnRTzdQgz2KKqaHjInWMdZ6PuH+E/Ue7SDGhVmyqJLl9sVaMKquCnH5w//Y8V3m4m uljtX45waoTNeHlKBMtqzBfkS1PE1Jn0SIfoj1mdiYNZuNgqiFE59i7lQCAqxliLudJ9 8RieWWC/kC8Vibws8Vse5NgZpsoaYppUdJKvLbPvhRHMuAXUn34WftHq3fZdzOEpm6yv vYWrYLa1IykhCBBUayBFLseO9FIjV6+vDp7qJvnaZrKKNxUxyV76xS+PLBmCzip+5wQk /YoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:mime-version :references:in-reply-to:message-id:date:subject:from:dkim-signature; bh=SwUrQGtfdJAfbPGuPioQpX3ZwqUQutzSyANTQ3rAAzw=; b=JjGVRH93YzyhWJm0o0ZbqB392jzjzoDdt1Y3IRkxCoyDi64giY4TbEnQAmdFO+WsbT Z1VDkD8icB3HBZWA5WslgLhrG37lJoNx2ZYNIcxvsy3TUDjkmE68bU6/0XjPtASa1Fsg 6Uxu8dphl7omVJYr+5n+EJJg3tLxzs3Ev4Qt9e77x5kClz1Wl/tAuCzdZWzT/MgkGBcD NsrtRZCnCE2gBUcsm3xjtOFd7yp60eljRRX/AmIgG5EQ1tMF4Y/ltcdRvuP+tn/VH2RL qcKoIrlHYvgiC0Y/s1D0V9gL65HGQ4EWRiEco3GGJQJlOHgo7Al/VuytGpuPL45lLJtK sbLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kwiboo.se header.s=s1 header.b=AMwf2Hpd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=kwiboo.se Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n12-20020a170903110c00b001ab1279d418si10014921plh.474.2023.06.15.10.30.33; Thu, 15 Jun 2023 10:30:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kwiboo.se header.s=s1 header.b=AMwf2Hpd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=kwiboo.se Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235826AbjFORMF (ORCPT + 99 others); Thu, 15 Jun 2023 13:12:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34516 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238099AbjFORMB (ORCPT ); Thu, 15 Jun 2023 13:12:01 -0400 Received: from s.wrqvtzvf.outbound-mail.sendgrid.net (s.wrqvtzvf.outbound-mail.sendgrid.net [149.72.126.143]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D3C91BF9 for ; Thu, 15 Jun 2023 10:11:55 -0700 (PDT) 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=SwUrQGtfdJAfbPGuPioQpX3ZwqUQutzSyANTQ3rAAzw=; b=AMwf2Hpdyvkd7i69t99g+qZJ9jtyPG9rteVAsinO8lpeNRIbbOB9Y1NHTAqw1kEUboIX Wp2ypBdurEoTq1nzyETIhOgWse33pC7/jmORGjvT2ccuTy6Lp75x1OxW1A7sx/QfQRbKm+ oCw26goRml136PvKzb+ClgRrs1L5xYP4J6VSE3oQpg0GkpGrVfLf7v6ygI92QAQNXu0pfn 8QbeZFChndwjVbMh9Un6LAL77QrYTbT65UEWvmHKIupaThEQJ4uoZGTh5bQTn4gBMZ5rf+ o1ABoCJIAhM8tpJ/LNd7zpA+FM7UtgdicRgHwt0Ht89ZepMry/kMdFRM630qEuJg== Received: by filterdrecv-84b96456cb-6l8hp with SMTP id filterdrecv-84b96456cb-6l8hp-1-648B45FD-25 2023-06-15 17:10:21.532681887 +0000 UTC m=+3087112.128091413 Received: from bionic.localdomain (unknown) by geopod-ismtpd-2 (SG) with ESMTP id A-l5S23OQY-HMDmXz1kwpQ Thu, 15 Jun 2023 17:10:21.207 +0000 (UTC) From: Jonas Karlman Subject: [PATCH v4 4/6] phy/rockchip: inno-hdmi: do not power on rk3328 post pll on reg write Date: Thu, 15 Jun 2023 17:10:21 +0000 (UTC) Message-Id: <20230615171005.2251032-5-jonas@kwiboo.se> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230615171005.2251032-1-jonas@kwiboo.se> References: <20230615171005.2251032-1-jonas@kwiboo.se> MIME-Version: 1.0 X-SG-EID: =?us-ascii?Q?TdbjyGynYnRZWhH+7lKUQJL+ZxmxpowvO2O9SQF5CwCVrYgcwUXgU5DKUU3QxA?= =?us-ascii?Q?fZekEeQsTe+RrMu3cja6a0h444tarc9ufij5dRA?= =?us-ascii?Q?eI1cNBIYAT3oqUvqrtRFevHr5kMKRB2WdkvXiol?= =?us-ascii?Q?zFWREqpE=2FjoQJRA6K5mU0FvT1bQmfn4z9+iu8Tr?= =?us-ascii?Q?7PXSUrh0pjH8Rh7C0fOso=2Ftc4rVvlGnlxouZLaV?= =?us-ascii?Q?3n1gkIx2donKFMJeoVnYRwcqRTUTUJlPCQaXaS?= To: Vinod Koul , Kishon Vijay Abraham I , Heiko Stuebner , Zheng Yang Cc: Alex Bee , linux-phy@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, Jonas Karlman , Kishon Vijay Abraham I X-Entity-ID: P7KYpSJvGCELWjBME/J5tg== Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_BL_SPAMCOP_NET, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org inno_write is used to configure 0xaa reg, that also hold the POST_PLL_POWER_DOWN bit. When POST_PLL_REFCLK_SEL_TMDS is configured the power down bit is not taken into consideration. Fix this by keeping the power down bit until configuration is complete. Also reorder the reg write order for consistency. Fixes: 53706a116863 ("phy: add Rockchip Innosilicon hdmi phy") Signed-off-by: Jonas Karlman --- v3: - no change drivers/phy/rockchip/phy-rockchip-inno-hdmi.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/phy/rockchip/phy-rockchip-inno-hdmi.c b/drivers/phy/rockchip/phy-rockchip-inno-hdmi.c index f027e0a2e26b..fe7fa9a43ec0 100644 --- a/drivers/phy/rockchip/phy-rockchip-inno-hdmi.c +++ b/drivers/phy/rockchip/phy-rockchip-inno-hdmi.c @@ -1020,9 +1020,10 @@ inno_hdmi_phy_rk3328_power_on(struct inno_hdmi_phy *inno, inno_write(inno, 0xac, RK3328_POST_PLL_FB_DIV_7_0(cfg->fbdiv)); if (cfg->postdiv == 1) { - inno_write(inno, 0xaa, RK3328_POST_PLL_REFCLK_SEL_TMDS); inno_write(inno, 0xab, RK3328_POST_PLL_FB_DIV_8(cfg->fbdiv) | RK3328_POST_PLL_PRE_DIV(cfg->prediv)); + inno_write(inno, 0xaa, RK3328_POST_PLL_REFCLK_SEL_TMDS | + RK3328_POST_PLL_POWER_DOWN); } else { v = (cfg->postdiv / 2) - 1; v &= RK3328_POST_PLL_POST_DIV_MASK; @@ -1030,7 +1031,8 @@ inno_hdmi_phy_rk3328_power_on(struct inno_hdmi_phy *inno, inno_write(inno, 0xab, RK3328_POST_PLL_FB_DIV_8(cfg->fbdiv) | RK3328_POST_PLL_PRE_DIV(cfg->prediv)); inno_write(inno, 0xaa, RK3328_POST_PLL_POST_DIV_ENABLE | - RK3328_POST_PLL_REFCLK_SEL_TMDS); + RK3328_POST_PLL_REFCLK_SEL_TMDS | + RK3328_POST_PLL_POWER_DOWN); } for (v = 0; v < 14; v++) -- 2.40.1