From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8A103C433F5 for ; Wed, 27 Oct 2021 11:58:26 +0000 (UTC) Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B018060F70 for ; Wed, 27 Oct 2021 11:58:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org B018060F70 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=etri.re.kr Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kernelnewbies.org Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.94.2) (envelope-from ) id 1mfhZ0-0007Lm-Gk; Wed, 27 Oct 2021 07:57:50 -0400 Received: from mscreen.etri.re.kr ([129.254.9.16]) by shelob.surriel.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA (Exim 4.94.2) (envelope-from ) id 1mfhYx-0007LY-Ps for kernelnewbies@kernelnewbies.org; Wed, 27 Oct 2021 07:57:48 -0400 Received: from unknown (HELO send001-relay.gov-dooray.com) (211.180.235.152) by 129.254.9.16 with ESMTP; 27 Oct 2021 20:57:40 +0900 X-Original-SENDERIP: 211.180.235.152 X-Original-MAILFROM: ckim@etri.re.kr X-Original-RCPTTO: kernelnewbies@kernelnewbies.org Received: from [10.162.225.106] (HELO smtp001-imp.gov-dooray.com) ([10.162.225.106]) by send001-relay.gov-dooray.com with SMTP id 0c3540f761793eb4; Wed, 27 Oct 2021 20:57:40 +0900 DKIM-Signature: a=rsa-sha256; b=gNE+kRpE3zdjdYqmNb5wnvjGEfHMyhodj0WEOUwoj4MxUsFiDDPAjNcs3UquEN5NAaoI4zYlzn nOlILQEQkLHo4KWvgTwyfh4wfqrhPJOYMLQiLXaIlfS8eiZGm8AAEaTnVd3borznqE2J1V6l8iXW oJ9evCKnmmH3F1GdM9p/L8gpc5qRRv5Cp+CueZ0UvzBfpJ1WiENGTj8Q4KxHRauI7jwmqFjLIUJX f42qKEacGbZtPh6Lm2Cmykgn1qd/X+ZN/WwBteR+/C4g2rwfk5QE+PjcQI5DD07MnD88KlVz5v3O vLZFvwp5hEB6hVxblhlsrvmmKGOZlsnzWA6MrwzA==; c=relaxed/relaxed; s=selector; d=dooray.com; v=1; bh=OkNGPuAwIl4dmrmUtrB8fTGJHMd6mCY6ayXYi+q+hWE=; h=From:To:Subject:Message-ID; Received: from [129.254.132.39] (HELO CHANKIMPC) ([129.254.132.39]) by smtp001-imp.gov-dooray.com with SMTP id dcca7a7c61793eb4; Wed, 27 Oct 2021 20:57:40 +0900 From: "Chan Kim" To: References: <00c301d7cb17$4afb52b0$e0f1f810$@etri.re.kr> In-Reply-To: <00c301d7cb17$4afb52b0$e0f1f810$@etri.re.kr> Subject: RE: DTC compile error (simple-bus unit address format error for #address-cells = <2> case) Date: Wed, 27 Oct 2021 20:57:39 +0900 Message-ID: <00e701d7cb29$d74092f0$85c1b8d0$@etri.re.kr> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Content-Language: ko Thread-Index: AQFyXoFfD9nxkjLizuJBOzFsqiFxJ6yxlReg X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============6897083770545376086==" Errors-To: kernelnewbies-bounces@kernelnewbies.org This is a multipart message in MIME format. --===============6897083770545376086== Content-Type: multipart/alternative; boundary="----=_NextPart_000_00E8_01D7CB75.47294C60" Content-Language: ko This is a multipart message in MIME format. ------=_NextPart_000_00E8_01D7CB75.47294C60 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi, I've found how to do it. For you should add CONFIG_ARCH_VEXPRESS and ran 'make V=1 ARCH=arm64 CROSS_COMPILE=aarch64-none-elf- dtbs |& tee logx' Dtbs for ARCH_VEXPRESS are generated in the dts directory. Then you can see the command to make the dtb (in the logx file). Below is the command. Lots of options for the dtc. mkdir -p arch/arm64/boot/dts/arm/ ; gcc -E -Wp,-MD,arch/arm64/boot/dts/arm/.fvp-base-revc.dtb.d.pre.tmp -nostdinc -I./scripts/dtc/include-prefixes -undef -D__DTS__ -x assembler-with-cpp -o arch/arm64/boot/dts/arm/.fvp-base-revc.dtb.dts.tmp arch/arm64/boot/dts/arm/fvp-base-revc.dts ; ./scripts/dtc/dtc -O dtb -o arch/arm64/boot/dts/arm/fvp-base-revc.dtb -b 0 -iarch/arm64/boot/dts/arm/ -i./scripts/dtc/include-prefixes -Wno-unit_address_vs_reg -Wno-unit_address_format -Wno-avoid_unnecessary_addr_size -Wno-alias_paths -Wno-graph_child_address -Wno-simple_bus_reg -Wno-unique_unit_address -Wno-pci_device_reg -d arch/arm64/boot/dts/arm/.fvp-base-revc.dtb.d.dtc.tmp arch/arm64/boot/dts/arm/.fvp-base-revc.dtb.dts.tmp ; cat arch/arm64/boot/dts/arm/.fvp-base-revc.dtb.d.pre.tmp arch/arm64/boot/dts/arm/.fvp-base-revc.dtb.d.dtc.tmp > arch/arm64/boot/dts/arm/.fvp-base-revc.dtb.d Thanks! Chan Kim From: Chan Kim Sent: Wednesday, October 27, 2021 6:45 PM To: kernelnewbies@kernelnewbies.org Subject: DTC compile error (simple-bus unit address format error for #address-cells = <2> case) Hello all, Below is a part of arch/arm64/boot/dts/arm/rtsm_ve-motherboard.dtsi in linux kernel. This file is included by arch/arm64/boot/dts/arm/fvp-base-revc.dts. / { smb@8000000 { motherboard { arm,v2m-memory-map = "rs1"; compatible = "arm,vexpress,v2m-p1", "simple-bus"; #address-cells = <2>; /* SMB chipselect number and offset */ #size-cells = <1>; #interrupt-cells = <1>; ranges; flash@0,00000000 { compatible = "arm,vexpress-flash", "cfi-flash"; reg = <0 0x00000000 0x04000000>, <4 0x00000000 0x04000000>; bank-width = <4>; }; ethernet@2,02000000 { compatible = "smsc,lan91c111"; reg = <2 0x02000000 0x10000>; interrupts = <15>; }; When I compile the fvp-base-revc.dts file (following this method to handle pre-processing : https://stackoverflow.com/questions/50658326/device-tree-compiler-not-recogn izes-c-syntax-for-include-files), it gives me error below. arch/arm64/boot/dts/arm/rtsm_ve-motherboard.dtsi:20.21-25.6: Warning (simple_bus_reg): /smb@8000000/motherboard/flash@0,00000000: simple-bus unit address format error, expected "0" arch/arm64/boot/dts/arm/rtsm_ve-motherboard.dtsi:27.24-31.6: Warning (simple_bus_reg): /smb@8000000/motherboard/ethernet@2,02000000: simple-bus unit address format error, expected "202000000" The dtc is complaining about the address format `flash@0,00000000` or `ethernet@2,02000000`. But because the #address-cells = <2>, the node address should be given by chip select number and the offset (inside the chip select). How can I prevent this error? DTC version is 1.5.0. Any help will be appreciated. Thank you! Chan Kim ------=_NextPart_000_00E8_01D7CB75.47294C60 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi,

I’ve found how to do = it.

For you = should add CONFIG_ARCH_VEXPRESS and ran ‘make V=3D1 ARCH=3Darm64 = CROSS_COMPILE=3Daarch64-none-elf- dtbs |& tee = logx’

Dtbs for ARCH_VEXPRESS are generated in the dts directory. = Then you can see the command to make the dtb (in the logx file). =

Below is = the command. Lots of options for the dtc.

 

mkdir -p arch/arm64/boot/dts/arm/ ; = gcc -E -Wp,-MD,arch/arm64/boot/dts/arm/.fvp-base-revc.dtb.d.pre.tmp = -nostdinc -I./scripts/dtc/include-prefixes -undef -D__DTS__ -x = assembler-with-cpp -o arch/arm64/boot/dts/arm/.fvp-base-revc.dtb.dts.tmp = arch/arm64/boot/dts/arm/fvp-base-revc.dts ; ./scripts/dtc/dtc -O dtb -o = arch/arm64/boot/dts/arm/fvp-base-revc.dtb -b 0 = -iarch/arm64/boot/dts/arm/ -i./scripts/dtc/include-prefixes = -Wno-unit_address_vs_reg -Wno-unit_address_format = -Wno-avoid_unnecessary_addr_size -Wno-alias_paths = -Wno-graph_child_address -Wno-simple_bus_reg -Wno-unique_unit_address = -Wno-pci_device_reg  -d = arch/arm64/boot/dts/arm/.fvp-base-revc.dtb.d.dtc.tmp = arch/arm64/boot/dts/arm/.fvp-base-revc.dtb.dts.tmp ; cat = arch/arm64/boot/dts/arm/.fvp-base-revc.dtb.d.pre.tmp = arch/arm64/boot/dts/arm/.fvp-base-revc.dtb.d.dtc.tmp > = arch/arm64/boot/dts/arm/.fvp-base-revc.dtb.d

 

Thanks!

Chan Kim

 

From:<= /b> Chan Kim = <ckim@etri.re.kr>
Sent: Wednesday, October 27, 2021 = 6:45 PM
To: kernelnewbies@kernelnewbies.org
Subject: = DTC compile error (simple-bus unit address format error for = #address-cells =3D <2> case)

 

Hello all,

Below is a part of = arch/arm64/boot/dts/arm/rtsm_ve-motherboard.dtsi in linux kernel. This = file is included by = arch/arm64/boot/dts/arm/fvp-base-revc.dts.    =

 

/ {

    smb@8000000 {

        motherboard = {

          =   arm,v2m-memory-map =3D "rs1";

          =   compatible =3D "arm,vexpress,v2m-p1", = "simple-bus";

          =   #address-cells =3D <2>; /* SMB chipselect number and offset = */

          =   #size-cells =3D <1>;

          =   #interrupt-cells =3D <1>;

          =   ranges;

 

          =   flash@0,00000000 {

          =       compatible =3D = "arm,vexpress-flash", = "cfi-flash";

          =       reg =3D <0 0x00000000 = 0x04000000>,

          =             <4 = 0x00000000 0x04000000>;

          =       bank-width =3D = <4>;

          =   };

 

          =   ethernet@2,02000000 {

          =       compatible =3D = "smsc,lan91c111";

          =       reg =3D <2 0x02000000 = 0x10000>;

          =       interrupts =3D = <15>;

          =   };

 

When I compile the fvp-base-revc.dts file =

(following = this method to handle pre-processing : https://stackoverflow.com/que= stions/50658326/device-tree-compiler-not-recognizes-c-syntax-for-include-= files), it gives me error below.

 

arch/arm64/boot/dts/arm/rtsm_ve-motherboard.dtsi:20.21-25.6:= Warning (simple_bus_reg): /smb@8000000/motherboard/flash@0,00000000: = simple-bus unit address format error, expected = "0"

arch/arm64/boot/dts/arm/rtsm_ve-motherboard.dtsi:27.24-31.6:= Warning (simple_bus_reg): /smb@8000000/motherboard/ethernet@2,02000000: = simple-bus unit address format error, expected = "202000000"

 

The dtc is complaining about the address format = `flash@0,00000000` or `ethernet@2,02000000`.

But because the #address-cells =3D = <2>, the node address should be given by chip select number and = the offset (inside the chip select).

How can I prevent this error? DTC = version is 1.5.0.

 

Any help will be appreciated.

Thank you!

Chan Kim

 

------=_NextPart_000_00E8_01D7CB75.47294C60-- --===============6897083770545376086== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies --===============6897083770545376086==--