Commit 6a9f797623b333487e587b51a59af006a2514576

Authored by Chris Packham
Committed by Stefan Roese
1 parent 72f4013e95

ARM: kirkwood: Add device-tree for sheevaplug

Import the dts files from Linux 4.17 and enable device tree control in
u-boot.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Signed-off-by: Stefan Roese <sr@denx.de>

Showing 3 changed files with 148 additions and 1 deletions Side-by-side Diff

arch/arm/dts/kirkwood-sheevaplug-common.dtsi
  1 +// SPDX-License-Identifier: GPL-2.0
  2 +/*
  3 + * kirkwood-sheevaplug-common.dtsi - Common parts for Sheevaplugs
  4 + *
  5 + * Copyright (C) 2013 Simon Baatz <gmbnomis@gmail.com>
  6 + */
  7 +
  8 +#include "kirkwood.dtsi"
  9 +#include "kirkwood-6281.dtsi"
  10 +
  11 +/ {
  12 + memory {
  13 + device_type = "memory";
  14 + reg = <0x00000000 0x20000000>;
  15 + };
  16 +
  17 + chosen {
  18 + bootargs = "console=ttyS0,115200n8 earlyprintk";
  19 + stdout-path = &uart0;
  20 + };
  21 +
  22 + ocp@f1000000 {
  23 + pinctrl: pin-controller@10000 {
  24 +
  25 + pmx_usb_power_enable: pmx-usb-power-enable {
  26 + marvell,pins = "mpp29";
  27 + marvell,function = "gpio";
  28 + };
  29 + pmx_led_red: pmx-led-red {
  30 + marvell,pins = "mpp46";
  31 + marvell,function = "gpio";
  32 + };
  33 + pmx_led_blue: pmx-led-blue {
  34 + marvell,pins = "mpp49";
  35 + marvell,function = "gpio";
  36 + };
  37 + pmx_sdio_cd: pmx-sdio-cd {
  38 + marvell,pins = "mpp44";
  39 + marvell,function = "gpio";
  40 + };
  41 + pmx_sdio_wp: pmx-sdio-wp {
  42 + marvell,pins = "mpp47";
  43 + marvell,function = "gpio";
  44 + };
  45 + };
  46 + serial@12000 {
  47 + status = "okay";
  48 + };
  49 + };
  50 +
  51 + regulators {
  52 + compatible = "simple-bus";
  53 + #address-cells = <1>;
  54 + #size-cells = <0>;
  55 + pinctrl-0 = <&pmx_usb_power_enable>;
  56 + pinctrl-names = "default";
  57 +
  58 + usb_power: regulator@1 {
  59 + compatible = "regulator-fixed";
  60 + reg = <1>;
  61 + regulator-name = "USB Power";
  62 + regulator-min-microvolt = <5000000>;
  63 + regulator-max-microvolt = <5000000>;
  64 + enable-active-high;
  65 + regulator-always-on;
  66 + regulator-boot-on;
  67 + gpio = <&gpio0 29 0>;
  68 + };
  69 + };
  70 +};
  71 +
  72 +&nand {
  73 + status = "okay";
  74 +
  75 + partition@0 {
  76 + label = "u-boot";
  77 + reg = <0x0000000 0x100000>;
  78 + };
  79 +
  80 + partition@100000 {
  81 + label = "uImage";
  82 + reg = <0x0100000 0x400000>;
  83 + };
  84 +
  85 + partition@500000 {
  86 + label = "root";
  87 + reg = <0x0500000 0x1fb00000>;
  88 + };
  89 +};
  90 +
  91 +&mdio {
  92 + status = "okay";
  93 +
  94 + ethphy0: ethernet-phy@0 {
  95 + reg = <0>;
  96 + };
  97 +};
  98 +
  99 +&eth0 {
  100 + status = "okay";
  101 + ethernet0-port@0 {
  102 + phy-handle = <&ethphy0>;
  103 + };
  104 +};
arch/arm/dts/kirkwood-sheevaplug.dts
  1 +// SPDX-License-Identifier: GPL-2.0
  2 +/*
  3 + * kirkwood-sheevaplug.dts - Device tree file for Sheevaplug
  4 + *
  5 + * Copyright (C) 2013 Simon Baatz <gmbnomis@gmail.com>
  6 + */
  7 +
  8 +/dts-v1/;
  9 +
  10 +#include "kirkwood-sheevaplug-common.dtsi"
  11 +
  12 +/ {
  13 + model = "Globalscale Technologies SheevaPlug";
  14 + compatible = "globalscale,sheevaplug", "marvell,kirkwood-88f6281", "marvell,kirkwood";
  15 +
  16 + ocp@f1000000 {
  17 + mvsdio@90000 {
  18 + pinctrl-0 = <&pmx_sdio>;
  19 + pinctrl-names = "default";
  20 + status = "okay";
  21 + /* No CD or WP GPIOs */
  22 + broken-cd;
  23 + };
  24 + };
  25 +
  26 + gpio-leds {
  27 + compatible = "gpio-leds";
  28 + pinctrl-0 = <&pmx_led_blue &pmx_led_red>;
  29 + pinctrl-names = "default";
  30 +
  31 + health {
  32 + label = "sheevaplug:blue:health";
  33 + gpios = <&gpio1 17 GPIO_ACTIVE_LOW>;
  34 + default-state = "keep";
  35 + };
  36 +
  37 + misc {
  38 + label = "sheevaplug:red:misc";
  39 + gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
  40 + };
  41 + };
  42 +};
configs/sheevaplug_defconfig
... ... @@ -3,6 +3,7 @@
3 3 CONFIG_SYS_TEXT_BASE=0x600000
4 4 CONFIG_TARGET_SHEEVAPLUG=y
5 5 CONFIG_IDENT_STRING="\nMarvell-Sheevaplug"
  6 +CONFIG_DEFAULT_DEVICE_TREE="kirkwood-sheevaplug"
6 7 CONFIG_BOOTDELAY=3
7 8 # CONFIG_DISPLAY_BOARDINFO is not set
8 9 CONFIG_HUSH_PARSER=y
... ... @@ -25,6 +26,7 @@
25 26 CONFIG_MTDPARTS_DEFAULT="mtdparts=orion_nand:512K(uboot),512K(env),4M(kernel),-(rootfs)"
26 27 CONFIG_CMD_UBI=y
27 28 CONFIG_ISO_PARTITION=y
  29 +CONFIG_OF_CONTROL=y
28 30 CONFIG_ENV_IS_IN_NAND=y
29 31 CONFIG_MVSATA_IDE=y
30 32 CONFIG_NETDEVICES=y
... ... @@ -34,5 +36,4 @@
34 36 CONFIG_USB_EHCI_HCD=y
35 37 CONFIG_USB_STORAGE=y
36 38 CONFIG_LZMA=y
37   -CONFIG_OF_LIBFDT=y