PINE64

Full Version: Dallas 1-Wire Support
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
, I've seen this thread, but it has nothing to do with Dallas-W1, only mentioned that the pin can freed for other uses.

, 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 ?)
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
, 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
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.
(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.
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.
, 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!
Confirmed that with a lot of patience (Thanks a lot martinayotte!!) This is now working on my Pine Smile
(07-11-2016, 10:34 AM)longsleep Wrote: [ -> ], 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 ...
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)
Pages: 1 2 3 4