Re: [U-Boot] [PATCH V4 2/3] usb: eth: add ASIX AX88179 DRIVER

2014-12-21 Thread Marek Vasut
On Thursday, December 18, 2014 at 09:07:30 PM, Joe Hershberger wrote:
 On Thu, Dec 18, 2014 at 5:17 AM, Marek Vasut ma...@denx.de wrote:
  Would you pick it and submit for current release or do you want me to do
 
 it?
 
 If you can do it that would be great.

Applied 2/3 and 3/3, thank you!

Best regards,
Marek Vasut
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V4 2/3] usb: eth: add ASIX AX88179 DRIVER

2014-12-18 Thread Marek Vasut
On Thursday, December 18, 2014 at 07:53:56 AM, Joe Hershberger wrote:
 Hi Marek,
 
 On Wed, Dec 17, 2014 at 10:00 AM, Marek Vasut ma...@denx.de wrote:
  On Wednesday, December 17, 2014 at 01:33:57 PM, René Griessl wrote:
Is there a reason you can't implement write_hwaddr() so that it will
behave like other NICs (u-boot is the highest priority source of the
MAC address).
   
   The AX88179 uses an external flash to store the MAC address. So for my
   application I do not want the user to be able to change it, since it is
   a unique ID inside the server cluster.
   I could add it as compiler option. Maybe it is even better to implement
   my behavior as option, since it differs from standard.
   I think it will be finished mid of january, so if it is OK for you in a
   separate patch.
  
  Joe, can you just pick the patch as is and wait for subsequent patch to
 
 improve
 
  the driver? My understanding is that the driver is operating correctly
  and pulling the MAC from an integrated EEPROM, which is fine. If you
  want to
 
 allow
 
  overriding this MAC using the $ethaddr, this is only an improvement and
 
 can be
 
  added later. This would improve our hardware support and avoid blocking
 
 the
 
  driver further.
  
  What do you think please ?
 
 I agree... You may have noticed I already Acked it and agreed that the
 improvement may come later.

All righty, thanks!

Would you pick it and submit for current release or do you want me to do it?

Best regards,
Marek Vasut
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V4 2/3] usb: eth: add ASIX AX88179 DRIVER

2014-12-18 Thread Joe Hershberger
On Thu, Dec 18, 2014 at 5:17 AM, Marek Vasut ma...@denx.de wrote:
 Would you pick it and submit for current release or do you want me to do
it?

If you can do it that would be great.

Thanks,
-Joe
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V4 2/3] usb: eth: add ASIX AX88179 DRIVER

2014-12-17 Thread René Griessl




Is there a reason you can't implement write_hwaddr() so that it will 
behave like other NICs (u-boot is the highest priority source of the 
MAC address).




The AX88179 uses an external flash to store the MAC address. So for my 
application I do not want the user to be able to change it, since it is 
a unique ID inside the server cluster.
I could add it as compiler option. Maybe it is even better to implement 
my behavior as option, since it differs from standard.
I think it will be finished mid of january, so if it is OK for you in a 
separate patch.



Looks good to me otherwise.

Thanks,
-Joe



Thanks,
 Rene

 


___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V4 2/3] usb: eth: add ASIX AX88179 DRIVER

2014-12-17 Thread Joe Hershberger
On Wed, Dec 17, 2014 at 6:33 AM, René Griessl 
rgrie...@cit-ec.uni-bielefeld.de wrote:
 Is there a reason you can't implement write_hwaddr() so that it will
behave like other NICs (u-boot is the highest priority source of the MAC
address).

 The AX88179 uses an external flash to store the MAC address. So for my
application I do not want the user to be able to change it, since it is a
unique ID inside the server cluster.
 I could add it as compiler option. Maybe it is even better to implement
my behavior as option, since it differs from standard.

The feature is not supposed to cause any change to the flash stored MAC
address, but rather override it at run-time.  It is only overridden if the
user specifies a MAC in u-boot env.  This should not be a build option, but
just the way it always works.

 I think it will be finished mid of january, so if it is OK for you in a
separate patch.

That's fine.

Thanks,
-Joe
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V4 2/3] usb: eth: add ASIX AX88179 DRIVER

2014-12-17 Thread Joe Hershberger
On Fri, Nov 7, 2014 at 9:53 AM, Rene Griessl 
rgrie...@cit-ec.uni-bielefeld.de wrote:

 This patch adds driver support for the ASIX AX88179 USB3.0 to GbE network
 adapter.

 Driver has been tested on the RECS5250 COM module (similar to ARDALE5250).
 Testcase was DHCP and PXE boot.

 Signed-off-by: Rene Griessl rgrie...@cit-ec.uni-bielefeld.de
 ---
 changes for v4:
 -added dynamic RX bulk configuration
 changes for v3:
 -added all compatible devices from linux driver
  from commit cf8bf7cd13804fcb87b5f9ad026d5b823873e8cc
 -fixed issues from review
 changes for v2:
 -added usb_ether.h to change list
 -added 2nd patch to enable driver for arndale board

  drivers/usb/eth/Makefile|   1 +
  drivers/usb/eth/asix88179.c | 700

  drivers/usb/eth/usb_ether.c |   7 +
  include/usb_ether.h |   6 +
  4 files changed, 714 insertions(+)

Acked-by: Joe Hershberger joe.hershber...@ni.com
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V4 2/3] usb: eth: add ASIX AX88179 DRIVER

2014-12-17 Thread Marek Vasut
On Wednesday, December 17, 2014 at 01:33:57 PM, René Griessl wrote:
  Is there a reason you can't implement write_hwaddr() so that it will
  behave like other NICs (u-boot is the highest priority source of the
  MAC address).
 
 The AX88179 uses an external flash to store the MAC address. So for my
 application I do not want the user to be able to change it, since it is
 a unique ID inside the server cluster.
 I could add it as compiler option. Maybe it is even better to implement
 my behavior as option, since it differs from standard.
 I think it will be finished mid of january, so if it is OK for you in a
 separate patch.

Joe, can you just pick the patch as is and wait for subsequent patch to improve 
the driver? My understanding is that the driver is operating correctly and 
pulling the MAC from an integrated EEPROM, which is fine. If you want to allow
overriding this MAC using the $ethaddr, this is only an improvement and can be
added later. This would improve our hardware support and avoid blocking the 
driver further.

What do you think please ?

Best regards,
Marek Vasut
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V4 2/3] usb: eth: add ASIX AX88179 DRIVER

2014-12-17 Thread Joe Hershberger
Hi Marek,

On Wed, Dec 17, 2014 at 10:00 AM, Marek Vasut ma...@denx.de wrote:

 On Wednesday, December 17, 2014 at 01:33:57 PM, René Griessl wrote:
   Is there a reason you can't implement write_hwaddr() so that it will
   behave like other NICs (u-boot is the highest priority source of the
   MAC address).
 
  The AX88179 uses an external flash to store the MAC address. So for my
  application I do not want the user to be able to change it, since it is
  a unique ID inside the server cluster.
  I could add it as compiler option. Maybe it is even better to implement
  my behavior as option, since it differs from standard.
  I think it will be finished mid of january, so if it is OK for you in a
  separate patch.

 Joe, can you just pick the patch as is and wait for subsequent patch to
improve
 the driver? My understanding is that the driver is operating correctly and
 pulling the MAC from an integrated EEPROM, which is fine. If you want to
allow
 overriding this MAC using the $ethaddr, this is only an improvement and
can be
 added later. This would improve our hardware support and avoid blocking
the
 driver further.

 What do you think please ?

I agree... You may have noticed I already Acked it and agreed that the
improvement may come later.

Cheers,
-Joe
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V4 2/3] usb: eth: add ASIX AX88179 DRIVER

2014-12-15 Thread Joe Hershberger
Apologies for not reviewing this sooner.  Slipped off the radar.

On Fri, Nov 7, 2014 at 9:53 AM, Rene Griessl 
rgrie...@cit-ec.uni-bielefeld.de wrote:

 This patch adds driver support for the ASIX AX88179 USB3.0 to GbE network
 adapter.

 Driver has been tested on the RECS5250 COM module (similar to ARDALE5250).
 Testcase was DHCP and PXE boot.

 Signed-off-by: Rene Griessl rgrie...@cit-ec.uni-bielefeld.de
 ---
 changes for v4:
 -added dynamic RX bulk configuration
 changes for v3:
 -added all compatible devices from linux driver
  from commit cf8bf7cd13804fcb87b5f9ad026d5b823873e8cc
 -fixed issues from review
 changes for v2:
 -added usb_ether.h to change list
 -added 2nd patch to enable driver for arndale board

  drivers/usb/eth/Makefile|   1 +
  drivers/usb/eth/asix88179.c | 700

  drivers/usb/eth/usb_ether.c |   7 +
  include/usb_ether.h |   6 +
  4 files changed, 714 insertions(+)
  create mode 100644 drivers/usb/eth/asix88179.c

 diff --git a/drivers/usb/eth/Makefile b/drivers/usb/eth/Makefile
 index e6ae9f1..c92d2b0 100644
 --- a/drivers/usb/eth/Makefile
 +++ b/drivers/usb/eth/Makefile
 @@ -6,5 +6,6 @@
  # new USB host ethernet layer dependencies
  obj-$(CONFIG_USB_HOST_ETHER) += usb_ether.o
  obj-$(CONFIG_USB_ETHER_ASIX) += asix.o
 +obj-$(CONFIG_USB_ETHER_ASIX88179) += asix88179.o
  obj-$(CONFIG_USB_ETHER_MCS7830) += mcs7830.o
  obj-$(CONFIG_USB_ETHER_SMSC95XX) += smsc95xx.o
 diff --git a/drivers/usb/eth/asix88179.c b/drivers/usb/eth/asix88179.c
 new file mode 100644
 index 000..b8ca720
 --- /dev/null
 +++ b/drivers/usb/eth/asix88179.c
 @@ -0,0 +1,700 @@
 +/*
 + * Copyright (c) 2014 Rene Griessl rgrie...@cit-ec.uni-bielefeld.de
 + * based on the U-Boot Asix driver as well as information
 + * from the Linux AX88179_178a driver
 + *
 + * SPDX-License-Identifier:GPL-2.0+
 + */
 +
 +#include common.h
 +#include usb.h
 +#include net.h
 +#include linux/mii.h
 +#include usb_ether.h
 +#include malloc.h
 +#include errno.h
 +
 +/* ASIX AX88179 based USB 3.0 Ethernet Devices */
 +#define AX88179_PHY_ID 0x03
 +#define AX_EEPROM_LEN  0x100
 +#define AX88179_EEPROM_MAGIC   0x17900b95
 +#define AX_MCAST_FLTSIZE   8
 +#define AX_MAX_MCAST   64
 +#define AX_INT_PPLS_LINK   (1  16)
 +#define AX_RXHDR_L4_TYPE_MASK  0x1c
 +#define AX_RXHDR_L4_TYPE_UDP   4
 +#define AX_RXHDR_L4_TYPE_TCP   16
 +#define AX_RXHDR_L3CSUM_ERR2
 +#define AX_RXHDR_L4CSUM_ERR1
 +#define AX_RXHDR_CRC_ERR   (1  29)
 +#define AX_RXHDR_DROP_ERR  (1  31)
 +#define AX_ENDPOINT_INT0x01
 +#define AX_ENDPOINT_IN 0x02
 +#define AX_ENDPOINT_OUT0x03
 +#define AX_ACCESS_MAC  0x01
 +#define AX_ACCESS_PHY  0x02
 +#define AX_ACCESS_EEPROM   0x04
 +#define AX_ACCESS_EFUS 0x05
 +#define AX_PAUSE_WATERLVL_HIGH 0x54
 +#define AX_PAUSE_WATERLVL_LOW  0x55
 +
 +#define PHYSICAL_LINK_STATUS   0x02
 +   #define AX_USB_SS   (1  2)
 +   #define AX_USB_HS   (1  1)
 +
 +#define GENERAL_STATUS 0x03
 +   #define AX_SECLD(1  2)
 +
 +#define AX_SROM_ADDR   0x07
 +#define AX_SROM_CMD0x0a
 +   #define EEP_RD  (1  2)
 +   #define EEP_BUSY(1  4)
 +
 +#define AX_SROM_DATA_LOW   0x08
 +#define AX_SROM_DATA_HIGH  0x09
 +
 +#define AX_RX_CTL  0x0b
 +   #define AX_RX_CTL_DROPCRCERR(1  8)
 +   #define AX_RX_CTL_IPE   (1  9)
 +   #define AX_RX_CTL_START (1  7)
 +   #define AX_RX_CTL_AP(1  5)
 +   #define AX_RX_CTL_AM(1  4)
 +   #define AX_RX_CTL_AB(1  3)
 +   #define AX_RX_CTL_AMALL (1  1)
 +   #define AX_RX_CTL_PRO   (1  0)
 +   #define AX_RX_CTL_STOP  0
 +
 +#define AX_NODE_ID 0x10
 +#define AX_MULFLTARY   0x16
 +
 +#define AX_MEDIUM_STATUS_MODE  0x22
 +   #define AX_MEDIUM_GIGAMODE  (1  0)
 +   #define AX_MEDIUM_FULL_DUPLEX   (1  1)
 +   #define AX_MEDIUM_EN_125MHZ (1  3)
 +   #define AX_MEDIUM_RXFLOW_CTRLEN (1  4)
 +   #define AX_MEDIUM_TXFLOW_CTRLEN (1  5)
 +   #define AX_MEDIUM_RECEIVE_EN(1  8)
 +   #define AX_MEDIUM_PS(1  9)
 +   #define AX_MEDIUM_JUMBO_EN  0x8040
 +
 +#define AX_MONITOR_MOD 0x24
 

Re: [U-Boot] [PATCH V4 2/3] usb: eth: add ASIX AX88179 DRIVER

2014-12-12 Thread René Griessl


On 08.11.2014 12:31, Marek Vasut wrote:

On Friday, November 07, 2014 at 04:53:48 PM, Rene Griessl wrote:

This patch adds driver support for the ASIX AX88179 USB3.0 to GbE network
adapter.

Driver has been tested on the RECS5250 COM module (similar to ARDALE5250).
Testcase was DHCP and PXE boot.

Signed-off-by: Rene Griessl rgrie...@cit-ec.uni-bielefeld.de

Reviewed-by: Marek Vasut ma...@denx.de

Joe, can you take a look?

Best regards,
Marek Vasut


Please update status.

Best regards,
  Rene Griessl
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V4 2/3] usb: eth: add ASIX AX88179 DRIVER

2014-11-08 Thread Marek Vasut
On Friday, November 07, 2014 at 04:53:48 PM, Rene Griessl wrote:
 This patch adds driver support for the ASIX AX88179 USB3.0 to GbE network
 adapter.
 
 Driver has been tested on the RECS5250 COM module (similar to ARDALE5250).
 Testcase was DHCP and PXE boot.
 
 Signed-off-by: Rene Griessl rgrie...@cit-ec.uni-bielefeld.de

Reviewed-by: Marek Vasut ma...@denx.de

Joe, can you take a look?

Best regards,
Marek Vasut
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH V4 2/3] usb: eth: add ASIX AX88179 DRIVER

2014-11-07 Thread Rene Griessl
This patch adds driver support for the ASIX AX88179 USB3.0 to GbE network
adapter.

Driver has been tested on the RECS5250 COM module (similar to ARDALE5250).
Testcase was DHCP and PXE boot.

Signed-off-by: Rene Griessl rgrie...@cit-ec.uni-bielefeld.de
---
changes for v4:
-added dynamic RX bulk configuration
changes for v3:
-added all compatible devices from linux driver
 from commit cf8bf7cd13804fcb87b5f9ad026d5b823873e8cc
-fixed issues from review
changes for v2:
-added usb_ether.h to change list
-added 2nd patch to enable driver for arndale board

 drivers/usb/eth/Makefile|   1 +
 drivers/usb/eth/asix88179.c | 700 
 drivers/usb/eth/usb_ether.c |   7 +
 include/usb_ether.h |   6 +
 4 files changed, 714 insertions(+)
 create mode 100644 drivers/usb/eth/asix88179.c

diff --git a/drivers/usb/eth/Makefile b/drivers/usb/eth/Makefile
index e6ae9f1..c92d2b0 100644
--- a/drivers/usb/eth/Makefile
+++ b/drivers/usb/eth/Makefile
@@ -6,5 +6,6 @@
 # new USB host ethernet layer dependencies
 obj-$(CONFIG_USB_HOST_ETHER) += usb_ether.o
 obj-$(CONFIG_USB_ETHER_ASIX) += asix.o
+obj-$(CONFIG_USB_ETHER_ASIX88179) += asix88179.o
 obj-$(CONFIG_USB_ETHER_MCS7830) += mcs7830.o
 obj-$(CONFIG_USB_ETHER_SMSC95XX) += smsc95xx.o
diff --git a/drivers/usb/eth/asix88179.c b/drivers/usb/eth/asix88179.c
new file mode 100644
index 000..b8ca720
--- /dev/null
+++ b/drivers/usb/eth/asix88179.c
@@ -0,0 +1,700 @@
+/*
+ * Copyright (c) 2014 Rene Griessl rgrie...@cit-ec.uni-bielefeld.de
+ * based on the U-Boot Asix driver as well as information
+ * from the Linux AX88179_178a driver
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+#include common.h
+#include usb.h
+#include net.h
+#include linux/mii.h
+#include usb_ether.h
+#include malloc.h
+#include errno.h
+
+/* ASIX AX88179 based USB 3.0 Ethernet Devices */
+#define AX88179_PHY_ID 0x03
+#define AX_EEPROM_LEN  0x100
+#define AX88179_EEPROM_MAGIC   0x17900b95
+#define AX_MCAST_FLTSIZE   8
+#define AX_MAX_MCAST   64
+#define AX_INT_PPLS_LINK   (1  16)
+#define AX_RXHDR_L4_TYPE_MASK  0x1c
+#define AX_RXHDR_L4_TYPE_UDP   4
+#define AX_RXHDR_L4_TYPE_TCP   16
+#define AX_RXHDR_L3CSUM_ERR2
+#define AX_RXHDR_L4CSUM_ERR1
+#define AX_RXHDR_CRC_ERR   (1  29)
+#define AX_RXHDR_DROP_ERR  (1  31)
+#define AX_ENDPOINT_INT0x01
+#define AX_ENDPOINT_IN 0x02
+#define AX_ENDPOINT_OUT0x03
+#define AX_ACCESS_MAC  0x01
+#define AX_ACCESS_PHY  0x02
+#define AX_ACCESS_EEPROM   0x04
+#define AX_ACCESS_EFUS 0x05
+#define AX_PAUSE_WATERLVL_HIGH 0x54
+#define AX_PAUSE_WATERLVL_LOW  0x55
+
+#define PHYSICAL_LINK_STATUS   0x02
+   #define AX_USB_SS   (1  2)
+   #define AX_USB_HS   (1  1)
+
+#define GENERAL_STATUS 0x03
+   #define AX_SECLD(1  2)
+
+#define AX_SROM_ADDR   0x07
+#define AX_SROM_CMD0x0a
+   #define EEP_RD  (1  2)
+   #define EEP_BUSY(1  4)
+
+#define AX_SROM_DATA_LOW   0x08
+#define AX_SROM_DATA_HIGH  0x09
+
+#define AX_RX_CTL  0x0b
+   #define AX_RX_CTL_DROPCRCERR(1  8)
+   #define AX_RX_CTL_IPE   (1  9)
+   #define AX_RX_CTL_START (1  7)
+   #define AX_RX_CTL_AP(1  5)
+   #define AX_RX_CTL_AM(1  4)
+   #define AX_RX_CTL_AB(1  3)
+   #define AX_RX_CTL_AMALL (1  1)
+   #define AX_RX_CTL_PRO   (1  0)
+   #define AX_RX_CTL_STOP  0
+
+#define AX_NODE_ID 0x10
+#define AX_MULFLTARY   0x16
+
+#define AX_MEDIUM_STATUS_MODE  0x22
+   #define AX_MEDIUM_GIGAMODE  (1  0)
+   #define AX_MEDIUM_FULL_DUPLEX   (1  1)
+   #define AX_MEDIUM_EN_125MHZ (1  3)
+   #define AX_MEDIUM_RXFLOW_CTRLEN (1  4)
+   #define AX_MEDIUM_TXFLOW_CTRLEN (1  5)
+   #define AX_MEDIUM_RECEIVE_EN(1  8)
+   #define AX_MEDIUM_PS(1  9)
+   #define AX_MEDIUM_JUMBO_EN  0x8040
+
+#define AX_MONITOR_MOD 0x24
+   #define AX_MONITOR_MODE_RWLC(1  1)
+   #define AX_MONITOR_MODE_RWMP(1  2)
+   #define AX_MONITOR_MODE_PMEPOL  (1  5)
+   #define AX_MONITOR_MODE_PMETYPE (1  6)
+
+#define AX_GPIO_CTRL   0x25
+   #define