From 4fca27d597f2dc188f79937cbf2150d41847d948 Mon Sep 17 00:00:00 2001 From: Tengfei Fan Date: Mon, 19 Sep 2022 13:35:51 +0800 Subject: [PATCH] ARM: dts: msm: Add initial support for kalama+sdxpinn Add initial device tree support for kalama+sdxpinn CDP and MTP platforms. Change-Id: If4481cce7cc7a2c10d8141a91223ba7024f48c37 --- bindings/arm/msm/mdm-modem.txt | 4 +- qcom/Makefile | 4 +- qcom/kalama-pinctrl.dtsi | 68 ++++++++++++++++++++++++++++++++ qcom/kalama-pinn-cdp-overlay.dts | 13 ++++++ qcom/kalama-pinn-mtp-overlay.dts | 13 ++++++ qcom/kalama-pinn.dtsi | 8 ++++ qcom/sdxpinn-external-soc.dtsi | 51 ++++++++++++++++++++++++ 7 files changed, 158 insertions(+), 3 deletions(-) create mode 100644 qcom/kalama-pinn-cdp-overlay.dts create mode 100644 qcom/kalama-pinn-mtp-overlay.dts create mode 100644 qcom/kalama-pinn.dtsi create mode 100644 qcom/sdxpinn-external-soc.dtsi diff --git a/bindings/arm/msm/mdm-modem.txt b/bindings/arm/msm/mdm-modem.txt index 39bd7b67..1aa9fdcf 100644 --- a/bindings/arm/msm/mdm-modem.txt +++ b/bindings/arm/msm/mdm-modem.txt @@ -6,7 +6,7 @@ to be reset. Required Properties: - compatible: The bus devices need to be compatible with "qcom,ext-mdm9x55", "qcom,ext-sdx50m", - "qcom,ext-sdx55m", "qcom,ext-lemur". + "qcom,ext-sdx55m", "qcom,ext-lemur", "qcom,ext-pinn". Required named gpio properties: - qcom,mdm2ap-errfatal-gpio: gpio for the external modem to indicate to the apps processor @@ -161,4 +161,4 @@ Example: qcom,vddmin-drive-strength = <8>; qcom,ssctl-instance-id = <10>; qcom,sysmon-id = <20>; - }; \ No newline at end of file + }; diff --git a/qcom/Makefile b/qcom/Makefile index 5927bf17..7883573d 100644 --- a/qcom/Makefile +++ b/qcom/Makefile @@ -61,7 +61,9 @@ KALAMA_BOARDS += \ kalamap-sg-hhg-overlay.dtbo NOAPQ_KALAMA_BOARDS += \ - kalama-rumi-overlay.dtbo + kalama-rumi-overlay.dtbo \ + kalama-pinn-cdp-overlay.dtbo \ + kalama-pinn-mtp-overlay.dtbo kalama-dtb-$(CONFIG_ARCH_KALAMA) += \ $(call add-overlays, $(KALAMA_BOARDS) $(NOAPQ_KALAMA_BOARDS),$(KALAMA_BASE_DTB))\ diff --git a/qcom/kalama-pinctrl.dtsi b/qcom/kalama-pinctrl.dtsi index 193ca0ea..61d990b0 100644 --- a/qcom/kalama-pinctrl.dtsi +++ b/qcom/kalama-pinctrl.dtsi @@ -3366,4 +3366,72 @@ }; }; + ap2mdm { + ap2mdm_active: ap2mdm_active { + mux { + /* ap2mdm-status + * ap2mdm-errfatal + */ + pins = "gpio29", "gpio30"; + function = "gpio"; + }; + + config { + pins = "gpio29", "gpio30"; + drive-strength = <16>; + bias-disable; + }; + }; + + ap2mdm_sleep: ap2mdm_sleep { + mux { + /* ap2mdm-status + * ap2mdm-errfatal + */ + pins = "gpio29", "gpio30"; + function = "gpio"; + }; + + config { + pins = "gpio29", "gpio30"; + drive-strength = <8>; + bias-disable; + }; + }; + }; + + mdm2ap { + mdm2ap_active: mdm2ap_active { + mux { + /* mdm2ap-status + * mdm2ap-errfatal + */ + pins = "gpio28", "gpio31"; + function = "gpio"; + }; + + config { + pins = "gpio28", "gpio31"; + drive-strength = <16>; + bias-disable; + }; + }; + + mdm2ap_sleep: mdm2ap_sleep { + mux { + /* mdm2ap-status + * mdm2ap-errfatal + */ + pins = "gpio28", "gpio31"; + function = "gpio"; + }; + + config { + pins = "gpio28", "gpio31"; + drive-strength = <8>; + bias-disable; + }; + }; + }; + }; diff --git a/qcom/kalama-pinn-cdp-overlay.dts b/qcom/kalama-pinn-cdp-overlay.dts new file mode 100644 index 00000000..87b47b02 --- /dev/null +++ b/qcom/kalama-pinn-cdp-overlay.dts @@ -0,0 +1,13 @@ +/dts-v1/; +/plugin/; + +#include "kalama-cdp.dtsi" +#include "sdxpinn-external-soc.dtsi" +#include "kalama-pinn.dtsi" + +/ { + model = "KALAMA PINN CDP"; + compatible = "qcom,kalama-cdp", "qcom,kalama", "qcom,cdp"; + qcom,msm-id = <519 0x10000>; + qcom,board-id = <0x03010001 0x3>; +}; diff --git a/qcom/kalama-pinn-mtp-overlay.dts b/qcom/kalama-pinn-mtp-overlay.dts new file mode 100644 index 00000000..9fc16f99 --- /dev/null +++ b/qcom/kalama-pinn-mtp-overlay.dts @@ -0,0 +1,13 @@ +/dts-v1/; +/plugin/; + +#include "kalama-mtp.dtsi" +#include "sdxpinn-external-soc.dtsi" +#include "kalama-pinn.dtsi" + +/ { + model = "KALAMA PINN MTP"; + compatible = "qcom,kalama-mtp", "qcom,kalama", "qcom,mtp"; + qcom,msm-id = <519 0x10000>; + qcom,board-id = <0x02010008 0x2>; +}; diff --git a/qcom/kalama-pinn.dtsi b/qcom/kalama-pinn.dtsi new file mode 100644 index 00000000..04c9ddf3 --- /dev/null +++ b/qcom/kalama-pinn.dtsi @@ -0,0 +1,8 @@ +&mdm0 { + compatible = "qcom,ext-pinn"; + qcom,mdm-link-info = "0309_01.01.00"; +}; + +&modem_pas { + status = "disabled"; +}; diff --git a/qcom/sdxpinn-external-soc.dtsi b/qcom/sdxpinn-external-soc.dtsi new file mode 100644 index 00000000..731d27c6 --- /dev/null +++ b/qcom/sdxpinn-external-soc.dtsi @@ -0,0 +1,51 @@ +&soc { + mdm0: qcom,remoteproc-esoc0 { + cell-index = <0>; + #address-cells = <0>; + interrupt-parent = <&mdm0>; + #interrupt-cells = <1>; + interrupt-map-mask = <0xffffffff>; + interrupt-names = + "err_fatal_irq", + "status_irq"; + interrupt-map = <0 &tlmm 31 0x3 + 1 &tlmm 28 0x3>; + /* modem attributes */ + qcom,ramdump-delay-ms = <3000>; + qcom,ramdump-timeout-ms = <120000>; + qcom,vddmin-modes = "normal"; + qcom,vddmin-drive-strength = <8>; + qcom,sfr-query; + qcom,sysmon-id = <20>; + qcom,ssctl-instance-id = <0x10>; + qcom,support-shutdown; + qcom,pil-force-shutdown; + pinctrl-names = "default", "mdm_active", "mdm_suspend"; + pinctrl-0 = <&ap2mdm_pon_reset_default>; + pinctrl-1 = <&ap2mdm_active &mdm2ap_active>; + pinctrl-2 = <&ap2mdm_sleep &mdm2ap_sleep>; + qcom,mdm2ap-status-gpio = <&tlmm 28 0x00>; + qcom,ap2mdm-status-gpio = <&tlmm 29 0x00>; + qcom,ap2mdm-errfatal-gpio = <&tlmm 30 0x00>; + qcom,mdm2ap-errfatal-gpio = <&tlmm 31 0x00>; + qcom,ap2mdm-soft-reset-gpio = <&pm8550_gpios 1 0>; + + reg-names = "l10b"; + l10c-supply = <&L10B>; + l10c-uV-uA = <1200000 100000>; + + qcom,esoc-skip-restart-for-mdm-crash; + status = "ok"; + }; +}; + +&pm8550_gpios { + ap2mdm_pon_reset { + ap2mdm_pon_reset_default: ap2mdm_pon_reset_default { + /* MDM PON control*/ + pins = "gpio1"; + function = "normal"; + power-source = <1>; /* 1.8V */ + }; + }; +};