Skip to contentSkip to conversation

dt-bindings: vendor-prefixes: add zhihe

PATCH Superseded Yang Xiwen 3 participants 14 messages Jan 10, 2023 – Jan 19, 2023 1 message not in the archive

Subsystems (3)

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Yang Xiwen

author
#1 lore raw

PATCH 1/3 dt-bindings: vendor-prefixes: add zhihe

zhihe is a placeholder for various 4G USB dongles made by unknown manufactures with similar design. It is widely used in China to refer to these dongles.

---
 Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/vendor-prefixes.yaml +2 -0
index 3893c45963a26..795627741a322 100644
@@ -1520,6 +1520,8 @@ patternProperties:
     description: Zealz
   "^zeitec,.*":
     description: ZEITEC Semiconductor Co., LTD.
+  "^zhihe,.*":
+    description: Placeholder for various 4G USB dongles made by unknown manufactures with similar design
   "^zidoo,.*":
     description: Shenzhen Zidoo Technology Co., Ltd.
   "^zii,.*":
Signature · 1 line
2.39.0
#2 lore raw
Quoted 3 lines · Yang Xiwen

zhihe is a placeholder for various 4G USB dongles made by unknown manufactures with similar design. It is widely used in China to refer to these dongles.

No, it's not descriptive enough. If you bring support for specific device, this device is already known to you.

Best regards,
Krzysztof

author
#3 lore raw

PATCH 2/3 dt-bindings: qcom: Ducument bindings for new msm8916-zhihe-uf896 and msm8916-zhihe-ufi001c

In reply to a message not in the archive

Document the new zhihe,uf896/ufi001c device tree bindings used in their device trees.

---
 Documentation/devicetree/bindings/arm/qcom.yaml | 2 ++
 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/arm/qcom.yaml +2 -0
index 65ef7e442da0d..efe5f6c384b69 100644
@@ -210,6 +210,8 @@ properties:
               - samsung,j5
               - samsung,serranove
               - wingtech,wt88047
+              - zhihe,uf896
+              - zhihe,ufi001c
           - const: qcom,msm8916
 
       - items:
Signature · 1 line
2.39.0
#4 lore raw

Re: [PATCH 2/3] dt-bindings: qcom: Ducument bindings for new msm8916-zhihe-uf896 and msm8916-zhihe-ufi001c

Quoted 2 lines · Yang Xiwen

Document the new zhihe,uf896/ufi001c device tree bindings used in their device trees.

Subject: drop second/last, redundant "bindings for". The "dt-bindings" prefix is already stating that these are bindings.

Subject: typo - Document

Subject: shorten it, use some shorter user descriptive model name

Quoted 11 lines
---
 Documentation/devicetree/bindings/arm/qcom.yaml | 2 ++
 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/arm/qcom.yaml +0 -0
index 65ef7e442da0d..efe5f6c384b69 100644

Documentation/devicetree/bindings/arm/qcom.yaml properties: · line 214

Quoted 5 lines
Documentation/devicetree/bindings/arm/qcom.yaml +2 -0
@@ -210,6 +210,8 @@ properties:
               - samsung,j5
               - samsung,serranove
               - wingtech,wt88047
+              - zhihe,uf896
+              - zhihe,ufi001c

Real hardware, running real mainline OS cannot be called "placeholder".

Documentation/devicetree/bindings/arm/qcom.yaml properties: · line 217

Quoted 3 lines
Documentation/devicetree/bindings/arm/qcom.yaml +0 -0
           - const: qcom,msm8916
 
       - items:

Best regards,
Krzysztof

author
#5 lore raw

PATCH 3/3 arm64: dts: qcom: msm8916-zhihe: Add initial device tree for zhihe Wifi/LTE dongle UFI-001C and uf896

In reply to a message not in the archive

This commit adds support for the ufi-001C and uf896 WiFi/LTE dongle made by unknown manufactures based on MSM8916.
uf896 is another variant for the zhihe usb stick. The board design difers by using different gpios for the keys and leds.

Note: The original firmware does not support 64-bit OS. It is necessary to flash 64-bit TZ firmware to boot arm64.

Currently supported:
- All CPU cores
- Buttons
- LEDs
- Modem
- SDHC
- USB Device Mode
- UART

---
 arch/arm64/boot/dts/qcom/Makefile             |   2 +
 .../boot/dts/qcom/msm8916-zhihe-uf896.dts     |  41 +++
 .../boot/dts/qcom/msm8916-zhihe-ufi001c.dts   |  39 +++
 arch/arm64/boot/dts/qcom/msm8916-zhihe.dtsi   | 246 ++++++++++++++++++
 4 files changed, 328 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/msm8916-zhihe-uf896.dts
 create mode 100644 arch/arm64/boot/dts/qcom/msm8916-zhihe-ufi001c.dts
 create mode 100644 arch/arm64/boot/dts/qcom/msm8916-zhihe.dtsi
arch/arm64/boot/dts/qcom/Makefile +2 -0
index b42362c7be1bf..7abc7bb19c9fc 100644
@@ -21,6 +21,8 @@ dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-samsung-e7.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-samsung-grandmax.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-samsung-j5.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-samsung-serranove.dtb
+dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-zhihe-uf896.dtb
+dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-zhihe-ufi001c.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-wingtech-wt88047.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8953-motorola-potter.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8953-xiaomi-daisy.dtb
arch/arm64/boot/dts/qcom/msm8916-zhihe-uf896.dts new file +41 -0

41 lines not on this page · raw message

arch/arm64/boot/dts/qcom/msm8916-zhihe-ufi001c.dts new file +39 -0
new file mode 100644
index 0000000000000..715874a2b8650
@@ -0,0 +1,39 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+/dts-v1/;
+
+#include "msm8916-zhihe.dtsi"
+
+/ {
+	model = "ufi-001c/ufi-001b 4G Modem Stick";
+	compatible = "zhihe,ufi001c", "qcom,msm8916";
+};
+
+&button_restart {
+	gpios = <&msmgpio 37 GPIO_ACTIVE_HIGH>;
+};
+
+&led_r {
+	gpios = <&msmgpio 22 GPIO_ACTIVE_HIGH>;
+};
+
+&led_g {
+	gpios = <&msmgpio 21 GPIO_ACTIVE_HIGH>;
+};
+
+&led_b {
+	gpios = <&msmgpio 20 GPIO_ACTIVE_HIGH>;
+};
+
+&button_default {
+	pins = "gpio37";
+	bias-pull-down;
+};
+
+&gpio_leds_default {
+	pins = "gpio20", "gpio21", "gpio22";
+};
+
+&sim_ctrl_default {
+	pins = "gpio1", "gpio2";
+};
arch/arm64/boot/dts/qcom/msm8916-zhihe.dtsi new file +246 -0

246 lines not on this page · raw message

Signature · 1 line
2.39.0
#6 lore raw

Re: [PATCH 3/3] arm64: dts: qcom: msm8916-zhihe: Add initial device tree for zhihe Wifi/LTE dongle UFI-001C and uf896

On 10/01/2023 16:50, Yang Xiwen wrote:

Subject: too long. drop redundant information. "initial device tree for" is kind of obvious.

Drop "zhihe" everywhere. You just said it is non-real company, so how can you start using it in context of a company name?

Quoted 4 lines

This commit adds support for the ufi-001C and uf896 WiFi/LTE dongle made by unknown manufactures based on MSM8916.
uf896 is another variant for the zhihe usb stick. The board design difers by using different gpios for the keys and leds.

Run spellcheck. "differs"

Best regards,
Krzysztof

#7 lore raw

Re: [PATCH 3/3] arm64: dts: qcom: msm8916-zhihe: Add initial device tree for zhihe Wifi/LTE dongle UFI-001C and uf896

Thanks for your review, but I don't know how to deal with such a device with unknown vendor. Do you have any idea and show me some possible solutions? If "zhihe" is dropped, what can be a substitute?

Best regards,
Yang

#8 lore raw

Re: [PATCH 3/3] arm64: dts: qcom: msm8916-zhihe: Add initial device tree for zhihe Wifi/LTE dongle UFI-001C and uf896

Quoted 3 lines · On 10/01/2023 19:17, [email protected] wrote:

Thanks for your review, but I don't know how to deal with such a device with unknown vendor. Do you have any idea and show me some possible solutions? If "zhihe" is dropped, what can be a substitute?

Please do not remove the context you are replying to.

You install this kernel with DTB on some device so clearly you have such device in hand, right? It has then some manufacturer, some company. If it is USB stick as you said, then it has even vendor ID, which might be or might not be real.

Best regards,
Krzysztof

#9 lore raw

RE: [PATCH 3/3] arm64: dts: qcom: msm8916-zhihe: Add initial device tree for zhihe Wifi/LTE dongle UFI-001C and uf896

I removed Cc temporary because I had sent them the same email once. No need to send the email to them again.

Quoted 8 lines · On 10/01/2023 19:30 [email protected] wrote:

You install this kernel with DTB on some device so clearly you have such device
in hand, right? It has then some manufacturer, some company. If it is USB stick
as you said, then it has even vendor ID, which might be or might not be real.

The vendor extracted from /system/build.prop and USB vendor ID is fake, even IMEI is stolen from some other mobile phones. Seems like the vendor deliberately tries to be anonymous. Some people had tried to extract info from stock firmware and on the Internet. But until now, we have no clear evidence to know the manufacturer.

Best regards,
Yang

#10 lore raw

Re: [PATCH 3/3] arm64: dts: qcom: msm8916-zhihe: Add initial device tree for zhihe Wifi/LTE dongle UFI-001C and uf896

Quoted 12 lines · On 10/01/2023 19:58, [email protected] wrote:

I removed Cc temporary because I had sent them the same email once. No need to send the email to them again.

Quoted 8 lines · On 10/01/2023 19:30 [email protected] wrote:

You install this kernel with DTB on some device so clearly you have such device
in hand, right? It has then some manufacturer, some company. If it is USB stick
as you said, then it has even vendor ID, which might be or might not be real.

Quoted 5 lines

The vendor extracted from /system/build.prop and USB vendor ID is fake, even IMEI is stolen from some other mobile phones. Seems like the vendor deliberately tries to be anonymous. Some people had tried to extract info from stock firmware and on the Internet. But until now, we have no clear evidence to know the manufacturer.

Then I am not sure if we want to support such devices mainline. It is not only anonymity but simply not following standards and practices. What's more there is no guarantee what this device is. If there is no known manufacturer, anytime another device from anyone can claim it is also uf896. IOW, what guarantees you have that other person who has something looking like "uf896" actually has something the same as you and can use your DTB?

I don't know how to reasonably support entirely unknown devices.

Best regards,
Krzysztof

#11 lore raw

RE: [PATCH 3/3] arm64: dts: qcom: msm8916-zhihe: Add initial device tree for zhihe Wifi/LTE dongle UFI-001C and uf896

Quoted 2 lines · On 10/01/2023 20:32, [email protected] wrote:

Then I am not sure if we want to support such devices mainline. It is not

only

Quoted 2 lines

anonymity but simply not following standards and practices. What's more there is no guarantee what this device is. If there is no

known

Quoted 1 line

manufacturer, anytime another device from anyone can claim it is also

uf896.

Quoted 2 lines

IOW, what guarantees you have that other person who has something looking like "uf896" actually has something the same as you and can use your DTB?

There is a label printed (i.e. ufi001c or uf896 or something else but not getting mainlined now) on the board, different models have different labels(and different board design). And currently I know all ufi001c(even some other models) shares the same device tree, as a downstream device tree has been tested by thousands of people. I'm not familiar with uf896 as it is owned by Nikita Travkin and tested by him. The device sells very well and many people will benefit from mainlining.

#12 lore raw

Re: [PATCH 3/3] arm64: dts: qcom: msm8916-zhihe: Add initial device tree for zhihe Wifi/LTE dongle UFI-001C and uf896

Quoted 12 lines · On 10/01/2023 20:56, [email protected] wrote:
Quoted 2 lines · On 10/01/2023 20:32, [email protected] wrote:

Then I am not sure if we want to support such devices mainline. It is not

only

Quoted 2 lines

anonymity but simply not following standards and practices. What's more there is no guarantee what this device is. If there is no

known

Quoted 1 line

manufacturer, anytime another device from anyone can claim it is also

uf896.

Quoted 2 lines

IOW, what guarantees you have that other person who has something looking like "uf896" actually has something the same as you and can use your DTB?

Quoted 7 lines

There is a label printed (i.e. ufi001c or uf896 or something else but not getting mainlined now) on the board, different models have different labels(and different board design). And currently I know all ufi001c(even some other models) shares the same device tree, as a downstream device tree has been tested by thousands of people. I'm not familiar with uf896 as it is owned by Nikita Travkin and tested by him. The device sells very well and many people will benefit from mainlining.

This does not solve my concerns. If you cannot point specific manufacturer and model (if there is no manufacturer, there can be no official model, right?), how anyone can be sure that their device is compatible with yours?

Best regards,
Krzysztof

#13 lore raw

RE: [PATCH 3/3] arm64: dts: qcom: msm8916-zhihe: Add initial device tree for zhihe Wifi/LTE dongle UFI-001C and uf896

Quoted 5 lines · On 11/01/2023 09:32, [email protected] wrote:

This does not solve my concerns. If you cannot point specific manufacturer and
model (if there is no manufacturer, there can be no official model, right?), how
anyone can be sure that their device is compatible with yours?

1. the best way is to take the device apart and compare the board design
with others;
2. the label on board, though format unknown, seems to be different between
different models and identical for one model;
3. read board-id from stock Android firmware. It's not reliable because a
board-id might be shared by multiple models. Note this board-id has no other usage because the manufacturer reused a board-id defined by qcom.

We extract some special fields from the label(i.e. ufi001c or uf896) to be
the model name for a device, currently it's enough to distinguish between
different boards.
For example, the label on ufi001c is 'UFI001C_MB_V01', we extract the first field to be the model name.

maintainer
#14 lore raw

Re: [PATCH 3/3] arm64: dts: qcom: msm8916-zhihe: Add initial device tree for zhihe Wifi/LTE dongle UFI-001C and uf896

In reply to Yang Xiwen
Quoted 53 lines · Yang Xiwen

This commit adds support for the ufi-001C and uf896 WiFi/LTE dongle made by unknown manufactures based on MSM8916.
uf896 is another variant for the zhihe usb stick. The board design difers by using different gpios for the keys and leds.

Note: The original firmware does not support 64-bit OS. It is necessary to flash 64-bit TZ firmware to boot arm64.

Currently supported:
- All CPU cores
- Buttons
- LEDs
- Modem
- SDHC
- USB Device Mode
- UART

---
 arch/arm64/boot/dts/qcom/Makefile             |   2 +
 .../boot/dts/qcom/msm8916-zhihe-uf896.dts     |  41 +++
 .../boot/dts/qcom/msm8916-zhihe-ufi001c.dts   |  39 +++
 arch/arm64/boot/dts/qcom/msm8916-zhihe.dtsi   | 246 ++++++++++++++++++
 4 files changed, 328 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/msm8916-zhihe-uf896.dts
 create mode 100644 arch/arm64/boot/dts/qcom/msm8916-zhihe-ufi001c.dts
 create mode 100644 arch/arm64/boot/dts/qcom/msm8916-zhihe.dtsi
arch/arm64/boot/dts/qcom/Makefile +2 -0
index b42362c7be1bf..7abc7bb19c9fc 100644
@@ -21,6 +21,8 @@ dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-samsung-e7.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-samsung-grandmax.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-samsung-j5.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-samsung-serranove.dtb
+dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-zhihe-uf896.dtb
+dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-zhihe-ufi001c.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-wingtech-wt88047.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8953-motorola-potter.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8953-xiaomi-daisy.dtb
arch/arm64/boot/dts/qcom/msm8916-zhihe-uf896.dts new file +2 -0
new file mode 100644
index 0000000000000..2ddceb1d8b210
@@ -0,0 +1,41 @@
+// SPDX-License-Identifier: GPL-2.0-only
+

arch/arm64/boot/dts/qcom/msm8916-zhihe-uf896.dts line 12

Quoted 10 lines
arch/arm64/boot/dts/qcom/msm8916-zhihe-uf896.dts new file +10 -0
+/dts-v1/;
+
+#include "msm8916-zhihe.dtsi"
+
+/ {
+	model = "uf896 4G Modem Stick";
+	compatible = "zhihe,uf896", "qcom,msm8916";
+};
+
+&button_restart {

Please sort nodes alphabetically.

Quoted 53 lines
arch/arm64/boot/dts/qcom/msm8916-zhihe-uf896.dts new file +29 -0
+	gpios = <&msmgpio 35 GPIO_ACTIVE_LOW>;
+};
+
+&led_r {
+	gpios = <&msmgpio 82 GPIO_ACTIVE_HIGH>;
+};
+
+&led_g {
+	gpios = <&msmgpio 83 GPIO_ACTIVE_HIGH>;
+	function = LED_FUNCTION_WLAN;
+};
+
+&led_b {
+	gpios = <&msmgpio 81 GPIO_ACTIVE_HIGH>;
+	function = LED_FUNCTION_WAN;
+};
+
+&button_default {
+	pins = "gpio35";
+	bias-pull-up;
+};
+
+&gpio_leds_default {
+	pins = "gpio81", "gpio82", "gpio83";
+};
+
+&sim_ctrl_default {
+	pins = "gpio1", "gpio2";
+};
arch/arm64/boot/dts/qcom/msm8916-zhihe-ufi001c.dts new file +18 -0
new file mode 100644
index 0000000000000..715874a2b8650
@@ -0,0 +1,39 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+/dts-v1/;
+
+#include "msm8916-zhihe.dtsi"
+
+/ {
+	model = "ufi-001c/ufi-001b 4G Modem Stick";
+	compatible = "zhihe,ufi001c", "qcom,msm8916";
+};
+
+&button_restart {
+	gpios = <&msmgpio 37 GPIO_ACTIVE_HIGH>;
+};
+
+&led_r {
+	gpios = <&msmgpio 22 GPIO_ACTIVE_HIGH>;
+};

arch/arm64/boot/dts/qcom/msm8916-zhihe-ufi001c.dts line 28

Quoted 10 lines
arch/arm64/boot/dts/qcom/msm8916-zhihe-ufi001c.dts new file +10 -0
+
+&led_g {
+	gpios = <&msmgpio 21 GPIO_ACTIVE_HIGH>;
+};
+
+&led_b {
+	gpios = <&msmgpio 20 GPIO_ACTIVE_HIGH>;
+};
+
+&button_default {

Same here, please sort alphabetically.

Regards,
Bjorn