diff --git a/Linux_for_Tegra/sources/kernel_source/kernel/kernel-4.9/sound/soc/codecs/tas2563/tas2563-load-diagnose.h b/Linux_for_Tegra/sources/kernel_source/kernel/kernel-4.9/sound/soc/codecs/tas2563/tas2563-load-diagnose.h
new file mode 100644
index 0000000000..ff63b205fe
--- /dev/null
+++ b/Linux_for_Tegra/sources/kernel_source/kernel/kernel-4.9/sound/soc/codecs/tas2563/tas2563-load-diagnose.h
@@ -0,0 +1,14 @@
+#ifndef __TAS2563_LOAD_DIAGNOSE_H_
+#define __TAS2563_LOAD_DIAGNOSE_H_
+
+#define TASDEVICE_NORMAL_LOAD 0x20
+
+typedef struct {
+	unsigned int reg;
+	unsigned int val;
+} nd_tasdevice_register_t;
+
+extern const nd_tasdevice_register_t load_diagnostic_registers[];
+extern const int load_diagnostic_registers_count;
+
+#endif
diff --git a/Linux_for_Tegra/sources/kernel_source/kernel/kernel-4.9/sound/soc/codecs/tas2563/tasdevice-codec.c b/Linux_for_Tegra/sources/kernel_source/kernel/kernel-4.9/sound/soc/codecs/tas2563/tasdevice-codec.c
index 3f71ae001f..470b709128 100644
--- a/Linux_for_Tegra/sources/kernel_source/kernel/kernel-4.9/sound/soc/codecs/tas2563/tasdevice-codec.c
+++ b/Linux_for_Tegra/sources/kernel_source/kernel/kernel-4.9/sound/soc/codecs/tas2563/tasdevice-codec.c
@@ -30,6 +30,7 @@
 #include "tasdevice-ctl.h"
 #include "tasdevice-regbin.h"
 #include "tasdevice-rw.h"
+#include "tas2563-load-diagnose.h"
 
 #define TASDEVICE_CRC8_POLYNOMIAL	0x4d
 #define TASDEVICE_CLK_DIR_IN		(0)
@@ -40,6 +41,33 @@ static struct kobject *kobj_ref;
 bool tas2563_load_status = false;
 EXPORT_SYMBOL(tas2563_load_status);
 
+static char diagnose_result[64];
+
+/*
+ * These set the upper and lower limits threshold for the speaker
+ * and are required for load diagnostic routine.
+ * These are fixed values in our case and is suggested by TI.
+ */
+const nd_tasdevice_register_t load_diagnostic_registers[] = {
+	{TASDEVICE_REG(0x00, 0x00, 0x7F), 0x00},
+	{TASDEVICE_REG(0x00, 0x00, 0x01), 0x01},
+	{TASDEVICE_REG(0x00, 0x00, 0x30), 0x1D},
+	{TASDEVICE_REG(0x00, 0x00, 0x1B), 0xC7},
+	{TASDEVICE_REG(0x00, 0x00, 0x1A), 0xFD},
+	{TASDEVICE_REG(0x00, 0x05, 0x1C), 0x00},  /* Upper threshold start */
+	{TASDEVICE_REG(0x00, 0x05, 0x1D), 0x49},
+	{TASDEVICE_REG(0x00, 0x05, 0x1E), 0x24},
+	{TASDEVICE_REG(0x00, 0x05, 0x1F), 0x92},  /* Upper threshold end */
+	{TASDEVICE_REG(0x00, 0x05, 0x20), 0x00},  /* Lower threshold start */
+	{TASDEVICE_REG(0x00, 0x05, 0x21), 0x1D},
+	{TASDEVICE_REG(0x00, 0x05, 0x22), 0x41},
+	{TASDEVICE_REG(0x00, 0x05, 0x23), 0xD4},  /* Lower threshold end */
+	{TASDEVICE_REG(0x00, 0x00, 0x3D), 0x0E},  /* Load diagnostic clock enable */
+	{TASDEVICE_REG(0x00, 0x00, 0x02), 0x43}   /* Entering load diagnostic mode */
+};
+
+const int load_diagnostic_registers_count = ARRAY_SIZE(load_diagnostic_registers);
+
 static int tasdevice_program_get(struct snd_kcontrol *pKcontrol,
 		struct snd_ctl_elem_value *pValue)
 {
@@ -388,7 +416,52 @@ static ssize_t tas2563_store(struct kobject *kobj, struct kobj_attribute *attr,
     return count;
 }
 
+static ssize_t diagnose_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) {
+	return sprintf(buf, "%s\n", diagnose_result);
+}
+
 static struct kobj_attribute tas2563_attr = __ATTR(tas2563_driver_load_status, 0660, tas2563_show, tas2563_store);
+static struct kobj_attribute diagnose_attr = __ATTR(speaker_load_diagnose, 0444, diagnose_show, NULL);
+
+static int tasdevice_load_diagnostic(struct tasdevice_priv *tas_priv) {
+	int ret, i;
+	unsigned int read_value, read_value_24;
+
+	// Loop through the array and write to each register
+	for (i = 0; i < load_diagnostic_registers_count; i++) {
+		ret = tasdevice_dev_write(tas_priv, 0, load_diagnostic_registers[i].reg, load_diagnostic_registers[i].val);
+		if (ret < 0) {
+			dev_err(tas_priv->dev, "Write register failed 0x%02x. Return value: %d\n", load_diagnostic_registers[i].reg, ret);
+			return ret;
+		}
+	}
+
+	// Sleep for 200 ms
+	msleep(200);
+
+	ret = tasdevice_dev_read(tas_priv, 0, TASDEVICE_REG(0x00, 0x00, 0x25), &read_value);
+	if (ret < 0) {
+		dev_err(tas_priv->dev, "Failed to read register 0x25. Return value: %d\n", ret);
+		return ret;
+	}
+	// To detect over current
+	ret = tasdevice_dev_read(tas_priv, 0, TASDEVICE_REG(0x00, 0x00, 0x24), &read_value_24);
+	if (ret < 0) {
+		dev_err(tas_priv->dev, "Failed to read register 0x24. Return value: %d\n", ret);
+		return ret;
+	}
+
+	// Store the values in the diagnose_result buffer
+	snprintf(diagnose_result, sizeof(diagnose_result), "0x25: 0x%02x, 0x24: 0x%02x", read_value, read_value_24);
+
+	if (read_value != TASDEVICE_NORMAL_LOAD) {
+		dev_err(tas_priv->dev, "Load Diagnostic Mode Not Completed: 0x25: 0x%02x, 0x24: 0x%02x\n", read_value, read_value_24);
+		return -EINVAL;
+	}
+
+	dev_info(tas_priv->dev, "Load Diagnostic Mode completed: 0x25: 0x%02x, 0x24: 0x%02x\n", read_value, read_value_24);
+	return 0;
+}
 
 //static int tasdevice_codec_probe(struct snd_soc_component *codec)
 static int tasdevice_codec_probe(struct snd_soc_codec *codec)
@@ -409,11 +482,24 @@ static int tasdevice_codec_probe(struct snd_soc_codec *codec)
 	if(ret){
 		printk(KERN_ERR "Cannot create sysfs file\n");
 		kobject_put(kobj_ref);
-		sysfs_remove_file(kernel_kobj, &tas2563_attr.attr);
+	}
+
+	ret = sysfs_create_file(kobj_ref, &diagnose_attr.attr);
+	if (ret) {
+		printk(KERN_ERR "Cannot create sysfs file for speaker diagnose status. Return value: %d\n", ret);
+		kobject_put(kobj_ref);
 	}
 
 	printk(KERN_INFO "TAS2563 LOAD STATUS SYSFS Module Insert...Done!!!\n");
 
+	ret = tasdevice_load_diagnostic(tas_priv);
+	if (ret < 0) {
+		dev_err(tas_priv->dev, "Failed TAS device load diagnostic. Return value %d\n", ret);
+		dev_err(tas_priv->dev, "Continuing with the driver probe\n");
+	} else {
+		dev_info(tas_priv->dev, "Successfully completed load diagnostic\n");
+	}
+
 	/* Codec Lock Hold */
 	mutex_lock(&tas_priv->codec_lock);
 	tas_priv->codec = codec;
@@ -453,7 +539,7 @@ static int tasdevice_codec_remove(
 		snd_soc_codec_get_drvdata(codec);
 	kobject_put(kobj_ref);
 	sysfs_remove_file(kernel_kobj, &tas2563_attr.attr);
-	
+	sysfs_remove_file(kernel_kobj, &diagnose_attr.attr);
 	/* Codec Lock Hold */
 	mutex_lock(&tas_dev->codec_lock);
 	tasdevice_deinit(tas_dev);
