mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-14 06:24:53 +08:00
d69c6ddd01
The correct syntax for JSON pointers begins with a '/' after the '#'. Without a '/', the string should be interpreted as a subschema identifier. The jsonschema module currently doesn't handle subschema identifiers and incorrectly allows JSON pointers to begin without a '/'. Let's fix this before it becomes a problem when jsonschema module is fixed. Converted with: perl -p -i -e 's/yaml#definitions/yaml#\/definitions/g' `find Documentation/devicetree/bindings/ -name "*.yaml"` Cc: Maxime Ripard <mripard@kernel.org> Cc: Jonathan Cameron <jic23@kernel.org> Cc: Lars-Peter Clausen <lars@metafoo.de> Cc: Daniel Thompson <daniel.thompson@linaro.org> Cc: Jingoo Han <jingoohan1@gmail.com> Cc: Pavel Machek <pavel@ucw.cz> Cc: "David S. Miller" <davem@davemloft.net> Cc: Jakub Kicinski <kuba@kernel.org> Cc: Andrew Lunn <andrew@lunn.ch> Cc: Florian Fainelli <f.fainelli@gmail.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Mark Brown <broonie@kernel.org> Cc: netdev@vger.kernel.org Acked-By: Vinod Koul <vkoul@kernel.org> Acked-by: Lee Jones <lee.jones@linaro.org> Acked-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Sebastian Reichel <sre@kernel.org> Acked-by: Florian Fainelli <f.fainelli@gmail.com> Acked-by: Mark Brown <broonie@kernel.org> Acked-by: Jakub Kicinski <kuba@kernel.org> Link: https://lore.kernel.org/r/20201217223429.354283-1-robh@kernel.org Signed-off-by: Rob Herring <robh@kernel.org>
130 lines
3.2 KiB
YAML
130 lines
3.2 KiB
YAML
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
|
|
%YAML 1.2
|
|
---
|
|
$id: "http://devicetree.org/schemas/eeprom/at25.yaml#"
|
|
$schema: "http://devicetree.org/meta-schemas/core.yaml#"
|
|
|
|
title: SPI EEPROMs compatible with Atmel's AT25
|
|
|
|
maintainers:
|
|
- Christian Eggers <ceggers@arri.de>
|
|
|
|
properties:
|
|
$nodename:
|
|
pattern: "^eeprom@[0-9a-f]{1,2}$"
|
|
|
|
# There are multiple known vendors who manufacture EEPROM chips compatible
|
|
# with Atmel's AT25. The compatible string requires two items where the
|
|
# 'vendor' and 'model' parts of the first are the actual chip and the second
|
|
# item is fixed to "atmel,at25". Some existing bindings only have the
|
|
# "atmel,at25" part and should be fixed by somebody who knows vendor and
|
|
# product.
|
|
compatible:
|
|
oneOf:
|
|
- items:
|
|
- enum:
|
|
- anvo,anv32e61w
|
|
- atmel,at25256B
|
|
- fujitsu,mb85rs1mt
|
|
- fujitsu,mb85rs64
|
|
- microchip,at25160bn
|
|
- microchip,25lc040
|
|
- st,m95m02
|
|
- st,m95256
|
|
|
|
- const: atmel,at25
|
|
|
|
# Please don't use this alternative for new bindings.
|
|
- items:
|
|
- const: atmel,at25
|
|
|
|
reg:
|
|
description:
|
|
Chip select number.
|
|
|
|
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]
|
|
description:
|
|
Size of the eeprom page.
|
|
|
|
size:
|
|
$ref: /schemas/types.yaml#/definitions/uint32
|
|
description:
|
|
Total eeprom size in bytes.
|
|
|
|
address-width:
|
|
$ref: /schemas/types.yaml#/definitions/uint32
|
|
enum: [ 8, 9, 16, 24 ]
|
|
description:
|
|
Number of address bits.
|
|
For 9 bits, the MSB of the address is sent as bit 3 of the instruction
|
|
byte, before the address byte.
|
|
|
|
spi-cpha: true
|
|
|
|
spi-cpol: true
|
|
|
|
read-only:
|
|
description:
|
|
Disable writes to the eeprom.
|
|
type: boolean
|
|
|
|
wp-gpios:
|
|
maxItems: 1
|
|
description:
|
|
GPIO to which the write-protect pin of the chip is connected.
|
|
|
|
# Deprecated: at25,byte-len, at25,addr-mode, at25,page-size
|
|
at25,byte-len:
|
|
$ref: /schemas/types.yaml#/definitions/uint32
|
|
description:
|
|
Total eeprom size in bytes. Deprecated, use "size" property instead.
|
|
deprecated: true
|
|
|
|
at25,addr-mode:
|
|
$ref: /schemas/types.yaml#/definitions/uint32
|
|
description:
|
|
Addr-mode flags, as defined in include/linux/spi/eeprom.h.
|
|
Deprecated, use "address-width" property instead.
|
|
deprecated: true
|
|
|
|
at25,page-size:
|
|
$ref: /schemas/types.yaml#/definitions/uint32
|
|
description:
|
|
Size of the eeprom page. Deprecated, use "pagesize" property instead.
|
|
deprecated: true
|
|
|
|
required:
|
|
- compatible
|
|
- reg
|
|
- spi-max-frequency
|
|
- pagesize
|
|
- size
|
|
- address-width
|
|
|
|
additionalProperties: false
|
|
|
|
examples:
|
|
- |
|
|
#include <dt-bindings/gpio/gpio.h>
|
|
spi0 {
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
|
|
eeprom@0 {
|
|
compatible = "st,m95256", "atmel,at25";
|
|
reg = <0>;
|
|
spi-max-frequency = <5000000>;
|
|
spi-cpha;
|
|
spi-cpol;
|
|
wp-gpios = <&gpio1 3 0>;
|
|
|
|
pagesize = <64>;
|
|
size = <32768>;
|
|
address-width = <16>;
|
|
};
|
|
};
|