/linux/drivers/i3c/master/mipi-i3c-hci/ |
H A D | core.c | 19 #include "hci.h" 29 #define HCI_VERSION 0x00 /* HCI Version (in BCD) */ 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() 129 ret = mipi_i3c_hci_dat_v1.init(hci); in i3c_hci_bus_init() 145 ret = hci->io->init(hci); in i3c_hci_bus_init() 150 if (hci->quirks & HCI_QUIRK_RESP_BUF_THLD) in i3c_hci_bus_init() 151 amd_set_resp_buf_thld(hci); in i3c_hci_bus_init() 161 struct i3c_hci *hci = to_i3c_hci(m); in i3c_hci_bus_cleanup() local 168 hci->io->cleanup(hci); in i3c_hci_bus_cleanup() [all …]
|
H A D | ext_caps.c | 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() 35 switch (hci->vendor_mipi_id) { in hci_extcap_hardware_id() 37 hci->quirks |= HCI_QUIRK_RAW_CCC; in hci_extcap_hardware_id() [all …]
|
H A D | dat_v1.c | 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() 61 if (hci->DAT_entry_size != 8) { in hci_dat_v1_init() 62 dev_err(&hci->master.dev, in hci_dat_v1_init() [all …]
|
H A D | pio.c | 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 148 hci->io_data = pio; in hci_pio_init() 152 dev_info(&hci->master.dev, "CMD/RESP FIFO = %ld entries\n", in hci_pio_init() 154 dev_info(&hci->master.dev, "IBI FIFO = %ld bytes\n", in hci_pio_init() 156 dev_info(&hci->master.dev, "RX data FIFO = %d bytes\n", in hci_pio_init() 158 dev_info(&hci->master.dev, "TX data FIFO = %d bytes\n", in hci_pio_init() 168 if (hci->version_major == 1) { in hci_pio_init() [all …]
|
H A D | dma.c | 7 * Note: The I3C HCI v2.0 spec is still in flux. The IBI support is based on 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)) 150 static void hci_dma_cleanup(struct i3c_hci *hci) in hci_dma_cleanup() argument 152 struct hci_rings_data *rings = hci->io_data; in hci_dma_cleanup() 168 dma_free_coherent(&hci->master.dev, in hci_dma_cleanup() 172 dma_free_coherent(&hci->master.dev, in hci_dma_cleanup() 177 dma_free_coherent(&hci->master.dev, in hci_dma_cleanup() 181 dma_unmap_single(&hci->master.dev, rh->ibi_data_dma, in hci_dma_cleanup() [all …]
|
H A D | hci.h | 7 * Common HCI stuff 30 #define reg_read(r) readl(hci->base_regs + (r)) 31 #define reg_write(r, v) writel(v, hci->base_regs + (r)) 72 * hci->cmd->*() method. The cmd method will initialize cmd_desc[] and 76 * hci->io->queue_xfer(), and requires CMD_0_ROC to be set. 118 bool (*irq_handler)(struct i3c_hci *hci, unsigned int mask); 119 int (*queue_xfer)(struct i3c_hci *hci, struct hci_xfer *xfer, int n); 120 bool (*dequeue_xfer)(struct i3c_hci *hci, struct hci_xfer *xfer, int n); 121 int (*request_ibi)(struct i3c_hci *hci, struct i3c_dev_desc *dev, 123 void (*free_ibi)(struct i3c_hci *hci, struct i3c_dev_desc *dev); [all …]
|
H A D | cmd_v2.c | 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. 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() 83 static unsigned int get_i2c_rate_idx(struct i3c_hci *hci) in get_i2c_rate_idx() argument 85 struct i3c_bus *bus = i3c_master_get_bus(&hci->master); in get_i2c_rate_idx() 92 static void hci_cmd_v2_prep_private_xfer(struct i3c_hci *hci, in hci_cmd_v2_prep_private_xfer() argument 151 static int hci_cmd_v2_prep_ccc(struct i3c_hci *hci, struct hci_xfer *xfer, in hci_cmd_v2_prep_ccc() argument 155 unsigned int rate = get_i3c_rate_idx(hci); in hci_cmd_v2_prep_ccc() [all …]
|
H A D | cmd_v1.c | 7 * I3C HCI v1.0/v1.1 Command Descriptor Handling 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() 137 static enum hci_cmd_mode get_i2c_mode(struct i3c_hci *hci) in get_i2c_mode() argument 139 struct i3c_bus *bus = i3c_master_get_bus(&hci->master); in get_i2c_mode() 170 static int hci_cmd_v1_prep_ccc(struct i3c_hci *hci, in hci_cmd_v1_prep_ccc() argument 175 enum hci_cmd_mode mode = get_i3c_mode(hci); in hci_cmd_v1_prep_ccc() 186 ret = mipi_i3c_hci_dat_v1.get_index(hci, ccc_addr); in hci_cmd_v1_prep_ccc() 220 static void hci_cmd_v1_prep_i3c_xfer(struct i3c_hci *hci, in hci_cmd_v1_prep_i3c_xfer() argument [all …]
|
H A D | dat.h | 19 int (*init)(struct i3c_hci *hci); 20 void (*cleanup)(struct i3c_hci *hci); 21 int (*alloc_entry)(struct i3c_hci *hci); 22 void (*free_entry)(struct i3c_hci *hci, unsigned int dat_idx); 23 void (*set_dynamic_addr)(struct i3c_hci *hci, unsigned int dat_idx, u8 addr); 24 void (*set_static_addr)(struct i3c_hci *hci, unsigned int dat_idx, u8 addr); 25 void (*set_flags)(struct i3c_hci *hci, unsigned int dat_idx, u32 w0, u32 w1); 26 void (*clear_flags)(struct i3c_hci *hci, unsigned int dat_idx, u32 w0, u32 w1); 27 int (*get_index)(struct i3c_hci *hci, u8 address);
|
H A D | cmd.h | 50 (atomic_inc_return_relaxed(&hci->next_cmd_tid) % (1U << 4)) 54 int (*prep_ccc)(struct i3c_hci *hci, struct hci_xfer *xfer, 56 void (*prep_i3c_xfer)(struct i3c_hci *hci, struct i3c_dev_desc *dev, 58 void (*prep_i2c_xfer)(struct i3c_hci *hci, struct i2c_dev_desc *dev, 60 int (*perform_daa)(struct i3c_hci *hci);
|
H A D | hci_quirks.c | 3 * I3C HCI Quirks 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 | dct_v1.c | 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()
|
/linux/drivers/bluetooth/ |
H A D | Kconfig | 27 tristate "HCI USB driver" 31 Bluetooth HCI USB driver. 94 tristate "HCI SDIO driver" 97 Bluetooth HCI SDIO driver. 105 tristate "HCI UART driver" 111 Bluetooth HCI UART driver. 133 Say Y here to compile support for HCI UART (H4) protocol. 160 Say Y here to compile support for HCI BCSP protocol. 167 HCIATH3K (HCI Atheros AR300x) is a serial protocol for 173 Say Y here to compile support for HCI UART ATH3K protocol. [all …]
|
H A D | hci_serdev.c | 3 * Bluetooth HCI serdev driver lib 28 /* Update HCI stat counters */ in hci_uart_tx_complete() 91 /* ------- Interface to HCI layer ------ */ 163 /* Send frames from HCI layer */ 237 /* HCI UART devices are assumed to be wakeable by default. in hci_uart_wakeup() 328 /* Initialize and register HCI device */ in hci_uart_register_device_priv() 331 BT_ERR("Can't allocate HCI device"); in hci_uart_register_device_priv() 373 BT_ERR("Can't register HCI device"); in hci_uart_register_device_priv()
|
/linux/Documentation/driver-api/nfc/ |
H A D | nfc-hci.rst | 2 HCI backend for NFC Core 11 The HCI layer implements much of the ETSI TS 102 622 V10.2.0 specification. It 12 enables easy writing of HCI-based NFC drivers. The HCI layer runs as an NFC Core 14 to HCI commands and events. 16 HCI chapter 19 HCI registers as an nfc device with NFC Core. Requests coming from userspace are 20 routed through netlink sockets to NFC Core and then to HCI. From this point, 21 they are translated in a sequence of HCI commands sent to the HCI layer in the 24 from HCI Rx context). 25 HCI events can also be received from the host controller. They will be handled [all …]
|
H A D | nfc-pn544.rst | 18 In the normal (HCI) mode and in the firmware update mode read and 22 In the normal (HCI) mode the protocol used is derived from the ETSI 23 HCI specification. The firmware is updated using a specific protocol, 24 which is different from HCI. 26 HCI messages consist of an eight bit header and the message body. The 27 header contains the message length. Maximum size for an HCI message is 28 33. In HCI mode sent messages are tested for a correct 33 For the ETSI HCI specification see
|
/linux/drivers/net/wireless/realtek/rtw88/ |
H A D | hci.h | 38 return rtwdev->hci.ops->tx_write(rtwdev, pkt_info, skb); in rtw_hci_tx_write() 43 return rtwdev->hci.ops->tx_kick_off(rtwdev); in rtw_hci_tx_kick_off() 48 return rtwdev->hci.ops->setup(rtwdev); in rtw_hci_setup() 53 return rtwdev->hci.ops->start(rtwdev); in rtw_hci_start() 58 rtwdev->hci.ops->stop(rtwdev); in rtw_hci_stop() 63 rtwdev->hci.ops->deep_ps(rtwdev, enter); in rtw_hci_deep_ps() 68 rtwdev->hci.ops->link_ps(rtwdev, enter); in rtw_hci_link_ps() 73 rtwdev->hci.ops->interface_cfg(rtwdev); in rtw_hci_interface_cfg() 78 if (rtwdev->hci.ops->dynamic_rx_agg) in rtw_hci_dynamic_rx_agg() 79 rtwdev->hci.ops->dynamic_rx_agg(rtwdev, enable); in rtw_hci_dynamic_rx_agg() [all …]
|
H A D | sdio.h | 81 /* HCI Current Power Mode */ 89 /* HCI Current Power Mode 1 */ 91 /* HCI Current Power Mode 2 */ 100 /* HCI Request Power Mode 1 */ 102 /* HCI Request Power Mode 2 */ 104 /* HCI Power Save Clock */ 106 /* SDIO HCI Suspend Control */
|
/linux/Documentation/devicetree/bindings/i3c/ |
H A D | mipi-i3c-hci.yaml | 4 $id: http://devicetree.org/schemas/i3c/mipi-i3c-hci.yaml# 7 title: MIPI I3C HCI 18 The MIPI I3C HCI (Host Controller Interface) specification defines 27 https://www.mipi.org/specifications/i3c-hci 31 const: mipi-i3c-hci 47 compatible = "mipi-i3c-hci";
|
/linux/net/nfc/hci/ |
H A D | Kconfig | 4 tristate "NFC HCI implementation" 7 Say Y here if you want to build support for a kernel NFC HCI 9 HCI frames, like for example the NXP pn544. 14 bool "SHDLC link layer for HCI based NFC drivers" 17 Say yes if you use an NFC HCI driver that requires SHDLC link layer.
|
H A D | Makefile | 3 # Makefile for the Linux NFC HCI layer. 6 obj-$(CONFIG_NFC_HCI) += hci.o 8 hci-y := core.o hcp.o command.o llc.o llc_nop.o 9 hci-$(CONFIG_NFC_SHDLC) += llc_shdlc.o
|
H A D | command.c | 6 #define pr_fmt(fmt) "hci: %s: " fmt, __func__ 13 #include <net/nfc/hci.h> 15 #include "hci.h" 26 /* TODO: Define hci cmd execution delay. Should it be the same in nfc_hci_execute_cmd_async() 34 * HCI command execution completion callback. 35 * err will be a standard linux error (may be converted from HCI response) 43 pr_debug("HCI Cmd completed with result=%d\n", err); in nfc_hci_execute_cb() 68 /* TODO: Define hci cmd execution delay. Should it be the same in nfc_hci_execute_cmd() 108 * Execute an hci command sent to gate. 249 * and fill param with it. HCI spec 6.1.3.5 */ in nfc_hci_clear_all_pipes()
|
/linux/drivers/nfc/st21nfca/ |
H A D | st21nfca.h | 9 #include <net/nfc/hci.h> 15 /* framing in HCI mode */ 53 #define DRIVER_DESC "HCI NFC driver for ST21NFCA" 76 * @HCI_CLEAR_ALL_PIPES: Allow to execute a HCI clear all pipes command. 89 * @HCI_GET_PARAM: Allow to retrieve an HCI CLF parameter (for example the
|
/linux/drivers/staging/gdm724x/ |
H A D | gdm_usb.c | 18 #include "hci.h" 59 struct hci_packet *hci; in request_mac_address() local 64 hci = kmalloc(struct_size(hci, data, 1), GFP_KERNEL); in request_mac_address() 65 if (!hci) in request_mac_address() 68 hci->cmd_evt = gdm_cpu_to_dev16(udev->gdm_ed, LTE_GET_INFORMATION); in request_mac_address() 69 hci->len = gdm_cpu_to_dev16(udev->gdm_ed, 1); in request_mac_address() 70 hci->data[0] = MAC_ADDRESS; in request_mac_address() 72 ret = usb_bulk_msg(usbdev, usb_sndbulkpipe(usbdev, 2), hci, 5, in request_mac_address() 76 kfree(hci); in request_mac_address() 387 struct hci_packet *hci; in do_rx() local [all …]
|
/linux/net/bluetooth/ |
H A D | Kconfig | 28 HCI device and connection manager, scheduler 33 HCI Device drivers (Interface to the hardware) 103 This options enables support for the Microsoft defined HCI 111 Project defined HCI vendor extensions.
|