mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-11 13:27:06 +09:00
rk2928: 'adc&keypad support' and 'lvds' and 'lcd'
This commit is contained in:
@@ -22,7 +22,6 @@ CONFIG_MODULES=y
|
|||||||
CONFIG_MODULE_UNLOAD=y
|
CONFIG_MODULE_UNLOAD=y
|
||||||
CONFIG_MODULE_FORCE_UNLOAD=y
|
CONFIG_MODULE_FORCE_UNLOAD=y
|
||||||
CONFIG_ARCH_RK2928=y
|
CONFIG_ARCH_RK2928=y
|
||||||
CONFIG_WIFI_CONTROL_FUNC=y
|
|
||||||
CONFIG_RK_DEBUG_UART=2
|
CONFIG_RK_DEBUG_UART=2
|
||||||
CONFIG_FIQ_DEBUGGER=y
|
CONFIG_FIQ_DEBUGGER=y
|
||||||
CONFIG_FIQ_DEBUGGER_NO_SLEEP=y
|
CONFIG_FIQ_DEBUGGER_NO_SLEEP=y
|
||||||
|
|||||||
@@ -1154,6 +1154,7 @@ static void __init rk2928_board_init(void)
|
|||||||
{
|
{
|
||||||
gpio_request(POWER_ON_PIN, "poweronpin");
|
gpio_request(POWER_ON_PIN, "poweronpin");
|
||||||
gpio_direction_output(POWER_ON_PIN, GPIO_HIGH);
|
gpio_direction_output(POWER_ON_PIN, GPIO_HIGH);
|
||||||
|
gpio_free(POWER_ON_PIN);
|
||||||
|
|
||||||
pm_power_off = rk30_pm_power_off;
|
pm_power_off = rk30_pm_power_off;
|
||||||
|
|
||||||
|
|||||||
@@ -29,6 +29,27 @@
|
|||||||
#include <mach/iomux.h>
|
#include <mach/iomux.h>
|
||||||
#include <plat/rk_fiq_debugger.h>
|
#include <plat/rk_fiq_debugger.h>
|
||||||
|
|
||||||
|
#ifdef CONFIG_ADC_RK30
|
||||||
|
static struct resource rk30_adc_resource[] = {
|
||||||
|
{
|
||||||
|
.start = IRQ_SARADC,
|
||||||
|
.end = IRQ_SARADC,
|
||||||
|
.flags = IORESOURCE_IRQ,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.start = RK2928_SARADC_PHYS,
|
||||||
|
.end = RK2928_SARADC_PHYS + RK2928_SARADC_SIZE - 1,
|
||||||
|
.flags = IORESOURCE_MEM,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
struct platform_device device_adc = {
|
||||||
|
.name = "rk30-adc",
|
||||||
|
.id = -1,
|
||||||
|
.num_resources = ARRAY_SIZE(rk30_adc_resource),
|
||||||
|
.resource = rk30_adc_resource,
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
static u64 dma_dmamask = DMA_BIT_MASK(32);
|
static u64 dma_dmamask = DMA_BIT_MASK(32);
|
||||||
|
|
||||||
@@ -748,6 +769,9 @@ static int __init rk2928_init_devices(void)
|
|||||||
rk2928_init_uart();
|
rk2928_init_uart();
|
||||||
rk2928_init_i2c();
|
rk2928_init_i2c();
|
||||||
rk2928_init_spim();
|
rk2928_init_spim();
|
||||||
|
#ifdef CONFIG_ADC_RK30
|
||||||
|
platform_device_register(&device_adc);
|
||||||
|
#endif
|
||||||
#ifdef CONFIG_KEYS_RK29
|
#ifdef CONFIG_KEYS_RK29
|
||||||
platform_device_register(&device_keys);
|
platform_device_register(&device_keys);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -128,6 +128,7 @@ static int rk30_adc_probe(struct platform_device *pdev)
|
|||||||
struct resource *res;
|
struct resource *res;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
printk("%s: start\n", __func__);
|
||||||
adc = adc_alloc_host(&pdev->dev, sizeof(struct rk30_adc_device), SARADC_CHN_MASK);
|
adc = adc_alloc_host(&pdev->dev, sizeof(struct rk30_adc_device), SARADC_CHN_MASK);
|
||||||
if (!adc)
|
if (!adc)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
@@ -266,6 +267,7 @@ static struct platform_driver rk30_adc_driver = {
|
|||||||
|
|
||||||
static int __init rk30_adc_init(void)
|
static int __init rk30_adc_init(void)
|
||||||
{
|
{
|
||||||
|
printk("%s: start\n", __func__);
|
||||||
return platform_driver_register(&rk30_adc_driver);
|
return platform_driver_register(&rk30_adc_driver);
|
||||||
}
|
}
|
||||||
subsys_initcall(rk30_adc_init);
|
subsys_initcall(rk30_adc_init);
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
#define INVALID_ADVALUE 10
|
#define INVALID_ADVALUE 10
|
||||||
|
|
||||||
|
|
||||||
#if 0
|
#if 1
|
||||||
#define key_dbg(bdata, format, arg...) \
|
#define key_dbg(bdata, format, arg...) \
|
||||||
dev_printk(KERN_INFO , &bdata->input->dev , format , ## arg)
|
dev_printk(KERN_INFO , &bdata->input->dev , format , ## arg)
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -8,11 +8,11 @@
|
|||||||
|
|
||||||
|
|
||||||
/* Base */
|
/* Base */
|
||||||
#define OUT_TYPE SCREEN_RGB
|
#define OUT_TYPE SCREEN_LVDS
|
||||||
|
|
||||||
#define OUT_FACE OUT_D888_P666
|
#define OUT_FACE OUT_D888_P666
|
||||||
#define OUT_CLK 65000000
|
#define OUT_CLK 65000000
|
||||||
#define LCDC_ACLK 500000000//312000000 //29 lcdc axi DMA Ƶ<><C6B5>
|
#define LCDC_ACLK 300000000//312000000 //29 lcdc axi DMA Ƶ<><C6B5>
|
||||||
|
|
||||||
/* Timing */
|
/* Timing */
|
||||||
#define H_PW 10
|
#define H_PW 10
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#define RK_LVDS_H
|
#define RK_LVDS_H
|
||||||
|
|
||||||
#define LVDS_CON0_OFFSET 0x150
|
#define LVDS_CON0_OFFSET 0x150
|
||||||
#define LVDS_CON0_REG (RK2928_GRF_PHYS + LVDS_CON0_OFFSET)
|
#define LVDS_CON0_REG (RK2928_GRF_BASE + LVDS_CON0_OFFSET)
|
||||||
|
|
||||||
#define LVDSRdReg() __raw_readl(LVDS_CON0_REG)
|
#define LVDSRdReg() __raw_readl(LVDS_CON0_REG)
|
||||||
#define LVDSWrReg(val) __raw_writel( val ,LVDS_CON0_REG)
|
#define LVDSWrReg(val) __raw_writel( val ,LVDS_CON0_REG)
|
||||||
|
|||||||
Reference in New Issue
Block a user