On 17 February 2017 at 19:52, H. Nikolaus Schaller hns@goldelico.com wrote:
in my register data sheet, the initial settings are not documented and referred to the OTG setup.
OTP yes, i.e. there can be a many variants of Palmas depending on which settings have been fused into it by TI. The old TRM I have (SWCS055J) lists the ordering codes PTWL6035BxxYFF and PTWL6037BxxRVL for the WCSP and QFN packaged versions respectively, where "xx is OTP designator". (Hmm, PTWL? Prototype?)
It also mentions later "OTP configuration defined for TWL6035 and TWL6037 in each specific platform is described in a separate Application Note."
That is something I don't know. So maybe we should read out the Palmas once
in MLO and note what the initial state is (except those bits which are already modified by MLO).
Should be easy enough to grab a copy before any change is made at all.
Interestingly SWCS055J indicates that there's an "OTP" page on slave address 0x4b, though no info on its contents. I can dump it on the pyra no problem, but the Palmas on my uevm doesn't seem to respond to reads from that slave address.
I also noticed something funny: it seems that if you read a non-existent register, you get the data from the previous read. This is fairly easy to detect hence allows mapping which registers are unused (or perhaps write-only). Note that dumping all registers will clear any pending irqs, but
I also made life more convenient by allowing stateless use of the i2c command in the CLI: https://github.com/mvduin/u-boot/commit/ 11ee63376e521f574c584c81dc0df9d3307819dc
I am not sure if we should add too many such private extensions to u-boot core code. On one hand they are very useful, on the other hand we should tink about upstreaming them... So I will review them a little.
Well regardless of what upstream thinks, as long as I'm still using i2c transfers in u-boot with some regularity I'm keeping something like this patch in ;) The stateful bus switching stuff sucked
And yes, I abstractly support the concept of sending the non-hacky patches upstream. It seems like a headache I don't want to deal with myself right now though :-)
Matthijs