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

TOMOYO Linux Cross Reference
Linux/Documentation/misc-devices/c2port.rst

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ 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.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /Documentation/misc-devices/c2port.rst (Version linux-6.11.5) and /Documentation/misc-devices/c2port.rst (Version linux-5.3.18)


  1 .. SPDX-License-Identifier: GPL-2.0               
  2 .. include:: <isonum.txt>                         
  3                                                   
  4 ===============                                   
  5 C2 port support                                   
  6 ===============                                   
  7                                                   
  8 (C) Copyright 2007 Rodolfo Giometti <giometti@e    
  9                                                   
 10 This program is free software; you can redistr    
 11 it under the terms of the GNU General Public L    
 12 the Free Software Foundation; either version 2    
 13 (at your option) any later version.               
 14                                                   
 15 This program is distributed in the hope that i    
 16 but WITHOUT ANY WARRANTY; without even the imp    
 17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PU    
 18 GNU General Public License for more details.      
 19                                                   
 20                                                   
 21                                                   
 22 Overview                                          
 23 --------                                          
 24                                                   
 25 This driver implements the support for Linux o    
 26 C2 Interface used for in-system programming of    
 27                                                   
 28 By using this driver you can reprogram the in-    
 29 or EC3 debug adapter. This solution is also us    
 30 where the micro controller is connected via sp    
 31                                                   
 32 References                                        
 33 ----------                                        
 34                                                   
 35 The C2 Interface main references are at (https    
 36 Silicon Laboratories site], see:                  
 37                                                   
 38 - AN127: FLASH Programming via the C2 Interfac    
 39   https://www.silabs.com/Support Documents/Tec    
 40                                                   
 41 - C2 Specification at                             
 42   https://www.silabs.com/pages/DownloadDoc.asp    
 43                                                   
 44 however it implements a two wire serial commun    
 45 banging) designed to enable in-system programm    
 46 boundary-scan testing on low pin-count Silicon    
 47 this code supports only flash programming but     
 48 add.                                              
 49                                                   
 50 Using the driver                                  
 51 ----------------                                  
 52                                                   
 53 Once the driver is loaded you can use sysfs su    
 54 info or read/write in-system flash::              
 55                                                   
 56   # ls /sys/class/c2port/c2port0/                 
 57   access            flash_block_size  flash_er    
 58   dev_id            flash_blocks_num  flash_si    
 59   flash_access      flash_data        reset       
 60                                                   
 61 Initially the C2port access is disabled since     
 62 such lines multiplexed with other devices so,     
 63 C2port, you need the command::                    
 64                                                   
 65   # echo 1 > /sys/class/c2port/c2port0/access     
 66                                                   
 67 after that you should read the device ID and r    
 68 connected micro controller::                      
 69                                                   
 70   # cat /sys/class/c2port/c2port0/dev_id          
 71   8                                               
 72   # cat /sys/class/c2port/c2port0/rev_id          
 73   1                                               
 74                                                   
 75 However, for security reasons, the in-system f    
 76 enabled yet, to do so you need the command::      
 77                                                   
 78   # echo 1 > /sys/class/c2port/c2port0/flash_a    
 79                                                   
 80 After that you can read the whole flash::         
 81                                                   
 82   # cat /sys/class/c2port/c2port0/flash_data >    
 83                                                   
 84 erase it::                                        
 85                                                   
 86   # echo 1 > /sys/class/c2port/c2port0/flash_e    
 87                                                   
 88 and write it::                                    
 89                                                   
 90   # cat image > /sys/class/c2port/c2port0/flas    
 91                                                   
 92 after writing you have to reset the device to     
 93                                                   
 94   # echo 1 > /sys/class/c2port/c2port0/reset      
                                                      

~ [ 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