• Posts

  • Joined

  • Last visited

Reputation Activity

  1. Like
    zador.blood.stained got a reaction from wildcat_paris in learning device tree   
    Mainline kernel comes with new gpio driver with standart linux gpio interface, it doesn't need any DT configuration. You need to "export" pin number for it to appear in sysfs tree (I'm assuming you want sysfs access)
    Read section "Accessing the GPIO pins through sysfs with mainline kernel" here:
  2. Like
    zador.blood.stained got a reaction from wildcat_paris in learning device tree   
    FYI, I checked, using dtc from device-tree-compiler on device itself is an easier way to make such small changes in Device Tree config.
    Decompiled dts looks a bit different compared to original, but it's easy to find LED related sections and values.
  3. Like
    zador.blood.stained got a reaction from ASCIInaut in Cubietruck UART 3 4 7 Pin Out (serial, ttyS)   
    Other serial devices are not enabled in Device Tree by default, you need to modify Device Tree files and compile new dtb file to enable them.
    Starting from here are sections for serial devices, common for all A20 devices, here uart0 is enabled. You need to add similar sections for serial devices that you want, using pinctrl parameters from here (which also answers your questions for pin numbers, you can check pin mappings in cubietruck schematics pdf).
    Use build script to recompile kernel (you only need new sun7i-a20-cubietruck.dtb file), adding, for example, this section to sun7i-a20-cubietruck.dts to activate uart2
    &uart2 { pinctrl-names = "default"; pinctrl-0 = <&uart2_pins_a>; status = "okay"; }; Some uarts have different pinout variants, check schematic or maybe script.fex to find correct one.
    If pinctrl section lists 4 pins instead of 2, two other pins are RTS and CTS signals, you probably won't use them.