Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d508eb79 authored by Hauke Mehrtens's avatar Hauke Mehrtens Committed by Ralf Baechle
Browse files

MIPS: BCM47XX: Add detection and GPIO config for Siemens SE505v2



This adds board detection for the Siemens SE505v2 and the led gpio
configuration. This board does not have any buttons.
This is based on OpenWrt broadcom-diag and Manuel Munz's nvram dump.

Signed-off-by: default avatarHauke Mehrtens <hauke@hauke-m.de>
Cc: linux-mips@linux-mips.org
Cc: zajec5@gmail.com
Patchwork: https://patchwork.linux-mips.org/patch/6593/


Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 96c10de3
Loading
Loading
Loading
Loading
+17 −0
Original line number Original line Diff line number Diff line
@@ -181,6 +181,13 @@ struct bcm47xx_board_type_list3 bcm47xx_board_list_board[] __initconst = {
	{ {0}, NULL},
	{ {0}, NULL},
};
};


/* boardtype, boardrev */
static const
struct bcm47xx_board_type_list2 bcm47xx_board_list_board_type_rev[] __initconst = {
	{{BCM47XX_BOARD_SIEMENS_SE505V2, "Siemens SE505 V2"}, "0x0101", "0x10"},
	{ {0}, NULL},
};

static const
static const
struct bcm47xx_board_type bcm47xx_board_unknown[] __initconst = {
struct bcm47xx_board_type bcm47xx_board_unknown[] __initconst = {
	{BCM47XX_BOARD_UNKNOWN, "Unknown Board"},
	{BCM47XX_BOARD_UNKNOWN, "Unknown Board"},
@@ -274,6 +281,16 @@ static __init const struct bcm47xx_board_type *bcm47xx_board_get_nvram(void)
				return &e3->board;
				return &e3->board;
		}
		}
	}
	}

	if (bcm47xx_nvram_getenv("boardtype", buf1, sizeof(buf1)) >= 0 &&
	    bcm47xx_nvram_getenv("boardrev", buf2, sizeof(buf2)) >= 0 &&
	    bcm47xx_nvram_getenv("boardnum", buf3, sizeof(buf3)) ==  -ENOENT) {
		for (e2 = bcm47xx_board_list_board_type_rev; e2->value1; e2++) {
			if (!strcmp(buf1, e2->value1) &&
			    !strcmp(buf2, e2->value2))
				return &e2->board;
		}
	}
	return bcm47xx_board_unknown;
	return bcm47xx_board_unknown;
}
}


+12 −0
Original line number Original line Diff line number Diff line
@@ -383,6 +383,14 @@ bcm47xx_leds_netgear_wnr834bv2[] __initconst = {
	BCM47XX_GPIO_LED(7, "unk", "connected", 0, LEDS_GPIO_DEFSTATE_OFF),
	BCM47XX_GPIO_LED(7, "unk", "connected", 0, LEDS_GPIO_DEFSTATE_OFF),
};
};


/* Siemens */
static const struct gpio_led
bcm47xx_leds_siemens_se505v2[] __initconst = {
	BCM47XX_GPIO_LED(0, "unk", "dmz", 1, LEDS_GPIO_DEFSTATE_OFF),
	BCM47XX_GPIO_LED(3, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF),
	BCM47XX_GPIO_LED(5, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON),
};

/* SimpleTech */
/* SimpleTech */


static const struct gpio_led
static const struct gpio_led
@@ -562,6 +570,10 @@ void __init bcm47xx_leds_register(void)
		bcm47xx_set_pdata(bcm47xx_leds_netgear_wnr834bv2);
		bcm47xx_set_pdata(bcm47xx_leds_netgear_wnr834bv2);
		break;
		break;


	case BCM47XX_BOARD_SIEMENS_SE505V2:
		bcm47xx_set_pdata(bcm47xx_leds_siemens_se505v2);
		break;

	case BCM47XX_BOARD_SIMPLETECH_SIMPLESHARE:
	case BCM47XX_BOARD_SIMPLETECH_SIMPLESHARE:
		bcm47xx_set_pdata(bcm47xx_leds_simpletech_simpleshare);
		bcm47xx_set_pdata(bcm47xx_leds_simpletech_simpleshare);
		break;
		break;
+2 −0
Original line number Original line Diff line number Diff line
@@ -94,6 +94,8 @@ enum bcm47xx_board {


	BCM47XX_BOARD_PHICOMM_M1,
	BCM47XX_BOARD_PHICOMM_M1,


	BCM47XX_BOARD_SIEMENS_SE505V2,

	BCM47XX_BOARD_SIMPLETECH_SIMPLESHARE,
	BCM47XX_BOARD_SIMPLETECH_SIMPLESHARE,


	BCM47XX_BOARD_ZTE_H218N,
	BCM47XX_BOARD_ZTE_H218N,