Commit Graph

17 Commits

Author SHA1 Message Date
Krzysztof Kozlowski
8f299df1b7 dt-bindings: soc: samsung: exynos-usi: Drop unnecessary status from example
Device nodes in the examples are supposed to be enabled, so the schema
will be validated against them.  Keeping them disabled hides potential
errors.  Only one child of Samsung Exynos USI device node should be
enabled.  The node in the example already selected 'USI_MODE_UART', so
enable the serial node while keeping second - I2C - disabled.

Link: https://lore.kernel.org/r/20250307081341.35197-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2025-03-09 18:53:34 +01:00
Ivaylo Ivanov
b6f1ea2ae9 dt-bindings: soc: samsung: usi: add USIv1 and samsung,exynos8895-usi
Add new constants for choosing the additional USIv1 configuration modes
in device tree. Those are further used in the USI driver to figure out
which value to write into SW_CONF register. Modify the current USI IP-core
bindings to include information about USIv1 and a compatible for
exynos8895.

In the original bindings commit, protocol mode definitions were named
with the version of the supported USI (in this case, V2) with the idea of
leaving enough room in the future for other versions of this block. This,
however, is not how the modes should be modelled. The modes are not
version specific and you should not be able to tell USI which version of
a mode to use - that has to be handled in the driver - thus encoding this
information in the binding is meaningless. Only one constant per mode is
needed, so while we're at it, add new constants with the prefix USI_MODE
and mark the old ones as depracated.

Signed-off-by: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20250204172803.3425496-2-ivo.ivanov.ivanov1@gmail.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2025-02-05 16:22:48 +01:00
Krzysztof Kozlowski
7ece8b3ca3 dt-bindings: samsung: exynos-usi: Restrict possible samsung,mode values
"samsung,mode" property defines the desired mode of the serial engine
(e.g. I2C or SPI) and only few values are allowed/used by Linux driver.

Cc: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com>
Reviewed-by: Tudor Ambarus <tudor.ambarus@linaro.org>
Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://lore.kernel.org/r/20250103082549.19419-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2025-01-05 10:20:01 +01:00
Krzysztof Kozlowski
84236ed0a2 dt-bindings: samsung: exynos-usi: add missing constraints
Properties with variable number of items per each device are expected to
have widest constraints in top-level "properties:" block and further
customized (narrowed) in "if:then:".  Add missing top-level constraints
for reg, clocks and clock-names.

Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://lore.kernel.org/r/20240818172804.121666-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2024-08-19 21:49:28 +02:00
Tudor Ambarus
d793f7c471 dt-bindings: soc: samsung: usi: add google,gs101-usi compatible
Add google,gs101-usi dedicated compatible for representing USI of Google
GS101 SoC.

Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
Link: https://lore.kernel.org/r/20231211162331.435900-6-peter.griffin@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2023-12-12 20:22:43 +01:00
Jaewon Kim
7a5e832d05 dt-bindings: samsung: usi: add exynosautov920-usi compatible
Add samsung,exynosautov920-usi dedicated compatible for representing USI
of ExynosAutoV920 SoC.

Signed-off-by: Jaewon Kim <jaewon02.kim@samsung.com>
Link: https://lore.kernel.org/r/20231115095609.39883-4-jaewon02.kim@samsung.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2023-11-15 13:48:50 +01:00
Krzysztof Kozlowski
9da80ed69e dt-bindings: i2c: exynos5: add specific compatibles for existing SoC
Samsung Exynos SoC reuses several devices from older designs, thus
historically we kept the old (block's) compatible only.  This works fine
and there is no bug here, however guidelines expressed in
Documentation/devicetree/bindings/writing-bindings.rst state that:
1. Compatibles should be specific.
2. We should add new compatibles in case of bugs or features.

Add compatibles specific to each SoC in front of all old-SoC-like
compatibles.

Acked-by: Rob Herring <robh@kernel.org>
Acked-by: Wolfram Sang <wsa@kernel.org>
Link: https://lore.kernel.org/r/20231108104343.24192-3-krzysztof.kozlowski@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2023-11-14 16:17:56 +01:00
Krzysztof Kozlowski
84e85359f4 dt-bindings: drop redundant part of title (end, part three)
The Devicetree bindings document does not have to say in the title that
it is a "binding", but instead just describe the hardware.

Drop trailing "bindings" in various forms (also with trailing full
stop):

  find Documentation/devicetree/bindings/ -type f -name '*.yaml' \
    -not -name 'trivial-devices.yaml' \
    -exec sed -i -e 's/^title: \(.*\) [bB]indings\?\.\?$/title: \1/' {} \;

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Acked-by: Matti Vaittinen <mazziesaccount@gmail.com> # ROHM
Acked-by: Ulf Hansson <ulf.hansson@linaro.org> # MMC
Acked-by: Stephen Boyd <sboyd@kernel.org> # clk
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> # input
Acked-by: Mark Brown <broonie@kernel.org>
Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> # media
Acked-by: Sebastian Reichel <sre@kernel.org> # power
Acked-by: Viresh Kumar <viresh.kumar@linaro.org> # cpufreq
Link: https://lore.kernel.org/r/20221216163815.522628-7-krzysztof.kozlowski@linaro.org
Signed-off-by: Rob Herring <robh@kernel.org>
2022-12-16 11:41:49 -06:00
Chanho Park
4e112c7b5d dt-bindings: soc: samsung: usi: add exynosautov9-usi compatible
Add samsung,exynosautov9-usi dedicated compatible for representing USI
of Exynos Auto v9 SoC.

Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220701015226.32781-2-chanho61.park@samsung.com
2022-07-05 12:34:36 +02:00
Arnd Bergmann
7a3c3a650b Samsung SoC drivers changes for v5.19
Make MCT and USI bindings stricter by describing expected interrupts
 per variant and expected child node.
 -----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEE3dJiKD0RGyM7briowTdm5oaLg9cFAmJ01WUQHGtyemtAa2Vy
 bmVsLm9yZwAKCRDBN2bmhouD15eAD/sERV5waNgOo98G4iajV+VQgmX1PqQTMC4x
 V8sePgSwaheVN21jF+p63ClbKKKLAVZF0xtGNZYWKYwgENwR+X9bR27y0rAQBmjp
 5GLeW6p9UUke9oP++fZa+ZwUJ+1CGvgxPfCuEtSYmPw/oFyt33IQytMIJkvl9RwN
 KXkGP1uI3SO6AAT1YLqWnFS6+OPnXC3Gk0KgjOA+O7EdhUGiPcxnDBE3KVAC9POt
 i/5kOJuR21fYyWfaKQb7F2bgoTOHML/ko96mxvx3HHis+VOLv0sGzUMdOT5N/QcW
 0wkhHCu4LTSaOQ5FN9AvgKncCEoAJ33NERZhe3hWcyxwewCHRnqAijLTbPgulQEB
 6Nw7S6yTFQ3HfZL1ueSSzMXpm7PK/0RO110ZUmQisDaMmsLDFn5uvOdBwxbQkLak
 s1oIES1h/PtW7murG2bz4JTSt3MFUsGmunHfV6aEwMIWhRj7WlaAouIyjBhjW6tv
 Gn1E30DR/bfkbBoCe1Rki6Kk67paXJE8OxnGRzVuZFe2NBcPLqd6CL8u0kLzRF8g
 HZwqSS42OaTk1HE/u78jouiqip1d47F2kTpGsUxW7GAKm9iiR95jg7MoxHcANIx9
 pxWumfGXlAcTj09nO4chUI5HpqDvZ4NeA/euvhoFGfvjvfJOJB0rvaPRzcwwxvWe
 IwcqLhtNCQ==
 =V5Jq
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmJ1fw8ACgkQmmx57+YA
 GNlE/hAAw18ki3ffM48HU7FIVbZpijnBpISbItS+AzlO3J3+pLBcQSLVJtWjFhdi
 jTGuAeCh7RlnJTTTC9+q8qstcKrgtY2oxAEFfEl10dpRcHYBo/xbKKgQRV82RERS
 SeqSWNca2cQwngq7BHYLYZXz4cutlz7VIFCHj5nzP+FVdcU0+7m5JQ5dqhHPdKYd
 hd+QL3C27ltPd10SMBKDXAxD0Z9AyilRpszRayhBOsTsw1KBYd5/tjqP805Q1GG3
 wn5CcmFoGCs2CuY6/5aZIIG5czYgG/M9utiTJg5P6n5svm3ymlx0UPih+Jvou/Ep
 e3x7HswNWqaO0szncOEckyKfxb9rAZEENdyUOxgaam+ux3AbOFl4NnGijC8oqIew
 ZQvV2ySTrpPip3svhstQI6Gyl0qNVBf/b1uV+jf58Tu0oOp53q4PU9GyrnPLHgQd
 MOYv4fuamGLqgbDkn12P0hhWWQAGGkFNcVm7J6WIxdMN3oVHdAYQ6Cq20wXPfi2r
 2TCjtTQ2gkTdu6oike0EngtJtesS5B+1jHFAHRpX0nES9aMMoJi7uCatj+w/sdhr
 zukhBGFNgI1Wzov+lwgQEx1Xse0W4PJJH3oQbgBHR8PNH4WKB43b4Q5X+RPcyoAW
 Uy0tvtbX9yJpz1q9n9B6QkeyQhhduVEG274eM3S/WzE6hVFJm0o=
 =B5RZ
 -----END PGP SIGNATURE-----

Merge tag 'samsung-drivers-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/drivers

Samsung SoC drivers changes for v5.19

Make MCT and USI bindings stricter by describing expected interrupts
per variant and expected child node.

* tag 'samsung-drivers-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux:
  dt-bindings: timer: exynos4210-mct: describe known hardware and its interrupts
  dt-bindings: soc: samsung: usi: refer to dtschema for SPI

Link: https://lore.kernel.org/r/20220506081438.149192-3-krzysztof.kozlowski@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-06 22:03:26 +02:00
Krzysztof Kozlowski
db85474594 dt-bindings: soc: samsung: usi: refer to dtschema for SPI
After adding DT schema for Samsung SPI controller, the Samsung USI
bindings can reference it directly for proper schema validation.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220324134106.103588-1-krzk@kernel.org
2022-04-06 17:40:50 +02:00
Krzysztof Kozlowski
8a1e6bb3f7 dt-bindings: update Krzysztof Kozlowski's email
Krzysztof Kozlowski's @canonical.com email stopped working, so switch to
generic @kernel.org account for all Devicetree bindings.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Acked-by: Rob Herring <robh@kernel.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20220330074016.12896-2-krzysztof.kozlowski@linaro.org
2022-04-04 15:43:20 +02:00
Linus Torvalds
9bf3fc5007 Devicetree updates for v5.18:
- Add Krzysztof Kozlowski as co-maintainer for DT bindings providing
   much needed help.
 
 - DT schema validation now takes DTB files as input rather than
   intermediate YAML files. This decouples the validation from the source
   level syntax information. There's a bunch of schema fixes as a result
   of switching to DTB based validation which exposed some errors
   and incomplete schemas and examples.
 
 - Kbuild improvements to explicitly warn users running 'make
   dt_binding_check' on missing yamllint
 
 - Expand DT_SCHEMA_FILES kbuild variable to take just a partial filename
   or path instead of the full path to 1 file.
 
 - Convert various bindings to schema format: mscc,vsc7514-switch,
   multiple GNSS bindings, ahci-platform, i2c-at91, multiple UFS
   bindings, cortina,gemini-sata-bridge, cortina,gemini-ethernet, Atmel
   SHA, Atmel TDES, Atmel AES, armv7m-systick, Samsung Exynos display
   subsystem, nuvoton,npcm7xx-timer, samsung,s3c2410-i2c, zynqmp_dma,
   msm/mdp4, rda,8810pl-uart
 
 - New schemas for u-boot environment variable partition, TI clksel
 
 - New compatible strings for Renesas RZ/V2L SoC
 
 - Vendor prefixes for Xen, HPE, deprecated Synopsys, deprecated HiSilicon
 
 - Add/fix schemas for QEMU Arm 'virt' machine
 
 - Drop unused of_alias_get_alias_list() function
 
 - Add a script to check DT unittest EXPECT message output. Pass messages
   also now print by default at PR_INFO level to help test automation.
 -----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEEktVUI4SxYhzZyEuo+vtdtY28YcMFAmI8s64QHHJvYmhAa2Vy
 bmVsLm9yZwAKCRD6+121jbxhwx3tD/4j56NE+aLkL636+I8tGFm3r+r6uLLT4SWh
 zDuiX3MP9OKfhJw43TjjURLwX5adBnG3nn505IXcAeiMRgEiciOpSa12w0mXyjMX
 QgVOcoaI3H2GBMEddJRo1PLTM/K5sYzZxAKLB827xoOk4mGNA0ZBAHvlB3W+yLE5
 CE5yTaFoL4EMXuhWMtMrMlG1PQrbO3FpQ2DHBKrpxHPJmnHLk3c0YtMSTHGQnWbN
 AxT3S6RSsOLwLzZAXi2AlswqY82n5KtUf/RBrYi8rdr/xnIsCfMeXxafkP2Hyxkq
 L9RfKVn05c0LRtO1Eh8kYr+lmYmcWz/SIdJZXzpviIgE9MJapCAk0blBZ4S/FH0B
 EVGB1JkwCZFck6DBmkNJxAwR0iQOGWkJIkn6iBPNF0dHp58eE6adaXjhFH3uBEHk
 dXFaxPlvZ3P/Q2I/vmQ//m5tZMyjeCY2BlVYpkUJMOFfN26MIGHUmUlLnovLDqu4
 lYgZG4V244uYzALLbURpbp+5dlPH/PL2gxvJJNqTS+/hXktQx1XnML4wD+xfJ4nT
 OY5DD7Z+KGBrdsMtxkFtIFvKD63E2gtAR5RZO0J/txlzhW7Wg6fJbhJZeRFhZKmN
 GAfud2s6rliyygByBL4ea50DSLLQpc/9HZtFmZ3NTILM6NbUR74sHt+1EZ1hee+M
 LaNsSscHuQ==
 =g1li
 -----END PGP SIGNATURE-----

Merge tag 'devicetree-for-5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux

Pull devicetree updates from Rob Herring:

 - Add Krzysztof Kozlowski as co-maintainer for DT bindings providing
   much needed help.

 - DT schema validation now takes DTB files as input rather than
   intermediate YAML files. This decouples the validation from the
   source level syntax information. There's a bunch of schema fixes as a
   result of switching to DTB based validation which exposed some errors
   and incomplete schemas and examples.

 - Kbuild improvements to explicitly warn users running 'make
   dt_binding_check' on missing yamllint

 - Expand DT_SCHEMA_FILES kbuild variable to take just a partial
   filename or path instead of the full path to 1 file.

 - Convert various bindings to schema format: mscc,vsc7514-switch,
   multiple GNSS bindings, ahci-platform, i2c-at91, multiple UFS
   bindings, cortina,gemini-sata-bridge, cortina,gemini-ethernet, Atmel
   SHA, Atmel TDES, Atmel AES, armv7m-systick, Samsung Exynos display
   subsystem, nuvoton,npcm7xx-timer, samsung,s3c2410-i2c, zynqmp_dma,
   msm/mdp4, rda,8810pl-uart

 - New schemas for u-boot environment variable partition, TI clksel

 - New compatible strings for Renesas RZ/V2L SoC

 - Vendor prefixes for Xen, HPE, deprecated Synopsys, deprecated
   HiSilicon

 - Add/fix schemas for QEMU Arm 'virt' machine

 - Drop unused of_alias_get_alias_list() function

 - Add a script to check DT unittest EXPECT message output. Pass
   messages also now print by default at PR_INFO level to help test
   automation.

* tag 'devicetree-for-5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (96 commits)
  dt-bindings: kbuild: Make DT_SCHEMA_LINT a recursive variable
  dt-bindings: nvmem: add U-Boot environment variables binding
  dt-bindings: ufs: qcom: Add SM6350 compatible string
  dt-bindings: dmaengine: sifive,fu540-c000: include generic schema
  dt-bindings: gpio: pca95xx: drop useless consumer example
  Revert "of: base: Introduce of_alias_get_alias_list() to check alias IDs"
  dt-bindings: virtio,mmio: Allow setting devices 'dma-coherent'
  dt-bindings: gnss: Add two more chips
  dt-bindings: gnss: Rewrite sirfstar binding in YAML
  dt-bindings: gnss: Modify u-blox to use common bindings
  dt-bindings: gnss: Rewrite common bindings in YAML
  dt-bindings: ata: ahci-platform: Add rk3568-dwc-ahci compatible
  dt-bindings: ata: ahci-platform: Add power-domains property
  dt-bindings: ata: ahci-platform: Convert DT bindings to yaml
  dt-bindings: kbuild: Use DTB files for validation
  dt-bindings: kbuild: Pass DT_SCHEMA_FILES to dt-validate
  dt-bindings: Add QEMU virt machine compatible
  dt-bindings: arm: Convert QEMU fw-cfg to DT schema
  dt-bindings: i2c: at91: Add SAMA7G5 compatible strings list
  dt-bindings: i2c: convert i2c-at91 to json-schema
  ...
2022-03-26 11:41:53 -07:00
Krzysztof Kozlowski
e465ea5cc0 dt-bindings: soc: samsung: usi: refer to dtschema for children
Explicitly reference the dtschema for USI children implementing specific
serial protocol (I2C, SPI, UART).  The SPI schema is not yet accepted,
so it will be provided later.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>
Link: https://lore.kernel.org/r/20220211164716.120880-1-krzysztof.kozlowski@canonical.com
2022-02-12 17:34:48 +01:00
Rob Herring
39bd2b6a37 dt-bindings: Improve phandle-array schemas
The 'phandle-array' type is a bit ambiguous. It can be either just an
array of phandles or an array of phandles plus args. Many schemas for
phandle-array properties aren't clear in the schema which case applies
though the description usually describes it.

The array of phandles case boils down to needing:

items:
  maxItems: 1

The phandle plus args cases should typically take this form:

items:
  - items:
      - description: A phandle
      - description: 1st arg cell
      - description: 2nd arg cell

With this change, some examples need updating so that the bracketing of
property values matches the schema.

Signed-off-by: Rob Herring <robh@kernel.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Vinod Koul <vkoul@kernel.org>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
Acked-by: Georgi Djakov <djakov@kernel.org>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Mark Brown <broonie@kernel.org>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Acked-by: Stephen Boyd <sboyd@kernel.org>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Marc Kleine-Budde <mkl@pengutronix.de>
Link: https://lore.kernel.org/r/20220119015038.2433585-1-robh@kernel.org
2022-02-04 09:43:42 -06:00
Sam Protsenko
d56a8e9c7a dt-bindings: soc: samsung: Fix I2C clocks order in USI binding example
Now that HSI2C binding [1] is converted to dt-schema format, it reveals
incorrect HSI2C clocks order in USI binding example:

    .../exynos-usi.example.dt.yaml:
    i2c@13820000: clock-names:0: 'hsi2c' was expected
    From schema: .../i2c-exynos5.yaml

    .../exynos-usi.example.dt.yaml:
    i2c@13820000: clock-names:1: 'hsi2c_pclk' was expected
    From schema: .../i2c-exynos5.yaml

Change HSI2C clock order in USI binding example to satisfy HSI2C binding
requirements and fix above warnings.

[1] Documentation/devicetree/bindings/i2c/i2c-exynos5.yaml

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Link: https://lore.kernel.org/r/20211214170924.27998-1-semen.protsenko@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
2021-12-15 08:34:47 +01:00
Sam Protsenko
e522ae91b8 dt-bindings: soc: samsung: Add Exynos USI bindings
Add constants for choosing USIv2 configuration mode in device tree.
Those are further used in USI driver to figure out which value to write
into SW_CONF register. Also document USIv2 IP-core bindings.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20211204195757.8600-2-semen.protsenko@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
2021-12-13 12:03:22 +01:00