static void __init cf_e385ac_setup(void) { u8 *mac = (u8 *) KSEG1ADDR(0x1f040000); cf_e38xac_common_setup(0x40000); ath79_register_leds_gpio(-1, ARRAY_SIZE(cf_e385ac_leds_gpio), cf_e385ac_leds_gpio); mdiobus_register_board_info(cf_e385ac_mdio0_info, ARRAY_SIZE(cf_e385ac_mdio0_info)); ath79_register_mdio(0, 0x0); ath79_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN); /* QCA9558 GMAC0 is connected to RMGII interface */ ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII; ath79_eth0_data.phy_mask = BIT(0); ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev; ath79_eth0_pll_data.pll_1000 = 0x96000000; ath79_init_mac(ath79_eth0_data.mac_addr, mac, 0); ath79_register_eth(0); /* QCA9558 GMAC1 is connected to SGMII interface */ ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_SGMII; ath79_eth1_data.speed = SPEED_1000; ath79_eth1_data.duplex = DUPLEX_FULL; ath79_eth1_pll_data.pll_1000 = 0x03000101; ath79_init_mac(ath79_eth1_data.mac_addr, mac, 1); ath79_register_eth(1); }
static void __init esr900_setup(void) { const char *config = (char *) KSEG1ADDR(ESR900_CONFIG_ADDR); u8 *art = (u8 *) KSEG1ADDR(ESR900_CALDATA_ADDR); u8 lan_mac[ETH_ALEN]; u8 wlan0_mac[ETH_ALEN]; u8 wlan1_mac[ETH_ALEN]; if (ath79_nvram_parse_mac_addr(config, ESR900_CONFIG_SIZE, "ethaddr=", lan_mac) == 0) { ath79_init_local_mac(ath79_eth0_data.mac_addr, lan_mac); ath79_init_mac(wlan0_mac, lan_mac, 0); ath79_init_mac(wlan1_mac, lan_mac, 1); } else { pr_err("could not find ethaddr in u-boot environment\n"); } ath79_register_m25p80(NULL); ath79_register_leds_gpio(-1, ARRAY_SIZE(esr900_leds_gpio), esr900_leds_gpio); ath79_register_gpio_keys_polled(-1, ESR900_KEYS_POLL_INTERVAL, ARRAY_SIZE(esr900_gpio_keys), esr900_gpio_keys); ath79_register_usb(); ath79_register_wmac(art + ESR900_WMAC_CALDATA_OFFSET, wlan0_mac); ath79_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN); ath79_register_mdio(0, 0x0); mdiobus_register_board_info(esr900_mdio0_info, ARRAY_SIZE(esr900_mdio0_info)); /* GMAC0 is connected to the RMGII interface */ ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII; ath79_eth0_data.phy_mask = ESR900_LAN_PHYMASK; ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev; ath79_eth0_pll_data.pll_1000 = 0xa6000000; ath79_register_eth(0); /* GMAC1 is connected to the SGMII interface */ ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_SGMII; ath79_eth1_data.speed = SPEED_1000; ath79_eth1_data.duplex = DUPLEX_FULL; ath79_eth1_pll_data.pll_1000 = 0x03000101; ath79_register_eth(1); ap91_pci_init(art + ESR900_PCIE_CALDATA_OFFSET, wlan1_mac); }
static void __init common_setup(bool pcie_slot) { u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00); ath79_register_m25p80(&archer_c7_flash_data); ath79_register_leds_gpio(-1, ARRAY_SIZE(archer_c7_leds_gpio), archer_c7_leds_gpio); ath79_register_gpio_keys_polled(-1, ARCHER_C7_KEYS_POLL_INTERVAL, ARRAY_SIZE(archer_c7_gpio_keys), archer_c7_gpio_keys); tplink_register_builtin_wmac1(ARCHER_C7_WMAC_CALDATA_OFFSET, mac, -1); if (pcie_slot) { ath79_register_pci(); } else { ap9x_pci_setup_wmac_led_pin(0, 0); tplink_register_ap91_wmac2(ARCHER_C7_PCIE_CALDATA_OFFSET, mac, 2); } mdiobus_register_board_info(archer_c7_mdio0_info, ARRAY_SIZE(archer_c7_mdio0_info)); ath79_register_mdio(0, 0x0); ath79_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN); /* GMAC0 is connected to the RMGII interface */ ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII; ath79_eth0_data.phy_mask = BIT(0); ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev; ath79_eth0_pll_data.pll_1000 = 0x56000000; ath79_init_mac(ath79_eth0_data.mac_addr, mac, 1); ath79_register_eth(0); /* GMAC1 is connected to the SGMII interface */ ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_SGMII; ath79_eth1_data.speed = SPEED_1000; ath79_eth1_data.duplex = DUPLEX_FULL; ath79_eth1_pll_data.pll_1000 = 0x03000101; ath79_init_mac(ath79_eth1_data.mac_addr, mac, 0); ath79_register_eth(1); gpio_request_one(ARCHER_C7_GPIO_USB1_POWER, GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED, "USB1 power"); gpio_request_one(ARCHER_C7_GPIO_USB2_POWER, GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED, "USB2 power"); ath79_register_usb(); }
static void __init wdr7500_setup(void) { u8 *art = (u8 *) KSEG1ADDR(0x1fff0000); ath79_register_m25p80(&wdr7500_flash_data); ath79_register_leds_gpio(-1, ARRAY_SIZE(wdr7500_leds_gpio), wdr7500_leds_gpio); ath79_register_gpio_keys_polled(-1, WDR7500_KEYS_POLL_INTERVAL, ARRAY_SIZE(wdr7500_gpio_keys), wdr7500_gpio_keys); gpio_request_one(WDR7500_GPIO_USB1_POWER, GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED, "USB1 power"); gpio_request_one(WDR7500_GPIO_USB2_POWER, GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED, "USB2 power"); ath79_register_usb(); ath79_register_nfc(); ath79_register_wmac(art + WDR7500_WMAC_CALDATA_OFFSET, NULL); ath79_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN); ath79_register_mdio(0, 0x0); ath79_init_mac(ath79_eth0_data.mac_addr, art + WDR7500_MAC0_OFFSET, 0); mdiobus_register_board_info(wdr7500_mdio0_info, ARRAY_SIZE(wdr7500_mdio0_info)); /* GMAC0 is connected to the RMGII interface */ ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII; ath79_eth0_data.phy_mask = BIT(0); ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev; ath79_eth0_pll_data.pll_1000 = 0x56000000; ath79_register_eth(0); /* GMAC1 is connected to the SGMII interface */ ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_SGMII; ath79_eth1_data.speed = SPEED_1000; ath79_eth1_data.duplex = DUPLEX_FULL; ath79_eth1_pll_data.pll_1000 = 0x03000101; ath79_register_eth(1); ath79_register_pci(); }
/* * Init the hAP ac / 962UiGS-5HacT2HnT hardware (QCA9558). * The hAP ac has 5 ethernet ports provided by an AR8337 switch. Port 1 is * assigned to WAN, ports 2-5 are assigned to LAN. Port 0 is connected to the * SoC, ports 1-5 of the switch are connected to physical ports 1-5 in order. * The SFP cage is not assigned by default on RouterOS. Extra work is required * to support this interface as it is directly connected to the SoC (eth1). * Wireless is provided by a 2.4GHz radio on the SoC (WLAN1) and a 5GHz radio * attached via PCI (QCA9880). Red and green WLAN LEDs are populated however * they are not attached to GPIOs, extra work is required to support these. * PoE and USB output power control is supported. */ static void __init rb962_setup(void) { u32 flags = RBSPI_HAS_USB | RBSPI_HAS_POE | RBSPI_HAS_PCI; if (!rbspi_platform_setup()) return; rbspi_peripherals_setup(flags); /* Do not call rbspi_network_setup as we have a discrete switch chip */ ath79_eth0_pll_data.pll_1000 = 0xae000000; ath79_eth0_pll_data.pll_100 = 0xa0000101; ath79_eth0_pll_data.pll_10 = 0xa0001313; ath79_register_mdio(0, 0x0); mdiobus_register_board_info(rb962_mdio0_info, ARRAY_SIZE(rb962_mdio0_info)); ath79_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN); ath79_init_mac(ath79_eth0_data.mac_addr, ath79_mac_base, 0); ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII; ath79_eth0_data.phy_mask = BIT(0); ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev; ath79_register_eth(0); /* WLAN1 MAC is HW MAC + 7 */ rbspi_wlan_init(1, 7); if (flags & RBSPI_HAS_USB) gpio_request_one(RB962_GPIO_USB_PWROFF, GPIOF_ACTIVE_LOW | GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED, "USB power off"); /* PoE output GPIO is inverted, set GPIOF_ACTIVE_LOW for consistency */ if (flags & RBSPI_HAS_POE) gpio_request_one(RB962_GPIO_POE_POWER, GPIOF_OUT_INIT_HIGH | GPIOF_ACTIVE_LOW | GPIOF_EXPORT_DIR_FIXED, "POE power"); ath79_register_leds_gpio(-1, ARRAY_SIZE(rb962_leds_gpio), rb962_leds_gpio); /* This device has a single reset button as gpio 20 */ rbspi_register_reset_button(RB962_GPIO_BTN_RESET); }
static void __init rb922gs_setup(void) { const struct rb_info *info; char buf[64]; info = rb_init_info((void *) KSEG1ADDR(0x1f000000), 0x10000); if (!info) return; scnprintf(buf, sizeof(buf), "Mikrotik RouterBOARD %s", (info->board_name) ? info->board_name : ""); mips_set_machine_name(buf); rb922gs_init_partitions(info); ath79_register_m25p80(&rb922gs_spi_flash_data); rb922gs_nand_init(); ath79_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN); ath79_register_mdio(0, 0x0); mdiobus_register_board_info(rb922gs_mdio0_info, ARRAY_SIZE(rb922gs_mdio0_info)); ath79_init_mac(ath79_eth0_data.mac_addr, ath79_mac_base, 0); ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev; ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII; ath79_eth0_data.phy_mask = BIT(RB922_PHY_ADDR); ath79_eth0_pll_data.pll_10 = 0x81001313; ath79_eth0_pll_data.pll_100 = 0x81000101; ath79_eth0_pll_data.pll_1000 = 0x8f000000; ath79_register_eth(0); ath79_register_pci(); ath79_register_leds_gpio(-1, ARRAY_SIZE(rb922gs_leds), rb922gs_leds); ath79_register_gpio_keys_polled(-1, RB922_KEYS_POLL_INTERVAL, ARRAY_SIZE(rb922gs_gpio_keys), rb922gs_gpio_keys); /* NOTE: * This only supports the RB911G-5HPacD board for now. For other boards * more devices must be registered based on the hardware options which * can be found in the hardware configuration of RouterBOOT. */ }
static void __init dw33d_setup(void) { u8 *art = (u8 *) KSEG1ADDR(0x1fff0000); ath79_register_m25p80(NULL); ath79_register_leds_gpio(-1, ARRAY_SIZE(dw33d_leds_gpio), dw33d_leds_gpio); ath79_register_gpio_keys_polled(-1, DW33D_KEYS_POLL_INTERVAL, ARRAY_SIZE(dw33d_gpio_keys), dw33d_gpio_keys); ath79_register_usb(); ath79_nfc_set_ecc_mode(AR934X_NFC_ECC_HW); ath79_register_nfc(); ath79_register_pci(); ath79_register_wmac(art + DW33D_WMAC_CALDATA_OFFSET, art + DW33D_WMAC_OFFSET); ath79_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN); ath79_register_mdio(0, 0x0); ath79_init_mac(ath79_eth0_data.mac_addr, art + DW33D_MAC0_OFFSET, 0); ath79_init_mac(ath79_eth1_data.mac_addr, art + DW33D_MAC1_OFFSET, 0); mdiobus_register_board_info(dw33d_mdio0_info, ARRAY_SIZE(dw33d_mdio0_info)); /* GMAC0 is connected to the RMGII interface */ ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII; ath79_eth0_data.phy_mask = BIT(0); ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev; ath79_eth0_pll_data.pll_1000 = 0x56000000; ath79_register_eth(0); /* GMAC1 is connected tot eh SGMII interface */ ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_SGMII; ath79_eth1_data.speed = SPEED_1000; ath79_eth1_data.duplex = DUPLEX_FULL; ath79_eth1_pll_data.pll_1000 = 0x03000101; ath79_register_eth(1); }
static void __init tl_wr1043nd_v2_setup(void) { u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00); ath79_register_m25p80(&wr1043nd_v2_flash_data); ath79_register_leds_gpio(-1, ARRAY_SIZE(tl_wr1043_v2_leds_gpio), tl_wr1043_v2_leds_gpio); ath79_register_gpio_keys_polled(-1, TL_WR1043_V2_KEYS_POLL_INTERVAL, ARRAY_SIZE(tl_wr1043_v2_gpio_keys), tl_wr1043_v2_gpio_keys); tplink_register_builtin_wmac1(TL_WR1043_V2_WMAC_CALDATA_OFFSET, mac, -1); mdiobus_register_board_info(wr1043nd_v2_mdio0_info, ARRAY_SIZE(wr1043nd_v2_mdio0_info)); ath79_register_mdio(0, 0x0); ath79_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN); /* GMAC0 is connected to the RMGII interface */ ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII; ath79_eth0_data.phy_mask = BIT(0); ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev; ath79_eth0_pll_data.pll_1000 = 0x56000000; ath79_init_mac(ath79_eth0_data.mac_addr, mac, 0); ath79_register_eth(0); /* GMAC1 is connected to the SGMII interface */ ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_SGMII; ath79_eth1_data.speed = SPEED_1000; ath79_eth1_data.duplex = DUPLEX_FULL; ath79_eth1_pll_data.pll_1000 = 0x03000101; ath79_init_mac(ath79_eth1_data.mac_addr, mac, 1); ath79_register_eth(1); ath79_register_usb(); gpio_request_one(TL_WR1043_V2_GPIO_USB_POWER, GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED, "USB power"); }
static void __init cf_e380ac_v1v2_common_setup(unsigned long art_ofs) { u8 *mac = (u8 *) KSEG1ADDR(0x1f000000 + art_ofs); cf_exxxn_common_setup(art_ofs, CF_E380AC_V1V2_GPIO_EXT_WDT); ath79_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN); ath79_register_mdio(0, 0x0); mdiobus_register_board_info(cf_e380ac_v1v2_mdio0_info, ARRAY_SIZE(cf_e380ac_v1v2_mdio0_info)); /* LAN */ ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev; ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII; ath79_eth0_data.phy_mask = BIT(0); ath79_eth0_pll_data.pll_1000 = 0xbe000000; ath79_eth0_pll_data.pll_100 = 0xb0000101; ath79_eth0_pll_data.pll_10 = 0xb0001313; ath79_init_mac(ath79_eth0_data.mac_addr, mac, 0); ath79_register_eth(0); ap91_pci_init(mac + 0x5000, NULL); /* Disable JTAG (enables GPIO0-3) */ ath79_gpio_function_enable(AR934X_GPIO_FUNC_JTAG_DISABLE); ath79_gpio_direction_select(CF_E380AC_V1V2_GPIO_LED_LAN, true); ath79_gpio_direction_select(CF_E380AC_V1V2_GPIO_LED_WLAN2G, true); ath79_gpio_direction_select(CF_E380AC_V1V2_GPIO_LED_WLAN5G, true); ath79_gpio_output_select(CF_E380AC_V1V2_GPIO_LED_LAN, 0); ath79_gpio_output_select(CF_E380AC_V1V2_GPIO_LED_WLAN2G, 0); ath79_gpio_output_select(CF_E380AC_V1V2_GPIO_LED_WLAN5G, 0); /* For J7-4 */ ath79_gpio_function_disable(AR934X_GPIO_FUNC_CLK_OBS4_EN); ath79_register_gpio_keys_polled(-1, CF_EXXXN_KEYS_POLL_INTERVAL, ARRAY_SIZE(cf_e380ac_v1v2_gpio_keys), cf_e380ac_v1v2_gpio_keys); }
static void __init wzr_450hp2_setup(void) { u8 *art = (u8 *) KSEG1ADDR(0x1fff0000); u8 *mac_wan = art; u8 *mac_lan = mac_wan + ETH_ALEN; ath79_register_m25p80(&wzr_450hp2_flash_data); ath79_register_leds_gpio(-1, ARRAY_SIZE(wzr_450hp2_leds_gpio), wzr_450hp2_leds_gpio); ath79_register_gpio_keys_polled(-1, WZR_450HP2_KEYS_POLL_INTERVAL, ARRAY_SIZE(wzr_450hp2_gpio_keys), wzr_450hp2_gpio_keys); ath79_register_wmac(art + WZR_450HP2_WMAC_CALDATA_OFFSET, mac_lan); mdiobus_register_board_info(wzr_450hp2_mdio0_info, ARRAY_SIZE(wzr_450hp2_mdio0_info)); ath79_register_mdio(0, 0x0); ath79_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN); /* GMAC0 is connected to the RMGII interface */ ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII; ath79_eth0_data.phy_mask = BIT(0); ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev; ath79_eth0_pll_data.pll_1000 = 0x56000000; ath79_init_mac(ath79_eth0_data.mac_addr, mac_wan, 0); ath79_register_eth(0); /* GMAC1 is connected to the SGMII interface */ ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_SGMII; ath79_eth1_data.speed = SPEED_1000; ath79_eth1_data.duplex = DUPLEX_FULL; ath79_eth1_pll_data.pll_1000 = 0x03000101; ath79_init_mac(ath79_eth1_data.mac_addr, mac_lan, 0); ath79_register_eth(1); ath79_register_usb(); }
static void __init ap136_common_setup(void) { u8 *art = (u8 *) KSEG1ADDR(0x1fff0000); ath79_register_m25p80(NULL); ath79_register_leds_gpio(-1, ARRAY_SIZE(ap136_leds_gpio), ap136_leds_gpio); ath79_register_gpio_keys_polled(-1, AP136_KEYS_POLL_INTERVAL, ARRAY_SIZE(ap136_gpio_keys), ap136_gpio_keys); ath79_register_usb(); ath79_register_nfc(); ath79_register_wmac(art + AP136_WMAC_CALDATA_OFFSET, NULL); ath79_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN); ath79_register_mdio(0, 0x0); ath79_init_mac(ath79_eth0_data.mac_addr, art + AP136_MAC0_OFFSET, 0); mdiobus_register_board_info(ap136_mdio0_info, ARRAY_SIZE(ap136_mdio0_info)); /* GMAC0 is connected to the RMGII interface */ ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII; ath79_eth0_data.phy_mask = BIT(0); ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev; ath79_register_eth(0); /* GMAC1 is connected tot eh SGMII interface */ ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_SGMII; ath79_eth1_data.speed = SPEED_1000; ath79_eth1_data.duplex = DUPLEX_FULL; ath79_register_eth(1); }
static void __init cf_e380ac_v1v2_common_setup(unsigned long art_ofs) { u8 *mac = (u8 *) KSEG1ADDR(0x1f000000 + art_ofs); cf_e38xac_common_setup(art_ofs); ath79_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN); ath79_register_mdio(0, 0x0); mdiobus_register_board_info(cf_e380ac_v1v2_mdio0_info, ARRAY_SIZE(cf_e380ac_v1v2_mdio0_info)); /* LAN */ ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev; ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII; ath79_eth0_data.phy_mask = BIT(0); ath79_eth0_pll_data.pll_1000 = 0xbe000000; ath79_eth0_pll_data.pll_100 = 0xb0000101; ath79_eth0_pll_data.pll_10 = 0xb0001313; ath79_init_mac(ath79_eth0_data.mac_addr, mac, 0); ath79_register_eth(0); }
static void __init jwap230_setup(void) { u8 *art = (u8 *) KSEG1ADDR(0x1fff0000); ath79_register_m25p80(NULL); ath79_register_leds_gpio(-1, ARRAY_SIZE(jwap230_leds_gpio), jwap230_leds_gpio); mdiobus_register_board_info(jwap230_mdio0_info, ARRAY_SIZE(jwap230_mdio0_info)); ath79_register_mdio(0, 0x0); ath79_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN); /* QCA9558 GMAC0 is connected to RMGII interface */ ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII; ath79_eth0_data.phy_mask = BIT(0); ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev; ath79_eth0_pll_data.pll_1000 = 0xa6000000; ath79_init_mac(ath79_eth0_data.mac_addr, art + JWAP230_MAC0_OFFSET, 0); ath79_register_eth(0); /* QCA9558 GMAC1 is connected to SGMII interface */ ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_SGMII; ath79_eth1_data.speed = SPEED_1000; ath79_eth1_data.duplex = DUPLEX_FULL; ath79_eth1_pll_data.pll_1000 = 0x03000101; ath79_init_mac(ath79_eth1_data.mac_addr, art + JWAP230_MAC1_OFFSET, 0); ath79_register_eth(1); ath79_register_wmac(art + JWAP230_WMAC_CALDATA_OFFSET, NULL); ath79_register_pci(); ath79_register_usb(); }
static void __init epg5000_setup(void) { u8 *caldata = (u8 *) KSEG1ADDR(EPG5000_CALDATA_ADDR); u8 mac1[ETH_ALEN]; ath79_register_m25p80(NULL); ath79_register_leds_gpio(-1, ARRAY_SIZE(epg5000_leds_gpio), epg5000_leds_gpio); ath79_register_gpio_keys_polled(-1, EPG5000_KEYS_POLL_INTERVAL, ARRAY_SIZE(epg5000_gpio_keys), epg5000_gpio_keys); ath79_register_usb(); ath79_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN); ath79_register_mdio(0, 0x0); mdiobus_register_board_info(epg5000_mdio0_info, ARRAY_SIZE(epg5000_mdio0_info)); /* GMAC0 is connected to an QCA8327N switch */ ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII; ath79_eth0_data.phy_mask = BIT(0); ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev; if (epg5000_get_mac("ethaddr=", mac1)) ath79_init_mac(ath79_eth0_data.mac_addr, mac1, 0); ath79_eth0_pll_data.pll_1000 = 0xa6000000; ath79_register_eth(0); ath79_register_wmac(caldata + EPG5000_WMAC_CALDATA_OFFSET, mac1); ath79_register_pci(); }
static void __init wlr8100_common_setup(void) { ath79_register_m25p80(NULL); ath79_register_leds_gpio(-1, ARRAY_SIZE(wlr8100_leds_gpio), wlr8100_leds_gpio); ath79_register_gpio_keys_polled(-1, WLR8100_KEYS_POLL_INTERVAL, ARRAY_SIZE(wlr8100_gpio_keys), wlr8100_gpio_keys); ath79_register_usb(); ath79_register_wmac_simple(); ath79_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN); ath79_register_mdio(0, 0x0); mdiobus_register_board_info(wlr8100_mdio0_info, ARRAY_SIZE(wlr8100_mdio0_info)); /* GMAC0 is connected to the RMGII interface */ ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII; ath79_eth0_data.phy_mask = BIT(0); ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev; ath79_register_eth(0); /* GMAC1 is connected tot eh SGMII interface */ ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_SGMII; ath79_eth1_data.speed = SPEED_1000; ath79_eth1_data.duplex = DUPLEX_FULL; ath79_register_eth(1); }
static void __init bhr_4grv2_setup(void) { u8 *art = (u8 *) KSEG1ADDR(0x1fff0000); ath79_register_m25p80(NULL); ath79_register_leds_gpio(-1, ARRAY_SIZE(bhr_4grv2_leds_gpio), bhr_4grv2_leds_gpio); ath79_register_gpio_keys_polled(-1, BHR_4GRV2_KEYS_POLL_INTERVAL, ARRAY_SIZE(bhr_4grv2_gpio_keys), bhr_4grv2_gpio_keys); mdiobus_register_board_info(bhr_4grv2_mdio0_info, ARRAY_SIZE(bhr_4grv2_mdio0_info)); ath79_register_mdio(0, 0x0); ath79_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN); /* GMAC0 is connected to the RGMII interface */ ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII; ath79_eth0_data.phy_mask = BIT(0); ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev; ath79_eth0_pll_data.pll_1000 = 0x56000000; ath79_init_mac(ath79_eth0_data.mac_addr, art + BHR_4GRV2_MAC0_OFFSET, 0); ath79_register_eth(0); /* GMAC1 is connected to the SGMII interface */ ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_SGMII; ath79_eth1_data.speed = SPEED_1000; ath79_eth1_data.duplex = DUPLEX_FULL; ath79_eth1_pll_data.pll_1000 = 0x03000101; ath79_init_mac(ath79_eth1_data.mac_addr, art + BHR_4GRV2_MAC1_OFFSET, 0); ath79_register_eth(1); }