From owner-freebsd-arm@freebsd.org Mon Nov 27 14:27:29 2017 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38F9DE527A2 for ; Mon, 27 Nov 2017 14:27:29 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.blih.net", Issuer "mail.blih.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 98F4873238 for ; Mon, 27 Nov 2017 14:27:28 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) by mail.blih.net (OpenSMTPD) with ESMTP id d0c7b688; Mon, 27 Nov 2017 15:27:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=mail; bh=JQDmv4mi1m9T0zonLRCMq2Ov5xA=; b=Px47NYIyIJJcYMvghj5wNgCU9UaV 4JxYAL4bBawd2DW6SNYLBVpaiRYCJ8sOfJkQ5R5jpDhV4aNL1V72dHeF9AZGDE0k ztOPnbVBLBSWtryj5LATOAxWLbhZrFWdavwHzi6oGLsNux2zRXzoZBiKNAtJ9l6F Nio4K3DsxN7QEzg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; q=dns; s= mail; b=X9o4qk1WWHprdAaSBnnZSgOoBG3tHEN4KeLuSbEhLr9IwPHAic+CbzGu gDbGioTIeqoHh1a4URuhNNpBL7zwv7G6t4fnF8qUl8Mzp4yIbPIafsLWmJWGjnLn 1dPZrz08S8O0QTEJ0uE/wRh6mA7auf5lynDT/vxZ2oXizas4T9c= Received: from knuckles.blih.net (ip-9.net-89-3-105.rev.numericable.fr [89.3.105.9]) by mail.blih.net (OpenSMTPD) with ESMTPSA id 6ab1ea0c TLS version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; Mon, 27 Nov 2017 15:27:25 +0100 (CET) Date: Mon, 27 Nov 2017 15:27:24 +0100 From: Emmanuel Vadot To: Milan Obuch Cc: freebsd-arm@freebsd.org Subject: Re: Allwinner H3/H2+ dts question - regression? Message-Id: <20171127152724.679688f6189f27718d76344c@bidouilliste.com> In-Reply-To: <20171126124217.2a512392@zeta.dino.sk> References: <20171126124217.2a512392@zeta.dino.sk> X-Mailer: Sylpheed 3.6.0 (GTK+ 2.24.31; amd64-portbld-freebsd12.0) 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: Mon, 27 Nov 2017 14:27:29 -0000 On Sun, 26 Nov 2017 12:42:17 +0100 Milan Obuch wrote: > Hi, > > after some time I am playing a bit again with my Allwinner H3/H2+ based > boards. First I crossbuild world and kernel using svn rev. 324530, > after trying to upgrade older armv6 to current armv7 with no success, > put them on micro SD card and tested it. I found there are some dtb's > for this SOC, but none worked well. I tested ethernet, USB and thermal > devices. Ethernet worked only with sun8i-h3-nanopi-neo.dtb, but using > it USB did not work. > > Then I upgraded sources to svn rev. 326187 and built new kernel > natively. While resulting kernel loads, none of dtb's provided have > ethernet working. Using nanopi-neo.dtb from old revision, originally > identical with sun8i-h3-nanopi-neo.dtb, provides me again with working > ethernet. This is because emac isn't yet standardized, it will have a stable binding in dts from Linux 4.15 > This raises a question what changed with dts sources and why we have no > stable working dts... By the way, I am using GENERIC-NOCTF-NOINET6 > kernel (plain GENERIC, just with CTF and INET6 options removed), > currently on Orange Pi Zero and Orange Pi R1 boards, the later being > almost identical with the former, just there is second USB > connected ethernet port instead of usual USB port, and changed wifi > module, which does not works for us anyway. We have stable DTS, at least in the same "stable" definition as in Linux mainline. > I looked over our sources and could not find any definition of emac for > Allwinner H3/H2+ SoC. Is it just me or is it really somehow lost? We have the driver which work well on pine64 and also on H3, we just need to wait for dts from Linux 4.15 > One more question, loosely related - how does one build dtb file? I > mean, I know I can just invoke 'make buildkernel -DNO_CLEAN' and all > dtb's for boards defined in makefile will be created. However, I think > it is handy to do it on board tested, because you can simply stop > u-boot, type > > env set fdtfile sun8i-h2-plus-orangepi-zero.dtb;boot > > and test new definition. Reboot is quick on Allwinner board I have, but > 'make buildkernel -DNO_CLEAN' takes ~ 3 minutes, additionally, your dts > needs to be mentioned in Makefile. I found it is actually done with > > /usr/src/sys/tools/fdt/make_dtb.sh /usr/src/sys sun8i-h2-plus-orangepi-zero.dts /usr/obj/usr/src/arm.armv7/sys/GENERIC-NOCTF-NOINET6/modules/usr/src/sys/modules/dtb/allwinner > > (in one line) invoked from some make command, but this does not give me > exactly the same result, probably environment differs. dtb file created > this way is larger than one produced with 'make buildkernel' command, > there are some fixups added. No idea whether it does any harm or not. Maybe you do not use the same dtc than buildkernel. -- Emmanuel Vadot