From patchwork Tue Jan 17 12:05:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 9520563 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 7D71E60442 for ; Tue, 17 Jan 2017 12:06:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8340728491 for ; Tue, 17 Jan 2017 12:06:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 77BF628515; Tue, 17 Jan 2017 12:06:29 +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=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 730B5284F7 for ; Tue, 17 Jan 2017 12:06:25 +0000 (UTC) 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 1cTSWo-00082d-TN; Tue, 17 Jan 2017 12:06:18 +0000 Received: from mail-wm0-x236.google.com ([2a00:1450:400c:c09::236]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cTSWc-0007k2-4c for linux-amlogic@lists.infradead.org; Tue, 17 Jan 2017 12:06:08 +0000 Received: by mail-wm0-x236.google.com with SMTP id c85so197056466wmi.1 for ; Tue, 17 Jan 2017 04:05:45 -0800 (PST) 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=kWS8A70bdLMbLCSiUmljRULYKAf37sAwaC0/kTACoJs=; b=Nd0GDGmQ6D8JROxx0H4Q7kabv6gclAYEKuVOioErfE2MZsW8mhMvrV9hyuSzozEuFL CRYQiudd1virmq5lFVIB4FLGDio+qca1/ud13uGpa1DNK01swvNWp1NbdQovK2AoxCEW xI+s0Jsg4Q1O9OiZUHAwZ979SFn/UddeoEGoiAvsC5nIgDSCxuWRtoJtwJy8kpWlv7SO hD0sRUNdkanU7HZlbsnUKwETIj6cur1WjnZQEZmGjs/f9JOwfkJmLoL670pEIDCWyZXR w/Laqsdw4fh1RKIy8zECUUm1zH9tHPboWU08I98kA8domYP2stfF36/Kk42ibXmuzBCh yz/g== 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=kWS8A70bdLMbLCSiUmljRULYKAf37sAwaC0/kTACoJs=; b=IkUiXUT7BHCqEv9VgBZuP2ybewn9mSqhrBzBZ1ljZEFWsjdaPiz4y6ZiGJs3+oaLgQ ZvMd1W78H4sqBqWPb0zbDw9MhcJ9Bb22edN3UUCzIVgvHTMyChsMwel8mFuGVGf7lctm ovsYnSaoalmitrIupgLA9TdxFTwuIQdy/8BX8TEEJTA/cUZZCjglJx3CWyc4dLQtqDOQ OGj/ODXqhuNijyOOyDCuVQVJeRwpjkbsZ4duOxCD3RArdraFSIR+XUmx1pzmZxgYvHqj zqxCbNBE37c5IvMfCrEP2qJhVGAuSwrEmyOsVkEE3usi6MFPJNkGAXdRtPKwvYpqtYTR NhSQ== X-Gm-Message-State: AIkVDXIY/LAo6osuU7RoJ535tCuKKhMpYIzBfEZLrjUIoktCSzy0JFyvDAhO0MTkySOqMrrl X-Received: by 10.223.154.132 with SMTP id a4mr31262702wrc.188.1484654744276; Tue, 17 Jan 2017 04:05:44 -0800 (PST) Received: from localhost.localdomain (home.amouriers.starnux.net. [82.228.250.61]) by smtp.gmail.com with ESMTPSA id y97sm36559637wmh.24.2017.01.17.04.05.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 17 Jan 2017 04:05:43 -0800 (PST) From: Neil Armstrong To: khilman@baylibre.com, carlo@caione.org, linus.walleij@linaro.org Subject: [PATCH 1/2] pinctrl: meson: Add HDMI HPD/DDC pins functions Date: Tue, 17 Jan 2017 13:05:37 +0100 Message-Id: <1484654738-5496-2-git-send-email-narmstrong@baylibre.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1484654738-5496-1-git-send-email-narmstrong@baylibre.com> References: <1484654738-5496-1-git-send-email-narmstrong@baylibre.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170117_040606_334589_C56447B9 X-CRM114-Status: UNSURE ( 9.55 ) 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: devicetree@vger.kernel.org, Neil Armstrong , linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-amlogic@lists.infradead.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 Add pinctrl functions for HDMI HPD pin and DDC pins on Amlogic Meson GXL and GXBB SoCs. Signed-off-by: Neil Armstrong --- drivers/pinctrl/meson/pinctrl-meson-gxbb.c | 19 +++++++++++++++++++ drivers/pinctrl/meson/pinctrl-meson-gxl.c | 19 +++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/drivers/pinctrl/meson/pinctrl-meson-gxbb.c b/drivers/pinctrl/meson/pinctrl-meson-gxbb.c index c3928aa..0d9ad36 100644 --- a/drivers/pinctrl/meson/pinctrl-meson-gxbb.c +++ b/drivers/pinctrl/meson/pinctrl-meson-gxbb.c @@ -232,6 +232,10 @@ 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 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) }; + static const struct pinctrl_pin_desc meson_gxbb_aobus_pins[] = { MESON_PIN(GPIOAO_0, 0), MESON_PIN(GPIOAO_1, 0), @@ -440,6 +444,11 @@ GROUP(eth_txd2, 6, 3), GROUP(eth_txd3, 6, 2), + /* Bank H */ + GROUP(hdmi_hpd, 1, 26), + GROUP(hdmi_sda, 1, 25), + GROUP(hdmi_scl, 1, 24), + /* Bank DV */ GROUP(uart_tx_b, 2, 29), GROUP(uart_rx_b, 2, 28), @@ -636,6 +645,14 @@ "pwm_f_y", }; +static const char * const hdmi_hpd_groups[] = { + "hdmi_hpd", +}; + +static const char * const hdmi_i2c_groups[] = { + "hdmi_sda", "hdmi_scl", +}; + 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", @@ -699,6 +716,8 @@ FUNCTION(pwm_e), FUNCTION(pwm_f_x), FUNCTION(pwm_f_y), + FUNCTION(hdmi_hpd), + FUNCTION(hdmi_i2c), }; static struct meson_pmx_func meson_gxbb_aobus_functions[] = { diff --git a/drivers/pinctrl/meson/pinctrl-meson-gxl.c b/drivers/pinctrl/meson/pinctrl-meson-gxl.c index 25694f7..7703a46 100644 --- a/drivers/pinctrl/meson/pinctrl-meson-gxl.c +++ b/drivers/pinctrl/meson/pinctrl-meson-gxl.c @@ -197,6 +197,10 @@ static const unsigned int pwm_e_pins[] = { PIN(GPIOX_16, 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) }; + static const struct pinctrl_pin_desc meson_gxl_aobus_pins[] = { MESON_PIN(GPIOAO_0, 0), MESON_PIN(GPIOAO_1, 0), @@ -363,6 +367,11 @@ GROUP(eth_txd2, 4, 11), GROUP(eth_txd3, 4, 10), + /* Bank H */ + GROUP(hdmi_hpd, 6, 31), + GROUP(hdmi_sda, 6, 30), + GROUP(hdmi_scl, 6, 29), + /* Bank DV */ GROUP(uart_tx_b, 2, 16), GROUP(uart_rx_b, 2, 15), @@ -506,6 +515,14 @@ "pwm_e", }; +static const char * const hdmi_hpd_groups[] = { + "hdmi_hpd", +}; + +static const char * const hdmi_i2c_groups[] = { + "hdmi_sda", "hdmi_scl", +}; + 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", @@ -537,6 +554,8 @@ FUNCTION(i2c_c), FUNCTION(eth), FUNCTION(pwm_e), + FUNCTION(hdmi_hpd), + FUNCTION(hdmi_i2c), }; static struct meson_pmx_func meson_gxl_aobus_functions[] = {