Re: [PATCH 11/18] dt-bindings: usb: dwc3: Add interrupt-names property support

2020-10-11 Thread Serge Semin
On Sun, Oct 11, 2020 at 11:53:07AM +0300, Sergei Shtylyov wrote: > On 11.10.2020 1:41, Serge Semin wrote: > > > The controller driver supports two types of DWC USB3 devices: with a > > common interrupt lane and with individual interrupts for each mode. Add > > bot

Re: [PATCH 13/18] dt-bindings: usb: dwc3: Add Tx De-emphasis restrictions

2020-10-11 Thread Serge Semin
On Sun, Oct 11, 2020 at 11:56:21AM +0300, Sergei Shtylyov wrote: > On 11.10.2020 1:41, Serge Semin wrote: > > > In accordance with the driver comments the PIPE3 de-emphasis can be tunned > >Tuned. Oh. My spell checker accepted this as past participl

Re: [PATCH 17/18] dt-bindings: usb: keystone-dwc3: Validate DWC3 sub-node

2020-10-11 Thread Serge Semin
On Sun, Oct 11, 2020 at 12:04:06PM +0300, Sergei Shtylyov wrote: > On 11.10.2020 1:41, Serge Semin wrote: > > > TI Keystone DWC3 compatible DT node is supposed to have a DWC USB3 > > compatible sub-node to describe a fully functioning USB interface. > > Since DWC USB3

Re: [PATCH 15/18] dt-bindings: usb: meson-g12a-usb: Discard FL-adj property

2020-10-12 Thread Serge Semin
On Mon, Oct 12, 2020 at 09:54:25AM +0200, Neil Armstrong wrote: > Hi, > > On 11/10/2020 00:41, Serge Semin wrote: > > An empty snps,quirk-frame-length-adjustment won't cause any change > > performed by the driver. Moreover the DT schema validation will fail, > > si

Re: [PATCH 15/18] dt-bindings: usb: meson-g12a-usb: Discard FL-adj property

2020-10-12 Thread Serge Semin
On Mon, Oct 12, 2020 at 05:01:43PM +0200, Neil Armstrong wrote: > Hi, > > On 12/10/2020 16:22, Serge Semin wrote: > > On Mon, Oct 12, 2020 at 09:54:25AM +0200, Neil Armstrong wrote: > >> Hi, > >> > >> On 11/10/2020 00:41, Serge Semin wrote: > >>

Re: [PATCH] net: phy: realtek: fix rtl8211e rx/tx delay config

2020-09-17 Thread Serge Semin
Hello Willy, Thanks for the patch. My comments are below. I've Cc'ed the U-boot/FreeBSD, who might be also interested in the solution you've provided. On Thu, Sep 17, 2020 at 09:47:33AM +0800, Willy Liu wrote: > RGMII RX Delay and TX Delay settings will not applied if Force TX RX Delay > Control

[PATCH v2 5/5] dmaengine: dw: Add DMA-channels mask cell support

2020-07-31 Thread Serge Semin
been noticed for the channels synthesized with max-burst-len=4. Signed-off-by: Serge Semin --- Changelog v2: - Use the statement "slave.channels >= BIT(dw->pdata->nr_channels)" to make sure the permitted DMA-channels pool is valid. - Describe new DW DMAC "channels&quo

[PATCH v2 1/5] dt-bindings: dma: dw: Add optional DMA-channels mask cell support

2020-07-31 Thread Serge Semin
the phandle arguments or the mask is zero, then the allocation will be performed from a set of all channels provided by the DMA controller. Signed-off-by: Serge Semin --- .../devicetree/bindings/dma/snps,dma-spear1340.yaml| 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff

[PATCH v2 2/5] dmaengine: dw: Activate FIFO-mode for memory peripherals only

2020-07-31 Thread Serge Semin
nnel before each transfer") we can freely do that in the generic dw_dma_initialize_chan() method. Signed-off-by: Serge Semin Reviewed-by: Andy Shevchenko --- drivers/dma/dw/dw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma/dw/dw.c b/drivers/dma/dw/dw.c in

[PATCH v2 0/5] dmaengine: dw: Introduce non-mem peripherals optimizations

2020-07-31 Thread Serge Semin
in a single line even though it gets out of 80 columns limit. Signed-off-by: Serge Semin Cc: Alexey Malahov Cc: Pavel Parkhomenko Cc: Peter Ujfalusi Cc: Andy Shevchenko Cc: Rob Herring Cc: dmaeng...@vger.kernel.org Cc: devicet...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Serge Se

[PATCH v2 3/5] dmaengine: dw: Discard dlen from the dev-to-mem xfer width calculation

2020-07-31 Thread Serge Semin
and speed up the DMA-channel performance for DMA_DEV_TO_MEM DMA-transfers. Signed-off-by: Serge Semin Acked-by: Andy Shevchenko --- Changelog v2: - Add Databook version to the commit log. --- drivers/dma/dw/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma

[PATCH v2 4/5] dmaengine: dw: Ignore burst setting for memory peripherals

2020-07-31 Thread Serge Semin
a channel FIFO or data items required to complete the block transfer, whichever is smaller; length of burst transfers from memory is always equal to the space available in a channel FIFO or number of data items required to complete the block transfer, whichever is smaller. Signed-off-by: S

Re: [PATCH] gpio: dwapb: add support for new hisilicon ascend soc

2020-09-12 Thread Serge Semin
On Sun, Sep 06, 2020 at 06:18:07AM +, Dingtianhong wrote: [...] > > On Sat, Aug 22, 2020 at 12:27:53PM +0800, Ding Tianhong wrote: > >> The hisilicon ascend soc's gpio is based on the synopsys DW gpio, > >> and expand the register to support for INTCOMB_MASK, the new > >> register is used to

[PATCH 1/2] mips: Add strong UC ordering config

2020-09-20 Thread Serge Semin
4.2 Execution Order Behavior, p. 33 [2] MIPS Coherence Protocol Specification, Document Number: MD00605, Revision 01.01. September 14, 2015, 4.8.1 IO Device Access, p. 58 [3] "LINUX KERNEL MEMORY BARRIERS", Documentation/memory-barriers.txt, Section "KERNEL I/O BA

[PATCH 2/2] mips: Introduce MIPS CM2 GCR Control register accessors

2020-09-20 Thread Serge Semin
for the various MIPS platforms. [1] MIPS32 P5600 Multiprocessing System Software User's Manual, Document Number: MD01025, Revision 01.60, April 19, 2016, p. 400 Signed-off-by: Serge Semin --- Folks, do you think it would be better to implement a dedicated config for arch/mips/kernel/mips-cm.c code

[PATCH 0/2] mips: Introduce some IO-accessors optimizations

2020-09-20 Thread Serge Semin
, Revision 01.01. September 14, 2015, 4.8.1 IO Device Access, p. 58 [3] "LINUX KERNEL MEMORY BARRIERS", Documentation/memory-barriers.txt, Section "KERNEL I/O BARRIER EFFECTS" Signed-off-by: Serge Semin Cc: Alexey Malahov Cc: Pavel Parkhomenko Cc: Vadim Vlasov Cc: M

[PATCH 1/3] hwmon: bt1-pvt: Test sensor power supply on probe

2020-09-20 Thread Serge Semin
hwmon: Add Baikal-T1 PVT sensor driver") Signed-off-by: Serge Semin --- drivers/hwmon/bt1-pvt.c | 40 1 file changed, 40 insertions(+) diff --git a/drivers/hwmon/bt1-pvt.c b/drivers/hwmon/bt1-pvt.c index 94698cae0497..f4b7353c078a 100644 --- a/drivers

[PATCH 0/3] hwmon: bt1-pvt: Fix PVT sensor being unpowered

2020-09-20 Thread Serge Semin
and using it to set the wait-completion timeout. Fixes: 87976ce2825d ("hwmon: Add Baikal-T1 PVT sensor driver") Signed-off-by: Serge Semin Cc: Maxim Kaurkin Cc: Alexey Malahov Cc: Pavel Parkhomenko Cc: linux-m...@vger.kernel.org Cc: linux-hw...@vger.kernel.org Cc: linux-kernel@vger.kernel.

[PATCH 3/3] hwmon: bt1-pvt: Wait for the completion with timeout

2020-09-20 Thread Serge Semin
timeout is exactly what we need to predict for how long conversion could normally last. Fixes: 87976ce2825d ("hwmon: Add Baikal-T1 PVT sensor driver") Signed-off-by: Serge Semin --- drivers/hwmon/bt1-pvt.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git

[PATCH 2/3] hwmon: bt1-pvt: Cache current update timeout

2020-09-20 Thread Serge Semin
the caller task hanging up in case if the PVT sensor is suddenly powered down. Fixes: 87976ce2825d ("hwmon: Add Baikal-T1 PVT sensor driver") Signed-off-by: Serge Semin --- drivers/hwmon/bt1-pvt.c | 85 ++--- drivers/hwmon/bt1-pvt.h | 3 ++ 2 files c

[PATCH] clk: baikal-t1: Mark Ethernet PLL as critical

2020-09-20 Thread Serge Semin
resets. So for now just mark the PLL clock provider as critical. Signed-off-by: Serge Semin Cc: Alexey Malahov Cc: linux-m...@vger.kernel.org --- drivers/clk/baikal-t1/clk-ccu-pll.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/clk/baikal-t1/clk-ccu

[PATCH v3] mtd: physmap: Add Baikal-T1 physically mapped ROM support

2020-09-20 Thread Serge Semin
memory regions must be done via the dword-aligned addresses. Signed-off-by: Serge Semin Cc: Alexey Malahov Cc: Pavel Parkhomenko Cc: Lee Jones Cc: linux-m...@vger.kernel.org --- Link: https://lore.kernel.org/linux-mtd/20200508100905.5854-1-sergey.se...@baikalelectronics.ru/ Changelog v2

[PATCH v2 11/11] spi: dw-dma: Add one-by-one SG list entries transfer

2020-09-20 Thread Serge Semin
described above is only executed if a full-duplex SPI transfer is requested and the DMA engine hasn't provided channels with hardware accelerated SG list traverse capability to handle both SG lists at once. Signed-off-by: Serge Semin Suggested-by: Andy Shevchenko --- drivers/spi/spi-dw-dma.c | 137

[PATCH v2 04/11] spi: dw-dma: Check rx_buf availability in the xfer method

2020-09-20 Thread Serge Semin
calling the Rx preparation method. Signed-off-by: Serge Semin --- drivers/spi/spi-dw-dma.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/spi/spi-dw-dma.c b/drivers/spi/spi-dw-dma.c index da17897b8acb..d2a67dee1a66 100644 --- a/drivers/spi/spi-dw-dma.c +++ b

[PATCH v2 03/11] spi: dw-dma: Configure the DMA channels in dma_setup

2020-09-20 Thread Serge Semin
, since its device_config() callback always returns zero (though it might change in future). But since DW APB SSI driver now supports any DMA back-end we must make sure the DMA device configuration has been successful before proceeding with further setups. Signed-off-by: Serge Semin --- drivers/spi

[PATCH v2 02/11] spi: dw-dma: Fail DMA-based transfer if no Tx-buffer specified

2020-09-20 Thread Serge Semin
DW APB SSI DMA driver code is still left in state as if Tx-buffer might be optional, which is no longer true. Let's fix it so an error would be returned if no Tx-buffer detected and DMA Tx would be always enabled. Signed-off-by: Serge Semin --- drivers/spi/spi-dw-dma.c | 27 +

[PATCH v2 10/11] spi: dw-dma: Pass exact data to the DMA submit and wait methods

2020-09-20 Thread Serge Semin
-by: Serge Semin --- drivers/spi/spi-dw-dma.c | 35 +-- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/drivers/spi/spi-dw-dma.c b/drivers/spi/spi-dw-dma.c index 935f073a3523..f333c2e23bf6 100644 --- a/drivers/spi/spi-dw-dma.c +++ b/drivers/spi/spi-dw-dma.c

[PATCH v2 00/11] spi: dw-dma: Add max SG entries burst capability support

2020-09-20 Thread Serge Semin
on submission errors. - Split the patch "spi: dw-dma: Move DMA transfers submission to the channels prep methods" up into a series of more simple commits. Signed-off-by: Serge Semin Cc: Alexey Malahov Cc: Georgy Vlasov Cc: Ramil Zaripov Cc: Pavel Parkhomenko Cc: Peter Ujfalusi

[PATCH v2 05/11] spi: dw-dma: Move DMA transfers submission to the channels prep methods

2020-09-20 Thread Serge Semin
), third we make the generic transfer method more readable, where now the functionality of submission, execution and wait procedures is transparently split up instead of having a preparation, intermixed submission/execution and wait procedures. Signed-off-by: Serge Semin --- drivers/spi/spi-dw-dma.c

[PATCH v2 01/11] spi: dw-dma: Set DMA Level registers on init

2020-09-20 Thread Serge Semin
initialization up a bit, particularly if the APB bus is relatively slow. Signed-off-by: Serge Semin --- drivers/spi/spi-dw-dma.c | 28 +--- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/drivers/spi/spi-dw-dma.c b/drivers/spi/spi-dw-dma.c index bb390ff67d1d

[PATCH v2 07/11] spi: dw-dma: Remove DMA Tx-desc passing around

2020-09-20 Thread Serge Semin
It's pointless to pass the Rx and Tx transfers DMA Tx-descriptors, since they are used in the Tx/Rx submit method only. Instead just return the submission status from these methods. This alteration will make the code less complex. Signed-off-by: Serge Semin --- drivers/spi/spi-dw-dma.c | 31

[PATCH v2 06/11] spi: dw-dma: Check DMA Tx-desc submission status

2020-09-20 Thread Serge Semin
and get into an unpredictable driver behaviour. Signed-off-by: Serge Semin --- Changelog v2: - Replace negative conditional statements with the positive ones. - Terminate the prepared descriptors on submission errors. --- drivers/spi/spi-dw-dma.c | 20 ++-- 1 file changed, 18

[PATCH v2 08/11] spi: dw-dma: Detach DMA transfer into a dedicated method

2020-09-20 Thread Serge Semin
an unlimited number SG entries or Tx-only SPI transfer is requested. But currently just use it for any SPI transfer. Signed-off-by: Serge Semin --- drivers/spi/spi-dw-dma.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi-dw-dma.c b/drivers/spi/spi-dw-dma.c

[PATCH v2 09/11] spi: dw-dma: Move DMAC register cleanup to DMA transfer method

2020-09-20 Thread Serge Semin
er cleanup to a single place in the dw_spi_dma_transfer_all() method. Signed-off-by: Serge Semin --- drivers/spi/spi-dw-dma.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/drivers/spi/spi-dw-dma.c b/drivers/spi/spi-dw-dma.c index f2baefcae9ae..935f073a3

[PATCH 01/30] spi: dw: Discard IRQ threshold macro

2020-09-20 Thread Serge Semin
The macro has been unused since a half of FIFO length was defined to be a marker of the IRQ. Let's remove it definition. Signed-off-by: Serge Semin --- drivers/spi/spi-dw.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/spi/spi-dw.h b/drivers/spi/spi-dw.h index 90dfd21622d6

[PATCH 12/30] spi: dw: Detach SPI device specific CR0 config method

2020-09-20 Thread Serge Semin
of setting it up. By doing so we'll finally make the SPI device chip_data serving as it's supposed to - to preserve the SPI device specific DW SPI configuration. See spi-fsl-dspi.c, spi-pl022.c, spi-pxa2xx.c drivers for example of the way the chip data is utilized. Signed-off-by: Serge Semin

[PATCH 07/30] spi: dw: Use relaxed IO-methods to access FIFOs

2020-09-20 Thread Serge Semin
RIERS", Documentation/memory-barriers.txt, Section "KERNEL I/O BARRIER EFFECTS" Signed-off-by: Serge Semin --- drivers/spi/spi-dw.h | 18 -- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/drivers/spi/spi-dw.h b/drivers/spi/spi-dw.h index ff77f3

[PATCH 10/30] spi: dw: Add KeemBay Master capability

2020-09-20 Thread Serge Semin
, which would be activated by means of the dedicated DW_SPI_CAP_KEEMBAY_MST capability setup. Note this will be also useful if the driver will be ever altered to support the DW SPI slave interface. Signed-off-by: Serge Semin --- drivers/spi/spi-dw-core.c | 4 drivers/spi/spi-dw-mmio.c | 20

[PATCH 03/30] spi: dw: Initialize n_bytes before the memory barrier

2020-09-20 Thread Serge Semin
Since n_bytes field of the DW SPI private data is also utilized by the IRQ handler, we need to make sure it' initialization is done before the memory barrier. Signed-off-by: Serge Semin --- drivers/spi/spi-dw-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi

[PATCH 09/30] spi: dw: Convert CS-override to DW SPI capabilities

2020-09-20 Thread Serge Semin
the generic DW SPI controller driver up in accordance with the particular controller specifics. It's done by converting a simple Alpine-specific CS-override capability into the DW SPI controller capability activated by setting the DW_SPI_CAP_CS_OVERRIDE flag. Signed-off-by: Serge Semin --- drivers

[PATCH 00/30] spi: dw: Add full Baikal-T1 SPI Controllers support

2020-09-20 Thread Serge Semin
responding patch for details. Link: https://lore.kernel.org/linux-spi/20200508093621.31619-1-sergey.se...@baikalelectronics.ru/ [1] "LINUX KERNEL MEMORY BARRIERS", Documentation/memory-barriers.txt, Section "KERNEL I/O BARRIER EFFECTS" Signed-off-by: Serge Semin Cc: Alexey

[PATCH 02/30] spi: dw: Use ternary op to init set_cs callback

2020-09-20 Thread Serge Semin
Simplify the dw_spi_add_host() method a bit by replacing the set_cs callback overwrite procedure with direct setting the callback if a custom version of one is specified. Signed-off-by: Serge Semin --- drivers/spi/spi-dw-core.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff

[PATCH 14/30] spi: dw: Simplify the SPI bus speed config procedure

2020-09-20 Thread Serge Semin
procedure by removing the clock-related fields from the peripheral chip data and update the DW SPI clock divider only if it's really changed. The later change is reached by keeping the effective SPI bus speed in the internal DW SPI private data. Signed-off-by: Serge Semin --- drivers/spi/spi-dw

[PATCH 08/30] spi: dw: Discard DW SSI chip type storages

2020-09-20 Thread Serge Semin
APB SSI controller and the SPI peripheral device private data. Note we'll preserve the explicit SSI_MOTO_SPI interface type setting up to signify the only currently supported interface protocol. Signed-off-by: Serge Semin --- drivers/spi/spi-dw-core.c | 6 ++ drivers/spi/spi-dw.h | 1

[PATCH 16/30] spi: dw: Add DW SPI controller config structure

2020-09-20 Thread Serge Semin
driver, but by the glue layer drivers too. This will be required in a coming further commit. Signed-off-by: Serge Semin --- drivers/spi/spi-dw-core.c | 29 + drivers/spi/spi-dw.h | 10 ++ 2 files changed, 27 insertions(+), 12 deletions(-) diff --git

[PATCH 27/30] spi: dw: Introduce max mem-ops SPI bus frequency setting

2020-09-20 Thread Serge Semin
applicable for the memory operations, since the standard SPI core interface is implemented with an assumption that there is no problem with the automatic CS toggling. Signed-off-by: Serge Semin --- drivers/spi/spi-dw-core.c | 4 +++- drivers/spi/spi-dw.h | 1 + 2 files changed, 4 insertions(+), 1

[PATCH 18/30] spi: dw: Refactor IRQ-based SPI transfer procedure

2020-09-20 Thread Serge Semin
is sent out, we'll disable the Tx FIFO Empty IRQ. If there is still some data to receive, we'll adjust the Rx FIFO Threshold level, so the next IRQ would be raised at the moment of all incoming data being available in the Rx FIFO. Signed-off-by: Serge Semin --- drivers/spi/spi-dw-core.c | 33

[PATCH 19/30] spi: dw: Perform IRQ setup in a dedicated function

2020-09-20 Thread Serge Semin
one. Signed-off-by: Serge Semin --- drivers/spi/spi-dw-core.c | 41 ++- 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/drivers/spi/spi-dw-core.c b/drivers/spi/spi-dw-core.c index 682463b2f68b..08bc53b9de88 100644 --- a/drivers/spi/spi-dw-core.c

[PATCH 05/30] spi: dw: Clear IRQ status on DW SPI controller reset

2020-09-20 Thread Serge Semin
in the dedicated controller reset method. Signed-off-by: Serge Semin --- drivers/spi/spi-dw.h | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/spi/spi-dw.h b/drivers/spi/spi-dw.h index 1ab704d1ebd8..ff77f39047ce 100644 --- a/drivers/spi/spi-dw.h +++ b/drivers/spi

[PATCH 17/30] spi: dw: Refactor data IO procedure

2020-09-20 Thread Serge Semin
and there in the tx_max(), rx_max(), dw_writer() and dw_reader() methods. Such modification will not only give us the more optimized IO procedures, but will make the data IO methods much more readable than before. Signed-off-by: Serge Semin --- drivers/spi/spi-dw-core.c | 37

[PATCH 22/30] spi: dw: De-assert chip-select on reset

2020-09-20 Thread Serge Semin
in case of an error or having the CS left set by a bootloader or another software. Signed-off-by: Serge Semin --- drivers/spi/spi-dw.h | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/spi/spi-dw.h b/drivers/spi/spi-dw.h index cfc9f63acde4..eb1d46983319 100644

[PATCH 29/30] dt-bindings: spi: dw: Add Baikal-T1 SPI Controllers

2020-09-20 Thread Serge Semin
-off-by: Serge Semin --- .../bindings/spi/snps,dw-apb-ssi.yaml | 33 +-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml b/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml index c62cbe79f00d

[PATCH 13/30] spi: dw: Update SPI bus speed in a config function

2020-09-20 Thread Serge Semin
to have a generic function name not related to CR0. Leave the too long line with the chip->clk_div setting as is for now, since it's going to be changed later anyway. Signed-off-by: Serge Semin --- drivers/spi/spi-dw-core.c | 28 ++-- 1 file changed, 14 insertions(+),

[PATCH 26/30] spi: dw: Add memory operations support

2020-09-20 Thread Serge Semin
controller with fixed automatic CS toggle functionality. Co-developed-by: Ramil Zaripov Signed-off-by: Ramil Zaripov Signed-off-by: Serge Semin --- drivers/spi/Kconfig | 1 + drivers/spi/spi-dw-core.c | 300 ++ drivers/spi/spi-dw.h | 13 ++ 3 files

[PATCH 24/30] spi: dw: Move num-of retries parameter to the header file

2020-09-20 Thread Serge Semin
The parameter will be needed for another wait-done method being added in the framework of the SPI memory operation modification in a further commit. Signed-off-by: Serge Semin --- drivers/spi/spi-dw-dma.c | 5 ++--- drivers/spi/spi-dw.h | 2 ++ 2 files changed, 4 insertions(+), 3 deletions

[PATCH 23/30] spi: dw: Explicitly de-assert CS on SPI transfer completion

2020-09-20 Thread Serge Semin
that. We'll also need a way to explicitly set and clear the corresponding CS bit at a certain moment of the operation. Let's alter the set_cs function then to also de-activate the CS, when it's required. Signed-off-by: Serge Semin --- drivers/spi/spi-dw-core.c | 2 +- 1 file changed, 1 insertion

[PATCH 28/30] spi: dw: Add poll-based SPI transfers support

2020-09-20 Thread Serge Semin
t iteration. Finally the errors status is checked on each iteration. Signed-off-by: Serge Semin --- drivers/spi/spi-dw-core.c | 40 ++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/drivers/spi/spi-dw-core.c b/drivers/spi/spi-dw-core.c index 7b9012

[PATCH 20/30] spi: dw: Unmask IRQs after enabling the chip

2020-09-20 Thread Serge Semin
st in case... Signed-off-by: Serge Semin --- drivers/spi/spi-dw-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi-dw-core.c b/drivers/spi/spi-dw-core.c index 08bc53b9de88..8dbe11c1821c 100644 --- a/drivers/spi/spi-dw-core.c +++ b/drivers/spi/spi

[PATCH 04/30] Revert: spi: spi-dw: Add lock protect dw_spi rx/tx to prevent concurrent calls

2020-09-20 Thread Serge Semin
by the data transfer algorithm implementation: first we initialize the buffers pointers, then make sure the assignments are visible by the other CPUs by calling the smp_mb(), only after that enable the interrupt, which handler uses the buffers. Signed-off-by: Serge Semin --- Folks. I have also a doubt

[PATCH 06/30] spi: dw: Disable all IRQs when controller is unused

2020-09-20 Thread Serge Semin
and when there is no SPI message currently being processed. Signed-off-by: Serge Semin --- drivers/spi/spi-dw-core.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/spi/spi-dw-core.c b/drivers/spi/spi-dw-core.c index 18411f5b9954..be94ed5bb896 100644

[PATCH 25/30] spi: dw: Add generic DW SSI status-check method

2020-09-20 Thread Serge Semin
of the new method to detect the errors in the IRQ- and DMA-based SPI transfer execution procedures. Signed-off-by: Serge Semin --- drivers/spi/spi-dw-core.c | 43 +++ drivers/spi/spi-dw-dma.c | 11 ++ drivers/spi/spi-dw.h | 1 + 3 files changed, 37

[PATCH 15/30] spi: dw: Update Rx sample delay in the config function

2020-09-20 Thread Serge Semin
Rx sample delay can be SPI device specific, and should be synchronously initialized with the rest of the communication and peripheral device related controller setups. So let's move the Rx-sample delay setup into the DW APB SSI configuration update method. Signed-off-by: Serge Semin --- drivers

[PATCH 21/30] spi: dw: Discard chip enabling on DMA setup error

2020-09-20 Thread Serge Semin
returned from the dma_setup callback to be erroneous as it's supposed to be in the kernel. Signed-off-by: Serge Semin --- drivers/spi/spi-dw-core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/spi/spi-dw-core.c b/drivers/spi/spi-dw-core.c index 8dbe11c1821c

[PATCH 11/30] spi: dw: Add DWC SSI capability

2020-09-20 Thread Serge Semin
in mind let's discard the update_cr0() callbacks, define a generic and static dw_spi_update_cr0() method and create the DW_SPI_CAP_DWC_SSI capability, which when enabled would activate the alternative CR0 register layout. Signed-off-by: Serge Semin --- drivers/spi/spi-dw-core.c | 69

[PATCH 30/30] spi: dw: Add Baikal-T1 SPI Controller glue driver

2020-09-20 Thread Serge Semin
of the DW SPI core module. Co-developed-by: Ramil Zaripov Signed-off-by: Ramil Zaripov Signed-off-by: Serge Semin --- drivers/spi/Kconfig | 28 drivers/spi/Makefile | 1 + drivers/spi/spi-dw-bt1.c | 339 +++ 3 files changed, 368 insertions

Re: [PATCH 0/3] usb: dwc3: ulpi: Fix UPLI registers read/write ops

2020-10-27 Thread Serge Semin
On Tue, Oct 27, 2020 at 11:13:14AM +0200, Felipe Balbi wrote: > Serge Semin writes: > > > Our Baikal-T1 SoC is equipped with DWC USB3 IP core as a USB2.0 bus > > controller. In general the DWC USB3 driver is working well for it except > > the ULPI-bus part. We've found ou

Re: [PATCH 1/3] usb: dwc3: ulpi: Use VStsDone to detect PHY regs access completion

2020-10-27 Thread Serge Semin
On Tue, Oct 27, 2020 at 11:15:24AM +0200, Felipe Balbi wrote: > > Hi, > > Serge Semin writes: > > > In accordance with [1] the DWC_usb3 core sets the GUSB2PHYACCn.VStsDone > > bit when the PHY vendor control access is done and clears it when the > > applic

Re: [PATCH 2/3] usb: dwc3: ulpi: Replace CPU-based busyloop with Protocol-based one

2020-10-27 Thread Serge Semin
On Tue, Oct 27, 2020 at 11:18:51AM +0200, Felipe Balbi wrote: > > Hi, > > Serge Semin writes: > > > Originally the procedure of the ULPI transaction finish detection has been > > developed as a simple busy-loop with just decrementing counter and no > > dela

Re: [PATCH] spi: Limit the spi device max speed to controller's max speed

2020-12-09 Thread Serge Semin
Hello Tudor, On Wed, Dec 09, 2020 at 07:35:14PM +0200, Tudor Ambarus wrote: > Make sure the max_speed_hz of spi_device does not override > the max_speed_hz of controller. I have doubts that's right thing to do. It seems better to let the controller driver to handle the speed clamping itself,

Re: [PATCH] spi: Limit the spi device max speed to controller's max speed

2020-12-09 Thread Serge Semin
On Wed, Dec 09, 2020 at 07:54:20PM +, Mark Brown wrote: > On Wed, Dec 09, 2020 at 10:46:36PM +0300, Serge Semin wrote: > > > On Wed, Dec 09, 2020 at 07:35:14PM +0200, Tudor Ambarus wrote: > > > > Make sure the max_speed_hz of spi_device does not override > > &g

Re: [PATCH] spi: Limit the spi device max speed to controller's max speed

2020-12-09 Thread Serge Semin
On Wed, Dec 09, 2020 at 08:25:52PM +, Mark Brown wrote: > On Wed, Dec 09, 2020 at 11:15:35PM +0300, Serge Semin wrote: > > On Wed, Dec 09, 2020 at 07:54:20PM +, Mark Brown wrote: > > > > Right, in general we aim to do this sort of fixup on the transfers > >

[PATCH v5 1/3] usb: dwc3: ulpi: Use VStsDone to detect PHY regs access completion

2020-12-10 Thread Serge Semin
, 2.70a, December 2013, p.388 Fixes: 88bc9d194ff6 ("usb: dwc3: add ULPI interface support") Signed-off-by: Serge Semin Acked-by: Heikki Krogerus --- Changelog v3: - Add Fixes tag to the commit log. --- drivers/usb/dwc3/core.h | 1 + drivers/usb/dwc3/ulpi.c | 2 +- 2 files changed, 2

[PATCH RESEND v5 0/3] usb: dwc3: ulpi: Fix UPLI registers read/write ops

2020-12-10 Thread Serge Semin
usb: dwc3: ulpi: conditionally resume ULPI PHY") Fixes: 88bc9d194ff6 ("usb: dwc3: add ULPI interface support") Signed-off-by: Serge Semin Acked-by: Heikki Krogerus Cc: Alexey Malahov Cc: Pavel Parkhomenko Cc: linux-...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Serge Semin (3):

[PATCH v5 3/3] usb: dwc3: ulpi: Fix USB2.0 HS/FS/LS PHY suspend regression

2020-12-10 Thread Serge Semin
tionally resume ULPI PHY") Signed-off-by: Serge Semin Acked-by: Heikki Krogerus --- drivers/usb/dwc3/ulpi.c | 18 +- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/drivers/usb/dwc3/ulpi.c b/drivers/usb/dwc3/ulpi.c index 54c877f7b51d..f23f4c9a557e 100644 --

[PATCH v5 2/3] usb: dwc3: ulpi: Replace CPU-based busyloop with Protocol-based one

2020-12-10 Thread Serge Semin
, 2004, pp. 30 - 36. Fixes: 88bc9d194ff6 ("usb: dwc3: add ULPI interface support") Signed-off-by: Serge Semin Acked-by: Heikki Krogerus --- drivers/usb/dwc3/ulpi.c | 18 +++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/drivers/usb/dwc3/ulpi.c b/driver

[PATCH v6 01/19] dt-bindings: usb: usb-hcd: Detach generic USB controller properties

2020-12-10 Thread Serge Semin
an explicit "additionalProperties: true" into the usb-hcd.yaml as setting the additionalProperties/unevaluateProperties properties is going to be get mandatory soon. Signed-off-by: Serge Semin Reviewed-by: Rob Herring --- Changelog v4: - This is a new patch created as a result of the co

[PATCH v6 04/19] dt-bindings: usb: Add "ulpi/serial/hsic" PHY types

2020-12-10 Thread Serge Semin
Aside from the UTMI+ there are also ULPI, Serial and HSIC PHY types that can be specified in the phy_type HCD property. Add them to the enumeration of the acceptable values. Signed-off-by: Serge Semin Reviewed-by: Rob Herring --- Changelog v2: - Grammar fix: "s/PHY types can be/PHY

[PATCH v6 00/19] dt-bindings: usb: Add generic USB HCD, xHCI, DWC USB3 DT schema

2020-12-10 Thread Serge Semin
.org/linux-usb/20201205152427.29537-1-sergey.se...@baikalelectronics.ru Changelog v6: - Fix typo in the commit log: [PATCH v5 19/19] dt-bindings: usb: intel,keembay-dwc3: Validate DWC3 sub-node Qualcomm sub-node should be called as Intel eem Bay sub-node. - Fix identations in the "usb-phy&

[PATCH v6 10/19] dt-bindings: usb: Convert DWC USB3 bindings to DT schema

2020-12-10 Thread Serge Semin
k-related properties are marked as optional to match the DWC USB3 driver expectation and to improve the bindings mainainability so in case if there is a glue-node it would the responsible for the clocks initialization. Signed-off-by: Serge Semin Reviewed-by: Rob Herring --- Changelog v2

[PATCH v6 12/19] dt-bindings: usb: dwc3: Add synopsys,dwc3 compatible string

2020-12-10 Thread Serge Semin
opsys, Inc. is presented with just "snps" vendor prefix. Signed-off-by: Serge Semin Reviewed-by: Rob Herring --- Changelog v2: - Drop quotes from around the compat string constant. Changelog v4: - Get the patch back, since we can't discard the deprecated prefix from the driver

[PATCH v6 15/19] dt-bindings: usb: meson-g12a-usb: Fix FL-adj property value

2020-12-10 Thread Serge Semin
. Link: https://lore.kernel.org/linux-usb/20201010224121.12672-16-sergey.se...@baikalelectronics.ru/ Signed-off-by: Serge Semin Acked-by: Neil Armstrong Reviewed-by: Rob Herring Reviewed-by: Martin Blumenstingl --- Note the same problem is in the DT source file arch/arm64/boot/dts/amlogic/meson

[PATCH v6 09/19] dt-bindings: usb: renesas-xhci: Refer to the usb-xhci.yaml file

2020-12-10 Thread Serge Semin
With minor peculiarities (like uploading some vendor-specific firmware) these are just Generic xHCI controllers fully compatible with its properties. Make sure the Renesas USB xHCI DT nodes are also validated against the Generic xHCI DT schema. Signed-off-by: Serge Semin Reviewed-by: Rob Herring

[PATCH v6 07/19] dt-bindings: usb: Convert xHCI bindings to DT schema

2020-12-10 Thread Serge Semin
, single interrupts source, and is supposed to optionally contain up to two reference clocks for the controller core and CSRs. Signed-off-by: Serge Semin Reviewed-by: Rob Herring --- Changelog v2: - Add explicit "additionalProperties: true" to the usb-xhci.yaml schema, since additional

[PATCH v6 05/19] dt-bindings: usb: usb-hcd: Add "tpl-support" property

2020-12-10 Thread Serge Semin
The host controller device might be designed to work for the particular products or applications. In that case its DT node is supposed to be equipped with the tpl-support property. Signed-off-by: Serge Semin Reviewed-by: Rob Herring --- Changelog v2: - Grammar fix: "s/it'/its"

[PATCH v6 06/19] dt-bindings: usb: Add generic "usb-phy" property

2020-12-10 Thread Serge Semin
d in the generic USB HCD binding file so it would be validated against the nodes in which it's specified. Mark the property as deprecated to discourage the developers from using it. Signed-off-by: Serge Semin Acked-by: Martin Blumenstingl Reviewed-by: Rob Herring --- Changelog v2: - Discard '

[PATCH v6 13/19] dt-bindings: usb: dwc3: Add Tx De-emphasis constraints

2020-12-10 Thread Serge Semin
In accordance with the driver comments the PIPE3 de-emphasis can be tuned to be either -6dB, -2.5dB or disabled. Let's add the de-emphasis property constraints so the DT schema would make sure the controller DT node is equipped with correct value. Signed-off-by: Serge Semin Reviewed-by: Rob

[PATCH v6 08/19] dt-bindings: usb: xhci: Add Broadcom STB v2 compatible device

2020-12-10 Thread Serge Semin
For some reason the "brcm,xhci-brcm-v2" compatible string has been missing in the original bindings file. Add it to the Generic xHCI Controllers DT schema since the controller driver expects it to be supported. Signed-off-by: Serge Semin Acked-by: Florian Fainelli Reviewed-by: R

[PATCH v6 11/19] dt-bindings: usb: dwc3: Add interrupt-names property support

2020-12-10 Thread Serge Semin
The controller driver supports two types of DWC USB3 devices: with a common interrupt lane and with individual interrupts for each mode. Add support for both these cases to the DWC USB3 DT schema. Signed-off-by: Serge Semin Reviewed-by: Rob Herring --- Changelog v2: - Grammar fix: "s

[PATCH v6 18/19] dt-bindings: usb: qcom,dwc3: Validate DWC3 sub-node

2020-12-10 Thread Serge Semin
to be named as generic USB HCD ("^usb(@.*)?") one we have to accordingly fix the sub-nodes name regexp and fix the DT node example. Signed-off-by: Serge Semin Reviewed-by: Rob Herring --- Changelog v2: - Discard the "^dwc3@[0-9a-f]+$" nodes from being acceptable as sub-nodes

[PATCH v6 16/19] dt-bindings: usb: meson-g12a-usb: Validate DWC2/DWC3 sub-nodes

2020-12-10 Thread Serge Semin
Amlogic G12A USB DT sub-nodes are supposed to be compatible with the generic DWC USB2 and USB3 devices. Since now we've got DT schemas for both of the later IP cores let's make sure that the Amlogic G12A USB DT nodes are fully evaluated including the DWC sub-nodes. Signed-off-by: Serge Semin

[PATCH v6 17/19] dt-bindings: usb: keystone-dwc3: Validate DWC3 sub-node

2020-12-10 Thread Serge Semin
TI Keystone DWC3 compatible DT node is supposed to have a DWC USB3 compatible sub-node to describe a fully functioning USB interface. Since DWC USB3 has now got a DT schema describing its DT node, let's make sure the TI Keystone DWC3 sub-node passes validation against it. Signed-off-by: Serge

[PATCH v6 19/19] dt-bindings: usb: intel,keembay-dwc3: Validate DWC3 sub-node

2020-12-10 Thread Serge Semin
as generic USB HCD ("^usb(@.*)?") one we have to accordingly fix the sub-nodes name regexp and fix the DT node example. Signed-off-by: Serge Semin Acked-by: Wan Ahmad Zainie Reviewed-by: Rob Herring --- Changelog v5: - This is a new patch created for the new Intel Keem Bay bindings fil

[PATCH v6 14/19] dt-bindings: usb: dwc3: Add Frame Length Adj constraints

2020-12-10 Thread Serge Semin
In accordance with the IP core databook the snps,quirk-frame-length-adjustment property can be set within [0, 0x3F]. Let's make sure the DT schema applies a correct constraints on the property. Signed-off-by: Serge Semin Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/usb/snps

[PATCH v6 03/19] dt-bindings: usb: usb-drd: Add "otg-rev" property constraints

2020-12-10 Thread Serge Semin
There are only four OTG revisions are currently supported by the kernel: 0x0100, 0x0120, 0x0130, 0x0200. Any another value is considered as invalid. Signed-off-by: Serge Semin Reviewed-by: Rob Herring --- Changelog v4: - Move the constraints to the usb-drd.yaml schema where the otg-rev

[PATCH v6 02/19] dt-bindings: usb: Convert generic USB properties to DT schemas

2020-12-10 Thread Serge Semin
- for the generic USB Host controllers and the USB DRD - for the USB Dual-role controllers. Note the USB DRD schema is supposed to work in conjunction with the USB peripheral/gadget and USB host controllers DT schemas. Signed-off-by: Serge Semin Reviewed-by: Rob Herring --- Changelog v2: - Discard

[PATCH v4 02/10] arm64: dts: amlogic: meson-g12: Set FL-adj property value

2020-12-10 Thread Serge Semin
://lore.kernel.org/linux-usb/20201010224121.12672-16-sergey.se...@baikalelectronics.ru/ Signed-off-by: Serge Semin Reviewed-by: Martin Blumenstingl Reviewed-by: Neil Armstrong Reviewed-by: Krzysztof Kozlowski --- arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH v4 04/10] arm: dts: lpc18xx: Harmonize EHCI/OHCI DT nodes name

2020-12-10 Thread Serge Semin
ic-ohci"-compatible nodes are correctly named. Signed-off-by: Serge Semin Acked-by: Vladimir Zapolskiy Acked-by: Krzysztof Kozlowski --- arch/arm/boot/dts/lpc18xx.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/lpc18xx.dtsi b/arch/arm/boot/dts/l

[PATCH v4 03/10] arc: dts: Harmonize EHCI/OHCI DT nodes name

2020-12-10 Thread Serge Semin
ic-ohci"-compatible nodes are correctly named. Signed-off-by: Serge Semin Acked-by: Alexey Brodkin Acked-by: Krzysztof Kozlowski --- arch/arc/boot/dts/axc003.dtsi| 4 ++-- arch/arc/boot/dts/axc003_idu.dtsi| 4 ++-- arch/arc/boot/dts/axs10x_mb.dtsi | 4 ++-- arch/arc/boot/dts/hsdk.dt

[PATCH RESEND v4 00/10] dt-bindings: usb: Harmonize xHCI/EHCI/OHCI/DWC3 nodes name

2020-12-10 Thread Serge Semin
: linux-st...@st-md-mailman.stormreply.com Cc: linux-arm-ker...@lists.infradead.org Cc: linux-m...@vger.kernel.org Cc: linux-media...@lists.infradead.org Cc: linuxppc-...@lists.ozlabs.org Cc: linux-samsung-...@vger.kernel.org Cc: linux-o...@vger.kernel.org Cc: linux-arm-...@vger.kernel.org Cc: devicet...@vger.

[PATCH v4 06/10] arm: dts: keystone: Harmonize DWC USB3 DT nodes name

2020-12-10 Thread Serge Semin
In accordance with the DWC USB3 bindings the corresponding node name is suppose to comply with the Generic USB HCD DT schema, which requires the USB nodes to have the name acceptable by the regexp: "^usb(@.*)?" . Make sure the "snps,dwc3"-compatible nodes are correctly named.

<    2   3   4   5   6   7   8   9   10   11   >