ARM: dts: imx7d-remarkable2: Enable the rohm,bd71815
authorAlistair Francis <alistair@alistair23.me>
Mon, 27 Feb 2023 04:50:23 +0000 (14:50 +1000)
committerShawn Guo <shawnguo@kernel.org>
Tue, 14 Mar 2023 03:00:33 +0000 (11:00 +0800)
Add support for the rohm,bd71815 power controller controller for the
reMarkable 2.

Signed-off-by: Alistair Francis <alistair@alistair23.me>
Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
arch/arm/boot/dts/imx7d-remarkable2.dts

index 288fc86..dc954e4 100644 (file)
        };
 };
 
+&cpu0 {
+       cpu-supply = <&buck1>;
+};
+
 &clks {
        assigned-clocks = <&clks IMX7D_CLKO2_ROOT_SRC>,
                          <&clks IMX7D_CLKO2_ROOT_DIV>;
        };
 };
 
+&i2c2 {
+       clock-frequency = <100000>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_i2c2>;
+       status = "okay";
+
+       bd71815: pmic@4b {
+               compatible = "rohm,bd71815";
+               reg = <0x4b>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_bd71815>;
+               interrupt-parent = <&gpio6>; /* PMIC_INT_B GPIO6_IO16 */
+               interrupts = <16 IRQ_TYPE_LEVEL_LOW>;
+               gpio-controller;
+               clocks = <&clks IMX7D_CLKO2_ROOT_SRC>;
+               clock-output-names = "bd71815-32k-out";
+               #clock-cells = <0>;
+               #gpio-cells = <2>;
+
+               regulators {
+                       buck1: buck1 {
+                               regulator-name = "buck1";
+                               regulator-min-microvolt = <800000>;
+                               regulator-max-microvolt = <2000000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                               regulator-ramp-delay = <1250>;
+                       };
+
+                       buck2: buck2 {
+                               regulator-name = "buck2";
+                               regulator-min-microvolt = <800000>;
+                               regulator-max-microvolt = <2000000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                               regulator-ramp-delay = <1250>;
+                       };
+
+                       buck3: buck3 {
+                               regulator-name = "buck3";
+                               regulator-min-microvolt = <1200000>;
+                               regulator-max-microvolt = <2700000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       buck4: buck4 {
+                               regulator-name = "buck4";
+                               regulator-min-microvolt = <1100000>;
+                               regulator-max-microvolt = <1850000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       buck5: buck5 {
+                               regulator-name = "buck5";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       ldo1: ldo1 {
+                               regulator-name = "ldo1";
+                               regulator-min-microvolt = <800000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       ldo2: ldo2 {
+                               regulator-name = "ldo2";
+                               regulator-min-microvolt = <800000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       ldo3: ldo3 {
+                               regulator-name = "ldo3";
+                               regulator-min-microvolt = <800000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       ldo4: ldo4 {
+                               regulator-name = "ldo4";
+                               regulator-min-microvolt = <800000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       ldo5: ldo5 {
+                               regulator-name = "ldo5";
+                               regulator-min-microvolt = <800000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       ldo6: ldodvref {
+                               regulator-name = "ldodvref";
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       ldo7: ldolpsr {
+                               regulator-name = "ldolpsr";
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       boost: wled {
+                               regulator-name = "wled";
+                               regulator-min-microamp = <10>;
+                               regulator-max-microamp = <25000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+               };
+       };
+};
+
 &i2c3 {
        clock-frequency = <100000>;
        pinctrl-names = "default";
 };
 
 &iomuxc {
+       pinctrl_bd71815: bd71815grp {
+               fsl,pins = <
+                       MX7D_PAD_SAI1_RX_SYNC__GPIO6_IO16       0x59
+               >;
+       };
+
        pinctrl_brcm_reg: brcmreggrp {
                fsl,pins = <
                        /* WIFI_PWR_EN */
                >;
        };
 
+       pinctrl_i2c2: i2c2grp {
+               fsl,pins = <
+                       MX7D_PAD_I2C2_SDA__I2C2_SDA             0x4000007f
+                       MX7D_PAD_I2C2_SCL__I2C2_SCL             0x4000007f
+               >;
+       };
+
        pinctrl_i2c3: i2c3grp {
                fsl,pins = <
                        MX7D_PAD_I2C3_SDA__I2C3_SDA             0x4000007f