Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Stephan Gerhold <stephan@gerhold.net>
To: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Cc: agross@kernel.org, bjorn.andersson@linaro.org,
	robh+dt@kernel.org, krzk+dt@kernel.org,
	linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
	shawn.guo@linaro.org, jun.nie@linaro.org, benl@squareup.com,
	jwillcox@squareup.com, jgates@squareup.com, mchen@squareup.com,
	zac@squareup.com, Leo Yan <leo.yan@linaro.org>
Subject: Re: [PATCH v1 3/4] arm64: dts: Add aqp8039-t2 board
Date: Tue, 19 Apr 2022 21:20:11 +0200	[thread overview]
Message-ID: <Yl8La/pFbQJNUQTy@gerhold.net> (raw)
In-Reply-To: <20220419010903.3109514-4-bryan.odonoghue@linaro.org>

On Tue, Apr 19, 2022 at 02:09:02AM +0100, Bryan O'Donoghue wrote:
> The apq8039-t2 is an apq8039/msm8939 based board paired with a wcn3680b
> WiFi chipset.
>
> [...]
> ---
>  arch/arm64/boot/dts/qcom/Makefile             |   1 +
>  .../boot/dts/qcom/apq8039-t2-pinctl.dtsi      | 277 +++++++++++++++
>  arch/arm64/boot/dts/qcom/apq8039-t2.dts       | 326 ++++++++++++++++++
>  3 files changed, 604 insertions(+)
>  create mode 100644 arch/arm64/boot/dts/qcom/apq8039-t2-pinctl.dtsi
>  create mode 100644 arch/arm64/boot/dts/qcom/apq8039-t2.dts
> 
> diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
> index f9e6343acd03..5b8a0eb34733 100644
> --- a/arch/arm64/boot/dts/qcom/Makefile
> +++ b/arch/arm64/boot/dts/qcom/Makefile
> @@ -1,5 +1,6 @@
>  # SPDX-License-Identifier: GPL-2.0
>  dtb-$(CONFIG_ARCH_QCOM)	+= apq8016-sbc.dtb
> +dtb-$(CONFIG_ARCH_QCOM)	+= apq8039-t2.dtb
>  dtb-$(CONFIG_ARCH_QCOM)	+= apq8094-sony-xperia-kitakami-karin_windy.dtb
>  dtb-$(CONFIG_ARCH_QCOM)	+= apq8096-db820c.dtb
>  dtb-$(CONFIG_ARCH_QCOM)	+= apq8096-ifc6640.dtb
> diff --git a/arch/arm64/boot/dts/qcom/apq8039-t2-pinctl.dtsi b/arch/arm64/boot/dts/qcom/apq8039-t2-pinctl.dtsi
> new file mode 100644
> index 000000000000..60adb3da826a
> --- /dev/null
> +++ b/arch/arm64/boot/dts/qcom/apq8039-t2-pinctl.dtsi

We stopped separating the pinctrl in an extra .dtsi. Please just put it
at the end of the apq8039-t2.dts or sorted with the other nodes.
(I put them at the end for all the msm8916 device trees, but on newer
 SoCs it's usually just put normally in alphebetical order.)

> [...]
> @@ -0,0 +1,277 @@
> +// SPDX-License-Identifier: GPL-2.0
> +
> +#include <dt-bindings/gpio/gpio.h>
> +#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
> +
> +/*
> + * Line names are taken from the schematic of T2, Ver X03.
> + * July 14, 2018. Page 4 in particular.
> + */
> +
> +&msmgpio {
> + [...]
> +	typec_pins: typec_pins {
> +		pinmux_irqz {
> +			function = "gpio";
> +			pins = "gpio107";
> +		};
> +		pinconf_irqz {
> +			pins = "gpio107";
> +			bias-pull-up;
> +			input-enable;
> +		};
> +	};

You can write this like:

typec_pins: typec_pins {
	pins = "gpio107";
	function = "gpio";

	bias-pull-up;
	input-enable;
};

The separation and separate "pinmux" etc nodes shouldn't be needed. Also
see commit 6554a295042f7 ("arm64: dts: qcom: msm8916: Simplify pinctrl
configuration").

> + [...]
> +};
> + [...]
> diff --git a/arch/arm64/boot/dts/qcom/apq8039-t2.dts b/arch/arm64/boot/dts/qcom/apq8039-t2.dts
> new file mode 100644
> index 000000000000..558f37945d94
> --- /dev/null
> +++ b/arch/arm64/boot/dts/qcom/apq8039-t2.dts
> @@ -0,0 +1,326 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Copyright (c) 2015, The Linux Foundation. All rights reserved.
> + * Copyright (c) 2022, Linaro Ltd.
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 and
> + * only version 2 as published by the Free Software Foundation.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU General Public License for more details.

SPDX should be enough. :)

> + */
> + [...]
> +};
> +&otg {
> +	status = "okay";
> +	usb-role-switch;
> +
> +	pinctrl-names = "default", "host", "device";
> +	pinctrl-0 = <&pinctrl_otg_default>;
> +	pinctrl-1 = <&pinctrl_otg_host>;
> +	pinctrl-2 = <&pinctrl_otg_device>;
> +	pin-switch-delay-us = <100000>;
> +
> +	ulpi {
> +		usb_hs_phy: phy {
> +			qcom,enable-vbus-pullup;

Hm, what handles the USB detection on this port? The tps6598x?
Can it provide an extcon so that you don't need to keep the USB PHY
powered permanently?

> + [...]
> +&pronto {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&wcnss_pin_a &wcnss_pin_antennae>;
> +	status = "okay";
> +
> +	iris {
> +		compatible = "qcom,wcn3680";
> +	};
> +
> +	smd-edge {
> +		wcnss {
> +			bt {
> +				local-bd-address = [ 55 44 33 22 11 00 ];

Is this really needed?

The DB410c LK and U-Boot port (and also lk2nd) automatically generate a
WiFi/BT address based on the eMMC serial number. That's probably a
better solution than a fixed MAC address specified here.

Thanks,
Stephan

  parent reply	other threads:[~2022-04-19 19:20 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-19  1:08 [PATCH v1 0/4] Add MSM8939 SoC support with two devices Bryan O'Donoghue
2022-04-19  1:09 ` [PATCH v1 1/4] dt-bindings: arm: qcom: Document MSM8939 SoC binding Bryan O'Donoghue
2022-04-19  7:13   ` Krzysztof Kozlowski
2022-04-19 12:12   ` Rob Herring
2022-04-19  1:09 ` [PATCH v1 2/4] arm64: dts: Add msm8939 SoC Bryan O'Donoghue
2022-04-19  7:33   ` Krzysztof Kozlowski
2022-04-19  8:30     ` Bryan O'Donoghue
2022-04-19  8:44       ` Krzysztof Kozlowski
2022-04-20  9:31     ` Jun Nie
2022-04-20  9:38       ` Krzysztof Kozlowski
2022-04-20  9:57         ` Jun Nie
2022-04-20 10:00           ` Jun Nie
2022-04-20 10:10             ` Krzysztof Kozlowski
2022-04-20 10:09           ` Krzysztof Kozlowski
2022-04-19 18:31   ` Stephan Gerhold
2022-04-20 10:12     ` Jun Nie
2022-04-19 21:11   ` Bjorn Andersson
2022-04-20  5:34     ` Stephan Gerhold
     [not found]   ` <bc6ce23672c52b1f2593fcac720edf9ca9e9fdaa.camel@mailoo.org>
2022-04-19 22:01     ` Bryan O'Donoghue
2022-05-26 13:32     ` Bryan O'Donoghue
2022-04-19  1:09 ` [PATCH v1 3/4] arm64: dts: Add aqp8039-t2 board Bryan O'Donoghue
2022-04-19  7:35   ` Krzysztof Kozlowski
2022-04-19 19:20   ` Stephan Gerhold [this message]
2022-04-19 21:43     ` Bryan O'Donoghue
2022-04-19 21:39   ` Bjorn Andersson
2022-04-19 21:52     ` Bryan O'Donoghue
2022-04-19  1:09 ` [PATCH v1 4/4] arm64: dts: Add msm8939 Sony Xperia M4 Aqua Bryan O'Donoghue
2022-04-19 19:27   ` Stephan Gerhold
2022-04-19 22:03     ` Bryan O'Donoghue
2022-04-20  5:36       ` Stephan Gerhold
2022-05-26 22:03       ` Dmitry Baryshkov
2022-04-19 21:51   ` Bjorn Andersson

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=Yl8La/pFbQJNUQTy@gerhold.net \
    --to=stephan@gerhold.net \
    --cc=agross@kernel.org \
    --cc=benl@squareup.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=bryan.odonoghue@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jgates@squareup.com \
    --cc=jun.nie@linaro.org \
    --cc=jwillcox@squareup.com \
    --cc=krzk+dt@kernel.org \
    --cc=leo.yan@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=mchen@squareup.com \
    --cc=robh+dt@kernel.org \
    --cc=shawn.guo@linaro.org \
    --cc=zac@squareup.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