summaryrefslogtreecommitdiff
path: root/drivers/i3c/master
AgeCommit message (Collapse)AuthorFilesLines
2022-05-20i3c: dw: master: Enable PEC support in hardwareZbigniew Lukwinski1-0/+6
DWC MIPI I3C Controller supports automatic PEC generation and validation for private write and read SDR transfers. This feature could be used for upper layers, e.g. MCTP over I3C to offload PEC handling to the hardware. PEC supported by DWC MIPI I3C Controller is described in JESD403-1. Signed-off-by: Zbigniew Lukwinski <zbigniew.lukwinski@linux.intel.com>
2022-05-12Merge commit '49caedb668e476c100d727f2174724e0610a2b92' of ↵Sujoy Ray2-3/+5
https://github.com/openbmc/linux into openbmc/dev-5.15-intel-bump_v5.15.36 Signed-off-by: Sujoy Ray <sujoy.ray@intel.com>
2022-04-19i3c: master: dw: Update read transfer lengthIwona Winiarska1-0/+7
Currently, the read transfer length is not updated with the actual number of read bytes, which means that the caller won't have this information and won't be able to distinguish real data obtained during transfer. For every successful read transfer, update its length. Signed-off-by: Iwona Winiarska <iwona.winiarska@intel.com>
2022-04-12i3c: master: dw: Implement I3C target functionsIwona Winiarska1-35/+271
Add support for Synopsys DesignWare I3C Target functionality. Signed-off-by: Iwona Winiarska <iwona.winiarska@intel.com>
2022-03-14i3c: dw: master: flexible I3C timing controlZbigniew Lukwinski1-10/+361
Enabling mechanism which allows user to control I3C timings with details. It is done over DT. The following options are possible: * 'i3c-od-scl-low-ns' - to control SCL low period I3C Open Drain mode, example: i3c-od-scl-low-ns = <250>; * 'i3c-od-scl-high-ns' - to control SCL high period I3C Open Drain mode, example: i3c-od-scl-high-ns = <40>; * 'i3c-pp-scl-low-ns' - to control SCL low period I3C Push-Pull mode, example: i3c-pp-scl-low-ns = <100>; * 'i3c-pp-scl-high-ns' - to control SCL high period I3C Push-Pull mode, example: i3c-pp-scl-low-ns = <200>; * 'sda-tx-hold-ns' - to control hold time of the transmit data (SDA) with respect to the SCL edge, example: sda-tx-hold-ns = <15>; All values shall be provided in nanoseconds. Driver does necessary validation against limits documented in I3C MIPI specification. Driver also does the calculation in case only low, only high period or none of them are provided. DT SCL clock value parameters ('i2c-scl-hz', 'i3c-scl-hz') are also taken into account during the calculation. For instance if user provides 'i3c-od-scl-low-ns' and 'i2c-scl-hz', driver calculates SCL high period or reports an error if it is not possible. If user provides only 'i2c-scl-hz', driver calculates SCL low and high periods. If user provides all of these parameters, driver does the validation and reports an error in case parameters values does not match. Signed-off-by: Zbigniew Lukwinski <zbigniew.lukwinski@linux.intel.com>
2022-03-14i3c: dw: master: revert timing related changesZbigniew Lukwinski1-66/+14
Reverting previous SCL timing configuration which is not in upstream. commit 5562262f4e5d ("Update I3C drivers") Signed-off-by: Zbigniew Lukwinski <zbigniew.lukwinski@linux.intel.com>
2022-03-08i3c: master: dw: check return of dw_i3c_master_get_free_pos()Tom Rix1-0/+4
[ Upstream commit 13462ba1815db5a96891293a9cfaa2451f7bd623 ] Clang static analysis reports this problem dw-i3c-master.c:799:9: warning: The result of the left shift is undefined because the left operand is negative COMMAND_PORT_DEV_INDEX(pos) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ pos can be negative because dw_i3c_master_get_free_pos() can return an error. So check for an error. Fixes: 1dd728f5d4d4 ("i3c: master: Add driver for Synopsys DesignWare IP") Signed-off-by: Tom Rix <trix@redhat.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20220108150948.3988790-1-trix@redhat.com Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-03-08i3c/master/mipi-i3c-hci: Fix a potentially infinite loop in ↵Christophe JAILLET1-3/+1
'hci_dat_v1_get_index()' [ Upstream commit 3f43926f271287fb1744c9ac9ae1122497f2b0c2 ] The code in 'hci_dat_v1_get_index()' really looks like a hand coded version of 'for_each_set_bit()', except that a +1 is missing when searching for the next set bit. This really looks odd and it seems that it will loop until 'dat_w0_read()' returns the expected result. So use 'for_each_set_bit()' instead. It is less verbose and should be more correct. Fixes: 9ad9a52cce28 ("i3c/master: introduce the mipi-i3c-hci driver") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Acked-by: Nicolas Pitre <npitre@baylibre.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/0cdf3cb10293ead1acd271fdb8a70369c298c082.1637186628.git.christophe.jaillet@wanadoo.fr Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-03-03i3c: master: dw: Set IBI_WITH_DATA based on Target's BCR[2] bitIwona Winiarska1-1/+2
The Active Controller should set the IBI Payload Control to 1 only when the Target device supports the mandatory byte (BCR[2]=1). Otherwise, when the Target device doesn't support MDB (BCR[2]=0), the IBI Payload Control bit should set to 0. Fixes: ee31c3564a25 ("i3c: master: dw: add IBI support") Signed-off-by: Iwona Winiarska <iwona.winiarska@intel.com>
2022-01-10i3c: dw: master: Fix IBI readingIwona Winiarska1-3/+1
dw_i3c_master_read_fifo() uses readsl() that allows to read all requested data and writes it to the given buffer. Calling it in a loop may cause the data to be overwritten. Signed-off-by: Iwona Winiarska <iwona.winiarska@intel.com>
2022-01-10i3c: master: dw: Set dw_i3c_master.devIwona Winiarska1-0/+2
dw_i3c_master.dev is not initialized, which can be observed in logs: [246977.695838] (NULL device *): no matching dev Set dw_i3c_master.dev in probe time to avoid using it as a NULL. Signed-off-by: Iwona Winiarska <iwona.winiarska@intel.com>
2022-01-10i3c: master: dw: Enable IBI starting from LC releaseIwona Winiarska1-11/+25
The current implementation of IBI handling on DW controller expects that the HW supports MDB/payload. This support is not available for older hardware releases. Let's enable IBI support only for hardware versions that support it. Signed-off-by: Iwona Winiarska <iwona.winiarska@intel.com>
2022-01-10Revert "iklimasz/i3c-fixups (#1)"Iwona Winiarska1-28/+14
This reverts commit aaccb149bfa6ff74dc8e9ff043191730060002db. A series of commits were unintentionally squashed. Signed-off-by: Iwona Winiarska <iwona.winiarska@intel.com>
2022-01-06iklimasz/i3c-fixups (#1)Iwona Winiarska1-14/+28
* i3c: master: dw: Enable IBI starting from LC release The current implementation of IBI handling on DW controller expects that the HW supports MDB/payload. This support is not available for older hardware releases. Let's enable IBI support only for hardware versions that support it. Signed-off-by: Iwona Winiarska <iwona.winiarska@intel.com> * i3c: master: dw: Set dw_i3c_master.dev dw_i3c_master.dev is not initialized, which can be observed in logs: [246977.695838] (NULL device *): no matching dev Set dw_i3c_master.dev in probe time to avoid using it as a NULL. Signed-off-by: Iwona Winiarska <iwona.winiarska@intel.com> * i3c: dw: master: Fix IBI reading dw_i3c_master_read_fifo() uses readsl() that allows to read all requested data and writes it to the given buffer. Calling it in a loop may cause the data to be overwritten. Signed-off-by: Iwona Winiarska <iwona.winiarska@intel.com>
2021-11-24i3c: master: Remove aspeed-i3c-globalIwona Winiarska3-116/+0
Intel-BMC Linux fork doesn't use aspeed-i3c-global. Since it is not present upstream, remove it. Signed-off-by: Iwona Winiarska <iwona.winiarska@intel.com> Change-Id: I9718953aa2e85cbc3689373b6783e15b5faa93c0
2021-11-18i3c: master: dw: add IBI supportOleksandr Shulzhenko1-6/+288
i3c_master_controller_ops APIs were implemented in order to provide i3c drivers with interfaces to act upon IBI requests sent to dw i3c master devices The ASPEED implementation was used as a reference: https://github.com/AspeedTech-BMC/linux Change-Id: I4de28caffc10e099feaecc68e943e1a85224b346 Signed-off-by: Oleksandr Shulzhenko <oleksandr.shulzhenko.viktorovych@intel.com>
2021-11-05i3c: master: dw: Remove IBI_WIP codeOleksandr Shulzhenko1-47/+0
The IBI_WIP code is not used and not expected to be used in the future. Remove it. Change-Id: I6a3808c3808ab827c3ac326dbf1be244beffd6f6 Signed-off-by: Oleksandr Shulzhenko <oleksandr.shulzhenko.viktorovych@intel.com>
2021-11-05i3c: aspeed: fix a module probe errorJae Hyun Yoo1-14/+11
Modified the Aspeed global driver as a platform driver instead of a postcore initialized one to make it get a reset control resource properly while probing the module. To make it probed ahead of bus modules, it also modifies the object order in makefile. Change-Id: Icefb06c1a4548417aa09f53da5cb2f61ba6f8d09 Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
2021-11-05i3c: master: dw: Fix out of range writeWludzik, Jozef1-5/+8
Fixed out of range write by ignoring usage of CCC_WORKAROUND when DEVICE_ADDR_TABLE_POINTER register returns 0 value. It allows to use simulation software like QEMU where I3C may not be implemented and all its registers are set to zeros. Signed-off-by: Wludzik, Jozef <jozef.wludzik@intel.com>
2021-11-05Update I3C driversDylan Hung4-39/+307
This commit ports I3C updates from Aspeed SDK v00.06.00. Note: Should be refined to get upstreamed. Signed-off-by: Dylan Hung <dylan_hung@aspeedtech.com>
2021-11-05i3c: master: dw: fix probing failJae Hyun Yoo1-5/+5
This commit fixed module probing fail by moving irq enabling to just before the i3c_master_register. Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
2021-11-05i3c: master: dw: adjust irq enabling timingJae Hyun Yoo1-8/+8
This commit makes the driver call devm_request_irq when the driver is completely ready to handle interrupts. Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
2021-11-05enable AST2600 I3CJae Hyun Yoo3-0/+83
This commit ports I3C related changes from Aspeed SDK v00.05.05. It also includes Vitor's I3C cdev implementation which isn't upstreamed yet so it should be refined later. Signed-off-by: Ryan Chen <ryan_chen@aspeedtech.com> Signed-off-by: Vitor Soares <soares@synopsys.com> Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
2021-07-10Merge tag 'i3c/for-5.14' of ↵Linus Torvalds1-2/+1
git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux Pull i3c updates from Alexandre Belloni: - two small fixes to the svc driver * tag 'i3c/for-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux: i3c: master: svc: fix doc warning in svc-i3c-master.c i3c: master: svc: drop free_irq of devm_request_irq allocated irq
2021-06-29i3c: master: cdns: Fix fall-through warning for ClangGustavo A. R. Silva1-0/+2
In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
2021-06-09i3c: master: svc: fix doc warning in svc-i3c-master.cYang Yingliang1-1/+1
Fix the following make W=1 warning: drivers/i3c/master/svc-i3c-master.c:207: warning: expecting prototype for struct svc_i3c_i3c_dev_data. Prototype was for struct svc_i3c_i2c_dev_data instead Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20210602085544.4101980-1-yangyingliang@huawei.com
2021-06-09i3c: master: svc: drop free_irq of devm_request_irq allocated irqYang Yingliang1-1/+0
irq allocated with devm_request_irq() will be freed in devm_irq_release(), using free_irq() in ->remove() will causes a dangling pointer, and a subsequent double free. So remove the free_irq() in svc_i3c_master_remove(). Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20210602084935.3977636-1-yangyingliang@huawei.com
2021-03-09i3c: master: svc: remove redundant assignment to cmd->read_lenColin Ian King1-1/+0
The assignment of xfer_len to cmd->read_len appears to be redundant as the next statement re-assigns the value 0 to it. Clean up the code by removing the redundant first assignment. Addresses-Coverity: ("Unused value") Fixes: dd3c52846d59 ("i3c: master: svc: Add Silvaco I3C master driver") Signed-off-by: Colin Ian King <colin.king@canonical.com> Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20210224151349.202332-1-colin.king@canonical.com
2021-02-22Merge tag 'i3c/for-5.12' of ↵Linus Torvalds4-5/+1488
git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux Pull i3c update from Alexandre Belloni: "Subsystem: - Handle drivers without probe or remove callback - Remove callback now returns void - DT documentation is now in yaml New driver: - Silvaco I3C master" * tag 'i3c/for-5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux: i3c: master: dw: Drop redundant disec call MAINTAINERS: Add Silvaco I3C master i3c: master: svc: Add Silvaco I3C master driver dt-bindings: i3c: Describe Silvaco master binding dt-bindings: Add vendor prefix for Silvaco dt-bindings: i3c: mipi-hci: Include the bus binding dt-bindings: i3c: Convert the bus description to yaml i3c: Make remove callback return void i3c: Handle drivers without probe or remove callback i3c/master/mipi-i3c-hci: Specify HAS_IOMEM dependency
2021-02-06i3c: master: dw: Drop redundant disec callMiquel Raynal1-5/+0
Disabling all event calls is already handled by the core right before starting the DAA process. Do not do it again when the DAA process completes, it is redundant. Fixes: 1dd728f5d4d4 ("i3c: master: Add driver for Synopsys DesignWare IP") Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20201228105501.6104-1-miquel.raynal@bootlin.com
2021-02-06i3c: master: svc: Add Silvaco I3C master driverMiquel Raynal3-0/+1487
Add support for Silvaco I3C dual-role IP. The master role is supported in SDR mode only. I2C transfers have not been tested but are shared because they are very close to the I3C transfers in terms of register configuration. The IBI processing follows this logic: - When a slave advertizes an interrupt (SDA pulled low) an interrupt gets generated by the master. This time is unbounded and may be deferred. - The IRQ handler itself does not process anything: it only queues a work that will be run in non-atomic context. This is needed because short wait periods must be experienced. - The IBI job is divided in two parts: the first one is "critical" in the sense that it may not support getting interrupted. If this happens, after this first section the driver checks the master error register and depending on its content either flushes everything and errors out, or ends the processing (this second section may be interrupted). - If the critical section got interrupted, the slave will automatically respin it's IBI request when it will be allowed to. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20210121101808.14654-6-miquel.raynal@bootlin.com
2021-02-02i3c/master/mipi-i3c-hci: Specify HAS_IOMEM dependencyDavid Gow1-0/+1
The MIPI i3c HCI driver makes use of IOMEM functions like devm_platform_ioremap_resource(), which are only available if CONFIG_HAS_IOMEM is defined. This causes the driver to be enabled under make ARCH=um allyesconfig, even though it won't build. By adding a dependency on HAS_IOMEM, the driver will not be enabled on architectures which don't support it. Fixes: 9ad9a52cce28 ("i3c/master: introduce the mipi-i3c-hci driver") Signed-off-by: David Gow <davidgow@google.com> Acked-by: Nicolas Pitre <npitre@baylibre.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20210127040636.1535722-1-davidgow@google.com
2020-12-31i3c/master/mipi-i3c-hci: Fix position of __maybe_unused in i3c_hci_of_matchNathan Chancellor1-1/+1
Clang warns: ../drivers/i3c/master/mipi-i3c-hci/core.c:780:21: warning: attribute declaration must precede definition [-Wignored-attributes] static const struct __maybe_unused of_device_id i3c_hci_of_match[] = { ^ ../include/linux/compiler_attributes.h:267:56: note: expanded from macro '__maybe_unused' #define __maybe_unused __attribute__((__unused__)) ^ ../include/linux/mod_devicetable.h:262:8: note: previous definition is here struct of_device_id { ^ 1 warning generated. 'struct of_device_id' should not be split, as it is a type. Move the __maybe_unused attribute after the static and const qualifiers so that there are no warnings about this variable, period. Fixes: 95393f3e07ab ("i3c/master/mipi-i3c-hci: quiet maybe-unused variable warning") Link: https://github.com/ClangBuiltLinux/linux/issues/1221 Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Acked-by: Nicolas Pitre <npitre@baylibre.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20201222025931.3043480-1-natechancellor@gmail.com
2020-12-17i3c/master/mipi-i3c-hci: quiet maybe-unused variable warningNicolas Pitre1-1/+1
If CONFIG_OF is disabled then the matching table is notreferenced. Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Nicolas Pitre <npitre@baylibre.com> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
2020-11-25i3c/master: Fix uninitialized variable next_addrColin Ian King1-1/+1
The variable next_addr is not initialized and is being used in a call to i3c_master_get_free_addr as a starting point to find the next address. Fix this by initializing next_addr to 0 to avoid an uninitialized garbage starting address from being used. Addresses-Coverity: ("Uninitialized scalar variable") Fixes: 9ad9a52cce28 ("i3c/master: introduce the mipi-i3c-hci driver") Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Nicolas Pitre <npitre@baylibre.com> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Link: https://lore.kernel.org/linux-i3c/20201124123504.396249-1-colin.king@canonical.com
2020-11-23i3c/master: introduce the mipi-i3c-hci driverNicolas Pitre18-0/+4264
This adds basic support for hardware implementing the MIPI I3C HCI specification. This driver is currently limited by the capabilities of the I3C subsystem, meaning things like scheduled commands, auto-commands and NCM mode are not yet supported. This supports version 1.0 of the MIPI I3C HCI spec, as well as the imminent release of version 1.1. Support for draft version 2.0 of the spec is also largely included with the caveat that future adjustments to this code are likely as the spec is still a work in progress. This is also lightly tested as actual hardware is still very scarce, even for HCI v1.0. Hence the EXPERIMENTAL tag. Further contributions to this driver are expected once vendor implementations and new I3C devices become available. Signed-off-by: Nicolas Pitre <npitre@baylibre.com> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Link: https://lore.kernel.org/linux-i3c/20201111220510.3622216-3-nico@fluxnic.net
2020-10-17Merge tag 'i3c/for-5.10' of ↵Linus Torvalds1-1/+3
git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux Pull i3c updates from Boris Brezillon: - Fix DAA for the pre-reserved address case - Fix an error path in the cadence driver * tag 'i3c/for-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux: i3c: master: Fix error return in cdns_i3c_master_probe() i3c: master: fix for SETDASA and DAA process i3c: master add i3c_master_attach_boardinfo to preserve boardinfo
2020-10-07i3c: master: Fix error return in cdns_i3c_master_probe()Jing Xiangfeng1-1/+3
Fix to return negative error code -ENOMEM from the error handling case instead of 0. Fixes: 603f2bee2c54 ("i3c: master: Add driver for Cadence IP") Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Link: https://lore.kernel.org/linux-i3c/20200911033350.23904-1-jingxiangfeng@huawei.com
2020-08-24treewide: Use fallthrough pseudo-keywordGustavo A. R. Silva1-1/+1
Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
2020-02-28i3c: master: Replace zero-length array with flexible-array memberGustavo A. R. Silva2-2/+2
The current codebase makes use of the zero-length array language extension to the C90 standard, but the preferred mechanism to declare variable-length types such as these ones is a flexible array member[1][2], introduced in C99: struct foo { int stuff; struct boo array[]; }; By making use of the mechanism above, we will get a compiler warning in case the flexible array does not occur last in the structure, which will help us prevent some kind of undefined behavior bugs from being inadvertently introduced[3] to the codebase from now on. Also, notice that, dynamic memory allocations won't be affected by this change: "Flexible array members have incomplete type, and so the sizeof operator may not be applied. As a quirk of the original implementation of zero-length arrays, sizeof evaluates to zero."[1] This issue was found with the help of Coccinelle. [1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html [2] https://github.com/KSPP/linux/issues/21 [3] commit 76497732932f ("cxgb3/l2t: Fix undefined behaviour") Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Link: https://lore.kernel.org/linux-i3c/20200227131307.GA24935@embeddedor
2020-01-13i3c: master: dw: reattach device on first available location of address tableVitor Soares1-0/+16
For today the reattach function only update the device address on the controller. Update the location to the first available too, will optimize the enumeration process avoiding additional checks to keep the available positions on address table consecutive. Signed-off-by: Vitor Soares <vitor.soares@synopsys.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
2020-01-13i3c: master: cdns: convert to devm_platform_ioremap_resourceYangtao Li1-3/+1
Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li <tiny.windzz@gmail.com> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
2020-01-13i3c: master: dw: convert to devm_platform_ioremap_resourceYangtao Li1-3/+1
Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li <tiny.windzz@gmail.com> Acked-by: Vitor Soares <vitor.soares@synopsys.com> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
2019-12-09i3c: master: cdns: add data hold delay supportPrzemyslaw Gaj1-5/+44
This patch adds support for THD_DEL (Data Hold Delay) to Cadence I3C master constoller driver. As per MIPI I3C Specification 1.0, Table 75 (page 142) defines non-zero minimal tHD_PP timing on master output (Fig 65). This setting allows to meet this timing on master's soc outputs, regardless of PCB balancing. Signed-off-by: Przemyslaw Gaj <pgaj@cadence.com> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
2019-08-11i3c: add addr and lvr to i2c_dev_desc structurePrzemyslaw Gaj2-4/+4
I need to store address and lvr value for I2C devices without static definition in DT. This allows secondary master to transmit DEFSLVS command properly. Main changes between v4 and v5: - Change in defslvs to use addr and lvr from i2c_dev_desc structure - Change in CDNS and DW drivers to use addr and lvr from i2c_dev_desc structure Signed-off-by: Przemyslaw Gaj <pgaj@cadence.com> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
2019-08-11i3c: master: cdns: Use for_each_set_bit()Andy Shevchenko1-16/+10
This simplifies and standardizes slot manipulation code by using for_each_set_bit() library function. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
2019-07-09Merge tag 'i3c/for-5.3' of ↵Linus Torvalds2-15/+2
git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux Pull ic3 updates from Boris Brezillon: - Drop support for 10-bit I2C addresses - Add support for limited bus mode - Fix the Cadence DT binding doc - Use struct_size() to allocate a DEFSLVS packet * tag 'i3c/for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux: i3c: master: Use struct_size() helper dt-bindings: i3c: cdns: Use correct cells for I2C device i3c: dw: add limited bus mode support i3c: add mixed limited bus mode i3c: fix i2c and i3c scl rate by bus mode dt-bindings: i3c: Document dropped support for I2C 10 bit devices i3c: Drop support for I2C 10 bit addresing
2019-06-20i3c: dw: add limited bus mode supportVitor Soares1-0/+1
This patch add limited bus mode support for DesignWare i3c master Signed-off-by: Vitor Soares <vitor.soares@synopsys.com> Cc: Boris Brezillon <bbrezillon@kernel.org> Cc: <linux-kernel@vger.kernel.org> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
2019-05-28i3c: Drop support for I2C 10 bit addresingPrzemyslaw Gaj2-15/+1
This patch drops support for I2C devices with 10 bit addressing. When I2C device with 10 bit address is defined in DT, I3C master registration fails. Address space for I2C devices has been reduced and ->i2c_funcs() hook has been removed. Because this patch series dropped support for 10 bit I2C devices, support is also dropped in Cadence I3C master driver and Synopsys DesignWare I3C master driver. Signed-off-by: Przemyslaw Gaj <pgaj@cadence.com> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
2019-05-21treewide: Add SPDX license identifier - Makefile/KconfigThomas Gleixner2-0/+2
Add SPDX license identifiers to all Make/Kconfig files which: - Have no license information of any form These files fall under the project license, GPL v2 only. The resulting SPDX license identifier is: GPL-2.0-only Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>