I want to add custom outputs to my custom board dts: this thread mirrors exactly what I'm doing:
The advice was as below. So after creating the bindings file I try to add a "compatible=" line to my child node in my DTS file and I get "unknown node type gpio-outputs". If I use the helper in VCS (CTRL-Space) then my node doesn't appear in the list.
Tried saving in my board or board/bindings directories but It will only work if I save my yaml file in my NCS directoty C:\ncs\v2.9.0\zephyr\dts\bindings\gpio which I don't want to do.
Do I have to add an explicit path when I want to use it? That would seem a bit odd.
I would create a yaml file call, for example, gpio-outputs.yaml. and copy gpio-leds.yaml context into it and modify and you can copy this file either into your project/boards/bindings or zephyr/dts/bindings/gpio. Both will work.
# Copyright (c) 2018, Linaro Limited # SPDX-License-Identifier: Apache-2.0 compatible: "gpio-outputs" child-binding: description: GPIO output child node properties: gpios: type: phandle-array required: true label: required: false type: string description: | Human readable string describing the pin. It can be used by an application to identify this pin or to retrieve its number/index (i.e. child node number) on the parent device.