spi: Tesla FSD support
Merge series from Alim Akhtar: This series adds support for the SPI controller in the Tesla FSD SoC, also pulling in: git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git ib-mfd-spi-dt-v5.18 from the MFD tree which has dependencies for the DT bindings.
This commit is contained in:
Коммит
87fee8d091
|
@ -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>;
|
||||
};
|
|
@ -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>;
|
||||
};
|
||||
};
|
||||
};
|
|
@ -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>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
|
@ -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>;
|
||||
};
|
||||
};
|
||||
};
|
|
@ -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:
|
||||
|
|
|
@ -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
|
|
@ -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>;
|
||||
};
|
||||
};
|
||||
};
|
|
@ -111,5 +111,6 @@ properties:
|
|||
# The controller specific properties go here.
|
||||
allOf:
|
||||
- $ref: cdns,qspi-nor-peripheral-props.yaml#
|
||||
- $ref: samsung,spi-peripheral-props.yaml#
|
||||
|
||||
additionalProperties: true
|
||||
|
|
|
@ -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>;
|
||||
};
|
||||
};
|
||||
};
|
|
@ -11699,7 +11699,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
|
||||
|
||||
|
@ -11714,6 +11714,7 @@ M: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
|
|||
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
|
||||
|
||||
|
@ -11723,10 +11724,12 @@ M: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
|
|||
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
|
||||
|
@ -17095,7 +17098,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
|
||||
|
|
|
@ -798,16 +798,14 @@ static struct s3c64xx_spi_csinfo *s3c64xx_get_slave_ctrldata(
|
|||
return ERR_PTR(-EINVAL);
|
||||
}
|
||||
|
||||
cs = kzalloc(sizeof(*cs), GFP_KERNEL);
|
||||
if (!cs)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
data_np = of_get_child_by_name(slave_np, "controller-data");
|
||||
if (!data_np) {
|
||||
dev_err(&spi->dev, "child node 'controller-data' not found\n");
|
||||
return ERR_PTR(-EINVAL);
|
||||
}
|
||||
|
||||
cs = kzalloc(sizeof(*cs), GFP_KERNEL);
|
||||
if (!cs) {
|
||||
of_node_put(data_np);
|
||||
return ERR_PTR(-ENOMEM);
|
||||
dev_info(&spi->dev, "feedback delay set to default (0)\n");
|
||||
return cs;
|
||||
}
|
||||
|
||||
of_property_read_u32(data_np, "samsung,spi-feedback-delay", &fb_delay);
|
||||
|
@ -1415,6 +1413,16 @@ static const struct s3c64xx_spi_port_config exynos5433_spi_port_config = {
|
|||
.quirks = S3C64XX_SPI_QUIRK_CS_AUTO,
|
||||
};
|
||||
|
||||
static struct s3c64xx_spi_port_config fsd_spi_port_config = {
|
||||
.fifo_lvl_mask = { 0x7f, 0x7f, 0x7f, 0x7f, 0x7f},
|
||||
.rx_lvl_offset = 15,
|
||||
.tx_st_done = 25,
|
||||
.high_speed = true,
|
||||
.clk_from_cmu = true,
|
||||
.clk_ioclk = false,
|
||||
.quirks = S3C64XX_SPI_QUIRK_CS_AUTO,
|
||||
};
|
||||
|
||||
static const struct platform_device_id s3c64xx_spi_driver_ids[] = {
|
||||
{
|
||||
.name = "s3c2443-spi",
|
||||
|
@ -1445,6 +1453,9 @@ static const struct of_device_id s3c64xx_spi_dt_match[] = {
|
|||
{ .compatible = "samsung,exynos5433-spi",
|
||||
.data = (void *)&exynos5433_spi_port_config,
|
||||
},
|
||||
{ .compatible = "tesla,fsd-spi",
|
||||
.data = (void *)&fsd_spi_port_config,
|
||||
},
|
||||
{ },
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, s3c64xx_spi_dt_match);
|
||||
|
|
Загрузка…
Ссылка в новой задаче