Thread (12 messages) flat view 12 messages, 3 authors, 2018-08-10
STALE2924d

[PATCH v2 3/7] drivers: gpio: Add support for GPIOs over Moxtet bus

From: andrew@lunn.ch (Andrew Lunn)
Date: 2018-08-09 02:57:48

quoted hunk ↗ jump to hunk
+++ b/Documentation/devicetree/bindings/gpio/gpio-moxtet.txt
@@ -0,0 +1,31 @@
+Turris Mox Moxtet GPIO expander
+
+Required properties:
+ - compatible		: Should be "cznic,moxtet-gpio".
+ - gpio-controller	: Marks the device node as a GPIO controller.
+ - #gpio-cells		: Should be two. For consumer use see gpio.txt.
+ - moxtet,input-mask	: Bitmask. Those bits which correspond to input GPIOs
+			  when read from Moxtet bus should be set here.
+			  For example if bit 0 and bit 3 are input GPIO bits,
+			  this should be set to 0x9.
+			  Since there are only 4 input bits, 0xf is max value.
+ - moxtet,output-mask	: Bitmask. Those bits which correspond to output GPIOs
+			  when written to Moxtet bus should be set here.
+			  For example if bit 1 and bit 6 are output GPIO bits,
+			  this should be set to 0x41.
+			  Since there are at most 8 output bits, 0xff is max
+			  value.
Lets see what Rob says, but i don't know if it should be so generic.

The SFP module probably has GPO's for tx-disable and rate-select, and
GPI for mod-def0, LOS. So you can have a compatible for this, and have
the bit masks associated to the compatible string. Don't put the masks
in the device tree.

   Andrew
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help