1 .. SPDX-License-Identifier: GPL-2.0 2 3 4 AMD Sensor Fusion Hub 5 ===================== 6 AMD Sensor Fusion Hub (SFH) is part of an SOC 7 The solution is working well on several OEM pr 8 In terms of architecture it resembles ISH, how 9 the HID reports are generated as part of the k 10 11 Block Diagram 12 ------------- 13 14 :: 15 16 --------------------------------- 17 | HID User Space Applications | 18 - ------------------------------- 19 20 ------------------------------------------ 21 --------------------------------- 22 | HID Core | 23 --------------------------------- 24 25 --------------------------------- 26 | AMD HID Transport | 27 --------------------------------- 28 29 -------------------------------- 30 | AMD HID Client | 31 | with HID Report Generator| 32 -------------------------------- 33 34 -------------------------------- 35 | AMD MP2 PCIe Driver | 36 -------------------------------- 37 OS 38 ------------------------------------------ 39 Hardware + Firmware 40 -------------------------------- 41 | SFH MP2 Processor | 42 -------------------------------- 43 44 45 AMD HID Transport Layer 46 ----------------------- 47 AMD SFH transport is also implemented as a bus 48 registered as a device on this bus. Here, MP2 49 sensor data. The layer, which binds each devic 50 registers with the HID core. Transport layer a 51 each device. Once a device is registered with 52 used by HID core to communicate with the devic 53 54 AMD HID Client Layer 55 -------------------- 56 This layer is responsible to implement HID req 57 client layer fills the HID request structure a 58 interface between MP2 PCIe layer and HID. HID 59 the instance of MP2 layer. It identifies the n 60 on that allocates the DRAM address for each an 61 enumeration of each sensor, client layer fills 62 structure. HID Feature report structure is opt 63 sensor to sensor. 64 65 AMD MP2 PCIe layer 66 ------------------ 67 MP2 PCIe Layer is responsible for making all t 68 The connection establishment between firmware 69 70 The communication between X86 and MP2 is split 71 1. Command transfer via the C2P mailbox regist 72 2. Data transfer via DRAM. 73 3. Supported sensor info via P2C registers. 74 75 Commands are sent to MP2 using C2P Mailbox reg 76 interrupt to MP2. The client layer allocates t 77 the PCI layer. MP2 firmware writes the command 78 layer has allocated. Firmware always writes mi 79 shall allocate minimum of 32 bytes DRAM space. 80 81 Enumeration and Probing flow 82 ---------------------------- 83 :: 84 85 HID AMD AMD 86 Core Transport Client laye 87 | | | 88 | | | 89 | | | 90 | | | 91 | | | 92 | | |---Get 93 | | | 94 | | | 95 | | | 96 | | | Loop( 97 | | |------ 98 | | | Creat 99 | | | Creat 100 | | | Desc 101 | | | the 102 | | | HID 103 | | | Alloc 104 | | | 105 | | |------ 106 | | HID transport| 107 | |<--Probe------| 108 | | Create the | 109 | | HID device | 110 | | (MFD) | 111 | | by Populating| 112 | | the HID | 113 | | ll_driver | 114 | HID | | 115 | add | | 116 |Device | | 117 |<------------- | | 118 119 120 Data Flow from Application to the AMD SFH Driv 121 ---------------------------------------------- 122 123 :: 124 125 | | 126 | | 127 | | 128 | | 129 | | 130 |HID_req | 131 |get_report | 132 |------------->| 133 | | HID_get_input 134 | | report 135 | |-------------> 136 | | 137 | | 138 | | 139 | | 140 | | 141 | |Data received 142 | | in HID report 143 To |<-------------|<------------- 144 Applications| | 145 <-------| |
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.