devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tomasz Figa <tomasz.figa@gmail.com>
To: Arun Kumar K <arun.kk@samsung.com>,
	linux-samsung-soc@vger.kernel.org, devicetree@vger.kernel.org
Cc: kgene.kim@samsung.com, dianders@chromium.org, olofj@google.com,
	sachin.kamat@linaro.org, tushar.behera@linaro.org,
	arunkk.samsung@gmail.com, Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Grant Likely <grant.likely@secretlab.ca>
Subject: Re: [PATCH v2] ARM: dts: Add peach-pit board support
Date: Sat, 26 Apr 2014 13:32:20 +0200	[thread overview]
Message-ID: <535B9944.8090503@gmail.com> (raw)
In-Reply-To: <1398313031-14848-1-git-send-email-arun.kk@samsung.com>

Hi Arun,

On 24.04.2014 06:17, Arun Kumar K wrote:
> Adds the google peach-pit board dts file which uses
> exynos5420 SoC.
>
> Signed-off-by: Arun Kumar K <arun.kk@samsung.com>
> Signed-off-by: Doug Anderson <dianders@chromium.org>
> ---
> Changes from v1
> ---------------
> - Addressed review comments from Doug, Sachin & Tushar
> - Removed adc and lid-switch nodes
> ---
>   arch/arm/boot/dts/Makefile                 |    1 +
>   arch/arm/boot/dts/exynos5420-peach-pit.dts |  182 ++++++++++++++++++++++++++++
>   2 files changed, 183 insertions(+)
>   create mode 100644 arch/arm/boot/dts/exynos5420-peach-pit.dts
>
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index 35c146f..3220e29 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -74,6 +74,7 @@ dtb-$(CONFIG_ARCH_EXYNOS) += exynos4210-origen.dtb \
>   	exynos5250-smdk5250.dtb \
>   	exynos5250-snow.dtb \
>   	exynos5420-arndale-octa.dtb \
> +	exynos5420-peach-pit.dtb \
>   	exynos5420-smdk5420.dtb \
>   	exynos5440-sd5v1.dtb \
>   	exynos5440-ssdk5440.dtb
> diff --git a/arch/arm/boot/dts/exynos5420-peach-pit.dts b/arch/arm/boot/dts/exynos5420-peach-pit.dts
> new file mode 100644
> index 0000000..fbb0469
> --- /dev/null
> +++ b/arch/arm/boot/dts/exynos5420-peach-pit.dts
> @@ -0,0 +1,182 @@
> +/*
> + * Google Peach Pit Rev 6+ board device tree source
> + *
> + * Copyright (c) 2014 Google, Inc
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> + */
> +
> +/dts-v1/;
> +#include <dt-bindings/input/input.h>
> +#include <dt-bindings/gpio/gpio.h>
> +#include "exynos5420.dtsi"
> +
> +/ {
> +	model = "Google Peach Pit Rev 6+";
> +
> +	compatible = "google,pit-rev16",
> +		"google,pit-rev15", "google,pit-rev14",
> +		"google,pit-rev13", "google,pit-rev12",
> +		"google,pit-rev11", "google,pit-rev10",
> +		"google,pit-rev9", "google,pit-rev8",
> +		"google,pit-rev7", "google,pit-rev6",
> +		"google,pit", "google,peach","samsung,exynos5420",
> +		"samsung,exynos5";

Do you really need so many compatible strings here? Furthermore, are all 
the newer revisions really fully backwards compatible with older ones?

Also, do you have a way to check the revision in hardware, e.g. by some 
GPIO pins? If so, I don't think there would be any need to revision 
number as a part of compatible string.

> +
> +	memory {
> +		reg = <0x20000000 0x80000000>;
> +	};
> +
> +	fixed-rate-clocks {
> +		oscclk {
> +			compatible = "samsung,exynos5420-oscclk";
> +			clock-frequency = <24000000>;
> +		};
> +	};
> +
> +	pinctrl@13400000 {

Please convert this dts file into reference-based syntax. It has 
multiple advantages over the legacy way of replicating full paths every 
time a node needs to be updated.

You can see other dts files for examples how this can be used, e.g. 
s3c64*.dts* (for a quite simple setup), imx6*.dts* (for more complex 
things), etc.

> +		tpm_irq: tpm-irq {
> +			samsung,pins = "gpx1-0";
> +			samsung,pin-function = <0>;
> +			samsung,pin-pud = <0>;
> +			samsung,pin-drv = <0>;
> +		};
> +
> +		power_key_irq: power-key-irq {
> +			samsung,pins = "gpx1-2";
> +			samsung,pin-function = <0>;
> +			samsung,pin-pud = <0>;
> +			samsung,pin-drv = <0>;
> +		};
> +	};
> +
> +	pinctrl@14010000 {
> +		spi_flash_cs: spi-flash-cs {
> +			samsung,pins = "gpa2-5";
> +			samsung,pin-function = <1>;
> +			samsung,pin-pud = <0>;
> +			samsung,pin-drv = <3>;
> +		};
> +
> +		backlight_pwm: backlight-pwm {
> +			samsung,pins = "gpb2-0";
> +			samsung,pin-function = <2>;
> +			samsung,pin-pud = <0>;
> +			samsung,pin-drv = <0>;
> +		};
> +	};
> +
> +	gpio-keys {
> +		compatible = "gpio-keys";
> +
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&power_key_irq>;
> +
> +		power {
> +			label = "Power";
> +			gpios = <&gpx1 2 GPIO_ACTIVE_LOW>;
> +			linux,code = <KEY_POWER>;
> +			gpio-key,wakeup;
> +		};
> +	};
> +
> +	rtc@101E0000 {
> +		status = "okay";
> +	};
> +
> +	serial@12C30000 {
> +		status = "okay";
> +	};
> +
> +	mmc@12200000 {
> +		status = "okay";
> +		num-slots = <1>;
> +		broken-cd;
> +		caps2-mmc-hs200-1_8v;
> +		supports-highspeed;
> +		non-removable;
> +		card-detect-delay = <200>;
> +		clock-frequency = <400000000>;
> +		samsung,dw-mshc-ciu-div = <3>;
> +		samsung,dw-mshc-sdr-timing = <0 4>;
> +		samsung,dw-mshc-ddr-timing = <0 2>;
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_bus4 &sd0_bus8>;
> +
> +		slot@0 {
> +			reg = <0>;
> +			bus-width = <8>;
> +		};
> +	};
> +
> +	mmc@12220000 {
> +		status = "okay";
> +		num-slots = <1>;
> +		supports-highspeed;
> +		card-detect-delay = <200>;
> +		clock-frequency = <400000000>;
> +		samsung,dw-mshc-ciu-div = <3>;
> +		samsung,dw-mshc-sdr-timing = <2 3>;
> +		samsung,dw-mshc-ddr-timing = <1 2>;
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_cd &sd2_bus4>;
> +
> +		slot@0 {
> +			reg = <0>;
> +			bus-width = <4>;
> +		};
> +	};
> +
> +	i2c@12E10000 {
> +		status = "okay";
> +		clock-frequency = <400000>;
> +
> +		tpm@20 {
> +			/* Unused irq; but still need to configure the pins */
> +			pinctrl-names = "default";
> +			pinctrl-0 = <&tpm_irq>;

nit: Please move the pinctrl properties below compatible and reg, as 
this is more readable and consistent with other nodes.

> +
> +			compatible = "infineon,slb9645tt";
> +			reg = <0x20>;
> +		};
> +	};
> +
> +	spi@12d30000 {
> +		status = "okay";
> +		samsung,spi-src-clk = <0>;
> +		num-cs = <1>;
> +
> +		spidev@0 {
> +			compatible = "spidev";
> +			reg = <0>;
> +			spi-max-frequency = <50000000>;
> +			pinctrl-names = "default";
> +			pinctrl-0 = <&spi_flash_cs>;
> +
> +			controller-data {
> +				cs-gpio = <&gpa2 5 0>;
> +				samsung,spi-feedback-delay = <2>;
> +			};

Hmm, is this really a physical device? Shouldn't this have some kind of 
real compatible string first? Also I'm not even sure if "spidev" is 
supposed to be used like this, especially considering that this 
compatible string isn't even documented in 
Documentation/devicetree/bindings. (Rob, Mark, Grant, any opinions on this?)

Best regards,
Tomasz

  parent reply	other threads:[~2014-04-26 11:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-24  4:17 [PATCH v2] ARM: dts: Add peach-pit board support Arun Kumar K
2014-04-24  5:30 ` Tushar Behera
2014-04-24 18:57 ` Doug Anderson
2014-04-25  4:01   ` Arun Kumar K
2014-04-26 10:56     ` Kukjin Kim
2014-04-26 11:32 ` Tomasz Figa [this message]
2014-04-28  4:22   ` Arun Kumar K
2014-04-28 17:43   ` Doug Anderson
2014-04-30  6:34   ` Arun Kumar K
2014-04-30 16:48 ` Doug Anderson
2014-05-01  8:21   ` Arun Kumar K

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=535B9944.8090503@gmail.com \
    --to=tomasz.figa@gmail.com \
    --cc=arun.kk@samsung.com \
    --cc=arunkk.samsung@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dianders@chromium.org \
    --cc=grant.likely@secretlab.ca \
    --cc=kgene.kim@samsung.com \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=olofj@google.com \
    --cc=robh+dt@kernel.org \
    --cc=sachin.kamat@linaro.org \
    --cc=tushar.behera@linaro.org \
    /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).