[PATCH v2 2/7] drivers: misc: k3_avs: Use soc_match_device instead of compatible.

Kumar, Udit u-kumar1 at ti.com
Wed May 29 06:21:39 CEST 2024


Hi Manorit

On 5/28/2024 1:43 PM, Manorit Chawdhry wrote:
> vd_data remains the same for most of the SoCs but there are some
> differences in power domains and clocks that don't need a change to
> compatible and can be handled at SoC level.
>
> Change the data population logic from compatible to soc_match_device to
> add support for newer devices.
>
> Signed-off-by: Manorit Chawdhry <m-chawdhry at ti.com>
> ---
>   drivers/misc/k3_avs.c | 189 +++++++++++++++++++++++++++-----------------------
>   1 file changed, 103 insertions(+), 86 deletions(-)
>
> diff --git a/drivers/misc/k3_avs.c b/drivers/misc/k3_avs.c
> index 87471cc3b16a..a0d7bb7595b3 100644
> --- a/drivers/misc/k3_avs.c
> +++ b/drivers/misc/k3_avs.c
> @@ -12,6 +12,7 @@
>   #include <asm/io.h>
>   #include <i2c.h>
>   #include <k3-avs.h>
> +#include <soc.h>
>   #include <dm/device_compat.h>
>   #include <linux/bitops.h>
>   #include <linux/delay.h>
> @@ -111,6 +112,95 @@ static u32 am6_efuse_xlate(struct k3_avs_privdata *priv, int idx, int opp)
>   	return 300000 + 20000 * val;
>   }
>   
> [..]
> +const struct soc_attr vtm_soc_list[] = {
> +	{ .family = "AM65X", .data = (void *)&am654_vd_config },
> +	{ .family = "J721E", .data = (void *)&j721e_vd_config },
> +	{ .family = "J7200", .data = (void *)&j721e_vd_config },
> +	{}
> +};

We may end up updating this driver for each SOC family,

Even if VTM IP remain same in two SOC family.

In my view, driver should be specific to IP not specific to SOC or SOC 
family.


> [..]
>


More information about the U-Boot mailing list