From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 951C0C433EF for ; Thu, 12 May 2022 12:17:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352872AbiELMRf (ORCPT ); Thu, 12 May 2022 08:17:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42104 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353589AbiELMRe (ORCPT ); Thu, 12 May 2022 08:17:34 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E2A0C54BDB for ; Thu, 12 May 2022 05:17:32 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 1383A106F; Thu, 12 May 2022 05:17:32 -0700 (PDT) Received: from [10.57.80.111] (unknown [10.57.80.111]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 84F843F66F; Thu, 12 May 2022 05:17:29 -0700 (PDT) Message-ID: Date: Thu, 12 May 2022 13:17:23 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: [PATCH v11 20/24] arm64: dts: rockchip: enable vop2 and hdmi tx on rock-3a Content-Language: en-GB To: Peter Geis , Piotr Oniszczuk Cc: Sascha Hauer , Michael Riesch , dri-devel@lists.freedesktop.org, "linux-arm-kernel@lists.infradead.org" , "open list:ARM/Rockchip SoC..." , "devicetree@vger.kernel.org" , kernel@pengutronix.de, Andy Yan , Benjamin Gaignard , Sandy Huang , =?UTF-8?Q?Heiko_St=c3=bcbner?= , kernel test robot References: <20220422072841.2206452-1-s.hauer@pengutronix.de> <20220422072841.2206452-21-s.hauer@pengutronix.de> From: Robin Murphy In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On 2022-05-08 17:53, Peter Geis wrote: > On Sun, May 8, 2022 at 9:40 AM Piotr Oniszczuk > wrote: >> >> >> >>> Wiadomość napisana przez Sascha Hauer w dniu 22.04.2022, o godz. 09:28: >>> >>> From: Michael Riesch >>> >>> Enable the RK356x Video Output Processor (VOP) 2 on the Radxa >>> ROCK3 Model A. >>> >>> Signed-off-by: Michael Riesch >>> Reported-by: kernel test robot >>> Link: https://lore.kernel.org/r/20220310210352.451136-4-michael.riesch@wolfvision.net >>> Signed-off-by: Sascha Hauer >>> --- >> >> Sascha, Michael, > > Good Afternoon, >> >> I'm using v11 series on 5.18-rc5 on rk3566 tvbox with great success. >> Recently i started to work on rock3-a (rk3568). >> v11 gives me video, audio - but cec is not working on rock3-a. >> >> I was told: >> >> 32k clock needed for cec and this clock is generated by the rtc which is embedded in the rk8xx regulator. >> So you should make sure it is enabled when hdmi is powerd on, eg adding it to the RK3568_PD_VO powerdomain should help >> >> I was trying to do this in dts https://pastebin.com/67wu9QrH but cec is still non-functional >> >> Maybe You have some hints/pointers here? > > Add the following to the HDMI node: > assigned-clocks = <&cru CLK_HDMI_CEC>; > assigned-clock-rates = <32768>; > > The issue is the clk_rtc32k_frac clock that feeds clk_rtc_32k which > feeds clk_hdmi_cec is 24mhz at boot, which is too high for CEC to > function. > I submitted a patch to have the hdmi driver handle this, but it broke > other SoCs because 32k is an optional clock. > Since this is the case, I'd like Robin to weigh in on going the > assigned-clock route again. (did you mean to CC me or have I missed another thread elsewhere?) FWIW I still think it would be good to fix the clock driver(s) and/or DTs to correctly deal with the availability and configuration of xin_32k where appropriate. However, much like the HCLK_VO mess I guess that's a larger cleanup tangent in its own right, so using "assigned-clocks" for this one case in the meantime doesn't seem unreasonable. I was optimistic for the cleanest, most generic solution, but if reality gets in the way then oh well. Judging by the datasheet, RK3568 might actually have a similar situation with its clk32k_in pin, so you may want "assigned-clock-parents" as well to ensure the whole clk_rtc32k branch is really set up the way you currently expect - baking any more assumptions into DTBs now only seems to add potential for breakage if kernel behaviour changes in future. Robin.