Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3351760imu; Sun, 11 Nov 2018 13:01:50 -0800 (PST) X-Google-Smtp-Source: AJdET5fryjUc2D0vUOQRvDbFOz2AlPF49aZ+BylGzmJiAvmdpR7WQWDu5drGnyNG85GdfVQYGa8N X-Received: by 2002:a17:902:148:: with SMTP id 66-v6mr14377015plb.66.1541970110804; Sun, 11 Nov 2018 13:01:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541970110; cv=none; d=google.com; s=arc-20160816; b=x9XXyEJ0zrFB0WwBkTNfSrtBNBblc0FdE9s8rLV1awb3LpoCRsrwP6soT4WvBMu+8b Zubp961BXmYvoUPjoRkDWfLz9FMCjALGtXVE9RR3Xtkiukxum5vnuil7RTYqSFkw5F1q a/GtmvMG5xjGX8kClXouVFPkvNhKLCOSYF5g2A91FfNxyZlXCd8u7coARsYuQaYTXmLC QiWS9i4/60WBr+hm1dk69Du4tofEp4ytlaQRB3uI8O+rik2LHea3ms+Vo+ub8au4Zbyv B+4JLtJdWE8LLr5feuXUF2mgX+KbPrwcYKirrs4cJfTwJhEDywCVP4UQRdqL935EvDe0 qh7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=kYWDvIT/FXK9fJwNJ417EnjeRDYIA950BeF39i65Xw8=; b=L8v0djaz+E+ezf+QBTHrGy3y/iKNT4STZt/4yxiutoj7BrvY6bB6nB8GrIw45NBSU3 SdOVx+56xFLaIA+Hak/iDPnbpMWd9q8yMQPdv1qrR5upmX4C9Ncl+2abAn0+MtBSchdl FHFzCGCK4p3FoCwkNYSHG5tCAuJOm+I5bErIzr3Mr8inwRGMTewsLrmbq+vz5U/ElBWM /9s5vY3ApuTRQBkz86jUwdK+sgmXRjkU/3AedIuMp2ueblHW/WzHRsQL4dJqVFF8uzoI fh1aojN85VMQ67jpGVS4M2kOZ0T6r9pmGDAD+MFPGAHR182P5tDynM/dLOAUJo0AjXAx Rqfg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l85-v6si12702066pfb.31.2018.11.11.13.01.34; Sun, 11 Nov 2018 13:01:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729799AbeKLGuw (ORCPT + 99 others); Mon, 12 Nov 2018 01:50:52 -0500 Received: from gloria.sntech.de ([185.11.138.130]:44330 "EHLO gloria.sntech.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726497AbeKLGuv (ORCPT ); Mon, 12 Nov 2018 01:50:51 -0500 Received: from p54b264b4.dip0.t-ipconnect.de ([84.178.100.180] helo=phil.fritz.box) by gloria.sntech.de with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1gLwqw-0001eN-9u; Sun, 11 Nov 2018 22:01:06 +0100 From: Heiko Stuebner To: linus.walleij@linaro.org Cc: heiko@sntech.de, linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, shawn.lin@rock-chips.com, david.wu@rock-chips.com, Heiko Stuebner Subject: [PATCH 2/2] pinctrl: rockchip: add rk3188 routes to switch between nand and emmc Date: Sun, 11 Nov 2018 22:00:47 +0100 Message-Id: <20181111210047.30375-2-heiko@sntech.de> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20181111210047.30375-1-heiko@sntech.de> References: <20181111210047.30375-1-heiko@sntech.de> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Heiko Stuebner The rk3188 has pins that are not handled through the regular iomuxing for handling either nand-flash or an emmc and are set through only one specifal setting. So utilize the routing function to simply do that setting depending on one of the core nand/emmc signals that are actually regular pins handled through pinctrl. Signed-off-by: Heiko Stuebner --- drivers/pinctrl/pinctrl-rockchip.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/drivers/pinctrl/pinctrl-rockchip.c b/drivers/pinctrl/pinctrl-rockchip.c index 246bf14c7f72..16bf21bf69a2 100644 --- a/drivers/pinctrl/pinctrl-rockchip.c +++ b/drivers/pinctrl/pinctrl-rockchip.c @@ -822,6 +822,26 @@ static struct rockchip_mux_route_data rk3128_mux_route_data[] = { }, }; +static struct rockchip_mux_route_data rk3188_mux_route_data[] = { + { + /* non-iomuxed emmc/flash pins on flash-dqs */ + .bank_num = 0, + .pin = 24, + .func = 1, + .route_location = ROCKCHIP_ROUTE_GRF, + .route_offset = 0xa0, + .route_val = BIT(16 + 11), + }, { + /* non-iomuxed emmc/flash pins on emmc-clk */ + .bank_num = 0, + .pin = 24, + .func = 2, + .route_location = ROCKCHIP_ROUTE_GRF, + .route_offset = 0xa0, + .route_val = BIT(16 + 11) | BIT(11), + }, +}; + static struct rockchip_mux_route_data rk3228_mux_route_data[] = { { /* pwm0-0 */ @@ -3626,6 +3646,8 @@ static struct rockchip_pin_ctrl rk3188_pin_ctrl = { .label = "RK3188-GPIO", .type = RK3188, .grf_mux_offset = 0x60, + .iomux_routes = rk3188_mux_route_data, + .niomux_routes = ARRAY_SIZE(rk3188_mux_route_data), .pull_calc_reg = rk3188_calc_pull_reg_and_bit, }; -- 2.18.0