Commit Graph

381 Commits

Author SHA1 Message Date
Oleksandr Tymoshenko
e5b6b345cf Add macroses to properly map IO peripherals memory window from
ARM physical memory address space to VideoCore address space
2013-02-23 22:46:26 +00:00
Oleksandr Tymoshenko
8635d479c2 Spelling fixes
Spotted by:	N. J. Mann
2013-02-19 21:24:52 +00:00
Oleksandr Tymoshenko
f91360b174 Roll back change of frequency for initialization sequence since it
seems to cause more problems then previous behavior: it either breaks
initilization sequence in other places or uncovers problems with
high-speed mode timing for SDHCI 3.0
2013-02-19 20:33:55 +00:00
Oleksandr Tymoshenko
d3d7f709ce - Add hw.bcm2835.sdhci.hs tunable to enable/disable highspeed mode in
SDHCI driver
  Suggested by: Daisuke Aoyama

- Set initilization sequence frequency to 8MHz. It should fix Data CRC
    errors. Standard requires initialization sequence to be executed
    at 400KHz but on this hardware low frequncies seems to cause
    Data CRC errors.

    Value was derived from analyzing hardware signals after
    Raspberry Pi is powered up. Before any data is read though DATA line
    adapter's clock frequency is changed to 8MHz.

    Modern cards should function fine at 8MHz but for older MMC cards it
    can be overriden by setting hw.bcm2835.sdhci.min_freq tunable.
2013-02-17 00:23:42 +00:00
Aleksandr Rybalko
f101fd7fdc Enable syscons framebuffer support for bcm2835. It makes possible to run Xorg
on Raspberry Pi.
o convert mmap address to physical.
o add FBIOGTYPE ioctl handler - allow to get screen resolution by new
    xf86-video-scfb driver.
Originally designed for "Efika MX" project.

Sponsored by:	FreeBSD Foundation
2013-01-13 22:05:46 +00:00
Oleksandr Tymoshenko
0b5eb45655 Remove accidentally copypasted comment
Spotted by: gavin
2013-01-13 21:32:40 +00:00
Oleksandr Tymoshenko
fd79f4a5a4 Export board serial and board revision obtained from FDT blob 2013-01-05 23:08:58 +00:00
Oleksandr Tymoshenko
706f28ae4b Fix background color calculation
Spotted by: ray@
2013-01-05 21:05:16 +00:00
Oleksandr Tymoshenko
3ada2d599e Add makeshift implementation for framebuffer console's cursor
Basically it's replica of VersatilePB code which is replica of XBox FB
code. All of them are linear framebuffers and should have common bits
moved to reusable framework.
2012-12-28 03:18:05 +00:00
Oleksandr Tymoshenko
0c093a7055 Fix event timer on Raspberry Pi
- Disable interrupt when updating compare value in order to
   make this operation atomical

- Increase minimum period for event timer. Systimer on BCM2835
    is compare timer, so if minimum period is too small it might
    be less then fraction of time between "read current value" and
    "set compare timer" operations. It means that when timer is armed
    actual counter value is more then compare value and it will take
    whole cycle (~32sec for 1MHz timer) to fire interrupt.

Submitted by:	Daisuke Aoyama <aoyama at peach.ne.jp>
2012-12-28 01:38:43 +00:00
Oleksandr Tymoshenko
c5f8f8946c Replace generic ARM11 option with more specific
support for ARM1136 and ARM1176

Submitted by:	Daisuke Aoyama <aoyama at peach.ne.jp>
Obtained from:	NetBSD
2012-12-20 04:32:02 +00:00
Oleksandr Tymoshenko
90576f541b Add sysctls for changing GPIO pins function
Submitted by:	Luiz Otavio O Souza
2012-12-18 22:18:54 +00:00
Oleksandr Tymoshenko
3b37b3c221 Get frequency from "clock-frequency" property of "/axi/sdhci" FDT node 2012-11-30 02:32:37 +00:00
Oleksandr Tymoshenko
41dd52751d Fix RGB565 case 2012-11-30 02:31:08 +00:00
Oleksandr Tymoshenko
20782cbcf3 Fix hardcoded bpp value 2012-11-29 05:46:46 +00:00
Tim Kientzle
3b5c0b51e9 Fix spelling. 2012-11-25 16:19:12 +00:00
Oleksandr Tymoshenko
4063f92555 Add Raspberry Pi GPIO driver
Submitted by:	Luiz Otavio O Souza
2012-11-23 20:04:39 +00:00
Oleksandr Tymoshenko
9e93341312 Multiple fixes for BCM2835 framebuffer
- Get resolution settings from FDT blob
- Properly handle 24 and 16 bits per pixel
- Add colors support for text console
2012-11-23 04:30:54 +00:00
Andrew Turner
7bf9ab5331 Merge the FDT versions of initarm.
The copies of initarm used on platforms with FDT support were almost
identical. The differences were pulled out into separate functions that
were called by initarm.

This change merges the, now identical, copies of initarm and a few of it's
support functions. This is a step towards a common kernel on ARMv6.
2012-11-03 22:39:07 +00:00
Andrew Turner
ef8abaaebf Merge r242125 into the other ARMv6 copies of initarm. 2012-10-31 08:25:45 +00:00
Oleksandr Tymoshenko
a9387eb1df Add BCM2835 SDHCI driver and enable it in Raspberry Pi config 2012-10-29 17:23:45 +00:00
Eitan Adler
db702c59cf remove duplicate semicolons where possible.
Approved by:	cperciva
MFC after:	1 week
2012-10-22 03:00:37 +00:00
Andrew Turner
c2257f93ba Clean up the bcm2835 initarm. It is now identical to the other ARMv6 copies
Tested by:	Alexander Yerenkow
2012-09-23 19:48:29 +00:00
Andrew Turner
610ba83a97 Fix a typo in a Broadcom initarm debug printf 2012-09-23 08:49:41 +00:00
Andrew Turner
1f008b99cc Pull out the SoC specific parts of initarm into separate functions 2012-09-23 03:46:03 +00:00
Andrew Turner
70203625fb Update different versions of physmap_init to be identical in preparation
for merging them.
2012-09-23 02:01:59 +00:00
Andrew Turner
d98d8a1e83 Reduce the diff between the FDT implementations of initarm.
This only touches whitespace and comments.
2012-09-22 22:41:38 +00:00
Andrew Turner
1161298251 Create a common set_stackptrs in sys/arm/machdep.c.
On single core devices set_stackptrs is only ever called with cpu = 0 in
initarm and will be identical to the existing function. On SMP this needs
to be implemented for sys/arm/mp_machdep.c, but the implementations are
identical for each SoC.
2012-09-22 06:41:56 +00:00
Hans Petter Selasky
08bfef24af Add device entry for DWC OTG. 2012-09-11 22:13:37 +00:00
Hans Petter Selasky
dabf69b257 Add support for DWC OTG. 2012-09-09 14:51:38 +00:00
Oleksandr Tymoshenko
1b1a53cf46 Add barebone Raspberry Pi port. Supported parts:
- Interrupts controller
  - Watchdog
  - System timer
  - Framebuffer (hardcoded resolution/bpp)
2012-08-30 20:59:37 +00:00