diff mbox series

[RFC,01/10] DT bindings in plain text format

Message ID 20200620223915.1311485-2-j.neuschaefer@gmx.net
State New
Headers show
Series [RFC,01/10] DT bindings in plain text format | expand

Commit Message

J. Neuschäfer June 20, 2020, 10:39 p.m. UTC
For reference, here are the devicetree bindings in plaintext format.
(Not for merge.)

Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
---
 .../bindings/mfd/netronix,ntxec.txt           | 58 +++++++++++++++++++
 .../bindings/pwm/netronix,ntxec-pwm.txt       | 27 +++++++++
 .../bindings/rtc/netronix,ntxec-rtc.txt       | 17 ++++++
 3 files changed, 102 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mfd/netronix,ntxec.txt
 create mode 100644 Documentation/devicetree/bindings/pwm/netronix,ntxec-pwm.txt
 create mode 100644 Documentation/devicetree/bindings/rtc/netronix,ntxec-rtc.txt

--
2.27.0
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/mfd/netronix,ntxec.txt b/Documentation/devicetree/bindings/mfd/netronix,ntxec.txt
new file mode 100644
index 0000000000000..e303932657999
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/netronix,ntxec.txt
@@ -0,0 +1,58 @@ 
+Netronix Embedded Controller
+
+This EC is found in e-book readers of multiple brands (e.g. Kobo, Tolino), and
+is typically implemented as a TI MSP430 microcontroller.
+
+
+Required properties:
+- compatible: should be "netronix,ntxec"
+- reg: The I2C address of the EC
+
+Optional properties:
+- system-power-controller:
+  See Documentation/devicetree/bindings/power/power-controller.txt
+- interrupts or interrupts-extended
+- interrupt-controller
+- #interrupt-cells: Should be 1
+
+Optional subnodes:
+
+Sub-nodes are identified by their compatible string.
+
+ compatible string              | description
+--------------------------------|--------------------------------------
+ netronix,ntxec-pwm             | PWM (used for backlight)
+ netronix,ntxec-rtc             | real time clock
+
+
+Example:
+
+&i2c3 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_i2c3>;
+	status = "okay";
+
+	ec: embedded-controller@43 {
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_ntxec>;
+
+		compatible = "netronix,ntxec";
+		reg = <0x43>;
+		system-power-controller;
+		interrupt-parent = <&gpio4>;
+		interrupts = <11 IRQ_TYPE_EDGE_FALLING>;
+		interrupt-controller;
+		#interrupt-cells = <1>;
+
+		pwm {
+			compatible = "netronix,ntxec-pwm";
+			#pwm-cells = <1>;
+		};
+
+		rtc {
+			compatible = "netronix,ntxec-rtc";
+			interrupts-extended = <&ec 15>;
+			interrupt-names = "alarm";
+		};
+	};
+};
diff --git a/Documentation/devicetree/bindings/pwm/netronix,ntxec-pwm.txt b/Documentation/devicetree/bindings/pwm/netronix,ntxec-pwm.txt
new file mode 100644
index 0000000000000..50be27f82559e
--- /dev/null
+++ b/Documentation/devicetree/bindings/pwm/netronix,ntxec-pwm.txt
@@ -0,0 +1,27 @@ 
+PWM functionality in Netronix Embedded Controller
+
+Required properties:
+- compatible: should be "netronix,ntxec-pwm"
+- #pwm-cells: should be 1.
+
+Available PWM channels:
+- 0: The PWM channel controlled by registers 0xa1-0xa7
+
+Example:
+
+	embedded-controller@43 {
+		compatible = "netronix,ntxec";
+		...
+
+		ec_pwm: pwm {
+			compatible = "netronix,ntxec-pwm";
+			#pwm-cells = <1>;
+		};
+	};
+
+	...
+
+	backlight {
+		compatible = "pwm-backlight";
+		pwms = <&ec_pwm 0 50000>;
+	};
diff --git a/Documentation/devicetree/bindings/rtc/netronix,ntxec-rtc.txt b/Documentation/devicetree/bindings/rtc/netronix,ntxec-rtc.txt
new file mode 100644
index 0000000000000..0ef9e791b6a36
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/netronix,ntxec-rtc.txt
@@ -0,0 +1,17 @@ 
+Netronix embedded controller RTC
+
+Required properties:
+
+- compatible: should be "netronix,ntxec-rtc"
+
+
+Example:
+
+	embedded-controller@43 {
+		compatible = "netronix,ntxec";
+		...
+
+		rtc {
+			compatible = "netronix,ntxec-rtc";
+		};
+	}