From patchwork Sat Oct 14 15:39:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Heiko_St=C3=BCbner?= X-Patchwork-Id: 10006453 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3CDDA601E9 for ; Sat, 14 Oct 2017 15:39:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 304B3291CB for ; Sat, 14 Oct 2017 15:39:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 243B9291F2; Sat, 14 Oct 2017 15:39:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DC1D4291CB for ; Sat, 14 Oct 2017 15:39:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753947AbdJNPjY (ORCPT ); Sat, 14 Oct 2017 11:39:24 -0400 Received: from gloria.sntech.de ([95.129.55.99]:38242 "EHLO gloria.sntech.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753846AbdJNPjX (ORCPT ); Sat, 14 Oct 2017 11:39:23 -0400 Received: from p57b77c3f.dip0.t-ipconnect.de ([87.183.124.63] helo=phil.localnet) by gloria.sntech.de with esmtpsa (TLS1.1:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1e3OWz-0005sq-QV; Sat, 14 Oct 2017 17:39:17 +0200 From: Heiko Stuebner To: Pierre-Hugues Husson Cc: Hans Verkuil , linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org Subject: [PATCH] pinctrl: rockchip: Add iomux-route switching support for rk3288 Date: Sat, 14 Oct 2017 17:39:17 +0200 Message-ID: <13020229.tRmotBUImn@phil> User-Agent: KMail/5.2.3 (Linux/4.11.0-1-amd64; KDE/5.28.0; x86_64; ; ) In-Reply-To: <2009704.s5LEIeT6xV@phil> References: <20171013225337.5196-1-phh@phh.me> <2009704.s5LEIeT6xV@phil> MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP So far only the hdmi cec supports using one of two different pins as source, so add the route switching for it. Signed-off-by: Heiko Stuebner Tested-by: Hans Verkuil --- If I didn't mess up any numbering, the pinctrl change should look like the following patch. Hope that helps Heiko drivers/pinctrl/pinctrl-rockchip.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/drivers/pinctrl/pinctrl-rockchip.c b/drivers/pinctrl/pinctrl-rockchip.c index b5cb7858ffdc..8dd49e2e144b 100644 --- a/drivers/pinctrl/pinctrl-rockchip.c +++ b/drivers/pinctrl/pinctrl-rockchip.c @@ -884,6 +884,24 @@ static struct rockchip_mux_route_data rk3228_mux_route_data[] = { }, }; +static struct rockchip_mux_route_data rk3288_mux_route_data[] = { + { + /* edphdmi_cecinoutt1 */ + .bank_num = 7, + .pin = 16, + .func = 2, + .route_offset = 0x264, + .route_val = BIT(16 + 12) | BIT(12), + }, { + /* edphdmi_cecinout */ + .bank_num = 7, + .pin = 23, + .func = 4, + .route_offset = 0x264, + .route_val = BIT(16 + 12), + }, +}; + static struct rockchip_mux_route_data rk3328_mux_route_data[] = { { /* uart2dbg_rxm0 */ @@ -3391,6 +3409,8 @@ static struct rockchip_pin_ctrl rk3288_pin_ctrl = { .type = RK3288, .grf_mux_offset = 0x0, .pmu_mux_offset = 0x84, + .iomux_routes = rk3288_mux_route_data, + .niomux_routes = ARRAY_SIZE(rk3288_mux_route_data), .pull_calc_reg = rk3288_calc_pull_reg_and_bit, .drv_calc_reg = rk3288_calc_drv_reg_and_bit, };