forked from Minki/linux
spi: Updates for v5.18
The overwhelming bulk of this pull request is a change from Uwe Kleine-König which changes the return type of the remove() function to void as part of some wider work he's doing to do this for all bus types, causing updates to most SPI device drivers. The branch with that on has been cross merged with a couple of other trees which added new SPI drivers this cycle, I'm not expecting any build issues resulting from the change. Otherwise it's been a relatively quiet release with some new device support, a few minor features and the welcome completion of the conversion of the subsystem to use GPIO descriptors rather than numbers: - Change return type of remove() to void. - Completion of the conversion of SPI controller drivers to use GPIO descriptors rather than numbers. - Quite a few DT schema conversions. - Support for multiple SPI devices on a bus in ACPI systems. - Big overhaul of the PXA2xx SPI driver. - Support for AMD AMDI0062, Intel Raptor Lake, Mediatek MT7986 and MT8186, nVidia Tegra210 and Tegra234, Renesas RZ/V2L, Tesla FSD and Sunplus SP7021. -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmI4b+8ACgkQJNaLcl1U h9AB+Qf/WhPzDSCdhK1repnSmEpRNs/J6hItmY2H6pTQaWALpfTB0+p1Nb5tAotg fHbu6a2AsiiwWt+tDal44GFYhS0CDSOT4hqgLV8msyDDPPJqqr7A2dbu7YrCjTVI TgNZNwxW7c2LgqBXR9GV7NPWYoxYxveoYh+L+05MSuSQxSOvPl6LUZiZPnPufQM6 dCpEh19atrtasFg3rFnslWBd2C3h8hb6YT7vUZs9gxhg3FvSgpYQwzz5SfFgHXK6 Rg07m8fDTSjf2qo1C4pc/d1Ni1xBe7aHKMtjtR3jJ4q8QqiawfCcvvOep/Iaec1+ s3qnDthohWMJoF1W6ERf3HiAgNIfhg== =4tlR -----END PGP SIGNATURE----- Merge tag 'spi-v5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi updates from Mark Brown: "The overwhelming bulk of this pull request is a change from Uwe Kleine-König which changes the return type of the remove() function to void as part of some wider work he's doing to do this for all bus types, causing updates to most SPI device drivers. The branch with that on has been cross merged with a couple of other trees which added new SPI drivers this cycle, I'm not expecting any build issues resulting from the change. Otherwise it's been a relatively quiet release with some new device support, a few minor features and the welcome completion of the conversion of the subsystem to use GPIO descriptors rather than numbers: - Change return type of remove() to void. - Completion of the conversion of SPI controller drivers to use GPIO descriptors rather than numbers. - Quite a few DT schema conversions. - Support for multiple SPI devices on a bus in ACPI systems. - Big overhaul of the PXA2xx SPI driver. - Support for AMD AMDI0062, Intel Raptor Lake, Mediatek MT7986 and MT8186, nVidia Tegra210 and Tegra234, Renesas RZ/V2L, Tesla FSD and Sunplus SP7021" [ And this is obviously where that spi change that snuck into the regulator tree _should_ have been :^] * tag 'spi-v5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (124 commits) spi: fsi: Implement a timeout for polling status spi: Fix erroneous sgs value with min_t() spi: tegra20: Use of_device_get_match_data() spi: mediatek: add ipm design support for MT7986 spi: Add compatible for MT7986 spi: sun4i: fix typos in comments spi: mediatek: support tick_delay without enhance_timing spi: Update clock-names property for arm pl022 spi: rockchip-sfc: fix platform_get_irq.cocci warning spi: s3c64xx: Add spi port configuration for Tesla FSD SoC spi: dt-bindings: samsung: Add fsd spi compatible spi: topcliff-pch: Prevent usage of potentially stale DMA device spi: tegra210-quad: combined sequence mode spi: tegra210-quad: add acpi support spi: npcm-fiu: Fix typo ("npxm") spi: Fix Tegra QSPI example spi: qup: replace spin_lock_irqsave by spin_lock in hard IRQ spi: cadence: fix platform_get_irq.cocci warning spi: Update NXP Flexspi maintainer details dt-bindings: mfd: maxim,max77802: Convert to dtschema ...
This commit is contained in:
commit
ad9c6ee642
40
Documentation/devicetree/bindings/extcon/maxim,max77843.yaml
Normal file
40
Documentation/devicetree/bindings/extcon/maxim,max77843.yaml
Normal file
@ -0,0 +1,40 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/extcon/maxim,max77843.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Maxim MAX77843 MicroUSB and Companion Power Management IC Extcon
|
||||
|
||||
maintainers:
|
||||
- Chanwoo Choi <cw00.choi@samsung.com>
|
||||
- Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
|
||||
|
||||
description: |
|
||||
This is a part of device tree bindings for Maxim MAX77843 MicroUSB
|
||||
Integrated Circuit (MUIC).
|
||||
|
||||
See also Documentation/devicetree/bindings/mfd/maxim,max77843.yaml for
|
||||
additional information and example.
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: maxim,max77843-muic
|
||||
|
||||
connector:
|
||||
$ref: /schemas/connector/usb-connector.yaml#
|
||||
|
||||
ports:
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description:
|
||||
Any connector to the data bus of this controller should be modelled using
|
||||
the OF graph bindings specified
|
||||
properties:
|
||||
port:
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- connector
|
||||
|
||||
additionalProperties: false
|
@ -31,7 +31,7 @@ properties:
|
||||
|
||||
controller-data:
|
||||
description:
|
||||
SPI controller data, see bindings/spi/spi-samsung.txt
|
||||
SPI controller data, see bindings/spi/samsung,spi-peripheral-props.yaml
|
||||
type: object
|
||||
|
||||
google,cros-ec-spi-pre-delay:
|
||||
@ -148,18 +148,21 @@ patternProperties:
|
||||
required:
|
||||
- compatible
|
||||
|
||||
if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- google,cros-ec-i2c
|
||||
- google,cros-ec-rpmsg
|
||||
then:
|
||||
properties:
|
||||
google,cros-ec-spi-pre-delay: false
|
||||
google,cros-ec-spi-msg-delay: false
|
||||
spi-max-frequency: false
|
||||
allOf:
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- google,cros-ec-i2c
|
||||
- google,cros-ec-rpmsg
|
||||
then:
|
||||
properties:
|
||||
google,cros-ec-spi-pre-delay: false
|
||||
google,cros-ec-spi-msg-delay: false
|
||||
spi-max-frequency: false
|
||||
else:
|
||||
$ref: /schemas/spi/spi-peripheral-props.yaml
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
@ -200,7 +203,7 @@ examples:
|
||||
spi-max-frequency = <5000000>;
|
||||
|
||||
proximity {
|
||||
compatible = "google,cros-ec-mkbp-proximity";
|
||||
compatible = "google,cros-ec-mkbp-proximity";
|
||||
};
|
||||
|
||||
cbas {
|
||||
|
@ -1,147 +0,0 @@
|
||||
Maxim MAX14577/77836 Multi-Function Device
|
||||
|
||||
MAX14577 is a Multi-Function Device with Micro-USB Interface Circuit, Li+
|
||||
Battery Charger and SFOUT LDO output for powering USB devices. It is
|
||||
interfaced to host controller using I2C.
|
||||
|
||||
MAX77836 additionally contains PMIC (with two LDO regulators) and Fuel Gauge.
|
||||
For the description of Fuel Gauge low SOC alert interrupt see:
|
||||
../power/supply/max17040_battery.txt
|
||||
|
||||
|
||||
Required properties:
|
||||
- compatible : Must be "maxim,max14577" or "maxim,max77836".
|
||||
- reg : I2C slave address for the max14577 chip (0x25 for max14577/max77836)
|
||||
- interrupts : IRQ line for the chip.
|
||||
|
||||
|
||||
Required nodes:
|
||||
- charger :
|
||||
Node for configuring the charger driver.
|
||||
Required properties:
|
||||
- compatible : "maxim,max14577-charger"
|
||||
or "maxim,max77836-charger"
|
||||
- maxim,fast-charge-uamp : Current in uA for Fast Charge;
|
||||
Valid values:
|
||||
- for max14577: 90000 - 950000;
|
||||
- for max77836: 45000 - 475000;
|
||||
- maxim,eoc-uamp : Current in uA for End-Of-Charge mode;
|
||||
Valid values:
|
||||
- for max14577: 50000 - 200000;
|
||||
- for max77836: 5000 - 100000;
|
||||
- maxim,ovp-uvolt : OverVoltage Protection Threshold in uV;
|
||||
In an overvoltage condition, INT asserts and charging
|
||||
stops. Valid values:
|
||||
- 6000000, 6500000, 7000000, 7500000;
|
||||
- maxim,constant-uvolt : Battery Constant Voltage in uV;
|
||||
Valid values:
|
||||
- 4000000 - 4280000 (step by 20000);
|
||||
- 4350000;
|
||||
|
||||
|
||||
Optional nodes:
|
||||
- max14577-muic/max77836-muic :
|
||||
Node used only by extcon consumers.
|
||||
Required properties:
|
||||
- compatible : "maxim,max14577-muic" or "maxim,max77836-muic"
|
||||
|
||||
- regulators :
|
||||
Required properties:
|
||||
- compatible : "maxim,max14577-regulator"
|
||||
or "maxim,max77836-regulator"
|
||||
|
||||
May contain a sub-node per regulator from the list below. Each
|
||||
sub-node should contain the constraints and initialization information
|
||||
for that regulator. See regulator.txt for a description of standard
|
||||
properties for these sub-nodes.
|
||||
|
||||
List of valid regulator names:
|
||||
- for max14577: CHARGER, SAFEOUT.
|
||||
- for max77836: CHARGER, SAFEOUT, LDO1, LDO2.
|
||||
|
||||
The SAFEOUT is a fixed voltage regulator so there is no need to specify
|
||||
voltages for it.
|
||||
|
||||
|
||||
Example:
|
||||
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
|
||||
max14577@25 {
|
||||
compatible = "maxim,max14577";
|
||||
reg = <0x25>;
|
||||
interrupt-parent = <&gpx1>;
|
||||
interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
|
||||
|
||||
muic: max14577-muic {
|
||||
compatible = "maxim,max14577-muic";
|
||||
};
|
||||
|
||||
regulators {
|
||||
compatible = "maxim,max14577-regulator";
|
||||
|
||||
SAFEOUT {
|
||||
regulator-name = "SAFEOUT";
|
||||
};
|
||||
CHARGER {
|
||||
regulator-name = "CHARGER";
|
||||
regulator-min-microamp = <90000>;
|
||||
regulator-max-microamp = <950000>;
|
||||
regulator-boot-on;
|
||||
};
|
||||
};
|
||||
|
||||
charger {
|
||||
compatible = "maxim,max14577-charger";
|
||||
|
||||
maxim,constant-uvolt = <4350000>;
|
||||
maxim,fast-charge-uamp = <450000>;
|
||||
maxim,eoc-uamp = <50000>;
|
||||
maxim,ovp-uvolt = <6500000>;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
max77836@25 {
|
||||
compatible = "maxim,max77836";
|
||||
reg = <0x25>;
|
||||
interrupt-parent = <&gpx1>;
|
||||
interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
|
||||
|
||||
muic: max77836-muic {
|
||||
compatible = "maxim,max77836-muic";
|
||||
};
|
||||
|
||||
regulators {
|
||||
compatible = "maxim,max77836-regulator";
|
||||
|
||||
SAFEOUT {
|
||||
regulator-name = "SAFEOUT";
|
||||
};
|
||||
CHARGER {
|
||||
regulator-name = "CHARGER";
|
||||
regulator-min-microamp = <90000>;
|
||||
regulator-max-microamp = <950000>;
|
||||
regulator-boot-on;
|
||||
};
|
||||
LDO1 {
|
||||
regulator-name = "LDO1";
|
||||
regulator-min-microvolt = <2700000>;
|
||||
regulator-max-microvolt = <2700000>;
|
||||
};
|
||||
LDO2 {
|
||||
regulator-name = "LDO2";
|
||||
regulator-min-microvolt = <800000>;
|
||||
regulator-max-microvolt = <3950000>;
|
||||
};
|
||||
};
|
||||
|
||||
charger {
|
||||
compatible = "maxim,max77836-charger";
|
||||
|
||||
maxim,constant-uvolt = <4350000>;
|
||||
maxim,fast-charge-uamp = <225000>;
|
||||
maxim,eoc-uamp = <7500>;
|
||||
maxim,ovp-uvolt = <6500000>;
|
||||
};
|
||||
};
|
@ -1,25 +0,0 @@
|
||||
Maxim MAX77802 multi-function device
|
||||
|
||||
The Maxim MAX77802 is a Power Management IC (PMIC) that contains 10 high
|
||||
efficiency Buck regulators, 32 Low-DropOut (LDO) regulators used to power
|
||||
up application processors and peripherals, a 2-channel 32kHz clock outputs,
|
||||
a Real-Time-Clock (RTC) and a I2C interface to program the individual
|
||||
regulators, clocks outputs and the RTC.
|
||||
|
||||
Bindings for the built-in 32k clock generator block and
|
||||
regulators are defined in ../clk/maxim,max77802.txt and
|
||||
../regulator/max77802.txt respectively.
|
||||
|
||||
Required properties:
|
||||
- compatible : Must be "maxim,max77802"
|
||||
- reg : Specifies the I2C slave address of PMIC block.
|
||||
- interrupts : I2C device IRQ line connected to the main SoC.
|
||||
|
||||
Example:
|
||||
|
||||
max77802: pmic@9 {
|
||||
compatible = "maxim,max77802";
|
||||
interrupt-parent = <&intc>;
|
||||
interrupts = <26 IRQ_TYPE_NONE>;
|
||||
reg = <0x09>;
|
||||
};
|
195
Documentation/devicetree/bindings/mfd/maxim,max14577.yaml
Normal file
195
Documentation/devicetree/bindings/mfd/maxim,max14577.yaml
Normal file
@ -0,0 +1,195 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/mfd/maxim,max14577.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Maxim MAX14577/MAX77836 MicroUSB and Companion Power Management IC
|
||||
|
||||
maintainers:
|
||||
- Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
|
||||
|
||||
description: |
|
||||
This is a part of device tree bindings for Maxim MAX14577/MAX77836 MicroUSB
|
||||
Integrated Circuit (MUIC).
|
||||
|
||||
The Maxim MAX14577 is a MicroUSB and Companion Power Management IC which
|
||||
includes voltage safeout regulators, charger and MicroUSB management IC.
|
||||
|
||||
The Maxim MAX77836 is a MicroUSB and Companion Power Management IC which
|
||||
includes voltage safeout and LDO regulators, charger, fuel-gauge and MicroUSB
|
||||
management IC.
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- maxim,max14577
|
||||
- maxim,max77836
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
wakeup-source: true
|
||||
|
||||
charger:
|
||||
$ref: /schemas/power/supply/maxim,max14577.yaml
|
||||
|
||||
extcon:
|
||||
type: object
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- maxim,max14577-muic
|
||||
- maxim,max77836-muic
|
||||
|
||||
required:
|
||||
- compatible
|
||||
|
||||
regulators:
|
||||
$ref: /schemas/regulator/maxim,max14577.yaml
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- interrupts
|
||||
- reg
|
||||
- charger
|
||||
|
||||
allOf:
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
const: maxim,max14577
|
||||
then:
|
||||
properties:
|
||||
charger:
|
||||
properties:
|
||||
compatible:
|
||||
const: maxim,max14577-charger
|
||||
extcon:
|
||||
properties:
|
||||
compatible:
|
||||
const: maxim,max14577-muic
|
||||
regulator:
|
||||
properties:
|
||||
compatible:
|
||||
const: maxim,max14577-regulator
|
||||
else:
|
||||
properties:
|
||||
charger:
|
||||
properties:
|
||||
compatible:
|
||||
const: maxim,max77836-charger
|
||||
extcon:
|
||||
properties:
|
||||
compatible:
|
||||
const: maxim,max77836-muic
|
||||
regulator:
|
||||
properties:
|
||||
compatible:
|
||||
const: maxim,max77836-regulator
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
|
||||
i2c {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
pmic@25 {
|
||||
compatible = "maxim,max14577";
|
||||
reg = <0x25>;
|
||||
interrupt-parent = <&gpx1>;
|
||||
interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
|
||||
|
||||
extcon {
|
||||
compatible = "maxim,max14577-muic";
|
||||
};
|
||||
|
||||
regulators {
|
||||
compatible = "maxim,max14577-regulator";
|
||||
|
||||
SAFEOUT {
|
||||
regulator-name = "SAFEOUT";
|
||||
};
|
||||
|
||||
CHARGER {
|
||||
regulator-name = "CHARGER";
|
||||
regulator-min-microamp = <90000>;
|
||||
regulator-max-microamp = <950000>;
|
||||
regulator-boot-on;
|
||||
};
|
||||
};
|
||||
|
||||
charger {
|
||||
compatible = "maxim,max14577-charger";
|
||||
|
||||
maxim,constant-uvolt = <4350000>;
|
||||
maxim,fast-charge-uamp = <450000>;
|
||||
maxim,eoc-uamp = <50000>;
|
||||
maxim,ovp-uvolt = <6500000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
- |
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
|
||||
i2c {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
pmic@25 {
|
||||
compatible = "maxim,max77836";
|
||||
interrupt-parent = <&gpx1>;
|
||||
interrupts = <5 IRQ_TYPE_NONE>;
|
||||
reg = <0x25>;
|
||||
wakeup-source;
|
||||
|
||||
extcon {
|
||||
compatible = "maxim,max77836-muic";
|
||||
};
|
||||
|
||||
regulators {
|
||||
compatible = "maxim,max77836-regulator";
|
||||
|
||||
SAFEOUT {
|
||||
regulator-name = "SAFEOUT";
|
||||
};
|
||||
|
||||
CHARGER {
|
||||
regulator-name = "CHARGER";
|
||||
regulator-min-microamp = <45000>;
|
||||
regulator-max-microamp = <475000>;
|
||||
regulator-boot-on;
|
||||
};
|
||||
|
||||
LDO1 {
|
||||
regulator-name = "MOT_2.7V";
|
||||
regulator-min-microvolt = <1100000>;
|
||||
regulator-max-microvolt = <2700000>;
|
||||
};
|
||||
|
||||
LDO2 {
|
||||
regulator-name = "UNUSED_LDO2";
|
||||
regulator-min-microvolt = <800000>;
|
||||
regulator-max-microvolt = <3950000>;
|
||||
};
|
||||
};
|
||||
|
||||
charger {
|
||||
compatible = "maxim,max77836-charger";
|
||||
|
||||
maxim,constant-uvolt = <4350000>;
|
||||
maxim,fast-charge-uamp = <225000>;
|
||||
maxim,eoc-uamp = <7500>;
|
||||
maxim,ovp-uvolt = <6500000>;
|
||||
};
|
||||
};
|
||||
};
|
194
Documentation/devicetree/bindings/mfd/maxim,max77802.yaml
Normal file
194
Documentation/devicetree/bindings/mfd/maxim,max77802.yaml
Normal file
@ -0,0 +1,194 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/mfd/maxim,max77802.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Maxim MAX77802 Power Management IC
|
||||
|
||||
maintainers:
|
||||
- Javier Martinez Canillas <javier@dowhile0.org>
|
||||
- Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
|
||||
|
||||
description: |
|
||||
This is a part of device tree bindings for Maxim MAX77802 Power Management
|
||||
Integrated Circuit (PMIC).
|
||||
|
||||
The Maxim MAX77802 is a Power Management IC which includes voltage and
|
||||
current regulators (10 high efficiency Buck regulators and 32 Low-DropOut
|
||||
(LDO)), RTC and clock outputs.
|
||||
|
||||
The MAX77802 provides two 32.768khz clock outputs that can be controlled
|
||||
(gated/ungated) over I2C. The clock IDs are defined as preprocessor macros
|
||||
in dt-bindings/clock/maxim,max77802.h.
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: maxim,max77802
|
||||
|
||||
'#clock-cells':
|
||||
const: 1
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
regulators:
|
||||
$ref: /schemas/regulator/maxim,max77802.yaml
|
||||
description:
|
||||
List of child nodes that specify the regulators.
|
||||
|
||||
inb1-supply:
|
||||
description: Power supply for buck1
|
||||
inb2-supply:
|
||||
description: Power supply for buck2
|
||||
inb3-supply:
|
||||
description: Power supply for buck3
|
||||
inb4-supply:
|
||||
description: Power supply for buck4
|
||||
inb5-supply:
|
||||
description: Power supply for buck5
|
||||
inb6-supply:
|
||||
description: Power supply for buck6
|
||||
inb7-supply:
|
||||
description: Power supply for buck7
|
||||
inb8-supply:
|
||||
description: Power supply for buck8
|
||||
inb9-supply:
|
||||
description: Power supply for buck9
|
||||
inb10-supply:
|
||||
description: Power supply for buck10
|
||||
|
||||
inl1-supply:
|
||||
description: Power supply for LDO8, LDO15
|
||||
inl2-supply:
|
||||
description: Power supply for LDO17, LDO27, LDO30, LDO35
|
||||
inl3-supply:
|
||||
description: Power supply for LDO3, LDO5, LDO7, LDO7
|
||||
inl4-supply:
|
||||
description: Power supply for LDO10, LDO11, LDO13, LDO14
|
||||
inl5-supply:
|
||||
description: Power supply for LDO9, LDO19
|
||||
inl6-supply:
|
||||
description: Power supply for LDO4, LDO21, LDO24, LDO33
|
||||
inl7-supply:
|
||||
description: Power supply for LDO18, LDO20, LDO28, LDO29
|
||||
inl9-supply:
|
||||
description: Power supply for LDO12, LDO23, LDO25, LDO26, LDO32, LDO34
|
||||
inl10-supply:
|
||||
description: Power supply for LDO1, LDO2
|
||||
|
||||
wakeup-source: true
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- '#clock-cells'
|
||||
- reg
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
#include <dt-bindings/regulator/maxim,max77802.h>
|
||||
|
||||
i2c {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
pmic@9 {
|
||||
compatible = "maxim,max77802";
|
||||
interrupt-parent = <&gpx3>;
|
||||
interrupts = <1 IRQ_TYPE_NONE>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&max77802_irq>, <&pmic_selb>,
|
||||
<&pmic_dvs_1>, <&pmic_dvs_2>, <&pmic_dvs_3>;
|
||||
wakeup-source;
|
||||
reg = <0x9>;
|
||||
#clock-cells = <1>;
|
||||
|
||||
inb1-supply = <&tps65090_dcdc2>;
|
||||
inb2-supply = <&tps65090_dcdc1>;
|
||||
inb3-supply = <&tps65090_dcdc2>;
|
||||
inb4-supply = <&tps65090_dcdc2>;
|
||||
inb5-supply = <&tps65090_dcdc1>;
|
||||
inb6-supply = <&tps65090_dcdc2>;
|
||||
inb7-supply = <&tps65090_dcdc1>;
|
||||
inb8-supply = <&tps65090_dcdc1>;
|
||||
inb9-supply = <&tps65090_dcdc1>;
|
||||
inb10-supply = <&tps65090_dcdc1>;
|
||||
|
||||
inl1-supply = <&buck5_reg>;
|
||||
inl2-supply = <&buck7_reg>;
|
||||
inl3-supply = <&buck9_reg>;
|
||||
inl4-supply = <&buck9_reg>;
|
||||
inl5-supply = <&buck9_reg>;
|
||||
inl6-supply = <&tps65090_dcdc2>;
|
||||
inl7-supply = <&buck9_reg>;
|
||||
inl9-supply = <&tps65090_dcdc2>;
|
||||
inl10-supply = <&buck7_reg>;
|
||||
|
||||
regulators {
|
||||
BUCK1 {
|
||||
regulator-name = "vdd_mif";
|
||||
regulator-min-microvolt = <800000>;
|
||||
regulator-max-microvolt = <1300000>;
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-ramp-delay = <12500>;
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
BUCK2 {
|
||||
regulator-name = "vdd_arm";
|
||||
regulator-min-microvolt = <800000>;
|
||||
regulator-max-microvolt = <1500000>;
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-ramp-delay = <12500>;
|
||||
regulator-coupled-with = <&buck3_reg>;
|
||||
regulator-coupled-max-spread = <300000>;
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
// ...
|
||||
|
||||
BUCK10 {
|
||||
regulator-name = "vdd_1v8";
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-state-mem {
|
||||
regulator-on-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
LDO1 {
|
||||
regulator-name = "vdd_1v0";
|
||||
regulator-min-microvolt = <1000000>;
|
||||
regulator-max-microvolt = <1000000>;
|
||||
regulator-always-on;
|
||||
regulator-initial-mode = <MAX77802_OPMODE_NORMAL>;
|
||||
regulator-state-mem {
|
||||
regulator-on-in-suspend;
|
||||
regulator-mode = <MAX77802_OPMODE_LP>;
|
||||
};
|
||||
};
|
||||
|
||||
// ...
|
||||
|
||||
LDO35 {
|
||||
regulator-name = "ldo_35";
|
||||
regulator-min-microvolt = <1200000>;
|
||||
regulator-max-microvolt = <1200000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
144
Documentation/devicetree/bindings/mfd/maxim,max77843.yaml
Normal file
144
Documentation/devicetree/bindings/mfd/maxim,max77843.yaml
Normal file
@ -0,0 +1,144 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/mfd/maxim,max77843.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Maxim MAX77843 MicroUSB and Companion Power Management IC
|
||||
|
||||
maintainers:
|
||||
- Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
|
||||
|
||||
description: |
|
||||
This is a part of device tree bindings for Maxim MAX77843 MicroUSB
|
||||
Integrated Circuit (MUIC).
|
||||
|
||||
The Maxim MAX77843 is a MicroUSB and Companion Power Management IC which
|
||||
includes voltage current regulators, charger, fuel-gauge, haptic motor driver
|
||||
and MicroUSB management IC.
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: maxim,max77843
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
extcon:
|
||||
$ref: /schemas/extcon/maxim,max77843.yaml
|
||||
|
||||
motor-driver:
|
||||
type: object
|
||||
properties:
|
||||
compatible:
|
||||
const: maxim,max77843-haptic
|
||||
|
||||
haptic-supply:
|
||||
description: Power supply to the haptic motor
|
||||
|
||||
pwms:
|
||||
maxItems: 1
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- haptic-supply
|
||||
- pwms
|
||||
|
||||
regulators:
|
||||
$ref: /schemas/regulator/maxim,max77843.yaml
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- interrupts
|
||||
- reg
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
|
||||
i2c {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
pmic@66 {
|
||||
compatible = "maxim,max77843";
|
||||
interrupt-parent = <&gpa1>;
|
||||
interrupts = <5 IRQ_TYPE_EDGE_FALLING>;
|
||||
reg = <0x66>;
|
||||
|
||||
extcon {
|
||||
compatible = "maxim,max77843-muic";
|
||||
|
||||
connector {
|
||||
compatible = "samsung,usb-connector-11pin",
|
||||
"usb-b-connector";
|
||||
label = "micro-USB";
|
||||
type = "micro";
|
||||
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
port@0 {
|
||||
/*
|
||||
* TODO: The DTS this is based on does not have
|
||||
* port@0 which is a required property. The ports
|
||||
* look incomplete and need fixing.
|
||||
* Add a disabled port just to satisfy dtschema.
|
||||
*/
|
||||
reg = <0>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
port@3 {
|
||||
reg = <3>;
|
||||
endpoint {
|
||||
remote-endpoint = <&mhl_to_musb_con>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
ports {
|
||||
port {
|
||||
endpoint {
|
||||
remote-endpoint = <&usb_to_muic>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
regulators {
|
||||
compatible = "maxim,max77843-regulator";
|
||||
|
||||
SAFEOUT1 {
|
||||
regulator-name = "SAFEOUT1";
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <4950000>;
|
||||
};
|
||||
|
||||
SAFEOUT2 {
|
||||
regulator-name = "SAFEOUT2";
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <4950000>;
|
||||
};
|
||||
|
||||
CHARGER {
|
||||
regulator-name = "CHARGER";
|
||||
regulator-min-microamp = <100000>;
|
||||
regulator-max-microamp = <3150000>;
|
||||
};
|
||||
};
|
||||
|
||||
motor-driver {
|
||||
compatible = "maxim,max77843-haptic";
|
||||
haptic-supply = <&ldo38_reg>;
|
||||
pwms = <&pwm 0 33670 0>;
|
||||
};
|
||||
};
|
||||
};
|
@ -47,7 +47,8 @@ properties:
|
||||
identified by the JEDEC READ ID opcode (0x9F).
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
minItems: 1
|
||||
maxItems: 2
|
||||
|
||||
spi-max-frequency: true
|
||||
spi-rx-bus-width: true
|
||||
|
@ -0,0 +1,84 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/power/supply/maxim,max14577.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Maxim MAX14577/MAX77836 MicroUSB and Companion Power Management IC Charger
|
||||
|
||||
maintainers:
|
||||
- Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
|
||||
|
||||
description: |
|
||||
This is a part of device tree bindings for Maxim MAX14577/MAX77836 MicroUSB
|
||||
Integrated Circuit (MUIC).
|
||||
|
||||
See also Documentation/devicetree/bindings/mfd/maxim,max14577.yaml for
|
||||
additional information and example.
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- maxim,max14577-charger
|
||||
- maxim,max77836-charger
|
||||
|
||||
maxim,constant-uvolt:
|
||||
description:
|
||||
Battery Constant Voltage in uV
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
minimum: 4000000
|
||||
maximum: 4350000
|
||||
|
||||
maxim,eoc-uamp:
|
||||
description: |
|
||||
Current in uA for End-Of-Charge mode.
|
||||
MAX14577: 50000-20000
|
||||
MAX77836: 5000-100000
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
|
||||
maxim,fast-charge-uamp:
|
||||
description: |
|
||||
Current in uA for Fast Charge
|
||||
MAX14577: 90000-950000
|
||||
MAX77836: 45000-475000
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
|
||||
maxim,ovp-uvolt:
|
||||
description:
|
||||
OverVoltage Protection Threshold in uV; In an overvoltage condition, INT
|
||||
asserts and charging stops.
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
enum: [6000000, 6500000, 7000000, 7500000]
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- maxim,constant-uvolt
|
||||
- maxim,eoc-uamp
|
||||
- maxim,fast-charge-uamp
|
||||
- maxim,ovp-uvolt
|
||||
|
||||
allOf:
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
const: maxim,max14577-charger
|
||||
then:
|
||||
properties:
|
||||
maxim,eoc-uamp:
|
||||
minimum: 50000
|
||||
maximum: 200000
|
||||
maxim,fast-charge-uamp:
|
||||
minimum: 90000
|
||||
maximum: 950000
|
||||
else:
|
||||
# max77836
|
||||
properties:
|
||||
maxim,eoc-uamp:
|
||||
minimum: 5000
|
||||
maximum: 100000
|
||||
maxim,fast-charge-uamp:
|
||||
minimum: 45000
|
||||
maximum: 475000
|
||||
|
||||
additionalProperties: false
|
@ -1,111 +0,0 @@
|
||||
Binding for Maxim MAX77802 regulators
|
||||
|
||||
This is a part of device tree bindings of MAX77802 multi-function device.
|
||||
More information can be found in bindings/mfd/max77802.txt file.
|
||||
|
||||
The MAX77802 PMIC has 10 high-efficiency Buck and 32 Low-dropout (LDO)
|
||||
regulators that can be controlled over I2C.
|
||||
|
||||
Following properties should be present in main device node of the MFD chip.
|
||||
|
||||
Optional properties:
|
||||
- inb1-supply: The input supply for BUCK1
|
||||
- inb2-supply: The input supply for BUCK2
|
||||
- inb3-supply: The input supply for BUCK3
|
||||
- inb4-supply: The input supply for BUCK4
|
||||
- inb5-supply: The input supply for BUCK5
|
||||
- inb6-supply: The input supply for BUCK6
|
||||
- inb7-supply: The input supply for BUCK7
|
||||
- inb8-supply: The input supply for BUCK8
|
||||
- inb9-supply: The input supply for BUCK9
|
||||
- inb10-supply: The input supply for BUCK10
|
||||
- inl1-supply: The input supply for LDO8 and LDO15
|
||||
- inl2-supply: The input supply for LDO17, LDO27, LDO30 and LDO35
|
||||
- inl3-supply: The input supply for LDO3, LDO5, LDO6 and LDO7
|
||||
- inl4-supply: The input supply for LDO10, LDO11, LDO13 and LDO14
|
||||
- inl5-supply: The input supply for LDO9 and LDO19
|
||||
- inl6-supply: The input supply for LDO4, LDO21, LDO24 and LDO33
|
||||
- inl7-supply: The input supply for LDO18, LDO20, LDO28 and LDO29
|
||||
- inl9-supply: The input supply for LDO12, LDO23, LDO25, LDO26, LDO32 and LDO34
|
||||
- inl10-supply: The input supply for LDO1 and LDO2
|
||||
|
||||
Optional nodes:
|
||||
- regulators : The regulators of max77802 have to be instantiated
|
||||
under subnode named "regulators" using the following format.
|
||||
|
||||
regulator-name {
|
||||
standard regulator constraints....
|
||||
};
|
||||
refer Documentation/devicetree/bindings/regulator/regulator.txt
|
||||
|
||||
The regulator node name should be initialized with a string to get matched
|
||||
with their hardware counterparts as follow. The valid names are:
|
||||
|
||||
-LDOn : for LDOs, where n can lie in ranges 1-15, 17-21, 23-30
|
||||
and 32-35.
|
||||
example: LDO1, LDO2, LDO35.
|
||||
-BUCKn : for BUCKs, where n can lie in range 1 to 10.
|
||||
example: BUCK1, BUCK5, BUCK10.
|
||||
|
||||
The max77802 regulator supports two different operating modes: Normal and Low
|
||||
Power Mode. Some regulators support the modes to be changed at startup or by
|
||||
the consumers during normal operation while others only support to change the
|
||||
mode during system suspend. The standard regulator suspend states binding can
|
||||
be used to configure the regulator operating mode.
|
||||
|
||||
The regulators that support the standard "regulator-initial-mode" property,
|
||||
changing their mode during normal operation are: LDOs 1, 3, 20 and 21.
|
||||
|
||||
The possible values for "regulator-initial-mode" and "regulator-mode" are:
|
||||
1: Normal regulator voltage output mode.
|
||||
3: Low Power which reduces the quiescent current down to only 1uA
|
||||
|
||||
The valid modes list is defined in the dt-bindings/regulator/maxim,max77802.h
|
||||
header and can be included by device tree source files.
|
||||
|
||||
The standard "regulator-mode" property can only be used for regulators that
|
||||
support changing their mode to Low Power Mode during suspend. These regulators
|
||||
are: BUCKs 2-4 and LDOs 1-35. Also, it only takes effect if the regulator has
|
||||
been enabled for the given suspend state using "regulator-on-in-suspend" and
|
||||
has not been disabled for that state using "regulator-off-in-suspend".
|
||||
|
||||
Example:
|
||||
|
||||
max77802@9 {
|
||||
compatible = "maxim,max77802";
|
||||
interrupt-parent = <&wakeup_eint>;
|
||||
interrupts = <26 0>;
|
||||
reg = <0x09>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
inb1-supply = <&parent_reg>;
|
||||
|
||||
regulators {
|
||||
ldo1_reg: LDO1 {
|
||||
regulator-name = "vdd_1v0";
|
||||
regulator-min-microvolt = <1000000>;
|
||||
regulator-max-microvolt = <1000000>;
|
||||
regulator-always-on;
|
||||
regulator-initial-mode = <MAX77802_OPMODE_LP>;
|
||||
};
|
||||
|
||||
ldo11_reg: LDO11 {
|
||||
regulator-name = "vdd_ldo11";
|
||||
regulator-min-microvolt = <1900000>;
|
||||
regulator-max-microvolt = <1900000>;
|
||||
regulator-always-on;
|
||||
regulator-state-mem {
|
||||
regulator-on-in-suspend;
|
||||
regulator-mode = <MAX77802_OPMODE_LP>;
|
||||
};
|
||||
};
|
||||
|
||||
buck1_reg: BUCK1 {
|
||||
regulator-name = "vdd_mif";
|
||||
regulator-min-microvolt = <950000>;
|
||||
regulator-max-microvolt = <1300000>;
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
};
|
||||
};
|
@ -0,0 +1,78 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/regulator/maxim,max14577.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Maxim MAX14577/MAX77836 MicroUSB and Companion Power Management IC regulators
|
||||
|
||||
maintainers:
|
||||
- Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
|
||||
|
||||
description: |
|
||||
This is a part of device tree bindings for Maxim MAX14577/MAX77836 MicroUSB
|
||||
Integrated Circuit (MUIC).
|
||||
|
||||
See also Documentation/devicetree/bindings/mfd/maxim,max14577.yaml for
|
||||
additional information and example.
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- maxim,max14577-regulator
|
||||
- maxim,max77836-regulator
|
||||
|
||||
CHARGER:
|
||||
type: object
|
||||
$ref: regulator.yaml#
|
||||
unevaluatedProperties: false
|
||||
description: |
|
||||
Current regulator.
|
||||
|
||||
properties:
|
||||
regulator-min-microvolt: false
|
||||
regulator-max-microvolt: false
|
||||
|
||||
SAFEOUT:
|
||||
type: object
|
||||
$ref: regulator.yaml#
|
||||
unevaluatedProperties: false
|
||||
description: |
|
||||
Safeout LDO regulator (fixed voltage).
|
||||
|
||||
properties:
|
||||
regulator-min-microamp: false
|
||||
regulator-max-microamp: false
|
||||
regulator-min-microvolt:
|
||||
const: 4900000
|
||||
regulator-max-microvolt:
|
||||
const: 4900000
|
||||
|
||||
patternProperties:
|
||||
"^LDO[12]$":
|
||||
type: object
|
||||
$ref: regulator.yaml#
|
||||
unevaluatedProperties: false
|
||||
description: |
|
||||
Current regulator.
|
||||
|
||||
properties:
|
||||
regulator-min-microamp: false
|
||||
regulator-max-microamp: false
|
||||
regulator-min-microvolt:
|
||||
minimum: 800000
|
||||
regulator-max-microvolt:
|
||||
maximum: 3950000
|
||||
|
||||
allOf:
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
const: maxim,max14577-regulator
|
||||
then:
|
||||
properties:
|
||||
LDO1: false
|
||||
LDO2: false
|
||||
|
||||
additionalProperties: false
|
@ -0,0 +1,85 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/regulator/maxim,max77802.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Maxim MAX77802 Power Management IC regulators
|
||||
|
||||
maintainers:
|
||||
- Javier Martinez Canillas <javier@dowhile0.org>
|
||||
- Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
|
||||
|
||||
description: |
|
||||
This is a part of device tree bindings for Maxim MAX77802 Power Management
|
||||
Integrated Circuit (PMIC).
|
||||
|
||||
The Maxim MAX77686 provides 10 high-efficiency Buck and 32 Low-DropOut (LDO)
|
||||
regulators.
|
||||
|
||||
See also Documentation/devicetree/bindings/mfd/maxim,max77802.yaml for
|
||||
additional information and example.
|
||||
|
||||
Certain regulators support "regulator-initial-mode" and "regulator-mode".
|
||||
The valid modes list is defined in the dt-bindings/regulator/maxim,max77802.h
|
||||
and their meaning is::
|
||||
1 - Normal regulator voltage output mode.
|
||||
3 - Low Power which reduces the quiescent current down to only 1uA
|
||||
|
||||
The standard "regulator-mode" property can only be used for regulators that
|
||||
support changing their mode to Low Power Mode during suspend. These
|
||||
regulators are:: bucks 2-4 and LDOs 1-35. Also, it only takes effect if the
|
||||
regulator has been enabled for the given suspend state using
|
||||
"regulator-on-in-suspend" and has not been disabled for that state using
|
||||
"regulator-off-in-suspend".
|
||||
|
||||
patternProperties:
|
||||
# LDO1, LDO3, LDO20, LDO21
|
||||
"^LDO([13]|2[01])$":
|
||||
type: object
|
||||
$ref: regulator.yaml#
|
||||
unevaluatedProperties: false
|
||||
description:
|
||||
LDOs supporting the regulator-initial-mode property and changing their
|
||||
mode during normal operation.
|
||||
|
||||
# LDO2, LDO4-15, LDO17-19, LDO23-30, LDO32-35
|
||||
"^LDO([24-9]|1[0-5789]|2[3-9]|3[02345])$":
|
||||
type: object
|
||||
$ref: regulator.yaml#
|
||||
unevaluatedProperties: false
|
||||
description:
|
||||
LDOs supporting the regulator-mode property (changing mode to Low Power
|
||||
Mode during suspend).
|
||||
|
||||
properties:
|
||||
regulator-initial-mode: false
|
||||
|
||||
# buck2-4
|
||||
"^BUCK[2-4]$":
|
||||
type: object
|
||||
$ref: regulator.yaml#
|
||||
unevaluatedProperties: false
|
||||
description:
|
||||
bucks supporting the regulator-mode property (changing mode to Low Power
|
||||
Mode during suspend).
|
||||
|
||||
properties:
|
||||
regulator-initial-mode: false
|
||||
|
||||
# buck1, buck5-10
|
||||
"^BUCK([15-9]|10)$":
|
||||
type: object
|
||||
$ref: regulator.yaml#
|
||||
unevaluatedProperties: false
|
||||
|
||||
properties:
|
||||
regulator-initial-mode: false
|
||||
|
||||
patternProperties:
|
||||
regulator-state-(standby|mem|disk):
|
||||
type: object
|
||||
properties:
|
||||
regulator-mode: false
|
||||
|
||||
additionalProperties: false
|
@ -0,0 +1,65 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/regulator/maxim,max77843.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Maxim MAX77843 MicroUSB and Companion Power Management IC regulators
|
||||
|
||||
maintainers:
|
||||
- Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
|
||||
|
||||
description: |
|
||||
This is a part of device tree bindings for Maxim MAX77843 MicroUSB Integrated
|
||||
Circuit (MUIC).
|
||||
|
||||
See also Documentation/devicetree/bindings/mfd/maxim,max77843.yaml for
|
||||
additional information and example.
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: maxim,max77843-regulator
|
||||
|
||||
CHARGER:
|
||||
type: object
|
||||
$ref: regulator.yaml#
|
||||
additionalProperties: false
|
||||
description: |
|
||||
Current regulator.
|
||||
|
||||
properties:
|
||||
regulator-name: true
|
||||
regulator-always-on: true
|
||||
regulator-boot-on: true
|
||||
regulator-min-microamp:
|
||||
minimum: 100000
|
||||
regulator-max-microamp:
|
||||
maximum: 3150000
|
||||
|
||||
required:
|
||||
- regulator-name
|
||||
|
||||
patternProperties:
|
||||
"^SAFEOUT[12]$":
|
||||
type: object
|
||||
$ref: regulator.yaml#
|
||||
additionalProperties: false
|
||||
description: |
|
||||
Safeout LDO regulator.
|
||||
|
||||
properties:
|
||||
regulator-name: true
|
||||
regulator-always-on: true
|
||||
regulator-boot-on: true
|
||||
regulator-min-microvolt:
|
||||
minimum: 3300000
|
||||
regulator-max-microvolt:
|
||||
maximum: 4950000
|
||||
|
||||
required:
|
||||
- regulator-name
|
||||
|
||||
required:
|
||||
- compatible
|
||||
|
||||
additionalProperties: false
|
@ -22,7 +22,7 @@ description: |
|
||||
|
||||
[1] Documentation/devicetree/bindings/serial/samsung_uart.yaml
|
||||
[2] Documentation/devicetree/bindings/i2c/i2c-exynos5.txt
|
||||
[3] Documentation/devicetree/bindings/spi/spi-samsung.txt
|
||||
[3] Documentation/devicetree/bindings/spi/samsung,spi.yaml
|
||||
|
||||
properties:
|
||||
$nodename:
|
||||
|
107
Documentation/devicetree/bindings/spi/mediatek,spi-mt65xx.yaml
Normal file
107
Documentation/devicetree/bindings/spi/mediatek,spi-mt65xx.yaml
Normal file
@ -0,0 +1,107 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/spi/mediatek,spi-mt65xx.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: SPI Bus controller for MediaTek ARM SoCs
|
||||
|
||||
maintainers:
|
||||
- Leilk Liu <leilk.liu@mediatek.com>
|
||||
|
||||
allOf:
|
||||
- $ref: "/schemas/spi/spi-controller.yaml#"
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
oneOf:
|
||||
- items:
|
||||
- enum:
|
||||
- mediatek,mt7629-spi
|
||||
- const: mediatek,mt7622-spi
|
||||
- items:
|
||||
- enum:
|
||||
- mediatek,mt8516-spi
|
||||
- const: mediatek,mt2712-spi
|
||||
- items:
|
||||
- enum:
|
||||
- mediatek,mt6779-spi
|
||||
- mediatek,mt8186-spi
|
||||
- mediatek,mt8192-spi
|
||||
- mediatek,mt8195-spi
|
||||
- const: mediatek,mt6765-spi
|
||||
- items:
|
||||
- enum:
|
||||
- mediatek,mt7986-spi-ipm
|
||||
- const: mediatek,spi-ipm
|
||||
- items:
|
||||
- enum:
|
||||
- mediatek,mt2701-spi
|
||||
- mediatek,mt2712-spi
|
||||
- mediatek,mt6589-spi
|
||||
- mediatek,mt6765-spi
|
||||
- mediatek,mt6893-spi
|
||||
- mediatek,mt7622-spi
|
||||
- mediatek,mt8135-spi
|
||||
- mediatek,mt8173-spi
|
||||
- mediatek,mt8183-spi
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
clocks:
|
||||
items:
|
||||
- description: clock used for the parent clock
|
||||
- description: clock used for the muxes clock
|
||||
- description: clock used for the clock gate
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
- const: parent-clk
|
||||
- const: sel-clk
|
||||
- const: spi-clk
|
||||
|
||||
mediatek,pad-select:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32-array
|
||||
minItems: 1
|
||||
maxItems: 4
|
||||
items:
|
||||
enum: [0, 1, 2, 3]
|
||||
description:
|
||||
specify which pins group(ck/mi/mo/cs) spi controller used.
|
||||
This is an array.
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- interrupts
|
||||
- clocks
|
||||
- clock-names
|
||||
- '#address-cells'
|
||||
- '#size-cells'
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/clock/mt8173-clk.h>
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
|
||||
spi@1100a000 {
|
||||
compatible = "mediatek,mt8173-spi";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <0x1100a000 0x1000>;
|
||||
interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_LOW>;
|
||||
clocks = <&topckgen CLK_TOP_SYSPLL3_D2>,
|
||||
<&topckgen CLK_TOP_SPI_SEL>,
|
||||
<&pericfg CLK_PERI_SPI0>;
|
||||
clock-names = "parent-clk", "sel-clk", "spi-clk";
|
||||
cs-gpios = <&pio 105 GPIO_ACTIVE_LOW>, <&pio 72 GPIO_ACTIVE_LOW>;
|
||||
mediatek,pad-select = <1>, <0>;
|
||||
};
|
@ -30,6 +30,7 @@ properties:
|
||||
- mediatek,mt7622-nor
|
||||
- mediatek,mt7623-nor
|
||||
- mediatek,mt7629-nor
|
||||
- mediatek,mt8186-nor
|
||||
- mediatek,mt8192-nor
|
||||
- mediatek,mt8195-nor
|
||||
- enum:
|
||||
@ -49,6 +50,8 @@ properties:
|
||||
- description: clock used for controller
|
||||
- description: clock used for nor dma bus. this depends on hardware
|
||||
design, so this is optional.
|
||||
- description: clock used for controller axi slave bus.
|
||||
this depends on hardware design, so it is optional.
|
||||
|
||||
clock-names:
|
||||
minItems: 2
|
||||
@ -56,6 +59,7 @@ properties:
|
||||
- const: spi
|
||||
- const: sf
|
||||
- const: axi
|
||||
- const: axi_s
|
||||
|
||||
required:
|
||||
- compatible
|
||||
|
@ -0,0 +1,58 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/spi/mediatek,spi-slave-mt27xx.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: SPI Slave controller for MediaTek ARM SoCs
|
||||
|
||||
maintainers:
|
||||
- Leilk Liu <leilk.liu@mediatek.com>
|
||||
|
||||
allOf:
|
||||
- $ref: "/schemas/spi/spi-controller.yaml#"
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- mediatek,mt2712-spi-slave
|
||||
- mediatek,mt8195-spi-slave
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
clocks:
|
||||
maxItems: 1
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
- const: spi
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- interrupts
|
||||
- clocks
|
||||
- clock-names
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/clock/mt2712-clk.h>
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
|
||||
spi@10013000 {
|
||||
compatible = "mediatek,mt2712-spi-slave";
|
||||
reg = <0x10013000 0x100>;
|
||||
interrupts = <GIC_SPI 283 IRQ_TYPE_LEVEL_LOW>;
|
||||
clocks = <&infracfg CLK_INFRA_AO_SPI1>;
|
||||
clock-names = "spi";
|
||||
assigned-clocks = <&topckgen CLK_TOP_SPISLV_SEL>;
|
||||
assigned-clock-parents = <&topckgen CLK_TOP_UNIVPLL1_D2>;
|
||||
};
|
@ -0,0 +1,52 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/spi/microchip,mpfs-spi.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Microchip MPFS {Q,}SPI Controller Device Tree Bindings
|
||||
|
||||
maintainers:
|
||||
- Conor Dooley <conor.dooley@microchip.com>
|
||||
|
||||
allOf:
|
||||
- $ref: spi-controller.yaml#
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- microchip,mpfs-spi
|
||||
- microchip,mpfs-qspi
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
clock-names:
|
||||
maxItems: 1
|
||||
|
||||
clocks:
|
||||
maxItems: 1
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- interrupts
|
||||
- clocks
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include "dt-bindings/clock/microchip,mpfs-clock.h"
|
||||
spi@20108000 {
|
||||
compatible = "microchip,mpfs-spi";
|
||||
reg = <0x20108000 0x1000>;
|
||||
clocks = <&clkcfg CLK_SPI0>;
|
||||
interrupt-parent = <&plic>;
|
||||
interrupts = <54>;
|
||||
spi-max-frequency = <25000000>;
|
||||
};
|
||||
...
|
@ -19,6 +19,7 @@ properties:
|
||||
- nvidia,tegra210-qspi
|
||||
- nvidia,tegra186-qspi
|
||||
- nvidia,tegra194-qspi
|
||||
- nvidia,tegra234-qspi
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
@ -106,7 +107,7 @@ examples:
|
||||
dma-names = "rx", "tx";
|
||||
|
||||
flash@0 {
|
||||
compatible = "spi-nor";
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <104000000>;
|
||||
spi-tx-bus-width = <2>;
|
||||
|
@ -22,7 +22,8 @@ properties:
|
||||
- renesas,rspi-r7s72100 # RZ/A1H
|
||||
- renesas,rspi-r7s9210 # RZ/A2
|
||||
- renesas,r9a07g044-rspi # RZ/G2{L,LC}
|
||||
- const: renesas,rspi-rz # RZ/A and RZ/G2{L,LC}
|
||||
- renesas,r9a07g054-rspi # RZ/V2L
|
||||
- const: renesas,rspi-rz
|
||||
|
||||
- items:
|
||||
- enum:
|
||||
@ -124,6 +125,7 @@ allOf:
|
||||
enum:
|
||||
- renesas,qspi
|
||||
- renesas,r9a07g044-rspi
|
||||
- renesas,r9a07g054-rspi
|
||||
then:
|
||||
required:
|
||||
- resets
|
||||
|
@ -0,0 +1,33 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/spi/samsung,spi-peripheral-props.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Peripheral-specific properties for Samsung S3C/S5P/Exynos SoC SPI controller
|
||||
|
||||
maintainers:
|
||||
- Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
|
||||
|
||||
description:
|
||||
See spi-peripheral-props.yaml for more info.
|
||||
|
||||
properties:
|
||||
controller-data:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
|
||||
properties:
|
||||
samsung,spi-feedback-delay:
|
||||
description: |
|
||||
The sampling phase shift to be applied on the miso line (to account
|
||||
for any lag in the miso line). Valid values:
|
||||
- 0: No phase shift.
|
||||
- 1: 90 degree phase shift sampling.
|
||||
- 2: 180 degree phase shift sampling.
|
||||
- 3: 270 degree phase shift sampling.
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
enum: [0, 1, 2, 3]
|
||||
default: 0
|
||||
|
||||
additionalProperties: true
|
188
Documentation/devicetree/bindings/spi/samsung,spi.yaml
Normal file
188
Documentation/devicetree/bindings/spi/samsung,spi.yaml
Normal file
@ -0,0 +1,188 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/spi/samsung,spi.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Samsung S3C/S5P/Exynos SoC SPI controller
|
||||
|
||||
maintainers:
|
||||
- Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
|
||||
|
||||
description:
|
||||
All the SPI controller nodes should be represented in the aliases node using
|
||||
the following format 'spi{n}' where n is a unique number for the alias.
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
oneOf:
|
||||
- enum:
|
||||
- samsung,s3c2443-spi # for S3C2443, S3C2416 and S3C2450
|
||||
- samsung,s3c6410-spi
|
||||
- samsung,s5pv210-spi # for S5PV210 and S5PC110
|
||||
- samsung,exynos5433-spi
|
||||
- tesla,fsd-spi
|
||||
- const: samsung,exynos7-spi
|
||||
deprecated: true
|
||||
|
||||
clocks:
|
||||
minItems: 2
|
||||
maxItems: 3
|
||||
|
||||
clock-names:
|
||||
minItems: 2
|
||||
maxItems: 3
|
||||
|
||||
cs-gpios: true
|
||||
|
||||
dmas:
|
||||
minItems: 2
|
||||
maxItems: 2
|
||||
|
||||
dma-names:
|
||||
items:
|
||||
- const: tx
|
||||
- const: rx
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
no-cs-readback:
|
||||
description:
|
||||
The CS line is disconnected, therefore the device should not operate
|
||||
based on CS signalling.
|
||||
type: boolean
|
||||
|
||||
num-cs:
|
||||
minimum: 1
|
||||
maximum: 4
|
||||
default: 1
|
||||
|
||||
samsung,spi-src-clk:
|
||||
description:
|
||||
If the spi controller includes a internal clock mux to select the clock
|
||||
source for the spi bus clock, this property can be used to indicate the
|
||||
clock to be used for driving the spi bus clock. If not specified, the
|
||||
clock number 0 is used as default.
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
default: 0
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- clocks
|
||||
- clock-names
|
||||
- dmas
|
||||
- dma-names
|
||||
- interrupts
|
||||
- reg
|
||||
|
||||
allOf:
|
||||
- $ref: spi-controller.yaml#
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
const: samsung,exynos5433-spi
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
minItems: 3
|
||||
maxItems: 3
|
||||
clock-names:
|
||||
items:
|
||||
- const: spi
|
||||
- enum:
|
||||
- spi_busclk0
|
||||
- spi_busclk1
|
||||
- spi_busclk2
|
||||
- spi_busclk3
|
||||
- const: spi_ioclk
|
||||
else:
|
||||
properties:
|
||||
clocks:
|
||||
minItems: 2
|
||||
maxItems: 2
|
||||
clock-names:
|
||||
items:
|
||||
- const: spi
|
||||
- enum:
|
||||
- spi_busclk0
|
||||
- spi_busclk1
|
||||
- spi_busclk2
|
||||
- spi_busclk3
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/clock/exynos5433.h>
|
||||
#include <dt-bindings/clock/samsung,s2mps11.h>
|
||||
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
|
||||
spi@14d30000 {
|
||||
compatible = "samsung,exynos5433-spi";
|
||||
reg = <0x14d30000 0x100>;
|
||||
interrupts = <GIC_SPI 433 IRQ_TYPE_LEVEL_HIGH>;
|
||||
dmas = <&pdma0 11>, <&pdma0 10>;
|
||||
dma-names = "tx", "rx";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
clocks = <&cmu_peric CLK_PCLK_SPI1>,
|
||||
<&cmu_peric CLK_SCLK_SPI1>,
|
||||
<&cmu_peric CLK_SCLK_IOCLK_SPI1>;
|
||||
clock-names = "spi",
|
||||
"spi_busclk0",
|
||||
"spi_ioclk";
|
||||
samsung,spi-src-clk = <0>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&spi1_bus>;
|
||||
num-cs = <1>;
|
||||
|
||||
cs-gpios = <&gpd6 3 GPIO_ACTIVE_HIGH>;
|
||||
|
||||
audio-codec@0 {
|
||||
compatible = "wlf,wm5110";
|
||||
reg = <0x0>;
|
||||
spi-max-frequency = <20000000>;
|
||||
interrupt-parent = <&gpa0>;
|
||||
interrupts = <4 IRQ_TYPE_NONE>;
|
||||
clocks = <&pmu_system_controller 0>,
|
||||
<&s2mps13_osc S2MPS11_CLK_BT>;
|
||||
clock-names = "mclk1", "mclk2";
|
||||
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
|
||||
wlf,micd-detect-debounce = <300>;
|
||||
wlf,micd-bias-start-time = <0x1>;
|
||||
wlf,micd-rate = <0x7>;
|
||||
wlf,micd-dbtime = <0x2>;
|
||||
wlf,micd-force-micbias;
|
||||
wlf,micd-configs = <0x0 1 0>;
|
||||
wlf,hpdet-channel = <1>;
|
||||
wlf,gpsw = <0x1>;
|
||||
wlf,inmode = <2 0 2 0>;
|
||||
|
||||
wlf,reset = <&gpc0 7 GPIO_ACTIVE_HIGH>;
|
||||
wlf,ldoena = <&gpf0 0 GPIO_ACTIVE_HIGH>;
|
||||
|
||||
/* core supplies */
|
||||
AVDD-supply = <&ldo18_reg>;
|
||||
DBVDD1-supply = <&ldo18_reg>;
|
||||
CPVDD-supply = <&ldo18_reg>;
|
||||
DBVDD2-supply = <&ldo18_reg>;
|
||||
DBVDD3-supply = <&ldo18_reg>;
|
||||
SPKVDDL-supply = <&ldo18_reg>;
|
||||
SPKVDDR-supply = <&ldo18_reg>;
|
||||
|
||||
controller-data {
|
||||
samsung,spi-feedback-delay = <0>;
|
||||
};
|
||||
};
|
||||
};
|
@ -139,4 +139,11 @@ examples:
|
||||
spi-max-frequency = <100000>;
|
||||
reg = <1>;
|
||||
};
|
||||
|
||||
flash@2 {
|
||||
compatible = "jedec,spi-nor";
|
||||
spi-max-frequency = <50000000>;
|
||||
reg = <2>, <3>;
|
||||
stacked-memories = /bits/ 64 <0x10000000 0x10000000>;
|
||||
};
|
||||
};
|
||||
|
@ -1,68 +0,0 @@
|
||||
Binding for MTK SPI controller
|
||||
|
||||
Required properties:
|
||||
- compatible: should be one of the following.
|
||||
- mediatek,mt2701-spi: for mt2701 platforms
|
||||
- mediatek,mt2712-spi: for mt2712 platforms
|
||||
- mediatek,mt6589-spi: for mt6589 platforms
|
||||
- mediatek,mt6765-spi: for mt6765 platforms
|
||||
- mediatek,mt7622-spi: for mt7622 platforms
|
||||
- "mediatek,mt7629-spi", "mediatek,mt7622-spi": for mt7629 platforms
|
||||
- mediatek,mt8135-spi: for mt8135 platforms
|
||||
- mediatek,mt8173-spi: for mt8173 platforms
|
||||
- mediatek,mt8183-spi: for mt8183 platforms
|
||||
- mediatek,mt6893-spi: for mt6893 platforms
|
||||
- "mediatek,mt8192-spi", "mediatek,mt6765-spi": for mt8192 platforms
|
||||
- "mediatek,mt8195-spi", "mediatek,mt6765-spi": for mt8195 platforms
|
||||
- "mediatek,mt8516-spi", "mediatek,mt2712-spi": for mt8516 platforms
|
||||
- "mediatek,mt6779-spi", "mediatek,mt6765-spi": for mt6779 platforms
|
||||
|
||||
- #address-cells: should be 1.
|
||||
|
||||
- #size-cells: should be 0.
|
||||
|
||||
- reg: Address and length of the register set for the device
|
||||
|
||||
- interrupts: Should contain spi interrupt
|
||||
|
||||
- clocks: phandles to input clocks.
|
||||
The first should be one of the following. It's PLL.
|
||||
- <&clk26m>: specify parent clock 26MHZ.
|
||||
- <&topckgen CLK_TOP_SYSPLL3_D2>: specify parent clock 109MHZ.
|
||||
It's the default one.
|
||||
- <&topckgen CLK_TOP_SYSPLL4_D2>: specify parent clock 78MHZ.
|
||||
- <&topckgen CLK_TOP_UNIVPLL2_D4>: specify parent clock 104MHZ.
|
||||
- <&topckgen CLK_TOP_UNIVPLL1_D8>: specify parent clock 78MHZ.
|
||||
The second should be <&topckgen CLK_TOP_SPI_SEL>. It's clock mux.
|
||||
The third is <&pericfg CLK_PERI_SPI0>. It's clock gate.
|
||||
|
||||
- clock-names: shall be "parent-clk" for the parent clock, "sel-clk" for the
|
||||
muxes clock, and "spi-clk" for the clock gate.
|
||||
|
||||
Optional properties:
|
||||
-cs-gpios: see spi-bus.txt.
|
||||
|
||||
- mediatek,pad-select: specify which pins group(ck/mi/mo/cs) spi
|
||||
controller used. This is an array, the element value should be 0~3,
|
||||
only required for MT8173.
|
||||
0: specify GPIO69,70,71,72 for spi pins.
|
||||
1: specify GPIO102,103,104,105 for spi pins.
|
||||
2: specify GPIO128,129,130,131 for spi pins.
|
||||
3: specify GPIO5,6,7,8 for spi pins.
|
||||
|
||||
Example:
|
||||
|
||||
- SoC Specific Portion:
|
||||
spi: spi@1100a000 {
|
||||
compatible = "mediatek,mt8173-spi";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <0 0x1100a000 0 0x1000>;
|
||||
interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_LOW>;
|
||||
clocks = <&topckgen CLK_TOP_SYSPLL3_D2>,
|
||||
<&topckgen CLK_TOP_SPI_SEL>,
|
||||
<&pericfg CLK_PERI_SPI0>;
|
||||
clock-names = "parent-clk", "sel-clk", "spi-clk";
|
||||
cs-gpios = <&pio 105 GPIO_ACTIVE_LOW>, <&pio 72 GPIO_ACTIVE_LOW>;
|
||||
mediatek,pad-select = <1>, <0>;
|
||||
};
|
@ -7,7 +7,8 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
title: NXP Flex Serial Peripheral Interface (FSPI)
|
||||
|
||||
maintainers:
|
||||
- Kuldeep Singh <kuldeep.singh@nxp.com>
|
||||
- Han Xu <han.xu@nxp.com>
|
||||
- Kuldeep Singh <singh.kuldeep87k@gmail.com>
|
||||
|
||||
allOf:
|
||||
- $ref: "spi-controller.yaml#"
|
||||
|
@ -83,8 +83,34 @@ properties:
|
||||
description:
|
||||
Delay, in microseconds, after a write transfer.
|
||||
|
||||
stacked-memories:
|
||||
description: Several SPI memories can be wired in stacked mode.
|
||||
This basically means that either a device features several chip
|
||||
selects, or that different devices must be seen as a single
|
||||
bigger chip. This basically doubles (or more) the total address
|
||||
space with only a single additional wire, while still needing
|
||||
to repeat the commands when crossing a chip boundary. The size of
|
||||
each chip should be provided as members of the array.
|
||||
$ref: /schemas/types.yaml#/definitions/uint64-array
|
||||
minItems: 2
|
||||
maxItems: 4
|
||||
|
||||
parallel-memories:
|
||||
description: Several SPI memories can be wired in parallel mode.
|
||||
The devices are physically on a different buses but will always
|
||||
act synchronously as each data word is spread across the
|
||||
different memories (eg. even bits are stored in one memory, odd
|
||||
bits in the other). This basically doubles the address space and
|
||||
the throughput while greatly complexifying the wiring because as
|
||||
many busses as devices must be wired. The size of each chip should
|
||||
be provided as members of the array.
|
||||
$ref: /schemas/types.yaml#/definitions/uint64-array
|
||||
minItems: 2
|
||||
maxItems: 4
|
||||
|
||||
# The controller specific properties go here.
|
||||
allOf:
|
||||
- $ref: cdns,qspi-nor-peripheral-props.yaml#
|
||||
- $ref: samsung,spi-peripheral-props.yaml#
|
||||
|
||||
additionalProperties: true
|
||||
|
@ -38,9 +38,7 @@ properties:
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
- enum:
|
||||
- SSPCLK
|
||||
- sspclk
|
||||
- const: sspclk
|
||||
- const: apb_pclk
|
||||
|
||||
pl022,autosuspend-delay:
|
||||
|
@ -1,122 +0,0 @@
|
||||
* Samsung SPI Controller
|
||||
|
||||
The Samsung SPI controller is used to interface with various devices such as flash
|
||||
and display controllers using the SPI communication interface.
|
||||
|
||||
Required SoC Specific Properties:
|
||||
|
||||
- compatible: should be one of the following.
|
||||
- samsung,s3c2443-spi: for s3c2443, s3c2416 and s3c2450 platforms
|
||||
- samsung,s3c6410-spi: for s3c6410 platforms
|
||||
- samsung,s5pv210-spi: for s5pv210 and s5pc110 platforms
|
||||
- samsung,exynos5433-spi: for exynos5433 compatible controllers
|
||||
- samsung,exynos7-spi: for exynos7 platforms <DEPRECATED>
|
||||
|
||||
- reg: physical base address of the controller and length of memory mapped
|
||||
region.
|
||||
|
||||
- interrupts: The interrupt number to the cpu. The interrupt specifier format
|
||||
depends on the interrupt controller.
|
||||
|
||||
- dmas : Two or more DMA channel specifiers following the convention outlined
|
||||
in bindings/dma/dma.txt
|
||||
|
||||
- dma-names: Names for the dma channels. There must be at least one channel
|
||||
named "tx" for transmit and named "rx" for receive.
|
||||
|
||||
- clocks: specifies the clock IDs provided to the SPI controller; they are
|
||||
required for interacting with the controller itself, for synchronizing the bus
|
||||
and as I/O clock (the latter is required by exynos5433 and exynos7).
|
||||
|
||||
- clock-names: string names of the clocks in the 'clocks' property; for all the
|
||||
the devices the names must be "spi", "spi_busclkN" (where N is determined by
|
||||
"samsung,spi-src-clk"), while Exynos5433 should specify a third clock
|
||||
"spi_ioclk" for the I/O clock.
|
||||
|
||||
Required Board Specific Properties:
|
||||
|
||||
- #address-cells: should be 1.
|
||||
- #size-cells: should be 0.
|
||||
|
||||
Optional Board Specific Properties:
|
||||
|
||||
- samsung,spi-src-clk: If the spi controller includes a internal clock mux to
|
||||
select the clock source for the spi bus clock, this property can be used to
|
||||
indicate the clock to be used for driving the spi bus clock. If not specified,
|
||||
the clock number 0 is used as default.
|
||||
|
||||
- num-cs: Specifies the number of chip select lines supported. If
|
||||
not specified, the default number of chip select lines is set to 1.
|
||||
|
||||
- cs-gpios: should specify GPIOs used for chipselects (see spi-bus.txt)
|
||||
|
||||
- no-cs-readback: the CS line is disconnected, therefore the device should not
|
||||
operate based on CS signalling.
|
||||
|
||||
SPI Controller specific data in SPI slave nodes:
|
||||
|
||||
- The spi slave nodes should provide the following information which is required
|
||||
by the spi controller.
|
||||
|
||||
- samsung,spi-feedback-delay: The sampling phase shift to be applied on the
|
||||
miso line (to account for any lag in the miso line). The following are the
|
||||
valid values.
|
||||
|
||||
- 0: No phase shift.
|
||||
- 1: 90 degree phase shift sampling.
|
||||
- 2: 180 degree phase shift sampling.
|
||||
- 3: 270 degree phase shift sampling.
|
||||
|
||||
Aliases:
|
||||
|
||||
- All the SPI controller nodes should be represented in the aliases node using
|
||||
the following format 'spi{n}' where n is a unique number for the alias.
|
||||
|
||||
|
||||
Example:
|
||||
|
||||
- SoC Specific Portion:
|
||||
|
||||
spi_0: spi@12d20000 {
|
||||
compatible = "samsung,exynos4210-spi";
|
||||
reg = <0x12d20000 0x100>;
|
||||
interrupts = <0 66 0>;
|
||||
dmas = <&pdma0 5
|
||||
&pdma0 4>;
|
||||
dma-names = "tx", "rx";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
};
|
||||
|
||||
- Board Specific Portion:
|
||||
|
||||
spi_0: spi@12d20000 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&spi0_bus>;
|
||||
cs-gpios = <&gpa2 5 0>;
|
||||
|
||||
w25q80bw@0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "w25x80";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <10000>;
|
||||
|
||||
controller-data {
|
||||
samsung,spi-feedback-delay = <0>;
|
||||
};
|
||||
|
||||
partition@0 {
|
||||
label = "U-Boot";
|
||||
reg = <0x0 0x40000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@40000 {
|
||||
label = "Kernel";
|
||||
reg = <0x40000 0xc0000>;
|
||||
};
|
||||
};
|
||||
};
|
@ -1,33 +0,0 @@
|
||||
Binding for MTK SPI Slave controller
|
||||
|
||||
Required properties:
|
||||
- compatible: should be one of the following.
|
||||
- mediatek,mt2712-spi-slave: for mt2712 platforms
|
||||
- mediatek,mt8195-spi-slave: for mt8195 platforms
|
||||
- reg: Address and length of the register set for the device.
|
||||
- interrupts: Should contain spi interrupt.
|
||||
- clocks: phandles to input clocks.
|
||||
It's clock gate, and should be <&infracfg CLK_INFRA_AO_SPI1>.
|
||||
- clock-names: should be "spi" for the clock gate.
|
||||
|
||||
Optional properties:
|
||||
- assigned-clocks: it's mux clock, should be <&topckgen CLK_TOP_SPISLV_SEL>.
|
||||
- assigned-clock-parents: parent of mux clock.
|
||||
It's PLL, and should be one of the following.
|
||||
- <&topckgen CLK_TOP_UNIVPLL1_D2>: specify parent clock 312MHZ.
|
||||
It's the default one.
|
||||
- <&topckgen CLK_TOP_UNIVPLL1_D4>: specify parent clock 156MHZ.
|
||||
- <&topckgen CLK_TOP_UNIVPLL2_D4>: specify parent clock 104MHZ.
|
||||
- <&topckgen CLK_TOP_UNIVPLL1_D8>: specify parent clock 78MHZ.
|
||||
|
||||
Example:
|
||||
- SoC Specific Portion:
|
||||
spis1: spi@10013000 {
|
||||
compatible = "mediatek,mt2712-spi-slave";
|
||||
reg = <0 0x10013000 0 0x100>;
|
||||
interrupts = <GIC_SPI 283 IRQ_TYPE_LEVEL_LOW>;
|
||||
clocks = <&infracfg CLK_INFRA_AO_SPI1>;
|
||||
clock-names = "spi";
|
||||
assigned-clocks = <&topckgen CLK_TOP_SPISLV_SEL>;
|
||||
assigned-clock-parents = <&topckgen CLK_TOP_UNIVPLL1_D2>;
|
||||
};
|
@ -0,0 +1,78 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
|
||||
# Copyright (C) Sunplus Co., Ltd. 2021
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/spi/spi-sunplus-sp7021.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Sunplus sp7021 SPI controller
|
||||
|
||||
allOf:
|
||||
- $ref: "spi-controller.yaml"
|
||||
|
||||
maintainers:
|
||||
- Li-hao Kuo <lhjeff911@gmail.com>
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- sunplus,sp7021-spi
|
||||
|
||||
reg:
|
||||
items:
|
||||
- description: the SPI master registers
|
||||
- description: the SPI slave registers
|
||||
|
||||
reg-names:
|
||||
items:
|
||||
- const: master
|
||||
- const: slave
|
||||
|
||||
interrupt-names:
|
||||
items:
|
||||
- const: dma_w
|
||||
- const: master_risc
|
||||
- const: slave_risc
|
||||
|
||||
interrupts:
|
||||
minItems: 3
|
||||
|
||||
clocks:
|
||||
maxItems: 1
|
||||
|
||||
resets:
|
||||
maxItems: 1
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- reg-names
|
||||
- interrupts
|
||||
- interrupt-names
|
||||
- clocks
|
||||
- resets
|
||||
- pinctrl-names
|
||||
- pinctrl-0
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
spi@9C002D80 {
|
||||
compatible = "sunplus,sp7021-spi";
|
||||
reg = <0x9C002D80 0x80>, <0x9C002E00 0x80>;
|
||||
reg-names = "master", "slave";
|
||||
interrupt-parent = <&intc>;
|
||||
interrupt-names = "dma_w",
|
||||
"master_risc",
|
||||
"slave_risc";
|
||||
interrupts = <144 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<146 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<145 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clkc 0x32>;
|
||||
resets = <&rstc 0x22>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pins_spi0>;
|
||||
};
|
||||
...
|
@ -7,6 +7,6 @@ Memory Technology Device (MTD)
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
intel-spi
|
||||
spi-intel
|
||||
nand_ecc
|
||||
spi-nor
|
||||
|
@ -1,5 +1,5 @@
|
||||
==============================
|
||||
Upgrading BIOS using intel-spi
|
||||
Upgrading BIOS using spi-intel
|
||||
==============================
|
||||
|
||||
Many Intel CPUs like Baytrail and Braswell include SPI serial flash host
|
||||
@ -11,12 +11,12 @@ avoid accidental (or on purpose) overwrite of the content.
|
||||
Not all manufacturers protect the SPI serial flash, mainly because it
|
||||
allows upgrading the BIOS image directly from an OS.
|
||||
|
||||
The intel-spi driver makes it possible to read and write the SPI serial
|
||||
The spi-intel driver makes it possible to read and write the SPI serial
|
||||
flash, if certain protection bits are not set and locked. If it finds
|
||||
any of them set, the whole MTD device is made read-only to prevent
|
||||
partial overwrites. By default the driver exposes SPI serial flash
|
||||
contents as read-only but it can be changed from kernel command line,
|
||||
passing "intel-spi.writeable=1".
|
||||
passing "spi_intel.writeable=1".
|
||||
|
||||
Please keep in mind that overwriting the BIOS image on SPI serial flash
|
||||
might render the machine unbootable and requires special equipment like
|
||||
@ -32,7 +32,7 @@ Linux.
|
||||
serial flash. Distros like Debian and Fedora have this prepackaged with
|
||||
name "mtd-utils".
|
||||
|
||||
3) Add "intel-spi.writeable=1" to the kernel command line and reboot
|
||||
3) Add "spi_intel.writeable=1" to the kernel command line and reboot
|
||||
the board (you can also reload the driver passing "writeable=1" as
|
||||
module parameter to modprobe).
|
||||
|
@ -101,7 +101,6 @@ device. All fields are optional.
|
||||
u8 rx_threshold;
|
||||
u8 dma_burst_size;
|
||||
u32 timeout;
|
||||
int gpio_cs;
|
||||
};
|
||||
|
||||
The "pxa2xx_spi_chip.tx_threshold" and "pxa2xx_spi_chip.rx_threshold" fields are
|
||||
@ -146,7 +145,6 @@ field. Below is a sample configuration using the PXA255 NSSP.
|
||||
.rx_threshold = 8, /* SSP hardward FIFO threshold */
|
||||
.dma_burst_size = 8, /* Byte wide transfers used so 8 byte bursts */
|
||||
.timeout = 235, /* See Intel documentation */
|
||||
.gpio_cs = 2, /* Use external chip select */
|
||||
};
|
||||
|
||||
static struct pxa2xx_spi_chip cs8405a_chip_info = {
|
||||
@ -154,7 +152,6 @@ field. Below is a sample configuration using the PXA255 NSSP.
|
||||
.rx_threshold = 8, /* SSP hardward FIFO threshold */
|
||||
.dma_burst_size = 8, /* Byte wide transfers used so 8 byte bursts */
|
||||
.timeout = 235, /* See Intel documentation */
|
||||
.gpio_cs = 3, /* Use external chip select */
|
||||
};
|
||||
|
||||
static struct spi_board_info streetracer_spi_board_info[] __initdata = {
|
||||
|
16
MAINTAINERS
16
MAINTAINERS
@ -11730,7 +11730,7 @@ MAXIM MAX77802 PMIC REGULATOR DEVICE DRIVER
|
||||
M: Javier Martinez Canillas <javier@dowhile0.org>
|
||||
L: linux-kernel@vger.kernel.org
|
||||
S: Supported
|
||||
F: Documentation/devicetree/bindings/*/*max77802.txt
|
||||
F: Documentation/devicetree/bindings/*/*max77802.yaml
|
||||
F: drivers/regulator/max77802-regulator.c
|
||||
F: include/dt-bindings/*/*max77802.h
|
||||
|
||||
@ -11745,6 +11745,7 @@ M: Krzysztof Kozlowski <krzk@kernel.org>
|
||||
M: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
|
||||
L: linux-pm@vger.kernel.org
|
||||
S: Supported
|
||||
F: Documentation/devicetree/bindings/power/supply/maxim,max14577.yaml
|
||||
F: drivers/power/supply/max14577_charger.c
|
||||
F: drivers/power/supply/max77693_charger.c
|
||||
|
||||
@ -11754,10 +11755,12 @@ M: Krzysztof Kozlowski <krzk@kernel.org>
|
||||
M: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
|
||||
L: linux-kernel@vger.kernel.org
|
||||
S: Supported
|
||||
F: Documentation/devicetree/bindings/*/maxim,max14577.yaml
|
||||
F: Documentation/devicetree/bindings/*/maxim,max77686.yaml
|
||||
F: Documentation/devicetree/bindings/*/maxim,max77843.yaml
|
||||
F: Documentation/devicetree/bindings/clock/maxim,max77686.txt
|
||||
F: Documentation/devicetree/bindings/mfd/max14577.txt
|
||||
F: Documentation/devicetree/bindings/mfd/max77693.txt
|
||||
F: drivers/*/*max77843.c
|
||||
F: drivers/*/max14577*.c
|
||||
F: drivers/*/max77686*.c
|
||||
F: drivers/*/max77693*.c
|
||||
@ -17140,7 +17143,7 @@ M: Andi Shyti <andi@etezian.org>
|
||||
L: linux-spi@vger.kernel.org
|
||||
L: linux-samsung-soc@vger.kernel.org
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/bindings/spi/spi-samsung.txt
|
||||
F: Documentation/devicetree/bindings/spi/samsung,spi*.yaml
|
||||
F: drivers/spi/spi-s3c*
|
||||
F: include/linux/platform_data/spi-s3c64xx.h
|
||||
F: include/linux/spi/s3c24xx-fiq.h
|
||||
@ -18560,6 +18563,13 @@ S: Maintained
|
||||
F: Documentation/devicetree/bindings/rtc/sunplus,sp7021-rtc.yaml
|
||||
F: drivers/rtc/rtc-sunplus.c
|
||||
|
||||
SUNPLUS SPI CONTROLLER INTERFACE DRIVER
|
||||
M: Li-hao Kuo <lhjeff911@gmail.com>
|
||||
L: linux-spi@vger.kernel.org
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/bindings/spi/spi-sunplus-sp7021.yaml
|
||||
F: drivers/spi/spi-sunplus-sp7021.c
|
||||
|
||||
SUPERH
|
||||
M: Yoshinori Sato <ysato@users.sourceforge.jp>
|
||||
M: Rich Felker <dalias@libc.org>
|
||||
|
@ -530,6 +530,16 @@ static struct pxa2xx_spi_controller corgi_spi_info = {
|
||||
.num_chipselect = 3,
|
||||
};
|
||||
|
||||
static struct gpiod_lookup_table corgi_spi_gpio_table = {
|
||||
.dev_id = "pxa2xx-spi.1",
|
||||
.table = {
|
||||
GPIO_LOOKUP_IDX("gpio-pxa", CORGI_GPIO_ADS7846_CS, "cs", 0, GPIO_ACTIVE_LOW),
|
||||
GPIO_LOOKUP_IDX("gpio-pxa", CORGI_GPIO_LCDCON_CS, "cs", 1, GPIO_ACTIVE_LOW),
|
||||
GPIO_LOOKUP_IDX("gpio-pxa", CORGI_GPIO_MAX1111_CS, "cs", 2, GPIO_ACTIVE_LOW),
|
||||
{ },
|
||||
},
|
||||
};
|
||||
|
||||
static void corgi_wait_for_hsync(void)
|
||||
{
|
||||
while (gpio_get_value(CORGI_GPIO_HSYNC))
|
||||
@ -548,10 +558,6 @@ static struct ads7846_platform_data corgi_ads7846_info = {
|
||||
.wait_for_sync = corgi_wait_for_hsync,
|
||||
};
|
||||
|
||||
static struct pxa2xx_spi_chip corgi_ads7846_chip = {
|
||||
.gpio_cs = CORGI_GPIO_ADS7846_CS,
|
||||
};
|
||||
|
||||
static void corgi_bl_kick_battery(void)
|
||||
{
|
||||
void (*kick_batt)(void);
|
||||
@ -580,14 +586,6 @@ static struct corgi_lcd_platform_data corgi_lcdcon_info = {
|
||||
.kick_battery = corgi_bl_kick_battery,
|
||||
};
|
||||
|
||||
static struct pxa2xx_spi_chip corgi_lcdcon_chip = {
|
||||
.gpio_cs = CORGI_GPIO_LCDCON_CS,
|
||||
};
|
||||
|
||||
static struct pxa2xx_spi_chip corgi_max1111_chip = {
|
||||
.gpio_cs = CORGI_GPIO_MAX1111_CS,
|
||||
};
|
||||
|
||||
static struct spi_board_info corgi_spi_devices[] = {
|
||||
{
|
||||
.modalias = "ads7846",
|
||||
@ -595,7 +593,6 @@ static struct spi_board_info corgi_spi_devices[] = {
|
||||
.bus_num = 1,
|
||||
.chip_select = 0,
|
||||
.platform_data = &corgi_ads7846_info,
|
||||
.controller_data= &corgi_ads7846_chip,
|
||||
.irq = PXA_GPIO_TO_IRQ(CORGI_GPIO_TP_INT),
|
||||
}, {
|
||||
.modalias = "corgi-lcd",
|
||||
@ -603,18 +600,17 @@ static struct spi_board_info corgi_spi_devices[] = {
|
||||
.bus_num = 1,
|
||||
.chip_select = 1,
|
||||
.platform_data = &corgi_lcdcon_info,
|
||||
.controller_data= &corgi_lcdcon_chip,
|
||||
}, {
|
||||
.modalias = "max1111",
|
||||
.max_speed_hz = 450000,
|
||||
.bus_num = 1,
|
||||
.chip_select = 2,
|
||||
.controller_data= &corgi_max1111_chip,
|
||||
},
|
||||
};
|
||||
|
||||
static void __init corgi_init_spi(void)
|
||||
{
|
||||
gpiod_add_lookup_table(&corgi_spi_gpio_table);
|
||||
pxa2xx_set_spi_info(1, &corgi_spi_info);
|
||||
gpiod_add_lookup_table(&corgi_lcdcon_gpio_table);
|
||||
spi_register_board_info(ARRAY_AND_SIZE(corgi_spi_devices));
|
||||
|
@ -616,7 +616,6 @@ static struct pxa2xx_spi_chip tsc2046_chip = {
|
||||
.tx_threshold = 1,
|
||||
.rx_threshold = 2,
|
||||
.timeout = 64,
|
||||
.gpio_cs = GPIO88_HX4700_TSC2046_CS,
|
||||
};
|
||||
|
||||
static struct spi_board_info tsc2046_board_info[] __initdata = {
|
||||
@ -635,6 +634,14 @@ static struct pxa2xx_spi_controller pxa_ssp2_master_info = {
|
||||
.enable_dma = 1,
|
||||
};
|
||||
|
||||
static struct gpiod_lookup_table pxa_ssp2_gpio_table = {
|
||||
.dev_id = "pxa2xx-spi.2",
|
||||
.table = {
|
||||
GPIO_LOOKUP_IDX("gpio-pxa", GPIO88_HX4700_TSC2046_CS, "cs", 0, GPIO_ACTIVE_LOW),
|
||||
{ },
|
||||
},
|
||||
};
|
||||
|
||||
/*
|
||||
* External power
|
||||
*/
|
||||
@ -896,6 +903,7 @@ static void __init hx4700_init(void)
|
||||
pxa_set_i2c_info(NULL);
|
||||
i2c_register_board_info(0, ARRAY_AND_SIZE(i2c_board_info));
|
||||
i2c_register_board_info(1, ARRAY_AND_SIZE(pi2c_board_info));
|
||||
gpiod_add_lookup_table(&pxa_ssp2_gpio_table);
|
||||
pxa2xx_set_spi_info(2, &pxa_ssp2_master_info);
|
||||
spi_register_board_info(ARRAY_AND_SIZE(tsc2046_board_info));
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include <linux/irq.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/property.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/gpio/machine.h>
|
||||
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/arch.h>
|
||||
@ -42,7 +42,6 @@ static struct pxa2xx_spi_chip mcp251x_chip_info1 = {
|
||||
.rx_threshold = 128,
|
||||
.dma_burst_size = 8,
|
||||
.timeout = 235,
|
||||
.gpio_cs = ICONTROL_MCP251x_nCS1
|
||||
};
|
||||
|
||||
static struct pxa2xx_spi_chip mcp251x_chip_info2 = {
|
||||
@ -50,7 +49,6 @@ static struct pxa2xx_spi_chip mcp251x_chip_info2 = {
|
||||
.rx_threshold = 128,
|
||||
.dma_burst_size = 8,
|
||||
.timeout = 235,
|
||||
.gpio_cs = ICONTROL_MCP251x_nCS2
|
||||
};
|
||||
|
||||
static struct pxa2xx_spi_chip mcp251x_chip_info3 = {
|
||||
@ -58,7 +56,6 @@ static struct pxa2xx_spi_chip mcp251x_chip_info3 = {
|
||||
.rx_threshold = 128,
|
||||
.dma_burst_size = 8,
|
||||
.timeout = 235,
|
||||
.gpio_cs = ICONTROL_MCP251x_nCS3
|
||||
};
|
||||
|
||||
static struct pxa2xx_spi_chip mcp251x_chip_info4 = {
|
||||
@ -66,7 +63,6 @@ static struct pxa2xx_spi_chip mcp251x_chip_info4 = {
|
||||
.rx_threshold = 128,
|
||||
.dma_burst_size = 8,
|
||||
.timeout = 235,
|
||||
.gpio_cs = ICONTROL_MCP251x_nCS4
|
||||
};
|
||||
|
||||
static const struct property_entry mcp251x_properties[] = {
|
||||
@ -143,6 +139,24 @@ struct platform_device pxa_spi_ssp4 = {
|
||||
}
|
||||
};
|
||||
|
||||
static struct gpiod_lookup_table pxa_ssp3_gpio_table = {
|
||||
.dev_id = "pxa2xx-spi.3",
|
||||
.table = {
|
||||
GPIO_LOOKUP_IDX("gpio-pxa", ICONTROL_MCP251x_nCS1, "cs", 0, GPIO_ACTIVE_LOW),
|
||||
GPIO_LOOKUP_IDX("gpio-pxa", ICONTROL_MCP251x_nCS2, "cs", 1, GPIO_ACTIVE_LOW),
|
||||
{ },
|
||||
},
|
||||
};
|
||||
|
||||
static struct gpiod_lookup_table pxa_ssp4_gpio_table = {
|
||||
.dev_id = "pxa2xx-spi.4",
|
||||
.table = {
|
||||
GPIO_LOOKUP_IDX("gpio-pxa", ICONTROL_MCP251x_nCS3, "cs", 0, GPIO_ACTIVE_LOW),
|
||||
GPIO_LOOKUP_IDX("gpio-pxa", ICONTROL_MCP251x_nCS4, "cs", 1, GPIO_ACTIVE_LOW),
|
||||
{ },
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device *icontrol_spi_devices[] __initdata = {
|
||||
&pxa_spi_ssp3,
|
||||
&pxa_spi_ssp4,
|
||||
@ -175,6 +189,8 @@ static mfp_cfg_t mfp_can_cfg[] __initdata = {
|
||||
static void __init icontrol_can_init(void)
|
||||
{
|
||||
pxa3xx_mfp_config(ARRAY_AND_SIZE(mfp_can_cfg));
|
||||
gpiod_add_lookup_table(&pxa_ssp3_gpio_table);
|
||||
gpiod_add_lookup_table(&pxa_ssp4_gpio_table);
|
||||
platform_add_devices(ARRAY_AND_SIZE(icontrol_spi_devices));
|
||||
spi_register_board_info(ARRAY_AND_SIZE(mcp251x_board_info));
|
||||
}
|
||||
|
@ -195,7 +195,6 @@ static struct pxa2xx_spi_controller littleton_spi_info = {
|
||||
static struct pxa2xx_spi_chip littleton_tdo24m_chip = {
|
||||
.rx_threshold = 1,
|
||||
.tx_threshold = 1,
|
||||
.gpio_cs = LITTLETON_GPIO_LCD_CS,
|
||||
};
|
||||
|
||||
static struct spi_board_info littleton_spi_devices[] __initdata = {
|
||||
@ -208,8 +207,17 @@ static struct spi_board_info littleton_spi_devices[] __initdata = {
|
||||
},
|
||||
};
|
||||
|
||||
static struct gpiod_lookup_table littleton_spi_gpio_table = {
|
||||
.dev_id = "pxa2xx-spi.2",
|
||||
.table = {
|
||||
GPIO_LOOKUP_IDX("gpio-pxa", LITTLETON_GPIO_LCD_CS, "cs", 0, GPIO_ACTIVE_LOW),
|
||||
{ },
|
||||
},
|
||||
};
|
||||
|
||||
static void __init littleton_init_spi(void)
|
||||
{
|
||||
gpiod_add_lookup_table(&littleton_spi_gpio_table);
|
||||
pxa2xx_set_spi_info(2, &littleton_spi_info);
|
||||
spi_register_board_info(ARRAY_AND_SIZE(littleton_spi_devices));
|
||||
}
|
||||
|
@ -938,8 +938,6 @@ struct pxa2xx_spi_chip tsc2046_chip_info = {
|
||||
.tx_threshold = 1,
|
||||
.rx_threshold = 2,
|
||||
.timeout = 64,
|
||||
/* NOTICE must be GPIO, incompatibility with hw PXA SPI framing */
|
||||
.gpio_cs = GPIO14_MAGICIAN_TSC2046_CS,
|
||||
};
|
||||
|
||||
static struct pxa2xx_spi_controller magician_spi_info = {
|
||||
@ -947,6 +945,15 @@ static struct pxa2xx_spi_controller magician_spi_info = {
|
||||
.enable_dma = 1,
|
||||
};
|
||||
|
||||
static struct gpiod_lookup_table magician_spi_gpio_table = {
|
||||
.dev_id = "pxa2xx-spi.2",
|
||||
.table = {
|
||||
/* NOTICE must be GPIO, incompatibility with hw PXA SPI framing */
|
||||
GPIO_LOOKUP_IDX("gpio-pxa", GPIO14_MAGICIAN_TSC2046_CS, "cs", 0, GPIO_ACTIVE_LOW),
|
||||
{ },
|
||||
},
|
||||
};
|
||||
|
||||
static struct spi_board_info ads7846_spi_board_info[] __initdata = {
|
||||
{
|
||||
.modalias = "ads7846",
|
||||
@ -1031,6 +1038,7 @@ static void __init magician_init(void)
|
||||
} else
|
||||
pr_err("LCD detection: CPLD mapping failed\n");
|
||||
|
||||
gpiod_add_lookup_table(&magician_spi_gpio_table);
|
||||
pxa2xx_set_spi_info(2, &magician_spi_info);
|
||||
spi_register_board_info(ARRAY_AND_SIZE(ads7846_spi_board_info));
|
||||
|
||||
|
@ -197,6 +197,14 @@ static struct pxa2xx_spi_controller poodle_spi_info = {
|
||||
.num_chipselect = 1,
|
||||
};
|
||||
|
||||
static struct gpiod_lookup_table poodle_spi_gpio_table = {
|
||||
.dev_id = "pxa2xx-spi.1",
|
||||
.table = {
|
||||
GPIO_LOOKUP_IDX("gpio-pxa", POODLE_GPIO_TP_CS, "cs", 0, GPIO_ACTIVE_LOW),
|
||||
{ },
|
||||
},
|
||||
};
|
||||
|
||||
static struct ads7846_platform_data poodle_ads7846_info = {
|
||||
.model = 7846,
|
||||
.vref_delay_usecs = 100,
|
||||
@ -205,23 +213,19 @@ static struct ads7846_platform_data poodle_ads7846_info = {
|
||||
.gpio_pendown = POODLE_GPIO_TP_INT,
|
||||
};
|
||||
|
||||
static struct pxa2xx_spi_chip poodle_ads7846_chip = {
|
||||
.gpio_cs = POODLE_GPIO_TP_CS,
|
||||
};
|
||||
|
||||
static struct spi_board_info poodle_spi_devices[] = {
|
||||
{
|
||||
.modalias = "ads7846",
|
||||
.max_speed_hz = 10000,
|
||||
.bus_num = 1,
|
||||
.platform_data = &poodle_ads7846_info,
|
||||
.controller_data= &poodle_ads7846_chip,
|
||||
.irq = PXA_GPIO_TO_IRQ(POODLE_GPIO_TP_INT),
|
||||
},
|
||||
};
|
||||
|
||||
static void __init poodle_init_spi(void)
|
||||
{
|
||||
gpiod_add_lookup_table(&poodle_spi_gpio_table);
|
||||
pxa2xx_set_spi_info(1, &poodle_spi_info);
|
||||
spi_register_board_info(ARRAY_AND_SIZE(poodle_spi_devices));
|
||||
}
|
||||
|
@ -510,10 +510,6 @@ static struct ads7846_platform_data spitz_ads7846_info = {
|
||||
.wait_for_sync = spitz_ads7846_wait_for_hsync,
|
||||
};
|
||||
|
||||
static struct pxa2xx_spi_chip spitz_ads7846_chip = {
|
||||
.gpio_cs = SPITZ_GPIO_ADS7846_CS,
|
||||
};
|
||||
|
||||
static void spitz_bl_kick_battery(void)
|
||||
{
|
||||
void (*kick_batt)(void);
|
||||
@ -555,14 +551,6 @@ static struct corgi_lcd_platform_data spitz_lcdcon_info = {
|
||||
.kick_battery = spitz_bl_kick_battery,
|
||||
};
|
||||
|
||||
static struct pxa2xx_spi_chip spitz_lcdcon_chip = {
|
||||
.gpio_cs = SPITZ_GPIO_LCDCON_CS,
|
||||
};
|
||||
|
||||
static struct pxa2xx_spi_chip spitz_max1111_chip = {
|
||||
.gpio_cs = SPITZ_GPIO_MAX1111_CS,
|
||||
};
|
||||
|
||||
static struct spi_board_info spitz_spi_devices[] = {
|
||||
{
|
||||
.modalias = "ads7846",
|
||||
@ -570,7 +558,6 @@ static struct spi_board_info spitz_spi_devices[] = {
|
||||
.bus_num = 2,
|
||||
.chip_select = 0,
|
||||
.platform_data = &spitz_ads7846_info,
|
||||
.controller_data = &spitz_ads7846_chip,
|
||||
.irq = PXA_GPIO_TO_IRQ(SPITZ_GPIO_TP_INT),
|
||||
}, {
|
||||
.modalias = "corgi-lcd",
|
||||
@ -578,13 +565,11 @@ static struct spi_board_info spitz_spi_devices[] = {
|
||||
.bus_num = 2,
|
||||
.chip_select = 1,
|
||||
.platform_data = &spitz_lcdcon_info,
|
||||
.controller_data = &spitz_lcdcon_chip,
|
||||
}, {
|
||||
.modalias = "max1111",
|
||||
.max_speed_hz = 450000,
|
||||
.bus_num = 2,
|
||||
.chip_select = 2,
|
||||
.controller_data = &spitz_max1111_chip,
|
||||
},
|
||||
};
|
||||
|
||||
@ -592,6 +577,16 @@ static struct pxa2xx_spi_controller spitz_spi_info = {
|
||||
.num_chipselect = 3,
|
||||
};
|
||||
|
||||
static struct gpiod_lookup_table spitz_spi_gpio_table = {
|
||||
.dev_id = "pxa2xx-spi.2",
|
||||
.table = {
|
||||
GPIO_LOOKUP_IDX("gpio-pxa", SPITZ_GPIO_ADS7846_CS, "cs", 0, GPIO_ACTIVE_LOW),
|
||||
GPIO_LOOKUP_IDX("gpio-pxa", SPITZ_GPIO_LCDCON_CS, "cs", 1, GPIO_ACTIVE_LOW),
|
||||
GPIO_LOOKUP_IDX("gpio-pxa", SPITZ_GPIO_MAX1111_CS, "cs", 2, GPIO_ACTIVE_LOW),
|
||||
{ },
|
||||
},
|
||||
};
|
||||
|
||||
static void __init spitz_spi_init(void)
|
||||
{
|
||||
if (machine_is_akita())
|
||||
@ -599,6 +594,7 @@ static void __init spitz_spi_init(void)
|
||||
else
|
||||
gpiod_add_lookup_table(&spitz_lcdcon_gpio_table);
|
||||
|
||||
gpiod_add_lookup_table(&spitz_spi_gpio_table);
|
||||
pxa2xx_set_spi_info(2, &spitz_spi_info);
|
||||
spi_register_board_info(ARRAY_AND_SIZE(spitz_spi_devices));
|
||||
}
|
||||
|
@ -346,6 +346,22 @@ static struct pxa2xx_spi_controller pxa_ssp_master_2_info = {
|
||||
.num_chipselect = 1,
|
||||
};
|
||||
|
||||
static struct gpiod_lookup_table pxa_ssp1_gpio_table = {
|
||||
.dev_id = "pxa2xx-spi.1",
|
||||
.table = {
|
||||
GPIO_LOOKUP_IDX("gpio-pxa", 24, "cs", 0, GPIO_ACTIVE_LOW),
|
||||
{ },
|
||||
},
|
||||
};
|
||||
|
||||
static struct gpiod_lookup_table pxa_ssp3_gpio_table = {
|
||||
.dev_id = "pxa2xx-spi.3",
|
||||
.table = {
|
||||
GPIO_LOOKUP_IDX("gpio-pxa", 39, "cs", 0, GPIO_ACTIVE_LOW),
|
||||
{ },
|
||||
},
|
||||
};
|
||||
|
||||
/* An upcoming kernel change will scrap SFRM usage so these
|
||||
* drivers have been moved to use GPIOs */
|
||||
static struct pxa2xx_spi_chip staccel_chip_info = {
|
||||
@ -353,7 +369,6 @@ static struct pxa2xx_spi_chip staccel_chip_info = {
|
||||
.rx_threshold = 8,
|
||||
.dma_burst_size = 8,
|
||||
.timeout = 235,
|
||||
.gpio_cs = 24,
|
||||
};
|
||||
|
||||
static struct pxa2xx_spi_chip cc2420_info = {
|
||||
@ -361,7 +376,6 @@ static struct pxa2xx_spi_chip cc2420_info = {
|
||||
.rx_threshold = 8,
|
||||
.dma_burst_size = 8,
|
||||
.timeout = 235,
|
||||
.gpio_cs = 39,
|
||||
};
|
||||
|
||||
static struct spi_board_info spi_board_info[] __initdata = {
|
||||
@ -410,6 +424,8 @@ static void __init imote2_stargate2_init(void)
|
||||
pxa_set_btuart_info(NULL);
|
||||
pxa_set_stuart_info(NULL);
|
||||
|
||||
gpiod_add_lookup_table(&pxa_ssp1_gpio_table);
|
||||
gpiod_add_lookup_table(&pxa_ssp3_gpio_table);
|
||||
pxa2xx_set_spi_info(1, &pxa_ssp_master_0_info);
|
||||
pxa2xx_set_spi_info(2, &pxa_ssp_master_1_info);
|
||||
pxa2xx_set_spi_info(3, &pxa_ssp_master_2_info);
|
||||
|
@ -570,7 +570,6 @@ static struct pxa2xx_spi_chip z2_lbs_chip_info = {
|
||||
.rx_threshold = 8,
|
||||
.tx_threshold = 8,
|
||||
.timeout = 1000,
|
||||
.gpio_cs = GPIO24_ZIPITZ2_WIFI_CS,
|
||||
};
|
||||
|
||||
static struct libertas_spi_platform_data z2_lbs_pdata = {
|
||||
@ -584,7 +583,6 @@ static struct pxa2xx_spi_chip lms283_chip_info = {
|
||||
.rx_threshold = 1,
|
||||
.tx_threshold = 1,
|
||||
.timeout = 64,
|
||||
.gpio_cs = GPIO88_ZIPITZ2_LCD_CS,
|
||||
};
|
||||
|
||||
static struct gpiod_lookup_table lms283_gpio_table = {
|
||||
@ -624,8 +622,26 @@ static struct pxa2xx_spi_controller pxa_ssp2_master_info = {
|
||||
.num_chipselect = 1,
|
||||
};
|
||||
|
||||
static struct gpiod_lookup_table pxa_ssp1_gpio_table = {
|
||||
.dev_id = "pxa2xx-spi.1",
|
||||
.table = {
|
||||
GPIO_LOOKUP_IDX("gpio-pxa", GPIO24_ZIPITZ2_WIFI_CS, "cs", 0, GPIO_ACTIVE_LOW),
|
||||
{ },
|
||||
},
|
||||
};
|
||||
|
||||
static struct gpiod_lookup_table pxa_ssp2_gpio_table = {
|
||||
.dev_id = "pxa2xx-spi.2",
|
||||
.table = {
|
||||
GPIO_LOOKUP_IDX("gpio-pxa", GPIO88_ZIPITZ2_LCD_CS, "cs", 0, GPIO_ACTIVE_LOW),
|
||||
{ },
|
||||
},
|
||||
};
|
||||
|
||||
static void __init z2_spi_init(void)
|
||||
{
|
||||
gpiod_add_lookup_table(&pxa_ssp1_gpio_table);
|
||||
gpiod_add_lookup_table(&pxa_ssp2_gpio_table);
|
||||
pxa2xx_set_spi_info(1, &pxa_ssp1_master_info);
|
||||
pxa2xx_set_spi_info(2, &pxa_ssp2_master_info);
|
||||
gpiod_add_lookup_table(&lms283_gpio_table);
|
||||
|
@ -191,18 +191,6 @@ config S3C64XX_DEV_SPI0
|
||||
Compile in platform device definitions for S3C64XX's type
|
||||
SPI controller 0
|
||||
|
||||
config S3C64XX_DEV_SPI1
|
||||
bool
|
||||
help
|
||||
Compile in platform device definitions for S3C64XX's type
|
||||
SPI controller 1
|
||||
|
||||
config S3C64XX_DEV_SPI2
|
||||
bool
|
||||
help
|
||||
Compile in platform device definitions for S3C64XX's type
|
||||
SPI controller 2
|
||||
|
||||
config SAMSUNG_DEV_TS
|
||||
bool
|
||||
help
|
||||
|
@ -1107,8 +1107,7 @@ struct platform_device s3c64xx_device_spi0 = {
|
||||
},
|
||||
};
|
||||
|
||||
void __init s3c64xx_spi0_set_platdata(int (*cfg_gpio)(void), int src_clk_nr,
|
||||
int num_cs)
|
||||
void __init s3c64xx_spi0_set_platdata(int src_clk_nr, int num_cs)
|
||||
{
|
||||
struct s3c64xx_spi_info pd;
|
||||
|
||||
@ -1120,80 +1119,8 @@ void __init s3c64xx_spi0_set_platdata(int (*cfg_gpio)(void), int src_clk_nr,
|
||||
|
||||
pd.num_cs = num_cs;
|
||||
pd.src_clk_nr = src_clk_nr;
|
||||
pd.cfg_gpio = (cfg_gpio) ? cfg_gpio : s3c64xx_spi0_cfg_gpio;
|
||||
pd.cfg_gpio = s3c64xx_spi0_cfg_gpio;
|
||||
|
||||
s3c_set_platdata(&pd, sizeof(pd), &s3c64xx_device_spi0);
|
||||
}
|
||||
#endif /* CONFIG_S3C64XX_DEV_SPI0 */
|
||||
|
||||
#ifdef CONFIG_S3C64XX_DEV_SPI1
|
||||
static struct resource s3c64xx_spi1_resource[] = {
|
||||
[0] = DEFINE_RES_MEM(S3C_PA_SPI1, SZ_256),
|
||||
[1] = DEFINE_RES_IRQ(IRQ_SPI1),
|
||||
};
|
||||
|
||||
struct platform_device s3c64xx_device_spi1 = {
|
||||
.name = "s3c6410-spi",
|
||||
.id = 1,
|
||||
.num_resources = ARRAY_SIZE(s3c64xx_spi1_resource),
|
||||
.resource = s3c64xx_spi1_resource,
|
||||
.dev = {
|
||||
.dma_mask = &samsung_device_dma_mask,
|
||||
.coherent_dma_mask = DMA_BIT_MASK(32),
|
||||
},
|
||||
};
|
||||
|
||||
void __init s3c64xx_spi1_set_platdata(int (*cfg_gpio)(void), int src_clk_nr,
|
||||
int num_cs)
|
||||
{
|
||||
struct s3c64xx_spi_info pd;
|
||||
|
||||
/* Reject invalid configuration */
|
||||
if (!num_cs || src_clk_nr < 0) {
|
||||
pr_err("%s: Invalid SPI configuration\n", __func__);
|
||||
return;
|
||||
}
|
||||
|
||||
pd.num_cs = num_cs;
|
||||
pd.src_clk_nr = src_clk_nr;
|
||||
pd.cfg_gpio = (cfg_gpio) ? cfg_gpio : s3c64xx_spi1_cfg_gpio;
|
||||
|
||||
s3c_set_platdata(&pd, sizeof(pd), &s3c64xx_device_spi1);
|
||||
}
|
||||
#endif /* CONFIG_S3C64XX_DEV_SPI1 */
|
||||
|
||||
#ifdef CONFIG_S3C64XX_DEV_SPI2
|
||||
static struct resource s3c64xx_spi2_resource[] = {
|
||||
[0] = DEFINE_RES_MEM(S3C_PA_SPI2, SZ_256),
|
||||
[1] = DEFINE_RES_IRQ(IRQ_SPI2),
|
||||
};
|
||||
|
||||
struct platform_device s3c64xx_device_spi2 = {
|
||||
.name = "s3c6410-spi",
|
||||
.id = 2,
|
||||
.num_resources = ARRAY_SIZE(s3c64xx_spi2_resource),
|
||||
.resource = s3c64xx_spi2_resource,
|
||||
.dev = {
|
||||
.dma_mask = &samsung_device_dma_mask,
|
||||
.coherent_dma_mask = DMA_BIT_MASK(32),
|
||||
},
|
||||
};
|
||||
|
||||
void __init s3c64xx_spi2_set_platdata(int (*cfg_gpio)(void), int src_clk_nr,
|
||||
int num_cs)
|
||||
{
|
||||
struct s3c64xx_spi_info pd;
|
||||
|
||||
/* Reject invalid configuration */
|
||||
if (!num_cs || src_clk_nr < 0) {
|
||||
pr_err("%s: Invalid SPI configuration\n", __func__);
|
||||
return;
|
||||
}
|
||||
|
||||
pd.num_cs = num_cs;
|
||||
pd.src_clk_nr = src_clk_nr;
|
||||
pd.cfg_gpio = (cfg_gpio) ? cfg_gpio : s3c64xx_spi2_cfg_gpio;
|
||||
|
||||
s3c_set_platdata(&pd, sizeof(pd), &s3c64xx_device_spi2);
|
||||
}
|
||||
#endif /* CONFIG_S3C64XX_DEV_SPI2 */
|
||||
|
@ -32,10 +32,6 @@
|
||||
|
||||
#include "crag6410.h"
|
||||
|
||||
static struct s3c64xx_spi_csinfo wm0010_spi_csinfo = {
|
||||
.line = S3C64XX_GPC(3),
|
||||
};
|
||||
|
||||
static struct wm0010_pdata wm0010_pdata = {
|
||||
.gpio_reset = S3C64XX_GPN(6),
|
||||
.reset_active_high = 1, /* Active high for Glenfarclas Rev 2 */
|
||||
@ -49,7 +45,6 @@ static struct spi_board_info wm1253_devs[] = {
|
||||
.chip_select = 0,
|
||||
.mode = SPI_MODE_0,
|
||||
.irq = S3C_EINT(4),
|
||||
.controller_data = &wm0010_spi_csinfo,
|
||||
.platform_data = &wm0010_pdata,
|
||||
},
|
||||
};
|
||||
@ -62,7 +57,6 @@ static struct spi_board_info balblair_devs[] = {
|
||||
.chip_select = 0,
|
||||
.mode = SPI_MODE_0,
|
||||
.irq = S3C_EINT(4),
|
||||
.controller_data = &wm0010_spi_csinfo,
|
||||
.platform_data = &wm0010_pdata,
|
||||
},
|
||||
};
|
||||
@ -229,10 +223,6 @@ static struct arizona_pdata wm5102_reva_pdata = {
|
||||
},
|
||||
};
|
||||
|
||||
static struct s3c64xx_spi_csinfo codec_spi_csinfo = {
|
||||
.line = S3C64XX_GPN(5),
|
||||
};
|
||||
|
||||
static struct spi_board_info wm5102_reva_spi_devs[] = {
|
||||
[0] = {
|
||||
.modalias = "wm5102",
|
||||
@ -242,7 +232,6 @@ static struct spi_board_info wm5102_reva_spi_devs[] = {
|
||||
.mode = SPI_MODE_0,
|
||||
.irq = GLENFARCLAS_PMIC_IRQ_BASE +
|
||||
WM831X_IRQ_GPIO_2,
|
||||
.controller_data = &codec_spi_csinfo,
|
||||
.platform_data = &wm5102_reva_pdata,
|
||||
},
|
||||
};
|
||||
@ -275,7 +264,6 @@ static struct spi_board_info wm5102_spi_devs[] = {
|
||||
.mode = SPI_MODE_0,
|
||||
.irq = GLENFARCLAS_PMIC_IRQ_BASE +
|
||||
WM831X_IRQ_GPIO_2,
|
||||
.controller_data = &codec_spi_csinfo,
|
||||
.platform_data = &wm5102_pdata,
|
||||
},
|
||||
};
|
||||
@ -298,7 +286,6 @@ static struct spi_board_info wm5110_spi_devs[] = {
|
||||
.mode = SPI_MODE_0,
|
||||
.irq = GLENFARCLAS_PMIC_IRQ_BASE +
|
||||
WM831X_IRQ_GPIO_2,
|
||||
.controller_data = &codec_spi_csinfo,
|
||||
.platform_data = &wm5102_reva_pdata,
|
||||
},
|
||||
};
|
||||
|
@ -825,6 +825,15 @@ static const struct gpio_led_platform_data gpio_leds_pdata = {
|
||||
|
||||
static struct dwc2_hsotg_plat crag6410_hsotg_pdata;
|
||||
|
||||
static struct gpiod_lookup_table crag_spi0_gpiod_table = {
|
||||
.dev_id = "s3c6410-spi.0",
|
||||
.table = {
|
||||
GPIO_LOOKUP_IDX("GPIOC", 3, "cs", 0, GPIO_ACTIVE_LOW),
|
||||
GPIO_LOOKUP_IDX("GPION", 5, "cs", 1, GPIO_ACTIVE_LOW),
|
||||
{ },
|
||||
},
|
||||
};
|
||||
|
||||
static void __init crag6410_machine_init(void)
|
||||
{
|
||||
/* Open drain IRQs need pullups */
|
||||
@ -856,7 +865,9 @@ static void __init crag6410_machine_init(void)
|
||||
i2c_register_board_info(1, i2c_devs1, ARRAY_SIZE(i2c_devs1));
|
||||
|
||||
samsung_keypad_set_platdata(&crag6410_keypad_data);
|
||||
s3c64xx_spi0_set_platdata(NULL, 0, 2);
|
||||
|
||||
gpiod_add_lookup_table(&crag_spi0_gpiod_table);
|
||||
s3c64xx_spi0_set_platdata(0, 2);
|
||||
|
||||
pwm_add_table(crag6410_pwm_lookup, ARRAY_SIZE(crag6410_pwm_lookup));
|
||||
platform_add_devices(crag6410_devices, ARRAY_SIZE(crag6410_devices));
|
||||
|
@ -16,12 +16,3 @@ int s3c64xx_spi0_cfg_gpio(void)
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_S3C64XX_DEV_SPI1
|
||||
int s3c64xx_spi1_cfg_gpio(void)
|
||||
{
|
||||
s3c_gpio_cfgall_range(S3C64XX_GPC(4), 3,
|
||||
S3C_GPIO_SFN(2), S3C_GPIO_PULL_UP);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
@ -16,12 +16,6 @@ static inline void s3c24xx_spi_setname(char *name)
|
||||
#ifdef CONFIG_S3C64XX_DEV_SPI0
|
||||
s3c64xx_device_spi0.name = name;
|
||||
#endif
|
||||
#ifdef CONFIG_S3C64XX_DEV_SPI1
|
||||
s3c64xx_device_spi1.name = name;
|
||||
#endif
|
||||
#ifdef CONFIG_S3C64XX_DEV_SPI2
|
||||
s3c64xx_device_spi2.name = name;
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif /* __PLAT_S3C_SPI_CORE_S3C24XX_H */
|
||||
|
@ -815,7 +815,7 @@ static int moxtet_probe(struct spi_device *spi)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int moxtet_remove(struct spi_device *spi)
|
||||
static void moxtet_remove(struct spi_device *spi)
|
||||
{
|
||||
struct moxtet *moxtet = spi_get_drvdata(spi);
|
||||
|
||||
@ -828,8 +828,6 @@ static int moxtet_remove(struct spi_device *spi)
|
||||
device_for_each_child(moxtet->dev, NULL, __unregister);
|
||||
|
||||
mutex_destroy(&moxtet->lock);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct of_device_id moxtet_dt_ids[] = {
|
||||
|
@ -267,11 +267,8 @@ static int st33zp24_i2c_probe(struct i2c_client *client,
|
||||
static int st33zp24_i2c_remove(struct i2c_client *client)
|
||||
{
|
||||
struct tpm_chip *chip = i2c_get_clientdata(client);
|
||||
int ret;
|
||||
|
||||
ret = st33zp24_remove(chip);
|
||||
if (ret)
|
||||
return ret;
|
||||
st33zp24_remove(chip);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -381,16 +381,11 @@ static int st33zp24_spi_probe(struct spi_device *dev)
|
||||
* @param: client, the spi_device description (TPM SPI description).
|
||||
* @return: 0 in case of success.
|
||||
*/
|
||||
static int st33zp24_spi_remove(struct spi_device *dev)
|
||||
static void st33zp24_spi_remove(struct spi_device *dev)
|
||||
{
|
||||
struct tpm_chip *chip = spi_get_drvdata(dev);
|
||||
int ret;
|
||||
|
||||
ret = st33zp24_remove(chip);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return 0;
|
||||
st33zp24_remove(chip);
|
||||
}
|
||||
|
||||
static const struct spi_device_id st33zp24_spi_id[] = {
|
||||
|
@ -511,10 +511,9 @@ _tpm_clean_answer:
|
||||
}
|
||||
EXPORT_SYMBOL(st33zp24_probe);
|
||||
|
||||
int st33zp24_remove(struct tpm_chip *chip)
|
||||
void st33zp24_remove(struct tpm_chip *chip)
|
||||
{
|
||||
tpm_chip_unregister(chip);
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(st33zp24_remove);
|
||||
|
||||
|
@ -34,5 +34,5 @@ int st33zp24_pm_resume(struct device *dev);
|
||||
|
||||
int st33zp24_probe(void *phy_id, const struct st33zp24_phy_ops *ops,
|
||||
struct device *dev, int irq, int io_lpcpd);
|
||||
int st33zp24_remove(struct tpm_chip *chip);
|
||||
void st33zp24_remove(struct tpm_chip *chip);
|
||||
#endif /* __LOCAL_ST33ZP24_H__ */
|
||||
|
@ -254,13 +254,12 @@ static int tpm_tis_spi_driver_probe(struct spi_device *spi)
|
||||
|
||||
static SIMPLE_DEV_PM_OPS(tpm_tis_pm, tpm_pm_suspend, tpm_tis_spi_resume);
|
||||
|
||||
static int tpm_tis_spi_remove(struct spi_device *dev)
|
||||
static void tpm_tis_spi_remove(struct spi_device *dev)
|
||||
{
|
||||
struct tpm_chip *chip = spi_get_drvdata(dev);
|
||||
|
||||
tpm_chip_unregister(chip);
|
||||
tpm_tis_remove(chip);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct spi_device_id tpm_tis_spi_id[] = {
|
||||
|
@ -1544,14 +1544,12 @@ err_disable_oscin:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int lmk04832_remove(struct spi_device *spi)
|
||||
static void lmk04832_remove(struct spi_device *spi)
|
||||
{
|
||||
struct lmk04832 *lmk = spi_get_drvdata(spi);
|
||||
|
||||
clk_disable_unprepare(lmk->oscin);
|
||||
of_clk_del_provider(spi->dev.of_node);
|
||||
|
||||
return 0;
|
||||
}
|
||||
static const struct spi_device_id lmk04832_id[] = {
|
||||
{ "lmk04832", LMK04832 },
|
||||
|
@ -163,15 +163,13 @@ exit_destroy:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int gen_74x164_remove(struct spi_device *spi)
|
||||
static void gen_74x164_remove(struct spi_device *spi)
|
||||
{
|
||||
struct gen_74x164_chip *chip = spi_get_drvdata(spi);
|
||||
|
||||
gpiod_set_value_cansleep(chip->gpiod_oe, 0);
|
||||
gpiochip_remove(&chip->gpio_chip);
|
||||
mutex_destroy(&chip->lock);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct spi_device_id gen_74x164_spi_ids[] = {
|
||||
|
@ -443,14 +443,12 @@ static int max3191x_probe(struct spi_device *spi)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int max3191x_remove(struct spi_device *spi)
|
||||
static void max3191x_remove(struct spi_device *spi)
|
||||
{
|
||||
struct max3191x_chip *max3191x = spi_get_drvdata(spi);
|
||||
|
||||
gpiochip_remove(&max3191x->gpio);
|
||||
mutex_destroy(&max3191x->lock);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int __init max3191x_register_driver(struct spi_driver *sdrv)
|
||||
|
@ -64,11 +64,9 @@ static int max7301_probe(struct spi_device *spi)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int max7301_remove(struct spi_device *spi)
|
||||
static void max7301_remove(struct spi_device *spi)
|
||||
{
|
||||
__max730x_remove(&spi->dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct spi_device_id max7301_id[] = {
|
||||
|
@ -134,7 +134,7 @@ exit_destroy:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int mc33880_remove(struct spi_device *spi)
|
||||
static void mc33880_remove(struct spi_device *spi)
|
||||
{
|
||||
struct mc33880 *mc;
|
||||
|
||||
@ -142,8 +142,6 @@ static int mc33880_remove(struct spi_device *spi)
|
||||
|
||||
gpiochip_remove(&mc->chip);
|
||||
mutex_destroy(&mc->lock);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct spi_driver mc33880_driver = {
|
||||
|
@ -163,15 +163,13 @@ static int pisosr_gpio_probe(struct spi_device *spi)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int pisosr_gpio_remove(struct spi_device *spi)
|
||||
static void pisosr_gpio_remove(struct spi_device *spi)
|
||||
{
|
||||
struct pisosr_gpio *gpio = spi_get_drvdata(spi);
|
||||
|
||||
gpiochip_remove(&gpio->chip);
|
||||
|
||||
mutex_destroy(&gpio->lock);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct spi_device_id pisosr_gpio_id_table[] = {
|
||||
|
@ -293,15 +293,13 @@ static int y030xx067a_probe(struct spi_device *spi)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int y030xx067a_remove(struct spi_device *spi)
|
||||
static void y030xx067a_remove(struct spi_device *spi)
|
||||
{
|
||||
struct y030xx067a *priv = spi_get_drvdata(spi);
|
||||
|
||||
drm_panel_remove(&priv->panel);
|
||||
drm_panel_disable(&priv->panel);
|
||||
drm_panel_unprepare(&priv->panel);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct drm_display_mode y030xx067a_modes[] = {
|
||||
|
@ -896,14 +896,12 @@ static int ili9322_probe(struct spi_device *spi)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ili9322_remove(struct spi_device *spi)
|
||||
static void ili9322_remove(struct spi_device *spi)
|
||||
{
|
||||
struct ili9322 *ili = spi_get_drvdata(spi);
|
||||
|
||||
ili9322_power_off(ili);
|
||||
drm_panel_remove(&ili->panel);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -728,7 +728,7 @@ static int ili9341_probe(struct spi_device *spi)
|
||||
return -1;
|
||||
}
|
||||
|
||||
static int ili9341_remove(struct spi_device *spi)
|
||||
static void ili9341_remove(struct spi_device *spi)
|
||||
{
|
||||
const struct spi_device_id *id = spi_get_device_id(spi);
|
||||
struct ili9341 *ili = spi_get_drvdata(spi);
|
||||
@ -741,7 +741,6 @@ static int ili9341_remove(struct spi_device *spi)
|
||||
drm_dev_unplug(drm);
|
||||
drm_atomic_helper_shutdown(drm);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void ili9341_shutdown(struct spi_device *spi)
|
||||
|
@ -219,15 +219,13 @@ static int ej030na_probe(struct spi_device *spi)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ej030na_remove(struct spi_device *spi)
|
||||
static void ej030na_remove(struct spi_device *spi)
|
||||
{
|
||||
struct ej030na *priv = spi_get_drvdata(spi);
|
||||
|
||||
drm_panel_remove(&priv->panel);
|
||||
drm_panel_disable(&priv->panel);
|
||||
drm_panel_unprepare(&priv->panel);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct drm_display_mode ej030na_modes[] = {
|
||||
|
@ -203,14 +203,12 @@ static int lb035q02_probe(struct spi_device *spi)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int lb035q02_remove(struct spi_device *spi)
|
||||
static void lb035q02_remove(struct spi_device *spi)
|
||||
{
|
||||
struct lb035q02_device *lcd = spi_get_drvdata(spi);
|
||||
|
||||
drm_panel_remove(&lcd->panel);
|
||||
drm_panel_disable(&lcd->panel);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct of_device_id lb035q02_of_match[] = {
|
||||
|
@ -266,14 +266,12 @@ static int lg4573_probe(struct spi_device *spi)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int lg4573_remove(struct spi_device *spi)
|
||||
static void lg4573_remove(struct spi_device *spi)
|
||||
{
|
||||
struct lg4573 *ctx = spi_get_drvdata(spi);
|
||||
|
||||
lg4573_display_off(ctx);
|
||||
drm_panel_remove(&ctx->panel);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct of_device_id lg4573_of_match[] = {
|
||||
|
@ -212,15 +212,13 @@ static int nl8048_probe(struct spi_device *spi)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int nl8048_remove(struct spi_device *spi)
|
||||
static void nl8048_remove(struct spi_device *spi)
|
||||
{
|
||||
struct nl8048_panel *lcd = spi_get_drvdata(spi);
|
||||
|
||||
drm_panel_remove(&lcd->panel);
|
||||
drm_panel_disable(&lcd->panel);
|
||||
drm_panel_unprepare(&lcd->panel);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct of_device_id nl8048_of_match[] = {
|
||||
|
@ -292,7 +292,7 @@ static int nt39016_probe(struct spi_device *spi)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int nt39016_remove(struct spi_device *spi)
|
||||
static void nt39016_remove(struct spi_device *spi)
|
||||
{
|
||||
struct nt39016 *panel = spi_get_drvdata(spi);
|
||||
|
||||
@ -300,8 +300,6 @@ static int nt39016_remove(struct spi_device *spi)
|
||||
|
||||
nt39016_disable(&panel->drm_panel);
|
||||
nt39016_unprepare(&panel->drm_panel);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct drm_display_mode kd035g6_display_modes[] = {
|
||||
|
@ -314,12 +314,11 @@ static int db7430_probe(struct spi_device *spi)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int db7430_remove(struct spi_device *spi)
|
||||
static void db7430_remove(struct spi_device *spi)
|
||||
{
|
||||
struct db7430 *db = spi_get_drvdata(spi);
|
||||
|
||||
drm_panel_remove(&db->panel);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -358,14 +358,12 @@ static int ld9040_probe(struct spi_device *spi)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ld9040_remove(struct spi_device *spi)
|
||||
static void ld9040_remove(struct spi_device *spi)
|
||||
{
|
||||
struct ld9040 *ctx = spi_get_drvdata(spi);
|
||||
|
||||
ld9040_power_off(ctx);
|
||||
drm_panel_remove(&ctx->panel);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct of_device_id ld9040_of_match[] = {
|
||||
|
@ -291,12 +291,11 @@ static int s6d27a1_probe(struct spi_device *spi)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int s6d27a1_remove(struct spi_device *spi)
|
||||
static void s6d27a1_remove(struct spi_device *spi)
|
||||
{
|
||||
struct s6d27a1 *ctx = spi_get_drvdata(spi);
|
||||
|
||||
drm_panel_remove(&ctx->panel);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct of_device_id s6d27a1_match[] = {
|
||||
|
@ -62,10 +62,9 @@ static int s6e63m0_spi_probe(struct spi_device *spi)
|
||||
s6e63m0_spi_dcs_write, false);
|
||||
}
|
||||
|
||||
static int s6e63m0_spi_remove(struct spi_device *spi)
|
||||
static void s6e63m0_spi_remove(struct spi_device *spi)
|
||||
{
|
||||
s6e63m0_remove(&spi->dev);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct of_device_id s6e63m0_spi_of_match[] = {
|
||||
|
@ -387,13 +387,11 @@ static int st7789v_probe(struct spi_device *spi)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int st7789v_remove(struct spi_device *spi)
|
||||
static void st7789v_remove(struct spi_device *spi)
|
||||
{
|
||||
struct st7789v *ctx = spi_get_drvdata(spi);
|
||||
|
||||
drm_panel_remove(&ctx->panel);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct of_device_id st7789v_of_match[] = {
|
||||
|
@ -655,7 +655,7 @@ static int acx565akm_probe(struct spi_device *spi)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int acx565akm_remove(struct spi_device *spi)
|
||||
static void acx565akm_remove(struct spi_device *spi)
|
||||
{
|
||||
struct acx565akm_panel *lcd = spi_get_drvdata(spi);
|
||||
|
||||
@ -666,8 +666,6 @@ static int acx565akm_remove(struct spi_device *spi)
|
||||
|
||||
drm_panel_disable(&lcd->panel);
|
||||
drm_panel_unprepare(&lcd->panel);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct of_device_id acx565akm_of_match[] = {
|
||||
|
@ -350,15 +350,13 @@ static int td028ttec1_probe(struct spi_device *spi)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int td028ttec1_remove(struct spi_device *spi)
|
||||
static void td028ttec1_remove(struct spi_device *spi)
|
||||
{
|
||||
struct td028ttec1_panel *lcd = spi_get_drvdata(spi);
|
||||
|
||||
drm_panel_remove(&lcd->panel);
|
||||
drm_panel_disable(&lcd->panel);
|
||||
drm_panel_unprepare(&lcd->panel);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct of_device_id td028ttec1_of_match[] = {
|
||||
|
@ -463,7 +463,7 @@ static int td043mtea1_probe(struct spi_device *spi)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int td043mtea1_remove(struct spi_device *spi)
|
||||
static void td043mtea1_remove(struct spi_device *spi)
|
||||
{
|
||||
struct td043mtea1_panel *lcd = spi_get_drvdata(spi);
|
||||
|
||||
@ -472,8 +472,6 @@ static int td043mtea1_remove(struct spi_device *spi)
|
||||
drm_panel_unprepare(&lcd->panel);
|
||||
|
||||
sysfs_remove_group(&spi->dev.kobj, &td043mtea1_attr_group);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct of_device_id td043mtea1_of_match[] = {
|
||||
|
@ -450,12 +450,11 @@ static int tpg110_probe(struct spi_device *spi)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int tpg110_remove(struct spi_device *spi)
|
||||
static void tpg110_remove(struct spi_device *spi)
|
||||
{
|
||||
struct tpg110 *tpg = spi_get_drvdata(spi);
|
||||
|
||||
drm_panel_remove(&tpg->panel);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct of_device_id tpg110_match[] = {
|
||||
|
@ -407,12 +407,11 @@ static int ws2401_probe(struct spi_device *spi)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ws2401_remove(struct spi_device *spi)
|
||||
static void ws2401_remove(struct spi_device *spi)
|
||||
{
|
||||
struct ws2401 *ws = spi_get_drvdata(spi);
|
||||
|
||||
drm_panel_remove(&ws->panel);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -263,14 +263,12 @@ static int hx8357d_probe(struct spi_device *spi)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int hx8357d_remove(struct spi_device *spi)
|
||||
static void hx8357d_remove(struct spi_device *spi)
|
||||
{
|
||||
struct drm_device *drm = spi_get_drvdata(spi);
|
||||
|
||||
drm_dev_unplug(drm);
|
||||
drm_atomic_helper_shutdown(drm);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void hx8357d_shutdown(struct spi_device *spi)
|
||||
|
@ -193,14 +193,12 @@ static int ili9163_probe(struct spi_device *spi)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ili9163_remove(struct spi_device *spi)
|
||||
static void ili9163_remove(struct spi_device *spi)
|
||||
{
|
||||
struct drm_device *drm = spi_get_drvdata(spi);
|
||||
|
||||
drm_dev_unplug(drm);
|
||||
drm_atomic_helper_shutdown(drm);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void ili9163_shutdown(struct spi_device *spi)
|
||||
|
@ -411,14 +411,12 @@ static int ili9225_probe(struct spi_device *spi)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ili9225_remove(struct spi_device *spi)
|
||||
static void ili9225_remove(struct spi_device *spi)
|
||||
{
|
||||
struct drm_device *drm = spi_get_drvdata(spi);
|
||||
|
||||
drm_dev_unplug(drm);
|
||||
drm_atomic_helper_shutdown(drm);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void ili9225_shutdown(struct spi_device *spi)
|
||||
|
@ -225,14 +225,12 @@ static int ili9341_probe(struct spi_device *spi)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ili9341_remove(struct spi_device *spi)
|
||||
static void ili9341_remove(struct spi_device *spi)
|
||||
{
|
||||
struct drm_device *drm = spi_get_drvdata(spi);
|
||||
|
||||
drm_dev_unplug(drm);
|
||||
drm_atomic_helper_shutdown(drm);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void ili9341_shutdown(struct spi_device *spi)
|
||||
|
@ -243,14 +243,12 @@ static int ili9486_probe(struct spi_device *spi)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ili9486_remove(struct spi_device *spi)
|
||||
static void ili9486_remove(struct spi_device *spi)
|
||||
{
|
||||
struct drm_device *drm = spi_get_drvdata(spi);
|
||||
|
||||
drm_dev_unplug(drm);
|
||||
drm_atomic_helper_shutdown(drm);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void ili9486_shutdown(struct spi_device *spi)
|
||||
|
@ -233,14 +233,12 @@ static int mi0283qt_probe(struct spi_device *spi)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int mi0283qt_remove(struct spi_device *spi)
|
||||
static void mi0283qt_remove(struct spi_device *spi)
|
||||
{
|
||||
struct drm_device *drm = spi_get_drvdata(spi);
|
||||
|
||||
drm_dev_unplug(drm);
|
||||
drm_atomic_helper_shutdown(drm);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void mi0283qt_shutdown(struct spi_device *spi)
|
||||
|
@ -1140,14 +1140,12 @@ static int repaper_probe(struct spi_device *spi)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int repaper_remove(struct spi_device *spi)
|
||||
static void repaper_remove(struct spi_device *spi)
|
||||
{
|
||||
struct drm_device *drm = spi_get_drvdata(spi);
|
||||
|
||||
drm_dev_unplug(drm);
|
||||
drm_atomic_helper_shutdown(drm);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void repaper_shutdown(struct spi_device *spi)
|
||||
|
@ -360,14 +360,12 @@ static int st7586_probe(struct spi_device *spi)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int st7586_remove(struct spi_device *spi)
|
||||
static void st7586_remove(struct spi_device *spi)
|
||||
{
|
||||
struct drm_device *drm = spi_get_drvdata(spi);
|
||||
|
||||
drm_dev_unplug(drm);
|
||||
drm_atomic_helper_shutdown(drm);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void st7586_shutdown(struct spi_device *spi)
|
||||
|
@ -247,14 +247,12 @@ static int st7735r_probe(struct spi_device *spi)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int st7735r_remove(struct spi_device *spi)
|
||||
static void st7735r_remove(struct spi_device *spi)
|
||||
{
|
||||
struct drm_device *drm = spi_get_drvdata(spi);
|
||||
|
||||
drm_dev_unplug(drm);
|
||||
drm_atomic_helper_shutdown(drm);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void st7735r_shutdown(struct spi_device *spi)
|
||||
|
@ -194,7 +194,7 @@ out_err:
|
||||
return status;
|
||||
}
|
||||
|
||||
static int adcxx_remove(struct spi_device *spi)
|
||||
static void adcxx_remove(struct spi_device *spi)
|
||||
{
|
||||
struct adcxx *adc = spi_get_drvdata(spi);
|
||||
int i;
|
||||
@ -205,8 +205,6 @@ static int adcxx_remove(struct spi_device *spi)
|
||||
device_remove_file(&spi->dev, &ad_input[i].dev_attr);
|
||||
|
||||
mutex_unlock(&adc->lock);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct spi_device_id adcxx_ids[] = {
|
||||
|
@ -254,7 +254,7 @@ err_remove:
|
||||
return err;
|
||||
}
|
||||
|
||||
static int max1111_remove(struct spi_device *spi)
|
||||
static void max1111_remove(struct spi_device *spi)
|
||||
{
|
||||
struct max1111_data *data = spi_get_drvdata(spi);
|
||||
|
||||
@ -265,7 +265,6 @@ static int max1111_remove(struct spi_device *spi)
|
||||
sysfs_remove_group(&spi->dev.kobj, &max1110_attr_group);
|
||||
sysfs_remove_group(&spi->dev.kobj, &max1111_attr_group);
|
||||
mutex_destroy(&data->drvdata_lock);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct spi_device_id max1111_ids[] = {
|
||||
|
@ -100,7 +100,7 @@ static int max31722_probe(struct spi_device *spi)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int max31722_remove(struct spi_device *spi)
|
||||
static void max31722_remove(struct spi_device *spi)
|
||||
{
|
||||
struct max31722_data *data = spi_get_drvdata(spi);
|
||||
int ret;
|
||||
@ -111,8 +111,6 @@ static int max31722_remove(struct spi_device *spi)
|
||||
if (ret)
|
||||
/* There is nothing we can do about this ... */
|
||||
dev_warn(&spi->dev, "Failed to put device in stand-by mode\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int __maybe_unused max31722_suspend(struct device *dev)
|
||||
|
@ -87,11 +87,9 @@ static int bma400_spi_probe(struct spi_device *spi)
|
||||
return bma400_probe(&spi->dev, regmap, id->name);
|
||||
}
|
||||
|
||||
static int bma400_spi_remove(struct spi_device *spi)
|
||||
static void bma400_spi_remove(struct spi_device *spi)
|
||||
{
|
||||
bma400_remove(&spi->dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct spi_device_id bma400_spi_ids[] = {
|
||||
|
@ -35,11 +35,9 @@ static int bmc150_accel_probe(struct spi_device *spi)
|
||||
true);
|
||||
}
|
||||
|
||||
static int bmc150_accel_remove(struct spi_device *spi)
|
||||
static void bmc150_accel_remove(struct spi_device *spi)
|
||||
{
|
||||
bmc150_accel_core_remove(&spi->dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct acpi_device_id bmc150_accel_acpi_match[] = {
|
||||
|
@ -56,11 +56,9 @@ static int bmi088_accel_probe(struct spi_device *spi)
|
||||
true);
|
||||
}
|
||||
|
||||
static int bmi088_accel_remove(struct spi_device *spi)
|
||||
static void bmi088_accel_remove(struct spi_device *spi)
|
||||
{
|
||||
bmi088_accel_core_remove(&spi->dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct spi_device_id bmi088_accel_id[] = {
|
||||
|
@ -32,11 +32,9 @@ static int kxsd9_spi_probe(struct spi_device *spi)
|
||||
spi_get_device_id(spi)->name);
|
||||
}
|
||||
|
||||
static int kxsd9_spi_remove(struct spi_device *spi)
|
||||
static void kxsd9_spi_remove(struct spi_device *spi)
|
||||
{
|
||||
kxsd9_common_remove(&spi->dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct spi_device_id kxsd9_spi_id[] = {
|
||||
|
@ -22,11 +22,9 @@ static int mma7455_spi_probe(struct spi_device *spi)
|
||||
return mma7455_core_probe(&spi->dev, regmap, id->name);
|
||||
}
|
||||
|
||||
static int mma7455_spi_remove(struct spi_device *spi)
|
||||
static void mma7455_spi_remove(struct spi_device *spi)
|
||||
{
|
||||
mma7455_core_remove(&spi->dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct spi_device_id mma7455_spi_ids[] = {
|
||||
|
@ -1524,7 +1524,7 @@ error_ret:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int sca3000_remove(struct spi_device *spi)
|
||||
static void sca3000_remove(struct spi_device *spi)
|
||||
{
|
||||
struct iio_dev *indio_dev = spi_get_drvdata(spi);
|
||||
struct sca3000_state *st = iio_priv(indio_dev);
|
||||
@ -1535,8 +1535,6 @@ static int sca3000_remove(struct spi_device *spi)
|
||||
sca3000_stop_all_interrupts(st);
|
||||
if (spi->irq)
|
||||
free_irq(spi->irq, indio_dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct spi_device_id sca3000_id[] = {
|
||||
|
@ -479,7 +479,7 @@ error_disable_reg:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int ad7266_remove(struct spi_device *spi)
|
||||
static void ad7266_remove(struct spi_device *spi)
|
||||
{
|
||||
struct iio_dev *indio_dev = spi_get_drvdata(spi);
|
||||
struct ad7266_state *st = iio_priv(indio_dev);
|
||||
@ -488,8 +488,6 @@ static int ad7266_remove(struct spi_device *spi)
|
||||
iio_triggered_buffer_cleanup(indio_dev);
|
||||
if (!IS_ERR(st->reg))
|
||||
regulator_disable(st->reg);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct spi_device_id ad7266_id[] = {
|
||||
|
@ -78,13 +78,11 @@ static int ltc2496_probe(struct spi_device *spi)
|
||||
return ltc2497core_probe(dev, indio_dev);
|
||||
}
|
||||
|
||||
static int ltc2496_remove(struct spi_device *spi)
|
||||
static void ltc2496_remove(struct spi_device *spi)
|
||||
{
|
||||
struct iio_dev *indio_dev = spi_get_drvdata(spi);
|
||||
|
||||
ltc2497core_remove(indio_dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct of_device_id ltc2496_of_match[] = {
|
||||
|
@ -459,15 +459,13 @@ reg_disable:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int mcp320x_remove(struct spi_device *spi)
|
||||
static void mcp320x_remove(struct spi_device *spi)
|
||||
{
|
||||
struct iio_dev *indio_dev = spi_get_drvdata(spi);
|
||||
struct mcp320x *adc = iio_priv(indio_dev);
|
||||
|
||||
iio_device_unregister(indio_dev);
|
||||
regulator_disable(adc->reg);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct of_device_id mcp320x_dt_ids[] = {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user