Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp4217820imd; Mon, 29 Oct 2018 20:55:23 -0700 (PDT) X-Google-Smtp-Source: AJdET5fHBjlLqulWQOLcn77UazmV+85xOqwwyzvCAs30Zj/iEoyVWUIX0liGDHf00+7i2HEy5egA X-Received: by 2002:a63:c45:: with SMTP id 5-v6mr16410358pgm.372.1540871723494; Mon, 29 Oct 2018 20:55:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540871723; cv=none; d=google.com; s=arc-20160816; b=0c18n2YOiSjOj+t6cpWkMOcmUXn4UhM2u5c4+1Slw7d4kWuNLJv6d1t/Vferpai9N9 mEJdPmmttdoItkKgbAL3aW9aTdUPWBE8X6NWmWfzZtol3OMbxMA/aftg32FK4079sUFe fr0Ckjbb+YUlTGaPelF4Pl3hWgu29HHo0yTGSaa6UcgX+G7tGx4esBHwa9+tL6baihtb lKeJ3r5athwhNDPMsbU5/W1mTMW61wMYm8vSt9LHvW8lrJ7e0v3TO99jR0nccJMXOQcV fTDovsgJIjZ7Ea+oEtvUPq7rfvNAB+6tZHWXNVK5uVIzZGv/XGzPLpyiu/k3khN3mPxN j2pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:importance:content-transfer-encoding :mime-version:subject:references:in-reply-to:message-id:cc:to:from :date:dkim-signature; bh=sq3lbn1m/j7rpbJfrSulgPB1Aj1ql82tOUlwEXDMQX4=; b=hvwfEQDArjNneu+ajNKvXp4Md2u7SpLcmnTQr8x4VIPCWuxjRAXNB8caOrgAjGWFMr 7b62YBYC/Wg6hY/dl9n8CMcY0Ov9ho3tVQ0860WZBJFtWW3OuQaeZRgQ7pmuOrrFTfty bLJesatk6zWCfOXN8SLhwdeVkpkMnMWvSIwX4JcEl//IZtESSkpJrPaWq1aVMxGP/9fc FyNjEKOz52w+GfyvMy1pA4wGn0D+8kE5JTsiec69nCdMn90qyntEN2HASo6YcOPqqlNw nHHD2z9jGk28TvEqwKy+XmriWoeLb6ovpSRxq4Cvys08qhEKn4MZByf5KXbw/HWJty16 T1Cg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@fpond.eu header.s=strato-dkim-0002 header.b=gPFBBAFl; 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 t11-v6si21092438plq.280.2018.10.29.20.55.07; Mon, 29 Oct 2018 20:55:23 -0700 (PDT) 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=fail header.i=@fpond.eu header.s=strato-dkim-0002 header.b=gPFBBAFl; 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 S1726580AbeJ3Mou (ORCPT + 99 others); Tue, 30 Oct 2018 08:44:50 -0400 Received: from mo4-p01-ob.smtp.rzone.de ([85.215.255.53]:34771 "EHLO mo4-p01-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725935AbeJ3Mou (ORCPT ); Tue, 30 Oct 2018 08:44:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1540871582; s=strato-dkim-0002; d=fpond.eu; h=Subject:References:In-Reply-To:Message-ID:Cc:To:From:Date: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=sq3lbn1m/j7rpbJfrSulgPB1Aj1ql82tOUlwEXDMQX4=; b=gPFBBAFlrHzHxC2CecgJB61jNzT2K8f4/MIedDy/h4uptbQ7OXg5XdPtf68HVloaDQ bBYFGkv1jNPtDXJ1wEsoP+FArpZUae36fZIG5u/vogaTAVfdAiGax48x5bwwJxbDaWbK mBBdmZcJD3geFDOJv3ecxOgco0QbZkxzTlwxRr2UJQYxE/1B6mMRTzJXTozVB14DkFwO qbFJteCwt8lTFY4xQXWl5xMpD/sTYvIRK3DXuTrAOfpwBilhOuMZPvKRUpbMuWs7z0dA W1eZAREyIUc/a1N05SaWVDTS4uG8zF8zA+gW02VsI6vXC0b4EbvWAR2SGsaD6ALwqFc6 s0qQ== X-RZG-AUTH: ":OWANVUa4dPFUgKR/3dpvnYP0Np73amq+g13rqGzmt2bYDnKIKaws6YXTsc4=" X-RZG-CLASS-ID: mo00 Received: from null by smtp-ox.front (RZmta 44.3 AUTH) with ESMTPSA id 20819cu9U3kaxs7 (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (curve X9_62_prime256v1 with 256 ECDH bits, eq. 3072 bits RSA)) (Client did not present a certificate); Tue, 30 Oct 2018 04:46:36 +0100 (CET) Date: Tue, 30 Oct 2018 04:46:36 +0100 (CET) From: Ulrich Hecht To: Jacopo Mondi , geert+renesas@glider.be, laurent.pinchart@ideasonboard.com, horms@verge.net.au Cc: linus.walleij@linaro.org, linux-renesas-soc@vger.kernel.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Message-ID: <835772700.335137.1540871196272@webmail.strato.com> In-Reply-To: <1540836824-4636-3-git-send-email-jacopo+renesas@jmondi.org> References: <1540836824-4636-1-git-send-email-jacopo+renesas@jmondi.org> <1540836824-4636-3-git-send-email-jacopo+renesas@jmondi.org> Subject: Re: [PATCH 2/2] pinctrl: sh-pfc: r8a77965: Add VIN[4|5] groups/functions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Priority: 3 Importance: Medium X-Mailer: Open-Xchange Mailer v7.8.4-Rev45 X-Originating-Client: open-xchange-appsuite Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thank you for your patch. > On October 29, 2018 at 7:13 PM Jacopo Mondi wrote: > > > The VIN4 and VIN5 interfaces supports parallel video input. > Add pin, mux and functions definitions for VIN4 and VIN5 for R-Car M3-N. > > Signed-off-by: Jacopo Mondi > --- > drivers/pinctrl/sh-pfc/pfc-r8a77965.c | 254 ++++++++++++++++++++++++++++++++++ > 1 file changed, 254 insertions(+) > > diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a77965.c b/drivers/pinctrl/sh-pfc/pfc-r8a77965.c > index dfdd982..1aca4b0 100644 > --- a/drivers/pinctrl/sh-pfc/pfc-r8a77965.c > +++ b/drivers/pinctrl/sh-pfc/pfc-r8a77965.c > @@ -3725,6 +3725,216 @@ static const unsigned int usb30_mux[] = { > USB30_PWEN_MARK, USB30_OVC_MARK, > }; > > +/* - VIN4 ------------------------------------------------------------------- */ > +static const unsigned int vin4_data18_a_pins[] = { > + RCAR_GP_PIN(0, 10), RCAR_GP_PIN(0, 11), > + RCAR_GP_PIN(0, 12), RCAR_GP_PIN(0, 13), > + RCAR_GP_PIN(0, 14), RCAR_GP_PIN(0, 15), > + RCAR_GP_PIN(1, 2), RCAR_GP_PIN(1, 3), > + RCAR_GP_PIN(1, 4), RCAR_GP_PIN(1, 5), > + RCAR_GP_PIN(1, 6), RCAR_GP_PIN(1, 7), > + RCAR_GP_PIN(0, 2), RCAR_GP_PIN(0, 3), > + RCAR_GP_PIN(0, 4), RCAR_GP_PIN(0, 5), > + RCAR_GP_PIN(0, 6), RCAR_GP_PIN(0, 7), > +}; > + > +static const unsigned int vin4_data18_a_mux[] = { > + VI4_DATA2_A_MARK, VI4_DATA3_A_MARK, > + VI4_DATA4_A_MARK, VI4_DATA5_A_MARK, > + VI4_DATA6_A_MARK, VI4_DATA7_A_MARK, > + VI4_DATA10_MARK, VI4_DATA11_MARK, > + VI4_DATA12_MARK, VI4_DATA13_MARK, > + VI4_DATA14_MARK, VI4_DATA15_MARK, > + VI4_DATA18_MARK, VI4_DATA19_MARK, > + VI4_DATA20_MARK, VI4_DATA21_MARK, > + VI4_DATA22_MARK, VI4_DATA23_MARK, > +}; > + > +static const union vin_data vin4_data_a_pins = { > + .data24 = { > + RCAR_GP_PIN(0, 8), RCAR_GP_PIN(0, 9), > + RCAR_GP_PIN(0, 10), RCAR_GP_PIN(0, 11), > + RCAR_GP_PIN(0, 12), RCAR_GP_PIN(0, 13), > + RCAR_GP_PIN(0, 14), RCAR_GP_PIN(0, 15), > + RCAR_GP_PIN(1, 0), RCAR_GP_PIN(1, 1), > + RCAR_GP_PIN(1, 2), RCAR_GP_PIN(1, 3), > + RCAR_GP_PIN(1, 4), RCAR_GP_PIN(1, 5), > + RCAR_GP_PIN(1, 6), RCAR_GP_PIN(1, 7), > + RCAR_GP_PIN(0, 0), RCAR_GP_PIN(0, 1), > + RCAR_GP_PIN(0, 2), RCAR_GP_PIN(0, 3), > + RCAR_GP_PIN(0, 4), RCAR_GP_PIN(0, 5), > + RCAR_GP_PIN(0, 6), RCAR_GP_PIN(0, 7), > + }, > +}; > + > +static const union vin_data vin4_data_a_mux = { > + .data24 = { > + VI4_DATA0_A_MARK, VI4_DATA1_A_MARK, > + VI4_DATA2_A_MARK, VI4_DATA3_A_MARK, > + VI4_DATA4_A_MARK, VI4_DATA5_A_MARK, > + VI4_DATA6_A_MARK, VI4_DATA7_A_MARK, > + VI4_DATA8_MARK, VI4_DATA9_MARK, > + VI4_DATA10_MARK, VI4_DATA11_MARK, > + VI4_DATA12_MARK, VI4_DATA13_MARK, > + VI4_DATA14_MARK, VI4_DATA15_MARK, > + VI4_DATA16_MARK, VI4_DATA17_MARK, > + VI4_DATA18_MARK, VI4_DATA19_MARK, > + VI4_DATA20_MARK, VI4_DATA21_MARK, > + VI4_DATA22_MARK, VI4_DATA23_MARK, > + }, > +}; > + > +static const unsigned int vin4_data18_b_pins[] = { > + RCAR_GP_PIN(2, 2), RCAR_GP_PIN(2, 3), > + RCAR_GP_PIN(2, 4), RCAR_GP_PIN(2, 5), > + RCAR_GP_PIN(2, 6), RCAR_GP_PIN(2, 7), > + RCAR_GP_PIN(1, 2), RCAR_GP_PIN(1, 3), > + RCAR_GP_PIN(1, 4), RCAR_GP_PIN(1, 5), > + RCAR_GP_PIN(1, 6), RCAR_GP_PIN(1, 7), > + RCAR_GP_PIN(0, 2), RCAR_GP_PIN(0, 3), > + RCAR_GP_PIN(0, 4), RCAR_GP_PIN(0, 5), > + RCAR_GP_PIN(0, 6), RCAR_GP_PIN(0, 7), > +}; > + > +static const unsigned int vin4_data18_b_mux[] = { > + VI4_DATA2_B_MARK, VI4_DATA3_B_MARK, > + VI4_DATA4_B_MARK, VI4_DATA5_B_MARK, > + VI4_DATA6_B_MARK, VI4_DATA7_B_MARK, > + VI4_DATA10_MARK, VI4_DATA11_MARK, > + VI4_DATA12_MARK, VI4_DATA13_MARK, > + VI4_DATA14_MARK, VI4_DATA15_MARK, > + VI4_DATA18_MARK, VI4_DATA19_MARK, > + VI4_DATA20_MARK, VI4_DATA21_MARK, > + VI4_DATA22_MARK, VI4_DATA23_MARK, > +}; > + > +static const union vin_data vin4_data_b_pins = { > + .data24 = { > + RCAR_GP_PIN(2, 0), RCAR_GP_PIN(2, 1), > + RCAR_GP_PIN(2, 2), RCAR_GP_PIN(2, 3), > + RCAR_GP_PIN(2, 4), RCAR_GP_PIN(2, 5), > + RCAR_GP_PIN(2, 6), RCAR_GP_PIN(2, 7), > + RCAR_GP_PIN(1, 0), RCAR_GP_PIN(1, 1), > + RCAR_GP_PIN(1, 2), RCAR_GP_PIN(1, 3), > + RCAR_GP_PIN(1, 4), RCAR_GP_PIN(1, 5), > + RCAR_GP_PIN(1, 6), RCAR_GP_PIN(1, 7), > + RCAR_GP_PIN(0, 0), RCAR_GP_PIN(0, 1), > + RCAR_GP_PIN(0, 2), RCAR_GP_PIN(0, 3), > + RCAR_GP_PIN(0, 4), RCAR_GP_PIN(0, 5), > + RCAR_GP_PIN(0, 6), RCAR_GP_PIN(0, 7), > + }, > +}; > + > +static const union vin_data vin4_data_b_mux = { > + .data24 = { > + VI4_DATA0_B_MARK, VI4_DATA1_B_MARK, > + VI4_DATA2_B_MARK, VI4_DATA3_B_MARK, > + VI4_DATA4_B_MARK, VI4_DATA5_B_MARK, > + VI4_DATA6_B_MARK, VI4_DATA7_B_MARK, > + VI4_DATA8_MARK, VI4_DATA9_MARK, > + VI4_DATA10_MARK, VI4_DATA11_MARK, > + VI4_DATA12_MARK, VI4_DATA13_MARK, > + VI4_DATA14_MARK, VI4_DATA15_MARK, > + VI4_DATA16_MARK, VI4_DATA17_MARK, > + VI4_DATA18_MARK, VI4_DATA19_MARK, > + VI4_DATA20_MARK, VI4_DATA21_MARK, > + VI4_DATA22_MARK, VI4_DATA23_MARK, > + }, > +}; > + > +static const unsigned int vin4_sync_pins[] = { > + /* VSYNC_N, HSYNC_N */ > + RCAR_GP_PIN(1, 17), RCAR_GP_PIN(1, 18), > +}; > + > +static const unsigned int vin4_sync_mux[] = { > + VI4_HSYNC_N_MARK, VI4_VSYNC_N_MARK, > +}; > + > +static const unsigned int vin4_field_pins[] = { > + RCAR_GP_PIN(1, 16), > +}; > + > +static const unsigned int vin4_field_mux[] = { > + VI4_FIELD_MARK, > +}; > + > +static const unsigned int vin4_clkenb_pins[] = { > + RCAR_GP_PIN(1, 19), > +}; > + > +static const unsigned int vin4_clkenb_mux[] = { > + VI4_CLKENB_MARK, > +}; > + > +static const unsigned int vin4_clk_pins[] = { > + RCAR_GP_PIN(1, 27), > +}; > + > +static const unsigned int vin4_clk_mux[] = { > + VI4_CLK_MARK, > +}; > + > +/* - VIN5 ------------------------------------------------------------------- */ > +static const union vin_data vin5_data_pins = { > + .data16 = { > + RCAR_GP_PIN(0, 0), RCAR_GP_PIN(0, 1), > + RCAR_GP_PIN(0, 2), RCAR_GP_PIN(0, 3), > + RCAR_GP_PIN(0, 4), RCAR_GP_PIN(0, 5), > + RCAR_GP_PIN(0, 6), RCAR_GP_PIN(0, 7), > + RCAR_GP_PIN(1, 12), RCAR_GP_PIN(1, 13), > + RCAR_GP_PIN(1, 14), RCAR_GP_PIN(1, 15), > + RCAR_GP_PIN(1, 4), RCAR_GP_PIN(1, 5), > + RCAR_GP_PIN(1, 6), RCAR_GP_PIN(1, 7), > + }, > +}; > + > +static const union vin_data vin5_data_mux = { > + .data16 = { > + VI5_DATA0_MARK, VI5_DATA1_MARK, > + VI5_DATA2_MARK, VI5_DATA3_MARK, > + VI5_DATA4_MARK, VI5_DATA5_MARK, > + VI5_DATA6_MARK, VI5_DATA7_MARK, > + VI5_DATA8_MARK, VI5_DATA9_MARK, > + VI5_DATA10_MARK, VI5_DATA11_MARK, > + VI5_DATA12_MARK, VI5_DATA13_MARK, > + VI5_DATA14_MARK, VI5_DATA15_MARK, > + }, > +}; > + > +static const unsigned int vin5_sync_pins[] = { > + /* VSYNC_N, HSYNC_N */ > + RCAR_GP_PIN(1, 9), RCAR_GP_PIN(1, 10), > +}; > + > +static const unsigned int vin5_sync_mux[] = { > + VI5_HSYNC_N_MARK, VI5_VSYNC_N_MARK, > +}; > + > +static const unsigned int vin5_field_pins[] = { > + RCAR_GP_PIN(1, 11), > +}; > + > +static const unsigned int vin5_field_mux[] = { > + VI5_FIELD_MARK, > +}; > + > +static const unsigned int vin5_clkenb_pins[] = { > + RCAR_GP_PIN(1, 20), > +}; > + > +static const unsigned int vin5_clkenb_mux[] = { > + VI5_CLKENB_MARK, > +}; > + > +static const unsigned int vin5_clk_pins[] = { > + RCAR_GP_PIN(1, 21), > +}; > + > +static const unsigned int vin5_clk_mux[] = { > + VI5_CLK_MARK, > +}; > + > static const struct sh_pfc_pin_group pinmux_groups[] = { > SH_PFC_PIN_GROUP(audio_clk_a_a), > SH_PFC_PIN_GROUP(audio_clk_a_b), > @@ -4000,6 +4210,24 @@ static const struct sh_pfc_pin_group pinmux_groups[] = { > SH_PFC_PIN_GROUP(usb0), > SH_PFC_PIN_GROUP(usb1), > SH_PFC_PIN_GROUP(usb30), > + VIN_DATA_PIN_GROUP_VER(vin4_data, a, 8), > + VIN_DATA_PIN_GROUP_VER(vin4_data, a, 16), > + SH_PFC_PIN_GROUP(vin4_data18_a), > + VIN_DATA_PIN_GROUP_VER(vin4_data, a, 24), > + VIN_DATA_PIN_GROUP_VER(vin4_data, b, 8), > + VIN_DATA_PIN_GROUP_VER(vin4_data, b, 16), > + SH_PFC_PIN_GROUP(vin4_data18_b), > + VIN_DATA_PIN_GROUP_VER(vin4_data, b, 24), > + SH_PFC_PIN_GROUP(vin4_sync), > + SH_PFC_PIN_GROUP(vin4_field), > + SH_PFC_PIN_GROUP(vin4_clkenb), > + SH_PFC_PIN_GROUP(vin4_clk), > + VIN_DATA_PIN_GROUP(vin5_data, 8), > + VIN_DATA_PIN_GROUP(vin5_data, 16), > + SH_PFC_PIN_GROUP(vin5_sync), > + SH_PFC_PIN_GROUP(vin5_field), > + SH_PFC_PIN_GROUP(vin5_clkenb), > + SH_PFC_PIN_GROUP(vin5_clk), > }; > > static const char * const audio_clk_groups[] = { > @@ -4392,6 +4620,30 @@ static const char * const usb30_groups[] = { > "usb30", > }; > > +static const char * const vin4_groups[] = { > + "vin4_data8_a", > + "vin4_data16_a", > + "vin4_data18_a", > + "vin4_data24_a", > + "vin4_data8_b", > + "vin4_data16_b", > + "vin4_data18_b", > + "vin4_data24_b", > + "vin4_sync", > + "vin4_field", > + "vin4_clkenb", > + "vin4_clk", > +}; > + > +static const char * const vin5_groups[] = { > + "vin5_data8", > + "vin5_data16", > + "vin5_sync", > + "vin5_field", > + "vin5_clkenb", > + "vin5_clk", > +}; > + > static const struct sh_pfc_function pinmux_functions[] = { > SH_PFC_FUNCTION(audio_clk), > SH_PFC_FUNCTION(avb), > @@ -4432,6 +4684,8 @@ static const struct sh_pfc_function pinmux_functions[] = { > SH_PFC_FUNCTION(usb0), > SH_PFC_FUNCTION(usb1), > SH_PFC_FUNCTION(usb30), > + SH_PFC_FUNCTION(vin4), > + SH_PFC_FUNCTION(vin5), > }; > > static const struct pinmux_cfg_reg pinmux_config_regs[] = { > -- > 2.7.4 > Reviewed-by: Ulrich Hecht CU Uli