linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Caleb Connolly <caleb@connolly.tech>
Cc: linux-arm-msm@vger.kernel.org, Andy Gross <agross@kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	Kees Cook <keescook@chromium.org>,
	Anton Vorontsov <anton@enomsg.org>,
	Colin Cross <ccross@android.com>, Tony Luck <tony.luck@intel.com>,
	phone-devel@vger.kernel.org,
	~postmarketos/upstreaming@lists.sr.ht,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/5] arm64: dts: sdm845: add oneplus 6/t devices
Date: Fri, 20 Nov 2020 22:28:23 -0600	[thread overview]
Message-ID: <20201121042823.GM8532@builder.lan> (raw)
In-Reply-To: <20201112161920.2671430-4-caleb@connolly.tech>

On Thu 12 Nov 10:21 CST 2020, Caleb Connolly wrote:
[..]
> diff --git a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
> new file mode 100644
> index 000000000000..4e6477f1e574
> --- /dev/null
> +++ b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
> @@ -0,0 +1,822 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * SDM845 OnePlus 6(T) (enchilada / fajita) common device tree source
> + *
> + * Copyright (c) 2020, The Linux Foundation. All rights reserved.
> + */
> +
> +/dts-v1/;
> +
> +#include <dt-bindings/gpio/gpio.h>
> +#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
> +#include <dt-bindings/input/linux-event-codes.h>

Please keep these sorted alphabetically.

> +#include "sdm845.dtsi"
> +
> +// Needed for some GPIO (like the volume buttons)

This is or is going to be needed for more things, so feel free to skip
this comment.

> +#include "pm8998.dtsi"
> +#include "pmi8998.dtsi"
> +
> +/ {
> +
> +	aliases {
> +		hsuart0 = &uart6;
> +	};
> +
> +	vph_pwr: vph-pwr-regulator {
> +		compatible = "regulator-fixed";
> +		regulator-name = "vph_pwr";
> +		regulator-min-microvolt = <3700000>;
> +		regulator-max-microvolt = <3700000>;
> +	};
> +
> +	/*
> +	 * Apparently RPMh does not provide support for PM8998 S4 because it
> +	 * is always-on; model it as a fixed regulator.
> +	 */
> +	vreg_s4a_1p8: pm8998-smps4 {
> +		compatible = "regulator-fixed";
> +		regulator-name = "vreg_s4a_1p8";
> +
> +		regulator-min-microvolt = <1800000>;
> +		regulator-max-microvolt = <1800000>;
> +
> +		regulator-always-on;
> +		regulator-boot-on;
> +
> +		vin-supply = <&vph_pwr>;
> +	};
> +
> +	/*
> +	 * The touchscreen regulator seems to be controlled somehow by a gpio.
> +	 */
> +	ts_1p8_supply: ts_1v8_regulator {

Please don't use _ in the node name.

> +		compatible = "regulator-fixed";
> +		regulator-name = "ts_1p8_supply";
> +
> +		regulator-min-microvolt = <1800000>;
> +		regulator-max-microvolt = <1800000>;
> +
> +		gpio = <&tlmm 88 0>;
> +		enable-active-high;
> +		regulator-boot-on;
> +	};
> +
> +	gpio_tristate_key: gpio-keys {
> +		compatible = "gpio-keys";
> +		label = "Tri-state keys";

What kind of button is this?

> +
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&tri_state_key_default>;
> +
> +		state-top {
> +			label = "Tri-state key top";
> +			linux,code = <KEY_MACRO1>;
> +			interrupt-parent = <&tlmm>;
> +			interrupts = <24 IRQ_TYPE_EDGE_FALLING>;
> +			debounce-interval = <500>;
> +			linux,can-disable;
> +		};
> +
> +		state-middle {
> +			label = "Tri-state key middle";
> +			linux,code = <KEY_MACRO2>;
> +			interrupt-parent = <&tlmm>;
> +			interrupts = <52 IRQ_TYPE_EDGE_FALLING>;
> +			debounce-interval = <500>;
> +			linux,can-disable;
> +		};
> +
> +		state-bottom {
> +			label = "Tri-state key bottom";
> +			linux,code = <KEY_MACRO3>;
> +			interrupt-parent = <&tlmm>;
> +			interrupts = <126 IRQ_TYPE_EDGE_FALLING>;
> +			debounce-interval = <500>;
> +			linux,can-disable;
> +		};
> +	};
[..]
> +/* Reserved memory changes */
> +/delete-node/ &rmtfs_mem;
> +
> +/ {

You already have one top-level section higher up, please group this in
there as well.

> +	reserved-memory {
[..]
> +&mdss {

To avoid trouble finding your way around this file in the future I would
prefer if you sorted the nodes alphabetically.

> +	status = "okay";
> +};
> +
[..]
> +&i2c12 {
> +	status = "okay";
> +
> +	touchscreen: synaptics-rmi4-i2c@20 {

You don't reference &touchscreen, so please omit this..

Regards,
Bjorn

  parent reply	other threads:[~2020-11-21  4:28 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-12 16:21 Add support for the OnePlus 6 and 6T SDM845 devices Caleb Connolly
2020-11-12 16:21 ` [PATCH 1/5] drm/panel/samsung-sofef00: Add panel for OnePlus 6/T devices Caleb Connolly
2020-11-14 19:58   ` Sam Ravnborg
2020-11-12 16:21 ` [PATCH 2/5] dt-bindings: panel-simple-dsi: add samsung panels for OnePlus 6/T Caleb Connolly
2020-11-14 19:59   ` Sam Ravnborg
2020-11-12 16:21 ` [PATCH 3/5] arm64: dts: sdm845: add oneplus 6/t devices Caleb Connolly
2020-11-16 22:01   ` Pavel Machek
2020-11-16 23:49     ` Caleb Connolly
2020-11-21 17:44       ` Pavel Machek
2020-11-21  4:28   ` Bjorn Andersson [this message]
2020-11-12 16:21 ` [PATCH 4/5] dt-bindings: add vendor bindings for OnePlus Caleb Connolly
2020-11-16 14:47   ` Rob Herring
2020-11-16 14:53   ` Rob Herring
2020-11-12 16:22 ` [PATCH 5/5] i2c: geni: sdm845: dont perform DMA for OnePlus 6 devices Caleb Connolly
2020-11-17 11:47   ` Akash Asthana
2020-11-22  3:47   ` Bjorn Andersson
2020-11-22 17:59     ` Caleb Connolly
2020-12-02 15:39       ` Wolfram Sang
2020-12-02 16:36         ` Bjorn Andersson
2020-12-02 20:21           ` Wolfram Sang
2020-11-12 16:28 ` Add support for the OnePlus 6 and 6T SDM845 devices Caleb Connolly
  -- strict thread matches above, loose matches on Subject: below --
2020-10-07 17:48 Caleb Connolly
2020-10-07 17:49 ` [PATCH 3/5] arm64: dts: sdm845: add oneplus 6/t devices Caleb Connolly
2020-10-07 17:19 Add support for the OnePlus 6 and 6T SDM845 devices Caleb Connolly
2020-10-07 17:20 ` [PATCH 3/5] arm64: dts: sdm845: add oneplus 6/t devices Caleb Connolly

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=20201121042823.GM8532@builder.lan \
    --to=bjorn.andersson@linaro.org \
    --cc=agross@kernel.org \
    --cc=anton@enomsg.org \
    --cc=caleb@connolly.tech \
    --cc=ccross@android.com \
    --cc=devicetree@vger.kernel.org \
    --cc=keescook@chromium.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=phone-devel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=tony.luck@intel.com \
    --cc=~postmarketos/upstreaming@lists.sr.ht \
    /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).