linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Konrad Dybcio <konradybcio@gmail.com>
Cc: skrzynka@konradybcio.pl, Andy Gross <agross@kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Jassi Brar <jassisinghbrar@gmail.com>,
	Kees Cook <keescook@chromium.org>,
	Anton Vorontsov <anton@enomsg.org>,
	Colin Cross <ccross@android.com>, Tony Luck <tony.luck@intel.com>,
	Sivaprakash Murugesan <sivaprak@codeaurora.org>,
	linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org,
	??ukasz Patron <priv.luk@gmail.com>
Subject: Re: [PATCH v3 5/7] arm64: dts: qcom: Add support for Sony Xperia XA2/Plus/Ultra (Nile platform)
Date: Tue, 23 Jun 2020 00:35:15 -0700	[thread overview]
Message-ID: <20200623073515.GA128451@builder.lan> (raw)
In-Reply-To: <20200622192558.152828-6-konradybcio@gmail.com>

On Mon 22 Jun 12:25 PDT 2020, Konrad Dybcio wrote:

> Add device tree support for the Sony Xperia XA2, XA2 Plus and
> XA2 Ultra smartphones. They are all based on the Sony Nile
> platform (sdm630) and share a lot of common code. The
> differences are really minor, so a Nile-common DTSI
> has been created to reduce clutter.
> 
> XA2 - Pioneer
> XA2 Plus - Voyager
> XA2 Ultra - Discovery
> 
> The boards currently support:
> * Screen console
> * SDHCI
> * I2C
> * pstore log dump
> * GPIO keys
> * PSCI idle states
> 
> Signed-off-by: Konrad Dybcio <konradybcio@gmail.com>
> Tested-by: ??ukasz Patron <priv.luk@gmail.com>
> ---
>  arch/arm64/boot/dts/qcom/Makefile             |   3 +
>  .../sdm630-sony-xperia-nile-discovery.dts     |  13 ++
>  .../qcom/sdm630-sony-xperia-nile-pioneer.dts  |  13 ++
>  .../qcom/sdm630-sony-xperia-nile-voyager.dts  |  20 +++
>  .../dts/qcom/sdm630-sony-xperia-nile.dtsi     | 136 ++++++++++++++++++
>  5 files changed, 185 insertions(+)
>  create mode 100644 arch/arm64/boot/dts/qcom/sdm630-sony-xperia-nile-discovery.dts
>  create mode 100644 arch/arm64/boot/dts/qcom/sdm630-sony-xperia-nile-pioneer.dts
>  create mode 100644 arch/arm64/boot/dts/qcom/sdm630-sony-xperia-nile-voyager.dts
>  create mode 100644 arch/arm64/boot/dts/qcom/sdm630-sony-xperia-nile.dtsi
> 
> diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
> index 0f2c33d611df..1cad7cb07574 100644
> --- a/arch/arm64/boot/dts/qcom/Makefile
> +++ b/arch/arm64/boot/dts/qcom/Makefile
> @@ -16,6 +16,9 @@ dtb-$(CONFIG_ARCH_QCOM)	+= msm8998-hp-envy-x2.dtb
>  dtb-$(CONFIG_ARCH_QCOM)	+= msm8998-lenovo-miix-630.dtb
>  dtb-$(CONFIG_ARCH_QCOM)	+= msm8998-mtp.dtb
>  dtb-$(CONFIG_ARCH_QCOM)	+= sc7180-idp.dtb
> +dtb-$(CONFIG_ARCH_QCOM)	+= sdm630-sony-xperia-nile-discovery.dtb
> +dtb-$(CONFIG_ARCH_QCOM)	+= sdm630-sony-xperia-nile-pioneer.dtb
> +dtb-$(CONFIG_ARCH_QCOM)	+= sdm630-sony-xperia-nile-voyager.dtb
>  dtb-$(CONFIG_ARCH_QCOM)	+= sdm660-xiaomi-lavender.dtb
>  dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-cheza-r1.dtb
>  dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-cheza-r2.dtb
> diff --git a/arch/arm64/boot/dts/qcom/sdm630-sony-xperia-nile-discovery.dts b/arch/arm64/boot/dts/qcom/sdm630-sony-xperia-nile-discovery.dts
> new file mode 100644
> index 000000000000..8fca0b69fa01
> --- /dev/null
> +++ b/arch/arm64/boot/dts/qcom/sdm630-sony-xperia-nile-discovery.dts
> @@ -0,0 +1,13 @@
> +// SPDX-License-Identifier: BSD-3-Clause
> +/*
> + * Copyright (c) 2020, Konrad Dybcio
> + */
> +
> +/dts-v1/;
> +
> +#include "sdm630-sony-xperia-nile.dtsi"
> +
> +/ {
> +	model = "Sony Xperia XA2 Ultra";
> +	compatible = "sony,discovery-row", "qcom,sdm630";
> +};
> diff --git a/arch/arm64/boot/dts/qcom/sdm630-sony-xperia-nile-pioneer.dts b/arch/arm64/boot/dts/qcom/sdm630-sony-xperia-nile-pioneer.dts
> new file mode 100644
> index 000000000000..90dcd4ebaaed
> --- /dev/null
> +++ b/arch/arm64/boot/dts/qcom/sdm630-sony-xperia-nile-pioneer.dts
> @@ -0,0 +1,13 @@
> +// SPDX-License-Identifier: BSD-3-Clause
> +/*
> + * Copyright (c) 2020, Konrad Dybcio
> + */
> +
> +/dts-v1/;
> +
> +#include "sdm630-sony-xperia-nile.dtsi"
> +
> +/ {
> +	model = "Sony Xperia XA2";
> +	compatible = "sony,pioneer-row", "qcom,sdm630";
> +};
> diff --git a/arch/arm64/boot/dts/qcom/sdm630-sony-xperia-nile-voyager.dts b/arch/arm64/boot/dts/qcom/sdm630-sony-xperia-nile-voyager.dts
> new file mode 100644
> index 000000000000..fae5f1bb6834
> --- /dev/null
> +++ b/arch/arm64/boot/dts/qcom/sdm630-sony-xperia-nile-voyager.dts
> @@ -0,0 +1,20 @@
> +// SPDX-License-Identifier: BSD-3-Clause
> +/*
> + * Copyright (c) 2020, Konrad Dybcio
> + */
> +
> +/dts-v1/;
> +
> +#include "sdm630-sony-xperia-nile.dtsi"
> +
> +/ {
> +	model = "Sony Xperia XA2 Plus";
> +	compatible = "sony,voyager-row", "qcom,sdm630";
> +
> +	chosen {
> +		framebuffer@9d400000 {
> +			reg = <0 0x9d400000 0 (2160 * 1080 * 4)>;
> +			height = <2160>;
> +		};
> +	};
> +};
> diff --git a/arch/arm64/boot/dts/qcom/sdm630-sony-xperia-nile.dtsi b/arch/arm64/boot/dts/qcom/sdm630-sony-xperia-nile.dtsi
> new file mode 100644
> index 000000000000..9ba359c848d0
> --- /dev/null
> +++ b/arch/arm64/boot/dts/qcom/sdm630-sony-xperia-nile.dtsi
> @@ -0,0 +1,136 @@
> +// SPDX-License-Identifier: BSD-3-Clause
> +/*
> + * Copyright (c) 2020, Konrad Dybcio
> + */
> +
> +/dts-v1/;
> +
> +#include "sdm630.dtsi"
> +#include "pm660.dtsi"
> +#include "pm660l.dtsi"
> +#include <dt-bindings/gpio/gpio.h>
> +#include <dt-bindings/input/input.h>
> +#include <dt-bindings/input/gpio-keys.h>
> +
> +/ {
> +	/* required for bootloader to select correct board */
> +	qcom,msm-id = <318 0>;
> +	qcom,board-id = <8 1>;
> +	qcom,pmic-id = <0x1001b 0x101011a 0x00 0x00 0x1001b 0x201011a 0x00 0x00>;
> +
> +	/* This part enables graphical output via bootloader-enabled display */
> +	chosen {
> +		bootargs = "earlycon=tty0 console=tty0";
> +
> +		#address-cells = <2>;
> +		#size-cells = <2>;
> +		ranges;
> +
> +		stdout-path = "framebuffer0";
> +
> +		framebuffer0: framebuffer@9d400000 {
> +			compatible = "simple-framebuffer";
> +			reg = <0 0x9d400000 0 (1920 * 1080 * 4)>;
> +			width = <1080>;
> +			height = <1920>;
> +			stride = <(1080 * 4)>;
> +			format = "a8r8g8b8";
> +			status= "okay";
> +		};
> +	};
> +
> +	gpio_keys {
> +		status = "okay";
> +		compatible = "gpio-keys";
> +		input-name = "gpio-keys";
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +		autorepeat;
> +
> +		camera_focus {
> +			label = "Camera Focus";
> +			gpios = <&tlmm 64 GPIO_ACTIVE_LOW>;
> +			linux,input-type = <1>;
> +			linux,code = <KEY_CAMERA_FOCUS>;
> +			debounce-interval = <15>;
> +		};
> +
> +		camera_snapshot {
> +			label = "Camera Snapshot";
> +			gpios = <&tlmm 113 GPIO_ACTIVE_LOW>;
> +			linux,input-type = <1>;
> +			linux,code = <KEY_CAMERA>;
> +			debounce-interval = <15>;
> +		};
> +
> +		vol_down {
> +			label = "Volume Down";
> +			gpios = <&pm660l_gpios 7 GPIO_ACTIVE_LOW>;
> +			linux,input-type = <1>;
> +			linux,code = <KEY_VOLUMEDOWN>;
> +			gpio-key,wakeup;
> +			debounce-interval = <15>;
> +		};
> +	};
> +
> +	reserved-memory {
> +		#address-cells = <2>;
> +		#size-cells = <2>;
> +		ranges;
> +
> +		ramoops@ffc00000 {
> +			compatible = "ramoops";
> +			reg = <0x0 0xffc00000 0x0 0x100000>;
> +			record-size = <0x10000>;
> +			console-size = <0x60000>;
> +			ftrace-size = <0x10000>;
> +			pmsg-size = <0x20000>;
> +			ecc-size = <16>;
> +			status = "okay";
> +		};
> +
> +		debug_region@ffb00000 {
> +			reg = <0x00 0xffb00000 0x00 0x100000>;
> +			no-map;
> +		};
> +
> +		removed_region@85800000 {
> +			reg = <0x00 0x85800000 0x00 0x3700000>;
> +			no-map;
> +		};
> +	};
> +
> +	soc {
> +		sdhci@c0c4000 {

I believe I forgot to ask you to refer to these nodes by label instead
of per their structure (i.e. &sdhc_1 { ... outside / {). As we do in
e.g. sdm845-mtp.dts.

But the patches looks good, so I applied them anyways. When it suits you
(e.g. when you're populating the i2c nodes below) please update them
accordingly.

Thanks,
Bjorn

> +			status = "okay";
> +
> +			mmc-ddr-1_8v;
> +			/* SoMC Nile platform's eMMC doesn't support HS200 mode */
> +			mmc-hs400-1_8v;
> +		};
> +
> +		i2c@c175000 {
> +			status = "okay";
> +
> +			/* Synaptics touchscreen */
> +		};
> +
> +		i2c@c176000 {
> +			status = "okay";
> +
> +			/* SMB1351 charger */
> +		};
> +
> +		serial@c1af000 {
> +			status = "okay";
> +		};
> +
> +		/* I2C3, 4, 5, 7 and 8 are disabled on this board. */
> +
> +		i2c@c1b6000 {
> +			status = "okay";
> +
> +			/* NXP NFC */
> +		};
> +	};
> +};
> -- 
> 2.27.0
> 

  reply	other threads:[~2020-06-23  7:38 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-22 19:25 [PATCH v3 0/7] Add support for Sony SDM630-based boards Konrad Dybcio
2020-06-22 19:25 ` [PATCH v3 1/7] pinctrl: qcom: spmi-gpio: Add pm660(l) compatibility Konrad Dybcio
2020-06-23  7:26   ` Bjorn Andersson
2020-06-23  8:02     ` Konrad Dybcio
2020-06-23  8:25       ` Bjorn Andersson
2020-07-07 12:02   ` Linus Walleij
2020-06-22 19:25 ` [PATCH v3 2/7] Documentation: Document pm660(l) SPMI GPIOs compatible Konrad Dybcio
2020-06-23  7:26   ` Bjorn Andersson
2020-07-07 12:02   ` Linus Walleij
2020-06-22 19:25 ` [PATCH v3 3/7] arm64: dts: qcom: pm660(l): Add base dts files Konrad Dybcio
2020-06-22 19:25 ` [PATCH v3 4/7] arm64: dts: qcom: sdm630: Add sdm630 dts file Konrad Dybcio
2020-06-22 19:25 ` [PATCH v3 5/7] arm64: dts: qcom: Add support for Sony Xperia XA2/Plus/Ultra (Nile platform) Konrad Dybcio
2020-06-23  7:35   ` Bjorn Andersson [this message]
2020-06-23  8:08     ` Konrad Dybcio
2020-06-23  8:24       ` Bjorn Andersson
2020-06-22 19:25 ` [PATCH v3 6/7] arm64: dts: qcom: Add support for Sony Xperia 10/10 Plus (Ganges platform) Konrad Dybcio
2020-06-22 19:25 ` [PATCH v3 7/7] mailbox: qcom: Add sdm660 hmss compatible Konrad Dybcio
2020-06-23  7:25   ` Bjorn Andersson
2020-06-26 15:48     ` Alexey Minnekhanov
2020-07-13 19:19       ` Bjorn Andersson
2020-07-13 18:56   ` Rob Herring

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=20200623073515.GA128451@builder.lan \
    --to=bjorn.andersson@linaro.org \
    --cc=agross@kernel.org \
    --cc=anton@enomsg.org \
    --cc=ccross@android.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jassisinghbrar@gmail.com \
    --cc=keescook@chromium.org \
    --cc=konradybcio@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=priv.luk@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=sivaprak@codeaurora.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).