/linux/Documentation/devicetree/bindings/i3c/ |
H A D | mipi-i3c-hci.yaml | 1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/i3c/mipi-i3c-hci.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: MIPI I3C HCI 10 - Nicolas Pitre <npitre@baylibre.com> 13 - $ref: /schemas/i3c/i3c.yaml# 16 MIPI I3C Host Controller Interface 18 The MIPI I3C HCI (Host Controller Interface) specification defines 19 a common software driver interface to support compliant MIPI I3C [all …]
|
/linux/drivers/i3c/master/mipi-i3c-hci/ |
H A D | cmd_v2.c | 1 // SPDX-License-Identifier: BSD-3-Clause 7 * I3C HCI v2.0 Command Descriptor Handling 9 * Note: The I3C HCI v2.0 spec is still in flux. The code here will change. 13 #include <linux/i3c/master.h> 15 #include "hci.h" 66 static unsigned int get_i3c_rate_idx(struct i3c_hci *hci) in get_i3c_rate_idx() argument 68 struct i3c_bus *bus = i3c_master_get_bus(&hci->master); in get_i3c_rate_idx() 70 if (bus->scl_rate.i3c >= 12000000) in get_i3c_rate_idx() 72 if (bus->scl_rate.i3c > 8000000) in get_i3c_rate_idx() 74 if (bus->scl_rate.i3c > 6000000) in get_i3c_rate_idx() [all …]
|
H A D | cmd_v1.c | 1 // SPDX-License-Identifier: BSD-3-Clause 7 * I3C HCI v1.0/v1.1 Command Descriptor Handling 11 #include <linux/i3c/master.h> 13 #include "hci.h" 122 static enum hci_cmd_mode get_i3c_mode(struct i3c_hci *hci) in get_i3c_mode() argument 124 struct i3c_bus *bus = i3c_master_get_bus(&hci->master); in get_i3c_mode() 126 if (bus->scl_rate.i3c > 8000000) in get_i3c_mode() 128 if (bus->scl_rate.i3c > 6000000) in get_i3c_mode() 130 if (bus->scl_rate.i3c > 4000000) in get_i3c_mode() 132 if (bus->scl_rate.i3c > 2000000) in get_i3c_mode() [all …]
|
H A D | core.c | 1 // SPDX-License-Identifier: BSD-3-Clause 7 * Core driver code with main interface to the I3C subsystem. 13 #include <linux/i3c/master.h> 19 #include "hci.h" 29 #define HCI_VERSION 0x00 /* HCI Version (in BCD) */ 36 #define HC_CONTROL_HOT_JOIN_CTRL BIT(8) /* Hot-Join ACK/NACK Control */ 40 #define HC_CONTROL_IBA_INCLUDE BIT(0) /* Include I3C Broadcast Address */ 109 #define IBI_NOTIFY_HJ_REJECTED BIT(0) /* Rejected Hot-Join Control */ 122 struct i3c_hci *hci = to_i3c_hci(m); in i3c_hci_bus_init() local 128 if (hci->cmd == &mipi_i3c_hci_cmd_v1) { in i3c_hci_bus_init() [all …]
|
H A D | hci_quirks.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * I3C HCI Quirks 7 * Authors: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> 11 #include <linux/i3c/master.h> 12 #include "hci.h" 25 void amd_set_od_pp_timing(struct i3c_hci *hci) in amd_set_od_pp_timing() argument 37 void amd_set_resp_buf_thld(struct i3c_hci *hci) in amd_set_resp_buf_thld() argument
|
H A D | Makefile | 1 # SPDX-License-Identifier: BSD-3-Clause 3 obj-$(CONFIG_MIPI_I3C_HCI) += mipi-i3c-hci.o 4 mipi-i3c-hci-y := core.o ext_caps.o pio.o dma.o \
|
H A D | ext_caps.c | 1 // SPDX-License-Identifier: BSD-3-Clause 11 #include <linux/i3c/master.h> 15 #include "hci.h" 24 static int hci_extcap_hardware_id(struct i3c_hci *hci, void __iomem *base) in hci_extcap_hardware_id() argument 26 hci->vendor_mipi_id = readl(base + 0x04); in hci_extcap_hardware_id() 27 hci->vendor_version_id = readl(base + 0x08); in hci_extcap_hardware_id() 28 hci->vendor_product_id = readl(base + 0x0c); in hci_extcap_hardware_id() 30 dev_info(&hci->master.dev, "vendor MIPI ID: %#x\n", hci->vendor_mipi_id); in hci_extcap_hardware_id() 31 dev_info(&hci->master.dev, "vendor version ID: %#x\n", hci->vendor_version_id); in hci_extcap_hardware_id() 32 dev_info(&hci->master.dev, "vendor product ID: %#x\n", hci->vendor_product_id); in hci_extcap_hardware_id() [all …]
|
H A D | xfer_mode_rate.h | 1 /* SPDX-License-Identifier: BSD-3-Clause */ 9 * This applies starting from I3C HCI v2.0. 22 #define XFERMODE_IDX_I3C_SDR 0x00 /* I3C SDR Mode */ 23 #define XFERMODE_IDX_I3C_HDR_DDR 0x01 /* I3C HDR-DDR Mode */ 24 #define XFERMODE_IDX_I3C_HDR_T 0x02 /* I3C HDR-Ternary Mode */ 25 #define XFERMODE_IDX_I3C_HDR_BT 0x03 /* I3C HDR-BT Mode */
|
H A D | dct_v1.c | 1 // SPDX-License-Identifier: BSD-3-Clause 10 #include <linux/i3c/master.h> 13 #include "hci.h" 20 void i3c_hci_dct_get_val(struct i3c_hci *hci, unsigned int dct_idx, in i3c_hci_dct_get_val() argument 23 void __iomem *reg = hci->DCT_regs + dct_idx * 4 * 4; in i3c_hci_dct_get_val() 32 *pid = ((u64)dct_entry_data[0]) << (47 - 32 + 1) | in i3c_hci_dct_get_val()
|
H A D | dat_v1.c | 1 // SPDX-License-Identifier: BSD-3-Clause 12 #include <linux/i3c/master.h> 15 #include "hci.h" 38 #define dat_w0_read(i) readl(hci->DAT_regs + (i) * 8) 39 #define dat_w1_read(i) readl(hci->DAT_regs + (i) * 8 + 4) 40 #define dat_w0_write(i, v) writel(v, hci->DAT_regs + (i) * 8) 41 #define dat_w1_write(i, v) writel(v, hci->DAT_regs + (i) * 8 + 4) 52 static int hci_dat_v1_init(struct i3c_hci *hci) in hci_dat_v1_init() argument 56 if (!hci->DAT_regs) { in hci_dat_v1_init() 57 dev_err(&hci->master.dev, in hci_dat_v1_init() [all …]
|
H A D | dma.c | 1 // SPDX-License-Identifier: BSD-3-Clause 7 * Note: The I3C HCI v2.0 spec is still in flux. The IBI support is based on 13 #include <linux/dma-mapping.h> 15 #include <linux/i3c/master.h> 18 #include "hci.h" 40 #define rhs_reg_read(r) readl(hci->RHS_regs + (RHS_##r)) 41 #define rhs_reg_write(r, v) writel(v, hci->RHS_regs + (RHS_##r)) 52 * Ring Header (Per-Ring Bundle) 55 #define rh_reg_read(r) readl(rh->regs + (RH_##r)) 56 #define rh_reg_write(r, v) writel(v, rh->regs + (RH_##r)) [all …]
|
H A D | pio.c | 1 // SPDX-License-Identifier: BSD-3-Clause 11 #include <linux/i3c/master.h> 14 #include "hci.h" 23 #define pio_reg_read(r) readl(hci->PIO_regs + (PIO_##r)) 24 #define pio_reg_write(r, v) writel(v, hci->PIO_regs + (PIO_##r)) 139 static int hci_pio_init(struct i3c_hci *hci) in hci_pio_init() argument 146 return -ENOMEM; in hci_pio_init() 148 hci->io_data = pio; in hci_pio_init() 149 spin_lock_init(&pio->lock); in hci_pio_init() 152 dev_info(&hci->master.dev, "CMD/RESP FIFO = %ld entries\n", in hci_pio_init() [all …]
|
/linux/drivers/i3c/master/ |
H A D | Kconfig | 1 # SPDX-License-Identifier: GPL-2.0-only 3 tristate "Cadence I3C master driver" 4 depends on I3C 8 Enable this driver if you want to support Cadence I3C master block. 11 tristate "Synospsys DesignWare I3C master driver" 12 depends on I3C 17 Support for Synopsys DesignWare MIPI I3C Controller. 23 will be called dw-i3c-master. 26 tristate "ASPEED AST2600 I3C master driver" 31 Support for ASPEED AST2600 I3C Controller. [all …]
|
H A D | Makefile | 1 # SPDX-License-Identifier: GPL-2.0-only 2 obj-$(CONFIG_CDNS_I3C_MASTER) += i3c-master-cdns.o 3 obj-$(CONFIG_DW_I3C_MASTER) += dw-i3c-master.o 4 obj-$(CONFIG_AST2600_I3C_MASTER) += ast2600-i3c-master.o 5 obj-$(CONFIG_SVC_I3C_MASTER) += svc-i3c-master.o 6 obj-$(CONFIG_MIPI_I3C_HCI) += mipi-i3c-hci/
|