On 11/27/2025 8:02 PM, Karel Balej wrote:
> Define power domain which needs to be enabled in order for audio to work
> on the PXA1908-based samsung,coreprimevelte smartphone. In the
> downstream code, this power-on method is marked as specific to the ulcx
> series which is likely some variant of the board or some part of it. No
> other audio components needed for sound to work on this phone are
> currently available mainline but some successful testing was performed
> with the vendor variants of the respective drivers and with the domain
> forced always-on.

>From what I know, ULCx is actually meant to be some SoC codename. ULC1
happens to be PXA1908, but I couldn't find any such codename for the rest.

Other than that, just a few nits:

> diff --git a/drivers/pmdomain/marvell/pxa1908-power-controller.c 
> b/drivers/pmdomain/marvell/pxa1908-power-controller.c
> index ff5e6e82d3f8..e32eb227f235 100644
> --- a/drivers/pmdomain/marvell/pxa1908-power-controller.c
> +++ b/drivers/pmdomain/marvell/pxa1908-power-controller.c
> @@ -29,7 +29,10 @@
>  #define POWER_POLL_TIMEOUT_US        (25 * USEC_PER_MSEC)
>  #define POWER_POLL_SLEEP_US  6
>  
> -#define NR_DOMAINS   5
> +#define APMU_AUD_CLK         0x80
> +#define AUDIO_ULCX_ENABLE    0x0d

I would group these with the other register definitions.

Also, it's probably better to be more consistent with the naming, so I'd
prefer APMU_AUDIO_CLK.

> @@ -59,9 +62,13 @@ static inline bool pxa1908_pd_is_on(struct pxa1908_pd *pd)
>  {
>       struct pxa1908_pd_ctrl *ctrl = pd->ctrl;
>  
> -     return pd->data.id != PXA1908_POWER_DOMAIN_DSI
> -             ? regmap_test_bits(ctrl->base, APMU_PWR_STATUS_REG, 
> pd->data.pwr_state)
> -             : regmap_test_bits(ctrl->base, APMU_DEBUG, DSI_PHY_DVM_MASK);
> +     switch (pd->data.id) {
> +     case PXA1908_POWER_DOMAIN_AUDIO:
> +             return regmap_test_bits(ctrl->base, APMU_AUD_CLK, 
> AUDIO_ULCX_ENABLE);
> +     case PXA1908_POWER_DOMAIN_DSI:
> +             return regmap_test_bits(ctrl->base, APMU_DEBUG, 
> DSI_PHY_DVM_MASK);
> +     }
> +     return regmap_test_bits(ctrl->base, APMU_PWR_STATUS_REG, 
> pd->data.pwr_state);

Perhaps this should go into the switch?

Regards,
--
Duje

Reply via email to