Hi,
I connected a Sigfox module by UART to the blsp_uart12 GPIOs (85 & 86). My kernel version is linaro-qcomlt-4.14.
The blsp_uart12 isn’t initialized in the device tree, so I added these lines (patch):
diff --git a/arch/arm64/boot/dts/qcom/apq8096-db820c.dtsi b/arch/arm64/boot/dts/qcom/apq8096-db820c.dtsi
index 5020191d9edf..c85ee440053a 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 = &blsp2_uart5;
i2c0 = &blsp1_i2c2;
i2c1 = &blsp2_i2c1;
i2c2 = &blsp2_i2c0;
@@ -87,6 +88,15 @@
pinctrl-1 = <&blsp2_uart1_2pins_sleep>;
};
+ serial@75b4000 {
+ label = "LS-UART0";
+ status = "okay";
+ pinctrl-names = "default", "sleep";
+ pinctrl-0 = <&blsp2_uart5_2pins_default>;
+ pinctrl-1 = <&blsp2_uart5_2pins_sleep>;
+ };
+
+
// serial@75b1000 {
// label = "LS-UART0";
// status = "okay";
diff --git a/arch/arm64/boot/dts/qcom/msm8996-pins.dtsi b/arch/arm64/boot/dts/qcom/msm8996-pins.dtsi
index ff862c8c828f..6e69c518c8e5 100644
--- a/arch/arm64/boot/dts/qcom/msm8996-pins.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8996-pins.dtsi
@@ -215,6 +215,31 @@
};
};
+ //add uart
+ blsp2_uart5_2pins_default: blsp2_uart5_2pins {
+ pinmux {
+ function = "blsp_uart12";
+ pins = "gpio85", "gpio86";
+ };
+ pinconf {
+ pins = "gpio85", "gpio86";
+ drive-strength = <16>;
+ bias-disable;
+ };
+ };
+
+ blsp2_uart5_2pins_sleep: blsp2_uart5_2pins_sleep {
+ pinmux {
+ function = "gpio";
+ pins = "gpio85", "gpio86";
+ };
+ pinconf {
+ pins = "gpio85", "gpio86";
+ drive-strength = <2>;
+ bias-disable;
+ };
+ };
+
blsp2_i2c1_default: blsp2_i2c1 {
pinmux {
function = "blsp_i2c8";
diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi b/arch/arm64/boot/dts/qcom/msm8996.dtsi
index 39f69190eaa5..69564a389420 100644
--- a/arch/arm64/boot/dts/qcom/msm8996.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi
@@ -700,6 +700,15 @@
clock-names = "core", "iface";
status = "disabled";>
};
+ blsp2_uart5: serial@75b4000 {
+ compatible = "qcom,msm-uartdm-v1.4", "qcom,msm-uartdm";
+ reg = <0x075b4000 0x1000>;
+ interrupts = <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&gcc gcc_BLSP2_UART6_APPS_CLK>,
+ <&gcc gcc_BLSP2_AHB_CLK>;
+ clock-names = "core", "iface";
+ status = "okay";
+ };
blsp1_spi0: spi@07575000 {
compatible = "qcom,spi-qup-v2.2.1";
--
2.20.1
The device is booting, and in /sys/devices/platform/soc the UART seems to be well created. But the device is not detected by the driver…
sh-5.0# cat 75b4000.serial/uevent
OF_NAME=serial
OF_FULLNAME=/soc/serial@75b4000
OF_COMPATIBLE_0=qcom,msm-uartdm-v1.4
OF_COMPATIBLE_1=qcom,msm-uartdm
OF_COMPATIBLE_N=2
OF_ALIAS_0=serial3
MODALIAS=of:NserialT<NULL>Cqcom,msm-uartdm-v1.4Cqcom,msm-uartdm
Any ideas on this ? (Hardware connections are good).
Thanks