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

dt-bindings: pinctrl: Add StarFive JH7110 sys pinctrl

Add pinctrl bindings for StarFive JH7110 SoC sys pinctrl controller.

Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jianlong Huang <jianlong.huang@starfivetech.com>
Co-developed-by: Emil Renner Berthing <kernel@esmil.dk>
Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
Link: https://lore.kernel.org/r/20230209143702.44408-2-hal.feng@starfivetech.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

authored by

Jianlong Huang and committed by
Linus Walleij
d6e0a660 1ec033f0

+261 -2
+142
Documentation/devicetree/bindings/pinctrl/starfive,jh7110-sys-pinctrl.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/pinctrl/starfive,jh7110-sys-pinctrl.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: StarFive JH7110 SYS Pin Controller 8 + 9 + description: | 10 + Bindings for the JH7110 RISC-V SoC from StarFive Technology Ltd. 11 + 12 + Out of the SoC's many pins only the ones named PAD_GPIO0 to PAD_GPIO63 13 + can be multiplexed and have configurable bias, drive strength, 14 + schmitt trigger etc. 15 + Some peripherals have their I/O go through the 64 "GPIOs". This also 16 + includes a number of other UARTs, I2Cs, SPIs, PWMs etc. 17 + All these peripherals are connected to all 64 GPIOs such that 18 + any GPIO can be set up to be controlled by any of the peripherals. 19 + 20 + maintainers: 21 + - Jianlong Huang <jianlong.huang@starfivetech.com> 22 + 23 + properties: 24 + compatible: 25 + const: starfive,jh7110-sys-pinctrl 26 + 27 + reg: 28 + maxItems: 1 29 + 30 + clocks: 31 + maxItems: 1 32 + 33 + resets: 34 + maxItems: 1 35 + 36 + interrupts: 37 + maxItems: 1 38 + 39 + interrupt-controller: true 40 + 41 + '#interrupt-cells': 42 + const: 2 43 + 44 + gpio-controller: true 45 + 46 + '#gpio-cells': 47 + const: 2 48 + 49 + patternProperties: 50 + '-[0-9]+$': 51 + type: object 52 + additionalProperties: false 53 + patternProperties: 54 + '-pins$': 55 + type: object 56 + description: | 57 + A pinctrl node should contain at least one subnode representing the 58 + pinctrl groups available on the machine. Each subnode will list the 59 + pins it needs, and how they should be configured, with regard to 60 + muxer configuration, bias, input enable/disable, input schmitt 61 + trigger enable/disable, slew-rate and drive strength. 62 + allOf: 63 + - $ref: /schemas/pinctrl/pincfg-node.yaml 64 + - $ref: /schemas/pinctrl/pinmux-node.yaml 65 + additionalProperties: false 66 + 67 + properties: 68 + pinmux: 69 + description: | 70 + The list of GPIOs and their mux settings that properties in the 71 + node apply to. This should be set using the GPIOMUX or PINMUX 72 + macros. 73 + 74 + bias-disable: true 75 + 76 + bias-pull-up: 77 + type: boolean 78 + 79 + bias-pull-down: 80 + type: boolean 81 + 82 + drive-strength: 83 + enum: [ 2, 4, 8, 12 ] 84 + 85 + input-enable: true 86 + 87 + input-disable: true 88 + 89 + input-schmitt-enable: true 90 + 91 + input-schmitt-disable: true 92 + 93 + slew-rate: 94 + maximum: 1 95 + 96 + required: 97 + - compatible 98 + - reg 99 + - clocks 100 + - interrupts 101 + - interrupt-controller 102 + - '#interrupt-cells' 103 + - gpio-controller 104 + - '#gpio-cells' 105 + 106 + additionalProperties: false 107 + 108 + examples: 109 + - | 110 + pinctrl@13040000 { 111 + compatible = "starfive,jh7110-sys-pinctrl"; 112 + reg = <0x13040000 0x10000>; 113 + clocks = <&syscrg 112>; 114 + resets = <&syscrg 2>; 115 + interrupts = <86>; 116 + interrupt-controller; 117 + #interrupt-cells = <2>; 118 + gpio-controller; 119 + #gpio-cells = <2>; 120 + 121 + uart0-0 { 122 + tx-pins { 123 + pinmux = <0xff140005>; 124 + bias-disable; 125 + drive-strength = <12>; 126 + input-disable; 127 + input-schmitt-disable; 128 + slew-rate = <0>; 129 + }; 130 + 131 + rx-pins { 132 + pinmux = <0x0E000406>; 133 + bias-pull-up; 134 + drive-strength = <2>; 135 + input-enable; 136 + input-schmitt-enable; 137 + slew-rate = <0>; 138 + }; 139 + }; 140 + }; 141 + 142 + ...
+4 -2
MAINTAINERS
··· 19890 19890 F: drivers/clk/starfive/clk-starfive-jh7100* 19891 19891 F: include/dt-bindings/clock/starfive-jh7100*.h 19892 19892 19893 - STARFIVE JH7100 PINCTRL DRIVER 19893 + STARFIVE JH71X0 PINCTRL DRIVERS 19894 19894 M: Emil Renner Berthing <kernel@esmil.dk> 19895 + M: Jianlong Huang <jianlong.huang@starfivetech.com> 19895 19896 L: linux-gpio@vger.kernel.org 19896 19897 S: Maintained 19897 - F: Documentation/devicetree/bindings/pinctrl/starfive,jh7100-pinctrl.yaml 19898 + F: Documentation/devicetree/bindings/pinctrl/starfive,jh71*.yaml 19898 19899 F: drivers/pinctrl/starfive/ 19899 19900 F: include/dt-bindings/pinctrl/pinctrl-starfive-jh7100.h 19901 + F: include/dt-bindings/pinctrl/starfive,jh7110-pinctrl.h 19900 19902 19901 19903 STARFIVE JH7100 RESET CONTROLLER DRIVER 19902 19904 M: Emil Renner Berthing <kernel@esmil.dk>
+115
include/dt-bindings/pinctrl/starfive,jh7110-pinctrl.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 OR MIT */ 2 + /* 3 + * Copyright (C) 2022 Emil Renner Berthing <kernel@esmil.dk> 4 + * Copyright (C) 2022 StarFive Technology Co., Ltd. 5 + */ 6 + 7 + #ifndef __DT_BINDINGS_PINCTRL_STARFIVE_JH7110_H__ 8 + #define __DT_BINDINGS_PINCTRL_STARFIVE_JH7110_H__ 9 + 10 + /* sys_iomux pins */ 11 + #define PAD_GPIO0 0 12 + #define PAD_GPIO1 1 13 + #define PAD_GPIO2 2 14 + #define PAD_GPIO3 3 15 + #define PAD_GPIO4 4 16 + #define PAD_GPIO5 5 17 + #define PAD_GPIO6 6 18 + #define PAD_GPIO7 7 19 + #define PAD_GPIO8 8 20 + #define PAD_GPIO9 9 21 + #define PAD_GPIO10 10 22 + #define PAD_GPIO11 11 23 + #define PAD_GPIO12 12 24 + #define PAD_GPIO13 13 25 + #define PAD_GPIO14 14 26 + #define PAD_GPIO15 15 27 + #define PAD_GPIO16 16 28 + #define PAD_GPIO17 17 29 + #define PAD_GPIO18 18 30 + #define PAD_GPIO19 19 31 + #define PAD_GPIO20 20 32 + #define PAD_GPIO21 21 33 + #define PAD_GPIO22 22 34 + #define PAD_GPIO23 23 35 + #define PAD_GPIO24 24 36 + #define PAD_GPIO25 25 37 + #define PAD_GPIO26 26 38 + #define PAD_GPIO27 27 39 + #define PAD_GPIO28 28 40 + #define PAD_GPIO29 29 41 + #define PAD_GPIO30 30 42 + #define PAD_GPIO31 31 43 + #define PAD_GPIO32 32 44 + #define PAD_GPIO33 33 45 + #define PAD_GPIO34 34 46 + #define PAD_GPIO35 35 47 + #define PAD_GPIO36 36 48 + #define PAD_GPIO37 37 49 + #define PAD_GPIO38 38 50 + #define PAD_GPIO39 39 51 + #define PAD_GPIO40 40 52 + #define PAD_GPIO41 41 53 + #define PAD_GPIO42 42 54 + #define PAD_GPIO43 43 55 + #define PAD_GPIO44 44 56 + #define PAD_GPIO45 45 57 + #define PAD_GPIO46 46 58 + #define PAD_GPIO47 47 59 + #define PAD_GPIO48 48 60 + #define PAD_GPIO49 49 61 + #define PAD_GPIO50 50 62 + #define PAD_GPIO51 51 63 + #define PAD_GPIO52 52 64 + #define PAD_GPIO53 53 65 + #define PAD_GPIO54 54 66 + #define PAD_GPIO55 55 67 + #define PAD_GPIO56 56 68 + #define PAD_GPIO57 57 69 + #define PAD_GPIO58 58 70 + #define PAD_GPIO59 59 71 + #define PAD_GPIO60 60 72 + #define PAD_GPIO61 61 73 + #define PAD_GPIO62 62 74 + #define PAD_GPIO63 63 75 + #define PAD_SD0_CLK 64 76 + #define PAD_SD0_CMD 65 77 + #define PAD_SD0_DATA0 66 78 + #define PAD_SD0_DATA1 67 79 + #define PAD_SD0_DATA2 68 80 + #define PAD_SD0_DATA3 69 81 + #define PAD_SD0_DATA4 70 82 + #define PAD_SD0_DATA5 71 83 + #define PAD_SD0_DATA6 72 84 + #define PAD_SD0_DATA7 73 85 + #define PAD_SD0_STRB 74 86 + #define PAD_GMAC1_MDC 75 87 + #define PAD_GMAC1_MDIO 76 88 + #define PAD_GMAC1_RXD0 77 89 + #define PAD_GMAC1_RXD1 78 90 + #define PAD_GMAC1_RXD2 79 91 + #define PAD_GMAC1_RXD3 80 92 + #define PAD_GMAC1_RXDV 81 93 + #define PAD_GMAC1_RXC 82 94 + #define PAD_GMAC1_TXD0 83 95 + #define PAD_GMAC1_TXD1 84 96 + #define PAD_GMAC1_TXD2 85 97 + #define PAD_GMAC1_TXD3 86 98 + #define PAD_GMAC1_TXEN 87 99 + #define PAD_GMAC1_TXC 88 100 + #define PAD_QSPI_SCLK 89 101 + #define PAD_QSPI_CS0 90 102 + #define PAD_QSPI_DATA0 91 103 + #define PAD_QSPI_DATA1 92 104 + #define PAD_QSPI_DATA2 93 105 + #define PAD_QSPI_DATA3 94 106 + 107 + #define GPOUT_LOW 0 108 + #define GPOUT_HIGH 1 109 + 110 + #define GPOEN_ENABLE 0 111 + #define GPOEN_DISABLE 1 112 + 113 + #define GPI_NONE 255 114 + 115 + #endif