Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp1678801lqg; Sun, 3 Mar 2024 23:30:46 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUxYugJoBLK/xYVY8acE2SLGTukaT53yfCcKrOAIosBQsuK15BqicLCjJ1oicHYCH0O8f2wiKHth4NK4M2U27QZCX5mDmnntL2HJyawTg== X-Google-Smtp-Source: AGHT+IHBGjfU2tF5vOT52d5BIih1tQv62ELRHTofKiJUqE8VtEHZfcNLhq9WJJrwXvPT9ZuaPfy0 X-Received: by 2002:a05:622a:1101:b0:42e:e0df:aec3 with SMTP id e1-20020a05622a110100b0042ee0dfaec3mr5763445qty.31.1709537446716; Sun, 03 Mar 2024 23:30:46 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709537446; cv=pass; d=google.com; s=arc-20160816; b=Vs8oWYstxuMv10nBIObRNdUBOcYxnBP/f1gPU6C5q7Wnp/M6+FXulVcxxgPrER5MJg amN7RDeaC/GJKwcJo/PsqNJ/TQ9/YbIOl70w6cWGXvqvFDf/30Xg1Nv5n44OZOG4YfJt wIRtiXMgXgqfp7lHaTS9j+5q+B7qVjtf2F4AA65iD6uy75qSE452z7p4nYKLt1ZVZuEP ENhx1OmYf9m4MPmXCeIMiJRD9XAszHtokW+XSpwB0Y/cjJP4baZ+Gr6xx5aII2GOHQWe gOH3HhKjPp063tkwnJ/tzgox1UVpUJq79RIVGuhTCjx7qm9W0qeMsh9tlWPu/L+prxmX jWXA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=UgpgzV2Q/GbIWREFNI+aQD05ef1VFT6JlXRe9heDTVQ=; fh=ZQjoUSuUlDdmHAgr8T+6/MD46aZnX9V8FRvrtGtnNig=; b=QEpTFoR/LdG/m0RjC3ZxrCoJMCKBBmRVQdx4V424LTDUpswym3z2+B3/9AM6xb9hLP vp6VBInR66r9nxpZo/ZTrXZb0zxZrjgHWs4Sti6K3rcXwDQcwkVllZXWUloBuujChLts Z7AFk1j1CtCnMmn+721U4EOVKczteR3oJhICa/CDtamBKz+qt9YBYoP2nFa9siVOU6/K KKqUzYzUOSD5QWQLaQ5tqxqHlC0ikzfaCbwEHD3H3FJpDU4twXe3B6X1NH6bBJyIC7MZ AQAS+p0R1YXKxz2oSnvCpkExonxwOD8RXkJ+CCZpZU/JBzVO0ctfBxetdrYvaDcRzmOg Q6fw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oltmanns.dev header.s=MBO0001 header.b=l8NQhouH; arc=pass (i=1 spf=pass spfdomain=oltmanns.dev dkim=pass dkdomain=oltmanns.dev dmarc=pass fromdomain=oltmanns.dev); spf=pass (google.com: domain of linux-kernel+bounces-90131-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90131-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oltmanns.dev Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id f15-20020ac8464f000000b0042ec1b786f7si7759822qto.614.2024.03.03.23.30.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Mar 2024 23:30:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-90131-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@oltmanns.dev header.s=MBO0001 header.b=l8NQhouH; arc=pass (i=1 spf=pass spfdomain=oltmanns.dev dkim=pass dkdomain=oltmanns.dev dmarc=pass fromdomain=oltmanns.dev); spf=pass (google.com: domain of linux-kernel+bounces-90131-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90131-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oltmanns.dev Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 747531C21152 for ; Mon, 4 Mar 2024 07:30:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 28321168AF; Mon, 4 Mar 2024 07:30:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oltmanns.dev header.i=@oltmanns.dev header.b="l8NQhouH" Received: from mout-p-201.mailbox.org (mout-p-201.mailbox.org [80.241.56.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7FE6D14013; Mon, 4 Mar 2024 07:30:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.241.56.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709537418; cv=none; b=Do5Ao4BADEL1X/y9JjUl/vIdJGhVYXEV6pC4RD2tAS064YZCDl1YSgkoW9PC/BUtQETRgui9lIYYKstOw7EvWQUFlLtBjdPxkyYiDLLFLTxkjSR9/9hNG6L2QktMpwjnw8DcldghkENtPUAaQwhxFm2e/Aehg7cmwCeUoALeUx0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709537418; c=relaxed/simple; bh=kDpws4iby8ib+0jukh7K9mXcEL8OMyePEolpMUL5c7o=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=L66meiy0AseUQCgNA8xPnpix2DzxfqivntjZB8LSEFACKualO7cqZwrwKReLJHjdSoWTbUZ8HPFA69ysXAARopt7PU5ACKy3bMb0s9NbPNdtFh+m1AYWndQJD72dxtjLJ9ufNNrOlmD1jeVdfy7PWjgFLijStju0GdG6Mgt5KVI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oltmanns.dev; spf=pass smtp.mailfrom=oltmanns.dev; dkim=pass (2048-bit key) header.d=oltmanns.dev header.i=@oltmanns.dev header.b=l8NQhouH; arc=none smtp.client-ip=80.241.56.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oltmanns.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oltmanns.dev Received: from smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4Tp9MS4RGFz9stR; Mon, 4 Mar 2024 08:30:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oltmanns.dev; s=MBO0001; t=1709537412; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UgpgzV2Q/GbIWREFNI+aQD05ef1VFT6JlXRe9heDTVQ=; b=l8NQhouHHw02zPiTPi8CTZt2BeXjrl2oCRomvK5kD34eSkkb7kG1pZQzb6XkyYNJfWrQDg 4eBe0rijvramhPIZKQXWJZxYusiy2oGxBjEtRySfBvmXvlrb03fhZtY6h+MQSxM2M9c4RB fo2eGErHtXOpSXtV9NQauTzBIkQPezQrbzQqac43IjSENN9kSbyw5zRSO5+H7uSZ/rvNDN DdLMpSG1q8i8bKprRsfAJHwDvVpBLiUTFK37W+fGR8KjomsoOA1iNbn3lL6fN2ID8LeyP7 toYasuIckywR9/yEi91m/ikvhHwSuaavJ9XjgKKPxzLU9y+CFyw7bm9r0iW3+w== From: Frank Oltmanns Date: Mon, 04 Mar 2024 08:29:18 +0100 Subject: [PATCH v3 2/5] clk: sunxi-ng: a64: Set minimum and maximum rate for PLL-MIPI Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240304-pinephone-pll-fixes-v3-2-94ab828f269a@oltmanns.dev> References: <20240304-pinephone-pll-fixes-v3-0-94ab828f269a@oltmanns.dev> In-Reply-To: <20240304-pinephone-pll-fixes-v3-0-94ab828f269a@oltmanns.dev> To: Michael Turquette , Stephen Boyd , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , =?utf-8?q?Guido_G=C3=BCnther?= , Purism Kernel Team , Ondrej Jirman , Neil Armstrong , Jessica Zhang , Sam Ravnborg , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, Frank Oltmanns , Diego Roversi , stable@vger.kernel.org X-Developer-Signature: v=1; a=openpgp-sha256; l=1471; i=frank@oltmanns.dev; h=from:subject:message-id; bh=kDpws4iby8ib+0jukh7K9mXcEL8OMyePEolpMUL5c7o=; b=owEB7QES/pANAwAIAZppogiUStPHAcsmYgBl5XhwgX3a4/s+n5hG05HBi6whjKEoqn9VxH3hT kU0ltspgoWJAbMEAAEIAB0WIQQC/SV7f5DmuaVET5aaaaIIlErTxwUCZeV4cAAKCRCaaaIIlErT x4QCC/9XbbJOFIoX2zdz6xo2rY0S6JXjrsQNk3zEBcedF7tVA3C9NOEGeThCxeRGBwyEM0G1Jm/ 6b9GqpMRi0NcAEpIiaVMK71o59Z/S0DXxbkPTa9oYkpkq1KzehEcGS0K7dNtE5LfwRYFPUVYjyi gDEGQkO+ncjBo9uXbdpFNHeLg/j0Hah4k8lFJfSoQwK3m4/Dz7nZ3tC1Ul/iDHluuchD/3F0Fu8 q/4Due10vh8EHiDO7K0lZpbE6a2oL4EZXSL/YWlJo3EPufvOQzVNmX0dEsEbf/0Cv3bdDylPsPT m2Rw0gzhMjLvudqz96hBz30qgVA+bmUyx2ENM9ME7jhu0wmgwqww2PCFJwTUtaYyq5v+R5LbxzC 6dMobEI5ahAEJZypeV5yc+kZGa+uok8d6f0qGs7ZVOlWfjeob8vzEgv1GqLkRkA6Fn5W17vOuya 8rKnEmKvmA1XVqI1XacEtkXDFpLjYF1+Ab4b51STuQCNx+POYQWvRTh4dCrS7C9hdLoQU= X-Developer-Key: i=frank@oltmanns.dev; a=openpgp; fpr=02FD257B7F90E6B9A5444F969A69A208944AD3C7 When the Allwinner A64's TCON0 searches the ideal rate for the connected panel, it may happen that it requests a rate from its parent PLL-MIPI which PLL-MIPI does not support. This happens for example on the Olimex TERES-I laptop where TCON0 requests PLL-MIPI to change to a rate of several GHz which causes the panel to stay blank. It also happens on the pinephone where a rate of less than 500 MHz is requested which causes instabilities on some phones. Set the minimum and maximum rate of Allwinner A64's PLL-MIPI according to the Allwinner User Manual. Fixes: ca1170b69968 ("clk: sunxi-ng: a64: force select PLL_MIPI in TCON0 mux") Reported-by: Diego Roversi Closes: https://groups.google.com/g/linux-sunxi/c/Rh-Uqqa66bw Signed-off-by: Frank Oltmanns Tested-by: Diego Roversi Cc: stable@vger.kernel.org --- drivers/clk/sunxi-ng/ccu-sun50i-a64.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/clk/sunxi-ng/ccu-sun50i-a64.c b/drivers/clk/sunxi-ng/ccu-sun50i-a64.c index 8951ffc14ff5..6a4b2b9ef30a 100644 --- a/drivers/clk/sunxi-ng/ccu-sun50i-a64.c +++ b/drivers/clk/sunxi-ng/ccu-sun50i-a64.c @@ -182,6 +182,8 @@ static struct ccu_nkm pll_mipi_clk = { &ccu_nkm_ops, CLK_SET_RATE_UNGATE | CLK_SET_RATE_PARENT), .features = CCU_FEATURE_CLOSEST_RATE, + .min_rate = 500000000, + .max_rate = 1400000000, }, }; -- 2.44.0