Dallas 1-Wire Support
#11
@peterz, I've seen this thread, but it has nothing to do with Dallas-W1, @tlim only mentioned that the pin can freed for other uses.

@longsleep, I don't think I will have a PR soon, "time is the missing ingredient".
Also, I'm struggling a bit about tweaking DTS since all W1 example shows how to do it in original kernel DTS, not in a decompiled one like Pine64 is curently using. (btw, do we have access somewhere to original DTS and DTSI files ?)
  Reply
#12
Well, the device tree sources are in the Kernel tree - but i pretty much have given up on them after the first look and preferred to use the decompiled ones. If you have time it would be great to have a merge request which applies the required changes to the in kernel tree device tree sources Smile
  Reply
#13
Wink 
@longsleep, do you mean that the current decompiled version is coming from the one in arch/arm64/boot/dts done awhile ago by AllWinner ?
Looking at https://github.com/longsleep/linux-pine6...1-fpga.dts, it seems that they've done it for another board (with FPGA).
In this case, I will probably try to revamp it under Pine64 name, but don't expect that will be done soon, since "time still the missing ingredient".  Undecided
  Reply
#14
Just to let people know that I've finally got the "w1-gpio" working on Pin64 with a DS18B20.
The issue that I was facing is a discrepancy in DTS that I've not seen in other ARM boards but only on Pine64, but after doing kernel debugging, I've found a simple workaround in DTS.
Mainly, here it is :
Code:
               onewire_device@0 {
                       compatible = "w1-gpio";
                       gpio = <0x30 0x2 0x8 0x0>;
//                      gpios = <0x30 0x2 0x8 0x0 0x0 0x0 0x0>;
                       pinctrl-names = "default";
                       pinctrl-0 = <0xba>;
                       status = "okay";
               };

The issue is when using "gpios = <0x30 0x2 0x8 0x0>;", the DT parser give out this error : "arguments longer than property", it seems that plural "gpios" means you need to provide multiple gpios, not only one. Removing the "s" seems to do identical job with a single gpio.
  Reply
#15
(05-29-2016, 03:49 PM)martinayotte Wrote: Just to let people know that I've finally got the "w1-gpio" working on Pin64 with a DS18B20.
The issue that I was facing is a discrepancy in DTS that I've not seen in other ARM boards but only on Pine64, but after doing kernel debugging, I've found a simple workaround in DTS.
Mainly, here it is :
Code:
               onewire_device@0 {
                       compatible = "w1-gpio";
                       gpio = <0x30 0x2 0x8 0x0>;
//                      gpios = <0x30 0x2 0x8 0x0 0x0 0x0 0x0>;
                       pinctrl-names = "default";
                       pinctrl-0 = <0xba>;
                       status = "okay";
               };

The issue is when using "gpios = <0x30 0x2 0x8 0x0>;", the DT parser give out this error : "arguments longer than property", it seems that plural "gpios" means you need to provide multiple gpios, not only one. Removing the "s" seems to do identical job with a single gpio.

Thanks on your tips.
  Reply
#16
In my previous post says that "gpio = <0x30 0x2 0x8 0x0>;" could be used instead of "gpios = <0x30 0x2 0x8 0x0 0x0 0x0 0x0>;" was a bit misleading. It was fixing the DT parser issue, but it was still preventing the "w1-gpio" to work properly.
So, the real fix is still using "gpios = <0x30 0x2 0x8 0x0 0x0 0x0 0x0>;" with those 3 additional zeros.
  Reply
#17
@martinayotte, Does it make sense to have this as "disabled" in the DTS by default? Would you make a PR to the dts with the section added as status = "disabled" ? Thanks!
  Reply
#18
Confirmed that with a lot of patience (Thanks a lot martinayotte!!) This is now working on my Pine Smile
  Reply
#19
(07-11-2016, 10:34 AM)longsleep Wrote: @martinayotte, Does it make sense to have this as "disabled" in the DTS by default? Would you make a PR to the dts with the section added as status = "disabled" ? Thanks!

Of course, I will do, tonight or tomorrow ...
  Reply
#20
PR done !
( For the discrepancy between singular/plurial "gpio/gpios", I won't spend more time on it since it could be discrepancy between 3.10.x and 4.6.x)
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Question RGB LED Matrix support? foxnox 1 4,246 12-29-2017, 06:52 PM
Last Post: psychedup
  RaZberry Module (z-wave) need support to get it working! Luxus 13 18,716 11-03-2016, 02:04 AM
Last Post: Luxus
  USB WIFI Dongle Support InCognito 3 6,511 01-20-2016, 11:27 AM
Last Post: tllim

Forum Jump:


Users browsing this thread: 1 Guest(s)