Jump to content

martinayotte

Members
  • Posts

    3892
  • Joined

  • Last visited

Posts posted by martinayotte

  1. 3 hours ago, sgjava said:

    do you have an example for /boot/armbianEnv.txt gpio-line-names?

    I've manually copied my gpio-line-names.dtbo under /boot/dts/overlay/sun8i-h3-gpio-line-names.dtbo

    Then, I added "overlays=gpio-line-names" in /boot/armbianEnv.txt, and rebooted ...

    3 hours ago, sgjava said:

    This is generated board specific, correct?

    Yes, my test was for OrangePiPC+, and tested using libgpiod "gpioinfo" ...

  2. 16 hours ago, sgjava said:

    but this should only impact Duo.

    Although I've never tried, patches could be board specific using a subdirectory such as ./patch/kernel/sunxi-dev/nanopi-duo/board-h2plus-nanopi-duo-add-device.patch

     

    BTW, I've tried dynamic loading of gpio-line-names.dtbo overlay, but it doesn't work, but doing it in /boot/armbianEnv.txt works.

    I think it is due that gpio-lines-names property is only checked while initializing pinctrl at boot time.

  3. 1 hour ago, sgjava said:

    I need to know how to do overlay.

     

    Here is a quick/not-tested/incomplete overlay sources named gpio-line-names.dts :

     

    /dts-v1/;
    /plugin/;
    / {
    	compatible = "allwinner,sun8i-h3";
    	fragment@1 {
    		target = <&pio>;
    		__overlay__ {
    			gpio-line-names = "", "", "", "", "TX", "RX", "", "", 
    					"", "", "", "", "", "", "", "STATUS-LED", 
    					"MUTE", "SPDIF-OUT", "", "", "", "", "", "", 
    					"", "", "", "", "", "", "", "", 
    					"", "", "", "", "", "", "", "", 
    					"", "", "", "", "", "", "", ""; 
    		};
    	};
    };

     

    Then, compile it as DTB with this command :

    dtc -O dtb -I dts -o gpio-line-names.dtbo gpio-line-names.dts

     

    To try loading DTB dynamically into main tree without doing it in /boot/armbianEnv.txt, execute those commands :

     

    mkdir /sys/kernel/config/device-tree/overlays/gpionames
    cat gpio-line-names.dtbo > /sys/kernel/config/device-tree/overlays/gpionames/dtbo
    cat /sys/kernel/config/device-tree/overlays/gpionames/status

     

    The last command should provide "applied" status.

     

    Then, you can test names with your own tool ...

     

  4. 53 minutes ago, sgjava said:

    is this documented somewhere? I'll give that a try.

    Do you mean how to write an overlay ?

     

    Or do you mean how "gpio-line-names" is used ?

     

    Here is a general example from https://elixir.bootlin.com/linux/v4.7/source/Documentation/devicetree/bindings/gpio/gpio.txt

     

    gpio-controller@00000000 {
    	compatible = "foo";
    	reg = <0x00000000 0x1000>;
    	gpio-controller;
    	#gpio-cells = <2>;
    	ngpios = <18>;
    	gpio-line-names = "MMC-CD", "MMC-WP", "VDD eth", "RST eth", "LED R",
    		"LED G", "LED B", "Col A", "Col B", "Col C", "Col D",
    		"Row A", "Row B", "Row C", "Row D", "NMI button",
    		"poweroff", "reset";
    }

     

    It is not exact syntax, since it is depending of SoC main DT, for example, on H3, the controller would be "pinctrl@1c20800" ...

  5. 1 hour ago, anITiot said:

    I had some issues with one-wire and gpio on my OP3

    That is because "sun50i-h6-fixup.scr" doesn't handle "L" bank (and "H" bank as well) as you can see here :

    setenv decompose_pin 'setexpr tmp_bank sub "P(A|C|D|G)\\d+" "\\1";
    setexpr tmp_pin sub "P\\S(\\d+)" "\\1";
    test "${tmp_bank}" = "A" && setenv tmp_bank 0;
    test "${tmp_bank}" = "C" && setenv tmp_bank 2;
    test "${tmp_bank}" = "D" && setenv tmp_bank 3;
    test "${tmp_bank}" = "G" && setenv tmp_bank 6'

     

    Feel free to tweak that script and submit the fix in a PR...

     

    EDIT : adding "H" bank should be pretty easy, but for "L" bank, it would be a bit harder since it need to change also the "pinctrl" with some "if" statements :

    ("L" bank is using "pinctrl@7022000" instead of "pinctrl@300b000" ...)

     

    if test -n "${param_w1_pin}"; then
    	setenv tmp_bank "${param_w1_pin}"
    	setenv tmp_pin "${param_w1_pin}"
    	run decompose_pin
    	fdt set /soc/pinctrl@300b000/w1_pins pins "${param_w1_pin}"
    	fdt get value tmp_phandle /soc/pinctrl@300b000 phandle
    	fdt set /onewire@0 gpios "<${tmp_phandle} ${tmp_bank} ${tmp_pin} 0>"
    	env delete tmp_pin tmp_bank tmp_phandle
    fi
    
    if test "${param_w1_pin_int_pullup}" = "1"; then
    	fdt set /soc/pinctrl@300b000/w1_pins bias-pull-up
    fi

     

  6. 53 minutes ago, J.M. said:

    i did checked it,

    and configs in your cache/source/u-boot/v2019.04/.config

    and cache/sources/u-boot/v2019.04/arch/arm/dts/sun7i-a20-lamobo-r1.dts

    seems to hold the same configuration...

    But the ".config" I've provided is "default = no i2c", you need to turn most of those to "=y" instead of "is not set" ...

  7. 14 hours ago, J.M. said:

    I  don't see any i2c bus in here.

    Did you checked all the possible configs in your cache/source/u-boot/v2019.04/.config

     

    By default, "grep -i i2c" is showing :

     

    # CONFIG_I2C0_ENABLE is not set
    # CONFIG_I2C1_ENABLE is not set
    # CONFIG_I2C2_ENABLE is not set
    # CONFIG_SPL_I2C_SUPPORT is not set
    # CONFIG_CMD_I2C is not set
    # I2C support
    # CONFIG_DM_I2C is not set
    # CONFIG_SYS_I2C_DW is not set
    # CONFIG_SYS_I2C_IMX_LPI2C is not set
    # CONFIG_SYS_I2C_MXC is not set
    # CONFIG_I2C_EDID is not set

     

  8. On 11/30/2020 at 10:36 AM, Werner said:

    This did not happen with the old version?

    I've checked on my second OPi0 where I didn't upgrade firmware, so still previous version, and the issue is also present :

    [   14.824376] xradio: XR819 device discovered
    [   15.056442] xradio: hardware vers. 7.9
    [   15.056457] xradio: firmware vers. 8 (WSM), build 43, api 1060, cap 0x0003
    [   15.056460] xradio: Config USE_EXTENSIONS
    [   40.809788] xradio TXRX-WRN: received frame has no key status
    [   40.809802] xradio TXRX-WRN: dropped received frame
    [ 3653.654011] xradio WRN: BH: missed 4 consecutive interrupts!
    [ 5423.670767] xradio WRN: BH: missed 5 consecutive interrupts!
    [ 7584.760350] xradio WRN: BH: missed 6 consecutive interrupts!
    [ 9724.478792] xradio WRN: BH: missed 7 consecutive interrupts!
    [10080.291066] xradio WRN: BH: missed 8 consecutive interrupts!
    [10777.751448] xradio WRN: BH: missed 9 consecutive interrupts!
    [13480.647858] xradio WRN: BH: missed 10 consecutive interrupts!
    [18367.827745] xradio WRN: BH: missed 11 consecutive interrupts!
    [19237.530227] xradio WRN: BH: missed 12 consecutive interrupts!
    [20461.024844] xradio WRN: BH: missed 13 consecutive interrupts!

     

×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines