All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Add F(x)tec Pro1X (QX1050) DTS
@ 2023-05-05 17:12 Dang Huynh
  2023-05-05 17:12 ` [PATCH v2 1/2] arm64: dts: qcom: Add Fxtec " Dang Huynh
  2023-05-05 17:12 ` [PATCH v2 2/2] dt-bindings: arm: qcom: Add Fxtec Pro1X Dang Huynh
  0 siblings, 2 replies; 11+ messages in thread
From: Dang Huynh @ 2023-05-05 17:12 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski
  Cc: linux-arm-msm, devicetree, linux-kernel, Dang Huynh

The F(x)tec Pro1X is a mobile phone released by FX Technologies Ltd
in 2022.

The phone is exactly the same as the Pro1 released in 2019 with some
changes:
- MSM8998 -> SM6115
- Camera button is no longer multistate
- Only one 48MP back camera
- A new keyboard layout picked by the community.

Signed-off-by: Dang Huynh <danct12@riseup.net>
---
Changes in v2:
- Corrected model property in DTS. 
- Changes requested by Caleb and Krzysztof. 
- Link to v1: https://lore.kernel.org/r/20230505-fxtec-pro1x-support-v1-1-1d9473b4d6e4@riseup.net

---
Dang Huynh (2):
      arm64: dts: qcom: Add Fxtec Pro1X (QX1050) DTS
      dt-bindings: arm: qcom: Add Fxtec Pro1X

 Documentation/devicetree/bindings/arm/qcom.yaml |   1 +
 arch/arm64/boot/dts/qcom/Makefile               |   1 +
 arch/arm64/boot/dts/qcom/sm6115-fxtec-pro1x.dts | 248 ++++++++++++++++++++++++
 3 files changed, 250 insertions(+)
---
base-commit: 145e5cddfe8b4bf607510b2dcf630d95f4db420f
change-id: 20230505-fxtec-pro1x-support-7f782f0480e9

Best regards,
-- 
Dang Huynh <danct12@riseup.net>


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

* [PATCH v2 1/2] arm64: dts: qcom: Add Fxtec Pro1X (QX1050) DTS
  2023-05-05 17:12 [PATCH v2 0/2] Add F(x)tec Pro1X (QX1050) DTS Dang Huynh
@ 2023-05-05 17:12 ` Dang Huynh
  2023-05-05 17:59   ` Krzysztof Kozlowski
  2023-05-05 18:41   ` Konrad Dybcio
  2023-05-05 17:12 ` [PATCH v2 2/2] dt-bindings: arm: qcom: Add Fxtec Pro1X Dang Huynh
  1 sibling, 2 replies; 11+ messages in thread
From: Dang Huynh @ 2023-05-05 17:12 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski
  Cc: linux-arm-msm, devicetree, linux-kernel, Dang Huynh

The F(x)tec Pro1X is a mobile phone released by FX Technologies Ltd
in 2022.

The phone is exactly the same as the Pro1 released in 2019 with some
changes:
- MSM8998 -> SM6115
- Camera button is no longer multistate
- Only one 48MP back camera
- A new keyboard layout picked by the community.

This commit has the following features working:
- Display (using simplefb)
- UFS
- Power and volume buttons
- Pinctrl
- RPM Regulators
- USB (Device Mode)

To get a successful boot run:

cat arch/arm64/boot/Image.gz arch/arm64/boot/dts/qcom/\
sm6115-fxtec-pro1x.dtb  > .Image.gz-dtb

mkbootimg --kernel .Image.gz-dtb \
--ramdisk initrd.img \
--base 0x0 \
--kernel_offset 0x8000 \
--ramdisk_offset 0x1000000 \
--second_offset 0xf00000 \
--tags_offset 0x100 \
--pagesize 4096 \
--cmdline "CMDLINE HERE" \
-o qx1050-boot.img

fastboot flash boot qx1050-boot.img
fastboot erase dtbo
fastboot reboot

Signed-off-by: Dang Huynh <danct12@riseup.net>
---
 arch/arm64/boot/dts/qcom/Makefile               |   1 +
 arch/arm64/boot/dts/qcom/sm6115-fxtec-pro1x.dts | 248 ++++++++++++++++++++++++
 2 files changed, 249 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
index d42c59572ace..e311ba675f35 100644
--- a/arch/arm64/boot/dts/qcom/Makefile
+++ b/arch/arm64/boot/dts/qcom/Makefile
@@ -174,6 +174,7 @@ dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-shift-axolotl.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sdm850-lenovo-yoga-c630.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sdm850-samsung-w737.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm4250-oneplus-billie2.dtb
+dtb-$(CONFIG_ARCH_QCOM)	+= sm6115-fxtec-pro1x.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm6115p-lenovo-j606f.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm6125-sony-xperia-seine-pdx201.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm6125-xiaomi-laurel-sprout.dtb
diff --git a/arch/arm64/boot/dts/qcom/sm6115-fxtec-pro1x.dts b/arch/arm64/boot/dts/qcom/sm6115-fxtec-pro1x.dts
new file mode 100644
index 000000000000..a9ff1d9534ae
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/sm6115-fxtec-pro1x.dts
@@ -0,0 +1,248 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright (c) 2023, Dang Huynh <danct12@riseup.net>
+ */
+
+/dts-v1/;
+
+#include "sm6115.dtsi"
+#include "pm6125.dtsi"
+
+/ {
+	model = "F(x)tec Pro1X (QX1050)";
+	compatible = "fxtec,pro1x", "qcom,sm6115";
+	chassis-type = "handset";
+
+	qcom,msm-id = <417 0x10000>, <444 0x10000>;
+	qcom,board-id = <34 0>;
+
+	chosen {
+		#address-cells = <2>;
+		#size-cells = <2>;
+		ranges;
+
+		framebuffer0: framebuffer@5c000000 {
+			compatible = "simple-framebuffer";
+			reg = <0 0x5c000000 0 (1080 * 2160 * 4)>;
+			width = <1080>;
+			height = <2160>;
+			stride = <(1080 * 4)>;
+			format = "a8r8g8b8";
+			clocks = <&gcc GCC_DISP_HF_AXI_CLK>;
+		};
+	};
+
+	gpio-keys {
+		compatible = "gpio-keys";
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&vol_up_n>;
+
+		key-volume-up {
+			label = "Volume Up";
+			linux,code = <KEY_VOLUMEUP>;
+			gpios = <&pm6125_gpios 5 GPIO_ACTIVE_LOW>;
+			debounce-interval = <15>;
+			linux,can-disable;
+			gpio-key,wakeup;
+		};
+	};
+};
+
+&dispcc {
+	/* HACK: disable until a panel driver is ready to retain simplefb */
+	status = "disabled";
+};
+
+&pm6125_gpios {
+	vol_up_n: vol-up-n-state {
+		pins = "gpio5";
+		function = "normal";
+		power-source = <0>;
+		bias-pull-up;
+		input-enable;
+	};
+};
+
+&pon_pwrkey {
+	status = "okay";
+};
+
+&pon_resin {
+	linux,code = <KEY_VOLUMEDOWN>;
+	status = "okay";
+};
+
+&rpm_requests {
+	pm6125-regulators {
+		compatible = "qcom,rpm-pm6125-regulators";
+
+		vreg_s6a: s6 {
+			regulator-min-microvolt = <304000>;
+			regulator-max-microvolt = <1456000>;
+		};
+
+		vreg_s7a: s7 {
+			regulator-min-microvolt = <1280000>;
+			regulator-max-microvolt = <2040000>;
+		};
+
+		vreg_s8a: s8 {
+			regulator-min-microvolt = <1064000>;
+			regulator-max-microvolt = <1304000>;
+		};
+
+		vreg_l1a: l1 {
+			regulator-min-microvolt = <952000>;
+			regulator-max-microvolt = <1152000>;
+		};
+
+		vreg_l4a: l4 {
+			regulator-min-microvolt = <488000>;
+			regulator-max-microvolt = <1000000>;
+		};
+
+		vreg_l5a: l5 {
+			regulator-min-microvolt = <1648000>;
+			regulator-max-microvolt = <3056000>;
+		};
+
+		vreg_l6a: l6 {
+			regulator-min-microvolt = <576000>;
+			regulator-max-microvolt = <656000>;
+		};
+
+		vreg_l7a: l7 {
+			regulator-min-microvolt = <1200000>;
+			regulator-max-microvolt = <1304000>;
+		};
+
+		vreg_l8a: l8 {
+			regulator-min-microvolt = <400000>;
+			regulator-max-microvolt = <728000>;
+		};
+
+		vreg_l9a: l9 {
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <2000000>;
+		};
+
+		vreg_l10a: l10 {
+			regulator-min-microvolt = <1704000>;
+			regulator-max-microvolt = <1904000>;
+		};
+
+		vreg_l11a: l11 {
+			regulator-min-microvolt = <1704000>;
+			regulator-max-microvolt = <1952000>;
+		};
+
+		vreg_l12a: l12 {
+			regulator-min-microvolt = <1624000>;
+			regulator-max-microvolt = <1984000>;
+		};
+
+		vreg_l13a: l13 {
+			regulator-min-microvolt = <1504000>;
+			regulator-max-microvolt = <1952000>;
+		};
+
+		vreg_l14a: l14 {
+			regulator-min-microvolt = <1704000>;
+			regulator-max-microvolt = <1904000>;
+		};
+
+		vreg_l15a: l15 {
+			regulator-min-microvolt = <2920000>;
+			regulator-max-microvolt = <3232000>;
+		};
+
+		vreg_l16a: l16 {
+			regulator-min-microvolt = <1704000>;
+			regulator-max-microvolt = <1904000>;
+		};
+
+		vreg_l17a: l17 {
+			regulator-min-microvolt = <1152000>;
+			regulator-max-microvolt = <1384000>;
+		};
+
+		vreg_l18a: l18 {
+			regulator-min-microvolt = <1104000>;
+			regulator-max-microvolt = <1312000>;
+		};
+
+		vreg_l19a: l19 {
+			regulator-min-microvolt = <1624000>;
+			regulator-max-microvolt = <3304000>;
+		};
+
+		vreg_l20a: l20 {
+			regulator-min-microvolt = <1624000>;
+			regulator-max-microvolt = <3304000>;
+		};
+
+		vreg_l21a: l21 {
+			regulator-min-microvolt = <2400000>;
+			regulator-max-microvolt = <3600000>;
+		};
+
+		vreg_l22a: l22 {
+			regulator-min-microvolt = <2952000>;
+			regulator-max-microvolt = <3304000>;
+		};
+
+		vreg_l23a: l23 {
+			regulator-min-microvolt = <3200000>;
+			regulator-max-microvolt = <3400000>;
+		};
+
+		vreg_l24a: l24 {
+			regulator-min-microvolt = <2704000>;
+			regulator-max-microvolt = <3600000>;
+		};
+	};
+};
+
+&xo_board {
+	clock-frequency = <19200000>;
+};
+
+&sleep_clk {
+	clock-frequency = <32764>;
+};
+
+&tlmm {
+	gpio-reserved-ranges = <0 4>, <14 4>;
+};
+
+&ufs_mem_hc {
+	vcc-supply = <&vreg_l24a>;
+	vcc-max-microamp = <600000>;
+	vccq2-supply = <&vreg_l11a>;
+	vccq2-max-microamp = <600000>;
+	status = "okay";
+};
+
+&ufs_mem_phy {
+	vdda-phy-supply = <&vreg_l4a>;
+	vdda-pll-supply = <&vreg_l12a>;
+	vddp-ref-clk-supply = <&vreg_l18a>;
+	status = "okay";
+};
+
+&usb {
+	status = "okay";
+};
+
+&usb_dwc3 {
+	maximum-speed = "high-speed";
+	dr_mode = "peripheral";
+};
+
+&usb_hsphy {
+	vdd-supply = <&vreg_l4a>;
+	vdda-pll-supply = <&vreg_l12a>;
+	vdda-phy-dpdm-supply = <&vreg_l15a>;
+	status = "okay";
+};

-- 
2.40.1


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

* [PATCH v2 2/2] dt-bindings: arm: qcom: Add Fxtec Pro1X
  2023-05-05 17:12 [PATCH v2 0/2] Add F(x)tec Pro1X (QX1050) DTS Dang Huynh
  2023-05-05 17:12 ` [PATCH v2 1/2] arm64: dts: qcom: Add Fxtec " Dang Huynh
@ 2023-05-05 17:12 ` Dang Huynh
  2023-05-05 17:59   ` Krzysztof Kozlowski
  1 sibling, 1 reply; 11+ messages in thread
From: Dang Huynh @ 2023-05-05 17:12 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski
  Cc: linux-arm-msm, devicetree, linux-kernel, Dang Huynh

Document F(x)tec Pro1X as a SM6115 device.

Signed-off-by: Dang Huynh <danct12@riseup.net>
---
 Documentation/devicetree/bindings/arm/qcom.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/arm/qcom.yaml b/Documentation/devicetree/bindings/arm/qcom.yaml
index d9dd25695c3d..49df4fbf920d 100644
--- a/Documentation/devicetree/bindings/arm/qcom.yaml
+++ b/Documentation/devicetree/bindings/arm/qcom.yaml
@@ -884,6 +884,7 @@ properties:
 
       - items:
           - enum:
+              - fxtec,pro1x
               - lenovo,j606f
           - const: qcom,sm6115p
           - const: qcom,sm6115

-- 
2.40.1


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

* Re: [PATCH v2 2/2] dt-bindings: arm: qcom: Add Fxtec Pro1X
  2023-05-05 17:12 ` [PATCH v2 2/2] dt-bindings: arm: qcom: Add Fxtec Pro1X Dang Huynh
@ 2023-05-05 17:59   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 11+ messages in thread
From: Krzysztof Kozlowski @ 2023-05-05 17:59 UTC (permalink / raw)
  To: Dang Huynh, Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Rob Herring, Krzysztof Kozlowski
  Cc: linux-arm-msm, devicetree, linux-kernel

On 05/05/2023 19:12, Dang Huynh wrote:
> Document F(x)tec Pro1X as a SM6115 device.
> 

Which part of the comment "Missing bindings (first patch in the
series)." suggested to put it second in the series?


Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof


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

* Re: [PATCH v2 1/2] arm64: dts: qcom: Add Fxtec Pro1X (QX1050) DTS
  2023-05-05 17:12 ` [PATCH v2 1/2] arm64: dts: qcom: Add Fxtec " Dang Huynh
@ 2023-05-05 17:59   ` Krzysztof Kozlowski
  2023-05-05 18:41   ` Konrad Dybcio
  1 sibling, 0 replies; 11+ messages in thread
From: Krzysztof Kozlowski @ 2023-05-05 17:59 UTC (permalink / raw)
  To: Dang Huynh, Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Rob Herring, Krzysztof Kozlowski
  Cc: linux-arm-msm, devicetree, linux-kernel

On 05/05/2023 19:12, Dang Huynh wrote:
> The F(x)tec Pro1X is a mobile phone released by FX Technologies Ltd
> in 2022.
> 
> The phone is exactly the same as the Pro1 released in 2019 with some
> changes:
> - MSM8998 -> SM6115
> - Camera button is no longer multistate
> - Only one 48MP back camera
> - A new keyboard layout picked by the community.
> 
> This commit has the following features working:
> - Display (using simplefb)
> - UFS
> - Power and volume buttons
> - Pinctrl
> - RPM Regulators
> - USB (Device Mode)
> 
> To get a successful boot run:
> 
> cat arch/arm64/boot/Image.gz arch/arm64/boot/dts/qcom/\
> sm6115-fxtec-pro1x.dtb  > .Image.gz-dtb
> 
> mkbootimg --kernel .Image.gz-dtb \
> --ramdisk initrd.img \
> --base 0x0 \
> --kernel_offset 0x8000 \
> --ramdisk_offset 0x1000000 \
> --second_offset 0xf00000 \
> --tags_offset 0x100 \
> --pagesize 4096 \
> --cmdline "CMDLINE HERE" \
> -o qx1050-boot.img
> 
> fastboot flash boot qx1050-boot.img
> fastboot erase dtbo
> fastboot reboot
> 
> Signed-off-by: Dang Huynh <danct12@riseup.net>
> ---
>  arch/arm64/boot/dts/qcom/Makefile               |   1 +
>  arch/arm64/boot/dts/qcom/sm6115-fxtec-pro1x.dts | 248 ++++++++++++++++++++++++
>  2 files changed, 249 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
> index d42c59572ace..e311ba675f35 100644
> --- a/arch/arm64/boot/dts/qcom/Makefile
> +++ b/arch/arm64/boot/dts/qcom/Makefile
> @@ -174,6 +174,7 @@ dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-shift-axolotl.dtb
>  dtb-$(CONFIG_ARCH_QCOM)	+= sdm850-lenovo-yoga-c630.dtb
>  dtb-$(CONFIG_ARCH_QCOM)	+= sdm850-samsung-w737.dtb
>  dtb-$(CONFIG_ARCH_QCOM)	+= sm4250-oneplus-billie2.dtb
> +dtb-$(CONFIG_ARCH_QCOM)	+= sm6115-fxtec-pro1x.dtb
>  dtb-$(CONFIG_ARCH_QCOM)	+= sm6115p-lenovo-j606f.dtb
>  dtb-$(CONFIG_ARCH_QCOM)	+= sm6125-sony-xperia-seine-pdx201.dtb
>  dtb-$(CONFIG_ARCH_QCOM)	+= sm6125-xiaomi-laurel-sprout.dtb
> diff --git a/arch/arm64/boot/dts/qcom/sm6115-fxtec-pro1x.dts b/arch/arm64/boot/dts/qcom/sm6115-fxtec-pro1x.dts
> new file mode 100644
> index 000000000000..a9ff1d9534ae
> --- /dev/null
> +++ b/arch/arm64/boot/dts/qcom/sm6115-fxtec-pro1x.dts
> @@ -0,0 +1,248 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +/*
> + * Copyright (c) 2023, Dang Huynh <danct12@riseup.net>
> + */
> +
> +/dts-v1/;
> +
> +#include "sm6115.dtsi"
> +#include "pm6125.dtsi"
> +
> +/ {
> +	model = "F(x)tec Pro1X (QX1050)";
> +	compatible = "fxtec,pro1x", "qcom,sm6115";
> +	chassis-type = "handset";
> +
> +	qcom,msm-id = <417 0x10000>, <444 0x10000>;
> +	qcom,board-id = <34 0>;
> +
> +	chosen {
> +		#address-cells = <2>;
> +		#size-cells = <2>;
> +		ranges;
> +
> +		framebuffer0: framebuffer@5c000000 {
> +			compatible = "simple-framebuffer";
> +			reg = <0 0x5c000000 0 (1080 * 2160 * 4)>;
> +			width = <1080>;
> +			height = <2160>;
> +			stride = <(1080 * 4)>;
> +			format = "a8r8g8b8";
> +			clocks = <&gcc GCC_DISP_HF_AXI_CLK>;
> +		};
> +	};
> +
> +	gpio-keys {
> +		compatible = "gpio-keys";
> +
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&vol_up_n>;
> +
> +		key-volume-up {
> +			label = "Volume Up";
> +			linux,code = <KEY_VOLUMEUP>;
> +			gpios = <&pm6125_gpios 5 GPIO_ACTIVE_LOW>;
> +			debounce-interval = <15>;
> +			linux,can-disable;
> +			gpio-key,wakeup;
> +		};
> +	};
> +};
> +
> +&dispcc {
> +	/* HACK: disable until a panel driver is ready to retain simplefb */
> +	status = "disabled";
> +};
> +
> +&pm6125_gpios {
> +	vol_up_n: vol-up-n-state {
> +		pins = "gpio5";
> +		function = "normal";
> +		power-source = <0>;
> +		bias-pull-up;
> +		input-enable;
> +	};
> +};
> +
> +&pon_pwrkey {
> +	status = "okay";
> +};
> +
> +&pon_resin {
> +	linux,code = <KEY_VOLUMEDOWN>;
> +	status = "okay";
> +};
> +
> +&rpm_requests {
> +	pm6125-regulators {

No improvements.

This is a friendly reminder during the review process.

It seems my previous comments were not fully addressed. Maybe my
feedback got lost between the quotes, maybe you just forgot to apply it.
Please go back to the previous discussion and either implement all
requested changes or keep discussing them.

Thank you.

Best regards,
Krzysztof


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

* Re: [PATCH v2 1/2] arm64: dts: qcom: Add Fxtec Pro1X (QX1050) DTS
  2023-05-05 17:12 ` [PATCH v2 1/2] arm64: dts: qcom: Add Fxtec " Dang Huynh
  2023-05-05 17:59   ` Krzysztof Kozlowski
@ 2023-05-05 18:41   ` Konrad Dybcio
  2023-05-06  1:42     ` Dang Huynh
  2023-05-06 11:48     ` Dmitry Baryshkov
  1 sibling, 2 replies; 11+ messages in thread
From: Konrad Dybcio @ 2023-05-05 18:41 UTC (permalink / raw)
  To: Dang Huynh, Andy Gross, Bjorn Andersson, Rob Herring,
	Krzysztof Kozlowski
  Cc: linux-arm-msm, devicetree, linux-kernel



On 5.05.2023 19:12, Dang Huynh wrote:
> The F(x)tec Pro1X is a mobile phone released by FX Technologies Ltd
> in 2022.
> 
> The phone is exactly the same as the Pro1 released in 2019 with some
> changes:
> - MSM8998 -> SM6115
> - Camera button is no longer multistate
> - Only one 48MP back camera
> - A new keyboard layout picked by the community.
> 
> This commit has the following features working:
> - Display (using simplefb)
> - UFS
> - Power and volume buttons
> - Pinctrl
> - RPM Regulators
> - USB (Device Mode)
> 
> To get a successful boot run:
> 
> cat arch/arm64/boot/Image.gz arch/arm64/boot/dts/qcom/\
> sm6115-fxtec-pro1x.dtb  > .Image.gz-dtb
> 
> mkbootimg --kernel .Image.gz-dtb \
> --ramdisk initrd.img \
> --base 0x0 \
> --kernel_offset 0x8000 \
> --ramdisk_offset 0x1000000 \
> --second_offset 0xf00000 \
> --tags_offset 0x100 \
> --pagesize 4096 \
> --cmdline "CMDLINE HERE" \
> -o qx1050-boot.img
> 
> fastboot flash boot qx1050-boot.img
> fastboot erase dtbo
> fastboot reboot
> 
> Signed-off-by: Dang Huynh <danct12@riseup.net>
> ---
>  arch/arm64/boot/dts/qcom/Makefile               |   1 +
>  arch/arm64/boot/dts/qcom/sm6115-fxtec-pro1x.dts | 248 ++++++++++++++++++++++++
>  2 files changed, 249 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
> index d42c59572ace..e311ba675f35 100644
> --- a/arch/arm64/boot/dts/qcom/Makefile
> +++ b/arch/arm64/boot/dts/qcom/Makefile
> @@ -174,6 +174,7 @@ dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-shift-axolotl.dtb
>  dtb-$(CONFIG_ARCH_QCOM)	+= sdm850-lenovo-yoga-c630.dtb
>  dtb-$(CONFIG_ARCH_QCOM)	+= sdm850-samsung-w737.dtb
>  dtb-$(CONFIG_ARCH_QCOM)	+= sm4250-oneplus-billie2.dtb
> +dtb-$(CONFIG_ARCH_QCOM)	+= sm6115-fxtec-pro1x.dtb
>  dtb-$(CONFIG_ARCH_QCOM)	+= sm6115p-lenovo-j606f.dtb
>  dtb-$(CONFIG_ARCH_QCOM)	+= sm6125-sony-xperia-seine-pdx201.dtb
>  dtb-$(CONFIG_ARCH_QCOM)	+= sm6125-xiaomi-laurel-sprout.dtb
> diff --git a/arch/arm64/boot/dts/qcom/sm6115-fxtec-pro1x.dts b/arch/arm64/boot/dts/qcom/sm6115-fxtec-pro1x.dts
> new file mode 100644
> index 000000000000..a9ff1d9534ae
> --- /dev/null
> +++ b/arch/arm64/boot/dts/qcom/sm6115-fxtec-pro1x.dts
> @@ -0,0 +1,248 @@
> +// SPDX-License-Identifier: GPL-2.0-only
I'm not a licensing expert, but fyi sm6115.dtsi uses (GPL2+ & BSD3)

> +/*
> + * Copyright (c) 2023, Dang Huynh <danct12@riseup.net>
> + */
> +
> +/dts-v1/;
> +
> +#include "sm6115.dtsi"
> +#include "pm6125.dtsi"
> +
> +/ {
> +	model = "F(x)tec Pro1X (QX1050)";
> +	compatible = "fxtec,pro1x", "qcom,sm6115";
> +	chassis-type = "handset";
> +
> +	qcom,msm-id = <417 0x10000>, <444 0x10000>;
Please include include/dt-bindings/arm/qcom,ids.h and use the
defines.

417 corresponds to the weaker version of this SoC, SM4250. It may
not necessarily make sense to add it to the list if we know it
shouldn't be used.

> +	qcom,board-id = <34 0>;
Does the bootloader refuse to boot without these? Some newer
ones don't need it.

In case they are compulsory, you'll have to add the pro1x to the
relevant allOf:if:then: block in bindings.

> +
> +	chosen {
> +		#address-cells = <2>;
> +		#size-cells = <2>;
> +		ranges;
> +
> +		framebuffer0: framebuffer@5c000000 {
> +			compatible = "simple-framebuffer";
> +			reg = <0 0x5c000000 0 (1080 * 2160 * 4)>;
Use 0x0 in reg, please.

> +			width = <1080>;
> +			height = <2160>;
> +			stride = <(1080 * 4)>;
> +			format = "a8r8g8b8";
> +			clocks = <&gcc GCC_DISP_HF_AXI_CLK>;
> +		};
> +	};
> +
> +	gpio-keys {
> +		compatible = "gpio-keys";
> +
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&vol_up_n>;
property-n
property-names

> +
> +		key-volume-up {
> +			label = "Volume Up";
> +			linux,code = <KEY_VOLUMEUP>;
> +			gpios = <&pm6125_gpios 5 GPIO_ACTIVE_LOW>;
> +			debounce-interval = <15>;
> +			linux,can-disable;
> +			gpio-key,wakeup;
> +		};
> +	};
> +};
> +
> +&dispcc {
> +	/* HACK: disable until a panel driver is ready to retain simplefb */
> +	status = "disabled";
> +};
> +
> +&pm6125_gpios {
> +	vol_up_n: vol-up-n-state {
> +		pins = "gpio5";
> +		function = "normal";
> +		power-source = <0>;
> +		bias-pull-up;
> +		input-enable;
> +	};
> +};
> +
> +&pon_pwrkey {
> +	status = "okay";
> +};
> +
> +&pon_resin {
> +	linux,code = <KEY_VOLUMEDOWN>;
> +	status = "okay";
> +};
> +
> +&rpm_requests {
> +	pm6125-regulators {
> +		compatible = "qcom,rpm-pm6125-regulators";
> +
> +		vreg_s6a: s6 {
You can keep the PMIC name apparent by renaming vreg_s6a to
pm6125_s6 etc.

Konrad
> +			regulator-min-microvolt = <304000>;
> +			regulator-max-microvolt = <1456000>;
> +		};
> +
> +		vreg_s7a: s7 {
> +			regulator-min-microvolt = <1280000>;
> +			regulator-max-microvolt = <2040000>;
> +		};
> +
> +		vreg_s8a: s8 {
> +			regulator-min-microvolt = <1064000>;
> +			regulator-max-microvolt = <1304000>;
> +		};
> +
> +		vreg_l1a: l1 {
> +			regulator-min-microvolt = <952000>;
> +			regulator-max-microvolt = <1152000>;
> +		};
> +
> +		vreg_l4a: l4 {
> +			regulator-min-microvolt = <488000>;
> +			regulator-max-microvolt = <1000000>;
> +		};
> +
> +		vreg_l5a: l5 {
> +			regulator-min-microvolt = <1648000>;
> +			regulator-max-microvolt = <3056000>;
> +		};
> +
> +		vreg_l6a: l6 {
> +			regulator-min-microvolt = <576000>;
> +			regulator-max-microvolt = <656000>;
> +		};
> +
> +		vreg_l7a: l7 {
> +			regulator-min-microvolt = <1200000>;
> +			regulator-max-microvolt = <1304000>;
> +		};
> +
> +		vreg_l8a: l8 {
> +			regulator-min-microvolt = <400000>;
> +			regulator-max-microvolt = <728000>;
> +		};
> +
> +		vreg_l9a: l9 {
> +			regulator-min-microvolt = <1800000>;
> +			regulator-max-microvolt = <2000000>;
> +		};
> +
> +		vreg_l10a: l10 {
> +			regulator-min-microvolt = <1704000>;
> +			regulator-max-microvolt = <1904000>;
> +		};
> +
> +		vreg_l11a: l11 {
> +			regulator-min-microvolt = <1704000>;
> +			regulator-max-microvolt = <1952000>;
> +		};
> +
> +		vreg_l12a: l12 {
> +			regulator-min-microvolt = <1624000>;
> +			regulator-max-microvolt = <1984000>;
> +		};
> +
> +		vreg_l13a: l13 {
> +			regulator-min-microvolt = <1504000>;
> +			regulator-max-microvolt = <1952000>;
> +		};
> +
> +		vreg_l14a: l14 {
> +			regulator-min-microvolt = <1704000>;
> +			regulator-max-microvolt = <1904000>;
> +		};
> +
> +		vreg_l15a: l15 {
> +			regulator-min-microvolt = <2920000>;
> +			regulator-max-microvolt = <3232000>;
> +		};
> +
> +		vreg_l16a: l16 {
> +			regulator-min-microvolt = <1704000>;
> +			regulator-max-microvolt = <1904000>;
> +		};
> +
> +		vreg_l17a: l17 {
> +			regulator-min-microvolt = <1152000>;
> +			regulator-max-microvolt = <1384000>;
> +		};
> +
> +		vreg_l18a: l18 {
> +			regulator-min-microvolt = <1104000>;
> +			regulator-max-microvolt = <1312000>;
> +		};
> +
> +		vreg_l19a: l19 {
> +			regulator-min-microvolt = <1624000>;
> +			regulator-max-microvolt = <3304000>;
> +		};
> +
> +		vreg_l20a: l20 {
> +			regulator-min-microvolt = <1624000>;
> +			regulator-max-microvolt = <3304000>;
> +		};
> +
> +		vreg_l21a: l21 {
> +			regulator-min-microvolt = <2400000>;
> +			regulator-max-microvolt = <3600000>;
> +		};
> +
> +		vreg_l22a: l22 {
> +			regulator-min-microvolt = <2952000>;
> +			regulator-max-microvolt = <3304000>;
> +		};
> +
> +		vreg_l23a: l23 {
> +			regulator-min-microvolt = <3200000>;
> +			regulator-max-microvolt = <3400000>;
> +		};
> +
> +		vreg_l24a: l24 {
> +			regulator-min-microvolt = <2704000>;
> +			regulator-max-microvolt = <3600000>;
> +		};
> +	};
> +};
> +
> +&xo_board {
> +	clock-frequency = <19200000>;
> +};
Out of alphabetical order

> +
> +&sleep_clk {
> +	clock-frequency = <32764>;
> +};
> +
> +&tlmm {
> +	gpio-reserved-ranges = <0 4>, <14 4>;
> +};
> +
> +&ufs_mem_hc {
> +	vcc-supply = <&vreg_l24a>;
> +	vcc-max-microamp = <600000>;
> +	vccq2-supply = <&vreg_l11a>;
> +	vccq2-max-microamp = <600000>;
You need `regulator-allow-set-load` on regulators which
set current (i.e. sdhci and ufs/phy regulators)

> +	status = "okay";
> +};
> +
> +&ufs_mem_phy {
> +	vdda-phy-supply = <&vreg_l4a>;
> +	vdda-pll-supply = <&vreg_l12a>;
> +	vddp-ref-clk-supply = <&vreg_l18a>;
> +	status = "okay";
> +};
> +
> +&usb {
> +	status = "okay";
> +};
> +
> +&usb_dwc3 {
> +	maximum-speed = "high-speed";
Do you know whether the phone supports usb3? Usually if that's
the case, you will get usb3 in fastboot.

You'll need an actual usb3 cable to check that though, many claim
that but then don't have the necessary wires connected.

Konrad
> +	dr_mode = "peripheral";
> +};
> +
> +&usb_hsphy {
> +	vdd-supply = <&vreg_l4a>;
> +	vdda-pll-supply = <&vreg_l12a>;
> +	vdda-phy-dpdm-supply = <&vreg_l15a>;
> +	status = "okay";
> +};
> 

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

* Re: [PATCH v2 1/2] arm64: dts: qcom: Add Fxtec Pro1X (QX1050) DTS
  2023-05-05 18:41   ` Konrad Dybcio
@ 2023-05-06  1:42     ` Dang Huynh
  2023-05-06  9:03       ` Konrad Dybcio
  2023-05-06 11:48     ` Dmitry Baryshkov
  1 sibling, 1 reply; 11+ messages in thread
From: Dang Huynh @ 2023-05-06  1:42 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Rob Herring, Krzysztof Kozlowski,
	Konrad Dybcio
  Cc: linux-arm-msm, devicetree, linux-kernel

> > +	qcom,board-id = <34 0>;
> 
> Does the bootloader refuse to boot without these? Some newer
> ones don't need it.
> 
> In case they are compulsory, you'll have to add the pro1x to the
> relevant allOf:if:then: block in bindings.
> 
Tested, nope.

> > +&usb_dwc3 {
> > +	maximum-speed = "high-speed";
> 
> Do you know whether the phone supports usb3? Usually if that's
> the case, you will get usb3 in fastboot.
> 
> You'll need an actual usb3 cable to check that though, many claim
> that but then don't have the necessary wires connected.
I asked around, they said yes but without anything to test on hand, I'm not 
sure.

Should I remove it or something?

Other than that, I've fixed the other issues with the series.

Best regards,
Dang



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

* Re: [PATCH v2 1/2] arm64: dts: qcom: Add Fxtec Pro1X (QX1050) DTS
  2023-05-06  1:42     ` Dang Huynh
@ 2023-05-06  9:03       ` Konrad Dybcio
  0 siblings, 0 replies; 11+ messages in thread
From: Konrad Dybcio @ 2023-05-06  9:03 UTC (permalink / raw)
  To: Dang Huynh, Andy Gross, Bjorn Andersson, Rob Herring,
	Krzysztof Kozlowski
  Cc: linux-arm-msm, devicetree, linux-kernel



On 6.05.2023 03:42, Dang Huynh wrote:
>>> +	qcom,board-id = <34 0>;
>>
>> Does the bootloader refuse to boot without these? Some newer
>> ones don't need it.
>>
>> In case they are compulsory, you'll have to add the pro1x to the
>> relevant allOf:if:then: block in bindings.
>>
> Tested, nope.
> 
>>> +&usb_dwc3 {
>>> +	maximum-speed = "high-speed";
>>
>> Do you know whether the phone supports usb3? Usually if that's
>> the case, you will get usb3 in fastboot.
>>
>> You'll need an actual usb3 cable to check that though, many claim
>> that but then don't have the necessary wires connected.
> I asked around, they said yes but without anything to test on hand, I'm not 
> sure.
> 
> Should I remove it or something?
No, you may get weird behavior. Keep it high-speed for now.

Konrad
> 
> Other than that, I've fixed the other issues with the series.
> 
> Best regards,
> Dang
> 
> 

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

* Re: [PATCH v2 1/2] arm64: dts: qcom: Add Fxtec Pro1X (QX1050) DTS
  2023-05-05 18:41   ` Konrad Dybcio
  2023-05-06  1:42     ` Dang Huynh
@ 2023-05-06 11:48     ` Dmitry Baryshkov
  2023-05-06 12:30       ` Konrad Dybcio
  1 sibling, 1 reply; 11+ messages in thread
From: Dmitry Baryshkov @ 2023-05-06 11:48 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: Dang Huynh, Andy Gross, Bjorn Andersson, Rob Herring,
	Krzysztof Kozlowski, linux-arm-msm, devicetree, linux-kernel

On Fri, 5 May 2023 at 21:41, Konrad Dybcio <konrad.dybcio@linaro.org> wrote:
>
>
>
> On 5.05.2023 19:12, Dang Huynh wrote:
> > The F(x)tec Pro1X is a mobile phone released by FX Technologies Ltd
> > in 2022.
> >
> > The phone is exactly the same as the Pro1 released in 2019 with some
> > changes:
> > - MSM8998 -> SM6115
> > - Camera button is no longer multistate
> > - Only one 48MP back camera
> > - A new keyboard layout picked by the community.
> >
> > This commit has the following features working:
> > - Display (using simplefb)
> > - UFS
> > - Power and volume buttons
> > - Pinctrl
> > - RPM Regulators
> > - USB (Device Mode)
> >
> > To get a successful boot run:
> >
> > cat arch/arm64/boot/Image.gz arch/arm64/boot/dts/qcom/\
> > sm6115-fxtec-pro1x.dtb  > .Image.gz-dtb
> >
> > mkbootimg --kernel .Image.gz-dtb \
> > --ramdisk initrd.img \
> > --base 0x0 \
> > --kernel_offset 0x8000 \
> > --ramdisk_offset 0x1000000 \
> > --second_offset 0xf00000 \
> > --tags_offset 0x100 \
> > --pagesize 4096 \
> > --cmdline "CMDLINE HERE" \
> > -o qx1050-boot.img
> >
> > fastboot flash boot qx1050-boot.img
> > fastboot erase dtbo
> > fastboot reboot
> >
> > Signed-off-by: Dang Huynh <danct12@riseup.net>
> > ---
> >  arch/arm64/boot/dts/qcom/Makefile               |   1 +
> >  arch/arm64/boot/dts/qcom/sm6115-fxtec-pro1x.dts | 248 ++++++++++++++++++++++++
> >  2 files changed, 249 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
> > index d42c59572ace..e311ba675f35 100644
> > --- a/arch/arm64/boot/dts/qcom/Makefile
> > +++ b/arch/arm64/boot/dts/qcom/Makefile
> > @@ -174,6 +174,7 @@ dtb-$(CONFIG_ARCH_QCOM)   += sdm845-shift-axolotl.dtb
> >  dtb-$(CONFIG_ARCH_QCOM)      += sdm850-lenovo-yoga-c630.dtb
> >  dtb-$(CONFIG_ARCH_QCOM)      += sdm850-samsung-w737.dtb
> >  dtb-$(CONFIG_ARCH_QCOM)      += sm4250-oneplus-billie2.dtb
> > +dtb-$(CONFIG_ARCH_QCOM)      += sm6115-fxtec-pro1x.dtb
> >  dtb-$(CONFIG_ARCH_QCOM)      += sm6115p-lenovo-j606f.dtb
> >  dtb-$(CONFIG_ARCH_QCOM)      += sm6125-sony-xperia-seine-pdx201.dtb
> >  dtb-$(CONFIG_ARCH_QCOM)      += sm6125-xiaomi-laurel-sprout.dtb
> > diff --git a/arch/arm64/boot/dts/qcom/sm6115-fxtec-pro1x.dts b/arch/arm64/boot/dts/qcom/sm6115-fxtec-pro1x.dts
> > new file mode 100644
> > index 000000000000..a9ff1d9534ae
> > --- /dev/null
> > +++ b/arch/arm64/boot/dts/qcom/sm6115-fxtec-pro1x.dts
> > @@ -0,0 +1,248 @@
> > +// SPDX-License-Identifier: GPL-2.0-only
> I'm not a licensing expert, but fyi sm6115.dtsi uses (GPL2+ & BSD3)

Yes, we usually ask for the DTs to be dual-licensed, since they may be
e.g. used or distributed as a part of the bootloader.

>

[skipped]

> > +
> > +&rpm_requests {
> > +     pm6125-regulators {
> > +             compatible = "qcom,rpm-pm6125-regulators";
> > +
> > +             vreg_s6a: s6 {
> You can keep the PMIC name apparent by renaming vreg_s6a to
> pm6125_s6 etc.

Hmm, we were usually using the resource-name here, so vreg_s6a is fine
(usually it would be vreg_s6a_0p3 or vreg_s6a_1p5).

>
> Konrad
> > +                     regulator-min-microvolt = <304000>;
> > +                     regulator-max-microvolt = <1456000>;
> > +             };

-- 
With best wishes
Dmitry

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

* Re: [PATCH v2 1/2] arm64: dts: qcom: Add Fxtec Pro1X (QX1050) DTS
  2023-05-06 11:48     ` Dmitry Baryshkov
@ 2023-05-06 12:30       ` Konrad Dybcio
  2023-05-06 12:33         ` Dmitry Baryshkov
  0 siblings, 1 reply; 11+ messages in thread
From: Konrad Dybcio @ 2023-05-06 12:30 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Dang Huynh, Andy Gross, Bjorn Andersson, Rob Herring,
	Krzysztof Kozlowski, linux-arm-msm, devicetree, linux-kernel



On 6.05.2023 13:48, Dmitry Baryshkov wrote:
> On Fri, 5 May 2023 at 21:41, Konrad Dybcio <konrad.dybcio@linaro.org> wrote:
>>
>>
>>
>> On 5.05.2023 19:12, Dang Huynh wrote:
>>> The F(x)tec Pro1X is a mobile phone released by FX Technologies Ltd
>>> in 2022.
>>>
>>> The phone is exactly the same as the Pro1 released in 2019 with some
>>> changes:
>>> - MSM8998 -> SM6115
>>> - Camera button is no longer multistate
>>> - Only one 48MP back camera
>>> - A new keyboard layout picked by the community.
>>>
>>> This commit has the following features working:
>>> - Display (using simplefb)
>>> - UFS
>>> - Power and volume buttons
>>> - Pinctrl
>>> - RPM Regulators
>>> - USB (Device Mode)
>>>
>>> To get a successful boot run:
>>>
>>> cat arch/arm64/boot/Image.gz arch/arm64/boot/dts/qcom/\
>>> sm6115-fxtec-pro1x.dtb  > .Image.gz-dtb
>>>
>>> mkbootimg --kernel .Image.gz-dtb \
>>> --ramdisk initrd.img \
>>> --base 0x0 \
>>> --kernel_offset 0x8000 \
>>> --ramdisk_offset 0x1000000 \
>>> --second_offset 0xf00000 \
>>> --tags_offset 0x100 \
>>> --pagesize 4096 \
>>> --cmdline "CMDLINE HERE" \
>>> -o qx1050-boot.img
>>>
>>> fastboot flash boot qx1050-boot.img
>>> fastboot erase dtbo
>>> fastboot reboot
>>>
>>> Signed-off-by: Dang Huynh <danct12@riseup.net>
>>> ---
>>>  arch/arm64/boot/dts/qcom/Makefile               |   1 +
>>>  arch/arm64/boot/dts/qcom/sm6115-fxtec-pro1x.dts | 248 ++++++++++++++++++++++++
>>>  2 files changed, 249 insertions(+)
>>>
>>> diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
>>> index d42c59572ace..e311ba675f35 100644
>>> --- a/arch/arm64/boot/dts/qcom/Makefile
>>> +++ b/arch/arm64/boot/dts/qcom/Makefile
>>> @@ -174,6 +174,7 @@ dtb-$(CONFIG_ARCH_QCOM)   += sdm845-shift-axolotl.dtb
>>>  dtb-$(CONFIG_ARCH_QCOM)      += sdm850-lenovo-yoga-c630.dtb
>>>  dtb-$(CONFIG_ARCH_QCOM)      += sdm850-samsung-w737.dtb
>>>  dtb-$(CONFIG_ARCH_QCOM)      += sm4250-oneplus-billie2.dtb
>>> +dtb-$(CONFIG_ARCH_QCOM)      += sm6115-fxtec-pro1x.dtb
>>>  dtb-$(CONFIG_ARCH_QCOM)      += sm6115p-lenovo-j606f.dtb
>>>  dtb-$(CONFIG_ARCH_QCOM)      += sm6125-sony-xperia-seine-pdx201.dtb
>>>  dtb-$(CONFIG_ARCH_QCOM)      += sm6125-xiaomi-laurel-sprout.dtb
>>> diff --git a/arch/arm64/boot/dts/qcom/sm6115-fxtec-pro1x.dts b/arch/arm64/boot/dts/qcom/sm6115-fxtec-pro1x.dts
>>> new file mode 100644
>>> index 000000000000..a9ff1d9534ae
>>> --- /dev/null
>>> +++ b/arch/arm64/boot/dts/qcom/sm6115-fxtec-pro1x.dts
>>> @@ -0,0 +1,248 @@
>>> +// SPDX-License-Identifier: GPL-2.0-only
>> I'm not a licensing expert, but fyi sm6115.dtsi uses (GPL2+ & BSD3)
> 
> Yes, we usually ask for the DTs to be dual-licensed, since they may be
> e.g. used or distributed as a part of the bootloader.
> 
>>
> 
> [skipped]
> 
>>> +
>>> +&rpm_requests {
>>> +     pm6125-regulators {
>>> +             compatible = "qcom,rpm-pm6125-regulators";
>>> +
>>> +             vreg_s6a: s6 {
>> You can keep the PMIC name apparent by renaming vreg_s6a to
>> pm6125_s6 etc.
> 
> Hmm, we were usually using the resource-name here,
Yeah, but on smd rpm a "resource name" is a very vague concept,
you have a "path" to a resource (which is resolved internally by RPM),
then there's a "type", "key" and "id"

 so vreg_s6a is fine
> (usually it would be vreg_s6a_0p3 or vreg_s6a_1p5).
That naming is *very* problematic if your device isn't a dragonboard/RBx
where you can look up the schematics and leads to a lot of confusion, as
you can't really be sure what voltages are correct until you can confirm
everything works properly on the board :/


Konrad
> 
>>
>> Konrad
>>> +                     regulator-min-microvolt = <304000>;
>>> +                     regulator-max-microvolt = <1456000>;
>>> +             };
> 

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

* Re: [PATCH v2 1/2] arm64: dts: qcom: Add Fxtec Pro1X (QX1050) DTS
  2023-05-06 12:30       ` Konrad Dybcio
@ 2023-05-06 12:33         ` Dmitry Baryshkov
  0 siblings, 0 replies; 11+ messages in thread
From: Dmitry Baryshkov @ 2023-05-06 12:33 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: Dang Huynh, Andy Gross, Bjorn Andersson, Rob Herring,
	Krzysztof Kozlowski, linux-arm-msm, devicetree, linux-kernel

On 06/05/2023 15:30, Konrad Dybcio wrote:
> 
> 
> On 6.05.2023 13:48, Dmitry Baryshkov wrote:
>> On Fri, 5 May 2023 at 21:41, Konrad Dybcio <konrad.dybcio@linaro.org> wrote:
>>>
>>>
>>>
>>> On 5.05.2023 19:12, Dang Huynh wrote:
>>>> The F(x)tec Pro1X is a mobile phone released by FX Technologies Ltd
>>>> in 2022.
>>>>
>>>> The phone is exactly the same as the Pro1 released in 2019 with some
>>>> changes:
>>>> - MSM8998 -> SM6115
>>>> - Camera button is no longer multistate
>>>> - Only one 48MP back camera
>>>> - A new keyboard layout picked by the community.
>>>>
>>>> This commit has the following features working:
>>>> - Display (using simplefb)
>>>> - UFS
>>>> - Power and volume buttons
>>>> - Pinctrl
>>>> - RPM Regulators
>>>> - USB (Device Mode)
>>>>
>>>> To get a successful boot run:
>>>>
>>>> cat arch/arm64/boot/Image.gz arch/arm64/boot/dts/qcom/\
>>>> sm6115-fxtec-pro1x.dtb  > .Image.gz-dtb
>>>>
>>>> mkbootimg --kernel .Image.gz-dtb \
>>>> --ramdisk initrd.img \
>>>> --base 0x0 \
>>>> --kernel_offset 0x8000 \
>>>> --ramdisk_offset 0x1000000 \
>>>> --second_offset 0xf00000 \
>>>> --tags_offset 0x100 \
>>>> --pagesize 4096 \
>>>> --cmdline "CMDLINE HERE" \
>>>> -o qx1050-boot.img
>>>>
>>>> fastboot flash boot qx1050-boot.img
>>>> fastboot erase dtbo
>>>> fastboot reboot
>>>>
>>>> Signed-off-by: Dang Huynh <danct12@riseup.net>
>>>> ---
>>>>   arch/arm64/boot/dts/qcom/Makefile               |   1 +
>>>>   arch/arm64/boot/dts/qcom/sm6115-fxtec-pro1x.dts | 248 ++++++++++++++++++++++++
>>>>   2 files changed, 249 insertions(+)
>>>>
>>>> diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
>>>> index d42c59572ace..e311ba675f35 100644
>>>> --- a/arch/arm64/boot/dts/qcom/Makefile
>>>> +++ b/arch/arm64/boot/dts/qcom/Makefile
>>>> @@ -174,6 +174,7 @@ dtb-$(CONFIG_ARCH_QCOM)   += sdm845-shift-axolotl.dtb
>>>>   dtb-$(CONFIG_ARCH_QCOM)      += sdm850-lenovo-yoga-c630.dtb
>>>>   dtb-$(CONFIG_ARCH_QCOM)      += sdm850-samsung-w737.dtb
>>>>   dtb-$(CONFIG_ARCH_QCOM)      += sm4250-oneplus-billie2.dtb
>>>> +dtb-$(CONFIG_ARCH_QCOM)      += sm6115-fxtec-pro1x.dtb
>>>>   dtb-$(CONFIG_ARCH_QCOM)      += sm6115p-lenovo-j606f.dtb
>>>>   dtb-$(CONFIG_ARCH_QCOM)      += sm6125-sony-xperia-seine-pdx201.dtb
>>>>   dtb-$(CONFIG_ARCH_QCOM)      += sm6125-xiaomi-laurel-sprout.dtb
>>>> diff --git a/arch/arm64/boot/dts/qcom/sm6115-fxtec-pro1x.dts b/arch/arm64/boot/dts/qcom/sm6115-fxtec-pro1x.dts
>>>> new file mode 100644
>>>> index 000000000000..a9ff1d9534ae
>>>> --- /dev/null
>>>> +++ b/arch/arm64/boot/dts/qcom/sm6115-fxtec-pro1x.dts
>>>> @@ -0,0 +1,248 @@
>>>> +// SPDX-License-Identifier: GPL-2.0-only
>>> I'm not a licensing expert, but fyi sm6115.dtsi uses (GPL2+ & BSD3)
>>
>> Yes, we usually ask for the DTs to be dual-licensed, since they may be
>> e.g. used or distributed as a part of the bootloader.
>>
>>>
>>
>> [skipped]
>>
>>>> +
>>>> +&rpm_requests {
>>>> +     pm6125-regulators {
>>>> +             compatible = "qcom,rpm-pm6125-regulators";
>>>> +
>>>> +             vreg_s6a: s6 {
>>> You can keep the PMIC name apparent by renaming vreg_s6a to
>>> pm6125_s6 etc.
>>
>> Hmm, we were usually using the resource-name here,
> Yeah, but on smd rpm a "resource name" is a very vague concept,
> you have a "path" to a resource (which is resolved internally by RPM),
> then there's a "type", "key" and "id"
> 
>   so vreg_s6a is fine
>> (usually it would be vreg_s6a_0p3 or vreg_s6a_1p5).
> That naming is *very* problematic if your device isn't a dragonboard/RBx
> where you can look up the schematics and leads to a lot of confusion, as
> you can't really be sure what voltages are correct until you can confirm
> everything works properly on the board :/

Fully agree here. I just wanted to point out that vreg_s6a is also a 
frequently used alias.

> 
> 
> Konrad
>>
>>>
>>> Konrad
>>>> +                     regulator-min-microvolt = <304000>;
>>>> +                     regulator-max-microvolt = <1456000>;
>>>> +             };
>>

-- 
With best wishes
Dmitry


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

end of thread, other threads:[~2023-05-06 12:34 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-05 17:12 [PATCH v2 0/2] Add F(x)tec Pro1X (QX1050) DTS Dang Huynh
2023-05-05 17:12 ` [PATCH v2 1/2] arm64: dts: qcom: Add Fxtec " Dang Huynh
2023-05-05 17:59   ` Krzysztof Kozlowski
2023-05-05 18:41   ` Konrad Dybcio
2023-05-06  1:42     ` Dang Huynh
2023-05-06  9:03       ` Konrad Dybcio
2023-05-06 11:48     ` Dmitry Baryshkov
2023-05-06 12:30       ` Konrad Dybcio
2023-05-06 12:33         ` Dmitry Baryshkov
2023-05-05 17:12 ` [PATCH v2 2/2] dt-bindings: arm: qcom: Add Fxtec Pro1X Dang Huynh
2023-05-05 17:59   ` Krzysztof Kozlowski

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.