arm64: dts: qcom: sa8295p-adp: add max20411
authorBjorn Andersson <andersson@kernel.org>
Thu, 25 Jan 2024 21:05:12 +0000 (13:05 -0800)
committerBjorn Andersson <andersson@kernel.org>
Tue, 30 Jan 2024 20:46:41 +0000 (14:46 -0600)
The SA8295P ADP has a MAX20411 LDO regulator on I2C 12, supplying the
VDD_GFX pads. Enable the bus and add the maxim,max20411 device on the
bus.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Link: https://lore.kernel.org/r/20240125-sa8295p-gpu-v4-6-7011c2a63037@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
arch/arm64/boot/dts/qcom/sa8295p-adp.dts

index fd253942e5e5cdc42f713459a4344081ca049841..bd0962f39fc540dab3d54e00ea332d52b80c7fad 100644 (file)
        status = "okay";
 };
 
+&i2c12 {
+       pinctrl-0 = <&qup1_i2c4_state>;
+       pinctrl-names = "default";
+
+       status = "okay";
+
+       vdd_gfx: regulator@39 {
+               compatible = "maxim,max20411";
+               reg = <0x39>;
+
+               regulator-min-microvolt = <800000>;
+               regulator-max-microvolt = <800000>;
+
+               enable-gpios = <&pmm8540a_gpios 2 GPIO_ACTIVE_HIGH>;
+
+               pinctrl-0 = <&max20411_en>;
+               pinctrl-names = "default";
+       };
+};
+
 &mdss0 {
        status = "okay";
 };
        status = "okay";
 };
 
+&qup1 {
+       status = "okay";
+};
+
 &qup2 {
        status = "okay";
 };
 
 /* PINCTRL */
 
+&pmm8540a_gpios {
+       max20411_en: max20411-en-state {
+               pins = "gpio2";
+               function = "normal";
+               output-enable;
+       };
+};
+
 &tlmm {
        pcie2a_default: pcie2a-default-state {
                clkreq-n-pins {
                        bias-pull-up;
                };
        };
+
+       qup1_i2c4_state: qup1-i2c4-state {
+               pins = "gpio0", "gpio1";
+               function = "qup12";
+               drive-strength = <2>;
+               bias-pull-up;
+       };
 };