From 806c765ee9da58ca0ade34345f1b114dc0be97fd Mon Sep 17 00:00:00 2001 From: "Ivan T. Ivanov" Date: Fri, 18 Sep 2015 16:18:53 +0300 Subject: [PATCH 01/10] arm64: dts: qcom: 8x16: UART1 add CTS_N, RTS_N pin configurations Add devicetree bindings for UART1 CTS_N and RTS_N pins. Signed-off-by: Ivan T. Ivanov Signed-off-by: Andy Gross --- arch/arm64/boot/dts/qcom/msm8916-pins.dtsi | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/msm8916-pins.dtsi b/arch/arm64/boot/dts/qcom/msm8916-pins.dtsi index 49ec55a37614..d656e892fd52 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-pins.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916-pins.dtsi @@ -16,10 +16,13 @@ &msmgpio { blsp1_uart1_default: blsp1_uart1_default { pinmux { function = "blsp_uart1"; - pins = "gpio0", "gpio1"; + // TX, RX, CTS_N, RTS_N + pins = "gpio0", "gpio1", + "gpio2", "gpio3"; }; pinconf { - pins = "gpio0", "gpio1"; + pins = "gpio0", "gpio1", + "gpio2", "gpio3"; drive-strength = <16>; bias-disable; }; @@ -28,10 +31,12 @@ pinconf { blsp1_uart1_sleep: blsp1_uart1_sleep { pinmux { function = "gpio"; - pins = "gpio0", "gpio1"; + pins = "gpio0", "gpio1", + "gpio2", "gpio3"; }; pinconf { - pins = "gpio0", "gpio1"; + pins = "gpio0", "gpio1", + "gpio2", "gpio3"; drive-strength = <2>; bias-pull-down; }; From d66dd9e08fc7f3220d61ce4992f2db00b2f701af Mon Sep 17 00:00:00 2001 From: "Ivan T. Ivanov" Date: Fri, 18 Sep 2015 16:18:54 +0300 Subject: [PATCH 02/10] arm64: dts: qcom: 8x16: UART1 and UART2 use DMA for RX and TX Add DMA channels definitions for UART1 and UART2 controllers. Signed-off-by: Ivan T. Ivanov Signed-off-by: Andy Gross --- arch/arm64/boot/dts/qcom/msm8916.dtsi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi index 8d184ff19642..82881948aaeb 100644 --- a/arch/arm64/boot/dts/qcom/msm8916.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi @@ -109,6 +109,8 @@ blsp1_uart1: serial@78af000 { interrupts = ; clocks = <&gcc GCC_BLSP1_UART1_APPS_CLK>, <&gcc GCC_BLSP1_AHB_CLK>; clock-names = "core", "iface"; + dmas = <&blsp_dma 1>, <&blsp_dma 0>; + dma-names = "rx", "tx"; status = "disabled"; }; @@ -118,6 +120,8 @@ blsp1_uart2: serial@78b0000 { interrupts = ; clocks = <&gcc GCC_BLSP1_UART2_APPS_CLK>, <&gcc GCC_BLSP1_AHB_CLK>; clock-names = "core", "iface"; + dmas = <&blsp_dma 3>, <&blsp_dma 2>; + dma-names = "rx", "tx"; status = "disabled"; }; From 503b01ec9b5f829c583e14dc5d8c5fda6ac8d915 Mon Sep 17 00:00:00 2001 From: Stephen Boyd Date: Fri, 20 Nov 2015 15:31:17 -0800 Subject: [PATCH 03/10] arm64: dts: qcom: Make msm8916-mtp compatible string compliant This compatible string isn't compliant with the format for subtypes. Replace it with a compliant compatible type. Signed-off-by: Stephen Boyd Signed-off-by: Andy Gross --- arch/arm64/boot/dts/qcom/msm8916-mtp.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom/msm8916-mtp.dts b/arch/arm64/boot/dts/qcom/msm8916-mtp.dts index fced77f0fd3a..b0a064d3806b 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-mtp.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-mtp.dts @@ -17,6 +17,6 @@ / { model = "Qualcomm Technologies, Inc. MSM 8916 MTP"; - compatible = "qcom,msm8916-mtp", "qcom,msm8916-mtp-smb1360", + compatible = "qcom,msm8916-mtp", "qcom,msm8916-mtp/1", "qcom,msm8916", "qcom,mtp"; }; From 2bce84c1a0c3ff04d29e6ef02823074588e90aa1 Mon Sep 17 00:00:00 2001 From: Stephen Boyd Date: Fri, 20 Nov 2015 15:31:19 -0800 Subject: [PATCH 04/10] arm64: dts: qcom: Alias pm8916 on msm8916 devices Add an alias for pm8916 on msm8916 based SoCs so that the newly updated dtbTool can find the pmic compatible string and add the pmic-id element to the QCDT header. Signed-off-by: Stephen Boyd Signed-off-by: Andy Gross --- arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi | 1 + arch/arm64/boot/dts/qcom/msm8916-mtp.dtsi | 1 + arch/arm64/boot/dts/qcom/pm8916.dtsi | 6 +++--- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi b/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi index 6b8abbe68746..46bfcb9b2e84 100644 --- a/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi +++ b/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi @@ -20,6 +20,7 @@ / { aliases { serial0 = &blsp1_uart2; serial1 = &blsp1_uart1; + usid0 = &pm8916_0; }; chosen { diff --git a/arch/arm64/boot/dts/qcom/msm8916-mtp.dtsi b/arch/arm64/boot/dts/qcom/msm8916-mtp.dtsi index a1aa0b201e92..ceeb8a6feed6 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-mtp.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916-mtp.dtsi @@ -17,6 +17,7 @@ / { aliases { serial0 = &blsp1_uart2; + usid0 = &pm8916_0; }; chosen { diff --git a/arch/arm64/boot/dts/qcom/pm8916.dtsi b/arch/arm64/boot/dts/qcom/pm8916.dtsi index b222ece7e3d2..37432451ee4c 100644 --- a/arch/arm64/boot/dts/qcom/pm8916.dtsi +++ b/arch/arm64/boot/dts/qcom/pm8916.dtsi @@ -4,8 +4,8 @@ &spmi_bus { - usid0: pm8916@0 { - compatible = "qcom,spmi-pmic"; + pm8916_0: pm8916@0 { + compatible = "qcom,pm8916", "qcom,spmi-pmic"; reg = <0x0 SPMI_USID>; #address-cells = <1>; #size-cells = <0>; @@ -90,7 +90,7 @@ ref_vdd { }; }; - usid1: pm8916@1 { + pm8916_1: pm8916@1 { compatible = "qcom,spmi-pmic"; reg = <0x1 SPMI_USID>; #address-cells = <1>; From f4fb6aeafaaa1c795f4ada9388051295830460c7 Mon Sep 17 00:00:00 2001 From: Georgi Djakov Date: Thu, 3 Dec 2015 16:02:52 +0200 Subject: [PATCH 05/10] arm64: dts: qcom: msm8916: Add fixed rate on-board oscillators Currently the rates of the xo and sleep clocks are hard-coded in the GCC driver, but this is a board layout description that actually should be in the DT. Moving them into DT also allows us to insert the RPM controlled clocks between the DT and GCC clocks. Signed-off-by: Georgi Djakov Signed-off-by: Andy Gross --- arch/arm64/boot/dts/qcom/msm8916.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi index 82881948aaeb..f9844097640d 100644 --- a/arch/arm64/boot/dts/qcom/msm8916.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi @@ -74,6 +74,20 @@ timer { ; }; + clocks { + xo_board: xo_board { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <19200000>; + }; + + sleep_clk: sleep_clk { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <32768>; + }; + }; + soc: soc { #address-cells = <1>; #size-cells = <1>; From b98e6c76586e92c407cd543f5a9b4efe802117d7 Mon Sep 17 00:00:00 2001 From: Srinivas Kandagatla Date: Fri, 11 Dec 2015 18:12:50 +0000 Subject: [PATCH 06/10] arm64: dts: fix the i2c aliasing to match to schematics. This patch fixes the i2c bus number aliasing so that it matches with the schematics bus naming. Without this patch the user might would get bus numbers depending on the order the devices are probed. Signed-off-by: Srinivas Kandagatla Signed-off-by: Andy Gross --- arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi b/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi index 46bfcb9b2e84..0f775d7bba6d 100644 --- a/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi +++ b/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi @@ -21,6 +21,9 @@ aliases { serial0 = &blsp1_uart2; serial1 = &blsp1_uart1; usid0 = &pm8916_0; + i2c0 = &blsp_i2c2; + i2c1 = &blsp_i2c6; + i2c3 = &blsp_i2c4; }; chosen { From c240f29e75e686baa5b5ddc801e70022dd6bf358 Mon Sep 17 00:00:00 2001 From: Srinivas Kandagatla Date: Fri, 11 Dec 2015 18:13:12 +0000 Subject: [PATCH 07/10] arm64: dts: set the default i2c pin drive strength to 16mA 2mA drive strength is not enough when we connect multiple i2c devices on the bus with different pull up resistors. This issue was detected when multiple i2c devices connected on the other side of level shifters on Linaro sensor board. Maxing up to 16mA made i2c much stable. Signed-off-by: Srinivas Kandagatla Signed-off-by: Andy Gross --- arch/arm64/boot/dts/qcom/msm8916-pins.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/msm8916-pins.dtsi b/arch/arm64/boot/dts/qcom/msm8916-pins.dtsi index d656e892fd52..955c6f174d4c 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-pins.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916-pins.dtsi @@ -277,7 +277,7 @@ pinmux { }; pinconf { pins = "gpio6", "gpio7"; - drive-strength = <2>; + drive-strength = <16>; bias-disable = <0>; }; }; @@ -301,7 +301,7 @@ pinmux { }; pinconf { pins = "gpio14", "gpio15"; - drive-strength = <2>; + drive-strength = <16>; bias-disable = <0>; }; }; @@ -325,7 +325,7 @@ pinmux { }; pinconf { pins = "gpio22", "gpio23"; - drive-strength = <2>; + drive-strength = <16>; bias-disable = <0>; }; }; From a0ece65777c35bf1e69fafbbf2be9566eca070c1 Mon Sep 17 00:00:00 2001 From: Andy Gross Date: Thu, 24 Sep 2015 14:18:52 -0500 Subject: [PATCH 08/10] arm64: dts: qcom: Add MSM8916 SMEM nodes This patch adds the nodes necessary to support the SMEM driver on MSM8916 platforms. Signed-off-by: Andy Gross Acked-by: Bjorn Andersson --- arch/arm64/boot/dts/qcom/msm8916.dtsi | 41 +++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi index f9844097640d..058e3551d581 100644 --- a/arch/arm64/boot/dts/qcom/msm8916.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi @@ -37,6 +37,22 @@ memory { reg = <0 0 0 0>; }; + reserved-memory { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + reserve_aligned@86000000 { + reg = <0x0 0x86000000 0x0 0x0300000>; + no-map; + }; + + smem_mem: smem_region@86300000 { + reg = <0x0 0x86300000 0x0 0x0100000>; + no-map; + }; + }; + cpus { #address-cells = <1>; #size-cells = <0>; @@ -88,6 +104,15 @@ sleep_clk: sleep_clk { }; }; + smem { + compatible = "qcom,smem"; + + memory-region = <&smem_mem>; + qcom,rpm-msg-ram = <&rpm_msg_ram>; + + hwlocks = <&tcsr_mutex 3>; + }; + soc: soc { #address-cells = <1>; #size-cells = <1>; @@ -117,6 +142,22 @@ gcc: qcom,gcc@1800000 { reg = <0x1800000 0x80000>; }; + tcsr_mutex_regs: syscon@1905000 { + compatible = "syscon"; + reg = <0x1905000 0x20000>; + }; + + tcsr_mutex: hwlock { + compatible = "qcom,tcsr-mutex"; + syscon = <&tcsr_mutex_regs 0 0x1000>; + #hwlock-cells = <1>; + }; + + rpm_msg_ram: memory@60000 { + compatible = "qcom,rpm-msg-ram"; + reg = <0x60000 0x8000>; + }; + blsp1_uart1: serial@78af000 { compatible = "qcom,msm-uartdm-v1.4", "qcom,msm-uartdm"; reg = <0x78af000 0x200>; From 8fd55d41cabb2db4adf659316456d014a8c3e77f Mon Sep 17 00:00:00 2001 From: Andy Gross Date: Thu, 24 Sep 2015 14:18:53 -0500 Subject: [PATCH 09/10] arm64: dts: qcom: Add RPM/SMD support on MSM8916 Add support for the SMD and RPM devices found on MSM8916 platforms. Signed-off-by: Andy Gross Acked-by: Bjorn Andersson --- arch/arm64/boot/dts/qcom/msm8916.dtsi | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi index 058e3551d581..fc6e8d60b736 100644 --- a/arch/arm64/boot/dts/qcom/msm8916.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi @@ -169,6 +169,11 @@ blsp1_uart1: serial@78af000 { status = "disabled"; }; + apcs: syscon@b011000 { + compatible = "syscon"; + reg = <0x0b011000 0x1000>; + }; + blsp1_uart2: serial@78b0000 { compatible = "qcom,msm-uartdm-v1.4", "qcom,msm-uartdm"; reg = <0x78b0000 0x200>; @@ -497,6 +502,21 @@ rng@22000 { clock-names = "core"; }; }; + + smd { + compatible = "qcom,smd"; + + rpm { + interrupts = ; + qcom,ipc = <&apcs 8 0>; + qcom,smd-edge = <15>; + + rpm_requests { + compatible = "qcom,rpm-msm8916"; + qcom,smd-channels = "rpm_requests"; + }; + }; + }; }; #include "msm8916-pins.dtsi" From 9e1dfb858de43bb3dfbbb32cec57433e9b250dee Mon Sep 17 00:00:00 2001 From: Andy Gross Date: Thu, 24 Sep 2015 14:18:54 -0500 Subject: [PATCH 10/10] arm64: dts: Add PM8916 support on MSM8916 This patch adds the PM8916 regulator nodes found on MSM8916 platforms. Signed-off-by: Andy Gross Acked-by: Bjorn Andersson --- arch/arm64/boot/dts/qcom/msm8916.dtsi | 28 +++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi index fc6e8d60b736..915321479998 100644 --- a/arch/arm64/boot/dts/qcom/msm8916.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi @@ -514,6 +514,34 @@ rpm { rpm_requests { compatible = "qcom,rpm-msm8916"; qcom,smd-channels = "rpm_requests"; + + pm8916-regulators { + compatible = "qcom,rpm-pm8916-regulators"; + + pm8916_s1: s1 {}; + pm8916_s2: s2 {}; + pm8916_s3: s3 {}; + pm8916_s4: s4 {}; + + pm8916_l1: l1 {}; + pm8916_l2: l2 {}; + pm8916_l3: l3 {}; + pm8916_l4: l4 {}; + pm8916_l5: l5 {}; + pm8916_l6: l6 {}; + pm8916_l7: l7 {}; + pm8916_l8: l8 {}; + pm8916_l9: l9 {}; + pm8916_l10: l10 {}; + pm8916_l11: l11 {}; + pm8916_l12: l12 {}; + pm8916_l13: l13 {}; + pm8916_l14: l14 {}; + pm8916_l15: l15 {}; + pm8916_l16: l16 {}; + pm8916_l17: l17 {}; + pm8916_l18: l18 {}; + }; }; }; };