Skip to contentSkip to conversation

dt-bindings: arm: qcom: Add Huawei Honor 5X / GR5 (2016)

PATCH In review Lukas Walter 4 participants 11 messages Sep 16, 2023 – Oct 5, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 dt-bindings: arm: qcom: Add Huawei Honor 5X / GR5 (2016)

Add a compatible for Huawei Honor 5X / GR5 (2016).

---
 Documentation/devicetree/bindings/arm/qcom.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/arm/qcom.yaml +1 -0
index adbfaea32343..eabd7f6af07f 100644
@@ -189,6 +189,7 @@ properties:
 
       - items:
           - enum:
+              - huawei,kiwi
               - samsung,a7
               - sony,kanuti-tulip
               - square,apq8039-t2
Signature · 1 line
2.42.0
#1 lore raw

PATCH 2/2 arm64: dts: qcom: msm8939-huawei-kiwi: Add initial device tree

This dts adds support for Huawei Honor 5X / GR5 (2016) smartphone released in 2015.

Add device tree with initial support for:

- GPIO keys
- Hall sensor
- SDHCI (internal and external storage)
- WCNSS (BT/WIFI)
- Sensors (accelerometer, proximity and gyroscope)
- Vibrator
- Touchscreen

---
 arch/arm64/boot/dts/qcom/Makefile             |   1 +
 .../boot/dts/qcom/msm8939-huawei-kiwi.dts     | 238 ++++++++++++++++++
 2 files changed, 239 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/msm8939-huawei-kiwi.dts
arch/arm64/boot/dts/qcom/Makefile +1 -0
index 2cca20563a1d..be9781c8e693 100644
@@ -41,6 +41,7 @@ dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-thwc-uf896.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-thwc-ufi001c.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-wingtech-wt88047.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-yiming-uz801v3.dtb
+dtb-$(CONFIG_ARCH_QCOM)	+= msm8939-huawei-kiwi.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8939-samsung-a7.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8939-sony-xperia-kanuti-tulip.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8953-motorola-potter.dtb
arch/arm64/boot/dts/qcom/msm8939-huawei-kiwi.dts new file +238 -0

238 lines not on this page · raw message

Signature · 1 line
2.42.0
#2 lore raw

Re: [PATCH 2/2] arm64: dts: qcom: msm8939-huawei-kiwi: Add initial device tree

Quoted 13 lines · Lukas Walter

This dts adds support for Huawei Honor 5X / GR5 (2016) smartphone released in 2015.

Add device tree with initial support for:

- GPIO keys
- Hall sensor
- SDHCI (internal and external storage)
- WCNSS (BT/WIFI)
- Sensors (accelerometer, proximity and gyroscope)
- Vibrator
- Touchscreen

Quoted 2 lines

Order of SoB is unusual. Who did what here?

Best regards,
Krzysztof

#3 lore raw

Re: [PATCH 2/2] arm64: dts: qcom: msm8939-huawei-kiwi: Add initial device tree

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Quoted 1 line

Order of SoB is unusual. Who did what here?

I created the dts and they update the model name. So it should be the other way around
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEi1ngOOsyNO1iyMXiY16HCsLx2zUFAmUG/FQACgkQY16HCsLx 2zXbug//cFZNScSBr6k1I4tHuthR2+CFhTqOO0x0EqMa6W+l96s7ZimJA8UGq2jJ F+4BZHujtBlpd1p4bE/GMDERy6MMHmAW7/N8kl3dEfwErwvjwML4nvDLRSC2Movd 93MNJ+4tncTndMLUEyARUUg5sP6Idgc/83pMRzKn4toFxWMHfWPFHy5XlNLDjJT5 /BuvYlbAFpme9ZavTLMGtalOp6ovsS1qNRrNk/CZecV+I5tCVFs4ZbzMHf8vKi3/ B7yObHRsZEdy80KE77kedgyBlGWu0/Tvu7xrK2qZxawkbraLBn+qE76wCmgk91qg 7EheFFr30v1LuudZbA+5fOE3qC13u3LbmCaRwwKAC8S7C6OgMM8Vcg08rPdaaV10 m1MDSPgxddA/TitQNz3epvFahpm1WWuGhR2xihDP/r345kogUYcRiLw4eqIkYKjb 64Wgalclq8XByymGLndYuoBaR31wauOjCtShiHByRTp86XTWh9C+KJ2wVGdE2UWL ok+qs1hrao328+FtgtZn7FxnmO2yLA9I6xLeEPgTSt5VSZ9NWpRNQ5h61AYDEaZV YPy3cTJV5VN5Mrp6dul7bT/Ti5rp8tCH5zk6D62WTSq2xEzkDtjnE1DKzr2+0KNt c2VZQGmquTiTotnQF2c4E2M9ONd+TxN9sn0dYqwwZa0BLEI1JBk= =F2cY
-----END PGP SIGNATURE-----

#4 lore raw

Re: [PATCH 2/2] arm64: dts: qcom: msm8939-huawei-kiwi: Add initial device tree

In reply to Lukas Walter
Quoted 1 line · Lukas Walter

+ +&wcnss_iris { + compatible = "qcom,wcn3620"; +}; +

Are you sure this is 3620, have you tried wcn3660 and/or wcn3680 ?

---
bod

#5 lore raw

Re: [PATCH 2/2] arm64: dts: qcom: msm8939-huawei-kiwi: Add initial device tree

Quoted 2 lines

Are you sure this is 3620, have you tried wcn3660 and/or wcn3680 ?

I am sure. Downstream source [1] and downstream dmesg (wcnss: IRIS Reg:
51120004 which should equal [2]) indicate 3620 (3620A does not exist)

[1]:
https://github.com/CyanogenMod/android_kernel_huawei_kiwi/blob/cm-14.1/arch/arm/boot/dts/qcom/huawei_msm8939_kiw_al20_vb/huawei-bt.dtsi#L5
[2]:
https://github.com/msm8916-mainline/linux-downstream/blob/b20608408caff817ec874f325127b07609fbaeb8/drivers/net/wireless/wcnss/wcnss_vreg.c#L51

#6 lore raw

Re: [PATCH 2/2] arm64: dts: qcom: msm8939-huawei-kiwi: Add initial device tree

In reply to Lukas Walter
Quoted 13 lines · Lukas Walter

This dts adds support for Huawei Honor 5X / GR5 (2016) smartphone released in 2015.

Add device tree with initial support for:

- GPIO keys
- Hall sensor
- SDHCI (internal and external storage)
- WCNSS (BT/WIFI)
- Sensors (accelerometer, proximity and gyroscope)
- Vibrator
- Touchscreen

Quoted 3 lines

---

Beyond the signoff question from Krzysztof, this looks really good. Some comments below.

[...]

arch/arm64/boot/dts/qcom/msm8939-huawei-kiwi.dts line 27

Quoted 6 lines
arch/arm64/boot/dts/qcom/msm8939-huawei-kiwi.dts new file +6 -0
+
+	reserved-memory {
+		reserved@84a00000 {
+			reg = <0x0 0x84a00000 0x0 0x1600000>;
+			no-map;
+		};

Do we know what this is for?

arch/arm64/boot/dts/qcom/msm8939-huawei-kiwi.dts line 36

Quoted 9 lines
arch/arm64/boot/dts/qcom/msm8939-huawei-kiwi.dts new file +9 -0
+	};
+
+	gpio-hall-sensor {
+		compatible = "gpio-keys";
+
+		pinctrl-0 = <&gpio_hall_sensor_default>;
+		pinctrl-names = "default";
+
+		label = "GPIO Hall Effect Sensor";

I think we can have both hall sensor and V+ under gpio-keys

And then I am not sure how useful the label is for the container node, maybe you or somebody else can tell me whether it's used anywhere

arch/arm64/boot/dts/qcom/msm8939-huawei-kiwi.dts line 43

Quoted 7 lines
arch/arm64/boot/dts/qcom/msm8939-huawei-kiwi.dts new file +7 -0
+
+		event-hall-sensor {
+			label = "Hall Effect Sensor";
+			gpios = <&tlmm 69 GPIO_ACTIVE_LOW>;
+			linux,input-type = <EV_SW>;
+			linux,code = <SW_LID>;
+			linux,can-disable;

Should this not be a wakeup-source btw?

Quoted 3 lines
arch/arm64/boot/dts/qcom/msm8939-huawei-kiwi.dts new file +3 -0
+		};
+	};
+

[...]

arch/arm64/boot/dts/qcom/msm8939-huawei-kiwi.dts line 118

Quoted 3 lines
arch/arm64/boot/dts/qcom/msm8939-huawei-kiwi.dts new file +3 -0
+		/*
+		 * NOTE: vdd is not directly supplied by pm8916_l16, it seems to be a
+		 * fixed regulator that is automatically enabled by pm8916_l16.

That sounds reasonable, many boards have such circuits

Konrad

#7 lore raw

Re: [PATCH 2/2] arm64: dts: qcom: msm8939-huawei-kiwi: Add initial device tree

Date: Wed, 20 Sep 2023 16:47:30 +0200

Quoted 7 lines

arch/arm64/boot/dts/qcom/msm8939-huawei-kiwi.dts line 27

Quoted 6 lines
arch/arm64/boot/dts/qcom/msm8939-huawei-kiwi.dts new file +6 -0
+
+	reserved-memory {
+		reserved@84a00000 {
+			reg = <0x0 0x84a00000 0x0 0x1600000>;
+			no-map;
+		};

Do we know what this is for?

This seems to be some QSEE/TrustZone memory required to boot. I would name it qseecom_mem: qseecom@84a00000 like other phones currently have it.

`[ 1.162115] QSEECOM: qseecom_probe: secure app region
addr=0x84a00000 size=0x1900000`

Quoted 14 lines

arch/arm64/boot/dts/qcom/msm8939-huawei-kiwi.dts line 36

Quoted 9 lines
arch/arm64/boot/dts/qcom/msm8939-huawei-kiwi.dts new file +9 -0
+	};
+
+	gpio-hall-sensor {
+		compatible = "gpio-keys";
+
+		pinctrl-0 = <&gpio_hall_sensor_default>;
+		pinctrl-names = "default";
+
+		label = "GPIO Hall Effect Sensor";

I think we can have both hall sensor and V+ under gpio-keys

And then I am not sure how useful the label is for the container node, maybe you or somebody else can tell me whether it's used anywhere

Quoted 8 lines

arch/arm64/boot/dts/qcom/msm8939-huawei-kiwi.dts line 43

Quoted 7 lines
arch/arm64/boot/dts/qcom/msm8939-huawei-kiwi.dts new file +7 -0
+
+		event-hall-sensor {
+			label = "Hall Effect Sensor";
+			gpios = <&tlmm 69 GPIO_ACTIVE_LOW>;
+			linux,input-type = <EV_SW>;
+			linux,code = <SW_LID>;
+			linux,can-disable;

Should this not be a wakeup-source btw?

I am not sure how to change this. I would like to leave this as many other hall sensors seem to be configured identically.

Is this fine?
Should I send a V2 with the signoff and reserved-memory changes?

#8 lore raw

Re: [PATCH 2/2] arm64: dts: qcom: msm8939-huawei-kiwi: Add initial device tree

Quoted 10 lines · lukas walter

Date: Wed, 20 Sep 2023 16:47:30 +0200

Quoted 7 lines

arch/arm64/boot/dts/qcom/msm8939-huawei-kiwi.dts line 27

Quoted 6 lines
arch/arm64/boot/dts/qcom/msm8939-huawei-kiwi.dts new file +6 -0
+
+	reserved-memory {
+		reserved@84a00000 {
+			reg = <0x0 0x84a00000 0x0 0x1600000>;
+			no-map;
+		};

Do we know what this is for?

Quoted 6 lines

This seems to be some QSEE/TrustZone memory required to boot. I would name it qseecom_mem: qseecom@84a00000 like other phones currently have it.

`[ 1.162115] QSEECOM: qseecom_probe: secure app region
addr=0x84a00000 size=0x1900000`

Sounds good!

Quoted 24 lines
Quoted 15 lines

arch/arm64/boot/dts/qcom/msm8939-huawei-kiwi.dts line 36

Quoted 10 lines
arch/arm64/boot/dts/qcom/msm8939-huawei-kiwi.dts new file +9 -0
+	};
+
+	gpio-hall-sensor {
+		compatible = "gpio-keys";
+
+		pinctrl-0 = <&gpio_hall_sensor_default>;
+		pinctrl-names = "default";
+
+		label = "GPIO Hall Effect Sensor";

I think we can have both hall sensor and V+ under gpio-keys

And then I am not sure how useful the label is for the container node, maybe you or somebody else can tell me whether it's used anywhere

Quoted 8 lines

arch/arm64/boot/dts/qcom/msm8939-huawei-kiwi.dts line 43

Quoted 7 lines
arch/arm64/boot/dts/qcom/msm8939-huawei-kiwi.dts new file +7 -0
+
+		event-hall-sensor {
+			label = "Hall Effect Sensor";
+			gpios = <&tlmm 69 GPIO_ACTIVE_LOW>;
+			linux,input-type = <EV_SW>;
+			linux,code = <SW_LID>;
+			linux,can-disable;

Should this not be a wakeup-source btw?

Quoted 2 lines

I am not sure how to change this. I would like to leave this as many other hall sensors seem to be configured identically.

Krzysztof, opinions?

Quoted 3 lines

Is this fine?
Should I send a V2 with the signoff and reserved-memory changes?

I don't quite get it, what signoff?

Konrad

#9 lore raw

Re: [PATCH 2/2] arm64: dts: qcom: msm8939-huawei-kiwi: Add initial device tree

Quoted 3 lines
Quoted 2 lines

Is this fine?
Should I send a V2 with the signoff and reserved-memory changes?

I don't quite get it, what signoff?

Krzysztof noticed that the Signed-off-by are in the wrong order. But I was told this alone is not worth a V2.