cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
2,873 Views
Registered: ‎11-21-2011

Linux (Microblaze) and DS18B20 (1-wire)

Hello

Sorry for my English :)

I have XC3S500E and 1-wire sensor DS18B20.

DS18B30 is connected to the IP-CORE xps-gpio. 

In UCF file:

 Net xps_gpio_1_GPIO_IO_pin LOC=p5 |  IOSTANDARD = LVCMOS33 | DRIVE=2 | SLEW=SLOW;

 

In DTS file

xps_gpio_1: gpio@81400000 {
#gpio-cells = <2>;
compatible = "xlnx,xps-gpio-2.00.a", "xlnx,xps-gpio-1.00.a";
gpio-controller ;
interrupt-parent = <&xps_intc_0>;
interrupts = < 3 2 >;
reg = < 0x81400000 0x10000 >;
xlnx,all-inputs = <0x0>;
xlnx,all-inputs-2 = <0x0>;
xlnx,dout-default = <0x0>;
xlnx,dout-default-2 = <0x0>;
xlnx,gpio-width = <0x1>;
xlnx,gpio2-width = <0x20>;
xlnx,interrupt-present = <0x1>;
xlnx,is-dual = <0x0>;
xlnx,tri-default = <0xffffffff>;
xlnx,tri-default-2 = <0xffffffff>;

} ;
onewire@0 {
compatible = "w1-gpio";
linux,open-drain;
status = "okay";
gpios = <&xps_gpio_1 0 0>;
};


I have vanilla Linux kernel version 3.10.25.

Output console log:

[ 5.509792] Driver for 1-wire Dallas network protocol.
[ 5.517738] bus: 'w1': registered
[ 5.520326] bus: 'w1': add driver w1_master_driver
[ 5.528401] bus: 'w1': add driver w1_slave_driver
[ 5.535256] bus: 'platform': add driver w1_gpio
[ 5.539853] bus: 'platform': driver_probe_device: matched device onewire.1 with driver w1_gpio
[ 5.548468] bus: 'platform': really_probe: probing driver w1_gpio with device onewire.1
[ 5.559964] of_get_named_gpio_flags exited with status 242
[ 5.565906] of_get_named_gpio_flags: can't parse gpios property
[ 5.572468] device: 'w1_bus_master1': device_add
[ 5.577198] bus: 'w1': add device w1_bus_master1
[ 5.584165] driver: 'w1_bus_master1': driver_bound: bound to device 'w1_master_driver'
[ 5.598911] driver: 'onewire.1': driver_bound: bound to device 'w1_gpio'
[ 5.606363] bus: 'platform': really_probe: bound device onewire.1 to driver w1_gpio

 

But my device is not in the sysfs :(

Why can this be?

Thank.

 

0 Kudos
1 Reply
Highlighted
Visitor
Visitor
2,596 Views
Registered: ‎05-18-2014

Dear zavhoz,

 

Did you manage to detect DS18B20 in sysfs?

 

I am having a similar problem. I am working with "Xilinx Spartan-6 FPGA LX9 MicroBoard" and I have installed a uClinux with microblaze 3.12.0 kernel.

 

The UCF configuration for DS18B20 looks similar.

# 1-wire interface.
# External pull-up is 680 Ohms requiring approximately 5mA to drive the line Low.
NET axi_gpio_0_GPIO_IO_pin[0] LOC = "E18" | IOSTANDARD = LVCMOS33 | SLEW = SLOW | DRIVE = 8; 

 

 

In the kernel configuration I have added the driver for "1-wire Bus Masters -> GPIO 1-wire busmaster" and the output console doesnt give any error about the it:

"Driver for 1-wire Dallas network protocol." Im not getting the next mensages that you obtain.

 

I see that you have some code for 1-wire in DTS. Have you added your own 1-wire core in EDK? 

 

Any suggestion why i can't detect my device?

 

Thank you in advance and best regards,

MagicPhoton

 

 

 

 

 

 

 

0 Kudos