pincontrol groups for modems

I'm trying to understand how to configure pincontrol groups for modems.

I currently started with:

&pinctrl {

	uart0_default: uart0_default {
		group1 {
			psels = <NRF_PSEL(UART_TX, 0, 16)>,
					<NRF_PSEL(UART_RX, 0, 17)>,
					<NRF_PSEL()>
		};
	};

	uart0_sleep: uart0_sleep {
		group1 {
			psels = <NRF_PSEL(UART_TX, 0, 16)>,
					<NRF_PSEL(UART_RX, 0, 17)>;
			low-power-enable;
		};
	};
};

But my modem, the BG95, has a lot more pins like RI, AP_READY, PSM_IND, DTR, PWRKEY.

The NRF_PSEL macro refers to zephyr/include/zephyr/dt-bindings/pinctrl/nrf-pinctrl.h

But I cannot find a pin function for these pins?

Do I make multiple pincontrol groups?

I also read the following site:
https://academy.nordicsemi.com/topic/devicetree/

There it is stated that LEDs and buttons are excluded from pincontrol. Why is this?

I'm using NCS v2.2.0

If possible I would like to see an example how to define pins for the BG95 in the device tree as Zephyr and Nordic intend to define it?

Parents
  • Hi Philip, sorry for the delay. Your case got assigned to someone who later was out of office.

    Anyhow,

    From searching ncs/v2.2.0/ for 'bg9x' I found a board named RAK5010 with BG96 if you look up the board files for 'rak5010_nrf52840' which is using the quectel_bg9x driver. You can learn from that board, checking out the rak5010_nrf52840.dts file:

    &uart0 {
    	compatible = "nordic,nrf-uart";
    	status = "okay";
    	current-speed = <115200>;
    
    	/* QUECTEL BG9X */
    	pinctrl-0 = <&uart0_default>;
    	pinctrl-1 = <&uart0_sleep>;
    	pinctrl-names = "default", "sleep";
    	quectel_bg9x: quectel_bg9x {
    		compatible = "quectel,bg9x";
    		mdm-power-gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
    		mdm-reset-gpios = <&gpio0 28 GPIO_ACTIVE_LOW>;
    		mdm-dtr-gpios = <&gpio0 26 GPIO_ACTIVE_LOW>;
    		mdm-wdisable-gpios = <&gpio0 29 GPIO_ACTIVE_LOW>;
    		status = "okay";
    	};
    };

    Try adapting this to fit BG95.

    The Pin control groups are likely defined in one of the other board files for that board.

    Please do not hesitate if you have any questions.

Reply
  • Hi Philip, sorry for the delay. Your case got assigned to someone who later was out of office.

    Anyhow,

    From searching ncs/v2.2.0/ for 'bg9x' I found a board named RAK5010 with BG96 if you look up the board files for 'rak5010_nrf52840' which is using the quectel_bg9x driver. You can learn from that board, checking out the rak5010_nrf52840.dts file:

    &uart0 {
    	compatible = "nordic,nrf-uart";
    	status = "okay";
    	current-speed = <115200>;
    
    	/* QUECTEL BG9X */
    	pinctrl-0 = <&uart0_default>;
    	pinctrl-1 = <&uart0_sleep>;
    	pinctrl-names = "default", "sleep";
    	quectel_bg9x: quectel_bg9x {
    		compatible = "quectel,bg9x";
    		mdm-power-gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
    		mdm-reset-gpios = <&gpio0 28 GPIO_ACTIVE_LOW>;
    		mdm-dtr-gpios = <&gpio0 26 GPIO_ACTIVE_LOW>;
    		mdm-wdisable-gpios = <&gpio0 29 GPIO_ACTIVE_LOW>;
    		status = "okay";
    	};
    };

    Try adapting this to fit BG95.

    The Pin control groups are likely defined in one of the other board files for that board.

    Please do not hesitate if you have any questions.

Children
No Data
Related