2023-04-07 19:55:29

by Konrad Dybcio

[permalink] [raw]
Subject: [PATCH v2 0/4] Tab P11 features

v1 -> v2:
- Add ftrace-size and drop no-map under pstore [1/4]
- Add qcom,ath10k-calibration-variant [4/4]
- Pick up rbs

v1: https://lore.kernel.org/r/[email protected]

This short series brings a couple of "nice" features to the Tab P11:
- Wi-Fi
- remoteprocs (+RMTFS)
- ramoops

No external dependencies.

Signed-off-by: Konrad Dybcio <[email protected]>
---
Konrad Dybcio (4):
arm64: dts: qcom: sm6115-j606f: Add ramoops node
arm64: dts: qcom: sm6115: Add RMTFS
arm64: dts: qcom: sm6115p-j606f: Enable remoteprocs
arm64: dts: qcom: sm6115p-j606f: Enable ATH10K WiFi

arch/arm64/boot/dts/qcom/sm6115.dtsi | 10 +++++++
arch/arm64/boot/dts/qcom/sm6115p-lenovo-j606f.dts | 35 +++++++++++++++++++++++
2 files changed, 45 insertions(+)
---
base-commit: e134c93f788fb93fd6a3ec3af9af850a2048c7e6
change-id: 20230406-topic-lenovo_features-d708e51caa7e

Best regards,
--
Konrad Dybcio <[email protected]>


2023-04-07 19:55:38

by Konrad Dybcio

[permalink] [raw]
Subject: [PATCH v2 1/4] arm64: dts: qcom: sm6115-j606f: Add ramoops node

Add a ramoops node to enable retrieving crash logs.

Signed-off-by: Konrad Dybcio <[email protected]>
---
arch/arm64/boot/dts/qcom/sm6115p-lenovo-j606f.dts | 11 +++++++++++
1 file changed, 11 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sm6115p-lenovo-j606f.dts b/arch/arm64/boot/dts/qcom/sm6115p-lenovo-j606f.dts
index 10c9d338446c..cd47fbc993ba 100644
--- a/arch/arm64/boot/dts/qcom/sm6115p-lenovo-j606f.dts
+++ b/arch/arm64/boot/dts/qcom/sm6115p-lenovo-j606f.dts
@@ -52,6 +52,17 @@ key-volume-up {
wakeup-source;
};
};
+
+ reserved-memory {
+ ramoops@ffc00000 {
+ compatible = "ramoops";
+ reg = <0x0 0xffc00000 0x0 0x100000>;
+ record-size = <0x1000>;
+ console-size = <0x40000>;
+ ftrace-size = <0x20000>;
+ ecc-size = <16>;
+ };
+ };
};

&dispcc {

--
2.40.0

2023-04-07 19:55:42

by Konrad Dybcio

[permalink] [raw]
Subject: [PATCH v2 3/4] arm64: dts: qcom: sm6115p-j606f: Enable remoteprocs

Enable the [AC]DSP and MPSS and specify the firmware paths.

Reviewed-by: Dmitry Baryshkov <[email protected]>
Signed-off-by: Konrad Dybcio <[email protected]>
---
arch/arm64/boot/dts/qcom/sm6115p-lenovo-j606f.dts | 15 +++++++++++++++
1 file changed, 15 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sm6115p-lenovo-j606f.dts b/arch/arm64/boot/dts/qcom/sm6115p-lenovo-j606f.dts
index cd47fbc993ba..bc232deb802b 100644
--- a/arch/arm64/boot/dts/qcom/sm6115p-lenovo-j606f.dts
+++ b/arch/arm64/boot/dts/qcom/sm6115p-lenovo-j606f.dts
@@ -89,6 +89,21 @@ &pon_resin {
status = "okay";
};

+&remoteproc_adsp {
+ firmware-name = "qcom/sm6115/LENOVO/J606F/adsp.mbn";
+ status = "okay";
+};
+
+&remoteproc_cdsp {
+ firmware-name = "qcom/sm6115/LENOVO/J606F/cdsp.mbn";
+ status = "okay";
+};
+
+&remoteproc_mpss {
+ firmware-name = "qcom/sm6115/LENOVO/J606F/modem.mbn";
+ status = "okay";
+};
+
&rpm_requests {
regulators-0 {
compatible = "qcom,rpm-pm6125-regulators";

--
2.40.0

2023-04-07 19:55:43

by Konrad Dybcio

[permalink] [raw]
Subject: [PATCH v2 2/4] arm64: dts: qcom: sm6115: Add RMTFS

Add a node for RMTFS and associate it with MSA and NAV IDs to enable
modem functionality on SM6115.

Reviewed-by: Dmitry Baryshkov <[email protected]>
Signed-off-by: Konrad Dybcio <[email protected]>
---
arch/arm64/boot/dts/qcom/sm6115.dtsi | 10 ++++++++++
1 file changed, 10 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sm6115.dtsi b/arch/arm64/boot/dts/qcom/sm6115.dtsi
index 2505c815c65a..99c6550663c8 100644
--- a/arch/arm64/boot/dts/qcom/sm6115.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm6115.dtsi
@@ -8,6 +8,7 @@
#include <dt-bindings/clock/qcom,sm6115-gpucc.h>
#include <dt-bindings/clock/qcom,rpmcc.h>
#include <dt-bindings/dma/qcom-gpi.h>
+#include <dt-bindings/firmware/qcom,scm.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/power/qcom-rpmpd.h>
@@ -290,6 +291,15 @@ removed_mem: memory@60000000 {
reg = <0x0 0x60000000 0x0 0x3900000>;
no-map;
};
+
+ rmtfs_mem: memory@89b01000 {
+ compatible = "qcom,rmtfs-mem";
+ reg = <0x0 0x89b01000 0x0 0x200000>;
+ no-map;
+
+ qcom,client-id = <1>;
+ qcom,vmid = <QCOM_SCM_VMID_MSS_MSA QCOM_SCM_VMID_NAV>;
+ };
};

rpm-glink {

--
2.40.0

2023-04-07 20:00:24

by Konrad Dybcio

[permalink] [raw]
Subject: [PATCH v2 4/4] arm64: dts: qcom: sm6115p-j606f: Enable ATH10K WiFi

Enable the onboard QCA Wi-Fi. HW identifiers for reference:
qmi chip_id 0x320 chip_family 0x4001 board_id 0xff soc_id 0x400e0000

Firmware sources:
/vendor/firmware_mnt/image/wlanmdsp.bin -> qcom/.../wlanmdsp.mbn
/vendor/firmware_mnt/image/bdwlan.bXX [1] -> [2] -> ath10k/.../board-2.bin
[3] -> ath10k/.../firmware-5.bin

Not sure where 3 comes from on the device itself, gotta investigate that..

According to [4], it's called WCN3990_STRAIT.

[1] XX = board_id printed when the file is missing or by your downstream
kernel firmware loader in the dmesg; if XX=ff, use bdwlan.bin

[2] https://github.com/jhugo/linux/blob/5.5rc2_wifi/README
[3] https://github.com/kvalo/ath10k-firmware/blob/master/WCN3990/hw1.0/HL3.1/WLAN.HL.3.1-01040-QCAHLSWMTPLZ-1/firmware-5.bin
[4] https://git.codelinaro.org/clo/la/platform/vendor/qcom-opensource/wlan/qca-wifi-host-cmn/-/blob/LA.VENDOR.1.0.r1-20700-WAIPIO.QSSI13.0/hif/src/hif_hw_version.h#L55

Signed-off-by: Konrad Dybcio <[email protected]>
---
arch/arm64/boot/dts/qcom/sm6115p-lenovo-j606f.dts | 9 +++++++++
1 file changed, 9 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sm6115p-lenovo-j606f.dts b/arch/arm64/boot/dts/qcom/sm6115p-lenovo-j606f.dts
index bc232deb802b..ea3340d31110 100644
--- a/arch/arm64/boot/dts/qcom/sm6115p-lenovo-j606f.dts
+++ b/arch/arm64/boot/dts/qcom/sm6115p-lenovo-j606f.dts
@@ -315,6 +315,15 @@ &usb_hsphy {
status = "okay";
};

+&wifi {
+ vdd-0.8-cx-mx-supply = <&pm6125_l8>;
+ vdd-1.8-xo-supply = <&pm6125_l16>;
+ vdd-1.3-rfa-supply = <&pm6125_l17>;
+ vdd-3.3-ch0-supply = <&pm6125_l23>;
+ qcom,ath10k-calibration-variant = "Lenovo_P11";
+ status = "okay";
+};
+
&xo_board {
clock-frequency = <19200000>;
};

--
2.40.0

2023-04-07 23:37:40

by Bjorn Andersson

[permalink] [raw]
Subject: Re: [PATCH v2 0/4] Tab P11 features

On Fri, 07 Apr 2023 21:54:40 +0200, Konrad Dybcio wrote:
> v1 -> v2:
> - Add ftrace-size and drop no-map under pstore [1/4]
> - Add qcom,ath10k-calibration-variant [4/4]
> - Pick up rbs
>
> v1: https://lore.kernel.org/r/[email protected]
>
> [...]

Applied, thanks!

[1/4] arm64: dts: qcom: sm6115-j606f: Add ramoops node
commit: 8b0ac59c2da69aaf8e65c6bd648a06b755975302
[2/4] arm64: dts: qcom: sm6115: Add RMTFS
commit: ecc61a207d0fad45ba991e0ce0273382b20bb226
[3/4] arm64: dts: qcom: sm6115p-j606f: Enable remoteprocs
commit: 7584284537c2a82227ed2ea359b2c53f28e6abbf
[4/4] arm64: dts: qcom: sm6115p-j606f: Enable ATH10K WiFi
commit: 137e5c267232c89b2284ea44229545d4820bcb26

Best regards,
--
Bjorn Andersson <[email protected]>