Re: [PATCH] ARM: dts: Add Exynos5250 Snow Rev5+ support

2015-09-30 Thread Javier Martinez Canillas
Hello Krzysztof,

On 09/30/2015 02:30 AM, Krzysztof Kozlowski wrote:

[snip]

>>
>> The DTS in the vendor ChromeOS tree are called exynos5250-snow-rev{4,5}.dtb
>> but I decided to leave Rev4 as exynos5250-snow.dtb to avoid breaking u-boot
>> that has CONFIG_DEFAULT_DEVICE_TREE="exynos5250-snow" in snow_defconfig.
>>
>> Also, ChromiumOS Rev4 DTS has "google,snow-rev4" in its compatible string
>> but was not added in mainline since Rev4 firmware fallbacks to "google,snow"
>> and Rev5 searches for "google,snow-rev5". That way the compatible string
>> could be consistent with the DTS naming and still be able to pack both Rev4
>> and Rev5 FDT in the same FIT image and let the firmware pick the correct FDT.
>>
>>  arch/arm/boot/dts/Makefile|   1 +
>>  arch/arm/boot/dts/exynos5250-snow-common.dtsi | 684 
>> ++
>>  arch/arm/boot/dts/exynos5250-snow-rev5.dts|  47 ++
>>  arch/arm/boot/dts/exynos5250-snow.dts | 666 
>> +
>>  4 files changed, 733 insertions(+), 665 deletions(-)
>>  create mode 100644 arch/arm/boot/dts/exynos5250-snow-common.dtsi
>>  create mode 100644 arch/arm/boot/dts/exynos5250-snow-rev5.dts
> 
> Now the exynos5250-snow.dts means in fact Rev4... but there is no
> information in DTS about it. I think adding compatible
> "google,snow-rev4" makes sense:
> 1. For informational purposes (this could be also handled with a comment).
> 2. Later one could decide to switch the default meaning of "google,snow"
> to Rev5 and the real compatible (rev4) will be there already.
>

Ok, I explained my rationale about why I did not add a "google,snow-rev4"
but I don't have a strong opinion on this so I'll add it on v2.
 
> Could you add the new compatible and fix patch issues pointed by Doug?
>

Sure.

> Best regards,
> Krzysztof
> 

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] ARM: dts: Add Exynos5250 Snow Rev5+ support

2015-09-30 Thread Javier Martinez Canillas
Hello Doug,

On 09/29/2015 07:28 PM, Doug Anderson wrote:

[snip]

> 
> 
>>  arch/arm/boot/dts/Makefile|   1 +
>>  arch/arm/boot/dts/exynos5250-snow-common.dtsi | 684 
>> ++
>>  arch/arm/boot/dts/exynos5250-snow-rev5.dts|  47 ++
>>  arch/arm/boot/dts/exynos5250-snow.dts | 666 
>> +
>>  4 files changed, 733 insertions(+), 665 deletions(-)
> 
> Thanks!  Note:
> 
> $ pwclient git-am 7285451
> Applying patch #7285451 using 'git am'
> Description: ARM: dts: Add Exynos5250 Snow Rev5+ support
> Applying: ARM: dts: Add Exynos5250 Snow Rev5+ support
> .git/rebase-apply/patch:774: new blank line at EOF.
> +
> warning: 1 line adds whitespace errors.
>

sigh, sorry for missing that one.
 
> 
> One other nit is that the exynos5250-snow.dts" ends up with the
> "max98095" pinctrl properties sorted differently than the
> "exynos5250-snow-rev5.dts".  Is it worth reordering the
> "exynos5250-snow.dts" in the same patch?
>

Right, I'll change exynos5250-snow.dts to have pinctrl-names
before pinctrl-0 that will not only match max98090 properties
order but also be consistent with the rest of the dev nodes.
 
> Otherwise this looks fine to me.
> 
> Reviewed-by: Douglas Anderson 
> 

Thanks a lot for your feedback and review!

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] ARM: dts: Add Exynos5250 Snow Rev5+ support

2015-09-30 Thread Krzysztof Kozlowski
On 30.09.2015 16:06, Javier Martinez Canillas wrote:
> Hello,
> 
> On 09/30/2015 09:02 AM, Krzysztof Kozlowski wrote:
>> On 30.09.2015 15:58, Kukjin Kim wrote:
> 
> [snip]
> 

 Could you add the new compatible and fix patch issues pointed by Doug?

>>> Documenting for the compatibles would be required even I already applied
>>> its updated patch...
>>
> 
> Kukjin, I agree that they should be documented but I thought it would
> be a separate patch since currently we don't document any board.
>  
>> What do you mean by "documenting compatibles"? These are board
>> compatibles, they are not documented...
>>
> 
> Krzysztof, I've on my TODO list to add a file describing all Exynos
> platforms and DT bindings, something like what other SoC do, i.e:
> 
> Documentation/devicetree/bindings/arm/omap/omap.txt
> Documentation/devicetree/bindings/arm/rockchip.txt

Right, that's a good idea. However lack of it does not affect current
work because compatibles for Exynos board are not documented at all.

Best regards,
Krzysztof

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] ARM: dts: Add Exynos5250 Snow Rev5+ support

2015-09-30 Thread Krzysztof Kozlowski
On 30.09.2015 15:58, Kukjin Kim wrote:
> On 09/30/15 09:30, Krzysztof Kozlowski wrote:
>> On 29.09.2015 20:57, Javier Martinez Canillas wrote:
>>> There are 2 revisions of the Exynos5250 Snow Chromebook that were shipped:
>>> Rev4 and Rev5. The only difference between these 2 revisions is the codec,
>>> Rev4 has a max98095 codec while Rev5 has a max98090.
>>>
>>> Mainline only supports Rev4 so this patch moves the common device nodes to
>>> a DTSI file and adds a DTS for the Exynos5250 Snow Rev5.
>>>
>>> The Snow Rev5 DTS is based on the DTS found in the ChromiumOS 3.8 tree.
>>>
>>> Signed-off-by: Javier Martinez Canillas 
>>>
>>> ---
>>>
>>> The DTS in the vendor ChromeOS tree are called exynos5250-snow-rev{4,5}.dtb
>>> but I decided to leave Rev4 as exynos5250-snow.dtb to avoid breaking u-boot
>>> that has CONFIG_DEFAULT_DEVICE_TREE="exynos5250-snow" in snow_defconfig.
>>>
>>> Also, ChromiumOS Rev4 DTS has "google,snow-rev4" in its compatible string
>>> but was not added in mainline since Rev4 firmware fallbacks to "google,snow"
>>> and Rev5 searches for "google,snow-rev5". That way the compatible string
>>> could be consistent with the DTS naming and still be able to pack both Rev4
>>> and Rev5 FDT in the same FIT image and let the firmware pick the correct 
>>> FDT.
>>>
>>>  arch/arm/boot/dts/Makefile|   1 +
>>>  arch/arm/boot/dts/exynos5250-snow-common.dtsi | 684 
>>> ++
>>>  arch/arm/boot/dts/exynos5250-snow-rev5.dts|  47 ++
>>>  arch/arm/boot/dts/exynos5250-snow.dts | 666 
>>> +
>>>  4 files changed, 733 insertions(+), 665 deletions(-)
>>>  create mode 100644 arch/arm/boot/dts/exynos5250-snow-common.dtsi
>>>  create mode 100644 arch/arm/boot/dts/exynos5250-snow-rev5.dts
>>
>> Now the exynos5250-snow.dts means in fact Rev4... but there is no
>> information in DTS about it. I think adding compatible
>> "google,snow-rev4" makes sense:
>> 1. For informational purposes (this could be also handled with a comment).
>> 2. Later one could decide to switch the default meaning of "google,snow"
>> to Rev5 and the real compatible (rev4) will be there already.
>>
>> Could you add the new compatible and fix patch issues pointed by Doug?
>>
> Documenting for the compatibles would be required even I already applied
> its updated patch...

What do you mean by "documenting compatibles"? These are board
compatibles, they are not documented...

Best regards,
Krzysztof

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] ARM: dts: Add Exynos5250 Snow Rev5+ support

2015-09-30 Thread Javier Martinez Canillas
Hello,

On 09/30/2015 09:02 AM, Krzysztof Kozlowski wrote:
> On 30.09.2015 15:58, Kukjin Kim wrote:

[snip]

>>>
>>> Could you add the new compatible and fix patch issues pointed by Doug?
>>>
>> Documenting for the compatibles would be required even I already applied
>> its updated patch...
>

Kukjin, I agree that they should be documented but I thought it would
be a separate patch since currently we don't document any board.
 
> What do you mean by "documenting compatibles"? These are board
> compatibles, they are not documented...
>

Krzysztof, I've on my TODO list to add a file describing all Exynos
platforms and DT bindings, something like what other SoC do, i.e:

Documentation/devicetree/bindings/arm/omap/omap.txt
Documentation/devicetree/bindings/arm/rockchip.txt
 
> Best regards,
> Krzysztof
> 

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] ARM: dts: Add Exynos5250 Snow Rev5+ support

2015-09-30 Thread Javier Martinez Canillas
Hello Krzysztof,

On 09/30/2015 09:08 AM, Krzysztof Kozlowski wrote:
> On 30.09.2015 16:06, Javier Martinez Canillas wrote:
>> Hello,
>>
>> On 09/30/2015 09:02 AM, Krzysztof Kozlowski wrote:
>>> On 30.09.2015 15:58, Kukjin Kim wrote:
>>
>> [snip]
>>
>
> Could you add the new compatible and fix patch issues pointed by Doug?
>
 Documenting for the compatibles would be required even I already applied
 its updated patch...
>>>
>>
>> Kukjin, I agree that they should be documented but I thought it would
>> be a separate patch since currently we don't document any board.
>>  
>>> What do you mean by "documenting compatibles"? These are board
>>> compatibles, they are not documented...
>>>
>>
>> Krzysztof, I've on my TODO list to add a file describing all Exynos
>> platforms and DT bindings, something like what other SoC do, i.e:
>>
>> Documentation/devicetree/bindings/arm/omap/omap.txt
>> Documentation/devicetree/bindings/arm/rockchip.txt
> 
> Right, that's a good idea. However lack of it does not affect current
> work because compatibles for Exynos board are not documented at all.
> 

Agreed. That's why I didn't add it, even when checkpatch.pl complains:

WARNING: DT compatible string "google,snow-rev5" appears un-documented -- check 
./Documentation/devicetree/bindings/

> Best regards,
> Krzysztof
> 

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] ARM: dts: Add Exynos5250 Snow Rev5+ support

2015-09-30 Thread Doug Anderson
Hi,

On Wed, Sep 30, 2015 at 4:44 PM, Krzysztof Kozlowski
 wrote:
>> Switching the default meaning of "google,snow" to Rev5 is probably not
>> something we'd ever want to do, since it could confuse "rev3" boards
>> (which should be serviced by the rev4 dts).  From comments in the
>> Chrome OS tree:
>>
>> In the "rev4" DTS:
>>  * - Any real rev 0-3 boards in the field will match "google,snow",
>>  *   since older U-Boots don't look for a revision specific device 
>> tree.
>>  * - Any real rev 4 boards in the field will match "google,snow-rev4"
>>  *   first.  If that's not present they will pick the first
>>  *   "google,snow" device tree that they find (ignoring the kernel
>>  *   ordering).
>>
>> In the "rev5" DTS:
>>  * - Purposely don't add "google,snow" so old firmware (which didn't
>>  *   include a -revN suffix) won't pick this one.
>
> These are requirements written somewhere in the downstream tree... not
> in upstream. Have in mind that someone may not be using Chrome OS on
> Chromebook but custom U-Boot and different distro.
>
> You cannot expect that everyone will new some requirements of some
> downstream OS. If you need such requirements, write them in bindings
> documentation *in the upstream*.

Agreed, which is why I bring it up here.  I think Javier wasn't aware
of these when he sent up his patch.  I believe when he adds the
bindings docs he'll put this information.

Previously rev5 wasn't supported upstream and I believe rev5 didn't
even exist when the upstream stuff was submitted.

-Doug
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] ARM: dts: Add Exynos5250 Snow Rev5+ support

2015-09-30 Thread Krzysztof Kozlowski
On 01.10.2015 01:17, Doug Anderson wrote:
> Hi,
> 
> On Tue, Sep 29, 2015 at 5:30 PM, Krzysztof Kozlowski
>  wrote:
>> Now the exynos5250-snow.dts means in fact Rev4... but there is no
>> information in DTS about it. I think adding compatible
>> "google,snow-rev4" makes sense:
>> 1. For informational purposes (this could be also handled with a comment).
>> 2. Later one could decide to switch the default meaning of "google,snow"
>> to Rev5 and the real compatible (rev4) will be there already.
>>
>> Could you add the new compatible and fix patch issues pointed by Doug?
> 
> Looks like everything got applied, but just for the record:
> 
> Switching the default meaning of "google,snow" to Rev5 is probably not
> something we'd ever want to do, since it could confuse "rev3" boards
> (which should be serviced by the rev4 dts).  From comments in the
> Chrome OS tree:
> 
> In the "rev4" DTS:
>  * - Any real rev 0-3 boards in the field will match "google,snow",
>  *   since older U-Boots don't look for a revision specific device 
> tree.
>  * - Any real rev 4 boards in the field will match "google,snow-rev4"
>  *   first.  If that's not present they will pick the first
>  *   "google,snow" device tree that they find (ignoring the kernel
>  *   ordering).
> 
> In the "rev5" DTS:
>  * - Purposely don't add "google,snow" so old firmware (which didn't
>  *   include a -revN suffix) won't pick this one.

These are requirements written somewhere in the downstream tree... not
in upstream. Have in mind that someone may not be using Chrome OS on
Chromebook but custom U-Boot and different distro.

You cannot expect that everyone will new some requirements of some
downstream OS. If you need such requirements, write them in bindings
documentation *in the upstream*.

Best regards,
Krzysztof
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] ARM: dts: Add Exynos5250 Snow Rev5+ support

2015-09-30 Thread Doug Anderson
Hi,

On Tue, Sep 29, 2015 at 5:30 PM, Krzysztof Kozlowski
 wrote:
> Now the exynos5250-snow.dts means in fact Rev4... but there is no
> information in DTS about it. I think adding compatible
> "google,snow-rev4" makes sense:
> 1. For informational purposes (this could be also handled with a comment).
> 2. Later one could decide to switch the default meaning of "google,snow"
> to Rev5 and the real compatible (rev4) will be there already.
>
> Could you add the new compatible and fix patch issues pointed by Doug?

Looks like everything got applied, but just for the record:

Switching the default meaning of "google,snow" to Rev5 is probably not
something we'd ever want to do, since it could confuse "rev3" boards
(which should be serviced by the rev4 dts).  From comments in the
Chrome OS tree:

In the "rev4" DTS:
 * - Any real rev 0-3 boards in the field will match "google,snow",
 *   since older U-Boots don't look for a revision specific device tree.
 * - Any real rev 4 boards in the field will match "google,snow-rev4"
 *   first.  If that's not present they will pick the first
 *   "google,snow" device tree that they find (ignoring the kernel
 *   ordering).

In the "rev5" DTS:
 * - Purposely don't add "google,snow" so old firmware (which didn't
 *   include a -revN suffix) won't pick this one.


-Doug
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] ARM: dts: Add Exynos5250 Snow Rev5+ support

2015-09-29 Thread Mauro Carvalho Chehab
Em Tue, 29 Sep 2015 13:57:35 +0200
Javier Martinez Canillas  escreveu:

> There are 2 revisions of the Exynos5250 Snow Chromebook that were shipped:
> Rev4 and Rev5. The only difference between these 2 revisions is the codec,
> Rev4 has a max98095 codec while Rev5 has a max98090.
> 
> Mainline only supports Rev4 so this patch moves the common device nodes to
> a DTSI file and adds a DTS for the Exynos5250 Snow Rev5.
> 
> The Snow Rev5 DTS is based on the DTS found in the ChromiumOS 3.8 tree.
> 
> Signed-off-by: Javier Martinez Canillas 


Tested-by: Mauro Carvalho Chehab 

Tested on my Chromebook snow revision 5, with the following its file:

/dts-v1/;

/ {
description = "Chrome OS kernel image with one or more FDT blobs";
#address-cells = <1>;
images {
kernel@1{
description = "kernel";
data = /incbin/("arch/arm/boot/zImage");
type = "kernel_noload";
arch = "arm";
os = "linux";
compression = "none";
load = <0>;
entry = <0>;
};
fdt@1{
description = "exynos5250-snow.dtb";
data = /incbin/("arch/arm/boot/dts/exynos5250-snow.dtb");
type = "flat_dt";
arch = "arm";
compression = "none";
hash@1{
algo = "sha1";
};
};
fdt@2{
description = "exynos5800-peach-pi.dtb";
data = /incbin/("arch/arm/boot/dts/exynos5800-peach-pi.dtb");
type = "flat_dt";
arch = "arm";
compression = "none";
hash@1{
algo = "sha1";
};
};
fdt@3{
description = "exynos5250-snow-rev5.dtb";
data = /incbin/("arch/arm/boot/dts/exynos5250-snow-rev5.dtb");
type = "flat_dt";
arch = "arm";
compression = "none";
hash@1{
algo = "sha1";
};
};
};
configurations {
default = "conf@1";
conf@1{
kernel = "kernel@1";
fdt = "fdt@1";
};
conf@2{
kernel = "kernel@1";
fdt = "fdt@2";
};
conf@3{
kernel = "kernel@1";
fdt = "fdt@3";
};
};
};


After this patch, is is now properly detecting the audio chipset:

[0.897587] max98090 7-0010: MAX98090 REVID=0x43
[0.900135] max98090 7-0010: use default 2.8v micbias

> 
> ---
> 
> The DTS in the vendor ChromeOS tree are called exynos5250-snow-rev{4,5}.dtb
> but I decided to leave Rev4 as exynos5250-snow.dtb to avoid breaking u-boot
> that has CONFIG_DEFAULT_DEVICE_TREE="exynos5250-snow" in snow_defconfig.
> 
> Also, ChromiumOS Rev4 DTS has "google,snow-rev4" in its compatible string
> but was not added in mainline since Rev4 firmware fallbacks to "google,snow"
> and Rev5 searches for "google,snow-rev5". That way the compatible string
> could be consistent with the DTS naming and still be able to pack both Rev4
> and Rev5 FDT in the same FIT image and let the firmware pick the correct FDT.
> 
>  arch/arm/boot/dts/Makefile|   1 +
>  arch/arm/boot/dts/exynos5250-snow-common.dtsi | 684 
> ++
>  arch/arm/boot/dts/exynos5250-snow-rev5.dts|  47 ++
>  arch/arm/boot/dts/exynos5250-snow.dts | 666 +
>  4 files changed, 733 insertions(+), 665 deletions(-)
>  create mode 100644 arch/arm/boot/dts/exynos5250-snow-common.dtsi
>  create mode 100644 arch/arm/boot/dts/exynos5250-snow-rev5.dts
> 
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index 5436ad479b08..a2408a63b341 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -115,6 +115,7 @@ dtb-$(CONFIG_ARCH_EXYNOS5) += \
>   exynos5250-arndale.dtb \
>   exynos5250-smdk5250.dtb \
>   exynos5250-snow.dtb \
> + exynos5250-snow-rev5.dtb \
>   exynos5250-spring.dtb \
>   exynos5260-xyref5260.dtb \
>   exynos5410-smdk5410.dtb \
> diff --git a/arch/arm/boot/dts/exynos5250-snow-common.dtsi 
> b/arch/arm/boot/dts/exynos5250-snow-common.dtsi
> new file mode 100644
> index ..0a7f408824d8
> --- /dev/null
> +++ b/arch/arm/boot/dts/exynos5250-snow-common.dtsi
> @@ -0,0 +1,684 @@
> +/*
> + * Google Snow board device tree source
> + *
> + * Copyright (c) 2012 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.
> + */
> +
> +#include 
> +#include 
> +#include 
> +#include 
> +#include "exynos5250.dtsi"
> +
> +/ {
> + aliases {
> + i2c104 = _104;
> + };
> +
> + memory {
> + reg = <0x4000 0x8000>;
> + };
> +
> + chosen {
> + bootargs = 

[PATCH] ARM: dts: Add Exynos5250 Snow Rev5+ support

2015-09-29 Thread Javier Martinez Canillas
There are 2 revisions of the Exynos5250 Snow Chromebook that were shipped:
Rev4 and Rev5. The only difference between these 2 revisions is the codec,
Rev4 has a max98095 codec while Rev5 has a max98090.

Mainline only supports Rev4 so this patch moves the common device nodes to
a DTSI file and adds a DTS for the Exynos5250 Snow Rev5.

The Snow Rev5 DTS is based on the DTS found in the ChromiumOS 3.8 tree.

Signed-off-by: Javier Martinez Canillas 

---

The DTS in the vendor ChromeOS tree are called exynos5250-snow-rev{4,5}.dtb
but I decided to leave Rev4 as exynos5250-snow.dtb to avoid breaking u-boot
that has CONFIG_DEFAULT_DEVICE_TREE="exynos5250-snow" in snow_defconfig.

Also, ChromiumOS Rev4 DTS has "google,snow-rev4" in its compatible string
but was not added in mainline since Rev4 firmware fallbacks to "google,snow"
and Rev5 searches for "google,snow-rev5". That way the compatible string
could be consistent with the DTS naming and still be able to pack both Rev4
and Rev5 FDT in the same FIT image and let the firmware pick the correct FDT.

 arch/arm/boot/dts/Makefile|   1 +
 arch/arm/boot/dts/exynos5250-snow-common.dtsi | 684 ++
 arch/arm/boot/dts/exynos5250-snow-rev5.dts|  47 ++
 arch/arm/boot/dts/exynos5250-snow.dts | 666 +
 4 files changed, 733 insertions(+), 665 deletions(-)
 create mode 100644 arch/arm/boot/dts/exynos5250-snow-common.dtsi
 create mode 100644 arch/arm/boot/dts/exynos5250-snow-rev5.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 5436ad479b08..a2408a63b341 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -115,6 +115,7 @@ dtb-$(CONFIG_ARCH_EXYNOS5) += \
exynos5250-arndale.dtb \
exynos5250-smdk5250.dtb \
exynos5250-snow.dtb \
+   exynos5250-snow-rev5.dtb \
exynos5250-spring.dtb \
exynos5260-xyref5260.dtb \
exynos5410-smdk5410.dtb \
diff --git a/arch/arm/boot/dts/exynos5250-snow-common.dtsi 
b/arch/arm/boot/dts/exynos5250-snow-common.dtsi
new file mode 100644
index ..0a7f408824d8
--- /dev/null
+++ b/arch/arm/boot/dts/exynos5250-snow-common.dtsi
@@ -0,0 +1,684 @@
+/*
+ * Google Snow board device tree source
+ *
+ * Copyright (c) 2012 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.
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include "exynos5250.dtsi"
+
+/ {
+   aliases {
+   i2c104 = _104;
+   };
+
+   memory {
+   reg = <0x4000 0x8000>;
+   };
+
+   chosen {
+   bootargs = "console=tty1";
+   stdout-path = "serial3:115200n8";
+   };
+
+   gpio-keys {
+   compatible = "gpio-keys";
+   pinctrl-names = "default";
+   pinctrl-0 = <_key_irq _irq>;
+
+   power {
+   label = "Power";
+   gpios = < 3 GPIO_ACTIVE_LOW>;
+   linux,code = ;
+   gpio-key,wakeup;
+   };
+
+   lid-switch {
+   label = "Lid";
+   gpios = < 5 GPIO_ACTIVE_LOW>;
+   linux,input-type = <5>; /* EV_SW */
+   linux,code = <0>; /* SW_LID */
+   debounce-interval = <1>;
+   gpio-key,wakeup;
+   };
+   };
+
+   vbat: vbat-fixed-regulator {
+   compatible = "regulator-fixed";
+   regulator-name = "vbat-supply";
+   regulator-boot-on;
+   };
+
+   i2c-arbitrator {
+   compatible = "i2c-arb-gpio-challenge";
+   #address-cells = <1>;
+   #size-cells = <0>;
+
+   i2c-parent = <&{/i2c@12CA}>;
+
+   our-claim-gpio = < 3 GPIO_ACTIVE_LOW>;
+   their-claim-gpios = < 4 GPIO_ACTIVE_LOW>;
+   slew-delay-us = <10>;
+   wait-retry-us = <3000>;
+   wait-free-us = <5>;
+
+   pinctrl-names = "default";
+   pinctrl-0 = <_our_claim _their_claim>;
+
+   /* Use ID 104 as a hint that we're on physical bus 4 */
+   i2c_104: i2c@0 {
+   reg = <0>;
+   #address-cells = <1>;
+   #size-cells = <0>;
+
+   battery: sbs-battery@b {
+   compatible = "sbs,sbs-battery";
+   reg = <0xb>;
+   sbs,poll-retry-count = <1>;
+   };
+
+   cros_ec: embedded-controller {
+   compatible = "google,cros-ec-i2c";
+   reg = <0x1e>;
+ 

Re: [PATCH] ARM: dts: Add Exynos5250 Snow Rev5+ support

2015-09-29 Thread Krzysztof Kozlowski
On 29.09.2015 20:57, Javier Martinez Canillas wrote:
> There are 2 revisions of the Exynos5250 Snow Chromebook that were shipped:
> Rev4 and Rev5. The only difference between these 2 revisions is the codec,
> Rev4 has a max98095 codec while Rev5 has a max98090.
> 
> Mainline only supports Rev4 so this patch moves the common device nodes to
> a DTSI file and adds a DTS for the Exynos5250 Snow Rev5.
> 
> The Snow Rev5 DTS is based on the DTS found in the ChromiumOS 3.8 tree.
> 
> Signed-off-by: Javier Martinez Canillas 
> 
> ---
> 
> The DTS in the vendor ChromeOS tree are called exynos5250-snow-rev{4,5}.dtb
> but I decided to leave Rev4 as exynos5250-snow.dtb to avoid breaking u-boot
> that has CONFIG_DEFAULT_DEVICE_TREE="exynos5250-snow" in snow_defconfig.
> 
> Also, ChromiumOS Rev4 DTS has "google,snow-rev4" in its compatible string
> but was not added in mainline since Rev4 firmware fallbacks to "google,snow"
> and Rev5 searches for "google,snow-rev5". That way the compatible string
> could be consistent with the DTS naming and still be able to pack both Rev4
> and Rev5 FDT in the same FIT image and let the firmware pick the correct FDT.
> 
>  arch/arm/boot/dts/Makefile|   1 +
>  arch/arm/boot/dts/exynos5250-snow-common.dtsi | 684 
> ++
>  arch/arm/boot/dts/exynos5250-snow-rev5.dts|  47 ++
>  arch/arm/boot/dts/exynos5250-snow.dts | 666 +
>  4 files changed, 733 insertions(+), 665 deletions(-)
>  create mode 100644 arch/arm/boot/dts/exynos5250-snow-common.dtsi
>  create mode 100644 arch/arm/boot/dts/exynos5250-snow-rev5.dts

Now the exynos5250-snow.dts means in fact Rev4... but there is no
information in DTS about it. I think adding compatible
"google,snow-rev4" makes sense:
1. For informational purposes (this could be also handled with a comment).
2. Later one could decide to switch the default meaning of "google,snow"
to Rev5 and the real compatible (rev4) will be there already.

Could you add the new compatible and fix patch issues pointed by Doug?

Best regards,
Krzysztof

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] ARM: dts: Add Exynos5250 Snow Rev5+ support

2015-09-29 Thread Doug Anderson
Javier,

On Tue, Sep 29, 2015 at 4:57 AM, Javier Martinez Canillas
 wrote:
> There are 2 revisions of the Exynos5250 Snow Chromebook that were shipped:
> Rev4 and Rev5. The only difference between these 2 revisions is the codec,
> Rev4 has a max98095 codec while Rev5 has a max98090.
>
> Mainline only supports Rev4 so this patch moves the common device nodes to
> a DTSI file and adds a DTS for the Exynos5250 Snow Rev5.
>
> The Snow Rev5 DTS is based on the DTS found in the ChromiumOS 3.8 tree.
>
> Signed-off-by: Javier Martinez Canillas 
>
> ---
>
> The DTS in the vendor ChromeOS tree are called exynos5250-snow-rev{4,5}.dtb
> but I decided to leave Rev4 as exynos5250-snow.dtb to avoid breaking u-boot
> that has CONFIG_DEFAULT_DEVICE_TREE="exynos5250-snow" in snow_defconfig.
>
> Also, ChromiumOS Rev4 DTS has "google,snow-rev4" in its compatible string
> but was not added in mainline since Rev4 firmware fallbacks to "google,snow"
> and Rev5 searches for "google,snow-rev5". That way the compatible string
> could be consistent with the DTS naming and still be able to pack both Rev4
> and Rev5 FDT in the same FIT image and let the firmware pick the correct FDT.

Looking at all the notes in the DTS in the ChromeOS tree, this sounds
like it should be fine.


>  arch/arm/boot/dts/Makefile|   1 +
>  arch/arm/boot/dts/exynos5250-snow-common.dtsi | 684 
> ++
>  arch/arm/boot/dts/exynos5250-snow-rev5.dts|  47 ++
>  arch/arm/boot/dts/exynos5250-snow.dts | 666 +
>  4 files changed, 733 insertions(+), 665 deletions(-)

Thanks!  Note:

$ pwclient git-am 7285451
Applying patch #7285451 using 'git am'
Description: ARM: dts: Add Exynos5250 Snow Rev5+ support
Applying: ARM: dts: Add Exynos5250 Snow Rev5+ support
.git/rebase-apply/patch:774: new blank line at EOF.
+
warning: 1 line adds whitespace errors.


One other nit is that the exynos5250-snow.dts" ends up with the
"max98095" pinctrl properties sorted differently than the
"exynos5250-snow-rev5.dts".  Is it worth reordering the
"exynos5250-snow.dts" in the same patch?

Otherwise this looks fine to me.

Reviewed-by: Douglas Anderson 
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html