Reference to non-existent node or label "i2c0_pins"

Hi Team,

My Processor : RZG2N

Package : VLP3.0.5

In order to add the accelerometer LSM6DSL, I have selected it in the menuconfig successfully.

But while adding the i2c node to the dtsi, and compiling the kernel I got the following error:

ERROR: linux-renesas-5.10.184-cip36+gitAUTOINC+1fa7acb436-r1 do_compile: oe_runmake failed
ERROR: linux-renesas-5.10.184-cip36+gitAUTOINC+1fa7acb436-r1 do_compile: Execution of '/home/vishnu/rzg_vlp_v3.0.5/build/tmp/work/hihope_rzg2n-poky-linux/linux-renesas/5.10.184-cip36+gitAUTOINC+1fa7acb436-r1/temp/run.do_compile.1282980' failed with exit code 1
ERROR: Logfile of failure stored in: /home/vishnu/rzg_vlp_v3.0.5/build/tmp/work/hihope_rzg2n-poky-linux/linux-renesas/5.10.184-cip36+gitAUTOINC+1fa7acb436-r1/temp/log.do_compile.1282980
Log data follows:
| DEBUG: Executing shell function do_compile
| NOTE: KBUILD_BUILD_TIMESTAMP: Tue Apr 5 23:00:00 UTC 2011
| NOTE: make -j 8 HOSTCC=gcc -isystem/home/vishnu/rzg_vlp_v3.0.5/build/tmp/work/hihope_rzg2n-poky-linux/linux-renesas/5.10.184-cip36+gitAUTOINC+1fa7acb436-r1/recipe-sysroot-native/usr/include -O2 -pipe -L/home/vishnu/rzg_vlp_v3.0.5/build/tmp/work/hihope_rzg2n-poky-linux/linux-renesas/5.10.184-cip36+gitAUTOINC+1fa7acb436-r1/recipe-sysroot-native/usr/lib -L/home/vishnu/rzg_vlp_v3.0.5/build/tmp/work/hihope_rzg2n-poky-linux/linux-renesas/5.10.184-cip36+gitAUTOINC+1fa7acb436-r1/recipe-sysroot-native/lib -Wl,--enable-new-dtags -Wl,-rpath-link,/home/vishnu/rzg_vlp_v3.0.5/build/tmp/work/hihope_rzg2n-poky-linux/linux-renesas/5.10.184-cip36+gitAUTOINC+1fa7acb436-r1/recipe-sysroot-native/usr/lib -Wl,-rpath-link,/home/vishnu/rzg_vlp_v3.0.5/build/tmp/work/hihope_rzg2n-poky-linux/linux-renesas/5.10.184-cip36+gitAUTOINC+1fa7acb436-r1/recipe-sysroot-native/lib -Wl,-rpath,/home/vishnu/rzg_vlp_v3.0.5/build/tmp/work/hihope_rzg2n-poky-linux/linux-renesas/5.10.184-cip36+gitAUTOINC+1fa7acb436-r1/recipe-sysroot-native/usr/lib -Wl,-rpath,/home/vishnu/rzg_vlp_v3.0.5/build/tmp/work/hihope_rzg2n-poky-linux/linux-renesas/5.10.184-cip36+gitAUTOINC+1fa7acb436-r1/recipe-sysroot-native/lib -Wl,-O1 -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=/home/vishnu/rzg_vlp_v3.0.5/build/tmp/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2 HOSTCPP=gcc -E HOSTCXX=g++ -isystem/home/vishnu/rzg_vlp_v3.0.5/build/tmp/work/hihope_rzg2n-poky-linux/linux-renesas/5.10.184-cip36+gitAUTOINC+1fa7acb436-r1/recipe-sysroot-native/usr/include -O2 -pipe -L/home/vishnu/rzg_vlp_v3.0.5/build/tmp/work/hihope_rzg2n-poky-linux/linux-renesas/5.10.184-cip36+gitAUTOINC+1fa7acb436-r1/recipe-sysroot-native/usr/lib -L/home/vishnu/rzg_vlp_v3.0.5/build/tmp/work/hihope_rzg2n-poky-linux/linux-renesas/5.10.184-cip36+gitAUTOINC+1fa7acb436-r1/recipe-sysroot-native/lib -Wl,--enable-new-dtags -Wl,-rpath-link,/home/vishnu/rzg_vlp_v3.0.5/build/tmp/work/hihope_rzg2n-poky-linux/linux-renesas/5.10.184-cip36+gitAUTOINC+1fa7acb436-r1/recipe-sysroot-native/usr/lib -Wl,-rpath-link,/home/vishnu/rzg_vlp_v3.0.5/build/tmp/work/hihope_rzg2n-poky-linux/linux-renesas/5.10.184-cip36+gitAUTOINC+1fa7acb436-r1/recipe-sysroot-native/lib -Wl,-rpath,/home/vishnu/rzg_vlp_v3.0.5/build/tmp/work/hihope_rzg2n-poky-linux/linux-renesas/5.10.184-cip36+gitAUTOINC+1fa7acb436-r1/recipe-sysroot-native/usr/lib -Wl,-rpath,/home/vishnu/rzg_vlp_v3.0.5/build/tmp/work/hihope_rzg2n-poky-linux/linux-renesas/5.10.184-cip36+gitAUTOINC+1fa7acb436-r1/recipe-sysroot-native/lib -Wl,-O1 -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=/home/vishnu/rzg_vlp_v3.0.5/build/tmp/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2 Image CC=aarch64-poky-linux-gcc -fuse-ld=bfd -fmacro-prefix-map=/home/vishnu/rzg_vlp_v3.0.5/build/tmp/work/hihope_rzg2n-poky-linux/linux-renesas/5.10.184-cip36+gitAUTOINC+1fa7acb436-r1=/usr/src/debug/linux-renesas/5.10.184-cip36+gitAUTOINC+1fa7acb436-r1 -fdebug-prefix-map=/home/vishnu/rzg_vlp_v3.0.5/build/tmp/work/hihope_rzg2n-poky-linux/linux-renesas/5.10.184-cip36+gitAUTOINC+1fa7acb436-r1=/usr/src/debug/linux-renesas/5.10.184-cip36+gitAUTOINC+1fa7acb436-r1 -fdebug-prefix-map=/home/vishnu/rzg_vlp_v3.0.5/build/tmp/work/hihope_rzg2n-poky-linux/linux-renesas/5.10.184-cip36+gitAUTOINC+1fa7acb436-r1/recipe-sysroot= -fdebug-prefix-map=/home/vishnu/rzg_vlp_v3.0.5/build/tmp/work/hihope_rzg2n-poky-linux/linux-renesas/5.10.184-cip36+gitAUTOINC+1fa7acb436-r1/recipe-sysroot-native= -fdebug-prefix-map=/home/vishnu/rzg_vlp_v3.0.5/build/tmp/work-shared/hihope-rzg2n/kernel-source=/usr/src/kernel -fdebug-prefix-map=/home/vishnu/rzg_vlp_v3.0.5/build/tmp/work-shared/hihope-rzg2n/kernel-build-artifacts=/usr/src/kernel --sysroot=/home/vishnu/rzg_vlp_v3.0.5/build/tmp/work/hihope_rzg2n-poky-linux/linux-renesas/5.10.184-cip36+gitAUTOINC+1fa7acb436-r1/recipe-sysroot LD=aarch64-poky-linux-ld.bfd --sysroot=/home/vishnu/rzg_vlp_v3.0.5/build/tmp/work/hihope_rzg2n-poky-linux/linux-renesas/5.10.184-cip36+gitAUTOINC+1fa7acb436-r1/recipe-sysroot
| GEN Makefile
| CALL /home/vishnu/rzg_vlp_v3.0.5/build/tmp/work-shared/hihope-rzg2n/kernel-source/scripts/atomic/check-atomics.sh
| CALL /home/vishnu/rzg_vlp_v3.0.5/build/tmp/work-shared/hihope-rzg2n/kernel-source/scripts/checksyscalls.sh
| CHK include/generated/compile.h
| NOTE: make -j 8 HOSTCC=gcc -isystem/home/vishnu/rzg_vlp_v3.0.5/build/tmp/work/hihope_rzg2n-poky-linux/linux-renesas/5.10.184-cip36+gitAUTOINC+1fa7acb436-r1/recipe-sysroot-native/usr/include -O2 -pipe -L/home/vishnu/rzg_vlp_v3.0.5/build/tmp/work/hihope_rzg2n-poky-linux/linux-renesas/5.10.184-cip36+gitAUTOINC+1fa7acb436-r1/recipe-sysroot-native/usr/lib -L/home/vishnu/rzg_vlp_v3.0.5/build/tmp/work/hihope_rzg2n-poky-linux/linux-renesas/5.10.184-cip36+gitAUTOINC+1fa7acb436-r1/recipe-sysroot-native/lib -Wl,--enable-new-dtags -Wl,-rpath-link,/home/vishnu/rzg_vlp_v3.0.5/build/tmp/work/hihope_rzg2n-poky-linux/linux-renesas/5.10.184-cip36+gitAUTOINC+1fa7acb436-r1/recipe-sysroot-native/usr/lib -Wl,-rpath-link,/home/vishnu/rzg_vlp_v3.0.5/build/tmp/work/hihope_rzg2n-poky-linux/linux-renesas/5.10.184-cip36+gitAUTOINC+1fa7acb436-r1/recipe-sysroot-native/lib -Wl,-rpath,/home/vishnu/rzg_vlp_v3.0.5/build/tmp/work/hihope_rzg2n-poky-linux/linux-renesas/5.10.184-cip36+gitAUTOINC+1fa7acb436-r1/recipe-sysroot-native/usr/lib -Wl,-rpath,/home/vishnu/rzg_vlp_v3.0.5/build/tmp/work/hihope_rzg2n-poky-linux/linux-renesas/5.10.184-cip36+gitAUTOINC+1fa7acb436-r1/recipe-sysroot-native/lib -Wl,-O1 -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=/home/vishnu/rzg_vlp_v3.0.5/build/tmp/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2 HOSTCPP=gcc -E HOSTCXX=g++ -isystem/home/vishnu/rzg_vlp_v3.0.5/build/tmp/work/hihope_rzg2n-poky-linux/linux-renesas/5.10.184-cip36+gitAUTOINC+1fa7acb436-r1/recipe-sysroot-native/usr/include -O2 -pipe -L/home/vishnu/rzg_vlp_v3.0.5/build/tmp/work/hihope_rzg2n-poky-linux/linux-renesas/5.10.184-cip36+gitAUTOINC+1fa7acb436-r1/recipe-sysroot-native/usr/lib -L/home/vishnu/rzg_vlp_v3.0.5/build/tmp/work/hihope_rzg2n-poky-linux/linux-renesas/5.10.184-cip36+gitAUTOINC+1fa7acb436-r1/recipe-sysroot-native/lib -Wl,--enable-new-dtags -Wl,-rpath-link,/home/vishnu/rzg_vlp_v3.0.5/build/tmp/work/hihope_rzg2n-poky-linux/linux-renesas/5.10.184-cip36+gitAUTOINC+1fa7acb436-r1/recipe-sysroot-native/usr/lib -Wl,-rpath-link,/home/vishnu/rzg_vlp_v3.0.5/build/tmp/work/hihope_rzg2n-poky-linux/linux-renesas/5.10.184-cip36+gitAUTOINC+1fa7acb436-r1/recipe-sysroot-native/lib -Wl,-rpath,/home/vishnu/rzg_vlp_v3.0.5/build/tmp/work/hihope_rzg2n-poky-linux/linux-renesas/5.10.184-cip36+gitAUTOINC+1fa7acb436-r1/recipe-sysroot-native/usr/lib -Wl,-rpath,/home/vishnu/rzg_vlp_v3.0.5/build/tmp/work/hihope_rzg2n-poky-linux/linux-renesas/5.10.184-cip36+gitAUTOINC+1fa7acb436-r1/recipe-sysroot-native/lib -Wl,-O1 -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=/home/vishnu/rzg_vlp_v3.0.5/build/tmp/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2 renesas/r8a774b1-hihope-rzg2n.dtb CC=aarch64-poky-linux-gcc -fuse-ld=bfd -fmacro-prefix-map=/home/vishnu/rzg_vlp_v3.0.5/build/tmp/work/hihope_rzg2n-poky-linux/linux-renesas/5.10.184-cip36+gitAUTOINC+1fa7acb436-r1=/usr/src/debug/linux-renesas/5.10.184-cip36+gitAUTOINC+1fa7acb436-r1 -fdebug-prefix-map=/home/vishnu/rzg_vlp_v3.0.5/build/tmp/work/hihope_rzg2n-poky-linux/linux-renesas/5.10.184-cip36+gitAUTOINC+1fa7acb436-r1=/usr/src/debug/linux-renesas/5.10.184-cip36+gitAUTOINC+1fa7acb436-r1 -fdebug-prefix-map=/home/vishnu/rzg_vlp_v3.0.5/build/tmp/work/hihope_rzg2n-poky-linux/linux-renesas/5.10.184-cip36+gitAUTOINC+1fa7acb436-r1/recipe-sysroot= -fdebug-prefix-map=/home/vishnu/rzg_vlp_v3.0.5/build/tmp/work/hihope_rzg2n-poky-linux/linux-renesas/5.10.184-cip36+gitAUTOINC+1fa7acb436-r1/recipe-sysroot-native= -fdebug-prefix-map=/home/vishnu/rzg_vlp_v3.0.5/build/tmp/work-shared/hihope-rzg2n/kernel-source=/usr/src/kernel -fdebug-prefix-map=/home/vishnu/rzg_vlp_v3.0.5/build/tmp/work-shared/hihope-rzg2n/kernel-build-artifacts=/usr/src/kernel --sysroot=/home/vishnu/rzg_vlp_v3.0.5/build/tmp/work/hihope_rzg2n-poky-linux/linux-renesas/5.10.184-cip36+gitAUTOINC+1fa7acb436-r1/recipe-sysroot LD=aarch64-poky-linux-ld.bfd --sysroot=/home/vishnu/rzg_vlp_v3.0.5/build/tmp/work/hihope_rzg2n-poky-linux/linux-renesas/5.10.184-cip36+gitAUTOINC+1fa7acb436-r1/recipe-sysroot
| DTC arch/arm64/boot/dts/renesas/r8a774b1-hihope-rzg2n.dtb
| /home/vishnu/rzg_vlp_v3.0.5/build/tmp/work-shared/hihope-rzg2n/kernel-source/arch/arm64/boot/dts/renesas/r8a774b1.dtsi:558.22-573.5: ERROR (phandle_references): /soc/i2c@e6500000: Reference to non-existent node or label "i2c0_pins"
|
| also defined at /home/vishnu/rzg_vlp_v3.0.5/build/tmp/work-shared/hihope-rzg2n/kernel-source/arch/arm64/boot/dts/renesas/hihope-common.dtsi:233.7-245.3
| /home/vishnu/rzg_vlp_v3.0.5/build/tmp/work-shared/hihope-rzg2n/kernel-source/arch/arm64/boot/dts/renesas/r8a774b1.dtsi:575.22-590.5: ERROR (phandle_references): /soc/i2c@e6508000: Reference to non-existent node or label "i2c1_pins"
|
| also defined at /home/vishnu/rzg_vlp_v3.0.5/build/tmp/work-shared/hihope-rzg2n/kernel-source/arch/arm64/boot/dts/renesas/hihope-common.dtsi:246.7-251.3
| /home/vishnu/rzg_vlp_v3.0.5/build/tmp/work-shared/hihope-rzg2n/kernel-source/arch/arm64/boot/dts/renesas/r8a774b1.dtsi:641.22-655.5: ERROR (phandle_references): /soc/i2c@e66e0000: Reference to non-existent node or label "i2c5_pins"
|
| also defined at /home/vishnu/rzg_vlp_v3.0.5/build/tmp/work-shared/hihope-rzg2n/kernel-source/arch/arm64/boot/dts/renesas/hihope-common.dtsi:252.7-257.3
| ERROR: Input tree has errors, aborting (use -f to force output)
| make[2]: *** [scripts/Makefile.lib:326: arch/arm64/boot/dts/renesas/r8a774b1-hihope-rzg2n.dtb] Error 2
| make[1]: *** [/home/vishnu/rzg_vlp_v3.0.5/build/tmp/work-shared/hihope-rzg2n/kernel-source/Makefile:1383: renesas/r8a774b1-hihope-rzg2n.dtb] Error 2
| make: *** [/home/vishnu/rzg_vlp_v3.0.5/build/tmp/work-shared/hihope-rzg2n/kernel-source/Makefile:192: __sub-make] Error 2
| ERROR: oe_runmake failed
| WARNING: exit code 1 from a shell command.
| ERROR: Execution of '/home/vishnu/rzg_vlp_v3.0.5/build/tmp/work/hihope_rzg2n-poky-linux/linux-renesas/5.10.184-cip36+gitAUTOINC+1fa7acb436-r1/temp/run.do_compile.1282980' failed with exit code 1
ERROR: Task (/home/vishnu/rzg_vlp_v3.0.5/build/../meta-renesas/meta-rz-common/recipes-kernel/linux/linux-renesas_5.10.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 495 tasks of which 494 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
/home/vishnu/rzg_vlp_v3.0.5/build/../meta-renesas/meta-rz-common/recipes-kernel/linux/linux-renesas_5.10.bb:do_compile
Summary: There were 3 WARNING messages shown.
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.



Following is the change I have done to the hihope-common.dtsi file (added the below lines)

&i2c0 {
pinctrl-0 = <&i2c0_pins>;
pinctrl-names = "default";

status = "okay";

lsm6dsm@6b {
compatible = "st,lsm6dsl";
reg = <0x6b>;
interrupt-parent = <&gpio0>;
interrupts = <0 IRQ_TYPE_EDGE_RISING>;
};
};
&i2c1 {
pinctrl-0 = <&i2c1_pins>;
pinctrl-names = "default";

status = "okay";
};
&i2c5 {
pinctrl-0 = <&i2c5_pins>;
pinctrl-names = "default";

status = "okay";
};

Please help me with this error

Thanks and regards,

VIshnudas N Kartha.

Parents
  • Hi @kartha,

    Do you define these i2cx_pins nodes?

  • Hi hienhuynh,

    I didn't defined these pins. 

    because I dont know how to do that and where to define them.

    Can you please help me with this?

    Or share any document on the same.

    One update I have update the dtsi like below:

    &i2c0 {
    //pinctrl-0 = <&i2c0_pins>;
    //pinctrl-names = "default";

    status = "okay";

    lsm6dsm@6b {
    compatible = "st,lsm6dsl";
    reg = <0x6b>;
    interrupt-parent = <&gpio0>;
    interrupts = <0 IRQ_TYPE_EDGE_RISING>;
    };
    };
    &i2c1 {
    //pinctrl-0 = <&i2c1_pins>;
    //pinctrl-names = "default";

    status = "okay";
    };
    &i2c5 {
    //pinctrl-0 = <&i2c5_pins>;
    //pinctrl-names = "default";

    status = "okay";
    };

    And after this there is no error in compilation and building of kernel.

    But I am not at all sure this works or not.

    Please give me some info on this.

    Thanks and regards,

    Vishnudas N Kartha

  • Hi @kartha, 

    You can refer another i2c node that defined pins.

  • Hi,

    me too think the same way, but its not helping, because the dtsi file only contains one i2c node which is defined like this 

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

    versaclock5: clock-generator@6a {
    compatible = "idt,5p49v5923";
    reg = <0x6a>;
    #clock-cells = <1>;
    clocks = <&x304_clk>;
    clock-names = "xin";
    };
    };

    As you can see it does not contain any "pinctrl".

    This is why I have commented them and make my entries look like I2c4 node which already existed in the dtsi.

    I am very new to linux (2 months hardly), so it is some what difficult to find a proper document which explains all these things in  a nut shell.

    If you know some reference please share that.

    Thanks and regards,

    Vishnudas N Kartha.

  • Hi Kartha,

    You can refer cat874-common.dtsi for i2c1_pins.

    About the pin strings, please check schematic then go to drivers/pinctrl/renesas/pfc-r8a77965.c then find your "i2c" pin desired your usage.

  • Hi,

    The processor i am using in RZG2N (r8a774b1).

    So is this the same file I need to look for RZG2N?

    I have done the below change in hihope-common.dtsi

    &i2c0 {

    clock-frequency = <400000>;
    status = "okay";


    lsm6dsm@6b {
    compatible = "st,lsm6dsl";
    reg = <0x6b>;
    interrupt-parent = <&gpio0>;
    interrupts = <0 IRQ_TYPE_EDGE_RISING>;
    };
    };

    Compiling and building are fine, and dtb files are generated.

    Is this enough for lsm6dsl to detect properly?

    Thanks and regards,

    Vishnudas N Kartha

  • Here is a simple example of enabling an i2c channel on a Renesas eval board. Maybe it will be helpful.
    https://renesas.info/wiki/RZ-G/RZ-G2_HiHope#Enable_I2C-0_on_CN1801_Header

  • Hi Chris,

    Thanks a lot. 

    I have gone through the example.

    And done the following things.

    My LVDS touch display's touch IC FT5426 is connected to I2C1 of the processor.

    I have added the following lines in this file "hihope-common.dtsi". (I added here because I believe that changing this file will reflect is all dtb files, please correct me if I am wrong).

    ////////////////////////////////////////////////////


    /*
    * Enable I2C1 for Touch IC FT5426
    * GP5_24 = SDA1
    * GP5_23 = SCL1
    */

    &pfc {
    i2c1_pins: i2c1 {
    groups = "i2c1";
    function = "i2c1";
    };
    };

    &i2c1 {
    pinctrl-0 = <&i2c1_pins>;
    pinctrl-names = "default";
    status = "okay";
    clock-frequency = <400000>;

    rt5616: codec@1b {
    compatible = "realtek,rt5616";
    reg = <0x1b>;
    };

    };


    ///////////////////////////////////////////////////

    I hope this will work. Please correct me if there is anything to add.

    But I didn't understand how the processor will know the i2c is routed through GP5_24  and GP5_23?

    I have lot more pins to be configured like PWM, GPIO etc....

    Chris, can you please share me any document which tells everything about pin configuration (dts and dtsi file creation/editing in RZG processor). 

    Thanks in Advance,

    Kartha

  • &pfc {
    i2c1_pins: i2c1 {
    groups = "i2c1";
    function = "i2c1";
    };
    };

    I2C-1 comes out in 4 different places on the chip. You have to tell it _a, _b, _c or _d

    For example:

     i2c1_pins: i2c1 {
    groups = "i2c1_b";
    function = "i2c1";
    };

    There is a table in the RZ/G2E pin mux driver:

    https://github.com/renesas-rz/rz_linux-cip/blob/rz-5.10-cip36/drivers/pinctrl/renesas/pfc-r8a77990.c#L4283

    static const char * const i2c1_groups[] = {
    "i2c1_a",
    "i2c1_b",
    "i2c1_c",
    "i2c1_d",
    };

Reply Children