这是我网上找到的dts配置:
http://www.bonebrews.com/temperature-monitoring-with-the-ds18b20-on-a-beaglebone-black/
/dts-v1/;
// magic: 0xd00dfeed
// totalsize: 0x31f (799)
// off_dt_struct: 0x38
// off_dt_strings: 0x2b4
// off_mem_rsvmap: 0x28
// version: 17
// last_comp_version: 16
// boot_cpuid_phys: 0x0
// size_dt_strings: 0x6b
// size_dt_struct: 0x27c
/ {
compatible = "allwinner,sun50i-h5";
fragment@0 {
target = <0xffffffff>;
__overlay__ {
w1_pins {
pins = "PD14";
function = "gpio_in";
linux,phandle = <0x00000001>;
phandle = <0x00000001>;
};
};
};
fragment@1 {
target-path = "/";
__overlay__ {
onewire@0 {
compatible = "w1-gpio";
pinctrl-names = "default";
pinctrl-0 = <0x00000001>;
gpios = <0xffffffff 0x00000003 0x0000000e 0x00000000>;
status = "okay";
};
};
};
__symbols__ {
w1_pins = "/fragment@0/__overlay__/w1_pins";
};
__fixups__ {
pio = "/fragment@0:target:0", "/fragment@1/__overlay__/onewire@0:gpios:0";
};
__local_fixups__ {
fragment@1 {
__overlay__ {
onewire@0 {
pinctrl-0 = <0x00000000>;
};
};
};
};
};
https://forum.armbian.com/topic/6859-ds18b20-temperature-sensor-1-wire-fex/
/dts-v1/;
// magic: 0xd00dfeed
// totalsize: 0x31f (799)
// off_dt_struct: 0x38
// off_dt_strings: 0x2b4
// off_mem_rsvmap: 0x28
// version: 17
// last_comp_version: 16
// boot_cpuid_phys: 0x0
// size_dt_strings: 0x6b
// size_dt_struct: 0x27c
/ {
compatible = "allwinner,sun50i-h5";
fragment@0 {
target = <0xffffffff>;
__overlay__ {
w1_pins {
pins = "PD14";
function = "gpio_in";
linux,phandle = <0x00000001>;
phandle = <0x00000001>;
};
};
};
fragment@1 {
target-path = "/";
__overlay__ {
onewire@0 {
compatible = "w1-gpio";
pinctrl-names = "default";
pinctrl-0 = <0x00000001>;
gpios = <0xffffffff 0x00000003 0x0000000e 0x00000000>;
status = "okay";
};
};
};
__symbols__ {
w1_pins = "/fragment@0/__overlay__/w1_pins";
};
__fixups__ {
pio = "/fragment@0:target:0", "/fragment@1/__overlay__/onewire@0:gpios:0";
};
__local_fixups__ {
fragment@1 {
__overlay__ {
onewire@0 {
pinctrl-0 = <0x00000000>;
};
};
};
};
};
离线