]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - ti-linux-kernel/ti-linux-kernel-next.git/log
ti-linux-kernel/ti-linux-kernel-next.git
4 years agoMerged TI feature ti_linux_base_rt into ti-rt-linux-4.19.y-next ti-rt-linux-4.19.y-next-20190828
LCPD Auto Merger [Wed, 28 Aug 2019 07:27:29 +0000 (02:27 -0500)]
Merged TI feature ti_linux_base_rt into ti-rt-linux-4.19.y-next

TI-Feature: ti_linux_base_rt
TI-Tree: git@git.ti.com:ti-linux-kernel/ti-linux-kernel-next.git
TI-Branch: ti-linux-4.19.y-next

* 'ti-linux-4.19.y-next' of git.ti.com:ti-linux-kernel/ti-linux-kernel-next:
  net: ti: icssg_prueth: Reduce verbosity of some debug messages
  net: ti: icssg_classifier: Keep FT1 disabled for default and disabled
  net: ti: icssg_prueth: Fix bug at ifdown under high ingress traffic
  net: ti: prueth: Hook up net device's ioctl to phy_mii_ioctl()
  net: ti: icssg_prueth: Hook up net device's ioctl to phy_mii_ioctl()
  soc: ti: pruss: update pruss_get() to retrieve a PRUSS id
  soc: ti: pruss: store the pruss instance id
  remoteproc: Add a sysfs interface for name

Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
4 years agoMerged TI feature rpmsg_next into ti-linux-4.19.y-next ti-linux-4.19.y-next-20190828
LCPD Auto Merger [Wed, 28 Aug 2019 07:23:43 +0000 (02:23 -0500)]
Merged TI feature rpmsg_next into ti-linux-4.19.y-next

TI-Feature: rpmsg_next
TI-Tree: git://git.ti.com/rpmsg/rpmsg.git
TI-Branch: rpmsg-ti-linux-4.19.y-next

* 'rpmsg-ti-linux-4.19.y-next' of git://git.ti.com/rpmsg/rpmsg:
  soc: ti: pruss: update pruss_get() to retrieve a PRUSS id
  soc: ti: pruss: store the pruss instance id
  remoteproc: Add a sysfs interface for name

Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
4 years agoMerged TI feature connectivity_next into ti-linux-4.19.y-next
LCPD Auto Merger [Wed, 28 Aug 2019 07:23:41 +0000 (02:23 -0500)]
Merged TI feature connectivity_next into ti-linux-4.19.y-next

TI-Feature: connectivity_next
TI-Tree: git://git.ti.com/~nsekhar/ti-linux-kernel/nsekhar-ti-linux-kernel.git
TI-Branch: connectivity-next

* 'connectivity-next' of git://git.ti.com/~nsekhar/ti-linux-kernel/nsekhar-ti-linux-kernel:
  net: ti: icssg_prueth: Reduce verbosity of some debug messages
  net: ti: icssg_classifier: Keep FT1 disabled for default and disabled
  net: ti: icssg_prueth: Fix bug at ifdown under high ingress traffic
  net: ti: prueth: Hook up net device's ioctl to phy_mii_ioctl()
  net: ti: icssg_prueth: Hook up net device's ioctl to phy_mii_ioctl()

Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
4 years agonet: ti: icssg_prueth: Reduce verbosity of some debug messages
Roger Quadros [Tue, 27 Aug 2019 11:40:24 +0000 (14:40 +0300)]
net: ti: icssg_prueth: Reduce verbosity of some debug messages

Users don't really need to know the flow id base of the
RX channels. Use netdev_dbg() for those messages.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
4 years agonet: ti: icssg_classifier: Keep FT1 disabled for default and disabled
Roger Quadros [Tue, 27 Aug 2019 11:40:23 +0000 (14:40 +0300)]
net: ti: icssg_classifier: Keep FT1 disabled for default and disabled

We don't need FT1 for default and disabled cases so keep
it disabled.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
4 years agonet: ti: icssg_prueth: Fix bug at ifdown under high ingress traffic
Roger Quadros [Tue, 27 Aug 2019 11:40:22 +0000 (14:40 +0300)]
net: ti: icssg_prueth: Fix bug at ifdown under high ingress traffic

NOTE: I can still reproduce the bug. but more harder to reproduce
than before.

Now that PHY state machine is fixed at phy_stop
we can rely on that to stop traffic on wire.

The other option was to implement the shutdown command so
firmware stops processing packets but that is still TBD.

Fixes the following bug.

On EVM:
- iperf3 -s -D
On PC:
- iperf3 -c <evm ip> -u -b0 -i1 -t300
On EVM:
-[1] ifdown eth5
- ifup eth5
- sleep 5 (wait till link up)
- goto [1]

[   50.534182] ------------[ cut here ]------------
[   50.538828] k3_knav_desc_pool size 65536 != avail 65280
[   50.538890] WARNING: CPU: 2 PID: 1082 at drivers/soc/ti/k3-navss-desc-pool.c:33 k3_knav_pool_destroy+0x11c/0x130
[   50.554252] Modules linked in: rpmsg_proto ti_am335x_adc kfifo_buf icssg_prueth dwc3 omap_rng rng_core udc_core pru_rproc crc32_ce crct10dif_ce pruss irq_pruss_intc ti_k3_r5_remoteproc virtio_rpmsg_bus remot6
[   50.592783] CPU: 2 PID: 1082 Comm: ifconfig Not tainted 4.19.59-00001-ge47dda560c33 #167
[   50.600856] Hardware name: Texas Instruments AM654 Base Board (DT)
[   50.607025] pstate: 40000005 (nZcv daif -PAN -UAO)
[   50.611809] pc : k3_knav_pool_destroy+0x11c/0x130
[   50.616503] lr : k3_knav_pool_destroy+0x11c/0x130
[   50.621194] sp : ffff000012baf9f0
[   50.624499] x29: ffff000012baf9f0 x28: ffff800845610000
[   50.629803] x27: ffff800846b85e00 x26: ffff800841198000
[   50.635107] x25: 0000000000001042 x24: 0000000000000000
[   50.640411] x23: ffff800841198cf0 x22: ffff000002210058
[   50.645715] x21: ffff800841198000 x20: 0000000000010000
[   50.651018] x19: ffff800842609780 x18: 0000000000000000
[   50.656322] x17: 0000000000000001 x16: 0000000000000007
[   50.661625] x15: ffffffffffffffff x14: ffff000008c93648
[   50.666929] x13: ffff000008d570d0 x12: ffff000008d56d16
[   50.672232] x11: ffff000008ca9000 x10: ffff000012baf670
[   50.677535] x9 : ffff000012baf9f0 x8 : 203d212036333535
[   50.682839] x7 : ffff000008d56000 x6 : 00000000000001b7
[   50.688142] x5 : 0000000000000000 x4 : ffff80087fad17e0
[   50.693446] x3 : ffff80087fad17e0 x2 : 0000000000000007
[   50.698749] x1 : b4f05b6436ac2100 x0 : 0000000000000000
[   50.704053] Call trace:
[   50.706494]  k3_knav_pool_destroy+0x11c/0x130
[   50.710853]  prueth_cleanup_tx_chns+0x30/0x48 [icssg_prueth]
[   50.716506]  emac_ndo_stop+0x190/0x1f0 [icssg_prueth]
[   50.721552]  __dev_close_many+0x9c/0x118
[   50.725469]  __dev_change_flags+0xa8/0x1b8
[   50.729556]  dev_change_flags+0x20/0x60
[   50.733386]  devinet_ioctl+0x3f4/0x730
[   50.737127]  inet_ioctl+0xf8/0x268
[   50.740526]  sock_do_ioctl+0x48/0x1f8
[   50.744181]  sock_ioctl+0x1c0/0x3b8
[   50.747666]  do_vfs_ioctl+0xb8/0x890
[   50.751233]  ksys_ioctl+0x78/0xa8
[   50.754541]  __arm64_sys_ioctl+0x1c/0x28
[   50.758457]  el0_svc_common+0x90/0x158
[   50.762198]  el0_svc_handler+0x2c/0x80
[   50.765939]  el0_svc+0x8/0xc
[   50.768811] ---[ end trace 3ff26d234f6778ad ]---
[   50.773518] ------------[ cut here ]------------
[   50.778130] kernel BUG at lib/genalloc.c:252!

Suggested-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
4 years agonet: ti: prueth: Hook up net device's ioctl to phy_mii_ioctl()
Roger Quadros [Tue, 27 Aug 2019 13:58:00 +0000 (16:58 +0300)]
net: ti: prueth: Hook up net device's ioctl to phy_mii_ioctl()

If user space wants to read/write to PHY it should be possible
from now.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
4 years agonet: ti: icssg_prueth: Hook up net device's ioctl to phy_mii_ioctl()
Roger Quadros [Tue, 27 Aug 2019 13:57:59 +0000 (16:57 +0300)]
net: ti: icssg_prueth: Hook up net device's ioctl to phy_mii_ioctl()

If user space wants to read/write to PHY it should be possible
from now.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
4 years agosoc: ti: pruss: update pruss_get() to retrieve a PRUSS id
Suman Anna [Mon, 17 Jun 2019 21:15:41 +0000 (16:15 -0500)]
soc: ti: pruss: update pruss_get() to retrieve a PRUSS id

Update the pruss_get() function to take in an additional integer
pointer argument in which the PRUSS instance id is filled in and
provided back to the callers. This allows the drivers to add some
instance-specific logic/customization in their code, as the PRUSS
handle is not useful to build this logic.

The already existing usage within both the regular PRU Ethernet
and the ICSSG PRU Ethernet drivers have also been updated accordingly,
and this will cater to its need for supporting switching between
different Ethernet protocols dynamically per instance. The invocation
within the PRU Soft UART driver has also been updated, with this
driver not needing the PRUSS instance id at present.

Signed-off-by: Suman Anna <s-anna@ti.com>
4 years agosoc: ti: pruss: store the pruss instance id
Suman Anna [Thu, 2 May 2019 22:18:05 +0000 (17:18 -0500)]
soc: ti: pruss: store the pruss instance id

Add logic to the PRUSS platform driver to store the instance id
of a PRUSS instance. This is being added to enable support for
the PRU Ethernet driver to be able to switch between different
Ethernet protocols dynamically per instance.

The values for instance ids are not always zero-indexed on all
SoCs, they were chosen to match the numbering used in the TRMs.
The instance ids are computed assigned using the PRUSS memory
region base address lookup table. The base address matching
logic is not robust for long-term for newer SoCs, but is okay
for currently supported SoCs as all the addresses are unique.
This is done this way to retain the current usage of minimal
static data and to avoid having to introduce the instance
specific static data just for the instance id data.

Signed-off-by: Suman Anna <s-anna@ti.com>
4 years agoremoteproc: Add a sysfs interface for name
Suman Anna [Wed, 13 Mar 2019 19:13:31 +0000 (14:13 -0500)]
remoteproc: Add a sysfs interface for name

This patch adds a sysfs interface that provides the name of the
remote processor to userspace. This allows the userspace to identify
a remote processor as the remoteproc devices themselves are created
based on probe order and can change from one boot to another or
at runtime.

The name is made available in debugfs originally, and is being
retained for now. This can be cleaned up after couple of releases
once users get familiar with the new interface.

Signed-off-by: Suman Anna <s-anna@ti.com>
4 years agoMerged TI feature ti_linux_base_rt into ti-rt-linux-4.19.y
LCPD Auto Merger [Tue, 27 Aug 2019 14:31:59 +0000 (09:31 -0500)]
Merged TI feature ti_linux_base_rt into ti-rt-linux-4.19.y

* 'ti-linux-4.19.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel:
  usb: dwc3: don't set gadget->is_otg flag
  ARM: dts: dra74x: Fix iodelay configuration for mmc3
  usb: dwc3: gadget: remove DWC3_EP_END_TRANSFER_PENDING
  usb: dwc3: gadget: early giveback if End Transfer already completed
  usb: dwc3: gadget: don't use resource_index as a flag
  usb: dwc3: gadget: clear DWC3_EP_TRANSFER_STARTED on cmd complete
  misc: pci_endpoint_test: Use full pci-endpoint-test name in request irq
  misc: pci_endpoint_test: Fix to support > 10 pci-endpoint-test devices
  tools: PCI: Add 'e' to clear IRQ
  misc: pci_endpoint_test: Add ioctl to clear IRQ
  misc: pci_endpoint_test: Do not request or allocate IRQs in probe
  usb: gadget: udc: core: Fix segfault if udc_bind_to_driver() for pending driver fails

Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
4 years agoMerged TI feature connectivity into ti-linux-4.19.y
LCPD Auto Merger [Tue, 27 Aug 2019 14:15:42 +0000 (09:15 -0500)]
Merged TI feature connectivity into ti-linux-4.19.y

* 'connectivity-ti-linux-4.19.y' of git://git.ti.com/connectivity-integration-tree/connectivity-ti-linux-kernel:
  usb: dwc3: don't set gadget->is_otg flag
  ARM: dts: dra74x: Fix iodelay configuration for mmc3
  usb: dwc3: gadget: remove DWC3_EP_END_TRANSFER_PENDING
  usb: dwc3: gadget: early giveback if End Transfer already completed
  usb: dwc3: gadget: don't use resource_index as a flag
  usb: dwc3: gadget: clear DWC3_EP_TRANSFER_STARTED on cmd complete
  misc: pci_endpoint_test: Use full pci-endpoint-test name in request irq
  misc: pci_endpoint_test: Fix to support > 10 pci-endpoint-test devices
  tools: PCI: Add 'e' to clear IRQ
  misc: pci_endpoint_test: Add ioctl to clear IRQ
  misc: pci_endpoint_test: Do not request or allocate IRQs in probe
  usb: gadget: udc: core: Fix segfault if udc_bind_to_driver() for pending driver fails

Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
4 years agousb: dwc3: don't set gadget->is_otg flag
Roger Quadros [Mon, 26 Aug 2019 11:56:22 +0000 (14:56 +0300)]
usb: dwc3: don't set gadget->is_otg flag

This reverts commit
6a4290cc28be1 ("usb: dwc3: gadget: set the OTG flag in dwc3 gadget driver.")

We don't yet support any of the OTG mechanisms (HNP/SRP/ADP)
and are not setting gadget->otg_caps, so don't set gadget->is_otg
flag.

If we do then we end up publishing a OTG1.0 descriptor in
the gadget descriptor which causes device enumeration to fail
if we are connected to a host with CONFIG_USB_OTG enabled.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
4 years agoARM: dts: dra74x: Fix iodelay configuration for mmc3
Faiz Abbas [Tue, 27 Aug 2019 08:00:49 +0000 (13:30 +0530)]
ARM: dts: dra74x: Fix iodelay configuration for mmc3

commit 07f9a8be66a9bd86f9eaedf8f8aeb416195adab8 upstream.

According to the latest am572x[1] and dra74x[2] data manuals, mmc3
default, hs, sdr12 and sdr25 modes use iodelay values given in
MMC3_MANUAL1. Set the MODE_SELECT bit for these so that manual mode is
selected and correct iodelay values are configured.

[1] http://www.ti.com/lit/ds/symlink/am5728.pdf
[2] http://www.ti.com/lit/ds/symlink/dra746.pdf

Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
4 years agousb: dwc3: gadget: remove DWC3_EP_END_TRANSFER_PENDING
Felipe Balbi [Mon, 26 Aug 2019 10:34:52 +0000 (13:34 +0300)]
usb: dwc3: gadget: remove DWC3_EP_END_TRANSFER_PENDING

commit 3aec99154db3a95572bb92aa470589585e37df06 upstream.

Now that we modified the code to fix a race condition, it's clear that
DWC3_EP_END_TRANSFER_PENDING is unnecessary, considering that
DWC3_EP_TRANSFER_STARTED will remain set until End Transfer completes.

Tested-by: Thinh Nguyen <thinhn@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
4 years agousb: dwc3: gadget: early giveback if End Transfer already completed
Felipe Balbi [Mon, 26 Aug 2019 10:34:51 +0000 (13:34 +0300)]
usb: dwc3: gadget: early giveback if End Transfer already completed

commit 9f45581f5eec6786c6eded2b3c85345d82a910c9 upstream.

There is a rare race condition that may happen during a Disconnect
Interrupt if we have a started request that happens to be
dequeued *after* completion of End Transfer command. If that happens,
that request will be left waiting for completion of an End Transfer
command that will never happen.

If End Transfer command has already completed before, we are safe to
giveback the request straight away.

Tested-by: Thinh Nguyen <thinhn@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
4 years agousb: dwc3: gadget: don't use resource_index as a flag
Felipe Balbi [Mon, 26 Aug 2019 10:34:50 +0000 (13:34 +0300)]
usb: dwc3: gadget: don't use resource_index as a flag

commit 974a1368c33ebb09c94c9ec1b523908cc7ca068f upstream.

We have a proper flag for testing that we have a valid transfer in
flight, let's use that instead.

This patch is in preparation to fix a rare race condition that happens
upon Disconnect Interrupt.

Tested-by: Thinh Nguyen <thinhn@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
4 years agousb: dwc3: gadget: clear DWC3_EP_TRANSFER_STARTED on cmd complete
Felipe Balbi [Mon, 26 Aug 2019 10:34:49 +0000 (13:34 +0300)]
usb: dwc3: gadget: clear DWC3_EP_TRANSFER_STARTED on cmd complete

commit acbfa6c26f21a18830ee064b588c92334305b6af upstream.

We must wait until End Transfer completes in order to clear
DWC3_EP_TRANSFER_STARTED, otherwise we may confuse the driver.

This patch is in preparation to fix a rare race condition that happens
upon Disconnect Interrupt.

Tested-by: Thinh Nguyen <thinhn@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
4 years agomisc: pci_endpoint_test: Use full pci-endpoint-test name in request irq
Kishon Vijay Abraham I [Tue, 27 Aug 2019 07:44:18 +0000 (13:14 +0530)]
misc: pci_endpoint_test: Use full pci-endpoint-test name in request irq

Use full pci-endpoint-test name in request irq, so that it's easy to
profile the device that actually raised the interrupt.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
4 years agomisc: pci_endpoint_test: Fix to support > 10 pci-endpoint-test devices
Kishon Vijay Abraham I [Tue, 27 Aug 2019 07:44:17 +0000 (13:14 +0530)]
misc: pci_endpoint_test: Fix to support > 10 pci-endpoint-test devices

Adding more than 10 pci-endpoint-test devices results in
"kobject_add_internal failed for pci-endpoint-test.1 with -EEXIST, don't
try to register things with the same name in the same directory". This
is because the length of the "name" is limited to 20 characters. Change
the length of the name to 24 in order to support upto 10000
pci-endpoint-test devices.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
4 years agotools: PCI: Add 'e' to clear IRQ
Kishon Vijay Abraham I [Tue, 27 Aug 2019 07:44:16 +0000 (13:14 +0530)]
tools: PCI: Add 'e' to clear IRQ

Add a new command line option 'e' to invoke "PCITEST_CLEAR_IRQ"
ioctl. This can be used to clear the irqs set using the 'i' option.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Cc: Dan Murphy <dmurphy@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
4 years agomisc: pci_endpoint_test: Add ioctl to clear IRQ
Kishon Vijay Abraham I [Tue, 27 Aug 2019 07:44:15 +0000 (13:14 +0530)]
misc: pci_endpoint_test: Add ioctl to clear IRQ

Add ioctl to clear IRQ which can be used to free the allocated
IRQ vectors and free the requested IRQ.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
4 years agomisc: pci_endpoint_test: Do not request or allocate IRQs in probe
Kishon Vijay Abraham I [Tue, 27 Aug 2019 07:44:14 +0000 (13:14 +0530)]
misc: pci_endpoint_test: Do not request or allocate IRQs in probe

Allocation of IRQ vectors and requesting IRQ is done as part of
PCITEST_SET_IRQTYPE. Hence do not request or allocate IRQs in probe.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
4 years agousb: gadget: udc: core: Fix segfault if udc_bind_to_driver() for pending driver fails
Roger Quadros [Thu, 22 Aug 2019 13:47:03 +0000 (16:47 +0300)]
usb: gadget: udc: core: Fix segfault if udc_bind_to_driver() for pending driver fails

If a gadget driver is in the pending drivers list, a UDC
becomes available and udc_bind_to_driver() fails, then it
gets deleted from the pending list.
i.e. list_del(&driver->pending) in check_pending_gadget_drivers().

Then if that gadget driver is unregistered,
usb_gadget_unregister_driver() does a list_del(&driver->pending)
again thus causing a page fault as that list entry has been poisoned
by the previous list_del().

Fix this by using list_del_init() instead of list_del() in
check_pending_gadget_drivers().

Test case:

- Make sure no UDC is available
- modprobe g_mass_storage file=wrongfile
- Load UDC driver so it becomes available
lun0: unable to open backing file: wrongfile
- modprobe -r g_mass_storage

[   60.900431] Unable to handle kernel paging request at virtual address dead000000000108
[   60.908346] Mem abort info:
[   60.911145]   ESR = 0x96000044
[   60.914227]   Exception class = DABT (current EL), IL = 32 bits
[   60.920162]   SET = 0, FnV = 0
[   60.923217]   EA = 0, S1PTW = 0
[   60.926354] Data abort info:
[   60.929228]   ISV = 0, ISS = 0x00000044
[   60.933058]   CM = 0, WnR = 1
[   60.936011] [dead000000000108] address between user and kernel address ranges
[   60.943136] Internal error: Oops: 96000044 [#1] PREEMPT SMP
[   60.948691] Modules linked in: g_mass_storage(-) usb_f_mass_storage libcomposite xhci_plat_hcd xhci_hcd usbcore ti_am335x_adc kfifo_buf omap_rng cdns3 rng_core udc_core crc32_ce xfrm_user crct10dif_ce snd_so6
[   60.993995] Process modprobe (pid: 834, stack limit = 0x00000000c2aebc69)
[   61.000765] CPU: 0 PID: 834 Comm: modprobe Not tainted 4.19.59-01963-g065f42a60499 #92
[   61.008658] Hardware name: Texas Instruments SoC (DT)
[   61.014472] pstate: 60000005 (nZCv daif -PAN -UAO)
[   61.019253] pc : usb_gadget_unregister_driver+0x7c/0x108 [udc_core]
[   61.025503] lr : usb_gadget_unregister_driver+0x30/0x108 [udc_core]
[   61.031750] sp : ffff00001338fda0
[   61.035049] x29: ffff00001338fda0 x28: ffff800846d40000
[   61.040346] x27: 0000000000000000 x26: 0000000000000000
[   61.045642] x25: 0000000056000000 x24: 0000000000000800
[   61.050938] x23: ffff000008d7b0d0 x22: ffff0000088b07c8
[   61.056234] x21: ffff000001100000 x20: ffff000002020260
[   61.061530] x19: ffff0000010ffd28 x18: 0000000000000000
[   61.066825] x17: 0000000000000000 x16: 0000000000000000
[   61.072121] x15: 0000000000000000 x14: 0000000000000000
[   61.077417] x13: ffff000000000000 x12: ffffffffffffffff
[   61.082712] x11: 0000000000000030 x10: 7f7f7f7f7f7f7f7f
[   61.088008] x9 : fefefefefefefeff x8 : 0000000000000000
[   61.093304] x7 : ffffffffffffffff x6 : 000000000000ffff
[   61.098599] x5 : 8080000000000000 x4 : 0000000000000000
[   61.103895] x3 : ffff000001100020 x2 : ffff800846d40000
[   61.109190] x1 : dead000000000100 x0 : dead000000000200
[   61.114486] Call trace:
[   61.116922]  usb_gadget_unregister_driver+0x7c/0x108 [udc_core]
[   61.122828]  usb_composite_unregister+0x10/0x18 [libcomposite]
[   61.128643]  msg_cleanup+0x18/0xfce0 [g_mass_storage]
[   61.133682]  __arm64_sys_delete_module+0x17c/0x1f0
[   61.138458]  el0_svc_common+0x90/0x158
[   61.142192]  el0_svc_handler+0x2c/0x80
[   61.145926]  el0_svc+0x8/0xc
[   61.148794] Code: eb03003f d10be033 54ffff21 a94d0281 (f9000420)
[   61.154869] ---[ end trace afb22e9b637bd9a7 ]---
Segmentation fault

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
4 years agoMerged TI feature ti_linux_base_rt into ti-rt-linux-4.19.y
LCPD Auto Merger [Thu, 22 Aug 2019 11:31:13 +0000 (06:31 -0500)]
Merged TI feature ti_linux_base_rt into ti-rt-linux-4.19.y

* 'ti-linux-4.19.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel:
  net: ethernet: ti: am65-cpsw-nuss: clean up am65_cpsw_nuss_ndo_slave_stop()
  net: ethernet: ti: am65-cpsw-nuss: fix cpsw2g hw stuck on netif down
  net: ethernet: ti: cpsw_sl: fix cpsw_sl_wait_for_idle
  net: phy: ensure phylib state machine is stopped after calling phy_stop
  net: phy: call state machine synchronously in phy_stop
  net: ethernet: ti: am65-cpsw-nuss: fix ale port state on netif open
  net: ethernet: ti: am65-cpsw-nuss: optimize napi rx during netif down
  net: ethernet: ti: am65-cpsw-nuss: fix race between netif down and rx napi

Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
4 years agoMerged TI feature connectivity into ti-linux-4.19.y
LCPD Auto Merger [Thu, 22 Aug 2019 11:00:16 +0000 (06:00 -0500)]
Merged TI feature connectivity into ti-linux-4.19.y

* 'connectivity-ti-linux-4.19.y' of git://git.ti.com/connectivity-integration-tree/connectivity-ti-linux-kernel:
  net: ethernet: ti: am65-cpsw-nuss: clean up am65_cpsw_nuss_ndo_slave_stop()
  net: ethernet: ti: am65-cpsw-nuss: fix cpsw2g hw stuck on netif down
  net: ethernet: ti: cpsw_sl: fix cpsw_sl_wait_for_idle
  net: phy: ensure phylib state machine is stopped after calling phy_stop
  net: phy: call state machine synchronously in phy_stop
  net: ethernet: ti: am65-cpsw-nuss: fix ale port state on netif open
  net: ethernet: ti: am65-cpsw-nuss: optimize napi rx during netif down
  net: ethernet: ti: am65-cpsw-nuss: fix race between netif down and rx napi

Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
4 years agonet: ethernet: ti: am65-cpsw-nuss: clean up am65_cpsw_nuss_ndo_slave_stop()
Grygorii Strashko [Sun, 18 Aug 2019 21:34:14 +0000 (00:34 +0300)]
net: ethernet: ti: am65-cpsw-nuss: clean up am65_cpsw_nuss_ndo_slave_stop()

The PHY .adjust_link() callback will be called as part phy_stop() thanks to
previously back-ported upstream commit e8cfd9d6c772 ("net: phy: call state
machine synchronously in phy_stop") and commit cbfd12b3e8c3 ("net: phy:
ensure phylib state machine is stopped after calling phy_stop") . As result
MAC SL and ALE port state will be configured correctly after call to
phy_stop().

In addition, network PHY core takes care of netif_carrier_x() state.

Hence, drop unnecessary code from am65_cpsw_nuss_ndo_slave_stop() and
am65_cpsw_nuss_adjust_link().

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
4 years agonet: ethernet: ti: am65-cpsw-nuss: fix cpsw2g hw stuck on netif down
Grygorii Strashko [Sun, 18 Aug 2019 21:34:13 +0000 (00:34 +0300)]
net: ethernet: ti: am65-cpsw-nuss: fix cpsw2g hw stuck on netif down

Now the netif down under high ingress traffic pressure could cause AM654x
CPSW2G NUSS stuck in unrecoverable state when TX is working after netif up,
but RX is never working again. The MAC SL status register shows that any
ingress packet kicks MAC SL out of idle, but packet not redirected to CPU
P0 and MAC SL never returns to IDLE.

Steps to reproduce:
 - connect am654-evm to Host
 - set IP address
 - ensure ping is working
 - on Host run: iperf -c <IP> -u -b1200M -i5 -t60
 - on am654-evm run: ifconfig eth0 down up
   when iperf on Host shows first statistic message
 - on am654-evm run: ping <host ip>
 repeat last 2 steps few times if required

Most probably, the stuck is happens when MAC SL is disabled in the middle
of packet reception.

The AM654x TRM defines the correct MAC SL reset/configuration sequence
which is implemented by this patch in am65_cpsw_nuss_adjust_link() on link
down event:
- set CPSW Port state to ALE_PORT_STATE_DISABLE
- force MAC SL to IDLE state (it should finish current and stop processing
  further packets)
- wait for MAC SL IDLE
- disable MAC SL

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
4 years agonet: ethernet: ti: cpsw_sl: fix cpsw_sl_wait_for_idle
Grygorii Strashko [Sun, 18 Aug 2019 21:34:12 +0000 (00:34 +0300)]
net: ethernet: ti: cpsw_sl: fix cpsw_sl_wait_for_idle

There is incorrect condition check for to MAC SL IDLE state used in
cpsw_sl_wait_for_idle() - it checks for 0 instead of 1 for idle status bit
values.

Hence, fix it to check for all MAC SL IDLE status bits to be set.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
4 years agonet: phy: ensure phylib state machine is stopped after calling phy_stop
Heiner Kallweit [Sun, 18 Aug 2019 21:34:11 +0000 (00:34 +0300)]
net: phy: ensure phylib state machine is stopped after calling phy_stop

commit cbfd12b3e8c3542e8142aa041714ed614d3f67b0 upstream.

The call to the phylib state machine in phy_stop() just ensures that
the state machine isn't re-triggered, but a state machine call may
be scheduled already. So lets's call phy_stop_machine().
This also allows to get rid of the call to phy_stop_machine() in
phy_disconnect().

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
4 years agonet: phy: call state machine synchronously in phy_stop
Heiner Kallweit [Sun, 18 Aug 2019 21:34:10 +0000 (00:34 +0300)]
net: phy: call state machine synchronously in phy_stop

commit e8cfd9d6c7727a067b38dbe7655ca02377fdb301 upstream.

phy_stop() may be called e.g. when suspending, therefore all needed
actions should be performed synchronously. Therefore add a synchronous
call to the state machine.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
4 years agonet: ethernet: ti: am65-cpsw-nuss: fix ale port state on netif open
Grygorii Strashko [Sun, 18 Aug 2019 21:34:09 +0000 (00:34 +0300)]
net: ethernet: ti: am65-cpsw-nuss: fix ale port state on netif open

The CPSW port state has not to be set to ALE_PORT_STATE_FORWARD in
.ndo_open() and it has to be properly configured in PHY .adjust_link()
callback only, when link is ready.

Hence, drop setting CPSW port state to ALE_PORT_STATE_FORWARD from
am65_cpsw_nuss_ndo_slave_open().

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
4 years agonet: ethernet: ti: am65-cpsw-nuss: optimize napi rx during netif down
Grygorii Strashko [Sun, 18 Aug 2019 21:34:08 +0000 (00:34 +0300)]
net: ethernet: ti: am65-cpsw-nuss: optimize napi rx during netif down

The RX NAPI handler am65_cpsw_nuss_rx_packets() will return errors now in
case there are still packets to process while interface is going down or
not ready which will cause break of the RX NAPI polling function and NAPI
resceduling. In other words, leftover packets will be processed one by one.

In such cases (interface is going down or not ready) it's valid to still
have unprocessed packets in RX queues and such packets expected just to be
dropped by RX NAPI handler am65_cpsw_nuss_rx_packets().

Hence, update am65_cpsw_nuss_rx_packets() to not return errors for packets
received while interface is going down or not ready, so they will be
processed in batch by NAPI polling function.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
4 years agonet: ethernet: ti: am65-cpsw-nuss: fix race between netif down and rx napi
Grygorii Strashko [Sun, 18 Aug 2019 21:34:07 +0000 (00:34 +0300)]
net: ethernet: ti: am65-cpsw-nuss: fix race between netif down and rx napi

The kernel crashes when AM654x CPSW NUSS network interface is going down
under high pressure of ingress traffic due to the race between
am65_cpsw_nuss_common_stop() and NAPI RX handler - they both trying to free
the same UDMA descriptor.

kernel BUG at lib/genalloc.c:391!
Internal error: Oops - BUG: 0 [ #1] PREEMPT SMP
...
Call trace:
gen_pool_free+0xc8/0xd8
k3_knav_pool_free+0x14/0x20
am65_cpsw_nuss_rx_poll+0x224/0x420
net_rx_action+0x10c/0x2d0
__do_softirq+0x114/0x210
run_ksoftirqd+0x30/0x40
smpboot_thread_fn+0x168/0x268
kthread+0x128/0x130
ret_from_fork+0x10/0x18

Fix it by ensuring that NAPI is stopped at am65_cpsw_nuss_common_stop()
before cleaning up RX UDMA channels/rings.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
4 years agoMerged TI feature ti_linux_base_rt into ti-rt-linux-4.19.y
LCPD Auto Merger [Mon, 19 Aug 2019 14:28:48 +0000 (09:28 -0500)]
Merged TI feature ti_linux_base_rt into ti-rt-linux-4.19.y

* 'ti-linux-4.19.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel:
  usb: cdns3: run role switch state machine at probe

Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
4 years agoMerged TI feature connectivity into ti-linux-4.19.y
LCPD Auto Merger [Mon, 19 Aug 2019 13:38:30 +0000 (08:38 -0500)]
Merged TI feature connectivity into ti-linux-4.19.y

* 'connectivity-ti-linux-4.19.y' of git://git.ti.com/connectivity-integration-tree/connectivity-ti-linux-kernel:
  usb: cdns3: run role switch state machine at probe

Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
4 years agousb: cdns3: run role switch state machine at probe
Roger Quadros [Wed, 14 Aug 2019 09:35:50 +0000 (12:35 +0300)]
usb: cdns3: run role switch state machine at probe

Without this port doesn't transition to right role
if the USB device was plugged before the controller driver loads.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
4 years agoMerged TI feature ti_linux_base_rt into ti-rt-linux-4.19.y
LCPD Auto Merger [Thu, 15 Aug 2019 11:28:49 +0000 (06:28 -0500)]
Merged TI feature ti_linux_base_rt into ti-rt-linux-4.19.y

* 'ti-linux-4.19.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel:
  drm/bridge: cdns-mhdp: Use threaded IRQ instead of delayed_work
  drm/bridge: cdns-mhdp: Call only drm_kms_helper_hotplug_event in irq handler

Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
4 years agoMerged TI feature audio-display into ti-linux-4.19.y
LCPD Auto Merger [Thu, 15 Aug 2019 11:03:08 +0000 (06:03 -0500)]
Merged TI feature audio-display into ti-linux-4.19.y

* 'audio_display-ti-linux-4.19.y' of git.ti.com:~jyrisarha/ti-linux-kernel/jyrisarhas-audio-video-linux-feature-tree:
  drm/bridge: cdns-mhdp: Use threaded IRQ instead of delayed_work
  drm/bridge: cdns-mhdp: Call only drm_kms_helper_hotplug_event in irq handler

Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
4 years agodrm/bridge: cdns-mhdp: Use threaded IRQ instead of delayed_work
Jyri Sarha [Thu, 8 Aug 2019 14:21:45 +0000 (17:21 +0300)]
drm/bridge: cdns-mhdp: Use threaded IRQ instead of delayed_work

Drop delayed work used for HPD IRQ handling and use threaded IRQ instead.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
4 years agodrm/bridge: cdns-mhdp: Call only drm_kms_helper_hotplug_event in irq handler
Jyri Sarha [Thu, 8 Aug 2019 12:49:46 +0000 (15:49 +0300)]
drm/bridge: cdns-mhdp: Call only drm_kms_helper_hotplug_event in irq handler

We should not call connector detect explicitly when handling HPD
IRQ. Calling only drm_kms_helper_hotplug_event() is enough. The helper
should take care of the rest.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
4 years agoMerged TI feature ti_linux_base_rt into ti-rt-linux-4.19.y
LCPD Auto Merger [Tue, 13 Aug 2019 14:28:21 +0000 (09:28 -0500)]
Merged TI feature ti_linux_base_rt into ti-rt-linux-4.19.y

* 'ti-linux-4.19.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel:
  arm64: dts: ti: k3-am654-base/idk: Don't use PHY TX delay for ICSSG ports
  net: ethernet: ti: icssg_prueth: always enable MAC TX delay
  dt-bindings: net: ti, icssg-prueth: drop enable-rgmii-delay

Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
4 years agoMerged TI feature connectivity into ti-linux-4.19.y
LCPD Auto Merger [Tue, 13 Aug 2019 13:38:33 +0000 (08:38 -0500)]
Merged TI feature connectivity into ti-linux-4.19.y

* 'connectivity-ti-linux-4.19.y' of git://git.ti.com/connectivity-integration-tree/connectivity-ti-linux-kernel:
  arm64: dts: ti: k3-am654-base/idk: Don't use PHY TX delay for ICSSG ports
  net: ethernet: ti: icssg_prueth: always enable MAC TX delay
  dt-bindings: net: ti, icssg-prueth: drop enable-rgmii-delay

Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
4 years agoarm64: dts: ti: k3-am654-base/idk: Don't use PHY TX delay for ICSSG ports
Roger Quadros [Wed, 26 Jun 2019 14:20:31 +0000 (17:20 +0300)]
arm64: dts: ti: k3-am654-base/idk: Don't use PHY TX delay for ICSSG ports

We cannot disable MAC TX delay for ICSSG ports so
don't use PHY TX delay.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
4 years agonet: ethernet: ti: icssg_prueth: always enable MAC TX delay
Roger Quadros [Wed, 26 Jun 2019 14:20:30 +0000 (17:20 +0300)]
net: ethernet: ti: icssg_prueth: always enable MAC TX delay

As per TRM, we cannot set RGMII0_ID_MODE (BIT 24) to 1.
This means MAC TX delay has to be always enabled.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
4 years agodt-bindings: net: ti, icssg-prueth: drop enable-rgmii-delay
Roger Quadros [Wed, 26 Jun 2019 14:20:29 +0000 (17:20 +0300)]
dt-bindings: net: ti, icssg-prueth: drop enable-rgmii-delay

As per TRM we need to have rgmii TX delay always enabled in the
ICSSG mac. Drop this property.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
4 years agoMerged TI feature ti_linux_base_rt into ti-rt-linux-4.19.y
LCPD Auto Merger [Mon, 12 Aug 2019 21:53:26 +0000 (16:53 -0500)]
Merged TI feature ti_linux_base_rt into ti-rt-linux-4.19.y

* 'ti-linux-4.19.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel:
  arm64: dts: ti: k3-j721e-main: Fix gic-its node unit-address
  arm64: dts: ti: k3-am65-main: Fix gic-its node unit-address

Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
4 years agoMerged TI feature platform_base into ti-linux-4.19.y
LCPD Auto Merger [Mon, 12 Aug 2019 21:37:06 +0000 (16:37 -0500)]
Merged TI feature platform_base into ti-linux-4.19.y

* 'platform-ti-linux-4.19.y' of git://git.ti.com/~rrnayak/ti-linux-kernel/platform-linux-feature-tree:
  arm64: dts: ti: k3-j721e-main: Fix gic-its node unit-address
  arm64: dts: ti: k3-am65-main: Fix gic-its node unit-address

Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
4 years agoarm64: dts: ti: k3-j721e-main: Fix gic-its node unit-address
Suman Anna [Thu, 8 Aug 2019 15:26:00 +0000 (10:26 -0500)]
arm64: dts: ti: k3-j721e-main: Fix gic-its node unit-address

The gic-its node unit-address has an additional zero compared
to the actual reg value. Fix it.

Fixes: c9e0da481037 ("arm64: dts: ti: Add Support for J721E SoC")
Reported-by: Robert Tivy <rtivy@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
4 years agoarm64: dts: ti: k3-am65-main: Fix gic-its node unit-address
Suman Anna [Thu, 8 Aug 2019 15:25:59 +0000 (10:25 -0500)]
arm64: dts: ti: k3-am65-main: Fix gic-its node unit-address

The gic-its node unit-address has an additional zero compared
to the actual reg value. Fix it.

Fixes: ea47eed33a3f ("arm64: dts: ti: Add Support for AM654 SoC")
Reported-by: Robert Tivy <rtivy@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
4 years agoMerge branch 'ti-linux-4.19.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel into...
LCPD Auto Merger [Mon, 12 Aug 2019 12:28:31 +0000 (07:28 -0500)]
Merge branch 'ti-linux-4.19.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel into ti-rt-linux-4.19.y

TI-Feature: ti_linux_base_rt
TI-Tree: git@git.ti.com:ti-linux-kernel/ti-linux-kernel.git
TI-Branch: ti-linux-4.19.y

* 'ti-linux-4.19.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel:
  drm/omap: fix crash if state->fb is NULL
  ARM: dts: k3-j721e-common-proc-board: enable DP0 power

Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
4 years agoMerge branch 'audio_display-ti-linux-4.19.y' of git.ti.com:~jyrisarha/ti-linux-kernel...
LCPD Auto Merger [Mon, 12 Aug 2019 11:38:32 +0000 (06:38 -0500)]
Merge branch 'audio_display-ti-linux-4.19.y' of git.ti.com:~jyrisarha/ti-linux-kernel/jyrisarhas-audio-video-linux-feature-tree into ti-linux-4.19.y

TI-Feature: audio-display
TI-Tree: git@git.ti.com:~jyrisarha/ti-linux-kernel/jyrisarhas-audio-video-linux-feature-tree.git
TI-Branch: audio_display-ti-linux-4.19.y

* 'audio_display-ti-linux-4.19.y' of git.ti.com:~jyrisarha/ti-linux-kernel/jyrisarhas-audio-video-linux-feature-tree:
  drm/omap: fix crash if state->fb is NULL
  ARM: dts: k3-j721e-common-proc-board: enable DP0 power

Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
4 years agoMerge branch 'ti/4.19-pull' of https://bitbucket.itg.ti.com/scm/~a0400822/linux into...
Jyri Sarha [Mon, 12 Aug 2019 11:03:32 +0000 (14:03 +0300)]
Merge branch 'ti/4.19-pull' of https://bitbucket.itg.ti.com/scm/~a0400822/linux into audio_display-ti-linux-4.19.y

2019.03 display fixes

* 'ti/4.19-pull' of https://bitbucket.itg.ti.com/scm/~a0400822/linux:
  drm/omap: fix crash if state->fb is NULL
  ARM: dts: k3-j721e-common-proc-board: enable DP0 power

4 years agodrm/omap: fix crash if state->fb is NULL
Tomi Valkeinen [Thu, 1 Aug 2019 09:28:07 +0000 (12:28 +0300)]
drm/omap: fix crash if state->fb is NULL

Commit 5dd9a556bd46e0074132a49b3e5758c908fb1556 ("drm/omap: dynamically
assign hw overlays to planes") changed omap_plane_atomic_check() so that
the function no longer returns 0 at the very beginning if state->fb ==
NULL. This causes a crash when rotation is used and we call
omap_framebuffer_supports_rotation(state->fb).

Fix this by moving the rotation check inside if (state->visible) block.

Reported-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Benoit Parrot <bparrot@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
4 years agoARM: dts: k3-j721e-common-proc-board: enable DP0 power
Tomi Valkeinen [Fri, 9 Aug 2019 08:15:17 +0000 (11:15 +0300)]
ARM: dts: k3-j721e-common-proc-board: enable DP0 power

DP connector needs to provide 3.3V on the connector's power pin. Devices
like active adapters need the power to function.

This patch enables the power with a GPIO hog, so it's always enabled as
the power needs to be enabled for us to even detect that an active
adapter is connected.

Probably the power should be enabled only if the DP driver is loaded,
and disabled on remove or suspend, but as it's not clear where the power
should be handled (it's not really part of the DP IP in any way), we use
GPIO hog for now.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Andrew F. Davis <afd@ti.com>
4 years agoMerge branch 'ti-linux-4.19.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel into...
LCPD Auto Merger [Tue, 6 Aug 2019 23:28:30 +0000 (18:28 -0500)]
Merge branch 'ti-linux-4.19.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel into ti-rt-linux-4.19.y

TI-Feature: ti_linux_base_rt
TI-Tree: git@git.ti.com:ti-linux-kernel/ti-linux-kernel.git
TI-Branch: ti-linux-4.19.y

* 'ti-linux-4.19.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel:
  mmc: Select MMC_CQHCI for SDHCI_AM654

Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
4 years agoMerge branch 'connectivity-ti-linux-4.19.y' of git://git.ti.com/connectivity-integrat...
LCPD Auto Merger [Tue, 6 Aug 2019 22:59:43 +0000 (17:59 -0500)]
Merge branch 'connectivity-ti-linux-4.19.y' of git://git.ti.com/connectivity-integration-tree/connectivity-ti-linux-kernel into ti-linux-4.19.y

TI-Feature: connectivity
TI-Tree: git://git.ti.com/connectivity-integration-tree/connectivity-ti-linux-kernel.git
TI-Branch: connectivity-ti-linux-4.19.y

* 'connectivity-ti-linux-4.19.y' of git://git.ti.com/connectivity-integration-tree/connectivity-ti-linux-kernel:
  mmc: Select MMC_CQHCI for SDHCI_AM654

Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
4 years agoMerge branch 'ti-linux-4.19.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel into...
LCPD Auto Merger [Tue, 6 Aug 2019 16:08:43 +0000 (11:08 -0500)]
Merge branch 'ti-linux-4.19.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel into ti-rt-linux-4.19.y

TI-Feature: ti_linux_base_rt
TI-Tree: git@git.ti.com:ti-linux-kernel/ti-linux-kernel.git
TI-Branch: ti-linux-4.19.y

* 'ti-linux-4.19.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel:
  drm/bridge: cdns-mhdp: Fix max swing and pre-emphasis reached conditions
  drm/bridge: cdns-mhdp: Get rid of redundant enum pixel_format
  drm/bridge: cdns-mhdp: Simplify DP output color format hacks

Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
4 years agoMerge branch 'audio_display-ti-linux-4.19.y' of git.ti.com:~jyrisarha/ti-linux-kernel...
LCPD Auto Merger [Tue, 6 Aug 2019 13:31:05 +0000 (08:31 -0500)]
Merge branch 'audio_display-ti-linux-4.19.y' of git.ti.com:~jyrisarha/ti-linux-kernel/jyrisarhas-audio-video-linux-feature-tree into ti-linux-4.19.y

TI-Feature: audio-display
TI-Tree: git@git.ti.com:~jyrisarha/ti-linux-kernel/jyrisarhas-audio-video-linux-feature-tree.git
TI-Branch: audio_display-ti-linux-4.19.y

* 'audio_display-ti-linux-4.19.y' of git.ti.com:~jyrisarha/ti-linux-kernel/jyrisarhas-audio-video-linux-feature-tree:
  drm/bridge: cdns-mhdp: Fix max swing and pre-emphasis reached conditions
  drm/bridge: cdns-mhdp: Get rid of redundant enum pixel_format
  drm/bridge: cdns-mhdp: Simplify DP output color format hacks

Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
4 years agommc: Select MMC_CQHCI for SDHCI_AM654
Faiz Abbas [Tue, 6 Aug 2019 12:00:34 +0000 (17:30 +0530)]
mmc: Select MMC_CQHCI for SDHCI_AM654

Select CONFIG_MMC_CQHCI for CONFIG_MMC_SDHCI_AM654 to enable Command
Queuing Support for J721e platforms.

Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
4 years agoMerge branch 'ti-linux-4.19.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel into...
LCPD Auto Merger [Tue, 6 Aug 2019 11:51:56 +0000 (06:51 -0500)]
Merge branch 'ti-linux-4.19.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel into ti-rt-linux-4.19.y

TI-Feature: ti_linux_base_rt
TI-Tree: git@git.ti.com:ti-linux-kernel/ti-linux-kernel.git
TI-Branch: ti-linux-4.19.y

* 'ti-linux-4.19.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel:
  mmc: sdhci_am654: Add Support for Command Queuing Engine to J721E
  PCI: endpoint: functions/pci-epf-test: Print throughput information
  ti_config_fragments/connectivity.cfg: Enable NVME configs
  ARM: dts: k3-j721e: Fix MMC0 speed modes
  arm64: dts: k3-j721e-main: Add Support for UHS modes
  arm64: dts: k3-j721e-main: Update OTAPDLY values for MMC
  arm64: dts: k3-am65-main: Update OTAPDLY values for MMC
  mmc: sdhci_am654: Enable DLL only for some speed modes
  mmc: sdhci_am654: Update OTAPDLY writes
  dt-bindings: mmc: sdhci-am654: Update Output tap delay binding

Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
4 years agoMerge branch 'connectivity-ti-linux-4.19.y' of git://git.ti.com/connectivity-integrat...
LCPD Auto Merger [Tue, 6 Aug 2019 10:37:21 +0000 (05:37 -0500)]
Merge branch 'connectivity-ti-linux-4.19.y' of git://git.ti.com/connectivity-integration-tree/connectivity-ti-linux-kernel into ti-linux-4.19.y

TI-Feature: connectivity
TI-Tree: git://git.ti.com/connectivity-integration-tree/connectivity-ti-linux-kernel.git
TI-Branch: connectivity-ti-linux-4.19.y

* 'connectivity-ti-linux-4.19.y' of git://git.ti.com/connectivity-integration-tree/connectivity-ti-linux-kernel:
  mmc: sdhci_am654: Add Support for Command Queuing Engine to J721E
  PCI: endpoint: functions/pci-epf-test: Print throughput information
  ti_config_fragments/connectivity.cfg: Enable NVME configs
  ARM: dts: k3-j721e: Fix MMC0 speed modes
  arm64: dts: k3-j721e-main: Add Support for UHS modes
  arm64: dts: k3-j721e-main: Update OTAPDLY values for MMC
  arm64: dts: k3-am65-main: Update OTAPDLY values for MMC
  mmc: sdhci_am654: Enable DLL only for some speed modes
  mmc: sdhci_am654: Update OTAPDLY writes
  dt-bindings: mmc: sdhci-am654: Update Output tap delay binding

Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
4 years agodrm/bridge: cdns-mhdp: Fix max swing and pre-emphasis reached conditions
Swapnil Jakhade [Mon, 15 Jul 2019 08:21:51 +0000 (10:21 +0200)]
drm/bridge: cdns-mhdp: Fix max swing and pre-emphasis reached conditions

Correcting max swing and max pre-emphasis reached conditions. Also
changed implementation when voltage swing and pre-emphasis combination
is not allowed, as per DP spec.

Signed-off-by: Swapnil Jakhade <sjakhade@cadence.com>
Signed-off-by: Jyri Sarha <jsarha@ti.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
4 years agodrm/bridge: cdns-mhdp: Get rid of redundant enum pixel_format
Jyri Sarha [Wed, 31 Jul 2019 11:55:02 +0000 (14:55 +0300)]
drm/bridge: cdns-mhdp: Get rid of redundant enum pixel_format

The enum pixel_format is quite redundant as its literal values are not
used as such anywhere. We can just as well use DRM_COLOR_FORMAT_*
definitions. However, the currently unsupported monochrome (Y_ONLY)
format needs to be handled separately.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
4 years agodrm/bridge: cdns-mhdp: Simplify DP output color format hacks
Jyri Sarha [Fri, 5 Jul 2019 14:27:01 +0000 (17:27 +0300)]
drm/bridge: cdns-mhdp: Simplify DP output color format hacks

There is no use to look what is in connector's display_info, since the
driver currently only supports DRM_COLOR_FORMAT_RGB444 and 8 bit per
color. The patch adds a warning print if this selected format is not
supported by the connected display.

Cdns-mhdp can not do color format conversions. So the proper
implementation for choosing the video sink color format should be made
in the DRM display driver and be communicated down to the cdns-mhdp
bridge.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
4 years agoMerge branch 'ti-linux-4.19.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel into...
LCPD Auto Merger [Tue, 6 Aug 2019 08:29:43 +0000 (03:29 -0500)]
Merge branch 'ti-linux-4.19.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel into ti-rt-linux-4.19.y

TI-Feature: ti_linux_base_rt
TI-Tree: git@git.ti.com:ti-linux-kernel/ti-linux-kernel.git
TI-Branch: ti-linux-4.19.y

* 'ti-linux-4.19.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel:
  Input: edt-ft5x06: disable irq handling during suspend
  ARM: dts: am57xx-idk-osd-lcd-common: make edt-ft5x06 a wakeup source
  ARM: dts: dra7x-evm-osd-lcd-common: make edt-ft5x06 a wakeup source

Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
4 years agoMerge branch 'audio_display-ti-linux-4.19.y' of git.ti.com:~jyrisarha/ti-linux-kernel...
LCPD Auto Merger [Tue, 6 Aug 2019 07:58:27 +0000 (02:58 -0500)]
Merge branch 'audio_display-ti-linux-4.19.y' of git.ti.com:~jyrisarha/ti-linux-kernel/jyrisarhas-audio-video-linux-feature-tree into ti-linux-4.19.y

TI-Feature: audio-display
TI-Tree: git@git.ti.com:~jyrisarha/ti-linux-kernel/jyrisarhas-audio-video-linux-feature-tree.git
TI-Branch: audio_display-ti-linux-4.19.y

* 'audio_display-ti-linux-4.19.y' of git.ti.com:~jyrisarha/ti-linux-kernel/jyrisarhas-audio-video-linux-feature-tree:
  Input: edt-ft5x06: disable irq handling during suspend
  ARM: dts: am57xx-idk-osd-lcd-common: make edt-ft5x06 a wakeup source
  ARM: dts: dra7x-evm-osd-lcd-common: make edt-ft5x06 a wakeup source

Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
4 years agommc: sdhci_am654: Add Support for Command Queuing Engine to J721E
Faiz Abbas [Mon, 5 Aug 2019 15:49:43 +0000 (21:19 +0530)]
mmc: sdhci_am654: Add Support for Command Queuing Engine to J721E

Add Support for CQHCI (Command Queuing Host Controller Interface)
for each of the host controllers present in TI's J721E devices.
Add cqhci_ops and a .irq() callback to handle cqhci specific interrupts.

Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
4 years agoMerge branch 'for19.03.00' of git.ti.com:~bparrot/ti-linux-kernel/bp-ti-linux into...
Jyri Sarha [Tue, 6 Aug 2019 06:25:58 +0000 (09:25 +0300)]
Merge branch 'for19.03.00' of git.ti.com:~bparrot/ti-linux-kernel/bp-ti-linux into audio_display-ti-linux-4.19.y

2019.03 edt-ft touchscreen fixes

* 'for19.03.00' of git.ti.com:~bparrot/ti-linux-kernel/bp-ti-linux:
  Input: edt-ft5x06: disable irq handling during suspend
  ARM: dts: am57xx-idk-osd-lcd-common: make edt-ft5x06 a wakeup source
  ARM: dts: dra7x-evm-osd-lcd-common: make edt-ft5x06 a wakeup source

4 years agoInput: edt-ft5x06: disable irq handling during suspend
Benoit Parrot [Tue, 18 Jun 2019 20:23:51 +0000 (15:23 -0500)]
Input: edt-ft5x06: disable irq handling during suspend

As a wakeup source when the system is in suspend there is little point
trying to access a register across the i2c bus as it is still inactive.
We need to prevent the irq handler from being called during suspend.

Without this modification upon wakeup you would see the following kernel
error:

[ 118.733717] PM: Wakeup source GPIO0
[ 118.751933] edt_ft5x06 1-0038: Unable to fetch data, error: -13

Few more explanation why this issue happens, just for info:

- suspend:
- dev suspend stage:
   - edt_ft5x06_ts_suspend()
   - omap i2c: nop
- late stage:
   - omap i2c: pm_runtime is disabled for device
- irqs disabled and masked (if not wakeup source)
- noirq stage:
   - omap i2c: forced off [A]

....
wake up
...
- noirq resume:
  - omap i2c: forced on only if it was ON at point [A]
  - irqs enabled - at this moment TS IRQ triggered [B] and trying
    to enable omap i2c but PM runtime still disabled for it, so
    -EACCES (-13)
  - early resume:
    - omap i2c: pm_runtime is enabled for device
  - dev resume stage:
   - omap i2c: nop
   - edt_ft5x06_ts_resume()
     by disabling and then enabling TS IRQ here -> it will be kept
     disabled (but not masked) and marked as pending instead of
     triggering at point [B]. and, finally, re-triggered here as
     part of irq_enable() when everything is ready to handle it.

Signed-off-by: Benoit Parrot <bparrot@ti.com>
4 years agoARM: dts: am57xx-idk-osd-lcd-common: make edt-ft5x06 a wakeup source
Benoit Parrot [Mon, 17 Jun 2019 14:29:25 +0000 (09:29 -0500)]
ARM: dts: am57xx-idk-osd-lcd-common: make edt-ft5x06 a wakeup source

The touchscreen driver no longer configures the device as wakeup source
by default. A "wakeup-source" property is needed.

Signed-off-by: Benoit Parrot <bparrot@ti.com>
4 years agoARM: dts: dra7x-evm-osd-lcd-common: make edt-ft5x06 a wakeup source
Benoit Parrot [Mon, 17 Jun 2019 14:27:54 +0000 (09:27 -0500)]
ARM: dts: dra7x-evm-osd-lcd-common: make edt-ft5x06 a wakeup source

The touchscreen driver no longer configures the device as wakeup source by
default. A "wakeup-source" property is needed.

Signed-off-by: Benoit Parrot <bparrot@ti.com>
4 years agoPCI: endpoint: functions/pci-epf-test: Print throughput information
Kishon Vijay Abraham I [Fri, 2 Aug 2019 12:36:54 +0000 (18:06 +0530)]
PCI: endpoint: functions/pci-epf-test: Print throughput information

Print throughput information in KB/s after every completed transfer,
including information on whether DMA is used or not.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
4 years agoti_config_fragments/connectivity.cfg: Enable NVME configs
Kishon Vijay Abraham I [Fri, 2 Aug 2019 13:05:36 +0000 (18:35 +0530)]
ti_config_fragments/connectivity.cfg: Enable NVME configs

Enable NVME configs.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
4 years agoARM: dts: k3-j721e: Fix MMC0 speed modes
Faiz Abbas [Sun, 4 Aug 2019 16:50:25 +0000 (22:20 +0530)]
ARM: dts: k3-j721e: Fix MMC0 speed modes

Move mmc-hs400-1_8v capability from the board file to the
k3-j721e-main.dtsi as it is a SoC level property. Also add a property to
advertise ddr52 speed mode.

Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
4 years agoarm64: dts: k3-j721e-main: Add Support for UHS modes
Faiz Abbas [Sun, 4 Aug 2019 16:50:24 +0000 (22:20 +0530)]
arm64: dts: k3-j721e-main: Add Support for UHS modes

Enable Support for SD UHS modes other than SDR104 mode.

Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
4 years agoarm64: dts: k3-j721e-main: Update OTAPDLY values for MMC
Faiz Abbas [Sun, 4 Aug 2019 16:50:23 +0000 (22:20 +0530)]
arm64: dts: k3-j721e-main: Update OTAPDLY values for MMC

Update OTAPDLY values to recommended values.

Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
4 years agoarm64: dts: k3-am65-main: Update OTAPDLY values for MMC
Faiz Abbas [Sun, 4 Aug 2019 16:50:22 +0000 (22:20 +0530)]
arm64: dts: k3-am65-main: Update OTAPDLY values for MMC

According to the latest AM65x Data Manual[1], a different OTAPDLY value
is optimum for each speed mode. Replace ti-otap-del-sel with a different
ti,otap-del-sel- value for each MMC/SD speed mode.

[1] http://www.ti.com/lit/ds/symlink/am6526.pdf

Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
4 years agommc: sdhci_am654: Enable DLL only for some speed modes
Faiz Abbas [Sun, 4 Aug 2019 16:50:21 +0000 (22:20 +0530)]
mmc: sdhci_am654: Enable DLL only for some speed modes

Its recommended that DLL must only be enabled for SDR50, DDR50, DDR52,
SDR104, HS200 and HS400 speed modes. Move DLL configuration to its own
function and call it only in the above speed modes.

Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
4 years agommc: sdhci_am654: Update OTAPDLY writes
Faiz Abbas [Sun, 4 Aug 2019 16:50:20 +0000 (22:20 +0530)]
mmc: sdhci_am654: Update OTAPDLY writes

According to the latest AM65x Data Manual[1], a different output tap
delay value is optimum for a given speed mode. Therefore, deprecate the
ti,otap-del-sel binding and introduce a new binding for each of the
possible MMC/SD speed modes. If the legacy mode is not found, fall back
to old binding to maintain dts compatibility.

[1] http://www.ti.com/lit/ds/symlink/am6526.pdf

Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
4 years agodt-bindings: mmc: sdhci-am654: Update Output tap delay binding
Faiz Abbas [Sun, 4 Aug 2019 16:50:19 +0000 (22:20 +0530)]
dt-bindings: mmc: sdhci-am654: Update Output tap delay binding

According to latest AM65x Data Manual[1], a different output tap delay
value is recommended for all speed modes. Therefore, replace the
ti,otap-del-sel binding with one ti,otap-del-sel- for each MMC/SD speed
mode.

[1] http://www.ti.com/lit/ds/symlink/am6526.pdf

Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
4 years agoMerge branch 'ti-linux-4.19.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel into...
LCPD Auto Merger [Fri, 2 Aug 2019 19:28:39 +0000 (14:28 -0500)]
Merge branch 'ti-linux-4.19.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel into ti-rt-linux-4.19.y

TI-Feature: ti_linux_base_rt
TI-Tree: git@git.ti.com:ti-linux-kernel/ti-linux-kernel.git
TI-Branch: ti-linux-4.19.y

* 'ti-linux-4.19.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel:
  remoteproc/k3-dsp: Fix successive boots of C66x DSPs in remoteproc mode

Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
4 years agoMerge branch 'rpmsg-ti-linux-4.19.y-intg' of git://git.ti.com/rpmsg/rpmsg into ti...
LCPD Auto Merger [Fri, 2 Aug 2019 18:38:38 +0000 (13:38 -0500)]
Merge branch 'rpmsg-ti-linux-4.19.y-intg' of git://git.ti.com/rpmsg/rpmsg into ti-linux-4.19.y

TI-Feature: rpmsg
TI-Tree: git://git.ti.com/rpmsg/rpmsg.git
TI-Branch: rpmsg-ti-linux-4.19.y-intg

* 'rpmsg-ti-linux-4.19.y-intg' of git://git.ti.com/rpmsg/rpmsg:
  remoteproc/k3-dsp: Fix successive boots of C66x DSPs in remoteproc mode

Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
4 years agoremoteproc/k3-dsp: Fix successive boots of C66x DSPs in remoteproc mode
Suman Anna [Thu, 1 Aug 2019 21:10:24 +0000 (16:10 -0500)]
remoteproc/k3-dsp: Fix successive boots of C66x DSPs in remoteproc mode

The C66x DSP remote processors on J721E SoCs have both a local reset
and a global module reset. The local reset is deasserted on SoC power
on reset, and so did not require any additional logic to achieve the
first remoteproc-mode boot. The local reset does control the CPU reset,
and so the local reset needs to be asserted and deasserted for properly
shutting down and re-booting the C66x DSP in remoteproc mode using either
the same firmware or a different firmware.

The core logic for this is already in place but disabled under a
pre-processor macro. Clean up the macro and fix the C66x successive
boot.

NOTE:
 - The C71x DSP is not affected by this change.
 - The current code still does not support loading into DSP internal
   L1 or L2 RAMs, this logic will require further refactoring of code.

Signed-off-by: Suman Anna <s-anna@ti.com>
4 years agoMerge branch 'ti-linux-4.19.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel into...
LCPD Auto Merger [Fri, 2 Aug 2019 10:59:12 +0000 (05:59 -0500)]
Merge branch 'ti-linux-4.19.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel into ti-rt-linux-4.19.y

TI-Feature: ti_linux_base_rt
TI-Tree: git@git.ti.com:ti-linux-kernel/ti-linux-kernel.git
TI-Branch: ti-linux-4.19.y

* 'ti-linux-4.19.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel:
  arm64: dts: ti: k3-j721e-mcu Declare 8 bit TX capability for OSPI
  arm64: dts: ti: k3-am65-mcu Declare 8 bit TX capability for OSPI
  mtd: spi-nor: cadence-quadspi: Declare Octal mode capability
  mtd: spi-nor: cadence-quadspi: Drop delayelem_ps parsing
  mtd: spi-nor: cadence-quadspi: Take care of alignment restrictions for DDR mode
  mtd: spi-nor: cadence-quadspi: Enter/exit DDR mode as required
  mtd: spi-nor: cadence-quadspi: Update PHY calibration sequence for DDR mode
  mtd: spi-nor: Introduce support for calibrating controller
  mtd: spi-nor: Add Octal DDR mode support for Micron mt35x flash
  mtd: spi-nor: Add support for Octal DDR mode
  mtd: spi-nor: Add support for statefull Octal IO mode

Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
4 years agoMerge branch 'connectivity-ti-linux-4.19.y' of git://git.ti.com/connectivity-integrat...
LCPD Auto Merger [Fri, 2 Aug 2019 08:38:53 +0000 (03:38 -0500)]
Merge branch 'connectivity-ti-linux-4.19.y' of git://git.ti.com/connectivity-integration-tree/connectivity-ti-linux-kernel into ti-linux-4.19.y

TI-Feature: connectivity
TI-Tree: git://git.ti.com/connectivity-integration-tree/connectivity-ti-linux-kernel.git
TI-Branch: connectivity-ti-linux-4.19.y

* 'connectivity-ti-linux-4.19.y' of git://git.ti.com/connectivity-integration-tree/connectivity-ti-linux-kernel:
  arm64: dts: ti: k3-j721e-mcu Declare 8 bit TX capability for OSPI
  arm64: dts: ti: k3-am65-mcu Declare 8 bit TX capability for OSPI
  mtd: spi-nor: cadence-quadspi: Declare Octal mode capability
  mtd: spi-nor: cadence-quadspi: Drop delayelem_ps parsing
  mtd: spi-nor: cadence-quadspi: Take care of alignment restrictions for DDR mode
  mtd: spi-nor: cadence-quadspi: Enter/exit DDR mode as required
  mtd: spi-nor: cadence-quadspi: Update PHY calibration sequence for DDR mode
  mtd: spi-nor: Introduce support for calibrating controller
  mtd: spi-nor: Add Octal DDR mode support for Micron mt35x flash
  mtd: spi-nor: Add support for Octal DDR mode
  mtd: spi-nor: Add support for statefull Octal IO mode

Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
4 years agoarm64: dts: ti: k3-j721e-mcu Declare 8 bit TX capability for OSPI
Vignesh Raghavendra [Wed, 31 Jul 2019 12:48:03 +0000 (18:18 +0530)]
arm64: dts: ti: k3-j721e-mcu Declare 8 bit TX capability for OSPI

Now that OSPI support 8D-8D-8D (8 bit DDR cmd-addr-data), declare 8 bit
TX capability in DT. While at that drop unused properties.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
4 years agoarm64: dts: ti: k3-am65-mcu Declare 8 bit TX capability for OSPI
Vignesh Raghavendra [Wed, 31 Jul 2019 12:48:02 +0000 (18:18 +0530)]
arm64: dts: ti: k3-am65-mcu Declare 8 bit TX capability for OSPI

Now that OSPI support 8D-8D-8D (8 bit DDR cmd-addr-data), declare 8 bit
TX capability in DT. While at that drop unused properties.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
4 years agomtd: spi-nor: cadence-quadspi: Declare Octal mode capability
Vignesh Raghavendra [Wed, 31 Jul 2019 12:48:01 +0000 (18:18 +0530)]
mtd: spi-nor: cadence-quadspi: Declare Octal mode capability

Now that driver support Octal DDR mode, declare stateful Octal mode
capability

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
4 years agomtd: spi-nor: cadence-quadspi: Drop delayelem_ps parsing
Vignesh Raghavendra [Wed, 31 Jul 2019 12:48:00 +0000 (18:18 +0530)]
mtd: spi-nor: cadence-quadspi: Drop delayelem_ps parsing

New PHY calibration sequence no longer requires this property.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
4 years agomtd: spi-nor: cadence-quadspi: Take care of alignment restrictions for DDR mode
Vignesh Raghavendra [Wed, 31 Jul 2019 12:47:59 +0000 (18:17 +0530)]
mtd: spi-nor: cadence-quadspi: Take care of alignment restrictions for DDR mode

As per TRM, when operating in Octal DDR PHY pipeline mode, reads should
be 16 byte aligned. Use bounce buffer for unaligned reads. Previously
driver enforced 8 byte alignment as required by SDR mode.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
4 years agomtd: spi-nor: cadence-quadspi: Enter/exit DDR mode as required
Vignesh Raghavendra [Wed, 31 Jul 2019 12:47:58 +0000 (18:17 +0530)]
mtd: spi-nor: cadence-quadspi: Enter/exit DDR mode as required

Configure controller to use DDR mode as and when required. This is
dictated by the protocol mode set by spi-nor framework.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
4 years agomtd: spi-nor: cadence-quadspi: Update PHY calibration sequence for DDR mode
Vignesh Raghavendra [Wed, 31 Jul 2019 12:47:57 +0000 (18:17 +0530)]
mtd: spi-nor: cadence-quadspi: Update PHY calibration sequence for DDR mode

Update calibration sequence for Octal DDR mode. Sequence involves 2D
search to find range of TX DLL delay values and RX DLL delay values for
which controller is able to read data consistently from flash. Use
standard SFDP table as reference data to verify that reads are
consistent during 2D search.
Once ranges are obtained, choose the middle of TX and RX DLL delay
ranges as the working configuration.

Use PHY and DDR mode only for reading data from OSPI as advantage of
DDR mode for write is limited.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
4 years agomtd: spi-nor: Introduce support for calibrating controller
Vignesh Raghavendra [Wed, 31 Jul 2019 12:47:56 +0000 (18:17 +0530)]
mtd: spi-nor: Introduce support for calibrating controller

Certain SPI controllers have PHY which needs to be calibrated to work in
high frequency Octal DDR mode. Calibration generally involves tuning PHY
parameters until controller is able to read correct data from flash.
This would require to read pre defined data so as to compare during
calibration sequence. SFDP tables provide such predefined data.
Read SFDP at lower speed and in 1 bit mode and then pass this data to
driver to use during calibration sequence. Also, switch highest possible
8 bit DDR mode and tweak opcodes before calling calibration callback.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
4 years agomtd: spi-nor: Add Octal DDR mode support for Micron mt35x flash
Vignesh Raghavendra [Wed, 31 Jul 2019 12:47:55 +0000 (18:17 +0530)]
mtd: spi-nor: Add Octal DDR mode support for Micron mt35x flash

Add support for Octal DDR mode to read data from Micron mt35x flash. For
now enter stateful Octal DDR mode just before reading data from flash
and exits the mode after reading. Benefit of using DDR mode for write is
limited as most time is actually spent in waiting for write to complete
than actual write itself.
This also allows us to be compatible with ROM code which expects flash
to in normal mode (and not Octal DDR mode)

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
4 years agomtd: spi-nor: Add support for Octal DDR mode
Vignesh Raghavendra [Wed, 31 Jul 2019 12:47:54 +0000 (18:17 +0530)]
mtd: spi-nor: Add support for Octal DDR mode

Add framework level support required 8 bit DDR mode. Drop 8 bit SDR mode
as its only supported by Micron and is not required to be supported as per
xSPI specification.
Note that that opcodes are Micron specific and does not cover all flash
vendors

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
4 years agomtd: spi-nor: Add support for statefull Octal IO mode
Vignesh Raghavendra [Wed, 31 Jul 2019 12:47:53 +0000 (18:17 +0530)]
mtd: spi-nor: Add support for statefull Octal IO mode

xSPI compliant flashes support only 1 bit mode or 8 bit DDR mode.
Entering 8 bit DDR mode would require configuring certain registers in
flash in 1 bit mode. This procedure varies across flash vendor. Also,
different vendors require different number of wait cycles (dummy bytes)
in Octal DDR mode. Therefore provide two callbacks for flashes: change_op()
and adjust_op(). change_op() can be used for switching to Octal mode and
adjust_op() to adjust protocol specific settings for OSPI.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
4 years agoMerge branch 'ti-linux-4.19.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel into...
LCPD Auto Merger [Thu, 1 Aug 2019 06:29:23 +0000 (01:29 -0500)]
Merge branch 'ti-linux-4.19.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel into ti-rt-linux-4.19.y

TI-Feature: ti_linux_base_rt
TI-Tree: git@git.ti.com:ti-linux-kernel/ti-linux-kernel.git
TI-Branch: ti-linux-4.19.y

* 'ti-linux-4.19.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel:
  dts: am65: add ti,dis-chg-det-quirk flag to usb phy nodes
  phy: omap-usb2-phy: disable phy charger detect
  dt-bindings: phy: ti: add disabling charger detect quirk

Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
4 years agoMerge branch 'connectivity-ti-linux-4.19.y' of git://git.ti.com/connectivity-integrat...
LCPD Auto Merger [Thu, 1 Aug 2019 05:41:01 +0000 (00:41 -0500)]
Merge branch 'connectivity-ti-linux-4.19.y' of git://git.ti.com/connectivity-integration-tree/connectivity-ti-linux-kernel into ti-linux-4.19.y

TI-Feature: connectivity
TI-Tree: git://git.ti.com/connectivity-integration-tree/connectivity-ti-linux-kernel.git
TI-Branch: connectivity-ti-linux-4.19.y

* 'connectivity-ti-linux-4.19.y' of git://git.ti.com/connectivity-integration-tree/connectivity-ti-linux-kernel:
  dts: am65: add ti,dis-chg-det-quirk flag to usb phy nodes
  phy: omap-usb2-phy: disable phy charger detect
  dt-bindings: phy: ti: add disabling charger detect quirk

Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>