Add OpenWrt patchset against r39746
authorandy
Mon, 24 Feb 2014 22:28:49 +0100
changeset 7 223820522d49
parent 5 bca986acd412
child 8 ba7a60ad7687
Add OpenWrt patchset against r39746
openwrt/openwrt-dns320l.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/openwrt/openwrt-dns320l.patch	Mon Feb 24 22:28:49 2014 +0100
@@ -0,0 +1,268 @@
+Index: target/linux/kirkwood/config-3.10
+===================================================================
+--- target/linux/kirkwood/config-3.10	(revision 39746)
++++ target/linux/kirkwood/config-3.10	(working copy)
+@@ -23,6 +23,7 @@
+ # CONFIG_ARPD is not set
+ CONFIG_ATAGS=y
+ CONFIG_BLK_DEV_SD=y
++# CONFIG_BRANCH_PROFILE_NONE is not set
+ CONFIG_CACHE_FEROCEON_L2=y
+ # CONFIG_CACHE_FEROCEON_L2_WRITETHROUGH is not set
+ # CONFIG_CACHE_L2X0 is not set
+@@ -54,12 +55,15 @@
+ CONFIG_CRYPTO_HASH=y
+ CONFIG_CRYPTO_HASH2=y
+ CONFIG_CRYPTO_LZO=y
++CONFIG_DEBUG_LL=y
+ CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S"
++CONFIG_DEBUG_LL_UART_NONE=y
+ # CONFIG_DEBUG_PINCTRL is not set
+ # CONFIG_DEBUG_USER is not set
+ # CONFIG_DLCI is not set
+ CONFIG_DNOTIFY=y
+ CONFIG_DTC=y
++CONFIG_EARLY_PRINTK=y
+ CONFIG_EXT4_FS=y
+ CONFIG_FRAME_POINTER=y
+ CONFIG_FS_MBCACHE=y
+Index: target/linux/kirkwood/image/Makefile
+===================================================================
+--- target/linux/kirkwood/image/Makefile	(revision 39746)
++++ target/linux/kirkwood/image/Makefile	(working copy)
+@@ -129,6 +129,9 @@
+ Image/BuildKernel/Template/POGOE02=$(call Image/BuildKernel/Template,pogo_e02)
+ Image/InstallKernel/Template/POGOE02=$(call Image/InstallKernel/Template,pogo_e02)
+ 
++Image/BuildKernel/Template/DNS320L=$(call Image/BuildKernel/Template,dns320l)
++Image/InstallKernel/Template/DNS320L=$(call Image/InstallKernel/Template,dns320l)
++
+ define Image/BuildKernel
+ 	$(call Image/BuildKernel/Template/$(PROFILE))
+ endef
+Index: target/linux/kirkwood/patches-3.10/130-dns320l.patch
+===================================================================
+--- target/linux/kirkwood/patches-3.10/130-dns320l.patch	(revision 0)
++++ target/linux/kirkwood/patches-3.10/130-dns320l.patch	(working copy)
+@@ -0,0 +1,200 @@
++--- /dev/null
+++++ b/arch/arm/boot/dts/kirkwood-dns320l.dts
++@@ -0,0 +1,187 @@
+++/dts-v1/;
+++
+++#include "kirkwood.dtsi"
+++#include "kirkwood-6281.dtsi"
+++
+++/ {
+++	model = "D-Link DNS-320L";
+++	compatible = "dlink,dns-320l", "marvell,kirkwood-88f6702", "marvell,kirkwood";
+++
+++	memory {
+++		device_type = "memory";
+++		reg = <0x00000000 0x10000000>;
+++	};
+++
+++	chosen {
+++		bootargs = "console=ttyS0,115200 earlyprintk";
+++	};
+++
+++	ocp@f1000000 {
+++		serial@12000 {
+++			status = "okay";
+++		};
+++
+++		serial@12100 {
+++			pinctrl-0 = <&pmx_uart1>;
+++			pinctrl-names = "default";
+++			status = "okay";
+++		};
+++
+++		pinctrl: pinctrl@10000 {
+++
+++			pinctrl-0 = <&pmx_button_power>;
+++			pinctrl-names = "default";
+++
+++			pmx_sata0: pmx-sata0 {
+++				marvell,pins = "mpp20";
+++				marvell,function = "sata1";
+++			};
+++			pmx_sata1: pmx-sata1 {
+++				marvell,pins = "mpp21";
+++				marvell,function = "sata0";
+++			};
+++			pmx_led_red_right_hdd: pmx-led-red-right-hdd {
+++			    marvell,pins = "mpp22";
+++			    marvell,function = "gpio";
+++			};
+++			pmx_led_red_left_hdd: pmx-led-red-left-hdd {
+++			    marvell,pins = "mpp23";
+++			    marvell,function = "gpio";
+++			};
+++			pmx_power_sata: pmx-power-sata {
+++			    marvell,pins = "mpp24";
+++			    marvell,function = "gpio";
+++			};
+++			pmx_led_usb_blue: pmx-led-usb-blue {
+++			    marvell,pins = "mpp25";
+++			    marvell,function = "gpio";
+++			};
+++			pmx_led_usb_orange: pmx-led-usb-orange {
+++				marvell,pins = "mpp26";
+++				marvell,function = "gpio";
+++			};
+++			pmx_button_usb_copy: pmx-button-usb-copy {
+++				marvell,pins = "mpp27";
+++				marvell,function = "gpio";
+++			};			
+++			pmx_button_reset: pmx-button-reset {
+++				marvell,pins = "mpp28";
+++				marvell,function = "gpio";
+++			};
+++			pmx_button_power: pmx-button-power { // I can't get this one to trigger a button press...
+++				marvell,pins = "mpp29";
+++				marvell,function = "gpio";
+++			};						
+++		};
+++		sata@80000 {
+++			status = "okay";
+++			nr-ports = <2>;
+++		};
+++
+++		nand@3000000 {
+++			pinctrl-0 = <&pmx_nand>;
+++			pinctrl-names = "default";
+++			status = "okay";
+++			chip-delay = <40>;
+++
+++			partition@0 {
+++				label = "u-boot";
+++				reg = <0x0000000 0x100000>;
+++			};
+++
+++			partition@100000 {
+++				label = "uImage";
+++				reg = <0x0100000 0x400000>;
+++			};
+++
+++			partition@500000 {
+++				label = "rootfs";
+++				reg = <0x0500000 0x2000000>;
+++			};
+++
+++			partition@2500000 {
+++				label = "data";
+++				reg = <0x2500000 0x5b00000>;
+++			};
+++		};
+++	};
+++
+++	gpio_keys {
+++		compatible = "gpio-keys";
+++		pinctrl-0 = <&pmx_button_reset &pmx_button_usb_copy>;
+++		pinctrl-names = "default";
+++		#address-cells = <1>;
+++		#size-cells = <0>;
+++
+++		button@1 {
+++			label = "Reset push button";
+++			linux,code = <0x198>;
+++			gpios = <&gpio0 28 1>;
+++		};
+++		button@2 {
+++			label = "USB unmount button";
+++			linux,code = <161>;
+++			gpios = <&gpio0 27 1>;
+++		};
+++	};
+++
+++	gpio-leds {
+++		compatible = "gpio-leds";
+++		pinctrl-0 = <&pmx_led_usb_blue &pmx_led_usb_orange
+++			     &pmx_led_red_left_hdd &pmx_led_red_right_hdd>;
+++		pinctrl-names = "default";
+++
+++		blue-usb {
+++			label = "dns320l:blue:usb";
+++			gpios = <&gpio0 25 0>; 
+++		};
+++		orange-l_hdd {
+++			label = "dns320l:orange:l_hdd";
+++			gpios = <&gpio0 22 0>; 
+++		};
+++		orange-r_hdd {
+++			label = "dns320l:orange:r_hdd";
+++			gpios = <&gpio0 23 0>; 
+++		};
+++		orange-usb {
+++			label = "dns320l:orange:usb";
+++			gpios = <&gpio0 26 0>; 
+++		};
+++	};
+++
+++	regulators {
+++		compatible = "simple-bus";
+++		#address-cells = <1>;
+++		#size-cells = <0>;
+++		pinctrl-0 = <&pmx_power_sata>;
+++		pinctrl-names = "default";
+++
+++		sata_power: regulator@1 {
+++			compatible = "regulator-fixed";
+++			reg = <1>;
+++			regulator-name = "SATA Power";
+++			regulator-min-microvolt = <5000000>;
+++			regulator-max-microvolt = <5000000>;
+++			enable-active-high;
+++			regulator-always-on;
+++			regulator-boot-on;
+++			gpio = <&gpio1 24 0>;
+++		};
+++	};
+++};
+++
+++&mdio {
+++	status = "okay";
+++
+++	ethphy0: ethernet-phy@0 {
+++		device_type = "ethernet-phy";
+++		reg = <0>;
+++	};
+++};
+++
+++&eth0 {
+++	status = "okay";
+++	ethernet0-port@0 {
+++		phy-handle = <&ethphy0>;
+++	};
+++};
++--- a/arch/arm/boot/dts/Makefile
+++++ b/arch/arm/boot/dts/Makefile
++@@ -67,6 +67,7 @@ dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-
++ 	kirkwood-db-88f6281.dtb \
++ 	kirkwood-db-88f6282.dtb \
++ 	kirkwood-dns320.dtb \
+++	kirkwood-dns320l.dtb \
++ 	kirkwood-dns325.dtb \
++ 	kirkwood-dockstar.dtb \
++ 	kirkwood-dreamplug.dtb \
+Index: target/linux/kirkwood/profiles/110-nas.mk
+===================================================================
+--- target/linux/kirkwood/profiles/110-nas.mk	(revision 39746)
++++ target/linux/kirkwood/profiles/110-nas.mk	(working copy)
+@@ -69,3 +69,16 @@
+ ICONNECT_UBI_OPTS:="-m 2048 -p 128KiB -s 512"
+ 
+ $(eval $(call Profile,ICONNECT))
++
++define Profile/DNS320L
++   NAME:=D-Link DNS320L
++   PACKAGES:= \
++     kmod-ata-core kmod-ata-marvell-sata \
++     kmod-usb2 kmod-usb-storage
++endef
++
++define Profile/DNS320L/Description
++ Package set compatible with D-Link DNS320L NAS
++endef
++
++$(eval $(call Profile,DNS320L))