Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Jan 2018 11:30:29 -0600
From:      Kyle Evans <kevans@freebsd.org>
To:        Milan Obuch <freebsd-arm@dino.sk>
Cc:        =?UTF-8?B?6Zi/6YeR?= <unto.foru13@gmail.com>,  "freebsd-arm@freebsd.org" <freebsd-arm@freebsd.org>, Emmanuel Vadot <manu@freebsd.org>
Subject:   Re: Orange pi one ,receive panic: bad pte2
Message-ID:  <CACNAnaFMz9m%2BxT2Bbx=eN6C8SxNgY8P3U0edfiSHANNtEYCrHg@mail.gmail.com>
In-Reply-To: <20180116180800.07a8f8ef@zeta.dino.sk>
References:  <CAKpwDm1==KqBMsyKQ5Q2tdoyYP6JMFizS6ASZt3L4X2oQVky6Q@mail.gmail.com> <8DD425C1-FEF4-4BC0-9A80-916B50620896@dsl-only.net> <CAKpwDm0bt77Z3xr5_d7Os%2BR8dVjjSH4gy99wmchOWg3oG6TrRQ@mail.gmail.com> <CACNAnaHdX-DUunX%2Bsmg4svpBtifx74JvYO51zmJba%2BugDLD8ng@mail.gmail.com> <CAKpwDm2LDmO0ZGpnU37Qbj0sOQ7LMm5UPz_u5LQakTh__fvCCA@mail.gmail.com> <CACNAnaHeZ9CxQJO57eKZCTMtey6H-8UT%2BbDzCW8bsrcBscvObQ@mail.gmail.com> <20180116180800.07a8f8ef@zeta.dino.sk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jan 16, 2018 at 11:08 AM, Milan Obuch <freebsd-arm@dino.sk> wrote:
> On Tue, 16 Jan 2018 08:21:47 -0600
> Kyle Evans <kevans@freebsd.org> wrote:
>
>> On Tue, Jan 16, 2018 at 7:19 AM, =E9=98=BF=E9=87=91 <unto.foru13@gmail.c=
om> wrote:
>> > OKOK below is booting message.
>>
>> Thanks!
>>
>> > [ .. snip .. ]
>> > syscon_generic0: <syscon> mem 0x1c00000-0x1c00033 on simplebus0
>> > [.. snip ..]
>> > awg0: <Allwinner Gigabit Ethernet> mem
>> > 0x1c30000-0x1c30103,0x1c00030-0x1c00033 irq 23 on simplebus0
>> > awg0: cannot get tx clock
>> > [.. snip .. ]
>>
>> That explains it- I hadn't encountered this in practice, so it broke.
>> =3D( Your DTS here has a /soc/syscon *and* uses our former hacky method
>> for passing syscon, so syscon_generic takes the syscon registers and
>> awg can't. You have I think three choices for recourse here, any of
>> which should fix your problem:
>>
>> 1.) Remove the /soc/syscon from the DTB you're using
>> 2.) Update your DTB to actually use /soc/syscon, removing the syscon
>> reg from /soc/ethernet and adding a 'syscon =3D <&syscon>' attribute to
>> that node.
>> 3.) Update to r327825 or later and pull new DTS from Linux. If pulling
>> new from Linux is a pain, I can generate a new DTB for you based on
>> what we'll be importing from Linux in a couple weeks.
>>
>> r327825 added support for the new stable emac bindings, so after DTS
>> update this won't break again.
>>
>
> In my case, using Orange Pi Zero, I observed similar behavior. Using
> older DTB ethernet works, and with tips mentioned above I was quickly
> able to modify my DTS, so ethernet works again. It just uses different
> MAC. Question is, where does it actually come from, and, maybe, where
> should it come from.

IIRC, The following are possible sources of MAC address in an order of
precedence:

1.) You set it manually
2.) It's set in hardware (U-Boot, maybe?)
3.) It's set explicitly in DTS
4.) There's a sid driver in your DTS, then awg will use the rootkey
from sid to derive a rootkey
5.) None of the above are true, then it will randomly generate a MAC addres=
s

I'm not sure about your board, but on a couple of mine only options
1,4, and 5 are applicable- there is no hardware-set MAC and it's not
set in DTS.

> This is from dmesg:
>
> awg0: <Allwinner Gigabit Ethernet> mem 0x1c30000-0x1c30103 irq 38 on simp=
lebus0
> simplebus0: no default resources for rid =3D 1, type =3D 3
> awg0: PHY type: mii, conf mode: reg
> awg0: EMAC clock: 0x00168000
> awg0: AHB frequency 300000000 Hz, MDC div: 0x3
>
> Any idea what resource is not found here? IS it something to worry
> about?

The resource not found would be the syscon register that we used to
pass in. No need to worry about it unless the line spitting out the
PHY type and conf mode is telling you it's using the "clk" conf mode
instead of "reg" because it's specified as an 'optional'

At this point, the "clk" mode is effectively legacy and I would like
to rip it out once we get sufficiently far down the road that .dts
using it (read: our older dts) will effectively no longer be
supported. These exist in stable/11, so it'll be a while. =3D)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACNAnaFMz9m%2BxT2Bbx=eN6C8SxNgY8P3U0edfiSHANNtEYCrHg>