sunxi: A23: Fix some revisions needing a different magic sram poke
Subsystems (3)
PATCH 1/2 sunxi: A23: Fix some revisions needing a different magic sram poke
I've had this one a23 tablet which would not boot and I've finally figured out what the problem is by looking at the released boot0 code, it seems the magic sram controller poke which we need to do in s_init() depends on the revision of the a23.
Specifically this change is needed to get the A23 SoC I have with the following serial to boot: "E6071AB 26Y7".
--- arch/arm/cpu/armv7/sunxi/board.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-)
arch/arm/cpu/armv7/sunxi/board.c +19 -3
@@ -113,11 +113,27 @@ int spl_board_load_image(void)void s_init (void ) { -#if definedCONFIG_MACH_SUN6I || definedCONFIG_MACH_SUN8I_A23 -/* Magic (undocmented) value taken from boot0, without this DRAM -* access gets messed up (seems cache related) */ +/* +* Undocmented magic taken from boot0, without this DRAM +* access gets messed up (seems cache related). +* The boot0 sources describe this as: "config ema for cache sram" +*/ +#if definedCONFIG_MACH_SUN6I setbits_le32 (SUNXI_SRAMC_BASE +0x44 ,0x1800 ); +#elif definedCONFIG_MACH_SUN8I_A23 +uint version; + +/* Unlock sram version info reg, read it, relock */ +setbits_le32 (SUNXI_SRAMC_BASE +0x24 , (1 <<15 )); + version =readl (SUNXI_SRAMC_BASE +0x24 ); +clrbits_le32 (SUNXI_SRAMC_BASE +0x24 , (1 <<15 )); + +if ((version &0xffff0000 ) ==0x16500000 ) +setbits_le32 (SUNXI_SRAMC_BASE +0x44 ,0x1800 ); +else /* 0x1661 ? */ +setbits_le32 (SUNXI_SRAMC_BASE +0x44 ,0xc0 );#endif +#if definedCONFIG_MACH_SUN6I || \ definedCONFIG_MACH_SUN7I || \ definedCONFIG_MACH_SUN8I
Signature · 1 line
2.7.2
PATCH 2/2 sunxi: Add defconfig and dts for colorfly e708 q1 tablet
The colorfly e708 q1 is a 7" tablet which is clearly marked as colorfly e708 q1 on the back. It features a 9:16 800x1280 IPS LCD, A31s SoC, 1GB RAM, 8G NAND, ilitek 2139qt004 touchscreen on i2c-1 addr 0x41, stk8313 accelerometer on i2c-2 addr 0x22 and a rtl8188etv wifi chip.
The added dts is identical to the dts submitted to the upstream kernel, note this commit also syncs axp22x.dtsi and sun6i-a31.dtsi with the upstream kernel as the added dts depends on these.
--- arch/arm/dts/Makefile | 1 + arch/arm/dts/axp22x.dtsi | 143 ++++++++++++++++++ arch/arm/dts/sun6i-a31.dtsi | 65 ++++++++- arch/arm/dts/sun6i-a31s-colorfly-e708-q1.dts | 208 +++++++++++++++++++++++++++ board/sunxi/MAINTAINERS | 1 + configs/colorfly_e708_q1_defconfig | 25 ++++ 6 files changed, 440 insertions(+), 3 deletions(-) create mode 100644 arch/arm/dts/axp22x.dtsi create mode 100644 arch/arm/dts/sun6i-a31s-colorfly-e708-q1.dts create mode 100644 configs/colorfly_e708_q1_defconfig
arch/arm/dts/Makefile +1 -0
@@ -152,6 +152,7 @@ dtb-$(CONFIG_MACH_SUN6I) += \ sun6i-a31-m9.dtb \ sun6i-a31-mele-a1000g-quad.dtb \ sun6i-a31-mixtile-loftq.dtb \ + sun6i-a31s-colorfly-e708-q1.dtb \ sun6i-a31s-cs908.dtb \ sun6i-a31s-primo81.dtb \ sun6i-a31s-sinovoip-bpi-m2.dtb
arch/arm/dts/axp22x.dtsi new file +143 -0
143 lines not on this page · raw message
arch/arm/dts/sun6i-a31.dtsi +62 -3
131 lines not on this page · raw message
arch/arm/dts/sun6i-a31s-colorfly-e708-q1.dts new file +208 -0
208 lines not on this page · raw message
board/sunxi/MAINTAINERS +1 -0
@@ -33,6 +33,7 @@ F: configs/r7-tv-dongle_defconfig F: configs/UTOO_P66_defconfig F: configs/Wobo_i5_defconfig F: include/configs/sun6i.h +F: configs/colorfly_e708_q1_defconfig F: configs/CSQ_CS908_defconfig F: configs/Mele_A1000G_quad_defconfig F: configs/Mele_M9_defconfig
configs/colorfly_e708_q1_defconfig new file +25 -0
@@ -0,0 +1,25 @@ +CONFIG_ARM=y +CONFIG_ARCH_SUNXI=y +CONFIG_MACH_SUN6I=y +CONFIG_DRAM_CLK=432 +CONFIG_DRAM_ZQ=251 +CONFIG_MMC0_CD_PIN="PA8" +CONFIG_USB0_VBUS_PIN="AXP0-VBUS-ENABLE" +CONFIG_USB0_VBUS_DET="AXP0-VBUS-DETECT" +CONFIG_USB0_ID_DET="PA15" +CONFIG_AXP_GPIO=y +CONFIG_VIDEO_LCD_MODE="x:800,y:1280,depth:24,pclk_khz:64000,le:20,ri:34,up:1,lo:16,hs:10,vs:1,sync:3,vmode:0" +CONFIG_VIDEO_LCD_DCLK_PHASE=0 +CONFIG_VIDEO_LCD_BL_EN="PA25" +CONFIG_VIDEO_LCD_BL_PWM="PH13" +CONFIG_VIDEO_LCD_PANEL_LVDS=y +CONFIG_DEFAULT_DEVICE_TREE="sun6i-a31s-colorfly-e708-q1" +# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set +CONFIG_SPL=y +# CONFIG_CMD_IMLS is not set +# CONFIG_CMD_FLASH is not set +# CONFIG_CMD_FPGA is not set +CONFIG_CMD_GPIO=y +CONFIG_AXP_DLDO1_VOLT=3300 +CONFIG_AXP_DLDO2_VOLT=1800 +CONFIG_USB_MUSB_HOST=y
Signature · 1 line
2.7.2
PATCH 1/2 sunxi: A23: Fix some revisions needing a different magic sram poke
In reply to Hans de GoedeReview
Quoted 3 lines · Hans de Goede
(quoted diff) +2
-1- ?* access gets messed up (seems cache related) */ + /* + ?* Undocmented magic taken from boot0, without this DRAM
"Undocumented" (ah. I see this was wrong before too, oops!)
Otherwise this and the second one: