linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ARM: Kirkwood: Add 6192 DTSI file
@ 2013-12-23 15:42 Maxime Hadjinlian
  2013-12-23 15:42 ` [PATCH 2/2] ARM: Kirkwood: DT board setup for LaPlug Maxime Hadjinlian
  2013-12-23 15:56 ` [PATCH 1/2] ARM: Kirkwood: Add 6192 DTSI file Andrew Lunn
  0 siblings, 2 replies; 9+ messages in thread
From: Maxime Hadjinlian @ 2013-12-23 15:42 UTC (permalink / raw)
  To: linux-arm-kernel

This file is mainly a copy of kirkwood-6281.dtsi.
The pinctrl seems to be the same.
These platforms differs only with their CPU, memory capabilities and the
number of GPIO available (36 on 6192, 50 on 6281).

Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
---
 arch/arm/boot/dts/kirkwood-6192.dtsi | 107 +++++++++++++++++++++++++++++++++++
 1 file changed, 107 insertions(+)
 create mode 100644 arch/arm/boot/dts/kirkwood-6192.dtsi

diff --git a/arch/arm/boot/dts/kirkwood-6192.dtsi b/arch/arm/boot/dts/kirkwood-6192.dtsi
new file mode 100644
index 0000000..3916937
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-6192.dtsi
@@ -0,0 +1,107 @@
+/ {
+	mbus {
+		pcie-controller {
+			compatible = "marvell,kirkwood-pcie";
+			status = "disabled";
+			device_type = "pci";
+
+			#address-cells = <3>;
+			#size-cells = <2>;
+
+			bus-range = <0x00 0xff>;
+
+			ranges =
+			       <0x82000000 0 0x40000 MBUS_ID(0xf0, 0x01) 0x40000 0 0x00002000
+				0x82000000 0x1 0     MBUS_ID(0x04, 0xe8) 0       1 0 /* Port 0.0 MEM */
+				0x81000000 0x1 0     MBUS_ID(0x04, 0xe0) 0       1 0 /* Port 0.0 IO  */>;
+
+			pcie at 1,0 {
+				device_type = "pci";
+				assigned-addresses = <0x82000800 0 0x00040000 0 0x2000>;
+				reg = <0x0800 0 0 0 0>;
+				#address-cells = <3>;
+				#size-cells = <2>;
+				#interrupt-cells = <1>;
+				ranges = <0x82000000 0 0 0x82000000 0x1 0 1 0
+					  0x81000000 0 0 0x81000000 0x1 0 1 0>;
+				interrupt-map-mask = <0 0 0 0>;
+				interrupt-map = <0 0 0 0 &intc 9>;
+				marvell,pcie-port = <0>;
+				marvell,pcie-lane = <0>;
+				clocks = <&gate_clk 2>;
+				status = "disabled";
+			};
+		};
+	};
+
+	ocp at f1000000 {
+		pinctrl: pinctrl at 10000 {
+			compatible = "marvell,88f6192-pinctrl";
+			reg = <0x10000 0x20>;
+
+			pmx_nand: pmx-nand {
+				marvell,pins = "mpp0", "mpp1", "mpp2", "mpp3",
+					       "mpp4", "mpp5", "mpp18",
+					       "mpp19";
+				marvell,function = "nand";
+			};
+			pmx_sata0: pmx-sata0 {
+				marvell,pins = "mpp5", "mpp21", "mpp23";
+				marvell,function = "sata0";
+			};
+			pmx_sata1: pmx-sata1 {
+				marvell,pins = "mpp4", "mpp20", "mpp22";
+				marvell,function = "sata1";
+			};
+			pmx_spi: pmx-spi {
+				marvell,pins = "mpp0", "mpp1", "mpp2", "mpp3";
+				marvell,function = "spi";
+			};
+			pmx_twsi0: pmx-twsi0 {
+				marvell,pins = "mpp8", "mpp9";
+				marvell,function = "twsi0";
+			};
+			pmx_uart0: pmx-uart0 {
+				marvell,pins = "mpp10", "mpp11";
+				marvell,function = "uart0";
+			};
+			pmx_uart1: pmx-uart1 {
+				marvell,pins = "mpp13", "mpp14";
+				marvell,function = "uart1";
+			};
+			pmx_sdio: pmx-sdio {
+				marvell,pins = "mpp12", "mpp13", "mpp14",
+					       "mpp15", "mpp16", "mpp17";
+				marvell,function = "sdio";
+			};
+		};
+
+		rtc at 10300 {
+			compatible = "marvell,kirkwood-rtc", "marvell,orion-rtc";
+			reg = <0x10300 0x20>;
+			interrupts = <53>;
+			clocks = <&gate_clk 7>;
+		};
+
+		sata at 80000 {
+			compatible = "marvell,orion-sata";
+			reg = <0x80000 0x5000>;
+			interrupts = <21>;
+			clocks = <&gate_clk 14>, <&gate_clk 15>;
+			clock-names = "0", "1";
+			status = "disabled";
+		};
+
+		mvsdio at 90000 {
+			compatible = "marvell,orion-sdio";
+			reg = <0x90000 0x200>;
+			interrupts = <28>;
+			clocks = <&gate_clk 4>;
+			bus-width = <4>;
+			cap-sdio-irq;
+			cap-sd-highspeed;
+			cap-mmc-highspeed;
+			status = "disabled";
+		};
+	};
+};
-- 
1.8.5.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/2] ARM: Kirkwood: DT board setup for LaPlug
  2013-12-23 15:42 [PATCH 1/2] ARM: Kirkwood: Add 6192 DTSI file Maxime Hadjinlian
@ 2013-12-23 15:42 ` Maxime Hadjinlian
  2013-12-23 15:47   ` Maxime Hadjinlian
  2013-12-23 16:02   ` Andrew Lunn
  2013-12-23 15:56 ` [PATCH 1/2] ARM: Kirkwood: Add 6192 DTSI file Andrew Lunn
  1 sibling, 2 replies; 9+ messages in thread
From: Maxime Hadjinlian @ 2013-12-23 15:42 UTC (permalink / raw)
  To: linux-arm-kernel

This patch adds DT board setup for the LaCie NAS LaPlug.

Chipset list:
- CPU MARVELL 88FR131 800Mhz
- SDRAM memory: 128MB DDR2-800 400Mhz
- 1 Ethernet Gigabit port (PHY MARVELL 88E1318)
- 1 Mini PCI-Express port
- 1 NAND 512 MB
- 1 push button
- 2 LEDs (red and blue)
- 4 USB Ports

Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
---
Changes v1 -> v2:
  - Rename the board from ns-plug to laplug, changes everywhere
    accordingly
  - Retab the files
  - Use defines for GPIO active state and key input's name.
  - Remove #*-cells in gpio-keys as this is not a bus
  - Use kirkwood-6192.dtsi
---
 arch/arm/boot/dts/Makefile            |   1 +
 arch/arm/boot/dts/kirkwood-laplug.dts | 175 ++++++++++++++++++++++++++++++++++
 2 files changed, 176 insertions(+)
 create mode 100644 arch/arm/boot/dts/kirkwood-laplug.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index d57c1a6..4c4ff37 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -85,6 +85,7 @@ dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-cloudbox.dtb \
 	kirkwood-iomega_ix2_200.dtb \
 	kirkwood-is2.dtb \
 	kirkwood-km_kirkwood.dtb \
+	kirkwood-laplug.dtb \
 	kirkwood-lschlv2.dtb \
 	kirkwood-lsxhl.dtb \
 	kirkwood-mplcec4.dtb \
diff --git a/arch/arm/boot/dts/kirkwood-laplug.dts b/arch/arm/boot/dts/kirkwood-laplug.dts
new file mode 100644
index 0000000..cf34eb0
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-laplug.dts
@@ -0,0 +1,175 @@
+/*
+ * Copyright (C) 2013 Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
+ *
+ * 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.
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include "kirkwood.dtsi"
+#include "kirkwood-6192.dtsi"
+
+/ {
+	model = "LaCie LaPlug";
+	compatible = "lacie,laplug", "marvell,kirkwood-88f6192", "marvell,kirkwood";
+
+	memory {
+		device_type = "memory";
+		reg = <0x00000000 0x8000000>; /* 128 MB */
+	};
+
+	chosen {
+		bootargs = "console=ttyS0,115200n8 earlyprintk";
+	};
+
+	mbus {
+		ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000>;
+		pcie-controller {
+			status = "okay";
+			pcie at 1,0 {
+				status = "okay";
+			};
+		};
+	};
+
+	ocp at f1000000 {
+		serial at 12000 {
+			pinctrl-0 = <&pmx_uart0>;
+			pinctrl-names = "default";
+			status = "okay";
+		};
+
+		i2c at 11000 {
+			pinctrl-0 = <&pmx_twsi0>;
+			pinctrl-names = "default";
+			status = "okay";
+
+			eeprom at 50 {
+				compatible = "at,24c04";
+				pagesize = <16>;
+				reg = <0x50>;
+			};
+		};
+
+		pinctrl: pinctrl at 10000 {
+			pmx_usb_power_enable: pmx-usb-power-enable {
+				marvell,pins = "mpp14";
+				marvell,function = "gpio";
+			};
+		};
+	};
+
+	gpio_keys {
+		compatible = "gpio-keys";
+
+		button at 1{
+			label = "Power push button";
+			linux,code = <KEY_POWER>;
+			gpios = <&gpio1 0 GPIO_ACTIVE_HIGH>;
+		};
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		red-fail {
+			label = "laplug_v2:red:power";
+			gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
+		};
+		blue-power {
+			label = "laplug_v2:blue:power";
+			gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>;
+			linux,default-trigger = "default-on";
+		};
+	};
+
+	gpio_poweroff {
+		compatible = "gpio-poweroff";
+		gpios = <&gpio0 31 GPIO_ACTIVE_HIGH>;
+	};
+
+	regulators {
+		compatible = "simple-bus";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		pinctrl-0 = <&pmx_usb_power_enable>;
+		pinctrl-names = "default";
+
+		usb_power_back1: regulator at 1 {
+			compatible = "regulator-fixed";
+			reg = <1>;
+			regulator-name = "USB Power Back 1";
+			regulator-min-microvolt = <5000000>;
+			regulator-max-microvolt = <5000000>;
+			enable-active-high;
+			regulator-always-on;
+			regulator-boot-on;
+			gpio = <&gpio0 15 GPIO_ACTIVE_HIGH>;
+		};
+
+		usb_power_back2: regulator at 2 {
+			compatible = "regulator-fixed";
+			reg = <2>;
+			regulator-name = "USB Power Back 2";
+			regulator-min-microvolt = <5000000>;
+			regulator-max-microvolt = <5000000>;
+			enable-active-high;
+			regulator-always-on;
+			regulator-boot-on;
+			gpio = <&gpio0 28 GPIO_ACTIVE_HIGH>;
+		};
+
+		usb_power_front: regulator at 3 {
+			compatible = "regulator-fixed";
+			reg = <3>;
+			regulator-name = "USB Power Front";
+			regulator-min-microvolt = <5000000>;
+			regulator-max-microvolt = <5000000>;
+			enable-active-high;
+			regulator-always-on;
+			regulator-boot-on;
+			gpio = <&gpio1 3 GPIO_ACTIVE_HIGH>;
+		};
+	};
+};
+
+&nand {
+	/* Total size : 512MB */
+	status = "okay";
+
+	partition at 0 {
+		label = "u-boot";
+		reg = <0x0 0x100000>; /* 1MB */
+		read-only;
+	};
+
+	partition at 100000 {
+		label = "uImage";
+		reg = <0x100000 0x1000000>; /* 16MB */
+	};
+
+	partition at 1100000 {
+		label = "rootfs";
+		reg = <0x1100000 0x1EF00000>; /* 495MB */
+	};
+};
+
+&mdio {
+	status = "okay";
+
+	ethphy0: ethernet-phy at 0 {
+		device_type = "ethernet-phy";
+		reg = <0>;
+	};
+};
+
+&eth0 {
+	status = "okay";
+	ethernet0-port at 0 {
+		phy-handle = <&ethphy0>;
+	};
+};
-- 
1.8.5.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/2] ARM: Kirkwood: DT board setup for LaPlug
  2013-12-23 15:42 ` [PATCH 2/2] ARM: Kirkwood: DT board setup for LaPlug Maxime Hadjinlian
@ 2013-12-23 15:47   ` Maxime Hadjinlian
  2013-12-23 16:05     ` Andrew Lunn
  2013-12-23 16:48     ` Ezequiel Garcia
  2013-12-23 16:02   ` Andrew Lunn
  1 sibling, 2 replies; 9+ messages in thread
From: Maxime Hadjinlian @ 2013-12-23 15:47 UTC (permalink / raw)
  To: linux-arm-kernel

I have a slight issue which I could not resolve regarding the Hynix
NAND on this platform. Although it worked perfectly well with 3.12,
the device is not detected  anymore with the current head of master.

There is no warning nor bug that I could find. It just not detected.
Since I don't really know how to debug this, maybe doing git bisect ?
Some advice would be greatly welcomed !

On Mon, Dec 23, 2013 at 4:42 PM, Maxime Hadjinlian
<maxime.hadjinlian@gmail.com> wrote:
> This patch adds DT board setup for the LaCie NAS LaPlug.
>
> Chipset list:
> - CPU MARVELL 88FR131 800Mhz
> - SDRAM memory: 128MB DDR2-800 400Mhz
> - 1 Ethernet Gigabit port (PHY MARVELL 88E1318)
> - 1 Mini PCI-Express port
> - 1 NAND 512 MB
> - 1 push button
> - 2 LEDs (red and blue)
> - 4 USB Ports
>
> Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
> ---
> Changes v1 -> v2:
>   - Rename the board from ns-plug to laplug, changes everywhere
>     accordingly
>   - Retab the files
>   - Use defines for GPIO active state and key input's name.
>   - Remove #*-cells in gpio-keys as this is not a bus
>   - Use kirkwood-6192.dtsi
> ---
>  arch/arm/boot/dts/Makefile            |   1 +
>  arch/arm/boot/dts/kirkwood-laplug.dts | 175 ++++++++++++++++++++++++++++++++++
>  2 files changed, 176 insertions(+)
>  create mode 100644 arch/arm/boot/dts/kirkwood-laplug.dts
>
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index d57c1a6..4c4ff37 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -85,6 +85,7 @@ dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-cloudbox.dtb \
>         kirkwood-iomega_ix2_200.dtb \
>         kirkwood-is2.dtb \
>         kirkwood-km_kirkwood.dtb \
> +       kirkwood-laplug.dtb \
>         kirkwood-lschlv2.dtb \
>         kirkwood-lsxhl.dtb \
>         kirkwood-mplcec4.dtb \
> diff --git a/arch/arm/boot/dts/kirkwood-laplug.dts b/arch/arm/boot/dts/kirkwood-laplug.dts
> new file mode 100644
> index 0000000..cf34eb0
> --- /dev/null
> +++ b/arch/arm/boot/dts/kirkwood-laplug.dts
> @@ -0,0 +1,175 @@
> +/*
> + * Copyright (C) 2013 Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
> + *
> + * 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.
> + */
> +
> +/dts-v1/;
> +
> +#include <dt-bindings/gpio/gpio.h>
> +#include <dt-bindings/input/input.h>
> +#include "kirkwood.dtsi"
> +#include "kirkwood-6192.dtsi"
> +
> +/ {
> +       model = "LaCie LaPlug";
> +       compatible = "lacie,laplug", "marvell,kirkwood-88f6192", "marvell,kirkwood";
> +
> +       memory {
> +               device_type = "memory";
> +               reg = <0x00000000 0x8000000>; /* 128 MB */
> +       };
> +
> +       chosen {
> +               bootargs = "console=ttyS0,115200n8 earlyprintk";
> +       };
> +
> +       mbus {
> +               ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000>;
> +               pcie-controller {
> +                       status = "okay";
> +                       pcie at 1,0 {
> +                               status = "okay";
> +                       };
> +               };
> +       };
> +
> +       ocp at f1000000 {
> +               serial at 12000 {
> +                       pinctrl-0 = <&pmx_uart0>;
> +                       pinctrl-names = "default";
> +                       status = "okay";
> +               };
> +
> +               i2c at 11000 {
> +                       pinctrl-0 = <&pmx_twsi0>;
> +                       pinctrl-names = "default";
> +                       status = "okay";
> +
> +                       eeprom at 50 {
> +                               compatible = "at,24c04";
> +                               pagesize = <16>;
> +                               reg = <0x50>;
> +                       };
> +               };
> +
> +               pinctrl: pinctrl at 10000 {
> +                       pmx_usb_power_enable: pmx-usb-power-enable {
> +                               marvell,pins = "mpp14";
> +                               marvell,function = "gpio";
> +                       };
> +               };
> +       };
> +
> +       gpio_keys {
> +               compatible = "gpio-keys";
> +
> +               button at 1{
> +                       label = "Power push button";
> +                       linux,code = <KEY_POWER>;
> +                       gpios = <&gpio1 0 GPIO_ACTIVE_HIGH>;
> +               };
> +       };
> +
> +       gpio-leds {
> +               compatible = "gpio-leds";
> +
> +               red-fail {
> +                       label = "laplug_v2:red:power";
> +                       gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
> +               };
> +               blue-power {
> +                       label = "laplug_v2:blue:power";
> +                       gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>;
> +                       linux,default-trigger = "default-on";
> +               };
> +       };
> +
> +       gpio_poweroff {
> +               compatible = "gpio-poweroff";
> +               gpios = <&gpio0 31 GPIO_ACTIVE_HIGH>;
> +       };
> +
> +       regulators {
> +               compatible = "simple-bus";
> +               #address-cells = <1>;
> +               #size-cells = <0>;
> +               pinctrl-0 = <&pmx_usb_power_enable>;
> +               pinctrl-names = "default";
> +
> +               usb_power_back1: regulator at 1 {
> +                       compatible = "regulator-fixed";
> +                       reg = <1>;
> +                       regulator-name = "USB Power Back 1";
> +                       regulator-min-microvolt = <5000000>;
> +                       regulator-max-microvolt = <5000000>;
> +                       enable-active-high;
> +                       regulator-always-on;
> +                       regulator-boot-on;
> +                       gpio = <&gpio0 15 GPIO_ACTIVE_HIGH>;
> +               };
> +
> +               usb_power_back2: regulator at 2 {
> +                       compatible = "regulator-fixed";
> +                       reg = <2>;
> +                       regulator-name = "USB Power Back 2";
> +                       regulator-min-microvolt = <5000000>;
> +                       regulator-max-microvolt = <5000000>;
> +                       enable-active-high;
> +                       regulator-always-on;
> +                       regulator-boot-on;
> +                       gpio = <&gpio0 28 GPIO_ACTIVE_HIGH>;
> +               };
> +
> +               usb_power_front: regulator at 3 {
> +                       compatible = "regulator-fixed";
> +                       reg = <3>;
> +                       regulator-name = "USB Power Front";
> +                       regulator-min-microvolt = <5000000>;
> +                       regulator-max-microvolt = <5000000>;
> +                       enable-active-high;
> +                       regulator-always-on;
> +                       regulator-boot-on;
> +                       gpio = <&gpio1 3 GPIO_ACTIVE_HIGH>;
> +               };
> +       };
> +};
> +
> +&nand {
> +       /* Total size : 512MB */
> +       status = "okay";
> +
> +       partition at 0 {
> +               label = "u-boot";
> +               reg = <0x0 0x100000>; /* 1MB */
> +               read-only;
> +       };
> +
> +       partition at 100000 {
> +               label = "uImage";
> +               reg = <0x100000 0x1000000>; /* 16MB */
> +       };
> +
> +       partition at 1100000 {
> +               label = "rootfs";
> +               reg = <0x1100000 0x1EF00000>; /* 495MB */
> +       };
> +};
> +
> +&mdio {
> +       status = "okay";
> +
> +       ethphy0: ethernet-phy at 0 {
> +               device_type = "ethernet-phy";
> +               reg = <0>;
> +       };
> +};
> +
> +&eth0 {
> +       status = "okay";
> +       ethernet0-port at 0 {
> +               phy-handle = <&ethphy0>;
> +       };
> +};
> --
> 1.8.5.1
>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/2] ARM: Kirkwood: Add 6192 DTSI file
  2013-12-23 15:42 [PATCH 1/2] ARM: Kirkwood: Add 6192 DTSI file Maxime Hadjinlian
  2013-12-23 15:42 ` [PATCH 2/2] ARM: Kirkwood: DT board setup for LaPlug Maxime Hadjinlian
@ 2013-12-23 15:56 ` Andrew Lunn
  2013-12-23 16:04   ` Maxime Hadjinlian
  1 sibling, 1 reply; 9+ messages in thread
From: Andrew Lunn @ 2013-12-23 15:56 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Dec 23, 2013 at 04:42:25PM +0100, Maxime Hadjinlian wrote:
> This file is mainly a copy of kirkwood-6281.dtsi.
> The pinctrl seems to be the same.
> These platforms differs only with their CPU, memory capabilities and the
> number of GPIO available (36 on 6192, 50 on 6281).
> 
> Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
> ---
>  arch/arm/boot/dts/kirkwood-6192.dtsi | 107 +++++++++++++++++++++++++++++++++++
>  1 file changed, 107 insertions(+)
>  create mode 100644 arch/arm/boot/dts/kirkwood-6192.dtsi

Hi Maxime

Jason recently sorted both 6181 and 6182. It would be nice if this
file also used the same order. Take a look Jason's DT branch.

Thanks
     Andrew

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 2/2] ARM: Kirkwood: DT board setup for LaPlug
  2013-12-23 15:42 ` [PATCH 2/2] ARM: Kirkwood: DT board setup for LaPlug Maxime Hadjinlian
  2013-12-23 15:47   ` Maxime Hadjinlian
@ 2013-12-23 16:02   ` Andrew Lunn
  1 sibling, 0 replies; 9+ messages in thread
From: Andrew Lunn @ 2013-12-23 16:02 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Dec 23, 2013 at 04:42:26PM +0100, Maxime Hadjinlian wrote:
> This patch adds DT board setup for the LaCie NAS LaPlug.
> 
> Chipset list:
> - CPU MARVELL 88FR131 800Mhz
> - SDRAM memory: 128MB DDR2-800 400Mhz
> - 1 Ethernet Gigabit port (PHY MARVELL 88E1318)
> - 1 Mini PCI-Express port
> - 1 NAND 512 MB
> - 1 push button
> - 2 LEDs (red and blue)
> - 4 USB Ports
> 
> Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
> ---
> Changes v1 -> v2:
>   - Rename the board from ns-plug to laplug, changes everywhere
>     accordingly
>   - Retab the files
>   - Use defines for GPIO active state and key input's name.
>   - Remove #*-cells in gpio-keys as this is not a bus
>   - Use kirkwood-6192.dtsi
> ---
>  arch/arm/boot/dts/Makefile            |   1 +
>  arch/arm/boot/dts/kirkwood-laplug.dts | 175 ++++++++++++++++++++++++++++++++++
>  2 files changed, 176 insertions(+)
>  create mode 100644 arch/arm/boot/dts/kirkwood-laplug.dts
> 
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index d57c1a6..4c4ff37 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -85,6 +85,7 @@ dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-cloudbox.dtb \
>  	kirkwood-iomega_ix2_200.dtb \
>  	kirkwood-is2.dtb \
>  	kirkwood-km_kirkwood.dtb \
> +	kirkwood-laplug.dtb \
>  	kirkwood-lschlv2.dtb \
>  	kirkwood-lsxhl.dtb \
>  	kirkwood-mplcec4.dtb \
> diff --git a/arch/arm/boot/dts/kirkwood-laplug.dts b/arch/arm/boot/dts/kirkwood-laplug.dts
> new file mode 100644
> index 0000000..cf34eb0
> --- /dev/null
> +++ b/arch/arm/boot/dts/kirkwood-laplug.dts
> @@ -0,0 +1,175 @@
> +/*
> + * Copyright (C) 2013 Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
> + *
> + * 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.
> + */
> +
> +/dts-v1/;
> +
> +#include <dt-bindings/gpio/gpio.h>
> +#include <dt-bindings/input/input.h>
> +#include "kirkwood.dtsi"
> +#include "kirkwood-6192.dtsi"

Hi Maxime

Thanks for the v2. Looks good.

When using Jason's DT branch, the includes for gpio and input are no
longer needed, kirkwood.dtsi has them.

> +
> +/ {
> +	model = "LaCie LaPlug";
> +	compatible = "lacie,laplug", "marvell,kirkwood-88f6192", "marvell,kirkwood";
> +
> +	memory {
> +		device_type = "memory";
> +		reg = <0x00000000 0x8000000>; /* 128 MB */
> +	};
> +
> +	chosen {
> +		bootargs = "console=ttyS0,115200n8 earlyprintk";
> +	};
> +
> +	mbus {
> +		ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000>;
> +		pcie-controller {
> +			status = "okay";
> +			pcie at 1,0 {
> +				status = "okay";
> +			};
> +		};
> +	};
> +
> +	ocp at f1000000 {
> +		serial at 12000 {
> +			pinctrl-0 = <&pmx_uart0>;
> +			pinctrl-names = "default";
> +			status = "okay";
> +		};
> +
> +		i2c at 11000 {
> +			pinctrl-0 = <&pmx_twsi0>;
> +			pinctrl-names = "default";
> +			status = "okay";
> +
> +			eeprom at 50 {
> +				compatible = "at,24c04";
> +				pagesize = <16>;
> +				reg = <0x50>;
> +			};
> +		};
> +
> +		pinctrl: pinctrl at 10000 {
> +			pmx_usb_power_enable: pmx-usb-power-enable {
> +				marvell,pins = "mpp14";
> +				marvell,function = "gpio";
> +			};
> +		};
> +	};
> +
> +	gpio_keys {
> +		compatible = "gpio-keys";
> +
> +		button at 1{
> +			label = "Power push button";
> +			linux,code = <KEY_POWER>;
> +			gpios = <&gpio1 0 GPIO_ACTIVE_HIGH>;
> +		};
> +	};
> +
> +	gpio-leds {
> +		compatible = "gpio-leds";
> +
> +		red-fail {
> +			label = "laplug_v2:red:power";
> +			gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
> +		};
> +		blue-power {
> +			label = "laplug_v2:blue:power";
> +			gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>;
> +			linux,default-trigger = "default-on";
> +		};
> +	};
> +
> +	gpio_poweroff {
> +		compatible = "gpio-poweroff";
> +		gpios = <&gpio0 31 GPIO_ACTIVE_HIGH>;
> +	};
> +
> +	regulators {
> +		compatible = "simple-bus";
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +		pinctrl-0 = <&pmx_usb_power_enable>;
> +		pinctrl-names = "default";
> +
> +		usb_power_back1: regulator at 1 {
> +			compatible = "regulator-fixed";
> +			reg = <1>;
> +			regulator-name = "USB Power Back 1";
> +			regulator-min-microvolt = <5000000>;
> +			regulator-max-microvolt = <5000000>;
> +			enable-active-high;
> +			regulator-always-on;
> +			regulator-boot-on;
> +			gpio = <&gpio0 15 GPIO_ACTIVE_HIGH>;
> +		};
> +
> +		usb_power_back2: regulator at 2 {
> +			compatible = "regulator-fixed";
> +			reg = <2>;
> +			regulator-name = "USB Power Back 2";
> +			regulator-min-microvolt = <5000000>;
> +			regulator-max-microvolt = <5000000>;
> +			enable-active-high;
> +			regulator-always-on;
> +			regulator-boot-on;
> +			gpio = <&gpio0 28 GPIO_ACTIVE_HIGH>;
> +		};
> +
> +		usb_power_front: regulator at 3 {
> +			compatible = "regulator-fixed";
> +			reg = <3>;
> +			regulator-name = "USB Power Front";
> +			regulator-min-microvolt = <5000000>;
> +			regulator-max-microvolt = <5000000>;
> +			enable-active-high;
> +			regulator-always-on;
> +			regulator-boot-on;
> +			gpio = <&gpio1 3 GPIO_ACTIVE_HIGH>;
> +		};
> +	};
> +};
> +
> +&nand {
> +	/* Total size : 512MB */
> +	status = "okay";
> +
> +	partition at 0 {
> +		label = "u-boot";
> +		reg = <0x0 0x100000>; /* 1MB */
> +		read-only;
> +	};
> +
> +	partition at 100000 {
> +		label = "uImage";
> +		reg = <0x100000 0x1000000>; /* 16MB */
> +	};
> +
> +	partition at 1100000 {
> +		label = "rootfs";
> +		reg = <0x1100000 0x1EF00000>; /* 495MB */
> +	};
> +};
> +
> +&mdio {
> +	status = "okay";
> +
> +	ethphy0: ethernet-phy at 0 {
> +		device_type = "ethernet-phy";
> +		reg = <0>;
> +	};
> +};
> +
> +&eth0 {
> +	status = "okay";
> +	ethernet0-port at 0 {
> +		phy-handle = <&ethphy0>;
> +	};
> +};
> -- 
> 1.8.5.1
> 

Acked-by: Andrew Lunn <andrew@lunn.ch>

Thanks
	Andrew

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/2] ARM: Kirkwood: Add 6192 DTSI file
  2013-12-23 15:56 ` [PATCH 1/2] ARM: Kirkwood: Add 6192 DTSI file Andrew Lunn
@ 2013-12-23 16:04   ` Maxime Hadjinlian
  0 siblings, 0 replies; 9+ messages in thread
From: Maxime Hadjinlian @ 2013-12-23 16:04 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Dec 23, 2013 at 4:56 PM, Andrew Lunn <andrew@lunn.ch> wrote:
> On Mon, Dec 23, 2013 at 04:42:25PM +0100, Maxime Hadjinlian wrote:
>> This file is mainly a copy of kirkwood-6281.dtsi.
>> The pinctrl seems to be the same.
>> These platforms differs only with their CPU, memory capabilities and the
>> number of GPIO available (36 on 6192, 50 on 6281).
>>
>> Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
>> ---
>>  arch/arm/boot/dts/kirkwood-6192.dtsi | 107 +++++++++++++++++++++++++++++++++++
>>  1 file changed, 107 insertions(+)
>>  create mode 100644 arch/arm/boot/dts/kirkwood-6192.dtsi
>
> Hi Maxime
Hi Andrew
>
> Jason recently sorted both 6181 and 6182. It would be nice if this
> file also used the same order. Take a look Jason's DT branch.
Sure thing, could you please give a link to Jason's branch ?
>
> Thanks
>      Andrew

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 2/2] ARM: Kirkwood: DT board setup for LaPlug
  2013-12-23 15:47   ` Maxime Hadjinlian
@ 2013-12-23 16:05     ` Andrew Lunn
  2013-12-23 16:48     ` Ezequiel Garcia
  1 sibling, 0 replies; 9+ messages in thread
From: Andrew Lunn @ 2013-12-23 16:05 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Dec 23, 2013 at 04:47:34PM +0100, Maxime Hadjinlian wrote:
> I have a slight issue which I could not resolve regarding the Hynix
> NAND on this platform. Although it worked perfectly well with 3.12,
> the device is not detected  anymore with the current head of master.
> 
> There is no warning nor bug that I could find. It just not detected.
> Since I don't really know how to debug this, maybe doing git bisect ?
> Some advice would be greatly welcomed !

Hi Maxime

git bisect sounds like the right thing to do. Once we know which patch
introduced the issue it becomes a lot easier to fix.

	   Thanks
		Andrew

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 2/2] ARM: Kirkwood: DT board setup for LaPlug
  2013-12-23 15:47   ` Maxime Hadjinlian
  2013-12-23 16:05     ` Andrew Lunn
@ 2013-12-23 16:48     ` Ezequiel Garcia
  2013-12-24 11:17       ` Maxime Hadjinlian
  1 sibling, 1 reply; 9+ messages in thread
From: Ezequiel Garcia @ 2013-12-23 16:48 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Maxime,

On Mon, Dec 23, 2013 at 04:47:34PM +0100, Maxime Hadjinlian wrote:
> I have a slight issue which I could not resolve regarding the Hynix
> NAND on this platform. Although it worked perfectly well with 3.12,
> the device is not detected  anymore with the current head of master.
>

If you do a "git log v3.12..v3.13-rc4 -- drivers/mtd/nand/orion_nand.c"
you'll see that no changes have been made.

So maybe this new dts v2 is the problem. And if you look in detail you'll
find you've been bitten by the subtleties of the devicetree!

See below...

> > +       mbus {
> > +               ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000>;
> > +               pcie-controller {
> > +                       status = "okay";
> > +                       pcie at 1,0 {
> > +                               status = "okay";
> > +                       };
> > +               };
> > +       };

^^^^
Here's the problem: there's two wrong things with the above:

1. You can't do this... a ranges properties doesn't add on the included
(dtsi) ranges properties. Instead it replaces the included one, so you have
to write the entries all over again.

Yes, we know: it sucks! And given we know it sucks, there was a nice
message warning you about this. From the kirkwood.dtsi

	/* If a board file needs to change this ranges it must replace it completely */
	ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000	/* internal-regs */
		  MBUS_ID(0x01, 0x2f) 0 0xf4000000 0x10000	/* nand flash */
		  MBUS_ID(0x03, 0x01) 0 0xf5000000 0x10000	/* crypto sram */
	  >;

2. Looking in yet more detail, you're re-adding the internal-regs window.
I guess it's just a typo, no?

Anyway, I *think* that's what prevented you from getting the NAND to
work. The correct mbus node should be:

	mbus {
		pcie-controller {
			status = "okay";
			pcie at 1,0 {
				status = "okay";
			};
		};
	};

> > +&nand {
> > +       /* Total size : 512MB */
> > +       status = "okay";
> > +

And here: don't you need to add the pinmuxing? Maybe you don't need it,
but I guess it's the right thing to do.

I hope this helps!

Merry Christmas...
-- 
Ezequiel Garc?a, Free Electrons
Embedded Linux, Kernel and Android Engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 2/2] ARM: Kirkwood: DT board setup for LaPlug
  2013-12-23 16:48     ` Ezequiel Garcia
@ 2013-12-24 11:17       ` Maxime Hadjinlian
  0 siblings, 0 replies; 9+ messages in thread
From: Maxime Hadjinlian @ 2013-12-24 11:17 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Dec 23, 2013 at 5:48 PM, Ezequiel Garcia
<ezequiel.garcia@free-electrons.com> wrote:
> Hi Maxime,
Hi Ezequiel
>
> On Mon, Dec 23, 2013 at 04:47:34PM +0100, Maxime Hadjinlian wrote:
>> I have a slight issue which I could not resolve regarding the Hynix
>> NAND on this platform. Although it worked perfectly well with 3.12,
>> the device is not detected  anymore with the current head of master.
>>
>
> If you do a "git log v3.12..v3.13-rc4 -- drivers/mtd/nand/orion_nand.c"
> you'll see that no changes have been made.
>
> So maybe this new dts v2 is the problem. And if you look in detail you'll
> find you've been bitten by the subtleties of the devicetree!
>
> See below...
>
>> > +       mbus {
>> > +               ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000>;
>> > +               pcie-controller {
>> > +                       status = "okay";
>> > +                       pcie at 1,0 {
>> > +                               status = "okay";
>> > +                       };
>> > +               };
>> > +       };
>
> ^^^^
> Here's the problem: there's two wrong things with the above:
>
> 1. You can't do this... a ranges properties doesn't add on the included
> (dtsi) ranges properties. Instead it replaces the included one, so you have
> to write the entries all over again.
>
> Yes, we know: it sucks! And given we know it sucks, there was a nice
> message warning you about this. From the kirkwood.dtsi
>
>         /* If a board file needs to change this ranges it must replace it completely */
>         ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000     /* internal-regs */
>                   MBUS_ID(0x01, 0x2f) 0 0xf4000000 0x10000      /* nand flash */
>                   MBUS_ID(0x03, 0x01) 0 0xf5000000 0x10000      /* crypto sram */
>           >;
>
> 2. Looking in yet more detail, you're re-adding the internal-regs window.
> I guess it's just a typo, no?
>
> Anyway, I *think* that's what prevented you from getting the NAND to
> work. The correct mbus node should be:
>
>         mbus {
>                 pcie-controller {
>                         status = "okay";
>                         pcie at 1,0 {
>                                 status = "okay";
>                         };
>                 };
>         };
>
>> > +&nand {
>> > +       /* Total size : 512MB */
>> > +       status = "okay";
>> > +
>
> And here: don't you need to add the pinmuxing? Maybe you don't need it,
> but I guess it's the right thing to do.
>
> I hope this helps!
That was it ! Thank you very much, I will resend a v3. Thank you very much.
I will be more carefarch/arm/boot/dts/kirkwood-laplug.dtsull about
this next time.
>
> Merry Christmas...
Merry Christmas to you.
> --
> Ezequiel Garc?a, Free Electrons
> Embedded Linux, Kernel and Android Engineering
> http://free-electrons.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-12-24 11:17 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-23 15:42 [PATCH 1/2] ARM: Kirkwood: Add 6192 DTSI file Maxime Hadjinlian
2013-12-23 15:42 ` [PATCH 2/2] ARM: Kirkwood: DT board setup for LaPlug Maxime Hadjinlian
2013-12-23 15:47   ` Maxime Hadjinlian
2013-12-23 16:05     ` Andrew Lunn
2013-12-23 16:48     ` Ezequiel Garcia
2013-12-24 11:17       ` Maxime Hadjinlian
2013-12-23 16:02   ` Andrew Lunn
2013-12-23 15:56 ` [PATCH 1/2] ARM: Kirkwood: Add 6192 DTSI file Andrew Lunn
2013-12-23 16:04   ` Maxime Hadjinlian

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).