summaryrefslogtreecommitdiffstats
path: root/Documentation (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'spi-v6.11' of ↵Linus Torvalds2024-07-1615-163/+330
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi updates from Mark Brown: "There's some quite exciting core work in this release, we've got the beginnings of support for hardware initiated transfers which is itself independently useful for optimising fast paths in existing drivers. We also have a rework of the DMA mapping which allows finer grained decisions about DMA mapping messages and also helps remove some bodges that we'd had. Otherwise it's a fairly quiet release, a few new drivers and features for existing drivers, together with various cleanups and DT binding conversions. One regmap SPI fix made it's way in here too which I should probably have sent as a regmap fix instead. Summary: - Support for pre-optimising messages, reducing the overhead for messages that are repeatedly used (eg, reading the interrupt status from a device). This will also be used for hardware initiated transfers in future. - A reworking of how DMA mapping is done, introducing a new helper and allowing the DMA mapping decision to be done per transfer instead of per message. - Support for Atmel SAMA7D64, Freescale LX2160A DSPI and WCH CH341A" * tag 'spi-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (72 commits) spi: dt-bindings: at91: Add sama7d65 compatible string spi: add ch341a usb2spi driver spi: dt-bindings: fsl-dspi: add compatible string 'fsl,lx2160a-dspi' spi: dt-bindings: fsl-dspi: add dmas and dma-names properties spi: spi: Remove unnecessary ‘0’ values from status spi: spi: Remove unnecessary ‘0’ values from rc spi: xcomm: fix coding style spi: xcomm: remove i2c_set_clientdata() spi: xcomm: make use of devm_spi_alloc_host() spi: xcomm: add gpiochip support spi: dt-bindings: snps,dw-apb-ssi.yaml: update compatible property spi: dt-bindings: fsl-dspi: Convert to yaml format spi: fsl-dspi: use common proptery 'spi-cs-setup(hold)-delay-ns' spi: axi-spi-engine: remove platform_set_drvdata() spi: spi-fsl-lpspi: Pass pm_ptr() spi: spi-imx: Pass pm_ptr() spi: spi-fsl-lpspi: Switch to SYSTEM_SLEEP_PM_OPS() spi: spi-imx: Switch to RUNTIME_PM_OPS/SYSTEM_SLEEP_PM_OPS() spi: add EXPORT_SYMBOL_GPL(devm_spi_optimize_message) spi: add devm_spi_optimize_message() helper ...
| * spi: dt-bindings: at91: Add sama7d65 compatible stringNicolas Ferre2024-07-121-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | Add compatible string for sama7d65. Like sam9x60 and sam9x7, it requires to bind to "atmel,at91rm9200-spi". Group these three under the same enum, sorted alphanumerically, and remove previously added item. Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com> Acked-by: Rob Herring (Arm) <robh@kernel.org> Link: https://patch.msgid.link/20240711165402.373634-1-nicolas.ferre@microchip.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * spi: dt-bindings: fsl-dspi: add compatible string 'fsl,lx2160a-dspi'Frank Li2024-07-081-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Add compatible string 'fsl,lx2160a-dspi' and allow fall back to 'fsl,ls2085a-dspi'. Fix below CHECK_DTBS warning. arch/arm64/boot/dts/freescale/fsl-lx2160a-bluebox3.dtb: spi@2100000: compatible: 'oneOf' conditional failed, one must be fixed: ['fsl,lx2160a-dspi', 'fsl,ls2085a-dspi'] is too long Signed-off-by: Frank Li <Frank.Li@nxp.com> Link: https://patch.msgid.link/20240703165931.2325807-2-Frank.Li@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * spi: dt-bindings: fsl-dspi: add dmas and dma-names propertiesFrank Li2024-07-081-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | Add dmas and dma-names properties because dspi support dma transfer. Fix below warnings: arch/arm64/boot/dts/freescale/fsl-ls1028a-kontron-sl28-var1.dtb: spi@2120000: Unevaluated properties are not allowed ('dma-names', 'dmas', 'little-endian' were unexpected) from schema $id: http://devicetree.org/schemas/spi/fsl,dspi.yaml# Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Frank Li <Frank.Li@nxp.com> Reviewed-by: Vladimir Oltean <olteanv@gmail.com> Link: https://patch.msgid.link/20240703165931.2325807-1-Frank.Li@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * spi: dt-bindings: snps,dw-apb-ssi.yaml: update compatible propertyKanak Shilledar2024-07-011-0/+4
| | | | | | | | | | | | | | | | | | | | updated compatible property to include "thead,th1520-spi" for the TH1520 SoC SPI Controller. Signed-off-by: Kanak Shilledar <kanakshilledar@gmail.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Link: https://patch.msgid.link/20240701121355.262259-3-kanakshilledar@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * spi: dt-bindings: fsl-dspi: Convert to yaml formatFrank Li2024-07-014-65/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert dt-binding spi-fsl-dspi.txt to yaml format. Use part Vladimir Oltean's work at of https://lore.kernel.org/linux-spi/20221111224651.577729-1-vladimir.oltean@nxp.com/ Additional changes during convert: - compatible string "fsl,ls1028a-dspi" can be followed by fsl,ls1021a-v1.0-dspi. - Change "dspi0@4002c000" to "spi@4002c000" in example. - Reorder properties in example. - Use GIC include in example. - Deprecated fsl,spi-cs-sck-delay and fsl,spi-sck-cs-delay by use common SPI property. - Use compatible string 'jedec,spi-nor' in example. - Split peripheral part to fsl,dspi-peripheral-props.yaml. - Remove 'interrupts' and 'pinctrl' from required list. - Update 'bus-num' description. - Update 'spi-num-chipselects' description by add "cs-gpios don't count against this number". - Remove 'big-endian' description. Co-developed-by: Kuldeep Singh <kuldeep.singh@nxp.com> Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com> Co-developed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: Frank Li <Frank.Li@nxp.com> Reviewed-by: Vladimir Oltean <olteanv@gmail.com> Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Link: https://patch.msgid.link/20240624-ls_qspi-v4-2-3d1c6f5005bf@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * spi: add devm_spi_optimize_message() helperMark Brown2024-06-2313-60/+130
| |\ | | | | | | | | | | | | | | | | | | | | | | | | Merge series from David Lechner <dlechner@baylibre.com>: In the IIO subsystem, we are finding that it is common to call spi_optimize_message() during driver probe since the SPI message doesn't change for the lifetime of the driver. This patch adds a devm_spi_optimize_message() helper to simplify this common pattern.
| | * spi: add devm_spi_optimize_message() helperDavid Lechner2024-06-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a new helper function devm_spi_optimize_message() that automatically registers spi_unoptimize_message() to be called when the device is removed. Signed-off-by: David Lechner <dlechner@baylibre.com> Link: https://patch.msgid.link/20240621-devm_spi_optimize_message-v1-2-3f9dcba6e95e@baylibre.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | * Documentation: devres: add missing SPI helpersDavid Lechner2024-06-221-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | A few SPI devm_* helpers were missing from the devres documentation. This patch adds them. Signed-off-by: David Lechner <dlechner@baylibre.com> Link: https://patch.msgid.link/20240621-devm_spi_optimize_message-v1-1-3f9dcba6e95e@baylibre.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | dt-bindings: spi: amlogic,a1-spifc: add missing power-domainsNeil Armstrong2024-06-051-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On the Amlogic A1, the SPI FC controller can require a power-domain to operate, add it as optional. Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Acked-by: Conor Dooley <conor.dooley@microchip.com> Link: https://msgid.link/r/20240605-topic-amlogic-upstream-bindings-fixes-power-domains-spifc-v1-1-380f29ba4a16@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
| * | spi: Merge up fixesMark Brown2024-06-037-5/+58
| |\ \ | | | | | | | | | | | | We need these to get the i.MX8 boards working in CI again.
| * \ \ Add support for GPIO based CSMark Brown2024-05-291-3/+26
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge series from Prajna Rajendra Kumar <prajna.rajendrakumar@microchip.com>: The Microchip PolarFire SoC SPI "hard" controller supports eight chip selects. However, only one chip select is physically wired. Therefore, use GPIO descriptors to configure additional chip select lines.
| | * | | spi: dt-bindings: Add num-cs property for mpfs-spiPrajna Rajendra Kumar2024-05-271-3/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The PolarFire SoC SPI "hard" controller supports eight CS lines, out of which only one CS line is physically wired. The default value of 'num-cs' was never set and it did not didn't impose a maximum value. To reflect this hardware limitation in the device tree, the binding enforces that the 'num-cs' property cannot exceed 1 unless additional CS lines are explicitly defined using GPIO descriptors. Fixes: 2da187304e55 ("spi: add bindings for microchip mpfs spi") Signed-off-by: Prajna Rajendra Kumar <prajna.rajendrakumar@microchip.com> Link: https://msgid.link/r/20240514104508.938448-2-prajna.rajendrakumar@microchip.com Reviewed-by: Conor Dooley <conor.dooley@microchip.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | | Add optional reset control for Cadence SPIMark Brown2024-05-291-0/+7
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge series from Ji Sheng Teoh <jisheng.teoh@starfivetech.com>: The first patch adds optional reset control to support assertion and deassertion of reset signal to properly bring the SPI device into an operating condition. The second patch documents the optional reset control into dt-bindings.
| | * | | | spi: dt-bindings: spi-cadence: Add optional reset controlJi Sheng Teoh2024-05-271-0/+7
| | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Document the optional reset control to SPI. Co-developed-by: Eng Lee Teh <englee.teh@starfivetech.com> Signed-off-by: Eng Lee Teh <englee.teh@starfivetech.com> Co-developed-by: Ley Foon Tan <leyfoon.tan@starfivetech.com> Signed-off-by: Ley Foon Tan <leyfoon.tan@starfivetech.com> Signed-off-by: Ji Sheng Teoh <jisheng.teoh@starfivetech.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://msgid.link/r/20240508054728.1751162-3-jisheng.teoh@starfivetech.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | | spi: dt-bindings: Document the IBM FSI-attached SPI controllerEddie James2024-05-271-0/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | IBM Power processors have a SPI controller that can be accessed over FSI from a service processor. Document it. Signed-off-by: Eddie James <eajames@linux.ibm.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://msgid.link/r/20240514192630.152747-1-eajames@linux.ibm.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | | spi: dt-bindings: brcm,bcm2835-spi: convert to dtschemaKanak Shilledar2024-05-272-23/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert the Broadcom BCM2835 SPI0 controller to newer DT schema. Created DT schema based on the .txt file which had `comaptible`, `reg`, `interrupts`, `clocks` as required properties. Added GPL-2.0 OR BSD-2-Clause License Signed-off-by: Kanak Shilledar <kanakshilledar111@protonmail.com> Reviewed-by: Conor Dooley <conor.dooley@microchip.com> Link: https://msgid.link/r/20240514070051.2959-1-kanakshilledar111@protonmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | | spi: dt-bindings: marvell,mmp2-ssp: Merge PXA SSP into schemaRob Herring (Arm)2024-05-272-68/+31
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Marvell PXA SSP block is the same or similiar to the MMP2 variant. The only difference in the binding is the PXA version supports DMA (and that's probably a binding difference rather than an actual h/w difference). The old binding didn't belong under 'serial' as it is not a UART. The SSP block also supports audio devices, so 'spi' is not a perfect fit either. As the existing schema for MMP2 is there, just leave things as-is. The examples in the old text binding were pretty out of sync with reality. 'clock-names' and 'ssp-id' aren't documented nor used. Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Rob Herring (Arm) <robh@kernel.org> Link: https://msgid.link/r/20240522132859.3146335-1-robh@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
* | | | Merge tag 'regulator-v6.11' of ↵Linus Torvalds2024-07-1612-129/+490
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator updates from Mark Brown: "This s a very quiet release for the regulator API, we have a few new devices (most of which are just ID updates) and one new fairly specialist core feature for use in interrupt context. - An API allowing lockless enable/disable for regulators acquired in exclusive mode, for use in interrupt contexts - A rewrite of the MedaTek DVFSRC regulator driver which apparently never worked - Support for Mediaktek MT6312, Qualcomm QCA6390 and WCN7850, Renesas RZ/G2L USB VBUS regulator and ST Microelectronics STM32MP13" * tag 'regulator-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (26 commits) regulator: dt-bindings: pca9450: Make interrupt optional regulator: pca9450: Make IRQ optional dt-bindings: regulator: sprd,sc2731-regulator: convert to YAML regulator: max77857: Constify struct regmap_config regulator: da9121: Constify struct regmap_config dt-bindings: regulator: ti,tps65132: document VIN supply dt-bindings: mfd: twl: Fix example regulator: Add Renesas RZ/G2L USB VBUS regulator driver regulator: core: Add helper for allow HW access to enable/disable regulator regulator: Add bindings for MediaTek DVFSRC Regulators regulator: Add refactored mtk-dvfsrc-regulator driver regulator: Remove mtk-dvfsrc-regulator.c regulator: userspace-consumer: quiet device deferral regulator: dt-bindings: mt6315: Document MT6319 PMIC regulator: add missing MODULE_DESCRIPTION() macro dt-bindings: regulator: twl-regulator: convert to yaml regulator: dt-bindings: describe the PMU module of the WCN7850 package regulator: dt-bindings: describe the PMU module of the QCA6390 package regulator: dt-bindings: rtq2208: Add specified fixed LDO VOUT property regulator: rtq2208: Add fixed LDO VOUT property and check that matches the constraints ...
| * | | | regulator: dt-bindings: pca9450: Make interrupt optionalFrieder Schrempf2024-07-081-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The interrupt is optional in hardware and not connected on some boards. Make it optional in the binding. Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de> Link: https://patch.msgid.link/20240708084107.38986-3-frieder@fris.de Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | | dt-bindings: regulator: sprd,sc2731-regulator: convert to YAMLStanislav Jakubek2024-07-052-43/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert the Spreadtrum SC2731 regulator bindings to DT schema. Change during conversion: - switch compatible from sprd,sc27xx-regulator to sprd,sc2731-regulator, same as the only in-tree user has done back in 2019 [1] [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/arch/arm64/boot/dts/sprd/sc2731.dtsi?h=v6.9&id=0419a75b1808dda225b17ba1509f195f23c0db88 Signed-off-by: Stanislav Jakubek <stano.jakubek@gmail.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://patch.msgid.link/ZobxoobZvA8k3pyi@standask-GA-A55M-S2HP Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | | dt-bindings: regulator: ti,tps65132: document VIN supplyStanislav Jakubek2024-07-041-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TPS65132 is powered by its VIN supply, document it. Signed-off-by: Stanislav Jakubek <stano.jakubek@gmail.com> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://patch.msgid.link/ZoWxnEY944ht2EWf@standask-GA-A55M-S2HP Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | | dt-bindings: mfd: twl: Fix exampleAndreas Kemnade2024-07-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix example to also conform to rules specified in the separate not-included gpadc binding. Fixes: 62e4f3396197 ("dt-bindings: regulator: twl-regulator: convert to yaml") Signed-off-by: Andreas Kemnade <andreas@kemnade.info> Reported-by: Rob Herring (Arm) <robh@kernel.org> Acked-by: Lee Jones <lee@kernel.org> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://patch.msgid.link/20240612134039.1089839-1-andreas@kemnade.info Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | | Add USB VBUS regulator for RZ/G2LMark Brown2024-06-2613-125/+264
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge series from Biju Das <biju.das.jz@bp.renesas.com>: As per RZ/G2L HW manual, VBUS enable can be controlled by the VBOUT bit of the VBUS Control Register(VBENCTL) register in the USBPHY Control. But this IP is in the Reset block. Reset driver exposes this register as regmap and instantiate the USB VBUS regulator device. Consumers(phy device) can use regulator APIs to control VBUS as controlling is done in the atomic context using a new API which is added for the purpose.
| | * | | | regulator: core: Add helper for allow HW access to enable/disable regulatorBiju Das2024-06-261-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a helper function that allow regulator consumers to allow low-level HW access, in order to enable/disable regulator in atomic context. The use-case for RZ/G2L SoC is to enable VBUS selection register based on vbus detection that happens in interrupt context. Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Link: https://patch.msgid.link/20240616105402.45211-4-biju.das.jz@bp.renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | | | regulator: Add bindings for MediaTek DVFSRC RegulatorsAngeloGioacchino Del Regno2024-06-251-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Dynamic Voltage and Frequency Scaling Resource Collector Regulators are controlled with votes to the DVFSRC hardware. This adds support for the regulators found in MT6873, MT8183, MT8192 and MT8195 SoCs. Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://patch.msgid.link/20240610085735.147134-2-angelogioacchino.delregno@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | | | regulator: Merge up v6.10-rc4Mark Brown2024-06-2312-60/+127
| |\ \ \ \ \ | | | |_|_|/ | | |/| | | | | | | | | There are fixes for kselftest with clang that really help my CI.
| * | | | | regulator: dt-bindings: mt6315: Document MT6319 PMICChen-Yu Tsai2024-06-201-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MT6319 is a pin-compatible drop-in replacement for MT6315 with slightly better electrical characteristics. It's unclear whether there are any differences, since the downstream implementation doesn't describe the MT6319 separately. Neither does the implementation check chip IDs, even though those are available. Add a new compatible for the MT6319 just in case differences are discovered later and fall back to the MT6315 compatible. Signed-off-by: Chen-Yu Tsai <wenst@chromium.org> Reviewed-by: Conor Dooley <conor.dooley@microchip.com> Link: https://patch.msgid.link/20240620094746.2404753-2-wenst@chromium.org Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | | | dt-bindings: regulator: twl-regulator: convert to yamlAndreas Kemnade2024-06-062-82/+164
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert the regulator bindings to yaml. Drop one twl5030 compatible due to no documentation on mfd side and no users of the twl5030. Signed-off-by: Andreas Kemnade <andreas@kemnade.info> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://msgid.link/r/20240606111611.371463-1-andreas@kemnade.info Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | | | regulator: dt-bindings: describe the PMU module of the WCN7850 packageBartosz Golaszewski2024-06-051-1/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The WCN7850 package contains discrete modules for WLAN and Bluetooth. They are powered by the Power Management Unit (PMU) that takes inputs from the host and provides LDO outputs. Extend the bindings for QCA6390 to also document this model. Acked-by: Mark Brown <broonie@kernel.org> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Link: https://msgid.link/r/20240605121450.23697-3-brgl@bgdev.pl Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | | | regulator: dt-bindings: describe the PMU module of the QCA6390 packageBartosz Golaszewski2024-06-051-0/+151
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QCA6390 package contains discrete modules for WLAN and Bluetooth. They are powered by the Power Management Unit (PMU) that takes inputs from the host and provides LDO outputs. This document describes this module. Acked-by: Mark Brown <broonie@kernel.org> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Link: https://msgid.link/r/20240605121450.23697-2-brgl@bgdev.pl Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | | | regulator: Merge up fixesMark Brown2024-06-037-5/+58
| |\ \ \ \ \ | | | |_|_|/ | | |/| | | | | | | | | We need these to get the i.MX8 boards working in CI again.
| * | | | | Fix issue when using devm_of_regulator_put_matches andMark Brown2024-05-291-1/+10
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge series from Alina Yu <alina_yu@richtek.com>: There are two types of LDO VOUT: fixed voltage mode and adjustable voltage mode. As the fixed voltage for the LDO is outside the range of the adjustable voltage mode, the constraints for this scenario are not suitable to represent both modes. Therefore, A property is added to specify the fixed LDO VOUT. In this version, a software bug has been fixed. rtq2208_ldo_match is no longer a local variable. It prevents invalid memory access when devm_of_regulator_put_matches is called.
| | * | | | | regulator: dt-bindings: rtq2208: Add specified fixed LDO VOUT propertyAlina Yu2024-05-291-1/+10
| | | |_|_|/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As the fixed voltage for the LDO is outside the range of the adjustable voltage mode, the constraints for this scenario are not suitable to represent both modes. Therefore, A property is added to specify the fixed LDO VOUT. Examples of fixed LDO VOUT and adjustable LDO VOUT is also added to this version. Signed-off-by: Alina Yu <alina_yu@richtek.com> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://msgid.link/r/c6cb218f6338291525a29ed89a88a42c175127ad.1716870419.git.alina_yu@richtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * / | | | regulator: st,stm32mp1-pwr-reg: add compatible for STM32MP13Patrick Delaunay2024-05-271-1/+6
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add new compatible "st,stm32mp13-pwr-reg" for STM32MP13 SoC family. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Link: https://msgid.link/r/20240523200353.v4.1.Ia0a99d90acb512aa020a6e7a8cca8cc1b71f1759@changeid Signed-off-by: Mark Brown <broonie@kernel.org>
* | | | | Merge tag 'gpio-updates-for-v6.11-rc1' of ↵Linus Torvalds2024-07-1631-2004/+552
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux Pull gpio updates from Bartosz Golaszewski: "The majority of added lines are two new modules: the GPIO virtual consumer module that improves our ability to add automated tests for the kernel API and the "sloppy" logic analyzer module that uses the GPIO API to implement a coarse-grained debugging tool for useful for remote development. Other than that we have the usual assortment of various driver extensions, improvements to the core GPIO code, DT-bindings and other documentation updates as well as an extension to the interrupt simulator: GPIOLIB core: - rework kfifo handling rework in the character device code - improve the labeling of GPIOs requested as interrupts and show more info on interrupt-only GPIOs in debugfs - remove unused APIs - unexport interfaces that are only used from the core GPIO code - drop the return value from gpiochip_set_desc_names() as it cannot fail - move a string array definition out of a header and into a specific compilation unit - convert the last user of gpiochip_get_desc() other than GPIO core to using a safer alternative - use array_index_nospec() where applicable New drivers: - add a "virtual GPIO consumer" module that allows requesting GPIOs from actual hardware and driving tests of the in-kernel GPIO API from user-space over debugfs - add a GPIO-based "sloppy" logic analyzer module useful for "first glance" debugging on remote boards Driver improvements: - add support for a new model to gpio-pca953x - lock GPIOs as interrupts in gpio-sim when the lines are requested as irqs via the simulator domain + some other minor improvements - improve error reporting in gpio-syscon - convert gpio-ath79 to using dynamic GPIO base and range - use pcibios_err_to_errno() for converting PCIBIOS error codes to errno vaues in gpio-amd8111 and gpio-rdc321x - allow building gpio-brcmstb for the BCM2835 architecture DT bindings: - convert DT bindings for lsi,zevio, mpc8xxx, and atmel to DT schema - document new properties for aspeed,gpio, fsl,qoriq-gpio and gpio-vf610 - document new compatibles for pca953x and fsl,qoriq-gpio Documentation: - document stricter behavior of the GPIO character device uAPI with regards to reconfiguring requested line without direction set - clarify the effect of the active-low flag on line values and edges - remove documentation for the legacy GPIO API in order to stop tempting people to use it - document the preference for using pread() for reading edge events in the sysfs API Other: - add an extended initializer to the interrupt simulator allowing to specify a number of callbacks callers can use to be notified about irqs being requested and released" * tag 'gpio-updates-for-v6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: (41 commits) gpio: mc33880: Convert comma to semicolon gpio: virtuser: actually use the "trimmed" local variable dt-bindings: gpio: convert Atmel GPIO to json-schema gpio: virtuser: new virtual testing driver for the GPIO API dt-bindings: gpio: vf610: Allow gpio-line-names to be set gpio: sim: lock GPIOs as interrupts when they are requested genirq/irq_sim: add an extended irq_sim initializer dt-bindings: gpio: fsl,qoriq-gpio: Add compatible string fsl,ls1046a-gpio gpiolib: unexport gpiochip_get_desc() gpio: add sloppy logic analyzer using polling Documentation: gpio: Reconfiguration with unset direction (uAPI v2) Documentation: gpio: Reconfiguration with unset direction (uAPI v1) dt-bindings: gpio: fsl,qoriq-gpio: add common property gpio-line-names gpio: ath79: convert to dynamic GPIO base allocation pinctrl: da9062: replace gpiochip_get_desc() with gpio_device_get_desc() gpiolib: put gpio_suffixes in a single compilation unit Documentation: gpio: Clarify effect of active low flag on line edges Documentation: gpio: Clarify effect of active low flag on line values gpiolib: Remove data-less gpiochip_add() function gpio: sim: use devm_mutex_init() ...
| * | | | | dt-bindings: gpio: convert Atmel GPIO to json-schemaManikandan Muralidharan2024-07-092-31/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert the Atmel GPIO controller binding document to DT schema format using json-schema. The at91 pinctrl driver uses "atmel,at91rm9200-gpio" compatible string to find the number of active GPIO banks and identify the pinmux nodes. "atmel,at91sam9x5-gpio" and "microchip,sam9x60-gpio" have additional registers to handle drive-strength, slew-rate, pull-down to drive the pinmux configs. The new compatible string "microchip,sam9x7-gpio" is added. Signed-off-by: Manikandan Muralidharan <manikandan.m@microchip.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20240709092354.191643-5-manikandan.m@microchip.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
| * | | | | gpio: virtuser: new virtual testing driver for the GPIO APIBartosz Golaszewski2024-07-092-0/+178
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The GPIO subsystem used to have a serious problem with undefined behavior and use-after-free bugs on hot-unplug of GPIO chips. This can be considered a corner-case by some as most GPIO controllers are enabled early in the boot process and live until the system goes down but most GPIO drivers do allow unbind over sysfs, many are loadable modules that can be (force) unloaded and there are also GPIO devices that can be dynamically detached, for instance CP2112 which is a USB GPIO expender. Bugs can be triggered both from user-space as well as by in-kernel users. We have the means of testing it from user-space via the character device but the issues manifest themselves differently in the kernel. This is a proposition of adding a new virtual driver - a configurable GPIO consumer that can be configured over configfs (similarly to gpio-sim) or described on the device-tree. This driver is aimed as a helper in spotting any regressions in hot-unplug handling in GPIOLIB. Link: https://lore.kernel.org/r/20240708142912.120570-1-brgl@bgdev.pl Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
| * | | | | dt-bindings: gpio: vf610: Allow gpio-line-names to be setFrieder Schrempf2024-07-081-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Describe common "gpio-line-names" property to allow DTs to specify names for GPIO lines. Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20240708084107.38986-2-frieder@fris.de Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
| * | | | | dt-bindings: gpio: fsl,qoriq-gpio: Add compatible string fsl,ls1046a-gpioFrank Li2024-07-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add compatible string for chip ls1046 to fix below warning. arch/arm64/boot/dts/freescale/fsl-ls1046a-frwy.dtb: /soc/gpio@2300000: failed to match any schema with compatible: ['fsl,ls1046a-gpio', 'fsl,qoriq-gpio'] Signed-off-by: Frank Li <Frank.Li@nxp.com> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20240702201724.96681-1-Frank.Li@nxp.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
| * | | | | gpio: add sloppy logic analyzer using pollingWolfram Sang2024-07-012-0/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a sloppy logic analyzer using GPIOs. It comes with a script to isolate a CPU for polling. While this is definitely not a production level analyzer, it can be a helpful first view when remote debugging. Read the documentation for details. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20240620094159.6785-2-wsa+renesas@sang-engineering.com [Bartosz: moved the Kconfig entry into a different category] Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
| * | | | | Documentation: gpio: Reconfiguration with unset direction (uAPI v2)Kent Gibson2024-07-011-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update description of reconfiguration rules, adding requirement that a direction flag be set to enable changing configuration for a line. Signed-off-by: Kent Gibson <warthog618@gmail.com> Link: https://lore.kernel.org/r/20240626052925.174272-5-warthog618@gmail.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
| * | | | | Documentation: gpio: Reconfiguration with unset direction (uAPI v1)Kent Gibson2024-07-011-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update description of reconfiguration rules, adding requirement that a direction flag be set or the configuration is considered invalid. Signed-off-by: Kent Gibson <warthog618@gmail.com> Link: https://lore.kernel.org/r/20240626052925.174272-4-warthog618@gmail.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
| * | | | | dt-bindings: gpio: fsl,qoriq-gpio: add common property gpio-line-namesFrank Li2024-06-281-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add common gpio-line-names property for fsl,qoriq-gpio to fix below warning. arch/arm64/boot/dts/freescale/fsl-ls1028a-kontron-kbox-a-230-ls.dtb: gpio@2300000: 'gpio-line-names' does not match any of the regexes: 'pinctrl-[0-9]+' from schema $id: http://devicetree.org/schemas/gpio/fsl,qoriq-gpio.yaml Signed-off-by: Frank Li <Frank.Li@nxp.com> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20240627202151.456812-1-Frank.Li@nxp.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
| * | | | | Documentation: gpio: Clarify effect of active low flag on line edgesKent Gibson2024-06-122-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The documentation does not make sufficiently clear that edge polarity is based on changes to the logical line values, and that the physical polarity of edges is dependent on the active low flag. Clarify the relationship between the active low flag and edge polarity for the functions that read edge events. Suggested-by: David C. Rankin <drankinatty@gmail.com> Signed-off-by: Kent Gibson <warthog618@gmail.com> Link: https://lore.kernel.org/r/20240610092157.9147-3-warthog618@gmail.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
| * | | | | Documentation: gpio: Clarify effect of active low flag on line valuesKent Gibson2024-06-124-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The documentation does not make sufficiently clear that the uAPI deals with logical line values, nor does it describe the influence of the active low flag on the mapping between physical and logical line values. Clarify the relationship between physical and logical line values and the effect of the active low flag for ioctls passing line values. Suggested-by: David C. Rankin <drankinatty@gmail.com> Signed-off-by: Kent Gibson <warthog618@gmail.com> Link: https://lore.kernel.org/r/20240610092157.9147-2-warthog618@gmail.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
| * | | | | gpiolib: Remove data-less gpiochip_add() functionAndrew Davis2024-06-111-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GPIO chips should be added with driver-private data associated with the chip. If none is needed, NULL can be used. All users already do this except one, fix that here. With no more users of the base gpiochip_add() we can drop this function so no more users show up later. Signed-off-by: Andrew Davis <afd@ti.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/r/20240610135313.142571-1-afd@ti.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
| * | | | | docs: gpio: prefer pread(2) for interrupt readingHuichun Feng2024-06-101-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In legacy sysfs GPIO, when using poll(2) on the sysfs GPIO value for state change awaiting, a subsequent read(2) is required for consuming the event, which the doc recommends the use of lseek(2) or close-and-reopen to reset the file offset afterwards. The recommendations however, require at least 2 syscalls to consume the event. Gladly, use of pread(2) require only 1 syscall for the consumption. Let's advertise this usage by prioritizing its placement. Signed-off-by: Huichun Feng <foxhoundsk.tw@gmail.com> Link: https://lore.kernel.org/r/20240609173728.2950808-1-foxhoundsk.tw@gmail.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
| * | | | | dt-bindings: gpio: aspeed,sgpio: Specify #interrupt-cellsAndrew Jeffery2024-06-031-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Squash warnings such as: arch/arm/boot/dts/aspeed/aspeed-ast2500-evb.dtb: sgpio@1e780200: '#interrupt-cells' does not match any of the regexes: 'pinctrl-[0-9]+' Also, mark #interrupt-cells as required. The kernel devicetrees already specified it where compatible nodes were defined, and u-boot pulls in the kernel devicetrees, so this should have minimal practical impact. Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au> Acked-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20240530-dt-warnings-gpio-sgpio-interrupt-cells-v2-2-912cd16e641f@codeconstruct.com.au Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
| * | | | | dt-bindings: gpio: aspeed,sgpio: Specify gpio-line-namesAndrew Jeffery2024-06-031-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some devicetrees specify gpio-line-names in the sgpio node despite it not being defined by the binding. It's a reasonable thing to do, so define the property to squash warnings such as: arch/arm/boot/dts/aspeed/aspeed-bmc-vegman-rx20.dtb: sgpio@1e780200: 'gpio-line-names' does not match any of the regexes: 'pinctrl-[0-9]+' Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au> Link: https://lore.kernel.org/r/20240530-dt-warnings-gpio-sgpio-interrupt-cells-v2-1-912cd16e641f@codeconstruct.com.au Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>