pmaports/device/testing/linux-samsung-coreprimevelte-mainline/0020-DONOTMERGE-add-88pm88x-DT-bindings.patch
Duje Mihanović 7a80409e7e
linux-samsung-coreprimevelte-mainline: upgrade to 6.6_rc3 (MR 4440)
Also enables touchscreen with downstream PMIC driver.
2023-10-01 22:18:18 -07:00

306 lines
7.5 KiB
Diff

From 8cde8feee2afae8f509b52ec14474a51a72a8991 Mon Sep 17 00:00:00 2001
From: Karel Balej <balejk@matfyz.cz>
Date: Mon, 14 Aug 2023 18:58:13 +0200
Subject: [PATCH] DONOTMERGE: add 88pm88x DT bindings
---
arch/arm64/boot/dts/marvell/88pm886.dtsi | 151 ++++++++++++++++++
arch/arm64/boot/dts/marvell/88pm88x.dtsi | 66 ++++++++
.../pxa1908-samsung-coreprimevelte.dts | 39 +++++
3 files changed, 256 insertions(+)
create mode 100644 arch/arm64/boot/dts/marvell/88pm886.dtsi
create mode 100644 arch/arm64/boot/dts/marvell/88pm88x.dtsi
diff --git a/arch/arm64/boot/dts/marvell/88pm886.dtsi b/arch/arm64/boot/dts/marvell/88pm886.dtsi
new file mode 100644
index 000000000000..084e922f4e4c
--- /dev/null
+++ b/arch/arm64/boot/dts/marvell/88pm886.dtsi
@@ -0,0 +1,151 @@
+/*
+ * Copyright (C) 2014 Marvell
+ * Yi Zhang <yizhang@marvell.com>
+ */
+
+/*
+ * Integrated Power Management Chip
+ * header file for Marvell PMIC: 88pm886
+ */
+
+&pmic0 {
+ compatible = "marvell,88pm886";
+ /* ---buck--- */
+ vccmain: regulator-buck1 {
+ compatible = "marvell,88pm886-buck1";
+ regulator-min-microvolt = <600000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+ buck2: regulator-buck2 {
+ compatible = "marvell,88pm886-buck2";
+ regulator-min-microvolt = <600000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+ vddr: regulator-buck3 {
+ compatible = "marvell,88pm886-buck3";
+ regulator-min-microvolt = <600000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+ buck4: regulator-buck4 {
+ compatible = "marvell,88pm886-buck4";
+ regulator-min-microvolt = <600000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+ buck5: regulator-buck5 {
+ compatible = "marvell,88pm886-buck5";
+ regulator-min-microvolt = <600000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ /* ---ldo--- */
+ /*
+ ldo1: regulator-ldo1 {
+ compatible = "marvell,88pm886-ldo1";
+ regulator-min-microvolt = <1700000>;
+ regulator-max-microvolt = <3300000>;
+ };
+ */
+ ldo2: regulator-ldo2 {
+ compatible = "marvell,88pm886-ldo2";
+ regulator-min-microvolt = <1700000>;
+ regulator-max-microvolt = <3300000>;
+ };
+ /*
+ ldo3: regulator-ldo3 {
+ compatible = "marvell,88pm886-ldo3";
+ regulator-min-microvolt = <1700000>;
+ regulator-max-microvolt = <3300000>;
+ };
+ ldo4: regulator-ldo4 {
+ compatible = "marvell,88pm886-ldo4";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <3300000>;
+ };
+ ldo5: regulator-ldo5 {
+ compatible = "marvell,88pm886-ldo5";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <3300000>;
+ };
+ ldo6: regulator-ldo6 {
+ compatible = "marvell,88pm886-ldo6";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <3300000>;
+ };
+ ldo7: regulator-ldo7 {
+ compatible = "marvell,88pm886-ldo7";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <3300000>;
+ };
+ ldo8: regulator-ldo8 {
+ compatible = "marvell,88pm886-ldo8";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <3300000>;
+ };
+ ldo9: regulator-ldo9 {
+ compatible = "marvell,88pm886-ldo9";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <3300000>;
+ };
+ ldo10: regulator-ldo10 {
+ compatible = "marvell,88pm886-ldo10";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <3300000>;
+ };
+ ldo11: regulator-ldo11 {
+ compatible = "marvell,88pm886-ldo11";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <3300000>;
+ };
+ ldo12: regulator-ldo12 {
+ compatible = "marvell,88pm886-ldo12";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <3300000>;
+ };
+ ldo13: regulator-ldo13 {
+ compatible = "marvell,88pm886-ldo13";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <3300000>;
+ };
+ ldo14: regulator-ldo14 {
+ compatible = "marvell,88pm886-ldo14";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <3300000>;
+ };
+ ldo15: regulator-ldo15 {
+ compatible = "marvell,88pm886-ldo15";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <3300000>;
+ };
+ ldo16: regulator-ldo16 {
+ compatible = "marvell,88pm886-ldo16";
+ regulator-min-microvolt = <1700000>;
+ regulator-max-microvolt = <2800000>;
+ };
+ */
+
+ /* virtual regulator */
+ buck1slp: regulator-buck1-slp {
+ compatible = "marvell,88pm886-buck1-slp";
+ regulator-min-microvolt = <600000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-always-on;
+ regulator-boot-on;
+ marvell,consumer-supplies = "buck1slp", "nameless";
+ };
+
+ gpadc: gpadc{
+ compatible = "marvell,88pm886-gpadc";
+ #io-channel-cells = <1>;
+ io-channel-ranges;
+ };
+};
diff --git a/arch/arm64/boot/dts/marvell/88pm88x.dtsi b/arch/arm64/boot/dts/marvell/88pm88x.dtsi
new file mode 100644
index 000000000000..39f3943b9f6c
--- /dev/null
+++ b/arch/arm64/boot/dts/marvell/88pm88x.dtsi
@@ -0,0 +1,66 @@
+/*
+ * Copyright (C) 2014 Marvell
+ * Yi Zhang <yizhang@marvell.com>
+ */
+
+/*
+ * Integrated Power Management Chip
+ * common header file for Marvell PMIC: 88pm88x
+ */
+
+&pmic0 {
+ interrupt-controller;
+ #interrupt-cells = <1>;
+
+ marvell,88pm88x-irq-write-clear;
+
+ onkey {
+ compatible = "marvell,88pm88x-onkey";
+ /* marvell,pm886-onkey-gpio-number = <1>; */
+ };
+
+ vbus {
+ compatible = "marvell,88pm88x-vbus";
+ };
+
+ rtc {
+ compatible = "marvell,88pm88x-rtc";
+ };
+
+ charger {
+ compatible = "marvell,88pm88x-charger";
+ };
+
+ battery {
+ compatible = "marvell,88pm88x-battery";
+ };
+
+ dvc {
+ compatible = "marvell,88pm88x-dvc";
+ };
+
+ headset {
+ compatible = "marvell,88pm88x-headset";
+ status = "disabled";
+ };
+
+ led {
+ compatible = "marvell,88pm88x-leds";
+ };
+
+ red: led-rgb0 {
+ compatible = "marvell,88pm88x-rgb0";
+ };
+ green: led-rgb1 {
+ compatible = "marvell,88pm88x-rgb1";
+ };
+ blue: led-rgb2 {
+ compatible = "marvell,88pm88x-rgb2";
+ };
+
+ gpadc: gpadc{
+ compatible = "marvell,88pm88x-gpadc";
+ #io-channel-cells = <1>;
+ io-channel-ranges;
+ };
+};
diff --git a/arch/arm64/boot/dts/marvell/pxa1908-samsung-coreprimevelte.dts b/arch/arm64/boot/dts/marvell/pxa1908-samsung-coreprimevelte.dts
index bd69358fd069..b1ae358c5778 100644
--- a/arch/arm64/boot/dts/marvell/pxa1908-samsung-coreprimevelte.dts
+++ b/arch/arm64/boot/dts/marvell/pxa1908-samsung-coreprimevelte.dts
@@ -2,6 +2,8 @@
#include "pxa1908.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/linux-event-codes.h>
+// FIXME
+#define IRQF_TRIGGER_HIGH 0x00000004
/ {
pxa,rev-id = <3928 2>;
@@ -305,6 +307,41 @@ &twsi1 {
&twsi2 {
status = "okay";
+ pmic0: 88pm886@30 {
+ compatible = "marvell,88pm886";
+ reg = <0x30>;
+ interrupts = <0 4 IRQF_TRIGGER_HIGH>;
+ interrupt-parent = <&gic>;
+ interrupt-controller;
+ #interrupt-cells = <1>;
+
+ marvell,88pm88x-irq-write-clear;
+
+ onkey {
+ marvell,pm88x-onkey-gpio-number = <0>;
+ };
+
+ vbus {
+ gpadc-number = <1>;
+ };
+
+ battery {
+ bat-software-battery-detection;
+ /* bat-ntc-support; */
+ bat-ntc-support;
+ gpadc-det-no = <2>;
+ gpadc-temp-no = <3>;
+ };
+ };
+ pmic2: 88pm860@38 {
+ compatible = "marvell,88pm860";
+ reg = <0x38>;
+ marvell,pmic-type = <1>;
+ pm860_codec: pm860_codec {
+ compatible = "marvell,88pm860-codec";
+ #dailink-cells = <1>;
+ };
+ };
};
&twsi3 {
@@ -342,3 +379,5 @@ &sdh0 {
bus-width = <4>;
wp-inverted;
};
+#include "88pm886.dtsi"
+#include "88pm88x.dtsi"
--
2.42.0