|
Re: Lenovo IX2 DL August 16, 2021 07:32PM |
Registered: 4 years ago Posts: 34 |
root@OpenWrt:~# fw_printenv baudrate=115200 loads_echo=0 run_diag=yes MALLOC_len=1 ethprime=egiga0 bootargs_end=:::DB88FXX81:eth0:none image_name=uImage kernel_size=0x300000 loadzimage=nand read.e 0x40000 $(kernel_start) $(kernel_size); loadinitrd=nand read.e 0x900000 $(initrd_start) $(initrd_size); standalone=fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/mtdblock0 rw ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvPhoneConfig); bootm 0x2000000; ethaddr=00:50:43:3e:39:0a ethmtu=1500 mvPhoneConfig=mv_phone_config=dev[0]:fxs,dev[1]:fxo mvNetConfig=mv_net_config=(00:11:88:0f:62:81,0:1:2:3),mtu=1500 usb0Mode=host yuk_ethaddr=00:00:00:EE:51:81 nandEcc=1bit netretry=no rcvrip=169.254.100.100 loadaddr=0x02000000 autoload=no image_multi=yes uboot_ver=0.0.8 mfgtest_state=board_tested_fail kernelimage=zImage initrdimage=mfginitrd boardtest=1 lcd0_enable=0 lcd0_params=640x480-16@60 ethact=egiga0 arcNumber=1680 ehtadder=00:11:22:33:44:56 rootpath=/srv/ubuntu mk_mtdparts=setenv mtdparts mtdparts=nand_mtd:0x80000@0(uboot),0x20000@0xa0000(env),0x20000@0xc0000(env2),0x300000@0x100000(uImage),0x300000@0x400000(initrd),0x3f800000@0x800000(boot),1024m@0x0(flash) initrd_size=0x400000 mfgmodel=ix2 console=console=ttyS0,115200 serialno=0,01PF6iK2LUqPtDENAaa6cHbNDwAHr753B1X/OTdTPgCK3Oidtov8Lueznw6Pldu3MT,LXAC210046, serialNo=LXAC210046 serial_number=5563Y01011G2210005BJ0C1 pre_path=IX2/1.0.3/download_runin.sh pre_path_conf=IX2/1.0.3/download_runin.conf bootargs_root=root=/dev/sdb1 usb_bootcsetenv=bootcmd usb start; run usb_bootcmd; usb stop; reset usb_boot=mw 0x800000 0 1; run load_uimage; run load_uinitrd; bootm 0x800000 0x2100000 usb_bootcmd=run usb_set_bootargs; run usb_boot load_uimage=ext2load usb 0:2 0x800000 /uImage load_uinitrd=ext2load usb 0:2 0x2100000 /rd.bin usb_set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 earlyprintk=serial init=/bin/systemd mtdparts=orion_nand:0x80000@0(uboot),0x20000@0xa0000(env),0x20000@0xc0000(env2),0x300000@0x100000(uImage),0x300000@0x400000(initrd),0x3f800000@0x800000(boot),1024m@0x0(flash) bootargs=console=ttyS0,115200console=ttyS0,115200 rootdelay=10 earlyprintk=serial usbboot=usb start; run usb_bootcmd; usb stop; resetsetenv bootcmd usb start; run usb_bootcmd; usb stop; reset bootcmd=run owrt_boot filesize=1fd388 fileaddr=800000 netmask=255.255.255.0 ipaddr=10.0.0.200 serverip=10.0.0.10 owrt_boot=nand read.e 0x800000 0x100000 0x300000;; setenv bootargs $(console) $(owrt_bootargs_root); bootm 0x800000 owrt_bootargs_root_nand=ubi.mtd=4 root=ubi0:rootfs rootfstype=ubifs rw stdin=serial stdout=serial stderr=serial mainlineLinux=no enaMonExt=no enaCpuStream=no enaWrAllo=no pexMode=RC disL2Cache=no setL2CacheWT=yes disL2Prefetch=yes enaICPref=yes enaDCPref=yes sata_dma_mode=yes netbsd_en=no vxworks_en=no kernel_start=0x100000 initrd_start=0x460000 bootdelay=3 disaMvPnp=no enaAutoRecovery=yes pcieTune=no pcieTune1=no owrt_bootargs_root=root=
|
Re: Lenovo IX2 DL August 16, 2021 07:38PM |
Registered: 4 years ago Posts: 34 |
|
Re: Lenovo IX2 DL August 16, 2021 07:45PM |
Registered: 4 years ago Posts: 34 |
#!/bin/sh /etc/rc.common
START=98
boot() {
. /lib/functions.sh
#configuring (lm85/lm63) onboard temp/fan controller to run the fan on its own
#for more information, please read https://www.kernel.org/doc/Documentation/hwmon/sysfs-interface
case $(board_name) in
zyxel,nsa310b)
path_to_hwmon='/sys/devices/platform/ocp@f1000000/f1011000.i2c/i2c-0/0-002e/hwmon/hwmon0'
echo 2 > "$path_to_hwmon/pwm1_enable" # fan is on pwm1
echo 1 > "$path_to_hwmon/pwm1_auto_channels" # temp1 is the only one that changes
echo 23000 > "$path_to_hwmon/temp1_auto_temp_min"
echo 43000 > "$path_to_hwmon/temp1_auto_temp_max" # next step is 49600 millicelsius, or 50 celsius, 43 celsius is better
;;
iom,ix2-200)
path_to_hwmon='/sys/class/hwmon/hwmon0'
echo 2 > "$path_to_hwmon/pwm1_enable" # fan is on pwm1
;;
lenovo,ix2)
path_to_hwmon='/sys/devices/platform/ocp@f1000000/f1011000.i2c/i2c-0/0-002e'
echo 7 > "$path_to_hwmon/pwm1_auto_channels_temp"
echo 64 > "$path_to_hwmon/pwm1_auto_point1_pwm"
echo 255 > "$path_to_hwmon/pwm1_auto_point2_pwm"
echo 25000 > "$path_to_hwmon/temp1_auto_point1_temp"
echo 50000 > "$path_to_hwmon/temp1_auto_point2_temp"
echo 25000 > "$path_to_hwmon/temp2_auto_point1_temp"
echo 50000 > "$path_to_hwmon/temp2_auto_point2_temp"
echo 25000 > "$path_to_hwmon/temp3_auto_point1_temp"
echo 50000 > "$path_to_hwmon/temp3_auto_point2_temp"
echo 2 > "$path_to_hwmon/pwm1_enable"
;;
esac
}
/dev/mtd1 0x0000 0x20000 0x20000 /dev/mtd2 0x0000 0x20000 0x20000
|
Re: Lenovo IX2 DL August 16, 2021 09:39PM |
Registered: 7 years ago Posts: 125 |
|
Re: Lenovo IX2 DL August 17, 2021 10:09PM |
Registered: 4 years ago Posts: 34 |
|
Re: Lenovo IX2 DL August 17, 2021 11:21PM |
Registered: 7 years ago Posts: 125 |
|
Re: Lenovo IX2 DL August 18, 2021 12:06AM |
Registered: 7 years ago Posts: 125 |
|
Re: Lenovo IX2 DL August 18, 2021 01:52AM |
Registered: 7 years ago Posts: 125 |
kirkwood: add support for Lenovo ix2-dl
Lenovo ix2-dl is a dual SATA NAS powered by a Marvell
Kirkwood SoC clocked at 1.6GHz. It has 256MB of RAM and 1GiB of
flash memory, 1x USB 2.0 and 1x 1Gbit/s NIC.
Was also sold by Iomega as the Iomega StorCentre ix2-dl.
This device is very similar to the ix2-200 however it lacks 2 USB ports and includes
a larger nand flash unit. The IX2-DL was sold without drives, with the OS stored in nand.
Specification:
- SoC: Marvell Kirkwood 88F6281
- CPU/Speed: 1600Mhz
- Flash-Chip: Samsung NAND
- Flash size: nand: 1024 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
- RAM: 256MB
- LAN: 1x 1000 Mbps Ethernet
- WiFi: none
- 1x USB 2.0
- UART1: for serial console. UART0 not available.
Installation instructions (modified version of the ix2-200 commit):
This runs OpenWrt from ram to allow sysupgrade to install to nand.
1. download initramfs-uImage image and sysupgrade image, copy into tftp server or ext2 formatted usb drive
2. access uboot environment with serial cable and run
```
setenv mainlineLinux yes
setenv arcNumber 1682
setenv console 'console=ttyS0,115200'
setenv mtdparts 'mtdparts=orion_nand:0x100000@0x000000(u-boot)ro,0x20000@0xA0000(u-boot environment)ro,0x300000@0x100000(kernel),0x1C00000@0x400000(ubi)'
setenv
setenv bootargs_root 'root='
setenv bootcmd 'setenv bootargs ${console} ${mtdparts} ${bootargs_root}; nand read.e 0x800000 0x100000 0x300000; bootm 0x00800000'
saveenv
For USB Boot:
usb reset; ext2load usb 0:1 0x00800000 /initramfs.bin; bootm 0x00800000
```
For TFTP boot:
setenv serverip [tftp server ip]
setenv ipaddr 192.168.1.13
tftpboot 0x00800000 factory.bin
bootm 0x00800000
3. ssh to openwrt and sysupgrade to install into flash
```
mkdir /mnt/usb
mount /dev/sda1 /mnt/usb
cp /mnt/usb/*sysupgrade* /tmp
sysupgrade -n /tmp/sysupgrade.bin
```
4. access openwrt by dhcp ip address assigned by your router or at 192.168.1.1
note 1 - sata drives should not be installed when installing
note 2 - this is a 1 way process. Once the nand is overwritten returning to stock will not be possible
|
Re: Lenovo IX2 DL August 18, 2021 01:53AM |
Registered: 7 years ago Posts: 125 |
|
Re: Lenovo IX2 DL August 18, 2021 02:15AM |
Admin Registered: 14 years ago Posts: 19,977 |
Quote
For anyone who reads this, unfortunately the DTS we're using does not meet the code requirements of the OpenWRT folks, merge was rejected (and that's fair enough - it's their project and they make the guidelines).
If anyone wants to build OpenWRT to run on an IX2-DL this is the guide I included with the pull request;
|
Re: Lenovo IX2 DL August 18, 2021 09:31PM |
Registered: 7 years ago Posts: 125 |
// SPDX-License-Identifier: GPL-2.0-only
/dts-v1/;
#include "kirkwood.dtsi"
#include "kirkwood-6282.dtsi"
/ {
model = "Lenovo IX2-DL";
compatible = "lenovo,ix2", "marvell,kirkwood-88f6282", "marvell,kirkwood";
memory {
device_type = "memory";
reg = <0x00 0x10000000>;
};
chosen {
bootargs = "console=ttyS0,115200n8 earlyprintk";
stdout-path = "/ocp@f1000000/serial@12100";
};
ocp@f1000000 {
pinctrl: pin-controller@10000 {
pinctrl-names = "default";
pmx_usb_power: pmx-usb-power {
marvell,pins = "mpp21";
marvell,function = "gpio";
};
pmx-power-off {
marvell,pins = "mpp36";
marvell,function = "gpio";
phandle = < 0x12 >;
};
pmx-btn-power {
marvell,pins = "mpp15";
marvell,function = "gpio";
phandle = < 0x14 >;
};
pmx-btn-reset {
marvell,pins = "mpp29";
marvell,function = "gpio";
phandle = < 0x15 >;
};
pmx-led-sys-white {
marvell,pins = "mpp39";
marvell,function = "gpio";
phandle = < 0x17 >;
};
pmx-led-sys-red {
marvell,pins = "mpp37";
marvell,function = "gpio";
phandle = < 0x18 >;
};
pmx-led-hdd-blue {
marvell,pins = "mpp26";
marvell,function = "gpio";
phandle = < 0x19 >;
};
pmx-led-hdd1-red {
marvell,pins = "mpp25";
marvell,function = "gpio";
phandle = < 0x1a >;
};
pmx-led-hdd2-red {
marvell,pins = "mpp24";
marvell,function = "gpio";
phandle = < 0x1b >;
};
pmx-led-brightness {
marvell,pins = "mpp40\0mpp41";
marvell,function = "gpio";
phandle = < 0x1c >;
};
pmx-sata0 {
marvell,pins = "mpp5\0mpp21\0mpp23";
marvell,function = "sata0";
};
pmx-sata1 {
marvell,pins = "mpp4\0mpp20\0mpp22";
marvell,function = "sata1";
};
pmx-sata1-power {
marvell,pins = "mpp17";
marvell,function = "gpio";
phandle = < 0x1d >;
};
};
serial@12100 {
status = "okay";
};
sata@80000 {
status = "okay";
nr-ports= <2>;
};
i2c@11000 {
status = "okay";
adt7473@2e {
compatible = "adi,adt7473";
reg = < 0x2e >;
};
rtc@68 {
compatible = "htk,ht1382";
reg = <0x68>;
};
};
};
regulators {
compatible = "simple-bus";
#address-cells = <0x01>;
#size-cells = <0x00>;
pinctrl-0 = <0x1c 0x1d>;
pinctrl-names = "default";
regulator@1 {
compatible = "regulator-gpio";
reg = < 0x01 >;
regulator-name = "LED brightness";
regulator-type = "voltage";
regulator-min-microvolt = < 0x10c8e0 >;
regulator-max-microvolt = < 0x325aa0 >;
gpios = < 0x13 0x09 0x00 0x13 0x08 0x00 >;
gpios_states = < 0x01 0x01 >;
state = < 0x325aa0 0x03 0x2191c0 0x01 0x10c8e0 0x00 >;
regulator-always-on;
regulator-boot-on;
enable-active-high;
};
regulator@2 {
compatible = "regulator-fixed";
reg = < 0x02 >;
regulator-name = "SATA1 Power";
regulator-min-microvolt = < 0x4c4b40 >;
regulator-max-microvolt = < 0x4c4b40 >;
regulator-always-on;
regulator-boot-on;
enable-active-high;
gpio = < 0x16 0x11 0x00 >;
};
};
keys {
compatible = "gpio-keys";
#address-cells = < 0x01 >;
#size-cells = < 0x00 >;
pinctrl-0 = < 0x14 0x15 >;
pinctrl-names = "default";
power {
label = "Power Button";
linux,code = < 0x74 >;
gpios = < 0x16 0x0f 0x00 >;
};
reset {
label = "Reset Button";
linux,code = < 0x198 >;
gpios = < 0x16 0x1d 0x01 >;
};
};
leds {
compatible = "gpio-leds";
pinctrl-0 = < 0x17 0x18 0x19 0x1a 0x1b >;
pinctrl-names = "default";
white-sys {
label = "ix2:white:sys";
gpios = < 0x13 0x07 0x00 >;
default-state = "keep";
};
red-sys {
label = "ix2:red:sys";
gpios = < 0x13 0x05 0x00 >;
};
blue-hdd {
label = "ix2:blue:hdd";
gpios = < 0x16 0x1a 0x00 >;
};
red-hdd1 {
label = "ix2:red:hdd1";
gpios = < 0x16 0x19 0x00 >;
};
red-hdd2 {
label = "ix2:red:hdd2";
gpios = < 0x16 0x18 0x00 >;
};
};
gpio-poweroff {
compatible = "gpio-poweroff";
gpios = < 0x13 0x04 0x00 >;
};
};
&nand {
chip-delay = < 0x23 >;
status = "okay";
partition@0 {
label = "uboot";
reg = < 0x0000000 0x0080000 >;
read-only;
};
partition@0a0000 {
label = "uboot_env";
reg = < 0x00a0000 0x0020000 >;
};
partition@0c0000 {
label = "uboot_env2";
reg = < 0x00c0000 0x0020000 >;
};
partition@100000 {
label = "kernel";
reg = < 0x0100000 0x0300000 >;
};
partition@400000 {
label = "ubi";
reg = < 0x0400000 0x020000000 >;
};
};
&mdio {
status = "okay";
ethphy0: ethernet-phy@0 {
reg = <0>;
phy-handle = < 0x0c >;
};
};
ð0 {
status = "okay";
ethernet0-port@0 {
phy-handle = <0x0C>;
};
};
&pciec {
status = "okay";
};
&pcie0 {
status = "okay";
};
&sata {
status = "okay";
nr-ports = <2>;
};
dmesg [ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Linux version 5.4.140 (jdwl@minecraftvm) (gcc version 10.3.0 (OpenWrt GCC 10.3.0 r17357-b123f9be1c)) #0 Wed Aug 18 22:47:08 2021 [ 0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005397f [ 0.000000] CPU: VIVT data cache, VIVT instruction cache [ 0.000000] OF: fdt: Machine model: Lenovo IX2-DL [ 0.000000] Memory policy: Data cache writeback [ 0.000000] On node 0 totalpages: 65536 [ 0.000000] Normal zone: 576 pages used for memmap [ 0.000000] Normal zone: 0 pages reserved [ 0.000000] Normal zone: 65536 pages, LIFO batch:15 [ 0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768 [ 0.000000] pcpu-alloc: [0] 0 [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 64960 [ 0.000000] Kernel command line: console=ttyS0,115200 root=LABEL=sataroot :::DB88FXX81:eth0:none mtdparts=orion_nand_mtd:0x80000@0(uboot),0x20000@0xa0000(env),0x20000@0xc0000(env2),0x300000@0x100000(uImage),0x400000@0x400000(initrd),0x3f800000@0x800000(boot),0x40000000@0x0(flash) [ 0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes, linear) [ 0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes, linear) [ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off [ 0.000000] Memory: 242760K/262144K available (5267K kernel code, 173K rwdata, 1364K rodata, 9216K init, 205K bss, 19384K reserved, 0K cma-reserved) [ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 [ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16 [ 0.000000] random: get_random_bytes called from start_kernel+0x2d8/0x500 with crng_init=0 [ 0.000000] clocksource: orion_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns [ 0.000005] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns [ 0.000026] Switching to timer-based delay loop, resolution 5ns [ 0.000083] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=2000000) [ 0.000099] pid_max: default: 32768 minimum: 301 [ 0.000244] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear) [ 0.000258] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear) [ 0.000912] CPU: Testing write buffer coherency: ok [ 0.001559] Setting up static identity map for 0x100000 - 0x10003c [ 0.001739] mvebu-soc-id: MVEBU SoC ID=0x6282, Rev=0x1 [ 0.004319] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns [ 0.004337] futex hash table entries: 256 (order: -1, 3072 bytes, linear) [ 0.004438] pinctrl core: initialized pinctrl subsystem [ 0.005160] NET: Registered protocol family 16 [ 0.005457] DMA: preallocated 256 KiB pool for atomic coherent allocations [ 0.006153] cpuidle: using governor ladder [ 0.006423] Feroceon L2: Enabling L2 [ 0.006453] Feroceon L2: Cache support initialised. [ 0.009484] No ATAGs? [ 0.023319] OF: /regulators/regulator@2: could not find phandle [ 0.023343] reg-fixed-voltage: probe of regulators:regulator@2 failed with error -22 [ 0.023604] SCSI subsystem initialized [ 0.024101] libata version 3.00 loaded. [ 0.024266] usbcore: registered new interface driver usbfs [ 0.024306] usbcore: registered new interface driver hub [ 0.024342] usbcore: registered new device driver usb [ 0.024455] workqueue: max_active 576 requested for napi_workq is out of range, clamping between 1 and 512 [ 0.026289] clocksource: Switched to clocksource orion_clocksource [ 0.026781] thermal_sys: Registered thermal governor 'step_wise' [ 0.026947] NET: Registered protocol family 2 [ 0.027050] IP idents hash table entries: 4096 (order: 3, 32768 bytes, linear) [ 0.027457] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear) [ 0.027482] TCP established hash table entries: 2048 (order: 1, 8192 bytes, linear) [ 0.027511] TCP bind hash table entries: 2048 (order: 1, 8192 bytes, linear) [ 0.027538] TCP: Hash tables configured (established 2048 bind 2048) [ 0.027598] UDP hash table entries: 256 (order: 0, 4096 bytes, linear) [ 0.027618] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear) [ 0.027751] NET: Registered protocol family 1 [ 0.027774] PCI: CLS 0 bytes, default 32 [ 0.132056] workingset: timestamp_bits=14 max_order=16 bucket_order=2 [ 0.135907] squashfs: version 4.0 (2009/01/31) Phillip Lougher [ 0.135916] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc. [ 0.140008] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver [ 0.140685] mvebu-gpio f1010140.gpio: IRQ index 3 not found [ 0.140977] mvebu-pcie mbus@f1000000:pcie@82000000: PCI host bridge to bus 0000:00 [ 0.140991] pci_bus 0000:00: root bus resource [bus 00-ff] [ 0.141000] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xefffffff] [ 0.141008] pci_bus 0000:00: root bus resource [io 0x1000-0xeffff] [ 0.141079] pci 0000:00:01.0: [11ab:6282] type 01 class 0x060400 [ 0.141103] pci 0000:00:01.0: reg 0x38: [mem 0x00000000-0x000007ff pref] [ 0.141959] PCI: bus0: Fast back to back transfers disabled [ 0.141970] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring [ 0.142764] PCI: bus1: Fast back to back transfers enabled [ 0.142776] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01 [ 0.142914] pci 0000:00:01.0: BAR 6: assigned [mem 0xe0000000-0xe00007ff pref] [ 0.142924] pci 0000:00:01.0: PCI bridge to [bus 01] [ 0.143245] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled [ 0.143698] printk: console [ttyS0] disabled [ 0.143760] f1012100.serial: ttyS0 at MMIO 0xf1012100 (irq = 26, base_baud = 12500000) is a 16550A [ 0.644570] printk: console [ttyS0] enabled [ 0.649583] nand: device found, Manufacturer ID: 0xec, Chip ID: 0xd3 [ 0.655960] nand: Samsung NAND 1GiB 3,3V 8-bit [ 0.660439] nand: 1024 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64 [ 0.668145] Scanning device for bad blocks [ 0.676556] Bad eraseblock 54 at 0x0000006c0000 [ 0.864226] Bad eraseblock 2380 at 0x000012980000 [ 1.046066] Bad eraseblock 4629 at 0x0000242a0000 [ 1.323002] Bad eraseblock 8086 at 0x00003f2c0000 [ 1.336035] 5 fixed-partitions partitions found on MTD device orion_nand [ 1.342774] Creating 5 MTD partitions on "orion_nand": [ 1.347939] 0x000000000000-0x000000080000 : "uboot" [ 1.353312] 0x0000000a0000-0x0000000c0000 : "uboot_env" [ 1.358992] 0x0000000c0000-0x0000000e0000 : "uboot_env2" [ 1.364727] 0x000000100000-0x000000400000 : "kernel" [ 1.370143] 0x000000400000-0x000020400000 : "ubi" [ 1.376677] libphy: Fixed MDIO Bus: probed [ 1.381300] libphy: orion_mdio_bus: probed [ 1.389409] mdio_bus f1072004.mdio-bus-mii: MDIO device at address 1 is missing. [ 1.397019] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4 [ 1.404544] rtc-mv f1010300.rtc: registered as rtc0 [ 1.409513] i2c /dev entries driver [ 1.413558] OF: /gpio-poweroff: could not find phandle [ 1.418749] poweroff-gpio: probe of gpio-poweroff failed with error -22 [ 1.425695] watchdog: f1020300.watchdog-timer: driver supplied timeout (4294967295) out of range [ 1.434532] watchdog: f1020300.watchdog-timer: falling back to default timeout (21) [ 1.442332] orion_wdt: Initial timeout 21 sec [ 1.446916] OF: /leds/white-sys: could not find phandle [ 1.452173] leds-gpio: probe of leds failed with error -22 [ 1.529297] marvell-cesa f1030000.crypto: CESA device successfully registered [ 1.537111] NET: Registered protocol family 10 [ 1.542683] Segment Routing with IPv6 [ 1.546435] NET: Registered protocol family 17 [ 1.551007] 8021q: 802.1Q VLAN Support v1.8 [ 1.558425] UBI: auto-attach mtd4 [ 1.561757] ubi0: attaching mtd4 [ 1.989325] ubi0: scanning is finished [ 2.001090] ubi0: attached mtd4 (name "ubi", size 512 MiB) [ 2.006639] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 129024 bytes [ 2.013542] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 512 [ 2.020280] ubi0: VID header offset: 512 (aligned 512), data offset: 2048 [ 2.027102] ubi0: good PEBs: 4094, bad PEBs: 2, corrupted PEBs: 0 [ 2.033215] ubi0: user volume: 2, internal volumes: 1, max. volumes count: 128 [ 2.040470] ubi0: max/mean erase counter: 14/8, WL threshold: 4096, image sequence number: 1237810381 [ 2.049730] ubi0: available PEBs: 0, total reserved PEBs: 4094, PEBs reserved for bad PEB handling: 158 [ 2.059705] ubi0: background thread "ubi_bgt0d" started, PID 458 [ 2.066549] block ubiblock0_0: created from ubi0:0(rootfs) [ 2.072053] ubiblock: device ubiblock0_0 (rootfs) set to be root filesystem [ 2.079082] rtc-mv f1010300.rtc: setting system clock to 2021-08-18T06:04:26 UTC (1629266666) [ 2.114329] Freeing unused kernel memory: 9216K [ 2.118930] Run /init as init process [ 2.402848] init: Console is alive [ 2.406481] init: - watchdog - [ 2.417326] kmodloader: loading kernel modules from /etc/modules-boot.d/* [ 2.457883] OF: /keys/power: could not find phandle [ 2.462802] gpio-keys keys: Failed to get gpio flags, error: -22 [ 2.468870] gpio-keys: probe of keys failed with error -22 [ 2.477700] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [ 2.486305] random: fast init done [ 2.490073] ehci-fsl: Freescale EHCI Host controller driver [ 2.497956] ehci-orion: EHCI orion driver [ 2.502119] orion-ehci f1050000.ehci: EHCI Host Controller [ 2.507673] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1 [ 2.515465] orion-ehci f1050000.ehci: irq 30, io mem 0xf1050000 [ 2.546307] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00 [ 2.552777] hub 1-0:1.0: USB hub found [ 2.556724] hub 1-0:1.0: 1 port detected [ 2.563414] ehci-platform: EHCI generic platform driver [ 2.574235] sata_mv f1080000.sata: version 1.28 [ 2.574414] sata_mv f1080000.sata: slots 32 ports 2 [ 2.581566] scsi host0: sata_mv [ 2.585330] scsi host1: sata_mv [ 2.588641] ata1: SATA max UDMA/133 irq 33 [ 2.592751] ata2: SATA max UDMA/133 irq 33 [ 2.927538] ata1: SATA link down (SStatus 0 SControl F300) [ 3.426304] ata2: SATA link up 3.0 Gbps (SStatus 123 SControl F300) [ 3.434860] ata2.00: ATA-7: ST380815AS, 3.CHF, max UDMA/100 [ 3.440474] ata2.00: 156301488 sectors, multi 0: LBA48 NCQ (depth 31/32) [ 3.451665] ata2.00: configured for UDMA/100 [ 3.456195] scsi 1:0:0:0: Direct-Access ATA ST380815AS F PQ: 0 ANSI: 5 [ 3.465139] sd 1:0:0:0: [sda] 156301488 512-byte logical blocks: (80.0 GB/74.5 GiB) [ 3.473089] sd 1:0:0:0: [sda] Write Protect is off [ 3.477920] sd 1:0:0:0: [sda] Mode Sense: 00 3a 00 00 [ 3.478030] sd 1:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA [ 3.539267] sda: sda1 [ 3.542392] sd 1:0:0:0: [sda] Attached SCSI disk [ 3.547451] kmodloader: done loading kernel modules from /etc/modules-boot.d/* [ 3.564977] init: - preinit - [ 3.693430] random: jshn: uninitialized urandom read (4 bytes read) [ 3.727489] random: jshn: uninitialized urandom read (4 bytes read) [ 3.750828] random: jshn: uninitialized urandom read (4 bytes read) [ 7.935445] procd: - early - [ 7.938781] procd: - watchdog - [ 8.471565] procd: - watchdog - [ 8.474925] procd: - ubus - [ 8.481362] urandom_read: 6 callbacks suppressed [ 8.481367] random: ubusd: uninitialized urandom read (4 bytes read) [ 8.529753] procd: - init - [ 8.793158] kmodloader: loading kernel modules from /etc/modules.d/* [ 8.856720] urngd: v1.0.2 started. [ 8.981156] xt_time: kernel timezone is -0000 [ 8.990517] random: crng init done [ 9.036911] adt7475 0-002e: ADT7473 device, revision 0 [ 9.042073] adt7475 0-002e: Optional features: fan4 pwm2 [ 9.106684] PPP generic driver version 2.4.2 [ 9.116086] NET: Registered protocol family 24 [ 9.152713] kmodloader: done loading kernel modules from /etc/modules.d/* root@OpenWrt:/#
|
Re: Lenovo IX2 DL August 18, 2021 11:03PM |
Admin Registered: 14 years ago Posts: 19,977 |
#include "kirkwood.dtsi" #include "kirkwood-6282.dtsi"
|
Re: Lenovo IX2 DL August 18, 2021 11:05PM |
Registered: 7 years ago Posts: 125 |
|
Re: Lenovo IX2 DL August 18, 2021 11:29PM |
Registered: 4 years ago Posts: 34 |
luo@luo-virtual-machine:~/ix2-ng-path$ grep -rn 'power' ./ ./linux-feroceon_5_1_3_KW-32-board_setting.patch:59:+ if (pm_power_off) ./linux-feroceon_5_1_3_KW-32-board_setting.patch:60:+ pm_power_off(); ./linux-feroceon_5_1_3_KW-32-board_setting.patch:79:+static void power_off_proc(void); ./linux-feroceon_5_1_3_KW-32-board_setting.patch:88:+ pm_power_off=power_off_proc; ./linux-feroceon_5_1_3_KW-32-board_setting.patch:96:+static void power_off_proc(void) ./linux-feroceon_5_1_3_KW-38-fix_power_pin.patch:10: static void power_off_proc(void) ./0017_force_link_gbe_to_switch.patch:818:- Hard drive spin-up was always the highest power consuming stage. Embedded devices mostly use low ./0017_force_link_gbe_to_switch.patch:819:- power suppliers that sometimes needs to drive numerous hard drives. ./0017_force_link_gbe_to_switch.patch:820:- This feature developed in order to prevent the power supply's overloading when numerous hard drives spin-up. ./0017_force_link_gbe_to_switch.patch:1022:- The driver implements power save on/off according to the desired cpu frequency. ./0017_force_link_gbe_to_switch.patch:1145:- powersave_bias sampling_rate_max up_threshold
diff -urN linux-feroceon_5_1_3_KW_p16/arch/arm/mach-feroceon-kw/include/mach/system.h linux-feroceon_5_1_3_KW_p17/arch/arm/mach-feroceon-kw/include/mach/system.h
--- linux-feroceon_5_1_3_KW_p16/arch/arm/mach-feroceon-kw/include/mach/system.h 2011-01-25 13:43:33.000000000 +0200
+++ linux-feroceon_5_1_3_KW_p17/arch/arm/mach-feroceon-kw/include/mach/system.h 2011-01-25 13:47:26.000000000 +0200
@@ -22,7 +22,7 @@
/* versions */
#define TEST_UBOOT_VER 0x03041200 /* 3.4.18 */
-#define LSP_VERSION "KW_LSP_5.1.3_patch16"
+#define LSP_VERSION "KW_LSP_5.1.3_patch17"
static inline void arch_idle(void)
diff -urN linux-feroceon_5_1_3_KW_p16/arch/arm/mach-feroceon-kw/include/mach/system.h.orig linux-feroceon_5_1_3_KW_p17/arch/arm/mach-feroceon-kw/include/mach/system.h.orig
--- linux-feroceon_5_1_3_KW_p16/arch/arm/mach-feroceon-kw/include/mach/system.h.orig 2011-01-25 13:43:24.000000000 +0200
+++ linux-feroceon_5_1_3_KW_p17/arch/arm/mach-feroceon-kw/include/mach/system.h.orig 1970-01-01 02:00:00.000000000 +0200
@@ -1,56 +0,0 @@
-/*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-#ifndef __ASM_ARCH_SYSTEM_H
-#define __ASM_ARCH_SYSTEM_H
-#include <asm/proc-fns.h>
-
-#include "../arch/arm/mach-feroceon-kw/config/mvSysHwConfig.h"
-
-/* versions */
-#define TEST_UBOOT_VER 0x03041200 /* 3.4.18 */
-
-#define LSP_VERSION "KW_LSP_5.1.3_patch14"
-
-
-static inline void arch_idle(void)
-{
- /*
- * This should do all the clock switching
- * and wait for interrupt tricks
- */
- cpu_do_idle();
-}
-
-
-#ifdef __BIG_ENDIAN
-#define MV_ARM_32BIT_LE(X) ((((X)&0xff)<<24) | \
- (((X)&0xff00)<<8) | \
- (((X)&0xff0000)>>8) | \
- (((X)&0xff000000)>>24))
-#else
-#define MV_ARM_32BIT_LE(X) (X)
-#endif
-
-
-void mvBoardReset(void);
-
-static inline void arch_reset(char mode, const char *cmd)
-{
- printk("Reseting !! \n");
- mvBoardReset();
-}
-
-#endif
diff -urN linux-feroceon_5_1_3_KW_p16/arch/arm/plat-feroceon/mv_drivers_lsp/mv_network/mv_ethernet/mv_ethernet.c linux-feroceon_5_1_3_KW_p17/arch/arm/plat-feroceon/mv_drivers_lsp/mv_network/mv_ethernet/mv_ethernet.c
--- linux-feroceon_5_1_3_KW_p16/arch/arm/plat-feroceon/mv_drivers_lsp/mv_network/mv_ethernet/mv_ethernet.c 2010-05-06 14:56:30.000000000 +0300
+++ linux-feroceon_5_1_3_KW_p17/arch/arm/plat-feroceon/mv_drivers_lsp/mv_network/mv_ethernet/mv_ethernet.c 2011-01-26 10:41:13.000000000 +0200
@@ -125,7 +125,7 @@
* set hw defaults. fill rx buffers. restart phy link *
* auto neg. set device link flags. report status. *
***********************************************************/
-int mv_eth_start( struct net_device *dev )
+int mv_eth_start(struct net_device *dev)
{
mv_eth_priv *priv = MV_ETH_PRIV(dev);
int err;
@@ -146,40 +146,42 @@
#endif
/* fill rx buffers, start rx/tx activity, set coalescing */
- if( mv_eth_start_internals( priv, dev->mtu) != 0 ) {
- printk( KERN_ERR "%s: start internals failed\n", dev->name );
+ if (mv_eth_start_internals( priv, dev->mtu) != 0) {
+ printk(KERN_ERR "%s: start internals failed\n", dev->name);
goto error;
}
-#ifdef CONFIG_MV_ETH_TOOL
- if ((err = mv_eth_tool_restore_settings(dev)) != 0)
- {
- printk( KERN_ERR "%s: mv_eth_tool_restore_settings failed %d\n",
- dev->name, err );
- goto error;
+ if (priv->flags & MV_ETH_F_FORCED_LINK) {
+ netif_carrier_on(dev);
+ netif_wake_queue(dev);
}
- if (priv->autoneg_cfg == AUTONEG_DISABLE)
- {
- if ( MV_REG_READ(ETH_PORT_STATUS_REG( priv->port )) & ETH_LINK_UP_MASK )
- {
- netif_carrier_on( dev );
- netif_wake_queue( dev );
+ else {
+#ifdef CONFIG_MV_ETH_TOOL
+ if ((err = mv_eth_tool_restore_settings(dev)) != 0) {
+ printk(KERN_ERR "%s: mv_eth_tool_restore_settings failed %d\n", dev->name, err);
+ goto error;
+ }
+ if (priv->autoneg_cfg == AUTONEG_DISABLE) {
+ if (priv->flags & MV_ETH_F_LINK_UP) {
+ netif_carrier_on(dev);
+ netif_wake_queue(dev);
+ }
}
- }
#else
- mv_eth_restart_autoneg(priv->port);
-#endif /* #ifdef CONFIG_MV_ETH_TOOL */
+ mv_eth_restart_autoneg(priv->port);
+#endif /* CONFIG_MV_ETH_TOOL */
+ }
- if(priv->timer_flag == 0)
+ if (!(priv->flags & MV_ETH_F_TIMER))
{
- priv->timer.expires = jiffies + ((HZ*CONFIG_MV_ETH_TIMER_PERIOD)/1000); /*ms*/
- add_timer( &priv->timer );
- priv->timer_flag = 1;
+ priv->timer.expires = jiffies + ((HZ*CONFIG_MV_ETH_TIMER_PERIOD) / 1000); /* ms */
+ add_timer(&priv->timer);
+ priv->flags |= MV_ETH_F_TIMER;
}
/* connect to port interrupt line */
- if( request_irq( dev->irq, mv_eth_interrupt_handler,
- (IRQF_DISABLED | IRQF_SAMPLE_RANDOM), "mv_ethernet", priv) ) {
+ if (request_irq(dev->irq, mv_eth_interrupt_handler,
+ (IRQF_DISABLED | IRQF_SAMPLE_RANDOM), "mv_ethernet", priv)) {
printk( KERN_ERR "cannot assign irq%d to %s port%d\n", dev->irq, dev->name, priv->port );
dev->irq = 0;
goto error;
@@ -189,17 +191,12 @@
ETH_DBG( ETH_DBG_LOAD, ("%s: start ok\n", dev->name) );
- printk( KERN_NOTICE "%s: started\n", dev->name );
+ printk(KERN_NOTICE "%s: started\n", dev->name);
return 0;
error:
- if( dev->irq != 0 )
- {
- free_irq( dev->irq, priv );
- }
-
printk( KERN_ERR "%s: start failed\n", dev->name );
return -1;
}
diff -urN linux-feroceon_5_1_3_KW_p16/arch/arm/plat-feroceon/mv_drivers_lsp/mv_network/mv_ethernet/mv_gateway.c linux-feroceon_5_1_3_KW_p17/arch/arm/plat-feroceon/mv_drivers_lsp/mv_network/mv_ethernet/mv_gateway.c
--- linux-feroceon_5_1_3_KW_p16/arch/arm/plat-feroceon/mv_drivers_lsp/mv_network/mv_ethernet/mv_gateway.c 2010-06-30 13:30:32.000000000 +0300
+++ linux-feroceon_5_1_3_KW_p17/arch/arm/plat-feroceon/mv_drivers_lsp/mv_network/mv_ethernet/mv_gateway.c 2011-01-25 13:58:57.000000000 +0200
@@ -1073,11 +1073,11 @@
mv_gtw_set_mac_addr_to_switch(broadcast, MV_GTW_VLAN_TO_GROUP(vlan_cfg->vlan_grp_id),
vlan_cfg->ports_mask|(1<<SWITCH_PORT_CPU), 1);
- if (priv->timer_flag == 0)
+ if (!(priv->flags & MV_ETH_F_TIMER))
{
priv->timer.expires = jiffies + ((HZ*CONFIG_MV_ETH_TIMER_PERIOD)/1000); /*ms*/
add_timer( &(priv->timer) );
- priv->timer_flag = 1;
+ priv->flags |= MV_ETH_F_TIMER;
}
if ( (priv->net_dev == dev) || !netif_running(priv->net_dev) )
@@ -1128,7 +1128,7 @@
napi_disable(&priv->napi);
#endif
mv_eth_mask_interrupts(priv);
- priv->timer_flag = 0;
+ priv->flags &= ~MV_ETH_F_TIMER;
del_timer(&priv->timer);
free_irq( dev->irq, priv );
diff -urN linux-feroceon_5_1_3_KW_p16/arch/arm/plat-feroceon/mv_drivers_lsp/mv_network/mv_ethernet/mv_netdev.c linux-feroceon_5_1_3_KW_p17/arch/arm/plat-feroceon/mv_drivers_lsp/mv_network/mv_ethernet/mv_netdev.c
--- linux-feroceon_5_1_3_KW_p16/arch/arm/plat-feroceon/mv_drivers_lsp/mv_network/mv_ethernet/mv_netdev.c 2011-01-25 11:01:50.000000000 +0200
+++ linux-feroceon_5_1_3_KW_p17/arch/arm/plat-feroceon/mv_drivers_lsp/mv_network/mv_ethernet/mv_netdev.c 2011-01-26 10:50:47.000000000 +0200
@@ -777,13 +777,15 @@
mvEthPortUp(priv->hal_priv);
netif_carrier_on(dev);
- netif_wake_queue(dev);
+ netif_wake_queue(dev);
+ priv->flags |= MV_ETH_F_LINK_UP;
}
else
{
- netif_carrier_off( dev );
- netif_stop_queue( dev );
- mv_eth_down_internals( dev );
+ netif_carrier_off(dev);
+ netif_stop_queue(dev);
+ priv->flags &= ~MV_ETH_F_LINK_UP;
+ mv_eth_down_internals(dev);
}
spin_unlock(priv->lock);
@@ -1642,6 +1644,45 @@
#endif /* ETH_INCLUDE_UFO */
}
+
+static int mv_force_port_link_speed_fc(mv_eth_priv *priv, MV_ETH_PORT_SPEED port_speed, int en_force)
+{
+ if (en_force) {
+ if (mvEthForceLinkModeSet(priv->hal_priv, 1, 0)) {
+ printk(KERN_ERR "mvEthForceLinkModeSet failed\n");
+ return -EIO;
+ }
+ if (mvEthSpeedDuplexSet(priv->hal_priv, port_speed, MV_ETH_DUPLEX_FULL)) {
+ printk(KERN_ERR "mvEthSpeedDuplexSet failed\n");
+ return -EIO;
+ }
+ if (mvEthFlowCtrlSet(priv->hal_priv, MV_ETH_FC_ENABLE)) {
+ printk(KERN_ERR "mvEthFlowCtrlSet failed\n");
+ return -EIO;
+ }
+
+ priv->flags |= MV_ETH_F_FORCED_LINK;
+ }
+ else {
+ if (mvEthForceLinkModeSet(priv->hal_priv, 0, 0)) {
+ printk(KERN_ERR "mvEthForceLinkModeSet failed\n");
+ return -EIO;
+ }
+ if (mvEthSpeedDuplexSet(priv->hal_priv, MV_ETH_SPEED_AN, MV_ETH_DUPLEX_AN)) {
+ printk(KERN_ERR "mvEthSpeedDuplexSet failed\n");
+ return -EIO;
+ }
+ if (mvEthFlowCtrlSet(priv->hal_priv, MV_ETH_FC_AN_ADV_SYM)) {
+ printk(KERN_ERR "mvEthFlowCtrlSet failed\n");
+ return -EIO;
+ }
+
+ priv->flags &= ~MV_ETH_F_FORCED_LINK;
+ }
+ return 0;
+}
+
+
/***********************************************************
* mv_eth_start_internals -- *
* fill rx buffers. start rx/tx activity. set coalesing. *
@@ -1651,9 +1692,10 @@
{
unsigned long flags;
unsigned int status;
- int count, num, rxq;
+ int count, num, rxq, err = 0;
+ MV_BOARD_MAC_SPEED mac_speed;
- spin_lock_irqsave( priv->lock, flags);
+ spin_lock_irqsave(priv->lock, flags);
/* 32(extra for cache prefetch) + 8 to align on 8B */
priv->rx_buf_size = MV_RX_BUF_SIZE(mtu) + CPU_D_CACHE_LINE_SIZE + 8;
@@ -1671,12 +1713,38 @@
mv_eth_rxq_fill(priv, rxq, mv_eth_rxq_desc[rxq]);
}
+ /* force link, speed and duplex if necessary (e.g. Switch is connected) based on board information */
+ mac_speed = mvBoardMacSpeedGet(priv->port);
+ switch (mac_speed) {
+ case BOARD_MAC_SPEED_10M:
+ err = mv_force_port_link_speed_fc(priv, MV_ETH_SPEED_10, 1);
+ if (err)
+ goto out;
+ break;
+ case BOARD_MAC_SPEED_100M:
+ err = mv_force_port_link_speed_fc(priv, MV_ETH_SPEED_100, 1);
+ if (err)
+ goto out;
+ break;
+ case BOARD_MAC_SPEED_1000M:
+ err = mv_force_port_link_speed_fc(priv, MV_ETH_SPEED_1000, 1);
+ if (err)
+ goto out;
+ break;
+ case BOARD_MAC_SPEED_AUTO:
+ default:
+ /* do nothing */
+ break;
+ }
+
/* start the hal - rx/tx activity */
- status = mvEthPortEnable( priv->hal_priv );
+ status = mvEthPortEnable(priv->hal_priv);
+ if (status == MV_OK)
+ priv->flags |= MV_ETH_F_LINK_UP;
if( (status != MV_OK) && (status != MV_NOT_READY)) {
printk( KERN_ERR "GbE port %d: ethPortEnable failed\n", priv->port);
spin_unlock_irqrestore( priv->lock, flags);
- return -1;
+ return -1;
}
/* set tx/rx coalescing mechanism */
@@ -1688,9 +1756,9 @@
mvEthRxCoalSet( priv->hal_priv, ETH_RX_COAL );
#endif /* CONFIG_MV_ETH_TOOL */
- spin_unlock_irqrestore( priv->lock, flags);
-
- return 0;
+out:
+ spin_unlock_irqrestore(priv->lock, flags);
+ return err;
}
/***********************************************************
@@ -1840,7 +1908,7 @@
spin_unlock(priv->lock);
- if(priv->timer_flag)
+ if (priv->flags & MV_ETH_F_TIMER)
{
priv->timer.expires = jiffies + ((HZ*CONFIG_MV_ETH_TIMER_PERIOD)/1000); /*ms*/
add_timer( &priv->timer );
@@ -1962,7 +2030,7 @@
memset( &priv->timer, 0, sizeof(struct timer_list) );
priv->timer.function = mv_netdev_timer_callback;
init_timer(&priv->timer);
- priv->timer_flag = 0;
+ priv->flags = 0;
priv->skb_alloc_fail_cnt = 0;
#ifdef ETH_LRO
diff -urN linux-feroceon_5_1_3_KW_p16/arch/arm/plat-feroceon/mv_drivers_lsp/mv_network/mv_ethernet/mv_netdev.h linux-feroceon_5_1_3_KW_p17/arch/arm/plat-feroceon/mv_drivers_lsp/mv_network/mv_ethernet/mv_netdev.h
--- linux-feroceon_5_1_3_KW_p16/arch/arm/plat-feroceon/mv_drivers_lsp/mv_network/mv_ethernet/mv_netdev.h 2010-05-06 16:04:30.000000000 +0300
+++ linux-feroceon_5_1_3_KW_p17/arch/arm/plat-feroceon/mv_drivers_lsp/mv_network/mv_ethernet/mv_netdev.h 2011-01-26 10:38:29.000000000 +0200
@@ -230,6 +230,13 @@
} eth_statistics;
+
+/* Masks used for pp->flags */
+#define MV_ETH_F_TIMER 0x01
+#define MV_ETH_F_LINK_UP 0x02
+#define MV_ETH_F_FORCED_LINK 0x04 /* port is connected to a Switch with forced link */
+
+
typedef struct _mv_eth_priv
{
int port;
@@ -241,7 +248,7 @@
MV_STACK* txPktInfoPool;
int tx_count[CONFIG_MV_ETH_TXQ];
struct timer_list timer;
- unsigned int timer_flag;
+ unsigned int flags; /* timer, link up etc. */
unsigned int skb_alloc_fail_cnt;
struct net_device *net_dev; /* back reference to the net_device */
diff -urN linux-feroceon_5_1_3_KW_p16/arch/arm/plat-feroceon/mv_hal/eth/gbe/mvEth.c linux-feroceon_5_1_3_KW_p17/arch/arm/plat-feroceon/mv_hal/eth/gbe/mvEth.c
--- linux-feroceon_5_1_3_KW_p16/arch/arm/plat-feroceon/mv_hal/eth/gbe/mvEth.c 2010-05-06 14:56:38.000000000 +0300
+++ linux-feroceon_5_1_3_KW_p17/arch/arm/plat-feroceon/mv_hal/eth/gbe/mvEth.c 2011-01-25 15:02:12.000000000 +0200
@@ -2179,10 +2179,60 @@
/******************************************************************************/
-/* Speed, Duplex, FlowControl routines */
+/* Link, Speed, Duplex, FlowControl routines */
/******************************************************************************/
/*******************************************************************************
+* mvEthForceLinkModeSet -
+*
+* DESCRIPTION:
+* Sets "Force Link Pass" and "Force Link Fail" bits.
+* Note: This function should only be called when the port is disabled.
+*
+* INPUT:
+* void *pPortHandle - Pointer to port specific handler;
+* MV_BOOL force_link_pass - Force Link Pass
+* MV_BOOL force_link_fail - Force Link Failure
+* 0, 0 - normal state: detect link via PHY and connector
+* 1, 1 - prohibited state.
+*
+* RETURN:
+*******************************************************************************/
+MV_STATUS mvEthForceLinkModeSet(void* pPortHandle, MV_BOOL force_link_up, MV_BOOL force_link_down)
+{
+ ETH_PORT_CTRL *pPortCtrl = (ETH_PORT_CTRL *)pPortHandle;
+ int port = pPortCtrl->portNo;
+ MV_U32 portSerialCtrlReg;
+
+ if ((port < 0) || (port >= (int)mvCtrlEthMaxPortGet()))
+ return MV_OUT_OF_RANGE;
+
+ pPortCtrl = ethPortCtrl[port];
+ if (pPortCtrl == NULL)
+ return MV_NOT_FOUND;
+
+ /* Can't force link pass and link fail at the same time */
+ if ((force_link_up) && (force_link_down))
+ return MV_BAD_PARAM;
+
+ portSerialCtrlReg = MV_REG_READ(ETH_PORT_SERIAL_CTRL_REG(port));
+
+ if (force_link_up)
+ portSerialCtrlReg |= ETH_FORCE_LINK_PASS_MASK;
+ else
+ portSerialCtrlReg &= ~ETH_FORCE_LINK_PASS_MASK;
+
+ if (force_link_down)
+ portSerialCtrlReg &= ~ETH_DO_NOT_FORCE_LINK_FAIL_MASK;
+ else
+ portSerialCtrlReg |= ETH_DO_NOT_FORCE_LINK_FAIL_MASK;
+
+ MV_REG_WRITE(ETH_PORT_SERIAL_CTRL_REG(port), portSerialCtrlReg);
+
+ return MV_OK;
+}
+
+/*******************************************************************************
* mvEthSpeedDuplexSet - Set Speed and Duplex of the port.
*
* DESCRIPTION:
diff -urN linux-feroceon_5_1_3_KW_p16/arch/arm/plat-feroceon/mv_hal/eth/mvEth.h linux-feroceon_5_1_3_KW_p17/arch/arm/plat-feroceon/mv_hal/eth/mvEth.h
--- linux-feroceon_5_1_3_KW_p16/arch/arm/plat-feroceon/mv_hal/eth/mvEth.h 2010-05-06 14:56:40.000000000 +0300
+++ linux-feroceon_5_1_3_KW_p17/arch/arm/plat-feroceon/mv_hal/eth/mvEth.h 2011-01-25 14:56:49.000000000 +0200
@@ -220,6 +220,9 @@
int mvEthTosToRxqGet(void* pPortHandle, int tos);
/* Speed, Duplex, FlowControl routines */
+MV_STATUS mvEthForceLinkModeSet(void* pPortHandle, MV_BOOL force_link_up,
+ MV_BOOL force_link_down);
+
MV_STATUS mvEthSpeedDuplexSet(void* pPortHandle, MV_ETH_PORT_SPEED speed,
MV_ETH_PORT_DUPLEX duplex);
diff -urN linux-feroceon_5_1_3_KW_p16/LspReadme.txt.orig linux-feroceon_5_1_3_KW_p17/LspReadme.txt.orig
--- linux-feroceon_5_1_3_KW_p16/LspReadme.txt.orig 2010-06-28 10:18:00.000000000 +0300
+++ linux-feroceon_5_1_3_KW_p17/LspReadme.txt.orig 1970-01-01 02:00:00.000000000 +0200
@@ -1,839 +0,0 @@
-
-General LSP information
-=================================================
-
-Contents:
----------
- 1. Default kernel configuration
- 2. Marvell LSP File locations
- 3. Procedure for Porting a new Customer Board (KW)
- 4. MTD (Memory Technology Devices) Support
- 5. Network
- 5.1 mv_gateway driver
- 5.2 eth-tool
- 6. TDM
- 7. SATA
- 7.1 SCSI scattered spin-up support
- 8. USB in HOST mode
- 9. USB in Device mode
- 10. Real Time Clock
- 11. CESA
- 12. SD\MMC\SDIO
- 13. Audio
- 14. Kernel configuration
- 14.1 General Configuration
- 14.2 Run-Time Configuration
- 14.3 Compile-Time Configuration
- 15. Debugging Tools
- 16. CPUFREQ
- 17. UBIFS
- 18. Dual CPU Support for MV78200 SoC
- 19. LCD
-
-
-
-
-1. Default kernel configuration
----------------------------------
-
- Board Default Configuration
-==========================================================================================
- DB-88F6282-BP-A mv_kw_defconfig
- RD-88F6282-A mv_kw_gw_defconfig
- DB-88F6281-BP-A mv_kw_defconfig
- DB-88F6192-BP-A (6190) mv_kw_defconfig
- DB-88F6180-BP-A mv_kw_defconfig
- RD-88F6281-A mv_kw_gw_defconfig
- RD-88F6192-A (6190) mv_kw_defconfig
-
-
-2. Marvell LSP File locations
--------------------------------
- o core directory:
- - /arch/arm/mach-feroceon-xx/...
- - /include/asm-arm/arch-feroceon-xx/...
-
- o drivers:
- - /arch/arm/plat-feroceon/...
-
-
-3. Procedure for Porting a new Customer Board (relevant only for KW)
------------------------------------------------
-The following are the steps for porting a new customer board to the Marvell LSP:
-
- o Add the Board Specific configuration definitions:
- File location: ~/arch/arm/mach-feroceon-kw/kw_family/boardEnv/mvBoardEnv.h
-
- - MPP pin configuration. Each pin is represented by a nible. Refer the
- SoC Datasheet for detailed information about the options and values
- per pin.
-
- - MPP pin direction (input or output). Each MPP pin is represented
- with a single bit (1 for input and 0 for output).
-
- - MPP pin level (default level, high or low) if the MPP pin is a GPIO
- and configured to output.
-
- - Specify the Board ID. This is need to identify the board. This is
- supposed to be synchronized with the board ID passed by the UBoot.
-
- o Add the Board Specific configuration tables:
- File location: ~/arch/arm/mach-feroceon-kw/kw_family/boardEnv/mvBoardEnv.c
-
- The following configuration options are listed in the order they are
- present in the "MV_BOARD_INFO" structure.
-
- - boardName: Set the board name string. This is displayed by both Uboot and Linux
- during the boot process.
-
- - pBoardMppConfigValue (MV_BOARD_MPP_INFO): This structure arranges the MPP pins
- configuration. This is usually not modified.
-
- - intsGppMask: Select MPP pins that are supposed to operate as
- interrupt lines.
-
- - pDevCsInfo (MV_DEV_CS_INFO):Specify the devices connected on the device bus
- with the Chip select configuration.
-
- - pBoardPciIf (MV_BOARD_PCI_IF): This is the PCI Interface table with the PCI
- device number and MPP pins assigned for each of the 4 interrupts A, B, C and D.
-
- - pBoardTwsiDev (): List of I2C devices connected on the TWSI
- interface with the device ID Addressing mode (10 or 7 bit).
-
- - pBoardMacInfo (MV_BOARD_MAC_INFO): Specifies the MAC speed and the Phy address
- per Ethernet interface.
-
- - pBoardGppInfo (): List of MPP pins configured as GPIO pins with special functionality.
-
- - pLedGppPin (MV_U8): array of the MPP pins connected to LEDs.
-
- - ledsPolarity: Bitmap specifying the MPP pins to be configured with
- reverse polarity.
-
- - gppOutEnVal: This is usually defined in the mvCustomerBoardEnv.h
- specifying the direction of all MPP pins.
-
- - gppPolarityVal: Not used.
-
- Finally update all of the configuration table sizes (xxxxxxxxx_NUM definitions)
- according to the number of entries in the relevant table.
-
- o Specify the memory map of your new board.
- File location: ~/arch/arm/mach-feroceon-kw/sysmap.c
-
- The following configurations should be done:
- - Look for the section in the file related to the SoC device you are using.
-
- - Add a new table with Address Decoding information (MV_CPU_DEC_WIN) for your board.
- (Usually existing address decoding tables are compatible with most boards, the
- changes might be only in the Device Chip selects only).
-
- - In the function "mv_sys_map()", add a new "case:" statement (under the appropriate
- SoC type) with the your newly added board ID mapping it to the appropriate Address
- Decoding configuration table.
-
-
-4. MTD (Memory Technology Devices) Support
---------------------------------------------
-
-A new MTD map driver has been added, this driver automatically detects the existing Flash devices
-and mapps it into the Linux MTD subsystem. This new driver affect NOR flashes (CFI, SPI and Marvell).
-NAND flashes are supported separately and not not part of this driver.
-
-The detection of MTD devices depends on the Linux kernel configuration options set (using the
-"make menuconfig" or "make xconfig" tools).
-To have basic MTD Support the following options should be selected:
- -> Device Drivers
- -> Memory Technology Devices (MTD)
- -> Memory Technology Device (MTD) support (MTD [=y])
-
-For CFI Flashes the following options should be selected
- -> Device Drivers
- -> Memory Technology Devices (MTD)
- -> Memory Technology Device (MTD) support (MTD [=y])
- -> RAM/ROM/Flash chip drivers
- -> Detect flash chips by Common Flash Interface (CFI) probe
-
-For Intel (and Intel compatible) Flashes the following options should be selected
- -> Device Drivers
- -> Memory Technology Devices (MTD)
- -> Memory Technology Device (MTD) support (MTD [=y])
- -> RAM/ROM/Flash chip drivers
- -> Support for Intel/Sharp flash chips
-
-For AMD (and AMD compatible) Flashes the following options should be selected
- -> Device Drivers
- -> Memory Technology Devices (MTD)
- -> Memory Technology Device (MTD) support (MTD [=y])
- -> RAM/ROM/Flash chip drivers
- -> Support for AMD/Fujitsu flash chips
-
-By default, the map driver maps the whole flash device as single mtd device (/dev/mtd0, /dev/mtd1, ..)
-unless differently specified from the UBoot using the partitioning mechanism.
-To use the flash partitioning you need to have this option selected in the kernel. To do this
-you will need the following option selected:
- -> Device Drivers
- -> Memory Technology Devices (MTD)
- -> Memory Technology Device (MTD) support (MTD [=y])
- -> MTD concatenating support
-
-The exact partitioning is specified from the UBoot arguments passed to the kernel. The following
-is the syntax of the string to be added to the UBoot "booatargs" environment variable:
-
- 'mtdparts=<mtd-id>:7m@0(rootfs),1m@7(uboot)ro'
- where <mtd-id> can be one of options:
- 1) M-Flash => "marvell_flash"
- 2) SPI-Flash => "spi_flash"
- 3) NOR-Flash => "cfi_flash"
-
-The latest release of the mtd-utils can be downloaded from http://www.linux-mtd.infradead.org.
-(The main page has a link to the latest release of the mtd-utils package).
-This package provides a set of sources that can be compiled and used to manage and debug MTD devices.
-These tools can be used to erase, read and write MTD devices and to retrieve some basic information.
-
-The following is a list of useful commands:
-To see a list of MTD devices detect by the kernel: "cat /proc/mtd"
-To erase the whole MTD device: "./flash_eraseall /dev/mtd0"
-To erase the whole MTD device and format it with jffs2: "./flash_eraseall -j /dev/mtd1"
-To get device info (sectors size and count): "./flash_info /dev/mtd1"
-To create jffs2 image for NAND flash(with eraseblock size 0x20000):
- ./mkfs.jffs2 -l -e 0x20000 -n -d <path_to_fs> -o <output_file>
-
-for NOR flash only:
-===================
-To protect all sectors: "./flash_lock /dev/mtd1 0x0 -1"
-To unprotect all sectors: "./flash_unlock /dev/mtd1"
-
- NAND ECC:
- ========
- The Linux support 1 bit SW ECC protection.
- This release include support for 4 bit SW ECC Reed Solomon.
- To enable this support set the relevant config under the feroceon MTD options and configure
- the U-Boot to use 4 bit ECC by setting the nandEcc env var to 4bit.
-
-5. network
-----------
-
- 5.1 mv_gateway driver
----------------------
-
- o Supported SoC: 88F6281, 88F6183.
- Supported switch: 88E6165, 88E6161.
- Used for platforms with switch device on board (RD platforms).
-
- o Interface name - "eth<port>", port starts from 1. eth0 is reserved for the GbE port
- connected directly to a PHY.
-
- o Multiple VLANs/network-interface management.
- Configuration in kerenl command line -
- Sysntax: mv_net_config=(<mac-addr>,<port-list>)(...),mtu=<mtu-value>
- e.g. mv_net_config=(00:aa:bb:cc:dd:ee,0)(00:11:22:33:44:55,1:2:3:4),mtu=1500
-
- o IP ToS based QoS
- - VoIP QoS
- - Routing
-
- o L2 IGMP snooping support
-
- o Packets between the CPU and the Switch are controlled with Marvell Header
-
- o Link status indication implemented using an ISR connected to the switch interrupt line
-
- o See ~/arch/arm/plat-feroceon/mv_drivers_lsp/mv_network/mv_ethernet/
-
- 5.2 Ethtool support
- -----------------------
- This release introduces support for a standard ethtool.
- Please note that for non-raw registers dump command the latest ethtool user space utility with Marvell patches is needed.
-
- The ethtool support should be enabled in kernel configuration:
- CONFIG_MV_ETH_TOOL:
- -> System Type
- -> Feroceon SoC options
- -> SoC Networking support
- -> Networking Support
- -> Control and Statistics
-
- The following ethtool commands are supported in current release:
-
- - ethtool DEVNAME Display standard information about device
-
- - ethtool -s |--change DEVNAME Change generic options
- [ speed 10|100|1000 ]
- [ duplex half|full ]
- [ autoneg on|off ]
-
- - ethtool -c|--show-coalesce DEVNAME Show coalesce options
-
- - ethtool -C|--coalesce DEVNAME Set coalesce options
- [rx-usecs N]
- [tx-usecs N]
-
- - ethtool -i|--driver DEVNAME Show driver information
-
- - ethtool -d|--register-dump DEVNAME Do a register dump
- [ raw on|off ]
-
- - ethtool -r|--negotiate DEVNAME Restart N-WAY negotation
-
- - ethtool -p|--identify DEVNAME Show visible port identification (e.g. blinking)
- [ TIME-IN-SECONDS ]
-
- - ethtool -S|--statistics DEVNAME Show adapter statistics
-
-14. TDM
--------
-
-Depending on board setup, the UBoot mvPhoneConfig environment parameter should be configured as following:
-For 2xFXS: setenv mvPhoneConfig=mv_phone_config=dev[0-1]:fxs
-For 1xFXS + 1xFXO: setenv mvPhoneConfig=mv_phone_config=dev[0]:fxs, dev[1]:fxo
-
-After boot process is completed, phone_test.ko module is required in order to run various voice tests.
-This module contains the following tests:
-1 - Self echo on `line0_id`
-2 - Loopback between 2 FXS ports(line0_id & line1_id)
-3 - Loopback between FXS and FXO ports(line0_id & line1_id respectively)
-4 - Ring on FXS line `line0_id`
-5 - Generate SW tones(300Hz, 630Hz, 1000Hz) on FXS line `line0_id`
-
-For example, to run loopback test between 2 phones, run the following command:
-insmod phone_test.ko line0_id=0 line1_id=1 test_id=2
-
-In order to run different test, unload the module using the standard Linux `rmmod` command and reload the module with the requested `test_id` parameter
-
-7. SATA
----------
-
-The LSP includes a full driver for Marvell's SATA controllers, the following is a list of the
-devices supported:
- - Integrated Sata Controller (in 88F5182, 88F6082, 88F6082L, 88F5082)
- - 88SX5041
- - 88SX5080
- - 88SX5081
- - 88SX6081
- - 88SX6041
- - 88SX6042
- - 88SX7042
-
-The driver HAL APIs are found under: ~/arch/arm/mach-feroceon/Board/SATA/
-The Linux driver is found under: ~/arch/arm/plat-feroceon/mv_drivers_lsp/mv_sata/
-To enable supporting Optical disk drives (CD-ROM/DVD-ROM), this option should be selected:
- -> System Type
- -> Feroceon SoC options
- -> Support for Marvell Sata Adapters (SCSI_MVSATA [=y])
- -> Sata options
- -> Support ATAPI (CD-ROM/DVD-ROM) devices
-
-The SATA driver has basic debugging capabilities. Using the kernel configuration tools, the user
-can select 1 of 2 debugging options:
- - Display log messages on error conditions.
- - Display complete debugging log.
-
-
-The SATA kernel configuration options are found under:
- -> System Type
- -> Feroceon SoC options
- -> Support for Marvell Sata Adapters (SCSI_MVSATA [=y])
- -> Sata options
- -> Debug level (<choice> [=y])
-
-Besides, the SATA driver provides a runtime mechanism using the /proc filesystem to display
-all information about detected controllers and Disks.
-The command "cat /proc/scsi/mvSata/0" where "0" specified the SATA channel number requested. The
-channel numbers range from 0 to n where n is the one minus the number of channels available on the
-detected SATA controller.
-
-Partial hdparm utility support was added, commands supported by this LSP are:
- - hdparm -S [device] : to set standby (spindown) timeout
- - hdparm -y [device] : to put drive in standby mode
- - hdparm -Y [device] : to put drive to sleep
-
- Obselete:
-This driver supports the ATA SMART commands that issued by the smartmontools tool, version 5.36
-or later of that tool needed, also, the user should add "-d marvell" to the commands line parameters.
-
- Please use hdparm or sdparm instead!!
-
-
- 7.1 SCSI scattered spin-up support
- ----------------------------------
- Hard drive spin-up was always the highest power consuming stage. Embedded devices mostly use low
- power suppliers that sometimes needs to drive numerous hard drives.
- This feature developed in order to prevent the power supply's overloading when numerous hard drives spin-up.
-
- Usage
- Apply the scattered spin-up kernel patch.
- Compile the kernel with the config CONFIG_MV_SCATTERED_SPINUP enabled.
-
- Pass the following parameter in the kernel line:
- spinup_config=<spinup_max>,<spinup_timeout
- For example: spinup_config=2,6 will config the module for 2 maximum disks spinning-up with 6 seconds timeout.
- Parameters explanation:
- 1. <spinup_max> - The maximum spinning-up disks(can be between 1 and 8) will be like this:
- 0 = feature off.
- 1 - 8 = number of disks
- <0,>8 = invalid parameter (will behave like feature off)
- 2. <spinup_timeout> - The spin-up timeout (can be between 1 and 6) will be like this:
- 0 = feature off.
- 1 - 6 = in seconds
- <0,>6 = invalid parameter (will behave like feature off)
- Any parsing error will cause an invalid parameters print and will behave as feature off.
-
- EXPERIMANTAL kernel config:
- CONFIG_MV_DISKS_POWERUP_TO_STANDBY - on boot initialization all hard drives will assume to be in standby.
-
-
-8. USB in HOST mode
----------------------
-
-The mode of the USB controller (device or host) is configured using the UBoot environment variables.
-To work in USB HOST mode, set the UBoot variable "usb0Mode"/"usb1Mode" to "host".
-The USB driver uses the standart Linux ehci driver.
-
-
-9. USB in Device mode
-----------------------
-
-To work in device mode, the UBoot environment variable "usb0Mode" should be set to "device".
-In order to operate as "Mass Storage Device" the following steps should be followed:
- - Prepare a file to be used as the storage back end (for example use the command
- "dd bs=1M count=64 if=/dev/zero of=/root/diskFile" to create a file of size 64M.)
- - Insert the Marvell USB gadget driver: "insmod mv_udc.ko"
- - Insert the file storage driver: "insmod g_file_storage.ko file=/root/diskFile". If
- the backing file was created on an NFS drive then the following command should be used
- instead: "insmod g_file_storage.ko file=/root/diskFile use_directio=0"
-Note: only one USB interface can be set as a device.
-
-
-10. Real Time Clock
----------------------
-
- The driver is found under ~/arch/arm/mach-feroceon-xx/rtc.c
-To read the date and time from the integrated RTC unit, use the command "hwclock".
-To set the time in the RTC from the current Linux clock, use the command "hwclock --systohc"
-
-
-11. CESA
-----------
-OpenSSL
--------
- see cesa/openssl/
-
-IPsec
------
- see cesa/openswan/
-
-Disk encryption
----------------
-o To create the crypto partition, you are needed to perform the following steps:
- - Create physical partition on the disk - fdisk /dev/sda (example sda1 will created)
- - Create the crypto device example:
- `cryptsetup -c des3_ede -d /share/public/keyfile -s192 create mycryptsda1 /dev/sda1`
- The new device will created /dev/mapper/mycryptsda1
- - Create the file system on crypto device:
- `mkfs.ext2 /dev/mapper/mycryptsda1 `
- - mount the formatted partition to directory
- `mount /dev/mapper/mycryptsda1 /mnt/mydevice`
- Use the /mnt/mydevice as usual to store your files. All files on the disk will be encrypted.
-
-o To remove the crypto devices do the following steps:
- - Exit the /mnt/mydevice directory
- - umount /dev/mapper/mycryptsda1
- - cryptsetup remove mycryptsda1
-
-
-12. SD\MMC\SDIO (not relevant for DD)
-----------------
-This driver is enabled in KW SoCs that include an SD\MMC\SDIO host. the
-driver is based on latest mmc driver from kernel 2.6.24.
-
-o creating mmc block devices:
-
-# mknod /dev/mmcblk b 179 0
-# mknod /dev/mmcblk1 b 179 1
-# mknod /dev/mmcblk2 b 179 2
-# mknod /dev/mmcblk3 b 179 3
-..
-..
-..
-
-o modules:
-# insmod mvsdmmc.ko
-o debug parameters under /proc/mvsdmmc
-o mvsdmmc.ko parameters:
-
-
-highspeed - 1 - support highspeed cards (default)
- 0 - don't support highspeed cards
-
-maxfreq value - maximum frequency supported (default 50000000)
-
-dump_on_error if 1 then on error dumps registers values
-
-detect 1 - support GPIO detection interrupt
- 0 - no support for GPIO detection interrupt
-
-
-13. Audio
----------
-o requires ALSA lib and ALSA utils version 1.0.14
-o snddevices script should be run if Alsa device doesn't exist.
-
-14. Kernel configuartion
--------------------------
-
- 14.1 General Configuration:
- ---------------------------
-- This release has support for sending requests with length up to 1MB for the
- SATA drives, in some cases, this feature can reduce the system performance,
- for example, running Samba and a client that performs sequential reads.
- Note that the user can modify the limit of the max request using the sysfs,
- this parameter is per block device, and it's defined by special file called
- 'max_sectors_kb' under the queue directory of the block device under the sysfs.
- for example, the /sys/block/sda/queue/max_sectors_kb is for the /dev/sda
- device.
-
-- In order to use block devices that are larget then 2TB, CONFIG_LBD should be enabled.
- fdisk doesn't support block devices that are larger then 2TB, instead 'parted' should be used.
- The msdos partition table doesn't support >2TB , you need GPT support by the kernel:
- File Systems
- Partition Types
- [*] Advanced partition selection
- [*] EFI GUID Partition support
-
- 14.2 Run-Time Configuration:
- ----------------------------
- The following features can be configured during run-time:
- o NFP mechanism:
- echo D > /proc/net/mv_eth_tool (disable NFP)
- echo E > /proc/net/mv_eth_tool (enable NFP)
- o TX enable race:
- mv_eth_tool -txen <port> 0/1 (0 - disable, 1 - enable)
- o SKB reuse mechanism:
- mv_eth_tool -skb 0/1 (0 - disable, 1 - enable)
- o LRO support:
- mv_eth_tool -lro <port> 0/1 (0 - disable, 1 - enable)
-
- * for more ethernet run-time configurations, see egigatool help.
-
- 14.3 Compile-Time Configuration:
- --------------------------------
- The following features can be configured during compile-time only:
- o L2 cache support
- o XOR offload for CPU tasks:
- - memcpy
- - copy from/to user
- - RAID5 XOR calculation
- o TSO
- o Multi Q support - for mv_gateway driver only.
- o CESA test tool support.
-
-
-15. Debugging Tools
-----------------------
-
- o Runtime debugging is supported through the /proc virtual FS.
- See ~/arch/arm/mach-feroceon-xx/proc.c
-
- o mv_shell: Access memory, SoC registers, and SMI registers from user space.
- mv_eth_tool: Probe mv_ethernet driver for statistic counters.
- mv_cesa_tool: Probe CESA driver for statistic counters.
- These tools are found under ~/tools
-
- o The LSP supports kernel debugging using KGDB. Refer to AN232 "Using GDB to Debug the
- Linux Kernel and Applications" for detailed information.
-
- o Early boot debugging is supported by the LSP. To enable this option configure the following
- settings in the kernel.
- -> Kernel hacking
- -> Kernel low-level debugging functions
- You have this option you need first to enable the "Kernel debugging" tab first.
-
-
-16. CPUFREQ (relevant only for KW)
-------------
-
- 16.1 Introduction:
- ------------------
- The cpufreq driver allows the cpu frequency to be adjusted either manually from userspace or
- automatically according to given policies. The available policies are defined when the kernel
- is configured. In order to get/set cpu frequency parameters the cpufreq utils are used.
-
- 16.2 cpufreq kernel driver:
- -------------------------
- The driver implements power save on/off according to the desired cpu frequency.
-
- 16.3 kernel configuration:
- --------------------------
- - Enable Cpu Frequency scaling and choose userspace governor as default governor
- - Choose Default CPUFreq governor: userspace
-
- CONFIG_CPU_FREQ=y
- CONFIG_CPU_FREQ_TABLE=y
- # CONFIG_CPU_FREQ_DEBUG is not set
- CONFIG_CPU_FREQ_STAT=y
- # CONFIG_CPU_FREQ_STAT_DETAILS is not set
- # CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
- CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
- CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
- # CONFIG_CPU_FREQ_GOV_POWERSAVE is not set
- CONFIG_CPU_FREQ_GOV_USERSPACE=y
- # CONFIG_CPU_FREQ_GOV_ONDEMAND is not set
- # CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
- CONFIG_CPU_FREQ_FEROCEON_KW=y
-
-
-
-
- 16.4 cpufrequtils installation:
- -------------------------------
- On a debian system it suffices to say:
- apt-get install cpufrequtils
-
-
- 16.5 Using the cpufreq utilties:
- --------------------------------
- -Display information:
- % cpufreq-info -h
-
- cpufrequtils 004: cpufreq-info (C) Dominik Brodowski 2004-2006
- Report errors and bugs to cpufreq@lists.linux.org.uk, please.
- Usage: cpufreq-info [options]
- Options:
- -c CPU, --cpu CPU CPU number which information shall be determined about
- -e, --debug Prints out debug information
- -f, --freq Get frequency the CPU currently runs at, according
- to the cpufreq core *
- -w, --hwfreq Get frequency the CPU currently runs at, by reading
- it from hardware (only available to root) *
- -l, --hwlimits Determine the minimum and maximum CPU frequency allowed *
- -d, --driver Determines the used cpufreq kernel driver *
- -p, --policy Gets the currently used cpufreq policy *
- -g, --governors Determines available cpufreq governors *
- -a, --affected-cpus Determines which CPUs can only switch frequency at the
- same time *
- -s, --stats Shows cpufreq statistics if available
- -o, --proc Prints out information like provided by the /proc/cpufreq
- interface in 2.4. and early 2.6. kernels
- -m, --human human-readable output for the -f, -w and -s parameters
- -h, --help Prints out this screen
-
- If no argument or only the -c, --cpu parameter is given, debug output about
- cpufreq is printed which is useful e.g. for reporting bugs.
- For the arguments marked with *, omitting the -c or --cpu argument is
- equivalent to setting it to zero
-
-
- Example Usage:
- % cpufreq-info
- cpufrequtils 004: cpufreq-info (C) Dominik Brodowski 2004-2006
- Report errors and bugs to cpufreq@lists.linux.org.uk, please.
- analyzing CPU 0:
- driver: kw_cpufreq
- CPUs which need to switch frequency at the same time: 0
- hardware limits: 400 MHz - 1.20 GHz
- available frequency steps: 400 MHz, 1.20 GHz
- available cpufreq governors: userspace, performance
- current policy: frequency should be within 400 MHz and 1.20 GHz.
- The governor "userspace" may decide which speed to use
- within this range.
- current CPU frequency is 1.20 GHz (asserted by call to hardware).
- cpufreq stats: 400 MHz:0.00%, 1.20 GHz:0.00% (6)
-
-
-
- - Setting new cpu frequency:
- % cpufreq-set -h
-
- cpufrequtils 004: cpufreq-set (C) Dominik Brodowski 2004-2006
- Report errors and bugs to cpufreq@lists.linux.org.uk, please.
- Usage: cpufreq-set [options]
- Options:
- -c CPU, --cpu CPU number of CPU where cpufreq settings shall be modified
- -d FREQ, --min FREQ new minimum CPU frequency the governor may select
- -u FREQ, --max FREQ new maximum CPU frequency the governor may select
- -g GOV, --governor GOV new cpufreq governor
- -f FREQ, --freq FREQ specific frequency to be set. Requires userspace
- governor to be available and loaded
- -h, --help Prints out this screen
-
- Notes:
- 1. Omitting the -c or --cpu argument is equivalent to setting it to zero
- 2. The -f FREQ, --freq FREQ parameter cannot be combined with any other parameter
- except the -c CPU, --cpu CPU parameter
- 3. FREQuencies can be passed in Hz, kHz (default), MHz, GHz, or THz
- by postfixing the value with the wanted unit name, without any space
- (FREQuency in kHz =^ Hz * 0.001 =^ MHz * 1000 =^ GHz * 1000000).
-
-
- Example usage:
-
- % cpufreq-set -f 1.2GHz
- % cpufreq-set -f 400MHz
-
-
-
- 16.6 Dynamic Frequency Scaling
- ------------------------------
- It is possible to let a background daemon (e.g. hald-addon-cpufreq) decide how to
- scale the cpu frequency according to the system load. For this purpose proceed as follows:
- - Configure kernel with "ondemand" governor.
- - Set the default governor to be "userspace".
- - The governor can also be set from userspace by "cpufreq-set -g"
-
- - The behaviour of the hald-addon-cpufreq daemon can be configured through sysfs at
- % ls /sys/devices/system/cpu/cpu0/cpufreq/ondemand/
- ignore_nice_load sampling_rate sampling_rate_min
- powersave_bias sampling_rate_max up_threshold
-
-
-17. UBIFS
-----------
-
- 17.1 Getting the sources:
- -------------------------
- - mtd utils with ubifs support: git://git.infradead.org/mtd-utils.git
-
- 17.2 Compiling mtd utils:
- -------------------------
-
- The mtd utils have to be compiled both for arm and for x86 since typically the
- file system will be generated on a x86 system.
- The lzo and uuid libraries are needed for compiling and for running the ubi utilities.
-
- 17.3 UBI utilities on the target system:
- ----------------------------------------
-
- The following utilities should be on the target system:
- - ubiformat, ubinfo, ubimkvol, ubirmvol, ubiupdatevol, ubiattach, ubidetach
-
-
- 17.4 Building a ubifs root file system:
- ---------------------------------------
-
- - In the following I assume that the root file system is situated in the directory rootfs.
- Several of the parameters
- appearing in the following example need to be adjusted to the user's needs and only serve as examples.
-
- - Create a configuration file ubinize.cfg with the following contents:
-
- [ubifs]
- mode=ubi
- image=tmp_rootfs.img
- vol_id=0
- vol_size=90MiB
- vol_type=dynamic
- vol_name=rootfs
- vol_flags=autoresize
-
-
- - Execute the following commands:
-
- % mkfs.ubifs -g 2 -v -r rootfs -m 2KiB -e 124KiB -c 2047 -o tmp_rootfs.img
-
- % ubinize -v -o rootfs_ubi.img -m 2KiB -p 128KiB -s 2048 -O 2048 ubinize.cfg
-
- % rm tmp_rootfs.img
-
-
- - The file rootfs_ubi.img contains the ubifs image of the root file system.
-
-
- 17.5 Burning ubifs image to flash:
- ----------------------------------
-
- Assume we would like to burn an image with the name /tmp/rootfs_ubi.img to the
- mtd partition mtd2. For this purpose execute the following commands on the target system:
-
- % ubiformat /dev/mtd2 -s 2048 -O 2048 -f /tmp/rootfs_ubi.img
-
-
- 17.6 Booting a ubifs root file system:
- --------------------------------------
-
- Assume that mtd2 contains the root file system in the ubivolume named rootfs. In this case
- the following parameters have to be added to the bootargs:
-
- ubi.mtd=2,2048 root=ubi0:rootfs rootfstype=ubifs
-
-
- 17.7 Creating/mounting ubi partitions at run time:
- --------------------------------------------------
-
- Assume that we want to create a ubi file system with a size of 32MB on mtd2.
- To this purpose execute the following commands:
-
- % ubiformat /dev/mtd2 -s 2048
-
- % ubiattach /dev/ubi_ctrl -m 2 -O 2048
-
- % ubimkvol /dev/ubi0 -N some_name -s 32MiB
-
- % mkdir -p /mnt/some_name
-
- % mount -t ubifs ubi0:some_name /mnt/some_name
-
-18. Dual CPU Support for MV78200 SoC (relevant only for DD)
---------------------------------------
- o Dual CPU system supported for DB-78200-A-BP board only,
- and requires special version of U-Boot
- o To enable 2nd CPU set "enaMP" U-Boot variable to "yes"
- o U-Boot environment the new variables to boot Linux on 2nd CPU:
- -> ipaddr2
- -> console2
- -> bootargs_root2
- -> bootargs_end2
- -> image_name2
- -> bootcmd2 etc.
- Please refer U-Boot documentation for more details
- o The LSP for MV78200 provides execution of two independent Linux OS while
- same binary image is used to run either on core 0 or 1
- o The board must have two DIMM installed each Linux OS uses different DIMM
- o The SoC units can be mapped to different CPUs according to kernel command line -
- see "cpu_res" U-Boot environment variable
- o Command line format to assign SoC unit to specific CPU:
- cpu<core_id>=egiga<GbE_num>,egiga<GbE_num>,pcie<pcie_x4_num>,sata,nor,nand,spi,
- usb<usb_if_num>,tdm
- - Example configuration:
- "cpu0=egiga0,egiga1,sata,nor,nand,spi,usb0,usb2,tdm"
- GbE0 and 1,integrated SATA, NOR,NAND and SPI flash,
- USB0 and 2 and TDM are assigned to core 0
- - Limitations:
- -> No spaces are allowed in configration string
- -> PCI-E interfaces can be assigned to CPU in groups of 4, "pcie1" in
- command line means that PCI-E 1.0, 1.1, 1.2 and 1.3 now "belong"
- to CPU 1.
- - All SoC units except of UART1, Giga2 and Giga3 are assigned to CPU0 by default
-
-
-19. LCD:
-========
- U-boot parameters:
- lcd0_enable
- Type int, default value 0
- Description Set to 1 to enable LCD output. U-Boot uses this variable to set the value
- of the clcd.lcd0_enable parameter that is passed to the kernel in the
- command line.
-
- lcd0_params
- Type string
- Description LCD 0 parameters, formula:
- <xres>x<yres>-<bpp>@<refresh
- rate>[-edid][-<out-xres>x<out-yres>]
-
- where
- xres = X-axes resolution
- yres = Y-axes resolution
- bpp = bits per pixel
- The -edid part is optional and enables edid detection.
-
- When it is used, the driver sets the resolution according to the screen
- edid information.
- xout-xres: X-axis resolution of the output screen. When not provided, the
- driver use xres.
- yout-yres: Y-axis resolution of the output screen. When not provided, the
- driver uses yres.
- U-Boot uses these variables to set the value of the video parameter that
- is passed to the kernel in the command line.
-
diff -Naur linux-feroceon_5_1_3_KW-org/arch/arm/mach-feroceon-kw/core.c linux-feroceon_5_1_3_KW/arch/arm/mach-feroceon-kw/core.c
--- linux-feroceon_5_1_3_KW-org/arch/arm/mach-feroceon-kw/core.c 2011-06-02 20:15:34.000000000 +0800
+++ linux-feroceon_5_1_3_KW/arch/arm/mach-feroceon-kw/core.c 2011-06-02 20:21:39.000000000 +0800
@@ -667,7 +667,7 @@
#define GPP_GROUP(gpp) gpp/32
#define GPP_ID(gpp) gpp%32
#define GPP_BIT(gpp) 0x1 << GPP_ID(gpp)
-#define SHUTDOWN_PIN 33
+#define SHUTDOWN_PIN 36
static void power_off_proc(void)
{
mvGppValueSet(GPP_GROUP(SHUTDOWN_PIN),
diff -Naur linux-feroceon_5_1_3_KW-org/arch/arm/mach-feroceon-kw/kw_family/boardEnv/mvBoardEnvSpec.h linux-feroceon_5_1_3_KW/arch/arm/mach-feroceon-kw/kw_family/boardEnv/mvBoardEnvSpec.h
--- linux-feroceon_5_1_3_KW-org/arch/arm/mach-feroceon-kw/kw_family/boardEnv/mvBoardEnvSpec.h 2011-06-02 20:15:34.000000000 +0800
+++ linux-feroceon_5_1_3_KW/arch/arm/mach-feroceon-kw/kw_family/boardEnv/mvBoardEnvSpec.h 2011-06-02 20:20:17.000000000 +0800
@@ -174,9 +174,9 @@
#define DB_88F6282A_MPP40_47 0x00000000
#define DB_88F6282A_MPP48_55 0x00000000
#define DB_88F6282A_OE_LOW (~(BIT17+BIT24+BIT25+BIT26))
-#define DB_88F6282A_OE_HIGH (~(BIT1+BIT4+BIT5+BIT7+BIT8+BIT9+BIT10+BIT17))
-#define DB_88F6282A_OE_VAL_LOW (BIT17)
-#define DB_88F6282A_OE_VAL_HIGH (BIT17)
+#define DB_88F6282A_OE_HIGH (~(BIT4+BIT5+BIT7+BIT8+BIT9+BIT10+BIT17))
+#define DB_88F6282A_OE_VAL_LOW (BIT17)
+#define DB_88F6282A_OE_VAL_HIGH (BIT17+BIT7)
/* RD-88F6282 */
#define RD_88F6282A_MPP0_7 0x21111111
diff -Naur linux-feroceon_5_1_3_KW/arch/arm/mach-feroceon-kw/core.c linux-feroceon_5_1_3_KW/arch/arm/mach-feroceon-kw/core.c
--- linux-feroceon_5_1_3_KW/arch/arm/mach-feroceon-kw/core.c 2011-05-04 21:11:44.515180385 +0800
+++ linux-feroceon_5_1_3_KW/arch/arm/mach-feroceon-kw/core.c 2011-05-02 13:36:19.000000000 +0800
@@ -319,7 +319,8 @@
static void serial_initialize(void)
{
mv_uart0_data[0].uartclk = mv_uart1_data[0].uartclk = mvTclk;
- if((mvBoardIdGet() == DB_88F6280A_BP_ID) || (mvBoardIdGet() == RD_88F6282A_ID))
+ if((mvBoardIdGet() == DB_88F6280A_BP_ID) || (mvBoardIdGet() == RD_88F6282A_ID) ||
+ (mvBoardIdGet() == DB_88F6282A_BP_ID))
{
mv_uart.dev.platform_data = mv_uart1_data;
mv_uart.resource = mv_uart1_resources;
diff -Naur linux-feroceon_5_1_3_KW/arch/arm/mach-feroceon-kw/kw_family/boardEnv/mvBoardEnvSpec.c linux-feroceon_5_1_3_KW/arch/arm/mach-feroceon-kw/kw_family/boardEnv/mvBoardEnvSpec.c
--- linux-feroceon_5_1_3_KW/arch/arm/mach-feroceon-kw/kw_family/boardEnv/mvBoardEnvSpec.c 2011-05-04 21:12:03.224981206 +0800
+++ linux-feroceon_5_1_3_KW/arch/arm/mach-feroceon-kw/kw_family/boardEnv/mvBoardEnvSpec.c 2011-05-02 15:45:44.000000000 +0800
@@ -914,7 +914,7 @@
#define DB_88F6282A_BOARD_PCI_IF_NUM 0x0
#define DB_88F6282A_BOARD_TWSI_DEF_NUM 0x7
-#define DB_88F6282A_BOARD_MAC_INFO_NUM 0x2
+#define DB_88F6282A_BOARD_MAC_INFO_NUM 0x1
#define DB_88F6282A_BOARD_GPP_INFO_NUM 0x1
#define DB_88F6282A_BOARD_MPP_CONFIG_NUM 0x1
#define DB_88F6282A_BOARD_MPP_GROUP_TYPE_NUM 0x1
@@ -946,8 +946,8 @@
MV_BOARD_MAC_INFO db88f6282AInfoBoardMacInfo[] =
/* {{MV_BOARD_MAC_SPEED boardMacSpeed, MV_U8 boardEthSmiAddr}} */
{
- {BOARD_MAC_SPEED_AUTO, 0x8},
- {BOARD_MAC_SPEED_AUTO, 0x9}
+ {BOARD_MAC_SPEED_AUTO, 0x0},
+// {BOARD_MAC_SPEED_AUTO, 0x9}
};
MV_BOARD_MPP_TYPE_INFO db88f6282AInfoBoardMppTypeInfo[] =
diff -Naur linux-feroceon_5_1_3_KW/arch/arm/mach-feroceon-kw/nand.c linux-feroceon_5_1_3_KW/arch/arm/mach-feroceon-kw/nand.c
--- linux-feroceon_5_1_3_KW/arch/arm/mach-feroceon-kw/nand.c 2010-05-06 19:56:00.000000000 +0800
+++ linux-feroceon_5_1_3_KW/arch/arm/mach-feroceon-kw/nand.c 2011-05-02 13:56:49.000000000 +0800
@@ -161,7 +161,7 @@
else
#endif
this->ecc.mode = NAND_ECC_SOFT;
- this->chip_delay = 30;
+ this->chip_delay = 35;
if(nand_scan(mv_mtd,1)) {
err = -ENXIO;
goto out_ior;
diff -Naur linux-feroceon_5_1_3_KW_org/arch/arm/kernel/process.c linux-feroceon_5_1_3_KW/arch/arm/kernel/process.c
--- linux-feroceon_5_1_3_KW_org/arch/arm/kernel/process.c 2009-12-15 00:14:26.000000000 +0800
+++ linux-feroceon_5_1_3_KW/arch/arm/kernel/process.c 2011-05-05 13:44:44.089678863 +0800
@@ -192,6 +192,8 @@
void machine_halt(void)
{
+ if (pm_power_off)
+ pm_power_off();
}
diff -Naur linux-feroceon_5_1_3_KW_org/arch/arm/mach-feroceon-kw/core.c linux-feroceon_5_1_3_KW/arch/arm/mach-feroceon-kw/core.c
--- linux-feroceon_5_1_3_KW_org/arch/arm/mach-feroceon-kw/core.c 2011-05-05 13:26:38.000000000 +0800
+++ linux-feroceon_5_1_3_KW/arch/arm/mach-feroceon-kw/core.c 2011-05-05 13:48:32.875418301 +0800
@@ -44,6 +44,7 @@
#include <asm/serial.h>
#include <plat/cache-feroceon-l2.h>
+#include <linux/pm.h>
#include <mach/serial.h>
#include "ctrlEnv/mvCtrlEnvLib.h"
@@ -107,6 +108,8 @@
#endif
unsigned int support_wait_for_interrupt = 0x1;
+static void power_off_proc(void);
+
u32 mvTclk = 166666667;
u32 mvSysclk = 200000000;
u32 mvIsUsbHost = 1;
@@ -657,9 +660,21 @@
if (MV_TRUE == mvCtrlPwrClckGet(LCD_UNIT_ID, 0))
clcd_platform_init(&kw_lcd0_dmi, &kw_lcd0_vid_dmi, NULL);
#endif
+ pm_power_off=power_off_proc;
return;
}
+#define GPP_GROUP(gpp) gpp/32
+#define GPP_ID(gpp) gpp%32
+#define GPP_BIT(gpp) 0x1 << GPP_ID(gpp)
+#define SHUTDOWN_PIN 33
+static void power_off_proc(void)
+{
+ mvGppValueSet(GPP_GROUP(SHUTDOWN_PIN),
+ GPP_BIT(SHUTDOWN_PIN), 1 << GPP_ID(SHUTDOWN_PIN));
+}
+
+
#ifdef CONFIG_FB_DOVE_OPTIMIZED_FB_MEM_ALLOC
/*
* This fixup function is used to reserve memory for the GPU and VPU engines
diff -Naur linux-feroceon_5_1_3_KW_org/scripts/mkcompile_h linux-feroceon_5_1_3_KW/scripts/mkcompile_h
--- linux-feroceon_5_1_3_KW_org/scripts/mkcompile_h 2011-05-12 10:28:01.478984453 +0800
+++ linux-feroceon_5_1_3_KW/scripts/mkcompile_h 2011-05-12 10:57:56.983142336 +0800
@@ -3,6 +3,7 @@
SMP=$3
PREEMPT=$4
CC=$5
+KRNL_VER=v0.0.1
vecho() { [ "${quiet}" = "silent_" ] || echo "$@" ; }
@@ -41,7 +42,7 @@
TIMESTAMP=$KBUILD_BUILD_TIMESTAMP
fi
-UTS_VERSION="#$VERSION"
+UTS_VERSION="$UTS_VERSION $CONFIG_FLAGS $TIMESTAMP $KRNL_VER"
CONFIG_FLAGS=""
if [ -n "$SMP" ] ; then CONFIG_FLAGS="SMP"; fi
if [ -n "$PREEMPT" ] ; then CONFIG_FLAGS="$CONFIG_FLAGS PREEMPT"; fi
|
Re: Lenovo IX2 DL August 19, 2021 12:47AM |
Admin Registered: 14 years ago Posts: 19,977 |
root@tldDebian:/usr/src/linux-5.13.6-tld# diff -Naur arch/arm/boot/dts/kirkwood-lenovo-ix2-dl.dts.orig arch/arm/boot/dts/kirkwood-lenovo-ix2-dl.dts
--- arch/arm/boot/dts/kirkwood-lenovo-ix2-dl.dts.orig 2021-08-18 22:32:09.532155470 -0700
+++ arch/arm/boot/dts/kirkwood-lenovo-ix2-dl.dts 2021-08-18 22:42:08.662964975 -0700
@@ -255,7 +255,7 @@
ð0 {
status = "okay";
ethernet0-port@0 {
- phy-handle = <0x0C>;
+ phy-handle = <ðphy0>;
};
};
|
Re: Lenovo IX2 DL August 19, 2021 01:10AM |
Admin Registered: 14 years ago Posts: 19,977 |
/* Device tree file for the Lenovo IOMEGA IX2-ng NAS box.
*
* Copyright (c) 2017, Daniel Helgason <daniel.k.helgason @ gmail.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*
* Based on the device-tree work of many fine linux developers.
*/
/dts-v1/;
#include "kirkwood-lenovo-ix2-common.dtsi"
/ {
model = "Lenovo IX2-ng";
compatible = "lenovo,ix2", "marvell,kirkwood-88f6282", "marvell,kirkwood";
ocp@f1000000 {
spi@10600 {
status = "okay";
flash@0 {
#address-cells = <1>;
#size-cells = <1>;
/* MX25L8006E can do 4K sector handling but
* sadly not in spi-nor.c yet.
*/
// compatible = "mxicy,mx25l8006e", "jedec,spi-nor";
compatible = "mxicy,mx25l8005", "jedec,spi-nor";
spi-max-frequency = <50000000>;
reg = <0>; /* Chip-select 0 */
mode = <0>;
partition@0 {
reg = <0x0 0x7e000>;
label = "u-boot";
};
partition@1 {
reg = <0x7e000 0x1000>;
label = "u-boot env2";
};
partition@2 {
reg = <0x7f000 0x1000>;
label = "u-boot env";
};
};
};
};
};
#include "kirkwood-lenovo-ix2-common.dtsi"
|
Re: Lenovo IX2 DL August 19, 2021 02:04AM |
Registered: 7 years ago Posts: 125 |
|
Re: Lenovo IX2 DL August 19, 2021 05:40AM |
Registered: 7 years ago Posts: 125 |
Unknown command 'úõÒõ$š' - try 'help'
|
Re: Lenovo IX2 DL August 19, 2021 03:54PM |
Admin Registered: 14 years ago Posts: 19,977 |
|
Re: Lenovo IX2 DL August 19, 2021 04:17PM |
Registered: 7 years ago Posts: 125 |
/* Device tree file for the Lenovo IOMEGA IX2-dl NAS box.
*
* Copyright (c) 2017, Daniel Helgason <daniel.k.helgason @ gmail.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*
* Based on the device-tree work of many fine linux developers.
*/
/dts-v1/;
#include "kirkwood-lenovo-ix2-common.dtsi"
/ {
model = "Lenovo IX2-dl";
compatible = "lenovo-ix2-dl", "marvell,kirkwood-88f6282", "marvell,kirkwood";
};
&nand {
status = "okay";
chip-delay = <35>;
partition@0 {
label = "uboot";
reg = <0x0000000 0x0080000>;
read-only;
};
partition@0a0000 {
label = "uboot_env";
reg = <0x00a0000 0x0020000>;
};
partition@0c0000 {
label = "uboot_env2";
reg = <0x00c0000 0x0020000>;
};
partition@100000 {
label = "kernel";
reg = <0x0100000 0x0300000>;
};
partition@400000 {
label = "ubi";
reg = <0x0400000 0x020000000>;
};
};
/*
* Common Device tree file for the Lenovo / Iomega IX2 Devices
*
* Copyright (c) 2015-2016 bodhi <mibodhi@gmail.com>
* Copyright (c) 2015 balbes150
*
* This file is licensed under the terms of the GNU General Public
* License version 2. This program is licensed "as is" without any
* warranty of any kind, whether express or implied.
*/
/dts-v1/;
#include "kirkwood.dtsi"
#include "kirkwood-6282.dtsi"
/ {
/* 256 MB RAM. */
memory {
device_type = "memory";
reg = <0x00000000 0x10000000>;
};
chosen {
bootargs = "console=ttyS0,115200n8 earlyprintk";
stdout-path = &uart1;
};
ocp@f1000000 {
pinctrl: pin-controller@10000 {
pmx_power_off: pmx-power-off {
marvell,pins = "mpp36";
marvell,function = "gpio";
};
pmx_sata1_power: pmx-sata1-power {
marvell,pins = "mpp17";
marvell,function = "gpio";
};
pmx_btn_power: pmx-btn-power {
marvell,pins = "mpp15";
marvell,function = "gpio";
};
pmx_btn_reset: pmx-btn-reset {
marvell,pins = "mpp29";
marvell,function = "gpio";
};
pmx_led_sys_white: pmx-led-sys-white {
marvell,pins = "mpp39";
marvell,function = "gpio";
};
pmx_led_sys_red: pmx-led-sys-red {
marvell,pins = "mpp37";
marvell,function = "gpio";
};
pmx_led_hdd_blue: pmx-led-hdd-blue {
marvell,pins = "mpp26";
marvell,function = "gpio";
};
pmx_led_hdd1_red: pmx-led-hdd1-red {
marvell,pins = "mpp25";
marvell,function = "gpio";
};
pmx_led_hdd2_red: pmx-led-hdd2-red {
marvell,pins = "mpp24";
marvell,function = "gpio";
};
pmx_led_brightness: pmx-led-brightness {
marvell,pins = "mpp40", "mpp41";
marvell,function = "gpio";
};
};
/* Second serial port is available on header "CN4". */
serial@12100 {
status = "okay";
};
rtc@10300 {
status = "okay";
};
i2c@11000 {
status = "okay";
adt7473: adt7473@2e {
compatible = "adi,adt7473";
reg = <0x2e>;
};
/* Also something at 0x64. Maybe Marvell i2c debug? */
};
sata@80000 {
status = "okay";
nr-ports = <2>;
};
};
gpio-poweroff {
compatible = "gpio-poweroff";
pinctrl-0 = <&pmx_power_off>;
pinctrl-names = "default";
gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>;
};
gpio-keys {
compatible = "gpio-keys";
#address-cells = <1>;
#size-cells = <0>;
pinctrl-0 = <&pmx_btn_power &pmx_btn_reset>;
pinctrl-names = "default";
power {
label = "Power Button";
linux,code = <KEY_POWER>;
gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
};
reset {
label = "Reset Button";
linux,code = <KEY_RESTART>;
gpios = <&gpio0 29 GPIO_ACTIVE_LOW>;
};
};
gpio-leds {
compatible = "gpio-leds";
pinctrl-0 = <&pmx_led_sys_white &pmx_led_sys_red
&pmx_led_hdd_blue
&pmx_led_hdd1_red &pmx_led_hdd2_red>;
pinctrl-names = "default";
white-sys {
label = "ix2:white:sys";
gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
default-state = "keep";
};
red-sys {
label = "ix2:red:sys";
gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>;
};
blue-hdd {
label = "ix2:blue:hdd";
gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>;
};
red-hdd1 {
label = "ix2:red:hdd1";
gpios = <&gpio0 25 GPIO_ACTIVE_HIGH>;
};
red-hdd2 {
label = "ix2:red:hdd2";
gpios = <&gpio0 24 GPIO_ACTIVE_HIGH>;
};
};
regulators {
compatible = "simple-bus";
#address-cells = <1>;
#size-cells = <0>;
pinctrl-0 = <&pmx_led_brightness
&pmx_sata1_power>;
pinctrl-names = "default";
led_power: regulator@1 {
compatible = "regulator-gpio";
reg = <1>;
regulator-name = "LED brightness";
regulator-type = "voltage";
regulator-min-microvolt = <1100000>;
regulator-max-microvolt = <3300000>;
gpios = <&gpio1 9 GPIO_ACTIVE_HIGH
&gpio1 8 GPIO_ACTIVE_HIGH>;
gpios_states = <1 1>;
state = <3300000 0x3
2200000 0x1
1100000 0x0>;
regulator-always-on;
regulator-boot-on;
enable-active-high;
};
sata1_power: regulator@2 {
compatible = "regulator-fixed";
reg = <2>;
regulator-name = "SATA1 Power";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
regulator-always-on;
regulator-boot-on;
enable-active-high;
gpio = <&gpio0 17 GPIO_ACTIVE_HIGH>;
};
};
};
&mdio {
status = "okay";
ethphy0: ethernet-phy@0 {
reg = <0>;
};
};
ð0 {
status = "okay";
ethernet0-port@0 {
phy-handle = <ðphy0>;
};
};
|
Re: Lenovo IX2 DL August 19, 2021 04:19PM |
Registered: 7 years ago Posts: 125 |
[ 0.649583] nand: device found, Manufacturer ID: 0xec, Chip ID: 0xd3 [ 0.655960] nand: Samsung NAND 1GiB 3,3V 8-bit [ 0.660439] nand: 1024 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64 [ 0.668145] Scanning device for bad blocks [ 0.676556] Bad eraseblock 54 at 0x0000006c0000 [ 0.864226] Bad eraseblock 2380 at 0x000012980000 [ 1.046066] Bad eraseblock 4629 at 0x0000242a0000 [ 1.323002] Bad eraseblock 8086 at 0x00003f2c0000
|
Re: Lenovo IX2 DL August 19, 2021 04:56PM |
Admin Registered: 14 years ago Posts: 19,977 |
QuoteUnknown command 'úõÒõ$š' - try 'help'
Oddly it happens only when the serial console isn't connected.
[ 0.676556] Bad eraseblock 54 at 0x0000006c0000 [ 0.864226] Bad eraseblock 2380 at 0x000012980000 [ 1.046066] Bad eraseblock 4629 at 0x0000242a0000 [ 1.323002] Bad eraseblock 8086 at 0x00003f2c0000
|
Re: Lenovo IX2 DL August 19, 2021 05:01PM |
Registered: 7 years ago Posts: 125 |
|
Re: Lenovo IX2 DL August 19, 2021 07:01PM |
Registered: 7 years ago Posts: 125 |
baudrate=115200
loads_echo=0
rootpath=/srv/ubuntu
netmask=255.255.255.0
run_diag=yes
MALLOC_len=1
ethprime=egiga0
image_name=uImage
ethmtu=1500
usb0Mode=host
yuk_ethaddr=00:00:00:EE:51:81
nandEcc=1bit
netretry=no
rcvrip=169.254.100.100
loadaddr=0x02000000
autoload=no
image_multi=yes
ethact=egiga0
kernel_size=0x300000
console=console=ttyS0,115200
initrdimage=mfginitrd
mfgmodel=ix2
preroot_ver=0.0.2
uboot_ver=0.0.8
serial_number=5563Y01011G33400015J0H1
ethaddr=00:D0:B8:15:62:7F
serialNo=V7AD360054
modelname=70A69003AP
fw_ver=4.0.4.14600d
serialno=1,01qImmfct4zUs3yki67JMy2LfVN603V+W1CY2gpTd1BPOPOB+KEBaLjxL2hhBGH2Rz,V7AD360054,
runintime=10800
ftpserver=192.168.43.4
testfile=100M
mfgtest_state=system_tested_ok
pre_path=IX2/1.0.8/download_runin.sh
pre_path_conf=IX2/1.0.8/download_runin.conf
pre_serverip=192.168.32.4
pre_user=ixxrunin
pre_passwd=123
pre_dirzi=IX2/1.0.8
initrd_size=0x400000
arcNumber=1682
load_uImage=ext2load usb 0:1 0x800000 /uImage
^Vbootcmd=run=loadzimage
rootdelay=10
usb_root=LABEL=rootfs
rootfstype=ext3
load_initrd=ext2load usb 0:1 0x2100000 /boot/uInitrd
usb_boot=usb start; run load_uimage; run load_initrd; bootm 0x800000 0x2100000
ipaddr=192.168.1.253
bootargs_root=root=
partition=nand0,0
serverip=192.168.1.6
bootcmd=setenv bootargs ${console} ${mtdparts} ${bootargs_root}; nand read.e 0x800000 0x100000 0x300000; bootm 0x00800000
mtdparts=mtdparts=orion_nand:0x100000@0x000000(u-boot)ro,0x20000@0xA0000(u-boot environment)ro,0x300000@0x100000(kernel),0x1C00000@0x400000(ubi)
stdin=serial
stdout=serial
stderr=serial
mainlineLinux=yes
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
sata_dma_mode=yes
kernel_start=0x100000
initrd_start=0x400000
bootdelay=3
disaMvPnp=no
enaAutoRecovery=yes
pcieTune=no
pcieTune1=no
|
Re: Lenovo IX2 DL August 19, 2021 08:26PM |
Admin Registered: 14 years ago Posts: 19,977 |
setenv <right here (without the brackets >)and hit Enter/Return
printenv
saveenv
|
Re: Lenovo IX2 DL August 19, 2021 09:21PM |
Registered: 7 years ago Posts: 125 |
|
Re: Lenovo IX2 DL August 19, 2021 10:26PM |
Admin Registered: 14 years ago Posts: 19,977 |
"Starting kernel ..."
|
Re: Lenovo IX2 DL August 19, 2021 10:46PM |
Registered: 7 years ago Posts: 125 |
Marvell>>
Marvell>>
Marvell>> reset
__ __ _ _
| \/ | __ _ _ ____ _____| | |
| |\/| |/ _` | '__\ \ / / _ \ | |
| | | | (_| | | \ V / __/ | |
|_| |_|\__,_|_| \_/ \___|_|_|
_ _ ____ _
| | | | | __ ) ___ ___ | |_
| | | |___| _ \ / _ \ / _ \| __|
| |_| |___| |_) | (_) | (_) | |_
\___/ |____/ \___/ \___/ \__| ** ix2-nand ** ** uboot_ver:0.0.8 **
** MARVELL BOARD: DB-88F6282A-BP LE
U-Boot 1.1.4 (Oct 28 2011 - 15:19:29) Marvell version: 3.6.1 - EMC
U-Boot code: 00600000 -> 0067FFF0 BSS: -> 006CFB00
Soc: 88F6282 A1 CPU running @ 1600Mhz L2 running @ 533Mhz
SysClock = 533Mhz , TClock = 200Mhz
DRAM (DDR3) CAS Latency = 7 tRP = 7 tRAS = 20 tRCD=7
DRAM CS[0] base 0x00000000 size 256MB
DRAM Total size 256MB 16bit width
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
NAND:1024 MB
Found ADT7473, program PWM1 ... OK
Flash: 0 kB
Marvell Serial ATA Adapter
Integrated Sata device found
CPU : Marvell Feroceon (Rev 1)
Found kernel at 0x100000
Found initrd at 0x400000
Streaming disabled
Write allocate disabled
USB 0: host mode
PEX 0: interface detected no Link.
PEX 1: interface detected no Link.
Net: egiga0 [PRIME]
Hit any key to stop autoboot: 0
NAND read: device 0 offset 0x100000, size 0x300000
Reading data from 0x3ff800 -- 100% complete.
3145728 bytes read: OK
## Booting image at 00800000 ...
Image Name: ARM OpenWrt Linux-5.4.140
Created: 2021-08-19 5:46:45 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2541588 Bytes = 2.4 MB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
OK
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 5.4.140 (jdwl@minecraftvm) (gcc version 10.3.0 (OpenWrt GCC 10.3.0 r17357-b123f9be1c)) #0 Thu Aug 19 05:46:45 2021
[ 0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005397f
[ 0.000000] CPU: VIVT data cache, VIVT instruction cache
[ 0.000000] OF: fdt: Machine model: Lenovo IX2-dl
[ 0.000000] Memory policy: Data cache writeback
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 64960
[ 0.000000] Kernel command line: console=ttyS0,115200 mtdparts=orion_nand:0x100000@0x000000(u-boot)ro,0x20000@0xA0000(u-boot environment)ro,0x300000@0x100000(kernel),0x1C00000@0x400000(ubi) root=
baudrate=115200
loads_echo=0
rootpath=/srv/ubuntu
netmask=255.255.255.0
run_diag=yes
MALLOC_len=1
ethprime=egiga0
image_name=uImage
ethmtu=1500
usb0Mode=host
yuk_ethaddr=00:00:00:EE:51:81
nandEcc=1bit
netretry=no
rcvrip=169.254.100.100
loadaddr=0x02000000
autoload=no
image_multi=yes
ethact=egiga0
kernel_size=0x300000
console=console=ttyS0,115200
initrdimage=mfginitrd
mfgmodel=ix2
preroot_ver=0.0.2
uboot_ver=0.0.8
serial_number=5563Y01011G33400015J0H1
ethaddr=00:D0:B8:15:62:7F
serialNo=V7AD360054
modelname=70A69003AP
fw_ver=4.0.4.14600d
runintime=10800
ftpserver=192.168.43.4
testfile=100M
mfgtest_state=system_tested_ok
pre_path=IX2/1.0.8/download_runin.sh
pre_path_conf=IX2/1.0.8/download_runin.conf
pre_serverip=192.168.32.4
pre_user=ixxrunin
pre_passwd=123
pre_dirzi=IX2/1.0.8
initrd_size=0x400000
arcNumber=1682
load_uImage=ext2load usb 0:1 0x800000 /uImage
rootdelay=10
usb_root=LABEL=rootfs
rootfstype=ext3
load_initrd=ext2load usb 0:1 0x2100000 /boot/uInitrd
usb_boot=usb start; run load_uimage; run load_initrd; bootm 0x800000 0x2100000
ipaddr=192.168.1.253
bootargs_root=root=
partition=nand0,0
serverip=192.168.1.6
mtdparts=mtdparts=orion_nand:0x100000@0x000000(u-boot)ro,0x20000@0xA0000(u-boot environment)ro,0x300000@0x100000(kernel),0x1C00000@0x400000(ubi)
bootargs_end=:::orion:eth0:none
standalone=fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/mtdblock0 rw ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvPhoneConfig); bootm 0x2000000;
lcd0_enable=0
lcd0_params=640x480-16@60
mvPhoneConfig=mv_phone_config=dev[0]:fxs,dev[1]:fxo
mvNetConfig=mv_net_config=(00:11:88:0f:62:81,0:1:2:3),mtu=1500
stdin=serial
stdout=serial
stderr=serial
mainlineLinux=yes
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
sata_dma_mode=yes
netbsd_en=no
vxworks_en=no
kernel_start=0x100000
initrd_start=0x400000
bootdelay=3
disaMvPnp=no
enaAutoRecovery=yes
pcieTune=no
pcieTune1=no
bootcmd=setenv bootargs ${console} ${mtdparts} ${bootargs_root}; nand read.e 0x800000 0x100000 0x300000; bootm 0x800000
|
Re: Lenovo IX2 DL August 19, 2021 11:17PM |
Registered: 4 years ago Posts: 34 |
|
Re: Lenovo IX2 DL August 19, 2021 11:28PM |
Registered: 7 years ago Posts: 125 |