Development issues regarding the cerowrt test router project
 help / color / mirror / Atom feed
* [Cerowrt-devel] [PATCH] [lantiq] adds dgn3500 support
@ 2012-11-13 13:23 John Crispin
  2012-11-13 13:39 ` Dave Taht
  0 siblings, 1 reply; 2+ messages in thread
From: John Crispin @ 2012-11-13 13:23 UTC (permalink / raw)
  To: dave.taht; +Cc: cerowrt-devel, John Crispin

backport from openwrt AA branch r34183

makes the unit fully functional, spi flash is a bit slow as we use gpio
bitbanging until the irq issue of the hardwrae spi is fixed

Signed-off-by: John Crispin <blogic@openwrt.org>
---
 target/linux/lantiq/ar9/config-default               |   12 ++++++++++--
 target/linux/lantiq/ar9/profiles/002-netgear.mk      |    2 +-
 target/linux/lantiq/ar9/target.mk                    |    2 +-
 .../files/arch/mips/lantiq/xway/mach-netgear.c       |   18 ++++++++++++++++++
 4 files changed, 30 insertions(+), 4 deletions(-)

diff --git a/target/linux/lantiq/ar9/config-default b/target/linux/lantiq/ar9/config-default
index 67b6a46..f1ec989 100644
--- a/target/linux/lantiq/ar9/config-default
+++ b/target/linux/lantiq/ar9/config-default
@@ -1,13 +1,15 @@
 CONFIG_ADM6996_PHY=y
 CONFIG_AR8216_PHY=y
-# CONFIG_ATMEL_PWM is not set
 CONFIG_CLKDEV_LOOKUP=y
 CONFIG_FSNOTIFY=y
 CONFIG_HAVE_MACH_CLKDEV=y
+CONFIG_HOTPLUG_PCI=y
+# CONFIG_HOTPLUG_PCI_CPCI is not set
+CONFIG_HOTPLUG_PCI_FAKE=y
+# CONFIG_HOTPLUG_PCI_SHPC is not set
 CONFIG_HW_HAS_PCI=y
 CONFIG_INPUT=y
 CONFIG_INPUT_EVDEV=y
-# CONFIG_INPUT_GPIO_BUTTONS is not set
 CONFIG_INPUT_POLLDEV=y
 CONFIG_IRQ_FORCED_THREADING=y
 # CONFIG_ISDN is not set
@@ -22,8 +24,10 @@ CONFIG_LANTIQ_MACH_WBMR=y
 CONFIG_LANTIQ_MACH_P2601HNFX=y
 CONFIG_LANTIQ_MACH_H201L=y
 # CONFIG_LANTIQ_VRX200 is not set
+CONFIG_M25PXX_USE_FAST_READ=y
 CONFIG_MDIO_BOARDINFO=y
 CONFIG_MTD_BLOCK2MTD=y
+CONFIG_MTD_M25P80=y
 CONFIG_PCI=y
 # CONFIG_PCIEPORTBUS is not set
 # CONFIG_PCIE_LANTIQ is not set
@@ -36,5 +40,9 @@ CONFIG_RTL8306_PHY=y
 CONFIG_SOC_TYPE_XWAY=y
 CONFIG_SOC_XWAY=y
 # CONFIG_SOC_SVIP is not set
+CONFIG_SPI=y
+CONFIG_SPI_BITBANG=y
+CONFIG_SPI_GPIO=y
+CONFIG_SPI_MASTER=y
 CONFIG_USB_ARCH_HAS_XHCI=y
 CONFIG_USB_SUPPORT=y
diff --git a/target/linux/lantiq/ar9/profiles/002-netgear.mk b/target/linux/lantiq/ar9/profiles/002-netgear.mk
index a3c83bb..928dc8e 100644
--- a/target/linux/lantiq/ar9/profiles/002-netgear.mk
+++ b/target/linux/lantiq/ar9/profiles/002-netgear.mk
@@ -1,6 +1,6 @@
 define Profile/DGN3500B
   NAME:=DGN3500B Netgear
-  PACKAGES:= kmod-usb-core kmod-usb-dwc-otg
+  PACKAGES:= kmod-usb-core kmod-usb-dwc-otg kmod-ath9k kmod-ltq-dsl-firmware-b-ar9
 endef
 
 define Profile/DGN3500B/Description
diff --git a/target/linux/lantiq/ar9/target.mk b/target/linux/lantiq/ar9/target.mk
index cb57b88..0d35fa0 100644
--- a/target/linux/lantiq/ar9/target.mk
+++ b/target/linux/lantiq/ar9/target.mk
@@ -5,7 +5,7 @@ FEATURES:=squashfs jffs2 atm
 
 DEFAULT_PACKAGES+=kmod-pppoa ppp-mod-pppoa linux-atm atm-tools br2684ctl kmod-ltq-dsl-ar9 ltq-dsl-app \
 	kmod-input-gpio-keys-polled kmod-ledtrig-netdev kmod-leds-gpio kmod-button-hotplug \
-	swconfig
+	swconfig wpad-mini
 
 define Target/Description
 	Lantiq AR9
diff --git a/target/linux/lantiq/files/arch/mips/lantiq/xway/mach-netgear.c b/target/linux/lantiq/files/arch/mips/lantiq/xway/mach-netgear.c
index 29b0728..bb28537 100644
--- a/target/linux/lantiq/files/arch/mips/lantiq/xway/mach-netgear.c
+++ b/target/linux/lantiq/files/arch/mips/lantiq/xway/mach-netgear.c
@@ -22,6 +22,7 @@
 #include <linux/etherdevice.h>
 #include <linux/kobject.h>
 #include <linux/sysfs.h>
+#include <linux/rtl8366.h>
 
 #include <lantiq_soc.h>
 #include <irq.h>
@@ -149,6 +150,22 @@ static int __init setup_ethaddr(char *str)
 }
 __setup("ethaddr=", setup_ethaddr);
 
+#define smi_SCK		37
+#define smi_SDA		35
+
+static struct rtl8366_platform_data rtl8366rb_data = {
+	.gpio_sda = smi_SDA,
+	.gpio_sck = smi_SCK,
+};
+
+static struct platform_device rtl8366rb_device = {
+	.name = RTL8366RB_DRIVER_NAME,
+	.id = -1,
+	.dev = {
+		.platform_data  = &rtl8366rb_data,
+	}
+};
+
 static u16 dgn3500_eeprom_data[ATH9K_PLAT_EEP_MAX_WORDS] = {0};
 
 static ssize_t ath_eeprom_read(struct file *filp, struct kobject *kobj,
@@ -231,6 +248,7 @@ static void __init dgn3500_init(void)
 	ltq_pci_ath_fixup(14, dgn3500_eeprom_data);
 	/* The usb power is always enabled, protected by a fuse */
 	xway_register_dwc(-1);
+	platform_device_register(&rtl8366rb_device);
 }
 
 MIPS_MACHINE(LANTIQ_MACH_DGN3500B,
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Cerowrt-devel] [PATCH] [lantiq] adds dgn3500 support
  2012-11-13 13:23 [Cerowrt-devel] [PATCH] [lantiq] adds dgn3500 support John Crispin
@ 2012-11-13 13:39 ` Dave Taht
  0 siblings, 0 replies; 2+ messages in thread
From: Dave Taht @ 2012-11-13 13:39 UTC (permalink / raw)
  To: John Crispin; +Cc: cerowrt-devel

As a followup to those that haven't been tracking irc, John has been
working on adding BQL and ADSL fixes to this box:

http://www.amazon.fr/Netgear-DGN3500-100PES-Routeur-Firewall-ethernet/dp/B002YCD2YI/ref=sr_1_1?ie=UTF8&qid=1352807456&sr=8-1

Which is available as annex A and B (e.g. worldwide! support for ADSL2(+)).

Those of you using cerowrt/openwrt WITH ADSL would gain benefit from
using this box, (zero configuration fq_codel!).

I'm utterly delighted to have a second debloated platform coming
available that can talk directly to the core ADSL technologies.

This board is on the lantiq chipset.

It has the same ath9k wireless chip as the wndr3800 we already support.

It booted cerowrt for the first time a few minutes ago, and it's
already in the openwrt tree. However I should caution that the current
state of things is rather bleeding edge, as usual. First bootlog here:

http://dev.phrozen.org/dgn-AA-beta3.log

If a few testers appear here or elsewhere, we can get off the bleeding
edge, fast....

My hat is off to john (who has been working on this in his spare time
for months now) for getting to this point.

There are a couple other ADSL boards in the pipeline...

On Tue, Nov 13, 2012 at 2:23 PM, John Crispin <blogic@openwrt.org> wrote:
> backport from openwrt AA branch r34183
>
> makes the unit fully functional, spi flash is a bit slow as we use gpio
> bitbanging until the irq issue of the hardwrae spi is fixed
>
> Signed-off-by: John Crispin <blogic@openwrt.org>
> ---
>  target/linux/lantiq/ar9/config-default               |   12 ++++++++++--
>  target/linux/lantiq/ar9/profiles/002-netgear.mk      |    2 +-
>  target/linux/lantiq/ar9/target.mk                    |    2 +-
>  .../files/arch/mips/lantiq/xway/mach-netgear.c       |   18 ++++++++++++++++++
>  4 files changed, 30 insertions(+), 4 deletions(-)
>
> diff --git a/target/linux/lantiq/ar9/config-default b/target/linux/lantiq/ar9/config-default
> index 67b6a46..f1ec989 100644
> --- a/target/linux/lantiq/ar9/config-default
> +++ b/target/linux/lantiq/ar9/config-default
> @@ -1,13 +1,15 @@
>  CONFIG_ADM6996_PHY=y
>  CONFIG_AR8216_PHY=y
> -# CONFIG_ATMEL_PWM is not set
>  CONFIG_CLKDEV_LOOKUP=y
>  CONFIG_FSNOTIFY=y
>  CONFIG_HAVE_MACH_CLKDEV=y
> +CONFIG_HOTPLUG_PCI=y
> +# CONFIG_HOTPLUG_PCI_CPCI is not set
> +CONFIG_HOTPLUG_PCI_FAKE=y
> +# CONFIG_HOTPLUG_PCI_SHPC is not set
>  CONFIG_HW_HAS_PCI=y
>  CONFIG_INPUT=y
>  CONFIG_INPUT_EVDEV=y
> -# CONFIG_INPUT_GPIO_BUTTONS is not set
>  CONFIG_INPUT_POLLDEV=y
>  CONFIG_IRQ_FORCED_THREADING=y
>  # CONFIG_ISDN is not set
> @@ -22,8 +24,10 @@ CONFIG_LANTIQ_MACH_WBMR=y
>  CONFIG_LANTIQ_MACH_P2601HNFX=y
>  CONFIG_LANTIQ_MACH_H201L=y
>  # CONFIG_LANTIQ_VRX200 is not set
> +CONFIG_M25PXX_USE_FAST_READ=y
>  CONFIG_MDIO_BOARDINFO=y
>  CONFIG_MTD_BLOCK2MTD=y
> +CONFIG_MTD_M25P80=y
>  CONFIG_PCI=y
>  # CONFIG_PCIEPORTBUS is not set
>  # CONFIG_PCIE_LANTIQ is not set
> @@ -36,5 +40,9 @@ CONFIG_RTL8306_PHY=y
>  CONFIG_SOC_TYPE_XWAY=y
>  CONFIG_SOC_XWAY=y
>  # CONFIG_SOC_SVIP is not set
> +CONFIG_SPI=y
> +CONFIG_SPI_BITBANG=y
> +CONFIG_SPI_GPIO=y
> +CONFIG_SPI_MASTER=y
>  CONFIG_USB_ARCH_HAS_XHCI=y
>  CONFIG_USB_SUPPORT=y
> diff --git a/target/linux/lantiq/ar9/profiles/002-netgear.mk b/target/linux/lantiq/ar9/profiles/002-netgear.mk
> index a3c83bb..928dc8e 100644
> --- a/target/linux/lantiq/ar9/profiles/002-netgear.mk
> +++ b/target/linux/lantiq/ar9/profiles/002-netgear.mk
> @@ -1,6 +1,6 @@
>  define Profile/DGN3500B
>    NAME:=DGN3500B Netgear
> -  PACKAGES:= kmod-usb-core kmod-usb-dwc-otg
> +  PACKAGES:= kmod-usb-core kmod-usb-dwc-otg kmod-ath9k kmod-ltq-dsl-firmware-b-ar9
>  endef
>
>  define Profile/DGN3500B/Description
> diff --git a/target/linux/lantiq/ar9/target.mk b/target/linux/lantiq/ar9/target.mk
> index cb57b88..0d35fa0 100644
> --- a/target/linux/lantiq/ar9/target.mk
> +++ b/target/linux/lantiq/ar9/target.mk
> @@ -5,7 +5,7 @@ FEATURES:=squashfs jffs2 atm
>
>  DEFAULT_PACKAGES+=kmod-pppoa ppp-mod-pppoa linux-atm atm-tools br2684ctl kmod-ltq-dsl-ar9 ltq-dsl-app \
>         kmod-input-gpio-keys-polled kmod-ledtrig-netdev kmod-leds-gpio kmod-button-hotplug \
> -       swconfig
> +       swconfig wpad-mini
>
>  define Target/Description
>         Lantiq AR9
> diff --git a/target/linux/lantiq/files/arch/mips/lantiq/xway/mach-netgear.c b/target/linux/lantiq/files/arch/mips/lantiq/xway/mach-netgear.c
> index 29b0728..bb28537 100644
> --- a/target/linux/lantiq/files/arch/mips/lantiq/xway/mach-netgear.c
> +++ b/target/linux/lantiq/files/arch/mips/lantiq/xway/mach-netgear.c
> @@ -22,6 +22,7 @@
>  #include <linux/etherdevice.h>
>  #include <linux/kobject.h>
>  #include <linux/sysfs.h>
> +#include <linux/rtl8366.h>
>
>  #include <lantiq_soc.h>
>  #include <irq.h>
> @@ -149,6 +150,22 @@ static int __init setup_ethaddr(char *str)
>  }
>  __setup("ethaddr=", setup_ethaddr);
>
> +#define smi_SCK                37
> +#define smi_SDA                35
> +
> +static struct rtl8366_platform_data rtl8366rb_data = {
> +       .gpio_sda = smi_SDA,
> +       .gpio_sck = smi_SCK,
> +};
> +
> +static struct platform_device rtl8366rb_device = {
> +       .name = RTL8366RB_DRIVER_NAME,
> +       .id = -1,
> +       .dev = {
> +               .platform_data  = &rtl8366rb_data,
> +       }
> +};
> +
>  static u16 dgn3500_eeprom_data[ATH9K_PLAT_EEP_MAX_WORDS] = {0};
>
>  static ssize_t ath_eeprom_read(struct file *filp, struct kobject *kobj,
> @@ -231,6 +248,7 @@ static void __init dgn3500_init(void)
>         ltq_pci_ath_fixup(14, dgn3500_eeprom_data);
>         /* The usb power is always enabled, protected by a fuse */
>         xway_register_dwc(-1);
> +       platform_device_register(&rtl8366rb_device);
>  }
>
>  MIPS_MACHINE(LANTIQ_MACH_DGN3500B,
> --
> 1.7.10.4
>
> _______________________________________________
> Cerowrt-devel mailing list
> Cerowrt-devel@lists.bufferbloat.net
> https://lists.bufferbloat.net/listinfo/cerowrt-devel



-- 
Dave Täht

Fixing bufferbloat with cerowrt: http://www.teklibre.com/cerowrt/subscribe.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-11-13 13:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-13 13:23 [Cerowrt-devel] [PATCH] [lantiq] adds dgn3500 support John Crispin
2012-11-13 13:39 ` Dave Taht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox