您尚未登录。

楼主 # 2022-01-04 15:38:59

摸鱼moyu
会员
注册时间: 2021-09-18
已发帖子: 15
积分: 15

esp8089_spi: FAILED to find master

那个esp他的spi注册哪里始终是esp8089_spi: FAILED to find master 那个bus_num我也改成0了

我看网上说去 /sys/class/spi_master/目录看bus_num的号但是我没有
几番查找说内核没打开CONFIG_SPI_MASTER我去make menuconfig看了有是有的
现在不知道咋弄了

我的设备树在这里大佬帮我看看

#include <dt-bindings/clock/suniv-ccu-f1c100s.h>
#include <dt-bindings/reset/suniv-ccu-f1c100s.h>
#include <dt-bindings/interrupt-controller/irq.h>
/ {
	#address-cells = <1>;
	#size-cells = <1>;
	interrupt-parent = <&intc>;

	clocks {
		osc24M: clk-24M {
			#clock-cells = <0>;
			compatible = "fixed-clock";
			clock-frequency = <24000000>;
			clock-output-names = "osc24M";
		};

		osc32k: clk-32k {
			#clock-cells = <0>;
			compatible = "fixed-clock";
			clock-frequency = <32768>;
			clock-output-names = "osc32k";
		};
	};

	cpus {
		cpu {
			compatible = "arm,arm926ej-s";
			device_type = "cpu";
		};
	};

	soc {
		compatible = "simple-bus";
		#address-cells = <1>;
		#size-cells = <1>;
		ranges;

		sram-controller@1c00000 {
			compatible = "allwinner,suniv-f1c100s-system-control",
				     "allwinner,sun4i-a10-system-control";
			reg = <0x01c00000 0x30>;
			#address-cells = <1>;
			#size-cells = <1>;
			ranges;

			sram_d: sram@10000 {
				compatible = "mmio-sram";
				reg = <0x00010000 0x1000>;
				#address-cells = <1>;
				#size-cells = <1>;
				ranges = <0 0x00010000 0x1000>;

				otg_sram: sram-section@0 {
					compatible = "allwinner,suniv-f1c100s-sram-d",
						     "allwinner,sun4i-a10-sram-d";
					reg = <0x0000 0x1000>;
					status = "disabled";
				};
			};
		};

		ccu: clock@1c20000 {
			compatible = "allwinner,suniv-f1c100s-ccu";
			reg = <0x01c20000 0x400>;
			clocks = <&osc24M>, <&osc32k>;
			clock-names = "hosc", "losc";
			#clock-cells = <1>;
			#reset-cells = <1>;
		};

		intc: interrupt-controller@1c20400 {
			compatible = "allwinner,suniv-f1c100s-ic";
			reg = <0x01c20400 0x400>;
			interrupt-controller;
			#interrupt-cells = <1>;
		};

		pio: pinctrl@1c20800 {
			compatible = "allwinner,suniv-f1c100s-pinctrl";
			reg = <0x01c20800 0x400>;
			interrupts = <38>, <39>, <40>;
			clocks = <&ccu 37>, <&osc24M>, <&osc32k>;
			clock-names = "apb", "hosc", "losc";
			gpio-controller;
			interrupt-controller;
			#interrupt-cells = <3>;
			#gpio-cells = <3>;

			uart0_pe_pins: uart0-pe-pins {
				pins = "PE0", "PE1";
				function = "uart0";
			};

			mmc0_pins: mmc0-pins {
                pins = "PF0", "PF1", "PF2", "PF3", "PF4", "PF5";
                function = "mmc0";
            };

			spi0_pc_pins: spi0-pc-pins {
                pins = "PC0","PC1","PC2","PC3";
                function = "spi0";
            };

			led_pins: led-pins {
                pins = "PE2";
                function = "led";
            };

			key_pins: key-pins {
                pins = "PD15";
                function = "key";
            };

		};

		timer@1c20c00 {
			compatible = "allwinner,suniv-f1c100s-timer";
			reg = <0x01c20c00 0x90>;
			interrupts = <13>;
			clocks = <&osc24M>;
		};

		mmc0: mmc@1c0f000 {
			compatible = "allwinner,suniv-f1c100s-mmc",
				     "allwinner,sun7i-a20-mmc";
			reg = <0x01c0f000 0x1000>;
			clocks = <&ccu CLK_BUS_MMC0>,
				 <&ccu CLK_MMC0>,
				 <&ccu CLK_MMC0_OUTPUT>,
				 <&ccu CLK_MMC0_SAMPLE>;
			clock-names = "ahb",
				      "mmc",
				      "output",
				      "sample";
			resets = <&ccu RST_BUS_MMC0>;
			reset-names = "ahb";
			interrupts = <23>;
			pinctrl-names = "default";
			pinctrl-0 = <&mmc0_pins>;
			status = "disabled";
			#address-cells = <1>;
			#size-cells = <0>;
		};

		wdt: watchdog@1c20ca0 {
			compatible = "allwinner,suniv-f1c100s-wdt",
				     "allwinner,sun4i-a10-wdt";
			reg = <0x01c20ca0 0x20>;
		};

		uart0: serial@1c25000 {
			compatible = "snps,dw-apb-uart";
			reg = <0x01c25000 0x400>;
			interrupts = <1>;
			reg-shift = <2>;
			reg-io-width = <4>;
			clocks = <&ccu 38>;
			resets = <&ccu 24>;
			status = "disabled";
		};

		uart1: serial@1c25400 {
			compatible = "snps,dw-apb-uart";
			reg = <0x01c25400 0x400>;
			interrupts = <2>;
			reg-shift = <2>;
			reg-io-width = <4>;
			clocks = <&ccu 39>;
			resets = <&ccu 25>;
			status = "disabled";
		};

		uart2: serial@1c25800 {
			compatible = "snps,dw-apb-uart";
			reg = <0x01c25800 0x400>;
			interrupts = <3>;
			reg-shift = <2>;
			reg-io-width = <4>;
			clocks = <&ccu 40>;
			resets = <&ccu 26>;
			status = "disabled";
		};

		spi0: spi@1c05000 {
            compatible = "allwinner,suniv-spi",
                     "allwinner,sun8i-h3-spi";
            reg = <0x01c05000 0x1000>;
            interrupts = <10>;
            clocks = <&ccu CLK_BUS_SPI0>, <&ccu CLK_BUS_SPI0>;
            clock-names = "ahb", "mod";
            resets = <&ccu RST_BUS_SPI0>;
            status = "disabled";
            #address-cells = <1>;
            #size-cells = <0>;
        };
	};
};



/dts-v1/;
#include "suniv-f1c100s.dtsi"
#include <dt-bindings/gpio/gpio.h>

/ {
	model = "Lichee Pi Nano";
	compatible = "licheepi,licheepi-nano", "allwinner,suniv-f1c100s";

	aliases {
		serial0 = &uart0;
	};

	chosen {
		stdout-path = "serial0:115200n8";
	};

	reg_vcc3v3: vcc3v3 {
		compatible = "regulator-fixed";
		regulator-name = "vcc3v3";
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
	};

	led {
			compatible = "cxj,my_led";
			pinctrl-names = "default";
			pinctrl-0 = <&led_pins>;
			led-gpios = <&pio 4 2 GPIO_ACTIVE_LOW>;
			status = "okay";
		};
	
	key {
			compatible = "cxj,my_key";
			pinctrl-names = "default";
			pinctrl-0 = <&key_pins>;
			key-gpios = <&pio 3 15 GPIO_ACTIVE_LOW>;

			interrupt-parent = <&pio>;
			interrupts = <3 15 IRQ_TYPE_EDGE_BOTH>;
			interrupt-controller;
			status = "okay";
		};
};

&uart0 {
	pinctrl-names = "default";
	pinctrl-0 = <&uart0_pe_pins>;
	status = "okay";
};

&mmc0 {
        vmmc-supply = <&reg_vcc3v3>;
        bus-width = <4>;
        broken-cd;
        status = "okay";
};

&spi0 {
        pinctrl-names = "default";
        pinctrl-0 = <&spi0_pc_pins>;
        status = "okay";
};

离线

#1 2022-01-06 13:06:30

buliaoqq
会员
注册时间: 2019-03-15
已发帖子: 20
积分: 18.5

Re: esp8089_spi: FAILED to find master

这个问题我也遇到过,后面用了坛友“twzy“共享的kernel源文件里面的“ESP8089-SPI”编译通过。

离线

楼主 #2 2022-01-06 13:24:19

摸鱼moyu
会员
注册时间: 2021-09-18
已发帖子: 15
积分: 15

Re: esp8089_spi: FAILED to find master

buliaoqq 说:

这个问题我也遇到过,后面用了坛友“twzy“共享的kernel源文件里面的“ESP8089-SPI”编译通过。

我回头试试我是直接github上拉下的

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn