From patchwork Mon Aug 22 14:40:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 9293633 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 14913608A7 for ; Mon, 22 Aug 2016 14:41:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 02A5F2895B for ; Mon, 22 Aug 2016 14:41:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EB673289A1; Mon, 22 Aug 2016 14:41:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 65DF628970 for ; Mon, 22 Aug 2016 14:41:49 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bbqQ2-0002vr-9W; Mon, 22 Aug 2016 14:41:42 +0000 Received: from mail-wm0-x235.google.com ([2a00:1450:400c:c09::235]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bbqPn-0002kM-Nq for linux-amlogic@lists.infradead.org; Mon, 22 Aug 2016 14:41:30 +0000 Received: by mail-wm0-x235.google.com with SMTP id o80so148049042wme.1 for ; Mon, 22 Aug 2016 07:41:07 -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:in-reply-to:references; bh=A75OMFJFw7xiEbwYifLNt4PKpzSY5nyEdKyIhglb5Yk=; b=YTDdyiA793VE/HveCBlcP2xlutT/naV0GwNZYqzNImCP1rCnb90xCYUHX38X6xfz8j eANLEK+SCFqPn6f3sGoM0IzUBuixkcMkQaBAY7uEAG8Kwii6U557UoCLOV7sT7X2Q3Y8 U5xBTkOdUQxGXppnmj/BA1SJVQtESsVY/Lyvrjg19mHWCOT5Zs3IqwXNzDLM8j55WMpn 54meGeMxv/jAJcKivutwXCUKGPw+T0gGpM2aeqI/Ba8y+oPtbOczA8JbI26iPZLN7tee JGdG+g3OfcXAB9Ns8L9rMRKqm3/CwJBq+nh0fnP6E92zhmde1m12BK6EJPOtfTOQUhl6 iHaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=A75OMFJFw7xiEbwYifLNt4PKpzSY5nyEdKyIhglb5Yk=; b=mXwXlrPkD6XEa+sGdWn718pStOHUWNPL+JdLoznW6U5B2exJ9Sd9YeZQS9PX8eCN5y LoT4H5MW9VO8gQkLP3yEdRANTXfuMRreWgJelx0ODPs21QmIkUV3jBT3XVTAtzgTgXyZ oVPBRwYxnvLmo6IT0sdoATDLu07xgC+XEg9ke3T3OGQ9fU/mSUJ+Ds3pBN4T+S0cbb0F WJkLyMQsFyeyNJOi3ziA79kbPVLVsa3vaf5ZeKoZUTLTVa+pJB9TA99rbtIx7vGi3i7I PIL07LgLffyVgEj8I2P3VdQqzFtG0jFK4fRxVomP5FWMZ5ugio1FtB4mA0oqKa3mSiyW Tpgw== X-Gm-Message-State: AEkoouvzXB6mjgICxLf50C0isqkROEScBgXmlF9tzprDuhPVDeoK3DUVrMvDnVdJZk8yTuBv X-Received: by 10.28.32.77 with SMTP id g74mr14924457wmg.45.1471876866186; Mon, 22 Aug 2016 07:41:06 -0700 (PDT) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id w129sm21835255wmd.9.2016.08.22.07.41.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 22 Aug 2016 07:41:05 -0700 (PDT) From: Neil Armstrong To: linus.walleij@linaro.org, khilman@baylibre.com, carlo@caione.org Subject: [RESEND PATCH 1/2] pinctrl: meson-gxbb: add pins for PWM Date: Mon, 22 Aug 2016 16:40:59 +0200 Message-Id: <1471876860-5620-2-git-send-email-narmstrong@baylibre.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1471876860-5620-1-git-send-email-narmstrong@baylibre.com> References: <1471876860-5620-1-git-send-email-narmstrong@baylibre.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160822_074128_087326_A4A05B1A X-CRM114-Status: UNSURE ( 9.49 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-amlogic@lists.infradead.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Neil Armstrong MIME-Version: 1.0 Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Add support for PWM pins, for EE and AO domains. Signed-off-by: Neil Armstrong --- drivers/pinctrl/meson/pinctrl-meson-gxbb.c | 78 ++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) diff --git a/drivers/pinctrl/meson/pinctrl-meson-gxbb.c b/drivers/pinctrl/meson/pinctrl-meson-gxbb.c index 7eeb053..1c6ffb3 100644 --- a/drivers/pinctrl/meson/pinctrl-meson-gxbb.c +++ b/drivers/pinctrl/meson/pinctrl-meson-gxbb.c @@ -193,6 +193,14 @@ static const unsigned int eth_txd1_pins[] = { PIN(GPIOZ_11, EE_OFF) }; static const unsigned int eth_txd2_pins[] = { PIN(GPIOZ_12, EE_OFF) }; static const unsigned int eth_txd3_pins[] = { PIN(GPIOZ_13, EE_OFF) }; +static const unsigned int pwm_a_x_pins[] = { PIN(GPIOX_6, EE_OFF) }; +static const unsigned int pwm_a_y_pins[] = { PIN(GPIOY_16, EE_OFF) }; +static const unsigned int pwm_b_pins[] = { PIN(GPIODV_29, EE_OFF) }; +static const unsigned int pwm_d_pins[] = { PIN(GPIODV_28, EE_OFF) }; +static const unsigned int pwm_e_pins[] = { PIN(GPIOX_19, EE_OFF) }; +static const unsigned int pwm_f_x_pins[] = { PIN(GPIOX_7, EE_OFF) }; +static const unsigned int pwm_f_y_pins[] = { PIN(GPIOY_15, EE_OFF) }; + static const struct pinctrl_pin_desc meson_gxbb_aobus_pins[] = { MESON_PIN(GPIOAO_0, 0), MESON_PIN(GPIOAO_1, 0), @@ -227,6 +235,11 @@ static const unsigned int i2c_slave_sda_ao_pins[] = {PIN(GPIOAO_5, 0) }; static const unsigned int remote_input_ao_pins[] = {PIN(GPIOAO_7, 0) }; +static const unsigned int pwm_ao_a_3_pins[] = { PIN(GPIOAO_3, 0) }; +static const unsigned int pwm_ao_a_6_pins[] = { PIN(GPIOAO_6, 0) }; +static const unsigned int pwm_ao_a_12_pins[] = { PIN(GPIOAO_12, 0) }; +static const unsigned int pwm_ao_b_pins[] = { PIN(GPIOAO_13, 0) }; + static struct meson_pmx_group meson_gxbb_periphs_groups[] = { GPIO_GROUP(GPIOZ_0, EE_OFF), GPIO_GROUP(GPIOZ_1, EE_OFF), @@ -361,12 +374,17 @@ static struct meson_pmx_group meson_gxbb_periphs_groups[] = { GROUP(uart_rx_a, 4, 12), GROUP(uart_cts_a, 4, 11), GROUP(uart_rts_a, 4, 10), + GROUP(pwm_a_x, 3, 17), + GROUP(pwm_e, 2, 30), + GROUP(pwm_f_x, 3, 18), /* Bank Y */ GROUP(uart_cts_c, 1, 19), GROUP(uart_rts_c, 1, 18), GROUP(uart_tx_c, 1, 17), GROUP(uart_rx_c, 1, 16), + GROUP(pwm_a_y, 1, 21), + GROUP(pwm_f_y, 1, 20), /* Bank Z */ GROUP(eth_mdio, 6, 1), @@ -389,6 +407,8 @@ static struct meson_pmx_group meson_gxbb_periphs_groups[] = { GROUP(uart_rx_b, 2, 28), GROUP(uart_cts_b, 2, 27), GROUP(uart_rts_b, 2, 26), + GROUP(pwm_b, 3, 21), + GROUP(pwm_d, 3, 20), /* Bank BOOT */ GROUP(emmc_nand_d07, 4, 30), @@ -435,6 +455,10 @@ static struct meson_pmx_group meson_gxbb_aobus_groups[] = { GROUP(i2c_slave_sck_ao, 0, 2), GROUP(i2c_slave_sda_ao, 0, 1), GROUP(remote_input_ao, 0, 0), + GROUP(pwm_ao_a_3, 0, 22), + GROUP(pwm_ao_a_6, 0, 18), + GROUP(pwm_ao_a_12, 0, 17), + GROUP(pwm_ao_b, 0, 3), }; static const char * const gpio_periphs_groups[] = { @@ -502,6 +526,34 @@ static const char * const eth_groups[] = { "eth_txd0", "eth_txd1", "eth_txd2", "eth_txd3", }; +static const char * const pwm_a_x_groups[] = { + "pwm_a_x", +}; + +static const char * const pwm_a_y_groups[] = { + "pwm_a_y", +}; + +static const char * const pwm_b_groups[] = { + "pwm_b", +}; + +static const char * const pwm_d_groups[] = { + "pwm_d", +}; + +static const char * const pwm_e_groups[] = { + "pwm_e", +}; + +static const char * const pwm_f_x_groups[] = { + "pwm_f_x", +}; + +static const char * const pwm_f_y_groups[] = { + "pwm_f_y", +}; + 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", @@ -526,6 +578,21 @@ static const char * const i2c_slave_ao_groups[] = { static const char * const remote_input_ao_groups[] = { "remote_input_ao", + +static const char * const pwm_ao_a_3_groups[] = { + "pwm_ao_a_3", +}; + +static const char * const pwm_ao_a_6_groups[] = { + "pwm_ao_a_6", +}; + +static const char * const pwm_ao_a_12_groups[] = { + "pwm_ao_a_12", +}; + +static const char * const pwm_ao_b_groups[] = { + "pwm_ao_b", }; static struct meson_pmx_func meson_gxbb_periphs_functions[] = { @@ -536,6 +603,13 @@ static struct meson_pmx_func meson_gxbb_periphs_functions[] = { FUNCTION(uart_b), FUNCTION(uart_c), FUNCTION(eth), + FUNCTION(pwm_a_x), + FUNCTION(pwm_a_y), + FUNCTION(pwm_b), + FUNCTION(pwm_d), + FUNCTION(pwm_e), + FUNCTION(pwm_f_x), + FUNCTION(pwm_f_y), }; static struct meson_pmx_func meson_gxbb_aobus_functions[] = { @@ -545,6 +619,10 @@ static struct meson_pmx_func meson_gxbb_aobus_functions[] = { FUNCTION(i2c_ao), FUNCTION(i2c_slave_ao), FUNCTION(remote_input_ao), + FUNCTION(pwm_ao_a_3), + FUNCTION(pwm_ao_a_6), + FUNCTION(pwm_ao_a_12), + FUNCTION(pwm_ao_b), }; static struct meson_bank meson_gxbb_periphs_banks[] = {