public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 2/4] sun7i: Add support for the Wits Pro A20 DKT board
       [not found] ` <1425737102-930-2-git-send-email-hdegoede@redhat.com>
@ 2015-03-07 19:00   ` Hans de Goede
  2015-03-08  9:08     ` Ian Campbell
  0 siblings, 1 reply; 5+ messages in thread
From: Hans de Goede @ 2015-03-07 19:00 UTC (permalink / raw)
  To: u-boot

Hi,

On 07-03-15 15:05, Hans de Goede wrote:
> 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.
>
> Also see: http://www.merrii.com/en/pla_d.asp?id=163
>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

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

> ---
>   configs/Wits_Pro_A20_DKT_defconfig | 15 +++++++++++++++
>   1 file changed, 15 insertions(+)
>   create mode 100644 configs/Wits_Pro_A20_DKT_defconfig
>
> diff --git a/configs/Wits_Pro_A20_DKT_defconfig b/configs/Wits_Pro_A20_DKT_defconfig
> new file mode 100644
> index 0000000..de42b3c
> --- /dev/null
> +++ b/configs/Wits_Pro_A20_DKT_defconfig
> @@ -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
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] [PATCH 1/4] sunxi: video: Fix VIDEO_LCD_PANEL_I2C being enabled by default
       [not found] <1425737102-930-1-git-send-email-hdegoede@redhat.com>
       [not found] ` <1425737102-930-2-git-send-email-hdegoede@redhat.com>
@ 2015-03-08  9:04 ` Ian Campbell
  2015-03-10 11:38   ` Hans de Goede
  1 sibling, 1 reply; 5+ messages in thread
From: Ian Campbell @ 2015-03-08  9:04 UTC (permalink / raw)
  To: u-boot

On Sat, 2015-03-07 at 15:04 +0100, Hans de Goede wrote:
> Fix a type in board/sunxi/Kconfig which caused VIDEO_LCD_PANEL_I2C to be

"typo"

> +#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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] [PATCH 2/4] sun7i: Add support for the Wits Pro A20 DKT board
  2015-03-07 19:00   ` [U-Boot] [PATCH 2/4] sun7i: Add support for the Wits Pro A20 DKT board Hans de Goede
@ 2015-03-08  9:08     ` Ian Campbell
  0 siblings, 0 replies; 5+ messages in thread
From: Ian Campbell @ 2015-03-08  9:08 UTC (permalink / raw)
  To: u-boot

On Sat, 2015-03-07 at 20:00 +0100, Hans de Goede wrote:
> Hi,
> 
> On 07-03-15 15:05, Hans de Goede wrote:
> > 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.
> >
> > Also see: http://www.merrii.com/en/pla_d.asp?id=163
> >
> > Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> 
> 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
        Acked-by: Ian Campbell <ijc@hellion.org.uk>
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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] [PATCH 1/4] sunxi: video: Fix VIDEO_LCD_PANEL_I2C being enabled by default
  2015-03-08  9:04 ` [U-Boot] [PATCH 1/4] sunxi: video: Fix VIDEO_LCD_PANEL_I2C being enabled by default Ian Campbell
@ 2015-03-10 11:38   ` Hans de Goede
  2015-03-10 12:17     ` Ian Campbell
  0 siblings, 1 reply; 5+ messages in thread
From: Hans de Goede @ 2015-03-10 11:38 UTC (permalink / raw)
  To: u-boot

Hi,

On 08-03-15 10:04, Ian Campbell wrote:
> On Sat, 2015-03-07 at 15:04 +0100, Hans de Goede wrote:
>> 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 :)

>> +#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?

Right.

> 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.

> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] [PATCH 1/4] sunxi: video: Fix VIDEO_LCD_PANEL_I2C being enabled by default
  2015-03-10 11:38   ` Hans de Goede
@ 2015-03-10 12:17     ` Ian Campbell
  0 siblings, 0 replies; 5+ messages in thread
From: Ian Campbell @ 2015-03-10 12:17 UTC (permalink / raw)
  To: u-boot

On Tue, 2015-03-10 at 12:38 +0100, Hans de Goede wrote:
> > 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:

Acked-by: Ian Campbell <ijc@hellion.org.uk>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-03-10 12:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1425737102-930-1-git-send-email-hdegoede@redhat.com>
     [not found] ` <1425737102-930-2-git-send-email-hdegoede@redhat.com>
2015-03-07 19:00   ` [U-Boot] [PATCH 2/4] sun7i: Add support for the Wits Pro A20 DKT board Hans de Goede
2015-03-08  9:08     ` Ian Campbell
2015-03-08  9:04 ` [U-Boot] [PATCH 1/4] sunxi: video: Fix VIDEO_LCD_PANEL_I2C being enabled by default Ian Campbell
2015-03-10 11:38   ` Hans de Goede
2015-03-10 12:17     ` Ian Campbell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox