Skip to contentSkip to conversation

sun7i: Add support for the Wits Pro A20 DKT board

PATCH New Hans de Goede 2 participants 5 messages Mar 7, 2015 – Mar 10, 2015 2 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw

PATCH 2/4 sun7i: Add support for the Wits Pro A20 DKT board

Hi,

Quoted 10 lines · Hans de Goede

The Wits Pro A20 DKT is an A20 Development KiT with 1G RAM, 4G NAND, sdio wifi, 1Gbit ethernet, 1024x768 lcd screen with ft5x_ts touchscreen and a ton of IO connectors.

Note there seem to be multiple sdcard slots on the board (4 in total), but other then mmc0 none of these are hooked up by default, there is a ton of dip-switches which likely allow hooking some of these up, but the documentation of the board only describes the use of a fraction of them, so for now we only support mmc0.

Quoted 3 lines

Also see: http://www.merrii.com/en/pla_d.asp?id=163

Ugh I forgot to update MAINTAINERS for this and the 2 other new boards (will I ever learn?). I will fix this in my personal tree.

Regards,

Hans

Quoted 27 lines
---
  configs/Wits_Pro_A20_DKT_defconfig | 15 +++++++++++++++
  1 file changed, 15 insertions(+)

create mode 100644 configs/Wits_Pro_A20_DKT_defconfig

configs/Wits_Pro_A20_DKT_defconfig new file +15 -0
new file mode 100644
index 0000000..de42b3c
@@ -0,0 +1,15 @@
+CONFIG_SPL=y
+CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER,SUNXI_GMAC,RGMII,AHCI,USB_EHCI"
+CONFIG_FDTFILE="sun7i-a20-wits-pro-a20-dkt.dtb"
+CONFIG_VIDEO_LCD_MODE="x:1024,y:768,depth:24,pclk_khz:65000,le:159,ri:160,up:22,lo:15,hs:1,vs:1,sync:3,vmode:0"
+CONFIG_VIDEO_LCD_POWER="PH8"
+CONFIG_VIDEO_LCD_BL_EN="PH7"
+CONFIG_VIDEO_LCD_BL_PWM="PB2"
+CONFIG_VIDEO_LCD_PANEL_LVDS=y
+CONFIG_VIDEO_VGA=y
++S:CONFIG_ARM=y
++S:CONFIG_ARCH_SUNXI=y
++S:CONFIG_MACH_SUN7I=y
++S:CONFIG_DRAM_CLK=384
++S:CONFIG_DRAM_ZQ=127
++S:CONFIG_DRAM_EMR1=4
#3 lore raw

PATCH 2/4 sun7i: Add support for the Wits Pro A20 DKT board

Quoted 13 lines · Hans de Goede

Hi,

Quoted 10 lines · Hans de Goede

The Wits Pro A20 DKT is an A20 Development KiT with 1G RAM, 4G NAND, sdio wifi, 1Gbit ethernet, 1024x768 lcd screen with ft5x_ts touchscreen and a ton of IO connectors.

Note there seem to be multiple sdcard slots on the board (4 in total), but other then mmc0 none of these are hooked up by default, there is a ton of dip-switches which likely allow hooking some of these up, but the documentation of the board only describes the use of a fraction of them, so for now we only support mmc0.

Quoted 6 lines
Quoted 3 lines

Also see: http://www.merrii.com/en/pla_d.asp?id=163

Ugh I forgot to update MAINTAINERS for this and the 2 other new boards (will I ever learn?). I will fix this in my personal tree.

;-)

With the 3 MAINTAINERS entries in the right places you can add

to all three of them too.

Sigh to YA$PKB (Yet Another $FRUIT Pi Knockoff Board), can no one think of an original name any more!

Ian.

#4 lore raw

PATCH 1/4 sunxi: video: Fix VIDEO_LCD_PANEL_I2C being enabled by default

In reply to a message not in the archive
Quoted 1 line · Hans de Goede

Fix a type in board/sunxi/Kconfig which caused VIDEO_LCD_PANEL_I2C to be

"typo"

Quoted 1 line

+#define CONFIG_VIDEO_LCD_I2C_BUS 1 /* NA, but necessary to compile */

Hrm, should the usage sites not be either ifdef'd or excluded at the Makefile level when VIDEO_LCD_PANEL_I2C is disabled?

The only use is in

                if (IS_ENABLED(CONFIG_VIDEO_LCD_TL059WV5C0)) {
                        unsigned int orig_i2c_bus = i2c_get_bus_num();
                        i2c_set_bus_num(CONFIG_VIDEO_LCD_I2C_BUS);
                        i2c_reg_write(0x5c, 0x04, 0x42); /* Turn on the LCD */
                        i2c_set_bus_num(orig_i2c_bus);
                }

Is the issue that the IS_ENABLED statically false but the compiler still wants the contents to be valid?

How about a helper set_video_i2c_bus or some such which can be a nop if CONFIG_VIDEO_LCD_I2C_BUS is not defined, which would keep the ifdef out of this code?

Or at least #define it to some obviously bogus value (e.g. ~0UL).

Ian.

#5 lore raw

PATCH 1/4 sunxi: video: Fix VIDEO_LCD_PANEL_I2C being enabled by default

Hi,

Quoted 4 lines · Ian Campbell
Quoted 1 line · Hans de Goede

Fix a type in board/sunxi/Kconfig which caused VIDEO_LCD_PANEL_I2C to be

"typo"

Heh, so I made a typo in the word typo, fixed :)

Quoted 13 lines
Quoted 1 line

+#define CONFIG_VIDEO_LCD_I2C_BUS 1 /* NA, but necessary to compile */

Hrm, should the usage sites not be either ifdef'd or excluded at the Makefile level when VIDEO_LCD_PANEL_I2C is disabled?

The only use is in

                 if (IS_ENABLED(CONFIG_VIDEO_LCD_TL059WV5C0)) {
                         unsigned int orig_i2c_bus = i2c_get_bus_num();
                         i2c_set_bus_num(CONFIG_VIDEO_LCD_I2C_BUS);
                         i2c_reg_write(0x5c, 0x04, 0x42); /* Turn on the LCD */
                         i2c_set_bus_num(orig_i2c_bus);
                 }
Quoted 2 lines

Is the issue that the IS_ENABLED statically false but the compiler still wants the contents to be valid?

Right.

Quoted 3 lines

How about a helper set_video_i2c_bus or some such which can be a nop if CONFIG_VIDEO_LCD_I2C_BUS is not defined, which would keep the ifdef out of this code?

Not a fan of that, the whole purpose of using IS_ENABLED is to have easier to read code, I do not believe that adding a wrapper helps there.

Quoted 1 line

Or at least #define it to some obviously bogus value (e.g. ~0UL).

That is a good idea, I've changed it to -1 in my personal tree.

Regards,

Hans

#6 lore raw

PATCH 1/4 sunxi: video: Fix VIDEO_LCD_PANEL_I2C being enabled by default

Quoted 3 lines · Hans de Goede
Quoted 1 line

Or at least #define it to some obviously bogus value (e.g. ~0UL).

That is a good idea, I've changed it to -1 in my personal tree.

With that: