All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephan Gerhold <stephan@gerhold.net>
To: dsankouski@gmail.com
Cc: u-boot@lists.denx.de, Ramon Fried <rfried.dev@gmail.com>,
	Tom Rini <trini@konsulko.com>
Subject: Re: [PATCH 5/6] SoC: qcom: add support for SDM845
Date: Fri, 24 Sep 2021 12:55:33 +0200	[thread overview]
Message-ID: <YU2upYRyXldCAMq3@gerhold.net> (raw)
In-Reply-To: <20210923185732.7679-6-dsankouski@gmail.com>

Hi,

On Thu, Sep 23, 2021 at 09:57:31PM +0300, dsankouski@gmail.com wrote:
> From: Dzmitry Sankouski <dsankouski@gmail.com>
> 
> Hi-end qualcomm chip, introduced in late 2017.
> Mostly used in flagship phones and tablets of 2018.
> Features:
> - arm64 arch
> - total of 8 Kryo 385 Gold / Silver cores
> - Hexagon 685 DSP
> - Adreno 630 GPU
> 
> Tested only as second-stage bootloader.
> 
> Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>
> Cc: Ramon Fried <rfried.dev@gmail.com>
> Cc: Tom Rini <trini@konsulko.com>
> ---
>  arch/arm/dts/sdm845.dtsi                      | 118 ++++++++++++++++++
>  arch/arm/mach-snapdragon/Kconfig              |   4 +
>  arch/arm/mach-snapdragon/Makefile             |   4 +
>  .../include/mach/sysmap-sdm845.h              |  42 +++++++
>  arch/arm/mach-snapdragon/init_sdm845.c        |  82 ++++++++++++
>  arch/arm/mach-snapdragon/sysmap-sdm845.c      |  31 +++++
>  include/configs/sdm845.h                      |  33 +++++
>  7 files changed, 314 insertions(+)
>  create mode 100644 arch/arm/dts/sdm845.dtsi
>  create mode 100644 arch/arm/mach-snapdragon/include/mach/sysmap-sdm845.h
>  create mode 100644 arch/arm/mach-snapdragon/init_sdm845.c
>  create mode 100644 arch/arm/mach-snapdragon/sysmap-sdm845.c
>  create mode 100644 include/configs/sdm845.h
> 
> diff --git a/arch/arm/dts/sdm845.dtsi b/arch/arm/dts/sdm845.dtsi
> new file mode 100644
> index 0000000000..bf32c6995d
> --- /dev/null
> +++ b/arch/arm/dts/sdm845.dtsi
> @@ -0,0 +1,118 @@
> +// SPDX-License-Identifier: GPL-2.0+
> +/*
> + * Qualcomm SDM845 chip device tree source
> + *
> + * (C) Copyright 2021 Dzmitry Sankouski <dsankouski@gmail.com>
> + *
> + */
> +
> +/dts-v1/;
> +
> +#include "skeleton64.dtsi"
> +
> +/ {
> +	soc: soc {
> +		#address-cells = <1>;
> +		#size-cells = <1>;
> +		ranges = <0 0 0 0xffffffff>;
> +		compatible = "simple-bus";
> +
> +		gcc: clock-controller@100000 {
> +			u-boot,dm-pre-reloc;
> +			compatible = "qcom,gcc-sdm845";
> +			reg = <0x00100000 0x1f0000>;
> +			#clock-cells = <1>;
> +			#reset-cells = <1>;
> +			#power-domain-cells = <1>;
> +		};
> +
> +		gpio_north: gpio_north@3900000 {
> +			u-boot,dm-pre-reloc;
> +			#gpio-cells = <2>;
> +			compatible = "qcom,sdm845-pinctrl";
> +			reg = <0x3900000 0x400000>;
> +			gpio-count = <150>;
> +			gpio-controller;
> +			gpio-ranges = <&gpio_north 0 0 150>;
> +			gpio-bank-name = "soc_north.";
> +		};
> +
> +		tlmm_north: pinctrl_north@3900000 {
> +			u-boot,dm-pre-reloc;
> +			compatible = "qcom,tlmm-sdm845";
> +			reg = <0x03900000 0x400000>;

Can you consistently pad "reg" with zeroes or not?
"gcc" is padded with zeroes to 8 digits, gpio_north is not,
then this is suddenly again. This makes it look like gpio_north
and tlmm_north have a different address when it's actually the same.

> +			gpio-count = <150>;
> +			gpio-controller;
> +			#gpio-cells = <2>;
> +			gpio-ranges = <&tlmm_north 0 0 150>;
> +
> +			/* DEBUG UART */
> +			qup_uart9: qup-uart9-default {
> +				pinmux {
> +					pins = "GPIO_4", "GPIO_5";
> +					function = "qup9";
> +				};
> +			};
> +		};
> +
> +		debug_uart: serial@0xa84000 {

The 0x should not be in the unit name (after @).

> +			compatible = "qcom,msm-geni-uart";
> +			reg = <0xa84000 0x4000>;
> +			reg-names = "se_phys";
> +			clock-names = "se-clk";
> +			clocks = <&gcc 0x58>;
> +			pinctrl-names = "default";
> +			pinctrl-0 = <&qup_uart9>;
> +			qcom,wrapper-core = <0x8a>;
> +			status = "disabled";
> +		};
> +
> +		spmi@c440000 {
> +			compatible = "qcom,spmi-pmic-arb";
> +			reg = <0xc440000 0x1100>,
> +			      <0xc600000 0x2000000>,
> +			      <0xe600000 0x100000>;
> +			reg-names = "cnfg", "core", "obsrvr";
> +			#address-cells = <0x1>;
> +			#size-cells = <0x1>;
> +
> +			qcom,revid@100 {
> +				compatible = "qcom,qpnp-revid";
> +				reg = <0x100 0x100>;
> +				linux,phandle = <0x3ac>;
> +				phandle = <0x3ac>;
> +			};
> +

What is this used for? With the linux,phandle this looks a bit like
something copied from a decompiled downstream dtb.

> +			pmic0: pm8998@0 {
> +				compatible = "qcom,spmi-pmic";
> +				reg = <0x0 0x1>;
> +				#address-cells = <0x1>;
> +				#size-cells = <0x1>;
> +
> +				pm8998_pon: pm8998_pon@800 {
> +					compatible = "qcom,pm8998-pwrkey";
> +					reg = <0x800 0x100>;
> +					#gpio-cells = <2>;
> +					gpio-controller;
> +					gpio-bank-name="pm8998_key.";
> +				};
> +
> +				pm8998_gpios: pm8998_gpios@c000 {
> +					compatible = "qcom,pm8998-gpio";
> +					reg = <0xc000 0x1a00>;
> +					gpio-controller;
> +					gpio-count = <21>;
> +					#gpio-cells = <2>;
> +					gpio-bank-name="pm8998.";

Can you add spaces around '=' (gpio-bank-name = "pm8998.";), same for pm8998_pon.

Thanks,
Stephan

  reply	other threads:[~2021-09-24 10:55 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-23 18:57 [PATCH 0/6] Add support for SDM845 based boards, and SM-G9600 dsankouski
2021-09-23 18:57 ` [PATCH 1/6 v3] serial: qcom: add support for GENI serial driver dsankouski
2021-09-23 18:57 ` [PATCH 2/6 v3] spmi: msm: add arbiter version 5 support dsankouski
2021-10-05 16:53   ` Tom Rini
2021-09-23 18:57 ` [PATCH 3/6] pinctrl: qcom: add pinctrl and gpio drivers for SDM845 SoC dsankouski
2021-09-24 10:48   ` Stephan Gerhold
2021-09-23 18:57 ` [PATCH 4/6] clocks: qcom: add clocks for SDM845 debug uart dsankouski
2021-09-23 18:57 ` [PATCH 5/6] SoC: qcom: add support for SDM845 dsankouski
2021-09-24 10:55   ` Stephan Gerhold [this message]
2021-09-23 18:57 ` [PATCH 6/6 v3] board: samsung: add Samsung Galaxy S9/S9+(SM-G96x0) board dsankouski
2021-09-24 11:02   ` Stephan Gerhold
2021-09-24 14:35     ` Dzmitry Sankouski
2021-09-24 18:50       ` Stephan Gerhold
2021-10-05 16:53   ` Tom Rini

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=YU2upYRyXldCAMq3@gerhold.net \
    --to=stephan@gerhold.net \
    --cc=dsankouski@gmail.com \
    --cc=rfried.dev@gmail.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.