Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 09-30-2017, 11:39 AM   #1
varu
Member
varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'
 
Posts: 12
Karma: 10000
Join Date: Sep 2017
Device: Kindle PW2
PW2 Repair Code 0 after a few reboots

Sure enough, after the warranty on my PW2 expired, it started experiencing more and more frequent Repair Code 0s. Holding down the button & rebooting it usually solved it, until it didn't. Thanks to geekmaster's excellent diagram I built myself a 1.8v TTL shifter and consoled in. The boot log looked something like this:

Code:
U-Boot 2009.08-lab126 (Dec 30 2013 - 10:54:52)


CPU: Freescale i.MX6 family TO0.0 at 996 MHz

Temperature:   29 C, calibration data 0x5654e35f

mx6sl pll1: 996MHz

mx6sl pll2: 528MHz

mx6sl pll3: 480MHz

mx6sl pll8: 50MHz

ipg clock     : 66000000Hz

ipg per clock : 66000000Hz

uart clock    : 80000000Hz

cspi clock    : 60000000Hz

ahb clock     : 132000000Hz

axi clock   : 198000000Hz

emi_slow clock: 22000000Hz

ddr clock     : 396000000Hz

usdhc1 clock  : 198000000Hz

usdhc2 clock  : 198000000Hz

usdhc3 clock  : 198000000Hz

usdhc4 clock  : 198000000Hz

MMC:  FSL_ESDHC: 0,FSL_ESDHC: 1,FSL_ESDHC: 2

Board: Pinot WFO 2GB

Boot Reason: [ POR ]

Boot Device: NAND

Board Id: 02E22011XXXXXHIO

S/N: B0DXXXXXXXXXXC3T

I2C:   ready

DRAM:  256 MB

Using default environment


In:    serial

Out:   serial

Err:   serial

Quick Memory Test 0x80000000, 0xfff0000

POST done in 59 ms

Battery voltage: 4065 mV


Hit any key to stop autoboot:  1  0 

## Booting kernel from Legacy Image at 80800000 ...

   Image Name:   Linux-3.0.35-lab126

   Image Type:   ARM Linux Kernel Image (uncompressed)

   Data Size:    2426044 Bytes =  2.3 MB

   Load Address: 80008000

   Entry Point:  80008000

   Verifying Checksum ... OK

   Loading Kernel Image ... OK

OK


Starting kernel ...


[    0.095368] No Legacy reboot reason code to print
[    0.271361] LPDDR2 MfgId: 0x1 [Samsung]
[    0.275222] 
[    0.275225] just text: vaddr 0xc011e9bc, va 0xc011e200 pa 0x801000c3 attr 0x6
[    0.283710] 
[    0.283714] nmx6sl_wfi_iram: vaddr 0xd081a000, va 0xd081a200 pa 0x902043 attr 0x2
[    0.292696] 
[    0.292699] mx6sl_ddr: vaddr 0xd0852000, va 0xd0852200 pa 0x903043 attr 0x2
[    0.301157] 
[    0.301160] mx6sl_iomux: vaddr 0xf40e0000, va 0xf40e0200 pa 0x20110c3 attr 0x149
[    0.310045] 
[    0.310047] ANATOP: vaddr 0xf40c8000, va 0xf40c8200 pa 0x20110c3 attr 0x149
[    0.318506] 
[    0.318509] CCM: vaddr 0xf40c4000, va 0xf40c4200 pa 0x20110c3 attr 0x149
[    0.326706] 
[    0.326708] MMDC_P0: vaddr 0xf41b0000, va 0xf41b0200 pa 0x21110c3 attr 0x149
[    0.335253] 
[    0.335256] L2: vaddr 0xf2a02000, va 0xf2a02200 pa 0xa02043 attr 0x149
[    0.343279] 
[    0.343282] arm perif: vaddr 0xf2a00000, va 0xf2a00200 pa 0xa00043 attr 0x149
[    0.370543] max77696-adc max77696-adc.0: adc conversion timed out
3.0.35-lab126 #1 Wed Apr 23 01:26:01 PDT 2014 armv7l
Press [ENTER] for recovery menu...       0 //-\|/-\|/-/-\|/-\|/-/-\|/-
The last part is the classic \ | / - character cycle indicating spinning - if left alone, it will sit there indefinitely. Once that point is reached, the Repair Code 0 screen comes up.

To resolve this, I entered diag mode, dropped to shell, formatted mmcblk0p1 with mkfs, loaded the 5.4.3.2 firmware bin onto the FAT partition, and did U to launch an update. (Note: 5.4.3.2 was the previous firmware as well, I never updated it beyond that revision). This worked, and I was able to boot up successfully. I installed the jailbreak, KUAL, and a few extensions (KOReader, USBNet, kterm, gawk, BatteryStatus, and leafpad). Reboots proceeded as normal throughout this time. I thought all was well, so I removed the serial hookup.

Big mistake.

Upon the next reboot, Repair Code 0 once more. I held down the button and had a successful reboot. The next one once more resulted in Repair Code 0, as did all subsequent reboots. Now I'm back where I started.

Back to the serial hookup! The above log is identical to what I'm seeing now. What am I doing wrong?

SEVERAL EDITS: This message keeps popping up in the log, any relevance?

Code:
[ 3249.149939] max77696-adc max77696-adc.0: adc conversion timed out
[ 3249.169930] max77696-adc max77696-adc.0: adc conversion timed out
It also occured to me that this started happening after:
1) It was charged on a fastcharger, pumping over 1A into it (I didn't put an ammeter in line with it but it's a 2A charger and I noticed it charged very rapidly).
2) Once charged, the charger would cut out and the Kindle would drain to zero over the course of about a week (left alone with no usage). Upon recharge, it would boot up fresh. This happened multiple times before the issue started cropping up.

Seeing the above errors makes me wonder if this could be related to the power management IC, however I'm not sure how to proceed further on the diag side. It seems to charge the battery well, and reports its charge level appropriately both in fastboot and (while it was running) in the OS. I have also tried a different battery as I suspected the charging ordeals it went through could've damaged it, with identical outcomes.

It's worth noting that these messages disappear when the Kindle OS is actually running. No idea in diag mode, will test now.

Sure enough, diag mode:

Code:
[   62.032521] max77696-adc max77696-adc.0: adc conversion timed out
[   62.038790]
[   62.038793] ADC value out of thermistor range! setting display temp to 43 deg C
[  122.172461] max77696-adc max77696-adc.0: adc conversion timed out
[  122.192473] max77696-adc max77696-adc.0: adc conversion timed out
[  122.198745]
[  122.198748] ADC value out of thermistor range! setting display temp to 43 deg C
I'm not sure how critical of an error this is, however.

Hmm.. based on knc1's comment it's hanging on a user storage reformat. I have no issue leaving it on a charger for a few days, if that'll actually resolve the issue.

Going into the recovery menu in diags (trying to get into it in main doesn't register, goes straight into the "spinning" character sequence), I ran an erase mmc0, partition initialize, and firmware reflash. I also formatted mmcblk0p3. Upon reboot, back to "Your Kindle Needs Repair", but this time without any error codes, nor the DSN - yet back to the "spinning" sequence. I've placed it on a USB ammeter and am leaving it for a few days. Right now battery's at 80%/about 4V and it's not drawing any current from USB. Serial output's of course being logged. Fingers crossed.

Last edited by varu; 09-30-2017 at 02:04 PM.
varu is offline   Reply With Quote
Old 09-30-2017, 07:42 PM   #2
knc1
Analog Forever!
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 16,202
Karma: 17256900
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
I ran an erase mmc0,
Once again, a disbeliever that the "Erase All" button would do something other than what the label describes.

Leaving it on a charger will not repair the damage done by the "Erase All" command.

Quote:
It was charged on a fastcharger, pumping over 1A into it (I didn't put an ammeter in line with it but it's a 2A charger and I noticed it charged very rapidly).
No, it did not.
The Kindle has a battery management chip which includes charge control.
You can plug the Kindle into the Hoover dam and it will still not charge at any rate other than what the battery management chip allows.

Those amperage rating numbers on a source device is its maximum designed output.
It is not the output that it "forces" the destination to absorb.

We have threads here on how to recover from "Erase All" - use them.
knc1 is offline   Reply With Quote
Advert
Old 09-30-2017, 08:51 PM   #3
varu
Member
varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'
 
Posts: 12
Karma: 10000
Join Date: Sep 2017
Device: Kindle PW2
OK, I've reflashed the main & diags kernels, reflashed the diags partition, and have access to diags once more. The first diags boot reformatted the /var/local partition as part of the boot process. I essentially followed the instructions in the new eMMC thread minus the uboot portions - everything checked out. Upon loading update_kindle_5.4.3.2.bin (which flashes successfully) and rebooting into main, it's once again sitting at the "spinner". What should I do next?

Last edited by varu; 09-30-2017 at 08:54 PM.
varu is offline   Reply With Quote
Old 09-30-2017, 11:37 PM   #4
Cinisajoy
Just a Yellow Smiley.
Cinisajoy ought to be getting tired of karma fortunes by now.Cinisajoy ought to be getting tired of karma fortunes by now.Cinisajoy ought to be getting tired of karma fortunes by now.Cinisajoy ought to be getting tired of karma fortunes by now.Cinisajoy ought to be getting tired of karma fortunes by now.Cinisajoy ought to be getting tired of karma fortunes by now.Cinisajoy ought to be getting tired of karma fortunes by now.Cinisajoy ought to be getting tired of karma fortunes by now.Cinisajoy ought to be getting tired of karma fortunes by now.Cinisajoy ought to be getting tired of karma fortunes by now.Cinisajoy ought to be getting tired of karma fortunes by now.
 
Cinisajoy's Avatar
 
Posts: 19,162
Karma: 83811071
Join Date: Jul 2015
Location: Texas
Device: K4, K5, fire, kobo, galaxy
Quote:
Originally Posted by varu View Post
OK, I've reflashed the main & diags kernels, reflashed the diags partition, and have access to diags once more. The first diags boot reformatted the /var/local partition as part of the boot process. I essentially followed the instructions in the new eMMC thread minus the uboot portions - everything checked out. Upon loading update_kindle_5.4.3.2.bin (which flashes successfully) and rebooting into main, it's once again sitting at the "spinner". What should I do next?
Plug it in.
Cinisajoy is offline   Reply With Quote
Old 10-01-2017, 12:49 AM   #5
coplate
Fanatic
coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.
 
Posts: 579
Karma: 1329466
Join Date: Jun 2009
Device: prs-505, Kindle Keyboard 3g, PW3
I don't know much about this flashing business, but I do know this.

I don't think it will be helpful, but I like to share.

On my broken kindle ( with no screen ), when I get the spinner, typing a single / restarts the kindle.

Good Luck.
coplate is offline   Reply With Quote
Advert
Old 10-01-2017, 12:59 AM   #6
varu
Member
varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'
 
Posts: 12
Karma: 10000
Join Date: Sep 2017
Device: Kindle PW2
Thank you coplate, I didn't know this and it was quite helpful in getting the kernel boot log (which was not otherwise printed out, although I managed to get a near identical readout by booting using the diags kernel). It looks like this:

Code:
U-Boot 2009.08-lab126 (Apr 23 2014 - 01:01:24)

CPU: Freescale i.MX6 family TO0.0 at 996 MHz
Temperature:   30 C, calibration data 0x5654e35f
mx6sl pll1: 996MHz
mx6sl pll2: 528MHz
mx6sl pll3: 480MHz
mx6sl pll8: 50MHz
ipg clock     : 66000000Hz
ipg per clock : 66000000Hz
uart clock    : 80000000Hz
cspi clock    : 60000000Hz
ahb clock     : 132000000Hz
axi clock   : 198000000Hz
emi_slow clock: 22000000Hz
ddr clock     : 396000000Hz
usdhc1 clock  : 198000000Hz
usdhc2 clock  : 198000000Hz
usdhc3 clock  : 198000000Hz
usdhc4 clock  : 198000000Hz
MMC:  FSL_ESDHC: 0,FSL_ESDHC: 1,FSL_ESDHC: 2
Board: Pinot WFO 2GB
Boot Reason: [ POR ]
Boot Device: NAND
Board Id: XXXX
S/N: XXXXXX
I2C:   ready
DRAM:  256 MB
Using default environment

In:    serial
Out:   serial
Err:   serial
Quick Memory Test 0x80000000, 0xfff0000
POST done in 59 ms
Battery voltage: 3868 mV

Hit any key to stop autoboot:  0
## Booting kernel from Legacy Image at 80800000 ...
   Image Name:   Linux-3.0.35-lab126
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2426044 Bytes =  2.3 MB
   Load Address: 80008000
   Entry Point:  80008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

[    0.095374]
[    0.265782] LPDDR2 MfgId: 0x1 [Samsung]
[    0.269678]
[    0.269681] just text: vaddr 0xc011e9bc, va 0xc011e200 pa 0x801000c3 attr 0x6
[    0.278148]
[    0.278151] nmx6sl_wfi_iram: vaddr 0xd081a000, va 0xd081a200 pa 0x902043 attr 0x2
[    0.287122]
[    0.287124] mx6sl_ddr: vaddr 0xd0852000, va 0xd0852200 pa 0x903043 attr 0x2
[    0.295583]
[    0.295585] mx6sl_iomux: vaddr 0xf40e0000, va 0xf40e0200 pa 0x20110c3 attr 0x149
[    0.304478]
[    0.304481] ANATOP: vaddr 0xf40c8000, va 0xf40c8200 pa 0x20110c3 attr 0x149
[    0.312939]
[    0.312941] CCM: vaddr 0xf40c4000, va 0xf40c4200 pa 0x20110c3 attr 0x149
[    0.321138]
[    0.321140] MMDC_P0: vaddr 0xf41b0000, va 0xf41b0200 pa 0x21110c3 attr 0x149
[    0.329685]
[    0.329688] L2: vaddr 0xf2a02000, va 0xf2a02200 pa 0xa02043 attr 0x149
[    0.337710]
[    0.337713] arm perif: vaddr 0xf2a00000, va 0xf2a00200 pa 0xa00043 attr 0x149
[    0.367437] max77696-adc max77696-adc.0: adc conversion timed out
[    0.427948] max77696-adc max77696-adc.0: adc conversion timed out
3.0.35-lab126 #1 Wed Apr 23 01:26:01 PDT 2014 armv7l
Press [ENTER] for recovery menu...       0 /|/

=== kernel printk buffer (17617 bytes) ===
<5>[    0.000000] Linux version 3.0.35-lab126 (jenkins-official@sjc10-jbuild10) (collect2: ld returned 1 exit status) #1 Wed Apr 23 01:26:01 PDT 2014
<4>[    0.000000] CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c53c7d
<4>[    0.000000] CPU: VIPT nonaliasing data cache, VIPT aliasing instruction cache
<4>[    0.000000] Machine: Freescale i.MX 6SoloLite based Wario Board
<6>[    0.000000] Will try to place printk log at 8fffc000
<4>[    0.000000] Memory policy: ECC disabled, Data cache writeback
<6>[    0.000000] CPU identified as i.MX6SoloLite, silicon rev 1.2
<7>[    0.000000] On node 0 totalpages: 65536
<7>[    0.000000] free_area_init_node: node 0, pgdat c04e0f2c, node_mem_map c2000000
<7>[    0.000000]   DMA zone: 64 pages used for memmap
<7>[    0.000000]   DMA zone: 0 pages reserved
<7>[    0.000000]   DMA zone: 8128 pages, LIFO batch:0
<7>[    0.000000]   Normal zone: 448 pages used for memmap
<7>[    0.000000]   Normal zone: 56896 pages, LIFO batch:15
<7>[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
<7>[    0.000000] pcpu-alloc: [0] 0
<4>[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 65024
<5>[    0.000000] Kernel command line: rootwait log_pos_goal=0x8fffc000 console=ttymxc0,115200 root=/dev/mmcblk0p1 ro ip=off quiet video=mxcepdcfb:E60,bpp=8,x_mem=3M
<4>[    0.000000] Prink buffer will be relocated to physical address: 8fff2000
<6>[    0.000000] log_buf_len: 32768
<6>[    0.000000] early log buf free: 31341(95%)
<6>[    0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
<6>[    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
<6>[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
<6>[    0.000000] Memory: 256MB = 256MB total
<5>[    0.000000] Memory: 254640k/254640k available, 7504k reserved, 0K highmem
<5>[    0.000000] Virtual kernel memory layout:
<5>[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
<5>[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
<5>[    0.000000]     DMA     : 0xfde00000 - 0xffe00000   (  32 MB)
<5>[    0.000000]     vmalloc : 0xd0800000 - 0xf2000000   ( 536 MB)
<5>[    0.000000]     lowmem  : 0xc0000000 - 0xd0000000   ( 256 MB)
<5>[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
<5>[    0.000000]       .init : 0xc0008000 - 0xc010c000   (1040 kB)
<5>[    0.000000]       .text : 0xc010c000 - 0xc04ae000   (3720 kB)
<5>[    0.000000]       .data : 0xc04ae000 - 0xc04e1a60   ( 207 kB)
<5>[    0.000000]        .bss : 0xc04e1a84 - 0xc05072a0   ( 151 kB)
<6>[    0.000000] SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
<6>[    0.000000] NR_IRQS:624
<6>[    0.000000] MXC GPIO hardware
<6>[    0.000000] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956ms
<6>[    0.000000] arm_max_freq=1GHz
<6>[    0.000000] MXC_Early serial console at MMIO 0x2020000 (options '115200')
<6>[    0.000000] bootconsole [ttymxc0] enabled
<6>[    0.000000] Console: colour dummy device 80x30
<6>[    0.000267] Calibrating delay loop... 1987.37 BogoMIPS (lpj=9936896)
<6>[    0.060112] pid_max: default: 32768 minimum: 301
<6>[    0.060375] Mount-cache hash table entries: 512
<6>[    0.060736] CPU: Testing write buffer coherency: ok
<6>[    0.060877] hw perfevents: enabled with ARMv7 Cortex-A9 PMU driver, 7 counters available
<6>[    0.067851] print_constraints: dummy:
<6>[    0.068018] NET: Registered protocol family 16
<6>[    0.072030] print_constraints: vddpu: 725 <--> 1300 mV at 700 mV fast normal
<6>[    0.072324] print_constraints: vddcore: 725 <--> 1300 mV at 1475 mV fast normal
<6>[    0.072625] print_constraints: vddsoc: 725 <--> 1300 mV at 1475 mV fast normal
<6>[    0.072924] print_constraints: vdd2p5: 2000 <--> 2775 mV at 2400 mV fast normal
<6>[    0.073263] print_constraints: vdd1p1: 800 <--> 1400 mV at 1100 mV fast normal
<6>[    0.073574] print_constraints: vdd3p0: 2625 <--> 3400 mV at 3000 mV fast normal
<4>[    0.075164] LAB126 Board id - XXXXXX
<6>[    0.079361] hw-breakpoint: found 6 breakpoint and 1 watchpoint registers.
<6>[    0.079375] hw-breakpoint: 1 breakpoint(s) reserved for watchpoint single-step.
<6>[    0.079389] hw-breakpoint: maximum watchpoint size is 4 bytes.
<6>[    0.079407] L310 cache controller enabled
<6>[    0.079418] l2x0: 16 ways, CACHE_ID 0x410000c8, AUX_CTRL 0x02030000, Cache size: 262144 B
<6>[    0.087864] bio: create slab <bio-0> at 0
<6>[    0.091693] max77696> regulator init
<6>[    0.092595] spi_imx imx6q-ecspi.0: probed
<6>[    0.092966] usbcore: registered new interface driver usbfs
<6>[    0.093083] usbcore: registered new interface driver hub
<6>[    0.093219] usbcore: registered new device driver usb
<4>[    0.095345] Reboot Reason - Metric Framework Reporting
<6>[    0.095360] kernel: kernel_metric_generic,0,counter,event_recorder,ercflags,SFT_PRSTRT,1,
<4>[    0.095368] Reboot Reason - Legacy Metric Reporting
<3>[    0.095374]
<6>[    0.098444] MAX77696 TOPSYS 1.0.0 Installed
<6>[    0.101346] max77696-gpio max77696-gpio.0: gpio#0 -- -- func-0 in
<6>[    0.102826] max77696-gpio max77696-gpio.0: gpio#1 -- -- func--1 in
<6>[    0.104299] max77696-gpio max77696-gpio.0: gpio#3 -- -- func-0 in
<6>[    0.106162] MAX77696 GPIO Driver 1.0.0 Installed
<4>[    0.107103] buck mode: 4
<4>[    0.107847] buck mode: 4
<6>[    0.108796] print_constraints: max77696_buck1: 900 <--> 1300 mV at 1250 mV fast normal idle standby
<4>[    0.109337] buck mode: 4
<6>[    0.110364] print_constraints: max77696_buck1dvs: 600 <--> 1300 mV at 900 mV fast normal idle standby
<4>[    0.110935] buck mode: 4
<4>[    0.111678] buck mode: 4
<6>[    0.112625] print_constraints: max77696_buck2: 900 <--> 1300 mV at 1200 mV fast normal idle standby
<4>[    0.113148] buck mode: 4
<6>[    0.114099] print_constraints: max77696_buck2dvs: 600 <--> 1300 mV at 900 mV fast normal idle standby
<6>[    0.114638] print_constraints: max77696_buck3: 600 <--> 3387 mV at 1300 mV fast normal idle standby
<4>[    0.115349] buck mode: 4
<4>[    0.116091] buck mode: 4
<6>[    0.116832] print_constraints: max77696_buck4: 1200 mV fast normal idle standby
<4>[    0.117357] buck mode: 4
<6>[    0.118307] print_constraints: max77696_buck5: 600 <--> 3387 mV at 1800 mV fast normal idle standby
<4>[    0.118839] buck mode: 4
<6>[    0.119787] print_constraints: max77696_buck6: 600 <--> 3387 mV at 3200 mV fast normal idle standby
<6>[    0.119827] MAX77696 Buck Regulators Driver 1.0.1 Installed
<6>[    0.120724] print_constraints: max77696_ldo1: 800 <--> 3950 mV at 3300 mV normal idle standby
<6>[    0.121290] print_constraints: max77696_ldo2: 800 <--> 3950 mV at 3000 mV normal idle standby
<6>[    0.121844] print_constraints: max77696_ldo3: 800 <--> 3950 mV at 2500 mV normal idle standby
<6>[    0.122391] print_constraints: max77696_ldo4: 800 <--> 2375 mV at 1800 mV normal idle standby
<6>[    0.122924] print_constraints: max77696_ldo5: 800 <--> 2375 mV at 1800 mV normal idle standby
<6>[    0.123483] print_constraints: max77696_ldo6: 800 <--> 3950 mV at 3200 mV normal idle standby
<6>[    0.124036] print_constraints: max77696_ldo7: 800 <--> 3950 mV at 3200 mV normal idle standby
<6>[    0.124579] print_constraints: max77696_ldo8: 800 <--> 2375 mV at 1100 mV normal idle standby
<6>[    0.125120] print_constraints: max77696_ldo9: 800 <--> 2375 mV at 1100 mV normal idle standby
<6>[    0.125677] print_constraints: max77696_ldo10: 2400 <--> 5550 mV at 5200 mV normal idle standby
<6>[    0.126469] MAX77696 Linear Regulators Driver 1.0.2 Installed
<6>[    0.127088] print_constraints: max77696_lsw1:
<6>[    0.127422] print_constraints: max77696_lsw2:
<6>[    0.127743] print_constraints: max77696_lsw3:
<6>[    0.128049] print_constraints: max77696_lsw4:
<6>[    0.128094] MAX77696 Load Switches Driver 1.0.0 Installed
<6>[    0.129313] print_constraints: max77696-display:
<6>[    0.130052] print_constraints: max77696-vcom:
<6>[    0.130608] print_constraints: max77696-vee:
<6>[    0.130944] print_constraints: max77696-vneg:
<6>[    0.131279] print_constraints: max77696-vpos:
<6>[    0.131588] print_constraints: max77696-vddh:
<6>[    0.132598]
<6>[    0.132602] EPD vreg probe complete!
<6>[    0.133198] print_constraints: max77696_vddq: 240 <--> 984 mV at 600 mV
<6>[    0.133252] MAX77696 LPDDR2 Termination Supply Driver 1.0.1 Installed
<6>[    0.134560] MAX77696 I2C Driver 1.0.0 Installed
<4>[    0.137111] i2c-core: driver [max17135] using legacy suspend method
<4>[    0.137122] i2c-core: driver [max17135] using legacy resume method
<6>[    0.137157] Switching to clocksource mxc_timer1
<6>[    0.147929] NET: Registered protocol family 2
<6>[    0.148022] IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
<6>[    0.148209] TCP established hash table entries: 8192 (order: 4, 65536 bytes)
<6>[    0.148323] TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
<6>[    0.148382] TCP: Hash tables configured (established 8192 bind 8192)
<6>[    0.148390] TCP reno registered
<6>[    0.148399] UDP hash table entries: 256 (order: 0, 4096 bytes)
<6>[    0.148415] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
<6>[    0.148752] NET: Registered protocol family 1
<6>[    0.148932] RPC: Registered named UNIX socket transport module.
<6>[    0.148942] RPC: Registered udp transport module.
<6>[    0.148950] RPC: Registered tcp transport module.
<6>[    0.148956] RPC: Registered tcp NFSv4.1 backchannel transport module.
<4>[    0.153043] etb: probe of etb failed with error -2
<4>[    0.153300] etm: probe of etm.0 failed with error -2
<6>[    0.153607] Static Power Management for Freescale i.MX6
<6>[    0.153617] wait mode is enabled for i.MX6
<6>[    0.153773] cpaddr = d0820000 suspend_iram_base=d081c000
<6>[    0.153829] PM driver module loaded
<6>[    0.154091] IMX usb wakeup probe
<7>[    0.154113] the wakeup pdata is 0xce298080
<6>[    0.154448] IMX usb wakeup probe
<7>[    0.154466] the wakeup pdata is 0xce298200
<6>[    0.154626] cpu regulator mode:ldo_bypass
<6>[    0.155025] i.MXC CPU frequency driver
<6>[    0.169241] squashfs: version 4.0 (2009/01/31) Phillip Lougher
<6>[    0.170245] msgmni has been set to 497
<6>[    0.170630] io scheduler noop registered
<6>[    0.170709] io scheduler cfq registered (default)
<6>[    0.171151] MAX77696 Backlight Driver 1.0.0 Installed
<6>[    0.171909] imx-sdma imx-sdma: loaded firmware 1.1
<6>[    0.176371] imx-sdma imx-sdma: initialized
<6>[    0.178579] Serial: IMX driver
<6>[    0.178693] imx-uart.0: ttymxc0 at MMIO 0x2020000 (irq = 58) is a IMX
<6>[    0.178722] console [ttymxc0] enabled, bootconsole disabled
<6>[    0.182461] loop: module loaded
<6>[    0.182696] MAX77696 32kHz Oscillator Driver 1.0.0 Installed
<6>[    0.183263] input: max77696-onkey as /devices/platform/imx-i2c.0/i2c-0/0-003c/max77696-onkey.0/input/input0
<6>[    0.186455] MAX77696 ONKEY Driver 1.0.0 Installed
<6>[    0.208600] max77696-rtc max77696-rtc.0: rtc core: registered max77696-rtc.0 as rtc0
<6>[    0.228519] max77696-rtc max77696-rtc.0: rtc core: registered max77696-rtc.1 as rtc1
<6>[    0.247818] MAX77696 RTC Driver 1.0.2 Installed
<6>[    0.248524] snvs_rtc snvs_rtc.0: rtc core: registered snvs_rtc as rtc2
<6>[    0.248680] i2c /dev entries driver
<6>[    0.252675] max77696-battery max77696-battery.0: Voltage alert     3400mV ... 4260mV
<6>[    0.253089] max77696-battery max77696-battery.0: SOC alert         (disabled)
<6>[    0.253994] MAX77696 Fuel Gauge Driver 1.0.0 Installed
<6>[    0.255878] MAX77696 USB Interface Circuit Driver 1.0.0 Installed
<6>[    0.257657] max77696-adc max77696-adc.0: ADC average rate: 32 sample(s)
<6>[    0.257669] max77696-adc max77696-adc.0: ADC delay: 0 nsec
<6>[    0.257677] max77696-adc max77696-adc.0: ADC cur src: 50 uA
<6>[    0.257689] MAX77696 ADC Driver 1.0.1 Installed
<6>[    0.258189] imx2-wdt imx2-wdt.0: IMX2+ Watchdog Timer enabled. timeout=60s (nowayout=1)
<6>[    0.258565] sdhci: Secure Digital Host Controller Interface driver
<6>[    0.258574] sdhci: Copyright(c) Pierre Ossman
<6>[    0.258683] mmc0: no vmmc regulator found
<6>[    0.259964] mmc0: SDHCI controller on platform [sdhci-esdhc-imx.1] using DMA
<6>[    0.261033] mmc1: no vmmc regulator found
<6>[    0.263410] mmc1: SDHCI controller on platform [sdhci-esdhc-imx.2] using DMA
<7>[    0.264107] Registered led device: max77696-leds.0
<6>[    0.264118] MAX77696 LED Driver #0 1.0.0 Installed
<7>[    0.264306] Registered led device: max77696-leds.1
<6>[    0.264315] MAX77696 LED Driver #1 1.0.0 Installed
<6>[    0.264829] nf_conntrack version 0.5.0 (3978 buckets, 15912 max)
<6>[    0.265550] ip_tables: (C) 2000-2006 Netfilter Core Team
<6>[    0.265617] TCP cubic registered
<6>[    0.265628] NET: Registered protocol family 17
<6>[    0.265647] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
<3>[    0.265782] LPDDR2 MfgId: 0x1 [Samsung]
<3>[    0.269678]
<3>[    0.269681] just text: vaddr 0xc011e9bc, va 0xc011e200 pa 0x801000c3 attr 0x6
<3>[    0.278148]
<3>[    0.278151] nmx6sl_wfi_iram: vaddr 0xd081a000, va 0xd081a200 pa 0x902043 attr 0x2
<3>[    0.287122]
<3>[    0.287124] mx6sl_ddr: vaddr 0xd0852000, va 0xd0852200 pa 0x903043 attr 0x2
<3>[    0.295583]
<3>[    0.295585] mx6sl_iomux: vaddr 0xf40e0000, va 0xf40e0200 pa 0x20110c3 attr 0x149
<3>[    0.304478]
<3>[    0.304481] ANATOP: vaddr 0xf40c8000, va 0xf40c8200 pa 0x20110c3 attr 0x149
<3>[    0.312939]
<3>[    0.312941] CCM: vaddr 0xf40c4000, va 0xf40c4200 pa 0x20110c3 attr 0x149
<3>[    0.321138]
<3>[    0.321140] MMDC_P0: vaddr 0xf41b0000, va 0xf41b0200 pa 0x21110c3 attr 0x149
<3>[    0.329685]
<3>[    0.329688] L2: vaddr 0xf2a02000, va 0xf2a02200 pa 0xa02043 attr 0x149
<3>[    0.337710]
<3>[    0.337713] arm perif: vaddr 0xf2a00000, va 0xf2a00200 pa 0xa00043 attr 0x149
<6>[    0.350647] Bus freq driver module loaded
<6>[    0.350658] Bus freq driver Enabled
<6>[    0.351644] mxc_dvfs_core_probe
<6>[    0.351906] DVFS driver module loaded
<4>[    0.353738] regulator_init_complete: max77696_ldo10: incomplete constraints, leaving on
<4>[    0.354377] regulator_init_complete: max77696_ldo7: incomplete constraints, leaving on
<4>[    0.354596] regulator_init_complete: max77696_ldo6: incomplete constraints, leaving on
<4>[    0.355855] regulator_init_complete: max77696_buck6: incomplete constraints, leaving on
<4>[    0.356077] regulator_init_complete: max77696_buck5: incomplete constraints, leaving on
<4>[    0.356505] regulator_init_complete: max77696_buck2dvs: incomplete constraints, leaving on
<4>[    0.356725] regulator_init_complete: max77696_buck1dvs: incomplete constraints, leaving on
<3>[    0.367437] max77696-adc max77696-adc.0: adc conversion timed out
<6>[    0.387431] max77696-rtc max77696-rtc.0: setting system clock to 2000-01-01 02:18:18 UTC (946693098)
<3>[    0.427948] max77696-adc max77696-adc.0: adc conversion timed out
<6>[    0.434332]
<6>[    0.434335] ADC value out of thermistor range! setting display temp to 43 deg C
<6>[    0.434757] KERNEL: I pmic:charger chgina::charger connected
<6>[    0.440054] MAX77696 Main Charger Driver 1.0.0 Installed
<6>[    0.443282] MAX77696 Energy Harvester Driver 1.0.0 Installed
<6>[    0.443847] Freeing init memory: 1040K
<6>[    0.448117] emmc: I def:mmcpartinfo:vendor=micron, host=mmc0:
<6>[    0.483185] mmc0: new high speed DDR MMC card at address 0001
<6>[    0.483482] mmcblk0: mmc0:0001 MMC02G 1.83 GiB
<6>[    0.483606] mmcblk0boot0: mmc0:0001 MMC02G partition 1 2.00 MiB
<6>[    0.483726] mmcblk0boot1: mmc0:0001 MMC02G partition 2 2.00 MiB
<6>[    0.485548]  mmcblk0: p1 p2 p3 p4
<6>[    0.487916]  mmcblk0boot1: unknown partition table
<6>[    0.490004]  mmcblk0boot0: unknown partition table
<4>[    0.561463] mxc_epdc_eink: module license 'proprietary' taints kernel.
<4>[    0.563499] Disabling lock debugging due to kernel taint
<4>[    0.563904] INFO:Loaded module /lib/modules/mxc_epdc_eink.ko  (10776 bytes)
<6>[    1.177202] add wake up source irq 104
<6>[    2.247219] KERNEL: I pmic:fg battery id check::wario_battery_valid=0
<6>[    2.247257] kernel: kernel_metric_high_priority,946693100,counter,kernel,fg,wario battery invalid,1,
<4>[    3.307123] INFO:Loaded module /lib/modules/mxc_epdc_fb.ko  (85104 bytes)
<4>[    3.483921] INFO:eink initialized... (786432 bytes)
<4>[    4.684638] INFO:Couldn't find localized image at /mnt/wfm/images/repair.raw.gz
<4>[    6.148819] INFO:
<4>[    6.148927] ===FL fadedown success===
<4>[    6.149216] ERROR:
<4>[    6.149224] === BATTERY ID IS INVALID. STOPPING BOOT ===
<6>[    6.165696] ARC USBOTG Device Controller driver (1 August 2005)
<6>[    6.169314] add wake up source irq 75
<4>[    6.178597] USB Cable is already plugged in. Simulating event
<4>[    6.183045] INFO:Loaded module /lib/modules/arcotg_udc.ko  (33324 bytes)
<6>[    6.205308] g_file_storage gadget: File-backed Storage Gadget, version: 1 September 2010
<6>[    6.205340] g_file_storage gadget: Number of LUNs=1
<7>[    6.205369] dr_controller_run: udc out low power mode
<6>[    6.205387] fsl-usb2-udc: bind to driver g_file_storage
<4>[    6.205481] INFO:Loaded module /lib/modules/g_file_storage.ko removable=1 vendor=0x1949 product=0x0004 release=0x0100 recovery_mode=1 (37756 bytes)
**** Sent "/" *****
<4>[   10.181095] INFO:Rebooting ...
<6>[   10.197724] unregistered gadget driver 'g_file_storage'
<6>[   10.202146] ARC USBOTG Device Controller driver unregistered
<4>[   10.396595] INFO:Couldn't find localized image at /mnt/wfm/images/reboot.raw.gz
<6>[   11.159072] Device spi0.0 removed
Unlike the diags kernel + filesystem, wario_battery_valid comes up as 0 here, triggering "BATTERY ID IS INVALID. STOPPING BOOT". I do also see the "INFO:Loaded module /lib/modules/g_file_storage.ko removable=1 vendor=0x1949 product=0x0004 release=0x0100 recovery_mode=1" which could be indicative of a filesystem check? I'm not sure at this point, but I do know the Kindle isn't drawing any power from USB while in this state, both as shown on the ammeter and as shown by the decreased voltage & charge level in subsequent reboots. If left like this, I suspect it would drain the battery.

EDIT: It's interesting to note that, whether I use the main or diags kernel with idme bootmode main (having flashed the diags kernel to the main kernel as an experiment), the battery ID check fails, whereas if idme bootmode is set to diags, the battery ID check passes and the system boots to diag.

I'm thinking this is an issue with the main rootfs, however, both reflashing mmcblk0p1.bin from ixtab's site and running through the update_kindle_5.4.3.2.bin process (all of which succeeds, so at this point I doubt it's eMMC related) still results in the battery id check failing & the system hanging in main. At the very least I got the main kernel to spit out boot info by editing bootargs and removing 'quiet'; however, whether I add debug or not, the battery check still fails. I'm at wit's end, not sure where to go from here.


EDIT2: ?!?!?!
Now here's something quite strange. If I have bootmode set to main, then interrupt the boot process, enter bist, set bootmode to diags, and enter 'boot' instead of resetting, the Kindle boots just fine. If I run a restart from the Kindle OS, because the bootmode is diags, it boots into the diags partition. If I run a restart from the Kindle OS, interrupt boot, enter bist, set bootmode to main and reset, it fails the battery check again.

At least I've got it booting and can confirm rootfs is OK. It's nice to have made some progress, but I can't for the life of me explain this behaviour. I've diffed the early boot sections of the two kernels/boot processes (up until the battery id check) and they're basically identical. In the bootargs, two main differences:

Code:
main: rootwait log_pos_goal=0x8fffc000 console=ttymxc0,115200 root=/dev/mmcblk0p1 ro ip=off quiet video=mxcepdcfb:E60,bpp=8,x_mem=3M
diags: rootwait log_pos_goal=0x8fffc000 console=ttymxc0,115200 root=/dev/mmcblk0p2 ro ip=off debug video=mxcepdcfb:E60,bpp=8,x_mem=3M
quiet vs debug, and partition 1 vs 2. Adding 'debug' to main bootargs doesn't have an effect.

EDIT3: When booting with idme bootmode diags set, the Kindle boots the main OS in diags mode, performing a filesystem check, but then booting the interface. wario_battery_valid=1. When booting with idme bootmode normal set, the kernel log is identical up to the wario_battery_valid line, which is now 0, causing boot to stop. The battery is now fully charged at nearly 4.2v. I don't know enough about the boot process to tell where it's getting this information from & whether the relevant module can be disabled. As it stands, I can't perform restarts without serial as I need to change the bootmode back to main, reset, then interrupt and change back to diags so the battery ID check passes.

Last edited by varu; 10-01-2017 at 11:58 AM.
varu is offline   Reply With Quote
Old 10-02-2017, 05:38 PM   #7
varu
Member
varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'
 
Posts: 12
Karma: 10000
Join Date: Sep 2017
Device: Kindle PW2
No progress as of yet. I haven't yet figured out why it's failing this battery ID check (to be fair I haven't found nor looked at any sources yet). However, I successfully got it to boot by setting bootmode diags with uboot first booting using main (which preserves the main bootargs & thus gets the diags kernel to boot mmcblk01, resulting in a functional system).

I thus considered altering the diags bootargs value to always use mmcblk01 & flashing the main kernel to the diags kernel location. After all, should I encounter trouble in the future, I can always serial in & alter bootargs / flash the diags kernel back. However, both uboot & bist lack a saveenv command, so I'm not able to save a modified bootargs. I'm not sure where the built-in bootargs value is stored either; I looked through mmcblk0boot0 & boot1 but found nothing of the sort. Anything that could point me in the right direction is very much appreciated!
varu is offline   Reply With Quote
Old 10-02-2017, 07:19 PM   #8
knc1
Analog Forever!
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 16,202
Karma: 17256900
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Why don't you install a current set of u-boot, main kernel, and main filesystem?
Keep in mind you can't use fastboot to install the main filesystem image - it is too big.

Just use KindleTool to open any Amazon (PW2 - if that is what your writing about) update file, version of your choice, for the binary images.
Some links available in the current jail break post, step #7, open the spoiler.
knc1 is offline   Reply With Quote
Old 10-02-2017, 09:03 PM   #9
varu
Member
varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'
 
Posts: 12
Karma: 10000
Join Date: Sep 2017
Device: Kindle PW2
I tried 5.7.4 & 5.8.7.0.1 - the latter updated uboot, but no changes in features that I could see. However, some strange behaviour:

1) If I flash update_PW2_5.4.3.2_initial.bin, I can get one to several successful main boots. Eventually I'll see a return to the battery ID check failing.
2) Newer firmwares crash the same way, but provide a bit more info:
Code:
<4>[    4.896568] DEBUG:eink.c:727:eink_draw_sprite():eink_draw_sprite(x0:480,y0:983,s->x_size=24,s->y_size=41,s->x_off=0,s->y_off=0)
<4>[    4.896915] INFO:eink.c:891:eink_printf():BATTERY INVALID: -22
<4>[    5.511564] INFO:recovery-util.c:316:fl_control_fadedown():
<4>[    5.511652] ===FL fadedown success===
<4>[    5.511950] ERROR:recovery-util.c:346:battery_check():
<4>[    5.511962] === BATTERY ID IS INVALID. STOPPING BOOT ===
I noticed that, if I run these newer firmwares & boot with the diags trick (main kernel booting the main rootfs in diags mode), the touchscreen doesn't work! Based on this thread the behaviour seems to match up, although I've never dropped my unit. It would also explain why "ADC value out of thermistor range! setting display temp to 43 deg C" - there may be an intermittent flaw with the flex cable or display chip. I will reseat the connectors and try again.

It's also worth noting that, while I had the 5.4.3.2 firmware booting properly, I booted diags & mounted NFS over USBnet, taking a dd backup of the entire mmcblk0 in case it's something software causing the issue. I restored that backup and still ran into battery ID checks... at this point I'm beginning to suspect the hardware more and more. If it does turn out to be a hardware fault, I'm back to figuring out how to permanently change the diags bootargs to use mmcblk0p1 instead of 0p2 - this will give me a functional Kindle that can survive reboots, hardware be damned. Everything seems to work on 5.4.3.2 after all.

EDIT: I've now reseated every flex cable on the board. No dice

Last edited by varu; 10-02-2017 at 09:29 PM.
varu is offline   Reply With Quote
Old 10-02-2017, 09:38 PM   #10
knc1
Analog Forever!
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 16,202
Karma: 17256900
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
When I wrote: "Your choice of Amazon version update packages"
I did not:
Mean to include the non-customer released packages (the factory-use-only packages) - Hint: That is why I directed you to the spoiler in Step 7 of the jail break post.

I did not:
Tell you to use any menu entry to install the entire update package using the built-in updater.
I did tell you to open the package with KindleTool so that you could manually install the binary images.

= = = =

Question:
If you already know so much about the device and the process to recover from what you have already done -
Then why are you wasting your time and ours by asking for advice.

Regardless of the advice given, you are dead set on doing things your own way.
So go do things your own way and save yourself the time of making the posts and us the time wasted with reading and replying to your posts.
knc1 is offline   Reply With Quote
Old 10-02-2017, 10:43 PM   #11
varu
Member
varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'
 
Posts: 12
Karma: 10000
Join Date: Sep 2017
Device: Kindle PW2
I'm posting everything I try both to keep track of what I did & in case it ends up being of some use to someone - at the very least as an overview of what doesn't work. I am certainly not dead set on doing things my way, else I would not be asking for advice, much less following it when it is given.

I extracted the 5.8.7.0.1 package linked in the #7 spoiler of the jailbreak post using KindleTool, booted into diags, mounted USB and copied u-boot.bin, fwo_rootfs.img and uImage to it, and used dd to flash each as per this post. I then set idme -d --bootmode main and rebooted. Unfortunately I still ended up with "BATTERY INVALID: -22". The current kernel log:

Spoiler:

Code:
=== kernel printk buffer (29725 bytes) ===
<5>[    0.000000] Linux version 3.0.35-lab126 (jenkins-official@sjc10-jbuild10) (gcc version 4.9.1 (GCC) ) #2 PREEMPT Mon Jan 16 03:49:25 PST 2017
<4>[    0.000000] CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c53c7d
<4>[    0.000000] CPU: VIPT nonaliasing data cache, VIPT aliasing instruction cache
<4>[    0.000000] Machine: Freescale i.MX 6SoloLite based Wario Board
<6>[    0.000000] Will try to place printk log at 8fff0000
<4>[    0.000000] Memory policy: ECC disabled, Data cache writeback
<6>[    0.000000] CPU identified as i.MX6SoloLite, silicon rev 1.2
<7>[    0.000000] On node 0 totalpages: 65536
<7>[    0.000000] free_area_init_node: node 0, pgdat c05ae450, node_mem_map c2000000
<7>[    0.000000]   DMA zone: 64 pages used for memmap
<7>[    0.000000]   DMA zone: 0 pages reserved
<7>[    0.000000]   DMA zone: 8128 pages, LIFO batch:0
<7>[    0.000000]   Normal zone: 448 pages used for memmap
<7>[    0.000000]   Normal zone: 56896 pages, LIFO batch:15
<7>[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
<7>[    0.000000] pcpu-alloc: [0] 0 
<4>[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 65024
<5>[    0.000000] Kernel command line: rootwait log_pos_goal=0x8fff0000 console=ttymxc0,115200 root=/dev/mmcblk0p1 ro ip=off quiet video=mxcepdcfb:E60,bpp=8,x_mem=3M
<4>[    0.000000] Prink buffer will be relocated to physical address: 8fff0000
<6>[    0.000000] log_buf_len: 32768
<6>[    0.000000] early log buf free: 31344(95%)
<6>[    0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
<6>[    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
<6>[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
<6>[    0.000000] Memory: 256MB = 256MB total
<5>[    0.000000] Memory: 253788k/253788k available, 8356k reserved, 0K highmem
<5>[    0.000000] Virtual kernel memory layout:
<5>[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
<5>[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
<5>[    0.000000]     DMA     : 0xfde00000 - 0xffe00000   (  32 MB)
<5>[    0.000000]     vmalloc : 0xd0800000 - 0xf2000000   ( 536 MB)
<5>[    0.000000]     lowmem  : 0xc0000000 - 0xd0000000   ( 256 MB)
<5>[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
<5>[    0.000000]       .init : 0xc0008000 - 0xc0115000   (1076 kB)
<5>[    0.000000]       .text : 0xc0115000 - 0xc0578000   (4492 kB)
<5>[    0.000000]       .data : 0xc0578000 - 0xc05b5820   ( 247 kB)
<5>[    0.000000]        .bss : 0xc05b5844 - 0xc05dc260   ( 155 kB)
<6>[    0.000000] SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
<6>[    0.000000] Preemptible hierarchical RCU implementation.
<6>[    0.000000] 	Verbose stalled-CPUs detection is disabled.
<6>[    0.000000] NR_IRQS:624
<6>[    0.000000] MXC GPIO hardware
<6>[    0.000000] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956ms
<6>[    0.000000] arm_max_freq=1GHz
<6>[    0.000000] MXC_Early serial console at MMIO 0x2020000 (options '115200')
<6>[    0.000000] bootconsole [ttymxc0] enabled
<6>[    0.000000] Console: colour dummy device 80x30
<6>[    0.000238] Calibrating delay loop... 1987.37 BogoMIPS (lpj=9936896)
<6>[    0.060116] pid_max: default: 32768 minimum: 301
<6>[    0.060310] Mount-cache hash table entries: 512
<6>[    0.060628] CPU: Testing write buffer coherency: ok
<6>[    0.060763] hw perfevents: enabled with ARMv7 Cortex-A9 PMU driver, 7 counters available
<6>[    0.067395] print_constraints: dummy: 
<6>[    0.067553] NET: Registered protocol family 16
<6>[    0.071782] print_constraints: vddpu: 725 <--> 1300 mV at 700 mV fast normal 
<6>[    0.072083] print_constraints: vddcore: 725 <--> 1300 mV at 1475 mV fast normal 
<6>[    0.072383] print_constraints: vddsoc: 725 <--> 1300 mV at 1475 mV fast normal 
<6>[    0.072687] print_constraints: vdd2p5: 2000 <--> 2775 mV at 2400 mV fast normal 
<6>[    0.073033] print_constraints: vdd1p1: 800 <--> 1400 mV at 1100 mV fast normal 
<6>[    0.073353] print_constraints: vdd3p0: 2625 <--> 3400 mV at 3000 mV fast normal 
<4>[    0.075031] LAB126 Board id - 02E2XXXXXXX
<6>[    0.079430] hw-breakpoint: found 6 breakpoint and 1 watchpoint registers.
<6>[    0.079442] hw-breakpoint: 1 breakpoint(s) reserved for watchpoint single-step.
<6>[    0.079454] hw-breakpoint: maximum watchpoint size is 4 bytes.
<6>[    0.079471] L310 cache controller enabled
<6>[    0.079480] l2x0: 16 ways, CACHE_ID 0x410000c8, AUX_CTRL 0x02030000, Cache size: 262144 B
<6>[    0.090223] bio: create slab <bio-0> at 0
<6>[    0.093500] max77696> regulator init
<6>[    0.094485] spi_imx imx6q-ecspi.0: probed
<6>[    0.094864] usbcore: registered new interface driver usbfs
<6>[    0.094983] usbcore: registered new interface driver hub
<6>[    0.095129] usbcore: registered new device driver usb
<4>[    0.097337] Reboot Reason - Metric Framework Reporting
<6>[    0.097351] kernel: kernel_metric_generic,0,counter,event_recorder,ercflags,SFT_PRSTRT,1,
<4>[    0.097360] Reboot Reason - Legacy Metric Reporting
<3>[    0.097365] 
<6>[    0.101229] MAX77696 TOPSYS 1.0.0 Installed
<6>[    0.104005] max77696-gpio max77696-gpio.0: gpio#0 -- -- func-0 in 
<6>[    0.105487] max77696-gpio max77696-gpio.0: gpio#1 -- -- func--1 in 
<6>[    0.106965] max77696-gpio max77696-gpio.0: gpio#3 -- -- func-0 in 
<6>[    0.108839] MAX77696 GPIO Driver 1.0.0 Installed
<4>[    0.109780] buck mode: 4
<4>[    0.110547] buck mode: 4
<6>[    0.111504] print_constraints: max77696_buck1: 900 <--> 1300 mV at 1250 mV fast normal idle standby
<4>[    0.112072] buck mode: 4
<6>[    0.113031] print_constraints: max77696_buck1dvs: 600 <--> 1300 mV at 900 mV fast normal idle standby
<4>[    0.113560] buck mode: 4
<4>[    0.114304] buck mode: 4
<6>[    0.115257] print_constraints: max77696_buck2: 900 <--> 1300 mV at 1200 mV fast normal idle standby
<4>[    0.115795] buck mode: 4
<6>[    0.116751] print_constraints: max77696_buck2dvs: 600 <--> 1300 mV at 900 mV fast normal idle standby
<6>[    0.117304] print_constraints: max77696_buck3: 600 <--> 3387 mV at 1300 mV fast normal idle standby
<4>[    0.118011] buck mode: 4
<4>[    0.118757] buck mode: 4
<6>[    0.119502] print_constraints: max77696_buck4: 1200 mV fast normal idle standby
<4>[    0.120044] buck mode: 4
<6>[    0.121059] print_constraints: max77696_buck5: 600 <--> 3387 mV at 1800 mV fast normal idle standby
<4>[    0.121615] buck mode: 2
<6>[    0.122572] print_constraints: max77696_buck6: 600 <--> 3387 mV at 3200 mV fast normal idle standby
<6>[    0.122613] MAX77696 Buck Regulators Driver 1.0.1 Installed
<6>[    0.123445] print_constraints: max77696_ldo1: 800 <--> 3950 mV at 3300 mV normal idle standby
<6>[    0.124010] print_constraints: max77696_ldo2: 800 <--> 3950 mV at 3000 mV normal idle standby
<6>[    0.124555] print_constraints: max77696_ldo3: 800 <--> 3950 mV at 2500 mV normal idle standby
<6>[    0.125128] print_constraints: max77696_ldo4: 800 <--> 2375 mV at 1800 mV normal idle standby
<6>[    0.125670] print_constraints: max77696_ldo5: 800 <--> 2375 mV at 1800 mV normal idle standby
<6>[    0.126244] print_constraints: max77696_ldo6: 800 <--> 3950 mV at 3200 mV normal idle standby
<6>[    0.126793] print_constraints: max77696_ldo7: 800 <--> 3950 mV at 3200 mV normal idle standby
<6>[    0.127340] print_constraints: max77696_ldo8: 800 <--> 2375 mV at 1100 mV normal idle standby
<6>[    0.127898] print_constraints: max77696_ldo9: 800 <--> 2375 mV at 1100 mV normal idle standby
<6>[    0.128446] print_constraints: max77696_ldo10: 2400 <--> 5550 mV at 5200 mV normal idle standby
<6>[    0.129248] MAX77696 Linear Regulators Driver 1.0.2 Installed
<6>[    0.129885] print_constraints: max77696_lsw1: 
<6>[    0.130743] print_constraints: max77696_lsw2: 
<6>[    0.131437] print_constraints: max77696_lsw3: 
<6>[    0.132133] print_constraints: max77696_lsw4: 
<6>[    0.132563] MAX77696 Load Switches Driver 1.0.0 Installed
<6>[    0.133767] print_constraints: max77696-display: 
<6>[    0.134535] print_constraints: max77696-vcom: 
<6>[    0.134852] print_constraints: max77696-vee: 
<6>[    0.135183] print_constraints: max77696-vneg: 
<6>[    0.135531] print_constraints: max77696-vpos: 
<6>[    0.135851] print_constraints: max77696-vddh: 
<6>[    0.136863] 
<6>[    0.136866] EPD vreg probe complete!
<6>[    0.137479] print_constraints: max77696_vddq: 240 <--> 984 mV at 600 mV 
<6>[    0.137531] MAX77696 LPDDR2 Termination Supply Driver 1.0.1 Installed
<6>[    0.138828] MAX77696 I2C Driver 1.0.0 Installed
<6>[    0.141426] Advanced Linux Sound Architecture Driver Version 1.0.24.
<4>[    0.142031] i2c-core: driver [max17135] using legacy suspend method
<4>[    0.142041] i2c-core: driver [max17135] using legacy resume method
<6>[    0.142069] Switching to clocksource mxc_timer1
<6>[    0.153417] NET: Registered protocol family 2
<6>[    0.153502] IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
<6>[    0.153674] TCP established hash table entries: 8192 (order: 4, 65536 bytes)
<6>[    0.153786] TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
<6>[    0.153861] TCP: Hash tables configured (established 8192 bind 8192)
<6>[    0.153869] TCP reno registered
<6>[    0.153877] UDP hash table entries: 256 (order: 0, 4096 bytes)
<6>[    0.153892] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
<6>[    0.154129] NET: Registered protocol family 1
<6>[    0.154317] RPC: Registered named UNIX socket transport module.
<6>[    0.154327] RPC: Registered udp transport module.
<6>[    0.154333] RPC: Registered tcp transport module.
<6>[    0.154338] RPC: Registered tcp NFSv4.1 backchannel transport module.
<4>[    0.159670] etb: probe of etb failed with error -2
<4>[    0.159966] etm: probe of etm.0 failed with error -2
<6>[    0.160247] Static Power Management for Freescale i.MX6
<6>[    0.160256] wait mode is enabled for i.MX6
<6>[    0.160408] cpaddr = 0 suspend_iram_base=f2900000
<6>[    0.160452] PM driver module loaded
<6>[    0.160737] IMX usb wakeup probe
<7>[    0.160758] the wakeup pdata is 0xce113c80
<6>[    0.161384] IMX usb wakeup probe
<7>[    0.161401] the wakeup pdata is 0xce0e1700
<6>[    0.161559] cpu regulator mode:ldo_bypass
<6>[    0.161961] i.MXC CPU frequency driver
<6>[    0.176275] squashfs: version 4.0 (2009/01/31) Phillip Lougher
<6>[    0.177292] msgmni has been set to 495
<6>[    0.177736] io scheduler noop registered
<6>[    0.177812] io scheduler cfq registered (default)
<6>[    0.178278] MAX77696 Backlight Driver 1.0.0 Installed
<6>[    0.179083] imx-sdma imx-sdma: loaded firmware 1.1
<6>[    0.183568] imx-sdma imx-sdma: initialized
<6>[    0.185497] Serial: IMX driver
<6>[    0.185616] imx-uart.0: ttymxc0 at MMIO 0x2020000 (irq = 58) is a IMX
<6>[    0.185642] console [ttymxc0] enabled, bootconsole disabled
<6>[    0.189483] loop: module loaded
<6>[    0.189729] MAX77696 32kHz Oscillator Driver 1.0.0 Installed
<6>[    0.190313] input: max77696-onkey as /devices/platform/imx-i2c.0/i2c-0/0-003c/max77696-onkey.0/input/input0
<6>[    0.194163] MAX77696 ONKEY Driver 1.0.0 Installed
<7>[    0.212745] max77696-rtc max77696-rtc.0: read time:
<7>[    0.212759] max77696-rtc max77696-rtc.0: YEAR 0E MONTH 01 DOM 01 DOW 08 HOUR 0C MIN 20 SEC 27
<7>[    0.212771] max77696-rtc max77696-rtc.0: --> 2014-01-01 Wed 00:32:39
<7>[    0.213202] max77696-rtc max77696-rtc.0: read alarm0:
<7>[    0.213212] max77696-rtc max77696-rtc.0: YEAR 00 MONTH 01 DOM 01 HOUR 00 MIN 00 SEC 00
<7>[    0.213223] max77696-rtc max77696-rtc.0: --> 2000-01-01 00:00:00
<6>[    0.213439] max77696-rtc max77696-rtc.0: rtc core: registered max77696-rtc.0 as rtc0
<7>[    0.232731] max77696-rtc max77696-rtc.0: read time:
<7>[    0.232744] max77696-rtc max77696-rtc.0: YEAR 0E MONTH 01 DOM 01 DOW 08 HOUR 0C MIN 20 SEC 27
<7>[    0.232756] max77696-rtc max77696-rtc.0: --> 2014-01-01 Wed 00:32:39
<7>[    0.233184] max77696-rtc max77696-rtc.0: read alarm1:
<7>[    0.233194] max77696-rtc max77696-rtc.0: YEAR 00 MONTH 01 DOM 01 HOUR 00 MIN 00 SEC 00
<7>[    0.233204] max77696-rtc max77696-rtc.0: --> 2000-01-01 00:00:00
<6>[    0.233380] max77696-rtc max77696-rtc.0: rtc core: registered max77696-rtc.1 as rtc1
<7>[    0.234872] max77696-rtc max77696-rtc.0: 1 minute interrupt: off
<7>[    0.234882] max77696-rtc max77696-rtc.0: 1 second interrupt: off
<7>[    0.252742] max77696-rtc max77696-rtc.0: read time:
<7>[    0.252753] max77696-rtc max77696-rtc.0: YEAR 0E MONTH 01 DOM 01 DOW 08 HOUR 0C MIN 20 SEC 27
<7>[    0.252766] max77696-rtc max77696-rtc.0: --> 2014-01-01 Wed 00:32:39
<7>[    0.252776] max77696-rtc max77696-rtc.0: current time *** 2014-01-01 Wed 00:32:39
<6>[    0.252783] MAX77696 RTC Driver 1.0.2 Installed
<6>[    0.253492] snvs_rtc snvs_rtc.0: rtc core: registered snvs_rtc as rtc2
<6>[    0.253675] i2c /dev entries driver
<6>[    0.257699] max77696-battery max77696-battery.0: Voltage alert     3400mV ... 4260mV
<6>[    0.258114] max77696-battery max77696-battery.0: SOC alert         (disabled)
<6>[    0.259010] MAX77696 Fuel Gauge Driver 1.0.0 Installed
<6>[    0.261147] MAX77696 USB Interface Circuit Driver 1.0.0 Installed
<6>[    0.262874] max77696-adc max77696-adc.0: ADC average rate: 32 sample(s)
<6>[    0.262885] max77696-adc max77696-adc.0: ADC delay: 0 nsec
<6>[    0.262893] max77696-adc max77696-adc.0: ADC cur src: 50 uA
<6>[    0.262903] MAX77696 ADC Driver 1.0.1 Installed
<6>[    0.263403] imx2-wdt imx2-wdt.0: IMX2+ Watchdog Timer enabled. timeout=60s (nowayout=1)
<6>[    0.264257] sdhci: Secure Digital Host Controller Interface driver
<6>[    0.264266] sdhci: Copyright(c) Pierre Ossman
<6>[    0.264391] mmc0: no vmmc regulator found
<7>[    0.265410] sdhci: =========== REGISTER DUMP (mmc0)===========
<4>[    0.265418] 
<4>[    0.265420] 0xd0858000:  00000000 00010200 00000000 083a0000
<4>[    0.265431] 0xd0858010:  00000900 a9ffffff 320f5a33 00000b00
<4>[    0.265441] 0xd0858020:  00000000 ff888088 08800024 008e0118
<4>[    0.265451] 0xd0858030:  00000000 007f0003 007f0003 00000000
<4>[    0.265461] 0xd0858040:  07f3b407 08000880 00000011 00000000
<4>[    0.265471] 0xd0858050:  00000000 00000000 00000000 00000000
<4>[    0.265480] 0xd0858060:  00000000 00000200 00000000 0800ff00
<4>[    0.265489] 0xd0858070:  00000000 00000000 00000000 00000000
<4>[    0.265498] 0xd0858080:  00000000 00000000 00000000 00000000
<4>[    0.265507] 0xd0858090:  00000000 00000000 00000000 00000000
<4>[    0.265516] 0xd08580a0:  00000000 00000000 00000000 00000000
<4>[    0.265525] 0xd08580b0:  00000000 00000000 00000000 00000000
<4>[    0.265533] 0xd08580c0:  2000780b 00000000 00000006 00212800
<7>[    0.265546] CCM: CSCMR1(0x00900040), CSCDR1(0x00490b40)
<7>[    0.265553] CCM: CCOSR(0x000a000c), CCGR6(0x00000030)
<7>[    0.265559] CCM: CMEOR(0x7fffffff)
<7>[    0.265563] sdhci: ===========================================
<6>[    0.265815] mmc0: SDHCI controller on platform [sdhci-esdhc-imx.1] using DMA
<6>[    0.266889] mmc1: no vmmc regulator found
<7>[    0.267904] sdhci: =========== REGISTER DUMP (mmc1)===========
<4>[    0.267912] 
<4>[    0.267914] 0xd0860000:  00000000 00010000 00000000 00000000
<4>[    0.267924] 0xd0860010:  00000000 00000000 00000000 00000000
<4>[    0.267934] 0xd0860020:  00000000 ff888088 08800020 0080800f
<4>[    0.267944] 0xd0860030:  00000000 007f0003 007f0003 00000000
<4>[    0.267953] 0xd0860040:  07f3b407 08100810 80000000 00000000
<4>[    0.267963] 0xd0860050:  00000000 00000000 00000000 00000000
<4>[    0.267973] 0xd0860060:  00000000 00000200 00000000 0800ff00
<4>[    0.267982] 0xd0860070:  00000000 00000000 00000000 00000000
<4>[    0.267991] 0xd0860080:  00000000 00000000 00000000 00000000
<4>[    0.268001] 0xd0860090:  00000000 00000000 00000000 00000000
<4>[    0.268010] 0xd08600a0:  00000000 00000000 00000000 00000000
<4>[    0.268019] 0xd08600b0:  00000000 00000000 00000000 00000000
<4>[    0.268028] 0xd08600c0:  2000780b 00000000 00000006 00212800
<7>[    0.268040] CCM: CSCMR1(0x00900040), CSCDR1(0x00490b40)
<7>[    0.268046] CCM: CCOSR(0x000a000c), CCGR6(0x000000c0)
<7>[    0.268051] CCM: CMEOR(0x7fffffff)
<7>[    0.268055] sdhci: ===========================================
<6>[    0.268154] mmc0: mmc_rescan_try_freq: trying to init card at 400000 Hz
<6>[    0.269553] mmc1: SDHCI controller on platform [sdhci-esdhc-imx.2] using DMA
<7>[    0.270262] Registered led device: max77696-leds.0
<6>[    0.270272] MAX77696 LED Driver #0 1.0.0 Installed
<7>[    0.270433] Registered led device: max77696-leds.1
<6>[    0.270441] MAX77696 LED Driver #1 1.0.0 Installed
<6>[    0.270934] usbcore: registered new interface driver snd-usb-audio
<6>[    0.270943] ALSA device list:
<6>[    0.270948]   No soundcards found.
<6>[    0.271262] nf_conntrack version 0.5.0 (3965 buckets, 15860 max)
<6>[    0.271865] ip_tables: (C) 2000-2006 Netfilter Core Team
<6>[    0.271923] TCP cubic registered
<6>[    0.271931] NET: Registered protocol family 17
<6>[    0.271949] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
<3>[    0.272079] LPDDR2 MfgId: 0x1 [Samsung]
<3>[    0.276257] 
<3>[    0.276260] just text: vaddr c0129f3c, va 0xc0129200 pa 0x801000c3 attr 0x6
<3>[    0.288694] 
<3>[    0.288696] nmx6sl_wfi_iram: vaddr d084e000, va 0xd084e200 pa 0x904043 attr 0x2
<3>[    0.297536] 
<3>[    0.297538] mx6sl_ddr: vaddr d0856000, va 0xd0856200 pa 0x905043 attr 0x2
<3>[    0.305867] 
<3>[    0.305870] mx6sl_iomux: vaddr f40e0000, va 0xf40e0200 pa 0x20110c3 attr 0x149
<3>[    0.316642] 
<3>[    0.316645] ANATOP: vaddr f40c8000, va 0xf40c8200 pa 0x20110c3 attr 0x149
<3>[    0.330976] max77696-adc max77696-adc.0: adc conversion timed out
<3>[    0.337273] 
<3>[    0.337275] CCM: vaddr f40c4000, va 0xf40c4200 pa 0x20110c3 attr 0x149
<3>[    0.350212] 
<3>[    0.350214] MMDC_P0: vaddr f41b0000, va 0xf41b0200 pa 0x21110c3 attr 0x149
<3>[    0.360624] 
<3>[    0.360626] L2: vaddr f2a02000, va 0xf2a02200 pa 0xa02043 attr 0x149
<3>[    0.370504] 
<3>[    0.370506] arm perif: vaddr f2a00000, va 0xf2a00200 pa 0xa00043 attr 0x149
<6>[    0.381267] Bus freq driver module loaded
<6>[    0.383516] Bus freq driver Enabled
<6>[    0.388411] mxc_dvfs_core_probe
<6>[    0.388668] DVFS driver module loaded
<4>[    0.390538] regulator_init_complete: max77696_ldo10: incomplete constraints, leaving on
<4>[    0.391179] regulator_init_complete: max77696_ldo7: incomplete constraints, leaving on
<4>[    0.391400] regulator_init_complete: max77696_ldo6: incomplete constraints, leaving on
<4>[    0.394764] regulator_init_complete: max77696_buck6: incomplete constraints, leaving on
<4>[    0.397014] regulator_init_complete: max77696_buck5: incomplete constraints, leaving on
<4>[    0.399450] regulator_init_complete: max77696_buck2dvs: incomplete constraints, leaving on
<4>[    0.401697] regulator_init_complete: max77696_buck1dvs: incomplete constraints, leaving on
<3>[    0.408241] max77696-adc max77696-adc.0: adc conversion timed out
<6>[    0.420494] 
<6>[    0.420497] ADC value out of thermistor range! setting display temp to 75 deg C
<7>[    0.432808] max77696-rtc max77696-rtc.0: read time:
<7>[    0.432820] max77696-rtc max77696-rtc.0: YEAR 0E MONTH 01 DOM 01 DOW 08 HOUR 0C MIN 20 SEC 27
<7>[    0.432834] max77696-rtc max77696-rtc.0: --> 2014-01-01 Wed 00:32:39
<6>[    0.432853] max77696-rtc max77696-rtc.0: setting system clock to 2014-01-01 00:32:39 UTC (1388536359)
<6>[    0.433050] emmc: I def:mmcpartinfo:vendor=micron, host=mmc0:
<6>[    0.446412] KERNEL: I pmic:charger chgina::charger connected
<6>[    0.462763] MAX77696 Main Charger Driver 1.0.0 Installed
<6>[    0.470181] mmc0: new high speed DDR MMC card at address 0001
<6>[    0.470851] mmcblk0: mmc0:0001 MMC02G 1.83 GiB 
<6>[    0.471056] mmcblk0boot0: mmc0:0001 MMC02G partition 1 2.00 MiB
<6>[    0.471184] mmcblk0boot1: mmc0:0001 MMC02G partition 2 2.00 MiB
<6>[    0.473149]  mmcblk0: p1 p2 p3 p4
<6>[    0.474603] MAX77696 Energy Harvester Driver 1.0.0 Installed
<6>[    0.476760] Freeing init memory: 1076K
<6>[    0.477952]  mmcblk0boot1: unknown partition table
<6>[    0.480130]  mmcblk0boot0: unknown partition table
<6>[    0.480329] mmc1: mmc_rescan_try_freq: trying to init card at 400000 Hz
<4>[    0.487017] DEBUG:mount.c:281:mount_waveform_area():Mounted /mnt/wfm (/dev/loop1)
<4>[    0.490227] INFO:update.c:118:find_file():find_file:118 Found 320_G096_AAEA02_ED060XD4U2_TC.wrf.gz
<4>[    0.490288] ERROR:recovery-util.c:1711:main():wfm_count=1DEBUG:eink.c:243:eink_init():Loading: /lib/modules/mxc_epdc_eink.ko 
<4>[    0.490488] DEBUG:module.c:139:insmod():/lib/modules/mxc_epdc_eink.ko:loaded 11924 bytes. (11924)
<4>[    0.490552] mxc_epdc_eink: module license 'proprietary' taints kernel.
<4>[    0.490560] Disabling lock debugging due to kernel taint
<4>[    0.490885] INFO:module.c:163:insmod():Loaded module /lib/modules/mxc_epdc_eink.ko  (11924 bytes)
<4>[    0.490940] DEBUG:eink.c:243:eink_init():Loading: /lib/modules/mxc_epdc_fb.ko 
<4>[    0.491657] DEBUG:module.c:139:insmod():/lib/modules/mxc_epdc_fb.ko:loaded 141660 bytes. (141660)
<6>[    0.550532] mmc1: mmc_rescan_try_freq: trying to init card at 300000 Hz
<6>[    0.621826] mmc1: mmc_rescan_try_freq: trying to init card at 200000 Hz
<6>[    0.694498] mmc1: mmc_rescan_try_freq: trying to init card at 100000 Hz
<6>[    1.182109] add wake up source irq 104
<6>[    1.553087] Retrieved voltage control information
<6>[    2.252110] KERNEL: I pmic:fg battery id check::wario_battery_valid=0
<6>[    2.252126] kernel: kernel_metric_high_priority,1388536361,counter,kernel,fg,wario battery invalid,1,
<4>[    2.949360] INFO:module.c:163:insmod():Loaded module /lib/modules/mxc_epdc_fb.ko  (141660 bytes)
<4>[    3.125788] INFO:eink.c:334:eink_init():eink initialized... (786432 bytes)
<4>[    3.125983] DEBUG:recovery-util.c:678:choose_boot_mode():curr_time=1388536362 end_time=1388536362
<4>[    3.126087] DEBUG:keypad.c:105:keypad_set():keypad_set():keypad_fd=-1 biggest_fd=0xbe9e993c biggest_fd=0 s=0xbe9e9990
<4>[    4.128489] DEBUG:readkey.c:121:read_key():Timeout
<4>[    4.128723] DEBUG:recovery-util.c:695:choose_boot_mode():curr_time=1388536363 end_time=1388536362 **
<4>[    4.998845] DEBUG:eink.c:873:eink_drawstring():str_len = 21
<4>[    4.998897] DEBUG:eink.c:205:letter_to_sprite():letter_to_sprite(letter:0x42, idx:34)
<4>[    4.998951] DEBUG:eink.c:727:eink_draw_sprite():eink_draw_sprite(x0:0,y0:983,s->x_size=24,s->y_size=41,s->x_off=816,s->y_off=0)
<4>[    4.999323] DEBUG:eink.c:205:letter_to_sprite():letter_to_sprite(letter:0x41, idx:33)
<4>[    4.999379] DEBUG:eink.c:727:eink_draw_sprite():eink_draw_sprite(x0:24,y0:983,s->x_size=24,s->y_size=41,s->x_off=792,s->y_off=0)
<4>[    4.999710] DEBUG:eink.c:205:letter_to_sprite():letter_to_sprite(letter:0x54, idx:52)
<4>[    4.999760] DEBUG:eink.c:727:eink_draw_sprite():eink_draw_sprite(x0:48,y0:983,s->x_size=24,s->y_size=41,s->x_off=1248,s->y_off=0)
<4>[    5.000105] DEBUG:eink.c:205:letter_to_sprite():letter_to_sprite(letter:0x54, idx:52)
<4>[    5.000154] DEBUG:eink.c:727:eink_draw_sprite():eink_draw_sprite(x0:72,y0:983,s->x_size=24,s->y_size=41,s->x_off=1248,s->y_off=0)
<4>[    5.000485] DEBUG:eink.c:205:letter_to_sprite():letter_to_sprite(letter:0x45, idx:37)
<4>[    5.000531] DEBUG:eink.c:727:eink_draw_sprite():eink_draw_sprite(x0:96,y0:983,s->x_size=24,s->y_size=41,s->x_off=888,s->y_off=0)
<4>[    5.000855] DEBUG:eink.c:205:letter_to_sprite():letter_to_sprite(letter:0x52, idx:50)
<4>[    5.000904] DEBUG:eink.c:727:eink_draw_sprite():eink_draw_sprite(x0:120,y0:983,s->x_size=24,s->y_size=41,s->x_off=1200,s->y_off=0)
<4>[    5.001232] DEBUG:eink.c:205:letter_to_sprite():letter_to_sprite(letter:0x59, idx:57)
<4>[    5.001281] DEBUG:eink.c:727:eink_draw_sprite():eink_draw_sprite(x0:144,y0:983,s->x_size=24,s->y_size=41,s->x_off=1368,s->y_off=0)
<4>[    5.001616] DEBUG:eink.c:205:letter_to_sprite():letter_to_sprite(letter:0x20, idx:0)
<4>[    5.001662] DEBUG:eink.c:727:eink_draw_sprite():eink_draw_sprite(x0:168,y0:983,s->x_size=24,s->y_size=41,s->x_off=0,s->y_off=0)
<4>[    5.002022] DEBUG:eink.c:205:letter_to_sprite():letter_to_sprite(letter:0x49, idx:41)
<4>[    5.002070] DEBUG:eink.c:727:eink_draw_sprite():eink_draw_sprite(x0:192,y0:983,s->x_size=24,s->y_size=41,s->x_off=984,s->y_off=0)
<4>[    5.002466] DEBUG:eink.c:205:letter_to_sprite():letter_to_sprite(letter:0x4e, idx:46)
<4>[    5.002521] DEBUG:eink.c:727:eink_draw_sprite():eink_draw_sprite(x0:216,y0:983,s->x_size=24,s->y_size=41,s->x_off=1104,s->y_off=0)
<4>[    5.002850] DEBUG:eink.c:205:letter_to_sprite():letter_to_sprite(letter:0x56, idx:54)
<4>[    5.002902] DEBUG:eink.c:727:eink_draw_sprite():eink_draw_sprite(x0:240,y0:983,s->x_size=24,s->y_size=41,s->x_off=1296,s->y_off=0)
<4>[    5.003233] DEBUG:eink.c:205:letter_to_sprite():letter_to_sprite(letter:0x41, idx:33)
<4>[    5.003282] DEBUG:eink.c:727:eink_draw_sprite():eink_draw_sprite(x0:264,y0:983,s->x_size=24,s->y_size=41,s->x_off=792,s->y_off=0)
<4>[    5.003609] DEBUG:eink.c:205:letter_to_sprite():letter_to_sprite(letter:0x4c, idx:44)
<4>[    5.003660] DEBUG:eink.c:727:eink_draw_sprite():eink_draw_sprite(x0:288,y0:983,s->x_size=24,s->y_size=41,s->x_off=1056,s->y_off=0)
<4>[    5.003994] DEBUG:eink.c:205:letter_to_sprite():letter_to_sprite(letter:0x49, idx:41)
<4>[    5.004042] DEBUG:eink.c:727:eink_draw_sprite():eink_draw_sprite(x0:312,y0:983,s->x_size=24,s->y_size=41,s->x_off=984,s->y_off=0)
<4>[    5.004370] DEBUG:eink.c:205:letter_to_sprite():letter_to_sprite(letter:0x44, idx:36)
<4>[    5.004418] DEBUG:eink.c:727:eink_draw_sprite():eink_draw_sprite(x0:336,y0:983,s->x_size=24,s->y_size=41,s->x_off=864,s->y_off=0)
<4>[    5.004744] DEBUG:eink.c:205:letter_to_sprite():letter_to_sprite(letter:0x3a, idx:26)
<4>[    5.004792] DEBUG:eink.c:727:eink_draw_sprite():eink_draw_sprite(x0:360,y0:983,s->x_size=24,s->y_size=41,s->x_off=624,s->y_off=0)
<4>[    5.005144] DEBUG:eink.c:205:letter_to_sprite():letter_to_sprite(letter:0x20, idx:0)
<4>[    5.005190] DEBUG:eink.c:727:eink_draw_sprite():eink_draw_sprite(x0:384,y0:983,s->x_size=24,s->y_size=41,s->x_off=0,s->y_off=0)
<4>[    5.005540] DEBUG:eink.c:205:letter_to_sprite():letter_to_sprite(letter:0x2d, idx:13)
<4>[    5.005590] DEBUG:eink.c:727:eink_draw_sprite():eink_draw_sprite(x0:408,y0:983,s->x_size=24,s->y_size=41,s->x_off=312,s->y_off=0)
<4>[    5.005949] DEBUG:eink.c:205:letter_to_sprite():letter_to_sprite(letter:0x32, idx:18)
<4>[    5.005997] DEBUG:eink.c:727:eink_draw_sprite():eink_draw_sprite(x0:432,y0:983,s->x_size=24,s->y_size=41,s->x_off=432,s->y_off=0)
<4>[    5.006329] DEBUG:eink.c:205:letter_to_sprite():letter_to_sprite(letter:0x32, idx:18)
<4>[    5.006380] DEBUG:eink.c:727:eink_draw_sprite():eink_draw_sprite(x0:456,y0:983,s->x_size=24,s->y_size=41,s->x_off=432,s->y_off=0)
<4>[    5.006708] DEBUG:eink.c:205:letter_to_sprite():letter_to_sprite(letter:0x20, idx:0)
<4>[    5.006753] DEBUG:eink.c:727:eink_draw_sprite():eink_draw_sprite(x0:480,y0:983,s->x_size=24,s->y_size=41,s->x_off=0,s->y_off=0)
<4>[    5.007101] INFO:eink.c:891:eink_printf():BATTERY INVALID: -22
<4>[    5.622736] INFO:recovery-util.c:316:fl_control_fadedown():
<4>[    5.622825] ===FL fadedown success===
<4>[    5.623140] ERROR:recovery-util.c:346:battery_check():
<4>[    5.623151] === BATTERY ID IS INVALID. STOPPING BOOT ===
<4>[    5.626922] DEBUG:module.c:139:insmod():/lib/modules/fsl_otg_arc.ko:loaded 26540 bytes. (26540)
<6>[    5.638791] Freescale USB OTG Driver loaded, $Revision: 1.55 $
<6>[    5.646664] add wake up source irq 75
<4>[    5.666195] INFO:module.c:163:insmod():Loaded module /lib/modules/fsl_otg_arc.ko  (26540 bytes)
<4>[    5.678018] DEBUG:module.c:139:insmod():/lib/modules/ehci-hcd.ko:loaded 78400 bytes. (78400)
<6>[    5.702845] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
<6>[    5.713633] fsl-ehci fsl-ehci.0: Freescale On-Chip EHCI Host Controller
<6>[    5.713692] fsl-ehci fsl-ehci.0: new USB bus registered, assigned bus number 1
<6>[    5.742176] fsl-ehci fsl-ehci.0: irq 75, io base 0x02184000
<6>[    5.762142] fsl-ehci fsl-ehci.0: USB 2.0 started, EHCI 1.00
<6>[    5.762990] hub 1-0:1.0: USB hub found
<6>[    5.763028] hub 1-0:1.0: 1 port detected
<6>[    5.763437] add wake up source irq 74
<6>[    5.767322] fsl-ehci fsl-ehci.1: Freescale On-Chip EHCI Host Controller
<6>[    5.767371] fsl-ehci fsl-ehci.1: new USB bus registered, assigned bus number 2
<6>[    5.792182] fsl-ehci fsl-ehci.1: irq 74, io base 0x02184200
<6>[    5.812139] fsl-ehci fsl-ehci.1: USB 2.0 started, EHCI 1.00
<6>[    5.812941] hub 2-0:1.0: USB hub found
<6>[    5.812975] hub 2-0:1.0: 1 port detected
<4>[    5.813382] INFO:module.c:163:insmod():Loaded module /lib/modules/ehci-hcd.ko  (78400 bytes)
<4>[    5.814016] DEBUG:module.c:139:insmod():/lib/modules/arcotg_udc.ko:loaded 42072 bytes. (42072)
<6>[    5.816054] ARC USBOTG Device Controller driver (1 August 2005)
<4>[    5.824316] INFO:module.c:163:insmod():Loaded module /lib/modules/arcotg_udc.ko  (42072 bytes)
<4>[    5.825083] DEBUG:module.c:139:insmod():/lib/modules/g_file_storage.ko:loaded 60264 bytes. (60264)
<6>[    5.827715] fsg_bind:3588 unbind
<6>[    5.827973] g_file_storage gadget: File-backed Storage Gadget, version: 1 September 2010
<6>[    5.828001] g_file_storage gadget: Number of LUNs=1
<6>[    5.828019] Suspend udc for OTG auto detect
<6>[    5.873842] boot:USB host cable is already plugged in. Simulating event
<6>[    5.873884] fsl-usb2-udc: bind to driver g_file_storage 
<4>[    5.873963] INFO:module.c:163:insmod():Loaded module /lib/modules/g_file_storage.ko removable=1 vendor=0x1949 product=0x0004 release=0x0100 recovery_mode=1 (60264 bytes)

=== END ===

Last edited by varu; 10-03-2017 at 09:18 PM. Reason: Added spoiler.
varu is offline   Reply With Quote
Old 10-03-2017, 09:17 PM   #12
varu
Member
varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'
 
Posts: 12
Karma: 10000
Join Date: Sep 2017
Device: Kindle PW2
I had a poke through the kernel sources and found this in linux-3.0.35\drivers\power\max77696-battery.c:

Spoiler:
Code:
#define BATT_ID_CHECK_TEMP_DELTA            15


/*
 *	wario_check_battery:
 * 		This function validates battery by comparing temperature
 *		readings between FG & DISPLAY thermistor
 */
static int wario_check_battery(void)
{
    int temp_delta = 0;
	temp_delta = abs(wario_battery_temp_c - display_temp_c);

	if ((temp_delta < BATT_ID_CHECK_TEMP_DELTA) ||
		(strncmp(system_bootmode, "diags", 5) == 0) ||
		(lab126_board_is(BOARD_ID_WARIO) || lab126_board_is(BOARD_ID_WOODY)) ||
		wario_battery_check_disabled) {
		return 1;
	}
	return 0; #otherwise we haven't.
}



static void wario_battery_check_handler(struct work_struct *work)
{
	struct max77696_gauge *me = container_of(work, struct max77696_gauge, lobat_work.work);
	int rc = 0;
	wario_battery_valid = wario_check_battery();

	printk(KERN_INFO "KERNEL: I pmic:fg battery id check::wario_battery_valid=%d\n",wario_battery_valid);


The battery check seems to go through this logic:
IF the temp difference is less than 15 OR we're in diags OR it's a wario or woody board OR we've set the battery check to disabled, we can return 1 - we passed the check!

This is where I believe my board goes wonky on the display thermistor side. The battery thermistor returns a proper value of about 82F - around 27-28C. The 5.4.0 & 5.4.3.2 kernels, when the ADC fails to retrieve a proper value for the display thermistor, hard-set it to 43C. If the battery is warm enough, the 15-degree delta check is passed and the battery ID check passes. This explains why I was able to have occasional successes booting with the 5.4.x firmware, but none with any higher. I took a look at the output of the 5.8.7.0.1 kernel:

Spoiler:
Code:
[  181.008860] ADC value out of thermistor range! setting display temp to 75 deg C


That would explain it! The temp_delta is always greater than 15, so this returns false. Diags isn't set, so that also returns false. This isn't a wario or woody board (I believe), so this also returns false. The battery check is not disabled, also false. Because the entire OR chain is false, the check returns 0. When diags mode is set, the Diags condition of the above chain becomes true, setting the if conditional to true, returning 1, and passing the check.

Looking at max77696-adc.c from the 5.8.7.0.1 sources, we see how the ADC logic works:

The temp range it operates with, ranging from -10 to +75C:
Spoiler:
Code:
static struct lkup_data ntc_lkup[TEMP_RANGE] = {
{75,0x95},
{74,0x9A},
{73,0x9F},
{72,0xA4},
{71,0xAA},
{70,0xAF},

{69,0xB4},
{68,0xBA},
{67,0xBF},
{66,0xC5},
{65,0xCA},
{64,0xD0},
{63,0xD6},
{62,0xDC},
{61,0xE3},
{60,0xE9},

{59,0xF0},
{58,0xF7},
{57,0xFE},
{56,0x105},
{55,0x10D},
{54,0x114},
{53,0x11D},
{52,0x125},
{51,0x12D},
{50,0x136},

{49,0x140},
{48,0x149},
{47,0x153},
{46,0x15D},
{45,0x168},
{44,0x172},
{43,0x17E},
{42,0x189},
{41,0x195},
{40,0x1A2},

{39,0x1AF},
{38,0x1BC},
{37,0x1CA},
{36,0x1D8},
{35,0x1E6},
{34,0x1F6},
{33,0x205},
{32,0x215},
{31,0x226},
{30,0x237},

{29,0x249},
{28,0x25B},
{27,0x26E},
{26,0x281},
{25,0x295},
{24,0x2A9},
{23,0x2BE},
{22,0x2D4},
{21,0x2EA},
{20,0x301},

{19,0x319},
{18,0x331},
{17,0x34A},
{16,0x363},
{15,0x37E},
{14,0x399},
{13,0x3B4},
{12,0x3D1},
{11,0x3EE},
{10,0x40C},

{9,0x42B},
{8,0x44A},
{7,0x46A},
{6,0x48B},
{5,0x4AD},
{4,0x4D0},
{3,0x4F3},
{2,0x517},
{1,0x53C},
{0,0x562},

{-1,0x589},
{-2,0x5B1},
{-3,0x5DA},
{-4,0x603},
{-5,0x62E},
{-6,0x659},
{-7,0x686},
{-8,0x6B3},
{-9,0x6E1},
{-10,0x710},
};

As well as the code that operates on it. It seems to be a comparator, starting at -10C and going up to 75C hoping to strike a match against what it read. If a match is found, it is set to whatever the counter has reached. Otherwise, if the ADC value is outside of the -10/+75C bounds, if it's above the bound, it gets set to 75C. If it's below, it gets set to -10C. As it's being set to 75C, we know the value the ADC is reading is above 75.
Spoiler:

Code:
static int lkup_temp_data(int data)
{
  int start=0, end=TEMP_RANGE-1, mid;

  if(unlikely(data >= ntc_lkup[end].code)) {
    printk(KERN_INFO "\nADC value out of thermistor range! setting\
 display temp to %d deg C\n", ntc_lkup[end].temp);
    return ntc_lkup[end].temp;
  }

  if(unlikely(data <= ntc_lkup[start].code)) {
    printk(KERN_INFO "\nADC value out of thermistor range! setting\
 display temp to %d deg C\n", ntc_lkup[start].temp);
    return ntc_lkup[start].temp;
  }

Looking at max77696-adc.c from the 5.4.0 sources, sure enough! A range of +3 to +43C!

Spoiler:
Code:
static struct lkup_data ntc_lkup[TEMP_RANGE] = {
{43, 0x17A}, {38, 0x1B4}, {33, 0x1FA}, {30, 0x22C}, {27, 0x25D},
{24, 0x296}, {21, 0x2D3}, {18, 0x322}, {15, 0x35F}, {12, 0x3AD},
{9, 0x403}, {6, 0x45D}, {3, 0x49D},
};


This confirms two scenarios I've seen: that of the display temp set to 43, and that of it set to 3. We now know where those values came from and how they ended up that way.

The question now is what causes the max77696 to retrieve an incorrect value from the display thermistor (also perhaps to have a peek at what the value it retrieves *is*).
varu is offline   Reply With Quote
Old 10-03-2017, 10:09 PM   #13
coplate
Fanatic
coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.
 
Posts: 579
Karma: 1329466
Join Date: Jun 2009
Device: prs-505, Kindle Keyboard 3g, PW3
That's fantastic research.

I think my paperwhite that has no screen plugged into it gives that same error, but I will have to double check.
coplate is offline   Reply With Quote
Old 10-04-2017, 12:18 AM   #14
varu
Member
varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'varu knows the difference between 'who' and 'whom'
 
Posts: 12
Karma: 10000
Join Date: Sep 2017
Device: Kindle PW2
The display temperature is retrieved as follows in max77696-adc.c:

Spoiler:
Code:
/********* ADC Source external interfaces *******************************/
/* Display Panel NTC interface */
static void adc_disp_gettemp_work(struct work_struct *work)
{
    u16 data = 0x0;

    max77696_adc_read(MAX77696_ADC_CH_AIN0, &data);

    /* Remove ADC grnd ref noise in boards with analog grnd island */
    if(lab126_board_rev_greater(BOARD_ID_WARIO_2) ||
	lab126_board_is(BOARD_ID_ICEWINE_WARIO_512) ||
	lab126_board_is(BOARD_ID_ICEWINE_WFO_WARIO_512) ||
        lab126_board_rev_greater(BOARD_ID_ICEWINE_WARIO_P5) ||
	lab126_board_rev_greater(BOARD_ID_ICEWINE_WFO_WARIO_P5) ||
	lab126_board_rev_greater(BOARD_ID_PINOT_WFO_EVT1) ||
	lab126_board_rev_greater(BOARD_ID_PINOT_WFO_2GB_EVT1) ||
	lab126_board_is(BOARD_ID_PINOT_2GB) ||
	lab126_board_is(BOARD_ID_PINOT) ||
	lab126_board_is(BOARD_ID_MUSCAT_WAN) ||
	lab126_board_is(BOARD_ID_MUSCAT_WFO) ||
	lab126_board_is(BOARD_ID_MUSCAT_32G_WFO) ||
	lab126_board_is(BOARD_ID_BOURBON_WFO) ||
        lab126_board_is(BOARD_ID_BOURBON_WFO_PREEVT2) ||
	lab126_board_is(BOARD_ID_WHISKY_WFO) ||
	lab126_board_is(BOARD_ID_WHISKY_WAN) ||
	lab126_board_is(BOARD_ID_WOODY)) { 
            u16 noise = 0x0;
            max77696_adc_read(MAX77696_ADC_CH_AIN2, &noise);
            /* diff to compensate */
            data = abs(data - noise);
    }

    /*this is the only place display_temp gets updated, so no mutex needed! */
    display_temp_c = lkup_temp_data(data);

    schedule_delayed_work(&adc_disp_temp_work, msecs_to_jiffies(DISP_ADC_TEMP_THRESHOLD));
    return;
}

So MAX77696_ADC_CH_AIN2 is the specific sensor we want to look at. The kernel exposes this sensor & all others on the MAX77696 at /sys/devices/platform/imx-i2c.0/i2c-0/0-003c/max77696-adc.0/

Running cat /sys/devices/platform/imx-i2c.0/i2c-0/0-003c/max77696-adc.0/ain2 I get...

Code:
max77696-adc max77696-adc.0: adc conversion timed out
What's interesting is, this ADC conversion fails for every single exposed sensor!

The code for the ADC conversion is in max77696-adc.c & looks like this:

Spoiler:
Code:
static int max77696_adc_channel_convert (struct max77696_adc *me,
    u8 channel, u16 *data)
{
    u8 adc_busy, adc_ch, tmp;
    u16 val;
    unsigned long timeout;
    int rc;

    adc_ch = max77696_adc_channels[channel].physical_channel;

    /* Enable ADC by setting the ADC Enable (ADCEN) bit to 1
     * which in turn forces the ADC reference on
     * even if ADCREFEN bit is set to 0.
     */
    rc = max77696_adc_reg_set_bit(me, ADCCNTL, ADCEN, 1);
    if (unlikely(rc)) {
        dev_err(me->dev, "ADCCNTL write error [%d]\n", rc);
        goto out;
    }

    /* Setup ADC channel for conversion */
    if (likely(max77696_adc_channels[channel].setup)) {
        rc = max77696_adc_channels[channel].setup(me, channel);
        if (unlikely(rc)) {
	    dev_err(me->dev, "failed to setup channel %u [%d]\n", channel, rc);
	    goto out;
	}
    }

    /* Initiate ADC conversion sequence
     * by setting the ADC Start Conversion (ADCCONV) to 1.
     */
    rc = max77696_adc_reg_set_bit(me, ADCCNTL, ADCCONV, 1);
    if (unlikely(rc)) {
        dev_err(me->dev, "ADCCNTL write error [%d]\n", rc);
        goto out;
    }

    /* Check availability of ADC val by inspecting the ADCCONV bit.
     * This bit is automatically cleared to 0
     * when an ADC conversion sequence has completed.
     */

    timeout = jiffies + msecs_to_jiffies(ADC_CONVERSION_TIME_OUT);

    do {
        if (unlikely(time_after(jiffies, timeout))) {
            dev_err(me->dev, "adc conversion timed out\n");
            rc = - -ETIMEDOUT;
            goto out;
        }
        msleep(1);
        max77696_adc_reg_get_bit(me, ADCCNTL, ADCCONV, &adc_busy);
    } while (likely(adc_busy));

    /* Read ADC conversion result. */
    rc = max77696_adc_reg_set_bit(me, ADCCHSEL, ADCCH, adc_ch);
    if (unlikely(rc)) {
        dev_err(me->dev, "ADCCHSEL write failed [%d]\n", rc);
        goto out;
    }
    
    max77696_read(me->i2c, 0x2A, &tmp);

    rc = max77696_adc_reg_read(me, ADCDATAH, &tmp);
    if (unlikely(rc)) {
        dev_err(me->dev, "ADCDATAH read failed [%d]\n", rc);
        goto out;
    }

    val = (tmp << 8);

    rc = max77696_adc_reg_read(me, ADCDATAL, &tmp);
    if (unlikely(rc)) {
        dev_err(me->dev, "ADCDATAL read failed [%d]\n", rc);
        goto out;
    }
    
    val = (val | tmp);
    
    *data = val;

    /* Release ADC channel after conversion */
    if (likely(max77696_adc_channels[channel].release)) {
        max77696_adc_channels[channel].release(me, channel);
    }

out:
    /* Disable the ADC Block and Reference when not in use
     * to save power. */
    max77696_adc_reg_write(me, ADCCNTL, 0);

    return rc;
}


The salient bit is as follows (with comments on what I think it does - I'm by no means a programmer). The 10msec value is drawn from earlier in the file:

#define ADC_CONVERSION_TIME_OUT 10 /* in milli-seconds */

Code:
/* Check availability of ADC val by inspecting the ADCCONV bit.
 * This bit is automatically cleared to 0
 * when an ADC conversion sequence has completed.
 */
 
timeout = jiffies + msecs_to_jiffies(ADC_CONVERSION_TIME_OUT); // time when this function is ran plus 10msec (in jiffies)

do {
	if (unlikely(time_after(jiffies, timeout))) { // if time when this is checked is *after* timeout, this check has taken too long
		dev_err(me->dev, "adc conversion timed out\n");
		rc = - -ETIMEDOUT;
		goto out;
	}
	msleep(1); // sleep for 1ms
	max77696_adc_reg_get_bit(me, ADCCNTL, ADCCONV, &adc_busy);
} while (likely(adc_busy));
To further probe into why all ADC conversions fail I'd have to poll the appropriate registers & see the bit values. This may be useful; however, this code works properly on other PW2s and, given the ADC timeout on every sensor, it's safe to say that either the chip's gone bad or there is some other board-level defect - neither are avenues worth pursuing for me, particularly given the lack of a datasheet on the MAX77696 or board schematics for the PW2.

As the display temperature check is all I'm concerned about, the next step is to rebuild the kernel with a modified max77696-battery.c where either wario_battery_check_disabled is hardcoded to 1, or where the temp_delta < BATT_ID_CHECK_TEMP_DELTA check is removed from the OR chain. That said, such a task is somewhat unexplored territory for me (bit of a different story than just compiling one on x86 from what I've read). If anyone reading can assist or think of a better approach, I welcome any and all suggestions!

Last edited by varu; 10-04-2017 at 01:34 AM.
varu is offline   Reply With Quote
Old 10-04-2017, 11:06 AM   #15
knc1
Analog Forever!
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 16,202
Karma: 17256900
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Which is one certain way to create thermal runaway during battery charging.
Which is just fine, if your objective is to start a fire or a bragging rights you-tube video.

Disabling it on the display just gives you an unreadable display (the e-ink waveform generator needs the value).
knc1 is offline   Reply With Quote
Reply

Tags
boot, code, loop, repair

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
KPW1 needs repair. Code 2. Serial port fix. amocus Kindle Developer's Corner 8 09-03-2015 02:30 PM
[Need Help] PW2 fault with Repair Code 2 matrix121985 Kindle Developer's Corner 2 11-13-2014 03:37 AM
pw2 Repair Needed help please! pes2014a Kindle Developer's Corner 7 04-21-2014 09:55 AM
Kindle PW2 now £89 for a short time with coupon code BookCat Amazon Kindle 19 02-28-2014 03:30 PM


All times are GMT -4. The time now is 03:03 PM.


MobileRead.com is a privately owned, operated and funded community.