Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Documentation/devicetree/bindings/arm/pmu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,14 @@ properties:
- apm,potenza-pmu
- apple,avalanche-pmu
- apple,blizzard-pmu
- apple,cyclone-pmu
- apple,firestorm-pmu
- apple,fusion-pmu
- apple,icestorm-pmu
- apple,monsoon-pmu
- apple,mistral-pmu
- apple,twister-pmu
- apple,typhoon-pmu
- arm,armv8-pmuv3 # Only for s/w models
- arm,arm1136-pmu
- arm,arm1176-pmu
Expand Down
120 changes: 120 additions & 0 deletions Documentation/devicetree/bindings/bus/apple,usb-complex.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
%YAML 1.2
---
$id: http://devicetree.org/schemas/bus/apple,usb-complex.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Apple USB Complex

maintainers:
- Nick Chan <towinchenmi@gmail.com>

description: |
Apple USB Complex is a power-mangaged bus that includes remap registers
that allows using USB hardware blocks with 32-bit DMA, even without
a real IOMMU. For a device connected to the complex to be used, the
PM domain associated with the bus must first be turned on, and the
remap registers be configured.

The bindings for Apple USB Complex extend the bindings for "simple-pm-bus".

allOf:
- $ref: simple-pm-bus.yaml#

# We need a select here so we don't match all nodes with 'simple-pm-bus'.
select:
properties:
compatible:
contains:
enum:
- apple,s5l8960x-usb-complex
- apple,t8011-usb-complex
- apple,t8015-usb-complex
required:
- compatible

properties:
compatible:
oneOf:
- items:
- enum:
- apple,t7000-usb-complex
- apple,s8000-usb-complex
- apple,t8010-usb-complex
- const: apple,s5l8960x-usb-complex
- const: simple-pm-bus
- items:
- enum:
- apple,s5l8960x-usb-complex
- apple,t8011-usb-complex
- apple,t8015-usb-complex
- const: simple-pm-bus

reg:
description: |
Register ranges for the USB Complex. Some hardware has a USB2 PHY
in the middle that are handled by another driver and thus need
two ranges to avoid conflicts.
minItems: 1
maxItems: 2

dma-ranges:
description: |
A single range for the memory region to be remapped. It must be a
4 GiB range with DMA addresses starting at 0 and are typically
mapped to the start of DRAM.
maxItems: 1

nonposted-mmio: true

patternProperties:
"^.*@[0-9a-f]+$":
description: Hardware attached to the bus
type: object

required:
- reg

required:
- compatible
- reg
- dma-ranges

unevaluatedProperties: false

examples:
- |
soc {
#address-cells = <2>;
#size-cells = <2>;

bus@20c000000 {
compatible = "apple,t8011-usb-complex", "simple-pm-bus";
#address-cells = <2>;
#size-cells = <2>;
dma-ranges = <0x0 0x00000000 0x8 0x00000000 0x1 0x00000000>;
nonposted-mmio;
ranges;

reg = <0x2 0x0c000000 0x0 0x40>,
<0x2 0x0c000060 0x0 0x40>;
power-domains = <&ps_usb>;
};
};

- |
soc {
#address-cells = <2>;
#size-cells = <2>;

bus@21c000000 {
compatible = "apple,t7000-usb-complex", "apple,s5l8960x-usb-complex", "simple-pm-bus";
#address-cells = <2>;
#size-cells = <2>;
dma-ranges = <0x0 0x00000000 0x8 0x00000000 0x1 0x00000000>;
nonposted-mmio;
ranges;

reg = <0x2 0x1c900000 0x0 0x100>;
power-domains = <&ps_usb>;
};
};
86 changes: 86 additions & 0 deletions Documentation/devicetree/bindings/hwmon/apple,smc-hwmon.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/hwmon/apple,smc-hwmon.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Apple SMC Hardware Monitoring

description:
Apple's System Management Controller (SMC) exposes a vast array of
hardware monitoring sensors, including temperature probes, current and
voltage sense, power meters, and fan speeds. It also provides endpoints
to manually control the speed of each fan individually. Each Apple
Silicon device exposes a different set of endpoints via SMC keys. This
is true even when two machines share an SoC. The CPU core temperature
sensor keys on an M1 Mac mini are different to those on an M1 MacBook
Pro, for example.

maintainers:
- James Calligeros <jcalligeros99@gmail.com>

$defs:
sensor:
type: object

properties:
apple,key-id:
$ref: /schemas/types.yaml#/definitions/string
pattern: "^[A-Za-z0-9]{4}$"
description: The SMC FourCC key of the desired sensor.
Must match the node's suffix.

label:
description: Human-readable name for the sensor

required:
- apple,key-id

properties:
compatible:
const: apple,smc-hwmon

patternProperties:
"^current-[A-Za-z0-9]{4}$":
$ref: "#/$defs/sensor"
unevaluatedProperties: false

"^fan-[A-Za-z0-9]{4}$":
$ref: "#/$defs/sensor"
unevaluatedProperties: false

properties:
apple,fan-minimum:
$ref: /schemas/types.yaml#/definitions/string
pattern: "^[A-Za-z0-9]{4}$"
description: SMC key containing the fan's minimum speed

apple,fan-maximum:
$ref: /schemas/types.yaml#/definitions/string
pattern: "^[A-Za-z0-9]{4}$"
description: SMC key containing the fan's maximum speed

apple,fan-target:
$ref: /schemas/types.yaml#/definitions/string
pattern: "^[A-Za-z0-9]{4}$"
description: Writeable endpoint for setting desired fan speed

apple,fan-mode:
$ref: /schemas/types.yaml#/definitions/string
pattern: "^[A-Za-z0-9]{4}$"
description: Writeable key to enable/disable manual fan control


"^power-[A-Za-z0-9]{4}$":
$ref: "#/$defs/sensor"
unevaluatedProperties: false

"^temperature-[A-Za-z0-9]{4}$":
$ref: "#/$defs/sensor"
unevaluatedProperties: false

"^voltage-[A-Za-z0-9]{4}$":
$ref: "#/$defs/sensor"
unevaluatedProperties: false

additionalProperties: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/backlight/apple,pmic-bl.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Apple PMIC backlight

maintainers:
- Nick Chan <towinchenmi@gmail.com>

description:
This module is part of Apple PMICs. For more details see
../mfd/apple,pmic.yaml.

A backlight WLED interface in Apple PMICs. There are two variants
differing in how the backlight value is encoded in the registers.

allOf:
- $ref: common.yaml#

properties:
compatible:
oneOf:
- items:
- const: apple,arabela-pmic-bl
- const: apple,anya-pmic-bl
- items:
- const: apple,august-pmic-bl
- const: apple,aria-pmic-bl
- const: apple,anya-pmic-bl
- const: apple,aria-pmic-bl

reg:
maxItems: 1

required:
- compatible
- reg

additionalProperties: false
Loading