Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drivers: xbar: Dedicated xbar driver #55242

Open
jeppenodgaard opened this issue Feb 27, 2023 · 4 comments
Open

drivers: xbar: Dedicated xbar driver #55242

jeppenodgaard opened this issue Feb 27, 2023 · 4 comments
Assignees
Labels
Enhancement Changes/Updates/Additions to existing features platform: NXP Drivers NXP Semiconductors, drivers platform: NXP NXP

Comments

@jeppenodgaard
Copy link
Collaborator

Is your enhancement proposal related to a problem? Please describe.

Some features requires usage of the crossbar (xbar) on some nxp processors e.g. mimxrt1050.
Currently the quadrature decoder driver configures the xbar and xbar connections.

Describe the solution you'd like

I would like to define the xbar connection in the pinctrl and also relate it to a group.
For example:

mimxrt1050_evk-pinctrl.dtsi

	pinmux_qdec1: pinmux_qdec1 {
		group0 {
			pinmux = <&iomuxc_gpio_ad_b0_09_xbar1_xbar_in21>,
				<&iomuxc_gpio_ad_b0_10_xbar1_xbar_in22>;
			xbar-connections =
				/* kXBARA1_InputIomuxXbarIn21 <-> kXBARA1_OutputEnc1PhaseAInput */
				<&xbar1 (21|0x100) (66|0x100)>,
				/* kXBARA1_InputIomuxXbarIn22 <-> kXBARA1_OutputEnc1PhaseBInput */
				<&xbar1 (22|0x100) (67|0x100)>;
			...
		};
	};

	pinmux_qdec1_single_phase: pinmux_qdec1_single_phase {
		group0 {
			pinmux = <&iomuxc_gpio_ad_b0_09_xbar1_xbar_in21>;
			xbar-connections =
				/* kXBARA1_InputIomuxXbarIn21 <-> kXBARA1_OutputEnc1PhaseAInput */
				<&xbar1 (21|0x100) (66|0x100)>,
				/* kXBARA1_InputLogicLow <-> kXBARA1_OutputEnc1PhaseBInput */
				<&xbar1 (0|0x100) (67|0x100)>;
			...
		};
	};

mimxrt1050_evk.overlay:

&qdec1 {
	status = "okay";
	pinctrl-0 = <&pinmux_qdec1>;
	pinctrl-1 = <&pinmux_qdec1_single_phase>;
	pinctrl-names = "default", "single-phase";
	counts-per-revolution = < 120 >;
};

&xbar1 {
	status = "okay";
};

Additional context
#53068 (review)

@jeppenodgaard jeppenodgaard added the Enhancement Changes/Updates/Additions to existing features label Feb 27, 2023
@henrikbrixandersen
Copy link
Member

I am unsure if pinctrl is the best way to configure internal crossbars. How does Linux handle similar configuration?
CC: @gmarull, @galak

@gmarull
Copy link
Member

gmarull commented Apr 17, 2023

I'm not familiar with this peripheral, some more details would be useful to provide some guidance/ideas. But if pin related, pinctrl driver sounds like a good candidate.

@jeppenodgaard
Copy link
Collaborator Author

@gmarull I was able to find this describtion from NXP. I think it describes the XBAR pretty well:

XBAR is a module intended to provide a flexible crossbar switch function that allows any input (typically from external GPIO or internal module outputs) to be connected to any output (typically to external GPIO or internal module inputs) under user control.

@zephyrbot zephyrbot added the Needs review This PR needs attention from Zephyr's maintainers label Feb 8, 2024
@nashif nashif added platform: NXP NXP platform: NXP Drivers NXP Semiconductors, drivers labels Feb 8, 2024
@zephyrbot zephyrbot removed the Needs review This PR needs attention from Zephyr's maintainers label Feb 8, 2024
@zephyrbot
Copy link
Collaborator

Hi @dleach02, @dleach02,

This issue, marked as an Enhancement, was opened a while ago and did not get any traction. It was just assigned to you based on the labels. If you don't consider yourself the right person to address this issue, please re-assing it to the right person.

Please take a moment to review if the issue is still relevant to the project. If it is, please provide feedback and direction on how to move forward. If it is not, has already been addressed, is a duplicate, or is no longer relevant, please close it with a short comment explaining the reason.

@jeppenodgaard you are also encouraged to help moving this issue forward by providing additional information and confirming this request/issue is still relevant to you.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Changes/Updates/Additions to existing features platform: NXP Drivers NXP Semiconductors, drivers platform: NXP NXP
Projects
None yet
Development

No branches or pull requests

6 participants