Skip to contentSkip to conversation

serial: sccnxp: Add DT support

PATCH In review Alexander Shiyan 4 participants 10 messages Jul 31, 2013 – Aug 2, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 4/4 serial: sccnxp: Add DT support

Add DT support to the SCCNCP serial driver.

---
 .../bindings/tty/serial/sccnxp-serial.txt          | 53 ++++++++++++++++++++++
 drivers/tty/serial/sccnxp.c                        | 46 +++++++++++++++----
 include/linux/platform_data/serial-sccnxp.h        |  6 +--
 3 files changed, 93 insertions(+), 12 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/tty/serial/sccnxp-serial.txt
Documentation/devicetree/bindings/tty/serial/sccnxp-serial.txt new file +53 -0
new file mode 100644
index 0000000..d18b169
@@ -0,0 +1,53 @@
+* NXP (Philips) SCC+++(SCN+++) serial driver
+
+Required properties:
+- compatible: Should be "nxp,<ictype>". The supported ICs include sc2681,
+  sc2691, sc2692, sc2891, sc2892, sc28202, sc68681 and sc68692.
+- reg: Address and length of the register set for the device.
+- interrupts: Should contain the interrupt number. If omitted,
+  polling mode will be used instead, so "poll-interval" property should
+  be populated in this case.
+
+Optional properties:
+- clocks: Phandle to input clock. If omitted, default IC frequency will be
+  used instead.
+- poll-interval: Poll interval time in nanoseconds.
+- vcc-supply: The regulator supplying the VCC to drive the chip.
+- nxp,sccnxp-io-cfg: Array contains values for the emulated modem signals.
+  The number of values depends on the UART-number in the selected chip.
+  Each value should be composed according to the following rules:
+  (LINE1 << SIGNAL1) | ... | (LINEX << SIGNALX), where:
+   LINE - VALUE:
+    OP0 - 1
+    OP1 - 2
+    OP2 - 3
+    OP3 - 4
+    OP4 - 5
+    OP5 - 6
+    OP6 - 7
+    OP7 - 8
+    IP0 - 9
+    IP1 - 10
+    IP2 - 11
+    IP3 - 12
+    IP4 - 13
+    IP5 - 14
+    IP6 - 15
+   SIGNAL - VALUE:
+    DTR - 0
+    RTS - 4
+    DSR - 8
+    CTS - 12
+    DCD - 16
+    RNG - 20
+    DIR - 24
+
+Example (Dual UART with direction control on OP0 & OP1):
+sc2892@10100000 {
+	compatible = "nxp,sc2892";
+	reg = <0x10100000 0x10>;
+	poll-interval = <10000>;
+	clocks = <&sc2892_clk>;
+	vcc-supply = <&sc2892_reg>;
+	nxp,sccnxp-io-cfg = <0x01000000 0x02000000>;
+};
drivers/tty/serial/sccnxp.c +37 -9

84 lines not on this page · raw message

include/linux/platform_data/serial-sccnxp.h +3 -3
index af0c8c3..98373d6 100644
@@ -78,11 +78,11 @@
 /* SCCNXP platform data structure */
 struct sccnxp_pdata {
 	/* Shift for A0 line */
-	const u8		reg_shift;
+	u32	reg_shift;
 	/* Modem control lines configuration */
-	const u32		mctrl_cfg[SCCNXP_MAX_UARTS];
+	u32	mctrl_cfg[SCCNXP_MAX_UARTS];
 	/* Timer value for polling mode (usecs) */
-	const unsigned int	poll_time_us;
+	u32	poll_time_us;
 };
 
 #endif
Signature · 1 line
1.8.1.5
#1 lore raw

Documentation/devicetree/bindings/tty/serial/sccnxp-serial.txt

Quoted 8 lines · Alexander Shiyan

Add DT support to the SCCNCP serial driver.

Documentation/devicetree/bindings/tty/serial/sccnxp-serial.txt +2 -0
 
 
+Optional properties:
 
+- poll-interval: Poll interval time in nanoseconds.

Is this a standard/common property? If not, then it'd be best if the property name included the vendor-prefix "nxp,".

Quoted 6 lines

+- nxp,sccnxp-io-cfg: Array contains values for the emulated modem signals.

Documentation/devicetree/bindings/tty/serial/sccnxp-serial.txt +5 -0
+  The number of values depends on the UART-number in the selected chip.
+  Each value should be composed according to the following rules:
+  (LINE1 << SIGNAL1) | ... | (LINEX << SIGNALX), where:
+   LINE - VALUE:
+    OP0 - 1

...

Quoted 3 lines
Documentation/devicetree/bindings/tty/serial/sccnxp-serial.txt +3 -0
+    IP6 - 15
+   SIGNAL - VALUE:
+    DTR - 0

...

Quoted 1 line

+ DIR - 24

I wonder that shouldn't be implemented using standard pinctrl bindings. I could see someone wanting to create a pinmuxing-based serial port multiplexing device, which would then need to rely on this node acting as a standard pin controller...

Documentation/devicetree/bindings/tty/serial/sccnxp-serial.txt line 52

Quoted 8 lines
Documentation/devicetree/bindings/tty/serial/sccnxp-serial.txt +8 -0
+Example (Dual UART with direction control on OP0 & OP1):
+sc2892@10100000 {
+	compatible = "nxp,sc2892";
+	reg = <0x10100000 0x10>;
+	poll-interval = <10000>;
+	clocks = <&sc2892_clk>;
+	vcc-supply = <&sc2892_reg>;
+	nxp,sccnxp-io-cfg = <0x01000000 0x02000000>;

Why two cells for io-cfg when the shifts above imply everything fits into a single cell?

Oh I guess that "The number of values depends on the UART-number" means "number of UARTs in the chip", whereas I read it as "the ID of the UART within the chip"..

When there are multiple UARTs in the chip, should each UART have its own separate DT node? If not, how could you refer to each individual UART e.g. in order to set up the /aliases node?

#2 lore raw
Quoted 11 lines · Alexander Shiyan

Documentation/devicetree/bindings/tty/serial/sccnxp-serial.txt line 14

Quoted 7 lines

Add DT support to the SCCNCP serial driver.

Documentation/devicetree/bindings/tty/serial/sccnxp-serial.txt +2 -0
 
+Optional properties:
 
+- poll-interval: Poll interval time in nanoseconds.

Is this a standard/common property? If not, then it'd be best if the property name included the vendor-prefix "nxp,".

I am not sure about this, At least this property is used in gpio-keys-polled.

Quoted 10 lines
Quoted 6 lines

+- nxp,sccnxp-io-cfg: Array contains values for the emulated modem signals.

Documentation/devicetree/bindings/tty/serial/sccnxp-serial.txt +5 -0
+  The number of values depends on the UART-number in the selected chip.
+  Each value should be composed according to the following rules:
+  (LINE1 << SIGNAL1) | ... | (LINEX << SIGNALX), where:
+   LINE - VALUE:
+    OP0 - 1

...

Documentation/devicetree/bindings/tty/serial/sccnxp-serial.txt line 37

Quoted 3 lines
Documentation/devicetree/bindings/tty/serial/sccnxp-serial.txt +3 -0
+    IP6 - 15
+   SIGNAL - VALUE:
+    DTR - 0
Quoted 7 lines

...

Quoted 1 line

+ DIR - 24

I wonder that shouldn't be implemented using standard pinctrl bindings. I could see someone wanting to create a pinmuxing-based serial port multiplexing device, which would then need to rely on this node acting as a standard pin controller...

In this case pin-controller cannot be applied here.
The device has several lines of general purpose inputs and outputs, there is no functional purpose of these lines as a modem signals. In the driver realized only an emulation of these signals. That is, this property describes the trick. I have no idea how to do this trick in another way.

Quoted 12 lines

Documentation/devicetree/bindings/tty/serial/sccnxp-serial.txt line 52

Quoted 8 lines
Documentation/devicetree/bindings/tty/serial/sccnxp-serial.txt +8 -0
+Example (Dual UART with direction control on OP0 & OP1):
+sc2892@10100000 {
+	compatible = "nxp,sc2892";
+	reg = <0x10100000 0x10>;
+	poll-interval = <10000>;
+	clocks = <&sc2892_clk>;
+	vcc-supply = <&sc2892_reg>;
+	nxp,sccnxp-io-cfg = <0x01000000 0x02000000>;

Why two cells for io-cfg when the shifts above imply everything fits into a single cell?

Quoted 7 lines

Oh I guess that "The number of values depends on the UART-number" means "number of UARTs in the chip", whereas I read it as "the ID of the UART within the chip"..

When there are multiple UARTs in the chip, should each UART have its own separate DT node? If not, how could you refer to each individual UART e.g. in order to set up the /aliases node?

This is my translation inaccuracies: io-cfg count should be == UART count. Driver initializes all ports simultaneously (1 or 2). I cannot separate ports, because IC registers mixed in one address space.

As variant, I can make the io-configuration of a single variable u64. Or, at this stage, remove this option to add later. Thanks.

---

#5 lore raw
In reply to Alexander Shiyan
Quoted 16 lines · Alexander Shiyan

Add DT support to the SCCNCP serial driver.

---
 .../bindings/tty/serial/sccnxp-serial.txt          | 53 ++++++++++++++++++++++
 drivers/tty/serial/sccnxp.c                        | 46 +++++++++++++++----
 include/linux/platform_data/serial-sccnxp.h        |  6 +--
 3 files changed, 93 insertions(+), 12 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/tty/serial/sccnxp-serial.txt
Documentation/devicetree/bindings/tty/serial/sccnxp-serial.txt new file +0 -0
new file mode 100644
index 0000000..d18b169

Documentation/devicetree/bindings/tty/serial/sccnxp-serial.txt line 9

Quoted 9 lines
Documentation/devicetree/bindings/tty/serial/sccnxp-serial.txt new file +9 -0
@@ -0,0 +1,53 @@
+* NXP (Philips) SCC+++(SCN+++) serial driver
+
+Required properties:
+- compatible: Should be "nxp,<ictype>". The supported ICs include sc2681,
+  sc2691, sc2692, sc2891, sc2892, sc28202, sc68681 and sc68692.
+- reg: Address and length of the register set for the device.
+- interrupts: Should contain the interrupt number. If omitted,
+  polling mode will be used instead, so "poll-interval" property should
+  be populated in this case.

I'm not so keen on bindings describing what drivers *will* do (as opposed to what they *may* do), but many other bindings already describe this. It feels like we're describing driver behaviour rather than describing the hardware and letting a driver try its best to use the hardware in whatever way it sees fit.

I'm not sure how others feel on this, but I'd prefer a description more like:

- interrupts: Should contain the interrupt number. If omitted, a driver may poll the device, so the "poll-interval" property should be populated.

Documentation/devicetree/bindings/tty/serial/sccnxp-serial.txt line 14

Quoted 5 lines
Documentation/devicetree/bindings/tty/serial/sccnxp-serial.txt new file +5 -0
+
+Optional properties:
+- clocks: Phandle to input clock. If omitted, default IC frequency will be
+  used instead.
+- poll-interval: Poll interval time in nanoseconds.

Is there any reason this needs to be described at all? Is this interval a minimum/maximum bound required for some reason, or just a sensible value?

This feels like driver configuration than hardware description.

Quoted 19 lines
Documentation/devicetree/bindings/tty/serial/sccnxp-serial.txt new file +19 -0
+- vcc-supply: The regulator supplying the VCC to drive the chip.
+- nxp,sccnxp-io-cfg: Array contains values for the emulated modem signals.
+  The number of values depends on the UART-number in the selected chip.
+  Each value should be composed according to the following rules:
+  (LINE1 << SIGNAL1) | ... | (LINEX << SIGNALX), where:
+   LINE - VALUE:
+    OP0 - 1
+    OP1 - 2
+    OP2 - 3
+    OP3 - 4
+    OP4 - 5
+    OP5 - 6
+    OP6 - 7
+    OP7 - 8
+    IP0 - 9
+    IP1 - 10
+    IP2 - 11
+    IP3 - 12
+    IP4 - 13

Documentation/devicetree/bindings/tty/serial/sccnxp-serial.txt line 43

Quoted 10 lines
Documentation/devicetree/bindings/tty/serial/sccnxp-serial.txt new file +10 -0
+    IP5 - 14
+    IP6 - 15
+   SIGNAL - VALUE:
+    DTR - 0
+    RTS - 4
+    DSR - 8
+    CTS - 12
+    DCD - 16
+    RNG - 20
+    DIR - 24

I don't really understand what this is describing, but I'm not sure that the encoding (with an OR of shifted values) is the most sensible. Could you elaborate on what is being described and how it's used?

Thanks,
Mark.

#6 lore raw
Quoted 12 lines · Alexander Shiyan
Quoted 11 lines

Add DT support to the SCCNCP serial driver.

---
 .../bindings/tty/serial/sccnxp-serial.txt          | 53 ++++++++++++++++++++++
 drivers/tty/serial/sccnxp.c                        | 46 +++++++++++++++----
 include/linux/platform_data/serial-sccnxp.h        |  6 +--
 3 files changed, 93 insertions(+), 12 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/tty/serial/sccnxp-serial.txt
Documentation/devicetree/bindings/tty/serial/sccnxp-serial.txt +0 -0

[...]

Quoted 10 lines

Documentation/devicetree/bindings/tty/serial/sccnxp-serial.txt line 14

Quoted 4 lines
Documentation/devicetree/bindings/tty/serial/sccnxp-serial.txt +4 -0
+Optional properties:
+- clocks: Phandle to input clock. If omitted, default IC frequency will be
+  used instead.
+- poll-interval: Poll interval time in nanoseconds.

Is there any reason this needs to be described at all? Is this interval a minimum/maximum bound required for some reason, or just a sensible value?

This feels like driver configuration than hardware description.

This is a exact value for driver in the polling mode. Depends on desired response time and/or desired UART baudrate.

Quoted 7 lines
Quoted 7 lines
+- vcc-supply: The regulator supplying the VCC to drive the chip.
+- nxp,sccnxp-io-cfg: Array contains values for the emulated modem signals.
Documentation/devicetree/bindings/tty/serial/sccnxp-serial.txt +5 -0
+  The number of values depends on the UART-number in the selected chip.
+  Each value should be composed according to the following rules:
+  (LINE1 << SIGNAL1) | ... | (LINEX << SIGNALX), where:
+   LINE - VALUE:
+    OP0 - 1

[...]

Quoted 5 lines
Quoted 1 line

+ DIR - 24

I don't really understand what this is describing, but I'm not sure that the encoding (with an OR of shifted values) is the most sensible. Could you elaborate on what is being described and how it's used?

I have already described this property in a reply to Stephen Warren. I'd like to do it differently, but I have no idea of another implementation of this. Thanks.

---

#7 lore raw
Quoted 11 lines · Alexander Shiyan
Quoted 11 lines · Alexander Shiyan
Quoted 10 lines

Add DT support to the SCCNCP serial driver.

---
 .../bindings/tty/serial/sccnxp-serial.txt          | 53 ++++++++++++++++++++++
 drivers/tty/serial/sccnxp.c                        | 46 +++++++++++++++----
 include/linux/platform_data/serial-sccnxp.h        |  6 +--
 3 files changed, 93 insertions(+), 12 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/tty/serial/sccnxp-serial.txt
Quoted 5 lines
Quoted 1 line
Quoted 1 line
Documentation/devicetree/bindings/tty/serial/sccnxp-serial.txt +0 -0

[...]

Quoted 3 lines

Documentation/devicetree/bindings/tty/serial/sccnxp-serial.txt line 13

Quoted 3 lines
Documentation/devicetree/bindings/tty/serial/sccnxp-serial.txt +3 -0
+Optional properties:
+- clocks: Phandle to input clock. If omitted, default IC frequency will be
+  used instead.

Come to think of it, what is "default IC frequency" likely to be, and how does it influence the usable baud rates?

Quoted 9 lines
Quoted 7 lines
Quoted 1 line

+- poll-interval: Poll interval time in nanoseconds.

Is there any reason this needs to be described at all? Is this interval a minimum/maximum bound required for some reason, or just a sensible value?

This feels like driver configuration than hardware description.

This is a exact value for driver in the polling mode.

That certainly sounds like driver configuration ;)

Quoted 1 line

Depends on desired response time and/or desired UART baudrate.

If this depends on the desired baud rate, how does this interact with dynamically changing the baud rate later -- surely you may need to have different polling rates for high and low baud rates?

Quoted 9 lines
Quoted 8 lines
Quoted 8 lines
+- vcc-supply: The regulator supplying the VCC to drive the chip.
+- nxp,sccnxp-io-cfg: Array contains values for the emulated modem signals.
Documentation/devicetree/bindings/tty/serial/sccnxp-serial.txt +5 -0
+  The number of values depends on the UART-number in the selected chip.
+  Each value should be composed according to the following rules:
+  (LINE1 << SIGNAL1) | ... | (LINEX << SIGNALX), where:
+   LINE - VALUE:
+    OP0 - 1

[...]

Quoted 8 lines
Quoted 5 lines
Quoted 1 line

+ DIR - 24

I don't really understand what this is describing, but I'm not sure that the encoding (with an OR of shifted values) is the most sensible. Could you elaborate on what is being described and how it's used?

I have already described this property in a reply to Stephen Warren. I'd like to do it differently, but I have no idea of another implementation of this.

Is there any publicly available documentation for the hardware?

Thanks,
Mark.

#3 lore raw
In reply to Alexander Shiyan
Quoted 25 lines · Alexander Shiyan
Quoted 11 lines · Alexander Shiyan

Documentation/devicetree/bindings/tty/serial/sccnxp-serial.txt line 14

Quoted 7 lines

Add DT support to the SCCNCP serial driver.

Documentation/devicetree/bindings/tty/serial/sccnxp-serial.txt +2 -0
 
+Optional properties:
 
+- poll-interval: Poll interval time in nanoseconds.

Is this a standard/common property? If not, then it'd be best if the property name included the vendor-prefix "nxp,".

I am not sure about this, At least this property is used in gpio-keys-polled.

Quoted 11 lines
Quoted 6 lines

+- nxp,sccnxp-io-cfg: Array contains values for the emulated modem signals.

Documentation/devicetree/bindings/tty/serial/sccnxp-serial.txt +5 -0
+  The number of values depends on the UART-number in the selected chip.
+  Each value should be composed according to the following rules:
+  (LINE1 << SIGNAL1) | ... | (LINEX << SIGNALX), where:
+   LINE - VALUE:
+    OP0 - 1

...

Quoted 3 lines
Documentation/devicetree/bindings/tty/serial/sccnxp-serial.txt +3 -0
+    IP6 - 15
+   SIGNAL - VALUE:
+    DTR - 0

...

Quoted 8 lines
Quoted 6 lines
Quoted 1 line

+ DIR - 24

I wonder that shouldn't be implemented using standard pinctrl bindings. I could see someone wanting to create a pinmuxing-based serial port multiplexing device, which would then need to rely on this node acting as a standard pin controller...

In this case pin-controller cannot be applied here.

Why not?

Quoted 4 lines

The device has several lines of general purpose inputs and outputs, there is no functional purpose of these lines as a modem signals. In the driver realized only an emulation of these signals. That is, this property describes the trick. I have no idea how to do this trick in another way.

I assume the HW design is that there are 15 pins, and there is a register or are multiple registers that define which pins are used for which purpose.

If so, that's exactly what the pinctrl bindings are for.

However, you're talking about emulation... Is this property really describing HW? If not, it isn't appropriate for DT.

Quoted 16 lines
Quoted 16 lines

Documentation/devicetree/bindings/tty/serial/sccnxp-serial.txt line 52

Quoted 8 lines
Documentation/devicetree/bindings/tty/serial/sccnxp-serial.txt +8 -0
+Example (Dual UART with direction control on OP0 & OP1):
+sc2892@10100000 {
+	compatible = "nxp,sc2892";
+	reg = <0x10100000 0x10>;
+	poll-interval = <10000>;
+	clocks = <&sc2892_clk>;
+	vcc-supply = <&sc2892_reg>;
+	nxp,sccnxp-io-cfg = <0x01000000 0x02000000>;

Why two cells for io-cfg when the shifts above imply everything fits into a single cell?

Oh I guess that "The number of values depends on the UART-number" means "number of UARTs in the chip", whereas I read it as "the ID of the UART within the chip"..

Quoted 7 lines
Quoted 3 lines

When there are multiple UARTs in the chip, should each UART have its own separate DT node? If not, how could you refer to each individual UART e.g. in order to set up the /aliases node?

This is my translation inaccuracies: io-cfg count should be == UART count. Driver initializes all ports simultaneously (1 or 2). I cannot separate ports, because IC registers mixed in one address space.

If there really are multiple ports, I think there have to be multiple DT nodes, given the way /aliases works.

Quoted 1 line

As variant, I can make the io-configuration of a single variable u64.

In DT, cells are U32.

Quoted 2 lines

Or, at this stage, remove this option to add later. Thanks.

The binding should be as complete as possible up-front. Adding stuff later only increases the likelihood of wanting to make incompatible changes.

#8 lore raw
In reply to Mark Rutland
Quoted 31 lines · On Thu, 1 Aug 2013 15:14:20 +0100 Mark Rutland <[email protected]> wrote:
Quoted 11 lines · Alexander Shiyan
Quoted 11 lines · Alexander Shiyan
Quoted 10 lines

Add DT support to the SCCNCP serial driver.

---
 .../bindings/tty/serial/sccnxp-serial.txt          | 53 ++++++++++++++++++++++
 drivers/tty/serial/sccnxp.c                        | 46 +++++++++++++++----
 include/linux/platform_data/serial-sccnxp.h        |  6 +--
 3 files changed, 93 insertions(+), 12 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/tty/serial/sccnxp-serial.txt
Quoted 5 lines
Quoted 1 line
Quoted 1 line
Documentation/devicetree/bindings/tty/serial/sccnxp-serial.txt +0 -0

[...]

Quoted 3 lines

Documentation/devicetree/bindings/tty/serial/sccnxp-serial.txt line 13

Quoted 3 lines
Documentation/devicetree/bindings/tty/serial/sccnxp-serial.txt +3 -0
+Optional properties:
+- clocks: Phandle to input clock. If omitted, default IC frequency will be
+  used instead.

Come to think of it, what is "default IC frequency" likely to be, and how does it influence the usable baud rates?

Quoted 9 lines
Quoted 7 lines
Quoted 1 line

+- poll-interval: Poll interval time in nanoseconds.

Is there any reason this needs to be described at all? Is this interval a minimum/maximum bound required for some reason, or just a sensible value?

This feels like driver configuration than hardware description.

This is a exact value for driver in the polling mode.

Quoted 7 lines

That certainly sounds like driver configuration ;)

Quoted 1 line

Depends on desired response time and/or desired UART baudrate.

If this depends on the desired baud rate, how does this interact with dynamically changing the baud rate later -- surely you may need to have different polling rates for high and low baud rates?

I will change it to automatically calculate a reasonable value for polling.

[...]

Greg, please remove this part of patch from tty-tree. Thanks.

Signature · 1 line
Alexander Shiyan <[email protected]>
#9 lore raw
Quoted 42 lines · Alexander Shiyan
Quoted 31 lines · On Thu, 1 Aug 2013 15:14:20 +0100 Mark Rutland <[email protected]> wrote:
Quoted 11 lines · Alexander Shiyan
Quoted 11 lines · Alexander Shiyan
Quoted 10 lines

Add DT support to the SCCNCP serial driver.

---
 .../bindings/tty/serial/sccnxp-serial.txt          | 53 ++++++++++++++++++++++
 drivers/tty/serial/sccnxp.c                        | 46 +++++++++++++++----
 include/linux/platform_data/serial-sccnxp.h        |  6 +--
 3 files changed, 93 insertions(+), 12 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/tty/serial/sccnxp-serial.txt
Quoted 5 lines
Quoted 1 line
Quoted 1 line
Documentation/devicetree/bindings/tty/serial/sccnxp-serial.txt +0 -0

[...]

Quoted 3 lines

Documentation/devicetree/bindings/tty/serial/sccnxp-serial.txt line 13

Quoted 3 lines
Documentation/devicetree/bindings/tty/serial/sccnxp-serial.txt +3 -0
+Optional properties:
+- clocks: Phandle to input clock. If omitted, default IC frequency will be
+  used instead.

Come to think of it, what is "default IC frequency" likely to be, and how does it influence the usable baud rates?

Quoted 9 lines
Quoted 7 lines
Quoted 1 line

+- poll-interval: Poll interval time in nanoseconds.

Is there any reason this needs to be described at all? Is this interval a minimum/maximum bound required for some reason, or just a sensible value?

This feels like driver configuration than hardware description.

This is a exact value for driver in the polling mode.

Quoted 7 lines

That certainly sounds like driver configuration ;)

Quoted 1 line

Depends on desired response time and/or desired UART baudrate.

If this depends on the desired baud rate, how does this interact with dynamically changing the baud rate later -- surely you may need to have different polling rates for high and low baud rates?

Quoted 5 lines

I will change it to automatically calculate a reasonable value for polling.

[...]

Greg, please remove this part of patch from tty-tree.

Now removed.

#4 lore raw
In reply to Stephen Warren
Quoted 5 lines · On Thu, 01 Aug 2013 10:31:13 -0600 Stephen Warren <[email protected]> wrote:
Quoted 4 lines · Alexander Shiyan
Quoted 4 lines · Alexander Shiyan
Quoted 3 lines

Add DT support to the SCCNCP serial driver.

Documentation/devicetree/bindings/tty/serial/sccnxp-serial.txt +0 -0

[...]

Quoted 27 lines
Quoted 11 lines
Quoted 11 lines
Quoted 6 lines

+- nxp,sccnxp-io-cfg: Array contains values for the emulated modem signals.

Documentation/devicetree/bindings/tty/serial/sccnxp-serial.txt +5 -0
+  The number of values depends on the UART-number in the selected chip.
+  Each value should be composed according to the following rules:
+  (LINE1 << SIGNAL1) | ... | (LINEX << SIGNALX), where:
+   LINE - VALUE:
+    OP0 - 1

...

Quoted 3 lines
Documentation/devicetree/bindings/tty/serial/sccnxp-serial.txt +3 -0
+    IP6 - 15
+   SIGNAL - VALUE:
+    DTR - 0

...

Quoted 8 lines
Quoted 6 lines
Quoted 1 line

+ DIR - 24

I wonder that shouldn't be implemented using standard pinctrl bindings. I could see someone wanting to create a pinmuxing-based serial port multiplexing device, which would then need to rely on this node acting as a standard pin controller...

In this case pin-controller cannot be applied here.

Why not?

Quoted 4 lines

The device has several lines of general purpose inputs and outputs, there is no functional purpose of these lines as a modem signals. In the driver realized only an emulation of these signals. That is, this property describes the trick. I have no idea how to do this trick in another way.

Quoted 8 lines

I assume the HW design is that there are 15 pins, and there is a register or are multiple registers that define which pins are used for which purpose.

If so, that's exactly what the pinctrl bindings are for.

However, you're talking about emulation... Is this property really describing HW? If not, it isn't appropriate for DT.

What your opinion about replace this property by "quirk" property and hardcode these values into the driver?
Thanks.

Signature · 1 line
Alexander Shiyan <[email protected]>