Re: [LEDE-DEV] [PATCH v2 8/8] apm821xx: add support for the Netgear Centria N900 WNDR4700/WNDR4720 tested-by

2016-07-18 Thread Marty Plummer
On 07/13/2016 02:23 PM, Christian Lamparter wrote:
> From: Christian Lamparter 
> 
> This patch adds support for Netgear Centria N900 WNDR4700/WNDR4720
> 
> hardware highlights:
> 
> CPU:  AMCC PowerPC APM82181 Rev. E at 1000 MHz (PLB=166, OPB=83, EBC=83 MHz)
>   Security support, Boot ROM Location NAND wo/ECC 2k page (8 bits)
>   32 kB I-Cache 32 kB D-Cache, 256 kB L2-Cache, 32 kB OnChip Memory
> Board:AMCC APM82181 Evaluation Board, PCIE0/SATA1, 1*USB OTG
> DRAM: 256 MB (ECC not enabled, 500 Mb/s, 32-bit, CL3)
> NAND: 128 MiB (SLC, erase size: 128 KiB, page size: 2048, OOB size: 64)
> ETH:  Atheros AR8327N Gigabit Switch (4 x LAN, 1 x WAN)
> USB:  2 x 3.0 (Renesas uPD720202K8-711-BAA-A)
> SATA: 1 x SATA-II 3.5" Hard Drive Bay for HDDs (DesignWare SATA).
> WLAN1:Atheros AR9380 5GHz 802.11an 3:3x3
> WLAN2:Atheros AR9581 2.4GHz 802.11bgn 3:3x3
> SDCARD:   GL827L SD/MMC/MS Flash Card Reader (on internal dwc2 USB 2.0 
> host)
> I2C:  GMT G781 (i2c-0 @ 0x4d - lm90 compatible temperature sensor)
>   TC654(i2c-0 @ 0x1b - Dual PWM fan Speed controller)
> 
> WARNING: The serial port needs a TTL/RS-232 v3.3 level converter!
> 
> INFO: Since this device only has a NAND chip. I opted for going with
> root.squashfs in a UBI volume. There's no squashfs/jffs2 image.
> 
> This target produces three images.
>   a. netgear factory image
>  This image can be used to flash the Netgear WNDR4700 via the
>  firmware recovery mechanism and the web admin site.
> 
>  The bootloader can be instructed to do a firmware recovery via the
>  # fw_recovery
>  command. It will start a tftp server and listen on 192.168.1.1
>  (the ipaddr variable in u-boot) for incoming, binary tftp clients.
>  The firmware recovery mechanism is also started if any of the flash
>  content which contains the kernel, device-tree definitions or the
>  (fake)rootfs fails to verify or load.
> 
>   b. sysupgrade.tar image for sysupgrade
>  An sysupgrade will replace the entire current LEDE installation
>  with a newer version. This does include the kernel and the ubi rootfs
>  partition. The configuration can be carried over automatically as well
>  if desired.
> 
>  simply copy the sysupgrade.tar to a the WNDR4700 running LEDE and run:
> 
>  root@lede:~# sysupgrade sysupgrade.tar
> 
>  and let it reboot.
> 
>  Note: The devicetree flash area is NOT updated. Until the devicetree
>  definition is stable, this can lead to all sorts of hardware
>  detection problems! So make sure, if you experience issues: try
>  the fw_recovery. If you are unsure whenever this affects you:
>  test if you can reproduce your issue with the initramfs method.
>  As it will always have up-to-date device-tree definitions.
> 
>   c. initramfs image for TFTP (for development and testing)
>  To use the initramfs method, follow the following steps:
>1) Move the "lede-apm821xx-netgear-WNDR4700-initramfs-kernel.bin"
> file to to the root directory of your TFTP server.
> 
>2) rename it to wndr4700.bin
> 
>3) On the WNDR4700 - Hit Enter during u-boot and insert:
> # tftp 40 wndr4700.bin; run addtty; bootm 40 -
> 
>  This will boot the LEDE image.
> 
>  Note: The default tftp server is 192.168.1.7, if you want to change it:
>  # setenv serverip 192.168.8.7;
> 
>  Note2: The default address for the WNDR4700 is 192.168.1.1:
>  # setenv ipaddr 192.168.8.8;
> 
>  Note: Connect you tftp server on the last LAN port (not the WAN)
> 
> Signed-off-by: Christian Lamparter 

While I'm no expert in this field, I have personally built this firmware and 
run it on
my own WNDR4700 and as of yet have not ran into any issues in its usage.


0xC030918D.asc
Description: application/pgp-keys


signature.asc
Description: OpenPGP digital signature
___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH v2 8/8] apm821xx: add support for the Netgear Centria N900 WNDR4700/WNDR4720

2016-07-14 Thread Christian Lamparter
On Thursday, July 14, 2016 6:44:17 PM CEST Felix Fietkau wrote:
> On 2016-07-13 21:23, Christian Lamparter wrote:
> > From: Christian Lamparter 
> > 
> > This patch adds support for Netgear Centria N900 WNDR4700/WNDR4720
> > 
> > hardware highlights:
> > 
> > CPU:AMCC PowerPC APM82181 Rev. E at 1000 MHz (PLB=166, OPB=83, 
> > EBC=83 MHz)
> > Security support, Boot ROM Location NAND wo/ECC 2k page (8 bits)
> > 32 kB I-Cache 32 kB D-Cache, 256 kB L2-Cache, 32 kB OnChip Memory
> > Board:  AMCC APM82181 Evaluation Board, PCIE0/SATA1, 1*USB OTG
> > DRAM:   256 MB (ECC not enabled, 500 Mb/s, 32-bit, CL3)
> > NAND:   128 MiB (SLC, erase size: 128 KiB, page size: 2048, OOB size: 
> > 64)
> > ETH:Atheros AR8327N Gigabit Switch (4 x LAN, 1 x WAN)
> > USB:2 x 3.0 (Renesas uPD720202K8-711-BAA-A)
[...]
> > --- /dev/null
> > +++ b/package/firmware/uPD72020x-firmware/Makefile
> > @@ -0,0 +1,45 @@
> > +include $(TOPDIR)/rules.mk
> > +
> > +PKG_NAME:=uPD72020x-firmware
> > +PKG_RELEASE:=1
> > +
> > +RENESAS_FW:=USB3-201-202-FW-20120615
> > +RENESAS_FW_FILE:=$(RENESAS_FW).zip
> > +
> > +PKG_SOURCE:=$(PKG_NAME)-$(PKG_RELEASE).tar.gz
> > +PKG_SOURCE_PROTO:=git
> > +PKG_SOURCE_URL:=https://github.com/chunkeey/renesas-fw
> > +PKG_SOURCE_VERSION:=f64132a3bca64b47994fce140c69e2b432751162
> > +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_RELEASE)
> > +
> > +PKG_FLAGS:=nonshared
> > +
> > +include $(INCLUDE_DIR)/package.mk
> > +
> > +define Package/uPD72020x-firmware
> > +  SECTION:=firmware
> > +  CATEGORY:=Firmware
> > +  TITLE:=Renesas uPD720201 and uPD720202 firmware
> > +endef
> > +
> > +define Package/uPD72020x-firmware/description
> > +  Firmware for the Renesas USB3.0 Host Controllers uPD720201 and uPD720202.
> > +endef
> What's the license of this firmware? Is it redistributable?
You could say: At the moment, it shares the same license as
package/firmware/b43legacy-firmware.

I've contacted Renesas a while ago, I'm still waiting for a reply. It's
not that unlikely that it could show up in linux-firmware.git with the
same licence as the rcar-platform, but this hasn't happen yet.

The downloaded firmware.zip from renesas itself doesn't have a licence
file. There is a license floating around on the PP2U's directory together
with the release notes however: 


"[...] With respect to this Software GNU General Public License(“GPL”)shall 
apply.
YOU may, therefore, copy, modify and re-distribute the Software in accordance
with the GPL.
Please see here to obtain the conditions of GPL.
http://www.fsf.org/licensing/licenses/gpl.html

[...]"

But this could very well be for something else entirely. 
As they made various serial rom flashers for this and a
modified kernel driver for the early adopters.

I've also looked in Netgears's GPL Sources for the WNDR4700. 
The archive Netgear provides includes the crucial K2013080.mem file
(located: WNDR4700-V1.0.0.52_gpl_src/target/linux/wndr4700/renesas).
But without any matching licence file.

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH v2 8/8] apm821xx: add support for the Netgear Centria N900 WNDR4700/WNDR4720

2016-07-14 Thread Felix Fietkau
On 2016-07-13 21:23, Christian Lamparter wrote:
> From: Christian Lamparter 
> 
> This patch adds support for Netgear Centria N900 WNDR4700/WNDR4720
> 
> hardware highlights:
> 
> CPU:  AMCC PowerPC APM82181 Rev. E at 1000 MHz (PLB=166, OPB=83, EBC=83 MHz)
>   Security support, Boot ROM Location NAND wo/ECC 2k page (8 bits)
>   32 kB I-Cache 32 kB D-Cache, 256 kB L2-Cache, 32 kB OnChip Memory
> Board:AMCC APM82181 Evaluation Board, PCIE0/SATA1, 1*USB OTG
> DRAM: 256 MB (ECC not enabled, 500 Mb/s, 32-bit, CL3)
> NAND: 128 MiB (SLC, erase size: 128 KiB, page size: 2048, OOB size: 64)
> ETH:  Atheros AR8327N Gigabit Switch (4 x LAN, 1 x WAN)
> USB:  2 x 3.0 (Renesas uPD720202K8-711-BAA-A)
> SATA: 1 x SATA-II 3.5" Hard Drive Bay for HDDs (DesignWare SATA).
> WLAN1:Atheros AR9380 5GHz 802.11an 3:3x3
> WLAN2:Atheros AR9581 2.4GHz 802.11bgn 3:3x3
> SDCARD:   GL827L SD/MMC/MS Flash Card Reader (on internal dwc2 USB 2.0 
> host)
> I2C:  GMT G781 (i2c-0 @ 0x4d - lm90 compatible temperature sensor)
>   TC654(i2c-0 @ 0x1b - Dual PWM fan Speed controller)
> 
> WARNING: The serial port needs a TTL/RS-232 v3.3 level converter!
> 
> INFO: Since this device only has a NAND chip. I opted for going with
> root.squashfs in a UBI volume. There's no squashfs/jffs2 image.
> 
> This target produces three images.
>   a. netgear factory image
>  This image can be used to flash the Netgear WNDR4700 via the
>  firmware recovery mechanism and the web admin site.
> 
>  The bootloader can be instructed to do a firmware recovery via the
>  # fw_recovery
>  command. It will start a tftp server and listen on 192.168.1.1
>  (the ipaddr variable in u-boot) for incoming, binary tftp clients.
>  The firmware recovery mechanism is also started if any of the flash
>  content which contains the kernel, device-tree definitions or the
>  (fake)rootfs fails to verify or load.
> 
>   b. sysupgrade.tar image for sysupgrade
>  An sysupgrade will replace the entire current LEDE installation
>  with a newer version. This does include the kernel and the ubi rootfs
>  partition. The configuration can be carried over automatically as well
>  if desired.
> 
>  simply copy the sysupgrade.tar to a the WNDR4700 running LEDE and run:
> 
>  root@lede:~# sysupgrade sysupgrade.tar
> 
>  and let it reboot.
> 
>  Note: The devicetree flash area is NOT updated. Until the devicetree
>  definition is stable, this can lead to all sorts of hardware
>  detection problems! So make sure, if you experience issues: try
>  the fw_recovery. If you are unsure whenever this affects you:
>  test if you can reproduce your issue with the initramfs method.
>  As it will always have up-to-date device-tree definitions.
> 
>   c. initramfs image for TFTP (for development and testing)
>  To use the initramfs method, follow the following steps:
>1) Move the "lede-apm821xx-netgear-WNDR4700-initramfs-kernel.bin"
> file to to the root directory of your TFTP server.
> 
>2) rename it to wndr4700.bin
> 
>3) On the WNDR4700 - Hit Enter during u-boot and insert:
> # tftp 40 wndr4700.bin; run addtty; bootm 40 -
> 
>  This will boot the LEDE image.
> 
>  Note: The default tftp server is 192.168.1.7, if you want to change it:
>  # setenv serverip 192.168.8.7;
> 
>  Note2: The default address for the WNDR4700 is 192.168.1.1:
>  # setenv ipaddr 192.168.8.8;
> 
>  Note: Connect you tftp server on the last LAN port (not the WAN)
> 
> Signed-off-by: Christian Lamparter 
> ---

> --- /dev/null
> +++ b/package/firmware/uPD72020x-firmware/Makefile
> @@ -0,0 +1,45 @@
> +include $(TOPDIR)/rules.mk
> +
> +PKG_NAME:=uPD72020x-firmware
> +PKG_RELEASE:=1
> +
> +RENESAS_FW:=USB3-201-202-FW-20120615
> +RENESAS_FW_FILE:=$(RENESAS_FW).zip
> +
> +PKG_SOURCE:=$(PKG_NAME)-$(PKG_RELEASE).tar.gz
> +PKG_SOURCE_PROTO:=git
> +PKG_SOURCE_URL:=https://github.com/chunkeey/renesas-fw
> +PKG_SOURCE_VERSION:=f64132a3bca64b47994fce140c69e2b432751162
> +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_RELEASE)
> +
> +PKG_FLAGS:=nonshared
> +
> +include $(INCLUDE_DIR)/package.mk
> +
> +define Package/uPD72020x-firmware
> +  SECTION:=firmware
> +  CATEGORY:=Firmware
> +  TITLE:=Renesas uPD720201 and uPD720202 firmware
> +endef
> +
> +define Package/uPD72020x-firmware/description
> +  Firmware for the Renesas USB3.0 Host Controllers uPD720201 and uPD720202.
> +endef
What's the license of this firmware? Is it redistributable?

- Felix


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH v2 8/8] apm821xx: add support for the Netgear Centria N900 WNDR4700/WNDR4720

2016-07-13 Thread Christian Lamparter
From: Christian Lamparter 

This patch adds support for Netgear Centria N900 WNDR4700/WNDR4720

hardware highlights:

CPU:AMCC PowerPC APM82181 Rev. E at 1000 MHz (PLB=166, OPB=83, EBC=83 MHz)
Security support, Boot ROM Location NAND wo/ECC 2k page (8 bits)
32 kB I-Cache 32 kB D-Cache, 256 kB L2-Cache, 32 kB OnChip Memory
Board:  AMCC APM82181 Evaluation Board, PCIE0/SATA1, 1*USB OTG
DRAM:   256 MB (ECC not enabled, 500 Mb/s, 32-bit, CL3)
NAND:   128 MiB (SLC, erase size: 128 KiB, page size: 2048, OOB size: 64)
ETH:Atheros AR8327N Gigabit Switch (4 x LAN, 1 x WAN)
USB:2 x 3.0 (Renesas uPD720202K8-711-BAA-A)
SATA:   1 x SATA-II 3.5" Hard Drive Bay for HDDs (DesignWare SATA).
WLAN1:  Atheros AR9380 5GHz 802.11an 3:3x3
WLAN2:  Atheros AR9581 2.4GHz 802.11bgn 3:3x3
SDCARD: GL827L SD/MMC/MS Flash Card Reader (on internal dwc2 USB 2.0 host)
I2C:GMT G781 (i2c-0 @ 0x4d - lm90 compatible temperature sensor)
TC654(i2c-0 @ 0x1b - Dual PWM fan Speed controller)

WARNING: The serial port needs a TTL/RS-232 v3.3 level converter!

INFO: Since this device only has a NAND chip. I opted for going with
root.squashfs in a UBI volume. There's no squashfs/jffs2 image.

This target produces three images.
  a. netgear factory image
 This image can be used to flash the Netgear WNDR4700 via the
 firmware recovery mechanism and the web admin site.

 The bootloader can be instructed to do a firmware recovery via the
 # fw_recovery
 command. It will start a tftp server and listen on 192.168.1.1
 (the ipaddr variable in u-boot) for incoming, binary tftp clients.
 The firmware recovery mechanism is also started if any of the flash
 content which contains the kernel, device-tree definitions or the
 (fake)rootfs fails to verify or load.

  b. sysupgrade.tar image for sysupgrade
 An sysupgrade will replace the entire current LEDE installation
 with a newer version. This does include the kernel and the ubi rootfs
 partition. The configuration can be carried over automatically as well
 if desired.

 simply copy the sysupgrade.tar to a the WNDR4700 running LEDE and run:

 root@lede:~# sysupgrade sysupgrade.tar

 and let it reboot.

 Note: The devicetree flash area is NOT updated. Until the devicetree
   definition is stable, this can lead to all sorts of hardware
   detection problems! So make sure, if you experience issues: try
   the fw_recovery. If you are unsure whenever this affects you:
   test if you can reproduce your issue with the initramfs method.
   As it will always have up-to-date device-tree definitions.

  c. initramfs image for TFTP (for development and testing)
 To use the initramfs method, follow the following steps:
   1) Move the "lede-apm821xx-netgear-WNDR4700-initramfs-kernel.bin"
  file to to the root directory of your TFTP server.

   2) rename it to wndr4700.bin

   3) On the WNDR4700 - Hit Enter during u-boot and insert:
  # tftp 40 wndr4700.bin; run addtty; bootm 40 -

 This will boot the LEDE image.

 Note: The default tftp server is 192.168.1.7, if you want to change it:
 # setenv serverip 192.168.8.7;

 Note2: The default address for the WNDR4700 is 192.168.1.1:
 # setenv ipaddr 192.168.8.8;

 Note: Connect you tftp server on the last LAN port (not the WAN)

Signed-off-by: Christian Lamparter 
---
 package/firmware/uPD72020x-firmware/Makefile   |  45 ++
 target/linux/apm821xx/Makefile |   2 +-
 .../linux/apm821xx/base-files/etc/board.d/01_leds  |   8 +
 .../apm821xx/base-files/etc/board.d/02_network |   6 +
 target/linux/apm821xx/base-files/etc/diag.sh   |   4 +
 .../etc/hotplug.d/firmware/10-ath9k-eeprom |  89 +++
 target/linux/apm821xx/base-files/lib/apm821xx.sh   |   4 +
 .../apm821xx/base-files/lib/upgrade/platform.sh|   9 +
 target/linux/apm821xx/config-4.4   |   2 +
 target/linux/apm821xx/dts/wndr4700.dts | 762 +
 .../files/arch/powerpc/platforms/44x/wndr4700.c|  96 +++
 target/linux/apm821xx/image/Makefile   |  85 ++-
 target/linux/apm821xx/netgear/config-default   |  45 ++
 target/linux/apm821xx/netgear/target.mk|   8 +
 .../202-add-netgear-wndr4700-support.patch |  32 +
 .../patches-4.4/301-fix-memory-map-wndr4700.patch  |  14 +
 .../702-powerpc_ibm_phy_add_dt_parser.patch| 335 +
 .../800-usb-dwc2-add-wndr4700-otg.patch|  48 ++
 .../801-usb-pci-quirks-add-renesas-fw-loader.patch | 420 
 .../802-usb-xhci-force-msi-renesas-xhci.patch  |  57 ++
 20 files changed, 2069 insertions(+), 2 deletions(-)
 create mode 100644 package/firmware/uPD72020x-firmware/Makefile
 create mode 100644 
target/linux/apm821xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
 create mode 100644