From patchwork Sun Jun 5 16:05:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 578924 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E7BD4CCA484 for ; Sun, 5 Jun 2022 16:05:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350260AbiFEQFi (ORCPT ); Sun, 5 Jun 2022 12:05:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46056 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345866AbiFEQFh (ORCPT ); Sun, 5 Jun 2022 12:05:37 -0400 Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E46F2AF3 for ; Sun, 5 Jun 2022 09:05:30 -0700 (PDT) Received: by mail-ej1-x62b.google.com with SMTP id q21so24752537ejm.1 for ; Sun, 05 Jun 2022 09:05:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zzIcXE3hrlfSzs1We8TAtfDispqYzSdvCjnkTOwKg/M=; b=XWi9/ff+noAcuc8PSKXmuOlWiUdYdfKm96qsn11F0ApfYQ9Ds8S6EHLOoM/qqLU4mT P6dXM5lIWz/o0a55hK67LmMovt6j+EzLsBzOSnt1Z23N9TLbWLmt+q08KQ83zdKXA7mN KcM1hGTvPo8g+qyuIjYOTmetE8SCHoMZTkeARx+D+YA8xXu9XBxqm7qDDWQ64iC6RS7D /vG4qbT5j1xKh8jZtUuw61IAUfgZVdTlX3aLQOKp8CM/pri0CaV6lBKe+ETIaJE6VIeC MHa3gaImghonoaetR5tTFV4JY81JU7BsKVhRDO85uJnO3PlzkfxWvM2W0eYh8Up0nBrU kYog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zzIcXE3hrlfSzs1We8TAtfDispqYzSdvCjnkTOwKg/M=; b=oCRjYBshbFwE583ea6t/xUypWzvssRUucYg+ldcM/z2XugPhHBceT/1I/eATzrlwK8 qNctbssZ44A/9mqP+FK31xtGOAaA8fx7VEvyDceViW7XCRSuUePtlm5hUjefRSRyoDwN PGqSJuE6CerUNlP+4fyv63IP2JzURn7zrvWQq64r4ALZ8DsqIJSEa47wRbH/EvUfW8Bg lMspjy/jmdrvEvurIMOkm9R+/FQCEMkrhHGFkN+s1kdh/ICFobKdQlz8BO46GWBgemYW ZuQwiYCC34goTXhmJCoibWQA3QqmBA40uUl07/2N/VkfuK75dyT/pE1xF2SXoGmJeFiM 5sog== X-Gm-Message-State: AOAM530uv4wzSFc5w789/LpC5OwL/cW6D5ihgU+wpyiAft23NDQWQ7pg IyrFumK0W8fqiqzYIcwsRWeRDw== X-Google-Smtp-Source: ABdhPJzXMpq35oPubom+D5ifxokjCpX/CiFBq+bc+YAMRzyf0KnlcP87GvpoFHcvUzb3tYAqgCJkhg== X-Received: by 2002:a17:906:d968:b0:711:6598:b752 with SMTP id rp8-20020a170906d96800b007116598b752mr5312239ejb.83.1654445128935; Sun, 05 Jun 2022 09:05:28 -0700 (PDT) Received: from localhost.localdomain (xdsl-188-155-176-92.adslplus.ch. [188.155.176.92]) by smtp.gmail.com with ESMTPSA id x18-20020a170906805200b0070b7875aa6asm3969963ejw.166.2022.06.05.09.05.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Jun 2022 09:05:28 -0700 (PDT) From: Krzysztof Kozlowski To: Rob Herring , Krzysztof Kozlowski , Alim Akhtar , Tomasz Figa , Sylwester Nawrocki , Linus Walleij , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org Cc: Krzysztof Kozlowski , Chanho Park Subject: [PATCH v3 3/8] ARM: dts: s5pv210: use local header for pinctrl register values Date: Sun, 5 Jun 2022 18:05:03 +0200 Message-Id: <20220605160508.134075-4-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220605160508.134075-1-krzysztof.kozlowski@linaro.org> References: <20220605160508.134075-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org The DTS uses hardware register values directly in pin controller pin configuration. These are not some IDs or other abstraction layer but raw numbers used in the registers. These numbers were previously put in the bindings header to avoid code duplication and to provide some context meaning (name), but they do not fit the purpose of bindings. It is also quite confusing to use constants prefixed with Exynos for other SoC, because there is actually nothing here in common, except the actual value. Store the constants in a header next to DTS and use them instead of bindings. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Chanho Park --- arch/arm/boot/dts/s5pv210-aquila.dts | 4 +- arch/arm/boot/dts/s5pv210-aries.dtsi | 134 +++--- arch/arm/boot/dts/s5pv210-fascinate4g.dts | 22 +- arch/arm/boot/dts/s5pv210-galaxys.dts | 34 +- arch/arm/boot/dts/s5pv210-pinctrl.dtsi | 480 +++++++++++----------- arch/arm/boot/dts/s5pv210-pinctrl.h | 39 ++ 6 files changed, 376 insertions(+), 337 deletions(-) create mode 100644 arch/arm/boot/dts/s5pv210-pinctrl.h diff --git a/arch/arm/boot/dts/s5pv210-aquila.dts b/arch/arm/boot/dts/s5pv210-aquila.dts index bc0b7354b6c0..0f5c6cd0f3a1 100644 --- a/arch/arm/boot/dts/s5pv210-aquila.dts +++ b/arch/arm/boot/dts/s5pv210-aquila.dts @@ -392,7 +392,7 @@ timing0: timing { &pinctrl0 { t_flash_detect: t-flash-detect-pins { samsung,pins = "gph3-4"; - samsung,pin-function = ; - samsung,pin-pud = ; + samsung,pin-function = ; + samsung,pin-pud = ; }; }; diff --git a/arch/arm/boot/dts/s5pv210-aries.dtsi b/arch/arm/boot/dts/s5pv210-aries.dtsi index daa1067055c8..5541df4df628 100644 --- a/arch/arm/boot/dts/s5pv210-aries.dtsi +++ b/arch/arm/boot/dts/s5pv210-aries.dtsi @@ -646,183 +646,183 @@ &mfc { &pinctrl0 { bt_reset: bt-reset-pins { samsung,pins = "gpb-3"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; wlan_bt_en: wlan-bt-en-pins { samsung,pins = "gpb-5"; - samsung,pin-function = ; - samsung,pin-pud = ; + samsung,pin-function = ; + samsung,pin-pud = ; samsung,pin-val = <1>; }; codec_ldo: codec-ldo-pins { samsung,pins = "gpf3-4"; - samsung,pin-function = ; - samsung,pin-pud = ; + samsung,pin-function = ; + samsung,pin-pud = ; }; prox_i2c_pins: gp2a-i2c-pins { samsung,pins = "gpg0-2", "gpg2-2"; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; wlan_gpio_rst: wlan-gpio-rst-pins { samsung,pins = "gpg1-2"; - samsung,pin-function = ; - samsung,pin-pud = ; + samsung,pin-function = ; + samsung,pin-pud = ; }; bt_wake: bt-wake-pins { samsung,pins = "gpg3-4"; - samsung,pin-function = ; - samsung,pin-pud = ; + samsung,pin-function = ; + samsung,pin-pud = ; }; gp2a_irq: gp2a-irq-pins { samsung,pins = "gph0-2"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; pmic_dvs_pins: pmic-dvs-pins { samsung,pins = "gph0-3", "gph0-4", "gph0-5"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; samsung,pin-val = <0>; }; pmic_irq: pmic-irq-pins { samsung,pins = "gph0-7"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; wifi_host_wake: wifi-host-wake-pins { samsung,pins = "gph2-4"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; bt_host_wake: bt-host-wake-pins { samsung,pins = "gph2-5"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; musb_irq: musq-irq-pins { samsung,pins = "gph2-7"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; tf_detect: tf-detect-pins { samsung,pins = "gph3-4"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; wifi_wake: wifi-wake-pins { samsung,pins = "gph3-5"; - samsung,pin-function = ; - samsung,pin-pud = ; + samsung,pin-function = ; + samsung,pin-pud = ; }; magnetometer_i2c_pins: yas529-i2c-pins-pins { samsung,pins = "gpj0-0", "gpj0-1"; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; ts_irq: ts-irq-pins { samsung,pins = "gpj0-5"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; vibrator_ena: vibrator-ena-pins { samsung,pins = "gpj1-1"; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; gp2a_power: gp2a-power-pins { samsung,pins = "gpj1-4"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; touchkey_i2c_pins: touchkey-i2c-pins { samsung,pins = "gpj3-0", "gpj3-1"; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; touchkey_vdd_ena: touchkey-vdd-ena-pins { samsung,pins = "gpj3-2"; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; musb_i2c_pins: musb-i2c-pins { samsung,pins = "gpj3-4", "gpj3-5"; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; accel_i2c_pins: accel-i2c-pins { samsung,pins = "gpj3-6", "gpj3-7"; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; pmic_i2c_pins: pmic-i2c-pins-pins { samsung,pins = "gpj4-0", "gpj4-3"; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; touchkey_irq: touchkey-irq-pins { samsung,pins = "gpj4-1"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; lcd_spi_pins: spi-lcd-pins { samsung,pins = "mp01-1", "mp04-1", "mp04-3"; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; fg_i2c_pins: fg-i2c-pins { samsung,pins = "mp05-0", "mp05-1"; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; sound_i2c_pins: sound-i2c-pins { samsung,pins = "mp05-2", "mp05-3"; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; panel_rst: panel-rst-pins { samsung,pins = "mp05-5"; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; }; diff --git a/arch/arm/boot/dts/s5pv210-fascinate4g.dts b/arch/arm/boot/dts/s5pv210-fascinate4g.dts index dfb2ee65e4a8..eae51b197ee9 100644 --- a/arch/arm/boot/dts/s5pv210-fascinate4g.dts +++ b/arch/arm/boot/dts/s5pv210-fascinate4g.dts @@ -128,33 +128,33 @@ &pinctrl0 { headset_det: headset-det-pins { samsung,pins = "gph0-6", "gph3-6"; - samsung,pin-function = ; - samsung,pin-pud = ; + samsung,pin-function = ; + samsung,pin-pud = ; }; fg_irq: fg-irq-pins { samsung,pins = "gph3-3"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; headset_micbias_ena: headset-micbias-ena-pins { samsung,pins = "gpj2-5"; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; earpath_sel: earpath-sel-pins { samsung,pins = "gpj2-6"; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; main_micbias_ena: main-micbias-ena-pins { samsung,pins = "gpj4-2"; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; /* Based on vendor kernel v2.6.35.7 */ diff --git a/arch/arm/boot/dts/s5pv210-galaxys.dts b/arch/arm/boot/dts/s5pv210-galaxys.dts index a78caaa1f3c5..aaf880792f36 100644 --- a/arch/arm/boot/dts/s5pv210-galaxys.dts +++ b/arch/arm/boot/dts/s5pv210-galaxys.dts @@ -152,47 +152,47 @@ &pinctrl0 { fm_i2c_pins: fm-i2c-pins-pins { samsung,pins = "gpd1-2", "gpd1-3"; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; headset_det: headset-det-pins { samsung,pins = "gph0-6", "gph3-6"; - samsung,pin-function = ; - samsung,pin-pud = ; + samsung,pin-function = ; + samsung,pin-pud = ; }; fm_irq: fm-irq-pins { samsung,pins = "gpj2-4"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; fm_rst: fm-rst-pins { samsung,pins = "gpj2-5"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; earpath_sel: earpath-sel-pins { samsung,pins = "gpj2-6"; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; massmemory_en: massmemory-en-pins { samsung,pins = "gpj2-7"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; micbias_reg_ena: micbias-reg-ena-pins { samsung,pins = "gpj4-2"; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; /* Based on CyanogenMod 3.0.101 kernel */ diff --git a/arch/arm/boot/dts/s5pv210-pinctrl.dtsi b/arch/arm/boot/dts/s5pv210-pinctrl.dtsi index ae34e7e57892..6d6daef9fb7a 100644 --- a/arch/arm/boot/dts/s5pv210-pinctrl.dtsi +++ b/arch/arm/boot/dts/s5pv210-pinctrl.dtsi @@ -16,13 +16,13 @@ * nodes can be added to this file. */ -#include +#include "s5pv210-pinctrl.h" #define PIN_SLP(_pin, _mode, _pull) \ _pin { \ samsung,pins = #_pin; \ - samsung,pin-con-pdn = ; \ - samsung,pin-pud-pdn = ; \ + samsung,pin-con-pdn = ; \ + samsung,pin-pud-pdn = ; \ } &pinctrl0 { @@ -280,559 +280,559 @@ gph3: gph3-gpio-bank { uart0_data: uart0-data-pins { samsung,pins = "gpa0-0", "gpa0-1"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; uart0_fctl: uart0-fctl-pins { samsung,pins = "gpa0-2", "gpa0-3"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; uart1_data: uart1-data-pins { samsung,pins = "gpa0-4", "gpa0-5"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; uart1_fctl: uart1-fctl-pins { samsung,pins = "gpa0-6", "gpa0-7"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; uart2_data: uart2-data-pins { samsung,pins = "gpa1-0", "gpa1-1"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; uart2_fctl: uart2-fctl-pins { samsung,pins = "gpa1-2", "gpa1-3"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; uart3_data: uart3-data-pins { samsung,pins = "gpa1-2", "gpa1-3"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; uart_audio: uart-audio-pins { samsung,pins = "gpa1-2", "gpa1-3"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; spi0_bus: spi0-bus-pins { samsung,pins = "gpb-0", "gpb-2", "gpb-3"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; spi1_bus: spi1-bus-pins { samsung,pins = "gpb-4", "gpb-6", "gpb-7"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; i2s0_bus: i2s0-bus-pins { samsung,pins = "gpi-0", "gpi-1", "gpi-2", "gpi-3", "gpi-4", "gpi-5", "gpi-6"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; i2s1_bus: i2s1-bus-pins { samsung,pins = "gpc0-0", "gpc0-1", "gpc0-2", "gpc0-3", "gpc0-4"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; i2s2_bus: i2s2-bus-pins { samsung,pins = "gpc1-0", "gpc1-1", "gpc1-2", "gpc1-3", "gpc1-4"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; pcm1_bus: pcm1-bus-pins { samsung,pins = "gpc0-0", "gpc0-1", "gpc0-2", "gpc0-3", "gpc0-4"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; ac97_bus: ac97-bus-pins { samsung,pins = "gpc0-0", "gpc0-1", "gpc0-2", "gpc0-3", "gpc0-4"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; i2s2_bus: i2s2-bus-pins { samsung,pins = "gpc1-0", "gpc1-1", "gpc1-2", "gpc1-3", "gpc1-4"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; pcm2_bus: pcm2-bus-pins { samsung,pins = "gpc1-0", "gpc1-1", "gpc1-2", "gpc1-3", "gpc1-4"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; spdif_bus: spdif-bus-pins { samsung,pins = "gpc1-0", "gpc1-1"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; spi2_bus: spi2-bus-pins { samsung,pins = "gpc1-1", "gpc1-2", "gpc1-3", "gpc1-4"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; i2c0_bus: i2c0-bus-pins { samsung,pins = "gpd1-0", "gpd1-1"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; i2c1_bus: i2c1-bus-pins { samsung,pins = "gpd1-2", "gpd1-3"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; i2c2_bus: i2c2-bus-pins { samsung,pins = "gpd1-4", "gpd1-5"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; pwm0_out: pwm0-out-pins { samsung,pins = "gpd0-0"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; pwm1_out: pwm1-out-pins { samsung,pins = "gpd0-1"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; pwm2_out: pwm2-out-pins { samsung,pins = "gpd0-2"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; pwm3_out: pwm3-out-pins { samsung,pins = "gpd0-3"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; keypad_row0: keypad-row-0-pins { samsung,pins = "gph3-0"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; keypad_row1: keypad-row-1-pins { samsung,pins = "gph3-1"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; keypad_row2: keypad-row-2-pins { samsung,pins = "gph3-2"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; keypad_row3: keypad-row-3-pins { samsung,pins = "gph3-3"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; keypad_row4: keypad-row-4-pins { samsung,pins = "gph3-4"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; keypad_row5: keypad-row-5-pins { samsung,pins = "gph3-5"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; keypad_row6: keypad-row-6-pins { samsung,pins = "gph3-6"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; keypad_row7: keypad-row-7-pins { samsung,pins = "gph3-7"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; keypad_col0: keypad-col-0-pins { samsung,pins = "gph2-0"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; keypad_col1: keypad-col-1-pins { samsung,pins = "gph2-1"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; keypad_col2: keypad-col-2-pins { samsung,pins = "gph2-2"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; keypad_col3: keypad-col-3-pins { samsung,pins = "gph2-3"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; keypad_col4: keypad-col-4-pins { samsung,pins = "gph2-4"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; keypad_col5: keypad-col-5-pins { samsung,pins = "gph2-5"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; keypad_col6: keypad-col-6-pins { samsung,pins = "gph2-6"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; keypad_col7: keypad-col-7-pins { samsung,pins = "gph2-7"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; sd0_clk: sd0-clk-pins { samsung,pins = "gpg0-0"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; sd0_cmd: sd0-cmd-pins { samsung,pins = "gpg0-1"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; sd0_cd: sd0-cd-pins { samsung,pins = "gpg0-2"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; sd0_bus1: sd0-bus-width1-pins { samsung,pins = "gpg0-3"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; sd0_bus4: sd0-bus-width4-pins { samsung,pins = "gpg0-3", "gpg0-4", "gpg0-5", "gpg0-6"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; sd0_bus8: sd0-bus-width8-pins { samsung,pins = "gpg1-3", "gpg1-4", "gpg1-5", "gpg1-6"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; sd1_clk: sd1-clk-pins { samsung,pins = "gpg1-0"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; sd1_cmd: sd1-cmd-pins { samsung,pins = "gpg1-1"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; sd1_cd: sd1-cd-pins { samsung,pins = "gpg1-2"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; sd1_bus1: sd1-bus-width1-pins { samsung,pins = "gpg1-3"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; sd1_bus4: sd1-bus-width4-pins { samsung,pins = "gpg1-3", "gpg1-4", "gpg1-5", "gpg1-6"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; sd2_clk: sd2-clk-pins { samsung,pins = "gpg2-0"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; sd2_cmd: sd2-cmd-pins { samsung,pins = "gpg2-1"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; sd2_cd: sd2-cd-pins { samsung,pins = "gpg2-2"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; sd2_bus1: sd2-bus-width1-pins { samsung,pins = "gpg2-3"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; sd2_bus4: sd2-bus-width4-pins { samsung,pins = "gpg2-3", "gpg2-4", "gpg2-5", "gpg2-6"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; sd2_bus8: sd2-bus-width8-pins { samsung,pins = "gpg3-3", "gpg3-4", "gpg3-5", "gpg3-6"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; sd3_clk: sd3-clk-pins { samsung,pins = "gpg3-0"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; sd3_cmd: sd3-cmd-pins { samsung,pins = "gpg3-1"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; sd3_cd: sd3-cd-pins { samsung,pins = "gpg3-2"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; sd3_bus1: sd3-bus-width1-pins { samsung,pins = "gpg3-3"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; sd3_bus4: sd3-bus-width4-pins { samsung,pins = "gpg3-3", "gpg3-4", "gpg3-5", "gpg3-6"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; eint0: ext-int0-pins { samsung,pins = "gph0-0"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; eint8: ext-int8-pins { samsung,pins = "gph1-0"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; eint15: ext-int15-pins { samsung,pins = "gph1-7"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; eint16: ext-int16-pins { samsung,pins = "gph2-0"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; eint31: ext-int31-pins { samsung,pins = "gph3-7"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; cam_port_a_io: cam-port-a-io-pins { samsung,pins = "gpe0-0", "gpe0-1", "gpe0-2", "gpe0-3", "gpe0-4", "gpe0-5", "gpe0-6", "gpe0-7", "gpe1-0", "gpe1-1", "gpe1-2", "gpe1-4"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; cam_port_a_clk_active: cam-port-a-clk-active-pins { samsung,pins = "gpe1-3"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; cam_port_a_clk_idle: cam-port-a-clk-idle-pins { samsung,pins = "gpe1-3"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; cam_port_b_io: cam-port-b-io-pins { samsung,pins = "gpj0-0", "gpj0-1", "gpj0-2", "gpj0-3", "gpj0-4", "gpj0-5", "gpj0-6", "gpj0-7", "gpj1-0", "gpj1-1", "gpj1-2", "gpj1-4"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; cam_port_b_clk_active: cam-port-b-clk-active-pins { samsung,pins = "gpj1-3"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; cam_port_b_clk_idle: cam-port-b-clk-idle-pins { samsung,pins = "gpj1-3"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; lcd_ctrl: lcd-ctrl-pins { samsung,pins = "gpd0-0", "gpd0-1"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; lcd_sync: lcd-sync-pins { samsung,pins = "gpf0-0", "gpf0-1"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; lcd_clk: lcd-clk-pins { samsung,pins = "gpf0-0", "gpf0-1", "gpf0-2", "gpf0-3"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; lcd_data24: lcd-data-width24-pins { @@ -842,8 +842,8 @@ lcd_data24: lcd-data-width24-pins { "gpf2-0", "gpf2-1", "gpf2-2", "gpf2-3", "gpf2-4", "gpf2-5", "gpf2-6", "gpf2-7", "gpf3-0", "gpf3-1", "gpf3-2", "gpf3-3"; - samsung,pin-function = ; - samsung,pin-pud = ; - samsung,pin-drv = ; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; }; }; diff --git a/arch/arm/boot/dts/s5pv210-pinctrl.h b/arch/arm/boot/dts/s5pv210-pinctrl.h new file mode 100644 index 000000000000..29bdf376d8f1 --- /dev/null +++ b/arch/arm/boot/dts/s5pv210-pinctrl.h @@ -0,0 +1,39 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Samsung S5PV210 DTS pinctrl constants + * + * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * http://www.samsung.com + * Copyright (c) 2022 Linaro Ltd + * Author: Krzysztof Kozlowski + */ + +#ifndef __DTS_ARM_SAMSUNG_S5PV210_PINCTRL_H__ +#define __DTS_ARM_SAMSUNG_S5PV210_PINCTRL_H__ + +#define S5PV210_PIN_PULL_NONE 0 +#define S5PV210_PIN_PULL_DOWN 1 +#define S5PV210_PIN_PULL_UP 2 + +/* Pin function in power down mode */ +#define S5PV210_PIN_PDN_OUT0 0 +#define S5PV210_PIN_PDN_OUT1 1 +#define S5PV210_PIN_PDN_INPUT 2 +#define S5PV210_PIN_PDN_PREV 3 + +#define S5PV210_PIN_DRV_LV1 0 +#define S5PV210_PIN_DRV_LV2 2 +#define S5PV210_PIN_DRV_LV3 1 +#define S5PV210_PIN_DRV_LV4 3 + +#define S5PV210_PIN_FUNC_INPUT 0 +#define S5PV210_PIN_FUNC_OUTPUT 1 +#define S5PV210_PIN_FUNC_2 2 +#define S5PV210_PIN_FUNC_3 3 +#define S5PV210_PIN_FUNC_4 4 +#define S5PV210_PIN_FUNC_5 5 +#define S5PV210_PIN_FUNC_6 6 +#define S5PV210_PIN_FUNC_EINT 0xf +#define S5PV210_PIN_FUNC_F S5PV210_PIN_FUNC_EINT + +#endif /* __DTS_ARM_SAMSUNG_S5PV210_PINCTRL_H__ */