All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] ARM: Initial devicetree for Kobo Aura
@ 2019-03-31 19:15 ` Jonathan Neuschäfer
  0 siblings, 0 replies; 13+ messages in thread
From: Jonathan Neuschäfer @ 2019-03-31 19:15 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Rob Herring, Mark Rutland, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Manivannan Sadhasivam, Aisheng Dong, Jonathan Neuschäfer,
	Vokáč Michal, Thierry Reding, Kevin Hilman,
	Heiko Stuebner, Jagan Teki, Martin Blumenstingl, Johan Hovold,
	devicetree, linux-kernel

This series adds a devicetree for the i.MX507-based Kobo Aura e-book
reader, and fixes a few things in imx50.dtsi along the way.

v1: https://lore.kernel.org/lkml/20190319152421.16179-1-j.neuschaefer@gmx.net/

Changes in v2:
- Various cleanups, as suggested by Shawn Guo
- Patch "dt-bindings: arm: fsl: Add i.MX50 based boards" is new
- Squashed patch "ARM: dts: imx50-kobo-aura: Enable USB support" into
	patch 3 ("ARM: dts: imx50: Add Kobo Aura DTS")
- Dropped patch "ARM: dts: imx50: Add PHY node for usbotg and adjust
	clocks" because it was already merged into the imx tree
- Dropped patch "ARM: dts: imx50: Fix the numbering of the I2C
	controllers", because a similar one was merged into the imx tree
- Added Rob Herring's Reviewed-by tag to patch 1 ("dt-bindings: Add
	vendor prefix for Rakuten Kobo, Inc.")

A lot of functionality is still missing:
- poweroff/reboot, RTC, and battery monitoring support, as well as a PWM
  channel for the display backlight are provided by a custom embedded
  controller, which will be supported by a future patchset.
  The EC driver will also tell the EC to keep the board powered on;
  otherwise the EC will power the board off after about ten seconds
  (presumably to avoid battery drain if the OS is missing or corrupted)
- The touchscreen controller, eKTF2132, currently doesn't have a
  mainline driver.
- The e-paper display controller (EPDC) embedded in the i.MX50 SoC will
  need a whole new DRM driver, devicetree bindings, etc.
- The TPS65185 PMIC, which generates the voltages necessary for driving
  the E Ink panel, also needs a driver
- The backlight doesn't quite fit the existing pwm-backlight DT binding,
  because it uses an additional GPIO to boost the brightness. This
  requires some devicetree work
- Linux doesn't currently support suspend-to-ram on i.MX50

In order to keep the system running when CONFIG_PM is enabled, the
following fix is also required:
https://lore.kernel.org/lkml/20190326182258.21945-1-j.neuschaefer@gmx.net/

My own notes about this machine can be found here:
https://github.com/neuschaefer/linux/wiki/Kobo-Aura

Jonathan Neuschäfer (3):
  dt-bindings: Add vendor prefix for Rakuten Kobo, Inc.
  dt-bindings: arm: fsl: Add i.MX50 based boards
  ARM: dts: imx50: Add Kobo Aura DTS

 .../devicetree/bindings/arm/fsl.yaml          |   7 +
 .../devicetree/bindings/vendor-prefixes.txt   |   1 +
 arch/arm/boot/dts/Makefile                    |   3 +-
 arch/arm/boot/dts/imx50-kobo-aura.dts         | 258 ++++++++++++++++++
 4 files changed, 268 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boot/dts/imx50-kobo-aura.dts

--
2.20.1


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH v2 0/3] ARM: Initial devicetree for Kobo Aura
@ 2019-03-31 19:15 ` Jonathan Neuschäfer
  0 siblings, 0 replies; 13+ messages in thread
From: Jonathan Neuschäfer @ 2019-03-31 19:15 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Mark Rutland, Aisheng Dong, Vokáč Michal,
	Heiko Stuebner, devicetree, Martin Blumenstingl, Shawn Guo,
	Sascha Hauer, Jonathan Neuschäfer, Johan Hovold,
	Rob Herring, NXP Linux Team, Pengutronix Kernel Team,
	Manivannan Sadhasivam, Thierry Reding, Fabio Estevam,
	Kevin Hilman, linux-kernel, Jagan Teki

This series adds a devicetree for the i.MX507-based Kobo Aura e-book
reader, and fixes a few things in imx50.dtsi along the way.

v1: https://lore.kernel.org/lkml/20190319152421.16179-1-j.neuschaefer@gmx.net/

Changes in v2:
- Various cleanups, as suggested by Shawn Guo
- Patch "dt-bindings: arm: fsl: Add i.MX50 based boards" is new
- Squashed patch "ARM: dts: imx50-kobo-aura: Enable USB support" into
	patch 3 ("ARM: dts: imx50: Add Kobo Aura DTS")
- Dropped patch "ARM: dts: imx50: Add PHY node for usbotg and adjust
	clocks" because it was already merged into the imx tree
- Dropped patch "ARM: dts: imx50: Fix the numbering of the I2C
	controllers", because a similar one was merged into the imx tree
- Added Rob Herring's Reviewed-by tag to patch 1 ("dt-bindings: Add
	vendor prefix for Rakuten Kobo, Inc.")

A lot of functionality is still missing:
- poweroff/reboot, RTC, and battery monitoring support, as well as a PWM
  channel for the display backlight are provided by a custom embedded
  controller, which will be supported by a future patchset.
  The EC driver will also tell the EC to keep the board powered on;
  otherwise the EC will power the board off after about ten seconds
  (presumably to avoid battery drain if the OS is missing or corrupted)
- The touchscreen controller, eKTF2132, currently doesn't have a
  mainline driver.
- The e-paper display controller (EPDC) embedded in the i.MX50 SoC will
  need a whole new DRM driver, devicetree bindings, etc.
- The TPS65185 PMIC, which generates the voltages necessary for driving
  the E Ink panel, also needs a driver
- The backlight doesn't quite fit the existing pwm-backlight DT binding,
  because it uses an additional GPIO to boost the brightness. This
  requires some devicetree work
- Linux doesn't currently support suspend-to-ram on i.MX50

In order to keep the system running when CONFIG_PM is enabled, the
following fix is also required:
https://lore.kernel.org/lkml/20190326182258.21945-1-j.neuschaefer@gmx.net/

My own notes about this machine can be found here:
https://github.com/neuschaefer/linux/wiki/Kobo-Aura

Jonathan Neuschäfer (3):
  dt-bindings: Add vendor prefix for Rakuten Kobo, Inc.
  dt-bindings: arm: fsl: Add i.MX50 based boards
  ARM: dts: imx50: Add Kobo Aura DTS

 .../devicetree/bindings/arm/fsl.yaml          |   7 +
 .../devicetree/bindings/vendor-prefixes.txt   |   1 +
 arch/arm/boot/dts/Makefile                    |   3 +-
 arch/arm/boot/dts/imx50-kobo-aura.dts         | 258 ++++++++++++++++++
 4 files changed, 268 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boot/dts/imx50-kobo-aura.dts

--
2.20.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH v2 1/3] dt-bindings: Add vendor prefix for Rakuten Kobo, Inc.
  2019-03-31 19:15 ` Jonathan Neuschäfer
  (?)
@ 2019-03-31 19:16   ` Jonathan Neuschäfer
  -1 siblings, 0 replies; 13+ messages in thread
From: Jonathan Neuschäfer @ 2019-03-31 19:16 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Rob Herring, Mark Rutland, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Manivannan Sadhasivam, Aisheng Dong, Jonathan Neuschäfer,
	Vokáč Michal, Thierry Reding, Kevin Hilman,
	Heiko Stuebner, Jagan Teki, Martin Blumenstingl, Johan Hovold,
	devicetree, linux-kernel, Rob Herring

Rakuten Kobo, Inc. (formerly Kobo, Inc.) is a company that sells e-book
readers and related products. More information is available at:

- https://en.wikipedia.org/wiki/Kobo_Inc.
- https://www.kobo.com/

Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-by: Rob Herring <robh@kernel.org>
---
v2:
- Add Rob Herring's R-b

v1:
https://lore.kernel.org/lkml/20190319152421.16179-2-j.neuschaefer@gmx.net/
---
 Documentation/devicetree/bindings/vendor-prefixes.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
index 8162b0eb4b50..6cc50f1fac1c 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.txt
+++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
@@ -210,6 +210,7 @@ kiebackpeter    Kieback & Peter GmbH
 kinetic Kinetic Technologies
 kingdisplay	King & Display Technology Co., Ltd.
 kingnovel	Kingnovel Technology Co., Ltd.
+kobo	Rakuten Kobo Inc.
 koe	Kaohsiung Opto-Electronics Inc.
 kosagi	Sutajio Ko-Usagi PTE Ltd.
 kyo	Kyocera Corporation
--
2.20.1


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v2 1/3] dt-bindings: Add vendor prefix for Rakuten Kobo, Inc.
@ 2019-03-31 19:16   ` Jonathan Neuschäfer
  0 siblings, 0 replies; 13+ messages in thread
From: Jonathan Neuschäfer @ 2019-03-31 19:16 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Rob Herring, Mark Rutland, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Manivannan Sadhasivam, Aisheng Dong, Jonathan Neuschäfer,
	Vokáč Michal, Thierry Reding, Kevin Hilman,
	Heiko Stuebner, Jagan Teki, Martin Blumenstingl, Johan Hovold,
	devicetree

Rakuten Kobo, Inc. (formerly Kobo, Inc.) is a company that sells e-book
readers and related products. More information is available at:

- https://en.wikipedia.org/wiki/Kobo_Inc.
- https://www.kobo.com/

Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-by: Rob Herring <robh@kernel.org>
---
v2:
- Add Rob Herring's R-b

v1:
https://lore.kernel.org/lkml/20190319152421.16179-2-j.neuschaefer@gmx.net/
---
 Documentation/devicetree/bindings/vendor-prefixes.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
index 8162b0eb4b50..6cc50f1fac1c 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.txt
+++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
@@ -210,6 +210,7 @@ kiebackpeter    Kieback & Peter GmbH
 kinetic Kinetic Technologies
 kingdisplay	King & Display Technology Co., Ltd.
 kingnovel	Kingnovel Technology Co., Ltd.
+kobo	Rakuten Kobo Inc.
 koe	Kaohsiung Opto-Electronics Inc.
 kosagi	Sutajio Ko-Usagi PTE Ltd.
 kyo	Kyocera Corporation
--
2.20.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v2 1/3] dt-bindings: Add vendor prefix for Rakuten Kobo, Inc.
@ 2019-03-31 19:16   ` Jonathan Neuschäfer
  0 siblings, 0 replies; 13+ messages in thread
From: Jonathan Neuschäfer @ 2019-03-31 19:16 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Mark Rutland, Aisheng Dong, Rob Herring, Vokáč Michal,
	Heiko Stuebner, devicetree, Martin Blumenstingl, Shawn Guo,
	Sascha Hauer, Jonathan Neuschäfer, Johan Hovold,
	Rob Herring, NXP Linux Team, Pengutronix Kernel Team,
	Manivannan Sadhasivam, Thierry Reding, Fabio Estevam,
	Kevin Hilman, linux-kernel, Jagan Teki

Rakuten Kobo, Inc. (formerly Kobo, Inc.) is a company that sells e-book
readers and related products. More information is available at:

- https://en.wikipedia.org/wiki/Kobo_Inc.
- https://www.kobo.com/

Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-by: Rob Herring <robh@kernel.org>
---
v2:
- Add Rob Herring's R-b

v1:
https://lore.kernel.org/lkml/20190319152421.16179-2-j.neuschaefer@gmx.net/
---
 Documentation/devicetree/bindings/vendor-prefixes.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
index 8162b0eb4b50..6cc50f1fac1c 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.txt
+++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
@@ -210,6 +210,7 @@ kiebackpeter    Kieback & Peter GmbH
 kinetic Kinetic Technologies
 kingdisplay	King & Display Technology Co., Ltd.
 kingnovel	Kingnovel Technology Co., Ltd.
+kobo	Rakuten Kobo Inc.
 koe	Kaohsiung Opto-Electronics Inc.
 kosagi	Sutajio Ko-Usagi PTE Ltd.
 kyo	Kyocera Corporation
--
2.20.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v2 2/3] dt-bindings: arm: fsl: Add i.MX50 based boards
  2019-03-31 19:15 ` Jonathan Neuschäfer
  (?)
@ 2019-03-31 19:16   ` Jonathan Neuschäfer
  -1 siblings, 0 replies; 13+ messages in thread
From: Jonathan Neuschäfer @ 2019-03-31 19:16 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Rob Herring, Mark Rutland, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Manivannan Sadhasivam, Aisheng Dong, Jonathan Neuschäfer,
	Vokáč Michal, Thierry Reding, Kevin Hilman,
	Heiko Stuebner, Jagan Teki, Martin Blumenstingl, Johan Hovold,
	devicetree, linux-kernel

fsl,imx50-evk has been used in a devicetree for a while. kobo,aura will
be used soon.

Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
---

v2: New patch, as suggested by Shawn Guo
---
 Documentation/devicetree/bindings/arm/fsl.yaml | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/Documentation/devicetree/bindings/arm/fsl.yaml b/Documentation/devicetree/bindings/arm/fsl.yaml
index 7e2cd6ad26bd..618bf58796eb 100644
--- a/Documentation/devicetree/bindings/arm/fsl.yaml
+++ b/Documentation/devicetree/bindings/arm/fsl.yaml
@@ -51,6 +51,13 @@ properties:
           - const: i2se,duckbill-2
           - const: fsl,imx28

+      - description: i.MX50 based Boards
+        items:
+          - enum:
+              - fsl,imx50-evk
+              - kobo,aura
+          - const: fsl,imx50
+
       - description: i.MX51 Babbage Board
         items:
           - enum:
--
2.20.1


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v2 2/3] dt-bindings: arm: fsl: Add i.MX50 based boards
@ 2019-03-31 19:16   ` Jonathan Neuschäfer
  0 siblings, 0 replies; 13+ messages in thread
From: Jonathan Neuschäfer @ 2019-03-31 19:16 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Rob Herring, Mark Rutland, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Manivannan Sadhasivam, Aisheng Dong, Jonathan Neuschäfer,
	Vokáč Michal, Thierry Reding, Kevin Hilman,
	Heiko Stuebner, Jagan Teki, Martin Blumenstingl, Johan Hovold,
	devicetree

fsl,imx50-evk has been used in a devicetree for a while. kobo,aura will
be used soon.

Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
---

v2: New patch, as suggested by Shawn Guo
---
 Documentation/devicetree/bindings/arm/fsl.yaml | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/Documentation/devicetree/bindings/arm/fsl.yaml b/Documentation/devicetree/bindings/arm/fsl.yaml
index 7e2cd6ad26bd..618bf58796eb 100644
--- a/Documentation/devicetree/bindings/arm/fsl.yaml
+++ b/Documentation/devicetree/bindings/arm/fsl.yaml
@@ -51,6 +51,13 @@ properties:
           - const: i2se,duckbill-2
           - const: fsl,imx28

+      - description: i.MX50 based Boards
+        items:
+          - enum:
+              - fsl,imx50-evk
+              - kobo,aura
+          - const: fsl,imx50
+
       - description: i.MX51 Babbage Board
         items:
           - enum:
--
2.20.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v2 2/3] dt-bindings: arm: fsl: Add i.MX50 based boards
@ 2019-03-31 19:16   ` Jonathan Neuschäfer
  0 siblings, 0 replies; 13+ messages in thread
From: Jonathan Neuschäfer @ 2019-03-31 19:16 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Mark Rutland, Aisheng Dong, Vokáč Michal,
	Heiko Stuebner, devicetree, Martin Blumenstingl, Shawn Guo,
	Sascha Hauer, Jonathan Neuschäfer, Johan Hovold,
	Rob Herring, NXP Linux Team, Pengutronix Kernel Team,
	Manivannan Sadhasivam, Thierry Reding, Fabio Estevam,
	Kevin Hilman, linux-kernel, Jagan Teki

fsl,imx50-evk has been used in a devicetree for a while. kobo,aura will
be used soon.

Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
---

v2: New patch, as suggested by Shawn Guo
---
 Documentation/devicetree/bindings/arm/fsl.yaml | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/Documentation/devicetree/bindings/arm/fsl.yaml b/Documentation/devicetree/bindings/arm/fsl.yaml
index 7e2cd6ad26bd..618bf58796eb 100644
--- a/Documentation/devicetree/bindings/arm/fsl.yaml
+++ b/Documentation/devicetree/bindings/arm/fsl.yaml
@@ -51,6 +51,13 @@ properties:
           - const: i2se,duckbill-2
           - const: fsl,imx28

+      - description: i.MX50 based Boards
+        items:
+          - enum:
+              - fsl,imx50-evk
+              - kobo,aura
+          - const: fsl,imx50
+
       - description: i.MX51 Babbage Board
         items:
           - enum:
--
2.20.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v2 3/3] ARM: dts: imx50: Add Kobo Aura DTS
  2019-03-31 19:15 ` Jonathan Neuschäfer
  (?)
@ 2019-03-31 19:16   ` Jonathan Neuschäfer
  -1 siblings, 0 replies; 13+ messages in thread
From: Jonathan Neuschäfer @ 2019-03-31 19:16 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Rob Herring, Mark Rutland, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Manivannan Sadhasivam, Aisheng Dong, Jonathan Neuschäfer,
	Vokáč Michal, Thierry Reding, Kevin Hilman,
	Heiko Stuebner, Jagan Teki, Martin Blumenstingl, Johan Hovold,
	devicetree, linux-kernel

The Kobo Aura is an e-book reader released in 2013.

With the devicetree in its current state, the kernel will boot and run
for about ten seconds. To solve this, the embedded controller needs to
be told that the system should stay powered on. This will be done in a
later patchset.

- The IOMUXC mode bits for the SD interfaces were taken from the
  vendor's U-Boot fork.
- The bus width of the eMMC is 4 bits in the vendor kernel, but I
  achieved better performance with 8 bits.
- The SDIO clock frequency for the WiFi chip is 25MHz in the vendor
  kernel, but the WiFi chip (BCM43362) supports 50MHz, which works
  reliably on this board and gives slightly better performance.
- The I2C pins' IOMUXC settings come from the vendor's U-Boot fork.

Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
---

v2:
- Squash patch 4 ("ARM: dts: imx50-kobo-aura: Enable USB support")
- Sort pinctrl nodes alphabetically, as suggested by Shawn Guo
- Sort labeled nodes alphabetically, as suggested by Shawn Guo
- Make "status" the last property, as suggested by Shawn Guo
- Use KEY_RESERVED and EV_SW, as suggested by Shawn Guo
- Remove newlines between properties, as suggested by Shawn Guo

v1:
https://lore.kernel.org/lkml/20190319152421.16179-3-j.neuschaefer@gmx.net/
---
 arch/arm/boot/dts/Makefile            |   3 +-
 arch/arm/boot/dts/imx50-kobo-aura.dts | 258 ++++++++++++++++++++++++++
 2 files changed, 260 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boot/dts/imx50-kobo-aura.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index f4f5aeaf3298..0c85156c552b 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -363,7 +363,8 @@ dtb-$(CONFIG_SOC_IMX35) += \
 	imx35-eukrea-mbimxsd35-baseboard.dtb \
 	imx35-pdk.dtb
 dtb-$(CONFIG_SOC_IMX50) += \
-	imx50-evk.dtb
+	imx50-evk.dtb \
+	imx50-kobo-aura.dtb
 dtb-$(CONFIG_SOC_IMX51) += \
 	imx51-apf51.dtb \
 	imx51-apf51dev.dtb \
diff --git a/arch/arm/boot/dts/imx50-kobo-aura.dts b/arch/arm/boot/dts/imx50-kobo-aura.dts
new file mode 100644
index 000000000000..a0eaf869b913
--- /dev/null
+++ b/arch/arm/boot/dts/imx50-kobo-aura.dts
@@ -0,0 +1,258 @@
+// SPDX-License-Identifier: GPL-2.0+
+// Copyright 2019 Jonathan Neuschäfer
+//
+// The Kobo Aura e-book reader, model N514. The mainboard is marked as E606F0B.
+
+/dts-v1/;
+#include "imx50.dtsi"
+#include <dt-bindings/input/input.h>
+
+/ {
+	model = "Kobo Aura (N514)";
+	compatible = "kobo,aura", "fsl,imx50";
+
+	chosen {
+		stdout-path = "serial1:115200n8";
+	};
+
+	memory@70000000 {
+		device_type = "memory";
+		reg = <0x70000000 0x10000000>;
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_leds>;
+
+		on {
+			label = "kobo_aura:orange:on";
+			gpios = <&gpio6 24 GPIO_ACTIVE_LOW>;
+			panic-indicator;
+		};
+	};
+
+	gpio-keys {
+		compatible = "gpio-keys";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_gpiokeys>;
+
+		power {
+			label = "Power Button";
+			gpios = <&gpio4 10 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_POWER>;
+		};
+
+		hallsensor {
+			label = "Hallsensor";
+			gpios = <&gpio5 15 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_RESERVED>;
+			linux,input-type = <EV_SW>;
+		};
+
+		frontlight {
+			label = "Frontlight";
+			gpios = <&gpio4 1 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_DISPLAYTOGGLE>;
+		};
+	};
+
+	sd2_pwrseq: pwrseq {
+		compatible = "mmc-pwrseq-simple";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_sd2_reset>;
+		reset-gpios = <&gpio4 17 GPIO_ACTIVE_LOW>;
+	};
+
+	sd2_vmmc: gpio-regulator {
+		compatible = "regulator-gpio";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_sd2_vmmc>;
+		regulator-name = "vmmc";
+		states = <3300000 0>;
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		enable-gpio = <&gpio4 12 GPIO_ACTIVE_LOW>;
+		startup-delay-us = <100000>;
+	};
+};
+
+&esdhc1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_sd1>;
+	max-frequency = <50000000>;
+	bus-width = <4>;
+	cd-gpios = <&gpio5 17 GPIO_ACTIVE_LOW>;
+	disable-wp;
+	status = "okay";
+
+	/* External µSD card */
+};
+
+&esdhc2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_sd2>;
+	bus-width = <4>;
+	max-frequency = <50000000>;
+	disable-wp;
+	mmc-pwrseq = <&sd2_pwrseq>;
+	vmmc-supply = <&sd2_vmmc>;
+	status = "okay";
+
+	/* CyberTan WC121 SDIO WiFi (BCM43362) */
+};
+
+&esdhc3 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_sd3>;
+	bus-width = <8>;
+	non-removable;
+	max-frequency = <50000000>;
+	disable-wp;
+	status = "okay";
+
+	/* Internal eMMC */
+};
+
+&i2c1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_i2c1>;
+	status = "okay";
+
+	/* TODO: ektf2132 touch controller at 0x15 */
+};
+
+&i2c2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_i2c2>;
+	status = "okay";
+
+	/* TODO: TPS65185 PMIC for E Ink at 0x68 */
+};
+
+&i2c3 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_i2c3>;
+	status = "okay";
+
+	/* TODO: embedded controller at 0x43 */
+};
+
+&iomuxc {
+	pinctrl_gpiokeys: gpiokeys {
+		fsl,pins = <
+			MX50_PAD_CSPI_MISO__GPIO4_10		0x0
+			MX50_PAD_SD2_D7__GPIO5_15		0x0
+			MX50_PAD_KEY_ROW0__GPIO4_1		0x0
+		>;
+	};
+
+	pinctrl_i2c1: i2c1 {
+		fsl,pins = <
+			MX50_PAD_I2C1_SCL__I2C1_SCL		0x400001fd
+			MX50_PAD_I2C1_SDA__I2C1_SDA		0x400001fd
+		>;
+	};
+
+	pinctrl_i2c2: i2c2 {
+		fsl,pins = <
+			MX50_PAD_I2C2_SCL__I2C2_SCL		0x400001fd
+			MX50_PAD_I2C2_SDA__I2C2_SDA		0x400001fd
+		>;
+	};
+
+	pinctrl_i2c3: i2c3 {
+		fsl,pins = <
+			MX50_PAD_I2C3_SCL__I2C3_SCL		0x400001fd
+			MX50_PAD_I2C3_SDA__I2C3_SDA		0x400001fd
+		>;
+	};
+
+	pinctrl_leds: leds {
+		fsl,pins = <
+			MX50_PAD_PWM1__GPIO6_24			0x0
+		>;
+	};
+
+	pinctrl_sd1: sd1 {
+		fsl,pins = <
+			MX50_PAD_SD1_CMD__ESDHC1_CMD		0x1e4
+			MX50_PAD_SD1_CLK__ESDHC1_CLK		0xd4
+			MX50_PAD_SD1_D0__ESDHC1_DAT0		0x1d4
+			MX50_PAD_SD1_D1__ESDHC1_DAT1		0x1d4
+			MX50_PAD_SD1_D2__ESDHC1_DAT2		0x1d4
+			MX50_PAD_SD1_D3__ESDHC1_DAT3		0x1d4
+
+			MX50_PAD_SD2_CD__GPIO5_17		0x0
+		>;
+	};
+
+	pinctrl_sd2: sd2 {
+		fsl,pins = <
+			MX50_PAD_SD2_CMD__ESDHC2_CMD		0x1e4
+			MX50_PAD_SD2_CLK__ESDHC2_CLK		0xd4
+			MX50_PAD_SD2_D0__ESDHC2_DAT0		0x1d4
+			MX50_PAD_SD2_D1__ESDHC2_DAT1		0x1d4
+			MX50_PAD_SD2_D2__ESDHC2_DAT2		0x1d4
+			MX50_PAD_SD2_D3__ESDHC2_DAT3		0x1d4
+		>;
+	};
+
+	pinctrl_sd2_reset: sd2-reset {
+		fsl,pins = <
+			MX50_PAD_ECSPI2_MOSI__GPIO4_17		0x0
+		>;
+	};
+
+	pinctrl_sd2_vmmc: sd2-vmmc {
+		fsl,pins = <
+			MX50_PAD_ECSPI1_SCLK__GPIO4_12		0x0
+		>;
+	};
+
+	pinctrl_sd3: sd3 {
+		fsl,pins = <
+			MX50_PAD_SD3_CMD__ESDHC3_CMD		0x1e4
+			MX50_PAD_SD3_CLK__ESDHC3_CLK		0xd4
+			MX50_PAD_SD3_D0__ESDHC3_DAT0		0x1d4
+			MX50_PAD_SD3_D1__ESDHC3_DAT1		0x1d4
+			MX50_PAD_SD3_D2__ESDHC3_DAT2		0x1d4
+			MX50_PAD_SD3_D3__ESDHC3_DAT3		0x1d4
+			MX50_PAD_SD3_D4__ESDHC3_DAT4		0x1d4
+			MX50_PAD_SD3_D5__ESDHC3_DAT5		0x1d4
+			MX50_PAD_SD3_D6__ESDHC3_DAT6		0x1d4
+			MX50_PAD_SD3_D7__ESDHC3_DAT7		0x1d4
+		>;
+	};
+
+	pinctrl_uart2: uart2 {
+		fsl,pins = <
+			MX50_PAD_UART2_TXD__UART2_TXD_MUX	0x1e4
+			MX50_PAD_UART2_RXD__UART2_RXD_MUX	0x1e4
+		>;
+	};
+
+	pinctrl_usbphy: usbphy {
+		fsl,pins = <
+			MX50_PAD_ECSPI2_SS0__GPIO4_19		0x0
+		>;
+	};
+};
+
+&uart2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_uart2>;
+	status = "okay";
+};
+
+&usbotg {
+	phy_type = "utmi_wide";
+	dr_mode = "peripheral";
+	status = "okay";
+};
+
+&usbphy0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_usbphy>;
+	vbus-detect-gpio = <&gpio4 19 GPIO_ACTIVE_LOW>;
+};
--
2.20.1


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v2 3/3] ARM: dts: imx50: Add Kobo Aura DTS
@ 2019-03-31 19:16   ` Jonathan Neuschäfer
  0 siblings, 0 replies; 13+ messages in thread
From: Jonathan Neuschäfer @ 2019-03-31 19:16 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Rob Herring, Mark Rutland, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Manivannan Sadhasivam, Aisheng Dong, Jonathan Neuschäfer,
	Vokáč Michal, Thierry Reding, Kevin Hilman,
	Heiko Stuebner, Jagan Teki, Martin Blumenstingl, Johan Hovold,
	devicetree

The Kobo Aura is an e-book reader released in 2013.

With the devicetree in its current state, the kernel will boot and run
for about ten seconds. To solve this, the embedded controller needs to
be told that the system should stay powered on. This will be done in a
later patchset.

- The IOMUXC mode bits for the SD interfaces were taken from the
  vendor's U-Boot fork.
- The bus width of the eMMC is 4 bits in the vendor kernel, but I
  achieved better performance with 8 bits.
- The SDIO clock frequency for the WiFi chip is 25MHz in the vendor
  kernel, but the WiFi chip (BCM43362) supports 50MHz, which works
  reliably on this board and gives slightly better performance.
- The I2C pins' IOMUXC settings come from the vendor's U-Boot fork.

Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
---

v2:
- Squash patch 4 ("ARM: dts: imx50-kobo-aura: Enable USB support")
- Sort pinctrl nodes alphabetically, as suggested by Shawn Guo
- Sort labeled nodes alphabetically, as suggested by Shawn Guo
- Make "status" the last property, as suggested by Shawn Guo
- Use KEY_RESERVED and EV_SW, as suggested by Shawn Guo
- Remove newlines between properties, as suggested by Shawn Guo

v1:
https://lore.kernel.org/lkml/20190319152421.16179-3-j.neuschaefer@gmx.net/
---
 arch/arm/boot/dts/Makefile            |   3 +-
 arch/arm/boot/dts/imx50-kobo-aura.dts | 258 ++++++++++++++++++++++++++
 2 files changed, 260 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boot/dts/imx50-kobo-aura.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index f4f5aeaf3298..0c85156c552b 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -363,7 +363,8 @@ dtb-$(CONFIG_SOC_IMX35) += \
 	imx35-eukrea-mbimxsd35-baseboard.dtb \
 	imx35-pdk.dtb
 dtb-$(CONFIG_SOC_IMX50) += \
-	imx50-evk.dtb
+	imx50-evk.dtb \
+	imx50-kobo-aura.dtb
 dtb-$(CONFIG_SOC_IMX51) += \
 	imx51-apf51.dtb \
 	imx51-apf51dev.dtb \
diff --git a/arch/arm/boot/dts/imx50-kobo-aura.dts b/arch/arm/boot/dts/imx50-kobo-aura.dts
new file mode 100644
index 000000000000..a0eaf869b913
--- /dev/null
+++ b/arch/arm/boot/dts/imx50-kobo-aura.dts
@@ -0,0 +1,258 @@
+// SPDX-License-Identifier: GPL-2.0+
+// Copyright 2019 Jonathan Neuschäfer
+//
+// The Kobo Aura e-book reader, model N514. The mainboard is marked as E606F0B.
+
+/dts-v1/;
+#include "imx50.dtsi"
+#include <dt-bindings/input/input.h>
+
+/ {
+	model = "Kobo Aura (N514)";
+	compatible = "kobo,aura", "fsl,imx50";
+
+	chosen {
+		stdout-path = "serial1:115200n8";
+	};
+
+	memory@70000000 {
+		device_type = "memory";
+		reg = <0x70000000 0x10000000>;
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_leds>;
+
+		on {
+			label = "kobo_aura:orange:on";
+			gpios = <&gpio6 24 GPIO_ACTIVE_LOW>;
+			panic-indicator;
+		};
+	};
+
+	gpio-keys {
+		compatible = "gpio-keys";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_gpiokeys>;
+
+		power {
+			label = "Power Button";
+			gpios = <&gpio4 10 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_POWER>;
+		};
+
+		hallsensor {
+			label = "Hallsensor";
+			gpios = <&gpio5 15 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_RESERVED>;
+			linux,input-type = <EV_SW>;
+		};
+
+		frontlight {
+			label = "Frontlight";
+			gpios = <&gpio4 1 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_DISPLAYTOGGLE>;
+		};
+	};
+
+	sd2_pwrseq: pwrseq {
+		compatible = "mmc-pwrseq-simple";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_sd2_reset>;
+		reset-gpios = <&gpio4 17 GPIO_ACTIVE_LOW>;
+	};
+
+	sd2_vmmc: gpio-regulator {
+		compatible = "regulator-gpio";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_sd2_vmmc>;
+		regulator-name = "vmmc";
+		states = <3300000 0>;
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		enable-gpio = <&gpio4 12 GPIO_ACTIVE_LOW>;
+		startup-delay-us = <100000>;
+	};
+};
+
+&esdhc1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_sd1>;
+	max-frequency = <50000000>;
+	bus-width = <4>;
+	cd-gpios = <&gpio5 17 GPIO_ACTIVE_LOW>;
+	disable-wp;
+	status = "okay";
+
+	/* External µSD card */
+};
+
+&esdhc2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_sd2>;
+	bus-width = <4>;
+	max-frequency = <50000000>;
+	disable-wp;
+	mmc-pwrseq = <&sd2_pwrseq>;
+	vmmc-supply = <&sd2_vmmc>;
+	status = "okay";
+
+	/* CyberTan WC121 SDIO WiFi (BCM43362) */
+};
+
+&esdhc3 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_sd3>;
+	bus-width = <8>;
+	non-removable;
+	max-frequency = <50000000>;
+	disable-wp;
+	status = "okay";
+
+	/* Internal eMMC */
+};
+
+&i2c1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_i2c1>;
+	status = "okay";
+
+	/* TODO: ektf2132 touch controller at 0x15 */
+};
+
+&i2c2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_i2c2>;
+	status = "okay";
+
+	/* TODO: TPS65185 PMIC for E Ink at 0x68 */
+};
+
+&i2c3 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_i2c3>;
+	status = "okay";
+
+	/* TODO: embedded controller at 0x43 */
+};
+
+&iomuxc {
+	pinctrl_gpiokeys: gpiokeys {
+		fsl,pins = <
+			MX50_PAD_CSPI_MISO__GPIO4_10		0x0
+			MX50_PAD_SD2_D7__GPIO5_15		0x0
+			MX50_PAD_KEY_ROW0__GPIO4_1		0x0
+		>;
+	};
+
+	pinctrl_i2c1: i2c1 {
+		fsl,pins = <
+			MX50_PAD_I2C1_SCL__I2C1_SCL		0x400001fd
+			MX50_PAD_I2C1_SDA__I2C1_SDA		0x400001fd
+		>;
+	};
+
+	pinctrl_i2c2: i2c2 {
+		fsl,pins = <
+			MX50_PAD_I2C2_SCL__I2C2_SCL		0x400001fd
+			MX50_PAD_I2C2_SDA__I2C2_SDA		0x400001fd
+		>;
+	};
+
+	pinctrl_i2c3: i2c3 {
+		fsl,pins = <
+			MX50_PAD_I2C3_SCL__I2C3_SCL		0x400001fd
+			MX50_PAD_I2C3_SDA__I2C3_SDA		0x400001fd
+		>;
+	};
+
+	pinctrl_leds: leds {
+		fsl,pins = <
+			MX50_PAD_PWM1__GPIO6_24			0x0
+		>;
+	};
+
+	pinctrl_sd1: sd1 {
+		fsl,pins = <
+			MX50_PAD_SD1_CMD__ESDHC1_CMD		0x1e4
+			MX50_PAD_SD1_CLK__ESDHC1_CLK		0xd4
+			MX50_PAD_SD1_D0__ESDHC1_DAT0		0x1d4
+			MX50_PAD_SD1_D1__ESDHC1_DAT1		0x1d4
+			MX50_PAD_SD1_D2__ESDHC1_DAT2		0x1d4
+			MX50_PAD_SD1_D3__ESDHC1_DAT3		0x1d4
+
+			MX50_PAD_SD2_CD__GPIO5_17		0x0
+		>;
+	};
+
+	pinctrl_sd2: sd2 {
+		fsl,pins = <
+			MX50_PAD_SD2_CMD__ESDHC2_CMD		0x1e4
+			MX50_PAD_SD2_CLK__ESDHC2_CLK		0xd4
+			MX50_PAD_SD2_D0__ESDHC2_DAT0		0x1d4
+			MX50_PAD_SD2_D1__ESDHC2_DAT1		0x1d4
+			MX50_PAD_SD2_D2__ESDHC2_DAT2		0x1d4
+			MX50_PAD_SD2_D3__ESDHC2_DAT3		0x1d4
+		>;
+	};
+
+	pinctrl_sd2_reset: sd2-reset {
+		fsl,pins = <
+			MX50_PAD_ECSPI2_MOSI__GPIO4_17		0x0
+		>;
+	};
+
+	pinctrl_sd2_vmmc: sd2-vmmc {
+		fsl,pins = <
+			MX50_PAD_ECSPI1_SCLK__GPIO4_12		0x0
+		>;
+	};
+
+	pinctrl_sd3: sd3 {
+		fsl,pins = <
+			MX50_PAD_SD3_CMD__ESDHC3_CMD		0x1e4
+			MX50_PAD_SD3_CLK__ESDHC3_CLK		0xd4
+			MX50_PAD_SD3_D0__ESDHC3_DAT0		0x1d4
+			MX50_PAD_SD3_D1__ESDHC3_DAT1		0x1d4
+			MX50_PAD_SD3_D2__ESDHC3_DAT2		0x1d4
+			MX50_PAD_SD3_D3__ESDHC3_DAT3		0x1d4
+			MX50_PAD_SD3_D4__ESDHC3_DAT4		0x1d4
+			MX50_PAD_SD3_D5__ESDHC3_DAT5		0x1d4
+			MX50_PAD_SD3_D6__ESDHC3_DAT6		0x1d4
+			MX50_PAD_SD3_D7__ESDHC3_DAT7		0x1d4
+		>;
+	};
+
+	pinctrl_uart2: uart2 {
+		fsl,pins = <
+			MX50_PAD_UART2_TXD__UART2_TXD_MUX	0x1e4
+			MX50_PAD_UART2_RXD__UART2_RXD_MUX	0x1e4
+		>;
+	};
+
+	pinctrl_usbphy: usbphy {
+		fsl,pins = <
+			MX50_PAD_ECSPI2_SS0__GPIO4_19		0x0
+		>;
+	};
+};
+
+&uart2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_uart2>;
+	status = "okay";
+};
+
+&usbotg {
+	phy_type = "utmi_wide";
+	dr_mode = "peripheral";
+	status = "okay";
+};
+
+&usbphy0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_usbphy>;
+	vbus-detect-gpio = <&gpio4 19 GPIO_ACTIVE_LOW>;
+};
--
2.20.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v2 3/3] ARM: dts: imx50: Add Kobo Aura DTS
@ 2019-03-31 19:16   ` Jonathan Neuschäfer
  0 siblings, 0 replies; 13+ messages in thread
From: Jonathan Neuschäfer @ 2019-03-31 19:16 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Mark Rutland, Aisheng Dong, Vokáč Michal,
	Heiko Stuebner, devicetree, Martin Blumenstingl, Shawn Guo,
	Sascha Hauer, Jonathan Neuschäfer, Johan Hovold,
	Rob Herring, NXP Linux Team, Pengutronix Kernel Team,
	Manivannan Sadhasivam, Thierry Reding, Fabio Estevam,
	Kevin Hilman, linux-kernel, Jagan Teki

The Kobo Aura is an e-book reader released in 2013.

With the devicetree in its current state, the kernel will boot and run
for about ten seconds. To solve this, the embedded controller needs to
be told that the system should stay powered on. This will be done in a
later patchset.

- The IOMUXC mode bits for the SD interfaces were taken from the
  vendor's U-Boot fork.
- The bus width of the eMMC is 4 bits in the vendor kernel, but I
  achieved better performance with 8 bits.
- The SDIO clock frequency for the WiFi chip is 25MHz in the vendor
  kernel, but the WiFi chip (BCM43362) supports 50MHz, which works
  reliably on this board and gives slightly better performance.
- The I2C pins' IOMUXC settings come from the vendor's U-Boot fork.

Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
---

v2:
- Squash patch 4 ("ARM: dts: imx50-kobo-aura: Enable USB support")
- Sort pinctrl nodes alphabetically, as suggested by Shawn Guo
- Sort labeled nodes alphabetically, as suggested by Shawn Guo
- Make "status" the last property, as suggested by Shawn Guo
- Use KEY_RESERVED and EV_SW, as suggested by Shawn Guo
- Remove newlines between properties, as suggested by Shawn Guo

v1:
https://lore.kernel.org/lkml/20190319152421.16179-3-j.neuschaefer@gmx.net/
---
 arch/arm/boot/dts/Makefile            |   3 +-
 arch/arm/boot/dts/imx50-kobo-aura.dts | 258 ++++++++++++++++++++++++++
 2 files changed, 260 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boot/dts/imx50-kobo-aura.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index f4f5aeaf3298..0c85156c552b 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -363,7 +363,8 @@ dtb-$(CONFIG_SOC_IMX35) += \
 	imx35-eukrea-mbimxsd35-baseboard.dtb \
 	imx35-pdk.dtb
 dtb-$(CONFIG_SOC_IMX50) += \
-	imx50-evk.dtb
+	imx50-evk.dtb \
+	imx50-kobo-aura.dtb
 dtb-$(CONFIG_SOC_IMX51) += \
 	imx51-apf51.dtb \
 	imx51-apf51dev.dtb \
diff --git a/arch/arm/boot/dts/imx50-kobo-aura.dts b/arch/arm/boot/dts/imx50-kobo-aura.dts
new file mode 100644
index 000000000000..a0eaf869b913
--- /dev/null
+++ b/arch/arm/boot/dts/imx50-kobo-aura.dts
@@ -0,0 +1,258 @@
+// SPDX-License-Identifier: GPL-2.0+
+// Copyright 2019 Jonathan Neuschäfer
+//
+// The Kobo Aura e-book reader, model N514. The mainboard is marked as E606F0B.
+
+/dts-v1/;
+#include "imx50.dtsi"
+#include <dt-bindings/input/input.h>
+
+/ {
+	model = "Kobo Aura (N514)";
+	compatible = "kobo,aura", "fsl,imx50";
+
+	chosen {
+		stdout-path = "serial1:115200n8";
+	};
+
+	memory@70000000 {
+		device_type = "memory";
+		reg = <0x70000000 0x10000000>;
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_leds>;
+
+		on {
+			label = "kobo_aura:orange:on";
+			gpios = <&gpio6 24 GPIO_ACTIVE_LOW>;
+			panic-indicator;
+		};
+	};
+
+	gpio-keys {
+		compatible = "gpio-keys";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_gpiokeys>;
+
+		power {
+			label = "Power Button";
+			gpios = <&gpio4 10 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_POWER>;
+		};
+
+		hallsensor {
+			label = "Hallsensor";
+			gpios = <&gpio5 15 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_RESERVED>;
+			linux,input-type = <EV_SW>;
+		};
+
+		frontlight {
+			label = "Frontlight";
+			gpios = <&gpio4 1 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_DISPLAYTOGGLE>;
+		};
+	};
+
+	sd2_pwrseq: pwrseq {
+		compatible = "mmc-pwrseq-simple";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_sd2_reset>;
+		reset-gpios = <&gpio4 17 GPIO_ACTIVE_LOW>;
+	};
+
+	sd2_vmmc: gpio-regulator {
+		compatible = "regulator-gpio";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_sd2_vmmc>;
+		regulator-name = "vmmc";
+		states = <3300000 0>;
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		enable-gpio = <&gpio4 12 GPIO_ACTIVE_LOW>;
+		startup-delay-us = <100000>;
+	};
+};
+
+&esdhc1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_sd1>;
+	max-frequency = <50000000>;
+	bus-width = <4>;
+	cd-gpios = <&gpio5 17 GPIO_ACTIVE_LOW>;
+	disable-wp;
+	status = "okay";
+
+	/* External µSD card */
+};
+
+&esdhc2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_sd2>;
+	bus-width = <4>;
+	max-frequency = <50000000>;
+	disable-wp;
+	mmc-pwrseq = <&sd2_pwrseq>;
+	vmmc-supply = <&sd2_vmmc>;
+	status = "okay";
+
+	/* CyberTan WC121 SDIO WiFi (BCM43362) */
+};
+
+&esdhc3 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_sd3>;
+	bus-width = <8>;
+	non-removable;
+	max-frequency = <50000000>;
+	disable-wp;
+	status = "okay";
+
+	/* Internal eMMC */
+};
+
+&i2c1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_i2c1>;
+	status = "okay";
+
+	/* TODO: ektf2132 touch controller at 0x15 */
+};
+
+&i2c2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_i2c2>;
+	status = "okay";
+
+	/* TODO: TPS65185 PMIC for E Ink at 0x68 */
+};
+
+&i2c3 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_i2c3>;
+	status = "okay";
+
+	/* TODO: embedded controller at 0x43 */
+};
+
+&iomuxc {
+	pinctrl_gpiokeys: gpiokeys {
+		fsl,pins = <
+			MX50_PAD_CSPI_MISO__GPIO4_10		0x0
+			MX50_PAD_SD2_D7__GPIO5_15		0x0
+			MX50_PAD_KEY_ROW0__GPIO4_1		0x0
+		>;
+	};
+
+	pinctrl_i2c1: i2c1 {
+		fsl,pins = <
+			MX50_PAD_I2C1_SCL__I2C1_SCL		0x400001fd
+			MX50_PAD_I2C1_SDA__I2C1_SDA		0x400001fd
+		>;
+	};
+
+	pinctrl_i2c2: i2c2 {
+		fsl,pins = <
+			MX50_PAD_I2C2_SCL__I2C2_SCL		0x400001fd
+			MX50_PAD_I2C2_SDA__I2C2_SDA		0x400001fd
+		>;
+	};
+
+	pinctrl_i2c3: i2c3 {
+		fsl,pins = <
+			MX50_PAD_I2C3_SCL__I2C3_SCL		0x400001fd
+			MX50_PAD_I2C3_SDA__I2C3_SDA		0x400001fd
+		>;
+	};
+
+	pinctrl_leds: leds {
+		fsl,pins = <
+			MX50_PAD_PWM1__GPIO6_24			0x0
+		>;
+	};
+
+	pinctrl_sd1: sd1 {
+		fsl,pins = <
+			MX50_PAD_SD1_CMD__ESDHC1_CMD		0x1e4
+			MX50_PAD_SD1_CLK__ESDHC1_CLK		0xd4
+			MX50_PAD_SD1_D0__ESDHC1_DAT0		0x1d4
+			MX50_PAD_SD1_D1__ESDHC1_DAT1		0x1d4
+			MX50_PAD_SD1_D2__ESDHC1_DAT2		0x1d4
+			MX50_PAD_SD1_D3__ESDHC1_DAT3		0x1d4
+
+			MX50_PAD_SD2_CD__GPIO5_17		0x0
+		>;
+	};
+
+	pinctrl_sd2: sd2 {
+		fsl,pins = <
+			MX50_PAD_SD2_CMD__ESDHC2_CMD		0x1e4
+			MX50_PAD_SD2_CLK__ESDHC2_CLK		0xd4
+			MX50_PAD_SD2_D0__ESDHC2_DAT0		0x1d4
+			MX50_PAD_SD2_D1__ESDHC2_DAT1		0x1d4
+			MX50_PAD_SD2_D2__ESDHC2_DAT2		0x1d4
+			MX50_PAD_SD2_D3__ESDHC2_DAT3		0x1d4
+		>;
+	};
+
+	pinctrl_sd2_reset: sd2-reset {
+		fsl,pins = <
+			MX50_PAD_ECSPI2_MOSI__GPIO4_17		0x0
+		>;
+	};
+
+	pinctrl_sd2_vmmc: sd2-vmmc {
+		fsl,pins = <
+			MX50_PAD_ECSPI1_SCLK__GPIO4_12		0x0
+		>;
+	};
+
+	pinctrl_sd3: sd3 {
+		fsl,pins = <
+			MX50_PAD_SD3_CMD__ESDHC3_CMD		0x1e4
+			MX50_PAD_SD3_CLK__ESDHC3_CLK		0xd4
+			MX50_PAD_SD3_D0__ESDHC3_DAT0		0x1d4
+			MX50_PAD_SD3_D1__ESDHC3_DAT1		0x1d4
+			MX50_PAD_SD3_D2__ESDHC3_DAT2		0x1d4
+			MX50_PAD_SD3_D3__ESDHC3_DAT3		0x1d4
+			MX50_PAD_SD3_D4__ESDHC3_DAT4		0x1d4
+			MX50_PAD_SD3_D5__ESDHC3_DAT5		0x1d4
+			MX50_PAD_SD3_D6__ESDHC3_DAT6		0x1d4
+			MX50_PAD_SD3_D7__ESDHC3_DAT7		0x1d4
+		>;
+	};
+
+	pinctrl_uart2: uart2 {
+		fsl,pins = <
+			MX50_PAD_UART2_TXD__UART2_TXD_MUX	0x1e4
+			MX50_PAD_UART2_RXD__UART2_RXD_MUX	0x1e4
+		>;
+	};
+
+	pinctrl_usbphy: usbphy {
+		fsl,pins = <
+			MX50_PAD_ECSPI2_SS0__GPIO4_19		0x0
+		>;
+	};
+};
+
+&uart2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_uart2>;
+	status = "okay";
+};
+
+&usbotg {
+	phy_type = "utmi_wide";
+	dr_mode = "peripheral";
+	status = "okay";
+};
+
+&usbphy0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_usbphy>;
+	vbus-detect-gpio = <&gpio4 19 GPIO_ACTIVE_LOW>;
+};
--
2.20.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH v2 2/3] dt-bindings: arm: fsl: Add i.MX50 based boards
  2019-03-31 19:16   ` Jonathan Neuschäfer
@ 2019-04-06  6:05     ` Rob Herring
  -1 siblings, 0 replies; 13+ messages in thread
From: Rob Herring @ 2019-04-06  6:05 UTC (permalink / raw)
  Cc: devicetree, linux-kernel, linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 435 bytes --]

On Sun, 31 Mar 2019 21:16:01 +0200, =?UTF-8?q?Jonathan Neuschäfer?= wrote:
> fsl,imx50-evk has been used in a devicetree for a while. kobo,aura will
> be used soon.
> 
> Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
> ---
> 
> v2: New patch, as suggested by Shawn Guo
> ---
>  Documentation/devicetree/bindings/arm/fsl.yaml | 7 +++++++
>  1 file changed, 7 insertions(+)
> 

Reviewed-by: Rob Herring <robh@kernel.org>



[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v2 2/3] dt-bindings: arm: fsl: Add i.MX50 based boards
@ 2019-04-06  6:05     ` Rob Herring
  0 siblings, 0 replies; 13+ messages in thread
From: Rob Herring @ 2019-04-06  6:05 UTC (permalink / raw)
  To: Jonathan Neusch�fer; +Cc: , devicetree, linux-kernel, linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 435 bytes --]

On Sun, 31 Mar 2019 21:16:01 +0200, =?UTF-8?q?Jonathan Neuschäfer?= wrote:
> fsl,imx50-evk has been used in a devicetree for a while. kobo,aura will
> be used soon.
> 
> Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
> ---
> 
> v2: New patch, as suggested by Shawn Guo
> ---
>  Documentation/devicetree/bindings/arm/fsl.yaml | 7 +++++++
>  1 file changed, 7 insertions(+)
> 

Reviewed-by: Rob Herring <robh@kernel.org>



[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2019-04-06  6:06 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-31 19:15 [PATCH v2 0/3] ARM: Initial devicetree for Kobo Aura Jonathan Neuschäfer
2019-03-31 19:15 ` Jonathan Neuschäfer
2019-03-31 19:16 ` [PATCH v2 1/3] dt-bindings: Add vendor prefix for Rakuten Kobo, Inc Jonathan Neuschäfer
2019-03-31 19:16   ` Jonathan Neuschäfer
2019-03-31 19:16   ` Jonathan Neuschäfer
2019-03-31 19:16 ` [PATCH v2 2/3] dt-bindings: arm: fsl: Add i.MX50 based boards Jonathan Neuschäfer
2019-03-31 19:16   ` Jonathan Neuschäfer
2019-03-31 19:16   ` Jonathan Neuschäfer
2019-04-06  6:05   ` Rob Herring
2019-04-06  6:05     ` Rob Herring
2019-03-31 19:16 ` [PATCH v2 3/3] ARM: dts: imx50: Add Kobo Aura DTS Jonathan Neuschäfer
2019-03-31 19:16   ` Jonathan Neuschäfer
2019-03-31 19:16   ` Jonathan Neuschäfer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.