[linux-sunxi] Re: [RFC Patch 1/4] mfd: AXP20x: Add power supply bindings documentation

2014-11-04 Thread Bruno Prémont
Hi Maxime,

On Tue, 21 October 2014 Maxime Ripard maxime.rip...@free-electrons.com wrote:
 On Tue, Oct 21, 2014 at 06:09:16PM +0200, Bruno Prémont wrote:
  On Tue, 21 October 2014 Lee Jones lee.jo...@linaro.org wrote:
   On Mon, 20 Oct 2014, Bruno Prémont wrote:
---
Note: the OCV values seem to have some defaults build into the
PMIC though may need adjustment if the used battery has a different
open circuit voltage curve.
As far as understood (these values are set in vendor driver but not
mentioned in chip documentation) they represent charge percentage
for some predefined voltages.

If prefixing these values with x-power, is preferred the following
patch should becomes a dependency:
  
http://lists.infradead.org/pipermail/linux-arm-kernel/2014-June/267606.html
and users in patch 2/4, 4/4 need adjusting.


 Documentation/devicetree/bindings/mfd/axp20x.txt |   20 +
 1 files changed, 20 insertions(+), 0 deletion(-)

diff --git a/Documentation/devicetree/bindings/mfd/axp20x.txt 
b/Documentation/devicetree/bindings/mfd/axp20x.txt
index cc9e01b..8ea681c 100644
--- a/Documentation/devicetree/bindings/mfd/axp20x.txt
+++ b/Documentation/devicetree/bindings/mfd/axp20x.txt
@@ -28,6 +28,20 @@ Required properties:
  (range: 750-1875). Default: 1.5MHz
 
 Optional properties for DCDCs:
+- backup: Settings for backup/RTC battery charger
+ (Voltage in µV, current in µA)
+ If not present, charger will be left untouched
+- battery.ocv: OCV capacity curve points (16 data values)
+- battery.resistance: internal battery resistance in mΩ
+  (defaults to 100mΩ)
+- battery.capacity: Battery capacity in mAh
+   If this attribute is missing, charger will be 
disabled
+   unless there is a battery connected.
+- battery.temp_sensor: Description of temperautre sensor, 3 values
+  - driver current (20µA, 40µA, 60µA or 80µA)
+  - low temperature warning level (in µV)
+  - high temperature warning level (in µV)
+  If missing, temperature sensor gets disabled
 - x-powers,dcdc-workmode: 1 for PWM mode, 0 for AUTO mode
  Default: AUTO mode
 
@@ -49,6 +63,12 @@ axp209: pmic@34 {
ldo3in-supply = axp_ipsout_reg;
ldo5in-supply = axp_ipsout_reg;
 
+   backup = 300 200;
+   battery.ocv = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;
+   battery.resistance = 0;
+   battery.capacity = 2000;
+   battery.temp_sensor = 20 100 400;
   
   Since when do we use '.'s in property names?
  
  I've not found guidelines on this, but whatever is the right way to
  name them, I'm open for suggestions.
 
 You can take a look at the ePAPR specs. Even if it's quite outdated,
 it still puts you in the right mindset.

There seems to be some kind of e-mail wall in front of this document.

 That being said, since they are driver-specific properties, they
 should be prefixed by the vendor name (here x-powers).
 
 And I think they all belong in a sub-node, just like what's been done
 for the regulators.

Doing something like this?:

--- a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
+++ b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
@@ -126,9 +126,11 @@
interrupt-controller;
#interrupt-cells = 1;
 
-   backup = 300 200;
-   battery.resistance = 100;
-   battery.capacity = 2000;
+   x-powers,backup = 300 200;
+   battery: battery@0 {
+   x-powers,resistance = 100;
+   x-powers,capacity = 2000;
+   };
};
};

What are the rules to define the label after the colon?
Looking at the existing nodes it's either some address or a number...


and then the following in driver code (also adjusting the other
property names accessed)?:

@@ -678,11 +677,11 @@ static int axp20x_battery_config(struct platform_device 
*pdev,
if (ret)
return ret;
 
-   np = of_node_get(axp20x-dev-of_node);
+   np = of_find_node_by_name(axp20x-dev-of_node, battery);
if (!np)
return -ENODEV;
 
-   ret = of_property_read_u32_array(np, battery.ocv, ocv, 16);
+   ret = of_property_read_u32_array(np, x-powers,ocv, ocv, 16);
for (i = 0; ret == 0  i  ARRAY_SIZE(ocv); i++)
if (ocv[i]  100) {
dev_warn(pdev-dev, OCV[%d] %u  100\n, i, ocv[i]);


Bruno

-- 
You received this message because you are subscribed to the Google Groups 

[linux-sunxi] Re: iNet K70E board

2014-11-04 Thread zyannawaz
hello guys i need the firmware for my tablet which is inet k70e rev01 please 
anyone can give me? i flashed the wrong firmware now the wifi, and the auto 
rotation doesnt work. any help is appreciated

-- 
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: [RFC Patch 2/4] mfd: AXP20x: Add power supply sub-driver

2014-11-04 Thread Bruno Prémont
On Thu, 23 October 2014 Edgar Toernig fro...@gmx.de wrote:
  +   getnstimeofday(ts);
  +   /* only query hardware if our data is stale */
  +   spin_lock(devdata-lock);
  +   if (!init  !(ts.tv_sec  devdata-next_check.tv_sec ||
  +  ts.tv_nsec  devdata-next_check.tv_sec)) {
  +   spin_unlock(devdata-lock);
  +   return 0;
  +   }
  +   spin_unlock(devdata-lock);
 
 That time comparison is broken - it compares nsec with sec and
 doesn't check that secs are equal before comparing the nsecs.
 There's timespec_compare which gets it right.

Oops, yeah, going to switch to timespec_compare().
Thanks for spotting!

 Btw, you are aware that the timeofday is a user adjustable
 value?  If I ever turn back system time I won't get power
 data any more until the old (future) time is reached.

Huh, no, I didn't consider that.

 Wouldn't it be easier to simply use jiffies and limit the
 poll rate to one second or so?

I considered limiting to some arbitrary polling rate though think
it's better to give users the option to query values more often,
up to the rate at which the value are measured by AXP.
As the AXP's measurement rate is configurable (not exposed by
driver) it's better to base on that setting instead of having
to care at the time of exposing the configuration knob.

Thus jiffies seem to be a bit at their limit. Is using ktime better?


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.


Re: [linux-sunxi] Re: iNet K70E board

2014-11-04 Thread Luc Verhaegen
On Tue, Nov 04, 2014 at 01:51:58AM -0800, zyanna...@gmail.com wrote:
 hello guys i need the firmware for my tablet which is inet k70e rev01 please 
 anyone can give me? i flashed the wrong firmware now the wifi, and the auto 
 rotation doesnt work. any help is appreciated

Nope.

http://linux-sunxi.org/Inet_k70e lacks the really reall important bits.

Luc Verhaegen.

-- 
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: [RFC Patch 1/4] mfd: AXP20x: Add power supply bindings documentation

2014-11-04 Thread Ezaul Zillmer
Hi Bruno

Cubieboard2  + Kernel 3.18-rc3

[   15.955655] axp20x-regulator axp20x-regulator: regulators node not found
[   15.962580] LDO1: 1300 mV
[   15.965732] LDO2: at 3000 mV
[   15.969120] LDO3: at 2275 mV
[   15.972314] LDO4: at 2800 mV
[   15.975700] LDO5: at 2800 mV
[   15.979075] DCDC2: at 1400 mV
[   15.982555] DCDC3: at 1250 mV
[   15.985706] axp20x 0-0034: AXP20X driver loaded

What was missing for axp20x work of cubieboard2 dt? 
as poderiar do to run this drive? 

I thank you!

-- 
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: [RFC Patch 1/4] mfd: AXP20x: Add power supply bindings documentation

2014-11-04 Thread Maxime Ripard
Hi Bruno,

On Mon, Nov 03, 2014 at 09:02:44PM +0100, Bruno Prémont wrote: 
 Doing something like this?:
 
 --- a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
 +++ b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
 @@ -126,9 +126,11 @@
 interrupt-controller;
 #interrupt-cells = 1;
  
 -   backup = 300 200;
 -   battery.resistance = 100;
 -   battery.capacity = 2000;
 +   x-powers,backup = 300 200;

I don't really remember what was that property used for. Would it make
sense to put it into the battery node?

 +   battery: battery@0 {
 +   x-powers,resistance = 100;
 +   x-powers,capacity = 2000;
 +   };
 };
 };
 
 What are the rules to define the label after the colon?
 Looking at the existing nodes it's either some address or a number...

It's not called the label, but the node name, and it's defined in the
ePAPR.

It's device-class[@address]

The address being something to identify the node on a bus, so it can
be a chip select number, a memory address, an i2c address,
etc. there's really no absolute answer here.

I don't think you really need one in this case.

 and then the following in driver code (also adjusting the other
 property names accessed)?:
 
 @@ -678,11 +677,11 @@ static int axp20x_battery_config(struct platform_device 
 *pdev,
 if (ret)
 return ret;
  
 -   np = of_node_get(axp20x-dev-of_node);
 +   np = of_find_node_by_name(axp20x-dev-of_node, battery);
 if (!np)
 return -ENODEV;
  
 -   ret = of_property_read_u32_array(np, battery.ocv, ocv, 16);
 +   ret = of_property_read_u32_array(np, x-powers,ocv, ocv, 16);
 for (i = 0; ret == 0  i  ARRAY_SIZE(ocv); i++)
 if (ocv[i]  100) {
 dev_warn(pdev-dev, OCV[%d] %u  100\n, i, ocv[i]);

Yep, it looks sensible.

Maxime

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


signature.asc
Description: Digital signature


Re: [linux-sunxi] Re: iNet K70E board

2014-11-04 Thread Luc Verhaegen
On Tue, Nov 04, 2014 at 06:43:31AM -0800, Zyan Nawaz wrote:
 so i need stock rom for INET K70E REV01 to flash back to stock

Do not take these things off the list.

But yes. And you might consider fixing that device page so you or 
someone else wouldn't have to find the stock image in future and could 
just use our code.

Luc Verhaegen.

-- 
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: Olimex Lime A10 board corrupts SD card

2014-11-04 Thread Dennis Kerrisk
Even at 900Mhz I am still getting corruption on the SD card. 

Dennis

-- 
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: iNet K70E board

2014-11-04 Thread Simos Xenitellis
On Tue, Nov 4, 2014 at 11:51 AM, zyanna...@gmail.com wrote:

 hello guys i need the firmware for my tablet which is inet k70e rev01
 please anyone can give me? i flashed the wrong firmware now the wifi, and
 the auto rotation doesnt work. any help is appreciated


Even if someone has that device, it's not very easy to extract the firmware
so that it can be copied on yours.
Your best chance is to contact the manufacturer at
http://www.inet-tek.com/a/K70/20130831/127.html
so that they upload somewhere the correct firmware file.
If you manage to get some feedback from them, do tell us.

Simos

-- 
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] A20 Booting without uboot

2014-11-04 Thread Ryang HaeDong
Hi All
I'm trying to booting a stripped linux kernel directly from boot.axf on A20.
I already tested booting on the A10 device without uboot. 
Of course A10 is working well but A20's linux kernel isn't booting.
So I changed linux/linux.ini file.

[segment]
img_name = c:\linux\bImage
img_size = 0x200
img_base = 0x40008000

[segment]
img_name = c:\linux\params
img_size = 0x100
img_base = 0x4100

[script_info]
script_base = 0x4300
script_size = 0x1

[logo_info]
logo_name = c:\linux\android.bmp
logo_address = 0x4800
logo_show = 1


Could it be possible?
Any further infomation would be appreciated.

-- 
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 1/6] clk: sunxi: Add support for sun9i a80 usb clocks and resets

2014-11-04 Thread Maxime Ripard
Hi,

On Tue, Nov 04, 2014 at 12:07:14PM +0800, Chen-Yu Tsai wrote:
 The USB controller/phy clocks and reset controls are in a separate
 address block, unlike previous SoCs where they were in the clock
 controller.
 
 This patch copies the original gates clk functions used for usb
 clocks into a separate file, and renames them to *_usb_*. Also
 add a per-gate parent index, so we can set different parents for
 each gate.
 
 In time we may move the other usb clock drivers to this file.
 
 Signed-off-by: Chen-Yu Tsai w...@csie.org
 ---
  Documentation/devicetree/bindings/clock/sunxi.txt |   5 +
  drivers/clk/sunxi/Makefile|   1 +
  drivers/clk/sunxi/clk-usb.c   | 192 
 ++
  3 files changed, 198 insertions(+)
  create mode 100644 drivers/clk/sunxi/clk-usb.c
 
 diff --git a/Documentation/devicetree/bindings/clock/sunxi.txt 
 b/Documentation/devicetree/bindings/clock/sunxi.txt
 index 0455cb9..b953fe5 100644
 --- a/Documentation/devicetree/bindings/clock/sunxi.txt
 +++ b/Documentation/devicetree/bindings/clock/sunxi.txt
 @@ -66,6 +66,8 @@ Required properties:
   allwinner,sun4i-a10-usb-clk - for usb gates + resets on A10 / A20
   allwinner,sun5i-a13-usb-clk - for usb gates + resets on A13
   allwinner,sun6i-a31-usb-clk - for usb gates + resets on A31
 + allwinner,sun9i-a80-usb-mod-clk - for usb gates + resets on A80
 + allwinner,sun9i-a80-usb-phy-clk - for usb phy gates + resets on A80
  
  Required properties for all clocks:
  - reg : shall be the control register address for the clock.
 @@ -82,6 +84,9 @@ Required properties for all clocks:
  And allwinner,*-usb-clk clocks also require:
  - reset-cells : shall be set to 1
  
 +allwinner,sun9i-a80-usb-*-clk clocks require:
 +- clocks : shall be the usb hci ahb1 gate and peripheral pll clocks
 +

In this particular order, I assume?

  For allwinner,sun7i-a20-gmac-clk, the parent clocks shall be fixed rate
  dummy clocks at 25 MHz and 125 MHz, respectively. See example.
  
 diff --git a/drivers/clk/sunxi/Makefile b/drivers/clk/sunxi/Makefile
 index a66953c..f19ce54 100644
 --- a/drivers/clk/sunxi/Makefile
 +++ b/drivers/clk/sunxi/Makefile
 @@ -8,6 +8,7 @@ obj-y += clk-a20-gmac.o
  obj-y += clk-mod0.o
  obj-y += clk-sun8i-mbus.o
  obj-y += clk-sun9i-core.o
 +obj-y += clk-usb.o
  
  obj-$(CONFIG_MFD_SUN6I_PRCM) += \
   clk-sun6i-ar100.o clk-sun6i-apb0.o clk-sun6i-apb0-gates.o \
 diff --git a/drivers/clk/sunxi/clk-usb.c b/drivers/clk/sunxi/clk-usb.c
 new file mode 100644
 index 000..d92ee36
 --- /dev/null
 +++ b/drivers/clk/sunxi/clk-usb.c
 @@ -0,0 +1,192 @@
 +/*
 + * Copyright 2013 Emilio López
 + *
 + * Emilio López emi...@elopez.com.ar
 + *
 + * This program 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 program 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.
 + */
 +
 +#include linux/clk-provider.h
 +#include linux/clkdev.h
 +#include linux/of.h
 +#include linux/of_address.h
 +#include linux/reset-controller.h
 +#include linux/spinlock.h
 +
 +
 +/**
 + * sunxi_usb_reset... - reset bits in usb clk registers handling
 + */
 +
 +struct usb_reset_data {
 + void __iomem*reg;
 + spinlock_t  *lock;
 + struct reset_controller_dev rcdev;
 +};
 +
 +static int sunxi_usb_reset_assert(struct reset_controller_dev *rcdev,
 +   unsigned long id)
 +{
 + struct usb_reset_data *data = container_of(rcdev,
 +struct usb_reset_data,
 +rcdev);
 + unsigned long flags;
 + u32 reg;
 +
 + spin_lock_irqsave(data-lock, flags);
 +
 + reg = readl(data-reg);
 + writel(reg  ~BIT(id), data-reg);
 +
 + spin_unlock_irqrestore(data-lock, flags);
 +
 + return 0;
 +}
 +
 +static int sunxi_usb_reset_deassert(struct reset_controller_dev *rcdev,
 + unsigned long id)
 +{
 + struct usb_reset_data *data = container_of(rcdev,
 +  struct usb_reset_data,
 +  rcdev);
 + unsigned long flags;
 + u32 reg;
 +
 + spin_lock_irqsave(data-lock, flags);
 +
 + reg = readl(data-reg);
 + writel(reg | BIT(id), data-reg);
 +
 + spin_unlock_irqrestore(data-lock, flags);
 +
 + return 0;
 +}
 +
 +static struct reset_control_ops sunxi_usb_reset_ops = {
 + .assert = sunxi_usb_reset_assert,
 + .deassert   = sunxi_usb_reset_deassert,
 +};
 +
 +/**
 + * sunxi_usb_clk_setup() - 

[linux-sunxi] Re: [PATCH 3/6] phy: Add driver to support individual USB PHYs on sun9i

2014-11-04 Thread Maxime Ripard
On Tue, Nov 04, 2014 at 12:07:16PM +0800, Chen-Yu Tsai wrote:
 Unlike previous Allwinner SoCs, there is no central PHY control block
 on the A80. Also, OTG support is completely split off into a different
 controller.
 
 This adds a new driver to support the regular USB PHYs.
 
 Signed-off-by: Chen-Yu Tsai w...@csie.org
 ---
  .../devicetree/bindings/phy/sun9i-usb-phy.txt  |  34 +++
  drivers/phy/Kconfig|  12 ++
  drivers/phy/Makefile   |   1 +
  drivers/phy/phy-sun9i-usb.c| 227 
 +
  4 files changed, 274 insertions(+)
  create mode 100644 Documentation/devicetree/bindings/phy/sun9i-usb-phy.txt
  create mode 100644 drivers/phy/phy-sun9i-usb.c
 
 diff --git a/Documentation/devicetree/bindings/phy/sun9i-usb-phy.txt 
 b/Documentation/devicetree/bindings/phy/sun9i-usb-phy.txt
 new file mode 100644
 index 000..27a6067
 --- /dev/null
 +++ b/Documentation/devicetree/bindings/phy/sun9i-usb-phy.txt
 @@ -0,0 +1,34 @@
 +Allwinner sun9i USB PHY
 +---
 +
 +Required properties:
 +- compatible : should be one of
 +  * allwinner,sun9i-a80-usb-phy
 +- reg : a list of offset + length pairs
 +- #phy-cells : from the generic phy bindings, must be 0
 +- clocks : phandle + clock specifier for the phy clocks
 +- clock-names :
 +  * phy for normal USB
 +  * hsic_480M, hsic_12M for HSIC

Do you need all of them? phy and one of the hsic one?

 +- resets : a list of phandle + reset specifier pairs
 +- reset-names :
 +  * phy for normal USB
 +  * hsic for HSIC
 +- phy_type : hsic for HSIC usage;
 +  other values or absence of this property indicates normal USB
 +
 +It is recommended to list all clocks and resets available.
 +The driver will only use those matching the phy_type.
 +
 +Example:
 + usbphy1: phy@00a01800 {
 + compatible = allwinner,sun9i-a80-usb-phy;
 + reg = 0x00a01800 0x4;
 + clocks = usb_phy_clk 2, usb_phy_clk 10,
 +usb_phy_clk 3;
 + clock-names = hsic_480M, hsic_12M, phy;
 + resets = usb_phy_clk 18, usb_phy_clk 19;
 + reset-names = hsic, phy;
 + status = disabled;
 + #phy-cells = 0;
 + };
 diff --git a/drivers/phy/Kconfig b/drivers/phy/Kconfig
 index 2a436e6..f5b7fbb 100644
 --- a/drivers/phy/Kconfig
 +++ b/drivers/phy/Kconfig
 @@ -153,6 +153,18 @@ config PHY_SUN4I_USB
 This driver controls the entire USB PHY block, both the USB OTG
 parts, as well as the 2 regular USB 2 host PHYs.
  
 +config PHY_SUN9I_USB
 + tristate Allwinner sun9i SoC USB PHY driver
 + depends on ARCH_SUNXI  HAS_IOMEM  OF
 + depends on RESET_CONTROLLER
 + select USB_PHY
 + select GENERIC_PHY
 + help
 +   Enable this to support the transceiver that is part of Allwinner
 +   sun9i SoCs.
 +
 +   This driver controls each individual USB 2 host PHY.
 +
  config PHY_SAMSUNG_USB2
   tristate Samsung USB 2.0 PHY driver
   depends on HAS_IOMEM
 diff --git a/drivers/phy/Makefile b/drivers/phy/Makefile
 index c4590fc..c3977dc 100644
 --- a/drivers/phy/Makefile
 +++ b/drivers/phy/Makefile
 @@ -17,6 +17,7 @@ obj-$(CONFIG_TWL4030_USB)   += phy-twl4030-usb.o
  obj-$(CONFIG_PHY_EXYNOS5250_SATA)+= phy-exynos5250-sata.o
  obj-$(CONFIG_PHY_HIX5HD2_SATA)   += phy-hix5hd2-sata.o
  obj-$(CONFIG_PHY_SUN4I_USB)  += phy-sun4i-usb.o
 +obj-$(CONFIG_PHY_SUN9I_USB)  += phy-sun9i-usb.o
  obj-$(CONFIG_PHY_SAMSUNG_USB2)   += phy-exynos-usb2.o
  phy-exynos-usb2-y+= phy-samsung-usb2.o
  phy-exynos-usb2-$(CONFIG_PHY_EXYNOS4210_USB2)+= phy-exynos4210-usb2.o
 diff --git a/drivers/phy/phy-sun9i-usb.c b/drivers/phy/phy-sun9i-usb.c
 new file mode 100644
 index 000..f9085d9
 --- /dev/null
 +++ b/drivers/phy/phy-sun9i-usb.c
 @@ -0,0 +1,227 @@
 +/*
 + * Allwinner sun9i USB phy driver
 + *
 + * Copyright (C) 2014 Chen-Yu Tsai w...@csie.org
 + *
 + * Based on phy-sun9i.c from

I doubt this is the file you were thinking of :)

 + * Hans de Goede hdego...@redhat.com
 + *
 + * and code from
 + * Allwinner Technology Co., Ltd. www.allwinnertech.com
 + *
 + * This program 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 program 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.
 + */
 +
 +#include linux/clk.h
 +#include linux/err.h
 +#include linux/io.h
 +#include linux/kernel.h
 +#include linux/module.h
 +#include linux/mutex.h
 +#include linux/of.h
 +#include linux/of_address.h
 +#include linux/phy/phy.h
 

[linux-sunxi] Re: [PATCH 1/6] clk: sunxi: Add support for sun9i a80 usb clocks and resets

2014-11-04 Thread Russell King - ARM Linux
On Tue, Nov 04, 2014 at 12:07:14PM +0800, Chen-Yu Tsai wrote:
 + spin_lock_irqsave(data-lock, flags);
 +
 + reg = readl(data-reg);
 + writel(reg  ~BIT(id), data-reg);
 +
 + spin_unlock_irqrestore(data-lock, flags);

Don't we have generic support for atomic modification of register
values?  Hmm, we have it for ARM only - atomic_io_modify() and
atomic_io_modify_relaxed().

I guess we should push for those to become cross-arch if we end up
with generic drivers shared between other architectures.

-- 
FTTC broadband for 0.8mile line: currently at 9.5Mbps down 400kbps up
according to speedtest.net.

-- 
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] HDMI drivers for banana pi for 3.14.6

2014-11-04 Thread Prajosh Premdas
Hi 

Thanks for the info. I want to know one more thing is the I2C driver 
avaliable for 3.14. I find in the 
note http://linux-sunxi.org/Linux_mainlining_effort#Merged_into_3.13 I2C 
driver for A20 but could not figure out in any branches?

Regards
Prajosh Premdas

On Monday, November 3, 2014 11:42:48 AM UTC+1, Andreas Baierl wrote:

  Hi,
 there is no display support in mainline kernel.
 The latest kernel, that supports display is the sunxi-3.4 kernel of the 
 linux-sunxi community.
 Regards

 Am 03.11.2014 10:55, schrieb Prajosh Premdas:
  
 Hi  

  I am trying to bring up HDMI support for banana PI on kernel 3.14.6 and 
 i could not find the HDMI driver.

  I find that the drivers are there at:

  
 https://github.com/linux-sunxi/linux-sunxi/blob/lichee-3.0.8-sun4i/drivers/video/sun4i/hdmi/aw/hdmi_core.c
  
  
 https://github.com/amery/linux-sunxi/tree/import/lichee-3.3/a20-dev/drivers/video/sun7i
  
  for 3.0.8 and 3.3 kernel but not anything after that.

  Could any body point to any other source for latest kernel?

  Regards
 Prajosh Premdas
  -- 
 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...@googlegroups.com javascript:.
 For more options, visit https://groups.google.com/d/optout.


  

-- 
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: [RFC Patch 1/4] mfd: AXP20x: Add power supply bindings documentation

2014-11-04 Thread Bruno Prémont
Hi Maxime,

On Tue, 04 November 2014 Maxime Ripard maxime.rip...@free-electrons.com wrote:
 On Mon, Nov 03, 2014 at 09:02:44PM +0100, Bruno Prémont wrote: 
  Doing something like this?:
  
  --- a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
  +++ b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
  @@ -126,9 +126,11 @@
  interrupt-controller;
  #interrupt-cells = 1;
   
  -   backup = 300 200;
  -   battery.resistance = 100;
  -   battery.capacity = 2000;
  +   x-powers,backup = 300 200;
 
 I don't really remember what was that property used for. Would it make
 sense to put it into the battery node?

The backup/rtc battery is completely distinct from main battery.

It's presence is in no way related to that of the main battery,
thus I would not put it into the same node.
As all the information needed is included in the property I see
no reason to move it into a separate node.

  +   battery: battery@0 {
  +   x-powers,resistance = 100;
  +   x-powers,capacity = 2000;
  +   };
  };
  };
  
  What are the rules to define the label after the colon?
  Looking at the existing nodes it's either some address or a number...
 
 It's not called the label, but the node name, and it's defined in the
 ePAPR.
 
 It's device-class[@address]
 
 The address being something to identify the node on a bus, so it can
 be a chip select number, a memory address, an i2c address,
 etc. there's really no absolute answer here.
 
 I don't think you really need one in this case.

In that case, I better omit it completely.

  and then the following in driver code (also adjusting the other
  property names accessed)?:
  
  @@ -678,11 +677,11 @@ static int axp20x_battery_config(struct 
  platform_device *pdev,
  if (ret)
  return ret;
   
  -   np = of_node_get(axp20x-dev-of_node);
  +   np = of_find_node_by_name(axp20x-dev-of_node, battery);
  if (!np)
  return -ENODEV;
   
  -   ret = of_property_read_u32_array(np, battery.ocv, ocv, 16);
  +   ret = of_property_read_u32_array(np, x-powers,ocv, ocv, 16);
  for (i = 0; ret == 0  i  ARRAY_SIZE(ocv); i++)
  if (ocv[i]  100) {
  dev_warn(pdev-dev, OCV[%d] %u  100\n, i, 
  ocv[i]);
 
 Yep, it looks sensible.

Thanks,
Bruno


signature.asc
Description: PGP signature


Re: [linux-sunxi] [PATCH] remove sunxi_nand from sun7i_defconfig

2014-11-04 Thread Tim Tisdall
On Friday, 31 October 2014 11:01:24 UTC-4, Siarhei Siamashka wrote:


 Should we also disable NAND for A10 and A13 devices by default? Does 
 anybody know if they are affected? 


I just tried using the latest 3.4 kernel on my Cubieboard and I still have 
no issue accessing the NAND with it.  The sunxi_nand driver the source for 
the A10 nand driver combined with the A20 nand driver to be a single 
driver.  The A20 part doesn't work properly, but the A10 part has no 
issues.  As for the A13, I have no idea if it worked or not, but as the A13 
is just a cut-down version of the A10 I think there should be no problem 
there either.

-Tim 

-- 
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] A20 Booting without uboot

2014-11-04 Thread Jhon Yi
It's definitely possible. But you should first compile a kernel with
kernel argument built in.

2014-11-05 0:55 GMT+08:00 Ryang HaeDong ryanghaed...@gmail.com:
 Hi All
 I'm trying to booting a stripped linux kernel directly from boot.axf on A20.
 I already tested booting on the A10 device without uboot.
 Of course A10 is working well but A20's linux kernel isn't booting.
 So I changed linux/linux.ini file.

 [segment]
 img_name = c:\linux\bImage
 img_size = 0x200
 img_base = 0x40008000

 [segment]
 img_name = c:\linux\params
 img_size = 0x100
 img_base = 0x4100

 [script_info]
 script_base = 0x4300
 script_size = 0x1

 [logo_info]
 logo_name = c:\linux\android.bmp
 logo_address = 0x4800
 logo_show = 1


 Could it be possible?
 Any further infomation would be appreciated.

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

-- 
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: Olimex Lime A10 board corrupts SD card

2014-11-04 Thread Jhon Yi
Maybe you could try raising the kernel voltage by 0.05V or 0.1V for
each frequency. And you should also check the voltage supply for SD
card.

2014-11-04 23:11 GMT+08:00 Dennis Kerrisk dennisk8...@gmail.com:
 Even at 900Mhz I am still getting corruption on the SD card.

 Dennis

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

-- 
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] A20 Booting without uboot

2014-11-04 Thread Ryang HaeDong
Hi Jhon

I used /linux/params file for kernel argument.
   console=ttyS0,115200 loglevel=9 root=/dev/nandb init=/init

Also as you said I tried build a kernel with option Always use the default 
kernel command string
And default kernel command string is equal to contents of params file.

Unfortunately boot.axf doesn't load the stripped linux kernel directly.
Please refer below log.

[   0.414] recovery key high 40, low 4
[   0.421] show pic finish
[   0.421] load kernel start
[   0.624] load kernel successed
[   0.624] start address = 0x4a00
[   0.626] ERR: display driver not open yet
[   0.630] jump to kernel

Can you explain about compile a kernel with kernel argument built in?
Kind Regards,

 

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