[PATCH u-boot] aspeed/g5: Device Tree for ast2500

Cédric Le Goater clg at kaod.org
Fri Oct 14 00:10:48 AEDT 2016


Hello Maxim,

On 10/13/2016 09:12 AM, Cédric Le Goater wrote:
> On 10/13/2016 07:24 AM, Joel Stanley wrote:
>> On Tue, Oct 11, 2016 at 3:38 AM,  <maxims at google.com> wrote:
>>> From: Maxim Sloyko <maxims at google.com>
>>>
>>> Device Tree for ast2500, copied from openbmc/linux (include file), plus
>>> minimal device tree configuration for ast2500 eval board.
>>>
>>> Signed-off-by: Maxim Sloyko <maxims at google.com>
>>> ---
>>>  arch/arm/dts/Makefile          |   2 +
>>>  arch/arm/dts/aspeed-g5-evb.dts |  28 +++
>>>  arch/arm/dts/aspeed-g5.dtsi    | 541 +++++++++++++++++++++++++++++++++++++++++
>>>  3 files changed, 571 insertions(+)
>>>  create mode 100644 arch/arm/dts/aspeed-g5-evb.dts
>>
>> Use the same name as the kernel device tree.
>>
>>>  create mode 100644 arch/arm/dts/aspeed-g5.dtsi
>>>
>>> diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
>>> index d1f8e22..09efa0a 100644
>>> --- a/arch/arm/dts/Makefile
>>> +++ b/arch/arm/dts/Makefile
>>> @@ -233,6 +233,8 @@ dtb-$(CONFIG_SOC_KEYSTONE) += k2hk-evm.dtb \
>>>         k2e-evm.dtb \
>>>         k2g-evm.dtb
>>>
>>> +dtb-$(CONFIG_TARGET_AST_G5) += aspeed-g5-evb.dtb
>>> +
>>>  targets += $(dtb-y)
>>>
>>>  # Add any required device tree compiler flags here
>>> diff --git a/arch/arm/dts/aspeed-g5-evb.dts b/arch/arm/dts/aspeed-g5-evb.dts
>>> new file mode 100644
>>> index 0000000..95dc77a
>>> --- /dev/null
>>> +++ b/arch/arm/dts/aspeed-g5-evb.dts
>>
>> This doesn't include the rest of the devices present in the kernel
>> device tree. Is there a reason why you didn't include them?
>>
>>> @@ -0,0 +1,28 @@
>>> +/dts-v1/;
>>> +
>>> +#include "aspeed-g5.dtsi"
>>> +
>>> +/ {
>>> +       memory {
>>> +               device_type = "memory";
>>> +               reg = <0x80000000 0x20000000>;
>>> +       };
>>> +
>>> +       aliases {
>>> +               i2c1 = &i2c0;
>>> +               i2c4 = &i2c3;
>>> +               i2c8 = &i2c7;
>>
>> Why are you doing this?
>>
>>> +       };
>>> +};
>>> +
>>> +&i2c0 {
>>> +       status = "okay";
>>> +};
>>> +
>>> +&i2c3 {
>>> +       status = "okay";
>>> +};
>>> +
>>> +&i2c7 {
>>> +       status = "okay";
>>> +};
>>> diff --git a/arch/arm/dts/aspeed-g5.dtsi b/arch/arm/dts/aspeed-g5.dtsi
>>> new file mode 100644
>>> index 0000000..eb81a2e
>>> --- /dev/null
>>> +++ b/arch/arm/dts/aspeed-g5.dtsi
>>> @@ -0,0 +1,541 @@
>>> +/* The device tree is copied from
>>> + * https://github.com/openbmc/linux/blob/9ec9d09/arch/arm/boot/dts/aspeed-g5.dtsi
>>
>> Please update this with the latest from the dev-4.7 tree.
> 
> May be we should include the flash controllers first in the kernel,
> we will need that in u-boot as well for a spi-nor driver.

Here is my updated tree with a lot of cleanups and various 
small fixes :

	https://github.com/legoater/u-boot/commits/v2016.11-aspeed-openbmc

These are required before sending mainline, last remaining 
hack being : 

	https://github.com/legoater/u-boot/commit/50812645a37b067a7346a924da3e9e0bc1d29eb9

The network driver are not strictly needed for mainline but 
we need to do something for the flash driver soon. This is 
very very custom today. So I added the Linux dts as we could 
use them for a spi-nor driver in U-boot. 

The dtb just needs to be in the flash image. For that you can 
use the linux compiled one and dd it at the end of the u-boot 
partition at 0x20050000 and start hacking.

Cheers,

C. 



More information about the openbmc mailing list