Commit 8993056fb3d4af4f0cd078df20130d4e7c35c2f7

Authored by Dmitry Korunov
Committed by Tom Rini
1 parent 0aac10f2f9

add support for Raspberry Pi Zero W

Signed-off-by: Dmitry Korunov <dessel.k@gmail.com>

Showing 5 changed files with 76 additions and 1 deletions Side-by-side Diff

arch/arm/dts/bcm2835-rpi-zero-w.dts
  1 +/dts-v1/;
  2 +#include "bcm2835.dtsi"
  3 +#include "bcm2835-rpi.dtsi"
  4 +#include "bcm283x-rpi-smsc9512.dtsi"
  5 +#include "bcm283x-rpi-usb-host.dtsi"
  6 +
  7 +/ {
  8 + compatible = "raspberrypi,model-zero-w", "brcm,bcm2835";
  9 + model = "Raspberry Pi Zero W";
  10 +
  11 + leds {
  12 + act {
  13 + gpios = <&gpio 47 0>;
  14 + };
  15 + };
  16 +};
  17 +
  18 +&uart1 {
  19 + pinctrl-names = "default";
  20 + pinctrl-0 = <&uart1_gpio14>;
  21 + status = "okay";
  22 +};
  23 +
  24 +&hdmi {
  25 + hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
  26 +};
arch/arm/mach-bcm283x/Kconfig
... ... @@ -44,6 +44,22 @@
44 44 This option creates a build targetting the ARM1176 ISA.
45 45 select BCM2835
46 46  
  47 +config TARGET_RPI_0_W
  48 + bool "Raspberry Pi Zero W"
  49 + help
  50 + Support for all ARM1176-/BCM2835-based Raspberry Pi variants, such as
  51 + the RPi Zero model W.
  52 +
  53 + This option assumes the VideoCore firmware is configured to use the
  54 + mini UART (rather than PL011) for the serial console. This is the
  55 + default on the RPi Zero W. To enable the UART console, the following
  56 + non-default option must be present in config.txt: enable_uart=1.
  57 + This is required for U-Boot to operate correctly, even if you only
  58 + care about the HDMI/usbkbd console.
  59 +
  60 + This option creates a build targetting the ARMv7/AArch32 ISA.
  61 + select BCM2835
  62 +
47 63 config TARGET_RPI_2
48 64 bool "Raspberry Pi 2"
49 65 help
board/raspberrypi/rpi/rpi.c
... ... @@ -105,6 +105,11 @@
105 105 DTB_DIR "bcm2835-rpi-zero.dtb",
106 106 false,
107 107 },
  108 + [0xC] = {
  109 + "Zero W",
  110 + DTB_DIR "bcm2835-rpi-zero-w.dtb",
  111 + false,
  112 + },
108 113 };
109 114  
110 115 static const struct rpi_model rpi_models_old_scheme[] = {
configs/rpi_0_w_defconfig
  1 +CONFIG_ARM=y
  2 +CONFIG_ARCH_BCM283X=y
  3 +CONFIG_TARGET_RPI_0_W=y
  4 +CONFIG_DEFAULT_DEVICE_TREE="bcm2835-rpi-zero-w"
  5 +CONFIG_DISTRO_DEFAULTS=y
  6 +CONFIG_OF_BOARD_SETUP=y
  7 +# CONFIG_DISPLAY_CPUINFO is not set
  8 +# CONFIG_DISPLAY_BOARDINFO is not set
  9 +CONFIG_SYS_PROMPT="U-Boot> "
  10 +# CONFIG_CMD_IMLS is not set
  11 +# CONFIG_CMD_FLASH is not set
  12 +CONFIG_CMD_MMC=y
  13 +CONFIG_CMD_USB=y
  14 +# CONFIG_CMD_FPGA is not set
  15 +CONFIG_CMD_GPIO=y
  16 +CONFIG_DM_MMC=y
  17 +CONFIG_MMC_SDHCI=y
  18 +CONFIG_MMC_SDHCI_BCM2835=y
  19 +CONFIG_DM_ETH=y
  20 +CONFIG_USB=y
  21 +CONFIG_DM_USB=y
  22 +CONFIG_USB_STORAGE=y
  23 +CONFIG_USB_KEYBOARD=y
  24 +CONFIG_DM_VIDEO=y
  25 +CONFIG_SYS_WHITE_ON_BLACK=y
  26 +CONFIG_CONSOLE_SCROLL_LINES=10
  27 +CONFIG_PHYS_TO_BUS=y
  28 +CONFIG_OF_LIBFDT_OVERLAY=y
include/configs/rpi.h
... ... @@ -76,7 +76,7 @@
76 76 #endif
77 77  
78 78 /* Console UART */
79   -#ifdef CONFIG_BCM2837
  79 +#if defined (CONFIG_BCM2837) || defined(CONFIG_TARGET_RPI_0_W)
80 80 #define CONFIG_BCM283X_MU_SERIAL
81 81 #else
82 82 #define CONFIG_PL01X_SERIAL