Message ID | 20240701151231.29425-3-kyarlagadda@nvidia.com |
---|---|
State | New |
Delegated to: | Andi Shyti |
Headers | show |
Series | Introduce Tegra register config settings | expand |
On Mon, 01 Jul 2024 20:42:20 +0530, Krishna Yarlagadda wrote: > Config framework parses device tree and provides a list of register > settings with mask per mode to be applied by the controller. > > Add binding document for config settings framework. Config settings > are defined as a property per field and have different modes per device. > > Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com> > --- > .../misc/nvidia,tegra-config-settings.yaml | 62 +++++++++++++++++++ > MAINTAINERS | 1 + > 2 files changed, 63 insertions(+) > create mode 100644 Documentation/devicetree/bindings/misc/nvidia,tegra-config-settings.yaml > My bot found errors running 'make dt_binding_check' on your patch: yamllint warnings/errors: ./Documentation/devicetree/bindings/misc/nvidia,tegra-config-settings.yaml:46:1: [error] syntax error: found character '\t' that cannot start any token (syntax) dtschema/dtc warnings/errors: make[2]: *** Deleting file 'Documentation/devicetree/bindings/misc/nvidia,tegra-config-settings.example.dts' Documentation/devicetree/bindings/misc/nvidia,tegra-config-settings.yaml:46:1: found character that cannot start any token make[2]: *** [Documentation/devicetree/bindings/Makefile:26: Documentation/devicetree/bindings/misc/nvidia,tegra-config-settings.example.dts] Error 1 make[2]: *** Waiting for unfinished jobs.... ./Documentation/devicetree/bindings/misc/nvidia,tegra-config-settings.yaml:46:1: found character that cannot start any token /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/misc/nvidia,tegra-config-settings.yaml: ignoring, error parsing file make[1]: *** [/builds/robherring/dt-review-ci/linux/Makefile:1430: dt_binding_check] Error 2 make: *** [Makefile:240: __sub-make] Error 2 doc reference errors (make refcheckdocs): See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20240701151231.29425-3-kyarlagadda@nvidia.com The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch. If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date: pip3 install dtschema --upgrade Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.
diff --git a/Documentation/devicetree/bindings/misc/nvidia,tegra-config-settings.yaml b/Documentation/devicetree/bindings/misc/nvidia,tegra-config-settings.yaml new file mode 100644 index 000000000000..4e5d52504c01 --- /dev/null +++ b/Documentation/devicetree/bindings/misc/nvidia,tegra-config-settings.yaml @@ -0,0 +1,62 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/misc/nvidia,tegra-config-settings.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Config properties for a device + +description: + Config setting is the configuration based on chip/board/system + characterization on interface/controller settings. This is needed for + - making the controller internal configuration to better perform + - making the interface to work proper by setting drive strength, slew + rates etc + - making the low power leakage. + There are two types of recommended configuration settings + - Controller register specific for internal operation of controller. + - Pad control/Pinmux/pincontrol registers for interfacing. + These configurations can further be categorized as static and dynamic. + - Static config does not change until a controller is reset. + - Dynamic config changes based on mode or condition, controller is + operating in. + +maintainers: + - Thierry Reding <thierry.reding@gmail.com> + +properties: + $nodename: + const: configsettings + +patternProperties: + "config-[a-z0-9_]+$": + description: + Config node representing properties of a device. Properties of + each device are listed under a unique subnode and referenced from + device node. + type: object + additionalProperties: false + + patternProperties: + "^[a-z0-9_]+-cfg$": + description: + Config profiles applied conditionally. + type: object + patternProperties: + "nvidia,[a-z0-9_]+$": + description: + Register field configuration. + $ref: /schemas/types.yaml#/definitions/uint32 + +additionalProperties: true + +examples: + - | + configsettings { + configi2c1: config-i2c3160000 { + i2c-common-cfg { + nvidia,i2c-hs-sclk-high-period = <0x03>; + nvidia,i2c-hs-sclk-low-period = <0x08>; + }; + }; + }; diff --git a/MAINTAINERS b/MAINTAINERS index 8a60c98ac755..ac8410ed421f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -22260,6 +22260,7 @@ M: Thierry Reding <thierry.reding@gmail.com> R: Laxman Dewangan <ldewangan@nvidia.com> R: Krishna Yarlagadda <kyarlagadda@nvidia.com> S: Supported +F: Documentation/devicetree/bindings/misc/nvidia,tegra-config-settings.yaml F: Documentation/misc-devices/tegra-cfg.rst TEGRA PWM DRIVER
Config framework parses device tree and provides a list of register settings with mask per mode to be applied by the controller. Add binding document for config settings framework. Config settings are defined as a property per field and have different modes per device. Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com> --- .../misc/nvidia,tegra-config-settings.yaml | 62 +++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 63 insertions(+) create mode 100644 Documentation/devicetree/bindings/misc/nvidia,tegra-config-settings.yaml