Add bindings for the SOPHGO SG2042 SPI-NOR flash controller,
which is compatible with SOPHGO SG2044.
Signed-off-by: Zixian Zeng <sycamoremoon376@gmail.com>
---
Documentation/devicetree/bindings/spi/spi-sg2044-nor.yaml | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/spi/spi-sg2044-nor.yaml b/Documentation/devicetree/bindings/spi/spi-sg2044-nor.yaml
index 948ff7a096433a8c3c64cba13fc1339d18f6c19d..e083362e8f76f7a7582fd7b98c0b7a36f61577cc 100644
--- a/Documentation/devicetree/bindings/spi/spi-sg2044-nor.yaml
+++ b/Documentation/devicetree/bindings/spi/spi-sg2044-nor.yaml
@@ -14,7 +14,11 @@ allOf:
properties:
compatible:
- const: sophgo,sg2044-spifmc-nor
+ description: Compatible strings for SOPHGO SPI NOR controller
+ items:
+ - enum:
+ - sophgo,sg2042-spifmc-nor
+ - const: sophgo,sg2044-spifmc-nor
reg:
maxItems: 1
--
2.49.0
On Fri, 23 May 2025 18:54:49 +0800, Zixian Zeng wrote:
> Add bindings for the SOPHGO SG2042 SPI-NOR flash controller,
> which is compatible with SOPHGO SG2044.
>
> Signed-off-by: Zixian Zeng <sycamoremoon376@gmail.com>
> ---
> Documentation/devicetree/bindings/spi/spi-sg2044-nor.yaml | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
My bot found errors running 'make dt_binding_check' on your patch:
yamllint warnings/errors:
./Documentation/devicetree/bindings/spi/spi-sg2044-nor.yaml:20:9: [warning] wrong indentation: expected 10 but found 8 (indentation)
dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/spi/spi-sg2044-nor.example.dtb: spi@1000000 (sophgo,sg2044-spifmc-nor): compatible:0: 'sophgo,sg2044-spifmc-nor' is not one of ['sophgo,sg2042-spifmc-nor']
from schema $id: http://devicetree.org/schemas/spi/spi-sg2044-nor.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/spi/spi-sg2044-nor.example.dtb: spi@1000000 (sophgo,sg2044-spifmc-nor): compatible: ['sophgo,sg2044-spifmc-nor'] is too short
from schema $id: http://devicetree.org/schemas/spi/spi-sg2044-nor.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/spi/spi-sg2044-nor.example.dtb: spi@1000000 (sophgo,sg2044-spifmc-nor): Unevaluated properties are not allowed ('compatible' was unexpected)
from schema $id: http://devicetree.org/schemas/spi/spi-sg2044-nor.yaml#
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20250523-sfg-spifmc-v1-1-4cf16cf3fd2a@gmail.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.
On 23/05/2025 12:54, Zixian Zeng wrote: > Add bindings for the SOPHGO SG2042 SPI-NOR flash controller, > which is compatible with SOPHGO SG2044. > 1. This wasn't tested. 2. Breaks existing boards, so you did not test DTS either. Do not reviewers but machine for such trivialities. 3. A nit, subject: drop second/last, redundant "bindings". The "dt-bindings" prefix is already stating that these are bindings. See also: https://elixir.bootlin.com/linux/v6.7-rc8/source/Documentation/devicetree/bindings/submitting-patches.rst#L18 4. Please use subject prefixes matching the subsystem. You can get them for example with `git log --oneline -- DIRECTORY_OR_FILE` on the directory your patch is touching. For bindings, the preferred subjects are explained here: https://www.kernel.org/doc/html/latest/devicetree/bindings/submitting-patches.html#i-for-patch-submitters Best regards, Krzysztof
On Fri, May 23, 2025 at 01:33:13PM +0200, Krzysztof Kozlowski wrote: > On 23/05/2025 12:54, Zixian Zeng wrote: > > Add bindings for the SOPHGO SG2042 SPI-NOR flash controller, > > which is compatible with SOPHGO SG2044. > > > 1. This wasn't tested. > 2. Breaks existing boards, so you did not test DTS either. Do not > reviewers but machine for such trivialities. > Sorry, This is my bad. I admit this is a pretty stupid mistake and I should have run a full dt_bindings check rather than the platform I am testing currently. Sorry for taking up your time, I'm sure this is the last time for such kind of mistake. > 3. A nit, subject: drop second/last, redundant "bindings". The > "dt-bindings" prefix is already stating that these are bindings. > See also: > https://elixir.bootlin.com/linux/v6.7-rc8/source/Documentation/devicetree/bindings/submitting-patches.rst#L18 > Thank you, I will remove the redundant "bindings" next time. > 4. Please use subject prefixes matching the subsystem. You can get them > for example with `git log --oneline -- DIRECTORY_OR_FILE` on the > directory your patch is touching. For bindings, the preferred subjects > are explained here: > https://www.kernel.org/doc/html/latest/devicetree/bindings/submitting-patches.html#i-for-patch-submitters > Ok, I will do it in next revision. > Best regards, > Krzysztof Thank you again for your detailed revieiws and links Best regards, Zixian
© 2016 - 2025 Red Hat, Inc.