2013-06-11 04:16:22 +08:00
|
|
|
* Rockchip Pinmux Controller
|
|
|
|
|
|
|
|
The Rockchip Pinmux Controller, enables the IC
|
|
|
|
to share one PAD to several functional blocks. The sharing is done by
|
2014-08-09 06:29:09 +08:00
|
|
|
multiplexing the PAD input/output signals. For each PAD there are several
|
|
|
|
muxing options with option 0 being the use as a GPIO.
|
2013-06-11 04:16:22 +08:00
|
|
|
|
|
|
|
Please refer to pinctrl-bindings.txt in this directory for details of the
|
|
|
|
common pinctrl bindings used by client devices, including the meaning of the
|
|
|
|
phrase "pin configuration node".
|
|
|
|
|
|
|
|
The Rockchip pin configuration node is a node of a group of pins which can be
|
|
|
|
used for a specific device or function. This node represents both mux and
|
|
|
|
config of the pins in that group. The 'pins' selects the function mode(also
|
|
|
|
named pin mode) this pin can work on and the 'config' configures various pad
|
|
|
|
settings such as pull-up, etc.
|
|
|
|
|
|
|
|
The pins are grouped into up to 5 individual pin banks which need to be
|
|
|
|
defined as gpio sub-nodes of the pinmux controller.
|
|
|
|
|
|
|
|
Required properties for iomux controller:
|
|
|
|
- compatible: one of "rockchip,rk2928-pinctrl", "rockchip,rk3066a-pinctrl"
|
|
|
|
"rockchip,rk3066b-pinctrl", "rockchip,rk3188-pinctrl"
|
2015-12-09 17:04:06 +08:00
|
|
|
"rockchip,rk3228-pinctrl", "rockchip,rk3288-pinctrl"
|
2016-02-01 10:58:21 +08:00
|
|
|
"rockchip,rk3368-pinctrl", "rockchip,rk3399-pinctrl"
|
2014-05-05 20:00:11 +08:00
|
|
|
- rockchip,grf: phandle referencing a syscon providing the
|
|
|
|
"general register files"
|
|
|
|
|
|
|
|
Optional properties for iomux controller:
|
|
|
|
- rockchip,pmu: phandle referencing a syscon providing the pmu registers
|
|
|
|
as some SoCs carry parts of the iomux controller registers there.
|
2015-06-13 05:51:01 +08:00
|
|
|
Required for at least rk3188 and rk3288. On the rk3368 this should
|
|
|
|
point to the PMUGRF syscon.
|
2014-05-05 20:00:11 +08:00
|
|
|
|
|
|
|
Deprecated properties for iomux controller:
|
2013-10-16 07:08:42 +08:00
|
|
|
- reg: first element is the general register space of the iomux controller
|
2014-05-05 19:58:00 +08:00
|
|
|
It should be large enough to contain also separate pull registers.
|
2014-05-05 20:00:11 +08:00
|
|
|
second element is the separate pull register space of the rk3188.
|
|
|
|
Use rockchip,grf and rockchip,pmu described above instead.
|
2013-06-11 04:16:22 +08:00
|
|
|
|
|
|
|
Required properties for gpio sub nodes:
|
2014-06-16 07:36:05 +08:00
|
|
|
- compatible: "rockchip,gpio-bank"
|
2013-06-11 04:16:22 +08:00
|
|
|
- reg: register of the gpio bank (different than the iomux registerset)
|
|
|
|
- interrupts: base interrupt of the gpio bank in the interrupt controller
|
|
|
|
- clocks: clock that drives this bank
|
|
|
|
- gpio-controller: identifies the node as a gpio controller and pin bank.
|
|
|
|
- #gpio-cells: number of cells in GPIO specifier. Since the generic GPIO
|
|
|
|
binding is used, the amount of cells must be specified as 2. See generic
|
|
|
|
GPIO binding documentation for description of particular cells.
|
|
|
|
- interrupt-controller: identifies the controller node as interrupt-parent.
|
|
|
|
- #interrupt-cells: the value of this property should be 2 and the interrupt
|
|
|
|
cells should use the standard two-cell scheme described in
|
|
|
|
bindings/interrupt-controller/interrupts.txt
|
|
|
|
|
2014-05-05 20:00:11 +08:00
|
|
|
Deprecated properties for gpio sub nodes:
|
2014-06-16 07:36:05 +08:00
|
|
|
- compatible: "rockchip,rk3188-gpio-bank0"
|
2014-05-05 20:00:11 +08:00
|
|
|
- reg: second element: separate pull register for rk3188 bank0, use
|
|
|
|
rockchip,pmu described above instead
|
|
|
|
|
2013-06-11 04:16:22 +08:00
|
|
|
Required properties for pin configuration node:
|
|
|
|
- rockchip,pins: 3 integers array, represents a group of pins mux and config
|
|
|
|
setting. The format is rockchip,pins = <PIN_BANK PIN_BANK_IDX MUX &phandle>.
|
2014-08-09 06:29:09 +08:00
|
|
|
The MUX 0 means gpio and MUX 1 to N mean the specific device function.
|
2013-06-11 04:16:22 +08:00
|
|
|
The phandle of a node containing the generic pinconfig options
|
|
|
|
to use, as described in pinctrl-bindings.txt in this directory.
|
|
|
|
|
|
|
|
Examples:
|
|
|
|
|
|
|
|
#include <dt-bindings/pinctrl/rockchip.h>
|
|
|
|
|
|
|
|
...
|
|
|
|
|
|
|
|
pinctrl@20008000 {
|
|
|
|
compatible = "rockchip,rk3066a-pinctrl";
|
2014-05-05 20:00:11 +08:00
|
|
|
rockchip,grf = <&grf>;
|
|
|
|
|
2013-06-11 04:16:22 +08:00
|
|
|
#address-cells = <1>;
|
|
|
|
#size-cells = <1>;
|
|
|
|
ranges;
|
|
|
|
|
|
|
|
gpio0: gpio0@20034000 {
|
|
|
|
compatible = "rockchip,gpio-bank";
|
|
|
|
reg = <0x20034000 0x100>;
|
|
|
|
interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>;
|
|
|
|
clocks = <&clk_gates8 9>;
|
|
|
|
|
|
|
|
gpio-controller;
|
|
|
|
#gpio-cells = <2>;
|
|
|
|
|
|
|
|
interrupt-controller;
|
|
|
|
#interrupt-cells = <2>;
|
|
|
|
};
|
|
|
|
|
|
|
|
...
|
|
|
|
|
|
|
|
pcfg_pull_default: pcfg_pull_default {
|
|
|
|
bias-pull-pin-default
|
|
|
|
};
|
|
|
|
|
|
|
|
uart2 {
|
|
|
|
uart2_xfer: uart2-xfer {
|
|
|
|
rockchip,pins = <RK_GPIO1 8 1 &pcfg_pull_default>,
|
|
|
|
<RK_GPIO1 9 1 &pcfg_pull_default>;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
uart2: serial@20064000 {
|
|
|
|
compatible = "snps,dw-apb-uart";
|
|
|
|
reg = <0x20064000 0x400>;
|
|
|
|
interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
|
|
|
|
reg-shift = <2>;
|
|
|
|
reg-io-width = <1>;
|
|
|
|
clocks = <&mux_uart2>;
|
|
|
|
status = "okay";
|
|
|
|
|
|
|
|
pinctrl-names = "default";
|
|
|
|
pinctrl-0 = <&uart2_xfer>;
|
|
|
|
};
|
2013-10-16 07:08:42 +08:00
|
|
|
|
|
|
|
Example for rk3188:
|
|
|
|
|
|
|
|
pinctrl@20008000 {
|
|
|
|
compatible = "rockchip,rk3188-pinctrl";
|
2014-05-05 20:00:11 +08:00
|
|
|
rockchip,grf = <&grf>;
|
|
|
|
rockchip,pmu = <&pmu>;
|
2013-10-16 07:08:42 +08:00
|
|
|
#address-cells = <1>;
|
|
|
|
#size-cells = <1>;
|
|
|
|
ranges;
|
|
|
|
|
|
|
|
gpio0: gpio0@0x2000a000 {
|
|
|
|
compatible = "rockchip,rk3188-gpio-bank0";
|
2014-05-05 20:00:11 +08:00
|
|
|
reg = <0x2000a000 0x100>;
|
2013-10-16 07:08:42 +08:00
|
|
|
interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>;
|
|
|
|
clocks = <&clk_gates8 9>;
|
|
|
|
|
|
|
|
gpio-controller;
|
|
|
|
#gpio-cells = <2>;
|
|
|
|
|
|
|
|
interrupt-controller;
|
|
|
|
#interrupt-cells = <2>;
|
|
|
|
};
|
|
|
|
|
|
|
|
gpio1: gpio1@0x2003c000 {
|
|
|
|
compatible = "rockchip,gpio-bank";
|
|
|
|
reg = <0x2003c000 0x100>;
|
|
|
|
interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>;
|
|
|
|
clocks = <&clk_gates8 10>;
|
|
|
|
|
|
|
|
gpio-controller;
|
|
|
|
#gpio-cells = <2>;
|
|
|
|
|
|
|
|
interrupt-controller;
|
|
|
|
#interrupt-cells = <2>;
|
|
|
|
};
|
|
|
|
|
|
|
|
...
|
|
|
|
|
|
|
|
};
|