180-netgear-stora.patch 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648
  1. diff -ruN u-boot-2020.04.old/arch/arm/mach-kirkwood/Kconfig u-boot-2020.04/arch/arm/mach-kirkwood/Kconfig
  2. --- u-boot-2020.04.old/arch/arm/mach-kirkwood/Kconfig 2020-07-09 00:46:15.000000000 +0200
  3. +++ u-boot-2020.04/arch/arm/mach-kirkwood/Kconfig 2020-07-09 01:07:00.309219477 +0200
  4. @@ -44,6 +44,9 @@
  5. config TARGET_NETSPACE_V2
  6. bool "LaCie netspace_v2 Board"
  7. +config TARGET_NETGEAR_MS2110
  8. + bool "Netgear MS2110 Board"
  9. +
  10. config TARGET_IB62X0
  11. bool "ib62x0 Board"
  12. @@ -92,6 +95,7 @@
  13. source "board/keymile/Kconfig"
  14. source "board/LaCie/net2big_v2/Kconfig"
  15. source "board/LaCie/netspace_v2/Kconfig"
  16. +source "board/Marvell/netgear_ms2110/Kconfig"
  17. source "board/raidsonic/ib62x0/Kconfig"
  18. source "board/Seagate/dockstar/Kconfig"
  19. source "board/Seagate/goflexhome/Kconfig"
  20. diff -ruN u-boot-2020.04.old/board/Marvell/netgear_ms2110/Kconfig u-boot-2020.04/board/Marvell/netgear_ms2110/Kconfig
  21. --- u-boot-2020.04.old/board/Marvell/netgear_ms2110/Kconfig 1970-01-01 01:00:00.000000000 +0100
  22. +++ u-boot-2020.04/board/Marvell/netgear_ms2110/Kconfig 2020-07-09 00:59:29.000000000 +0200
  23. @@ -0,0 +1,12 @@
  24. +if TARGET_NETGEAR_MS2110
  25. +
  26. +config SYS_BOARD
  27. + default "netgear_ms2110"
  28. +
  29. +config SYS_VENDOR
  30. + default "Marvell"
  31. +
  32. +config SYS_CONFIG_NAME
  33. + default "netgear_ms2110"
  34. +
  35. +endif
  36. diff -ruN u-boot-2020.04.old/board/Marvell/netgear_ms2110/kwbimage.cfg u-boot-2020.04/board/Marvell/netgear_ms2110/kwbimage.cfg
  37. --- u-boot-2020.04.old/board/Marvell/netgear_ms2110/kwbimage.cfg 1970-01-01 01:00:00.000000000 +0100
  38. +++ u-boot-2020.04/board/Marvell/netgear_ms2110/kwbimage.cfg 2020-07-09 00:59:29.000000000 +0200
  39. @@ -0,0 +1,167 @@
  40. +#
  41. +# (C) Copyright 2009
  42. +# Marvell Semiconductor <www.marvell.com>
  43. +# Written-by: Prafulla Wadaskar <[email protected]>
  44. +#
  45. +# See file CREDITS for list of people who contributed to this
  46. +# project.
  47. +#
  48. +# This program is free software; you can redistribute it and/or
  49. +# modify it under the terms of the GNU General Public License as
  50. +# published by the Free Software Foundation; either version 2 of
  51. +# the License, or (at your option) any later version.
  52. +#
  53. +# This program is distributed in the hope that it will be useful,
  54. +# but WITHOUT ANY WARRANTY; without even the implied warranty of
  55. +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  56. +# GNU General Public License for more details.
  57. +#
  58. +# You should have received a copy of the GNU General Public License
  59. +# along with this program; if not, write to the Free Software
  60. +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  61. +# MA 02110-1301 USA
  62. +#
  63. +# Refer docs/README.kwimage for more details about how-to configure
  64. +# and create kirkwood boot image
  65. +#
  66. +
  67. +# Boot Media configurations
  68. +BOOT_FROM nand
  69. +NAND_ECC_MODE default
  70. +NAND_PAGE_SIZE 0x0800
  71. +
  72. +# SOC registers configuration using bootrom header extension
  73. +# Maximum KWBIMAGE_MAX_CONFIG configurations allowed
  74. +
  75. +# Configure RGMII-0 interface pad voltage to 1.8V
  76. +DATA 0xFFD100e0 0x1b1b1b9b
  77. +
  78. +#Dram initalization for SINGLE x16 CL=5 @ 400MHz
  79. +DATA 0xFFD01400 0x43000c30 # DDR Configuration register
  80. +# bit13-0: 0xc30 (3120 DDR2 clks refresh rate)
  81. +# bit23-14: zero
  82. +# bit24: 1= enable exit self refresh mode on DDR access
  83. +# bit25: 1 required
  84. +# bit29-26: zero
  85. +# bit31-30: 01
  86. +
  87. +DATA 0xFFD01404 0x37543000 # DDR Controller Control Low
  88. +# bit 4: 0=addr/cmd in smame cycle
  89. +# bit 5: 0=clk is driven during self refresh, we don't care for APX
  90. +# bit 6: 0=use recommended falling edge of clk for addr/cmd
  91. +# bit14: 0=input buffer always powered up
  92. +# bit18: 1=cpu lock transaction enabled
  93. +# bit23-20: 5=recommended value for CL=5 and STARTBURST_DEL disabled bit31=0
  94. +# bit27-24: 7= CL+2, STARTBURST sample stages, for freqs 400MHz, unbuffered DIMM
  95. +# bit30-28: 3 required
  96. +# bit31: 0=no additional STARTBURST delay
  97. +
  98. +DATA 0xFFD01408 0x22125451 # DDR Timing (Low) (active cycles value +1)
  99. +# bit3-0: TRAS lsbs
  100. +# bit7-4: TRCD
  101. +# bit11- 8: TRP
  102. +# bit15-12: TWR
  103. +# bit19-16: TWTR
  104. +# bit20: TRAS msb
  105. +# bit23-21: 0x0
  106. +# bit27-24: TRRD
  107. +# bit31-28: TRTP
  108. +
  109. +DATA 0xFFD0140C 0x00000833 # DDR Timing (High)
  110. +# bit6-0: TRFC
  111. +# bit8-7: TR2R
  112. +# bit10-9: TR2W
  113. +# bit12-11: TW2W
  114. +# bit31-13: zero required
  115. +
  116. +DATA 0xFFD01410 0x00000099 # DDR Address Control
  117. +# bit1-0: 00, Cs0width=x8
  118. +# bit3-2: 11, Cs0size=1Gb
  119. +# bit5-4: 00, Cs1width=x8
  120. +# bit7-6: 11, Cs1size=1Gb
  121. +# bit9-8: 00, Cs2width=nonexistent
  122. +# bit11-10: 00, Cs2size =nonexistent
  123. +# bit13-12: 00, Cs3width=nonexistent
  124. +# bit15-14: 00, Cs3size =nonexistent
  125. +# bit16: 0, Cs0AddrSel
  126. +# bit17: 0, Cs1AddrSel
  127. +# bit18: 0, Cs2AddrSel
  128. +# bit19: 0, Cs3AddrSel
  129. +# bit31-20: 0 required
  130. +
  131. +DATA 0xFFD01414 0x00000000 # DDR Open Pages Control
  132. +# bit0: 0, OpenPage enabled
  133. +# bit31-1: 0 required
  134. +
  135. +DATA 0xFFD01418 0x00000000 # DDR Operation
  136. +# bit3-0: 0x0, DDR cmd
  137. +# bit31-4: 0 required
  138. +
  139. +DATA 0xFFD0141C 0x00000C52 # DDR Mode
  140. +# bit2-0: 2, BurstLen=2 required
  141. +# bit3: 0, BurstType=0 required
  142. +# bit6-4: 4, CL=5
  143. +# bit7: 0, TestMode=0 normal
  144. +# bit8: 0, DLL reset=0 normal
  145. +# bit11-9: 6, auto-precharge write recovery ????????????
  146. +# bit12: 0, PD must be zero
  147. +# bit31-13: 0 required
  148. +
  149. +DATA 0xFFD01420 0x00000004 # DDR Extended Mode
  150. +# bit0: 0, DDR DLL enabled
  151. +# bit1: 0, DDR drive strenght normal
  152. +# bit2: 1, DDR ODT control lsd (disabled)
  153. +# bit5-3: 000, required
  154. +# bit6: 0, DDR ODT control msb, (disabled)
  155. +# bit9-7: 000, required
  156. +# bit10: 0, differential DQS enabled
  157. +# bit11: 0, required
  158. +# bit12: 0, DDR output buffer enabled
  159. +# bit31-13: 0 required
  160. +
  161. +DATA 0xFFD01424 0x0000F17F # DDR Controller Control High
  162. +# bit2-0: 111, required
  163. +# bit3 : 1 , MBUS Burst Chop disabled
  164. +# bit6-4: 111, required
  165. +# bit7 : 0
  166. +# bit8 : 1 , add writepath sample stage, must be 1 for DDR freq >= 300MHz
  167. +# bit9 : 0 , no half clock cycle addition to dataout
  168. +# bit10 : 0 , 1/4 clock cycle skew enabled for addr/ctl signals
  169. +# bit11 : 0 , 1/4 clock cycle skew disabled for write mesh
  170. +# bit15-12: 1111 required
  171. +# bit31-16: 0 required
  172. +
  173. +DATA 0xFFD01428 0x00085520 # DDR2 ODT Read Timing (default values)
  174. +DATA 0xFFD0147C 0x00008552 # DDR2 ODT Write Timing (default values)
  175. +
  176. +DATA 0xFFD01500 0x00000000 # CS[0]n Base address to 0x0
  177. +DATA 0xFFD01504 0x03FFFFF1 # CS[0]n Size
  178. +# bit0: 1, Window enabled
  179. +# bit1: 0, Write Protect disabled
  180. +# bit3-2: 00, CS0 hit selected
  181. +# bit23-4: ones, required
  182. +# bit31-24: 0x0F, Size (i.e. 256MB)
  183. +
  184. +DATA 0xFFD01508 0x04000000 # CS[1]n Base address to 256Mb
  185. +DATA 0xFFD0150C 0x03FFFFF5 # CS[1]n Size 256Mb Window enabled for CS1
  186. +
  187. +DATA 0xFFD01514 0x00000000 # CS[2]n Size, window disabled
  188. +DATA 0xFFD0151C 0x00000000 # CS[3]n Size, window disabled
  189. +
  190. +DATA 0xFFD01494 0x00120012 # DDR ODT Control (Low)
  191. +# bit3-0: 2, ODT0Rd, MODT[0] asserted during read from DRAM CS1
  192. +# bit7-4: 1, ODT0Rd, MODT[0] asserted during read from DRAM CS0
  193. +# bit19-16:2, ODT0Wr, MODT[0] asserted during write to DRAM CS1
  194. +# bit23-20:1, ODT0Wr, MODT[0] asserted during write to DRAM CS0
  195. +
  196. +DATA 0xFFD01498 0x00000000 # DDR ODT Control (High)
  197. +# bit1-0: 00, ODT0 controlled by ODT Control (low) register above
  198. +# bit3-2: 01, ODT1 active NEVER!
  199. +# bit31-4: zero, required
  200. +
  201. +DATA 0xFFD0149C 0x0000E40F # CPU ODT Control
  202. +DATA 0xFFD01480 0x00000001 # DDR Initialization Control
  203. +#bit0=1, enable DDR init upon this register write
  204. +
  205. +# End of Header extension
  206. +DATA 0x0 0x0
  207. diff -ruN u-boot-2020.04.old/board/Marvell/netgear_ms2110/MAINTAINERS u-boot-2020.04/board/Marvell/netgear_ms2110/MAINTAINERS
  208. --- u-boot-2020.04.old/board/Marvell/netgear_ms2110/MAINTAINERS 1970-01-01 01:00:00.000000000 +0100
  209. +++ u-boot-2020.04/board/Marvell/netgear_ms2110/MAINTAINERS 2020-07-09 00:59:29.000000000 +0200
  210. @@ -0,0 +1,6 @@
  211. +NETGEAR_MS2110 BOARD
  212. +M: bodhi <[email protected]>
  213. +S: Maintained
  214. +F: board/Marvell/netgear_ms2110
  215. +F: include/configs/netgear_ms2110.h
  216. +F: configs/netgear_ms2110_defconfig
  217. diff -ruN u-boot-2020.04.old/board/Marvell/netgear_ms2110/Makefile u-boot-2020.04/board/Marvell/netgear_ms2110/Makefile
  218. --- u-boot-2020.04.old/board/Marvell/netgear_ms2110/Makefile 1970-01-01 01:00:00.000000000 +0100
  219. +++ u-boot-2020.04/board/Marvell/netgear_ms2110/Makefile 2020-07-09 00:59:29.000000000 +0200
  220. @@ -0,0 +1,13 @@
  221. +#
  222. +# (C) Copyright 2014 bodhi <[email protected]>
  223. +#
  224. +# Based on
  225. +# (C) Copyright 2009
  226. +# Marvell Semiconductor <www.marvell.com>
  227. +# Written-by: Prafulla Wadaskar <[email protected]>
  228. +#
  229. +# SPDX-License-Identifier: GPL-2.0+
  230. +#
  231. +
  232. +obj-y := netgear_ms2110.o
  233. +
  234. diff -ruN u-boot-2020.04.old/board/Marvell/netgear_ms2110/netgear_ms2110.c u-boot-2020.04/board/Marvell/netgear_ms2110/netgear_ms2110.c
  235. --- u-boot-2020.04.old/board/Marvell/netgear_ms2110/netgear_ms2110.c 1970-01-01 01:00:00.000000000 +0100
  236. +++ u-boot-2020.04/board/Marvell/netgear_ms2110/netgear_ms2110.c 2020-07-09 00:59:29.000000000 +0200
  237. @@ -0,0 +1,151 @@
  238. +/*
  239. + * Copyright (C) 2014-2017 bodhi <[email protected]>
  240. + *
  241. + * Based on Kirkwood support:
  242. + * (C) Copyright 2009
  243. + * Marvell Semiconductor <www.marvell.com>
  244. + * Written-by: Prafulla Wadaskar <[email protected]>
  245. + *
  246. + * See file CREDITS for list of people who contributed to this
  247. + * project.
  248. + *
  249. + * This program is free software; you can redistribute it and/or
  250. + * modify it under the terms of the GNU General Public License as
  251. + * published by the Free Software Foundation; either version 2 of
  252. + * the License, or (at your option) any later version.
  253. + *
  254. + * This program is distributed in the hope that it will be useful,
  255. + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  256. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  257. + * GNU General Public License for more details.
  258. + *
  259. + * You should have received a copy of the GNU General Public License
  260. + * along with this program; if not, write to the Free Software
  261. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  262. + * MA 02110-1301 USA
  263. + */
  264. +
  265. +#include <common.h>
  266. +#include <miiphy.h>
  267. +#include <netdev.h>
  268. +#include <asm/arch/soc.h>
  269. +#include <asm/arch/mpp.h>
  270. +#include "netgear_ms2110.h"
  271. +#include <asm/mach-types.h>
  272. +
  273. +DECLARE_GLOBAL_DATA_PTR;
  274. +int board_early_init_f(void)
  275. +{
  276. + /*
  277. + * default gpio configuration
  278. + * There are maximum 64 gpios controlled through 2 sets of registers
  279. + * the below configuration configures mainly initial LED status
  280. + */
  281. + mvebu_config_gpio(NETGEAR_MS2110_OE_VAL_LOW,
  282. + NETGEAR_MS2110_OE_VAL_HIGH,
  283. + NETGEAR_MS2110_OE_LOW, NETGEAR_MS2110_OE_HIGH);
  284. +
  285. + /* Multi-Purpose Pins Functionality configuration */
  286. + u32 kwmpp_config[] = {
  287. + MPP0_NF_IO2,
  288. + MPP1_NF_IO3,
  289. + MPP2_NF_IO4,
  290. + MPP3_NF_IO5,
  291. + MPP4_NF_IO6,
  292. + MPP5_NF_IO7,
  293. + MPP6_SYSRST_OUTn,
  294. + MPP7_SPI_SCn,
  295. + MPP8_TW_SDA,
  296. + MPP9_TW_SCK,
  297. + MPP10_UART0_TXD,
  298. + MPP11_UART0_RXD,
  299. + MPP12_SD_CLK,
  300. + MPP13_SD_CMD,
  301. + MPP14_SD_D0,
  302. + MPP15_SD_D1,
  303. + MPP16_SD_D2,
  304. + MPP17_SD_D3,
  305. + MPP18_NF_IO0,
  306. + MPP19_NF_IO1,
  307. + MPP20_SATA1_ACTn,
  308. + MPP21_SATA0_ACTn,
  309. + MPP22_GPIO,
  310. + MPP23_GPIO,
  311. + MPP24_GE1_4,
  312. + MPP25_GE1_5,
  313. + MPP26_GE1_6,
  314. + MPP27_GE1_7,
  315. + MPP28_GPIO,
  316. + MPP29_GPIO,
  317. + MPP30_GPIO,
  318. + MPP31_GPIO,
  319. + MPP32_GPIO,
  320. + MPP33_GE1_13,
  321. + MPP34_SATA1_ACTn,
  322. + MPP35_GPIO,
  323. + MPP36_GPIO,
  324. + MPP37_GPIO,
  325. + MPP38_GPIO,
  326. + MPP39_GPIO,
  327. + MPP40_GPIO,
  328. + MPP41_GPIO,
  329. + MPP42_GPIO,
  330. + MPP43_GPIO,
  331. + MPP44_GPIO,
  332. + MPP45_TDM_PCLK,
  333. + MPP46_TDM_FS,
  334. + MPP47_TDM_DRX,
  335. + MPP48_TDM_DTX,
  336. + MPP49_GPIO,
  337. + 0
  338. + };
  339. + kirkwood_mpp_conf(kwmpp_config, NULL);
  340. + return 0;
  341. +}
  342. +
  343. +int board_init(void)
  344. +{ /*
  345. + * arch number of board
  346. + */
  347. + gd->bd->bi_arch_number = MACH_TYPE_NETGEAR_MS2110;
  348. +
  349. + /* adress of boot parameters */
  350. + gd->bd->bi_boot_params = mvebu_sdram_bar(0) + 0x100;
  351. +
  352. + return 0;
  353. +}
  354. +#ifdef CONFIG_RESET_PHY_R
  355. +/* Configure and enable MV88E1116 PHY */
  356. +void reset_phy(void)
  357. +{
  358. + u16 reg;
  359. + u16 devadr;
  360. + char *name = "egiga0";
  361. +
  362. + if (miiphy_set_current_dev(name))
  363. + return;
  364. +
  365. + /* command to read PHY dev address */
  366. + if (miiphy_read(name, 0xEE, 0xEE, (u16 *) &devadr)) {
  367. + printf("Err..%s could not read PHY dev address\n",
  368. + __FUNCTION__);
  369. + return;
  370. + }
  371. +
  372. + /*
  373. + * Enable RGMII delay on Tx and Rx for CPU port
  374. + * Ref: sec 4.7.2 of chip datasheet
  375. + */
  376. + miiphy_write(name, devadr, MV88E1116_PGADR_REG, 2);
  377. + miiphy_read(name, devadr, MV88E1116_MAC_CTRL_REG, &reg);
  378. + reg |= (MV88E1116_RGMII_RXTM_CTRL | MV88E1116_RGMII_TXTM_CTRL);
  379. + miiphy_write(name, devadr, MV88E1116_MAC_CTRL_REG, reg);
  380. + miiphy_write(name, devadr, MV88E1116_PGADR_REG, 0);
  381. +
  382. + /* reset the phy */
  383. + miiphy_reset(name, devadr);
  384. +
  385. + printf("88E1116 Initialized on %s\n", name);
  386. +}
  387. +#endif /* CONFIG_RESET_PHY_R */
  388. +
  389. diff -ruN u-boot-2020.04.old/board/Marvell/netgear_ms2110/netgear_ms2110.h u-boot-2020.04/board/Marvell/netgear_ms2110/netgear_ms2110.h
  390. --- u-boot-2020.04.old/board/Marvell/netgear_ms2110/netgear_ms2110.h 1970-01-01 01:00:00.000000000 +0100
  391. +++ u-boot-2020.04/board/Marvell/netgear_ms2110/netgear_ms2110.h 2020-07-09 00:59:29.000000000 +0200
  392. @@ -0,0 +1,41 @@
  393. +/*
  394. + * (C) Copyright 2009
  395. + * Marvell Semiconductor <www.marvell.com>
  396. + * Written-by: Prafulla Wadaskar <[email protected]>
  397. + *
  398. + * See file CREDITS for list of people who contributed to this
  399. + * project.
  400. + *
  401. + * This program is free software; you can redistribute it and/or
  402. + * modify it under the terms of the GNU General Public License as
  403. + * published by the Free Software Foundation; either version 2 of
  404. + * the License, or (at your option) any later version.
  405. + *
  406. + * This program is distributed in the hope that it will be useful,
  407. + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  408. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  409. + * GNU General Public License for more details.
  410. + *
  411. + * You should have received a copy of the GNU General Public License
  412. + * along with this program; if not, write to the Free Software
  413. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  414. + * MA 02110-1301 USA
  415. + */
  416. +
  417. +#ifndef __NETGEAR_MS2110_H
  418. +#define __NETGEAR_MS2110_H
  419. +
  420. +#define NETGEAR_MS2110_OE_LOW (~(1 << 7))
  421. +#define NETGEAR_MS2110_OE_HIGH (~(1 << 2 | 1 << 12))
  422. +#define NETGEAR_MS2110_OE_VAL_LOW (0)
  423. +#define NETGEAR_MS2110_OE_VAL_HIGH (1 << 12)
  424. +
  425. +/* PHY related */
  426. +#define MV88E1116_LED_FCTRL_REG 10
  427. +#define MV88E1116_CPRSP_CR3_REG 21
  428. +#define MV88E1116_MAC_CTRL_REG 21
  429. +#define MV88E1116_PGADR_REG 22
  430. +#define MV88E1116_RGMII_TXTM_CTRL (1 << 4)
  431. +#define MV88E1116_RGMII_RXTM_CTRL (1 << 5)
  432. +
  433. +#endif /* __NETGEAR_MS2110_H */
  434. diff -ruN a/configs/netgear_ms2110_defconfig b/configs/netgear_ms2110_defconfig
  435. --- a/configs/netgear_ms2110_defconfig 1970-01-01 01:00:00.000000000 +0100
  436. +++ b/configs/netgear_ms2110_defconfig 2020-07-14 17:59:18.000000000 +0200
  437. @@ -0,0 +1,50 @@
  438. +CONFIG_ARM=y
  439. +CONFIG_KIRKWOOD=y
  440. +CONFIG_SYS_DCACHE_OFF=y
  441. +CONFIG_ARCH_CPU_INIT=y
  442. +CONFIG_TARGET_NETGEAR_MS2110=y
  443. +CONFIG_IDENT_STRING="\nNetgear Stora MS2110"
  444. +CONFIG_SYS_PROMPT="Stora> "
  445. +CONFIG_HUSH_PARSER=y
  446. +CONFIG_SYS_TEXT_BASE=0x600000
  447. +# CONFIG_DISPLAY_BOARDINFO is not set
  448. +# CONFIG_CMD_IMLS is not set
  449. +# CONFIG_CMD_FLASH is not set
  450. +CONFIG_CMD_IDE=y
  451. +CONFIG_MVGBE=y
  452. +CONFIG_MII=y
  453. +CONFIG_SYS_NS16550=y
  454. +CONFIG_OF_LIBFDT=y
  455. +CONFIG_CMD_FDT=y
  456. +CONFIG_CMD_BOOTZ=y
  457. +CONFIG_CMD_SETEXPR=y
  458. +CONFIG_CMD_DATE=y
  459. +CONFIG_CMD_DHCP=y
  460. +CONFIG_CMD_MII=y
  461. +CONFIG_CMD_PING=y
  462. +CONFIG_CMD_EXT2=y
  463. +CONFIG_CMD_EXT4=y
  464. +CONFIG_CMD_FAT=y
  465. +CONFIG_CMD_JFFS2=y
  466. +CONFIG_CMD_USB=y
  467. +CONFIG_ISO_PARTITION=y
  468. +CONFIG_EFI_PARTITION=y
  469. +# CONFIG_MMC is not set
  470. +CONFIG_MTD=y
  471. +CONFIG_MTD_RAW_NAND=y
  472. +CONFIG_MTDPARTS_DEFAULT="mtdparts=orion_nand:0xe0000@0x0(uboot),0x20000@0xe0000(uboot_env),-@0x100000(ubi)"
  473. +CONFIG_CMD_MTDPARTS=y
  474. +CONFIG_CMD_NAND=y
  475. +CONFIG_ENV_IS_IN_NAND=y
  476. +CONFIG_ENV_SIZE=0x20000
  477. +CONFIG_ENV_ADDR=0xe0000
  478. +CONFIG_ENV_OFFSET=0xe0000
  479. +CONFIG_ENV_SECT_SIZE=0x20000
  480. +CONFIG_CMD_UBI=y
  481. +CONFIG_USB=y
  482. +CONFIG_USB_EHCI_HCD=y
  483. +CONFIG_USB_STORAGE=y
  484. +CONFIG_BLK=y
  485. +CONFIG_MVSATA_IDE=y
  486. +CONFIG_DM_RTC=y
  487. +CONFIG_RTC_MV=y
  488. diff -ruN a/include/configs/netgear_ms2110.h b/include/configs/netgear_ms2110.h
  489. --- a/include/configs/netgear_ms2110.h 1970-01-01 01:00:00.000000000 +0100
  490. +++ b/include/configs/netgear_ms2110.h 2020-07-14 17:49:15.000000000 +0200
  491. @@ -0,0 +1,155 @@
  492. +/*
  493. + * (C) Copyright 2014-2017 bodhi <[email protected]>
  494. + * (C) Copyright 2020 Zoltan HERPAI <[email protected]>
  495. + *
  496. + * Based on Kirkwood support:
  497. + * (C) Copyright 2009
  498. + * Marvell Semiconductor <www.marvell.com>
  499. + * Written-by: Prafulla Wadaskar <[email protected]>
  500. + *
  501. + * See file CREDITS for list of people who contributed to this
  502. + * project.
  503. + *
  504. + * This program is free software; you can redistribute it and/or
  505. + * modify it under the terms of the GNU General Public License as
  506. + * published by the Free Software Foundation; either version 2 of
  507. + * the License, or (at your option) any later version.
  508. + *
  509. + * This program is distributed in the hope that it will be useful,
  510. + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  511. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  512. + * GNU General Public License for more details.
  513. + *
  514. + * You should have received a copy of the GNU General Public License
  515. + * along with this program; if not, write to the Free Software
  516. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  517. + * MA 02110-1301 USA
  518. + */
  519. +
  520. +#ifndef _CONFIG_NGMS2110_H
  521. +#define _CONFIG_NGMS2110_H
  522. +
  523. +/*
  524. + * High Level Configuration Options (easy to change)
  525. + */
  526. +#define CONFIG_MARVELL 1
  527. +#define CONFIG_ARM926EJS 1 /* Basic Architecture */
  528. +#define CONFIG_FEROCEON_88FR131 1 /* CPU Core subversion */
  529. +#define CONFIG_KIRKWOOD 1 /* SOC Family Name */
  530. +#define CONFIG_KW88F6281 1 /* SOC Name */
  531. +#define CONFIG_MACH_NETGEAR_MS2110 /* Machine type */
  532. +#define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */
  533. +
  534. +/*
  535. + * Commands configuration
  536. + */
  537. +#define CONFIG_SYS_NO_FLASH /* Declare no flash (NOR/SPI) */
  538. +#define CONFIG_SYS_MVFS /* Picks up Filesystem from mv-common.h */
  539. +#define CONFIG_CMD_ENV
  540. +#define CONFIG_PREBOOT
  541. +#define CONFIG_SYS_HUSH_PARSER
  542. +#define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
  543. +
  544. +/* #define CONFIG_CMD_AUTOSCRIPT */
  545. +
  546. +/*
  547. + * mv-common.h should be defined after CMD configs since it used them
  548. + * to enable certain macros
  549. + */
  550. +#include "mv-common.h"
  551. +
  552. +/* Remove or override few declarations from mv-common.h */
  553. +//#undef CONFIG_SYS_PROMPT /* previously defined in mv-common.h */
  554. +//#define CONFIG_SYS_PROMPT "Netgear Stora> "
  555. +
  556. +/*
  557. + * NAND configuration
  558. + */
  559. +#ifdef CONFIG_CMD_NAND
  560. +#define CONFIG_NAND_KIRKWOOD
  561. +#define CONFIG_SYS_MAX_NAND_DEVICE 1
  562. +#define NAND_MAX_CHIPS 1
  563. +#define CONFIG_SYS_NAND_BASE 0xD8000000 /* KW_DEFADR_NANDF */
  564. +#define NAND_ALLOW_ERASE_ALL 1
  565. +#endif
  566. +
  567. +/*
  568. + * Default environment variables
  569. +*/
  570. +#define CONFIG_BOOTCOMMAND \
  571. + "setenv bootargs ${console} ${mtdparts} ${bootargs_root}; " \
  572. + "ubi part ubi; " \
  573. + "ubifsmount ubi:rootfs; " \
  574. + "ubi read 0x800000 kernel; " \
  575. + "bootm 0x800000"
  576. +
  577. +#define CONFIG_EXTRA_ENV_SETTINGS \
  578. + "arcNumber=2743\0" \
  579. + "console=console=ttyS0,115200\0" \
  580. + "ethact=egiga0\0" \
  581. + "ethaddr=52:3b:20:9c:11:51\0" \
  582. + "ipaddr=192.168.0.231\0" \
  583. + "mtdids=nand0=orion_nand\0" \
  584. + "mtdparts="CONFIG_MTDPARTS_DEFAULT "\0" \
  585. + "serverip=192.168.0.220\0" \
  586. + "bootargs_root=\0"
  587. +
  588. +/* size in bytes reserved for initial data */
  589. +#define CONFIG_SYS_GBL_DATA_SIZE 128
  590. +
  591. +/*
  592. + * Other required minimal configurations
  593. + */
  594. +#define CONFIG_STACKSIZE 0x00100000 /* regular stack- 1M */
  595. +
  596. +/*
  597. + * Ethernet Driver configuration
  598. + */
  599. +#ifdef CONFIG_CMD_NET
  600. +#define CONFIG_NETCONSOLE /* include NetConsole support */
  601. +#define CONFIG_NET_MULTI /* specify more that one ports available */
  602. +#define CONFIG_KIRKWOOD_EGIGA_PORTS {1,0} /* enable first port */
  603. +#define CONFIG_MV88E61XX_MULTICHIP_ADRMODE
  604. +#define CONFIG_DIS_AUTO_NEG_SPEED_GMII /*Disable Auto speed negociation */
  605. +#define CONFIG_PHY_SPEED _1000BASET /*Force PHYspeed to 1GBPs */
  606. +#define CONFIG_MVGBE_PORTS {1, 0} /* enable port 0 only */
  607. +#define CONFIG_PHY_BASE_ADR 0x0A
  608. +#define CONFIG_RESET_PHY_R /* use reset_phy() to init PHY */
  609. +#endif /* CONFIG_CMD_NET */
  610. +
  611. +/*
  612. + * USB/EHCI
  613. + */
  614. +#ifdef CONFIG_CMD_USB
  615. +#define CONFIG_USB_EHCI /* Enable EHCI USB support */
  616. +#define CONFIG_USB_EHCI_KIRKWOOD /* on Kirkwood platform */
  617. +#define CONFIG_EHCI_IS_TDI
  618. +#define CONFIG_SUPPORT_VFAT
  619. +#endif /* CONFIG_CMD_USB */
  620. +
  621. +/*
  622. + * File system
  623. + */
  624. +#define CONFIG_JFFS2_NAND
  625. +#define CONFIG_JFFS2_LZO
  626. +#define CONFIG_MTD_DEVICE /* needed for mtdparts commands */
  627. +
  628. +/*
  629. + * SATA
  630. + */
  631. +
  632. +#ifdef CONFIG_MVSATA_IDE
  633. +#define CONFIG_SYS_ATA_IDE0_OFFSET MV_SATA_PORT0_OFFSET
  634. +#define CONFIG_SYS_ATA_IDE1_OFFSET MV_SATA_PORT1_OFFSET
  635. +#endif
  636. +
  637. +/*
  638. + * Date Time
  639. + * */
  640. +#ifdef CONFIG_CMD_DATE
  641. +#define CONFIG_RTC_MV
  642. +#define CONFIG_CMD_SNTP
  643. +#define CONFIG_CMD_DNS
  644. +#endif /* CONFIG_CMD_DATE */
  645. +
  646. +#endif /* _CONFIG_NGMS2110_H */