Atheros AR93xx NAND support

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Atheros AR93xx NAND support

Gergely Kiss
Hi,

I have a home project about porting FreeBSD to my beloved Netgear
WNDR4300 V.1 board and would like to ask for a little bit of help.

The board is basically an Atheros DB120 reference board with a few
minor modifications (eg. it does not have SPI flash on-board, only a
NAND chip and has custom designed, "patent pending" integrated
antennas) so I cloned the DB120 kernel configuration and modified to
match the parameters of the Netgear board.

As the SPI flash chip is absent, I need to boot FreeBSD off the NAND
chip which works fine up to the point where the kernel is loaded but
the root filesystem (also residing on the NAND chip) cannot be mounted
because of the NAND controller not detected.

I'm using FreeBSD CURRENT with the NAND framework and NANDFS support
enabled in the kernel configuration according to instructions found on
the NAND wiki page [1] but I still can't see the NAND controller
detected.

Please advise.

As per this [2] wiki page, the controller should be detected as
"ar934x_nfc0" but I can't see anything like that in the logs:

"ar934x_nfc0: <AR934x NAND controller> on apb0"

Your help is much appreciated.

Thanks,
Gergely

[1] https://wiki.freebsd.org/NAND
[2] https://github.com/freebsd/freebsd-wifi-build/wiki/Atheros-ReferenceDB120
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-embedded
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Atheros AR93xx NAND support

Adrian Chadd-4
Hi,

There's currently no support for the NAND chip. I started a driver,
but i reached a point where I realised we'd have to churn our NAND
layer a bit in order to get it working. The AR934X NAND controller
isn't a dumb latch and wants to actually issue its own JEDEC commands
and do DMA.



-adrian

On Wed, 9 May 2018 at 07:05, Gergely Kiss <[hidden email]> wrote:

>
> Hi,
>
> I have a home project about porting FreeBSD to my beloved Netgear
> WNDR4300 V.1 board and would like to ask for a little bit of help.
>
> The board is basically an Atheros DB120 reference board with a few
> minor modifications (eg. it does not have SPI flash on-board, only a
> NAND chip and has custom designed, "patent pending" integrated
> antennas) so I cloned the DB120 kernel configuration and modified to
> match the parameters of the Netgear board.
>
> As the SPI flash chip is absent, I need to boot FreeBSD off the NAND
> chip which works fine up to the point where the kernel is loaded but
> the root filesystem (also residing on the NAND chip) cannot be mounted
> because of the NAND controller not detected.
>
> I'm using FreeBSD CURRENT with the NAND framework and NANDFS support
> enabled in the kernel configuration according to instructions found on
> the NAND wiki page [1] but I still can't see the NAND controller
> detected.
>
> Please advise.
>
> As per this [2] wiki page, the controller should be detected as
> "ar934x_nfc0" but I can't see anything like that in the logs:
>
> "ar934x_nfc0: <AR934x NAND controller> on apb0"
>
> Your help is much appreciated.
>
> Thanks,
> Gergely
>
> [1] https://wiki.freebsd.org/NAND
> [2] https://github.com/freebsd/freebsd-wifi-build/wiki/Atheros-ReferenceDB120
> _______________________________________________
> [hidden email] mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-embedded
> To unsubscribe, send any mail to "[hidden email]"
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-embedded
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Atheros AR93xx NAND support

Warner Losh
If you had good access to datasheets, plus errata, plus vendor support, you
might be able to get a quality implementation in 3-4 months time, which
would include time to revamp our NAND system. It doesn't include time to
revamp NANDFS, though, which would be another 2-3 months to get rock solid.

Warner

On Thu, Jun 28, 2018 at 2:17 PM, Adrian Chadd <[hidden email]>
wrote:

> Hi,
>
> There's currently no support for the NAND chip. I started a driver,
> but i reached a point where I realised we'd have to churn our NAND
> layer a bit in order to get it working. The AR934X NAND controller
> isn't a dumb latch and wants to actually issue its own JEDEC commands
> and do DMA.
>
>
>
> -adrian
>
> On Wed, 9 May 2018 at 07:05, Gergely Kiss <[hidden email]> wrote:
> >
> > Hi,
> >
> > I have a home project about porting FreeBSD to my beloved Netgear
> > WNDR4300 V.1 board and would like to ask for a little bit of help.
> >
> > The board is basically an Atheros DB120 reference board with a few
> > minor modifications (eg. it does not have SPI flash on-board, only a
> > NAND chip and has custom designed, "patent pending" integrated
> > antennas) so I cloned the DB120 kernel configuration and modified to
> > match the parameters of the Netgear board.
> >
> > As the SPI flash chip is absent, I need to boot FreeBSD off the NAND
> > chip which works fine up to the point where the kernel is loaded but
> > the root filesystem (also residing on the NAND chip) cannot be mounted
> > because of the NAND controller not detected.
> >
> > I'm using FreeBSD CURRENT with the NAND framework and NANDFS support
> > enabled in the kernel configuration according to instructions found on
> > the NAND wiki page [1] but I still can't see the NAND controller
> > detected.
> >
> > Please advise.
> >
> > As per this [2] wiki page, the controller should be detected as
> > "ar934x_nfc0" but I can't see anything like that in the logs:
> >
> > "ar934x_nfc0: <AR934x NAND controller> on apb0"
> >
> > Your help is much appreciated.
> >
> > Thanks,
> > Gergely
> >
> > [1] https://wiki.freebsd.org/NAND
> > [2] https://github.com/freebsd/freebsd-wifi-build/wiki/
> Atheros-ReferenceDB120
> > _______________________________________________
> > [hidden email] mailing list
> > https://lists.freebsd.org/mailman/listinfo/freebsd-embedded
> > To unsubscribe, send any mail to "freebsd-embedded-unsubscribe@
> freebsd.org"
> _______________________________________________
> [hidden email] mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-embedded
> To unsubscribe, send any mail to "[hidden email]
> "
>
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-embedded
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Atheros AR93xx NAND support

Emmanuel Vadot-7
On Thu, 28 Jun 2018 14:46:16 -0600
Warner Losh <[hidden email]> wrote:

> If you had good access to datasheets, plus errata, plus vendor support, you
> might be able to get a quality implementation in 3-4 months time, which
> would include time to revamp our NAND system. It doesn't include time to
> revamp NANDFS, though, which would be another 2-3 months to get rock solid.
>
> Warner

 I don't know the state of NAND in MIPS world but in the ARM world it's
clearly fading out. But I've always wondered if instead of NANDFS one
could do a geom_ftl (Flash Transision Layer) that will do all the nand
stuff and then we can use UFS on it ?

> On Thu, Jun 28, 2018 at 2:17 PM, Adrian Chadd <[hidden email]>
> wrote:
>
> > Hi,
> >
> > There's currently no support for the NAND chip. I started a driver,
> > but i reached a point where I realised we'd have to churn our NAND
> > layer a bit in order to get it working. The AR934X NAND controller
> > isn't a dumb latch and wants to actually issue its own JEDEC commands
> > and do DMA.
> >
> >
> >
> > -adrian
> >
> > On Wed, 9 May 2018 at 07:05, Gergely Kiss <[hidden email]> wrote:
> > >
> > > Hi,
> > >
> > > I have a home project about porting FreeBSD to my beloved Netgear
> > > WNDR4300 V.1 board and would like to ask for a little bit of help.
> > >
> > > The board is basically an Atheros DB120 reference board with a few
> > > minor modifications (eg. it does not have SPI flash on-board, only a
> > > NAND chip and has custom designed, "patent pending" integrated
> > > antennas) so I cloned the DB120 kernel configuration and modified to
> > > match the parameters of the Netgear board.
> > >
> > > As the SPI flash chip is absent, I need to boot FreeBSD off the NAND
> > > chip which works fine up to the point where the kernel is loaded but
> > > the root filesystem (also residing on the NAND chip) cannot be mounted
> > > because of the NAND controller not detected.
> > >
> > > I'm using FreeBSD CURRENT with the NAND framework and NANDFS support
> > > enabled in the kernel configuration according to instructions found on
> > > the NAND wiki page [1] but I still can't see the NAND controller
> > > detected.
> > >
> > > Please advise.
> > >
> > > As per this [2] wiki page, the controller should be detected as
> > > "ar934x_nfc0" but I can't see anything like that in the logs:
> > >
> > > "ar934x_nfc0: <AR934x NAND controller> on apb0"
> > >
> > > Your help is much appreciated.
> > >
> > > Thanks,
> > > Gergely
> > >
> > > [1] https://wiki.freebsd.org/NAND
> > > [2] https://github.com/freebsd/freebsd-wifi-build/wiki/
> > Atheros-ReferenceDB120
> > > _______________________________________________
> > > [hidden email] mailing list
> > > https://lists.freebsd.org/mailman/listinfo/freebsd-embedded
> > > To unsubscribe, send any mail to "freebsd-embedded-unsubscribe@
> > freebsd.org"
> > _______________________________________________
> > [hidden email] mailing list
> > https://lists.freebsd.org/mailman/listinfo/freebsd-embedded
> > To unsubscribe, send any mail to "[hidden email]
> > "
> >
> _______________________________________________
> [hidden email] mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-embedded
> To unsubscribe, send any mail to "[hidden email]"


--
Emmanuel Vadot <[hidden email]> <[hidden email]>
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-embedded
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Atheros AR93xx NAND support

Warner Losh
On Thu, Jun 28, 2018 at 5:10 PM, Emmanuel Vadot <[hidden email]>
wrote:

> On Thu, 28 Jun 2018 14:46:16 -0600
> Warner Losh <[hidden email]> wrote:
>
> > If you had good access to datasheets, plus errata, plus vendor support,
> you
> > might be able to get a quality implementation in 3-4 months time, which
> > would include time to revamp our NAND system. It doesn't include time to
> > revamp NANDFS, though, which would be another 2-3 months to get rock
> solid.
> >
> > Warner
>
>  I don't know the state of NAND in MIPS world but in the ARM world it's
> clearly fading out. But I've always wondered if instead of NANDFS one
> could do a geom_ftl (Flash Transision Layer) that will do all the nand
> stuff and then we can use UFS on it ?


That's logically appealing, but inefficient.The tables needed get kinda big
and/or you have to do a lot of NAND I/O to get the mappings since you are
hiding things from the UFS layer. NANDFS is a log filesystem, so it knows
how about how to interact with the append store that's NAND. It was one of
the biggest problems with Fusion I/O's driver: it had to keep this
translation table in memory. It made crash recovery difficult. It created
points of contention that limited performance. It could be done, but
experience suggests caution...

Warner
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-embedded
To unsubscribe, send any mail to "[hidden email]"