From owner-freebsd-arm@freebsd.org Thu Mar 8 11:55:34 2018 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5347CF27E5F for ; Thu, 8 Mar 2018 11:55:34 +0000 (UTC) (envelope-from hondareyte.luc@laposte.net) Received: from smtp.laposte.net (smtpoutz27.laposte.net [194.117.213.102]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DD79F766EA for ; Thu, 8 Mar 2018 11:55:33 +0000 (UTC) (envelope-from hondareyte.luc@laposte.net) Received: from smtp.laposte.net (localhost [127.0.0.1]) by lpn-prd-vrout015 (Postfix) with ESMTP id E54E61D1158 for ; Thu, 8 Mar 2018 12:33:44 +0100 (CET) Received: from smtp.laposte.net (localhost [127.0.0.1]) by lpn-prd-vrout015 (Postfix) with ESMTP id DA7B71D2180 for ; Thu, 8 Mar 2018 12:33:44 +0100 (CET) Received: from lpn-prd-vrin003 (lpn-prd-vrin003.laposte [10.128.63.4]) by lpn-prd-vrout015 (Postfix) with ESMTP id D3D7C1D2187 for ; Thu, 8 Mar 2018 12:33:44 +0100 (CET) Received: from lpn-prd-vrin003 (localhost [127.0.0.1]) by lpn-prd-vrin003 (Postfix) with ESMTP id C3296493E2A for ; Thu, 8 Mar 2018 12:33:44 +0100 (CET) Received: from Hibiscus.local (unknown [88.190.12.188]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lpn-prd-vrin003 (Postfix) with ESMTPSA id 9A5D34933E8; Thu, 8 Mar 2018 12:33:44 +0100 (CET) Subject: Re: cpufreq support on Allwinner H3 To: Emmanuel Vadot Cc: Luc Hondareyte via freebsd-arm References: <5332936b-f38b-ca7a-03d9-dfc7c92e2727@laposte.net> <20180308061806.d9c9c7282d1a956d86b6bb22@bidouilliste.com> From: Luc Hondareyte Message-ID: <542a7663-b4e0-2093-4dfc-9b8e9c3b513b@laposte.net> Date: Thu, 8 Mar 2018 12:33:44 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180308061806.d9c9c7282d1a956d86b6bb22@bidouilliste.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: fr X-VR-FullState: 0 X-VR-Score: -100 X-VR-Cause-1: gggruggvucftvghtrhhoucdtuddrgedtfedrkeeggdduvdcutefuodetggdotefrodftvfcurfhrohhf X-VR-Cause-2: ihhlvgemucfntefrqffuvffgnecuuegrihhlohhuthemucehtddtnecusecvtfgvtghiphhivghnthhs X-VR-Cause-3: ucdlqddutddtmdenucfjughrpefuvfhfhffkffgfgggjtgfgsehtkeertddtfeejnecuhfhrohhmpefn X-VR-Cause-4: uhgtucfjohhnuggrrhgvhihtvgcuoehhohhnuggrrhgvhihtvgdrlhhutgeslhgrphhoshhtvgdrnhgv X-VR-Cause-5: theqnecuffhomhgrihhnpehinhhfrhgruggvrggurdhorhhgnecukfhppeekkedrudeltddruddvrddu X-VR-Cause-6: keeknecurfgrrhgrmhepmhhouggvpehsmhhtphhouhhtpdhhvghlohepjfhisghishgtuhhsrdhlohgt X-VR-Cause-7: rghlpdhinhgvthepkeekrdduledtrdduvddrudekkedpmhgrihhlfhhrohhmpehhohhnuggrrhgvhiht X-VR-Cause-8: vgdrlhhutgeslhgrphhoshhtvgdrnhgvthdprhgtphhtthhopehmrghnuhessghiughouhhilhhlihhs X-VR-Cause-9: thgvrdgtohhmnecuvehluhhsthgvrhfuihiivgeptd X-VR-AvState: No X-VR-State: 0 X-VR-State: 0 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2018 11:55:34 -0000 Le 08/03/2018 à 06:18, Emmanuel Vadot a écrit : > On Tue, 6 Mar 2018 20:59:37 +0100 > Luc Hondareyte via freebsd-arm wrote: > >> Hi, >> >> I've just build 12-current for Allwinner H3  (armv7) and it seems that >> cpufreq support is missing (orangepi or nanopi): > There is no opp table (freq<->voltage table) in the DTS that's why > it's not working. This thread? http://lists.infradead.org/pipermail/linux-arm-kernel/2018-February/557940.html > I think I've seen patches on the linux-arm kernel mailing list to add > them but even with thoses we will need support for the v2 opp. v2 opp? Does it mean that, as a workaround, with the appropriate DTS patch and a switch back to armv6, this should work? I say that because, on nanopi neo, with the "old" 12-current image build by Ganbold Tsagaankhuu (that was available on FriendlyArm Wiki), cpu_freq support is OK and it’s run at full speed: root@allwinner-h3:~ # uname -a FreeBSD allwinner-h3 12.0-CURRENT FreeBSD 12.0-CURRENT #7 r308116M: Mon Oct 31 10:56:20 ULAT 2016 tsgan@beastie.mstride.com:/usr/obj/arm.armv6/usr/src/sys/GENERIC arm root@allwinner-h3:~ # sysctl dev.cpu.0.freq cpufreq: get returning known freq 1008 cpufreq: get returning known freq 1008 dev.cpu.0.freq: 1008 And this image does not seem to use Linux DTS. >> root@allwinner-h3:~ # service powerd onestart >> Starting powerd. >> powerd: no cpufreq(4) support -- aborting: No such file or directory >> /etc/rc.d/powerd: WARNING: failed to start powerd >> >> So, on nanopi neo, it's slowdown (not on orange-pi that seems to run at >> full speed). I am using a custom kernel conf that just contains: >> >> include GENERIC >> nooptions       INVARIANTS >> nooptions       INVARIANT_SUPPORT >> nooptions       WITNESS >> nooptions       WITNESS_SKIPSPIN >> nooptions       BUF_TRACKING >> nooptions       DEADLKRES >> nooptions       FULL_BUF_TRACKING >> > You can use the GENERIC-NODEBUG for that > Oh, I missed that. Thanks.