From patchwork Tue Jul 16 09:05:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 812838 Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 307F3195F17 for ; Tue, 16 Jul 2024 09:05:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721120733; cv=none; b=uSQ4aPwjcVw+OHnVpXBDgOXtZAZl69YINFO+2L3KT5NxVIrR6w/qNtKnm1iSF0791U4kgUxy1u8i/FUAYp7oht+wn5AYmflxIst2g3eHWvHJ7F8kZDjVfqy4G/UNSKTGsGvOcWuE9XuKq8vZ1vOwSBrO7BY/hbLwaQxbKdAHheQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721120733; c=relaxed/simple; bh=wnZLZc/GruCNzhFntGEwskFTqjT74yheJIgcSlXmFBE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=UizleWJvKh71WAVKhjYZFwESowZwlG+74sQUiEIFQyqWCr1HBQ6jiNtqs469DSh0CyaSK0TIqMLpbTbBlU9fDqd1L3LYjB8VZe8dOfs/ucoBretMnjtwwINn6GNHuQEyS+yO3r1aG8HqRcAL0Q0Wr3Yy2+KDQCcJxFmycHkQ0zE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=P4La0nS/; arc=none smtp.client-ip=209.85.128.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="P4La0nS/" Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-4266182a9d7so33364775e9.0 for ; Tue, 16 Jul 2024 02:05:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721120730; x=1721725530; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=k7WEQ4IWufigJ+eDUg1Ui45rVWr+qV9YxcKK/eJOPrE=; b=P4La0nS/cxIAwcKiM9FJGGBrmmF1MwnZmpH5iz9n8KSf5MO6NIPiEGuVWXeccuSyJQ ZV/8HX9ND853iFXXZV8osJ0GDDPSi2/jGNpwK5JXbTupYHByW1OVYcMKZfoRZOLoylIo Py+wL67Lsk+z+orJVab5SBmIW+JUOEvji1o6iUE44qLYlXV0ixHykgLGN8xJK/N/Px/Y wZPji+qVxo+THIzi6Wdz1Ib+KkkJaIoet6d90bfWS2cvzW1s1lgGthJ8ro+/SSwyQccv 0y3zWmjNmsVJvE+L0JFrq+A8d01Ce32M8gKDOcGyMJ5iq3Lt5Z+f5EgrSejPiyCgrmh9 Om5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721120730; x=1721725530; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=k7WEQ4IWufigJ+eDUg1Ui45rVWr+qV9YxcKK/eJOPrE=; b=kcoFE8Ra/6bMt3CrbA0PAMCPPr46H9P+bG0S34KK14S7iJo/ntIS3aa6nToTkQkudB 34/sAyEIRChtIjbeWc/QZ381xeCqzt7OoTafvSj0vDLMcicsJADH/Hm8C4uDP6AwaRdL KiZxPE/LrpQGjfiot/ESjkdXS9bIfJmjfaaqdtGwmaJYXcje7cfmRXjGkdn783KOXIX3 5Qn/u9sPtqveWi8m9D4jTCdwhxScbmCptsIkIkd+sAOK+MNJxUZ3kv62TMvwp46Sm0gK navmYvhYGR0jjaAvY1NIdvu9+cBi1ULMe2dSlqZEwdHEnSjC2w5l0l92xPeK/+mW2ioT LLlQ== X-Gm-Message-State: AOJu0YzCqjUSv+VQfU3+9Eh+kG6MwTfDlf5WddsX08dR+pfLj712EgeK ynj2pKNvc9cbNr5wGniAbw8xDdboMhYTrXjN6sRblseSj4lhKMJLBSa2/63818A= X-Google-Smtp-Source: AGHT+IFjeXpjkmtgX6FEUXjWuap/YnDu0thUYlSz3pmmrD3NK6HcG2kCHxNu/8Oa88o2R8Ko68qnmA== X-Received: by 2002:a05:600c:1f90:b0:426:61ef:ec36 with SMTP id 5b1f17b1804b1-427ba48af4emr10652635e9.0.1721120729524; Tue, 16 Jul 2024 02:05:29 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4279f25a962sm148687875e9.12.2024.07.16.02.05.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jul 2024 02:05:29 -0700 (PDT) From: Neil Armstrong Date: Tue, 16 Jul 2024 11:05:21 +0200 Subject: [PATCH v3 1/3] clk: qcom: dispcc-sm8650: Park RCG's clk source at XO during disable Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240716-topic-sm8650-upstream-fix-dispcc-v3-1-5bfd56c899da@linaro.org> References: <20240716-topic-sm8650-upstream-fix-dispcc-v3-0-5bfd56c899da@linaro.org> In-Reply-To: <20240716-topic-sm8650-upstream-fix-dispcc-v3-0-5bfd56c899da@linaro.org> To: Bjorn Andersson , Michael Turquette , Stephen Boyd , Konrad Dybcio , Taniya Das Cc: linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Neil Armstrong X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1516; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=wnZLZc/GruCNzhFntGEwskFTqjT74yheJIgcSlXmFBE=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBmljfWqrAb6ndyNgnKgg7ukh84Jxo7IrJkDnrqRoYR nN0tz22JAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZpY31gAKCRB33NvayMhJ0RlqD/ 92xKbJzVONgVsHBSSXO/cIBq7vc9LYqh+FAMYJ+3TSxOc2GZ7qem5x9wpiuXpf7WHcGysVjQ4gbl2e Jhgx4yQQAHlE1IrYUBSyxqhw/+cnoJMDeSituw7U7/NhsWY5RJfQJOk56CRdzN6jZUCG3WLXe9QhrI EJ9r2sQzsDP1VNlTUCODpKIYrIpvQmmW3eTfGMBRt+fqzlFiRr2ENpS4Zo/zLZuQkbMTm9CbtFPMLQ LHL4Wulu2xZvzKrDeFvFXBtGf2ybmj5jYDeAaGM3VJU0j15agT4+rn6SX+gfkLzr8ZXARBwehby+0K tzKywkfNIVostlaBB8bBn0Vn1TqZ6Qu8vJkRiAHDlExIhTnyMQiDucPKQ7lYLyBkptZd7wyr449G38 q5pyIGscQW9Z+JewjH25K2pGQPlSb7MXLNV6gxS1jiuGGTdsHG/umYXWbx/V+ufspLHBe1mu4N5Eo6 yPwfgY9UfB520fOLoOhJclV2Pd/CKPfHAviDdOupoeni5n3Bk+IJYOSxIK2WbXIdVhbYC+P4rZye5P +riXuQRptsEzuB7m89mAPeGyEKSUFR0/d4OBMzMpg7SfarG87nkB6XO04I9htuTlLHTmBHqwkgeZFI /TmgaB284jeCRyxwSIk3r6uRG993pJVU+r41T1j51J5AjQEv0nOCL7tdslxQ== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE The RCG's clk src has to be parked at XO while disabling as per the HW recommendation, hence use clk_rcg2_shared_ops to achieve the same. It also changes dptx1_aux_clk_src to use the correct ops instead of clk_dp_ops. Fixes: 9e939f008338 ("clk: qcom: add the SM8650 Display Clock Controller driver") Signed-off-by: Neil Armstrong --- drivers/clk/qcom/dispcc-sm8650.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/clk/qcom/dispcc-sm8650.c b/drivers/clk/qcom/dispcc-sm8650.c index c9d2751f5cb8..80fe25afccf7 100644 --- a/drivers/clk/qcom/dispcc-sm8650.c +++ b/drivers/clk/qcom/dispcc-sm8650.c @@ -398,7 +398,7 @@ static struct clk_rcg2 disp_cc_mdss_dptx1_aux_clk_src = { .parent_data = disp_cc_parent_data_0, .num_parents = ARRAY_SIZE(disp_cc_parent_data_0), .flags = CLK_SET_RATE_PARENT, - .ops = &clk_dp_ops, + .ops = &clk_rcg2_ops, }, }; @@ -560,7 +560,7 @@ static struct clk_rcg2 disp_cc_mdss_esc0_clk_src = { .parent_data = disp_cc_parent_data_5, .num_parents = ARRAY_SIZE(disp_cc_parent_data_5), .flags = CLK_SET_RATE_PARENT, - .ops = &clk_rcg2_ops, + .ops = &clk_rcg2_shared_ops, }, }; @@ -575,7 +575,7 @@ static struct clk_rcg2 disp_cc_mdss_esc1_clk_src = { .parent_data = disp_cc_parent_data_5, .num_parents = ARRAY_SIZE(disp_cc_parent_data_5), .flags = CLK_SET_RATE_PARENT, - .ops = &clk_rcg2_ops, + .ops = &clk_rcg2_shared_ops, }, }; From patchwork Tue Jul 16 09:05:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 812837 Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com [209.85.208.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AB015196D98 for ; Tue, 16 Jul 2024 09:05:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.182 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721120735; cv=none; b=FDvbr5ypuP7ZBrS5dj6NbquGx0Gkxln28f4M5M38gaG68BKEvFZXck2QJkvCNtB9sopMbYdAWjiuhRy7foQ+98U11FJJXkmjTaMBhbLloc98x/Lwhle4FJutwWo60dj3RXtXs2ulBECndKiXdTsRbddPSrHm2OAK9HOt9sbcX3U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721120735; c=relaxed/simple; bh=MZMZPoolHX3qMdGwUMz1yB9aEjsIJY7Yl7a/GHyQBoE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=YFbtSr+1R4iW8jhG7urPUihxWkD4Q9qzV19MYX0if1LhdxPPMHkzjuKB5gwGlF1dkGlJ3d+x6v0Mc9Nr/jYqHusfT1DYDSzZ1wJKaBZblVnsDbOVZHQon5uiHd4ptjxwaoK6Zlcru57Io3XuO9WgATUrMFbWglTYiS60Ha3ABEQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=yBiAhxsI; arc=none smtp.client-ip=209.85.208.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="yBiAhxsI" Received: by mail-lj1-f182.google.com with SMTP id 38308e7fff4ca-2eec7e43229so62028941fa.3 for ; Tue, 16 Jul 2024 02:05:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721120732; x=1721725532; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=Us3Hv664jfEqjZ3ciHUK1driKOnsZFNkqmoGNoj/7B0=; b=yBiAhxsINP9aXEJ/C+4zd6bfet8bPoUQb0NSxsfJDJ27t3EDFoV6Xz8a7xTtelqCJr 97tUu4LDdKWn5tuBSMjvAB7wqIP1J+aqofx3sY3uvSrfNVFo0ys5wvSeM3YIIjmlcAH0 /tlCFPxSdmUA3VHCatztv0VD7iLsY6qpYNFHbeSUo7Ad2UhbzWWczdEMWF1yuWJVBXDb 0vcvFSpAkrGiG7QDEHLRDCg0Eul83eQb/1Tup4h1/Jr0FaNZRNW+Kx0avNMOI+IQXJdX wljai69B+nWeG/JSyx8fLsDgl8xVNZ2SVZcg+ar1/DxjD//GbqDTBxIbQa3S8ctsLRS5 0zMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721120732; x=1721725532; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Us3Hv664jfEqjZ3ciHUK1driKOnsZFNkqmoGNoj/7B0=; b=fUQ2QbJ9n/r3P8coBNSX/cMf0VknCjrKjpN5Fv7+PHc8YP0Pl3c5zUNpUOKmUXs5cq RHvuEV2BRtqPDLcs/lL7t9d5OaHfrBjhnJxzD5EQRUayjtXSJQNFjhO4w3BzNZW3aeyL ExqWKJ+sK9s0Yfu4me1dcbs9aBQXyC/GX5KjZ0fCiRISwUZZersF5I+vw2tBALcXwYje T5mk4mr05csD1enrOIVXmLgL114wf7IXsI6IrWD2w38YfwU3BajxBQ6l7A/poLsej5IS KCCivMb5ejkF/4dVur6QHgQUgkVrcQGTnNrTRgckvpdizgWeSP9kd/VQMD0LOddb+FC9 1Zhw== X-Gm-Message-State: AOJu0Yz8w6GOSIo3Sxk+yCNQJsy/5tnnUzzcMUb2p/V+iG9ZZJw06Wja i4DoMgM5UgQbDMqJBcWcNdHLk4AouqbGRI9QlGCBuhfbAGEQUroIZL73bTxSlAc= X-Google-Smtp-Source: AGHT+IGEPnIV2C4Xr3faXysx0L8tpOiMUBCIIbqgWwZSCkQ98IJiCgcs0GH9suvRSaEHxRG/LIYk+g== X-Received: by 2002:a2e:a365:0:b0:2ee:7bcd:a52 with SMTP id 38308e7fff4ca-2eef41ea33fmr10001781fa.46.1721120731269; Tue, 16 Jul 2024 02:05:31 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4279f25a962sm148687875e9.12.2024.07.16.02.05.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jul 2024 02:05:30 -0700 (PDT) From: Neil Armstrong Date: Tue, 16 Jul 2024 11:05:23 +0200 Subject: [PATCH v3 3/3] clk: qcom: dispcc-sm8650: Update the GDSC flags Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240716-topic-sm8650-upstream-fix-dispcc-v3-3-5bfd56c899da@linaro.org> References: <20240716-topic-sm8650-upstream-fix-dispcc-v3-0-5bfd56c899da@linaro.org> In-Reply-To: <20240716-topic-sm8650-upstream-fix-dispcc-v3-0-5bfd56c899da@linaro.org> To: Bjorn Andersson , Michael Turquette , Stephen Boyd , Konrad Dybcio , Taniya Das Cc: linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Neil Armstrong , Dmitry Baryshkov X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1187; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=MZMZPoolHX3qMdGwUMz1yB9aEjsIJY7Yl7a/GHyQBoE=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBmljfXaHYyFKQV+fSSyqGNqBRsHNmgNpSIXSNX35On 5OzrfYmJAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZpY31wAKCRB33NvayMhJ0WmMD/ 4wsWFo4a6vme47ZbsTis/pj3iRJEsYHc/sZZYffEZfC124nALG4AiQDoMbQgkwWEKHWsgYH17BkUbS t4ukQ2uxKDDcYN9sjMzSduAik6nCX++Bz3TuMpz9NI8nlc/3OEz7WEnuWCyb8R9k1ApevLT0I7Nam1 3WEao2gCMCRlfW7Svnjl1/mRuYPZ8RfleHCtsx8QeyiCR36TDKsYqOnA5yIpw6MwNySrFz3SS/BchQ mF8dzQCA+E5S1eGk4XiM8O0i+eFASdKXg3CVoL8hfh0DX+K5IsEGFcPuSOL3s1MYBYF4h59OMnOpAB Evu0u5IzS00BCXiap4qoF73hPssJ7Z1fKF3oHuVa41VtvAqa9KHGdyqlwqQYYZrH+Vb9Jv6/BH08V3 G7n52hXf4/sJ9pnyIwzPO72z4iMICh6APc8hTaKfiSbibjoG0KCpQPz59vIJmejqDNgu4fY3/Ci3Zr nRQs/sMPc+25q6aT/0BBl1SgwZRiiIA0zFNhDQDeTt832sdcfmT1OXUT7sI7JS13/hRwvsh5Ya5TWR qTZbj9XE/Ov+J0oeQ0KfbYcnAOeDR4jFmLDw2MXGaBjbVPZK/TSQpyvBpvAk4QxNQxNvwXH+eyK4Pv EW1k/I3tW9yWagP4tD1x9kIawfIV2y+PU7L1vhEg/qnHN8l3TDkUxEVVaK6A== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE Update the GDSC flags by adding missing POLL_CFG_GDSCR flag. Fixes: 9e939f008338 ("clk: qcom: add the SM8650 Display Clock Controller driver") Reviewed-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Signed-off-by: Neil Armstrong --- drivers/clk/qcom/dispcc-sm8650.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clk/qcom/dispcc-sm8650.c b/drivers/clk/qcom/dispcc-sm8650.c index f38f5f43acb2..bb99c1325717 100644 --- a/drivers/clk/qcom/dispcc-sm8650.c +++ b/drivers/clk/qcom/dispcc-sm8650.c @@ -1610,7 +1610,7 @@ static struct gdsc mdss_gdsc = { .name = "mdss_gdsc", }, .pwrsts = PWRSTS_OFF_ON, - .flags = HW_CTRL | RETAIN_FF_ENABLE, + .flags = POLL_CFG_GDSCR | HW_CTRL | RETAIN_FF_ENABLE, }; static struct gdsc mdss_int2_gdsc = { @@ -1619,7 +1619,7 @@ static struct gdsc mdss_int2_gdsc = { .name = "mdss_int2_gdsc", }, .pwrsts = PWRSTS_OFF_ON, - .flags = HW_CTRL | RETAIN_FF_ENABLE, + .flags = POLL_CFG_GDSCR | HW_CTRL | RETAIN_FF_ENABLE, }; static struct clk_regmap *disp_cc_sm8650_clocks[] = {