Jump to content

martinayotte

Members
  • Posts

    3892
  • Joined

  • Last visited

Posts posted by martinayotte

  1. 48 minutes ago, PaddleStroke said:

    Could you please tell me how to do this? I don't know what is the control register nor how to initialize it.

    Download this UserGuide : http://dl.linux-sunxi.org/A20/A20 User Manual 2013-03-22.pdf

    Read the LRADC chapter starting at page 192.

    You will see the description of the ControlRegister at page 193-194.

    You need your /dev/mem to be "O_RDWR", not "R+" to allow writing into ControlRegister.

  2. On 9/12/2020 at 9:47 AM, mhc said:

    Thanks in advance to anyone who takes the time to read my issue, and if you have any suggestions, they will be more than welcome.

    Overlays on R40 is a bit different than the ones on H3 ...

    I've done tests on my BPiM2U using proper overlay which is "spi-spidev0" (not "spi-spidev") , without any needs for "param_spidev_spi_bus", and /dev/spidev0.0 appeared properly.

     

  3. On 9/8/2020 at 5:23 PM, Moan said:

    Any help would be very appreciated.

    Overlays on meson64 are tough and not well supported in Armbian.

    Even different Amlogic SoCs pinctrl are not compatible between them.

     

    I've took a quick look at my OdroidN2, and it seems that GPIOX_7 is pin 72.

    So, I've created a quick overlay source provided below, although I didn't attached any DS18B20, it seems to work :

    /dts-v1/;
    
    / {
    	compatible = "amlogic,meson-gxbb";
    
    	fragment@0 {
    		target-path = [ 2f 00 ];
    
    		__overlay__ {
    
    			onewire@0 {
    				compatible = "w1-gpio";
    				pinctrl-names = "default";
    				gpios = < 0xffffffff 0x48 0x06 >;
    				status = "okay";
    				phandle = < 0x01 >;
    			};
    		};
    	};
    
    	__symbols__ {
    		w1 = "/fragment@0/__overlay__/onewire@0";
    	};
    
    	__fixups__ {
    		gpio = "/fragment@0/__overlay__/onewire@0:gpios:0";
    	};
    };

    Executing the command "cat /sys/kernel/debug/gpio" provided me the following output, and as we can see the w1 bus appeared :

    gpiochip1: GPIOs 412-426, parent: platform/ff800000.sys-ctrl:pinctrl@14, aobus-banks:
     gpio-420 (                    |regulator-tflash_vdd) out hi 
     gpio-421 (                    |TF_IO               ) out lo 
     gpio-423 (                    |n2:blue             ) out lo 
    
    gpiochip0: GPIOs 427-511, parent: platform/ff634400.bus:pinctrl@40, periphs-banks:
     gpio-442 (                    |PHY reset           ) out hi ACTIVE LOW
     gpio-447 (                    |usb-hub-reset       ) in  hi 
     gpio-448 (                    |regulator-hub_5v    ) out hi 
     gpio-449 (                    |regulator-usb_pwr_en) out lo 
     gpio-464 (                    |reset               ) out hi ACTIVE LOW
     gpio-474 (                    |cd                  ) in  hi ACTIVE LOW
     gpio-499 (                    |onewire@0           ) out hi 

    Hoping this helped ...

×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines