mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
3601fe43e8
Core changes: - The big change this time around is the irqchip handling in the qualcomm pin controllers, closely coupled with the gpiochip. This rework, in a classic fall-between-the-chairs fashion has been sidestepped for too long. The Qualcomm IRQchips using the SPMI and SSBI transport mechanisms have been rewritten to use hierarchical irqchip. This creates the base from which I intend to gradually pull support for hierarchical irqchips into the gpiolib irqchip helpers to cut down on duplicate code. We have too many hacks in the kernel because people have been working around the missing hierarchical irqchip for years, and once it was there, noone understood it for a while. We are now slowly adapting to using it. This is why this pull requests include changes to MFD, SPMI, IRQchip core and some ARM Device Trees pertaining to the Qualcomm chip family. Since Qualcomm have so many chips and such large deployments it is paramount that this platform gets this right, and now it (hopefully) does. - Core support for pull-up and pull-down configuration, also from the device tree. When a simple GPIO chip support a "off or on" pull-up or pull-down resistor, we provide a way to set this up using machine descriptors or device tree. If more elaborate control of pull up/down (such as resistance shunt setting) is required, drivers should be phased over to use pin control. We do not yet provide a userspace ABI for this pull up-down setting but I suspect the makers are going to ask for it soon enough. PCA953x is the first user of this new API. - The GPIO mockup driver has been revamped after some discussion improving the IRQ simulator in the process. The idea is to make it possible to use the mockup for both testing and virtual prototyping, e.g. when you do not yet have a GPIO expander to play with but really want to get something to develop code around before hardware is available. It's neat. The blackbox testing usecase is currently making its way into kernelci. - ACPI GPIO core preserves non direction flags when updating flags. - A new device core helper for devm_platform_ioremap_resource() is funneled through the GPIO tree with Greg's ACK. New drivers: - TQ-Systems QTMX86 GPIO controllers (using port-mapped I/O) - Gateworks PLD GPIO driver (vaccumed up from OpenWrt) - AMD G-Series PCH (Platform Controller Hub) GPIO driver. - Fintek F81804 & F81966 subvariants. - PCA953x now supports NXP PCAL6416. Driver improvements: - IRQ support on the Nintendo Wii (Hollywood) GPIO. - get_direction() support for the MVEBU driver. - Set the right output level on SAMA5D2. - Drop the unused irq trigger setting on the Spreadtrum driver. - Wakeup support for PCA953x. - A slew of cleanups in the various Intel drivers. -----BEGIN PGP SIGNATURE----- iQIcBAABAgAGBQJcgoLEAAoJEEEQszewGV1zjBAP/3OmTFGv49PFmJwSx+PlLiYf V6/UPaQzq81CGSMtHxbS51TyP9Id7PCfsacbuFYutzn0D1efvl7jrkb8qJ6fVvCM bl/i6q8ipRTPzAf1hD3QCgCe3BXCA064/OcPrz987oIvI3bJQXsmBjBSXHWr4Cwa WfB5DX/afn9TK3XHhMQGfw5f0d+TtnKAs90RTTVKiz9Ow8eFYZJOhgPkvhCR3Gi9 YJIzIAiwhHZ7/zauo4JAYFU/O/Z3YEC5zeLne2ItebzNooRkSxdz0c9Hs7HlCZmU 930Uv9jNN89N3vPqpZzAHtPvwDOmAILMWvKy9xRSp+eoIukarRJgF7ALPk7QWxK1 yy+tGj4dXBQ6tI8W3wUN1WgjNpii3K1HbJ+1LQVQL2/q9o+3YXXqmjdjuw7C8YYV 5ystNrUppkgfIIciHL4lhqw3wKJJhVEAns2V245hIitoShT+RvIg8GQbGZmWlQFd YsHbynqHL9iwfRNv26kEqZXZOo/4D1t6Scw+OPVyba2Wyttf+qbmg+XaYMqFaxYW mfydvdtymeCOUIPJMzw58KGPUTXJ4UPLENyayXNUHokr1a8VO8OIthY7zwi0CpvJ IcsAY9zoGxvfbRV922mlIsw3oOBcM2IN2lC9sY469ZVnjBrdC3rsQpIBZr+Vzz8i YlUfXLSGSyuUZUz//2eG =VoVC -----END PGP SIGNATURE----- Merge tag 'gpio-v5.1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull GPIO updates from Linus Walleij: "This is the bulk of GPIO changes for the v5.1 cycle: Core changes: - The big change this time around is the irqchip handling in the qualcomm pin controllers, closely coupled with the gpiochip. This rework, in a classic fall-between-the-chairs fashion has been sidestepped for too long. The Qualcomm IRQchips using the SPMI and SSBI transport mechanisms have been rewritten to use hierarchical irqchip. This creates the base from which I intend to gradually pull support for hierarchical irqchips into the gpiolib irqchip helpers to cut down on duplicate code. We have too many hacks in the kernel because people have been working around the missing hierarchical irqchip for years, and once it was there, noone understood it for a while. We are now slowly adapting to using it. This is why this pull requests include changes to MFD, SPMI, IRQchip core and some ARM Device Trees pertaining to the Qualcomm chip family. Since Qualcomm have so many chips and such large deployments it is paramount that this platform gets this right, and now it (hopefully) does. - Core support for pull-up and pull-down configuration, also from the device tree. When a simple GPIO chip supports an "off or on" pull-up or pull-down resistor, we provide a way to set this up using machine descriptors or device tree. If more elaborate control of pull up/down (such as resistance shunt setting) is required, drivers should be phased over to use pin control. We do not yet provide a userspace ABI for this pull up-down setting but I suspect the makers are going to ask for it soon enough. PCA953x is the first user of this new API. - The GPIO mockup driver has been revamped after some discussion improving the IRQ simulator in the process. The idea is to make it possible to use the mockup for both testing and virtual prototyping, e.g. when you do not yet have a GPIO expander to play with but really want to get something to develop code around before hardware is available. It's neat. The blackbox testing usecase is currently making its way into kernelci. - ACPI GPIO core preserves non direction flags when updating flags. - A new device core helper for devm_platform_ioremap_resource() is funneled through the GPIO tree with Greg's ACK. New drivers: - TQ-Systems QTMX86 GPIO controllers (using port-mapped I/O) - Gateworks PLD GPIO driver (vaccumed up from OpenWrt) - AMD G-Series PCH (Platform Controller Hub) GPIO driver. - Fintek F81804 & F81966 subvariants. - PCA953x now supports NXP PCAL6416. Driver improvements: - IRQ support on the Nintendo Wii (Hollywood) GPIO. - get_direction() support for the MVEBU driver. - Set the right output level on SAMA5D2. - Drop the unused irq trigger setting on the Spreadtrum driver. - Wakeup support for PCA953x. - A slew of cleanups in the various Intel drivers" * tag 'gpio-v5.1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (110 commits) gpio: gpio-omap: fix level interrupt idling gpio: amd-fch: Set proper output level for direction_output x86: apuv2: remove unused variable gpio: pca953x: Use PCA_LATCH_INT platform/x86: fix PCENGINES_APU2 Kconfig warning gpio: pca953x: Fix dereference of irq data in shutdown gpio: amd-fch: Fix type error found by sparse gpio: amd-fch: Drop const from resource gpio: mxc: add check to return defer probe if clock tree NOT ready gpio: ftgpio: Register per-instance irqchip gpio: ixp4xx: Add DT bindings x86: pcengines apuv2 gpio/leds/keys platform driver gpio: AMD G-Series PCH gpio driver drivers: depend on HAS_IOMEM for devm_platform_ioremap_resource() gpio: tqmx86: Set proper output level for direction_output gpio: sprd: Change to use SoC compatible string gpio: sprd: Use SoC compatible string instead of wildcard string gpio: of: Handle both enable-gpio{,s} gpio: of: Restrict enable-gpio quirk to regulator-gpio gpio: davinci: use devm_platform_ioremap_resource() ...
184 lines
4.2 KiB
Plaintext
184 lines
4.2 KiB
Plaintext
// SPDX-License-Identifier: GPL-2.0
|
|
#include <dt-bindings/iio/qcom,spmi-vadc.h>
|
|
#include <dt-bindings/interrupt-controller/irq.h>
|
|
#include <dt-bindings/spmi/spmi.h>
|
|
|
|
&spmi_bus {
|
|
|
|
pm8941_0: pm8941@0 {
|
|
compatible = "qcom,pm8941", "qcom,spmi-pmic";
|
|
reg = <0x0 SPMI_USID>;
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
|
|
rtc@6000 {
|
|
compatible = "qcom,pm8941-rtc";
|
|
reg = <0x6000>,
|
|
<0x6100>;
|
|
reg-names = "rtc", "alarm";
|
|
interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>;
|
|
};
|
|
|
|
pwrkey@800 {
|
|
compatible = "qcom,pm8941-pwrkey";
|
|
reg = <0x800>;
|
|
interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
|
|
debounce = <15625>;
|
|
bias-pull-up;
|
|
};
|
|
|
|
usb_id: misc@900 {
|
|
compatible = "qcom,pm8941-misc";
|
|
reg = <0x900>;
|
|
interrupts = <0x0 0x9 0 IRQ_TYPE_EDGE_BOTH>;
|
|
interrupt-names = "usb_id";
|
|
};
|
|
|
|
smbb: charger@1000 {
|
|
compatible = "qcom,pm8941-charger";
|
|
reg = <0x1000>;
|
|
interrupts = <0x0 0x10 7 IRQ_TYPE_EDGE_BOTH>,
|
|
<0x0 0x10 5 IRQ_TYPE_EDGE_BOTH>,
|
|
<0x0 0x10 4 IRQ_TYPE_EDGE_BOTH>,
|
|
<0x0 0x12 1 IRQ_TYPE_EDGE_BOTH>,
|
|
<0x0 0x12 0 IRQ_TYPE_EDGE_BOTH>,
|
|
<0x0 0x13 2 IRQ_TYPE_EDGE_BOTH>,
|
|
<0x0 0x13 1 IRQ_TYPE_EDGE_BOTH>,
|
|
<0x0 0x14 1 IRQ_TYPE_EDGE_BOTH>;
|
|
interrupt-names = "chg-done",
|
|
"chg-fast",
|
|
"chg-trkl",
|
|
"bat-temp-ok",
|
|
"bat-present",
|
|
"chg-gone",
|
|
"usb-valid",
|
|
"dc-valid";
|
|
|
|
usb-otg-in-supply = <&pm8941_5vs1>;
|
|
|
|
chg_otg: otg-vbus { };
|
|
};
|
|
|
|
pm8941_gpios: gpios@c000 {
|
|
compatible = "qcom,pm8941-gpio", "qcom,spmi-gpio";
|
|
reg = <0xc000>;
|
|
gpio-controller;
|
|
gpio-ranges = <&pm8941_gpios 0 0 36>;
|
|
#gpio-cells = <2>;
|
|
interrupt-controller;
|
|
#interrupt-cells = <2>;
|
|
|
|
boost_bypass_n_pin: boost-bypass {
|
|
pins = "gpio21";
|
|
function = "normal";
|
|
};
|
|
};
|
|
|
|
pm8941_mpps: mpps@a000 {
|
|
compatible = "qcom,pm8941-mpp", "qcom,spmi-mpp";
|
|
reg = <0xa000>;
|
|
gpio-controller;
|
|
#gpio-cells = <2>;
|
|
interrupts = <0 0xa0 0 IRQ_TYPE_NONE>,
|
|
<0 0xa1 0 IRQ_TYPE_NONE>,
|
|
<0 0xa2 0 IRQ_TYPE_NONE>,
|
|
<0 0xa3 0 IRQ_TYPE_NONE>,
|
|
<0 0xa4 0 IRQ_TYPE_NONE>,
|
|
<0 0xa5 0 IRQ_TYPE_NONE>,
|
|
<0 0xa6 0 IRQ_TYPE_NONE>,
|
|
<0 0xa7 0 IRQ_TYPE_NONE>;
|
|
};
|
|
|
|
pm8941_temp: temp-alarm@2400 {
|
|
compatible = "qcom,spmi-temp-alarm";
|
|
reg = <0x2400>;
|
|
interrupts = <0 0x24 0 IRQ_TYPE_EDGE_RISING>;
|
|
io-channels = <&pm8941_vadc VADC_DIE_TEMP>;
|
|
io-channel-names = "thermal";
|
|
#thermal-sensor-cells = <0>;
|
|
};
|
|
|
|
pm8941_vadc: vadc@3100 {
|
|
compatible = "qcom,spmi-vadc";
|
|
reg = <0x3100>;
|
|
interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
#io-channel-cells = <1>;
|
|
|
|
bat_temp {
|
|
reg = <VADC_LR_MUX1_BAT_THERM>;
|
|
};
|
|
die_temp {
|
|
reg = <VADC_DIE_TEMP>;
|
|
};
|
|
ref_625mv {
|
|
reg = <VADC_REF_625MV>;
|
|
};
|
|
ref_1250v {
|
|
reg = <VADC_REF_1250MV>;
|
|
};
|
|
ref_gnd {
|
|
reg = <VADC_GND_REF>;
|
|
};
|
|
ref_vdd {
|
|
reg = <VADC_VDD_VADC>;
|
|
};
|
|
vbat_sns {
|
|
reg = <VADC_VBAT_SNS>;
|
|
};
|
|
};
|
|
|
|
pm8941_iadc: iadc@3600 {
|
|
compatible = "qcom,pm8941-iadc", "qcom,spmi-iadc";
|
|
reg = <0x3600>;
|
|
interrupts = <0x0 0x36 0x0 IRQ_TYPE_EDGE_RISING>;
|
|
qcom,external-resistor-micro-ohms = <10000>;
|
|
};
|
|
|
|
coincell@2800 {
|
|
compatible = "qcom,pm8941-coincell";
|
|
reg = <0x2800>;
|
|
status = "disabled";
|
|
};
|
|
};
|
|
|
|
pm8941_1: pm8941@1 {
|
|
compatible = "qcom,pm8941", "qcom,spmi-pmic";
|
|
reg = <0x1 SPMI_USID>;
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
|
|
pm8941_wled: wled@d800 {
|
|
compatible = "qcom,pm8941-wled";
|
|
reg = <0xd800>;
|
|
label = "backlight";
|
|
|
|
status = "disabled";
|
|
};
|
|
|
|
regulators {
|
|
compatible = "qcom,pm8941-regulators";
|
|
interrupts = <0x1 0x83 0x2 0>, <0x1 0x84 0x2 0>;
|
|
interrupt-names = "ocp-5vs1", "ocp-5vs2";
|
|
vin_5vs-supply = <&pm8941_5v>;
|
|
|
|
pm8941_5v: s4 {
|
|
regulator-min-microvolt = <5000000>;
|
|
regulator-max-microvolt = <5000000>;
|
|
regulator-enable-ramp-delay = <500>;
|
|
};
|
|
|
|
pm8941_5vs1: 5vs1 {
|
|
regulator-enable-ramp-delay = <1000>;
|
|
regulator-pull-down;
|
|
regulator-over-current-protection;
|
|
qcom,ocp-max-retries = <10>;
|
|
qcom,ocp-retry-delay = <30>;
|
|
qcom,vs-soft-start-strength = <0>;
|
|
regulator-initial-mode = <1>;
|
|
};
|
|
};
|
|
};
|
|
};
|