Re: Debian on NSA310S? July 30, 2015 05:47PM |
Admin Registered: 13 years ago Posts: 18,997 |
Re: Debian on NSA310S? July 31, 2015 05:53PM |
Admin Registered: 13 years ago Posts: 18,997 |
> nsa310s_phy_fixup(struct phy_device *phydev) > +{ > + int err; > + int temp; > + /* go to page 3 */ > + err = phy_write(phydev, 22, 3); > + if (err < 0) > + return err; > + /* read page 3, register 17 */ > + temp = phy_read(phydev, 17); > + /* clear bit 4, set bit 5 */ > + temp &= ~(1<<4); > + temp |= (1<<5); > + /* write page 3, register 17 */ > + err = phy_write(phydev, 17, temp); > + if (err < 0) > + return err; > + /* go to page 0 */ > + err = phy_write(phydev, 22, 0); > + if (err < 0) > + return err; > + > + return 0; > +}
Re: Debian on NSA310S? August 01, 2015 08:47PM |
Admin Registered: 13 years ago Posts: 18,997 |
Re: Debian on NSA310S? August 02, 2015 02:09AM |
Registered: 9 years ago Posts: 118 |
Re: Debian on NSA310S? August 05, 2015 06:33AM |
Registered: 9 years ago Posts: 47 |
[ 22.152970] NET: Registered protocol family 10 [ 22.414745] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready [....] Configuring network interfaces...Internet Systems Consortium DHCP Client 4.3.1 Copyright 2004-2014 Internet Systems Consortium. All rights reserved. For info, please visit https://www.isc.org/software/dhcp/ Listening on LPF/eth0/00:50:43:00:02:02 Sending on LPF/eth0/00:50:43:00:02:02 Sending on Socket/fallback DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8 [ 24.914081] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled [ 24.923932] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 19 DHCPREQUEST on eth0 to 255.255.255.255 port 67 DHCPOFFER from 192.168.1.1 DHCPACK from 192.168.1.1 bound to 192.168.1.189 -- renewal in 20546 seconds.
--- linux-4.1.3a/drivers/net/ethernet/marvell/mv643xx_eth.c 2015-07-21 19:10:33.000000000 +0200 +++ linux-4.1.3b/drivers/net/ethernet/marvell/mv643xx_eth.c 2015-08-05 16:24:15.000000000 +0200 @@ -2313,6 +2313,16 @@ } /* + # The MCU set the phy to 10-Mb mode as low-power status. + # We have to set it back when booting up. + # "Set the phy back to auto-negotiation mode" + */ + + phy_write(mp->phy, 0x4, 0x1e1); + phy_write(mp->phy, 0x9, 0x300); + phy_write(mp->phy, 0x0, 0x9140); + + /* * Configure basic link parameters. */ pscr = rdlp(mp, PORT_SERIAL_CONTROL); @@ -3099,6 +3109,10 @@ mp->phy = of_phy_connect(mp->dev, pd->phy_node, mv643xx_eth_adjust_link, 0, PHY_INTERFACE_MODE_GMII); + /*Link down fix*/ + phy_write(mp->phy, 22, 0x3); + phy_write(mp->phy, 22, 0x0); + if (!mp->phy) err = -ENODEV; elseI don't know if it breaks something on other platforms but auto-negotiation part can be pushed to userland like zyxel did
Re: Debian on NSA310S? August 05, 2015 11:31AM |
Registered: 9 years ago Posts: 118 |
Re: Debian on NSA310S? August 05, 2015 12:18PM |
Registered: 9 years ago Posts: 47 |
Re: Debian on NSA310S? August 05, 2015 01:01PM |
Registered: 9 years ago Posts: 118 |
Re: Debian on NSA310S? August 05, 2015 02:25PM |
Admin Registered: 13 years ago Posts: 18,997 |
Re: Debian on NSA310S? August 05, 2015 02:36PM |
Registered: 9 years ago Posts: 47 |
#if defined(CONFIG_ZYXEL_NSA325) /* Set LED[2] pin is tristate; for communicating with MCU */ mvEthPhyRegWrite(mvBoardPhyAddrGet(ethPortNum),22,0x3); mvEthPhyRegRead(mvBoardPhyAddrGet(ethPortNum),17,®); reg &= ~(1 << 4); reg |= (1 << 5); mvEthPhyRegWrite(mvBoardPhyAddrGet(ethPortNum),17,reg); mvEthPhyRegWrite(mvBoardPhyAddrGet(ethPortNum),22,0x0); #endifand general patch should detect model ( or maybe this init is general for all zyxel's boxes)?
Re: Debian on NSA310S? August 05, 2015 02:57PM |
Admin Registered: 13 years ago Posts: 18,997 |
Re: Debian on NSA310S? August 06, 2015 12:32AM |
Admin Registered: 13 years ago Posts: 18,997 |
Re: Debian on NSA310S? August 07, 2015 06:08PM |
Admin Registered: 13 years ago Posts: 18,997 |
Re: Debian on NSA310S? August 07, 2015 06:49PM |
Registered: 9 years ago Posts: 47 |
regs.hour = bin2bcd(tm->tm_hour) | HT1382_HOUR_1224;
Re: Debian on NSA310S? August 13, 2015 04:44PM |
Admin Registered: 13 years ago Posts: 18,997 |
echo "CPU Temperature" $(($(/usr/sbin/i2cget -y 0x0 0x0a 0x07))) "C" echo "Fanspeed" $[60000/$(($(/usr/sbin/i2cget -y 0x0 0x0a 0x08)))] "RPM"shows system stats without any HDD installed:
Quote
CPU Temperature 38 C
Fanspeed 2608 RPM
Re: Debian on NSA310S? August 16, 2015 07:13PM |
Admin Registered: 13 years ago Posts: 18,997 |
./kwboot-tool/kwboot -t -B 115200 /dev/ttyUSB0 -b uboot.2014.07-tld-4.nsa310s.uart.kwb Sending boot message. Please reboot the target...| Sending boot image... 0 % [......................................................................] 2 % [......................................................................] 4 % [......................................................................] 6 % [......................................................................] 94 % [......................................................................] 96 % [......................................................................] 98 % [......................................] [Type Ctrl-\ + c to quit] U-Boot 2014.07-tld-4 (Aug 16 2015 - 16:48:38) ZyXEL NSA310S 1-Bay Power Media Server SoC: Kirkwood 88F6xxx_A1 DRAM: 256 MiB WARNING: Caches not enabled NAND: 128 MiB *** Warning - bad CRC, using default environment In: serial Out: serial Err: serial Net: egiga0 MV88E1318 PHY initialized on egiga0 main_loop Hit any key to stop autoboot: 0
NSA310S> bdinfo arch_number = 0x00001343 boot_params = 0x00000100 DRAM bank = 0x00000000 -> start = 0x00000000 -> size = 0x10000000 DRAM bank = 0x00000001 -> start = 0x00000000 -> size = 0x00000000 eth0name = egiga0 ethaddr = xx:xx:xx:xx:xx:xx current eth = egiga0 ip_addr = 192.168.0.248 baudrate = 115200 bps TLB addr = 0x0FFF0000 relocaddr = 0x0FF3D000 reloc off = 0x0F93D000 irq_sp = 0x0FB1CF3C sp start = 0x0FB1CF30
NSA310S> boot (Re)start USB... USB0: USB EHCI 1.00 scanning bus 0 for devices... 3 USB Device(s) found scanning usb for storage devices... 1 Storage Device(s) found Partition Map for USB device 0 -- Partition Type: DOS Part Start Sector Num Sectors UUID Type 1 2048 30749696 29f76b6e-01 83 Boot loading envs from usb 0 ... ** File not found /boot/uEnv.txt ** (Re)start USB... USB0: USB EHCI 1.00 scanning bus 0 for devices... 3 USB Device(s) found scanning usb for storage devices... 1 Storage Device(s) found 3123877 bytes read in 377 ms (7.9 MiB/s) 7427303 bytes read in 552 ms (12.8 MiB/s) ## Booting kernel from Legacy Image at 00800000 ... Image Name: Linux-4.1.0-kirkwood-tld-2 Created: 2015-08-09 4:08:21 UTC Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 3123813 Bytes = 3 MiB Load Address: 00008000 Entry Point: 00008000 Verifying Checksum ... OK ## Loading init Ramdisk from Legacy Image at 01100000 ... Image Name: initramfs-4.1.0-kirkwood-tld-2 Created: 2015-08-09 4:06:53 UTC Image Type: ARM Linux RAMDisk Image (gzip compressed) Data Size: 7427239 Bytes = 7.1 MiB Load Address: 00000000 Entry Point: 00000000 Verifying Checksum ... OK Loading Kernel Image ... OK Using machid 0x118f from environment Starting kernel ... Uncompressing Linux... done, booting the kernel. [ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Initializing cgroup subsys cpuset [ 0.000000] Initializing cgroup subsys cpu [ 0.000000] Initializing cgroup subsys cpuacct [ 0.000000] Linux version 4.1.0-kirkwood-tld-2 (root@tldDebian) (gcc version 4.9.2 (Debian 4.9.2-10) ) #1 PREEMPT Sat Aug 8 14:44:53 PDT 2015 [ 0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005397f [ 0.000000] CPU: VIVT data cache, VIVT instruction cache [ 0.000000] Machine model: Zyxel NSA310S
Re: Debian on NSA310S? August 17, 2015 02:45AM |
Admin Registered: 13 years ago Posts: 18,997 |
Re: Debian on NSA310S? August 19, 2015 10:11AM |
Registered: 9 years ago Posts: 118 |
Re: Debian on NSA310S? August 19, 2015 04:16PM |
Admin Registered: 13 years ago Posts: 18,997 |
Re: Debian on NSA310S? August 19, 2015 04:22PM |
Registered: 9 years ago Posts: 118 |
[ 63.374474] mv643xx_eth: Set the PHY back to auto-negotiation mode [ 63.408626] mv643xx_eth_port mv643xx_eth_port.0 eth0: The PHY does not support set_wol, was CONFIG_MARVELL_PHY enabled?
auto lo eth0 iface lo inet loopback iface eth0 inet static address 192.168.1.173 netmask 255.255.255.0 gateway 192.168.1.1 hwaddress ether 5c:f4:ab:df:07:2b post-up /sbin/ethtool -s $IFACE wol g post-down /sbin/ethtool -s $IFACE wol g
Re: Debian on NSA310S? August 19, 2015 04:35PM |
Admin Registered: 13 years ago Posts: 18,997 |
Re: Debian on NSA310S? August 19, 2015 04:45PM |
Registered: 9 years ago Posts: 118 |
auto lo eth0 iface lo inet loopback iface eth0 inet static address 192.168.1.173 netmask 255.255.255.0 gateway 192.168.1.1
[ 2.068207] libphy: orion_mdio_bus: probed [ 2.078641] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4 [ 2.086112] mv643xx_eth: Set the PHY to fix link down [ 2.091767] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address 5c:f4:ab:df:07:2b [ 2.101009] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [ 2.107626] ehci-pci: EHCI PCI platform driver [ 2.112141] ehci-orion: EHCI orion driver [ 2.116380] orion-ehci f1050000.ehci: EHCI Host Controller [ 2.121867] orion-ehci f1050000.ehci: new USB bus registered, assigned bus nu mber 1 [ 2.129716] orion-ehci f1050000.ehci: irq 30, io mem 0xf1050000 [ 2.153651] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00 [ 2.159877] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002 [ 2.166671] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber= 1 [ 2.173884] usb usb1: Product: EHCI Host Controller [ 2.178746] usb usb1: Manufacturer: Linux 4.1.0-kirkwood-tld-2 ehci_hcd [ 2.185348] usb usb1: SerialNumber: f1050000.ehci [ 2.190857] hub 1-0:1.0: USB hub found [ 2.194676] hub 1-0:1.0: 1 port detected [ 2.199608] mousedev: PS/2 mouse device common for all mice [ 2.205648] i2c /dev entries driver [ 2.211768] ht1382 0-0068: rtc core: registered ht1382 as rtc0 [ 2.220219] hidraw: raw HID events driver (C) Jiri Kosina [ 2.226022] drop_monitor: Initializing network drop monitor service [ 2.232540] NET: Registered protocol family 17 [ 2.237143] Key type dns_resolver registered [ 2.242311] Loading compiled-in X.509 certificates [ 2.247147] registered taskstats version 1 [ 2.270605] Key type encrypted registered [ 2.276382] ht1382 0-0068: setting system clock to 2015-08-19 13:39:51 UTC (1 439991591) [ 2.285779] PM: Hibernation image not present or could not be loaded. [ 2.286899] Freeing unused kernel memory: 288K (c07c2000 - c080a000) [ 2.367271] systemd-udevd[73]: starting version 215 [ 2.384663] random: systemd-udevd urandom read with 4 bits of entropy availab le [ 2.513751] usb 1-1: new high-speed USB device number 2 using orion-ehci [ 2.561853] SCSI subsystem initialized [ 2.639733] libata version 3.00 loaded. [ 2.641942] sata_mv f1080000.sata: version 1.28 [ 2.642256] sata_mv f1080000.sata: slots 32 ports 2 [ 2.675615] usb 1-1: New USB device found, idVendor=05e3, idProduct=0608 [ 2.682317] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0 [ 2.701117] usb 1-1: Product: USB2.0 Hub [ 2.705176] scsi host0: sata_mv [ 2.711779] hub 1-1:1.0: USB hub found [ 2.719494] hub 1-1:1.0: 4 ports detected [ 2.728892] scsi host1: sata_mv [ 2.744579] ata1: SATA max UDMA/133 irq 32 [ 2.748667] ata2: SATA max UDMA/133 irq 32 [ 3.003978] usb 1-1.3: new high-speed USB device number 3 using orion-ehci [ 3.114600] usb 1-1.3: New USB device found, idVendor=0781, idProduct=5571 [ 3.121462] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber =3 [ 3.128778] usb 1-1.3: Product: Cruzer Fit [ 3.132861] usb 1-1.3: Manufacturer: SanDisk [ 3.137133] usb 1-1.3: SerialNumber: 4C530005850112109093 [ 3.153299] usb-storage 1-1.3:1.0: USB Mass Storage device detected [ 3.159980] scsi host2: usb-storage 1-1.3:1.0 [ 3.166215] usbcore: registered new interface driver usb-storage [ 3.175491] usbcore: registered new interface driver uas [ 3.253669] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl F300) [ 3.293694] ata1.00: ATA-9: WDC WD10EFRX-68FYTN0, 82.00A82, max UDMA/133 [ 3.300375] ata1.00: 1953525168 sectors, multi 0: LBA48 NCQ (depth 31/32) [ 3.343705] ata1.00: configured for UDMA/133 [ 3.363993] scsi 0:0:0:0: Direct-Access ATA WDC WD10EFRX-68F 0A82 PQ : 0 ANSI: 5 [ 3.723661] ata2: SATA link down (SStatus 0 SControl F300) [ 3.758589] sd 0:0:0:0: [sda] 1953525168 512-byte logical blocks: (1.00 TB/93 1 GiB) [ 3.767305] sd 0:0:0:0: [sda] 4096-byte physical blocks [ 3.772823] sd 0:0:0:0: [sda] Write Protect is off [ 3.777760] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00 [ 3.777905] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, does n't support DPO or FUA [ 3.794475] sda: sda1 sda2 [ 3.799542] sd 0:0:0:0: [sda] Attached SCSI disk [ 3.808596] sd 0:0:0:0: Attached scsi generic sg0 type 0 [ 4.012421] md: bind<sda2> [ 4.026310] md: linear personality registered for level -1 [ 4.032603] md0: detected capacity change from 0 to 999674806784 [ 4.164960] scsi 2:0:0:0: Direct-Access SanDisk Cruzer Fit 1.27 PQ : 0 ANSI: 6 [ 4.179215] sd 2:0:0:0: Attached scsi generic sg1 type 0 [ 4.184667] sd 2:0:0:0: [sdb] 31266816 512-byte logical blocks: (16.0 GB/14.9 GiB) [ 4.196689] sd 2:0:0:0: [sdb] Write Protect is off [ 4.201495] sd 2:0:0:0: [sdb] Mode Sense: 43 00 00 00 [ 4.204010] sd 2:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doe sn't support DPO or FUA [ 4.222499] sdb: sdb1 sdb2 sdb3 [ 4.238026] sd 2:0:0:0: [sdb] Attached SCSI removable disk [ 10.196280] device-mapper: uevent: version 1.0.3 [ 10.203039] device-mapper: ioctl: 4.31.0-ioctl (2015-3-12) initialised: dm-de vel@redhat.com [ 10.244011] PM: Starting manual resume from disk [ 10.248621] PM: Hibernation image partition 8:18 present [ 10.248630] PM: Looking for hibernation image. [ 10.250112] PM: Image not found (code -22) [ 10.250126] PM: Hibernation image not present or could not be loaded. [ 10.461455] EXT4-fs (sdb3): mounted filesystem with ordered data mode. Opts: (null) [ 11.794594] systemd-udevd[297]: starting version 215 [ 12.089807] input: gpio_keys as /devices/platform/gpio_keys/input/input0 [ 12.251159] random: nonblocking pool is initialized [ 12.312323] orion_wdt: Initial timeout 25 sec [ 12.478384] rtc rtc0: __rtc_set_alarm: err=-22 [ 14.464569] Adding 524284k swap on /dev/sdb2. Priority:-1 extents:1 across:5 24284k FS [ 14.607112] EXT4-fs (sdb3): re-mounted. Opts: (null) [ 14.789070] EXT4-fs (sdb3): re-mounted. Opts: errors=remount-ro [ 55.080573] EXT4-fs (md0): mounted filesystem with ordered data mode. Opts: ( null) [ 56.157668] mv643xx_eth: Set the PHY back to auto-negotiation mode [ 56.568905] NET: Registered protocol family 10 [ 56.574571] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready [ 57.920640] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 100 Mb/s, full duplex, flow control disabled [ 57.930414] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Re: Debian on NSA310S? August 19, 2015 06:27PM |
Admin Registered: 13 years ago Posts: 18,997 |
Re: Debian on NSA310S? August 20, 2015 01:22AM |
Registered: 9 years ago Posts: 47 |
Re: Debian on NSA310S? August 20, 2015 01:27AM |
Registered: 9 years ago Posts: 118 |
LE: Solved this by using DHCP in /etc/network/interfaces instead of fixed IP.
Re: Debian on NSA310S? September 04, 2015 11:37AM |
Registered: 9 years ago Posts: 295 |
[ 0.000000] Kernel command line: console=ttyS0,115200no root and rootfstype were set ;-( on another box I got this fixed bot not on this one: my U-Boot env (atm)NSA3x0S> pri arcNumber=4931 baudrate=115200 bootcmd=run bootcmd_uenv; run set_bootargs_usb; run usb_init; run usb_boot bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi bootdelay=2 console=ttyS0,115200 device=0:1 ethact=egiga0 ethaddr=b6:d0:5e:0f:a1:17 led_error=orange blinking led_exit=green off led_init=green blinking load_dtb=fatload usb 0:1 0x1c00000 /dts/kirkwood-nsa310s.dtb load_initrd=fatload usb 0:1 0x1100000 /uInitrd load_uimage=fatload usb 0:1 0x800000 /uImage machid=118f mainlineLinux=yes mtdids=nand0=orion_nand mtdparts=mtdparts=orion_nand:0x80000@0x0(uboot),0x20000@0xc0000(uboot_env) partition=nand0,2 rootdelay=4 rootfstype=ext4 set_bootargs_usb=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootfstype=ext4 stderr=serial stdin=serial stdout=serial uenv_import=echo importing envs ...; env import -t 0x810000 uenv_load=usb start; setenv uenv_loaded 0; for devtype in usb; do for disknum in 0; do run uenv_read_disk; done; done uenv_loaded=0 uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 0x810000 /boot/uEnv.txt; then setenv uenv_loaded 1; fi uenv_read_disk=if $devtype part $disknum; then run uenv_read; fi usb_boot=run load_dtb; run load_uimage; if run load_initrd; then bootm 0x800000 0x1100000 0x1c00000; else bootm 0x800000 - 0x1c00000; fi usb_init=usb start usb_root=LABEL=rootfs Environment size: 1440/131068 byteswhen using $(rootfstype) and $(usb_root) this also doesn't work
Re: Debian on NSA310S? September 04, 2015 01:53PM |
Admin Registered: 13 years ago Posts: 18,997 |
Re: Debian on NSA310S? September 04, 2015 02:31PM |
Registered: 9 years ago Posts: 295 |
Re: Debian on NSA310S? September 04, 2015 03:09PM |
Admin Registered: 13 years ago Posts: 18,997 |
Re: Debian on NSA310S? September 04, 2015 03:40PM |
Registered: 9 years ago Posts: 295 |