[PATCH v2 2/2] ARM: dts: pxa: add mioa701 board description

2018-07-07 Thread Robert Jarzmik
Add device-tree description of the Mitac MIO A701 board.
This is aimed at replacing mioa701.c board file, and once stabilized,
the leftover, such as the suspend resume mechanics will rely on a new
IPL, and not the legacy Windows CE one.

Signed-off-by: Robert Jarzmik 
---
Since v1: fix lcd_supply and lcd_backlight
  These were depending on my internal tree changes, fit it.

This patch deserves some special "love review". As it will probably
serve for a more broad pxa conversion to devicetree of the other boards,
and because it touches almost all domains for a pxa platform (camera,
video, audio, i2c, ...), it should be as clean as possible so that
mistakes are not carried on ...

Therefore I expect the review of this one to be long (ie. it won't land
for v4.19), until it looks good enough.
---
 arch/arm/boot/dts/Makefile|   1 +
 arch/arm/boot/dts/mioa701.dts | 564 ++
 2 files changed, 565 insertions(+)
 create mode 100644 arch/arm/boot/dts/mioa701.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 37a3de760d40..6b12ab50c8d1 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -756,6 +756,7 @@ dtb-$(CONFIG_ARCH_PRIMA2) += \
 dtb-$(CONFIG_ARCH_OXNAS) += \
ox810se-wd-mbwe.dtb \
ox820-cloudengines-pogoplug-series-3.dtb
+dtb-$(CONFIG_ARCH_PXA) += mioa701.dtb
 dtb-$(CONFIG_ARCH_QCOM) += \
qcom-apq8060-dragonboard.dtb \
qcom-apq8064-arrow-sd-600eval.dtb \
diff --git a/arch/arm/boot/dts/mioa701.dts b/arch/arm/boot/dts/mioa701.dts
new file mode 100644
index ..a6893226e20e
--- /dev/null
+++ b/arch/arm/boot/dts/mioa701.dts
@@ -0,0 +1,564 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ *  Copyright (C) 2018 Robert Jarzmik 
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 2 as
+ *  publishhed by the Free Software Foundation.
+ */
+
+/dts-v1/;
+#include "pxa27x.dtsi"
+#include 
+#include 
+
+/ {
+   model = "Mitac Mio A701 Board";
+   /* compatible = "mitac,mioa701"; */
+   compatible = "marvell,pxa270";
+
+   chosen {
+   bootargs = 
"mtdparts=docg3.0:256k@3456k(barebox)ro,256k(barebox-logo),128k(barebox-env),4M(kernel),-(root)
 ubi.mtd=4 rootfstype=ubifs root=ubi0:linux_root ro";
+   };
+
+   memory {
+   reg = <0xa000 0x0400>;
+
+   reserved-memory {
+   #address-cells = <1>;
+   #size-cells = <1>;
+
+   pstore_region:region@0xa200 {
+   compatible = "linux,contiguous-memory-region";
+   reg = <0xa200 1048576>;
+   };
+   };
+   };
+
+   cpus {
+   cpu {
+   cpu-supply = <_core>;
+   };
+   };
+
+   pxabus {
+   pinctrl: pinctrl@40e0 {
+   status = "okay";
+   pinctrl_ac97_default: ac97-default {
+   PMMUX(hpjack-detect, 12, gpio_in);
+   PMMUX(ac97-bitclk, 28, AC97_BITCLK);
+   PMMUX(ac97-sdata-in-0, 29, AC97_SDATA_IN_0);
+   PMMUX(ac97-sdata-out, 30, AC97_SDATA_OUT);
+   PMMUX(ac97-sync, 31, AC97_SYNC);
+   PMMUX(ac97-sysclk, 89, AC97_SYSCLK);
+   };
+   pinctrl_btuart_default: btuart-default {
+   PMMUX(btuart-nactivity, 14, gpio_in);
+   PMMUX(btuart-rxd, 42, BTRXD);
+   PMMUX(btuart-txd, 43, BTTXD);
+   PMMUX(btuart-cts, 44, BTCTS);
+   PMMUX(btuart-rts, 45, BTRTS);
+   PMMUX_LPM_LOW(bt-on, 83, gpio_out);
+   PMMUX_LPM_HIGH(bt-unknown, 77, gpio_out);
+   PMMUX_LPM_HIGH(bt-nreset, 86, gpio_out);
+   };
+   pinctrl_ffuart_default: ffuart-default {
+   PMMUX(ffuart-rxd, 34, FFRXD);
+   PMMUX(ffuart-cts, 35, FFCTS);
+   PMMUX(ffuart-dcd, 36, FFDCD);
+   PMMUX(ffuart-dsr, 37, FFDSR);
+   PMMUX(ffuart-txd, 39, FFTXD);
+   PMMUX(ffuart-dtr, 40, FFDTR);
+   PMMUX(ffuart-rts, 41, FFRTS);
+   PMMUX_LPM_LOW(gsm-reset, 24, gpio_out);
+   PMMUX(gsm-is-on, 25, gpio_in);
+   PMMUX_LPM_HIGH(gsm-nset-on, 88, gpio_out);
+   PMMUX_LPM_HIGH(gsm-nset-off, 90, gpio_out);
+

[PATCH v2 2/2] ARM: dts: pxa: add mioa701 board description

2018-07-07 Thread Robert Jarzmik
Add device-tree description of the Mitac MIO A701 board.
This is aimed at replacing mioa701.c board file, and once stabilized,
the leftover, such as the suspend resume mechanics will rely on a new
IPL, and not the legacy Windows CE one.

Signed-off-by: Robert Jarzmik 
---
Since v1: fix lcd_supply and lcd_backlight
  These were depending on my internal tree changes, fit it.

This patch deserves some special "love review". As it will probably
serve for a more broad pxa conversion to devicetree of the other boards,
and because it touches almost all domains for a pxa platform (camera,
video, audio, i2c, ...), it should be as clean as possible so that
mistakes are not carried on ...

Therefore I expect the review of this one to be long (ie. it won't land
for v4.19), until it looks good enough.
---
 arch/arm/boot/dts/Makefile|   1 +
 arch/arm/boot/dts/mioa701.dts | 564 ++
 2 files changed, 565 insertions(+)
 create mode 100644 arch/arm/boot/dts/mioa701.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 37a3de760d40..6b12ab50c8d1 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -756,6 +756,7 @@ dtb-$(CONFIG_ARCH_PRIMA2) += \
 dtb-$(CONFIG_ARCH_OXNAS) += \
ox810se-wd-mbwe.dtb \
ox820-cloudengines-pogoplug-series-3.dtb
+dtb-$(CONFIG_ARCH_PXA) += mioa701.dtb
 dtb-$(CONFIG_ARCH_QCOM) += \
qcom-apq8060-dragonboard.dtb \
qcom-apq8064-arrow-sd-600eval.dtb \
diff --git a/arch/arm/boot/dts/mioa701.dts b/arch/arm/boot/dts/mioa701.dts
new file mode 100644
index ..a6893226e20e
--- /dev/null
+++ b/arch/arm/boot/dts/mioa701.dts
@@ -0,0 +1,564 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ *  Copyright (C) 2018 Robert Jarzmik 
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 2 as
+ *  publishhed by the Free Software Foundation.
+ */
+
+/dts-v1/;
+#include "pxa27x.dtsi"
+#include 
+#include 
+
+/ {
+   model = "Mitac Mio A701 Board";
+   /* compatible = "mitac,mioa701"; */
+   compatible = "marvell,pxa270";
+
+   chosen {
+   bootargs = 
"mtdparts=docg3.0:256k@3456k(barebox)ro,256k(barebox-logo),128k(barebox-env),4M(kernel),-(root)
 ubi.mtd=4 rootfstype=ubifs root=ubi0:linux_root ro";
+   };
+
+   memory {
+   reg = <0xa000 0x0400>;
+
+   reserved-memory {
+   #address-cells = <1>;
+   #size-cells = <1>;
+
+   pstore_region:region@0xa200 {
+   compatible = "linux,contiguous-memory-region";
+   reg = <0xa200 1048576>;
+   };
+   };
+   };
+
+   cpus {
+   cpu {
+   cpu-supply = <_core>;
+   };
+   };
+
+   pxabus {
+   pinctrl: pinctrl@40e0 {
+   status = "okay";
+   pinctrl_ac97_default: ac97-default {
+   PMMUX(hpjack-detect, 12, gpio_in);
+   PMMUX(ac97-bitclk, 28, AC97_BITCLK);
+   PMMUX(ac97-sdata-in-0, 29, AC97_SDATA_IN_0);
+   PMMUX(ac97-sdata-out, 30, AC97_SDATA_OUT);
+   PMMUX(ac97-sync, 31, AC97_SYNC);
+   PMMUX(ac97-sysclk, 89, AC97_SYSCLK);
+   };
+   pinctrl_btuart_default: btuart-default {
+   PMMUX(btuart-nactivity, 14, gpio_in);
+   PMMUX(btuart-rxd, 42, BTRXD);
+   PMMUX(btuart-txd, 43, BTTXD);
+   PMMUX(btuart-cts, 44, BTCTS);
+   PMMUX(btuart-rts, 45, BTRTS);
+   PMMUX_LPM_LOW(bt-on, 83, gpio_out);
+   PMMUX_LPM_HIGH(bt-unknown, 77, gpio_out);
+   PMMUX_LPM_HIGH(bt-nreset, 86, gpio_out);
+   };
+   pinctrl_ffuart_default: ffuart-default {
+   PMMUX(ffuart-rxd, 34, FFRXD);
+   PMMUX(ffuart-cts, 35, FFCTS);
+   PMMUX(ffuart-dcd, 36, FFDCD);
+   PMMUX(ffuart-dsr, 37, FFDSR);
+   PMMUX(ffuart-txd, 39, FFTXD);
+   PMMUX(ffuart-dtr, 40, FFDTR);
+   PMMUX(ffuart-rts, 41, FFRTS);
+   PMMUX_LPM_LOW(gsm-reset, 24, gpio_out);
+   PMMUX(gsm-is-on, 25, gpio_in);
+   PMMUX_LPM_HIGH(gsm-nset-on, 88, gpio_out);
+   PMMUX_LPM_HIGH(gsm-nset-off, 90, gpio_out);
+