Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2329087ybb; Sun, 5 Apr 2020 04:53:17 -0700 (PDT) X-Google-Smtp-Source: APiQypJgsNsr5kTiuOCFIEmMx8O51AZBnfrTlFDrRBEz7XItUBrlZvQ0A2tRKBDLlktSpt9n8DtO X-Received: by 2002:a9d:6c88:: with SMTP id c8mr12931436otr.272.1586087597478; Sun, 05 Apr 2020 04:53:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586087597; cv=none; d=google.com; s=arc-20160816; b=C9O8A7/JROW8/IQoQlwhZMWp/mn6ER3zDiKcC95fSKpHCqV1T7UnclXvaujS3uAixM d1e7qrrySa6CjxcD3hGE4Qq0DSvZtW7eEX9dA9IB4fWmqnNotGxapS9Ao6D3otBHCMkf 01hVPcM1XqY/t9plCUbQ3BdcjScY35xPZuyDRLLS04aY+Jkp/Tkb5KJDksiC6wuAlgff tuj040mxtKf9RuYcFLWr8O0jqzqdRd8yDpfw6Ps9ylC9GbPy4/+HrtnuVJ+sm2RijvYC 6AfP9fdnve635x3a7RcqKlN20luKjBFiFeFa99tAFDVEN0buuLJnyGEFlUqWDC3V4m/B 6Lsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date:dkim-signature; bh=OvPXKZrOUXdZBvPcNKm/ABijNX/Wd4uSrpf8HA/ToJM=; b=hmHkEqth3ubE2PkbRLLhsjNdkSDL14BWgesx9GqctlibRv7u3BS/vpTKeh1bIx0C6i w2c1+GNge5UYaOpon2aQfB+zSec8GN7k1aVFQggJPo0KADM4TVw79ZGaz2RjeWsOt+9e /TN2XJNT/xU74Rzl+lgZ8E8ZoV5MpOw6TgV/UhbrNhHOC6LD/SE46xt8a7Qcr48IqDb4 LrmbXirl/OuGMqFUJbBCM55hBeDV8wZM35Crt4WQgrMrM8u7K1B7zO/sEJ6+HPW2OGvz ZCwt8C0g7T+pwXDTatOT+WuLAoKiTTFHptSj+cFcC26L/3AZQ7fjmRGIcEW2Hjt6yii6 SymA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@megous.com header.s=mail header.b=TIzjQu4T; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=megous.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e6si6722755oiy.229.2020.04.05.04.53.05; Sun, 05 Apr 2020 04:53:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@megous.com header.s=mail header.b=TIzjQu4T; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=megous.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726841AbgDELvl (ORCPT + 99 others); Sun, 5 Apr 2020 07:51:41 -0400 Received: from vps.xff.cz ([195.181.215.36]:37732 "EHLO vps.xff.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726491AbgDELvl (ORCPT ); Sun, 5 Apr 2020 07:51:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megous.com; s=mail; t=1586087498; bh=NNWPYQmKXiUs070rAcv05Neys9flJOHGWA3PVq5buKk=; h=Date:From:To:Cc:Subject:References:X-My-GPG-KeyId:From; b=TIzjQu4Ta7udL+i4zYgBcZYi7l/NQ0qQ4myiGz3hM1O6UU7MbzPLt7FatSSdJPiGs IGsydDYXAlgZz2pu8uHJLRT9mL4xXBrDzDIOltqhpCkZJoaIoap7bU209SMa0DJMvP PBuGJwwbgJU//n3AJVKnNEIOQ2RnpsdmSXWV6Vc4= Date: Sun, 5 Apr 2020 13:51:38 +0200 From: =?utf-8?Q?Ond=C5=99ej?= Jirman To: =?utf-8?B?Q2zDqW1lbnQgUMOpcm9u?= Cc: Maxime Ripard , Chen-Yu Tsai , Rob Herring , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi Subject: Re: [linux-sunxi] [PATCH 0/7] Add support for Allwinner H6 DVFS Message-ID: <20200405115138.vrrvv7spnv6ifm6x@core.my.home> Mail-Followup-To: =?utf-8?Q?Ond=C5=99ej?= Jirman , =?utf-8?B?Q2zDqW1lbnQgUMOpcm9u?= , Maxime Ripard , Chen-Yu Tsai , Rob Herring , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi References: <20200405104913.22806-1-peron.clem@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200405104913.22806-1-peron.clem@gmail.com> X-My-GPG-KeyId: EBFBDDE11FB918D44D1F56C1F9F0A873BE9777ED Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Cl?ment, On Sun, Apr 05, 2020 at 12:49:06PM +0200, Cl?ment P?ron wrote: > Hi Sunxi maintainers and members, > > Now that required drivers are merged we can contibute on DVFS support for > Allwinner H6. > > This serie is based on Yangtao Li serie[0] and Megous works[1]. > > Most of the OPP tables are taken from original vendor kernel[2]. > Plus there is a new CPU frequency @1.8GHz. > > I wrote a simple script to randomly set a frequency during a random time[3]. > With this script and using stress-ng during a day I didn't see any issue. > Moreover I have tested specifically the 1.8GHz on my Beelink GS1, max thermal > 80?C is reached after ~10min and then the SoC oscillates quickly between 1.5 > and 1.8GHz. Thank you for working on this. :) I wonder what SoC bin you tested this on. I have a patch to print it here: https://megous.com/git/linux/commit/?h=ths-5.7&id=c5ddd2a45c7e04dcec31619b58de7c798ad6594c > I also test that that offlining CPU0 and doing DVFS on other CPUs works. > As CPU regulator is only set for CPU0. > > But maybe it doesn't cost much to set the regulator for all the CPUs? > > Jernej test the GPU devfreq on several H6 board particulary the Tanix TX6 which > doesn't have a proper dedicated PMIC and doesn't had any trouble with it. > > Do you think I can enable GPU OPP for all H6 Boards? > > Also Yangtao Li enable DVFS for OrangePi and Pine64, as I can't test them I > didn't reenable these boards. Please, let me know if you want me to add these > boards in this serie. Feel free to add these OPPs also to OrangePi 3 dts, I've been running mine with this OPP table for at least a year already (I have the worst SoC bin). Though I'll run a bit more comprehensive test for more frequencies, like you did, just to be sure. One thing I wonder about is if there should not be some small ramp delay on the CPU regulator node, because voltage change probably takes some small time to apply, compared to changing the PLL frequency. And I have no idea if the CPU is not running for some very small time out of spec during transitions. I didn't find timing information in the PMIC datasheet, but I suppose based on the DCDCA frequency of 3MHz that it will adapt to the new voltage in the range of 1s-10s of microseconds. In datasheet of the similar PMIC (AXP813) there is this note: DVM (Dynamic Voltage scaling Management) ramp rate: 2.5mV/us at buck frequency 3MHz I think it will be simiar with AXP805. regards, o. > Thanks, > Cl?ment > > 0: https://patchwork.kernel.org/cover/10815117/ > 1: https://megous.com/git/linux/log/?h=ths-5.7 > 2: https://github.com/orangepi-xunlong/OrangePiH6_Linux4_9/blob/master/arch/arm64/boot/dts/sunxi/sun50iw6p1.dtsi#L345-L517 > 3: https://gist.github.com/clementperon/55a055dae3f13bbd14fb39c0069fe2e2 > > Cl?ment P?ron (4): > arm64: dts: allwinner: h6: set thermal polling time > arm64: dts: allwinner: h6: Add GPU Operating Performance Points table > arm64: configs: Enable sun50i cpufreq nvmem > arm64: dts: allwinner: h6: Enable CPU and GPU opp tables for Beelink > GS1 > > Ondrej Jirman (2): > arm64: dts: allwinner: h6: Add thermal trip points/cooling map > arm64: dts: allwinner: h6: Add CPU Operating Performance Points table > > Yangtao Li (1): > arm64: dts: allwinner: h6: Add clock to CPU cores > > .../dts/allwinner/sun50i-h6-beelink-gs1.dts | 10 +- > .../boot/dts/allwinner/sun50i-h6-cpu-opp.dtsi | 103 ++++++++++++++++++ > .../boot/dts/allwinner/sun50i-h6-gpu-opp.dtsi | 74 +++++++++++++ > arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 44 +++++++- > arch/arm64/configs/defconfig | 1 + > 5 files changed, 226 insertions(+), 6 deletions(-) > create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h6-cpu-opp.dtsi > create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h6-gpu-opp.dtsi > > -- > 2.20.1 > > -- > You received this message because you are subscribed to the Google Groups "linux-sunxi" group. > To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe@googlegroups.com. > To view this discussion on the web, visit https://groups.google.com/d/msgid/linux-sunxi/20200405104913.22806-1-peron.clem%40gmail.com.