Lines Matching full:i3c

7 #include <zephyr/drivers/i3c.h>
73 entry->syntax = config->dev_list.i3c[idx].dev->name; \
123 if (strcmp(config->dev_list.i3c[i].dev->name, tdev_name) == 0) { in get_i3c_list_desc_from_dev_name()
125 return &config->dev_list.i3c[i]; in get_i3c_list_desc_from_dev_name()
152 shell_error(sh, "I3C: Device driver %s not found.", argv[ARGV_DEV]); in i3c_parse_args()
157 shell_error(sh, "I3C: Device driver %s not found.", argv[ARGV_TDEV]); in i3c_parse_args()
162 shell_error(sh, "I3C: Device %s not attached to bus.", (*tdev)->name); in i3c_parse_args()
169 /* i3c info <device> [<target>] */
181 shell_error(sh, "I3C: Device driver %s not found.", argv[ARGV_DEV]); in cmd_i3c_info()
189 shell_error(sh, "I3C: Target Device driver %s not found.", argv[ARGV_TDEV]); in cmd_i3c_info()
192 if (!sys_slist_is_empty(&data->attached_dev.devices.i3c)) { in cmd_i3c_info()
230 shell_print(sh, "I3C: No devices found."); in cmd_i3c_info()
234 shell_error(sh, "I3C: Target device not found."); in cmd_i3c_info()
238 /* This gets all "currently attached" I3C and I2C devices */ in cmd_i3c_info()
239 if (!sys_slist_is_empty(&data->attached_dev.devices.i3c)) { in cmd_i3c_info()
240 shell_print(sh, "I3C: Devices found:"); in cmd_i3c_info()
273 shell_print(sh, "I3C: No devices found."); in cmd_i3c_info()
293 /* i3c speed <device> <speed> */
303 shell_error(sh, "I3C: Device driver %s not found.", argv[1]); in cmd_i3c_speed()
311 shell_error(sh, "I3C: Failed to retrieve configuration"); in cmd_i3c_speed()
315 config.scl.i3c = speed; in cmd_i3c_speed()
319 shell_error(sh, "I3C: Failed to configure device"); in cmd_i3c_speed()
326 /* i3c recover <device> */
334 shell_error(sh, "I3C: Device driver %s not found.", argv[1]); in cmd_i3c_recover()
340 shell_error(sh, "I3C: Bus recovery failed (err %d)", err); in cmd_i3c_recover()
364 shell_error(sh, "I3C: Device driver %s not found.", s_dev_name); in i3c_write_from_buffer()
369 shell_error(sh, "I3C: Device driver %s not found.", s_tdev_name); in i3c_write_from_buffer()
374 shell_error(sh, "I3C: Device %s not attached to bus.", tdev->name); in i3c_write_from_buffer()
403 /* i3c write <device> <dev_addr> <reg_addr> [<byte1>, ...] */
410 /* i3c write_byte <device> <dev_addr> <reg_addr> <value> */
429 shell_error(sh, "I3C: Device driver %s not found.", s_dev_name); in i3c_read_to_buffer()
434 shell_error(sh, "I3C: Device driver %s not found.", s_dev_name); in i3c_read_to_buffer()
439 shell_error(sh, "I3C: Device %s not attached to bus.", tdev->name); in i3c_read_to_buffer()
458 /* i3c read_byte <device> <target> <reg_addr> */
472 /* i3c read <device> <target> <reg_addr> [<numbytes>] */
497 /* i3c hdr ddr read <device> <target> <7b cmd> [<byte1>, ...] */
526 shell_error(sh, "I3C: unable to perform HDR DDR write."); in cmd_i3c_hdr_ddr_write()
533 /* i3c hdr ddr read <device> <target> <7b cmd> [<numbytes>] */
561 shell_error(sh, "I3C: unable to perform HDR DDR read."); in cmd_i3c_hdr_ddr_read()
570 /* i3c ccc rstdaa <device> */
579 shell_error(sh, "I3C: Device driver %s not found.", argv[ARGV_DEV]); in cmd_i3c_ccc_rstdaa()
585 shell_error(sh, "I3C: unable to send CCC RSTDAA."); in cmd_i3c_ccc_rstdaa()
598 /* i3c ccc entdaa <device> */
605 shell_error(sh, "I3C: Device driver %s not found.", argv[ARGV_DEV]); in cmd_i3c_ccc_entdaa()
612 /* i3c ccc setaasa <device> */
621 shell_error(sh, "I3C: Device driver %s not found.", argv[ARGV_DEV]); in cmd_i3c_ccc_setaasa()
627 shell_error(sh, "I3C: unable to send CCC SETAASA."); in cmd_i3c_ccc_setaasa()
642 /* i3c ccc setdasa <device> <target> <dynamic address> */
662 shell_error(sh, "I3C: Address 0x%02x is already in use.", dynamic_addr); in cmd_i3c_ccc_setdasa()
667 shell_error(sh, "I3C: unable to send CCC SETDASA."); in cmd_i3c_ccc_setdasa()
676 shell_error(sh, "I3C: unable to reattach device"); in cmd_i3c_ccc_setdasa()
684 /* i3c ccc setnewda <device> <target> <dynamic address> */
705 shell_error(sh, "I3C: Address 0x%02x is already in use.", dynamic_addr); in cmd_i3c_ccc_setnewda()
711 shell_error(sh, "I3C: unable to send CCC SETDASA."); in cmd_i3c_ccc_setnewda()
720 shell_error(sh, "I3C: unable to reattach device"); in cmd_i3c_ccc_setnewda()
727 /* i3c ccc getbcr <device> <target> */
742 shell_error(sh, "I3C: unable to send CCC GETBCR."); in cmd_i3c_ccc_getbcr()
752 /* i3c ccc getdcr <device> <target> */
767 shell_error(sh, "I3C: unable to send CCC GETDCR."); in cmd_i3c_ccc_getdcr()
777 /* i3c ccc getpid <device> <target> */
792 shell_error(sh, "I3C: unable to send CCC GETPID."); in cmd_i3c_ccc_getpid()
801 /* i3c ccc getmrl <device> <target> */
816 shell_error(sh, "I3C: unable to send CCC GETMRL."); in cmd_i3c_ccc_getmrl()
832 /* i3c ccc getmwl <device> <target> */
847 shell_error(sh, "I3C: unable to send CCC GETMWL."); in cmd_i3c_ccc_getmwl()
857 /* i3c ccc setmrl <device> <target> <max read length> [<max ibi length>] */
872 shell_error(sh, "I3C: Missing IBI length."); in cmd_i3c_ccc_setmrl()
883 shell_error(sh, "I3C: unable to send CCC SETMRL."); in cmd_i3c_ccc_setmrl()
895 /* i3c ccc setmwl <device> <target> <max write length> */
912 shell_error(sh, "I3C: unable to send CCC SETMWL."); in cmd_i3c_ccc_setmwl()
921 /* i3c ccc setmrl_bc <device> <max read length> [<max ibi length>] */
931 shell_error(sh, "I3C: Device driver %s not found.", argv[ARGV_DEV]); in cmd_i3c_ccc_setmrl_bc()
942 shell_error(sh, "I3C: unable to send CCC SETMRL BC."); in cmd_i3c_ccc_setmrl_bc()
956 /* i3c ccc setmwl_bc <device> <max write length> */
966 shell_error(sh, "I3C: Device driver %s not found.", argv[ARGV_DEV]); in cmd_i3c_ccc_setmwl_bc()
974 shell_error(sh, "I3C: unable to send CCC SETMWL BC."); in cmd_i3c_ccc_setmwl_bc()
985 /* i3c ccc deftgts <device> */
993 shell_error(sh, "I3C: Device driver %s not found.", argv[ARGV_DEV]); in cmd_i3c_ccc_deftgts()
998 shell_error(sh, "I3C: No secondary controller on the bus"); in cmd_i3c_ccc_deftgts()
1004 shell_error(sh, "I3C: unable to send CCC DEFTGTS."); in cmd_i3c_ccc_deftgts()
1011 /* i3c ccc enttm <device> <defining byte> */
1020 shell_error(sh, "I3C: Device driver %s not found.", argv[ARGV_DEV]); in cmd_i3c_ccc_enttm()
1028 shell_error(sh, "I3C: unable to send CCC ENTTM."); in cmd_i3c_ccc_enttm()
1035 /* i3c ccc rstact_bc <device> <defining byte> */
1044 shell_error(sh, "I3C: Device driver %s not found.", argv[ARGV_DEV]); in cmd_i3c_ccc_rstact_bc()
1052 shell_error(sh, "I3C: unable to send CCC RSTACT BC."); in cmd_i3c_ccc_rstact_bc()
1059 /* i3c ccc rstact <device> <target> <"set"/"get"> <defining byte> */
1080 shell_error(sh, "I3C: invalid parameter"); in cmd_i3c_ccc_rstact()
1085 shell_error(sh, "I3C: unable to send CCC RSTACT."); in cmd_i3c_ccc_rstact()
1097 /* i3c ccc enec_bc <device> <defining byte> */
1106 shell_error(sh, "I3C: Device driver %s not found.", argv[ARGV_DEV]); in cmd_i3c_ccc_enec_bc()
1114 shell_error(sh, "I3C: unable to send CCC ENEC BC."); in cmd_i3c_ccc_enec_bc()
1121 /* i3c ccc disec_bc <device> <defining byte> */
1130 shell_error(sh, "I3C: Device driver %s not found.", argv[ARGV_DEV]); in cmd_i3c_ccc_disec_bc()
1138 shell_error(sh, "I3C: unable to send CCC DISEC BC."); in cmd_i3c_ccc_disec_bc()
1145 /* i3c ccc enec <device> <target> <defining byte> */
1162 shell_error(sh, "I3C: unable to send CCC ENEC."); in cmd_i3c_ccc_enec()
1169 /* i3c ccc disec <device> <target> <defining byte> */
1186 shell_error(sh, "I3C: unable to send CCC DISEC."); in cmd_i3c_ccc_disec()
1193 /* i3c ccc entas0_bc <device> */
1202 shell_error(sh, "I3C: Device driver %s not found.", argv[ARGV_DEV]); in cmd_i3c_ccc_entas0_bc()
1209 shell_error(sh, "I3C: unable to send CCC ENTAS0 BC."); in cmd_i3c_ccc_entas0_bc()
1216 /* i3c ccc entas1_bc <device> */
1225 shell_error(sh, "I3C: Device driver %s not found.", argv[ARGV_DEV]); in cmd_i3c_ccc_entas1_bc()
1232 shell_error(sh, "I3C: unable to send CCC ENTAS1 BC."); in cmd_i3c_ccc_entas1_bc()
1239 /* i3c ccc entas2_bc <device> */
1248 shell_error(sh, "I3C: Device driver %s not found.", argv[ARGV_DEV]); in cmd_i3c_ccc_entas2_bc()
1255 shell_error(sh, "I3C: unable to send CCC ENTAS2 BC."); in cmd_i3c_ccc_entas2_bc()
1262 /* i3c ccc entas3_bc <device> */
1271 shell_error(sh, "I3C: Device driver %s not found.", argv[ARGV_DEV]); in cmd_i3c_ccc_entas3_bc()
1278 shell_error(sh, "I3C: unable to send CCC ENTAS3 BC."); in cmd_i3c_ccc_entas3_bc()
1285 /* i3c ccc entas0 <device> <target> */
1299 shell_error(sh, "I3C: unable to send CCC ENTAS0."); in cmd_i3c_ccc_entas0()
1306 /* i3c ccc entas1 <device> <target> */
1320 shell_error(sh, "I3C: unable to send CCC ENTAS1."); in cmd_i3c_ccc_entas1()
1327 /* i3c ccc entas2 <device> <target> */
1341 shell_error(sh, "I3C: unable to send CCC ENTAS2."); in cmd_i3c_ccc_entas2()
1348 /* i3c ccc entas3 <device> <target> */
1362 shell_error(sh, "I3C: unable to send CCC ENTAS3."); in cmd_i3c_ccc_entas3()
1369 /* i3c ccc getstatus <device> <target> [<defining byte>] */
1398 shell_error(sh, "I3C: unable to send CCC GETSTATUS."); in cmd_i3c_ccc_getstatus()
1415 /* i3c ccc getcaps <device> <target> [<defining byte>] */
1446 shell_error(sh, "I3C: unable to send CCC GETCAPS."); in cmd_i3c_ccc_getcaps()
1473 /* i3c ccc getvendor <device> <target> <id> [<defining byte>] */
1487 shell_error(sh, "I3C: Device driver %s not found.", argv[ARGV_DEV]); in cmd_i3c_ccc_getvendor()
1493 shell_error(sh, "I3C: Device driver %s not found.", argv[ARGV_TDEV]); in cmd_i3c_ccc_getvendor()
1498 shell_error(sh, "I3C: Device %s not attached to bus.", tdev->name); in cmd_i3c_ccc_getvendor()
1504 shell_error(sh, "I3C: Invalid ID."); in cmd_i3c_ccc_getvendor()
1517 shell_error(sh, "I3C: unable to send CCC VENDOR."); in cmd_i3c_ccc_getvendor()
1526 /* i3c ccc setvendor <device> <target> <id> [<bytes>] */
1541 shell_error(sh, "I3C: Device driver %s not found.", argv[ARGV_DEV]); in cmd_i3c_ccc_setvendor()
1547 shell_error(sh, "I3C: Device driver %s not found.", argv[ARGV_TDEV]); in cmd_i3c_ccc_setvendor()
1552 shell_error(sh, "I3C: Device %s not attached to bus.", tdev->name); in cmd_i3c_ccc_setvendor()
1559 shell_error(sh, "I3C: Invalid ID."); in cmd_i3c_ccc_setvendor()
1570 shell_error(sh, "I3C: unable to send CCC VENDOR."); in cmd_i3c_ccc_setvendor()
1577 /* i3c ccc setvendor_bc <device> <id> [<bytes>] */
1590 shell_error(sh, "I3C: Device driver %s not found.", argv[ARGV_DEV]); in cmd_i3c_ccc_setvendor_bc()
1596 shell_error(sh, "I3C: Invalid ID."); in cmd_i3c_ccc_setvendor_bc()
1607 shell_error(sh, "I3C: unable to send CCC VENDOR."); in cmd_i3c_ccc_setvendor_bc()
1614 /* i3c ccc setbuscon <device> <context> [<optional bytes>] */
1625 shell_error(sh, "I3C: Device driver %s not found.", argv[ARGV_DEV]); in cmd_i3c_ccc_setbuscon()
1636 shell_error(sh, "I3C: unable to send CCC SETBUSCON."); in cmd_i3c_ccc_setbuscon()
1643 /* i3c ccc getmxds <device> <target> [<defining byte>] */
1659 shell_error(sh, "I3C: Device %s does not support max data speed limit", in cmd_i3c_ccc_getmxds()
1678 shell_error(sh, "I3C: unable to send CCC GETMXDS."); in cmd_i3c_ccc_getmxds()
1714 shell_error(sh, "I3C: Device driver %s not found.", argv[ARGV_DEV]); in cmd_i3c_attach()
1719 shell_error(sh, "I3C: Device driver %s not found.", argv[ARGV_TDEV]); in cmd_i3c_attach()
1724 shell_error(sh, "I3C: Device %s not attached to bus.", tdev->name); in cmd_i3c_attach()
1730 shell_error(sh, "I3C: unable to attach device %s.", tdev->name); in cmd_i3c_attach()
1754 shell_error(sh, "I3C: unable to reattach device %s.", tdev->name); in cmd_i3c_reattach()
1773 shell_error(sh, "I3C: unable to detach device %s.", tdev->name); in cmd_i3c_detach()
1788 shell_error(sh, "I3C: Device driver %s not found.", argv[ARGV_DEV]); in cmd_i3c_i2c_attach()
1794 shell_error(sh, "I3C: I2C addr 0x%02x not listed with the bus.", addr); in cmd_i3c_i2c_attach()
1800 shell_error(sh, "I3C: unable to attach I2C addr 0x%02x.", addr); in cmd_i3c_i2c_attach()
1815 shell_error(sh, "I3C: Device driver %s not found.", argv[ARGV_DEV]); in cmd_i3c_i2c_detach()
1821 shell_error(sh, "I3C: I2C addr 0x%02x not listed with the bus.", addr); in cmd_i3c_i2c_detach()
1827 shell_error(sh, "I3C: unable to detach I2C addr 0x%02x.", addr); in cmd_i3c_i2c_detach()
1835 * simple on an I3C bus as it is with the I2C Shell.
1837 * This will print "I3" if an address is already assigned for an I3C
1840 * to section 5.1.2.2.5 I3C Target Address Restrictions in I3C v1.1.1.
1854 /* i3c i2c_scan <device> */
1865 shell_error(sh, "I3C: Device driver %s not found.", argv[ARGV_DEV]); in cmd_i3c_i2c_scan()
1893 shell_error(sh, "I3C: unable to attach I2C addr 0x%02x.", in cmd_i3c_i2c_scan()
1910 shell_error(sh, "I3C: unable to detach I2C addr 0x%02x.", in cmd_i3c_i2c_scan()
1932 /* i3c ibi hj <device> */
1941 shell_error(sh, "I3C: Device driver %s not found.", argv[ARGV_DEV]); in cmd_i3c_ibi_hj()
1948 shell_error(sh, "I3C: Unable to issue IBI HJ"); in cmd_i3c_ibi_hj()
1952 shell_print(sh, "I3C: Issued IBI HJ"); in cmd_i3c_ibi_hj()
1957 /* i3c ibi cr <device> */
1966 shell_error(sh, "I3C: Device driver %s not found.", argv[ARGV_DEV]); in cmd_i3c_ibi_cr()
1973 shell_error(sh, "I3C: Unable to issue IBI CR"); in cmd_i3c_ibi_cr()
1977 shell_print(sh, "I3C: Issued IBI CR"); in cmd_i3c_ibi_cr()
1982 /* i3c ibi tir <device> [<bytes>]*/
1994 shell_error(sh, "I3C: Device driver %s not found.", argv[ARGV_DEV]); in cmd_i3c_ibi_tir()
2009 shell_error(sh, "I3C: Unable to issue IBI TIR"); in cmd_i3c_ibi_tir()
2013 shell_print(sh, "I3C: Issued IBI TIR"); in cmd_i3c_ibi_tir()
2018 /* i3c ibi enable <device> <target> */
2032 shell_error(sh, "I3C: Unable to enable IBI"); in cmd_i3c_ibi_enable()
2036 shell_print(sh, "I3C: Enabled IBI"); in cmd_i3c_ibi_enable()
2041 /* i3c ibi disable <device> <target> */
2055 shell_error(sh, "I3C: Unable to disable IBI"); in cmd_i3c_ibi_disable()
2059 shell_print(sh, "I3C: Disabled IBI"); in cmd_i3c_ibi_disable()
2108 /* L2 I3C IBI Shell Commands*/
2135 /* L3 I3C HDR DDR Shell Commands*/
2149 /* L2 I3C HDR Shell Commands*/
2159 /* L2 I3C CCC Shell Commands*/
2313 /* L1 I3C Shell Commands*/
2317 "Get I3C device info\n"
2321 "Set I3C device speed\n"
2325 "Recover I3C bus\n"
2329 "Read bytes from an I3C device\n"
2333 "Read a byte from an I3C device\n"
2337 "Write bytes to an I3C device\n"
2341 "Write a byte to an I3C device\n"
2345 "Attach I3C device from the bus\n"
2349 "Reattach I3C device from the bus\n"
2353 "Detach I3C device from the bus\n"
2369 "Send I3C CCC\n"
2373 "Send I3C HDR\n"
2378 "Send I3C IBI\n"
2385 SHELL_CMD_REGISTER(i3c, &sub_i3c_cmds, "I3C commands", NULL);