Skip to content

Commit 204ce5b

Browse files
committed
arm64: dts: qcom: qcs6490-radxa-dragon-q6a: add hardware version detection
Rework PM7325 GPIO pinctrl for hardware version selection. Add gpio-line-names, hardware_version_sel pin configuration, and hardware_version_adc VADC channel for board revision identification. Signed-off-by: Jiali Chen <chenjiali@radxa.com>
1 parent bf3c3f3 commit 204ce5b

1 file changed

Lines changed: 24 additions & 5 deletions

File tree

arch/arm64/boot/dts/qcom/qcs6490-radxa-dragon-q6a.dts

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -640,10 +640,24 @@
640640
};
641641

642642
&pm7325_gpios {
643-
pm7325_adc_default: adc-default-state {
644-
pins = "gpio2";
643+
pinctrl-0 = <&hardware_version_sel>;
644+
pinctrl-names = "default";
645+
gpio-line-names = "", /* GPIO_01 */
646+
"UFS_THERM",
647+
"Version_ADC",
648+
"",
649+
"",
650+
"KYPD_VOL_UP_N",
651+
"Version_SEL",
652+
"",
653+
"MICRO USB DET",
654+
"";
655+
656+
hardware_version_sel: hardware-version-sel-state {
657+
pins = "gpio7";
645658
function = PMIC_GPIO_FUNC_NORMAL;
646659
bias-high-impedance;
660+
power-source = <1>;
647661
};
648662
};
649663

@@ -685,9 +699,6 @@
685699
};
686700

687701
&pmk8350_vadc {
688-
pinctrl-0 = <&pm7325_adc_default>;
689-
pinctrl-names = "default";
690-
691702
channel@3 {
692703
reg = <PMK8350_ADC7_DIE_TEMP>;
693704
label = "pmk7325_die_temp";
@@ -732,6 +743,14 @@
732743
qcom,pre-scaling = <1 1>;
733744
label = "ufs_therm";
734745
};
746+
747+
channel@14b {
748+
reg = <PM7325_ADC7_GPIO2_100K_PU>;
749+
qcom,ratiometric;
750+
qcom,hw-settle-time = <200>;
751+
qcom,pre-scaling = <1 1>;
752+
label = "hardware_version_adc";
753+
};
735754
};
736755

737756
&pon_pwrkey {

0 commit comments

Comments
 (0)