您尚未登录。

#1 Re: 全志 SOC » F1C200从TF卡启动问题 » 2020-05-14 14:20:49

哇酷小二 说:

setenv bootm_boot_mode sec
setenv machid 1029
load mmc 0:1 0x41000000 zImage
load mmc 0:1 0x41800000 suniv-f1c100s-licheepi-nano.dtb
bootz 0x41000000 - 0x41800000


粘贴到u-boot 命令行, 手动执行这几行命令看效果。


=> setenv bootm_boot_mode sec
=> setenv machid 1029
=> load mmc 0:1 0x41000000 zImage
reading zImage
3896691 bytes read in 247 ms (15 MiB/s)
=> load mmc 0:1 0x41800000 suniv-f1c100s-licheepi-nano.dtb
reading suniv-f1c100s-licheepi-nano.dtb
5908 bytes read in 26 ms (221.7 KiB/s)
=> bootz 0x41000000 - 0x41800000
=>

执行最后一条后,什么反应也没有

#3 Re: 全志 SOC » F1C200从TF卡启动问题 » 2020-05-14 14:13:05

哇酷小二 说:

有读 suniv-f1c100s-licheepi-nano.dtb

说明 boot.scr 文件存在并被 u-boot 识别了,

没有发现读 zImage, 是缺这个文件?还是卡片有问题?

zImage也是存在的,没有缺文件

#4 全志 SOC » F1C200从TF卡启动问题 » 2020-05-14 14:00:39

vkaoke
回复: 7

U-Boot 2018.01-05679-g013ca45 (Mar 15 2019 - 09:39:34 +0800) Allwinner Technology

CPU:   Allwinner F Series (SUNIV)
Model: Lichee Pi Nano
DRAM:  32 MiB
MMC:   SUNXI SD/MMC: 0
*** Warning - bad CRC, using default environment

In:    serial@1c25000
Out:   serial@1c25000
Err:   serial@1c25000
Net:   No ethernet found.
starting USB...
No controllers found
Hit any key to stop autoboot:  0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
reading /suniv-f1c100s-licheepi-nano.dtb
5908 bytes read in 26 ms (221.7 KiB/s)
starting USB...
No controllers found
USB is stopped. Please issue 'usb start' first.
starting USB...
No controllers found
No ethernet found.
missing environment variable: pxeuuid
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00000000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0000000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/000000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/000
No ethernet found.
missing environment variable: bootfile


通过boot.scr导入
setenv bootm_boot_mode sec
setenv machid 1029
load mmc 0:1 0x41000000 zImage
load mmc 0:1 0x41800000 suniv-f1c100s-licheepi-nano.dtb
bootz 0x41000000 - 0x41800000

#5 Re: 全志 SOC » V3s/S3/f1c100s通过USB启动Linux,并把SD NAND/TF卡挂载为U盘, 可以dd或Win32DiskImager任烧写 » 2019-06-10 11:23:44

板子进入FEL时,PhoenixSuit可以正常烧录,但是sunxi-fel.exe报这个错误 ERROR: Allwinner USB FEL device not found!
ERROR: Allwinner USB FEL device not found!

#6 Re: 全志 SOC » 全志S3启动内核后,卡在fb创建过程中(主线内核4.13) » 2019-05-06 18:00:01

晕哥 说:

你的 bootargs 是什么?

 print
arch=arm
baudrate=115200
board=sunxi
board_name=sunxi
boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr}
boot_efi_binary=load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} efi/boot/bootarm.efi; if fdt addr ${fdt_addr_r}; then bootefi ${kernel_addr_r} ${fdt_addr_r};else bootefi ${kernel_addr_r} ${fdtcontroladdr};fi
boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}extlinux/extlinux.conf
boot_net_usb_start=usb start
boot_prefixes=/ /boot/
boot_script_dhcp=boot.scr.uimg
boot_scripts=boot.scr.uimg boot.scr
boot_targets=fel mmc0 mmc1 usb0 pxe dhcp

bootargs=earlyprintk console=ttyS0,115200 panic=5 rootwait root=/dev/mmcblk0p2 rw

bootcmd=fatload mmc 0 $fdt_addr_r $fdtfile;fatload mmc 0 $kernel_addr_r zImage;bootz $kernel_addr_r - $fdt_addr_r
bootcmd_dhcp=run boot_net_usb_start; if dhcp ${scriptaddr} ${boot_script_dhcp}; then source ${scriptaddr}; fi;setenv efi_fdtfile ${fdtfile}; if test -z "${fdtfile}" -a -n "${soc}"; then setenv efi_fdtfile ${soc}-${board}${boardver}.dtb; fi; setenv efi_old_vci ${bootp_vci};setenv efi_old_arch ${bootp_arch};setenv bootp_vci PXEClient:Arch:00010:UNDI:003000;setenv bootp_arch 0xa;if dhcp ${kernel_addr_r}; then tftpboot ${fdt_addr_r} dtb/${efi_fdtfile};if fdt addr ${fdt_addr_r}; then bootefi ${kernel_addr_r} ${fdt_addr_r}; else bootefi ${kernel_addr_r} ${fdtcontroladdr};fi;fi;setenv bootp_vci ${efi_old_vci};setenv bootp_arch ${efi_old_arch};setenv efi_fdtfile;setenv efi_old_arch;setenv efi_old_vci;
bootcmd_fel=if test -n ${fel_booted} && test -n ${fel_scriptaddr}; then echo '(FEL boot)'; source ${fel_scriptaddr}; fi
bootcmd_mmc0=setenv devnum 0; run mmc_boot
bootcmd_mmc1=setenv devnum 1; run mmc_boot
bootcmd_pxe=run boot_net_usb_start; dhcp; if pxe get; then pxe boot; fi
bootcmd_usb0=setenv devnum 0; run usb_boot
bootdelay=1
bootm_size=0x2e00000
console=115200
cpu=armv7
dfu_alt_info_ram=kernel ram 0x41000000 0x800000;fdt ram 0x41800000 0x100000;ramdisk ram 0x41B00000 0x1000000
distro_bootcmd=for target in ${boot_targets}; do run bootcmd_${target}; done
efi_dtb_prefixes=/ /dtb/ /dtb/current/
fdt_addr_r=0x41800000
fdtcontroladdr=4794f2a8
fdtfile=sun8i-v3s-licheepi-zero.dtb
kernel_addr_r=0x41000000
load_efi_dtb=load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}${efi_fdtfile}
mmc_boot=if mmc dev ${devnum}; then setenv devtype mmc; run scan_dev_for_boot_part; fi
preboot=usb start
pxefile_addr_r=0x41A00000
ramdisk_addr_r=0x41B00000
scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts; done;run scan_dev_for_efi;
scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${distro_bootpart} bootfstype; then run scan_dev_for_boot; fi; done
scan_dev_for_efi=setenv efi_fdtfile ${fdtfile}; if test -z "${fdtfile}" -a -n "${soc}"; then setenv efi_fdtfile ${soc}-${board}${boardver}.dtb; fi; for prefix in ${efi_dtb_prefixes}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${efi_fdtfile}; then run load_efi_dtb; fi;done;if test -e ${devtype} ${devnum}:${distro_bootpart} efi/boot/bootarm.efi; then echo Found EFI removable media binary efi/boot/bootarm.efi; run boot_efi_binary; echo EFI LOAD FAILED: continuing...; fi; setenv efi_fdtfile
scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}extlinux/extlinux.conf; then echo Found ${prefix}extlinux/extlinux.conf; run boot_extlinux; echo SCRIPT FAILED: continuing...; fi
scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_script; echo SCRIPT FAILED: continuing...; fi; done
scriptaddr=0x41900000
serial#=12c000019c5d0db7
soc=sunxi
stderr=serial@01c28000
stdin=serial@01c28000
stdout=serial@01c28000
usb_boot=usb start; if usb dev ${devnum}; then setenv devtype usb; run scan_dev_for_boot_part; fi

Environment size: 4254/32764 bytes

#7 全志 SOC » 全志S3启动内核后,卡在fb创建过程中(主线内核4.13) » 2019-05-06 17:46:38

vkaoke
回复: 3

设备树的配置:

/dts-v1/;

/ {
	#address-cells = <0x1>;
	#size-cells = <0x1>;
	interrupt-parent = <0x1>;
	model = "Lichee Pi Zero";
	compatible = "licheepi,licheepi-zero", "allwinner,sun8i-v3s";

	chosen {
		#address-cells = <0x1>;
		#size-cells = <0x1>;
		ranges;
		stdout-path = "serial0:115200n8";

		framebuffer@0 {
			compatible = "allwinner,simple-framebuffer", "simple-framebuffer";
			allwinner,pipeline = "de0-lcd0";
			clocks = <0x2 0x21 0x3 0x0 0x3 0x6 0x2 0x40>;
			status = "okay";
		};
	};

	cpus {
		#address-cells = <0x1>;
		#size-cells = <0x0>;

		cpu@0 {
			compatible = "arm,cortex-a7";
			device_type = "cpu";
			reg = <0x0>;
			clocks = <0x2 0xe>;
		};
	};

	display-engine {
		compatible = "allwinner,sun8i-v3s-display-engine";
		allwinner,pipelines = <0x4>;
		status = "okay";
	};

	timer {
		compatible = "arm,armv7-timer";
		interrupts = <0x1 0xd 0xf08 0x1 0xe 0xf08 0x1 0xb 0xf08 0x1 0xa 0xf08>;
	};

	clocks {
		#address-cells = <0x1>;
		#size-cells = <0x1>;
		ranges;

		osc24M_clk {
			#clock-cells = <0x0>;
			compatible = "fixed-clock";
			clock-frequency = <0x16e3600>;
			clock-output-names = "osc24M";
			linux,phandle = <0x10>;
			phandle = <0x10>;
		};

		osc32k_clk {
			#clock-cells = <0x0>;
			compatible = "fixed-clock";
			clock-frequency = <0x8000>;
			clock-output-names = "osc32k";
			linux,phandle = <0x11>;
			phandle = <0x11>;
		};
	};

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

		clock@1000000 {
			compatible = "allwinner,sun8i-v3s-de2-clk";
			reg = <0x1000000 0x100000>;
			clocks = <0x2 0x3f 0x2 0x23>;
			clock-names = "mod", "bus";
			resets = <0x2 0x22>;
			#clock-cells = <0x1>;
			#reset-cells = <0x1>;
			linux,phandle = <0x3>;
			phandle = <0x3>;
		};

		mixer@1100000 {
			compatible = "allwinner,sun8i-v3s-de2-mixer";
			reg = <0x1100000 0x100000>;
			clocks = <0x3 0x0 0x3 0x6>;
			clock-names = "bus", "mod";
			resets = <0x3 0x0>;
			assigned-clocks = <0x3 0x6>;
			assigned-clock-rates = <0x8f0d180>;
			linux,phandle = <0x4>;
			phandle = <0x4>;

			ports {
				#address-cells = <0x1>;
				#size-cells = <0x0>;

				port@1 {
					#address-cells = <0x1>;
					#size-cells = <0x0>;
					reg = <0x1>;

					endpoint@0 {
						reg = <0x0>;
						remote-endpoint = <0x5>;
						linux,phandle = <0x7>;
						phandle = <0x7>;
					};
				};
			};
		};

		syscon@1c00000 {
			compatible = "allwinner,sun8i-v3s-system-controller", "syscon";
			reg = <0x1c00000 0x1000>;
			linux,phandle = <0x1b>;
			phandle = <0x1b>;
		};

		lcd-controller@1c0c000 {
			compatible = "allwinner,sun8i-v3s-tcon";
			reg = <0x1c0c000 0x1000>;
			interrupts = <0x0 0x56 0x4>;
			clocks = <0x2 0x21 0x2 0x40>;
			clock-names = "ahb", "tcon-ch0";
			clock-output-names = "tcon-pixel-clock";
			resets = <0x2 0x1b>;
			reset-names = "lcd";
			status = "okay";
			pinctrl-names = "default";
			pinctrl-0 = <0x6>;

			ports {
				#address-cells = <0x1>;
				#size-cells = <0x0>;

				port@0 {
					#address-cells = <0x1>;
					#size-cells = <0x0>;
					reg = <0x0>;

					endpoint@0 {
						reg = <0x0>;
						remote-endpoint = <0x7>;
						linux,phandle = <0x5>;
						phandle = <0x5>;
					};
				};

				port@1 {
					#address-cells = <0x1>;
					#size-cells = <0x0>;
					reg = <0x1>;

					endpoint@0 {
						reg = <0x0>;
						remote-endpoint = <0x8>;
						linux,phandle = <0x21>;
						phandle = <0x21>;
					};
				};
			};
		};

		dma-controller@01c02000 {
			compatible = "allwinner,sun8i-v3s-dma";
			reg = <0x1c02000 0x1000>;
			interrupts = <0x0 0x32 0x4>;
			clocks = <0x2 0x15>;
			resets = <0x2 0x6>;
			#dma-cells = <0x1>;
			linux,phandle = <0x14>;
			phandle = <0x14>;
		};

		mmc@01c0f000 {
			compatible = "allwinner,sun7i-a20-mmc";
			reg = <0x1c0f000 0x1000>;
			clocks = <0x2 0x16 0x2 0x2d 0x2 0x2f 0x2 0x2e>;
			clock-names = "ahb", "mmc", "output", "sample";
			resets = <0x2 0x7>;
			reset-names = "ahb";
			interrupts = <0x0 0x3c 0x4>;
			status = "okay";
			#address-cells = <0x1>;
			#size-cells = <0x0>;
			pinctrl-0 = <0x9>;
			pinctrl-names = "default";
			broken-cd;
			bus-width = <0x4>;
			vmmc-supply = <0xa>;
		};

		mmc@01c10000 {
			compatible = "allwinner,sun7i-a20-mmc";
			reg = <0x1c10000 0x1000>;
			clocks = <0x2 0x17 0x2 0x30 0x2 0x32 0x2 0x31>;
			clock-names = "ahb", "mmc", "output", "sample";
			resets = <0x2 0x8>;
			reset-names = "ahb";
			interrupts = <0x0 0x3d 0x4>;
			pinctrl-names = "default";
			pinctrl-0 = <0xb>;
			status = "okay";
			#address-cells = <0x1>;
			#size-cells = <0x0>;
			vmmc-supply = <0xa>;
			vqmmc-supply = <0xa>;
			mmc-pwrseq = <0xc>;
			bus-width = <0x4>;
			non-removable;

			wifi@1 {
				reg = <0x1>;
				compatible = "brcm,bcm432\n  9-fmac";
				interrupt-parent = <0xd>;
				interrupt-names = "host-wake";
				interrupts = <0x1 0xa 0x8>;
			};
		};

		mmc@01c11000 {
			compatible = "allwinner,sun7i-a20-mmc";
			reg = <0x1c11000 0x1000>;
			clocks = <0x2 0x18 0x2 0x33 0x2 0x35 0x2 0x34>;
			clock-names = "ahb", "mmc", "output", "sample";
			resets = <0x2 0x9>;
			reset-names = "ahb";
			interrupts = <0x0 0x3e 0x4>;
			status = "okay";
			#address-cells = <0x1>;
			#size-cells = <0x0>;
			pinctrl-names = "default";
			pinctrl-0 = <0xe>;
			vmmc-supply = <0xa>;
			vqmmc-supply = <0xa>;
			bus-width = <0x4>;
			non-removable;
		};

		usb@01c19000 {
			compatible = "allwinner,sun8i-h3-musb";
			reg = <0x1c19000 0x400>;
			clocks = <0x2 0x1d>;
			resets = <0x2 0x11>;
			interrupts = <0x0 0x47 0x4>;
			interrupt-names = "mc";
			phys = <0xf 0x0>;
			phy-names = "usb";
			extcon = <0xf 0x0>;
			status = "okay";
			dr_mode = "host";
		};

		phy@01c19400 {
			compatible = "allwinner,sun8i-v3s-usb-phy";
			reg = <0x1c19400 0x2c 0x1c1a800 0x4>;
			reg-names = "phy_ctrl", "pmu0";
			clocks = <0x2 0x38>;
			clock-names = "usb0_phy";
			resets = <0x2 0x0>;
			reset-names = "usb0_reset";
			status = "okay";
			#phy-cells = <0x1>;
			linux,phandle = <0xf>;
			phandle = <0xf>;
		};

		usb@01c1a000 {
			compatible = "allwinner,sun8i-v3s-ehci", "generic-ehci";
			reg = <0x1c1a000 0x100>;
			interrupts = <0x0 0x48 0x4>;
			clocks = <0x2 0x1e 0x2 0x1f>;
			resets = <0x2 0x12 0x2 0x16>;
			status = "okay";
		};

		usb@01c1a400 {
			compatible = "allwinner,sun8i-v3s-ohci", "generic-ohci";
			reg = <0x1c1a400 0x100>;
			interrupts = <0x0 0x49 0x4>;
			clocks = <0x2 0x1e 0x2 0x1f 0x2 0x39>;
			resets = <0x2 0x12 0x2 0x16>;
			status = "okay";
		};

		clock@01c20000 {
			compatible = "allwinner,sun8i-v3s-ccu";
			reg = <0x1c20000 0x400>;
			clocks = <0x10 0x11>;
			clock-names = "hosc", "losc";
			#clock-cells = <0x1>;
			#reset-cells = <0x1>;
			linux,phandle = <0x2>;
			phandle = <0x2>;
		};

		rtc@01c20400 {
			compatible = "allwinner,sun6i-a31-rtc";
			reg = <0x1c20400 0x54>;
			interrupts = <0x0 0x28 0x4 0x0 0x29 0x4>;
		};

		pinctrl@01c20800 {
			compatible = "allwinner,sun8i-v3s-pinctrl";
			reg = <0x1c20800 0x400>;
			interrupts = <0x0 0xf 0x4 0x0 0x11 0x4>;
			clocks = <0x2 0x25 0x10 0x11>;
			clock-names = "apb", "hosc", "losc";
			gpio-controller;
			#gpio-cells = <0x3>;
			interrupt-controller;
			#interrupt-cells = <0x3>;
			linux,phandle = <0xd>;
			phandle = <0xd>;

			i2c0 {
				pins = "PB6", "PB7";
				function = "i2c0";
				linux,phandle = <0x19>;
				phandle = <0x19>;
			};

			uart0@0 {
				pins = "PB8", "PB9";
				function = "uart0";
				linux,phandle = <0x16>;
				phandle = <0x16>;
			};

			uart1@0 {
				pins = "PG6", "PG7", "PG8", "PG9";
				function = "uart1";
				bias-pull-up;
				linux,phandle = <0x17>;
				phandle = <0x17>;
			};

			uart2@0 {
				pins = "PB0", "PB1";
				function = "uart2";
				bias-pull-up;
				linux,phandle = <0x18>;
				phandle = <0x18>;
			};

			lcd-rgb666-pins {
				pins = "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PD16", "PD17", "PD18", "PD19", "PD20", "PD21";
				function = "lcd";
				linux,phandle = <0x6>;
				phandle = <0x6>;
			};

			mmc0@0 {
				pins = "PF0", "PF1", "PF2", "PF3", "PF4", "PF5";
				function = "mmc0";
				drive-strength = <0x1e>;
				bias-pull-up;
				linux,phandle = <0x9>;
				phandle = <0x9>;
			};

			mmc1@0 {
				pins = "PG0", "PG1", "PG2", "PG3", "PG4", "PG5";
				function = "mmc1";
				drive-strength = <0x1e>;
				bias-pull-up;
				linux,phandle = <0xb>;
				phandle = <0xb>;
			};

			mmc2@0 {
				pins = "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10";
				function = "mmc2";
				drive-strength = <0x1e>;
				bias-pull-up;
				linux,phandle = <0xe>;
				phandle = <0xe>;
			};

			spi0 {
				pins = "PC0", "PC1", "PC2", "PC3";
				function = "spi0";
				linux,phandle = <0x1d>;
				phandle = <0x1d>;
			};

			wifi_en_pin {
				pins = "PB2";
				function = "gpio_out";
				linux,phandle = <0x1f>;
				phandle = <0x1f>;
			};

			pwm1 {
				pins = "PB5";
				function = "pwm1";
				linux,phandle = <0x12>;
				phandle = <0x12>;
			};

			pwm0 {
				pins = "PB4";
				function = "pwm0";
			};
		};

		timer@01c20c00 {
			compatible = "allwinner,sun4i-a10-timer";
			reg = <0x1c20c00 0xa0>;
			interrupts = <0x0 0x12 0x4 0x0 0x13 0x4>;
			clocks = <0x10>;
		};

		watchdog@01c20ca0 {
			compatible = "allwinner,sun6i-a31-wdt";
			reg = <0x1c20ca0 0x20>;
			interrupts = <0x0 0x19 0x4>;
		};

		pwm@1c21400 {
			compatible = "allwinner,sun8i-v3s-pwm", "allwinner,sun7i-a20-pwm";
			reg = <0x1c21400 0x400>;
			clocks = <0x10>;
			#pwm-cells = <0x3>;
			status = "okay";
			pinctrl-names = "default";
			pinctrl-0 = <0x12>;
			linux,phandle = <0x1e>;
			phandle = <0x1e>;
		};

		lradc@1c22800 {
			compatible = "allwinner,sun4i-a10-lradc-keys";
			reg = <0x1c22800 0x400>;
			interrupts = <0x0 0x1e 0x4>;
			status = "okay";
			vref-supply = <0x13>;

			button@200 {
				label = "Volume Down";
				linux,code = <0x72>;
				channel = <0x0>;
				voltage = <0x30d40>;
			};

			button@400 {
				label = "Volume Up";
				linux,code = <0x73>;
				channel = <0x0>;
				voltage = <0x61a80>;
			};

			button@600 {
				label = "Esc";
				linux,code = <0x1>;
				channel = <0x0>;
				voltage = <0x927c0>;
			};

			button@800 {
				label = "Enter";
				linux,code = <0x1c>;
				channel = <0x0>;
				voltage = <0xc3500>;
			};

			button@1000 {
				label = "Menu";
				linux,code = <0x8b>;
				channel = <0x0>;
				voltage = <0xf4240>;
			};
		};

		codec@01c22c00 {
			#sound-dai-cells = <0x0>;
			compatible = "allwinner,sun8i-v3s-codec";
			reg = <0x1c22c00 0x400>;
			interrupts = <0x0 0x1d 0x4>;
			clocks = <0x2 0x24 0x2 0x46>;
			clock-names = "apb", "codec";
			resets = <0x2 0x28>;
			dmas = <0x14 0xf 0x14 0xf>;
			dma-names = "rx", "tx";
			allwinner,codec-analog-controls = <0x15>;
			status = "okay";
			allwinner,audio-routing = "Headphone", "HP", "Headphone", "HPCOM", "MIC1", "Mic", "Mic", "HBIAS";
		};

		codec-analog@01c23000 {
			compatible = "allwinner,sun8i-v3s-codec-analog";
			reg = <0x1c23000 0x4>;
			linux,phandle = <0x15>;
			phandle = <0x15>;
		};

		serial@01c28000 {
			compatible = "snps,dw-apb-uart";
			reg = <0x1c28000 0x400>;
			interrupts = <0x0 0x0 0x4>;
			reg-shift = <0x2>;
			reg-io-width = <0x4>;
			clocks = <0x2 0x28>;
			resets = <0x2 0x31>;
			status = "okay";
			pinctrl-0 = <0x16>;
			pinctrl-names = "default";
		};

		serial@01c28400 {
			compatible = "snps,dw-apb-uart";
			reg = <0x1c28400 0x400>;
			interrupts = <0x0 0x1 0x4>;
			reg-shift = <0x2>;
			reg-io-width = <0x4>;
			clocks = <0x2 0x29>;
			resets = <0x2 0x32>;
			status = "okay";
			pinctrl-0 = <0x17>;
			pinctrl-names = "default";
		};

		serial@01c28800 {
			compatible = "snps,dw-apb-uart";
			reg = <0x1c28800 0x400>;
			interrupts = <0x0 0x2 0x4>;
			reg-shift = <0x2>;
			reg-io-width = <0x4>;
			clocks = <0x2 0x2a>;
			resets = <0x2 0x33>;
			status = "okay";
			pinctrl-0 = <0x18>;
			pinctrl-names = "default";
		};

		i2c@01c2ac00 {
			compatible = "allwinner,sun6i-a31-i2c";
			reg = <0x1c2ac00 0x400>;
			interrupts = <0x0 0x6 0x4>;
			clocks = <0x2 0x26>;
			resets = <0x2 0x2e>;
			pinctrl-names = "default";
			pinctrl-0 = <0x19>;
			status = "okay";
			#address-cells = <0x1>;
			#size-cells = <0x0>;

			max30102@0x57 {
				compatible = "max30102";
				maxim,red-led-current-microamp = <0x1b58>;
				maxim,ir-led-current-microamp = <0x1b58>;
				interrupt-parent = <0xd>;
				interrupts = <0x1 0xb 0x8>;
				reg = <0x57>;
			};

			lsm9ds1_acc_gyr@0x6A {
				compatible = "lsm9ds1_acc_gyr";
				interrupt-parent = <0xd>;
				interrupts = <0x1 0xc 0x8>;
				reg = <0x6a>;
			};

			lsm9ds1_mag@0x1C {
				compatible = "lsm9ds1_mag";
				reg = <0x1c>;
			};

			paj7620@0x73 {
				compatible = "pxi,paj7620";
				interrupt-parent = <0xd>;
				interrupts = <0x1 0xd 0x8>;
				reg = <0x73>;
			};

			pmic@34 {
				compatible = "x-powers,axp209";
				reg = <0x34>;
				interrupt-parent = <0xd>;
				interrupts = <0x1 0x4 0x2>;
				interrupt-controller;
				#interrupt-cells = <0x1>;

				regulators {
					x-powers,dcdc-freq = <0x5dc>;

					dcdc2 {
						regulator-always-on;
						regulator-min-microvolt = <0xf4240>;
						regulator-max-microvolt = <0x162010>;
						regulator-name = "vdd-cpu";
					};

					dcdc3 {
						regulator-always-on;
						regulator-min-microvolt = <0xf4240>;
						regulator-max-microvolt = <0x155cc0>;
						regulator-name = "vdd-int-dll";
					};

					ldo1 {
						regulator-always-on;
						regulator-min-microvolt = <0x124f80>;
						regulator-max-microvolt = <0x155cc0>;
						regulator-name = "vdd-rtc";
					};

					ldo2 {
						regulator-always-on;
						regulator-min-microvolt = <0x2932e0>;
						regulator-max-microvolt = <0x325aa0>;
						regulator-name = "avcc";
					};
				};

				battery-power-supply {
					compatible = "x-powers,axp209-battery-power-supply";
					monitored-battery = <0x1a>;
				};

				ac-power-supply {
					compatible = "x-powers,axp202-ac-power-supply";
				};

				gpio {
					compatible = "x-powers,axp209-gpio";
					gpio-controller;
					#gpio-cells = <0x2>;
				};
			};
		};

		i2c@01c2b000 {
			compatible = "allwinner,sun6i-a31-i2c";
			reg = <0x1c2b000 0x400>;
			interrupts = <0x0 0x7 0x4>;
			clocks = <0x2 0x27>;
			resets = <0x2 0x2f>;
			status = "okay";
			#address-cells = <0x1>;
			#size-cells = <0x0>;
		};

		ethernet@1c30000 {
			compatible = "allwinner,sun8i-v3s-emac";
			syscon = <0x1b>;
			reg = <0x1c30000 0x10000>;
			interrupts = <0x0 0x52 0x4>;
			interrupt-names = "macirq";
			resets = <0x2 0xc>;
			reset-names = "stmmaceth";
			clocks = <0x2 0x1a>;
			clock-names = "stmmaceth";
			phy-handle = <0x1c>;
			phy-mode = "mii";
			#address-cells = <0x1>;
			#size-cells = <0x0>;
			status = "okay";
			allwinner,use-internal-phy;
			allwinner,leds-active-low;

			mdio {
				#address-cells = <0x1>;
				#size-cells = <0x0>;

				ethernet-phy@1 {
					compatible = "ethernet-phy-ieee802.3-c22";
					reg = <0x1>;
					clocks = <0x2 0x2b>;
					resets = <0x2 0x27>;
					phy-is-integrated;
					linux,phandle = <0x1c>;
					phandle = <0x1c>;
				};
			};
		};

		spi@1c68000 {
			compatible = "allwinner,sun8i-h3-spi";
			reg = <0x1c68000 0x1000>;
			interrupts = <0x0 0x41 0x4>;
			clocks = <0x2 0x1c 0x2 0x37>;
			clock-names = "ahb", "mod";
			pinctrl-names = "default";
			pinctrl-0 = <0x1d>;
			resets = <0x2 0xf>;
			status = "disabled";
			#address-cells = <0x1>;
			#size-cells = <0x0>;
		};

		interrupt-controller@01c81000 {
			compatible = "arm,cortex-a7-gic", "arm,cortex-a15-gic";
			reg = <0x1c81000 0x1000 0x1c82000 0x1000 0x1c84000 0x2000 0x1c86000 0x2000>;
			interrupt-controller;
			#interrupt-cells = <0x3>;
			interrupts = <0x1 0x9 0xf04>;
			linux,phandle = <0x1>;
			phandle = <0x1>;
		};
	};

	ahci-5v {
		compatible = "regulator-fixed";
		regulator-name = "ahci-5v";
		regulator-min-microvolt = <0x4c4b40>;
		regulator-max-microvolt = <0x4c4b40>;
		regulator-boot-on;
		enable-active-high;
		gpio = <0xd 0x1 0x8 0x0>;
		status = "disabled";
	};

	usb0-vbus {
		compatible = "regulator-fixed";
		regulator-name = "usb0-vbus";
		regulator-min-microvolt = <0x4c4b40>;
		regulator-max-microvolt = <0x4c4b40>;
		enable-active-high;
		gpio = <0xd 0x1 0x9 0x0>;
		status = "disabled";
	};

	usb1-vbus {
		compatible = "regulator-fixed";
		regulator-name = "usb1-vbus";
		regulator-min-microvolt = <0x4c4b40>;
		regulator-max-microvolt = <0x4c4b40>;
		regulator-boot-on;
		enable-active-high;
		gpio = <0xd 0x7 0x6 0x0>;
		status = "disabled";
	};

	usb2-vbus {
		compatible = "regulator-fixed";
		regulator-name = "usb2-vbus";
		regulator-min-microvolt = <0x4c4b40>;
		regulator-max-microvolt = <0x4c4b40>;
		regulator-boot-on;
		enable-active-high;
		gpio = <0xd 0x7 0x3 0x0>;
		status = "disabled";
	};

	vcc3v0 {
		compatible = "regulator-fixed";
		regulator-name = "vcc3v0";
		regulator-min-microvolt = <0x2dc6c0>;
		regulator-max-microvolt = <0x2dc6c0>;
		linux,phandle = <0x13>;
		phandle = <0x13>;
	};

	vcc3v3 {
		compatible = "regulator-fixed";
		regulator-name = "vcc3v3";
		regulator-min-microvolt = <0x325aa0>;
		regulator-max-microvolt = <0x325aa0>;
		linux,phandle = <0xa>;
		phandle = <0xa>;
	};

	vcc5v0 {
		compatible = "regulator-fixed";
		regulator-name = "vcc5v0";
		regulator-min-microvolt = <0x4c4b40>;
		regulator-max-microvolt = <0x4c4b40>;
	};

	aliases {
		serial0 = "/soc/serial@01c28000";
	};

	backlight {
		compatible = "pwm-backlight";
		pwms = <0x1e 0x1 0x7a120 0x0>;
		brightness-levels = <0x0 0x1e 0x32 0x64 0x96 0xb4 0xc8 0xfa>;
		default-brightness-level = <0x0>;
		linux,phandle = <0x20>;
		phandle = <0x20>;
	};

	leds {
		compatible = "gpio-leds";

		sys_led {
			label = "heartbeatled";
			gpios = <0xd 0x1 0x3 0x1>;
			default-state = "on";
			linux,default-trigger = "heartbeat";
		};
	};

	wifi_reg_en {
		compatible = "mmc-pwrseq-simple";
		pinctrl-names = "default";
		pinctrl-0 = <0x1f>;
		reset-gpios = <0xd 0x1 0x2 0x1>;
		linux,phandle = <0xc>;
		phandle = <0xc>;
	};

	battery {
		compatible = "simple-battery";
		charge-full-design-microamp-hours = <0x86470>;
		voltage-min-design-microvolt = <0x3567e0>;
		constant-charge-current-max-microamp = <0xdbba0>;
		constant-charge-voltage-max-microvolt = <0x401640>;
		linux,phandle = <0x1a>;
		phandle = <0x1a>;
	};

	panel {
		#address-cells = <0x1>;
		#size-cells = <0x0>;
		compatible = "urt,umsh-8596md-t", "simple-panel";

		port@0 {
			reg = <0x0>;
			backlight = <0x20>;
			#address-cells = <0x1>;
			#size-cells = <0x0>;

			endpoint@0 {
				reg = <0x0>;
				remote-endpoint = <0x21>;
				linux,phandle = <0x8>;
				phandle = <0x8>;
			};
		};
	};
};

内核在加载到fb时,就卡住不动了,没有任何提示和报错,按任何输入也没反应,求大侠给个思路。。。。
。。
[    1.728632] Registering SWP/SWPB emulation handler
[    1.737766] simple-framebuffer 47ee6000.framebuffer: framebuffer at 0x47ee6000, 0x119400 bytes, mapped to 0xc8380000
[    1.748432] simple-framebuffer 47ee6000.framebuffer: format=x8r8g8b8, mode=600x480x32, linelength=2400
[    1.763244] Console: switching to colour frame buffer device 75x30
[    1.774078] simple-framebuffer 47ee6000.framebuffer: fb0: simplefb registered!
[    1.782177] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    1.788798] [drm] No driver support for vblank timestamp query.
[    1.804140] sun4i-drm display-engine: bound 1100000.mixer (ops 0xc083a5b8)
[    1.811520] sun4i-drm display-engine: bound 1c0c000.lcd-controller (ops 0xc08396f8)
[    1.819187] fb: switching to sun4i-drm-fb from simple
[    1.824424] Console: switching to colour dummy device 80x30

#8 全志 SOC » S3 TF/SD卡启动问题(BSP Linux,BSP u-boot) » 2019-04-18 15:51:08

vkaoke
回复: 1

索智官方给了 名为:eMMC_Patch_Release 的补丁包,我这边把S3的SDK包解压后,就把这个补丁文件夹覆盖了上去。
1.修改build/envsetup.sh的文件内容
   
    "uboot")
            echo "zmake uboot"
            croot
            cd ./bootloader/u-boot-2011.09
            ./build.sh -p sun8iw8p1_spinand_emmc --改了传参
            croot
            ;;

2.之后先导入环境变量:
root@ubuntu:/home/s3/s3-emmc# source build/envsetup.sh
TARGET_TOP=/home/s3/s3-emmc
TARGET_OUT=/home/s3/s3-emmc/out/sun8iw8p1-linaro-5.3/linux/common/buildroot/
BUILD_SYS_DIR=/home/s3/s3-emmc/build
PATH=/home/s3/s3-emmc/out/sun8iw8p1-linaro-5.3/linux/common/buildroot/host/usr/bin:/root/anaconda3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/root/anaconda3/bin:/snap/bin
CROSS_COMPILE=/home/s3/s3-emmc/out/sun8iw8p1-linaro-5.3/linux/common/buildroot/host/usr/bin/arm-linux-gnueabi-
BUILDROOT_DIR=/home/s3/s3-emmc/buildroot
LICHEE_LINUX=/home/s3/s3-emmc/linux-3.4
LICHEE_LINUX_VER=3.4
LICHEE_CHIP=sun8iw8p1
TARGET_PRODUCT=zeta
BUILDROOT_OUT=/home/s3/s3-emmc/out/sun8iw8p1-linaro-5.3/linux/common/buildroot/
3.然后使用zmake all进行编译,由于初次使用全志的SDK进行打包编译,之后会生成一个sun8iw8p1_linux_zeta-cdr_uart0.img的镜像

问题一:
1.这个sd卡的镜像也是用PhoenixSuit进行烧录吗?我试了一下,进行到这里就不行了
--------fastboot partitions--------
mbr not exist
[      5.258]Hit any key to stop autoboot:  0
work mode=0x10
run usb efex
buf queue page size = 2048
delay time 2500
usb init ok
set address 0x19
SUNXI_EFEX_ERASE_TAG
erase_flag = 0x1
FEX_CMD_fes_verify_status
FEX_CMD_fes_verify last err=0
the 0 mbr table is ok
the 1 mbr table is ok
the 2 mbr table is ok
the 3 mbr table is ok
*************MBR DUMP***************
total mbr part 5

part[0] name      :bootloader
part[0] classname :DISK
part[0] addrlo    :0x800
part[0] lenlo     :0x4000
part[0] user_type :32768
part[0] keydata   :0
part[0] ro        :0

part[1] name      :env
part[1] classname :DISK
part[1] addrlo    :0x4800
part[1] lenlo     :0x400
part[1] user_type :32768
part[1] keydata   :0
part[1] ro        :0

part[2] name      :boot
part[2] classname :DISK
part[2] addrlo    :0x4c00
part[2] lenlo     :0x8000
part[2] user_type :32768
part[2] keydata   :0
part[2] ro        :0

part[3] name      :rootfs
part[3] classname :DISK
part[3] addrlo    :0xcc00
part[3] lenlo     :0x16800
part[3] user_type :32768
part[3] keydata   :0
part[3] ro        :0

part[4] name      :UDISK
part[4] classname :DISK
part[4] addrlo    :0x23400
part[4] lenlo     :0x0
part[4] user_type :33024
part[4] keydata   :0
part[4] ro        :0

do need erase flash
no part need to protect user data
SUNXI_EFEX_MBR_TAG
mbr size = 0x10000
sunxi sprite init fail when downlaod mbr --不执行

之后我就参考V3S的烧录方式,首先制作u-boot-sun8iw8p1.bin,然后制作zimage,rootfs.tar.bz2,最后参考《制作荔枝派Zero开发板(全志V3s) TF/SD卡启动盘》https://whycan.cn/t_547.html,进行制作,发现做完的SD卡也是没法启动,到这里我有些懵逼了。

问题二:是否我还需要修改其他文件来使得SD卡能正常作为启动介质呢?

谢谢各位,感激不尽

#9 Re: 全志 SOC » 荔枝派Nano Pi LCD屏幕图像镜像显示 » 2019-03-25 08:02:22

trigger 说:

上下翻转,左右翻转?
我只记得 AT070TN92 有两个引脚可以控制, 通过GPIO 控制这两个引脚高低电平可以实现,
有些屏貌似都没有这个引脚。

问题已经解决,查看全志的TCON寄存器确实没有可以设置的地方,我转去找屏幕的有关资料,是否支持镜像,有的屏幕确实有两个引脚可以进行设置,我这个屏幕可以通过IIC进行配置,从而设置扫描方式,实现屏幕图像的镜像操作

#10 全志 SOC » 荔枝派Nano Pi LCD屏幕图像镜像显示 » 2019-03-22 13:36:09

vkaoke
回复: 4

需要屏幕图像镜像显示的化,有哪些方案呢?我这边想到的是找全志数据手册中TCON0的有关寄存器进行设置,改变扫描方式,但是找了几遍,没找到哪个参数可以设置,希望各位大佬,提供一些思路啦.~~~

#11 Re: 全志 SOC » 荔枝派Nano Pi 如何让串口的日志信息不输出在屏幕上 » 2019-03-22 08:14:09

smartcar 说:
vkaoke 说:
晕哥 说:

https://whycan.cn/t_575.html
https://whycan.cn/t_2074.html


u-boot的bootargs是不是:console=/dev/fb0
如果是, 改成实际对应的串口设备, 比如 console=/dev/ttyS0


第一步:
root@seeingvoice-Virtual-Machine:/home/lichee/u-boot/u-boot# cp tools/mkimage /usr/local/bin/mkimage
root@seeingvoice-Virtual-Machine:/home/lichee/u-boot/u-boot# cd ../../linux/
root@seeingvoice-Virtual-Machine:/home/lichee/linux# mkimage -C none -A arm -T script -d boot.cmd boot.scr
Image Name:
Created:      Thu Mar 21 14:28:19 2019
Image Type:   ARM Linux Script (uncompressed)
Data Size:    201 Bytes = 0.20 KiB = 0.00 MiB
Load Address: 00000000
Entry Point:  00000000
Contents:
   Image 0: 193 Bytes = 0.19 KiB = 0.00 MiB

第二步:去掉console=tty0
setenv bootargs console=ttyS0,115200 panic=5 rootwait root=/dev/mmcblk0p2 rw
load mmc 0:1 0x80C00000 suniv-f1c100s-licheepi-nano.dtb
load mmc 0:1 0x80008000 zImage
bootz 0x80008000 - 0x80C00000

原来直接在boot.scr中进行修改,发现启动有问题,于是重新生成了一下

搞定了吗?

上面就是解决的步骤,已经可以了

#12 Re: 全志 SOC » 荔枝派Nano Pi 如何让串口的日志信息不输出在屏幕上 » 2019-03-21 14:57:30

晕哥 说:

https://whycan.cn/t_575.html
https://whycan.cn/t_2074.html


u-boot的bootargs是不是:console=/dev/fb0
如果是, 改成实际对应的串口设备, 比如 console=/dev/ttyS0


第一步:
root@seeingvoice-Virtual-Machine:/home/lichee/u-boot/u-boot# cp tools/mkimage /usr/local/bin/mkimage
root@seeingvoice-Virtual-Machine:/home/lichee/u-boot/u-boot# cd ../../linux/
root@seeingvoice-Virtual-Machine:/home/lichee/linux# mkimage -C none -A arm -T script -d boot.cmd boot.scr
Image Name:
Created:      Thu Mar 21 14:28:19 2019
Image Type:   ARM Linux Script (uncompressed)
Data Size:    201 Bytes = 0.20 KiB = 0.00 MiB
Load Address: 00000000
Entry Point:  00000000
Contents:
   Image 0: 193 Bytes = 0.19 KiB = 0.00 MiB

第二步:去掉console=tty0
setenv bootargs console=ttyS0,115200 panic=5 rootwait root=/dev/mmcblk0p2 rw
load mmc 0:1 0x80C00000 suniv-f1c100s-licheepi-nano.dtb
load mmc 0:1 0x80008000 zImage
bootz 0x80008000 - 0x80C00000

原来直接在boot.scr中进行修改,发现启动有问题,于是重新生成了一下

#13 全志 SOC » 荔枝派Nano Pi 如何让串口的日志信息不输出在屏幕上 » 2019-03-21 10:09:48

vkaoke
回复: 4

各位大佬,如上题,我找半天,没找到,只是想让调试信息输出在串口上,不需要打印在屏幕上,该怎么说设置。拜谢!

#14 Re: 全志 SOC » 荔枝派Nano Pi PWM背光设置问题 » 2019-02-27 15:59:53

/dts-v1/;
#include <dt-bindings/input/input.h>
#include <dt-bindings/interrupt-controller/irq.h>
/ {
	#address-cells = <0x1>;
	#size-cells = <0x1>;
	interrupt-parent = <0x1>;
	model = "Lichee Pi Nano";
	compatible = "licheepi,licheepi-nano", "allwinner,suniv-f1c100s", "allwinner,suniv";

	clocks {
		#address-cells = <0x1>;
		#size-cells = <0x1>;
		ranges;

		clk-24M {
			#clock-cells = <0x0>;
			compatible = "fixed-clock";
			clock-frequency = <0x16e3600>;
			clock-output-names = "osc24M";
			phandle = <0x5>;
		};

		clk-32k {
			#clock-cells = <0x0>;
			compatible = "fixed-clock";
			clock-frequency = <0x8000>;
			clock-output-names = "osc32k";
			phandle = <0xb>;
		};

		clk-100M {
			#clock-cells = <0x0>;
			compatible = "fixed-clock";
			clock-frequency = <0x5f5e100>;
			clock-output-names = "fake-100M";
		};
	};

	cpus {
		#address-cells = <0x0>;
		#size-cells = <0x0>;

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

	display-engine {
		compatible = "allwinner,suniv-display-engine";
		allwinner,pipelines = <0x2>;
		status = "okay";
	};

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

		sram-controller@1c00000 {
			compatible = "allwinner,sun4i-a10-sram-controller";
			reg = <0x1c00000 0x30>;
			#address-cells = <0x1>;
			#size-cells = <0x1>;
			ranges;

			sram@10000 {
				compatible = "mmio-sram";
				reg = <0x10000 0x1000>;
				#address-cells = <0x1>;
				#size-cells = <0x1>;
				ranges = <0x0 0x10000 0x1000>;

				sram-section@0 {
					compatible = "allwinner,sun4i-a10-sram-d";
					reg = <0x0 0x1000>;
					status = "okay";
					phandle = <0x11>;
				};
			};
		};

		spi@1c05000 {
			compatible = "allwinner,suniv-spi", "allwinner,sun8i-h3-spi";
			reg = <0x1c05000 0x1000>;
			interrupts = <0xa>;
			clocks = <0x3 0x11 0x3 0x11>;
			clock-names = "ahb", "mod";
			resets = <0x3 0x4>;
			status = "okay";
			#address-cells = <0x1>;
			#size-cells = <0x0>;
			pinctrl-names = "default";
			pinctrl-0 = <0x4>;

			flash@0 {
				#address-cells = <0x1>;
				#size-cells = <0x1>;
				compatible = "winbond,w25q128", "jedec,spi-nor";
				reg = <0x0>;
				spi-max-frequency = <0x2625a00>;
			};
		};

		spi@1c06000 {
			compatible = "allwinner,suniv-spi", "allwinner,sun8i-h3-spi";
			reg = <0x1c06000 0x1000>;
			interrupts = <0xb>;
			clocks = <0x3 0x12 0x3 0x12>;
			clock-names = "ahb", "mod";
			resets = <0x3 0x5>;
			status = "disabled";
			#address-cells = <0x1>;
			#size-cells = <0x0>;
		};

		lcd-controller@1c0c000 {
			compatible = "allwinner,suniv-tcon";
			reg = <0x1c0c000 0x1000>;
			interrupts = <0x1d>;
			clocks = <0x3 0x15 0x3 0x39 0x5>;
			clock-names = "ahb", "tcon-ch0", "tcon-ch1";
			clock-output-names = "tcon-pixel-clock";
			resets = <0x3 0x8>;
			reset-names = "lcd";
			status = "okay";
			pinctrl-names = "default";
			pinctrl-0 = <0x6>;

			ports {
				#address-cells = <0x1>;
				#size-cells = <0x0>;

				port@0 {
					#address-cells = <0x1>;
					#size-cells = <0x0>;
					reg = <0x0>;

					endpoint@0 {
						reg = <0x0>;
						remote-endpoint = <0x7>;
						phandle = <0x14>;
					};
				};

				port@1 {
					#address-cells = <0x1>;
					#size-cells = <0x0>;
					reg = <0x1>;

					endpoint@0 {
						reg = <0x0>;
						remote-endpoint = <0x8>;
						phandle = <0x15>;
					};
				};
			};
		};

		mmc@1c0f000 {
			compatible = "allwinner,suniv-mmc", "allwinner,sun7i-a20-mmc";
			reg = <0x1c0f000 0x1000>;
			clocks = <0x3 0xe 0x3 0x28 0x3 0x2a 0x3 0x29>;
			clock-names = "ahb", "mmc", "output", "sample";
			resets = <0x3 0x1>;
			reset-names = "ahb";
			interrupts = <0x17>;
			pinctrl-names = "default";
			pinctrl-0 = <0x9>;
			status = "okay";
			#address-cells = <0x1>;
			#size-cells = <0x0>;
			vmmc-supply = <0xa>;
			bus-width = <0x4>;
			broken-cd;
		};

		mmc@1c10000 {
			compatible = "allwinner,suniv-mmc", "allwinner,sun7i-a20-mmc";
			reg = <0x1c10000 0x1000>;
			clocks = <0x3 0xf 0x3 0x2b 0x3 0x2d 0x3 0x2c>;
			clock-names = "ahb", "mmc", "output", "sample";
			resets = <0x3 0x2>;
			reset-names = "ahb";
			interrupts = <0x18>;
			status = "disabled";
			#address-cells = <0x1>;
			#size-cells = <0x0>;
		};

		clock@1c20000 {
			compatible = "allwinner,suniv-ccu";
			reg = <0x1c20000 0x400>;
			clocks = <0x5 0xb>;
			clock-names = "hosc", "losc";
			#clock-cells = <0x1>;
			#reset-cells = <0x1>;
			phandle = <0x3>;
		};

		interrupt-controller@1c20400 {
			compatible = "allwinner,suniv-ic";
			reg = <0x1c20400 0x400>;
			interrupt-controller;
			#interrupt-cells = <0x1>;
			phandle = <0x1>;
		};

		pio:pinctrl@1c20800 {
			compatible = "allwinner,suniv-pinctrl";
			reg = <0x1c20800 0x400>;
			interrupts = <0x26 0x27 0x28>;
			clocks = <0x3 0x24 0x5 0xb>;
			clock-names = "apb", "hosc", "losc";
			gpio-controller;
			interrupt-controller;
			#interrupt-cells = <0x3>;
			#gpio-cells = <0x3>;
			phandle = <0xd>;

			spi0-pins-pc {
				pins = "PC0", "PC1", "PC2", "PC3";
				function = "spi0";
				phandle = <0x4>;
			};

			i2c0 {
				pins = "PE11", "PE12";
				function = "i2c0";
				phandle = <0xc>;
			};

			lcd-rgb666-pins {
				pins = "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PD16", "PD17", "PD18", "PD19", "PD20", "PD21";
				function = "lcd";
				phandle = <0x6>;
			};

			uart-pins-pe {
				pins = "PE0", "PE1";
				function = "uart0";
				phandle = <0xf>;
			};
			uart-pins-pina{
				pins = "PA2", "PA3";
				function = "uart1";
				phandle = <0x1a>;
			};
            uart-pins-pinb{
				pins = "PE7", "PE8";
				function = "uart2";
				phandle = <0xe>;
			};
			mmc0-pins {
				pins = "PF0", "PF1", "PF2", "PF3", "PF4", "PF5";
				function = "mmc0";
				phandle = <0x9>;
			};
			pwm1_pins: pwm1 {
					pins = "PE6";
					function = "pwm1";
				};

		};

		timer@1c20c00 {
			compatible = "allwinner,suniv-timer";
			reg = <0x1c20c00 0x90>;
			interrupts = <0xd>;
			clocks = <0x5>;
		};

		watchdog@1c20ca0 {
			compatible = "allwinner,sun6i-a31-wdt";
			reg = <0x1c20ca0 0x20>;
		};
		pwm:pwm@1C21000 {
		    compatible = "allwinner,sun7i-a20-pwm";        
			reg = <0x1C21000 0xC>;
			clocks = <0x5>;
			#pwm-cells = <3>;
			pinctrl-names = "default";
			pinctrl-0 = <&pwm1_pins>;
			status = "okay";
	   };
	 
		i2c@1C27000 {
			compatible = "allwinner,sun6i-a31-i2c";
			reg = <0x1c27000 0x400>;
			interrupts = <0x7>;
			clocks = <0x3 0x21>;
			resets = <0x3 0x14>;
			pinctrl-names = "default";
			pinctrl-0 = <0xc>;
			status = "okay";
			#address-cells = <0x1>;
			#size-cells = <0x0>;
		
			lcos@0x48 {
				compatible = "lcos,lcos_hx7097";
				reg = <0x48>;
			};			
			axp209:pmic@0x34 { 
		    compatible = "x-powers,axp209";
			reg = <0x34>;
			interrupt-parent = <&pio>;
            interrupts = <4 2 IRQ_TYPE_LEVEL_LOW>; /* (PE2) */
			/* interrupts = <0 IRQ_TYPE_LEVEL_LOW>;*/
			interrupt-controller;
			#interrupt-cells = <1>;
				battery_power_supply: battery-power-supply{ 
						compatible = "x-powers,axp209-battery-power-supply"; 
					};
				ac_power_supply:ac-power-supply{ 
						compatible = "x-powers,axp202-ac-power-supply"; 
					};				
				axp_gpio:gpio{ 
						compatible = "x-powers,axp209-gpio";
						gpio-controller;
						#gpio-cells = <2>; 
					};
			}; 			
		};		
		serial@1c25000 {
			compatible = "snps,dw-apb-uart";
			reg = <0x1c25000 0x400>;
			interrupts = <0x1>;
			reg-shift = <0x2>;
			reg-io-width = <0x4>;
			clocks = <0x3 0x25>;
			resets = <0x3 0x17>;
			status = "okay";
			pinctrl-names = "default";
			pinctrl-0 = <0xf>;
		};

		serial@1c25400 {
			compatible = "snps,dw-apb-uart";
			reg = <0x1c25400 0x400>;
			interrupts = <0x2>;
			reg-shift = <0x2>;
			reg-io-width = <0x4>;
			clocks = <0x3 0x26>;
			resets = <0x3 0x18>;
			status = "okay";
			pinctrl-names = "default";
			pinctrl-0 = <0x1a>;
		};

		serial@1c25800 {
			compatible = "snps,dw-apb-uart";
			reg = <0x1c25800 0x400>;
			interrupts = <0x3>;
			reg-shift = <0x2>;
			reg-io-width = <0x4>;
			clocks = <0x3 0x27>;
			resets = <0x3 0x19>;
			status = "okay";
			pinctrl-names = "default";
			pinctrl-0 = <0xe>;
		};

		usb@1c13000 {
			compatible = "allwinner,suniv-musb";
			reg = <0x1c13000 0x400>;
			clocks = <0x3 0x13>;
			resets = <0x3 0x6>;
			interrupts = <0x1a>;
			interrupt-names = "mc";
			phys = <0x10 0x0>;
			phy-names = "usb";
			extcon = <0x10 0x0>;
			allwinner,sram = <0x11 0x1>;
			status = "okay";
			dr_mode = "otg";
		};

		phy@1c13400 {
			compatible = "allwinner,suniv-usb-phy";
			reg = <0x1c13400 0x10>;
			reg-names = "phy_ctrl";
			clocks = <0x3 0x30>;
			clock-names = "usb0_phy";
			resets = <0x3 0x0>;
			reset-names = "usb0_reset";
			#phy-cells = <0x1>;
			status = "okay";
			usb0_id_det-gpio = <0xd 0x4 0x2 0x0>;
			phandle = <0x10>;
		};

		display-frontend@1e00000 {
			compatible = "allwinner,suniv-display-frontend";
			reg = <0x1e00000 0x20000>;
			interrupts = <0x1e>;
			clocks = <0x3 0x1b 0x3 0x38 0x3 0x35>;
			clock-names = "ahb", "mod", "ram";
			resets = <0x3 0xe>;
			status = "disabled";
			phandle = <0x2>;

			ports {
				#address-cells = <0x1>;
				#size-cells = <0x0>;

				port@1 {
					#address-cells = <0x1>;
					#size-cells = <0x0>;
					reg = <0x1>;

					endpoint@0 {
						reg = <0x0>;
						remote-endpoint = <0x12>;
						phandle = <0x13>;
					};
				};
			};
		};
		
		
		display-backend@1e60000 {
			compatible = "allwinner,suniv-display-backend";
			reg = <0x1e60000 0x10000>;
			reg-names = "be";
			interrupts = <0x1f>;
			clocks = <0x3 0x1a 0x3 0x37 0x3 0x36>;
			clock-names = "ahb", "mod", "ram";
			resets = <0x3 0xd>;
			reset-names = "be";
			assigned-clocks = <0x3 0x37>;
			assigned-clock-rates = <0x11e1a300>;

			ports {
				#address-cells = <0x1>;
				#size-cells = <0x0>;

				port@0 {
					#address-cells = <0x1>;
					#size-cells = <0x0>;
					reg = <0x0>;

					endpoint@0 {
						reg = <0x0>;
						remote-endpoint = <0x13>;
						phandle = <0x12>;
					};
				};

				port@1 {
					#address-cells = <0x1>;
					#size-cells = <0x0>;
					reg = <0x1>;

					endpoint@0 {
						reg = <0x0>;
						remote-endpoint = <0x14>;
						phandle = <0x7>;
					};
				};
			};
		};
	};

	aliases {
		serial0 = "/soc/serial@1c25000";
		spi0 = "/soc/spi@1c05000";		
		i2c0 = "/soc/i2c@1C27000";
	};

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

	panel {
		compatible = "lg,lb070wv8", "simple-panel";
		#address-cells = <0x1>;
		#size-cells = <0x0>;
		port@0 {
			reg = <0x0>;
			#address-cells = <0x1>;
			#size-cells = <0x0>;

			endpoint@0 {
				reg = <0x0>;
				remote-endpoint = <0x15>;
				phandle = <0x8>;
			};
		};
	};
	vcc3v3 {
		compatible = "regulator-fixed";
		regulator-name = "vcc3v3";
		regulator-min-microvolt = <0x325aa0>;
		regulator-max-microvolt = <0x325aa0>;
		phandle = <0xa>;
	};
	backlight 
	{
		compatible = "pwm-backlight";
		pwms = <&pwm 1 500000 0>;
		brightness-levels = <0 4 8 16 32 64 128 255>;
		default-brightness-level = <6>;
	};
	
};

#15 Re: 全志 SOC » 荔枝派Nano Pi PWM背光设置问题 » 2019-02-27 15:58:53

jiangming1399 说:

设备树中,去掉gpios的配置就正常啦,十分感谢大家

compatible = "qiaodian,qd43003c0-40", "simple-panel";
 		#address-cells = <1>;
 		#size-cells = <0>;
-		enable-gpios = <&pio 4 6 GPIO_ACTIVE_HIGH>;

#16 Re: 全志 SOC » 荔枝派Nano Pi PWM背光设置问题 » 2019-02-26 09:14:53

clk-24M {
            #clock-cells = <0x0>;
            compatible = "fixed-clock";
            clock-frequency = <0x16e3600>;
            clock-output-names = "osc24M";
            phandle = <0x5>;
        };

引用的应该是24M的时钟

#17 Re: 全志 SOC » 荔枝派Nano Pi PWM背光设置问题 » 2019-02-26 09:13:52

晕哥 说:

https://licheezero.readthedocs.io/zh/latest/%E9%A9%B1%E5%8A%A8/PWM.html

仔细核对了一下 荔枝派 V3s 的文档, 基本操作没有太大问题。

PWM_CTRL_REG  0x00  PWM Control Register
PWM_CH1_PERIOD  0x08  PWM Channel 1 Period Register

用 busybox 里面的 devmem 把这两个寄存器读出来看看:

devmem 0x01C21000
devmem 0x01C21008


# devmem 0x01C21000
0x002F8000
# devmem 0x01C21008
0x5DBF12C0

pwm控制寄存器:
0000 0000 0010 1111 1000 0000 0000 0000
PWM_CH1_PRESCAL=1  PWM_CH1_EN=1   PWM_CH1_CLK_GATING=1(Gating the Special Clock for PWM1 (0: mask, 1: pass).)

设置的参数:
0101 1101 1011 1111 0001 0010 1100 0000 

PWM_CH1_ACT_CYS=4800
PWM_CH1_ENTIRE_CYS=23999

我不知道,是不是pwm控制器里面有哪些位是不是还得设置一下。

#18 全志 SOC » 荔枝派Nano Pi PWM背光设置问题 » 2019-02-25 15:43:26

vkaoke
回复: 16

设备树配置:   

   pio:pinctrl@1c20800 {
			compatible = "allwinner,suniv-pinctrl";
			reg = <0x1c20800 0x400>;
			interrupts = <0x26 0x27 0x28>;
			clocks = <0x3 0x24 0x5 0xb>;
			clock-names = "apb", "hosc", "losc";
			gpio-controller;
			interrupt-controller;
			#interrupt-cells = <0x3>;
			#gpio-cells = <0x3>;
			phandle = <0xd>;

			pwm1_pins: pwm1 {
					pins = "PE6";
					function = "pwm1";
				};

		};



       pwm:pwm@1C21000 {
		    compatible = "allwinner,sun7i-a20-pwm";        
			reg = <0x1C21000 0x400>;
			clocks = <0x5>;
			#pwm-cells = <3>;
			pinctrl-names = "default";
			pinctrl-0 = <&pwm1_pins>;
			status = "okay";
	   };

内核配置:

         --- Pulse-Width Modulation (PWM) Support                                                       │ │
  │ │                        < >   Freescale FlexTimer Module (FTM) PWM support                                             │ │
  │ │                        < >   NXP PCA9685 PWM driver                                                                   │ │
  │ │                        <*>   Allwinner PWM support                                                                    │ │
  │ │      

  Symbol: PWM [=y]                                                                                                          │
  │ Type  : boolean                                                                                                           │
  │ Prompt: Pulse-Width Modulation (PWM) Support                                                                              │
  │   Location:                                                                                                               │
  │ (1) -> Device Drivers                                                                                                     │
  │   Defined at drivers/pwm/Kconfig:1                                                                                        │
  │   Selected by: S3C24XX_PWM [=n] && PLAT_SAMSUNG [=n] && SAMSUNG_ATAGS [=n] || FB_SSD1307 [=y] && HAS_IOMEM [=y] && FB [=y │
  │                                                                                                                           │
  │                                                                                                                           │
  │ Symbol: BACKLIGHT_PWM [=y]                                                                                                │
  │ Type  : tristate                                                                                                          │
  │ Prompt: Generic PWM based Backlight Driver                                                                                │
  │   Location:                                                                                                               │
  │     -> Device Drivers                                                                                                     │
  │       -> Graphics support                                                                                                 │
  │         -> Backlight & LCD device support (BACKLIGHT_LCD_SUPPORT [=y])                                                    │
  │ (2)       -> Lowlevel Backlight controls (BACKLIGHT_CLASS_DEVICE [=y])                                                    │
  │   Defined at drivers/video/backlight/Kconfig:261                                                                          │
  │   Depends on: HAS_IOMEM [=y] && BACKLIGHT_LCD_SUPPORT [=y] && BACKLIGHT_CLASS_DEVICE [=y] && PWM [=y]   
  
  
 Symbol: COMMON_CLK_PWM [=n]                                                                                               │
  │ Type  : tristate                                                                                                          │
  │ Prompt: Clock driver for PWMs used as clock outputs                                                                       │
  │   Location:                                                                                                               │
  │     -> Device Drivers                                                                                                     │
  │ (4)   -> Common Clock Framework                                                                                           │
  │   Defined at drivers/clk/Kconfig:197                                                                                      │
  │   Depends on: COMMON_CLK [=y] && PWM [=y]

                                                         

驱动中已经打开了;

echo 1 > /sys/class/pwm/pwmchip0/export
echo 1000000 > /sys/class/pwm/pwmchip0/pwm1/period
echo 200000 > /sys/class/pwm/pwmchip0/pwm1/duty_cycle
echo 1 > /sys/class/pwm/pwmchip0/pwm1/enable   

由于默认设备树开启了led,我将下面的代码从设备树中移除了,并且去掉了默认的led驱动

 leds {
             compatible = "gpio-leds";

             blue_led {
                     label = "licheepi:blue:usr";
                     gpios = <&pio 4 4 GPIO_ACTIVE_LOW>; /* PE4 */
             };

             green_led {
                     label = "licheepi:green:usr";
                     gpios = <&pio 4 5 GPIO_ACTIVE_LOW>; /* PE5 */
                     default-state = "on";
             };

             red_led {
                     label = "licheepi:red:usr";
                     gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PE6 */
             };
     };

上面的命令都可以执行成功,但是PE6脚输出一直是高电平,没有PWM波形的输出,这个哪个问题导致的呀

页脚

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

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