Changes between Version 23 and Version 24 of linux/devicetree


Ignore:
Timestamp:
09/16/2025 11:05:34 PM (7 weeks ago)
Author:
Ryan Erbstoesser
Comment:

add note about examples

Legend:

Unmodified
Added
Removed
Modified
  • linux/devicetree

    v23 v24  
    164164
    165165Examples:
    166  1. add a SPI NOR flash device on an off-board SPI connector. Such a device has a Linux kernel driver and requires using device-tree bindings:
     166 1. Add a SPI NOR flash device on an off-board SPI connector. Such a device has a Linux kernel driver and requires using device-tree bindings:
    167167{{{
    168168/dts-v1/;
     
    198198}}}
    199199
    200  2. repurpose the I2C3 and SPI2 pins on a GW730x to GPIO's to be used in userspace via gpiod/sysfs:
     200 2. Repurpose the I2C3 and SPI2 pins on a GW730x to GPIO's to be used in userspace via gpiod/sysfs:
    201201  - the dts framgment here has C style includes required for the pinmux definitions and the gpio definitions so we use cpp to pre-process it before compiling
    202202  - the includes here are from the Linux kernel so you must have the linux kernel source to compile this, place the file in the proper directory per the includes (imx8mm-pinfunc.h is in arch/arm64/boot/dts/freescale so that is where we put the file in our example), and compile from the correct directory such that the includes can be found
     
    312312}}}
    313313
    314  3. repurpose the I2C3 and SPI2 pins on a GW730x to GPIO's (like above) but bind 4 of them to the gpio-keys driver to use as up/down/right/left buttons and bind 2 of them to the gpio-led driver to use as leds via /sys/class/led
     314 3. Repurpose the I2C3 and SPI2 pins on a GW730x to GPIO's (like above) but bind 4 of them to the gpio-keys driver to use as up/down/right/left buttons and bind 2 of them to the gpio-led driver to use as leds via /sys/class/led
    315315  - the dts framgment here has C style includes required for the pinmux definitions and the gpio definitions so we use cpp to pre-process it before compiling
    316316  - we use gpio-keys1 and led-controller1 node names so as not to collide with gpio-keys and led-controller nodes already defined in the gw73xx-0x device-tree
     
    455455 * A list of optional files specified by {{{fdt_overlays}}} will be loaded and applied as overlays and if defined {{{fixfdt}}} will be run as well.
    456456
    457 
     457==== Venice GW7300 GPIO Example
     458
     459An example of how to repurpose pins to get more GPIO pins on a Venice SBC, in this example the GW73xx. See the example in this section: [#DeviceTreeOverlaysakaFragments]
    458460==== Venice GW7100 Example
    459461