Message ID | 1572615749-9524-1-git-send-email-wahrenst@gmx.net (mailing list archive) |
---|---|
Headers | show |
Series | ARM: Enable thermal support for Raspberry Pi 4 | expand |
On 11/1/2019 6:42 AM, Stefan Wahren wrote: > This series enables thermal support for the Raspberry Pi 4. Neither the > bcm2835_thermal nor the brcmstb_thermal are suitable for the BCM2711. > So add a new thermal driver to read out the SoC temperature from the > AVS RO block of the BCM2711. It seems to me that with minor tweaks you could use the brcmstb_thermal driver, since the two key differences are essentially: - lack of interrupt, which is also the case on the latest STB SoCs - different way to determine that data is valid, by checking both bit 16 and bit 10, as opposed to bit 11, and a reduced ADC code from 11 bits down to 10. This seems like a simple enough set of changes to build on top of this patch series: https://lore.kernel.org/linux-arm-kernel/20191030182132.25763-1-f.fainelli@gmail.com/ My concern is that we went down that road before with other drivers like bcm2835-rng and bcm63xx-rng, when really there were little to no differences other than some integrations bits (different clock, compatible, and more important people having worked separately on those things). Your call, the patch series looks good to me otherwise: Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Hi Florian, Am 02.11.19 um 21:08 schrieb Florian Fainelli: > On 11/1/2019 6:42 AM, Stefan Wahren wrote: >> This series enables thermal support for the Raspberry Pi 4. Neither the >> bcm2835_thermal nor the brcmstb_thermal are suitable for the BCM2711. >> So add a new thermal driver to read out the SoC temperature from the >> AVS RO block of the BCM2711. > It seems to me that with minor tweaks you could use the brcmstb_thermal > driver, since the two key differences are essentially: > > - lack of interrupt, which is also the case on the latest STB SoCs > - different way to determine that data is valid, by checking both bit 16 > and bit 10, as opposed to bit 11, and a reduced ADC code from 11 bits > down to 10. > > This seems like a simple enough set of changes to build on top of this > patch series: > > https://lore.kernel.org/linux-arm-kernel/20191030182132.25763-1-f.fainelli@gmail.com/ this was the downstream approach until i was informed that the thermal part of the RO block is used. I don't have a good feeling about misusing the wrong binding. I still hope that the RPI folks release some kind of memory map for the BCM2711 and maybe extend this driver. So i prefer to start with a separate binding.