Re: [PATCH] arm64: defconfig: Enable missing configs for mt8192-asurada

From: AngeloGioacchino Del Regno
Date: Thu Jan 19 2023 - 06:47:31 EST


Il 18/01/23 19:15, Bjorn Andersson ha scritto:
On Tue, Jan 17, 2023 at 03:11:59PM -0500, Nícolas F. R. A. Prado wrote:
On Tue, Jan 17, 2023 at 07:58:54AM -0800, Bjorn Andersson wrote:
On Thu, Jan 12, 2023 at 10:12:38AM -0500, Nícolas F. R. A. Prado wrote:
Enable missing configs in the arm64 defconfig to get all devices probing
on mt8192-asurada based machines.

The devices enabled are: MediaTek Bluetooth USB controller, MediaTek
PCIe Gen3 MAC controller, MT7921E wireless adapter, Elan I2C Trackpad,
MediaTek SPI NOR flash controller, Mediatek SPMI Controller, ChromeOS EC
regulators, MT6315 PMIC, MediaTek Video Codec, MT8192 sound cards,
ChromeOS EC rpmsg communication, all MT8192 clocks.

Support for DMA Restricted Pool is also enabled since it is used by the
WiFi card on this platform.

REGULATOR_CROS_EC is enabled as builtin since it powers the MMC
controller for the SD card, making it required for booting on some
setups.

I presume this implies that there's no ramdisk to carry these additional
modules?

There may or may not be, at the discretion of the user, so enable by default.


As long as the dependency chain is reasonably short this is okay with me.



By enabling the support for all of this platform's devices on the
defconfig we make it effortless to test the relevant hardware both by
developers as well as CI systems like KernelCI.

Signed-off-by: Nícolas F. R. A. Prado <nfraprado@xxxxxxxxxxxxx>

---

arch/arm64/configs/defconfig | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
index f3053e7018fe..4e806d8068f6 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
[..]
@@ -1092,6 +1104,18 @@ CONFIG_CLK_IMX8QXP=y
CONFIG_CLK_IMX8ULP=y
CONFIG_CLK_IMX93=y
CONFIG_TI_SCI_CLK=y
+CONFIG_COMMON_CLK_MT8192_AUDSYS=y
+CONFIG_COMMON_CLK_MT8192_CAMSYS=y
+CONFIG_COMMON_CLK_MT8192_IMGSYS=y
+CONFIG_COMMON_CLK_MT8192_IMP_IIC_WRAP=y
+CONFIG_COMMON_CLK_MT8192_IPESYS=y
+CONFIG_COMMON_CLK_MT8192_MDPSYS=y
+CONFIG_COMMON_CLK_MT8192_MFGCFG=y
+CONFIG_COMMON_CLK_MT8192_MMSYS=y
+CONFIG_COMMON_CLK_MT8192_MSDC=y
+CONFIG_COMMON_CLK_MT8192_SCP_ADSP=y
+CONFIG_COMMON_CLK_MT8192_VDECSYS=y
+CONFIG_COMMON_CLK_MT8192_VENCSYS=y

Are all these clock drivers needed in order to reach a ramdisk, with
working uart, where further kernel modules could be loaded?

No, but currently these configs can't be enabled as modules. So my intention is
to enable all of them as builtin for now so we get the functionality there, and
after the drivers and configs are reworked to allow building as modules (which
should happen shortly after [1] is merged), I'll update the defconfig so that
the non-essential ones for boot are set to =m.


Sounds good to me.

Adding context... on MediaTek clock drivers, I'm doing the rework [1].

There's a lot to cleanup and one first rather big series is already there,
well-reviewed and ready to be picked, but that does not change the MT8192,
nor others, non-critical clock drivers to tristate.

I'll do that for most MTK clock drivers in a second (or third) cleanup series,
which is already scheduled on my side, but that will need some time to happen
since, as I said, there's still a bit to cleanup before that and I will make
sure that nobody will forget to send a followup commit that will change the
defconfig to build the non-boot-critical clock drivers as modules as soon as
possible.

Cheers,
Angelo