From patchwork Wed Jul 4 16:57:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 939475 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-gpio-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="fCaGOPFj"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 41LRxS0lZVz9s1B for ; Thu, 5 Jul 2018 02:57:32 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752533AbeGDQ5b (ORCPT ); Wed, 4 Jul 2018 12:57:31 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:38918 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752277AbeGDQ5a (ORCPT ); Wed, 4 Jul 2018 12:57:30 -0400 Received: by mail-wm0-f67.google.com with SMTP id p11-v6so6817583wmc.4 for ; Wed, 04 Jul 2018 09:57:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=FdWw7I7qUXkkSwxpjKRH75348Fh8svvw5X5RxcvAGAU=; b=fCaGOPFjdxuN6tA6GMwS+L4CjVIxx8zryhpSzMz/NNfMHgM6Chu6hJ4Qvjd3CXwL68 T8IOAS9oyz7H+qUDa/P7VcYIHp+59rWWpkPu+GJ2JBQ9zKj34J9u9xZC1B410y8rRIvH l9uiEiejk8LJc8GI9G9i9PKinvcUIdchs6o2IQHchOs49A6c6SGocP5qvpQLKSibf5Kr Qq5v8rL1rbWVdxuHVzjpbcS6wZJAhhtN515AGWFv4fFYu+v6fgXJDNM9uFzTUa5CVL6i OrBeKieytPzdUNNa+NtEH84BKp/TJFpe8STqVjCEYW1vgGj0EiHu7IpLzcFYxeJhwP/P h57g== 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; bh=FdWw7I7qUXkkSwxpjKRH75348Fh8svvw5X5RxcvAGAU=; b=ilJy0onKUi/M9Jjl21ChULLIO6hvIGpEiycqS32XQTff1/OgpXTZLu1nA7xyCZ0lso FYJ2tKL82vwQKDikeQMIy3SjoFYM7a3z4DRzIdee28r2/ws2iULW8+IokiQAQyHVN1ZU VSobzCqB7En8HLUkRYzUi63b/Pkp/ln4mgN5y6jOQRw0GlHVbYIAfyNBwL1NNUmxAoGd DWsD5zsnkDeYIq5NUjACQWgLabdQqMxBKILJJv0lpmJ+q12fQ2vskDPRibhmrjCDZO1/ 9gzfaa+SG3sJlj54GeiYxg7yaR/n/71smkdhSH/1IqJpqGIWaavbrpWTTijgTlKEi6TC nvBA== X-Gm-Message-State: APt69E2l5uJvRzMOmUiYDz7GFuq1gwgQ9/OT/r5YjfGhqWwP7a7kwjU6 oo5uHEhH2liow/ehvPqMW2qF9Q== X-Google-Smtp-Source: AAOMgpcfpzNph3ncaT/89QOWWyqYe7/rg/00iIUsOEeOLoWZHzVNaCsyY/jXDU3/hFnKpdh+eJNElA== X-Received: by 2002:a1c:9ec5:: with SMTP id h188-v6mr2225418wme.76.1530723449209; Wed, 04 Jul 2018 09:57:29 -0700 (PDT) Received: from boomer.baylibre.local ([90.63.244.31]) by smtp.googlemail.com with ESMTPSA id n16-v6sm6995655wrg.58.2018.07.04.09.57.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 04 Jul 2018 09:57:28 -0700 (PDT) From: Jerome Brunet To: Linus Walleij , Carlo Caione , Kevin Hilman Cc: Jerome Brunet , linux-gpio@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] pinctrl: meson: add gen_clk pins Date: Wed, 4 Jul 2018 18:57:24 +0200 Message-Id: <20180704165724.3387-1-jbrunet@baylibre.com> X-Mailer: git-send-email 2.14.4 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Add the pinctrl configuration for gen_clk on gxbb and axg. gen_clk allows to output and devide several internal clocks of SoC, including most of the plls. Signed-off-by: Jerome Brunet --- drivers/pinctrl/meson/pinctrl-meson-axg.c | 9 +++++++++ drivers/pinctrl/meson/pinctrl-meson-gxbb.c | 8 ++++++++ 2 files changed, 17 insertions(+) diff --git a/drivers/pinctrl/meson/pinctrl-meson-axg.c b/drivers/pinctrl/meson/pinctrl-meson-axg.c index 46a0918bd284..ad502eda4afa 100644 --- a/drivers/pinctrl/meson/pinctrl-meson-axg.c +++ b/drivers/pinctrl/meson/pinctrl-meson-axg.c @@ -672,6 +672,9 @@ static const unsigned int jtag_ao_tdo_pins[] = {GPIOAO_4}; static const unsigned int jtag_ao_clk_pins[] = {GPIOAO_5}; static const unsigned int jtag_ao_tms_pins[] = {GPIOAO_7}; +/* gen_clk */ +static const unsigned int gen_clk_ee_pins[] = {GPIOAO_13}; + static struct meson_pmx_group meson_axg_aobus_groups[] = { GPIO_GROUP(GPIOAO_0), GPIO_GROUP(GPIOAO_1), @@ -718,6 +721,7 @@ static struct meson_pmx_group meson_axg_aobus_groups[] = { GROUP(jtag_ao_tdo, 4), GROUP(jtag_ao_clk, 4), GROUP(jtag_ao_tms, 4), + GROUP(gen_clk_ee, 4), }; static const char * const gpio_periphs_groups[] = { @@ -947,6 +951,10 @@ static const char * const tdmb_groups[] = { "tdmb_din2", "tdmb_dout2", "tdmb_din3", "tdmb_dout3", }; +static const char * const gen_clk_ee_groups[] = { + "gen_clk_ee", +}; + static struct meson_pmx_func meson_axg_periphs_functions[] = { FUNCTION(gpio_periphs), FUNCTION(emmc), @@ -992,6 +1000,7 @@ static struct meson_pmx_func meson_axg_aobus_functions[] = { FUNCTION(pwm_ao_c), FUNCTION(pwm_ao_d), FUNCTION(jtag_ao), + FUNCTION(gen_clk_ee), }; static struct meson_bank meson_axg_periphs_banks[] = { diff --git a/drivers/pinctrl/meson/pinctrl-meson-gxbb.c b/drivers/pinctrl/meson/pinctrl-meson-gxbb.c index 2c97a2e07a5f..4ceb06f8a33c 100644 --- a/drivers/pinctrl/meson/pinctrl-meson-gxbb.c +++ b/drivers/pinctrl/meson/pinctrl-meson-gxbb.c @@ -243,6 +243,8 @@ static const unsigned int i2s_out_ch67_y_pins[] = { GPIOY_10 }; static const unsigned int spdif_out_y_pins[] = { GPIOY_12 }; +static const unsigned int gen_clk_out_pins[] = { GPIOY_15 }; + static const struct pinctrl_pin_desc meson_gxbb_aobus_pins[] = { MESON_PIN(GPIOAO_0), MESON_PIN(GPIOAO_1), @@ -453,6 +455,7 @@ static struct meson_pmx_group meson_gxbb_periphs_groups[] = { GROUP(i2s_out_ch45_y, 1, 6), GROUP(i2s_out_ch67_y, 1, 7), GROUP(spdif_out_y, 1, 9), + GROUP(gen_clk_out, 6, 15), /* Bank Z */ GROUP(eth_mdio, 6, 1), @@ -706,6 +709,10 @@ static const char * const spdif_out_groups[] = { "spdif_out_y", }; +static const char * const gen_clk_out_groups[] = { + "gen_clk_out", +}; + static const char * const gpio_aobus_groups[] = { "GPIOAO_0", "GPIOAO_1", "GPIOAO_2", "GPIOAO_3", "GPIOAO_4", "GPIOAO_5", "GPIOAO_6", "GPIOAO_7", "GPIOAO_8", "GPIOAO_9", @@ -790,6 +797,7 @@ static struct meson_pmx_func meson_gxbb_periphs_functions[] = { FUNCTION(hdmi_i2c), FUNCTION(i2s_out), FUNCTION(spdif_out), + FUNCTION(gen_clk_out), }; static struct meson_pmx_func meson_gxbb_aobus_functions[] = {