Re: [phess...@openbsd.org: add pinebook support to u-boot]

2017-08-31 Thread Jonathan Gray
On Thu, Aug 31, 2017 at 11:41:44AM +0200, Peter Hessler wrote:
> On 2017 Aug 31 (Thu) at 19:16:57 +1000 (+1000), Jonathan Gray wrote:
> :On Thu, Aug 31, 2017 at 10:59:20AM +0200, Peter Hessler wrote:
> :> On 2017 Aug 31 (Thu) at 10:41:41 +0200 (+0200), Peter Hessler wrote:
> :> :On 2017 Aug 27 (Sun) at 22:15:46 +0200 (+0200), Peter Hessler wrote:
> :> ::- Forwarded message from Peter Hessler  -
> :> ::taken from Icenowy Zheng's repository,
> :> ::commit bd656cab0c3e0669e977641c15095f32d7b0731f
> :> ::
> :> ::This gives us basic support for the Pine64 Pinebook
> :> ::
> :> ::OK?
> :> ::
> :> ::$ sysctl hw
> :> ::hw.machine=arm64
> :> ::hw.model=ARM Cortex-A53 r0p4
> :> ::hw.ncpu=1
> :> ::hw.byteorder=1234
> :> ::hw.pagesize=4096
> :> ::hw.disknames=sd0:d76c5b9369f79257
> :> ::hw.diskcount=1
> :> ::hw.product=Pinebook
> :> ::hw.physmem=2021924864
> :> ::hw.usermem=2021912576
> :> ::hw.ncpufound=1
> :> ::hw.allowpowerdown=1
> :> ::
> :> ::
> :> :
> :> :Updated to chase rc3, move new files to file/, slight simplification to
> :> :the defconfig.
> :> :
> :> :OK?
> :> :
> :> 
> :> Better version, sorry for the noise
> :
> :What is your intended change to the sopine configuration?
> :Changing the model/compat strings in the device tree?
> :
> 
> to start with, yes.  later, there will be more hardware supported.
> 
> 
> :The defconfig should drop CONFIG_SUN8I_EMAC=y as there is Ethernet.
> :
> :Current difference to sopine_baseboard being
> :-CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-pine64-plus"
> :+CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-pinebook"
> :
> :I see no reason why the dts can't be almost the same as
> :sun50i-a64-pine64-plus.dts:
> :
> :#include "sun50i-a64-pine64.dts"
> :
> :/ {
> : model = "Pinebook";
> : compatible = "pine64,pinebook", "allwinner,sun50i-a64";
> :};
> :
> 
> I pulled it from upstream.  
> https://github.com/Icenowy/u-boot/blob/sunxi64-beta-pb-lcd-lpddr3/arch/arm/dts/sun50i-a64-pinebook.dts

upstream is not a random branch on github it is http://git.denx.de/?p=u-boot.git

That branch also dates back to before many a64/pine64 changes went in.



Re: [phess...@openbsd.org: add pinebook support to u-boot]

2017-08-31 Thread Peter Hessler
On 2017 Aug 31 (Thu) at 19:16:57 +1000 (+1000), Jonathan Gray wrote:
:On Thu, Aug 31, 2017 at 10:59:20AM +0200, Peter Hessler wrote:
:> On 2017 Aug 31 (Thu) at 10:41:41 +0200 (+0200), Peter Hessler wrote:
:> :On 2017 Aug 27 (Sun) at 22:15:46 +0200 (+0200), Peter Hessler wrote:
:> ::- Forwarded message from Peter Hessler  -
:> ::taken from Icenowy Zheng's repository,
:> ::commit bd656cab0c3e0669e977641c15095f32d7b0731f
:> ::
:> ::This gives us basic support for the Pine64 Pinebook
:> ::
:> ::OK?
:> ::
:> ::$ sysctl hw
:> ::hw.machine=arm64
:> ::hw.model=ARM Cortex-A53 r0p4
:> ::hw.ncpu=1
:> ::hw.byteorder=1234
:> ::hw.pagesize=4096
:> ::hw.disknames=sd0:d76c5b9369f79257
:> ::hw.diskcount=1
:> ::hw.product=Pinebook
:> ::hw.physmem=2021924864
:> ::hw.usermem=2021912576
:> ::hw.ncpufound=1
:> ::hw.allowpowerdown=1
:> ::
:> ::
:> :
:> :Updated to chase rc3, move new files to file/, slight simplification to
:> :the defconfig.
:> :
:> :OK?
:> :
:> 
:> Better version, sorry for the noise
:
:What is your intended change to the sopine configuration?
:Changing the model/compat strings in the device tree?
:

to start with, yes.  later, there will be more hardware supported.


:The defconfig should drop CONFIG_SUN8I_EMAC=y as there is Ethernet.
:
:Current difference to sopine_baseboard being
:-CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-pine64-plus"
:+CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-pinebook"
:
:I see no reason why the dts can't be almost the same as
:sun50i-a64-pine64-plus.dts:
:
:#include "sun50i-a64-pine64.dts"
:
:/ {
:   model = "Pinebook";
:   compatible = "pine64,pinebook", "allwinner,sun50i-a64";
:};
:

I pulled it from upstream.  
https://github.com/Icenowy/u-boot/blob/sunxi64-beta-pb-lcd-lpddr3/arch/arm/dts/sun50i-a64-pinebook.dts

I can trim it down, whatever.  Is there any other bikeshedding that
people want to do for this board?


-- 
She said, `I know you ... you cannot sing'.  I said, `That's nothing,
you should hear me play piano.'
-- Morrisey



Re: [phess...@openbsd.org: add pinebook support to u-boot]

2017-08-31 Thread Jonathan Gray
On Thu, Aug 31, 2017 at 10:59:20AM +0200, Peter Hessler wrote:
> On 2017 Aug 31 (Thu) at 10:41:41 +0200 (+0200), Peter Hessler wrote:
> :On 2017 Aug 27 (Sun) at 22:15:46 +0200 (+0200), Peter Hessler wrote:
> ::- Forwarded message from Peter Hessler  -
> ::taken from Icenowy Zheng's repository,
> ::commit bd656cab0c3e0669e977641c15095f32d7b0731f
> ::
> ::This gives us basic support for the Pine64 Pinebook
> ::
> ::OK?
> ::
> ::$ sysctl hw
> ::hw.machine=arm64
> ::hw.model=ARM Cortex-A53 r0p4
> ::hw.ncpu=1
> ::hw.byteorder=1234
> ::hw.pagesize=4096
> ::hw.disknames=sd0:d76c5b9369f79257
> ::hw.diskcount=1
> ::hw.product=Pinebook
> ::hw.physmem=2021924864
> ::hw.usermem=2021912576
> ::hw.ncpufound=1
> ::hw.allowpowerdown=1
> ::
> ::
> :
> :Updated to chase rc3, move new files to file/, slight simplification to
> :the defconfig.
> :
> :OK?
> :
> 
> Better version, sorry for the noise

What is your intended change to the sopine configuration?
Changing the model/compat strings in the device tree?

The defconfig should drop CONFIG_SUN8I_EMAC=y as there is Ethernet.

Current difference to sopine_baseboard being
-CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-pine64-plus"
+CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-pinebook"

I see no reason why the dts can't be almost the same as
sun50i-a64-pine64-plus.dts:

#include "sun50i-a64-pine64.dts"

/ {
model = "Pinebook";
compatible = "pine64,pinebook", "allwinner,sun50i-a64";
};

> 
> Index: sysutils/u-boot/Makefile
> ===
> RCS file: /cvs/openbsd/ports/sysutils/u-boot/Makefile,v
> retrieving revision 1.26
> diff -u -p -u -p -r1.26 Makefile
> --- sysutils/u-boot/Makefile  29 Aug 2017 07:14:50 -  1.26
> +++ sysutils/u-boot/Makefile  31 Aug 2017 08:42:35 -
> @@ -7,6 +7,7 @@ FLAVOR?=  arm
>  
>  COMMENT= U-Boot firmware
>  VERSION= 2017.09-rc3
> +REVISION=0
>  DISTNAME=u-boot-${VERSION}
>  PKGNAME= u-boot-${FLAVOR}-${VERSION:S/-//}
>  FULLPKGNAME= ${PKGNAME}
> @@ -57,6 +58,7 @@ SUNXI64=\
>   orangepi_prime \
>   orangepi_win \
>   pine64_plus \
> + pinebook \
>   sopine_baseboard
>  BOARDS=\
>   mvebu_espressobin-88f3720 \
> @@ -140,6 +142,8 @@ pre-build:
>  .for f in ${MODPY_ADJ_FILES}
>   ${MODPY_BIN_ADJ} ${WRKSRC}/${f}
>  .endfor
> + cp ${FILESDIR}/pinebook_defconfig ${WRKSRC}/configs/
> + cp ${FILESDIR}/sun50i-a64-pinebook.dts ${WRKSRC}/arch/arm/dts/
>  
>  do-build:
>  .for BOARD in ${BOARDS}
> Index: sysutils/u-boot/files/pinebook_defconfig
> ===
> RCS file: sysutils/u-boot/files/pinebook_defconfig
> diff -N sysutils/u-boot/files/pinebook_defconfig
> --- /dev/null 1 Jan 1970 00:00:00 -
> +++ sysutils/u-boot/files/pinebook_defconfig  30 Aug 2017 17:40:34 -
> @@ -0,0 +1,22 @@
> +CONFIG_ARM=y
> +CONFIG_ARCH_SUNXI=y
> +CONFIG_MACH_SUN50I=y
> +CONFIG_RESERVE_ALLWINNER_BOOT0_HEADER=y
> +CONFIG_SUNXI_DRAM_LPDDR3_STOCK=y
> +CONFIG_DRAM_CLK=552
> +CONFIG_DRAM_ZQ=3881949
> +CONFIG_DRAM_ODT_EN=y
> +CONFIG_MMC0_CD_PIN=""
> +CONFIG_MMC_SUNXI_SLOT_EXTRA=2
> +CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-pinebook"
> +# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
> +CONFIG_SPL=y
> +# CONFIG_CMD_IMLS is not set
> +# CONFIG_CMD_FLASH is not set
> +# CONFIG_CMD_FPGA is not set
> +# CONFIG_SPL_DOS_PARTITION is not set
> +# CONFIG_SPL_ISO_PARTITION is not set
> +# CONFIG_SPL_EFI_PARTITION is not set
> +CONFIG_SPL_SPI_SUNXI=y
> +CONFIG_SUN8I_EMAC=y
> +CONFIG_USB_EHCI_HCD=y
> Index: sysutils/u-boot/files/sun50i-a64-pinebook.dts
> ===
> RCS file: sysutils/u-boot/files/sun50i-a64-pinebook.dts
> diff -N sysutils/u-boot/files/sun50i-a64-pinebook.dts
> --- /dev/null 1 Jan 1970 00:00:00 -
> +++ sysutils/u-boot/files/sun50i-a64-pinebook.dts 30 Aug 2017 17:42:18 
> -
> @@ -0,0 +1,91 @@
> +/*
> + * Copyright (c) 2016 ARM Ltd.
> + *
> + * This file is dual-licensed: you can use it either under the terms
> + * of the GPL or the X11 license, at your option. Note that this dual
> + * licensing only applies to this file, and not this project as a
> + * whole.
> + *
> + *  a) This library is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License as
> + * published by the Free Software Foundation; either version 2 of the
> + * License, or (at your option) any later version.
> + *
> + * This library is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU General Public License for more details.
> + *
> + * Or, alternatively,
> + *
> + *  b) Permission is hereby granted, free of charge, to any person
> + * obtaining a copy of this software and associated documentation
> + * 

Re: [phess...@openbsd.org: add pinebook support to u-boot]

2017-08-31 Thread Peter Hessler
On 2017 Aug 31 (Thu) at 10:41:41 +0200 (+0200), Peter Hessler wrote:
:On 2017 Aug 27 (Sun) at 22:15:46 +0200 (+0200), Peter Hessler wrote:
::- Forwarded message from Peter Hessler  -
::taken from Icenowy Zheng's repository,
::commit bd656cab0c3e0669e977641c15095f32d7b0731f
::
::This gives us basic support for the Pine64 Pinebook
::
::OK?
::
::$ sysctl hw
::hw.machine=arm64
::hw.model=ARM Cortex-A53 r0p4
::hw.ncpu=1
::hw.byteorder=1234
::hw.pagesize=4096
::hw.disknames=sd0:d76c5b9369f79257
::hw.diskcount=1
::hw.product=Pinebook
::hw.physmem=2021924864
::hw.usermem=2021912576
::hw.ncpufound=1
::hw.allowpowerdown=1
::
::
:
:Updated to chase rc3, move new files to file/, slight simplification to
:the defconfig.
:
:OK?
:

Better version, sorry for the noise

Index: sysutils/u-boot/Makefile
===
RCS file: /cvs/openbsd/ports/sysutils/u-boot/Makefile,v
retrieving revision 1.26
diff -u -p -u -p -r1.26 Makefile
--- sysutils/u-boot/Makefile29 Aug 2017 07:14:50 -  1.26
+++ sysutils/u-boot/Makefile31 Aug 2017 08:42:35 -
@@ -7,6 +7,7 @@ FLAVOR?=arm
 
 COMMENT=   U-Boot firmware
 VERSION=   2017.09-rc3
+REVISION=  0
 DISTNAME=  u-boot-${VERSION}
 PKGNAME=   u-boot-${FLAVOR}-${VERSION:S/-//}
 FULLPKGNAME=   ${PKGNAME}
@@ -57,6 +58,7 @@ SUNXI64=\
orangepi_prime \
orangepi_win \
pine64_plus \
+   pinebook \
sopine_baseboard
 BOARDS=\
mvebu_espressobin-88f3720 \
@@ -140,6 +142,8 @@ pre-build:
 .for f in ${MODPY_ADJ_FILES}
${MODPY_BIN_ADJ} ${WRKSRC}/${f}
 .endfor
+   cp ${FILESDIR}/pinebook_defconfig ${WRKSRC}/configs/
+   cp ${FILESDIR}/sun50i-a64-pinebook.dts ${WRKSRC}/arch/arm/dts/
 
 do-build:
 .for BOARD in ${BOARDS}
Index: sysutils/u-boot/files/pinebook_defconfig
===
RCS file: sysutils/u-boot/files/pinebook_defconfig
diff -N sysutils/u-boot/files/pinebook_defconfig
--- /dev/null   1 Jan 1970 00:00:00 -
+++ sysutils/u-boot/files/pinebook_defconfig30 Aug 2017 17:40:34 -
@@ -0,0 +1,22 @@
+CONFIG_ARM=y
+CONFIG_ARCH_SUNXI=y
+CONFIG_MACH_SUN50I=y
+CONFIG_RESERVE_ALLWINNER_BOOT0_HEADER=y
+CONFIG_SUNXI_DRAM_LPDDR3_STOCK=y
+CONFIG_DRAM_CLK=552
+CONFIG_DRAM_ZQ=3881949
+CONFIG_DRAM_ODT_EN=y
+CONFIG_MMC0_CD_PIN=""
+CONFIG_MMC_SUNXI_SLOT_EXTRA=2
+CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-pinebook"
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
+CONFIG_SPL=y
+# CONFIG_CMD_IMLS is not set
+# CONFIG_CMD_FLASH is not set
+# CONFIG_CMD_FPGA is not set
+# CONFIG_SPL_DOS_PARTITION is not set
+# CONFIG_SPL_ISO_PARTITION is not set
+# CONFIG_SPL_EFI_PARTITION is not set
+CONFIG_SPL_SPI_SUNXI=y
+CONFIG_SUN8I_EMAC=y
+CONFIG_USB_EHCI_HCD=y
Index: sysutils/u-boot/files/sun50i-a64-pinebook.dts
===
RCS file: sysutils/u-boot/files/sun50i-a64-pinebook.dts
diff -N sysutils/u-boot/files/sun50i-a64-pinebook.dts
--- /dev/null   1 Jan 1970 00:00:00 -
+++ sysutils/u-boot/files/sun50i-a64-pinebook.dts   30 Aug 2017 17:42:18 
-
@@ -0,0 +1,91 @@
+/*
+ * Copyright (c) 2016 ARM Ltd.
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, 

Re: [phess...@openbsd.org: add pinebook support to u-boot]

2017-08-31 Thread Peter Hessler
On 2017 Aug 27 (Sun) at 22:15:46 +0200 (+0200), Peter Hessler wrote:
:- Forwarded message from Peter Hessler  -
:taken from Icenowy Zheng's repository,
:commit bd656cab0c3e0669e977641c15095f32d7b0731f
:
:This gives us basic support for the Pine64 Pinebook
:
:OK?
:
:$ sysctl hw
:hw.machine=arm64
:hw.model=ARM Cortex-A53 r0p4
:hw.ncpu=1
:hw.byteorder=1234
:hw.pagesize=4096
:hw.disknames=sd0:d76c5b9369f79257
:hw.diskcount=1
:hw.product=Pinebook
:hw.physmem=2021924864
:hw.usermem=2021912576
:hw.ncpufound=1
:hw.allowpowerdown=1
:
:

Updated to chase rc3, move new files to file/, slight simplification to
the defconfig.

OK?

Index: sysutils/u-boot/Makefile
===
RCS file: /cvs/openbsd/ports/sysutils/u-boot/Makefile,v
retrieving revision 1.26
diff -u -p -u -p -r1.26 Makefile
--- sysutils/u-boot/Makefile29 Aug 2017 07:14:50 -  1.26
+++ sysutils/u-boot/Makefile31 Aug 2017 08:37:57 -
@@ -7,6 +7,7 @@ FLAVOR?=arm
 
 COMMENT=   U-Boot firmware
 VERSION=   2017.09-rc3
+REVISION=  0
 DISTNAME=  u-boot-${VERSION}
 PKGNAME=   u-boot-${FLAVOR}-${VERSION:S/-//}
 FULLPKGNAME=   ${PKGNAME}
@@ -57,6 +58,7 @@ SUNXI64=\
orangepi_prime \
orangepi_win \
pine64_plus \
+   pinebook \
sopine_baseboard
 BOARDS=\
mvebu_espressobin-88f3720 \
@@ -140,6 +142,9 @@ pre-build:
 .for f in ${MODPY_ADJ_FILES}
${MODPY_BIN_ADJ} ${WRKSRC}/${f}
 .endfor
+   cp ${FILESDIR}/pinebook_defconfig ${WRKSRC}/configs/
+   cp ${FILESDIR}/sun50i-a64-pinebook.dts ${WRKSRC}/arch/arm/dts/
+   cp ${FILESDIR}/sun50i-a64-pine64-common.dtsi ${WRKSRC}/arch/arm/dts/
 
 do-build:
 .for BOARD in ${BOARDS}
Index: sysutils/u-boot/files/pinebook_defconfig
===
RCS file: sysutils/u-boot/files/pinebook_defconfig
diff -N sysutils/u-boot/files/pinebook_defconfig
--- /dev/null   1 Jan 1970 00:00:00 -
+++ sysutils/u-boot/files/pinebook_defconfig30 Aug 2017 17:40:34 -
@@ -0,0 +1,22 @@
+CONFIG_ARM=y
+CONFIG_ARCH_SUNXI=y
+CONFIG_MACH_SUN50I=y
+CONFIG_RESERVE_ALLWINNER_BOOT0_HEADER=y
+CONFIG_SUNXI_DRAM_LPDDR3_STOCK=y
+CONFIG_DRAM_CLK=552
+CONFIG_DRAM_ZQ=3881949
+CONFIG_DRAM_ODT_EN=y
+CONFIG_MMC0_CD_PIN=""
+CONFIG_MMC_SUNXI_SLOT_EXTRA=2
+CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-pinebook"
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
+CONFIG_SPL=y
+# CONFIG_CMD_IMLS is not set
+# CONFIG_CMD_FLASH is not set
+# CONFIG_CMD_FPGA is not set
+# CONFIG_SPL_DOS_PARTITION is not set
+# CONFIG_SPL_ISO_PARTITION is not set
+# CONFIG_SPL_EFI_PARTITION is not set
+CONFIG_SPL_SPI_SUNXI=y
+CONFIG_SUN8I_EMAC=y
+CONFIG_USB_EHCI_HCD=y
Index: sysutils/u-boot/files/sun50i-a64-pinebook.dts
===
RCS file: sysutils/u-boot/files/sun50i-a64-pinebook.dts
diff -N sysutils/u-boot/files/sun50i-a64-pinebook.dts
--- /dev/null   1 Jan 1970 00:00:00 -
+++ sysutils/u-boot/files/sun50i-a64-pinebook.dts   30 Aug 2017 17:42:18 
-
@@ -0,0 +1,91 @@
+/*
+ * Copyright (c) 2016 ARM Ltd.
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF 

Re: [phess...@openbsd.org: add pinebook support to u-boot]

2017-08-27 Thread Jeremie Courreges-Anglas
On Sun, Aug 27 2017, Peter Hessler  wrote:
> - Forwarded message from Peter Hessler  -
> taken from Icenowy Zheng's repository,
> commit bd656cab0c3e0669e977641c15095f32d7b0731f
>
> This gives us basic support for the Pine64 Pinebook
>
> OK?

sun50i-a64-pinebook.dtb and pinebook_defconfig are new files, not
patches.  I would suggest adding them as using DISTFILES or PATCHFILES,
hosted outside of the ports tree.  Less goo in the tree, and less
chances of problems if the license of those files turns out to be
a problem.  I can cook a diff for this.

-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE



Re: [phess...@openbsd.org: add pinebook support to u-boot]

2017-08-27 Thread Peter Hessler
On 2017 Aug 27 (Sun) at 22:30:37 +0200 (+0200), Mark Kettenis wrote:
:> Date: Sun, 27 Aug 2017 22:15:46 +0200
:> From: Peter Hessler 
:> 
:> This gives us basic support for the Pine64 Pinebook
:> 
:> OK?
:> 
:> $ sysctl hw
:> hw.machine=arm64
:> hw.model=ARM Cortex-A53 r0p4
:> hw.ncpu=1
:> hw.byteorder=1234
:> hw.pagesize=4096
:> hw.disknames=sd0:d76c5b9369f79257
:> hw.diskcount=1
:> hw.product=Pinebook
:> hw.physmem=2021924864
:> hw.usermem=2021912576
:> hw.ncpufound=1
:> hw.allowpowerdown=1
:> 
:> 
:> Index: Makefile
:> ===
:> RCS file: /cvs/openbsd/ports/sysutils/u-boot/Makefile,v
:> retrieving revision 1.25
:> diff -u -p -u -p -r1.25 Makefile
:> --- Makefile 24 Aug 2017 08:53:02 -  1.25
:> +++ Makefile 27 Aug 2017 19:38:53 -
:> @@ -7,7 +7,7 @@ FLAVOR?= arm
:>  
:>  COMMENT=U-Boot firmware
:>  VERSION=2017.09-rc2
:> -REVISION=   1
:> +REVISION=   2
:
:Revision needs another bump.
:

Why?  It's a separate variable from rc2, and is a ports-specific thing.


:>  DISTNAME=   u-boot-${VERSION}
:>  PKGNAME=u-boot-${FLAVOR}-${VERSION:S/-//}
:>  FULLPKGNAME=${PKGNAME}
:> @@ -56,6 +56,7 @@ SUNXI64=\
:>  orangepi_prime \
:>  orangepi_win \
:>  pine64_plus \
:> +pinebook \
:>  sopine_baseboard
:>  BOARDS=\
:>  mvebu_espressobin-88f3720 \
:
:> Index: patches/patch-configs_pinebook_defconfig
:> ===
:> RCS file: patches/patch-configs_pinebook_defconfig
:> diff -N patches/patch-configs_pinebook_defconfig
:> --- /dev/null1 Jan 1970 00:00:00 -
:> +++ patches/patch-configs_pinebook_defconfig 27 Aug 2017 19:17:25 -
:> @@ -0,0 +1,27 @@
:> +$OpenBSD$
:> +
:> +Index: configs/pinebook_defconfig
:> +--- configs/pinebook_defconfig.orig
:>  configs/pinebook_defconfig
:> +@@ -0,0 +1,21 @@
:> ++CONFIG_ARM=y
:> ++CONFIG_ARCH_SUNXI=y
:> ++CONFIG_MACH_SUN50I=y
:> ++CONFIG_RESERVE_ALLWINNER_BOOT0_HEADER=y
:> ++CONFIG_SUNXI_DRAM_LPDDR3_STOCK=y
:> ++CONFIG_DRAM_CLK=552
:> ++CONFIG_DRAM_ZQ=3881949
:> ++CONFIG_DRAM_ODT_EN=y
:> ++CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-pinebook"
:> ++# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
:> ++CONFIG_SPL=y
:> ++CONFIG_SPL_ATF_SUPPORT=y
:> ++CONFIG_SPL_ATF_TEXT_BASE=0x44000
:
:I don't think we need CONFIG_SPL_ATF_SUPPORT and
:CONFIG_SPL_ATF_TEXT_BASE.  At least the pine64 config doesn't ave
:them.
:

While it works without those lines, I'd prefer to leave them in.  This
is what is intended to be committed to mainline u-boot.


:> ++# CONFIG_CMD_IMLS is not set
:> ++# CONFIG_CMD_FLASH is not set
:> ++# CONFIG_CMD_FPGA is not set
:> ++# CONFIG_SPL_DOS_PARTITION is not set
:> ++# CONFIG_SPL_ISO_PARTITION is not set
:> ++# CONFIG_SPL_EFI_PARTITION is not set
:> ++CONFIG_SPL_SPI_SUNXI=y
:> ++CONFIG_USB_EHCI_HCD=y
:
:Otherwise this looks good.
:



Re: [phess...@openbsd.org: add pinebook support to u-boot]

2017-08-27 Thread Mark Kettenis
> Date: Sun, 27 Aug 2017 22:15:46 +0200
> From: Peter Hessler 
> 
> This gives us basic support for the Pine64 Pinebook
> 
> OK?
> 
> $ sysctl hw
> hw.machine=arm64
> hw.model=ARM Cortex-A53 r0p4
> hw.ncpu=1
> hw.byteorder=1234
> hw.pagesize=4096
> hw.disknames=sd0:d76c5b9369f79257
> hw.diskcount=1
> hw.product=Pinebook
> hw.physmem=2021924864
> hw.usermem=2021912576
> hw.ncpufound=1
> hw.allowpowerdown=1
> 
> 
> Index: Makefile
> ===
> RCS file: /cvs/openbsd/ports/sysutils/u-boot/Makefile,v
> retrieving revision 1.25
> diff -u -p -u -p -r1.25 Makefile
> --- Makefile  24 Aug 2017 08:53:02 -  1.25
> +++ Makefile  27 Aug 2017 19:38:53 -
> @@ -7,7 +7,7 @@ FLAVOR?=  arm
>  
>  COMMENT= U-Boot firmware
>  VERSION= 2017.09-rc2
> -REVISION=1
> +REVISION=2

Revision needs another bump.

>  DISTNAME=u-boot-${VERSION}
>  PKGNAME= u-boot-${FLAVOR}-${VERSION:S/-//}
>  FULLPKGNAME= ${PKGNAME}
> @@ -56,6 +56,7 @@ SUNXI64=\
>   orangepi_prime \
>   orangepi_win \
>   pine64_plus \
> + pinebook \
>   sopine_baseboard
>  BOARDS=\
>   mvebu_espressobin-88f3720 \

> Index: patches/patch-configs_pinebook_defconfig
> ===
> RCS file: patches/patch-configs_pinebook_defconfig
> diff -N patches/patch-configs_pinebook_defconfig
> --- /dev/null 1 Jan 1970 00:00:00 -
> +++ patches/patch-configs_pinebook_defconfig  27 Aug 2017 19:17:25 -
> @@ -0,0 +1,27 @@
> +$OpenBSD$
> +
> +Index: configs/pinebook_defconfig
> +--- configs/pinebook_defconfig.orig
>  configs/pinebook_defconfig
> +@@ -0,0 +1,21 @@
> ++CONFIG_ARM=y
> ++CONFIG_ARCH_SUNXI=y
> ++CONFIG_MACH_SUN50I=y
> ++CONFIG_RESERVE_ALLWINNER_BOOT0_HEADER=y
> ++CONFIG_SUNXI_DRAM_LPDDR3_STOCK=y
> ++CONFIG_DRAM_CLK=552
> ++CONFIG_DRAM_ZQ=3881949
> ++CONFIG_DRAM_ODT_EN=y
> ++CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-pinebook"
> ++# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
> ++CONFIG_SPL=y
> ++CONFIG_SPL_ATF_SUPPORT=y
> ++CONFIG_SPL_ATF_TEXT_BASE=0x44000

I don't think we need CONFIG_SPL_ATF_SUPPORT and
CONFIG_SPL_ATF_TEXT_BASE.  At least the pine64 config doesn't ave
them.

> ++# CONFIG_CMD_IMLS is not set
> ++# CONFIG_CMD_FLASH is not set
> ++# CONFIG_CMD_FPGA is not set
> ++# CONFIG_SPL_DOS_PARTITION is not set
> ++# CONFIG_SPL_ISO_PARTITION is not set
> ++# CONFIG_SPL_EFI_PARTITION is not set
> ++CONFIG_SPL_SPI_SUNXI=y
> ++CONFIG_USB_EHCI_HCD=y

Otherwise this looks good.



[phess...@openbsd.org: add pinebook support to u-boot]

2017-08-27 Thread Peter Hessler
- Forwarded message from Peter Hessler  -
taken from Icenowy Zheng's repository,
commit bd656cab0c3e0669e977641c15095f32d7b0731f

This gives us basic support for the Pine64 Pinebook

OK?

$ sysctl hw
hw.machine=arm64
hw.model=ARM Cortex-A53 r0p4
hw.ncpu=1
hw.byteorder=1234
hw.pagesize=4096
hw.disknames=sd0:d76c5b9369f79257
hw.diskcount=1
hw.product=Pinebook
hw.physmem=2021924864
hw.usermem=2021912576
hw.ncpufound=1
hw.allowpowerdown=1


Index: Makefile
===
RCS file: /cvs/openbsd/ports/sysutils/u-boot/Makefile,v
retrieving revision 1.25
diff -u -p -u -p -r1.25 Makefile
--- Makefile24 Aug 2017 08:53:02 -  1.25
+++ Makefile27 Aug 2017 19:38:53 -
@@ -7,7 +7,7 @@ FLAVOR?=arm
 
 COMMENT=   U-Boot firmware
 VERSION=   2017.09-rc2
-REVISION=  1
+REVISION=  2
 DISTNAME=  u-boot-${VERSION}
 PKGNAME=   u-boot-${FLAVOR}-${VERSION:S/-//}
 FULLPKGNAME=   ${PKGNAME}
@@ -56,6 +56,7 @@ SUNXI64=\
orangepi_prime \
orangepi_win \
pine64_plus \
+   pinebook \
sopine_baseboard
 BOARDS=\
mvebu_espressobin-88f3720 \
Index: patches/patch-arch_arm_dts_Makefile
===
RCS file: patches/patch-arch_arm_dts_Makefile
diff -N patches/patch-arch_arm_dts_Makefile
--- /dev/null   1 Jan 1970 00:00:00 -
+++ patches/patch-arch_arm_dts_Makefile 27 Aug 2017 19:16:11 -
@@ -0,0 +1,15 @@
+$OpenBSD$
+
+Index: arch/arm/dts/Makefile
+--- arch/arm/dts/Makefile.orig
 arch/arm/dts/Makefile
+@@ -338,7 +338,8 @@ dtb-$(CONFIG_MACH_SUN50I) += \
+   sun50i-a64-bananapi-m64.dtb \
+   sun50i-a64-orangepi-win.dtb \
+   sun50i-a64-pine64-plus.dtb \
+-  sun50i-a64-pine64.dtb
++  sun50i-a64-pine64.dtb \
++  sun50i-a64-pinebook.dtb
+ dtb-$(CONFIG_MACH_SUN9I) += \
+   sun9i-a80-optimus.dtb \
+   sun9i-a80-cubieboard4.dtb \
Index: patches/patch-arch_arm_dts_sun50i-a64-pinebook_dts
===
RCS file: patches/patch-arch_arm_dts_sun50i-a64-pinebook_dts
diff -N patches/patch-arch_arm_dts_sun50i-a64-pinebook_dts
--- /dev/null   1 Jan 1970 00:00:00 -
+++ patches/patch-arch_arm_dts_sun50i-a64-pinebook_dts  27 Aug 2017 19:17:38 
-
@@ -0,0 +1,68 @@
+$OpenBSD$
+
+Index: arch/arm/dts/sun50i-a64-pinebook.dts
+--- arch/arm/dts/sun50i-a64-pinebook.dts.orig
 arch/arm/dts/sun50i-a64-pinebook.dts
+@@ -0,0 +1,62 @@
++/*
++ * Copyright (c) 2016 ARM Ltd.
++ *
++ * This file is dual-licensed: you can use it either under the terms
++ * of the GPL or the X11 license, at your option. Note that this dual
++ * licensing only applies to this file, and not this project as a
++ * whole.
++ *
++ *  a) This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License as
++ * published by the Free Software Foundation; either version 2 of the
++ * License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ * GNU General Public License for more details.
++ *
++ * Or, alternatively,
++ *
++ *  b) Permission is hereby granted, free of charge, to any person
++ * obtaining a copy of this software and associated documentation
++ * files (the "Software"), to deal in the Software without
++ * restriction, including without limitation the rights to use,
++ * copy, modify, merge, publish, distribute, sublicense, and/or
++ * sell copies of the Software, and to permit persons to whom the
++ * Software is furnished to do so, subject to the following
++ * conditions:
++ *
++ * The above copyright notice and this permission notice shall be
++ * included in all copies or substantial portions of the Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
++ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
++ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
++ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
++ * OTHER DEALINGS IN THE SOFTWARE.
++ */
++
++/dts-v1/;
++
++#include "sun50i-a64-pine64.dts"
++
++/ {
++  model = "Pinebook";
++  compatible = "pine64,pinebook", "allwinner,sun50i-a64";
++
++  aliases {
++  serial0 = 
++  };
++
++  chosen {
++  stdout-path = "serial0:115200n8";
++  };
++
++  memory {
++  reg = <0x4000 0x4000>;
++  };
++};
Index: