]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
arm64: dts: allwinner: sun55i: Complete AXP717A sub-functions
authorChen-Yu Tsai <wens@csie.org>
Sat, 13 Sep 2025 17:35:11 +0000 (01:35 +0800)
committerChen-Yu Tsai <wens@csie.org>
Sun, 14 Sep 2025 16:04:32 +0000 (00:04 +0800)
When the AXP717A PMIC is missing nodes for the sub-functions, the kernel
complains about not found nodes.

Add all the remaining nodes corresponding to the defined functions for
the dev boards, which have publicly available schematics to base this
change on. The battery charger on all of them are disabled. Also add
an "iio-hwmon" node to express some of the ADC channels as hwmon
sensors.

Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Link: https://patch.msgid.link/20250913173511.4064176-1-wens@kernel.org
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts
arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dts
arch/arm64/boot/dts/allwinner/sun55i-t527-orangepi-4a.dts

index 514c221a7a866b92b4e568870fb8552cf19de9a5..f82a8d12169789abac6d2aacf3a0b0a52b2c06e7 100644 (file)
                };
        };
 
+       iio-hwmon {
+               compatible = "iio-hwmon";
+               io-channels = <&axp717_adc 3>, /* vsys_v */
+                             <&axp717_adc 4>; /* pmic_temp */
+       };
+
        reg_vcc5v: vcc5v {
                /* board wide 5V supply from the USB-C connector */
                compatible = "regulator-fixed";
                bldoin-supply = <&reg_vcc5v>;
                cldoin-supply = <&reg_vcc5v>;
 
+               axp717_adc: adc {
+                       compatible = "x-powers,axp717-adc";
+                       #io-channel-cells = <1>;
+               };
+
+               battery-power {
+                       compatible = "x-powers,axp717-battery-power-supply";
+                       /* charger mode design but has no battery terminal */
+                       status = "disabled";
+               };
+
                regulators {
                        /* Supplies the "little" cluster (1.4 GHz cores) */
                        reg_dcdc1: dcdc1 {
                                regulator-name = "vdd-cpus";
                        };
                };
+
+               usb-power {
+                       compatible = "x-powers,axp717-usb-power-supply";
+               };
        };
 
        axp323: pmic@36 {
index 4e71055fbd159d68e09182a7eab35322f67566fe..1b054fa8ef74f13ee10b0c6c746bcd33d2de2dbd 100644 (file)
                clock-output-names = "ext_osc32k";
        };
 
+       iio-hwmon {
+               compatible = "iio-hwmon";
+               io-channels = <&axp717_adc 3>, /* vsys_v */
+                             <&axp717_adc 4>; /* pmic_temp */
+       };
+
        reg_vcc12v: vcc12v {
                /* DC input jack */
                compatible = "regulator-fixed";
                bldoin-supply = <&reg_vcc5v>;
                cldoin-supply = <&reg_vcc5v>;
 
+               axp717_adc: adc {
+                       compatible = "x-powers,axp717-adc";
+                       #io-channel-cells = <1>;
+               };
+
+               battery-power {
+                       compatible = "x-powers,axp717-battery-power-supply";
+                       /* no battery; output used for dcdc4 instead */
+                       status = "disabled";
+               };
+
                regulators {
                        /* Supplies the "little" cluster (1.4 GHz cores) */
                        reg_dcdc1: dcdc1 {
                                regulator-name = "vdd-cpus";
                        };
                };
+
+               usb-power {
+                       compatible = "x-powers,axp717-usb-power-supply";
+                       /* 12V-5V buck converter can supply up to 5A */
+                       input-current-limit-microamp = <3250000>;
+               };
        };
 
        axp323: pmic@36 {
index b5483bd7b8d5d15368b102be3cc25ab17534249e..39a4e194712a285608cb0d6f67ce43a55c7b087b 100644 (file)
                };
        };
 
+       iio-hwmon {
+               compatible = "iio-hwmon";
+               io-channels = <&axp717_adc 3>, /* vsys_v */
+                             <&axp717_adc 4>, /* pmic_temp */
+                             <&axp717_adc 7>; /* bkup_batt_v */
+       };
+
        wifi_pwrseq: pwrseq {
                compatible = "mmc-pwrseq-simple";
                reset-gpios = <&r_pio 1 1 GPIO_ACTIVE_LOW>; /* PM1 */
                bldoin-supply = <&reg_vcc5v>;
                cldoin-supply = <&reg_vcc5v>;
 
+               axp717_adc: adc {
+                       compatible = "x-powers,axp717-adc";
+                       #io-channel-cells = <1>;
+               };
+
+               battery-power {
+                       compatible = "x-powers,axp717-battery-power-supply";
+                       /* no battery; output used for dcdc4 instead */
+                       status = "disabled";
+               };
+
                regulators {
                        /* Supplies the "little" cluster (1.4 GHz cores) */
                        reg_dcdc1: dcdc1 {
                                regulator-name = "vdd-cpus-usb-0v9";
                        };
                };
+
+               usb-power {
+                       compatible = "x-powers,axp717-usb-power-supply";
+                       input-current-limit-microamp = <3000000>;
+               };
        };
 
        axp323: pmic@36 {