12959ab24SNipun GuptaWhat: /sys/bus/cdx/rescan 22959ab24SNipun GuptaDate: March 2023 32959ab24SNipun GuptaContact: nipun.gupta@amd.com 42959ab24SNipun GuptaDescription: 52959ab24SNipun Gupta Writing y/1/on to this file will cause rescan of the bus 62959ab24SNipun Gupta and devices on the CDX bus. Any new devices are scanned and 72959ab24SNipun Gupta added to the list of Linux devices and any devices removed are 82959ab24SNipun Gupta also deleted from Linux. 92959ab24SNipun Gupta 102959ab24SNipun Gupta For example:: 112959ab24SNipun Gupta 122959ab24SNipun Gupta # echo 1 > /sys/bus/cdx/rescan 1348a6c7bcSNipun Gupta 1448a6c7bcSNipun GuptaWhat: /sys/bus/cdx/devices/.../vendor 1548a6c7bcSNipun GuptaDate: March 2023 1648a6c7bcSNipun GuptaContact: nipun.gupta@amd.com 1748a6c7bcSNipun GuptaDescription: 1848a6c7bcSNipun Gupta Vendor ID for this CDX device, in hexadecimal. Vendor ID is 1948a6c7bcSNipun Gupta 16 bit identifier which is specific to the device manufacturer. 2048a6c7bcSNipun Gupta Combination of Vendor ID and Device ID identifies a device. 2148a6c7bcSNipun Gupta 2248a6c7bcSNipun GuptaWhat: /sys/bus/cdx/devices/.../device 2348a6c7bcSNipun GuptaDate: March 2023 2448a6c7bcSNipun GuptaContact: nipun.gupta@amd.com 2548a6c7bcSNipun GuptaDescription: 2648a6c7bcSNipun Gupta Device ID for this CDX device, in hexadecimal. Device ID is 2748a6c7bcSNipun Gupta 16 bit identifier to identify a device type within the range 2848a6c7bcSNipun Gupta of a device manufacturer. 2948a6c7bcSNipun Gupta Combination of Vendor ID and Device ID identifies a device. 3048a6c7bcSNipun Gupta 31fa10f413SAbhijit GangurdeWhat: /sys/bus/cdx/devices/.../subsystem_vendor 32fa10f413SAbhijit GangurdeDate: July 2023 33fa10f413SAbhijit GangurdeContact: puneet.gupta@amd.com 34fa10f413SAbhijit GangurdeDescription: 35fa10f413SAbhijit Gangurde Subsystem Vendor ID for this CDX device, in hexadecimal. 36fa10f413SAbhijit Gangurde Subsystem Vendor ID is 16 bit identifier specific to the 37fa10f413SAbhijit Gangurde card manufacturer. 38fa10f413SAbhijit Gangurde 39fa10f413SAbhijit GangurdeWhat: /sys/bus/cdx/devices/.../subsystem_device 40fa10f413SAbhijit GangurdeDate: July 2023 41fa10f413SAbhijit GangurdeContact: puneet.gupta@amd.com 42fa10f413SAbhijit GangurdeDescription: 43fa10f413SAbhijit Gangurde Subsystem Device ID for this CDX device, in hexadecimal 44fa10f413SAbhijit Gangurde Subsystem Device ID is 16 bit identifier specific to the 45fa10f413SAbhijit Gangurde card manufacturer. 46fa10f413SAbhijit Gangurde 47fa10f413SAbhijit GangurdeWhat: /sys/bus/cdx/devices/.../class 48fa10f413SAbhijit GangurdeDate: July 2023 49fa10f413SAbhijit GangurdeContact: puneet.gupta@amd.com 50fa10f413SAbhijit GangurdeDescription: 51fa10f413SAbhijit Gangurde This file contains the class of the CDX device, in hexadecimal. 52fa10f413SAbhijit Gangurde Class is 24 bit identifier specifies the functionality of the device. 53fa10f413SAbhijit Gangurde 54fa10f413SAbhijit GangurdeWhat: /sys/bus/cdx/devices/.../revision 55fa10f413SAbhijit GangurdeDate: July 2023 56fa10f413SAbhijit GangurdeContact: puneet.gupta@amd.com 57fa10f413SAbhijit GangurdeDescription: 58fa10f413SAbhijit Gangurde This file contains the revision field of the CDX device, in hexadecimal. 59fa10f413SAbhijit Gangurde Revision is 8 bit revision identifier of the device. 60fa10f413SAbhijit Gangurde 61e3cfd49cSAbhijit GangurdeWhat: /sys/bus/cdx/devices/.../enable 62e3cfd49cSAbhijit GangurdeDate: October 2023 63e3cfd49cSAbhijit GangurdeContact: abhijit.gangurde@amd.com 64e3cfd49cSAbhijit GangurdeDescription: 65e3cfd49cSAbhijit Gangurde CDX bus should be disabled before updating the devices in FPGA. 66e3cfd49cSAbhijit Gangurde Writing n/0/off will attempt to disable the CDX bus and. 67e3cfd49cSAbhijit Gangurde writing y/1/on will attempt to enable the CDX bus. Reading this file 68e3cfd49cSAbhijit Gangurde gives the current state of the bus, 1 for enabled and 0 for disabled. 69e3cfd49cSAbhijit Gangurde 70e3cfd49cSAbhijit Gangurde For example:: 71e3cfd49cSAbhijit Gangurde 72e3cfd49cSAbhijit Gangurde # echo 1 > /sys/bus/cdx/.../enable 73e3cfd49cSAbhijit Gangurde 7448a6c7bcSNipun GuptaWhat: /sys/bus/cdx/devices/.../reset 7548a6c7bcSNipun GuptaDate: March 2023 7648a6c7bcSNipun GuptaContact: nipun.gupta@amd.com 7748a6c7bcSNipun GuptaDescription: 780174f581SAbhijit Gangurde Writing y/1/on to this file resets the CDX device or all devices 790174f581SAbhijit Gangurde on the bus. On resetting the device, the corresponding driver is 800174f581SAbhijit Gangurde notified twice, once before the device is being reset, and again 810174f581SAbhijit Gangurde after the reset has been complete. 8248a6c7bcSNipun Gupta 8348a6c7bcSNipun Gupta For example:: 8448a6c7bcSNipun Gupta 8548a6c7bcSNipun Gupta # echo 1 > /sys/bus/cdx/.../reset 8648a6c7bcSNipun Gupta 8748a6c7bcSNipun GuptaWhat: /sys/bus/cdx/devices/.../remove 8848a6c7bcSNipun GuptaDate: March 2023 8948a6c7bcSNipun GuptaContact: tarak.reddy@amd.com 9048a6c7bcSNipun GuptaDescription: 9148a6c7bcSNipun Gupta Writing y/1/on to this file removes the corresponding 9248a6c7bcSNipun Gupta device from the CDX bus. If the device is to be reconfigured 9348a6c7bcSNipun Gupta reconfigured in the Hardware, the device can be removed, so 9448a6c7bcSNipun Gupta that the device driver does not access the device while it is 9548a6c7bcSNipun Gupta being reconfigured. 9648a6c7bcSNipun Gupta 9748a6c7bcSNipun Gupta For example:: 9848a6c7bcSNipun Gupta 9948a6c7bcSNipun Gupta # echo 1 > /sys/bus/cdx/devices/.../remove 100fa10f413SAbhijit Gangurde 101*aeda33abSAbhijit GangurdeWhat: /sys/bus/cdx/devices/.../resource<N> 102*aeda33abSAbhijit GangurdeDate: July 2023 103*aeda33abSAbhijit GangurdeContact: puneet.gupta@amd.com 104*aeda33abSAbhijit GangurdeDescription: 105*aeda33abSAbhijit Gangurde The resource binary file contains the content of the memory 106*aeda33abSAbhijit Gangurde regions. These files can be m'maped from userspace. 107*aeda33abSAbhijit Gangurde 108fa10f413SAbhijit GangurdeWhat: /sys/bus/cdx/devices/.../modalias 109fa10f413SAbhijit GangurdeDate: July 2023 110fa10f413SAbhijit GangurdeContact: nipun.gupta@amd.com 111fa10f413SAbhijit GangurdeDescription: 112fa10f413SAbhijit Gangurde This attribute indicates the CDX ID of the device. 113fa10f413SAbhijit Gangurde That is in the format: 114fa10f413SAbhijit Gangurde cdx:vXXXXdXXXXsvXXXXsdXXXXcXXXXXX, 115fa10f413SAbhijit Gangurde where: 116fa10f413SAbhijit Gangurde 117fa10f413SAbhijit Gangurde - vXXXX contains the vendor ID; 118fa10f413SAbhijit Gangurde - dXXXX contains the device ID; 119fa10f413SAbhijit Gangurde - svXXXX contains the subsystem vendor ID; 120fa10f413SAbhijit Gangurde - sdXXXX contains the subsystem device ID; 121fa10f413SAbhijit Gangurde - cXXXXXX contains the device class. 122