找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 4270|回复: 3

【求助】openwrt15.05 Mt7621 如何配置RGMII,MDC/MDIO,用MDIO控制外挂的SWITCH

[复制链接]
MT7621通过RGMII2外接一个高通的switch QCA8337
如何配置GPIO,使能RGMII、MDC,MDIO,怎么在MDIO总线上读写数据
我的恩山、我的无线 The best wifi forum is right here.
 楼主| | 显示全部楼层
顶上去,请大神赐教

板子的DTS文件中pinctrl和ethernet部分的定义如下

  1. pinctrl {
  2.                 state_default: pinctrl0 {
  3.                         gpio {
  4.                                 ralink,group = "i2c", "uart2", "uart3";
  5.                                 ralink,function = "gpio";
  6.                         };
  7.                 };
  8.         };
  9. ethernet@1e100000 {
  10.         status = "okay";

  11.         pinctrl-names = "default";
  12.         pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;

  13.         ralink,port-map = "llllw";

  14.         port@5 {
  15.             status = "okay";
  16.             ralink,fixed-link = <1000 1 1 1>;
  17.             phy-mode = "rgmii";
  18.         };

  19.         mdio-bus {
  20.             status = "okay";

  21.             phy0: ethernet-phy@0 {
  22.                 reg = <0>;
  23.                 phy-mode = "rgmii";
  24.                                 qca,ar8327-initvals = <
  25.                                         0x00004 0x06800000 /* PAD0_MODE */
  26.                                 >;
  27.             };
  28.         };
  29.     };
复制代码


下面是启动信息,有看到mdio-bus有探测到了,根据参考网上的帖子,好像还要加载qca8337的驱动,用的是ar8216.ko,但是在menuconfig -- Kernel modules -- Network Devices 里面只有kmod-atl1(Atheros L1 Gigabit Ethernet support)之类的,怎么找到这个驱动。

  1. Xtal Mode=3 OCP Ratio=1/3
  2. Flash component: SPI Flash
  3. Date:Mar 22 2019  Time:16:14:21
  4. ============================================
  5. icache: sets:256, ways:4, linesz:32 ,total:32768
  6. dcache: sets:256, ways:4, linesz:32 ,total:32768

  7. ##### The CPU freq = 880 MHZ ####
  8. estimate memory size =256 Mbytes
  9. #Reset_MT7530
  10. set LAN/WAN LLLLW

  11. Please choose the operation:
  12.    1: Load system code to SDRAM via TFTP.
  13.    2: Load system code then write to Flash via TFTP.
  14.    3: Boot system code via Flash (default).
  15.    4: Entr boot command line interface.
  16.    7: Load Boot Loader code then write to Flash via Serial.
  17.    9: Load Boot Loader code then write to Flash via TFTP.
  18. 0
  19.    
  20. 3: System Boot system code via Flash.
  21. ## Booting image at bfc50000 ...
  22.    Image Name:   MIPS OpenWrt Linux-3.18.45
  23.    Image Type:   MIPS Linux Kernel Image (lzma compressed)
  24.    Data Size:    1200389 Bytes =  1.1 MB
  25.    Load Address: 80001000
  26.    Entry Point:  80001000
  27.    Verifying Checksum ... OK
  28.    Uncompressing Kernel Image ... OK
  29. No initrd
  30. ## Transferring control to Linux (at address 80001000) ...
  31. ## Giving linux memsize in MB, 256

  32. Starting kernel ...

  33. [    0.000000] Linux version 3.18.45 (xmrd@xmrd) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 r1074) ) #10 SMP Mon May 27 16:46:17 CST 2019
  34. [    0.000000] SoC Type: MediaTek MT7621 ver:1 eco:3
  35. [    0.000000] bootconsole [early0] enabled
  36. [    0.000000] CPU0 revision is: 0001992f (MIPS 1004Kc)
  37. [    0.000000] MIPS: machine is SN3100
  38. [    0.000000] Determined physical RAM map:
  39. [    0.000000]  memory: 08000000 [url=home.php?mod=space&uid=162986]@[/url] 00000000 (usable)
  40. [    0.000000] Initrd not found or empty - disabling initrd
  41. [    0.000000] Zone ranges:
  42. [    0.000000]   Normal   [mem 0x00000000-0x07ffffff]
  43. [    0.000000]   HighMem  empty
  44. [    0.000000] Movable zone start for each node
  45. [    0.000000] Early memory node ranges
  46. [    0.000000]   node   0: [mem 0x00000000-0x07ffffff]
  47. [    0.000000] Initmem setup node 0 [mem 0x00000000-0x07ffffff]
  48. [    0.000000] Detected 3 available secondary CPU(s)
  49. [    0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
  50. [    0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
  51. [    0.000000] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
  52. [    0.000000] PERCPU: Embedded 9 pages/cpu @8110b000 s5696 r8192 d22976 u36864
  53. [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
  54. [    0.000000] Kernel command line: console=ttyS0,57600 rootfstype=squashfs,jffs2
  55. [    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
  56. [    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
  57. [    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
  58. [    0.000000] Writing ErrCtl register=00000700
  59. [    0.000000] Readback ErrCtl register=00000700
  60. [    0.000000] Memory: 125896K/131072K available (2704K kernel code, 140K rwdata, 524K rodata, 204K init, 228K bss, 5176K reserved, 0K highmem)
  61. [    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
  62. [    0.000000] Hierarchical RCU implementation.
  63. [    0.000000] NR_IRQS:256
  64. [    0.000000] gic: revision 3.0
  65. [    0.000000] CPU Clock: 880MHz
  66. [    0.000000] Calibrating delay loop... 577.53 BogoMIPS (lpj=2887680)
  67. [    0.050000] pid_max: default: 32768 minimum: 301
  68. [    0.060000] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
  69. [    0.070000] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
  70. [    0.080000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
  71. [    0.080000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
  72. [    0.080000] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
  73. [    0.080000] CPU1 revision is: 0001992f (MIPS 1004Kc)
  74. [    0.170000] Synchronize counters for CPU 1: done.
  75. [    0.180000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
  76. [    0.180000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
  77. [    0.180000] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
  78. [    0.190000] CPU2 revision is: 0001992f (MIPS 1004Kc)
  79. [    0.280000] Synchronize counters for CPU 2: done.
  80. [    0.290000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
  81. [    0.290000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
  82. [    0.290000] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
  83. [    0.290000] CPU3 revision is: 0001992f (MIPS 1004Kc)
  84. [    0.380000] Synchronize counters for CPU 3: done.
  85. [    0.390000] Brought up 4 CPUs
  86. [    0.400000] pinctrl core: initialized pinctrl subsystem
  87. [    0.410000] NET: Registered protocol family 16
  88. [    0.420000] pull PCIe RST: RALINK_RSTCTRL = 4000000
  89. [    0.720000] release PCIe RST: RALINK_RSTCTRL = 7000000
  90. [    0.730000] ***** Xtal 40MHz *****
  91. [    0.730000] release PCIe RST: RALINK_RSTCTRL = 7000000
  92. [    0.740000] Port 0 N_FTS = 1b102800
  93. [    0.740000] Port 1 N_FTS = 1b102800
  94. [    0.750000] Port 2 N_FTS = 1b102800
  95. [    1.880000] PCIE0 no card, disable it(RST&CLK)
  96. [    1.890000] PCIE1 no card, disable it(RST&CLK)
  97. [    1.890000] PCIE2 no card, disable it(RST&CLK)
  98. [    1.930000] mt7621_gpio 1e000600.gpio: registering 32 gpios
  99. [    1.940000] mt7621_gpio 1e000600.gpio: registering 32 gpios
  100. [    1.950000] mt7621_gpio 1e000600.gpio: registering 32 gpios
  101. [    1.960000] Switched to clocksource MIPS
  102. [    1.970000] NET: Registered protocol family 2
  103. [    1.980000] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
  104. [    2.000000] TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
  105. [    2.010000] TCP: Hash tables configured (established 1024 bind 1024)
  106. [    2.020000] TCP: reno registered
  107. [    2.030000] UDP hash table entries: 256 (order: 1, 8192 bytes)
  108. [    2.040000] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
  109. [    2.050000] NET: Registered protocol family 1
  110. [    2.060000] futex hash table entries: 1024 (order: 4, 65536 bytes)
  111. [    2.080000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
  112. [    2.090000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
  113. [    2.110000] msgmni has been set to 245
  114. [    2.120000] io scheduler noop registered
  115. [    2.130000] io scheduler deadline registered (default)
  116. [    2.140000] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
  117. [    2.150000] console [ttyS0] disabled
  118. [    2.160000] 1e000c00.uartlite: ttyS0 at MMIO 0x1e000c00 (irq = 34, base_baud = 3125000) is a 16550A
  119. [    2.180000] console [ttyS0] enabled
  120. [    2.180000] console [ttyS0] enabled
  121. [    2.190000] bootconsole [early0] disabled
  122. [    2.190000] bootconsole [early0] disabled
  123. [    2.210000] spi-mt7621 1e000b00.spi: sys_freq: 50000000
  124. [    2.220000] m25p80 spi32766.0: found mx25l12805d, expected w25q128
  125. [    2.230000] m25p80 spi32766.0: mx25l12805d (16384 Kbytes)
  126. [    2.240000] m25p80 spi32766.0: using chunked io
  127. [    2.250000] 5 ofpart partitions found on MTD device spi32766.0
  128. [    2.260000] Creating 5 MTD partitions on "spi32766.0":
  129. [    2.270000] 0x000000000000-0x000000030000 : "u-boot"
  130. [    2.290000] 0x000000030000-0x000000040000 : "u-boot-env"
  131. [    2.300000] 0x000000040000-0x000000050000 : "factory"
  132. [    2.310000] 0x000000050000-0x000000c00000 : "firmware"
  133. [    2.360000] 2 uimage-fw partitions found on MTD device firmware
  134. [    2.370000] 0x000000050000-0x000000175145 : "kernel"
  135. [    2.380000] 0x000000175145-0x000000c00000 : "rootfs"
  136. [    2.390000] mtd: device 5 (rootfs) set to be root filesystem
  137. [    2.400000] 1 squashfs-split partitions found on MTD device rootfs
  138. [    2.410000] 0x000000740000-0x000000c00000 : "rootfs_data"
  139. [    2.420000] 0x000000c00000-0x000001000000 : "data"
  140. [    2.430000] rt2880-pinmux pinctrl: invalid group "rgmii1" for function "rgmii"
  141. [    2.450000] netif_napi_add() called with weight 128 on device eth%d
  142. [    2.470000] change HW-TRAP to 0x17ccf
  143. [    2.480000] ralink_soc_eth 1e100000.ethernet: generated random MAC address d2:ce:39:55:5e:ce
  144. [    2.500000] libphy: mdio: probed
  145. [    2.520000] ralink_soc_eth 1e100000.ethernet: loaded mt7530 driver
  146. [    2.530000] ralink_soc_eth 1e100000.ethernet eth0: ralink at 0xbe100000, irq 11
  147. [    2.540000] mt7621_wdt 1e000100.wdt: Initialized
  148. [    2.550000] TCP: cubic registered
  149. [    2.560000] NET: Registered protocol family 17
  150. [    2.570000] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
  151. [    2.590000] 8021q: 802.1Q VLAN Support v1.8
  152. [    2.610000] VFS: Mounted root (squashfs filesystem) readonly on device 31:5.
  153. [    2.620000] Freeing unused kernel memory: 204K (8034d000 - 80380000)
  154. [    2.760000] random: nonblocking pool is initialized
  155. [    3.720000] init: Console is alive
  156. [    3.720000] init: - watchdog -
  157. [    4.810000] usbcore: registered new interface driver usbfs
  158. [    4.820000] usbcore: registered new interface driver hub
  159. [    4.830000] usbcore: registered new device driver usb
  160. [    4.870000] FM_OUT value: u4FmOut = 0(0x00000000)
  161. [    4.890000] FM_OUT value: u4FmOut = 0(0x00000000)
  162. [    4.910000] FM_OUT value: u4FmOut = 0(0x00000000)
  163. [    4.930000] FM_OUT value: u4FmOut = 0(0x00000000)
  164. [    4.950000] FM_OUT value: u4FmOut = 0(0x00000000)
  165. [    4.970000] FM_OUT value: u4FmOut = 0(0x00000000)
  166. [    4.990000] FM_OUT value: u4FmOut = 0(0x00000000)
  167. [    5.010000] FM_OUT value: u4FmOut = 0(0x00000000)
  168. [    5.030000] FM_OUT value: u4FmOut = 0(0x00000000)
  169. [    5.050000] FM_OUT value: u4FmOut = 0(0x00000000)
  170. [    5.110000] FM_OUT value: u4FmOut = 0(0x00000000)
  171. [    5.130000] FM_OUT value: u4FmOut = 0(0x00000000)
  172. [    5.150000] FM_OUT value: u4FmOut = 0(0x00000000)
  173. [    5.170000] FM_OUT value: u4FmOut = 0(0x00000000)
  174. [    5.190000] FM_OUT value: u4FmOut = 0(0x00000000)
  175. [    5.210000] FM_OUT value: u4FmOut = 0(0x00000000)
  176. [    5.230000] FM_OUT value: u4FmOut = 0(0x00000000)
  177. [    5.250000] FM_OUT value: u4FmOut = 0(0x00000000)
  178. [    5.270000] FM_OUT value: u4FmOut = 0(0x00000000)
  179. [    5.290000] FM_OUT value: u4FmOut = 0(0x00000000)
  180. [    5.440000] xhci-hcd xhci-hcd: xHCI Host Controller
  181. [    5.450000] xhci-hcd xhci-hcd: new USB bus registered, assigned bus number 1
  182. [    5.460000] xhci-hcd xhci-hcd: irq 30, io mem 0x1e1c0000
  183. [    5.470000] hub 1-0:1.0: USB hub found
  184. [    5.480000] hub 1-0:1.0: 2 ports detected
  185. [    5.490000] xhci-hcd xhci-hcd: xHCI Host Controller
  186. [    5.500000] xhci-hcd xhci-hcd: new USB bus registered, assigned bus number 2
  187. [    5.510000] hub 2-0:1.0: USB hub found
  188. [    5.520000] hub 2-0:1.0: 1 port detected
  189. [    5.730000] init: - preinit -
  190. Press the [f] key and hit [enter] to enter failsafe mode
  191. Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
  192. [    8.400000] ralink_soc_eth 1e100000.ethernet eth0: port 2 link up
  193. [    9.220000] jffs2: notice: (336) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
  194. [    9.250000] mount_root: switching to jffs2 overlay
  195. [    9.290000] procd: - early -
  196. [    9.290000] procd: - watchdog -
  197. [   10.040000] procd: - ubus -
  198. [   11.050000] procd: - init -
  199. [   11.640000] NET: Registered protocol family 10
  200. [   11.650000] ip6_tables: (C) 2000-2006 Netfilter Core Team
  201. [   11.670000] Loading modules backported from Linux version v4.4-rc5-1913-gc8fdf68
  202. [   11.690000] Backport generated by backports.git backports-20151218-0-g2f58d9d
  203. [   11.810000] ip_tables: (C) 2000-2006 Netfilter Core Team
  204. [   11.820000] nf_conntrack version 0.5.0 (1970 buckets, 7880 max)
  205. [   11.970000] xt_time: kernel timezone is -0000
  206. [   11.980000] PPP generic driver version 2.4.2
  207. [   11.990000] NET: Registered protocol family 24


  208. ===================================================================
  209.                 MT7621   stage1 code 10:33:55 (ASIC)
  210.                 CPU=500000000 HZ BUS=166666666 HZ
  211. ==================================================================
  212. Change MPLL source from XTAL to CR...
  213. do MEMPLL setting..
  214. MEMPLL Config : 0x11100000
  215. 3PLL mode + External loopback
  216. === XTAL-40Mhz === DDR-1200Mhz ===
  217. PLL2 FB_DL: 0x7, 1/0 = 553/471 1D000000
  218. PLL3 FB_DL: 0xd, 1/0 = 579/445 35000000
  219. PLL4 FB_DL: 0xd, 1/0 = 525/499 35000000
  220. do DDR setting..[01F40000]
  221. Apply DDR3 Setting...(use customer AC)
  222.           0    8   16   24   32   40   48   56   64   72   80   88   96  104  112  120
  223.       --------------------------------------------------------------------------------
  224. 0000:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
  225. 0001:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
  226. 0002:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
  227. 0003:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
  228. 0004:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
  229. 0005:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
  230. 0006:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
  231. 0007:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
  232. 0008:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
  233. 0009:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
  234. 000A:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
  235. 000B:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
  236. 000C:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
  237. 000D:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    1    1
  238. 000E:|    0    0    0    0    0    0    0    0    1    1    1    1    1    1    1    1
  239. 000F:|    0    0    0    0    1    1    1    1    1    1    1    1    1    0    0    0
  240. 0010:|    1    1    1    1    1    1    1    1    0    0    0    0    0    0    0    0
  241. 0011:|    1    1    1    0    0    0    0    0    0    0    0    0    0    0    0    0
  242. 0012:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
  243. 0013:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
  244. 0014:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
  245. 0015:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
  246. 0016:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
  247. 0017:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
  248. 0018:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
  249. 0019:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
  250. 001A:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
  251. 001B:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
  252. 001C:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
  253. 001D:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
  254. 001E:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
  255. 001F:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
  256. rank 0 coarse = 15
  257. rank 0 fine = 64
  258. B:|    0    0    0    0    0    0    0    0    0    0    1    1    1    0    0    0
  259. opt_dle value:11
  260. DRAMC_R0DELDLY[018]=00001D1E
  261. ==================================================================
  262.                 RX      DQS perbit delay software calibration
  263. ==================================================================
  264. 1.0-15 bit dq delay value
  265. ==================================================================
  266. bit|     0  1  2  3  4  5  6  7  8  9
  267. --------------------------------------
  268. 0 |    10 9 10 12 9 11 10 9 8 10
  269. 10 |    10 10 9 11 9 10
  270. --------------------------------------

  271. ==================================================================
  272. 2.dqs window
  273. x=pass dqs delay value (min~max)center
  274. y=0-7bit DQ of every group
  275. input delay:DQS0 =30 DQS1 = 29
  276. ==================================================================
  277. bit     DQS0     bit      DQS1
  278. 0  (1~56)28  8  (1~55)28
  279. 1  (1~56)28  9  (1~56)28
  280. 2  (1~55)28  10  (1~56)28
  281. 3  (1~56)28  11  (1~52)26
  282. 4  (1~56)28  12  (1~55)28
  283. 5  (1~59)30  13  (1~56)28
  284. 6  (1~58)29  14  (1~58)29
  285. 7  (1~59)30  15  (0~55)27
  286. ==================================================================
  287. 3.dq delay value last
  288. ==================================================================
  289. bit|    0  1  2  3  4  5  6  7  8   9
  290. --------------------------------------
  291. 0 |    12 11 12 14 11 11 11 9 9 11
  292. 10 |    11 13 10 12 9 12
  293. ==================================================================
  294. ==================================================================
  295.      TX  perbyte calibration
  296. ==================================================================
  297. DQS loop = 15, cmp_err_1 = ffff0000
  298. dqs_perbyte_dly.last_dqsdly_pass[0]=15,  finish count=1
  299. dqs_perbyte_dly.last_dqsdly_pass[1]=15,  finish count=2
  300. DQ loop=15, cmp_err_1 = ffff0000
  301. dqs_perbyte_dly.last_dqdly_pass[0]=15,  finish count=1
  302. dqs_perbyte_dly.last_dqdly_pass[1]=15,  finish count=2
  303. byte:0, (DQS,DQ)=(8,8)
  304. byte:1, (DQS,DQ)=(8,8)
  305. 20,data:88
  306. [EMI] DRAMC calibration passed

  307. ===================================================================
  308.                 MT7621   stage1 code done
  309.                 CPU=500000000 HZ BUS=166666666 HZ
  310. ===================================================================


  311. U-Boot 1.1.3 (Mar 22 2019 - 16:14:21)

  312. Board: Ralink APSoC DRAM:  256 MB
  313. relocate_code Pointer at: 8ffb8000

  314. Config XHCI 40M PLL
  315. flash manufacture id: c2, device id 20 18
  316. find flash: MX25L12805D
  317. *** Warning - bad CRC, using default environment

  318. ============================================
  319. Ralink UBoot Version: 4.3.0.0
  320. --------------------------------------------
  321. ASIC MT7621A DualCore (MAC to MT7530 Mode)
  322. DRAM_CONF_FROM: Auto-Detection
  323. DRAM_TYPE: DDR3
  324. DRAM bus: 16 bit
  325. Xtal Mode=3 OCP Ratio=1/3
  326. Flash component: SPI Flash
  327. Date:Mar 22 2019  Time:16:14:21
  328. ============================================
  329. icache: sets:256, ways:4, linesz:32 ,total:32768
  330. dcache: sets:256, ways:4, linesz:32 ,total:32768

  331. ##### The CPU freq = 880 MHZ ####
  332. estimate memory size =256 Mbytes
  333. #Reset_MT7530
  334. set LAN/WAN LLLLW

  335. Please choose the operation:
  336.    1: Load system code to SDRAM via TFTP.
  337.    2: Load system code then write to Flash via TFTP.
  338.    3: Boot system code via Flash (default).
  339.    4: Entr boot command line interface.
  340.    7: Load Boot Loader code then write to Flash via Serial.
  341.    9: Load Boot Loader code then write to Flash via TFTP.
  342. 0
  343.    
  344. 3: System Boot system code via Flash.
  345. ## Booting image at bfc50000 ...
  346.    Image Name:   MIPS OpenWrt Linux-3.18.45
  347.    Image Type:   MIPS Linux Kernel Image (lzma compressed)
  348.    Data Size:    1200389 Bytes =  1.1 MB
  349.    Load Address: 80001000
  350.    Entry Point:  80001000
  351.    Verifying Checksum ... OK
  352.    Uncompressing Kernel Image ... OK
  353. No initrd
  354. ## Transferring control to Linux (at address 80001000) ...
  355. ## Giving linux memsize in MB, 256

  356. Starting kernel ...

  357. [    0.000000] Linux version 3.18.45 (xmrd@xmrd) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 r1074) ) #10 SMP Mon May 27 16:46:17 CST 2019
  358. [    0.000000] SoC Type: MediaTek MT7621 ver:1 eco:3
  359. [    0.000000] bootconsole [early0] enabled
  360. [    0.000000] CPU0 revision is: 0001992f (MIPS 1004Kc)
  361. [    0.000000] MIPS: machine is SN3100
  362. [    0.000000] Determined physical RAM map:
  363. [    0.000000]  memory: 08000000 @ 00000000 (usable)
  364. [    0.000000] Initrd not found or empty - disabling initrd
  365. [    0.000000] Zone ranges:
  366. [    0.000000]   Normal   [mem 0x00000000-0x07ffffff]
  367. [    0.000000]   HighMem  empty
  368. [    0.000000] Movable zone start for each node
  369. [    0.000000] Early memory node ranges
  370. [    0.000000]   node   0: [mem 0x00000000-0x07ffffff]
  371. [    0.000000] Initmem setup node 0 [mem 0x00000000-0x07ffffff]
  372. [    0.000000] Detected 3 available secondary CPU(s)
  373. [    0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
  374. [    0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
  375. [    0.000000] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
  376. [    0.000000] PERCPU: Embedded 9 pages/cpu @8110b000 s5696 r8192 d22976 u36864
  377. [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
  378. [    0.000000] Kernel command line: console=ttyS0,57600 rootfstype=squashfs,jffs2
  379. [    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
  380. [    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
  381. [    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
  382. [    0.000000] Writing ErrCtl register=00000708
  383. [    0.000000] Readback ErrCtl register=00000708
  384. [    0.000000] Memory: 125896K/131072K available (2704K kernel code, 140K rwdata, 524K rodata, 204K init, 228K bss, 5176K reserved, 0K highmem)
  385. [    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
  386. [    0.000000] Hierarchical RCU implementation.
  387. [    0.000000] NR_IRQS:256
  388. [    0.000000] gic: revision 3.0
  389. [    0.000000] CPU Clock: 880MHz
  390. [    0.000000] Calibrating delay loop... 577.53 BogoMIPS (lpj=2887680)
  391. [    0.060000] pid_max: default: 32768 minimum: 301
  392. [    0.070000] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
  393. [    0.080000] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
  394. [    0.090000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
  395. [    0.090000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
  396. [    0.090000] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
  397. [    0.090000] CPU1 revision is: 0001992f (MIPS 1004Kc)
  398. [    0.180000] Synchronize counters for CPU 1: done.
  399. [    0.190000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
  400. [    0.190000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
  401. [    0.190000] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
  402. [    0.200000] CPU2 revision is: 0001992f (MIPS 1004Kc)
  403. [    0.290000] Synchronize counters for CPU 2: done.
  404. [    0.300000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
  405. [    0.300000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
  406. [    0.300000] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
  407. [    0.300000] CPU3 revision is: 0001992f (MIPS 1004Kc)
  408. [    0.390000] Synchronize counters for CPU 3: done.
  409. [    0.400000] Brought up 4 CPUs
  410. [    0.410000] pinctrl core: initialized pinctrl subsystem
  411. [    0.420000] NET: Registered protocol family 16
  412. [    0.430000] pull PCIe RST: RALINK_RSTCTRL = 4000000
  413. [    0.730000] release PCIe RST: RALINK_RSTCTRL = 7000000
  414. [    0.740000] ***** Xtal 40MHz *****
  415. [    0.740000] release PCIe RST: RALINK_RSTCTRL = 7000000
  416. [    0.750000] Port 0 N_FTS = 1b102800
  417. [    0.750000] Port 1 N_FTS = 1b102800
  418. [    0.760000] Port 2 N_FTS = 1b102800
  419. [    1.890000] PCIE0 no card, disable it(RST&CLK)
  420. [    1.900000] PCIE1 no card, disable it(RST&CLK)
  421. [    1.900000] PCIE2 no card, disable it(RST&CLK)
  422. [    1.940000] mt7621_gpio 1e000600.gpio: registering 32 gpios
  423. [    1.950000] mt7621_gpio 1e000600.gpio: registering 32 gpios
  424. [    1.960000] mt7621_gpio 1e000600.gpio: registering 32 gpios
  425. [    1.970000] Switched to clocksource MIPS
  426. [    1.980000] NET: Registered protocol family 2
  427. [    1.990000] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
  428. [    2.010000] TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
  429. [    2.020000] TCP: Hash tables configured (established 1024 bind 1024)
  430. [    2.030000] TCP: reno registered
  431. [    2.040000] UDP hash table entries: 256 (order: 1, 8192 bytes)
  432. [    2.050000] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
  433. [    2.060000] NET: Registered protocol family 1
  434. [    2.070000] futex hash table entries: 1024 (order: 4, 65536 bytes)
  435. [    2.090000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
  436. [    2.110000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
  437. [    2.130000] msgmni has been set to 245
  438. [    2.130000] io scheduler noop registered
  439. [    2.140000] io scheduler deadline registered (default)
  440. [    2.150000] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
  441. [    2.160000] console [ttyS0] disabled
  442. [    2.170000] 1e000c00.uartlite: ttyS0 at MMIO 0x1e000c00 (irq = 34, base_baud = 3125000) is a 16550A
  443. [    2.190000] console [ttyS0] enabled
  444. [    2.190000] console [ttyS0] enabled
  445. [    2.200000] bootconsole [early0] disabled
  446. [    2.200000] bootconsole [early0] disabled
  447. [    2.220000] spi-mt7621 1e000b00.spi: sys_freq: 50000000
  448. [    2.230000] m25p80 spi32766.0: found mx25l12805d, expected w25q128
  449. [    2.240000] m25p80 spi32766.0: mx25l12805d (16384 Kbytes)
  450. [    2.260000] m25p80 spi32766.0: using chunked io
  451. [    2.260000] 5 ofpart partitions found on MTD device spi32766.0
  452. [    2.280000] Creating 5 MTD partitions on "spi32766.0":
  453. [    2.290000] 0x000000000000-0x000000030000 : "u-boot"
  454. [    2.300000] 0x000000030000-0x000000040000 : "u-boot-env"
  455. [    2.310000] 0x000000040000-0x000000050000 : "factory"
  456. [    2.320000] 0x000000050000-0x000000c00000 : "firmware"
  457. [    2.370000] 2 uimage-fw partitions found on MTD device firmware
  458. [    2.380000] 0x000000050000-0x000000175145 : "kernel"
  459. [    2.390000] 0x000000175145-0x000000c00000 : "rootfs"
  460. [    2.400000] mtd: device 5 (rootfs) set to be root filesystem
  461. [    2.410000] 1 squashfs-split partitions found on MTD device rootfs
  462. [    2.430000] 0x000000740000-0x000000c00000 : "rootfs_data"
  463. [    2.440000] 0x000000c00000-0x000001000000 : "data"
  464. [    2.450000] rt2880-pinmux pinctrl: invalid group "rgmii1" for function "rgmii"
  465. [    2.460000] netif_napi_add() called with weight 128 on device eth%d
  466. [    2.490000] change HW-TRAP to 0x17ccf
  467. [    2.500000] ralink_soc_eth 1e100000.ethernet: generated random MAC address 2e:83:f4:ba:6e:c0
  468. [    2.510000] libphy: mdio: probed
  469. [    2.530000] ralink_soc_eth 1e100000.ethernet: loaded mt7530 driver
  470. [    2.540000] ralink_soc_eth 1e100000.ethernet eth0: ralink at 0xbe100000, irq 11
  471. [    2.560000] mt7621_wdt 1e000100.wdt: Initialized
  472. [    2.570000] TCP: cubic registered
  473. [    2.580000] NET: Registered protocol family 17
  474. [    2.580000] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
  475. [    2.610000] 8021q: 802.1Q VLAN Support v1.8
  476. [    2.630000] VFS: Mounted root (squashfs filesystem) readonly on device 31:5.
  477. [    2.640000] Freeing unused kernel memory: 204K (8034d000 - 80380000)
  478. [    2.710000] random: nonblocking pool is initialized
  479. [    3.760000] init: Console is alive
  480. [    3.760000] init: - watchdog -
  481. [    4.850000] usbcore: registered new interface driver usbfs
  482. [    4.860000] usbcore: registered new interface driver hub
  483. [    4.870000] usbcore: registered new device driver usb
  484. [    4.910000] FM_OUT value: u4FmOut = 0(0x00000000)
  485. [    4.930000] FM_OUT value: u4FmOut = 0(0x00000000)
  486. [    4.950000] FM_OUT value: u4FmOut = 0(0x00000000)
  487. [    4.970000] FM_OUT value: u4FmOut = 0(0x00000000)
  488. [    4.990000] FM_OUT value: u4FmOut = 0(0x00000000)
  489. [    5.010000] FM_OUT value: u4FmOut = 0(0x00000000)
  490. [    5.030000] FM_OUT value: u4FmOut = 0(0x00000000)
  491. [    5.050000] FM_OUT value: u4FmOut = 0(0x00000000)
  492. [    5.070000] FM_OUT value: u4FmOut = 0(0x00000000)
  493. [    5.090000] FM_OUT value: u4FmOut = 0(0x00000000)
  494. [    5.150000] FM_OUT value: u4FmOut = 0(0x00000000)
  495. [    5.170000] FM_OUT value: u4FmOut = 0(0x00000000)
  496. [    5.190000] FM_OUT value: u4FmOut = 0(0x00000000)
  497. [    5.210000] FM_OUT value: u4FmOut = 0(0x00000000)
  498. [    5.230000] FM_OUT value: u4FmOut = 0(0x00000000)
  499. [    5.250000] FM_OUT value: u4FmOut = 0(0x00000000)
  500. [    5.270000] FM_OUT value: u4FmOut = 0(0x00000000)
  501. [    5.290000] FM_OUT value: u4FmOut = 0(0x00000000)
  502. [    5.310000] FM_OUT value: u4FmOut = 0(0x00000000)
  503. [    5.330000] FM_OUT value: u4FmOut = 0(0x00000000)
  504. [    5.480000] xhci-hcd xhci-hcd: xHCI Host Controller
  505. [    5.490000] xhci-hcd xhci-hcd: new USB bus registered, assigned bus number 1
  506. [    5.500000] xhci-hcd xhci-hcd: irq 30, io mem 0x1e1c0000
  507. [    5.510000] hub 1-0:1.0: USB hub found
  508. [    5.520000] hub 1-0:1.0: 2 ports detected
  509. [    5.530000] xhci-hcd xhci-hcd: xHCI Host Controller
  510. [    5.540000] xhci-hcd xhci-hcd: new USB bus registered, assigned bus number 2
  511. [    5.550000] hub 2-0:1.0: USB hub found
  512. [    5.560000] hub 2-0:1.0: 1 port detected
  513. [    5.770000] init: - preinit -
  514. Press the [f] key and hit [enter] to enter failsafe mode
  515. Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
  516. [    8.770000] ralink_soc_eth 1e100000.ethernet eth0: port 2 link up
  517. [    9.270000] jffs2: notice: (337) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
  518. [    9.310000] mount_root: switching to jffs2 overlay
  519. [    9.390000] procd: - early -
  520. [    9.390000] procd: - watchdog -
  521. [   10.160000] procd: - ubus -
  522. [   11.170000] procd: - init -
  523. [   11.760000] NET: Registered protocol family 10
  524. [   11.770000] ip6_tables: (C) 2000-2006 Netfilter Core Team
  525. [   11.790000] Loading modules backported from Linux version v4.4-rc5-1913-gc8fdf68
  526. [   11.810000] Backport generated by backports.git backports-20151218-0-g2f58d9d
  527. [   11.930000] ip_tables: (C) 2000-2006 Netfilter Core Team
  528. [   11.950000] nf_conntrack version 0.5.0 (1970 buckets, 7880 max)
  529. [   12.120000] xt_time: kernel timezone is -0000
  530. [   12.130000] PPP generic driver version 2.4.2
  531. [   12.140000] NET: Registered protocol family 24
  532. ?
复制代码

我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| | 显示全部楼层
如何加载AR8327驱动
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| | 显示全部楼层
网上看到有人说qca8337的驱动和ar8216是通用的,请问怎么加载AR8216的驱动,我的menuconfig里面没有这项

mt7621这边使用rgmii2 连qca8337的port0,这个dts文件要怎么写
  1. [    2.470000] ralink_soc_eth 1e100000.ethernet: generated random MAC address 4a:c5:eb:5c:62:af
  2. [    2.490000] libphy: mdio: probed
  3. [    2.510000] ralink_soc_eth 1e100000.ethernet: loaded mt7530 driver
  4. [    2.520000] ralink_soc_eth 1e100000.ethernet eth0: ralink at 0xbe100000, irq 11
复制代码

  1. ethernet@1e100000 {
  2.         status = "okay";

  3.         pinctrl-names = "default";
  4.         pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;

  5.         ralink,port-map = "llllw";

  6.         port@5 {
  7.             status = "okay";
  8.             ralink,fixed-link = <1000 1 1 1>;
  9.             phy-mode = "rgmii";
  10.         };

  11.         mdio-bus {
  12.             status = "okay";

  13.             phy0: ethernet-phy@0 {
  14.                 reg = <0>;
  15.                 phy-mode = "rgmii";
  16.                                 qca,ar8327-initvals = <
  17.                                         0x00004 0x07600000 /* PAD0_MODE */
  18.                                         0x00008 0x00000000 /* PAD5_MODE */
  19.                                         0x0000c 0x01000000 /* PAD6_MODE */
  20.                                         0x00010 0x40000000 /* POWER_ON_STRIP */
  21.                                         0x00050 0xcf35cf35 /* LED_CTRL0 */
  22.                                         0x00054 0xcf35cf35 /* LED_CTRL1 */
  23.                                         0x00058 0xcf35cf35 /* LED_CTRL2 */
  24.                                         0x0005c 0x03ffff00 /* LED_CTRL3 */
  25.                                         0x0007c 0x0000007e /* PORT0_STATUS */
  26.                                 >;
  27.             };
  28.             phy4: ethernet-phy@4 {
  29.                 reg = <4>;
  30.                 phy-mode = "rgmii";
  31.             };
  32.             phy1f: ethernet-phy@1f {
  33.                 reg = <0x1f>;
  34.                 phy-mode = "rgmii";
  35.             };
  36.         };
  37.     };
  38.         gsw@1e110000 {
  39.                 ralink,port4 = "gmac";
  40.                 mediatek,mt7530 = <1>;
  41.         };
复制代码
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

欢迎大家光临恩山无线论坛上一条 /1 下一条

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-4-28 17:32

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

快速回复 返回顶部 返回列表