Commit graph

18 commits

Author SHA1 Message Date
Stefan Wahren 6b9170887e ARM: bcm2835: Fix names for the Raspberry Pi GPIO lines
There are some differences between the schematics and the official firmware
DTS [1]. So based on these additional information the following has been
changed:

* use consistent "CAM_GPIO1" for camera LED
* use consistent "CAM_GPIO0" for camera shutdown
* add "USB_LIMIT" for USB current limit (0=600mA, 1=1200mA)

[1] - https://github.com/raspberrypi/firmware/blob/master/extra/dt-blob.dts

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
2016-11-16 13:54:30 -08:00
Linus Walleij 731b26a6ac ARM: bcm2835: Add names for the Raspberry Pi GPIO lines
The idea is to give useful names to GPIO lines that an implementer
will be using from userspace, e.g. for maker type projects.  These are
user-visible using tools/gpio/lsgpio.c

v2: Major rewrite by anholt: Flatten each GPIO line to a line in the
    file for better diffing, prefix all expansion header pins with
    "P<number>" or "P5HEADER_P<number>" and drop the mostly-unused
    GPIO_GEN<smallnumber> names in favor of GPIO<socgpionumber>, fix
    extra '[]' on a couple of lines, fix locations of SD_CARD_DETECT,
    CAM_GPIO and STATUS_LED, fix HDMI_HPD polarities, rewrite A+ using
    unreleased schematics.

v3: More changes by anholt: Drop P<number> / P5HEADER<number>
    prefixes.  I had been skeptical about adding them, and was
    convinced to drop them by Gottfried (who probably has more
    experience with GPIOs in educational contexts than the rest of
    us).  Also drop [] brackets for "is pinmuxed", which didn't seem
    to clarify, and were ambiguous for things like the SPI_*-labeled
    pins which may or may not actually be pinmuxed to SPI.

v4: Rename B+'s SDA0/SCL0 to match the other boards, despite the
    naming on its schematic.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
2016-11-11 09:07:01 -08:00
Gerd Hoffmann a6d962aeb2 ARM: dts: bcm283x: drop alt3 from &gpio
As the alt3 group has no pins left drop it from &gpio.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
2016-10-17 09:55:48 -07:00
Stefan Wahren 00a33ec464 ARM: dts: bcm283x: Add dtsi for USB host mode
In case dr_mode isn't passed via DT, the dwc2 defaults to OTG mode.
But all Raspberry Pi boards here are designed only for host mode.
So fix this issue by providing a dtsi file which set the dr_mode
to host.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
2016-08-24 13:33:11 -07:00
Lubomir Rintel 6a93792774 ARM: bcm2835: dt: Add the ethernet to the device trees
The hub and the ethernet in its port 1 are hardwired on the board.

Compared to the adapters that can be plugged into the USB ports, this
one has no serial EEPROM to store its MAC. Nevertheless, the Raspberry Pi
has the MAC address for this adapter in its ROM, accessible from its
firmware.

U-Boot can read out the address and set the local-mac-address property of the
node with "ethernet" alias. Let's add the node so that U-Boot can do its
business.

Model B rev2 and Model B+ entries were verified by me, the hierarchy and
pid/vid pair for the Version 2 was provided by Peter Chen. Original
Model B is a blind shot, though very likely correct.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
2016-05-31 10:32:34 -07:00
Eric Anholt 49ac67e0c3 ARM: bcm2835: Add VC4 to the device tree.
VC4 is the GPU (display and 3D) present on the 283x.

Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
2016-04-19 17:31:57 -07:00
Eric Anholt 4b8c3907c3 ARM: bcm2835: Move the CPU/peripheral include out of common RPi DT.
For Raspberry Pi 2, we want to use the same general pin assignment
bits, but need to use bcm2836.dtsi for the CPU instead.

Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2015-12-31 17:16:59 +01:00
Lubomir Rintel 645dccb1c1 ARM: bcm2835: dt: Raspberry Pi Model B had no I2S
It's the Model B rev2 that had it. Remove it.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Signed-off-by: Eric Anholt <eric@anholt.net>
2015-10-14 15:35:51 -07:00
Stefan Wahren 1209111209 ARM: bcm2835: dt: Use pinctrl header
This patch converts all bcm2835 dts and dtsi files to use the pinctrl
header file.

Reviewed-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-05-14 10:02:31 +01:00
Matthias Klein ba2a1d6959 ARM: bcm2835: Add device tree for Raspberry Pi model B+
The model B and B+ differ in the GPIO lines for ACT and PWR leds, and the
I2S interface.

Signed-off-by: Matthias Klein <matthias.klein@linux.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Lee Jones <lee@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-11-20 12:17:25 +01:00
Mark Brown 667bbd5337 ARM: bcm2835: add I2S pinctrl to device tree
Signed-off-by: Florian Meier <florian.meier@koalo.de>
[Tweaked slightly to disable by default -- broonie]
Signed-off-by: Mark Brown <broonie@linaro.org>
[swarren, removed duplicate i2s node]
Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-09-25 23:25:30 +02:00
Stephen Warren 5631e7f4e2 ARM: bcm2835: add USB controller to device tree
The BCM2835 SoC contains a DWC2 USB controller. Add this to the DT.

Set up the pin controller to fully enable the USB controller on the
Raspberry Pi. The GPIO setup works because the default output value for
GPIO 6 (LAN_RUN/n_reset) just happens to be 1, which enables the
USB/LAN chip.

Note that you'll need a U-Boot which enables power to the USB controller;
search for U-Boot patch "ARM: rpi_b: power on SDHCI and USB HW modules".

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
2014-01-02 12:08:03 -08:00
Daniel Mack 805b4db807 ARM: bcm2835: Add Raspberry Pi's ACT LED to DT
The Raspberry Pi board has one GPIO-controlled LED labeled "ACT". Add it
to the DT via the gpio-leds driver, so users can control it from
userspace. If CONFIG_LEDS_TRIGGER_HEARTBEAT is set, the LED will also
signal some sign of life.

The GPIO circuitry is low-active. And as the bootloader may decide to
switch the LED on at boot time, the default state is 'keep'.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
2013-05-16 20:29:48 -06:00
Stephen Warren 232fed4825 ARM: bcm2835: add I2C controllers to DT
The BCM2835 has 3 identical I2C controllers. Instantiate them all in the
SoC .dtsi file, and enable the relevant two in the Raspberry Pi board
.dts file.

Note that on the Raspberry Pi Model B revision 1, I2C0 is connected to
the general-purpose expansion header, and I2C1 is connected to the camera
connector. Revision 2 of the board swaps these assignments:-(

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
2013-01-14 21:47:09 -07:00
Stephen Warren 5186bf287a ARM: bcm2835: add SDHCI node to DT
Add the SDHCI device node to the SoC DT file. Add a dummy fixed-clock
to satisfy the SDHCI driver's clock lookup; eventually this should be
replaced by a real clock implementation. Add board specific properties
to the Raspberry Pi board file.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
2013-01-14 21:47:08 -07:00
Stephen Warren 6520700fdb ARM: bcm2835 rpi: remove hard-coded memreserve from DT
The Raspberry Pi has either 256MB or 512MB of RAM. However, a portion is
reserved for use by the VideoCore co-processor. The RPi DT contained a
/memreserve/ statement to reserve that RAM. However, the exact amount of
RAM used by the VideoCore is dynamic at boot-time; a firmware config
file specifies the amount. As such, we can't hard-code the size in the
DT. Remove the /memreserve/ statement. The bootloader is expected to
adjust the /memory properties to reflect the RAM size the ARM CPU can
use. Upstream U-Boot certainly does this, although I'm not sure that the
basic firmware does if it boots the kernel directly; users may need to
manually adjust their DT if not using U-Boot.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
2013-01-14 21:47:08 -07:00
Stephen Warren 805504abdc ARM: bcm2835: enable GPIO/pinctrl
Enable GPIO and pinctrl in Kconfig.

Add required <mach/gpio.h> for gpiolib.

Instantiate the BCM2835 GPIO module in bcm2835.dtsi.

Add a pinctrl definition to bcm2835-rpi-b.dts that sets up all of the
board's required pinmux configuration. GPIO aren't specified; that's
left to gpio_request().

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
2012-10-25 20:42:51 -06:00
Simon Arlott ec9653b847 ARM: add infra-structure for BCM2835 and Raspberry Pi
The BCM2835 is an ARM SoC from Broadcom. This patch adds very basic
support for this SoC.

http://www.broadcom.com/products/BCM2835
http://www.raspberrypi.org/wp-content/uploads/2012/02/BCM2835-ARM-Peripherals.pdf

Note that the documentation in the latter .pdf assumes the MMU setup
that's used on the "VideoCore" companion processor, and does not document
physical peripheral addresses. Subtract 0x5e000000 to obtain the physical
addresses. This is accounted for by the ranges property in the /soc node
in the device tree.

The BCM2835 SoC is used in the Raspberry Pi. This patch also adds a
minimal device tree for this board; enough to see some very early kernel
boot messages through earlyprintk. However, this patch does not yet
provide a useful booting system.

http://www.raspberrypi.org/.

This patch was extracted from git://github.com/lp0/linux.git branch
rpi-split from 3-4 months ago, and significantly stripped down and
modified since.

Signed-off-by: Chris Boot <bootc@bootc.net>
Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
Signed-off-by: Dom Cobley <popcornmix@gmail.com>
Signed-off-by: Dom Cobley <dc4@broadcom.com>
Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
2012-09-19 19:08:27 -06:00