Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: dts: s3c2410: use local header for pinctrl register values

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 <krzysztof.kozlowski@linaro.org>
Reviewed-by: Chanho Park <chanho61.park@samsung.com>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220605160508.134075-2-krzysztof.kozlowski@linaro.org

+38 -19
+19
arch/arm/boot/dts/s3c2410-pinctrl.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 2 + /* 3 + * Samsung S3C2410 DTS pinctrl constants 4 + * 5 + * Copyright (c) 2016 Samsung Electronics Co., Ltd. 6 + * http://www.samsung.com 7 + * Copyright (c) 2022 Linaro Ltd 8 + * Author: Krzysztof Kozlowski <krzk@kernel.org> 9 + */ 10 + 11 + #ifndef __DTS_ARM_SAMSUNG_S3C2410_PINCTRL_H__ 12 + #define __DTS_ARM_SAMSUNG_S3C2410_PINCTRL_H__ 13 + 14 + #define S3C2410_PIN_FUNC_INPUT 0 15 + #define S3C2410_PIN_FUNC_OUTPUT 1 16 + #define S3C2410_PIN_FUNC_2 2 17 + #define S3C2410_PIN_FUNC_3 3 18 + 19 + #endif /* __DTS_ARM_SAMSUNG_S3C2410_PINCTRL_H__ */
+19 -19
arch/arm/boot/dts/s3c2416-pinctrl.dtsi
··· 5 5 * Copyright (c) 2013 Heiko Stuebner <heiko@sntech.de> 6 6 */ 7 7 8 - #include <dt-bindings/pinctrl/samsung.h> 8 + #include "s3c2410-pinctrl.h" 9 9 10 10 &pinctrl_0 { 11 11 /* ··· 82 82 83 83 uart0_data: uart0-data-pins { 84 84 samsung,pins = "gph-0", "gph-1"; 85 - samsung,pin-function = <EXYNOS_PIN_FUNC_2>; 85 + samsung,pin-function = <S3C2410_PIN_FUNC_2>; 86 86 }; 87 87 88 88 uart0_fctl: uart0-fctl-pins { 89 89 samsung,pins = "gph-8", "gph-9"; 90 - samsung,pin-function = <EXYNOS_PIN_FUNC_2>; 90 + samsung,pin-function = <S3C2410_PIN_FUNC_2>; 91 91 }; 92 92 93 93 uart1_data: uart1-data-pins { 94 94 samsung,pins = "gph-2", "gph-3"; 95 - samsung,pin-function = <EXYNOS_PIN_FUNC_2>; 95 + samsung,pin-function = <S3C2410_PIN_FUNC_2>; 96 96 }; 97 97 98 98 uart1_fctl: uart1-fctl-pins { 99 99 samsung,pins = "gph-10", "gph-11"; 100 - samsung,pin-function = <EXYNOS_PIN_FUNC_2>; 100 + samsung,pin-function = <S3C2410_PIN_FUNC_2>; 101 101 }; 102 102 103 103 uart2_data: uart2-data-pins { 104 104 samsung,pins = "gph-4", "gph-5"; 105 - samsung,pin-function = <EXYNOS_PIN_FUNC_2>; 105 + samsung,pin-function = <S3C2410_PIN_FUNC_2>; 106 106 }; 107 107 108 108 uart2_fctl: uart2-fctl-pins { 109 109 samsung,pins = "gph-6", "gph-7"; 110 - samsung,pin-function = <EXYNOS_PIN_FUNC_2>; 110 + samsung,pin-function = <S3C2410_PIN_FUNC_2>; 111 111 }; 112 112 113 113 uart3_data: uart3-data-pins { 114 114 samsung,pins = "gph-6", "gph-7"; 115 - samsung,pin-function = <EXYNOS_PIN_FUNC_2>; 115 + samsung,pin-function = <S3C2410_PIN_FUNC_2>; 116 116 }; 117 117 118 118 extuart_clk: extuart-clk-pins { 119 119 samsung,pins = "gph-12"; 120 - samsung,pin-function = <EXYNOS_PIN_FUNC_2>; 120 + samsung,pin-function = <S3C2410_PIN_FUNC_2>; 121 121 }; 122 122 123 123 i2c0_bus: i2c0-bus-pins { 124 124 samsung,pins = "gpe-14", "gpe-15"; 125 - samsung,pin-function = <EXYNOS_PIN_FUNC_2>; 125 + samsung,pin-function = <S3C2410_PIN_FUNC_2>; 126 126 }; 127 127 128 128 spi0_bus: spi0-bus-pins { 129 129 samsung,pins = "gpe-11", "gpe-12", "gpe-13"; 130 - samsung,pin-function = <EXYNOS_PIN_FUNC_2>; 130 + samsung,pin-function = <S3C2410_PIN_FUNC_2>; 131 131 }; 132 132 133 133 sd0_clk: sd0-clk-pins { 134 134 samsung,pins = "gpe-5"; 135 - samsung,pin-function = <EXYNOS_PIN_FUNC_2>; 135 + samsung,pin-function = <S3C2410_PIN_FUNC_2>; 136 136 }; 137 137 138 138 sd0_cmd: sd0-cmd-pins { 139 139 samsung,pins = "gpe-6"; 140 - samsung,pin-function = <EXYNOS_PIN_FUNC_2>; 140 + samsung,pin-function = <S3C2410_PIN_FUNC_2>; 141 141 }; 142 142 143 143 sd0_bus1: sd0-bus1-pins { 144 144 samsung,pins = "gpe-7"; 145 - samsung,pin-function = <EXYNOS_PIN_FUNC_2>; 145 + samsung,pin-function = <S3C2410_PIN_FUNC_2>; 146 146 }; 147 147 148 148 sd0_bus4: sd0-bus4-pins { 149 149 samsung,pins = "gpe-8", "gpe-9", "gpe-10"; 150 - samsung,pin-function = <EXYNOS_PIN_FUNC_2>; 150 + samsung,pin-function = <S3C2410_PIN_FUNC_2>; 151 151 }; 152 152 153 153 sd1_cmd: sd1-cmd-pins { 154 154 samsung,pins = "gpl-8"; 155 - samsung,pin-function = <EXYNOS_PIN_FUNC_2>; 155 + samsung,pin-function = <S3C2410_PIN_FUNC_2>; 156 156 }; 157 157 158 158 sd1_clk: sd1-clk-pins { 159 159 samsung,pins = "gpl-9"; 160 - samsung,pin-function = <EXYNOS_PIN_FUNC_2>; 160 + samsung,pin-function = <S3C2410_PIN_FUNC_2>; 161 161 }; 162 162 163 163 sd1_bus1: sd1-bus1-pins { 164 164 samsung,pins = "gpl-0"; 165 - samsung,pin-function = <EXYNOS_PIN_FUNC_2>; 165 + samsung,pin-function = <S3C2410_PIN_FUNC_2>; 166 166 }; 167 167 168 168 sd1_bus4: sd1-bus4-pins { 169 169 samsung,pins = "gpl-1", "gpl-2", "gpl-3"; 170 - samsung,pin-function = <EXYNOS_PIN_FUNC_2>; 170 + samsung,pin-function = <S3C2410_PIN_FUNC_2>; 171 171 }; 172 172 };