This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Compiler: Modifying the dts for the custom board.

Tool/software: TI C/C++ Compiler

Hi Ti,

   I modified dts file for my custom board requirements under yocto path is

               tisdk/build/arago-tmp-external-arm-toolchain/work/am65xx_evm-linux/linux-ti-staging/4.19.79+gitAUTOINC+77dfab56c6-r0a.arago5.tisdk1.9/git/arch/arm64/boot/dts/ti/k3-am654-base-board.dts

   But it is not taking to compile the dts file on ti AM65x. when i was building the source code by using

               MACHINE=am65xx-evm bitbake arago-base-tisdk-image

   It is not picking up the modified dts and also not compiling the dts file can you please help on this.

Best Regards,

Suman.

  • Hi Suman,

    If you are modified the dts directly in this path : "tisdk/build/arago-tmp-external-arm-toolchain/work/am65xx_evm-linux/linux-ti-staging/4.19.79+gitAUTOINC+77dfab56c6-r0a.arago5.tisdk1.9/git/arch/arm64/boot/dts/ti/k3-am654-base-board.dts", then you can do one of two things.

    1. You can generate a patch and then add the patch to the kernel recipe in meta-ti and then fire the bitbake command as " MACHINE=am65xx-evm bitbake arago-base-tisdk-image", please make sure that you bump the PR to just make sure that the change has taken effect.

    2. You can simply invoke the run.do_compile script that is present in the tisdk/build/arago-tmp-external-arm-toolchain/work/am65xx_evm-linux/linux-ti-staging/4.19.79+gitAUTOINC+77dfab56c6-r0a.arago5.tisdk1.9/temp folder,  So, you can stay in "tisdk/build/arago-tmp-external-arm-toolchain/work/am65xx_evm-linux/linux-ti-staging/4.19.79+gitAUTOINC+77dfab56c6-r0a.arago5.tisdk1.9" directory and then execute "./temp/run.do_compile" and it will generate the dts with your change.

    However, please note that if you want to bitbake and get a tar ball, then I suggest that you choose option #1.

    Regards

    Karthik

  • Hi Karthik,

      Thank you for your response if i want to compile through bitbake command then how to generate this dtb.

      Any other path for modify the dts for am65x it is arm64 bit can you provide your kind information.

    Best Regards,

    Suman

  • Suman,

    I cannot comment on this with this information. Could you please elaborate to describe your changes and the problem?

    Regards

    Karthik

  • Hi Karthik,

      Thank you for your response if i want to compile through bitbake command then how to generate this dtb.

      Any other path for modify the dts for am65x it is arm64 bit can you provide your kind information.

    Best Regards,

    Suman

  • Hi Suman,

    If you want to generate the dts using bitbake, then you have to follow the procedure that is already highlighted in my previous post.

    1. You can generate a patch and then add the patch to the kernel recipe in meta-ti and then fire the bitbake command as " MACHINE=am65xx-evm bitbake arago-base-tisdk-image", please make sure that you bump the PR to just make sure that the change has taken effect.

    The procedure is the same whether it is ARM64 or otherwise.

    Please let me know if you have additional questions.

    Regards

    Karthik

  • Hi Karthik,

    Can you please send me procedure to create a patch to the kernel recipe in meta-ti because i am new to this development .

    Best Regards,

    Suman

  • Hi Karthik,

      My main concern is i need to disable ethernet ports, for that i commented kernel dts and uboot dts but it is not yet all reflecting can you please help me how

      to do it. I commented below code  under             

                 `k3-am654-base-board.dts

     aliases {
                    ethernet1 = &pruss2_emac0;
                    ethernet2 = &pruss2_emac1;
            };

    pruss2_emac0: ethernet-mii0 {
                            phy-handle = <&pruss2_eth0_phy>;
                            phy-mode = "rgmii-rxid";
                            syscon-rgmii-delay = <&scm_conf 0x4120>;
                            iep = <&icssg2_iep0>;
                            /* Filled in by bootloader */
                            local-mac-address = [00 00 00 00 00 00];
                    };

                    pruss2_emac1: ethernet-mii1 {
                            phy-handle = <&pruss2_eth1_phy>;
                            phy-mode = "rgmii-rxid";
                            syscon-rgmii-delay = <&scm_conf 0x4124>;
                            iep = <&icssg2_iep1>;
                            /* Filled in by bootloader */
                            local-mac-address = [00 00 00 00 00 00];
                    };

     /* Dual Ethernet application node on PRU-ICSSG2 */
            pruss2_eth {
                    compatible = "ti,am654-icssg-prueth";
                    pinctrl-names = "default";
                    pinctrl-0 = <&icssg2_rgmii_pins_default>;
                    sram = <&msmc_ram>;
                    interrupt-parent = <&main_udmass_inta>;

                    prus = <&pru2_0>, <&rtu2_0>, <&pru2_1>, <&rtu2_1>;
                    firmware-name = "ti-pruss/am65x-pru0-prueth-fw.elf",
                                    "ti-pruss/am65x-rtu0-prueth-fw.elf",
                                    "ti-pruss/am65x-pru1-prueth-fw.elf",
                                    "ti-pruss/am65x-rtu1-prueth-fw.elf";
                    mii-g-rt = <&icssg2_mii_g_rt>;
                    mii-rt = <&icssg2_mii_rt>;
                    dma-coherent;
                    dmas = <&main_udmap &icssg2 0 UDMA_DIR_TX>, /* egress slice 0 */
                           <&main_udmap &icssg2 1 UDMA_DIR_TX>, /* egress slice 0 */
                           <&main_udmap &icssg2 2 UDMA_DIR_TX>, /* egress slice 0 */
                           <&main_udmap &icssg2 3 UDMA_DIR_TX>, /* egress slice 0 */
                           <&main_udmap &icssg2 4 UDMA_DIR_TX>, /* egress slice 1 */
                           <&main_udmap &icssg2 5 UDMA_DIR_TX>, /* egress slice 1 */
                           <&main_udmap &icssg2 6 UDMA_DIR_TX>, /* egress slice 1 */
                           <&main_udmap &icssg2 7 UDMA_DIR_TX>, /* egress slice 1 */

                           <&main_udmap &icssg2 0 UDMA_DIR_RX>, /* ingress slice 0 *
                           <&main_udmap &icssg2 1 UDMA_DIR_RX>, /* ingress slice 1 */
                           <&main_udmap &icssg2 2 UDMA_DIR_RX>, /* mgmnt rsp slice 0 */
                           <&main_udmap &icssg2 3 UDMA_DIR_RX>; /* mgmnt rsp slice 1 */
                    dma-names = "tx0-0", "tx0-1", "tx0-2", "tx0-3",
                                "tx1-0", "tx1-1", "tx1-2", "tx1-3",
                                "rx0", "rx1",
                                "rxmgm0", "rxmgm1";

    pruss2_emac0: ethernet-mii0 {
                            phy-handle = <&pruss2_eth0_phy>;
                            phy-mode = "rgmii-rxid";
                            syscon-rgmii-delay = <&scm_conf 0x4120>;
                            iep = <&icssg2_iep0>;
                            /* Filled in by bootloader */
                            local-mac-address = [00 00 00 00 00 00];
                    };

                    pruss2_emac1: ethernet-mii1 {
                            phy-handle = <&pruss2_eth1_phy>;
                            phy-mode = "rgmii-rxid";
                            syscon-rgmii-delay = <&scm_conf 0x4124>;
                            iep = <&icssg2_iep1>;
                            /* Filled in by bootloader */
                            local-mac-address = [00 00 00 00 00 00];
                    };
            };


    and also commented under k3-am65-main.dtsi

     icssg_soc_bus0: pruss-soc-bus@b026004 {
                    compatible = "ti,am654-icssg-soc-bus";
                    reg = <0x00 0x0b026004 0x00 0x4>;
                    power-domains = <&k3_pds 62 TI_SCI_PD_EXCLUSIVE>;
                    #address-cells = <1>;
                    #size-cells = <1>;
                    ranges = <0x0b000000 0x00 0x0b000000 0x100000>;
                    dma-ranges;

                    icssg0: icssg@b000000 {
                            compatible = "ti,am654-icssg";
                            reg = <0xb000000 0x80000>;
                            interrupts = <GIC_SPI 254 IRQ_TYPE_LEVEL_HIGH>,
                                         <GIC_SPI 255 IRQ_TYPE_LEVEL_HIGH>,
                                         <GIC_SPI 256 IRQ_TYPE_LEVEL_HIGH>,
                                         <GIC_SPI 257 IRQ_TYPE_LEVEL_HIGH>,
                                         <GIC_SPI 258 IRQ_TYPE_LEVEL_HIGH>,
                                         <GIC_SPI 259 IRQ_TYPE_LEVEL_HIGH>,
                                         <GIC_SPI 260 IRQ_TYPE_LEVEL_HIGH>,
                                         <GIC_SPI 261 IRQ_TYPE_LEVEL_HIGH>;
                            interrupt-names = "host2", "host3", "host4",
                                              "host5", "host6", "host7",
                                              "host8", "host9";
                            #address-cells = <1>;
                            #size-cells = <1>;
                            ranges;
                            dma-ranges;

                            ti,psil-base = <0x4100>;        /* ICSSG0 PSIL thread start */
                            ti,psil-config0 {
                                    linux,udma-mode = <UDMA_PKT_MODE>;
                                    statictr-type = <PSIL_STATIC_TR_NONE>;
                                    ti,needs-epib;
                                    ti,psd-size = <16>;
                            };

                            ti,psil-config1 {
                                    linux,udma-mode = <UDMA_PKT_MODE>;
                                    statictr-type = <PSIL_STATIC_TR_NONE>;
                                    ti,needs-epib;
                                    ti,psd-size = <16>;
                            };

                            ti,psil-config2 {
                                    linux,udma-mode = <UDMA_PKT_MODE>;
           statictr-type = <PSIL_STATIC_TR_NONE>;
                                    ti,needs-epib;
                                    ti,psd-size = <16>;
                            };

                            ti,psil-config3 {
                                    linux,udma-mode = <UDMA_PKT_MODE>;
                                    statictr-type = <PSIL_STATIC_TR_NONE>;
                                    ti,needs-epib;
                                    ti,psd-size = <16>;
                            };

                            ti,psil-config4 {
                                    linux,udma-mode = <UDMA_PKT_MODE>;
                                    statictr-type = <PSIL_STATIC_TR_NONE>;
                                    ti,needs-epib;
                                    ti,psd-size = <16>;
                            };

                            ti,psil-config5 {
                                    linux,udma-mode = <UDMA_PKT_MODE>;
                                    statictr-type = <PSIL_STATIC_TR_NONE>;
                                    ti,needs-epib;
                                    ti,psd-size = <16>;
                            };

                            ti,psil-config6 {
                                    linux,udma-mode = <UDMA_PKT_MODE>;
                                    statictr-type = <PSIL_STATIC_TR_NONE>;
                                    ti,needs-epib;
                                    ti,psd-size = <16>;
                            };

                            ti,psil-config7 {
                                    linux,udma-mode = <UDMA_PKT_MODE>;
                                    statictr-type = <PSIL_STATIC_TR_NONE>;
                                    ti,needs-epib;
                                    ti,psd-size = <16>;
                            };

                            icssg0_mem: memories@b000000 {
                                    reg = <0xb000000 0x2000>,
                                          <0xb002000 0x2000>,
                                          <0xb010000 0x10000>;
                                    reg-names = "dram0", "dram1",
                        "shrdram2";
                            };

                            icssg0_cfg: cfg@b026000 {
                                    compatible = "syscon";
                                    reg = <0xb026000 0x200>;
                            };

                            icssg0_coreclk_mux: coreclk_mux {
                                    #clock-cells = <0>;
                                    clocks = <&k3_clks 62 19>, /* icssg0_core_clk */
                                             <&k3_clks 62 3>;  /* icssg0_iclk */
                                    assigned-clocks = <&icssg0_coreclk_mux>;
                                    assigned-clock-parents = <&k3_clks 62 3>;
                            };

                            icssg0_iepclk_mux: iepclk_mux {
                                    #clock-cells = <0>;
                                    clocks = <&k3_clks 62 10>,      /* icssg0_iep_clk */
                                             <&icssg0_coreclk_mux>; /* core_clk */
                                    assigned-clocks = <&icssg0_iepclk_mux>;
                                    assigned-clock-parents = <&icssg0_coreclk_mux>;
                            };

                            icssg0_iep0: iep@b02e000 {
                                    compatible = "syscon";
                                    reg = <0xb02e000 0x1000>;
                                    clocks = <&icssg0_iepclk_mux>;
                            };

                            icssg0_iep1: iep@b02f000 {
                                    compatible = "syscon";
                                    reg = <0xb02f000 0x1000>;
                                    clocks = <&icssg0_iepclk_mux>;
                            };

                            icssg0_mii_rt: mii-rt@b032000 {
                                    compatible = "syscon";
                                    reg = <0xb032000 0x100>;
                            };
                            icssg0_intc: interrupt-controller@b020000 {
                                    compatible = "ti,am654-icssg-intc";
                                    reg = <0xb020000 0x2000>;
                                    interrupt-controller;
                                    #interrupt-cells = <1>;
                            };

                            pru0_0: pru@b034000 {
                                    compatible = "ti,am654-pru";
                                    reg = <0xb034000 0x4000>,
                                          <0xb022000 0x100>,
                                          <0xb022400 0x100>;
                                    reg-names = "iram", "control", "debug";
                                    firmware-name = "am65x-pru0_0-fw";
                                    interrupt-parent = <&icssg0_intc>;
                                    interrupts = <16>, <17>;
                                    interrupt-names = "vring", "kick";
                            };

                            rtu0_0: rtu@b004000 {
                                    compatible = "ti,am654-rtu";
                                    reg = <0xb004000 0x2000>,
                                          <0xb023000 0x100>,
                                          <0xb023400 0x100>;
                                    reg-names = "iram", "control", "debug";
                                    firmware-name = "am65x-rtu0_0-fw";
                                    interrupt-parent = <&icssg0_intc>;
                                    interrupts = <20>, <21>;
                                    interrupt-names = "vring", "kick";
                            };

                            pru0_1: pru@b038000 {
                                    compatible = "ti,am654-pru";
                                    reg = <0xb038000 0x4000>,
                                          <0xb024000 0x100>,
                                          <0xb024400 0x100>;
                                    reg-names = "iram", "control", "debug";
                                    firmware-name = "am65x-pru0_1-fw";
                                    interrupt-parent = <&icssg0_intc>;
                                    interrupts = <18>, <19>;
                                    interrupt-names = "vring", "kick";
                            };

                            rtu0_1: rtu@b006000 {
     compatible = "ti,am654-rtu";
                                    reg = <0xb006000 0x2000>,
                                          <0xb023800 0x100>,
                                          <0xb023c00 0x100>;
                                    reg-names = "iram", "control", "debug";
                                    firmware-name = "am65x-rtu0_1-fw";
                                    interrupt-parent = <&icssg0_intc>;
                                    interrupts = <22>, <23>;
                                    interrupt-names = "vring", "kick";
                            };

                            icssg0_mdio: mdio@b032400 {
                                    compatible = "ti,davinci_mdio";
                                    reg = <0xb032400 0x100>;
                                    clocks = <&k3_clks 62 3>;
                                    clock-names = "fck";
                                    #address-cells = <1>;
                                    #size-cells = <0>;
                                    bus_freq = <1000000>;
                                    status = "disabled";
                            };
                    };
            };





    Still it is working can you please help actually i am copying the .dtb file into sdcard.

    Best Regards,

    Suman.

  • Hi Suman,

    Just a thought - if your intention is to do some rapid kernel and u-boot development and then try to create your working patches, then why don't you try the kernel and u-boot sources in the installer directory present under $INSTALL_DIR/board-support?

    You can quickly compile the kernel and u-boot using "make linux" and "make u-boot" respectively, from the $INSTALL_DIR.

    With this, you can get a quick validation and then you can proceed to use option #1 or #2 stated above.

    Regards

    Karthik

  • Hi Karthik,

       When i do

         make u-boot  i am getting

    Text Base (SYS_TEXT_BASE) [] (NEW)
    Text Base (SYS_TEXT_BASE) [] (NEW)
    Text Base (SYS_TEXT_BASE) [] (NEW)
    Text Base (SYS_TEXT_BASE) [] (NEW)
    Text Base (SYS_TEXT_BASE) [] (NEW)
    Text Base (SYS_TEXT_BASE) [] (NEW)
    Text Base (SYS_TEXT_BASE) [] (NEW)
    Text Base (SYS_TEXT_BASE) [] (NEW)
    Text Base (SYS_TEXT_BASE) [] (NEW)
    Text Base (SYS_TEXT_BASE) [] (NEW)
    Text Base (SYS_TEXT_BASE) [] (NEW)
    Text Base (SYS_TEXT_BASE) [] (NEW)
    Text Base (SYS_TEXT_BASE) [] (NEW)
    Text Base (SYS_TEXT_BASE) [] (NEW)
    Text Base (SYS_TEXT_BASE) [] (NEW)
    Text Base (SYS_TEXT_BASE) [] (NEW)
    Text Base (SYS_TEXT_BASE) [] (NEW)
    Text Base (SYS_TEXT_BASE) [] (NEW)
    Text Base (SYS_TEXT_BASE) [] (NEW)

    Best Regards,

    Suman.

  • Hi Karthik,

        Customized images which i need to copy sdcard can you please let me know this.

    Best Regards,

    Suman.

  • Hi Suman,

    -1-

    I do not understand this point. Could you please elaborate on what you did and how you end up with this output? Please elaborate for clear description of the issue.

    Text Base (SYS_TEXT_BASE) [] (NEW)

    -2-

        "Customized images which i need to copy sdcard can you please let me know this."

    Does this mean that you are able to build everything successfully and you have overcome the first issue with "Text Base..."?

    Regards

    Karthik