Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752310AbdGUMfi (ORCPT ); Fri, 21 Jul 2017 08:35:38 -0400 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:24579 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750835AbdGUMfg (ORCPT ); Fri, 21 Jul 2017 08:35:36 -0400 From: Alexandre Torgue To: Maxime Coquelin , Linus Walleij , Rob Herring , Mark Rutland , Arnd Bergmann , Russell King CC: , , , Subject: [RFC PATCH v2] ARM: dts: stm32: change pinctrl bindings definition Date: Fri, 21 Jul 2017 14:34:13 +0200 Message-ID: <1500640454-19656-1-git-send-email-alexandre.torgue@st.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.75.127.47] X-ClientProxiedBy: SFHDAG8NODE2.st.com (10.75.127.23) To SFHDAG3NODE2.st.com (10.75.127.8) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-07-21_06:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1566 Lines: 41 Initially each pin was declared in "include/dt-bindings/stm32f429-pinfunc.h" and each definition contained SOC names (ex: STM32F429_PA9_FUNC_USART1_TX). Since this approach was approved, the number of supported MCU has increased (STM32F429/STM32F469/STM32f746/STM32H743). To avoid to add a new file in "include/dt-bindings" each time a new STM32 SOC arrives I propose a new approach which consist to use a macro to define pin muxing in device tree. All STM32 DT will use the common macro to define pinmux. Furthermore, it will make maintenance and integration of new SOC easier. To check that patch generate same dtb than befrore I used dtc binary to (re)generate dts files (before and after apply the series). Example on stm32f469-disco: ./scripts/dtc/dtc -I dtb -O dts -o stm32f469-disco-after.dts stm32f469-disco-after.dtb ./scripts/dtc/dtc -I dtb -O dts -o stm32f469-disco-before.dts stm32f469-disco-before.dtb Then diff -u stm32f469-disco-before.dts stm32f469-disco-after.dts Changes since v1: -According to Vikas Manocha review, use generic macro to define port. Regards Alex Alexandre Torgue (1): ARM: dts: stm32: change pinctrl bindings definition arch/arm/boot/dts/stm32f429.dtsi | 176 ++-- include/dt-bindings/pinctrl/stm32-pinfunc.h | 31 + include/dt-bindings/pinctrl/stm32f429-pinfunc.h | 1239 ----------------------- 3 files changed, 119 insertions(+), 1327 deletions(-) create mode 100644 include/dt-bindings/pinctrl/stm32-pinfunc.h delete mode 100644 include/dt-bindings/pinctrl/stm32f429-pinfunc.h -- 2.7.4