From patchwork Tue Jun 30 14:30:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 1319948 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=FlApQiRR; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49x6HR30W7z9s6w for ; Wed, 1 Jul 2020 00:31:31 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0B83D81B92; Tue, 30 Jun 2020 16:30:55 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="FlApQiRR"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B165B81B50; Tue, 30 Jun 2020 16:30:38 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd42.google.com (mail-io1-xd42.google.com [IPv6:2607:f8b0:4864:20::d42]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 8A1A981B5E for ; Tue, 30 Jun 2020 16:30:29 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=aford173@gmail.com Received: by mail-io1-xd42.google.com with SMTP id e64so16271148iof.12 for ; Tue, 30 Jun 2020 07:30:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=nZBWxhLehJ0SV1TtXbcSOjLjaUJEA0M0inieibwauU4=; b=FlApQiRR/pX8UqpAtT7zwJNcY7d6Z5EaIFn5LW9F5lnnrurev9y+z8VCrHMbOFRoPO ZcuSKFnIQB9JmzglSB0AAvSJ/oEn0jpUb81pbtPfXJ6J2o4nFAL89ci+LlGIL1XpvmOj DAaNcBBKCmHq+2n6lcglM+T4fSaR02WIkfsVA9Y6V/3622LaZXBFsMEKg5IImbe08yUc p7GaVgdm/NXPCCjKhhM94mjdr+/Xv8LLwzUZgphessJ6AmnLpluDLgRiO1shEG9YE+1B 7qWS1GNxdQlWPaWanbDFcGtlYCHP+31H/gGShoO2L2jSNlDMIkf/9vZ7fcU5msftzr2I doVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=nZBWxhLehJ0SV1TtXbcSOjLjaUJEA0M0inieibwauU4=; b=umdt8VC1dA3z56u6lcYHdvkVygIgiwa7F61KD/6Rtu0z5G0GURsEvJNBzPHYvQlPtf QuiUhJLc0m8Lyxlvqicj2oG5aOfO5uZqPRrfaqSX2fQDx6kNcDXhy/SZNmkc8MFmb4pd Ow/J/vbMd+gX/P7UjIeVkHF9uDu0GQjHZTluzaQ7XfLyIiK4RAVct4WyCEp8LkM+olt0 Qp07ZYRJ6gMjAJGem00aScbao135kenfLq2is319mxB9jH6FIiqU5MpK7f3n+HaxJ4AH XaNQGkFRCXAYMLRT+/07yJF1kC0W97b2mp2VvgSXpH+vWlrxgn807j7UyifoPy0d0PlJ 540w== X-Gm-Message-State: AOAM532EyuOHy64aApXiboaEa1Ydz0r2oBKzhRSBn4aTc2NsXtrUMAYf WPva8Clq7hy3xDN+uhT6RfmNJZex X-Google-Smtp-Source: ABdhPJyEUXoKCHjQDTTAtFjXHwvw6frMtaHTvNhcq/BTX5rgJAolr3xEBg2yDlne7DdqGu9qzsE7ow== X-Received: by 2002:a02:212b:: with SMTP id e43mr24079341jaa.80.1593527426820; Tue, 30 Jun 2020 07:30:26 -0700 (PDT) Received: from aford-IdeaCentre-A730.lan (c-73-37-219-234.hsd1.mn.comcast.net. [73.37.219.234]) by smtp.gmail.com with ESMTPSA id k3sm1717380ils.8.2020.06.30.07.30.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jun 2020 07:30:26 -0700 (PDT) From: Adam Ford To: u-boot@lists.denx.de Cc: iwamatsu@nigauri.org, marek.vasut+renesas@gmail.com, aford@beaconembedded.com, Adam Ford Subject: [PATCH V3 4/6] pinctrl: renesas: Enable R8A774A1 PFC tables Date: Tue, 30 Jun 2020 09:30:09 -0500 Message-Id: <20200630143011.423859-5-aford173@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200630143011.423859-1-aford173@gmail.com> References: <20200630143011.423859-1-aford173@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean The PFC tables for the R8A774A1 are already available, but they not enabled. This patch adds the Kconfig option and builds the corresponding file when PINCTRL_PFC_R8A774A1 is enabled. Signed-off-by: Adam Ford --- V3: Reorder references to R8A774A1 to more closely match Linux's order V2: Use tables already build into pfc-r8a7796 instead of creating a new file Fix pfc references so the pinmuxer acutally gets loaded diff --git a/drivers/pinctrl/renesas/Kconfig b/drivers/pinctrl/renesas/Kconfig index 4d3d68d307..8327bcabd6 100644 --- a/drivers/pinctrl/renesas/Kconfig +++ b/drivers/pinctrl/renesas/Kconfig @@ -77,6 +77,16 @@ config PINCTRL_PFC_R8A7796 the GPIO definitions and pin control functions for each available multiplex function. +config PINCTRL_PFC_R8A774A1 + bool "Renesas RCar Gen3 R8A774A1 pin control driver" + depends on PINCTRL_PFC + help + Support pin multiplexing control on Renesas RZG2M R8A774A1 SoCs. + + The driver is controlled by a device tree node which contains both + the GPIO definitions and pin control functions for each available + multiplex function. + config PINCTRL_PFC_R8A77965 bool "Renesas RCar Gen3 R8A77965 pin control driver" depends on PINCTRL_PFC diff --git a/drivers/pinctrl/renesas/Makefile b/drivers/pinctrl/renesas/Makefile index a92f787a89..a4eb912d54 100644 --- a/drivers/pinctrl/renesas/Makefile +++ b/drivers/pinctrl/renesas/Makefile @@ -1,4 +1,5 @@ obj-$(CONFIG_PINCTRL_PFC) += pfc.o +obj-$(CONFIG_PINCTRL_PFC_R8A774A1) += pfc-r8a7796.o obj-$(CONFIG_PINCTRL_PFC_R8A7790) += pfc-r8a7790.o obj-$(CONFIG_PINCTRL_PFC_R8A7791) += pfc-r8a7791.o obj-$(CONFIG_PINCTRL_PFC_R8A7792) += pfc-r8a7792.o diff --git a/drivers/pinctrl/renesas/pfc.c b/drivers/pinctrl/renesas/pfc.c index 1179afd2e7..7ba7849593 100644 --- a/drivers/pinctrl/renesas/pfc.c +++ b/drivers/pinctrl/renesas/pfc.c @@ -32,6 +32,7 @@ enum sh_pfc_model { SH_PFC_R8A7794, SH_PFC_R8A7795, SH_PFC_R8A7796, + SH_PFC_R8A774A1, SH_PFC_R8A77965, SH_PFC_R8A77970, SH_PFC_R8A77980, @@ -853,6 +854,10 @@ static int sh_pfc_pinctrl_probe(struct udevice *dev) if (model == SH_PFC_R8A7796) priv->pfc.info = &r8a7796_pinmux_info; #endif +#ifdef CONFIG_PINCTRL_PFC_R8A774A1 + if (model == SH_PFC_R8A774A1) + priv->pfc.info = &r8a774a1_pinmux_info; +#endif #ifdef CONFIG_PINCTRL_PFC_R8A77965 if (model == SH_PFC_R8A77965) priv->pfc.info = &r8a77965_pinmux_info; @@ -924,6 +929,12 @@ static const struct udevice_id sh_pfc_pinctrl_ids[] = { .data = SH_PFC_R8A7796, }, #endif +#ifdef CONFIG_PINCTRL_PFC_R8A774A1 + { + .compatible = "renesas,pfc-r8a774a1", + .data = SH_PFC_R8A774A1, + }, +#endif #ifdef CONFIG_PINCTRL_PFC_R8A77965 { .compatible = "renesas,pfc-r8a77965", diff --git a/drivers/pinctrl/renesas/sh_pfc.h b/drivers/pinctrl/renesas/sh_pfc.h index db3d513358..81c0179948 100644 --- a/drivers/pinctrl/renesas/sh_pfc.h +++ b/drivers/pinctrl/renesas/sh_pfc.h @@ -293,6 +293,7 @@ const struct pinmux_bias_reg * sh_pfc_pin_to_bias_reg(const struct sh_pfc *pfc, unsigned int pin, unsigned int *bit); +extern const struct sh_pfc_soc_info r8a774a1_pinmux_info; extern const struct sh_pfc_soc_info r8a7790_pinmux_info; extern const struct sh_pfc_soc_info r8a7791_pinmux_info; extern const struct sh_pfc_soc_info r8a7792_pinmux_info;