Bug#935035: u-boot: Olimex Teres-I support for builtin keyboard

2020-10-23 Thread Jonas Smedegaard
Quoting Jonas Smedegaard (2020-08-06 01:19:15)
> Quoting Vagrant Cascadian (2020-07-21 19:43:21)
> > On 2020-07-21, Jonas Smedegaard wrote:
> > > Quoting Jonas Smedegaard (2020-07-21 02:28:11)
> > >> Quoting Vagrant Cascadian (2020-07-20 22:05:43)
> > >> > I think could probably be trimmed down to a more minimal patch. e.g. 
> > >> > It doesn't look like CONFIG_USE_PREBOOT is needed at all; I *think* 
> > >> > you could just use CONFIG_PREBOOT without adding Kconfig support 
> > >> > (needs testing) and then use ifdef/ifndef directly where the preboot 
> > >> > command is added.
> > >> 
> > >> Sorry, I don't follow how you think it could be done without per-board 
> > >> definitions.
> > >
> > > Sleeping on it helped: I figured it out - here's a much shorter patch: 
> > > https://salsa.debian.org/debian/u-boot/-/commit/17bcf50
> > 
> > Yeah, that's more like what I was thinking! Clever figuring out
> > configuration options only present on the teres-i. :)
> > 
> > 
> > > Tested to work with TERES-I laptop.
> > >
> > > I also issued a minor update to the upstream patch: 
> > > https://patchwork.ozlabs.org/project/uboot/list/?series=191157
> > 
> > Yeah, wondered about usb "reset" vs usb "start".
> 
> Part 1/2 entered mainline u-boot few hours ago.
> 
> The remaining part, touching only Teres-I, bumped and still pending: 
> https://patchwork.ozlabs.org/project/uboot/list/?series=194355

Final patch has now entered mainline u.boot: 
https://gitlab.denx.de/u-boot/u-boot/-/commit/1949232

Please consider cherry-picking the patches for current Debian package 
targeted unstable, and for stable Debian as well.

 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private

signature.asc
Description: signature


Bug#935035: u-boot: Olimex Teres-I support for builtin keyboard

2020-08-05 Thread Jonas Smedegaard
Quoting Vagrant Cascadian (2020-07-21 19:43:21)
> On 2020-07-21, Jonas Smedegaard wrote:
> > Quoting Jonas Smedegaard (2020-07-21 02:28:11)
> >> Quoting Vagrant Cascadian (2020-07-20 22:05:43)
> >> > I think could probably be trimmed down to a more minimal patch. e.g. 
> >> > It doesn't look like CONFIG_USE_PREBOOT is needed at all; I *think* 
> >> > you could just use CONFIG_PREBOOT without adding Kconfig support 
> >> > (needs testing) and then use ifdef/ifndef directly where the preboot 
> >> > command is added.
> >> 
> >> Sorry, I don't follow how you think it could be done without per-board 
> >> definitions.
> >
> > Sleeping on it helped: I figured it out - here's a much shorter patch: 
> > https://salsa.debian.org/debian/u-boot/-/commit/17bcf50
> 
> Yeah, that's more like what I was thinking! Clever figuring out
> configuration options only present on the teres-i. :)
> 
> 
> > Tested to work with TERES-I laptop.
> >
> > I also issued a minor update to the upstream patch: 
> > https://patchwork.ozlabs.org/project/uboot/list/?series=191157
> 
> Yeah, wondered about usb "reset" vs usb "start".

Part 1/2 entered mainline u-boot few hours ago.

The remaining part, touching only Teres-I, bumped and still pending: 
https://patchwork.ozlabs.org/project/uboot/list/?series=194355


 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private

signature.asc
Description: signature


Bug#935035: u-boot: Olimex Teres-I support for builtin keyboard

2020-07-21 Thread Vagrant Cascadian
On 2020-07-21, Jonas Smedegaard wrote:
> Quoting Jonas Smedegaard (2020-07-21 02:28:11)
>> Quoting Vagrant Cascadian (2020-07-20 22:05:43)
>> > I think could probably be trimmed down to a more minimal patch. e.g. 
>> > It doesn't look like CONFIG_USE_PREBOOT is needed at all; I *think* 
>> > you could just use CONFIG_PREBOOT without adding Kconfig support 
>> > (needs testing) and then use ifdef/ifndef directly where the preboot 
>> > command is added.
>> 
>> Sorry, I don't follow how you think it could be done without per-board 
>> definitions.
>
> Sleeping on it helped: I figured it out - here's a much shorter patch: 
> https://salsa.debian.org/debian/u-boot/-/commit/17bcf50

Yeah, that's more like what I was thinking! Clever figuring out
configuration options only present on the teres-i. :)


> Tested to work with TERES-I laptop.
>
> I also issued a minor update to the upstream patch: 
> https://patchwork.ozlabs.org/project/uboot/list/?series=191157

Yeah, wondered about usb "reset" vs usb "start".


Nice work!


live well,
  vagrant


signature.asc
Description: PGP signature


Bug#935035: u-boot: Olimex Teres-I support for builtin keyboard

2020-07-21 Thread Jonas Smedegaard
Quoting Jonas Smedegaard (2020-07-21 02:28:11)
> Quoting Vagrant Cascadian (2020-07-20 22:05:43)
> > I think could probably be trimmed down to a more minimal patch. e.g. 
> > It doesn't look like CONFIG_USE_PREBOOT is needed at all; I *think* 
> > you could just use CONFIG_PREBOOT without adding Kconfig support 
> > (needs testing) and then use ifdef/ifndef directly where the preboot 
> > command is added.
> 
> Sorry, I don't follow how you think it could be done without per-board 
> definitions.

Sleeping on it helped: I figured it out - here's a much shorter patch: 
https://salsa.debian.org/debian/u-boot/-/commit/17bcf50

Tested to work with TERES-I laptop.

I also issued a minor update to the upstream patch: 
https://patchwork.ozlabs.org/project/uboot/list/?series=191157


 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private

signature.asc
Description: signature


Bug#935035: u-boot: Olimex Teres-I support for builtin keyboard

2020-07-20 Thread Jonas Smedegaard
Quoting Vagrant Cascadian (2020-07-20 22:05:43)
> On 2020-07-19, Jonas Smedegaard wrote:
> > Patch is still needed, and I have now updated it upstream: 
> > https://patchwork.ozlabs.org/project/uboot/patch/20200719135632.681954-2...@jones.dk/
> 
> This link gets both patches:
> 
>   https://patchwork.ozlabs.org/project/uboot/list/?series=190758=*

Ah, that's helpful!


> It looks like they've gotten a few reviews already, and presuming no
> objections surface, I could apply them in the next u-boot 2020.07
> upload, and hopefully will be applied upstream for 2020.10.

Thanks.


> > The newest upstream patch is larger, because developers requested I 
> > do a more general change, where earlier proposed patches generalized 
> > only across sunxi devices.
> >
> > There should be no functional difference between the older more 
> > minimal patches and the newer one, and I therefore propose to apply 
> > the older one for Buster.
> 
> The wip-teres-i-keyboard branch on salsa?

Yes.


> That includes a bunch of changes for platforms (unifier) that we don't 
> support.

If you prefer a shorter patch with those plastforms being broken, then 
indeed I can reduce it.


> I think could probably be trimmed down to a more minimal patch. e.g. 
> It doesn't look like CONFIG_USE_PREBOOT is needed at all; I *think* 
> you could just use CONFIG_PREBOOT without adding Kconfig support 
> (needs testing) and then use ifdef/ifndef directly where the preboot 
> command is added.

Sorry, I don't follow how you think it could be done without per-board 
definitions.


> I'd normally be hesitant to add non-upstreamed patches, and will want 
> to wait to see how that plays out, but once the functionality lands in 
> experimental or unstable, I'd be willing to consider a more minimal 
> patch for buster.

Thanks.


 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private

signature.asc
Description: signature


Bug#935035: u-boot: Olimex Teres-I support for builtin keyboard

2020-07-20 Thread Vagrant Cascadian
On 2020-07-19, Jonas Smedegaard wrote:
> Quoting Jonas Smedegaard (2020-04-27 09:00:49)
>> Quoting Vagrant Cascadian (2020-04-20 19:25:15)
>> > Control: tags 935035 moreinfo
>> > 
>> > On 2019-08-18, Jonas Smedegaard wrote:
>> > > U-Boot supports the DIY laptop Olimex Teres-I, except the builtin
>> > > keyboard is not detected.
>> > ...
>> > > A working patchset is pushed to git branch wip-teres-i-keyboard:
>> > > https://salsa.debian.org/debian/u-boot/tree/wip/teres-i-keyboard
>> > ...
>> > > This patchset is not in mainline U-Boot, but I intent to propose it.
>> > 
>> > Any status update on mainline support? Is it still an issue with newer 
>> > u-boot packages in Debian?
>> 
>> Last I checked it was still needed.
>> 

>> I noticed a recent change to the USB driver (commit 31232de) that 
>> *might* render all or half of my patch unnecessary, but that's just a 
>> guess based on the commit message - needs to be actually tested.
>> 
>> If still needed, then status of the patch is that U-boot developers 
>> wants a more general cleanup of the related options, won't accept my 
>> minimal patch as-is.  Again, I have not yet taken the time to do that.
>
> Patch is still needed, and I have now updated it upstream: 
> https://patchwork.ozlabs.org/project/uboot/patch/20200719135632.681954-2...@jones.dk/

This link gets both patches:

  https://patchwork.ozlabs.org/project/uboot/list/?series=190758=*

It looks like they've gotten a few reviews already, and presuming no
objections surface, I could apply them in the next u-boot 2020.07
upload, and hopefully will be applied upstream for 2020.10.


> The newest upstream patch is larger, because developers requested I do a 
> more general change, where earlier proposed patches generalized only 
> across sunxi devices.
>
> There should be no functional difference between the older more minimal 
> patches and the newer one, and I therefore propose to apply the older 
> one for Buster.

The wip-teres-i-keyboard branch on salsa?

That includes a bunch of changes for platforms (unifier) that we don't
support.

I think could probably be trimmed down to a more minimal patch. e.g. It
doesn't look like CONFIG_USE_PREBOOT is needed at all; I *think* you
could just use CONFIG_PREBOOT without adding Kconfig support (needs
testing) and then use ifdef/ifndef directly where the preboot command is
added.

I'd normally be hesitant to add non-upstreamed patches, and will want to
wait to see how that plays out, but once the functionality lands in
experimental or unstable, I'd be willing to consider a more minimal
patch for buster.


> Please tell me if you disagree, then I will prepare a backport of the 
> newest more general patchset.

I think the full patchsets are too invasive for buster, so would prefer
to avoid it.


> Or, obviously, please tell me if you consider it unlikely that this 
> change can be accepted in Buster, so we stop spend more time on that.

I think it can be done, but we'll have to be careful not to break other
platforms. I have several other platforms (pine64+, pinebook, others)
that might be impacted by these changes, so can check for breakage at
least.


live well,
  vagrant


signature.asc
Description: PGP signature


Bug#935035: u-boot: Olimex Teres-I support for builtin keyboard

2020-07-19 Thread Jonas Smedegaard
Quoting Jonas Smedegaard (2020-04-27 09:00:49)
> Quoting Vagrant Cascadian (2020-04-20 19:25:15)
> > Control: tags 935035 moreinfo
> > 
> > On 2019-08-18, Jonas Smedegaard wrote:
> > > U-Boot supports the DIY laptop Olimex Teres-I, except the builtin
> > > keyboard is not detected.
> > ...
> > > A working patchset is pushed to git branch wip-teres-i-keyboard:
> > > https://salsa.debian.org/debian/u-boot/tree/wip/teres-i-keyboard
> > ...
> > > This patchset is not in mainline U-Boot, but I intent to propose it.
> > 
> > Any status update on mainline support? Is it still an issue with newer 
> > u-boot packages in Debian?
> 
> Last I checked it was still needed.
> 
> I noticed a recent change to the USB driver (commit 31232de) that 
> *might* render all or half of my patch unnecessary, but that's just a 
> guess based on the commit message - needs to be actually tested.
> 
> If still needed, then status of the patch is that U-boot developers 
> wants a more general cleanup of the related options, won't accept my 
> minimal patch as-is.  Again, I have not yet taken the time to do that.

Patch is still needed, and I have now updated it upstream: 
https://patchwork.ozlabs.org/project/uboot/patch/20200719135632.681954-2...@jones.dk/

The newest upstream patch is larger, because developers requested I do a 
more general change, where earlier proposed patches generalized only 
across sunxi devices.

There should be no functional difference between the older more minimal 
patches and the newer one, and I therefore propose to apply the older 
one for Buster.

Please tell me if you disagree, then I will prepare a backport of the 
newest more general patchset.

Or, obviously, please tell me if you consider it unlikely that this 
change can be accepted in Buster, so we stop spend more time on that.


 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private

signature.asc
Description: signature


Bug#935035: u-boot: Olimex Teres-I support for builtin keyboard

2020-04-27 Thread Jonas Smedegaard
Quoting Vagrant Cascadian (2020-04-20 19:25:15)
> Control: tags 935035 moreinfo
> 
> On 2019-08-18, Jonas Smedegaard wrote:
> > U-Boot supports the DIY laptop Olimex Teres-I, except the builtin
> > keyboard is not detected.
> ...
> > A working patchset is pushed to git branch wip-teres-i-keyboard:
> > https://salsa.debian.org/debian/u-boot/tree/wip/teres-i-keyboard
> ...
> > This patchset is not in mainline U-Boot, but I intent to propose it.
> 
> Any status update on mainline support? Is it still an issue with newer 
> u-boot packages in Debian?

Last I checked it was still needed.

I noticed a recent change to the USB driver (commit 31232de) that 
*might* render all or half of my patch unnecessary, but that's just a 
guess based on the commit message - needs to be actually tested.

If still needed, then status of the patch is that U-boot developers 
wants a more general cleanup of the related options, won't accept my 
minimal patch as-is.  Again, I have not yet taken the time to do that.


Thanks for pinging/nudging,

 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private

signature.asc
Description: signature


Bug#935035: u-boot: Olimex Teres-I support for builtin keyboard

2020-04-20 Thread Vagrant Cascadian
Control: tags 935035 moreinfo

On 2019-08-18, Jonas Smedegaard wrote:
> U-Boot supports the DIY laptop Olimex Teres-I, except the builtin
> keyboard is not detected.
...
> A working patchset is pushed to git branch wip-teres-i-keyboard:
> https://salsa.debian.org/debian/u-boot/tree/wip/teres-i-keyboard
...
> This patchset is not in mainline U-Boot, but I intent to propose it.

Any status update on mainline support? Is it still an issue with newer
u-boot packages in Debian?


live well,
  vagrant


signature.asc
Description: PGP signature


Bug#935035: u-boot: Olimex Teres-I support for builtin keyboard

2019-08-18 Thread Jonas Smedegaard
Quoting Jonas Smedegaard (2019-08-18 14:09:06)
> A working patchset is pushed to git branch wip-teres-i-keyboard: 
> https://salsa.debian.org/debian/u-boot/tree/wip/teres-i-keyboard

...and now updated (i.e. replaced) to include upstream cherry-picked 
commit 607d06d needed for the 2019.01 branch (applied since 2019.04).

> I have tested the patchset only on the Teres-I device, where keyboard 
> is succesfully detected 5 times in a row power-cycling in-between.

...and now tested succesfully 5 times with Buster-based 2019.01 patchset 
(additionally to the not 5 but accidentally 10 tests against 
experimental-based 2019.07 patchset).


 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private


signature.asc
Description: signature


Bug#935035: u-boot: Olimex Teres-I support for builtin keyboard

2019-08-18 Thread Jonas Smedegaard
Source: u-boot
Version: 2019.01+dfsg-7
Severity: normal
Tags: patch

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

U-Boot supports the DIY laptop Olimex Teres-I, except the builtin
keyboard is not detected.

The keyboard firmware pauses for 2 seconds to allow reflashing its
firmware, and U-Boot needs to wait equally long to detect it as a HID
device.  Issuing a "usb reset" works occationally, possibly because that
pulls the power triggering a reboot of the keyboard controller.

U-Boot offers KConfig setting CONFIG_INITIAL_USB_SCAN_DELAY which
apparently fails to work, seemingly because that adds a delay _before_
the USB hub is powered on which (pure guesswork) fails to work if the
keyboard draws its power from the USB hub.

A working solution is to set environment variable usb_pgood_delay before
initially calling "usb start": Seemingly that variable adds a delay
_after_ powering up the USB hub but before devices are probed.

U-Boot environment variables is set in include/configs/.h or
with KConfig settings CONFIG_USE_PREBOOT and CONFIG_PREBOOT.  Sunxi
devices share a common file include/configs/sunxi_common.h which
complicates setting env directly and also messes with preboot setting in
ways not overridable with KConfig.

The patch setting usb_pgood_delay therefore requires another patch to
allow overriding preboot.

A working patchset is pushed to git branch wip-teres-i-keyboard:
https://salsa.debian.org/debian/u-boot/tree/wip/teres-i-keyboard

I have tested the patchset only on the Teres-I device, where keyboard is
succesfully detected 5 times in a row power-cycling in-between.

I have also tested that the preboot patch applied alone causes no change
to preboot config value.

This patchset is not in mainline U-Boot, but I intent to propose it.

 - Jonas

-BEGIN PGP SIGNATURE-

iQIzBAEBCgAdFiEEn+Ppw2aRpp/1PMaELHwxRsGgASEFAl1ZP+AACgkQLHwxRsGg
ASHTYhAAiygm195o4LU4o8hH5gaoQpbeYmYQdudxU5LCbSrkE/ZoHO7DImOwfWX/
e1OPLTIcMVTQA5KcGX/I378uvh5mQzhdmaEHRRne2sggRqTLncQ8uVh6YKHyw974
Hdej57lZsQkjVR214Y/Qjgfidn6Vi8KHHNSBtxej7xaks0ASta2Y/o2+ufZDY7Om
YPEgjp3Ve0lwbUobK+wXUw4Sb/EWQADQtof+3ie2ESiKwEKUtHIwvHGByvdEMWH/
8ST3Wu0roi161OPN46IaGlRuL0xI3LdlRWbq3bZuUH8XEb4rPDJz0TdPs79swct2
z141SgvdRsW+5SlAKBzK4GZbOn3gj1UXKlCXrOHcMLipN1oyPnoTZ5c99sggzUdn
L3rXFbBvnUn3zP50WJQzvlKi3Xs3OxOfFtIq9E/I5fmp6PC3/y1YZkBDoW2PJ4Hq
1DCJQIKe5txzGGrloI7oMVeryVfo9Yecv79jLYAcAk9ZqwrXXOdpdUWvrG6vAHgY
uELkgiZbeNfz3jDXSrr0Jqa3M4aA7g1fRCc0CpD5+vhNuQZQkAt5Etj2pkos9DMA
JqDlEpR5WW9a+knrCwG5Zq/dTGNbZiM7k3LkrsSBqV5tMxZGN16ICG4I5m+2fxVy
tZDwWFbMcijuWxXUyDqKBJNBcRLHue2Ns2DtP0r8jq4IDS5bHo8=
=pDyY
-END PGP SIGNATURE-