All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] dt-bindings: vendor-prefixes: add zhihe
       [not found] <20230110155014.31664-1-forbidden405@foxmail.com>
@ 2023-01-10 15:50 ` Yang Xiwen
  2023-01-10 16:32   ` Krzysztof Kozlowski
  2023-01-10 15:50 ` [PATCH 2/3] dt-bindings: qcom: Ducument bindings for new msm8916-zhihe-uf896 and msm8916-zhihe-ufi001c Yang Xiwen
  2023-01-10 15:50 ` [PATCH 3/3] arm64: dts: qcom: msm8916-zhihe: Add initial device tree for zhihe Wifi/LTE dongle UFI-001C and uf896 Yang Xiwen
  2 siblings, 1 reply; 14+ messages in thread
From: Yang Xiwen @ 2023-01-10 15:50 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, linux-arm-msm, devicetree, linux-kernel
  Cc: Jaime Breva, Nikita Travkin, ~postmarketos/upstreaming, 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.

Signed-off-by: Yang Xiwen <forbidden405@foxmail.com>
---
 Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
index 3893c45963a26..795627741a322 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
@@ -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,.*":
-- 
2.39.0


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 2/3] dt-bindings: qcom: Ducument bindings for new msm8916-zhihe-uf896 and msm8916-zhihe-ufi001c
       [not found] <20230110155014.31664-1-forbidden405@foxmail.com>
  2023-01-10 15:50 ` [PATCH 1/3] dt-bindings: vendor-prefixes: add zhihe Yang Xiwen
@ 2023-01-10 15:50 ` Yang Xiwen
  2023-01-10 16:31   ` Krzysztof Kozlowski
  2023-01-10 15:50 ` [PATCH 3/3] arm64: dts: qcom: msm8916-zhihe: Add initial device tree for zhihe Wifi/LTE dongle UFI-001C and uf896 Yang Xiwen
  2 siblings, 1 reply; 14+ messages in thread
From: Yang Xiwen @ 2023-01-10 15:50 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, linux-arm-msm, devicetree, linux-kernel
  Cc: Jaime Breva, Nikita Travkin, ~postmarketos/upstreaming, Yang Xiwen

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

Signed-off-by: Yang Xiwen <forbidden405@foxmail.com>
---
 Documentation/devicetree/bindings/arm/qcom.yaml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/arm/qcom.yaml b/Documentation/devicetree/bindings/arm/qcom.yaml
index 65ef7e442da0d..efe5f6c384b69 100644
--- a/Documentation/devicetree/bindings/arm/qcom.yaml
+++ b/Documentation/devicetree/bindings/arm/qcom.yaml
@@ -210,6 +210,8 @@ properties:
               - samsung,j5
               - samsung,serranove
               - wingtech,wt88047
+              - zhihe,uf896
+              - zhihe,ufi001c
           - const: qcom,msm8916
 
       - items:
-- 
2.39.0


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 3/3] arm64: dts: qcom: msm8916-zhihe: Add initial device tree for zhihe Wifi/LTE dongle UFI-001C and uf896
       [not found] <20230110155014.31664-1-forbidden405@foxmail.com>
  2023-01-10 15:50 ` [PATCH 1/3] dt-bindings: vendor-prefixes: add zhihe Yang Xiwen
  2023-01-10 15:50 ` [PATCH 2/3] dt-bindings: qcom: Ducument bindings for new msm8916-zhihe-uf896 and msm8916-zhihe-ufi001c Yang Xiwen
@ 2023-01-10 15:50 ` Yang Xiwen
  2023-01-10 16:35   ` Krzysztof Kozlowski
  2023-01-19  0:24   ` Bjorn Andersson
  2 siblings, 2 replies; 14+ messages in thread
From: Yang Xiwen @ 2023-01-10 15:50 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, linux-arm-msm, devicetree, linux-kernel
  Cc: Jaime Breva, Nikita Travkin, ~postmarketos/upstreaming, 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

Co-developed-by: Jaime Breva <jbreva@nayarsystems.com>
Signed-off-by: Jaime Breva <jbreva@nayarsystems.com>
Co-developed-by: Nikita Travkin <nikita@trvn.ru>
Signed-off-by: Nikita Travkin <nikita@trvn.ru>
Signed-off-by: Yang Xiwen <forbidden405@foxmail.com>
---
 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

diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
index b42362c7be1bf..7abc7bb19c9fc 100644
--- a/arch/arm64/boot/dts/qcom/Makefile
+++ b/arch/arm64/boot/dts/qcom/Makefile
@@ -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
diff --git a/arch/arm64/boot/dts/qcom/msm8916-zhihe-uf896.dts b/arch/arm64/boot/dts/qcom/msm8916-zhihe-uf896.dts
new file mode 100644
index 0000000000000..2ddceb1d8b210
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/msm8916-zhihe-uf896.dts
@@ -0,0 +1,41 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+/dts-v1/;
+
+#include "msm8916-zhihe.dtsi"
+
+/ {
+	model = "uf896 4G Modem Stick";
+	compatible = "zhihe,uf896", "qcom,msm8916";
+};
+
+&button_restart {
+	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";
+};
diff --git a/arch/arm64/boot/dts/qcom/msm8916-zhihe-ufi001c.dts b/arch/arm64/boot/dts/qcom/msm8916-zhihe-ufi001c.dts
new file mode 100644
index 0000000000000..715874a2b8650
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/msm8916-zhihe-ufi001c.dts
@@ -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";
+};
diff --git a/arch/arm64/boot/dts/qcom/msm8916-zhihe.dtsi b/arch/arm64/boot/dts/qcom/msm8916-zhihe.dtsi
new file mode 100644
index 0000000000000..286768d0fbe70
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/msm8916-zhihe.dtsi
@@ -0,0 +1,246 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+#include "msm8916-pm8916.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/leds/common.h>
+
+/ {
+	chassis-type = "embedded";
+
+	aliases {
+		serial0 = &blsp1_uart2;
+	};
+
+	chosen {
+		stdout-path = "serial0";
+	};
+
+	reserved-memory {
+		mpss_mem: mpss@86800000 {
+			reg = <0x0 0x86800000 0x0 0x5500000>;
+			no-map;
+		};
+
+		gps_mem: gps@8bd00000 {
+			reg = <0x0 0x8bd00000 0x0 0x200000>;
+			no-map;
+		};
+	};
+
+	gpio-keys {
+		compatible = "gpio-keys";
+
+		pinctrl-0 = <&button_default>;
+		pinctrl-names = "default";
+
+		label = "GPIO Buttons";
+
+		/* gpio is board-specific */
+		button_restart: button-restart {
+			label = "Restart";
+			linux,code = <KEY_RESTART>;
+		};
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		pinctrl-0 = <&gpio_leds_default>;
+		pinctrl-names = "default";
+
+		/* GPIOs are board-specific */
+		led_r: led-r {
+			color = <LED_COLOR_ID_RED>;
+			default-state = "on";
+			function = LED_FUNCTION_INDICATOR;
+		};
+
+		led_g: led-g {
+			color = <LED_COLOR_ID_GREEN>;
+			default-state = "off";
+			function = LED_FUNCTION_INDICATOR;
+		};
+
+		led_b: led-b {
+			color = <LED_COLOR_ID_BLUE>;
+			default-state = "off";
+			function = LED_FUNCTION_INDICATOR;
+		};
+	};
+};
+
+&bam_dmux {
+	status = "okay";
+};
+
+&bam_dmux_dma {
+	status = "okay";
+};
+
+&blsp1_uart2 {
+	status = "okay";
+};
+
+/* Remove &dsi_phy0 from clocks to make sure that gcc probes with display disabled */
+&gcc {
+	clocks = <&xo_board>, <&sleep_clk>, <0>, <0>, <0>, <0>, <0>;
+};
+
+&mpss {
+	pinctrl-0 = <&sim_ctrl_default>;
+	pinctrl-names = "default";
+
+	status = "okay";
+};
+
+&pm8916_usbin {
+	status = "okay";
+};
+
+&pronto {
+	status = "okay";
+};
+
+&sdhc_1 {
+	pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on>;
+	pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off>;
+	pinctrl-names = "default", "sleep";
+
+	status = "okay";
+};
+
+&usb {
+	extcon = <&pm8916_usbin>;
+	dr_mode = "peripheral";
+
+	status = "okay";
+};
+
+&usb_hs_phy {
+	extcon = <&pm8916_usbin>;
+};
+
+&smd_rpm_regulators {
+	vdd_l1_l2_l3-supply = <&pm8916_s3>;
+	vdd_l4_l5_l6-supply = <&pm8916_s4>;
+	vdd_l7-supply = <&pm8916_s4>;
+
+	s3 {
+		regulator-min-microvolt = <1200000>;
+		regulator-max-microvolt = <1300000>;
+	};
+
+	s4 {
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <2100000>;
+	};
+
+	l1 {
+		regulator-min-microvolt = <1225000>;
+		regulator-max-microvolt = <1225000>;
+	};
+
+	l2 {
+		regulator-min-microvolt = <1200000>;
+		regulator-max-microvolt = <1200000>;
+	};
+
+	l4 {
+		regulator-min-microvolt = <2050000>;
+		regulator-max-microvolt = <2050000>;
+	};
+
+	l5 {
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <1800000>;
+	};
+
+	l6 {
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <1800000>;
+	};
+
+	l7 {
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <1800000>;
+	};
+
+	l8 {
+		regulator-min-microvolt = <2850000>;
+		regulator-max-microvolt = <2900000>;
+	};
+
+	l9 {
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+	};
+
+	l10 {
+		regulator-min-microvolt = <2700000>;
+		regulator-max-microvolt = <2800000>;
+	};
+
+	l11 {
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <2950000>;
+		regulator-system-load = <200000>;
+		regulator-allow-set-load;
+	};
+
+	l12 {
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <2950000>;
+	};
+
+	l13 {
+		regulator-min-microvolt = <3075000>;
+		regulator-max-microvolt = <3075000>;
+	};
+
+	l14 {
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <3300000>;
+	};
+
+	l15 {
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <3300000>;
+	};
+
+	l16 {
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <3300000>;
+	};
+
+	l17 {
+		regulator-min-microvolt = <2850000>;
+		regulator-max-microvolt = <2850000>;
+	};
+
+	l18 {
+		regulator-min-microvolt = <2700000>;
+		regulator-max-microvolt = <2700000>;
+	};
+};
+
+&msmgpio {
+	/* pins are board-specific */
+	button_default: button-default-state {
+		function = "gpio";
+		drive-strength = <2>;
+	};
+
+	gpio_leds_default: gpio-leds-default-state {
+		function = "gpio";
+		drive-strength = <2>;
+		bias-disable;
+	};
+
+	sim_ctrl_default: sim-ctrl-default-state {
+		function = "gpio";
+		drive-strength = <2>;
+		bias-disable;
+		output-low;
+	};
+};
-- 
2.39.0


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH 2/3] dt-bindings: qcom: Ducument bindings for new msm8916-zhihe-uf896 and msm8916-zhihe-ufi001c
  2023-01-10 15:50 ` [PATCH 2/3] dt-bindings: qcom: Ducument bindings for new msm8916-zhihe-uf896 and msm8916-zhihe-ufi001c Yang Xiwen
@ 2023-01-10 16:31   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 14+ messages in thread
From: Krzysztof Kozlowski @ 2023-01-10 16:31 UTC (permalink / raw)
  To: Yang Xiwen, Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Rob Herring, Krzysztof Kozlowski, linux-arm-msm, devicetree,
	linux-kernel
  Cc: Jaime Breva, Nikita Travkin, ~postmarketos/upstreaming

On 10/01/2023 16:50, Yang Xiwen wrote:
> 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

> 
> Signed-off-by: Yang Xiwen <forbidden405@foxmail.com>
> ---
>  Documentation/devicetree/bindings/arm/qcom.yaml | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/arm/qcom.yaml b/Documentation/devicetree/bindings/arm/qcom.yaml
> index 65ef7e442da0d..efe5f6c384b69 100644
> --- a/Documentation/devicetree/bindings/arm/qcom.yaml
> +++ b/Documentation/devicetree/bindings/arm/qcom.yaml
> @@ -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".

>            - const: qcom,msm8916
>  
>        - items:

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/3] dt-bindings: vendor-prefixes: add zhihe
  2023-01-10 15:50 ` [PATCH 1/3] dt-bindings: vendor-prefixes: add zhihe Yang Xiwen
@ 2023-01-10 16:32   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 14+ messages in thread
From: Krzysztof Kozlowski @ 2023-01-10 16:32 UTC (permalink / raw)
  To: Yang Xiwen, Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Rob Herring, Krzysztof Kozlowski, linux-arm-msm, devicetree,
	linux-kernel
  Cc: Jaime Breva, Nikita Travkin, ~postmarketos/upstreaming

On 10/01/2023 16:50, Yang Xiwen wrote:
> 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


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 3/3] arm64: dts: qcom: msm8916-zhihe: Add initial device tree for zhihe Wifi/LTE dongle UFI-001C and uf896
  2023-01-10 15:50 ` [PATCH 3/3] arm64: dts: qcom: msm8916-zhihe: Add initial device tree for zhihe Wifi/LTE dongle UFI-001C and uf896 Yang Xiwen
@ 2023-01-10 16:35   ` Krzysztof Kozlowski
  2023-01-10 18:17     ` forbidden405
  2023-01-19  0:24   ` Bjorn Andersson
  1 sibling, 1 reply; 14+ messages in thread
From: Krzysztof Kozlowski @ 2023-01-10 16:35 UTC (permalink / raw)
  To: Yang Xiwen, Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Rob Herring, Krzysztof Kozlowski, linux-arm-msm, devicetree,
	linux-kernel
  Cc: Jaime Breva, Nikita Travkin, ~postmarketos/upstreaming

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?

> 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


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 3/3] arm64: dts: qcom: msm8916-zhihe: Add initial device tree for zhihe Wifi/LTE dongle UFI-001C and uf896
  2023-01-10 16:35   ` Krzysztof Kozlowski
@ 2023-01-10 18:17     ` forbidden405
  2023-01-10 18:29       ` Krzysztof Kozlowski
  0 siblings, 1 reply; 14+ messages in thread
From: forbidden405 @ 2023-01-10 18:17 UTC (permalink / raw)
  To: 'Krzysztof Kozlowski', 'Andy Gross',
	'Bjorn Andersson', 'Konrad Dybcio',
	'Rob Herring', 'Krzysztof Kozlowski',
	linux-arm-msm, devicetree, linux-kernel

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



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 3/3] arm64: dts: qcom: msm8916-zhihe: Add initial device tree for zhihe Wifi/LTE dongle UFI-001C and uf896
  2023-01-10 18:17     ` forbidden405
@ 2023-01-10 18:29       ` Krzysztof Kozlowski
  2023-01-10 18:58         ` forbidden405
  0 siblings, 1 reply; 14+ messages in thread
From: Krzysztof Kozlowski @ 2023-01-10 18:29 UTC (permalink / raw)
  To: forbidden405, 'Andy Gross', 'Bjorn Andersson',
	'Konrad Dybcio', 'Rob Herring',
	'Krzysztof Kozlowski',
	linux-arm-msm, devicetree, linux-kernel

On 10/01/2023 19:17, forbidden405@foxmail.com 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


^ permalink raw reply	[flat|nested] 14+ messages in thread

* RE: [PATCH 3/3] arm64: dts: qcom: msm8916-zhihe: Add initial device tree for zhihe Wifi/LTE dongle UFI-001C and uf896
  2023-01-10 18:29       ` Krzysztof Kozlowski
@ 2023-01-10 18:58         ` forbidden405
  2023-01-10 19:25           ` Krzysztof Kozlowski
  0 siblings, 1 reply; 14+ messages in thread
From: forbidden405 @ 2023-01-10 18:58 UTC (permalink / raw)
  To: 'Krzysztof Kozlowski', 'Andy Gross',
	'Bjorn Andersson', 'Konrad Dybcio',
	'Rob Herring', 'Krzysztof Kozlowski',
	linux-arm-msm, devicetree, linux-kernel
  Cc: 'Jaime Breva',
	~postmarketos/upstreaming, 'Nikita Travkin'

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

> On 10/01/2023 19:30 krzysztof.kozlowski@linaro.org 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 



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 3/3] arm64: dts: qcom: msm8916-zhihe: Add initial device tree for zhihe Wifi/LTE dongle UFI-001C and uf896
  2023-01-10 18:58         ` forbidden405
@ 2023-01-10 19:25           ` Krzysztof Kozlowski
  2023-01-10 19:56             ` forbidden405
  0 siblings, 1 reply; 14+ messages in thread
From: Krzysztof Kozlowski @ 2023-01-10 19:25 UTC (permalink / raw)
  To: forbidden405, 'Andy Gross', 'Bjorn Andersson',
	'Konrad Dybcio', 'Rob Herring',
	'Krzysztof Kozlowski',
	linux-arm-msm, devicetree, linux-kernel
  Cc: 'Jaime Breva',
	~postmarketos/upstreaming, 'Nikita Travkin'

On 10/01/2023 19:58, forbidden405@foxmail.com wrote:
> I removed Cc temporary because I had sent them the same email once. No need
> to send the email to them again.
> 
>> On 10/01/2023 19:30 krzysztof.kozlowski@linaro.org 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.

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


^ permalink raw reply	[flat|nested] 14+ messages in thread

* RE: [PATCH 3/3] arm64: dts: qcom: msm8916-zhihe: Add initial device tree for zhihe Wifi/LTE dongle UFI-001C and uf896
  2023-01-10 19:25           ` Krzysztof Kozlowski
@ 2023-01-10 19:56             ` forbidden405
  2023-01-11  9:06               ` Krzysztof Kozlowski
  0 siblings, 1 reply; 14+ messages in thread
From: forbidden405 @ 2023-01-10 19:56 UTC (permalink / raw)
  To: 'Krzysztof Kozlowski', 'Andy Gross',
	'Bjorn Andersson', 'Konrad Dybcio',
	'Rob Herring', 'Krzysztof Kozlowski',
	linux-arm-msm, devicetree, linux-kernel
  Cc: 'Jaime Breva',
	~postmarketos/upstreaming, 'Nikita Travkin'

On 10/01/2023 20:32, krzysztof.kozlowski@linaro.org wrote:
> 
> 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?

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.


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 3/3] arm64: dts: qcom: msm8916-zhihe: Add initial device tree for zhihe Wifi/LTE dongle UFI-001C and uf896
  2023-01-10 19:56             ` forbidden405
@ 2023-01-11  9:06               ` Krzysztof Kozlowski
  2023-01-11 10:21                 ` forbidden405
  0 siblings, 1 reply; 14+ messages in thread
From: Krzysztof Kozlowski @ 2023-01-11  9:06 UTC (permalink / raw)
  To: forbidden405, 'Andy Gross', 'Bjorn Andersson',
	'Konrad Dybcio', 'Rob Herring',
	'Krzysztof Kozlowski',
	linux-arm-msm, devicetree, linux-kernel
  Cc: 'Jaime Breva',
	~postmarketos/upstreaming, 'Nikita Travkin'

On 10/01/2023 20:56, forbidden405@foxmail.com wrote:
> On 10/01/2023 20:32, krzysztof.kozlowski@linaro.org wrote:
>>
>> 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?
> 
> 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


^ permalink raw reply	[flat|nested] 14+ messages in thread

* RE: [PATCH 3/3] arm64: dts: qcom: msm8916-zhihe: Add initial device tree for zhihe Wifi/LTE dongle UFI-001C and uf896
  2023-01-11  9:06               ` Krzysztof Kozlowski
@ 2023-01-11 10:21                 ` forbidden405
  0 siblings, 0 replies; 14+ messages in thread
From: forbidden405 @ 2023-01-11 10:21 UTC (permalink / raw)
  To: 'Krzysztof Kozlowski', 'Andy Gross',
	'Bjorn Andersson', 'Konrad Dybcio',
	'Rob Herring', 'Krzysztof Kozlowski',
	linux-arm-msm, devicetree, linux-kernel
  Cc: 'Jaime Breva',
	~postmarketos/upstreaming, 'Nikita Travkin'

On 11/01/2023 09:32, krzysztof.kozlowski@linaro.org 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.


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 3/3] arm64: dts: qcom: msm8916-zhihe: Add initial device tree for zhihe Wifi/LTE dongle UFI-001C and uf896
  2023-01-10 15:50 ` [PATCH 3/3] arm64: dts: qcom: msm8916-zhihe: Add initial device tree for zhihe Wifi/LTE dongle UFI-001C and uf896 Yang Xiwen
  2023-01-10 16:35   ` Krzysztof Kozlowski
@ 2023-01-19  0:24   ` Bjorn Andersson
  1 sibling, 0 replies; 14+ messages in thread
From: Bjorn Andersson @ 2023-01-19  0:24 UTC (permalink / raw)
  To: Yang Xiwen
  Cc: Andy Gross, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	linux-arm-msm, devicetree, linux-kernel, Jaime Breva,
	Nikita Travkin, ~postmarketos/upstreaming

On Tue, Jan 10, 2023 at 11:50:14PM +0800, Yang Xiwen wrote:
> 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
> 
> Co-developed-by: Jaime Breva <jbreva@nayarsystems.com>
> Signed-off-by: Jaime Breva <jbreva@nayarsystems.com>
> Co-developed-by: Nikita Travkin <nikita@trvn.ru>
> Signed-off-by: Nikita Travkin <nikita@trvn.ru>
> Signed-off-by: Yang Xiwen <forbidden405@foxmail.com>
> ---
>  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
> 
> diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
> index b42362c7be1bf..7abc7bb19c9fc 100644
> --- a/arch/arm64/boot/dts/qcom/Makefile
> +++ b/arch/arm64/boot/dts/qcom/Makefile
> @@ -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
> diff --git a/arch/arm64/boot/dts/qcom/msm8916-zhihe-uf896.dts b/arch/arm64/boot/dts/qcom/msm8916-zhihe-uf896.dts
> new file mode 100644
> index 0000000000000..2ddceb1d8b210
> --- /dev/null
> +++ b/arch/arm64/boot/dts/qcom/msm8916-zhihe-uf896.dts
> @@ -0,0 +1,41 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +
> +/dts-v1/;
> +
> +#include "msm8916-zhihe.dtsi"
> +
> +/ {
> +	model = "uf896 4G Modem Stick";
> +	compatible = "zhihe,uf896", "qcom,msm8916";
> +};
> +
> +&button_restart {

Please sort nodes alphabetically.

> +	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";
> +};
> diff --git a/arch/arm64/boot/dts/qcom/msm8916-zhihe-ufi001c.dts b/arch/arm64/boot/dts/qcom/msm8916-zhihe-ufi001c.dts
> new file mode 100644
> index 0000000000000..715874a2b8650
> --- /dev/null
> +++ b/arch/arm64/boot/dts/qcom/msm8916-zhihe-ufi001c.dts
> @@ -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 {

Same here, please sort alphabetically.

Regards,
Bjorn

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2023-01-19  0:24 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20230110155014.31664-1-forbidden405@foxmail.com>
2023-01-10 15:50 ` [PATCH 1/3] dt-bindings: vendor-prefixes: add zhihe Yang Xiwen
2023-01-10 16:32   ` Krzysztof Kozlowski
2023-01-10 15:50 ` [PATCH 2/3] dt-bindings: qcom: Ducument bindings for new msm8916-zhihe-uf896 and msm8916-zhihe-ufi001c Yang Xiwen
2023-01-10 16:31   ` Krzysztof Kozlowski
2023-01-10 15:50 ` [PATCH 3/3] arm64: dts: qcom: msm8916-zhihe: Add initial device tree for zhihe Wifi/LTE dongle UFI-001C and uf896 Yang Xiwen
2023-01-10 16:35   ` Krzysztof Kozlowski
2023-01-10 18:17     ` forbidden405
2023-01-10 18:29       ` Krzysztof Kozlowski
2023-01-10 18:58         ` forbidden405
2023-01-10 19:25           ` Krzysztof Kozlowski
2023-01-10 19:56             ` forbidden405
2023-01-11  9:06               ` Krzysztof Kozlowski
2023-01-11 10:21                 ` forbidden405
2023-01-19  0:24   ` Bjorn Andersson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.