]> git.baikalelectronics.ru Git - kernel.git/commit
drm/bridge: sii902x: Enable I/O and core VCC supplies if present
authorAlexandru Gagniuc <mr.nuke.me@gmail.com>
Tue, 20 Oct 2020 22:14:58 +0000 (17:14 -0500)
committerSam Ravnborg <sam@ravnborg.org>
Sun, 8 Nov 2020 10:53:37 +0000 (11:53 +0100)
commit4b6f4b417f94ec54b81748664b4ff8a07fb191f0
treee0c5ec3a5df80e87cdc582d8236cc1ed6ade2a4b
parentdb467a127d1572b712d06fca8ac5f62bd6814d0f
drm/bridge: sii902x: Enable I/O and core VCC supplies if present

On the SII9022, the IOVCC and CVCC12 supplies must reach the correct
voltage before the reset sequence is initiated. On most boards, this
assumption is true at boot-up, so initialization succeeds.

However, when we try to initialize the chip with incorrect supply
voltages, it will not respond to I2C requests. sii902x_probe() fails
with -ENXIO.

To resolve this, look for the "iovcc" and "cvcc12" regulators, and
make sure they are enabled before starting the reset sequence. If
these supplies are not available in devicetree, then they will default
to dummy-regulator. In that case everything will work like before.

This was observed on a STM32MP157C-DK2 booting in u-boot falcon mode.
On this board, the supplies would be set by the second stage
bootloader, which does not run in falcon mode.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
[Fix checkpatch warnings]
Link: https://patchwork.freedesktop.org/patch/msgid/20201020221501.260025-2-mr.nuke.me@gmail.com
drivers/gpu/drm/bridge/sii902x.c