2020-06-20 22:45:48

by J. Neuschäfer

[permalink] [raw]
Subject: [RFC PATCH 02/10] dt-bindings: Add vendor prefix for Netronix, Inc.

Netronix, Inc. (http://www.netronixinc.com/) makes ebook reader board
designs, which are for example used in Kobo and Tolino devices.

An alternative prefix for Netronix would be "ntx", which is already used
in code released by Netronix. It is shorter, but perhaps less clear.

Signed-off-by: Jonathan Neuschäfer <[email protected]>
---
Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
index 9aeab66be85fc..516c6b6668fba 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
@@ -704,6 +704,8 @@ patternProperties:
description: Broadcom Corporation (formerly NetLogic Microsystems)
"^netron-dy,.*":
description: Netron DY
+ "^netronix,.*":
+ description: Netronix, Inc.
"^netxeon,.*":
description: Shenzhen Netxeon Technology CO., LTD
"^neweast,.*":
--
2.27.0


2020-06-20 22:45:52

by J. Neuschäfer

[permalink] [raw]
Subject: [RFC PATCH 05/10] dt-bindings: pwm: Add bindings for PWM function in Netronix EC

The Netronix embedded controller as found in Kobo Aura and Tolino Shine
supports one PWM channel, which is used to control the frontlight
brightness on these devices.

Known problems:
- `make dt_binding_check` shows the following warnings:
Documentation/devicetree/bindings/mfd/netronix,ntxec.example.dts:49.17-42:
Warning (pwms_property): /example-0/backlight:pwms: cell 2 is not a
phandle reference
Documentation/devicetree/bindings/mfd/netronix,ntxec.example.dts:49.17-42:
Warning (pwms_property): /example-0/backlight:pwms: Could not get
phandle node for (cell 2)

Signed-off-by: Jonathan Neuschäfer <[email protected]>
---
.../bindings/mfd/netronix,ntxec.yaml | 13 ++++++++
.../bindings/pwm/netronix,ntxec-pwm.yaml | 33 +++++++++++++++++++
2 files changed, 46 insertions(+)
create mode 100644 Documentation/devicetree/bindings/pwm/netronix,ntxec-pwm.yaml

diff --git a/Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml b/Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml
index 596df460f98eb..6562c41c5a9a9 100644
--- a/Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml
+++ b/Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml
@@ -31,6 +31,9 @@ properties:
description:
The EC can signal interrupts via a GPIO line

+ pwm:
+ $ref: ../pwm/netronix,ntxec-pwm.yaml
+
required:
- compatible
- reg
@@ -53,5 +56,15 @@ examples:
interrupts = <11 IRQ_TYPE_EDGE_FALLING>;
interrupt-controller;
#interrupt-cells = <1>;
+
+ 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/pwm/netronix,ntxec-pwm.yaml b/Documentation/devicetree/bindings/pwm/netronix,ntxec-pwm.yaml
new file mode 100644
index 0000000000000..1dc1b1aba081c
--- /dev/null
+++ b/Documentation/devicetree/bindings/pwm/netronix,ntxec-pwm.yaml
@@ -0,0 +1,33 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pwm/netronix,ntxec-pwm.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: PWM functionality in Netronix embedded controller
+
+maintainers:
+ - Jonathan Neuschäfer <[email protected]>
+
+description: |
+ See also Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml
+
+ The Netronix EC contains PWM functionality, which is usually used to drive
+ the backlight LED.
+
+ The following PWM channels are supported:
+ - 0: The PWM channel controlled by registers 0xa1-0xa7
+
+allOf:
+ - $ref: pwm.yaml#
+
+properties:
+ compatible:
+ const: netronix,ntxec-pwm
+
+ "#pwm-cells":
+ const: 1
+
+required:
+ - compatible
+ - "#pwm-cells"
--
2.27.0

2020-06-20 22:46:15

by J. Neuschäfer

[permalink] [raw]
Subject: [RFC PATCH 07/10] dt-bindings: rtc: Add bindings for Netronix embedded controller RTC

The Netronix EC implements an RTC with the following functionality:

- Calendar-based time keeping with single-second resolution
- Automatic power-on with single-minute resolution
- Alarm at single-second resolution

This binding only supports timekeeping for now.

Signed-off-by: Jonathan Neuschäfer <[email protected]>
---
.../bindings/mfd/netronix,ntxec.yaml | 7 +++++
.../bindings/rtc/netronix,ntxec-rtc.yaml | 27 +++++++++++++++++++
2 files changed, 34 insertions(+)
create mode 100644 Documentation/devicetree/bindings/rtc/netronix,ntxec-rtc.yaml

diff --git a/Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml b/Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml
index 6562c41c5a9a9..f6a32f46f47bb 100644
--- a/Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml
+++ b/Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml
@@ -34,6 +34,9 @@ properties:
pwm:
$ref: ../pwm/netronix,ntxec-pwm.yaml

+ rtc:
+ $ref: ../rtc/netronix,ntxec-rtc.yaml
+
required:
- compatible
- reg
@@ -61,6 +64,10 @@ examples:
compatible = "netronix,ntxec-pwm";
#pwm-cells = <1>;
};
+
+ rtc {
+ compatible = "netronix,ntxec-rtc";
+ };
};
};

diff --git a/Documentation/devicetree/bindings/rtc/netronix,ntxec-rtc.yaml b/Documentation/devicetree/bindings/rtc/netronix,ntxec-rtc.yaml
new file mode 100644
index 0000000000000..4b301ef7319c8
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/netronix,ntxec-rtc.yaml
@@ -0,0 +1,27 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/rtc/netronix,ntxec-rtc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: RTC functionality in Netronix embedded controller
+
+maintainers:
+ - Jonathan Neuschäfer <[email protected]>
+
+description: |
+ See also Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml
+
+ The Netronix EC contains an RTC, which can be used for time-keeping, alarm,
+ and automatic power-on. Note that not all of this functionality is currently
+ supported in this binding.
+
+allOf:
+ - $ref: "rtc.yaml#"
+
+properties:
+ compatible:
+ const: netronix,ntxec-rtc
+
+required:
+ - compatible
--
2.27.0

2020-06-20 22:47:40

by J. Neuschäfer

[permalink] [raw]
Subject: [RFC PATCH 03/10] dt-bindings: mfd: Add binding for Netronix's 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.

It controls different functions of the system, such as power on/off,
RTC, PWM for the backlight. The exact functionality provided can vary
between boards.

Signed-off-by: Jonathan Neuschäfer <[email protected]>
---
.../bindings/mfd/netronix,ntxec.yaml | 57 +++++++++++++++++++
1 file changed, 57 insertions(+)
create mode 100644 Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml

diff --git a/Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml b/Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml
new file mode 100644
index 0000000000000..596df460f98eb
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml
@@ -0,0 +1,57 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mfd/netronix,ntxec.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Netronix Embedded Controller
+
+maintainers:
+ - Jonathan Neuschäfer <[email protected]>
+
+description: |
+ This EC is found in e-book readers of multiple brands (e.g. Kobo, Tolino), and
+ is typically implemented as a TI MSP430 microcontroller.
+
+
+properties:
+ compatible:
+ const: netronix,ntxec
+
+ reg:
+ items:
+ - description: The I2C address of the EC
+
+ system-power-controller:
+ type: boolean
+ description: See Documentation/devicetree/bindings/power/power-controller.txt
+
+ interrupts:
+ minItems: 1
+ description:
+ The EC can signal interrupts via a GPIO line
+
+required:
+ - compatible
+ - reg
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ 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>;
+ };
+ };
--
2.27.0

2020-06-20 22:48:47

by J. Neuschäfer

[permalink] [raw]
Subject: Re: [RFC PATCH 02/10] dt-bindings: Add vendor prefix for Netronix, Inc.

On Sun, Jun 21, 2020 at 12:42:13AM +0200, Jonathan Neuschäfer wrote:
> Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++

Oops, it seems the mail thread got split here when I resent patches 2-10
after an error. Oh well.


Attachments:
(No filename) (239.00 B)
signature.asc (849.00 B)
Download all attachments

2020-06-20 22:49:09

by J. Neuschäfer

[permalink] [raw]
Subject: [RFC PATCH 10/10] ARM: dts: imx50-kobo-aura: Add Netronix embedded controller

Enable the Netronix EC on the Kobo Aura ebook reader.

Several features are still missing:
- Frontlight/backlight. The vendor kernel drives the frontlight LED
using the PWM output of the EC and an additional boost pin that
increases the brightness.
- Battery monitoring
- Interrupts for RTC alarm and low-battery events

Signed-off-by: Jonathan Neuschäfer <[email protected]>
---
arch/arm/boot/dts/imx50-kobo-aura.dts | 27 ++++++++++++++++++++++++++-
1 file changed, 26 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/imx50-kobo-aura.dts b/arch/arm/boot/dts/imx50-kobo-aura.dts
index a0eaf869b9135..003a7d894902c 100644
--- a/arch/arm/boot/dts/imx50-kobo-aura.dts
+++ b/arch/arm/boot/dts/imx50-kobo-aura.dts
@@ -6,6 +6,7 @@
/dts-v1/;
#include "imx50.dtsi"
#include <dt-bindings/input/input.h>
+#include <dt-bindings/interrupt-controller/irq.h>

/ {
model = "Kobo Aura (N514)";
@@ -135,10 +136,34 @@ &i2c3 {
pinctrl-0 = <&pinctrl_i2c3>;
status = "okay";

- /* TODO: embedded controller at 0x43 */
+ embedded-controller@43 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_ec>;
+ compatible = "netronix,ntxec";
+ reg = <0x43>;
+ system-power-controller;
+ interrupts-extended = <&gpio4 11 IRQ_TYPE_EDGE_FALLING>;
+ interrupt-controller;
+ #interrupt-cells = <1>;
+
+ ec_pwm: pwm {
+ compatible = "netronix,ntxec-pwm";
+ #pwm-cells = <2>;
+ };
+
+ rtc {
+ compatible = "netronix,ntxec-rtc";
+ };
+ };
};

&iomuxc {
+ pinctrl_ec: ec {
+ fsl,pins = <
+ MX50_PAD_CSPI_SS0__GPIO4_11 0x0 /* INT */
+ >;
+ };
+
pinctrl_gpiokeys: gpiokeys {
fsl,pins = <
MX50_PAD_CSPI_MISO__GPIO4_10 0x0
--
2.27.0

2020-06-20 22:49:23

by J. Neuschäfer

[permalink] [raw]
Subject: [RFC PATCH 09/10] MAINTAINERS: Add entry for Netronix embedded controller

Let's make sure I'll notice when there are patches for the NTXEC
drivers.

Signed-off-by: Jonathan Neuschäfer <[email protected]>
---
MAINTAINERS | 11 +++++++++++
1 file changed, 11 insertions(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index 68f21d46614c4..d4333f7490f5d 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -11850,6 +11850,17 @@ F: include/net/netrom.h
F: include/uapi/linux/netrom.h
F: net/netrom/

+NETRONIX EMBEDDED CONTROLLER
+M: Jonathan Neuschäfer <[email protected]>
+S: Maintained
+F: Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml
+F: Documentation/devicetree/bindings/pwm/netronix,ntxec-pwm.yaml
+F: Documentation/devicetree/bindings/rtc/netronix,ntxec-rtc.yaml
+F: drivers/mfd/ntxec.c
+F: drivers/pwm/pwm-ntxec.c
+F: drivers/rtc/rtc-ntxec.c
+F: include/linux/mfd/ntxec.h
+
NETRONOME ETHERNET DRIVERS
M: Jakub Kicinski <[email protected]>
L: [email protected]
--
2.27.0

2020-06-21 00:04:54

by Alexandre Belloni

[permalink] [raw]
Subject: Re: [RFC PATCH 07/10] dt-bindings: rtc: Add bindings for Netronix embedded controller RTC

Hi,

On 21/06/2020 00:42:18+0200, Jonathan Neusch?fer wrote:
> The Netronix EC implements an RTC with the following functionality:
>
> - Calendar-based time keeping with single-second resolution
> - Automatic power-on with single-minute resolution
> - Alarm at single-second resolution
>
> This binding only supports timekeeping for now.
>
> Signed-off-by: Jonathan Neusch?fer <[email protected]>
> ---
> .../bindings/mfd/netronix,ntxec.yaml | 7 +++++
> .../bindings/rtc/netronix,ntxec-rtc.yaml | 27 +++++++++++++++++++
> 2 files changed, 34 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/rtc/netronix,ntxec-rtc.yaml
>
> diff --git a/Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml b/Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml
> index 6562c41c5a9a9..f6a32f46f47bb 100644
> --- a/Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml
> +++ b/Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml
> @@ -34,6 +34,9 @@ properties:
> pwm:
> $ref: ../pwm/netronix,ntxec-pwm.yaml
>
> + rtc:
> + $ref: ../rtc/netronix,ntxec-rtc.yaml
> +

Shouldn't the node simply be documented here?

Also, do you really need a compatible string to be able to proe the
driver? What are the chances that you'll get a similar EC without an
RTC?

> required:
> - compatible
> - reg
> @@ -61,6 +64,10 @@ examples:
> compatible = "netronix,ntxec-pwm";
> #pwm-cells = <1>;
> };
> +
> + rtc {
> + compatible = "netronix,ntxec-rtc";
> + };
> };
> };
>
> diff --git a/Documentation/devicetree/bindings/rtc/netronix,ntxec-rtc.yaml b/Documentation/devicetree/bindings/rtc/netronix,ntxec-rtc.yaml
> new file mode 100644
> index 0000000000000..4b301ef7319c8
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/rtc/netronix,ntxec-rtc.yaml
> @@ -0,0 +1,27 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/rtc/netronix,ntxec-rtc.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: RTC functionality in Netronix embedded controller
> +
> +maintainers:
> + - Jonathan Neusch?fer <[email protected]>
> +
> +description: |
> + See also Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml
> +
> + The Netronix EC contains an RTC, which can be used for time-keeping, alarm,
> + and automatic power-on. Note that not all of this functionality is currently
> + supported in this binding.
> +
> +allOf:
> + - $ref: "rtc.yaml#"
> +
> +properties:
> + compatible:
> + const: netronix,ntxec-rtc
> +
> +required:
> + - compatible
> --
> 2.27.0
>

--
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

2020-06-21 19:26:50

by Andreas Kemnade

[permalink] [raw]
Subject: Re: [RFC PATCH 05/10] dt-bindings: pwm: Add bindings for PWM function in Netronix EC

On Sun, 21 Jun 2020 00:42:16 +0200
Jonathan Neuschäfer <[email protected]> wrote:

> The Netronix embedded controller as found in Kobo Aura and Tolino Shine
> supports one PWM channel, which is used to control the frontlight
> brightness on these devices.
>
> Known problems:
> - `make dt_binding_check` shows the following warnings:
> Documentation/devicetree/bindings/mfd/netronix,ntxec.example.dts:49.17-42:
> Warning (pwms_property): /example-0/backlight:pwms: cell 2 is not a
> phandle reference
> Documentation/devicetree/bindings/mfd/netronix,ntxec.example.dts:49.17-42:
> Warning (pwms_property): /example-0/backlight:pwms: Could not get
> phandle node for (cell 2)
>
In the tolino sources in ./drivers/misc/ntx-misc.c I find this line

if(4==gptHWCFG->m_val.bFL_PWM) {

No idea what it does but I would expect to have a kind of translation to
a dt property?

> Signed-off-by: Jonathan Neuschäfer <[email protected]>
> ---
> .../bindings/mfd/netronix,ntxec.yaml | 13 ++++++++
> .../bindings/pwm/netronix,ntxec-pwm.yaml | 33 +++++++++++++++++++
> 2 files changed, 46 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/pwm/netronix,ntxec-pwm.yaml
>
> diff --git a/Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml b/Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml
> index 596df460f98eb..6562c41c5a9a9 100644
> --- a/Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml
> +++ b/Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml
> @@ -31,6 +31,9 @@ properties:
> description:
> The EC can signal interrupts via a GPIO line
>
> + pwm:
> + $ref: ../pwm/netronix,ntxec-pwm.yaml
> +
> required:
> - compatible
> - reg
> @@ -53,5 +56,15 @@ examples:
> interrupts = <11 IRQ_TYPE_EDGE_FALLING>;
> interrupt-controller;
> #interrupt-cells = <1>;
> +
> + ec_pwm: pwm {
> + compatible = "netronix,ntxec-pwm";
> + #pwm-cells = <1>;
shouldn't that be 2?
> + };
> };
> };
> +
> + backlight {
> + compatible = "pwm-backlight";
> + pwms = <&ec_pwm 0 50000>;
since you have 2 values after the &ec_pwm

> + };
> diff --git a/Documentation/devicetree/bindings/pwm/netronix,ntxec-pwm.yaml b/Documentation/devicetree/bindings/pwm/netronix,ntxec-pwm.yaml
> new file mode 100644
> index 0000000000000..1dc1b1aba081c
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/pwm/netronix,ntxec-pwm.yaml
> @@ -0,0 +1,33 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/pwm/netronix,ntxec-pwm.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: PWM functionality in Netronix embedded controller
> +
> +maintainers:
> + - Jonathan Neuschäfer <[email protected]>
> +
> +description: |
> + See also Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml
> +
> + The Netronix EC contains PWM functionality, which is usually used to drive
> + the backlight LED.
> +
> + The following PWM channels are supported:
> + - 0: The PWM channel controlled by registers 0xa1-0xa7
> +
> +allOf:
> + - $ref: pwm.yaml#
> +
> +properties:
> + compatible:
> + const: netronix,ntxec-pwm
> +
> + "#pwm-cells":
> + const: 1

shouln't that be 2?
> +
> +required:
> + - compatible
> + - "#pwm-cells"
> --
> 2.27.0
>
>

Regards,
Andreas

2020-06-26 21:57:28

by Andreas Kemnade

[permalink] [raw]
Subject: Re: [RFC PATCH 07/10] dt-bindings: rtc: Add bindings for Netronix embedded controller RTC

On Sun, 21 Jun 2020 02:02:20 +0200
Alexandre Belloni <[email protected]> wrote:

> Hi,
>
> On 21/06/2020 00:42:18+0200, Jonathan Neusch?fer wrote:
> > The Netronix EC implements an RTC with the following functionality:
> >
> > - Calendar-based time keeping with single-second resolution
> > - Automatic power-on with single-minute resolution
> > - Alarm at single-second resolution
> >
> > This binding only supports timekeeping for now.
> >
> > Signed-off-by: Jonathan Neusch?fer <[email protected]>
> > ---
> > .../bindings/mfd/netronix,ntxec.yaml | 7 +++++
> > .../bindings/rtc/netronix,ntxec-rtc.yaml | 27 +++++++++++++++++++
> > 2 files changed, 34 insertions(+)
> > create mode 100644 Documentation/devicetree/bindings/rtc/netronix,ntxec-rtc.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml b/Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml
> > index 6562c41c5a9a9..f6a32f46f47bb 100644
> > --- a/Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml
> > +++ b/Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml
> > @@ -34,6 +34,9 @@ properties:
> > pwm:
> > $ref: ../pwm/netronix,ntxec-pwm.yaml
> >
> > + rtc:
> > + $ref: ../rtc/netronix,ntxec-rtc.yaml
> > +
>
> Shouldn't the node simply be documented here?
>
> Also, do you really need a compatible string to be able to proe the
> driver? What are the chances that you'll get a similar EC without an
> RTC?
>
Tolino Shine 2 HD has the mentioned EC but the vendor kernel does not use
its RTC (not checked whether it is present or functional).
As a key for grepping in the vendor sources:
gptNtxHwCfg->m_val.bPCB = 0x50

Tolino Shine 3 and Kobo Clara HD do not have that EC.

Regrads,
Andreas

2020-07-03 17:07:57

by J. Neuschäfer

[permalink] [raw]
Subject: Re: [RFC PATCH 07/10] dt-bindings: rtc: Add bindings for Netronix embedded controller RTC

On Fri, Jun 26, 2020 at 11:55:52PM +0200, Andreas Kemnade wrote:
> On Sun, 21 Jun 2020 02:02:20 +0200
> Alexandre Belloni <[email protected]> wrote:
[...]
> > Also, do you really need a compatible string to be able to proe the
> > driver? What are the chances that you'll get a similar EC without an
> > RTC?
> >
> Tolino Shine 2 HD has the mentioned EC but the vendor kernel does not use
> its RTC (not checked whether it is present or functional).
> As a key for grepping in the vendor sources:
> gptNtxHwCfg->m_val.bPCB = 0x50

Thanks for checking.

(In the MMC dump from my Shine 2 HD, it's decimal 50 rather than hex)

> Tolino Shine 3 and Kobo Clara HD do not have that EC.

Fortunately, this set of drivers isn't needed at all in that case.


Thanks,
Jonathan


Attachments:
(No filename) (806.00 B)
signature.asc (849.00 B)
Download all attachments

2020-08-23 23:23:08

by J. Neuschäfer

[permalink] [raw]
Subject: Re: [RFC PATCH 05/10] dt-bindings: pwm: Add bindings for PWM function in Netronix EC

On Sun, Jun 21, 2020 at 08:41:23PM +0200, Andreas Kemnade wrote:
> On Sun, 21 Jun 2020 00:42:16 +0200
> Jonathan Neuschäfer <[email protected]> wrote:
>
> > The Netronix embedded controller as found in Kobo Aura and Tolino Shine
> > supports one PWM channel, which is used to control the frontlight
> > brightness on these devices.
> >
> > Known problems:
> > - `make dt_binding_check` shows the following warnings:
> > Documentation/devicetree/bindings/mfd/netronix,ntxec.example.dts:49.17-42:
> > Warning (pwms_property): /example-0/backlight:pwms: cell 2 is not a
> > phandle reference
> > Documentation/devicetree/bindings/mfd/netronix,ntxec.example.dts:49.17-42:
> > Warning (pwms_property): /example-0/backlight:pwms: Could not get
> > phandle node for (cell 2)
> >
> In the tolino sources in ./drivers/misc/ntx-misc.c I find this line
>
> if(4==gptHWCFG->m_val.bFL_PWM) {
>
> No idea what it does but I would expect to have a kind of translation to
> a dt property?

As far as I understand it, FL_PWM=4 means that there is a second PWM
channel, in order to provide different backlight colors.

I think it should be possible to simply extend the binding to list
another available PWM channel, once we add support for such hardware.

> > + ec_pwm: pwm {
> > + compatible = "netronix,ntxec-pwm";
> > + #pwm-cells = <1>;
> shouldn't that be 2?
> > + };
> > };
> > };
> > +
> > + backlight {
> > + compatible = "pwm-backlight";
> > + pwms = <&ec_pwm 0 50000>;
> since you have 2 values after the &ec_pwm
[...]
> > +properties:
> > + compatible:
> > + const: netronix,ntxec-pwm
> > +
> > + "#pwm-cells":
> > + const: 1
>
> shouln't that be 2?

Right, I'll fix that.


Thanks,
Jonathan


Attachments:
(No filename) (1.87 kB)
signature.asc (849.00 B)
Download all attachments