diff mbox series

[1/2] arm64: dts: armada-3720-espressobin: sync with downstream

Message ID 20200831033408.467699-1-a.heider@gmail.com
State Superseded
Delegated to: Stefan Roese
Headers show
Series [1/2] arm64: dts: armada-3720-espressobin: sync with downstream | expand

Commit Message

Andre Heider Aug. 31, 2020, 3:34 a.m. UTC
This adds the disabled eMMC node.

Signed-off-by: Andre Heider <a.heider@gmail.com>
---
 arch/arm/dts/armada-3720-espressobin.dts | 63 +++++++++---------------
 1 file changed, 23 insertions(+), 40 deletions(-)

Comments

Pali Rohár Aug. 31, 2020, 7:53 a.m. UTC | #1
On Monday 31 August 2020 05:34:07 Andre Heider wrote:
> This adds the disabled eMMC node.
> 
> Signed-off-by: Andre Heider <a.heider@gmail.com>
> ---
>  arch/arm/dts/armada-3720-espressobin.dts | 63 +++++++++---------------
>  1 file changed, 23 insertions(+), 40 deletions(-)
> 
> diff --git a/arch/arm/dts/armada-3720-espressobin.dts b/arch/arm/dts/armada-3720-espressobin.dts
> index 4534f5ff29..a66ab814eb 100644
> --- a/arch/arm/dts/armada-3720-espressobin.dts
> +++ b/arch/arm/dts/armada-3720-espressobin.dts
> @@ -1,3 +1,4 @@
> +// SPDX-License-Identifier: GPL-2.0+
>  /*
>   * Device Tree file for Marvell Armada 3720 community board
>   * (ESPRESSOBin)
> @@ -5,53 +6,15 @@
>   *
>   * Gregory CLEMENT <gregory.clement@free-electrons.com>
>   * Konstantin Porotchkin <kostap@marvell.com>
> - *
> - * This file is dual-licensed: you can use it either under the terms
> - * of the GPL or the X11 license, at your option. Note that this dual
> - * licensing only applies to this file, and not this project as a
> - * whole.
> - *
> - *  a) This file is free software; you can redistribute it and/or
> - *     modify it under the terms of the GNU General Public License as
> - *     published by the Free Software Foundation; either version 2 of the
> - *     License, or (at your option) any later version.
> - *
> - *     This file 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.
> - *
> - * Or, alternatively
> - *
> - *  b) Permission is hereby granted, free of charge, to any person
> - *     obtaining a copy of this software and associated documentation
> - *     files (the "Software"), to deal in the Software without
> - *     restriction, including without limitation the rights to use
> - *     copy, modify, merge, publish, distribute, sublicense, and/or
> - *     sell copies of the Software, and to permit persons to whom the
> - *     Software is furnished to do so, subject to the following
> - *     conditions:
> - *
> - *     The above copyright notice and this permission notice shall be
> - *     included in all copies or substantial portions of the Software.
> - *
> - *     THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND
> - *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
> - *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
> - *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
> - *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY
> - *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
> - *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
> - *     OTHER DEALINGS IN THE SOFTWARE.
>   */

You are changing license of whole file. Have all contributors and
copyright holders agreed with it?

> -
>  /dts-v1/;
>  
>  #include "armada-372x.dtsi"
>  
>  / {
>  	model = "Marvell Armada 3720 Community Board ESPRESSOBin";
> -	compatible = "marvell,armada-3720-espressobin", "marvell,armada3720", "marvell,armada3710";
> +	compatible = "marvell,armada-3720-espressobin",
> +		     "marvell,armada3720", "marvell,armada3710";

There is no change on these two lines, right?

>  
>  	chosen {
>  		stdout-path = "serial0:115200n8";
> @@ -121,6 +84,7 @@
>  	status = "okay";
>  };
>  
> +/* J1 */
>  &sdhci0 {
>  	pinctrl-names = "default";
>  	pinctrl-0 = <&sdio_pins>;
> @@ -130,6 +94,25 @@
>  	status = "okay";
>  };
>  
> +/* U11 */
> +&sdhci1 {
> +	non-removable;
> +	bus-width = <8>;
> +	mmc-ddr-1_8v;
> +	mmc-hs400-1_8v;
> +	marvell,pad-type = "fixed-1-8v";
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&mmc_pins>;
> +	status = "disabled";
> +
> +	#address-cells = <1>;
> +	#size-cells = <0>;
> +	mmccard: mmccard@0 {
> +		compatible = "mmc-card";
> +		reg = <0>;
> +	};
> +};
> +
>  &spi0 {
>  	status = "okay";
>  	pinctrl-names = "default";
> -- 
> 2.28.0
>
Pali Rohár Aug. 31, 2020, 8:01 a.m. UTC | #2
On Monday 31 August 2020 05:34:07 Andre Heider wrote:
> This adds the disabled eMMC node.
> 
> Signed-off-by: Andre Heider <a.heider@gmail.com>
> ---
>  arch/arm/dts/armada-3720-espressobin.dts | 63 +++++++++---------------
>  1 file changed, 23 insertions(+), 40 deletions(-)
> 
> diff --git a/arch/arm/dts/armada-3720-espressobin.dts b/arch/arm/dts/armada-3720-espressobin.dts
> index 4534f5ff29..a66ab814eb 100644
> --- a/arch/arm/dts/armada-3720-espressobin.dts
> +++ b/arch/arm/dts/armada-3720-espressobin.dts
> @@ -1,3 +1,4 @@
> +// SPDX-License-Identifier: GPL-2.0+
>  /*
>   * Device Tree file for Marvell Armada 3720 community board
>   * (ESPRESSOBin)
> @@ -5,53 +6,15 @@
>   *
>   * Gregory CLEMENT <gregory.clement@free-electrons.com>
>   * Konstantin Porotchkin <kostap@marvell.com>
> - *
> - * This file is dual-licensed: you can use it either under the terms
> - * of the GPL or the X11 license, at your option. Note that this dual
> - * licensing only applies to this file, and not this project as a
> - * whole.
> - *
> - *  a) This file is free software; you can redistribute it and/or
> - *     modify it under the terms of the GNU General Public License as
> - *     published by the Free Software Foundation; either version 2 of the
> - *     License, or (at your option) any later version.
> - *
> - *     This file 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.
> - *
> - * Or, alternatively
> - *
> - *  b) Permission is hereby granted, free of charge, to any person
> - *     obtaining a copy of this software and associated documentation
> - *     files (the "Software"), to deal in the Software without
> - *     restriction, including without limitation the rights to use
> - *     copy, modify, merge, publish, distribute, sublicense, and/or
> - *     sell copies of the Software, and to permit persons to whom the
> - *     Software is furnished to do so, subject to the following
> - *     conditions:
> - *
> - *     The above copyright notice and this permission notice shall be
> - *     included in all copies or substantial portions of the Software.
> - *
> - *     THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND
> - *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
> - *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
> - *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
> - *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY
> - *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
> - *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
> - *     OTHER DEALINGS IN THE SOFTWARE.
>   */
> -
>  /dts-v1/;
>  
>  #include "armada-372x.dtsi"
>  
>  / {
>  	model = "Marvell Armada 3720 Community Board ESPRESSOBin";
> -	compatible = "marvell,armada-3720-espressobin", "marvell,armada3720", "marvell,armada3710";
> +	compatible = "marvell,armada-3720-espressobin",
> +		     "marvell,armada3720", "marvell,armada3710";
>  
>  	chosen {
>  		stdout-path = "serial0:115200n8";
> @@ -121,6 +84,7 @@
>  	status = "okay";
>  };
>  
> +/* J1 */
>  &sdhci0 {
>  	pinctrl-names = "default";
>  	pinctrl-0 = <&sdio_pins>;
> @@ -130,6 +94,25 @@
>  	status = "okay";
>  };
>  
> +/* U11 */
> +&sdhci1 {
> +	non-removable;
> +	bus-width = <8>;
> +	mmc-ddr-1_8v;
> +	mmc-hs400-1_8v;
> +	marvell,pad-type = "fixed-1-8v";
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&mmc_pins>;
> +	status = "disabled";
> +
> +	#address-cells = <1>;
> +	#size-cells = <0>;
> +	mmccard: mmccard@0 {
> +		compatible = "mmc-card";
> +		reg = <0>;
> +	};
> +};

Anyway, Andre, have you tested these Marvell's patches on top of U-Boot
from master git branch? Because espressobin with eMMC is rather rare (do
not know who has this board for testing; do you really have it?) and
from my experience with previous patches I know that Marvell's patches
does not always work on current upstream U-Boot.

> +
>  &spi0 {
>  	status = "okay";
>  	pinctrl-names = "default";
> -- 
> 2.28.0
>
Andre Heider Aug. 31, 2020, 8:17 a.m. UTC | #3
On 31/08/2020 09:53, Pali Rohár wrote:
> On Monday 31 August 2020 05:34:07 Andre Heider wrote:
>> This adds the disabled eMMC node.
>>
>> Signed-off-by: Andre Heider <a.heider@gmail.com>
>> ---
>>   arch/arm/dts/armada-3720-espressobin.dts | 63 +++++++++---------------
>>   1 file changed, 23 insertions(+), 40 deletions(-)
>>
>> diff --git a/arch/arm/dts/armada-3720-espressobin.dts b/arch/arm/dts/armada-3720-espressobin.dts
>> index 4534f5ff29..a66ab814eb 100644
>> --- a/arch/arm/dts/armada-3720-espressobin.dts
>> +++ b/arch/arm/dts/armada-3720-espressobin.dts
>> @@ -1,3 +1,4 @@
>> +// SPDX-License-Identifier: GPL-2.0+
>>   /*
>>    * Device Tree file for Marvell Armada 3720 community board
>>    * (ESPRESSOBin)
>> @@ -5,53 +6,15 @@
>>    *
>>    * Gregory CLEMENT <gregory.clement@free-electrons.com>
>>    * Konstantin Porotchkin <kostap@marvell.com>
>> - *
>> - * This file is dual-licensed: you can use it either under the terms
>> - * of the GPL or the X11 license, at your option. Note that this dual
>> - * licensing only applies to this file, and not this project as a
>> - * whole.
>> - *
>> - *  a) This file is free software; you can redistribute it and/or
>> - *     modify it under the terms of the GNU General Public License as
>> - *     published by the Free Software Foundation; either version 2 of the
>> - *     License, or (at your option) any later version.
>> - *
>> - *     This file 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.
>> - *
>> - * Or, alternatively
>> - *
>> - *  b) Permission is hereby granted, free of charge, to any person
>> - *     obtaining a copy of this software and associated documentation
>> - *     files (the "Software"), to deal in the Software without
>> - *     restriction, including without limitation the rights to use
>> - *     copy, modify, merge, publish, distribute, sublicense, and/or
>> - *     sell copies of the Software, and to permit persons to whom the
>> - *     Software is furnished to do so, subject to the following
>> - *     conditions:
>> - *
>> - *     The above copyright notice and this permission notice shall be
>> - *     included in all copies or substantial portions of the Software.
>> - *
>> - *     THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND
>> - *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
>> - *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
>> - *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
>> - *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY
>> - *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
>> - *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
>> - *     OTHER DEALINGS IN THE SOFTWARE.
>>    */
> 
> You are changing license of whole file. Have all contributors and
> copyright holders agreed with it?

These are all downstream changes, I haven't added any additional changes!

> 
>> -
>>   /dts-v1/;
>>   
>>   #include "armada-372x.dtsi"
>>   
>>   / {
>>   	model = "Marvell Armada 3720 Community Board ESPRESSOBin";
>> -	compatible = "marvell,armada-3720-espressobin", "marvell,armada3720", "marvell,armada3710";
>> +	compatible = "marvell,armada-3720-espressobin",
>> +		     "marvell,armada3720", "marvell,armada3710";
> 
> There is no change on these two lines, right?

Right, just white spaces.

> 
>>   
>>   	chosen {
>>   		stdout-path = "serial0:115200n8";
>> @@ -121,6 +84,7 @@
>>   	status = "okay";
>>   };
>>   
>> +/* J1 */
>>   &sdhci0 {
>>   	pinctrl-names = "default";
>>   	pinctrl-0 = <&sdio_pins>;
>> @@ -130,6 +94,25 @@
>>   	status = "okay";
>>   };
>>   
>> +/* U11 */
>> +&sdhci1 {
>> +	non-removable;
>> +	bus-width = <8>;
>> +	mmc-ddr-1_8v;
>> +	mmc-hs400-1_8v;
>> +	marvell,pad-type = "fixed-1-8v";
>> +	pinctrl-names = "default";
>> +	pinctrl-0 = <&mmc_pins>;
>> +	status = "disabled";
>> +
>> +	#address-cells = <1>;
>> +	#size-cells = <0>;
>> +	mmccard: mmccard@0 {
>> +		compatible = "mmc-card";
>> +		reg = <0>;
>> +	};
>> +};
>> +
>>   &spi0 {
>>   	status = "okay";
>>   	pinctrl-names = "default";
>> -- 
>> 2.28.0
>>
Andre Heider Aug. 31, 2020, 8:17 a.m. UTC | #4
On 31/08/2020 10:01, Pali Rohár wrote:
> On Monday 31 August 2020 05:34:07 Andre Heider wrote:
>> This adds the disabled eMMC node.
>>
>> Signed-off-by: Andre Heider <a.heider@gmail.com>
>> ---
>>   arch/arm/dts/armada-3720-espressobin.dts | 63 +++++++++---------------
>>   1 file changed, 23 insertions(+), 40 deletions(-)
>>
>> diff --git a/arch/arm/dts/armada-3720-espressobin.dts b/arch/arm/dts/armada-3720-espressobin.dts
>> index 4534f5ff29..a66ab814eb 100644
>> --- a/arch/arm/dts/armada-3720-espressobin.dts
>> +++ b/arch/arm/dts/armada-3720-espressobin.dts
>> @@ -1,3 +1,4 @@
>> +// SPDX-License-Identifier: GPL-2.0+
>>   /*
>>    * Device Tree file for Marvell Armada 3720 community board
>>    * (ESPRESSOBin)
>> @@ -5,53 +6,15 @@
>>    *
>>    * Gregory CLEMENT <gregory.clement@free-electrons.com>
>>    * Konstantin Porotchkin <kostap@marvell.com>
>> - *
>> - * This file is dual-licensed: you can use it either under the terms
>> - * of the GPL or the X11 license, at your option. Note that this dual
>> - * licensing only applies to this file, and not this project as a
>> - * whole.
>> - *
>> - *  a) This file is free software; you can redistribute it and/or
>> - *     modify it under the terms of the GNU General Public License as
>> - *     published by the Free Software Foundation; either version 2 of the
>> - *     License, or (at your option) any later version.
>> - *
>> - *     This file 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.
>> - *
>> - * Or, alternatively
>> - *
>> - *  b) Permission is hereby granted, free of charge, to any person
>> - *     obtaining a copy of this software and associated documentation
>> - *     files (the "Software"), to deal in the Software without
>> - *     restriction, including without limitation the rights to use
>> - *     copy, modify, merge, publish, distribute, sublicense, and/or
>> - *     sell copies of the Software, and to permit persons to whom the
>> - *     Software is furnished to do so, subject to the following
>> - *     conditions:
>> - *
>> - *     The above copyright notice and this permission notice shall be
>> - *     included in all copies or substantial portions of the Software.
>> - *
>> - *     THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND
>> - *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
>> - *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
>> - *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
>> - *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY
>> - *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
>> - *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
>> - *     OTHER DEALINGS IN THE SOFTWARE.
>>    */
>> -
>>   /dts-v1/;
>>   
>>   #include "armada-372x.dtsi"
>>   
>>   / {
>>   	model = "Marvell Armada 3720 Community Board ESPRESSOBin";
>> -	compatible = "marvell,armada-3720-espressobin", "marvell,armada3720", "marvell,armada3710";
>> +	compatible = "marvell,armada-3720-espressobin",
>> +		     "marvell,armada3720", "marvell,armada3710";
>>   
>>   	chosen {
>>   		stdout-path = "serial0:115200n8";
>> @@ -121,6 +84,7 @@
>>   	status = "okay";
>>   };
>>   
>> +/* J1 */
>>   &sdhci0 {
>>   	pinctrl-names = "default";
>>   	pinctrl-0 = <&sdio_pins>;
>> @@ -130,6 +94,25 @@
>>   	status = "okay";
>>   };
>>   
>> +/* U11 */
>> +&sdhci1 {
>> +	non-removable;
>> +	bus-width = <8>;
>> +	mmc-ddr-1_8v;
>> +	mmc-hs400-1_8v;
>> +	marvell,pad-type = "fixed-1-8v";
>> +	pinctrl-names = "default";
>> +	pinctrl-0 = <&mmc_pins>;
>> +	status = "disabled";
>> +
>> +	#address-cells = <1>;
>> +	#size-cells = <0>;
>> +	mmccard: mmccard@0 {
>> +		compatible = "mmc-card";
>> +		reg = <0>;
>> +	};
>> +};
> 
> Anyway, Andre, have you tested these Marvell's patches on top of U-Boot
> from master git branch? Because espressobin with eMMC is rather rare (do
> not know who has this board for testing; do you really have it?) and
> from my experience with previous patches I know that Marvell's patches
> does not always work on current upstream U-Boot.

I haven't tested it on a espressobin emmc myself, but the node is the 
same as for arch/arm/dts/armada-3720-db.dts and almost the same as for 
arch/arm/dts/armada-3720-uDPU.dts.

Thanks,
Andre

> 
>> +
>>   &spi0 {
>>   	status = "okay";
>>   	pinctrl-names = "default";
>> -- 
>> 2.28.0
>>
Pali Rohár Aug. 31, 2020, 8:46 a.m. UTC | #5
On Monday 31 August 2020 10:17:07 Andre Heider wrote:
> On 31/08/2020 10:01, Pali Rohár wrote:
> > On Monday 31 August 2020 05:34:07 Andre Heider wrote:
> > > +/* U11 */
> > > +&sdhci1 {
> > > +	non-removable;
> > > +	bus-width = <8>;
> > > +	mmc-ddr-1_8v;
> > > +	mmc-hs400-1_8v;
> > > +	marvell,pad-type = "fixed-1-8v";
> > > +	pinctrl-names = "default";
> > > +	pinctrl-0 = <&mmc_pins>;
> > > +	status = "disabled";
> > > +
> > > +	#address-cells = <1>;
> > > +	#size-cells = <0>;
> > > +	mmccard: mmccard@0 {
> > > +		compatible = "mmc-card";
> > > +		reg = <0>;
> > > +	};
> > > +};
> > 
> > Anyway, Andre, have you tested these Marvell's patches on top of U-Boot
> > from master git branch? Because espressobin with eMMC is rather rare (do
> > not know who has this board for testing; do you really have it?) and
> > from my experience with previous patches I know that Marvell's patches
> > does not always work on current upstream U-Boot.
> 
> I haven't tested it on a espressobin emmc myself, but the node is the same
> as for arch/arm/dts/armada-3720-db.dts and almost the same as for
> arch/arm/dts/armada-3720-uDPU.dts.

I think changes should be tested prior merged them into upstream.
Untested patches can cause other hidden issues.

Also as I wrote, other SD patches for EspressoBin copied+pasted from
Marvell's did not worked as is applied on current upstream U-Boot. And
also argument that "patch is similar as other node" is not reason to not
test changed. As a first thing which I did for SD card support on
EspressoBin was that I copied DTS node from Turris MOX... and on
EspressoBin it did not worked. On MOX was card working fine.
Andre Heider Aug. 31, 2020, 9:59 a.m. UTC | #6
On 31/08/2020 10:46, Pali Rohár wrote:
> On Monday 31 August 2020 10:17:07 Andre Heider wrote:
>> On 31/08/2020 10:01, Pali Rohár wrote:
>>> On Monday 31 August 2020 05:34:07 Andre Heider wrote:
>>>> +/* U11 */
>>>> +&sdhci1 {
>>>> +	non-removable;
>>>> +	bus-width = <8>;
>>>> +	mmc-ddr-1_8v;
>>>> +	mmc-hs400-1_8v;
>>>> +	marvell,pad-type = "fixed-1-8v";
>>>> +	pinctrl-names = "default";
>>>> +	pinctrl-0 = <&mmc_pins>;
>>>> +	status = "disabled";
>>>> +
>>>> +	#address-cells = <1>;
>>>> +	#size-cells = <0>;
>>>> +	mmccard: mmccard@0 {
>>>> +		compatible = "mmc-card";
>>>> +		reg = <0>;
>>>> +	};
>>>> +};
>>>
>>> Anyway, Andre, have you tested these Marvell's patches on top of U-Boot
>>> from master git branch? Because espressobin with eMMC is rather rare (do
>>> not know who has this board for testing; do you really have it?) and
>>> from my experience with previous patches I know that Marvell's patches
>>> does not always work on current upstream U-Boot.
>>
>> I haven't tested it on a espressobin emmc myself, but the node is the same
>> as for arch/arm/dts/armada-3720-db.dts and almost the same as for
>> arch/arm/dts/armada-3720-uDPU.dts.
> 
> I think changes should be tested prior merged them into upstream.
> Untested patches can cause other hidden issues.

Like an utterly broken u-boot for 2 years due to data aborts? :)

> Also as I wrote, other SD patches for EspressoBin copied+pasted from
> Marvell's did not worked as is applied on current upstream U-Boot. And
> also argument that "patch is similar as other node" is not reason to not
> test changed. As a first thing which I did for SD card support on
> EspressoBin was that I copied DTS node from Turris MOX... and on
> EspressoBin it did not worked. On MOX was card working fine.

I would test the patches if I had the hardware, but I just don't.

Maybe someone with an espressobin-emmc reads and tests this.
And I can try to find users on e.g. the openwrt forums.
But I wouldn't hold my breath...

Thanks,
Andre
Pali Rohár Sept. 1, 2020, 8 p.m. UTC | #7
On Monday 31 August 2020 11:59:28 Andre Heider wrote:
> On 31/08/2020 10:46, Pali Rohár wrote:
> > On Monday 31 August 2020 10:17:07 Andre Heider wrote:
> > > On 31/08/2020 10:01, Pali Rohár wrote:
> > > > On Monday 31 August 2020 05:34:07 Andre Heider wrote:
> > > > > +/* U11 */
> > > > > +&sdhci1 {
> > > > > +	non-removable;
> > > > > +	bus-width = <8>;
> > > > > +	mmc-ddr-1_8v;
> > > > > +	mmc-hs400-1_8v;
> > > > > +	marvell,pad-type = "fixed-1-8v";
> > > > > +	pinctrl-names = "default";
> > > > > +	pinctrl-0 = <&mmc_pins>;
> > > > > +	status = "disabled";
> > > > > +
> > > > > +	#address-cells = <1>;
> > > > > +	#size-cells = <0>;
> > > > > +	mmccard: mmccard@0 {
> > > > > +		compatible = "mmc-card";
> > > > > +		reg = <0>;
> > > > > +	};
> > > > > +};
> > > > 
> > > > Anyway, Andre, have you tested these Marvell's patches on top of U-Boot
> > > > from master git branch? Because espressobin with eMMC is rather rare (do
> > > > not know who has this board for testing; do you really have it?) and
> > > > from my experience with previous patches I know that Marvell's patches
> > > > does not always work on current upstream U-Boot.
> > > 
> > > I haven't tested it on a espressobin emmc myself, but the node is the same
> > > as for arch/arm/dts/armada-3720-db.dts and almost the same as for
> > > arch/arm/dts/armada-3720-uDPU.dts.
> > 
> > I think changes should be tested prior merged them into upstream.
> > Untested patches can cause other hidden issues.
> 
> Like an utterly broken u-boot for 2 years due to data aborts? :)

Exactly!

> > Also as I wrote, other SD patches for EspressoBin copied+pasted from
> > Marvell's did not worked as is applied on current upstream U-Boot. And
> > also argument that "patch is similar as other node" is not reason to not
> > test changed. As a first thing which I did for SD card support on
> > EspressoBin was that I copied DTS node from Turris MOX... and on
> > EspressoBin it did not worked. On MOX was card working fine.
> 
> I would test the patches if I had the hardware, but I just don't.
> 
> Maybe someone with an espressobin-emmc reads and tests this.
> And I can try to find users on e.g. the openwrt forums.
> But I wouldn't hold my breath...

Another option could be to solder eMMC on existing non-eMMC EspressoBin
board, but this is rather very hard without expensive equipment.

Anyway, if there are no users with hardware I think it does not make
sense to try supporting such HW combination.
Stefan Roese Sept. 4, 2020, 9:01 a.m. UTC | #8
On 31.08.20 05:34, Andre Heider wrote:
> This adds the disabled eMMC node.
> 
> Signed-off-by: Andre Heider <a.heider@gmail.com>

Reviewed-by: Stefan Roese <sr@denx.de>

Thanks,
Stefan

> ---
>   arch/arm/dts/armada-3720-espressobin.dts | 63 +++++++++---------------
>   1 file changed, 23 insertions(+), 40 deletions(-)
> 
> diff --git a/arch/arm/dts/armada-3720-espressobin.dts b/arch/arm/dts/armada-3720-espressobin.dts
> index 4534f5ff29..a66ab814eb 100644
> --- a/arch/arm/dts/armada-3720-espressobin.dts
> +++ b/arch/arm/dts/armada-3720-espressobin.dts
> @@ -1,3 +1,4 @@
> +// SPDX-License-Identifier: GPL-2.0+
>   /*
>    * Device Tree file for Marvell Armada 3720 community board
>    * (ESPRESSOBin)
> @@ -5,53 +6,15 @@
>    *
>    * Gregory CLEMENT <gregory.clement@free-electrons.com>
>    * Konstantin Porotchkin <kostap@marvell.com>
> - *
> - * This file is dual-licensed: you can use it either under the terms
> - * of the GPL or the X11 license, at your option. Note that this dual
> - * licensing only applies to this file, and not this project as a
> - * whole.
> - *
> - *  a) This file is free software; you can redistribute it and/or
> - *     modify it under the terms of the GNU General Public License as
> - *     published by the Free Software Foundation; either version 2 of the
> - *     License, or (at your option) any later version.
> - *
> - *     This file 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.
> - *
> - * Or, alternatively
> - *
> - *  b) Permission is hereby granted, free of charge, to any person
> - *     obtaining a copy of this software and associated documentation
> - *     files (the "Software"), to deal in the Software without
> - *     restriction, including without limitation the rights to use
> - *     copy, modify, merge, publish, distribute, sublicense, and/or
> - *     sell copies of the Software, and to permit persons to whom the
> - *     Software is furnished to do so, subject to the following
> - *     conditions:
> - *
> - *     The above copyright notice and this permission notice shall be
> - *     included in all copies or substantial portions of the Software.
> - *
> - *     THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND
> - *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
> - *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
> - *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
> - *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY
> - *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
> - *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
> - *     OTHER DEALINGS IN THE SOFTWARE.
>    */
> -
>   /dts-v1/;
>   
>   #include "armada-372x.dtsi"
>   
>   / {
>   	model = "Marvell Armada 3720 Community Board ESPRESSOBin";
> -	compatible = "marvell,armada-3720-espressobin", "marvell,armada3720", "marvell,armada3710";
> +	compatible = "marvell,armada-3720-espressobin",
> +		     "marvell,armada3720", "marvell,armada3710";
>   
>   	chosen {
>   		stdout-path = "serial0:115200n8";
> @@ -121,6 +84,7 @@
>   	status = "okay";
>   };
>   
> +/* J1 */
>   &sdhci0 {
>   	pinctrl-names = "default";
>   	pinctrl-0 = <&sdio_pins>;
> @@ -130,6 +94,25 @@
>   	status = "okay";
>   };
>   
> +/* U11 */
> +&sdhci1 {
> +	non-removable;
> +	bus-width = <8>;
> +	mmc-ddr-1_8v;
> +	mmc-hs400-1_8v;
> +	marvell,pad-type = "fixed-1-8v";
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&mmc_pins>;
> +	status = "disabled";
> +
> +	#address-cells = <1>;
> +	#size-cells = <0>;
> +	mmccard: mmccard@0 {
> +		compatible = "mmc-card";
> +		reg = <0>;
> +	};
> +};
> +
>   &spi0 {
>   	status = "okay";
>   	pinctrl-names = "default";
> 


Viele Grüße,
Stefan
Stefan Roese Sept. 4, 2020, 12:02 p.m. UTC | #9
Hi Andre,

On 31.08.20 09:53, Pali Rohár wrote:
> On Monday 31 August 2020 05:34:07 Andre Heider wrote:
>> This adds the disabled eMMC node.
>>
>> Signed-off-by: Andre Heider <a.heider@gmail.com>
>> ---
>>   arch/arm/dts/armada-3720-espressobin.dts | 63 +++++++++---------------
>>   1 file changed, 23 insertions(+), 40 deletions(-)
>>
>> diff --git a/arch/arm/dts/armada-3720-espressobin.dts b/arch/arm/dts/armada-3720-espressobin.dts
>> index 4534f5ff29..a66ab814eb 100644
>> --- a/arch/arm/dts/armada-3720-espressobin.dts
>> +++ b/arch/arm/dts/armada-3720-espressobin.dts
>> @@ -1,3 +1,4 @@
>> +// SPDX-License-Identifier: GPL-2.0+
>>   /*
>>    * Device Tree file for Marvell Armada 3720 community board
>>    * (ESPRESSOBin)
>> @@ -5,53 +6,15 @@
>>    *
>>    * Gregory CLEMENT <gregory.clement@free-electrons.com>
>>    * Konstantin Porotchkin <kostap@marvell.com>
>> - *
>> - * This file is dual-licensed: you can use it either under the terms
>> - * of the GPL or the X11 license, at your option. Note that this dual
>> - * licensing only applies to this file, and not this project as a
>> - * whole.
>> - *
>> - *  a) This file is free software; you can redistribute it and/or
>> - *     modify it under the terms of the GNU General Public License as
>> - *     published by the Free Software Foundation; either version 2 of the
>> - *     License, or (at your option) any later version.
>> - *
>> - *     This file 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.
>> - *
>> - * Or, alternatively
>> - *
>> - *  b) Permission is hereby granted, free of charge, to any person
>> - *     obtaining a copy of this software and associated documentation
>> - *     files (the "Software"), to deal in the Software without
>> - *     restriction, including without limitation the rights to use
>> - *     copy, modify, merge, publish, distribute, sublicense, and/or
>> - *     sell copies of the Software, and to permit persons to whom the
>> - *     Software is furnished to do so, subject to the following
>> - *     conditions:
>> - *
>> - *     The above copyright notice and this permission notice shall be
>> - *     included in all copies or substantial portions of the Software.
>> - *
>> - *     THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND
>> - *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
>> - *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
>> - *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
>> - *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY
>> - *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
>> - *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
>> - *     OTHER DEALINGS IN THE SOFTWARE.
>>    */
> 
> You are changing license of whole file. Have all contributors and
> copyright holders agreed with it?

First I though that you have been syncing the file with the Linux kernel
version. But now I see that its sync'ed with downstream U-Boot most
likely. As for the license of the file: The Linux kernel version has
this SPDX tag:

// SPDX-License-Identifier: (GPL-2.0+ OR MIT)

Changing this to this tag would haven been fine (AFAICT). But using a
diffent one from a downstream U-Boot repository is a bit troublesome
for my taste.

Can't you sync with Linux dts/dtsi files instead at some point?

Thanks,
Stefan

>> -
>>   /dts-v1/;
>>   
>>   #include "armada-372x.dtsi"
>>   
>>   / {
>>   	model = "Marvell Armada 3720 Community Board ESPRESSOBin";
>> -	compatible = "marvell,armada-3720-espressobin", "marvell,armada3720", "marvell,armada3710";
>> +	compatible = "marvell,armada-3720-espressobin",
>> +		     "marvell,armada3720", "marvell,armada3710";
> 
> There is no change on these two lines, right?
> 
>>   
>>   	chosen {
>>   		stdout-path = "serial0:115200n8";
>> @@ -121,6 +84,7 @@
>>   	status = "okay";
>>   };
>>   
>> +/* J1 */
>>   &sdhci0 {
>>   	pinctrl-names = "default";
>>   	pinctrl-0 = <&sdio_pins>;
>> @@ -130,6 +94,25 @@
>>   	status = "okay";
>>   };
>>   
>> +/* U11 */
>> +&sdhci1 {
>> +	non-removable;
>> +	bus-width = <8>;
>> +	mmc-ddr-1_8v;
>> +	mmc-hs400-1_8v;
>> +	marvell,pad-type = "fixed-1-8v";
>> +	pinctrl-names = "default";
>> +	pinctrl-0 = <&mmc_pins>;
>> +	status = "disabled";
>> +
>> +	#address-cells = <1>;
>> +	#size-cells = <0>;
>> +	mmccard: mmccard@0 {
>> +		compatible = "mmc-card";
>> +		reg = <0>;
>> +	};
>> +};
>> +
>>   &spi0 {
>>   	status = "okay";
>>   	pinctrl-names = "default";
>> -- 
>> 2.28.0
>>


Viele Grüße,
Stefan
Andre Heider Sept. 4, 2020, 12:35 p.m. UTC | #10
Hi Stefan,

On 04/09/2020 14:02, Stefan Roese wrote:
> Hi Andre,
> 
> On 31.08.20 09:53, Pali Rohár wrote:
>> On Monday 31 August 2020 05:34:07 Andre Heider wrote:
>>> This adds the disabled eMMC node.
>>>
>>> Signed-off-by: Andre Heider <a.heider@gmail.com>
>>> ---
>>>   arch/arm/dts/armada-3720-espressobin.dts | 63 +++++++++---------------
>>>   1 file changed, 23 insertions(+), 40 deletions(-)
>>>
>>> diff --git a/arch/arm/dts/armada-3720-espressobin.dts 
>>> b/arch/arm/dts/armada-3720-espressobin.dts
>>> index 4534f5ff29..a66ab814eb 100644
>>> --- a/arch/arm/dts/armada-3720-espressobin.dts
>>> +++ b/arch/arm/dts/armada-3720-espressobin.dts
>>> @@ -1,3 +1,4 @@
>>> +// SPDX-License-Identifier: GPL-2.0+
>>>   /*
>>>    * Device Tree file for Marvell Armada 3720 community board
>>>    * (ESPRESSOBin)
>>> @@ -5,53 +6,15 @@
>>>    *
>>>    * Gregory CLEMENT <gregory.clement@free-electrons.com>
>>>    * Konstantin Porotchkin <kostap@marvell.com>
>>> - *
>>> - * This file is dual-licensed: you can use it either under the terms
>>> - * of the GPL or the X11 license, at your option. Note that this dual
>>> - * licensing only applies to this file, and not this project as a
>>> - * whole.
>>> - *
>>> - *  a) This file is free software; you can redistribute it and/or
>>> - *     modify it under the terms of the GNU General Public License as
>>> - *     published by the Free Software Foundation; either version 2 
>>> of the
>>> - *     License, or (at your option) any later version.
>>> - *
>>> - *     This file 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.
>>> - *
>>> - * Or, alternatively
>>> - *
>>> - *  b) Permission is hereby granted, free of charge, to any person
>>> - *     obtaining a copy of this software and associated documentation
>>> - *     files (the "Software"), to deal in the Software without
>>> - *     restriction, including without limitation the rights to use
>>> - *     copy, modify, merge, publish, distribute, sublicense, and/or
>>> - *     sell copies of the Software, and to permit persons to whom the
>>> - *     Software is furnished to do so, subject to the following
>>> - *     conditions:
>>> - *
>>> - *     The above copyright notice and this permission notice shall be
>>> - *     included in all copies or substantial portions of the Software.
>>> - *
>>> - *     THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND
>>> - *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
>>> - *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
>>> - *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
>>> - *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY
>>> - *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
>>> - *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
>>> - *     OTHER DEALINGS IN THE SOFTWARE.
>>>    */
>>
>> You are changing license of whole file. Have all contributors and
>> copyright holders agreed with it?
> 
> First I though that you have been syncing the file with the Linux kernel
> version. But now I see that its sync'ed with downstream U-Boot most
> likely. As for the license of the file: The Linux kernel version has
> this SPDX tag:
> 
> // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> 
> Changing this to this tag would haven been fine (AFAICT). But using a
> diffent one from a downstream U-Boot repository is a bit troublesome
> for my taste.
> 
> Can't you sync with Linux dts/dtsi files instead at some point?

at some point, yes. As far as I understand that's not yet possible due 
to the comphy driver. Quoting Marek's cover letter "[PATCH 
u-boot-marvell 00/11] Armada 37xx: port comphy to generic-phys (PLEASE 
TEST)" from 19th April:

 > I have ported the COMPHY and UTMI PHY drivers from Linux to U-Boot.
 > With this we are able to abandon the current comphy_a3700 driver, which
 > is incompatible with Linux' device trees. So if we want to have DTS
 > files for A3720 boards identical to Linux', we have to do this.

So unfortunately we can't use Linux' dts files for a3700 yet. Marek said 
he plans to work on that set again in the near future, so hopefully that 
lands rather sooner than later ;)

Thanks,
Andre
Stefan Roese Sept. 4, 2020, 12:40 p.m. UTC | #11
Hi Andre,

On 04.09.20 14:35, Andre Heider wrote:

<snip>

>> First I though that you have been syncing the file with the Linux kernel
>> version. But now I see that its sync'ed with downstream U-Boot most
>> likely. As for the license of the file: The Linux kernel version has
>> this SPDX tag:
>>
>> // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
>>
>> Changing this to this tag would haven been fine (AFAICT). But using a
>> diffent one from a downstream U-Boot repository is a bit troublesome
>> for my taste.
>>
>> Can't you sync with Linux dts/dtsi files instead at some point?
> 
> at some point, yes. As far as I understand that's not yet possible due 
> to the comphy driver. Quoting Marek's cover letter "[PATCH 
> u-boot-marvell 00/11] Armada 37xx: port comphy to generic-phys (PLEASE 
> TEST)" from 19th April:
> 
>  > I have ported the COMPHY and UTMI PHY drivers from Linux to U-Boot.
>  > With this we are able to abandon the current comphy_a3700 driver, which
>  > is incompatible with Linux' device trees. So if we want to have DTS
>  > files for A3720 boards identical to Linux', we have to do this.
> 
> So unfortunately we can't use Linux' dts files for a3700 yet. Marek said 
> he plans to work on that set again in the near future, so hopefully that 
> lands rather sooner than later ;)

Ah, thanks. I remember now. ;)

Can you then please drop the sync with the downstream dts and better
only make the necessary changes for eMMC? In a git bisectable way
please?

I know that nobody can test this right now. Perhaps Kostya or somebody
at Marvell be help out here?

Thanks,
Stefan
Andre Heider Sept. 4, 2020, 3:36 p.m. UTC | #12
On 04/09/2020 14:40, Stefan Roese wrote:
> Hi Andre,
> 
> On 04.09.20 14:35, Andre Heider wrote:
> 
> <snip>
> 
>>> First I though that you have been syncing the file with the Linux kernel
>>> version. But now I see that its sync'ed with downstream U-Boot most
>>> likely. As for the license of the file: The Linux kernel version has
>>> this SPDX tag:
>>>
>>> // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
>>>
>>> Changing this to this tag would haven been fine (AFAICT). But using a
>>> diffent one from a downstream U-Boot repository is a bit troublesome
>>> for my taste.
>>>
>>> Can't you sync with Linux dts/dtsi files instead at some point?
>>
>> at some point, yes. As far as I understand that's not yet possible due 
>> to the comphy driver. Quoting Marek's cover letter "[PATCH 
>> u-boot-marvell 00/11] Armada 37xx: port comphy to generic-phys (PLEASE 
>> TEST)" from 19th April:
>>
>>  > I have ported the COMPHY and UTMI PHY drivers from Linux to U-Boot.
>>  > With this we are able to abandon the current comphy_a3700 driver, 
>> which
>>  > is incompatible with Linux' device trees. So if we want to have DTS
>>  > files for A3720 boards identical to Linux', we have to do this.
>>
>> So unfortunately we can't use Linux' dts files for a3700 yet. Marek 
>> said he plans to work on that set again in the near future, so 
>> hopefully that lands rather sooner than later ;)
> 
> Ah, thanks. I remember now. ;)
> 
> Can you then please drop the sync with the downstream dts and better
> only make the necessary changes for eMMC? In a git bisectable way
> please?

Sure, I've just sent v2, completely redone. That also prepares synching 
from Linux, actually already imports two dts from from there.

Regards,
Andre
Pali Rohár Sept. 6, 2020, 9:21 a.m. UTC | #13
On Friday 04 September 2020 17:36:18 Andre Heider wrote:
> On 04/09/2020 14:40, Stefan Roese wrote:
> > Hi Andre,
> > 
> > On 04.09.20 14:35, Andre Heider wrote:
> > 
> > <snip>
> > 
> > > > First I though that you have been syncing the file with the Linux kernel
> > > > version. But now I see that its sync'ed with downstream U-Boot most
> > > > likely. As for the license of the file: The Linux kernel version has
> > > > this SPDX tag:
> > > > 
> > > > // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> > > > 
> > > > Changing this to this tag would haven been fine (AFAICT). But using a
> > > > diffent one from a downstream U-Boot repository is a bit troublesome
> > > > for my taste.
> > > > 
> > > > Can't you sync with Linux dts/dtsi files instead at some point?
> > > 
> > > at some point, yes. As far as I understand that's not yet possible
> > > due to the comphy driver. Quoting Marek's cover letter "[PATCH
> > > u-boot-marvell 00/11] Armada 37xx: port comphy to generic-phys
> > > (PLEASE TEST)" from 19th April:
> > > 
> > >  > I have ported the COMPHY and UTMI PHY drivers from Linux to U-Boot.
> > >  > With this we are able to abandon the current comphy_a3700 driver,
> > > which
> > >  > is incompatible with Linux' device trees. So if we want to have DTS
> > >  > files for A3720 boards identical to Linux', we have to do this.
> > > 
> > > So unfortunately we can't use Linux' dts files for a3700 yet. Marek
> > > said he plans to work on that set again in the near future, so
> > > hopefully that lands rather sooner than later ;)
> > 
> > Ah, thanks. I remember now. ;)
> > 
> > Can you then please drop the sync with the downstream dts and better
> > only make the necessary changes for eMMC? In a git bisectable way
> > please?
> 
> Sure, I've just sent v2, completely redone. That also prepares synching from
> Linux, actually already imports two dts from from there.

So synchronization with Linux DTS files needs to wait until Armada
comphy patches are finished and merged into mainline U-Boot.
Peter Robinson Sept. 6, 2020, 4:03 p.m. UTC | #14
On Fri, Sep 4, 2020 at 1:35 PM Andre Heider <a.heider@gmail.com> wrote:
>
> Hi Stefan,
>
> On 04/09/2020 14:02, Stefan Roese wrote:
> > Hi Andre,
> >
> > On 31.08.20 09:53, Pali Rohár wrote:
> >> On Monday 31 August 2020 05:34:07 Andre Heider wrote:
> >>> This adds the disabled eMMC node.
> >>>
> >>> Signed-off-by: Andre Heider <a.heider@gmail.com>
> >>> ---
> >>>   arch/arm/dts/armada-3720-espressobin.dts | 63 +++++++++---------------
> >>>   1 file changed, 23 insertions(+), 40 deletions(-)
> >>>
> >>> diff --git a/arch/arm/dts/armada-3720-espressobin.dts
> >>> b/arch/arm/dts/armada-3720-espressobin.dts
> >>> index 4534f5ff29..a66ab814eb 100644
> >>> --- a/arch/arm/dts/armada-3720-espressobin.dts
> >>> +++ b/arch/arm/dts/armada-3720-espressobin.dts
> >>> @@ -1,3 +1,4 @@
> >>> +// SPDX-License-Identifier: GPL-2.0+
> >>>   /*
> >>>    * Device Tree file for Marvell Armada 3720 community board
> >>>    * (ESPRESSOBin)
> >>> @@ -5,53 +6,15 @@
> >>>    *
> >>>    * Gregory CLEMENT <gregory.clement@free-electrons.com>
> >>>    * Konstantin Porotchkin <kostap@marvell.com>
> >>> - *
> >>> - * This file is dual-licensed: you can use it either under the terms
> >>> - * of the GPL or the X11 license, at your option. Note that this dual
> >>> - * licensing only applies to this file, and not this project as a
> >>> - * whole.
> >>> - *
> >>> - *  a) This file is free software; you can redistribute it and/or
> >>> - *     modify it under the terms of the GNU General Public License as
> >>> - *     published by the Free Software Foundation; either version 2
> >>> of the
> >>> - *     License, or (at your option) any later version.
> >>> - *
> >>> - *     This file 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.
> >>> - *
> >>> - * Or, alternatively
> >>> - *
> >>> - *  b) Permission is hereby granted, free of charge, to any person
> >>> - *     obtaining a copy of this software and associated documentation
> >>> - *     files (the "Software"), to deal in the Software without
> >>> - *     restriction, including without limitation the rights to use
> >>> - *     copy, modify, merge, publish, distribute, sublicense, and/or
> >>> - *     sell copies of the Software, and to permit persons to whom the
> >>> - *     Software is furnished to do so, subject to the following
> >>> - *     conditions:
> >>> - *
> >>> - *     The above copyright notice and this permission notice shall be
> >>> - *     included in all copies or substantial portions of the Software.
> >>> - *
> >>> - *     THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND
> >>> - *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
> >>> - *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
> >>> - *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
> >>> - *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY
> >>> - *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
> >>> - *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
> >>> - *     OTHER DEALINGS IN THE SOFTWARE.
> >>>    */
> >>
> >> You are changing license of whole file. Have all contributors and
> >> copyright holders agreed with it?
> >
> > First I though that you have been syncing the file with the Linux kernel
> > version. But now I see that its sync'ed with downstream U-Boot most
> > likely. As for the license of the file: The Linux kernel version has
> > this SPDX tag:
> >
> > // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> >
> > Changing this to this tag would haven been fine (AFAICT). But using a
> > diffent one from a downstream U-Boot repository is a bit troublesome
> > for my taste.
> >
> > Can't you sync with Linux dts/dtsi files instead at some point?
>
> at some point, yes. As far as I understand that's not yet possible due
> to the comphy driver. Quoting Marek's cover letter "[PATCH
> u-boot-marvell 00/11] Armada 37xx: port comphy to generic-phys (PLEASE
> TEST)" from 19th April:
>
>  > I have ported the COMPHY and UTMI PHY drivers from Linux to U-Boot.
>  > With this we are able to abandon the current comphy_a3700 driver, which
>  > is incompatible with Linux' device trees. So if we want to have DTS
>  > files for A3720 boards identical to Linux', we have to do this.
>
> So unfortunately we can't use Linux' dts files for a3700 yet. Marek said
> he plans to work on that set again in the near future, so hopefully that
> lands rather sooner than later ;)

The way U-Boot usually deals with this is syncs as much of the Linux
ones as possible and if there's bits not in the Linux one that's
needed to make/keep U-Boot working they add it in a XXX-u-boot.dtsi
file. There's a number of examples in the arch/arm/dts directory.
Pali Rohár Sept. 6, 2020, 4:11 p.m. UTC | #15
On Sunday 06 September 2020 17:03:29 Peter Robinson wrote:
> The way U-Boot usually deals with this is syncs as much of the Linux
> ones as possible and if there's bits not in the Linux one that's
> needed to make/keep U-Boot working they add it in a XXX-u-boot.dtsi
> file. There's a number of examples in the arch/arm/dts directory.

Hello Peter! The main issue is that U-Boot has different comphy driver
as Linux kernel and these two different implementations also needs
different DTS files. Marek is working on patches to replace U-Boot
comphy driver from Linux and then U-Boot will also use comphy DTS
definitions from Linux.

I think it does not make sense to spend time on thinking and
implementing how to semi-synchronize DTS files from kernel as after
comphy U-Boot driver changes, DTS files would be again changed.
diff mbox series

Patch

diff --git a/arch/arm/dts/armada-3720-espressobin.dts b/arch/arm/dts/armada-3720-espressobin.dts
index 4534f5ff29..a66ab814eb 100644
--- a/arch/arm/dts/armada-3720-espressobin.dts
+++ b/arch/arm/dts/armada-3720-espressobin.dts
@@ -1,3 +1,4 @@ 
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Device Tree file for Marvell Armada 3720 community board
  * (ESPRESSOBin)
@@ -5,53 +6,15 @@ 
  *
  * Gregory CLEMENT <gregory.clement@free-electrons.com>
  * Konstantin Porotchkin <kostap@marvell.com>
- *
- * This file is dual-licensed: you can use it either under the terms
- * of the GPL or the X11 license, at your option. Note that this dual
- * licensing only applies to this file, and not this project as a
- * whole.
- *
- *  a) This file is free software; you can redistribute it and/or
- *     modify it under the terms of the GNU General Public License as
- *     published by the Free Software Foundation; either version 2 of the
- *     License, or (at your option) any later version.
- *
- *     This file 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.
- *
- * Or, alternatively
- *
- *  b) Permission is hereby granted, free of charge, to any person
- *     obtaining a copy of this software and associated documentation
- *     files (the "Software"), to deal in the Software without
- *     restriction, including without limitation the rights to use
- *     copy, modify, merge, publish, distribute, sublicense, and/or
- *     sell copies of the Software, and to permit persons to whom the
- *     Software is furnished to do so, subject to the following
- *     conditions:
- *
- *     The above copyright notice and this permission notice shall be
- *     included in all copies or substantial portions of the Software.
- *
- *     THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND
- *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY
- *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- *     OTHER DEALINGS IN THE SOFTWARE.
  */
-
 /dts-v1/;
 
 #include "armada-372x.dtsi"
 
 / {
 	model = "Marvell Armada 3720 Community Board ESPRESSOBin";
-	compatible = "marvell,armada-3720-espressobin", "marvell,armada3720", "marvell,armada3710";
+	compatible = "marvell,armada-3720-espressobin",
+		     "marvell,armada3720", "marvell,armada3710";
 
 	chosen {
 		stdout-path = "serial0:115200n8";
@@ -121,6 +84,7 @@ 
 	status = "okay";
 };
 
+/* J1 */
 &sdhci0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&sdio_pins>;
@@ -130,6 +94,25 @@ 
 	status = "okay";
 };
 
+/* U11 */
+&sdhci1 {
+	non-removable;
+	bus-width = <8>;
+	mmc-ddr-1_8v;
+	mmc-hs400-1_8v;
+	marvell,pad-type = "fixed-1-8v";
+	pinctrl-names = "default";
+	pinctrl-0 = <&mmc_pins>;
+	status = "disabled";
+
+	#address-cells = <1>;
+	#size-cells = <0>;
+	mmccard: mmccard@0 {
+		compatible = "mmc-card";
+		reg = <0>;
+	};
+};
+
 &spi0 {
 	status = "okay";
 	pinctrl-names = "default";