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

dt-bindings: Add Oxford Semiconductor OXNAS pinctrl and gpio bindings

Add pinctrl and gpio DT bindings for Oxford Semiconductor OXNAS SoC Family.
This version supports the ARM926EJ-S based OX810SE SoC with 34 IO pins.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

authored by

Neil Armstrong and committed by
Linus Walleij
aeb99c85 611dac1e

+104
+47
Documentation/devicetree/bindings/gpio/gpio_oxnas.txt
··· 1 + * Oxford Semiconductor OXNAS SoC GPIO Controller 2 + 3 + Please refer to gpio.txt for generic information regarding GPIO bindings. 4 + 5 + Required properties: 6 + - compatible: "oxsemi,ox810se-gpio" 7 + - reg: Base address and length for the device. 8 + - interrupts: The port interrupt shared by all pins. 9 + - gpio-controller: Marks the port as GPIO controller. 10 + - #gpio-cells: Two. The first cell is the pin number and 11 + the second cell is used to specify the gpio polarity as defined in 12 + defined in <dt-bindings/gpio/gpio.h>: 13 + 0 = GPIO_ACTIVE_HIGH 14 + 1 = GPIO_ACTIVE_LOW 15 + - interrupt-controller: Marks the device node as an interrupt controller. 16 + - #interrupt-cells: Two. The first cell is the GPIO number and second cell 17 + is used to specify the trigger type as defined in 18 + <dt-bindings/interrupt-controller/irq.h>: 19 + IRQ_TYPE_EDGE_RISING 20 + IRQ_TYPE_EDGE_FALLING 21 + IRQ_TYPE_EDGE_BOTH 22 + - gpio-ranges: Interaction with the PINCTRL subsystem, it also specifies the 23 + gpio base and count, should be in the format of numeric-gpio-range as 24 + specified in the gpio.txt file. 25 + 26 + Example: 27 + 28 + gpio0: gpio@0 { 29 + compatible = "oxsemi,ox810se-gpio"; 30 + reg = <0x000000 0x100000>; 31 + interrupts = <21>; 32 + #gpio-cells = <2>; 33 + gpio-controller; 34 + interrupt-controller; 35 + #interrupt-cells = <2>; 36 + gpio-ranges = <&pinctrl 0 0 32>; 37 + }; 38 + 39 + keys { 40 + ... 41 + 42 + button-esc { 43 + label = "ESC"; 44 + linux,code = <1>; 45 + gpios = <&gpio0 12 0>; 46 + }; 47 + };
+57
Documentation/devicetree/bindings/pinctrl/oxnas,pinctrl.txt
··· 1 + * Oxford Semiconductor OXNAS SoC Family Pin Controller 2 + 3 + Please refer to pinctrl-bindings.txt, ../gpio/gpio.txt, and 4 + ../interrupt-controller/interrupts.txt for generic information regarding 5 + pin controller, GPIO, and interrupt bindings. 6 + 7 + OXNAS 'pin configuration node' is a node of a group of pins which can be 8 + used for a specific device or function. This node represents configurations of 9 + pins, optional function, and optional mux related configuration. 10 + 11 + Required properties for pin controller node: 12 + - compatible: "oxsemi,ox810se-pinctrl" 13 + - oxsemi,sys-ctrl: a phandle to the system controller syscon node 14 + 15 + Required properties for pin configuration sub-nodes: 16 + - pins: List of pins to which the configuration applies. 17 + 18 + Optional properties for pin configuration sub-nodes: 19 + ---------------------------------------------------- 20 + - function: Mux function for the specified pins. 21 + - bias-pull-up: Enable weak pull-up. 22 + 23 + Example: 24 + 25 + pinctrl: pinctrl { 26 + compatible = "oxsemi,ox810se-pinctrl"; 27 + 28 + /* Regmap for sys registers */ 29 + oxsemi,sys-ctrl = <&sys>; 30 + 31 + pinctrl_uart2: pinctrl_uart2 { 32 + uart2a { 33 + pins = "gpio31"; 34 + function = "fct3"; 35 + }; 36 + uart2b { 37 + pins = "gpio32"; 38 + function = "fct3"; 39 + }; 40 + }; 41 + }; 42 + 43 + uart2: serial@900000 { 44 + compatible = "ns16550a"; 45 + reg = <0x900000 0x100000>; 46 + clocks = <&sysclk>; 47 + interrupts = <29>; 48 + reg-shift = <0>; 49 + fifo-size = <16>; 50 + reg-io-width = <1>; 51 + current-speed = <115200>; 52 + no-loopback-test; 53 + status = "disabled"; 54 + resets = <&reset 22>; 55 + pinctrl-names = "default"; 56 + pinctrl-0 = <&pinctrl_uart2>; 57 + };