Hi! We're discussing a clarification of the content license; please look over to Current events if you're interested in editing.
RaphaelMicroP
From Htc-linux
cc - KLT1: The I2C id is 0x66 (0xcc>>1) cc,10,val8 channel interpolation ; wr cc,11,val8 total runtimes ; wr cc,12,<0a,x pointsequence cmd+buf ; wr mul cc,13,<0a,x pointsequence cmd+buf; wr mul cc,14,<0a,x pointsequence cmd+buf; wr mul cc,15,<0a,x pointsequence cmd+buf; wr mul cc,16,2,x channel power enable; wr mul cc,20,val8 ledmisc ; wr cc,20,val8=02 lcd poweron related ; wr cc,20,val8=0c led ; wr cc,20,80,30 leo100 cc,21,1/0,0,4 topa100, leo100: SPIcontrol cc,22,val8 LCDbrightness ; wr -> wince manual control: 0x00 - 0x90 cc,23,02,x naviledbrightness_auto ; wr leo100: cc,23,1,0 ; init_frontlight ; wr cc,24,04,x ledautomode ; wr cc,25,02,x turnoffmethod, GPO control? ; wr cc,26,02,x ledflashtime ; wr leo100: cc,26,1,0 ; wr -> backlight on/off cc,30,02,x - get ledversion ; rd cc,31,02,x readchannel power enable ; rd cc,32,02,x ADClevel, brightnesslevel, msgled,resetsource ; rd cc,33, ADCval read; light sensor -> read high byte of dword (0x0000 - 0xff00) cc,40,xx,yy - see below cc,41,3c,x -> LED TBL (hardcoded) ; wr mul cc,42,[3c,1e],x -> DC TBL (hardcoded); wr mul cc,43,[0a,3c],x -> NAVI TBL (hardcoded) ; wr mul cc,50,01 -> IOCTL_KEYPAD_REQUEST_KEYPAD_NOTIFICATIONS cc,50,00 -> IOCTL_KEYPAD_STOP_KEYPAD_NOTIFICATIONS leo100: cc,51,val,4 -> extsystemLED behaviour cc,64, -> reqRemoteADCvalue topa100: cc,70,xx,3,1 -> wr, spilcmdata cc,71,[a,11,29],0 -> wr, lcd control cc,72,2,0 -> rd, lcd control leo100: cc,73,a, cc,74,a, -> reqGsensorData cc,75, -> reqGsensorXYZData cc,76, -> see table below cc,77, -> see table below cc,78, -> see table below cc,79, -> see table below cc,90, -> wr, EnableGPO : GPOStatus: 0x2000000, EnableGPOValue: 0x2 cc,91,0,3 -> wr, DisableGPO: GPOStatus: 0x0,DisableGPOValue: 0x3 cc,a0, -> wr, SetRotationPolling: RotationPollingCtrlValue: 0x10a01 cc,a2, -> wr, SetFaceUpDownRotationInterrupt: cc,a3,8,x -> wr, setRotationThreshold: [0]: 0x0 [1]: 0x40 [2]: 0xff [3]: 0xc0 [4]: 0x0 [5]: 0x40 [6]: 0xff [7]: 0xa6 cc,a4, -> wr, SetFaceUpDownThreshold: FaceUpDownThresholdValue: 0x160016
cc,40,xx,yy:
| xx | yy | Description |
| 00 | 20 | default (lcd backlight on, no leds) |
| 00 | LEDs off | |
| 01 | Home LED | |
| 02 | Back LED | |
| 04 | End LED | |
| 08 | Send LED | |
| 10 | Solid ring LEDs | |
| 1f | All On (i.e., bits can be combined) | |
| 00 | sys LED behavior off | |
| 01 | \"ringing\" (quick flash of sys/Ring & Send) | |
| 02 | flash/blink once | |
| 04 | \"breathe\" sequence | |
| 05 | fade on/off | |
| 08 | CCW rotate | |
| 10 | top & bottom 2xblink | |
| 20 | LCD backlight on | |
| 40 | Keyboard Backlight (RAPH100) |
raph:
ce - KSC1: keyboard, The I2C id is 0x67 (0xce>>1)
ce,10,02,x get result rd
ce,11,02,x get pin status rd
ce,12,02,x get_version rd (0,1)
* RAPH800: 0685
* RAPH100: -- fill me in
ce,13,val8 -> misc value (keyboard LEDs) ; rd/wr
xx:
* 0x10 - Fn and CAPS LED on
* 0x12 - CAPS LED on
* 0x14 - Fn LED on
* 0x16 - Off
multi: id,addr,size/data,retry
id,addr,size,(ptr) <- read
See RaphaelKeyboard for keymap
22:44:48 [D:KEY] [[I2C_RM]] (0xcc, 0x32, 0x2)~! 22:44:48 [D:BKL] Got "All_Awake" event~! 22:44:48 [D:BKL] HW_SetFlashLight 8 1 22:44:48 [D:MISC] [WriteSystemLedBehaviorToI2C]: dwSystemLEDBehaviorMask: 0xf1f dwSystemLEDBehavior: 0xffe5 dwPreSystemLEDBehavior: 0x20 22:44:48 [D:MISC] [WriteSystemLedBehaviorToI2C] Clear Batt Bit[[2:0]] 20 22:44:48 [D:MISC] [WriteNAVIBrightnessLEDAutoControlToI2C] dwNAVIValue: 0x178====== 22:44:48 [D:KEY] [I2C_WM] (0xcc, 0x23, 0x2, 1 78) 22:44:26 [D:MISC] [KLT_Init] Microp write table start~!~! 22:44:26 [D:KEY] [I2C_WM] (0xcc, 0x41, 0x3c, 0 0) 22:44:26 [D:KEY] [I2C_WM] (0xcc, 0x42, 0x3c, 6 1b) 22:44:26 [D:KEY] [I2C_WM] (0xcc, 0x43, 0x3c, 20 20)
| cmd id | r/w | name | boards | (nparams)params/(nvalues)values | description |
| x20 | w | misc | raph/diam/blac/? | MISC_CAP_SEN_RES_CTRL1 0x02, MISC_CAP_SEN_RES_CTRL2 0x40, MISC_MICP_ISP 0x80 | |
| x21 | w | SPI_EN | Topaz/Rhod/Leo/Mahi | (1)on | Enable SPI link for LCM and accelerometer (and others ?) |
| x22 | w | BACK_BRIGHT | Topaz/Rhod/Blac/Raph/Diam | (1)brightness | Set backlight brightness |
| x23 | w | AUTO_BACKLIGHT | * | (2)aa:on | Enable/disable automatic backlight (aa=0 for mahi, 02 for diam/raph) |
| x24 | r | SPI_BL_STATUS | * | (2) abl:spi | abl is automatic backlight status, spi is spi link status. |
| x25 | w | BUTTONS_LED_CTRL | mahi/? | (4)delay:duty:?:cmd | On mahimahi, changes leds backlight. |
| x30 | r | VERSION | * | (2) | Version of the microp chip/firmware |
| x33 | r | LIGHT_SENSOR | Raph/Diam | (4)? | Get light level (it seems to be the first unsigned short ?) |
| x40 | w | LED_STATE | Raph/Diam | 2(see above) | Set navi pad's leds state. |
| x42 | w | ADC_TABLE | mahi/? | (20) | Set light sensor table. First 10 chars are MSB, last 10 are LSB. |
| x53 | w | LED_MODE | Mahi/? | (7)? | Set flashing leds and/or some mode |
| x54 | r | GREEN_LED_REMAIN | Mahi/? | (2) unsigned short seconds | Remaning time for green led on (see LED_MODE) |
| x55 | r | AMBER_RED_LED_REMAIN | Mahi/? | (2) unsigned short seconds | Remaning time for amber/red led on (see LED_MODE) |
| x57 | r | BLUE_LED_REMAIN | Mahi/? | (2) unsigned short seconds | Remaning time for blue led on (see LED_MODE) |
| x5a | w | JOGBALL_LED_MODE | Mahi/? | (3)? | Set jogball's led brightness |
| x5b | r | JOGBALL_LED_REMAIN | ? | ? | Same as green/amber/blue ? (unused in mahimahi's code) |
| x5c | w | JOGBALL_LED_PWM | Mahi/? | (4)rpwm:gpwm:bpwm:0 | Set jogball's led color. |
| x5d | w | JOGBALL_LEDPERIOD | Mahi/? | (2)0:period | Set jogball's led period |
| x60 | w | READ_ADC_VALUE_REQ | Mahi/? | (2)0:channel | Request an ADC Channel |
| x62 | r | ADC_VALUE | Mahi/? | (2)unsigned short value | Read the ADC channel (see x60) |
| x63 | w | REMOTEKEY_TABLE | Mahi/? | (12) | Same as x42 for remote key |
| x70 | w | LCM_REGISTER | Rhod/Topa/Blac | (3) | Required to restart backlight |
| x73 | w | GSENSOR_REG | Rhod/Topa/Leo/Mahi | (2)reg:val | Write a register to gsensor (bma150) |
| x74 | w | GSENSOR_REG_DATA_REQ | Rhod/Topa/Leo/Mahi | (1)reg | Announce a reg read from gsensor |
| x75 | r | GSENSOR_REG_DATA | Rhod/Topa/Leo/Mahi | (2)?:val | Retrieve reg reading result |
| x76 | w | GSENSOR_DATA_REQ | Rhod/Topa/Leo/Mahi | (1)2 | Announce we want to read accelerometer values |
| x77 | r | GSENSOR_X_DATA | Mahi(old)/Rhod/Topa | (2)unsigned short value | only the 12 highest bits, only for old Mahi boards |
| x78 | r | GSENSOR_Y_DATA | Mahi(old)/Rhod/Topa | (2)unsigned short value | only the 12 highest bits, only for old Mahi boards |
| x79 | r | GSENSOR_Z_DATA | Mahi(old)/Rhod/Topa | (2)unsigned short value | only the 12 highest bits, only for old Mahi boards |
| x7a | r | GSENSOR_DATA | Mahi(new)/Leo(?) | (2)unsigned short value[3] | only the 12 highest bits for each value, only for new Mahi boards |
| x7b | w | OJ_REG | ? | ? | ? |
| x7c | w | OJ_DATA_REQ | ? | ? | ? |
| x7d | r | OJ_DATA | ? | ? | ? |
| x7e | w | OJ_POS_DATA_REQ | ? | ? | ? |
| x7f | r | OJ_POS_DATA | ? | ? | ? |
| x80 | w | GPI_INT_CTL_EN | Mahi/Topa/Rhod/Leo | (2)unsigned short interrupt mask | Enable interrupts matching the mask |
| x81 | w | GPI_INT_CTL_DIS | Mahi/Topa/Rhod/Leo | (2)unsigned short interrupt mask | Disable interrupts matching the mask |
| x82 | r | GPI_INT_STATUS | Mahi/Topa/Rhod/Leo | (2) interrupt mask | Read interrupts state |
| x83 | r | GPI_STATUS | Mahi/Topa/Rhod/Leo | (2)GP input status | Read input status |
| x84 | w | GPI_INT_STATUS_CLR | Mahi/Topa/Rhod/Leo | (2) interrupt mask | Clear raised interrupts |
| x85 | r | GPI_INT_SETTING | ? | ? | |
| bit | name | ||||
| 0 | SDCARD | ||||
| 2 | HEADSETIN | ||||
| 7 | REMOTEKEY | ||||
| 9 | LSENSOR | ||||
| 10 | GSENSOR | ||||
| x87 | r | REMOTE_KEYCODE | (2)?:keycode | Read remote keycode | |
| x88 | w | REMOTE_KEY_DEBN_TIME | ? | Set remote key debounce time | |
| x89 | w | REMOTE_PLUG_DEBN_TIME | ? | Set remote plug debounce time | |
| x8a | w | SIMCARD_DEBN_TIME | ? | Set simcard debounce time | |
| x90 | w | GPO_LED_STATUS_EN | ? | ? | |
| x91 | w | GPO_LED_STATUS_DIS | ? | ? |
