Re: [linux-sunxi] u-boot source code for A20
Hi HNO, i downloaded cubieboard img file from this link. http://dl.linux-sunxi.org/users/hramrach/cubieboard2-linux3.3-SD-card-image/ i flashed this image to sd card. which is working fine. the u-boot log for this image file is : U-Boot SPL 2013.04-07297-gc8f265c-dirty (Jun 23 2013 - 14:31:49) Board: Cubieboard2 DRAM: 1024MB CPU: 96000Hz, AXI/AHB/APB: 3/2/2 SUNXI SD/MMC: 0 U-Boot 2013.04-07297-gc8f265c-dirty (Jun 23 2013 - 14:31:49) Allwinner Technology CPU: Allwinner A20 (SUN7I) Board: Cubieboard2 I2C: ready DRAM: 1 GiB MMC: SUNXI SD/MMC: 0 In:serial Out: serial Err: serial Net: emac Hit any key to stop autoboot: 0 So i downloaded u-boot source code from this link. https://github.com/linux-sunxi/u-boot-sunxi. i compiled by make CROSS_COMPILE=arm-linux-gnueabi- cubieboard2 which is compiled fine. i got sunxi-spl.bin ,u-boot.bin and u-boot-spl.bin. sudo dd if=sunxi-spl.bin of=/dev/sdc bs=1024 seek=8 sudo dd if=u-boot.bin of=/dev/sdc bs=1024 seek=32. in log i got this error. U-Boot SPL 2014.01-rc1-09136-g25ae46b (Dec 30 2013 - 12:57:50) Board: Cubieboard2 DRAM: 1024 MiB CPU: 96000Hz, AXI/AHB/APB: 3/2/2 spl: not an uImage at 1600 spl: not an uImage at 80 ### ERROR ### Please RESET the board ### Kindly tell me what will be wrong. Regards Punith -- 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/groups/opt_out.
Re: [linux-sunxi] [PATCH u-boot-sunxi v2 00/13] Add GMAC support to u-boot
On Sun, 22 Dec 2013 00:39:39 +0800 Chen-Yu Tsai wrote: > Hi everyone, > > This patch series add support for GMAC on Cubieboard2 and > Cubietruck, using the designware driver already in u-boot. > The patch series should be applied over the current 'sunxi' > branch in linux-sunxi/u-boot-sunxi. > > The work was started by Jens Kuske (jemk), which enabled > the GMAC on CubieTruck under 10/100 speeds. Then I added > gigabit, pin drive level and Cubieboard 2 support. > Ma Haijun picked out an incorrect mask in the pin setup > code. > > There is one modification to the original driver, which > reduces the DMA burst length, to a value supported by the > GMAC. This should probably be upstreamed. > The remaining patches are all sunxi specific. > > Adding GMAC support to other A20 boards shoule be as simple > as adding the proper defines to boards.cfg. > > Cheers, > > ChenYu > > > Changes from v1: > > * Moved gmac initialization code into glue layer under drivers/net > * Added and switched to gmac clock macros instead of magic numbers > * Added comment on ahb0 vs ahb1 for GMAC clock gate offset > * Added explanatory message to Ma Haijun's commit > > > Chen-Yu Tsai (8): > ARM: sunxi: Enable support for gigabit PHYs > ARM: sunxi: Add functions to set pin drive levels > ARM: sunxi: Set drive level for GMAC pins > ARM: sunxi: GMAC driver phy interface based on config > ARM: sunxi: Do not select unused GMAC pins under RGMII mode > ARM: sunxi: Let cubieboard2 use the GMAC driver > ARM: sunxi: Add gmac clock macros > ARM: sunxi: Move GMAC init code into separate glue layer driver > > Jens Kuske (4): > net/designware: Reduce DMA burst length > ARM: sunxi: Add GMAC base address and clocks > ARM: sunxi: Add GMAC driver > ARM: sunxi: Let cubietruck use the GMAC driver > > Ma Haijun (1): > ARM: sunxi: fix gpio drive mask Thanks, this seems to work fine on my cubietruck. That's a very much welcome improvement. -- Best regards, Siarhei Siamashka -- 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/groups/opt_out.
[linux-sunxi] Re: [PATCH] PWM kernel module for the Allwinner A10 SOC for 3.4 series kernels
Hi, All! I use board Cubieboard v.1 I use Debian distro which build under the instruction from the website linux-sunxi.org Linux Cubieboard 3.4.75 No problems, everything works. 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/groups/opt_out.
[linux-sunxi] boot environment variables..
Hi, i am using these boot cmd. setenv console 'ttyS0,115200' setenv root '/dev/mmcblk0p2' setenv panicarg 'panic=10' setenv extra 'rootfstype=ext4 rootwait' setenv loglevel '8' setenv setargs 'setenv bootargs console=${console} root=${root} init=/init loglevel=${loglevel} ${panicarg} ${extra}' setenv kernel 'uImage' setenv boot_mmc 'fatload mmc 0 0x4300 script.bin; fatload mmc 0 0x4800 ${kernel}; bootm 0x4800' setenv bootcmd 'run setargs boot_mmc' if i put uImage in 1st partition which is working fine. but in my case i have uImage,script.bin and boot.scr are in my second partition. Kindly tell me what argument i need to pass to access uImage of second partition. Regards Punith -- 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/groups/opt_out.
Re: [linux-sunxi] [PATCH 3.4] sunxi: Simplify and unify the __phys_to_bus/__bus_to_phys macros
Hi, On 12/30/2013 01:50 AM, Siarhei Siamashka wrote: These macros are used to convert between physical addresses (as seen by the CPU) and bus addresses (as seen by various peripherals such as the display controller, cedar, g2d, mali, ...). The difference between physical and bus addresses is 0x4000, because that's the physical address of SDRAM (and PHYS_OFFSET define in the kernel). Huang Benn has provided an explanation earlier: http://thread.gmane.org/gmane.comp.hardware.netbook.arm.sunxi/2827 But some additional demystification might be useful. Basically, when we write an address to some hardware register of the display controller, it is expected to be a bus address. However as long as the size of RAM is just 1 GiB or less, adding or subtracting a multiple of PHYS_OFFSET (which happens to be 1 GiB) to this address does not have any adverse effects. We just get some garbage in the high address lines on the memory interface, but these high address lines are not connected anywhere and have no effect. So using either bus addresses or just physical addresses was fine for the systems with 1 GiB of RAM or less. But when having 2 GiB of RAM, using proper bus addresses becomes really important. A failure to do so and an incorrect value in the high address bit results in memory accesses going to a low or high 1 GiB part of DRAM based on the value of this bit. This behaviour is expected to be the same for all sunxi hardware with 2 GiB of RAM. There is nothing sun7i specific in it and it makes sense to treat sun4i/sun5i/sun7i in the same way. Also the conversion between bus and physical addresses is a simple addition or subtraction of PHYS_OFFSET without any need for convoluted logic. Signed-off-by: Siarhei Siamashka Looks good: Acked-by: Hans de Goede Regards, Hans --- arch/arm/plat-sunxi/include/plat/memory.h | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/arch/arm/plat-sunxi/include/plat/memory.h b/arch/arm/plat-sunxi/include/plat/memory.h index 20c27bd..42a4afa 100644 --- a/arch/arm/plat-sunxi/include/plat/memory.h +++ b/arch/arm/plat-sunxi/include/plat/memory.h @@ -30,13 +30,7 @@ /* default ATAG_MEM size */ #define MEM_SIZE (512*1024*1024) -#ifdef CONFIG_ARCH_SUN7I -#define __phys_to_bus(x) (((x)>=PLAT_PHYS_OFFSET)?(x)-PLAT_PHYS_OFFSET:(x)) -#define __bus_to_phys(x) (((x) -- 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/groups/opt_out.
[linux-sunxi] Re: [PATCH 0/4] clk: sunxi: add A20 external output clock support
Hi Mike, On Sun, Dec 29, 2013 at 01:56:33PM -0800, Mike Turquette wrote: > Quoting Maxime Ripard (2013-12-29 12:59:27) > > Hi Chen-Yu, > > > > On Mon, Dec 23, 2013 at 04:37:02PM +0800, Chen-Yu Tsai wrote: > > > Hi everyone, > > > > > > This patch series adds support for the Allwinner A20's 2 external clock > > > outputs. The CubieTruck uses one such output to supply a stable 32.768 > > > KHz low power clock to its AP6210 WiFi module. Support for the module > > > is being added to brcmfmac (brcm80211) by Broadcom people. > > > > > > The patches should be applied after Emilio's sunxi clock series, as it > > > uses the new factors clocks setup code. > > > > Overall, it looks nice, but could you resend it as a separate thread, > > with [PATCHv2] as a prefix (git format-patch's --reroll-count can help > > you there) and CC'ing Linus Walleij for the pinctrl patch? > > Hi Maxime, > > Just FYI I have taken patch #1 of this series via Emilio's pull request. Yeah, Emilio told me. Thanks for the heads up! Maxime -- Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com signature.asc Description: Digital signature
[linux-sunxi] Re: [PATCH v2 3/4] pinctrl: sunxi: Add Allwinner A20 clock output pin functions
Hi Chen-Yu, On Mon, Dec 30, 2013 at 11:25:48AM +0800, Chen-Yu Tsai wrote: > This patch adds the clock output pin functions on the A20. > The 2 pins can output a configurable clock to be used by > external modules. This is used on the CubieTruck, to supply > a 32768 Hz low power clock to the onboard Wifi+BT module. > > Signed-off-by: Chen-Yu Tsai Acked-by: Maxime Ripard Thanks! Maxime -- Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com signature.asc Description: Digital signature
[linux-sunxi] Re: [PATCH v2 4/4] ARM: dts: sun7i: Add pin muxing options for clock outputs
Hi Chen-Yu, On Mon, Dec 30, 2013 at 11:25:49AM +0800, Chen-Yu Tsai wrote: > This patch adds the clock output pin options on the A20. > The 2 pins can output a configurable clock to be used by > external modules. This is used on the CubieTruck, to supply > a 32768 Hz low power clock to the onboard Wifi+BT module. > > Signed-off-by: Chen-Yu Tsai > --- > arch/arm/boot/dts/sun7i-a20.dtsi | 14 ++ > 1 file changed, 14 insertions(+) > > diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi > b/arch/arm/boot/dts/sun7i-a20.dtsi > index f255a49..7b46ce5 100644 > --- a/arch/arm/boot/dts/sun7i-a20.dtsi > +++ b/arch/arm/boot/dts/sun7i-a20.dtsi > @@ -416,6 +416,20 @@ > allwinner,drive = <0>; > allwinner,pull = <0>; > }; > + > + clk_out_a_pins: clk_out_a@0 { > + allwinner,pins = "PI12"; > + allwinner,function = "clk_out_a"; > + allwinner,drive = <0>; > + allwinner,pull = <0>; > + }; > + > + clk_out_b_pins: clk_out_b@0 { > + allwinner,pins = "PI13"; > + allwinner,function = "clk_out_b"; > + allwinner,drive = <0>; > + allwinner,pull = <0>; > + }; The labels should be clk_out_[ab]_pins_a. That way, if another muxing pops up for this clock, we will just need to add the new node, without modifying the one you add just there. Thanks! Maxime -- Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com signature.asc Description: Digital signature
[linux-sunxi] Re: [PATCH v2 2/4] ARM: dts: sun7i: external clock outputs
Hi, On Mon, Dec 30, 2013 at 11:25:47AM +0800, Chen-Yu Tsai wrote: > This commit adds the two external clock outputs available on A20 to > its device tree. A dummy fixed factor clock is also added to serve as > the first input of the clock outputs, which according to AW's A20 user > manual, is the 24MHz oscillator divided by 750. > > Signed-off-by: Chen-Yu Tsai > --- > arch/arm/boot/dts/sun7i-a20.dtsi | 27 +++ > 1 file changed, 27 insertions(+) > > diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi > b/arch/arm/boot/dts/sun7i-a20.dtsi > index 4c25f81..f255a49 100644 > --- a/arch/arm/boot/dts/sun7i-a20.dtsi > +++ b/arch/arm/boot/dts/sun7i-a20.dtsi > @@ -302,6 +302,33 @@ > clocks = <&osc24M>, <&pll6 2>, <&pll5 1>; > clock-output-names = "mbus"; > }; > + > + /* > + * Dummy clock used by output clocks > + */ > + osc24M_32k: osc24M_32k { the node name should be clk to reflect the function of the device, and not what instance of it it might be. You should probably use something like clk@0, to avoid collisions with other dummy clocks. Note that we have pretty much the same problem already for the losc and osc24M, it would be great if you could do a patch for these too :) Thanks! 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/1] ARM: sunxi: select ARM_PSCI
Hi Zalan, On Wed, Dec 25, 2013 at 01:11:06PM +0100, Zalan Blenessy wrote: > This is necessary for SMP on sun7i. > > Signed-off-by: Zalan Blenessy I'd expect a bit more details here. What you wrote in your cover letter would be a good start. Something like 8< On Allwinner sun7i (A20) SoCs, the SMP operations are implemented in u-boot, and exposed to the kernel through PSCI. We thus need to enable PSCI support for Allwinner SoCs so that the kernel uses it to bring up the additionnal cores. 8< Thanks! Maxime -- Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com signature.asc Description: Digital signature
Re: [linux-sunxi] boot environment variables..
On 30/12/13 12:24, Puneet B wrote: Hi, i am using these boot cmd. setenv console 'ttyS0,115200' setenv root '/dev/mmcblk0p2' setenv panicarg 'panic=10' setenv extra 'rootfstype=ext4 rootwait' setenv loglevel '8' setenv setargs 'setenv bootargs console=${console} root=${root} init=/init loglevel=${loglevel} ${panicarg} ${extra}' setenv kernel 'uImage' setenv boot_mmc 'fatload mmc 0 0x4300 script.bin; fatload mmc 0 0x4800 ${kernel}; bootm 0x4800' setenv bootcmd 'run setargs boot_mmc' if i put uImage in 1st partition which is working fine. but in my case i have uImage,script.bin and boot.scr are in my second partition. Kindly tell me what argument i need to pass to access uImage of second partition. From help fatload Change mmc 0 to mmc 0:2 You can use fatls to test this -- Tim Fletcher -- 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/groups/opt_out.
Re: [linux-sunxi] Re: New sunxi-next tree with usb (ehci only), hs timers, and other stuff.
On 22/12/13 12:57, Hans de Goede wrote: Hi, On 12/22/2013 12:21 AM, Michal Suchanek wrote: Actually sun7i smp conflicts badly with the sun6i smp .. so a stab at a merge: https://github.com/hramrach/linux-sunxi/commits/sunxi-next Compile tested. Actually the plan for A20 going forward is to have u-boot implement PSCI and use that, the problem of the parent post is likely that he does not have CONFIG_ARM_PSCI=y in his kernels .config. The reason for this is that this is necessary to properly enable HYP mode on the cpu-cores, which we want to be able to do hardware virtualization. WRT I'm a bit surprised that Maxime does have SMP support for A31 in his tree to get merged upstream, as the A31 should be the same story, it has Cortex A7 cores which can do HYP mode too. I've been testing this on my Cubietruck and your current devel tree seems to be missing the dts changes from this commit. https://github.com/hramrach/linux-sunxi/commit/8b5c1d5e7bbd71cf36535dc11578d9387af003b0 If I boot an rc5 kernel with a dtb from rc5 then I get usb but only 1 CPU (other fails to boot error -38), it I boot with a dtb from rc3 I get both cpus but no USB. If I apply the linked patch then I get both CPUs and USB. -- Tim Fletcher -- 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/groups/opt_out.
Re: [linux-sunxi] u-boot source code for A20
Puneet B writes: > i got sunxi-spl.bin ,u-boot.bin and u-boot-spl.bin. > > sudo dd if=sunxi-spl.bin of=/dev/sdc bs=1024 seek=8 > sudo dd if=u-boot.bin of=/dev/sdc bs=1024 seek=32. > > in log i got this error. For olinuxino A20 i also got u-boot-sunxi-with-spl.bin which i installed with: dd if=u-boot-sunxi-with-spl.bin of=/dev/sdX bs=1024 seek=8 For me, this replaced both "stages". HTH pgp6nbT1Km6kt.pgp Description: PGP signature
[linux-sunxi] Re: [PATCH v2 2/4] ARM: dts: sun7i: external clock outputs
Hi, On Mon, Dec 30, 2013 at 11:25 PM, Maxime Ripard wrote: > Hi, > > On Mon, Dec 30, 2013 at 11:25:47AM +0800, Chen-Yu Tsai wrote: >> This commit adds the two external clock outputs available on A20 to >> its device tree. A dummy fixed factor clock is also added to serve as >> the first input of the clock outputs, which according to AW's A20 user >> manual, is the 24MHz oscillator divided by 750. >> >> Signed-off-by: Chen-Yu Tsai >> --- >> arch/arm/boot/dts/sun7i-a20.dtsi | 27 +++ >> 1 file changed, 27 insertions(+) >> >> diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi >> b/arch/arm/boot/dts/sun7i-a20.dtsi >> index 4c25f81..f255a49 100644 >> --- a/arch/arm/boot/dts/sun7i-a20.dtsi >> +++ b/arch/arm/boot/dts/sun7i-a20.dtsi >> @@ -302,6 +302,33 @@ >> clocks = <&osc24M>, <&pll6 2>, <&pll5 1>; >> clock-output-names = "mbus"; >> }; >> + >> + /* >> + * Dummy clock used by output clocks >> + */ >> + osc24M_32k: osc24M_32k { > > the node name should be clk to reflect the function of the device, and > not what instance of it it might be. > > You should probably use something like clk@0, to avoid collisions with > other dummy clocks. No problem. I will fix this and the pin mux set names. > Note that we have pretty much the same problem already for the losc > and osc24M, it would be great if you could do a patch for these too :) I will add a patch before this one, so the numbering won't be confusing, i.e. @1 appears before @0. Mind if I add a patch enabling i2c0 on CubieTruck? I noticed it was missing when I helped Carlo with AXP209 stuff. Cheers ChenYu -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [linux-sunxi] Re: A good SD card image for A10-OLinuXino-Lime?
On Tue, 17 Dec 2013 11:36:29 +0100 Michal Suchanek wrote: > On 17 December 2013 07:09, Siarhei Siamashka > wrote: > > On Mon, 16 Dec 2013 14:13:11 +0200 > > Tsvetan Usunov wrote: > > > >> Hi Siarhei > >> You are right, the RPI fans are a bit dissapointed by the Debian image > >> generated from Linux-Sunxi GitHub and no hardware acceleration. > > > > It's not just RPI fans. Trying your debian image (on a cubieboard, > > because I don't have lime yet) was kinda a wake up call for me. > > And I have also seen some other less than perfect linux distros > > earlier. People here may be developing some nice software, trying > > their best to optimize it, but still get their efforts wasted by > > the "last mile" problem. If distro maintainers don't do a really > > good job, then the end users have poor experience and a wrong > > impression about the performance of the hardware. > > We don't even have anything of value to distro maintainers. Distro > wants something stable that can be packaged and forgot. I don't quite agree here. The value of the linux distributions for the end users are timely updates with the important bugfixes (security fixes at least) and first-line support for the basic user problems (also communicating upstream when necessary). The "packaged and forgot" approach would mean a poor job done on their side. Yes, they do unpaid volunteer work and we can't demand/expect much. But most of us are doing the unpaid volunteer work too when contributing to linux sunxi. > With the rapid development of sunxi you would need new package of > something every week. > > > > > I'll try to make a desktop linux demo image available in a few days, > > so that people could compare it with their current distros :) > > Maybe like an image with checkouts of the current drivers and libs > somewhere in /usr/src or /opt and symlinks and configuration files in > place to use the files built from these checkouts. > > Then you update by git pull && make. > > That is pretty much what I use but I have quite hackish image where > some libraries are symlinked from the source dir, some are installed, > some are copied because make install puts them in a wrong place, etc. My vision for this is just some sort of a demo sdcard image, similar to what they do with livecd in the desktop world. No need for a properly configured installation with all the security and regular updates in place. That's would be the job of the distro maintainers, and I don't want to eat their lunch ;) Still we can showcase the basic tasks like internet browsing, video playback, office applications, games and other cool things. All running with decent performance, just like it should preferably do in a good linux distro. -- Best regards, Siarhei Siamashka -- 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/groups/opt_out.