OpenWrt Forum Archive

Topic: Pogoplug Mobile hardware support and device tree effort

The content of this topic has been archived on 22 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I propose using this topic to gather the information necessary for full kernel/driver support, and then to document any available board-level hacking.

I shall begin:
I use an open case unit with wires soldered on to the UART pads.
I have a logic probe comprised of a test clip, a long cable, an LED and a 100ohm resistor terminated to ground.
I used the following script to pulse the IO pins through the gpio sys interface:

foo=28 ; echo $foo > /sys/class/gpio/export ; echo out >
/sys/class/gpio/gpio$foo/direction; while true ; do echo 1 >
/sys/class/gpio/gpio$foo/value ; sleep 1 ; echo 0 >
/sys/class/gpio/gpio$foo/value ; sleep 1 ; done

I verified that MPP10 and MPP11 are the uart data lines (The GPIO export detached the uart from those lines)
I verified that MPP12-MPP17 are connected to the SD card socket pins.
I verified that MPP27 is connected to the socket's card detect switch (at bottom right)
I learned that MPP28 is connected to the socket's write protect switch, and I was amazed, for the mighty Debian did not know it exists.
MPP29 is the button.

What I DO NOT yet know:
Pin mapping to the bare sATA header.
Pin mapping for the second, unpopulated button.
What this USB power thing is. Our e02 boardfile wants it to be on MPP29. The Debian wants it to be on MPP10.
Do we even NEED it?
Pin mapping to the SPI/JTAG/whatever. Just slipped my mind.

i have an Pogoplug V4 (the one with usb3 and sata) and would love to get support for this as well.

as the pogo mobile and the v4 are the same except for the usb3 and sata, could we add this as well.

any information you need i can give, thou i need some guidance in how to get it.

I'm quite learning this stuff as I go along.

I managed to throw something together, SD socket and the LEDs working. Will shortly be making it presentable. Shiny new boot logs, SD card and USB flash, with the *same* system (copied) on both.

USB:

U-Boot 2014.07-tld-1 (Jul 18 2014 - 00:59:45)
Pogoplug V4

SoC:   Kirkwood 88F6192_A1
DRAM:  128 MiB
WARNING: Caches not enabled
NAND:  128 MiB
MMC:   kwsdio: 0
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
Hit any key to stop autoboot: 10  9  8  7  6  5  4  3  2  1  0 
(Re)start USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
1783809 bytes read in 378 ms (4.5 MiB/s)
** File not found /boot/uInitrd **
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   ARM OpenWrt Linux-3.14.18
   Created:      2014-09-23   1:56:33 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1783745 Bytes = 1.7 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
Using machid 0xf78 from environment

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 3.14.18 (beata@nutria) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 r42162) ) #9 Mon Sep 22 18:55:46 PDT 2014
[    0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053977
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] Machine model: Cloud Engines Pogoplug Mobile
[    0.000000] Memory policy: Data cache writeback
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: console=ttyS0,115200 root=/dev/sda1 rootdelay=10 rootfstype=ext3 mtdparts=orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafe),112M(root)
[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Memory: 124696K/131072K available (3614K kernel code, 168K rwdata, 1024K rodata, 144K init, 189K bss, 6376K reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     vmalloc : 0xc8800000 - 0xff000000   ( 872 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc8000000   ( 128 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc048fd6c   (4640 kB)
[    0.000000]       .init : 0xc0490000 - 0xc04b4384   ( 145 kB)
[    0.000000]       .data : 0xc04b6000 - 0xc04e009c   ( 169 kB)
[    0.000000]        .bss : 0xc04e009c - 0xc050f5bc   ( 190 kB)
[    0.000000] NR_IRQS:114
[    0.000024] sched_clock: 32 bits at 166MHz, resolution 6ns, wraps every 25769803770ns
[    0.000214] Calibrating delay loop... 795.44 BogoMIPS (lpj=3977216)
[    0.040128] pid_max: default: 32768 minimum: 301
[    0.040313] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.040341] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.043339] CPU: Testing write buffer coherency: ok
[    0.043817] Setting up static identity map for 0x12788 - 0x127c4
[    0.046738] pinctrl core: initialized pinctrl subsystem
[    0.048396] regulator-dummy: no parameters
[    0.049189] NET: Registered protocol family 16
[    0.049802] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.054163] cpuidle: using governor ladder
[    0.054192] cpuidle: using governor menu
[    0.054300] Kirkwood: MV88F6281-A1.
[    0.054507] Feroceon L2: Enabling L2
[    0.054560] Feroceon L2: Cache support initialised.
[    0.055341] [Firmware Info]: /ocp@f1000000/ethernet-controller@72000/ethernet0-port@0: local-mac-address is not set
[    0.079744] bio: create slab <bio-0> at 0
[    0.081610] SCSI subsystem initialized
[    0.083371] usbcore: registered new interface driver usbfs
[    0.083613] usbcore: registered new interface driver hub
[    0.083859] usbcore: registered new device driver usb
[    0.086450] Switched to clocksource orion_clocksource
[    0.089837] NET: Registered protocol family 2
[    0.091058] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.091092] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.091120] TCP: Hash tables configured (established 1024 bind 1024)
[    0.091200] TCP: reno registered
[    0.091221] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.091251] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.091491] NET: Registered protocol family 1
[    0.093688] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.094433] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.094450] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.094761] msgmni has been set to 243
[    0.095260] io scheduler noop registered
[    0.095274] io scheduler deadline registered (default)
[    0.096891] kirkwood-pinctrl f1010000.pinctrl: unknown pinctrl group 36
[    0.096913] kirkwood-pinctrl f1010000.pinctrl: unknown pinctrl group 37
[    0.096928] kirkwood-pinctrl f1010000.pinctrl: unknown pinctrl group 38
[    0.096943] kirkwood-pinctrl f1010000.pinctrl: unknown pinctrl group 39
[    0.096957] kirkwood-pinctrl f1010000.pinctrl: unknown pinctrl group 40
[    0.096972] kirkwood-pinctrl f1010000.pinctrl: unknown pinctrl group 41
[    0.096987] kirkwood-pinctrl f1010000.pinctrl: unknown pinctrl group 42
[    0.097001] kirkwood-pinctrl f1010000.pinctrl: unknown pinctrl group 43
[    0.097016] kirkwood-pinctrl f1010000.pinctrl: unknown pinctrl group 44
[    0.097030] kirkwood-pinctrl f1010000.pinctrl: unknown pinctrl group 45
[    0.097045] kirkwood-pinctrl f1010000.p[    2.136481] rtc-mv f1010300.rtc: internal RTC not ticking
[    2.143747] orion_wdt: Initial timeout 25 sec
[    2.149934] mvsdio f1090000.mvsdio: Got CD GPIO #27.
[    2.154931] mvsdio f1090000.mvsdio: Got WP GPIO #28.
[    2.196484] mvsdio f1090000.mvsdio: using GPIO for card detection
[    2.207526] ledtrig-cpu: registered to indicate activity on CPUs
[    2.213874] TCP: cubic registered
[    2.217227] mvsdio f1090000.mvsdio: unhandled interrupt status=0x8810 en=0x0000 pio=0
[    2.225046] NET: Registered protocol family 17
[    2.229500] mvsdio f1090000.mvsdio: unhandled interrupt status=0x0810 en=0x0000 pio=0
[    2.237427] Bridge firewalling registered
[    2.244723] 8021q: 802.1Q VLAN Support v1.8
[    2.248934] mvsdio f1090000.mvsdio: unhandled interrupt status=0x8810 en=0x0000 pio=0
[    2.258554] regulator-dummy: disabling
[    2.263813] input: gpio-keys.2 as /devices/gpio-keys.2/input/input0
[    2.270672] drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
[    2.278304] Waiting 10 sec before mounting root device...
[    2.321062] mmc0: new SD card at address e624
[    2.326051] mmcblk0: mmc0:e624 SD512 483 MiB 
[    2.332038]  mmcblk0: p1
[    2.597942] scsi 0:0:0:0: Direct-Access     SanDisk  Cruzer Facet     1.26 PQ: 0 ANSI: 5
[    2.608481] sd 0:0:0:0: [sda] 15633408 512-byte logical blocks: (8.00 GB/7.45 GiB)
[    2.617460] sd 0:0:0:0: [sda] Write Protect is off
[    2.622963] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[    2.637526]  sda: sda1
[    2.643088] sd 0:0:0:0: [sda] Attached SCSI removable disk
[   12.286615] UBIFS error (pid 1): ubifs_mount: cannot open "ubi0:rootfs", error -19
[   12.295476] EXT4-fs (sda1): mounting ext3 file system using the ext4 subsystem
[   12.304320] EXT4-fs (sda1): INFO: recovery required on readonly filesystem
[   12.311203] EXT4-fs (sda1): write access will be enabled during recovery
[   12.345598] EXT4-fs (sda1): recovery complete
[   12.353086] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
[   12.360782] VFS: Mounted root (ext3 filesystem) readonly on device 8:1.
[   12.368056] Freeing unused kernel memory: 144K (c0490000 - c04b4000)
procd: Console is alive
procd: - watchdog -
[   12.627049] sdhci: Secure Digital Host Controller Interface driver
[   12.633207] sdhci: Copyright(c) Pierre Ossman
[   12.638561] sdhci-pltfm: SDHCI platform and OF driver helper
procd: - preinit -
[   12.703322] random: mktemp urandom read with 40 bits of entropy available
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
mounting /dev/root
[   15.797252] EXT4-fs (sda1): re-mounted. Opts: (null)
procd: - early -
procd: - watchdog -
procd: - ubus -
procd: - init -
Please press Enter to activate this console.
[   17.064890] NET: Registered protocol family 10
[   17.075475] Key type dns_resolver registered
[   17.097069] RPC: Registered named UNIX socket transport module.
[   17.103008] RPC: Registered udp transport module.
[   17.107716] RPC: Registered tcp transport module.
[   17.112401] RPC: Registered tcp NFSv4.1 backchannel transport module.
[   17.138494] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[   17.149112] cryptodev: driver 1.6 loaded.
[   17.160494] usbcore: registered new interface driver i2c-tiny-usb
[   17.172929] hidraw: raw HID events driver (C) Jiri Kosina
[   17.184680] fuse init (API version 7.22)
[   19.158639] random: nonblocking pool is initialized
[   19.509156] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   21.267702] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 100 Mb/s, full duplex, flow control disabled
[   21.277479] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready



BusyBox v1.22.1 (2014-09-22 02:34:23 PDT) built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 CHAOS CALMER (14.07-rc2, r42642)
 -----------------------------------------------------
  * 1 1/2 oz Gin            Shake with a glassful
  * 1/4 oz Triple Sec       of broken ice and pour
  * 3/4 oz Lime Juice       unstrained into a goblet.
  * 1 1/2 oz Orange Juice
  * 1 tsp. Grenadine Syrup
 -----------------------------------------------------
root@OpenWrt:/# 

SD:

U-Boot 2014.07-tld-1 (Jul 18 2014 - 00:59:45)
Pogoplug V4

SoC:   Kirkwood 88F6192_A1
DRAM:  128 MiB
WARNING: Caches not enabled
NAND:  128 MiB
MMC:   kwsdio: 0
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
Hit any key to stop autoboot: 10  9  8  7  6  5  4  3  2  1  0 
(Re)start USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
** Bad device usb 0 **
** Bad device usb 0 **
Wrong Image Format for bootm command
ERROR: can't get kernel image!

MMC rescan: current device # 0 initialized OK
1783809 bytes read in 1290 ms (1.3 MiB/s)
** File not found /boot/uInitrd **
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   ARM OpenWrt Linux-3.14.18
   Created:      2014-09-23   1:56:33 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1783745 Bytes = 1.7 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
Using machid 0xf78 from environment

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 3.14.18 (beata@nutria) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 r42162) ) #9 Mon Sep 22 18:55:46 PDT 2014
[    0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053977
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] Machine model: Cloud Engines Pogoplug Mobile
[    0.000000] Memory policy: Data cache writeback
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: console=ttyS0,115200 root=/dev/mmcblk0p1 rootdelay=10 rootfstype=ext3 mtdparts=orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafe),112M(root)
[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Memory: 124696K/131072K available (3614K kernel code, 168K rwdata, 1024K rodata, 144K init, 189K bss, 6376K reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     vmalloc : 0xc8800000 - 0xff000000   ( 872 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc8000000   ( 128 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc048fd6c   (4640 kB)
[    0.000000]       .init : 0xc0490000 - 0xc04b4384   ( 145 kB)
[    0.000000]       .data : 0xc04b6000 - 0xc04e009c   ( 169 kB)
[    0.000000]        .bss : 0xc04e009c - 0xc050f5bc   ( 190 kB)
[    0.000000] NR_IRQS:114
[    0.000025] sched_clock: 32 bits at 166MHz, resolution 6ns, wraps every 25769803770ns
[    0.000212] Calibrating delay loop... 795.44 BogoMIPS (lpj=3977216)
[    0.040132] pid_max: default: 32768 minimum: 301
[    0.040321] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.040349] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.043328] CPU: Testing write buffer coherency: ok
[    0.043808] Setting up static identity map for 0x12788 - 0x127c4
[    0.046724] pinctrl core: initialized pinctrl subsystem
[    0.048382] regulator-dummy: no parameters
[    0.049182] NET: Registered protocol family 16
[    0.049797] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.054160] cpuidle: using governor ladder
[    0.054187] cpuidle: using governor menu
[    0.054295] Kirkwood: MV88F6281-A1.
[    0.054503] Feroceon L2: Enabling L2
[    0.054556] Feroceon L2: Cache support initialised.
[    0.055338] [Firmware Info]: /ocp@f1000000/ethernet-controller@72000/ethernet0-port@0: local-mac-address is not set
[    0.079728] bio: create slab <bio-0> at 0
[    0.081601] SCSI subsystem initialized
[    0.083356] usbcore: registered new interface driver usbfs
[    0.083597] usbcore: registered new interface driver hub
[    0.083842] usbcore: registered new device driver usb
[    0.086427] Switched to clocksource orion_clocksource
[    0.089810] NET: Registered protocol family 2
[    0.091031] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.091065] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.091094] TCP: Hash tables configured (established 1024 bind 1024)
[    0.091174] TCP: reno registered
[    0.091194] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.091225] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.091461] NET: Registered protocol family 1
[    0.093655] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.094400] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.094417] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.094726] msgmni has been set to 243
[    0.095225] io scheduler noop registered
[    0.095240] io scheduler deadline registered (default)
[    0.096866] kirkwood-pinctrl f1010000.pinctrl: unknown pinctrl group 36
[    0.096888] kirkwood-pinctrl f1010000.pinctrl: unknown pinctrl group 37
[    0.096904] kirkwood-pinctrl f1010000.pinctrl: unknown pinctrl group 38
[    0.096918] kirkwood-pinctrl f1010000.pinctrl: unknown pinctrl group 39
[    0.096933] kirkwood-pinctrl f1010000.pinctrl: unknown pinctrl group 40
[    0.096948] kirkwood-pinctrl f1010000.pinctrl: unknown pinctrl group 41
[    0.096962] kirkwood-pinctrl f1010000.pinctrl: unknown pinctrl group 42
[    0.096976] kirkwood-pinctrl f1010000.pinctrl: unknown pinctrl group 43
[    0.096991] kirkwood-pinctrl f1010000.pinctrl: unknown pinc[    2.136456] rtc-mv f1010300.rtc: internal RTC not ticking
[    2.143717] orion_wdt: Initial timeout 25 sec
[    2.149918] mvsdio f1090000.mvsdio: Got CD GPIO #27.
[    2.154911] mvsdio f1090000.mvsdio: Got WP GPIO #28.
[    2.196461] mvsdio f1090000.mvsdio: using GPIO for card detection
[    2.207498] ledtrig-cpu: registered to indicate activity on CPUs
[    2.213846] TCP: cubic registered
[    2.217199] mvsdio f1090000.mvsdio: unhandled interrupt status=0x8810 en=0x0000 pio=0
[    2.225018] NET: Registered protocol family 17
[    2.229472] mvsdio f1090000.mvsdio: unhandled interrupt status=0x0810 en=0x0000 pio=0
[    2.237403] Bridge firewalling registered
[    2.244689] 8021q: 802.1Q VLAN Support v1.8
[    2.248898] mvsdio f1090000.mvsdio: unhandled interrupt status=0x8810 en=0x0000 pio=0
[    2.258507] regulator-dummy: disabling
[    2.263775] input: gpio-keys.2 as /devices/gpio-keys.2/input/input0
[    2.270628] drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
[    2.278340] Waiting 10 sec before mounting root device...
[    2.286726] mmc0: new SD card at address e624
[    2.291705] mmcblk0: mmc0:e624 SD512 483 MiB 
[    2.297717]  mmcblk0: p1
[    2.598424] scsi 0:0:0:0: Direct-Access     SanDisk  Cruzer Facet     1.26 PQ: 0 ANSI: 5
[    2.609334] sd 0:0:0:0: [sda] 15633408 512-byte logical blocks: (8.00 GB/7.45 GiB)
[    2.618318] sd 0:0:0:0: [sda] Write Protect is off
[    2.623818] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[    2.643508]  sda: sda1
[    2.649320] sd 0:0:0:0: [sda] Attached SCSI removable disk
[   12.286599] UBIFS error (pid 1): ubifs_mount: cannot open "ubi0:rootfs", error -19
[   12.294970] EXT4-fs (mmcblk0p1): mounting ext3 file system using the ext4 subsystem
[   12.325147] EXT4-fs (mmcblk0p1): mounted filesystem with ordered data mode. Opts: (null)
[   12.333300] VFS: Mounted root (ext3 filesystem) readonly on device 179:1.
[   12.340714] Freeing unused kernel memory: 144K (c0490000 - c04b4000)
procd: Console is alive
procd: - watchdog -
[   12.923389] sdhci: Secure Digital Host Controller Interface driver
[   12.929598] sdhci: Copyright(c) Pierre Ossman
[   12.934908] sdhci-pltfm: SDHCI platform and OF driver helper
procd: - preinit -
[   13.032879] random: mktemp urandom read with 42 bits of entropy available
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
mounting /dev/root
[   15.168816] EXT4-fs (mmcblk0p1): re-mounted. Opts: (null)
procd: - early -
procd: - watchdog -
procd: - ubus -
procd: - init -
Please press Enter to activate this console.
[   16.465781] NET: Registered protocol family 10
[   16.475519] Key type dns_resolver registered
[   16.499327] RPC: Registered named UNIX socket transport module.
[   16.505233] RPC: Registered udp transport module.
[   16.509955] RPC: Registered tcp transport module.
[   16.514641] RPC: Registered tcp NFSv4.1 backchannel transport module.
[   16.539572] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[   16.549744] cryptodev: driver 1.6 loaded.
[   16.560192] usbcore: registered new interface driver i2c-tiny-usb
[   16.572193] hidraw: raw HID events driver (C) Jiri Kosina
[   16.583190] fuse init (API version 7.22)
[   18.679268] random: nonblocking pool is initialized
[   18.999099] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   20.738055] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 100 Mb/s, full duplex, flow control disabled
[   20.747966] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   21.657962] EXT4-fs (sda1): mounting ext3 file system using the ext4 subsystem
[   21.684903] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)



BusyBox v1.22.1 (2014-09-22 02:34:23 PDT) built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 CHAOS CALMER (14.07-rc2, r42642)
 -----------------------------------------------------
  * 1 1/2 oz Gin            Shake with a glassful
  * 1/4 oz Triple Sec       of broken ice and pour
  * 3/4 oz Lime Juice       unstrained into a goblet.
  * 1 1/2 oz Orange Juice
  * 1 tsp. Grenadine Syrup
 -----------------------------------------------------
root@OpenWrt:/# 

I'm unable to get a serial console once the kernel has loaded (tried using pre-built trunk snapshot and a home-built trunk build). I've tried changing the console from ttyS0 to ttyS1 thinking it could be getting renamed but thus far I've had no success. Networking doesn't seem to be alive on the device booting these kernels so I really need to get the serial console running to figure out what's going on. This is a serial (not netconsole) console--

Environment size: 2461/131068 bytes
Pogov4> boot
** Bad device mmc 0 **
** Bad device mmc 0 **
Wrong Image Format for bootm command
ERROR: can't get kernel image!
(Re)start USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
1650364 bytes read in 350 ms (4.5 MiB/s)
** File not found /boot/uInitrd **
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   ARM OpenWrt Linux-3.14.18
   Created:      2014-09-27  17:02:36 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1650300 Bytes = 1.6 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
Using machid 0xf78 from environment

Starting kernel ...

Uncompressing Linux... done, booting the kernel.

(Last edited by bsdfox on 27 Sep 2014, 22:37)

I was able to solve this by including the initramfs option in the kernel then copying the openwrt-kirkwood-pogoe02-uImage-initramfs binary to /boot/uImage on my boot device. I'm not sure why this solves it but it does. The next problem people seem to be facing is automatically mounting extroot devices. I've got block-mount built into my image and my /etc/config/fstab contains this:

config 'global'
        option  anon_swap       '0'
        option  anon_mount      '0'
        option  auto_swap       '1'
        option  auto_mount      '1'
        option  delay_root      '5'
        option  check_fs        '0'

config 'mount'
        option  target  '/'
        option  uuid    '22095557-1a0b-4310-b9bd-1b606b3fed04'
        option  enabled '1'

config 'swap'
        option  uuid    '4c38b24f-47b2-4770-bcaf-e5b52f8d3cce'
        option  enabled '1'

config 'mount'
        option  target  '/overlay'
        option  uuid    '193f6f95-2280-464c-95e2-e52fb8f109e8'
        option  enabled '1'

but no devices are mounted on boot. There seems to be a current issue with similar problems as described here: https://forum.openwrt.org/viewtopic.php … 39&p=9

If anyone has any information on resolving this issue I think I'll have a functional machine I can start doing some hardware hacking on. BTW it does appear some GPIOs are usable and I will try to identify them once my system reboots properly.

edit: I added a section on GPIOs to the wiki page at http://wiki.openwrt.org/toh/cloudengines/pogo-v4

(Last edited by bsdfox on 28 Sep 2014, 05:17)

Current working device tree. I have yet to suss out the correct way of making a patch. sad
Currently I overwrite  kirkwood-pogo_e02.dts with this and rebuild.

/dts-v1/;

#include "kirkwood.dtsi"
#include "kirkwood-6192.dtsi"
/* kirkwood 6192 */
/ {
        model = "Cloud Engines Pogoplug Mobile";
        compatible = "cloudengines,pogov4a1", "marvell,kirkwood-88f6192", "marvell,kirkwood";

        memory {
                device_type = "memory";
                reg = <0x00000000 0x10000000>;
        };

        chosen {
                bootargs = "console=ttyS0,115200n8 earlyprintk";
        };

        ocp@f1000000 {
                pinctrl: pinctrl@10000 {
/*                      pmx_usb_power_enable: pmx-usb-power-enable {
                                marvell,pins = "mpp9";
                                marvell,function = "gpio";
                        }; */
                        pmx_led_green: pmx-led_green {
                                marvell,pins = "mpp22";
                                marvell,function = "gpio";
                        };
                        pmx_led_red: pmx-led_red {
                                marvell,pins = "mpp24";
                                marvell,function = "gpio";
                        };
                        pmx_sdio_cd: pmx_sdio_cd {
                                marvell,pins = "mpp27";
                                marvell,function = "gpio";
                        };
                        pmx_sdio_wp: pmx_sdio_wp {
                                marvell,pins = "mpp28";
                                marvell,function = "gpio";
                        };
                        pmx_eject_button: pmx_eject_button {
                                marvell,pins = "mpp29";
                                marvell,function = "gpio";
                        };
                };
                serial@12000 {
                        status = "ok";
                };
                mvsdio@90000 {
                        pinctrl-0 = <&pmx_sdio &pmx_sdio_cd &pmx_sdio_wp>;
                        pinctrl-names = "default";
                        cd-gpios = <&gpio0 27 1>;
                        wp-gpios = <&gpio0 28 0>;
                        status = "okay";
                };

        };
        gpio-keys {
                compatible = "gpio-keys";
                #address-cells = <1>;
                #size-cells = <0>;
                pinctrl-0 = <&pmx_eject_button>;
                pinctrl-names = "default";

                button@1 {
                        label = "Eject button";
                        linux,code = <KEY_EJECTCD>;
                        gpios = <&gpio0 29 GPIO_ACTIVE_LOW>;
                };
        };
        gpio-leds {
                compatible = "gpio-leds";
                pinctrl-0 = < &pmx_led_red &pmx_led_green >;
/*              pinctrl-0 = < &pmx_usb_power_enable &pmx_led_red
                              &pmx_led_green >; */
                pinctrl-names = "default";

                health {
                        label = "status:green:health";
                        gpios = <&gpio0 22 GPIO_ACTIVE_LOW>;
                        default-state = "keep";
                };
                fault {
                        label = "status:red:fault";
                        gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
                };
        };
/*      regulators {
                compatible = "simple-bus";
                #address-cells = <1>;
                #size-cells = <0>;
                pinctrl-0 = <&pmx_usb_power_enable>;
                pinctrl-names = "default";

                usb_power: regulator@1 {
                        compatible = "regulator-fixed";
                        reg = <1>;
                        regulator-name = "USB Power";
                        regulator-min-microvolt = <5000000>;
                        regulator-max-microvolt = <5000000>;
                        enable-active-high;
                        regulator-always-on;
                        regulator-boot-on;
                        gpio = <&gpio0 9 GPIO_ACTIVE_HIGH>;
                };
        }; */
};

&nand {
        chip-delay = <40>;
        status = "okay";

/*      partition@0 {
                label = "u-boot";
                reg = <0x0000000 0x100000>;
                read-only;
        };

        partition@100000 {
                label = "uImage";
                reg = <0x0100000 0x400000>;
        };

        partition@500000 {
                label = "pogoplug";
                reg = <0x0500000 0x2000000>;
        };

        partition@2500000 {
                label = "root";
                reg = <0x02500000 0x5b00000>;
        }; */
};

&mdio {
        status = "okay";

        ethphy0: ethernet-phy@0 {
                reg = <0>;
        };
};

&eth0 {
        status = "okay";
        ethernet0-port@0 {
                phy-handle = <&ethphy0>;
        };
};

I believe MPP10 might be used for a 5v regulator for USB 3 on the pogoplugv4 A3-01

Here is someone else asking the same question
http://archlinuxarm.org/forum/viewtopic … amp;t=6974
I had also tried to clean up that DTB but I abandoned it after a while, it did boot but i didn't test how much worked

/*
 * kirkwood-pogoplugv4.dts - Device tree file for Pogoplug v4
 *
 * Copyright (C) 2014 Andrew Innes <andrew.c12@gmail.com>
 *
 * Licensed under GPLv2
 */
 
/dts-v1/;

#include "kirkwood.dtsi"
#include "kirkwood-6192.dtsi"

/ {
    model = "Pogoplug v4";
    compatible = "cloudengines,pogoplug-v4", "cloudengines,pogoplug-mobile", "marvell,kirkwood-88f6192", "marvell,kirkwood";

    memory {
        device_type = "memory";
        reg = <0x00000000 0x8000000>;
    };


    chosen {
        bootargs = "console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p1 rootdelay=10";
    };

    mbus {
        pcie-controller {
            status = "okay";

            pcie@1,0 {
                status = "okay";
            };
        };
    };

    ocp@f1000000 {
        pinctrl: pin-controller@10000 {
                        pmx_usb_power: pmx-usb-power {
                /* mpp10 is uart0 TXD. Regulator therefore doesn't seem to work correctly */
                                marvell,pins = "mpp10";
                                marvell,function = "gpo";
                        };
            pmx_led_green: pmx-led-green {
                marvell,pins = "mpp22";
                marvell,function = "gpio";
            };
            pmx_led_red: pmx-led-red {
                marvell,pins = "mpp24";
                marvell,function = "gpio";
            };
            pmx_button_eject: pmx-button-eject {
                marvell,pins = "mpp29";
                marvell,function = "gpio";
            };
        };
                
        spi@10600 {
            status = "okay";

            m25p05@0 {
                #address-cells = <1>;
                #size-cells = <1>;
                compatible = "m25p05-nonjedec";
                reg = <0>;
                spi-max-frequency = <20000000>;
                mode = <0>;
            };
        };



        sata@80000 {
            status = "okay";
            nr-ports = <1>;
        };

        mvsdio@90000 {
            pinctrl-0 = <&pmx_sdio>;
            pinctrl-names = "default";
            status = "okay";
            cd-gpios = <&gpio0 27 0>;
            /* No WP GPIO */
        };
    };

    gpio-leds {
        compatible = "gpio-leds";
        pinctrl-names = "default";
        pinctrl-0 = <&pmx_led_red &pmx_led_green>;
        
        health {
            label = "status:green:health";
            gpios = <&gpio0 22 1>;
            linux,default-trigger = "default-on";
        };
        fault {
            label = "status:red:fault";
            gpios = <&gpio0 24 1>;
            linux,default-trigger = "none";
        };
    };

    gpio_keys {
        compatible = "gpio-keys";
        #address-cells = <1>;
        #size-cells = <0>;
        pinctrl-0 = <&pmx_button_eject>;
        pinctrl-names = "default";
        
        button@1 {
            label = "Eject Button";
            linux,code = <161>; /* EJECTCD */
            gpios = <&gpio0 29 1>;
        };
    };

    regulators {
                compatible = "simple-bus";
                #address-cells = <1>;
                #size-cells = <0>;
                pinctrl-0 = <&pmx_usb_power>;
                pinctrl-names = "default";

                usb_power: regulator@1 {
                        /* This renders UART0 unusable */
                        compatible = "regulator-fixed";
                        reg = <1>;
                        regulator-name = "USB Power";
                        regulator-min-microvolt = <5000000>;
                        regulator-max-microvolt = <5000000>;
                        enable-active-high;
                        regulator-always-on;
                        regulator-boot-on;
                        gpio = <&gpio0 10 0>;
                };
    };
};

&nand {
    status = "okay";

    partition@0 {
        label = "u-boot";
        reg = <0x0000000 0x200000>;
        read-only;
    };

    partition@200000 {
        label = "uImage";
        reg = <0x200000 0x300000>;
    };

    partition@500000 {
        label = "uImage2";
        reg = <0x500000 0x300000>;
    };

    partition@800000 {
        label = "failsafe";
        reg = <0x800000 0x800000>;
    };
    
    partition@1000000 {
        label = "root";
        reg = <0x1000000 0x7000000>;
    };
};

&mdio {
        status = "okay";

     ethphy0: ethernet-phy@0 {
         device_type = "ethernet-phy";
         reg = <0>;
        };
};

&eth0 {
        status = "okay";
        ethernet0-port@0 {
                phy-handle = <&ethphy0>;
        };
};

(Last edited by andrew.c12 on 1 Oct 2014, 08:16)

I have just discovered that BB doesn't build with the dts I wrote for trunk, and that I don't understand it quite well enough to determine why. Am currently attempting to port it, again using the e02's dts as a template.

beata,

I've been doing some work on this as well. I've copied over the dts folder from mainline 3.16 and modified the kirkwood-pogo_e02.dts for our uses. I've disabled the nand (I'm booting from usb, so nand is only used for uboot) and sdio and enabled spi0 and uart1. I haven't elaborated on the setup yet but I've got the pins documented on the wiki so anyone motivated should be able to replicate my work.  I've also located MPP8 and MPP9 and enabled i2c-0 on these two pins. They're located on the back side of the device and have unpopulated pads and populated pullup resistors so it's a very easy access point, I'll take some pictures when I get time.

Anyway, here are my current device trees. I also had to delete the other kirkwood*.dts files because they were referencing the old kirkwood.dtsi.

kirkwood.dtsi

/include/ "skeleton.dtsi"
#include <dt-bindings/input/input.h>
#include <dt-bindings/gpio/gpio.h>

#define MBUS_ID(target,attributes) (((target) << 24) | ((attributes) << 16))

/ {
    compatible = "marvell,kirkwood";
    interrupt-parent = <&intc>;

    cpus {
        #address-cells = <1>;
        #size-cells = <0>;

        cpu@0 {
            device_type = "cpu";
            compatible = "marvell,feroceon";
            reg = <0>;
            clocks = <&core_clk 1>, <&core_clk 3>, <&gate_clk 11>;
            clock-names = "cpu_clk", "ddrclk", "powersave";
        };
    };

    aliases {
           gpio0 = &gpio0;
           gpio1 = &gpio1;
           i2c0 = &i2c0;
    };

    mbus {
        compatible = "marvell,kirkwood-mbus", "simple-bus";
        #address-cells = <2>;
        #size-cells = <1>;
        /* If a board file needs to change this ranges it must replace it completely */
        ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000    /* internal-regs */
              MBUS_ID(0x01, 0x2f) 0 0xf4000000 0x10000    /* nand flash */
              MBUS_ID(0x03, 0x01) 0 0xf5000000 0x10000    /* crypto sram */
              >;
        controller = <&mbusc>;
        pcie-mem-aperture = <0xe0000000 0x10000000>; /* 256 MiB memory space */
        pcie-io-aperture  = <0xf2000000 0x100000>;   /*   1 MiB    I/O space */

        cesa: crypto@0301 {
            compatible = "marvell,orion-crypto";
            reg = <MBUS_ID(0xf0, 0x01) 0x30000 0x10000>,
                  <MBUS_ID(0x03, 0x01) 0 0x800>;
            reg-names = "regs", "sram";
            interrupts = <22>;
            clocks = <&gate_clk 17>;
            status = "okay";
        };

        nand: nand@012f {
            #address-cells = <1>;
            #size-cells = <1>;
            cle = <0>;
            ale = <1>;
            bank-width = <1>;
            compatible = "marvell,orion-nand";
            reg = <MBUS_ID(0x01, 0x2f) 0 0x400>;
            chip-delay = <25>;
            /* set partition map and/or chip-delay in board dts */
            clocks = <&gate_clk 7>;
            pinctrl-0 = <&pmx_nand>;
            pinctrl-names = "default";
            status = "disabled";
        };
    };

    ocp@f1000000 {
        compatible = "simple-bus";
        ranges = <0x00000000 0xf1000000 0x0100000>;
        #address-cells = <1>;
        #size-cells = <1>;

        pinctrl: pin-controller@10000 {
            /* set compatible property in SoC file */
            reg = <0x10000 0x20>;

            pmx_ge1: pmx-ge1 {
                marvell,pins = "mpp20", "mpp21", "mpp22", "mpp23",
                           "mpp24", "mpp25", "mpp26", "mpp27",
                           "mpp30", "mpp31", "mpp32", "mpp33";
                marvell,function = "ge1";
            };

            pmx_nand: pmx-nand {
                marvell,pins = "mpp0", "mpp1", "mpp2", "mpp3",
                           "mpp4", "mpp5", "mpp18", "mpp19";
                marvell,function = "nand";
            };

            /*
             * Default SPI0 pinctrl setting with CSn on mpp0,
             * overwrite marvell,pins on board level if required.
             */
            pmx_spi: pmx-spi {
                marvell,pins = "mpp0", "mpp1", "mpp2", "mpp3";
                marvell,function = "spi";
            };

            pmx_twsi0: pmx-twsi0 {
                marvell,pins = "mpp8", "mpp9";
                marvell,function = "twsi0";
            };

            /*
             * Default UART pinctrl setting without RTS/CTS,
             * overwrite marvell,pins on board level if required.
             */
            pmx_uart0: pmx-uart0 {
                marvell,pins = "mpp10", "mpp11";
                marvell,function = "uart0";
            };

            pmx_uart1: pmx-uart1 {
                marvell,pins = "mpp13", "mpp14";
                marvell,function = "uart1";
            };
        };

        core_clk: core-clocks@10030 {
            compatible = "marvell,kirkwood-core-clock";
            reg = <0x10030 0x4>;
            #clock-cells = <1>;
        };

        spi0: spi@10600 {
            compatible = "marvell,orion-spi";
            #address-cells = <1>;
            #size-cells = <0>;
            cell-index = <0>;
            interrupts = <23>;
            reg = <0x10600 0x28>;
            clocks = <&gate_clk 7>;
            pinctrl-0 = <&pmx_spi>;
            pinctrl-names = "default";
            status = "disabled";
        };

        gpio0: gpio@10100 {
            compatible = "marvell,orion-gpio";
            #gpio-cells = <2>;
            gpio-controller;
            reg = <0x10100 0x40>;
            ngpios = <32>;
            interrupt-controller;
            #interrupt-cells = <2>;
            interrupts = <35>, <36>, <37>, <38>;
            clocks = <&gate_clk 7>;
        };

        gpio1: gpio@10140 {
            compatible = "marvell,orion-gpio";
            #gpio-cells = <2>;
            gpio-controller;
            reg = <0x10140 0x40>;
            ngpios = <18>;
            interrupt-controller;
            #interrupt-cells = <2>;
            interrupts = <39>, <40>, <41>;
            clocks = <&gate_clk 7>;
        };

        i2c0: i2c@11000 {
            compatible = "marvell,mv64xxx-i2c";
            reg = <0x11000 0x20>;
            #address-cells = <1>;
            #size-cells = <0>;
            interrupts = <29>;
            clock-frequency = <100000>;
            clocks = <&gate_clk 7>;
            pinctrl-0 = <&pmx_twsi0>;
            pinctrl-names = "default";
            status = "disabled";
        };

        uart0: serial@12000 {
            compatible = "ns16550a";
            reg = <0x12000 0x100>;
            reg-shift = <2>;
            interrupts = <33>;
            clocks = <&gate_clk 7>;
            pinctrl-0 = <&pmx_uart0>;
            pinctrl-names = "default";
            status = "disabled";
        };

        uart1: serial@12100 {
            compatible = "ns16550a";
            reg = <0x12100 0x100>;
            reg-shift = <2>;
            interrupts = <34>;
            clocks = <&gate_clk 7>;
            pinctrl-0 = <&pmx_uart1>;
            pinctrl-names = "default";
            status = "disabled";
        };

        mbusc: mbus-controller@20000 {
            compatible = "marvell,mbus-controller";
            reg = <0x20000 0x80>, <0x1500 0x20>;
        };

        sysc: system-controller@20000 {
            compatible = "marvell,orion-system-controller";
            reg = <0x20000 0x120>;
        };

        bridge_intc: bridge-interrupt-ctrl@20110 {
            compatible = "marvell,orion-bridge-intc";
            interrupt-controller;
            #interrupt-cells = <1>;
            reg = <0x20110 0x8>;
            interrupts = <1>;
            marvell,#interrupts = <6>;
        };

        gate_clk: clock-gating-control@2011c {
            compatible = "marvell,kirkwood-gating-clock";
            reg = <0x2011c 0x4>;
            clocks = <&core_clk 0>;
            #clock-cells = <1>;
        };

        l2: l2-cache@20128 {
            compatible = "marvell,kirkwood-cache";
            reg = <0x20128 0x4>;
        };

        intc: main-interrupt-ctrl@20200 {
            compatible = "marvell,orion-intc";
            interrupt-controller;
            #interrupt-cells = <1>;
            reg = <0x20200 0x10>, <0x20210 0x10>;
        };

        timer: timer@20300 {
            compatible = "marvell,orion-timer";
            reg = <0x20300 0x20>;
            interrupt-parent = <&bridge_intc>;
            interrupts = <1>, <2>;
            clocks = <&core_clk 0>;
        };

        wdt: watchdog-timer@20300 {
            compatible = "marvell,orion-wdt";
            reg = <0x20300 0x28>, <0x20108 0x4>;
            interrupt-parent = <&bridge_intc>;
            interrupts = <3>;
            clocks = <&gate_clk 7>;
            status = "okay";
        };

        usb0: ehci@50000 {
            compatible = "marvell,orion-ehci";
            reg = <0x50000 0x1000>;
            interrupts = <19>;
            clocks = <&gate_clk 3>;
            status = "okay";
        };

        dma0: xor@60800 {
            compatible = "marvell,orion-xor";
            reg = <0x60800 0x100
                   0x60A00 0x100>;
            status = "okay";
            clocks = <&gate_clk 8>;

            xor00 {
                  interrupts = <5>;
                  dmacap,memcpy;
                  dmacap,xor;
            };
            xor01 {
                  interrupts = <6>;
                  dmacap,memcpy;
                  dmacap,xor;
                  dmacap,memset;
            };
        };

        dma1: xor@60900 {
            compatible = "marvell,orion-xor";
            reg = <0x60900 0x100
                   0x60B00 0x100>;
            status = "okay";
            clocks = <&gate_clk 16>;

            xor00 {
                  interrupts = <7>;
                  dmacap,memcpy;
                  dmacap,xor;
            };
            xor01 {
                  interrupts = <8>;
                  dmacap,memcpy;
                  dmacap,xor;
                  dmacap,memset;
            };
        };

        eth0: ethernet-controller@72000 {
            compatible = "marvell,kirkwood-eth";
            #address-cells = <1>;
            #size-cells = <0>;
            reg = <0x72000 0x4000>;
            clocks = <&gate_clk 0>;
            marvell,tx-checksum-limit = <1600>;
            status = "disabled";

            ethernet0-port@0 {
                compatible = "marvell,kirkwood-eth-port";
                reg = <0>;
                interrupts = <11>;
                /* overwrite MAC address in bootloader */
                local-mac-address = [00 00 00 00 00 00];
                /* set phy-handle property in board file */
            };
        };

        mdio: mdio-bus@72004 {
            compatible = "marvell,orion-mdio";
            #address-cells = <1>;
            #size-cells = <0>;
            reg = <0x72004 0x84>;
            interrupts = <46>;
            clocks = <&gate_clk 0>;
            status = "disabled";

            /* add phy nodes in board file */
        };

        eth1: ethernet-controller@76000 {
            compatible = "marvell,kirkwood-eth";
            #address-cells = <1>;
            #size-cells = <0>;
            reg = <0x76000 0x4000>;
            clocks = <&gate_clk 19>;
            marvell,tx-checksum-limit = <1600>;
            pinctrl-0 = <&pmx_ge1>;
            pinctrl-names = "default";
            status = "disabled";

            ethernet1-port@0 {
                compatible = "marvell,kirkwood-eth-port";
                reg = <0>;
                interrupts = <15>;
                /* overwrite MAC address in bootloader */
                local-mac-address = [00 00 00 00 00 00];
                /* set phy-handle property in board file */
            };
        };

        sata_phy0: sata-phy@82000 {
            compatible = "marvell,mvebu-sata-phy";
            reg = <0x82000 0x0334>;
            clocks = <&gate_clk 14>;
            clock-names = "sata";
            #phy-cells = <0>;
            status = "ok";
        };

        sata_phy1: sata-phy@84000 {
            compatible = "marvell,mvebu-sata-phy";
            reg = <0x84000 0x0334>;
            clocks = <&gate_clk 15>;
            clock-names = "sata";
            #phy-cells = <0>;
            status = "ok";
        };

        audio0: audio-controller@a0000 {
            compatible = "marvell,kirkwood-audio";
            #sound-dai-cells = <0>;
            reg = <0xa0000 0x2210>;
            interrupts = <24>;
            clocks = <&gate_clk 9>;
            clock-names = "internal";
            status = "disabled";
        };
    };
};

kirkwood-6192.dtsi

/ {
    mbus {
        pciec: pcie-controller {
            compatible = "marvell,kirkwood-pcie";
            status = "disabled";
            device_type = "pci";

            #address-cells = <3>;
            #size-cells = <2>;

            bus-range = <0x00 0xff>;

            ranges =
                   <0x82000000 0 0x40000 MBUS_ID(0xf0, 0x01) 0x40000 0 0x00002000
                0x82000000 0x1 0     MBUS_ID(0x04, 0xe8) 0       1 0 /* Port 0.0 MEM */
                0x81000000 0x1 0     MBUS_ID(0x04, 0xe0) 0       1 0 /* Port 0.0 IO  */>;

            pcie0: pcie@1,0 {
                device_type = "pci";
                assigned-addresses = <0x82000800 0 0x00040000 0 0x2000>;
                reg = <0x0800 0 0 0 0>;
                #address-cells = <3>;
                #size-cells = <2>;
                #interrupt-cells = <1>;
                ranges = <0x82000000 0 0 0x82000000 0x1 0 1 0
                      0x81000000 0 0 0x81000000 0x1 0 1 0>;
                interrupt-map-mask = <0 0 0 0>;
                interrupt-map = <0 0 0 0 &intc 9>;
                marvell,pcie-port = <0>;
                marvell,pcie-lane = <0>;
                clocks = <&gate_clk 2>;
                status = "disabled";
            };
        };
    };

    ocp@f1000000 {
        pinctrl: pin-controller@10000 {
            compatible = "marvell,88f6192-pinctrl";

            pmx_sata0: pmx-sata0 {
                marvell,pins = "mpp5", "mpp21", "mpp23";
                marvell,function = "sata0";
            };
            pmx_sata1: pmx-sata1 {
                marvell,pins = "mpp4", "mpp20", "mpp22";
                marvell,function = "sata1";
            };
        };

        rtc: rtc@10300 {
            compatible = "marvell,kirkwood-rtc", "marvell,orion-rtc";
            reg = <0x10300 0x20>;
            interrupts = <53>;
            clocks = <&gate_clk 7>;
        };

        sata: sata@80000 {
            compatible = "marvell,orion-sata";
            reg = <0x80000 0x5000>;
            interrupts = <21>;
            clocks = <&gate_clk 14>, <&gate_clk 15>;
            clock-names = "0", "1";
            status = "disabled";
        };

    };
};

kirkwood-pogo_e02.dts

/dts-v1/;

#include "kirkwood.dtsi"
#include "kirkwood-6192.dtsi"
/* kirkwood 6192 */
/ {
        model = "Cloud Engines Pogoplug Mobile";
        compatible = "cloudengines,pogov4a1", "marvell,kirkwood-88f6192", "marvell,kirkwood";

        memory {
                device_type = "memory";
                reg = <0x00000000 0x10000000>;
        };

        chosen {
                bootargs = "console=ttyS0,115200n8 earlyprintk";
        };

        ocp@f1000000 {
                pinctrl: pin-controller@10000 {
/*                      pmx_usb_power_enable: pmx-usb-power-enable {
                                marvell,pins = "mpp9";
                                marvell,function = "gpio";
                        }; */
                        pmx_led_green: pmx-led_green {
                                marvell,pins = "mpp22";
                                marvell,function = "gpio";
                        };
                        pmx_led_red: pmx-led_red {
                                marvell,pins = "mpp24";
                                marvell,function = "gpio";
                        };
                        pmx_sdio_cd: pmx_sdio_cd {
                                marvell,pins = "mpp27";
                                marvell,function = "gpio";
                        };
                        pmx_sdio_wp: pmx_sdio_wp {
                                marvell,pins = "mpp28";
                                marvell,function = "gpio";
                        };
                        pmx_eject_button: pmx_eject_button {
                                marvell,pins = "mpp29";
                                marvell,function = "gpio";
                        };
            pmx_nand: pmx-nand {
                marvell,pins = "";
                marvell,function = "nand";
            };
            pmx_spi: pmx-spi {
                marvell,pins = "mpp7", "mpp1", "mpp2", "mpp3";
                marvell,function = "spi";
            };
                };
                uart0: serial@12000 {
                        status = "ok";
                };
        uart1: serial@12100 {
            status = "ok";
        };
        i2c0: i2c@11000 {
            status = "ok";
        };
        spi0: spi@10600 {
            status = "ok";

            spidev@0 {
                compatible = "spidev";
                spi-max-frequency = <10000000>;
                reg = <0>;
                mode = <0>;
            };
        };

        };
        gpio-keys {
                compatible = "gpio-keys";
                #address-cells = <1>;
                #size-cells = <0>;
                pinctrl-0 = <&pmx_eject_button>;
                pinctrl-names = "default";

                button@1 {
                        label = "Eject button";
                        linux,code = <KEY_EJECTCD>;
                        gpios = <&gpio0 29 GPIO_ACTIVE_LOW>;
                };
        };
        gpio-leds {
                compatible = "gpio-leds";
                pinctrl-0 = < &pmx_led_red &pmx_led_green >;
/*              pinctrl-0 = < &pmx_usb_power_enable &pmx_led_red
                              &pmx_led_green >; */
                pinctrl-names = "default";

                health {
                        label = "status:green:health";
                        gpios = <&gpio0 22 GPIO_ACTIVE_LOW>;
                        default-state = "keep";
                };
                fault {
                        label = "status:red:fault";
                        gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
                };
        };
/*      regulators {
                compatible = "simple-bus";
                #address-cells = <1>;
                #size-cells = <0>;
                pinctrl-0 = <&pmx_usb_power_enable>;
                pinctrl-names = "default";

                usb_power: regulator@1 {
                        compatible = "regulator-fixed";
                        reg = <1>;
                        regulator-name = "USB Power";
                        regulator-min-microvolt = <5000000>;
                        regulator-max-microvolt = <5000000>;
                        enable-active-high;
                        regulator-always-on;
                        regulator-boot-on;
                        gpio = <&gpio0 9 GPIO_ACTIVE_HIGH>;
                };
        }; */
};

&nand {
        chip-delay = <40>;
/*        status = "okay"; */

/*      partition@0 {
                label = "u-boot";
                reg = <0x0000000 0x100000>;
                read-only;
        };

        partition@100000 {
                label = "uImage";
                reg = <0x0100000 0x400000>;
        };

        partition@500000 {
                label = "pogoplug";
                reg = <0x0500000 0x2000000>;
        };

        partition@2500000 {
                label = "root";
                reg = <0x02500000 0x5b00000>;
        }; */
};

&mdio {
        status = "okay";

        ethphy0: ethernet-phy@0 {
                reg = <0>;
        };
};

&eth0 {
        status = "okay";
        ethernet0-port@0 {
                phy-handle = <&ethphy0>;
        };
};

The "right" way to merge this is probably to update the rest of the kirkwood*.dts files to use the new mainline dts style but that requires a motivated person with quite a bit of free time on their hands smile

Hope this is helpful
   -Bob

For whatever it's worth; I merged ALARM's pre-DTS approach into the OpenWRT tree and have it booting on several pogoplugs, though I recognize that it is probably not the preferred way forward.  Feel free to stare over my shoulder at https://github.com/nwf/openwrt/tree/pogov4 ; I am using a slightly customized boot loader, available at https://github.com/nwf/u-boot-kirkwood/tree/master .  Like bsdfox's work above, I have also enabled I2C.

nwf,

The patch looks good. I've actually just built a 3.16.0 kernel for alarm using the device tree files above and for the most part things are working well. I'm having a problem with both uarts that I've been unable to remedy but my i2c and spidev ports are working well and sometimes it's nice to have a full distro for doing embedded projects.

In case you have any ideas--
echo "f1012000.serial" > /sys/devices/platform/serial8250/driver/bind
bash: echo: write error: No such device

UPDATE: I found that I needed the of_serial driver and no other changes. There's an interesting thread that can be read regarding this at http://www.plugcomputer.org/plugforum/i … 55.20;wap2 which eventually gets you to the solution here http://www.mail-archive.com/devicetree- … 12134.html

(Last edited by bsdfox on 15 Oct 2014, 03:22)

When I enable MPP28, Pogoplug Mobile detects SD card read only if the switch in normal position and read write if the switch in "lock" position. It should be other way. Have anyone encountered the same problem?

These things are great. I've got a little 2.2" lcd driven with fbtft working on it. I'll paste the device tree entries if anyone has interest

bsdfox,

Could you post the location/photo for the i2c pads?

PogoPlug v4 i2c pins
that's SDA on the bottom left and SCL on the top right

nguyen, check the setting of active_low for that pin.

Hello mwf,

This is what I set in the dts file.

                mvsdio@90000 {
                        pinctrl-0 = <&pmx_sdio &pmx_sdio_cd &pmx_sdio_wp>;
                        pinctrl-names = "default";
                        cd-gpios = <&gpio0 27 1>;
                        wp-gpios = <&gpio0 28 0>;
                        status = "okay";
                };

I am using BB and the kernel is 3.10. Can anyone upload the kernel and rootfs zip file for testing the Pogoplug Mobile device?

nguyen,

try  wp-gpios = <&gpio0 28 GPIO_ACTIVE_LOW>;

nguyen wrote:

Hello mwf,

This is what I set in the dts file.

                mvsdio@90000 {
                        pinctrl-0 = <&pmx_sdio &pmx_sdio_cd &pmx_sdio_wp>;
                        pinctrl-names = "default";
                        cd-gpios = <&gpio0 27 1>;
                        wp-gpios = <&gpio0 28 0>;
                        status = "okay";
                };

I am using BB and the kernel is 3.10. Can anyone upload the kernel and rootfs zip file for testing the Pogoplug Mobile device?

Thank you mwf and bsdfox. The source cannot be compiled if I define GPIO_ACTIVE_LOW constant. I am using official BB release which kernel version is 3.10. Here are the sources:

pogoplugv4-setup.c

/*
 * arch/arm/mach-kirkwood/pogoplugv4-setup.c
 *
 * Pogoplug Series 4 Setup
 *
 * 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.
 */

#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/mtd/partitions.h>
#include <linux/ata_platform.h>
#include <linux/mv643xx_eth.h>
#include <linux/gpio.h>
#include <linux/gpio_keys.h>
#include <linux/leds.h>
#include <linux/pci.h>
#include <linux/irq.h>
#include <linux/spi/flash.h>
#include <linux/spi/spi.h>
#include <linux/input.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <mach/kirkwood.h>
#include <linux/platform_data/mmc-mvsdio.h>
#include <plat/orion-gpio.h>
#include "common.h"
#include "mpp.h"

static struct mtd_partition ppv4_nand_parts[] = {
    {
        .name    = "u-boot",
        .offset    = 0,
        .size    = 2 * SZ_1M
    }, {
        .name    = "uImage",
        .offset    = MTDPART_OFS_NXTBLK,
        .size    = 3 * SZ_1M
    }, {
        .name    = "uImage2",
        .offset    = MTDPART_OFS_NXTBLK,
        .size    = 3 * SZ_1M
    }, {
        .name    = "failsafe",
        .offset    = MTDPART_OFS_NXTBLK,
        .size    = SZ_8M
    }, {
        .name    = "root",
        .offset    = MTDPART_OFS_NXTBLK,
        .size    = MTDPART_SIZ_FULL
    },
};

static struct mv643xx_eth_platform_data pogoplugv4_ge00_data = {
    .phy_addr    = MV643XX_ETH_PHY_ADDR(0),
};

static struct mv_sata_platform_data pogoplugv4_sata_data = {
    .n_ports    = 1,
};

static struct gpio_keys_button pogoplugv4_button_pins[] = {
    {
        .code        = KEY_EJECTCD,
        .gpio        = 29,
        .desc        = "Eject Button",
        .active_low    = 1,
    },
};

static struct gpio_keys_platform_data pogoplugv4_button_data = {
    .buttons    = pogoplugv4_button_pins,
    .nbuttons    = ARRAY_SIZE(pogoplugv4_button_pins),
};

static struct platform_device pogoplugv4_buttons = {
    .name        = "gpio-keys",
    .id        = -1,   
    .num_resources  = 0,
    .dev        = {
        .platform_data  = &pogoplugv4_button_data,
    },
};

static struct gpio_led pogoplugv4_led_pins[] = {
    {
        .name            = "status:green:health",
        .default_trigger    = "default-on",
        .gpio            = 22,
        .active_low        = 1,
    },
    {
        .name            = "status:red:fault",
        .default_trigger    = "none",
        .gpio            = 24,
        .active_low        = 1,
    },
};

static struct gpio_led_platform_data pogoplugv4_led_data = {
    .leds        = pogoplugv4_led_pins,
    .num_leds    = ARRAY_SIZE(pogoplugv4_led_pins),
};

static struct platform_device pogoplugv4_leds = {
    .name    = "leds-gpio",
    .id    = -1,
    .dev    = {
        .platform_data    = &pogoplugv4_led_data,
    }
};

static struct mvsdio_platform_data ppv4_mvsdio_data = {
    .gpio_card_detect = 27,
    .gpio_write_protect = 28,
};

static unsigned int ppv4_mpp_config[] __initdata = {
    MPP27_GPIO,    /* SD card detect */
    MPP28_GPIO, /* SD card write protect */
    MPP29_GPIO,    /* Eject button */
    MPP22_GPIO,    /* Green LED */
    MPP24_GPIO,    /* Red LED */
    MPP12_SD_CLK,
    MPP13_SD_CMD,
    MPP14_SD_D0,
    MPP15_SD_D1,
    MPP16_SD_D2,
    MPP17_SD_D3,
    0
};

static const struct flash_platform_data pogoplugv4_spi_slave_data = {
    .type        = "m25p05-nonjedec",
};

static struct spi_board_info __initdata pogoplugv4_spi_slave_info[] = {
    {
        .modalias    = "m25p05-nonjedec",
        .platform_data    = &pogoplugv4_spi_slave_data,
        .irq        = -1,
        .max_speed_hz    = 20000000,
        .bus_num    = 0,
        .chip_select    = 0,
    },
};

static void __init pogoplugv4_init(void)
{
    /*
     * Basic setup. Needs to be called early.
     */
    kirkwood_init();
    kirkwood_mpp_conf(ppv4_mpp_config);

    kirkwood_ehci_init();
    kirkwood_ge00_init(&pogoplugv4_ge00_data);
    kirkwood_sata_init(&pogoplugv4_sata_data);
    spi_register_board_info(pogoplugv4_spi_slave_info,
                ARRAY_SIZE(pogoplugv4_spi_slave_info));
    kirkwood_spi_init();
    kirkwood_uart0_init();
    kirkwood_nand_init(ARRAY_AND_SIZE(ppv4_nand_parts), 25);
    kirkwood_sdio_init(&ppv4_mvsdio_data);
    platform_device_register(&pogoplugv4_leds);
    platform_device_register(&pogoplugv4_buttons);
}

static int __init pogoplugv4_pci_init(void)
{
    if (machine_is_pogoplugv4())
        kirkwood_pcie_init(KW_PCIE0);

    return 0;
}
subsys_initcall(pogoplugv4_pci_init);

MACHINE_START(POGOPLUGV4, "Pogoplug V4")
    /* Maintainer: Kevin Mihelich <kevin@archlinuxarm.org> */
    .atag_offset    = 0x100,
    .init_machine    = pogoplugv4_init,
    .map_io        = kirkwood_map_io,
    .init_early    = kirkwood_init_early,
    .init_irq    = kirkwood_init_irq,
    .init_time    = kirkwood_timer_init,
    .restart    = kirkwood_restart,
MACHINE_END

kirkwood-pogoplugv4.dts

/dts-v1/;

/include/ "kirkwood.dtsi"
/include/ "kirkwood-6281.dtsi"

/ {
    model = "Pogoplug V4";
    compatible = "cloudengines,pogoplugv4", "marvell,kirkwood-88f6192", "marvell,kirkwood";

    memory {
        device_type = "memory";
        reg = <0x00000000 0x8000000>;
    };

    chosen {
        bootargs = "console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p1 rootdelay=10";
    };

    mbus {
        pcie-controller {
            status = "okay";

            pcie@1,0 {
                status = "okay";
            };
        };
    };

    ocp@f1000000 {
        pinctrl: pinctrl@10000 {
            pmx_led_green: pmx-led-green {
                marvell,pins = "mpp22";
                marvell,function = "gpio";
            };
            pmx_led_red: pmx-led-red {
                marvell,pins = "mpp24";
                marvell,function = "gpio";
            };
            pmx_sdio_cd: pmx-sdio-cd {
                marvell,pins = "mpp27";
                marvell,function = "gpio";
            };
            pmx_sdio_wp: pmx-sdio-wp {
                marvell,pins = "mpp28";
                marvell,function = "gpio";
            };
            pmx_button_eject: pmx-button-eject {
                marvell,pins = "mpp29";
                marvell,function = "gpio";
            };
        };

        spi@10600 {
            status = "okay";

            m25p05@0 {
                compatible = "m25p05-nonjedec";
                reg = <0>;
                spi-max-frequency = <20000000>;
                mode = <0>;
            };
        };

        serial@12000 {
            status = "ok";
        };

        nand@3000000 {
            status = "okay";

            partition@0 {
                label = "u-boot";
                reg = <0x0000000 0x200000>;
                read-only;
            };

            partition@200000 {
                label = "uImage";
                reg = <0x200000 0x300000>;
            };

            partition@500000 {
                label = "uImage2";
                reg = <0x500000 0x300000>;
            };

            partition@800000 {
                label = "failsafe";
                reg = <0x800000 0x800000>;
            };

            partition@2500000 {
                label = "root";
                reg = <0x1000000 0x7000000>;
            };
        };

        sata@80000 {
            status = "okay";
            nr-ports = <1>;
        };

        mvsdio@90000 {
            pinctrl-0 = <&pmx_sdio &pmx_sdio_cd &pmx_sdio_wp>;
            pinctrl-names = "default";
            status = "okay";
            cd-gpios = <&gpio0 27 1>;
            wp-gpios = <&gpio0 28 0>;
        };
    };

    gpio-leds {
        compatible = "gpio-leds";
        pinctrl-0 = <&pmx_led_green &pmx_led_red>;
        pinctrl-names = "default";
        health {
            label = "status:green:health";
            gpios = <&gpio0 22 1>;
            linux,default-trigger = "default-on";
        };
        fault {
            label = "status:red:fault";
            gpios = <&gpio0 24 1>;
            linux,default-trigger = "none";
        };
    };

    gpio_keys {
        compatible = "gpio-keys";
        #address-cells = <1>;
        #size-cells = <0>;
        pinctrl-0 = <&pmx_button_eject>;
        pinctrl-names = "default";

        button@1 {
            label = "Eject Button";
            linux,code = <161>;
            gpios = <&gpio0 29 1>;
        };
    };
};

&mdio {
    status = "okay";

    ethphy0: ethernet-phy@0 {
        device_type = "ethernet-phy";
        reg = <0>;
    };
};

&eth0 {
    status = "okay";
    ethernet0-port@0 {
        phy-handle = <&ethphy0>;
    };
};

nguyen,

That first file looks like a standard board file.. a devicetree kernel shouldn't need that. I'd recommend you move to trunk if your current kernel is using the board files.

Merged BSD's device tree into mine own, and a couple dozen silly errors later I'm booted. From this point, I'm going to work on getting going on an unopened box.

bsdfox,

Actually dts is the only file was used in BB. Changing .c file doesn't effect at all. I want to stick with official release. Just ignore mpp28 for awhile, hopefully someone finds a solution.

Kernel 3.10 drivers\mmc\host\mvsdio.c has a bug which detects write protection wrongly. The problem has been fixed in Kernel 3.12 and 3.14. Instead of using

gpio_card_detect = of_get_named_gpio(np, "cd-gpios", 0);
gpio_write_protect = of_get_named_gpio(np, "wp-gpios", 0);

,

mmc_of_parse(mmc);

should be used.

I updated my patch to use FDT (thanks to everyone here for their help smile ) ; have a look at https://github.com/nwf/openwrt/tree/pogov4 again.  (Commit 615229b6 as of right now though I might push --force over it later).

The default uboot environment in the tree is still not useful, but I'm thinking about making it contain something like the below.  In my limited testing, it works pretty well, but thoughts are of course welcome.  It's a big wad of uboot shell, but it tries to boot from mmc and then usb, first looking in / and then looking in /boot, before booting ubi rootfs:/boot/uImage.  In all cases, it looks for a uImage, an optional uInitrd, and an optional pogov4.dtb file.  Ordering and even whether to try something is easily done by tweaking the bootcmd variable to just not call as many runs, or call them in a different order.

setenv mtdids nand0=orion_nand

setenv bootargs_console console=ttyS0,115200n8

setenv bootcmd_do_bootm 'setenv bootargs $bootargs_console $mtdids $mtdparts $loaderbootargs; bootm ${bootmargs}'

setenv boot_condload 'if ${loadercmd} 0x00800000 ${loaderprefix}/uImage; then if ${loadercmd} 0x01100000 ${loaderprefix}/uInitrd; then setenv bootmargs 0x00800000 0x01100000; else setenv bootmargs 0x00800000 -; fi; if ${loadercmd} 0x00700000 ${loaderprefix}/pogov4.dtb; then fdt addr 0x00700000; fdt resize; fdt chosen; setenv bootmargs ${bootmargs} 0x00700000; fi; run bootcmd_do_bootm; fi'

setenv boot_try_mmc 'if mmc info; then setenv loadercmd "ext4load mmc 0:1"; setenv loaderbootargs "root=/dev/mmcblk0p1 rootfstype=ext4 rootwait"; run boot_condload; fi'

setenv boot_try_usb 'if usb storage; then setenv loadercmd "ext4load usb 0:1"; setenv loaderbootargs "root=/dev/sda1 rootfstype=ext4 rootwait"; run boot_condload; fi'

setenv boot_try_ubi 'if ubi part root ; ubifsmount ubi:rootfs ; then setenv loadercmd "ubifsload"; setenv loaderbootargs "ubi.mtd=1 root=ubi0:rootfs rootfstype=ubifs"; run boot_condload; fi'

setenv bootcmd 'mmc rescan; usb start; loaderprefix= ; run boot_try_mmc; run boot_try_usb; loaderprefix=/boot; run boot_try_mmc; run boot_try_usb; run boot_try_ubi'

(Last edited by nwf on 23 Oct 2014, 08:35)

The discussion might have continued from here.