All of lore.kernel.org
 help / color / mirror / Atom feed
From: holgerschurig@gmail.com (Holger Schurig)
To: linux-arm-kernel@lists.infradead.org
Subject: Auto-detecting touchscreen controller and dealing with hw configuration differences on q8 tablets
Date: Mon, 20 Jun 2016 12:33:57 +0200	[thread overview]
Message-ID: <87r3bsywru.fsf@gmail.com> (raw)
In-Reply-To: <5E70AD96-4E8E-4430-AF99-0AA0FCF5F8E7@konsulko.com>

> u-boot will work, but you will get into trouble if you demand users to drop to u-boot
> to make changes.

On my device I use barebox, which is a bit easier *) to use than U-Boot.

Still I don't expect my users to the bootloader. Instead my hardware has
a 256 byte i2c EEPROM where I store information. And the user can run a
user-space command to change settings there, e.g.

uccomm verbose_boot yes
uccomm power_config ignition

... and so on. I could do some of them via bootloader environment files,
but not all.

And this is the other obvious way of doing "communication" from Linux
user-space to bootloader: setting the environment. The bootloader could
mount the partition and try to source some file, to get the info needed.




*) in barebox, you have actual shell-like script that look sane, not
 variables that call variables, e.g. you can do things like this:

	if [ $oem_id = 255 ]; then
		splash -x 550 -y 500 -b 0xffffff /env/logo.png
		fb0.enable=1
		pwm_02080000.period_ns=200000
		pwm_02080000.duty_ns=160000
		pwm_02080000.enable=1
	fi
	gpio_set_value 191 1

There are also commands available to directly modify the device tree.

WARNING: multiple messages have this Message-ID (diff)
From: Holger Schurig <holgerschurig@gmail.com>
To: Pantelis Antoniou <pantelis.antoniou@konsulko.com>,
	Hans de Goede <hdegoede@redhat.com>
Cc: devicetree@vger.kernel.org,
	linux-sunxi <linux-sunxi@googlegroups.com>,
	Jelle van der Waa <jelle@vdwaa.nl>,
	"u-boot@lists.denx.de" <u-boot@lists.denx.de>,
	Chen-Yu Tsai <wens@csie.org>,
	Maxime Ripard <maxime.ripard@free-electrons.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: Auto-detecting touchscreen controller and dealing with hw configuration differences on q8 tablets
Date: Mon, 20 Jun 2016 12:33:57 +0200	[thread overview]
Message-ID: <87r3bsywru.fsf@gmail.com> (raw)
In-Reply-To: <5E70AD96-4E8E-4430-AF99-0AA0FCF5F8E7@konsulko.com>

> u-boot will work, but you will get into trouble if you demand users to drop to u-boot
> to make changes.

On my device I use barebox, which is a bit easier *) to use than U-Boot.

Still I don't expect my users to the bootloader. Instead my hardware has
a 256 byte i2c EEPROM where I store information. And the user can run a
user-space command to change settings there, e.g.

uccomm verbose_boot yes
uccomm power_config ignition

... and so on. I could do some of them via bootloader environment files,
but not all.

And this is the other obvious way of doing "communication" from Linux
user-space to bootloader: setting the environment. The bootloader could
mount the partition and try to source some file, to get the info needed.




*) in barebox, you have actual shell-like script that look sane, not
 variables that call variables, e.g. you can do things like this:

	if [ $oem_id = 255 ]; then
		splash -x 550 -y 500 -b 0xffffff /env/logo.png
		fb0.enable=1
		pwm_02080000.period_ns=200000
		pwm_02080000.duty_ns=160000
		pwm_02080000.enable=1
	fi
	gpio_set_value 191 1

There are also commands available to directly modify the device tree.

WARNING: multiple messages have this Message-ID (diff)
From: Holger Schurig <holgerschurig@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] Auto-detecting touchscreen controller and dealing with hw configuration differences on q8 tablets
Date: Mon, 20 Jun 2016 12:33:57 +0200	[thread overview]
Message-ID: <87r3bsywru.fsf@gmail.com> (raw)
In-Reply-To: <5E70AD96-4E8E-4430-AF99-0AA0FCF5F8E7@konsulko.com>

> u-boot will work, but you will get into trouble if you demand users to drop to u-boot
> to make changes.

On my device I use barebox, which is a bit easier *) to use than U-Boot.

Still I don't expect my users to the bootloader. Instead my hardware has
a 256 byte i2c EEPROM where I store information. And the user can run a
user-space command to change settings there, e.g.

uccomm verbose_boot yes
uccomm power_config ignition

... and so on. I could do some of them via bootloader environment files,
but not all.

And this is the other obvious way of doing "communication" from Linux
user-space to bootloader: setting the environment. The bootloader could
mount the partition and try to source some file, to get the info needed.




*) in barebox, you have actual shell-like script that look sane, not
 variables that call variables, e.g. you can do things like this:

	if [ $oem_id = 255 ]; then
		splash -x 550 -y 500 -b 0xffffff /env/logo.png
		fb0.enable=1
		pwm_02080000.period_ns=200000
		pwm_02080000.duty_ns=160000
		pwm_02080000.enable=1
	fi
	gpio_set_value 191 1

There are also commands available to directly modify the device tree.

  reply	other threads:[~2016-06-20 10:33 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-19 11:06 Auto-detecting touchscreen controller and dealing with hw configuration differences on q8 tablets Hans de Goede
2016-06-19 11:06 ` [U-Boot] " Hans de Goede
2016-06-19 11:06 ` Hans de Goede
2016-06-20  9:27 ` Pantelis Antoniou
2016-06-20  9:27   ` [U-Boot] " Pantelis Antoniou
2016-06-20  9:27   ` Pantelis Antoniou
2016-06-20 10:33   ` Holger Schurig [this message]
2016-06-20 10:33     ` [U-Boot] " Holger Schurig
2016-06-20 10:33     ` Holger Schurig
2016-06-20 11:03   ` Hans de Goede
2016-06-20 11:03     ` [U-Boot] " Hans de Goede
2016-06-20 11:03     ` Hans de Goede
2016-06-20 11:22     ` Icenowy Zheng
2016-06-20 11:22       ` [U-Boot] " Icenowy Zheng
2016-06-20 11:22       ` Icenowy Zheng
2016-06-20 12:22     ` Pantelis Antoniou
2016-06-20 12:22       ` [U-Boot] " Pantelis Antoniou
2016-06-20 12:22       ` Pantelis Antoniou
2016-06-20 13:02       ` [linux-sunxi] " Hans de Goede
2016-06-20 13:02         ` [U-Boot] " Hans de Goede
2016-06-20 13:02         ` Hans de Goede
2016-06-20 13:08         ` [linux-sunxi] " Pantelis Antoniou
2016-06-20 13:08           ` [U-Boot] " Pantelis Antoniou
2016-06-20 13:08           ` Pantelis Antoniou
2016-06-20 18:20           ` [U-Boot] " Rob Herring
2016-06-20 18:20             ` Rob Herring
2016-06-20 18:20             ` Rob Herring
2016-06-20 19:03             ` [U-Boot] " Pantelis Antoniou
2016-06-20 19:03               ` Pantelis Antoniou
2016-06-20 19:03               ` [U-Boot] " Pantelis Antoniou
  -- strict thread matches above, loose matches on Subject: below --
2016-06-19 11:04 Hans de Goede
2016-06-19 11:04 ` Hans de Goede

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r3bsywru.fsf@gmail.com \
    --to=holgerschurig@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.