Re: [PATCH 5/5] pinctrl: Rockchip: Add RK3568 support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Ahmad,

On Wed, Jun 09, 2021 at 10:01:12AM +0200, Ahmad Fatoum wrote:
> >  static struct rockchip_mux_route_data rk3188_mux_route_data[] = {
> >  	RK_MUXROUTE_SAME(0, RK_PD0, 1, 0xa0, BIT(16 + 11)), /* non-iomuxed emmc/flash pins on flash-dqs */
> >  	RK_MUXROUTE_SAME(0, RK_PD0, 2, 0xa0, BIT(16 + 11) | BIT(11)), /* non-iomuxed emmc/flash pins on emmc-clk */
> > @@ -458,6 +650,7 @@ static int rockchip_pinctrl_set_pull(struct rockchip_pin_bank *bank,
> >  		writel(data, reg);
> >  		break;
> >  	case RK3188:
> > +	case RK3568:
> >  		data = ((1 << RK3188_PULL_BITS_PER_PIN) - 1) << (bit + 16);
> >  		data |= pull << bit;
> 
> Linux does this for pull (== ret):
> 
>  /*
>   * In the TRM, pull-up being 1 for everything except the GPIO0_D0-D6,
>   * where that pull up value becomes 3.
>   */
>  if (ctrl->type == RK3568 && bank->bank_num == 0 && pin_num >= 27 && pin_num <= 30) {
>          if (ret == 1)
>                  ret = 3;
>  }
> 
> Should we do this too?
>

Yes. In our case this becomes:

	if (ctrl->type == RK3568 &&
	    bank->bank_num == 0 &&
	    pin_num >= 27 &&
	    pin_num <= 30 &&
	    pull == RK_BIAS_PULL_UP)
		pull = 3;
Sascha

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux