]> git.dujemihanovic.xyz Git - linux.git/commitdiff
DONOTMERGE: add 88pm88x DT bindings
authorKarel Balej <balejk@matfyz.cz>
Mon, 14 Aug 2023 16:58:13 +0000 (18:58 +0200)
committerDuje Mihanović <duje.mihanovic@skole.hr>
Mon, 18 Dec 2023 21:07:45 +0000 (22:07 +0100)
arch/arm64/boot/dts/marvell/88pm886.dtsi [new file with mode: 0644]
arch/arm64/boot/dts/marvell/88pm88x.dtsi [new file with mode: 0644]
arch/arm64/boot/dts/marvell/pxa1908-samsung-coreprimevelte.dts

diff --git a/arch/arm64/boot/dts/marvell/88pm886.dtsi b/arch/arm64/boot/dts/marvell/88pm886.dtsi
new file mode 100644 (file)
index 0000000..084e922
--- /dev/null
@@ -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 (file)
index 0000000..39f3943
--- /dev/null
@@ -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;
+       };
+};
index 04fb0566ed2bce3bc48884674232d0a4f8fe86a2..9c5ea2aa4278bc167f5a41368f8a1110417d4ac6 100644 (file)
@@ -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>;
 
 &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 {
        bus-width = <4>;
        wp-inverted;
 };
+#include "88pm886.dtsi"
+#include "88pm88x.dtsi"