static void __init wndr4300_setup(void) { ath79_register_leds_gpio(-1, ARRAY_SIZE(wndr4300_leds_gpio), wndr4300_leds_gpio); ath79_register_gpio_keys_polled(-1, WNDR4300_KEYS_POLL_INTERVAL, ARRAY_SIZE(wndr4300_gpio_keys), wndr4300_gpio_keys); ath79_setup_ar934x_eth_cfg(AR934X_ETH_CFG_RGMII_GMAC0); mdiobus_register_board_info(wndr4300_mdio0_info, ARRAY_SIZE(wndr4300_mdio0_info)); ath79_register_mdio(0, 0x0); /* GMAC0 is connected to an AR8327N 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; ath79_eth0_pll_data.pll_1000 = 0x06000000; ath79_register_eth(0); ath79_nfc_set_ecc_mode(AR934X_NFC_ECC_HW); ath79_register_nfc(); ath79_register_usb(); ath79_register_wmac_simple(); ap91_pci_init_simple(); }
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 wndr4300_setup(void) { int i; for (i = 0; i < ARRAY_SIZE(wndr4300_leds_gpio); i++) ath79_gpio_output_select(wndr4300_leds_gpio[i].gpio, AR934X_GPIO_OUT_GPIO); ath79_register_leds_gpio(-1, ARRAY_SIZE(wndr4300_leds_gpio), wndr4300_leds_gpio); ath79_register_gpio_keys_polled(-1, WNDR4300_KEYS_POLL_INTERVAL, ARRAY_SIZE(wndr4300_gpio_keys), wndr4300_gpio_keys); ath79_setup_ar934x_eth_cfg(AR934X_ETH_CFG_RGMII_GMAC0); mdiobus_register_board_info(wndr4300_mdio0_info, ARRAY_SIZE(wndr4300_mdio0_info)); ath79_register_mdio(0, 0x0); /* GMAC0 is connected to an AR8327N 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; ath79_eth0_pll_data.pll_1000 = 0x06000000; ath79_register_eth(0); ath79_nfc_set_ecc_mode(AR934X_NFC_ECC_HW); ath79_register_nfc(); ath79_register_usb(); ath79_register_wmac_simple(); /* enable power for the USB port */ ap9x_pci_setup_wmac_gpio(0, BIT(WNDR4300_GPIO_USB_5V), BIT(WNDR4300_GPIO_USB_5V)); ap91_pci_init_simple(); }
static void __init r6100_setup(void) { ath79_register_leds_gpio(-1, ARRAY_SIZE(r6100_leds_gpio), r6100_leds_gpio); ath79_register_gpio_keys_polled(-1, R6100_KEYS_POLL_INTERVAL, ARRAY_SIZE(r6100_gpio_keys), r6100_gpio_keys); ath79_setup_ar934x_eth_cfg(AR934X_ETH_CFG_SW_PHY_SWAP); ath79_register_mdio(1, 0x0); /* GMAC0 is connected to the PHY0 of the internal switch */ ath79_switch_data.phy4_mii_en = 1; ath79_switch_data.phy_poll_mask = BIT(0); ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII; ath79_eth0_data.phy_mask = BIT(0); ath79_eth0_data.mii_bus_dev = &ath79_mdio1_device.dev; ath79_register_eth(0); /* GMAC1 is connected to the internal switch */ ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_GMII; ath79_register_eth(1); gpio_request_one(R6100_GPIO_USB_POWER, GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED, "USB power"); ath79_nfc_set_ecc_mode(AR934X_NFC_ECC_HW); ath79_register_nfc(); ath79_register_usb(); ath79_register_wmac_simple(); ap91_pci_init_simple(); }