[Letux-kernel] Status of JZ4780/CI20 upstream support
Paul Boddie
paul at boddie.org.uk
Wed Jul 24 15:41:14 CEST 2019
Sorry for another reply-to-self...
On Saturday 13. July 2019 01.47.23 Paul Boddie wrote:
>
> In the 5.1.x device tree for the CI20, since there are no mechanisms defined
> for I2C signalling with the PMIC, the 3.3V I/O supply does not get
> disconnected upon shutdown, leaving the LED on if the board power is still
> connected. This I2C signalling seems to use the dedicated JZ4780 peripheral
> support in the 3.18 kernel, and this driver does still seem to be present
> in the 5.1.x series at least. Although the PMIC driver has not been carried
> forward, there appears to be another which claims to support the ACT8600.
I had another look at I2C support for the JZ4780 using my L4Re driver.
Although frustrating - the design of the SoC peripheral for I2C is not exactly
great - I found out a few things.
First of all, the regulator is available on I2C channel 0 at address 0x5a (as
noted in the schematics). However, control over the regulator doesn't seem to
be what is necessary to turn off the LED upon shutdown. I did manage to tell
the regulator to disable the OUT3 channel (using register 0x32), but the LED
was still on, if very dim.
Looking at the CI20 schematic, the JZ4780 programming manual and the ACT8600
datasheet, it appears that the SoC's PWRON pin determines whether the
regulator is active. Here, it gets more complicated because the mysterious RTC
chip is involved in power management. The hardware documentation mentions
it...
https://www.elinux.org/CI20_Hardware#RTC
...but it is not referenced at all in the 3.18 kernel device tree. It turns
out that it is accessible via I2C channel 4 if the appropriate port E pins (12
= data, 13 = clock) are enabled, although my attempts at communicating with it
(at address 0x51) do not seem to be successful so far (in that I don't get
values consistent with the datasheet).
As far as actually powering down is concerned, it isn't clear to me what is
actually done, however. At one point, I did think that the LCR (low power
control) register was involved, but it only turns power on and off to various
subsystems (GPU and so on).
Paul
More information about the Letux-kernel
mailing list