Commit 8f284b62 authored by Mauro Ribeiro's avatar Mauro Ribeiro

Merge branch 'odroidxu3-3.10.y'

parents f532f99a b4b6c7c9
......@@ -318,6 +318,7 @@
regulator-min-microvolt = <2850000>;
regulator-max-microvolt = <2850000>;
regulator-always-on;
regulator-ramp-delay = <12000>;
regulator-initial-mode = <1>;
};
......@@ -418,7 +419,7 @@
pinctrl-names = "default";
pinctrl-0 = <&audio_irq>;
};
};
};
pinctrl@13400000 {
b_sess0_irq: b-sess0-irq {
......@@ -459,6 +460,8 @@
usb@12000000 {
dwc3-vbus-supply = <&dwc3_vbus>;
vdd33-supply = <&ldo9_reg>;
vdd10-supply = <&ldo11_reg>;
samsung,bsess-gpio = <&gpx3 5 0xf>;
pinctrl-names = "default";
pinctrl-0 = <&b_sess0_irq>;
......@@ -475,6 +478,8 @@
usb@12400000 {
dwc3-vbus-supply = <&dwc3_vbus>;
vdd33-supply = <&ldo9_reg>;
vdd10-supply = <&ldo11_reg>;
samsung,bsess-gpio = <&gpx3 4 0xf>;
pinctrl-names = "default";
pinctrl-0 = <&b_sess1_irq>;
......@@ -504,9 +509,9 @@
};
spi_1: spi@12d30000 {
status = "okay";
cs-gpios = <&gpa2 5 0>;
};
status = "okay";
cs-gpios = <&gpa2 5 0>;
};
spi_2: spi@12d40000 {
status = "disabled";
......@@ -535,22 +540,22 @@
status = "okay";
};
i2s_dummy: dummy-i2s {
compatible = "samsung,dummy-i2s";
status = "okay";
};
i2s_dummy: dummy-i2s {
compatible = "samsung,dummy-i2s";
status = "okay";
};
sound {
compatible = "hardkernel,odroid-max98090";
clocks = <&clock 6>; /* fout_epll */
clock-names = "fout_epll";
samsung,audio-cpu = <&i2s0 /* primary */
&i2s0>; /* secondary */
&i2s0>; /* secondary */
samsung,audio-cpu-spdif = <&spdif>; /* spdif */
samsung,audio-codec = <&audio_codec
&audio_codec>;
&audio_codec>;
samsung,audio-dummy = <&audio_codec_dummy
&audio_codec_dummy>;
&audio_codec_dummy>;
status = "okay";
};
......@@ -570,7 +575,7 @@
compatible = "odroid-fan";
pinctrl-names = "default";
pinctrl-0 = <&pwm0_out>;
pwm_id = <0>;
pwm_periode_ns = <20972>; /* 22kHz */
pwm_duty = <200>; /* initial value : 0 to 255 */
......@@ -587,86 +592,87 @@
fan_speed_3 = <91>;
};
leds {
compatible = "gpio-leds";
/* Blue LED */
hearbeat {
label = "blue:heartbeart";
gpios = <&gpb2 2 0>;
default-state = "off";
linux,default-trigger = "heartbeat";
};
/* Green LED */
eMMC {
label = "green:activity";
gpios = <&gpb2 1 0>;
default-state = "off";
linux,default-trigger = "mmc0";
};
/* Red LED */
microSD {
label = "red:activity";
gpios = <&gpx2 3 0>;
default-state = "off";
linux,default-trigger = "mmc1";
};
};
/* i2c0 INA231 Sensors */
/*
- include/linux/platform_data/ina231.h
config = INA231_CONFIG(VSH_CT(eVSH_CT_8244uS) | \
leds {
compatible = "gpio-leds";
/* Blue LED */
hearbeat {
label = "blue:heartbeart";
gpios = <&gpb2 2 0>;
default-state = "off";
linux,default-trigger = "heartbeat";
};
/* Green LED */
eMMC {
label = "green:activity";
gpios = <&gpb2 1 0>;
default-state = "off";
linux,default-trigger = "mmc0";
};
/* Red LED */
microSD {
label = "red:activity";
gpios = <&gpx2 3 0>;
default-state = "off";
linux,default-trigger = "mmc1";
};
};
/* i2c0 INA231 Sensors */
/*
- include/linux/platform_data/ina231.h
config = INA231_CONFIG(VSH_CT(eVSH_CT_8244uS) | \
VBUS_CT(eVBUS_CT_8244uS) | \
AVG_BIT(eAVG_16) | \
eSHUNT_BUS_VOLT_CONTINUOUS),
update_period = CONVERSION_DELAY(eVSH_CON_8244uS, eVBUS_CON_8244uS, eAVG_CON_16), // unit = usec
*/
*/
i2c@12C60000 {
status = "okay";
clock-frequency = <400000>;
ina231@40 {
clock-frequency = <400000>;
ina231@40 {
compatible = "hardkernel,INA231";
reg = <0x40>;
sensor-name = "sensor_arm";
enable = <0>;
max_A = <9>;
shunt_R_mohm = <10>;
config = <0x45FF>;
update_period = <263808>;
};
ina231@41 {
sensor-name = "sensor_arm";
enable = <0>;
max_A = <9>;
shunt_R_mohm = <10>;
config = <0x45FF>;
update_period = <263808>;
};
ina231@41 {
compatible = "hardkernel,INA231";
reg = <0x41>;
sensor-name = "sensor_mem";
enable = <0>;
max_A = <3>;
shunt_R_mohm = <10>;
config = <0x45FF>;
update_period = <263808>;
};
ina231@44 {
sensor-name = "sensor_mem";
enable = <0>;
max_A = <3>;
shunt_R_mohm = <10>;
config = <0x45FF>;
update_period = <263808>;
};
ina231@44 {
compatible = "hardkernel,INA231";
reg = <0x44>;
sensor-name = "sensor_g3d";
enable = <0>;
max_A = <5>;
shunt_R_mohm = <10>;
config = <0x45FF>;
update_period = <263808>;
};
ina231@45 {
sensor-name = "sensor_g3d";
enable = <0>;
max_A = <5>;
shunt_R_mohm = <10>;
config = <0x45FF>;
update_period = <263808>;
};
ina231@45 {
compatible = "hardkernel,INA231";
reg = <0x45>;
sensor-name = "sensor_kfc";
enable = <0>;
max_A = <2>;
shunt_R_mohm = <10>;
config = <0x45FF>;
update_period = <263808>;
};
sensor-name = "sensor_kfc";
enable = <0>;
max_A = <2>;
shunt_R_mohm = <10>;
config = <0x45FF>;
update_period = <263808>;
};
};
regulators {
......@@ -697,46 +703,46 @@
vdd-supply = <&ldo8_reg>;
hdmi-en-supply = <&reg_hdmi_en>;
};
/* AOC 22" DP Config */
dp-controller@145B0000 {
status = "disabled";
samsung,hpd-gpio = <&gpx0 7 3>;
pinctrl-names = "default";
pinctrl-0 = <&dp_hpd_gpio>;
samsung,hpd-gpio = <&gpx0 7 3>;
pinctrl-names = "default";
pinctrl-0 = <&dp_hpd_gpio>;
hsync-active-high = <0>;
vsync-active-high = <0>;
interlaced = <0>;
samsung,color-space = <0>;
samsung,dynamic-range = <0>;
samsung,ycbcr-coeff = <0>;
samsung,color-depth = <1>;
samsung,link-rate = <0x0a>;
samsung,lane-count = <4>;
display-timings {
native-mode = <&timing1>;
timing1: timing@1 {
clock-frequency = <266000000>;
hactive = <1920>;
vactive = <1080>;
hfront-porch = <88>;
hback-porch = <44>;
hsync-len = <148>;
vback-porch = <4>;
vfront-porch = <5>;
vsync-len = <36>;
};
};
};
samsung,dynamic-range = <0>;
samsung,ycbcr-coeff = <0>;
samsung,color-depth = <1>;
samsung,link-rate = <0x0a>;
samsung,lane-count = <4>;
display-timings {
native-mode = <&timing1>;
timing1: timing@1 {
clock-frequency = <266000000>;
hactive = <1920>;
vactive = <1080>;
hfront-porch = <88>;
hback-porch = <44>;
hsync-len = <148>;
vback-porch = <4>;
vfront-porch = <5>;
vsync-len = <36>;
};
};
};
fimd {
status = "okay";
status = "okay";
};
ion {
compatible = "samsung,exynos5430-ion";
contig-names = "common", "mfc_sh", "g2d_wfd", "video", "mfc_input",
......
......@@ -28,15 +28,15 @@
mshc0 = &dwmmc_0;
mshc1 = &dwmmc_1;
mshc2 = &dwmmc_2;
mfc0 = &mfc_0;
gsc0 = &gsc_0;
gsc1 = &gsc_1;
mfc0 = &mfc_0;
mdev0 = &mdev_0;
jpeg0 = &jpeg_0;
jpeg1 = &jpeg_1;
spi0 = &spi_0;
spi1 = &spi_1;
spi2 = &spi_2;
jpeg0 = &jpeg_0;
jpeg1 = &jpeg_1;
spi3 = &spi_3;
spi4 = &spi_4;
scaler0 = &scaler_0;
......@@ -101,7 +101,6 @@
pmu_wdt_reset_type = <1>;
};
firmware@02073000 {
compatible = "samsung,secure-firmware";
reg = <0x02073000 0x1000>;
......@@ -292,7 +291,7 @@
clocks = <&clock 1320>, <&clock 1324>;
mmu-masters = <&mixer>;
qos = <15>;
};
};
sysmmu_gscl0: sysmmu@0x13E80000 {
compatible = "samsung,exynos4210-sysmmu";
......@@ -429,21 +428,21 @@
mmu-masters = <&mfc_0>;
};
sysmmu_fimd0x: sysmmu@0x14640000 {
compatible = "samsung,exynos4210-sysmmu";
reg = <0x14640000 0x1000>;
interrupt-parent = <&combiner>;
interrupts = <3 2>;
clock-names = "sysmmu", "master";
clocks = <&clock 1322>, <&clock 1329>;
qos = <15>;
mmu-masters = <&fimd>;
prop-map {
winmap = <0x11>;
};
sysmmu_fimd0x: sysmmu@0x14640000 {
compatible = "samsung,exynos4210-sysmmu";
reg = <0x14640000 0x1000>;
interrupt-parent = <&combiner>;
interrupts = <3 2>;
clock-names = "sysmmu", "master";
clocks = <&clock 1322>, <&clock 1329>;
qos = <15>;
mmu-masters = <&fimd>;
prop-map {
winmap = <0x11>;
};
};
sysmmu_fimd1x: sysmmu@0x14680000 {
sysmmu_fimd1x: sysmmu@0x14680000 {
compatible = "samsung,exynos4210-sysmmu";
reg = <0x14680000 0x1000>;
interrupt-parent = <&combiner>;
......@@ -452,11 +451,11 @@
clocks = <&clock 1321>, <&clock 1329>;
qos = <15>;
mmu-masters = <&fimd>;
prop-map {
winmap = <0xe>;
};
prop-map {
winmap = <0xe>;
};
};
dwmmc_0: dwmmc0@12200000 {
compatible = "samsung,exynos5422-dw-mshc";
reg = <0x12200000 0x2000>;
......@@ -467,7 +466,7 @@
clock-names = "biu", "gate_ciu", "dout_mmc_a";
status = "disabled";
};
dwmmc_1: dwmmc1@12210000 {
compatible = "samsung,exynos5422-dw-mshc";
reg = <0x12210000 0x2000>;
......@@ -786,7 +785,7 @@
interrupts = <0 106 0>;
#io-channel-cells = <1>;
io-channel-ranges;
clocks = <&clock 1485>;
clocks = <&clock 1485>;
clock-names = "gate_adcif";
};
......@@ -875,7 +874,7 @@
pinctrl-names = "default";
pinctrl-0 = <&spi2_bus>;
};
mfc_0: mfc@11000000 {
compatible = "samsung,mfc-v6";
reg = <0x11000000 0x10000>;
......@@ -1130,7 +1129,7 @@
pinctrl-1 = <&pcm2_bus>;
status = "disabled";
};
pmu_system_controller: system-controller@10040000 {
compatible = "samsung,exynos5420-pmu", "syscon";
reg = <0x10040000 0x5000>;
......@@ -1149,7 +1148,7 @@
clocks = <&clock 1324>, <&clock 1059>;
clock-names = "clk_mixer", "sclk_hdmi";
};
hdmi: hdmi@14530000 {
compatible = "samsung,exynos5420-hdmi";
reg = <0x14530000 0x80000>;
......@@ -1170,62 +1169,62 @@
pinctrl-names = "hdmi_cec";
pinctrl-0 = <&hdmi_cec>;
clock-names = "pclk_hdmi_cec";
clock-names = "pclk_hdmi_cec";
clocks = <&clock 966>;
#address-cells = <1>;
#size-cells = <1>;
ranges;
#address-cells = <1>;
#size-cells = <1>;
ranges;
hdmiphy-sys {
reg = <0x10040700 0x4>;
};
};
hdmiphy: hdmiphy@145D0000 {
reg = <0x145D0000 0x20>;
};
dp_phy: video-phy@10040728 {
compatible = "samsung,exynos5250-dp-video-phy";
reg = <0x10040728 4>;
#phy-cells = <0>;
};
dp_phy: video-phy@10040728 {
compatible = "samsung,exynos5250-dp-video-phy";
reg = <0x10040728 4>;
#phy-cells = <0>;
};
dp: dp-controller@145B0000 {
dp: dp-controller@145B0000 {
status = "disabled";
reg = <0x145b0000 0x10000>;
interrupts = <10 3>;
reg = <0x145b0000 0x10000>;
interrupts = <10 3>;
interrupt-parent = <&combiner>;
compatible = "samsung,exynos5-dp";
clocks = <&clock 1325>;
clock-names = "clk_dp1";
phys = <&dp_phy>;
phy-names = "dp";
samsung,power-domain = <&spd_dp>;
};
fimd: fimd@14400000 {
clocks = <&clock 1325>;
clock-names = "clk_dp1";
phys = <&dp_phy>;
phy-names = "dp";
samsung,power-domain = <&spd_dp>;
};
fimd: fimd@14400000 {
compatible = "samsung,exynos5250-fimd";
clocks = <&clock 1061>, <&clock 1329>;
clock-names = "sclk_fimd1", "clk_fimd1";
reg = <0x14400000 0x40000>, <0x14500000 0x8000>;
samsung,power-domain = <&spd_fimd>;
interrupt-controller;
#interrups-cells = <2>;
interrupt-parent = <&fimd_fb_int_map>;
interrupts = <0 0>, <1 0>, <2 0>, <3 0>;
fimd_fb_int_map: fimd_fb_int_map {
#interrupt-cells = <2>;
#address-cells = <0>;
#size-cells = <0>;
interrupt-map = <0 0 &combiner 18 5>,
<1 0 &combiner 18 4>,
<2 0 &combiner 18 6>,
<3 0 &gic 0 82 0>;
};
};
clocks = <&clock 1061>, <&clock 1329>;
clock-names = "sclk_fimd1", "clk_fimd1";
reg = <0x14400000 0x40000>, <0x14500000 0x8000>;
samsung,power-domain = <&spd_fimd>;
interrupt-controller;
#interrups-cells = <2>;
interrupt-parent = <&fimd_fb_int_map>;
interrupts = <0 0>, <1 0>, <2 0>, <3 0>;
fimd_fb_int_map: fimd_fb_int_map {
#interrupt-cells = <2>;
#address-cells = <0>;
#size-cells = <0>;
interrupt-map = <0 0 &combiner 18 5>,
<1 0 &combiner 18 4>,
<2 0 &combiner 18 6>,
<3 0 &gic 0 82 0>;
};
};
spi_3: spi@131a0000 {
compatible = "samsung,exynos5410-spi";
......@@ -1429,5 +1428,4 @@
secmem = <&gsc_0>,
<&gsc_1>;
};
};
......@@ -4,6 +4,8 @@
#include <linux/version.h>
#include <generated/utsrelease.h>
struct device;
#if defined(CONFIG_DEBUG_FS)
struct dentry *debugfs_create_devm_seqfile(struct device *dev, const char *name,
struct dentry *parent,
......
......@@ -12,6 +12,8 @@
*/
#include <linux/string.h>
struct device;
#if LINUX_VERSION_CODE < KERNEL_VERSION(3,9,0)
/* backport
* commit 9f3b795a626ee79574595e06d1437fe0c7d51d29
......
......@@ -910,7 +910,7 @@ PHY_RFShadowCompareAll(
for (eRFPath = 0; eRFPath < RF6052_MAX_PATH; eRFPath++)
{
for (Offset = 0; Offset <= RF6052_MAX_REG; Offset++)
for (Offset = 0; Offset < RF6052_MAX_REG; Offset++)
{
PHY_RFShadowCompare(Adapter, (RF_RADIO_PATH_E)eRFPath, Offset);
}
......@@ -928,7 +928,7 @@ PHY_RFShadowRecorverAll(
for (eRFPath = 0; eRFPath < RF6052_MAX_PATH; eRFPath++)
{
for (Offset = 0; Offset <= RF6052_MAX_REG; Offset++)
for (Offset = 0; Offset < RF6052_MAX_REG; Offset++)
{
PHY_RFShadowRecorver(Adapter, (RF_RADIO_PATH_E)eRFPath, Offset);
}
......@@ -972,7 +972,7 @@ PHY_RFShadowCompareFlagSetAll(
for (eRFPath = 0; eRFPath < RF6052_MAX_PATH; eRFPath++)
{
for (Offset = 0; Offset <= RF6052_MAX_REG; Offset++)
for (Offset = 0; Offset < RF6052_MAX_REG; Offset++)
{
// 2008/11/20 MH For S3S4 test, we only check reg 26/27 now!!!!
if (Offset != 0x26 && Offset != 0x27)
......@@ -994,7 +994,7 @@ PHY_RFShadowRecorverFlagSetAll(
for (eRFPath = 0; eRFPath < RF6052_MAX_PATH; eRFPath++)
{
for (Offset = 0; Offset <= RF6052_MAX_REG; Offset++)
for (Offset = 0; Offset < RF6052_MAX_REG; Offset++)
{
// 2008/11/20 MH For S3S4 test, we only check reg 26/27 now!!!!
if (Offset != 0x26 && Offset != 0x27)
......@@ -1015,7 +1015,7 @@ PHY_RFShadowRefresh(
for (eRFPath = 0; eRFPath < RF6052_MAX_PATH; eRFPath++)
{
for (Offset = 0; Offset <= RF6052_MAX_REG; Offset++)
for (Offset = 0; Offset < RF6052_MAX_REG; Offset++)
{
RF_Shadow[eRFPath][Offset].Value = 0;
RF_Shadow[eRFPath][Offset].Compare = _FALSE;
......
......@@ -1228,15 +1228,9 @@ static int cfg80211_rtw_set_default_key(struct wiphy *wiphy,
return 0;
}
#if (LINUX_VERSION_CODE > KERNEL_VERSION(3, 14,0))
static int cfg80211_rtw_get_station(struct wiphy *wiphy,
struct net_device *ndev,
const u8 *mac, struct station_info *sinfo)
#else
static int cfg80211_rtw_get_station(struct wiphy *wiphy,
struct net_device *ndev,
u8 *mac, struct station_info *sinfo)
#endif
{
int ret = 0;
struct rtw_adapter *padapter = wiphy_to_adapter(wiphy);
......@@ -2963,29 +2957,16 @@ static int cfg80211_rtw_stop_ap(struct wiphy *wiphy, struct net_device *ndev)
#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0)) */
#if (LINUX_VERSION_CODE > KERNEL_VERSION(3, 14,0))
static int cfg80211_rtw_add_station(struct wiphy *wiphy, struct net_device *ndev,
const u8 *mac, struct station_parameters *params)
#else
static int cfg80211_rtw_add_station(struct wiphy *wiphy, struct net_device *ndev,
u8 *mac, struct station_parameters *params)
#endif
{
DBG_8192D(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(ndev));
return 0;
}
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0))
static int cfg80211_rtw_del_station(struct wiphy *wiphy, struct net_device *ndev,
struct station_del_parameters *params)
#elif (LINUX_VERSION_CODE > KERNEL_VERSION(3, 14, 0))
static int cfg80211_rtw_del_station(struct wiphy *wiphy, struct net_device *ndev,
const u8 *mac)
#else
static int cfg80211_rtw_del_station(struct wiphy *wiphy, struct net_device *ndev,
u8 *mac)
#endif
struct station_del_parameters *params)
{
int ret=0;
struct list_head *phead, *plist;
......@@ -2994,9 +2975,7 @@ static int cfg80211_rtw_del_station(struct wiphy *wiphy, struct net_device *ndev
struct rtw_adapter *padapter = (struct rtw_adapter *)rtw_netdev_priv(ndev);
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
struct sta_priv *pstapriv = &padapter->stapriv;
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0))
const u8 *mac = params->mac;
#endif
DBG_8192D("+"FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(ndev));
......@@ -3070,13 +3049,8 @@ static int cfg80211_rtw_del_station(struct wiphy *wiphy, struct net_device *ndev
return ret;
}
#if (LINUX_VERSION_CODE > KERNEL_VERSION(3, 14, 0))
static int cfg80211_rtw_change_station(struct wiphy *wiphy, struct net_device *ndev,
const u8 *mac, struct station_parameters *params)
#else
static int cfg80211_rtw_change_station(struct wiphy *wiphy, struct net_device *ndev,
u8 *mac, struct station_parameters *params)
#endif
{
DBG_8192D(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(ndev));
......@@ -3506,18 +3480,8 @@ int rtw_cfg80211_set_mgnt_wpsp2pie(struct net_device *net, char *buf, int len,
return ret;
}
int (*mgmt_tx)(struct wiphy *wiphy, struct wireless_dev *wdev,
struct ieee80211_channel *chan, bool offchan,
unsigned int wait, const u8 *buf, size_t len,
bool no_cck, bool dont_wait_for_ack, u64 *cookie);
static int cfg80211_rtw_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 14, 0))
struct ieee80211_channel *chan, bool offchan,
unsigned int wait, const u8 *buf, size_t len,
bool no_cck, bool dont_wait_for_ack,
#else
struct cfg80211_mgmt_tx_params *params,
#endif
u64 *cookie)
{
struct rtw_adapter *padapter =
......@@ -3529,11 +3493,9 @@ static int cfg80211_rtw_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
bool ack = true;
u8 category, action;
unsigned long start = jiffies;
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0))
size_t len = params->len;
struct ieee80211_channel *chan = params->chan;
const u8 *buf = params->buf;
#endif
struct ieee80211_mgmt *hdr = (struct ieee80211_mgmt *)buf;
u8 tx_ch = (u8) ieee80211_frequency_to_channel(chan->center_freq);
......
......@@ -801,8 +801,8 @@ static ssize_t show_target_loads(
for (i = 0; i < tunables->ntarget_loads; i++)
ret += sprintf(buf + ret, "%u%s", tunables->target_loads[i],
i & 0x1 ? ":" : " ");
ret += sprintf(buf + --ret, "\n");