From owner-freebsd-arm@freebsd.org Sat Jun 24 17:55:26 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 CF9D0DA3248 for ; Sat, 24 Jun 2017 17:55:26 +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 3768174736 for ; Sat, 24 Jun 2017 17:55:25 +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 3371c5c9; Sat, 24 Jun 2017 19:55:22 +0200 (CEST) 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=UsbZiFJ9sgZieHx4CQMamJuFqOo=; b=MhqVkqsEicrSZGYr9YgkIcYB6g4I hKGoT37aMZ4BmP3MkbdiEtA11B+2PLT5wfS0n9Q9NFNUsRl0oQW2YAx48CBmyrEJ GNEnu9FdorE3WnRedlScGu/mGNINrBdfPVHPVIdMWNF+PnNMgMl+YYRYYea1rMM5 9mWtKK+vk5sdty8= 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=FSRRxmWRSqAa5VXZwyTuoJ2Cizr6lpduswxe9aJpfZ17wCLqt/VWeDAx J5gqhjwn+K3rKqf/ufjAHdrhVi5Tk8TFSXCDADrnMVondOswRjIVVs869J5gY/df kAEXSGKqPPfSU8nJBNZY+pTqGLO7jri6RUhevBjie7gkviSbmUM= Received: from knuckles.blih.net (ip-54.net-82-216-203.roubaix.rev.numericable.fr [82.216.203.54]) by mail.blih.net (OpenSMTPD) with ESMTPSA id c4c3aede TLS version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; Sat, 24 Jun 2017 19:55:22 +0200 (CEST) Date: Sat, 24 Jun 2017 19:55:21 +0200 From: Emmanuel Vadot To: Johnny Sorocil Cc: freebsd-arm@freebsd.org Subject: Re: Orange Pi Zero support Message-Id: <20170624195521.e8628c9c9c8b7f736022c78e@bidouilliste.com> In-Reply-To: References: <20170624171539.3b6a73b245b05e649a62933c@bidouilliste.com> X-Mailer: Sylpheed 3.5.1 (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.23 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jun 2017 17:55:26 -0000 On Sat, 24 Jun 2017 19:31:35 +0200 Johnny Sorocil wrote: > On Sat, Jun 24, 2017 at 5:15 PM, Emmanuel Vadot > wrote: > > > There is nothing on the serial console because we miss the h2 > > definition in aw_machdep.c > > I've started to add proper support for it today but there is some > > problems with some old clocks drivers. I'm currently patching them and > > hope to commit H2Plus support today or tomorow. > > It's nice to hear that :) > > I was experimenting with dts files (copied ethernet and emac part to the > working dts file) - there will be output on the serial console, but no > network: > # dmesg | grep awg > awg0: mem > 0x1c30000-0x1c30103,0x1c00030-0x1c00033 > irq 35 on simplebus0 dfs > awg0: PHY type: rgmii, conf mode: reg > awg0: EMAC clock: 0x00140006 > awg0: AHB frequency 300000000 Hz, MDC div: 0x3 > awg0: soft reset timed out > device_attach: awg0 attach returned 60 > Datasheet for H3 says that soft reset should be performed only after all > clock inputs are valid. > Is that because kernel is using old clock drivers? For H3 we switch to clkng already. The problem is that dts binding were not standardized when we added the driver (they will be in Linux 4.12). > Are these assumptions correct: > - the kernel will automatically use if_awg driver for the network card > (even on H2+ which doesn't have a Gb interface) if there is a correct > ethernet entry in dts? Yes. > - when using newer Linux dts file (for H2+) there is no output on the > serial console because dts file states that this is H2+, but FreeBSD > kernel doesn't know what to do with H2+? Not anymore but yes. > - newer Linux dts files (which defines SoC as H2+) will be able to be > used to boot FreeBSD? Yes. > What is the status of FreeBSD SDIO support? Not sure, maybe imp@ or kibab@ can answer that question. > Can I somehow help with the porting effort? > > Maybe slightly OT: > How kernel is debugged? Connect JTAG debugger and then single step? > What to use from HW and SW for that purpose? I mostly use printf because I don't have jtag hardware and I'm lazy :) -- Emmanuel Vadot