2023-05-05 17:24:16

by Dang Huynh

[permalink] [raw]
Subject: [PATCH v2 1/2] arm64: dts: qcom: Add Fxtec Pro1X (QX1050) DTS

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 <[email protected]>
---
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 <[email protected]>
+ */
+
+/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


2023-05-05 18:04:20

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v2 1/2] arm64: dts: qcom: Add Fxtec Pro1X (QX1050) DTS

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 <[email protected]>
> ---
> 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 <[email protected]>
> + */
> +
> +/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

2023-05-05 18:48:31

by Konrad Dybcio

[permalink] [raw]
Subject: Re: [PATCH v2 1/2] arm64: dts: qcom: Add Fxtec Pro1X (QX1050) DTS



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 <[email protected]>
> ---
> 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 <[email protected]>
> + */
> +
> +/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";
> +};
>

2023-05-06 02:02:53

by Dang Huynh

[permalink] [raw]
Subject: Re: [PATCH v2 1/2] arm64: dts: qcom: Add Fxtec Pro1X (QX1050) DTS

> > + 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


2023-05-06 09:05:46

by Konrad Dybcio

[permalink] [raw]
Subject: Re: [PATCH v2 1/2] arm64: dts: qcom: Add Fxtec Pro1X (QX1050) DTS



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
>
>

2023-05-06 12:01:00

by Dmitry Baryshkov

[permalink] [raw]
Subject: Re: [PATCH v2 1/2] arm64: dts: qcom: Add Fxtec Pro1X (QX1050) DTS

On Fri, 5 May 2023 at 21:41, Konrad Dybcio <[email protected]> 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 <[email protected]>
> > ---
> > 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

2023-05-06 12:47:37

by Konrad Dybcio

[permalink] [raw]
Subject: Re: [PATCH v2 1/2] arm64: dts: qcom: Add Fxtec Pro1X (QX1050) DTS



On 6.05.2023 13:48, Dmitry Baryshkov wrote:
> On Fri, 5 May 2023 at 21:41, Konrad Dybcio <[email protected]> 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 <[email protected]>
>>> ---
>>> 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>;
>>> + };
>

2023-05-06 12:47:37

by Dmitry Baryshkov

[permalink] [raw]
Subject: Re: [PATCH v2 1/2] arm64: dts: qcom: Add Fxtec Pro1X (QX1050) DTS

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 <[email protected]> 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 <[email protected]>
>>>> ---
>>>> 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