Re: [U-Boot] [PATCH] sunxi: Add generic defconfigs for A33 Q8 tablets with 1024x600 / 800x480 LCD

2015-10-02 Thread Chen-Yu Tsai
On Fri, Sep 25, 2015 at 4:06 PM, Hans de Goede  wrote:
> Hi,
>
> On 25-09-15 04:35, Chen-Yu Tsai wrote:
>>
>> On Thu, Sep 24, 2015 at 11:24 PM, Hans de Goede 
>> wrote:
>
>
> 
>
>>> diff --git a/configs/q8_a33_tablet_800x480_defconfig
>>> b/configs/q8_a33_tablet_800x480_defconfig
>>> new file mode 100644
>>> index 000..a9c2b62
>>> --- /dev/null
>>> +++ b/configs/q8_a33_tablet_800x480_defconfig
>>> @@ -0,0 +1,24 @@
>>> +CONFIG_ARM=y
>>> +CONFIG_ARCH_SUNXI=y
>>> +CONFIG_MACH_SUN8I_A33=y
>>> +CONFIG_DRAM_CLK=456
>>> +CONFIG_DRAM_ZQ=15291
>>> +CONFIG_USB0_VBUS_PIN="AXP0-VBUS-ENABLE"
>>> +CONFIG_USB0_VBUS_DET="AXP0-VBUS-DETECT"
>>> +CONFIG_USB0_ID_DET="PH8"
>>> +CONFIG_AXP_GPIO=y
>>>
>>> +CONFIG_VIDEO_LCD_MODE="x:800,y:480,depth:18,pclk_khz:33000,le:87,ri:167,up:31,lo:13,hs:1,vs:1,sync:3,vmode:0"
>>
>>
>> FYI my q8h-v1.5 uses a slightly different mode line:
>>
>>
>> x:800,y:480,depth:18,pclk_khz:36000,le:45,ri:209,up:22,lo:22,hs:1,vs:1,sync:3,vmode:0
>
>
> Yes, there are multiple modelines floating around for 800x480 panels, I've
> 2 A13 tablets and the modeline of the fex file from tablet a causes the
> images
> to not be properly centered on the screen of tablet b. Luckily the other way
> around does work, so for the q8_a13_tablet_defconfig I'm using the modeline
> from the fex file from tablet b. I hope we can do something similar with q8
> a23 and a33 800x480 tablets.
>
> I've been buying q8 tablets with cracked screens (people seem to drop them
> quite
> a lot) for cheap from a local 2nd hand website, so now I've 5 ever so
> slightly
> different models, I still need to make a generic q8 config for those, and
> see if
> I can find a modeline which works on all of them.
>
> That modeline should probably be a good one to use for the a33 defconfig
> too.
>
>> I'll find some time to give yours a test.

So it looks like your modeline works as well. I can't see any difference
between the two on screen. Speaking of the screen, mine is slightly off
vertically. Feels like it is 1 line lower than it should be. And the right
most end displays partially under the touchscreen with either modeline.

ChenYu
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] sunxi: Add generic defconfigs for A33 Q8 tablets with 1024x600 / 800x480 LCD

2015-10-02 Thread Hans de Goede

Hi,

On 02-10-15 10:49, Chen-Yu Tsai wrote:

On Fri, Sep 25, 2015 at 4:06 PM, Hans de Goede  wrote:

Hi,

On 25-09-15 04:35, Chen-Yu Tsai wrote:


On Thu, Sep 24, 2015 at 11:24 PM, Hans de Goede 
wrote:






diff --git a/configs/q8_a33_tablet_800x480_defconfig
b/configs/q8_a33_tablet_800x480_defconfig
new file mode 100644
index 000..a9c2b62
--- /dev/null
+++ b/configs/q8_a33_tablet_800x480_defconfig
@@ -0,0 +1,24 @@
+CONFIG_ARM=y
+CONFIG_ARCH_SUNXI=y
+CONFIG_MACH_SUN8I_A33=y
+CONFIG_DRAM_CLK=456
+CONFIG_DRAM_ZQ=15291
+CONFIG_USB0_VBUS_PIN="AXP0-VBUS-ENABLE"
+CONFIG_USB0_VBUS_DET="AXP0-VBUS-DETECT"
+CONFIG_USB0_ID_DET="PH8"
+CONFIG_AXP_GPIO=y

+CONFIG_VIDEO_LCD_MODE="x:800,y:480,depth:18,pclk_khz:33000,le:87,ri:167,up:31,lo:13,hs:1,vs:1,sync:3,vmode:0"



FYI my q8h-v1.5 uses a slightly different mode line:


x:800,y:480,depth:18,pclk_khz:36000,le:45,ri:209,up:22,lo:22,hs:1,vs:1,sync:3,vmode:0



Yes, there are multiple modelines floating around for 800x480 panels, I've
2 A13 tablets and the modeline of the fex file from tablet a causes the
images
to not be properly centered on the screen of tablet b. Luckily the other way
around does work, so for the q8_a13_tablet_defconfig I'm using the modeline
from the fex file from tablet b. I hope we can do something similar with q8
a23 and a33 800x480 tablets.

I've been buying q8 tablets with cracked screens (people seem to drop them
quite
a lot) for cheap from a local 2nd hand website, so now I've 5 ever so
slightly
different models, I still need to make a generic q8 config for those, and
see if
I can find a modeline which works on all of them.

That modeline should probably be a good one to use for the a33 defconfig
too.


I'll find some time to give yours a test.


So it looks like your modeline works as well. I can't see any difference
between the two on screen.


Great, thanks for testing this.


Speaking of the screen, mine is slightly off
vertically. Feels like it is 1 line lower than it should be. And the right
most end displays partially under the touchscreen with either modeline.


Yeah I've this with some other q8 tablets too, where the black bezel of the
touchscreen slightly overlaps part of the lcd which should be visible, I guess
this can be expected given the prices of these tablets.

Regards,

Hans
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] sunxi: Add generic defconfigs for A33 Q8 tablets with 1024x600 / 800x480 LCD

2015-09-25 Thread Hans de Goede

Hi,

On 25-09-15 10:06, Hans de Goede wrote:

Hi,

On 25-09-15 04:35, Chen-Yu Tsai wrote:

On Thu, Sep 24, 2015 at 11:24 PM, Hans de Goede  wrote:





diff --git a/configs/q8_a33_tablet_800x480_defconfig 
b/configs/q8_a33_tablet_800x480_defconfig
new file mode 100644
index 000..a9c2b62
--- /dev/null
+++ b/configs/q8_a33_tablet_800x480_defconfig
@@ -0,0 +1,24 @@
+CONFIG_ARM=y
+CONFIG_ARCH_SUNXI=y
+CONFIG_MACH_SUN8I_A33=y
+CONFIG_DRAM_CLK=456
+CONFIG_DRAM_ZQ=15291
+CONFIG_USB0_VBUS_PIN="AXP0-VBUS-ENABLE"
+CONFIG_USB0_VBUS_DET="AXP0-VBUS-DETECT"
+CONFIG_USB0_ID_DET="PH8"
+CONFIG_AXP_GPIO=y
+CONFIG_VIDEO_LCD_MODE="x:800,y:480,depth:18,pclk_khz:33000,le:87,ri:167,up:31,lo:13,hs:1,vs:1,sync:3,vmode:0"


FYI my q8h-v1.5 uses a slightly different mode line:

x:800,y:480,depth:18,pclk_khz:36000,le:45,ri:209,up:22,lo:22,hs:1,vs:1,sync:3,vmode:0


Yes, there are multiple modelines floating around for 800x480 panels, I've
2 A13 tablets and the modeline of the fex file from tablet a causes the images
to not be properly centered on the screen of tablet b. Luckily the other way
around does work, so for the q8_a13_tablet_defconfig I'm using the modeline
from the fex file from tablet b. I hope we can do something similar with q8
a23 and a33 800x480 tablets.

I've been buying q8 tablets with cracked screens


To be clear s/screen/digitizer/ aka touchscreen, it usually is almost always the
touchscreen which gets cracked and replacing that costs 4 usd (and half an hour
of work).

Regards,

Hans
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] sunxi: Add generic defconfigs for A33 Q8 tablets with 1024x600 / 800x480 LCD

2015-09-25 Thread Hans de Goede

Hi,

On 25-09-15 04:35, Chen-Yu Tsai wrote:

On Thu, Sep 24, 2015 at 11:24 PM, Hans de Goede  wrote:





diff --git a/configs/q8_a33_tablet_800x480_defconfig 
b/configs/q8_a33_tablet_800x480_defconfig
new file mode 100644
index 000..a9c2b62
--- /dev/null
+++ b/configs/q8_a33_tablet_800x480_defconfig
@@ -0,0 +1,24 @@
+CONFIG_ARM=y
+CONFIG_ARCH_SUNXI=y
+CONFIG_MACH_SUN8I_A33=y
+CONFIG_DRAM_CLK=456
+CONFIG_DRAM_ZQ=15291
+CONFIG_USB0_VBUS_PIN="AXP0-VBUS-ENABLE"
+CONFIG_USB0_VBUS_DET="AXP0-VBUS-DETECT"
+CONFIG_USB0_ID_DET="PH8"
+CONFIG_AXP_GPIO=y
+CONFIG_VIDEO_LCD_MODE="x:800,y:480,depth:18,pclk_khz:33000,le:87,ri:167,up:31,lo:13,hs:1,vs:1,sync:3,vmode:0"


FYI my q8h-v1.5 uses a slightly different mode line:

x:800,y:480,depth:18,pclk_khz:36000,le:45,ri:209,up:22,lo:22,hs:1,vs:1,sync:3,vmode:0


Yes, there are multiple modelines floating around for 800x480 panels, I've
2 A13 tablets and the modeline of the fex file from tablet a causes the images
to not be properly centered on the screen of tablet b. Luckily the other way
around does work, so for the q8_a13_tablet_defconfig I'm using the modeline
from the fex file from tablet b. I hope we can do something similar with q8
a23 and a33 800x480 tablets.

I've been buying q8 tablets with cracked screens (people seem to drop them quite
a lot) for cheap from a local 2nd hand website, so now I've 5 ever so slightly
different models, I still need to make a generic q8 config for those, and see if
I can find a modeline which works on all of them.

That modeline should probably be a good one to use for the a33 defconfig too.


I'll find some time to give yours a test.


Thanks!

Regards,

Hans
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] sunxi: Add generic defconfigs for A33 Q8 tablets with 1024x600 / 800x480 LCD

2015-09-24 Thread Ian Campbell
On Thu, 2015-09-24 at 17:24 +0200, Hans de Goede wrote:
> The 7" Q8 tablet enclosure is used for a ton of slightly different cheap
> chinese tablets. There are some differences in which accelerometer /
> wifi is used, but other then that these are all the same from a u-boot /
> kernel pov.
> 
> When we get to adding accelerometer support the plan is to add some kind
> of autodetection and mangle the dt accordingly (likely using the new
> quirks
> mechanism).
> 
> For now this is a non issue as we do not yet have accelerometer
> support, and in the future, some sort of auto-detect is the way to go
> as we cannot expect users to exactly know what is inside their tablet.
> 
> The dts[i] files this commit adds are indentical to the ones submitted

"identical"

> to the upstream kernel.
> 
> Signed-off-by: Hans de Goede 

Acked-by: Ian Campbell 

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] sunxi: Add generic defconfigs for A33 Q8 tablets with 1024x600 / 800x480 LCD

2015-09-24 Thread Chen-Yu Tsai
On Thu, Sep 24, 2015 at 11:24 PM, Hans de Goede  wrote:
> The 7" Q8 tablet enclosure is used for a ton of slightly different cheap
> chinese tablets. There are some differences in which accelerometer /
> wifi is used, but other then that these are all the same from a u-boot /
> kernel pov.
>
> When we get to adding accelerometer support the plan is to add some kind
> of autodetection and mangle the dt accordingly (likely using the new quirks
> mechanism).
>
> For now this is a non issue as we do not yet have accelerometer
> support, and in the future, some sort of auto-detect is the way to go
> as we cannot expect users to exactly know what is inside their tablet.
>
> The dts[i] files this commit adds are indentical to the ones submitted
> to the upstream kernel.
>
> Signed-off-by: Hans de Goede 
> ---
>  arch/arm/dts/Makefile|  1 +
>  arch/arm/dts/sun8i-a33-q8-tablet.dts | 65 
>  arch/arm/dts/sun8i-q8-common.dtsi| 84 
> 
>  board/sunxi/MAINTAINERS  |  2 +
>  configs/q8_a33_tablet_1024x600_defconfig | 24 +
>  configs/q8_a33_tablet_800x480_defconfig  | 24 +
>  6 files changed, 200 insertions(+)
>  create mode 100644 arch/arm/dts/sun8i-a33-q8-tablet.dts
>  create mode 100644 arch/arm/dts/sun8i-q8-common.dtsi
>  create mode 100644 configs/q8_a33_tablet_1024x600_defconfig
>  create mode 100644 configs/q8_a33_tablet_800x480_defconfig
>
> diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
> index 09abc26..1dd5d5d 100644
> --- a/arch/arm/dts/Makefile
> +++ b/arch/arm/dts/Makefile
> @@ -156,6 +156,7 @@ dtb-$(CONFIG_MACH_SUN8I_A33) += \
> sun8i-a33-et-q8-v1.6.dtb \
> sun8i-a33-ga10h-v1.1.dtb \
> sun8i-a33-ippo-q8h-v1.2.dtb \
> +   sun8i-a33-q8-tablet.dtb \
> sun8i-a33-sinlinx-sina33.dtb
>  dtb-$(CONFIG_MACH_SUN9I) += \
> sun9i-a80-optimus.dtb \
> diff --git a/arch/arm/dts/sun8i-a33-q8-tablet.dts 
> b/arch/arm/dts/sun8i-a33-q8-tablet.dts
> new file mode 100644
> index 000..44b3229
> --- /dev/null
> +++ b/arch/arm/dts/sun8i-a33-q8-tablet.dts
> @@ -0,0 +1,65 @@
> +/*
> + * Copyright 2015 Hans de Goede 
> + *
> + * This file is dual-licensed: you can use it either under the terms
> + * of the GPL or the X11 license, at your option. Note that this dual
> + * licensing only applies to this file, and not this project as a
> + * whole.
> + *
> + *  a) This file is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License as
> + * published by the Free Software Foundation; either version 2 of the
> + * License, or (at your option) any later version.
> + *
> + * This file is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU General Public License for more details.
> + *
> + * Or, alternatively,
> + *
> + *  b) Permission is hereby granted, free of charge, to any person
> + * obtaining a copy of this software and associated documentation
> + * files (the "Software"), to deal in the Software without
> + * restriction, including without limitation the rights to use,
> + * copy, modify, merge, publish, distribute, sublicense, and/or
> + * sell copies of the Software, and to permit persons to whom the
> + * Software is furnished to do so, subject to the following
> + * conditions:
> + *
> + * The above copyright notice and this permission notice shall be
> + * included in all copies or substantial portions of the Software.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
> + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
> + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
> + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
> + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
> + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
> + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
> + * OTHER DEALINGS IN THE SOFTWARE.
> + */
> +
> +/dts-v1/;
> +#include "sun8i-a33.dtsi"
> +#include "sun8i-q8-common.dtsi"
> +
> +/ {
> +   model = "Q8 A33 Tablet";
> +   compatible = "allwinner,q8-a33", "allwinner,sun8i-a33";
> +};
> +
> +/*
> + * FIXME for now we only support host mode and rely on u-boot to have
> + * turned on Vbus which is controlled by the axp223 pmic on the board.
> + *
> + * Once we have axp223 support we should switch to fully supporting otg.
> + */
> +_otg {
> +   dr_mode = "host";
> +   status = "okay";
> +};
> +
> + {
> +   status = "okay";
> +};
> diff --git a/arch/arm/dts/sun8i-q8-common.dtsi 
> b/arch/arm/dts/sun8i-q8-common.dtsi
> new file mode 100644
> index