Skip to content
Snippets Groups Projects
  1. Feb 24, 2015
  2. Feb 23, 2015
  3. Feb 22, 2015
  4. Feb 21, 2015
    • Siarhei Siamashka's avatar
      sunxi: Machine id hack to prevent loading buggy sunxi-3.4 kernels · 77ef1369
      Siarhei Siamashka authored
      
      Right now U-Boot supports the CONFIG_OLD_SUNXI_KERNEL_COMPAT option,
      which makes it go out of its way in limiting the selection of PLL clock
      frequencies and PMIC voltages in order not to upset outdated buggy
      sunxi-3.4 kernel releases. And if the CONFIG_OLD_SUNXI_KERNEL_COMPAT
      option is not set, then booting such old kernels exhibits various
      failures at runtime. This is very user unfriendly, and there were
      already several incidents when people wasted their time being hit
      by these runtime failures and trying to debug them.
      
      The right solution is not to add hacks and workarounds to the mainline
      U-Boot, but to fix these bugs in the sunxi-3.4 kernel. And in fact,
      the updated sunxi-3.4 kernels already exist. Still we need to follow
      the 'Principle of Least Surprise' and U-Boot needs to ensure that
      the old buggy kernels are not getting happily booted when the
      CONFIG_OLD_SUNXI_KERNEL_COMPAT option is not set. And this patch
      addresses this particular issue.
      
      This patch makes U-Boot store the 'compatibility revision' number in
      the top 4 bits of the machine id and pass it to the kernel. The old
      buggy kernels will fail to load with a very much googlable error
      message on the serial console (the "r1 = 0x100010bb" part of it):
      
        "Error: unrecognized/unsupported machine ID (r1 = 0x100010bb)"
      
      This error message can be documented in the linux-sunxi wiki with
      proper explanations about how to resolve this situation and where
      to get the necessary bugfixes for the sunxi-3.4 kernel.
      
      The fixed sunxi-3.4 kernels implement a revision compatibility check
      and clear the top 4 bits of the machine id if everything is alright.
      By accepting the machine id with the bits 31:28 set to 1, the sunxi-3.4
      kernel effectively certifies that it has the PLL5 clock speed and
      AXP209 DCDC3 voltage fixes applied.
      
      It is still possible to set the CONFIG_OLD_SUNXI_KERNEL_COMPAT option
      in U-Boot if the user desires to use an outdated unpatched sunxi-3.4
      kernel.
      
      Signed-off-by: default avatarSiarhei Siamashka <siarhei.siamashka@gmail.com>
      Acked-by: default avatarIan Campbell <ijc@hellion.org.uk>
      Acked-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      77ef1369
    • Hans de Goede's avatar
      sunxi: Set the /chosen/stdout-path fdt property for sunxi boards · f3133962
      Hans de Goede authored
      
      While discussing with some people how to get the Linux kernel to do the
      right thing wrt sending output to both the serial console and the
      hdmi out / lcd screen when booting on ARM devices, Grant Likely pointed out
      that there already is a solution for this.
      
      All we need to do is set the /chosen/stdout-path fdt property, and if no
      console= arguments were specified on the kernel commandline the kernel
      will honor this and add this device as a console (next to the primary
      video output on hdmi).
      
      And u-boot already has support for setting this, all we need to do is
      define OF_STDOUT_PATH and then everything will just work ootb, without
      people needing to meddle with adding console= arguments in extlinux.conf .
      
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Acked-by: default avatarIan Campbell <ijc@hellion.org.uk>
      Reviewed-by: default avatarTom Rini <trini@ti.com>
      f3133962
    • Hans de Goede's avatar
      sunxi: Fix sun5i mbus speed when booting old kernels · f388a26d
      Hans de Goede authored
      
      Older linux-sunxi-3.4 kernels override our PLL6 setting with 300 MHz,
      halving the mbus frequency, so set it to 300 MHz ourselves and base the
      mbus divider on that.
      
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Acked-by: default avatarIan Campbell <ijc@hellion.org.uk>
      f388a26d
    • Hans de Goede's avatar
      sunxi: musb: Check Vbus-det before enabling otg port power · 52defe8f
      Hans de Goede authored
      
      Sending out 5V when there is a charger connected to the otg port is not a
      good idea, so check for this and error out.
      
      Note this commit currently breaks otg support on the q8h tablets, as we need
      to do some magic with the pmic there to get vbus info, this is deliberate
      (better safe then sorry), fixing this is on my TODO list.
      
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Acked-by: default avatarIan Campbell <ijc@hellion.org.uk>
      52defe8f
    • Hans de Goede's avatar
      sunxi: Add support for the UTOO P66 tablet · 636317c9
      Hans de Goede authored
      
      The UTOO P66 is a 6" A13 tablet / lcd ereader. It features a 6" 480x800 ips
      lcd screen, 512MB RAM & 4GB emmc.
      
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Acked-by: default avatarIan Campbell <ijc@hellion.org.uk>
      636317c9
    • Hans de Goede's avatar
      sunxi: mmc: Always declare High Capacity capability · 1de32b8a
      Hans de Goede authored
      
      High Capacity (e)MMC cards work fine on sun4i / sun5i, and not having this
      capability set causes u-boot to not recognize the eMMC on an Utoo P66 A13
      tablet, so always set it thereby fixing this.
      
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Acked-by: default avatarIan Campbell <ijc@hellion.org.uk>
      1de32b8a
Loading