Re: [OpenWrt-Devel] Freescale P1020 WLAN support?

2012-10-16 Thread Rainer 'Rei' Schuth
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Hello,

On 10/16/2012 08:03 PM, John Clark wrote:
> 
> Thanks for the URL. I fixed up my code set. which allows for building a 
> kernel and ramdisk. However, a couple of items.
> 
> 1) the "build" process always seems to ask about a WATCHDOG timer driver.

If you dont need a watchdog, you need to disable the drive.r

> 2) The built kernel crashes right after processing the initramfs image.

Sry i forget to give you these two bash lines. You need to run them in
the trunk directory.

./build_dir/host/u-boot-2011.12/tools/mkimage -A ppc -O linux -T ramdisk
- -C none -a 0x2d00 -e 0x2d00 -d
./bin/mpc85xx/openwrt-mpc85xx-rootfs.cpio.gz
/[path]/[to]/[somewhere]/openwrt-mpc85xx-rootfs-uImage

cp -vf ./bin/mpc85xx/openwrt-mpc85xx-rootfs.cpio.gz
/[path]/[to]/[somewhere]/openwrt-mpc85xx-rootfs-initrd


These are the commands to flash the uboot over TFTP an boot the image.

 U-Boot Bootloader 

In most cases when you download an image over TFTP you the the filesize
in HEX in the variable: "$filesize"

For the most updates, you dont need to change the FDT file.

=== Boot over TFTP ===

  * setenv gatewayip 10.26.254.16
  * setenv netmask 255.255.0.0
  * setenv ipaddr 10.26.1.6
  * setenv serverip 10.26.254.16
  * setenv fdtfile stage1/openwrt-mpc85xx-p1020wlan.fdt
  * setenv bootfile stage1/openwrt-mpc85xx-uImage
  * setenv initfile stage1/openwrt-mpc85xx-rootfs-uImage
  * setenv fdtaddr  0c0
  * setenv loadaddr 100
  * setenv initaddr 200

  * tftp $fdtaddr $fdtfile;
  * tftp $loadaddr $bootfile;
  * tftp $initaddr $initfile

  * setenv bootargs rw console=$consoledev,$baudrate $otherbootargs
  * bootm $loadaddr $initaddr $fdtaddr

=== Flash over TFTP: with Initramfs ===

  * bdinfo -> flashstart
 * kernel = flashstart + 0x0 + 0x0040= 0xEC00
 * initfile: flashstart + 0x0040 + 0x01b0
 * fdt: ab 0x0eff4
  * setenv fdtfile stage1/openwrt-mpc85xx-p1020wlan.fdt
  * setenv bootfile stage1/openwrt-mpc85xx-uImage
  * setenv initfile stage1/openwrt-mpc85xx-rootfs-uImage
  * protect off all
  * tftp $loadaddr $bootfile;
  * erase 0xEC00 +040
  * cp.b $loadaddr 0xEC00 
  * tftp $initaddr $initfile
  * erase 0xEC40 +0x01b0
  * cp.b $loadaddr 0xEC40 
  * tftp $fdtaddr $fdtfile;
  * erase eff4 + 
  * cp.b $fdtaddr eff4 
  * setenv bootargs rw console=$consoledev,$baudrate $otherbootargs
  * bootm 0xEC00 0xEC40 eff4

=== Flash over TFTP: with Jffs2 ===

  * bdinfo -> flashstart
 * kernel = flashstart + 0x0 = 0xEC00
   * length: 0x40
 * jffs2  = flashstart + X = 0xEE40 , Länge 0x01b0
 * fdt: flash start addr: 0x0eff4
  * setenv fdtfile stage1/openwrt-mpc85xx-p1020wlan.fdt
  * setenv bootfile stage1/openwrt-mpc85xx-uImage
  * setenv initfile stage1/root.jffs2-128k
  * protect off all
  * tftp $loadaddr $bootfile;
  * erase 0xEC00 +040
  * cp.b $loadaddr 0xEC00 
  * tftp $initaddr $initfile
  * erase 0xEE40  +0x01b0
  * cp.b $initaddr 0xEE40  
  * tftp $fdtaddr $fdtfile;
  * erase eff4 + 
  * cp.b $fdtaddr eff4 
  * setenv bootargs rw console=$consoledev,$baudrate $otherbootargs
rootfstype=jffs2
  * bootm 0xEC00 - eff4

=== Boot from Image ===
  * setenv bootdelay 3
  * setenv hostname femap1_X
  * setenv bootcmd "bootm 0xEC00 0xEC40 eff4"
  * saveenv


Greetings,

Rainer S.
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.19 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iF4EAREIAAYFAlB9sdQACgkQsD/BjTdkA1dZBwD8Ch53lSwtdOJmP/x/6bfL8Fjd
gCnKl285G01QL1tg+ZMA/1p0wKi8Yi76CxjYfAqyY+4nWaEbLzuxMoJ33ndtt3uT
=MOgn
-END PGP SIGNATURE-
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Freescale P1020 WLAN support?

2012-10-15 Thread Rainer 'Rei' Schuth
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Hi

On 10/13/2012 12:21 AM, John Clark wrote:
> I have been looking and eventually found some set of patches which I have 
> been using that were posted in March.
> 
> However, what was not clear from the various posts at that time was the 
> following:
> 
> 1) what SVN revision of OpenWRT that was used.
> 2) whether anyone has done any further work.
> 

We have been using the patches since March.
You can find working patches under [0].

I hope it works also for you.


Rainer Schuth

[0]
http://git.fem.tu-ilmenau.de/?p=fem-wlan.git;a=tree;f=target/linux/mpc85xx/patches-3.3;hb=968a75becbd35df6430e9f5af889a9abe3281423
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.19 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iF4EAREIAAYFAlB8LG4ACgkQsD/BjTdkA1cRyQEAwAPIMcc694MNYsLmqbTL0HMA
CvAX2T2hjwX5ZQcYPyYA/1YKx9wbLiBGB/cr/hvUHmUNA/Ha39ZBJHOyOWJlAMdR
=K60w
-END PGP SIGNATURE-
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [Projekt-wlan] [PATCH 7/7] mpc85xx: Add support for Freescale P1020WLAN reference design.

2012-03-29 Thread Rainer 'Rei' Schuth

Hello,

On 03/29/2012 05:34 PM, Wojciech Dubowik wrote:
>  * P1020WLAN RevD
>  * SMP enabled kernel
> 

The 230-p1020wlan-dts patch didn't worked when the target profile
"Freescale P1020WLAN Reference Board" is selected.

>  .../linux/mpc85xx/patches/230-p1020wlan-dts.patch  |  300 
> 

The patch didn't worked well. Here is the patch that worked for me.
The only changes are in the header of the patch not the content.

Rainer
-

230-p1020wlan-dts

Signed-off-by: Rainer Schuth 
---
 arch/powerpc/boot/dts/p1020wlan.dts  |   66 ++
 arch/powerpc/boot/dts/p1020wlan.dtsi |  230
++
 2 files changed, 296 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/boot/dts/p1020wlan.dts
 create mode 100644 arch/powerpc/boot/dts/p1020wlan.dtsi

diff --git a/arch/powerpc/boot/dts/p1020wlan.dts
b/arch/powerpc/boot/dts/p1020wlan.dts
new file mode 100644
index 000..06c3b96
--- /dev/null
+++ b/arch/powerpc/boot/dts/p1020wlan.dts
@@ -0,0 +1,66 @@
+/*
+ * P1020 RDB Device Tree Source
+ *
+ * Copyright 2009-2011 Freescale Semiconductor Inc.
+ *
+ * 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.
+ */
+
+/include/ "fsl/p1020si-pre.dtsi"
+/ {
+  model = "fsl,P1020WLAN";
+  compatible = "fsl,P1020RDB";
+
+  memory {
+  device_type = "memory";
+  };
+
+  board_lbc: lbc: localbus@ffe05000 {
+  reg = <0 0xffe05000 0 0x1000>;
+
+  /* NOR flash and cpld */
+  ranges = <0x0 0x0 0x0 0xee00 0x0400
+0x3 0x0 0x0 0xffa0 0x0100>;
+  };
+
+  board_soc: soc: soc@ffe0 {
+  ranges = <0x0 0x0 0xffe0 0x10>;
+  };
+
+  pci0: pcie@ffe09000 {
+  ranges = <0x200 0x0 0xa000 0 0xa000 0x0
0x2000
+0x100 0x0 0x 0 0xffc1 0x0 0x1>;
+  reg = <0 0xffe09000 0 0x1000>;
+  pcie@0 {
+  ranges = <0x200 0x0 0xa000
+0x200 0x0 0xa000
+0x0 0x2000
+
+0x100 0x0 0x0
+0x100 0x0 0x0
+0x0 0x10>;
+  };
+  };
+
+  pci1: pcie@ffe0a000 {
+  reg = <0 0xffe0a000 0 0x1000>;
+  ranges = <0x200 0x0 0x8000 0 0x8000 0x0
0x2000
+0x100 0x0 0x 0 0xffc0 0x0 0x1>;
+  pcie@0 {
+  ranges = <0x200 0x0 0x8000
+0x200 0x0 0x8000
+0x0 0x2000
+
+0x100 0x0 0x0
+0x100 0x0 0x0
+0x0 0x10>;
+  };
+  };
+};
+
+/include/ "p1020wlan.dtsi"
+/include/ "fsl/p1020si-post.dtsi"
+
diff --git a/arch/powerpc/boot/dts/p1020wlan.dtsi
b/arch/powerpc/boot/dts/p1020wlan.dtsi
new file mode 100644
index 000..1904e03
--- /dev/null
+++ b/arch/powerpc/boot/dts/p1020wlan.dtsi
@@ -0,0 +1,230 @@
+/*
+ * P1020 RDB Device Tree Source stub (no addresses or top-level ranges)
+ *
+ * Copyright 2011-2012 Freescale Semiconductor Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
are met:
+ * * Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer
in the
+ *   documentation and/or other materials provided with the
distribution.
+ * * Neither the name of Freescale Semiconductor nor the
+ *   names of its contributors may be used to endorse or promote
products
+ *   derived from this software without specific prior written
permission.
+ *
+ *
+ * ALTERNATIVELY, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") as published by the Free Software
+ * Foundation, either version 2 of that License or (at your option) any
+ * later version.
+ *
+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
S

Re: [OpenWrt-Devel] [Projekt-wlan] Freescale P1020 WLAN support

2012-03-29 Thread Rainer &#x27;Rei&#x27; Schuth
Hi,

I applied the new 7 patches from Wojtek (see mail "[PATCH 0/7] mpc85xx:
P1010RDB and P1020WLAN support"), compiled the sources and the p1020wlan
image boots.

With the patches the kernel recognized the 2 cores. But the RAM problem
is not gone.

I also tested the eth1 interface. It works ;) I get an IP over DHCP and
I can ping the outside world.

The two WLAN-Cards are recognized without visible problems. Association
to an open wireless network and scan also works.

This time there is a watchdog device but I don't manage to get an
automated reboot.

Greetings,

Rainer
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [Projekt-wlan] Freescale P1020 WLAN support

2012-03-29 Thread Rainer &#x27;Rei&#x27; Schuth
Hello,

On 03/28/2012 09:08 AM, Wojciech Dubowik wrote:
>   Unless somebody else wants to do it I will try to consolidate 
> the patches for mpc85xx and post for review. 

Do you have any progress?

> Hopefully P1020WLAN dts file won't take too long so I can do it this
> week.

Do you need the official Freescale patches for the P1020rdb board?

Greetings,

Rainer

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [Projekt-wlan] Freescale P1020 WLAN support

2012-03-27 Thread Rainer &#x27;Rei&#x27; Schuth
Hello,

On 03/27/2012 08:41 PM, Imre Kaloz wrote:
> If you have something basic up and running, I'm happy to review and (if
> needed) clean up the patches. Given how much I could nuke from the
> freescale patches previosly, you probably will be fine porting about 10
> over from the 170 ;)

What do you need exactly?

I applied the patch from  Wojtek and worked. But we need some kernel
patches.

Greetings,

Rainer
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [Projekt-wlan] Freescale P1020 WLAN support

2012-03-27 Thread Rainer &#x27;Rei&#x27; Schuth
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hello,

On 03/27/2012 06:05 PM, Rainer 'Rei' Schuth wrote:
> I would apply the patch and try to run OpenWRT on the P1020rdb. I let
> you know my experience.

I managed to boot a standard ramfs image with default out of the box
configuration.

Developer enviromet settings:
 - OpenWRT SVN trunk rev 31088
 - Target System Freescale MPC85xx - with the patch from Wojtek

u-boot:
setenv gatewayip 10.26.254.16
setenv netmask 255.255.0.0
setenv ipaddr 10.26.1.6
setenv serverip 10.26.254.16
setenv fdtfile [full-path-to-file]/openwrt-mpc85xx-p1020rdb.fdt
setenv bootfile [full-path-to-file]/openwrt-mpc85xx-uImage
setenv bootargs root=/dev/ram rw console=$consoledev,$baudrate
$othbootargs ramdisk_size=12;
tftp $loadaddr $bootfile;
tftp $fdtaddr $fdtfile;
bootm $loadaddr - $fdtaddr

It then boots OpenWRT :)

But, there are some problems:

1. Bug with the missing eth1 (second ethernet interface) confirmed
Kernel says:
[  418.361439] net eth1: PHY already attached
[  418.365566] net eth1: could not attach to PHY
2. the kernel only sees one of two processors
grep cpu /proc/cpuinfo | wc -l
1
3. the kernel only sees 776892 kB of the available (1048576 kB) memory
4. no working watchdog


It's a good start ;)

Rainer
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.17 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJPcjRKAAoJEPizOL253ODVXF0IAJzWsofTgMhljAekQB+u5pL9
SFaHjbNvgl3K1qAJkojgl7YM4PAFn9jzzL8ZB8EDf/ljA4pSBdBmv9t80qnHSFbA
nmMMnzRAgv+059mWVnAEL5xQNr4558/Ys8clYYfN8rFlzaNPMo2/j2qLqxtGkDY6
PGwPnw9oEBubAXBMefXs6T4dxxX33EOLj7c3FIDEtIl0Cqy55FVaknvtQtJp6z0v
/XS9x6+2+VGQGzOkjl8XAh2myvvzO7JRNb1I062rNywzR8FKFHnrgaglaMg8nDtX
LP/9u/gjU7hnahXGElgfkvQ1cHY2SWnUHg9ynJivBzllgD+H/tSVBD9D1LvXJj0=
=WNVM
-END PGP SIGNATURE-
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [Projekt-wlan] Freescale P1020 WLAN support

2012-03-27 Thread Rainer &#x27;Rei&#x27; Schuth
On 03/27/2012 05:31 PM, Wojciech Dubowik wrote:
Thank you,

I would apply the patch and try to run OpenWRT on the P1020rdb. I let
you know my experience.

> I don't have any older mpc85xx devices so I don't know whether
> they need patches with latest kernel or not. At the moment
> I have just removed them.

The Freescale developer team make for the P1020rdb around 170 patches
for the 2.6.32 Linux kernel. Many of them are meanwhile upstream but
some are hardware hacks and driver changes. Its hard to say which
patches really work and which don't without a working OS.

Greetings,

Rainer
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [Projekt-wlan] Freescale P1020 WLAN support

2012-03-27 Thread Rainer &#x27;Rei&#x27; Schuth
On 03/27/2012 04:14 PM, Wojciech Dubowik wrote:
> I have just tried kernel 3.3 on p1020wlan and it seems to run with
> empty target patches folder.

Do you have any Makefile and scripts for this?

> Only eth0 is working at the moment and most probably dts file has
> to be adapted slightly for eth1.

Do work the mPCIe ports and the serial console?

> What kind of other Freescale patches are you planning to port?
>

We are planning to port almost all patches from the ltib build from
freescale. Many of them are in the mainline kernel others don't.

I wrote in the OpenWRT wiki a page for the P1020WLAN[0] board.


Rainer

[0] http://wiki.openwrt.org/hardware/freescale/p1020
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel