> 
> For some JH7110 boards, USB host overcurent pin is not reserved, To make USB
> host work, overcurrent pin must be disabled. So set the pin default disabled.
> 
> Signed-off-by: Minda Chen <minda.c...@starfivetech.com>
> ---
>  drivers/pinctrl/starfive/pinctrl-jh7110-sys.c | 11 +++++++++--
>  1 file changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/pinctrl/starfive/pinctrl-jh7110-sys.c
> b/drivers/pinctrl/starfive/pinctrl-jh7110-sys.c
> index dafba65eae..1102985ab9 100644
> --- a/drivers/pinctrl/starfive/pinctrl-jh7110-sys.c
> +++ b/drivers/pinctrl/starfive/pinctrl-jh7110-sys.c
> @@ -378,8 +378,15 @@ static int jh7110_sys_pinctrl_probe(struct udevice
> *dev)  {
>       struct starfive_pinctrl_soc_info *info =
>               (struct starfive_pinctrl_soc_info *)dev_get_driver_data(dev);
> -
> -     return starfive_pinctrl_probe(dev, info);
> +     struct starfive_pinctrl_priv *priv = dev_get_priv(dev);
> +     int ret;
> +
> +     ret = starfive_pinctrl_probe(dev, info);
> +     /* Set default the usb controller overcurrent signal. */
> +     if (!ret)
> +             clrsetbits_le32(priv->base + JH7110_SYS_GPI,
> +                             GENMASK(22, 16), BIT(16));
> +     return ret;
>  }
> 
>  static const struct udevice_id jh7110_sys_pinctrl_ids[] = {
> --
> 2.17.1

Hi Rick and Leo
  I think move this to spl is better. 

Reply via email to