All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: andrew@lunn.ch (Andrew Lunn)
To: linux-arm-kernel@lists.infradead.org
Subject: Linkstation Mini and __machine_arch_type problem, not booting since 3.8
Date: Sat, 20 Jun 2015 00:38:47 +0200	[thread overview]
Message-ID: <20150619223847.GC1116@lunn.ch> (raw)
In-Reply-To: <1434678624.4767.22.camel@dolka.fr>

/dts-v1/;

/* TODO: the specific power off method */

You can achieve this using the restart-poweroff driver. See the
kirkwood linkstation DTS files for an example.

#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,linkstation_mini", "marvell,orion5x-88f5182", "marvell,orion5x";

	memory {
		reg = <0x00000000 0x8000000>; /* 128 MB */
	};

	chosen {
		bootargs = "console=ttyS0,115200";
		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 = <0>; /* LSMINI_SW_POWER */
			gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
		};

		autopower {
			label = "Power-auto Switch";
			linux,input-type = <5>; /* EV_SW */
			linux,code = <1>; /* LSMINI_SW_AUTOPOWER */
			gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
		};

There is a contribute for two other linkstation devices also made
today, which have these two same buttons. I'm not sure these are the
best choice of keys, but what every we decide, we should use the same
for all linkstation devices.

	};

	gpio-leds {
		compatible = "gpio-leds";
		pinctrl-0 = <&pmx_leds>;
		pinctrl-names = "default";

		alarm {
			label = "alarm:red";

The board name should be in here. "lswsgl:alarm:red". Same for all the
LEDs.

			gpio = <&gpio0 2 GPIO_ACTIVE_LOW>;
		};

		info {
			label = "info:amber";
			gpio = <&gpio0 3 GPIO_ACTIVE_LOW>;
		};

		func {
			label = "func:blue:top";
			gpio = <&gpio0 9 GPIO_ACTIVE_LOW>;
		};

		power {
			label = "power:blue:bottom";
			gpio = <&gpio0 14 GPIO_ACTIVE_LOW>;
			default-state = "on";
		};
	};

	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 at 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 at 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 at 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 at 0 {
		compatible = "cfi-flash";
		reg = <0 0x40000>;
		bank-width = <1>;
                #address-cells = <1>;
		#size-cells = <1>;

		partition at 0 {
			label = "Full256Kb";
			reg = <0 0x40000>;
			read-only;
		};
	};
};

&mdio {
	status = "okay";

	ethphy: ethernet-phy {
		reg = <8>;
	};
};

&ehci0 {
	status = "okay";
};

&eth {
	status = "okay";

	ethernet-port at 0 {
		phy-handle = <&ethphy>;
	};
};

&i2c {
	status = "okay";
	clock-frequency = <100000>;
	#address-cells = <1>;

	rtc at 32 {
		compatible = "ricoh,rs5c372a";
		reg = <0x32>;
	};
};

&pinctrl {
	pmx_buttons: pmx-buttons {
		marvell,pins = "mpp15", "mpp17", "mpp18";
		marvell,function = "gpio";
	};

	pmx_leds: pmx-leds {
		marvell,pins = "mpp2", "mpp3", "mpp9", "mpp14";
		marvell,function = "gpio";
	};

It would be normal to have four separate entries for these leds.

Otherwise, this looks pretty good.

	   Andrew

      parent reply	other threads:[~2015-06-19 22:38 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-15 13:51 Linkstation Mini and __machine_arch_type problem, not booting since 3.8 Benjamin Cama
2015-06-16  9:20 ` Benjamin Cama
2015-06-18  2:12   ` [PATCH] " Benjamin Cama
2015-06-18  7:52     ` Marc Zyngier
2015-06-18  8:14       ` Arnd Bergmann
2015-06-18 13:23         ` Andrew Lunn
2015-06-19  1:38       ` Benjamin Cama
2015-06-19  9:13         ` Marc Zyngier
2015-06-19 12:16           ` Benjamin Cama
2015-06-19 13:01             ` Jason Cooper
2015-06-19 13:13             ` Russell King - ARM Linux
2015-06-19 13:46               ` Benjamin Cama
2015-06-19 15:25                 ` Jason Cooper
2015-06-19 15:48                   ` Russell King - ARM Linux
2015-06-19 17:13                     ` Jason Cooper
2015-06-21 17:37                       ` Benjamin Cama
2015-06-22 12:08                         ` Jason Cooper
2015-06-22 17:49                           ` Benjamin Cama
2015-06-22 17:58                             ` Russell King - ARM Linux
2015-06-22 18:04                             ` Jason Cooper
     [not found]                               ` <1436710916.5657.169.camel@dolka.fr>
2015-07-14 14:25                                 ` [PATCH] ARM: orion5x: fix legacy orion5x IRQ numbers Benjamin Cama
2015-07-14 20:50                                   ` Arnd Bergmann
2015-08-14 15:46                                     ` Gregory CLEMENT
2015-06-19 15:44                 ` [PATCH] Re: Linkstation Mini and __machine_arch_type problem, not booting since 3.8 Russell King - ARM Linux
2015-06-20  1:01                   ` Benjamin Cama
2015-06-18  8:12 ` Gregory CLEMENT
2015-06-19  1:50   ` Benjamin Cama
2015-06-19  9:33     ` Gregory CLEMENT
2015-06-19 11:41       ` Jason Cooper
2015-06-20  0:28         ` Benjamin Cama
2015-06-20 14:36           ` Andrew Lunn
2015-06-21 17:36             ` Benjamin Cama
2015-06-21 20:07               ` Andrew Lunn
     [not found]                 ` <1434995000.5657.42.camel@dolka.fr>
2015-06-22 18:23                   ` SERIAL_OF_PLATFORM default setting for DT headless systems Jason Cooper
2015-06-22 19:42                     ` Benjamin Cama
2015-06-22 12:00               ` Linkstation Mini and __machine_arch_type problem, not booting since 3.8 Jason Cooper
2015-06-22 17:44                 ` Benjamin Cama
2015-06-19 22:38     ` Andrew Lunn [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150619223847.GC1116@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.