From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752542AbdJTH3D (ORCPT ); Fri, 20 Oct 2017 03:29:03 -0400 Received: from lb1-smtp-cloud9.xs4all.net ([194.109.24.22]:41685 "EHLO lb1-smtp-cloud9.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752082AbdJTH3B (ORCPT ); Fri, 20 Oct 2017 03:29:01 -0400 Subject: Re: [PATCH] pinctrl: rockchip: Add iomux-route switching support for rk3288 To: Heiko Stuebner , Pierre-Hugues Husson References: <20171013225337.5196-1-phh@phh.me> <2009704.s5LEIeT6xV@phil> <13020229.tRmotBUImn@phil> Cc: linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org From: Hans Verkuil Message-ID: <52d1a9ee-a6c6-5c7f-330f-9b672be9c2c6@xs4all.nl> Date: Fri, 20 Oct 2017 09:28:58 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <13020229.tRmotBUImn@phil> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4wfDHPTg3x+TQkCpoYMBBybvlRiLCPHiPEMDabH34QVS3hvHXb0rDSracH+9RM3+Wde1mJVLuA9eAlLYqFbJD0CttUi3RwZKHu4RrmZqAky41wzKcXYRHu BZbNGsRN53Ys9cowV2ak1itEcJYQrX0x7H7WYAZ7AJ8L7FwBqZCcLULlxm2UiPI8T4USc8p/OghXJh5zBIzresNsEKT94Qs62fRIXCguLwd+TNrfULPhLi1u CJhw6FvdYVRk456wTU8lKAskW7990mCKvkXumUUwblqoFjIMDDX2+N1w5t77PHrH Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 14/10/17 17:39, Heiko Stuebner wrote: > 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 Just tested this on my firefly reload and it works great! Tested-by: Hans Verkuil I'll post some dts patches later today to fully bring up the first HDMI output on the Firefly Reload. Will you process this patch further to get it mainlined? Regards, Hans > --- > 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, > }; > From mboxrd@z Thu Jan 1 00:00:00 1970 From: hverkuil@xs4all.nl (Hans Verkuil) Date: Fri, 20 Oct 2017 09:28:58 +0200 Subject: [PATCH] pinctrl: rockchip: Add iomux-route switching support for rk3288 In-Reply-To: <13020229.tRmotBUImn@phil> References: <20171013225337.5196-1-phh@phh.me> <2009704.s5LEIeT6xV@phil> <13020229.tRmotBUImn@phil> Message-ID: <52d1a9ee-a6c6-5c7f-330f-9b672be9c2c6@xs4all.nl> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 14/10/17 17:39, Heiko Stuebner wrote: > 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 Just tested this on my firefly reload and it works great! Tested-by: Hans Verkuil I'll post some dts patches later today to fully bring up the first HDMI output on the Firefly Reload. Will you process this patch further to get it mainlined? Regards, Hans > --- > 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, > }; >