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>
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>
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: 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>
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: 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
reacieved while 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>
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
reacieved while 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>
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>
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>
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>
* '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>
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>
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>
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>
* '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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
* '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>
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>
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>
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>
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>
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>
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>
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>
* '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>
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>
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>
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>
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>
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>
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>
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
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
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
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
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>
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>
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>
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>
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>
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>
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>
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>
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>
Enable NVME configs.
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
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>
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>
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>
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>
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>
Update OTAPDLY values to recommended values.
Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Merge branch 'platform-ti-linux-4.19.y' of git://git.ti.com/~rrnayak/ti-linux-kernel/platform-linux-feature-tree into ti-linux-4.19.y
TI-Feature: platform_base
TI-Tree: git://git.ti.com/~rrnayak/ti-linux-kernel/platform-linux-feature-tree.git
TI-Branch: platform-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: k3-j721e-main: Fix TRNG interrupt number
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
TI-Feature: platform_base
TI-Tree: git://git.ti.com/~rrnayak/ti-linux-kernel/platform-linux-feature-tree.git
TI-Branch: platform-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: k3-j721e-main: Fix TRNG interrupt number
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
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:
ASoC: pcm3168a: Allow all channels in case of parallel DIN/DOUT setup
ASoC: ti: davinci-mcasp: Support for correct symmetric sample bits
ASoC: ti: davinci-mcasp: Correct slot_width posed constraint
ASoC: ti: davinci-mcasp: Improve serializer handling in multi AXR setups
ASoC: ti: davinci-mcasp: Add support for RIGHT_J format
ASoC: ti: davinci-mcasp: Fix clk PDIR handling for i2s master mode
arm64: dts: ti: Remove k3-j721e-dp0 overlay
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
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:
ASoC: pcm3168a: Allow all channels in case of parallel DIN/DOUT setup
ASoC: ti: davinci-mcasp: Support for correct symmetric sample bits
ASoC: ti: davinci-mcasp: Correct slot_width posed constraint
ASoC: ti: davinci-mcasp: Improve serializer handling in multi AXR setups
ASoC: ti: davinci-mcasp: Add support for RIGHT_J format
ASoC: ti: davinci-mcasp: Fix clk PDIR handling for i2s master mode
arm64: dts: ti: Remove k3-j721e-dp0 overlay
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
Merge branch 'peter/ti-linux-4.19.y/topic/audio' of https://github.com/omap-audio/linux-audio into audio_display-ti-linux-4.19.y
2019.03 - audio updates
* 'peter/ti-linux-4.19.y/topic/audio' of https://github.com/omap-audio/linux-audio: (676 commits)
ASoC: pcm3168a: Allow all channels in case of parallel DIN/DOUT setup
ASoC: ti: davinci-mcasp: Support for correct symmetric sample bits
ASoC: ti: davinci-mcasp: Correct slot_width posed constraint
ASoC: ti: davinci-mcasp: Improve serializer handling in multi AXR setups
ASoC: ti: davinci-mcasp: Add support for RIGHT_J format
ASoC: ti: davinci-mcasp: Fix clk PDIR handling for i2s master mode
arm64: dts: ti: k3-j721e-main: Set "max-functions" to '6'
connectivity.cfg: Enable UFS related configs
arm64: dts: ti: k3-j721e-main: Add UFS DT nodes
scsi: ufs: Add TI glue layer driver for Cadence UFS controller
dt-bindings: ufs: Add DT bindings for TI J721e UFS glue layer
scsi: ufs: cdns-pltfrm: Disable Auto-Hibernate Idle Timer
scsi: ufs: cdns-pltfrm: Clear TX_LCC_ENABLE
scsi: ufs: cdns-pltfrm: Move clkdiv setting to hce_enable_notify()
scsi: ufs-cdns: Add support for UFSHCI with M31 PHY
scsi: dt-bindings: ufs-cdns: Update Cadence UFS compatibility list
scsi: ufs: Add UFS platform driver for Cadence UFS
scsi: dt-bindings: ufs: Add bindings for Cadence UFS
scsi: ufs: Add error-handling of Auto-Hibernate
scsi: ufs: Do not overwrite Auto-Hibernate timer
...
2019.03 - audio updates
* 'peter/ti-linux-4.19.y/topic/audio' of https://github.com/omap-audio/linux-audio: (676 commits)
ASoC: pcm3168a: Allow all channels in case of parallel DIN/DOUT setup
ASoC: ti: davinci-mcasp: Support for correct symmetric sample bits
ASoC: ti: davinci-mcasp: Correct slot_width posed constraint
ASoC: ti: davinci-mcasp: Improve serializer handling in multi AXR setups
ASoC: ti: davinci-mcasp: Add support for RIGHT_J format
ASoC: ti: davinci-mcasp: Fix clk PDIR handling for i2s master mode
arm64: dts: ti: k3-j721e-main: Set "max-functions" to '6'
connectivity.cfg: Enable UFS related configs
arm64: dts: ti: k3-j721e-main: Add UFS DT nodes
scsi: ufs: Add TI glue layer driver for Cadence UFS controller
dt-bindings: ufs: Add DT bindings for TI J721e UFS glue layer
scsi: ufs: cdns-pltfrm: Disable Auto-Hibernate Idle Timer
scsi: ufs: cdns-pltfrm: Clear TX_LCC_ENABLE
scsi: ufs: cdns-pltfrm: Move clkdiv setting to hce_enable_notify()
scsi: ufs-cdns: Add support for UFSHCI with M31 PHY
scsi: dt-bindings: ufs-cdns: Update Cadence UFS compatibility list
scsi: ufs: Add UFS platform driver for Cadence UFS
scsi: dt-bindings: ufs: Add bindings for Cadence UFS
scsi: ufs: Add error-handling of Auto-Hibernate
scsi: ufs: Do not overwrite Auto-Hibernate timer
...
ASoC: pcm3168a: Allow all channels in case of parallel DIN/DOUT setup
If multi DIN/DOUT mode is selected (tdm_slots == 2) then configure the
channel constraint to allow all channels.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
If multi DIN/DOUT mode is selected (tdm_slots == 2) then configure the
channel constraint to allow all channels.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
ASoC: ti: davinci-mcasp: Support for correct symmetric sample bits
Implement custom snd_pcm_hw_rule to filter the available formats for the
second stream to make it symmetric and allow only formats which require
the same amount of bits on the bus as the running stream.
A simple constraint is not working correctly because for example:
the first stream is started with S24_LE
If we place 24 as constraint for the SAMPLE_BITS then the second stream
can not use S24_LE as it is physically 32bits.
If we would place 32 as constraint (physical width) then S32_LE would have
been allowed, but S24_3LE is not.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Implement custom snd_pcm_hw_rule to filter the available formats for the
second stream to make it symmetric and allow only formats which require
the same amount of bits on the bus as the running stream.
A simple constraint is not working correctly because for example:
the first stream is started with S24_LE
If we place 24 as constraint for the SAMPLE_BITS then the second stream
can not use S24_LE as it is physically 32bits.
If we would place 32 as constraint (physical width) then S32_LE would have
been allowed, but S24_3LE is not.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
ASoC: ti: davinci-mcasp: Correct slot_width posed constraint
The slot_width is a property for the bus while the constraint for
SNDRV_PCM_HW_PARAM_SAMPLE_BITS is for the in memory format.
Applying slot_width constraint to sample_bits works most of the time, but
it will blacklist valid formats in some cases.
With slot_width 24 we can support S24_3LE and S24_LE formats as they both
look the same on the bus, but a a 24 constraint on sample_bits would not
allow S24_LE as it is stored in 32bits in memory.
Implement a simple hw_rule function to allow all formats which require less
or equal number of bits on the bus as slot_width (if configured).
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
The slot_width is a property for the bus while the constraint for
SNDRV_PCM_HW_PARAM_SAMPLE_BITS is for the in memory format.
Applying slot_width constraint to sample_bits works most of the time, but
it will blacklist valid formats in some cases.
With slot_width 24 we can support S24_3LE and S24_LE formats as they both
look the same on the bus, but a a 24 constraint on sample_bits would not
allow S24_LE as it is stored in 32bits in memory.
Implement a simple hw_rule function to allow all formats which require less
or equal number of bits on the bus as slot_width (if configured).
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
ASoC: ti: davinci-mcasp: Improve serializer handling in multi AXR setups
When multiple serializers are used we need to track the number of
serializers used by the other stream direction to avoid killing data lines
when the first stream used more serializers than the second would need.
We are still protected against the case when the second stream uses more
serializers which had affected the running stream as well.
To take advantage of the improved serializer logic we need to modify the
channel constraints rule as well to allow the use of multiple serializers
for the second stream as additional ones will not affect the FS/BCLK on
the bus.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
When multiple serializers are used we need to track the number of
serializers used by the other stream direction to avoid killing data lines
when the first stream used more serializers than the second would need.
We are still protected against the case when the second stream uses more
serializers which had affected the running stream as well.
To take advantage of the improved serializer logic we need to modify the
channel constraints rule as well to allow the use of multiple serializers
for the second stream as additional ones will not affect the FS/BCLK on
the bus.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
ASoC: ti: davinci-mcasp: Add support for RIGHT_J format
The formater unit's rotation needs to be programmed differently for right
aligned bus format to have the data moved to the correct place.
Take the opportunity and simplify the formater unit setup code.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
The formater unit's rotation needs to be programmed differently for right
aligned bus format to have the data moved to the correct place.
Take the opportunity and simplify the formater unit setup code.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
ASoC: ti: davinci-mcasp: Fix clk PDIR handling for i2s master mode
When running McASP as master capture alone will not record any audio unless
a parallel playback stream is running. As soon as the playback stops the
captured data is going to be silent again.
In McASP master mode we need to set the PDIR for the clock pins and fix
the mcasp_set_axr_pdir() to skip the bits in the PDIR registers above
AMUTE.
This went unnoticed as most of the boards uses McASP as slave and neither
of these issues are visible (audible) in those setups.
Fixes: 2302be4126f52 ("ASoC: davinci-mcasp: Update PDIR (pin direction) register handling")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
When running McASP as master capture alone will not record any audio unless
a parallel playback stream is running. As soon as the playback stops the
captured data is going to be silent again.
In McASP master mode we need to set the PDIR for the clock pins and fix
the mcasp_set_axr_pdir() to skip the bits in the PDIR registers above
AMUTE.
This went unnoticed as most of the boards uses McASP as slave and neither
of these issues are visible (audible) in those setups.
Fixes: 2302be4126f52 ("ASoC: davinci-mcasp: Update PDIR (pin direction) register handling")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
arm64: dts: k3-j721e-main: Fix TRNG interrupt number
TRNG interrupt number was wrongly used from AM65 node
as 56 but it is actually 43 in case of j7. Fix the same.
Fixes: f0dd36df6218c ("arm64: dts: ti: k3-j721e-main: Add the trng node")
Reported-by: Andrew F. Davis <afd@ti.com>
Signed-off-by: Keerthy <j-keerthy@ti.com>
TRNG interrupt number was wrongly used from AM65 node
as 56 but it is actually 43 in case of j7. Fix the same.
Fixes: f0dd36df6218c ("arm64: dts: ti: k3-j721e-main: Add the trng node")
Reported-by: Andrew F. Davis <afd@ti.com>
Signed-off-by: Keerthy <j-keerthy@ti.com>
Merge tag 'v4.19.59' of http://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable into ti-linux-4.19.y
This is the 4.19.59 stable release
* tag 'v4.19.59' of http://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable: (613 commits)
Linux 4.19.59
staging: rtl8712: reduce stack usage, again
staging: bcm2835-camera: Handle empty EOS buffers whilst streaming
staging: bcm2835-camera: Remove check of the number of buffers supplied
staging: bcm2835-camera: Ensure all buffers are returned on disable
staging: bcm2835-camera: Replace spinlock protecting context_map with mutex
staging: fsl-dpaa2/ethsw: fix memory leak of switchdev_work
MIPS: Remove superfluous check for __linux__
VMCI: Fix integer overflow in VMCI handle arrays
carl9170: fix misuse of device driver API
binder: fix memory leak in error path
lkdtm: support llvm-objcopy
HID: Add another Primax PIXART OEM mouse quirk
staging: comedi: amplc_pci230: fix null pointer deref on interrupt
staging: comedi: dt282x: fix a null pointer deref on interrupt
drivers/usb/typec/tps6598x.c: fix 4CC cmd write
drivers/usb/typec/tps6598x.c: fix portinfo width
usb: renesas_usbhs: add a workaround for a race condition of workqueue
usb: dwc2: use a longer AHB idle timeout in dwc2_core_reset()
usb: gadget: ether: Fix race between gether_disconnect and rx_submit
...
Signed-off-by: Dan Murphy <dmurphy@ti.com>
# Conflicts:
# drivers/net/phy/dp83867.c
# drivers/pci/controller/dwc/pci-keystone.c
# drivers/pci/controller/dwc/pcie-designware-ep.c
# drivers/pci/controller/dwc/pcie-designware.h
This is the 4.19.59 stable release
* tag 'v4.19.59' of http://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable: (613 commits)
Linux 4.19.59
staging: rtl8712: reduce stack usage, again
staging: bcm2835-camera: Handle empty EOS buffers whilst streaming
staging: bcm2835-camera: Remove check of the number of buffers supplied
staging: bcm2835-camera: Ensure all buffers are returned on disable
staging: bcm2835-camera: Replace spinlock protecting context_map with mutex
staging: fsl-dpaa2/ethsw: fix memory leak of switchdev_work
MIPS: Remove superfluous check for __linux__
VMCI: Fix integer overflow in VMCI handle arrays
carl9170: fix misuse of device driver API
binder: fix memory leak in error path
lkdtm: support llvm-objcopy
HID: Add another Primax PIXART OEM mouse quirk
staging: comedi: amplc_pci230: fix null pointer deref on interrupt
staging: comedi: dt282x: fix a null pointer deref on interrupt
drivers/usb/typec/tps6598x.c: fix 4CC cmd write
drivers/usb/typec/tps6598x.c: fix portinfo width
usb: renesas_usbhs: add a workaround for a race condition of workqueue
usb: dwc2: use a longer AHB idle timeout in dwc2_core_reset()
usb: gadget: ether: Fix race between gether_disconnect and rx_submit
...
Signed-off-by: Dan Murphy <dmurphy@ti.com>
# Conflicts:
# drivers/net/phy/dp83867.c
# drivers/pci/controller/dwc/pci-keystone.c
# drivers/pci/controller/dwc/pcie-designware-ep.c
# drivers/pci/controller/dwc/pcie-designware.h
dts: am65: add ti,dis-chg-det-quirk flag to usb phy nodes
ti,dis-chg-det-quirk is used to disable the Charger Detect logic in the
USB PHY to workaround the silicon bug in PG1.0 which is that D+ is pulled
high in POR causing enumeration failure with some USB hubs.
Signed-off-by: Bin Liu <b-liu@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
ti,dis-chg-det-quirk is used to disable the Charger Detect logic in the
USB PHY to workaround the silicon bug in PG1.0 which is that D+ is pulled
high in POR causing enumeration failure with some USB hubs.
Signed-off-by: Bin Liu <b-liu@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
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: (38 commits)
arm64: dts: ti: k3-j721e-main: Set "max-functions" to '6'
connectivity.cfg: Enable UFS related configs
arm64: dts: ti: k3-j721e-main: Add UFS DT nodes
scsi: ufs: Add TI glue layer driver for Cadence UFS controller
dt-bindings: ufs: Add DT bindings for TI J721e UFS glue layer
scsi: ufs: cdns-pltfrm: Disable Auto-Hibernate Idle Timer
scsi: ufs: cdns-pltfrm: Clear TX_LCC_ENABLE
scsi: ufs: cdns-pltfrm: Move clkdiv setting to hce_enable_notify()
scsi: ufs-cdns: Add support for UFSHCI with M31 PHY
scsi: dt-bindings: ufs-cdns: Update Cadence UFS compatibility list
scsi: ufs: Add UFS platform driver for Cadence UFS
scsi: dt-bindings: ufs: Add bindings for Cadence UFS
scsi: ufs: Add error-handling of Auto-Hibernate
scsi: ufs: Do not overwrite Auto-Hibernate timer
scsi: ufs: Introduce ufshcd_is_auto_hibern8_supported()
scsi: ufs: set the device reference clock setting
scsi: ufs: Fix RX_TERMINATION_FORCE_ENABLE define value
scsi: ufs: Check that space was properly alloced in copy_query_response
scsi: ufs-bsg: complete ufs-bsg job only if no error
scsi: ufs-bsg: fix typo in ufs_bsg_request
...
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
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: (38 commits)
arm64: dts: ti: k3-j721e-main: Set "max-functions" to '6'
connectivity.cfg: Enable UFS related configs
arm64: dts: ti: k3-j721e-main: Add UFS DT nodes
scsi: ufs: Add TI glue layer driver for Cadence UFS controller
dt-bindings: ufs: Add DT bindings for TI J721e UFS glue layer
scsi: ufs: cdns-pltfrm: Disable Auto-Hibernate Idle Timer
scsi: ufs: cdns-pltfrm: Clear TX_LCC_ENABLE
scsi: ufs: cdns-pltfrm: Move clkdiv setting to hce_enable_notify()
scsi: ufs-cdns: Add support for UFSHCI with M31 PHY
scsi: dt-bindings: ufs-cdns: Update Cadence UFS compatibility list
scsi: ufs: Add UFS platform driver for Cadence UFS
scsi: dt-bindings: ufs: Add bindings for Cadence UFS
scsi: ufs: Add error-handling of Auto-Hibernate
scsi: ufs: Do not overwrite Auto-Hibernate timer
scsi: ufs: Introduce ufshcd_is_auto_hibern8_supported()
scsi: ufs: set the device reference clock setting
scsi: ufs: Fix RX_TERMINATION_FORCE_ENABLE define value
scsi: ufs: Check that space was properly alloced in copy_query_response
scsi: ufs-bsg: complete ufs-bsg job only if no error
scsi: ufs-bsg: fix typo in ufs_bsg_request
...
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
phy: omap-usb2-phy: disable phy charger detect
AM654x PG1.0 has a silicon bug that D+ is pulled high after POR, which
could cause enumeration failure with some USB hubs. Disabling the
USB2_PHY Charger Detect function will put D+ into the normal state.
Using property "ti,dis-chg-det-quirk" in the DT usb2-phy node to
enable this workaround for AM654x PG1.0.
Signed-off-by: Bin Liu <b-liu@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
AM654x PG1.0 has a silicon bug that D+ is pulled high after POR, which
could cause enumeration failure with some USB hubs. Disabling the
USB2_PHY Charger Detect function will put D+ into the normal state.
Using property "ti,dis-chg-det-quirk" in the DT usb2-phy node to
enable this workaround for AM654x PG1.0.
Signed-off-by: Bin Liu <b-liu@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
dt-bindings: phy: ti: add disabling charger detect quirk
Add quirk ti,dis-chg-det-quirk to disable the USB2_PHY Charger Detect
logic. It should be set for AM654x PG1.0 devices.
Signed-off-by: Bin Liu <b-liu@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Add quirk ti,dis-chg-det-quirk to disable the USB2_PHY Charger Detect
logic. It should be set for AM654x PG1.0 devices.
Signed-off-by: Bin Liu <b-liu@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
arm64: dts: ti: k3-j721e-main: Set "max-functions" to '6'
PCIe EP controller in J721E supports '6' physcial function. Set
"max-functions" to '6' here.
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
PCIe EP controller in J721E supports '6' physcial function. Set
"max-functions" to '6' here.
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
connectivity.cfg: Enable UFS related configs
Enable UFS related configs to support UFS on J721e SoC.
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Enable UFS related configs to support UFS on J721e SoC.
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
arm64: dts: ti: k3-j721e-main: Add UFS DT nodes
Add TI UFS glue layer and Cadence UFS Host controller DT nodes.
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Add TI UFS glue layer and Cadence UFS Host controller DT nodes.
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
scsi: ufs: Add TI glue layer driver for Cadence UFS controller
TI J721e SoC has Cadence UFS controller embedded inside a TI specific
glue layer that controls UFS slave device reset, UFS M-PHY clock
frequency and other M-PHY related parameter configuration. Add a driver
driver for the same.
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
TI J721e SoC has Cadence UFS controller embedded inside a TI specific
glue layer that controls UFS slave device reset, UFS M-PHY clock
frequency and other M-PHY related parameter configuration. Add a driver
driver for the same.
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
dt-bindings: ufs: Add DT bindings for TI J721e UFS glue layer
Add DT bindings TI specific glue layer driver for Cadence UFS Host
Controller present in J721e SoC
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Add DT bindings TI specific glue layer driver for Cadence UFS Host
Controller present in J721e SoC
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
scsi: ufs: cdns-pltfrm: Disable Auto-Hibernate Idle Timer
Disable Auto Hibernate Idle Timer by setting timer value to 0ms. This
provides max read/write throughput, userspace can always override the
value via sysfs if required.
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Disable Auto Hibernate Idle Timer by setting timer value to 0ms. This
provides max read/write throughput, userspace can always override the
value via sysfs if required.
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
scsi: ufs: cdns-pltfrm: Clear TX_LCC_ENABLE
Some UFS devices don't support TX LCC, therefore clear
PA_LOCAL_TX_LCC_ENABLE so that LCC is disabled at Host. This will also
disable use of LCC by device during link startup. Without this,
link startup fails even in PWM mode on J721E SoC.
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Some UFS devices don't support TX LCC, therefore clear
PA_LOCAL_TX_LCC_ENABLE so that LCC is disabled at Host. This will also
disable use of LCC by device during link startup. Without this,
link startup fails even in PWM mode on J721E SoC.
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
scsi: ufs: cdns-pltfrm: Move clkdiv setting to hce_enable_notify()
Setting vendor specific CDNS_UFS_REG_HCLKDIV register during in
setup_clock() callback is not enough as host controller may be reset
later on (e.g: controller is reset if link startup fails first time
around) leading to loss of this configuration. Therefore move this code
to hce_enable_notify() callback that is called every time controller is
being re-enabled.
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Setting vendor specific CDNS_UFS_REG_HCLKDIV register during in
setup_clock() callback is not enough as host controller may be reset
later on (e.g: controller is reset if link startup fails first time
around) leading to loss of this configuration. Therefore move this code
to hce_enable_notify() callback that is called every time controller is
being re-enabled.
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
scsi: ufs-cdns: Add support for UFSHCI with M31 PHY
commit 4fed62bc1c2679d5d4684d71c5ef48a384f29e98 upstream.
This patch adds an additional PHY initialization, required for M31 PHY when
used with Cadence UFS HC. A new compatible string has been added for this
purpose.
[mkp: nuke superfluous status return]
Signed-off-by: Jan Kotas <jank@cadence.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
commit 4fed62bc1c2679d5d4684d71c5ef48a384f29e98 upstream.
This patch adds an additional PHY initialization, required for M31 PHY when
used with Cadence UFS HC. A new compatible string has been added for this
purpose.
[mkp: nuke superfluous status return]
Signed-off-by: Jan Kotas <jank@cadence.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
scsi: dt-bindings: ufs-cdns: Update Cadence UFS compatibility list
commit 5328efce9461ce39c04e7b0b6eec563f5ac1f3e9 upstream.
This patch adds a new compatible string description for CDNS UFS HCD + M31
16nm PHY.
Signed-off-by: Jan Kotas <jank@cadence.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
commit 5328efce9461ce39c04e7b0b6eec563f5ac1f3e9 upstream.
This patch adds a new compatible string description for CDNS UFS HCD + M31
16nm PHY.
Signed-off-by: Jan Kotas <jank@cadence.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
scsi: ufs: Add UFS platform driver for Cadence UFS
commit d90996dae8e48e042bd9fbfc11c73504a19a6e68 upstream.
This patch adds a device tree platform driver for Cadence UFS Host
Controller. It can be enabled with SCSI_UFS_CDNS_PLATFORM Kconfig option.
Signed-off-by: Jan Kotas <jank@cadence.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
commit d90996dae8e48e042bd9fbfc11c73504a19a6e68 upstream.
This patch adds a device tree platform driver for Cadence UFS Host
Controller. It can be enabled with SCSI_UFS_CDNS_PLATFORM Kconfig option.
Signed-off-by: Jan Kotas <jank@cadence.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
scsi: dt-bindings: ufs: Add bindings for Cadence UFS
commit 85408f830e704fdc2353dbf4454df01949f51257 upstream.
This patch adds a DT binding documentation for Cadence UFS Host Controller.
Signed-off-by: Jan Kotas <jank@cadence.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
commit 85408f830e704fdc2353dbf4454df01949f51257 upstream.
This patch adds a DT binding documentation for Cadence UFS Host Controller.
Signed-off-by: Jan Kotas <jank@cadence.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
scsi: ufs: Add error-handling of Auto-Hibernate
commit 821744403913d957cb52263b2016fd5bd29c30d0 upstream.
Currently auto-hibernate is activated if host supports auto-hibern8
capability. However error-handling is not implemented, which makes the
feature somewhat risky.
If either "Hibernate Enter" or "Hibernate Exit" fail during auto-hibernate
flow, the corresponding interrupt "UIC_HIBERNATE_ENTER" or
"UIC_HIBERNATE_EXIT" shall be raised according to UFS specification.
This patch adds auto-hibernate error-handling:
- Monitor "Hibernate Enter" and "Hibernate Exit" interrupts after
auto-hibernate feature is activated.
- If a failure happens, trigger error-handling just like
"manual-hibernate" failure and apply the same recovery flow: schedule
UFS error handler in ufshcd_check_errors(), and then do host reset and
restore in UFS error handler.
Signed-off-by: Stanley Chu <stanley.chu@mediatek.com>
Reviewed-by: Bean Huo <beanhuo@micron.com>
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
Reviewed-by: Avri Altman <Avri.Altman@wdc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
commit 821744403913d957cb52263b2016fd5bd29c30d0 upstream.
Currently auto-hibernate is activated if host supports auto-hibern8
capability. However error-handling is not implemented, which makes the
feature somewhat risky.
If either "Hibernate Enter" or "Hibernate Exit" fail during auto-hibernate
flow, the corresponding interrupt "UIC_HIBERNATE_ENTER" or
"UIC_HIBERNATE_EXIT" shall be raised according to UFS specification.
This patch adds auto-hibernate error-handling:
- Monitor "Hibernate Enter" and "Hibernate Exit" interrupts after
auto-hibernate feature is activated.
- If a failure happens, trigger error-handling just like
"manual-hibernate" failure and apply the same recovery flow: schedule
UFS error handler in ufshcd_check_errors(), and then do host reset and
restore in UFS error handler.
Signed-off-by: Stanley Chu <stanley.chu@mediatek.com>
Reviewed-by: Bean Huo <beanhuo@micron.com>
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
Reviewed-by: Avri Altman <Avri.Altman@wdc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
scsi: ufs: Do not overwrite Auto-Hibernate timer
commit f571b377ded7466e175e73c116df9ae09527dcb0 upstream.
Some vendor-specific initialization flow may set its own auto-hibernate
timer. In this case, do not overwrite timer value as "default value" in
ufshcd_init().
Signed-off-by: Stanley Chu <stanley.chu@mediatek.com>
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
Reviewed-by: Avri Altman <Avri.Altman@wdc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
commit f571b377ded7466e175e73c116df9ae09527dcb0 upstream.
Some vendor-specific initialization flow may set its own auto-hibernate
timer. In this case, do not overwrite timer value as "default value" in
ufshcd_init().
Signed-off-by: Stanley Chu <stanley.chu@mediatek.com>
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
Reviewed-by: Avri Altman <Avri.Altman@wdc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
scsi: ufs: Introduce ufshcd_is_auto_hibern8_supported()
commit ee5f1042b20e1ffbc5c7eb0e0883fdbc05cec85f upstream.
The checking of Auto-Hibernation support is used in many places in the
driver, thus re-factor it as ufshcd_is_auto_hibern8_supported() to make
code more clean.
Signed-off-by: Stanley Chu <stanley.chu@mediatek.com>
Reviewed-by: Bean Huo <beanhuo@micron.com>
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
Reviewed-by: Avri Altman <Avri.Altman@wdc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
commit ee5f1042b20e1ffbc5c7eb0e0883fdbc05cec85f upstream.
The checking of Auto-Hibernation support is used in many places in the
driver, thus re-factor it as ufshcd_is_auto_hibern8_supported() to make
code more clean.
Signed-off-by: Stanley Chu <stanley.chu@mediatek.com>
Reviewed-by: Bean Huo <beanhuo@micron.com>
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
Reviewed-by: Avri Altman <Avri.Altman@wdc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
scsi: ufs: set the device reference clock setting
commit 9e1e8a75708031937a0f92567c19760c92658410 upstream.
UFS host supplies the reference clock to UFS device and UFS device
specification allows host to provide one of the 4 frequencies (19.2 MHz, 26
MHz, 38.4 MHz, 52 MHz) for reference clock. Host should set the device
reference clock frequency setting in the device based on what frequency it
is supplying to UFS device.
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Signed-off-by: Can Guo <cang@codeaurora.org>
Signed-off-by: Sayali Lokhande <sayalil@codeaurora.org>
Reviewed-by: Evan Green <evgreen@chromium.org>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
commit 9e1e8a75708031937a0f92567c19760c92658410 upstream.
UFS host supplies the reference clock to UFS device and UFS device
specification allows host to provide one of the 4 frequencies (19.2 MHz, 26
MHz, 38.4 MHz, 52 MHz) for reference clock. Host should set the device
reference clock frequency setting in the device based on what frequency it
is supplying to UFS device.
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Signed-off-by: Can Guo <cang@codeaurora.org>
Signed-off-by: Sayali Lokhande <sayalil@codeaurora.org>
Reviewed-by: Evan Green <evgreen@chromium.org>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
scsi: ufs: Fix RX_TERMINATION_FORCE_ENABLE define value
commit ebcb8f8508c5edf428f52525cec74d28edea7bcb upstream.
Fix RX_TERMINATION_FORCE_ENABLE define value from 0x0089 to 0x00A9
according to MIPI Alliance MPHY specification.
Fixes: e785060ea3a1 ("ufs: definitions for phy interface")
Signed-off-by: Pedro Sousa <sousa@synopsys.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
commit ebcb8f8508c5edf428f52525cec74d28edea7bcb upstream.
Fix RX_TERMINATION_FORCE_ENABLE define value from 0x0089 to 0x00A9
according to MIPI Alliance MPHY specification.
Fixes: e785060ea3a1 ("ufs: definitions for phy interface")
Signed-off-by: Pedro Sousa <sousa@synopsys.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
scsi: ufs: Check that space was properly alloced in copy_query_response
commit 1c90836f70f9a8ef7b7ad9e1fdd8961903e6ced6 upstream.
struct ufs_dev_cmd is the main container that supports device management
commands. In the case of a read descriptor request, we assume that the
proper space was allocated in dev_cmd to hold the returning descriptor.
This is no longer true, as there are flows that doesn't use dev_cmd for
device management requests, and was wrong in the first place.
Fixes: d44a5f98bb49 (ufs: query descriptor API)
Signed-off-by: Avri Altman <avri.altman@wdc.com>
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
Acked-by: Bean Huo <beanhuo@micron.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
commit 1c90836f70f9a8ef7b7ad9e1fdd8961903e6ced6 upstream.
struct ufs_dev_cmd is the main container that supports device management
commands. In the case of a read descriptor request, we assume that the
proper space was allocated in dev_cmd to hold the returning descriptor.
This is no longer true, as there are flows that doesn't use dev_cmd for
device management requests, and was wrong in the first place.
Fixes: d44a5f98bb49 (ufs: query descriptor API)
Signed-off-by: Avri Altman <avri.altman@wdc.com>
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
Acked-by: Bean Huo <beanhuo@micron.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
scsi: ufs-bsg: complete ufs-bsg job only if no error
commit b13a3539eb2affcb8833c189d68d6a4b99c41f6e upstream.
In the case of UPIU/DME request execution failed in UFS device,
ufs_bsg_request() will complete the failed bsg job by calling
bsg_job_done(). Meanwhile, it returns this error status to blk-mq layer,
then triggers blk-mq completing this request again, this will cause the
following panic.
Call trace:
ll_sc___cmpxchg_case_acq_32+0x4/0x20
complete+0x28/0x70
blk_end_sync_rq+0x24/0x30
blk_mq_end_request+0xb8/0x118
bsg_job_put+0x4c/0x58
bsg_complete+0x20/0x30
blk_done_softirq+0xb4/0xe8
do_softirq+0x154/0x3f0
run_ksoftirqd+0x4c/0x68
smpboot_thread_fn+0x22c/0x268
kthread+0x130/0x138
ret_from_fork+0x10/0x1c
Code: f84107fe d65f03c0 d503201f f9800011 (885ffc10)
---[ end trace d92825bff6326e66 ]---
Kernel panic - not syncing: Fatal exception in interrupt
This patch is to fix this issue. The solution is to complete the ufs-bsg
job only if no error happened.
[mkp: commit description tweak]
Fixes: df032bf27a41 (scsi: ufs: Add a bsg endpoint that supports UPIUs)
Signed-off-by: Bean Huo <beanhuo@micron.com>
Reviewed-by: Avri Altman <Avri.Altman@wdc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
commit b13a3539eb2affcb8833c189d68d6a4b99c41f6e upstream.
In the case of UPIU/DME request execution failed in UFS device,
ufs_bsg_request() will complete the failed bsg job by calling
bsg_job_done(). Meanwhile, it returns this error status to blk-mq layer,
then triggers blk-mq completing this request again, this will cause the
following panic.
Call trace:
ll_sc___cmpxchg_case_acq_32+0x4/0x20
complete+0x28/0x70
blk_end_sync_rq+0x24/0x30
blk_mq_end_request+0xb8/0x118
bsg_job_put+0x4c/0x58
bsg_complete+0x20/0x30
blk_done_softirq+0xb4/0xe8
do_softirq+0x154/0x3f0
run_ksoftirqd+0x4c/0x68
smpboot_thread_fn+0x22c/0x268
kthread+0x130/0x138
ret_from_fork+0x10/0x1c
Code: f84107fe d65f03c0 d503201f f9800011 (885ffc10)
---[ end trace d92825bff6326e66 ]---
Kernel panic - not syncing: Fatal exception in interrupt
This patch is to fix this issue. The solution is to complete the ufs-bsg
job only if no error happened.
[mkp: commit description tweak]
Fixes: df032bf27a41 (scsi: ufs: Add a bsg endpoint that supports UPIUs)
Signed-off-by: Bean Huo <beanhuo@micron.com>
Reviewed-by: Avri Altman <Avri.Altman@wdc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>