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 48*12330590SDetlev Casanova - rockchip,rk3576-pinctrl 4930b7fa3aSSebastian Reichel - rockchip,rk3588-pinctrl 50c3efe045SJohan Jonker - rockchip,rv1108-pinctrl 512dce5027SJagan Teki - rockchip,rv1126-pinctrl 52c3efe045SJohan Jonker 53c3efe045SJohan Jonker rockchip,grf: 5449cd1dd1SRob Herring $ref: /schemas/types.yaml#/definitions/phandle 55c3efe045SJohan Jonker description: 56c3efe045SJohan Jonker The phandle of the syscon node for the GRF registers. 57c3efe045SJohan Jonker 58c3efe045SJohan Jonker rockchip,pmu: 5949cd1dd1SRob Herring $ref: /schemas/types.yaml#/definitions/phandle 60c3efe045SJohan Jonker description: 61c3efe045SJohan Jonker The phandle of the syscon node for the PMU registers, 62c3efe045SJohan Jonker as some SoCs carry parts of the iomux controller registers there. 63c3efe045SJohan Jonker Required for at least rk3188 and rk3288. On the rk3368 this should 64c3efe045SJohan Jonker point to the PMUGRF syscon. 65c3efe045SJohan Jonker 66c3efe045SJohan Jonker "#address-cells": 67c3efe045SJohan Jonker enum: [1, 2] 68c3efe045SJohan Jonker 69c3efe045SJohan Jonker "#size-cells": 70c3efe045SJohan Jonker enum: [1, 2] 71c3efe045SJohan Jonker 72c3efe045SJohan Jonker ranges: true 73c3efe045SJohan Jonker 74c09acbc4SRafał MiłeckiallOf: 7549cd1dd1SRob Herring - $ref: pinctrl.yaml# 76c09acbc4SRafał Miłecki 77c3efe045SJohan Jonkerrequired: 78c3efe045SJohan Jonker - compatible 79c3efe045SJohan Jonker - rockchip,grf 80c3efe045SJohan Jonker 81c3efe045SJohan JonkerpatternProperties: 82c3efe045SJohan Jonker "gpio@[0-9a-f]+$": 83c3efe045SJohan Jonker type: object 84c3efe045SJohan Jonker 8549cd1dd1SRob Herring $ref: /schemas/gpio/rockchip,gpio-bank.yaml# 869421655dSJohan Jonker deprecated: true 87c3efe045SJohan Jonker 88c3efe045SJohan Jonker unevaluatedProperties: false 89c3efe045SJohan Jonker 90c3efe045SJohan Jonker "pcfg-[a-z0-9-]+$": 91c3efe045SJohan Jonker type: object 92c3efe045SJohan Jonker properties: 93c3efe045SJohan Jonker bias-disable: true 94c3efe045SJohan Jonker 95c3efe045SJohan Jonker bias-pull-down: true 96c3efe045SJohan Jonker 97c3efe045SJohan Jonker bias-pull-pin-default: true 98c3efe045SJohan Jonker 99c3efe045SJohan Jonker bias-pull-up: true 100c3efe045SJohan Jonker 101c3efe045SJohan Jonker drive-strength: 102c3efe045SJohan Jonker minimum: 0 103c3efe045SJohan Jonker maximum: 20 104c3efe045SJohan Jonker 105c3efe045SJohan Jonker input-enable: true 106c3efe045SJohan Jonker 107c3efe045SJohan Jonker input-schmitt-enable: true 108c3efe045SJohan Jonker 109c3efe045SJohan Jonker output-high: true 110c3efe045SJohan Jonker 111c3efe045SJohan Jonker output-low: true 112c3efe045SJohan Jonker 113c3efe045SJohan Jonker additionalProperties: false 114c3efe045SJohan Jonker 115c3efe045SJohan JonkeradditionalProperties: 116c3efe045SJohan Jonker type: object 117c3efe045SJohan Jonker additionalProperties: 118c3efe045SJohan Jonker type: object 119caaeb8c5SRob Herring additionalProperties: false 120caaeb8c5SRob Herring 121c3efe045SJohan Jonker properties: 122c3efe045SJohan Jonker rockchip,pins: 12349cd1dd1SRob Herring $ref: /schemas/types.yaml#/definitions/uint32-matrix 124c3efe045SJohan Jonker minItems: 1 125c3efe045SJohan Jonker items: 126c3efe045SJohan Jonker items: 127c3efe045SJohan Jonker - minimum: 0 128c3efe045SJohan Jonker maximum: 8 129c3efe045SJohan Jonker description: 130c3efe045SJohan Jonker Pin bank. 131c3efe045SJohan Jonker - minimum: 0 132c3efe045SJohan Jonker maximum: 31 133c3efe045SJohan Jonker description: 134c3efe045SJohan Jonker Pin bank index. 135c3efe045SJohan Jonker - minimum: 0 136da67eff5SSebastian Reichel maximum: 13 137c3efe045SJohan Jonker description: 138c3efe045SJohan Jonker Mux 0 means GPIO and mux 1 to N means 139c3efe045SJohan Jonker the specific device function. 140c3efe045SJohan Jonker - description: 141c3efe045SJohan Jonker The phandle of a node contains the generic pinconfig options 142c3efe045SJohan Jonker to use as described in pinctrl-bindings.txt. 143c3efe045SJohan Jonker 144c3efe045SJohan Jonkerexamples: 145c3efe045SJohan Jonker - | 146c3efe045SJohan Jonker #include <dt-bindings/interrupt-controller/arm-gic.h> 147c3efe045SJohan Jonker #include <dt-bindings/pinctrl/rockchip.h> 148c3efe045SJohan Jonker 149c3efe045SJohan Jonker pinctrl: pinctrl { 150c3efe045SJohan Jonker compatible = "rockchip,rk3066a-pinctrl"; 151c3efe045SJohan Jonker rockchip,grf = <&grf>; 152c3efe045SJohan Jonker 153c3efe045SJohan Jonker #address-cells = <1>; 154c3efe045SJohan Jonker #size-cells = <1>; 155c3efe045SJohan Jonker ranges; 156c3efe045SJohan Jonker 157c3efe045SJohan Jonker gpio0: gpio@20034000 { 158c3efe045SJohan Jonker compatible = "rockchip,gpio-bank"; 159c3efe045SJohan Jonker reg = <0x20034000 0x100>; 160c3efe045SJohan Jonker interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>; 161c3efe045SJohan Jonker clocks = <&clk_gates8 9>; 162c3efe045SJohan Jonker 163c3efe045SJohan Jonker gpio-controller; 164c3efe045SJohan Jonker #gpio-cells = <2>; 165c3efe045SJohan Jonker 166c3efe045SJohan Jonker interrupt-controller; 167c3efe045SJohan Jonker #interrupt-cells = <2>; 168c3efe045SJohan Jonker }; 169c3efe045SJohan Jonker 170c3efe045SJohan Jonker pcfg_pull_default: pcfg-pull-default { 171c3efe045SJohan Jonker bias-pull-pin-default; 172c3efe045SJohan Jonker }; 173c3efe045SJohan Jonker 174c3efe045SJohan Jonker uart2 { 175c3efe045SJohan Jonker uart2_xfer: uart2-xfer { 176c3efe045SJohan Jonker rockchip,pins = <1 RK_PB0 1 &pcfg_pull_default>, 177c3efe045SJohan Jonker <1 RK_PB1 1 &pcfg_pull_default>; 178c3efe045SJohan Jonker }; 179c3efe045SJohan Jonker }; 180c3efe045SJohan Jonker }; 181c3efe045SJohan Jonker 182c3efe045SJohan Jonker uart2: serial@20064000 { 183c3efe045SJohan Jonker compatible = "snps,dw-apb-uart"; 184c3efe045SJohan Jonker reg = <0x20064000 0x400>; 185c3efe045SJohan Jonker interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>; 186c3efe045SJohan Jonker clocks = <&mux_uart2>; 187c3efe045SJohan Jonker pinctrl-0 = <&uart2_xfer>; 188c3efe045SJohan Jonker pinctrl-names = "default"; 189c3efe045SJohan Jonker reg-io-width = <1>; 190c3efe045SJohan Jonker reg-shift = <2>; 191c3efe045SJohan Jonker }; 192