[PRO] [Q] General tech stuff... - Xperia Arc General

Hi folks,
after some years of extensive usage my Milestone needs a companion
I'm new to the xperia 2011 platform and bought myself a Xperia Pro some days ago.
Right now i'm in the process of fixing the backlight, but in a few days i'm ready to rock...
I really like devices with a hardware keyboard and it's a shame that these devices leave the scene (even more in the EU).
Anyway enough talking...
I'm not the guy who ignores the search function, but i got some specific questions and hopefully someone will put some light on that.
I know as well that we are nearly in the year 2013 and these devices are not up to date, but it's O.K. for me.
In fact there are enough features on this phone and i don't need a heater in my pocket
SoC:
As i looked everywhere there's still no datasheet or register manual floating around...
Apart from the architecture is the MSM8255 comparable to the old MSM7200 if you look at the basic function?
In short:
- memory map ?
- booting scenario: arm9 boots first then armV7 comes up?
EDIT:
It seems these questions are little bit to deep... just asked for curiosity though.
I guess i'll step through kernel code and compare some of the offsets with MSM7200 (we got register manual here).
The background is that i'd like to check some register contents for debugging at a later point...
CWM:
If i got it right there's no true CWM recovery.img for the Pro, if i got it right the CWM is part of the system and loaded to RAM by helpers.
Right or wrong?
How does the partition scheme look like?
Kernel 3.x:
I realized there'd been some attempts to get a 3.x kernels running on these devices, as far as i could conclude from what i read, the situation is as follows...
- SE left the path of standard kernel API, that's why some proprietary libs will always be required (and won't fit 3.x kernel). Right or wrong?
- HDMI part seems to be a problem... but what exactely... kernel driver is missing parts or system lib?
EDIT:
O.K. no answer here from the experts right now...
BTW, just saw the FreeXperia team has opened up a new project for porting 3.4 kernel to 2011 devices
See:
http://forum.xda-developers.com/showthread.php?t=2044262
Guess i'll ask some techie stuff over there :angel:
USB host function:
AFAIK there's no 5V power at the the OTG, but there are drivers for mouse and keyboard etc.
Just in short how does it work?
External Hub?
EDIT:
O.k. i missed some thing... datasheet of BQ24185 (connected to MicroUSB VBUS signal) gave the answer:
Code:
VBUS A1, A2 I/O Charger Input Voltage. Connect to an input supply up to 16V. Bypass VBUS to PGND with a 1μF ceramic
capacitor. [I][B]During boost mode, VBUS is regulated to 5V at up to 300mA to power USB OTG peripherals[/B][/I].
In other words, while in OTG host mode the charger is run in boost mode (could be found in the kernel board file as well).
For the peripheral drivers...
http://forum.xda-developers.com/showthread.php?t=1224676
Debug UART3:
Does anyone know anything about UART3 testpoints on the mainboard?
Code:
static struct msm_gpio uart3_config_data[] = {
{GPIO_CFG(53, 1, GPIO_CFG_INPUT, GPIO_CFG_PULL_UP, GPIO_CFG_2MA),
"UART3_Rx"},
{GPIO_CFG(54, 1, GPIO_CFG_OUTPUT, GPIO_CFG_NO_PULL, GPIO_CFG_4MA),
"UART3_Tx"},
};
EDIT:
Mmmmh still unsolved... though that these signals were routed to the testpoint area as well.
After doing some measurements this could not be confirmed right now.
Background here:
Would be nice to get serial console with a nice little adaptor for low level kernel debugging.
If someone knows...
ROMs:
Same as usual... but maybe you could give some advice...
I'd like to try a stripped down stock ICS first... don't need all these visual effects but a stable system and using the HDMI would be nice as well.
Any suggestions here?
EDIT:
O.k. i'm little impatient... so i need to look for a light ROM myself
O.k. that might be it at the first sight. I guess i'll need to play around with the device a little bit, when it's functional again.
Thank's a lot for your patience and have fun!
scholbert

Related

Developing methods to recover bricks without JTAG

I have not seen anything in the Captivate forums about UART, I2C, or really anything other then Download Mode/Recovery Mode. We could use some developers to help with this project. It's an interesting combination of hardware, software, and inter-chip communications protocols...
I think everyone knows about the 301Kohm resistor between pins 4 and 5. Did you know about the 150Kohm or the 619Kohm resistors? How about the middle battery pin?
Watch this video.
Resources
Users
One-Click Unbrick was relesed This will unbrick softbricked phones http://forum.xda-developers.com/showthread.php?t=1153310
Kernel developers
UART Kernel debug log AND shell terminal (like adb shell without adb active) On the captivate you can get into the SBL prompt, then type
Code:
printenv
setenv SWITCH_SEL 6543
printenv
saveenv
This changes the SWITCH_SEL value from 65 to 6543 and enables extra output. This will give you a kernel debug output and drop you into a shell prompt.
Developers
bootloader source code For a simlilar samsung device: http://forum.xda-developers.com/showthread.php?t=1018862&page=68
here is the iROM,: I've rehosted it here: http://teamkomin.googlecode.com/svn-history/r75/branches/IROMcode/bootdumps.rar
here: http://www.mediafire.com/file/c9bg6gyk1cuapsz/bootdumps.rar
and here: ftp://adamoutler.dyndns.org/bootdumps.rar
we need help deciphering it. We think the annotations may be wrong. This is the unchangable code in the first few blocks of memory. There must be a way to communicate with this.
Hardware guys
S5PC110 processor datasheethttp://www.mediafire.com/file/3znisgfm3amxgpj/S5PC110_EVT1_UM10.pdf This is the processor in our phones. This documents everything which is capable natively with the processor. It is 2425 pages long.. I read through it and added some notes here.. This is the meat of the manual: http://forum.xda-developers.com/showthread.php?t=1018862&page=51
FSA9280A datasheet http://www.mediafire.com/?d4e21efhuktctcb This is the first time we've had access to this manual. Our phones use the FSA9480A chip, this chip is functionally the same. The datasheet here describes all functions available to the USB switching device. From the FSA9280 datasheet we've located all resistor values. http://forum.xda-developers.com/showpost.php?p=14408452&postcount=62
All
The All-In-One GalaxyS HackPack hardware, software and documentation on our phones http://forum.xda-developers.com/showthread.php?t=1111866
It has been revealed from a source which is not to be mentioned that the OM pins/registers are fixed and cannot be changed on the processor without removing the processor from the device or making some hardware modifications.
Here's some must read threads.
Fun with resistors:http://forum.xda-developers.com/showthread.php?t=820275 This thread shows all known resistor values
Lets save some bricks:http://forum.xda-developers.com/showthread.php?t=1018862 This thread deals with ways to revive phones from the dead. We are hacking the heck out of them in here.
Development platform booting from MMC http://hi.baidu.com/j2h3344/blog/item/85740dfc0be35951d7887dd5.html This is the platform used to develop our phones. We need to find these OM bits, or access them somehow.
the middle battery pin http://forum.xda-developers.com/showpost.php?p=13448859&postcount=253 This may be the answer. We could use some help in this area.
Download the GalaxyS Hack Pack here: http://forum.xda-developers.com/show....php?t=1111866
Known Causes of hard Bricking
1. PBL(Primitive bootloader) and SBL(secondary bootloader) were not designed for the phone
2. Mismatched PBL/SBL combination
3. SBL does not fit in the Partition information table, or location does not match Partition Information Table
4. Bad USB cables
5. power loss
6. Damaged PBL/SBL
--Theoretical--
7. Something known as Secondary Bootloader Rotation may be to blame for improper bootloaders sometimes. Apparently when flashing, the SBL and SBL2 blocks may switch places. In this case you may have the proper PBL, but the SBL is not proper for the device.
Hardware Used
If you're looking to help, you'll need some development hardware. I use an Arduino Mega. http://www.bizoner.com/arduino-atme...e-p-180.html?zenid=9mg23h688slfjgh88910o5jfd2 This is a programmable interface. You can use this code to talk to the phone. http://forum.xda-developers.com/showpost.php?p=13351363&postcount=223
Here's some plans for a communications adapter http://forum.xda-developers.com/showthread.php?t=925034
The plan
If we can get into a bricked phone via UART or the i2C bus, or the USB bus, or any other method available to U301, we can corrupt the PBL(boot.bin) in the OneNand which will cause the processor to search for a PBL and SBL on USB, UART and MMC.
If we can locate an additional communications port somewhere on the phone we can change or corrupt the code running in memory and then cause the processor to reboot into USB or UART mode.
So far we know of UART only and have eliminated that as a solution on it's own.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Using SBL, it is very likely possiblity that Windows7 phone or iOS, or ubuntu could be ported over.... Basically, full control.
Why you should help
We've been working on ways to recover these phones for months now. We're comming to an end. We need massive amounts of testing to figure out this last bit.
This is a call to duty. Every developer who has ever released a boot.bin, SBL.bin, param.ifs or a PIT with their release needs to be a part of this. Every member who has ever bricked a phone while using one of the many tools which are designed to upgrade your phone can help. Anyone who wants to feel secure while flashing their phone should put some effort into this because it's expensive and requires superhuman soldering to JTAG these phones. If you've even thought about using Odin3, we need your help.
Update: UnBrickable Captivate http://forum.xda-developers.com/showthread.php?t=1206216
Seems interesting / promising, unfortunately I can't help BC I moved back to Morocco (Africa) and only brought 1 captivate with me. Good luck that is all I can say.
Sent from my SGH-I897 using XDA Premium App
Really interesting and very cool.
But I have a fully bricked captivate which I still have cause it was a friends who just went onto the Inspire. Always have wondered if I could recover the hard brick.
Wish I could help but I'm pretty useless with Soldering and taking apart my phone. But if development moves along with this I'd love to support. The idea of porting those OS and helping everyone saving hard bricked phones would be great.
Good Luck!
Sent from my SGH-I897 using XDA App
im bookmarking this. i can only help in fabrication. im not a super genius dev. but threads/projects like this do interest me.
Middle battery pin? Reminds me of the battery jig trick on the original PSP.
All-in-all, this looks promising, I'll be following it.
Posted up the iROM in the first post. this is the code which we hope to establish communications...
Keep in mind, this could be over the USB port, the Middle battery terminal, or even the headphone port.
But I have a fully bricked captivate which I still have cause it was a friends who just went onto the Inspire. Always have wondered if I could recover the hard brick.
Click to expand...
Click to collapse
I'M GETTING ONE OF THOSE IN THE AM!!!!!
i have a fully bricked cappy that i bricked lastnight. i was able to recover from the phone..!..pc icon but then failed @95% via odin3 v1.00.
i will mail you the cappy if you can fix it and use it as a test mule for future brick\unbrick attempts...... the outer glass is broken thanks to a fall from my lap to the concrete
I think I actually discussed this with you before. I ran twice into some instance where no action would make difference on the phone, no response to key combos, no response to charger or USB. But, download mode was still accessible via USB Jig.
What could've happened there?
cumanzor said:
I think I actually discussed this with you before. I ran twice into some instance where no action would make difference on the phone, no response to key combos, no response to charger or USB. But, download mode was still accessible via USB Jig.
What could've happened there?
Click to expand...
Click to collapse
Not really positive at this point, id suspect corrupted pbl.bin or param.lfs partitions. I've seen some weird stuff with the pbl. One phone would only output uart when volume + was held for 5 seconds.
Basically from my understanding... The IROM loads into the processor. This is the first 40000 bytes and it's protected memory. The iROM brings up basic functionality for the processor, including the initial factory UART/MMC load of PBL & SBL. The IROM then instructs the phone to load the IBL/PBL(Initial Boot Loader/Primitive Boot Loader). The IBL initializes memory for the SBL(Secondary Boot Loader) , then the PBL loads Params(a partition on the OneNAND) and checks the pins on the processor for commands. The PBL then makes more memory available for applications, then locates and and loads the SBL. The SBL initializes other functions and then locates and loads the kernel.
The SBL is responsible for Download Mode and the SBL prompt. it is basically the system's "BIOS" for lack of a better word. I'm not sure of the steps which can be skipped for sucessful download mode.
The iRom download it broken.
Ill look at it once your reupload
Some kid reported the iROM code as being in violation of the terms of agreement of the hosting website... It must have been a kid because Samsung would not do that. Just as we have a right to use tools to disassemble our phones, take pictures, annotate those pictures and post them on the internet, we have the same right to the IROM. It's not hurting Samsung's sales, nor is it intellectual property of Samsung. We bought the phones and it came with this. The only intellectual property in this document belongs to the person who disassembled and annotated this code.
I've rehosted it here: http://teamkomin.googlecode.com/svn-history/r75/branches/IROMcode/bootdumps.rar
here: http://www.mediafire.com/file/c9bg6gyk1cuapsz/bootdumps.rar
and here: ftp://[email protected]/bootdumps.rar username xda password developers
Lets not be childish and hinder progress anymore by clicking buttons. I've removed that ability.
I think this is a wonderfull bunch of work that is being done here and if i can offer any assistance please let me know. If you would like a private IRC channel to discuss your work in with other developers I would be more than happy to provide to a quiet private place to do so. Just shoot me a pm if i can be of any assistance.
We can really use some SGS folks to help. Check out the lets save some bricks thread mentioned in the first post.
Two quick questions:
1. How would you manage to get these files? First, aren't they burned into the nand? Secondly, wouldn't they be assembled already? How do you disassemble them?
2. Do you have any good links/books on how to learn arm assembly? I know some x86, but I've never found a good link to arm based stuff (or any sort of dev platform, for that matter).
Sorry about being semi-offtopic.
Subscribed, and very interested in following progress on this.
Also: Sending PM.
Nothing revolutionary to add just yet.
However, I just finished adding a JTAG breakout to my collection. This is what my current test setup looks like:
We could use some more DIYer's on this project. The biggest thing to have is an Arduino and a microUSB breakout board. We need to figure out how to get this phone to boot from MMC, USB, or UART... and we know Samsung does this to bricks.
this looks interesting.. gonna keep my eye on it
AdamOutler said:
Nothing revolutionary to add just yet.
We could use some more DIYer's on this project. The biggest thing to have is an Arduino and a microUSB breakout board. We need to figure out how to get this phone to boot from MMC, USB, or UART... and we know Samsung does this to bricks.
Click to expand...
Click to collapse
i can build anything, the purchase of and arduino and making the breakout board are easy but i would have no idea what to do with it afterwards.
it is funny the time you posted this because my friend found out about a club that works with arduino boards making all sorts of things and asked me if i wanted to go to there meetings. this thread popped up the next day.
well i may buy an arduino board or 2 but im not sure if even then i can be helpful
Well, a pretty much unexplored area of the phone is the middle battery terminal. The middle battery terminal is a ADC(analog to digital converter) pin. We know for a fact that it triggers something called EXT-I2C (External Inter-Integrated Circuit). EXT-I2C can be used to communicate with any chip on the I2C bus. The I2C bus connects with everything on the phone... Call Processor, OneNand, Memory and Application Processor. Using the EXT-I2C, we would have full control over the phone.
I know the middle battery terminal has something to do with it because I managed to get my phone to boot-loop with the pin disconnected and I saw messages about EXT-I2C NACK( EXT-I2C not acknowledged) when playing with resistance values and watching the UART output on my Arduino MEGA.
The unanswered questions are,
How to reproduce that EXT-I2C message?
What are the Addresses on the I2C bus?
Which pins control the I2C bus?
Here's some of the possible I2C bus connections:
USB VCC
USB Ground
USB D+
USB D-
Batt+ (when powered on USB)
Batt- (when powered on USB)
BSI (Battery Signal Indicator - middle battery pin)
Headphone Left Audio
Headphone Right Audio
Headphone Video
Headphone Ground
all External-SDCard (MMC) connections
all SIM connections
This is something you can bring to the table at that Arduino club. You can also read up on this hackaday article http://hackaday.com/2011/05/11/i2c-101/
If anyone has a good idea of which pins may be OM pins here, let me know..
Side facing LCD screen
Side facing back of unit

Controlling the FSA9480

Hi folks,
I have a hardware/software project that I'm building on a Galaxy Nexus phone and I would like to exert full control over the FSA9480 chip that switches the phone's pogo pins and micro-USB port between the USB and charging circuits.
The overall goal is to have a USB accessory plugged into the phone at all times, including in a pogo-pin based charging dock. Since the default "auto" switching mode keeps the phone in USB-host mode as long as the OTG cable is plugged in, the phone will not currently charge in the pogo dock.
Thanks to Adam's great thread on the FSA chip, I've been able to control the FSA chip via the i2c interface, using the i2c tools in his hack pack. (Heading to those threads to leave my thanks as soon as I get this FP in).
Even though I can check the registers and in fact see that the switches inside the FSA chip are in the modes I specify, the phone doesn't do the things I expect it to, like charge or enter USB accessory mode. I suspect this is because I've unloaded the FSA kernel module in order to access the i2c device. I was hoping that merely connecting the wires to the right places via the FSA would do things like enable the USB connection or allow the device to charge. Alas, that does not seem to be the case.
Since Google has declined to share the source for this phone, I've been poking around and assuming that their driver is similar to this code and this header. I love that fsa9480_SetManualSW is exported, but I have no idea how I might access that method, if it is in fact in the Nexus code. I'm searching through the lib/*.so files now to see if there's anything FSA related there, but so far no luck.
So that's where I am - I can control the device, but that doesn't appear to be enough to do the things I want to do. I'm not sure where to go next - I don't think I should have to write my own kernel driver, but I'll be damned if I know what to try next.
Does anyone have any ideas how I might exert software control over this FSA chip, or barring that, what else I need to fool with on the i2c bus so that the phone charges or enters the proper USB mode when I set the FSA mode manually?
Many thanks in advance and I hope this is the right place for this question (Q&A section did not seem like the place for this type of question).
Peter
You're taking an interesting approach to this. However, there are a couple of things you need to explain and understand better.
1) What are these "pogo-pins" you're talking about? [There is no such thing well defined, please be specific and use correct terms for whatever it is you're trying to describe.]
2) What make you believe there is a FSA9480 in your Nexus? [There probably isn't! I know the driver is called so, but that chip probably never existed in production.]
3) Obviously (!) you cannot charge your phone and have it play (OTG) host at the same time. Why? Because charging means to short D+ and D-.
4a) You say you can "control the chip" with I2C, can you give some examples of this? But I don't know what you're actually controlling, as it doesn't make sense the way you have explained it.
4b) You also say you have unloaded the Kernel module... How did you do that?
5) It seem that you're confusing the chip signal directions. I.e. whether certain pins are designated as input or output signals...
6) There are more switches/multiplexers built into your phone. It's of essence to understand which ones you're actually controlling.
E:V:A said:
You're taking an interesting approach to this. However, there are a couple of things you need to explain and understand better.
Click to expand...
Click to collapse
Certainly happy to explain as much as I can... let's see:
1) What are these "pogo-pins" you're talking about? [There is no such thing well defined, please be specific and use correct terms for whatever it is you're trying to describe.]
Click to expand...
Click to collapse
I got the term "pogo pins" from this thread. They are three tiny pins on the side of the Galaxy Nexus. They allow for car and desktop docks. They provide charging through the outermost pins and a digital signal of some kind (don't care about that one for this project) on the center.
2) What make you believe there is a FSA9480 in your Nexus? [There probably isn't! I know the driver is called so, but that chip probably never existed in production.]
Click to expand...
Click to collapse
I've simply assumed from the kernel messages and from screwing around via the i2c bus (as explained before). It may not be there, it may be something completely different, but from the software side, it behaves exactly like I'd expect the 9480 to...
3) Obviously (!) you cannot charge your phone and have it play (OTG) host at the same time. Why? Because charging means to short D+ and D-.
Click to expand...
Click to collapse
Yes, I glossed over that fact. Expansion: We've got a USB accessory that we would prefer to never disconnect from the phone. Since even having just the OTG cable connected drains the battery, our app is already managing power by binding/unbinding the fsa9480 driver. When unbound, the driver leaves the phone pins in (afaik) a floating state and the accessory/OTG cable does not draw current. When we want to poll the accessory, our app binds the fsa9480 driver, which results in the USB system seeing the OTG cable and connecting everything up nicely. When it's done, it unbinds the driver again and saves battery.
Since we don't want to/can't disconnect the accessory from the micro usb port, charging is an issue. So we'd like to charge the phone via the side pins (what I perhaps erroneously called the "pogo pins"). Since we're only polling for short periods, we'd like to be able to switch from USB host mode to charging mode during the period in which we are not accessing the device.
Now, I had forgotten that dedicated chargers short D+/D-. My hope was that by controlling the fsa9480, I could connect the +5V and GND pins to the battery and charge the phone, while keeping the USB accessory offline. I'm afraid I'm so tired and burnt out this may not be making sense, so please tell me what's confusing!
4a) You say you can "control the chip" with I2C, can you give some examples of this? But I don't know what you're actually controlling, as it doesn't make sense the way you have explained it.
4b) You also say you have unloaded the Kernel module... How did you do that?
Click to expand...
Click to collapse
Sure! Where to start...
OK, so based on Adam's thread "Build Your Own Music Dock", linked above, I grabbed the spec sheet for the fsa9280a, which he claims is "functionally the same" as the 9480.
As you can see in the datasheet, the chip is controlled via the i2c bus. Looking at the file layout of the Nexus, I figured out the address of the chip on the bus and started plugging in commands outlined in the datasheet.
for example, setting the "Manual Switch 1" register on my Nexus is done by the command
Code:
i2cset 4 37 19 <your value>
(4 being the bus where the chip is located, 37 (0x25) being the address of the device, and 19 (0x13) being the address of the register)
The datasheet outlines all the register addresses, default values, values under certain conditions, etc. I assured myself that the datasheet was valid and I was communicating with the device I thought I was by setting and observing registers.
That "Manual Switch 1" register controls where the different wires are connected and is very important to me, as far as I know.
this is the block diagram from the spec sheet in Adam's thread above. I should have linked directly to the spec sheet, sorry.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
And this is the register description from the same document
So... let's simplify my goals and say that I want to charge the phone from the micro usb port without connecting the USB host device (USB HS in the block diagram) to the micro USB connector: I'd want DP_CON and DM_CON floating and Vbus_in (on the micro connector) connected to Vbus_out (on the blue CHARGER IC in the upper left). I set the proper registers to do that, and things "should just work", right? (this is assuming I do things like initing the device, etc in the proper order, which I think I am)
They don't. Because I'm confident that the proper registers are set on the FSA, I'm assuming that the internal connections are all as I expect. Thus, my suspicion is that I need to do something more to get Android to start charging off the current coming in through Vbus_in...
Oh, and before I forget: unless I unbind/unload the driver for the FSA9480, I can't write to its address via the i2c tools because the driver already owns that address. I think of this driver as a kernel module, maybe that's incorrect or imprecise. Apologies.
5) It seem that you're confusing the chip signal directions. I.e. whether certain pins are designated as input or output signals...
Click to expand...
Click to collapse
I hope the block diagram cleared this up. I too was confused by the Vbus_in/Vbus_out thing. I really should have linked that datasheet.
6) There are more switches/multiplexers built into your phone. It's of essence to understand which ones you're actually controlling.
Click to expand...
Click to collapse
Agreed.
With that massive clarification, does that help? I'm starting to think this is something hovering right at the intersection of hardware and software. Maybe it's time I looked at writing my own device driver, or expanding the existing one?
E:V:A said:
3) Obviously (!) you cannot charge your phone and have it play (OTG) host at the same time. Why? Because charging means to short D+ and D-.
Click to expand...
Click to collapse
You had better explain that slowly to my Nook, because it's sitting beside me here charging and connected to two keyboards and a USB audio adapter.
Shorting D+ and D- is a convention to tell the device that it can draw a lot of current.
Even without the data lines shorted, a device can charge.
Moreover, if you tell your device in software to do a high current charge, it can.
Solution: use host mode and charge at the same time.
One connector does it all.
One thing I noticed while playing with the FSA chip was some of the registers would not change. They may be overridden by resistor values.
To put the device in host mode, short pin 4-5. To put it in charging mode short 3-4. It may be possible to change the host mode to charge the battery over i2c.
This may or may not be possible.
The main problem I was having was in the SBL most registers would stay static.
Playing with I2C sounds like fun, but all that stuff already has drivers.
The drivers that I've seen already have user hooks in the file system to get things done.
For example:
Code:
echo 1500000 > /sys/devices/platform/bq24073/force_current
Sets the charging current on a Nook touch to maximum.
(Your device probably uses something different.)
@Renate NST: Yes, I should have been more careful with my words. I meant charging as operating as a high current Dedicated Charging Port (DCP). But then again thebeerbaron already understood this.
@thebeerbaron: Here are your "pogo-pins" (right side is towards the top of the phone):
The pins and their function is loosely described in this thread, and very nicely used in this thread, so it seem that the following is true:
Code:
[SIZE=2]P1 +5V
P2 Signal: 1-wire interface, using MFM encoding
P3 GND[/SIZE]
(check these!)
I don't have the Samsung parts list of the GT-I9250 so I still don't know what those chips are. But U601 is a Fairchild chip and could be another type of switch. On the other side of this board you find the multiplexers U809 and U810 configured like this:
So how did you unbind/unload that "driver"? [I'm curious to see what driver/Kernel module this is.]
And here is another relevant hack for a wireless charger, But the interesting part is the Kernel hack mentioned:
For those of you wanting to charge at AC speeds instead of USB, Fast Charge Mod is here!
1) Install Franco Kernel (Milestone 1)
2) Run this script to activate it from the terminal (minus quotes):
Code:
echo 1 > /sys/kernel/fast_charge/force_fast_charge
and the UI Mode Manager code over here.
E:V:A said:
I meant charging as operating as a high current Dedicated Charging Port (DCP).
Click to expand...
Click to collapse
Ok, but I can still pump 1.5 Amps into my Nook while using host mode.
I'm not sure how you are differentiating things here.
Renate NST said:
Ok, but I can still pump 1.5 Amps into my Nook while using host mode.
I'm not sure how you are differentiating things here.
Click to expand...
Click to collapse
Well, Samsung try to conform to the "Battery Charging 1.1" standards, and that's how DCP is defined in there. The limitations are then also present in the chips and/or in the one or more PMIC Kernel drivers. So your NST is either not conforming to any standards or just have a hell-of-a-hacked Kernel, or both.
This project is interesting because it's exploring some hybrid between kernel hacking and hardware tweaking, and not just building a regular charger, which we all know how to do. If you are interested in knowing what kind of crazy hardware is included in a Galaxy class Samsung phone, you can have a look here.
Generally speaking, as far as standards go, you're not supposed to even try to charge something while it's in host mode.
Still, it's a useful thing to do if you want to use your device docked.
The kernel on my Nook is stock. I'm just giving commands to control the charge current.
Renate NST said:
Ok, but I can still pump 1.5 Amps into my Nook while using host mode.
I'm not sure how you are differentiating things here.
Click to expand...
Click to collapse
I don't know about the NST, but my Nook Tablet has several additional pins dedicated to charging the device, it's not a true USB port.
What's going on here is trying to convince the USB port to go into host mode, where it natively supplies 5VDC, but instead reverse it, use the 5V line to charge the device and supply 5V from an external source.
While the NT has a dedicated charging circuit, this device repurposes its usb pins based on input conditions. So here's what I see being required
1. Ground USB pin 4 to activate HOST mode.
2. shut off 5V power supply from FSA chip
3. set registers in FSA to charging mode.
Renate NST said:
Generally speaking, as far as standards go, you're not supposed to even try to charge something while it's in host mode.
Click to expand...
Click to collapse
It's pointless to discuss standards of what should and should not happen unless we are on the same page. Here are the specs.
Sorry.
/me wanders off elsewhere.
Sorry for the slow reply folks, I appreciate the input, but got sidetracked onto another project today. Wearing many hats means making a lot of context switches!
Renate NST said:
Shorting D+ and D- is a convention to tell the device that it can draw a lot of current...Solution: use host mode and charge at the same time.
One connector does it all.
Click to expand...
Click to collapse
I haven't tried charging during host mode, as we were trying to keep the external wiring changes to a minimum. Based on what I found last night though, we may go with a completely external solution...
AdamOutler said:
To put the device in host mode, short pin 4-5. To put it in charging mode short 3-4. It may be possible to change the host mode to charge the battery over i2c.
This may or may not be possible.
The main problem I was having was in the SBL most registers would stay static.
Click to expand...
Click to collapse
If we go with the external wiring solution, this will be what we do. When I set the FSA to various modes over i2c, it did not charge or connect the USB device as it should. This is very likely because the kernel is listening to the FSA for state changes and telling other devices how to behave based on those states. That's sad.
What is the SBL?
Renate NST said:
Playing with I2C sounds like fun, but all that stuff already has drivers.
The drivers that I've seen already have user hooks in the file system to get things done.
For example:
Code:
echo 1500000 > /sys/devices/platform/bq24073/force_current
Sets the charging current on a Nook touch to maximum.
(Your device probably uses something different.)
Click to expand...
Click to collapse
Yes, this is how things should behave. Unfortunately, the Samsung engineers who wrote this device driver were rather short sighted.
If you wade through this mailing list discussion (sorry, I apparently can't link until 8 posts... https://lkml.org/lkml/2011/6/29/124), you'll see the engineers need several attempts to get their code approved. The most interesting part to note (for me), is that they create the device file /sys/bus/i2c/devices/.../switch, which accepts input from userspace and sets the FSA9480 "manual switch 1" register appropriately. Unfortunately for me, they only coded a small portion of the possible states for this register and will not accept arbitrary values. UGH!
I sat down with the GN last night and tried using the /sys/bus/i2c/devices/.../switch device to set the manual mode. What I discovered is that even though this obviously passes values into the driver module (it prints a kernel message when I set a bogus value), the values don't "stick". In the driver code (I'm still not 100% sure I have the right source, but I think I'm close.. again, sorry for lack of clickability: https://bitbucket.org/franciscofranco/android-tuna-omap/src/388ae9aa9b26/drivers/misc/fsa9480.c), it has a _detected function, which gets called whenever the cable changes and overrides any manual settings I put in. For example, I set the "switch" file to "AUDIO", yet the phone remained in USB accessory mode, and plugging/unplugging did nothing. Sigh.
The lesson is, apparently, that I need to write my own driver module, which can replace this fsa9480.c transparently and allow me to ignore cable change detections and provide me with a way of setting the FSA state manually (with more flexibility than the Samsung engineers allowed). We're thinking about a different approach, but this may yet get done...
E:V:A said:
So how did you unbind/unload that "driver"? [I'm curious to see what driver/Kernel module this is.]
Click to expand...
Click to collapse
Some great background info in here, thanks! I'll have to sit down and process this another day.
To unbind the fsa9480 driver, I do:
Code:
echo -n "4-0025" > /sys/bus/i2c/drivers/fsa9480/unbind
And to bind it, I do:
Code:
echo -n "4-0025" > /sys/bus/i2c/drivers/fsa9480/bind
E:V:A said:
This project is interesting because it's exploring some hybrid between kernel hacking and hardware tweaking, and not just building a regular charger, which we all know how to do.
Click to expand...
Click to collapse
Yep, that's what's interesting and what's making this difficult. It's kind of a gray area of where the topic experts are and what I need to learn...
Thanks for your input all... maybe something will come along that'll save me from writing a kernel module... fingers crossed!
I am very interested in the outcome of this project. I purchased the GNex thinking I could charge it while at the same time, connecting an SSD (via SATA->USB converter) to the phone for media playback. Thanks for your hacking skills!
Renate NST said:
Generally speaking, as far as standards go, you're not supposed to even try to charge something while it's in host mode.
Still, it's a useful thing to do if you want to use your device docked.
The kernel on my Nook is stock. I'm just giving commands to control the charge current.
Click to expand...
Click to collapse
Not true. https://github.com/CyanogenMod/andr...mmit/c7016a2513abfd522b02633b79d2f21bcb99d4e2 - The USB charging standard defines an Accessory Charger Adapter. It's signaled with a particular resistor value (36k if the code comments are correct...) on the ID pin.
Although while I thought the I9100/I777/N7000 used an FSA9480, it looks like the MAX8997 handles the task on these devices... hmm... The FSA might support this mode though, so instead of trying to force-override it, look to see if there's a particular resistor value you can hijack or, in this case, a resistor value that is standardized to provide the function you want.
I hate when I only have access to github's web interface and not the ability to grep my hard drive at home.

[Galaxy S] 3x Stratosphere, all broken screens; uses? Solderable TV-out?

So I had bought three Stratospheres for cheap (bundle auction), hoping that I'd be able to pick up another cheaply with a good screen or bad glass+good LCD. However, beings I've not taken one apart to that extreme I wasn't aware how hard it'd be to separate those pieces At any rate, they all work fine otherwise, I know at least 2 boot to Android since I eventually get the haptic vibration indicating it'd reached the unlock screen. I had also hoped that at the very least the Wiki would've been right about HDMI out, but it's hard to find out what all have full support (the Epic 4G [D700] I got instead for example has it mostly but no one's able to get it working).
New screens cost the same as a working Strat, and seeing as I already bought an Epic after finding that out, I'm wondering what to do with these. I love tinkering, so being able to solder in a Composite, VGA, DVI, HDMI video connector and use it as a self-powered Stick Computer would be seriously awesome.
I'll gladly take hi-res PCB photos, with a DSLR and ample (non reflecting) light, if folks want to help tackle this Hell, for that matter... if you've got the know-how and want give it a try, I will give you one of these Strats to see what you can figure out. These aren't like the Epic as far as PCB goes, either. That Epic is very tiny and a fraction of the phone's size, but these Strats are pretty much the full phone's length and width, so lots to play with lol
Anyways, hope someone knows a thing or two and we can figure a hack out!
Thanks.
EDIT: This just came to me...What about something like these, in conjunction with a ROM (preferably Odin flashable) that has USB Hub support?
http://www.monoprice.com/products/subdepartment.asp?c_id=101&cp_id=10114#1011403
Unfortunately it isn't driverless, BUT it does list Linux support, at least on the VGA model! More than I'd like to spend given the project, but we can call that Plan Y (Plan Z being: buy a new screen lol)
Ez way - how about flashing with some latest ROM and enabling tvout (with help of screenshots from DDMS)
Then you can connect any cheap stuff decoding pal/secam and maybe an otg keyboard/mouse + power chord through hub or straight to the batt slot.
The tryhard way - you could try to exploit screen flex slot. You should find 16/24bit rgb dpi'ish interfrace there + 2 i2c/spi busses and some gpios. Maybe utilising it as 16bit rgb going to sort of converting circuit could leave you with like ~15gpio pins for mostly any kind of stuff u want (spi, i2c, irqs). You need a good breakout for that and gotta consider high frequency layout (as rule of thumb, try to make wires between consecutive ICs as short as possible and equal length)
Capabilities and possibilities are unlimited. Just human's imagination and life is.
Id be careful with usb-dvi converters. Might work. Might not. Check with otg keyboard or smth first.
Rebellos said:
Ez way - how about flashing with some latest ROM and enabling tvout (with help of screenshots from DDMS)
Then you can connect any cheap stuff decoding pal/secam and maybe an otg keyboard/mouse + power chord through hub or straight to the batt slot.
The tryhard way - you could try to exploit screen flex slot. You should find 16/24bit rgb dpi'ish interfrace there + 2 i2c/spi busses and some gpios. Maybe utilising it as 16bit rgb going to sort of converting circuit could leave you with like ~15gpio pins for mostly any kind of stuff u want (spi, i2c, irqs). You need a good breakout for that and gotta consider high frequency layout (as rule of thumb, try to make wires between consecutive ICs as short as possible and equal length)
Capabilities and possibilities are unlimited. Just human's imagination and life is.
Id be careful with usb-dvi converters. Might work. Might not. Check with otg keyboard or smth first.
Click to expand...
Click to collapse
So TVOut on the does actually Stratosphere work? (with a custom ROM, I mean)
You happen to know where to find such a ROM? I know that XDA doesn't have a Strat subforum I've looked high and low, and can barely find custom ROMs, let alone one that's TVout lol Everything is still Gingerbread based, but I suspect that doesn't matter since the hardware is from that time.
As for the latter, I actually hadn't realized that without a screen, I'd be without a MOUSE haha I was totally focused on it having a slider keyboard and somehow missed I'd still need a mouse Nevertheless, doing it myself would be pretty hard :\ I don't know that much about the finer details of hardware, at least circuits of that complexity. Modding an analog audio circuit with new capacitors or an OpAmp is one thing, but that's straight forward In-Out, Power-Ground lol
That isn't to say I wouldn't attempt it but I'm not sure exactly what would be needed. If it's LVDS, I do have an older 15" laptop screen that'd be cool to hack a Strat to use :cyclops: That's adding a bit more complexity to things though, at least to start with right out of the gate.
Sadly I dont know where to get Strat ROM. But I assumed that its HW is pretty much the same as I9000, except the additional keyboard, so aries kernel with patches might/should/could work. There shouldnt be any major problems in porting it. I would get these crappy Sammy sources for I405 and I9000, diff them and try to apply diff on kernel_samsung_aries repo of CM.
About TVOut - it is matter of one or two gate ICs and a jack sensing onboard, as S5PC110 has built in tvout signal generator. So I would expect HW to support it.
Edit: There should be some tvout handling in original kernel sources if it is supported. Though, knowing Sammy, there might be aswell tvout driver enabled but HW not wired at all to support it.

Adding compass sensor to Galaxy Tab A

Hi!
I'm new on this forum, and really happy to join the community.
I bought a Galaxy Tab A SM-T550 for my daughter, and I discover that there is no gyro/compass/magnetometer sensor that prevent using some apps.
After some cry, I decided to look for a DIY solution.
After some research, I found that some Android compass sensors have a I2C interface (e.g. AK8975) (sorry I can't post links yet).
I also found Android linux kernel drivers for this sensor.
As I have professional soldering skills/tool (even for BGA), and good Linux / kernel / driver skills, but nothing on Android (except modifying small programs and follow tutorial to install custom roms), I'm wondering if it is feasible to simply solder this sensor to the Galaxy Tab Mother board and directly have the compass feature in Android apps.
The requested actions I identified:
1. identify and order the sensor
2. Identify the I2C bus on Galaxy Tab A motherboard, plus power and ground signals
3. Identify a place to solder the sensor without risk to prevent casing mounting
4. Solder
5. be sure that the stock kernel supports this driver
6. Be sure that the driver is embedded in the kernel or the module is loaded
I'm wondering if someone with android and hardware experiences could help me to:
- tell me if this idea is totally crazy or seem feasible
- tell me if I identify the good tasks
- to find informations for some of the tasks (specially locate the I2C bus on motherboard)
- maybe propose another solution.
Thanks a lot!
Laurent.
In two years I have been the only other person sufficiently annoyed to look up something along these lines. I don't have your level of skill so I guess it would be pretty crazy for me to attempt this. I really wish they would have done something about this though, they have them in all phones so why not put them in tablets? They have more space to fit them in and I don't think they are hugely expensive.

Is this the OTG + Charging solution some have been waiting for?

(long time lurker and flasher of Nook HD+ roms, first time poster...)
Like a few others scattered around the subforum, I'm looking to do an in-car tablet install. Like others I hit the "Can't charge and use OTG at the same time, you need an ancient nexus and Timur's" just as old but revered ROM." wall.
https://www.google.com/?gws_rd=ssl#q=site:https://forum.xda-developers.com/galaxy-tab-a+otg
Then a hole in the matrix appeared and I saw this post on a different device thread:
https://forum.xda-developers.com/tab-s2/help/usb-otg-charge-t3588019
The second post there, refers to a vendor LAVA whom "LAVA is the only manufacturer of adapters for Samsung tablets that allows that since Samsung doesn't sell anymore their hubs" (from that post).
Confirmed that the Compatability list shows SM-T580 (the device amazon has factory refurbs for 200$):
http://lavalink.com/samsung-tablet-adapters-support/compatibility-list/
Would it be possible this is the device to make the magic happen? http://lavalink.com/samsung-tablet-adapters/
EditToAdd: Tech Spec sheet here for the meaty innards: http://lavalink.com/wp-content/uploads/manuals/sts_product_family_manual.pdf Main takeaway for me was don't extend the cable to the tablet.
Also found the "cheap" lol single port on amazon with a wide swing of reviews: Encouraged by the long one that says it is working with external DAC: https://www.amazon.com/SimulCharge-1-port-Adapter-Samsung-Galaxy/dp/B00MOQFUQM
Also this mini-writeup shows one in use in 2015 with DAC, am I missing something on why this was a wall for many?: http://www.diymobileaudio.com/forum...-usb-hub-samsung-galaxy-tablets-charging.html
Thanks for any help,
AoB
On the (i hope) tail end of the first version of my dash tablet install, and after my research and work over the past few days, I will try to answer my own question -- just for others. no pity for me. OTG-Host was not a "must-have" (yet).
My big mistake (i think) was not being aware of the distinction between OTG-Accessory and OTG-Host. The Lava-link hub/cable in my OP allows OTG-A and charging the device. OTG-H seems to be a different animal,.. something that the kernel and maybe the hardware has to support? I have flashed Extremely ROM on my T580 and a USB keyboard plugs in to OTG cable and is detected, but a USB RLT-SDR device is not detected (nor powered).
So I guess back to the beginning, still need Kernel support for OTG-Host? Correct?
AfraidOfBears said:
(long time lurker and flasher of Nook HD+ roms, first time poster...)
Like a few others scattered around the subforum, I'm looking to do an in-car tablet install. Like others I hit the "Can't charge and use OTG at the same time, you need an ancient nexus and Timur's" just as old but revered ROM." wall.
https://www.google.com/?gws_rd=ssl#q=site:https://forum.xda-developers.com/galaxy-tab-a+otg
Then a hole in the matrix appeared and I saw this post on a different device thread:
https://forum.xda-developers.com/tab-s2/help/usb-otg-charge-t3588019
The second post there, refers to a vendor LAVA whom "LAVA is the only manufacturer of adapters for Samsung tablets that allows that since Samsung doesn't sell anymore their hubs" (from that post).
Confirmed that the Compatability list shows SM-T580 (the device amazon has factory refurbs for 200$):
http://lavalink.com/samsung-tablet-adapters-support/compatibility-list/
Would it be possible this is the device to make the magic happen? http://lavalink.com/samsung-tablet-adapters/
EditToAdd: Tech Spec sheet here for the meaty innards: http://lavalink.com/wp-content/uploads/manuals/sts_product_family_manual.pdf Main takeaway for me was don't extend the cable to the tablet.
Also found the "cheap" lol single port on amazon with a wide swing of reviews: Encouraged by the long one that says it is working with external DAC: https://www.amazon.com/SimulCharge-1-port-Adapter-Samsung-Galaxy/dp/B00MOQFUQM
Also this mini-writeup shows one in use in 2015 with DAC, am I missing something on why this was a wall for many?: http://www.diymobileaudio.com/forum...-usb-hub-samsung-galaxy-tablets-charging.html
Thanks for any help,
AoB
Click to expand...
Click to collapse
i did a car install on my eclipse usb charged headphone jack to amp and bluetooth to obd2 interface for gauges i used an app called auto power off or something like that. and it mimicked a cars gps system prety good it would wake up screen and keep awake til key shuts off counts down 30 seconds click here to keep awake or shut down but it only put tablet in low power state i drove that car every day it was long enought to keep it charged all the time
N
AfraidOfBears said:
On the (i hope) tail end of the first version of my dash tablet install, and after my research and work over the past few days, I will try to answer my own question -- just for others. no pity for me. OTG-Host was not a "must-have" (yet).
My big mistake (i think) was not being aware of the distinction between OTG-Accessory and OTG-Host. The Lava-link hub/cable in my OP allows OTG-A and charging the device. OTG-H seems to be a different animal,.. something that the kernel and maybe the hardware has to support? I have flashed Extremely ROM on my T580 and a USB keyboard plugs in to OTG cable and is detected, but a USB RLT-SDR device is not detected (nor powered).
So I guess back to the beginning, still need Kernel support for OTG-Host? Correct?
Click to expand...
Click to collapse
See post above
I had to rig in the mount since a eclipse console is so small. I didnt want a 5 inch or 7 inch screen i wired a switch to the factory amp for remote turn on and a headphone jack to the fro and rear left rite of the factory amp as the eclipses some have a fac amp under the seat to the factory stereo used the fac stereo power wires for a 12 volt usb charger in the dash to turn tablet on with the key and my fancy little led toggle for the amp power

Categories

Resources