openwrt/openwrt-dns320l.patch
changeset 7 223820522d49
equal deleted inserted replaced
5:bca986acd412 7:223820522d49
       
     1 Index: target/linux/kirkwood/config-3.10
       
     2 ===================================================================
       
     3 --- target/linux/kirkwood/config-3.10	(revision 39746)
       
     4 +++ target/linux/kirkwood/config-3.10	(working copy)
       
     5 @@ -23,6 +23,7 @@
       
     6  # CONFIG_ARPD is not set
       
     7  CONFIG_ATAGS=y
       
     8  CONFIG_BLK_DEV_SD=y
       
     9 +# CONFIG_BRANCH_PROFILE_NONE is not set
       
    10  CONFIG_CACHE_FEROCEON_L2=y
       
    11  # CONFIG_CACHE_FEROCEON_L2_WRITETHROUGH is not set
       
    12  # CONFIG_CACHE_L2X0 is not set
       
    13 @@ -54,12 +55,15 @@
       
    14  CONFIG_CRYPTO_HASH=y
       
    15  CONFIG_CRYPTO_HASH2=y
       
    16  CONFIG_CRYPTO_LZO=y
       
    17 +CONFIG_DEBUG_LL=y
       
    18  CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S"
       
    19 +CONFIG_DEBUG_LL_UART_NONE=y
       
    20  # CONFIG_DEBUG_PINCTRL is not set
       
    21  # CONFIG_DEBUG_USER is not set
       
    22  # CONFIG_DLCI is not set
       
    23  CONFIG_DNOTIFY=y
       
    24  CONFIG_DTC=y
       
    25 +CONFIG_EARLY_PRINTK=y
       
    26  CONFIG_EXT4_FS=y
       
    27  CONFIG_FRAME_POINTER=y
       
    28  CONFIG_FS_MBCACHE=y
       
    29 Index: target/linux/kirkwood/image/Makefile
       
    30 ===================================================================
       
    31 --- target/linux/kirkwood/image/Makefile	(revision 39746)
       
    32 +++ target/linux/kirkwood/image/Makefile	(working copy)
       
    33 @@ -129,6 +129,9 @@
       
    34  Image/BuildKernel/Template/POGOE02=$(call Image/BuildKernel/Template,pogo_e02)
       
    35  Image/InstallKernel/Template/POGOE02=$(call Image/InstallKernel/Template,pogo_e02)
       
    36  
       
    37 +Image/BuildKernel/Template/DNS320L=$(call Image/BuildKernel/Template,dns320l)
       
    38 +Image/InstallKernel/Template/DNS320L=$(call Image/InstallKernel/Template,dns320l)
       
    39 +
       
    40  define Image/BuildKernel
       
    41  	$(call Image/BuildKernel/Template/$(PROFILE))
       
    42  endef
       
    43 Index: target/linux/kirkwood/patches-3.10/130-dns320l.patch
       
    44 ===================================================================
       
    45 --- target/linux/kirkwood/patches-3.10/130-dns320l.patch	(revision 0)
       
    46 +++ target/linux/kirkwood/patches-3.10/130-dns320l.patch	(working copy)
       
    47 @@ -0,0 +1,200 @@
       
    48 +--- /dev/null
       
    49 ++++ b/arch/arm/boot/dts/kirkwood-dns320l.dts
       
    50 +@@ -0,0 +1,187 @@
       
    51 ++/dts-v1/;
       
    52 ++
       
    53 ++#include "kirkwood.dtsi"
       
    54 ++#include "kirkwood-6281.dtsi"
       
    55 ++
       
    56 ++/ {
       
    57 ++	model = "D-Link DNS-320L";
       
    58 ++	compatible = "dlink,dns-320l", "marvell,kirkwood-88f6702", "marvell,kirkwood";
       
    59 ++
       
    60 ++	memory {
       
    61 ++		device_type = "memory";
       
    62 ++		reg = <0x00000000 0x10000000>;
       
    63 ++	};
       
    64 ++
       
    65 ++	chosen {
       
    66 ++		bootargs = "console=ttyS0,115200 earlyprintk";
       
    67 ++	};
       
    68 ++
       
    69 ++	ocp@f1000000 {
       
    70 ++		serial@12000 {
       
    71 ++			status = "okay";
       
    72 ++		};
       
    73 ++
       
    74 ++		serial@12100 {
       
    75 ++			pinctrl-0 = <&pmx_uart1>;
       
    76 ++			pinctrl-names = "default";
       
    77 ++			status = "okay";
       
    78 ++		};
       
    79 ++
       
    80 ++		pinctrl: pinctrl@10000 {
       
    81 ++
       
    82 ++			pinctrl-0 = <&pmx_button_power>;
       
    83 ++			pinctrl-names = "default";
       
    84 ++
       
    85 ++			pmx_sata0: pmx-sata0 {
       
    86 ++				marvell,pins = "mpp20";
       
    87 ++				marvell,function = "sata1";
       
    88 ++			};
       
    89 ++			pmx_sata1: pmx-sata1 {
       
    90 ++				marvell,pins = "mpp21";
       
    91 ++				marvell,function = "sata0";
       
    92 ++			};
       
    93 ++			pmx_led_red_right_hdd: pmx-led-red-right-hdd {
       
    94 ++			    marvell,pins = "mpp22";
       
    95 ++			    marvell,function = "gpio";
       
    96 ++			};
       
    97 ++			pmx_led_red_left_hdd: pmx-led-red-left-hdd {
       
    98 ++			    marvell,pins = "mpp23";
       
    99 ++			    marvell,function = "gpio";
       
   100 ++			};
       
   101 ++			pmx_power_sata: pmx-power-sata {
       
   102 ++			    marvell,pins = "mpp24";
       
   103 ++			    marvell,function = "gpio";
       
   104 ++			};
       
   105 ++			pmx_led_usb_blue: pmx-led-usb-blue {
       
   106 ++			    marvell,pins = "mpp25";
       
   107 ++			    marvell,function = "gpio";
       
   108 ++			};
       
   109 ++			pmx_led_usb_orange: pmx-led-usb-orange {
       
   110 ++				marvell,pins = "mpp26";
       
   111 ++				marvell,function = "gpio";
       
   112 ++			};
       
   113 ++			pmx_button_usb_copy: pmx-button-usb-copy {
       
   114 ++				marvell,pins = "mpp27";
       
   115 ++				marvell,function = "gpio";
       
   116 ++			};			
       
   117 ++			pmx_button_reset: pmx-button-reset {
       
   118 ++				marvell,pins = "mpp28";
       
   119 ++				marvell,function = "gpio";
       
   120 ++			};
       
   121 ++			pmx_button_power: pmx-button-power { // I can't get this one to trigger a button press...
       
   122 ++				marvell,pins = "mpp29";
       
   123 ++				marvell,function = "gpio";
       
   124 ++			};						
       
   125 ++		};
       
   126 ++		sata@80000 {
       
   127 ++			status = "okay";
       
   128 ++			nr-ports = <2>;
       
   129 ++		};
       
   130 ++
       
   131 ++		nand@3000000 {
       
   132 ++			pinctrl-0 = <&pmx_nand>;
       
   133 ++			pinctrl-names = "default";
       
   134 ++			status = "okay";
       
   135 ++			chip-delay = <40>;
       
   136 ++
       
   137 ++			partition@0 {
       
   138 ++				label = "u-boot";
       
   139 ++				reg = <0x0000000 0x100000>;
       
   140 ++			};
       
   141 ++
       
   142 ++			partition@100000 {
       
   143 ++				label = "uImage";
       
   144 ++				reg = <0x0100000 0x400000>;
       
   145 ++			};
       
   146 ++
       
   147 ++			partition@500000 {
       
   148 ++				label = "rootfs";
       
   149 ++				reg = <0x0500000 0x2000000>;
       
   150 ++			};
       
   151 ++
       
   152 ++			partition@2500000 {
       
   153 ++				label = "data";
       
   154 ++				reg = <0x2500000 0x5b00000>;
       
   155 ++			};
       
   156 ++		};
       
   157 ++	};
       
   158 ++
       
   159 ++	gpio_keys {
       
   160 ++		compatible = "gpio-keys";
       
   161 ++		pinctrl-0 = <&pmx_button_reset &pmx_button_usb_copy>;
       
   162 ++		pinctrl-names = "default";
       
   163 ++		#address-cells = <1>;
       
   164 ++		#size-cells = <0>;
       
   165 ++
       
   166 ++		button@1 {
       
   167 ++			label = "Reset push button";
       
   168 ++			linux,code = <0x198>;
       
   169 ++			gpios = <&gpio0 28 1>;
       
   170 ++		};
       
   171 ++		button@2 {
       
   172 ++			label = "USB unmount button";
       
   173 ++			linux,code = <161>;
       
   174 ++			gpios = <&gpio0 27 1>;
       
   175 ++		};
       
   176 ++	};
       
   177 ++
       
   178 ++	gpio-leds {
       
   179 ++		compatible = "gpio-leds";
       
   180 ++		pinctrl-0 = <&pmx_led_usb_blue &pmx_led_usb_orange
       
   181 ++			     &pmx_led_red_left_hdd &pmx_led_red_right_hdd>;
       
   182 ++		pinctrl-names = "default";
       
   183 ++
       
   184 ++		blue-usb {
       
   185 ++			label = "dns320l:blue:usb";
       
   186 ++			gpios = <&gpio0 25 0>; 
       
   187 ++		};
       
   188 ++		orange-l_hdd {
       
   189 ++			label = "dns320l:orange:l_hdd";
       
   190 ++			gpios = <&gpio0 22 0>; 
       
   191 ++		};
       
   192 ++		orange-r_hdd {
       
   193 ++			label = "dns320l:orange:r_hdd";
       
   194 ++			gpios = <&gpio0 23 0>; 
       
   195 ++		};
       
   196 ++		orange-usb {
       
   197 ++			label = "dns320l:orange:usb";
       
   198 ++			gpios = <&gpio0 26 0>; 
       
   199 ++		};
       
   200 ++	};
       
   201 ++
       
   202 ++	regulators {
       
   203 ++		compatible = "simple-bus";
       
   204 ++		#address-cells = <1>;
       
   205 ++		#size-cells = <0>;
       
   206 ++		pinctrl-0 = <&pmx_power_sata>;
       
   207 ++		pinctrl-names = "default";
       
   208 ++
       
   209 ++		sata_power: regulator@1 {
       
   210 ++			compatible = "regulator-fixed";
       
   211 ++			reg = <1>;
       
   212 ++			regulator-name = "SATA Power";
       
   213 ++			regulator-min-microvolt = <5000000>;
       
   214 ++			regulator-max-microvolt = <5000000>;
       
   215 ++			enable-active-high;
       
   216 ++			regulator-always-on;
       
   217 ++			regulator-boot-on;
       
   218 ++			gpio = <&gpio1 24 0>;
       
   219 ++		};
       
   220 ++	};
       
   221 ++};
       
   222 ++
       
   223 ++&mdio {
       
   224 ++	status = "okay";
       
   225 ++
       
   226 ++	ethphy0: ethernet-phy@0 {
       
   227 ++		device_type = "ethernet-phy";
       
   228 ++		reg = <0>;
       
   229 ++	};
       
   230 ++};
       
   231 ++
       
   232 ++&eth0 {
       
   233 ++	status = "okay";
       
   234 ++	ethernet0-port@0 {
       
   235 ++		phy-handle = <&ethphy0>;
       
   236 ++	};
       
   237 ++};
       
   238 +--- a/arch/arm/boot/dts/Makefile
       
   239 ++++ b/arch/arm/boot/dts/Makefile
       
   240 +@@ -67,6 +67,7 @@ dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-
       
   241 + 	kirkwood-db-88f6281.dtb \
       
   242 + 	kirkwood-db-88f6282.dtb \
       
   243 + 	kirkwood-dns320.dtb \
       
   244 ++	kirkwood-dns320l.dtb \
       
   245 + 	kirkwood-dns325.dtb \
       
   246 + 	kirkwood-dockstar.dtb \
       
   247 + 	kirkwood-dreamplug.dtb \
       
   248 Index: target/linux/kirkwood/profiles/110-nas.mk
       
   249 ===================================================================
       
   250 --- target/linux/kirkwood/profiles/110-nas.mk	(revision 39746)
       
   251 +++ target/linux/kirkwood/profiles/110-nas.mk	(working copy)
       
   252 @@ -69,3 +69,16 @@
       
   253  ICONNECT_UBI_OPTS:="-m 2048 -p 128KiB -s 512"
       
   254  
       
   255  $(eval $(call Profile,ICONNECT))
       
   256 +
       
   257 +define Profile/DNS320L
       
   258 +   NAME:=D-Link DNS320L
       
   259 +   PACKAGES:= \
       
   260 +     kmod-ata-core kmod-ata-marvell-sata \
       
   261 +     kmod-usb2 kmod-usb-storage
       
   262 +endef
       
   263 +
       
   264 +define Profile/DNS320L/Description
       
   265 + Package set compatible with D-Link DNS320L NAS
       
   266 +endef
       
   267 +
       
   268 +$(eval $(call Profile,DNS320L))