Received: by 10.223.185.116 with SMTP id b49csp1964469wrg; Thu, 15 Feb 2018 04:34:03 -0800 (PST) X-Google-Smtp-Source: AH8x227IUtVegCf/JMVAPBoZMIdUW0p0j0sN8TTOkBHU6Sy8kvcAJkkrT8m0d8A41qf6ukWAnS3n X-Received: by 2002:a17:902:47:: with SMTP id 65-v6mr2383303pla.194.1518698043171; Thu, 15 Feb 2018 04:34:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518698043; cv=none; d=google.com; s=arc-20160816; b=b+IpQJ16aKXUvY4Jqp1/j9B67xuSkcb08QGi+uDRBWLkzdCV1rgZC6JpiEJze5R02M 2pmYHYWEdypY3r0XfoMeq4kTfyoPVwDcXWZANNpP2w1jRVk2DDBc3s04rc5xL08OmycX 0iVw8uN1ouWaH+UGjy7YXzDHRwWlJID+PG+OpE7LYmo/kdwWBvmYP7VddzPZboy7jFD8 sDB1xGHLINwM7PJBVRoEUTIX7+cxC17SYaKUPBPQR7aSCSENkTbS4mtJPBygmdaKPsIv pqapgb5UM5Hm7r9uy86JP0hQXfzrlY6I15gS88RvRxOim363OaQHUdQtZ/2Y5OWXUdzI KvdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject :dkim-signature:arc-authentication-results; bh=JEmHbMVmmHi0WQrjodnePthMF/IsecY3BnpN328fgHY=; b=N86ygOPLEAA/nBOw0WWKqPNGAOLVOBtpIS3s5UsEGsyjD2mUgXcVDmBb9rRtcZmVXS ICtB+8Rm/HwirYPhKd9bdMUuinmXk3oYX1hATNjFd0l4DyAK9mI7TX6nnrGWizbrmsmz TNzRwpIt8kGJspIX4g4+x4i1ZWrTLJ+u23uCX7QOmF1UUtVa23Kev+j/NXkW2GiT5UYU 1tkeVXJGVF/PKRR8FC+OTXhDutzhJXAecvHDfrZg+RjkctadX/PDr53c2B3vz/SFo2EJ Ed6mXqYgFZIpcZhl4Wq3xOfOocRpBLWmS+MR1rOnR6b3KtVxtfHBfwsq+DDU3OiXrGJA bRMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=v2Fxh2zW; 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 bh4-v6si10500391plb.14.2018.02.15.04.33.48; Thu, 15 Feb 2018 04:34:03 -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; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=v2Fxh2zW; 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 S1030762AbeBOMdB (ORCPT + 99 others); Thu, 15 Feb 2018 07:33:01 -0500 Received: from galahad.ideasonboard.com ([185.26.127.97]:48181 "EHLO galahad.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967960AbeBOMc5 (ORCPT ); Thu, 15 Feb 2018 07:32:57 -0500 Received: from [192.168.0.20] (cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233]) by galahad.ideasonboard.com (Postfix) with ESMTPSA id 68162200BF; Thu, 15 Feb 2018 13:31:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1518697882; bh=ZggTDCEF4dXkNpccZ6A3XmrcGWfwKEKH0O4KBznxWVk=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=v2Fxh2zWRxQ19rqNhrv9O3UOgPKuBOOpXUMnW2pBtwMhfDNJZypjNOL6l8mH/MsZn DLc5buQZpF7iKjFn/7d4xoZX/92uAF924pNfxHNafocT7dXp7TRSsqYuZgXiCuq34H 6xLUPB9iLtK3RqsQ4b3hTJrudrRzqqpwCnr7JqFA= Subject: Re: [PATCH 1/8] pinctrl: sh-pfc: r8a77995: Add DU support To: Kieran Bingham , linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Laurent Pinchart , Simon Horman , geert@glider.be, Kieran Bingham , Geert Uytterhoeven , Linus Walleij , "open list:PIN CONTROL SUBSYSTEM" , open list References: <1518683903-10681-1-git-send-email-kbingham@kernel.org> <1518683903-10681-2-git-send-email-kbingham@kernel.org> From: Kieran Bingham Organization: Ideas on Board Message-ID: <9ac40731-eb13-4727-864d-0e3b7059b9f8@ideasonboard.com> Date: Thu, 15 Feb 2018 12:32:51 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <1518683903-10681-2-git-send-email-kbingham@kernel.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch duplicates work performed by Ulrich. Please consider this patch dropped, and no need for review. (especially the obvious error in the pin-values) Oh well - it was a fun exercise to go through :-) -- Regards Kieran On 15/02/18 08:38, Kieran Bingham wrote: > From: Kieran Bingham > > Provide pin control support for the DU parallel RGB output signals. > > Signed-off-by: Kieran Bingham > --- > drivers/pinctrl/sh-pfc/pfc-r8a77995.c | 101 ++++++++++++++++++++++++++++++++++ > 1 file changed, 101 insertions(+) > > diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a77995.c b/drivers/pinctrl/sh-pfc/pfc-r8a77995.c > index a4927b78a17b..277b0d6972f7 100644 > --- a/drivers/pinctrl/sh-pfc/pfc-r8a77995.c > +++ b/drivers/pinctrl/sh-pfc/pfc-r8a77995.c > @@ -1114,6 +1114,87 @@ static const unsigned int canfd1_data_mux[] = { > CANFD1_TX_MARK, CANFD1_RX_MARK, > }; > > +/* - DU --------------------------------------------------------------------- */ > +static const unsigned int du_rgb666_pins[] = { > + /* R[7:2], G[7:2], B[7:2] */ > + RCAR_GP_PIN(1, 23), RCAR_GP_PIN(1, 22), RCAR_GP_PIN(1, 21), > + RCAR_GP_PIN(1, 20), RCAR_GP_PIN(1, 19), RCAR_GP_PIN(1, 18), > + RCAR_GP_PIN(1, 15), RCAR_GP_PIN(1, 14), RCAR_GP_PIN(1, 13), > + RCAR_GP_PIN(1, 12), RCAR_GP_PIN(1, 11), RCAR_GP_PIN(1, 10), > + RCAR_GP_PIN(1, 7), RCAR_GP_PIN(1, 6), RCAR_GP_PIN(1, 5), > + RCAR_GP_PIN(1, 4), RCAR_GP_PIN(1, 3), RCAR_GP_PIN(1, 2), > +}; > +static const unsigned int du_rgb666_mux[] = { > + DU_DR7_MARK, DU_DR6_MARK, DU_DR5_MARK, DU_DR4_MARK, > + DU_DR3_MARK, DU_DR2_MARK, > + DU_DG7_MARK, DU_DG6_MARK, DU_DG5_MARK, DU_DG4_MARK, > + DU_DG3_MARK, DU_DG2_MARK, > + DU_DB7_MARK, DU_DB6_MARK, DU_DB5_MARK, DU_DB4_MARK, > + DU_DB3_MARK, DU_DB2_MARK, > +}; > +static const unsigned int du_rgb888_pins[] = { > + /* R[7:0], G[7:0], B[7:0] */ > + RCAR_GP_PIN(1, 23), RCAR_GP_PIN(1, 22), RCAR_GP_PIN(1, 21), > + RCAR_GP_PIN(1, 20), RCAR_GP_PIN(1, 19), RCAR_GP_PIN(1, 18), > + RCAR_GP_PIN(1, 17), RCAR_GP_PIN(1, 16), > + RCAR_GP_PIN(1, 15), RCAR_GP_PIN(1, 14), RCAR_GP_PIN(1, 13), > + RCAR_GP_PIN(1, 12), RCAR_GP_PIN(1, 11), RCAR_GP_PIN(1, 10), > + RCAR_GP_PIN(1, 9), RCAR_GP_PIN(1, 8), > + RCAR_GP_PIN(1, 7), RCAR_GP_PIN(1, 6), RCAR_GP_PIN(1, 5), > + RCAR_GP_PIN(1, 4), RCAR_GP_PIN(1, 3), RCAR_GP_PIN(1, 2), > + RCAR_GP_PIN(1, 1), RCAR_GP_PIN(1, 0), > +}; > +static const unsigned int du_rgb888_mux[] = { > + DU_DR7_MARK, DU_DR6_MARK, DU_DR5_MARK, DU_DR4_MARK, > + DU_DR3_MARK, DU_DR2_MARK, DU_DR1_MARK, DU_DR0_MARK, > + DU_DG7_MARK, DU_DG6_MARK, DU_DG5_MARK, DU_DG4_MARK, > + DU_DG3_MARK, DU_DG2_MARK, DU_DG1_MARK, DU_DG0_MARK, > + DU_DB7_MARK, DU_DB6_MARK, DU_DB5_MARK, DU_DB4_MARK, > + DU_DB3_MARK, DU_DB2_MARK, DU_DB1_MARK, DU_DB0_MARK, > +}; > +static const unsigned int du_dotclkout0_pins[] = { > + /* CLKOUT */ > + RCAR_GP_PIN(1, 24), > +}; > +static const unsigned int du_dotclkout0_mux[] = { > + DU_DOTCLKOUT0_MARK > +}; > +static const unsigned int du_sync_pins[] = { > + /* HSYNC, VSYNC */ > + RCAR_GP_PIN(1, 25), RCAR_GP_PIN(1, 26), > +}; > +static const unsigned int du_sync_mux[] = { > + DU_HSYNC_MARK, DU_VSYNC_MARK > +}; > +static const unsigned int du_disp_pins[] = { > + /* DISP */ > + RCAR_GP_PIN(2, 1), > +}; > +static const unsigned int du_disp_mux[] = { > + DU_DISP_MARK, > +}; > +static const unsigned int du_dotclkin1_pins[] = { > + /* DOTCLKOUT0 */ > + RCAR_GP_PIN(1, 28), > +}; > +static const unsigned int du_dotclkin1_mux[] = { > + DU_DOTCLKIN1_MARK, > +}; > +static const unsigned int du_disp_cde_pins[] = { > + /* DISP/CDE */ > + RCAR_GP_PIN(1, 28), > +}; > +static const unsigned int du_disp_cde_mux[] = { > + DU_DISP_CDE_MARK, > +}; > +static const unsigned int du_cde_pins[] = { > + /* CDE */ > + RCAR_GP_PIN(1, 29), > +}; > +static const unsigned int du_cde_mux[] = { > + DU_CDE_MARK, > +}; > + > /* - I2C -------------------------------------------------------------------- */ > static const unsigned int i2c0_pins[] = { > /* SCL, SDA */ > @@ -1568,6 +1649,14 @@ static const struct sh_pfc_pin_group pinmux_groups[] = { > SH_PFC_PIN_GROUP(can_clk), > SH_PFC_PIN_GROUP(canfd0_data), > SH_PFC_PIN_GROUP(canfd1_data), > + SH_PFC_PIN_GROUP(du_rgb666), > + SH_PFC_PIN_GROUP(du_rgb888), > + SH_PFC_PIN_GROUP(du_dotclkout0), > + SH_PFC_PIN_GROUP(du_sync), > + SH_PFC_PIN_GROUP(du_disp), > + SH_PFC_PIN_GROUP(du_dotclkin1), > + SH_PFC_PIN_GROUP(du_disp_cde), > + SH_PFC_PIN_GROUP(du_cde), > SH_PFC_PIN_GROUP(i2c0), > SH_PFC_PIN_GROUP(i2c1), > SH_PFC_PIN_GROUP(i2c2_a), > @@ -1664,6 +1753,17 @@ static const char * const canfd1_groups[] = { > "canfd1_data", > }; > > +static const char * const du_groups[] = { > + "du_rgb666", > + "du_rgb888", > + "du_dotclk_out_0", > + "du_sync", > + "du_disp", > + "du_dotclk_in_1", > + "du_disp_cde", > + "du_cde", > +}; > + > static const char * const i2c0_groups[] = { > "i2c0", > }; > @@ -1779,6 +1879,7 @@ static const struct sh_pfc_function pinmux_functions[] = { > SH_PFC_FUNCTION(can_clk), > SH_PFC_FUNCTION(canfd0), > SH_PFC_FUNCTION(canfd1), > + SH_PFC_FUNCTION(du), > SH_PFC_FUNCTION(i2c0), > SH_PFC_FUNCTION(i2c1), > SH_PFC_FUNCTION(i2c2), >