€•&=Œsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ8/translations/zh_CN/dev-tools/gpio-sloppy-logic-analyzer”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ8/translations/zh_TW/dev-tools/gpio-sloppy-logic-analyzer”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ8/translations/it_IT/dev-tools/gpio-sloppy-logic-analyzer”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ8/translations/ja_JP/dev-tools/gpio-sloppy-logic-analyzer”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ8/translations/ko_KR/dev-tools/gpio-sloppy-logic-analyzer”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ8/translations/sp_SP/dev-tools/gpio-sloppy-logic-analyzer”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒcomment”“”)”}”(hŒ SPDX-License-Identifier: GPL-2.0”h]”hŒ SPDX-License-Identifier: GPL-2.0”…””}”hh£sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1h¡hhhžhhŸŒR/var/lib/git/docbuild/linux/Documentation/dev-tools/gpio-sloppy-logic-analyzer.rst”h KubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒ-Linux Kernel GPIO based sloppy logic analyzer”h]”hŒ-Linux Kernel GPIO based sloppy logic analyzer”…””}”(hh»hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hh¶hžhhŸh³h KubhŒ field_list”“”)”}”(hhh]”hŒfield”“”)”}”(hhh]”(hŒ field_name”“”)”}”(hŒAuthor”h]”hŒAuthor”…””}”(hhÕhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÓhhÐhŸh³h KubhŒ field_body”“”)”}”(hŒ Wolfram Sang ”h]”hŒ paragraph”“”)”}”(hŒ Wolfram Sang”h]”hŒ Wolfram Sang”…””}”(hhëhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1héhŸh³h Khhåubah}”(h]”h ]”h"]”h$]”h&]”uh1hãhhÐubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÎhŸh³h KhhËhžhubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhh¶hžhhŸh³h Kubhµ)”}”(hhh]”(hº)”}”(hŒ Introduction”h]”hŒ Introduction”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hj hžhhŸh³h K ubhê)”}”(hŒuThis document briefly describes how to run the GPIO based in-kernel sloppy logic analyzer running on an isolated CPU.”h]”hŒuThis document briefly describes how to run the GPIO based in-kernel sloppy logic analyzer running on an isolated CPU.”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1héhŸh³h K hj hžhubhê)”}”(hXThe sloppy logic analyzer will utilize a few GPIO lines in input mode on a system to rapidly sample these digital lines, which will, if the Nyquist criteria is met, result in a time series log with approximate waveforms as they appeared on these lines. One way to use it is to analyze external traffic connected to these GPIO lines with wires (i.e. digital probes), acting as a common logic analyzer.”h]”hXThe sloppy logic analyzer will utilize a few GPIO lines in input mode on a system to rapidly sample these digital lines, which will, if the Nyquist criteria is met, result in a time series log with approximate waveforms as they appeared on these lines. One way to use it is to analyze external traffic connected to these GPIO lines with wires (i.e. digital probes), acting as a common logic analyzer.”…””}”(hj*hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1héhŸh³h Khj hžhubhê)”}”(hXÑAnother feature is to snoop on on-chip peripherals if the I/O cells of these peripherals can be used in GPIO input mode at the same time as they are being used as inputs or outputs for the peripheral. That means you could e.g. snoop I2C traffic without any wiring (if your hardware supports it). In the pin control subsystem such pin controllers are called "non-strict": a certain pin can be used with a certain peripheral and as a GPIO input line at the same time.”h]”hXÕAnother feature is to snoop on on-chip peripherals if the I/O cells of these peripherals can be used in GPIO input mode at the same time as they are being used as inputs or outputs for the peripheral. That means you could e.g. snoop I2C traffic without any wiring (if your hardware supports it). In the pin control subsystem such pin controllers are called “non-strictâ€: a certain pin can be used with a certain peripheral and as a GPIO input line at the same time.”…””}”(hj8hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1héhŸh³h Khj hžhubhê)”}”(hXNote that this is a last resort analyzer which can be affected by latencies, non-deterministic code paths and non-maskable interrupts. It is called 'sloppy' for a reason. However, for e.g. remote development, it may be useful to get a first view and aid further debugging.”h]”hXNote that this is a last resort analyzer which can be affected by latencies, non-deterministic code paths and non-maskable interrupts. It is called ‘sloppy’ for a reason. However, for e.g. remote development, it may be useful to get a first view and aid further debugging.”…””}”(hjFhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1héhŸh³h Khj hžhubeh}”(h]”Œ introduction”ah ]”h"]”Œ introduction”ah$]”h&]”uh1h´hh¶hžhhŸh³h K ubhµ)”}”(hhh]”(hº)”}”(hŒSetup”h]”hŒSetup”…””}”(hj_hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hj\hžhhŸh³h K$ubhê)”}”(hX,Your kernel must have CONFIG_DEBUG_FS and CONFIG_CPUSETS enabled. Ideally, your runtime environment does not utilize cpusets otherwise, then isolation of a CPU core is easiest. If you do need cpusets, check that helper script for the sloppy logic analyzer does not interfere with your other settings.”h]”hX,Your kernel must have CONFIG_DEBUG_FS and CONFIG_CPUSETS enabled. Ideally, your runtime environment does not utilize cpusets otherwise, then isolation of a CPU core is easiest. If you do need cpusets, check that helper script for the sloppy logic analyzer does not interfere with your other settings.”…””}”(hjmhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1héhŸh³h K&hj\hžhubhê)”}”(hŒÄTell the kernel which GPIOs are used as probes. For a Device Tree based system, you need to use the following bindings. Because these bindings are only for debugging, there is no official schema::”h]”hŒÃTell the kernel which GPIOs are used as probes. For a Device Tree based system, you need to use the following bindings. Because these bindings are only for debugging, there is no official schema:”…””}”(hj{hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1héhŸh³h K+hj\hžhubhŒ literal_block”“”)”}”(hŒ·i2c-analyzer { compatible = "gpio-sloppy-logic-analyzer"; probe-gpios = <&gpio6 21 GPIO_OPEN_DRAIN>, <&gpio6 4 GPIO_OPEN_DRAIN>; probe-names = "SCL", "SDA"; };”h]”hŒ·i2c-analyzer { compatible = "gpio-sloppy-logic-analyzer"; probe-gpios = <&gpio6 21 GPIO_OPEN_DRAIN>, <&gpio6 4 GPIO_OPEN_DRAIN>; probe-names = "SCL", "SDA"; };”…””}”hj‹sbah}”(h]”h ]”h"]”h$]”h&]”h±h²uh1j‰hŸh³h K/hj\hžhubhê)”}”(hŒžNote that you must provide a name for every GPIO specified. Currently a maximum of 8 probes are supported. 32 are likely possible but are not implemented yet.”h]”hŒžNote that you must provide a name for every GPIO specified. Currently a maximum of 8 probes are supported. 32 are likely possible but are not implemented yet.”…””}”(hj™hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1héhŸh³h K5hj\hžhubeh}”(h]”Œsetup”ah ]”h"]”Œsetup”ah$]”h&]”uh1h´hh¶hžhhŸh³h K$ubhµ)”}”(hhh]”(hº)”}”(hŒUsage”h]”hŒUsage”…””}”(hj²hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hj¯hžhhŸh³h K:ubhê)”}”(hX:The logic analyzer is configurable via files in debugfs. However, it is strongly recommended to not use them directly, but to use the script ``tools/gpio/gpio-sloppy-logic-analyzer``. Besides checking parameters more extensively, it will isolate the CPU core so you will have the least disturbance while measuring.”h]”(hŒThe logic analyzer is configurable via files in debugfs. However, it is strongly recommended to not use them directly, but to use the script ”…””}”(hjÀhžhhŸNh NubhŒliteral”“”)”}”(hŒ)``tools/gpio/gpio-sloppy-logic-analyzer``”h]”hŒ%tools/gpio/gpio-sloppy-logic-analyzer”…””}”(hjÊhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÈhjÀubhŒ„. Besides checking parameters more extensively, it will isolate the CPU core so you will have the least disturbance while measuring.”…””}”(hjÀhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1héhŸh³h K”h]”hŒ!i2cdetect -y -r ”…””}”hjBsbah}”(h]”h ]”h"]”h$]”h&]”h±h²uh1j‰hŸh³h KVhj¯hžhubhê)”}”(hXResult is a .sr file to be consumed with PulseView or sigrok-cli from the free `sigrok`_ project. It is a zip file which also contains the binary sample data which may be consumed by other software. The filename is the logic analyzer instance name plus a since-epoch timestamp.”h]”(hŒOResult is a .sr file to be consumed with PulseView or sigrok-cli from the free ”…””}”(hjPhžhhŸNh NubhŒ reference”“”)”}”(hŒ `sigrok`_”h]”hŒsigrok”…””}”(hjZhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”Œname”Œsigrok”Œrefuri”Œhttps://sigrok.org/”uh1jXhjPŒresolved”KubhŒ½ project. It is a zip file which also contains the binary sample data which may be consumed by other software. The filename is the logic analyzer instance name plus a since-epoch timestamp.”…””}”(hjPhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1héhŸh³h KXhj¯hžhubhŒtarget”“”)”}”(hŒ.. _sigrok: https://sigrok.org/”h]”h}”(h]”Œsigrok”ah ]”h"]”Œsigrok”ah$]”h&]”jjjkuh1jwh K]hj¯hžhhŸh³Œ referenced”Kubeh}”(h]”Œusage”ah ]”h"]”Œusage”ah$]”h&]”uh1h´hh¶hžhhŸh³h K:ubeh}”(h]”Œ-linux-kernel-gpio-based-sloppy-logic-analyzer”ah ]”h"]”Œ-linux kernel gpio based sloppy logic analyzer”ah$]”h&]”uh1h´hhhžhhŸh³h Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”h³uh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)”}”(h¹NŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”j¹Œerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”h³Œ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œsigrok”]”jZasŒrefids”}”Œnameids”}”(j“jjYjVj¬j©j‹jˆj‚juŒ nametypes”}”(j“‰jY‰j¬‰j‹‰j‚ˆuh}”(jh¶jVj j©j\jˆj¯jjyuŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”Œtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nhžhub.