Commit 242cc0547f3bcecc0b02ca6f3e9512760185727e

Authored by Ben Hutchings
Committed by David S. Miller
1 parent e0bf54c93a

sfc: SFE4002/SFN4112F: Widen temperature and voltage tolerances

The temperature and voltage limits currently set on these boards are
too conservative and will cause the driver to stop the net device
erroneously in some systems.

Based on a review of the chip datasheets and advice from the designer
of these boards:

- Raise the maximum board temperatures to the specified maximum ambient
  temperatures for their PHYs plus the expected temperature bias of the
  board
- Raise the maximum controller temperature to 90 degrees
- Lower the minimum temperatures to 0 degrees
- Widen the voltage tolerances to at least +/- 10%

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Showing 1 changed file with 27 additions and 18 deletions Side-by-side Diff

drivers/net/sfc/falcon_boards.c
... ... @@ -29,6 +29,15 @@
29 29 #define FALCON_BOARD_SFN4111T 0x51
30 30 #define FALCON_BOARD_SFN4112F 0x52
31 31  
  32 +/* Board temperature is about 15°C above ambient when air flow is
  33 + * limited. */
  34 +#define FALCON_BOARD_TEMP_BIAS 15
  35 +
  36 +/* SFC4000 datasheet says: 'The maximum permitted junction temperature
  37 + * is 125°C; the thermal design of the environment for the SFC4000
  38 + * should aim to keep this well below 100°C.' */
  39 +#define FALCON_JUNC_TEMP_MAX 90
  40 +
32 41 /*****************************************************************************
33 42 * Support for LM87 sensor chip used on several boards
34 43 */
... ... @@ -548,16 +557,16 @@
548 557 static u8 sfe4002_lm87_channel = 0x03; /* use AIN not FAN inputs */
549 558  
550 559 static const u8 sfe4002_lm87_regs[] = {
551   - LM87_IN_LIMITS(0, 0x83, 0x91), /* 2.5V: 1.8V +/- 5% */
552   - LM87_IN_LIMITS(1, 0x51, 0x5a), /* Vccp1: 1.2V +/- 5% */
553   - LM87_IN_LIMITS(2, 0xb6, 0xca), /* 3.3V: 3.3V +/- 5% */
554   - LM87_IN_LIMITS(3, 0xb0, 0xc9), /* 5V: 4.6-5.2V */
555   - LM87_IN_LIMITS(4, 0xb0, 0xe0), /* 12V: 11-14V */
556   - LM87_IN_LIMITS(5, 0x44, 0x4b), /* Vccp2: 1.0V +/- 5% */
557   - LM87_AIN_LIMITS(0, 0xa0, 0xb2), /* AIN1: 1.66V +/- 5% */
558   - LM87_AIN_LIMITS(1, 0x91, 0xa1), /* AIN2: 1.5V +/- 5% */
559   - LM87_TEMP_INT_LIMITS(10, 60), /* board */
560   - LM87_TEMP_EXT1_LIMITS(10, 70), /* Falcon */
  560 + LM87_IN_LIMITS(0, 0x7c, 0x99), /* 2.5V: 1.8V +/- 10% */
  561 + LM87_IN_LIMITS(1, 0x4c, 0x5e), /* Vccp1: 1.2V +/- 10% */
  562 + LM87_IN_LIMITS(2, 0xac, 0xd4), /* 3.3V: 3.3V +/- 10% */
  563 + LM87_IN_LIMITS(3, 0xac, 0xd4), /* 5V: 5.0V +/- 10% */
  564 + LM87_IN_LIMITS(4, 0xac, 0xe0), /* 12V: 10.8-14V */
  565 + LM87_IN_LIMITS(5, 0x3f, 0x4f), /* Vccp2: 1.0V +/- 10% */
  566 + LM87_AIN_LIMITS(0, 0x98, 0xbb), /* AIN1: 1.66V +/- 10% */
  567 + LM87_AIN_LIMITS(1, 0x8a, 0xa9), /* AIN2: 1.5V +/- 10% */
  568 + LM87_TEMP_INT_LIMITS(0, 80 + FALCON_BOARD_TEMP_BIAS),
  569 + LM87_TEMP_EXT1_LIMITS(0, FALCON_JUNC_TEMP_MAX),
561 570 0
562 571 };
563 572  
... ... @@ -619,14 +628,14 @@
619 628 static u8 sfn4112f_lm87_channel = 0x03; /* use AIN not FAN inputs */
620 629  
621 630 static const u8 sfn4112f_lm87_regs[] = {
622   - LM87_IN_LIMITS(0, 0x83, 0x91), /* 2.5V: 1.8V +/- 5% */
623   - LM87_IN_LIMITS(1, 0x51, 0x5a), /* Vccp1: 1.2V +/- 5% */
624   - LM87_IN_LIMITS(2, 0xb6, 0xca), /* 3.3V: 3.3V +/- 5% */
625   - LM87_IN_LIMITS(4, 0xb0, 0xe0), /* 12V: 11-14V */
626   - LM87_IN_LIMITS(5, 0x44, 0x4b), /* Vccp2: 1.0V +/- 5% */
627   - LM87_AIN_LIMITS(1, 0x91, 0xa1), /* AIN2: 1.5V +/- 5% */
628   - LM87_TEMP_INT_LIMITS(10, 60), /* board */
629   - LM87_TEMP_EXT1_LIMITS(10, 70), /* Falcon */
  631 + LM87_IN_LIMITS(0, 0x7c, 0x99), /* 2.5V: 1.8V +/- 10% */
  632 + LM87_IN_LIMITS(1, 0x4c, 0x5e), /* Vccp1: 1.2V +/- 10% */
  633 + LM87_IN_LIMITS(2, 0xac, 0xd4), /* 3.3V: 3.3V +/- 10% */
  634 + LM87_IN_LIMITS(4, 0xac, 0xe0), /* 12V: 10.8-14V */
  635 + LM87_IN_LIMITS(5, 0x3f, 0x4f), /* Vccp2: 1.0V +/- 10% */
  636 + LM87_AIN_LIMITS(1, 0x8a, 0xa9), /* AIN2: 1.5V +/- 10% */
  637 + LM87_TEMP_INT_LIMITS(0, 60 + FALCON_BOARD_TEMP_BIAS),
  638 + LM87_TEMP_EXT1_LIMITS(0, FALCON_JUNC_TEMP_MAX),
630 639 0
631 640 };
632 641