Repository navigation
Multiple devices fail dtbs-check with missing regulators for nt36672a panel #125
Description
Activity
- addeddt-bindingsRelated to dtbs_check or dt_binding_check errors/warningsRelated to dtbs_check or dt_binding_check errors/warnings
on Sep 20, 2025 So in downstream dts panel supplies for all non-OLED panels are described in node https://github.com/LineageOS/android_kernel_xiaomi_sdm660/blob/lineage-18.1/arch/arm/boot/dts/qcom/sdm660-mdss-panels.dtsi#L32:
dsi_panel_pwr_supply: dsi_panel_pwr_supply { #address-cells = <1>; #size-cells = <0>; qcom,panel-supply-entry@0 { reg = <0>; qcom,supply-name = "wqhd-vddio"; qcom,supply-min-voltage = <1800000>; qcom,supply-max-voltage = <1950000>; qcom,supply-enable-load = <32000>; qcom,supply-disable-load = <80>; }; qcom,panel-supply-entry@1 { reg = <1>; qcom,supply-name = "lab"; qcom,supply-min-voltage = <4600000>; qcom,supply-max-voltage = <6000000>; qcom,supply-enable-load = <100000>; qcom,supply-disable-load = <100>; }; qcom,panel-supply-entry@2 { reg = <2>; qcom,supply-name = "ibb"; qcom,supply-min-voltage = <4600000>; qcom,supply-max-voltage = <6000000>; qcom,supply-enable-load = <100000>; qcom,supply-disable-load = <100>; qcom,supply-post-on-sleep = <10>; }; };which is refernced in
qcom,panel-supply-entries = ...under each panel node like hereThese nodes describe property names with phandles to regulators, and their voltage constraints to set to downstream display/panel driver to enable during probe.
Specific phandle references are not set on panel node, but on dsi controller node: https://github.com/LineageOS/android_kernel_xiaomi_sdm660/blob/lineage-18.1/arch/arm/boot/dts/qcom/sdm660-mdss.dtsi#L373 which are
wqhd-vddio-supply = <&pm660_l11>; vdda-3p3-supply = <&pm660l_l6>; lab-supply = <&lcdb_ldo_vreg>; ibb-supply = <&lcdb_ncp_vreg>;vdda-3p3akapm660l_l6is used only indsi_panel_pwr_supply_labibb_amoledwhich we can ignore here, since its unused.wqhd-vddioakapm660_l11akal11ais already specified.So we lack only
lab-supplyandibb-supplywhich reference the nodes inpm660l.dtsiunder https://github.com/LineageOS/android_kernel_xiaomi_sdm660/blob/lineage-20/arch/arm64/boot/dts/vendor/qcom/pm660l.dtsi#L267pm660l_lcdb: qpnp-lcdb@ec00 { compatible = "qcom,qpnp-lcdb-regulator"; #address-cells = <1>; #size-cells = <1>; reg = <0xec00 0x100>; interrupts = <0x3 0xec 0x1 IRQ_TYPE_EDGE_RISING>; interrupt-names = "sc-irq"; qcom,pmic-revid = <&pm660l_revid>; lcdb_ldo_vreg: ldo { label = "ldo"; regulator-name = "lcdb_ldo"; regulator-min-microvolt = <4000000>; regulator-max-microvolt = <6000000>; }; lcdb_ncp_vreg: ncp { label = "ncp"; regulator-name = "lcdb_ncp"; regulator-min-microvolt = <4000000>; regulator-max-microvolt = <6000000>; }; };these regulators are managed by driver https://github.com/LineageOS/android_kernel_xiaomi_sdm660/blob/lineage-20/drivers/regulator/qpnp-lcdb-regulator.c
looking at which its register layout matches closely the https://elixir.bootlin.com/linux/v6.16.8/source/drivers/regulator/qcom-labibb-regulator.c driver. I wonder if lcdb driver support could be added to existing labibb driver at mainline
Similarities (top lines from lcdb, after
...from labibb):#define LCDB_STS1_REG 0x08 ... #define REG_LABIBB_STATUS1 0x08 #define LABIBB_STATUS1_SC_BIT BIT(6) #define LABIBB_STATUS1_VREG_OK_BIT BIT(7)#define LCDB_BST_OUTPUT_VOLTAGE_REG 0x41 #define PM660_BST_OUTPUT_VOLTAGE_MASK GENMASK(4, 0) #define BST_OUTPUT_VOLTAGE_MASK GENMASK(5, 0) ... #define REG_LABIBB_VOLTAGE 0x41 #define LABIBB_VOLTAGE_OVERRIDE_EN BIT(7) #define LAB_VOLTAGE_SET_MASK GENMASK(3, 0) #define IBB_VOLTAGE_SET_MASK GENMASK(5, 0)#define LCDB_ENABLE_CTL1_REG 0x46 #define MODULE_EN_BIT BIT(7) #define HWEN_RDY_BIT BIT(6) ... #define REG_LABIBB_ENABLE_CTL 0x46 #define LABIBB_CONTROL_ENABLE BIT(7)#define LCDB_BST_ILIM_CTL_REG 0x4B #define EN_BST_ILIM_BIT BIT(7) #define SET_BST_ILIM_MASK GENMASK(2, 0) #define MIN_BST_ILIM_MA 200 #define MAX_BST_ILIM_MA 1600 ... #define REG_LABIBB_CURRENT_LIMIT 0x4b #define LAB_CURRENT_LIMIT_MASK GENMASK(2, 0) #define IBB_CURRENT_LIMIT_MASK GENMASK(4, 0) #define LAB_CURRENT_LIMIT_OVERRIDE_EN BIT(3) #define LABIBB_CURRENT_LIMIT_EN BIT(7)similar, but not quite.. perhaps just similar hardware?
I've added some debug patch to downstream android kernel and booted LineageOS with it to see the logs directly from device running android:
lavender:/ # dmesg -w | grep -i LCDB [ 0.136420] LCDB: qpnp_lcdb_parse_dt: Unable to get revid data [ 0.136429] LCDB: qpnp_lcdb_regulator_probe: Failed to parse dt rc=-517 [ 0.254773] LCDB: qpnp_lcdb_parse_dt: Unable to get revid data [ 0.254781] LCDB: qpnp_lcdb_regulator_probe: Failed to parse dt rc=-517 [ 0.273921] LCDB: qpnp_lcdb_parse_dt: Unable to get revid data [ 0.273949] LCDB: qpnp_lcdb_regulator_probe: Failed to parse dt rc=-517 [ 0.281318] LCDB: qpnp_lcdb_parse_dt: Unable to get revid data [ 0.281322] LCDB: qpnp_lcdb_regulator_probe: Failed to parse dt rc=-517 [ 0.358821] LCDB: qpnp_lcdb_pmic_config: LCDB wa_flags = 0x 0 [ 0.358926] LCDB: qpnp_lcdb_get_voltage: LDO voltage read-back = 5400 mv (0x71 = 0x13) [ 0.359075] LCDB: qpnp_lcdb_get_voltage: LDO voltage read-back = 5400 mv (0x71 = 0x13) [ 0.359140] LCDB: qpnp_lcdb_get_voltage: LDO voltage read-back = 5400 mv (0x71 = 0x13) [ 0.359440] LCDB: qpnp_lcdb_get_voltage: NCP voltage read-back = 5400 mv (0x81 = 0x13) [ 0.359505] LCDB: qpnp_lcdb_get_voltage: NCP voltage read-back = 5400 mv (0x81 = 0x13) [ 0.359553] LCDB: qpnp_lcdb_get_voltage: NCP voltage read-back = 5400 mv (0x81 = 0x13) [ 0.359991] LCDB: qpnp_lcdb_regulator_probe: LCDB module successfully registered! lcdb_en=1 ldo_voltage=5400mV ncp_voltage=5400mV bst_voltage=5500mV [ 34.037618] LCDB: qpnp_lcdb_disable: LCDB disabled [ 60.364955] LCDB: qpnp_lcdb_enable: lcdb enabled successfully! [ 63.603630] LCDB: qpnp_lcdb_disable: LCDB disabled [ 66.242101] LCDB: qpnp_lcdb_enable: lcdb enabled successfully! [ 70.428242] LCDB: qpnp_lcdb_disable: LCDB disabled [ 73.875410] LCDB: qpnp_lcdb_enable: lcdb enabled successfully! [ 77.679792] LCDB: qpnp_lcdb_disable: LCDB disabledThe last few lines with enabled/disabled come from me turning screen on/off and indeed we see downstream actually using this regulator and is turning it off when screen is turning off.
- added a commit that references this issue
on May 3, 2026
Choose one of
sdm660-xiaomi-common.dtsifor that)