Merge remote-tracking branch 'origin/odroidn2-4.9.y' into odroidn2-4.9.y-upstream

Change-Id: If980b269fe64e24846bda4d1a160f99d070831b7
This commit is contained in:
Dongjin Kim
2019-03-06 02:10:14 +09:00
6 changed files with 29 additions and 14 deletions

View File

@@ -92,8 +92,8 @@
auge_sound {
compatible = "amlogic, g12a-sound-card";
aml-audio-card,name = "AML-AUGESOUND";
/*avout mute gpio*/
avout_mute-gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>;
/*line-out mute gpio*/
mute_gpio = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_LOW>;
/*for audio effect ,eqdrc */
aml-audio-card,effect = <&audio_effect>;
@@ -185,13 +185,11 @@
gpios = <&gpio GPIOH_5 GPIO_ACTIVE_HIGH>;
asserted-state = <0>;
duration-ms = <100>;
auto;
};
usb_hub {
gpios = <&gpio GPIOH_4 GPIO_ACTIVE_HIGH>;
asserted-state = <0>;
duration-ms = <100>;
auto;
};
};

View File

@@ -65,7 +65,7 @@ static struct early_suspend aocec_suspend_handler;
#define CEC_FRAME_DELAY msecs_to_jiffies(400)
#define CEC_DEV_NAME "cec"
#define CEC_DEV_NAME "aocec"
#define CEC_POWER_ON (0 << 0)
#define CEC_EARLY_SUSPEND (1 << 0)
@@ -1905,7 +1905,8 @@ static void cec_task(struct work_struct *work)
cec_cfg = cec_config(0, 0);
if (cec_cfg & CEC_FUNC_CFG_CEC_ON) {
/*cec module on*/
if (cec_dev && (!wake_ok || cec_service_suspended()))
if (cec_dev && (!wake_ok || cec_service_suspended())
&& !(cec_dev->hal_flag & (1 << HDMI_OPTION_SYSTEM_CEC_CONTROL)))
cec_rx_process();
/*for check rx buffer for old chip version, cec rx irq process*/
@@ -2530,6 +2531,11 @@ static ssize_t hdmitx_cec_write(struct file *f, const char __user *buf,
if (cec_cfg & CEC_FUNC_CFG_CEC_ON) {
/*cec module on*/
ret = cec_ll_tx(tempbuf, size);
if (ret == CEC_FAIL_NACK) {
return -1;
} else {
return size;
}
} else {
CEC_ERR("err:cec module disabled\n");
}
@@ -2912,9 +2918,7 @@ static char *aml_cec_class_devnode(struct device *dev, umode_t *mode)
{
if (mode) {
*mode = 0666;
CEC_INFO("mode is %x\n", *mode);
} else
CEC_INFO("mode is null\n");
}
return NULL;
}

View File

@@ -22,7 +22,7 @@
#define CEC_DRIVER_VERSION "Ver 2019/1/7\n"
#define CEC_FRAME_DELAY msecs_to_jiffies(400)
#define CEC_DEV_NAME "cec"
#define CEC_DEV_NAME "aocec"
#define CEC_EARLY_SUSPEND (1 << 0)
#define CEC_DEEP_SUSPEND (1 << 1)

View File

@@ -5304,6 +5304,8 @@ static irqreturn_t vsync_isr_in(int irq, void *dev_id)
if (omx_secret_mode == true) {
u32 system_time = timestamp_pcrscr_get();
int diff = system_time - omx_pts;
video_notify_flag |= VIDEO_NOTIFY_TRICK_WAIT;
atomic_set(&trickmode_framedone, 1);
if ((diff - omx_pts_interval_upper) > 0
|| (diff - omx_pts_interval_lower) < 0

View File

@@ -26,6 +26,7 @@
#include <linux/amlogic/pm.h>
#endif
#define RTL821x_LCR 0x10
#define RTL821x_EEELCR 0x11
#define RTL821x_PHYSR 0x11
#define RTL821x_PHYSR_DUPLEX 0x2000
#define RTL821x_PHYSR_SPEED 0xc000
@@ -151,7 +152,14 @@ static int rtl8211f_config_init(struct phy_device *phydev)
}
#endif
phy_write(phydev, RTL8211F_PAGE_SELECT, 0xd04); /*set page 0xd04*/
#if defined(CONFIG_ARCH_MESON64_ODROID_COMMON)
phy_write(phydev, RTL821x_LCR,
(1 << 6) | (1 << 9) // LED1 - GREEN (100Mbps)
| (1 << 13) | (1 << 14)); // LED2 - AMBER (1000Mbps)
#else
phy_write(phydev, RTL821x_LCR, 0XC171); /*led configuration*/
#endif
phy_write(phydev, RTL821x_EEELCR, 0); /*disable eee led indication*/
/* restore to default page 0 */
phy_write(phydev, RTL8211F_PAGE_SELECT, 0x0);

View File

@@ -735,7 +735,7 @@ static int spk_mute_get(struct snd_kcontrol *kcontrol,
}
static const struct snd_kcontrol_new card_controls[] = {
SOC_SINGLE_BOOL_EXT("SPK mute", 0,
SOC_SINGLE_BOOL_EXT("LINE_OUT mute", 0,
spk_mute_get,
spk_mute_set),
};
@@ -750,7 +750,7 @@ static int aml_card_parse_gpios(struct device_node *node,
bool active_low;
int ret;
gpio = of_get_named_gpio_flags(node, "spk_mute", 0, &flags);
gpio = of_get_named_gpio_flags(node, "mute_gpio", 0, &flags);
priv->spk_mute_gpio = gpio;
if (gpio_is_valid(gpio)) {
@@ -758,14 +758,16 @@ static int aml_card_parse_gpios(struct device_node *node,
flags = active_low ? GPIOF_OUT_INIT_HIGH : GPIOF_OUT_INIT_LOW;
priv->spk_mute_active_low = active_low;
ret = devm_gpio_request_one(dev, gpio, flags, "spk_mute");
ret = devm_gpio_request_one(dev, gpio, flags, "line_mute");
if (ret < 0)
return ret;
ret = snd_soc_add_card_controls(soc_card, card_controls,
ARRAY_SIZE(card_controls));
}
pr_info("add line-out mute controls\n");
}
#if !defined(CONFIG_ARCH_MESON64_ODROID_COMMON)
priv->avout_mute_desc = gpiod_get(dev,
"avout_mute",
GPIOD_OUT_HIGH);
@@ -773,6 +775,7 @@ static int aml_card_parse_gpios(struct device_node *node,
gpiod_direction_output(priv->avout_mute_desc,
GPIOF_OUT_INIT_HIGH);
pr_info("set av out GPIOF_OUT_INIT_HIGH!\n");
#endif
return 0;
}