From mboxrd@z Thu Jan 1 00:00:00 1970 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 A2D0ECCA47B for ; Sun, 5 Jun 2022 16:05:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345819AbiFEQFh (ORCPT ); Sun, 5 Jun 2022 12:05:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345785AbiFEQFc (ORCPT ); Sun, 5 Jun 2022 12:05:32 -0400 Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EBEB7BE26 for ; Sun, 5 Jun 2022 09:05:27 -0700 (PDT) Received: by mail-ed1-x531.google.com with SMTP id n28so15858952edb.9 for ; Sun, 05 Jun 2022 09:05:27 -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=TgZlaj+S7oT+XqxuVB72oLW8TvdLwV6jN4LNwFoIuj4=; b=i1k+xtc8vlRzc1Ny8h/vYKNHsPdLoq9ZwF6hNoDMVpqWI7tnROr2t/SBDFhOG40bES rYXNNmOhKb77BcYle3TC4is1hs7e/ytI/NAkXGPsjV5Kl7DIN8VI+EPf+BqSYjoqK3Qn SerbN5afh46jBfwGIjZZHa6aFAIYx+ObhEoAxUYZ6sPgCb9UOYQSsv1ihR4LhYGCK0/Q sQnBbJP0mO9ykU8fF2ltnfAfQsggWASpnjv50M4N2gfXNxdlacJX1rikGVJUCjQa9QvO KtH2opW81HZ0z63YYEW6bA0Boht92erMWwX+wmO6EbX62PA0RqiU8Q/8U6CAlSrLGpOl RX1A== 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=TgZlaj+S7oT+XqxuVB72oLW8TvdLwV6jN4LNwFoIuj4=; b=5dMIQ5NbPj9q6n5rLmcMi+zojyMS3WKLNayoe+RB16CJYmWR7aHQ+VhwTbj5/Xz/Nu f/JG58affK4mOWLj3ODFJl5V76GshjOtd5qC17bMdAWSGPhlCD+GoQn8ZvCpJUpjxIRG /6sIoIrIvWsJn5Ut4mP7IpLY4abxHNaR8LpdUAU4dV0/RKWQK38gtUIusi4oOpq84LrJ r43UBoYSTLqry5xKdw8izgYsg5Te6W/GDK3kNcebyRd9wtRX0//2gUK9NZ4xtng27SOf kUEAUPeCD1ST8KX83EfE4Nq+e7pvty+eJQpykM1Qh6QcUEb2r+fvsfmAXRJ/o+EsX93y o8oQ== X-Gm-Message-State: AOAM531UdBn/U0KVhivolF1uolRUqAN6vp/b5fvKVjT5fKNm/vPnmGIR 4NP0ON4A2GlDEjunAUzHuwdGng== X-Google-Smtp-Source: ABdhPJxhwMoldMcmJSLIxDHHQZtCvWaG1vQVJqntwmpCfFhmda+jnPfWMRrEjYE6p0NKiaVXbnlWcQ== X-Received: by 2002:aa7:cacd:0:b0:42b:b1b6:e054 with SMTP id l13-20020aa7cacd000000b0042bb1b6e054mr21700725edt.281.1654445126474; Sun, 05 Jun 2022 09:05:26 -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.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Jun 2022 09:05:25 -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 1/8] ARM: dts: s3c2410: use local header for pinctrl register values Date: Sun, 5 Jun 2022 18:05:01 +0200 Message-Id: <20220605160508.134075-2-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 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-gpio@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/s3c2410-pinctrl.h | 19 +++++++++++++ arch/arm/boot/dts/s3c2416-pinctrl.dtsi | 38 +++++++++++++------------- 2 files changed, 38 insertions(+), 19 deletions(-) create mode 100644 arch/arm/boot/dts/s3c2410-pinctrl.h diff --git a/arch/arm/boot/dts/s3c2410-pinctrl.h b/arch/arm/boot/dts/s3c2410-pinctrl.h new file mode 100644 index 000000000000..76b6171ae149 --- /dev/null +++ b/arch/arm/boot/dts/s3c2410-pinctrl.h @@ -0,0 +1,19 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Samsung S3C2410 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_S3C2410_PINCTRL_H__ +#define __DTS_ARM_SAMSUNG_S3C2410_PINCTRL_H__ + +#define S3C2410_PIN_FUNC_INPUT 0 +#define S3C2410_PIN_FUNC_OUTPUT 1 +#define S3C2410_PIN_FUNC_2 2 +#define S3C2410_PIN_FUNC_3 3 + +#endif /* __DTS_ARM_SAMSUNG_S3C2410_PINCTRL_H__ */ diff --git a/arch/arm/boot/dts/s3c2416-pinctrl.dtsi b/arch/arm/boot/dts/s3c2416-pinctrl.dtsi index 20a7d72827c2..3268366bd8bc 100644 --- a/arch/arm/boot/dts/s3c2416-pinctrl.dtsi +++ b/arch/arm/boot/dts/s3c2416-pinctrl.dtsi @@ -5,7 +5,7 @@ * Copyright (c) 2013 Heiko Stuebner */ -#include +#include "s3c2410-pinctrl.h" &pinctrl_0 { /* @@ -82,91 +82,91 @@ gpm: gpm-gpio-bank { uart0_data: uart0-data-pins { samsung,pins = "gph-0", "gph-1"; - samsung,pin-function = ; + samsung,pin-function = ; }; uart0_fctl: uart0-fctl-pins { samsung,pins = "gph-8", "gph-9"; - samsung,pin-function = ; + samsung,pin-function = ; }; uart1_data: uart1-data-pins { samsung,pins = "gph-2", "gph-3"; - samsung,pin-function = ; + samsung,pin-function = ; }; uart1_fctl: uart1-fctl-pins { samsung,pins = "gph-10", "gph-11"; - samsung,pin-function = ; + samsung,pin-function = ; }; uart2_data: uart2-data-pins { samsung,pins = "gph-4", "gph-5"; - samsung,pin-function = ; + samsung,pin-function = ; }; uart2_fctl: uart2-fctl-pins { samsung,pins = "gph-6", "gph-7"; - samsung,pin-function = ; + samsung,pin-function = ; }; uart3_data: uart3-data-pins { samsung,pins = "gph-6", "gph-7"; - samsung,pin-function = ; + samsung,pin-function = ; }; extuart_clk: extuart-clk-pins { samsung,pins = "gph-12"; - samsung,pin-function = ; + samsung,pin-function = ; }; i2c0_bus: i2c0-bus-pins { samsung,pins = "gpe-14", "gpe-15"; - samsung,pin-function = ; + samsung,pin-function = ; }; spi0_bus: spi0-bus-pins { samsung,pins = "gpe-11", "gpe-12", "gpe-13"; - samsung,pin-function = ; + samsung,pin-function = ; }; sd0_clk: sd0-clk-pins { samsung,pins = "gpe-5"; - samsung,pin-function = ; + samsung,pin-function = ; }; sd0_cmd: sd0-cmd-pins { samsung,pins = "gpe-6"; - samsung,pin-function = ; + samsung,pin-function = ; }; sd0_bus1: sd0-bus1-pins { samsung,pins = "gpe-7"; - samsung,pin-function = ; + samsung,pin-function = ; }; sd0_bus4: sd0-bus4-pins { samsung,pins = "gpe-8", "gpe-9", "gpe-10"; - samsung,pin-function = ; + samsung,pin-function = ; }; sd1_cmd: sd1-cmd-pins { samsung,pins = "gpl-8"; - samsung,pin-function = ; + samsung,pin-function = ; }; sd1_clk: sd1-clk-pins { samsung,pins = "gpl-9"; - samsung,pin-function = ; + samsung,pin-function = ; }; sd1_bus1: sd1-bus1-pins { samsung,pins = "gpl-0"; - samsung,pin-function = ; + samsung,pin-function = ; }; sd1_bus4: sd1-bus4-pins { samsung,pins = "gpl-1", "gpl-2", "gpl-3"; - samsung,pin-function = ; + samsung,pin-function = ; }; }; -- 2.34.1 From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1B7A2C43334 for ; Sun, 5 Jun 2022 16:07:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=x/M0UNhvCPovb3ML7qtyMfRjB2OYBuwtGEV3PuMstPs=; b=YPbvdc4pDJIZjA ddCqoJitUib/4EIV9FybC3l37GL9+g5bXq8cpy8J8WHGlGVAtN1jVMhL8Ao5zfBhgl9YMU8tKPPS4 xz6dfjPZ3dULY8L09phO53MnGYMtDgmpGJ1wmwna9OyrL2GHGq5yhtPlRHBtHJoCjqgzcnKAxJ37L wFfByHL8D0mO2JB+zafLNGixw82nHEd6WG19mtNyxEB5CIM4Hx9r30yAk0tClj8Gtqr2FQ0eNaiL3 wYpgilO3NiBYBhqd6yoXdOhwTAR+fmTjeCOCrFJTkKgja9evkGXVJcuOi0d3AGAFUFLnIDc/Evd4i v/vzPcS02dPOrkPdFUZQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nxsl5-00Eotu-Ct; Sun, 05 Jun 2022 16:05:43 +0000 Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nxskq-00Eona-SP for linux-arm-kernel@lists.infradead.org; Sun, 05 Jun 2022 16:05:30 +0000 Received: by mail-ed1-x52d.google.com with SMTP id 25so15591034edw.8 for ; Sun, 05 Jun 2022 09:05:27 -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=TgZlaj+S7oT+XqxuVB72oLW8TvdLwV6jN4LNwFoIuj4=; b=i1k+xtc8vlRzc1Ny8h/vYKNHsPdLoq9ZwF6hNoDMVpqWI7tnROr2t/SBDFhOG40bES rYXNNmOhKb77BcYle3TC4is1hs7e/ytI/NAkXGPsjV5Kl7DIN8VI+EPf+BqSYjoqK3Qn SerbN5afh46jBfwGIjZZHa6aFAIYx+ObhEoAxUYZ6sPgCb9UOYQSsv1ihR4LhYGCK0/Q sQnBbJP0mO9ykU8fF2ltnfAfQsggWASpnjv50M4N2gfXNxdlacJX1rikGVJUCjQa9QvO KtH2opW81HZ0z63YYEW6bA0Boht92erMWwX+wmO6EbX62PA0RqiU8Q/8U6CAlSrLGpOl RX1A== 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=TgZlaj+S7oT+XqxuVB72oLW8TvdLwV6jN4LNwFoIuj4=; b=1u9sS6zwlIDhykawCin6DUJUoMajZ5E0PJ0jiwgQhoit/OFZFRYWhCHtcRf0yh6kuQ dneGJ9a3svVPu2MjxaovFt/i+uYi7Eb+mQeDypup/Cn/IZq2aBPo8psjuiMQ7cGrOR8p v/iianQG6avDK4FTOAK/2zzFRFru0oPL7jArDJduy0bFvTf0npDIpCJkFyz9Vgu+tqlg HPCWHnyKURjZzbjPUWT3TwZnebqWJ8qUFAdo3C/QH+BqN3vqeC6TpmDTShtS9iRdrArl zOIyimF2oFjx21BXG4Z9S/t0DWcif0xDcmoNvRFzeSpo/xZVSom6HZuMnbRruOyErFGc 8QoQ== X-Gm-Message-State: AOAM533eGrgnd43ldY1ZPVFcx3MPCYNtPi+3nofv/n4H8SOdNPSJIiY2 RVsokVedg4LjeRXiUN1H9nrIpQ== X-Google-Smtp-Source: ABdhPJxhwMoldMcmJSLIxDHHQZtCvWaG1vQVJqntwmpCfFhmda+jnPfWMRrEjYE6p0NKiaVXbnlWcQ== X-Received: by 2002:aa7:cacd:0:b0:42b:b1b6:e054 with SMTP id l13-20020aa7cacd000000b0042bb1b6e054mr21700725edt.281.1654445126474; Sun, 05 Jun 2022 09:05:26 -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.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Jun 2022 09:05:25 -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 1/8] ARM: dts: s3c2410: use local header for pinctrl register values Date: Sun, 5 Jun 2022 18:05:01 +0200 Message-Id: <20220605160508.134075-2-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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220605_090529_043978_76E282F9 X-CRM114-Status: GOOD ( 17.49 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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/s3c2410-pinctrl.h | 19 +++++++++++++ arch/arm/boot/dts/s3c2416-pinctrl.dtsi | 38 +++++++++++++------------- 2 files changed, 38 insertions(+), 19 deletions(-) create mode 100644 arch/arm/boot/dts/s3c2410-pinctrl.h diff --git a/arch/arm/boot/dts/s3c2410-pinctrl.h b/arch/arm/boot/dts/s3c2410-pinctrl.h new file mode 100644 index 000000000000..76b6171ae149 --- /dev/null +++ b/arch/arm/boot/dts/s3c2410-pinctrl.h @@ -0,0 +1,19 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Samsung S3C2410 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_S3C2410_PINCTRL_H__ +#define __DTS_ARM_SAMSUNG_S3C2410_PINCTRL_H__ + +#define S3C2410_PIN_FUNC_INPUT 0 +#define S3C2410_PIN_FUNC_OUTPUT 1 +#define S3C2410_PIN_FUNC_2 2 +#define S3C2410_PIN_FUNC_3 3 + +#endif /* __DTS_ARM_SAMSUNG_S3C2410_PINCTRL_H__ */ diff --git a/arch/arm/boot/dts/s3c2416-pinctrl.dtsi b/arch/arm/boot/dts/s3c2416-pinctrl.dtsi index 20a7d72827c2..3268366bd8bc 100644 --- a/arch/arm/boot/dts/s3c2416-pinctrl.dtsi +++ b/arch/arm/boot/dts/s3c2416-pinctrl.dtsi @@ -5,7 +5,7 @@ * Copyright (c) 2013 Heiko Stuebner */ -#include +#include "s3c2410-pinctrl.h" &pinctrl_0 { /* @@ -82,91 +82,91 @@ gpm: gpm-gpio-bank { uart0_data: uart0-data-pins { samsung,pins = "gph-0", "gph-1"; - samsung,pin-function = ; + samsung,pin-function = ; }; uart0_fctl: uart0-fctl-pins { samsung,pins = "gph-8", "gph-9"; - samsung,pin-function = ; + samsung,pin-function = ; }; uart1_data: uart1-data-pins { samsung,pins = "gph-2", "gph-3"; - samsung,pin-function = ; + samsung,pin-function = ; }; uart1_fctl: uart1-fctl-pins { samsung,pins = "gph-10", "gph-11"; - samsung,pin-function = ; + samsung,pin-function = ; }; uart2_data: uart2-data-pins { samsung,pins = "gph-4", "gph-5"; - samsung,pin-function = ; + samsung,pin-function = ; }; uart2_fctl: uart2-fctl-pins { samsung,pins = "gph-6", "gph-7"; - samsung,pin-function = ; + samsung,pin-function = ; }; uart3_data: uart3-data-pins { samsung,pins = "gph-6", "gph-7"; - samsung,pin-function = ; + samsung,pin-function = ; }; extuart_clk: extuart-clk-pins { samsung,pins = "gph-12"; - samsung,pin-function = ; + samsung,pin-function = ; }; i2c0_bus: i2c0-bus-pins { samsung,pins = "gpe-14", "gpe-15"; - samsung,pin-function = ; + samsung,pin-function = ; }; spi0_bus: spi0-bus-pins { samsung,pins = "gpe-11", "gpe-12", "gpe-13"; - samsung,pin-function = ; + samsung,pin-function = ; }; sd0_clk: sd0-clk-pins { samsung,pins = "gpe-5"; - samsung,pin-function = ; + samsung,pin-function = ; }; sd0_cmd: sd0-cmd-pins { samsung,pins = "gpe-6"; - samsung,pin-function = ; + samsung,pin-function = ; }; sd0_bus1: sd0-bus1-pins { samsung,pins = "gpe-7"; - samsung,pin-function = ; + samsung,pin-function = ; }; sd0_bus4: sd0-bus4-pins { samsung,pins = "gpe-8", "gpe-9", "gpe-10"; - samsung,pin-function = ; + samsung,pin-function = ; }; sd1_cmd: sd1-cmd-pins { samsung,pins = "gpl-8"; - samsung,pin-function = ; + samsung,pin-function = ; }; sd1_clk: sd1-clk-pins { samsung,pins = "gpl-9"; - samsung,pin-function = ; + samsung,pin-function = ; }; sd1_bus1: sd1-bus1-pins { samsung,pins = "gpl-0"; - samsung,pin-function = ; + samsung,pin-function = ; }; sd1_bus4: sd1-bus4-pins { samsung,pins = "gpl-1", "gpl-2", "gpl-3"; - samsung,pin-function = ; + samsung,pin-function = ; }; }; -- 2.34.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel