]> rtime.felk.cvut.cz Git - zynq/linux.git/log
zynq/linux.git
6 years agousb: dwc3: gadget: ISOC transfers should be stopped before starting a transfer
Anurag Kumar Vulisha [Thu, 26 Apr 2018 07:19:17 +0000 (12:49 +0530)]
usb: dwc3: gadget: ISOC transfers should be stopped before starting a transfer

For ISOC transfers the requests are not queued until the HOST requests
for data and XferNotReady event is generated .But XferNotReady event
is not getting generated for ISOC transfers for the second time after
Endpoint configuration. Since ISOC packets depend on the XferNotReady
events, they will not be queued to controller. Because of this issue
timeout happens on the application layer.

This patch fixes this issue by issuing END TRANSFER command before
starting any ISOC transfers. Doing so will make the controller clear
the previous allocated endpoint resources and reallocate resources
when the transfer is requested. Because of this change XferNotReady
events will be generated when host requests for the ISOC transfer.

Signed-off-by: Anurag Kumar Vulisha <anurag.kumar.vulisha@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agosoc: xilinx: vcu: Optimize the VCU PLL calculation.
Dhaval Shah [Thu, 26 Apr 2018 07:00:31 +0000 (00:00 -0700)]
soc: xilinx: vcu: Optimize the VCU PLL calculation.

Calculate the maximum and minimum possible FBDIV
values so that number of iteration can be reduce to
calculate FBDIV and divisor for the provided clock
information.

Signed-off-by: Dhaval Shah <dhaval.shah@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agov4l: xilinx: dma: Add interlaced support
Vishal Sagar [Mon, 23 Apr 2018 12:14:23 +0000 (17:44 +0530)]
v4l: xilinx: dma: Add interlaced support

This patch adds interlaced support to the Xilinx V4L dma client. In case
of capture pipeline, the field id is read from the callback.

A check is present to find and correct sequence number in case
a frame is dropped i.e. fid is repeated. For this the prev_fid member is
used to store the previous fid value to be compared with one returned.

In case of output pipeline, the field id is set per dma descriptor.

A dma descriptor pointer is added to xvip_dma_buffer so that it may be
passed as a reference while getting the fid.

The video node gets the field type of the subdev prior and checks if it
is of V4L2_FIELD_ALTERNATE type. If yes then height is halved.

Some other minor fixes for checkpatch are also applied here.

Signed-off-by: Vishal Sagar <vishal.sagar@xilinx.com>
Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agomisc: xilinx-sdfec: Improve the IOCTL Handling
Derek Kiernan [Wed, 25 Apr 2018 11:18:54 +0000 (12:18 +0100)]
misc: xilinx-sdfec: Improve the IOCTL Handling

Use the IOCTL Macros provided by Linux Kernel when handling IOCTL requests.
Plus for all parameter passing for IOCTL commands use pointers to be
consistent.

Signed-off-by: Derek Kiernan <derek.kiernan@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agomisc: xilinx-sdfec: Use "code_id" to dev_err calls
Derek Kiernan [Wed, 25 Apr 2018 11:18:53 +0000 (12:18 +0100)]
misc: xilinx-sdfec: Use "code_id" to dev_err calls

code_id is a multiplier used when calculating the reg_addr in existing
dev_err calls in the following functions:
- xsdfec_collect_ldpc_reg0
- xsdfec_collect_ldpc_reg1
- xsdfec_collect_ldpc_reg2
- xsdfec_collect_ldpc_reg3

Signed-off-by: Derek Kiernan <derek.kiernan@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agomisc: xilinx-sdfec: Remove Max Device Limitation
Derek Kiernan [Wed, 25 Apr 2018 11:18:52 +0000 (12:18 +0100)]
misc: xilinx-sdfec: Remove Max Device Limitation

Removed the limitation as number of devices may vary in the future.

Signed-off-by: Derek Kiernan <derek.kiernan@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Add TTC clocks
Rajan Vaja [Wed, 25 Apr 2018 12:34:04 +0000 (05:34 -0700)]
arm64: zynqmp: Add TTC clocks

PS clock(LPD_APB_CLK) is default clock for TTC. Add this clock
entry in TTC nodes.

Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agosoc: xilinx: vcu: Divisor calculation for MCU clock is updated.
Dhaval Shah [Wed, 25 Apr 2018 07:46:07 +0000 (00:46 -0700)]
soc: xilinx: vcu: Divisor calculation for MCU clock is updated.

Divisor of the mcu clock is calculated in such a way that
mcu clock derived from the calculation is greater than
or equal to provided values from the logicoreIP.

Signed-off-by: Dhaval Shah <dhaval.shah@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agodma: xilinx: Get DMA alignment from device tree for Framebuffer
Vishal Sagar [Tue, 24 Apr 2018 05:08:04 +0000 (10:38 +0530)]
dma: xilinx: Get DMA alignment from device tree for Framebuffer

Patch adds xlnx,pixels-per-clock(ppc) and xlnx,dma-align device tree
property decoding to calculate the required DMA alignment.
xlnx,pixels-per-clock is mandatory property now.
Minimum alignment required is 8 * pixels per clock in bytes.
dma-align property is optional.

In case present, dma-align must be a power of 2 and be >= 8 * ppc.
If absent, alignment is set as ppc * 8.

Added a new compatible string and structure which contains dma direction
and flag. The flag would be a bitmask of properties.
When ever a new IP or device tree property is to be supported, a bitmask
for the same is to be created and added to this flag.

For the new v2.1 compatible string, a new XILINX_PPC_PROP bitmask is
set in the flags. If the flag is set then, pixels-per-clock property
would be checked.

Signed-off-by: Vishal Sagar <vishal.sagar@xilinx.com>
Reviewed-by: Radhey Shyam Pandey <radheys@xilinx.com>
Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoDocumentation: devicetree: bindings: dma: Add properties for DMA alignment
Vishal Sagar [Tue, 24 Apr 2018 05:08:03 +0000 (10:38 +0530)]
Documentation: devicetree: bindings: dma: Add properties for DMA alignment

Adds the pixels per clock and dma-align device tree properties. These
are used to determine the DMA memory alignment.
New compatible strings xlnx,axi-frmbuf-rd-v2.1 and
xlnx,axi-frmbuf-wr-v2.1 have also been added for this.

Signed-off-by: Vishal Sagar <vishal.sagar@xilinx.com>
Reviewed-by: Radhey Shyam Pandey <radheys@xilinx.com>
Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agodma: xilinx: Add alpha formats support for Framebuffer Read
Vishal Sagar [Tue, 24 Apr 2018 17:57:15 +0000 (23:27 +0530)]
dma: xilinx: Add alpha formats support for Framebuffer Read

Add support to translate alpha DRM fourcc formats to corresponding
8bpc alpha color formats supported by the Framebuffer Read IP.

Signed-off-by: Vishal Sagar <vishal.sagar@xilinx.com>
Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoDocumentation: devicetree: bindings: dma: Add alpha formats
Vishal Sagar [Tue, 24 Apr 2018 17:57:14 +0000 (23:27 +0530)]
Documentation: devicetree: bindings: dma: Add alpha formats

Update the documentation to add support for the alpha formats supported
by Framebuffer Read IP.

Signed-off-by: Vishal Sagar <vishal.sagar@xilinx.com>
Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agosdhci: arasan: Remove quirk for broken base clock
Manish Narani [Mon, 23 Apr 2018 06:28:07 +0000 (11:58 +0530)]
sdhci: arasan: Remove quirk for broken base clock

This patch removes quirk which indicates a broken base clock. This was
making the kernel report wrong base clock of ~187MHz instead of 200MHz
even as the measurement on the hardware was showing 200MHz.

Signed-off-by: Manish Narani <manish.narani@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agotty: uartlite: Enable clocks at probe
Shubhrajyoti Datta [Fri, 20 Apr 2018 11:20:52 +0000 (16:50 +0530)]
tty: uartlite: Enable clocks at probe

At probe the uartlite is getting configured.
Enable the clocks before assiging uart and
disable after probe is done.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agotty: uartlite: Update the clock name
Shubhrajyoti Datta [Fri, 20 Apr 2018 11:23:48 +0000 (16:53 +0530)]
tty: uartlite: Update the clock name

Update the clock name to match the IP documentation.
Also document the same in bindings.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agofirmware: zynqmp: Add sysfs and IOCTL to set boot health status
Rajan Vaja [Thu, 19 Apr 2018 18:13:11 +0000 (11:13 -0700)]
firmware: zynqmp: Add sysfs and IOCTL to set boot health status

Add sysfs interface to set boot health status from userspace.
Add IOCTL ID used by this interface to communicate with firmware.

If PMUFW is compiled with CHECK_HEALTHY_BOOT, it will check the
healthy bit on FPD WDT expiration. If healthy bit is set by a user
application running in Linux, PMUFW will do APU only restart. If
healthy bit is not set during FPD WDT expiration, PMUFW will do
system restart.

Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agosound: xilinx: pcm: Set the shorter device name
Hyun Kwon [Thu, 19 Apr 2018 21:00:21 +0000 (14:00 -0700)]
sound: xilinx: pcm: Set the shorter device name

By default, the device names derive from the dt description. The DP
pcm devices are represented as a child node of DP node, which results
in both parent and child node names in the device name. The name
created in this way gets too long to fit into the sound component name,
and last characters where IDs are located are not included. This gives
the same component name for two different components, and the debugfs
fails to create entries with same name as warning below:

xilinx-dp-snd-pcm fd4a0000.zynqmp-display:zynqmp_dp_snd_pcm1: ASoC: Failed to create component debugfs directory

This fixes it by setting the child node name as a device name.

Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
Reviewed-by: Satish Kumar Nagireddy <satishna@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agodrm: xlnx: fb: Prefer the current format depth over depth from fb helper
Hyun Kwon [Wed, 11 Apr 2018 16:36:33 +0000 (09:36 -0700)]
drm: xlnx: fb: Prefer the current format depth over depth from fb helper

The drm fb helper has specific preference of bpp and depth. For example,
for 32bit bpp, the depth is hard-coded to be 24. If it's not aligned
with the supported format of a drm device, it fails to initialize fbdev.
So override the depth value from fb helper with the current format
of the drm device. This will allow to initialize the fbdev with
preferred format that matches with actual format.

Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
Reviewed-by: Saurabh Sengar <saurabhs@xilinx.com>
Tested-by: Anil Kumar Mamidala <amamidal@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agosdhci: arasan: Add runtime PM support
Manish Narani [Thu, 12 Apr 2018 12:30:34 +0000 (18:00 +0530)]
sdhci: arasan: Add runtime PM support

This patch adds runtime PM support in Arasan SD driver.

Signed-off-by: Manish Narani <manish.narani@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agospi: spi-xilinx: passed correct structure in pm calls.
Tejas Prajapati Rameshchandra [Tue, 10 Apr 2018 10:44:37 +0000 (16:14 +0530)]
spi: spi-xilinx: passed correct structure in pm calls.

Added device structure in xspi structure and cached
&pdev->dev in it for use with pm_runtime_get_sync
in driver.

Signed-off-by: Tejas Prajapati Rameshchandra <tejaspra@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agodt-bindings: display: xlnx: mixer: Update example to fix format strings
Rohit Athavale [Thu, 5 Apr 2018 17:20:33 +0000 (10:20 -0700)]
dt-bindings: display: xlnx: mixer: Update example to fix format strings

This commit updates the color formats for the example.

Signed-off-by: Rohit Athavale <rohit.athavale@xilinx.com>
Reviewed-by: Saurabh Sengar <saurabhs@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agodt-bindings: display: xlnx: mixer: Add supported formats table
Rohit Athavale [Thu, 5 Apr 2018 17:20:32 +0000 (10:20 -0700)]
dt-bindings: display: xlnx: mixer: Add supported formats table

This commit adds a list of supported formats that the driver supports.

Signed-off-by: Rohit Athavale <rohit.athavale@xilinx.com>
Reviewed-by: Saurabh Sengar <saurabhs@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agodrm: xlnx: pl_disp: fix odd_ptr_err.cocci warnings
Fengguang Wu [Tue, 10 Apr 2018 18:11:47 +0000 (11:11 -0700)]
drm: xlnx: pl_disp: fix odd_ptr_err.cocci warnings

 PTR_ERR should normally access the value just tested by IS_ERR

Generated by: scripts/coccinelle/tests/odd_ptr_err.cocci

Fixes: 742243a44a73 ("drm: xlnx: pl_disp: Use xlnx pipeline calls")
CC: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Reviewed-by: Saurabh Sengar <saurabhs@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agousb: gadget: udc-xilinx: Add clock support
Shubhrajyoti Datta [Wed, 4 Apr 2018 12:29:26 +0000 (17:59 +0530)]
usb: gadget: udc-xilinx: Add clock support

Currently the driver depends on the  bootloader to enable the clocks.
Add support for clocking. The patch enables the clock at  probe and
disables them at remove.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agodoc: binding: Add clock support
Shubhrajyoti Datta [Wed, 4 Apr 2018 12:29:25 +0000 (17:59 +0530)]
doc: binding: Add clock support

Add clock support for xilinx udc driver. While at it fix the case
for xlnx,has-builtin-dma.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agogpio: zynq: protect direction in/out with a spinlock
Glenn Langedock [Tue, 27 Mar 2018 14:09:25 +0000 (16:09 +0200)]
gpio: zynq: protect direction in/out with a spinlock

Fix race condition when changing the direction (in/out) of the GPIO pin.
The read-modify-write sequence (as coded in the driver) isn't atomic and
requires synchronization (spinlock).

Signed-off-by: Glenn Langedock <Glenn.Langedock@barco.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoiio: adc: xilinx-ams: Modify driver to match AMS standard sequence
Manish Narani [Thu, 15 Mar 2018 09:26:39 +0000 (14:56 +0530)]
iio: adc: xilinx-ams: Modify driver to match AMS standard sequence

This patch modifies the driver flow to match with the standard AMS
sequence.

Signed-off-by: Manish Narani <mnarani@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm: zynq: Remove 0x prefixes from cc108
Michal Simek [Tue, 27 Mar 2018 12:31:42 +0000 (14:31 +0200)]
arm: zynq: Remove 0x prefixes from cc108

The patch fixing issues reported by DTC:
arch/arm/boot/dts/zynq-cc108.dtb: Warning (unit_address_format): Node
/amba/spi@e000d000/flash@0/partition@0x400000 unit name should not have
leading "0x"
arch/arm/boot/dts/zynq-cc108.dtb: Warning (unit_address_format): Node
/amba/spi@e000d000/flash@0/partition@0x800000 unit name should not have
leading "0x"
arch/arm/boot/dts/zynq-cc108.dtb: Warning (unit_address_format): Node
/amba/spi@e000d000/flash@0/partition@0xc00000 unit name should not have
leading "0x"
arch/arm/boot/dts/zynq-cc108.dtb: Warning (unit_address_format): Node
/amba/spi@e000d000/flash@0/partition@0xd00000 unit name should not have
leading "0x"
arch/arm/boot/dts/zynq-cc108.dtb: Warning (unit_address_format): Node
/amba/spi@e000d000/flash@0/partition@0xf00000 unit name should not have
leading "0x"

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm: zynq: Fix eeprom dt nodes
Michal Simek [Tue, 27 Mar 2018 11:48:51 +0000 (13:48 +0200)]
arm: zynq: Fix eeprom dt nodes

- Use eeprom for node name
- Use atmel compatible string instead of at.
- Add missing labels

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm: zynq: Use fixed partitions for spi flash for zc770 xm010
Michal Simek [Tue, 27 Mar 2018 11:49:05 +0000 (13:49 +0200)]
arm: zynq: Use fixed partitions for spi flash for zc770 xm010

Sync with mainline.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm: zynq: Sync up licenses with mainline kernel
Michal Simek [Tue, 27 Mar 2018 11:43:05 +0000 (13:43 +0200)]
arm: zynq: Sync up licenses with mainline kernel

Use different location for SPDX line. Also update dates for new mainline
DTS files.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoARM: dts: zynq: Add generic compatible string for I2C EEPROM
Javier Martinez Canillas [Thu, 15 Jun 2017 18:54:12 +0000 (20:54 +0200)]
ARM: dts: zynq: Add generic compatible string for I2C EEPROM

The at24 driver allows to register I2C EEPROM chips using different vendor
and devices, but the I2C subsystem does not take the vendor into account
when matching using the I2C table since it only has device entries.

But when matching using an OF table, both the vendor and device has to be
taken into account so the driver defines only a set of compatible strings
using the "atmel" vendor as a generic fallback for compatible I2C devices.

So add this generic fallback to the device node compatible string to make
the device to match the driver using the OF device ID table.

Signed-off-by: Javier Martinez Canillas <javier@dowhile0.org>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm: zynq: Add missing address node name in microzed board
Michal Simek [Wed, 17 Jan 2018 14:21:38 +0000 (15:21 +0100)]
arm: zynq: Add missing address node name in microzed board

This patch is fixing issue reported by dtc:
arch/arm/boot/dts/zynq-microzed.dtb: Warning (unit_address_vs_reg): Node
/memory has a reg or ranges property, but no unit name

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm: zynq: Use i2c-mux instead of i2cswitch for pca9548
Michal Simek [Tue, 6 Feb 2018 13:00:30 +0000 (14:00 +0100)]
arm: zynq: Use i2c-mux instead of i2cswitch for pca9548

i2c muxes should described like this.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agodt: bindings: Add AMS channels details
Manish Narani [Tue, 27 Mar 2018 10:06:30 +0000 (15:36 +0530)]
dt: bindings: Add AMS channels details

This patch adds details of AMS channels to the Device Tree binding
documentation.

Signed-off-by: Manish Narani <mnarani@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Fix spi flash partition definition for zc1751 dc2
Michal Simek [Tue, 27 Mar 2018 11:09:15 +0000 (13:09 +0200)]
arm64: zynqmp: Fix spi flash partition definition for zc1751 dc2

Using different node name and label partitions as data.
Also use latest compatible strings based on mainline review.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Add eeprom reference to eeprom nodes
Michal Simek [Tue, 27 Mar 2018 11:15:17 +0000 (13:15 +0200)]
arm64: zynqmp: Add eeprom reference to eeprom nodes

Eeprom can contain information which can be used by nvmem drivers.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Use backward compatible string for gem
Michal Simek [Tue, 27 Mar 2018 10:53:37 +0000 (12:53 +0200)]
arm64: zynqmp: Use backward compatible string for gem

Add backward compatible string for gem ("cdns,gem").

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Use s/_/-/g in node name for zcu102 rev1.0
Michal Simek [Tue, 27 Mar 2018 10:50:04 +0000 (12:50 +0200)]
arm64: zynqmp: Use s/_/-/g in node name for zcu102 rev1.0

Follow spec for node names.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Add silabs prefix to u69 for zcu102
Michal Simek [Tue, 27 Mar 2018 10:48:30 +0000 (12:48 +0200)]
arm64: zynqmp: Add silabs prefix to u69 for zcu102

Add vendor prefix to si5341.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Use wifi as node name for wl1831 for zcu100
Michal Simek [Tue, 27 Mar 2018 10:31:53 +0000 (12:31 +0200)]
arm64: zynqmp: Use wifi as node name for wl1831 for zcu100

Use standard name for wifi node.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Use 96boards labels for zcu100
Michal Simek [Tue, 27 Mar 2018 10:29:38 +0000 (12:29 +0200)]
arm64: zynqmp: Use 96boards labels for zcu100

Use label for i2c and spi buses.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Sync up pmic with mainline for zcu100
Michal Simek [Tue, 27 Mar 2018 10:27:43 +0000 (12:27 +0200)]
arm64: zynqmp: Sync up pmic with mainline for zcu100

pmic should use pmic as node name.
Also remove comments about setting.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Remove double spaces from dts files
Michal Simek [Tue, 27 Mar 2018 11:00:40 +0000 (13:00 +0200)]
arm64: zynqmp: Remove double spaces from dts files

There is no reason to have double spaces for indentation.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Remove additional comments from dts files
Michal Simek [Tue, 27 Mar 2018 10:01:24 +0000 (12:01 +0200)]
arm64: zynqmp: Remove additional comments from dts files

Remove additional comments which were removed as the part of upstreaming.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Use keycode from input/input.h
Michal Simek [Tue, 27 Mar 2018 10:13:13 +0000 (12:13 +0200)]
arm64: zynqmp: Use keycode from input/input.h

zcu100 could use sw4 as key_power instead of key_down.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Label 8T49n287 as clock-generator
Michal Simek [Tue, 27 Mar 2018 10:05:38 +0000 (12:05 +0200)]
arm64: zynqmp: Label 8T49n287 as clock-generator

Based on spec clock chips should be labeled as clock-generators.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Enable watchdog on zcu106
Michal Simek [Tue, 27 Mar 2018 10:04:14 +0000 (12:04 +0200)]
arm64: zynqmp: Enable watchdog on zcu106

It is enabled in mainline that's why enable it here too.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Use atmel prefix instead of at
Michal Simek [Tue, 27 Mar 2018 08:54:25 +0000 (10:54 +0200)]
arm64: zynqmp: Use atmel prefix instead of at

This changes was done in mainline and this patch is just following it.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Use maxim prefix for all maxim chips
Michal Simek [Tue, 27 Mar 2018 08:52:40 +0000 (10:52 +0200)]
arm64: zynqmp: Use maxim prefix for all maxim chips

Use vendor prefix for Maxim chips.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Remove u-boot commands from dts files
Michal Simek [Tue, 27 Mar 2018 08:47:26 +0000 (10:47 +0200)]
arm64: zynqmp: Remove u-boot commands from dts files

U-Boot commands shouldn't be the part of kernel DTS files.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Remove number from clock-generator node name
Michal Simek [Tue, 27 Mar 2018 08:39:53 +0000 (10:39 +0200)]
arm64: zynqmp: Remove number from clock-generator node name

There shouldn't be a number appended based on spec.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Use i2c-mux instead of i2cswitch instead
Michal Simek [Tue, 27 Mar 2018 08:38:08 +0000 (10:38 +0200)]
arm64: zynqmp: Use i2c-mux instead of i2cswitch instead

Based on review from mainline i2c-mux is standard name for i2c switches.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Sync up license with mainline kernel
Michal Simek [Tue, 27 Mar 2018 08:36:39 +0000 (10:36 +0200)]
arm64: zynqmp: Sync up license with mainline kernel

Mainline Linux kernel has adopted SPDX header license in a different
format then was used before. This patch is syncing it up.

Also update years in License text and remove Nathalie's email because it
is no longer valid.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agodma: xilinx: Add interlaced support to Xilinx Framebuffer driver
Vishal Sagar [Mon, 19 Mar 2018 13:19:37 +0000 (18:49 +0530)]
dma: xilinx: Add interlaced support to Xilinx Framebuffer driver

Adds support for reading or setting the field id of framebuffer written
to memory or read back from memory in the Xilinx Framebuffer driver.

Signed-off-by: Vishal Sagar <vsagar@xilinx.com>
Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agov4l: xilinx: sdirxss: Correct the v4l2_field to V4L2_FIELD_ALTERNATE
Vishal Sagar [Tue, 13 Mar 2018 19:35:37 +0000 (01:05 +0530)]
v4l: xilinx: sdirxss: Correct the v4l2_field to V4L2_FIELD_ALTERNATE

Correct the field type to V4L2_FIELD_ALTERNATE instead of
V4L2_FIELD_INTERLACED and halve the height in such cases.

Signed-off-by: Vishal Sagar <vsagar@xilinx.com>
Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agobindings: display: xlnx: Fixing device tree documentation
Saurabh Sengar [Tue, 13 Mar 2018 03:56:26 +0000 (09:26 +0530)]
bindings: display: xlnx: Fixing device tree documentation

Adding back dma-names.

Signed-off-by: Saurabh Sengar <saurabhs@xilinx.com>
Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: config: Enable soft PL V4L drivers
Vishal Sagar [Tue, 13 Mar 2018 04:47:59 +0000 (10:17 +0530)]
arm64: zynqmp: config: Enable soft PL V4L drivers

Enable the Demosaic, Gamma, VPSS CSC, VPSS Scaler and
MIPI CSI2 Rx drivers in defconfig.

Signed-off-by: Vishal Sagar <vsagar@xilinx.com>
Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: config: Enable soft IP DRM drivers
Venkateshwar Rao G [Wed, 14 Mar 2018 06:33:47 +0000 (12:03 +0530)]
arm64: zynqmp: config: Enable soft IP DRM drivers

This enables VPSS scaler and color space converter drivers in defconfig.

Signed-off-by: Venkateshwar Rao G <vgannava@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agofpga: region: Add reset support to the fpga region
Shubhrajyoti Datta [Thu, 8 Mar 2018 05:31:11 +0000 (11:01 +0530)]
fpga: region: Add reset support to the fpga region

Many of the fpga regions have a reset that has to be
asserted after the bit file programming. Add support
for the same in case there is no reset phandle passed
no action is taken so it is backward compatible.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agodrm: xlnx: zynqmp: Disable a plane when the fb format changes xilinx-v2018.1
Hyun Kwon [Tue, 10 Apr 2018 16:22:21 +0000 (09:22 -0700)]
drm: xlnx: zynqmp: Disable a plane when the fb format changes

The drm core doesn't explicitly disable a plane when format changes.
So add a check in the plane update functions if the new framebuffer
format has changed, and disable the plane for the format change.

Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
Tested-by: Kuldeep Dave <kuldeepd@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Add support for zc1275 revB
Michal Simek [Wed, 11 Apr 2018 10:35:35 +0000 (12:35 +0200)]
arm64: zynqmp: Add support for zc1275 revB

This patch enables support zc1275 revB board. It has
SD added compared to revA. The same configuration will
work for RevC boards aswell.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Disable WP on zcu111
Michal Simek [Wed, 4 Apr 2018 12:08:24 +0000 (14:08 +0200)]
arm64: zynqmp: Disable WP on zcu111

On this board there is SD slot without WP connected.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoserial: xuartps: Fix suspend functionality
Nava kishore Manne [Wed, 4 Apr 2018 12:23:53 +0000 (17:53 +0530)]
serial: xuartps: Fix suspend functionality

The driver's suspend/resume functions were buggy.
If UART node contains any child node in the DT and
the child is established a communication path with
the parent UART. The relevant /dev/ttyPS* node will
be not available for other operations.
If the driver is trying to do any operations like
suspend/resume without checking the tty->dev status
it leads to the kernel crash/hang.

This patch fix this issue by call the device_may_wake()
with the generic parameter of type struct device.
in the uart suspend and resume paths.

It also fixes a race condition in the uart suspend
path(i.e uart_suspend_port() should be called at the
end of cdns_uart_suspend API this path updates the same)

Signed-off-by: Nava kishore Manne <navam@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agodrm: xlnx: drv: Shutdown the drm device properly
Hyun Kwon [Thu, 29 Mar 2018 00:49:19 +0000 (17:49 -0700)]
drm: xlnx: drv: Shutdown the drm device properly

If a drm device is released immediately in shutdown callback by calling
drm_put_device(), it gives a warnning as below because there are some
resources, drm gem objects, that are still used by fbdev emulation and
attached to the drm device.

> reboot

or

> shutdown -h now

...
[   40.731016] [<ffffff800850adc0>] drm_gem_destroy+0x18/0x30
[   40.736485] [<ffffff800850d690>] drm_dev_fini+0x28/0x90
[   40.741693] [<ffffff800850d764>] drm_dev_unref+0x6c/0x78
[   40.746988] [<ffffff800850d7ac>] drm_put_dev+0x3c/0x70
[   40.752111] [<ffffff80085379b4>] xlnx_shutdown+0x14/0x20
[   40.757407] [<ffffff8008547b2c>] device_shutdown+0x114/0x1f0
[   40.763050] [<ffffff80080ba464>] kernel_restart_prepare+0x34/0x40
[   40.769125] [<ffffff80080ba544>] kernel_restart+0x14/0x78
[   40.774507] [<ffffff80080ba7e4>] SyS_reboot+0xbc/0x1e8
[   40.779627] Exception stack(0xffffff8013b13ec0 to 0xffffff8013b14000)
...

This fixes the warning by shutting down the drm device in complete
sequence.

Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agosoc: xilinx: vcu: Provided API to get number of cores
Dhaval Shah [Tue, 27 Mar 2018 06:51:13 +0000 (23:51 -0700)]
soc: xilinx: vcu: Provided API to get number of cores

Number of cores related information is provided
through the xvcu_get_num_cores API.

Signed-off-by: Dhaval Shah <dshah@xilinx.com>
Reviewed-by: Varunkumar Allagadapa <varunkumar.allagadapa@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoxilinx: v4l2: dma: Bug fix in single plane support
Satish Kumar Nagireddy [Fri, 23 Mar 2018 21:24:13 +0000 (14:24 -0700)]
xilinx: v4l2: dma: Bug fix in single plane support

This patch fixes bugs in single plane handling.
 a. Passing v4l2 pixel format to framebuffer driver
 b. Making dst_icg is zero, though it does not matter
    in case of single plane formats
 c. Correcting bytes per line for single plane 10 bit
    formats

Signed-off-by: Satish Kumar Nagireddy <satishna@xilinx.com>
Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agomisc: xilinx-sdfec: Setting FEC_CODE change
Derek Kiernan [Fri, 23 Mar 2018 19:43:22 +0000 (19:43 +0000)]
misc: xilinx-sdfec: Setting FEC_CODE change

Setting of the FEC_Code (LDPC/Turbo) is decided at using the device tree
only (at design time only), remove the setting of the value in the function
xsdfec_set_turbo and xsdfec_add_ldpc to function xsdfec_parse_of to ensure
that this is OK.

Signed-off-by: Derek Kiernan <Derek.Kiernan@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agomisc: xilinx-sdfec: Correct invalid order check
Derek Kiernan [Fri, 23 Mar 2018 19:43:21 +0000 (19:43 +0000)]
misc: xilinx-sdfec: Correct invalid order check

Correct the value used when checking order value in the function
xsdfec_start.

Signed-off-by: Derek Kiernan <Derek.Kiernan@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agomisc: xilinx-sdfec: Use dev_dbg in xsdfec_regread
Derek Kiernan [Fri, 23 Mar 2018 19:43:20 +0000 (19:43 +0000)]
misc: xilinx-sdfec: Use dev_dbg in xsdfec_regread

To be consistent with xsdfec_regwrite function.

Signed-off-by: Derek Kiernan <Derek.Kiernan@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agomisc: xilinx-sdfec: Memory leak fix
Derek Kiernan [Fri, 23 Mar 2018 19:43:19 +0000 (19:43 +0000)]
misc: xilinx-sdfec: Memory leak fix

In function xsdfec_add_ldpc and xsdfec_get_ldpc_code_params all failures
after successfully allocating "ldpc/ldpc_params" memory should free the
allocated memory before returning from the function.

Signed-off-by: Derek Kiernan <Derek.Kiernan@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agomisc: xilinx-sdfec: Change struct for GET_STATUS IOCTL
Derek Kiernan [Fri, 23 Mar 2018 10:44:25 +0000 (10:44 +0000)]
misc: xilinx-sdfec: Change struct for GET_STATUS IOCTL

Removes configuration and error stats information from the status.

Signed-off-by: Derek Kiernan <Derek.Kiernan@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agomisc: xilinx-sdfec: Add IOCTL XSDFEC_IS_ACTIVE
Derek Kiernan [Fri, 23 Mar 2018 10:44:24 +0000 (10:44 +0000)]
misc: xilinx-sdfec: Add IOCTL XSDFEC_IS_ACTIVE

Gives the user the ability to determine if the SDFEC is currently
progressing a block of data.

Signed-off-by: Derek Kiernan <Derek.Kiernan@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agomisc: xilinx-sdfec: Add BYPASS IOCTLs
Derek Kiernan [Thu, 15 Mar 2018 17:39:18 +0000 (17:39 +0000)]
misc: xilinx-sdfec: Add BYPASS IOCTLs

To allow user to the bypass the SDFEC block, where output data matches the
input data but the SDFEC performs the same operation(number of cycles).

Signed-off-by: Derek Kiernan <Derek.Kiernan@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agomisc: xilinx-sdfec: Fix open_count decrement when already open
Derek Kiernan [Thu, 15 Mar 2018 17:39:17 +0000 (17:39 +0000)]
misc: xilinx-sdfec: Fix open_count decrement when already open

In function xsdfec_dev_open if the atomic_dec_and_test detects that driver
is already opened a increment is required. This ensures the driver
instance can the reopened after it is released by the user.

Signed-off-by: Derek Kiernan <Derek.Kiernan@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agomisc: xilinx-sdfec: Remove hardcoded Order setting
Derek Kiernan [Thu, 15 Mar 2018 17:39:16 +0000 (17:39 +0000)]
misc: xilinx-sdfec: Remove hardcoded Order setting

Occurs in function xsdfec_start.

Signed-off-by: Derek Kiernan <Derek.Kiernan@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agomisc: xilinx-sdfec: Add IOCTL XSDFEC_SET_ORDER
Derek Kiernan [Thu, 15 Mar 2018 17:39:15 +0000 (17:39 +0000)]
misc: xilinx-sdfec: Add IOCTL XSDFEC_SET_ORDER

Gives user ability to set the order, i.e. if data blocks sequence can
change from input to output.

Signed-off-by: Derek Kiernan <Derek.Kiernan@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agomisc: xilinx-sdfec: Verify IOCTL arguments in every IOCTL
Derek Kiernan [Thu, 15 Mar 2018 17:39:15 +0000 (17:39 +0000)]
misc: xilinx-sdfec: Verify IOCTL arguments in every IOCTL

Previously the function xsdfec_dev_ioctl always checks if the ioctl
argument is not NULL.

Signed-off-by: Derek Kiernan <Derek.Kiernan@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Set Dual Role Device Mode by default
Anurag Kumar Vulisha [Wed, 21 Mar 2018 16:15:44 +0000 (21:45 +0530)]
arm64: zynqmp: Set Dual Role Device Mode by default

This patch enables the dwc3 DRD mode by default. Doing so, will
make the same Image to be used for both Host & Device modes
based on the dr_mode dts parameter.

Signed-off-by: Anurag Kumar Vulisha <anuragku@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agodrm: xlnx: zynqmp_dp: Use the correct number of lanes
Hyun Kwon [Wed, 21 Mar 2018 17:18:09 +0000 (10:18 -0700)]
drm: xlnx: zynqmp_dp: Use the correct number of lanes

The number of lanes is configurable, thus the dynamically configured
value should be used instead of hard-coded max number of lanes. Use
the number of assigned lanes correctly.

While at it, don't print an error for phy probe deferral.

Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
Tested-by: Parth Gajjar <parthg@xilinx.com>
Reviewed-by: Saurabh Sengar <saurabhs@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agov4l: xilinx: dma: Return from mplane handling for enum formats
Satish Kumar Nagireddy [Mon, 19 Mar 2018 21:11:14 +0000 (14:11 -0700)]
v4l: xilinx: dma: Return from mplane handling for enum formats

In current driver implemenataion, it is always falling back to
single plane handling after mplane handling. This patch ensures
that mplane handling return gracefully.

Signed-off-by: Satish Kumar Nagireddy <satishna@xilinx.com>
Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agodt: bindings: display: xlnx: Updated gpio reset entry
Venkateshwar Rao G [Wed, 14 Mar 2018 14:23:19 +0000 (19:53 +0530)]
dt: bindings: display: xlnx: Updated gpio reset entry

This patch updates reset gpio entry arguments.

Signed-off-by: Venkateshwar Rao G <vgannava@xilinx.com>
Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agodrm: xlnx: csc: Adding vpss-csc reset through gpio
Venkateshwar Rao G [Wed, 14 Mar 2018 15:32:34 +0000 (21:02 +0530)]
drm: xlnx: csc: Adding vpss-csc reset through gpio

The color space converter reset is controlled by gpio.

Signed-off-by: Venkateshwar Rao G <vgannava@xilinx.com>
Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agodt: bindings: display: xlnx: Adding gpio reset entry
Venkateshwar Rao G [Wed, 14 Mar 2018 15:32:33 +0000 (21:02 +0530)]
dt: bindings: display: xlnx: Adding gpio reset entry

This patch adds the gpio reset entry for vpss color space converter.
Moved to bindings/display/xlnx folder.

Signed-off-by: Venkateshwar Rao G <vgannava@xilinx.com>
Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agotty: xilinx_uartps: Enable automatic flow control
Michal Simek [Thu, 15 Mar 2018 08:38:02 +0000 (09:38 +0100)]
tty: xilinx_uartps: Enable automatic flow control

Enable automatic flow control which should ensure that there is no
mainteinance in connection for zcu100 BT case.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Nava kishore Manne <navam@xilinx.com>
6 years agoirqchip: xilinx: Clean up error paths
Mubin Sayyed [Wed, 14 Mar 2018 05:31:43 +0000 (11:01 +0530)]
irqchip: xilinx: Clean up error paths

This patch cleans error paths to ensure that
irqc->base is unmapped and intc_dev is being
freed properly.

Signed-off-by: Mubin Sayyed <mubinusm@xilinx.com>
Reviewed-by: Radhey Shyam Pandey <radheys@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agomisc: xilinx-sdfec: Add IOCTL to get LDPC Params
Derek Kiernan [Tue, 13 Mar 2018 17:11:57 +0000 (17:11 +0000)]
misc: xilinx-sdfec: Add IOCTL to get LDPC Params

Adding IOTCL XSDFEC_GET_LDPC_CODE_PARAMS to allow user verify LDPC
code params.

Signed-off-by: Derek Kiernan <Derek.Kiernan@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agomisc: xilinx-sdfec: Add IOCTL to get Turbo Params
Derek Kiernan [Tue, 13 Mar 2018 17:11:56 +0000 (17:11 +0000)]
misc: xilinx-sdfec: Add IOCTL to get Turbo Params

Adding IOCTL XSDFEC_GET_TURBO to allow user verify entries turbo param
values.

Signed-off-by: Derek Kiernan <Derek.Kiernan@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agosoc: zynqmp: Fix PMU version comparison
Rajan Vaja [Tue, 13 Mar 2018 16:51:06 +0000 (09:51 -0700)]
soc: zynqmp: Fix PMU version comparison

Fix comparison of actual PMUFW version with expected version.

Signed-off-by: Rajan Vaja <rajanv@xilinx.com>
Acked-by: Jolly Shah <jollys@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: dt: Move zynqmp_dpsub under amba
Hyun Kwon [Tue, 13 Mar 2018 16:05:30 +0000 (09:05 -0700)]
arm64: zynqmp: dt: Move zynqmp_dpsub under amba

The DP device node should be under amba. Currently, it's under root,
and this patch moves the node under amba.

Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agodrm: xlnx: scaler: Updating vpss-scaler reset logic
Venkateshwar Rao G [Mon, 12 Mar 2018 18:08:08 +0000 (23:38 +0530)]
drm: xlnx: scaler: Updating vpss-scaler reset logic

This patch updates the reset through gpio logic

Signed-off-by: Venkateshwar Rao G <vgannava@xilinx.com>
Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoBluetooth: hci_ll: Extend timeout between start and communication
Michal Simek [Mon, 12 Mar 2018 15:13:57 +0000 (16:13 +0100)]
Bluetooth: hci_ll: Extend timeout between start and communication

Extend timeout between bt enable and communication with chip.
Flow control is automatic and driver is responding that device is ready
to accept messages but it doesn't need to be truth. Wait more time to
ensure that communication cat start.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Series-prefix: LINUX
Cover-letter:
zcu100 BT fixes
Hi,

I have cherry-picked mainline patches to make sure that we are using the
latest hci_ll code with fixes.

CR-993696

Thanks,
Michal
END

6 years agoarm64: zynqmp: Enable serdev devices for zcu100 BT chip
Michal Simek [Mon, 12 Mar 2018 15:13:20 +0000 (16:13 +0100)]
arm64: zynqmp: Enable serdev devices for zcu100 BT chip

Enable HCIuart and serdev.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Use serdev for zcu100 BT
Michal Simek [Mon, 12 Mar 2018 15:12:33 +0000 (16:12 +0100)]
arm64: zynqmp: Use serdev for zcu100 BT

Mainline started to use serdev interface for uart attached devices.
Change description to reflect it.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoBluetooth: hci_ll: Add optional nvmem BD address source
David Lechner [Tue, 12 Dec 2017 23:54:12 +0000 (17:54 -0600)]
Bluetooth: hci_ll: Add optional nvmem BD address source

This adds an optional nvmem consumer to get a BD address from an external
source. The BD address is then set in the Bluetooth chip after the
firmware has been loaded.

This has been tested working with a TI CC2560A chip (in a LEGO MINDSTORMS
EV3).

Signed-off-by: David Lechner <david@lechnology.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
6 years agoBluetooth: hci_ll: Add endianness conversion when setting baudrate
David Lechner [Fri, 8 Dec 2017 02:22:19 +0000 (20:22 -0600)]
Bluetooth: hci_ll: Add endianness conversion when setting baudrate

This adds an endianness conversion when setting the baudrate using a
vendor-specific command. Otherwise, bad things might happen on a big-
endian system.

Suggested-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: David Lechner <david@lechnology.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
6 years agoBluetooth: hci_ll: remove \n from kernel messages
David Lechner [Sun, 3 Dec 2017 03:01:58 +0000 (21:01 -0600)]
Bluetooth: hci_ll: remove \n from kernel messages

The bt_* printk macros include a \n already, so we don't need extra ones
here.

Signed-off-by: David Lechner <david@lechnology.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
6 years agoBluetooth: mark expected switch fall-throughs
Gustavo A. R. Silva [Thu, 12 Oct 2017 22:24:02 +0000 (17:24 -0500)]
Bluetooth: mark expected switch fall-throughs

In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

In this particular case, notice that I replaced the
"deliberate fall-through..." comment with a "fall through"
comment, which is what GCC is expecting to find.

Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
6 years agoBluetooth: hci_ll: add support for setting public address
David Lechner [Tue, 12 Dec 2017 21:59:16 +0000 (15:59 -0600)]
Bluetooth: hci_ll: add support for setting public address

This adds support for setting the public address on Texas Instruments
Bluetooth chips using a vendor-specific command.

This has been tested on a CC2560A chip. The TI wiki also indicates that
this command should work on TI WL17xx/WL18xx Bluetooth chips.

During review, there was some question as to the correctness of the byte
swapping since TI's documentation is not clear on this matter. This can
be tested with the btmgmt utility from bluez. The adapter must be powered
off to change the address. If the baswap() is omitted, address is reversed.

In case there is a issue in the future, here is the output of btmon during
the command `btmgmt public-addr 00:11:22:33:44:55`:

Bluetooth monitor ver 5.43
= Note: Linux version 4.15.0-rc2-08561-gcb132a1-dirty (armv5tejl)      0.707043
= Note: Bluetooth subsystem version 2.22                               0.707091
= New Index: 00:17:E7:BD:1C:8E (Primary,UART,hci0)              [hci0] 0.707106
@ MGMT Open: btmgmt (privileged) version 1.14                 {0x0002} 0.707124
@ MGMT Open: bluetoothd (privileged) version 1.14             {0x0001} 0.707137
@ MGMT Open: btmon (privileged) version 1.14                  {0x0003} 0.707540
@ MGMT Command: Set Public Address (0x0039) plen 6    {0x0002} [hci0] 11.167991
        Address: 00:11:22:33:44:55 (CIMSYS Inc)
@ MGMT Event: Command Complete (0x0001) plen 7        {0x0002} [hci0] 11.175681
      Set Public Address (0x0039) plen 4
        Status: Success (0x00)
        Missing options: 0x00000000
@ MGMT Event: Index Removed (0x0005) plen 0           {0x0003} [hci0] 11.175757
@ MGMT Event: Index Removed (0x0005) plen 0           {0x0002} [hci0] 11.175757
@ MGMT Event: Index Removed (0x0005) plen 0           {0x0001} [hci0] 11.175757
= Open Index: 00:17:E7:BD:1C:8E                                [hci0] 11.176807
< HCI Command: Vendor (0x3f|0x0006) plen 6                     [hci0] 11.176975
        00 11 22 33 44 55                                .."3DU
> HCI Event: Command Complete (0x0e) plen 4                    [hci0] 11.188260
      Vendor (0x3f|0x0006) ncmd 1
        Status: Success (0x00)
...
< HCI Command: Read Local Version Info.. (0x04|0x0001) plen 0  [hci0] 11.189859
> HCI Event: Command Complete (0x0e) plen 12                   [hci0] 11.190732
      Read Local Version Information (0x04|0x0001) ncmd 1
        Status: Success (0x00)
        HCI version: Bluetooth 2.1 (0x04) - Revision 0 (0x0000)
        LMP version: Bluetooth 2.1 (0x04) - Subversion 6431 (0x191f)
        Manufacturer: Texas Instruments Inc. (13)
< HCI Command: Read BD ADDR (0x04|0x0009) plen 0               [hci0] 11.191027
> HCI Event: Command Complete (0x0e) plen 10                   [hci0] 11.192101
      Read BD ADDR (0x04|0x0009) ncmd 1
        Status: Success (0x00)
        Address: 00:11:22:33:44:55 (CIMSYS Inc)
...

Signed-off-by: David Lechner <david@lechnology.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
6 years agoBluetooth: hci_ll: add constant for vendor-specific command
David Lechner [Mon, 4 Dec 2017 03:21:21 +0000 (21:21 -0600)]
Bluetooth: hci_ll: add constant for vendor-specific command

This adds a #define for the vendor-specific HCI command to set the
baudrate instead of using the bare 0xff36 multiple times.

Signed-off-by: David Lechner <david@lechnology.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>