您尚未登录。

楼主 #1 2020-07-18 22:37:12

hong9424
会员
注册时间: 2020-07-16
已发帖子: 14
积分: 39

linux-zero-4.10.y内核分支led灯的有设备树描述吗

sun8i-v3s.dtsi sun8i-v3s-licheepi-zero.dts都找不到LED的驱动

离线

#2 2020-07-18 22:54:51

哇酷小二
管理员
所在地: 你猜
注册时间: 2020-04-22
已发帖子: 3,388
积分: 1902
个人网站

Re: linux-zero-4.10.y内核分支led灯的有设备树描述吗

https://elixir.bootlin.com/linux/latest/source/arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dts

	leds {
		compatible = "gpio-leds";

		blue_led {
			label = "licheepi:blue:usr";
			gpios = <&pio 6 1 GPIO_ACTIVE_LOW>; /* PG1 */
		};

		green_led {
			label = "licheepi:green:usr";
			gpios = <&pio 6 0 GPIO_ACTIVE_LOW>; /* PG0 */
			default-state = "on";
		};

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




离线

楼主 #3 2020-07-19 02:17:23

hong9424
会员
注册时间: 2020-07-16
已发帖子: 14
积分: 39

Re: linux-zero-4.10.y内核分支led灯的有设备树描述吗

哇酷小二 说:

https://elixir.bootlin.com/linux/latest/source/arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dts

	leds {
		compatible = "gpio-leds";

		blue_led {
			label = "licheepi:blue:usr";
			gpios = <&pio 6 1 GPIO_ACTIVE_LOW>; /* PG1 */
		};

		green_led {
			label = "licheepi:green:usr";
			gpios = <&pio 6 0 GPIO_ACTIVE_LOW>; /* PG0 */
			default-state = "on";
		};

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

老大哥,你给的这个网页代码是适配荔枝派的吗?我有点不清楚,还是去作者的github下载,我确定4.10y是没有LED驱动的

离线

#4 2020-07-19 09:09:19

哇酷小二
管理员
所在地: 你猜
注册时间: 2020-04-22
已发帖子: 3,388
积分: 1902
个人网站

Re: linux-zero-4.10.y内核分支led灯的有设备树描述吗

https://github.com/Lichee-Pi/linux/tree/zero-4.13.y/arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dts

	leds {
		compatible = "gpio-leds";

		blue_led {
			label = "licheepi:blue:usr";
			gpios = <&pio 6 1 GPIO_ACTIVE_LOW>; /* PG1 */
		};

		green_led {
			label = "licheepi:green:usr";
			gpios = <&pio 6 0 GPIO_ACTIVE_LOW>; /* PG0 */
			default-state = "on";
		};

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




离线

楼主 #5 2020-07-19 12:19:40

hong9424
会员
注册时间: 2020-07-16
已发帖子: 14
积分: 39

Re: linux-zero-4.10.y内核分支led灯的有设备树描述吗

哇酷小二 说:

https://github.com/Lichee-Pi/linux/tree/zero-4.13.y/arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dts

	leds {
		compatible = "gpio-leds";

		blue_led {
			label = "licheepi:blue:usr";
			gpios = <&pio 6 1 GPIO_ACTIVE_LOW>; /* PG1 */
		};

		green_led {
			label = "licheepi:green:usr";
			gpios = <&pio 6 0 GPIO_ACTIVE_LOW>; /* PG0 */
			default-state = "on";
		};

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

大哥,请问哪里能看到版本的差异。

离线

页脚

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

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