diff mbox

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

Message ID 1440755679-8266-7-git-send-email-wens@csie.org (mailing list archive)
State New, archived
Headers show

Commit Message

Chen-Yu Tsai Aug. 28, 2015, 9:54 a.m. UTC
From: Karsten Merker <merker@debian.org>

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.

Signed-off-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
Signed-off-by: Karsten Merker <merker@debian.org>
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---

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

Comments

Maxime Ripard Aug. 28, 2015, 12:38 p.m. UTC | #1
On Fri, Aug 28, 2015 at 05:54:39PM +0800, Chen-Yu Tsai wrote:
> From: Karsten Merker <merker@debian.org>
> 
> 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.

> 
> USB OTG is enabled in host only mode. AXP221 USB power supply and
> GPIO support are required for full USB OTG support.
> 
> Signed-off-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
> Signed-off-by: Karsten Merker <merker@debian.org>
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> ---
> 
> 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
> 
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index ada5156fdd49..c87513ed4eb4 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -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 \
> diff --git a/arch/arm/boot/dts/sun6i-a31s-primo81.dts b/arch/arm/boot/dts/sun6i-a31s-primo81.dts
> new file mode 100644
> index 000000000000..d22befaf363b
> --- /dev/null
> +++ b/arch/arm/boot/dts/sun6i-a31s-primo81.dts
> @@ -0,0 +1,255 @@
> +/*
> + * Copyright 2014 Siarhei Siamashka <siarhei.siamashka@gmail.com>
> + * Copyright 2015 Karsten Merker <merker@debian.org>
> + * Copyright 2015 Chen-Yu Tsai <wens@csie.org>
> + *
> + * 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>;
> +};
> +
> +&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?

> +	status = "failed";
> +};
> +
> +&i2c1 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&i2c1_pins_a>;
> +	status = "okay";
> +
> +	ctp@5d {
> +		pinctrl-names = "default";
> +		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...

> +	};
> +};
> +
> +&i2c2 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&i2c2_pins_a>;
> +	status = "okay";
> +
> +	accelerometer@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@158 {
> +		label = "Volume Up";
> +		linux,code = <KEY_VOLUMEUP>;
> +		channel = <0>;
> +		voltage = <158730>;
> +	};
> +
> +	button@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@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@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@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@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>;
> +	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...

> +&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>;
> +	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
Siarhei Siamashka Aug. 28, 2015, 1:31 p.m. UTC | #2
On Fri, 28 Aug 2015 14:38:05 +0200
Maxime Ripard <maxime.ripard@free-electrons.com> wrote:

> On Fri, Aug 28, 2015 at 05:54:39PM +0800, Chen-Yu Tsai wrote:
> > From: Karsten Merker <merker@debian.org>
> > 
> > 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.

> > 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

> 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.

> > 
> > USB OTG is enabled in host only mode. AXP221 USB power supply and
> > GPIO support are required for full USB OTG support.
> > 
> > Signed-off-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
> > Signed-off-by: Karsten Merker <merker@debian.org>
> > Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> > ---
> > 
> > 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
> > 
> > diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> > index ada5156fdd49..c87513ed4eb4 100644
> > --- a/arch/arm/boot/dts/Makefile
> > +++ b/arch/arm/boot/dts/Makefile
> > @@ -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 \
> > diff --git a/arch/arm/boot/dts/sun6i-a31s-primo81.dts b/arch/arm/boot/dts/sun6i-a31s-primo81.dts
> > new file mode 100644
> > index 000000000000..d22befaf363b
> > --- /dev/null
> > +++ b/arch/arm/boot/dts/sun6i-a31s-primo81.dts
> > @@ -0,0 +1,255 @@
> > +/*
> > + * Copyright 2014 Siarhei Siamashka <siarhei.siamashka@gmail.com>
> > + * Copyright 2015 Karsten Merker <merker@debian.org>
> > + * Copyright 2015 Chen-Yu Tsai <wens@csie.org>
> > + *
> > + * 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>;
> > +};
> > +
> > +&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?
> 
> > +	status = "failed";
> > +};
> > +
> > +&i2c1 {
> > +	pinctrl-names = "default";
> > +	pinctrl-0 = <&i2c1_pins_a>;
> > +	status = "okay";
> > +
> > +	ctp@5d {
> > +		pinctrl-names = "default";
> > +		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...

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.
Maxime Ripard Aug. 28, 2015, 9:02 p.m. UTC | #3
Hi,

On Fri, Aug 28, 2015 at 04:31:44PM +0300, Siarhei Siamashka wrote:
> > > 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).

[citation needed]

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

> 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?

> > 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.

> > > +&i2c1 {
> > > +	pinctrl-names = "default";
> > > +	pinctrl-0 = <&i2c1_pins_a>;
> > > +	status = "okay";
> > > +
> > > +	ctp@5d {
> > > +		pinctrl-names = "default";
> > > +		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...
> 
> 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
Siarhei Siamashka Aug. 29, 2015, 4:43 a.m. UTC | #4
On Fri, 28 Aug 2015 23:02:08 +0200
Maxime Ripard <maxime.ripard@free-electrons.com> wrote:

> Hi,
> 
> On Fri, Aug 28, 2015 at 04:31:44PM +0300, Siarhei Siamashka wrote:
> > > > 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).
> 
> [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

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

What do you mean by this?

> > 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?

> > > 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.

> 
> 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.

> 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.
 
> > > > +&i2c1 {
> > > > +	pinctrl-names = "default";
> > > > +	pinctrl-0 = <&i2c1_pins_a>;
> > > > +	status = "okay";
> > > > +
> > > > +	ctp@5d {
> > > > +		pinctrl-names = "default";
> > > > +		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...
> > 
> > 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.

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?

> 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.
Maxime Ripard Sept. 10, 2015, 1:09 p.m. UTC | #5
On Sat, Aug 29, 2015 at 07:43:03AM +0300, Siarhei Siamashka wrote:
> On Fri, 28 Aug 2015 23:02:08 +0200
> Maxime Ripard <maxime.ripard@free-electrons.com> wrote:
> 
> > Hi,
> > 
> > On Fri, Aug 28, 2015 at 04:31:44PM +0300, Siarhei Siamashka wrote:
> > > > > 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).
> > 
> > [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?

> And also look here:
>     https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=0ff1ffd3fe86840c80458ea45c2379014c86b660

Yeah, some slipped through. My bad.

> > 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.

> > > 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.

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

> 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?

> 
> > > > 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.
> 
> > 
> > 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.

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

> > 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.
>  
> > > > > +&i2c1 {
> > > > > +	pinctrl-names = "default";
> > > > > +	pinctrl-0 = <&i2c1_pins_a>;
> > > > > +	status = "okay";
> > > > > +
> > > > > +	ctp@5d {
> > > > > +		pinctrl-names = "default";
> > > > > +		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...
> > > 
> > > 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.
> 
> 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?

> 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
Karsten Merker Sept. 12, 2015, 3:30 p.m. UTC | #6
On Thu, Sep 10, 2015 at 03:09:17PM +0200, Maxime Ripard wrote:
> On Sat, Aug 29, 2015 at 07:43:03AM +0300, Siarhei Siamashka wrote:
> > Maxime Ripard <maxime.ripard@free-electrons.com> wrote:

> > > > > 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).

Hello,

just my 2 cents: I don't have particular strong feelings about
including or not including the URL - I can live without the URL
in the commit message, but I find it useful additional background
information and I don't think that the possibility that it might
become invalid sometime in the future should be a reason to
exclude it.  A commit log always describes the state of affairs
at the time of the commit - that's not only true for URLs but
also for other information.  Kernel-internal interfaces may
change over time as well and nobody would object to a commit log
referring to information about a current kernel interface just
because it might change in the future.

> > > > > > +&i2c1 {
> > > > > > +	pinctrl-names = "default";
> > > > > > +	pinctrl-0 = <&i2c1_pins_a>;
> > > > > > +	status = "okay";
> > > > > > +
> > > > > > +	ctp@5d {
> > > > > > +		pinctrl-names = "default";
> > > > > > +		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...
> > > > 
> > > > 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.

Well, people are different - I would look into the dts, and in
fact have done so in other cases when trying to find out about
the hardware setup of certain systems.

You have in the past also asked me to add comments targeted at
humans to the dts, so I really do not understand why you find
this comment, which clearly adds useful information about the
hardware layout, so objectionable.

You are the sunxi maintainer, so it is of course your choice what
you accept and what not - if you explicitly declare that you
don't want any URLs and comments with additional information in
the dts, that's the way to do it, but I really have difficulties
in understanding your position.

Regards,
Karsten
diff mbox

Patch

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index ada5156fdd49..c87513ed4eb4 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -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 \
diff --git a/arch/arm/boot/dts/sun6i-a31s-primo81.dts b/arch/arm/boot/dts/sun6i-a31s-primo81.dts
new file mode 100644
index 000000000000..d22befaf363b
--- /dev/null
+++ b/arch/arm/boot/dts/sun6i-a31s-primo81.dts
@@ -0,0 +1,255 @@ 
+/*
+ * Copyright 2014 Siarhei Siamashka <siarhei.siamashka@gmail.com>
+ * Copyright 2015 Karsten Merker <merker@debian.org>
+ * Copyright 2015 Chen-Yu Tsai <wens@csie.org>
+ *
+ * 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>;
+};
+
+&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 */
+	status = "failed";
+};
+
+&i2c1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c1_pins_a>;
+	status = "okay";
+
+	ctp@5d {
+		pinctrl-names = "default";
+		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.
+		 */
+	};
+};
+
+&i2c2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c2_pins_a>;
+	status = "okay";
+
+	accelerometer@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@158 {
+		label = "Volume Up";
+		linux,code = <KEY_VOLUMEUP>;
+		channel = <0>;
+		voltage = <158730>;
+	};
+
+	button@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@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@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@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@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>;
+	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 = <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>;
+	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? */
+};
+
+&reg_dc5ldo {
+	regulator-always-on;
+	regulator-min-microvolt = <1100000>;
+	regulator-max-microvolt = <1100000>;
+	regulator-name = "vcc-cpus"; /* This is an educated guess */
+};
+
+&usb_otg {
+	/* otg support requires support for AXP221 usb-power-supply and GPIO */
+	dr_mode = "host";
+	status = "okay";
+};
+
+&usbphy {
+	status = "okay";
+	usb1_vbus-supply = <&reg_dldo1>;
+};