Thread (11 messages) 11 messages, 2 authors, 2021-06-09

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

From: Sascha Hauer <s.hauer@pengutronix.de>
Date: 2021-06-09 09:51:19

Hi Ahmad,

On Wed, Jun 09, 2021 at 10:01:12AM +0200, Ahmad Fatoum wrote:
quoted
 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@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help