On 2/24/20 1:06 AM, Maxime Ripard wrote:
The HDMI blocks in the BCM2771 have an i2c controller to retrieve the EDID. This block is split into two parts, the BSC and the AUTO_I2C, lying in two separate register areas.
The AUTO_I2C block has a mailbox-like interface and will take away the BSC control from the CPU if enabled. However, the BSC is the actually the same controller than the one supported by the brcmstb driver, and the AUTO_I2C doesn't really bring any immediate benefit.
Let's use the BSC then, but let's also tie the AUTO_I2C registers with a separate compatible so that we can enable AUTO_I2C if needed in the future.
The AUTO_I2C is enabled by default at boot though, so we first need to release the BSC from the AUTO_I2C control.
Cc: Kamal Dasu kdasu.kdev@gmail.com Cc: Florian Fainelli f.fainelli@gmail.com Cc: Wolfram Sang wsa@the-dreams.de Cc: bcm-kernel-feedback-list@broadcom.com Cc: linux-i2c@vger.kernel.org Signed-off-by: Maxime Ripard maxime@cerno.tech
[snip]
@@ -705,6 +737,7 @@ static SIMPLE_DEV_PM_OPS(brcmstb_i2c_pm, brcmstb_i2c_suspend, static const struct of_device_id brcmstb_i2c_of_match[] = { {.compatible = "brcm,brcmstb-i2c"}, {.compatible = "brcm,brcmper-i2c"},
- {.compatible = "brcm,bcm2711-hdmi-i2c"},
You could have added the bcm2711_release_bsc here as a function attached with the of_device_id::data member of the structure and do:
if (data && data->init_func) rc = data->init_func(dev);
But we can defer that until we have a second compatible string that requires the same approach.
Akked-by: Florian Fainelli f.fainelli@gmail.com