Hi,
I'm starting to work on this board, I'll write the update on this post.
+ /*
+ * RBwAPG-5HacT2HnD board:
+ * -Power : PoE AT - DC.in (12 - 57)V
+ * -SoC : QCA9556
+ * -Net: : AR8033
+ * -Phy0 : Built-in SoC
+ * -Phy1 : QCA9880
+ * -RAM : 64 MiB
+ * -FLASH : 16 MiB
+ * -IC : ZT2046Q provide a temperature and voltage sensor.
+ *
+ * -HWID : wapg-sc
+ */
From mikrotik's gpl:
- ./arch/mips/rb/prom.c
▸ } else if (strncmp(board_type, "wapg-sc", sizeof(board_type)) == 0) {
▸ ▸ mips_machgroup = MACH_GROUP_MT_RB700;
▸ ▸ mips_machtype = MACH_MT_wAPG;
- ./arch/mips/rb/platform.c
▸ ▸ case MACH_MT_wAPG:
▸ ▸ ▸ return platform_add_devices(
▸ ▸ ▸ wapg_devices, ARRAY_SIZE(wapg_devices));
static struct platform_device *wapg_devices[] = {
▸ &scorpionL_spi_device,
▸ &ar9340_gpio_device,
▸ &g52c_mdio_device,
▸ &g52c_eth_device,
▸ &wapg_led_device,
▸ &ar9330_wlan_device,
};
- spi
static struct spi_board_info slow_large_spi_nor = {
▸ .modalias = "m25p80",
▸ .max_speed_hz = 30 * 1000 * 1000,
▸ .bus_num = 0,
▸ .chip_select = 4,
▸ .mode = SPI_MODE_0,
.platform_data = &nor_data,
};
static struct spi_board_info rb2011_spi_ts = {
▸ .modalias = "rb2011-spi-ts",
▸ .max_speed_hz = 2500 * 1000,
▸ .bus_num = 0,
▸ .chip_select = 2,
▸ .mode = SPI_MODE_3,
▸ .platform_data = (void *) 16,
};
static struct spi_board_info *scorpionL_spi_info[] = {
▸ &slow_large_spi_nor,
▸ &rb2011_spi_ts,
▸ NULL
};
static struct platform_device scorpionL_spi_device = {
▸ .name▸ = "rb900-spi",
▸ .id▸ = -1,
▸ .dev▸ = {
▸ ▸ .platform_data = scorpionL_spi_info,
▸ },
};
- gpio
static struct platform_device ar9340_gpio_device = {
▸ .name▸ = "rb400-gpio",
▸ .id▸ = -1,
▸ .dev▸ = {
▸ ▸ .platform_data = (void *)RB400_GPIO_INVERT_OE,
▸ },
};
- Ethernet
static struct mdio_gpio_platform_data g52c_mdio_platform_data = {
▸ .mdc = 12,
▸ .mdio = 11,
▸ .phy_mask = 0,
};
struct platform_device g52c_mdio_device = {
▸ .name = "mdio-gpio",
▸ .id = 1,
▸ .dev = {
▸ ▸ .platform_data = &g52c_mdio_platform_data,
▸ },
};
static int g52c_eth_port_map[] = { 1, 1, 0 | BIT(30), -1 };
static struct platform_device g52c_eth_device = {
▸ .name▸ = "ag7240",
▸ .id▸ = -1,
▸ .dev▸ = {
▸ ▸ .platform_data = g52c_eth_port_map,
▸ },
};
- Leds
static struct platform_device wapg_led_device = {
▸ .name▸ = "rb400-led",
▸ .id▸ = -1,
▸ .dev▸ = {
▸ ▸ .platform_data = &(unsigned[]) {
▸ ▸ ▸ PLDI(led1, 1, WIFI),
▸ ▸ ▸ PLDI(led2, 8, WIFI),
▸ ▸ ▸ PLDI(led3, 9, WIFI),
▸ ▸ ▸ PLED(power_led, 16, GPIO, PLED_CFG_ON | PLED_CFG_INV),
▸ ▸ ▸ PLDI(button, 1, GPIO),
▸ ▸ ▸ 0
▸ ▸ },
▸ },
};