Skip to content

Commit

Permalink
sunxi: Hackberry 1GB SPL parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
hno committed Oct 20, 2012
1 parent 0c38834 commit 7086c98
Show file tree
Hide file tree
Showing 4 changed files with 117 additions and 0 deletions.
50 changes: 50 additions & 0 deletions board/allwinner/hackberry/Makefile
@@ -0,0 +1,50 @@
#
# (C) Copyright 2000-2003
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
#
# See file CREDITS for list of people who contributed to this
# project.
#
# 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.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
# MA 02111-1307 USA
#


include $(TOPDIR)/config.mk

LIB = $(obj)lib$(BOARD).o

COBJS := board.o dram.o

SRCS := $(COBJS:.o=.c)
OBJS := $(addprefix $(obj),$(COBJS))

$(LIB): $(obj).depend $(OBJS)
$(call cmd_link_o_target, $(OBJS))

clean:
rm -f $(OBJS)

distclean: clean
rm -f $(LIB) core *.bak $(obj).depend

#########################################################################

# defines $(obj).depend target
include $(SRCTREE)/rules.mk

sinclude $(obj).depend

#########################################################################
35 changes: 35 additions & 0 deletions board/allwinner/hackberry/board.c
@@ -0,0 +1,35 @@
/*
* (C) Copyright 2007-2011
* Allwinner Technology Co., Ltd. <www.allwinnertech.com>
* Tom Cubie <tangliang@allwinnertech.com>
*
* Some board init for the Allwinner A10-evb board.
*
* See file CREDITS for list of people who contributed to this
* project.
*
* 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.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*/

#include <common.h>

#ifdef CONFIG_DISPLAY_BOARDINFO
int checkboard(void) {

puts("Board: Hackberry\n");
return 0;
}
#endif
31 changes: 31 additions & 0 deletions board/allwinner/hackberry/dram.c
@@ -0,0 +1,31 @@
/* this file is generated, don't edit it yourself */

#include <common.h>
#include <asm/arch/dram.h>

static struct dram_para dram_para = {
.clock = 300,
.type = 3,
.rank_num = 1,
.density = 4096,
.io_width = 16,
.bus_width = 32,
.cas = 6,
.zq = 123,
.odt_en = 1,
.size = 1024,
.tpr0 = 0x30926692,
.tpr1 = 0x1090,
.tpr2 = 0x1a0c8,
.tpr3 = 0,
.tpr4 = 0,
.tpr5 = 0,
.emr1 = 0,
.emr2 = 0,
.emr3 = 0,
};

int sunxi_dram_init(void)
{
return DRAMC_init(&dram_para);
}
1 change: 1 addition & 0 deletions boards.cfg
Expand Up @@ -286,6 +286,7 @@ mele_a1000 arm armv7 mele_a1000 allwinn
cubieboard arm armv7 cubieboard allwinner sunxi sun4i:SPL
cubieboard_512 arm armv7 cubieboard_512 allwinner sunxi sun4i:SPL
a13_olinuxino arm armv7 a13_olinuxino allwinner sunxi sun5i:SPL
hackberry arm armv7 hackberry allwinner sunxi sun4i:SPL
kzm9g arm armv7 kzm9g kmc rmobile
armadillo-800eva arm armv7 armadillo-800eva atmark-techno rmobile
zynq arm armv7 zynq xilinx zynq
Expand Down

11 comments on commit 7086c98

@ljbade
Copy link

@ljbade ljbade commented on 7086c98 Oct 20, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Current hackberry support seems very flakey.

Using this commit with the October release tag produces all sorts of read errors with the SD card reader.

It seems to have problems with bad sectors, invalid partition tables, bad checksum on the kernel image, and once it even got far enough to complain about not being able to mount the rootfs.

I have tested with fat16/fat32/ext2 boot partitions and they all hit a read error somewhere during the boot.

If I go back to the custom u-boot from http://jas-hacks.blogspot.com.au/2012/10/hackberry-a10-linaro-1206-desktop.html it boots fine.

I have not been able to figure out what the problem is so far, but I would reccommend other hackberryers stay away from recent u-boot until these issues are fixed.

@amery
Copy link
Member

@amery amery commented on 7086c98 Oct 20, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ljbade what about recommending miniand people to collaborate with us?

@ljbade
Copy link

@ljbade ljbade commented on 7086c98 Oct 20, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@amery true, it seems that most people at miniand have decided to used custom u-boots and kernels for whatever reason... (I think mainly due to the initial fragmentation between sunxi based boards with incompatible hardware configs)

I would certainly like to encourage more collaboration and that is why I am trying to see if I can get hackberry booting with latest u-boot and kernel so that people can start collaborating more on fixing bugs in recent versions.

At least I got the latest kernel booting now, just having problems getting fbcon to start!

Hopefully I will be able to help you guys tracedown what the issue is with the hackberry and the latest u-boot.

Is it possible to add more verbose/debug/trace messages to u-boot so that I can figure out what is causing the read errors?

@mtx512
Copy link

@mtx512 mtx512 commented on 7086c98 Oct 21, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ijabe I have created config for Hackberry boards can you test. I have tested these booting with .36+ and .42 kernels. I can submit patches once they are confirmed stable.

General question, do we have support for console output through serial usb-ttl adapter instead of serial port? Also is tty0 confirmed working with fbcon.

@ljbade
Copy link

@ljbade ljbade commented on 7086c98 Oct 21, 2012 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@amery
Copy link
Member

@amery amery commented on 7086c98 Oct 21, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I use fbcon on tty1. It comes indeed very late, but an initramfs won't bring it faster that enabling it as built-in.

@mtx512
Copy link

@mtx512 mtx512 commented on 7086c98 Oct 21, 2012 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hno
Copy link
Member Author

@hno hno commented on 7086c98 Oct 21, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't have much support for the USB controller in u-boot.

In u-boot-sunxi there is no USB support at all.

In the android u-boot there is basic Android FASTBOOT device mode support, allowing flashing via FASTBOOT. But that's all. And it is done in a way that is not easily reused in USB console gadget or USB host mode.

@hno
Copy link
Member Author

@hno hno commented on 7086c98 Oct 21, 2012 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ljbade
Copy link

@ljbade ljbade commented on 7086c98 Oct 22, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I managed to get fbcon loading a bit earlier by fixing the inicall level of the lcd and hdmi device: linux-sunxi/linux-sunxi#66 (comment)

I tried to put it at subsystem level but then it can't read the config FEX.

It would be nice to have an early splash screen... I wonder how Android does it so early (my phone even has a animated LG logo before the Android one is loaded).

Of course the ultimate would be a rough fbcon with USB keyboard support so that you can interact with u-boot console.

@hno
Copy link
Member Author

@hno hno commented on 7086c98 Oct 22, 2012 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.