Re: [PATCH v1 1/2] dt-bindings: arm: qcom: Add waveshare MIPI-DSI panels support

From: Bjorn Andersson
Date: Mon Nov 17 2025 - 18:00:56 EST


On Tue, Nov 11, 2025 at 04:12:44PM +0530, Sudarshan Shetty wrote:
> Device tree bindings for Waveshare MIPI-DSI panels
> of various sizes (5.0, 5.5, 7.0, 8.0, and 10.1).
> These panels require proper power sequencing via an external
> regulator and a backlight node for brightness control.
>
> Signed-off-by: Sudarshan Shetty <tessolveupstream@xxxxxxxxx>
> ---
> .../display/panel/waveshare,dsi-panel.yaml | 84 +++++++++++++++++++
> ...waveshare,touchscreen-panel-regulator.yaml | 72 ++++++++++++++++
> 2 files changed, 156 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/display/panel/waveshare,dsi-panel.yaml
> create mode 100644 Documentation/devicetree/bindings/regulator/waveshare,touchscreen-panel-regulator.yaml
>
> diff --git a/Documentation/devicetree/bindings/display/panel/waveshare,dsi-panel.yaml b/Documentation/devicetree/bindings/display/panel/waveshare,dsi-panel.yaml
> new file mode 100644
> index 000000000000..a42ce065124f
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/panel/waveshare,dsi-panel.yaml
> @@ -0,0 +1,84 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/display/panel/waveshare,dsi-panel.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Waveshare 10.1" DSI Touch Display Panel
> +
> +maintainers:
> + - Sudarshan Shetty <tessolveupstream@xxxxxxxxx>
> +
> +allOf:
> + - $ref: panel-common.yaml#
> +
> +properties:
> + compatible:
> + enum:
> + - waveshare,12.3-dsi-touch-a,4lane
> + - waveshare,10.1-dsi-touch-a
> + - waveshare,10.1-dsi-touch-a-4lane
> + - waveshare,10.1-dsi-touch-b
> + - waveshare,10.1-dsi-touch-b,4lane
> + - waveshare,9.0-dsi-touch-b
> + - waveshare,9.0-dsi-touch-b,4lane
> + - waveshare,8.8-dsi-touch-a
> + - waveshare,8.0-dsi-touch-a
> + - waveshare,8.0-dsi-touch-a-4lane
> + - waveshare,7.0-dsi-touch-a
> + - waveshare,7.0-dsi-touch-b
> + - waveshare,5.5-dsi-touch-a
> + - waveshare,5.0-dsi-touch-a
> + - waveshare,4.0-dsi-touch-c
> + - waveshare,3.4-dsi-touch-c
> +
> + reg:
> + description: DSI virtual channel
> + maxItems: 1
> +
> + vdd-supply:
> + description: Power supply regulator for the panel
> +
> + reset-gpios:
> + maxItems: 1
> + description: GPIO to control panel reset
> +
> + enable-gpios:
> + maxItems: 1
> + description: GPIO to control panel power enable

If this is the correct description of this pin, then this should be a
regulator provided by the regulator node and it should likely have the
3.3V (and 5V?) listed as -supply.

> +
> +required:
> + - compatible
> + - reg
> + - vdd-supply
> + - reset-gpios
> + - enable-gpios
> +
> +unevaluatedProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/gpio/gpio.h>
> +
> + dsi@ae94000 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + panel@1 {
> + compatible = "waveshare,10.1-dsi-touch-a";
> + reg = <1>;
> + vdd-supply = <&vreg_l11a>;
> + reset-gpios = <&display_mcu 1 GPIO_ACTIVE_HIGH>;
> + enable-gpios = <&display_mcu 2 GPIO_ACTIVE_HIGH>;
> +
> + port {
> + panel_in: endpoint {
> + remote-endpoint = <&mdss_dsi0_out>;
> + };
> + };
> + };
> + };
> +
> + mdss_dsi0_out: endpoint {
> + remote-endpoint = <&panel_in>;
> + };
> diff --git a/Documentation/devicetree/bindings/regulator/waveshare,touchscreen-panel-regulator.yaml b/Documentation/devicetree/bindings/regulator/waveshare,touchscreen-panel-regulator.yaml
> new file mode 100644
> index 000000000000..be81be5d2d74
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/regulator/waveshare,touchscreen-panel-regulator.yaml
> @@ -0,0 +1,72 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/regulator/waveshare,touchscreen-panel-regulator.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Waveshare Touchscreen Panel Regulator
> +
> +maintainers:
> + - Sudarshan Shetty <tessolveupstream@xxxxxxxxx>
> +
> +description: |
> + Regulator driver for Waveshare touchscreen display units.
> + This regulator enables and disables panel power and provides
> + backlight control over I2C.
> +
> +properties:
> + compatible:
> + const: waveshare,touchscreen-panel-regulator
> +
> + reg:
> + maxItems: 1
> + description: I2C address of the regulator device
> +
> + vin-supply:
> + description: Input supply regulator for the panel

The Waveshare takes 3.3V and 5V inputs, which then is distributed to the
panel and the touch through some regulators controlled by the MCU that
this binding represents.

So I'm pretty sure we need one more supply, and we need better
descriptions of what they are.

> +
> + enable-gpios:
> + maxItems: 1
> + description: GPIO to enable/disable regulator

This too is a pin controlled by the MCU, i.e. provided by the entity you
describe by this node.

> +

The driver that you also posted, which should have been sent together
with the binding, registers a GPIO controller, so you need
"gpio-controller" and "#gpio-cells" here as well.

> +required:
> + - compatible
> + - reg
> + - vin-supply
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + /dts-v1/;
> + /plugin/;
> +
> + / {
> + #address-cells = <1>;
> + #size-cells = <1>;
> +
> + gpio: gpio-controller {
> + compatible = "test,gpio";
> + #gpio-cells = <2>;
> + };
> +
> + vdd_3v3: regulator {
> + compatible = "regulator-fixed";
> + regulator-name = "vdd_3v3";
> + regulator-min-microvolt = <3300000>;
> + regulator-max-microvolt = <3300000>;
> + };
> +
> + i2c@980000 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> + compatible = "test,i2c";
> +
> + panel-regulator@3c {
> + compatible = "waveshare,touchscreen-panel-regulator";
> + reg = <0x3c>;

Are you sure/ All the material I've found says it's 0x45

> + vin-supply = <&vdd_3v3>;
> + enable-gpios = <&gpio 2 0>; /* active high */
> + };
> + };

This example does not show how the waveshare,touchscreen-panel-regulator
should be added to a DeviceTree!

Based on how you wrote the driver, enable-gpios should point back into
panel-regulator itself. vin-supply

Regards,
Bjorn

> + };
> --
> 2.34.1
>