code:
// SPDX-License-Identifier: GPL-2.0
/dts-v1/;

#include "kirkwood.dtsi"
#include "kirkwood-98dx4122.dtsi"
#include "kirkwood-km_common.dtsi"

/ {
	model = "Keymile Kirkwood Fixed Eth";
	compatible = "keymile,km_fixedeth", "marvell,kirkwood-98DX4122", "marvell,kirkwood";

	memory {
		device_type = "memory";
		reg = <0x00000000 0x10000000>;
	};
};

&eth0 {
	status = "okay";
	ethernet0-port@0 {
		speed = <1000>;  /* <SPEED_1000> */
		duplex = <1>; /* <DUPLEX_FULL> */
	};
};


code:
// SPDX-License-Identifier: GPL-2.0
/dts-v1/;

#include "kirkwood.dtsi"
#include "kirkwood-98dx4122.dtsi"
#include "kirkwood-km_common.dtsi"

/ {
	model = "Keymile Kirkwood Reference Design";
	compatible = "keymile,km_kirkwood", "marvell,kirkwood-98DX4122", "marvell,kirkwood";

	memory {
		device_type = "memory";
		reg = <0x00000000 0x08000000>;
	};
};

&mdio {
	status = "okay";

	ethphy0: ethernet-phy@0 {
		reg = <0>;
	};
};

&eth0 {
	status = "okay";
	ethernet0-port@0 {
		phy-handle = <&ethphy0>;
	};
};

repo_name: angery/linux


code:
// SPDX-License-Identifier: GPL-2.0
/*
 * Check Point L-50 Board Description
 * Copyright 2020 Pawel Dembicki <paweldembicki@gmail.com>
 */

/dts-v1/;

#include "kirkwood.dtsi"
#include "kirkwood-6281.dtsi"

/ {
	model = "Check Point L-50";
	compatible = "checkpoint,l-50", "marvell,kirkwood-88f6281", "marvell,kirkwood";

	memory {
		device_type = "memory";
		reg = <0x00000000 0x20000000>;
	};

	chosen {
		bootargs = "console=ttyS0,115200n8";
		stdout-path = &uart0;
	};

	ocp@f1000000 {
		pinctrl: pin-controller@10000 {
			pinctrl-0 = <&pmx_led38 &pmx_sysrst &pmx_button29>;
			pinctrl-names = "default";

			pmx_sysrst: pmx-sysrst {
				marvell,pins = "mpp6";
				marvell,function = "sysrst";
			};

			pmx_button29: pmx_button29 {
				marvell,pins = "mpp29";
				marvell,function = "gpio";
			};

			pmx_led38: pmx_led38 {
				marvell,pins = "mpp38";
				marvell,function = "gpio";
			};

			pmx_sdio_cd: pmx-sdio-cd {
				marvell,pins = "mpp46";
				marvell,function = "gpio";
			};
		};

		serial@12000 {
			status = "okay";
		};

		mvsdio@90000 {
			status = "okay";
			cd-gpios = <&gpio1 14 9>;
		};

		i2c@11000 {
			status = "okay";
			clock-frequency = <400000>;

			gpio2: gpio-expander@20{
				#gpio-cells = <2>;
				#interrupt-cells = <2>;
				compatible = "semtech,sx1505q";
				reg = <0x20>;

				gpio-controller;
			};

			/* Three GPIOs from 0x21 exp. are undescribed in dts:
			 * 1: DSL module reset (active low)
			 * 5: mPCIE reset (active low)
			 * 6: Express card reset (active low)
			 */
			gpio3: gpio-expander@21{
				#gpio-cells = <2>;
				#interrupt-cells = <2>;
				compatible = "semtech,sx1505q";
				reg = <0x21>;

				gpio-controller;
			};

			rtc@30 {
				compatible = "s35390a";
				reg = <0x30>;
			};
		};
	};

	leds {
		compatible = "gpio-leds";

		status_green {
			label = "l-50:green:status";
			gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
		};

		status_red {
			label = "l-50:red:status";
			gpios = <&gpio3 2 GPIO_ACTIVE_LOW>;
		};

		wifi {
			label = "l-50:green:wifi";
			gpios = <&gpio2 7 GPIO_ACTIVE_LOW>;
			linux,default-trigger = "phy0tpt";
		};

		internet_green {
			label = "l-50:green:internet";
			gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
		};

		internet_red {
			label = "l-50:red:internet";
			gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
		};

		usb1_green {
			label = "l-50:green:usb1";
			gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
			linux,default-trigger = "usbport";
			trigger-sources = <&hub_port3>;
		};

		usb1_red {
			label = "l-50:red:usb1";
			gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
		};

		usb2_green {
			label = "l-50:green:usb2";
			gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
			linux,default-trigger = "usbport";
			trigger-sources = <&hub_port1>;
		};

		usb2_red {
			label = "l-50:red:usb2";
			gpios = <&gpio2 5 GPIO_ACTIVE_LOW>;
		};
	};

	usb2_pwr {
		compatible = "regulator-fixed";
		regulator-name = "usb2_pwr";

		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;
		gpio = <&gpio3 3 GPIO_ACTIVE_LOW>;
		regulator-always-on;
	};

	usb1_pwr {
		compatible = "regulator-fixed";
		regulator-name = "usb1_pwr";

		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;
		gpio = <&gpio3 4 GPIO_ACTIVE_LOW>;
		regulator-always-on;
	};

	mpcie_pwr {
		compatible = "regulator-fixed";
		regulator-name = "mpcie_pwr";

		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
		gpio = <&gpio3 5 GPIO_ACTIVE_HIGH>;
		enable-active-high;
		regulator-always-on;
	};

	express_card_pwr {
		compatible = "regulator-fixed";
		regulator-name = "express_card_pwr";

		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
		gpio = <&gpio3 7 GPIO_ACTIVE_HIGH>;
		enable-active-high;
		regulator-always-on;
	};

	keys {
		compatible = "gpio-keys";

		factory_defaults {
			label = "factory_defaults";
			gpios = <&gpio0 29 GPIO_ACTIVE_LOW>;
			linux,code = <KEY_RESTART>;
		};
	};
};

&mdio {
	status = "okay";

	ethphy8: ethernet-phy@8 {
		reg = <0x08>;
	};

	switch0: switch@10 {
		compatible = "marvell,mv88e6085";
		#address-cells = <1>;
		#size-cells = <0>;
		reg = <0x10>;
		dsa,member = <0 0>;

		ports {
			#address-cells = <1>;
			#size-cells = <0>;

			port@0 {
				reg = <0>;
				label = "lan5";
			};

			port@1 {
				reg = <1>;
				label = "lan1";
			};

			port@2 {
				reg = <2>;
				label = "lan6";
			};

			port@3 {
				reg = <3>;
				label = "lan2";
			};

			port@4 {
				reg = <4>;
				label = "lan7";
			};

			switch0port5: port@5 {
				reg = <5>;
				phy-mode = "rgmii-txid";
				link = <&switch1port5>;
				fixed-link {
					speed = <1000>;
					full-duplex;
				};
			};

			port@6 {
				reg = <6>;
				label = "cpu";
				phy-mode = "rgmii-id";
				ethernet = <&eth1port>;
				fixed-link {
					speed = <1000>;
					full-duplex;
				};
			};
		};
	};

	switch@11 {
		compatible = "marvell,mv88e6085";
		#address-cells = <1>;
		#size-cells = <0>;
		reg = <0x11>;
		dsa,member = <0 1>;

		ports {
			#address-cells = <1>;
			#size-cells = <0>;

			port@0 {
				reg = <0>;
				label = "lan3";
			};

			port@1 {
				reg = <1>;
				label = "lan8";
			};

			port@2 {
				reg = <2>;
				label = "lan4";
			};

			port@3 {
				reg = <3>;
				label = "dmz";
			};

			switch1port5: port@5 {
				reg = <5>;
				phy-mode = "rgmii-txid";
				link = <&switch0port5>;
				fixed-link {
					speed = <1000>;
					full-duplex;
				};
			};

			port@6 {
				reg = <6>;
				label = "dsl";
				fixed-link {
					speed = <100>;
					full-duplex;
				};
			};
		};
	};
};

&eth0 {
	status = "okay";
	ethernet0-port@0 {
		phy-handle = <&ethphy8>;
	};
};

&eth1 {
	status = "okay";
	ethernet1-port@0 {
		speed = <1000>;
		duplex = <1>;
	};
};

&nand {
	status = "okay";
	pinctrl-0 = <&pmx_nand>;
	pinctrl-names = "default";

	partition@0 {
		label = "u-boot";
		reg = <0x00000000 0x000c0000>;
	};

	partition@a0000 {
		label = "bootldr-env";
		reg = <0x000c0000 0x00040000>;
	};

	partition@100000 {
		label = "kernel-1";
		reg = <0x00100000 0x00800000>;
	};

	partition@900000 {
		label = "rootfs-1";
		reg = <0x00900000 0x07100000>;
	};

	partition@7a00000 {
		label = "kernel-2";
		reg = <0x07a00000 0x00800000>;
	};

	partition@8200000 {
		label = "rootfs-2";
		reg = <0x08200000 0x07100000>;
	};

	partition@f300000 {
		label = "default_sw";
		reg = <0x0f300000 0x07900000>;
	};

	partition@16c00000 {
		label = "logs";
		reg = <0x16c00000 0x01800000>;
	};

	partition@18400000 {
		label = "preset_cfg";
		reg = <0x18400000 0x00100000>;
	};

	partition@18500000 {
		label = "adsl";
		reg = <0x18500000 0x00100000>;
	};

	partition@18600000 {
		label = "storage";
		reg = <0x18600000 0x07a00000>;
	};
};

&rtc {
	status = "disabled";
};

&pciec {
	status = "okay";
};

&pcie0 {
	status = "okay";
};

&sata_phy0 {
	status = "disabled";
};

&sata_phy1 {
	status = "disabled";
};

&usb0 {
	#address-cells = <1>;
	#size-cells = <0>;
	status = "okay";

	port@1 {
		#address-cells = <1>;
		#size-cells = <0>;
		reg = <1>;
		#trigger-source-cells = <0>;

		hub_port1: port@1 {
			reg = <1>;
			#trigger-source-cells = <0>;
		};

		hub_port3: port@3 {
			reg = <3>;
			#trigger-source-cells = <0>;
		};
	};
};


code:
// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (C) 2013 Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
 *
 */

/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";
		stdout-path = &uart0;
	};

	ocp@f1000000 {
		serial@12000 {
			status = "okay";
		};

		i2c@11000 {
			status = "okay";

			eeprom@50 {
				compatible = "atmel,24c04";
				pagesize = <16>;
				reg = <0x50>;
			};
		};

		pinctrl: pin-controller@10000 {
			pmx_usb_power_enable: pmx-usb-power-enable {
				marvell,pins = "mpp14";
				marvell,function = "gpio";
			};
		};
	};

	gpio_keys {
		compatible = "gpio-keys";

		power {
			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@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@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@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@0 {
		label = "u-boot";
		reg = <0x0 0x100000>; /* 1MB */
		read-only;
	};

	partition@100000 {
		label = "uImage";
		reg = <0x100000 0x1000000>; /* 16MB */
	};

	partition@1100000 {
		label = "rootfs";
		reg = <0x1100000 0x1EF00000>; /* 495MB */
	};
};

&mdio {
	status = "okay";

	ethphy0: ethernet-phy@0 {
		device_type = "ethernet-phy";
		reg = <0>;
	};
};

&eth0 {
	status = "okay";
	ethernet0-port@0 {
		phy-handle = <&ethphy0>;
	};
};

&pciec {
	status = "okay";
};

&pcie0 {
	status = "okay";
};


code:
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
 * Device Tree common file for kirkwood-6282 based Buffalo Linkstation
 *
 * Copyright (C) 2015, 2016
 * Roger Shimizu <rogershimizu@gmail.com>
 */

#include "kirkwood.dtsi"
#include "kirkwood-6282.dtsi"
#include "kirkwood-linkstation.dtsi"

/ {
	ocp@f1000000 {
		pinctrl: pin-controller@10000 {
			pmx_power_hdd0: pmx-power-hdd0 {
				marvell,pins = "mpp8";
				marvell,function = "gpio";
			};
			pmx_usb_vbus: pmx-usb-vbus {
				marvell,pins = "mpp12";
				marvell,function = "gpio";
			};
			pmx_fan_high: pmx-fan-high {
				marvell,pins = "mpp16";
				marvell,function = "gpio";
			};
			pmx_fan_low: pmx-fan-low {
				marvell,pins = "mpp17";
				marvell,function = "gpio";
			};
			pmx_led_alarm: pmx-led-alarm {
				marvell,pins = "mpp36";
				marvell,function = "gpio";
			};
			pmx_led_function_red: pmx-led-function-red {
				marvell,pins = "mpp37";
				marvell,function = "gpio";
			};
			pmx_led_info: pmx-led-info {
				marvell,pins = "mpp38";
				marvell,function = "gpio";
			};
			pmx_led_function_blue: pmx-led-function-blue {
				marvell,pins = "mpp39";
				marvell,function = "gpio";
			};
			pmx_led_power: pmx-led-power {
				marvell,pins = "mpp40";
				marvell,function = "gpio";
			};
			pmx_fan_lock: pmx-fan-lock {
				marvell,pins = "mpp43";
				marvell,function = "gpio";
			};
			pmx_button_function: pmx-button-function {
				marvell,pins = "mpp45";
				marvell,function = "gpio";
			};
			pmx_power_switch: pmx-power-switch {
				marvell,pins = "mpp46";
				marvell,function = "gpio";
			};
			pmx_power_auto_switch: pmx-power-auto-switch {
				marvell,pins = "mpp47";
				marvell,function = "gpio";
			};
		};
	};

	gpio_keys {
		function-button {
			gpios = <&gpio1 13 GPIO_ACTIVE_LOW>;
		};

		power-on-switch {
			gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
		};

		power-auto-switch {
			gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
		};
	};

	gpio_leds {
		red-alarm-led {
			label = "linkstation:red:alarm";
			gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>;
		};

		red-function-led {
			label = "linkstation:red:function";
			gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>;
		};

		amber-info-led {
			label = "linkstation:amber:info";
			gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>;
		};

		blue-function-led {
			label = "linkstation:blue:function";
			gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
		};

		blue-power-led {
			label = "linkstation:blue:power";
			gpios = <&gpio1 8 GPIO_ACTIVE_LOW>;
			default-state = "keep";
		};
	};

	gpio_fan {
		compatible = "gpio-fan";
		pinctrl-0 = <&pmx_fan_low &pmx_fan_high &pmx_fan_lock>;
		pinctrl-names = "default";

		gpios = <&gpio0 17 GPIO_ACTIVE_LOW
			 &gpio0 16 GPIO_ACTIVE_LOW>;

		gpio-fan,speed-map = <0 3
				1500 2
				3250 1
				5000 0>;

		alarm-gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>;
	};

	regulators {
		usb_power: regulator@1 {
			gpio = <&gpio0 12 GPIO_ACTIVE_HIGH>;
		};

		hdd_power0: regulator@2 {
			gpio = <&gpio0 8 GPIO_ACTIVE_HIGH>;
		};
	};
};

&mdio {
	status = "okay";

	ethphy0: ethernet-phy@0 {
		device_type = "ethernet-phy";
		reg = <0>;
	};
};

&eth0 {
	status = "okay";

	ethernet0-port@0 {
		phy-handle = <&ethphy0>;
	};
};


code:
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
 * Device Tree common file for kirkwood-6281 based 2-Bay Buffalo Linkstation
 *
 * Copyright (C) 2015, 2016
 * Roger Shimizu <rogershimizu@gmail.com>
 */

#include "kirkwood.dtsi"
#include "kirkwood-6281.dtsi"
#include "kirkwood-linkstation.dtsi"

/ {
	ocp@f1000000 {
		pinctrl: pin-controller@10000 {
			pmx_power_hdd0: pmx-power-hdd0 {
				marvell,pins = "mpp28";
				marvell,function = "gpio";
			};
			pmx_power_hdd1: pmx-power-hdd1 {
				marvell,pins = "mpp29";
				marvell,function = "gpio";
			};
			pmx_usb_vbus: pmx-usb-vbus {
				marvell,pins = "mpp37";
				marvell,function = "gpio";
			};
			pmx_led_alarm: pmx-led-alarm {
				marvell,pins = "mpp49";
				marvell,function = "gpio";
			};
			pmx_led_function_red: pmx-led-function-red {
				marvell,pins = "mpp34";
				marvell,function = "gpio";
			};
			pmx_led_function_blue: pmx-led-function-blue {
				marvell,pins = "mpp36";
				marvell,function = "gpio";
			};
			pmx_led_info: pmx-led-info {
				marvell,pins = "mpp38";
				marvell,function = "gpio";
			};
			pmx_led_power: pmx-led-power {
				marvell,pins = "mpp39";
				marvell,function = "gpio";
			};
			pmx_button_function: pmx-button-function {
				marvell,pins = "mpp41";
				marvell,function = "gpio";
			};
			pmx_power_switch: pmx-power-switch {
				marvell,pins = "mpp42";
				marvell,function = "gpio";
			};
			pmx_power_auto_switch: pmx-power-auto-switch {
				marvell,pins = "mpp43";
				marvell,function = "gpio";
			};
		};

		sata@80000 {
			nr-ports = <2>;
		};
	};

	gpio_keys {
		function-button {
			gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
		};

		power-on-switch {
			gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
		};

		power-auto-switch {
			gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
		};
	};

	gpio_leds {
		red-alarm-led {
			label = "linkstation:red:alarm";
			gpios = <&gpio1 17 GPIO_ACTIVE_LOW>;
		};

		red-function-led {
			label = "linkstation:red:function";
			gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
		};

		amber-info-led {
			label = "linkstation:amber:info";
			gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
		};

		blue-function-led {
			label = "linkstation:blue:function";
			gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
		};

		blue-power-led {
			label = "linkstation:blue:power";
			gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
			default-state = "keep";
		};
	};

	regulators {
		pinctrl-0 = <&pmx_power_hdd0 &pmx_power_hdd1 &pmx_usb_vbus>;

		usb_power: regulator@1 {
			gpio = <&gpio1 5 GPIO_ACTIVE_HIGH>;
		};

		hdd_power0: regulator@2 {
			gpio = <&gpio0 28 GPIO_ACTIVE_HIGH>;
		};

		hdd_power1: regulator@3 {
			compatible = "regulator-fixed";
			reg = <3>;
			regulator-name = "HDD1 Power";
			regulator-min-microvolt = <5000000>;
			regulator-max-microvolt = <5000000>;
			enable-active-high;
			regulator-always-on;
			regulator-boot-on;
			gpio = <&gpio0 29 GPIO_ACTIVE_HIGH>;
		};
	};
};

&mdio {
	status = "okay";

	ethphy1: ethernet-phy@8 {
		device_type = "ethernet-phy";
		reg = <8>;
	};
};

&eth1 {
	status = "okay";

	ethernet1-port@0 {
		phy-handle = <&ethphy1>;
	};
};


code:
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
 * Device Tree file for Buffalo Linkstation LS-QVL
 *
 * Copyright (C) 2016, Mario Lange <mario_lange@gmx.net>
 *
 * Based on kirkwood-linkstation-lswvl.dts,
 * Copyright (C) 2015, 2016
 * Roger Shimizu <rogershimizu@gmail.com>
 */

/dts-v1/;
#include "kirkwood-linkstation-6282.dtsi"

/ {
	model = "Buffalo Linkstation LS-QVL";
	compatible = "buffalo,lsqvl", "marvell,kirkwood-88f6282", "marvell,kirkwood";

	memory { /* 256 MB */
		device_type = "memory";
		reg = <0x00000000 0x10000000>;
	};

	ocp@f1000000 {
		pinctrl: pin-controller@10000 {
			pmx_power_hdd1: pmx-power-hdd1 {
				marvell,pins = "mpp9";
				marvell,function = "gpio";
			};
			pmx_led_hdderr0: pmx-led-hdderr0 {
				marvell,pins = "mpp34";
				marvell,function = "gpio";
			};
			pmx_led_hdderr1: pmx-led-hdderr1 {
				marvell,pins = "mpp35";
				marvell,function = "gpio";
			};
			pmx_led_hdderr2: pmx-led-hdderr2 {
				marvell,pins = "mpp24";
				marvell,function = "gpio";
			};
			pmx_led_hdderr3: pmx-led-hdderr3 {
				marvell,pins = "mpp25";
				marvell,function = "gpio";
			};
		};

		sata@80000 {
			nr-ports = <2>;
		};
	};

	gpio_leds {
		pinctrl-0 = <&pmx_led_function_red &pmx_led_alarm
			     &pmx_led_info &pmx_led_power
			     &pmx_led_function_blue
			     &pmx_led_hdderr0
			     &pmx_led_hdderr1
			     &pmx_led_hdderr2
			     &pmx_led_hdderr3>;

		red-hdderr0-led {
			label = "linkstation:red:hdderr0";
			gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
		};

		red-hdderr1-led {
			label = "linkstation:red:hdderr1";
			gpios = <&gpio1 3 GPIO_ACTIVE_LOW>;
		};

		red-hdderr2-led {
			label = "linkstation:red:hdderr2";
			gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
		};

		red-hdderr3-led {
			label = "linkstation:red:hdderr3";
			gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
		};
	};

	regulators {
		pinctrl-0 = <&pmx_power_hdd0 &pmx_power_hdd1 &pmx_usb_vbus>;

		hdd_power1: regulator@3 {
			compatible = "regulator-fixed";
			reg = <3>;
			regulator-name = "HDD1 Power";
			regulator-min-microvolt = <5000000>;
			regulator-max-microvolt = <5000000>;
			enable-active-high;
			regulator-always-on;
			regulator-boot-on;
			gpio = <&gpio0 9 GPIO_ACTIVE_HIGH>;
		};
	};
};


code:
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
 * Device Tree file for Buffalo Linkstation LS-VL
 *
 * Copyright (C) 2015, 2016
 * Roger Shimizu <rogershimizu@gmail.com>
 */

/dts-v1/;
#include "kirkwood-linkstation-6282.dtsi"

/ {
	model = "Buffalo Linkstation LS-VL";
	compatible = "buffalo,lsvl", "marvell,kirkwood-88f6282", "marvell,kirkwood";

	memory { /* 256 MB */
		device_type = "memory";
		reg = <0x00000000 0x10000000>;
	};
};


code:
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
 * Device Tree file for Buffalo Linkstation LS-WSXL
 *
 * Copyright (C) 2015, 2016
 * Roger Shimizu <rogershimizu@gmail.com>
 */

/dts-v1/;
#include "kirkwood-linkstation-duo-6281.dtsi"

/ {
	model = "Buffalo Linkstation LS-WSXL";
	compatible = "buffalo,lswsxl", "marvell,kirkwood-88f6281", "marvell,kirkwood";

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


code:
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
 * Device Tree file for Buffalo Linkstation LS-WVL
 *
 * Copyright (C) 2015, 2016
 * Roger Shimizu <rogershimizu@gmail.com>
 */

/dts-v1/;
#include "kirkwood-linkstation-6282.dtsi"

/ {
	model = "Buffalo Linkstation LS-WVL";
	compatible = "buffalo,lswvl","marvell,kirkwood-88f6282", "marvell,kirkwood";

	memory { /* 256 MB */
		device_type = "memory";
		reg = <0x00000000 0x10000000>;
	};

	ocp@f1000000 {
		pinctrl: pin-controller@10000 {
			pmx_power_hdd1: pmx-power-hdd1 {
				marvell,pins = "mpp9";
				marvell,function = "gpio";
			};
			pmx_led_hdderr0: pmx-led-hdderr0 {
				marvell,pins = "mpp34";
				marvell,function = "gpio";
			};
			pmx_led_hdderr1: pmx-led-hdderr1 {
				marvell,pins = "mpp35";
				marvell,function = "gpio";
			};
		};

		sata@80000 {
			nr-ports = <2>;
		};
	};

	gpio_leds {
		pinctrl-0 = <&pmx_led_function_red &pmx_led_alarm
			     &pmx_led_info &pmx_led_power
			     &pmx_led_function_blue
			     &pmx_led_hdderr0
			     &pmx_led_hdderr1>;

		red-hdderr0-led {
			label = "linkstation:red:hdderr0";
			gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
		};

		red-hdderr1-led {
			label = "linkstation:red:hdderr1";
			gpios = <&gpio1 3 GPIO_ACTIVE_HIGH>;
		};
	};

	regulators {
		pinctrl-0 = <&pmx_power_hdd0 &pmx_power_hdd1 &pmx_usb_vbus>;

		hdd_power1: regulator@3 {
			compatible = "regulator-fixed";
			reg = <3>;
			regulator-name = "HDD1 Power";
			regulator-min-microvolt = <5000000>;
			regulator-max-microvolt = <5000000>;
			enable-active-high;
			regulator-always-on;
			regulator-boot-on;
			gpio = <&gpio0 9 GPIO_ACTIVE_HIGH>;
		};
	};
};


code:
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
 * Device Tree file for Buffalo Linkstation LS-WXL
 *
 * Copyright (C) 2015, 2016
 * Roger Shimizu <rogershimizu@gmail.com>
 */

/dts-v1/;
#include "kirkwood-linkstation-duo-6281.dtsi"

/ {
	model = "Buffalo Linkstation LS-WXL";
	compatible = "buffalo,lswxl", "marvell,kirkwood-88f6281", "marvell,kirkwood";

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

	ocp@f1000000 {
		pinctrl: pin-controller@10000 {
			pmx_led_hdderr0: pmx-led-hdderr0 {
				marvell,pins = "mpp8";
				marvell,function = "gpio";
			};
			pmx_led_hdderr1: pmx-led-hdderr1 {
				marvell,pins = "mpp46";
				marvell,function = "gpio";
			};
			pmx_fan_lock: pmx-fan-lock {
				marvell,pins = "mpp40";
				marvell,function = "gpio";
			};
			pmx_fan_high: pmx-fan-high {
				marvell,pins = "mpp47";
				marvell,function = "gpio";
			};
			pmx_fan_low: pmx-fan-low {
				marvell,pins = "mpp48";
				marvell,function = "gpio";
			};
		};
	};

	gpio_leds {
		pinctrl-0 = <&pmx_led_function_red &pmx_led_alarm
			     &pmx_led_info &pmx_led_power
			     &pmx_led_function_blue
			     &pmx_led_hdderr0
			     &pmx_led_hdderr1>;

		red-hdderr0-led {
			label = "linkstation:red:hdderr0";
			gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
		};

		red-hdderr1-led {
			label = "linkstation:red:hdderr1";
			gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
		};
	};

	gpio_fan {
		compatible = "gpio-fan";
		pinctrl-0 = <&pmx_fan_low &pmx_fan_high &pmx_fan_lock>;
		pinctrl-names = "default";

		gpios = <&gpio1 16 GPIO_ACTIVE_LOW
			 &gpio1 15 GPIO_ACTIVE_LOW>;

		gpio-fan,speed-map = <0 3
				1500 2
				3250 1
				5000 0>;

		alarm-gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>;
	};
};


code:
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
 * Device Tree common file for kirkwood based Buffalo Linkstation
 *
 * Copyright (C) 2015, 2016
 * Roger Shimizu <rogershimizu@gmail.com>
 */

/ {
	chosen {
		bootargs = "console=ttyS0,115200n8 earlyprintk";
		stdout-path = &uart0;
	};

	ocp@f1000000 {
		pinctrl: pin-controller@10000 {
			pmx_power_hdd0: pmx-power-hdd0 {
				marvell,function = "gpio";
			};
			pmx_usb_vbus: pmx-usb-vbus {
				marvell,function = "gpio";
			};
			pmx_led_alarm: pmx-led-alarm {
				marvell,function = "gpio";
			};
			pmx_led_function_red: pmx-led-function-red {
				marvell,function = "gpio";
			};
			pmx_led_function_blue: pmx-led-function-blue {
				marvell,function = "gpio";
			};
			pmx_led_info: pmx-led-info {
				marvell,function = "gpio";
			};
			pmx_led_power: pmx-led-power {
				marvell,function = "gpio";
			};
			pmx_button_function: pmx-button-function {
				marvell,function = "gpio";
			};
			pmx_power_switch: pmx-power-switch {
				marvell,function = "gpio";
			};
			pmx_power_auto_switch: pmx-power-auto-switch {
				marvell,function = "gpio";
			};
		};

		serial@12000 {
			status = "okay";
		};

		sata@80000 {
			status = "okay";
			nr-ports = <1>;
		};

		spi@10600 {
			status = "okay";

			m25p40@0 {
				#address-cells = <1>;
				#size-cells = <1>;
				compatible = "st,m25p40", "jedec,spi-nor";
				reg = <0>;
				spi-max-frequency = <25000000>;
				mode = <0>;

				partition@0 {
					reg = <0x0 0x60000>;
					label = "uboot";
					read-only;
				};

				partition@60000 {
					reg = <0x60000 0x10000>;
					label = "dtb";
					read-only;
				};

				partition@70000 {
					reg = <0x70000 0x10000>;
					label = "uboot_env";
				};
			};
		};
	};

	gpio_keys {
		compatible = "gpio-keys";
		#address-cells = <1>;
		#size-cells = <0>;
		pinctrl-0 = <&pmx_button_function &pmx_power_switch
			     &pmx_power_auto_switch>;
		pinctrl-names = "default";

		function-button {
			label = "Function Button";
			linux,code = <KEY_OPTION>;
		};

		power-on-switch {
			label = "Power-on Switch";
			linux,code = <KEY_RESERVED>;
			linux,input-type = <5>;
		};

		power-auto-switch {
			label = "Power-auto Switch";
			linux,code = <KEY_ESC>;
			linux,input-type = <5>;
		};
	};

	gpio_leds {
		compatible = "gpio-leds";
		pinctrl-0 = <&pmx_led_function_red &pmx_led_alarm
			     &pmx_led_info &pmx_led_power
			     &pmx_led_function_blue>;
		pinctrl-names = "default";
	};

	restart_poweroff {
		compatible = "restart-poweroff";
	};

	regulators {
		compatible = "simple-bus";
		#address-cells = <1>;
		#size-cells = <0>;
		pinctrl-0 = <&pmx_power_hdd0 &pmx_usb_vbus>;
		pinctrl-names = "default";

		usb_power: regulator@1 {
			compatible = "regulator-fixed";
			reg = <1>;
			regulator-name = "USB Power";
			regulator-min-microvolt = <5000000>;
			regulator-max-microvolt = <5000000>;
			enable-active-high;
			regulator-always-on;
			regulator-boot-on;
		};

		hdd_power0: regulator@2 {
			compatible = "regulator-fixed";
			reg = <2>;
			regulator-name = "HDD0 Power";
			regulator-min-microvolt = <5000000>;
			regulator-max-microvolt = <5000000>;
			enable-active-high;
			regulator-always-on;
			regulator-boot-on;
		};
	};
};

&pciec {
	status = "okay";
};

&pcie0 {
	status = "okay";
};


code:
// SPDX-License-Identifier: GPL-2.0
/*
 * kirkwood-viper.dts - Device Tree file for Linksys viper (E4200v2 / EA4500)
 *
 * (c) 2013 Jonas Gorski <jogo@openwrt.org>
 * (c) 2013 Deutsche Telekom Innovation Laboratories
 * (c) 2014 Luka Perkov <luka@openwrt.org>
 * (c) 2014 Randy C. Will <randall.will@gmail.com>
 *
 */

/dts-v1/;

#include "kirkwood.dtsi"
#include "kirkwood-6282.dtsi"

/ {
	model = "Linksys Viper (E4200v2 / EA4500)";
	compatible = "linksys,viper", "marvell,kirkwood-88f6282", "marvell,kirkwood";

	memory {
		device_type = "memory";
		reg = <0x00000000 0x8000000>;
	};

	aliases {
		serial0 = &uart0;
	};

	chosen {
		stdout-path = "serial0:115200n8";
	};

	gpio_keys {
		compatible = "gpio-keys";
		#address-cells = <1>;
		#size-cells = <0>;
		pinctrl-0 = < &pmx_btn_wps &pmx_btn_reset >;
		pinctrl-names = "default";

		wps {
			label = "WPS Button";
			linux,code = <KEY_WPS_BUTTON>;
			gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
		};

		reset {
			label = "Reset Button";
			linux,code = <KEY_RESTART>;
			gpios = <&gpio1 16 GPIO_ACTIVE_LOW>;
		};
	};

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

		white-health {
			label = "viper:white:health";
			gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
		};

		white-pulse {
			label = "viper:white:pulse";
			gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
		};
	};
};

&pinctrl {
	pmx_led_white_health: pmx-led-white-health {
		marvell,pins = "mpp7";
		marvell,function = "gpo";
	};
	pmx_led_white_pulse: pmx-led-white-pulse {
		marvell,pins = "mpp14";
		marvell,function = "gpio";
	};
	pmx_btn_wps: pmx-btn-wps {
		marvell,pins = "mpp47";
		marvell,function = "gpio";
	};
	pmx_btn_reset: pmx-btn-reset {
		marvell,pins = "mpp48";
		marvell,function = "gpio";
	};
};

&nand {
	status = "okay";
	pinctrl-0 = <&pmx_nand>;
	pinctrl-names = "default";

	partitions {
		compatible = "fixed-partitions";
		#address-cells = <1>;
		#size-cells = <1>;

		partition@0 {
			label = "u-boot";
			reg = <0x0 0x80000>;
			read-only;
		};

		partition@80000 {
			label = "u_env";
			reg = <0x80000 0x20000>;
		};

		partition@a0000 {
			label = "s_env";
			reg = <0xA0000 0x20000>;
		};

		partition@200000 {
			label = "kernel";
			reg = <0x200000 0x2A0000>;
		};

		partition@4a0000 {
			label = "rootfs";
			reg = <0x4A0000 0x1760000>;
		};

		partition@1c00000 {
			label = "alt_kernel";
			reg = <0x1C00000 0x2A0000>;
		};

		partition@1ea0000 {
			label = "alt_rootfs";
			reg = <0x1EA0000 0x1760000>;
		};

		partition@3600000 {
			label = "syscfg";
			reg = <0x3600000 0x4A00000>;
		};

		partition@c0000 {
			label = "unused";
			reg = <0xC0000 0x140000>;
		};

	};
};

&pciec {
	status = "okay";
};

&pcie0 {
	status = "okay";
};

&pcie1 {
	status = "okay";
};

&mdio {
	status = "okay";

	switch@10 {
		compatible = "marvell,mv88e6085";
		#address-cells = <1>;
		#size-cells = <0>;
		reg = <16>;

		ports {
			#address-cells = <1>;
			#size-cells = <0>;

			port@0 {
				reg = <0>;
				label = "ethernet1";
			};

			port@1 {
				reg = <1>;
				label = "ethernet2";
			};

			port@2 {
				reg = <2>;
				label = "ethernet3";
			};

			port@3 {
				reg = <3>;
				label = "ethernet4";
			};

			port@4 {
				reg = <4>;
				label = "internet";
			};

			port@5 {
				reg = <5>;
				label = "cpu";
				ethernet = <&eth0port>;
				fixed-link {
					speed = <1000>;
					full-duplex;
				};
			};
		};
	};
};

&uart0 {
	status = "okay";
};

/* eth0 is connected to a Marvell 88E6171 switch, without a PHY. So set
 * fixed speed and duplex.
 */
&eth0 {
	status = "okay";
	ethernet0-port@0 {
		speed = <1000>;
		duplex = <1>;
	};
};

/* eth1 is connected to the switch at port 6. However DSA only supports a
 * single CPU port. So leave this port disabled to avoid confusion.
 */
&eth1 {
	status = "disabled";
};

/* There is no battery on the board, so the RTC does not keep
 * time when there is no power, making it useless.
 */
&rtc {
	status = "disabled";
};


code:
// SPDX-License-Identifier: GPL-2.0
/dts-v1/;

#include "kirkwood-lsxl.dtsi"

/ {
	model = "Buffalo Linkstation LS-CHLv2";
	compatible = "buffalo,lschlv2", "buffalo,lsxl", "marvell,kirkwood-88f6281", "marvell,kirkwood";

	memory {
		device_type = "memory";
		reg = <0x00000000 0x4000000>;
	};

	ocp@f1000000 {
		serial@12000 {
			status = "okay";
		};
	};
};


code:
// SPDX-License-Identifier: GPL-2.0
/dts-v1/;

#include "kirkwood-lsxl.dtsi"

/ {
	model = "Buffalo Linkstation LS-XHL";
	compatible = "buffalo,lsxhl", "buffalo,lsxl", "marvell,kirkwood-88f6281", "marvell,kirkwood";

	memory {
		device_type = "memory";
		reg = <0x00000000 0x10000000>;
	};

	ocp@f1000000 {
		serial@12000 {
			status = "okay";
		};
	};
};


code:
// SPDX-License-Identifier: GPL-2.0
#include "kirkwood.dtsi"
#include "kirkwood-6281.dtsi"

/ {
	chosen {
		bootargs = "console=ttyS0,115200n8 earlyprintk";
		stdout-path = &uart0;
	};

	ocp@f1000000 {
		pinctrl: pin-controller@10000 {
			/* Non-default UART pins */
			pmx_uart0: pmx-uart0 {
				marvell,pins = "mpp4", "mpp5";
			};

			pmx_power_hdd: pmx-power-hdd {
				marvell,pins = "mpp10";
				marvell,function = "gpo";
			};
			pmx_usb_vbus: pmx-usb-vbus {
				marvell,pins = "mpp11";
				marvell,function = "gpio";
			};
			pmx_fan_high: pmx-fan-high {
				marvell,pins = "mpp18";
				marvell,function = "gpo";
			};
			pmx_fan_low: pmx-fan-low {
				marvell,pins = "mpp19";
				marvell,function = "gpo";
			};
			pmx_led_function_blue: pmx-led-function-blue {
				marvell,pins = "mpp36";
				marvell,function = "gpio";
			};
			pmx_led_alarm: pmx-led-alarm {
				marvell,pins = "mpp37";
				marvell,function = "gpio";
			};
			pmx_led_info: pmx-led-info {
				marvell,pins = "mpp38";
				marvell,function = "gpio";
			};
			pmx_led_power: pmx-led-power {
				marvell,pins = "mpp39";
				marvell,function = "gpio";
			};
			pmx_fan_lock: pmx-fan-lock {
				marvell,pins = "mpp40";
				marvell,function = "gpio";
			};
			pmx_button_function: pmx-button-function {
				marvell,pins = "mpp41";
				marvell,function = "gpio";
			};
			pmx_power_switch: pmx-power-switch {
				marvell,pins = "mpp42";
				marvell,function = "gpio";
			};
			pmx_power_auto_switch: pmx-power-auto-switch {
				marvell,pins = "mpp43";
				marvell,function = "gpio";
			};
			pmx_led_function_red: pmx-led-function_red {
				marvell,pins = "mpp48";
				marvell,function = "gpio";
			};

		};
		sata@80000 {
			status = "okay";
			nr-ports = <1>;
		};

		spi@10600 {
			status = "okay";

			m25p40@0 {
				#address-cells = <1>;
				#size-cells = <1>;
				compatible = "m25p40", "jedec,spi-nor";
				reg = <0>;
				spi-max-frequency = <25000000>;
				mode = <0>;

				partition@0 {
					reg = <0x0 0x60000>;
					label = "uboot";
					read-only;
				};

				partition@60000 {
					reg = <0x60000 0x10000>;
					label = "dtb";
					read-only;
				};

				partition@70000 {
					reg = <0x70000 0x10000>;
					label = "uboot_env";
				};
			};
		};
	};

	gpio_keys {
		compatible = "gpio-keys";
		#address-cells = <1>;
		#size-cells = <0>;
		pinctrl-0 = <&pmx_button_function &pmx_power_switch
			     &pmx_power_auto_switch>;
		pinctrl-names = "default";

		option {
			label = "Function Button";
			linux,code = <KEY_OPTION>;
			gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
		};
		reserved {
			label = "Power-on Switch";
			linux,code = <KEY_RESERVED>;
			linux,input-type = <5>;
			gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
		};
		power {
			label = "Power-auto Switch";
			linux,code = <KEY_ESC>;
			linux,input-type = <5>;
			gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
		};
	};

	gpio_leds {
		compatible = "gpio-leds";
		pinctrl-0 = <&pmx_led_function_red &pmx_led_alarm
			     &pmx_led_info &pmx_led_power
			     &pmx_led_function_blue>;
		pinctrl-names = "default";

		func_blue {
			label = "lsxl:blue:func";
			gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
		};

		alarm {
			label = "lsxl:red:alarm";
			gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
		};

		info {
			label = "lsxl:amber:info";
			gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
		};

		power {
			label = "lsxl:blue:power";
			gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
			default-state = "keep";
		};

		func_red {
			label = "lsxl:red:func";
			gpios = <&gpio1 16 GPIO_ACTIVE_LOW>;
		};
	};

	gpio_fan {
		compatible = "gpio-fan";
		pinctrl-0 = <&pmx_fan_low &pmx_fan_high &pmx_fan_lock>;
		pinctrl-names = "default";
		gpios = <&gpio0 19 GPIO_ACTIVE_LOW
		         &gpio0 18 GPIO_ACTIVE_LOW>;
		gpio-fan,speed-map = <0    3
		                      1500 2
		                      3250 1
		                      5000 0>;
		alarm-gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>;
	};

	restart_poweroff {
		compatible = "restart-poweroff";
	};

	regulators {
		compatible = "simple-bus";
		#address-cells = <1>;
		#size-cells = <0>;
		pinctrl-0 = <&pmx_power_hdd &pmx_usb_vbus>;
		pinctrl-names = "default";

		usb_power: regulator@1 {
			compatible = "regulator-fixed";
			reg = <1>;
			regulator-name = "USB Power";
			regulator-min-microvolt = <5000000>;
			regulator-max-microvolt = <5000000>;
			enable-active-high;
			regulator-always-on;
			regulator-boot-on;
			gpio = <&gpio0 11 0>;
		};
		hdd_power: regulator@2 {
			compatible = "regulator-fixed";
			reg = <2>;
			regulator-name = "HDD Power";
			regulator-min-microvolt = <5000000>;
			regulator-max-microvolt = <5000000>;
			enable-active-high;
			regulator-always-on;
			regulator-boot-on;
			gpio = <&gpio0 10 0>;
		};
	};
};

&mdio {
	status = "okay";

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

&eth1 {
	status = "okay";
	ethernet1-port@0 {
		phy-handle = <&ethphy1>;
	};
};


code:
// SPDX-License-Identifier: GPL-2.0
/dts-v1/;

#include "kirkwood.dtsi"
#include "kirkwood-6281.dtsi"

/ {
	model = "MPL CEC4";
	compatible = "mpl,cec4-10", "mpl,cec4", "marvell,kirkwood-88f6281", "marvell,kirkwood";

	memory {
		device_type = "memory";
		reg = <0x00000000 0x20000000>;
	};

	chosen {
		bootargs = "console=ttyS0,115200n8 earlyprintk";
		stdout-path = &uart0;
	};

	ocp@f1000000 {
		pinctrl: pin-controller@10000 {
			pmx_led_health: pmx-led-health {
				marvell,pins = "mpp7";
				marvell,function = "gpo";
			};

			pmx_sata1: pmx-sata1 {
				marvell,pins = "mpp34";
				marvell,function = "sata1";
			};

			pmx_sata0: pmx-sata0 {
				marvell,pins = "mpp35";
				marvell,function = "sata0";
			};

			pmx_led_user1o: pmx-led-user1o {
				marvell,pins = "mpp40";
				marvell,function = "gpio";
			};

			pmx_led_user1g: pmx-led-user1g {
				marvell,pins = "mpp41";
				marvell,function = "gpio";
			};

			pmx_led_user0o: pmx-led-user0o {
				marvell,pins = "mpp44";
				marvell,function = "gpio";
			};

			pmx_led_user0g: pmx-led-user0g {
				marvell,pins = "mpp45";
				marvell,function = "gpio";
			};

			pmx_led_misc: pmx-led-misc {
				marvell,pins = "mpp46";
				marvell,function = "gpio";
			};

			pmx_sdio_cd: pmx-sdio-cd {
				marvell,pins = "mpp47";
				marvell,function = "gpio";
			};
		};

		i2c@11000 {
			status = "okay";

			rtc@51 {
				compatible = "nxp,pcf8563";
				reg = <0x51>;
			};

			eeprom@57 {
				compatible = "atmel,24c02";
				reg = <0x57>;
			};

		};

		serial@12000 {
			status = "okay";
		};

		rtc@10300 {
			status = "disabled";
		};

		sata@80000 {
			pinctrl-0 = <&pmx_sata0 &pmx_sata1>;
			pinctrl-names = "default";
			nr-ports = <2>;
			status = "okay";
		};

		mvsdio@90000 {
			pinctrl-0 = <&pmx_sdio &pmx_sdio_cd>;
			pinctrl-names = "default";
			status = "okay";
			cd-gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
			/* No WP GPIO */
		};
	};

	gpio-leds {
		compatible = "gpio-leds";
		pinctrl-0 = < &pmx_led_health
			      &pmx_led_user1o
			      &pmx_led_user1g &pmx_led_user0o
			      &pmx_led_user0g &pmx_led_misc
			    >;
		pinctrl-names = "default";

		health {
			label = "status:green:health";
			gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
		};

		user1o {
			label = "user1:orange";
			gpios = <&gpio1 8 GPIO_ACTIVE_LOW>;
			default-state = "on";
		};

		user1g {
			label = "user1:green";
			gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
			default-state = "on";
		};

		user0o {
			label = "user0:orange";
			gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
			default-state = "on";
		};

		user0g {
			label = "user0:green";
			gpios = <&gpio1 13 GPIO_ACTIVE_LOW>;
			default-state = "on";
		};

		misc {
			label = "status:orange:misc";
			gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
			default-state = "on";
		};

	};
};

&nand {
	status = "okay";

	partition@0 {
		label = "uboot";
		reg = <0x0000000 0x100000>;
	};

	partition@100000 {
		label = "env";
		reg = <0x100000 0x80000>;
	};

	partition@180000 {
		label = "fdt";
		reg = <0x180000 0x80000>;
	};

	partition@200000 {
		label = "kernel";
		reg = <0x200000 0x400000>;
	};

	partition@600000 {
		label = "rootfs";
		reg = <0x600000 0x1fa00000>;
	};
};

&mdio {
	status = "okay";

	ethphy0: ethernet-phy@1 {
		reg = <1>;
	};

	ethphy1: ethernet-phy@2 {
		reg = <2>;
	};
};

&eth0 {
	status = "okay";
	ethernet0-port@0 {
		phy-handle = <&ethphy0>;
	};
};

&eth1 {
	status = "okay";
	ethernet1-port@0 {
		phy-handle = <&ethphy1>;
	};
};

&pciec {
	status = "okay";
};

&pcie0 {
	status = "okay";
};


code:
// SPDX-License-Identifier: GPL-2.0
/*
 * Marvell 88F6281 GTW GE Board
 *
 * Lennert Buytenhek <buytenh@marvell.com>
 * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
 *
 * This file contains the definitions that are common between the 6281
 * and 6282 variants of the Marvell Kirkwood Development Board.
 */

/dts-v1/;

#include "kirkwood.dtsi"
#include "kirkwood-6281.dtsi"

/ {
	model = "Marvell 88F6281 GTW GE Board";
	compatible = "marvell,mv88f6281gtw-ge", "marvell,kirkwood-88f6281", "marvell,kirkwood";

	memory {
		device_type = "memory";
		reg = <0x00000000 0x20000000>; /* 512 MB */
	};

	chosen {
		bootargs = "console=ttyS0,115200n8 earlyprintk";
		stdout-path = &uart0;
	};

	ocp@f1000000 {
		pin-controller@10000 {
			pmx_usb_led: pmx-usb-led {
				marvell,pins = "mpp12";
				marvell,function = "gpo";
			};

			pmx_leds: pmx-leds {
				marvell,pins = "mpp20", "mpp21";
				marvell,function = "gpio";
			};

			pmx_keys: pmx-keys {
				marvell,pins = "mpp46", "mpp47";
				marvell,function = "gpio";
			};
		};

		spi@10600 {
			status = "okay";

			flash@0 {
				#address-cells = <1>;
				#size-cells = <1>;
				compatible = "mxicy,mx25l12805d", "jedec,spi-nor";
				reg = <0>;
				spi-max-frequency = <50000000>;
				mode = <0>;
			};
		};

		serial@12000 {
			status = "okay";
		};

		ehci@50000 {
			status = "okay";
		};
	};

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

		green-status {
			label = "gtw:green:Status";
			gpios = <&gpio0 20 GPIO_ACTIVE_HIGH>;
		};

		red-status {
			label = "gtw:red:Status";
			gpios = <&gpio0 21 GPIO_ACTIVE_HIGH>;
		};

		green-usb {
			label = "gtw:green:USB";
			gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
		};
	};

	gpio_keys {
		compatible = "gpio-keys";
		#address-cells = <1>;
		#size-cells = <0>;
		pinctrl-0 = <&pmx_keys>;
		pinctrl-names = "default";

		restart {
			label = "SWR Button";
			linux,code = <KEY_RESTART>;
			gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
		};
		wps {
			label = "WPS Button";
			linux,code = <KEY_WPS_BUTTON>;
			gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
		};
	};
};

&mdio {
	status = "okay";

	switch@0 {
		compatible = "marvell,mv88e6085";
		#address-cells = <1>;
		#size-cells = <0>;
		reg = <0>;

		ports {
			#address-cells = <1>;
			#size-cells = <0>;

			port@0 {
				reg = <0>;
				label = "lan1";
			};

			port@1 {
				reg = <1>;
				label = "lan2";
			};

			port@2 {
				reg = <2>;
				label = "lan3";
			};

			port@3 {
				reg = <3>;
				label = "lan4";
			};

			port@4 {
				reg = <4>;
				label = "wan";
			};

			port@5 {
				reg = <5>;
				label = "cpu";
				ethernet = <&eth0port>;
				fixed-link {
					speed = <1000>;
					full-duplex;
				};
			};
		};
	};
};

&eth0 {
	status = "okay";

	ethernet0-port@0 {
		speed = <1000>;
		duplex = <1>;
	};
};

&pciec {
	status = "okay";
};

&pcie0 {
	status = "okay";
};


code:
// SPDX-License-Identifier: GPL-2.0
/*
 * Device Tree file for LaCie 2Big NAS
 *
 * Copyright (C) 2015 Seagate
 *
 * Author: Simon Guinot <simon.guinot@sequanux.org>
 *
*/

/dts-v1/;

#include "kirkwood-netxbig.dtsi"

/ {
	model = "LaCie 2Big NAS";
	compatible = "lacie,nas2big", "lacie,netxbig", "marvell,kirkwood-88f6282", "marvell,kirkwood";

	memory {
		device_type = "memory";
		reg = <0x00000000 0x10000000>;
	};

	chosen {
		bootargs = "console=ttyS0,115200n8";
		stdout-path = &uart0;
	};

	ocp@f1000000 {
		rtc@10300 {
			/* The on-chip RTC is not powered (no supercap). */
			status = "disabled";
		};
		spi@10600 {
			/*
			 * A NAND flash is used instead of an SPI flash for
			 * the other netxbig-compatible boards.
			 */
			status = "disabled";
		};
	};

	fan {
		/*
		 * An I2C fan controller (GMT G762) is used but alarm is
		 * wired to a separate GPIO.
		 */
		compatible = "gpio-fan";
		alarm-gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
	};

	regulators: regulators {
		status = "okay";
		compatible = "simple-bus";
		#address-cells = <1>;
		#size-cells = <0>;
		pinctrl-names = "default";

		regulator@2 {
			compatible = "regulator-fixed";
			reg = <2>;
			regulator-name = "hdd1power";
			regulator-min-microvolt = <5000000>;
			regulator-max-microvolt = <5000000>;
			enable-active-high;
			regulator-always-on;
			regulator-boot-on;
			gpio = <&gpio0 17 GPIO_ACTIVE_HIGH>;
		};
		clocks {
			g762_clk: g762-oscillator {
				compatible = "fixed-clock";
				#clock-cells = <0>;
				clock-frequency = <32768>;
			};
		};
	};
};

&mdio {
	status = "okay";

	ethphy0: ethernet-phy@0 {
		reg = <0>;
	};
};

&i2c0 {
	status = "okay";

	/*
	 * An external I2C RTC (Dallas DS1337S+) is used. This allows
	 * to power-up the board on an RTC alarm. The external RTC can
	 * be kept powered, even when the SoC is off.
	 */
	rtc@68 {
		compatible = "dallas,ds1307";
		reg = <0x68>;
		interrupts = <43>;
	};
	g762@3e {
		compatible = "gmt,g762";
		reg = <0x3e>;
		clocks = <&g762_clk>;
	};
};

&nand {
	chip-delay = <50>;
	status = "okay";

	partition@0 {
		label = "U-Boot";
		reg = <0x0 0x100000>;
	};

	partition@100000 {
		label = "uImage";
		reg = <0x100000 0x1000000>;
	};

	partition@1100000 {
		label = "root";
		reg = <0x1100000 0x8000000>;
	};

	partition@9100000 {
		label = "unused";
		reg = <0x9100000 0x6f00000>;
	};
};

&pciec {
	status = "okay";
};

&pcie0 {
	status = "okay";
};


code:
// SPDX-License-Identifier: GPL-2.0
/*
 * Device Tree file for LaCie 2Big Network v2
 *
 * Copyright (C) 2014
 *
 * Andrew Lunn <andrew@lunn.ch>
 *
 * Based on netxbig_v2-setup.c,
 * Copyright (C) 2010 Simon Guinot <sguinot@lacie.com>
 *
*/

/dts-v1/;

#include "kirkwood.dtsi"
#include "kirkwood-6281.dtsi"
#include "kirkwood-netxbig.dtsi"

/ {
	model = "LaCie 2Big Network v2";
	compatible = "lacie,net2big_v2", "lacie,netxbig", "marvell,kirkwood-88f6281", "marvell,kirkwood";

	memory {
		device_type = "memory";
		reg = <0x00000000 0x10000000>;
	};

	fan {
		compatible = "gpio-fan";
		alarm-gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
	};
};

&regulators {
	regulator@2 {
		compatible = "regulator-fixed";
		reg = <2>;
		regulator-name = "hdd1power";
		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;
		enable-active-high;
		regulator-always-on;
		regulator-boot-on;
		gpio = <&gpio0 17 GPIO_ACTIVE_HIGH>;
	};

	clocks {
		g762_clk: g762-oscillator {
			compatible = "fixed-clock";
			#clock-cells = <0>;
			clock-frequency = <32768>;
		};
	};
};

&i2c0 {
	g762@3e {
		compatible = "gmt,g762";
		reg = <0x3e>;
		clocks = <&g762_clk>;
	};
};


code:
// SPDX-License-Identifier: GPL-2.0
/*
 * Device Tree file for LaCie 5Big Network v2
 *
 * Copyright (C) 2014
 *
 * Andrew Lunn <andrew@lunn.ch>
 *
 * Based on netxbig_v2-setup.c,
 * Copyright (C) 2010 Simon Guinot <sguinot@lacie.com>
 *
*/

/dts-v1/;

#include "kirkwood.dtsi"
#include "kirkwood-6281.dtsi"
#include "kirkwood-netxbig.dtsi"

/ {
	model = "LaCie 5Big Network v2";
	compatible = "lacie,net5big_v2", "lacie,netxbig", "marvell,kirkwood-88f6281", "marvell,kirkwood";

	memory {
		device_type = "memory";
		reg = <0x00000000 0x20000000>;
	};

};

&regulators {
	regulator@2 {
		compatible = "regulator-fixed";
		reg = <2>;
		regulator-name = "hdd1power";
		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;
		enable-active-high;
		regulator-always-on;
		regulator-boot-on;
		gpio = <&gpio0 17 GPIO_ACTIVE_HIGH>;
	};

	regulator@3 {
		compatible = "regulator-fixed";
		reg = <3>;
		regulator-name = "hdd2power";
		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;
		enable-active-high;
		regulator-always-on;
		regulator-boot-on;
		gpio = <&gpio1 9 GPIO_ACTIVE_HIGH>;
	};

	regulator@4 {
		compatible = "regulator-fixed";
		reg = <4>;
		regulator-name = "hdd3power";
		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;
		enable-active-high;
		regulator-always-on;
		regulator-boot-on;
		gpio = <&gpio1 10 GPIO_ACTIVE_HIGH>;
	};

	regulator@5 {
		compatible = "regulator-fixed";
		reg = <5>;
		regulator-name = "hdd4power";
		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;
		enable-active-high;
		regulator-always-on;
		regulator-boot-on;
		gpio = <&gpio1 11 GPIO_ACTIVE_HIGH>;
	};

	clocks {
		g762_clk: g762-oscillator {
			compatible = "fixed-clock";
			#clock-cells = <0>;
			clock-frequency = <32768>;
		};
	};

	netxbig-leds {
		blue-sata2 {
			label = "netxbig:blue:sata2";
			mode-addr = <5>;
			mode-val = <NETXBIG_LED_OFF 0
				    NETXBIG_LED_ON 7
				    NETXBIG_LED_SATA 1
				    NETXBIG_LED_TIMER1 3>;
			bright-addr = <2>;
			max-brightness = <7>;
		};
		red-sata2 {
			label = "netxbig:red:sata2";
			mode-addr = <5>;
			mode-val = <NETXBIG_LED_OFF 0
				    NETXBIG_LED_ON 2
				    NETXBIG_LED_TIMER1 4>;
			bright-addr = <2>;
			max-brightness = <7>;
		};
		blue-sata3 {
			label = "netxbig:blue:sata3";
			mode-addr = <6>;
			mode-val = <NETXBIG_LED_OFF 0
				    NETXBIG_LED_ON 7
				    NETXBIG_LED_SATA 1
				    NETXBIG_LED_TIMER1 3>;
			bright-addr = <2>;
			max-brightness = <7>;
		};
		red-sata3 {
			label = "netxbig:red:sata3";
			mode-addr = <6>;
			mode-val = <NETXBIG_LED_OFF 0
				    NETXBIG_LED_ON 2
				    NETXBIG_LED_TIMER1 4>;
			bright-addr = <2>;
			max-brightness = <7>;
		};
		blue-sata4 {
			label = "netxbig:blue:sata4";
			mode-addr = <7>;
			mode-val = <NETXBIG_LED_OFF 0
				    NETXBIG_LED_ON 7
				    NETXBIG_LED_SATA 1
				    NETXBIG_LED_TIMER1 3>;
			bright-addr = <2>;
			max-brightness = <7>;
		};
		red-sata4 {
			label = "netxbig:red:sata4";
			mode-addr = <7>;
			mode-val = <NETXBIG_LED_OFF 0
				    NETXBIG_LED_ON 2
				    NETXBIG_LED_TIMER1 4>;
			bright-addr = <2>;
			max-brightness = <7>;
		};
	};
};

&mdio {
	ethphy1: ethernet-phy@1 {
		reg = <0>;
	};
};

&eth1 {
	status = "okay";
	ethernet1-port@0 {
		phy-handle = <&ethphy1>;
	};
};

&i2c0 {
	g762@3e {
		compatible = "gmt,g762";
		reg = <0x3e>;
		clocks = <&g762_clk>;
	};
};


code:
// SPDX-License-Identifier: GPL-2.0+
/*
 * Device Tree file for NETGEAR ReadyNAS Duo v2
 *
 * Copyright (C) 2013, Arnaud EBALARD <arno@natisbad.org>
 */

/dts-v1/;

#include "kirkwood.dtsi"
#include "kirkwood-6282.dtsi"

/ {
	model = "NETGEAR ReadyNAS Duo v2";
	compatible = "netgear,readynas-duo-v2", "netgear,readynas", "marvell,kirkwood-88f6282", "marvell,kirkwood";

	memory { /* 256 MB */
		device_type = "memory";
		reg = <0x00000000 0x10000000>;
	};

	chosen {
		bootargs = "console=ttyS0,115200n8 earlyprintk";
		stdout-path = &uart0;
	};

	ocp@f1000000 {
		pinctrl: pin-controller@10000 {
			pmx_button_power: pmx-button-power {
				marvell,pins = "mpp47";
				marvell,function = "gpio";
			};

			pmx_button_backup: pmx-button-backup {
				marvell,pins = "mpp45";
				marvell,function = "gpio";
			};

			pmx_button_reset: pmx-button-reset {
				marvell,pins = "mpp13";
				marvell,function = "gpio";
			};

			pmx_led_blue_power: pmx-led-blue-power {
				marvell,pins = "mpp31";
				marvell,function = "gpio";
			};

			pmx_led_blue_activity: pmx-led-blue-activity {
				marvell,pins = "mpp38";
				marvell,function = "gpio";
			};

			pmx_led_blue_disk1: pmx-led-blue-disk1 {
				marvell,pins = "mpp23";
				marvell,function = "gpio";
			};

			pmx_led_blue_disk2: pmx-led-blue-disk2 {
				marvell,pins = "mpp22";
				marvell,function = "gpio";
			};

			pmx_led_blue_backup: pmx-led-blue-backup {
				marvell,pins = "mpp29";
				marvell,function = "gpio";
			};

			pmx_poweroff: pmx-poweroff {
				marvell,pins = "mpp30";
				marvell,function = "gpio";
			};
		};

		clocks {
		       g762_clk: g762-oscillator {
				 compatible = "fixed-clock";
				 #clock-cells = <0>;
				 clock-frequency = <8192>;
		       };
		};

		i2c@11000 {
			status = "okay";

			rs5c372a: rs5c372a@32 {
				compatible = "ricoh,rs5c372a";
				reg = <0x32>;
			};

			g762: g762@3e {
				compatible = "gmt,g762";
				reg = <0x3e>;
				clocks = <&g762_clk>; /* input clock */
				fan_gear_mode = <0>;
				fan_startv = <1>;
				pwm_polarity = <0>;
			};
		};

		serial@12000 {
			status = "okay";
		};

		sata@80000 {
			status = "okay";
			nr-ports = <2>;
		};
	};

	gpio-leds {
		compatible = "gpio-leds";
		pinctrl-0 = < &pmx_led_blue_power &pmx_led_blue_activity
			      &pmx_led_blue_disk1 &pmx_led_blue_disk2
			      &pmx_led_blue_backup >;
		pinctrl-names = "default";

		power_led {
			label = "status:blue:power_led";
			gpios = <&gpio0 31 GPIO_ACTIVE_LOW>;
			default-state = "keep";
		};

		activity_led {
			label = "status:blue:activity_led";
			gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
		};

		disk1_led {
			label = "status:blue:disk1_led";
			gpios = <&gpio0 23 GPIO_ACTIVE_LOW>;
		};

		disk2_led {
			label = "status:blue:disk2_led";
			gpios = <&gpio0 22 GPIO_ACTIVE_LOW>;
		};

		backup_led {
			label = "status:blue:backup_led";
			gpios = <&gpio0 29 GPIO_ACTIVE_LOW>;
		};
	};

	gpio-keys {
		compatible = "gpio-keys";
		pinctrl-0 = <&pmx_button_power &pmx_button_backup
			     &pmx_button_reset>;
		pinctrl-names = "default";

		power-button {
			label = "Power Button";
			linux,code = <KEY_POWER>;
			gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
		};

		reset-button {
			label = "Reset Button";
			linux,code = <KEY_RESTART>;
			gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
		};

		backup-button {
			label = "Backup Button";
			linux,code = <KEY_COPY>;
			gpios = <&gpio1 13 GPIO_ACTIVE_LOW>;
		};
	};

	gpio-poweroff {
		compatible = "gpio-poweroff";
		pinctrl-0 = <&pmx_poweroff>;
		pinctrl-names = "default";
		gpios = <&gpio0 30 GPIO_ACTIVE_LOW>;
	};

	regulators {
		compatible = "simple-bus";
		#address-cells = <1>;
		#size-cells = <0>;

		usb3_regulator: usb3-regulator@1 {
			compatible = "regulator-fixed";
			reg = <1>;
			regulator-name = "USB 3.0 Power";
			regulator-min-microvolt = <5000000>;
			regulator-max-microvolt = <5000000>;
			enable-active-high;
			regulator-always-on;
			regulator-boot-on;
			gpio = <&gpio1 14 GPIO_ACTIVE_HIGH>;
		};
	};
};

&nand {
	status = "okay";

	partition@0 {
		label = "u-boot";
		reg = <0x0000000 0x180000>;
		read-only;
	};

	partition@180000 {
		label = "u-boot-env";
		reg = <0x180000 0x20000>;
	};

	partition@200000 {
		label = "uImage";
		reg = <0x0200000 0x600000>;
	};

	partition@800000 {
		label = "minirootfs";
		reg = <0x0800000 0x1000000>;
	};

	partition@1800000 {
		label = "jffs2";
		reg = <0x1800000 0x6800000>;
	};
};

&mdio {
	status = "okay";

	ethphy0: ethernet-phy@0 { /* Marvell 88E1318 */
		reg = <0>;
	};
};

&eth0 {
	status = "okay";
	ethernet0-port@0 {
		phy-handle = <&ethphy0>;
	};
};

&pciec {
        status = "okay";
};

&pcie0 {
	status = "okay";
};


code:
// SPDX-License-Identifier: GPL-2.0+
/*
 * Device Tree file for NETGEAR ReadyNAS NV+ v2
 *
 * Copyright (C) 2013, Arnaud EBALARD <arno@natisbad.org>
 */

/dts-v1/;

#include "kirkwood.dtsi"
#include "kirkwood-6282.dtsi"

/ {
	model = "NETGEAR ReadyNAS NV+ v2";
	compatible = "netgear,readynas-nv+-v2", "netgear,readynas", "marvell,kirkwood-88f6282", "marvell,kirkwood";

	memory { /* 256 MB */
		device_type = "memory";
		reg = <0x00000000 0x10000000>;
	};

	chosen {
		bootargs = "console=ttyS0,115200n8 earlyprintk";
		stdout-path = &uart0;
	};

	ocp@f1000000 {
		pinctrl: pin-controller@10000 {
			pmx_button_power: pmx-button-power {
				marvell,pins = "mpp47";
				marvell,function = "gpio";
			};

			pmx_button_backup: pmx-button-backup {
				marvell,pins = "mpp45";
				marvell,function = "gpio";
			};

			pmx_button_reset: pmx-button-reset {
				marvell,pins = "mpp13";
				marvell,function = "gpio";
			};

			pmx_led_blue_power: pmx-led-blue-power {
				marvell,pins = "mpp31";
				marvell,function = "gpio";
			};

			pmx_led_blue_backup: pmx-led-blue-backup {
				marvell,pins = "mpp22";
				marvell,function = "gpio";
			};

			pmx_led_blue_disk1: pmx-led-blue-disk1 {
				marvell,pins = "mpp20";
				marvell,function = "gpio";
			};

			pmx_led_blue_disk2: pmx-led-blue-disk2 {
				marvell,pins = "mpp23";
				marvell,function = "gpio";
			};

			pmx_led_blue_disk3: pmx-led-blue-disk3 {
				marvell,pins = "mpp24";
				marvell,function = "gpio";
			};

			pmx_led_blue_disk4: pmx-led-blue-disk4 {
				marvell,pins = "mpp29";
				marvell,function = "gpio";
			};

			pmx_poweroff: pmx-poweroff {
				marvell,pins = "mpp30";
				marvell,function = "gpio";
			};
		};

		clocks {
			g762_clk: g762-oscillator {
				compatible = "fixed-clock";
				#clock-cells = <0>;
				clock-frequency = <8192>;
			};
		};

		i2c@11000 {
			status = "okay";

			rs5c372a: rs5c372a@32 {
				compatible = "ricoh,rs5c372a";
				reg = <0x32>;
			};

			g762: g762@3e {
				compatible = "gmt,g762";
				reg = <0x3e>;
				clocks = <&g762_clk>; /* input clock */
				fan_gear_mode = <0>;
				fan_startv = <1>;
				pwm_polarity = <0>;
			};
		};

		serial@12000 {
			status = "okay";
		};

		sata@80000 { /* Connected to Marvell 88SM4140 SATA port multiplier */
			status = "okay";
			nr-ports = <1>;
		};
	};

	auxdisplay {
		compatible = "hit,hd44780";
		data-gpios = <&gpio0 17 GPIO_ACTIVE_HIGH>,
				<&gpio1 1 GPIO_ACTIVE_HIGH>,
				<&gpio1 3 GPIO_ACTIVE_HIGH>,
				<&gpio1 17 GPIO_ACTIVE_HIGH>;
		enable-gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>;
		rs-gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
		rw-gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
		backlight-gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
		display-height-chars = <2>;
		display-width-chars = <16>;
	};

	gpio-leds {
		compatible = "gpio-leds";
		pinctrl-0 = < &pmx_led_blue_power &pmx_led_blue_backup
			      &pmx_led_blue_disk1 &pmx_led_blue_disk2
			      &pmx_led_blue_disk3 &pmx_led_blue_disk3 >;
		pinctrl-names = "default";

		power_led {
			label = "status:blue:power_led";
			gpios = <&gpio0 31 GPIO_ACTIVE_LOW>;
			linux,default-trigger = "default-on";
		};

		backup_led {
			label = "status:blue:backup_led";
			gpios = <&gpio0 22 GPIO_ACTIVE_LOW>;
		};

		disk1_led {
			label = "status:blue:disk1_led";
			gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
		};

		disk2_led {
			label = "status:blue:disk2_led";
			gpios = <&gpio0 23 GPIO_ACTIVE_LOW>;
		};

		disk3_led {
			label = "status:blue:disk3_led";
			gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
		};

		disk4_led {
			label = "status:blue:disk4_led";
			gpios = <&gpio0 29 GPIO_ACTIVE_LOW>;
		};
	};

	gpio-keys {
		compatible = "gpio-keys";
		pinctrl-0 = <&pmx_button_power &pmx_button_backup
			     &pmx_button_reset>;
		pinctrl-names = "default";

		power-button {
			label = "Power Button";
			linux,code = <KEY_POWER>;
			gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
		};

		reset-button {
			label = "Reset Button";
			linux,code = <KEY_RESTART>;
			gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
		};

		backup-button {
			label = "Backup Button";
			linux,code = <KEY_COPY>;
			gpios = <&gpio1 13 GPIO_ACTIVE_LOW>;
		};
	};

	gpio-poweroff {
		compatible = "gpio-poweroff";
		pinctrl-0 = <&pmx_poweroff>;
		pinctrl-names = "default";
		gpios = <&gpio0 30 GPIO_ACTIVE_LOW>;
	};

	regulators {
		compatible = "simple-bus";
		#address-cells = <1>;
		#size-cells = <0>;

		usb3_regulator: usb3-regulator@1 {
			compatible = "regulator-fixed";
			reg = <1>;
			regulator-name = "USB 3.0 Power";
			regulator-min-microvolt = <5000000>;
			regulator-max-microvolt = <5000000>;
			enable-active-high;
			regulator-always-on;
			regulator-boot-on;
			gpio = <&gpio1 14 GPIO_ACTIVE_HIGH>;
		};
	};
};

&nand {
	status = "okay";

	partition@0 {
		label = "u-boot";
		reg = <0x0000000 0x180000>;
		read-only;
	};

	partition@180000 {
		label = "u-boot-env";
		reg = <0x180000 0x20000>;
	};

	partition@200000 {
		label = "uImage";
		reg = <0x0200000 0x600000>;
	};

	partition@800000 {
		label = "minirootfs";
		reg = <0x0800000 0x1000000>;
	};

	partition@1800000 {
		label = "jffs2";
		reg = <0x1800000 0x6800000>;
	};
};

&mdio {
	status = "okay";

	ethphy0: ethernet-phy@0 { /* Marvell 88E1318 */
		device_type = "ethernet-phy";
		reg = <0>;
	};
};

&eth0 {
	status = "okay";

	ethernet0-port@0 {
		phy-handle = <&ethphy0>;
	};
};

/* Connected to NEC uPD720200 USB 3.0 controller */
&pciec {
	status = "okay";
};

&pcie0 {
	status = "okay";
};


code:
// SPDX-License-Identifier: GPL-2.0
/*
 * Device Tree common file for LaCie 2Big and 5Big Network v2
 *
 * Copyright (C) 2014
 *
 * Andrew Lunn <andrew@lunn.ch>
 *
 * Based on netxbig_v2-setup.c,
 * Copyright (C) 2010 Simon Guinot <sguinot@lacie.com>
 *
*/

#include <dt-bindings/leds/leds-netxbig.h>
#include "kirkwood.dtsi"
#include "kirkwood-6281.dtsi"

/ {
	chosen {
		bootargs = "console=ttyS0,115200n8";
		stdout-path = &uart0;
	};

	ocp@f1000000 {
		serial@12000 {
			status = "okay";
		};

		spi@10600 {
			status = "okay";

			flash@0 {
				#address-cells = <1>;
				#size-cells = <1>;
				compatible = "mxicy,mx25l4005a", "jedec,spi-nor";
				reg = <0>;
				spi-max-frequency = <20000000>;
				mode = <0>;

				partition@0 {
					reg = <0x0 0x80000>;
					label = "u-boot";
				};
			};
		};

		sata@80000 {
			status = "okay";
			nr-ports = <2>;
		};

	};

	gpio-keys {
		compatible = "gpio-keys";
		#address-cells = <1>;
		#size-cells = <0>;

		/*
		 * esc and power represent a three position rocker
		 * switch. Thus the conventional KEY_POWER does not fit
		 */
		exc {
			label = "Back power switch (on|auto)";
			linux,code = <KEY_ESC>;
			linux,input-type = <5>;
			gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
		};
		power {
			label = "Back power switch (auto|off)";
			linux,code = <KEY_1>;
			linux,input-type = <5>;
			gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
		};
		option {
			label = "Function button";
			linux,code = <KEY_OPTION>;
			gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
		};

	};

	gpio-poweroff {
		compatible = "gpio-poweroff";
		gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
	};

	regulators: regulators {
		status = "okay";
		compatible = "simple-bus";
		#address-cells = <1>;
		#size-cells = <0>;
		pinctrl-names = "default";

		regulator@1 {
			compatible = "regulator-fixed";
			reg = <1>;
			regulator-name = "hdd0power";
			regulator-min-microvolt = <5000000>;
			regulator-max-microvolt = <5000000>;
			enable-active-high;
			regulator-always-on;
			regulator-boot-on;
			gpio = <&gpio0 16 GPIO_ACTIVE_HIGH>;
		};
	};

	netxbig_gpio_ext: netxbig-gpio-ext {
		compatible = "lacie,netxbig-gpio-ext";

		addr-gpios = <&gpio1 15 GPIO_ACTIVE_HIGH
			      &gpio1 16 GPIO_ACTIVE_HIGH
			      &gpio1 17 GPIO_ACTIVE_HIGH>;
		data-gpios = <&gpio1 12 GPIO_ACTIVE_HIGH
			      &gpio1 13 GPIO_ACTIVE_HIGH
			      &gpio1 14 GPIO_ACTIVE_HIGH>;
		enable-gpio = <&gpio0 29 GPIO_ACTIVE_HIGH>;
	};

	netxbig-leds {
		compatible = "lacie,netxbig-leds";

		gpio-ext = <&netxbig_gpio_ext>;

		timers = <NETXBIG_LED_TIMER1 500 500
			  NETXBIG_LED_TIMER2 500 1000>;

		blue-power {
			label = "netxbig:blue:power";
			mode-addr = <0>;
			mode-val = <NETXBIG_LED_OFF 0
				    NETXBIG_LED_ON 1
				    NETXBIG_LED_TIMER1 3
				    NETXBIG_LED_TIMER2 7>;
			bright-addr = <1>;
			max-brightness = <7>;
		};
		red-power {
			label = "netxbig:red:power";
			mode-addr = <0>;
			mode-val = <NETXBIG_LED_OFF 0
				    NETXBIG_LED_ON 2
				    NETXBIG_LED_TIMER1 4>;
			bright-addr = <1>;
			max-brightness = <7>;
		};
		blue-sata0 {
			label = "netxbig:blue:sata0";
			mode-addr = <3>;
			mode-val = <NETXBIG_LED_OFF 0
				    NETXBIG_LED_ON 7
				    NETXBIG_LED_SATA 1
				    NETXBIG_LED_TIMER1 3>;
			bright-addr = <2>;
			max-brightness = <7>;
		};
		red-sata0 {
			label = "netxbig:red:sata0";
			mode-addr = <3>;
			mode-val = <NETXBIG_LED_OFF 0
				    NETXBIG_LED_ON 2
				    NETXBIG_LED_TIMER1 4>;
			bright-addr = <2>;
			max-brightness = <7>;
		};
		blue-sata1 {
			label = "netxbig:blue:sata1";
			mode-addr = <4>;
			mode-val = <NETXBIG_LED_OFF 0
				    NETXBIG_LED_ON 7
				    NETXBIG_LED_SATA 1
				    NETXBIG_LED_TIMER1 3>;
			bright-addr = <2>;
			max-brightness = <7>;
		};
		red-sata1 {
			label = "netxbig:red:sata1";
			mode-addr = <4>;
			mode-val = <NETXBIG_LED_OFF 0
				    NETXBIG_LED_ON 2
				    NETXBIG_LED_TIMER1 4>;
			bright-addr = <2>;
			max-brightness = <7>;
		};
	};
};

&mdio {
	status = "okay";

	ethphy0: ethernet-phy@0 {
		reg = <8>;
	};

	ethphy1: ethernet-phy@1 {
		reg = <0>;
	};
};

&eth0 {
	status = "okay";
	ethernet0-port@0 {
		phy-handle = <&ethphy0>;
	};
};

&pinctrl {
	pinctrl-names = "default";

	pmx_button_function: pmx-button-function {
		marvell,pins = "mpp34";
		marvell,function = "gpio";
	};
	pmx_button_power_off: pmx-button-power-off {
		marvell,pins = "mpp15";
		marvell,function = "gpio";
	};
	pmx_button_power_on: pmx-button-power-on {
		marvell,pins = "mpp13";
		marvell,function = "gpio";
	};
};

&i2c0 {
	status = "okay";

	eeprom@50 {
		compatible = "atmel,24c04";
		pagesize = <16>;
		reg = <0x50>;
	};
};


code:
// SPDX-License-Identifier: GPL-2.0
#include "kirkwood.dtsi"
#include "kirkwood-6281.dtsi"

/ {
	chosen {
		bootargs = "console=ttyS0,115200n8";
		stdout-path = &uart0;
	};

	ocp@f1000000 {
		pinctrl: pin-controller@10000 {
			pmx_ns2_sata0: pmx-ns2-sata0 {
				marvell,pins = "mpp21";
				marvell,function = "sata0";
			};
			pmx_ns2_sata1: pmx-ns2-sata1 {
				marvell,pins = "mpp20";
				marvell,function = "sata1";
			};
		};

		serial@12000 {
			status = "okay";
		};

		spi@10600 {
			status = "okay";

			flash@0 {
				#address-cells = <1>;
				#size-cells = <1>;
				compatible = "mxicy,mx25l4005a", "jedec,spi-nor";
				reg = <0>;
				spi-max-frequency = <20000000>;
				mode = <0>;

				partition@0 {
					reg = <0x0 0x80000>;
					label = "u-boot";
				};
			};
		};

		i2c@11000 {
			status = "okay";

			eeprom@50 {
				compatible = "atmel,24c04";
				pagesize = <16>;
				reg = <0x50>;
			};
		};
	};

	gpio_keys {
		compatible = "gpio-keys";
		#address-cells = <1>;
		#size-cells = <0>;

		power {
			label = "Power push button";
			linux,code = <KEY_POWER>;
			gpios = <&gpio1 0 GPIO_ACTIVE_HIGH>;
		};
	};

	gpio-leds {
		compatible = "gpio-leds";

		red-fail {
			label = "ns2:red:fail";
			gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
		};
	};

	gpio_poweroff {
		compatible = "gpio-poweroff";
		gpios = <&gpio0 31 GPIO_ACTIVE_HIGH>;
	};

};

&mdio {
	status = "okay";

	ethphy0: ethernet-phy@X {
                /* overwrite reg property in board file */
	};
};

&eth0 {
	status = "okay";
	ethernet0-port@0 {
		phy-handle = <&ethphy0>;
	};
};


code:
// SPDX-License-Identifier: GPL-2.0
/dts-v1/;

#include <dt-bindings/leds/leds-ns2.h>
#include "kirkwood-ns2-common.dtsi"

/ {
	model = "LaCie Network Space v2";
	compatible = "lacie,netspace_v2", "marvell,kirkwood-88f6281", "marvell,kirkwood";

	memory {
		device_type = "memory";
		reg = <0x00000000 0x10000000>;
	};

	ocp@f1000000 {
		sata@80000 {
			pinctrl-0 = <&pmx_ns2_sata0>;
			pinctrl-names = "default";
			status = "okay";
			nr-ports = <1>;
		};
	};

	ns2-leds {
		compatible = "lacie,ns2-leds";

		blue-sata {
			label = "ns2:blue:sata";
			slow-gpio = <&gpio0 29 0>;
			cmd-gpio = <&gpio0 30 0>;
			modes-map = <NS_V2_LED_OFF  1 0
				     NS_V2_LED_ON   0 1
				     NS_V2_LED_ON   1 1
				     NS_V2_LED_SATA 0 0>;
		};
	};
};

&ethphy0 { reg = <8>; };


code:
// SPDX-License-Identifier: GPL-2.0
/dts-v1/;

#include "kirkwood-ns2-common.dtsi"

/ {
	model = "LaCie Network Space Lite v2";
	compatible = "lacie,netspace_lite_v2", "marvell,kirkwood-88f6192", "marvell,kirkwood";

	memory {
		device_type = "memory";
		reg = <0x00000000 0x8000000>;
	};

	ocp@f1000000 {
		sata@80000 {
			pinctrl-0 = <&pmx_ns2_sata0>;
			pinctrl-names = "default";
			status = "okay";
			nr-ports = <1>;
		};
	};

	gpio-leds {
		compatible = "gpio-leds";

		blue-sata {
			label = "ns2:blue:sata";
			gpios = <&gpio0 30 GPIO_ACTIVE_LOW>;
			linux,default-trigger = "disk-activity";
		};
	};
};

&ethphy0 { reg = <0>; };


code:
// SPDX-License-Identifier: GPL-2.0
/dts-v1/;

#include <dt-bindings/leds/leds-ns2.h>
#include "kirkwood-ns2-common.dtsi"

/ {
	model = "LaCie Network Space Max v2";
	compatible = "lacie,netspace_max_v2", "marvell,kirkwood-88f6281", "marvell,kirkwood";

	memory {
		device_type = "memory";
		reg = <0x00000000 0x10000000>;
	};

	ocp@f1000000 {
		sata@80000 {
			pinctrl-0 = <&pmx_ns2_sata0 &pmx_ns2_sata1>;
			pinctrl-names = "default";
			status = "okay";
			nr-ports = <2>;
		};
	};

	gpio_fan {
		compatible = "gpio-fan";
		gpios = <&gpio0 22 GPIO_ACTIVE_LOW
			 &gpio0  7 GPIO_ACTIVE_LOW
			 &gpio1  1 GPIO_ACTIVE_LOW
			 &gpio0 23 GPIO_ACTIVE_LOW>;
		gpio-fan,speed-map =
			<   0  0
			 1500 15
			 1700 14
			 1800 13
			 2100 12
			 3100 11
			 3300 10
			 4300  9
			 5500  8>;
		alarm-gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
	};

	ns2-leds {
		compatible = "lacie,ns2-leds";

		blue-sata {
			label = "ns2:blue:sata";
			slow-gpio = <&gpio0 29 0>;
			cmd-gpio = <&gpio0 30 0>;
			modes-map = <NS_V2_LED_OFF  1 0
				     NS_V2_LED_ON   0 1
				     NS_V2_LED_ON   1 1
				     NS_V2_LED_SATA 0 0>;
		};
	};
};

&ethphy0 { reg = <8>; };


code:
// SPDX-License-Identifier: GPL-2.0
/dts-v1/;

#include <dt-bindings/leds/leds-ns2.h>
#include "kirkwood-ns2-common.dtsi"

/ {
	/* This machine is embedded in the first LaCie CloudBox product. */
	model = "LaCie Network Space Mini v2";
	compatible = "lacie,netspace_mini_v2", "marvell,kirkwood-88f6192", "marvell,kirkwood";

	memory {
		device_type = "memory";
		reg = <0x00000000 0x8000000>;
	};

	ocp@f1000000 {
		sata@80000 {
			pinctrl-0 = <&pmx_ns2_sata0>;
			pinctrl-names = "default";
			status = "okay";
			nr-ports = <1>;
		};
	};

	gpio_fan {
		compatible = "gpio-fan";
		gpios = <&gpio0 22 GPIO_ACTIVE_LOW
			 &gpio0  7 GPIO_ACTIVE_LOW
			 &gpio1  1 GPIO_ACTIVE_LOW
			 &gpio0 23 GPIO_ACTIVE_LOW>;
		gpio-fan,speed-map =
			<   0  0
			 3000 15
			 3180 14
			 4140 13
			 4570 12
			 6760 11
			 7140 10
			 7980  9
			 9200  8>;
		alarm-gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
	};

	ns2-leds {
		compatible = "lacie,ns2-leds";

		blue-sata {
			label = "ns2:blue:sata";
			slow-gpio = <&gpio0 29 0>;
			cmd-gpio = <&gpio0 30 0>;
			modes-map = <NS_V2_LED_OFF  1 0
				     NS_V2_LED_ON   0 1
				     NS_V2_LED_ON   1 1
				     NS_V2_LED_SATA 0 0>;
		};
	};
};

&ethphy0 { reg = <0>; };


code:
// SPDX-License-Identifier: GPL-2.0
/dts-v1/;

#include "kirkwood-nsa3x0-common.dtsi"

/ {
	compatible = "zyxel,nsa310", "marvell,kirkwood-88f6281", "marvell,kirkwood";

	memory {
		device_type = "memory";
		reg = <0x00000000 0x10000000>;
	};

	chosen {
		bootargs = "console=ttyS0,115200";
		stdout-path = &uart0;
	};

	ocp@f1000000 {
		pinctrl: pin-controller@10000 {
			pinctrl-0 = <&pmx_unknown>;
			pinctrl-names = "default";

			pmx_led_esata_green: pmx-led-esata-green {
				marvell,pins = "mpp12";
				marvell,function = "gpio";
			};

			pmx_led_esata_red: pmx-led-esata-red {
				marvell,pins = "mpp13";
				marvell,function = "gpio";
			};

			pmx_led_usb_green: pmx-led-usb-green {
				marvell,pins = "mpp15";
				marvell,function = "gpio";
			};

			pmx_led_usb_red: pmx-led-usb-red {
				marvell,pins = "mpp16";
				marvell,function = "gpio";
			};

			pmx_led_sys_green: pmx-led-sys-green {
				marvell,pins = "mpp28";
				marvell,function = "gpio";
			};

			pmx_led_sys_red: pmx-led-sys-red {
				marvell,pins = "mpp29";
				marvell,function = "gpio";
			};

			pmx_led_hdd_green: pmx-led-hdd-green {
				marvell,pins = "mpp41";
				marvell,function = "gpio";
			};

			pmx_led_hdd_red: pmx-led-hdd-red {
				marvell,pins = "mpp42";
				marvell,function = "gpio";
			};

			pmx_unknown: pmx-unknown {
				marvell,pins = "mpp44";
				marvell,function = "gpio";
			};

		};

		i2c@11000 {
			status = "okay";

			adt7476: adt7476a@2e {
				compatible = "adi,adt7476";
				reg = <0x2e>;
			};
		};
	};

	gpio-leds {
		compatible = "gpio-leds";
		pinctrl-0 = <&pmx_led_esata_green &pmx_led_esata_red
			     &pmx_led_usb_green &pmx_led_usb_red
			     &pmx_led_sys_green &pmx_led_sys_red
			     &pmx_led_copy_green &pmx_led_copy_red
			     &pmx_led_hdd_green &pmx_led_hdd_red>;
		pinctrl-names = "default";

		green-sys {
			label = "nsa310:green:sys";
			gpios = <&gpio0 28 GPIO_ACTIVE_HIGH>;
		};
		red-sys {
			label = "nsa310:red:sys";
			gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>;
		};
		green-hdd {
			label = "nsa310:green:hdd";
			gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>;
		};
		red-hdd {
			label = "nsa310:red:hdd";
			gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
		};
		green-esata {
			label = "nsa310:green:esata";
			gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
		};
		red-esata {
			label = "nsa310:red:esata";
			gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
		};
		green-usb {
			label = "nsa310:green:usb";
			gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
		};
		red-usb {
			label = "nsa310:red:usb";
			gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>;
		};
		green-copy {
			label = "nsa310:green:copy";
			gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
		};
		red-copy {
			label = "nsa310:red:copy";
			gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>;
		};
	};
};

&pciec {
	status = "okay";
};

&pcie0 {
	status = "okay";
};


code:
// SPDX-License-Identifier: GPL-2.0
/dts-v1/;

#include "kirkwood-nsa3x0-common.dtsi"

/*
 * There are at least two different NSA310 designs. This variant does
 * not have the red USB Led.
 */

/ {
	compatible = "zyxel,nsa310a", "zyxel,nsa310", "marvell,kirkwood-88f6281", "marvell,kirkwood";

	memory {
		device_type = "memory";
		reg = <0x00000000 0x10000000>;
	};

	chosen {
		bootargs = "console=ttyS0,115200";
		stdout-path = &uart0;
	};

	ocp@f1000000 {
		pinctrl: pin-controller@10000 {
			pinctrl-names = "default";

			pmx_led_esata_green: pmx-led-esata-green {
				marvell,pins = "mpp12";
				marvell,function = "gpio";
			};

			pmx_led_esata_red: pmx-led-esata-red {
				marvell,pins = "mpp13";
				marvell,function = "gpio";
			};

			pmx_led_usb_green: pmx-led-usb-green {
				marvell,pins = "mpp15";
				marvell,function = "gpio";
			};

			pmx_led_sys_green: pmx-led-sys-green {
				marvell,pins = "mpp28";
				marvell,function = "gpio";
			};

			pmx_led_sys_red: pmx-led-sys-red {
				marvell,pins = "mpp29";
				marvell,function = "gpio";
			};

			pmx_led_hdd_green: pmx-led-hdd-green {
				marvell,pins = "mpp41";
				marvell,function = "gpio";
			};

			pmx_led_hdd_red: pmx-led-hdd-red {
				marvell,pins = "mpp42";
				marvell,function = "gpio";
			};

		};

		i2c@11000 {
			status = "okay";

			lm85: lm85@2e {
				compatible = "national,lm85";
				reg = <0x2e>;
			};
		};
	};

	gpio-leds {
		compatible = "gpio-leds";

		green-sys {
			label = "nsa310:green:sys";
			gpios = <&gpio0 28 GPIO_ACTIVE_HIGH>;
		};
		red-sys {
			label = "nsa310:red:sys";
			gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>;
		};
		green-hdd {
			label = "nsa310:green:hdd";
			gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>;
		};
		red-hdd {
			label = "nsa310:red:hdd";
			gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
		};
		green-esata {
			label = "nsa310:green:esata";
			gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
		};
		red-esata {
			label = "nsa310:red:esata";
			gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
		};
		green-usb {
			label = "nsa310:green:usb";
			gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
		};
		green-copy {
			label = "nsa310:green:copy";
			gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
		};
		red-copy {
			label = "nsa310:red:copy";
			gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>;
		};
	};
};


code:
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
 * ZyXEL NSA310S Board Description
 * Copyright 2020-2022 Pawel Dembicki <paweldembicki@gmail.com>
 * Copyright (c) 2015-2021, Tony Dinh <mibodhi@gmail.com>
 * Copyright (c) 2014, Adam Baker <linux@baker-net.org.uk>
 * Based upon the board setup file created by Peter Schildmann
 */
/dts-v1/;

#include "kirkwood.dtsi"
#include "kirkwood-6281.dtsi"
#include <dt-bindings/leds/common.h>

/ {
	model = "ZyXEL NSA310S";
	compatible = "zyxel,nsa310s", "marvell,kirkwood-88f6702", "marvell,kirkwood";

	memory {
		device_type = "memory";
		reg = <0x00000000 0x10000000>;
	};

	chosen {
		bootargs = "console=ttyS0,115200n8 earlyprintk";
		stdout-path = &uart0;
	};

	gpio_poweroff {
		compatible = "gpio-poweroff";
		pinctrl-0 = <&pmx_pwr_off>;
		pinctrl-names = "default";
		gpios = <&gpio0 27 GPIO_ACTIVE_HIGH>;
	};

	keys {
		compatible = "gpio-keys";
		#address-cells = <1>;
		#size-cells = <0>;
		pinctrl-0 = <&pmx_buttons>;
		pinctrl-names = "default";

		power {
			label = "Power Button";
			linux,code = <KEY_POWER>;
			gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>;
		};

		copy {
			label = "Copy Button";
			linux,code = <KEY_COPY>;
			gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
		};

		reset {
			label = "Reset Button";
			linux,code = <KEY_RESTART>;
			gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
		};
	};

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

		led-1 {
			function = LED_FUNCTION_DISK_ERR;
			color = <LED_COLOR_ID_RED>;
			gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
		};

		led-2 {
			function = LED_FUNCTION_USB;
			color = <LED_COLOR_ID_GREEN>;
			gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "usb-host";
		};

		led-3 {
			function = LED_FUNCTION_DISK;
			color = <LED_COLOR_ID_GREEN>;
			gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "ata1";
		};

		led-4 {
			function = LED_FUNCTION_INDICATOR;
			color = <LED_COLOR_ID_GREEN>;
			gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>;
		};

		led-5 {
			function = LED_FUNCTION_INDICATOR;
			color = <LED_COLOR_ID_RED>;
			gpios = <&gpio0 23 GPIO_ACTIVE_HIGH>;
		};

		led-6 {
			function = LED_FUNCTION_STATUS;
			color = <LED_COLOR_ID_GREEN>;
			gpios = <&gpio0 28 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "default-on";
		};

		led-7 {
			function = LED_FUNCTION_STATUS;
			color = <LED_COLOR_ID_RED>;
			gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>;
		};
	};

	usb0_power: regulator@1 {
		compatible = "regulator-fixed";
		regulator-name = "USB Power";

		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;
		regulator-always-on;
		regulator-boot-on;
		gpio = <&gpio0 21 GPIO_ACTIVE_HIGH>;
	};

	sata1_power: regulator@2 {
		compatible = "regulator-fixed";
		regulator-name = "SATA1 Power";

		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;
		regulator-always-on;
		regulator-boot-on;
		gpio = <&gpio1 1 GPIO_ACTIVE_HIGH>;
	};

	thermal-zones {
		disk-thermal {
			polling-delay = <20000>;
			polling-delay-passive = <2000>;

			thermal-sensors = <&hdd_temp>;

			trips {
				disk_alert: disk-alert {
					temperature = <40000>;
					hysteresis = <5000>;
					type = "active";
				};
				disk_crit: disk-crit {
					temperature = <60000>;
					hysteresis = <2000>;
					type = "critical";
				};
			};
		};
	};
};

&eth0 {
	status = "okay";

	ethernet0-port@0 {
		phy-handle = <&ethphy0>;
	};
};

&i2c0 {
	status = "okay";

	rtc@68 {
		compatible = "htk,ht1382";
		reg = <0x68>;
	};
};

&mdio {
	status = "okay";

	ethphy0: ethernet-phy@1 {
		reg = <1>;
		phy-mode = "rgmii-id";
		marvell,reg-init = <0x1 0x16 0x0 0x3>,
				   <0x1 0x10 0x0 0x1017>,
				   <0x1 0x11 0x0 0x4408>,
				   <0x1 0x16 0x0 0x0>;
	};
};

&nand {
	status = "okay";
	chip-delay = <35>;

	partition@0 {
		label = "uboot";
		reg = <0x0000000 0x00c0000>;
		read-only;
	};
	partition@c0000 {
		label = "uboot_env";
		reg = <0x00c0000 0x0080000>;
	};
	partition@140000 {
		label = "ubi";
		reg = <0x0140000 0x7ec0000>;
	};
};

&pciec {
	status = "okay";
};

&pcie0 {
	status = "okay";
};

&pinctrl {
	pinctrl-names = "default";

	pmx_buttons: pmx-buttons {
		marvell,pins = "mpp24", "mpp25", "mpp26";
		marvell,function = "gpio";
	};

	pmx_leds: pmx-leds {
		marvell,pins = "mpp13", "mpp15", "mpp16", "mpp22", "mpp23",
						"mpp28", "mpp29";
		marvell,function = "gpio";
	};

	pmx_power: pmx-power {
		marvell,pins = "mpp21", "mpp33";
		marvell,function = "gpio";
	};

	pmx_pwr_off: pmx-pwr-off {
		marvell,pins = "mpp27";
		marvell,function = "gpio";
	};
};

&rtc {
	status = "disabled";
};

&sata {
	status = "okay";
	nr-ports = <1>;
	#address-cells = <1>;
	#size-cells = <0>;

	hdd_temp: sata-port@0 {
		reg = <0>;
		#thermal-sensor-cells = <0>;
	};
};

&uart0 {
	status = "okay";
};


code:
// SPDX-License-Identifier: GPL-2.0+
/* Device tree file for the Zyxel NSA 320 NAS box.
 *
 * Copyright (c) 2014, Adam Baker <linux@baker-net.org.uk>
 *
 *
 * Based upon the board setup file created by Peter Schildmann */

/dts-v1/;

#include "kirkwood-nsa3x0-common.dtsi"

/ {
	model = "Zyxel NSA320";
	compatible = "zyxel,nsa320", "marvell,kirkwood-88f6281", "marvell,kirkwood";

	memory {
		device_type = "memory";
		reg = <0x00000000 0x20000000>;
	};

	chosen {
		bootargs = "console=ttyS0,115200";
		stdout-path = &uart0;
	};

	ocp@f1000000 {
		pinctrl: pin-controller@10000 {
			pinctrl-names = "default";

			/* SATA Activity and Present pins are not connected */
			pmx_sata0: pmx-sata0 {
				marvell,pins ;
				marvell,function = "sata0";
			};

			pmx_sata1: pmx-sata1 {
				marvell,pins ;
				marvell,function = "sata1";
			};

			pmx_led_hdd2_green: pmx-led-hdd2-green {
				marvell,pins = "mpp12";
				marvell,function = "gpio";
			};

			pmx_led_hdd2_red: pmx-led-hdd2-red {
				marvell,pins = "mpp13";
				marvell,function = "gpio";
			};

			pmx_mcu_data: pmx-mcu-data {
				marvell,pins = "mpp14";
				marvell,function = "gpio";
			};

			pmx_led_usb_green: pmx-led-usb-green {
				marvell,pins = "mpp15";
				marvell,function = "gpio";
			};

			pmx_mcu_clk: pmx-mcu-clk {
				marvell,pins = "mpp16";
				marvell,function = "gpio";
			};

			pmx_mcu_act: pmx-mcu-act {
				marvell,pins = "mpp17";
				marvell,function = "gpio";
			};

			pmx_led_sys_green: pmx-led-sys-green {
				marvell,pins = "mpp28";
				marvell,function = "gpio";
			};

			pmx_led_sys_orange: pmx-led-sys-orange {
				marvell,pins = "mpp29";
				marvell,function = "gpio";
			};

			pmx_led_hdd1_green: pmx-led-hdd1-green {
				marvell,pins = "mpp41";
				marvell,function = "gpio";
			};

			pmx_led_hdd1_red: pmx-led-hdd1-red {
				marvell,pins = "mpp42";
				marvell,function = "gpio";
			};

			pmx_htp: pmx-htp {
				marvell,pins = "mpp43";
				marvell,function = "gpio";
			};

			/* Buzzer needs to be switched at around 1kHz so is
			   not compatible with the gpio-beeper driver. */
			pmx_buzzer: pmx-buzzer {
				marvell,pins = "mpp44";
				marvell,function = "gpio";
			};

			pmx_vid_b1: pmx-vid-b1 {
				marvell,pins = "mpp45";
				marvell,function = "gpio";
			};

			pmx_power_resume_data: pmx-power-resume-data {
				marvell,pins = "mpp47";
				marvell,function = "gpio";
			};

			pmx_power_resume_clk: pmx-power-resume-clk {
				marvell,pins = "mpp49";
				marvell,function = "gpio";
			};
		};

		i2c@11000 {
			status = "okay";

			pcf8563: pcf8563@51 {
				compatible = "nxp,pcf8563";
				reg = <0x51>;
			};
		};
	};

	regulators {
		usb0_power: regulator@1 {
			enable-active-high;
		};
	};

	gpio-leds {
		compatible = "gpio-leds";
		pinctrl-0 = <&pmx_led_hdd2_green &pmx_led_hdd2_red
			     &pmx_led_usb_green
			     &pmx_led_sys_green &pmx_led_sys_orange
			     &pmx_led_copy_green &pmx_led_copy_red
			     &pmx_led_hdd1_green &pmx_led_hdd1_red>;
		pinctrl-names = "default";

		green-sys {
			label = "nsa320:green:sys";
			gpios = <&gpio0 28 GPIO_ACTIVE_HIGH>;
		};
		orange-sys {
			label = "nsa320:orange:sys";
			gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>;
		};
		green-hdd1 {
			label = "nsa320:green:hdd1";
			gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>;
		};
		red-hdd1 {
			label = "nsa320:red:hdd1";
			gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
		};
		green-hdd2 {
			label = "nsa320:green:hdd2";
			gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
		};
		red-hdd2 {
			label = "nsa320:red:hdd2";
			gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
		};
		green-usb {
			label = "nsa320:green:usb";
			gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
		};
		green-copy {
			label = "nsa320:green:copy";
			gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
		};
		red-copy {
			label = "nsa320:red:copy";
			gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>;
		};
	};

	hwmon {
		compatible = "zyxel,nsa320-mcu";
		pinctrl-0 = <&pmx_mcu_data &pmx_mcu_clk &pmx_mcu_act>;
		pinctrl-names = "default";

		data-gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
		clk-gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>;
		act-gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
	};

	/* The following pins are currently not assigned to a driver,
	   some of them should be configured as inputs.
	pinctrl-0 = <&pmx_htp &pmx_vid_b1
		     &pmx_power_resume_data &pmx_power_resume_clk>; */
};

&mdio {
	status = "okay";
	ethphy0: ethernet-phy@1 {
		reg = <1>;
	};
};

&eth0 {
	status = "okay";
	ethernet0-port@0 {
		phy-handle = <&ethphy0>;
	};
};

&pciec {
	status = "okay";
};

&pcie0 {
	status = "okay";
};


code:
// SPDX-License-Identifier: GPL-2.0+
/* Device tree file for the Zyxel NSA 325 NAS box.
 *
 * Copyright (c) 2015, Hans Ulli Kroll <ulli.kroll@googlemail.com>
 *
 *
 * Based upon the board setup file created by Peter Schildmann
 */

/dts-v1/;

#include "kirkwood-nsa3x0-common.dtsi"

/ {
	model = "ZyXEL NSA325";
	compatible = "zyxel,nsa325", "marvell,kirkwood-88f6282", "marvell,kirkwood";

	memory {
		device_type = "memory";
		reg = <0x00000000 0x20000000>;
	};

	chosen {
		bootargs = "console=ttyS0,115200";
		stdout-path = &uart0;
	};

	ocp@f1000000 {
		pinctrl: pin-controller@10000 {
			pinctrl-names = "default";

			pmx_led_hdd2_green: pmx-led-hdd2-green {
				marvell,pins = "mpp12";
				marvell,function = "gpio";
			};

			pmx_led_hdd2_red: pmx-led-hdd2-red {
				marvell,pins = "mpp13";
				marvell,function = "gpio";
			};

			pmx_mcu_data: pmx-mcu-data {
				marvell,pins = "mpp14";
				marvell,function = "gpio";
			};

			pmx_led_usb_green: pmx-led-usb-green {
				marvell,pins = "mpp15";
				marvell,function = "gpio";
			};

			pmx_mcu_clk: pmx-mcu-clk {
				marvell,pins = "mpp16";
				marvell,function = "gpio";
			};

			pmx_mcu_act: pmx-mcu-act {
				marvell,pins = "mpp17";
				marvell,function = "gpio";
			};

			pmx_led_sys_green: pmx-led-sys-green {
				marvell,pins = "mpp28";
				marvell,function = "gpio";
			};

			pmx_led_sys_orange: pmx-led-sys-orange {
				marvell,pins = "mpp29";
				marvell,function = "gpio";
			};

			pmx_led_hdd1_green: pmx-led-hdd1-green {
				marvell,pins = "mpp41";
				marvell,function = "gpio";
			};

			pmx_led_hdd1_red: pmx-led-hdd1-red {
				marvell,pins = "mpp42";
				marvell,function = "gpio";
			};

			pmx_htp: pmx-htp {
				marvell,pins = "mpp43";
				marvell,function = "gpio";
			};

			/*
			 * Buzzer needs to be switched at around 1kHz so is
			 * not compatible with the gpio-beeper driver.
			 */
			pmx_buzzer: pmx-buzzer {
				marvell,pins = "mpp44";
				marvell,function = "gpio";
			};

			pmx_vid_b1: pmx-vid-b1 {
				marvell,pins = "mpp45";
				marvell,function = "gpio";
			};

			pmx_power_resume_data: pmx-power-resume-data {
				marvell,pins = "mpp47";
				marvell,function = "gpio";
			};

			pmx_power_resume_clk: pmx-power-resume-clk {
				marvell,pins = "mpp49";
				marvell,function = "gpio";
			};

			pmx_pwr_sata1: pmx-pwr-sata1 {
				marvell,pins = "mpp47";
				marvell,function = "gpio";
			};
		};

		/* This board uses the pcf8563 RTC instead of the SoC RTC */
		rtc@10300 {
			status = "disabled";
		};

		i2c@11000 {
			status = "okay";

			pcf8563: pcf8563@51 {
				compatible = "nxp,pcf8563";
				reg = <0x51>;
			};
		};
	};

	regulators {
		compatible = "simple-bus";
		#address-cells = <1>;
		#size-cells = <0>;
		pinctrl-0 = <&pmx_pwr_sata1>;
		pinctrl-names = "default";

		usb0_power: regulator@1 {
			enable-active-high;
		};

		sata1_power: regulator@2 {
			compatible = "regulator-fixed";
			reg = <2>;
			regulator-name = "SATA1 Power";
			regulator-min-microvolt = <5000000>;
			regulator-max-microvolt = <5000000>;
			regulator-always-on;
			regulator-boot-on;
			enable-active-high;
			gpio = <&gpio1 15 GPIO_ACTIVE_HIGH>;
		};
	};

	gpio-leds {
		compatible = "gpio-leds";
		pinctrl-0 = <&pmx_led_hdd2_green &pmx_led_hdd2_red
			     &pmx_led_usb_green
			     &pmx_led_sys_green &pmx_led_sys_orange
			     &pmx_led_copy_green &pmx_led_copy_red
			     &pmx_led_hdd1_green &pmx_led_hdd1_red>;
		pinctrl-names = "default";

		green-sys {
			label = "nsa325:green:sys";
			gpios = <&gpio0 28 GPIO_ACTIVE_HIGH>;
		};
		orange-sys {
			label = "nsa325:orange:sys";
			gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>;
		};
		green-hdd1 {
			label = "nsa325:green:hdd1";
			gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>;
		};
		red-hdd1 {
			label = "nsa325:red:hdd1";
			gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
		};
		green-hdd2 {
			label = "nsa325:green:hdd2";
			gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
		};
		red-hdd2 {
			label = "nsa325:red:hdd2";
			gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
		};
		green-usb {
			label = "nsa325:green:usb";
			gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
		};
		green-copy {
			label = "nsa325:green:copy";
			gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
		};
		red-copy {
			label = "nsa325:red:copy";
			gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>;
		};

	/* The following pins are currently not assigned to a driver,
	   some of them should be configured as inputs.
	pinctrl-0 = <&pmx_mcu_data &pmx_mcu_clk &pmx_mcu_act
		     &pmx_htp &pmx_vid_b1
		     &pmx_power_resume_data &pmx_power_resume_clk>; */
	};

};

&mdio {
	status = "okay";
	ethphy0: ethernet-phy@1 {
		reg = <1>;
	};
};

&eth0 {
	status = "okay";
	ethernet0-port@0 {
		phy-handle = <&ethphy0>;
	};
};

&pciec {
	status = "okay";
};

&pcie0 {
	status = "okay";
};


code:
// SPDX-License-Identifier: GPL-2.0
#include "kirkwood.dtsi"
#include "kirkwood-6281.dtsi"

/ {
	model = "ZyXEL NSA310";

	ocp@f1000000 {
		pinctrl: pin-controller@10000 {

			pmx_usb_power: pmx-usb-power {
				marvell,pins = "mpp21";
				marvell,function = "gpio";
			};

			pmx_pwr_off: pmx-pwr-off {
				marvell,pins = "mpp48";
				marvell,function = "gpio";
			};

			pmx_btn_reset: pmx-btn-reset {
				marvell,pins = "mpp36";
				marvell,function = "gpio";
			};

			pmx_btn_copy: pmx-btn-copy {
				marvell,pins = "mpp37";
				marvell,function = "gpio";
			};

			pmx_btn_power: pmx-btn-power {
				marvell,pins = "mpp46";
				marvell,function = "gpio";
			};

			pmx_led_copy_green: pmx-led-copy-green {
				marvell,pins = "mpp39";
				marvell,function = "gpio";
			};

			pmx_led_copy_red: pmx-led-copy-red {
				marvell,pins = "mpp40";
				marvell,function = "gpio";
			};
		};

		serial@12000 {
			status = "okay";
		};

		sata@80000 {
			status = "okay";
			nr-ports = <2>;
		};
	};

	gpio_poweroff {
		compatible = "gpio-poweroff";
		pinctrl-0 = <&pmx_pwr_off>;
		pinctrl-names = "default";
		gpios = <&gpio1 16 GPIO_ACTIVE_HIGH>;
	};

	gpio_keys {
		compatible = "gpio-keys";
		#address-cells = <1>;
		#size-cells = <0>;
		pinctrl-0 = <&pmx_btn_reset &pmx_btn_copy &pmx_btn_power>;
		pinctrl-names = "default";

		power {
			label = "Power Button";
			linux,code = <KEY_POWER>;
			gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
		};
		copy {
			label = "Copy Button";
			linux,code = <KEY_COPY>;
			gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
		};
		reset {
			label = "Reset Button";
			linux,code = <KEY_RESTART>;
			gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
		};
	};

	regulators {
		compatible = "simple-bus";
		#address-cells = <1>;
		#size-cells = <0>;
		pinctrl-0 = <&pmx_usb_power>;
		pinctrl-names = "default";

		usb0_power: regulator@1 {
			compatible = "regulator-fixed";
			reg = <1>;
			regulator-name = "USB Power";
			regulator-min-microvolt = <5000000>;
			regulator-max-microvolt = <5000000>;
			regulator-always-on;
			regulator-boot-on;
			gpio = <&gpio0 21 GPIO_ACTIVE_HIGH>;
		};
	};
};

&nand {
	status = "okay";
	chip-delay = <35>;

	partition@0 {
		label = "uboot";
		reg = <0x0000000 0x0100000>;
		read-only;
	};
	partition@100000 {
		label = "uboot_env";
		reg = <0x0100000 0x0080000>;
	};
	partition@180000 {
		label = "key_store";
		reg = <0x0180000 0x0080000>;
	};
	partition@200000 {
		label = "info";
		reg = <0x0200000 0x0080000>;
	};
	partition@280000 {
		label = "etc";
		reg = <0x0280000 0x0a00000>;
	};
	partition@c80000 {
		label = "kernel_1";
		reg = <0x0c80000 0x0a00000>;
	};
	partition@1680000 {
		label = "rootfs1";
		reg = <0x1680000 0x2fc0000>;
	};
	partition@4640000 {
		label = "kernel_2";
		reg = <0x4640000 0x0a00000>;
	};
	partition@5040000 {
		label = "rootfs2";
		reg = <0x5040000 0x2fc0000>;
	};
};

&pciec {
	status = "okay";
};

&pcie0 {
	status = "okay";
};


code:
// SPDX-License-Identifier: GPL-2.0
/dts-v1/;

#include "kirkwood.dtsi"
#include "kirkwood-6282.dtsi"

/ {
	model = "Plat'Home OpenBlocksA6";
	compatible = "plathome,openblocks-a6", "marvell,kirkwood-88f6283", "marvell,kirkwood";

	memory {
		device_type = "memory";
		reg = <0x00000000 0x20000000>;
	};

	chosen {
		bootargs = "console=ttyS0,115200n8 earlyprintk";
		stdout-path = &uart0;
	};

	ocp@f1000000 {
		serial@12000 {
			status = "okay";
		};

		serial@12100 {
			status = "okay";
		};

		sata@80000 {
			nr-ports = <1>;
			status = "okay";
		};

		i2c@11100 {
			status = "okay";

			s35390a: s35390a@30 {
				compatible = "sii,s35390a";
				reg = <0x30>;
			};
		};

		pinctrl: pin-controller@10000 {
			pinctrl-0 = <&pmx_dip_switches>;
			pinctrl-names = "default";

			pmx_uart0: pmx-uart0 {
				marvell,pins = "mpp10", "mpp11", "mpp15",
					"mpp16";
				marvell,function = "uart0";
			};

			pmx_uart1: pmx-uart1 {
				marvell,pins = "mpp13", "mpp14", "mpp8",
					"mpp9";
				marvell,function = "uart1";
			};

			pmx_sysrst: pmx-sysrst {
				marvell,pins = "mpp6";
				marvell,function = "sysrst";
			};

			pmx_dip_switches: pmx-dip-switches {
				marvell,pins = "mpp20", "mpp21", "mpp22", "mpp23";
				marvell,function = "gpio";
			};

			pmx_gpio_header: pmx-gpio-header {
				marvell,pins = "mpp24", "mpp25", "mpp26", "mpp27",
					       "mpp28", "mpp29", "mpp30", "mpp31";
				marvell,function = "gpio";
			};

			pmx_gpio_init: pmx-init {
				marvell,pins = "mpp38";
				marvell,function = "gpio";
			};

			pmx_usb_oc: pmx-usb-oc {
				marvell,pins = "mpp39";
				marvell,function = "gpio";
			};

			pmx_leds: pmx-leds {
				marvell,pins = "mpp41", "mpp42", "mpp43";
				marvell,function = "gpio";
			};
		};
	};

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

		led-red {
			label = "obsa6:red:stat";
			gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
		};

		led-green {
			label = "obsa6:green:stat";
			gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
		};

		led-yellow {
			label = "obsa6:yellow:stat";
			gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
		};
        };

	gpio_keys {
		compatible = "gpio-keys";
		pinctrl-0 = <&pmx_gpio_init>;
		pinctrl-names = "default";
		#address-cells = <1>;
		#size-cells = <0>;

		power {
			label = "Init Button";
			linux,code = <KEY_POWER>;
			gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>;
		};
	};
};

&nand {
	chip-delay = <25>;
	status = "okay";

	partition@0 {
		label = "uboot";
		reg = <0x0 0x90000>;
	};

	partition@90000 {
		label = "env";
		reg = <0x90000 0x44000>;
	};

	partition@d4000 {
		label = "test";
		reg = <0xd4000 0x20000>;
	};

	partition@f4000 {
		label = "conf";
		reg = <0xf4000 0x400000>;
	};

	partition@4f4000 {
		label = "linux";
		reg = <0x4f4000 0x1d20000>;
	};

	partition@2214000 {
		label = "user";
		reg = <0x2214000 0x1dec000>;
	};
};

&mdio {
	status = "okay";

	ethphy0: ethernet-phy@0 {
		reg = <0>;
	};
};

&eth0 {
	status = "okay";
	ethernet0-port@0 {
		phy-handle = <&ethphy0>;
	};
};

&gpio0 {
	status = "okay";

	pinctrl-0 = <&pmx_gpio_header>;
	pinctrl-names = "default";
};


code:
// SPDX-License-Identifier: GPL-2.0
/*
 * Device Tree file for OpenBlocks A7 board
 *
 * Copyright (C) 2013 Free Electrons
 *
 * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
 *
 */

/dts-v1/;

#include "kirkwood.dtsi"
#include "kirkwood-6282.dtsi"

/ {
	model = "Plat'Home OpenBlocksA7";
	compatible = "plathome,openblocks-a7", "marvell,kirkwood-88f6283", "marvell,kirkwood";

	memory {
		device_type = "memory";
		reg = <0x00000000 0x40000000>; /* 1 GB */
	};

	chosen {
		bootargs = "console=ttyS0,115200n8 earlyprintk";
		stdout-path = &uart0;
	};

	ocp@f1000000 {
		serial@12000 {
			status = "okay";
		};

		serial@12100 {
			status = "okay";
		};

		sata@80000 {
			nr-ports = <1>;
			status = "okay";
		};

		i2c@11100 {
			status = "okay";

			s24c02: s24c02@50 {
				compatible = "atmel,24c02";
				reg = <0x50>;
			};
		};

		pinctrl: pin-controller@10000 {
			pinctrl-0 = <&pmx_dip_switches &pmx_gpio_header
				     &pmx_gpio_header_gpo>;
			pinctrl-names = "default";

			pmx_uart0: pmx-uart0 {
				marvell,pins = "mpp10", "mpp11", "mpp15",
					"mpp16";
				marvell,function = "uart0";
			};

			pmx_uart1: pmx-uart1 {
				marvell,pins = "mpp13", "mpp14", "mpp8",
					"mpp9";
				marvell,function = "uart1";
			};

			pmx_sysrst: pmx-sysrst {
				marvell,pins = "mpp6";
				marvell,function = "sysrst";
			};

			pmx_dip_switches: pmx-dip-switches {
				marvell,pins = "mpp44", "mpp45", "mpp46", "mpp47";
				marvell,function = "gpio";
			};

			/*
			 * Accessible on connector J202. The MPP
			 * listed below are pin 1-7, pin 8 is unused,
			 * pin 9 is external reset input and pin 10 is
			 * ground.
			 */
			pmx_gpio_header: pmx-gpio-header {
				marvell,pins = "mpp17", "mpp29", "mpp28",
					       "mpp35", "mpp34", "mpp40";
				marvell,function = "gpio";
			};

			pmx_gpio_header_gpo: pxm-gpio-header-gpo {
				marvell,pins = "mpp7";
				marvell,function = "gpo";
			};

			pmx_gpio_init: pmx-init {
				marvell,pins = "mpp38";
				marvell,function = "gpio";
			};

			pmx_usb_oc: pmx-usb-oc {
				marvell,pins = "mpp39";
				marvell,function = "gpio";
			};

			pmx_leds: pmx-leds {
				marvell,pins = "mpp41", "mpp42", "mpp43";
				marvell,function = "gpio";
			};
		};
	};

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

		led-red {
			label = "obsa7:red:stat";
			gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
		};

		led-green {
			label = "obsa7:green:stat";
			gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
		};

		led-yellow {
			label = "obsa7:yellow:stat";
			gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
		};
        };

	gpio_keys {
		compatible = "gpio-keys";
		pinctrl-0 = <&pmx_gpio_init>;
		pinctrl-names = "default";
		#address-cells = <1>;
		#size-cells = <0>;

		button {
			label = "Init Button";
			linux,code = <KEY_POWER>;
			gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>;
		};
	};
};

&nand {
	chip-delay = <25>;
	status = "okay";

	partition@0 {
		label = "uboot";
		reg = <0x0 0x1c0000>;
	};

	partition@1c0000 {
		label = "env";
		reg = <0x1c0000 0x2c0000>;
	};

	partition@480000 {
		label = "test";
		reg = <0x480000 0x160000>;
	};

	partition@5e0000 {
		label = "conf";
		reg = <0x5e0000 0x540000>;
	};

	partition@b20000 {
		label = "linux";
		reg = <0xb20000 0x3d40000>;
	};

	partition@4860000 {
		label = "user";
		reg = <0x4860000 0xb7a0000>;
	};
};

&mdio {
	status = "okay";

	ethphy0: ethernet-phy@0 {
		reg = <0>;
	};

	ethphy1: ethernet-phy@1 {
		reg = <1>;
	};
};

&eth0 {
	status = "okay";
	ethernet0-port@0 {
		phy-handle = <&ethphy0>;
	};
};

&eth1 {
	status = "okay";
	ethernet1-port@0 {
		phy-handle = <&ethphy1>;
	};
};


code:
// SPDX-License-Identifier: GPL-2.0
/*
 * Marvell OpenRD Base Board Description
 *
 * Andrew Lunn <andrew@lunn.ch>
 *
 * This file contains the definitions that are specific to OpenRD
 * base variant of the Marvell Kirkwood Development Board.
 */

/dts-v1/;

#include "kirkwood-openrd.dtsi"

/ {
	model = "OpenRD Base";
	compatible = "marvell,openrd-base", "marvell,openrd", "marvell,kirkwood-88f6281", "marvell,kirkwood";

	ocp@f1000000 {
		serial@12100 {
			status = "okay";
		};
	};
};

&mdio {
	status = "okay";

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

&eth0 {
	status = "okay";
	ethernet0-port@0 {
		phy-handle = <&ethphy0>;
	};
};