All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] MIPS: OCTEON: Minimal support for D-Link DSR-1000N
@ 2014-06-28 20:34 Aaro Koskinen
  2014-06-28 20:34 ` [PATCH 1/3] MIPS: OCTEON: cvmx-bootinfo: add " Aaro Koskinen
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Aaro Koskinen @ 2014-06-28 20:34 UTC (permalink / raw)
  To: linux-mips, linux-kernel, Ralf Baechle, David Daney; +Cc: Aaro Koskinen

Hi,

The following patches add minimal support for D-Link DSR-1000N router.
USB and ethernet ports should now work with these patches.
(I guess WLAN (PCI/ath9k) should work too; I was able to scan networks,
but for some reason it did not connect to my AP.)

Aaro Koskinen (3):
  MIPS: OCTEON: cvmx-bootinfo: add D-Link DSR-1000N
  MIPS: OCTEON: add USB clock type for D-Link DSR-1000N
  MIPS: OCTEON: add interface & port definitions for D-Link DSR-1000N

 .../cavium-octeon/executive/cvmx-helper-board.c    | 22 ++++++++++++++++++++++
 arch/mips/include/asm/octeon/cvmx-bootinfo.h       |  2 ++
 2 files changed, 24 insertions(+)

-- 
2.0.0


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

* [PATCH 1/3] MIPS: OCTEON: cvmx-bootinfo: add D-Link DSR-1000N
  2014-06-28 20:34 [PATCH 0/3] MIPS: OCTEON: Minimal support for D-Link DSR-1000N Aaro Koskinen
@ 2014-06-28 20:34 ` Aaro Koskinen
  2014-06-28 20:34 ` [PATCH 2/3] MIPS: OCTEON: add USB clock type for " Aaro Koskinen
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 10+ messages in thread
From: Aaro Koskinen @ 2014-06-28 20:34 UTC (permalink / raw)
  To: linux-mips, linux-kernel, Ralf Baechle, David Daney; +Cc: Aaro Koskinen

Add a definition for D-Link DSR-1000N router. The bootloader on this board
supplies 20006 in the bootinfo; the enum CVMX_BOARD_TYPE_CUST_DSR1000N
comes from the GPL sources of the board.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
---
 arch/mips/include/asm/octeon/cvmx-bootinfo.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/mips/include/asm/octeon/cvmx-bootinfo.h b/arch/mips/include/asm/octeon/cvmx-bootinfo.h
index 7b7818d..2298199 100644
--- a/arch/mips/include/asm/octeon/cvmx-bootinfo.h
+++ b/arch/mips/include/asm/octeon/cvmx-bootinfo.h
@@ -228,6 +228,7 @@ enum cvmx_board_types_enum {
 	 */
 	CVMX_BOARD_TYPE_CUST_PRIVATE_MIN = 20001,
 	CVMX_BOARD_TYPE_UBNT_E100 = 20002,
+	CVMX_BOARD_TYPE_CUST_DSR1000N = 20006,
 	CVMX_BOARD_TYPE_CUST_PRIVATE_MAX = 30000,
 
 	/* The remaining range is reserved for future use. */
@@ -327,6 +328,7 @@ static inline const char *cvmx_board_type_to_string(enum
 		    /* Customer private range */
 		ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_PRIVATE_MIN)
 		ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_UBNT_E100)
+		ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_DSR1000N)
 		ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_PRIVATE_MAX)
 	}
 	return "Unsupported Board";
-- 
2.0.0


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

* [PATCH 2/3] MIPS: OCTEON: add USB clock type for D-Link DSR-1000N
  2014-06-28 20:34 [PATCH 0/3] MIPS: OCTEON: Minimal support for D-Link DSR-1000N Aaro Koskinen
  2014-06-28 20:34 ` [PATCH 1/3] MIPS: OCTEON: cvmx-bootinfo: add " Aaro Koskinen
@ 2014-06-28 20:34 ` Aaro Koskinen
  2014-06-28 20:34 ` [PATCH 3/3] MIPS: OCTEON: add interface & port definitions " Aaro Koskinen
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 10+ messages in thread
From: Aaro Koskinen @ 2014-06-28 20:34 UTC (permalink / raw)
  To: linux-mips, linux-kernel, Ralf Baechle, David Daney; +Cc: Aaro Koskinen

Add USB clock type for D-Link DSR-1000N.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
---
 arch/mips/cavium-octeon/executive/cvmx-helper-board.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/mips/cavium-octeon/executive/cvmx-helper-board.c b/arch/mips/cavium-octeon/executive/cvmx-helper-board.c
index b764df6..6c871a5 100644
--- a/arch/mips/cavium-octeon/executive/cvmx-helper-board.c
+++ b/arch/mips/cavium-octeon/executive/cvmx-helper-board.c
@@ -738,6 +738,7 @@ enum cvmx_helper_board_usb_clock_types __cvmx_helper_board_usb_get_clock_type(vo
 	case CVMX_BOARD_TYPE_LANAI2_G:
 	case CVMX_BOARD_TYPE_NIC10E_66:
 	case CVMX_BOARD_TYPE_UBNT_E100:
+	case CVMX_BOARD_TYPE_CUST_DSR1000N:
 		return USB_CLOCK_TYPE_CRYSTAL_12;
 	case CVMX_BOARD_TYPE_NIC10E:
 		return USB_CLOCK_TYPE_REF_12;
-- 
2.0.0


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

* [PATCH 3/3] MIPS: OCTEON: add interface & port definitions for D-Link DSR-1000N
  2014-06-28 20:34 [PATCH 0/3] MIPS: OCTEON: Minimal support for D-Link DSR-1000N Aaro Koskinen
  2014-06-28 20:34 ` [PATCH 1/3] MIPS: OCTEON: cvmx-bootinfo: add " Aaro Koskinen
  2014-06-28 20:34 ` [PATCH 2/3] MIPS: OCTEON: add USB clock type for " Aaro Koskinen
@ 2014-06-28 20:34 ` Aaro Koskinen
  2014-06-29  8:58 ` [PATCH 0/3] MIPS: OCTEON: Minimal support " John Crispin
  2014-06-30 17:14 ` David Daney
  4 siblings, 0 replies; 10+ messages in thread
From: Aaro Koskinen @ 2014-06-28 20:34 UTC (permalink / raw)
  To: linux-mips, linux-kernel, Ralf Baechle, David Daney; +Cc: Aaro Koskinen

Add interface & port definitions for D-Link DSR-1000N.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
---
 .../cavium-octeon/executive/cvmx-helper-board.c     | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/arch/mips/cavium-octeon/executive/cvmx-helper-board.c b/arch/mips/cavium-octeon/executive/cvmx-helper-board.c
index 6c871a5..5dfef84 100644
--- a/arch/mips/cavium-octeon/executive/cvmx-helper-board.c
+++ b/arch/mips/cavium-octeon/executive/cvmx-helper-board.c
@@ -186,6 +186,15 @@ int cvmx_helper_board_get_mii_address(int ipd_port)
 			return 7 - ipd_port;
 		else
 			return -1;
+	case CVMX_BOARD_TYPE_CUST_DSR1000N:
+		/*
+		 * Port 2 connects to Broadcom PHY (B5081). Other ports (0-1)
+		 * connect to a switch (BCM53115).
+		 */
+		if (ipd_port == 2)
+			return 8;
+		else
+			return -1;
 	}
 
 	/* Some unknown board. Somebody forgot to update this function... */
@@ -274,6 +283,18 @@ cvmx_helper_link_info_t __cvmx_helper_board_link_get(int ipd_port)
 			return result;
 		}
 		break;
+	case CVMX_BOARD_TYPE_CUST_DSR1000N:
+		if (ipd_port == 0 || ipd_port == 1) {
+			/* Ports 0 and 1 connect to a switch (BCM53115). */
+			result.s.link_up = 1;
+			result.s.full_duplex = 1;
+			result.s.speed = 1000;
+			return result;
+		} else {
+			/* Port 2 uses a Broadcom PHY (B5081). */
+			is_broadcom_phy = 1;
+		}
+		break;
 	}
 
 	phy_addr = cvmx_helper_board_get_mii_address(ipd_port);
-- 
2.0.0


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

* Re: [PATCH 0/3] MIPS: OCTEON: Minimal support for D-Link DSR-1000N
  2014-06-28 20:34 [PATCH 0/3] MIPS: OCTEON: Minimal support for D-Link DSR-1000N Aaro Koskinen
                   ` (2 preceding siblings ...)
  2014-06-28 20:34 ` [PATCH 3/3] MIPS: OCTEON: add interface & port definitions " Aaro Koskinen
@ 2014-06-29  8:58 ` John Crispin
  2014-06-29 13:58   ` Aaro Koskinen
  2014-06-30 17:14 ` David Daney
  4 siblings, 1 reply; 10+ messages in thread
From: John Crispin @ 2014-06-29  8:58 UTC (permalink / raw)
  To: Aaro Koskinen; +Cc: linux-mips



On 28/06/2014 22:34, Aaro Koskinen wrote:
> Hi,
> 
> The following patches add minimal support for D-Link DSR-1000N
> router. USB and ethernet ports should now work with these patches. 
> (I guess WLAN (PCI/ath9k) should work too; I was able to scan
> networks, but for some reason it did not connect to my AP.)
> 
> Aaro Koskinen (3): MIPS: OCTEON: cvmx-bootinfo: add D-Link
> DSR-1000N MIPS: OCTEON: add USB clock type for D-Link DSR-1000N 
> MIPS: OCTEON: add interface & port definitions for D-Link
> DSR-1000N
> 
> .../cavium-octeon/executive/cvmx-helper-board.c    | 22
> ++++++++++++++++++++++ arch/mips/include/asm/octeon/cvmx-bootinfo.h
> |  2 ++ 2 files changed, 24 insertions(+)
> 


Hi Aaro,

can you tell me what wifi is inside the unit ? and is it soldered onto
the pcb or is there pci/e slot ?

	John

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

* Re: [PATCH 0/3] MIPS: OCTEON: Minimal support for D-Link DSR-1000N
  2014-06-29  8:58 ` [PATCH 0/3] MIPS: OCTEON: Minimal support " John Crispin
@ 2014-06-29 13:58   ` Aaro Koskinen
  2014-06-29 14:04     ` John Crispin
  0 siblings, 1 reply; 10+ messages in thread
From: Aaro Koskinen @ 2014-06-29 13:58 UTC (permalink / raw)
  To: John Crispin; +Cc: linux-mips

Hi,

On Sun, Jun 29, 2014 at 10:58:42AM +0200, John Crispin wrote:
> On 28/06/2014 22:34, Aaro Koskinen wrote:
> > The following patches add minimal support for D-Link DSR-1000N
> > router. USB and ethernet ports should now work with these patches. 
> > (I guess WLAN (PCI/ath9k) should work too; I was able to scan
> > networks, but for some reason it did not connect to my AP.)
> 
> can you tell me what wifi is inside the unit ? and is it soldered onto
> the pcb or is there pci/e slot ?

The chipset is AR9160-BC1A. It's removable, on a mini-PCI slot.

00:03.0 Class 0280: 168c:0027

[    4.760516] ieee80211 phy0: Atheros AR9160 MAC/BB Rev:1 AR5133 RF Rev:b0 mem
=0x80011b00f0000000, irq=110

A.

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

* Re: [PATCH 0/3] MIPS: OCTEON: Minimal support for D-Link DSR-1000N
  2014-06-29 13:58   ` Aaro Koskinen
@ 2014-06-29 14:04     ` John Crispin
  0 siblings, 0 replies; 10+ messages in thread
From: John Crispin @ 2014-06-29 14:04 UTC (permalink / raw)
  To: Aaro Koskinen; +Cc: linux-mips



On 29/06/2014 15:58, Aaro Koskinen wrote:
> Hi,
> 
> On Sun, Jun 29, 2014 at 10:58:42AM +0200, John Crispin wrote:
>> On 28/06/2014 22:34, Aaro Koskinen wrote:
>>> The following patches add minimal support for D-Link DSR-1000N 
>>> router. USB and ethernet ports should now work with these
>>> patches. (I guess WLAN (PCI/ath9k) should work too; I was able
>>> to scan networks, but for some reason it did not connect to my
>>> AP.)
>> 
>> can you tell me what wifi is inside the unit ? and is it soldered
>> onto the pcb or is there pci/e slot ?
> 
> The chipset is AR9160-BC1A. It's removable, on a mini-PCI slot.
> 
> 00:03.0 Class 0280: 168c:0027
> 
> [    4.760516] ieee80211 phy0: Atheros AR9160 MAC/BB Rev:1 AR5133
> RF Rev:b0 mem =0x80011b00f0000000, irq=110
> 
> A.
> 

Thanks for the info,

	John

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

* Re: [PATCH 0/3] MIPS: OCTEON: Minimal support for D-Link DSR-1000N
  2014-06-28 20:34 [PATCH 0/3] MIPS: OCTEON: Minimal support for D-Link DSR-1000N Aaro Koskinen
                   ` (3 preceding siblings ...)
  2014-06-29  8:58 ` [PATCH 0/3] MIPS: OCTEON: Minimal support " John Crispin
@ 2014-06-30 17:14 ` David Daney
  2014-06-30 19:17   ` Aaro Koskinen
  4 siblings, 1 reply; 10+ messages in thread
From: David Daney @ 2014-06-30 17:14 UTC (permalink / raw)
  To: Aaro Koskinen; +Cc: linux-mips, linux-kernel, Ralf Baechle

On 06/28/2014 01:34 PM, Aaro Koskinen wrote:
> Hi,
>
> The following patches add minimal support for D-Link DSR-1000N router.

Which OCTEON chip does this device contain?

Also what is the bootloader version on the board?

David Daney


> USB and ethernet ports should now work with these patches.
> (I guess WLAN (PCI/ath9k) should work too; I was able to scan networks,
> but for some reason it did not connect to my AP.)
>
> Aaro Koskinen (3):
>    MIPS: OCTEON: cvmx-bootinfo: add D-Link DSR-1000N
>    MIPS: OCTEON: add USB clock type for D-Link DSR-1000N
>    MIPS: OCTEON: add interface & port definitions for D-Link DSR-1000N
>
>   .../cavium-octeon/executive/cvmx-helper-board.c    | 22 ++++++++++++++++++++++
>   arch/mips/include/asm/octeon/cvmx-bootinfo.h       |  2 ++
>   2 files changed, 24 insertions(+)
>


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

* Re: [PATCH 0/3] MIPS: OCTEON: Minimal support for D-Link DSR-1000N
  2014-06-30 17:14 ` David Daney
@ 2014-06-30 19:17   ` Aaro Koskinen
  2014-06-30 20:32     ` David Daney
  0 siblings, 1 reply; 10+ messages in thread
From: Aaro Koskinen @ 2014-06-30 19:17 UTC (permalink / raw)
  To: David Daney; +Cc: linux-mips, linux-kernel, Ralf Baechle

Hi,

On Mon, Jun 30, 2014 at 10:14:54AM -0700, David Daney wrote:
> On 06/28/2014 01:34 PM, Aaro Koskinen wrote:
> >The following patches add minimal support for D-Link DSR-1000N router.
> 
> Which OCTEON chip does this device contain?

[    0.000000] CPU0 revision is: 000d0601 (Cavium Octeon+)

# cat /proc/cpuinfo
system type             : CUST_DSR1000N (CN5010p1.1-500-SCP)
machine                 : Unknown
processor               : 0
cpu model               : Cavium Octeon+ V0.1
BogoMIPS                : 1000.00
wait instruction        : yes
microsecond timers      : yes
tlb_entries             : 64
extra interrupt vector  : yes
hardware watchpoint     : yes, count: 2, address/irw mask: [0x0ffc, 0x0ffb]
isa                     : mips1 mips2 mips3 mips4 mips5 mips64r2
ASEs implemented        :
shadow register sets    : 1
kscratch registers      : 0
core                    : 0
VCED exceptions         : not available
VCEI exceptions         : not available

> Also what is the bootloader version on the board?

D-Link DSR-1000N bootloader# version

U-Boot 1.1.1 (Development build, svnversion: exported) (Build time: Mar 22 2010
- 12:14:14)

BTW, .notes segment from kernel needs to be removed for this bootloader
with "strip -R .notes".

A.

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

* Re: [PATCH 0/3] MIPS: OCTEON: Minimal support for D-Link DSR-1000N
  2014-06-30 19:17   ` Aaro Koskinen
@ 2014-06-30 20:32     ` David Daney
  0 siblings, 0 replies; 10+ messages in thread
From: David Daney @ 2014-06-30 20:32 UTC (permalink / raw)
  To: Aaro Koskinen; +Cc: linux-mips, linux-kernel, Ralf Baechle

On 06/30/2014 12:17 PM, Aaro Koskinen wrote:
> Hi,
>
> On Mon, Jun 30, 2014 at 10:14:54AM -0700, David Daney wrote:
>> On 06/28/2014 01:34 PM, Aaro Koskinen wrote:
>>> The following patches add minimal support for D-Link DSR-1000N router.
>>
>> Which OCTEON chip does this device contain?
>
> [    0.000000] CPU0 revision is: 000d0601 (Cavium Octeon+)
>
> # cat /proc/cpuinfo
> system type             : CUST_DSR1000N (CN5010p1.1-500-SCP)
> machine                 : Unknown
> processor               : 0
> cpu model               : Cavium Octeon+ V0.1
> BogoMIPS                : 1000.00
> wait instruction        : yes
> microsecond timers      : yes
> tlb_entries             : 64
> extra interrupt vector  : yes
> hardware watchpoint     : yes, count: 2, address/irw mask: [0x0ffc, 0x0ffb]
> isa                     : mips1 mips2 mips3 mips4 mips5 mips64r2
> ASEs implemented        :
> shadow register sets    : 1
> kscratch registers      : 0
> core                    : 0
> VCED exceptions         : not available
> VCEI exceptions         : not available
>
>> Also what is the bootloader version on the board?
>
> D-Link DSR-1000N bootloader# version
>
> U-Boot 1.1.1 (Development build, svnversion: exported) (Build time: Mar 22 2010
> - 12:14:14)
>
> BTW, .notes segment from kernel needs to be removed for this bootloader
> with "strip -R .notes".
>

Too bad it doesn't have a modern bootloader that passes a device tree.

The whole series: Acked-by: David Daney <david.daney@cavium.com>



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

end of thread, other threads:[~2014-06-30 20:32 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-28 20:34 [PATCH 0/3] MIPS: OCTEON: Minimal support for D-Link DSR-1000N Aaro Koskinen
2014-06-28 20:34 ` [PATCH 1/3] MIPS: OCTEON: cvmx-bootinfo: add " Aaro Koskinen
2014-06-28 20:34 ` [PATCH 2/3] MIPS: OCTEON: add USB clock type for " Aaro Koskinen
2014-06-28 20:34 ` [PATCH 3/3] MIPS: OCTEON: add interface & port definitions " Aaro Koskinen
2014-06-29  8:58 ` [PATCH 0/3] MIPS: OCTEON: Minimal support " John Crispin
2014-06-29 13:58   ` Aaro Koskinen
2014-06-29 14:04     ` John Crispin
2014-06-30 17:14 ` David Daney
2014-06-30 19:17   ` Aaro Koskinen
2014-06-30 20:32     ` David Daney

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.