[linux-sunxi] [PATCH v2 1/3] ARM: dts: sun5i: Enable USB DRC on A10s OLinuxIno Micro

2015-07-31 Thread Hans de Goede
Enable the otg/drc usb controller on the A10s OLinuxIno Micro.

Note the A10s OlinuxIno Micro always has some voltage on its otg power
pin, even if the usb-vbus0-regulator is disabled, the leaked voltage is
enough to make vbus-det always report 1, so we do not use vbus-det on
this board.

Signed-off-by: Hans de Goede hdego...@redhat.com
---
Changes in v2:
-Address usb0_vbus_pin_a node by reference instead of by full path
---
 arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts | 30 +++-
 1 file changed, 29 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts 
b/arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts
index 7b26e17..5a422c1 100644
--- a/arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts
+++ b/arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts
@@ -196,6 +196,10 @@
status = okay;
 };
 
+otg_sram {
+   status = okay;
+};
+
 pio {
mmc0_cd_pin_olinuxino_micro: mmc0_cd_pin@0 {
allwinner,pins = PG1;
@@ -224,6 +228,18 @@
allwinner,drive = SUN4I_PINCTRL_10_MA;
allwinner,pull = SUN4I_PINCTRL_NO_PULL;
};
+
+   usb0_id_detect_pin: usb0_id_detect_pin@0 {
+   allwinner,pins = PG12;
+   allwinner,function = gpio_in;
+   allwinner,drive = SUN4I_PINCTRL_10_MA;
+   allwinner,pull = SUN4I_PINCTRL_PULL_UP;
+   };
+};
+
+reg_usb0_vbus {
+   gpio = pio 6 11 GPIO_ACTIVE_HIGH; /* PG11 */
+   status = okay;
 };
 
 reg_usb1_vbus {
@@ -250,8 +266,20 @@
status = okay;
 };
 
+usb_otg {
+   dr_mode = otg;
+   status = okay;
+};
+
+usb0_vbus_pin_a {
+   allwinner,pins = PG11;
+};
+
 usbphy {
+   pinctrl-names = default;
+   pinctrl-0 = usb0_id_detect_pin;
+   usb0_id_det-gpio = pio 6 12 GPIO_ACTIVE_HIGH; /* PG12 */
+   usb0_vbus-supply = reg_usb0_vbus;
usb1_vbus-supply = reg_usb1_vbus;
status = okay;
 };
-
-- 
2.4.3

-- 
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[linux-sunxi] [PATCH v2 3/3] ARM: dts: sun8i: Enable USB DRC on Ippo Q8H-A33 tablet

2015-07-31 Thread Hans de Goede
Enable the otg/drc usb controller on the Ippo Q8H-A33 tablet, for now it
is enabled in host-only mode, because true OTG support requires support
for detecting and enabling Vbus through the axp221 pmic.

For this to work the Vbus on the port must be enabled by u-boot,
or a powered hub must be used.

Signed-off-by: Hans de Goede hdego...@redhat.com
---
Changes in v2:
-Add a FIXME comment to the usb_otg block in the dts, pointing out the need
 to add full otg support once we get axp22x pmic support for a33 based devices
---
 arch/arm/boot/dts/sun8i-a33-ippo-q8h-v1.2.dts | 15 +++
 1 file changed, 15 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-a33-ippo-q8h-v1.2.dts 
b/arch/arm/boot/dts/sun8i-a33-ippo-q8h-v1.2.dts
index 8bb75ee..a438975 100644
--- a/arch/arm/boot/dts/sun8i-a33-ippo-q8h-v1.2.dts
+++ b/arch/arm/boot/dts/sun8i-a33-ippo-q8h-v1.2.dts
@@ -116,3 +116,18 @@
pinctrl-0 = r_uart_pins_a;
status = okay;
 };
+
+/*
+ * FIXME for now we only support host mode and rely on u-boot to have
+ * turned on Vbus which is controlled by the axp223 pmic on the board.
+ *
+ * Once we have axp223 support we should switch to fully supporting otg.
+ */
+usb_otg {
+   dr_mode = host;
+   status = okay;
+};
+
+usbphy {
+   status = okay;
+};
-- 
2.4.3

-- 
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[linux-sunxi] [PATCH v2 2/3] ARM: dts: sun5i: Enable USB DRC on A13 OLinuxIno

2015-07-31 Thread Hans de Goede
From: Mark Janssen m...@sig-io.nl

Enable the otg/drc usb controller on the A13 OLinuxIno.

Signed-off-by: Mark Janssen m...@sig-io.nl
Signed-off-by: Hans de Goede hdego...@redhat.com
---
Changes in v2:
-Address usb0_vbus_pin_a node by reference instead of by full path
---
 arch/arm/boot/dts/sun5i-a13-olinuxino.dts | 37 +++
 1 file changed, 37 insertions(+)

diff --git a/arch/arm/boot/dts/sun5i-a13-olinuxino.dts 
b/arch/arm/boot/dts/sun5i-a13-olinuxino.dts
index 4232400..b3c234c 100644
--- a/arch/arm/boot/dts/sun5i-a13-olinuxino.dts
+++ b/arch/arm/boot/dts/sun5i-a13-olinuxino.dts
@@ -159,6 +159,10 @@
status = okay;
 };
 
+otg_sram {
+   status = okay;
+};
+
 pio {
mmc0_cd_pin_olinuxino: mmc0_cd_pin@0 {
allwinner,pins = PG0;
@@ -174,6 +178,20 @@
allwinner,pull = SUN4I_PINCTRL_NO_PULL;
};
 
+   usb0_id_detect_pin: usb0_id_detect_pin@0 {
+   allwinner,pins = PG2;
+   allwinner,function = gpio_in;
+   allwinner,drive = SUN4I_PINCTRL_10_MA;
+   allwinner,pull = SUN4I_PINCTRL_PULL_UP;
+   };
+
+   usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 {
+   allwinner,pins = PG1;
+   allwinner,function = gpio_in;
+   allwinner,drive = SUN4I_PINCTRL_10_MA;
+   allwinner,pull = SUN4I_PINCTRL_PULL_DOWN;
+   };
+
usb1_vbus_pin_olinuxino: usb1_vbus_pin@0 {
allwinner,pins = PG11;
allwinner,function = gpio_out;
@@ -182,6 +200,11 @@
};
 };
 
+reg_usb0_vbus {
+   status = okay;
+   gpio = pio 6 12 GPIO_ACTIVE_HIGH; /* PG12 */
+};
+
 reg_usb1_vbus {
pinctrl-0 = usb1_vbus_pin_olinuxino;
gpio = pio 6 11 GPIO_ACTIVE_HIGH;
@@ -194,7 +217,21 @@
status = okay;
 };
 
+usb_otg {
+   dr_mode = otg;
+   status = okay;
+};
+
+usb0_vbus_pin_a {
+   allwinner,pins = PG12;
+};
+
 usbphy {
+   pinctrl-names = default;
+   pinctrl-0 = usb0_id_detect_pin, usb0_vbus_detect_pin;
+   usb0_id_det-gpio = pio 6 2 GPIO_ACTIVE_HIGH; /* PG2 */
+   usb0_vbus_det-gpio = pio 6 1 GPIO_ACTIVE_HIGH; /* PG1 */
+   usb0_vbus-supply = reg_usb0_vbus;
usb1_vbus-supply = reg_usb1_vbus;
status = okay;
 };
-- 
2.4.3

-- 
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] [PATCH v2 1/3] ARM: dts: sun5i: Enable USB DRC on A10s OLinuxIno Micro

2015-07-31 Thread Michal Suchanek
Hello,

On 31 July 2015 at 14:53, Hans de Goede hdego...@redhat.com wrote:
 Enable the otg/drc usb controller on the A10s OLinuxIno Micro.

 Note the A10s OlinuxIno Micro always has some voltage on its otg power
 pin, even if the usb-vbus0-regulator is disabled, the leaked voltage is
 enough to make vbus-det always report 1, so we do not use vbus-det on
 this board.

What board revision do you have?

Also does this not go down when you connect a device which draws power?

It is useless for self-powered device detection, though :-s

Still the Olinuxino is not battery powered normally so powering the
bus at all times is probably ok.

Thanks

Michal

-- 
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] Re: [PATCH 5/5] ARM: dts: sun7i: Add dts file for Wits Pro A20 DKT

2015-07-31 Thread Hans de Goede

Hi,

On 31-07-15 12:25, Chen-Yu Tsai wrote:

On Fri, Jul 31, 2015 at 6:20 PM, Maxime Ripard
maxime.rip...@free-electrons.com wrote:

On Fri, Jul 31, 2015 at 10:59:54AM +0200, Hans de Goede wrote:

From: Jelle de Jong jelledej...@powercraft.nl

The Wits Pro A20 DKT is an A20 Development KiT with 1G RAM, 4G NAND,
sdio wifi, 1Gbit ethernet, 1024x768 lcd screen with ft5x_ts touchscreen
and a ton of IO connectors.

Note there seem to be multiple sdcard slots on the board (4 in total), but
other then mmc0 none of these are hooked up by default, there is a ton of
dip-switches which likely allow hooking some of these up, but the
documentation of the board only describes the use of a fraction of them,
so for now we only support mmc0.

Signed-off-by: Jelle de Jong jelledej...@powercraft.nl
Signed-off-by: Hans de Goede hdego...@redhat.com
---
Also see: http://www.merrii.com/en/pla_d.asp?id=163
---
  arch/arm/boot/dts/Makefile   |   3 +-
  arch/arm/boot/dts/sun7i-a20-wits-pro-a20-dkt.dts | 209 +++
  2 files changed, 211 insertions(+), 1 deletion(-)
  create mode 100644 arch/arm/boot/dts/sun7i-a20-wits-pro-a20-dkt.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index f830e1f..151a413 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -595,7 +595,8 @@ dtb-$(CONFIG_MACH_SUN7I) += \
   sun7i-a20-orangepi-mini.dtb \
   sun7i-a20-pcduino3.dtb \
   sun7i-a20-pcduino3-nano.dtb \
- sun7i-a20-wexler-tab7200.dtb
+ sun7i-a20-wexler-tab7200.dtb \
+sun7i-a20-wits-pro-a20-dkt.dtb


The indentation is off.


  dtb-$(CONFIG_MACH_SUN8I) += \
   sun8i-a23-evb.dtb \
   sun8i-a23-ippo-q8h-v5.dtb \
diff --git a/arch/arm/boot/dts/sun7i-a20-wits-pro-a20-dkt.dts 
b/arch/arm/boot/dts/sun7i-a20-wits-pro-a20-dkt.dts
new file mode 100644
index 000..db4d32c
--- /dev/null
+++ b/arch/arm/boot/dts/sun7i-a20-wits-pro-a20-dkt.dts
@@ -0,0 +1,209 @@
+/*
+ * Copyright 2015 Jelle de Jong jelledej...@powercraft.nl
+ *
+ * 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 sun7i-a20.dtsi
+#include sunxi-common-regulators.dtsi
+
+#include dt-bindings/gpio/gpio.h
+#include dt-bindings/input/input.h
+#include dt-bindings/interrupt-controller/irq.h
+
+/ {
+ model = Wits Pro A20 DKT;
+ compatible = wits,pro-a20-dkt, allwinner,sun7i-a20;
+
+ aliases {
+ serial0 = uart0;
+ };
+
+ chosen {
+ stdout-path = serial0:115200n8;
+ };
+
+ reg_vmmc3: vmmc3 {
+ compatible = regulator-fixed;
+ pinctrl-names = default;
+ pinctrl-0 = vmmc3_pin_ap6xxx_wl_regon;
+ regulator-name = vmmc3;
+ regulator-min-microvolt = 330;
+ regulator-max-microvolt = 330;
+ enable-active-high;
+ gpio = pio 7 9 GPIO_ACTIVE_HIGH; /* PH9 */
+ };


It's not really vmmc. The reg_on stuff is actually more of a reset
line: when tied to VCC, the WLAN part of the chip and its regulators
are enabled, while when it's tied to 

[linux-sunxi] Re: [PATCH v2 3/3] ARM: dts: sun8i: Enable USB DRC on Ippo Q8H-A33 tablet

2015-07-31 Thread Maxime Ripard
On Fri, Jul 31, 2015 at 02:53:38PM +0200, Hans de Goede wrote:
 Enable the otg/drc usb controller on the Ippo Q8H-A33 tablet, for now it
 is enabled in host-only mode, because true OTG support requires support
 for detecting and enabling Vbus through the axp221 pmic.
 
 For this to work the Vbus on the port must be enabled by u-boot,
 or a powered hub must be used.
 
 Signed-off-by: Hans de Goede hdego...@redhat.com

Applied, thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

-- 
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: Digital signature


[linux-sunxi] Re: [PATCH v2 1/2] ARM: dts: sun5i: hsg-h702: Enable side volume buttons with LRADC

2015-07-31 Thread Maxime Ripard
1;3803;0c
On Fri, Jul 31, 2015 at 10:40:58PM +0800, Chen-Yu Tsai wrote:
 The tablet has volume up/down buttons on the side, connected to the LRADC.
 
 Signed-off-by: Chen-Yu Tsai w...@csie.org

Applied, thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

-- 
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: Digital signature


[linux-sunxi] Re: [PATCH v2 2/2] ARM: multi_v7_defconfig: Enable Allwinner P2WI, PWM, DMA_SUN6I, cryptodev

2015-07-31 Thread Maxime Ripard
On Fri, Jul 31, 2015 at 10:56:42PM +0800, Chen-Yu Tsai wrote:
 Enable drivers for Allwinner P2WI, PWM, cryptodev (Security System) and
 sun6i DMA engine. Also enable EXTCON as PHY_SUN4I_USB depends on it.
 
 Signed-off-by: Chen-Yu Tsai w...@csie.org
 ---
  arch/arm/configs/multi_v7_defconfig | 5 +
  1 file changed, 5 insertions(+)
 
 diff --git a/arch/arm/configs/multi_v7_defconfig 
 b/arch/arm/configs/multi_v7_defconfig
 index 5fd8df6f50ea..5eaf39ce134e 100644
 --- a/arch/arm/configs/multi_v7_defconfig
 +++ b/arch/arm/configs/multi_v7_defconfig
 @@ -301,6 +301,7 @@ CONFIG_I2C_S3C2410=y
  CONFIG_I2C_SH_MOBILE=y
  CONFIG_I2C_SIRF=y
  CONFIG_I2C_ST=y
 +CONFIG_I2C_SUN6I_P2WI=y
  CONFIG_I2C_TEGRA=y
  CONFIG_I2C_XILINX=y
  CONFIG_I2C_RCAR=y
 @@ -587,6 +588,7 @@ CONFIG_IMX_DMA=y
  CONFIG_MXS_DMA=y
  CONFIG_DMA_OMAP=y
  CONFIG_XILINX_VDMA=y
 +CONFIG_DMA_SUN6I=y
  CONFIG_STAGING=y
  CONFIG_SENSORS_ISL29018=y
  CONFIG_SENSORS_ISL29028=y
 @@ -612,6 +614,7 @@ CONFIG_TEGRA_IOMMU_SMMU=y
  CONFIG_PM_DEVFREQ=y
  CONFIG_ARM_TEGRA_DEVFREQ=m
  CONFIG_MEMORY=y
 +CONFIG_EXTCON=y
  CONFIG_TI_AEMIF=y
  CONFIG_IIO=y
  CONFIG_AT91_ADC=m
 @@ -622,6 +625,7 @@ CONFIG_PWM_ATMEL=m
  CONFIG_PWM_ATMEL_TCB=m
  CONFIG_PWM_RENESAS_TPU=y
  CONFIG_PWM_SAMSUNG=m
 +CONFIG_PWM_SUN4I=y
  CONFIG_PWM_TEGRA=y
  CONFIG_PWM_VT8500=y
  CONFIG_PHY_HIX5HD2_SATA=y
 @@ -660,6 +664,7 @@ CONFIG_LOCKUP_DETECTOR=y
  CONFIG_CRYPTO_DEV_TEGRA_AES=y
  CONFIG_CPUFREQ_DT=y
  CONFIG_KEYSTONE_IRQ=y
 +CONFIG_CRYPTO_DEV_SUN4I_SS=m

Why do you enable it as a module?

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

-- 
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: Digital signature


[linux-sunxi] Re: [PATCH v2 2/2] ARM: multi_v7_defconfig: Enable Allwinner P2WI, PWM, DMA_SUN6I, cryptodev

2015-07-31 Thread Maxime Ripard
On Fri, Jul 31, 2015 at 10:56:42PM +0800, Chen-Yu Tsai wrote:
 Enable drivers for Allwinner P2WI, PWM, cryptodev (Security System) and
 sun6i DMA engine. Also enable EXTCON as PHY_SUN4I_USB depends on it.
 
 Signed-off-by: Chen-Yu Tsai w...@csie.org

Merged, thanks!

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

-- 
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: Digital signature


[linux-sunxi] Re: [PATCH v2 2/2] ARM: multi_v7_defconfig: Enable Allwinner P2WI, PWM, DMA_SUN6I, cryptodev

2015-07-31 Thread Chen-Yu Tsai
On Sat, Aug 1, 2015 at 1:01 AM, Maxime Ripard
maxime.rip...@free-electrons.com wrote:
 On Fri, Jul 31, 2015 at 10:56:42PM +0800, Chen-Yu Tsai wrote:
 Enable drivers for Allwinner P2WI, PWM, cryptodev (Security System) and
 sun6i DMA engine. Also enable EXTCON as PHY_SUN4I_USB depends on it.

 Signed-off-by: Chen-Yu Tsai w...@csie.org
 ---
  arch/arm/configs/multi_v7_defconfig | 5 +
  1 file changed, 5 insertions(+)

 diff --git a/arch/arm/configs/multi_v7_defconfig 
 b/arch/arm/configs/multi_v7_defconfig
 index 5fd8df6f50ea..5eaf39ce134e 100644
 --- a/arch/arm/configs/multi_v7_defconfig
 +++ b/arch/arm/configs/multi_v7_defconfig
 @@ -301,6 +301,7 @@ CONFIG_I2C_S3C2410=y
  CONFIG_I2C_SH_MOBILE=y
  CONFIG_I2C_SIRF=y
  CONFIG_I2C_ST=y
 +CONFIG_I2C_SUN6I_P2WI=y
  CONFIG_I2C_TEGRA=y
  CONFIG_I2C_XILINX=y
  CONFIG_I2C_RCAR=y
 @@ -587,6 +588,7 @@ CONFIG_IMX_DMA=y
  CONFIG_MXS_DMA=y
  CONFIG_DMA_OMAP=y
  CONFIG_XILINX_VDMA=y
 +CONFIG_DMA_SUN6I=y
  CONFIG_STAGING=y
  CONFIG_SENSORS_ISL29018=y
  CONFIG_SENSORS_ISL29028=y
 @@ -612,6 +614,7 @@ CONFIG_TEGRA_IOMMU_SMMU=y
  CONFIG_PM_DEVFREQ=y
  CONFIG_ARM_TEGRA_DEVFREQ=m
  CONFIG_MEMORY=y
 +CONFIG_EXTCON=y
  CONFIG_TI_AEMIF=y
  CONFIG_IIO=y
  CONFIG_AT91_ADC=m
 @@ -622,6 +625,7 @@ CONFIG_PWM_ATMEL=m
  CONFIG_PWM_ATMEL_TCB=m
  CONFIG_PWM_RENESAS_TPU=y
  CONFIG_PWM_SAMSUNG=m
 +CONFIG_PWM_SUN4I=y
  CONFIG_PWM_TEGRA=y
  CONFIG_PWM_VT8500=y
  CONFIG_PHY_HIX5HD2_SATA=y
 @@ -660,6 +664,7 @@ CONFIG_LOCKUP_DETECTOR=y
  CONFIG_CRYPTO_DEV_TEGRA_AES=y
  CONFIG_CPUFREQ_DT=y
  CONFIG_KEYSTONE_IRQ=y
 +CONFIG_CRYPTO_DEV_SUN4I_SS=m

It seems everything under crypto that is enabled and can be built as
a module (i.e. no one selects it as builtin) is enabled as a module.
I just followed everything else.

Hope this helps.


ChenYu

-- 
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] Re: forwarding a bug: cpufreq missing in debian stable on a cuibeboard

2015-07-31 Thread Maxime Ripard
On Fri, Jul 24, 2015 at 03:23:33PM +0200, Hans de Goede wrote:
 Hi,
 
 On 24-07-15 15:16, Maxime Ripard wrote:
 On Fri, Jul 24, 2015 at 02:58:31PM +0200, Hans de Goede wrote:
 There is slightly more to it then those 5 lines, but yes we should enable
 voltage scaling on more boards. This mostly requires someone to simply
 just do the work.
 
 I've a workshop on dts this weekend at our localhacker space and the plan
 is for the people attending to get some handson experience by them doing
 this work (amongst other things)  :)
 
 While I agree with you on the fact that more board needs to have the
 regulators enabled, I really don't think that making some newbies
 doing it without any schematics (and boards I guess?)
 
 They will only be writing patches for boards which I have, and the patches
 will be tested on the actual boards before submitting them upstream.
 
 I will be collecting and double checking all patches before sending them
 to you.
 
 I will let you know if they blow up any boards :)  But I do not really
 expect that to happen.
 
  is a good thing
 when it comes to something that can permanently damage a board.
 
 I'd expect that such changes would be carefully done and tested before
 being submitted.
 
 And they will be, see above.

Perfect then :)

My point was simply that we shouldn't have automated changes for this,
just for the sake of having regulators for all the boards.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

-- 
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: Digital signature


Re: [linux-sunxi] Re: [PATCH 5/5] ARM: dts: sun7i: Add dts file for Wits Pro A20 DKT

2015-07-31 Thread Chen-Yu Tsai
On Sat, Aug 1, 2015 at 12:13 AM, Hans de Goede hdego...@redhat.com wrote:
 Hi,


 On 31-07-15 12:25, Chen-Yu Tsai wrote:

 On Fri, Jul 31, 2015 at 6:20 PM, Maxime Ripard
 maxime.rip...@free-electrons.com wrote:

 On Fri, Jul 31, 2015 at 10:59:54AM +0200, Hans de Goede wrote:

 From: Jelle de Jong jelledej...@powercraft.nl

 The Wits Pro A20 DKT is an A20 Development KiT with 1G RAM, 4G NAND,
 sdio wifi, 1Gbit ethernet, 1024x768 lcd screen with ft5x_ts touchscreen
 and a ton of IO connectors.

 Note there seem to be multiple sdcard slots on the board (4 in total),
 but
 other then mmc0 none of these are hooked up by default, there is a ton
 of
 dip-switches which likely allow hooking some of these up, but the
 documentation of the board only describes the use of a fraction of them,
 so for now we only support mmc0.

 Signed-off-by: Jelle de Jong jelledej...@powercraft.nl
 Signed-off-by: Hans de Goede hdego...@redhat.com
 ---
 Also see: http://www.merrii.com/en/pla_d.asp?id=163
 ---
   arch/arm/boot/dts/Makefile   |   3 +-
   arch/arm/boot/dts/sun7i-a20-wits-pro-a20-dkt.dts | 209
 +++
   2 files changed, 211 insertions(+), 1 deletion(-)
   create mode 100644 arch/arm/boot/dts/sun7i-a20-wits-pro-a20-dkt.dts

 diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
 index f830e1f..151a413 100644
 --- a/arch/arm/boot/dts/Makefile
 +++ b/arch/arm/boot/dts/Makefile
 @@ -595,7 +595,8 @@ dtb-$(CONFIG_MACH_SUN7I) += \
sun7i-a20-orangepi-mini.dtb \
sun7i-a20-pcduino3.dtb \
sun7i-a20-pcduino3-nano.dtb \
 - sun7i-a20-wexler-tab7200.dtb
 + sun7i-a20-wexler-tab7200.dtb \
 +sun7i-a20-wits-pro-a20-dkt.dtb


 The indentation is off.

   dtb-$(CONFIG_MACH_SUN8I) += \
sun8i-a23-evb.dtb \
sun8i-a23-ippo-q8h-v5.dtb \
 diff --git a/arch/arm/boot/dts/sun7i-a20-wits-pro-a20-dkt.dts
 b/arch/arm/boot/dts/sun7i-a20-wits-pro-a20-dkt.dts
 new file mode 100644
 index 000..db4d32c
 --- /dev/null
 +++ b/arch/arm/boot/dts/sun7i-a20-wits-pro-a20-dkt.dts
 @@ -0,0 +1,209 @@
 +/*
 + * Copyright 2015 Jelle de Jong jelledej...@powercraft.nl
 + *
 + * 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 sun7i-a20.dtsi
 +#include sunxi-common-regulators.dtsi
 +
 +#include dt-bindings/gpio/gpio.h
 +#include dt-bindings/input/input.h
 +#include dt-bindings/interrupt-controller/irq.h
 +
 +/ {
 + model = Wits Pro A20 DKT;
 + compatible = wits,pro-a20-dkt, allwinner,sun7i-a20;
 +
 + aliases {
 + serial0 = uart0;
 + };
 +
 + chosen {
 + stdout-path = serial0:115200n8;
 + };
 +
 + reg_vmmc3: vmmc3 {
 + compatible = regulator-fixed;
 + pinctrl-names = default;
 + pinctrl-0 = vmmc3_pin_ap6xxx_wl_regon;
 + regulator-name = vmmc3;
 + regulator-min-microvolt = 330;
 + regulator-max-microvolt = 330;
 + enable-active-high;
 + gpio = pio 7 9 GPIO_ACTIVE_HIGH; /* 

Re: [linux-sunxi] Re: [PATCH 5/5] ARM: dts: sun7i: Add dts file for Wits Pro A20 DKT

2015-07-31 Thread Chen-Yu Tsai
On Sat, Aug 1, 2015 at 12:56 AM, Maxime Ripard
maxime.rip...@free-electrons.com wrote:
 On Fri, Jul 31, 2015 at 06:25:29PM +0800, Chen-Yu Tsai wrote:
  Note that it's a bit of a pain for now to support such cases, as
  there's nothing to tie something from the DT to an SDIO device. I
  don't have a better solution than marking it always-on at the moment,
  with a big FIXME comment on top... :/

 One could use the mmc-pwr-seq stuff. I don't know if it has been
 extended for multiple GPIOs, not that you would need it in this use
 case.

 It doesn't really improve the situation. It doesn't handle the
 regulators, it doesn't allow the real driver to get its resources
 either, basically, it's just a hack.

Yeah, it's still lacking support for upstream regulators, like LDOs
from the PMICs.

 Maybe we ought to fix up the other ones, like the CubieTruck and A31
 Hummingbird?

 I'll do it.

Thanks


ChenYu

-- 
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] Re: Branches for sunxi-next

2015-07-31 Thread Maxime Ripard
On Thu, Jul 30, 2015 at 06:06:32PM +0800, Chen-Yu Tsai wrote:
  Last, I plan to add the new drivers to the defconfigs. OTG (musb)
  will not be added as the host/gadget/otg setting must match the dts
  setting, and that is per-board.  IIRC a mismatch might result in a
  oops.
 
  That seems quite bad. Doesn't the dual role option makes everything
  works for everyone?
 
 My setup isn't good for testing OTG/gadget. That needs modules, due
 to the way musb it hooked up.

No, it doesn't. There's an issue currently that if there's no gadget
registered when the USB gadget driver is probed, things simply don't
work.

The modules stuff is simply a workaround that race, but there's also
this patch: https://patchwork.kernel.org/patch/5999591/ that just
works, and will remove that race.

 I can test how it reacts if compiled as host with dts set to OTG. If
 it works out I guess we can set USB_MUSB_HOST=y.
 
 So the problem is actually two-fold.
 
   1. There might be a oops. (or something else... don't really
  remember specifics.)

And that one is a bit fishy.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

-- 
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: Digital signature


Re: [linux-sunxi] [PATCH 6/8] ARM: dts: axp209: Add usb_power_supply child node to the ax209 node

2015-07-31 Thread Bruno Prémont
On Fri, 31 Jul 2015 14:14:28 +0800 Chen-Yu Tsai wrote:
 On Fri, Jul 31, 2015 at 1:51 PM, Bruno Prémont wrote:
  Hi ChenYu,
 
  On Fri, 31 Jul 2015 13:31:53 +0800 Chen-Yu Tsai wrote:
  Hi Hans,
 
  On Wed, Jun 10, 2015 at 5:37 AM, Hans de Goede wrote:
   Add a node representing the usb power supply part of the axp209 pmic, 
   note
   that the usb power supply and the (to be added later) ac power supply 
   will
   each have their own child-node, so that they can be separately specified
   as power-supply for other nodes using a power-supply property with a
   phandle pointing to the right axp209 child-node.
  
   Signed-off-by: Hans de Goede hdego...@redhat.com
   ---
arch/arm/boot/dts/axp209.dtsi | 5 +
1 file changed, 5 insertions(+)
  
   diff --git a/arch/arm/boot/dts/axp209.dtsi 
   b/arch/arm/boot/dts/axp209.dtsi
   index 24c935c..051ab3b 100644
   --- a/arch/arm/boot/dts/axp209.dtsi
   +++ b/arch/arm/boot/dts/axp209.dtsi
   @@ -89,4 +89,9 @@
   regulator-name = ldo5;
   };
   };
   +
   +   usb_power_supply: usb_power_supply {
   +   compatible = x-powers,axp202-usb-power-supply;
   +   status = disabled;
 
  Is there any reason to have this disabled by default?
  AFAIK this is not something configurable in hardware,
  and the driver just gives readouts and status updates.
 
  There are some devices that only have 'AC-IN' instead of usb/otg power
  (set-top boxes) so having the devices tell what power sources they
  have makes sense (otherwise those that have ac-in instead of otg would
  have to disable usb_power_supply) and avoids confusion by explicitly
  stating presence in device dts.
 
 That's true. But this is a bit of hardware inside the AXP.
 If it's power isn't routed, it should report it, shouldn't it?

If the device does not use the input there are two cases:
- ac-in and usb/otg in short-circuited (there is a bit in AXP registers
  to provide this indication)
- the unused one is just not connected/connectable

In either case the voltage of the unused/unusable branch is not really
useful, nor is it useful to have it show up in sysfs.

 And normal users would probably expect to read the input
 voltage/current/status through sysfs (or maybe hwmon?),
 instead of not finding the device and having to look through
 the DTS.

Only those supplies effectively present (in-use or with connectors
to eventually use them) should be visible in sysfs.
Having more of them will just confuse the users, they would be searching
how they can connect the supply while there is no means to do so
except soldering to the tiny AXP pins.

hwmon makes more sense for output voltages of the AXP or temperature
of AXP chip itself, not so much for the input side if that side is
covered by power_supply devices (otherwise the information is being
duplicated and if so should only be via power_supply class, not
individual drivers).

 If you're using a distro, you might not have the kernel sources
 around, and digging through the in-system device tree isn't that
 straightforward if you don't know where to look.

If the dts is incomplete that's another issue.

  NB: I should hopefully get my battery supply driver ported this WE,
  ac-in/rtc are done, this WE. I'm going to default-off for them as well
  (note that for some extra details should be provided in dts).
 
 I'm guessing we won't be using the axp288 one?

In a first step I won't be using it.

There are a few reasons for that:
- axp288 is based on ACPI/platform to provide configuration information
  instead of dts
- it makes extensive use of OCV and registers that are possibly present
  on axp20x but undocumented there.

Bruno

-- 
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[linux-sunxi] [PATCH 1/3] phy-sun4i-usb: Add missing EXPORT_SYMBOL for sun4i_usb_phy_set_squelch_detect

2015-07-31 Thread Hans de Goede
sun4i_usb_phy_set_squelch_detect is used by other code, which may be built
as a module, so it should be exported.

Signed-off-by: Hans de Goede hdego...@redhat.com
---
Changes in v6:
-New patch in v6 of the sunxi musb support series
---
 drivers/phy/phy-sun4i-usb.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/phy/phy-sun4i-usb.c b/drivers/phy/phy-sun4i-usb.c
index 5138843..d514a9b 100644
--- a/drivers/phy/phy-sun4i-usb.c
+++ b/drivers/phy/phy-sun4i-usb.c
@@ -347,6 +347,7 @@ void sun4i_usb_phy_set_squelch_detect(struct phy *_phy, 
bool enabled)
 
sun4i_usb_phy_write(phy, PHY_SQUELCH_DETECT, enabled ? 0 : 2, 2);
 }
+EXPORT_SYMBOL(sun4i_usb_phy_set_squelch_detect);
 
 static struct phy_ops sun4i_usb_phy_ops = {
.init   = sun4i_usb_phy_init,
-- 
2.4.3

-- 
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[linux-sunxi] [PATCH 0/3] phy-sun4i-usb: 3 misc. fixes

2015-07-31 Thread Hans de Goede
Hi Kishon,

Here are 3 small patches for the phy-sun4i-usb code.

The first patch is a small bugfix for building the sun4i musb code as
module which seems to have fallen through the cracks.

The second patch is a preparation patch for the third patch which
fixes the case of boards with a working VBus regulator, but broken
VBus detection support, yes unfortunately such boards exist.

Can you please merge these 3 into linux-phy/next ?

Thanks  Regards,

Hans

-- 
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] [PATCH 6/8] ARM: dts: axp209: Add usb_power_supply child node to the ax209 node

2015-07-31 Thread Maxime Ripard
On Fri, Jul 31, 2015 at 08:35:41AM +0200, Bruno Prémont wrote:
   NB: I should hopefully get my battery supply driver ported this WE,
   ac-in/rtc are done, this WE. I'm going to default-off for them as well
   (note that for some extra details should be provided in dts).
  
  I'm guessing we won't be using the axp288 one?
 
 In a first step I won't be using it.
 
 There are a few reasons for that:
 - axp288 is based on ACPI/platform to provide configuration information
   instead of dts

That's not an issue. You have an API to handle lookup in both DT and
ACPI (the fwnode_* stuff).

 - it makes extensive use of OCV and registers that are possibly present
   on axp20x but undocumented there.

That will be more problematic. Still I don't see why we wouldn't use a
similar setup to what they did.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

-- 
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: Digital signature


Re: [linux-sunxi] Re: Branches for sunxi-next

2015-07-31 Thread Maxime Ripard
On Thu, Jul 30, 2015 at 02:23:24PM +0200, Hans de Goede wrote:
 Thank you both for doing this, this should make the delta between
 sunxi-next and my sunxi-wip quite a bit smaller and will allow me to
 double check all otg bits got merged for 4.3.

I try to do my best at keeping up everything that comes in, but I
usually miss a few of them. I'm always very happy to receive that kind
of mail and merge more stuff into sunxi-next, so if you see something
missing in the future, really don't hesitate to let me know.

  So the problem is actually two-fold.
 
1. There might be a oops. (or something else... don't really
   remember specifics.)
 
 That should be fixed now (it has been fixed in my sunxi-wip tree for
 a while now).

Great. Has the fix been sent yet?

2. musb in OTG/gadget needs modules, or rather USB gadgets must be
   loaded/registered _before_ musb.
 
 You mean _after_ I think. Maxime didn't you point me to a kernel patch
 which fixes this making things work independent of init order, allowing
 the gadget drivers to be builtin  ?

I did, see my other mail. I'm unclear of the current status of those
patches though.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

-- 
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: Digital signature


Re: [linux-sunxi] [PATCH 6/8] ARM: dts: axp209: Add usb_power_supply child node to the ax209 node

2015-07-31 Thread Chen-Yu Tsai
On Fri, Jul 31, 2015 at 1:51 PM, Bruno Prémont
bonb...@linux-vserver.org wrote:
 Hi ChenYu,

 On Fri, 31 Jul 2015 13:31:53 +0800 Chen-Yu Tsai wrote:
 Hi Hans,

 On Wed, Jun 10, 2015 at 5:37 AM, Hans de Goede hdego...@redhat.com wrote:
  Add a node representing the usb power supply part of the axp209 pmic, note
  that the usb power supply and the (to be added later) ac power supply will
  each have their own child-node, so that they can be separately specified
  as power-supply for other nodes using a power-supply property with a
  phandle pointing to the right axp209 child-node.
 
  Signed-off-by: Hans de Goede hdego...@redhat.com
  ---
   arch/arm/boot/dts/axp209.dtsi | 5 +
   1 file changed, 5 insertions(+)
 
  diff --git a/arch/arm/boot/dts/axp209.dtsi b/arch/arm/boot/dts/axp209.dtsi
  index 24c935c..051ab3b 100644
  --- a/arch/arm/boot/dts/axp209.dtsi
  +++ b/arch/arm/boot/dts/axp209.dtsi
  @@ -89,4 +89,9 @@
  regulator-name = ldo5;
  };
  };
  +
  +   usb_power_supply: usb_power_supply {
  +   compatible = x-powers,axp202-usb-power-supply;
  +   status = disabled;

 Is there any reason to have this disabled by default?
 AFAIK this is not something configurable in hardware,
 and the driver just gives readouts and status updates.

 There are some devices that only have 'AC-IN' instead of usb/otg power
 (set-top boxes) so having the devices tell what power sources they
 have makes sense (otherwise those that have ac-in instead of otg would
 have to disable usb_power_supply) and avoids confusion by explicitly
 stating presence in device dts.

That's true. But this is a bit of hardware inside the AXP.
If it's power isn't routed, it should report it, shouldn't it?

And normal users would probably expect to read the input
voltage/current/status through sysfs (or maybe hwmon?),
instead of not finding the device and having to look through
the DTS.

If you're using a distro, you might not have the kernel sources
around, and digging through the in-system device tree isn't that
straightforward if you don't know where to look.

 NB: I should hopefully get my battery supply driver ported this WE,
 ac-in/rtc are done, this WE. I'm going to default-off for them as well
 (note that for some extra details should be provided in dts).

I'm guessing we won't be using the axp288 one?

Thanks
ChenYu

 Bruno

 ChenYu

  +   };
   };
  --
  2.3.6

-- 
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] Re: Branches for sunxi-next

2015-07-31 Thread Chen-Yu Tsai
On Fri, Jul 31, 2015 at 12:37 PM, Chen-Yu Tsai w...@csie.org wrote:
 On Thu, Jul 30, 2015 at 8:23 PM, Hans de Goede hdego...@redhat.com wrote:
 Hi,


 On 30-07-15 12:06, Chen-Yu Tsai wrote:

 On Thu, Jul 30, 2015 at 5:51 PM, Maxime Ripard
 maxime.rip...@free-electrons.com wrote:

 Hi,

 On Thu, Jul 30, 2015 at 04:25:12PM +0800, Chen-Yu Tsai wrote:

 Hi Maxime,

 Could you merge the following branches into sunxi-next?
 These are drivers for 4.3.

 MUSB patches from Felipe's next branch:

  git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git

 up to

  d91de093d94e usb: musb: sunxi: Add support for musb controller in
 A33 SoC


 USB PHY patches from Kishon's next branch:

  git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy.git

 up to

  8665c18bece7 phy-sun4i-usb: Add support for monitoring vbus via a
 power-supply


 AXP152 patches from Lee's for-next branch:

  git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git

 up to

  a50e5abe10c9 mfd: axp20x: Add axp152 support


 Note a few patches for proper OTG support haven't been merged:

  ARM: dts: Add binding documentation for AXP20x pmic usb power
 supply
  mfd: axp20x: Add missing registers, and mark more registers
 volatile
  phy-sun4i-usb: Add missing EXPORT_SYMBOL for
 sun4i_usb_phy_set_squelch_detect
  mfd: axp20x: Add a cell for the usb power_supply part of the axp20x
 PMICs
  power: Add an axp20x-usb-power driver


 Crypto patches from Herbert's cryptodev tree:


 git://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git

 up to

  bc3687982be0 MAINTAINERS: Add myself as maintainer of Allwinner
 Security System


 Merged and pushed everything, thanks!


 Thanks!


 Thank you both for doing this, this should make the delta between sunxi-next
 and my sunxi-wip quite a bit smaller and will allow me to double check
 all otg bits got merged for 4.3.

 That was one of the reasons I did it. :)

 Additionally some patches in net-next finish up the refactoring of
 STMMAC (GMAC) drivers. If you're interested in getting everyone to
 test them:

  git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git

 up to

  9a9e9a1edee8 stmmac: dwmac-sunxi: turn setup callback into a probe
 function


 I'm not sure about this one though. Usually, I've been taking only the
 new stuff, and not the various refactorings.

 If you really want it to be included, I'm fine with merging it though.


 kernelci shows it's working (DHCP got IP) on next:


 http://kernelci.org/boot/sun7i-a20-cubietruck/job/next/kernel/next-20150729/defconfig/sunxi_defconfig/lab/lab-tbaker/?_id=55b89dcd59b514508773b023

 No need to merge it.

 Last, I plan to add the new drivers to the defconfigs. OTG (musb)
 will not be added as the host/gadget/otg setting must match the dts
 setting, and that is per-board.  IIRC a mismatch might result in a
 oops.


 That seems quite bad. Doesn't the dual role option makes everything
 works for everyone?


 My setup isn't good for testing OTG/gadget. That needs modules, due
 to the way musb it hooked up. I can test how it reacts if compiled
 as host with dts set to OTG. If it works out I guess we can set
 USB_MUSB_HOST=y.

 So the problem is actually two-fold.

1. There might be a oops. (or something else... don't really
   remember specifics.)


 That should be fixed now (it has been fixed in my sunxi-wip tree for
 a while now).

 MUSB in host only mode with DT set to otg mode says:

 musb-sunxi 1c13000.usb: Invalid or missing 'dr_mode' property
 musb-sunxi: probe of 1c13000.usb failed with error -22

 The other way around works though.

2. musb in OTG/gadget needs modules, or rather USB gadgets must be
   loaded/registered _before_ musb.


 You mean _after_ I think. Maxime didn't you point me to a kernel patch
 which fixes this making things work independent of init order, allowing
 the gadget drivers to be builtin  ?

 On my A13 tablet I'm getting:

 usb_phy_generic.0.auto supply vcc not found, using dummy regulator
 musb-hdrc musb-hdrc.1.auto: musb_init_controller failed with status -16
 musb-hdrc: probe of musb-hdrc.1.auto failed with error -16

I forgot to enable a few other things (like otg_sram). After doing
so, it gives the same result as my Cubietruck, nothing happens when
you plug in or remove devices. :(

It doesn't even enable VBUS when I plug in the OTG cable.

 On my Cubietruck musb properly registers, but nothing happens
 when I connect stuff to it.

 IMHO this ordering thing is not very solid.

 I did receive this note as a comment to a github commit:

 Should add CONFIG_EXTCON=y to arch/arm/configs/sunxi_defconfig otherwise
 CONFIG_PHY_SUN4I_USB doesn't get enabled properly.

 I've but doing this on my todo list, feel free to beat me to it though :)

 I saw that one as well.


 Regards
 ChenYu

-- 
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop 

[linux-sunxi] [PATCH 2/3] phy-sun4i-sub: Move vbus-detect helper functions up in the file

2015-07-31 Thread Hans de Goede
Move vbus-detect helper functions up in the file, just moving some code
around, no functional changes what so ever.

Signed-off-by: Hans de Goede hdego...@redhat.com
---
 drivers/phy/phy-sun4i-usb.c | 48 ++---
 1 file changed, 24 insertions(+), 24 deletions(-)

diff --git a/drivers/phy/phy-sun4i-usb.c b/drivers/phy/phy-sun4i-usb.c
index d514a9b..ddb9fd2 100644
--- a/drivers/phy/phy-sun4i-usb.c
+++ b/drivers/phy/phy-sun4i-usb.c
@@ -294,6 +294,30 @@ static int sun4i_usb_phy_exit(struct phy *_phy)
return 0;
 }
 
+static int sun4i_usb_phy0_get_vbus_det(struct sun4i_usb_phy_data *data)
+{
+   if (data-vbus_det_gpio)
+   return gpiod_get_value_cansleep(data-vbus_det_gpio);
+
+   if (data-vbus_power_supply) {
+   union power_supply_propval val;
+   int r;
+
+   r = power_supply_get_property(data-vbus_power_supply,
+ POWER_SUPPLY_PROP_PRESENT, val);
+   if (r == 0)
+   return val.intval;
+   }
+
+   /* Fallback: report vbus as high */
+   return 1;
+}
+
+static bool sun4i_usb_phy0_have_vbus_det(struct sun4i_usb_phy_data *data)
+{
+   return data-vbus_det_gpio || data-vbus_power_supply;
+}
+
 static int sun4i_usb_phy_power_on(struct phy *_phy)
 {
struct sun4i_usb_phy *phy = phy_get_drvdata(_phy);
@@ -357,30 +381,6 @@ static struct phy_ops sun4i_usb_phy_ops = {
.owner  = THIS_MODULE,
 };
 
-static int sun4i_usb_phy0_get_vbus_det(struct sun4i_usb_phy_data *data)
-{
-   if (data-vbus_det_gpio)
-   return gpiod_get_value_cansleep(data-vbus_det_gpio);
-
-   if (data-vbus_power_supply) {
-   union power_supply_propval val;
-   int r;
-
-   r = power_supply_get_property(data-vbus_power_supply,
- POWER_SUPPLY_PROP_PRESENT, val);
-   if (r == 0)
-   return val.intval;
-   }
-
-   /* Fallback: report vbus as high */
-   return 1;
-}
-
-static bool sun4i_usb_phy0_have_vbus_det(struct sun4i_usb_phy_data *data)
-{
-   return data-vbus_det_gpio || data-vbus_power_supply;
-}
-
 static void sun4i_usb_phy0_id_vbus_det_scan(struct work_struct *work)
 {
struct sun4i_usb_phy_data *data =
-- 
2.4.3

-- 
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[linux-sunxi] [PATCH 3/3] phy-sun4i-usb: Only check vbus-det on power-on on boards with vbus-det

2015-07-31 Thread Hans de Goede
data-vbus_det is always 1 on boards without a (working) vbus-det, skip
the vbus_det test on such boards.

This fixes the sun4i usb phy code never turning on Vbus on such boards.

Signed-off-by: Hans de Goede hdego...@redhat.com
---
 drivers/phy/phy-sun4i-usb.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/phy/phy-sun4i-usb.c b/drivers/phy/phy-sun4i-usb.c
index ddb9fd2..12c5e4eb 100644
--- a/drivers/phy/phy-sun4i-usb.c
+++ b/drivers/phy/phy-sun4i-usb.c
@@ -328,7 +328,8 @@ static int sun4i_usb_phy_power_on(struct phy *_phy)
return 0;
 
/* For phy0 only turn on Vbus if we don't have an ext. Vbus */
-   if (phy-index == 0  data-vbus_det)
+   if (phy-index == 0  sun4i_usb_phy0_have_vbus_det(data) 
+   data-vbus_det)
return 0;
 
ret = regulator_enable(phy-vbus);
-- 
2.4.3

-- 
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[linux-sunxi] [PATCH 5/5] ARM: dts: sun7i: Add dts file for Wits Pro A20 DKT

2015-07-31 Thread Hans de Goede
From: Jelle de Jong jelledej...@powercraft.nl

The Wits Pro A20 DKT is an A20 Development KiT with 1G RAM, 4G NAND,
sdio wifi, 1Gbit ethernet, 1024x768 lcd screen with ft5x_ts touchscreen
and a ton of IO connectors.

Note there seem to be multiple sdcard slots on the board (4 in total), but
other then mmc0 none of these are hooked up by default, there is a ton of
dip-switches which likely allow hooking some of these up, but the
documentation of the board only describes the use of a fraction of them,
so for now we only support mmc0.

Signed-off-by: Jelle de Jong jelledej...@powercraft.nl
Signed-off-by: Hans de Goede hdego...@redhat.com
---
Also see: http://www.merrii.com/en/pla_d.asp?id=163
---
 arch/arm/boot/dts/Makefile   |   3 +-
 arch/arm/boot/dts/sun7i-a20-wits-pro-a20-dkt.dts | 209 +++
 2 files changed, 211 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boot/dts/sun7i-a20-wits-pro-a20-dkt.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index f830e1f..151a413 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -595,7 +595,8 @@ dtb-$(CONFIG_MACH_SUN7I) += \
sun7i-a20-orangepi-mini.dtb \
sun7i-a20-pcduino3.dtb \
sun7i-a20-pcduino3-nano.dtb \
-   sun7i-a20-wexler-tab7200.dtb
+   sun7i-a20-wexler-tab7200.dtb \
+sun7i-a20-wits-pro-a20-dkt.dtb
 dtb-$(CONFIG_MACH_SUN8I) += \
sun8i-a23-evb.dtb \
sun8i-a23-ippo-q8h-v5.dtb \
diff --git a/arch/arm/boot/dts/sun7i-a20-wits-pro-a20-dkt.dts 
b/arch/arm/boot/dts/sun7i-a20-wits-pro-a20-dkt.dts
new file mode 100644
index 000..db4d32c
--- /dev/null
+++ b/arch/arm/boot/dts/sun7i-a20-wits-pro-a20-dkt.dts
@@ -0,0 +1,209 @@
+/*
+ * Copyright 2015 Jelle de Jong jelledej...@powercraft.nl
+ *
+ * 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 sun7i-a20.dtsi
+#include sunxi-common-regulators.dtsi
+
+#include dt-bindings/gpio/gpio.h
+#include dt-bindings/input/input.h
+#include dt-bindings/interrupt-controller/irq.h
+
+/ {
+   model = Wits Pro A20 DKT;
+   compatible = wits,pro-a20-dkt, allwinner,sun7i-a20;
+
+   aliases {
+   serial0 = uart0;
+   };
+
+   chosen {
+   stdout-path = serial0:115200n8;
+   };
+
+   reg_vmmc3: vmmc3 {
+   compatible = regulator-fixed;
+   pinctrl-names = default;
+   pinctrl-0 = vmmc3_pin_ap6xxx_wl_regon;
+   regulator-name = vmmc3;
+   regulator-min-microvolt = 330;
+   regulator-max-microvolt = 330;
+   enable-active-high;
+   gpio = pio 7 9 GPIO_ACTIVE_HIGH; /* PH9 */
+   };
+};
+
+cpu0 {
+   cpu-supply = reg_dcdc2;
+};
+
+ehci0 {
+   status = okay;
+};
+
+ehci1 {
+   status = okay;
+};
+
+i2c0 {
+   pinctrl-names = default;
+   pinctrl-0 = i2c0_pins_a;
+   status = okay;
+
+   axp209: pmic@34 {
+   reg = 0x34;
+   interrupt-parent = nmi_intc;
+   interrupts = 0 

[linux-sunxi] [PATCH 4/5] ARM: dts: sun8i: Enable USB DRC on Ippo Q8H-A33 tablet

2015-07-31 Thread Hans de Goede
Enable the otg/drc usb controller on the Ippo Q8H-A33 tablet, for now it
is enabled in host-only mode, because true OTG support requires support
for detecting and enabling Vbus through the axp221 pmic.

For this to work the Vbus on the port must be enabled by u-boot,
or a powered hub must be used.

Signed-off-by: Hans de Goede hdego...@redhat.com
---
 arch/arm/boot/dts/sun8i-a33-ippo-q8h-v1.2.dts | 9 +
 1 file changed, 9 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-a33-ippo-q8h-v1.2.dts 
b/arch/arm/boot/dts/sun8i-a33-ippo-q8h-v1.2.dts
index 8bb75ee..361ddb9 100644
--- a/arch/arm/boot/dts/sun8i-a33-ippo-q8h-v1.2.dts
+++ b/arch/arm/boot/dts/sun8i-a33-ippo-q8h-v1.2.dts
@@ -116,3 +116,12 @@
pinctrl-0 = r_uart_pins_a;
status = okay;
 };
+
+usb_otg {
+   dr_mode = host;
+   status = okay;
+};
+
+usbphy {
+   status = okay;
+};
-- 
2.4.3

-- 
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[linux-sunxi] [PATCH 1/5] ARM: dts: sun4i: Enable USB DRC on A10 OLinuxIno Lime

2015-07-31 Thread Hans de Goede
From: Remy van Elst re...@relst.nl

Enable the otg/drc usb controller on the A10 OLinuxIno Lime.

Signed-off-by: Remy van Elst re...@relst.nl
Signed-off-by: Hans de Goede hdego...@redhat.com
---
 arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts | 32 ++
 1 file changed, 32 insertions(+)

diff --git a/arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts 
b/arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts
index b64aa4e..28e32ad 100644
--- a/arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts
+++ b/arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts
@@ -150,6 +150,10 @@
status = okay;
 };
 
+otg_sram {
+   status = okay;
+};
+
 pio {
ahci_pwr_pin_olinuxinolime: ahci_pwr_pin@1 {
allwinner,pins = PC3;
@@ -164,6 +168,20 @@
allwinner,drive = SUN4I_PINCTRL_20_MA;
allwinner,pull = SUN4I_PINCTRL_NO_PULL;
};
+
+   usb0_id_detect_pin: usb0_id_detect_pin@0 {
+   allwinner,pins = PH4;
+   allwinner,function = gpio_in;
+   allwinner,drive = SUN4I_PINCTRL_10_MA;
+   allwinner,pull = SUN4I_PINCTRL_PULL_UP;
+   };
+
+   usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 {
+   allwinner,pins = PH5;
+   allwinner,function = gpio_in;
+   allwinner,drive = SUN4I_PINCTRL_10_MA;
+   allwinner,pull = SUN4I_PINCTRL_PULL_DOWN;
+   };
 };
 
 reg_ahci_5v {
@@ -172,6 +190,10 @@
status = okay;
 };
 
+reg_usb0_vbus {
+   status = okay;
+};
+
 reg_usb1_vbus {
status = okay;
 };
@@ -186,7 +208,17 @@
status = okay;
 };
 
+usb_otg {
+   dr_mode = otg;
+   status = okay;
+};
+
 usbphy {
+   pinctrl-names = default;
+   pinctrl-0 = usb0_id_detect_pin, usb0_vbus_detect_pin;
+   usb0_id_det-gpio   = pio 7 4 GPIO_ACTIVE_HIGH; /* PH4 */
+   usb0_vbus_det-gpio = pio 7 5 GPIO_ACTIVE_HIGH; /* PH5 */
+   usb0_vbus-supply   = reg_usb0_vbus;
usb1_vbus-supply = reg_usb1_vbus;
usb2_vbus-supply = reg_usb2_vbus;
status = okay;
-- 
2.4.3

-- 
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] [PATCH 6/8] ARM: dts: axp209: Add usb_power_supply child node to the ax209 node

2015-07-31 Thread Chen-Yu Tsai
On Fri, Jul 31, 2015 at 4:31 PM, Hans de Goede hdego...@redhat.com wrote:
 Hi,


 On 31-07-15 08:35, Bruno Prémont wrote:

 On Fri, 31 Jul 2015 14:14:28 +0800 Chen-Yu Tsai wrote:

 On Fri, Jul 31, 2015 at 1:51 PM, Bruno Prémont wrote:

 Hi ChenYu,

 On Fri, 31 Jul 2015 13:31:53 +0800 Chen-Yu Tsai wrote:

 Hi Hans,

 On Wed, Jun 10, 2015 at 5:37 AM, Hans de Goede wrote:

 Add a node representing the usb power supply part of the axp209 pmic,
 note
 that the usb power supply and the (to be added later) ac power supply
 will
 each have their own child-node, so that they can be separately
 specified
 as power-supply for other nodes using a power-supply property with a
 phandle pointing to the right axp209 child-node.

 Signed-off-by: Hans de Goede hdego...@redhat.com
 ---
   arch/arm/boot/dts/axp209.dtsi | 5 +
   1 file changed, 5 insertions(+)

 diff --git a/arch/arm/boot/dts/axp209.dtsi
 b/arch/arm/boot/dts/axp209.dtsi
 index 24c935c..051ab3b 100644
 --- a/arch/arm/boot/dts/axp209.dtsi
 +++ b/arch/arm/boot/dts/axp209.dtsi
 @@ -89,4 +89,9 @@
  regulator-name = ldo5;
  };
  };
 +
 +   usb_power_supply: usb_power_supply {
 +   compatible = x-powers,axp202-usb-power-supply;
 +   status = disabled;


 Is there any reason to have this disabled by default?
 AFAIK this is not something configurable in hardware,
 and the driver just gives readouts and status updates.


 There are some devices that only have 'AC-IN' instead of usb/otg power
 (set-top boxes) so having the devices tell what power sources they
 have makes sense (otherwise those that have ac-in instead of otg would
 have to disable usb_power_supply) and avoids confusion by explicitly
 stating presence in device dts.


 That's true. But this is a bit of hardware inside the AXP.
 If it's power isn't routed, it should report it, shouldn't it?


 If the device does not use the input there are two cases:
 - ac-in and usb/otg in short-circuited (there is a bit in AXP registers
to provide this indication)
 - the unused one is just not connected/connectable

 In either case the voltage of the unused/unusable branch is not really
 useful, nor is it useful to have it show up in sysfs.


 Exactly my thinking on this, +1 .

 And normal users would probably expect to read the input
 voltage/current/status through sysfs (or maybe hwmon?),
 instead of not finding the device and having to look through
 the DTS.


 Only those supplies effectively present (in-use or with connectors
 to eventually use them) should be visible in sysfs.
 Having more of them will just confuse the users, they would be searching
 how they can connect the supply while there is no means to do so
 except soldering to the tiny AXP pins.


 +1

OK. So mostly tablets and dev boards would benefit from having both
power supplies. Is there a preference for usb-power-supply over
vbus-det-gpio if both are available? Or just list them both and
let the driver sort it out?

Thanks.


ChenYu

-- 
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[linux-sunxi] [PATCH 0/5] ARM: dts: sunxi: Enable USB DRC on a bunch of boards

2015-07-31 Thread Hans de Goede
Hi Maxime,

Here is a set of patches to enable the otg on 4 more boards, and adding
a dts file for the Wits a20 Pro Development kit. Most of these are the
result of the devicetree workshop I organized last weekend :) All of them
have been doublechecked for correctness and were tested on the actual
hardware.

This set does not include some pending dts patches for enabling otg on
boards which use the axp209 to do vbus-detection on the otg port, as
the necessary mfd / power-supply bits are not merged yet. I'll try to
get those queued up for 4.3, and when they are I'll send you another
set of otg enablement patches for these boards.

Regards,

Hans

-- 
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[linux-sunxi] [PATCH 2/5] ARM: dts: sun5i: Enable USB DRC on A10s OLinuxIno Micro

2015-07-31 Thread Hans de Goede
Enable the otg/drc usb controller on the A10s OLinuxIno Micro.

Note the A10s OlinuxIno Micro always has some voltage on its otg power
pin, even if the usb-vbus0-regulator is disabled, the leaked voltage is
enough to make vbus-det always report 1, so we do not use vbus-det on
this board.

Signed-off-by: Hans de Goede hdego...@redhat.com
---
 arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts | 30 +++-
 1 file changed, 29 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts 
b/arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts
index 7b26e17..5eebd21 100644
--- a/arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts
+++ b/arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts
@@ -196,6 +196,10 @@
status = okay;
 };
 
+otg_sram {
+   status = okay;
+};
+
 pio {
mmc0_cd_pin_olinuxino_micro: mmc0_cd_pin@0 {
allwinner,pins = PG1;
@@ -224,6 +228,22 @@
allwinner,drive = SUN4I_PINCTRL_10_MA;
allwinner,pull = SUN4I_PINCTRL_NO_PULL;
};
+
+   usb0_vbus_pin_a: usb0_vbus_pin@0 {
+   allwinner,pins = PG11;
+   };
+
+   usb0_id_detect_pin: usb0_id_detect_pin@0 {
+   allwinner,pins = PG12;
+   allwinner,function = gpio_in;
+   allwinner,drive = SUN4I_PINCTRL_10_MA;
+   allwinner,pull = SUN4I_PINCTRL_PULL_UP;
+   };
+};
+
+reg_usb0_vbus {
+   gpio = pio 6 11 GPIO_ACTIVE_HIGH; /* PG11 */
+   status = okay;
 };
 
 reg_usb1_vbus {
@@ -250,8 +270,16 @@
status = okay;
 };
 
+usb_otg {
+   dr_mode = otg;
+   status = okay;
+};
+
 usbphy {
+   pinctrl-names = default;
+   pinctrl-0 = usb0_id_detect_pin;
+   usb0_id_det-gpio = pio 6 12 GPIO_ACTIVE_HIGH; /* PG12 */
+   usb0_vbus-supply = reg_usb0_vbus;
usb1_vbus-supply = reg_usb1_vbus;
status = okay;
 };
-
-- 
2.4.3

-- 
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] [PATCH 6/8] ARM: dts: axp209: Add usb_power_supply child node to the ax209 node

2015-07-31 Thread Hans de Goede

Hi,

On 31-07-15 11:00, Chen-Yu Tsai wrote:

On Fri, Jul 31, 2015 at 4:31 PM, Hans de Goede hdego...@redhat.com wrote:

Hi,


On 31-07-15 08:35, Bruno Prémont wrote:


On Fri, 31 Jul 2015 14:14:28 +0800 Chen-Yu Tsai wrote:


On Fri, Jul 31, 2015 at 1:51 PM, Bruno Prémont wrote:


Hi ChenYu,

On Fri, 31 Jul 2015 13:31:53 +0800 Chen-Yu Tsai wrote:


Hi Hans,

On Wed, Jun 10, 2015 at 5:37 AM, Hans de Goede wrote:


Add a node representing the usb power supply part of the axp209 pmic,
note
that the usb power supply and the (to be added later) ac power supply
will
each have their own child-node, so that they can be separately
specified
as power-supply for other nodes using a power-supply property with a
phandle pointing to the right axp209 child-node.

Signed-off-by: Hans de Goede hdego...@redhat.com
---
   arch/arm/boot/dts/axp209.dtsi | 5 +
   1 file changed, 5 insertions(+)

diff --git a/arch/arm/boot/dts/axp209.dtsi
b/arch/arm/boot/dts/axp209.dtsi
index 24c935c..051ab3b 100644
--- a/arch/arm/boot/dts/axp209.dtsi
+++ b/arch/arm/boot/dts/axp209.dtsi
@@ -89,4 +89,9 @@
  regulator-name = ldo5;
  };
  };
+
+   usb_power_supply: usb_power_supply {
+   compatible = x-powers,axp202-usb-power-supply;
+   status = disabled;



Is there any reason to have this disabled by default?
AFAIK this is not something configurable in hardware,
and the driver just gives readouts and status updates.



There are some devices that only have 'AC-IN' instead of usb/otg power
(set-top boxes) so having the devices tell what power sources they
have makes sense (otherwise those that have ac-in instead of otg would
have to disable usb_power_supply) and avoids confusion by explicitly
stating presence in device dts.



That's true. But this is a bit of hardware inside the AXP.
If it's power isn't routed, it should report it, shouldn't it?



If the device does not use the input there are two cases:
- ac-in and usb/otg in short-circuited (there is a bit in AXP registers
to provide this indication)
- the unused one is just not connected/connectable

In either case the voltage of the unused/unusable branch is not really
useful, nor is it useful to have it show up in sysfs.



Exactly my thinking on this, +1 .


And normal users would probably expect to read the input
voltage/current/status through sysfs (or maybe hwmon?),
instead of not finding the device and having to look through
the DTS.



Only those supplies effectively present (in-use or with connectors
to eventually use them) should be visible in sysfs.
Having more of them will just confuse the users, they would be searching
how they can connect the supply while there is no means to do so
except soldering to the tiny AXP pins.



+1


OK. So mostly tablets and dev boards would benefit from having both
power supplies. Is there a preference for usb-power-supply over
vbus-det-gpio if both are available? Or just list them both and
let the driver sort it out?


p.s.

Note that the driver can even deal with not having a vbus-det at
all. It will then simulate a vbus drop for long enough to terminate
the current session when ever the id pin changes. This is necessary
for the original cubieboard which has its vbus wired hard to 5V.

This MUST only be used on boards woth broken vbus-det though, having
vbus-det is important to avoid feeding power to the outside when
a charger is plugged in (a charge cable should never pull the id
pin low, but you never know).

Regards,

Hans

--
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] Re: Branches for sunxi-next

2015-07-31 Thread Hans de Goede

Hi,

On 31-07-15 10:27, Hans de Goede wrote:

Hi,

On 31-07-15 08:20, Maxime Ripard wrote:

On Thu, Jul 30, 2015 at 02:23:24PM +0200, Hans de Goede wrote:

Thank you both for doing this, this should make the delta between
sunxi-next and my sunxi-wip quite a bit smaller and will allow me to
double check all otg bits got merged for 4.3.


I try to do my best at keeping up everything that comes in, but I
usually miss a few of them. I'm always very happy to receive that kind
of mail and merge more stuff into sunxi-next, so if you see something
missing in the future, really don't hesitate to let me know.


So the problem is actually two-fold.

   1. There might be a oops. (or something else... don't really
  remember specifics.)


That should be fixed now (it has been fixed in my sunxi-wip tree for
a while now).


Great. Has the fix been sent yet?


It was part of one of the version bumps of the entire patch-set, so
the patches as merged already contain the fix.




   2. musb in OTG/gadget needs modules, or rather USB gadgets must be
  loaded/registered _before_ musb.


You mean _after_ I think. Maxime didn't you point me to a kernel patch
which fixes this making things work independent of init order, allowing
the gadget drivers to be builtin  ?


I did, see my other mail. I'm unclear of the current status of those
patches though.


Ah I thought those would be upstream by now. It would be good to get those
upstream. Chen-Yu can you give these patches:

https://patchwork.kernel.org/patch/5999591/

A try, and if they fix things for you pike the author and see if one of
us (you?) can take over pushing these upstream ?


s/pike/poke/

(piking people is not good)

Regards,

Hans

--
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] Re: Branches for sunxi-next

2015-07-31 Thread Hans de Goede

Hi,

On 31-07-15 08:20, Maxime Ripard wrote:

On Thu, Jul 30, 2015 at 02:23:24PM +0200, Hans de Goede wrote:

Thank you both for doing this, this should make the delta between
sunxi-next and my sunxi-wip quite a bit smaller and will allow me to
double check all otg bits got merged for 4.3.


I try to do my best at keeping up everything that comes in, but I
usually miss a few of them. I'm always very happy to receive that kind
of mail and merge more stuff into sunxi-next, so if you see something
missing in the future, really don't hesitate to let me know.


So the problem is actually two-fold.

   1. There might be a oops. (or something else... don't really
  remember specifics.)


That should be fixed now (it has been fixed in my sunxi-wip tree for
a while now).


Great. Has the fix been sent yet?


It was part of one of the version bumps of the entire patch-set, so
the patches as merged already contain the fix.




   2. musb in OTG/gadget needs modules, or rather USB gadgets must be
  loaded/registered _before_ musb.


You mean _after_ I think. Maxime didn't you point me to a kernel patch
which fixes this making things work independent of init order, allowing
the gadget drivers to be builtin  ?


I did, see my other mail. I'm unclear of the current status of those
patches though.


Ah I thought those would be upstream by now. It would be good to get those
upstream. Chen-Yu can you give these patches:

https://patchwork.kernel.org/patch/5999591/

A try, and if they fix things for you pike the author and see if one of
us (you?) can take over pushing these upstream ?

Regards,

Hans

--
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[linux-sunxi] [PATCH 3/5] ARM: dts: sun5i: Enable USB DRC on A13 OLinuxIno

2015-07-31 Thread Hans de Goede
From: Mark Janssen m...@sig-io.nl

Enable the otg/drc usb controller on the A13 OLinuxIno.

Signed-off-by: Mark Janssen m...@sig-io.nl
Signed-off-by: Hans de Goede hdego...@redhat.com
---
 arch/arm/boot/dts/sun5i-a13-olinuxino.dts | 37 +++
 1 file changed, 37 insertions(+)

diff --git a/arch/arm/boot/dts/sun5i-a13-olinuxino.dts 
b/arch/arm/boot/dts/sun5i-a13-olinuxino.dts
index 4232400..e659482 100644
--- a/arch/arm/boot/dts/sun5i-a13-olinuxino.dts
+++ b/arch/arm/boot/dts/sun5i-a13-olinuxino.dts
@@ -159,6 +159,10 @@
status = okay;
 };
 
+otg_sram {
+   status = okay;
+};
+
 pio {
mmc0_cd_pin_olinuxino: mmc0_cd_pin@0 {
allwinner,pins = PG0;
@@ -174,6 +178,24 @@
allwinner,pull = SUN4I_PINCTRL_NO_PULL;
};
 
+   usb0_id_detect_pin: usb0_id_detect_pin@0 {
+   allwinner,pins = PG2;
+   allwinner,function = gpio_in;
+   allwinner,drive = SUN4I_PINCTRL_10_MA;
+   allwinner,pull = SUN4I_PINCTRL_PULL_UP;
+   };
+
+   usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 {
+   allwinner,pins = PG1;
+   allwinner,function = gpio_in;
+   allwinner,drive = SUN4I_PINCTRL_10_MA;
+   allwinner,pull = SUN4I_PINCTRL_PULL_DOWN;
+   };
+
+   usb0_vbus_pin_a: usb0_vbus_pin@0 {
+   allwinner,pins = PG12;
+   };
+
usb1_vbus_pin_olinuxino: usb1_vbus_pin@0 {
allwinner,pins = PG11;
allwinner,function = gpio_out;
@@ -182,6 +204,11 @@
};
 };
 
+reg_usb0_vbus {
+   status = okay;
+   gpio = pio 6 12 GPIO_ACTIVE_HIGH; /* PG12 */
+};
+
 reg_usb1_vbus {
pinctrl-0 = usb1_vbus_pin_olinuxino;
gpio = pio 6 11 GPIO_ACTIVE_HIGH;
@@ -194,7 +221,17 @@
status = okay;
 };
 
+usb_otg {
+   dr_mode = otg;
+   status = okay;
+};
+
 usbphy {
+   pinctrl-names = default;
+   pinctrl-0 = usb0_id_detect_pin, usb0_vbus_detect_pin;
+   usb0_id_det-gpio = pio 6 2 GPIO_ACTIVE_HIGH; /* PG2 */
+   usb0_vbus_det-gpio = pio 6 1 GPIO_ACTIVE_HIGH; /* PG1 */
+   usb0_vbus-supply = reg_usb0_vbus;
usb1_vbus-supply = reg_usb1_vbus;
status = okay;
 };
-- 
2.4.3

-- 
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] [PATCH 6/8] ARM: dts: axp209: Add usb_power_supply child node to the ax209 node

2015-07-31 Thread Hans de Goede

Hi,

On 31-07-15 11:00, Chen-Yu Tsai wrote:

On Fri, Jul 31, 2015 at 4:31 PM, Hans de Goede hdego...@redhat.com wrote:

Hi,


On 31-07-15 08:35, Bruno Prémont wrote:


On Fri, 31 Jul 2015 14:14:28 +0800 Chen-Yu Tsai wrote:


On Fri, Jul 31, 2015 at 1:51 PM, Bruno Prémont wrote:


Hi ChenYu,

On Fri, 31 Jul 2015 13:31:53 +0800 Chen-Yu Tsai wrote:


Hi Hans,

On Wed, Jun 10, 2015 at 5:37 AM, Hans de Goede wrote:


Add a node representing the usb power supply part of the axp209 pmic,
note
that the usb power supply and the (to be added later) ac power supply
will
each have their own child-node, so that they can be separately
specified
as power-supply for other nodes using a power-supply property with a
phandle pointing to the right axp209 child-node.

Signed-off-by: Hans de Goede hdego...@redhat.com
---
   arch/arm/boot/dts/axp209.dtsi | 5 +
   1 file changed, 5 insertions(+)

diff --git a/arch/arm/boot/dts/axp209.dtsi
b/arch/arm/boot/dts/axp209.dtsi
index 24c935c..051ab3b 100644
--- a/arch/arm/boot/dts/axp209.dtsi
+++ b/arch/arm/boot/dts/axp209.dtsi
@@ -89,4 +89,9 @@
  regulator-name = ldo5;
  };
  };
+
+   usb_power_supply: usb_power_supply {
+   compatible = x-powers,axp202-usb-power-supply;
+   status = disabled;



Is there any reason to have this disabled by default?
AFAIK this is not something configurable in hardware,
and the driver just gives readouts and status updates.



There are some devices that only have 'AC-IN' instead of usb/otg power
(set-top boxes) so having the devices tell what power sources they
have makes sense (otherwise those that have ac-in instead of otg would
have to disable usb_power_supply) and avoids confusion by explicitly
stating presence in device dts.



That's true. But this is a bit of hardware inside the AXP.
If it's power isn't routed, it should report it, shouldn't it?



If the device does not use the input there are two cases:
- ac-in and usb/otg in short-circuited (there is a bit in AXP registers
to provide this indication)
- the unused one is just not connected/connectable

In either case the voltage of the unused/unusable branch is not really
useful, nor is it useful to have it show up in sysfs.



Exactly my thinking on this, +1 .


And normal users would probably expect to read the input
voltage/current/status through sysfs (or maybe hwmon?),
instead of not finding the device and having to look through
the DTS.



Only those supplies effectively present (in-use or with connectors
to eventually use them) should be visible in sysfs.
Having more of them will just confuse the users, they would be searching
how they can connect the supply while there is no means to do so
except soldering to the tiny AXP pins.



+1


OK. So mostly tablets and dev boards would benefit from having both
power supplies. Is there a preference for usb-power-supply over
vbus-det-gpio if both are available? Or just list them both and
let the driver sort it out?


So far I've simply stuck with whatever the fex file uses, if both
are specified the driver will prefer the gpio, but that is not
documented behavior. IMHO it would be better to pick and specify
only one.

Regards,

Hans

--
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] Re: Branches for sunxi-next

2015-07-31 Thread Chen-Yu Tsai
On Fri, Jul 31, 2015 at 5:04 PM, Maxime Ripard
maxime.rip...@free-electrons.com wrote:
 On Fri, Jul 31, 2015 at 10:27:27AM +0200, Hans de Goede wrote:
 Hi,

 On 31-07-15 08:20, Maxime Ripard wrote:
 On Thu, Jul 30, 2015 at 02:23:24PM +0200, Hans de Goede wrote:
 Thank you both for doing this, this should make the delta between
 sunxi-next and my sunxi-wip quite a bit smaller and will allow me to
 double check all otg bits got merged for 4.3.
 
 I try to do my best at keeping up everything that comes in, but I
 usually miss a few of them. I'm always very happy to receive that kind
 of mail and merge more stuff into sunxi-next, so if you see something
 missing in the future, really don't hesitate to let me know.
 
 So the problem is actually two-fold.
 
1. There might be a oops. (or something else... don't really
   remember specifics.)
 
 That should be fixed now (it has been fixed in my sunxi-wip tree for
 a while now).
 
 Great. Has the fix been sent yet?

 It was part of one of the version bumps of the entire patch-set, so
 the patches as merged already contain the fix.

 Ok, perfect then.


 
2. musb in OTG/gadget needs modules, or rather USB gadgets must be
   loaded/registered _before_ musb.
 
 You mean _after_ I think. Maxime didn't you point me to a kernel patch
 which fixes this making things work independent of init order, allowing
 the gadget drivers to be builtin  ?
 
 I did, see my other mail. I'm unclear of the current status of those
 patches though.

 Ah I thought those would be upstream by now. It would be good to get those
 upstream. Chen-Yu can you give these patches:

 https://patchwork.kernel.org/patch/5999591/

 A try, and if they fix things for you pike the author and see if one of
 us (you?) can take over pushing these upstream ?

 He's pretty responsive, and last time I tried, I gave him my tested-by
 and it triggered the v5. Maybe another one will trigger a v6 ? :)

Just pulled v5 from LKML patchwork. Tested on my CubieTruck and works
nicely.

I don't have that thread in my mailbox though, and LKML.org is not
working ATM. I'll send him an email once I test it on my tablet.


ChenYu

-- 
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] [PATCH 6/8] ARM: dts: axp209: Add usb_power_supply child node to the ax209 node

2015-07-31 Thread Hans de Goede

Hi,

On 31-07-15 08:35, Bruno Prémont wrote:

On Fri, 31 Jul 2015 14:14:28 +0800 Chen-Yu Tsai wrote:

On Fri, Jul 31, 2015 at 1:51 PM, Bruno Prémont wrote:

Hi ChenYu,

On Fri, 31 Jul 2015 13:31:53 +0800 Chen-Yu Tsai wrote:

Hi Hans,

On Wed, Jun 10, 2015 at 5:37 AM, Hans de Goede wrote:

Add a node representing the usb power supply part of the axp209 pmic, note
that the usb power supply and the (to be added later) ac power supply will
each have their own child-node, so that they can be separately specified
as power-supply for other nodes using a power-supply property with a
phandle pointing to the right axp209 child-node.

Signed-off-by: Hans de Goede hdego...@redhat.com
---
  arch/arm/boot/dts/axp209.dtsi | 5 +
  1 file changed, 5 insertions(+)

diff --git a/arch/arm/boot/dts/axp209.dtsi b/arch/arm/boot/dts/axp209.dtsi
index 24c935c..051ab3b 100644
--- a/arch/arm/boot/dts/axp209.dtsi
+++ b/arch/arm/boot/dts/axp209.dtsi
@@ -89,4 +89,9 @@
 regulator-name = ldo5;
 };
 };
+
+   usb_power_supply: usb_power_supply {
+   compatible = x-powers,axp202-usb-power-supply;
+   status = disabled;


Is there any reason to have this disabled by default?
AFAIK this is not something configurable in hardware,
and the driver just gives readouts and status updates.


There are some devices that only have 'AC-IN' instead of usb/otg power
(set-top boxes) so having the devices tell what power sources they
have makes sense (otherwise those that have ac-in instead of otg would
have to disable usb_power_supply) and avoids confusion by explicitly
stating presence in device dts.


That's true. But this is a bit of hardware inside the AXP.
If it's power isn't routed, it should report it, shouldn't it?


If the device does not use the input there are two cases:
- ac-in and usb/otg in short-circuited (there is a bit in AXP registers
   to provide this indication)
- the unused one is just not connected/connectable

In either case the voltage of the unused/unusable branch is not really
useful, nor is it useful to have it show up in sysfs.


Exactly my thinking on this, +1 .


And normal users would probably expect to read the input
voltage/current/status through sysfs (or maybe hwmon?),
instead of not finding the device and having to look through
the DTS.


Only those supplies effectively present (in-use or with connectors
to eventually use them) should be visible in sysfs.
Having more of them will just confuse the users, they would be searching
how they can connect the supply while there is no means to do so
except soldering to the tiny AXP pins.


+1

Regards,

Hans

--
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] Re: Branches for sunxi-next

2015-07-31 Thread Maxime Ripard
On Fri, Jul 31, 2015 at 10:27:27AM +0200, Hans de Goede wrote:
 Hi,
 
 On 31-07-15 08:20, Maxime Ripard wrote:
 On Thu, Jul 30, 2015 at 02:23:24PM +0200, Hans de Goede wrote:
 Thank you both for doing this, this should make the delta between
 sunxi-next and my sunxi-wip quite a bit smaller and will allow me to
 double check all otg bits got merged for 4.3.
 
 I try to do my best at keeping up everything that comes in, but I
 usually miss a few of them. I'm always very happy to receive that kind
 of mail and merge more stuff into sunxi-next, so if you see something
 missing in the future, really don't hesitate to let me know.
 
 So the problem is actually two-fold.
 
1. There might be a oops. (or something else... don't really
   remember specifics.)
 
 That should be fixed now (it has been fixed in my sunxi-wip tree for
 a while now).
 
 Great. Has the fix been sent yet?
 
 It was part of one of the version bumps of the entire patch-set, so
 the patches as merged already contain the fix.

Ok, perfect then.

 
 
2. musb in OTG/gadget needs modules, or rather USB gadgets must be
   loaded/registered _before_ musb.
 
 You mean _after_ I think. Maxime didn't you point me to a kernel patch
 which fixes this making things work independent of init order, allowing
 the gadget drivers to be builtin  ?
 
 I did, see my other mail. I'm unclear of the current status of those
 patches though.
 
 Ah I thought those would be upstream by now. It would be good to get those
 upstream. Chen-Yu can you give these patches:
 
 https://patchwork.kernel.org/patch/5999591/
 
 A try, and if they fix things for you pike the author and see if one of
 us (you?) can take over pushing these upstream ?

He's pretty responsive, and last time I tried, I gave him my tested-by
and it triggered the v5. Maybe another one will trigger a v6 ? :)

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

-- 
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: Digital signature


[linux-sunxi] [PATCH 2/2] ARM: multi_v7_defconfig: Enable Allwinner P2WI, PWM, DMA_SUN6I, crytodev

2015-07-31 Thread Chen-Yu Tsai
Enable drivers for Allwinner P2WI, PWM, crytodev (Security System) and
sun6i DMA engine. Also enable EXTCON as PHY_SUN4I_USB depends on it.

Signed-off-by: Chen-Yu Tsai w...@csie.org
---
 arch/arm/configs/multi_v7_defconfig | 5 +
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/configs/multi_v7_defconfig 
b/arch/arm/configs/multi_v7_defconfig
index 5fd8df6f50ea..5eaf39ce134e 100644
--- a/arch/arm/configs/multi_v7_defconfig
+++ b/arch/arm/configs/multi_v7_defconfig
@@ -301,6 +301,7 @@ CONFIG_I2C_S3C2410=y
 CONFIG_I2C_SH_MOBILE=y
 CONFIG_I2C_SIRF=y
 CONFIG_I2C_ST=y
+CONFIG_I2C_SUN6I_P2WI=y
 CONFIG_I2C_TEGRA=y
 CONFIG_I2C_XILINX=y
 CONFIG_I2C_RCAR=y
@@ -587,6 +588,7 @@ CONFIG_IMX_DMA=y
 CONFIG_MXS_DMA=y
 CONFIG_DMA_OMAP=y
 CONFIG_XILINX_VDMA=y
+CONFIG_DMA_SUN6I=y
 CONFIG_STAGING=y
 CONFIG_SENSORS_ISL29018=y
 CONFIG_SENSORS_ISL29028=y
@@ -612,6 +614,7 @@ CONFIG_TEGRA_IOMMU_SMMU=y
 CONFIG_PM_DEVFREQ=y
 CONFIG_ARM_TEGRA_DEVFREQ=m
 CONFIG_MEMORY=y
+CONFIG_EXTCON=y
 CONFIG_TI_AEMIF=y
 CONFIG_IIO=y
 CONFIG_AT91_ADC=m
@@ -622,6 +625,7 @@ CONFIG_PWM_ATMEL=m
 CONFIG_PWM_ATMEL_TCB=m
 CONFIG_PWM_RENESAS_TPU=y
 CONFIG_PWM_SAMSUNG=m
+CONFIG_PWM_SUN4I=y
 CONFIG_PWM_TEGRA=y
 CONFIG_PWM_VT8500=y
 CONFIG_PHY_HIX5HD2_SATA=y
@@ -660,6 +664,7 @@ CONFIG_LOCKUP_DETECTOR=y
 CONFIG_CRYPTO_DEV_TEGRA_AES=y
 CONFIG_CPUFREQ_DT=y
 CONFIG_KEYSTONE_IRQ=y
+CONFIG_CRYPTO_DEV_SUN4I_SS=m
 CONFIG_ARM_CRYPTO=y
 CONFIG_CRYPTO_SHA1_ARM=m
 CONFIG_CRYPTO_SHA1_ARM_NEON=m
-- 
2.5.0

-- 
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[linux-sunxi] [PATCH 0/2] ARM: configs: update Allwinner options

2015-07-31 Thread Chen-Yu Tsai
Hi,

This series updates sunxi_defconfig and multi_v7_defconfig with all 
the latest Allwinner additions.

  - DMA_SUN6I, P2WI and PWM were added a few releases back, but never
got added to the list.
  - EXTCON is required by an updated sun4i USB PHY driver.
  - Allwinner cryptodev (Security System) driver is queued up for 4.3.

ChenYu

Chen-Yu Tsai (2):
  ARM: sunxi_defconfig: Enable DMA_SUN6I, P2WI, PWM, cryptodev, EXTCON,
FHANDLE
  ARM: multi_v7_defconfig: Enable Allwinner P2WI, PWM, DMA_SUN6I,
crytodev

 arch/arm/configs/multi_v7_defconfig | 5 +
 arch/arm/configs/sunxi_defconfig| 9 -
 2 files changed, 13 insertions(+), 1 deletion(-)

-- 
2.5.0

-- 
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] [PATCH 6/8] ARM: dts: axp209: Add usb_power_supply child node to the ax209 node

2015-07-31 Thread Chen-Yu Tsai
On Fri, Jul 31, 2015 at 5:11 PM, Hans de Goede hdego...@redhat.com wrote:
 Hi,


 On 31-07-15 11:00, Chen-Yu Tsai wrote:

 On Fri, Jul 31, 2015 at 4:31 PM, Hans de Goede hdego...@redhat.com
 wrote:

 Hi,


 On 31-07-15 08:35, Bruno Prémont wrote:


 On Fri, 31 Jul 2015 14:14:28 +0800 Chen-Yu Tsai wrote:


 On Fri, Jul 31, 2015 at 1:51 PM, Bruno Prémont wrote:


 Hi ChenYu,

 On Fri, 31 Jul 2015 13:31:53 +0800 Chen-Yu Tsai wrote:


 Hi Hans,

 On Wed, Jun 10, 2015 at 5:37 AM, Hans de Goede wrote:


 Add a node representing the usb power supply part of the axp209
 pmic,
 note
 that the usb power supply and the (to be added later) ac power
 supply
 will
 each have their own child-node, so that they can be separately
 specified
 as power-supply for other nodes using a power-supply property with a
 phandle pointing to the right axp209 child-node.

 Signed-off-by: Hans de Goede hdego...@redhat.com
 ---
arch/arm/boot/dts/axp209.dtsi | 5 +
1 file changed, 5 insertions(+)

 diff --git a/arch/arm/boot/dts/axp209.dtsi
 b/arch/arm/boot/dts/axp209.dtsi
 index 24c935c..051ab3b 100644
 --- a/arch/arm/boot/dts/axp209.dtsi
 +++ b/arch/arm/boot/dts/axp209.dtsi
 @@ -89,4 +89,9 @@
   regulator-name = ldo5;
   };
   };
 +
 +   usb_power_supply: usb_power_supply {
 +   compatible = x-powers,axp202-usb-power-supply;
 +   status = disabled;



 Is there any reason to have this disabled by default?
 AFAIK this is not something configurable in hardware,
 and the driver just gives readouts and status updates.



 There are some devices that only have 'AC-IN' instead of usb/otg power
 (set-top boxes) so having the devices tell what power sources they
 have makes sense (otherwise those that have ac-in instead of otg would
 have to disable usb_power_supply) and avoids confusion by explicitly
 stating presence in device dts.



 That's true. But this is a bit of hardware inside the AXP.
 If it's power isn't routed, it should report it, shouldn't it?



 If the device does not use the input there are two cases:
 - ac-in and usb/otg in short-circuited (there is a bit in AXP registers
 to provide this indication)
 - the unused one is just not connected/connectable

 In either case the voltage of the unused/unusable branch is not really
 useful, nor is it useful to have it show up in sysfs.



 Exactly my thinking on this, +1 .

 And normal users would probably expect to read the input
 voltage/current/status through sysfs (or maybe hwmon?),
 instead of not finding the device and having to look through
 the DTS.



 Only those supplies effectively present (in-use or with connectors
 to eventually use them) should be visible in sysfs.
 Having more of them will just confuse the users, they would be searching
 how they can connect the supply while there is no means to do so
 except soldering to the tiny AXP pins.



 +1


 OK. So mostly tablets and dev boards would benefit from having both
 power supplies. Is there a preference for usb-power-supply over
 vbus-det-gpio if both are available? Or just list them both and
 let the driver sort it out?


 So far I've simply stuck with whatever the fex file uses, if both
 are specified the driver will prefer the gpio, but that is not
 documented behavior. IMHO it would be better to pick and specify
 only one.

From a functional standpoint, if usb-power-supply is available,
using it would be better because:

a) VBUS detection should be much better (IIRC cutoff at 4.4V)
b) Controllable max current draw
c) Can see the current draw

Of course not all boards would work. I think I even have a board
that is only half powered on when only USB VBUS is used.

ChenYu

-- 
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[linux-sunxi] Re: [PATCH 4/5] ARM: dts: sun8i: Enable USB DRC on Ippo Q8H-A33 tablet

2015-07-31 Thread Maxime Ripard
Hi,

On Fri, Jul 31, 2015 at 10:59:53AM +0200, Hans de Goede wrote:
 Enable the otg/drc usb controller on the Ippo Q8H-A33 tablet, for now it
 is enabled in host-only mode, because true OTG support requires support
 for detecting and enabling Vbus through the axp221 pmic.
 
 For this to work the Vbus on the port must be enabled by u-boot,
 or a powered hub must be used.

A comment on top of the usb_otg node stating that would be great. It
stands out more when we want to refactor stuff (with a FIXME even?).

Thanks,
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

-- 
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: Digital signature


[linux-sunxi] Re: [PATCH 1/5] ARM: dts: sun4i: Enable USB DRC on A10 OLinuxIno Lime

2015-07-31 Thread Maxime Ripard
1;3803;0c
On Fri, Jul 31, 2015 at 10:59:50AM +0200, Hans de Goede wrote:
 From: Remy van Elst re...@relst.nl
 
 Enable the otg/drc usb controller on the A10 OLinuxIno Lime.
 
 Signed-off-by: Remy van Elst re...@relst.nl
 Signed-off-by: Hans de Goede hdego...@redhat.com

Applied, thanks!

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

-- 
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: Digital signature


[linux-sunxi] [PATCH 2/3] ARM: dts: sun5i: hsg-h702: Enable USB OTG controller

2015-07-31 Thread Chen-Yu Tsai
Signed-off-by: Chen-Yu Tsai w...@csie.org
---
 arch/arm/boot/dts/sun5i-a13-hsg-h702.dts | 41 
 1 file changed, 41 insertions(+)

diff --git a/arch/arm/boot/dts/sun5i-a13-hsg-h702.dts 
b/arch/arm/boot/dts/sun5i-a13-hsg-h702.dts
index 4b8808ab9711..672f88a8bfbe 100644
--- a/arch/arm/boot/dts/sun5i-a13-hsg-h702.dts
+++ b/arch/arm/boot/dts/sun5i-a13-hsg-h702.dts
@@ -130,6 +130,10 @@
status = okay;
 };
 
+otg_sram {
+   status = okay;
+};
+
 pio {
mmc0_cd_pin_h702: mmc0_cd_pin@0 {
allwinner,pins = PG0;
@@ -137,6 +141,27 @@
allwinner,drive = SUN4I_PINCTRL_10_MA;
allwinner,pull = SUN4I_PINCTRL_PULL_UP;
};
+
+   usb0_id_detect_pin: usb0_id_detect_pin@0 {
+   allwinner,pins = PG2;
+   allwinner,function = gpio_in;
+   allwinner,drive = SUN4I_PINCTRL_10_MA;
+   allwinner,pull = SUN4I_PINCTRL_PULL_UP;
+   };
+
+   usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 {
+   allwinner,pins = PG1;
+   allwinner,function = gpio_in;
+   allwinner,drive = SUN4I_PINCTRL_10_MA;
+   allwinner,pull = SUN4I_PINCTRL_NO_PULL;
+   };
+
+   usb0_vbus_pin_a: usb0_vbus_pin@0 {
+   allwinner,pins = PG12;
+   allwinner,function = gpio_out;
+   allwinner,drive = SUN4I_PINCTRL_10_MA;
+   allwinner,pull = SUN4I_PINCTRL_NO_PULL;
+   };
 };
 
 #include axp209.dtsi
@@ -172,13 +197,29 @@
regulator-name = vcc-wifi;
 };
 
+reg_usb0_vbus {
+   pinctrl-0 = usb0_vbus_pin_a;
+   gpio = pio 6 12 GPIO_ACTIVE_HIGH; /* PG12 */
+   status = okay;
+};
+
 uart1 {
pinctrl-names = default;
pinctrl-0 = uart1_pins_b;
status = okay;
 };
 
+usb_otg {
+   dr_mode = otg;
+   status = okay;
+};
+
 usbphy {
+   pinctrl-names = default;
+   pinctrl-0 = usb0_id_detect_pin, usb0_vbus_detect_pin;
+   usb0_id_det-gpios = pio 6 2 GPIO_ACTIVE_HIGH; /* PG2 */
+   usb0_vbus_det-gpios = pio 6 1 GPIO_ACTIVE_HIGH; /* PG1 */
+   usb0_vbus-supply = reg_usb0_vbus;
usb1_vbus-supply = reg_ldo3;
status = okay;
 };
-- 
2.5.0

-- 
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[linux-sunxi] [PATCH 0/3] ARM: dts: sun5i: hsg-h702: Enable USB OTG and LRADC keys

2015-07-31 Thread Chen-Yu Tsai
Hi Maxime,

This series enables USB OTG and the volume buttons on the side of
the HSG-H702 tablet.

The third patch is just for reference, as the axp209 usb power supply
driver hasn't been merged yet.


Regards
ChenYu


Chen-Yu Tsai (3):
  ARM: dts: sun5i: hsg-h702: Enable side volume buttons with LRADC
  ARM: dts: sun5i: hsg-h702: Enable USB OTG controller
  ARM: dts: sun5i: hsg-h702: Enable AXP209 USB power supply

 arch/arm/boot/dts/sun5i-a13-hsg-h702.dts | 65 
 1 file changed, 65 insertions(+)

-- 
2.5.0

-- 
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[linux-sunxi] Re: [PATCH 2/5] ARM: dts: sun5i: Enable USB DRC on A10s OLinuxIno Micro

2015-07-31 Thread Maxime Ripard
On Fri, Jul 31, 2015 at 10:59:51AM +0200, Hans de Goede wrote:
 Enable the otg/drc usb controller on the A10s OLinuxIno Micro.
 
 Note the A10s OlinuxIno Micro always has some voltage on its otg power
 pin, even if the usb-vbus0-regulator is disabled, the leaked voltage is
 enough to make vbus-det always report 1, so we do not use vbus-det on
 this board.
 
 Signed-off-by: Hans de Goede hdego...@redhat.com
 ---
  arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts | 30 
 +++-
  1 file changed, 29 insertions(+), 1 deletion(-)
 
 diff --git a/arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts 
 b/arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts
 index 7b26e17..5eebd21 100644
 --- a/arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts
 +++ b/arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts
 @@ -196,6 +196,10 @@
   status = okay;
  };
  
 +otg_sram {
 + status = okay;
 +};
 +
  pio {
   mmc0_cd_pin_olinuxino_micro: mmc0_cd_pin@0 {
   allwinner,pins = PG1;
 @@ -224,6 +228,22 @@
   allwinner,drive = SUN4I_PINCTRL_10_MA;
   allwinner,pull = SUN4I_PINCTRL_NO_PULL;
   };
 +
 + usb0_vbus_pin_a: usb0_vbus_pin@0 {
 + allwinner,pins = PG11;
 + };

We usually have this as a reference, instead of doing it through the
full path.

It makes it clearer that we override something, and we don't define a
new node.

Thanks,
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

-- 
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: Digital signature


[linux-sunxi] Re: [PATCH 3/5] ARM: dts: sun5i: Enable USB DRC on A13 OLinuxIno

2015-07-31 Thread Maxime Ripard
On Fri, Jul 31, 2015 at 10:59:52AM +0200, Hans de Goede wrote:
 From: Mark Janssen m...@sig-io.nl
 
 Enable the otg/drc usb controller on the A13 OLinuxIno.
 
 Signed-off-by: Mark Janssen m...@sig-io.nl
 Signed-off-by: Hans de Goede hdego...@redhat.com
 ---
  arch/arm/boot/dts/sun5i-a13-olinuxino.dts | 37 
 +++
  1 file changed, 37 insertions(+)
 
 diff --git a/arch/arm/boot/dts/sun5i-a13-olinuxino.dts 
 b/arch/arm/boot/dts/sun5i-a13-olinuxino.dts
 index 4232400..e659482 100644
 --- a/arch/arm/boot/dts/sun5i-a13-olinuxino.dts
 +++ b/arch/arm/boot/dts/sun5i-a13-olinuxino.dts
 @@ -159,6 +159,10 @@
   status = okay;
  };
  
 +otg_sram {
 + status = okay;
 +};
 +
  pio {
   mmc0_cd_pin_olinuxino: mmc0_cd_pin@0 {
   allwinner,pins = PG0;
 @@ -174,6 +178,24 @@
   allwinner,pull = SUN4I_PINCTRL_NO_PULL;
   };
  
 + usb0_id_detect_pin: usb0_id_detect_pin@0 {
 + allwinner,pins = PG2;
 + allwinner,function = gpio_in;
 + allwinner,drive = SUN4I_PINCTRL_10_MA;
 + allwinner,pull = SUN4I_PINCTRL_PULL_UP;
 + };
 +
 + usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 {
 + allwinner,pins = PG1;
 + allwinner,function = gpio_in;
 + allwinner,drive = SUN4I_PINCTRL_10_MA;
 + allwinner,pull = SUN4I_PINCTRL_PULL_DOWN;
 + };
 +
 + usb0_vbus_pin_a: usb0_vbus_pin@0 {
 + allwinner,pins = PG12;
 + };

Same thing here than in patch 2.

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

-- 
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: Digital signature


[linux-sunxi] Re: [PATCH 0/3] ARM: dts: sun5i: hsg-h702: Enable USB OTG and LRADC keys

2015-07-31 Thread Chen-Yu Tsai
On Fri, Jul 31, 2015 at 6:12 PM, Chen-Yu Tsai w...@csie.org wrote:
 On Fri, Jul 31, 2015 at 6:11 PM, Chen-Yu Tsai w...@csie.org wrote:
 Hi Maxime,

 This series enables USB OTG and the volume buttons on the side of
 the HSG-H702 tablet.

 Sorry, please ignore. Something bad happened when I split the patches.

PEBCAK .. The series doesn't compile because of the last patch.

Anyway, since you had some comments on the patches Hans posted, I'll
fix up the same issues in mine as well.

ChenYu

 The third patch is just for reference, as the axp209 usb power supply
 driver hasn't been merged yet.


 Regards
 ChenYu


 Chen-Yu Tsai (3):
   ARM: dts: sun5i: hsg-h702: Enable side volume buttons with LRADC
   ARM: dts: sun5i: hsg-h702: Enable USB OTG controller
   ARM: dts: sun5i: hsg-h702: Enable AXP209 USB power supply

  arch/arm/boot/dts/sun5i-a13-hsg-h702.dts | 65 
 
  1 file changed, 65 insertions(+)

 --
 2.5.0


-- 
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] Re: [PATCH 5/5] ARM: dts: sun7i: Add dts file for Wits Pro A20 DKT

2015-07-31 Thread Chen-Yu Tsai
On Fri, Jul 31, 2015 at 6:20 PM, Maxime Ripard
maxime.rip...@free-electrons.com wrote:
 On Fri, Jul 31, 2015 at 10:59:54AM +0200, Hans de Goede wrote:
 From: Jelle de Jong jelledej...@powercraft.nl

 The Wits Pro A20 DKT is an A20 Development KiT with 1G RAM, 4G NAND,
 sdio wifi, 1Gbit ethernet, 1024x768 lcd screen with ft5x_ts touchscreen
 and a ton of IO connectors.

 Note there seem to be multiple sdcard slots on the board (4 in total), but
 other then mmc0 none of these are hooked up by default, there is a ton of
 dip-switches which likely allow hooking some of these up, but the
 documentation of the board only describes the use of a fraction of them,
 so for now we only support mmc0.

 Signed-off-by: Jelle de Jong jelledej...@powercraft.nl
 Signed-off-by: Hans de Goede hdego...@redhat.com
 ---
 Also see: http://www.merrii.com/en/pla_d.asp?id=163
 ---
  arch/arm/boot/dts/Makefile   |   3 +-
  arch/arm/boot/dts/sun7i-a20-wits-pro-a20-dkt.dts | 209 
 +++
  2 files changed, 211 insertions(+), 1 deletion(-)
  create mode 100644 arch/arm/boot/dts/sun7i-a20-wits-pro-a20-dkt.dts

 diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
 index f830e1f..151a413 100644
 --- a/arch/arm/boot/dts/Makefile
 +++ b/arch/arm/boot/dts/Makefile
 @@ -595,7 +595,8 @@ dtb-$(CONFIG_MACH_SUN7I) += \
   sun7i-a20-orangepi-mini.dtb \
   sun7i-a20-pcduino3.dtb \
   sun7i-a20-pcduino3-nano.dtb \
 - sun7i-a20-wexler-tab7200.dtb
 + sun7i-a20-wexler-tab7200.dtb \
 +sun7i-a20-wits-pro-a20-dkt.dtb

 The indentation is off.

  dtb-$(CONFIG_MACH_SUN8I) += \
   sun8i-a23-evb.dtb \
   sun8i-a23-ippo-q8h-v5.dtb \
 diff --git a/arch/arm/boot/dts/sun7i-a20-wits-pro-a20-dkt.dts 
 b/arch/arm/boot/dts/sun7i-a20-wits-pro-a20-dkt.dts
 new file mode 100644
 index 000..db4d32c
 --- /dev/null
 +++ b/arch/arm/boot/dts/sun7i-a20-wits-pro-a20-dkt.dts
 @@ -0,0 +1,209 @@
 +/*
 + * Copyright 2015 Jelle de Jong jelledej...@powercraft.nl
 + *
 + * 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 sun7i-a20.dtsi
 +#include sunxi-common-regulators.dtsi
 +
 +#include dt-bindings/gpio/gpio.h
 +#include dt-bindings/input/input.h
 +#include dt-bindings/interrupt-controller/irq.h
 +
 +/ {
 + model = Wits Pro A20 DKT;
 + compatible = wits,pro-a20-dkt, allwinner,sun7i-a20;
 +
 + aliases {
 + serial0 = uart0;
 + };
 +
 + chosen {
 + stdout-path = serial0:115200n8;
 + };
 +
 + reg_vmmc3: vmmc3 {
 + compatible = regulator-fixed;
 + pinctrl-names = default;
 + pinctrl-0 = vmmc3_pin_ap6xxx_wl_regon;
 + regulator-name = vmmc3;
 + regulator-min-microvolt = 330;
 + regulator-max-microvolt = 330;
 + enable-active-high;
 + gpio = pio 7 9 GPIO_ACTIVE_HIGH; /* PH9 */
 + };

 It's not really vmmc. The reg_on stuff is actually more of a reset
 line: when tied to VCC, the WLAN part of the chip and 

[linux-sunxi] Re: [PATCH 0/3] ARM: dts: sun5i: hsg-h702: Enable USB OTG and LRADC keys

2015-07-31 Thread Chen-Yu Tsai
On Fri, Jul 31, 2015 at 6:11 PM, Chen-Yu Tsai w...@csie.org wrote:
 Hi Maxime,

 This series enables USB OTG and the volume buttons on the side of
 the HSG-H702 tablet.

Sorry, please ignore. Something bad happened when I split the patches.

 The third patch is just for reference, as the axp209 usb power supply
 driver hasn't been merged yet.


 Regards
 ChenYu


 Chen-Yu Tsai (3):
   ARM: dts: sun5i: hsg-h702: Enable side volume buttons with LRADC
   ARM: dts: sun5i: hsg-h702: Enable USB OTG controller
   ARM: dts: sun5i: hsg-h702: Enable AXP209 USB power supply

  arch/arm/boot/dts/sun5i-a13-hsg-h702.dts | 65 
 
  1 file changed, 65 insertions(+)

 --
 2.5.0


-- 
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.