~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/Documentation/dev-tools/gpio-sloppy-logic-analyzer.rst

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /Documentation/dev-tools/gpio-sloppy-logic-analyzer.rst (Version linux-6.12-rc7) and /Documentation/dev-tools/gpio-sloppy-logic-analyzer.rst (Version linux-4.19.323)


  1 .. SPDX-License-Identifier: GPL-2.0               
  2                                                   
  3 =============================================     
  4 Linux Kernel GPIO based sloppy logic analyzer     
  5 =============================================     
  6                                                   
  7 :Author: Wolfram Sang                             
  8                                                   
  9 Introduction                                      
 10 ============                                      
 11                                                   
 12 This document briefly describes how to run the    
 13 logic analyzer running on an isolated CPU.        
 14                                                   
 15 The sloppy logic analyzer will utilize a few G    
 16 system to rapidly sample these digital lines,     
 17 criteria is met, result in a time series log w    
 18 appeared on these lines. One way to use it is     
 19 connected to these GPIO lines with wires (i.e.    
 20 common logic analyzer.                            
 21                                                   
 22 Another feature is to snoop on on-chip periphe    
 23 peripherals can be used in GPIO input mode at     
 24 used as inputs or outputs for the peripheral.     
 25 I2C traffic without any wiring (if your hardwa    
 26 control subsystem such pin controllers are cal    
 27 can be used with a certain peripheral and as a    
 28 time.                                             
 29                                                   
 30 Note that this is a last resort analyzer which    
 31 non-deterministic code paths and non-maskable     
 32 for a reason. However, for e.g. remote develop    
 33 first view and aid further debugging.             
 34                                                   
 35 Setup                                             
 36 =====                                             
 37                                                   
 38 Your kernel must have CONFIG_DEBUG_FS and CONF    
 39 runtime environment does not utilize cpusets o    
 40 core is easiest. If you do need cpusets, check    
 41 sloppy logic analyzer does not interfere with     
 42                                                   
 43 Tell the kernel which GPIOs are used as probes    
 44 you need to use the following bindings. Becaus    
 45 debugging, there is no official schema::          
 46                                                   
 47     i2c-analyzer {                                
 48             compatible = "gpio-sloppy-logic-an    
 49             probe-gpios = <&gpio6 21 GPIO_OPEN    
 50             probe-names = "SCL", "SDA";           
 51     };                                            
 52                                                   
 53 Note that you must provide a name for every GP    
 54 maximum of 8 probes are supported. 32 are like    
 55 implemented yet.                                  
 56                                                   
 57 Usage                                             
 58 =====                                             
 59                                                   
 60 The logic analyzer is configurable via files i    
 61 strongly recommended to not use them directly,    
 62 ``tools/gpio/gpio-sloppy-logic-analyzer``. Bes    
 63 extensively, it will isolate the CPU core so y    
 64 disturbance while measuring.                      
 65                                                   
 66 The script has a help option explaining the pa    
 67 snippet which analyzes an I2C bus at 400kHz on    
 68 following settings are used: The isolated CPU     
 69 core in a big.LITTLE setup. Because CPU1 is th    
 70 parameter. The bus speed is 400kHz. So, the sa    
 71 sample at least at 800kHz. However, falling ed    
 72 start condition happen faster, so we need a hi    
 73 ``-s 1500000`` for 1.5MHz. Also, we don't want    
 74 for a start condition on an idle bus. So, we n    
 75 edge on SDA while SCL stays high, i.e. ``-t 1H    
 76 us assume 15ms here which results in the param    
 77 altogether::                                      
 78                                                   
 79     gpio-sloppy-logic-analyzer -s 1500000 -t 1    
 80                                                   
 81 Note that the process will return you back to     
 82 still sampling in the background. Unless this     
 83 result file in the current or specified direct    
 84 will then need to trigger I2C communication::     
 85                                                   
 86     i2cdetect -y -r <your bus number>             
 87                                                   
 88 Result is a .sr file to be consumed with Pulse    
 89 `sigrok`_ project. It is a zip file which also    
 90 which may be consumed by other software. The f    
 91 instance name plus a since-epoch timestamp.       
 92                                                   
 93 .. _sigrok: https://sigrok.org/                   
                                                      

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php