* [PATCH 1/2] dt-bindings: eeprom: at25: use spi-peripheral-props.yaml
@ 2022-07-27 16:44 Krzysztof Kozlowski
2022-07-27 16:44 ` [PATCH 2/2] dt-bindings: eeprom: microchip,93lc46b: move to eeprom directory Krzysztof Kozlowski
2022-07-29 23:23 ` [PATCH 1/2] dt-bindings: eeprom: at25: use spi-peripheral-props.yaml Rob Herring
0 siblings, 2 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-27 16:44 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Christian Eggers, Cory Tusar,
devicetree, linux-kernel
Cc: Krzysztof Kozlowski
Instead of listing directly properties typical for SPI peripherals,
reference the spi-peripheral-props.yaml schema. This allows using all
properties typical for SPI-connected devices, even these which device
bindings author did not tried yet.
Remove the spi-* properties which now come via spi-peripheral-props.yaml
schema, except for the cases when device schema adds some constraints
like maximum frequency.
While changing additionalProperties->unevaluatedProperties, put it in
typical place, just before example DTS.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
Technically, this depends on [1] merged to SPI tree, if we want to
preserve existing behavior of not allowing SPI CPHA and CPOL in each of
schemas in this patch.
If this patch comes independently via different tree, the SPI CPHA and
CPOL will be allowed for brief period of time, before [1] is merged.
This will not have negative impact, just DT schema checks will be
loosened for that period.
[1] https://lore.kernel.org/all/20220722191539.90641-2-krzysztof.kozlowski@linaro.org/
---
Documentation/devicetree/bindings/eeprom/at25.yaml | 5 ++---
.../devicetree/bindings/misc/eeprom-93xx46.yaml | 9 ++++-----
2 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/Documentation/devicetree/bindings/eeprom/at25.yaml b/Documentation/devicetree/bindings/eeprom/at25.yaml
index fbf99e346966..8b1c997caac1 100644
--- a/Documentation/devicetree/bindings/eeprom/at25.yaml
+++ b/Documentation/devicetree/bindings/eeprom/at25.yaml
@@ -44,8 +44,6 @@ properties:
reg:
maxItems: 1
- spi-max-frequency: true
-
pagesize:
$ref: /schemas/types.yaml#/definitions/uint32
enum: [1, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072]
@@ -105,6 +103,7 @@ required:
- spi-max-frequency
allOf:
+ - $ref: /schemas/spi/spi-peripheral-props.yaml#
- if:
properties:
compatible:
@@ -117,7 +116,7 @@ allOf:
- size
- address-width
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
diff --git a/Documentation/devicetree/bindings/misc/eeprom-93xx46.yaml b/Documentation/devicetree/bindings/misc/eeprom-93xx46.yaml
index 44fd2f6f0d8a..43ac2376a453 100644
--- a/Documentation/devicetree/bindings/misc/eeprom-93xx46.yaml
+++ b/Documentation/devicetree/bindings/misc/eeprom-93xx46.yaml
@@ -28,9 +28,6 @@ properties:
description: chip select of EEPROM
maxItems: 1
- spi-max-frequency: true
- spi-cs-high: true
-
read-only:
description:
parameter-less property which disables writes to the EEPROM
@@ -42,14 +39,16 @@ properties:
of EEPROM (e.g. for SPI bus multiplexing)
maxItems: 1
-
required:
- compatible
- reg
- data-size
- spi-max-frequency
-additionalProperties: false
+allOf:
+ - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+unevaluatedProperties: false
examples:
- |
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] dt-bindings: eeprom: microchip,93lc46b: move to eeprom directory
2022-07-27 16:44 [PATCH 1/2] dt-bindings: eeprom: at25: use spi-peripheral-props.yaml Krzysztof Kozlowski
@ 2022-07-27 16:44 ` Krzysztof Kozlowski
2022-07-29 23:23 ` Rob Herring
2022-07-29 23:23 ` [PATCH 1/2] dt-bindings: eeprom: at25: use spi-peripheral-props.yaml Rob Herring
1 sibling, 1 reply; 4+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-27 16:44 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Christian Eggers, Cory Tusar,
devicetree, linux-kernel
Cc: Krzysztof Kozlowski
Move the Atmel/Microchip 93xx46 SPI compatible EEPROM family bindings
from misc to eeprom directory to properly match subsystem.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
.../{misc/eeprom-93xx46.yaml => eeprom/microchip,93lc46b.yaml} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename Documentation/devicetree/bindings/{misc/eeprom-93xx46.yaml => eeprom/microchip,93lc46b.yaml} (95%)
diff --git a/Documentation/devicetree/bindings/misc/eeprom-93xx46.yaml b/Documentation/devicetree/bindings/eeprom/microchip,93lc46b.yaml
similarity index 95%
rename from Documentation/devicetree/bindings/misc/eeprom-93xx46.yaml
rename to Documentation/devicetree/bindings/eeprom/microchip,93lc46b.yaml
index 43ac2376a453..0c2f5ddb79c5 100644
--- a/Documentation/devicetree/bindings/misc/eeprom-93xx46.yaml
+++ b/Documentation/devicetree/bindings/eeprom/microchip,93lc46b.yaml
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
-$id: http://devicetree.org/schemas/misc/eeprom-93xx46.yaml#
+$id: http://devicetree.org/schemas/eeprom/microchip,93lc46b.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Microchip 93xx46 SPI compatible EEPROM family dt bindings
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] dt-bindings: eeprom: at25: use spi-peripheral-props.yaml
2022-07-27 16:44 [PATCH 1/2] dt-bindings: eeprom: at25: use spi-peripheral-props.yaml Krzysztof Kozlowski
2022-07-27 16:44 ` [PATCH 2/2] dt-bindings: eeprom: microchip,93lc46b: move to eeprom directory Krzysztof Kozlowski
@ 2022-07-29 23:23 ` Rob Herring
1 sibling, 0 replies; 4+ messages in thread
From: Rob Herring @ 2022-07-29 23:23 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: devicetree, Christian Eggers, Rob Herring, Krzysztof Kozlowski,
Cory Tusar, linux-kernel
On Wed, 27 Jul 2022 18:44:23 +0200, Krzysztof Kozlowski wrote:
> Instead of listing directly properties typical for SPI peripherals,
> reference the spi-peripheral-props.yaml schema. This allows using all
> properties typical for SPI-connected devices, even these which device
> bindings author did not tried yet.
>
> Remove the spi-* properties which now come via spi-peripheral-props.yaml
> schema, except for the cases when device schema adds some constraints
> like maximum frequency.
>
> While changing additionalProperties->unevaluatedProperties, put it in
> typical place, just before example DTS.
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>
> ---
>
> Technically, this depends on [1] merged to SPI tree, if we want to
> preserve existing behavior of not allowing SPI CPHA and CPOL in each of
> schemas in this patch.
>
> If this patch comes independently via different tree, the SPI CPHA and
> CPOL will be allowed for brief period of time, before [1] is merged.
> This will not have negative impact, just DT schema checks will be
> loosened for that period.
>
> [1] https://lore.kernel.org/all/20220722191539.90641-2-krzysztof.kozlowski@linaro.org/
> ---
> Documentation/devicetree/bindings/eeprom/at25.yaml | 5 ++---
> .../devicetree/bindings/misc/eeprom-93xx46.yaml | 9 ++++-----
> 2 files changed, 6 insertions(+), 8 deletions(-)
>
Applied, thanks!
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] dt-bindings: eeprom: microchip,93lc46b: move to eeprom directory
2022-07-27 16:44 ` [PATCH 2/2] dt-bindings: eeprom: microchip,93lc46b: move to eeprom directory Krzysztof Kozlowski
@ 2022-07-29 23:23 ` Rob Herring
0 siblings, 0 replies; 4+ messages in thread
From: Rob Herring @ 2022-07-29 23:23 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Krzysztof Kozlowski, Cory Tusar, linux-kernel, devicetree,
Rob Herring, Christian Eggers
On Wed, 27 Jul 2022 18:44:24 +0200, Krzysztof Kozlowski wrote:
> Move the Atmel/Microchip 93xx46 SPI compatible EEPROM family bindings
> from misc to eeprom directory to properly match subsystem.
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
> .../{misc/eeprom-93xx46.yaml => eeprom/microchip,93lc46b.yaml} | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> rename Documentation/devicetree/bindings/{misc/eeprom-93xx46.yaml => eeprom/microchip,93lc46b.yaml} (95%)
>
Applied, thanks!
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-07-29 23:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-27 16:44 [PATCH 1/2] dt-bindings: eeprom: at25: use spi-peripheral-props.yaml Krzysztof Kozlowski
2022-07-27 16:44 ` [PATCH 2/2] dt-bindings: eeprom: microchip,93lc46b: move to eeprom directory Krzysztof Kozlowski
2022-07-29 23:23 ` Rob Herring
2022-07-29 23:23 ` [PATCH 1/2] dt-bindings: eeprom: at25: use spi-peripheral-props.yaml Rob Herring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).