Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp570933ioo; Thu, 26 May 2022 09:38:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwS+4aah5EsQX9UE9V6nLrkSGcxYMxAKkzcCnMVgFz1rpTYgb7LgM4YRaFjsZ+ITSSrbycH X-Received: by 2002:a63:c116:0:b0:3fb:2109:f714 with SMTP id w22-20020a63c116000000b003fb2109f714mr2645259pgf.237.1653583086044; Thu, 26 May 2022 09:38:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653583086; cv=none; d=google.com; s=arc-20160816; b=YRAuekkD4PqFE/TiHShArDvI/KgoqS9sNoFuqrwNHygkmVwe1iZjcGqnqcO/sG+X9P /wNA0eBXyxPlqYntPXYcXhmEwYlzCPScl0ldUIZdQ687ic4ejndfIt9GTXKtLHczaJpe FWbiF2zux2KK6WVJAsI6GpBBZgUJzZSwAXmrwfQlna8bllygrVw1Zqm1Go3eYEthm7/E NPOnUBnOQlaQ4Trjmmu1W6RIiVLiP3V6fp4elbZ0/4jogJCV20fdWm1PjHten2dsvpD3 ZoZSM/theaLGScUBvnPGb4lkmHxbp2Rd+fG7RVIG6iKGgyv8bCUXp/JccwCF4hBNU6bb tWzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=zNSo7HTnhss/iN+yIa+zDeGfGrWjHSHbXmTwg6rvYSg=; b=wkT4pboq2v3DmYMwoM95CDh/TywUy7oyzRBgrCGvM3jdFZmWgBbTqWGsp/zOpJIRni 2JMkEE9ahExuUz4skp2filkyDOwYFTtwmaGzUiwzyZGk+VxIh79s1bPE5sml7UAmWVA0 sjepSJt+oxXEv23swxIggXD7B0o+56uoLhD3AVbQr7ZvbMci63GNsSWLUNsR+5aNZl+H QcvGXpQ3Nc0wH79pLeVXf2hLjgrtGTGTq3E+0gIdrglkHedMg7AFRkn2VE2z+SKCDyF/ s9UdoEzDaidJcTf9W5arFQBWGpF7QcRkjS+AaQaEpWhUIjrvK42Ubrcnpd3UQVTpTYnU zP7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WMbm+hYG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i9-20020a635849000000b003faf501eeecsi3059773pgm.660.2022.05.26.09.37.53; Thu, 26 May 2022 09:38:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WMbm+hYG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347656AbiEZOhe (ORCPT + 99 others); Thu, 26 May 2022 10:37:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235749AbiEZOh3 (ORCPT ); Thu, 26 May 2022 10:37:29 -0400 Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F98DCC170 for ; Thu, 26 May 2022 07:37:23 -0700 (PDT) Received: by mail-ed1-x535.google.com with SMTP id er5so2042287edb.12 for ; Thu, 26 May 2022 07:37:23 -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=zNSo7HTnhss/iN+yIa+zDeGfGrWjHSHbXmTwg6rvYSg=; b=WMbm+hYGQ9xqTT/qhKPIxU89RPI9AFSdjCzL9SY5HuOaGS9ulotU5V5OPAg4yEco0q i2Uy2vZzSgdQ2n5nuAIsy4CUWxzuGvp9yDHxZBeIl/uD2oZ8XpCQUdorqY5yXyEiCPHP FzzrgBDIuD66PkeBb39LoSJropq75pzDe23C3g7Dooi2MAlCpneL61n0gDU3fd8P6vbJ hTXWQaB/aSvAhNU8w2l1PZzQgU7raUiJml6qjgzW9r+PUOBxpyZKgjrRHf4Iyan5k54o iFY9p2gZ37C9u7U8SiUH1R7lR0yJWm6ckmTcGwq3cY64xwrQE8H5ns2caX5zGtK4bvDy 8F7w== 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=zNSo7HTnhss/iN+yIa+zDeGfGrWjHSHbXmTwg6rvYSg=; b=Tla5J7i7QCiBOxcxdgeGK7LNhVOdh000ZAFl9uEaQ+YZ/rPO5pF5gCrJ8OBypSFq5L GT/cBFhg/qUaBDEEoScixbhl6PkttYpjssw152JvggT9aiDJRZErS3469spX/DO9hOvS i2KWQF6Sp0X1odK75khmbYaAP7IYAWoRwYd8LUfTuib40P8Mw1g3yUPrqOEu+mynNJE0 KCXKrE6/YE/lrLB91GGxq8VS17lrz7hgZmon6qOOaUU9a+SfGkydBUcJce1tszCDdPsx pHc652eGlrD39ua1A4dChDdiPYDsoaGE/n1Vf0umb7RU8Su/F3F0nIJvpYFZMoCvX+SR VcaQ== X-Gm-Message-State: AOAM532qgB/X8txqfs4nyOf2wzlqaP4OJpNn9oGDhfj9UqhGu7w+645v hCOGsb/nMNc5otmpRZogVH5uYg== X-Received: by 2002:aa7:d412:0:b0:42a:b8bf:89f7 with SMTP id z18-20020aa7d412000000b0042ab8bf89f7mr40717484edq.410.1653575841960; Thu, 26 May 2022 07:37:21 -0700 (PDT) Received: from localhost.localdomain (xdsl-188-155-176-92.adslplus.ch. [188.155.176.92]) by smtp.gmail.com with ESMTPSA id f27-20020a50a6db000000b0042be2dfa8bdsm267962edc.81.2022.05.26.07.37.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 May 2022 07:37:21 -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 Subject: [PATCH 1/7] ARM: dts: s3c2410: use local header for pinctrl register values Date: Thu, 26 May 2022 16:37:01 +0200 Message-Id: <20220526143707.767490-2-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220526143707.767490-1-krzysztof.kozlowski@linaro.org> References: <20220526143707.767490-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 --- 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..71cb0ac815b3 --- /dev/null +++ b/arch/arm/boot/dts/s3c2410-pinctrl.h @@ -0,0 +1,19 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Samsung's Exynos pinctrl bindings + * + * 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