From 63a440fe862de5d2d94ba4b37ede120c413e9dc3 Mon Sep 17 00:00:00 2001 From: David Collins Date: Thu, 6 Feb 2020 14:42:10 -0800 Subject: [PATCH 1/2] bindings: spmi: add QTI Glink SPMI debug controller binding documentation Add binding documentation for the Qualcomm Technologies, Inc. Glink SPMI debug controller device. This device provides an interface to read and write PMIC registers over PMIC Glink using a remote subsytem (e.g. DSP). This allows for debugging PMIC peripherals that would typically only be accessible to the charger and fuel gauging firmware running on the remote subsystem. Change-Id: I1779c7841dfed8e49c07705d6803b7aad196c4d4 --- bindings/spmi/qcom,spmi-glink-debug.txt | 52 +++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 bindings/spmi/qcom,spmi-glink-debug.txt diff --git a/bindings/spmi/qcom,spmi-glink-debug.txt b/bindings/spmi/qcom,spmi-glink-debug.txt new file mode 100644 index 000000000000..454ea8b66172 --- /dev/null +++ b/bindings/spmi/qcom,spmi-glink-debug.txt @@ -0,0 +1,52 @@ +Qualcomm Technologies, Inc. Glink SPMI Debug Controller + +The Qualcomm Technologies, Inc. Glink SPMI debug controller device provides an +interface to read and write PMIC registers over PMIC Glink using a remote +subsytem (e.g. DSP). This allows for debugging PMIC peripherals that would +typically only be accessible to the charger and fuel gauging firmware running +on the remote subsystem. + +Refer to Documentation/devicetree/bindings/soc/qcom/qcom,pmic-glink.txt for +information on "qcom,pmic_glink_log" device which is used in the example below. + +See spmi.txt for the generic SPMI controller binding requirements for grandchild +nodes. + +Required device node structure: + +The Glink SPMI debug controller node must contain at least one child node. Each +child node corresponds to an SPMI bus accessible from the remote subsystem. + +Top Level Node Supported Properties: + +- compatible: + Usage: required + Value type: + Definition: Must be "qcom,spmi-glink-debug". + +Child Node Supported Properties: + +- reg + Usage: required + Value type: + Definition: Bus ID of this SPMI bus. + +Example: + +&soc { + qcom,pmic_glink_log { + qcom,spmi_glink_debug { + compatible = "qcom,spmi-glink-debug"; + #address-cells = <1>; + #size-cells = <0>; + + spmi@0 { + reg = <0>; + }; + + spmi@1 { + reg = <1>; + }; + }; + }; +}; From 6d4e448d12cb64ad9a069c2c89a2ffee838f8661 Mon Sep 17 00:00:00 2001 From: David Collins Date: Thu, 6 Feb 2020 15:05:04 -0800 Subject: [PATCH 2/2] ARM: dts: qcom: add Glink SPMI debug controller device for Lahaina Add a Glink SPMI debug controller device which can be used to read and write PMIC registers over PMIC Glink using a remote subsytem (e.g. DSP). Change-Id: Ie17f008a20c938da96f3bb2f9e6100618fa4626a --- qcom/lahaina-cdp.dtsi | 4 ++++ qcom/lahaina-mtp.dtsi | 4 ++++ qcom/lahaina-qrd-common.dtsi | 8 +++++++ qcom/lahaina.dtsi | 46 ++++++++++++++++++++++++++++++++++++ 4 files changed, 62 insertions(+) diff --git a/qcom/lahaina-cdp.dtsi b/qcom/lahaina-cdp.dtsi index 339789e85444..9e0ba0b5536a 100644 --- a/qcom/lahaina-cdp.dtsi +++ b/qcom/lahaina-cdp.dtsi @@ -8,6 +8,10 @@ status = "ok"; }; +&spmi_glink_debug { + status = "ok"; +}; + &soc { gpio_keys { compatible = "gpio-keys"; diff --git a/qcom/lahaina-mtp.dtsi b/qcom/lahaina-mtp.dtsi index db10cd6b24ce..f0d4f80318c5 100644 --- a/qcom/lahaina-mtp.dtsi +++ b/qcom/lahaina-mtp.dtsi @@ -8,6 +8,10 @@ status = "ok"; }; +&spmi_glink_debug { + status = "ok"; +}; + &soc { gpio_keys { compatible = "gpio-keys"; diff --git a/qcom/lahaina-qrd-common.dtsi b/qcom/lahaina-qrd-common.dtsi index 138e3dba9b26..234558dbbe44 100644 --- a/qcom/lahaina-qrd-common.dtsi +++ b/qcom/lahaina-qrd-common.dtsi @@ -7,6 +7,14 @@ status = "ok"; }; +&spmi_glink_debug { + status = "ok"; +}; + +&smb1398_debug { + status = "ok"; +}; + &soc { gpio_keys { compatible = "gpio-keys"; diff --git a/qcom/lahaina.dtsi b/qcom/lahaina.dtsi index f0e889fbe2aa..2c1fd72a73e5 100644 --- a/qcom/lahaina.dtsi +++ b/qcom/lahaina.dtsi @@ -3131,6 +3131,52 @@ qcom,battery_debug { compatible = "qcom,battery-debug"; }; + + spmi_glink_debug: qcom,spmi_glink_debug { + compatible = "qcom,spmi-glink-debug"; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + + /* Primary SPMI bus */ + spmi@0 { + reg = <0>; + #address-cells = <2>; + #size-cells = <0>; + + qcom,pm8350b-debug@3 { + compatible = "qcom,spmi-pmic"; + reg = <0x3 SPMI_USID>; + qcom,can-sleep; + }; + }; + + /* Secondary (QUP) SPMI bus */ + spmi@1 { + reg = <1>; + #address-cells = <2>; + #size-cells = <0>; + + qcom,smb1396-debug@b { + compatible = "qcom,spmi-pmic"; + reg = <0xb SPMI_USID>; + qcom,can-sleep; + }; + + qcom,smb1396-debug@c { + compatible = "qcom,spmi-pmic"; + reg = <0xc SPMI_USID>; + qcom,can-sleep; + }; + + smb1398_debug: qcom,smb1398-debug@d { + compatible = "qcom,spmi-pmic"; + reg = <0xd SPMI_USID>; + qcom,can-sleep; + status = "disabled"; + }; + }; + }; }; bluetooth: bt_qca6490 {