* [PATCH 0/6] - Acer n35 fixes and features
@ 2010-10-04 0:23 Jiří Pinkava
2010-10-04 0:24 ` [PATCH 1/6] n35: fix key codes and types Jiří Pinkava
` (8 more replies)
0 siblings, 9 replies; 17+ messages in thread
From: Jiří Pinkava @ 2010-10-04 0:23 UTC (permalink / raw)
To: linux-arm-kernel
This series fix some minor bugs on Acer n35 and add new features:
* fix invalid key codes (typing error)
* Replace hardcoded numbers by named constants in UART configuration
* Fix MMC power management
* Add touchscreen support
* Add LCD backlight regulation
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 1/6] n35: fix key codes and types
2010-10-04 0:23 [PATCH 0/6] - Acer n35 fixes and features Jiří Pinkava
@ 2010-10-04 0:24 ` Jiří Pinkava
2010-10-04 0:25 ` [PATCH 2/6] n35: Update GPIO documentation for Acer n35 Jiří Pinkava
2010-10-10 23:38 ` [PATCH 1/6] n35: fix key codes and types Ben Dooks
2010-10-06 22:25 ` [PATCH 0/6] - Acer n35 fixes and features Ben Dooks
` (7 subsequent siblings)
8 siblings, 2 replies; 17+ messages in thread
From: Jiří Pinkava @ 2010-10-04 0:24 UTC (permalink / raw)
To: linux-arm-kernel
Signed-off-by: Jiri Pinkava <jiri.pinkava@vscht.cz>
---
arch/arm/mach-s3c2410/mach-n30.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/arch/arm/mach-s3c2410/mach-n30.c
b/arch/arm/mach-s3c2410/mach-n30.c
index 41f299d..e732619 100644
--- a/arch/arm/mach-s3c2410/mach-n30.c
+++ b/arch/arm/mach-s3c2410/mach-n30.c
@@ -174,7 +174,6 @@ static struct gpio_keys_button n35_buttons[] = {
{
.gpio = S3C2410_GPF(0),
.code = KEY_POWER,
- .type = EV_PWR,
.desc = "Power",
.active_low = 0,
.wakeup = 1,
@@ -193,13 +192,13 @@ static struct gpio_keys_button n35_buttons[] = {
},
{
.gpio = S3C2410_GPG(6),
- .code = KEY_DOWN,
+ .code = KEY_LEFT,
.desc = "Joystick Left",
.active_low = 0,
},
{
.gpio = S3C2410_GPG(5),
- .code = KEY_DOWN,
+ .code = KEY_RIGHT,
.desc = "Joystick Right",
.active_low = 0,
},
--
1.7.3.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 2/6] n35: Update GPIO documentation for Acer n35
2010-10-04 0:24 ` [PATCH 1/6] n35: fix key codes and types Jiří Pinkava
@ 2010-10-04 0:25 ` Jiří Pinkava
2010-10-04 0:26 ` PATCH 3/6] n30: Clean up UARTs configuration Jiří Pinkava
2010-10-10 23:38 ` [PATCH 1/6] n35: fix key codes and types Ben Dooks
1 sibling, 1 reply; 17+ messages in thread
From: Jiří Pinkava @ 2010-10-04 0:25 UTC (permalink / raw)
To: linux-arm-kernel
Signed-off-by: Jiri Pinkava <jiri.pinkava@vscht.cz>
---
arch/arm/mach-s3c2410/mach-n30.c | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/arch/arm/mach-s3c2410/mach-n30.c
b/arch/arm/mach-s3c2410/mach-n30.c
index e732619..abbb9b5 100644
--- a/arch/arm/mach-s3c2410/mach-n30.c
+++ b/arch/arm/mach-s3c2410/mach-n30.c
@@ -410,13 +410,11 @@ static struct s3c2410_platform_i2c __initdata
n30_i2ccfg = {
static void __init n30_hwinit(void)
{
/* GPA0-11 special functions -- unknown what they do
- * GPA12 N30 special function -- unknown what it does
- * N35/PiN output -- unknown what it does
- *
- * A12 is nGCS1 on the N30 and an output on the N35/PiN. I
- * don't think it does anything useful on the N30, so I ought
- * to make it an output there too since it always driven to 0
- * as far as I can tell. */
+ * GPA12 N30 special function (nGCS1) -- unknown what it does
+ * PiN output -- unknown function
+ * N35 output -- turn on/off red led, 0 = normal operation,
+ * 1 = turn off red led at all. Note: GPD9 must be input or
+ * output with value set to 1 before setting GPA12 to 0. */
if (machine_is_n30())
__raw_writel(0x007fffff, S3C2410_GPACON);
if (machine_is_n35())
--
1.7.3.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* PATCH 3/6] n30: Clean up UARTs configuration
2010-10-04 0:25 ` [PATCH 2/6] n35: Update GPIO documentation for Acer n35 Jiří Pinkava
@ 2010-10-04 0:26 ` Jiří Pinkava
2010-10-04 0:29 ` [PATCH 4/6] n30: Fix MMC power management Jiří Pinkava
0 siblings, 1 reply; 17+ messages in thread
From: Jiří Pinkava @ 2010-10-04 0:26 UTC (permalink / raw)
To: linux-arm-kernel
Signed-off-by: Jiri Pinkava <jiri.pinkava@vscht.cz>
---
arch/arm/mach-s3c2410/mach-n30.c | 28
+++++++++++++++-------
arch/arm/plat-samsung/include/plat/regs-serial.h | 3 ++
2 files changed, 22 insertions(+), 9 deletions(-)
diff --git a/arch/arm/mach-s3c2410/mach-n30.c
b/arch/arm/mach-s3c2410/mach-n30.c
index abbb9b5..895e1e9a 100644
--- a/arch/arm/mach-s3c2410/mach-n30.c
+++ b/arch/arm/mach-s3c2410/mach-n30.c
@@ -55,32 +55,42 @@ static struct map_desc n30_iodesc[] __initdata = {
/* nothing here yet */
};
+#define UCON (S3C2410_UCON_DEFAULT | \
+ S3C2443_UCON_RXERR_IRQEN)
+
+#define ULCON (S3C2410_LCON_CS8 | \
+ S3C2410_LCON_PNONE)
+
+#define UFCON (S3C2410_UFCON_FIFOMODE | \
+ S3C2410_UFCON_RXTRIG8 | \
+ S3C2410_UFCON_TXTRIG4)
+
static struct s3c2410_uartcfg n30_uartcfgs[] = {
/* Normal serial port */
[0] = {
.hwport = 0,
.flags = 0,
- .ucon = 0x2c5,
- .ulcon = 0x03,
- .ufcon = 0x51,
+ .ucon = UCON,
+ .ulcon = ULCON,
+ .ufcon = UFCON,
},
/* IR port */
[1] = {
.hwport = 1,
.flags = 0,
.uart_flags = UPF_CONS_FLOW,
- .ucon = 0x2c5,
- .ulcon = 0x43,
- .ufcon = 0x51,
+ .ucon = UCON,
+ .ulcon = ULCON | S3C2410_LCON_IRM,
+ .ufcon = UFCON,
},
/* On the N30 the bluetooth controller is connected here.
* On the N35 and variants the GPS receiver is connected here. */
[2] = {
.hwport = 2,
.flags = 0,
- .ucon = 0x2c5,
- .ulcon = 0x03,
- .ufcon = 0x51,
+ .ucon = UCON,
+ .ulcon = ULCON,
+ .ufcon = UFCON,
},
};
diff --git a/arch/arm/plat-samsung/include/plat/regs-serial.h
b/arch/arm/plat-samsung/include/plat/regs-serial.h
index 788837e..c64beca 100644
--- a/arch/arm/plat-samsung/include/plat/regs-serial.h
+++ b/arch/arm/plat-samsung/include/plat/regs-serial.h
@@ -114,6 +114,9 @@
#define S3C2410_UFCON_FIFOMODE (1<<0)
#define S3C2410_UFCON_TXTRIG0 (0<<6)
+#define S3C2410_UFCON_TXTRIG4 (1<<6)
+#define S3C2410_UFCON_TXTRIG8 (2<<6)
+#define S3C2410_UFCON_TXTRIG12 (3<<6)
#define S3C2410_UFCON_RXTRIG8 (1<<4)
#define S3C2410_UFCON_RXTRIG12 (2<<4)
--
1.7.3.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 4/6] n30: Fix MMC power management
2010-10-04 0:26 ` PATCH 3/6] n30: Clean up UARTs configuration Jiří Pinkava
@ 2010-10-04 0:29 ` Jiří Pinkava
2010-10-04 0:31 ` [PATCH 5/6] n30: Add touchscreen support for Ace n35 Jiří Pinkava
0 siblings, 1 reply; 17+ messages in thread
From: Jiří Pinkava @ 2010-10-04 0:29 UTC (permalink / raw)
To: linux-arm-kernel
MMC "works" in both on or off state, but when operate in off causes
serious data corruptions.
Signed-off-by: Jiri Pinkava <jiri.pinkava@vscht.cz>
---
arch/arm/mach-s3c2410/mach-n30.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-s3c2410/mach-n30.c
b/arch/arm/mach-s3c2410/mach-n30.c
index 895e1e9a..ecc039a 100644
--- a/arch/arm/mach-s3c2410/mach-n30.c
+++ b/arch/arm/mach-s3c2410/mach-n30.c
@@ -366,11 +366,11 @@ static void n30_sdi_set_power(unsigned char
power_mode, unsigned short vdd)
switch (power_mode) {
case MMC_POWER_ON:
case MMC_POWER_UP:
- gpio_set_value(S3C2410_GPG(4), 1);
+ gpio_set_value(S3C2410_GPG(4), 0);
break;
case MMC_POWER_OFF:
default:
- gpio_set_value(S3C2410_GPG(4), 0);
+ gpio_set_value(S3C2410_GPG(4), 1);
break;
}
}
--
1.7.3.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 5/6] n30: Add touchscreen support for Ace n35
2010-10-04 0:29 ` [PATCH 4/6] n30: Fix MMC power management Jiří Pinkava
@ 2010-10-04 0:31 ` Jiří Pinkava
2010-10-04 0:32 ` [PATCH 6/6] n35: Add LCD backlight regulation Jiří Pinkava
0 siblings, 1 reply; 17+ messages in thread
From: Jiří Pinkava @ 2010-10-04 0:31 UTC (permalink / raw)
To: linux-arm-kernel
Signed-off-by: Jiri Pinkava <jiri.pinkava@vscht.cz>
---
arch/arm/mach-s3c2410/Kconfig | 1 +
arch/arm/mach-s3c2410/mach-n30.c | 13 +++++++++++++
2 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-s3c2410/Kconfig b/arch/arm/mach-s3c2410/Kconfig
index 7245a55..1d55349 100644
--- a/arch/arm/mach-s3c2410/Kconfig
+++ b/arch/arm/mach-s3c2410/Kconfig
@@ -100,6 +100,7 @@ config MACH_N30
select MACH_N35
select S3C_DEV_USB_HOST
select S3C_DEV_NAND
+ select S3C2410_SETUP_TS
help
Say Y here if you want suppt for the Acer N30, Acer N35,
Navman PiN570, Yakumo AlphaX or Airis NC05 PDAs.
diff --git a/arch/arm/mach-s3c2410/mach-n30.c
b/arch/arm/mach-s3c2410/mach-n30.c
index ecc039a..be5235d 100644
--- a/arch/arm/mach-s3c2410/mach-n30.c
+++ b/arch/arm/mach-s3c2410/mach-n30.c
@@ -49,6 +49,7 @@
#include <plat/devs.h>
#include <plat/mci.h>
#include <plat/s3c2410.h>
+#include <plat/ts.h>
#include <plat/udc.h>
static struct map_desc n30_iodesc[] __initdata = {
@@ -116,6 +117,13 @@ static struct s3c2410_udc_mach_info n30_udc_cfg
__initdata = {
.vbus_pin_inverted = 0,
};
+static struct s3c2410_ts_mach_info n30_ts_cfg __initdata = {
+ .delay = 16383,
+ .presc = 49,
+ .oversampling_shift = 3,
+ .cfg_gpio = s3c24xx_ts_cfg_gpio,
+};
+
static struct gpio_keys_button n30_buttons[] = {
{
.gpio = S3C2410_GPF(0),
@@ -391,6 +399,8 @@ static struct platform_device *n30_devices[]
__initdata = {
&s3c_device_rtc,
&s3c_device_usbgadget,
&s3c_device_sdi,
+ &s3c_device_adc,
+ &s3c_device_ts,
&n30_button_device,
&n30_blue_led,
&n30_warning_led,
@@ -404,6 +414,8 @@ static struct platform_device *n35_devices[]
__initdata = {
&s3c_device_rtc,
&s3c_device_usbgadget,
&s3c_device_sdi,
+ &s3c_device_adc,
+ &s3c_device_ts,
&n35_button_device,
&n35_blue_led,
&n35_warning_led,
@@ -566,6 +578,7 @@ static void __init n30_init(void)
WARN_ON(gpio_request(S3C2410_GPG(4), "mmc power"));
s3c24xx_fb_set_platdata(&n30_fb_info);
+ s3c24xx_ts_set_platdata(&n30_ts_cfg);
s3c24xx_udc_set_platdata(&n30_udc_cfg);
s3c24xx_mci_set_platdata(&n30_mci_cfg);
s3c_i2c0_set_platdata(&n30_i2ccfg);
--
1.7.3.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 6/6] n35: Add LCD backlight regulation
2010-10-04 0:31 ` [PATCH 5/6] n30: Add touchscreen support for Ace n35 Jiří Pinkava
@ 2010-10-04 0:32 ` Jiří Pinkava
0 siblings, 0 replies; 17+ messages in thread
From: Jiří Pinkava @ 2010-10-04 0:32 UTC (permalink / raw)
To: linux-arm-kernel
Signed-off-by: Jiri Pinkava <jiri.pinkava@vscht.cz>
---
arch/arm/mach-s3c2410/mach-n30.c | 71
++++++++++++++++++++++++++++++++++++++
1 files changed, 71 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-s3c2410/mach-n30.c
b/arch/arm/mach-s3c2410/mach-n30.c
index be5235d..4199143 100644
--- a/arch/arm/mach-s3c2410/mach-n30.c
+++ b/arch/arm/mach-s3c2410/mach-n30.c
@@ -23,6 +23,7 @@
#include <linux/input.h>
#include <linux/interrupt.h>
#include <linux/platform_device.h>
+#include <linux/pwm_backlight.h>
#include <linux/serial_core.h>
#include <linux/timer.h>
#include <linux/io.h>
@@ -369,6 +370,74 @@ static struct s3c2410fb_mach_info n30_fb_info
__initdata = {
.lpcsel = 0x06,
};
+static int n35_backlight_init(struct device *dev)
+{
+ int ret;
+
+ ret = gpio_request(S3C2410_GPB(0), "Backlight PWM output");
+ if (ret)
+ goto request_gpb0_fail;
+ ret = gpio_request(S3C2410_GPB(1), "Backlight power");
+ if (ret)
+ goto request_gpb1_fail;
+
+ /* set GPB0 as output of PWM timer */
+ gpio_set_value(S3C2410_GPB(0), 0);
+ s3c_gpio_setpull(S3C2410_GPB(0), S3C_GPIO_PULL_DOWN);
+ s3c_gpio_cfgpin(S3C2410_GPB(0), S3C2410_GPB0_TOUT0);
+
+ /* backlight power */
+ ret = gpio_direction_output(S3C2410_GPB(1), 1);
+ if (ret)
+ goto direction_gpb1_fail;
+ s3c_gpio_setpull(S3C2410_GPB(1), S3C_GPIO_PULL_UP);
+
+ return 0;
+
+direction_gpb1_fail:
+ gpio_free(S3C2410_GPB(1));
+request_gpb1_fail:
+ gpio_free(S3C2410_GPB(0));
+request_gpb0_fail:
+ return ret;
+}
+
+static int n35_backlight_notify(struct device *dev, int brightness)
+{
+ /* power off backlight, values less than 14 are useless */
+ gpio_set_value(S3C2410_GPB(1), brightness > 14 ? 1 : 0);
+ return (brightness > 14 ? brightness : 0);
+}
+
+static void n35_backlight_exit(struct device *dev)
+{
+ gpio_direction_output(S3C2410_GPB(0), 0);
+ gpio_free(S3C2410_GPB(0));
+
+ gpio_set_value(S3C2410_GPB(1), 0);
+ s3c_gpio_setpull(S3C2410_GPB(1), S3C_GPIO_PULL_UP);
+ gpio_free(S3C2410_GPB(1));
+}
+
+static struct platform_pwm_backlight_data backlight_data = {
+ .pwm_id = 0,
+ .max_brightness = 100,
+ .dft_brightness = 50,
+ .pwm_period_ns = 3*1000*1000,
+ .init = n35_backlight_init,
+ .notify = n35_backlight_notify,
+ .exit = n35_backlight_exit,
+};
+
+static struct platform_device n35_backlight = {
+ .name = "pwm-backlight",
+ .dev = {
+ .parent = &s3c_device_timer[0].dev,
+ .platform_data = &backlight_data,
+ },
+ .id = -1,
+};
+
static void n30_sdi_set_power(unsigned char power_mode, unsigned short
vdd)
{
switch (power_mode) {
@@ -416,6 +485,8 @@ static struct platform_device *n35_devices[]
__initdata = {
&s3c_device_sdi,
&s3c_device_adc,
&s3c_device_ts,
+ &s3c_device_timer[0],
+ &n35_backlight,
&n35_button_device,
&n35_blue_led,
&n35_warning_led,
--
1.7.3.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 0/6] - Acer n35 fixes and features
2010-10-04 0:23 [PATCH 0/6] - Acer n35 fixes and features Jiří Pinkava
2010-10-04 0:24 ` [PATCH 1/6] n35: fix key codes and types Jiří Pinkava
@ 2010-10-06 22:25 ` Ben Dooks
2010-10-10 23:43 ` Ben Dooks
` (6 subsequent siblings)
8 siblings, 0 replies; 17+ messages in thread
From: Ben Dooks @ 2010-10-06 22:25 UTC (permalink / raw)
To: linux-arm-kernel
On 04/10/10 01:23, Ji?? Pinkava wrote:
> This series fix some minor bugs on Acer n35 and add new features:
>
> * fix invalid key codes (typing error)
> * Replace hardcoded numbers by named constants in UART configuration
> * Fix MMC power management
> * Add touchscreen support
> * Add LCD backlight regulation
first pass looks ok, will try and ensure they're in a branch in the
next day or so.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 1/6] n35: fix key codes and types
2010-10-04 0:24 ` [PATCH 1/6] n35: fix key codes and types Jiří Pinkava
2010-10-04 0:25 ` [PATCH 2/6] n35: Update GPIO documentation for Acer n35 Jiří Pinkava
@ 2010-10-10 23:38 ` Ben Dooks
2010-10-13 7:49 ` Jiří Pinkava
1 sibling, 1 reply; 17+ messages in thread
From: Ben Dooks @ 2010-10-10 23:38 UTC (permalink / raw)
To: linux-arm-kernel
On 04/10/10 01:24, Ji?? Pinkava wrote:
A non-empty description would be helpful.
> Signed-off-by: Jiri Pinkava <jiri.pinkava@vscht.cz>
Hi, this doesn't apply to latest linux git.
Is there something this depends on, or does it need
to be re-done?
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 0/6] - Acer n35 fixes and features
2010-10-04 0:23 [PATCH 0/6] - Acer n35 fixes and features Jiří Pinkava
2010-10-04 0:24 ` [PATCH 1/6] n35: fix key codes and types Jiří Pinkava
2010-10-06 22:25 ` [PATCH 0/6] - Acer n35 fixes and features Ben Dooks
@ 2010-10-10 23:43 ` Ben Dooks
2010-10-13 7:56 ` [PATCH 1/6] n35: fix key codes Jiri.Pinkava at vscht.cz
` (5 subsequent siblings)
8 siblings, 0 replies; 17+ messages in thread
From: Ben Dooks @ 2010-10-10 23:43 UTC (permalink / raw)
To: linux-arm-kernel
On 04/10/10 01:23, Ji?? Pinkava wrote:
> This series fix some minor bugs on Acer n35 and add new features:
>
> * fix invalid key codes (typing error)
> * Replace hardcoded numbers by named constants in UART configuration
> * Fix MMC power management
> * Add touchscreen support
> * Add LCD backlight regulation
Hi, could you repost with some more informative patch descriptions
please, and give pointers to any pre-requisities.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 1/6] n35: fix key codes and types
2010-10-10 23:38 ` [PATCH 1/6] n35: fix key codes and types Ben Dooks
@ 2010-10-13 7:49 ` Jiří Pinkava
0 siblings, 0 replies; 17+ messages in thread
From: Jiří Pinkava @ 2010-10-13 7:49 UTC (permalink / raw)
To: linux-arm-kernel
Dne 11.10.2010 01:38, Ben Dooks napsal(a):
> On 04/10/10 01:24, Ji?? Pinkava wrote:
>
> A non-empty description would be helpful.
>
>> Signed-off-by: Jiri Pinkava<jiri.pinkava@vscht.cz>
>
> Hi, this doesn't apply to latest linux git.
It is against latest linux git no extra pre-requisities, may be
something messed up by my email client, resending with more comments and
with git sedn-email.
>
> Is there something this depends on, or does it need
> to be re-done?
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 1/6] n35: fix key codes
2010-10-04 0:23 [PATCH 0/6] - Acer n35 fixes and features Jiří Pinkava
` (2 preceding siblings ...)
2010-10-10 23:43 ` Ben Dooks
@ 2010-10-13 7:56 ` Jiri.Pinkava at vscht.cz
2010-10-13 7:56 ` [PATCH 2/6] n35: Update GPIO documentation for Acer n35 Jiri.Pinkava at vscht.cz
` (4 subsequent siblings)
8 siblings, 0 replies; 17+ messages in thread
From: Jiri.Pinkava at vscht.cz @ 2010-10-13 7:56 UTC (permalink / raw)
To: linux-arm-kernel
Power is ordinary button, marking as type EV_POWER is incorrect.
About KEY_DOWN, someone just copied the code and forgot to asociate proper
keycodes. (Descriptions are correct, keycodes are not.)
Signed-off-by: Jiri Pinkava <jiri.pinkava@vscht.cz>
---
arch/arm/mach-s3c2410/mach-n30.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/arch/arm/mach-s3c2410/mach-n30.c b/arch/arm/mach-s3c2410/mach-n30.c
index 41f299d..e732619 100644
--- a/arch/arm/mach-s3c2410/mach-n30.c
+++ b/arch/arm/mach-s3c2410/mach-n30.c
@@ -174,7 +174,6 @@ static struct gpio_keys_button n35_buttons[] = {
{
.gpio = S3C2410_GPF(0),
.code = KEY_POWER,
- .type = EV_PWR,
.desc = "Power",
.active_low = 0,
.wakeup = 1,
@@ -193,13 +192,13 @@ static struct gpio_keys_button n35_buttons[] = {
},
{
.gpio = S3C2410_GPG(6),
- .code = KEY_DOWN,
+ .code = KEY_LEFT,
.desc = "Joystick Left",
.active_low = 0,
},
{
.gpio = S3C2410_GPG(5),
- .code = KEY_DOWN,
+ .code = KEY_RIGHT,
.desc = "Joystick Right",
.active_low = 0,
},
--
1.7.3.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 2/6] n35: Update GPIO documentation for Acer n35
2010-10-04 0:23 [PATCH 0/6] - Acer n35 fixes and features Jiří Pinkava
` (3 preceding siblings ...)
2010-10-13 7:56 ` [PATCH 1/6] n35: fix key codes Jiri.Pinkava at vscht.cz
@ 2010-10-13 7:56 ` Jiri.Pinkava at vscht.cz
2010-10-13 7:56 ` [PATCH 3/6] n30: Clean up UARTs configuration Jiri.Pinkava at vscht.cz
` (3 subsequent siblings)
8 siblings, 0 replies; 17+ messages in thread
From: Jiri.Pinkava at vscht.cz @ 2010-10-13 7:56 UTC (permalink / raw)
To: linux-arm-kernel
More precise and detailed information about GPA12 on Acer n35.
Signed-off-by: Jiri Pinkava <jiri.pinkava@vscht.cz>
---
arch/arm/mach-s3c2410/mach-n30.c | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/arch/arm/mach-s3c2410/mach-n30.c b/arch/arm/mach-s3c2410/mach-n30.c
index e732619..abbb9b5 100644
--- a/arch/arm/mach-s3c2410/mach-n30.c
+++ b/arch/arm/mach-s3c2410/mach-n30.c
@@ -410,13 +410,11 @@ static struct s3c2410_platform_i2c __initdata n30_i2ccfg = {
static void __init n30_hwinit(void)
{
/* GPA0-11 special functions -- unknown what they do
- * GPA12 N30 special function -- unknown what it does
- * N35/PiN output -- unknown what it does
- *
- * A12 is nGCS1 on the N30 and an output on the N35/PiN. I
- * don't think it does anything useful on the N30, so I ought
- * to make it an output there too since it always driven to 0
- * as far as I can tell. */
+ * GPA12 N30 special function (nGCS1) -- unknown what it does
+ * PiN output -- unknown function
+ * N35 output -- turn on/off red led, 0 = normal operation,
+ * 1 = turn off red led at all. Note: GPD9 must be input or
+ * output with value set to 1 before setting GPA12 to 0. */
if (machine_is_n30())
__raw_writel(0x007fffff, S3C2410_GPACON);
if (machine_is_n35())
--
1.7.3.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 3/6] n30: Clean up UARTs configuration
2010-10-04 0:23 [PATCH 0/6] - Acer n35 fixes and features Jiří Pinkava
` (4 preceding siblings ...)
2010-10-13 7:56 ` [PATCH 2/6] n35: Update GPIO documentation for Acer n35 Jiri.Pinkava at vscht.cz
@ 2010-10-13 7:56 ` Jiri.Pinkava at vscht.cz
2010-10-13 7:56 ` [PATCH 4/6] n30: Fix MMC power management on Acer n30 / n35 Jiri.Pinkava at vscht.cz
` (2 subsequent siblings)
8 siblings, 0 replies; 17+ messages in thread
From: Jiri.Pinkava at vscht.cz @ 2010-10-13 7:56 UTC (permalink / raw)
To: linux-arm-kernel
Just replace numeric constatns with macros in style used in other platforms.
Define missing macros for UART register configuration.
Signed-off-by: Jiri Pinkava <jiri.pinkava@vscht.cz>
---
arch/arm/mach-s3c2410/mach-n30.c | 28 +++++++++++++++-------
arch/arm/plat-samsung/include/plat/regs-serial.h | 3 ++
2 files changed, 22 insertions(+), 9 deletions(-)
diff --git a/arch/arm/mach-s3c2410/mach-n30.c b/arch/arm/mach-s3c2410/mach-n30.c
index abbb9b5..895e1e9a 100644
--- a/arch/arm/mach-s3c2410/mach-n30.c
+++ b/arch/arm/mach-s3c2410/mach-n30.c
@@ -55,32 +55,42 @@ static struct map_desc n30_iodesc[] __initdata = {
/* nothing here yet */
};
+#define UCON (S3C2410_UCON_DEFAULT | \
+ S3C2443_UCON_RXERR_IRQEN)
+
+#define ULCON (S3C2410_LCON_CS8 | \
+ S3C2410_LCON_PNONE)
+
+#define UFCON (S3C2410_UFCON_FIFOMODE | \
+ S3C2410_UFCON_RXTRIG8 | \
+ S3C2410_UFCON_TXTRIG4)
+
static struct s3c2410_uartcfg n30_uartcfgs[] = {
/* Normal serial port */
[0] = {
.hwport = 0,
.flags = 0,
- .ucon = 0x2c5,
- .ulcon = 0x03,
- .ufcon = 0x51,
+ .ucon = UCON,
+ .ulcon = ULCON,
+ .ufcon = UFCON,
},
/* IR port */
[1] = {
.hwport = 1,
.flags = 0,
.uart_flags = UPF_CONS_FLOW,
- .ucon = 0x2c5,
- .ulcon = 0x43,
- .ufcon = 0x51,
+ .ucon = UCON,
+ .ulcon = ULCON | S3C2410_LCON_IRM,
+ .ufcon = UFCON,
},
/* On the N30 the bluetooth controller is connected here.
* On the N35 and variants the GPS receiver is connected here. */
[2] = {
.hwport = 2,
.flags = 0,
- .ucon = 0x2c5,
- .ulcon = 0x03,
- .ufcon = 0x51,
+ .ucon = UCON,
+ .ulcon = ULCON,
+ .ufcon = UFCON,
},
};
diff --git a/arch/arm/plat-samsung/include/plat/regs-serial.h b/arch/arm/plat-samsung/include/plat/regs-serial.h
index 788837e..c64beca 100644
--- a/arch/arm/plat-samsung/include/plat/regs-serial.h
+++ b/arch/arm/plat-samsung/include/plat/regs-serial.h
@@ -114,6 +114,9 @@
#define S3C2410_UFCON_FIFOMODE (1<<0)
#define S3C2410_UFCON_TXTRIG0 (0<<6)
+#define S3C2410_UFCON_TXTRIG4 (1<<6)
+#define S3C2410_UFCON_TXTRIG8 (2<<6)
+#define S3C2410_UFCON_TXTRIG12 (3<<6)
#define S3C2410_UFCON_RXTRIG8 (1<<4)
#define S3C2410_UFCON_RXTRIG12 (2<<4)
--
1.7.3.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 4/6] n30: Fix MMC power management on Acer n30 / n35
2010-10-04 0:23 [PATCH 0/6] - Acer n35 fixes and features Jiří Pinkava
` (5 preceding siblings ...)
2010-10-13 7:56 ` [PATCH 3/6] n30: Clean up UARTs configuration Jiri.Pinkava at vscht.cz
@ 2010-10-13 7:56 ` Jiri.Pinkava at vscht.cz
2010-10-13 7:56 ` [PATCH 5/6] n30: Add touchscreen support for " Jiri.Pinkava at vscht.cz
2010-10-13 7:56 ` [PATCH 6/6] n35: Add LCD backlight regulation on Acer n35 Jiri.Pinkava at vscht.cz
8 siblings, 0 replies; 17+ messages in thread
From: Jiri.Pinkava at vscht.cz @ 2010-10-13 7:56 UTC (permalink / raw)
To: linux-arm-kernel
Someone (me) messed this up. MMC works even in off state, but causes serious
data corruptions during write.
Signed-off-by: Jiri Pinkava <jiri.pinkava@vscht.cz>
---
arch/arm/mach-s3c2410/mach-n30.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-s3c2410/mach-n30.c b/arch/arm/mach-s3c2410/mach-n30.c
index 895e1e9a..ecc039a 100644
--- a/arch/arm/mach-s3c2410/mach-n30.c
+++ b/arch/arm/mach-s3c2410/mach-n30.c
@@ -366,11 +366,11 @@ static void n30_sdi_set_power(unsigned char power_mode, unsigned short vdd)
switch (power_mode) {
case MMC_POWER_ON:
case MMC_POWER_UP:
- gpio_set_value(S3C2410_GPG(4), 1);
+ gpio_set_value(S3C2410_GPG(4), 0);
break;
case MMC_POWER_OFF:
default:
- gpio_set_value(S3C2410_GPG(4), 0);
+ gpio_set_value(S3C2410_GPG(4), 1);
break;
}
}
--
1.7.3.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 5/6] n30: Add touchscreen support for Acer n30 / n35
2010-10-04 0:23 [PATCH 0/6] - Acer n35 fixes and features Jiří Pinkava
` (6 preceding siblings ...)
2010-10-13 7:56 ` [PATCH 4/6] n30: Fix MMC power management on Acer n30 / n35 Jiri.Pinkava at vscht.cz
@ 2010-10-13 7:56 ` Jiri.Pinkava at vscht.cz
2010-10-13 7:56 ` [PATCH 6/6] n35: Add LCD backlight regulation on Acer n35 Jiri.Pinkava at vscht.cz
8 siblings, 0 replies; 17+ messages in thread
From: Jiri.Pinkava at vscht.cz @ 2010-10-13 7:56 UTC (permalink / raw)
To: linux-arm-kernel
Signed-off-by: Jiri Pinkava <jiri.pinkava@vscht.cz>
---
arch/arm/mach-s3c2410/Kconfig | 1 +
arch/arm/mach-s3c2410/mach-n30.c | 13 +++++++++++++
2 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-s3c2410/Kconfig b/arch/arm/mach-s3c2410/Kconfig
index 7245a55..1d55349 100644
--- a/arch/arm/mach-s3c2410/Kconfig
+++ b/arch/arm/mach-s3c2410/Kconfig
@@ -100,6 +100,7 @@ config MACH_N30
select MACH_N35
select S3C_DEV_USB_HOST
select S3C_DEV_NAND
+ select S3C2410_SETUP_TS
help
Say Y here if you want suppt for the Acer N30, Acer N35,
Navman PiN570, Yakumo AlphaX or Airis NC05 PDAs.
diff --git a/arch/arm/mach-s3c2410/mach-n30.c b/arch/arm/mach-s3c2410/mach-n30.c
index ecc039a..be5235d 100644
--- a/arch/arm/mach-s3c2410/mach-n30.c
+++ b/arch/arm/mach-s3c2410/mach-n30.c
@@ -49,6 +49,7 @@
#include <plat/devs.h>
#include <plat/mci.h>
#include <plat/s3c2410.h>
+#include <plat/ts.h>
#include <plat/udc.h>
static struct map_desc n30_iodesc[] __initdata = {
@@ -116,6 +117,13 @@ static struct s3c2410_udc_mach_info n30_udc_cfg __initdata = {
.vbus_pin_inverted = 0,
};
+static struct s3c2410_ts_mach_info n30_ts_cfg __initdata = {
+ .delay = 16383,
+ .presc = 49,
+ .oversampling_shift = 3,
+ .cfg_gpio = s3c24xx_ts_cfg_gpio,
+};
+
static struct gpio_keys_button n30_buttons[] = {
{
.gpio = S3C2410_GPF(0),
@@ -391,6 +399,8 @@ static struct platform_device *n30_devices[] __initdata = {
&s3c_device_rtc,
&s3c_device_usbgadget,
&s3c_device_sdi,
+ &s3c_device_adc,
+ &s3c_device_ts,
&n30_button_device,
&n30_blue_led,
&n30_warning_led,
@@ -404,6 +414,8 @@ static struct platform_device *n35_devices[] __initdata = {
&s3c_device_rtc,
&s3c_device_usbgadget,
&s3c_device_sdi,
+ &s3c_device_adc,
+ &s3c_device_ts,
&n35_button_device,
&n35_blue_led,
&n35_warning_led,
@@ -566,6 +578,7 @@ static void __init n30_init(void)
WARN_ON(gpio_request(S3C2410_GPG(4), "mmc power"));
s3c24xx_fb_set_platdata(&n30_fb_info);
+ s3c24xx_ts_set_platdata(&n30_ts_cfg);
s3c24xx_udc_set_platdata(&n30_udc_cfg);
s3c24xx_mci_set_platdata(&n30_mci_cfg);
s3c_i2c0_set_platdata(&n30_i2ccfg);
--
1.7.3.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 6/6] n35: Add LCD backlight regulation on Acer n35
2010-10-04 0:23 [PATCH 0/6] - Acer n35 fixes and features Jiří Pinkava
` (7 preceding siblings ...)
2010-10-13 7:56 ` [PATCH 5/6] n30: Add touchscreen support for " Jiri.Pinkava at vscht.cz
@ 2010-10-13 7:56 ` Jiri.Pinkava at vscht.cz
8 siblings, 0 replies; 17+ messages in thread
From: Jiri.Pinkava at vscht.cz @ 2010-10-13 7:56 UTC (permalink / raw)
To: linux-arm-kernel
Signed-off-by: Jiri Pinkava <jiri.pinkava@vscht.cz>
---
arch/arm/mach-s3c2410/mach-n30.c | 71 ++++++++++++++++++++++++++++++++++++++
1 files changed, 71 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-s3c2410/mach-n30.c b/arch/arm/mach-s3c2410/mach-n30.c
index be5235d..4199143 100644
--- a/arch/arm/mach-s3c2410/mach-n30.c
+++ b/arch/arm/mach-s3c2410/mach-n30.c
@@ -23,6 +23,7 @@
#include <linux/input.h>
#include <linux/interrupt.h>
#include <linux/platform_device.h>
+#include <linux/pwm_backlight.h>
#include <linux/serial_core.h>
#include <linux/timer.h>
#include <linux/io.h>
@@ -369,6 +370,74 @@ static struct s3c2410fb_mach_info n30_fb_info __initdata = {
.lpcsel = 0x06,
};
+static int n35_backlight_init(struct device *dev)
+{
+ int ret;
+
+ ret = gpio_request(S3C2410_GPB(0), "Backlight PWM output");
+ if (ret)
+ goto request_gpb0_fail;
+ ret = gpio_request(S3C2410_GPB(1), "Backlight power");
+ if (ret)
+ goto request_gpb1_fail;
+
+ /* set GPB0 as output of PWM timer */
+ gpio_set_value(S3C2410_GPB(0), 0);
+ s3c_gpio_setpull(S3C2410_GPB(0), S3C_GPIO_PULL_DOWN);
+ s3c_gpio_cfgpin(S3C2410_GPB(0), S3C2410_GPB0_TOUT0);
+
+ /* backlight power */
+ ret = gpio_direction_output(S3C2410_GPB(1), 1);
+ if (ret)
+ goto direction_gpb1_fail;
+ s3c_gpio_setpull(S3C2410_GPB(1), S3C_GPIO_PULL_UP);
+
+ return 0;
+
+direction_gpb1_fail:
+ gpio_free(S3C2410_GPB(1));
+request_gpb1_fail:
+ gpio_free(S3C2410_GPB(0));
+request_gpb0_fail:
+ return ret;
+}
+
+static int n35_backlight_notify(struct device *dev, int brightness)
+{
+ /* power off backlight, values less than 14 are useless */
+ gpio_set_value(S3C2410_GPB(1), brightness > 14 ? 1 : 0);
+ return (brightness > 14 ? brightness : 0);
+}
+
+static void n35_backlight_exit(struct device *dev)
+{
+ gpio_direction_output(S3C2410_GPB(0), 0);
+ gpio_free(S3C2410_GPB(0));
+
+ gpio_set_value(S3C2410_GPB(1), 0);
+ s3c_gpio_setpull(S3C2410_GPB(1), S3C_GPIO_PULL_UP);
+ gpio_free(S3C2410_GPB(1));
+}
+
+static struct platform_pwm_backlight_data backlight_data = {
+ .pwm_id = 0,
+ .max_brightness = 100,
+ .dft_brightness = 50,
+ .pwm_period_ns = 3*1000*1000,
+ .init = n35_backlight_init,
+ .notify = n35_backlight_notify,
+ .exit = n35_backlight_exit,
+};
+
+static struct platform_device n35_backlight = {
+ .name = "pwm-backlight",
+ .dev = {
+ .parent = &s3c_device_timer[0].dev,
+ .platform_data = &backlight_data,
+ },
+ .id = -1,
+};
+
static void n30_sdi_set_power(unsigned char power_mode, unsigned short vdd)
{
switch (power_mode) {
@@ -416,6 +485,8 @@ static struct platform_device *n35_devices[] __initdata = {
&s3c_device_sdi,
&s3c_device_adc,
&s3c_device_ts,
+ &s3c_device_timer[0],
+ &n35_backlight,
&n35_button_device,
&n35_blue_led,
&n35_warning_led,
--
1.7.3.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
end of thread, other threads:[~2010-10-13 7:56 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-04 0:23 [PATCH 0/6] - Acer n35 fixes and features Jiří Pinkava
2010-10-04 0:24 ` [PATCH 1/6] n35: fix key codes and types Jiří Pinkava
2010-10-04 0:25 ` [PATCH 2/6] n35: Update GPIO documentation for Acer n35 Jiří Pinkava
2010-10-04 0:26 ` PATCH 3/6] n30: Clean up UARTs configuration Jiří Pinkava
2010-10-04 0:29 ` [PATCH 4/6] n30: Fix MMC power management Jiří Pinkava
2010-10-04 0:31 ` [PATCH 5/6] n30: Add touchscreen support for Ace n35 Jiří Pinkava
2010-10-04 0:32 ` [PATCH 6/6] n35: Add LCD backlight regulation Jiří Pinkava
2010-10-10 23:38 ` [PATCH 1/6] n35: fix key codes and types Ben Dooks
2010-10-13 7:49 ` Jiří Pinkava
2010-10-06 22:25 ` [PATCH 0/6] - Acer n35 fixes and features Ben Dooks
2010-10-10 23:43 ` Ben Dooks
2010-10-13 7:56 ` [PATCH 1/6] n35: fix key codes Jiri.Pinkava at vscht.cz
2010-10-13 7:56 ` [PATCH 2/6] n35: Update GPIO documentation for Acer n35 Jiri.Pinkava at vscht.cz
2010-10-13 7:56 ` [PATCH 3/6] n30: Clean up UARTs configuration Jiri.Pinkava at vscht.cz
2010-10-13 7:56 ` [PATCH 4/6] n30: Fix MMC power management on Acer n30 / n35 Jiri.Pinkava at vscht.cz
2010-10-13 7:56 ` [PATCH 5/6] n30: Add touchscreen support for " Jiri.Pinkava at vscht.cz
2010-10-13 7:56 ` [PATCH 6/6] n35: Add LCD backlight regulation on Acer n35 Jiri.Pinkava at vscht.cz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).