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.

Linux/AM5718: McSPI device tree settings

Part Number: AM5718
Other Parts Discussed in Thread: SN65HVS882, TMDXIDK5718, TPS51200, TPIC2810, TPD12S015, TPD12S016, ADC102S051

Tool/software: Linux

Hi

I have a custom AM5718 board having 4 MCSPIs connected to ARINC , MIL, ADC and DAC respectively.

The dts file I am modifying for these is Linux_Source/arch/arch/boot/dts/am57xx-idk-common.dtsi.I have added nodes for MCSPI1,2 and 4.But there is a node for MCSPI3 already present in the file.If I am replacing the existing one with the custom MCSPI3 node ,while building Kernel it throws following error.

Error: arch/arm/boot/dts/am572x-idk-common.dtsi:103.1-12 Label or path sn65hvs882 not found
FATAL ERROR: Syntax error parsing input tree
scripts/Makefile.lib:317: recipe for target 'arch/arm/boot/dts/am574x-idk.dtb' failed
make[1]: *** [arch/arm/boot/dts/am574x-idk.dtb] Error 1
arch/arm/Makefile:353: recipe for target 'dtbs' failed
make: *** [dtbs] Error 2

How can I add the custom node for MCSPI3 for ADC replacing the current one?

Thanks and Regards...

Arpita Jena

  • Hi Arpita,

    Do you use AM57x PSDK Linux? If yes, which version (latest is 5.03)?

    If you base your AM571x custom board on AM571x IDK board TMDXIDK5718, then am572x-idk-common.dtsi file should not be used. You need to use:

    am571x-idk.dts

    am571x-idk-common.dtsi

    am57xx-idk-common.dtsi

    Please provide me:

    - your exact command to build your DTB file

    - your am571x-idk.dts, am571x-idk-common.dtsi and am57xx-idk-common.dtsi files

    Regards,
    Pavel

  • Hi Pavel,

    The coomand I use to build kernel :

    sudo CROSS_COMPILE=/CROSS_COMPILER/gcc-linaro-6.2.1-2016.11-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- ARCH=arm make

    PSDK Version : ti-processor-sdk-linux-am57xx-evm-05.01.00.11
    Linux Version : linux-4.14.67+gitAUTOINC+d315a9bb00-gd315a9bb00 
    Thanks and Regards...

    Arpita Jena

  • Arpita Jena said:

    The coomand I use to build kernel :

    sudo CROSS_COMPILE=/CROSS_COMPILER/gcc-linaro-6.2.1-2016.11-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- ARCH=arm make

    For proper steps of building kernel and then DTB file, refer to the below user guide:

    Regards,
    Pavel

  • Hi Pavel,

    As I am getting some errors while uploading the files, I'm copying the files as text here.

    /************************************************************************************************************************************************************************/

    /*------------------------------------------------am57xx-idk-common.dtsi----------------------------------------*/

    /*
    * Copyright (C) 2015-2016 Texas Instruments Incorporated - http://www.ti.com/
    *
    * 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 "am57xx-industrial-grade.dtsi"

    / {
    aliases {
    rtc0 = &tps659038_rtc;
    rtc1 = &rtc;
    display0 = &hdmi0;
    ethernet2 = &pruss2_emac0;
    ethernet3 = &pruss2_emac1;
    // mcspi1 = &mcspi3;
    /*Add SPI related aliases*/
    };

    chosen {
    stdout-path = &uart3;
    };

    vmain: fixedregulator-vmain {
    compatible = "regulator-fixed";
    regulator-name = "VMAIN";
    regulator-min-microvolt = <5000000>;
    regulator-max-microvolt = <5000000>;
    regulator-always-on;
    regulator-boot-on;
    };

    v3_3d: fixedregulator-v3_3d {
    compatible = "regulator-fixed";
    regulator-name = "V3_3D";
    vin-supply = <&smps9_reg>;
    regulator-min-microvolt = <3300000>;
    regulator-max-microvolt = <3300000>;
    regulator-always-on;
    regulator-boot-on;
    };

    vtt_fixed: fixedregulator-vtt {
    /* TPS51200 */
    compatible = "regulator-fixed";
    regulator-name = "vtt_fixed";
    vin-supply = <&v3_3d>;
    regulator-min-microvolt = <3300000>;
    regulator-max-microvolt = <3300000>;
    regulator-always-on;
    regulator-boot-on;
    };

    src_clk_x1: src_clk_x1 {
    #clock-cells = <0>;
    compatible = "fixed-clock";
    clock-frequency = <20000000>;
    };

    leds-iio {
    status = "disabled";
    compatible = "gpio-leds";
    led-out0 {
    label = "out0";
    gpios = <&tpic2810 0 GPIO_ACTIVE_HIGH>;
    default-state = "off";
    };

    led-out1 {
    label = "out1";
    gpios = <&tpic2810 1 GPIO_ACTIVE_HIGH>;
    default-state = "off";
    };

    led-out2 {
    label = "out2";
    gpios = <&tpic2810 2 GPIO_ACTIVE_HIGH>;
    default-state = "off";
    };

    led-out3 {
    label = "out3";
    gpios = <&tpic2810 3 GPIO_ACTIVE_HIGH>;
    default-state = "off";
    };

    led-out4 {
    label = "out4";
    gpios = <&tpic2810 4 GPIO_ACTIVE_HIGH>;
    default-state = "off";
    };

    led-out5 {
    label = "out5";
    gpios = <&tpic2810 5 GPIO_ACTIVE_HIGH>;
    default-state = "off";
    };

    led-out6 {
    label = "out6";
    gpios = <&tpic2810 6 GPIO_ACTIVE_HIGH>;
    default-state = "off";
    };

    led-out7 {
    label = "out7";
    gpios = <&tpic2810 7 GPIO_ACTIVE_HIGH>;
    default-state = "off";
    };
    };

    hdmi0: connector@0 {
    compatible = "hdmi-connector";
    label = "hdmi";

    type = "a";

    port {
    hdmi_connector_in: endpoint {
    remote-endpoint = <&tpd12s015_out>;
    };
    };
    };

    tpd12s015: encoder@0 {
    compatible = "ti,tpd12s016", "ti,tpd12s015";

    gpios = <0>, /* optional CT_CP_HPD */
    <0>, /* optional LS_OE */
    <&gpio7 12 GPIO_ACTIVE_HIGH>; /* HPD */

    ports {
    #address-cells = <1>;
    #size-cells = <0>;

    port@0 {
    reg = <0>;

    tpd12s015_in: endpoint@0 {
    remote-endpoint = <&hdmi_out>;
    };
    };

    port@1 {
    reg = <1>;

    tpd12s015_out: endpoint@0 {
    remote-endpoint = <&hdmi_connector_in>;
    };
    };
    };
    };

    src_clk_x1: src_clk_x1 {
    #clock-cells = <0>;
    compatible = "fixed-clock";
    clock-frequency = <20000000>;
    };

    /* Dual-MAC Ethernet application node on PRU-ICSS2 */
    pruss2_eth: pruss2_eth {
    compatible = "ti,am57-prueth";
    prus = <&pru2_0>, <&pru2_1>;
    firmware-name = "ti-pruss/am57xx-pru0-prueth-fw.elf",
    "ti-pruss/am57xx-pru1-prueth-fw.elf";
    sram = <&ocmcram1>;
    interrupt-parent = <&pruss2_intc>;

    pruss2_emac0: ethernet-mii0 {
    phy-handle = <&pruss2_eth0_phy>;
    phy-mode = "mii";
    interrupts = <20>, <22>, <23>;
    interrupt-names = "rx", "tx", "ptp_tx";
    /* Filled in by bootloader */
    local-mac-address = [00 00 00 00 00 00];
    };

    pruss2_emac1: ethernet-mii1 {
    phy-handle = <&pruss2_eth1_phy>;
    phy-mode = "mii";
    interrupts = <21>, <23>, <24>;
    interrupt-names = "rx", "tx", "ptp_tx";
    /* Filled in by bootloader */
    local-mac-address = [00 00 00 00 00 00];
    };
    };

    ptp_bc: ptp_bc {
    compatible = "ti,am57-bc";
    status = "disabled";
    };
    };

    &dra7_pmx_core {
    dcan1_pins_default: dcan1_pins_default {
    pinctrl-single,pins = <
    DRA7XX_CORE_IOPAD(0x37d0, PIN_OUTPUT_PULLUP | MUX_MODE0) /* dcan1_tx */
    DRA7XX_CORE_IOPAD(0x37d4, PIN_INPUT_PULLUP | MUX_MODE0) /* dcan1_rx */
    >;
    };

    dcan1_pins_sleep: dcan1_pins_sleep {
    pinctrl-single,pins = <
    DRA7XX_CORE_IOPAD(0x37d0, MUX_MODE15 | PULL_UP) /* dcan1_tx.off */
    DRA7XX_CORE_IOPAD(0x37d4, MUX_MODE15 | PULL_UP) /* dcan1_rx.off */
    >;
    };
    };

    &i2c1 {
    status = "okay";
    clock-frequency = <400000>;

    tps659038: tps659038@58 {
    compatible = "ti,tps659038";
    reg = <0x58>;
    interrupts-extended = <&gpio6 16 IRQ_TYPE_LEVEL_HIGH
    &dra7_pmx_core 0x418>;
    #interrupt-cells = <2>;
    interrupt-controller;
    ti,system-power-controller;
    ti,palmas-override-powerhold;

    tps659038_pmic {
    compatible = "ti,tps659038-pmic";

    smps12-in-supply = <&vmain>;
    smps3-in-supply = <&vmain>;
    smps45-in-supply = <&vmain>;
    smps6-in-supply = <&vmain>;
    smps7-in-supply = <&vmain>;
    smps8-in-supply = <&vmain>;
    smps9-in-supply = <&vmain>;
    ldo1-in-supply = <&vmain>;
    ldo2-in-supply = <&vmain>;
    ldo3-in-supply = <&vmain>;
    ldo4-in-supply = <&vmain>;
    ldo9-in-supply = <&vmain>;
    ldoln-in-supply = <&vmain>;
    ldousb-in-supply = <&vmain>;
    ldortc-in-supply = <&vmain>;

    regulators {
    smps12_reg: smps12 {
    /* VDD_MPU */
    regulator-name = "smps12";
    regulator-min-microvolt = <850000>;
    regulator-max-microvolt = <1250000>;
    regulator-always-on;
    regulator-boot-on;
    };

    smps3_reg: smps3 {
    /* VDD_DDR EMIF1 EMIF2 */
    regulator-name = "smps3";
    regulator-min-microvolt = <1350000>;
    regulator-max-microvolt = <1350000>;
    regulator-always-on;
    regulator-boot-on;
    };

    smps45_reg: smps45 {
    /* VDD_DSPEVE on AM572 */
    /* VDD_IVA + VDD_DSP on AM571 */
    regulator-name = "smps45";
    regulator-min-microvolt = <850000>;
    regulator-max-microvolt = <1250000>;
    regulator-always-on;
    regulator-boot-on;
    };

    smps6_reg: smps6 {
    /* VDD_GPU */
    regulator-name = "smps6";
    regulator-min-microvolt = <850000>;
    regulator-max-microvolt = <1250000>;
    regulator-always-on;
    regulator-boot-on;
    };

    smps7_reg: smps7 {
    /* VDD_CORE */
    regulator-name = "smps7";
    regulator-min-microvolt = <850000>;
    regulator-max-microvolt = <1150000>;
    regulator-always-on;
    regulator-boot-on;
    };

    smps8_reg: smps8 {
    /* 5728 - VDD_IVAHD */
    /* 5718 - N.C. test point */
    regulator-name = "smps8";
    };

    smps9_reg: smps9 {
    /* VDD_3_3D */
    regulator-name = "smps9";
    regulator-min-microvolt = <3300000>;
    regulator-max-microvolt = <3300000>;
    regulator-always-on;
    regulator-boot-on;
    };

    ldo1_reg: ldo1 {
    /* VDDSHV8 - VSDMMC */
    /* NOTE: on rev 1.3a, data supply */
    regulator-name = "ldo1";
    regulator-min-microvolt = <1800000>;
    regulator-max-microvolt = <3300000>;
    regulator-boot-on;
    regulator-always-on;
    };

    ldo2_reg: ldo2 {
    /* VDDSH18V */
    regulator-name = "ldo2";
    regulator-min-microvolt = <1800000>;
    regulator-max-microvolt = <1800000>;
    regulator-always-on;
    regulator-boot-on;
    };

    ldo3_reg: ldo3 {
    /* R1.3a 572x V1_8PHY_LDO3: USB, SATA */
    regulator-name = "ldo3";
    regulator-min-microvolt = <1800000>;
    regulator-max-microvolt = <1800000>;
    regulator-always-on;
    regulator-boot-on;
    };

    ldo4_reg: ldo4 {
    /* R1.3a 572x V1_8PHY_LDO4: PCIE, HDMI*/
    regulator-name = "ldo4";
    regulator-min-microvolt = <1800000>;
    regulator-max-microvolt = <1800000>;
    regulator-always-on;
    regulator-boot-on;
    };

    /* LDO5-8 unused */

    ldo9_reg: ldo9 {
    /* VDD_RTC */
    regulator-name = "ldo9";
    regulator-min-microvolt = <840000>;
    regulator-max-microvolt = <1160000>;
    regulator-always-on;
    regulator-boot-on;
    };

    ldoln_reg: ldoln {
    /* VDDA_1V8_PLL */
    regulator-name = "ldoln";
    regulator-min-microvolt = <1800000>;
    regulator-max-microvolt = <1800000>;
    regulator-always-on;
    regulator-boot-on;
    };

    ldousb_reg: ldousb {
    /* VDDA_3V_USB: VDDA_USBHS33 */
    regulator-name = "ldousb";
    regulator-min-microvolt = <3300000>;
    regulator-max-microvolt = <3300000>;
    regulator-always-on;
    regulator-boot-on;
    };

    ldortc_reg: ldortc {
    /* VDDA_RTC */
    regulator-name = "ldortc";
    regulator-min-microvolt = <1800000>;
    regulator-max-microvolt = <1800000>;
    regulator-always-on;
    regulator-boot-on;
    };

    regen1: regen1 {
    /* VDD_3V3_ON */
    regulator-name = "regen1";
    regulator-boot-on;
    regulator-always-on;
    };

    regen2: regen2 {
    /* Needed for PMIC internal resource */
    regulator-name = "regen2";
    regulator-boot-on;
    regulator-always-on;
    };
    };
    };

    tps659038_rtc: tps659038_rtc {
    compatible = "ti,palmas-rtc";
    interrupt-parent = <&tps659038>;
    interrupts = <8 IRQ_TYPE_EDGE_FALLING>;
    wakeup-source;
    };

    tps659038_pwr_button: tps659038_pwr_button {
    compatible = "ti,palmas-pwrbutton";
    interrupt-parent = <&tps659038>;
    interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
    wakeup-source;
    ti,palmas-long-press-seconds = <12>;
    };

    tps659038_gpio: tps659038_gpio {
    compatible = "ti,palmas-gpio";
    gpio-controller;
    #gpio-cells = <2>;
    };

    extcon_usb2: tps659038_usb {
    compatible = "ti,palmas-usb-vid";
    ti,enable-vbus-detection;
    ti,enable-id-detection;
    /* ID & VBUS GPIOs provided in board dts */
    };
    };

    tpic2810: tpic2810@60 {
    compatible = "ti,tpic2810";
    reg = <0x60>;
    gpio-controller;
    #gpio-cells = <2>;
    };

    tc358778: tc358778@0e {
    compatible = "toshiba,tc358778", "toshiba,tc358768";
    reg = <0x0e>;
    status = "disabled";

    clocks = <&src_clk_x1>;
    clock-names = "refclk";

    ports {
    #address-cells = <1>;
    #size-cells = <0>;

    port@0 {
    reg = <0>;
    tc358778_in: endpoint {
    remote-endpoint = <&dpi_out>;
    data-lines = <24>;
    };
    };

    port@1 {
    reg = <1>;
    tc358778_out: endpoint {
    /*
    * lanes and remote-endpoint defined per
    * panel.
    */
    };
    };
    };
    };

    ov2659: ov2659@30 {
    compatible = "ovti,ov2659";
    reg = <0x30>;

    clocks = <&src_clk_x1>;
    clock-names = "xvclk";

    pwrdn-gpios = <&gpio6 14 GPIO_ACTIVE_LOW>;

    port {
    ov2659_1: endpoint {
    hsync-active = <1>;
    vsync-active = <1>;
    pclk-sample = <1>;
    link-frequencies = /bits/ 64 <70000000>;
    };
    };
    };
    };

    /********************************************************************************/
    /*-----------Added For MCSPI (custom board)-------------*/

    /**------MCSPI-1 : ARINC429 (HI-3593)(4 nos)------**/

    &mcspi1 {
    status = "okay";
    //compatible = "";
    ti,pindir-d0-out-d1-in;
    spi-cpol = <0>; /*Polarity*/
    spi-cpha = <0>; /*Phase*/
    ti,spi-num-cs = <4>; /*No of Chip Select*/
    #address-cells = <1>;
    #size-cells = <0>;
    arinc429_hi3593_1: hi3593@0{
    spi-max-frequency = <10000000>;
    reg = <0>;
    };
    arinc429_hi3593_2: hi3593@1 {
    spi-max-frequency = <10000000>;
    reg = <1>;
    };
    arinc429_hi3593_3: hi3593@2 {
    spi-max-frequency = <10000000>;
    reg = <2>;
    };
    arinc429_hi3593_4: hi3593@3 {
    spi-max-frequency = <10000000>;
    reg = <3>;
    };
    };

    /**-----MCSPI-2 : MIL1553 (HI-2130)-----**/
    &mcspi2 {
    status = "okay";
    //compatible = "";
    ti,pindir-d0-out-d1-in;
    mil1553_hi2130: hi2130@0{
    compatible = "";
    spi-max-frequency = <10000000>;
    spi-cpol = <0>;
    spi-cpha = <0>;
    ti,spi-num-cs = <1>;
    #address-cells = <1>;
    #size-cells = <0>;
    reg = <0>;
    };
    };

    /**--------MCSPI-3 : ADC (102s051)----------**/
    /*
    &mcspi3 {
    status = "okay";
    ti,pindir-d0-out-d1-in;

    tiADC102s051: tiADC102s051@0 {
    compatible = "ti,adc102s051";
    reg = <0>;
    spi-max-frequency = <1000000>;
    spi-cpol = <0>;
    spi-cpha = <1>;
    };
    };
    */
    /**--------MCSPI-4 : DAC (AD5761r)---------)**/

    &mcspi4 {
    status = "okay";
    ti,pindir-d0-out-d1-in;

    ad5761: ad5761@0 {
    compatible = "ad5761";
    gpio-controller;
    #gpio-cells = <2>;
    reg = <0>;
    spi-max-frequency = <50000000>;
    spi-cpol;
    };
    };
    /**********************************************************************************/

    /*Default one*/
    &mcspi3 {
    status = "okay";
    ti,pindir-d0-out-d1-in;

    sn65hvs882: sn65hvs882@0 {
    compatible = "pisosr-gpio";
    gpio-controller;
    #gpio-cells = <2>;

    reg = <0>;
    spi-max-frequency = <1000000>;
    spi-cpol;
    };
    };


    &uart3 {
    status = "okay";
    interrupts-extended = <&crossbar_mpu GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH
    &dra7_pmx_core 0x248>;
    };

    &rtc {
    status = "okay";
    ext-clk-src;
    };

    &mac {
    status = "okay";
    dual_emac;
    };

    &cpsw_emac0 {
    phy_id = <&davinci_mdio>, <0>;
    phy-mode = "rgmii";
    dual_emac_res_vlan = <1>;
    };

    &cpsw_emac1 {
    phy_id = <&davinci_mdio>, <1>;
    phy-mode = "rgmii";
    dual_emac_res_vlan = <2>;
    };

    &usb2_phy1 {
    phy-supply = <&ldousb_reg>;
    };

    &usb2_phy2 {
    phy-supply = <&ldousb_reg>;
    };

    &usb1 {
    dr_mode = "host";
    };

    &omap_dwc3_2 {
    extcon = <&extcon_usb2>;
    };

    &usb2 {
    extcon = <&extcon_usb2>;
    dr_mode = "otg";
    };

    &mmc1 {
    status = "okay";
    vmmc-supply = <&v3_3d>;
    vqmmc-supply = <&ldo1_reg>;
    bus-width = <4>;
    cd-gpios = <&gpio6 27 GPIO_ACTIVE_LOW>; /* gpio 219 */
    };

    &mmc2 {
    status = "okay";
    vmmc-supply = <&v3_3d>;
    vqmmc-supply = <&v3_3d>;
    bus-width = <8>;
    non-removable;
    max-frequency = <96000000>;
    no-1-8-v;
    };

    &dcan1 {
    status = "okay";
    pinctrl-names = "default", "sleep", "active";
    pinctrl-0 = <&dcan1_pins_sleep>;
    pinctrl-1 = <&dcan1_pins_sleep>;
    pinctrl-2 = <&dcan1_pins_default>;
    };

    &qspi {
    status = "okay";

    spi-max-frequency = <76800000>;
    m25p80@0 {
    compatible = "s25fl256s1", "jedec,spi-nor";
    spi-max-frequency = <76800000>;
    reg = <0>;
    spi-tx-bus-width = <1>;
    spi-rx-bus-width = <4>;
    #address-cells = <1>;
    #size-cells = <1>;

    /* MTD partition table.
    * The ROM checks the first four physical blocks
    * for a valid file to boot and the flash here is
    * 64KiB block size.
    */
    partition@0 {
    label = "QSPI.SPL";
    reg = <0x00000000 0x000040000>;
    };
    partition@1 {
    label = "QSPI.u-boot";
    reg = <0x00040000 0x00100000>;
    };
    partition@2 {
    label = "QSPI.u-boot-spl-os";
    reg = <0x00140000 0x00080000>;
    };
    partition@3 {
    label = "QSPI.u-boot-env";
    reg = <0x001c0000 0x00010000>;
    };
    partition@4 {
    label = "QSPI.u-boot-env.backup1";
    reg = <0x001d0000 0x0010000>;
    };
    partition@5 {
    label = "QSPI.kernel";
    reg = <0x001e0000 0x0800000>;
    };
    partition@6 {
    label = "QSPI.file-system";
    reg = <0x009e0000 0x01620000>;
    };
    };
    };

    &gpu {
    status = "ok";
    };

    &hdmi {
    status = "okay";
    /*
    * XXX: Support AM572x-Rev 1.2a. this is wrong for AM571x-rev 1.3a,
    * AM572x-Rev1.3a - but thanks to always-on, they work.
    * TODO: SWITCH TO LDO4 once rev 1.2a is deprecated
    * (on rev 1.3a availability)
    */
    vdda-supply = <&ldo3_reg>;

    port {
    hdmi_out: endpoint {
    remote-endpoint = <&tpd12s015_in>;
    };
    };
    };

    &dss {
    status = "okay";

    vdda_video-supply = <&ldoln_reg>;

    ports {
    #address-cells = <1>;
    #size-cells = <0>;

    port@0 {
    reg = <0>;

    dpi_out: endpoint {
    remote-endpoint = <&tc358778_in>;
    data-lines = <24>;
    };
    };
    };
    };

    &bb2d {
    status = "okay";
    };

    &pruss_soc_bus1 {
    status = "okay";

    pruss1: pruss@0 {
    status = "okay";
    };
    };

    &pruss_soc_bus2 {
    status = "okay";

    pruss2: pruss@0 {
    status = "okay";
    };
    };

    &pruss2_mdio {
    status = "okay";
    pruss2_eth0_phy: ethernet-phy@0 {
    reg = <0>;
    interrupt-parent = <&gpio3>;
    interrupts = <30 IRQ_TYPE_EDGE_FALLING>;
    };

    pruss2_eth1_phy: ethernet-phy@1 {
    reg = <1>;
    interrupt-parent = <&gpio3>;
    interrupts = <31 IRQ_TYPE_EDGE_FALLING>;
    };
    };

    /*----------------------------------------------------------end of am57xx-idk-common.dtsi-----------------------------------------------------------*/

    /********************************************************************************************************************************************************************/

    /*-------------------------------------------------------------am571x-idk.dts-------------------------------------------------------------------------------*/

    /*
    * Copyright (C) 2015-2016 Texas Instruments Incorporated - http://www.ti.com/
    *
    * 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.
    */
    /dts-v1/;

    #include "am571x-idk-common.dtsi"

    / {
    model = "TI AM5718 IDK";

    aliases {
    ethernet4 = &pruss1_emac0;
    ethernet5 = &pruss1_emac1;
    };

    /* Dual mac ethernet application node on icss2 */
    pruss1_eth: pruss1_eth {
    status = "okay";
    compatible = "ti,am57-prueth";
    prus = <&pru1_0>, <&pru1_1>;
    firmware-name = "ti-pruss/am57xx-pru0-prueth-fw.elf",
    "ti-pruss/am57xx-pru1-prueth-fw.elf";
    ti,pruss-gp-mux-sel = <0>, /* GP, default */
    <4>; /* MII2, needed for PRUSS1_MII1 */
    sram = <&ocmcram1>;
    interrupt-parent = <&pruss1_intc>;

    pruss1_emac0: ethernet-mii0 {
    phy-handle = <&pruss1_eth0_phy>;
    phy-mode = "mii";
    interrupts = <20>, <22>, <23>;
    interrupt-names = "rx", "tx", "ptp_tx";
    /* Filled in by bootloader */
    local-mac-address = [00 00 00 00 00 00];
    };

    pruss1_emac1: ethernet-mii1 {
    phy-handle = <&pruss1_eth1_phy>;
    phy-mode = "mii";
    interrupts = <21>, <23>, <24>;
    interrupt-names = "rx", "tx", "ptp_tx";
    /* Filled in by bootloader */
    local-mac-address = [00 00 00 00 00 00];
    };
    };
    };

    &pruss1_mdio {
    status = "okay";
    reset-gpios = <&gpio5 8 GPIO_ACTIVE_LOW>;
    reset-delay-us = <2>; /* PHY datasheet states 1uS min */
    pruss1_eth0_phy: ethernet-phy@0 {
    reg = <0>;
    interrupt-parent = <&gpio3>;
    interrupts = <28 IRQ_TYPE_EDGE_FALLING>;
    };

    pruss1_eth1_phy: ethernet-phy@1 {
    reg = <1>;
    interrupt-parent = <&gpio3>;
    interrupts = <29 IRQ_TYPE_EDGE_FALLING>;
    };
    };

    &pruss2_eth {
    ti,pruss-gp-mux-sel = <4>, /* MII2, needed for PRUSS1_MII0 */
    <4>; /* MII2, needed for PRUSS1_MII1 */
    };

    #include "am57xx-evm-cmem-am571x.dtsi"

    /*------------------------------------------------------------------end of am571x-idk.dts-----------------------------------------------------------------*/

    /*********************************************************************************************************************************************************************/

    /*-------------------------------------------------------------------am571x-idk-common.dtsi-------------------------------------------------------------------------*/

    /*
    * Copyright (C) 2015-2016 Texas Instruments Incorporated - http://www.ti.com/
    *
    * 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.
    */
    /dts-v1/;

    #include "dra72x.dtsi"
    #include <dt-bindings/gpio/gpio.h>
    #include <dt-bindings/interrupt-controller/irq.h>
    #include "am57xx-idk-common.dtsi"
    #include "dra72x-mmc-iodelay.dtsi"
    #include "dra7-ipu-dsp-common.dtsi"

    / {
    compatible = "ti,am5718-idk", "ti,am5718", "ti,dra7";

    memory@80000000 {
    device_type = "memory";
    reg = <0x0 0x80000000 0x0 0x40000000>;
    };

    reserved-memory {
    #address-cells = <2>;
    #size-cells = <2>;
    ranges;

    ipu2_memory_region: ipu2-memory@95800000 {
    compatible = "shared-dma-pool";
    reg = <0x0 0x95800000 0x0 0x3800000>;
    reusable;
    status = "okay";
    };

    dsp1_memory_region: dsp1-memory@99000000 {
    compatible = "shared-dma-pool";
    reg = <0x0 0x99000000 0x0 0x4000000>;
    reusable;
    status = "okay";
    };

    ipu1_memory_region: ipu1-memory@9d000000 {
    compatible = "shared-dma-pool";
    reg = <0x0 0x9d000000 0x0 0x2000000>;
    reusable;
    status = "okay";
    };
    };

    leds {
    compatible = "gpio-leds";
    cpu0-led {
    label = "status0:red:cpu0";
    gpios = <&gpio2 25 GPIO_ACTIVE_HIGH>;
    default-state = "off";
    linux,default-trigger = "cpu0";
    };

    usr0-led {
    label = "status0:green:usr";
    gpios = <&gpio2 26 GPIO_ACTIVE_HIGH>;
    default-state = "off";
    };

    heartbeat-led {
    label = "status0:blue:heartbeat";
    gpios = <&gpio2 27 GPIO_ACTIVE_HIGH>;
    default-state = "off";
    linux,default-trigger = "heartbeat";
    };

    usr1-led {
    label = "status1:red:usr";
    gpios = <&gpio2 28 GPIO_ACTIVE_HIGH>;
    default-state = "off";
    };

    usr2-led {
    label = "status1:green:usr";
    gpios = <&gpio2 21 GPIO_ACTIVE_HIGH>;
    default-state = "off";
    };

    mmc0-led {
    label = "status1:blue:mmc0";
    gpios = <&gpio2 19 GPIO_ACTIVE_HIGH>;
    default-state = "off";
    linux,default-trigger = "mmc0";
    };
    };
    };

    &extcon_usb2 {
    id-gpio = <&gpio5 7 GPIO_ACTIVE_HIGH>;
    vbus-gpio = <&gpio7 22 GPIO_ACTIVE_HIGH>;
    };

    &pcie1_rc {
    status = "okay";
    gpios = <&gpio3 23 GPIO_ACTIVE_HIGH>;
    };

    &pcie1_ep {
    gpios = <&gpio3 23 GPIO_ACTIVE_HIGH>;
    };

    &mmc1 {
    pinctrl-names = "default", "hs", "sdr12", "sdr25", "sdr50", "ddr50", "sdr104";
    pinctrl-0 = <&mmc1_pins_default_no_clk_pu>;
    pinctrl-1 = <&mmc1_pins_hs>;
    pinctrl-2 = <&mmc1_pins_sdr12>;
    pinctrl-3 = <&mmc1_pins_sdr25>;
    pinctrl-4 = <&mmc1_pins_sdr50>;
    pinctrl-5 = <&mmc1_pins_ddr50_rev20 &mmc1_iodelay_ddr50_conf>;
    pinctrl-6 = <&mmc1_pins_sdr104 &mmc1_iodelay_sdr104_rev20_conf>;
    };

    &mmc2 {
    pinctrl-names = "default", "hs", "ddr_1_8v";
    pinctrl-0 = <&mmc2_pins_default>;
    pinctrl-1 = <&mmc2_pins_hs>;
    pinctrl-2 = <&mmc2_pins_ddr_rev20 &mmc2_iodelay_ddr_conf>;
    };

    &cpu0 {
    vdd-supply = <&smps12_reg>;
    };

    &ov2659_1 {
    remote-endpoint = <&vin1b>;
    };

    &vin1b {
    status = "okay";

    endpoint@2 {
    slave-mode;
    remote-endpoint = <&ov2659_1>;
    };
    };

    &vip1 {
    status = "okay";
    };

    &pruss2_mdio {
    reset-gpios = <&gpio5 9 GPIO_ACTIVE_LOW>;
    reset-delay-us = <2>; /* PHY datasheet states 1uS min */
    };

    &ipu2 {
    status = "okay";
    memory-region = <&ipu2_memory_region>;
    };

    &ipu1 {
    status = "okay";
    memory-region = <&ipu1_memory_region>;
    };

    &dsp1 {
    status = "okay";
    memory-region = <&dsp1_memory_region>;
    };

    /*--------------------------------------------------------end of am571x-idk-common.dtsi--------------------------------------------------------------*/

    Thanks and Regards...

    Arpita Jena

  • Arpita,

    From what I understand, on your custom board you have only ADC attached to McSPI3. Thus I would suggest you to remove sn65hvs882 node and add ADC node in am57xx-idk-common.dtsi

    And I would suggest you to build your DTB file according to the user guide instructions:

    Compiling the Device Tree Binaries

    Regards,
    Pavel

  • Hi Pavel,

    I'll follow the same n inform you if any issues found.

    Thanks and regards

    Arpita Jena