Re: OpenBSD on Kosagi Novena open-source ARM board/desktop/laptop

2015-05-11 Thread Damien Miller
On Mon, 11 May 2015, Jonathan Gray wrote:

> Index: imxesdhc.c
> ===
> RCS file: /cvs/src/sys/arch/armv7/imx/imxesdhc.c,v
> retrieving revision 1.7
> diff -u -p -r1.7 imxesdhc.c
> --- imxesdhc.c8 May 2015 03:38:26 -   1.7
> +++ imxesdhc.c11 May 2015 06:57:10 -
> @@ -262,6 +262,9 @@ imxesdhc_attach(struct device *parent, s
>   sc->sc_ih = arm_intr_establish(aa->aa_dev->irq[0], IPL_SDMMC,
>  imxesdhc_intr, sc, sc->sc_dev.dv_xname);
>  
> + HSET4(sc, SDHC_HOST_CTRL_CAP, SDHC_HOST_CTRL_CAP_VS18 |
> + SDHC_HOST_CTRL_CAP_VS30);

no change with this



Re: OpenBSD on Kosagi Novena open-source ARM board/desktop/laptop

2015-05-11 Thread Stefan Sperling
On Mon, May 11, 2015 at 02:49:14PM +1000, Jonathan Gray wrote:
> Getting at the atheros wlan/mini pcie slot would need something along
> the lines of Patrick's imxpcibr work.

And once you're there you'll need AR9285 support in athn(4) as well.

Or swap in a supported card.
I suppose there's no wifi whitelist in BIOS? ;)



Re: OpenBSD on Kosagi Novena open-source ARM board/desktop/laptop

2015-05-11 Thread Jonathan Gray
On Mon, May 11, 2015 at 04:31:30PM +1000, Damien Miller wrote:
> On Mon, 11 May 2015, Jonathan Gray wrote:
> 
> > > If you can get an installation completed (the imxenet is pretty flaky,
> > > possibly because of an all-0 MAC address), then you'll also need to
> > > copy bsd*.IMX.umg to the /boot partition of the sdcard under Linux
> > > (OpenBSD can't access the sdcard yet) and arrange uboot to fatload
> > > it from there. Something like:
> > 
> > There are two sd slots which one doesn't work?
> > 
> > The (internal?) micro-sd slot doesn't have card detect
> > the (external?) normal sized sd slot does
> 
> I haven't tried the external one, but the internal one doesn't work.
> I'm not sure which is which in the dmesg:
> 
> imxesdhc0 at imx0
> sdmmc0 at imxesdhc0
> imxesdhc1 at imx0
> sdmmc1 at imxesdhc1
> ...
> sdmmc1: can't enable card
> 
> -d

That reminds me of the problem I ran into with my bbb a while ago.
Here is what should be the equivalent diff for imx.

Index: imxesdhc.c
===
RCS file: /cvs/src/sys/arch/armv7/imx/imxesdhc.c,v
retrieving revision 1.7
diff -u -p -r1.7 imxesdhc.c
--- imxesdhc.c  8 May 2015 03:38:26 -   1.7
+++ imxesdhc.c  11 May 2015 06:57:10 -
@@ -262,6 +262,9 @@ imxesdhc_attach(struct device *parent, s
sc->sc_ih = arm_intr_establish(aa->aa_dev->irq[0], IPL_SDMMC,
   imxesdhc_intr, sc, sc->sc_dev.dv_xname);
 
+   HSET4(sc, SDHC_HOST_CTRL_CAP, SDHC_HOST_CTRL_CAP_VS18 |
+   SDHC_HOST_CTRL_CAP_VS30);
+
/*
 * Reset the host controller and enable interrupts.
 */



Re: OpenBSD on Kosagi Novena open-source ARM board/desktop/laptop

2015-05-10 Thread Damien Miller
On Mon, 11 May 2015, Jonathan Gray wrote:

> > If you can get an installation completed (the imxenet is pretty flaky,
> > possibly because of an all-0 MAC address), then you'll also need to
> > copy bsd*.IMX.umg to the /boot partition of the sdcard under Linux
> > (OpenBSD can't access the sdcard yet) and arrange uboot to fatload
> > it from there. Something like:
> 
> There are two sd slots which one doesn't work?
> 
> The (internal?) micro-sd slot doesn't have card detect
> the (external?) normal sized sd slot does

I haven't tried the external one, but the internal one doesn't work.
I'm not sure which is which in the dmesg:

imxesdhc0 at imx0
sdmmc0 at imxesdhc0
imxesdhc1 at imx0
sdmmc1 at imxesdhc1
...
sdmmc1: can't enable card

-d



Re: OpenBSD on Kosagi Novena open-source ARM board/desktop/laptop

2015-05-10 Thread Jonathan Gray
On Mon, May 11, 2015 at 12:44:14PM +1000, Damien Miller wrote:
> Hi,
> 
> Thanks to jsg@, the latest snapshot releases of
> OpenBSD will boot on the Novenai open-source laptop
> (http://www.kosagi.com/w/index.php?title=Novena_Main_Page). It's still
> very rough: no SMP, flaky USB and support for the eeprom (so no MAC
> addr on the IMX ethernet), but it gets to multi-user and could probably
> compile its own kernel given the chance.

The commited VM_MAX_KERNEL_ADDRESS fix includes a page more memory
than what's in the snap, it would be nice to confirm that
the committed version works as well.

The eeprom is hooked up via i2c and will need imxiic in novena_devs[]
and likely some additional imxiic changes from Patrick.

Getting at the atheros wlan/mini pcie slot would need something along
the lines of Patrick's imxpcibr work.

Audio looks to need a new driver for the ES8328 hooked up to imx via
gpio/i2c?

Then there is all the rest of the io devices not to mention lvds...

> 
> http://pastebin.com/raw.php?i=dr2qZSi2 is a boot log
> 
> To try it out, the easiest way is to setup a tftp server and configure
> DHCP to tell Novena about it. Then boot/reset with the user button held
> down, ^C when prompted (be quick, you only have a couple of seconds) and
> issue the following u-boot commands:
> 
> setenv machid 10ad
> setenv loadaddr 0x1080
> dhcp
> bootm
> 
> Note that u-boot doesn't seem to fully reset the ethernet
> controller/MAC. If you experience partial transfers that abort due to
> timeouts during the 'dhcp' command then a workaround is to completely
> remove power from Novena and try again after a minute or three.
> 
> If you can get an installation completed (the imxenet is pretty flaky,
> possibly because of an all-0 MAC address), then you'll also need to
> copy bsd*.IMX.umg to the /boot partition of the sdcard under Linux
> (OpenBSD can't access the sdcard yet) and arrange uboot to fatload
> it from there. Something like:

There are two sd slots which one doesn't work?

The (internal?) micro-sd slot doesn't have card detect
the (external?) normal sized sd slot does

> 
> setenv machid 10ad
> setenv loadaddr 0x1080
> fatload mmc 0 0x1080 bsd.IMG.umg
> bootm
> 
> I baked these sequences into u-boot by following the instructions at
> http://www.kosagi.com/w/index.php?title=U-boot_PVT_Notes and
> modifying include/configs/novena.h with the additional commands,
> but it's also probably possible to put them in the /boot/uEnv.txt file
> that uboot reads at startup.

Compiling u-boot is painful, I tried to do it natively on bbb but
gave up as it seems to expect linux headers.  Just modifiying
uEnv.txt is much easier.



OpenBSD on Kosagi Novena open-source ARM board/desktop/laptop

2015-05-10 Thread Damien Miller
Hi,

Thanks to jsg@, the latest snapshot releases of
OpenBSD will boot on the Novenai open-source laptop
(http://www.kosagi.com/w/index.php?title=Novena_Main_Page). It's still
very rough: no SMP, flaky USB and support for the eeprom (so no MAC
addr on the IMX ethernet), but it gets to multi-user and could probably
compile its own kernel given the chance.

http://pastebin.com/raw.php?i=dr2qZSi2 is a boot log

To try it out, the easiest way is to setup a tftp server and configure
DHCP to tell Novena about it. Then boot/reset with the user button held
down, ^C when prompted (be quick, you only have a couple of seconds) and
issue the following u-boot commands:

setenv machid 10ad
setenv loadaddr 0x1080
dhcp
bootm

Note that u-boot doesn't seem to fully reset the ethernet
controller/MAC. If you experience partial transfers that abort due to
timeouts during the 'dhcp' command then a workaround is to completely
remove power from Novena and try again after a minute or three.

If you can get an installation completed (the imxenet is pretty flaky,
possibly because of an all-0 MAC address), then you'll also need to
copy bsd*.IMX.umg to the /boot partition of the sdcard under Linux
(OpenBSD can't access the sdcard yet) and arrange uboot to fatload
it from there. Something like:

setenv machid 10ad
setenv loadaddr 0x1080
fatload mmc 0 0x1080 bsd.IMG.umg
bootm

I baked these sequences into u-boot by following the instructions at
http://www.kosagi.com/w/index.php?title=U-boot_PVT_Notes and
modifying include/configs/novena.h with the additional commands,
but it's also probably possible to put them in the /boot/uEnv.txt file
that uboot reads at startup.

-d