linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Warren <swarren@wwwdotorg.org>
To: Gordon Hollingworth <gordon@holliweb.co.uk>
Cc: Noralf Tronnes <notro@tronnes.org>,
	Matthias Klein <matthias.klein@linux.com>,
	"linux-rpi-kernel@lists.infradead.org" 
	<linux-rpi-kernel@lists.infradead.org>,
	lee@kernel.org,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] ARM: bcm2835: add device tree for Raspberry Pi model B+
Date: Fri, 07 Nov 2014 23:17:31 -0700	[thread overview]
Message-ID: <545DB57B.7040802@wwwdotorg.org> (raw)
In-Reply-To: <CAE8Q9tC7jowebEF3OgRu+qHemV7v_d3o6ZbCPQMbL8_7LR4Ewg@mail.gmail.com>

On 11/07/2014 10:12 AM, Gordon Hollingworth wrote:
> Resend: HTML less...
> On 7 November 2014 17:07, Gordon Hollingworth <gordon@holliweb.co.uk> wrote:
>> On 7 November 2014 16:20, Noralf Tronnes <notro@tronnes.org> wrote:
...
>>> From the HAT specification:
>>> GPIO pins ID_SC and ID_SD (GPIO0 and GPIO1) are reserved for use solely
>>> for board detection / identification. The only allowed connections to
>>> the ID_ pins are an ID EEPROM plus 3.9K pull up resistors. Do not connect
>>> anything else to these pins!
>>>
>>> Ref:
>>> https://github.com/raspberrypi/hats/blob/master/designguide.md#gpio-requirements
>>>
>>> I asked in the forum if I could use an app for writing to the eeprom to
>>> change things like display rotation in the DT fragment, but was told that this
>>> was a no-no. i2c0 is also used together with the camera port, which is then
>>> controlled by the firmware.
>>
>> The idea with the HAT specification is to provide a mechanism for hardware
>> developers to add their drivers and configuration in such a way as to avoid
>> 'special' kernel builds for particular bits of hardware (this was a problem
>> with a number of DAC add on boards for the Pi)

Have you considered using the (recently merged upstream) DT overlay
mechanism instead? In this case, the board EEPROM would simply provide a
unique ID for the board. Linux would obtain this ID somehow (perhaps
directly reading the EEPROM on boot, or perhaps having some special DT
node indicating which device was present if only the VC firmware can
access the EEPROM). The ID then gets used to look up a DT overlay file
that the kernel loads and merges into its DT at run-time. The benefit
here is that the DT overlay is a file in the filesystem, and can be
easily modified or replaced to fix issues, especially when first
developing that DT for a new HAT. This is all based on the way the
BeagleBone Black handles its capes. Having RPi work in a standard way
that's also used on other boards leverages people's knowledge/experience
across different HW stacks. Standards are good!

If I want to use U-Boot as a bootloader on the Pi, is there a VC
firmware mailbox message that the firmware can use to read the content
of the EEPROM (or the VC firmware's cached copy of it?) Or, must U-Boot
be modified to accept a DT, extract information from it, and then modify
the DT it subsequently passes to the kernel based on the DT it was passed?

  reply	other threads:[~2014-11-08  6:17 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-05 23:45 [PATCH v2] ARM: bcm2835: add device tree for Raspberry Pi model B+ Matthias Klein
2014-11-06  5:11 ` Stephen Warren
2014-11-06  5:29 ` Stephen Warren
2014-11-06 18:15   ` Matthias Klein
2014-11-06 19:01     ` Stephen Warren
2014-11-06 19:36 ` Noralf Tronnes
2014-11-07  4:22   ` Stephen Warren
2014-11-07 16:20     ` Noralf Tronnes
     [not found]       ` <CAE8Q9tBDxq9W=Vh0LRCRNR+Dj+5PrWyzK+GBdMDM=1kq84mFTA@mail.gmail.com>
2014-11-07 17:12         ` Gordon Hollingworth
2014-11-08  6:17           ` Stephen Warren [this message]
2014-11-08  8:03             ` Gordon Hollingworth
2014-11-08  6:12       ` Stephen Warren
2014-11-19 15:29 ` Lee Jones
2014-11-19 17:08   ` Stephen Warren
2014-11-19 17:29     ` Lee Jones

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=545DB57B.7040802@wwwdotorg.org \
    --to=swarren@wwwdotorg.org \
    --cc=gordon@holliweb.co.uk \
    --cc=lee@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=matthias.klein@linux.com \
    --cc=notro@tronnes.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).