linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/11] Initial Fairphone 4 support
@ 2021-10-03  8:31 Luca Weiss
  2021-10-03  8:31 ` [PATCH 01/11] clk: qcom: add select QCOM_GDSC for SM6350 Luca Weiss
                   ` (11 more replies)
  0 siblings, 12 replies; 20+ messages in thread
From: Luca Weiss @ 2021-10-03  8:31 UTC (permalink / raw)
  To: linux-arm-msm
  Cc: ~postmarketos/upstreaming, Luca Weiss,
	AngeloGioacchino Del Regno, Bjorn Andersson, David Collins,
	Hector Martin, Jonathan Cameron, Konrad Dybcio,
	Lorenzo Pieralisi, Mark Brown, Rob Herring, Sebastian Reichel,
	Stephen Boyd, Stephen Boyd, Sudeep Holla, Vinod Koul,
	Viresh Kumar, devicetree, linux-clk, linux-gpio, linux-kernel

This series adds basic support for the recently announced Fairphone 4
smartphone, based on the Snapdragon 750G (sm7225).

This adds support for UART, power & volume buttons, screen based on
simple-framebuffer, regulators and USB.

Luca Weiss (11):
  clk: qcom: add select QCOM_GDSC for SM6350
  dt-bindings: regulator: qcom,rpmh: Add compatible for PM6350
  regulator: qcom-rpmh: Add PM6350 regulators
  dt-bindings: pinctrl: qcom,pmic-gpio: Add compatible for PM6350
  pinctrl: qcom: spmi-gpio: Add compatible for PM6350
  arm64: dts: qcom: Add PM6350 PMIC
  arm64: dts: qcom: sm6350: add debug uart
  dt-bindings: arm: cpus: Add Kryo 570 CPUs
  dt-bindings: arm: qcom: Document sm7225 and fairphone,fp4 board
  arm64: dts: qcom: Add SM7225 device tree
  arm64: dts: qcom: sm7225: Add device tree for Fairphone 4

 .../devicetree/bindings/arm/cpus.yaml         |   1 +
 .../devicetree/bindings/arm/qcom.yaml         |   6 +
 .../bindings/pinctrl/qcom,pmic-gpio.yaml      |   2 +
 .../regulator/qcom,rpmh-regulator.yaml        |   2 +
 arch/arm64/boot/dts/qcom/Makefile             |   1 +
 arch/arm64/boot/dts/qcom/pm6350.dtsi          |  54 +++
 arch/arm64/boot/dts/qcom/sm6350.dtsi          |  31 ++
 .../boot/dts/qcom/sm7225-fairphone-fp4.dts    | 322 ++++++++++++++++++
 arch/arm64/boot/dts/qcom/sm7225.dtsi          |  16 +
 drivers/clk/qcom/Kconfig                      |   1 +
 drivers/pinctrl/qcom/pinctrl-spmi-gpio.c      |   1 +
 drivers/regulator/qcom-rpmh-regulator.c       |  32 ++
 12 files changed, 469 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/pm6350.dtsi
 create mode 100644 arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts
 create mode 100644 arch/arm64/boot/dts/qcom/sm7225.dtsi

-- 
2.33.0


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

* [PATCH 01/11] clk: qcom: add select QCOM_GDSC for SM6350
  2021-10-03  8:31 [PATCH 00/11] Initial Fairphone 4 support Luca Weiss
@ 2021-10-03  8:31 ` Luca Weiss
  2021-10-03 11:21   ` Konrad Dybcio
  2021-10-03  8:31 ` [PATCH 02/11] dt-bindings: regulator: qcom,rpmh: Add compatible for PM6350 Luca Weiss
                   ` (10 subsequent siblings)
  11 siblings, 1 reply; 20+ messages in thread
From: Luca Weiss @ 2021-10-03  8:31 UTC (permalink / raw)
  To: linux-arm-msm
  Cc: ~postmarketos/upstreaming, Luca Weiss, Andy Gross,
	Bjorn Andersson, Michael Turquette, Stephen Boyd, Konrad Dybcio,
	AngeloGioacchino Del Regno, linux-clk, linux-kernel

QCOM_GDSC is needed for the gcc driver to probe.

Fixes: 131abae905df ("clk: qcom: Add SM6350 GCC driver")
Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
---
 drivers/clk/qcom/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/clk/qcom/Kconfig b/drivers/clk/qcom/Kconfig
index 0a5596797b93..9ef007b3cf9b 100644
--- a/drivers/clk/qcom/Kconfig
+++ b/drivers/clk/qcom/Kconfig
@@ -564,6 +564,7 @@ config SM_GCC_6125
 
 config SM_GCC_6350
 	tristate "SM6350 Global Clock Controller"
+	select QCOM_GDSC
 	help
 	  Support for the global clock controller on SM6350 devices.
 	  Say Y if you want to use peripheral devices such as UART,
-- 
2.33.0


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

* [PATCH 02/11] dt-bindings: regulator: qcom,rpmh: Add compatible for PM6350
  2021-10-03  8:31 [PATCH 00/11] Initial Fairphone 4 support Luca Weiss
  2021-10-03  8:31 ` [PATCH 01/11] clk: qcom: add select QCOM_GDSC for SM6350 Luca Weiss
@ 2021-10-03  8:31 ` Luca Weiss
  2021-10-03  8:31 ` [PATCH 03/11] regulator: qcom-rpmh: Add PM6350 regulators Luca Weiss
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 20+ messages in thread
From: Luca Weiss @ 2021-10-03  8:31 UTC (permalink / raw)
  To: linux-arm-msm
  Cc: ~postmarketos/upstreaming, Luca Weiss, Andy Gross,
	Bjorn Andersson, Liam Girdwood, Mark Brown, Rob Herring,
	David Collins, linux-kernel, devicetree

Add compatible string for pm6350 used in sm6350 boards.

Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
---
 .../devicetree/bindings/regulator/qcom,rpmh-regulator.yaml      | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml b/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml
index 34de38377aa6..b959504e0ea4 100644
--- a/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml
+++ b/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml
@@ -35,6 +35,7 @@ description: |
     PMIC. Supported regulator node names are
       For PM6150, smps1 - smps5, ldo1 - ldo19
       For PM6150L, smps1 - smps8, ldo1 - ldo11, bob
+      For PM6350, smps1 - smps5, ldo1 - ldo22
       For PM7325, smps1 - smps8, ldo1 - ldo19
       For PM8005, smps1 - smps4
       For PM8009, smps1 - smps2, ldo1 - ldo7
@@ -52,6 +53,7 @@ properties:
     enum:
       - qcom,pm6150-rpmh-regulators
       - qcom,pm6150l-rpmh-regulators
+      - qcom,pm6350-rpmh-regulators
       - qcom,pm7325-rpmh-regulators
       - qcom,pm8005-rpmh-regulators
       - qcom,pm8009-rpmh-regulators
-- 
2.33.0


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

* [PATCH 03/11] regulator: qcom-rpmh: Add PM6350 regulators
  2021-10-03  8:31 [PATCH 00/11] Initial Fairphone 4 support Luca Weiss
  2021-10-03  8:31 ` [PATCH 01/11] clk: qcom: add select QCOM_GDSC for SM6350 Luca Weiss
  2021-10-03  8:31 ` [PATCH 02/11] dt-bindings: regulator: qcom,rpmh: Add compatible for PM6350 Luca Weiss
@ 2021-10-03  8:31 ` Luca Weiss
  2021-10-04 12:37   ` Mark Brown
  2021-10-03  8:31 ` [PATCH 04/11] dt-bindings: pinctrl: qcom,pmic-gpio: Add compatible for PM6350 Luca Weiss
                   ` (8 subsequent siblings)
  11 siblings, 1 reply; 20+ messages in thread
From: Luca Weiss @ 2021-10-03  8:31 UTC (permalink / raw)
  To: linux-arm-msm
  Cc: ~postmarketos/upstreaming, Luca Weiss, Andy Gross,
	Bjorn Andersson, Liam Girdwood, Mark Brown, linux-kernel

Add the configuration for pm6350 regulators. The supplies are not known
so use dummy ones for now.

Additionally leave out configuration of smps3 - smps5 and ldo17 as these
are not configured in the downstream kernel.

Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
---

If anybody has a datasheet for pm6350 lying around, please double check
if the configuration is correct, I'm relatively sure it is correct
though as the driver doesn't probe when e.g. pldo instead of nldo is
configured.

 drivers/regulator/qcom-rpmh-regulator.c | 32 +++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/drivers/regulator/qcom-rpmh-regulator.c b/drivers/regulator/qcom-rpmh-regulator.c
index 7f458d510483..6ea111bccadb 100644
--- a/drivers/regulator/qcom-rpmh-regulator.c
+++ b/drivers/regulator/qcom-rpmh-regulator.c
@@ -1047,6 +1047,34 @@ static const struct rpmh_vreg_init_data pm6150l_vreg_data[] = {
 	{}
 };
 
+static const struct rpmh_vreg_init_data pm6350_vreg_data[] = {
+	RPMH_VREG("smps1",  "smp%s1",  &pmic5_ftsmps510, "vdd-s1"),
+	RPMH_VREG("smps2",  "smp%s2",  &pmic5_hfsmps510, "vdd-s2"),
+	/* smps3 - smps5 not configured */
+	RPMH_VREG("ldo1",   "ldo%s1",  &pmic5_nldo,      "vdd-l1"),
+	RPMH_VREG("ldo2",   "ldo%s2",  &pmic5_pldo,      "vdd-l2"),
+	RPMH_VREG("ldo3",   "ldo%s3",  &pmic5_pldo,      "vdd-l3"),
+	RPMH_VREG("ldo4",   "ldo%s4",  &pmic5_nldo,      "vdd-l4"),
+	RPMH_VREG("ldo5",   "ldo%s5",  &pmic5_pldo,      "vdd-l5"),
+	RPMH_VREG("ldo6",   "ldo%s6",  &pmic5_pldo,      "vdd-l6"),
+	RPMH_VREG("ldo7",   "ldo%s7",  &pmic5_pldo,      "vdd-l7"),
+	RPMH_VREG("ldo8",   "ldo%s8",  &pmic5_pldo,      "vdd-l8"),
+	RPMH_VREG("ldo9",   "ldo%s9",  &pmic5_pldo,      "vdd-l9"),
+	RPMH_VREG("ldo10",  "ldo%s10", &pmic5_pldo,      "vdd-l10"),
+	RPMH_VREG("ldo11",  "ldo%s11", &pmic5_pldo,      "vdd-l11"),
+	RPMH_VREG("ldo12",  "ldo%s12", &pmic5_pldo,      "vdd-l12"),
+	RPMH_VREG("ldo13",  "ldo%s13", &pmic5_nldo,      "vdd-l13"),
+	RPMH_VREG("ldo14",  "ldo%s14", &pmic5_pldo,      "vdd-l14"),
+	RPMH_VREG("ldo15",  "ldo%s15", &pmic5_nldo,      "vdd-l15"),
+	RPMH_VREG("ldo16",  "ldo%s16", &pmic5_nldo,      "vdd-l16"),
+	/* ldo17 not configured */
+	RPMH_VREG("ldo18",  "ldo%s18", &pmic5_nldo,      "vdd-l18"),
+	RPMH_VREG("ldo19",  "ldo%s19", &pmic5_nldo,      "vdd-l19"),
+	RPMH_VREG("ldo20",  "ldo%s20", &pmic5_nldo,      "vdd-l20"),
+	RPMH_VREG("ldo21",  "ldo%s21", &pmic5_nldo,      "vdd-l21"),
+	RPMH_VREG("ldo22",  "ldo%s22", &pmic5_nldo,      "vdd-l22"),
+};
+
 static const struct rpmh_vreg_init_data pmx55_vreg_data[] = {
 	RPMH_VREG("smps1",   "smp%s1",    &pmic5_ftsmps510, "vdd-s1"),
 	RPMH_VREG("smps2",   "smp%s2",    &pmic5_hfsmps510, "vdd-s2"),
@@ -1201,6 +1229,10 @@ static const struct of_device_id __maybe_unused rpmh_regulator_match_table[] = {
 		.compatible = "qcom,pm6150l-rpmh-regulators",
 		.data = pm6150l_vreg_data,
 	},
+	{
+		.compatible = "qcom,pm6350-rpmh-regulators",
+		.data = pm6350_vreg_data,
+	},
 	{
 		.compatible = "qcom,pmc8180-rpmh-regulators",
 		.data = pm8150_vreg_data,
-- 
2.33.0


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

* [PATCH 04/11] dt-bindings: pinctrl: qcom,pmic-gpio: Add compatible for PM6350
  2021-10-03  8:31 [PATCH 00/11] Initial Fairphone 4 support Luca Weiss
                   ` (2 preceding siblings ...)
  2021-10-03  8:31 ` [PATCH 03/11] regulator: qcom-rpmh: Add PM6350 regulators Luca Weiss
@ 2021-10-03  8:31 ` Luca Weiss
  2021-10-03  8:31 ` [PATCH 05/11] pinctrl: qcom: spmi-gpio: " Luca Weiss
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 20+ messages in thread
From: Luca Weiss @ 2021-10-03  8:31 UTC (permalink / raw)
  To: linux-arm-msm
  Cc: ~postmarketos/upstreaming, Luca Weiss, Andy Gross,
	Bjorn Andersson, Linus Walleij, Rob Herring, linux-gpio,
	devicetree, linux-kernel

Add pmic-gpio compatible string for pm6350 pmic.

Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
---
 Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml
index 9bd01db37dcd..1e5153f10ca1 100644
--- a/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml
@@ -21,6 +21,7 @@ properties:
           - qcom,pm660l-gpio
           - qcom,pm6150-gpio
           - qcom,pm6150l-gpio
+          - qcom,pm6350-gpio
           - qcom,pm7325-gpio
           - qcom,pm8005-gpio
           - qcom,pm8008-gpio
@@ -103,6 +104,7 @@ $defs:
           this subnode.  Valid pins are
                  - gpio1-gpio10 for pm6150
                  - gpio1-gpio12 for pm6150l
+                 - gpio1-gpio9 for pm6350
                  - gpio1-gpio10 for pm7325
                  - gpio1-gpio4 for pm8005
                  - gpio1-gpio2 for pm8008
-- 
2.33.0


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

* [PATCH 05/11] pinctrl: qcom: spmi-gpio: Add compatible for PM6350
  2021-10-03  8:31 [PATCH 00/11] Initial Fairphone 4 support Luca Weiss
                   ` (3 preceding siblings ...)
  2021-10-03  8:31 ` [PATCH 04/11] dt-bindings: pinctrl: qcom,pmic-gpio: Add compatible for PM6350 Luca Weiss
@ 2021-10-03  8:31 ` Luca Weiss
  2021-10-03  8:31 ` [PATCH 06/11] arm64: dts: qcom: Add PM6350 PMIC Luca Weiss
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 20+ messages in thread
From: Luca Weiss @ 2021-10-03  8:31 UTC (permalink / raw)
  To: linux-arm-msm
  Cc: ~postmarketos/upstreaming, Luca Weiss, Bjorn Andersson,
	Andy Gross, Linus Walleij, linux-gpio, linux-kernel

Add support for the GPIO controller in the pm6350 PMIC.

Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
---
 drivers/pinctrl/qcom/pinctrl-spmi-gpio.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c b/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
index 98bf0e2a2a8d..55a9227a87fd 100644
--- a/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
+++ b/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
@@ -1110,6 +1110,7 @@ static const struct of_device_id pmic_gpio_of_match[] = {
 	{ .compatible = "qcom,pm660l-gpio", .data = (void *) 12 },
 	{ .compatible = "qcom,pm6150-gpio", .data = (void *) 10 },
 	{ .compatible = "qcom,pm6150l-gpio", .data = (void *) 12 },
+	{ .compatible = "qcom,pm6350-gpio", .data = (void *) 9 },
 	{ .compatible = "qcom,pm7325-gpio", .data = (void *) 10 },
 	{ .compatible = "qcom,pm8005-gpio", .data = (void *) 4 },
 	{ .compatible = "qcom,pm8008-gpio", .data = (void *) 2 },
-- 
2.33.0


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

* [PATCH 06/11] arm64: dts: qcom: Add PM6350 PMIC
  2021-10-03  8:31 [PATCH 00/11] Initial Fairphone 4 support Luca Weiss
                   ` (4 preceding siblings ...)
  2021-10-03  8:31 ` [PATCH 05/11] pinctrl: qcom: spmi-gpio: " Luca Weiss
@ 2021-10-03  8:31 ` Luca Weiss
  2021-10-03 11:23   ` Konrad Dybcio
  2021-10-03  8:31 ` [PATCH 07/11] arm64: dts: qcom: sm6350: add debug uart Luca Weiss
                   ` (5 subsequent siblings)
  11 siblings, 1 reply; 20+ messages in thread
From: Luca Weiss @ 2021-10-03  8:31 UTC (permalink / raw)
  To: linux-arm-msm
  Cc: ~postmarketos/upstreaming, Luca Weiss, Andy Gross,
	Bjorn Andersson, Rob Herring, devicetree, linux-kernel

PM6350 is used in SM6350 and provides similar functionality to other
Qualcomm PMICs.

Add the pon node with power & volume key and the gpios.

Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
---
 arch/arm64/boot/dts/qcom/pm6350.dtsi | 54 ++++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/pm6350.dtsi

diff --git a/arch/arm64/boot/dts/qcom/pm6350.dtsi b/arch/arm64/boot/dts/qcom/pm6350.dtsi
new file mode 100644
index 000000000000..c5d85064562b
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/pm6350.dtsi
@@ -0,0 +1,54 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright (c) 2021, Luca Weiss <luca@z3ntu.xyz>
+ */
+
+#include <dt-bindings/spmi/spmi.h>
+
+&spmi_bus {
+	pmic@0 {
+		compatible = "qcom,pm6350", "qcom,spmi-pmic";
+		reg = <0x0 SPMI_USID>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		pm6350_pon: pon@800 {
+			compatible = "qcom,pm8998-pon";
+			reg = <0x800>;
+			mode-bootloader = <0x2>;
+			mode-recovery = <0x1>;
+
+			pm6350_pwrkey: pwrkey {
+				compatible = "qcom,pm8941-pwrkey";
+				interrupts = <0x0 0x8 0x0 IRQ_TYPE_EDGE_BOTH>;
+				debounce = <15625>;
+				bias-pull-up;
+				linux,code = <KEY_POWER>;
+			};
+
+			pm6350_resin: resin {
+				compatible = "qcom,pm8941-resin";
+				interrupts = <0x0 0x8 0x1 IRQ_TYPE_EDGE_BOTH>;
+				debounce = <15625>;
+				bias-pull-up;
+				status = "disabled";
+			};
+		};
+
+		pm6350_gpios: gpios@c000 {
+			compatible = "qcom,pm6350-gpio";
+			reg = <0xc000>;
+			gpio-controller;
+			#gpio-cells = <2>;
+			interrupt-controller;
+			#interrupt-cells = <2>;
+		};
+	};
+
+	pmic@1 {
+		compatible = "qcom,pm6350", "qcom,spmi-pmic";
+		reg = <0x1 SPMI_USID>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+	};
+};
-- 
2.33.0


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

* [PATCH 07/11] arm64: dts: qcom: sm6350: add debug uart
  2021-10-03  8:31 [PATCH 00/11] Initial Fairphone 4 support Luca Weiss
                   ` (5 preceding siblings ...)
  2021-10-03  8:31 ` [PATCH 06/11] arm64: dts: qcom: Add PM6350 PMIC Luca Weiss
@ 2021-10-03  8:31 ` Luca Weiss
  2021-10-03  8:31 ` [PATCH 08/11] dt-bindings: arm: cpus: Add Kryo 570 CPUs Luca Weiss
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 20+ messages in thread
From: Luca Weiss @ 2021-10-03  8:31 UTC (permalink / raw)
  To: linux-arm-msm
  Cc: ~postmarketos/upstreaming, Luca Weiss, Andy Gross,
	Bjorn Andersson, Rob Herring, devicetree, linux-kernel

Add the necessary nodes for the debug uart on SM6350.

Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
---
 arch/arm64/boot/dts/qcom/sm6350.dtsi | 31 ++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sm6350.dtsi b/arch/arm64/boot/dts/qcom/sm6350.dtsi
index 95e69d9f8657..630a76e740f8 100644
--- a/arch/arm64/boot/dts/qcom/sm6350.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm6350.dtsi
@@ -445,6 +445,30 @@ opp-384000000 {
 			};
 		};
 
+		qupv3_id_1: geniqup@9c0000 {
+			compatible = "qcom,geni-se-qup";
+			reg = <0x0 0x9c0000 0x0 0x2000>;
+			clock-names = "m-ahb", "s-ahb";
+			clocks = <&gcc GCC_QUPV3_WRAP_1_M_AHB_CLK>,
+				 <&gcc GCC_QUPV3_WRAP_1_S_AHB_CLK>;
+			#address-cells = <2>;
+			#size-cells = <2>;
+			iommus = <&apps_smmu 0x4c3 0x0>;
+			ranges;
+			status = "disabled";
+
+			uart2: serial@98c000 {
+				compatible = "qcom,geni-debug-uart";
+				reg = <0 0x98c000 0 0x4000>;
+				clock-names = "se";
+				clocks = <&gcc GCC_QUPV3_WRAP1_S3_CLK>;
+				pinctrl-names = "default";
+				pinctrl-0 = <&qup_uart2_default>;
+				interrupts = <GIC_SPI 356 IRQ_TYPE_LEVEL_HIGH>;
+				status = "disabled";
+			};
+		};
+
 		tcsr_mutex: hwlock@1f40000 {
 			compatible = "qcom,tcsr-mutex";
 			reg = <0x0 0x01f40000 0x0 0x40000>;
@@ -672,6 +696,13 @@ tlmm: pinctrl@f100000 {
 			interrupt-controller;
 			#interrupt-cells = <2>;
 			gpio-ranges = <&tlmm 0 0 157>;
+
+			qup_uart2_default: qup-uart2-default {
+				mux {
+					pins = "gpio25", "gpio26";
+					function = "qup13_f2";
+				};
+			};
 		};
 
 		apps_smmu: iommu@15000000 {
-- 
2.33.0


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

* [PATCH 08/11] dt-bindings: arm: cpus: Add Kryo 570 CPUs
  2021-10-03  8:31 [PATCH 00/11] Initial Fairphone 4 support Luca Weiss
                   ` (6 preceding siblings ...)
  2021-10-03  8:31 ` [PATCH 07/11] arm64: dts: qcom: sm6350: add debug uart Luca Weiss
@ 2021-10-03  8:31 ` Luca Weiss
  2021-10-03  8:31 ` [PATCH 09/11] dt-bindings: arm: qcom: Document sm7225 and fairphone,fp4 board Luca Weiss
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 20+ messages in thread
From: Luca Weiss @ 2021-10-03  8:31 UTC (permalink / raw)
  To: linux-arm-msm
  Cc: ~postmarketos/upstreaming, Luca Weiss, Rob Herring, Mark Brown,
	Viresh Kumar, Srinivas Kandagatla, Sebastian Reichel,
	Hector Martin, Sudeep Holla, Vinod Koul, Konrad Dybcio,
	Lorenzo Pieralisi, devicetree, linux-kernel

Document Kryo 570 CPUs found in Qualcomm Snapdragon 750G (SM7225).

Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
---
 Documentation/devicetree/bindings/arm/cpus.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/arm/cpus.yaml b/Documentation/devicetree/bindings/arm/cpus.yaml
index 897eec887e5a..1e530391f355 100644
--- a/Documentation/devicetree/bindings/arm/cpus.yaml
+++ b/Documentation/devicetree/bindings/arm/cpus.yaml
@@ -172,6 +172,7 @@ properties:
       - qcom,kryo468
       - qcom,kryo485
       - qcom,kryo560
+      - qcom,kryo570
       - qcom,kryo685
       - qcom,scorpion
 
-- 
2.33.0


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

* [PATCH 09/11] dt-bindings: arm: qcom: Document sm7225 and fairphone,fp4 board
  2021-10-03  8:31 [PATCH 00/11] Initial Fairphone 4 support Luca Weiss
                   ` (7 preceding siblings ...)
  2021-10-03  8:31 ` [PATCH 08/11] dt-bindings: arm: cpus: Add Kryo 570 CPUs Luca Weiss
@ 2021-10-03  8:31 ` Luca Weiss
  2021-10-03  8:31 ` [PATCH 10/11] arm64: dts: qcom: Add SM7225 device tree Luca Weiss
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 20+ messages in thread
From: Luca Weiss @ 2021-10-03  8:31 UTC (permalink / raw)
  To: linux-arm-msm
  Cc: ~postmarketos/upstreaming, Luca Weiss, Andy Gross,
	Bjorn Andersson, Rob Herring, Stephen Boyd, devicetree,
	linux-kernel

Add binding documentation for Fairphone 4 smartphone which is based on
Snapdragon 750G (sm7225).

Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
---
 Documentation/devicetree/bindings/arm/qcom.yaml | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Documentation/devicetree/bindings/arm/qcom.yaml b/Documentation/devicetree/bindings/arm/qcom.yaml
index 880ddafc634e..540dfafa3418 100644
--- a/Documentation/devicetree/bindings/arm/qcom.yaml
+++ b/Documentation/devicetree/bindings/arm/qcom.yaml
@@ -44,6 +44,7 @@ description: |
         sdm660
         sdm845
         sdx55
+        sm7225
         sm8150
         sm8250
         sm8350
@@ -217,6 +218,11 @@ properties:
               - qcom,sa8155p-adp
           - const: qcom,sa8155p
 
+      - items:
+          - enum:
+              - fairphone,fp4
+          - const: qcom,sm7225
+
       - items:
           - enum:
               - qcom,sm8150-mtp
-- 
2.33.0


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

* [PATCH 10/11] arm64: dts: qcom: Add SM7225 device tree
  2021-10-03  8:31 [PATCH 00/11] Initial Fairphone 4 support Luca Weiss
                   ` (8 preceding siblings ...)
  2021-10-03  8:31 ` [PATCH 09/11] dt-bindings: arm: qcom: Document sm7225 and fairphone,fp4 board Luca Weiss
@ 2021-10-03  8:31 ` Luca Weiss
  2021-10-03 11:32   ` Konrad Dybcio
  2021-10-03  8:31 ` [PATCH 11/11] arm64: dts: qcom: sm7225: Add device tree for Fairphone 4 Luca Weiss
  2021-10-31 22:10 ` [PATCH 00/11] Initial Fairphone 4 support Pavel Machek
  11 siblings, 1 reply; 20+ messages in thread
From: Luca Weiss @ 2021-10-03  8:31 UTC (permalink / raw)
  To: linux-arm-msm
  Cc: ~postmarketos/upstreaming, Luca Weiss, Andy Gross,
	Bjorn Andersson, Rob Herring, devicetree, linux-kernel

The Snapdragon 750G (sm7225) is software-wise very similar to Snapdragon
690 (sm6350) with minor differences in clock speeds and as added here,
it uses the Kryo 570 instead of Kryo 560.

Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
---
 arch/arm64/boot/dts/qcom/sm7225.dtsi | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/sm7225.dtsi

diff --git a/arch/arm64/boot/dts/qcom/sm7225.dtsi b/arch/arm64/boot/dts/qcom/sm7225.dtsi
new file mode 100644
index 000000000000..7b2a002ca7ff
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/sm7225.dtsi
@@ -0,0 +1,16 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright (c) 2021, Luca Weiss <luca@z3ntu.xyz>
+ */
+
+#include "sm6350.dtsi"
+
+/* SM7225 uses Kryo 570 instead of Kryo 560 */
+&CPU0 { compatible = "qcom,kryo570"; };
+&CPU1 { compatible = "qcom,kryo570"; };
+&CPU2 { compatible = "qcom,kryo570"; };
+&CPU3 { compatible = "qcom,kryo570"; };
+&CPU4 { compatible = "qcom,kryo570"; };
+&CPU5 { compatible = "qcom,kryo570"; };
+&CPU6 { compatible = "qcom,kryo570"; };
+&CPU7 { compatible = "qcom,kryo570"; };
-- 
2.33.0


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

* [PATCH 11/11] arm64: dts: qcom: sm7225: Add device tree for Fairphone 4
  2021-10-03  8:31 [PATCH 00/11] Initial Fairphone 4 support Luca Weiss
                   ` (9 preceding siblings ...)
  2021-10-03  8:31 ` [PATCH 10/11] arm64: dts: qcom: Add SM7225 device tree Luca Weiss
@ 2021-10-03  8:31 ` Luca Weiss
  2021-10-03 11:35   ` Konrad Dybcio
  2021-10-31 22:10 ` [PATCH 00/11] Initial Fairphone 4 support Pavel Machek
  11 siblings, 1 reply; 20+ messages in thread
From: Luca Weiss @ 2021-10-03  8:31 UTC (permalink / raw)
  To: linux-arm-msm
  Cc: ~postmarketos/upstreaming, Luca Weiss, Andy Gross,
	Bjorn Andersson, Rob Herring, devicetree, linux-kernel

Add device tree for the Fairphone 4 smartphone which is based on
Snapdragon 750G (sm7225) which is basically sm6350.

Currently supported are UART, physical buttons (power & volume), screen
(based on simple-framebuffer set up by the bootloader), regulators and
USB.

Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
---
 arch/arm64/boot/dts/qcom/Makefile             |   1 +
 .../boot/dts/qcom/sm7225-fairphone-fp4.dts    | 322 ++++++++++++++++++
 2 files changed, 323 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts

diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
index 59ece83abad0..9ed189e9c197 100644
--- a/arch/arm64/boot/dts/qcom/Makefile
+++ b/arch/arm64/boot/dts/qcom/Makefile
@@ -85,6 +85,7 @@ dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-xiaomi-beryllium.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sdm850-lenovo-yoga-c630.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm6125-sony-xperia-seine-pdx201.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm6350-sony-xperia-lena-pdx213.dtb
+dtb-$(CONFIG_ARCH_QCOM)	+= sm7225-fairphone-fp4.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm8150-hdk.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm8150-microsoft-surface-duo.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm8150-mtp.dtb
diff --git a/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts b/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts
new file mode 100644
index 000000000000..6d509b2bdabe
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts
@@ -0,0 +1,322 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright (c) 2021, Luca Weiss <luca@z3ntu.xyz>
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
+#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
+#include "sm7225.dtsi"
+#include "pm6350.dtsi"
+
+/ {
+	model = "Fairphone 4";
+	compatible = "fairphone,fp4", "qcom,sm7225";
+
+	/* required for bootloader to select correct board */
+	qcom,msm-id = <434 0x10000>, <459 0x10000>;
+	qcom,board-id = <8 32>;
+
+	aliases {
+		serial0 = &uart2;
+	};
+
+	chosen {
+		#address-cells = <2>;
+		#size-cells = <2>;
+		ranges;
+
+		stdout-path = "serial0:115200n8";
+
+		framebuffer0: framebuffer@a000000 {
+			compatible = "simple-framebuffer";
+			reg = <0 0xa0000000 0 (2340 * 1080 * 4)>;
+			width = <1080>;
+			height = <2340>;
+			stride = <(1080 * 4)>;
+			format = "a8r8g8b8";
+		};
+	};
+
+	gpio-keys {
+		compatible = "gpio-keys";
+		pinctrl-names = "default";
+		pinctrl-0 = <&gpio_keys_pins>;
+
+		volume-up {
+			label = "volume_up";
+			linux,code = <KEY_VOLUMEUP>;
+			gpios = <&pm6350_gpios 2 GPIO_ACTIVE_LOW>;
+		};
+	};
+};
+
+&apps_rsc {
+	pm6350-rpmh-regulators {
+		compatible = "qcom,pm6350-rpmh-regulators";
+		qcom,pmic-id = "a";
+
+		vreg_s1a: smps1 {
+			regulator-min-microvolt = <1000000>;
+			regulator-max-microvolt = <1200000>;
+		};
+
+		vreg_s2a: smps2 {
+			regulator-min-microvolt = <1503000>;
+			regulator-max-microvolt = <2048000>;
+		};
+
+		vreg_l2a: ldo2 {
+			regulator-min-microvolt = <1503000>;
+			regulator-max-microvolt = <1980000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l3a: ldo3 {
+			regulator-min-microvolt = <2700000>;
+			regulator-max-microvolt = <3300000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l4a: ldo4 {
+			regulator-min-microvolt = <352000>;
+			regulator-max-microvolt = <801000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l5a: ldo5 {
+			regulator-min-microvolt = <1503000>;
+			regulator-max-microvolt = <1980000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l6a: ldo6 {
+			regulator-min-microvolt = <1710000>;
+			regulator-max-microvolt = <3544000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l7a: ldo7 {
+			regulator-min-microvolt = <1620000>;
+			regulator-max-microvolt = <1980000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l8a: ldo8 {
+			regulator-min-microvolt = <2800000>;
+			regulator-max-microvolt = <2800000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l9a: ldo9 {
+			regulator-min-microvolt = <1650000>;
+			regulator-max-microvolt = <3401000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l11a: ldo11 {
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <2000000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l12a: ldo12 {
+			regulator-min-microvolt = <1620000>;
+			regulator-max-microvolt = <1980000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l13a: ldo13 {
+			regulator-min-microvolt = <570000>;
+			regulator-max-microvolt = <650000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l14a: ldo14 {
+			regulator-min-microvolt = <1700000>;
+			regulator-max-microvolt = <1900000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l15a: ldo15 {
+			regulator-min-microvolt = <1100000>;
+			regulator-max-microvolt = <1305000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l16a: ldo16 {
+			regulator-min-microvolt = <830000>;
+			regulator-max-microvolt = <921000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l18a: ldo18 {
+			regulator-min-microvolt = <788000>;
+			regulator-max-microvolt = <1049000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l19a: ldo19 {
+			regulator-min-microvolt = <1080000>;
+			regulator-max-microvolt = <1305000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l20a: ldo20 {
+			regulator-min-microvolt = <530000>;
+			regulator-max-microvolt = <801000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l21a: ldo21 {
+			regulator-min-microvolt = <751000>;
+			regulator-max-microvolt = <825000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l22a: ldo22 {
+			regulator-min-microvolt = <1080000>;
+			regulator-max-microvolt = <1305000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+	};
+
+	pm6150l-rpmh-regulators {
+		compatible = "qcom,pm6150l-rpmh-regulators";
+		qcom,pmic-id = "e";
+
+		vreg_s8e: smps8 {
+			regulator-min-microvolt = <313000>;
+			regulator-max-microvolt = <1395000>;
+		};
+
+		vreg_l1e: ldo1 {
+			regulator-min-microvolt = <1620000>;
+			regulator-max-microvolt = <1980000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l2e: ldo2 {
+			regulator-min-microvolt = <1170000>;
+			regulator-max-microvolt = <1305000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l3e: ldo3 {
+			regulator-min-microvolt = <1100000>;
+			regulator-max-microvolt = <1299000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l4e: ldo4 {
+			regulator-min-microvolt = <1620000>;
+			regulator-max-microvolt = <3300000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l5e: ldo5 {
+			regulator-min-microvolt = <1620000>;
+			regulator-max-microvolt = <3300000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l6e: ldo6 {
+			regulator-min-microvolt = <1700000>;
+			regulator-max-microvolt = <3544000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l7e: ldo7 {
+			regulator-min-microvolt = <2700000>;
+			regulator-max-microvolt = <3544000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l8e: ldo8 {
+			regulator-min-microvolt = <1620000>;
+			regulator-max-microvolt = <2000000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l9e: ldo9 {
+			regulator-min-microvolt = <2700000>;
+			regulator-max-microvolt = <3544000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l10e: ldo10 {
+			regulator-min-microvolt = <3000000>;
+			regulator-max-microvolt = <3401000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l11e: ldo11 {
+			regulator-min-microvolt = <3000000>;
+			regulator-max-microvolt = <3401000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_bob: bob {
+			regulator-min-microvolt = <1620000>;
+			regulator-max-microvolt = <5492000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>;
+			regulator-allow-bypass;
+		};
+	};
+};
+
+&pm6350_gpios {
+	gpio_keys_pins: gpio-keys-pins {
+		pinconf {
+			pins = "gpio2";
+			function = PMIC_GPIO_FUNC_NORMAL;
+			bias-pull-up;
+			input-enable;
+			power-source = <0>;
+		};
+	};
+};
+
+&pm6350_resin {
+	status = "okay";
+	linux,code = <KEY_VOLUMEDOWN>;
+};
+
+&qupv3_id_1 {
+	status = "okay";
+};
+
+&tlmm {
+	gpio-reserved-ranges = <13 4>, <56 2>;
+};
+
+&uart2 {
+	status = "okay";
+};
+
+&usb_1 {
+	status = "okay";
+};
+
+&usb_1_dwc3 {
+	maximum-speed = "super-speed";
+	dr_mode = "peripheral";
+};
+
+&usb_1_hsphy {
+	status = "okay";
+
+	vdd-supply = <&vreg_l18a>;
+	vdda-pll-supply = <&vreg_l2a>;
+	vdda-phy-dpdm-supply = <&vreg_l3a>;
+};
+
+&usb_1_qmpphy {
+	status = "okay";
+
+	vdda-phy-supply = <&vreg_l22a>;
+	vdda-pll-supply = <&vreg_l16a>;
+};
-- 
2.33.0


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

* Re: [PATCH 01/11] clk: qcom: add select QCOM_GDSC for SM6350
  2021-10-03  8:31 ` [PATCH 01/11] clk: qcom: add select QCOM_GDSC for SM6350 Luca Weiss
@ 2021-10-03 11:21   ` Konrad Dybcio
  0 siblings, 0 replies; 20+ messages in thread
From: Konrad Dybcio @ 2021-10-03 11:21 UTC (permalink / raw)
  To: Luca Weiss, linux-arm-msm
  Cc: ~postmarketos/upstreaming, Andy Gross, Bjorn Andersson,
	Michael Turquette, Stephen Boyd, AngeloGioacchino Del Regno,
	linux-clk, linux-kernel


On 03.10.2021 10:31, Luca Weiss wrote:
> QCOM_GDSC is needed for the gcc driver to probe.
>
> Fixes: 131abae905df ("clk: qcom: Add SM6350 GCC driver")
> Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
> ---
>
Missed that, as I had more GCC drivers enabled in my config, good catch.


Reviewed-by: Konrad Dybcio <konrad.dybcio@somainline.org>



Konrad


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

* Re: [PATCH 06/11] arm64: dts: qcom: Add PM6350 PMIC
  2021-10-03  8:31 ` [PATCH 06/11] arm64: dts: qcom: Add PM6350 PMIC Luca Weiss
@ 2021-10-03 11:23   ` Konrad Dybcio
  0 siblings, 0 replies; 20+ messages in thread
From: Konrad Dybcio @ 2021-10-03 11:23 UTC (permalink / raw)
  To: Luca Weiss, linux-arm-msm
  Cc: ~postmarketos/upstreaming, Andy Gross, Bjorn Andersson,
	Rob Herring, devicetree, linux-kernel


On 03.10.2021 10:31, Luca Weiss wrote:
> PM6350 is used in SM6350 and provides similar functionality to other
> Qualcomm PMICs.
>
> Add the pon node with power & volume key and the gpios.
>
> Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
> ---


Reviewed-by: Konrad Dybcio <konrad.dybcio@somainline.org>


Konrad


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

* Re: [PATCH 10/11] arm64: dts: qcom: Add SM7225 device tree
  2021-10-03  8:31 ` [PATCH 10/11] arm64: dts: qcom: Add SM7225 device tree Luca Weiss
@ 2021-10-03 11:32   ` Konrad Dybcio
  0 siblings, 0 replies; 20+ messages in thread
From: Konrad Dybcio @ 2021-10-03 11:32 UTC (permalink / raw)
  To: Luca Weiss, linux-arm-msm
  Cc: ~postmarketos/upstreaming, Andy Gross, Bjorn Andersson,
	Rob Herring, devicetree, linux-kernel


On 03.10.2021 10:31, Luca Weiss wrote:
> The Snapdragon 750G (sm7225) is software-wise very similar to Snapdragon
> 690 (sm6350) with minor differences in clock speeds and as added here,
> it uses the Kryo 570 instead of Kryo 560.
>
> Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
> ---
>  arch/arm64/boot/dts/qcom/sm7225.dtsi | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
>  create mode 100644 arch/arm64/boot/dts/qcom/sm7225.dtsi
>
> diff --git a/arch/arm64/boot/dts/qcom/sm7225.dtsi b/arch/arm64/boot/dts/qcom/sm7225.dtsi
> new file mode 100644
> index 000000000000..7b2a002ca7ff
> --- /dev/null
> +++ b/arch/arm64/boot/dts/qcom/sm7225.dtsi
> @@ -0,0 +1,16 @@
> +// SPDX-License-Identifier: BSD-3-Clause
> +/*
> + * Copyright (c) 2021, Luca Weiss <luca@z3ntu.xyz>
> + */
> +
> +#include "sm6350.dtsi"
> +
> +/* SM7225 uses Kryo 570 instead of Kryo 560 */
> +&CPU0 { compatible = "qcom,kryo570"; };
> +&CPU1 { compatible = "qcom,kryo570"; };
> +&CPU2 { compatible = "qcom,kryo570"; };
> +&CPU3 { compatible = "qcom,kryo570"; };
> +&CPU4 { compatible = "qcom,kryo570"; };
> +&CPU5 { compatible = "qcom,kryo570"; };
> +&CPU6 { compatible = "qcom,kryo570"; };
> +&CPU7 { compatible = "qcom,kryo570"; };
>
As we discussed in private, we discovered after some poking on the Xperia 10 III and FP4, Qualcomm decided to use the "lagoon" codename for at least 3 SoCs, two of which are 6350 and 7225, with the third (and possibly more, eh...) yet to be discovered. For now we can tell the max GPU clock is over 50% higher on the 7225, but we'll get to know more differences as we progress forward.

Reviewed-by: Konrad Dybcio <konrad.dybcio@somainline.org>


Konrad


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

* Re: [PATCH 11/11] arm64: dts: qcom: sm7225: Add device tree for Fairphone 4
  2021-10-03  8:31 ` [PATCH 11/11] arm64: dts: qcom: sm7225: Add device tree for Fairphone 4 Luca Weiss
@ 2021-10-03 11:35   ` Konrad Dybcio
  0 siblings, 0 replies; 20+ messages in thread
From: Konrad Dybcio @ 2021-10-03 11:35 UTC (permalink / raw)
  To: Luca Weiss, linux-arm-msm
  Cc: ~postmarketos/upstreaming, Andy Gross, Bjorn Andersson,
	Rob Herring, devicetree, linux-kernel


On 03.10.2021 10:31, Luca Weiss wrote:
> Add device tree for the Fairphone 4 smartphone which is based on
> Snapdragon 750G (sm7225) which is basically sm6350.
>
> Currently supported are UART, physical buttons (power & volume), screen
> (based on simple-framebuffer set up by the bootloader), regulators and
> USB.
>
> Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
> ---
> [...]

> +
> +&pm6350_gpios {
> +	gpio_keys_pins: gpio-keys-pins {

'pin' singular, I guess


> +		pinconf {
> +			pins = "gpio2";
> +			function = PMIC_GPIO_FUNC_NORMAL;
> +			bias-pull-up;
> +			input-enable;
> +			power-source = <0>;
> +		};

pinconf {} is not necessary


[...]


Other than that:


Reviewed-by: Konrad Dybcio <konrad.dybcio@somainline.org>


Konrad



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

* Re: [PATCH 03/11] regulator: qcom-rpmh: Add PM6350 regulators
  2021-10-03  8:31 ` [PATCH 03/11] regulator: qcom-rpmh: Add PM6350 regulators Luca Weiss
@ 2021-10-04 12:37   ` Mark Brown
  2021-10-04 20:44     ` Luca Weiss
  0 siblings, 1 reply; 20+ messages in thread
From: Mark Brown @ 2021-10-04 12:37 UTC (permalink / raw)
  To: Luca Weiss
  Cc: linux-arm-msm, ~postmarketos/upstreaming, Andy Gross,
	Bjorn Andersson, Liam Girdwood, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 569 bytes --]

On Sun, Oct 03, 2021 at 10:31:26AM +0200, Luca Weiss wrote:

> Add the configuration for pm6350 regulators. The supplies are not known
> so use dummy ones for now.

If you don't know don't fix it into ABI, just don't specify anything
until someone figures out something accurate to put in there.

> Additionally leave out configuration of smps3 - smps5 and ldo17 as these
> are not configured in the downstream kernel.

Just describe everything that's there - nothing will get touched if the
board doesn't explicitly enable doing so, otherwise everything is read
only.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH 03/11] regulator: qcom-rpmh: Add PM6350 regulators
  2021-10-04 12:37   ` Mark Brown
@ 2021-10-04 20:44     ` Luca Weiss
  2021-10-04 21:18       ` Mark Brown
  0 siblings, 1 reply; 20+ messages in thread
From: Luca Weiss @ 2021-10-04 20:44 UTC (permalink / raw)
  To: Mark Brown
  Cc: linux-arm-msm, ~postmarketos/upstreaming, Andy Gross,
	Bjorn Andersson, Liam Girdwood, linux-kernel

Hi Mark,

On Montag, 4. Oktober 2021 14:37:31 CEST Mark Brown wrote:
> On Sun, Oct 03, 2021 at 10:31:26AM +0200, Luca Weiss wrote:
> > Add the configuration for pm6350 regulators. The supplies are not known
> > so use dummy ones for now.
> 
> If you don't know don't fix it into ABI, just don't specify anything
> until someone figures out something accurate to put in there.
> 

The RPMH_VREG macro expects _supply_name so what should I put there instead?

> > Additionally leave out configuration of smps3 - smps5 and ldo17 as these
> > are not configured in the downstream kernel.
> 
> Just describe everything that's there - nothing will get touched if the
> board doesn't explicitly enable doing so, otherwise everything is read
> only.

Problem is I do not know which types those regulators are, e.g. pldo or nldo. 
The ones I described are experimentally verified because the wrong configuration 
makes the driver probe fail.
So I can't really put anything there, unless there's another way to do this.

Regards
Luca



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

* Re: [PATCH 03/11] regulator: qcom-rpmh: Add PM6350 regulators
  2021-10-04 20:44     ` Luca Weiss
@ 2021-10-04 21:18       ` Mark Brown
  0 siblings, 0 replies; 20+ messages in thread
From: Mark Brown @ 2021-10-04 21:18 UTC (permalink / raw)
  To: Luca Weiss
  Cc: linux-arm-msm, ~postmarketos/upstreaming, Andy Gross,
	Bjorn Andersson, Liam Girdwood, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1120 bytes --]

On Mon, Oct 04, 2021 at 10:44:25PM +0200, Luca Weiss wrote:
> On Montag, 4. Oktober 2021 14:37:31 CEST Mark Brown wrote:

> > If you don't know don't fix it into ABI, just don't specify anything
> > until someone figures out something accurate to put in there.

> The RPMH_VREG macro expects _supply_name so what should I put there instead?

NULL should do the right thing, or make a new macro.

> > > Additionally leave out configuration of smps3 - smps5 and ldo17 as these
> > > are not configured in the downstream kernel.

> > Just describe everything that's there - nothing will get touched if the
> > board doesn't explicitly enable doing so, otherwise everything is read
> > only.

> Problem is I do not know which types those regulators are, e.g. pldo or nldo. 
> The ones I described are experimentally verified because the wrong configuration 
> makes the driver probe fail.
> So I can't really put anything there, unless there's another way to do this.

That makes sense, please explain in the commit log that only are they
not initialized but also you don't know what types they are.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH 00/11] Initial Fairphone 4 support
  2021-10-03  8:31 [PATCH 00/11] Initial Fairphone 4 support Luca Weiss
                   ` (10 preceding siblings ...)
  2021-10-03  8:31 ` [PATCH 11/11] arm64: dts: qcom: sm7225: Add device tree for Fairphone 4 Luca Weiss
@ 2021-10-31 22:10 ` Pavel Machek
  11 siblings, 0 replies; 20+ messages in thread
From: Pavel Machek @ 2021-10-31 22:10 UTC (permalink / raw)
  To: Luca Weiss
  Cc: linux-arm-msm, ~postmarketos/upstreaming,
	AngeloGioacchino Del Regno, Bjorn Andersson, David Collins,
	Hector Martin, Jonathan Cameron, Konrad Dybcio,
	Lorenzo Pieralisi, Mark Brown, Rob Herring, Sebastian Reichel,
	Stephen Boyd, Stephen Boyd, Sudeep Holla, Vinod Koul,
	Viresh Kumar, devicetree, linux-clk, linux-gpio, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 422 bytes --]

Hi!

> This series adds basic support for the recently announced Fairphone 4
> smartphone, based on the Snapdragon 750G (sm7225).
> 
> This adds support for UART, power & volume buttons, screen based on
> simple-framebuffer, regulators and USB.

Thanks for the series. Can I get you to cc phone-devel mailing list
with phone related stuff?

Thanks,
								Pavel
-- 
http://www.livejournal.com/~pavelmachek

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

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

end of thread, other threads:[~2021-10-31 22:10 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-03  8:31 [PATCH 00/11] Initial Fairphone 4 support Luca Weiss
2021-10-03  8:31 ` [PATCH 01/11] clk: qcom: add select QCOM_GDSC for SM6350 Luca Weiss
2021-10-03 11:21   ` Konrad Dybcio
2021-10-03  8:31 ` [PATCH 02/11] dt-bindings: regulator: qcom,rpmh: Add compatible for PM6350 Luca Weiss
2021-10-03  8:31 ` [PATCH 03/11] regulator: qcom-rpmh: Add PM6350 regulators Luca Weiss
2021-10-04 12:37   ` Mark Brown
2021-10-04 20:44     ` Luca Weiss
2021-10-04 21:18       ` Mark Brown
2021-10-03  8:31 ` [PATCH 04/11] dt-bindings: pinctrl: qcom,pmic-gpio: Add compatible for PM6350 Luca Weiss
2021-10-03  8:31 ` [PATCH 05/11] pinctrl: qcom: spmi-gpio: " Luca Weiss
2021-10-03  8:31 ` [PATCH 06/11] arm64: dts: qcom: Add PM6350 PMIC Luca Weiss
2021-10-03 11:23   ` Konrad Dybcio
2021-10-03  8:31 ` [PATCH 07/11] arm64: dts: qcom: sm6350: add debug uart Luca Weiss
2021-10-03  8:31 ` [PATCH 08/11] dt-bindings: arm: cpus: Add Kryo 570 CPUs Luca Weiss
2021-10-03  8:31 ` [PATCH 09/11] dt-bindings: arm: qcom: Document sm7225 and fairphone,fp4 board Luca Weiss
2021-10-03  8:31 ` [PATCH 10/11] arm64: dts: qcom: Add SM7225 device tree Luca Weiss
2021-10-03 11:32   ` Konrad Dybcio
2021-10-03  8:31 ` [PATCH 11/11] arm64: dts: qcom: sm7225: Add device tree for Fairphone 4 Luca Weiss
2021-10-03 11:35   ` Konrad Dybcio
2021-10-31 22:10 ` [PATCH 00/11] Initial Fairphone 4 support Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).