devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Hurley <peter-WaGBZJeGNqdsbIuE7sb01tBPR1lH4CV8@public.gmane.org>
To: Pantelis Antoniou
	<pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>,
	frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
	"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>,
	Koen Kooi
	<koen-QLwJDigV5abLmq1fohREcCpxlwaOVQ5f@public.gmane.org>,
	Nicolas Ferre
	<nicolas.ferre-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>,
	"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Grant Likely
	<grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>,
	"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
	<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
	Matt Porter <matt.porter-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
Subject: Re: [PATCH 2/4] of: DT quirks infrastructure
Date: Fri, 20 Feb 2015 10:00:06 -0500	[thread overview]
Message-ID: <54E74BF6.208@hurleysoftware.com> (raw)
In-Reply-To: <20150220143533.GA29908-FuRPzXQv2LUWBfJKYY8PcdBPR1lH4CV8@public.gmane.org>

On 02/20/2015 09:35 AM, Ludovic Desroches wrote:
> On Fri, Feb 20, 2015 at 09:21:38AM -0500, Peter Hurley wrote:
>> On 02/19/2015 12:38 PM, Pantelis Antoniou wrote:
>>>
>>>> On Feb 19, 2015, at 19:30 , Frank Rowand <frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>>>>
>>>> On 2/19/2015 9:00 AM, Pantelis Antoniou wrote:
>>>>> Hi Frank,
>>>>>
>>>>>> On Feb 19, 2015, at 18:48 , Frank Rowand <frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>>>>>>
>>>>>> On 2/19/2015 6:29 AM, Pantelis Antoniou wrote:
>>>>>>> Hi Mark,
>>>>>>>
>>>>>>>> On Feb 18, 2015, at 19:31 , Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org> wrote:
>>>>>>>>
>>>>>>>>>>> +While this may in theory work, in practice it is very cumbersome
>>>>>>>>>>> +for the following reasons:
>>>>>>>>>>> +
>>>>>>>>>>> +1. The act of selecting a different boot device tree blob requires
>>>>>>>>>>> +a reasonably advanced bootloader with some kind of configuration or
>>>>>>>>>>> +scripting capabilities. Sadly this is not the case many times, the
>>>>>>>>>>> +bootloader is extremely dumb and can only use a single dt blob.
>>>>>>>>>>
>>>>>>>>>> You can have several bootloader builds, or even a single build with
>>>>>>>>>> something like appended DTB to get an appropriate DTB if the same binary
>>>>>>>>>> will otherwise work across all variants of a board.
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> No, the same DTB will not work across all the variants of a board.
>>>>>>>>
>>>>>>>> I wasn't on about the DTB. I was on about the loader binary, in the case
>>>>>>>> the FW/bootloader could be common even if the DTB couldn't.
>>>>>>>>
>>>>>>>> To some extent there must be a DTB that will work across all variants
>>>>>>>> (albeit with limited utility) or the quirk approach wouldn't work…
>>>>>>>>
>>>>>>>
>>>>>>> That’s not correct; the only part of the DTB that needs to be common
>>>>>>> is the model property that would allow the quirk detection logic to fire.
>>>>>>>
>>>>>>> So, there is a base DTB that will work on all variants, but that only means
>>>>>>> that it will work only up to the point that the quirk detector method
>>>>>>> can work. So while in recommended practice there are common subsets
>>>>>>> of the DTB that might work, they might be unsafe.
>>>>>>>
>>>>>>> For instance on the beaglebone the regulator configuration is different
>>>>>>> between white and black, it is imperative you get them right otherwise
>>>>>>> you risk board damage.
>>>>>>>
>>>>>>>>>> So it's not necessarily true that you need a complex bootloader.
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>>> +2. On many instances boot time is extremely critical; in some cases
>>>>>>>>>>> +there are hard requirements like having working video feeds in under
>>>>>>>>>>> +2 seconds from power-up. This leaves an extremely small time budget for
>>>>>>>>>>> +boot-up, as low as 500ms to kernel entry. The sanest way to get there
>>>>>>>>>>> +is by removing the standard bootloader from the normal boot sequence
>>>>>>>>>>> +altogether by having a very small boot shim that loads the kernel and
>>>>>>>>>>> +immediately jumps to kernel, like falcon-boot mode in u-boot does.
>>>>>>>>>>
>>>>>>>>>> Given my previous comments above I don't see why this is relevant.
>>>>>>>>>> You're already passing _some_ DTB here, so if you can organise for the
>>>>>>>>>> board to statically provide a sane DTB that's fine, or you can resort to
>>>>>>>>>> appended DTB if it's not possible to update the board configuration.
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> You’re missing the point. I can’t use the same DTB for each revision of the
>>>>>>>>> board. Each board is similar but it’s not identical.
>>>>>>>>
>>>>>>>> I think you've misunderstood my point. If you program the board with the
>>>>>>>> relevant DTB, or use appended DTB, then you will pass the correct DTB to
>>>>>>>> the kernel without need for quirks.
>>>>>>>>
>>>>>>>> I understand that each variant is somewhat incompatible (and hence needs
>>>>>>>> its own DTB).
>>>>>>>
>>>>>>> In theory it might work, in practice this does not. Ludovic mentioned that they
>>>>>>> have 27 different DTBs in use at the moment. At a relatively common 60k per DTB
>>>>>>> that’s 27x60k = 1.6MB of DTBs, that need to be installed.
>>>>>>
>>>>>> < snip >
>>>>>>
>>>>>> Or you can install the correct DTB on the board.  You trust your manufacturing line
>>>>>> to install the correct resistors.  You trust your manufacturing line to install the
>>>>>> correct kernel version (eg an updated version to resolve a security issue).
>>>>>>
>>>>>> I thought the DT blob was supposed to follow the same standard that other OS's or
>>>>>> bootloaders understood.  Are you willing to break that?  (This is one of those
>>>>>> ripples I mentioned in my other emails.)
>>>>>>
>>>>>
>>>>> Trust no-one.
>>>>>
>>>>> This is one of those things that the kernel community doesn’t understand which makes people
>>>>> who push product quite mad.
>>>>>
>>>>> Engineering a product is not only about meeting customer spec, in order to turn a profit
>>>>> the whole endeavor must be engineered as well for manufacturability.
>>>>>
>>>>> Yes, you can always manually install files in the bootloader. For 1 board no problem.
>>>>> For 10 doable. For 100 I guess you can hire an extra guy. For 1 million? Guess what,
>>>>> instead of turning a profit you’re losing money if you only have a few cents of profit
>>>>> per unit.
>>>>
>>>> I'm not installing physical components manually.  Why would I be installing software
>>>> manually?  (rhetorical question)
>>>>
>>>
>>> Because on high volume product runs the flash comes preprogrammed and is soldered as is.
>>>
>>> Having a single binary to flash to every revision of the board makes logistics considerably
>>> easier.
>>>
>>> Having to boot and tweak the bootloader settings to select the correct dtb (even if it’s present
>>> on the flash medium) takes time and is error-prone.
>>>
>>> Factory time == money, errors == money.
>>>
>>>>>
>>>>> No knobs to tweak means no knobs to break. And a broken knob can have pretty bad consequences
>>>>> for a few million units. 
>>>>
>>>> And you produce a few million units before testing that the first one off the line works?
>>>>
>>>
>>> The first one off the line works. The rest will get some burn in and functional testing if you’re
>>> lucky. In many cases where the product is very cheap it might make financial sense to just ship
>>> as is and deal with recalls, if you’re reasonably happy after a little bit of statistical sampling.
>>>
>>> Hardware is hard :)
>>
>> I'm failing to see how this series improves your manufacturing process at all.
>>
>> 1. Won't you have to provide the factory with different eeprom images for the
>>    White and Black?  You _trust_ them to get that right, or more likely, you
>>    have process control procedures in place so that you don't get 1 million Blacks
>>    flashed with the White eeprom image.
>>
>> 2. The White and Black use different memory technology so it's not as if the
>>    eMMC from the Black will end up on the White SMT line (or vice versa).
>>
>> 3  For that matter, why wouldn't you worry that all the microSD cards intended
>>    for the White were accidentally assembled with the first 50,000 Blacks; at
>>    that point you're losing a lot more than a few cents of profit. And that has
>>    nothing to do with what image you provided.
>>
> 
> As you said, we can imagine many reasons to have a failure during the
> production, having several DTB files will increase the risk.

It's interesting that you don't see the added complexity of open-coding
the i2c driver or mixing DTS fragments for different designs as increased risk
(for us all).


>> 3. The factory is just as likely to use some other customer's image by accident,
>>    so you're just as likely to have the same failure rate if you have no test
>>    process at the factory.
>>
>> 4. If you're using offline programming, the image has to be tested after
>>    reflow anyway.
>>
>> IOW, your QA process will not change at all == same cost.
>>
>> Regards,
>> Peter Hurley

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2015-02-20 15:00 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-18 14:59 [PATCH 0/4] Device Tree Quirks & the Beaglebone Pantelis Antoniou
2015-02-18 14:59 ` [PATCH 1/4] arm: of: Add a DT quirk method after unflattening Pantelis Antoniou
2015-02-18 14:59 ` [PATCH 2/4] of: DT quirks infrastructure Pantelis Antoniou
     [not found]   ` <1424271576-1952-3-git-send-email-pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
2015-02-18 15:41     ` Mark Rutland
2015-02-18 15:53       ` Pantelis Antoniou
2015-02-18 16:32         ` Ludovic Desroches
2015-02-18 16:39           ` Pantelis Antoniou
     [not found]             ` <A5D4ED10-F3EB-4DA8-A846-C28842BDAA9F-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
2015-02-18 16:47               ` Ludovic Desroches
     [not found]         ` <FE61DD1C-51DA-4869-8A62-C019C3D70577-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
2015-02-18 16:46           ` Matt Porter
2015-02-18 17:31         ` Mark Rutland
2015-02-18 19:32           ` Guenter Roeck
2015-02-19 14:29           ` Pantelis Antoniou
2015-02-19 16:48             ` Frank Rowand
     [not found]               ` <54E613E7.2020405-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-02-19 17:00                 ` Pantelis Antoniou
2015-02-19 17:30                   ` Frank Rowand
2015-02-19 17:38                     ` Pantelis Antoniou
2015-02-19 18:01                       ` Maxime Bizon
     [not found]                         ` <1424368919.13604.9.camel-MdnFuL0m/hCw+z8RR+d9WEZ2mhrpEnA6@public.gmane.org>
2015-02-19 18:12                           ` Sylvain Rochet
2015-02-19 18:22                             ` Maxime Bizon
2015-02-20 14:21                       ` Peter Hurley
2015-02-20 14:38                         ` Pantelis Antoniou
     [not found]                         ` <54E742F2.80506-WaGBZJeGNqdsbIuE7sb01tBPR1lH4CV8@public.gmane.org>
2015-02-20 14:35                           ` Ludovic Desroches
     [not found]                             ` <20150220143533.GA29908-FuRPzXQv2LUWBfJKYY8PcdBPR1lH4CV8@public.gmane.org>
2015-02-20 15:00                               ` Peter Hurley [this message]
2015-02-20 15:02                                 ` Pantelis Antoniou
2015-02-20 15:24                                   ` Peter Hurley
2015-02-20 15:38                                     ` Pantelis Antoniou
2015-02-20 16:34                                       ` Peter Hurley
2015-02-20 16:49                                         ` Pantelis Antoniou
2015-02-20 17:30                             ` Rob Herring
2015-02-20 17:37                               ` Pantelis Antoniou
2015-02-23  7:00                               ` Ludovic Desroches
2015-02-20 16:47                           ` Guenter Roeck
2015-02-20 18:09                             ` Peter Hurley
     [not found]                               ` <54E77876.9020500-WaGBZJeGNqdsbIuE7sb01tBPR1lH4CV8@public.gmane.org>
2015-02-20 18:48                                 ` Guenter Roeck
     [not found]                                   ` <20150220184818.GC26698-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2015-02-23  7:30                                     ` Ludovic Desroches
2015-02-20  8:04                     ` Ludovic Desroches
2015-02-19  2:08   ` Frank Rowand
2015-02-19 14:41     ` Pantelis Antoniou
2015-02-19 16:40       ` Frank Rowand
     [not found]         ` <54E61200.4010002-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-02-19 16:51           ` Frank Rowand
2015-02-20 13:23       ` Peter Hurley
     [not found]     ` <54E54586.5070602-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-02-19 18:01       ` Rob Herring
2015-02-19 18:12         ` Guenter Roeck
     [not found]         ` <CAL_JsqKT3+URcad6X=i+73NLRnVstbpvFJxxT=ru7KJmp_XuVQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-02-20  8:16           ` Ludovic Desroches
2015-02-18 14:59 ` [PATCH 3/4] arm: am33xx: DT quirks for am33xx based beaglebone variants Pantelis Antoniou
2015-02-19 18:16   ` Tony Lindgren
2015-02-19 18:28     ` Pantelis Antoniou
2015-02-19 18:36       ` Tony Lindgren
     [not found]         ` <20150219183600.GG32521-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2015-02-19 18:44           ` Pantelis Antoniou
2015-02-23 18:39             ` Peter Hurley
2015-02-23 18:48               ` Pantelis Antoniou
2015-02-19 18:57         ` Guenter Roeck
2015-02-20 16:13       ` Jon Hunter
     [not found] ` <1424271576-1952-1-git-send-email-pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
2015-02-18 14:59   ` [PATCH 4/4] arm: dts: Common Black/White Beaglebone DTS using quirks Pantelis Antoniou

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=54E74BF6.208@hurleysoftware.com \
    --to=peter-wagbzjegnqdsbiue7sb01tbpr1lh4cv8@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org \
    --cc=koen-QLwJDigV5abLmq1fohREcCpxlwaOVQ5f@public.gmane.org \
    --cc=linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=matt.porter-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=nicolas.ferre-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org \
    --cc=pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org \
    --cc=tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).