Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Nov 2014 17:02:24 -0500
From:      David Rayson <drayson@andrew.cmu.edu>
To:        =?UTF-8?B?V2Vpw58sIERyLiBKw7xyZ2Vu?= <weiss@uni-mainz.de>
Cc:        "freebsd-arm@freebsd.org" <freebsd-arm@freebsd.org>
Subject:   Re: Jetson TK1 board support
Message-ID:  <CAPfmcGkwKSxe1Rqxp9-Zn%2BOQ_29KK1y=u3bWv7jx%2Bh4JbOWr9A@mail.gmail.com>
In-Reply-To: <CAPfmcGn29PuTLHwejz%2BGDgii-yh9sn1mT-qDvLXE=AL-E1=V2g@mail.gmail.com>
References:  <542271AE.6070807@andrew.cmu.edu> <2c451765bffb43e8b9dab56927bb351a@e15be-02.zdv.Uni-Mainz.DE> <CAPfmcGkhnn7Cp%2BRk_nWfQSJuMJziLobDZpZ_RvTRh1ss=uG6ag@mail.gmail.com> <d30f2178af0a4321926fd1e953248783@e15be-02.zdv.Uni-Mainz.DE> <CAPfmcGm3t6rt5Ey3WGa3pZ2mCVNPYeaE1j6B_%2BMWjjQ2w1aJmA@mail.gmail.com> <c7bb07a065934e3ba5aa533b2f094e60@e15be-03.zdv.Uni-Mainz.DE> <CAPfmcGn29PuTLHwejz%2BGDgii-yh9sn1mT-qDvLXE=AL-E1=V2g@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Here is a patch (on top of your last patch set) that adds support for the
RTC (just for use as a clock; not for timers/alarms):
http://www.contrib.andrew.cmu.edu/~drayson/tegra-rtc.patch

I'm also taking a look at what it would take to get a framebuffer console
working...

--David

On Tue, Nov 18, 2014 at 2:31 PM, David Rayson <drayson@andrew.cmu.edu>
wrote:

> Thanks -- it works for me now!  I added a driver for the RTC (although
> it's still not super useful without being battery-backed); I'll send
> patches later today.  Would it make sense to set up a repository somewher=
e
> to put this in instead of just sending around patches?
>
> --David
>
> On Fri, Nov 14, 2014 at 3:58 PM, Wei=C3=9F, Dr. J=C3=BCrgen <weiss@uni-ma=
inz.de>
> wrote:
>
>> The Ethernet works quite well. But there has been a change in a more
>> recent version of u-boot which did not initialize the interrupt
>> routing of the pcie bridge. So you do not get receive interrupts.
>>
>> I put more recent patches for the jetson tk1 board to
>>
>>  http://www.staff.uni-mainz.de/weiss/jetson-tk1-20141114.tgz
>>
>> New changes to u-boot:
>>   (diff to git://nv-tegra.nvidia.com/3rdparty/u-boot.git):
>>   device enumeration through the u-boot API did only return the
>>   first device of each type.
>>
>> New changes to the FreeBSD kernel:
>>   (diff to FreeBSD current):
>>   better initialize pcie bridge interrupt routing.
>>   change cpu clock to 2 GHz (about 3 times faster)
>>   SDHCI support. Tested only with non-highspeed cards.
>>   changed cpu_reset to return to boot loader (u-boot).
>>
>> Regards
>>
>> Juergen
>>
>> Juergen Weiss      |Universitaet Mainz, Zentrum fuer Datenverarbeitung,
>> weiss@uni-mainz.de |55099 Mainz, Tel: +49(6131)39-26361, FAX:
>> +49(6131)39-26407
>>
>>
>> > -----Original Message-----
>> > From: David Rayson [mailto:drayson@andrew.cmu.edu]
>> > Sent: Friday, November 14, 2014 8:29 AM
>> > To: Wei=C3=9F, Dr. J=C3=BCrgen
>> > Cc: freebsd-arm@freebsd.org
>> > Subject: Re: Jetson TK1 board support
>> >
>> > How well does the ethernet support work for you?  When I try to use it=
,
>> packets are sent
>> > successfully, but no packets are received (usually).  I think there
>> might be some sort of
>> > odd race condition: if I break into the debugger, let it sit for a
>> while, then continue,
>> > it will start to (very intermittently) receive a packet every now and
>> then (typically
>> > after a watchdog timeout message from the ethernet driver).  Any idea
>> what could be going
>> > on there?
>> >
>> >
>> > --David
>> >
>> >
>> > On Fri, Oct 3, 2014 at 9:33 AM, Wei=C3=9F, Dr. J=C3=BCrgen <weiss@uni-=
mainz.de>
>> wrote:
>> >
>> >
>> >       If you enable the sdhci controller(s) in the fdt, the controller=
s
>> and
>> >       the cards are (at least partially) recognized. Read data transfe=
rs
>> >       from the sd card slot return only data bytes with zero contents.
>> >       The quirk in the fdt should disable DMA. The transfers are done
>> >       in pio mode.
>> >
>> >       U-boot should already have initialized the controllers. But the
>> >       generic sdhci driver tries at least to set frequency and bus wid=
th
>> >       according to the cards present. For the EMMC it certainly does
>> >       not know how to handle 8 bit transfers without further help
>> >       from a tegra specific driver extensions.
>> >
>> >       Juergen
>> >
>> >       Juergen Weiss      |Universitaet Mainz, Zentrum fuer
>> Datenverarbeitung,
>> >       weiss@uni-mainz.de |55099 Mainz, Tel: +49(6131)39-26361
>> <tel:%2B49%286131%2939-26361>
>> > , FAX: +49(6131)39-26407 <tel:%2B49%286131%2939-26407>
>> >
>> >       > -----Original Message-----
>> >       > From: David Rayson [mailto:drayson@andrew.cmu.edu]
>> >       > Sent: Thursday, October 02, 2014 11:54 PM
>> >       > To: Wei=C3=9F, Dr. J=C3=BCrgen
>> >       > Cc: freebsd-arm@freebsd.org
>> >       > Subject: Re: Jetson TK1 board support
>> >       >
>> >
>> >       > How much work do you think would be needed to get the SD
>> controller working?  Would
>> > it
>> >       > simply be a matter of doing the appropriate initialization
>> (wouldn't U-Boot do this
>> >       > already even?), enabling it in the device tree, and using the
>> standard FreeBSD
>> > SDHCI
>> >       > driver, or is there something more complicated that would need
>> to be done?
>> >       >
>> >       >
>> >       > (This would probably be simple to test, but I don't have acces=
s
>> to the hardware
>> > right now)
>> >       >
>> >       >
>> >       > --David
>> >       >
>> >       >
>> >       > On Fri, Sep 26, 2014 at 4:39 PM, Wei=C3=9F, Dr. J=C3=BCrgen <
>> weiss@uni-mainz.de> wrote:
>> >       >
>> >       >
>> >       >       Hi,
>> >       >
>> >       >       sorry, I did not have any time during the week.
>> >       >
>> >       >       I just sent a mail to the list with a link to my changes=
.
>> >       >
>> >       >       Only serial, USB2 and PCIe/Ethernet hardware is working =
-
>> so no
>> >       >       SATA.
>> >       >
>> >       >       The drivers rely on u-boot to initialize the hardware.
>> While this
>> >       >       is ok for pinmux, other initializations should be done b=
y
>> the
>> >       >       drivers.
>> >       >
>> >       >       The interrupt handling for PCIe is rather ad hoc. The
>> interrupt
>> >       >       routing should honor the FDT description.
>> >       >
>> >       >       The Tegra platform has a GIC with extensions for interru=
pt
>> >       >       routing. I just made a copy of the GIC code end extended
>> it
>> >       >       in a few cases. There should probably be a mechanism to =
do
>> >       >       this without duplicating code.
>> >       >
>> >       >       I changed some non tegra files to get FreeBSD running on
>> the
>> >       >       hardware. There should be better solutions, which can be
>> merged
>> >       >       back to the FreeBSD source tree. For example the problem
>> >       >       with cache coherency due to aggressive L2 prefetch await=
s
>> >       >       a real solution.
>> >       >
>> >       >       There is no code to change the cpu clock yet.
>> >       >
>> >       >       There is no support for SDHCI or EMMC.
>> >       >
>> >       >       So I would consider this a first step, which allows to d=
o
>> >       >       native development on the platform.
>> >       >
>> >       >       Besides that, the kernel seems to be quite stable - at
>> least with
>> >       >       the compiles I did.
>> >       >
>> >       >       Regards
>> >       >
>> >       >       Juergen
>> >       >
>> >       >       Juergen Weiss      |Universitaet Mainz, Zentrum fuer
>> Datenverarbeitung,
>> >
>> >       >       weiss@uni-mainz.de |55099 Mainz, Tel: +49(6131)39-26361
>> > <tel:%2B49%286131%2939-26361>  <tel:%2B49%286131%2939-26361>
>> >       > , FAX: +49(6131)39-26407 <tel:%2B49%286131%2939-26407>
>> <tel:%2B49%286131%2939-
>> > 26407>
>> >
>> >       >
>> >       >
>> >       >       > -----Original Message-----
>> >       >       > From: owner-freebsd-arm@freebsd.org [mailto:
>> owner-freebsd-arm@freebsd.org]
>> > On
>> >       > Behalf Of
>> >       >       > David Rayson
>> >       >       > Sent: Wednesday, September 24, 2014 9:25 AM
>> >       >       > To: freebsd-arm@freebsd.org
>> >       >       > Subject: Re: Jetson TK1 board support
>> >       >       >
>> >       >       > Hi,
>> >       >       >
>> >       >       > What other work would be useful to get this port
>> working well?  I might
>> >       >       > be interested in working on improving it, but first I
>> want to make sure
>> >       >       > I have a clear sense of what's been done so far (and
>> how stable/not it
>> >       >       > is) and what still remains to be done.
>> >       >       >
>> >       >       > --David
>> >       >       >
>> >       >       > > Hi,
>> >       >       > >
>> >       >       > > I have a rather rough port of FreeBSD current on arm
>> to Jetson TK1. I
>> >       >       > > used Stephen Warren's tegra u-boot sources, which
>> initialize and
>> > configure
>> >       >       > > USB and PCIe.
>> >       >       > >
>> >       >       > > So SMP, USB and the onboard PCIe Ethernet adapter
>> work.
>> >       >       > >
>> >       >       > > After Ian's changes to busdma_machdep-v6 (r269212) I
>> had problems with
>> >       >       > > cache coherency with the Ethernet adapter. Seems thi=
s
>> is due to the
>> > aggressive
>> >       >       > > L2 prefetcher of Cortex A15. Disabling L2 prefetch
>> does help, as well as
>> >       >       > > invalidating the cache a second time after the dma
>> transfer. I'm not
>> >       >       > > sure what the correct solution to this problem is. I
>> wonder how
>> >       >       > > other Cortex A15 platforms (exynos5) handle this.
>> >       >       > >
>> >       >       > > I will probably be able to do some cleanups and put
>> patches on the web
>> >       >       > > within a week.
>> >       >       > >
>> >       >       > > Regards
>> >       >       > >
>> >       >       > > Juergen
>> >       >       > >
>> >       >       > > Juergen Weiss      |Universitaet Mainz, Zentrum fuer
>> Datenverarbeitung,
>> >       >       > > weiss at uni-mainz.de
>> > <http://lists.freebsd.org/mailman/listinfo/freebsd-arm>;
>> >       > |55099
>> >
>> >       >       > Mainz, Tel: +49(6131)39-26361
>> <tel:%2B49%286131%2939-26361>
>> > <tel:%2B49%286131%2939-26361> , FAX: +49(6131)39
>> <tel:%2B49%286131%2939> -
>> >       > 26407 <tel:%2B49%286131%2939-26407>
>> >
>> >       >       > >
>> >       >       > > >/  -----Original Message-----
>> >       >       > > />/  From:owner-freebsd-arm at freebsd.org
>> >       >       > <http://lists.freebsd.org/mailman/listinfo/freebsd-arm=
>
>> [mailto:owner-
>> > freebsd-arm
>> >       > at
>> >       >       > freebsd.org  <
>> http://lists.freebsd.org/mailman/listinfo/freebsd-arm>] On
>> > Behalf Of
>> >       >       > > />/  Ian Lepore
>> >       >       > > />/  Sent: Sunday, September 21, 2014 3:44 PM
>> >       >       > > />/  To: Lundberg, Johannes
>> >       >       > > />/  Cc:freebsd-arm at freebsd.org
>> >       > <http://lists.freebsd.org/mailman/listinfo/freebsd-
>> >       >       > arm>
>> >       >       > > />/  Subject: Re: Jetson TK1 board support
>> >       >       > > />/
>> >       >       > > />/  On Sun, 2014-09-21 at 16:45 +0900, Lundberg,
>> Johannes wrote:
>> >       >       > > />/  > Great!
>> >       >       > > />/  >
>> >       >       > > />/  > What I've done so far is
>> >       >       > > />/  >
>> >       >       > > />/  > - build and patch (enable API) u-boot-nvidia
>> on freebsd (i think i
>> > got it
>> >       >       > > />/  > fromgit://
>> nv-tegra.nvidia.com/3rdparty/u-boot.git,  the normal u-
>> > boot
>> >       >       > > />/  > wouldn't work...)
>> >       >       > > />/  > - flash u-boot-dtb-tegra.img onto the board's
>> mmc using nvidia's
>> > flash
>> >       > tool
>> >       >       > > />/  > on ubuntu
>> >       >       > > />/  > - build an image using crochet and dd to sd
>> card (so far I copied
>> > the
>> >       >       > > />/  > beaglebone setup, just to get a ubldr and a
>> kernel file)
>> >       >       > > />/  >
>> >       >       > > />/  >
>> >       >       > > />/  > From u-boot I can see all devices. I load
>> ubldr with
>> >       >       > > />/  > fatload mmc 1:1 0x80200000 ubldr
>> >       >       > > />/  > bootelf 0x80200000
>> >       >       > > />/  >
>> >       >       > > />/  > ubldr load fine but, from ubldr I can only se=
e
>> the mmc 0 and net
>> > devices.
>> >       >       > > />/  > There's no sd card (mmc 1), and no ufs
>> partition..
>> >       >       > > />/  >
>> >       >       > > />/  >
>> >       >       > > />/  >
>> >       >       > > />/  >
>> >       >       > > />/  > --
>> >       >       > > />/  > Johannes Lundberg
>> >       >       > > />/  > BRILLIANTSERVICE CO., LTD.
>> >       >       > > />/  >
>> >       >       > > />/  > On Fri, Sep 19, 2014 at 8:25 PM, John Howie
>> <john at thehowies.com
>> >       >       > <http://lists.freebsd.org/mailman/listinfo/freebsd-arm=
>>
>> wrote:
>> >       >       > > />/  >
>> >       >       > > />/  > > Hi all,
>> >       >       > > />/  > >
>> >       >       > > />/  > > I am up for testing and supporting this
>> board. I ordered and
>> > received
>> >       >       > > />/  > > mine, but have not really had a chance to
>> use it due to work to-
>> > date.
>> >       > The
>> >       >       > > />/  > > good news is the next few months I will hav=
e
>> bandwidth.
>> >       >       > > />/  > >
>> >       >       > > />/  > > Regards,
>> >       >       > > />/  > >
>> >       >       > > />/  > > John
>> >       >       > > />/  > >
>> >       >       > > />/  > >
>> >       >       > > />/  > > On 9/19/14, 12:15 PM, "Lundberg, Johannes"
>> >       >       > > />/  > > <johannes at brilliantservice.co.jp
>> >       >       > <http://lists.freebsd.org/mailman/listinfo/freebsd-arm=
>>
>> wrote:
>> >       >       > > />/  > >
>> >       >       > > />/  > > >Hi
>> >       >       > > />/  > > >
>> >       >       > > />/  > > >I started working on adding the Jetson TK1
>> board to Crochet. Is
>> > there
>> >       > any
>> >       >       > > />/  > > >work in progress on this?
>> >       >       > > />/  > > >I guess there is quite a lot of work that
>> has to been done to
>> > get full
>> >       >       > > />/  > > >support for it in the kernel as well..
>> >       >       > > />/  > > >
>> >       >       > > />/  > > >Best regards
>> >       >       > > />/  > > >--
>> >       >       > > />/  > > >Johannes Lundberg
>> >       >       > > />/  > > >
>> >       >       > > />/
>> >       >       > > />/  You may have to change some u-boot options to
>> support multiple
>> > mmc/sd
>> >       >       > > />/  interfaces.  Look in the config header for
>> > CONFIG_SYS_MMC_MAX_DEVICE; if
>> >       >       > > />/  it's not there you may need to add it.  For
>> wandboard I also had to
>> > add
>> >       >       > > />/  a freescale-specific one,
>> CONFIG_SYS_FSL_USDHC_NUM, so there may be
>> >       >       > > />/  something like that you need to find as well.
>> >       >       > > />/
>> >       >       > > />/  -- Ian
>> >       >       > > />/
>> >       >       > > />/
>> >       >       > > />/  _______________________________________________
>> >       >       > > />/  freebsd-arm at freebsd.org
>> >       > <http://lists.freebsd.org/mailman/listinfo/freebsd-arm>;
>> >       >       > mailing list
>> >       >       > > />/
>> http://lists.freebsd.org/mailman/listinfo/freebsd-arm
>> >       >       > > />/  To unsubscribe, send any mail to
>> "freebsd-arm-unsubscribe at
>> > freebsd.org
>> >       >       > <http://lists.freebsd.org/mailman/listinfo/freebsd-arm
>> >"/
>> >       >       > _______________________________________________
>> >       >       > freebsd-arm@freebsd.org mailing list
>> >       >       > http://lists.freebsd.org/mailman/listinfo/freebsd-arm
>> >       >       > To unsubscribe, send any mail to "
>> freebsd-arm-unsubscribe@freebsd.org"
>> >       >
>> >       >
>> >
>> >
>> >
>>
>>
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPfmcGkwKSxe1Rqxp9-Zn%2BOQ_29KK1y=u3bWv7jx%2Bh4JbOWr9A>