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

SPI MISO conflicts with data/command (ROCK 5B and maybe other boards) #32

Open
Gadgetoid opened this issue Nov 7, 2023 · 0 comments
Open

Comments

@Gadgetoid
Copy link
Member

After much tinkering I came up with this dtoverlay which configures ROCK 5Bs spi0-m2-cs1 to skip over the MISO pin, so it can be used for data/command:

/dts-v1/;
/plugin/;

/ {
	fragment@0 {
		target = <&spi0>;

		__overlay__ {
			status = "okay";
			#address-cells = <1>;
			#size-cells = <0>;
			pinctrl-names = "default";
			pinctrl-0 = <&spi0m2_cs1 &spi0m2_nomiso_pins>;
			max-freq = <50000000>;

			spidev@1 {
				compatible = "rockchip,spidev";
				status = "okay";
				reg = <1>;
				spi-max-frequency = <50000000>;
			};
		};
	};
	fragment@1 {
		target = <&pinctrl>;

		__overlay__ {

			spi0 {

				spi0m2_nomiso_pins: spi0m2-nomiso-pins {
					rockchip,pins =
						/* spi0_clk_m2 */
						<1 11 8 &pcfg_pull_up_drv_level_6>,
						/* spi0_miso_m2 */
						/*<1 9 8 &pcfg_pull_up_drv_level_6>,*/
						/* spi0_mosi_m2 */
						<1 10 8 &pcfg_pull_up_drv_level_6>;
				};
			};
		};
	};
};

Install with: sudo armbian-add-overlay rk3588-spi0-m2-cs1-nomiso-spidev.dts

Something like this might be needed for Raspberry Pi 5, so I figured out the dtoverlay magic on ROCK while I was waiting for the SPI to be fixed...

@Gadgetoid Gadgetoid changed the title SPI MISO conflicts with data/command SPI MISO conflicts with data/command (ROCK 5B and maybe other boards) Nov 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant