dts: ARM: add Kobo Clara HD eBook reader
Subsystems (3)
v2 cover dts: ARM: add Kobo Clara HD eBook reader
This adds a device tree for the Kobo Clara HD eBook reader. Name on mainboard is: 37NB-E60K00+4A4
Serials start with: E60K02 (a number also seen in vendor kernel sources)
These boards are also found in the Tolino Shine 3 reader but equipped with a i.MX6SL processor. Support for that device is planned to be added in a later patch series. To prepare for that the device tree is split up into a board file containing SoC-independent stuff and a file containing the SoC-dependent stuff.
Work is based on code from the vendor kernel at
https://github.com/kobolabs/Kobo-Reader/blob/master/hw/imx6sll-clara/kernel.tar.bz2
but things need to be heavily reworked due to incompatible bindings and to prepare for Tolino Shine 3
Changes in v2:
- reordered patches
- various cleanups as suggested by Marco Felsch
Andreas Kemnade (3):
dt-bindings: arm: fsl: add compatible string for Kobo Clara HD
ARM: dts: add Netronix E60K02 board common file
ARM: dts: imx: add devicetree for Kobo Clara HD
.../devicetree/bindings/arm/fsl.yaml | 1 + arch/arm/boot/dts/Makefile | 3 +- arch/arm/boot/dts/e60k02.dtsi | 323 ++++++++++++++++++ arch/arm/boot/dts/imx6sll-kobo-clarahd.dts | 279 +++++++++++++++ 4 files changed, 605 insertions(+), 1 deletion(-) create mode 100644 arch/arm/boot/dts/e60k02.dtsi create mode 100644 arch/arm/boot/dts/imx6sll-kobo-clarahd.dts
Signature · 1 line
2.20.1
PATCH v2 1/3 dt-bindings: arm: fsl: add compatible string for Kobo Clara HD
This adds a compatible string for the Kobo Clara HD eBook reader.
---
Changes in v2: reordered, was 2/3
Documentation/devicetree/bindings/arm/fsl.yaml | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/arm/fsl.yaml +1 -0
@@ -148,6 +148,7 @@ properties: items: - enum: - fsl,imx6sll-evk + - kobo,clarahd - const: fsl,imx6sll - description: i.MX6SX based Boards
Signature · 1 line
2.20.1
PATCH v2 2/3 ARM: dts: add Netronix E60K02 board common file
In reply to Andreas KemnadeThe Netronix board E60K02 can be found some several Ebook-Readers, at least the Kobo Clara HD and the Tolino Shine 3. The board is equipped with different SoCs requiring different pinmuxes.
For now the following peripherals are included:
- LED
- Power Key
- Cover (gpio via hall sensor)
- RC5T619 PMIC (the kernel misses support for rtc and charger subdevices).
- Backlight via lm3630a
- Wifi sdio chip detection (mmc-powerseq and stuff)
It is based on vendor kernel but heavily reworked due to many changed bindings.
---
Changes in v2:
- reordered, was 1/3
- moved pinmuxes to their actual users, not the parents of them
- removed some already-disabled stuff
- minor cleanups
backligt dependencies:
module autoloading:
https://patchwork.kernel.org/patch/11139987/
enable-gpios property:
https://patchwork.kernel.org/patch/11143795/
arch/arm/boot/dts/e60k02.dtsi | 323 ++++++++++++++++++++++++++++++++++ 1 file changed, 323 insertions(+) create mode 100644 arch/arm/boot/dts/e60k02.dtsi
arch/arm/boot/dts/e60k02.dtsi new file +323 -0
@@ -0,0 +1,323 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright 2019 Andreas Kemnade + * based on works + * Copyright 2016 Freescale Semiconductor, Inc. + * and + * Copyright (C) 2014 Ricoh Electronic Devices Co., Ltd + * + * Netronix E60K02 board common. + * This board is equipped with different SoCs and + * found in ebook-readers like the Kobo Clara HD (with i.MX6SLL) and + * the Tolino Shine 3 (with i.MX6SL) + */ +#include <dt-bindings/input/input.h> + +/ { + + chosen { + stdout-path = &uart1; + }; + + gpio-keys { + compatible = "gpio-keys"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_gpio_keys>; + power { + label = "Power"; + gpios = <&gpio5 8 GPIO_ACTIVE_LOW>; + linux,code = <KEY_POWER>; + gpio-key,wakeup; + }; + cover { + label = "Cover"; + gpios = <&gpio5 12 GPIO_ACTIVE_LOW>; + linux,code = <SW_LID>; + linux,input-type = <EV_SW>; + gpio-key,wakeup; + }; + }; + + leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_led>; + + GLED { + gpios = <&gpio5 7 GPIO_ACTIVE_LOW>; + linux,default-trigger = "timer"; + }; + }; + + memory { + reg = <0x80000000 0x80000000>; + }; + + reg_wifi: regulator-wifi { + compatible = "regulator-fixed"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_wifi_power>; + regulator-name = "SD3_SPWR"; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + + gpio = <&gpio4 29 GPIO_ACTIVE_HIGH>; + enable-active-high; + + }; + + wifi_pwrseq: wifi_pwrseq { + compatible = "mmc-pwrseq-simple"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_wifi_reset>; + post-power-on-delay-ms = <20>; + reset-gpios = <&gpio5 0 GPIO_ACTIVE_LOW>; + }; + +}; + + +&i2c1 { + clock-frequency = <100000>; + pinctrl-names = "default","sleep"; + pinctrl-0 = <&pinctrl_i2c1>; + pinctrl-1 = <&pinctrl_i2c1_sleep>; + status = "okay"; + + lm3630a: backlight@36 { + reg = <0x36>; + + compatible = "ti,lm3630a"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_lm3630a_bl_gpio>; + enable-gpios = <&gpio2 10 GPIO_ACTIVE_HIGH>; + + #address-cells = <1>; + #size-cells = <0>; + + led@0 { + reg = <0>; + led-sources = <0>; + label = "backlight_warm"; + default-brightness = <0>; + max-brightness = <255>; + }; + + led@1 { + reg = <1>; + led-sources = <1>; + label = "backlight_cold"; + default-brightness = <0>; + max-brightness = <255>; + }; + + }; +}; + +&i2c3 { + clock-frequency = <100000>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_i2c3>; + status = "okay"; + + ricoh619: pmic@32 { + compatible = "ricoh,rc5t619"; + reg = <0x32>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_ricoh_gpio>; + system-power-controller; + + regulators { + dcdc1_reg: DCDC1 { + regulator-name = "DCDC1"; + regulator-min-microvolt = <300000>; + regulator-max-microvolt = <1875000>; + regulator-always-on; + regulator-boot-on; + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-max-microvolt = <900000>; + regulator-suspend-min-microvolt = <900000>; + }; + }; + + /* Core3_3V3 */ + dcdc2_reg: DCDC2 { + regulator-name = "DCDC2"; + regulator-always-on; + regulator-boot-on; + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-max-microvolt = <3300000>; + regulator-suspend-min-microvolt = <3300000>; + }; + }; + + dcdc3_reg: DCDC3 { + regulator-name = "DCDC3"; + regulator-min-microvolt = <300000>; + regulator-max-microvolt = <1875000>; + regulator-always-on; + regulator-boot-on; + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-max-microvolt = <1140000>; + regulator-suspend-min-microvolt = <1140000>; + }; + }; + + /* Core4_1V2 */ + dcdc4_reg: DCDC4 { + regulator-name = "DCDC4"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-always-on; + regulator-boot-on; + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-max-microvolt = <1140000>; + regulator-suspend-min-microvolt = <1140000>; + }; + }; + + /* Core4_1V8 */ + dcdc5_reg: DCDC5 { + regulator-name = "DCDC5"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + regulator-boot-on; + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-max-microvolt = <1700000>; + regulator-suspend-min-microvolt = <1700000>; + }; + }; + + /* IR_3V3 */ + ldo1_reg: LDO1 { + regulator-name = "LDO1"; + regulator-boot-on; + }; + + /* Core1_3V3 */ + ldo2_reg: LDO2 { + regulator-name = "LDO2"; + regulator-always-on; + regulator-boot-on; + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-max-microvolt = <3000000>; + regulator-suspend-min-microvolt = <3000000>; + }; + }; + + /* Core5_1V2 */ + ldo3_reg: LDO3 { + regulator-name = "LDO3"; + regulator-always-on; + regulator-boot-on; + }; + + ldo4_reg: LDO4 { + regulator-name = "LDO4"; + regulator-boot-on; + }; + + /* SPD_3V3 */ + ldo5_reg: LDO5 { + regulator-name = "LDO5"; + regulator-always-on; + regulator-boot-on; + }; + + /* DDR_0V6 */ + ldo6_reg: LDO6 { + regulator-name = "LDO6"; + regulator-always-on; + regulator-boot-on; + }; + + /* VDD_PWM */ + ldo7_reg: LDO7 { + regulator-name = "LDO7"; + regulator-always-on; + regulator-boot-on; + }; + + /* ldo_1v8 */ + ldo8_reg: LDO8 { + regulator-name = "LDO8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + regulator-boot-on; + }; + + ldo9_reg: LDO9 { + regulator-name = "LDO9"; + regulator-boot-on; + }; + + ldo10_reg: LDO10 { + regulator-name = "LDO10"; + regulator-boot-on; + }; + + ldortc1_reg: LDORTC1 { + regulator-name = "LDORTC1"; + regulator-boot-on; + }; + + ldortc2_reg: LDORTC2 { + regulator-name = "LDORTC2"; + regulator-boot-on; + }; + }; + + }; + +}; + +&snvs_rtc { + /* we are using the rtc in the pmic, not disabled imx6sll.dtsi */ + status = "disabled"; +}; + +&uart1 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_uart1>; + status = "okay"; +}; + +&usdhc2 { + pinctrl-names = "default", "state_100mhz", "state_200mhz","sleep"; + pinctrl-0 = <&pinctrl_usdhc2>; + pinctrl-1 = <&pinctrl_usdhc2_100mhz>; + pinctrl-2 = <&pinctrl_usdhc2_200mhz>; + pinctrl-3 = <&pinctrl_usdhc2_sleep>; + non-removable; + status = "okay"; +}; + +&usdhc3 { + pinctrl-names = "default", "state_100mhz", "state_200mhz","sleep"; + pinctrl-0 = <&pinctrl_usdhc3>; + pinctrl-1 = <&pinctrl_usdhc3_100mhz>; + pinctrl-2 = <&pinctrl_usdhc3_200mhz>; + pinctrl-3 = <&pinctrl_usdhc3_sleep>; + vmmc-supply = <®_wifi>; + mmc-pwrseq = <&wifi_pwrseq>; + cap-power-off-card; + non-removable; + status = "okay"; +}; + +&usbotg1 { + pinctrl-names = "default"; + disable-over-current; + srp-disable; + hnp-disable; + adp-disable; + status = "okay"; +};
Signature · 1 line
2.20.1
PATCH v2 3/3 ARM: dts: imx: add devicetree for Kobo Clara HD
In reply to Andreas KemnadeThis adds a devicetree for the Kobo Clara HD Ebook reader. It is on based on boards called "e60k02". It is equipped with an imx6sll SoC.
--- arch/arm/boot/dts/Makefile | 3 +- arch/arm/boot/dts/imx6sll-kobo-clarahd.dts | 279 +++++++++++++++++++++ 2 files changed, 281 insertions(+), 1 deletion(-) create mode 100644 arch/arm/boot/dts/imx6sll-kobo-clarahd.dts
arch/arm/boot/dts/Makefile +2 -1
@@ -551,7 +551,8 @@ dtb-$(CONFIG_SOC_IMX6SL) += \ imx6sl-evk.dtb \ imx6sl-warp.dtb dtb-$(CONFIG_SOC_IMX6SLL) += \ - imx6sll-evk.dtb + imx6sll-evk.dtb \ + imx6sll-kobo-clarahd.dtb dtb-$(CONFIG_SOC_IMX6SX) += \ imx6sx-nitrogen6sx.dtb \ imx6sx-sabreauto.dtb \
arch/arm/boot/dts/imx6sll-kobo-clarahd.dts new file +279 -0
279 lines not on this page · raw message
Signature · 1 line
2.20.1
Re: [PATCH v2 2/3] ARM: dts: add Netronix E60K02 board common file
In reply to Andreas KemnadeThanks for CCing me on this patchset. Nice to see more e-book reader related work!
A few comments and questions below.
Quoted 3 lines · Andreas Kemnade
The Netronix board E60K02 can be found some several Ebook-Readers, at least the Kobo Clara HD and the Tolino Shine 3. The board is equipped with different SoCs requiring different pinmuxes.
Do I understand it correctly that i.MX6SL and i.MX6SLL are pin- compatible so we can use the same pin numbers and GPIO handles in the DT?
arch/arm/boot/dts/e60k02.dtsi line 46
Quoted 6 lines
arch/arm/boot/dts/e60k02.dtsi new file +6
-0+ leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_led>; + + GLED {
What does "GLED" mean? It's not obvious to me.
What user-visible purpose does this LED have, or where is it on the board?
arch/arm/boot/dts/e60k02.dtsi line 53
Quoted 7 lines
arch/arm/boot/dts/e60k02.dtsi new file +7
-0+ gpios = <&gpio5 7 GPIO_ACTIVE_LOW>; + linux,default-trigger = "timer"; + }; + }; + + memory { + reg = <0x80000000 0x80000000>;
2 GiB of memory?
arch/arm/boot/dts/e60k02.dtsi line 144
Quoted 1 line
arch/arm/boot/dts/e60k02.dtsi new file +1
-0+ /* Core3_3V3 */
What are these labels (Core3_3V3, Core4_1V2, etc.)?
arch/arm/boot/dts/e60k02.dtsi line 154
Quoted 10 lines
arch/arm/boot/dts/e60k02.dtsi new file +10
-0+ dcdc2_reg: DCDC2 { + regulator-name = "DCDC2"; + regulator-always-on; + regulator-boot-on; + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-max-microvolt = <3300000>; + regulator-suspend-min-microvolt = <3300000>; + }; + };
Thanks,
Jonathan Neuschäfer
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Re: [PATCH v2 2/3] ARM: dts: add Netronix E60K02 board common file
Hi Jonathan,
Quoted 5 lines · On Mon, 7 Oct 2019 00:38:48 +0200 Jonathan Neuschäfer <[email protected]>…
Thanks for CCing me on this patchset. Nice to see more e-book reader related work!
A few comments and questions below.
Quoted 9 lines
Quoted 3 lines · Andreas Kemnade
The Netronix board E60K02 can be found some several Ebook-Readers, at least the Kobo Clara HD and the Tolino Shine 3. The board is equipped with different SoCs requiring different pinmuxes.
Do I understand it correctly that i.MX6SL and i.MX6SLL are pin- compatible so we can use the same pin numbers and GPIO handles in the DT?
Yes, for that purpose yes, The i.MX6SL has more functions than the i.MX6SLL, which you will of course not find on the SLL pins.
Quoted 11 lines
arch/arm/boot/dts/e60k02.dtsi line 46
Quoted 6 lines
arch/arm/boot/dts/e60k02.dtsi new file +6
-0+ leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_led>; + + GLED {What does "GLED" mean? It's not obvious to me.
What user-visible purpose does this LED have, or where is it on the board?
It is on the power key. So probably we could have "power" in its name. GLED is just the name in vendors uboot and kernel.
I use that led also as an output in uboot to have multiboot between vendor system, vendor kernel +debian system and patched mainline + debian system.
Quoted 10 lines
arch/arm/boot/dts/e60k02.dtsi line 53
Quoted 7 lines
arch/arm/boot/dts/e60k02.dtsi new file +7
-0+ gpios = <&gpio5 7 GPIO_ACTIVE_LOW>; + linux,default-trigger = "timer"; + }; + }; + + memory { + reg = <0x80000000 0x80000000>;2 GiB of memory?
Well, 512MByte. Seems that uboot overwrites that. But we should use the correct value here.
Quoted 4 lines
arch/arm/boot/dts/e60k02.dtsi line 144
Quoted 1 line
arch/arm/boot/dts/e60k02.dtsi new file +1
-0+ /* Core3_3V3 */What are these labels (
Core3_3V3,Core4_1V2, etc.)?
I have taken then from the tolino board file. Probably they are netnames of the pcb but not the names of the regulators in the pmic.
Quoted 11 lines
arch/arm/boot/dts/e60k02.dtsi line 154
Quoted 10 lines
arch/arm/boot/dts/e60k02.dtsi new file +10
-0+ dcdc2_reg: DCDC2 { + regulator-name = "DCDC2"; + regulator-always-on; + regulator-boot-on; + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-max-microvolt = <3300000>; + regulator-suspend-min-microvolt = <3300000>; + }; + };
Regards,
Andreas
Re: [PATCH v2 2/3] ARM: dts: add Netronix E60K02 board common file
In reply to Jonathan NeuschäferHi Jonathan,
Quoted 3 lines · On Mon, 7 Oct 2019 00:38:48 +0200 Jonathan Neuschäfer <[email protected]>…
Thanks for CCing me on this patchset. Nice to see more e-book reader related work!
btw. seems that we have a common target, since our ebook readers both have a tps65185. It seems to be a good idea to comment things on the i2c busses without proper bindings. That might help to find allies.
I will send a v3 with correct memory, better name for GLED and the above-mentioned comments.
Regards,
Andreas
Quoted 50 lines
A few comments and questions below.
Quoted 3 lines · Andreas Kemnade
The Netronix board E60K02 can be found some several Ebook-Readers, at least the Kobo Clara HD and the Tolino Shine 3. The board is equipped with different SoCs requiring different pinmuxes.
Do I understand it correctly that i.MX6SL and i.MX6SLL are pin- compatible so we can use the same pin numbers and GPIO handles in the DT?
arch/arm/boot/dts/e60k02.dtsi line 46
Quoted 6 lines
arch/arm/boot/dts/e60k02.dtsi new file +6
-0+ leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_led>; + + GLED {What does "GLED" mean? It's not obvious to me.
What user-visible purpose does this LED have, or where is it on the board?arch/arm/boot/dts/e60k02.dtsi line 53
Quoted 7 lines
arch/arm/boot/dts/e60k02.dtsi new file +7
-0+ gpios = <&gpio5 7 GPIO_ACTIVE_LOW>; + linux,default-trigger = "timer"; + }; + }; + + memory { + reg = <0x80000000 0x80000000>;2 GiB of memory?
arch/arm/boot/dts/e60k02.dtsi line 144
Quoted 1 line
arch/arm/boot/dts/e60k02.dtsi new file +1
-0+ /* Core3_3V3 */What are these labels (
Core3_3V3,Core4_1V2, etc.)?arch/arm/boot/dts/e60k02.dtsi line 154
Quoted 10 lines
arch/arm/boot/dts/e60k02.dtsi new file +10
-0+ dcdc2_reg: DCDC2 { + regulator-name = "DCDC2"; + regulator-always-on; + regulator-boot-on; + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-max-microvolt = <3300000>; + regulator-suspend-min-microvolt = <3300000>; + }; + };Thanks,
Jonathan Neuschäfer
Re: [PATCH v2 2/3] ARM: dts: add Netronix E60K02 board common file
Quoted 11 lines · Andreas Kemnade
Hi Jonathan,
Quoted 3 lines · On Mon, 7 Oct 2019 00:38:48 +0200 Jonathan Neuschäfer <[email protected]>…
Thanks for CCing me on this patchset. Nice to see more e-book reader related work!
btw. seems that we have a common target, since our ebook readers both have a tps65185. It seems to be a good idea to comment things on the i2c busses without proper bindings. That might help to find allies.
Yep. I did this in imx50-kobo-aura.dts:
/* TODO: TPS65185 PMIC for E Ink at 0x68 */
If you want to take on the task of writing/upstreaming a TPS65185 driver, feel free. I'm currently not working on one.
(I have an MFD driver and a hwmon driver on a branch somewhere, but no regulator driver.)
Quoted 2 lines
I will send a v3 with correct memory, better name for GLED and the above-mentioned comments.
Thanks!
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel