mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
usb: check SoC rev [1/2]
PD#SWPL-4582 Problem: Need to check Soc rev to distinguish G12B revB. Solution: Check Soc rev set version and phy-interface for g12b revB. Test: make w400 bootimage Verify: pass on W400 Change-Id: I338d7f0eed7bb61660625343404f756f0edf0d54 Signed-off-by: he.he <he.he@amlogic.com>
This commit is contained in:
@@ -71,6 +71,7 @@
|
||||
#include <linux/usb.h>
|
||||
#include <linux/usb/hcd.h>
|
||||
#include <linux/workqueue.h>
|
||||
#include <linux/amlogic/cpu_version.h>
|
||||
#ifdef CONFIG_AMLOGIC_LEGACY_EARLY_SUSPEND
|
||||
#include <linux/amlogic/pm.h>
|
||||
#endif
|
||||
@@ -1058,6 +1059,11 @@ static int dwc_otg_driver_probe(struct platform_device *pdev)
|
||||
if (prop)
|
||||
phy_interface = of_read_ulong(prop, 1);
|
||||
|
||||
if (is_meson_g12b_cpu()) {
|
||||
if (!is_meson_rev_a())
|
||||
phy_interface = 2;
|
||||
}
|
||||
|
||||
dwc_otg_module_params.host_rx_fifo_size = dwc_otg_module_params.data_fifo_size / 2;
|
||||
DWC_PRINTF("dwc_otg: %s: type: %d speed: %d, ",
|
||||
s_clock_name, port_type, port_speed);
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <linux/delay.h>
|
||||
#include <linux/usb/phy.h>
|
||||
#include <linux/amlogic/usb-v2.h>
|
||||
#include <linux/amlogic/cpu_version.h>
|
||||
#include "phy-aml-new-usb-v2.h"
|
||||
|
||||
struct amlogic_usb_v2 *g_phy2_v2;
|
||||
@@ -243,6 +244,11 @@ static int amlogic_new_usb2_probe(struct platform_device *pdev)
|
||||
else
|
||||
phy_version = 0;
|
||||
|
||||
if (is_meson_g12b_cpu()) {
|
||||
if (!is_meson_rev_a())
|
||||
phy_version = 1;
|
||||
}
|
||||
|
||||
phy_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
phy_base = devm_ioremap_resource(dev, phy_mem);
|
||||
if (IS_ERR(phy_base))
|
||||
|
||||
Reference in New Issue
Block a user