SPMI patches for the merge window
Subsystems (3)
Stephen Boyd
maintainercover SPMI patches for the merge window
Hi Greg,
These are the SPMI patches for the next merge window.
- A new SPMI driver for Apple SoCs
- Limit Hikey 970 SPMI Kconfig to arm64
- Use irq_domain_create_tree() where appropriate
Jean-Francois Bortolotti (1):
spmi: add a spmi driver for Apple SoC
Jiri Slaby (SUSE) (1):
irqdomain: spmi: Switch to irq_domain_create_tree()
Sasha Finkelstein (1):
dt-bindings: spmi: Add Apple SPMI controller
WangYuli (1):
spmi: Only use Hikey 970 SPMI controller driver when ARM64
.../devicetree/bindings/spmi/apple,spmi.yaml | 49 +++++ MAINTAINERS | 2 + drivers/spmi/Kconfig | 9 + drivers/spmi/Makefile | 1 + drivers/spmi/spmi-apple-controller.c | 168 ++++++++++++++++++ drivers/spmi/spmi-pmic-arb.c | 2 +- 6 files changed, 230 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/spmi/apple,spmi.yaml create mode 100644 drivers/spmi/spmi-apple-controller.c
base-commit: 0af2f6be1b4281385b618cb86ad946eded089ac8
Signature · 2 lines
https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git/ https://git.kernel.org/pub/scm/linux/kernel/git/sboyd/spmi.git
Stephen Boyd
maintainerPATCH 1/4 spmi: Only use Hikey 970 SPMI controller driver when ARM64
From: WangYuli <[email protected]>
SPMI_HISI3670, the Hikey 970 SPMI controller driver, is only required to use the Kirin 970 SPMI bus.
And the Kirin 970 is an ARM64-based SoC, it cannot be used on platforms of other architectures.
--- drivers/spmi/Kconfig | 1 + 1 file changed, 1 insertion(+)
drivers/spmi/Kconfig +1 -0
@@ -14,6 +14,7 @@ if SPMI config SPMI_HISI3670 tristate "Hisilicon 3670 SPMI Controller" select IRQ_DOMAIN_HIERARCHY + depends on ARM64 || COMPILE_TEST depends on HAS_IOMEM help If you say yes to this option, support will be included for the
Signature · 2 lines
https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git/ https://git.kernel.org/pub/scm/linux/kernel/git/sboyd/spmi.git
Stephen Boyd
maintainerPATCH 2/4 dt-bindings: spmi: Add Apple SPMI controller
In reply to Stephen BoydFrom: Sasha Finkelstein <[email protected]>
Add bindings for the SPMI controller present on most Apple SoCs
--- .../devicetree/bindings/spmi/apple,spmi.yaml | 49 +++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 50 insertions(+) create mode 100644 Documentation/devicetree/bindings/spmi/apple,spmi.yaml
Documentation/devicetree/bindings/spmi/apple,spmi.yaml new file +49 -0
@@ -0,0 +1,49 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/spmi/apple,spmi.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Apple SPMI controller + +maintainers: + - Sasha Finkelstein <[email protected]> + +description: A SPMI controller present on most Apple SoCs + +allOf: + - $ref: spmi.yaml# + +properties: + compatible: + items: + - enum: + - apple,t8103-spmi + - apple,t6000-spmi + - apple,t8112-spmi + - const: apple,spmi + + reg: + maxItems: 1 + +required: + - compatible + - reg + +unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/spmi/spmi.h> + + spmi@920a1300 { + compatible = "apple,t6000-spmi", "apple,spmi"; + reg = <0x920a1300 0x100>; + #address-cells = <2>; + #size-cells = <0>; + + pmic@f { + reg = <0xf SPMI_USID>; + /* PMIC-specific properties */ + }; + };
MAINTAINERS +1 -0
@@ -2282,6 +2282,7 @@ F: Documentation/devicetree/bindings/pinctrl/apple,pinctrl.yaml F: Documentation/devicetree/bindings/power/apple* F: Documentation/devicetree/bindings/pwm/apple,s5l-fpwm.yaml F: Documentation/devicetree/bindings/spi/apple,spi.yaml +F: Documentation/devicetree/bindings/spmi/apple,spmi.yaml F: Documentation/devicetree/bindings/watchdog/apple,wdt.yaml F: arch/arm64/boot/dts/apple/ F: drivers/bluetooth/hci_bcm4377.c
Signature · 2 lines
https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git/ https://git.kernel.org/pub/scm/linux/kernel/git/sboyd/spmi.git
Stephen Boyd
maintainerPATCH 3/4 spmi: add a spmi driver for Apple SoC
In reply to Stephen BoydFrom: Jean-Francois Bortolotti <[email protected]>
The connected PMU contains several useful nvmem cells such as RTC offset, boot failure counters, reboot/shutdown selector, and a few others. In addition M3+ machines have their USB-PD controller connected via SPMI.
--- MAINTAINERS | 1 + drivers/spmi/Kconfig | 8 ++ drivers/spmi/Makefile | 1 + drivers/spmi/spmi-apple-controller.c | 168 +++++++++++++++++++++++++++ 4 files changed, 178 insertions(+) create mode 100644 drivers/spmi/spmi-apple-controller.c
MAINTAINERS +1 -0
@@ -2302,6 +2302,7 @@ F: drivers/pinctrl/pinctrl-apple-gpio.c F: drivers/pwm/pwm-apple.c F: drivers/soc/apple/* F: drivers/spi/spi-apple.c +F: drivers/spmi/spmi-apple-controller.c F: drivers/video/backlight/apple_dwi_bl.c F: drivers/watchdog/apple_wdt.c F: include/dt-bindings/interrupt-controller/apple-aic.h
drivers/spmi/Kconfig +8 -0
@@ -11,6 +11,14 @@ menuconfig SPMI if SPMI +config SPMI_APPLE + tristate "Apple SoC SPMI Controller platform driver" + depends on ARCH_APPLE || COMPILE_TEST + help + If you say yes to this option, support will be included for the + SPMI controller present on many Apple SoCs, including the + t8103 (M1) and t600x (M1 Pro/Max). + config SPMI_HISI3670 tristate "Hisilicon 3670 SPMI Controller" select IRQ_DOMAIN_HIERARCHY
drivers/spmi/Makefile +1 -0
@@ -4,6 +4,7 @@ # obj-$(CONFIG_SPMI) += spmi.o spmi-devres.o +obj-$(CONFIG_SPMI_APPLE) += spmi-apple-controller.o obj-$(CONFIG_SPMI_HISI3670) += hisi-spmi-controller.o obj-$(CONFIG_SPMI_MSM_PMIC_ARB) += spmi-pmic-arb.o obj-$(CONFIG_SPMI_MTK_PMIF) += spmi-mtk-pmif.o
drivers/spmi/spmi-apple-controller.c new file +168 -0
168 lines not on this page · raw message
Signature · 2 lines
https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git/ https://git.kernel.org/pub/scm/linux/kernel/git/sboyd/spmi.git
Stephen Boyd
maintainerPATCH 4/4 irqdomain: spmi: Switch to irq_domain_create_tree()
In reply to Stephen BoydFrom: "Jiri Slaby (SUSE)" <[email protected]>
irq_domain_add_tree() is going away as being obsolete now. Switch to the preferred irq_domain_create_tree(). That differs in the first
parameter: It takes more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the parameter.
Note some of the users can likely use dev->fwnode directly instead of indirect of_fwnode_handle(dev->of_node). But dev->fwnode is not guaranteed to be set for all, so this has to be investigated on case to case basis (by people who can actually test with the HW).
--- drivers/spmi/spmi-pmic-arb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/spmi/spmi-pmic-arb.c +1 -1
@@ -1737,7 +1737,7 @@ static int spmi_pmic_arb_bus_init(struct platform_device *pdev,dev_dbg (&pdev->dev,"adding irq domain for bus %d\n" , bus_index); - bus->domain =irq_domain_add_tree (node, &pmic_arb_irq_domain_ops, bus); + bus->domain =irq_domain_create_tree (of_fwnode_handle (node), &pmic_arb_irq_domain_ops, bus);if (!bus->domain) {dev_err (&pdev->dev,"unable to create irq_domain\n" );return -ENOMEM ;
Signature · 2 lines
https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git/ https://git.kernel.org/pub/scm/linux/kernel/git/sboyd/spmi.git