From patchwork Sat Mar 4 21:23:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 9604259 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 A99D4601D2 for ; Sat, 4 Mar 2017 21:24:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9BEFE28159 for ; Sat, 4 Mar 2017 21:24:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 90BF428394; Sat, 4 Mar 2017 21:24:37 +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=-1.9 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3B49028159 for ; Sat, 4 Mar 2017 21:24:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=p9VGSghc4F1WqU2bp5lpCojy7JK1ehJ3XcJNJvLKd5M=; b=DMXxidWFPAXX7wHa4bH+KpWK5B niyOY/4A2puyyhAKQy6CZVAv7YFDkqAwKoVvZRozew+G2tF80yPJLgSGMUfyi6zN7t6BStAyq93IP emv7IlfijC0jr/l7keyfOOF3p5lFMPU4YS/0AWxz6su47haXB8pMR69Id8lVgWxrLKcY2Z2lEz4YU bEGwSF8KMpcwcCnwU9njcM3ALgPLf44ZjzQOThLzoBFI5HOI0qpcO+bWj27aQuAhTsip5GJ7amjiA p5UwIk9i0djn2oDFsj/hqxE2DGTJaaLJtIaTSQLkaEuqQ8KB2teAv5sJw1a+Yqg0guta5BBMfN5jU fVnvJmfQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1ckHAD-0003mx-H8; Sat, 04 Mar 2017 21:24:29 +0000 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1ckH9i-0003ZW-Qv; Sat, 04 Mar 2017 21:24:02 +0000 Received: by mail-wm0-x243.google.com with SMTP id z63so5901638wmg.2; Sat, 04 Mar 2017 13:23:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=JHy7qKPCuyo/FCMFECPUpMrJBLkqn6JIEv4ZDNDMGjU=; b=bZEgDNAWhBabi/AtpAEApEy5UCPoMUN/o3ZcdA/TZ2ZC7iB18Jb7Rg1YupK/fFmO5Z o2Dr4J2YMiVJP8+UTZdSPXE1sOHWfhPQ4b12UFKAmofASMsn+onSCfiK8igx80juveEm E0dbXMgMhh0AMhxtZ2KsqfUVWruopvYjspF+08I7qUj74XfOzD5bPjw/677eTBu9tMd8 tt8cqv15x8/fNJUppc3qLCzd5Z4YUwsjdkZhb87rfa+YUO68BHQmVIkeXO/vjgxafD+J R7nEQ4QegQfwIxiG/fwPuwNrRih0NNYTcHpUfXhmbUQmaWdWG1ME3CXCPtbV0uy+i8PR XgKw== 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; bh=JHy7qKPCuyo/FCMFECPUpMrJBLkqn6JIEv4ZDNDMGjU=; b=Gs+LlPAXipkkRMMFbpGaI00lQvOj6+eLSvoZKgmYYozrJEsg9ikD8zVjlwgyb7rb9x OB6QinzcLanVjREQzCdRr6+q/rmh/IYXbBrnfJMLp5gLu51dpB1YCE53H6ccZpFx+C5o zcAcxtKhx2b+/Q82G2cxOtHLgVKt+1MqB4S4MMERR6UDzVPpZsEoKkMqnI9Sen0m/YM2 EUl9sWUEYCe2cIZ4Ig+I943LZKf8It96aibitWm9aDfcdbuK28t+9Go01XgjtbhqIwB2 6cULeLvxQ6ZNbgkbKvgCWmbulGAz7/dqruIJ2CZeqYtijtwLdr9S1TTF+aI20UZxE7oY QTlA== X-Gm-Message-State: AMke39nCBr5XnM3gYgVadrv3EnAWVYJ/E50pR/xcZpndVyZ8P2V2NdZNjk1jaYKu3Axcrw== X-Received: by 10.28.211.200 with SMTP id k191mr7314030wmg.137.1488662616732; Sat, 04 Mar 2017 13:23:36 -0800 (PST) Received: from blackbox.darklights.net (p200300DCD3D1DA0468C08A6D1835A6BF.dip0.t-ipconnect.de. [2003:dc:d3d1:da04:68c0:8a6d:1835:a6bf]) by smtp.googlemail.com with ESMTPSA id p12sm20753184wrb.46.2017.03.04.13.23.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 04 Mar 2017 13:23:35 -0800 (PST) From: Martin Blumenstingl To: linux-amlogic@lists.infradead.org, linux-gpio@vger.kernel.org, linus.walleij@linaro.org, khilman@baylibre.com, carlo@caione.org Subject: [PATCH 1/2] pinctrl: meson: gxl: add the missing PWM pin definitions Date: Sat, 4 Mar 2017 22:23:17 +0100 Message-Id: <20170304212318.27076-2-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170304212318.27076-1-martin.blumenstingl@googlemail.com> References: <20170304212318.27076-1-martin.blumenstingl@googlemail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170304_132359_029081_8BE3D781 X-CRM114-Status: UNSURE ( 9.35 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, Martin Blumenstingl , catalin.marinas@arm.com, will.deacon@arm.com, robh+dt@kernel.org, linux-arm-kernel@lists.infradead.org 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 This adds support for the missing PWM pins on Meson GXL SoCs, namely: - PWM_A - PWM_B - PWM_C - PWM_F (GPIOX_7 and GPIOCLK_1 can be selected as output) - PWM_AO_A (GPIOAO_3 and GPIOAO_8 can be selected as output) Signed-off-by: Martin Blumenstingl --- drivers/pinctrl/meson/pinctrl-meson-gxl.c | 64 +++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/drivers/pinctrl/meson/pinctrl-meson-gxl.c b/drivers/pinctrl/meson/pinctrl-meson-gxl.c index 4ab94a85e306..91dfc498780b 100644 --- a/drivers/pinctrl/meson/pinctrl-meson-gxl.c +++ b/drivers/pinctrl/meson/pinctrl-meson-gxl.c @@ -195,8 +195,19 @@ 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_pins[] = { PIN(GPIOX_6, EE_OFF) }; + +static const unsigned int pwm_b_pins[] = { PIN(GPIODV_29, EE_OFF) }; + +static const unsigned int pwm_c_pins[] = { PIN(GPIOZ_15, EE_OFF) }; + +static const unsigned int pwm_d_pins[] = { PIN(GPIODV_28, EE_OFF) }; + static const unsigned int pwm_e_pins[] = { PIN(GPIOX_16, EE_OFF) }; +static const unsigned int pwm_f_clk_pins[] = { PIN(GPIOCLK_1, EE_OFF) }; +static const unsigned int pwm_f_x_pins[] = { PIN(GPIOX_7, EE_OFF) }; + static const unsigned int hdmi_hpd_pins[] = { PIN(GPIOH_0, EE_OFF) }; static const unsigned int hdmi_sda_pins[] = { PIN(GPIOH_1, EE_OFF) }; static const unsigned int hdmi_scl_pins[] = { PIN(GPIOH_2, EE_OFF) }; @@ -225,6 +236,9 @@ static const unsigned int uart_rts_ao_b_pins[] = { PIN(GPIOAO_3, 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_8_pins[] = { PIN(GPIOAO_8, 0) }; + static const unsigned int pwm_ao_b_pins[] = { PIN(GPIOAO_9, 0) }; static struct meson_pmx_group meson_gxl_periphs_groups[] = { @@ -350,7 +364,9 @@ static struct meson_pmx_group meson_gxl_periphs_groups[] = { GROUP(uart_rts_a, 5, 16), GROUP(uart_tx_c, 5, 13), GROUP(uart_rx_c, 5, 12), + GROUP(pwm_a, 5, 25), GROUP(pwm_e, 5, 15), + GROUP(pwm_f_x, 5, 14), /* Bank Z */ GROUP(eth_mdio, 4, 22), @@ -367,6 +383,7 @@ static struct meson_pmx_group meson_gxl_periphs_groups[] = { GROUP(eth_txd1, 4, 12), GROUP(eth_txd2, 4, 11), GROUP(eth_txd3, 4, 10), + GROUP(pwm_c, 3, 20), /* Bank H */ GROUP(hdmi_hpd, 6, 31), @@ -382,6 +399,8 @@ static struct meson_pmx_group meson_gxl_periphs_groups[] = { GROUP(i2c_sda_b, 1, 12), GROUP(i2c_sck_c, 1, 11), GROUP(i2c_sda_c, 1, 10), + GROUP(pwm_b, 2, 11), + GROUP(pwm_d, 2, 12), /* Bank BOOT */ GROUP(emmc_nand_d07, 7, 31), @@ -404,6 +423,9 @@ static struct meson_pmx_group meson_gxl_periphs_groups[] = { GROUP(sdcard_d2, 6, 0), GROUP(sdcard_cmd, 6, 2), GROUP(sdcard_clk, 6, 3), + + /* Bank CLK */ + GROUP(pwm_f_clk, 8, 30), }; static struct meson_pmx_group meson_gxl_aobus_groups[] = { @@ -428,6 +450,8 @@ static struct meson_pmx_group meson_gxl_aobus_groups[] = { GROUP(uart_cts_ao_b, 0, 8), GROUP(uart_rts_ao_b, 0, 7), GROUP(remote_input_ao, 0, 0), + GROUP(pwm_ao_a_3, 0, 22), + GROUP(pwm_ao_a_8, 0, 17), GROUP(pwm_ao_b, 0, 3), }; @@ -513,10 +537,34 @@ static const char * const eth_groups[] = { "eth_txd0", "eth_txd1", "eth_txd2", "eth_txd3", }; +static const char * const pwm_a_groups[] = { + "pwm_a", +}; + +static const char * const pwm_b_groups[] = { + "pwm_b", +}; + +static const char * const pwm_c_groups[] = { + "pwm_c", +}; + +static const char * const pwm_d_groups[] = { + "pwm_d", +}; + static const char * const pwm_e_groups[] = { "pwm_e", }; +static const char * const pwm_f_clk_groups[] = { + "pwm_f_clk", +}; + +static const char * const pwm_f_x_groups[] = { + "pwm_f_x", +}; + static const char * const hdmi_hpd_groups[] = { "hdmi_hpd", }; @@ -542,6 +590,14 @@ 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_8_groups[] = { + "pwm_ao_a_8", +}; + static const char * const pwm_ao_b_groups[] = { "pwm_ao_b", }; @@ -559,7 +615,13 @@ static struct meson_pmx_func meson_gxl_periphs_functions[] = { FUNCTION(i2c_b), FUNCTION(i2c_c), FUNCTION(eth), + FUNCTION(pwm_a), + FUNCTION(pwm_b), + FUNCTION(pwm_c), + FUNCTION(pwm_d), FUNCTION(pwm_e), + FUNCTION(pwm_f_clk), + FUNCTION(pwm_f_x), FUNCTION(hdmi_hpd), FUNCTION(hdmi_i2c), }; @@ -569,6 +631,8 @@ static struct meson_pmx_func meson_gxl_aobus_functions[] = { FUNCTION(uart_ao), FUNCTION(uart_ao_b), FUNCTION(remote_input_ao), + FUNCTION(pwm_ao_a_3), + FUNCTION(pwm_ao_a_8), FUNCTION(pwm_ao_b), };