[linux-sunxi] [PATCH-3.4] sunxi-mci: incorrect MMC_DMA_DES_BIT_LEFT

2014-03-09 Thread Wills Wang
---
 drivers/mmc/host/sunxi-mci.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/host/sunxi-mci.h b/drivers/mmc/host/sunxi-mci.h
index 1447257..b885c32 100644
--- a/drivers/mmc/host/sunxi-mci.h
+++ b/drivers/mmc/host/sunxi-mci.h
@@ -35,7 +35,7 @@
 #define MMC_MODCLK_PREFIX  "sdc"
 #define MMC3_DMA_TL(0x20070008)
 #define MMC_MAX_DMA_DES_BIT13
-#define MMC_DMA_DES_BIT_LEFT   5
+#define MMC_DMA_DES_BIT_LEFT   6
 #endif
 
 /*-- for sun5i --*/
@@ -250,7 +250,7 @@
 #define SDXC_IDMA_ERR (SDXC_IDMACFatalBusErr|SDXC_IDMACDesInvalid \
|SDXC_IDMACCardErrSum|SDXC_IDMACAbnormalIntSum)
 
-#define SDXC_DES_NUM_SHIFT (MMC_MAX_DMA_DES_BIT)
+#define SDXC_DES_NUM_SHIFT (MMC_MAX_DMA_DES_BIT - 1)
 #define SDXC_DES_BUFFER_MAX_LEN(1U << SDXC_DES_NUM_SHIFT)
 struct sunxi_mmc_idma_des {
u32 config;
-- 
1.8.3.2

-- 
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 u-boot] cmd_gpio: fix warning with GPIO_OSCILLATE

2014-03-09 Thread Olliver Schinagl

Ian,

sorry for not replying earlier, but isn't that a bug-fix against the 
generic U-Boot? In that case, it's probably wise to post it on the 
u-boot mailing list :)


Other then that, I think i fixed most sunxi specific compile errors and 
that one has been annoying me for ages :)


Olliver

On 01/31/14 18:05, Ian Campbell wrote:

In do_gpio value is not initialised in the GPIO_OSCILLATE case:

cmd_gpio.c: In function ‘do_gpio’:
cmd_gpio.c:92:2: warning: ‘value’ may be used uninitialized in this function 
[-Wmaybe-uninitialized]
   return value;
   ^

Returning 0 in this case seems fairly logical.

Signed-off-by: Ian Campbell 
Cc: Henrik Nordstrom 
---
  common/cmd_gpio.c | 1 +
  1 file changed, 1 insertion(+)

diff --git a/common/cmd_gpio.c b/common/cmd_gpio.c
index d551415..a43e89e 100644
--- a/common/cmd_gpio.c
+++ b/common/cmd_gpio.c
@@ -75,6 +75,7 @@ static int do_gpio(cmd_tbl_t *cmdtp, int flag, int argc, char 
* const argv[])
gpio_set_value(gpio, i&1);
}
gpio_direction_input(gpio);
+   value = 0;
} else {
switch (sub_cmd) {
case GPIO_SET:value = 1; break;



--
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 u-boot] cmd_gpio: fix warning with GPIO_OSCILLATE

2014-03-09 Thread Henrik Nordström
GPIO_OSCILLATE is a hack in our u-boot used for measuring PIO
performance. Should likely be removed.

Regards
Henrik


sön 2014-03-09 klockan 20:10 +0100 skrev Olliver Schinagl:
> Ian,
> 
> sorry for not replying earlier, but isn't that a bug-fix against the 
> generic U-Boot? In that case, it's probably wise to post it on the 
> u-boot mailing list :)
> 
> Other then that, I think i fixed most sunxi specific compile errors and 
> that one has been annoying me for ages :)
> 
> Olliver
> 
> On 01/31/14 18:05, Ian Campbell wrote:
> > In do_gpio value is not initialised in the GPIO_OSCILLATE case:
> >
> > cmd_gpio.c: In function ‘do_gpio’:
> > cmd_gpio.c:92:2: warning: ‘value’ may be used uninitialized in this 
> > function [-Wmaybe-uninitialized]
> >return value;
> >^
> >
> > Returning 0 in this case seems fairly logical.
> >
> > Signed-off-by: Ian Campbell 
> > Cc: Henrik Nordstrom 
> > ---
> >   common/cmd_gpio.c | 1 +
> >   1 file changed, 1 insertion(+)
> >
> > diff --git a/common/cmd_gpio.c b/common/cmd_gpio.c
> > index d551415..a43e89e 100644
> > --- a/common/cmd_gpio.c
> > +++ b/common/cmd_gpio.c
> > @@ -75,6 +75,7 @@ static int do_gpio(cmd_tbl_t *cmdtp, int flag, int argc, 
> > char * const argv[])
> > gpio_set_value(gpio, i&1);
> > }
> > gpio_direction_input(gpio);
> > +   value = 0;
> > } else {
> > switch (sub_cmd) {
> > case GPIO_SET:value = 1; break;
> >
> 


-- 
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: Not able to boot ramdisk on cubietruck

2014-03-09 Thread Olliver Schinagl

On 03/09/14 16:18, tyler.ba...@linaro.org wrote:

On Sunday, March 9, 2014 8:06:27 AM UTC-7, tyler...@linaro.org wrote:

Hello,

I am trying to boot the cubietruck with a minimal ramdisk. However, it seems to hang at 
"Starting kernel..." whenever I pass bootz a ramdisk load address.

  I have built the latest cubietruck config from here:

https://github.com/cubieboard/u-boot-sunxi

Here is the boot log: (bootz 0x40008000 0x4200 0x4100)

U-Boot 2014.01-09730-gb5bd4c9 (Mar 09 2014 - 05:55:17) Allwinner Technology

CPU:   Allwinner A20 (SUN7I)
Board: Cubietruck
I2C:   ready
DRAM:  2 GiB
WARNING: Caches not enabled
MMC:   SUNXI SD/MMC: 0
*** Warning - bad CRC, using default environment

In:serial
Out:   serial
Err:   serial
Net:   mii0
Warning: failed to set MAC address

Hit any key to stop autoboot:  0
sun7i# setenv ethaddr 00:11:22:33:44:a3
sun7i# setenv autoload no
sun7i# dhcp
Waiting for PHY auto negotiation to complete... done
ENET Speed is 1000 Mbps - FULL duplex connection
BOOTP broadcast 1
BOOTP broadcast 2
DHCP client bound to address 192.168.1.218
sun7i# setenv serverip 192.168.1.1
sun7i# tftp 0x40008000 192.168.1.1:cubie/zImage
Using mii0 device
TFTP from server 192.168.1.1; our IP address is 192.168.1.218
Filename 'cubie/zImage'.
Load address: 0x40008000
Loading: #
 #
 2.7 MiB/s
done
Bytes transferred = 1779480 (1b2718 hex)
sun7i# tftp 0x4200 192.168.1.1:cubie/buildroot.cpio.gz
Using mii0 device
TFTP from server 192.168.1.1; our IP address is 192.168.1.218
Filename 'cubie/buildroot.cpio.gz'.
Load address: 0x4200
Loading: 
 2.7 MiB/s
done
Bytes transferred = 642602 (9ce2a hex)
sun7i# tftp 0x4100 192.168.1.1:cubie/sun7i-a20-cubietruck.dtb
Using mii0 device
TFTP from server 192.168.1.1; our IP address is 192.168.1.218
Filename 'cubie/sun7i-a20-cubietruck.dtb'.
Load address: 0x4100
Loading: #
 2 MiB/s
done
Bytes transferred = 12304 (3010 hex)
sun7i# setenv bootargs console=ttyS0,115200 debug earlyprintk rw root=/dev/ram0 
rw
sun7i# bootz 0x40008000 0x4200 0x4100
Kernel image @ 0x40008000 [ 0x00 - 0x1b2718 ]
## Loading init Ramdisk from Legacy Image at 4200 ...
Image Name:
Created:  2014-03-09  14:53:18 UTC
Image Type:   ARM Linux RAMDisk Image (uncompressed)
Data Size:642538 Bytes = 627.5 KiB
Load Address: 
Entry Point:  
Verifying Checksum ... OK
## Flattened Device Tree blob at 4100
Booting using the fdt blob at 0x4100
Loading Ramdisk to bfdc9000, end bfe65dea ... OK
Loading Device Tree to 40ff9000, end 40fff00f ... OK

Starting kernel ...

Now if I boot with bootz 0x40008000 - 0x4100 everything works fine:

U-Boot 2014.01-09730-gb5bd4c9 (Mar 09 2014 - 05:55:17) Allwinner Technology

CPU:   Allwinner A20 (SUN7I)
Board: Cubietruck
I2C:   ready
DRAM:  2 GiB
WARNING: Caches not enabled
MMC:   SUNXI SD/MMC: 0
*** Warning - bad CRC, using default environment

In:serial
Out:   serial
Err:   serial
Net:   mii0
Warning: failed to set MAC address

Hit any key to stop autoboot:  0
sun7i# setenv ethaddr 00:11:22:33:44:a3
sun7i# setenv autoload no
sun7i# dhcp
Waiting for PHY auto negotiation to complete.. done
ENET Speed is 1000 Mbps - FULL duplex connection
BOOTP broadcast 1
BOOTP broadcast 2
DHCP client bound to address 192.168.1.218
sun7i# setenv serverip 192.168.1.1
sun7i# tftp 0x40008000 192.168.1.1:cubie/zImage
Using mii0 device
TFTP from server 192.168.1.1; our IP address is 192.168.1.218
Filename 'cubie/zImage'.
Load address: 0x40008000
Loading: #
 #
 2.7 MiB/s
done
Bytes transferred = 1779480 (1b2718 hex)
sun7i# tftp 0x4200 192.168.1.1:cubie/buildroot.cpio.gz
Using mii0 device
TFTP from server 192.168.1.1; our IP address is 192.168.1.218
Filename 'cubie/buildroot.cpio.gz'.
Load address: 0x4200
Loading: 
 2.7 MiB/s
done
Bytes transferred = 642602 (9ce2a hex)
sun7i# tftp 0x4100 192.168.1.1:cubie/sun7i-a20-cubietruck.dtb
Using mii0 device
TFTP from server 192.168.1.1; our IP address is 192.168.1.218
Filename 'cubie/sun7i-a20-cubietruck.dtb'.
Load address: 0x4100
Loading: #
 2 MiB/s
done
Bytes transferred = 12304 (3010 hex)
sun7i# setenv bootargs console=ttyS0,115200 debug earlyprintk rw root=/dev/ram0 
rw
sun7i# bootz 0x40008000 - 0x4100
Kernel image @ 0x40008000 [ 0x00 - 0x1b2718 ]
## Flattened Device Tree blob at 4100
Booting using the fdt blob at 0x4100
Loading Device Tree to 40ff9000, end 40fff00f ... OK

Starting kernel ...

[0.00] Booting Linux on physical CPU 0x0
[0.00] Linux version 3.14.0-rc5-00287-gca62eec 
(buildsl...@vps-1147942-19

Re: [linux-sunxi] [A10] Getting u-boot onto freshly partitioned Nand for booting Linux

2014-03-09 Thread hunter hu
Hi Neal,

Thanks for that.

I have no idea about the magic signing value, I have 3 questions and 
comments:

1> If I just use the original nandb.img which was dd out of the nand 
itself, will that still be needed?
2> if I do create a magic signing value again, how would I do that?
3> would this why my previous lichee-dev u-boot.bin doesn't play well with 
boot0/boot1? did I miss any magic value there?

Thanks,
-Hunter

On Sunday, March 9, 2014 1:25:42 PM UTC-5, npeacock wrote:
>
>  Hello,
>
> Seems like the structure was 
>
> /dev/nandb < u-boot.env with magic signing value
> /dev/nandc < the linux kernel, just dd copied on, make sure to clear with 
> zero in case yours its smaller
> /dev/nandX < the root partition, which was defined in the u-boot.env, so 
> you could make it whatever you want, as long as it matches your env file.  
> If nandj is 5Gb then that is what I would use in my hacky approach.
>
> So is that more clear?  You'll need to put your linux kernel in nandc, 
> your adjusted uboot.env in nandb and your rootfs on a new partition on nandj
>
> I'll try to find the actual script and old images tonight.  I was having a 
> lot of trouble uploading large files and hadn't tried in awhile.
>
> Thanks.
>
> On 3/9/2014 11:07 AM, hunter hu wrote:
>  
> Hi Neal, 
>
>  The link seems broken while I was trying to get the image: wget 
> http://pengpod.com/dl/images/pengpod1000-linaro-flashcard-2013.03.29.img.tar.gz
>
>  However, I can set things up by following the same logic, but I need to 
> confirm one change, for nandb, what changes need to be made? I plan to edit 
> binary image out from my board, there are actually 2 entries for the 
> environment,
>
>  one setup root=/dev/nandc
> the other setup root=/dev/nandd
>
>  according to your notes, we will dd uImage into nandc, so say, if I will 
> use nandj (which is 5G in size) as the rootfs, should I change the both 
> nandc and nandd to nandj or just nandd to nandj?
>
>  Thanks,
> -Hunter
>
> On Saturday, March 8, 2014 10:54:28 PM UTC-6, npeacock wrote: 
>>
>>  Here is a link for what I did on the PengPod where we used the original 
>> u-boot from Android.  
>> http://pengpod.com/pengwiki/index.php?title=Install_Linaro_to_the_internal_flash
>>  
>>
>> The only trick not listed was the u-boot environment had to be signed, I 
>> can't remember the name of the tool but its in the u-boot repo.
>>
>> I think the first logo was displayed by boot1, before u-boot runs.
>>
>>
>>  
>>
>> Hi Timo, 
>>
>>  Thanks for the detailed answer to my questions, really appreciate that.
>>
>>  I have done the same thing, still I am stuck at the logo screen, feels 
>> like there is something else is missing in my case.
>>
>>  1> I don't see any serial output from NAND boot, did you see anything 
>> on the serial console if you were using serial output?
>> 2> anyone knows if the logo has been displayed, does it imply that 
>> u-boot.bin got loaded at all?
>>
>>I think in my case, the question is why u-boot.bin built from 
>> sun5i_a13 with the CONFIG_BOOTCOMMAND modification doesn't print any output 
>> at all?  in the common/main.c:
>>   205 static inline int abortboot(int bootdelay) 
>> 
>>   
>>  206 {
>>  207 int abort = 0;  
>>  208 
>>  209 #ifdef CONFIG_MENUPROMPT
>>  210 printf(CONFIG_MENUPROMPT);
>>  211 #else
>>  212 printf("Hit any key to stop autoboot: %2d ", bootdelay);
>>  213 #endif
>>  
>>  would always print "Hit any key to stop autoboot:", even if something 
>> went wrong later? but I saw nothing from console, (UART1 that is I am using 
>> and good with SD boot).
>>
>>  Still baffled, :-(
>>
>>  Regards,
>> -Hunter 
>>
>>  
>>
>> On Saturday, March 8, 2014 1:07:44 PM UTC-6, Timo Schmiade wrote: 
>>>
>>> Hi Patrick, 
>>>
>>> > Looks to me like this is loading script.bin and uImage from nanda. 
>>>
>>> thanks for pointing this out, you're of course right! nandb contains 
>>> my root filesystem, nanda is the boot partition. 
>>>
>>> On Sat, Mar 8, 2014 at 3:24 PM, Patrick Wood  
>>> wrote: 
>>> > 
>>> > Looks to me like this is loading script.bin and uImage from nanda. 
>>> > 
>>> > -- 
>>> > You received this message because you are subscribed to a topic in the 
>>> Google Groups "linux-sunxi" group. 
>>> > To unsubscribe from this topic, visit 
>>> https://groups.google.com/d/topic/linux-sunxi/omgs3skJYDI/unsubscribe. 
>>> > To unsubscribe from this group and all of its topics, send an email to 
>>> linux-sunxi...@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...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>>   -- 
> You rece

Re: [linux-sunxi] [A10] Getting u-boot onto freshly partitioned Nand for booting Linux

2014-03-09 Thread Neal Peacock

Hello,

Seems like the structure was

/dev/nandb < u-boot.env with magic signing value
/dev/nandc < the linux kernel, just dd copied on, make sure to clear 
with zero in case yours its smaller
/dev/nandX < the root partition, which was defined in the u-boot.env, so 
you could make it whatever you want, as long as it matches your env 
file.  If nandj is 5Gb then that is what I would use in my hacky approach.


So is that more clear?  You'll need to put your linux kernel in nandc, 
your adjusted uboot.env in nandb and your rootfs on a new partition on nandj


I'll try to find the actual script and old images tonight.  I was having 
a lot of trouble uploading large files and hadn't tried in awhile.


Thanks.

On 3/9/2014 11:07 AM, hunter hu wrote:

Hi Neal,

The link seems broken while I was trying to get the image: wget 
http://pengpod.com/dl/images/pengpod1000-linaro-flashcard-2013.03.29.img.tar.gz


However, I can set things up by following the same logic, but I need 
to confirm one change, for nandb, what changes need to be made? I plan 
to edit binary image out from my board, there are actually 2 entries 
for the environment,


one setup root=/dev/nandc
the other setup root=/dev/nandd

according to your notes, we will dd uImage into nandc, so say, if I 
will use nandj (which is 5G in size) as the rootfs, should I change 
the both nandc and nandd to nandj or just nandd to nandj?


Thanks,
-Hunter

On Saturday, March 8, 2014 10:54:28 PM UTC-6, npeacock wrote:

Here is a link for what I did on the PengPod where we used the
original u-boot from Android.

http://pengpod.com/pengwiki/index.php?title=Install_Linaro_to_the_internal_flash




The only trick not listed was the u-boot environment had to be
signed, I can't remember the name of the tool but its in the
u-boot repo.

I think the first logo was displayed by boot1, before u-boot runs.





Hi Timo,

Thanks for the detailed answer to my questions, really appreciate
that.

I have done the same thing, still I am stuck at the logo screen,
feels like there is something else is missing in my case.

1> I don't see any serial output from NAND boot, did you see
anything on the serial console if you were using serial output?
2> anyone knows if the logo has been displayed, does it imply
that u-boot.bin got loaded at all?

I think in my case, the question is why u-boot.bin built from
sun5i_a13 with the CONFIG_BOOTCOMMAND modification doesn't print
any output at all?  in the common/main.c:
|
205 static inline int abortboot(int bootdelay)
 206 {
 207 int abort = 0;
 208
 209 #ifdef CONFIG_MENUPROMPT
 210 printf(CONFIG_MENUPROMPT);
 211 #else
 212 printf("Hit any key to stop autoboot: %2d ", bootdelay);
 213 #endif
|

would always print "Hit any key to stop autoboot:", even if
something went wrong later? but I saw nothing from console,
(UART1 that is I am using and good with SD boot).

Still baffled, :-(

Regards,
-Hunter



On Saturday, March 8, 2014 1:07:44 PM UTC-6, Timo Schmiade wrote:

Hi Patrick,

> Looks to me like this is loading script.bin and uImage from
nanda.

thanks for pointing this out, you're of course right! nandb
contains
my root filesystem, nanda is the boot partition.

On Sat, Mar 8, 2014 at 3:24 PM, Patrick Wood
 wrote:
>
> Looks to me like this is loading script.bin and uImage from
nanda.
>
> --
> You received this message because you are subscribed to a
topic in the Google Groups "linux-sunxi" group.
> To unsubscribe from this topic, visit
https://groups.google.com/d/topic/linux-sunxi/omgs3skJYDI/unsubscribe
.

> To unsubscribe from this group and all of its topics, send
an email to linux-sunxi...@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...@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.


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

Re: [linux-sunxi] [A10] Getting u-boot onto freshly partitioned Nand for booting Linux

2014-03-09 Thread hunter hu
Hi Neal,

The link seems broken while I was trying to get the image: wget 
http://pengpod.com/dl/images/pengpod1000-linaro-flashcard-2013.03.29.img.tar.gz

However, I can set things up by following the same logic, but I need to 
confirm one change, for nandb, what changes need to be made? I plan to edit 
binary image out from my board, there are actually 2 entries for the 
environment,

one setup root=/dev/nandc
the other setup root=/dev/nandd

according to your notes, we will dd uImage into nandc, so say, if I will 
use nandj (which is 5G in size) as the rootfs, should I change the both 
nandc and nandd to nandj or just nandd to nandj?

Thanks,
-Hunter

On Saturday, March 8, 2014 10:54:28 PM UTC-6, npeacock wrote:
>
>  Here is a link for what I did on the PengPod where we used the original 
> u-boot from Android.  
> http://pengpod.com/pengwiki/index.php?title=Install_Linaro_to_the_internal_flash
>  
>
> The only trick not listed was the u-boot environment had to be signed, I 
> can't remember the name of the tool but its in the u-boot repo.
>
> I think the first logo was displayed by boot1, before u-boot runs.
>
>
>  
>
> Hi Timo, 
>
>  Thanks for the detailed answer to my questions, really appreciate that.
>
>  I have done the same thing, still I am stuck at the logo screen, feels 
> like there is something else is missing in my case.
>
>  1> I don't see any serial output from NAND boot, did you see anything on 
> the serial console if you were using serial output?
> 2> anyone knows if the logo has been displayed, does it imply that 
> u-boot.bin got loaded at all?
>
>I think in my case, the question is why u-boot.bin built from 
> sun5i_a13 with the CONFIG_BOOTCOMMAND modification doesn't print any output 
> at all?  in the common/main.c:
>   205 static inline int abortboot(int bootdelay) 
> 
>   
>  206 {
>  207 int abort = 0;  
>  208 
>  209 #ifdef CONFIG_MENUPROMPT
>  210 printf(CONFIG_MENUPROMPT);
>  211 #else
>  212 printf("Hit any key to stop autoboot: %2d ", bootdelay);
>  213 #endif
>  
>  would always print "Hit any key to stop autoboot:", even if something 
> went wrong later? but I saw nothing from console, (UART1 that is I am using 
> and good with SD boot).
>
>  Still baffled, :-(
>
>  Regards,
> -Hunter 
>
>  
>
> On Saturday, March 8, 2014 1:07:44 PM UTC-6, Timo Schmiade wrote: 
>>
>> Hi Patrick, 
>>
>> > Looks to me like this is loading script.bin and uImage from nanda. 
>>
>> thanks for pointing this out, you're of course right! nandb contains 
>> my root filesystem, nanda is the boot partition. 
>>
>> On Sat, Mar 8, 2014 at 3:24 PM, Patrick Wood  
>> wrote: 
>> > 
>> > Looks to me like this is loading script.bin and uImage from nanda. 
>> > 
>> > -- 
>> > You received this message because you are subscribed to a topic in the 
>> Google Groups "linux-sunxi" group. 
>> > To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/linux-sunxi/omgs3skJYDI/unsubscribe. 
>> > To unsubscribe from this group and all of its topics, send an email to 
>> linux-sunxi...@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...@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: [PATCH] Add mmc support for sun4i

2014-03-09 Thread Alejandro Mery



On 15/01/14 11:00, wills wrote:

It's for sunxi-3.4, use new mmc driver for sun4i.


sorry for the late response



On Wednesday, January 15, 2014 5:55:19 PM UTC+8, wills wrote:

---
  drivers/mmc/host/Kconfig |  2 +-
  drivers/mmc/host/sunxi-mci.h | 45
+++-
  2 files changed, 33 insertions(+), 14 deletions(-)

diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig
index 958a428..5f1d3d8 100644
--- a/drivers/mmc/host/Kconfig
+++ b/drivers/mmc/host/Kconfig
@@ -558,7 +558,7 @@ config MMC_SH_MMCIF

  config MMC_SUNXI_NEW
  tristate "SUNXI MMC Card Interface support (new driver)"
-depends on MMC && (ARCH_SUN5I || ARCH_SUN7I)
+depends on MMC && (ARCH_SUN4I || ARCH_SUN5I || ARCH_SUN7I)
  default y
  help
This selects support for the SD/MMC controller on
AllWinner SoCs.
diff --git a/drivers/mmc/host/sunxi-mci.h
b/drivers/mmc/host/sunxi-mci.h
index 8e385c5..1447257 100644
--- a/drivers/mmc/host/sunxi-mci.h
+++ b/drivers/mmc/host/sunxi-mci.h
@@ -24,17 +24,32 @@
  " Compiled in " __DATE__ " at " __TIME__ ""

  /*== platform define ==*/
+/*-- for sun4i --*/
+#ifdef CONFIG_ARCH_SUN4I
+#define REG_FIFO_OS  (0x100)
+#define SMC_IRQNO(x)   (SW_INT_IRQNO_SDMC0 + (x))
+
+#define MMC_SRCCLK_HOSC  "hosc"
+#define MMC_SRCCLK_PLL6  "sdram_pll_p"
+#define MMC_AHBCLK_PREFIX"ahb_sdc"
+#define MMC_MODCLK_PREFIX"sdc"
+#define MMC3_DMA_TL  (0x20070008)
+#define MMC_MAX_DMA_DES_BIT  13
+#define MMC_DMA_DES_BIT_LEFT5
+#endif
+
  /*-- for sun5i --*/
  #ifdef CONFIG_ARCH_SUN5I
-#define REG_FIFO_OS(0x100)
-#define SMC_IRQNO(x)(SW_INT_IRQNO_SDMC0 + (x))
-
-#define MMC_SRCCLK_HOSC  "hosc"
-#define MMC_SRCCLK_PLL5  "sdram_pll_p"
-#define MMC_SRCCLK_PLL6  "sata_pll_2"
-#define MMC_AHBCLK_PREFIX"ahb_sdc"
-#define MMC_MODCLK_PREFIX"sdc"
-#define MMC3_DMA_TL(0x20070008)
+#define REG_FIFO_OS  (0x100)
+#define SMC_IRQNO(x)   (SW_INT_IRQNO_SDMC0 + (x))
+
+#define MMC_SRCCLK_HOSC  "hosc"
+#define MMC_SRCCLK_PLL6  "sata_pll_2"
+#define MMC_AHBCLK_PREFIX"ahb_sdc"
+#define MMC_MODCLK_PREFIX"sdc"
+#define MMC3_DMA_TL  (0x20070008)
+#define MMC_MAX_DMA_DES_BIT  16
+#define MMC_DMA_DES_BIT_LEFT0
  #endif

  /*-- for sun6i --*/
@@ -47,6 +62,8 @@
  #define MMC_AHBCLK_PREFIX   "ahb_sdmmc"
  #define MMC_MODCLK_PREFIX   "mod_sdc"
  #define MMC3_DMA_TL (0x2007000f)
+#define MMC_MAX_DMA_DES_BIT  16
+#define MMC_DMA_DES_BIT_LEFT0

  #ifdef CONFIG_AW_FPGA_PLATFORM
  #undef SMC_IRQNO
@@ -61,11 +78,12 @@
  #define SMC_IRQNO(x)(SW_INT_IRQNO_SDMC0 + (x))

  #define MMC_SRCCLK_HOSC "hosc"
-#define MMC_SRCCLK_PLL5 "sdram_pll_p"
  #define MMC_SRCCLK_PLL6 "sata_pll"
  #define MMC_AHBCLK_PREFIX   "ahb_sdc"
  #define MMC_MODCLK_PREFIX   "sdc"
  #define MMC3_DMA_TL (0x20070008)
+#define MMC_MAX_DMA_DES_BIT  16
+#define MMC_DMA_DES_BIT_LEFT0

  #ifdef CONFIG_AW_FPGA_PLATFORM
  #undef SMC_IRQNO
@@ -232,7 +250,7 @@
  #define SDXC_IDMA_ERR (SDXC_IDMACFatalBusErr|SDXC_IDMACDesInvalid \
  |SDXC_IDMACCardErrSum|SDXC_IDMACAbnormalIntSum)

-#define SDXC_DES_NUM_SHIFT(15)
+#define SDXC_DES_NUM_SHIFT(MMC_MAX_DMA_DES_BIT)
  #define SDXC_DES_BUFFER_MAX_LEN  (1U << SDXC_DES_NUM_SHIFT)
  struct sunxi_mmc_idma_des {
  u32config;
@@ -244,8 +262,9 @@ struct sunxi_mmc_idma_des {
  #define SDXC_IDMAC_DES0_CES BIT(30) // card error summary
  #define SDXC_IDMAC_DES0_OWN BIT(31) // des owner:1-idma owns it,
0-host owns it

-u32data_buf1_sz:16,
-data_buf2_sz:16;
+u32data_buf1_sz:MMC_MAX_DMA_DES_BIT,
+data_buf2_sz:MMC_MAX_DMA_DES_BIT,
+:MMC_DMA_DES_BIT_LEFT;
  u32buf_addr_ptr1;
  u32buf_addr_ptr2;
  };
--
1.8.3.2



thank you! applied on stage/sunxi-3.4

cheers,
Alejandro Mery

--
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 3.4] sunxi-hdmiaudio: Enable 32-bit audio

2014-03-09 Thread Alejandro Mery



On 09/03/14 13:08, Olliver Schinagl wrote:

Mnemoc, is this confirmed/merged?


oops, thanks for the reminder



On 01/27/14 18:54, Patrick Wood wrote:

The original modifications for this patch originate from some custom
changes made to the 3.3 Android kernel by huangxin at allwinnertech.com.

The A10/A20 DMA engine for HDMI audio only supports 16 or 32-bit
transfers. The documentation says 16, 20, and 24 bits, but I have not
been able to get 24-bit audio, ether 3-bytes (PCM_FMTBIT_24_3LE) or
4-bytes (PCM_FMTBIT_24_LE) to work.

This patch removes the non-working PCM formats, PCM_FMTBIT_S18_3LE
and PCM_FMTBIT_S20_3LE, and PCM_FMTBIT_S24_LE and adds suppor for
32-bit HDMI audio (PCM_FMTBIT_S32_LE).  It's possible that other 32-bit
formats, like PCM_FMTBIT_U32_LE or PCM_FMTBIT_FLOAT_LE might work, but
couldn't be tested.

This patch was tested with 24-bit and 32-bit .wav files and the ALSA
"plughw" plugin (for upconverting the 24-bit audio files to 23-bits)
with aplay -v to verify that the target format was S32_LE.

Signed-off-by: Patrick Wood 
---
  drivers/video/sunxi/hdmi/drv_hdmi.c |6 ++
  drivers/video/sunxi/hdmi/hdmi_core.c|   30
+--
  drivers/video/sunxi/hdmi/hdmi_core.h|1 +
  include/linux/drv_hdmi.h|1 +
  sound/soc/sunxi/hdmiaudio/sndhdmi.c |   16 +-
  sound/soc/sunxi/hdmiaudio/sunxi-hdmiaudio.c |6 --
  sound/soc/sunxi/hdmiaudio/sunxi-hdmipcm.c   |3 ++-
  7 files changed, 53 insertions(+), 10 deletions(-)

diff --git a/drivers/video/sunxi/hdmi/drv_hdmi.c
b/drivers/video/sunxi/hdmi/drv_hdmi.c
index a8d3cef..283d2ae 100644
--- a/drivers/video/sunxi/hdmi/drv_hdmi.c
+++ b/drivers/video/sunxi/hdmi/drv_hdmi.c
@@ -208,6 +208,12 @@ static __s32 Hdmi_Set_Audio_Para(hdmi_audio_t
*audio_para)
  if (!audio_para)
  return -1;

+if (audio_para->sample_bit != audio_info.sample_bit) {
+if (hdmi_state >= HDMI_State_Audio_config)
+hdmi_state = HDMI_State_Audio_config;
+audio_info.sample_bit = audio_para->sample_bit;
+}
+
  if (audio_para->sample_rate != audio_info.sample_rate) {
  audio_info.sample_rate = audio_para->sample_rate;
  change = audio_info.audio_en;
diff --git a/drivers/video/sunxi/hdmi/hdmi_core.c
b/drivers/video/sunxi/hdmi/hdmi_core.c
index c1c4c9c..a6dd01f 100644
--- a/drivers/video/sunxi/hdmi/hdmi_core.c
+++ b/drivers/video/sunxi/hdmi/hdmi_core.c
@@ -580,8 +580,14 @@ __s32 audio_config(void)
  return 0;

  if (audio_info.channel_num == 1) {
-/* audio fifo rst and select ddma, 2 ch 16bit pcm */
-writel(0x, HDMI_AUDIO_UNKNOWN_0);
+if (audio_info.sample_bit == 32) {
+/* audio fifo rst and select ddma, 2 ch 32bit pcm */
+writel(0x000e, HDMI_AUDIO_UNKNOWN_0);
+} else {
+/* audio fifo rst and select ddma, 2 ch 16bit pcm */
+writel(0x, HDMI_AUDIO_UNKNOWN_0);
+}
+
  /* ddma,pcm layout0 1ch */
  writel(0x, HDMI_AUDIO_LAYOUT);
  writel(0x76543200, HDMI_AUDIO_UNKNOWN_1);
@@ -592,8 +598,14 @@ __s32 audio_config(void)
  writel(0x, HDMI_AUDIO_INFOFRAME + 8);
  writel(0x, HDMI_AUDIO_INFOFRAME + 12);
  } else if (audio_info.channel_num == 2) {
-/* audio fifo rst and select ddma, 2 ch 16bit pcm */
-writel(0x, HDMI_AUDIO_UNKNOWN_0);
+if (audio_info.sample_bit == 32) {
+/* audio fifo rst and select ddma, 2 ch 32bit pcm */
+writel(0x000e, HDMI_AUDIO_UNKNOWN_0);
+} else {
+/* audio fifo rst and select ddma, 2 ch 16bit pcm */
+writel(0x, HDMI_AUDIO_UNKNOWN_0);
+}
+
  /* ddma,pcm layout0 2ch */
  writel(0x0001, HDMI_AUDIO_LAYOUT);
  writel(0x76543210, HDMI_AUDIO_UNKNOWN_1);
@@ -604,8 +616,14 @@ __s32 audio_config(void)
  writel(0x, HDMI_AUDIO_INFOFRAME + 8);
  writel(0x, HDMI_AUDIO_INFOFRAME + 12);
  } else if (audio_info.channel_num == 8) {
-/* audio fifo rst and select ddma, 2 ch 16bit pcm */
-writel(0x, HDMI_AUDIO_UNKNOWN_0);
+if (audio_info.sample_bit == 32) {
+/* audio fifo rst and select ddma, 2 ch 32bit pcm */
+writel(0x000e, HDMI_AUDIO_UNKNOWN_0);
+} else {
+/* audio fifo rst and select ddma, 2 ch 16bit pcm */
+writel(0x, HDMI_AUDIO_UNKNOWN_0);
+}
+
  /* ddma,pcm layout1 8ch */
  writel(0x000f, HDMI_AUDIO_LAYOUT);
  writel(0x76543210, HDMI_AUDIO_UNKNOWN_1);
diff --git a/drivers/video/sunxi/hdmi/hdmi_core.h
b/drivers/video/sunxi/hdmi/hdmi_core.h
index 50abbd1..7f11557 100644
--- a/drivers/video/sunxi/hdmi/hdmi_core.h
+++ b/drivers/video/sunxi/hdmi/hdmi_core.h
@@ -84,6 +84,7 @@ typedef struct audio_timing {
  __s32 ACR_N;
  __s32 CH_STATUS

[linux-sunxi] Re: Not able to boot ramdisk on cubietruck

2014-03-09 Thread tyler . baker
On Sunday, March 9, 2014 8:06:27 AM UTC-7, tyler...@linaro.org wrote:
> Hello,
> 
> I am trying to boot the cubietruck with a minimal ramdisk. However, it seems 
> to hang at "Starting kernel..." whenever I pass bootz a ramdisk load address.
> 
>  I have built the latest cubietruck config from here:
> 
> https://github.com/cubieboard/u-boot-sunxi
> 
> Here is the boot log: (bootz 0x40008000 0x4200 0x4100)
> 
> U-Boot 2014.01-09730-gb5bd4c9 (Mar 09 2014 - 05:55:17) Allwinner Technology
> 
> CPU:   Allwinner A20 (SUN7I)
> Board: Cubietruck
> I2C:   ready
> DRAM:  2 GiB
> WARNING: Caches not enabled
> MMC:   SUNXI SD/MMC: 0
> *** Warning - bad CRC, using default environment
> 
> In:serial
> Out:   serial
> Err:   serial
> Net:   mii0
> Warning: failed to set MAC address
> 
> Hit any key to stop autoboot:  0 
> sun7i# setenv ethaddr 00:11:22:33:44:a3
> sun7i# setenv autoload no
> sun7i# dhcp
> Waiting for PHY auto negotiation to complete... done
> ENET Speed is 1000 Mbps - FULL duplex connection
> BOOTP broadcast 1
> BOOTP broadcast 2
> DHCP client bound to address 192.168.1.218
> sun7i# setenv serverip 192.168.1.1
> sun7i# tftp 0x40008000 192.168.1.1:cubie/zImage
> Using mii0 device
> TFTP from server 192.168.1.1; our IP address is 192.168.1.218
> Filename 'cubie/zImage'.
> Load address: 0x40008000
> Loading: #
>#
>2.7 MiB/s
> done
> Bytes transferred = 1779480 (1b2718 hex)
> sun7i# tftp 0x4200 192.168.1.1:cubie/buildroot.cpio.gz
> Using mii0 device
> TFTP from server 192.168.1.1; our IP address is 192.168.1.218
> Filename 'cubie/buildroot.cpio.gz'.
> Load address: 0x4200
> Loading: 
>2.7 MiB/s
> done
> Bytes transferred = 642602 (9ce2a hex)
> sun7i# tftp 0x4100 192.168.1.1:cubie/sun7i-a20-cubietruck.dtb
> Using mii0 device
> TFTP from server 192.168.1.1; our IP address is 192.168.1.218
> Filename 'cubie/sun7i-a20-cubietruck.dtb'.
> Load address: 0x4100
> Loading: #
>2 MiB/s
> done
> Bytes transferred = 12304 (3010 hex)
> sun7i# setenv bootargs console=ttyS0,115200 debug earlyprintk rw 
> root=/dev/ram0 rw
> sun7i# bootz 0x40008000 0x4200 0x4100
> Kernel image @ 0x40008000 [ 0x00 - 0x1b2718 ]
> ## Loading init Ramdisk from Legacy Image at 4200 ...
>Image Name:   
>Created:  2014-03-09  14:53:18 UTC
>Image Type:   ARM Linux RAMDisk Image (uncompressed)
>Data Size:642538 Bytes = 627.5 KiB
>Load Address: 
>Entry Point:  
>Verifying Checksum ... OK
> ## Flattened Device Tree blob at 4100
>Booting using the fdt blob at 0x4100
>Loading Ramdisk to bfdc9000, end bfe65dea ... OK
>Loading Device Tree to 40ff9000, end 40fff00f ... OK
> 
> Starting kernel ...
> 
> Now if I boot with bootz 0x40008000 - 0x4100 everything works fine:
> 
> U-Boot 2014.01-09730-gb5bd4c9 (Mar 09 2014 - 05:55:17) Allwinner Technology
> 
> CPU:   Allwinner A20 (SUN7I)
> Board: Cubietruck
> I2C:   ready
> DRAM:  2 GiB
> WARNING: Caches not enabled
> MMC:   SUNXI SD/MMC: 0
> *** Warning - bad CRC, using default environment
> 
> In:serial
> Out:   serial
> Err:   serial
> Net:   mii0
> Warning: failed to set MAC address
> 
> Hit any key to stop autoboot:  0 
> sun7i# setenv ethaddr 00:11:22:33:44:a3
> sun7i# setenv autoload no
> sun7i# dhcp
> Waiting for PHY auto negotiation to complete.. done
> ENET Speed is 1000 Mbps - FULL duplex connection
> BOOTP broadcast 1
> BOOTP broadcast 2
> DHCP client bound to address 192.168.1.218
> sun7i# setenv serverip 192.168.1.1
> sun7i# tftp 0x40008000 192.168.1.1:cubie/zImage
> Using mii0 device
> TFTP from server 192.168.1.1; our IP address is 192.168.1.218
> Filename 'cubie/zImage'.
> Load address: 0x40008000
> Loading: #
>#
>2.7 MiB/s
> done
> Bytes transferred = 1779480 (1b2718 hex)
> sun7i# tftp 0x4200 192.168.1.1:cubie/buildroot.cpio.gz
> Using mii0 device
> TFTP from server 192.168.1.1; our IP address is 192.168.1.218
> Filename 'cubie/buildroot.cpio.gz'.
> Load address: 0x4200
> Loading: 
>2.7 MiB/s
> done
> Bytes transferred = 642602 (9ce2a hex)
> sun7i# tftp 0x4100 192.168.1.1:cubie/sun7i-a20-cubietruck.dtb
> Using mii0 device
> TFTP from server 192.168.1.1; our IP address is 192.168.1.218
> Filename 'cubie/sun7i-a20-cubietruck.dtb'.
> Load address: 0x4100
> Loading: #
>2 MiB/s
> done
> Bytes transferred = 12304 (3010 hex)
> sun7i# setenv bootargs console=ttyS0,115200 debug earlyprintk rw 
> root=/dev/ram0 rw
> sun7i# bootz 0x40008000 - 0x4100
> Kernel image @ 0x40008000 [ 0x00 - 0x1b2718 ]
> ## Flattened Device Tree blob at 4100
>Booting using the fdt blob at 0x41

Re: [linux-sunxi] Missing DVB symbols version

2014-03-09 Thread Olliver Schinagl

On 01/31/14 13:25, Oscar C wrote:

Hi,

I'm trying to compile the vtunerc (http://code.google.com/p/vtuner/)
kernel module for my cubieboard2 (sunxi-kernel 3.4.75). Although it's
built ok, when I try to load it with "modprobe vtunerc" I get unkown
symbols errors:

[117972.229485] vtunerc: no symbol version for dvb_dmxdev_init
[117972.234314] vtunerc: Unknown symbol dvb_dmxdev_init (err -22)
[117972.239343] vtunerc: no symbol version for dvb_register_adapter
[117972.244553] vtunerc: Unknown symbol dvb_register_adapter (err -22)
[117972.249803] vtunerc: no symbol version for dvb_dmx_swfilter_packets
[117972.255332] vtunerc: Unknown symbol dvb_dmx_swfilter_packets (err
-22)

If I force the load (modprobe -f vtunerc), the module gets loaded and
works normally:

[118031.114349] virtual DVB adapter driver, version 1.4, (c) 2010-12
Honza Petrous, SmartImp.cz
[118031.131771] DVB: registering new adapter (vTuner proxy)
[118031.137102] vtunerc: registered /dev/vtunerc0

Reading the file Module.symvers I see that there are no DVB symbols
exported.

However, my laptop's kernel (3.7.10) does have those symbols exported
in Module.symvers:

0x  dvb_dmxdev_init vmlinux EXPORT_SYMBOL
0x  dvb_register_adaptervmlinux EXPORT_SYMBOL
0x  dvb_dmx_swfilter_packetsvmlinux EXPORT_SYMBOL

How do I add this symbols?
You probably have to compile your own kernel and enable all these 
missing components.


That said, if the symbols where only added later (beyond 3.4) you could 
backport them from whenever they where introduced for yourself. Other 
then that, you'd have to wait until 3.10 is ready I supose :)


Olliver

--
Cheers



--
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] Not able to boot ramdisk on cubietruck

2014-03-09 Thread tyler . baker
Hello,

I am trying to boot the cubietruck with a minimal ramdisk. However, it seems to 
hang at "Starting kernel..." whenever I pass bootz a ramdisk load address.

 I have built the latest cubietruck config from here:

https://github.com/cubieboard/u-boot-sunxi

Here is the boot log: (bootz 0x40008000 0x4200 0x4100)

U-Boot 2014.01-09730-gb5bd4c9 (Mar 09 2014 - 05:55:17) Allwinner Technology

CPU:   Allwinner A20 (SUN7I)
Board: Cubietruck
I2C:   ready
DRAM:  2 GiB
WARNING: Caches not enabled
MMC:   SUNXI SD/MMC: 0
*** Warning - bad CRC, using default environment

In:serial
Out:   serial
Err:   serial
Net:   mii0
Warning: failed to set MAC address

Hit any key to stop autoboot:  0 
sun7i# setenv ethaddr 00:11:22:33:44:a3
sun7i# setenv autoload no
sun7i# dhcp
Waiting for PHY auto negotiation to complete... done
ENET Speed is 1000 Mbps - FULL duplex connection
BOOTP broadcast 1
BOOTP broadcast 2
DHCP client bound to address 192.168.1.218
sun7i# setenv serverip 192.168.1.1
sun7i# tftp 0x40008000 192.168.1.1:cubie/zImage
Using mii0 device
TFTP from server 192.168.1.1; our IP address is 192.168.1.218
Filename 'cubie/zImage'.
Load address: 0x40008000
Loading: #
 #
 2.7 MiB/s
done
Bytes transferred = 1779480 (1b2718 hex)
sun7i# tftp 0x4200 192.168.1.1:cubie/buildroot.cpio.gz
Using mii0 device
TFTP from server 192.168.1.1; our IP address is 192.168.1.218
Filename 'cubie/buildroot.cpio.gz'.
Load address: 0x4200
Loading: 
 2.7 MiB/s
done
Bytes transferred = 642602 (9ce2a hex)
sun7i# tftp 0x4100 192.168.1.1:cubie/sun7i-a20-cubietruck.dtb
Using mii0 device
TFTP from server 192.168.1.1; our IP address is 192.168.1.218
Filename 'cubie/sun7i-a20-cubietruck.dtb'.
Load address: 0x4100
Loading: #
 2 MiB/s
done
Bytes transferred = 12304 (3010 hex)
sun7i# setenv bootargs console=ttyS0,115200 debug earlyprintk rw root=/dev/ram0 
rw
sun7i# bootz 0x40008000 0x4200 0x4100
Kernel image @ 0x40008000 [ 0x00 - 0x1b2718 ]
## Loading init Ramdisk from Legacy Image at 4200 ...
   Image Name:   
   Created:  2014-03-09  14:53:18 UTC
   Image Type:   ARM Linux RAMDisk Image (uncompressed)
   Data Size:642538 Bytes = 627.5 KiB
   Load Address: 
   Entry Point:  
   Verifying Checksum ... OK
## Flattened Device Tree blob at 4100
   Booting using the fdt blob at 0x4100
   Loading Ramdisk to bfdc9000, end bfe65dea ... OK
   Loading Device Tree to 40ff9000, end 40fff00f ... OK

Starting kernel ...

Now if I boot with bootz 0x40008000 - 0x4100 everything works fine:

U-Boot 2014.01-09730-gb5bd4c9 (Mar 09 2014 - 05:55:17) Allwinner Technology

CPU:   Allwinner A20 (SUN7I)
Board: Cubietruck
I2C:   ready
DRAM:  2 GiB
WARNING: Caches not enabled
MMC:   SUNXI SD/MMC: 0
*** Warning - bad CRC, using default environment

In:serial
Out:   serial
Err:   serial
Net:   mii0
Warning: failed to set MAC address

Hit any key to stop autoboot:  0 
sun7i# setenv ethaddr 00:11:22:33:44:a3
sun7i# setenv autoload no
sun7i# dhcp
Waiting for PHY auto negotiation to complete.. done
ENET Speed is 1000 Mbps - FULL duplex connection
BOOTP broadcast 1
BOOTP broadcast 2
DHCP client bound to address 192.168.1.218
sun7i# setenv serverip 192.168.1.1
sun7i# tftp 0x40008000 192.168.1.1:cubie/zImage
Using mii0 device
TFTP from server 192.168.1.1; our IP address is 192.168.1.218
Filename 'cubie/zImage'.
Load address: 0x40008000
Loading: #
 #
 2.7 MiB/s
done
Bytes transferred = 1779480 (1b2718 hex)
sun7i# tftp 0x4200 192.168.1.1:cubie/buildroot.cpio.gz
Using mii0 device
TFTP from server 192.168.1.1; our IP address is 192.168.1.218
Filename 'cubie/buildroot.cpio.gz'.
Load address: 0x4200
Loading: 
 2.7 MiB/s
done
Bytes transferred = 642602 (9ce2a hex)
sun7i# tftp 0x4100 192.168.1.1:cubie/sun7i-a20-cubietruck.dtb
Using mii0 device
TFTP from server 192.168.1.1; our IP address is 192.168.1.218
Filename 'cubie/sun7i-a20-cubietruck.dtb'.
Load address: 0x4100
Loading: #
 2 MiB/s
done
Bytes transferred = 12304 (3010 hex)
sun7i# setenv bootargs console=ttyS0,115200 debug earlyprintk rw root=/dev/ram0 
rw
sun7i# bootz 0x40008000 - 0x4100
Kernel image @ 0x40008000 [ 0x00 - 0x1b2718 ]
## Flattened Device Tree blob at 4100
   Booting using the fdt blob at 0x4100
   Loading Device Tree to 40ff9000, end 40fff00f ... OK

Starting kernel ...

[0.00] Booting Linux on physical CPU 0x0
[0.00] Linux version 3.14.0-rc5-00287-gca62eec 
(buildsl...@vps-1147942-19228.manage.myhosting.com) (gcc version 4.7.1 
(Ubuntu/Linaro 4.7.1-5ubuntu1~ppa1) ) #1 SMP Sat Mar 8 20:49:39 EST 2014
[0.

Re: [linux-sunxi] [PATCH 3.4] sunxi:axp20x: Enable internal thermal monitoring

2014-03-09 Thread Alejandro Mery



On 09/03/14 13:09, Olliver Schinagl wrote:

Mnemoc,

have you checked and merged this yet?


thanks for the reminder. it fails to compile when hwmon is m

like on sun7i_defconfig:
  LD  .tmp_vmlinux1
drivers/built-in.o: In function `axp20_init_chip':
/srv/build/amery/allwinner/linux-sunxi/3.4/drivers/power/axp_power/axp20-mfd.h:149: 
undefined reference to `hwmon_device_register'

drivers/built-in.o: In function `axp_mfd_remove':
/srv/build/amery/allwinner/linux-sunxi/3.4/drivers/power/axp_power/axp-mfd.c:368: 
undefined reference to `hwmon_device_unregister'

make[1]: *** [.tmp_vmlinux1] Error 1
make: *** [sub-make] Error 2

build_sun7i/.config:CONFIG_AXP_HWMON=y
build_sun7i/.config:CONFIG_HWMON=m

in most defconfigs hwmon is n, should I y/y them on all defconfigs? can 
it be fixed to support hwmon=m?


--
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: Cubietruck lockup with current sunxi 3.4

2014-03-09 Thread Kyle Bassett

> Try increase .emr1 more than 0x4 .

Hi,

Do we know what is the difference between '.emr1=0' and other settings such
as '.emr1=0x4'?

Thanks!




-- 
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 3.4] sunxi:axp20x: Enable internal thermal monitoring

2014-03-09 Thread Olliver Schinagl

Mnemoc,

have you checked and merged this yet?

Olliver

On 01/27/14 20:25, Patrick Wood wrote:

Enable the internal thermal monitoring support of AXP20X chips

Cherry-picked from:

https://github.com/cubieboard/linux-sunxi/commit/e4144b3ce62b1d7014fee36b84bc65c812469822

Creates the sysfs file temp1_input in the sunxi-i2c tree that reports the
AXP's temperature in degrees C.

According to the AXP202's datasheet, this port outputs a 12-bit value
where 0x000 == -144.7C and 0xfff == 264.8C in 0.1 degree C increments.

Signed-off-by: LABBE Corentin 
Signed-off-by: Hans de Goede 
Signed-off-by: Patrick Wood 
---
  drivers/power/axp_power/Kconfig |5 ++
  drivers/power/axp_power/axp-mfd.c   |7 +++
  drivers/power/axp_power/axp20-mfd.h |  112 +++
  include/linux/mfd/axp-mfd.h |7 +++
  4 files changed, 130 insertions(+)

diff --git a/drivers/power/axp_power/Kconfig b/drivers/power/axp_power/Kconfig
index 039679f..b76f517 100644
--- a/drivers/power/axp_power/Kconfig
+++ b/drivers/power/axp_power/Kconfig
@@ -36,4 +36,9 @@ config AXP_CHGCHANGE
bool "AXP charging current set when suspend\resume\shutdown"
default y

+config AXP_HWMON
+   depends on HWMON
+   bool "Enable the internal thermal monitoring support of AXP20X chips"
+   default y
+
  endif # !AW_AXP
diff --git a/drivers/power/axp_power/axp-mfd.c 
b/drivers/power/axp_power/axp-mfd.c
index 9af0257..cfa894a 100644
--- a/drivers/power/axp_power/axp-mfd.c
+++ b/drivers/power/axp_power/axp-mfd.c
@@ -363,6 +363,13 @@ static int __devexit axp_mfd_remove(struct i2c_client 
*client)
pm_power_off = NULL;
axp = NULL;

+#ifdef CONFIG_AXP_HWMON
+   if (chip->itm_enabled == 1) {
+   hwmon_device_unregister(chip->hwmon_dev);
+   sysfs_remove_group(&client->dev.kobj, &axp20_group);
+   }
+#endif
+
axp_mfd_remove_subdevs(chip);
kfree(chip);
return 0;
diff --git a/drivers/power/axp_power/axp20-mfd.h 
b/drivers/power/axp_power/axp20-mfd.h
index 1c7a41b..214856e 100644
--- a/drivers/power/axp_power/axp20-mfd.h
+++ b/drivers/power/axp_power/axp20-mfd.h
@@ -22,6 +22,83 @@

  #include "axp-rw.h"

+#ifdef CONFIG_AXP_HWMON
+
+#include 
+#include 
+#include 
+
+static struct axp_mfd_chip *axp20_update_device(struct device *dev);
+
+static ssize_t
+show_temp(struct device *dev, struct device_attribute *devattr, char *buf)
+{
+   struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
+   struct axp_mfd_chip *data = axp20_update_device(dev);
+   if (attr->index == 1)
+   return sprintf(buf, "264800\n");
+   if (attr->index == 2)
+   return sprintf(buf, "-144700\n");
+   return sprintf(buf, "%d\n", data->temperature * 100);
+}
+
+
+static SENSOR_DEVICE_ATTR(temp1_input, S_IRUGO, show_temp, NULL, 0);
+static SENSOR_DEVICE_ATTR(temp1_max, S_IRUGO, show_temp, NULL, 1);
+static SENSOR_DEVICE_ATTR(temp1_min, S_IRUGO, show_temp, NULL, 2);
+
+static struct attribute *axp20_attributes[] = {
+   &sensor_dev_attr_temp1_input.dev_attr.attr,
+   &sensor_dev_attr_temp1_min.dev_attr.attr,
+   &sensor_dev_attr_temp1_max.dev_attr.attr,
+   NULL
+};
+
+static const struct attribute_group axp20_group = {
+   .attrs = axp20_attributes,
+};
+
+
+/*
+ *  * function that update the status of the chips (temperature)
+ *   */
+static struct axp_mfd_chip *axp20_update_device(struct device *dev)
+{
+   struct i2c_client *client = to_i2c_client(dev);
+   struct axp_mfd_chip *data = i2c_get_clientdata(client);
+   int err;
+   u8 high, low;
+
+   mutex_lock(&data->lock);
+
+   if (time_after(jiffies, data->last_updated + HZ * 2)
+   || !data->valid) {
+   dev_dbg(&client->dev, "Updating axp20 data\n");
+   /* AXP202 datasheet page 25, 0x000 means -144.7,
+* 0xfff means 264.8, 4096 steps of 0.1 degress */
+   err = __axp_read(client, 0x5E, &high);
+   if (err) {
+   dev_err(dev, "AXP Error while reading high\n");
+   high = 0;
+   }
+
+   err = __axp_read(client, 0x5F, &low);
+   if (err) {
+   dev_err(dev, "AXP Error while reading low\n");
+   low = 0;
+   }
+
+   data->temperature = -1447 + ((high << 4) + (low && 0x0F));
+   data->last_updated = jiffies;
+   data->valid = 1;
+   }
+
+   mutex_unlock(&data->lock);
+   return data;
+}
+
+#endif
+

  static int __devinit axp20_init_chip(struct axp_mfd_chip *chip)
  {
@@ -33,6 +110,9 @@ static int __devinit axp20_init_chip(struct axp_mfd_chip 
*chip)
POWER20_INTSTS3, 0xff, POWER20_INTSTS4, 0xff,
POWER20_INTSTS5, 0xff };
int err;
+#ifdef CONFIG_AXP_HWMON
+   u8 enabled;
+#endif
/*read chip id*/
err =  __axp_rea

Re: [linux-sunxi] [PATCH 3.4] sunxi-hdmiaudio: Enable 32-bit audio

2014-03-09 Thread Olliver Schinagl

Mnemoc, is this confirmed/merged?

Olliver

On 01/27/14 18:54, Patrick Wood wrote:

The original modifications for this patch originate from some custom
changes made to the 3.3 Android kernel by huangxin at allwinnertech.com.

The A10/A20 DMA engine for HDMI audio only supports 16 or 32-bit
transfers. The documentation says 16, 20, and 24 bits, but I have not
been able to get 24-bit audio, ether 3-bytes (PCM_FMTBIT_24_3LE) or
4-bytes (PCM_FMTBIT_24_LE) to work.

This patch removes the non-working PCM formats, PCM_FMTBIT_S18_3LE
and PCM_FMTBIT_S20_3LE, and PCM_FMTBIT_S24_LE and adds suppor for
32-bit HDMI audio (PCM_FMTBIT_S32_LE).  It's possible that other 32-bit
formats, like PCM_FMTBIT_U32_LE or PCM_FMTBIT_FLOAT_LE might work, but
couldn't be tested.

This patch was tested with 24-bit and 32-bit .wav files and the ALSA
"plughw" plugin (for upconverting the 24-bit audio files to 23-bits)
with aplay -v to verify that the target format was S32_LE.

Signed-off-by: Patrick Wood 
---
  drivers/video/sunxi/hdmi/drv_hdmi.c |6 ++
  drivers/video/sunxi/hdmi/hdmi_core.c|   30 +--
  drivers/video/sunxi/hdmi/hdmi_core.h|1 +
  include/linux/drv_hdmi.h|1 +
  sound/soc/sunxi/hdmiaudio/sndhdmi.c |   16 +-
  sound/soc/sunxi/hdmiaudio/sunxi-hdmiaudio.c |6 --
  sound/soc/sunxi/hdmiaudio/sunxi-hdmipcm.c   |3 ++-
  7 files changed, 53 insertions(+), 10 deletions(-)

diff --git a/drivers/video/sunxi/hdmi/drv_hdmi.c 
b/drivers/video/sunxi/hdmi/drv_hdmi.c
index a8d3cef..283d2ae 100644
--- a/drivers/video/sunxi/hdmi/drv_hdmi.c
+++ b/drivers/video/sunxi/hdmi/drv_hdmi.c
@@ -208,6 +208,12 @@ static __s32 Hdmi_Set_Audio_Para(hdmi_audio_t *audio_para)
if (!audio_para)
return -1;

+   if (audio_para->sample_bit != audio_info.sample_bit) {
+   if (hdmi_state >= HDMI_State_Audio_config)
+   hdmi_state = HDMI_State_Audio_config;
+   audio_info.sample_bit = audio_para->sample_bit;
+   }
+
if (audio_para->sample_rate != audio_info.sample_rate) {
audio_info.sample_rate = audio_para->sample_rate;
change = audio_info.audio_en;
diff --git a/drivers/video/sunxi/hdmi/hdmi_core.c 
b/drivers/video/sunxi/hdmi/hdmi_core.c
index c1c4c9c..a6dd01f 100644
--- a/drivers/video/sunxi/hdmi/hdmi_core.c
+++ b/drivers/video/sunxi/hdmi/hdmi_core.c
@@ -580,8 +580,14 @@ __s32 audio_config(void)
return 0;

if (audio_info.channel_num == 1) {
-   /* audio fifo rst and select ddma, 2 ch 16bit pcm */
-   writel(0x, HDMI_AUDIO_UNKNOWN_0);
+   if (audio_info.sample_bit == 32) {
+   /* audio fifo rst and select ddma, 2 ch 32bit pcm */
+   writel(0x000e, HDMI_AUDIO_UNKNOWN_0);
+   } else {
+   /* audio fifo rst and select ddma, 2 ch 16bit pcm */
+   writel(0x, HDMI_AUDIO_UNKNOWN_0);
+   }
+
/* ddma,pcm layout0 1ch */
writel(0x, HDMI_AUDIO_LAYOUT);
writel(0x76543200, HDMI_AUDIO_UNKNOWN_1);
@@ -592,8 +598,14 @@ __s32 audio_config(void)
writel(0x, HDMI_AUDIO_INFOFRAME + 8);
writel(0x, HDMI_AUDIO_INFOFRAME + 12);
} else if (audio_info.channel_num == 2) {
-   /* audio fifo rst and select ddma, 2 ch 16bit pcm */
-   writel(0x, HDMI_AUDIO_UNKNOWN_0);
+   if (audio_info.sample_bit == 32) {
+   /* audio fifo rst and select ddma, 2 ch 32bit pcm */
+   writel(0x000e, HDMI_AUDIO_UNKNOWN_0);
+   } else {
+   /* audio fifo rst and select ddma, 2 ch 16bit pcm */
+   writel(0x, HDMI_AUDIO_UNKNOWN_0);
+   }
+
/* ddma,pcm layout0 2ch */
writel(0x0001, HDMI_AUDIO_LAYOUT);
writel(0x76543210, HDMI_AUDIO_UNKNOWN_1);
@@ -604,8 +616,14 @@ __s32 audio_config(void)
writel(0x, HDMI_AUDIO_INFOFRAME + 8);
writel(0x, HDMI_AUDIO_INFOFRAME + 12);
} else if (audio_info.channel_num == 8) {
-   /* audio fifo rst and select ddma, 2 ch 16bit pcm */
-   writel(0x, HDMI_AUDIO_UNKNOWN_0);
+   if (audio_info.sample_bit == 32) {
+   /* audio fifo rst and select ddma, 2 ch 32bit pcm */
+   writel(0x000e, HDMI_AUDIO_UNKNOWN_0);
+   } else {
+   /* audio fifo rst and select ddma, 2 ch 16bit pcm */
+   writel(0x, HDMI_AUDIO_UNKNOWN_0);
+   }
+
/* ddma,pcm layout1 8ch */
writel(0x000f, HDMI_AUDIO_LAYOUT);
writel(0x76543210, HDMI_

Re: [linux-sunxi] uboot for Mele M3 A20

2014-03-09 Thread Olliver Schinagl

Hey Rajesh,

Did you ever manage to get some pictures taken of the inside?

Olliver

On 01/19/14 20:26, Rajesh Mallah wrote:

If you would have picked up on my earlier interra3 hint, you would have
seen that that is actually configured in boards.cfg. No need to hack
boards.c. Bad mallah!



Dear Oliver / List ,

firstly thanks for gesture to help . I was sort of despo. sunxi has always
been a jinxed platform for me! .
Specially considering that fact that most of us are used to the comforts of
x86.

I will definitely learn about boards.cfg and see how to add definations.
You already pointed me to the correct wikis.
I will have to do a careful reading of those.

btw i overclocked the dram to 456 Mhz and it could run without problems. I
then reduced it to 408 Mhz , seeing that gtkperf
does not yeild any benefits.

regds
mallah.



--
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] Add mmc support for sun4i

2014-03-09 Thread Olliver Schinagl

Has anybody merged this into 3.4? is it worth spending time on this?

oliver

On 01/15/14 11:00, wills wrote:

It's for sunxi-3.4, use new mmc driver for sun4i.

On Wednesday, January 15, 2014 5:55:19 PM UTC+8, wills wrote:


---
  drivers/mmc/host/Kconfig |  2 +-
  drivers/mmc/host/sunxi-mci.h | 45
+++-
  2 files changed, 33 insertions(+), 14 deletions(-)

diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig
index 958a428..5f1d3d8 100644
--- a/drivers/mmc/host/Kconfig
+++ b/drivers/mmc/host/Kconfig
@@ -558,7 +558,7 @@ config MMC_SH_MMCIF

  config MMC_SUNXI_NEW
  tristate "SUNXI MMC Card Interface support (new driver)"
-depends on MMC && (ARCH_SUN5I || ARCH_SUN7I)
+depends on MMC && (ARCH_SUN4I || ARCH_SUN5I || ARCH_SUN7I)
  default y
  help
This selects support for the SD/MMC controller on AllWinner
SoCs.
diff --git a/drivers/mmc/host/sunxi-mci.h b/drivers/mmc/host/sunxi-mci.h
index 8e385c5..1447257 100644
--- a/drivers/mmc/host/sunxi-mci.h
+++ b/drivers/mmc/host/sunxi-mci.h
@@ -24,17 +24,32 @@
  " Compiled in " __DATE__ " at " __TIME__ ""

  /*== platform define ==*/
+/*-- for sun4i --*/
+#ifdef CONFIG_ARCH_SUN4I
+#define REG_FIFO_OS(0x100)
+#define SMC_IRQNO(x)(SW_INT_IRQNO_SDMC0 + (x))
+
+#define MMC_SRCCLK_HOSC"hosc"
+#define MMC_SRCCLK_PLL6"sdram_pll_p"
+#define MMC_AHBCLK_PREFIX"ahb_sdc"
+#define MMC_MODCLK_PREFIX"sdc"
+#define MMC3_DMA_TL(0x20070008)
+#define MMC_MAX_DMA_DES_BIT13
+#define MMC_DMA_DES_BIT_LEFT5
+#endif
+
  /*-- for sun5i --*/
  #ifdef CONFIG_ARCH_SUN5I
-#define REG_FIFO_OS(0x100)
-#define SMC_IRQNO(x)(SW_INT_IRQNO_SDMC0 + (x))
-
-#define MMC_SRCCLK_HOSC"hosc"
-#define MMC_SRCCLK_PLL5"sdram_pll_p"
-#define MMC_SRCCLK_PLL6"sata_pll_2"
-#define MMC_AHBCLK_PREFIX"ahb_sdc"
-#define MMC_MODCLK_PREFIX"sdc"
-#define MMC3_DMA_TL(0x20070008)
+#define REG_FIFO_OS(0x100)
+#define SMC_IRQNO(x)(SW_INT_IRQNO_SDMC0 + (x))
+
+#define MMC_SRCCLK_HOSC"hosc"
+#define MMC_SRCCLK_PLL6"sata_pll_2"
+#define MMC_AHBCLK_PREFIX"ahb_sdc"
+#define MMC_MODCLK_PREFIX"sdc"
+#define MMC3_DMA_TL(0x20070008)
+#define MMC_MAX_DMA_DES_BIT16
+#define MMC_DMA_DES_BIT_LEFT0
  #endif

  /*-- for sun6i --*/
@@ -47,6 +62,8 @@
  #define MMC_AHBCLK_PREFIX   "ahb_sdmmc"
  #define MMC_MODCLK_PREFIX   "mod_sdc"
  #define MMC3_DMA_TL (0x2007000f)
+#define MMC_MAX_DMA_DES_BIT16
+#define MMC_DMA_DES_BIT_LEFT0

  #ifdef CONFIG_AW_FPGA_PLATFORM
  #undef SMC_IRQNO
@@ -61,11 +78,12 @@
  #define SMC_IRQNO(x)(SW_INT_IRQNO_SDMC0 + (x))

  #define MMC_SRCCLK_HOSC "hosc"
-#define MMC_SRCCLK_PLL5 "sdram_pll_p"
  #define MMC_SRCCLK_PLL6 "sata_pll"
  #define MMC_AHBCLK_PREFIX   "ahb_sdc"
  #define MMC_MODCLK_PREFIX   "sdc"
  #define MMC3_DMA_TL (0x20070008)
+#define MMC_MAX_DMA_DES_BIT16
+#define MMC_DMA_DES_BIT_LEFT0

  #ifdef CONFIG_AW_FPGA_PLATFORM
  #undef SMC_IRQNO
@@ -232,7 +250,7 @@
  #define SDXC_IDMA_ERR (SDXC_IDMACFatalBusErr|SDXC_IDMACDesInvalid \
  |SDXC_IDMACCardErrSum|SDXC_IDMACAbnormalIntSum)

-#define SDXC_DES_NUM_SHIFT(15)
+#define SDXC_DES_NUM_SHIFT(MMC_MAX_DMA_DES_BIT)
  #define SDXC_DES_BUFFER_MAX_LEN(1U << SDXC_DES_NUM_SHIFT)
  struct sunxi_mmc_idma_des {
  u32config;
@@ -244,8 +262,9 @@ struct sunxi_mmc_idma_des {
  #define SDXC_IDMAC_DES0_CESBIT(30) // card error summary
  #define SDXC_IDMAC_DES0_OWNBIT(31) // des owner:1-idma owns it,
0-host owns it

-u32data_buf1_sz:16,
-data_buf2_sz:16;
+u32data_buf1_sz:MMC_MAX_DMA_DES_BIT,
+data_buf2_sz:MMC_MAX_DMA_DES_BIT,
+:MMC_DMA_DES_BIT_LEFT;
  u32buf_addr_ptr1;
  u32buf_addr_ptr2;
  };
--
1.8.3.2






--
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] Flight Gear

2014-03-09 Thread Olliver Schinagl

On 03/08/14 18:14, R M wrote:

Hi,

I came to know that there is Fedora distribution that works on sunxi
devices.

Yes, but afaik by default it doesn't feature opengl acceleration.


I just wanted to know has anyone played Flight Gear in any of the sunxi
devices ?

Not that I'm aware


If yes, how was the performance and gaming experience ?

Try it and report your findings here!

You probably do have to install the mali drivers, which are explained 
how to do so on the wiki.


Olliver


Regards,
RM

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


[linux-sunxi] Re: UART1 on A13-olinuxino not working through GPIO

2014-03-09 Thread Юрий Пухальский
Thank you for helping me out with that, but now the next question.
For some reason, PG3&PG4 are configured as UART after system startup.

localhost server # ./devmem 0x01c208d8 w
> /dev/mem opened.
> Memory mapped at address 0xb6f47000.
> Value at address 0x1C208D8 (0xb6f478d8): 0x44000


According to the spec it should be all zeros after the system starts. So 
who sets it? I don't see anything in syslog about this…

-- 
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.
[0.00] Booting Linux on physical CPU 0x0
[0.00] Initializing cgroup subsys cpu
[0.00] Linux version 3.13.0-rc4 (root@localhost) (gcc version 4.7.3 
(Gentoo 4.7.3-r1 p1.3, pie-0.5.5) ) #72 Sun Mar 9 02:17:00 MSK 2014
[0.00] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
[0.00] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing 
instruction cache
[0.00] Machine model: Olimex A13-Olinuxino
[0.00] Memory policy: Data cache writeback
[0.00] On node 0 totalpages: 131072
[0.00] free_area_init_node: node 0, pgdat c06300cc, node_mem_map 
c068f000
[0.00]   Normal zone: 1024 pages used for memmap
[0.00]   Normal zone: 0 pages reserved
[0.00]   Normal zone: 131072 pages, LIFO batch:31
[0.00] CPU: All CPU(s) started in SVC mode.
[0.00] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[0.00] pcpu-alloc: [0] 0 
[0.00] Built 1 zonelists in Zone order, mobility grouping on.  Total 
pages: 130048
[0.00] Kernel command line: fixrtc noinitrd loglevel=7 
cfg80211.ieee80211_regdom=RU root=/dev/mmcblk0p1 rootwait rw panic=10
[0.00] PID hash table entries: 2048 (order: 1, 8192 bytes)
[0.00] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[0.00] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[0.00] Memory: 513008K/524288K available (4511K kernel code, 259K 
rwdata, 1368K rodata, 166K init, 374K bss, 11280K reserved, 0K highmem)
[0.00] Virtual kernel memory layout:
vector  : 0x - 0x1000   (   4 kB)
fixmap  : 0xfff0 - 0xfffe   ( 896 kB)
vmalloc : 0xe080 - 0xff00   ( 488 MB)
lowmem  : 0xc000 - 0xe000   ( 512 MB)
pkmap   : 0xbfe0 - 0xc000   (   2 MB)
modules : 0xbf00 - 0xbfe0   (  14 MB)
  .text : 0xc0008000 - 0xc05c5f6c   (5880 kB)
  .init : 0xc05c6000 - 0xc05efaf0   ( 167 kB)
  .data : 0xc05f - 0xc0630f38   ( 260 kB)
   .bss : 0xc0630f38 - 0xc068ea80   ( 375 kB)
[0.00] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[0.00] NR_IRQS:16 nr_irqs:16 16
[0.00] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 
178956969942ns
[0.00] sched_clock: 32 bits at 168MHz, resolution 5ns, wraps every 
25565282298ns
[0.00] Console: colour dummy device 80x30
[0.00] console [tty0] enabled
[0.000481] Calibrating delay loop... 1001.88 BogoMIPS (lpj=5009408)
[0.089948] pid_max: default: 32768 minimum: 301
[0.090061] Mount-cache hash table entries: 512
[0.091975] CPU: Testing write buffer coherency: ok
[0.092303] Setting up static identity map for 0x4046dfd8 - 0x4046e030
[0.093103] devtmpfs: initialized
[0.093691] VFP support v0.3: implementor 41 architecture 3 part 30 variant 
c rev 3
[0.093895] pinctrl core: initialized pinctrl subsystem
[0.094092] reg-dummy reg-dummy: no of_node; not parsing pinctrl DT
[0.094189] regulator-dummy: no parameters
[0.094500] NET: Registered protocol family 16
[0.095080] DMA: preallocated 256 KiB pool for atomic coherent allocations
[0.096909] No ATAGs?
[0.096934] hw-breakpoint: debug architecture 0x4 unsupported.
[0.102149] bio: create slab  at 0
[0.102544] reg-fixed-voltage usb1-vbus.2: could not find pctldev for node 
/soc@01c0/pinctrl@01c20800/usb1_vbus_pin@0, deferring probe
[0.102594] platform usb1-vbus.2: Driver reg-fixed-voltage requests probe 
deferral
[0.102932] SCSI subsystem initialized
[0.103122] usbcore: registered new interface driver usbfs
[0.103183] usbcore: registered new interface driver hub
[0.103325] usbcore: registered new device driver usb
[0.103441] pps_core: LinuxPPS API ver. 1 registered
[0.103456] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo 
Giometti 
[0.104302] Switched to clocksource timer
[0.111237] NET: Registered protocol family 2
[0.111946] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[0.112015] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[0.112064] TCP: Hash tables configured (established 4096 bind 4096)
[0.112159] TCP: reno registered
[0.1121

[linux-sunxi] Re: A31 pmic (axp221) support

2014-03-09 Thread Maxime Ripard
Hi Hans,

On Sun, Mar 09, 2014 at 08:41:35AM +0100, Hans de Goede wrote:
> Hi Maxime,
> 
> Yesterday I've been playing a bit with my Mele A1000G Quad, with the
> purpose of trying to get usb and mmc working there. I already have
> wens' gmac patches for the A31 in my tree, so for starters I tried
> to get that to work.

I was planning to do it next week too :)

> Unfortunately the fex shows that the phy is powered by dldo1 from
> the pmic, and by default that is configured to off. So I got stuck
> there wrt getting the gmac to work on the A1000G Quad / M9.

I'm not definitive, but it looks like the EVB doesn't though.

> Do you know if anyone is working on pmic support for the A31, or for
> the new push-pull serial bus this uses?

It's on my todo list, but I don't think anyone's working on it.

> Is this bus similar enough to i2c that we can use the i2c subsys for
> this, maybe with an extra controller flag, or do we need to likely
> write a whole new subsys for this ?

It really looks like I2C, except that at the end of each byte sent,
there's an extra parity bit sent. I think we don't really need a new
bus for this, but we can somehow fit this into I2C. We could do it
through an extra controller flag, but I'm not sure that it's actually
needed, since we can handle the parity bit in the driver and present a
8-bit interface to the framework.

> Also do you know of a datasheet for the AXP221 somewhere ?

Nope :(

Maxime

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


signature.asc
Description: Digital signature


[linux-sunxi] Re: [PATCH 1/7] mfd: AXP20x: Add mfd driver for AXP20x PMIC

2014-03-09 Thread Maxime Ripard
Hi Carlo,

On Sat, Mar 08, 2014 at 12:31:41PM +0100, Carlo Caione wrote:
> > > + axp20x->pm_off = of_property_read_bool(node, 
> > > "axp,system-power-controller");
> > > +
> > > + if (axp20x->pm_off && !pm_power_off) {
> > > + axp20x_pm_power_off = axp20x;
> > > + pm_power_off = axp20x_power_off;
> > > + }
> > 
> > I don't think we have any other way to actually power down the board.
> > 
> > Is there any reason why we would not need this property?
> 
> In case you have multiple PMIC on the board in this way you con define
> which is the one apt to power off.

Do we even have such a board?

Let's leave this out, we can always add it later if needs be.

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


signature.asc
Description: Digital signature


Re: [linux-sunxi] Re: [PATCH 6/7] regulator: AXP20x: Add support for regulators subsystem

2014-03-09 Thread Carlo Caione
On Sun, Mar 09, 2014 at 07:51:48AM +, Mark Brown wrote:
> On Sat, Mar 08, 2014 at 12:43:04PM +0100, Carlo Caione wrote:
> > On Fri, Mar 7, 2014 at 7:22 PM, Maxime Ripard
> > > On Sat, Mar 01, 2014 at 05:45:51PM +0100, Carlo Caione wrote:
> 
> > >> + return platform_driver_register(&axp20x_regulator_driver);
> 
> > > I thought the AXP was only connected through I2C? How is that a
> > > platform device then?
> 
> > Not really. It is plain wrong.
> > I'll fix it in v2.
> 
> Are you sure this is wrong?  For MFDs the core MFD is a driver of
> whatever bus type is in use but the function drivers are platform
> devices which talk to the hardware via the core device.

ok, I spoke too soon. Sorry for the noise.

-- 
Carlo Caione

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