msm8992 DTS updates, peripheral enablement
cover msm8992 DTS updates, peripheral enablement
This patch series adds support for PMU, PSCI, SPMI and SCM, as well as all six cores on msm8992.
Please note though, that due to the lack of a core cluster interconnect driver, it is only recommended to use one cluster (as in set NR_CPUS to 4) for now. The other two technically work, but in practice slow down the platform by a LOT.
Hopefully with a proper MMCC driver this platform can be brought up to speed with other Qualcomm SoCs.
Konrad Dybcio (14):
arm64: dts: Add a proper CPU map for MSM8992
arm64: dts: msm8992: Place clock nodes in clocks{}
arm64: dts: msm8992: Add a SCM node
firmware: qcom_scm: Add msm8992 compatible
Documentation: Document msm8992 qcom_scm compatible
arm64: dts: msm8992: Add a spmi_bus node
arm64: dts: msm8992: Add BLSP2 UART2 node
arm64: dts: msm8992: Add a BLSP I2C2 node
arm64: dts: msm8992: Add a BLSP I2C6 node
arm64: dts: msm8992: Add PMU node
arm64: dts: msm8992: Add PSCI support.
arm64: dts: qcom: Update msm8992 pin configuration
arm64: dts: qcom: Fix msm8992 SDHCI
arm64: dts: qcom: Add a label to the msm8992 rpm-requests node
.../devicetree/bindings/firmware/qcom,scm.txt | 1 + arch/arm64/boot/dts/qcom/msm8992-pins.dtsi | 149 ++++++++++++---- arch/arm64/boot/dts/qcom/msm8992.dtsi | 167 ++++++++++++++++-- drivers/firmware/qcom_scm.c | 1 + 4 files changed, 275 insertions(+), 43 deletions(-)
Signature · 1 line
2.26.2
PATCH 1/14 arm64: dts: Add a proper CPU map for MSM8992
This commit adds cpu nodes for all 6 cores
present on this SoC and the cpu-map.
--- arch/arm64/boot/dts/qcom/msm8992.dtsi | 68 +++++++++++++++++++++++++++ 1 file changed, 68 insertions(+)
arch/arm64/boot/dts/qcom/msm8992.dtsi +68 -0
@@ -20,11 +20,34 @@ / { cpus { #address-cells = <2>; #size-cells = <0>; + cpu-map { cluster0 { core0 { cpu = <&CPU0>; }; + + core1 { + cpu = <&CPU1>; + }; + + core2 { + cpu = <&CPU2>; + }; + + core3 { + cpu = <&CPU3>; + }; + }; + + cluster1 { + core0 { + cpu = <&CPU4>; + }; + + core1 { + cpu = <&CPU5>; + }; }; };
@@ -33,11 +56,56 @@ CPU0: cpu@0 { compatible = "arm,cortex-a53"; reg = <0x0 0x0>; next-level-cache = <&L2_0>; + enable-method = "psci"; L2_0: l2-cache { compatible = "cache"; cache-level = <2>; }; }; + + CPU1: cpu@1 { + device_type = "cpu"; + compatible = "arm,cortex-a53"; + reg = <0x0 0x1>; + next-level-cache = <&L2_0>; + enable-method = "psci"; + }; + + CPU2: cpu@2 { + device_type = "cpu"; + compatible = "arm,cortex-a53"; + reg = <0x0 0x2>; + next-level-cache = <&L2_0>; + enable-method = "psci"; + }; + + CPU3: cpu@3 { + device_type = "cpu"; + compatible = "arm,cortex-a53"; + reg = <0x0 0x3>; + next-level-cache = <&L2_0>; + enable-method = "psci"; + }; + + CPU4: cpu@100 { + device_type = "cpu"; + compatible = "arm,cortex-a57"; + reg = <0x0 0x100>; + next-level-cache = <&L2_1>; + enable-method = "psci"; + L2_1: l2-cache { + compatible = "cache"; + cache-level = <2>; + }; + }; + + CPU5: cpu@101 { + device_type = "cpu"; + compatible = "arm,cortex-a57"; + reg = <0x0 0x101>; + next-level-cache = <&L2_1>; + enable-method = "psci"; + }; }; timer {
Signature · 1 line
2.26.2
PATCH 2/14 arm64: dts: msm8992: Place clock nodes in clocks{}
In reply to Konrad DybcioThis commits brings no changes
functionality-wise, but aligns the DTS
with the style used in newer ones.
--- arch/arm64/boot/dts/qcom/msm8992.dtsi | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-)
arch/arm64/boot/dts/qcom/msm8992.dtsi +11 -9
@@ -116,16 +116,18 @@ timer { <GIC_PPI 1 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>; }; - xo_board: xo_board { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-frequency = <19200000>; - }; + 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>; + sleep_clk: sleep_clk { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <32768>; + }; }; vreg_vph_pwr: vreg-vph-pwr {
Signature · 1 line
2.26.2
PATCH 3/14 arm64: dts: msm8992: Add a SCM node
In reply to Konrad Dybcio--- arch/arm64/boot/dts/qcom/msm8992.dtsi | 6 ++++++ 1 file changed, 6 insertions(+)
arch/arm64/boot/dts/qcom/msm8992.dtsi +6 -0
@@ -154,6 +154,12 @@ smem { hwlocks = <&sfpb_mutex 3>; }; + firmware { + scm { + compatible = "qcom,scm-msm8992"; + }; + }; + soc { #address-cells = <1>; #size-cells = <1>;
Signature · 1 line
2.26.2
PATCH 4/14 firmware: qcom_scm: Add msm8992 compatible
In reply to Konrad DybcioThis change adds a compatible for msm8992,
which requires no additional clocks for
scm to probe correctly.
--- drivers/firmware/qcom_scm.c | 1 + 1 file changed, 1 insertion(+)
drivers/firmware/qcom_scm.c +1 -0
@@ -1154,6 +1154,7 @@ static const struct of_device_id qcom_scm_dt_match[] = {SCM_HAS_IFACE_CLK | SCM_HAS_BUS_CLK) }, + { .compatible = "qcom,scm-msm8992" }, { .compatible = "qcom,scm-msm8996" }, { .compatible = "qcom,scm" }, {}
Signature · 1 line
2.26.2
Re: [PATCH 04/14] firmware: qcom_scm: Add msm8992 compatible
Quoted 15 lines · Konrad Dybcio
This change adds a compatible for msm8992,
which requires no additional clocks for
scm to probe correctly.Signed-off-by Konrad Dybcio <[email protected]>--- drivers/firmware/qcom_scm.c | 1 + 1 file changed, 1 insertion(+)drivers/firmware/qcom_scm.c +0
-0
drivers/firmware/qcom_scm.c static const struct of_device_id qcom_scm_dt_match[] = { · line 1157
Quoted 4 lines
drivers/firmware/qcom_scm.c +1
-0@@ -1154,6 +1154,7 @@ static const struct of_device_id qcom_scm_dt_match[] = {SCM_HAS_IFACE_CLK | SCM_HAS_BUS_CLK) }, + { .compatible = "qcom,scm-msm8992" },
As this is equivalent to "qcom,scm" use the form:
compatible = "qcom,scm-msm8992", "qcom,scm";
I do however believe you still need to post a patch for the DT binding, to allow the checkers to accept "qcom,scm-msm8992".
Regards,
Bjorn
Quoted 6 lines
drivers/firmware/qcom_scm.c +0
-1{ .compatible = "qcom,scm-msm8996" }, { .compatible = "qcom,scm" }, {} --2.26.2
Re: [PATCH 04/14] firmware: qcom_scm: Add msm8992 compatible
I have in fact submitted a binding patch here: [1]
Perhaps I shouldn't have split it since it's just a one-liner.
[1] https://patchwork.kernel.org/patch/11580841/
Regards
Konrad
PATCH 5/14 Documentation: Document msm8992 qcom_scm compatible
In reply to Konrad Dybcio--- Documentation/devicetree/bindings/firmware/qcom,scm.txt | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/firmware/qcom,scm.txt +1 -0
@@ -15,6 +15,7 @@ Required properties: * "qcom,scm-msm8916" * "qcom,scm-msm8960" * "qcom,scm-msm8974" + * "qcom,scm-msm8992" * "qcom,scm-msm8996" * "qcom,scm-msm8998" * "qcom,scm-sc7180"
Signature · 1 line
2.26.2
Re: [PATCH 05/14] Documentation: Document msm8992 qcom_scm compatible
Quoted 5 lines · Konrad Dybcio
Signed-off-by Konrad Dybcio <[email protected]>--- Documentation/devicetree/bindings/firmware/qcom,scm.txt | 1 + 1 file changed, 1 insertion(+)
PATCH 6/14 arm64: dts: msm8992: Add a spmi_bus node
In reply to Konrad DybcioThis change adds a SPMI bus node so as to
enable PMIC and PMIC peripherals interaction.
--- arch/arm64/boot/dts/qcom/msm8992.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
arch/arm64/boot/dts/qcom/msm8992.dtsi +16 -0
@@ -253,6 +253,22 @@ msmgpio: pinctrl@fd510000 { #interrupt-cells = <2>; }; + spmi_bus: qcom,spmi@fc4c0000 { + compatible = "qcom,spmi-pmic-arb"; + reg = <0xfc4cf000 0x1000>, + <0xfc4cb000 0x1000>, + <0xfc4ca000 0x1000>; + reg-names = "core", "intr", "cnfg"; + interrupt-names = "periph_irq"; + interrupts = <GIC_SPI 190 IRQ_TYPE_LEVEL_HIGH>; + qcom,ee = <0>; + qcom,channel = <0>; + #address-cells = <2>; + #size-cells = <0>; + interrupt-controller; + #interrupt-cells = <4>; + }; + blsp1_uart2: serial@f991e000 { compatible = "qcom,msm-uartdm-v1.4", "qcom,msm-uartdm"; reg = <0xf991e000 0x1000>;
Signature · 1 line
2.26.2
PATCH 7/14 arm64: dts: msm8992: Add BLSP2 UART2 node
In reply to Konrad DybcioThis commit enables the usage of a second
UART interface.
--- arch/arm64/boot/dts/qcom/msm8992.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+)
arch/arm64/boot/dts/qcom/msm8992.dtsi +10 -0
@@ -279,6 +279,16 @@ blsp1_uart2: serial@f991e000 { <&clock_gcc GCC_BLSP1_AHB_CLK>; }; + blsp2_uart2: serial@f995e000 { + compatible = "qcom,msm-uartdm-v1.4", "qcom,msm-uartdm"; + reg = <0xf995e000 0x1000>; + interrupt = <GIC_SPI 146 IRQ_TYPE_LEVEL_LOW>; + status = "disabled"; + clock-names = "core", "iface"; + clocks = <&gcc GCC_BLSP2_UART2_APPS_CLK>, + <&gcc GCC_BLSP2_AHB_CLK>; + }; + clock_gcc: clock-controller@fc400000 { compatible = "qcom,gcc-msm8994"; #clock-cells = <1>;
Signature · 1 line
2.26.2
PATCH 8/14 arm64: dts: msm8992: Add a BLSP I2C2 node
In reply to Konrad DybcioThis commit adds support for the second I2C interface on msm8992 which seems to be used mostly for touchscreen devices.
--- arch/arm64/boot/dts/qcom/msm8992.dtsi | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
arch/arm64/boot/dts/qcom/msm8992.dtsi +15 -0
@@ -333,6 +333,21 @@ sfpb_mutex_regs: syscon@fd484000 { compatible = "syscon"; reg = <0xfd484000 0x400>; }; + + blsp_i2c2: i2c@f9924000 { + compatible = "qcom,i2c-qup-v2.2.1"; + reg = <0xf9924000 0x500>; + interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&gcc GCC_BLSP1_AHB_CLK>, + <&gcc GCC_BLSP1_QUP2_I2C_APPS_CLK>; + clock-names = "iface", "core"; + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&i2c2_default>; + pinctrl-1 = <&i2c2_sleep>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; }; memory {
Signature · 1 line
2.26.2
PATCH 9/14 arm64: dts: msm8992: Add a BLSP I2C6 node
In reply to Konrad DybcioThis commit adds support for the sixth I2C interface on msm8992.
--- arch/arm64/boot/dts/qcom/msm8992.dtsi | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
arch/arm64/boot/dts/qcom/msm8992.dtsi +15 -0
@@ -348,6 +348,21 @@ blsp_i2c2: i2c@f9924000 { #size-cells = <0>; status = "disabled"; }; + + blsp_i2c6: i2c@f9928000 { + compatible = "qcom,i2c-qup-v2.2.1"; + reg = <0xf9928000 0x500>; + interrupts = <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&gcc GCC_BLSP1_AHB_CLK>, + <&gcc GCC_BLSP1_QUP6_I2C_APPS_CLK>; + clock-names = "iface", "core"; + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&i2c6_default>; + pinctrl-1 = <&i2c6_sleep>; + #address-cells = <1>; + #size-cells = <0>; + status = "ok"; + }; }; memory {
Signature · 1 line
2.26.2
PATCH 10/14 arm64: dts: msm8992: Add PMU node
In reply to Konrad DybcioAdd the PMU so we can get proper perf event support on this SoC.
--- arch/arm64/boot/dts/qcom/msm8992.dtsi | 5 +++++ 1 file changed, 5 insertions(+)
arch/arm64/boot/dts/qcom/msm8992.dtsi +5 -0
@@ -381,6 +381,11 @@ smem_region: smem@6a00000 { }; }; + pmu { + compatible = "arm,cortex-a53-pmu"; + interrupts = <GIC_PPI 7 (GIC_CPU_MASK_SIMPLE(4)| IRQ_TYPE_LEVEL_HIGH)>; + }; + smd_rpm: smd { compatible = "qcom,smd"; rpm {
Signature · 1 line
2.26.2
PATCH 11/14 arm64: dts: msm8992: Add PSCI support.
In reply to Konrad DybcioThis SoC's firmware does not fully support the PSCI spec, but it's good enough to bring the cores up.
--- arch/arm64/boot/dts/qcom/msm8992.dtsi | 5 +++++ 1 file changed, 5 insertions(+)
arch/arm64/boot/dts/qcom/msm8992.dtsi +5 -0
@@ -386,6 +386,11 @@ pmu { interrupts = <GIC_PPI 7 (GIC_CPU_MASK_SIMPLE(4)| IRQ_TYPE_LEVEL_HIGH)>; }; + psci { + compatible = "arm,psci-0.2"; + method = "hvc"; + }; + smd_rpm: smd { compatible = "qcom,smd"; rpm {
Signature · 1 line
2.26.2
PATCH 12/14 arm64: dts: qcom: Update msm8992 pin configuration
In reply to Konrad DybcioAdd support for i2c2 and i2c6 interfaces, wrap up
SDC pins into pmx_sdc groups (following msm8916).
--- arch/arm64/boot/dts/qcom/msm8992-pins.dtsi | 149 ++++++++++++++++----- 1 file changed, 118 insertions(+), 31 deletions(-)
arch/arm64/boot/dts/qcom/msm8992-pins.dtsi +118 -31
@@ -32,59 +32,146 @@ pinconf { /* Order of pins */ /* SDC1: CLK -> 0, CMD -> 1, DATA -> 2, RCLK -> 3 */ /* SDC2: CLK -> 4, CMD -> 5, DATA -> 6 */ - sdc1_clk_on: clk-on { - pinconf { - pins = "sdc1_clk"; - bias-disable = <0>; /* No pull */ - drive-strength = <16>; /* 16mA */ + + pmx_sdc1_clk { + sdc1_clk_on: clk-on { + pinmux { + pins = "sdc1_clk"; + }; + pinconf { + pins = "sdc1_clk"; + bias-disable; /* No pull */ + drive-strength = <6>; + }; + }; + + sdc1_clk_off: clk-off { + pinmux { + pins = "sdc1_clk"; + }; + pinconf { + pins = "sdc1_clk"; + bias-disable; /* No pull */ + drive-strength = <2>; + }; }; }; - sdc1_clk_off: clk-off { - pinconf { - pins = "sdc1_clk"; - bias-disable = <0>; /* No pull */ - drive-strength = <2>; /* 2mA */ + pmx_sdc1_cmd { + sdc1_cmd_on: cmd-on { + pinmux { + pins = "sdc1_cmd"; + }; + pinconf { + pins = "sdc1_cmd"; + bias-pull-up; + drive-strength = <6>; + }; + }; + + sdc1_cmd_off: cmd-off { + pinmux { + pins = "sdc1_cmd"; + }; + pinconf { + pins = "sdc1_cmd"; + bias-pull-up; + drive-strength = <2>; + }; }; }; - sdc1_cmd_on: cmd-on { - pinconf { - pins = "sdc1_cmd"; - bias-pull-up; - drive-strength = <8>; + pmx_sdc1_data { + sdc1_data_on: data-on { + pinmux { + pins = "sdc1_data"; + }; + pinconf { + pins = "sdc1_data"; + bias-pull-up; + drive-strength = <6>; + }; + }; + + sdc1_data_off: data-off { + pinmux { + pins = "sdc1_data"; + }; + pinconf { + pins = "sdc1_data"; + bias-pull-up; + drive-strength = <2>; + }; }; }; - sdc1_cmd_off: cmd-off { - pinconf { - pins = "sdc1_cmd"; - bias-pull-up = <0x3>; /* same as 3.10 ?? */ - drive-strength = <2>; /* 2mA */ + pmx_sdc1_rclk { + sdc1_rclk_on: rclk-on { + pinmux { + pins = "sdc1_rclk"; + }; + pinconf { + pins = "sdc1_rclk"; + bias-pull-down; /* pull down */ + }; + }; + + sdc1_rclk_off: rclk-off { + pinmux { + pins = "sdc1_rclk"; + }; + pinconf { + pins = "sdc1_rclk"; + bias-pull-down; /* pull down */ + }; }; }; - sdc1_data_on: data-on { + i2c2_default: i2c2_default { + pinmux { + function = "blsp_i2c2"; + pins = "gpio6", "gpio7"; + }; pinconf { - pins = "sdc1_data"; - bias-pull-up; - drive-strength = <8>; /* 8mA */ + pins = "gpio6", "gpio7"; + drive-strength = <2>; + bias-disable; }; }; - sdc1_data_off: data-off { + i2c2_sleep: i2c2_sleep { + pinmux { + function = "gpio"; + pins = "gpio6", "gpio7"; + }; pinconf { - pins = "sdc1_data"; - bias-pull-up; + pins = "gpio6", "gpio7"; drive-strength = <2>; + bias-disable; }; }; - sdc1_rclk_on: rclk-on { - bias-pull-down; /* pull down */ + i2c6_default: i2c6_default { + pinmux { + function = "blsp_i2c6"; + pins = "gpio28", "gpio27"; + }; + pinconf { + pins = "gpio28", "gpio27"; + drive-strength = <2>; + bias-disable; + }; }; - sdc1_rclk_off: rclk-off { - bias-pull-down; /* pull down */ + i2c6_sleep: i2c6_sleep { + pinmux { + function = "gpio"; + pins = "gpio28", "gpio27"; + }; + pinconf { + pins = "gpio28", "gpio27"; + drive-strength = <2>; + bias-disable; + }; }; };
Signature · 1 line
2.26.2
PATCH 13/14 arm64: dts: qcom: Fix msm8992 SDHCI
In reply to Konrad DybcioThis commit adds correct IRQ settings and adds
the non-removable property to the msm8992 sdhci
node.
--- arch/arm64/boot/dts/qcom/msm8992.dtsi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/qcom/msm8992.dtsi +3 -2
@@ -302,8 +302,8 @@ sdhci1: mmc@f9824900 { reg = <0xf9824900 0x1a0>, <0xf9824000 0x800>; reg-names = "hc_mem", "core_mem"; - interrupts = <GIC_SPI 123 IRQ_TYPE_NONE>, - <GIC_SPI 138 IRQ_TYPE_NONE>; + interrupts = <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>; interrupt-names = "hc_irq", "pwr_irq"; clocks = <&clock_gcc GCC_SDCC1_APPS_CLK>,
@@ -319,6 +319,7 @@ sdhci1: mmc@f9824900 { regulator-always-on; bus-width = <8>; mmc-hs400-1_8v; + non-removable; status = "okay"; };
Signature · 1 line
2.26.2
PATCH 14/14 arm64: dts: qcom: Add a label to the msm8992 rpm-requests node
In reply to Konrad DybcioThis enables the node to be referenced in other device trees.
--- arch/arm64/boot/dts/qcom/msm8992.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/msm8992.dtsi +1 -1
@@ -401,7 +401,7 @@ rpm { qcom,local-pid = <0>; qcom,remote-pid = <6>; - rpm-requests { + rpm_requests: rpm-requests { compatible = "qcom,rpm-msm8994"; qcom,smd-channels = "rpm_requests";
Signature · 1 line
2.26.2