2 * 8devices Rambutan board support
4 * Copyright (C) 2017 Mantas Pucka <mantas@8devices.com>
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 as published
8 * by the Free Software Foundation.
11 #include <linux/pci.h>
12 #include <linux/phy.h>
13 #include <linux/gpio.h>
14 #include <linux/platform_device.h>
15 #include <linux/ath9k_platform.h>
17 #include <asm/mach-ath79/ath79.h>
18 #include <asm/mach-ath79/ar71xx_regs.h>
19 #include <linux/platform/ar934x_nfc.h>
20 #include <linux/ar8216_platform.h>
21 #include <linux/platform_data/phy-at803x.h>
24 #include "dev-gpio-buttons.h"
25 #include "dev-leds-gpio.h"
26 #include "dev-m25p80.h"
31 #include "machtypes.h"
34 static struct at803x_platform_data rambutan_ar8032_data
= {
39 static struct mdio_board_info rambutan_mdio0_info
[] = {
41 .bus_id
= "ag71xx-mdio.0",
43 .platform_data
= &rambutan_ar8032_data
,
47 static struct at803x_platform_data rambutan_ar8033_data
= {
52 static struct mdio_board_info rambutan_mdio1_info
[] = {
54 .bus_id
= "ag71xx-mdio.1",
56 .platform_data
= &rambutan_ar8033_data
,
60 static void __init
rambutan_setup(void)
62 ath79_nfc_set_ecc_mode(AR934X_NFC_ECC_HW
);
66 ath79_register_wmac_simple();
68 mdiobus_register_board_info(rambutan_mdio0_info
,
69 ARRAY_SIZE(rambutan_mdio0_info
));
70 mdiobus_register_board_info(rambutan_mdio1_info
,
71 ARRAY_SIZE(rambutan_mdio1_info
));
72 ath79_register_mdio(0, 0x0);
73 ath79_register_mdio(1, 0x0);
75 ath79_eth0_data
.phy_if_mode
= PHY_INTERFACE_MODE_MII
;
76 ath79_eth0_data
.phy_mask
= BIT(0);
77 ath79_eth0_data
.mii_bus_dev
= &ath79_mdio0_device
.dev
;
78 ath79_register_eth(0);
80 ath79_eth1_data
.phy_if_mode
= PHY_INTERFACE_MODE_SGMII
;
81 ath79_eth1_data
.phy_mask
= BIT(0);
82 ath79_eth1_data
.mii_bus_dev
= &ath79_mdio1_device
.dev
;
83 ath79_eth1_pll_data
.pll_1000
= 0x17000000;
84 ath79_eth1_pll_data
.pll_10
= 0x1313;
85 ath79_register_eth(1);
88 MIPS_MACHINE(ATH79_MACH_RAMBUTAN
, "RAMBUTAN", "8devices Rambutan board",