From owner-freebsd-arm@freebsd.org Mon Oct 28 11:10:37 2019 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7903117E1F7 for ; Mon, 28 Oct 2019 11:10:37 +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 471sT802Qrz3K50; Mon, 28 Oct 2019 11:10:35 +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 6e4e6a73; Mon, 28 Oct 2019 12:10:27 +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=qGiJUC9bDnXBbTr0BBn9GLdVVjw=; b=gxA77l4CEJHKD5NkmyHEwL337tu1 MgcBvsV7QePPYGgVxGZAZRk9HOa9jJDT3qBz5SLNgFxJLUDCjwgRjmUubZaX/5Wd 9ioKx/72kMJENwuzEPMd4AgcYSRSx7+n8ZEs3Bi5RgGiyA6fP+DxmugdIsZVAjaK ZBeo9Kv8tBrJGPM= 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=bts623GtN77C27ldsk+Enk5yc7DRe2Ytik2/cV6v3OtOUgREKrvjb/Zm EtXKQBtOuUaPpn7/ROWuj3K5BeaxNEl6G2HsyfMFvOHjCSOD334yEz/TvD+MgH54 4j58p6lcqQrjyX1VBrIJnRNrqnuDpPdZJ9v31KrQPQLHs2KKo2A= Received: from sonic.home.blih.net (ip-9.net-89-3-105.rev.numericable.fr [89.3.105.9]) by mail.blih.net (OpenSMTPD) with ESMTPSA id 2be09c19 TLS version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; Mon, 28 Oct 2019 12:10:27 +0100 (CET) Date: Mon, 28 Oct 2019 12:10:27 +0100 From: Emmanuel Vadot To: Sleep Walker Cc: freebsd-arm@freebsd.org, mmel@freebsd.org Subject: Re: FreeBSD 13-CURRENT download status on RK3399 SBC`s Message-Id: <20191028121027.8c89aef2a2809cd844ccad80@bidouilliste.com> In-Reply-To: References: X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; amd64-portbld-freebsd13.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 471sT802Qrz3K50 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bidouilliste.com header.s=mail header.b=gxA77l4C; dmarc=none; spf=pass (mx1.freebsd.org: domain of manu@bidouilliste.com designates 212.83.177.182 as permitted sender) smtp.mailfrom=manu@bidouilliste.com X-Spamd-Result: default: False [-1.15 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[bidouilliste.com:s=mail]; NEURAL_HAM_MEDIUM(-0.67)[-0.672,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ip4:212.83.177.182/32]; MV_CASE(0.50)[]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[bidouilliste.com]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-0.96)[-0.960,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bidouilliste.com:+]; FREEMAIL_TO(0.00)[gmail.com]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; IP_SCORE(0.39)[ip: (-0.61), ipnet: 212.83.160.0/19(2.44), asn: 12876(0.10), country: FR(-0.00)]; ASN(0.00)[asn:12876, ipnet:212.83.160.0/19, country:FR]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Oct 2019 11:10:37 -0000 On Mon, 28 Oct 2019 13:57:57 +0300 Sleep Walker wrote: > Hi All! > > On Khadas-EDGE-V > > - mainline uboot U-Boot TPL 2019.10-rc3 > - bootup from SD > - eth OK > - uart OK > - emmc OK > - sd OK > - USB 2.0 OK > - USB 3.0 OK > - USB HID OK > - USB DISK OK Good to know that everything is working on this board too. > > On Rock Pi4 > > UEFI booting, very cool. > > But I can not log into the console. > > it seems it keeps rebooting. > > Here is the log: > https://pastebin.com/JFX7Ssnz This is known. Let me try to describe the problem. So the sd and emmc clock have multiple possible parent, one of them is the usb clock that is generated by the usb controller. The problem is that when we create the clock domain of the CRU (Clock and Reset Unit) the usb controller isn't probed yet because it needs clock from the CRU. When a clock domain is finished (by calling clkdom_finit) we need all the clocks to be present so we cannot add the unknown for now usb clock. So to fix this issue we need a way to create a fake clock when the CRU clock domain is created that will be later replaced by the usb controller. There is multiple approch to this and I'm not yet sure which one will work best. 1) We allow to list non-existing clock as parent and don't throw errors anymore at clkdom_finit but at some SYSINIT. This will work well with a big static kernel but not if the clock is created by a kernel module. 2) We create some fake clock domain where we can add clocks to it so it became a somewhat valid parent (but not usable so you cannot select it with clknode_set_parent for example) and when a clock domain is finished we remove clock from the fake domain that are present in the newly created one (as clock names are unique this should not cause problem). The question is then what should we do when we still have clock in the fake domain ? Maybe mmel@ have more ideas. -- Emmanuel Vadot