Skip to contentSkip to conversation

ARM: sunxi: Support MSI Primo81 tablet and Sinlinx SinA31s

PATCH New Chen-Yu Tsai 3 participants 28 messages Aug 28, 2015 – Sep 18, 2015

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

cover ARM: sunxi: Support MSI Primo81 tablet and Sinlinx SinA31s

Hi Maxime,

This series adds support for MSI's Primo81 tablet, and Sinlinx's SinA31s development kit. This also adds a common axp221.dtsi, like we have for axp209 and axp152. The Hummingbird A31 dts is also migrated to this.

The Primo81 patch is actually a v5. Changes since the last version can be found in that patch.

Patch 1 adds an lradc node to sun6i-a31.dtsi. This is the same lradc for tablet buttons found on the other sunxi SoCs.

Patch 2 adds a common dtsi for the AXP221 PMIC. This includes listing all the regulators, and the basic common properties, like "interrupt-controller".

Patch 3 migrates the Hummingbird A31 dts to use the new axp221.dtsi

Patch 4 adds the pinmux settings for A31/A31s mmc2 with 8-bit bus for emmc.

Patch 5 adds dtsi/dts files for the Sinlinx SinA31s development kit.

Patch 6 adds a dts file for the A31s based MSI Primo81 tablet.

Regards
ChenYu

Chen-Yu Tsai (5):
ARM: dts: sun6i: Add lradc node
ARM: dts: sunxi: Add dtsi for AXP221 PMIC
ARM: dts: sun6i: hummingbird: Use axp221.dtsi for axp221 regulators
ARM: dts: sun6i: Add mmc2 pins for 8 bit emmc
ARM: dts: sun6i: Add support for Sinlinx A31s SDK board

Karsten Merker (1):
ARM: dts: sun6i: Add dts file for MSI Primo81 tablet

 arch/arm/boot/dts/Makefile                     |   4 +-
 arch/arm/boot/dts/axp221.dtsi                  | 148 ++++++++++++++
 arch/arm/boot/dts/sun6i-a31-hummingbird.dts    | 114 ++++++-----
 arch/arm/boot/dts/sun6i-a31.dtsi               |  17 ++
 arch/arm/boot/dts/sun6i-a31s-primo81.dts       | 255 +++++++++++++++++++++++++
 arch/arm/boot/dts/sun6i-a31s-sina31s-core.dtsi | 131 +++++++++++++
 arch/arm/boot/dts/sun6i-a31s-sina31s.dts       | 149 +++++++++++++++
 7 files changed, 759 insertions(+), 59 deletions(-)
 create mode 100644 arch/arm/boot/dts/axp221.dtsi
 create mode 100644 arch/arm/boot/dts/sun6i-a31s-primo81.dts
 create mode 100644 arch/arm/boot/dts/sun6i-a31s-sina31s-core.dtsi
 create mode 100644 arch/arm/boot/dts/sun6i-a31s-sina31s.dts
Signature · 1 line
2.5.0
#1 lore raw

PATCH 1/6 ARM: dts: sun6i: Add lradc node

sun6i also has the LRADC for tablet buttons.

---
 arch/arm/boot/dts/sun6i-a31.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)
arch/arm/boot/dts/sun6i-a31.dtsi +7 -0
index 54bb83b58f42..431c7c884e1c 100644
@@ -768,6 +768,13 @@
 			reg = <0x01c20ca0 0x20>;
 		};
 
+		lradc: lradc at 01c22800 {
+			compatible = "allwinner,sun4i-a10-lradc-keys";
+			reg = <0x01c22800 0x100>;
+			interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
+			status = "disabled";
+		};
+
 		rtp: rtp at 01c25000 {
 			compatible = "allwinner,sun6i-a31-ts";
 			reg = <0x01c25000 0x100>;
Signature · 1 line
2.5.0
#2 lore raw

PATCH 1/6 ARM: dts: sun6i: Add lradc node

Quoted 3 lines · Chen-Yu Tsai

sun6i also has the LRADC for tablet buttons.

Queued, thanks!

Maxime

Signature · 10 lines
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150828/f253f113/attachment.sig>
#3 lore raw

PATCH 2/6 ARM: dts: sunxi: Add dtsi for AXP221 PMIC

In reply to Chen-Yu Tsai

The AXP221 PMIC is used with some Allwinner SoCs. This patch adds a dtsi file listing all the regulator nodes. The regulators are initialized based on their device node names.

This can later be used with the AXP223 PMIC as well, which has the same functionality as AXP221, except for its host interface.

---
 arch/arm/boot/dts/axp221.dtsi | 148 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 148 insertions(+)
 create mode 100644 arch/arm/boot/dts/axp221.dtsi
arch/arm/boot/dts/axp221.dtsi new file +148 -0
new file mode 100644
index 000000000000..74836f329863
@@ -0,0 +1,148 @@
+/*
+ * Copyright 2015 Chen-Yu Tsai
+ *
+ * Chen-Yu Tsai <[email protected]>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This file is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * AXP221/221s/223 Integrated Power Management Chip
+ * http://www.x-powers.com/product/AXP22X.php
+ * http://dl.linux-sunxi.org/AXP/AXP221%20Datasheet%20V1.2%2020130326%20.pdf
+ */
+
+&axp221 {
+	compatible = "x-powers,axp221";
+	interrupt-controller;
+	#interrupt-cells = <1>;
+
+	regulators {
+		/* Default work frequency for buck regulators */
+		x-powers,dcdc-freq = <3000>;
+
+		/* supplies for dc1sw & dc5ldo are connected internally */
+		dcdc1-supply = <&reg_dcdc1>;
+		dcdc5-supply = <&reg_dcdc5>;
+
+		reg_dcdc1: dcdc1 {
+			regulator-name = "dcdc1";
+		};
+
+		reg_dcdc2: dcdc2 {
+			regulator-name = "dcdc2";
+		};
+
+		reg_dcdc3: dcdc3 {
+			regulator-name = "dcdc3";
+		};
+
+		reg_dcdc4: dcdc4 {
+			regulator-name = "dcdc4";
+		};
+
+		reg_dcdc5: dcdc5 {
+			regulator-name = "dcdc5";
+		};
+
+		reg_dc1sw: dc1sw {
+			regulator-name = "dc1sw";
+		};
+
+		reg_dc5ldo: dc5ldo {
+			regulator-name = "dc5ldo";
+		};
+
+		reg_aldo1: aldo1 {
+			regulator-name = "aldo1";
+		};
+
+		reg_aldo2: aldo2 {
+			regulator-name = "aldo2";
+		};
+
+		reg_aldo3: aldo3 {
+			regulator-name = "aldo3";
+		};
+
+		reg_dldo1: dldo1 {
+			regulator-name = "dldo1";
+		};
+
+		reg_dldo2: dldo2 {
+			regulator-name = "dldo2";
+		};
+
+		reg_dldo3: dldo3 {
+			regulator-name = "dldo3";
+		};
+
+		reg_dldo4: dldo4 {
+			regulator-name = "dldo4";
+		};
+
+		reg_eldo1: eldo1 {
+			regulator-name = "eldo1";
+		};
+
+		reg_eldo2: eldo2 {
+			regulator-name = "eldo2";
+		};
+
+		reg_eldo3: eldo3 {
+			regulator-name = "eldo3";
+		};
+
+		reg_ldo_io0: ldo_io0 {
+			regulator-name = "ldo_io0";
+		};
+
+		reg_ldo_io1: ldo_io1 {
+			regulator-name = "ldo_io1";
+		};
+
+		reg_rtc_ldo: rtc_ldo {
+			/* RTC_LDO is a fixed, always-on regulator */
+			regulator-always-on;
+			regulator-min-microvolt = <3000000>;
+			regulator-max-microvolt = <3000000>;
+			regulator-name = "rtc_ldo";
+		};
+	};
+};
Signature · 1 line
2.5.0
#4 lore raw

PATCH 2/6 ARM: dts: sunxi: Add dtsi for AXP221 PMIC

Quoted 58 lines · Chen-Yu Tsai

The AXP221 PMIC is used with some Allwinner SoCs. This patch adds a dtsi file listing all the regulator nodes. The regulators are initialized based on their device node names.

This can later be used with the AXP223 PMIC as well, which has the same functionality as AXP221, except for its host interface.

---
 arch/arm/boot/dts/axp221.dtsi | 148 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 148 insertions(+)
 create mode 100644 arch/arm/boot/dts/axp221.dtsi
arch/arm/boot/dts/axp221.dtsi new file +39 -0
new file mode 100644
index 000000000000..74836f329863
@@ -0,0 +1,148 @@
+/*
+ * Copyright 2015 Chen-Yu Tsai
+ *
+ * Chen-Yu Tsai <[email protected]>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This file is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,

arch/arm/boot/dts/axp221.dtsi line 49

Quoted 10 lines
arch/arm/boot/dts/axp221.dtsi new file +10 -0
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * AXP221/221s/223 Integrated Power Management Chip
+ * http://www.x-powers.com/product/AXP22X.php
+ * http://dl.linux-sunxi.org/AXP/AXP221%20Datasheet%20V1.2%2020130326%20.pdf
+ */

I'm usually not really fond of URLs in the source code and/or the commit logs. They tend to be broken very easily.

arch/arm/boot/dts/axp221.dtsi line 62

Quoted 13 lines
arch/arm/boot/dts/axp221.dtsi new file +13 -0
+
+&axp221 {
+	compatible = "x-powers,axp221";
+	interrupt-controller;
+	#interrupt-cells = <1>;
+
+	regulators {
+		/* Default work frequency for buck regulators */
+		x-powers,dcdc-freq = <3000>;
+
+		/* supplies for dc1sw & dc5ldo are connected internally */
+		dcdc1-supply = <&reg_dcdc1>;
+		dcdc5-supply = <&reg_dcdc5>;

so the parent regulator of DCDC1 is DCDC1 ?

Maxime

Signature · 10 lines
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150828/7cfabc51/attachment-0001.sig>
#5 lore raw

PATCH 2/6 ARM: dts: sunxi: Add dtsi for AXP221 PMIC

Quoted 64 lines · Maxime Ripard
Quoted 63 lines · Chen-Yu Tsai

The AXP221 PMIC is used with some Allwinner SoCs. This patch adds a dtsi file listing all the regulator nodes. The regulators are initialized based on their device node names.

This can later be used with the AXP223 PMIC as well, which has the same functionality as AXP221, except for its host interface.

---
 arch/arm/boot/dts/axp221.dtsi | 148 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 148 insertions(+)
 create mode 100644 arch/arm/boot/dts/axp221.dtsi
arch/arm/boot/dts/axp221.dtsi new file +44 -0
new file mode 100644
index 000000000000..74836f329863
@@ -0,0 +1,148 @@
+/*
+ * Copyright 2015 Chen-Yu Tsai
+ *
+ * Chen-Yu Tsai <[email protected]>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This file is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
Quoted 8 lines

arch/arm/boot/dts/axp221.dtsi line 49

Quoted 5 lines
arch/arm/boot/dts/axp221.dtsi new file +5 -0
+/*
+ * AXP221/221s/223 Integrated Power Management Chip
+ * http://www.x-powers.com/product/AXP22X.php
+ * http://dl.linux-sunxi.org/AXP/AXP221%20Datasheet%20V1.2%2020130326%20.pdf
+ */

I'm usually not really fond of URLs in the source code and/or the commit logs. They tend to be broken very easily.

OK. Would you rather I put them in Documentation/arm/sunxi/README? It's not immediately clear that sunxi and axp* are connected though.

Quoted 7 lines
Quoted 7 lines
arch/arm/boot/dts/axp221.dtsi new file +7 -0
+
+&axp221 {
+     compatible = "x-powers,axp221";
+     interrupt-controller;
+     #interrupt-cells = <1>;
+
+     regulators {
Quoted 8 lines

arch/arm/boot/dts/axp221.dtsi line 62

Quoted 6 lines
arch/arm/boot/dts/axp221.dtsi new file +6 -0
+             /* Default work frequency for buck regulators */
+             x-powers,dcdc-freq = <3000>;
+
+             /* supplies for dc1sw & dc5ldo are connected internally */
+             dcdc1-supply = <&reg_dcdc1>;
+             dcdc5-supply = <&reg_dcdc5>;

so the parent regulator of DCDC1 is DCDC1 ?

These probably aren't the best names. These are the supplies for DC1SW and DC5LDO, respectively. They are connected internally, so there aren't named pins for them. The comment above explains it, though probably not clearly enough. Furthermore, the input pins for DCDC1/5 are VIN1/5.

Regards
ChenYu

#6 lore raw

PATCH 2/6 ARM: dts: sunxi: Add dtsi for AXP221 PMIC

Quoted 11 lines · Chen-Yu Tsai
Quoted 8 lines
Quoted 5 lines

+/*
+ * AXP221/221s/223 Integrated Power Management Chip
+ * http://www.x-powers.com/product/AXP22X.php
+ * http://dl.linux-sunxi.org/AXP/AXP221%20Datasheet%20V1.2%2020130326%20.pdf
+ */

I'm usually not really fond of URLs in the source code and/or the commit logs. They tend to be broken very easily.

OK. Would you rather I put them in Documentation/arm/sunxi/README? It's not immediately clear that sunxi and axp* are connected though.

It's one of the first things that pop up when googling, and it's not really related to sunxi, so I'd say simply leave them out.

Quoted 16 lines
Quoted 7 lines
Quoted 7 lines
arch/arm/boot/dts/axp221.dtsi new file +7 -0
+
+&axp221 {
+     compatible = "x-powers,axp221";
+     interrupt-controller;
+     #interrupt-cells = <1>;
+
+     regulators {
Quoted 8 lines

arch/arm/boot/dts/axp221.dtsi line 62

Quoted 6 lines
arch/arm/boot/dts/axp221.dtsi new file +6 -0
+             /* Default work frequency for buck regulators */
+             x-powers,dcdc-freq = <3000>;
+
+             /* supplies for dc1sw & dc5ldo are connected internally */
+             dcdc1-supply = <&reg_dcdc1>;
+             dcdc5-supply = <&reg_dcdc5>;

so the parent regulator of DCDC1 is DCDC1 ?

Quoted 4 lines

These probably aren't the best names. These are the supplies for DC1SW and DC5LDO, respectively. They are connected internally, so there aren't named pins for them. The comment above explains it, though probably not clearly enough. Furthermore, the input pins for DCDC1/5 are VIN1/5.

I'm not quite sure I understand. They're connected internally but they have pins ?

Maxime

Signature · 10 lines
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150828/165096b7/attachment.sig>
#7 lore raw

PATCH 2/6 ARM: dts: sunxi: Add dtsi for AXP221 PMIC

Quoted 7 lines · Maxime Ripard
Quoted 6 lines · Chen-Yu Tsai
Quoted 6 lines
Quoted 5 lines

+/*
+ * AXP221/221s/223 Integrated Power Management Chip
+ * http://www.x-powers.com/product/AXP22X.php
+ * http://dl.linux-sunxi.org/AXP/AXP221%20Datasheet%20V1.2%2020130326%20.pdf
+ */

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

I'm usually not really fond of URLs in the source code and/or the commit logs. They tend to be broken very easily.

OK. Would you rather I put them in Documentation/arm/sunxi/README? It's not immediately clear that sunxi and axp* are connected though.

It's one of the first things that pop up when googling, and it's not really related to sunxi, so I'd say simply leave them out.

Ok.

Quoted 16 lines
Quoted 16 lines
Quoted 15 lines

arch/arm/boot/dts/axp221.dtsi line 62

Quoted 13 lines
arch/arm/boot/dts/axp221.dtsi new file +13 -0
+
+&axp221 {
+     compatible = "x-powers,axp221";
+     interrupt-controller;
+     #interrupt-cells = <1>;
+
+     regulators {
+             /* Default work frequency for buck regulators */
+             x-powers,dcdc-freq = <3000>;
+
+             /* supplies for dc1sw & dc5ldo are connected internally */
+             dcdc1-supply = <&reg_dcdc1>;
+             dcdc5-supply = <&reg_dcdc5>;

so the parent regulator of DCDC1 is DCDC1 ?

Quoted 7 lines
Quoted 4 lines

These probably aren't the best names. These are the supplies for DC1SW and DC5LDO, respectively. They are connected internally, so there aren't named pins for them. The comment above explains it, though probably not clearly enough. Furthermore, the input pins for DCDC1/5 are VIN1/5.

I'm not quite sure I understand. They're connected internally but they have pins ?

Internally, DCDC1's output feeds the input for DC1SW (which is just a switch BTW), and DCDC5's output feeds DC5LDO (which is an LDO). Both these extra regulators have separate controls. There are no external pins to name the supplies after, so I just named them after which regulator supplies them.

ChenYu

#8 lore raw

PATCH 2/6 ARM: dts: sunxi: Add dtsi for AXP221 PMIC

Quoted 21 lines · Chen-Yu Tsai
Quoted 21 lines
Quoted 20 lines
Quoted 7 lines
Quoted 7 lines
arch/arm/boot/dts/axp221.dtsi new file +7 -0
+
+&axp221 {
+     compatible = "x-powers,axp221";
+     interrupt-controller;
+     #interrupt-cells = <1>;
+
+     regulators {
Quoted 8 lines

arch/arm/boot/dts/axp221.dtsi line 62

Quoted 6 lines
arch/arm/boot/dts/axp221.dtsi new file +6 -0
+             /* Default work frequency for buck regulators */
+             x-powers,dcdc-freq = <3000>;
+
+             /* supplies for dc1sw & dc5ldo are connected internally */
+             dcdc1-supply = <&reg_dcdc1>;
+             dcdc5-supply = <&reg_dcdc5>;

so the parent regulator of DCDC1 is DCDC1 ?

These probably aren't the best names. These are the supplies for DC1SW and DC5LDO, respectively. They are connected internally, so there aren't named pins for them. The comment above explains it, though probably not clearly enough. Furthermore, the input pins for DCDC1/5 are VIN1/5.

Quoted 7 lines
Quoted 2 lines

I'm not quite sure I understand. They're connected internally but they have pins ?

Internally, DCDC1's output feeds the input for DC1SW (which is just a switch BTW) and DCDC5's output feeds DC5LDO (which is an LDO). Both these extra regulators have separate controls. There are no external pins to name the supplies after, so I just named them after which regulator supplies them.

Well, there is. dc5ldo and dc1sw. And it is also how you called these regulators in your DT, so it would make much more sense to have it listed as such.

Maxime

Signature · 10 lines
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150901/f437a683/attachment.sig>
#9 lore raw

PATCH 2/6 ARM: dts: sunxi: Add dtsi for AXP221 PMIC

Quoted 25 lines · Maxime Ripard
Quoted 24 lines · Chen-Yu Tsai
Quoted 23 lines
Quoted 16 lines
Quoted 7 lines
Quoted 7 lines
arch/arm/boot/dts/axp221.dtsi new file +7 -0
+
+&axp221 {
+     compatible = "x-powers,axp221";
+     interrupt-controller;
+     #interrupt-cells = <1>;
+
+     regulators {
Quoted 8 lines

arch/arm/boot/dts/axp221.dtsi line 62

Quoted 6 lines
arch/arm/boot/dts/axp221.dtsi new file +6 -0
+             /* Default work frequency for buck regulators */
+             x-powers,dcdc-freq = <3000>;
+
+             /* supplies for dc1sw & dc5ldo are connected internally */
+             dcdc1-supply = <&reg_dcdc1>;
+             dcdc5-supply = <&reg_dcdc5>;

so the parent regulator of DCDC1 is DCDC1 ?

Quoted 4 lines

These probably aren't the best names. These are the supplies for DC1SW and DC5LDO, respectively. They are connected internally, so there aren't named pins for them. The comment above explains it, though probably not clearly enough. Furthermore, the input pins for DCDC1/5 are VIN1/5.

I'm not quite sure I understand. They're connected internally but they have pins ?

Quoted 8 lines
Quoted 4 lines

Internally, DCDC1's output feeds the input for DC1SW (which is just a switch BTW) and DCDC5's output feeds DC5LDO (which is an LDO). Both these extra regulators have separate controls. There are no external pins to name the supplies after, so I just named them after which regulator supplies them.

Well, there is. dc5ldo and dc1sw. And it is also how you called these regulators in your DT, so it would make much more sense to have it listed as such.

I was under the impression that we name them after the input pins. The names are also documented in Documentation/devicetree/bindings/mfd/axp20x.txt

Do you want to change them?

Regards
ChenYu

#10 lore raw

PATCH 2/6 ARM: dts: sunxi: Add dtsi for AXP221 PMIC

Quoted 32 lines · Chen-Yu Tsai
Quoted 30 lines · Maxime Ripard
Quoted 28 lines · Chen-Yu Tsai
Quoted 16 lines
Quoted 16 lines
Quoted 15 lines

Review

Quoted 13 lines
(quoted diff) +13 -0
+
+&axp221 {
+     compatible = "x-powers,axp221";
+     interrupt-controller;
+     #interrupt-cells = <1>;
+
+     regulators {
+             /* Default work frequency for buck regulators */
+             x-powers,dcdc-freq = <3000>;
+
+             /* supplies for dc1sw & dc5ldo are connected internally */
+             dcdc1-supply = <&reg_dcdc1>;
+             dcdc5-supply = <&reg_dcdc5>;

so the parent regulator of DCDC1 is DCDC1 ?

Quoted 7 lines
Quoted 4 lines

These probably aren't the best names. These are the supplies for DC1SW and DC5LDO, respectively. They are connected internally, so there aren't named pins for them. The comment above explains it, though probably not clearly enough. Furthermore, the input pins for DCDC1/5 are VIN1/5.

I'm not quite sure I understand. They're connected internally but they have pins ?

Internally, DCDC1's output feeds the input for DC1SW (which is just a switch BTW) and DCDC5's output feeds DC5LDO (which is an LDO). Both these extra regulators have separate controls. There are no external pins to name the supplies after, so I just named them after which regulator supplies them.

Quoted 6 lines
Quoted 3 lines

Well, there is. dc5ldo and dc1sw. And it is also how you called these regulators in your DT, so it would make much more sense to have it listed as such.

I was under the impression that we name them after the input pins. The names are also documented in Documentation/devicetree/bindings/mfd/axp20x.txt

Except that those don't have any input pins, like you said. It makes much more sense to name them after the regulator they supply.

This property express a parenting relationship, with <child>-supply = <parent>.

Quoted 1 line

Do you want to change them?

Yes.

Maxime

Signature · 10 lines
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150903/17b66cfc/attachment.sig>
#11 lore raw

PATCH 3/6 ARM: dts: sun6i: hummingbird: Use axp221.dtsi for axp221 regulators

In reply to Chen-Yu Tsai

Now that we have axp221.dtsi describing common axp22x hardware, use it and reference the nodes instead of declaring the whole tree.

Also add regulator reference for cpu0 supply.

---
 arch/arm/boot/dts/sun6i-a31-hummingbird.dts | 114 ++++++++++++++--------------
 1 file changed, 56 insertions(+), 58 deletions(-)
arch/arm/boot/dts/sun6i-a31-hummingbird.dts +56 -58
index d0cfadac0691..d019cb70acec 100644
@@ -67,6 +67,10 @@
 	};
 };
 
+&cpu0 {
+	cpu-supply = <&reg_dcdc2>;
+};
+
 &ehci0 {
 	status = "okay";
 };
@@ -119,7 +123,7 @@
 &mmc0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_hummingbird>;
-	vmmc-supply = <&vcc_3v0>;
+	vmmc-supply = <&reg_dcdc1>;
 	bus-width = <4>;
 	cd-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */
 	cd-inverted;
@@ -134,7 +138,7 @@
 &mmc1 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&mmc1_pins_a>, <&wifi_reset_pin_hummingbird>;
-	vmmc-supply = <&vcc_wifi>;
+	vmmc-supply = <&reg_aldo1>;
 	mmc-pwrseq = <&wifi_pwrseq>;
 	bus-width = <4>;
 	non-removable;
@@ -169,65 +173,59 @@
 		reg = <0x68>;
 		interrupt-parent = <&nmi_intc>;
 		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
-		interrupt-controller;
-		#interrupt-cells = <1>;
-		dcdc1-supply = <&vcc_3v0>;
-		dcdc5-supply = <&vcc_dram>;
-
-		regulators {
-			x-powers,dcdc-freq = <3000>;
-
-			vcc_3v0: dcdc1 {
-				regulator-always-on;
-				regulator-min-microvolt = <3000000>;
-				regulator-max-microvolt = <3000000>;
-				regulator-name = "vcc-3v0";
-			};
-
-			vdd_cpu: dcdc2 {
-				regulator-always-on;
-				regulator-min-microvolt = <700000>;
-				regulator-max-microvolt = <1320000>;
-				regulator-name = "vdd-cpu";
-			};
-
-			vdd_gpu: dcdc3 {
-				regulator-always-on;
-				regulator-min-microvolt = <700000>;
-				regulator-max-microvolt = <1320000>;
-				regulator-name = "vdd-gpu";
-			};
-
-			vdd_sys_dll: dcdc4 {
-				regulator-always-on;
-				regulator-min-microvolt = <1100000>;
-				regulator-max-microvolt = <1100000>;
-				regulator-name = "vdd-sys-dll";
-			};
-
-			vcc_dram: dcdc5 {
-				regulator-always-on;
-				regulator-min-microvolt = <1500000>;
-				regulator-max-microvolt = <1500000>;
-				regulator-name = "vcc-dram";
-			};
-
-			vcc_wifi: aldo1 {
-				regulator-min-microvolt = <3300000>;
-				regulator-max-microvolt = <3300000>;
-				regulator-name = "vcc_wifi";
-			};
-
-			avcc: aldo3 {
-				regulator-always-on;
-				regulator-min-microvolt = <3000000>;
-				regulator-max-microvolt = <3000000>;
-				regulator-name = "avcc";
-			};
-		};
 	};
 };
 
+#include "axp221.dtsi"
+
+&reg_aldo1 {
+	regulator-min-microvolt = <3300000>;
+	regulator-max-microvolt = <3300000>;
+	regulator-name = "vcc-wifi";
+};
+
+&reg_aldo3 {
+	regulator-always-on;
+	regulator-min-microvolt = <3000000>;
+	regulator-max-microvolt = <3000000>;
+	regulator-name = "avcc";
+};
+
+&reg_dcdc1 {
+	regulator-always-on;
+	regulator-min-microvolt = <3000000>;
+	regulator-max-microvolt = <3000000>;
+	regulator-name = "vcc-3v0";
+};
+
+&reg_dcdc2 {
+	regulator-always-on;
+	regulator-min-microvolt = <700000>;
+	regulator-max-microvolt = <1320000>;
+	regulator-name = "vdd-cpu";
+};
+
+&reg_dcdc3 {
+	regulator-always-on;
+	regulator-min-microvolt = <700000>;
+	regulator-max-microvolt = <1320000>;
+	regulator-name = "vdd-gpu";
+};
+
+&reg_dcdc4 {
+	regulator-always-on;
+	regulator-min-microvolt = <1100000>;
+	regulator-max-microvolt = <1100000>;
+	regulator-name = "vdd-sys-dll";
+};
+
+&reg_dcdc5 {
+	regulator-always-on;
+	regulator-min-microvolt = <1500000>;
+	regulator-max-microvolt = <1500000>;
+	regulator-name = "vcc-dram";
+};
+
 &reg_usb1_vbus {
 	gpio = <&pio 7 24 GPIO_ACTIVE_HIGH>; /* PH24 */
 	status = "okay";
Signature · 1 line
2.5.0
#12 lore raw

PATCH 3/6 ARM: dts: sun6i: hummingbird: Use axp221.dtsi for axp221 regulators

Quoted 131 lines · Chen-Yu Tsai

Now that we have axp221.dtsi describing common axp22x hardware, use it and reference the nodes instead of declaring the whole tree.

Also add regulator reference for cpu0 supply.

---
 arch/arm/boot/dts/sun6i-a31-hummingbird.dts | 114 ++++++++++++++--------------
 1 file changed, 56 insertions(+), 58 deletions(-)
arch/arm/boot/dts/sun6i-a31-hummingbird.dts +31 -58
index d0cfadac0691..d019cb70acec 100644
@@ -67,6 +67,10 @@
 	};
 };
 
+&cpu0 {
+	cpu-supply = <&reg_dcdc2>;
+};
+
 &ehci0 {
 	status = "okay";
 };
@@ -119,7 +123,7 @@
 &mmc0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_hummingbird>;
-	vmmc-supply = <&vcc_3v0>;
+	vmmc-supply = <&reg_dcdc1>;
 	bus-width = <4>;
 	cd-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */
 	cd-inverted;
@@ -134,7 +138,7 @@
 &mmc1 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&mmc1_pins_a>, <&wifi_reset_pin_hummingbird>;
-	vmmc-supply = <&vcc_wifi>;
+	vmmc-supply = <&reg_aldo1>;
 	mmc-pwrseq = <&wifi_pwrseq>;
 	bus-width = <4>;
 	non-removable;
@@ -169,65 +173,59 @@
 		reg = <0x68>;
 		interrupt-parent = <&nmi_intc>;
 		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
-		interrupt-controller;
-		#interrupt-cells = <1>;
-		dcdc1-supply = <&vcc_3v0>;
-		dcdc5-supply = <&vcc_dram>;
-
-		regulators {
-			x-powers,dcdc-freq = <3000>;
-
-			vcc_3v0: dcdc1 {
-				regulator-always-on;
-				regulator-min-microvolt = <3000000>;
-				regulator-max-microvolt = <3000000>;
-				regulator-name = "vcc-3v0";
-			};
-
-			vdd_cpu: dcdc2 {
-				regulator-always-on;
-				regulator-min-microvolt = <700000>;
-				regulator-max-microvolt = <1320000>;
-				regulator-name = "vdd-cpu";
-			};
-
-			vdd_gpu: dcdc3 {
-				regulator-always-on;
-				regulator-min-microvolt = <700000>;
-				regulator-max-microvolt = <1320000>;
-				regulator-name = "vdd-gpu";
-			};
-
-			vdd_sys_dll: dcdc4 {
-				regulator-always-on;
-				regulator-min-microvolt = <1100000>;
-				regulator-max-microvolt = <1100000>;
-				regulator-name = "vdd-sys-dll";
-			};
-
-			vcc_dram: dcdc5 {
-				regulator-always-on;
-				regulator-min-microvolt = <1500000>;
-				regulator-max-microvolt = <1500000>;
-				regulator-name = "vcc-dram";
-			};
-
-			vcc_wifi: aldo1 {
-				regulator-min-microvolt = <3300000>;
-				regulator-max-microvolt = <3300000>;
-				regulator-name = "vcc_wifi";
-			};
-
-			avcc: aldo3 {
-				regulator-always-on;
-				regulator-min-microvolt = <3000000>;
-				regulator-max-microvolt = <3000000>;
-				regulator-name = "avcc";
-			};
-		};
 	};
 };
 
+#include "axp221.dtsi"
+
+&reg_aldo1 {
+	regulator-min-microvolt = <3300000>;
+	regulator-max-microvolt = <3300000>;
+	regulator-name = "vcc-wifi";
+};
+
+&reg_aldo3 {
+	regulator-always-on;
+	regulator-min-microvolt = <3000000>;
+	regulator-max-microvolt = <3000000>;
+	regulator-name = "avcc";
+};
+
+&reg_dcdc1 {
+	regulator-always-on;
+	regulator-min-microvolt = <3000000>;
+	regulator-max-microvolt = <3000000>;
+	regulator-name = "vcc-3v0";
+};
+
+&reg_dcdc2 {
+	regulator-always-on;
+	regulator-min-microvolt = <700000>;

arch/arm/boot/dts/sun6i-a31-hummingbird.dts line 213

Quoted 10 lines
arch/arm/boot/dts/sun6i-a31-hummingbird.dts +10 -0
+	regulator-max-microvolt = <1320000>;
+	regulator-name = "vdd-cpu";
+};
+
+&reg_dcdc3 {
+	regulator-always-on;
+	regulator-min-microvolt = <700000>;
+	regulator-max-microvolt = <1320000>;
+	regulator-name = "vdd-gpu";
+};

I'm know it's just a mechanical change from your part, but is the GPU regulator really need to be always on?

Maxime

Signature · 10 lines
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150828/bda2fc3c/attachment.sig>
#13 lore raw

PATCH 3/6 ARM: dts: sun6i: hummingbird: Use axp221.dtsi for axp221 regulators

Quoted 137 lines · Maxime Ripard
Quoted 136 lines · Chen-Yu Tsai

Now that we have axp221.dtsi describing common axp22x hardware, use it and reference the nodes instead of declaring the whole tree.

Also add regulator reference for cpu0 supply.

---
 arch/arm/boot/dts/sun6i-a31-hummingbird.dts | 114 ++++++++++++++--------------
 1 file changed, 56 insertions(+), 58 deletions(-)
arch/arm/boot/dts/sun6i-a31-hummingbird.dts +36 -58
index d0cfadac0691..d019cb70acec 100644
@@ -67,6 +67,10 @@
      };
 };
 
+&cpu0 {
+     cpu-supply = <&reg_dcdc2>;
+};
+
 &ehci0 {
      status = "okay";
 };
@@ -119,7 +123,7 @@
 &mmc0 {
      pinctrl-names = "default";
      pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_hummingbird>;
-     vmmc-supply = <&vcc_3v0>;
+     vmmc-supply = <&reg_dcdc1>;
      bus-width = <4>;
      cd-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */
      cd-inverted;
@@ -134,7 +138,7 @@
 &mmc1 {
      pinctrl-names = "default";
      pinctrl-0 = <&mmc1_pins_a>, <&wifi_reset_pin_hummingbird>;
-     vmmc-supply = <&vcc_wifi>;
+     vmmc-supply = <&reg_aldo1>;
      mmc-pwrseq = <&wifi_pwrseq>;
      bus-width = <4>;
      non-removable;
@@ -169,65 +173,59 @@
              reg = <0x68>;
              interrupt-parent = <&nmi_intc>;
              interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
-             interrupt-controller;
-             #interrupt-cells = <1>;
-             dcdc1-supply = <&vcc_3v0>;
-             dcdc5-supply = <&vcc_dram>;
-
-             regulators {
-                     x-powers,dcdc-freq = <3000>;
-
-                     vcc_3v0: dcdc1 {
-                             regulator-always-on;
-                             regulator-min-microvolt = <3000000>;
-                             regulator-max-microvolt = <3000000>;
-                             regulator-name = "vcc-3v0";
-                     };
-
-                     vdd_cpu: dcdc2 {
-                             regulator-always-on;
-                             regulator-min-microvolt = <700000>;
-                             regulator-max-microvolt = <1320000>;
-                             regulator-name = "vdd-cpu";
-                     };
-
-                     vdd_gpu: dcdc3 {
-                             regulator-always-on;
-                             regulator-min-microvolt = <700000>;
-                             regulator-max-microvolt = <1320000>;
-                             regulator-name = "vdd-gpu";
-                     };
-
-                     vdd_sys_dll: dcdc4 {
-                             regulator-always-on;
-                             regulator-min-microvolt = <1100000>;
-                             regulator-max-microvolt = <1100000>;
-                             regulator-name = "vdd-sys-dll";
-                     };
-
-                     vcc_dram: dcdc5 {
-                             regulator-always-on;
-                             regulator-min-microvolt = <1500000>;
-                             regulator-max-microvolt = <1500000>;
-                             regulator-name = "vcc-dram";
-                     };
-
-                     vcc_wifi: aldo1 {
-                             regulator-min-microvolt = <3300000>;
-                             regulator-max-microvolt = <3300000>;
-                             regulator-name = "vcc_wifi";
-                     };
-
-                     avcc: aldo3 {
-                             regulator-always-on;
-                             regulator-min-microvolt = <3000000>;
-                             regulator-max-microvolt = <3000000>;
-                             regulator-name = "avcc";
-                     };
-             };
      };
 };
 
+#include "axp221.dtsi"
+
+&reg_aldo1 {
+     regulator-min-microvolt = <3300000>;
+     regulator-max-microvolt = <3300000>;
+     regulator-name = "vcc-wifi";
+};
+
+&reg_aldo3 {
+     regulator-always-on;
+     regulator-min-microvolt = <3000000>;
+     regulator-max-microvolt = <3000000>;
+     regulator-name = "avcc";
+};
+
+&reg_dcdc1 {
+     regulator-always-on;
+     regulator-min-microvolt = <3000000>;
+     regulator-max-microvolt = <3000000>;
+     regulator-name = "vcc-3v0";
+};
+
+&reg_dcdc2 {
+     regulator-always-on;
+     regulator-min-microvolt = <700000>;
+     regulator-max-microvolt = <1320000>;
+     regulator-name = "vdd-cpu";
+};
+
+&reg_dcdc3 {
Quoted 8 lines

arch/arm/boot/dts/sun6i-a31-hummingbird.dts line 213

Quoted 5 lines
arch/arm/boot/dts/sun6i-a31-hummingbird.dts +5 -0
+     regulator-always-on;
+     regulator-min-microvolt = <700000>;
+     regulator-max-microvolt = <1320000>;
+     regulator-name = "vdd-gpu";
+};

I'm know it's just a mechanical change from your part, but is the GPU regulator really need to be always on?

I don't think so. It shouldn't affect anything else, though I can't think of a way to thoroughly test it. Maybe I just disable it for. If anyone complains later on when adding new peripherals they can turn it back on.

ChenYu

#14 lore raw

PATCH 3/6 ARM: dts: sun6i: hummingbird: Use axp221.dtsi for axp221 regulators

Quoted 7 lines · Chen-Yu Tsai
Quoted 7 lines
Quoted 6 lines

+&reg_dcdc3 {

arch/arm/boot/dts/sun6i-a31-hummingbird.dts +5 -0
+     regulator-always-on;
+     regulator-min-microvolt = <700000>;
+     regulator-max-microvolt = <1320000>;
+     regulator-name = "vdd-gpu";
+};
Quoted 7 lines
Quoted 2 lines

I'm know it's just a mechanical change from your part, but is the GPU regulator really need to be always on?

I don't think so. It shouldn't affect anything else, though I can't think of a way to thoroughly test it. Maybe I just disable it for. If anyone complains later on when adding new peripherals they can turn it back on.

Sounds good. That also applies to your other patches though.

Maxime

Signature · 10 lines
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150828/91bb260f/attachment.sig>
#15 lore raw

PATCH 4/6 ARM: dts: sun6i: Add mmc2 pins for 8 bit emmc

In reply to Chen-Yu Tsai

This also includes the reset pin for emmc.

---
 arch/arm/boot/dts/sun6i-a31.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)
arch/arm/boot/dts/sun6i-a31.dtsi +10 -0
index 431c7c884e1c..98359f37bf11 100644
@@ -691,6 +691,16 @@
 				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
 			};
 
+			mmc2_8bit_emmc_pins: mmc2 at 0 {
+				allwinner,pins = "PC6", "PC7", "PC8", "PC9",
+						 "PC10", "PC11", "PC12",
+						 "PC13", "PC14", "PC15",
+						 "PC24";
+				allwinner,function = "mmc2";
+				allwinner,drive = <SUN4I_PINCTRL_30_MA>;
+				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+			};
+
 			gmac_pins_mii_a: gmac_mii at 0 {
 				allwinner,pins = "PA0", "PA1", "PA2", "PA3",
 						"PA8", "PA9", "PA11",
Signature · 1 line
2.5.0
#16 lore raw

PATCH 4/6 ARM: dts: sun6i: Add mmc2 pins for 8 bit emmc

Quoted 3 lines · Chen-Yu Tsai

This also includes the reset pin for emmc.

Queued, thanks!

Maxime

Signature · 10 lines
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150828/9f216db1/attachment.sig>
#17 lore raw

PATCH 5/6 ARM: dts: sun6i: Add support for Sinlinx A31s SDK board

In reply to Chen-Yu Tsai

The Sinlinx A31s SDK is a A31s based module/baseboard development kit.

The core module has the SoC, PMIC, DRAM, eMMC and supporting components. There are also pads for UART0, JTAG and I2S.

The baseboard has 100 Mbps Ethernet, 5x USB 2.0 host ports via a USB 2.0 hub chip, MMC, HDMI, SPDIF, CIR, audio jacks, 2 tablet-like volume buttons, RS232 style UART and USB OTG (though VBUS is not connected). Various headers are available for other addon modules, such as SDIO WiFi, LCD display, camera sensor, UARTs, I2C, SPI and GPIOs.

---
 arch/arm/boot/dts/Makefile                     |   3 +-
 arch/arm/boot/dts/sun6i-a31s-sina31s-core.dtsi | 131 ++++++++++++++++++++++
 arch/arm/boot/dts/sun6i-a31s-sina31s.dts       | 149 +++++++++++++++++++++++++
 3 files changed, 282 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boot/dts/sun6i-a31s-sina31s-core.dtsi
 create mode 100644 arch/arm/boot/dts/sun6i-a31s-sina31s.dts
arch/arm/boot/dts/Makefile +2 -1
index f830e1f12716..ada5156fdd49 100644
@@ -578,7 +578,8 @@ dtb-$(CONFIG_MACH_SUN6I) += \
 	sun6i-a31-i7.dtb \
 	sun6i-a31-m9.dtb \
 	sun6i-a31-mele-a1000g-quad.dtb \
-	sun6i-a31s-cs908.dtb
+	sun6i-a31s-cs908.dtb \
+	sun6i-a31s-sina31s.dtb
 dtb-$(CONFIG_MACH_SUN7I) += \
 	sun7i-a20-bananapi.dtb \
 	sun7i-a20-bananapro.dtb \
arch/arm/boot/dts/sun6i-a31s-sina31s-core.dtsi new file +131 -0

131 lines not on this page · raw message

arch/arm/boot/dts/sun6i-a31s-sina31s.dts new file +149 -0

149 lines not on this page · raw message

Signature · 1 line
2.5.0
#18 lore raw

PATCH 5/6 ARM: dts: sun6i: Add support for Sinlinx A31s SDK board

Quoted 4 lines · Chen-Yu Tsai

The Sinlinx A31s SDK is a A31s based module/baseboard development kit.

The core module has the SoC, PMIC, DRAM, eMMC and supporting components. There are also pads for UART0, JTAG and I2S.

Can you use that core module without that baseboard?

Quoted 5 lines

The baseboard has 100 Mbps Ethernet, 5x USB 2.0 host ports via a USB 2.0 hub chip, MMC, HDMI, SPDIF, CIR, audio jacks, 2 tablet-like volume buttons, RS232 style UART and USB OTG (though VBUS is not connected). Various headers are available for other addon modules, such as SDIO WiFi, LCD display, camera sensor, UARTs, I2C, SPI and GPIOs.

Can the baseboard be used with our core modules?

Thanks,
Maxime

Signature · 10 lines
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150828/d55d427f/attachment.sig>
#19 lore raw

PATCH 5/6 ARM: dts: sun6i: Add support for Sinlinx A31s SDK board

Quoted 7 lines · Maxime Ripard
Quoted 4 lines · Chen-Yu Tsai

The Sinlinx A31s SDK is a A31s based module/baseboard development kit.

The core module has the SoC, PMIC, DRAM, eMMC and supporting components. There are also pads for UART0, JTAG and I2S.

Can you use that core module without that baseboard?

You could just solder 5v, gnd, and uart, and it should work. Not that I actually tried it.

Quoted 7 lines
Quoted 5 lines

The baseboard has 100 Mbps Ethernet, 5x USB 2.0 host ports via a USB 2.0 hub chip, MMC, HDMI, SPDIF, CIR, audio jacks, 2 tablet-like volume buttons, RS232 style UART and USB OTG (though VBUS is not connected). Various headers are available for other addon modules, such as SDIO WiFi, LCD display, camera sensor, UARTs, I2C, SPI and GPIOs.

Can the baseboard be used with our core modules?

Doubtful. The baseboard is more like a demonstration platform for the core board.

What do you suggest?

ChenYu

#20 lore raw

PATCH 5/6 ARM: dts: sun6i: Add support for Sinlinx A31s SDK board

Quoted 19 lines · Chen-Yu Tsai
Quoted 7 lines · Maxime Ripard
Quoted 4 lines · Chen-Yu Tsai

The Sinlinx A31s SDK is a A31s based module/baseboard development kit.

The core module has the SoC, PMIC, DRAM, eMMC and supporting components. There are also pads for UART0, JTAG and I2S.

Can you use that core module without that baseboard?

You could just solder 5v, gnd, and uart, and it should work. Not that I actually tried it.

Quoted 6 lines
Quoted 5 lines

The baseboard has 100 Mbps Ethernet, 5x USB 2.0 host ports via a USB 2.0 hub chip, MMC, HDMI, SPDIF, CIR, audio jacks, 2 tablet-like volume buttons, RS232 style UART and USB OTG (though VBUS is not connected). Various headers are available for other addon modules, such as SDIO WiFi, LCD display, camera sensor, UARTs, I2C, SPI and GPIOs.

Quoted 6 lines
Quoted 1 line

Can the baseboard be used with our core modules?

Doubtful. The baseboard is more like a demonstration platform for the core board.

What do you suggest?

Nothing then, I was just trying to understand the possible combinations, but it looks like there's none :)

Maxime

Signature · 10 lines
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150916/b469da46/attachment.sig>
#21 lore raw

PATCH 5/6 ARM: dts: sun6i: Add support for Sinlinx A31s SDK board

Quoted 22 lines · Maxime Ripard
Quoted 21 lines · Chen-Yu Tsai
Quoted 7 lines · Maxime Ripard
Quoted 4 lines · Chen-Yu Tsai

The Sinlinx A31s SDK is a A31s based module/baseboard development kit.

The core module has the SoC, PMIC, DRAM, eMMC and supporting components. There are also pads for UART0, JTAG and I2S.

Can you use that core module without that baseboard?

You could just solder 5v, gnd, and uart, and it should work. Not that I actually tried it.

Quoted 7 lines
Quoted 5 lines

The baseboard has 100 Mbps Ethernet, 5x USB 2.0 host ports via a USB 2.0 hub chip, MMC, HDMI, SPDIF, CIR, audio jacks, 2 tablet-like volume buttons, RS232 style UART and USB OTG (though VBUS is not connected). Various headers are available for other addon modules, such as SDIO WiFi, LCD display, camera sensor, UARTs, I2C, SPI and GPIOs.

Can the baseboard be used with our core modules?

Quoted 7 lines
Quoted 4 lines

Doubtful. The baseboard is more like a demonstration platform for the core board.

What do you suggest?

Nothing then, I was just trying to understand the possible combinations, but it looks like there's none :)

OK then. I'll fix up the gpu regulator stuff, and resend the series sans the primo81 patch after the axp221 supply renaming patches are merged.

The primo81 LCD and backlight need some more work. No PWM and SSD2825 MIPI bridge support in the kernel yet.

Regards,
ChenYu

#22 lore raw

PATCH 6/6 ARM: dts: sun6i: Add dts file for MSI Primo81 tablet

In reply to Chen-Yu Tsai

From: Karsten Merker <[email protected]>

The MSI Primo81 is an A31s based tablet, with 1G RAM, 16G NAND, 768x1024 IPS LCD display, mono speaker, 0.3 MP front camera, 2.0 MP rear camera, 3500 mAh battery, gt911 touchscreen, mma8452 accelerometer and rtl8188etv usb wifi. Has "power", "volume+" and "volume-" buttons (both volume buttons are also connected to the UBOOT_SEL pin). The external connectors are represented by MicroSD slot, MiniHDMI, MicroUSB OTG and 3.5mm headphone jack. More details are available at

    http://linux-sunxi.org/MSI_Primo81

USB OTG is enabled in host only mode. AXP221 USB power supply and GPIO support are required for full USB OTG support.

---

Changes since v4:

- Use axp221.dtsi and add all active regulators.
- Enable i2c controllers for capacitive touch panel and accelerometer.
- Mark i2c controller for camera sensors as failed for now.
- Enable USB OTG in host only mode.
- Drop uart0 as this is not tested.
- s/library/file/ in GPL header.

---
 arch/arm/boot/dts/Makefile               |   1 +
 arch/arm/boot/dts/sun6i-a31s-primo81.dts | 255 +++++++++++++++++++++++++++++++
 2 files changed, 256 insertions(+)
 create mode 100644 arch/arm/boot/dts/sun6i-a31s-primo81.dts
arch/arm/boot/dts/Makefile +1 -0
index ada5156fdd49..c87513ed4eb4 100644
@@ -579,6 +579,7 @@ dtb-$(CONFIG_MACH_SUN6I) += \
 	sun6i-a31-m9.dtb \
 	sun6i-a31-mele-a1000g-quad.dtb \
 	sun6i-a31s-cs908.dtb \
+	sun6i-a31s-primo81.dtb \
 	sun6i-a31s-sina31s.dtb
 dtb-$(CONFIG_MACH_SUN7I) += \
 	sun7i-a20-bananapi.dtb \
arch/arm/boot/dts/sun6i-a31s-primo81.dts new file +255 -0

255 lines not on this page · raw message

Signature · 1 line
2.5.0
#23 lore raw

PATCH 6/6 ARM: dts: sun6i: Add dts file for MSI Primo81 tablet

Quoted 11 lines · Chen-Yu Tsai

From: Karsten Merker <[email protected]>

The MSI Primo81 is an A31s based tablet, with 1G RAM, 16G NAND, 768x1024 IPS LCD display, mono speaker, 0.3 MP front camera, 2.0 MP rear camera, 3500 mAh battery, gt911 touchscreen, mma8452 accelerometer and rtl8188etv usb wifi. Has "power", "volume+" and "volume-" buttons (both volume buttons are also connected to the UBOOT_SEL pin). The external connectors are represented by MicroSD slot, MiniHDMI, MicroUSB OTG and 3.5mm headphone jack. More details are available at

    http://linux-sunxi.org/MSI_Primo81

Again, not a huge fan of the commit logs URL... This commit log is already fine without it.

Quoted 102 lines

USB OTG is enabled in host only mode. AXP221 USB power supply and GPIO support are required for full USB OTG support.

---

Changes since v4:

- Use axp221.dtsi and add all active regulators.
- Enable i2c controllers for capacitive touch panel and accelerometer.
- Mark i2c controller for camera sensors as failed for now.
- Enable USB OTG in host only mode.
- Drop uart0 as this is not tested.
- s/library/file/ in GPL header.

---
 arch/arm/boot/dts/Makefile               |   1 +
 arch/arm/boot/dts/sun6i-a31s-primo81.dts | 255 +++++++++++++++++++++++++++++++
 2 files changed, 256 insertions(+)
 create mode 100644 arch/arm/boot/dts/sun6i-a31s-primo81.dts
arch/arm/boot/dts/Makefile +1 -0
index ada5156fdd49..c87513ed4eb4 100644
@@ -579,6 +579,7 @@ dtb-$(CONFIG_MACH_SUN6I) += \
 	sun6i-a31-m9.dtb \
 	sun6i-a31-mele-a1000g-quad.dtb \
 	sun6i-a31s-cs908.dtb \
+	sun6i-a31s-primo81.dtb \
 	sun6i-a31s-sina31s.dtb
 dtb-$(CONFIG_MACH_SUN7I) += \
 	sun7i-a20-bananapi.dtb \
arch/arm/boot/dts/sun6i-a31s-primo81.dts new file +60 -0
new file mode 100644
index 000000000000..d22befaf363b
@@ -0,0 +1,255 @@
+/*
+ * Copyright 2014 Siarhei Siamashka <[email protected]>
+ * Copyright 2015 Karsten Merker <[email protected]>
+ * Copyright 2015 Chen-Yu Tsai <[email protected]>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This file is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/dts-v1/;
+#include "sun6i-a31s.dtsi"
+#include "sunxi-common-regulators.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/pinctrl/sun4i-a10.h>
+
+/ {
+	model = "MSI Primo81 tablet";
+	compatible = "msi,primo81", "allwinner,sun6i-a31s";
+};
+
+&cpu0 {
+	cpu-supply = <&reg_dcdc2>;
+};

arch/arm/boot/dts/sun6i-a31s-primo81.dts line 70

Quoted 10 lines
arch/arm/boot/dts/sun6i-a31s-primo81.dts new file +10 -0
+
+&ehci0 {
+	/* rtl8188etv wifi is connected here */
+	status = "okay";
+};
+
+&i2c0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c0_pins_a>;
+	/* pull-ups and device VDDIO require AXP221 DLDO3 */

Now that we have AXP221, that can probably be solved, right?

Quoted 10 lines
arch/arm/boot/dts/sun6i-a31s-primo81.dts new file +10 -0
+	status = "failed";
+};
+
+&i2c1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c1_pins_a>;
+	status = "okay";
+
+	ctp at 5d {
+		pinctrl-names = "default";

arch/arm/boot/dts/sun6i-a31s-primo81.dts line 90

Quoted 10 lines
arch/arm/boot/dts/sun6i-a31s-primo81.dts new file +10 -0
+		pinctrl-0 = <&gt911_int_primo81>;
+		compatible = "goodix,gt911";
+		reg = <0x5d>;
+		interrupt-parent = <&pio>;
+		interrupts = <0 3 IRQ_TYPE_LEVEL_HIGH>; /* PA3 */
+		/*
+		 * The default 0,0 coordinate is at the corner closest to
+		 * the headphone jack. X goes along the long side, while
+		 * Y goes along the short side.
+		 */

I'm not exactly sure what that comment is supposed to be for...

Quoted 94 lines
arch/arm/boot/dts/sun6i-a31s-primo81.dts new file +94 -0
+	};
+};
+
+&i2c2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c2_pins_a>;
+	status = "okay";
+
+	accelerometer at 1c {
+		pinctrl-names = "default";
+		pinctrl-0 = <&mma8452_int_primo81>;
+		compatible = "fsl,mma8452";
+		reg = <0x1c>;
+		interrupt-parent = <&pio>;
+		interrupts = <0 9 IRQ_TYPE_LEVEL_HIGH>; /* PA9 */
+		#io-channel-cells = <1>;
+	};
+};
+
+&lradc {
+	vref-supply = <&reg_aldo3>;
+	status = "okay";
+
+	button at 158 {
+		label = "Volume Up";
+		linux,code = <KEY_VOLUMEUP>;
+		channel = <0>;
+		voltage = <158730>;
+	};
+
+	button at 349 {
+		label = "Volume Down";
+		linux,code = <KEY_VOLUMEDOWN>;
+		channel = <0>;
+		voltage = <349206>;
+	};
+};
+
+&mmc0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_primo81>;
+	vmmc-supply = <&reg_dcdc1>;
+	bus-width = <4>;
+	cd-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */
+	cd-inverted;
+	status = "okay";
+};
+
+&pio {
+	gt911_int_primo81: gt911_int_pin at 0 {
+		allwinner,pins = "PA3";
+		allwinner,function = "gpio_in";
+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+	};
+
+	mma8452_int_primo81: mma8452_int_pin at 0 {
+		allwinner,pins = "PA9";
+		allwinner,function = "gpio_in";
+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+	};
+
+	mmc0_cd_pin_primo81: mmc0_cd_pin at 0 {
+		allwinner,pins = "PA8";
+		allwinner,function = "gpio_in";
+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+	};
+};
+
+&p2wi {
+	status = "okay";
+
+	axp221: pmic at 68 {
+		compatible = "x-powers,axp221";
+		reg = <0x68>;
+		interrupt-parent = <&nmi_intc>;
+		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
+	};
+};
+
+#include "axp221.dtsi"
+
+&reg_dcdc1 {
+	regulator-always-on;
+	regulator-min-microvolt = <3000000>;
+	regulator-max-microvolt = <3000000>;
+	regulator-name = "vcc-3v0";
+};
+
+&reg_dcdc2 {
+	regulator-always-on;
+	regulator-min-microvolt = <700000>;

arch/arm/boot/dts/sun6i-a31s-primo81.dts line 194

Quoted 10 lines
arch/arm/boot/dts/sun6i-a31s-primo81.dts new file +10 -0
+	regulator-max-microvolt = <1320000>;
+	regulator-name = "vdd-cpu";
+};
+
+&reg_dcdc3 {
+	regulator-always-on;
+	regulator-min-microvolt = <700000>;
+	regulator-max-microvolt = <1320000>;
+	regulator-name = "vdd-gpu";
+};

The GPU regulator can probably be disabled...

Quoted 31 lines
arch/arm/boot/dts/sun6i-a31s-primo81.dts new file +31 -0
+&reg_dcdc4 {
+	regulator-always-on;
+	regulator-min-microvolt = <1240000>;
+	regulator-max-microvolt = <1240000>;
+	regulator-name = "vdd-sys-dll";
+};
+
+&reg_dcdc5 {
+	regulator-always-on;
+	regulator-min-microvolt = <1500000>;
+	regulator-max-microvolt = <1500000>;
+	regulator-name = "vcc-dram";
+};
+
+&reg_aldo3 {
+	regulator-always-on;
+	regulator-min-microvolt = <3000000>;
+	regulator-max-microvolt = <3000000>;
+	regulator-name = "avcc";
+};
+
+&reg_dldo1 {
+	regulator-min-microvolt = <3300000>;
+	regulator-max-microvolt = <3300000>;
+	regulator-name = "vcc-wifi";
+};
+
+&reg_eldo3 {
+	regulator-always-on;
+	regulator-min-microvolt = <1200000>;
+	regulator-max-microvolt = <1200000>;

arch/arm/boot/dts/sun6i-a31s-primo81.dts line 236

Quoted 10 lines
arch/arm/boot/dts/sun6i-a31s-primo81.dts new file +10 -0
+	regulator-name = "vcc-mipi-bridge";
+	/* This is used by simplefb LCD display. Add regulator support? */
+};
+
+&reg_dc1sw {
+	regulator-always-on;
+	regulator-min-microvolt = <3000000>;
+	regulator-max-microvolt = <3000000>;
+	regulator-name = "vcc-lcd";
+	/* This is used by simplefb LCD display. Add regulator support? */

Yes.

Thanks,
Maxime

Signature · 10 lines
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150828/40b50101/attachment-0001.sig>
#24 lore raw

PATCH 6/6 ARM: dts: sun6i: Add dts file for MSI Primo81 tablet

Quoted 8 lines · On Fri, 28 Aug 2015 14:38:05 +0200 Maxime Ripard…
Quoted 7 lines · Chen-Yu Tsai

From: Karsten Merker <[email protected]>

The MSI Primo81 is an A31s based tablet, with 1G RAM, 16G NAND, 768x1024 IPS LCD display, mono speaker, 0.3 MP front camera, 2.0 MP rear camera, 3500 mAh battery, gt911 touchscreen, mma8452 accelerometer and rtl8188etv usb wifi. Has "power", "volume+" and "volume-" buttons (both volume buttons are also connected to the UBOOT_SEL pin). The

Actually this part about both volume buttons turned out to be not perfectly accurate. We have discussed it with Chen-Yu Tsai on IRC several days ago and also corrected this information in the wiki:

    http://linux-sunxi.org/index.php?title=MSI_Primo81&diff=14802&oldid=14767

That's just a minor nitpick. And I'm sorry for providing this originally wrong information in the first revision of the patch in the first place.

Quoted 6 lines
Quoted 4 lines

external connectors are represented by MicroSD slot, MiniHDMI, MicroUSB OTG and 3.5mm headphone jack. More details are available at

    http://linux-sunxi.org/MSI_Primo81

Again, not a huge fan of the commit logs URL...

But you are not strongly objecting to it either, right?

AFAIK many people are in favour of having links to the device pages in the linux-sunxi wiki listed somewhere in the commit logs or along with the board maintainer contact information (in U-Boot). Because these pages contain the most relevant and up to date information about the device, various pictures, tips and tricks, etc.

If you are worried about linux-sunxi.org suddenly going down and not coming back, there is also webarchive:

    http://web.archive.org/web/*/http://linux-sunxi.org/MSI_Primo81
Quoted 1 line

This commit log is already fine without it.

This commit log is a nice example of why having a link to the wiki page is a good idea. The errors and omissions in the wiki page can be corrected. The old commit logs can't.

Quoted 129 lines
Quoted 102 lines

USB OTG is enabled in host only mode. AXP221 USB power supply and GPIO support are required for full USB OTG support.

---

Changes since v4:

- Use axp221.dtsi and add all active regulators.
- Enable i2c controllers for capacitive touch panel and accelerometer.
- Mark i2c controller for camera sensors as failed for now.
- Enable USB OTG in host only mode.
- Drop uart0 as this is not tested.
- s/library/file/ in GPL header.

---
 arch/arm/boot/dts/Makefile               |   1 +
 arch/arm/boot/dts/sun6i-a31s-primo81.dts | 255 +++++++++++++++++++++++++++++++
 2 files changed, 256 insertions(+)
 create mode 100644 arch/arm/boot/dts/sun6i-a31s-primo81.dts
arch/arm/boot/dts/Makefile +1 -0
index ada5156fdd49..c87513ed4eb4 100644
@@ -579,6 +579,7 @@ dtb-$(CONFIG_MACH_SUN6I) += \
 	sun6i-a31-m9.dtb \
 	sun6i-a31-mele-a1000g-quad.dtb \
 	sun6i-a31s-cs908.dtb \
+	sun6i-a31s-primo81.dtb \
 	sun6i-a31s-sina31s.dtb
 dtb-$(CONFIG_MACH_SUN7I) += \
 	sun7i-a20-bananapi.dtb \
arch/arm/boot/dts/sun6i-a31s-primo81.dts new file +60 -0
new file mode 100644
index 000000000000..d22befaf363b
@@ -0,0 +1,255 @@
+/*
+ * Copyright 2014 Siarhei Siamashka <[email protected]>
+ * Copyright 2015 Karsten Merker <[email protected]>
+ * Copyright 2015 Chen-Yu Tsai <[email protected]>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This file is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/dts-v1/;
+#include "sun6i-a31s.dtsi"
+#include "sunxi-common-regulators.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/pinctrl/sun4i-a10.h>
+
+/ {
+	model = "MSI Primo81 tablet";
+	compatible = "msi,primo81", "allwinner,sun6i-a31s";
+};
+
+&cpu0 {
+	cpu-supply = <&reg_dcdc2>;
+};

arch/arm/boot/dts/sun6i-a31s-primo81.dts line 70

Quoted 10 lines
arch/arm/boot/dts/sun6i-a31s-primo81.dts new file +10 -0
+
+&ehci0 {
+	/* rtl8188etv wifi is connected here */
+	status = "okay";
+};
+
+&i2c0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c0_pins_a>;
+	/* pull-ups and device VDDIO require AXP221 DLDO3 */

Now that we have AXP221, that can probably be solved, right?

Quoted 14 lines
arch/arm/boot/dts/sun6i-a31s-primo81.dts new file +14 -0
+	status = "failed";
+};
+
+&i2c1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c1_pins_a>;
+	status = "okay";
+
+	ctp at 5d {
+		pinctrl-names = "default";
+		pinctrl-0 = <&gt911_int_primo81>;
+		compatible = "goodix,gt911";
+		reg = <0x5d>;
+		interrupt-parent = <&pio>;
Quoted 8 lines

arch/arm/boot/dts/sun6i-a31s-primo81.dts line 90

Quoted 6 lines
arch/arm/boot/dts/sun6i-a31s-primo81.dts new file +6 -0
+		interrupts = <0 3 IRQ_TYPE_LEVEL_HIGH>; /* PA3 */
+		/*
+		 * The default 0,0 coordinate is at the corner closest to
+		 * the headphone jack. X goes along the long side, while
+		 * Y goes along the short side.
+		 */

I'm not exactly sure what that comment is supposed to be for...

It's probably a human readable comment intended to be read by humans.

Yeah, this information might actually better belong to the wiki page. But then again, this brings us to the question whether we should have a link to the linux-sunxi wiki page somewhere in the dts.

Signature · 2 lines
Best regards,
Siarhei Siamashka
#25 lore raw

PATCH 6/6 ARM: dts: sun6i: Add dts file for MSI Primo81 tablet

Hi,

Quoted 5 lines · Siarhei Siamashka
Quoted 5 lines
Quoted 4 lines

external connectors are represented by MicroSD slot, MiniHDMI, MicroUSB OTG and 3.5mm headphone jack. More details are available at

    http://linux-sunxi.org/MSI_Primo81
Quoted 7 lines
Quoted 1 line

Again, not a huge fan of the commit logs URL...

But you are not strongly objecting to it either, right?

AFAIK many people are in favour of having links to the device pages in the linux-sunxi wiki listed somewhere in the commit logs or along with the board maintainer contact information (in U-Boot).

[citation needed]

And it's a good thing that we're in Linux then.

Quoted 8 lines

Because these pages contain the most relevant and up to date information about the device, various pictures, tips and tricks, etc.

If you are worried about linux-sunxi.org suddenly going down and not coming back, there is also webarchive:

    http://web.archive.org/web/*/http://linux-sunxi.org/MSI_Primo81

If you have to look in web archive to find that page, you can just as well use google in the first place?

Quoted 5 lines
Quoted 1 line

This commit log is already fine without it.

This commit log is a nice example of why having a link to the wiki page is a good idea. The errors and omissions in the wiki page can be corrected. The old commit logs can't.

Which is exactly why we shouldn't have URLs. Because we can't fix them when they become irrelevant.

Plus, quoting SubmittingPatches

"
When you submit or resubmit a patch or patch series, include the complete patch description and justification for it. Don't just say that this is version N of the patch (series). Don't expect the subsystem maintainer to refer back to earlier patch versions or referenced URLs to find the patch description and put that into the patch. I.e., the patch (series) and its description should be self-contained. "

If the patch description is self-contained, there's no need for a URL. And I really don't care about the board description being comprehensive either, so there's nothing to edit.

Quoted 20 lines
Quoted 11 lines
Quoted 11 lines

+&i2c1 {

arch/arm/boot/dts/sun6i-a31s-primo81.dts new file +10 -0
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c1_pins_a>;
+	status = "okay";
+
+	ctp at 5d {
+		pinctrl-names = "default";
+		pinctrl-0 = <&gt911_int_primo81>;
+		compatible = "goodix,gt911";
+		reg = <0x5d>;
+		interrupt-parent = <&pio>;
Quoted 8 lines

arch/arm/boot/dts/sun6i-a31s-primo81.dts line 90

Quoted 6 lines
arch/arm/boot/dts/sun6i-a31s-primo81.dts new file +6 -0
+		interrupts = <0 3 IRQ_TYPE_LEVEL_HIGH>; /* PA3 */
+		/*
+		 * The default 0,0 coordinate is at the corner closest to
+		 * the headphone jack. X goes along the long side, while
+		 * Y goes along the short side.
+		 */

I'm not exactly sure what that comment is supposed to be for...

Quoted 5 lines

It's probably a human readable comment intended to be read by humans.

Yeah, this information might actually better belong to the wiki page. But then again, this brings us to the question whether we should have a link to the linux-sunxi wiki page somewhere in the dts.

I guess I'm not a human then, but a DT is definitely not the place I would look at for such information, and I'm not sure a user that didn't even build his kernel will either.

However, I'm pretty sure that if it was in a wiki page, any search engine would return exactly the info I need, far more reliably than if it was in the kernel source.

Maxime

Signature · 10 lines
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150828/a72d198b/attachment-0001.sig>
#26 lore raw

PATCH 6/6 ARM: dts: sun6i: Add dts file for MSI Primo81 tablet

Quoted 10 lines · On Fri, 28 Aug 2015 23:02:08 +0200 Maxime Ripard…

Hi,

Quoted 7 lines · Siarhei Siamashka
Quoted 6 lines
Quoted 4 lines

external connectors are represented by MicroSD slot, MiniHDMI, MicroUSB OTG and 3.5mm headphone jack. More details are available at

    http://linux-sunxi.org/MSI_Primo81

Again, not a huge fan of the commit logs URL...

Quoted 7 lines
Quoted 5 lines

But you are not strongly objecting to it either, right?

AFAIK many people are in favour of having links to the device pages in the linux-sunxi wiki listed somewhere in the commit logs or along with the board maintainer contact information (in U-Boot).

[citation needed]

Sure. I'm not going to search for every possible post in the mailing lists on this particular subject, but you can check this one for example:

    http://lists.denx.de/pipermail/u-boot/2015-June/215675.html
And also look here:
    https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=0ff1ffd3fe86840c80458ea45c2379014c86b660
Quoted 1 line

And it's a good thing that we're in Linux then.

What do you mean by this?

Quoted 11 lines
Quoted 8 lines

Because these pages contain the most relevant and up to date information about the device, various pictures, tips and tricks, etc.

If you are worried about linux-sunxi.org suddenly going down and not coming back, there is also webarchive:

    http://web.archive.org/web/*/http://linux-sunxi.org/MSI_Primo81

If you have to look in web archive to find that page, you can just as well use google in the first place?

You *don't* have to look in web archive to find that page. That's only an emergency option, just in case if shit hits the fan. Hopefully we are never going to have to resort to this.

Do you mean that the users probably will not think about the webarchive alternative in the case of emergency? If you are really so paranoid, it is possible to provide both the real wiki page url and the webarchive url. Does this solve the problem?

Quoted 8 lines
Quoted 5 lines
Quoted 1 line

This commit log is already fine without it.

This commit log is a nice example of why having a link to the wiki page is a good idea. The errors and omissions in the wiki page can be corrected. The old commit logs can't.

Which is exactly why we shouldn't have URLs. Because we can't fix them when they become irrelevant.

By the very same reasoning, we shouldn't ever have e-mail addresses in the commit messages, documentation or source files. Because you know, they sometimes may change too. I mentioned e-mail addresses here because wiki pages and e-mail addresses both serve a very similar purpose:
that's a contact information.

Quoted 11 lines

Plus, quoting SubmittingPatches

"
When you submit or resubmit a patch or patch series, include the complete patch description and justification for it. Don't just say that this is version N of the patch (series). Don't expect the subsystem maintainer to refer back to earlier patch versions or referenced URLs to find the patch description and put that into the patch. I.e., the patch (series) and its description should be self-contained. "

There is a significant difference between "patch description" mentioned in this quotation (in other words, a commit message) and an external URL with additional useful information.

If you search "http:" substring in the "git log" output, then you can find a lot of various links to external web pages. Most of them are links to the archived discussions in the mailing lists or references to bugtracker issues. AFAIK there is no strict policy about prohibiting URLs in general.

Quoted 3 lines

If the patch description is self-contained, there's no need for a URL. And I really don't care about the board description being comprehensive either, so there's nothing to edit.

Finally looks like we have the real reasoning for stripping out URLs and other extra information: *you* don't care. Basically, that's your whim. And don't get me wrong, that's a perfectly valid explanation.

Quoted 22 lines
Quoted 22 lines
Quoted 11 lines
Quoted 11 lines

+&i2c1 {

arch/arm/boot/dts/sun6i-a31s-primo81.dts new file +10 -0
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c1_pins_a>;
+	status = "okay";
+
+	ctp at 5d {
+		pinctrl-names = "default";
+		pinctrl-0 = <&gt911_int_primo81>;
+		compatible = "goodix,gt911";
+		reg = <0x5d>;
+		interrupt-parent = <&pio>;
Quoted 8 lines

arch/arm/boot/dts/sun6i-a31s-primo81.dts line 90

Quoted 6 lines
arch/arm/boot/dts/sun6i-a31s-primo81.dts new file +6 -0
+		interrupts = <0 3 IRQ_TYPE_LEVEL_HIGH>; /* PA3 */
+		/*
+		 * The default 0,0 coordinate is at the corner closest to
+		 * the headphone jack. X goes along the long side, while
+		 * Y goes along the short side.
+		 */

I'm not exactly sure what that comment is supposed to be for...

It's probably a human readable comment intended to be read by humans.

Quoted 7 lines
Quoted 3 lines

Yeah, this information might actually better belong to the wiki page. But then again, this brings us to the question whether we should have a link to the linux-sunxi wiki page somewhere in the dts.

I guess I'm not a human then, but a DT is definitely not the place I would look at for such information, and I'm not sure a user that didn't even build his kernel will either.

Why not? If the users are troubleshooting problems with the peripherals in their devices (such as the touchscreen in this particular example), why would they not look into a DTS file? It is one of the possible culprits and also a source of valuable information, which may aid debugging.

And if a user doesn't have any device yet, but is only considering to buy something that is well supported by the Linux kernel, then why would (s)he not look though the list of the available DTS files as the first step in this search?

Quoted 3 lines

However, I'm pretty sure that if it was in a wiki page, any search engine would return exactly the info I need, far more reliably than if it was in the kernel source.

That's just a speculation. I'm not sharing your enthusiasm about "any" search engine and about "exactly". And we are talking not about you, but about a wider population of users with varying levels of skills and experience.

Signature · 2 lines
Best regards,
Siarhei Siamashka
#27 lore raw

PATCH 6/6 ARM: dts: sun6i: Add dts file for MSI Primo81 tablet

Quoted 19 lines · Siarhei Siamashka
Quoted 16 lines · On Fri, 28 Aug 2015 23:02:08 +0200 Maxime Ripard…

Hi,

Quoted 12 lines · Siarhei Siamashka
Quoted 6 lines
Quoted 4 lines

external connectors are represented by MicroSD slot, MiniHDMI, MicroUSB OTG and 3.5mm headphone jack. More details are available at

    http://linux-sunxi.org/MSI_Primo81

Again, not a huge fan of the commit logs URL...

But you are not strongly objecting to it either, right?

AFAIK many people are in favour of having links to the device pages in the linux-sunxi wiki listed somewhere in the commit logs or along with the board maintainer contact information (in U-Boot).

Quoted 6 lines
Quoted 1 line

[citation needed]

Sure. I'm not going to search for every possible post in the mailing lists on this particular subject, but you can check this one for example:

    http://lists.denx.de/pipermail/u-boot/2015-June/215675.html

I don't see any external links in the commit logs mentionned, just comments in the defconfig?

Quoted 2 lines

And also look here:

    https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=0ff1ffd3fe86840c80458ea45c2379014c86b660

Yeah, some slipped through. My bad.

Quoted 3 lines
Quoted 1 line

And it's a good thing that we're in Linux then.

What do you mean by this?

You mentionned that U-Boot had such a policy. This is not a U-Boot patch.

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

Because these pages contain the most relevant and up to date information about the device, various pictures, tips and tricks, etc.

If you are worried about linux-sunxi.org suddenly going down and not coming back, there is also webarchive:

Quoted 8 lines
Quoted 4 lines
Quoted 1 line
    http://web.archive.org/web/*/http://linux-sunxi.org/MSI_Primo81

If you have to look in web archive to find that page, you can just as well use google in the first place?

You *don't* have to look in web archive to find that page. That's only an emergency option, just in case if shit hits the fan. Hopefully we are never going to have to resort to this.

And my point is that you don't have to use the commit log to find that page as well.

Quoted 4 lines

Do you mean that the users probably will not think about the webarchive alternative in the case of emergency? If you are really so paranoid, it is possible to provide both the real wiki page url and the webarchive url. Does this solve the problem?

No. My point is that it provides *no* additional information, while adding a fragile resource.

How many times did you turn to the commit log to find the URL of that device on the wiki?

Quoted 32 lines
Quoted 9 lines
Quoted 6 lines
Quoted 2 lines

This commit log is already fine without it.

This commit log is a nice example of why having a link to the wiki page is a good idea. The errors and omissions in the wiki page can be corrected. The old commit logs can't.

Which is exactly why we shouldn't have URLs. Because we can't fix them when they become irrelevant.

By the very same reasoning, we shouldn't ever have e-mail addresses in the commit messages, documentation or source files. Because you know, they sometimes may change too. I mentioned e-mail addresses here because wiki pages and e-mail addresses both serve a very similar purpose:
that's a contact information.

Quoted 11 lines

Plus, quoting SubmittingPatches

"
When you submit or resubmit a patch or patch series, include the complete patch description and justification for it. Don't just say that this is version N of the patch (series). Don't expect the subsystem maintainer to refer back to earlier patch versions or referenced URLs to find the patch description and put that into the patch. I.e., the patch (series) and its description should be self-contained. "

There is a significant difference between "patch description" mentioned in this quotation (in other words, a commit message) and an external URL with additional useful information.

Quoted 5 lines

If you search "http:" substring in the "git log" output, then you can find a lot of various links to external web pages. Most of them are links to the archived discussions in the mailing lists or references to bugtracker issues. AFAIK there is no strict policy about prohibiting URLs in general.

Most of them hosted on kernel.org, which makes a huge difference.

Quoted 38 lines
Quoted 3 lines

If the patch description is self-contained, there's no need for a URL. And I really don't care about the board description being comprehensive either, so there's nothing to edit.

Finally looks like we have the real reasoning for stripping out URLs and other extra information: *you* don't care. Basically, that's your whim. And don't get me wrong, that's a perfectly valid explanation.

Quoted 22 lines
Quoted 22 lines
Quoted 11 lines
Quoted 11 lines

+&i2c1 {

arch/arm/boot/dts/sun6i-a31s-primo81.dts new file +10 -0
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c1_pins_a>;
+	status = "okay";
+
+	ctp at 5d {
+		pinctrl-names = "default";
+		pinctrl-0 = <&gt911_int_primo81>;
+		compatible = "goodix,gt911";
+		reg = <0x5d>;
+		interrupt-parent = <&pio>;
Quoted 8 lines

arch/arm/boot/dts/sun6i-a31s-primo81.dts line 90

Quoted 6 lines
arch/arm/boot/dts/sun6i-a31s-primo81.dts new file +6 -0
+		interrupts = <0 3 IRQ_TYPE_LEVEL_HIGH>; /* PA3 */
+		/*
+		 * The default 0,0 coordinate is at the corner closest to
+		 * the headphone jack. X goes along the long side, while
+		 * Y goes along the short side.
+		 */

I'm not exactly sure what that comment is supposed to be for...

It's probably a human readable comment intended to be read by humans.

Quoted 7 lines
Quoted 3 lines

Yeah, this information might actually better belong to the wiki page. But then again, this brings us to the question whether we should have a link to the linux-sunxi wiki page somewhere in the dts.

I guess I'm not a human then, but a DT is definitely not the place I would look at for such information, and I'm not sure a user that didn't even build his kernel will either.

Quoted 5 lines

Why not? If the users are troubleshooting problems with the peripherals in their devices (such as the touchscreen in this particular example), why would they not look into a DTS file? It is one of the possible culprits and also a source of valuable information, which may aid debugging.

Because it comes bundled as a binary in the distributions, without this comment? And since the code isn't indexed, it would be buried somewhere any random user wouldn't even know the existence?

Quoted 4 lines

And if a user doesn't have any device yet, but is only considering to buy something that is well supported by the Linux kernel, then why would (s)he not look though the list of the available DTS files as the first step in this search?

How is that relevant? The fact that X and Y are starting on that particular corner of the screen really reflects on the quality of the support in Linux?

Maxime

Signature · 10 lines
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150910/b90cbd56/attachment.sig>