linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Konrad Dybcio <konradybcio@gmail.com>
To: skrzynka@konradybcio.pl
Cc: Konrad Dybcio <konradybcio@gmail.com>,
	Andy Gross <agross@kernel.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>, Rob Herring <robh+dt@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	Kees Cook <keescook@chromium.org>,
	Anton Vorontsov <anton@enomsg.org>,
	Colin Cross <ccross@android.com>, Tony Luck <tony.luck@intel.com>,
	linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 20/21] arm64: dts: qcom: Add support for Sony Xperia Z5 (SoMC Sumire-RoW)
Date: Sat, 20 Jun 2020 16:46:36 +0200	[thread overview]
Message-ID: <20200620144639.335093-21-konradybcio@gmail.com> (raw)
In-Reply-To: <20200620144639.335093-1-konradybcio@gmail.com>

Add device tree support for the Sony Xperia Z5 smartphone.
The kitakami part in DT name comes from Sony platform naming
and is there to indicate that as more Sony devices using msm8994
are added to the kernel, they will share a lot of common code.

The board currently supports
* Serial
* SDHCI
* I2C
* Regulator configuration
* pstore log dump
* GPIO keys

Signed-off-by: Konrad Dybcio <konradybcio@gmail.com>
---
 arch/arm64/boot/dts/qcom/Makefile             |   1 +
 .../msm8994-sony-xperia-kitakami-sumire.dts   | 410 ++++++++++++++++++
 2 files changed, 411 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/msm8994-sony-xperia-kitakami-sumire.dts

diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
index 0f2c33d611df..01ca9ac9f905 100644
--- a/arch/arm64/boot/dts/qcom/Makefile
+++ b/arch/arm64/boot/dts/qcom/Makefile
@@ -10,6 +10,7 @@ dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-samsung-a3u-eur.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-samsung-a5u-eur.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8992-bullhead-rev-101.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8994-angler-rev-101.dtb
+dtb-$(CONFIG_ARCH_QCOM)	+= msm8994-sony-xperia-kitakami-sumire.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8996-mtp.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8998-asus-novago-tp370ql.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8998-hp-envy-x2.dtb
diff --git a/arch/arm64/boot/dts/qcom/msm8994-sony-xperia-kitakami-sumire.dts b/arch/arm64/boot/dts/qcom/msm8994-sony-xperia-kitakami-sumire.dts
new file mode 100644
index 000000000000..3b0a880416c4
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/msm8994-sony-xperia-kitakami-sumire.dts
@@ -0,0 +1,410 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright (c) 2020, Konrad Dybcio
+ */
+
+/dts-v1/;
+
+#include "msm8994.dtsi"
+#include "pm8994.dtsi"
+#include "pmi8994.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/gpio-keys.h>
+
+/ {
+	model = "SoMC Sumire-ROW";
+	compatible = "somc,sumire-row", "qcom,msm8994";
+	/* required for bootloader to select correct board */
+	qcom,msm-id = <0xcf 0x20001>;
+	qcom,pmic-id = <0x10009 0x1000a 0x00 0x00>;
+	qcom,board-id = <8 0>;
+
+	/* Xperia Z5's firmware doesn't support PSCI */
+	/delete-node/ psci;
+
+	soc {
+		serial@f991e000 {
+			status = "okay";
+
+			pinctrl-names = "default", "sleep";
+			pinctrl-0 = <&blsp1_uart2_default>;
+			pinctrl-1 = <&blsp1_uart2_sleep>;
+		};
+
+		serial@f995e000 {
+			status = "okay";
+
+			pinctrl-names = "default", "sleep";
+			pinctrl-0 = <&blsp2_uart2_default>;
+			pinctrl-1 = <&blsp2_uart2_sleep>;
+		};
+
+		/* I2C1 is disabled on this board */
+
+		i2c@f9924000 {
+			status = "okay";
+
+			/* NXP NFC */
+		};
+
+		i2c@f9926000 {
+			status = "okay";
+
+			/* Empty but active */
+		};
+
+		i2c@f9967000 {
+			status = "okay";
+
+			/* SMB1357 charger and sii8620 HDMI/MHL bridge */
+		};
+
+		i2c@f9928000 {
+			status = "okay";
+
+			/* Synaptics touchscreen */
+		};
+
+		sdhci@f9824900 {
+			status = "okay";
+
+			/* Downstream pushes 2.95V to the sdhci device,
+			but upstream driver REALLY wants to make vmmc 1.8v
+			cause of the hs400-1_8v mode. MMC works fine without
+			that regulator, so let's not use it for now.
+			vqmmc is also disabled cause driver stll complains.
+
+			vmmc-supply = <&pm8994_l20>;
+			vqmmc-supply = <&pm8994_s4>;
+			*/
+		};
+
+		spi@f9923000 {
+			status = "okay";
+
+			/* FPC fingerprint reader */
+		};
+	};
+
+	gpio_keys {
+		compatible = "gpio-keys";
+		input-name = "gpio-keys";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		autorepeat;
+
+		button@0 {
+			label = "Volume Down";
+			gpios = <&pm8994_gpios 2 GPIO_ACTIVE_LOW>;
+			linux,input-type = <1>;
+			linux,code = <KEY_VOLUMEDOWN>;
+			wakeup-source;
+			debounce-interval = <15>;
+		};
+
+		button@1 {
+			label = "Volume Up";
+			gpios = <&pm8994_gpios 3 GPIO_ACTIVE_LOW>;
+			linux,input-type = <1>;
+			linux,code = <KEY_VOLUMEUP>;
+			wakeup-source;
+			debounce-interval = <15>;
+		};
+
+		button@2 {
+			label = "Camera Snapshot";
+			gpios = <&pm8994_gpios 4 GPIO_ACTIVE_LOW>;
+			linux,input-type = <1>;
+			linux,code = <KEY_CAMERA>;
+			wakeup-source;
+			debounce-interval = <15>;
+		};
+
+		button@3 {
+			label = "Camera Focus";
+			gpios = <&pm8994_gpios 5 GPIO_ACTIVE_LOW>;
+			linux,input-type = <1>;
+			linux,code = <KEY_VOLUMEUP>;
+			wakeup-source;
+			debounce-interval = <15>;
+		};
+
+	};
+
+	reserved-memory {
+		#address-cells = <2>;
+		#size-cells = <2>;
+		ranges;
+
+		/* This is for getting crash logs using Android downstream kernels */
+		ramoops@1fe00000 {
+			compatible = "ramoops";
+			reg = <0x0 0x1fe00000 0x0 0x200000>;
+			console-size = <0x100000>;
+			record-size = <0x10000>;
+			ftrace-size = <0x10000>;
+			pmsg-size = <0x80000>;
+		};
+
+		continuous_splash: framebuffer@3401000{
+			reg = <0x0 0x3401000 0x0 0x2200000>;
+			no-map;
+		};
+
+		dfps_data_mem: dfps_data_mem@3400000 {
+			reg = <0x0 0x3400000 0x0 0x1000>;
+			no-map;
+		};
+
+		peripheral_region: peripheral_region@7400000 {
+			reg = <0x0 0x7400000 0x0 0x1c00000>;
+			no-map;
+		};
+
+		modem_region: modem_region@9000000 {
+			reg = <0x0 0x9000000 0x0 0x5a00000>;
+			no-map;
+		};
+
+		tzapp: modem_region@ea00000 {
+			reg = <0x0 0xea00000 0x0 0x1900000>;
+			no-map;
+		};
+
+		fb_region: fb_region@40000000 {
+			reg = <0x00 0x40000000 0x00 0x1000000>;
+			no-map;
+		};
+	};
+};
+
+&smd_rpm {
+	rpm {
+		rpm_requests {
+			pm8994-regulators {
+				s1 {
+					/* Unused */
+					status = "disabled";
+				};
+
+				s2 {
+					/* Unused */
+					status = "disabled";
+				};
+
+				s3 {
+					regulator-min-microvolt = <1300000>;
+					regulator-max-microvolt = <1300000>;
+				};
+
+				s4 {
+					regulator-min-microvolt = <1800000>;
+					regulator-max-microvolt = <1800000>;
+				};
+
+				s5 {
+					regulator-min-microvolt = <2150000>;
+					regulator-max-microvolt = <2150000>;
+				};
+
+				s7 {
+					regulator-min-microvolt = <1000000>;
+					regulator-max-microvolt = <1000000>;
+				};
+
+				l1 {
+					regulator-min-microvolt = <1000000>;
+					regulator-max-microvolt = <1000000>;
+				};
+
+				l2 {
+					regulator-min-microvolt = <1250000>;
+					regulator-max-microvolt = <1250000>;
+				};
+
+				l3 {
+					regulator-min-microvolt = <1100000>;
+					regulator-max-microvolt = <1100000>;
+				};
+
+				l4 {
+					regulator-min-microvolt = <1225000>;
+					regulator-max-microvolt = <1225000>;
+				};
+
+				l5 {
+					/* Unused */
+					status = "disabled";
+				};
+
+				l6 {
+					regulator-min-microvolt = <1800000>;
+					regulator-max-microvolt = <1800000>;
+				};
+
+				l7 {
+					/* Unused */
+					status = "disabled";
+				};
+
+				l8 {
+					regulator-min-microvolt = <1800000>;
+					regulator-max-microvolt = <1800000>;
+				};
+
+				l9 {
+					regulator-min-microvolt = <1800000>;
+					regulator-max-microvolt = <1800000>;
+				};
+
+				l10 {
+					regulator-min-microvolt = <1800000>;
+					regulator-max-microvolt = <1800000>;
+				};
+
+				l11 {
+					regulator-min-microvolt = <1200000>;
+					regulator-max-microvolt = <1200000>;
+				};
+
+				l12 {
+					regulator-min-microvolt = <1800000>;
+					regulator-max-microvolt = <1800000>;
+				};
+
+				l13 {
+					regulator-min-microvolt = <1800000>;
+					regulator-max-microvolt = <2950000>;
+				};
+
+				l14 {
+					regulator-min-microvolt = <1800000>;
+					regulator-max-microvolt = <1800000>;
+				};
+
+				l15 {
+					regulator-min-microvolt = <1800000>;
+					regulator-max-microvolt = <1800000>;
+				};
+
+				l16 {
+					regulator-min-microvolt = <2700000>;
+					regulator-max-microvolt = <2700000>;
+				};
+
+				l17 {
+					regulator-min-microvolt = <2200000>;
+					regulator-max-microvolt = <2200000>;
+				};
+
+				l18 {
+					regulator-min-microvolt = <2850000>;
+					regulator-max-microvolt = <2850000>;
+					regulator-always-on;
+				};
+
+				l19 {
+					regulator-min-microvolt = <2850000>;
+					regulator-max-microvolt = <2850000>;
+				};
+
+				l20 {
+					regulator-min-microvolt = <2950000>;
+					regulator-max-microvolt = <2950000>;
+					regulator-always-on;
+					regulator-boot-on;
+				};
+
+				l21 {
+					regulator-min-microvolt = <2950000>;
+					regulator-max-microvolt = <2950000>;
+					regulator-always-on;
+				};
+
+				l22 {
+					regulator-min-microvolt = <3000000>;
+					regulator-max-microvolt = <3000000>;
+				};
+
+				l23 {
+					regulator-min-microvolt = <2800000>;
+					regulator-max-microvolt = <2800000>;
+				};
+
+				l24 {
+					regulator-min-microvolt = <3075000>;
+					regulator-max-microvolt = <3150000>;
+				};
+
+				l25 {
+					regulator-min-microvolt = <1000000>;
+					regulator-max-microvolt = <1000000>;
+				};
+
+				l26 {
+					regulator-min-microvolt = <987500>;
+					regulator-max-microvolt = <987500>;
+				};
+
+				l27 {
+					regulator-min-microvolt = <1200000>;
+					regulator-max-microvolt = <1200000>;
+				};
+
+				l28 {
+					regulator-min-microvolt = <1000000>;
+					regulator-max-microvolt = <1000000>;
+				};
+
+				l29 {
+					regulator-min-microvolt = <2700000>;
+					regulator-max-microvolt = <2700000>;
+				};
+
+				l30 {
+					regulator-min-microvolt = <1800000>;
+					regulator-max-microvolt = <1800000>;
+				};
+
+				l31 {
+					regulator-min-microvolt = <1200000>;
+					regulator-max-microvolt = <1200000>;
+					regulator-boot-on;
+				};
+
+				l32 {
+					regulator-min-microvolt = <1800000>;
+					regulator-max-microvolt = <1800000>;
+				};
+
+				lvs1 {
+					/* Downstream sets it to enabled but
+					doesn't specify a voltage range */
+					status = "okay";
+				};
+
+				lvs2 {
+					/* Downstream sets it to enabled but
+					doesn't specify a voltage range */
+					status = "okay";
+				};
+			};
+			pmi8994-regulators {
+				s1 {
+					regulator-min-microvolt = <1025000>;
+					regulator-max-microvolt = <1025000>;
+				};
+
+				s2 {
+					/* Unused */
+					status = "disabled";
+				};
+
+				boost-bypass {
+					regulator-min-microvolt = <3150000>;
+					regulator-max-microvolt = <3600000>;
+				};
+			};
+		};
+	};
+};
\ No newline at end of file
-- 
2.27.0


  parent reply	other threads:[~2020-06-20 14:49 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-20 14:46 [PATCH 00/21] MSM8994 peripheral enablement, DTS updates Konrad Dybcio
2020-06-20 14:46 ` [PATCH 01/21] clk: qcom: smd: Add support for MSM8992/4 rpm clocks Konrad Dybcio
2020-06-23 19:11   ` Stephen Boyd
2020-06-20 14:46 ` [PATCH 02/21] arm64: dts: qcom: msm8994: Add SPMI PMIC arbiter device Konrad Dybcio
2020-06-20 14:46 ` [PATCH 03/21] arm64: dts: qcom: msm8994: Add a proper CPU map Konrad Dybcio
2020-06-20 14:46 ` [PATCH 04/21] arm64: dts: qcom: msm8994: Wrap clock nodes into clocks {} Konrad Dybcio
2020-06-20 14:46 ` [PATCH 05/21] arm64: dts: qcom: msm8994: Rename the smem node and remove its unit address Konrad Dybcio
2020-06-20 14:46 ` [PATCH 06/21] arm64: dts: qcom: msm8994: Rename clock_gcc label to gcc Konrad Dybcio
2020-06-20 14:46 ` [PATCH 07/21] arm64: dts: qcom: msm8994: Add apcs node Konrad Dybcio
2020-06-20 14:46 ` [PATCH 08/21] arm64: dts: qcom: msm8994: Add pmu node Konrad Dybcio
2020-06-20 14:46 ` [PATCH 09/21] arm64: dts: qcom: msm8994: Add PSCI node Konrad Dybcio
2020-06-20 14:46 ` [PATCH 10/21] arm64: dts: qcom: msm8994: Add support for SMD RPM Konrad Dybcio
2020-06-20 14:46 ` [PATCH 11/21] arm64: dts: qcom: msm8994: Add SDHCI1 node Konrad Dybcio
2020-06-20 14:46 ` [PATCH 12/21] arm64: dts: qcom: msm8994: Remove qcom,msm-id and qcom-pmic-id properties Konrad Dybcio
2020-06-20 14:46 ` [PATCH 13/21] arm64: dts: qcom: msm8994: Make comments C style Konrad Dybcio
2020-06-20 14:46 ` [PATCH 14/21] arm64: dts: qcom: msm8994: Add SCM node Konrad Dybcio
2020-06-20 14:46 ` [PATCH 15/21] arm64: dts: qcom: msm8994: Add BLSP2 UART2 node Konrad Dybcio
2020-06-20 14:46 ` [PATCH 16/21] arm64: dts: qcom: msm8994: Add I2C, SPI and BLSP DMA nodes Konrad Dybcio
2020-06-20 14:46 ` [PATCH 17/21] arm64: dts: qcom: Update msm8994 pin configuration Konrad Dybcio
2020-06-20 14:46 ` [PATCH 18/21] regulator: qcom_smd: Fix pmi8994 label Konrad Dybcio
2020-06-21  6:05   ` Bjorn Andersson
2020-06-20 14:46 ` [PATCH 19/21] arm64: dts: qcom: angler: Add qcom,msm-id and pmic-id Konrad Dybcio
2020-06-20 14:46 ` Konrad Dybcio [this message]
2020-06-20 14:46 ` [PATCH 21/21] arm64: dts: qcom: Move msm8994-smd-rpm contents to lg-bullhead Konrad Dybcio
2020-06-23 12:39 ` [PATCH 00/21] MSM8994 peripheral enablement, DTS updates Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200620144639.335093-21-konradybcio@gmail.com \
    --to=konradybcio@gmail.com \
    --cc=agross@kernel.org \
    --cc=anton@enomsg.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=broonie@kernel.org \
    --cc=ccross@android.com \
    --cc=devicetree@vger.kernel.org \
    --cc=keescook@chromium.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=skrzynka@konradybcio.pl \
    --cc=tony.luck@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).