1c3efe045SJohan Jonker# SPDX-License-Identifier: GPL-2.0 2c3efe045SJohan Jonker%YAML 1.2 3c3efe045SJohan Jonker--- 4c3efe045SJohan Jonker$id: http://devicetree.org/schemas/pinctrl/rockchip,pinctrl.yaml# 5c3efe045SJohan Jonker$schema: http://devicetree.org/meta-schemas/core.yaml# 6c3efe045SJohan Jonker 7c3efe045SJohan Jonkertitle: Rockchip Pinmux Controller 8c3efe045SJohan Jonker 9c3efe045SJohan Jonkermaintainers: 10c3efe045SJohan Jonker - Heiko Stuebner <heiko@sntech.de> 11c3efe045SJohan Jonker 12c3efe045SJohan Jonkerdescription: | 13c3efe045SJohan Jonker The Rockchip Pinmux Controller enables the IC to share one PAD 14c3efe045SJohan Jonker to several functional blocks. The sharing is done by multiplexing 15c3efe045SJohan Jonker the PAD input/output signals. For each PAD there are several muxing 16c3efe045SJohan Jonker options with option 0 being used as a GPIO. 17c3efe045SJohan Jonker 18c3efe045SJohan Jonker Please refer to pinctrl-bindings.txt in this directory for details of the 19c3efe045SJohan Jonker common pinctrl bindings used by client devices, including the meaning of the 20c3efe045SJohan Jonker phrase "pin configuration node". 21c3efe045SJohan Jonker 22c3efe045SJohan Jonker The Rockchip pin configuration node is a node of a group of pins which can be 23c3efe045SJohan Jonker used for a specific device or function. This node represents both mux and 24c3efe045SJohan Jonker config of the pins in that group. The 'pins' selects the function mode 25c3efe045SJohan Jonker (also named pin mode) this pin can work on and the 'config' configures 26c3efe045SJohan Jonker various pad settings such as pull-up, etc. 27c3efe045SJohan Jonker 28c3efe045SJohan Jonker The pins are grouped into up to 9 individual pin banks which need to be 29c3efe045SJohan Jonker defined as gpio sub-nodes of the pinmux controller. 30c3efe045SJohan Jonker 31c3efe045SJohan Jonkerproperties: 32c3efe045SJohan Jonker compatible: 33c3efe045SJohan Jonker enum: 34c3efe045SJohan Jonker - rockchip,px30-pinctrl 35c3efe045SJohan Jonker - rockchip,rk2928-pinctrl 36f01143f2SJohan Jonker - rockchip,rk3036-pinctrl 37c3efe045SJohan Jonker - rockchip,rk3066a-pinctrl 38c3efe045SJohan Jonker - rockchip,rk3066b-pinctrl 39c3efe045SJohan Jonker - rockchip,rk3128-pinctrl 40c3efe045SJohan Jonker - rockchip,rk3188-pinctrl 41c3efe045SJohan Jonker - rockchip,rk3228-pinctrl 42c3efe045SJohan Jonker - rockchip,rk3288-pinctrl 43c3efe045SJohan Jonker - rockchip,rk3308-pinctrl 44c3efe045SJohan Jonker - rockchip,rk3328-pinctrl 45c3efe045SJohan Jonker - rockchip,rk3368-pinctrl 46c3efe045SJohan Jonker - rockchip,rk3399-pinctrl 47c3efe045SJohan Jonker - rockchip,rk3568-pinctrl 4830b7fa3aSSebastian Reichel - rockchip,rk3588-pinctrl 49c3efe045SJohan Jonker - rockchip,rv1108-pinctrl 502dce5027SJagan Teki - rockchip,rv1126-pinctrl 51c3efe045SJohan Jonker 52c3efe045SJohan Jonker rockchip,grf: 53*49cd1dd1SRob Herring $ref: /schemas/types.yaml#/definitions/phandle 54c3efe045SJohan Jonker description: 55c3efe045SJohan Jonker The phandle of the syscon node for the GRF registers. 56c3efe045SJohan Jonker 57c3efe045SJohan Jonker rockchip,pmu: 58*49cd1dd1SRob Herring $ref: /schemas/types.yaml#/definitions/phandle 59c3efe045SJohan Jonker description: 60c3efe045SJohan Jonker The phandle of the syscon node for the PMU registers, 61c3efe045SJohan Jonker as some SoCs carry parts of the iomux controller registers there. 62c3efe045SJohan Jonker Required for at least rk3188 and rk3288. On the rk3368 this should 63c3efe045SJohan Jonker point to the PMUGRF syscon. 64c3efe045SJohan Jonker 65c3efe045SJohan Jonker "#address-cells": 66c3efe045SJohan Jonker enum: [1, 2] 67c3efe045SJohan Jonker 68c3efe045SJohan Jonker "#size-cells": 69c3efe045SJohan Jonker enum: [1, 2] 70c3efe045SJohan Jonker 71c3efe045SJohan Jonker ranges: true 72c3efe045SJohan Jonker 73c09acbc4SRafał MiłeckiallOf: 74*49cd1dd1SRob Herring - $ref: pinctrl.yaml# 75c09acbc4SRafał Miłecki 76c3efe045SJohan Jonkerrequired: 77c3efe045SJohan Jonker - compatible 78c3efe045SJohan Jonker - rockchip,grf 79c3efe045SJohan Jonker 80c3efe045SJohan JonkerpatternProperties: 81c3efe045SJohan Jonker "gpio@[0-9a-f]+$": 82c3efe045SJohan Jonker type: object 83c3efe045SJohan Jonker 84*49cd1dd1SRob Herring $ref: /schemas/gpio/rockchip,gpio-bank.yaml# 859421655dSJohan Jonker deprecated: true 86c3efe045SJohan Jonker 87c3efe045SJohan Jonker unevaluatedProperties: false 88c3efe045SJohan Jonker 89c3efe045SJohan Jonker "pcfg-[a-z0-9-]+$": 90c3efe045SJohan Jonker type: object 91c3efe045SJohan Jonker properties: 92c3efe045SJohan Jonker bias-disable: true 93c3efe045SJohan Jonker 94c3efe045SJohan Jonker bias-pull-down: true 95c3efe045SJohan Jonker 96c3efe045SJohan Jonker bias-pull-pin-default: true 97c3efe045SJohan Jonker 98c3efe045SJohan Jonker bias-pull-up: true 99c3efe045SJohan Jonker 100c3efe045SJohan Jonker drive-strength: 101c3efe045SJohan Jonker minimum: 0 102c3efe045SJohan Jonker maximum: 20 103c3efe045SJohan Jonker 104c3efe045SJohan Jonker input-enable: true 105c3efe045SJohan Jonker 106c3efe045SJohan Jonker input-schmitt-enable: true 107c3efe045SJohan Jonker 108c3efe045SJohan Jonker output-high: true 109c3efe045SJohan Jonker 110c3efe045SJohan Jonker output-low: true 111c3efe045SJohan Jonker 112c3efe045SJohan Jonker additionalProperties: false 113c3efe045SJohan Jonker 114c3efe045SJohan JonkeradditionalProperties: 115c3efe045SJohan Jonker type: object 116c3efe045SJohan Jonker additionalProperties: 117c3efe045SJohan Jonker type: object 118c3efe045SJohan Jonker properties: 119c3efe045SJohan Jonker rockchip,pins: 120*49cd1dd1SRob Herring $ref: /schemas/types.yaml#/definitions/uint32-matrix 121c3efe045SJohan Jonker minItems: 1 122c3efe045SJohan Jonker items: 123c3efe045SJohan Jonker items: 124c3efe045SJohan Jonker - minimum: 0 125c3efe045SJohan Jonker maximum: 8 126c3efe045SJohan Jonker description: 127c3efe045SJohan Jonker Pin bank. 128c3efe045SJohan Jonker - minimum: 0 129c3efe045SJohan Jonker maximum: 31 130c3efe045SJohan Jonker description: 131c3efe045SJohan Jonker Pin bank index. 132c3efe045SJohan Jonker - minimum: 0 133da67eff5SSebastian Reichel maximum: 13 134c3efe045SJohan Jonker description: 135c3efe045SJohan Jonker Mux 0 means GPIO and mux 1 to N means 136c3efe045SJohan Jonker the specific device function. 137c3efe045SJohan Jonker - description: 138c3efe045SJohan Jonker The phandle of a node contains the generic pinconfig options 139c3efe045SJohan Jonker to use as described in pinctrl-bindings.txt. 140c3efe045SJohan Jonker 141c3efe045SJohan Jonkerexamples: 142c3efe045SJohan Jonker - | 143c3efe045SJohan Jonker #include <dt-bindings/interrupt-controller/arm-gic.h> 144c3efe045SJohan Jonker #include <dt-bindings/pinctrl/rockchip.h> 145c3efe045SJohan Jonker 146c3efe045SJohan Jonker pinctrl: pinctrl { 147c3efe045SJohan Jonker compatible = "rockchip,rk3066a-pinctrl"; 148c3efe045SJohan Jonker rockchip,grf = <&grf>; 149c3efe045SJohan Jonker 150c3efe045SJohan Jonker #address-cells = <1>; 151c3efe045SJohan Jonker #size-cells = <1>; 152c3efe045SJohan Jonker ranges; 153c3efe045SJohan Jonker 154c3efe045SJohan Jonker gpio0: gpio@20034000 { 155c3efe045SJohan Jonker compatible = "rockchip,gpio-bank"; 156c3efe045SJohan Jonker reg = <0x20034000 0x100>; 157c3efe045SJohan Jonker interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>; 158c3efe045SJohan Jonker clocks = <&clk_gates8 9>; 159c3efe045SJohan Jonker 160c3efe045SJohan Jonker gpio-controller; 161c3efe045SJohan Jonker #gpio-cells = <2>; 162c3efe045SJohan Jonker 163c3efe045SJohan Jonker interrupt-controller; 164c3efe045SJohan Jonker #interrupt-cells = <2>; 165c3efe045SJohan Jonker }; 166c3efe045SJohan Jonker 167c3efe045SJohan Jonker pcfg_pull_default: pcfg-pull-default { 168c3efe045SJohan Jonker bias-pull-pin-default; 169c3efe045SJohan Jonker }; 170c3efe045SJohan Jonker 171c3efe045SJohan Jonker uart2 { 172c3efe045SJohan Jonker uart2_xfer: uart2-xfer { 173c3efe045SJohan Jonker rockchip,pins = <1 RK_PB0 1 &pcfg_pull_default>, 174c3efe045SJohan Jonker <1 RK_PB1 1 &pcfg_pull_default>; 175c3efe045SJohan Jonker }; 176c3efe045SJohan Jonker }; 177c3efe045SJohan Jonker }; 178c3efe045SJohan Jonker 179c3efe045SJohan Jonker uart2: serial@20064000 { 180c3efe045SJohan Jonker compatible = "snps,dw-apb-uart"; 181c3efe045SJohan Jonker reg = <0x20064000 0x400>; 182c3efe045SJohan Jonker interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>; 183c3efe045SJohan Jonker clocks = <&mux_uart2>; 184c3efe045SJohan Jonker pinctrl-0 = <&uart2_xfer>; 185c3efe045SJohan Jonker pinctrl-names = "default"; 186c3efe045SJohan Jonker reg-io-width = <1>; 187c3efe045SJohan Jonker reg-shift = <2>; 188c3efe045SJohan Jonker }; 189