On Thu, 22 Oct 2015 13:52:38 +0200 Jens Kuske <jensku...@gmail.com> wrote:
> > On 22/10/15 10:49, Hans de Goede wrote: > > Hi, > > > > On 22-10-15 09:49, Jens Kuske wrote: > [..] > >> > >> I don't plan to work on USB soon, my next step would have been Ethernet > >> and finishing the basic u-boot support. You know my u-boot H3 wip tree I > >> hope? Before we duplicate our work there too... > >> https://github.com/jemk/u-boot-sunxi/tree/sunxi/h3 > > > > I was not aware of that work, at a first glance it looks good. Can you > > rebase > > this on top of current u-boot/master (or v2015.10) and then submit it > > upstream ? > > I will, after fixing some more things (like your question 2). FYI, this branch works mostly OK on my freshly bought Orange Pi PC board. I only had to reduce the DRAM clock speed from 672MHz to 480MHz to prevent the kernel from oopsing. But when the DRAM is initialized by boot0, 672MHz seems to work without obviously visible problems. I will try to debug this problem and compare the configuration in the DRAM controller hardware registers. The FEX files seem to imply that the DRAM settings should be the same on all H3 based Orange boards, but there might be still some deliberate difference in the configuration or a subtle bug in your code. > > 2 questions which come to mind immediately: > > > > 1) Where does the dram init logic come from, AFAIK Allwinner has not > > provided > > any H3 dram init code ? > > It's from the Draco H3 TV Stick SDK: > > http://www.cnx-software.com/2015/06/14/tronsmart-draco-h3-tv-stick-firmware-and-sdk-released/ Could you please provide a bit more details about the location of this code? I tried to download the SDK and looked around a bit. There are some directories with the DRAM initialization code: H3_SDK_20150601_lichee/brandy/basic_loader/bsp_for_a13 H3_SDK_20150601_lichee/brandy/basic_loader/bsp_for_a20 H3_SDK_20150601_lichee/brandy/basic_loader/bsp_for_a31 H3_SDK_20150601_lichee/brandy/basic_loader/bsp_for_a39 H3_SDK_20150601_lichee/brandy/basic_loader/bsp_for_a50 H3_SDK_20150601_lichee/brandy/basic_loader/bsp_for_a67 H3_SDK_20150601_lichee/brandy/basic_loader/bsp_for_a73 H3_SDK_20150601_lichee/brandy/basic_loader/bsp_for_a77 H3_SDK_20150601_lichee/brandy/basic_loader/bsp_for_a81 H3_SDK_20150601_lichee/brandy/basic_loader/bsp_for_i20 The names are a bit strange and nothing obviously looks like H3. A quick search for some of the relatively unique magic constants used in your code also was not very successful, but I did not try too hard yet. > > 2) I see no pmic code in there. I know these boards do not use an axp pmic, > > but according to my info at least the Orange Pi 2 (which I have) uses a > > sy8106a pmic, it is not entirely clear to me yet if this one needs any > > init though, I've mailed the Orange Pi people about this. > > Correct, the CPU voltage is provided by a i2c controllable regulator (sy8106a) > without any datasheet. I've found how to set the voltage in above SDK, but I > first want test this carefully. > > There's also the problem that we have to use the OpenRISC core for power > management (especially poweroff), since there is no external PMIC. This can > be done later of course, but we should think about how to do it. There was a SY8106A datasheet posted later in the mailing list. It looks like at least on the Orange Pi PC the default voltage supplied by SY8106A (and configured via a pair of resistors) is 1.2V which seems to be safe for the CPU clock frequencies up to 1008MHz according to the comments in the FEX file. I added some notes to the wiki page: https://linux-sunxi.org/Orange_Pi_PC Moreover, people in the Orange Pi forums seem to be complaining about the SoC easily overheating without a heatsink. It means that enabling the highest CPU clock speed may be not the brightest idea without adding support for the temperature sensor first. So it looks like configuring SY8106A is not the most important feature for the initial H3 support in U-Boot and it can be postponed until a later date. Though SY8106A retains the configured voltage after reboot and the 3.4 kernel from the Allwinner's SDK can potentially reduce it below 1.2V when sitting at the lowest operating points. So this definitely has to be addressed eventually. BTW, is anybody already planning to work on HDMI video support for U-Boot? -- 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/d/optout.