Re: Debian on NSA310S? July 17, 2015 11:24AM |
Registered: 12 years ago Posts: 365 |
[ 0.140103] cpuidle: using governor ladder [ 0.170103] cpuidle: using governor menu [ 0.170582] Feroceon L2: Enabling L2 [ 0.170626] Feroceon L2: Cache support initialised. [ 0.171059] [Firmware Info]: /ocp@f1000000/ethernet-controller@72000/ethernet0-port@0: local-mac-address is not set [ 0.177108] No ATAGs? [ 0.211724] vgaarb: loaded . . [ 1.875103] Creating 2 MTD partitions on "orion_nand": [ 1.880219] 0x000000000000-0x000000100000 : "uboot" [ 1.886291] 0x000000100000-0x000000180000 : "uboot_env" [ 1.893724] libphy: Fixed MDIO Bus: probed [ 1.898154] libphy: orion_mdio_bus: probed [ 1.908494] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4 [ 1.994487] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address 5c:f4:ab:2f:fe:28 [ 2.003474] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [ 2.010034] ehci-pci: EHCI PCI platform driver . . [....] Setting kernel variables ...[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0cdone. [ 15.823932] NET: Registered protocol family 10 [ 15.829342] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready [....] Configuring network interfaces...[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0cdone. [....] Starting rpcbind daemon...[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0c. [....] Starting NFS common utilities: statd idmapd[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0c. [....] Cleaning up temporary files...[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0c.
Re: Debian on NSA310S? July 17, 2015 11:33AM |
Registered: 9 years ago Posts: 295 |
Re: Debian on NSA310S? July 17, 2015 11:40AM |
Registered: 12 years ago Posts: 365 |
Re: Debian on NSA310S? July 17, 2015 11:48AM |
Registered: 11 years ago Posts: 91 |
MPP47_GPIO, /* power resume data */ MPP48_GPIO, /* power off */ MPP49_GPIO, /* power resume clock */
#!/bin/bash # power_resume.sh [0/1] # 0 to disable, 1 to enable. # enable/disable resume from power loss. # export both gpios echo 47 > /sys/class/gpio/export echo 49 > /sys/class/gpio/export # 49 out, value 1 echo "out" > /sys/class/gpio/gpio49/direction echo 1 > /sys/class/gpio/gpio49/value # 47 out, value 1 echo "out" > /sys/class/gpio/gpio47/direction echo $1 > /sys/class/gpio/gpio47/value # set 49 value 0 echo 0 > /sys/class/gpio/gpio49/value
Re: Debian on NSA310S? July 17, 2015 12:21PM |
Registered: 9 years ago Posts: 118 |
Re: Debian on NSA310S? July 17, 2015 05:21PM |
Admin Registered: 13 years ago Posts: 18,898 |
Re: Debian on NSA310S? July 17, 2015 07:13PM |
Admin Registered: 13 years ago Posts: 18,898 |
root@tldDebian:/usr/src/nsa310s-gpl/trunk/linux-2.6.31.8# grep CONFIG_ZYXEL_POWER_RESUME *.config NSA310_Kernel.config:# CONFIG_ZYXEL_POWER_RESUME is not set NSA310OBM_Kernel.config:# CONFIG_ZYXEL_POWER_RESUME is not set NSA320_Kernel.config:CONFIG_ZYXEL_POWER_RESUME=y NSA325_Kernel.config:CONFIG_ZYXEL_POWER_RESUME=y SGW_Kernel.config:# CONFIG_ZYXEL_POWER_RESUME is not set STG222_Kernel.config:# CONFIG_ZYXEL_POWER_RESUME is not set STG315_Kernel.config:# CONFIG_ZYXEL_POWER_RESUME is not set STG326_Kernel.config:# CONFIG_ZYXEL_POWER_RESUME is not set YOUSEE_Kernel.config:# CONFIG_ZYXEL_POWER_RESUME is not set
pmx_pwr_sata1: pmx-pwr-sata1 { marvell,pins = "mpp47"; marvell,function = "gpio"; };
#!/bin/bash # power_resume.sh [0/1] # 0 to disable, 1 to enable. # enable/disable resume from power loss. # export both gpios echo 47 > /sys/class/gpio/export echo 49 > /sys/class/gpio/export # 49 out, value 1 echo "out" > /sys/class/gpio/gpio49/direction echo 1 > /sys/class/gpio/gpio49/value # 47 out, value 1 echo "out" > /sys/class/gpio/gpio47/direction echo $1 > /sys/class/gpio/gpio47/value # set 49 value 0 echo 0 > /sys/class/gpio/gpio49/value
Re: Debian on NSA310S? July 17, 2015 10:39PM |
Registered: 9 years ago Posts: 295 |
Re: Debian on NSA310S? July 17, 2015 11:08PM |
Admin Registered: 13 years ago Posts: 18,898 |
Re: Debian on NSA310S? July 18, 2015 05:03AM |
Registered: 12 years ago Posts: 365 |
root@debian:~# ls /sys/class/gpio/ . .. export gpio47 gpio49 gpiochip0 gpiochip32 unexport root@debian:~# cat /sys/class/gpio/gpio47/direction out root@debian:~# cat /sys/class/gpio/gpio47/value 1 root@debian:~# cat /sys/class/gpio/gpio49/direction out root@debian:~# cat /sys/class/gpio/gpio49/value 0
Re: Debian on NSA310S? July 18, 2015 06:29AM |
Admin Registered: 13 years ago Posts: 18,898 |
./kw-gpio
pagesize is 0x1000 regs mapped at 0xb6fcc000 MPP mapped at 0xb6fcc000 GPIO mapped at 0xb6fcc100 pin=00, mode=1, dir=1, dout=0, act=0, din=0 pin=01, mode=1, dir=1, dout=0, act=0, din=0 .... pin=49, mode=0, dir=1, dout=0, act=0, din=0
Re: Debian on NSA310S? July 18, 2015 06:54AM |
Registered: 12 years ago Posts: 365 |
STG315_Kernel.config:# CONFIG_ZYXEL_POWER_RESUME is not setand that's because in trunk/linux-2.6.31.8/arch/arm/mach-feroceon-kw/gpio_ctrl.c, line 196:
#if defined CONFIG_ZYXEL_NSA325 || defined CONFIG_MitraStar_STG315 || defined CONFIG_MitraStar_STG326 #define POWER_RESUME_DATA_GPIO_REG_OFFSET GPIO_UNDEFINE_PIN #define POWER_RESUME_CLK_GPIO_REG_OFFSET GPIO_UNDEFINE_PIN #endifSo: no gpio's for power control on the 310S!
${ECHO} "Start rcS2 of ZyXEL style" ## for LED settings phypoke 1 16 3 phypoke 1 10 1017 phypoke 1 11 4408 #The MCU set the phy to 10-Mb mode as low-power status. #We have to set it back when booting up. ${ECHO} "Set the phy back to auto-negotiation mode" phypoke 1 16 0 phypoke 1 4 1e1 phypoke 1 9 300 ## Downshift enable for network testing phypoke 1 10 3860 phypoke 1 0 9140
Re: Debian on NSA310S? July 18, 2015 07:06AM |
Admin Registered: 13 years ago Posts: 18,898 |
> STG315_Kernel.config:# CONFIG_ZYXEL_POWER_RESUME > is not set >and that's because in
> #if defined CONFIG_ZYXEL_NSA325 || defined > CONFIG_MitraStar_STG315 || defined > CONFIG_MitraStar_STG326 > #define > POWER_RESUME_DATA_GPIO_REG_OFFSET GPIO_UNDEFINE_PI > N > #define > POWER_RESUME_CLK_GPIO_REG_OFFSET GPIO_UNDEFINE_PIN > > #endif >
Re: Debian on NSA310S? July 18, 2015 10:02AM |
Registered: 12 years ago Posts: 365 |
#!/bin/sh ## for LED settings /sbin/phypoke 1 16 3 /sbin/phypoke 1 10 1017 /sbin/phypoke 1 11 4408 #The MCU set the phy to 10-Mb mode as low-power status. #We have to set it back when booting up. /sbin/phypoke 1 16 0 /sbin/phypoke 1 4 1e1 /sbin/phypoke 1 9 300 ## Downshift enable for network testing /sbin/phypoke 1 10 3860 /sbin/phypoke 1 0 9140Called it from rc.local.
Re: Debian on NSA310S? July 18, 2015 10:18AM |
Registered: 9 years ago Posts: 118 |
Re: Debian on NSA310S? July 18, 2015 02:30PM |
Admin Registered: 13 years ago Posts: 18,898 |
Re: Debian on NSA310S? July 18, 2015 02:56PM |
Admin Registered: 13 years ago Posts: 18,898 |
&mdio { status = "okay"; ethphy0: ethernet-phy@1 { compatible = "marvell,88e1318", "marvell,88e1510"; reg = <1>; marvell,reg-init = <0x1 0x16 0x0 0x3>, <0x1 0x10 0x0 0x1017>, <0x1 0x11 0x0 0x4408>, <0x1 0x16 0x0 0x0>, <0x1 0x4 0x0 0x1e1>, <0x1 0x9 0x0 0x300>, <0x1 0x10 0x0 0x3860>, <0x1 0x0 0x0 0x9140>; }; };
Re: Debian on NSA310S? July 18, 2015 05:38PM |
Admin Registered: 13 years ago Posts: 18,898 |
Re: Debian on NSA310S? July 18, 2015 06:16PM |
Registered: 9 years ago Posts: 118 |
Re: Debian on NSA310S? July 19, 2015 03:48AM |
Registered: 12 years ago Posts: 365 |
osa
Re: Debian on NSA310S? July 19, 2015 10:42AM |
regs.hour = bin2bcd(tm->tm_hour) | HT1328_24H_BIT;
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? July 19, 2015 03:03PM |
Admin Registered: 13 years ago Posts: 18,898 |
> 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? July 19, 2015 03:18PM |
Admin Registered: 13 years ago Posts: 18,898 |
Re: Debian on NSA310S? July 20, 2015 02:32AM |
Registered: 12 years ago Posts: 365 |
Quote
osa
I have alse "link not ready" fixed with this patch
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;
+}
phypoke 1 22 3Gives error "illegal address"...
Re: Debian on NSA310S? July 20, 2015 04:07AM |
Admin Registered: 13 years ago Posts: 18,898 |
Re: Debian on NSA310S? July 22, 2015 05:59AM |
Admin Registered: 13 years ago Posts: 18,898 |
Re: Debian on NSA310S? July 22, 2015 06:48AM |
Registered: 12 years ago Posts: 365 |
$ kwboottool/kwboot -t -B 115200 /dev/ttyUSB0 -b uboot.2014.07-tld-3.nsa310.uart.kwb
. . 92 % [......................................................................] 94 % [......................................................................] 96 % [......................................................................] 99 % [....................................] [Type Ctrl-\ + c to quit]Cursor blinks in the next line. No further output.
Re: Debian on NSA310S? July 22, 2015 02:17PM |
Admin Registered: 13 years ago Posts: 18,898 |
Re: Debian on NSA310S? July 22, 2015 03:31PM |
Registered: 9 years ago Posts: 118 |
Re: Debian on NSA310S? July 22, 2015 05:03PM |
Admin Registered: 13 years ago Posts: 18,898 |