From owner-freebsd-arm@freebsd.org Wed Feb 21 22:13:52 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 06E68F0591D for ; Wed, 21 Feb 2018 22:13:52 +0000 (UTC) (envelope-from freebsd-arm@dino.sk) Received: from mailhost.netlabit.sk (mailhost.netlabit.sk [84.245.65.72]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7B7A2761BA for ; Wed, 21 Feb 2018 22:13:51 +0000 (UTC) (envelope-from freebsd-arm@dino.sk) Received: from zeta.dino.sk (fw3.dino.sk [84.245.95.254]) (AUTH: LOGIN milan) by mailhost.netlabit.sk with ESMTPA; Wed, 21 Feb 2018 23:08:40 +0100 id 00DD603A.5A8DEDE8.0000D399 Date: Wed, 21 Feb 2018 23:08:40 +0100 From: Milan Obuch To: freebsd-arm@freebsd.org Cc: Greg V , Juan Ambriz Subject: Re: No aw_thermal device on Orange Pi One Message-ID: <20180221230840.11c4febc@zeta.dino.sk> In-Reply-To: <1a75717a-36a9-bda5-4c2e-dbd2e8154eff@unrelenting.technology> References: <1a75717a-36a9-bda5-4c2e-dbd2e8154eff@unrelenting.technology> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.31; i386-portbld-freebsd10.4) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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: Wed, 21 Feb 2018 22:13:52 -0000 On Thu, 22 Feb 2018 00:54:09 +0300 Greg V via freebsd-arm wrote: > On 02/22/2018 00:44, Juan Ambriz wrote: > > Hi. > > > > Just built and image for Orange Pi One using r329366 with crochet. > > Using the board configuration for OrangePi-Plus2E the only change > > made was in setup.sh file to use u-boot-orangepi-one. > > > > Looking at old messages on the list I see that "aw_thermal0: > > mem 0x1c25000-0x1c253ff" is > > missing. > Hi. This happened because we're using device trees from upstream > (Linux) now, and they do not have entries for the thermal sensor. > > I made a little work-in-progress patch: > https://gist.github.com/myfreeweb/a6cb7261fc79977f4c1c224cfe5ca3de > That uses the configuration proposed for Linux: > https://lkml.org/lkml/2018/1/28/406 > But it currently fails in aw_thermal_init. > > And anyway, reading the sensor correctly depends on reading thermal > calibration data, which is currently in progress: > https://reviews.freebsd.org/D13556 > Well, I am using Orange Pi Zero, which uses H2+ SoC instead of H3, but they are almost the same (H2+ is kind of simplified H3). For aw_thermal to work, you need to create your own dts file containing #include "sun8i-h2-plus-orangepi-zero.dts" / { soc { sid: eeprom@01c14000 { compatible = "allwinner,sun8i-h3-sid"; reg = <0x01c14000 0x400>; }; rtp: rtp@1c25000 { compatible = "allwinner,sun8i-h3-ts"; reg = <0x01c25000 0x400>; interrupts = ; clocks = <&ccu CLK_BUS_THS>,<&ccu CLK_THS>; clock-names = "ahb", "ths"; resets = <&ccu RST_BUS_THS>; #thermal-sensor-cells = <0>; }; }; }; and maybe some other stuff, if you would like to use additional uart or usb ports or other devices. Then compile it to dtb file and use that when booting. It is possible you will be forced to adjust this in future, when new device trees are imported, but this works for me now. Regards, Milan