pinctrl: qcom: ipq4019: Use of gpio-hog's

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I have here a board (IPQ4019 based) which requires an GPIO set to output + low 
to enable the USB. This should be defined via the DTS and thus a gpio-hog 
seemed to be appropriate in the tlmm:

    &tlmm {
        serial_pins: serial_pinmux {
                mux {
                        pins = "gpio16", "gpio17";
                        function = "blsp_uart0";
                        bias-disable;
                };
        };
    
        spi_0_pins: spi_0_pinmux {
                pin {
                        function = "blsp_spi0";
                        pins = "gpio13", "gpio14", "gpio15";
                        drive-strength = <12>;
                        bias-disable;
                };
                pin_cs {
                        function = "gpio";
                        pins = "gpio12";
                        drive-strength = <2>;
                        bias-disable;
                        output-high;
                };
        };
    
        enable-usb-power {
                gpio-hog;
                gpios = <58 GPIO_ACTIVE_LOW>;
                output-low;
                line-name = "enable USB2 power";
        };
    };

But this seems to be incompatible with the general design because it now kills 
the bootup completely.

    [    0.450188] tcsr 194b000.tcsr: setting usb hs phy mode select = e700e7
    [    0.452392] tcsr 1949000.tcsr: setting wifi_glb_cfg = 41000000
    [    0.458920] tcsr 1953000.ess_tcsr: setting ess interface select = 0
    [    0.464703] tcsr 1957000.tcsr: setting wifi_noc_memtype_m0_m2 = 2222222
    [    0.471037] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
    [    0.477838] msm_serial 78af000.serial: could not find pctldev for node /soc/pinctrl@1000000/serial_pinmux, deferring probe
    [    0.484099] msm_serial: driver initialized
    [    0.499194] loop: module loaded
    [    0.499828] spi_qup 78b5000.spi: could not find pctldev for node /soc/pinctrl@1000000/spi_0_pinmux, deferring probe
    [    0.502492] libphy: ipq40xx_mdio: probed
    [    0.579649] ESS reset ok!
    [    0.612618] ESS reset ok!
    [    1.048734] libphy: Fixed MDIO Bus: probed
    [    1.248823] i2c /dev entries driver
    [    1.279240] NET: Registered protocol family 10
    [    1.281378] Segment Routing with IPv6
    [    1.282648] NET: Registered protocol family 17
    [    1.286635] 8021q: 802.1Q VLAN Support v1.8
    [    1.290792] Registering SWP/SWPB emulation handler
    [    1.298883] requesting hog GPIO enable USB2 power (chip 1000000.pinctrl, offset 58) failed, -517
    [    1.299609] gpiochip_add_data: GPIOs 0..99 (1000000.pinctrl) failed to register
    [    1.308589] ipq4019-pinctrl 1000000.pinctrl: Failed register gpiochip
    [    1.316586] msm_serial 78af000.serial: could not find pctldev for node /soc/pinctrl@1000000/serial_pinmux, deferring probe
    [    1.322415] spi_qup 78b5000.spi: could not find pctldev for node /soc/pinctrl@1000000/spi_0_pinmux, deferri

What is the correct way for qcom,ipq4019-pinctrl to configure a pin during 
bootup (gpio-hog)? I can use the deprecated gpio sysfs infrastructure for
now but this seems to be only a dirty hack.

    echo 58 > /sys/class/gpio/export
    echo out > /sys/class/gpio/gpio58/direction
    echo 0 > /sys/class/gpio/gpio58/value

Kind regards,
	Sven

Attachment: signature.asc
Description: This is a digitally signed message part.


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux