18cc087a1SEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0 28cc087a1SEmmanuel Vadot%YAML 1.2 38cc087a1SEmmanuel Vadot--- 48cc087a1SEmmanuel Vadot$id: http://devicetree.org/schemas/pinctrl/rockchip,pinctrl.yaml# 58cc087a1SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 68cc087a1SEmmanuel Vadot 78cc087a1SEmmanuel Vadottitle: Rockchip Pinmux Controller 88cc087a1SEmmanuel Vadot 98cc087a1SEmmanuel Vadotmaintainers: 108cc087a1SEmmanuel Vadot - Heiko Stuebner <heiko@sntech.de> 118cc087a1SEmmanuel Vadot 128cc087a1SEmmanuel Vadotdescription: | 138cc087a1SEmmanuel Vadot The Rockchip Pinmux Controller enables the IC to share one PAD 148cc087a1SEmmanuel Vadot to several functional blocks. The sharing is done by multiplexing 158cc087a1SEmmanuel Vadot the PAD input/output signals. For each PAD there are several muxing 168cc087a1SEmmanuel Vadot options with option 0 being used as a GPIO. 178cc087a1SEmmanuel Vadot 188cc087a1SEmmanuel Vadot Please refer to pinctrl-bindings.txt in this directory for details of the 198cc087a1SEmmanuel Vadot common pinctrl bindings used by client devices, including the meaning of the 208cc087a1SEmmanuel Vadot phrase "pin configuration node". 218cc087a1SEmmanuel Vadot 228cc087a1SEmmanuel Vadot The Rockchip pin configuration node is a node of a group of pins which can be 238cc087a1SEmmanuel Vadot used for a specific device or function. This node represents both mux and 248cc087a1SEmmanuel Vadot config of the pins in that group. The 'pins' selects the function mode 258cc087a1SEmmanuel Vadot (also named pin mode) this pin can work on and the 'config' configures 268cc087a1SEmmanuel Vadot various pad settings such as pull-up, etc. 278cc087a1SEmmanuel Vadot 288cc087a1SEmmanuel Vadot The pins are grouped into up to 9 individual pin banks which need to be 298cc087a1SEmmanuel Vadot defined as gpio sub-nodes of the pinmux controller. 308cc087a1SEmmanuel Vadot 318cc087a1SEmmanuel Vadotproperties: 328cc087a1SEmmanuel Vadot compatible: 338cc087a1SEmmanuel Vadot enum: 348cc087a1SEmmanuel Vadot - rockchip,px30-pinctrl 358cc087a1SEmmanuel Vadot - rockchip,rk2928-pinctrl 36d5b0e70fSEmmanuel Vadot - rockchip,rk3036-pinctrl 378cc087a1SEmmanuel Vadot - rockchip,rk3066a-pinctrl 388cc087a1SEmmanuel Vadot - rockchip,rk3066b-pinctrl 398cc087a1SEmmanuel Vadot - rockchip,rk3128-pinctrl 408cc087a1SEmmanuel Vadot - rockchip,rk3188-pinctrl 418cc087a1SEmmanuel Vadot - rockchip,rk3228-pinctrl 428cc087a1SEmmanuel Vadot - rockchip,rk3288-pinctrl 438cc087a1SEmmanuel Vadot - rockchip,rk3308-pinctrl 448cc087a1SEmmanuel Vadot - rockchip,rk3328-pinctrl 458cc087a1SEmmanuel Vadot - rockchip,rk3368-pinctrl 468cc087a1SEmmanuel Vadot - rockchip,rk3399-pinctrl 478cc087a1SEmmanuel Vadot - rockchip,rk3568-pinctrl 48d5b0e70fSEmmanuel Vadot - rockchip,rk3588-pinctrl 498cc087a1SEmmanuel Vadot - rockchip,rv1108-pinctrl 507ef62cebSEmmanuel Vadot - rockchip,rv1126-pinctrl 518cc087a1SEmmanuel Vadot 528cc087a1SEmmanuel Vadot rockchip,grf: 53fac71e4eSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/phandle 548cc087a1SEmmanuel Vadot description: 558cc087a1SEmmanuel Vadot The phandle of the syscon node for the GRF registers. 568cc087a1SEmmanuel Vadot 578cc087a1SEmmanuel Vadot rockchip,pmu: 58fac71e4eSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/phandle 598cc087a1SEmmanuel Vadot description: 608cc087a1SEmmanuel Vadot The phandle of the syscon node for the PMU registers, 618cc087a1SEmmanuel Vadot as some SoCs carry parts of the iomux controller registers there. 628cc087a1SEmmanuel Vadot Required for at least rk3188 and rk3288. On the rk3368 this should 638cc087a1SEmmanuel Vadot point to the PMUGRF syscon. 648cc087a1SEmmanuel Vadot 658cc087a1SEmmanuel Vadot "#address-cells": 668cc087a1SEmmanuel Vadot enum: [1, 2] 678cc087a1SEmmanuel Vadot 688cc087a1SEmmanuel Vadot "#size-cells": 698cc087a1SEmmanuel Vadot enum: [1, 2] 708cc087a1SEmmanuel Vadot 718cc087a1SEmmanuel Vadot ranges: true 728cc087a1SEmmanuel Vadot 73e67e8565SEmmanuel VadotallOf: 74fac71e4eSEmmanuel Vadot - $ref: pinctrl.yaml# 75e67e8565SEmmanuel Vadot 768cc087a1SEmmanuel Vadotrequired: 778cc087a1SEmmanuel Vadot - compatible 788cc087a1SEmmanuel Vadot - rockchip,grf 798cc087a1SEmmanuel Vadot 808cc087a1SEmmanuel VadotpatternProperties: 818cc087a1SEmmanuel Vadot "gpio@[0-9a-f]+$": 828cc087a1SEmmanuel Vadot type: object 838cc087a1SEmmanuel Vadot 84fac71e4eSEmmanuel Vadot $ref: /schemas/gpio/rockchip,gpio-bank.yaml# 85cb7aa33aSEmmanuel Vadot deprecated: true 868cc087a1SEmmanuel Vadot 878cc087a1SEmmanuel Vadot unevaluatedProperties: false 888cc087a1SEmmanuel Vadot 898cc087a1SEmmanuel Vadot "pcfg-[a-z0-9-]+$": 908cc087a1SEmmanuel Vadot type: object 918cc087a1SEmmanuel Vadot properties: 928cc087a1SEmmanuel Vadot bias-disable: true 938cc087a1SEmmanuel Vadot 948cc087a1SEmmanuel Vadot bias-pull-down: true 958cc087a1SEmmanuel Vadot 968cc087a1SEmmanuel Vadot bias-pull-pin-default: true 978cc087a1SEmmanuel Vadot 988cc087a1SEmmanuel Vadot bias-pull-up: true 998cc087a1SEmmanuel Vadot 1008cc087a1SEmmanuel Vadot drive-strength: 1018cc087a1SEmmanuel Vadot minimum: 0 1028cc087a1SEmmanuel Vadot maximum: 20 1038cc087a1SEmmanuel Vadot 1048cc087a1SEmmanuel Vadot input-enable: true 1058cc087a1SEmmanuel Vadot 1068cc087a1SEmmanuel Vadot input-schmitt-enable: true 1078cc087a1SEmmanuel Vadot 1088cc087a1SEmmanuel Vadot output-high: true 1098cc087a1SEmmanuel Vadot 1108cc087a1SEmmanuel Vadot output-low: true 1118cc087a1SEmmanuel Vadot 1128cc087a1SEmmanuel Vadot additionalProperties: false 1138cc087a1SEmmanuel Vadot 1148cc087a1SEmmanuel VadotadditionalProperties: 1158cc087a1SEmmanuel Vadot type: object 1168cc087a1SEmmanuel Vadot additionalProperties: 1178cc087a1SEmmanuel Vadot type: object 118*84943d6fSEmmanuel Vadot additionalProperties: false 119*84943d6fSEmmanuel Vadot 1208cc087a1SEmmanuel Vadot properties: 1218cc087a1SEmmanuel Vadot rockchip,pins: 122fac71e4eSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32-matrix 1238cc087a1SEmmanuel Vadot minItems: 1 1248cc087a1SEmmanuel Vadot items: 1258cc087a1SEmmanuel Vadot items: 1268cc087a1SEmmanuel Vadot - minimum: 0 1278cc087a1SEmmanuel Vadot maximum: 8 1288cc087a1SEmmanuel Vadot description: 1298cc087a1SEmmanuel Vadot Pin bank. 1308cc087a1SEmmanuel Vadot - minimum: 0 1318cc087a1SEmmanuel Vadot maximum: 31 1328cc087a1SEmmanuel Vadot description: 1338cc087a1SEmmanuel Vadot Pin bank index. 1348cc087a1SEmmanuel Vadot - minimum: 0 1358bab661aSEmmanuel Vadot maximum: 13 1368cc087a1SEmmanuel Vadot description: 1378cc087a1SEmmanuel Vadot Mux 0 means GPIO and mux 1 to N means 1388cc087a1SEmmanuel Vadot the specific device function. 1398cc087a1SEmmanuel Vadot - description: 1408cc087a1SEmmanuel Vadot The phandle of a node contains the generic pinconfig options 1418cc087a1SEmmanuel Vadot to use as described in pinctrl-bindings.txt. 1428cc087a1SEmmanuel Vadot 1438cc087a1SEmmanuel Vadotexamples: 1448cc087a1SEmmanuel Vadot - | 1458cc087a1SEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 1468cc087a1SEmmanuel Vadot #include <dt-bindings/pinctrl/rockchip.h> 1478cc087a1SEmmanuel Vadot 1488cc087a1SEmmanuel Vadot pinctrl: pinctrl { 1498cc087a1SEmmanuel Vadot compatible = "rockchip,rk3066a-pinctrl"; 1508cc087a1SEmmanuel Vadot rockchip,grf = <&grf>; 1518cc087a1SEmmanuel Vadot 1528cc087a1SEmmanuel Vadot #address-cells = <1>; 1538cc087a1SEmmanuel Vadot #size-cells = <1>; 1548cc087a1SEmmanuel Vadot ranges; 1558cc087a1SEmmanuel Vadot 1568cc087a1SEmmanuel Vadot gpio0: gpio@20034000 { 1578cc087a1SEmmanuel Vadot compatible = "rockchip,gpio-bank"; 1588cc087a1SEmmanuel Vadot reg = <0x20034000 0x100>; 1598cc087a1SEmmanuel Vadot interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>; 1608cc087a1SEmmanuel Vadot clocks = <&clk_gates8 9>; 1618cc087a1SEmmanuel Vadot 1628cc087a1SEmmanuel Vadot gpio-controller; 1638cc087a1SEmmanuel Vadot #gpio-cells = <2>; 1648cc087a1SEmmanuel Vadot 1658cc087a1SEmmanuel Vadot interrupt-controller; 1668cc087a1SEmmanuel Vadot #interrupt-cells = <2>; 1678cc087a1SEmmanuel Vadot }; 1688cc087a1SEmmanuel Vadot 1698cc087a1SEmmanuel Vadot pcfg_pull_default: pcfg-pull-default { 1708cc087a1SEmmanuel Vadot bias-pull-pin-default; 1718cc087a1SEmmanuel Vadot }; 1728cc087a1SEmmanuel Vadot 1738cc087a1SEmmanuel Vadot uart2 { 1748cc087a1SEmmanuel Vadot uart2_xfer: uart2-xfer { 1758cc087a1SEmmanuel Vadot rockchip,pins = <1 RK_PB0 1 &pcfg_pull_default>, 1768cc087a1SEmmanuel Vadot <1 RK_PB1 1 &pcfg_pull_default>; 1778cc087a1SEmmanuel Vadot }; 1788cc087a1SEmmanuel Vadot }; 1798cc087a1SEmmanuel Vadot }; 1808cc087a1SEmmanuel Vadot 1818cc087a1SEmmanuel Vadot uart2: serial@20064000 { 1828cc087a1SEmmanuel Vadot compatible = "snps,dw-apb-uart"; 1838cc087a1SEmmanuel Vadot reg = <0x20064000 0x400>; 1848cc087a1SEmmanuel Vadot interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>; 1858cc087a1SEmmanuel Vadot clocks = <&mux_uart2>; 1868cc087a1SEmmanuel Vadot pinctrl-0 = <&uart2_xfer>; 1878cc087a1SEmmanuel Vadot pinctrl-names = "default"; 1888cc087a1SEmmanuel Vadot reg-io-width = <1>; 1898cc087a1SEmmanuel Vadot reg-shift = <2>; 1908cc087a1SEmmanuel Vadot }; 191