Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp4986218pxb; Tue, 5 Oct 2021 14:54:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz+CeYmLze4lty4Un3PCYVFaqW1g00D6HiIapgstvwTxdFCmltjbmjyF5WHBA74rpb7BiP0 X-Received: by 2002:a17:906:2f10:: with SMTP id v16mr27760652eji.434.1633470880474; Tue, 05 Oct 2021 14:54:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633470880; cv=none; d=google.com; s=arc-20160816; b=s+BwIhyh7JXTfTaztH3mVP7kttkMpC4Yt0403h4lJeczotW3oPIc8v+nJagWNGmZT6 aHO8yLTS3QElSRnJIMS+z1JAjw8Ma/2zXS/ThOaoIAWOcd4u9YTzMJuy0bPti6bIXWJA +FqDoCNeKLgf4IQKrEUtlc9l6aM0hCgev89WVuzoVKzmYxxZL+/EDp7+nynhN7mJfcvP QmlUzQmhNAATMtIQbea56Fzg7og/7k10djlEF84wlo7ytD270CqoY7eeAWOZZihe3I0r FdHPMoJQiVntuYTJ7XnNABnlMv650bx9bTJMQNF9hLOiJd2Y2QB8SMd2Cns9Bd9Xte3H QXig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:cc:to:subject:from:date; bh=r538MzNGhMdjQpvUGZHpAOt2e1uec93LF10GNYploM8=; b=HWyynpY4DMTtlvceFyZFz5ALoc6A8kdm0LMQJJ6dzgt9PK+N95k8Up+dnpvWjWZibC NEum59DWJjcVPLKLSs0u26Sv3TVWWclwUeYWpNsu8aaTbJsU1x1POVqDOGPfqsHNGOwY Rge0jCbjarReMoCDX2JR16GGgrszqMzTdJ/Bjk90kplcqm3gPDKGJyLBHgn0HpIEvECw MMyfDh59VSZBcrwU4ClBXdI6Sjm9/XVJ2ctX8T2n0km2XETGoonPtd33elWKpFjN9SpV sAEvQ95wetqZ5q+A6+gHh1vh95QuBUFQYCjiRcLKtNRfwbGxFqwCmL2duFlRzqzHECRL 2HGA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r17si11332201ejc.105.2021.10.05.14.54.15; Tue, 05 Oct 2021 14:54:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236750AbhJEVym convert rfc822-to-8bit (ORCPT + 99 others); Tue, 5 Oct 2021 17:54:42 -0400 Received: from aposti.net ([89.234.176.197]:60558 "EHLO aposti.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229974AbhJEVym (ORCPT ); Tue, 5 Oct 2021 17:54:42 -0400 Date: Tue, 05 Oct 2021 22:52:35 +0100 From: Paul Cercueil Subject: Re: [PATCH v5 5/7] MIPS: DTS: jz4780: Account for Synopsys HDMI driver and LCD controllers To: Paul Boddie Cc: "H. Nikolaus Schaller" , Rob Herring , Mark Rutland , Thomas Bogendoerfer , Geert Uytterhoeven , Kees Cook , "Eric W. Biederman" , Miquel Raynal , David Airlie , Daniel Vetter , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jernej Skrabec , Ezequiel Garcia , Harry Wentland , Sam Ravnborg , Maxime Ripard , Hans Verkuil , Liam Girdwood , Mark Brown , devicetree@vger.kernel.org, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, letux-kernel@openphoenux.org, Jon as Karlman , dri-devel@lists.freedesktop.org Message-Id: In-Reply-To: <3514743.EH6qe8WxYI@jason> References: <3514743.EH6qe8WxYI@jason> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Paul, Le mar., oct. 5 2021 at 23:44:12 +0200, Paul Boddie a ?crit : > On Tuesday, 5 October 2021 22:50:12 CEST Paul Cercueil wrote: >> Hi Nikolaus & Paul, >> >> Le mar., oct. 5 2021 at 14:29:17 +0200, H. Nikolaus Schaller > a ?crit : >> > >> > diff --git a/arch/mips/boot/dts/ingenic/jz4780.dtsi >> > b/arch/mips/boot/dts/ingenic/jz4780.dtsi >> > index 9e34f433b9b5..c3c18a59c377 100644 >> > --- a/arch/mips/boot/dts/ingenic/jz4780.dtsi >> > +++ b/arch/mips/boot/dts/ingenic/jz4780.dtsi >> > @@ -424,6 +424,51 @@ i2c4: i2c@10054000 { >> > >> > status = "disabled"; >> > >> > }; >> > >> > + hdmi: hdmi@10180000 { >> > + compatible = "ingenic,jz4780-dw-hdmi"; >> > + reg = <0x10180000 0x8000>; >> > + reg-io-width = <4>; >> > + >> > + clocks = <&cgu JZ4780_CLK_AHB0>, <&cgu JZ4780_CLK_HDMI>; >> > + clock-names = "iahb", "isfr"; >> > + >> > + assigned-clocks = <&cgu JZ4780_CLK_HDMI>; >> > + assigned-clock-rates = <27000000>; >> >> Any reason why this is set to 27 MHz? Is it even required? Because >> with >> the current ci20.dts, it won't be clocked at anything but 48 MHz. > > EXCLK will be 48MHz, but the aim is to set the HDMI peripheral clock > to 27MHz, > which is supposedly required. I vaguely recall a conversation about > whether we > were doing this right, but I don't recall any conclusion. But right now your HDMI clock is 48 MHz and HDMI works. >> > + >> > + interrupt-parent = <&intc>; >> > + interrupts = <3>; >> > + >> > + /* ddc-i2c-bus = <&i2c4>; */ >> > + >> > + status = "disabled"; >> > + }; >> > + >> > + lcdc0: lcdc0@13050000 { >> > + compatible = "ingenic,jz4780-lcd"; >> > + reg = <0x13050000 0x1800>; >> > + >> > + clocks = <&cgu JZ4780_CLK_TVE>, <&cgu JZ4780_CLK_LCD0PIXCLK>; >> > + clock-names = "lcd", "lcd_pclk"; >> > + >> > + interrupt-parent = <&intc>; >> > + interrupts = <31>; >> > + >> > + status = "disabled"; >> >> I think you can keep lcdc0 enabled by default (not lcdc1 though), >> since >> it is highly likely that you'd want that. > > As far as I know, the clock gating for the LCD controllers acts like > a series > circuit, meaning that they both need to be enabled. Some testing > seemed to > confirm this. Indeed, I seem to remember only enabling one clock and > not > getting any output until I figured this weird arrangement out. I'm not talking about clocks though, but about LCDC0 and LCDC1. Cheers, -Paul