From owner-freebsd-arm@freebsd.org Fri May 22 17:23:58 2020 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 AAAE92CF398 for ; Fri, 22 May 2020 17:23:58 +0000 (UTC) (envelope-from mw@semihalf.com) Received: from mail-qk1-x744.google.com (mail-qk1-x744.google.com [IPv6:2607:f8b0:4864:20::744]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49TCyP6BYsz4bw2 for ; Fri, 22 May 2020 17:23:57 +0000 (UTC) (envelope-from mw@semihalf.com) Received: by mail-qk1-x744.google.com with SMTP id f189so11457761qkd.5 for ; Fri, 22 May 2020 10:23:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=872S0J+VivdZUvkLFyGmRnXviyrPSTaakgryRu+DbjM=; b=RHjRpVYCvtxGxcQolVTrGBVhpDpdS3JzwMZgC4f1OYy5uZ+Vfqg8lOhNLDLZG27IDc e9FLTfMcjJ9T1kq/ZdK8ho1FU/XKL2KboF/ouYeVkpIaIVmBvq5ykx0EA7hfMYgDDWl2 bvXIZXf4mPM+1xsK9xEPU3QdyUIlsOly8Hoa7jpsVb4J8tx8MylFx+W8pZ9F8ZOiptgO E3oh5fkVDj+OWfJxp0lSLv1nPnTNsmzlBcn9t4wQ0gceZWgw143150h41QU48r1NxcjF WP7bbAfW/TdhPgTbmtkZ/NFlSR8CCYNNion8jip6IhYXjTEdeU+DcjJCTkPm36DUKh2c lzhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=872S0J+VivdZUvkLFyGmRnXviyrPSTaakgryRu+DbjM=; b=GX7w4epjxS8F5fGP/j+6xliksfPGvaN1Kug52LNqfnYBa7GAbgUpj7Lhu8026yD3nI Hyd5fEY3Vu6TOgfhFt2DEVf2t4cj4ZZyJjeiS9uNCOSxyOttCcijmcw3P0uSBvhiKtJO pm5Z+owGfP806Uj6n2+lzLjvxMrHYqIgcXIRBTNgIO6vONDgIY4qIBrf13VL0b1mYi6e OscawuBA1pNjuzubjUyWJ8wnClMDgfQKktmOZYbWKkGfrTGc4Er5wb5/d8eJXKkANwkr ySjjbpQTIHi87T5MfoqOC8Uki15MT+8j1Cntg5VKCJ3IFRNekwtLUvEU0itJiYDXhBua BKHA== X-Gm-Message-State: AOAM5337uj4TSeKrkqdA82fTDFYvwOHO3opQumXIGDfYoZam2dod3S6+ NItiBW0bNhw0nXPJ9IA2vd8Vht2Lkp/kbEya0gYUHuHG X-Google-Smtp-Source: ABdhPJxhZ8g2NhM5IN6QgIukmcVWhH2LxuaZVTv0FGxNNDg1MRlAik61/62z5H95FuoCIZa+7jNYL6R+Vusx+JL74CE= X-Received: by 2002:a05:620a:4e2:: with SMTP id b2mr2645885qkh.16.1590168236997; Fri, 22 May 2020 10:23:56 -0700 (PDT) MIME-Version: 1.0 References: <7F9D7164-2C04-4E27-85F9-A495EAC8FC84@unrelenting.technology> <63b4f78ff4ee07359a345bcbc03afeaa@unrelenting.technology> <2053cd2299b81860deecc638ef839d1f@unrelenting.technology> <0012917d629a48e9fcd8589f4f002e1b@unrelenting.technology> <947c2f9bfaad823a2b104b8741502b40@unrelenting.technology> In-Reply-To: From: Marcin Wojtas Date: Fri, 22 May 2020 19:23:45 +0200 Message-ID: Subject: Re: FreeBSD on Layerscape/QorIQ LX2160X To: Greg V Cc: freebsd-arm Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 49TCyP6BYsz4bw2 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=semihalf-com.20150623.gappssmtp.com header.s=20150623 header.b=RHjRpVYC; dmarc=none; spf=none (mx1.freebsd.org: domain of mw@semihalf.com has no SPF policy when checking 2607:f8b0:4864:20::744) smtp.mailfrom=mw@semihalf.com X-Spamd-Result: default: False [-2.07 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.89)[-0.891]; R_DKIM_ALLOW(-0.20)[semihalf-com.20150623.gappssmtp.com:s=20150623]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-0.86)[-0.863]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; DMARC_NA(0.00)[semihalf.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[semihalf-com.20150623.gappssmtp.com:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::744:from]; NEURAL_HAM_SHORT(-0.02)[-0.017]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 May 2020 17:23:58 -0000 wt., 19 maj 2020 o 19:45 napisa=C5=82(a): > > May 19, 2020 7:57 PM, "Marcin Wojtas" wrote: > > > wt., 19 maj 2020 o 18:42 napisa=C5=82(a): > > > >> May 19, 2020 7:11 PM, "Dan Kotowski" = wrote: > >> > >> Getting closer... > >> dmesg.boot: https://gist.github.com/agrajag9/99d26385be0f49a8a4f046f15= a2c0f08 > >> > >> "iicbus0: at addr 0x77" nice! > >> Would be great if you could run `i2c -s` also. > >> > >> Scanning I2C devices on /dev/iic0: 01 02 03 04 05 06 07 08 09 0a 0b 0c= 0d 0e 0f 10 11 12 13 14 [..] > >> > >> Hey look at that! A bunch of numbers! Hopefully they mean more to you = than they do to me... > >> > >> hmm, it shouldn't report all numbers as present. oh well. > >> > >> sdhci_acpi0-slot0 seems to have hung the boot process for almost 5min = waiting for various timeouts. > >> > >> oops, so they didn't really make generic sdhci work :D > >> > >> Well turns out we do have a Freescale ESDHC driver already. > >> It doesn't have DMA so performance won't be great (but SD/MMC is bad s= tuff anyway lol). > >> (interesting dev note: NetBSD gets away with just some quirks in the s= dhci acpi driver: > >> SDHC_FLAG_HAVE_DVS|SDHC_FLAG_NO_PWR0|SDHC_FLAG_32BIT_ACCESS|SDHC_FLAG_= ENHANCED) > >> > >> No worries - once I can get a reliable install, I hope to never need t= o touch those again anyways. > >> I mostly am hoping to get eMMC so I can flash updated firmware, assumi= ng the errata list is correct > >> and my silicon rev CAN boot from firmware on eMMC and it was a layer 8= failure. > >> > >> Trying to add ACPI support to it: > >> > >> https://send.firefox.com/download/926c72b043182c40/#49y3TaeL7_hif_YEHU= FQ2g > >> > >> Latest dmesg.boot: https://gist.github.com/agrajag9/f4e8186e4cea7da1e5= d8887a8d74dd7a > >> > >> "mmcsd0: 32GB at mmc0= 43.7MHz/4bit/65535-block" > >> is better than before, but controller timeouts are sad. Welp. > >> > >> If anyone is interested in debugging this (with the device in hand), m= y ACPI attachment patch is: > >> https://github.com/myfreeweb/freebsd/commit/4abb60611c53b6bf109e8854f6= 0ecc697419cf1c > >> > >> Once again, maybe NetBSD's way of supporting this (slight quirks in th= e generic ACPI SDHCI driver) > >> would be better than fsl_sdhci. > > > > Do you have a knowledge if LS2KX controller is common with the one > > found in LS1046? If that may help, we are going to upstream it (need > > some rework after rebasing from 11.x). > > From a quick look at Linux, should be very similar. > LX2160 uses just "fsl,esdhc" which is handled by the same driver as "fsl,= ls1046a-esdhc" > but w/o any specific clock data. > > https://github.com/torvalds/linux/blob/master/drivers/mmc/host/sdhci-of-e= sdhc.c > https://github.com/SolidRun/edk2-platforms/blob/eec706c2d693be0b3793d9180= e7d1a4813a526cf/Silicon/NXP/LX2160A/Include/DeviceTreeInclude/fsl-lx2160a.d= tsi#L364-L387 > > The changes you're going to upstream, are they for fsl_sdhci or generic s= dhci? In the original patch, the fsl_sdhci did not work well, due to endianness issues and really significant register differences between ppc and arm64 QoriQ sdhci controllers. I hope it will be submitted some time in June by its author, you will be added to review.