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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 60622C433EF for ; Tue, 9 Nov 2021 20:36:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4200561184 for ; Tue, 9 Nov 2021 20:36:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244476AbhKIUjN convert rfc822-to-8bit (ORCPT ); Tue, 9 Nov 2021 15:39:13 -0500 Received: from aposti.net ([89.234.176.197]:52358 "EHLO aposti.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244036AbhKIUjN (ORCPT ); Tue, 9 Nov 2021 15:39:13 -0500 Date: Tue, 09 Nov 2021 20:36:06 +0000 From: Paul Cercueil Subject: Re: [PATCH v5 5/7] MIPS: DTS: jz4780: Account for Synopsys HDMI driver and LCD controllers To: "H. Nikolaus Schaller" Cc: Paul Boddie , Rob Herring , Mark Rutland , Thomas Bogendoerfer , Geert Uytterhoeven , Kees Cook , "Eric W. Biederman" , Miquel Raynal , David Airlie , Daniel Vetter , Neil Armstrong , Robert Foss , Laurent Pinchart , Jernej Skrabec , Ezequiel Garcia , Harry Wentland , Sam Ravnborg , Maxime Ripard , Hans Verkuil , Liam Girdwood , Mark Brown , OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS , linux-mips , linux-kernel , Discussions about the Letux Kernel , Jon as Karlman , dri-devel Message-Id: <6WNB2R.GJ2KT1BB7QOY1@crapouillou.net> In-Reply-To: References: <3514743.EH6qe8WxYI@jason> <95D1DE70-DDF4-419B-8F0C-E9A6E0995D1F@goldelico.com> 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-mips@vger.kernel.org Hi Nikolaus, Le mar., nov. 9 2021 at 21:19:17 +0100, H. Nikolaus Schaller a écrit : > Hi Paul, > >> Am 07.11.2021 um 20:05 schrieb Paul Cercueil : >> >>> 6. Therefore I think it *may* work overclocked with 48MHz >>> but is not guaranteed or reliable above 27 MHz. >>> So everything is ok here. >> >> One thing though - the "assigned-clocks" and >> "assigned-clock-rates", while it works here, should be moved to the >> CGU node, to respect the YAML schemas. > > Trying to do this seems to break boot. > > I can boot up to > > [ 8.312926] dw-hdmi-ingenic 10180000.hdmi: registered DesignWare > HDMI I2C bus driver > > and > > [ 11.366899] [drm] Initialized ingenic-drm 1.1.0 20200716 for > 13050000.lcdc0 on minor 0 > > but then the boot process becomes slow and hangs. Last sign of > activity is > > [ 19.347659] hub 1-0:1.0: USB hub found > [ 19.353478] hub 1-0:1.0: 1 port detected > [ 32.321760] wlan0_power: disabling > > What I did was to just move > > assigned-clocks = <&cgu JZ4780_CLK_HDMI>; > assigned-clock-rates = <27000000>; > > from > > hdmi: hdmi@10180000 { > > to > > cgu: jz4780-cgu@10000000 { > > Does this mean the clock is assigned too early or too late? > > Do you have any suggestions since I don't know the details of CGU. These properties are already set for the CGU node in ci20.dts: &cgu { /* * Use the 32.768 kHz oscillator as the parent of the RTC for a higher * precision. */ assigned-clocks = <&cgu JZ4780_CLK_OTGPHY>, <&cgu JZ4780_CLK_RTC>; assigned-clock-parents = <0>, <&cgu JZ4780_CLK_RTCLK>; assigned-clock-rates = <48000000>; }; So you want to update these properties to add the HDMI clock setting, like this: assigned-clocks = <&cgu JZ4780_CLK_OTGPHY>, <&cgu JZ4780_CLK_RTC>, <&cgu JZ4780_CLK_HDMI>; assigned-clock-parents = <0>, <&cgu JZ4780_CLK_RTCLK>; assigned-clock-rates = <48000000>, <0>, <27000000>; Cheers, -Paul 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 625CEC433F5 for ; Tue, 9 Nov 2021 20:36:26 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1CCE161181 for ; Tue, 9 Nov 2021 20:36:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 1CCE161181 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=crapouillou.net Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 33BDF89AAD; Tue, 9 Nov 2021 20:36:25 +0000 (UTC) Received: from aposti.net (aposti.net [89.234.176.197]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0639F89B27 for ; Tue, 9 Nov 2021 20:36:23 +0000 (UTC) Date: Tue, 09 Nov 2021 20:36:06 +0000 From: Paul Cercueil Subject: Re: [PATCH v5 5/7] MIPS: DTS: jz4780: Account for Synopsys HDMI driver and LCD controllers To: "H. Nikolaus Schaller" Message-Id: <6WNB2R.GJ2KT1BB7QOY1@crapouillou.net> In-Reply-To: References: <3514743.EH6qe8WxYI@jason> <95D1DE70-DDF4-419B-8F0C-E9A6E0995D1F@goldelico.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Paul Boddie , Geert Uytterhoeven , Neil Armstrong , David Airlie , dri-devel , linux-mips , Laurent Pinchart , Miquel Raynal , Sam Ravnborg , Jernej Skrabec , OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS , Kees Cook , Jon as Karlman , Mark Brown , Maxime Ripard , Discussions about the Letux Kernel , Ezequiel Garcia , Thomas Bogendoerfer , Liam Girdwood , Robert Foss , linux-kernel , Rob Herring , "Eric W. Biederman" , Hans Verkuil Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi Nikolaus, Le mar., nov. 9 2021 at 21:19:17 +0100, H. Nikolaus Schaller=20 a =E9crit : > Hi Paul, >=20 >> Am 07.11.2021 um 20:05 schrieb Paul Cercueil : >>=20 >>> 6. Therefore I think it *may* work overclocked with 48MHz >>> but is not guaranteed or reliable above 27 MHz. >>> So everything is ok here. >>=20 >> One thing though - the "assigned-clocks" and=20 >> "assigned-clock-rates", while it works here, should be moved to the=20 >> CGU node, to respect the YAML schemas. >=20 > Trying to do this seems to break boot. >=20 > I can boot up to >=20 > [ 8.312926] dw-hdmi-ingenic 10180000.hdmi: registered DesignWare=20 > HDMI I2C bus driver >=20 > and >=20 > [ 11.366899] [drm] Initialized ingenic-drm 1.1.0 20200716 for=20 > 13050000.lcdc0 on minor 0 >=20 > but then the boot process becomes slow and hangs. Last sign of=20 > activity is >=20 > [ 19.347659] hub 1-0:1.0: USB hub found > [ 19.353478] hub 1-0:1.0: 1 port detected > [ 32.321760] wlan0_power: disabling >=20 > What I did was to just move >=20 > assigned-clocks =3D <&cgu JZ4780_CLK_HDMI>; > assigned-clock-rates =3D <27000000>; >=20 > from >=20 > hdmi: hdmi@10180000 { >=20 > to >=20 > cgu: jz4780-cgu@10000000 { >=20 > Does this mean the clock is assigned too early or too late? >=20 > Do you have any suggestions since I don't know the details of CGU. These properties are already set for the CGU node in ci20.dts: &cgu { /* * Use the 32.768 kHz oscillator as the parent of the RTC for a higher * precision. */ assigned-clocks =3D <&cgu JZ4780_CLK_OTGPHY>, <&cgu JZ4780_CLK_RTC>; assigned-clock-parents =3D <0>, <&cgu JZ4780_CLK_RTCLK>; assigned-clock-rates =3D <48000000>; }; So you want to update these properties to add the HDMI clock setting,=20 like this: assigned-clocks =3D <&cgu JZ4780_CLK_OTGPHY>, <&cgu JZ4780_CLK_RTC>,=20 <&cgu JZ4780_CLK_HDMI>; assigned-clock-parents =3D <0>, <&cgu JZ4780_CLK_RTCLK>; assigned-clock-rates =3D <48000000>, <0>, <27000000>; Cheers, -Paul