SoC
- F1C200s
Kernel 版本
v5.17.0
适配过程如下
arch/arm/boot/dts/suniv-f1c100s.dtsi
#include <dt-bindings/clock/suniv-ccu-f1c100s.h> #include <dt-bindings/reset/suniv-ccu-f1c100s.h>
i2c0: i2c@1c27000 { compatible = "allwinner,sun4i-a10-i2c"; reg = <0x01C27000 0x1000>; interrupts = <7>; clocks = <&ccu CLK_BUS_I2C0>, <&ccu CLK_BUS_I2C0>; clock-names = "ahb", "mod"; resets = <&ccu RST_BUS_I2C0>; status = "disabled"; #address-cells = <1>; #size-cells = <0>; };
i2c0_pe_pins: i2c0-pe-pins { pins = "PE11", "PE12"; function = "i2c0"; };
arch/arm/boot/dts/suniv-f1c100s-licheepi-nano.dts
aliases { serial0 = &uart0; //serial1 = &uart1; i2c0 = &i2c0; spi0 = &spi0; spi1 = &spi1; };
&i2c0 { pinctl-names = "default"; pinctrl-0 = <&i2c0_pe_pins>; status = "okay"; i2c-max-frequency = <400000>; };
重新编译后,设备节点 /dev/i2c-0
已经注册