IMX6 1-Wire Pin Config Not Working

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

IMX6 1-Wire Pin Config Not Working

1,097 Views
nicholash
Contributor I

Hi,

I'm trying to get the 1-wire GPIO driver that bit-bangs 1-wire working under Linux. The problem I have is that I can't seem to set the pin to open-drain mode. I have the following entries in my device tree:

    onewire {
        compatible = "w1-gpio";
        pinctrl-names = "w1grp";
        pinctrl-0 = <&pinctrl_w1>;
        gpios = <&gpio1 27 0>;
        linux,open-drain;
        status = "okay";
    };

    pinctrl_w1: w1grp {
        fsl,pins = <
            MX6UL_PAD_UART3_RTS_B__GPIO1_IO27        0x4001b8b1
        >;
    };

I can drive it down but it's still definitely in push-pull mode from watching the pin on the oscilloscope. (Sharp edges and I can see the 1-wire device trying to pull it done.

Is there anything else I need to set to make this work?

Labels (1)
Tags (2)
0 Kudos
4 Replies

995 Views
igorpadykov
NXP Employee
NXP Employee

Hi Nick

one can try to clear bit12 PKE  - 0 PKE_0_Pull_Keeper_Disabled, described in

sect.30.5.203 SW_PAD_CTL_PAD_UART3_RTS_B SW PAD Control
Register (IOMUXC_SW_PAD_CTL_PAD_UART3_RTS_B)

i.MX 6UltraLite Applications Processor Reference Manual

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

995 Views
nicholash
Contributor I

Thanks Igor,

I have attempted this and it does not make a difference. Is there anyway to find where it is being set?

I have tried debugging in the Linux function that parses the device trees and shows the correct value being set and also doesn't have a second entry for the pin.

0 Kudos

995 Views
igorpadykov
NXP Employee
NXP Employee

Hi Nick

one can try to set it with jtag, for example in uboot.

Also this may be hardware issue, such as shortening with other signal.

Best regards
igor

0 Kudos

995 Views
nicholash
Contributor I

Hi Igor,

I configured it to work in uBoot and got it to successfully configure the pin and use the chip.

I've decided not to further debug why it does not work in Linux, uBoot fits my use case better.

0 Kudos