mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
osd: osd: screen blank after boot logo [1/1]
PD#172587 Problem: screen blank after boot logo Solution: correct default display information Verify: verified on tl1 ref board Change-Id: I94237b5241eacee6965bfe4ea0426bb8e9f494f1 Signed-off-by: Jian Cao <jian.cao@amlogic.com> osd: tl1 hold line fix needn't shift workaround [1/1] PD#172587 Problem: tl1 hold line fix needn't shift workaround. Solution: remove shift workaround int tl1 Verify: verified by x301 Change-Id: I96d99758ba6f93622c34a8e69c4a3f769fdfad49 Signed-off-by: pengcheng chen <pengcheng.chen@amlogic.com> usb: bringup usb for tl1 [1/1] PD#172587 Problem: bringup usb for tl1 Solution: bringup usb for tl1. disable usb device sof interrupt for tl1. Verify: verify on tl1 skt. Change-Id: Ifbcd3b406145ac39709ff2df795544086277f00e Signed-off-by: Yue Wang <yue.wang@amlogic.com> Signed-off-by: Luan Yuan <luan.yuan@amlogic.com> Conflicts: arch/arm/boot/dts/amlogic/mesontl1.dtsi
This commit is contained in:
2083
arch/arm/boot/dts/amlogic/mesontl1.dtsi
Normal file
2083
arch/arm/boot/dts/amlogic/mesontl1.dtsi
Normal file
File diff suppressed because it is too large
Load Diff
@@ -849,6 +849,27 @@
|
||||
};
|
||||
};
|
||||
|
||||
&dwc3 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb2_phy_v2 {
|
||||
status = "okay";
|
||||
portnum = <3>;
|
||||
};
|
||||
|
||||
&usb3_phy_v2 {
|
||||
status = "okay";
|
||||
portnum = <0>;
|
||||
otg = <0>;
|
||||
};
|
||||
|
||||
&dwc2_a {
|
||||
status = "okay";
|
||||
/** 0: normal, 1: otg+dwc3 host only, 2: otg+dwc3 device only*/
|
||||
controller-type = <1>;
|
||||
};
|
||||
|
||||
&spicc0 {
|
||||
status = "okay";
|
||||
pinctrl-names = "default";
|
||||
|
||||
@@ -750,6 +750,7 @@ struct hw_para_s {
|
||||
u32 hw_rdma_en;
|
||||
u32 blend_bypass;
|
||||
u32 hdr_used;
|
||||
u32 workaround_line;
|
||||
u32 basic_urgent;
|
||||
u32 two_ports;
|
||||
u32 afbc_err_cnt;
|
||||
|
||||
@@ -6102,12 +6102,12 @@ static void osd_setting_blend1(struct hw_osd_blending_s *blending)
|
||||
if (!blending)
|
||||
return;
|
||||
if (osd_hw.hdr_used)
|
||||
workaround_line = 1;
|
||||
workaround_line = osd_hw.workaround_line;
|
||||
else {
|
||||
if (blending->layer_cnt == 2)
|
||||
workaround_line = 0;
|
||||
else
|
||||
workaround_line = 1;
|
||||
workaround_line = osd_hw.workaround_line;
|
||||
}
|
||||
layer_blend = &(blending->layer_blend);
|
||||
blend_reg = &(blending->blend_reg);
|
||||
@@ -6537,9 +6537,10 @@ static void osd_setting_blend0_input(u32 index,
|
||||
struct hw_osd_blending_s *blending)
|
||||
{
|
||||
struct layer_blend_s *layer_blend;
|
||||
u32 workaround_line = 1;
|
||||
u32 workaround_line = 0;
|
||||
/* for g12a blend shift issue */
|
||||
|
||||
workaround_line = osd_hw.workaround_line;
|
||||
layer_blend = &(blending->layer_blend);
|
||||
if (index == OSD1) {
|
||||
|
||||
@@ -8464,9 +8465,16 @@ void osd_init_hw(u32 logo_loaded, u32 osd_probe,
|
||||
osd_hw.disp_info.position_x = 0;
|
||||
osd_hw.disp_info.position_y = 0;
|
||||
osd_hw.disp_info.position_w = 1920;
|
||||
osd_hw.disp_info.background_h = 1080;
|
||||
osd_hw.disp_info.position_h = 1080;
|
||||
osd_hw.vinfo_width = 1920;
|
||||
osd_hw.vinfo_height = 1080;
|
||||
if ((osd_hw.osd_meson_dev.cpu_id ==
|
||||
__MESON_CPU_MAJOR_ID_G12A) ||
|
||||
(osd_hw.osd_meson_dev.cpu_id ==
|
||||
__MESON_CPU_MAJOR_ID_G12B))
|
||||
osd_hw.workaround_line = 1;
|
||||
else
|
||||
osd_hw.workaround_line = 0;
|
||||
for (idx = 0; idx < osd_hw.osd_meson_dev.osd_count; idx++) {
|
||||
osd_hw.premult_en[idx] = 0;
|
||||
osd_hw.osd_afbcd[idx].format = COLOR_INDEX_32_ABGR;
|
||||
|
||||
@@ -6249,8 +6249,11 @@ int dwc_otg_set_param_dev_perio_tx_fifo_size(dwc_otg_core_if_t *core_if,
|
||||
return -DWC_E_INVALID;
|
||||
}
|
||||
if (val >
|
||||
(DWC_READ_REG32(&core_if->core_global_regs->dtxfsiz[fifo_num]) >> 16)) {
|
||||
DWC_WARN("Value is larger then power-on FIFO size\n");
|
||||
(DWC_READ_REG32
|
||||
(&core_if->core_global_regs->dtxfsiz[fifo_num]) >> 16)) {
|
||||
if (DWC_READ_REG32
|
||||
(&core_if->core_global_regs->dtxfsiz[fifo_num]) >> 16)
|
||||
DWC_WARN("Value is larger then power-on FIFO size\n");
|
||||
if (dwc_otg_param_initialized
|
||||
(core_if->core_params->dev_perio_tx_fifo_size[fifo_num]))
|
||||
DWC_ERROR
|
||||
@@ -6313,7 +6316,8 @@ int dwc_otg_set_param_dev_tx_fifo_size(dwc_otg_core_if_t *core_if, int32_t val,
|
||||
return -DWC_E_INVALID;
|
||||
}
|
||||
if (val > txfifosize.b.depth) {
|
||||
DWC_WARN("Value is larger then power-on FIFO size\n");
|
||||
if (txfifosize.b.depth)
|
||||
DWC_WARN("Value is larger then power-on FIFO size\n");
|
||||
if (dwc_otg_param_initialized
|
||||
(core_if->core_params->dev_tx_fifo_size[fifo_num]))
|
||||
DWC_ERROR
|
||||
|
||||
@@ -1064,7 +1064,7 @@ int32_t dwc_otg_pcd_handle_enum_done_intr(dwc_otg_pcd_t *pcd)
|
||||
DWC_DEBUGPL(DBG_PCD, "SPEED ENUM\n");
|
||||
|
||||
#ifdef CONFIG_AMLOGIC_USB3PHY
|
||||
if (GET_CORE_IF(pcd)->phy_interface == 0) {
|
||||
if (GET_CORE_IF(pcd)->phy_interface != 1) {
|
||||
speed = get_device_speed(GET_CORE_IF(pcd));
|
||||
if (speed != USB_SPEED_HIGH) {
|
||||
gintsts.d32 = 0;
|
||||
|
||||
@@ -1267,7 +1267,7 @@ int dwc_usb_change(struct notifier_block *nb,
|
||||
if (value) {
|
||||
DWC_DEBUGPL(DBG_PCDV, "start usb device\n");
|
||||
dwc_otg_enable_global_interrupts(otg_dev->core_if);
|
||||
if (otg_dev->core_if->phy_interface == 0)
|
||||
if (otg_dev->core_if->phy_interface != 0)
|
||||
dwc_otg_enable_device_interrupts(otg_dev->core_if);
|
||||
otg_dev->pcd->core_if->pcd_cb->start(otg_dev->pcd);
|
||||
} else {
|
||||
@@ -1275,7 +1275,7 @@ int dwc_usb_change(struct notifier_block *nb,
|
||||
dwc_otg_disable_global_interrupts(otg_dev->core_if);
|
||||
|
||||
/* Disable all interrupts. */
|
||||
if (otg_dev->core_if->phy_interface == 0)
|
||||
if (otg_dev->core_if->phy_interface != 0)
|
||||
DWC_WRITE_REG32(&global_regs->gintmsk, 0);
|
||||
|
||||
otg_dev->pcd->core_if->pcd_cb->stop(otg_dev->pcd);
|
||||
|
||||
@@ -38,6 +38,10 @@ void set_usb_phy_host_tuning(int port, int default_val)
|
||||
|
||||
if (!g_phy2_v2)
|
||||
return;
|
||||
|
||||
if (g_phy2_v2->phy_version == 1)
|
||||
return;
|
||||
|
||||
if (port > g_phy2_v2->portnum)
|
||||
return;
|
||||
if (default_val == g_phy2_v2->phy_cfg_state[port])
|
||||
@@ -63,6 +67,10 @@ void set_usb_phy_device_tuning(int port, int default_val)
|
||||
|
||||
if (!g_phy2_v2)
|
||||
return;
|
||||
|
||||
if (g_phy2_v2->phy_version == 1)
|
||||
return;
|
||||
|
||||
if (port > g_phy2_v2->portnum)
|
||||
return;
|
||||
if (default_val == g_phy2_v2->phy_cfg_state[port])
|
||||
@@ -111,10 +119,15 @@ static int amlogic_new_usb2_init(struct usb_phy *x)
|
||||
union u2p_r0_v2 reg0;
|
||||
union u2p_r1_v2 reg1;
|
||||
u32 val;
|
||||
u32 temp = 0;
|
||||
u32 portnum = phy->portnum;
|
||||
|
||||
while (portnum--)
|
||||
temp = temp | (1 << (16 + portnum));
|
||||
|
||||
val = readl((void __iomem *)
|
||||
((unsigned long)phy->reset_regs + (0x21 * 4 - 0x8)));
|
||||
writel((val | (0x3 << 16)), (void __iomem *)
|
||||
writel((val | temp), (void __iomem *)
|
||||
((unsigned long)phy->reset_regs + (0x21 * 4 - 0x8)));
|
||||
|
||||
amlogic_new_usbphy_reset_v2(phy);
|
||||
@@ -183,11 +196,16 @@ static void amlogic_new_usb2phy_shutdown(struct usb_phy *x)
|
||||
{
|
||||
struct amlogic_usb_v2 *phy = phy_to_amlusb(x);
|
||||
u32 val;
|
||||
u32 temp = 0;
|
||||
u32 cnt = phy->portnum;
|
||||
|
||||
while (cnt--)
|
||||
temp = temp | (1 << (16 + cnt));
|
||||
|
||||
/* set usb phy to low power mode */
|
||||
val = readl((void __iomem *)
|
||||
((unsigned long)phy->reset_regs + (0x21 * 4 - 0x8)));
|
||||
writel((val & (~(0x3 << 16))), (void __iomem *)
|
||||
writel((val & (~temp)), (void __iomem *)
|
||||
((unsigned long)phy->reset_regs + (0x21 * 4 - 0x8)));
|
||||
|
||||
phy->suspend_flag = 1;
|
||||
@@ -204,6 +222,7 @@ static int amlogic_new_usb2_probe(struct platform_device *pdev)
|
||||
void __iomem *reset_base = NULL;
|
||||
void __iomem *phy_cfg_base[4];
|
||||
int portnum = 0;
|
||||
int phy_version = 0;
|
||||
const void *prop;
|
||||
int i = 0;
|
||||
int retval;
|
||||
@@ -218,6 +237,12 @@ static int amlogic_new_usb2_probe(struct platform_device *pdev)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
prop = of_get_property(dev->of_node, "version", NULL);
|
||||
if (prop)
|
||||
phy_version = of_read_ulong(prop, 1);
|
||||
else
|
||||
phy_version = 0;
|
||||
|
||||
phy_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
phy_base = devm_ioremap_resource(dev, phy_mem);
|
||||
if (IS_ERR(phy_base))
|
||||
@@ -308,6 +333,7 @@ static int amlogic_new_usb2_probe(struct platform_device *pdev)
|
||||
phy->pll_setting[6] = pll_setting[6];
|
||||
phy->pll_setting[7] = pll_setting[7];
|
||||
phy->suspend_flag = 0;
|
||||
phy->phy_version = phy_version;
|
||||
for (i = 0; i < portnum; i++) {
|
||||
phy->phy_cfg[i] = phy_cfg_base[i];
|
||||
/* set port default tuning state */
|
||||
|
||||
@@ -944,7 +944,7 @@ int xhci_disable_slot(struct xhci_hcd *xhci, struct xhci_command *command,
|
||||
if (!virt_dev)
|
||||
return -EINVAL;
|
||||
if (!command)
|
||||
command = xhci_alloc_command(xhci, false, false, GFP_KERNEL);
|
||||
command = xhci_alloc_command(xhci, false, false, GFP_ATOMIC);
|
||||
if (!command)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -980,7 +980,6 @@ static void xhci_set_port_power(struct xhci_hcd *xhci,
|
||||
{
|
||||
__le32 __iomem **port_array;
|
||||
u32 temp;
|
||||
unsigned long flags = 0;
|
||||
|
||||
port_array = xhci->usb2_ports;
|
||||
temp = readl(port_array[index]);
|
||||
@@ -994,14 +993,6 @@ static void xhci_set_port_power(struct xhci_hcd *xhci,
|
||||
/* Power off */
|
||||
writel(temp & ~PORT_POWER, port_array[index]);
|
||||
}
|
||||
|
||||
spin_unlock_irqrestore(&xhci->lock, flags);
|
||||
temp = usb_acpi_power_manageable(hcd->self.root_hub,
|
||||
index);
|
||||
if (temp)
|
||||
usb_acpi_set_power_state(hcd->self.root_hub,
|
||||
index, on);
|
||||
spin_lock_irqsave(&xhci->lock, flags);
|
||||
}
|
||||
|
||||
|
||||
@@ -1070,7 +1061,6 @@ static int xhci_test_suspend_resume(struct usb_hcd *hcd,
|
||||
__le32 __iomem **port_array = xhci->usb2_ports;
|
||||
|
||||
/* 15 second delay per the test spec */
|
||||
spin_unlock_irqrestore(&xhci->lock, flags);
|
||||
xhci_err(xhci, "into suspend\n");
|
||||
spin_lock_irqsave(&xhci->lock, flags);
|
||||
|
||||
@@ -1091,6 +1081,7 @@ static int xhci_test_suspend_resume(struct usb_hcd *hcd,
|
||||
temp = readl(port_array[wIndex]);
|
||||
if ((temp & PORT_PE) == 0 || (temp & PORT_RESET)
|
||||
|| (temp & PORT_PLS_MASK) >= XDEV_U3) {
|
||||
spin_unlock_irqrestore(&xhci->lock, flags);
|
||||
xhci_warn(xhci, "USB core suspending device not in U0/U1/U2.\n");
|
||||
return -1;
|
||||
}
|
||||
@@ -1098,6 +1089,7 @@ static int xhci_test_suspend_resume(struct usb_hcd *hcd,
|
||||
slot_id = xhci_find_slot_id_by_port(hcd, xhci,
|
||||
wIndex + 1);
|
||||
if (!slot_id) {
|
||||
spin_unlock_irqrestore(&xhci->lock, flags);
|
||||
xhci_warn(xhci, "slot_id is zero\n");
|
||||
return -1;
|
||||
}
|
||||
@@ -1122,11 +1114,15 @@ static int xhci_test_suspend_resume(struct usb_hcd *hcd,
|
||||
temp = readl(port_array[wIndex]);
|
||||
xhci_dbg(xhci, "clear USB_PORT_FEAT_SUSPEND\n");
|
||||
xhci_dbg(xhci, "PORTSC %04x\n", temp);
|
||||
if (temp & PORT_RESET)
|
||||
if (temp & PORT_RESET) {
|
||||
spin_unlock_irqrestore(&xhci->lock, flags);
|
||||
return -1;
|
||||
}
|
||||
if ((temp & PORT_PLS_MASK) == XDEV_U3) {
|
||||
if ((temp & PORT_PE) == 0)
|
||||
if ((temp & PORT_PE) == 0) {
|
||||
spin_unlock_irqrestore(&xhci->lock, flags);
|
||||
return -1;
|
||||
}
|
||||
|
||||
xhci_set_link_state(xhci, port_array, wIndex,
|
||||
XDEV_RESUME);
|
||||
@@ -1138,6 +1134,7 @@ static int xhci_test_suspend_resume(struct usb_hcd *hcd,
|
||||
}
|
||||
|
||||
xhci_ring_device(xhci, slot_id);
|
||||
spin_unlock_irqrestore(&xhci->lock, flags);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
@@ -1426,8 +1423,11 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
|
||||
else if (test_mode == 5)
|
||||
xhci_port_set_test_mode(xhci,
|
||||
test_mode, wIndex);
|
||||
else
|
||||
else {
|
||||
spin_unlock_irqrestore(&xhci->lock, flags);
|
||||
retval = xhci_test_suspend_resume(hcd, wIndex);
|
||||
spin_lock_irqsave(&xhci->lock, flags);
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
|
||||
@@ -3386,16 +3386,22 @@ int xhci_test_single_step(struct xhci_hcd *xhci, gfp_t mem_flags,
|
||||
struct xhci_td *td;
|
||||
unsigned long flags = 0;
|
||||
|
||||
spin_lock_irqsave(&xhci->lock, flags);
|
||||
|
||||
ep_ring = xhci_urb_to_transfer_ring(xhci, urb);
|
||||
if (!ep_ring)
|
||||
if (!ep_ring) {
|
||||
spin_unlock_irqrestore(&xhci->lock, flags);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Need to copy setup packet into setup TRB, so we can't use the setup
|
||||
* DMA address.
|
||||
*/
|
||||
if (!urb->setup_packet)
|
||||
if (!urb->setup_packet) {
|
||||
spin_unlock_irqrestore(&xhci->lock, flags);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* 1 TRB for setup, 1 for status */
|
||||
num_trbs = 2;
|
||||
@@ -3409,8 +3415,10 @@ int xhci_test_single_step(struct xhci_hcd *xhci, gfp_t mem_flags,
|
||||
ret = prepare_transfer(xhci, xhci->devs[slot_id],
|
||||
ep_index, urb->stream_id,
|
||||
num_trbs, urb, 0, mem_flags);
|
||||
if (ret < 0)
|
||||
if (ret < 0) {
|
||||
spin_unlock_irqrestore(&xhci->lock, flags);
|
||||
return ret;
|
||||
}
|
||||
|
||||
urb_priv = urb->hcpriv;
|
||||
td = urb_priv->td[0];
|
||||
@@ -3515,14 +3523,12 @@ int xhci_test_single_step(struct xhci_hcd *xhci, gfp_t mem_flags,
|
||||
giveback_first_trb(xhci, slot_id, ep_index, 0,
|
||||
start_cycle, start_trb);
|
||||
|
||||
/* 15 second delay per the test spec */
|
||||
spin_unlock_irqrestore(&xhci->lock, flags);
|
||||
xhci_err(xhci, "step 3\n");
|
||||
msleep(15000);
|
||||
spin_lock_irqsave(&xhci->lock, flags);
|
||||
/* 15 second delay per the test spec */
|
||||
spin_unlock_irqrestore(&xhci->lock, flags);
|
||||
xhci_err(xhci, "step 3\n");
|
||||
msleep(15000);
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1414,14 +1414,18 @@ int xhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, gfp_t mem_flags)
|
||||
&& (setup->wIndex != 0x0)) {
|
||||
if ((((setup->wIndex)>>8) & 0xff) == 7) {
|
||||
setup->wIndex = 0;
|
||||
spin_unlock_irqrestore(&xhci->lock, flags);
|
||||
ret = xhci_test_single_step(xhci,
|
||||
GFP_ATOMIC, urb,
|
||||
slot_id, ep_index, 1);
|
||||
spin_lock_irqsave(&xhci->lock, flags);
|
||||
} else if ((((setup->wIndex)>>8)&0xff) == 8) {
|
||||
setup->wIndex = 0;
|
||||
spin_unlock_irqrestore(&xhci->lock, flags);
|
||||
ret = xhci_test_single_step(xhci,
|
||||
GFP_ATOMIC, urb,
|
||||
slot_id, ep_index, 2);
|
||||
spin_lock_irqsave(&xhci->lock, flags);
|
||||
}
|
||||
} else
|
||||
#endif
|
||||
|
||||
@@ -179,6 +179,7 @@ struct amlogic_usb_v2 {
|
||||
|
||||
int portnum;
|
||||
int suspend_flag;
|
||||
int phy_version;
|
||||
struct clk *clk;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user