Commit 85ef6b26 authored by Olof Johansson's avatar Olof Johansson

Merge tag 'mvebu-dt-4.3-3' of git://git.infradead.org/linux-mvebu into next/dt

mvebu dt changes for v4.3 (part #3)

- device tree part of the Dove PMU series
- converting a new orion5x based platform to dt: Linkstation Mini

* tag 'mvebu-dt-4.3-3' of git://git.infradead.org/linux-mvebu:
  ARM: dts: Convert Linkstation Mini to Device Tree
  ARM: dt: dove: add GPU power domain description
  ARM: dt: dove: add video decoder power domain description
  ARM: dt: dove: wire up RTC interrupt
  ARM: dt: Add PMU node, making PMU child devices childs of this node
Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
parents eb2b5084 15979aee
......@@ -478,6 +478,7 @@ dtb-$(CONFIG_ARCH_ORION5X) += \
orion5x-lacie-d2-network.dtb \
orion5x-lacie-ethernet-disk-mini-v2.dtb \
orion5x-linkstation-lswtgl.dtb \
orion5x-lswsgl.dtb \
orion5x-maxtor-shared-storage-2.dtb \
orion5x-rd88f5182-nas.dtb
dtb-$(CONFIG_ARCH_PRIMA2) += \
......
......@@ -419,293 +419,325 @@ audio1: audio-controller@b4000 {
status = "disabled";
};
thermal: thermal-diode@d001c {
compatible = "marvell,dove-thermal";
reg = <0xd001c 0x0c>, <0xd005c 0x08>;
};
gate_clk: clock-gating-ctrl@d0038 {
compatible = "marvell,dove-gating-clock";
reg = <0xd0038 0x4>;
clocks = <&core_clk 0>;
#clock-cells = <1>;
};
pinctrl: pin-ctrl@d0200 {
compatible = "marvell,dove-pinctrl";
reg = <0xd0200 0x14>,
<0xd0440 0x04>;
clocks = <&gate_clk 22>;
pmx_gpio_0: pmx-gpio-0 {
marvell,pins = "mpp0";
marvell,function = "gpio";
};
pmx_gpio_1: pmx-gpio-1 {
marvell,pins = "mpp1";
marvell,function = "gpio";
};
pmx_gpio_2: pmx-gpio-2 {
marvell,pins = "mpp2";
marvell,function = "gpio";
};
pmx_gpio_3: pmx-gpio-3 {
marvell,pins = "mpp3";
marvell,function = "gpio";
};
pmx_gpio_4: pmx-gpio-4 {
marvell,pins = "mpp4";
marvell,function = "gpio";
};
pmx_gpio_5: pmx-gpio-5 {
marvell,pins = "mpp5";
marvell,function = "gpio";
};
pmx_gpio_6: pmx-gpio-6 {
marvell,pins = "mpp6";
marvell,function = "gpio";
};
pmx_gpio_7: pmx-gpio-7 {
marvell,pins = "mpp7";
marvell,function = "gpio";
};
pmx_gpio_8: pmx-gpio-8 {
marvell,pins = "mpp8";
marvell,function = "gpio";
};
pmx_gpio_9: pmx-gpio-9 {
marvell,pins = "mpp9";
marvell,function = "gpio";
};
pmx_pcie1_clkreq: pmx-pcie1-clkreq {
marvell,pins = "mpp9";
marvell,function = "pex1";
};
pmx_gpio_10: pmx-gpio-10 {
marvell,pins = "mpp10";
marvell,function = "gpio";
};
pmx_gpio_11: pmx-gpio-11 {
marvell,pins = "mpp11";
marvell,function = "gpio";
};
pmx_pcie0_clkreq: pmx-pcie0-clkreq {
marvell,pins = "mpp11";
marvell,function = "pex0";
};
pmx_gpio_12: pmx-gpio-12 {
marvell,pins = "mpp12";
marvell,function = "gpio";
};
pmx_gpio_13: pmx-gpio-13 {
marvell,pins = "mpp13";
marvell,function = "gpio";
};
pmx_audio1_extclk: pmx-audio1-extclk {
marvell,pins = "mpp13";
marvell,function = "audio1";
};
pmx_gpio_14: pmx-gpio-14 {
marvell,pins = "mpp14";
marvell,function = "gpio";
};
pmx_gpio_15: pmx-gpio-15 {
marvell,pins = "mpp15";
marvell,function = "gpio";
};
pmx_gpio_16: pmx-gpio-16 {
marvell,pins = "mpp16";
marvell,function = "gpio";
};
pmx_gpio_17: pmx-gpio-17 {
marvell,pins = "mpp17";
marvell,function = "gpio";
};
pmx_gpio_18: pmx-gpio-18 {
marvell,pins = "mpp18";
marvell,function = "gpio";
};
pmx_gpio_19: pmx-gpio-19 {
marvell,pins = "mpp19";
marvell,function = "gpio";
};
pmx_gpio_20: pmx-gpio-20 {
marvell,pins = "mpp20";
marvell,function = "gpio";
};
pmx_gpio_21: pmx-gpio-21 {
marvell,pins = "mpp21";
marvell,function = "gpio";
};
pmx_camera: pmx-camera {
marvell,pins = "mpp_camera";
marvell,function = "camera";
};
pmx_camera_gpio: pmx-camera-gpio {
marvell,pins = "mpp_camera";
marvell,function = "gpio";
};
pmx_sdio0: pmx-sdio0 {
marvell,pins = "mpp_sdio0";
marvell,function = "sdio0";
};
pmx_sdio0_gpio: pmx-sdio0-gpio {
marvell,pins = "mpp_sdio0";
marvell,function = "gpio";
};
pmx_sdio1: pmx-sdio1 {
marvell,pins = "mpp_sdio1";
marvell,function = "sdio1";
};
pmx_sdio1_gpio: pmx-sdio1-gpio {
marvell,pins = "mpp_sdio1";
marvell,function = "gpio";
};
pmx_audio1_gpio: pmx-audio1-gpio {
marvell,pins = "mpp_audio1";
marvell,function = "gpio";
};
pmx_audio1_i2s1_spdifo: pmx-audio1-i2s1-spdifo {
marvell,pins = "mpp_audio1";
marvell,function = "i2s1/spdifo";
};
pmx_spi0: pmx-spi0 {
marvell,pins = "mpp_spi0";
marvell,function = "spi0";
};
pmx_spi0_gpio: pmx-spi0-gpio {
marvell,pins = "mpp_spi0";
marvell,function = "gpio";
};
pmx_spi1_4_7: pmx-spi1-4-7 {
marvell,pins = "mpp4", "mpp5",
"mpp6", "mpp7";
marvell,function = "spi1";
};
pmx_spi1_20_23: pmx-spi1-20-23 {
marvell,pins = "mpp20", "mpp21",
"mpp22", "mpp23";
marvell,function = "spi1";
};
pmx_uart1: pmx-uart1 {
marvell,pins = "mpp_uart1";
marvell,function = "uart1";
};
pmx_uart1_gpio: pmx-uart1-gpio {
marvell,pins = "mpp_uart1";
marvell,function = "gpio";
};
pmx_nand: pmx-nand {
marvell,pins = "mpp_nand";
marvell,function = "nand";
};
pmx_nand_gpo: pmx-nand-gpo {
marvell,pins = "mpp_nand";
marvell,function = "gpo";
};
pmx_i2c1: pmx-i2c1 {
marvell,pins = "mpp17", "mpp19";
marvell,function = "twsi";
};
pmx_i2c2: pmx-i2c2 {
marvell,pins = "mpp_audio1";
marvell,function = "twsi";
};
pmx_ssp_i2c2: pmx-ssp-i2c2 {
marvell,pins = "mpp_audio1";
marvell,function = "ssp/twsi";
};
pmx_i2cmux_0: pmx-i2cmux-0 {
marvell,pins = "twsi";
marvell,function = "twsi-opt1";
};
pmx_i2cmux_1: pmx-i2cmux-1 {
marvell,pins = "twsi";
marvell,function = "twsi-opt2";
};
pmx_i2cmux_2: pmx-i2cmux-2 {
marvell,pins = "twsi";
marvell,function = "twsi-opt3";
};
};
core_clk: core-clocks@d0214 {
compatible = "marvell,dove-core-clock";
reg = <0xd0214 0x4>;
#clock-cells = <1>;
};
gpio0: gpio-ctrl@d0400 {
compatible = "marvell,orion-gpio";
#gpio-cells = <2>;
gpio-controller;
reg = <0xd0400 0x20>;
ngpios = <32>;
interrupt-controller;
#interrupt-cells = <2>;
interrupts = <12>, <13>, <14>, <60>;
};
gpio1: gpio-ctrl@d0420 {
compatible = "marvell,orion-gpio";
#gpio-cells = <2>;
gpio-controller;
reg = <0xd0420 0x20>;
ngpios = <32>;
pmu: power-management@d0000 {
compatible = "marvell,dove-pmu", "simple-bus";
reg = <0xd0000 0x8000>, <0xd8000 0x8000>;
ranges = <0x00000000 0x000d0000 0x8000
0x00008000 0x000d8000 0x8000>;
interrupts = <33>;
interrupt-controller;
#interrupt-cells = <2>;
interrupts = <61>;
};
rtc: real-time-clock@d8500 {
compatible = "marvell,orion-rtc";
reg = <0xd8500 0x20>;
#address-cells = <1>;
#size-cells = <1>;
#interrupt-cells = <1>;
#reset-cells = <1>;
domains {
vpu_domain: vpu-domain {
#power-domain-cells = <0>;
marvell,pmu_pwr_mask = <0x00000008>;
marvell,pmu_iso_mask = <0x00000001>;
resets = <&pmu 16>;
};
gpu_domain: gpu-domain {
#power-domain-cells = <0>;
marvell,pmu_pwr_mask = <0x00000004>;
marvell,pmu_iso_mask = <0x00000002>;
resets = <&pmu 18>;
};
};
thermal: thermal-diode@001c {
compatible = "marvell,dove-thermal";
reg = <0x001c 0x0c>, <0x005c 0x08>;
};
gate_clk: clock-gating-ctrl@0038 {
compatible = "marvell,dove-gating-clock";
reg = <0x0038 0x4>;
clocks = <&core_clk 0>;
#clock-cells = <1>;
};
pinctrl: pin-ctrl@0200 {
compatible = "marvell,dove-pinctrl";
reg = <0x0200 0x14>,
<0x0440 0x04>;
clocks = <&gate_clk 22>;
pmx_gpio_0: pmx-gpio-0 {
marvell,pins = "mpp0";
marvell,function = "gpio";
};
pmx_gpio_1: pmx-gpio-1 {
marvell,pins = "mpp1";
marvell,function = "gpio";
};
pmx_gpio_2: pmx-gpio-2 {
marvell,pins = "mpp2";
marvell,function = "gpio";
};
pmx_gpio_3: pmx-gpio-3 {
marvell,pins = "mpp3";
marvell,function = "gpio";
};
pmx_gpio_4: pmx-gpio-4 {
marvell,pins = "mpp4";
marvell,function = "gpio";
};
pmx_gpio_5: pmx-gpio-5 {
marvell,pins = "mpp5";
marvell,function = "gpio";
};
pmx_gpio_6: pmx-gpio-6 {
marvell,pins = "mpp6";
marvell,function = "gpio";
};
pmx_gpio_7: pmx-gpio-7 {
marvell,pins = "mpp7";
marvell,function = "gpio";
};
pmx_gpio_8: pmx-gpio-8 {
marvell,pins = "mpp8";
marvell,function = "gpio";
};
pmx_gpio_9: pmx-gpio-9 {
marvell,pins = "mpp9";
marvell,function = "gpio";
};
pmx_pcie1_clkreq: pmx-pcie1-clkreq {
marvell,pins = "mpp9";
marvell,function = "pex1";
};
pmx_gpio_10: pmx-gpio-10 {
marvell,pins = "mpp10";
marvell,function = "gpio";
};
pmx_gpio_11: pmx-gpio-11 {
marvell,pins = "mpp11";
marvell,function = "gpio";
};
pmx_pcie0_clkreq: pmx-pcie0-clkreq {
marvell,pins = "mpp11";
marvell,function = "pex0";
};
pmx_gpio_12: pmx-gpio-12 {
marvell,pins = "mpp12";
marvell,function = "gpio";
};
pmx_gpio_13: pmx-gpio-13 {
marvell,pins = "mpp13";
marvell,function = "gpio";
};
pmx_audio1_extclk: pmx-audio1-extclk {
marvell,pins = "mpp13";
marvell,function = "audio1";
};
pmx_gpio_14: pmx-gpio-14 {
marvell,pins = "mpp14";
marvell,function = "gpio";
};
pmx_gpio_15: pmx-gpio-15 {
marvell,pins = "mpp15";
marvell,function = "gpio";
};
pmx_gpio_16: pmx-gpio-16 {
marvell,pins = "mpp16";
marvell,function = "gpio";
};
pmx_gpio_17: pmx-gpio-17 {
marvell,pins = "mpp17";
marvell,function = "gpio";
};
pmx_gpio_18: pmx-gpio-18 {
marvell,pins = "mpp18";
marvell,function = "gpio";
};
pmx_gpio_19: pmx-gpio-19 {
marvell,pins = "mpp19";
marvell,function = "gpio";
};
pmx_gpio_20: pmx-gpio-20 {
marvell,pins = "mpp20";
marvell,function = "gpio";
};
pmx_gpio_21: pmx-gpio-21 {
marvell,pins = "mpp21";
marvell,function = "gpio";
};
pmx_camera: pmx-camera {
marvell,pins = "mpp_camera";
marvell,function = "camera";
};
pmx_camera_gpio: pmx-camera-gpio {
marvell,pins = "mpp_camera";
marvell,function = "gpio";
};
pmx_sdio0: pmx-sdio0 {
marvell,pins = "mpp_sdio0";
marvell,function = "sdio0";
};
pmx_sdio0_gpio: pmx-sdio0-gpio {
marvell,pins = "mpp_sdio0";
marvell,function = "gpio";
};
pmx_sdio1: pmx-sdio1 {
marvell,pins = "mpp_sdio1";
marvell,function = "sdio1";
};
pmx_sdio1_gpio: pmx-sdio1-gpio {
marvell,pins = "mpp_sdio1";
marvell,function = "gpio";
};
pmx_audio1_gpio: pmx-audio1-gpio {
marvell,pins = "mpp_audio1";
marvell,function = "gpio";
};
pmx_audio1_i2s1_spdifo: pmx-audio1-i2s1-spdifo {
marvell,pins = "mpp_audio1";
marvell,function = "i2s1/spdifo";
};
pmx_spi0: pmx-spi0 {
marvell,pins = "mpp_spi0";
marvell,function = "spi0";
};
pmx_spi0_gpio: pmx-spi0-gpio {
marvell,pins = "mpp_spi0";
marvell,function = "gpio";
};
pmx_spi1_4_7: pmx-spi1-4-7 {
marvell,pins = "mpp4", "mpp5",
"mpp6", "mpp7";
marvell,function = "spi1";
};
pmx_spi1_20_23: pmx-spi1-20-23 {
marvell,pins = "mpp20", "mpp21",
"mpp22", "mpp23";
marvell,function = "spi1";
};
pmx_uart1: pmx-uart1 {
marvell,pins = "mpp_uart1";
marvell,function = "uart1";
};
pmx_uart1_gpio: pmx-uart1-gpio {
marvell,pins = "mpp_uart1";
marvell,function = "gpio";
};
pmx_nand: pmx-nand {
marvell,pins = "mpp_nand";
marvell,function = "nand";
};
pmx_nand_gpo: pmx-nand-gpo {
marvell,pins = "mpp_nand";
marvell,function = "gpo";
};
pmx_i2c1: pmx-i2c1 {
marvell,pins = "mpp17", "mpp19";
marvell,function = "twsi";
};
pmx_i2c2: pmx-i2c2 {
marvell,pins = "mpp_audio1";
marvell,function = "twsi";
};
pmx_ssp_i2c2: pmx-ssp-i2c2 {
marvell,pins = "mpp_audio1";
marvell,function = "ssp/twsi";
};
pmx_i2cmux_0: pmx-i2cmux-0 {
marvell,pins = "twsi";
marvell,function = "twsi-opt1";
};
pmx_i2cmux_1: pmx-i2cmux-1 {
marvell,pins = "twsi";
marvell,function = "twsi-opt2";
};
pmx_i2cmux_2: pmx-i2cmux-2 {
marvell,pins = "twsi";
marvell,function = "twsi-opt3";
};
};
core_clk: core-clocks@0214 {
compatible = "marvell,dove-core-clock";
reg = <0x0214 0x4>;
#clock-cells = <1>;
};
gpio0: gpio-ctrl@0400 {
compatible = "marvell,orion-gpio";
#gpio-cells = <2>;
gpio-controller;
reg = <0x0400 0x20>;
ngpios = <32>;
interrupt-controller;
#interrupt-cells = <2>;
interrupt-parent = <&intc>;
interrupts = <12>, <13>, <14>, <60>;
};
gpio1: gpio-ctrl@0420 {
compatible = "marvell,orion-gpio";
#gpio-cells = <2>;
gpio-controller;
reg = <0x0420 0x20>;
ngpios = <32>;
interrupt-controller;
#interrupt-cells = <2>;
interrupt-parent = <&intc>;
interrupts = <61>;
};
rtc: real-time-clock@8500 {
compatible = "marvell,orion-rtc";
reg = <0x8500 0x20>;
interrupts = <5>;
};
};
gconf: global-config@e802c {
......
/*
* Copyright (C) 2015 Benjamin Cama <benoar@dolka.fr>
* Copyright (C) 2014 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* Based on the board file arch/arm/mach-orion5x/lsmini-setup.c,
* Copyright (C) 2008 Alexey Kopytko <alexey@kopytko.ru>
*
* This file is dual-licensed: you can use it either under the terms
* of the GPL or the X11 license, at your option. Note that this dual
* licensing only applies to this file, and not this project as a
* whole.
*
* a) This file is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This file is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* Or, alternatively
*
* b) Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use
* copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following
* conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
/dts-v1/;
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include "orion5x-mv88f5182.dtsi"
/ {
model = "Buffalo Linkstation Mini (LS-WSGL)";
compatible = "buffalo,lswsgl", "marvell,orion5x-88f5182", "marvell,orion5x";
memory {
reg = <0x00000000 0x8000000>; /* 128 MB */
};
chosen {
bootargs = "console=ttyS0,115200 earlyprintk";
linux,stdout-path = &uart0;
};
soc {
ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000>,
<MBUS_ID(0x09, 0x00) 0 0xf2200000 0x800>,
<MBUS_ID(0x01, 0x0f) 0 0xf4000000 0x40000>;
};
gpio-keys {
compatible = "gpio-keys";
pinctrl-0 = <&pmx_buttons>;
pinctrl-names = "default";
#address-cells = <1>;
#size-cells = <0>;
func {
label = "Function Button";
linux,code = <KEY_OPTION>;
gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
};
power {
label = "Power-on Switch";
linux,input-type = <5>; /* EV_SW */
linux,code = <KEY_RESERVED>; /* LSMINI_SW_POWER */
gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
};
autopower {
label = "Power-auto Switch";
linux,input-type = <5>; /* EV_SW */
linux,code = <KEY_ESC>; /* LSMINI_SW_AUTOPOWER */
gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
};
};
gpio-leds {
compatible = "gpio-leds";
pinctrl-0 = <&pmx_led_alarm &pmx_led_info &pmx_led_func
&pmx_led_power>;
pinctrl-names = "default";
alarm {
label = "lswsgl:alarm:red";
gpio = <&gpio0 2 GPIO_ACTIVE_LOW>;
};
info {
label = "lswsgl:info:amber";
gpio = <&gpio0 3 GPIO_ACTIVE_LOW>;
};
func {
label = "lswsgl:func:blue:top";
gpio = <&gpio0 9 GPIO_ACTIVE_LOW>;
};
power {
label = "lswsgl:power:blue:bottom";
gpio = <&gpio0 14 GPIO_ACTIVE_LOW>;
default-state = "on";
};
};
restart_poweroff {
compatible = "restart-poweroff";
};
regulators {
compatible = "simple-bus";
#address-cells = <1>;
#size-cells = <0>;
pinctrl-0 = <&pmx_sata0_power &pmx_sata1_power &pmx_usb_power>;
pinctrl-names = "default";
sata0_power: regulator@0 {
compatible = "regulator-fixed";
reg = <0>;
regulator-name = "SATA0 Power";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
enable-active-high;
regulator-always-on;
regulator-boot-on;
gpio = <&gpio0 1 GPIO_ACTIVE_HIGH>;
};
sata1_power: regulator@1 {
compatible = "regulator-fixed";
reg = <1>;
regulator-name = "SATA1 Power";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
enable-active-high;
regulator-always-on;
regulator-boot-on;
gpio = <&gpio0 19 GPIO_ACTIVE_HIGH>;
};
usb_power: regulator@2 {
compatible = "regulator-fixed";
reg = <2>;
regulator-name = "USB Power";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
enable-active-high;
regulator-always-on;
regulator-boot-on;
gpio = <&gpio0 16 GPIO_ACTIVE_HIGH>;
};
};
};
&devbus_bootcs {
status = "okay";
devbus,keep-config;
flash@0 {
compatible = "cfi-flash";
reg = <0 0x40000>;
bank-width = <1>;
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "Full256Kb";
reg = <0 0x40000>;
read-only;
};
};
};
&mdio {
status = "okay";
ethphy: ethernet-phy {
reg = <8>;
};
};
&ehci0 {
status = "okay";
};
&eth {
status = "okay";
ethernet-port@0 {
phy-handle = <&ethphy>;
};
};
&i2c {
status = "okay";
clock-frequency = <100000>;
#address-cells = <1>;
rtc@32 {
compatible = "ricoh,rs5c372a";
reg = <0x32>;
};
};
&pinctrl {
pmx_buttons: pmx-buttons {
marvell,pins = "mpp15", "mpp17", "mpp18";
marvell,function = "gpio";
};
pmx_led_alarm: pmx-leds {
marvell,pins = "mpp2";
marvell,function = "gpio";
};
pmx_led_info: pmx-leds {
marvell,pins = "mpp3";
marvell,function = "gpio";
};
pmx_led_func: pmx-leds {
marvell,pins = "mpp9";
marvell,function = "gpio";
};
pmx_led_power: pmx-leds {
marvell,pins = "mpp14";
marvell,function = "gpio";
};
pmx_sata0_power: pmx-sata0-power {
marvell,pins = "mpp1";
marvell,function = "gpio";
};
pmx_sata1_power: pmx-sata1-power {
marvell,pins = "mpp19";
marvell,function = "gpio";
};
pmx_usb_power: pmx-usb-power {
marvell,pins = "mpp16";
marvell,function = "gpio";
};
};
&sata {
status = "okay";
nr-ports = <2>;
};
&uart0 {
status = "okay";
};
......@@ -78,11 +78,11 @@ config MACH_LINKSTATION_LSCHL
Buffalo Linkstation Live v3 (LS-CHL) platform.
config MACH_LINKSTATION_MINI
bool "Buffalo Linkstation Mini"
select I2C_BOARDINFO
bool "Buffalo Linkstation Mini (Flattened Device Tree)"
select ARCH_ORION5X_DT
help
Say 'Y' here if you want your kernel to support the
Buffalo Linkstation Mini platform.
Buffalo Linkstation Mini (LS-WSGL) platform.
config MACH_LINKSTATION_LS_HGL
bool "Buffalo Linkstation LS-HGL"
......
......@@ -4,7 +4,6 @@ obj-$(CONFIG_MACH_RD88F5182) += rd88f5182-setup.o
obj-$(CONFIG_MACH_KUROBOX_PRO) += kurobox_pro-setup.o
obj-$(CONFIG_MACH_TERASTATION_PRO2) += terastation_pro2-setup.o
obj-$(CONFIG_MACH_LINKSTATION_PRO) += kurobox_pro-setup.o
obj-$(CONFIG_MACH_LINKSTATION_MINI) += lsmini-setup.o
obj-$(CONFIG_MACH_LINKSTATION_LS_HGL) += ls_hgl-setup.o
obj-$(CONFIG_MACH_DNS323) += dns323-setup.o
obj-$(CONFIG_MACH_TS209) += ts209-setup.o tsx09-common.o
......
/*
* arch/arm/mach-orion5x/lsmini-setup.c
*
* Maintainer: Alexey Kopytko <alexey@kopytko.ru>
*
* This file is licensed under the terms of the GNU General Public
* License version 2. This program is licensed "as is" without any
* warranty of any kind, whether express or implied.
*/
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/mtd/physmap.h>
#include <linux/mv643xx_eth.h>
#include <linux/leds.h>
#include <linux/gpio_keys.h>
#include <linux/input.h>
#include <linux/i2c.h>
#include <linux/ata_platform.h>
#include <linux/gpio.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <mach/orion5x.h>
#include "common.h"
#include "mpp.h"
/*****************************************************************************
* Linkstation Mini Info
****************************************************************************/
/*
* 256K NOR flash Device bus boot chip select
*/
#define LSMINI_NOR_BOOT_BASE 0xf4000000
#define LSMINI_NOR_BOOT_SIZE SZ_256K
/*****************************************************************************
* 256KB NOR Flash on BOOT Device
****************************************************************************/
static struct physmap_flash_data lsmini_nor_flash_data = {
.width = 1,
};
static struct resource lsmini_nor_flash_resource = {
.flags = IORESOURCE_MEM,
.start = LSMINI_NOR_BOOT_BASE,
.end = LSMINI_NOR_BOOT_BASE + LSMINI_NOR_BOOT_SIZE - 1,
};
static struct platform_device lsmini_nor_flash = {
.name = "physmap-flash",
.id = 0,
.dev = {
.platform_data = &lsmini_nor_flash_data,
},
.num_resources = 1,
.resource = &lsmini_nor_flash_resource,
};
/*****************************************************************************
* Ethernet
****************************************************************************/
static struct mv643xx_eth_platform_data lsmini_eth_data = {
.phy_addr = 8,
};
/*****************************************************************************
* RTC 5C372a on I2C bus
****************************************************************************/
static struct i2c_board_info __initdata lsmini_i2c_rtc = {
I2C_BOARD_INFO("rs5c372a", 0x32),
};
/*****************************************************************************
* LEDs attached to GPIO
****************************************************************************/
#define LSMINI_GPIO_LED_ALARM 2
#define LSMINI_GPIO_LED_INFO 3
#define LSMINI_GPIO_LED_FUNC 9
#define LSMINI_GPIO_LED_PWR 14
static struct gpio_led lsmini_led_pins[] = {
{
.name = "alarm:red",
.gpio = LSMINI_GPIO_LED_ALARM,
.active_low = 1,
}, {
.name = "info:amber",
.gpio = LSMINI_GPIO_LED_INFO,
.active_low = 1,
}, {
.name = "func:blue:top",
.gpio = LSMINI_GPIO_LED_FUNC,
.active_low = 1,
}, {
.name = "power:blue:bottom",
.gpio = LSMINI_GPIO_LED_PWR,
},
};
static struct gpio_led_platform_data lsmini_led_data = {
.leds = lsmini_led_pins,
.num_leds = ARRAY_SIZE(lsmini_led_pins),
};
static struct platform_device lsmini_leds = {
.name = "leds-gpio",
.id = -1,
.dev = {
.platform_data = &lsmini_led_data,
},
};
/****************************************************************************
* GPIO Attached Keys
****************************************************************************/
#define LSMINI_GPIO_KEY_FUNC 15
#define LSMINI_GPIO_KEY_POWER 18
#define LSMINI_GPIO_KEY_AUTOPOWER 17
#define LSMINI_SW_POWER 0x00
#define LSMINI_SW_AUTOPOWER 0x01
static struct gpio_keys_button lsmini_buttons[] = {
{
.code = KEY_OPTION,
.gpio = LSMINI_GPIO_KEY_FUNC,
.desc = "Function Button",
.active_low = 1,
}, {
.type = EV_SW,
.code = LSMINI_SW_POWER,
.gpio = LSMINI_GPIO_KEY_POWER,
.desc = "Power-on Switch",
.active_low = 1,
}, {
.type = EV_SW,
.code = LSMINI_SW_AUTOPOWER,
.gpio = LSMINI_GPIO_KEY_AUTOPOWER,
.desc = "Power-auto Switch",
.active_low = 1,
},
};
static struct gpio_keys_platform_data lsmini_button_data = {
.buttons = lsmini_buttons,
.nbuttons = ARRAY_SIZE(lsmini_buttons),
};
static struct platform_device lsmini_button_device = {
.name = "gpio-keys",
.id = -1,
.num_resources = 0,
.dev = {
.platform_data = &lsmini_button_data,
},
};
/*****************************************************************************
* SATA
****************************************************************************/
static struct mv_sata_platform_data lsmini_sata_data = {
.n_ports = 2,
};
/*****************************************************************************
* Linkstation Mini specific power off method: reboot
****************************************************************************/
/*
* On the Linkstation Mini, the shutdown process is following:
* - Userland monitors key events until the power switch goes to off position
* - The board reboots
* - U-boot starts and goes into an idle mode waiting for the user
* to move the switch to ON position
*/
static void lsmini_power_off(void)
{
orion5x_restart(REBOOT_HARD, NULL);
}
/*****************************************************************************
* General Setup
****************************************************************************/
#define LSMINI_GPIO_USB_POWER 16
#define LSMINI_GPIO_AUTO_POWER 17
#define LSMINI_GPIO_POWER 18
#define LSMINI_GPIO_HDD_POWER0 1
#define LSMINI_GPIO_HDD_POWER1 19
static unsigned int lsmini_mpp_modes[] __initdata = {
MPP0_UNUSED, /* LED_RESERVE1 (unused) */
MPP1_GPIO, /* HDD_PWR */
MPP2_GPIO, /* LED_ALARM */
MPP3_GPIO, /* LED_INFO */
MPP4_UNUSED,
MPP5_UNUSED,
MPP6_UNUSED,
MPP7_UNUSED,
MPP8_UNUSED,
MPP9_GPIO, /* LED_FUNC */
MPP10_UNUSED,
MPP11_UNUSED, /* LED_ETH (dummy) */
MPP12_UNUSED,
MPP13_UNUSED,
MPP14_GPIO, /* LED_PWR */
MPP15_GPIO, /* FUNC */
MPP16_GPIO, /* USB_PWR */
MPP17_GPIO, /* AUTO_POWER */
MPP18_GPIO, /* POWER */
MPP19_GPIO, /* HDD_PWR1 */
0,
};
static void __init lsmini_init(void)
{
/*
* Setup basic Orion functions. Need to be called early.
*/
orion5x_init();
orion5x_mpp_conf(lsmini_mpp_modes);
/*
* Configure peripherals.
*/
orion5x_ehci0_init();
orion5x_ehci1_init();
orion5x_eth_init(&lsmini_eth_data);
orion5x_i2c_init();
orion5x_sata_init(&lsmini_sata_data);
orion5x_uart0_init();
orion5x_xor_init();
mvebu_mbus_add_window_by_id(ORION_MBUS_DEVBUS_BOOT_TARGET,
ORION_MBUS_DEVBUS_BOOT_ATTR,
LSMINI_NOR_BOOT_BASE,
LSMINI_NOR_BOOT_SIZE);
platform_device_register(&lsmini_nor_flash);
platform_device_register(&lsmini_button_device);
platform_device_register(&lsmini_leds);
i2c_register_board_info(0, &lsmini_i2c_rtc, 1);
/* enable USB power */
gpio_set_value(LSMINI_GPIO_USB_POWER, 1);
/* register power-off method */
pm_power_off = lsmini_power_off;
pr_info("%s: finished\n", __func__);
}
#ifdef CONFIG_MACH_LINKSTATION_MINI
MACHINE_START(LINKSTATION_MINI, "Buffalo Linkstation Mini")
/* Maintainer: Alexey Kopytko <alexey@kopytko.ru> */
.atag_offset = 0x100,
.init_machine = lsmini_init,
.map_io = orion5x_map_io,
.init_early = orion5x_init_early,
.init_irq = orion5x_init_irq,
.init_time = orion5x_timer_init,
.fixup = tag_fixup_mem32,
.restart = orion5x_restart,
MACHINE_END
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment