From patchwork Fri May 5 17:12:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dang Huynh X-Patchwork-Id: 13232854 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 22EEAC77B7F for ; Fri, 5 May 2023 17:13:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232160AbjEERNY (ORCPT ); Fri, 5 May 2023 13:13:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50864 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229875AbjEERNX (ORCPT ); Fri, 5 May 2023 13:13:23 -0400 Received: from mx0.riseup.net (mx0.riseup.net [198.252.153.6]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 65B0C13872; Fri, 5 May 2023 10:13:22 -0700 (PDT) Received: from fews01-sea.riseup.net (fews01-sea-pn.riseup.net [10.0.1.109]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mail.riseup.net", Issuer "R3" (not verified)) by mx0.riseup.net (Postfix) with ESMTPS id 4QCchd27L6z9sW1; Fri, 5 May 2023 17:13:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1683306801; bh=l4u5jJfY9Ezkr9axTK3/WqBT4C1LkMUaFZJczJQeRxQ=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=MQrOXmtCV83SFJ96khpi2RmlbobkzY21SFi+hpr0bct0Tauq9qHOK4oUGnkVdogVs 9yqVxJhWMWF85Vp4ury14K6h0/MRVNrRRb3ZJadT3Cdq8PZ8lxxz9eL44GFoksFWNj ZO+FZubHW2D5NM3coW0S/rTeZglUFLDcFdhksGxg= X-Riseup-User-ID: ED143B3B7C51F1801E1E625A28307D1818E9529A5A63C9656DB38247BA11FC17 Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews01-sea.riseup.net (Postfix) with ESMTPSA id 4QCchZ6mBnzJmlV; Fri, 5 May 2023 17:13:18 +0000 (UTC) From: Dang Huynh Date: Sat, 06 May 2023 00:12:58 +0700 Subject: [PATCH v2 1/2] arm64: dts: qcom: Add Fxtec Pro1X (QX1050) DTS MIME-Version: 1.0 Message-Id: <20230505-fxtec-pro1x-support-v2-1-0ea2378ba9ae@riseup.net> References: <20230505-fxtec-pro1x-support-v2-0-0ea2378ba9ae@riseup.net> In-Reply-To: <20230505-fxtec-pro1x-support-v2-0-0ea2378ba9ae@riseup.net> To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Dang Huynh X-Developer-Signature: v=1; a=openpgp-sha256; l=7294; i=danct12@riseup.net; h=from:subject:message-id; bh=l4u5jJfY9Ezkr9axTK3/WqBT4C1LkMUaFZJczJQeRxQ=; b=owEBbQKS/ZANAwAIAWbKt+qkXdeBAcsmYgBkVTkrzA9y6xQgdxZPIGQ9ode3sY8t1rLqbJi66 aLwgp3fuROJAjMEAAEIAB0WIQTwmpM8D+AzHlWMpOFmyrfqpF3XgQUCZFU5KwAKCRBmyrfqpF3X gZuRD/oD8z7S2hHS+qMDZncEUejsVzPxld0UT+Ev8D+lJFUCGgAOBsNrAhMyFkMA0nWqp2/I/mw RrV7quTxhW/yGEG6m+b5ZEML1M4q/nJUNeHr10PelA7C4ONvRA3DC4/UHMMGmHw73HGmZbx6Iiw XLg+BhCXzFnx1kdgAVg8Adt6yrBIZzQlAfHv/dFnUz/Xt+nAOhZZmH7RpCIvI9H0c2dI6wKaxOp CqGJdnL7AK9qxLRMXwQhZKvH8R6vkL44g8VRr66t6GaP/0ysb+nliEtRPMCu+bKJ0+YdtJOHpsL g8cGmpzitrBnVwH7dL+6r8O6pjr4fzKGSdJAVaf/nIGawC0aOB/CwURgNJPRmsaC+hBM1eEaRe0 yykqflNxC9sXamQcNp5xJ0ShI7eMQy2pTFKFH0iZ80Dms15GKlJF0th93dJa5CvMlPg02oqYWl+ lMYLj+d3LvjbzsDHkj75+ArFuH/zn+Z/XD+fhwqvBye9on0XroHM7s/Awy3ORpiT33VfpkfA//x Zs+YmVuPLltzU7bDcWl+xQY3OkjQ52fKNo+aB0jrCGUShzyvD8M3EuY7do3KewyRsAz74ZO9Q/3 xO34DIMbdY2kX+qNg4qnrKf61Y+5P7b+7cmeHuTh8JdE+pwl03pgse0cb5iwNdEXtJAeYgnMZX9 +mmG76+VN5Ki6mA== X-Developer-Key: i=danct12@riseup.net; a=openpgp; fpr=F09A933C0FE0331E558CA4E166CAB7EAA45DD781 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 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 --- 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 + */ + +/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 = ; + 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 = ; + 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"; +}; From patchwork Fri May 5 17:12:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dang Huynh X-Patchwork-Id: 13232855 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3179AC7EE22 for ; Fri, 5 May 2023 17:13:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232168AbjEERNa (ORCPT ); Fri, 5 May 2023 13:13:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232176AbjEERNZ (ORCPT ); Fri, 5 May 2023 13:13:25 -0400 Received: from mx0.riseup.net (mx0.riseup.net [198.252.153.6]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A39A1A1CD; Fri, 5 May 2023 10:13:24 -0700 (PDT) Received: from fews01-sea.riseup.net (fews01-sea-pn.riseup.net [10.0.1.109]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mail.riseup.net", Issuer "R3" (not verified)) by mx0.riseup.net (Postfix) with ESMTPS id 4QCchg6qGzz9sW1; Fri, 5 May 2023 17:13:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1683306804; bh=DMEAUb6Y4XfHvl/aZCH2QTrE3Fn84F08j//FajEqxWc=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=mm4KyeisDmavbiLRoI8XEd7FbbN8bZWhPdeKFCdAcziLTzZuenMRsLPn5P2i/hPPq +oNSAP95rzrUDTRIFFurMtGrAJXXbppTSvYqMh8JnzkGSWjy7yZehlVhEKQu4b5qjD jP5C9ulbm7XhXCSPODAsHU0HlRwUPW+9bn4pahK0= X-Riseup-User-ID: BB8F600E5D2614178A591C43FB16BBDB833103D968574BBAC904A59DA894DAFC Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews01-sea.riseup.net (Postfix) with ESMTPSA id 4QCchd4BStzJn8c; Fri, 5 May 2023 17:13:21 +0000 (UTC) From: Dang Huynh Date: Sat, 06 May 2023 00:12:59 +0700 Subject: [PATCH v2 2/2] dt-bindings: arm: qcom: Add Fxtec Pro1X MIME-Version: 1.0 Message-Id: <20230505-fxtec-pro1x-support-v2-2-0ea2378ba9ae@riseup.net> References: <20230505-fxtec-pro1x-support-v2-0-0ea2378ba9ae@riseup.net> In-Reply-To: <20230505-fxtec-pro1x-support-v2-0-0ea2378ba9ae@riseup.net> To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Dang Huynh X-Developer-Signature: v=1; a=openpgp-sha256; l=669; i=danct12@riseup.net; h=from:subject:message-id; bh=DMEAUb6Y4XfHvl/aZCH2QTrE3Fn84F08j//FajEqxWc=; b=owEBbQKS/ZANAwAIAWbKt+qkXdeBAcsmYgBkVTkrUOVYtzHDKbZY+SnmOXBVqc6AptkaBpUaZ gy/MEPUhaSJAjMEAAEIAB0WIQTwmpM8D+AzHlWMpOFmyrfqpF3XgQUCZFU5KwAKCRBmyrfqpF3X gcOYEACc5689pi6YraJq94Gk8xfQv7WT3EDVmfp0xD3UznQx08HhhI4dbYRzv7wHplf/l3rGRxg BmjKC+9sGfOCLvZ/bTXkg2vnmcCMyWCexAOAb31sHaGIXHkOcE42S+RDFi79GjaVXbvsZSqzCER pvo0UXt91JkL2RMmC+bKzLF0MHSOqIipM9pSVSeXYrVYomfJttHV5fhwW0Tx0fPHs6M013o3HEI twOCJ1b6c2pp5mGHYnrxTheh+5q5h4DNyrhlpTbqTakBxqnJCw+jA6VkRx4PKr/klSvkizUQ3Z3 pHUQTwzNYVTjWdJNDFCYcDYIFwUZw9EhcsdU5+xVsT9jTMDOraSZ0A6UcN46IkiRhcOd2LJEHzJ 4GMJYMMvXTBgtcFfRYJqaTAB2ucugxfnPXZ1l84J4qKGT59xLefE5MkDlJleQyd8sjlScaFcE9r tIMXCUo2001orrZe+UQ0xenRPuDoQmqiwiYWkK0P67UEFLnFTyPQBnpXZ/FR3zU2FFw5dtx4qK2 xnO8QsixcLgnuloSppuoR+2jySez+R5FUX8WtPowhlKthsjVgZErKGp4PHV7eTRKuIVpJnnOUDh OFSx+rj1mqRhpiiSJeSzPUDphOMgN+XNM/F7Eoj2w4i0zIx2IbiqQ+PbW1KuMMNPNVFZMSp1GPw 6qWAVTP47uTikIA== X-Developer-Key: i=danct12@riseup.net; a=openpgp; fpr=F09A933C0FE0331E558CA4E166CAB7EAA45DD781 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Document F(x)tec Pro1X as a SM6115 device. Signed-off-by: Dang Huynh Acked-by: Krzysztof Kozlowski --- 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