Skip to contentSkip to conversation

dt-bindings: soc: imx: Add binding doc for spba bus

PATCH Superseded Adam Ford 2 participants 2 messages Nov 11, 2020 Device tree bindings

v3 of 5 Superseded Latest is v5 →

lore
Share & tools
lore

Adam Ford

author
#0 lore raw

PATCH v3 1/1 dt-bindings: soc: imx: Add binding doc for spba bus

Add binding doc for fsl,spba-bus.

---
make dt_binding_check showed no errors if I did this right.

V3: Rebase sample from aips-bus example
Split off from series adding i.MX8M Nano functions to reduce noise
V2: Attempted to update yaml from feedback

Documentation/devicetree/bindings/Makefile +1 -8
index f50420099a55..ec8073cb2e71 100644
@@ -3,8 +3,6 @@ DT_DOC_CHECKER ?= dt-doc-validate
 DT_EXTRACT_EX ?= dt-extract-example
 DT_MK_SCHEMA ?= dt-mk-schema
 
-DT_SCHEMA_LINT = $(shell which yamllint)
-
 DT_SCHEMA_MIN_VERSION = 2020.8.1
 
 PHONY += check_dtschema_version
@@ -26,10 +24,6 @@ find_cmd = find $(srctree)/$(src) \( -name '*.yaml' ! \
 		-name 'processed-schema*' ! \
 		-name '*.example.dt.yaml' \)
 
-quiet_cmd_yamllint = LINT    $(src)
-      cmd_yamllint = $(find_cmd) | \
-                     xargs $(DT_SCHEMA_LINT) -f parsable -c $(srctree)/$(src)/.yamllint
-
 quiet_cmd_chk_bindings = CHKDT   $@
       cmd_chk_bindings = $(find_cmd) | \
                          xargs -n200 -P$$(nproc) $(DT_DOC_CHECKER) -u $(srctree)/$(src)
@@ -43,7 +37,6 @@ quiet_cmd_mk_schema = SCHEMA  $@
 		      rm -f $$f
 
 define rule_chkdt
-	$(if $(DT_SCHEMA_LINT),$(call cmd,yamllint),)
 	$(call cmd,chk_bindings)
 	$(call cmd,mk_schema)
 endef
@@ -55,7 +48,7 @@ override DTC_FLAGS := \
 	-Wno-graph_child_address \
 	-Wno-interrupt_provider
 
-$(obj)/processed-schema-examples.json: $(DT_DOCS) $(src)/.yamllint check_dtschema_version FORCE
+$(obj)/processed-schema-examples.json: $(DT_DOCS) check_dtschema_version FORCE
 	$(call if_changed_rule,chkdt)
 
 ifeq ($(DT_SCHEMA_FILES),)
Documentation/devicetree/bindings/bus/fsl,spba-bus.yaml new file +65 -0

65 lines not on this page · raw message

Signature · 1 line
2.25.1
#1 lore raw
Quoted 16 lines · Adam Ford

Add binding doc for fsl,spba-bus.

---
make dt_binding_check showed no errors if I did this right.

V3: Rebase sample from aips-bus example
Split off from series adding i.MX8M Nano functions to reduce noise
V2: Attempted to update yaml from feedback

Documentation/devicetree/bindings/Makefile +0 -0
index f50420099a55..ec8073cb2e71 100644

Documentation/devicetree/bindings/Makefile DT_DOC_CHECKER ?= dt-doc-validate · line 7

Quoted 5 lines
Documentation/devicetree/bindings/Makefile +0 -2
@@ -3,8 +3,6 @@ DT_DOC_CHECKER ?= dt-doc-validate
 DT_EXTRACT_EX ?= dt-extract-example
 DT_MK_SCHEMA ?= dt-mk-schema
 
-DT_SCHEMA_LINT = $(shell which yamllint)
-

???

Quoted 83 lines
Documentation/devicetree/bindings/Makefile +1 -6
 DT_SCHEMA_MIN_VERSION = 2020.8.1
 
 PHONY += check_dtschema_version
@@ -26,10 +24,6 @@ find_cmd = find $(srctree)/$(src) \( -name '*.yaml' ! \
                -name 'processed-schema*' ! \
                -name '*.example.dt.yaml' \)
 
-quiet_cmd_yamllint = LINT    $(src)
-      cmd_yamllint = $(find_cmd) | \
-                     xargs $(DT_SCHEMA_LINT) -f parsable -c $(srctree)/$(src)/.yamllint
-
 quiet_cmd_chk_bindings = CHKDT   $@
       cmd_chk_bindings = $(find_cmd) | \
                          xargs -n200 -P$$(nproc) $(DT_DOC_CHECKER) -u $(srctree)/$(src)
@@ -43,7 +37,6 @@ quiet_cmd_mk_schema = SCHEMA  $@
                      rm -f $$f
 
 define rule_chkdt
-       $(if $(DT_SCHEMA_LINT),$(call cmd,yamllint),)
        $(call cmd,chk_bindings)
        $(call cmd,mk_schema)
 endef
@@ -55,7 +48,7 @@ override DTC_FLAGS := \
        -Wno-graph_child_address \
        -Wno-interrupt_provider
 
-$(obj)/processed-schema-examples.json: $(DT_DOCS) $(src)/.yamllint check_dtschema_version FORCE
+$(obj)/processed-schema-examples.json: $(DT_DOCS) check_dtschema_version FORCE
        $(call if_changed_rule,chkdt)
 
 ifeq ($(DT_SCHEMA_FILES),)
Documentation/devicetree/bindings/bus/fsl,spba-bus.yaml new file +46 -0
new file mode 100644
index 000000000000..91dae405ed39
@@ -0,0 +1,65 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/bus/fsl,spba-bus.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Shared Peripherals Bus Interface
+
+maintainers:
+  - Shawn Guo <[email protected]>
+
+description: |
+  A simple bus enabling access to shared peripherals.
+
+  The "spba-bus" follows the "simple-bus" set of properties, as
+  specified in the Devicetree Specification.  It is an extension of
+  "simple-bus" because the SDMA controller uses this compatible flag to
+  determine which peripherals are available to it and the range over which
+  the SDMA can access.  There are no special clocks for the bus, because
+  the SDMA controller itself has its interrupt, and clock assignments.
+
+select:
+  properties:
+    compatible:
+      contains:
+        const: fsl,spba-bus
+  required:
+    - compatible
+
+properties:
+  $nodename:
+    pattern: "^bus(@[0-9a-f]+)?$"
+
+  compatible:
+    items:
+      - const: fsl,spba-bus
+      - const: simple-bus
+
+  '#address-cells':
+    enum: [ 1, 2 ]
+
+  '#size-cells':
+    enum: [ 1, 2 ]
+
+  ranges: true
+

Documentation/devicetree/bindings/bus/fsl,spba-bus.yaml line 55

Quoted 10 lines
Documentation/devicetree/bindings/bus/fsl,spba-bus.yaml new file +9 -0
+required:
+  - compatible
+  - '#address-cells'
+  - '#size-cells'
+  - ranges
+
 
+additionalProperties: true
+
+type: object

Should be:

additionalProperties:
type: object

Quoted 13 lines
Documentation/devicetree/bindings/bus/fsl,spba-bus.yaml new file +10 -1
+
+examples:
+  - |
+    bus@30000000 {
+        compatible = "fsl,spba-bus", "simple-bus";
+        #address-cells = <1>;
+        #size-cells = <1>;
+        reg = <0x30000000 0x100000>;
+        ranges;
+    };
--

2.25.1