Deleting properties for nodes in overlay dts file doesn't work.

Hi All,

I have nrf9160dk Board and wanted to use p0.14 & 15 pins but they are occupied by uart1 as rts and cts pins. So I created an overlay file to not edit directly board dts files and defined a uart1 node with /delete-property/ property.  But it didn't work. However, if I delete these pins from the main node in pin-control.dtsi, it works. is there anyone who can shed some light on how to delete-property through the overlay file?

Here are my overlay file definitions.

&pinctrl {
 uart1_default: uart1_default {
        group1 {
            psels = <NRF_PSEL(UART_TX, 0, 31)>;
        };
        group2 {
            psels = <NRF_PSEL(UART_RX, 0, 30)>;

        };
       
    };

    uart1_sleep: uart1_sleep {
        group1 {
            psels = <NRF_PSEL(UART_TX, 0, 31)>,
                <NRF_PSEL(UART_RX, 0, 30)>;
            low-power-enable;
        };
    };  
};
/* USB - UART */
&uart1 {
    status = "okay";
    current-speed = <115200>;
    pinctrl-0 = <&uart1_default>;
    pinctrl-1 = <&uart1_sleep>;
    /delete-property/ hw-flow-control;
    /delete-property/ rts-pin;
    /delete-property/ cts-pin;
    pinctrl-names = "default", "sleep";
};
  • zsn said:
    sorry for late reply.

    Hehe likewise, sorry about the delay.

    zsn said:
    yes I can see the properties Im trying to delete there. here is a sample.

    TF-M is using uart1 by default, so my guess is that that is the problem. Changing the configurations in the overlay file wont make a difference in the TF-M image there. You can check this theory by either disabling the TF-M image (by building the project for the board file without ns), or by turning off logging by enabling TFM_LOG_LEVEL_SILENCE in your config file.

    If you want to change the UART instance the TF-M image uses you can use CONFIG_TFM_SECURE_UART_INSTANCE. To change the RTS and CTS pins of uart0 though, I believe the only option is to modify modules/tee/tf-m/trusted-firmware-m/platform/ext/target/nordic_nrf/nrf9160dk_nrf9160/RTE_Device.h directly.

    However, if I delete these pins from the main node in pin-control.dtsi, it works.

    I am a bit surprised by this. Does this still work for you?

    Regards,

    Elfving

  • Hehe likewise, sorry about the delay.

    Slight smile

    TF-M is using uart1 by default, so my guess is that that is the problem. Changing the configurations in the overlay file wont make a difference in the TF-M image there. You can check this theory by either disabling the TF-M image (by building the project for the board file without ns), or by turning off logging by enabling TFM_LOG_LEVEL_SILENCE in your config file.

    this uart instance was only a sample to show something is wrong with dts files configuration. instead of a uart, when I use any other interface the result is the same. I can see the deleted property or even overlay file does not effect on dts file configuration(the resulting dts file). 

    The resulting dts file can be seen in build/zephyr/zephyr.dts. Are you seeing the properties you are trying to delete there after building?

    here is your note in your previous message. overlay files do not have an effect or are not over the board dts files. This is the issue that I'm trying to figure out why and how I can fix.

    I am a bit surprised by this. Does this still work for you?

    I fixed that issue it was specific for uart1. Now it works.  Forget about Uart, this issue is the same for I2C or any other instance definition in the dts files sometimes but I do not in what case.

  • zsn said:
    overlay files do not have an effect or are not over the board dts files. This is the issue that I'm trying to figure out why and how I can fix.

    I see. I figured there might be several other things that might be confusing and add to this problem, but if the overlays aren't even working for you it might be easiest start off by focusing on that Slight smile

    Are you seeing this using the build/zephyr/zephyr.dts file, or with the compiled device tree output shortcut in VSC? And are the two showing you the same information?

      

    Are you even seeing this overlay that you posted earlier make a difference on your zephyr.dts?

    / {
        chosen {
            zephyr,console = &uart0;
            zephyr,shell-uart = &uart0;
            zephyr,uart-mcumgr = &uart0;
        };
    };

    If none of that worked, try opening a new default peripheral_uart sample. It should come with a overlay file allready included. Could you see if that change has made any effect on the dts?

    Regards,

    Elfving

Related