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

dt-bindings: pinctrl: Convert i.MX7D to json-schema

Convert the i.MX7D pinctrl binding to DT schema format using json-schema

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Link: https://lore.kernel.org/r/20220303150653.1903910-1-alexander.stein@ew.tq-group.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

authored by

Alexander Stein and committed by
Linus Walleij
4764f39e 94d93c9b

+113 -87
-87
Documentation/devicetree/bindings/pinctrl/fsl,imx7d-pinctrl.txt
··· 1 - * Freescale i.MX7 Dual IOMUX Controller 2 - 3 - iMX7D supports two iomuxc controllers, fsl,imx7d-iomuxc controller is similar 4 - as previous iMX SoC generation and fsl,imx7d-iomuxc-lpsr which provides low 5 - power state retention capabilities on gpios that are part of iomuxc-lpsr 6 - (GPIO1_IO7..GPIO1_IO0). While iomuxc-lpsr provides its own set of registers for 7 - mux and pad control settings, it shares the input select register from main 8 - iomuxc controller for daisy chain settings, the fsl,input-sel property extends 9 - fsl,imx-pinctrl driver to support iomuxc-lpsr controller. 10 - 11 - iomuxc_lpsr: iomuxc-lpsr@302c0000 { 12 - compatible = "fsl,imx7d-iomuxc-lpsr"; 13 - reg = <0x302c0000 0x10000>; 14 - fsl,input-sel = <&iomuxc>; 15 - }; 16 - 17 - iomuxc: iomuxc@30330000 { 18 - compatible = "fsl,imx7d-iomuxc"; 19 - reg = <0x30330000 0x10000>; 20 - }; 21 - 22 - Peripherals using pads from iomuxc-lpsr support low state retention power 23 - state, under LPSR mode GPIO's state of pads are retain. 24 - 25 - Please refer to fsl,imx-pinctrl.txt in this directory for common binding part 26 - and usage. 27 - 28 - Required properties: 29 - - compatible: "fsl,imx7d-iomuxc" for main IOMUXC controller, or 30 - "fsl,imx7d-iomuxc-lpsr" for Low Power State Retention IOMUXC controller. 31 - - fsl,pins: each entry consists of 6 integers and represents the mux and config 32 - setting for one pin. The first 5 integers <mux_reg conf_reg input_reg mux_val 33 - input_val> are specified using a PIN_FUNC_ID macro, which can be found in 34 - imx7d-pinfunc.h under device tree source folder. The last integer CONFIG is 35 - the pad setting value like pull-up on this pin. Please refer to i.MX7 Dual 36 - Reference Manual for detailed CONFIG settings. 37 - - fsl,input-sel: required property for iomuxc-lpsr controller, this property is 38 - a phandle for main iomuxc controller which shares the input select register for 39 - daisy chain settings. 40 - 41 - CONFIG bits definition: 42 - PAD_CTL_PUS_100K_DOWN (0 << 5) 43 - PAD_CTL_PUS_5K_UP (1 << 5) 44 - PAD_CTL_PUS_47K_UP (2 << 5) 45 - PAD_CTL_PUS_100K_UP (3 << 5) 46 - PAD_CTL_PUE (1 << 4) 47 - PAD_CTL_HYS (1 << 3) 48 - PAD_CTL_SRE_SLOW (1 << 2) 49 - PAD_CTL_SRE_FAST (0 << 2) 50 - PAD_CTL_DSE_X1 (0 << 0) 51 - PAD_CTL_DSE_X4 (1 << 0) 52 - PAD_CTL_DSE_X2 (2 << 0) 53 - PAD_CTL_DSE_X6 (3 << 0) 54 - 55 - Examples: 56 - While iomuxc-lpsr is intended to be used by dedicated peripherals to take 57 - advantages of LPSR power mode, is also possible that an IP to use pads from 58 - any of the iomux controllers. For example the I2C1 IP can use SCL pad from 59 - iomuxc-lpsr controller and SDA pad from iomuxc controller as: 60 - 61 - i2c1: i2c@30a20000 { 62 - pinctrl-names = "default"; 63 - pinctrl-0 = <&pinctrl_i2c1_1>, <&pinctrl_i2c1_2>; 64 - }; 65 - 66 - iomuxc-lpsr@302c0000 { 67 - compatible = "fsl,imx7d-iomuxc-lpsr"; 68 - reg = <0x302c0000 0x10000>; 69 - fsl,input-sel = <&iomuxc>; 70 - 71 - pinctrl_i2c1_1: i2c1grp-1 { 72 - fsl,pins = < 73 - MX7D_PAD_GPIO1_IO04__I2C1_SCL 0x4000007f 74 - >; 75 - }; 76 - }; 77 - 78 - iomuxc@30330000 { 79 - compatible = "fsl,imx7d-iomuxc"; 80 - reg = <0x30330000 0x10000>; 81 - 82 - pinctrl_i2c1_2: i2c1grp-2 { 83 - fsl,pins = < 84 - MX7D_PAD_I2C1_SDA__I2C1_SDA 0x4000007f 85 - >; 86 - }; 87 - };
+113
Documentation/devicetree/bindings/pinctrl/fsl,imx7d-pinctrl.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/pinctrl/fsl,imx7d-pinctrl.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Freescale IMX7D IOMUX Controller 8 + 9 + maintainers: 10 + - Dong Aisheng <aisheng.dong@nxp.com> 11 + 12 + description: 13 + Please refer to fsl,imx-pinctrl.txt and pinctrl-bindings.txt in this directory 14 + for common binding part and usage. 15 + 16 + properties: 17 + compatible: 18 + oneOf: 19 + - enum: 20 + - fsl,imx7d-iomuxc 21 + - fsl,imx7d-iomuxc-lpsr 22 + 23 + reg: 24 + maxItems: 1 25 + 26 + fsl,input-sel: 27 + description: 28 + phandle for main iomuxc controller which shares the input select 29 + register for daisy chain settings. 30 + $ref: /schemas/types.yaml#/definitions/phandle 31 + 32 + # Client device subnode's properties 33 + patternProperties: 34 + 'grp$': 35 + type: object 36 + description: 37 + Pinctrl node's client devices use subnodes for desired pin configuration. 38 + Client device subnodes use below standard properties. 39 + 40 + properties: 41 + fsl,pins: 42 + description: 43 + each entry consists of 6 integers and represents the mux and config 44 + setting for one pin. The first 5 integers <mux_reg conf_reg input_reg 45 + mux_val input_val> are specified using a PIN_FUNC_ID macro, which can 46 + be found in <arch/arm/boot/dts/imx7d-pinfunc.h>. The last integer 47 + CONFIG is the pad setting value like pull-up on this pin. Please 48 + refer to i.MX7D Reference Manual for detailed CONFIG settings. 49 + $ref: /schemas/types.yaml#/definitions/uint32-matrix 50 + items: 51 + items: 52 + - description: | 53 + "mux_reg" indicates the offset of mux register. 54 + - description: | 55 + "conf_reg" indicates the offset of pad configuration register. 56 + - description: | 57 + "input_reg" indicates the offset of select input register. 58 + - description: | 59 + "mux_val" indicates the mux value to be applied. 60 + - description: | 61 + "input_val" indicates the select input value to be applied. 62 + - description: | 63 + "pad_setting" indicates the pad configuration value to be applied. 64 + 65 + required: 66 + - fsl,pins 67 + 68 + additionalProperties: false 69 + 70 + allOf: 71 + - $ref: "pinctrl.yaml#" 72 + 73 + required: 74 + - compatible 75 + - reg 76 + 77 + if: 78 + properties: 79 + compatible: 80 + contains: 81 + enum: 82 + - fsl,imx7d-iomuxc-lpsr 83 + 84 + then: 85 + required: 86 + - fsl,input-sel 87 + 88 + additionalProperties: false 89 + 90 + examples: 91 + - | 92 + iomuxc: pinctrl@30330000 { 93 + compatible = "fsl,imx7d-iomuxc"; 94 + reg = <0x30330000 0x10000>; 95 + 96 + pinctrl_uart5: uart5grp { 97 + fsl,pins = 98 + <0x0160 0x03D0 0x0714 0x1 0x0 0x7e>, 99 + <0x0164 0x03D4 0x0000 0x1 0x0 0x76>; 100 + }; 101 + }; 102 + - | 103 + iomuxc_lpsr: pinctrl@302c0000 { 104 + compatible = "fsl,imx7d-iomuxc-lpsr"; 105 + reg = <0x302c0000 0x10000>; 106 + fsl,input-sel = <&iomuxc>; 107 + 108 + pinctrl_gpio_lpsr: gpio1-grp { 109 + fsl,pins = 110 + <0x0008 0x0038 0x0000 0x0 0x0 0x59>, 111 + <0x000C 0x003C 0x0000 0x0 0x0 0x59>; 112 + }; 113 + };