X-Git-Url: https://git.archive.openwrt.org/?a=blobdiff_plain;f=target%2Flinux%2Framips%2Ffiles%2Farch%2Fmips%2Fralink%2Frt305x%2Fdevices.c;h=56eae8a9dc64deea4a96efe0fc9d745b235e4cba;hb=db9d0a7ff5d96c66b58aaa496b655e57804a638c;hp=bebab8171a00a4bb5e3c7db23afdb85865c4a7c1;hpb=e958af1110fe4ab7cd1916bbf0875a89ef439d5a;p=openwrt.git diff --git a/target/linux/ramips/files/arch/mips/ralink/rt305x/devices.c b/target/linux/ramips/files/arch/mips/ralink/rt305x/devices.c index bebab8171a..56eae8a9dc 100644 --- a/target/linux/ramips/files/arch/mips/ralink/rt305x/devices.c +++ b/target/linux/ramips/files/arch/mips/ralink/rt305x/devices.c @@ -156,8 +156,15 @@ static struct resource rt305x_esw_resources[] = { }; struct rt305x_esw_platform_data rt305x_esw_data = { + /* All ports are LAN ports. */ .vlan_config = RT305X_ESW_VLAN_CONFIG_NONE, .reg_initval_fct2 = 0x00d6500c, + /* + * ext phy base addr 31, enable port 5 polling, rx/tx clock skew 1, + * turbo mii off, rgmi 3.3v off + * port5: disabled + * port6: enabled, gige, full-duplex, rx/tx-flow-control + */ .reg_initval_fpa2 = 0x3f502b28, }; @@ -208,7 +215,15 @@ static struct platform_device rt305x_wifi_device = { void __init rt305x_register_wifi(void) { + u32 t; rt305x_wifi_data.eeprom_file_name = "RT305X.eeprom"; + + if (soc_is_rt3352() || soc_is_rt5350()) { + t = rt305x_sysc_rr(SYSC_REG_SYSTEM_CONFIG); + t &= RT3352_SYSCFG0_XTAL_SEL; + if (!t) + rt305x_wifi_data.clk_is_20mhz = 1; + } platform_device_register(&rt305x_wifi_device); } @@ -352,7 +367,7 @@ static struct resource rt3352_ehci_resources[] = { static u64 rt3352_ehci_dmamask = DMA_BIT_MASK(32); static struct platform_device rt3352_ehci_device = { - .name = "rt3352-ehci", + .name = "rt3883-ehci", .id = -1, .resource = rt3352_ehci_resources, .num_resources = ARRAY_SIZE(rt3352_ehci_resources), @@ -382,7 +397,7 @@ static struct rt3883_ohci_platform_data rt3352_ohci_data = { static u64 rt3352_ohci_dmamask = DMA_BIT_MASK(32); static struct platform_device rt3352_ohci_device = { - .name = "rt3352-ohci", + .name = "rt3883-ohci", .id = -1, .resource = rt3352_ohci_resources, .num_resources = ARRAY_SIZE(rt3352_ohci_resources), @@ -397,7 +412,7 @@ void __init rt305x_register_usb(void) { if (soc_is_rt305x() || soc_is_rt3350()) { platform_device_register(&rt305x_dwc_otg_device); - } else if (soc_is_rt3352()) { + } else if (soc_is_rt3352() || soc_is_rt5350()) { platform_device_register(&rt3352_ehci_device); platform_device_register(&rt3352_ohci_device); } else {