I configured BLSP1 as UART and I can’t get the system to boot. Kernel version is qcomlt-4.14. I’m attaching kernel output and patch:
diff --git a/arch/arm64/boot/dts/qcom/apq8096-db820c.dtsi b/arch/arm64/boot/dts/qcom/apq8096-db820c.dtsi
index 25849a17fbe6..2564b14d4365 100644
--- a/arch/arm64/boot/dts/qcom/apq8096-db820c.dtsi
+++ b/arch/arm64/boot/dts/qcom/apq8096-db820c.dtsi
@@ -25,6 +25,7 @@
serial0 = &blsp2_uart1;
serial1 = &blsp2_uart2;
serial2 = &blsp1_uart1;
+ serial3 = &blsp1_uart0;
i2c0 = &blsp1_i2c2;
i2c1 = &blsp2_i2c1;
i2c2 = &blsp2_i2c0;
@@ -106,10 +107,18 @@
status = "okay";
};
+ serial@756f000 {
+ label = "LS-UART2";
+ status = "okay";
+ pinctrl-names = "default", "sleep";
+ pinctrl-0 = <&blsp1_uart0_default>;
+ pinctrl-1 = <&blsp1_uart0_sleep>;
+ };
+
spi@07575000 {
/* On Low speed expansion */
label = "LS-SPI0";
- status = "okay";
+ status = "disabled";
};
i2c@075b5000 {
diff --git a/arch/arm64/boot/dts/qcom/msm8996-pins.dtsi b/arch/arm64/boot/dts/qcom/msm8996-pins.dtsi
index 1759e552e3eb..343ee0b9ae00 100644
--- a/arch/arm64/boot/dts/qcom/msm8996-pins.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8996-pins.dtsi
@@ -93,6 +93,30 @@
};
};
+ blsp1_uart0_default: blsp1_uart0 {
+ pinmux {
+ function = "blsp_uart1";
+ pins = "gpio0", "gpio1";
+ };
+ pinconf {
+ pins = "gpio0", "gpio1";
+ drive-strength = <16>;
+ bias-disable;
+ };
+ };
+
+ blsp1_uart0_sleep: blsp1_uart0_sleep {
+ pinmux {
+ function = "gpio";
+ pins = "gpio0", "gpio1";
+ };
+ pinconf {
+ pins = "gpio0", "gpio1";
+ drive-strength = <2>;
+ bias-disable;
+ };
+ };
+
blsp1_i2c2_default: blsp1_i2c2_default {
pinmux {
function = "blsp_i2c3";
diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi b/arch/arm64/boot/dts/qcom/msm8996.dtsi
index 6dfd248a270e..2a4c852b0cda 100644
--- a/arch/arm64/boot/dts/qcom/msm8996.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi
@@ -716,6 +716,16 @@
status = "disabled";
};
+ blsp1_uart0: serial@756f000 {
+ compatible = "qcom,msm-uartdm-v1.4", "qcom,msm-uartdm";
+ reg = <0x0756f000 0x1000>;
+ interrupts = <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&gcc gcc_BLSP1_UART1_APPS_CLK>,
+ <&gcc gcc_BLSP1_AHB_CLK>;
+ clock-names = "core", "iface";
+ status = "disabled";
+ };
+
blsp2_i2c0: i2c@075b5000 {
compatible = "qcom,i2c-qup-v2.2.1";
reg = <0x075b5000 0x1000>;
diff --git a/drivers/tty/serial/msm_serial.c b/drivers/tty/serial/msm_serial.c
index 1db79ee8a886..1db20b1c48be 100644
--- a/drivers/tty/serial/msm_serial.c
+++ b/drivers/tty/serial/msm_serial.c
@@ -1560,6 +1560,15 @@ static struct msm_port msm_uart_ports[] = {
.line = 2,
},
},
+ {
+ .uart = {
+ .iotype = UPIO_MEM,
+ .ops = &msm_uart_pops,
+ .flags = UPF_BOOT_AUTOCONF,
+ .fifosize = 64,
+ .line = 3,
+ },
+ },
};
#define UART_NR ARRAY_SIZE(msm_uart_ports)
I have no idea what am I doing wrong. I tried different versions of BSPs and different uSOMs, but the end result is the same. Actually no BLSP works with UART for me, but if I configure BLSP1 as SPI then it boots (so it’s not a TrustZone issue). I also put the uSoM on the development kit board, turned on the neccessary switches on dev board (S10 FORCE USB BOOT on 1 and S1 USB1 MODE SEL on 1) and ran
sudo ./qdl prog_emmc_firehose_8996_ddr.elf rawprogram-820.xml patch.xml
but it did not work.
Does anybody have any advice what should I check and where to look/debug?