mirror of
https://github.com/commaai/agnos-kernel-sdm845.git
synced 2026-06-08 11:24:51 +08:00
Merge remote-tracking branch 'upstream/master' into bluetooth
This commit is contained in:
@@ -46,8 +46,16 @@ $(obj)/Image.bz2: $(obj)/Image FORCE
|
||||
$(call if_changed,bzip2)
|
||||
|
||||
$(obj)/Image-dtb-hdr: $(obj)/Image FORCE
|
||||
echo -n 'UNCOMPRESSED_IMG' > $@ && \
|
||||
$(call size_append, $(filter-out FORCE,$^)) >> $@
|
||||
( \
|
||||
echo -n 'UNCOMPRESSED_IMG'; \
|
||||
dec_size=$$(stat -c "%s" $(obj)/Image); \
|
||||
printf "%08x\n" $$dec_size | sed 's/\(..\)/\1 /g' | { \
|
||||
read ch0 ch1 ch2 ch3; \
|
||||
for ch in $$ch3 $$ch2 $$ch1 $$ch0; do \
|
||||
printf "\\$$(printf '%03o' $$((0x$$ch)))"; \
|
||||
done; \
|
||||
}; \
|
||||
) > $@
|
||||
|
||||
$(obj)/Image-dtb: $(obj)/Image-dtb-hdr $(obj)/Image $(DTB_OBJS) FORCE
|
||||
$(call if_changed,cat)
|
||||
|
||||
@@ -41,6 +41,14 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&pcie0 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&pcie1 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&soc {
|
||||
clock_audio_lnbb: audio_ext_clk_lnbb {
|
||||
status = "ok";
|
||||
|
||||
@@ -24,6 +24,11 @@
|
||||
#include "comma_common.dtsi"
|
||||
#include "dsi-panel-bantian.dtsi"
|
||||
|
||||
&qupv3_se10_i2c {
|
||||
/* Not populated on mici; probing it costs ~500ms at boot. */
|
||||
/delete-node/ ti_ina321@40;
|
||||
};
|
||||
|
||||
/* touch panel I2C, /dev/i2c-2 */
|
||||
&qupv3_se5_i2c {
|
||||
status = "ok";
|
||||
@@ -245,6 +250,22 @@ status = "ok";
|
||||
qcom,msm-mi2s-tx-lines = <1>;
|
||||
};
|
||||
|
||||
&snd_934x {
|
||||
qcom,comma-skip-tavil-init;
|
||||
qcom,comma-minimal-audio;
|
||||
|
||||
qcom,audio-routing =
|
||||
"HiFi Playback", "IN_L",
|
||||
"HiFi Playback", "IN_R",
|
||||
"OUT_L", "HiFi Capture",
|
||||
"OUT_R", "HiFi Capture";
|
||||
|
||||
asoc-platform = <&pcm0>, <&routing>;
|
||||
asoc-platform-names = "msm-pcm-dsp.0", "msm-pcm-routing";
|
||||
asoc-cpu = <&dai_mi2s1>;
|
||||
asoc-cpu-names = "msm-dai-q6-mi2s.1";
|
||||
};
|
||||
|
||||
/* Board definition */
|
||||
/ {
|
||||
model = "comma mici";
|
||||
|
||||
@@ -658,7 +658,7 @@
|
||||
|
||||
ramoops: ramoops@b0000000 {
|
||||
compatible = "ramoops";
|
||||
reg = <0 0xb0000000 0 0x00400000>;
|
||||
reg = <0 0xb0000000 0 0x003ff000>;
|
||||
record-size = <0x40000>; /*256x1024*/
|
||||
console-size = <0x40000>;
|
||||
ftrace-size = <0x40000>;
|
||||
@@ -666,6 +666,13 @@
|
||||
ecc-size = <0x0>;
|
||||
};
|
||||
|
||||
/* Untouched region for bootloader cookies
|
||||
* (e.g. the power blip cookie @ 0xb03ffffc). */
|
||||
cookies: cookies@b03ff000 {
|
||||
no-map;
|
||||
reg = <0 0xb03ff000 0 0x1000>;
|
||||
};
|
||||
|
||||
|
||||
/* global autoconfigured region for contiguous allocations */
|
||||
linux,cma {
|
||||
@@ -3491,7 +3498,7 @@
|
||||
thermal-governor = "step_wise";
|
||||
trips {
|
||||
gpu_trip0: gpu-trip0 {
|
||||
temperature = <95000>;
|
||||
temperature = <105000>;
|
||||
hysteresis = <0>;
|
||||
type = "passive";
|
||||
};
|
||||
@@ -3538,7 +3545,7 @@
|
||||
thermal-governor = "step_wise";
|
||||
trips {
|
||||
pop_trip: pop-trip {
|
||||
temperature = <95000>;
|
||||
temperature = <105000>;
|
||||
hysteresis = <0>;
|
||||
type = "passive";
|
||||
};
|
||||
|
||||
@@ -558,12 +558,12 @@ CONFIG_EFI_STUB=y
|
||||
CONFIG_EFI=y
|
||||
CONFIG_DMI=y
|
||||
CONFIG_BUILD_ARM64_APPENDED_DTB_IMAGE=y
|
||||
CONFIG_IMG_GZ_DTB=y
|
||||
# CONFIG_IMG_DTB is not set
|
||||
CONFIG_BUILD_ARM64_APPENDED_KERNEL_IMAGE_NAME="Image.gz-dtb"
|
||||
# CONFIG_IMG_GZ_DTB is not set
|
||||
CONFIG_IMG_DTB=y
|
||||
CONFIG_BUILD_ARM64_APPENDED_KERNEL_IMAGE_NAME="Image-dtb"
|
||||
CONFIG_BUILD_ARM64_APPENDED_DTB_IMAGE_NAMES=""
|
||||
CONFIG_BUILD_ARM64_KERNEL_COMPRESSION_GZIP=y
|
||||
# CONFIG_BUILD_ARM64_UNCOMPRESSED_KERNEL is not set
|
||||
# CONFIG_BUILD_ARM64_KERNEL_COMPRESSION_GZIP is not set
|
||||
CONFIG_BUILD_ARM64_UNCOMPRESSED_KERNEL=y
|
||||
# CONFIG_BUILD_ARM64_DT_OVERLAY is not set
|
||||
|
||||
#
|
||||
@@ -4489,7 +4489,7 @@ CONFIG_MSM_SYSMON_GLINK_COMM=y
|
||||
CONFIG_MSM_PIL_SSR_GENERIC=y
|
||||
CONFIG_MSM_PIL_MSS_QDSP6V5=y
|
||||
CONFIG_ICNSS=y
|
||||
CONFIG_ICNSS_DEBUG=y
|
||||
# CONFIG_ICNSS_DEBUG is not set
|
||||
CONFIG_QCOM_COMMAND_DB=y
|
||||
CONFIG_MSM_PERFORMANCE=y
|
||||
CONFIG_MSM_CDSP_LOADER=y
|
||||
|
||||
@@ -554,12 +554,12 @@ CONFIG_EFI_STUB=y
|
||||
CONFIG_EFI=y
|
||||
CONFIG_DMI=y
|
||||
CONFIG_BUILD_ARM64_APPENDED_DTB_IMAGE=y
|
||||
CONFIG_IMG_GZ_DTB=y
|
||||
# CONFIG_IMG_DTB is not set
|
||||
CONFIG_BUILD_ARM64_APPENDED_KERNEL_IMAGE_NAME="Image.gz-dtb"
|
||||
# CONFIG_IMG_GZ_DTB is not set
|
||||
CONFIG_IMG_DTB=y
|
||||
CONFIG_BUILD_ARM64_APPENDED_KERNEL_IMAGE_NAME="Image-dtb"
|
||||
CONFIG_BUILD_ARM64_APPENDED_DTB_IMAGE_NAMES=""
|
||||
CONFIG_BUILD_ARM64_KERNEL_COMPRESSION_GZIP=y
|
||||
# CONFIG_BUILD_ARM64_UNCOMPRESSED_KERNEL is not set
|
||||
# CONFIG_BUILD_ARM64_KERNEL_COMPRESSION_GZIP is not set
|
||||
CONFIG_BUILD_ARM64_UNCOMPRESSED_KERNEL=y
|
||||
# CONFIG_BUILD_ARM64_DT_OVERLAY is not set
|
||||
|
||||
#
|
||||
|
||||
@@ -1310,17 +1310,90 @@ error:
|
||||
return len;
|
||||
}
|
||||
|
||||
static int debugfs_mipi_command_transfer_one(struct dsi_display *display,
|
||||
struct mipi_dsi_device *dsi,
|
||||
struct dsi_display_debugfs_mipi_command *command)
|
||||
{
|
||||
struct mipi_dsi_msg *dsi_msg;
|
||||
int rc;
|
||||
|
||||
if (command->command_length < 8)
|
||||
return -EINVAL;
|
||||
|
||||
dsi_msg = kzalloc(sizeof(*dsi_msg), GFP_KERNEL);
|
||||
if (ZERO_OR_NULL_PTR(dsi_msg))
|
||||
return -ENOMEM;
|
||||
|
||||
dsi_msg->tx_buf = kzalloc(command->command_length - 7, GFP_KERNEL);
|
||||
if (ZERO_OR_NULL_PTR(dsi_msg->tx_buf)) {
|
||||
rc = -ENOMEM;
|
||||
goto out_free_msg;
|
||||
}
|
||||
|
||||
dsi_msg->channel = dsi->channel;
|
||||
dsi_msg->type = command->command_buf[0];
|
||||
dsi_msg->tx_len = command->command_buf[5] << 8 | command->command_buf[6];
|
||||
if (dsi_msg->tx_len + 7 > command->command_length) {
|
||||
rc = -EINVAL;
|
||||
goto out_free_tx;
|
||||
}
|
||||
memcpy((void *)dsi_msg->tx_buf, command->command_buf + 7, dsi_msg->tx_len);
|
||||
|
||||
if (dsi_msg->tx_len + 8 < command->command_length) {
|
||||
dsi_msg->rx_len = command->command_buf[7 + dsi_msg->tx_len] << 8 |
|
||||
command->command_buf[8 + dsi_msg->tx_len];
|
||||
} else {
|
||||
dsi_msg->rx_len = 0;
|
||||
}
|
||||
|
||||
if (dsi_msg->rx_len) {
|
||||
dsi_msg->flags |= MIPI_DSI_MSG_USE_LPM;
|
||||
dsi_msg->rx_buf = kzalloc(dsi_msg->rx_len, GFP_KERNEL);
|
||||
if (ZERO_OR_NULL_PTR(dsi_msg->rx_buf)) {
|
||||
rc = -ENOMEM;
|
||||
goto out_free_tx;
|
||||
}
|
||||
}
|
||||
|
||||
if (!dsi->host->ops || !dsi->host->ops->transfer) {
|
||||
rc = -ENOSYS;
|
||||
goto out_free_rx;
|
||||
}
|
||||
|
||||
if (dsi->mode_flags & MIPI_DSI_MODE_LPM)
|
||||
dsi_msg->flags |= MIPI_DSI_MSG_USE_LPM;
|
||||
|
||||
if ((command->command_buf[1] != 0x0F) || (dsi_msg->rx_len > 0)) {
|
||||
// normal "slow" mode
|
||||
dsi_msg->flags |= MIPI_DSI_MSG_LASTCOMMAND;
|
||||
}
|
||||
|
||||
rc = dsi_host_transfer(dsi->host, dsi_msg);
|
||||
|
||||
if (dsi_msg->rx_len && !IS_ERR_VALUE(rc)) {
|
||||
memcpy(display->readback_buf, dsi_msg->rx_buf, dsi_msg->rx_len);
|
||||
display->readback_length = dsi_msg->rx_len;
|
||||
}
|
||||
|
||||
out_free_rx:
|
||||
kfree(dsi_msg->rx_buf);
|
||||
out_free_tx:
|
||||
kfree(dsi_msg->tx_buf);
|
||||
out_free_msg:
|
||||
kfree(dsi_msg);
|
||||
return IS_ERR_VALUE(rc) ? rc : 0;
|
||||
}
|
||||
|
||||
static ssize_t debugfs_mipi_command_write(struct file *file,
|
||||
const char __user *user_buf,
|
||||
size_t user_len,
|
||||
loff_t *ppos)
|
||||
{
|
||||
struct dsi_display *display = file->private_data;
|
||||
char *buf;
|
||||
int rc = 0;
|
||||
struct dsi_display_debugfs_mipi_command *command;
|
||||
struct mipi_dsi_msg *dsi_msg;
|
||||
struct mipi_dsi_device *dsi;
|
||||
char *buf;
|
||||
size_t offset = 0;
|
||||
int rc = 0;
|
||||
|
||||
if (!display)
|
||||
return -ENODEV;
|
||||
@@ -1328,8 +1401,8 @@ static ssize_t debugfs_mipi_command_write(struct file *file,
|
||||
if (*ppos)
|
||||
return 0;
|
||||
|
||||
if (user_len < 12){
|
||||
pr_info("got buffer of %d bytes, expected at least 12\n", user_len);
|
||||
if (user_len < 12) {
|
||||
pr_info("got buffer of %zu bytes, expected at least 12\n", user_len);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@@ -1347,84 +1420,39 @@ static ssize_t debugfs_mipi_command_write(struct file *file,
|
||||
goto error;
|
||||
}
|
||||
|
||||
// Data is in buf, let's cast it to our struct
|
||||
command = (struct dsi_display_debugfs_mipi_command *) buf;
|
||||
if(command->command_length < 8) {
|
||||
rc = -EINVAL;
|
||||
goto error;
|
||||
}
|
||||
|
||||
// Parse and transfer the message
|
||||
dsi = &display->panel->mipi_device;
|
||||
dsi_msg = kzalloc(sizeof(struct mipi_dsi_msg), GFP_KERNEL);
|
||||
if (ZERO_OR_NULL_PTR(dsi_msg)) {
|
||||
rc = -ENOMEM;
|
||||
goto error;
|
||||
}
|
||||
|
||||
dsi_msg->tx_buf = kzalloc((command->command_length - 7), GFP_KERNEL);
|
||||
if (ZERO_OR_NULL_PTR(dsi_msg)) {
|
||||
rc = -ENOMEM;
|
||||
goto error_two;
|
||||
}
|
||||
mutex_lock(&display->panel->panel_lock);
|
||||
|
||||
dsi_msg->channel = dsi->channel;
|
||||
dsi_msg->type = command->command_buf[0];
|
||||
pr_debug("msg type: %d\n", dsi_msg->type);
|
||||
while (offset + sizeof(int) <= user_len) {
|
||||
struct dsi_display_debugfs_mipi_command *command =
|
||||
(struct dsi_display_debugfs_mipi_command *)(buf + offset);
|
||||
size_t cmd_total;
|
||||
|
||||
dsi_msg->tx_len = command->command_buf[5] << 8 | command->command_buf[6];
|
||||
if (dsi_msg->tx_len + 7 > command->command_length) {
|
||||
rc = -EINVAL;
|
||||
goto error_two;
|
||||
}
|
||||
pr_debug("msg tx_len: %d\n", dsi_msg->tx_len);
|
||||
memcpy(dsi_msg->tx_buf, command->command_buf + 7, dsi_msg->tx_len);
|
||||
|
||||
if (dsi_msg->tx_len + 8 < command->command_length) {
|
||||
dsi_msg->rx_len = command->command_buf[7 + dsi_msg->tx_len] << 8 |
|
||||
command->command_buf[8 + dsi_msg->tx_len];
|
||||
} else {
|
||||
dsi_msg->rx_len = 0;
|
||||
}
|
||||
pr_debug("msg rx_len: %d\n", dsi_msg->rx_len);
|
||||
if (dsi_msg->rx_len) {
|
||||
dsi_msg->flags |= MIPI_DSI_MSG_USE_LPM;
|
||||
dsi_msg->rx_buf = kzalloc(dsi_msg->rx_len, GFP_KERNEL);
|
||||
if (ZERO_OR_NULL_PTR(dsi_msg->rx_buf)) {
|
||||
rc = -ENOMEM;
|
||||
goto error_two;
|
||||
if (command->command_length < 0 ||
|
||||
command->command_length > MAX_CMD_PAYLOAD_SIZE) {
|
||||
rc = -EINVAL;
|
||||
break;
|
||||
}
|
||||
|
||||
cmd_total = sizeof(int) + command->command_length;
|
||||
if (offset + cmd_total > user_len) {
|
||||
rc = -EINVAL;
|
||||
break;
|
||||
}
|
||||
|
||||
rc = debugfs_mipi_command_transfer_one(display, dsi, command);
|
||||
if (rc)
|
||||
break;
|
||||
|
||||
offset += cmd_total;
|
||||
}
|
||||
|
||||
if (!dsi->host->ops || !dsi->host->ops->transfer) {
|
||||
rc = -ENOSYS;
|
||||
goto error_two;
|
||||
}
|
||||
mutex_unlock(&display->panel->panel_lock);
|
||||
|
||||
if (dsi->mode_flags & MIPI_DSI_MODE_LPM)
|
||||
dsi_msg->flags |= MIPI_DSI_MSG_USE_LPM;
|
||||
|
||||
if ((command->command_buf[1] != 0x0F) || (dsi_msg->rx_len > 0)) {
|
||||
// normal "slow" mode
|
||||
dsi_msg->flags |= MIPI_DSI_MSG_LASTCOMMAND;
|
||||
} else {
|
||||
pr_debug("fast tx only command\n");
|
||||
}
|
||||
|
||||
rc = dsi_host_transfer(dsi->host, dsi_msg);
|
||||
if(!IS_ERR_VALUE(rc)){
|
||||
if (!rc)
|
||||
rc = user_len;
|
||||
pr_debug("wrote %d bytes\n", rc);
|
||||
}
|
||||
|
||||
if (dsi_msg->rx_len) {
|
||||
memcpy(display->readback_buf, dsi_msg->rx_buf, dsi_msg->rx_len);
|
||||
display->readback_length = dsi_msg->rx_len;
|
||||
pr_debug("read back %d bytes\n", dsi_msg->rx_len);
|
||||
}
|
||||
|
||||
error_two:
|
||||
kfree(dsi_msg);
|
||||
error:
|
||||
kfree(buf);
|
||||
return rc;
|
||||
|
||||
@@ -1436,6 +1436,7 @@ static struct i2c_driver fts_ts_driver = {
|
||||
.name = FTS_DRIVER_NAME,
|
||||
.owner = THIS_MODULE,
|
||||
.of_match_table = fts_match_table,
|
||||
.probe_type = PROBE_PREFER_ASYNCHRONOUS,
|
||||
},
|
||||
.id_table = fts_ts_id,
|
||||
};
|
||||
|
||||
@@ -1545,7 +1545,18 @@ static irqreturn_t arm_smmu_context_fault(int irq, void *dev)
|
||||
}
|
||||
ret = IRQ_NONE;
|
||||
resume = RESUME_TERMINATE;
|
||||
if (!non_fatal_fault) {
|
||||
/* openpilot#35788: the WLAN host (icnss) periodically trips
|
||||
* this fault during recovery from upstream blips. The original
|
||||
* BUG() takes down the whole device; for WLAN we'd rather let
|
||||
* firmware fail the DMA, trigger its own modem-PD SSR through
|
||||
* icnss, and bring WLAN back ~7s later with the kernel intact.
|
||||
* All other masters keep the original BUG(). */
|
||||
if (smmu_domain->dev &&
|
||||
of_device_is_compatible(smmu_domain->dev->of_node,
|
||||
"qcom,icnss")) {
|
||||
dev_err(smmu->dev,
|
||||
"Unhandled WLAN context fault! (BUG suppressed; awaiting SSR)\n");
|
||||
} else if (!non_fatal_fault) {
|
||||
dev_err(smmu->dev,
|
||||
"Unhandled arm-smmu context fault!\n");
|
||||
BUG();
|
||||
|
||||
@@ -689,14 +689,16 @@ static int fg_get_battery_resistance(struct fg_chip *chip, int *val)
|
||||
#define BATT_CURRENT_DENR 1000
|
||||
static int fg_get_battery_current(struct fg_chip *chip, int *val)
|
||||
{
|
||||
static int last_iadc_ua = 1;
|
||||
static unsigned long last_trig;
|
||||
int rc = 0;
|
||||
int64_t temp = 0;
|
||||
u8 buf[2];
|
||||
|
||||
rc = fg_read(chip, BATT_INFO_IBATT_LSB(chip), buf, 2);
|
||||
rc = fg_read(chip, BATT_INFO_IADC_LSB(chip), buf, 2);
|
||||
if (rc < 0) {
|
||||
pr_err("failed to read addr=0x%04x, rc=%d\n",
|
||||
BATT_INFO_IBATT_LSB(chip), rc);
|
||||
BATT_INFO_IADC_LSB(chip), rc);
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -709,6 +711,18 @@ static int fg_get_battery_current(struct fg_chip *chip, int *val)
|
||||
/* Sign bit is bit 15 */
|
||||
temp = twos_compliment_extend(temp, 15);
|
||||
*val = div_s64((s64)temp * BATT_CURRENT_NUMR, BATT_CURRENT_DENR);
|
||||
*val = *val ? (last_iadc_ua = *val) : last_iadc_ua;
|
||||
|
||||
/* skip adc trigger while previous conversion is still running */
|
||||
if (time_before(jiffies, last_trig + msecs_to_jiffies(170)))
|
||||
return 0;
|
||||
|
||||
/* arm the next IADC conversion with rising edge on BATT_IADC_CONV */
|
||||
u8 iadc_ctrl = ALG_DIRECT_MODE_EN_BIT | ADC_ENABLE_REG_CTRL_BIT;
|
||||
fg_write(chip, BATT_INFO_TM_MISC(chip), &iadc_ctrl, 1);
|
||||
iadc_ctrl |= BATT_IADC_CONV_BIT;
|
||||
fg_write(chip, BATT_INFO_TM_MISC(chip), &iadc_ctrl, 1);
|
||||
last_trig = jiffies;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -699,7 +699,7 @@ int pil_mss_reset_load_mba(struct pil_desc *pil)
|
||||
md->attrs_dma |= DMA_ATTR_SKIP_ZEROING;
|
||||
md->attrs_dma |= DMA_ATTR_STRONGLY_ORDERED;
|
||||
|
||||
ret = request_firmware(&dp_fw, dp_name, pil->dev);
|
||||
ret = request_firmware_direct(&dp_fw, dp_name, pil->dev);
|
||||
if (ret) {
|
||||
dev_warn(pil->dev, "Debug policy not present - %s. Continue.\n",
|
||||
dp_name);
|
||||
|
||||
@@ -9861,38 +9861,24 @@ static int hdd_update_mac_addr_to_fw(hdd_context_t *hdd_ctx)
|
||||
* hdd_initialize_mac_address() - API to get wlan mac addresses
|
||||
* @hdd_ctx: HDD Context
|
||||
*
|
||||
* Get MAC addresses from platform driver or wlan_mac.bin. If platform driver
|
||||
* is provisioned with mac addresses, driver uses it, else it will use
|
||||
* wlan_mac.bin to update HW MAC addresses.
|
||||
* Get MAC addresses from platform driver. If platform driver is not
|
||||
* provisioned with mac addresses, generate one from the SoC serial number.
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
static int hdd_initialize_mac_address(hdd_context_t *hdd_ctx)
|
||||
{
|
||||
QDF_STATUS status;
|
||||
int ret;
|
||||
bool update_mac_addr_to_fw = true;
|
||||
|
||||
ret = hdd_platform_wlan_mac(hdd_ctx);
|
||||
if (hdd_ctx->config->mac_provision || !ret)
|
||||
return ret;
|
||||
|
||||
hdd_info("MAC is not programmed in platform driver ret: %d, use wlan_mac.bin",
|
||||
hdd_info("MAC is not programmed in platform driver ret: %d, "
|
||||
"generate MAC from device serial no.",
|
||||
ret);
|
||||
|
||||
status = hdd_update_mac_config(hdd_ctx);
|
||||
|
||||
if (QDF_IS_STATUS_SUCCESS(status))
|
||||
return 0;
|
||||
|
||||
hdd_info("MAC is not programmed in wlan_mac.bin ret %d, use default MAC",
|
||||
status);
|
||||
|
||||
/* Use fw provided MAC */
|
||||
if (!qdf_is_macaddr_zero(&hdd_ctx->hw_macaddr)) {
|
||||
hdd_update_macaddr(hdd_ctx, hdd_ctx->hw_macaddr, false);
|
||||
update_mac_addr_to_fw = false;
|
||||
} else if (hdd_generate_macaddr_auto(hdd_ctx) != 0) {
|
||||
if (hdd_generate_macaddr_auto(hdd_ctx) != 0) {
|
||||
struct qdf_mac_addr mac_addr;
|
||||
|
||||
hdd_err("MAC failure from device serial no.");
|
||||
@@ -9905,13 +9891,12 @@ static int hdd_initialize_mac_address(hdd_context_t *hdd_ctx)
|
||||
hdd_update_macaddr(hdd_ctx, mac_addr, true);
|
||||
}
|
||||
|
||||
if (update_mac_addr_to_fw) {
|
||||
ret = hdd_update_mac_addr_to_fw(hdd_ctx);
|
||||
if (ret != 0) {
|
||||
hdd_err("MAC address out-of-sync, ret:%d", ret);
|
||||
QDF_ASSERT(ret);
|
||||
}
|
||||
ret = hdd_update_mac_addr_to_fw(hdd_ctx);
|
||||
if (ret != 0) {
|
||||
hdd_err("MAC address out-of-sync, ret:%d", ret);
|
||||
QDF_ASSERT(ret);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -566,14 +566,16 @@ static int limits_dcvs_probe(struct platform_device *pdev)
|
||||
return -EINVAL;
|
||||
};
|
||||
|
||||
/* COMMA: Disable LIMITS_SUB_FN_THERMAL and LIMITS_SUB_FN_CRNT LMH subfunctions to raise throttling temperature to ~105°C
|
||||
* LIMITS_SUB_FN_REL and LIMITS_SUB_FN_BCL keep LMH functional */
|
||||
/* Enable the thermal algorithm early */
|
||||
ret = limits_dcvs_write(hw->affinity, LIMITS_SUB_FN_THERMAL,
|
||||
LIMITS_ALGO_MODE_ENABLE, 1, 0, 0);
|
||||
LIMITS_ALGO_MODE_ENABLE, 0, 0, 0);
|
||||
if (ret)
|
||||
return ret;
|
||||
/* Enable the LMH outer loop algorithm */
|
||||
ret = limits_dcvs_write(hw->affinity, LIMITS_SUB_FN_CRNT,
|
||||
LIMITS_ALGO_MODE_ENABLE, 1, 0, 0);
|
||||
LIMITS_ALGO_MODE_ENABLE, 0, 0, 0);
|
||||
if (ret)
|
||||
return ret;
|
||||
/* Enable the Reliability algorithm */
|
||||
|
||||
@@ -3829,6 +3829,10 @@ static int msm_audrx_init(struct snd_soc_pcm_runtime *rtd)
|
||||
|
||||
rtd->pmdown_time = 0;
|
||||
|
||||
if (of_property_read_bool(rtd->card->dev->of_node,
|
||||
"qcom,comma-skip-tavil-init"))
|
||||
return 0;
|
||||
|
||||
ret = snd_soc_add_codec_controls(codec, msm_snd_controls,
|
||||
ARRAY_SIZE(msm_snd_controls));
|
||||
if (ret < 0) {
|
||||
@@ -6164,6 +6168,12 @@ static struct snd_soc_dai_link msm_tavil_snd_card_dai_links[
|
||||
ARRAY_SIZE(msm_mi2s_be_dai_links) +
|
||||
ARRAY_SIZE(msm_auxpcm_be_dai_links)];
|
||||
|
||||
#define MSM_COMMON_DAI_LINK_MEDIA1 0
|
||||
#define MSM_MI2S_DAI_LINK_SEC_RX 2
|
||||
#define MSM_MI2S_DAI_LINK_SEC_TX 3
|
||||
|
||||
static struct snd_soc_dai_link msm_mici_snd_card_dai_links[3];
|
||||
|
||||
#if 0
|
||||
static int msm_snd_card_tavil_late_probe(struct snd_soc_card *card)
|
||||
{
|
||||
@@ -6462,60 +6472,78 @@ static struct snd_soc_card *populate_snd_card_dailinks(struct device *dev)
|
||||
|
||||
if (!strcmp(match->data, "tavil_codec")) {
|
||||
card = &snd_soc_card_tavil_msm;
|
||||
len_1 = ARRAY_SIZE(msm_common_dai_links);
|
||||
len_2 = len_1 + ARRAY_SIZE(msm_tavil_fe_dai_links);
|
||||
len_3 = len_2 + ARRAY_SIZE(msm_common_misc_fe_dai_links);
|
||||
len_4 = len_3 + ARRAY_SIZE(msm_common_be_dai_links);
|
||||
total_links = len_4 + ARRAY_SIZE(msm_tavil_be_dai_links);
|
||||
memcpy(msm_tavil_snd_card_dai_links,
|
||||
msm_common_dai_links,
|
||||
sizeof(msm_common_dai_links));
|
||||
memcpy(msm_tavil_snd_card_dai_links + len_1,
|
||||
msm_tavil_fe_dai_links,
|
||||
sizeof(msm_tavil_fe_dai_links));
|
||||
memcpy(msm_tavil_snd_card_dai_links + len_2,
|
||||
msm_common_misc_fe_dai_links,
|
||||
sizeof(msm_common_misc_fe_dai_links));
|
||||
memcpy(msm_tavil_snd_card_dai_links + len_3,
|
||||
msm_common_be_dai_links,
|
||||
sizeof(msm_common_be_dai_links));
|
||||
memcpy(msm_tavil_snd_card_dai_links + len_4,
|
||||
msm_tavil_be_dai_links,
|
||||
sizeof(msm_tavil_be_dai_links));
|
||||
|
||||
if (of_property_read_bool(dev->of_node, "qcom,wcn-btfm")) {
|
||||
dev_dbg(dev, "%s(): WCN BTFM support present\n",
|
||||
__func__);
|
||||
memcpy(msm_tavil_snd_card_dai_links + total_links,
|
||||
msm_wcn_be_dai_links,
|
||||
sizeof(msm_wcn_be_dai_links));
|
||||
total_links += ARRAY_SIZE(msm_wcn_be_dai_links);
|
||||
}
|
||||
|
||||
if (of_property_read_bool(dev->of_node,
|
||||
"qcom,ext-disp-audio-rx")) {
|
||||
dev_dbg(dev, "%s(): ext disp audio support present\n",
|
||||
__func__);
|
||||
memcpy(msm_tavil_snd_card_dai_links + total_links,
|
||||
ext_disp_be_dai_link,
|
||||
sizeof(ext_disp_be_dai_link));
|
||||
total_links += ARRAY_SIZE(ext_disp_be_dai_link);
|
||||
"qcom,comma-minimal-audio")) {
|
||||
total_links = ARRAY_SIZE(msm_mici_snd_card_dai_links);
|
||||
memcpy(&msm_mici_snd_card_dai_links[0],
|
||||
&msm_common_dai_links[MSM_COMMON_DAI_LINK_MEDIA1],
|
||||
sizeof(msm_mici_snd_card_dai_links[0]));
|
||||
memcpy(&msm_mici_snd_card_dai_links[1],
|
||||
&msm_mi2s_be_dai_links[MSM_MI2S_DAI_LINK_SEC_RX],
|
||||
sizeof(msm_mici_snd_card_dai_links[1]));
|
||||
memcpy(&msm_mici_snd_card_dai_links[2],
|
||||
&msm_mi2s_be_dai_links[MSM_MI2S_DAI_LINK_SEC_TX],
|
||||
sizeof(msm_mici_snd_card_dai_links[2]));
|
||||
dailink = msm_mici_snd_card_dai_links;
|
||||
} else {
|
||||
len_1 = ARRAY_SIZE(msm_common_dai_links);
|
||||
len_2 = len_1 + ARRAY_SIZE(msm_tavil_fe_dai_links);
|
||||
len_3 = len_2 + ARRAY_SIZE(msm_common_misc_fe_dai_links);
|
||||
len_4 = len_3 + ARRAY_SIZE(msm_common_be_dai_links);
|
||||
total_links = len_4 + ARRAY_SIZE(msm_tavil_be_dai_links);
|
||||
memcpy(msm_tavil_snd_card_dai_links,
|
||||
msm_common_dai_links,
|
||||
sizeof(msm_common_dai_links));
|
||||
memcpy(msm_tavil_snd_card_dai_links + len_1,
|
||||
msm_tavil_fe_dai_links,
|
||||
sizeof(msm_tavil_fe_dai_links));
|
||||
memcpy(msm_tavil_snd_card_dai_links + len_2,
|
||||
msm_common_misc_fe_dai_links,
|
||||
sizeof(msm_common_misc_fe_dai_links));
|
||||
memcpy(msm_tavil_snd_card_dai_links + len_3,
|
||||
msm_common_be_dai_links,
|
||||
sizeof(msm_common_be_dai_links));
|
||||
memcpy(msm_tavil_snd_card_dai_links + len_4,
|
||||
msm_tavil_be_dai_links,
|
||||
sizeof(msm_tavil_be_dai_links));
|
||||
|
||||
if (of_property_read_bool(dev->of_node,
|
||||
"qcom,wcn-btfm")) {
|
||||
dev_dbg(dev, "%s(): WCN BTFM support present\n",
|
||||
__func__);
|
||||
memcpy(msm_tavil_snd_card_dai_links +
|
||||
total_links, msm_wcn_be_dai_links,
|
||||
sizeof(msm_wcn_be_dai_links));
|
||||
total_links += ARRAY_SIZE(msm_wcn_be_dai_links);
|
||||
}
|
||||
|
||||
if (of_property_read_bool(dev->of_node,
|
||||
"qcom,ext-disp-audio-rx")) {
|
||||
dev_dbg(dev,
|
||||
"%s(): ext disp audio support present\n",
|
||||
__func__);
|
||||
memcpy(msm_tavil_snd_card_dai_links +
|
||||
total_links, ext_disp_be_dai_link,
|
||||
sizeof(ext_disp_be_dai_link));
|
||||
total_links += ARRAY_SIZE(ext_disp_be_dai_link);
|
||||
}
|
||||
if (of_property_read_bool(dev->of_node,
|
||||
"qcom,mi2s-audio-intf")) {
|
||||
memcpy(msm_tavil_snd_card_dai_links +
|
||||
total_links, msm_mi2s_be_dai_links,
|
||||
sizeof(msm_mi2s_be_dai_links));
|
||||
total_links += ARRAY_SIZE(msm_mi2s_be_dai_links);
|
||||
}
|
||||
if (of_property_read_bool(dev->of_node,
|
||||
"qcom,auxpcm-audio-intf")) {
|
||||
memcpy(msm_tavil_snd_card_dai_links +
|
||||
total_links, msm_auxpcm_be_dai_links,
|
||||
sizeof(msm_auxpcm_be_dai_links));
|
||||
total_links += ARRAY_SIZE(msm_auxpcm_be_dai_links);
|
||||
}
|
||||
dailink = msm_tavil_snd_card_dai_links;
|
||||
}
|
||||
if (of_property_read_bool(dev->of_node,
|
||||
"qcom,mi2s-audio-intf")) {
|
||||
memcpy(msm_tavil_snd_card_dai_links + total_links,
|
||||
msm_mi2s_be_dai_links,
|
||||
sizeof(msm_mi2s_be_dai_links));
|
||||
total_links += ARRAY_SIZE(msm_mi2s_be_dai_links);
|
||||
}
|
||||
if (of_property_read_bool(dev->of_node,
|
||||
"qcom,auxpcm-audio-intf")) {
|
||||
memcpy(msm_tavil_snd_card_dai_links + total_links,
|
||||
msm_auxpcm_be_dai_links,
|
||||
sizeof(msm_auxpcm_be_dai_links));
|
||||
total_links += ARRAY_SIZE(msm_auxpcm_be_dai_links);
|
||||
}
|
||||
dailink = msm_tavil_snd_card_dai_links;
|
||||
} else if (!strcmp(match->data, "stub_codec")) {
|
||||
card = &snd_soc_card_stub_msm;
|
||||
len_1 = ARRAY_SIZE(msm_stub_fe_dai_links);
|
||||
|
||||
Reference in New Issue
Block a user