Re: Safety of opening up /dev/dma_heap/* to physically present users (udev uaccess tag) ?

2024-05-07 Thread Bryan O'Donoghue

On 07/05/2024 16:09, Dmitry Baryshkov wrote:

Ah, I see. Then why do you require the DMA-ble buffer at all? If you are
providing data to VPU or DRM, then you should be able to get the buffer
from the data-consuming device.


Because we don't necessarily know what the consuming device is, if any.

Could be VPU, could be Zoom/Hangouts via pipewire, could for argument 
sake be GPU or DSP.


Also if we introduce a dependency on another device to allocate the 
output buffers - say always taking the output buffer from the GPU, then 
we've added another dependency which is more difficult to guarantee 
across different arches.


---
bod


Re: [PATCH 07/10] arm64: dts: qcom: sm8550: Update EAS properties

2024-04-24 Thread Bryan O'Donoghue

On 24/04/2024 16:29, Xilin Wu via B4 Relay wrote:

From: Xilin Wu 

The original values provided by Qualcomm appear to be quite
inaccurate. Specifically, some heavy gaming tasks could be
improperly assigned to the A510 cores by the scheduler, resulting
in a CPU bottleneck. This update to the EAS properties aims to
enhance the user experience across various scenarios.

The power numbers were obtained using a Type-C power meter, which
was directly connected to the battery connector on the AYN Odin 2
motherboard, acting as a fake battery.

It should be noted that the A715 cores seem less efficient than the
A710 cores. Therefore, an average value has been assigned to them,
considering that the A715 and A710 cores share a single cpufreq
domain.

Cortex-A510 cores:
441 kHz, 564 mV, 43 mW, 350 Cx
556 kHz, 580 mV, 59 mW, 346 Cx
672 kHz, 592 mV, 71 mW, 312 Cx
787 kHz, 604 mV, 83 mW, 290 Cx
902 kHz, 608 mV, 96 mW, 288 Cx
1017 kHz, 624 mV, 107 mW, 264 Cx
1113 kHz, 636 mV, 117 mW, 252 Cx
1228 kHz, 652 mV, 130 mW, 240 Cx
1344 kHz, 668 mV, 146 mW, 235 Cx
1459 kHz, 688 mV, 155 mW, 214 Cx
1555 kHz, 704 mV, 166 mW, 205 Cx
1670 kHz, 724 mV, 178 mW, 192 Cx
1785 kHz, 744 mV, 197 mW, 189 Cx
1900 kHz, 764 mV, 221 mW, 190 Cx
2016 kHz, 784 mV, 243 mW, 188 Cx
Your dynamic-power-coefficient for cpu 1: 251


This looks pretty convincing and like good work.

A few questions and suggestions for your commit log.

I'd really love to know more about how you ran this test. What values 
exactly does your power meter give you?


How did you lock the core to a specific CPU frequency ?

Maybe also give the equation to calculate Pdyn in the commit log.

https://patchwork.kernel.org/project/linux-arm-kernel/patch/1500974575-2244-1-git-send-email-...@rock-chips.com/#20763985

---
bod


Re: [PATCH 04/10] drm/panel: Add driver for Synaptics TD4328 LCD panel

2024-04-24 Thread Bryan O'Donoghue

On 24/04/2024 16:29, Xilin Wu via B4 Relay wrote:

From: Xilin Wu 

Add support for the 1920x1080 LCD panel driven by the Synaptics
TD4328 IC, as found on AYN Odin 2.

Co-developed-by: Junhao Xie 
Signed-off-by: Junhao Xie 
Signed-off-by: Xilin Wu 


checkpatch.pl --strict somepatch

CHECK: Alignment should match open parenthesis
#207: FILE: drivers/gpu/drm/panel/panel-synaptics-td4328.c:150:
+static int td4328_get_modes(struct drm_panel *panel,
+struct drm_connector *connector)

total: 0 errors, 2 warnings, 1 checks, 269 lines checked

---
bod


Re: [PATCH 02/10] pwm: Add SI-EN SN3112 PWM support

2024-04-24 Thread Bryan O'Donoghue

On 24/04/2024 16:29, Xilin Wu via B4 Relay wrote:

From: Junhao Xie 

Add a new driver for the SI-EN SN3112 12-channel 8-bit PWM LED controller.

Signed-off-by: Junhao Xie 
---
  drivers/pwm/Kconfig  |  10 ++
  drivers/pwm/Makefile |   1 +
  drivers/pwm/pwm-sn3112.c | 336 +++
  3 files changed, 347 insertions(+)

diff --git a/drivers/pwm/Kconfig b/drivers/pwm/Kconfig
index 1dd7921194f5..e21c37c7991e 100644
--- a/drivers/pwm/Kconfig
+++ b/drivers/pwm/Kconfig
@@ -553,6 +553,16 @@ config PWM_SL28CPLD
  To compile this driver as a module, choose M here: the module
  will be called pwm-sl28cpld.
  
+config PWM_SN3112

+   tristate "SI-EN SN3112 PWM driver"
+   depends on I2C
+   select REGMAP_I2C
+   help
+ Generic PWM framework driver for SI-EN SN3112 LED controller.
+
+ To compile this driver as a module, choose M here: the module
+ will be called pwm-sn3112.
+
  config PWM_SPEAR
tristate "STMicroelectronics SPEAr PWM support"
depends on PLAT_SPEAR || COMPILE_TEST
diff --git a/drivers/pwm/Makefile b/drivers/pwm/Makefile
index 90913519f11a..6aab2d113159 100644
--- a/drivers/pwm/Makefile
+++ b/drivers/pwm/Makefile
@@ -50,6 +50,7 @@ obj-$(CONFIG_PWM_RZ_MTU3) += pwm-rz-mtu3.o
  obj-$(CONFIG_PWM_SAMSUNG) += pwm-samsung.o
  obj-$(CONFIG_PWM_SIFIVE)  += pwm-sifive.o
  obj-$(CONFIG_PWM_SL28CPLD)+= pwm-sl28cpld.o
+obj-$(CONFIG_PWM_SN3112)   += pwm-sn3112.o
  obj-$(CONFIG_PWM_SPEAR)   += pwm-spear.o
  obj-$(CONFIG_PWM_SPRD)+= pwm-sprd.o
  obj-$(CONFIG_PWM_STI) += pwm-sti.o
diff --git a/drivers/pwm/pwm-sn3112.c b/drivers/pwm/pwm-sn3112.c
new file mode 100644
index ..38ef948602a3
--- /dev/null
+++ b/drivers/pwm/pwm-sn3112.c
@@ -0,0 +1,336 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Driver for SN3112 12-channel 8-bit PWM LED controller
+ *
+ * Copyright (c) 2024 Junhao Xie 
+ *
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 


Includes should be alphabetised


+
+#define SN3112_CHANNELS 12
+#define SN3112_REG_ENABLE 0x00
+#define SN3112_REG_PWM_VAL 0x04
+#define SN3112_REG_PWM_EN 0x13
+#define SN3112_REG_APPLY 0x16
+#define SN3112_REG_RESET 0x17
+
+struct sn3112 {
+   struct device *pdev;
+   struct regmap *regmap;
+   struct mutex lock;
+   struct regulator *vdd;
+   uint8_t pwm_val[SN3112_CHANNELS];
+   uint8_t pwm_en_reg[3];
+   bool pwm_en[SN3112_CHANNELS];
+#if IS_ENABLED(CONFIG_GPIOLIB)
+   struct gpio_desc *sdb;
+#endif
+};
+
+static int sn3112_write_reg(struct sn3112 *priv, unsigned int reg,
+   unsigned int val)
+{
+   int err;
+
+   dev_dbg(priv->pdev, "request regmap_write 0x%x 0x%x\n", reg, val);
+   err = regmap_write(priv->regmap, reg, val);
+   if (err)
+   dev_warn_ratelimited(
+   priv->pdev,
+   "regmap_write to register 0x%x failed: %pe\n", reg,
+   ERR_PTR(err));


Multi-line should be encapsulated in {}

if (err) {
stuff
goes here
}


+   return err;
+}
+
+static int sn3112_set_en_reg(struct sn3112 *priv, unsigned int channel,
+bool enabled, bool write)
+{
+   unsigned int reg, bit;
+
+   if (channel >= SN3112_CHANNELS)
+   return -EINVAL;
+
+   /* LED_EN1: BIT5:BIT3 = OUT3:OUT1 */
+   if (channel >= 0 && channel <= 2)
+   reg = 0, bit = channel + 3;
+   /* LED_EN2: BIT5:BIT0 = OUT9:OUT4 */
+   else if (channel >= 3 && channel <= 8)
+   reg = 1, bit = channel - 3;
+   /* LED_EN3: BIT2:BIT0 = OUT12:OUT10 */
+   else if (channel >= 9 && channel <= 11)
+   reg = 2, bit = channel - 9;
+   else
+   return -EINVAL;
+
+   dev_dbg(priv->pdev, "channel %u enabled %u\n", channel, enabled);
+   dev_dbg(priv->pdev, "reg %u bit %u\n", reg, bit);
+   if (enabled)
+   set_bit(bit, (ulong *)>pwm_en_reg[reg]);
+   else
+   clear_bit(bit, (ulong *)>pwm_en_reg[reg]);
+   dev_dbg(priv->pdev, "set enable reg %u to %u\n", reg,
+   priv->pwm_en_reg[reg]);
+
+   if (!write)
+   return 0;

newline

+   return sn3112_write_reg(priv, SN3112_REG_PWM_EN + reg,
+   priv->pwm_en_reg[reg]);
+}
+
+static int sn3112_set_val_reg(struct sn3112 *priv, unsigned int channel,
+ uint8_t val, bool write)
+{
+   if (channel >= SN3112_CHANNELS)
+   return -EINVAL;

newline

+   priv->pwm_val[channel] = val;
+   dev_dbg(priv->pdev, "set value reg %u to %u\n", channel,
+   priv->pwm_val[channel]);
+
+   if (!write)
+   return 0;

newline

+   return sn3112_write_reg(priv, SN3112_REG_PWM_VAL + channel,
+  

Re: [PATCH 09/10] dt-bindings: arm: qcom: Add AYN Odin 2

2024-04-24 Thread Bryan O'Donoghue

On 24/04/2024 16:29, Xilin Wu via B4 Relay wrote:

From: Xilin Wu 

This documents AYN Odin 2 which is a gaming handheld by AYN based on
the QCS8550 SoC.

Signed-off-by: Xilin Wu 
---
  Documentation/devicetree/bindings/arm/qcom.yaml | 1 +
  1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/arm/qcom.yaml 
b/Documentation/devicetree/bindings/arm/qcom.yaml
index 090fc5fda9b0..8e991f2bd9d8 100644
--- a/Documentation/devicetree/bindings/arm/qcom.yaml
+++ b/Documentation/devicetree/bindings/arm/qcom.yaml
@@ -1003,6 +1003,7 @@ properties:
  
- items:

- enum:
+  - ayn,odin2
- qcom,qcs8550-aim300-aiot
- const: qcom,qcs8550-aim300
- const: qcom,qcs8550



Doesn't apply to -next

Patch failed at 0009 dt-bindings: arm: qcom: Add AYN Odin 2
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
error: patch failed: Documentation/devicetree/bindings/arm/qcom.yaml:1003
error: Documentation/devicetree/bindings/arm/qcom.yaml: patch does not apply
hint: Use 'git am --show-current-patch=diff' to see the failed patch



Re: [PATCH 3/3] drm/bridge: Return NULL instead of plain 0 in drm_dp_hpd_bridge_register() stub

2023-12-05 Thread Bryan O'Donoghue

On 05/12/2023 21:13, Nathan Chancellor wrote:

sparse complains:

   drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c: note: in included file:
   include/drm/bridge/aux-bridge.h:29:16: sparse: sparse: Using plain integer 
as NULL pointer

Return NULL to clear up the warning.

Reported-by: kernel test robot 
Closes: 
https://lore.kernel.org/oe-kbuild-all/202312060025.bdeqzrwx-...@intel.com/
Fixes: e560518a6c2e ("drm/bridge: implement generic DP HPD bridge")
Signed-off-by: Nathan Chancellor 
---
  include/drm/bridge/aux-bridge.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/drm/bridge/aux-bridge.h b/include/drm/bridge/aux-bridge.h
index 66249ff0858e..c4c423e97f06 100644
--- a/include/drm/bridge/aux-bridge.h
+++ b/include/drm/bridge/aux-bridge.h
@@ -26,7 +26,7 @@ void drm_aux_hpd_bridge_notify(struct device *dev, enum 
drm_connector_status sta
  static inline struct device *drm_dp_hpd_bridge_register(struct device *parent,
struct device_node *np)
  {
-   return 0;
+   return NULL;
  }
  
  static inline void drm_aux_hpd_bridge_notify(struct device *dev, enum drm_connector_status status)




Nice

Reviewed-by: Bryan O'Donoghue 


Re: [PATCH 2/3] usb: typec: qcom-pmic-typec: Only select DRM_AUX_HPD_BRIDGE with OF

2023-12-05 Thread Bryan O'Donoghue

On 05/12/2023 21:13, Nathan Chancellor wrote:

CONFIG_DRM_AUX_HPD_BRIDGE depends on CONFIG_OF but that dependency is
not included when CONFIG_TYPEC_QCOM_PMIC selects it, resulting in a
Kconfig warning when CONFIG_OF is disabled:

   WARNING: unmet direct dependencies detected for DRM_AUX_HPD_BRIDGE
 Depends on [n]: HAS_IOMEM [=y] && DRM_BRIDGE [=y] && OF [=n]
 Selected by [m]:
 - TYPEC_QCOM_PMIC [=m] && USB_SUPPORT [=y] && TYPEC [=m] && TYPEC_TCPM [=m] && (ARCH_QCOM 
|| COMPILE_TEST [=y]) && (DRM [=m] || DRM [=m]=n) && DRM_BRIDGE [=y]

Only select CONFIG_DRM_AUX_HPD_BRIDGE with both CONFIG_DRM_BRIDGE and
CONFIG_OF to clear up the warning.

Fixes: 7d9f1b72b296 ("usb: typec: qcom-pmic-typec: switch to 
DRM_AUX_HPD_BRIDGE")
Signed-off-by: Nathan Chancellor 
---
  drivers/usb/typec/tcpm/Kconfig | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/typec/tcpm/Kconfig b/drivers/usb/typec/tcpm/Kconfig
index 64d5421c69e6..8cdd84ca5d6f 100644
--- a/drivers/usb/typec/tcpm/Kconfig
+++ b/drivers/usb/typec/tcpm/Kconfig
@@ -80,7 +80,7 @@ config TYPEC_QCOM_PMIC
tristate "Qualcomm PMIC USB Type-C Port Controller Manager driver"
depends on ARCH_QCOM || COMPILE_TEST
depends on DRM || DRM=n
-   select DRM_AUX_HPD_BRIDGE if DRM_BRIDGE
+   select DRM_AUX_HPD_BRIDGE if DRM_BRIDGE && OF
help
  A Type-C port and Power Delivery driver which aggregates two
  discrete pieces of silicon in the PM8150b PMIC block: the



Reviewed-by: Bryan O'Donoghue 


Re: [PATCH 01/12] dt-bindings: display: msm: qcm2290-mdss: Use the non-deprecated DSI compat

2023-11-26 Thread Bryan O'Donoghue

On 25/11/2023 14:17, Konrad Dybcio wrote:

The "qcom,dsi-ctrl-6g-qcm2290" has been deprecated in commit 0c0f65c6dd44
("dt-bindings: msm: dsi-controller-main: Add compatible strings for every
current SoC"), but the example hasn't been updated to reflect that.

Fix that.

Fixes: 0c0f65c6dd44 ("dt-bindings: msm: dsi-controller-main: Add compatible strings 
for every current SoC")
Signed-off-by: Konrad Dybcio 
---
  Documentation/devicetree/bindings/display/msm/qcom,qcm2290-mdss.yaml | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/Documentation/devicetree/bindings/display/msm/qcom,qcm2290-mdss.yaml 
b/Documentation/devicetree/bindings/display/msm/qcom,qcm2290-mdss.yaml
index 5ad155612b6c..3d82c00a9f85 100644
--- a/Documentation/devicetree/bindings/display/msm/qcom,qcm2290-mdss.yaml
+++ b/Documentation/devicetree/bindings/display/msm/qcom,qcm2290-mdss.yaml
@@ -56,7 +56,9 @@ patternProperties:
  
  properties:

compatible:
-const: qcom,dsi-ctrl-6g-qcm2290
+items:
+  - const: qcom,qcm2290-dsi-ctrl
+  - const: qcom,mdss-dsi-ctrl
  
"^phy@[0-9a-f]+$":

  type: object


Reviewed-by: Bryan O'Donoghue 


Re: [PATCH v6 0/6] drm: simplify support for transparent DRM bridges

2023-11-24 Thread Bryan O'Donoghue

On 03/11/2023 23:03, Dmitry Baryshkov wrote:

Supporting DP/USB-C can result in a chain of several transparent
bridges (PHY, redrivers, mux, etc). All attempts to implement DP support
in a different way resulted either in series of hacks or in device tree
not reflecting the actual hardware design. This results in drivers
having similar boilerplate code for such bridges.

Next, these drivers are susceptible to -EPROBE_DEFER loops: the next
bridge can either be probed from the bridge->attach callback, when it is
too late to return -EPROBE_DEFER, or from the probe() callback, when the
next bridge might not yet be available, because it depends on the
resources provided by the probing device. Device links can not fully
solve this problem since there are mutual dependencies between adjancent
devices.

Last, but not least, this results in the the internal knowledge of DRM
subsystem slowly diffusing into other subsystems, like PHY or USB/TYPEC.

To solve all these issues, define a separate DRM helper, which creates
separate aux device just for the bridge. During probe such aux device
doesn't result in the EPROBE_DEFER loops. Instead it allows the device
drivers to probe properly, according to the actual resource
dependencies. The bridge auxdevs are then probed when the next bridge
becomes available, sparing drivers from drm_bridge_attach() returning
-EPROBE_DEFER.


Dmitry,

Looking to give you a Tested-by: here but got the below splat.

https://git.codelinaro.org/bryan.odonoghue/kernel/-/tree/next-20231123-tcpm-fix?ref_type=heads

- Boot via fastboot
- Remove USB cable
- Attach DisplayPort cable
- Get some activity on the DP
- Then this

root@linaro-gnome:~# [  376.861822] xhci-hcd xhci-hcd.4.auto: xHCI Host 
Controller
[  376.867584] xhci-hcd xhci-hcd.4.auto: new USB bus registered, 
assigned bus number 3
[  376.875775] xhci-hcd xhci-hcd.4.auto: hcc params 0x0230ffe5 hci 
version 0x110 quirks 0x0010

[  376.885666] xhci-hcd xhci-hcd.4.auto: irq 229, io mem 0x0a60
[  376.892140] xhci-hcd xhci-hcd.4.auto: xHCI Host Controller
[  376.897951] xhci-hcd xhci-hcd.4.auto: new USB bus registered, 
assigned bus number 4
[  376.905869] xhci-hcd xhci-hcd.4.auto: Host supports USB 3.1 Enhanced 
SuperSpeed

[  376.914130] hub 3-0:1.0: USB hub found
[  376.918030] hub 3-0:1.0: 1 port detected
[  376.922417] usb usb4: We don't know the algorithms for LPM for this 
host, disabling LPM.

[  376.931540] hub 4-0:1.0: USB hub found
[  376.935439] hub 4-0:1.0: 1 port detected
[  377.885638] Unable to handle kernel NULL pointer dereference at 
virtual address 0060
[  377.892927] msm_dpu ae01000.display-controller: [drm] Cannot find any 
crtc or sizes

[  377.894724] Mem abort info:
[  377.905504]   ESR = 0x9604
[  377.909375]   EC = 0x25: DABT (current EL), IL = 32 bits
[  377.914852]   SET = 0, FnV = 0
[  377.918005]   EA = 0, S1PTW = 0
[  377.921250]   FSC = 0x04: level 0 translation fault
[  377.926269] Data abort info:
[  377.929239]   ISV = 0, ISS = 0x0004, ISS2 = 0x
[  377.934881]   CM = 0, WnR = 0, TnD = 0, TagAccess = 0
[  377.940095]   GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
[  377.945563] user pgtable: 4k pages, 48-bit VAs, pgdp=000101992000
[  377.952441] [0060] pgd=, p4d=
[  377.959448] Internal error: Oops: 9604 [#1] PREEMPT SMP
[  377.965882] Modules linked in: typec_displayport nf_tables libcrc32c 
nfnetlink q6asm_dai q6routing q6afe_clocks q6afe_dai q6asm q6adm 
snd_q6dsp_common q6afe q6core apr pdr_interfacer
[  377.965984]  aux_bridge crct10dif_ce snd_soc_lpass_macro_common 
drm_kms_helper qnoc_sm8250 qcom_wdt icc_osm_l3 fuse drm backlight dm_mod 
ip_tables x_tables
[  378.072201] CPU: 5 PID: 379 Comm: dp_hpd_handler Not tainted 
6.7.0-rc2-next-20231123-8-g812004aeedc0-dirty #30

[  378.082817] Hardware name: Qualcomm Technologies, Inc. Robotics RB5 (DT)
[  378.04] msm_dpu ae01000.display-controller: [drm] Cannot find any 
crtc or sizes
[  378.089697] pstate: 6045 (nZCv daif +PAN -UAO -TCO -DIT -SSBS 
BTYPE=--)

[  378.089700] pc : drm_object_property_set_value+0x0/0x88 [drm]
[  378.110607] lr : drm_dp_set_subconnector_property+0x58/0x64 
[drm_display_helper]

[  378.118205] sp : 800081fbbda0
[  378.121616] x29: 800081fbbda0 x28:  x27: 

[  378.128940] x26:  x25:  x24: 
38d1ccef2880
[  378.136264] x23: 38d1ccef2a10 x22: 38d1ccef2880 x21: 
38d1ccef29f0
[  378.143587] x20:  x19: 38d1ccef2880 x18: 

[  378.150911] x17: 00040044 x16: a79c03e1fe34 x15: 

[  378.158235] x14: 38d1c5861000 x13: 03ec x12: 
0001
[  378.165560] x11: 071c71c71c71c71c x10: 0b00 x9 : 
800081fbb9d0
[  378.172884] x8 : a79b9b4d9000 x7 : 0001 x6 : 
a79b9b6d74b0
[  378.180207] x5 :  x4 : 

Re: [PATCH v6 6/6] usb: typec: qcom-pmic-typec: switch to DRM_AUX_HPD_BRIDGE

2023-11-21 Thread Bryan O'Donoghue

On 03/11/2023 23:03, Dmitry Baryshkov wrote:

Use the freshly defined DRM_AUX_HPD_BRIDGE instead of open-coding the
same functionality for the DRM bridge chain termination.

Signed-off-by: Dmitry Baryshkov 



+   bridge_dev = drm_dp_hpd_bridge_register(tcpm->dev, 
to_of_node(tcpm->tcpc.fwnode));
+   if (IS_ERR(bridge_dev))
+   return PTR_ERR(bridge_dev);
+


What is the effect if we never attach any bridged devices ?

We make an aux device that just hangs around and eventually get cleaned 
up on release ? That's the way I read this code anyway.


Acked-by: Bryan O'Donoghue 


Re: [PATCH v2 2/4] arm64: dts: qcom: qrb5165-rb5: add onboard USB-C redriver

2023-08-17 Thread Bryan O'Donoghue

On 17/08/2023 15:59, Dmitry Baryshkov wrote:

Add the nb7vpq904m, onboard USB-C redriver / retimer.

Signed-off-by: Dmitry Baryshkov 
---
  arch/arm64/boot/dts/qcom/qrb5165-rb5.dts | 52 +++-
  1 file changed, 50 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts 
b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts
index 303d07f9c6e5..a4f7a9f9c22c 100644
--- a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts
+++ b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts
@@ -610,6 +610,46 @@ lt9611_out: endpoint {
  /* LS-I2C1 */
   {
status = "okay";
+
+   typec-mux@1c {
+   compatible = "onnn,nb7vpq904m";
+   reg = <0x1c>;
+
+   vcc-supply = <_s4a_1p8>;
+
+   retimer-switch;
+   orientation-switch;
+
+   ports {
+   #address-cells = <1>;
+   #size-cells = <0>;
+
+   port@0 {
+   reg = <0>;
+
+   redriver_usb_con_ss: endpoint {
+   remote-endpoint = 
<_typec_mux_in>;
+   };
+   };
+
+   port@1 {
+   reg = <1>;
+
+   redriver_phy_con_ss: endpoint {
+   remote-endpoint = <_1_qmpphy_out>;
+   data-lanes = <0 1 2 3>;
+   };
+   };
+
+   port@2 {
+   reg = <2>;
+
+   redriver_usb_con_sbu: endpoint {
+   remote-endpoint = 
<_typec_sbu_out>;
+   };
+   };
+   };
+   };
  };
  
   {

@@ -1299,7 +1339,7 @@ _1_qmpphy {
  };
  
  _1_qmpphy_out {

-   remote-endpoint = <_typec_mux_in>;
+   remote-endpoint = <_phy_con_ss>;
  };
  
  _2 {

@@ -1388,7 +1428,15 @@ pm8150b_role_switch_in: endpoint {
port@1 {
reg = <1>;
pm8150b_typec_mux_in: endpoint {
-   remote-endpoint = <_1_qmpphy_out>;
+   remote-endpoint = 
<_usb_con_ss>;
+   };
+   };
+
+   port@2 {
+   reg = <2>;
+
+   pm8150b_typec_sbu_out: endpoint {
+   remote-endpoint = 
<_usb_con_sbu>;
};
};
};


LGTM

Reviewed-by: Bryan O'Donoghue 


Re: [PATCH v3 1/2] dt-bindings: display/msm: dsi-controller-main: Fix deprecated compatible

2023-03-04 Thread Bryan O'Donoghue

On 04/03/2023 17:45, Bryan O'Donoghue wrote:

On 04/03/2023 17:35, Konrad Dybcio wrote:

you'll see no error. However if you just do this

diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi 
b/arch/arm64/boot/dts/qcom/msm8916.dtsi

index 0733c2f4f3798..829fbe05b5713 100644
--- a/arch/arm64/boot/dts/qcom/msm8916.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi
@@ -1094,8 +1094,7 @@ mdp5_intf1_out: endpoint {
 };

 dsi0: dsi@1a98000 {
-   compatible = "qcom,msm8916-dsi-ctrl",
-    "qcom,mdss-dsi-ctrl";
+   compatible = "qcom,mdss-dsi-ctrl";
 reg = <0x01a98000 0x25c>;
 reg-names = "dsi_ctrl";


and run the same test you get

Yes, correct. It's valid but it's deprecated, so the bindings are
sane. Keep in mind there's an ABI-like aspect to this.

Konrad


The _driver_ will still accept "qcom,mdss-dsi-ctrl" which is ABI 
compliant but, I don't see why the yaml should.


If you declare a new .dts with only "qcom,mdss-dsi-ctrl", that should 
throw a yaml check error.


---
bod


Actually. I agree with you, I just dislike it.

- "qcom,mdss-dsi-ctrl" <- the driver will accept this
- "qcom,dsi-ctrl-6g-qcm2290" <- the driver will not accept this

bah

Reviewed-by: Bryan O'Donoghue 


Re: [PATCH v3 1/2] dt-bindings: display/msm: dsi-controller-main: Fix deprecated compatible

2023-03-04 Thread Bryan O'Donoghue

On 04/03/2023 17:35, Konrad Dybcio wrote:

you'll see no error. However if you just do this

diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi 
b/arch/arm64/boot/dts/qcom/msm8916.dtsi
index 0733c2f4f3798..829fbe05b5713 100644
--- a/arch/arm64/boot/dts/qcom/msm8916.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi
@@ -1094,8 +1094,7 @@ mdp5_intf1_out: endpoint {
     };

     dsi0: dsi@1a98000 {
-   compatible = "qcom,msm8916-dsi-ctrl",
-    "qcom,mdss-dsi-ctrl";
+   compatible = "qcom,mdss-dsi-ctrl";
     reg = <0x01a98000 0x25c>;
     reg-names = "dsi_ctrl";


and run the same test you get

Yes, correct. It's valid but it's deprecated, so the bindings are
sane. Keep in mind there's an ABI-like aspect to this.

Konrad


The _driver_ will still accept "qcom,mdss-dsi-ctrl" which is ABI 
compliant but, I don't see why the yaml should.


If you declare a new .dts with only "qcom,mdss-dsi-ctrl", that should 
throw a yaml check error.


---
bod


Re: [PATCH v3 1/2] dt-bindings: display/msm: dsi-controller-main: Fix deprecated compatible

2023-03-04 Thread Bryan O'Donoghue

On 04/03/2023 15:55, Konrad Dybcio wrote:

The point of the previous cleanup was to disallow "qcom,mdss-dsi-ctrl"
alone. This however didn't quite work out and the property became
undocumented instead of deprecated. Fix that.

Fixes: 0c0f65c6dd44 ("dt-bindings: msm: dsi-controller-main: Add compatible strings 
for every current SoC")
Signed-off-by: Konrad Dybcio 
---
  Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml 
b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
index f195530ae964..d534451c8f7f 100644
--- a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
+++ b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
@@ -35,7 +35,7 @@ properties:
- items:
- enum:
- qcom,dsi-ctrl-6g-qcm2290
-  - const: qcom,mdss-dsi-ctrl
+  - qcom,mdss-dsi-ctrl # This should always come with an 
SoC-specific compatible
  deprecated: true
  
reg:




This change would make compatible = "qcom,dsi-ctrl-6g-qcm2290", 
"qcom,mdss-dsi-ctrl"; break though


Take this example, I'm going to use 8916 because its easy.

If we apply your change to dsi-controller-main.yaml

diff --git 
a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml 
b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml

index e75a3efe4dace..e93c16431f0a1 100644
--- a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
+++ b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
@@ -34,7 +34,7 @@ properties:
   - items:
   - enum:
   - dsi-ctrl-6g-qcm2290
-  - const: qcom,mdss-dsi-ctrl
+  - qcom,mdss-dsi-ctrl
 deprecated: true

   reg:

and then make 8916 == compatible = "qcom,dsi-ctrl-6g-qcm2290", 
"qcom,mdss-dsi-ctrl";


diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi 
b/arch/arm64/boot/dts/qcom/msm8916.dtsi

index 0733c2f4f3798..7332b5f66a09d 100644
--- a/arch/arm64/boot/dts/qcom/msm8916.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi
@@ -1094,7 +1094,7 @@ mdp5_intf1_out: endpoint {
};

dsi0: dsi@1a98000 {
-   compatible = "qcom,msm8916-dsi-ctrl",
+   compatible = "dsi-ctrl-6g-qcm2290",
 "qcom,mdss-dsi-ctrl";
reg = <0x01a98000 0x25c>;
reg-names = "dsi_ctrl";

arch/arm64/boot/dts/qcom/apq8016-sbc.dtb: dsi@1a98000: compatible: 
'oneOf' conditional failed, one must be fixed:

['dsi-ctrl-6g-qcm2290', 'qcom,mdss-dsi-ctrl'] is too long


so compatible = "qcom,dsi-ctrl-6g-qcm2290", "qcom,mdss-dsi-ctrl"; is now 
invalid, not deprecated.


This change also makes compatible = "qcom,dsi-ctrl-6g-qcm2290" or 
compatible = "qcom,mdss-dsi-ctrl" standalone valid compatible which is 
again not what we want.


- enum:
- qcom,dsi-ctrl-6g-qcm2290
- qcom,mdss-dsi-ctrl

means either "qcom,dsi-ctrl-6g-qcm2290" or "qcom,mdss-dsi-ctrl" are 
valid compat strings...


As an example if you apply your change and then change the msm8916.dtsi 
to the below


diff --git 
a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml 
b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml

index e75a3efe4dace..e93c16431f0a1 100644
--- a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
+++ b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
@@ -34,7 +34,7 @@ properties:
   - items:
   - enum:
   - dsi-ctrl-6g-qcm2290
-  - const: qcom,mdss-dsi-ctrl
+  - qcom,mdss-dsi-ctrl
 deprecated: true

   reg:
diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi 
b/arch/arm64/boot/dts/qcom/msm8916.dtsi

index 0733c2f4f3798..829fbe05b5713 100644
--- a/arch/arm64/boot/dts/qcom/msm8916.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi
@@ -1094,8 +1094,7 @@ mdp5_intf1_out: endpoint {
};

dsi0: dsi@1a98000 {
-   compatible = "qcom,msm8916-dsi-ctrl",
-"qcom,mdss-dsi-ctrl";
+   compatible = "qcom,mdss-dsi-ctrl";
reg = <0x01a98000 0x25c>;
reg-names = "dsi_ctrl";

Then test it with

make O=$BUILDDIR DT_DOC_CHECKER=$DT_DOC_CHECKER 
DT_EXTRACT_EX=$DT_EXTRACT_EX DT_MK_SCHEMA=$DT_MK_SCHEMA 
DT_CHECKER=$DT_CHECKER CHECKER_FLAGS=-W=1 CHECK_DTBS=y qcom/apq8016-sbc.dtb


you'll see no error. However if you just do this

diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi 
b/arch/arm64/boot/dts/qcom/msm8916.dtsi

index 0733c2f4f3798..829fbe05b5713 100644
--- 

Re: [PATCH v2 1/2] dt-bindings: display/msm: dsi-controller-main: Fix deprecated QCM2290 compatible

2023-02-17 Thread Bryan O'Donoghue

On 17/02/2023 21:23, Konrad Dybcio wrote:



On 17.02.2023 22:20, Bryan O'Donoghue wrote:

On 17/02/2023 21:16, Konrad Dybcio wrote:

Correct, but QCM2290 is not supported upstream yet.

SM6115 (a different SoC) however is, but it used the qcm2290 compatible
as it was a convenient hack to get the DSI host ID recognized based on
the (identical-to-qcm2290) base register without additional driver changes.
We're now trying to untangle that mess..


Gand so what we want documented is:

compatible = "qcom,qcs2290-dsi-ctrl", qcom,mdss-dsi-ctrl";

qcm* yes, this became documented with your original cleanup


compatible = "qcom,sm6115-dsi-ctrl", qcom,mdss-dsi-ctrl";

and yes this became documented (well, in the DSI binding) in
my other patch series and is finished being documented in this one



with the old compatible = "qcom,dsi-ctrl-6g-qcm2290"; clanger continuing to be 
deprecated.

correct, we still have to note it but keep it deprecated

Konrad


---
bod


Cool.

That maps to my understanding & the intention of the deprecation.

---
bod


Re: [PATCH v2 1/2] dt-bindings: display/msm: dsi-controller-main: Fix deprecated QCM2290 compatible

2023-02-17 Thread Bryan O'Donoghue

On 17/02/2023 21:16, Konrad Dybcio wrote:

Correct, but QCM2290 is not supported upstream yet.

SM6115 (a different SoC) however is, but it used the qcm2290 compatible
as it was a convenient hack to get the DSI host ID recognized based on
the (identical-to-qcm2290) base register without additional driver changes.
We're now trying to untangle that mess..


Gand so what we want documented is:

compatible = "qcom,qcs2290-dsi-ctrl", qcom,mdss-dsi-ctrl";
compatible = "qcom,sm6115-dsi-ctrl", qcom,mdss-dsi-ctrl";

with the old compatible = "qcom,dsi-ctrl-6g-qcm2290"; clanger continuing 
to be deprecated.


---
bod


Re: [PATCH v2 1/2] dt-bindings: display/msm: dsi-controller-main: Fix deprecated QCM2290 compatible

2023-02-17 Thread Bryan O'Donoghue

On 17/02/2023 12:24, Krzysztof Kozlowski wrote:

First, it would be nice to know what was the intention of Bryan's commit?


Sorry I've been grazing this thread but, not responding.

- qcom,dsi-ctrl-6g-qcm2290

is non-compliant with qcom,socid-dsi-ctrl which is our desired naming 
convention, so that's what the deprecation is about i.e. moving this 
compat to "qcom,qcm2290-dsi-ctrl"


Actually I have the question why we are deciding to go with "sm6115" 
instead of "qcm2290" ?


The stamp on the package you receive from Thundercomm says "qcm2290" not 
"sm6115"


?

---
bod




[PATCH v9 2/2] dt-bindings: msm: dsi-controller-main: Document clocks on a per compatible basis

2023-01-18 Thread Bryan O'Donoghue
Each compatible has a different set of clocks which are associated with it.
Add in the list of clocks for each compatible.

Acked-by: Rob Herring 
Acked-by: Krzysztof Kozlowski 
Signed-off-by: Bryan O'Donoghue 
---
 .../display/msm/dsi-controller-main.yaml  | 218 --
 1 file changed, 201 insertions(+), 17 deletions(-)

diff --git 
a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml 
b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
index 35668caa190c4..ad1ba15b74c19 100644
--- a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
+++ b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
@@ -9,9 +9,6 @@ title: Qualcomm Display DSI controller
 maintainers:
   - Krishna Manikandan 
 
-allOf:
-  - $ref: "../dsi-controller.yaml#"
-
 properties:
   compatible:
 oneOf:
@@ -50,22 +47,23 @@ properties:
 maxItems: 1
 
   clocks:
-items:
-  - description: Display byte clock
-  - description: Display byte interface clock
-  - description: Display pixel clock
-  - description: Display core clock
-  - description: Display AHB clock
-  - description: Display AXI clock
+description: |
+  Several clocks are used, depending on the variant. Typical ones are::
+   - bus:: Display AHB clock.
+   - byte:: Display byte clock.
+   - byte_intf:: Display byte interface clock.
+   - core:: Display core clock.
+   - core_mss:: Core MultiMedia SubSystem clock.
+   - iface:: Display AXI clock.
+   - mdp_core:: MDP Core clock.
+   - mnoc:: MNOC clock
+   - pixel:: Display pixel clock.
+minItems: 3
+maxItems: 9
 
   clock-names:
-items:
-  - const: byte
-  - const: byte_intf
-  - const: pixel
-  - const: core
-  - const: iface
-  - const: bus
+minItems: 3
+maxItems: 9
 
   phys:
 maxItems: 1
@@ -161,6 +159,192 @@ required:
   - assigned-clock-parents
   - ports
 
+allOf:
+  - $ref: ../dsi-controller.yaml#
+  - if:
+  properties:
+compatible:
+  contains:
+enum:
+  - qcom,apq8064-dsi-ctrl
+then:
+  properties:
+clocks:
+  maxItems: 7
+clock-names:
+  items:
+- const: iface
+- const: bus
+- const: core_mmss
+- const: src
+- const: byte
+- const: pixel
+- const: core
+
+  - if:
+  properties:
+compatible:
+  contains:
+enum:
+  - qcom,msm8916-dsi-ctrl
+then:
+  properties:
+clocks:
+  maxItems: 6
+clock-names:
+  items:
+- const: mdp_core
+- const: iface
+- const: bus
+- const: byte
+- const: pixel
+- const: core
+
+  - if:
+  properties:
+compatible:
+  contains:
+enum:
+  - qcom,msm8953-dsi-ctrl
+then:
+  properties:
+clocks:
+  maxItems: 6
+clock-names:
+  items:
+- const: mdp_core
+- const: iface
+- const: bus
+- const: byte
+- const: pixel
+- const: core
+
+  - if:
+  properties:
+compatible:
+  contains:
+enum:
+  - qcom,msm8974-dsi-ctrl
+then:
+  properties:
+clocks:
+  maxItems: 7
+clock-names:
+  items:
+- const: mdp_core
+- const: iface
+- const: bus
+- const: byte
+- const: pixel
+- const: core
+- const: core_mmss
+
+  - if:
+  properties:
+compatible:
+  contains:
+enum:
+  - qcom,msm8996-dsi-ctrl
+then:
+  properties:
+clocks:
+  maxItems: 7
+clock-names:
+  items:
+- const: mdp_core
+- const: byte
+- const: iface
+- const: bus
+- const: core_mmss
+- const: pixel
+- const: core
+
+  - if:
+  properties:
+compatible:
+  contains:
+enum:
+  - qcom,msm8998-dsi-ctrl
+then:
+  properties:
+clocks:
+  maxItems: 6
+clock-names:
+  items:
+- const: byte
+- const: byte_intf
+- const: pixel
+- const: core
+- const: iface
+- const: bus
+
+  - if:
+  properties:
+compatible:
+  contains:
+enum:
+  - qcom,sc7180-dsi-ctrl
+  - qcom,sc7280-dsi-ctrl
+  - qcom,sm8250-dsi-ctrl
+  - qcom,sm8150-dsi-ctrl
+  - qcom,sm8250-dsi-ctrl
+  - qcom,sm8350-dsi-ctrl
+  - qcom,sm8450-dsi-ctrl
+  - qcom,sm8550-dsi-ctrl
+then:
+  

[PATCH v9 1/2] dt-bindings: msm: dsi-controller-main: Add compatible strings for every current SoC

2023-01-18 Thread Bryan O'Donoghue
Currently we do not differentiate between the various users of the
qcom,mdss-dsi-ctrl. The driver is flexible enough to operate from one
compatible string but, the hardware does have some significant differences
in the number of clocks.

To facilitate documenting the clocks add the following compatible strings

- qcom,apq8064-dsi-ctrl
- qcom,msm8916-dsi-ctrl
- qcom,msm8953-dsi-ctrl
- qcom,msm8974-dsi-ctrl
- qcom,msm8996-dsi-ctrl
- qcom,msm8998-dsi-ctrl
- qcom,sc7180-dsi-ctrl
- qcom,sc7280-dsi-ctrl
- qcom,sdm660-dsi-ctrl
- qcom,sdm845-dsi-ctrl
- qcom,sm8150-dsi-ctrl
- qcom,sm8250-dsi-ctrl
- qcom,sm8350-dsi-ctrl
- qcom,sm8450-dsi-ctrl
- qcom,sm8550-dsi-ctrl
- qcom,qcm2290-dsi-ctrl

Deprecate qcom,dsi-ctrl-6g-qcm2290 in favour of the desired format while we
do so.

Several MDSS yaml files exist which document the dsi sub-node.
For each existing SoC MDSS yaml, provide the right dsi compat string.

Acked-by: Rob Herring 
Signed-off-by: Bryan O'Donoghue 
---
 .../display/msm/dsi-controller-main.yaml  | 30 ---
 .../bindings/display/msm/qcom,mdss.yaml   |  3 +-
 .../display/msm/qcom,msm8998-mdss.yaml|  8 +++--
 .../display/msm/qcom,sc7180-mdss.yaml |  6 ++--
 .../display/msm/qcom,sc7280-mdss.yaml |  6 ++--
 .../display/msm/qcom,sdm845-mdss.yaml |  8 +++--
 .../display/msm/qcom,sm8150-mdss.yaml |  8 +++--
 .../display/msm/qcom,sm8250-mdss.yaml |  8 +++--
 .../display/msm/qcom,sm8350-mdss.yaml |  6 ++--
 .../display/msm/qcom,sm8450-mdss.yaml |  8 +++--
 10 files changed, 65 insertions(+), 26 deletions(-)

diff --git 
a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml 
b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
index 6e2fd6e9fa7f0..35668caa190c4 100644
--- a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
+++ b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
@@ -14,9 +14,31 @@ allOf:
 
 properties:
   compatible:
-enum:
-  - qcom,mdss-dsi-ctrl
-  - qcom,dsi-ctrl-6g-qcm2290
+oneOf:
+  - items:
+  - enum:
+  - qcom,apq8064-dsi-ctrl
+  - qcom,msm8916-dsi-ctrl
+  - qcom,msm8953-dsi-ctrl
+  - qcom,msm8974-dsi-ctrl
+  - qcom,msm8996-dsi-ctrl
+  - qcom,msm8998-dsi-ctrl
+  - qcom,qcm2290-dsi-ctrl
+  - qcom,sc7180-dsi-ctrl
+  - qcom,sc7280-dsi-ctrl
+  - qcom,sdm660-dsi-ctrl
+  - qcom,sdm845-dsi-ctrl
+  - qcom,sm8150-dsi-ctrl
+  - qcom,sm8250-dsi-ctrl
+  - qcom,sm8350-dsi-ctrl
+  - qcom,sm8450-dsi-ctrl
+  - qcom,sm8550-dsi-ctrl
+  - const: qcom,mdss-dsi-ctrl
+  - items:
+  - enum:
+  - dsi-ctrl-6g-qcm2290
+  - const: qcom,mdss-dsi-ctrl
+deprecated: true
 
   reg:
 maxItems: 1
@@ -149,7 +171,7 @@ examples:
  #include 
 
  dsi@ae94000 {
-   compatible = "qcom,mdss-dsi-ctrl";
+   compatible = "qcom,sc7180-dsi-ctrl", "qcom,mdss-dsi-ctrl";
reg = <0x0ae94000 0x400>;
reg-names = "dsi_ctrl";
 
diff --git a/Documentation/devicetree/bindings/display/msm/qcom,mdss.yaml 
b/Documentation/devicetree/bindings/display/msm/qcom,mdss.yaml
index ba0460268731b..c194bea46c72f 100644
--- a/Documentation/devicetree/bindings/display/msm/qcom,mdss.yaml
+++ b/Documentation/devicetree/bindings/display/msm/qcom,mdss.yaml
@@ -94,7 +94,8 @@ patternProperties:
 type: object
 properties:
   compatible:
-const: qcom,mdss-dsi-ctrl
+contains:
+  const: qcom,mdss-dsi-ctrl
 
   "^phy@[1-9a-f][0-9a-f]*$":
 type: object
diff --git 
a/Documentation/devicetree/bindings/display/msm/qcom,msm8998-mdss.yaml 
b/Documentation/devicetree/bindings/display/msm/qcom,msm8998-mdss.yaml
index 8b82eef28162c..3c2b6ed98a568 100644
--- a/Documentation/devicetree/bindings/display/msm/qcom,msm8998-mdss.yaml
+++ b/Documentation/devicetree/bindings/display/msm/qcom,msm8998-mdss.yaml
@@ -46,7 +46,9 @@ patternProperties:
 type: object
 properties:
   compatible:
-const: qcom,mdss-dsi-ctrl
+items:
+  - const: qcom,msm8998-dsi-ctrl
+  - const: qcom,mdss-dsi-ctrl
 
   "^phy@[0-9a-f]+$":
 type: object
@@ -128,7 +130,7 @@ examples:
 };
 
 dsi@c994000 {
-compatible = "qcom,mdss-dsi-ctrl";
+compatible = "qcom,msm8998-dsi-ctrl", "qcom,mdss-dsi-ctrl";
 reg = <0x0c994000 0x400>;
 reg-names = "dsi_ctrl";
 
@@ -198,7 +200,7 @@ examples:
 };
 
 dsi@c996000 {
-compatible = "qcom,mdss-dsi-ctrl";
+compatible = "qcom,msm8998-dsi-ctrl", "qcom,mdss-dsi-ctrl";
 reg = &

[PATCH v9 0/2] mdss-dsi-ctrl binding and dts fixes

2023-01-18 Thread Bryan O'Donoghue
V9:
- Adds Rob's RB to #1
- Fixes two check splats - Dmitry

V8:
- Squash first and last patch to fix bisectability

link: 
https://lore.kernel.org/linux-arm-msm/167388664232.594279.4607492026981202284.r...@kernel.org/T/#u

V7:
- The bulk of the patches for this series have been merged.
  There are still four patches to be pushed/updated.
- Adds clocks for msm8974 - Dmitry
- Adds compat strings for sm8150, sm8350, sm8450, sm8550 - Dmitry
- Changes last patch in series to state - Rob
  compatible:
contains:
  const: qcom,mdss-dsi-ctrl

link: 
https://lore.kernel.org/linux-arm-msm/20221223021025.1646636-1-bryan.odonog...@linaro.org/

V6:
- Squashes a number of patches per Krzysztof's comments on bisectability
- Adds in Acked-by Rob and Krzysztof 

V5:
- Adds compat strings to bindings/display/msm/qcom,SoC-mdss.yaml - Dmitry
- Re-orders simple fixes to the start of the series to allow backports - Dmitry 
- VDDA and drop of node-names - Krzysztof
- Deprecates qcom,dsi-ctrl-6g-qcm2290 - Krzysztof, Dmitry
- Expands set of updated files to include new msm8953 - bod
- Converts to agreed compat string qcom,SoC-dsi-ctrl hence
  -  - qcom,mdss-dsi-ctrl-msm8996
  +  - qcom,msm8996-dsi-ctrl
- Adds RB where indicated for the compat strings.
V4:
- Moves the update of the example from patch #5 to patch #4

V3:
- Moves declaration of mdss-dsi-ctrl into compat string declaration
  patch - Krzysztof, Dmitry
- Renames qcm-2290 compat string to agreed compat "qcom,socname-dsi-ctrl"
  Dmirty, Krzysztof
- Adds empty line after if clause in yaml control flow section - Dmirty
- Adds Rb/Ack - Krzysztof, Dmitry, Doug, David
- vdd*
  Looking into this some more, I don't believe vdd, vdda, vddio ought to be
  required properties. Its up to the PCB manufacturer and the panel in-use
  how that panel is powered. Powering the panel is not something that
  even necessarily needs to be done from the dsi-ctrl driver.
  Originally marking vdd* as required in the .txt was an error, its not a
  SoC level dtsi requirement.
- clock-names
  Rather than replicate the clock-name in each if block I listed them with
  a specific description from a similar reference in usb/qcom,dwc3.yaml.
 
https://lore.kernel.org/linux-arm-msm/eb80681f-2e0b-605f-0444-ec65562f7...@linaro.org/

V2:
https://www.spinics.net/lists/linux-arm-msm/msg116326.html

- Moves the DSI PHY changes to a different later series.
  There are enough dsi-controller-main changes to justify its own
  standalone series.

- The original phy-name binding change given discussion with Rob and
  Krzysztof became its own standalone series that has since been merged.
  https://www.mail-archive.com/dri-devel@lists.freedesktop.org/msg403214.html

- Retains the drop of power-domain from yaml as a required property.
  I dug into the available dtsi. The apq8064 doesn't appear to have any
  GDSC which can be attached as a power-domain, which means the
  power-domain requirement is not universal across the various silicon
  versions.

- Adds Dmitry's RB to power-domain drop

- For the clock declarations I've
  * I noticed that the simple change I had worked for msm8939 but
subsquently broke other dtsi which drove a bigger change to document
the clocks on a per compatible basis.
  * Added compat strings in yaml.
  * Moved the allOf down later in the file to acomodate the if/then.
  * Number of clocks validated on a per compatible basis
  * The driver code which doesn't care about the number of clocks
can still operate on the mdss-dsi-ctrl compat but the dts checks will
validate against the compat string and yaml.

- vdd descriptions
  Took the previous text I missed from the .txt file - Krzysztof, Dmitry
  Adds vdd, vdda and vddio to the required list. This exposes warnings in
  existing dtsi but the previous .txt declared these regulators as
  required. - Krzysztof
 
V1:
This series fixes up a number of dtbs checks which are being flagged adding
in the msm8939 dtsi.


When converting from .txt to .yaml a number of the parameters for the older
msm8916 silicon were not transmitted into the yaml.

Adding in the msm8939 which is a near 1:1 copy of the msm8916 in terms of
dtsi triggers a rake of dtbs checks as a result.

https://www.mail-archive.com/dri-devel@lists.freedesktop.org/msg403211.html

Bryan O'Donoghue (2):
  dt-bindings: msm: dsi-controller-main: Add compatible strings for
every current SoC
  dt-bindings: msm: dsi-controller-main: Document clocks on a per
compatible basis

 .../display/msm/dsi-controller-main.yaml  | 248 --
 .../bindings/display/msm/qcom,mdss.yaml   |   3 +-
 .../display/msm/qcom,msm8998-mdss.yaml|   8 +-
 .../display/msm/qcom,sc7180-mdss.yaml |   6 +-
 .../display/msm/qcom,sc7280-mdss.yaml |   6 +-
 .../display/msm/qcom,sdm845-mdss.yaml |   8 +-
 .../display/msm/qcom,sm8150-mdss.yaml |   8 +-
 .../display/msm/qcom,sm8250-mdss.yaml |   8 +-
 .

[PATCH v8 1/3] dt-bindings: msm: dsi-controller-main: Add compatible strings for every current SoC

2023-01-16 Thread Bryan O'Donoghue
Currently we do not differentiate between the various users of the
qcom,mdss-dsi-ctrl. The driver is flexible enough to operate from one
compatible string but, the hardware does have some significant differences
in the number of clocks.

To facilitate documenting the clocks add the following compatible strings

- qcom,apq8064-dsi-ctrl
- qcom,msm8916-dsi-ctrl
- qcom,msm8953-dsi-ctrl
- qcom,msm8974-dsi-ctrl
- qcom,msm8996-dsi-ctrl
- qcom,msm8998-dsi-ctrl
- qcom,sc7180-dsi-ctrl
- qcom,sc7280-dsi-ctrl
- qcom,sdm660-dsi-ctrl
- qcom,sdm845-dsi-ctrl
- qcom,sm8150-dsi-ctrl
- qcom,sm8250-dsi-ctrl
- qcom,sm8350-dsi-ctrl
- qcom,sm8450-dsi-ctrl
- qcom,sm8550-dsi-ctrl
- qcom,qcm2290-dsi-ctrl

Deprecate qcom,dsi-ctrl-6g-qcm2290 in favour of the desired format while we
do so.

Several MDSS yaml files exist which document the dsi sub-node.
For each existing SoC MDSS yaml, provide the right dsi compat string.

Signed-off-by: Bryan O'Donoghue 
---
 .../display/msm/dsi-controller-main.yaml  | 30 ---
 .../bindings/display/msm/qcom,mdss.yaml   |  3 +-
 .../display/msm/qcom,msm8998-mdss.yaml|  8 +++--
 .../display/msm/qcom,sc7180-mdss.yaml |  6 ++--
 .../display/msm/qcom,sc7280-mdss.yaml |  6 ++--
 .../display/msm/qcom,sdm845-mdss.yaml |  8 +++--
 .../display/msm/qcom,sm8150-mdss.yaml |  8 +++--
 .../display/msm/qcom,sm8250-mdss.yaml |  8 +++--
 .../display/msm/qcom,sm8350-mdss.yaml |  6 ++--
 .../display/msm/qcom,sm8450-mdss.yaml |  4 ++-
 10 files changed, 63 insertions(+), 24 deletions(-)

diff --git 
a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml 
b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
index 6e2fd6e9fa7f0..35668caa190c4 100644
--- a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
+++ b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
@@ -14,9 +14,31 @@ allOf:
 
 properties:
   compatible:
-enum:
-  - qcom,mdss-dsi-ctrl
-  - qcom,dsi-ctrl-6g-qcm2290
+oneOf:
+  - items:
+  - enum:
+  - qcom,apq8064-dsi-ctrl
+  - qcom,msm8916-dsi-ctrl
+  - qcom,msm8953-dsi-ctrl
+  - qcom,msm8974-dsi-ctrl
+  - qcom,msm8996-dsi-ctrl
+  - qcom,msm8998-dsi-ctrl
+  - qcom,qcm2290-dsi-ctrl
+  - qcom,sc7180-dsi-ctrl
+  - qcom,sc7280-dsi-ctrl
+  - qcom,sdm660-dsi-ctrl
+  - qcom,sdm845-dsi-ctrl
+  - qcom,sm8150-dsi-ctrl
+  - qcom,sm8250-dsi-ctrl
+  - qcom,sm8350-dsi-ctrl
+  - qcom,sm8450-dsi-ctrl
+  - qcom,sm8550-dsi-ctrl
+  - const: qcom,mdss-dsi-ctrl
+  - items:
+  - enum:
+  - dsi-ctrl-6g-qcm2290
+  - const: qcom,mdss-dsi-ctrl
+deprecated: true
 
   reg:
 maxItems: 1
@@ -149,7 +171,7 @@ examples:
  #include 
 
  dsi@ae94000 {
-   compatible = "qcom,mdss-dsi-ctrl";
+   compatible = "qcom,sc7180-dsi-ctrl", "qcom,mdss-dsi-ctrl";
reg = <0x0ae94000 0x400>;
reg-names = "dsi_ctrl";
 
diff --git a/Documentation/devicetree/bindings/display/msm/qcom,mdss.yaml 
b/Documentation/devicetree/bindings/display/msm/qcom,mdss.yaml
index ba0460268731b..c194bea46c72f 100644
--- a/Documentation/devicetree/bindings/display/msm/qcom,mdss.yaml
+++ b/Documentation/devicetree/bindings/display/msm/qcom,mdss.yaml
@@ -94,7 +94,8 @@ patternProperties:
 type: object
 properties:
   compatible:
-const: qcom,mdss-dsi-ctrl
+contains:
+  const: qcom,mdss-dsi-ctrl
 
   "^phy@[1-9a-f][0-9a-f]*$":
 type: object
diff --git 
a/Documentation/devicetree/bindings/display/msm/qcom,msm8998-mdss.yaml 
b/Documentation/devicetree/bindings/display/msm/qcom,msm8998-mdss.yaml
index 8b82eef28162c..3c2b6ed98a568 100644
--- a/Documentation/devicetree/bindings/display/msm/qcom,msm8998-mdss.yaml
+++ b/Documentation/devicetree/bindings/display/msm/qcom,msm8998-mdss.yaml
@@ -46,7 +46,9 @@ patternProperties:
 type: object
 properties:
   compatible:
-const: qcom,mdss-dsi-ctrl
+items:
+  - const: qcom,msm8998-dsi-ctrl
+  - const: qcom,mdss-dsi-ctrl
 
   "^phy@[0-9a-f]+$":
 type: object
@@ -128,7 +130,7 @@ examples:
 };
 
 dsi@c994000 {
-compatible = "qcom,mdss-dsi-ctrl";
+compatible = "qcom,msm8998-dsi-ctrl", "qcom,mdss-dsi-ctrl";
 reg = <0x0c994000 0x400>;
 reg-names = "dsi_ctrl";
 
@@ -198,7 +200,7 @@ examples:
 };
 
 dsi@c996000 {
-compatible = "qcom,mdss-dsi-ctrl";
+compatible = "qcom,msm8998-dsi-ctrl", "qcom,mdss-dsi-ctrl";
 reg = <0x0c996000 0x400>;

[PATCH v8 3/3] dt-bindings: msm: dsi-controller-main: Add vdd* descriptions back in

2023-01-16 Thread Bryan O'Donoghue
When converting from .txt to .yaml we didn't include descriptions for the
existing regulator supplies.

- vdd
- vdda
- vddio

Add those descriptions into the yaml now as they were prior to the
conversion. In the .txt description we marked these regulators as required,
however, that requirement appears to have been in error.

Taking the example of sc7180-trogdor-wormdingler.dtsi. The avdd and avee
come from GPIO controlled external regulators, not the SoC and in this case
there's no need for vddio to power an I/O bus. Similarly the regulators for
the LCD are controlled by the panel driver not by the dsi-ctrl driver.

It would be possible to connect a different type of panel to the DSI bus
here in which case we may or may not want to make use of vdd, vdda or
vddio.

This is also the case for older chipsets like apq8064, msm8916 etc the vdd*
regulators in the dsi-ctrl block are helpers not dependencies.

Add the description of vdd, vdda and vddio back in for the existing
upstream dts where vdd, vdda or vddio are already declared but, don't
declare those regulators required - they are not SoC requirements.

Fixes: 4dbe55c97741 ("dt-bindings: msm: dsi: add yaml schemas for DSI bindings")
Acked-by: Rob Herring 
Signed-off-by: Bryan O'Donoghue 
---
 .../bindings/display/msm/dsi-controller-main.yaml| 12 
 1 file changed, 12 insertions(+)

diff --git 
a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml 
b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
index 47faf08a37443..7b849c8f119a7 100644
--- a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
+++ b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
@@ -147,6 +147,18 @@ properties:
   - port@0
   - port@1
 
+  vdd-supply:
+description:
+  VDD regulator
+
+  vddio-supply:
+description:
+  VDD-IO regulator
+
+  vdda-supply:
+description:
+  VDDA regulator
+
 required:
   - compatible
   - reg
-- 
2.38.1



[PATCH v8 2/3] dt-bindings: msm: dsi-controller-main: Document clocks on a per compatible basis

2023-01-16 Thread Bryan O'Donoghue
Each compatible has a different set of clocks which are associated with it.
Add in the list of clocks for each compatible.

Acked-by: Rob Herring 
Acked-by: Krzysztof Kozlowski 
Signed-off-by: Bryan O'Donoghue 
---
 .../display/msm/dsi-controller-main.yaml  | 219 --
 1 file changed, 202 insertions(+), 17 deletions(-)

diff --git 
a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml 
b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
index 35668caa190c4..47faf08a37443 100644
--- a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
+++ b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
@@ -9,9 +9,6 @@ title: Qualcomm Display DSI controller
 maintainers:
   - Krishna Manikandan 
 
-allOf:
-  - $ref: "../dsi-controller.yaml#"
-
 properties:
   compatible:
 oneOf:
@@ -50,22 +47,23 @@ properties:
 maxItems: 1
 
   clocks:
-items:
-  - description: Display byte clock
-  - description: Display byte interface clock
-  - description: Display pixel clock
-  - description: Display core clock
-  - description: Display AHB clock
-  - description: Display AXI clock
+description: |
+  Several clocks are used, depending on the variant. Typical ones are::
+   - bus:: Display AHB clock.
+   - byte:: Display byte clock.
+   - byte_intf:: Display byte interface clock.
+   - core:: Display core clock.
+   - core_mss:: Core MultiMedia SubSystem clock.
+   - iface:: Display AXI clock.
+   - mdp_core:: MDP Core clock.
+   - mnoc:: MNOC clock
+   - pixel:: Display pixel clock.
+minItems: 3
+maxItems: 9
 
   clock-names:
-items:
-  - const: byte
-  - const: byte_intf
-  - const: pixel
-  - const: core
-  - const: iface
-  - const: bus
+minItems: 3
+maxItems: 9
 
   phys:
 maxItems: 1
@@ -161,6 +159,193 @@ required:
   - assigned-clock-parents
   - ports
 
+allOf:
+  - $ref: ../dsi-controller.yaml#
+  - if:
+  properties:
+compatible:
+  contains:
+enum:
+  - qcom,apq8064-dsi-ctrl
+then:
+  properties:
+clocks:
+  maxItems: 7
+clock-names:
+  items:
+- const: iface
+- const: bus
+- const: core_mmss
+- const: src
+- const: byte
+- const: pixel
+- const: core
+
+  - if:
+  properties:
+compatible:
+  contains:
+enum:
+  - qcom,msm8916-dsi-ctrl
+then:
+  properties:
+clocks:
+  maxItems: 6
+clock-names:
+  items:
+- const: mdp_core
+- const: iface
+- const: bus
+- const: byte
+- const: pixel
+- const: core
+
+  - if:
+  properties:
+compatible:
+  contains:
+enum:
+  - qcom,msm8953-dsi-ctrl
+then:
+  properties:
+clocks:
+  maxItems: 6
+clock-names:
+  items:
+- const: mdp_core
+- const: iface
+- const: bus
+- const: byte
+- const: pixel
+- const: core
+
+  - if:
+  properties:
+compatible:
+  contains:
+enum:
+  - qcom,msm8974-dsi-ctrl
+then:
+  properties:
+clocks:
+  maxItems: 7
+clock-names:
+  items:
+- const: mdp_core
+- const: iface
+- const: bus
+- const: vsync
+- const: byte
+- const: pixel
+- const: core
+- const: core_mmss
+
+  - if:
+  properties:
+compatible:
+  contains:
+enum:
+  - qcom,msm8996-dsi-ctrl
+then:
+  properties:
+clocks:
+  maxItems: 7
+clock-names:
+  items:
+- const: mdp_core
+- const: byte
+- const: iface
+- const: bus
+- const: core_mmss
+- const: pixel
+- const: core
+
+  - if:
+  properties:
+compatible:
+  contains:
+enum:
+  - qcom,msm8998-dsi-ctrl
+then:
+  properties:
+clocks:
+  maxItems: 6
+clock-names:
+  items:
+- const: byte
+- const: byte_intf
+- const: pixel
+- const: core
+- const: iface
+- const: bus
+
+  - if:
+  properties:
+compatible:
+  contains:
+enum:
+  - qcom,sc7180-dsi-ctrl
+  - qcom,sc7280-dsi-ctrl
+  - qcom,sm8250-dsi-ctrl
+  - qcom,sm8150-dsi-ctrl
+  - qcom,sm8250-dsi-ctrl
+  - qcom,sm8350-dsi-ctrl
+  - qcom,sm8450-dsi-ctrl
+  - qcom,sm855

[PATCH v8 0/3] mdss-dsi-ctrl binding and dts fixes

2023-01-16 Thread Bryan O'Donoghue
V8:
- Squash first and last patch to fix bisectability

link: 
https://lore.kernel.org/linux-arm-msm/167388664232.594279.4607492026981202284.r...@kernel.org/T/#u

V7:
- The bulk of the patches for this series have been merged.
  There are still four patches to be pushed/updated.
- Adds clocks for msm8974 - Dmitry
- Adds compat strings for sm8150, sm8350, sm8450, sm8550 - Dmitry
- Changes last patch in series to state - Rob
  compatible:
contains:
  const: qcom,mdss-dsi-ctrl

link: 
https://lore.kernel.org/linux-arm-msm/20221223021025.1646636-1-bryan.odonog...@linaro.org/

V6:
- Squashes a number of patches per Krzysztof's comments on bisectability
- Adds in Acked-by Rob and Krzysztof 

V5:
- Adds compat strings to bindings/display/msm/qcom,SoC-mdss.yaml - Dmitry
- Re-orders simple fixes to the start of the series to allow backports - Dmitry 
- VDDA and drop of node-names - Krzysztof
- Deprecates qcom,dsi-ctrl-6g-qcm2290 - Krzysztof, Dmitry
- Expands set of updated files to include new msm8953 - bod
- Converts to agreed compat string qcom,SoC-dsi-ctrl hence
  -  - qcom,mdss-dsi-ctrl-msm8996
  +  - qcom,msm8996-dsi-ctrl
- Adds RB where indicated for the compat strings.
V4:
- Moves the update of the example from patch #5 to patch #4

V3:
- Moves declaration of mdss-dsi-ctrl into compat string declaration
  patch - Krzysztof, Dmitry
- Renames qcm-2290 compat string to agreed compat "qcom,socname-dsi-ctrl"
  Dmirty, Krzysztof
- Adds empty line after if clause in yaml control flow section - Dmirty
- Adds Rb/Ack - Krzysztof, Dmitry, Doug, David
- vdd*
  Looking into this some more, I don't believe vdd, vdda, vddio ought to be
  required properties. Its up to the PCB manufacturer and the panel in-use
  how that panel is powered. Powering the panel is not something that
  even necessarily needs to be done from the dsi-ctrl driver.
  Originally marking vdd* as required in the .txt was an error, its not a
  SoC level dtsi requirement.
- clock-names
  Rather than replicate the clock-name in each if block I listed them with
  a specific description from a similar reference in usb/qcom,dwc3.yaml.
 
https://lore.kernel.org/linux-arm-msm/eb80681f-2e0b-605f-0444-ec65562f7...@linaro.org/

V2:
https://www.spinics.net/lists/linux-arm-msm/msg116326.html

- Moves the DSI PHY changes to a different later series.
  There are enough dsi-controller-main changes to justify its own
  standalone series.

- The original phy-name binding change given discussion with Rob and
  Krzysztof became its own standalone series that has since been merged.
  https://www.mail-archive.com/dri-devel@lists.freedesktop.org/msg403214.html

- Retains the drop of power-domain from yaml as a required property.
  I dug into the available dtsi. The apq8064 doesn't appear to have any
  GDSC which can be attached as a power-domain, which means the
  power-domain requirement is not universal across the various silicon
  versions.

- Adds Dmitry's RB to power-domain drop

- For the clock declarations I've
  * I noticed that the simple change I had worked for msm8939 but
subsquently broke other dtsi which drove a bigger change to document
the clocks on a per compatible basis.
  * Added compat strings in yaml.
  * Moved the allOf down later in the file to acomodate the if/then.
  * Number of clocks validated on a per compatible basis
  * The driver code which doesn't care about the number of clocks
can still operate on the mdss-dsi-ctrl compat but the dts checks will
validate against the compat string and yaml.

- vdd descriptions
  Took the previous text I missed from the .txt file - Krzysztof, Dmitry
  Adds vdd, vdda and vddio to the required list. This exposes warnings in
  existing dtsi but the previous .txt declared these regulators as
  required. - Krzysztof
 
V1:
This series fixes up a number of dtbs checks which are being flagged adding
in the msm8939 dtsi.


When converting from .txt to .yaml a number of the parameters for the older
msm8916 silicon were not transmitted into the yaml.

Adding in the msm8939 which is a near 1:1 copy of the msm8916 in terms of
dtsi triggers a rake of dtbs checks as a result.

https://www.mail-archive.com/dri-devel@lists.freedesktop.org/msg403211.html

Bryan O'Donoghue (3):
  dt-bindings: msm: dsi-controller-main: Add compatible strings for
every current SoC
  dt-bindings: msm: dsi-controller-main: Document clocks on a per
compatible basis
  dt-bindings: msm: dsi-controller-main: Add vdd* descriptions back in

 .../display/msm/dsi-controller-main.yaml  | 261 --
 .../bindings/display/msm/qcom,mdss.yaml   |   3 +-
 .../display/msm/qcom,msm8998-mdss.yaml|   8 +-
 .../display/msm/qcom,sc7180-mdss.yaml |   6 +-
 .../display/msm/qcom,sc7280-mdss.yaml |   6 +-
 .../display/msm/qcom,sdm845-mdss.yaml |   8 +-
 .../display/msm/qcom,sm8150-mdss.yaml |   8 +-
 .../display/msm/qcom,sm8250-mdss.yaml

[PATCH v7 4/4] dt-bindings: display/msm: Add list of mdss-dsi-ctrl compats

2023-01-16 Thread Bryan O'Donoghue
Add the list of current compats absent the deprecated qcm2290 to the list
of dsi compats listed here.

Several MDSS yaml files exist which document the dsi sub-node.
For each existing SoC MDSS yaml, provide the right dsi compat string.

Signed-off-by: Bryan O'Donoghue 
---
 .../devicetree/bindings/display/msm/qcom,mdss.yaml| 3 ++-
 .../bindings/display/msm/qcom,msm8998-mdss.yaml   | 8 +---
 .../devicetree/bindings/display/msm/qcom,sc7180-mdss.yaml | 6 --
 .../devicetree/bindings/display/msm/qcom,sc7280-mdss.yaml | 6 --
 .../devicetree/bindings/display/msm/qcom,sdm845-mdss.yaml | 8 +---
 .../devicetree/bindings/display/msm/qcom,sm8150-mdss.yaml | 8 +---
 .../devicetree/bindings/display/msm/qcom,sm8250-mdss.yaml | 8 +---
 .../devicetree/bindings/display/msm/qcom,sm8350-mdss.yaml | 6 --
 .../devicetree/bindings/display/msm/qcom,sm8450-mdss.yaml | 4 +++-
 9 files changed, 37 insertions(+), 20 deletions(-)

diff --git a/Documentation/devicetree/bindings/display/msm/qcom,mdss.yaml 
b/Documentation/devicetree/bindings/display/msm/qcom,mdss.yaml
index ba0460268731b..c194bea46c72f 100644
--- a/Documentation/devicetree/bindings/display/msm/qcom,mdss.yaml
+++ b/Documentation/devicetree/bindings/display/msm/qcom,mdss.yaml
@@ -94,7 +94,8 @@ patternProperties:
 type: object
 properties:
   compatible:
-const: qcom,mdss-dsi-ctrl
+contains:
+  const: qcom,mdss-dsi-ctrl
 
   "^phy@[1-9a-f][0-9a-f]*$":
 type: object
diff --git 
a/Documentation/devicetree/bindings/display/msm/qcom,msm8998-mdss.yaml 
b/Documentation/devicetree/bindings/display/msm/qcom,msm8998-mdss.yaml
index 8b82eef28162c..3c2b6ed98a568 100644
--- a/Documentation/devicetree/bindings/display/msm/qcom,msm8998-mdss.yaml
+++ b/Documentation/devicetree/bindings/display/msm/qcom,msm8998-mdss.yaml
@@ -46,7 +46,9 @@ patternProperties:
 type: object
 properties:
   compatible:
-const: qcom,mdss-dsi-ctrl
+items:
+  - const: qcom,msm8998-dsi-ctrl
+  - const: qcom,mdss-dsi-ctrl
 
   "^phy@[0-9a-f]+$":
 type: object
@@ -128,7 +130,7 @@ examples:
 };
 
 dsi@c994000 {
-compatible = "qcom,mdss-dsi-ctrl";
+compatible = "qcom,msm8998-dsi-ctrl", "qcom,mdss-dsi-ctrl";
 reg = <0x0c994000 0x400>;
 reg-names = "dsi_ctrl";
 
@@ -198,7 +200,7 @@ examples:
 };
 
 dsi@c996000 {
-compatible = "qcom,mdss-dsi-ctrl";
+compatible = "qcom,msm8998-dsi-ctrl", "qcom,mdss-dsi-ctrl";
 reg = <0x0c996000 0x400>;
 reg-names = "dsi_ctrl";
 
diff --git 
a/Documentation/devicetree/bindings/display/msm/qcom,sc7180-mdss.yaml 
b/Documentation/devicetree/bindings/display/msm/qcom,sc7180-mdss.yaml
index 5db9b3ab03c98..42ef06edddc42 100644
--- a/Documentation/devicetree/bindings/display/msm/qcom,sc7180-mdss.yaml
+++ b/Documentation/devicetree/bindings/display/msm/qcom,sc7180-mdss.yaml
@@ -58,7 +58,9 @@ patternProperties:
 type: object
 properties:
   compatible:
-const: qcom,mdss-dsi-ctrl
+items:
+  - const: qcom,sc7180-dsi-ctrl
+  - const: qcom,mdss-dsi-ctrl
 
   "^phy@[0-9a-f]+$":
 type: object
@@ -144,7 +146,7 @@ examples:
 };
 
 dsi@ae94000 {
-compatible = "qcom,mdss-dsi-ctrl";
+compatible = "qcom,sc7180-dsi-ctrl", "qcom,mdss-dsi-ctrl";
 reg = <0x0ae94000 0x400>;
 reg-names = "dsi_ctrl";
 
diff --git 
a/Documentation/devicetree/bindings/display/msm/qcom,sc7280-mdss.yaml 
b/Documentation/devicetree/bindings/display/msm/qcom,sc7280-mdss.yaml
index a4e3ada2affcf..078e1d1a7d2fc 100644
--- a/Documentation/devicetree/bindings/display/msm/qcom,sc7280-mdss.yaml
+++ b/Documentation/devicetree/bindings/display/msm/qcom,sc7280-mdss.yaml
@@ -58,7 +58,9 @@ patternProperties:
 type: object
 properties:
   compatible:
-const: qcom,mdss-dsi-ctrl
+items:
+  - const: qcom,sc7280-dsi-ctrl
+  - const: qcom,mdss-dsi-ctrl
 
   "^edp@[0-9a-f]+$":
 type: object
@@ -165,7 +167,7 @@ examples:
 };
 
 dsi@ae94000 {
-compatible = "qcom,mdss-dsi-ctrl";
+compatible = "qcom,sc7280-dsi-ctrl", "qcom,mdss-dsi-ctrl";
 reg = <0x0ae94000 0x400>;
 reg-names = "dsi_ctrl";
 
diff --git 
a/Documentation/devicetree/bindings/display/msm/qcom,sdm845-mdss.yaml 
b/Documentation/devicetree/bindings/display/msm/qcom,sdm845-mdss.yaml
index 8f60be6147d88..6ecb00920d7f6 100644
--- a/Documentation/devicetree/bindings/display/msm/qcom,sdm845-mdss.yaml
+++ b/Documentation/devicetree/bindings/display/msm/qcom,sdm845-mdss.yaml
@@ -56,7 +56,9 @@ patternProper

[PATCH v7 2/4] dt-bindings: msm: dsi-controller-main: Document clocks on a per compatible basis

2023-01-16 Thread Bryan O'Donoghue
Each compatible has a different set of clocks which are associated with it.
Add in the list of clocks for each compatible.

Acked-by: Rob Herring 
Acked-by: Krzysztof Kozlowski 
Signed-off-by: Bryan O'Donoghue 
---
 .../display/msm/dsi-controller-main.yaml  | 219 --
 1 file changed, 202 insertions(+), 17 deletions(-)

diff --git 
a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml 
b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
index 35668caa190c4..47faf08a37443 100644
--- a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
+++ b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
@@ -9,9 +9,6 @@ title: Qualcomm Display DSI controller
 maintainers:
   - Krishna Manikandan 
 
-allOf:
-  - $ref: "../dsi-controller.yaml#"
-
 properties:
   compatible:
 oneOf:
@@ -50,22 +47,23 @@ properties:
 maxItems: 1
 
   clocks:
-items:
-  - description: Display byte clock
-  - description: Display byte interface clock
-  - description: Display pixel clock
-  - description: Display core clock
-  - description: Display AHB clock
-  - description: Display AXI clock
+description: |
+  Several clocks are used, depending on the variant. Typical ones are::
+   - bus:: Display AHB clock.
+   - byte:: Display byte clock.
+   - byte_intf:: Display byte interface clock.
+   - core:: Display core clock.
+   - core_mss:: Core MultiMedia SubSystem clock.
+   - iface:: Display AXI clock.
+   - mdp_core:: MDP Core clock.
+   - mnoc:: MNOC clock
+   - pixel:: Display pixel clock.
+minItems: 3
+maxItems: 9
 
   clock-names:
-items:
-  - const: byte
-  - const: byte_intf
-  - const: pixel
-  - const: core
-  - const: iface
-  - const: bus
+minItems: 3
+maxItems: 9
 
   phys:
 maxItems: 1
@@ -161,6 +159,193 @@ required:
   - assigned-clock-parents
   - ports
 
+allOf:
+  - $ref: ../dsi-controller.yaml#
+  - if:
+  properties:
+compatible:
+  contains:
+enum:
+  - qcom,apq8064-dsi-ctrl
+then:
+  properties:
+clocks:
+  maxItems: 7
+clock-names:
+  items:
+- const: iface
+- const: bus
+- const: core_mmss
+- const: src
+- const: byte
+- const: pixel
+- const: core
+
+  - if:
+  properties:
+compatible:
+  contains:
+enum:
+  - qcom,msm8916-dsi-ctrl
+then:
+  properties:
+clocks:
+  maxItems: 6
+clock-names:
+  items:
+- const: mdp_core
+- const: iface
+- const: bus
+- const: byte
+- const: pixel
+- const: core
+
+  - if:
+  properties:
+compatible:
+  contains:
+enum:
+  - qcom,msm8953-dsi-ctrl
+then:
+  properties:
+clocks:
+  maxItems: 6
+clock-names:
+  items:
+- const: mdp_core
+- const: iface
+- const: bus
+- const: byte
+- const: pixel
+- const: core
+
+  - if:
+  properties:
+compatible:
+  contains:
+enum:
+  - qcom,msm8974-dsi-ctrl
+then:
+  properties:
+clocks:
+  maxItems: 7
+clock-names:
+  items:
+- const: mdp_core
+- const: iface
+- const: bus
+- const: vsync
+- const: byte
+- const: pixel
+- const: core
+- const: core_mmss
+
+  - if:
+  properties:
+compatible:
+  contains:
+enum:
+  - qcom,msm8996-dsi-ctrl
+then:
+  properties:
+clocks:
+  maxItems: 7
+clock-names:
+  items:
+- const: mdp_core
+- const: byte
+- const: iface
+- const: bus
+- const: core_mmss
+- const: pixel
+- const: core
+
+  - if:
+  properties:
+compatible:
+  contains:
+enum:
+  - qcom,msm8998-dsi-ctrl
+then:
+  properties:
+clocks:
+  maxItems: 6
+clock-names:
+  items:
+- const: byte
+- const: byte_intf
+- const: pixel
+- const: core
+- const: iface
+- const: bus
+
+  - if:
+  properties:
+compatible:
+  contains:
+enum:
+  - qcom,sc7180-dsi-ctrl
+  - qcom,sc7280-dsi-ctrl
+  - qcom,sm8250-dsi-ctrl
+  - qcom,sm8150-dsi-ctrl
+  - qcom,sm8250-dsi-ctrl
+  - qcom,sm8350-dsi-ctrl
+  - qcom,sm8450-dsi-ctrl
+  - qcom,sm855

[PATCH v7 3/4] dt-bindings: msm: dsi-controller-main: Add vdd* descriptions back in

2023-01-16 Thread Bryan O'Donoghue
When converting from .txt to .yaml we didn't include descriptions for the
existing regulator supplies.

- vdd
- vdda
- vddio

Add those descriptions into the yaml now as they were prior to the
conversion. In the .txt description we marked these regulators as required,
however, that requirement appears to have been in error.

Taking the example of sc7180-trogdor-wormdingler.dtsi. The avdd and avee
come from GPIO controlled external regulators, not the SoC and in this case
there's no need for vddio to power an I/O bus. Similarly the regulators for
the LCD are controlled by the panel driver not by the dsi-ctrl driver.

It would be possible to connect a different type of panel to the DSI bus
here in which case we may or may not want to make use of vdd, vdda or
vddio.

This is also the case for older chipsets like apq8064, msm8916 etc the vdd*
regulators in the dsi-ctrl block are helpers not dependencies.

Add the description of vdd, vdda and vddio back in for the existing
upstream dts where vdd, vdda or vddio are already declared but, don't
declare those regulators required - they are not SoC requirements.

Fixes: 4dbe55c97741 ("dt-bindings: msm: dsi: add yaml schemas for DSI bindings")
Acked-by: Rob Herring 
Signed-off-by: Bryan O'Donoghue 
---
 .../bindings/display/msm/dsi-controller-main.yaml| 12 
 1 file changed, 12 insertions(+)

diff --git 
a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml 
b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
index 47faf08a37443..7b849c8f119a7 100644
--- a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
+++ b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
@@ -147,6 +147,18 @@ properties:
   - port@0
   - port@1
 
+  vdd-supply:
+description:
+  VDD regulator
+
+  vddio-supply:
+description:
+  VDD-IO regulator
+
+  vdda-supply:
+description:
+  VDDA regulator
+
 required:
   - compatible
   - reg
-- 
2.38.1



[PATCH v7 1/4] dt-bindings: msm: dsi-controller-main: Add compatible strings for every current SoC

2023-01-16 Thread Bryan O'Donoghue
Currently we do not differentiate between the various users of the
qcom,mdss-dsi-ctrl. The driver is flexible enough to operate from one
compatible string but, the hardware does have some significant differences
in the number of clocks.

To facilitate documenting the clocks add the following compatible strings

- qcom,apq8064-dsi-ctrl
- qcom,msm8916-dsi-ctrl
- qcom,msm8953-dsi-ctrl
- qcom,msm8974-dsi-ctrl
- qcom,msm8996-dsi-ctrl
- qcom,msm8998-dsi-ctrl
- qcom,sc7180-dsi-ctrl
- qcom,sc7280-dsi-ctrl
- qcom,sdm660-dsi-ctrl
- qcom,sdm845-dsi-ctrl
- qcom,sm8150-dsi-ctrl
- qcom,sm8250-dsi-ctrl
- qcom,sm8350-dsi-ctrl
- qcom,sm8450-dsi-ctrl
- qcom,sm8550-dsi-ctrl
- qcom,qcm2290-dsi-ctrl

Deprecate qcom,dsi-ctrl-6g-qcm2290 in favour of the desired format while we
do so.

Reviewed-by: Krzysztof Kozlowski 
Signed-off-by: Bryan O'Donoghue 
---
 .../display/msm/dsi-controller-main.yaml  | 30 ---
 1 file changed, 26 insertions(+), 4 deletions(-)

diff --git 
a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml 
b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
index 6e2fd6e9fa7f0..35668caa190c4 100644
--- a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
+++ b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
@@ -14,9 +14,31 @@ allOf:
 
 properties:
   compatible:
-enum:
-  - qcom,mdss-dsi-ctrl
-  - qcom,dsi-ctrl-6g-qcm2290
+oneOf:
+  - items:
+  - enum:
+  - qcom,apq8064-dsi-ctrl
+  - qcom,msm8916-dsi-ctrl
+  - qcom,msm8953-dsi-ctrl
+  - qcom,msm8974-dsi-ctrl
+  - qcom,msm8996-dsi-ctrl
+  - qcom,msm8998-dsi-ctrl
+  - qcom,qcm2290-dsi-ctrl
+  - qcom,sc7180-dsi-ctrl
+  - qcom,sc7280-dsi-ctrl
+  - qcom,sdm660-dsi-ctrl
+  - qcom,sdm845-dsi-ctrl
+  - qcom,sm8150-dsi-ctrl
+  - qcom,sm8250-dsi-ctrl
+  - qcom,sm8350-dsi-ctrl
+  - qcom,sm8450-dsi-ctrl
+  - qcom,sm8550-dsi-ctrl
+  - const: qcom,mdss-dsi-ctrl
+  - items:
+  - enum:
+  - dsi-ctrl-6g-qcm2290
+  - const: qcom,mdss-dsi-ctrl
+deprecated: true
 
   reg:
 maxItems: 1
@@ -149,7 +171,7 @@ examples:
  #include 
 
  dsi@ae94000 {
-   compatible = "qcom,mdss-dsi-ctrl";
+   compatible = "qcom,sc7180-dsi-ctrl", "qcom,mdss-dsi-ctrl";
reg = <0x0ae94000 0x400>;
reg-names = "dsi_ctrl";
 
-- 
2.38.1



[PATCH v7 0/4] mdss-dsi-ctrl binding and dts fixes

2023-01-16 Thread Bryan O'Donoghue
V7:
- The bulk of the patches for this series have been merged.
  There are still four patches to be pushed/updated.
- Adds clocks for msm8974 - Dmitry
- Adds compat strings for sm8150, sm8350, sm8450, sm8550 - Dmitry
- Changes last patch in series to state - Rob
  compatible:
contains:
  const: qcom,mdss-dsi-ctrl

link: 
https://lore.kernel.org/linux-arm-msm/20221223021025.1646636-1-bryan.odonog...@linaro.org/

V6:
- Squashes a number of patches per Krzysztof's comments on bisectability
- Adds in Acked-by Rob and Krzysztof 

V5:
- Adds compat strings to bindings/display/msm/qcom,SoC-mdss.yaml - Dmitry
- Re-orders simple fixes to the start of the series to allow backports - Dmitry 
- VDDA and drop of node-names - Krzysztof
- Deprecates qcom,dsi-ctrl-6g-qcm2290 - Krzysztof, Dmitry
- Expands set of updated files to include new msm8953 - bod
- Converts to agreed compat string qcom,SoC-dsi-ctrl hence
  -  - qcom,mdss-dsi-ctrl-msm8996
  +  - qcom,msm8996-dsi-ctrl
- Adds RB where indicated for the compat strings.
V4:
- Moves the update of the example from patch #5 to patch #4

V3:
- Moves declaration of mdss-dsi-ctrl into compat string declaration
  patch - Krzysztof, Dmitry
- Renames qcm-2290 compat string to agreed compat "qcom,socname-dsi-ctrl"
  Dmirty, Krzysztof
- Adds empty line after if clause in yaml control flow section - Dmirty
- Adds Rb/Ack - Krzysztof, Dmitry, Doug, David
- vdd*
  Looking into this some more, I don't believe vdd, vdda, vddio ought to be
  required properties. Its up to the PCB manufacturer and the panel in-use
  how that panel is powered. Powering the panel is not something that
  even necessarily needs to be done from the dsi-ctrl driver.
  Originally marking vdd* as required in the .txt was an error, its not a
  SoC level dtsi requirement.
- clock-names
  Rather than replicate the clock-name in each if block I listed them with
  a specific description from a similar reference in usb/qcom,dwc3.yaml.
 
https://lore.kernel.org/linux-arm-msm/eb80681f-2e0b-605f-0444-ec65562f7...@linaro.org/

V2:
https://www.spinics.net/lists/linux-arm-msm/msg116326.html

- Moves the DSI PHY changes to a different later series.
  There are enough dsi-controller-main changes to justify its own
  standalone series.

- The original phy-name binding change given discussion with Rob and
  Krzysztof became its own standalone series that has since been merged.
  https://www.mail-archive.com/dri-devel@lists.freedesktop.org/msg403214.html

- Retains the drop of power-domain from yaml as a required property.
  I dug into the available dtsi. The apq8064 doesn't appear to have any
  GDSC which can be attached as a power-domain, which means the
  power-domain requirement is not universal across the various silicon
  versions.

- Adds Dmitry's RB to power-domain drop

- For the clock declarations I've
  * I noticed that the simple change I had worked for msm8939 but
subsquently broke other dtsi which drove a bigger change to document
the clocks on a per compatible basis.
  * Added compat strings in yaml.
  * Moved the allOf down later in the file to acomodate the if/then.
  * Number of clocks validated on a per compatible basis
  * The driver code which doesn't care about the number of clocks
can still operate on the mdss-dsi-ctrl compat but the dts checks will
validate against the compat string and yaml.

- vdd descriptions
  Took the previous text I missed from the .txt file - Krzysztof, Dmitry
  Adds vdd, vdda and vddio to the required list. This exposes warnings in
  existing dtsi but the previous .txt declared these regulators as
  required. - Krzysztof
 
V1:
This series fixes up a number of dtbs checks which are being flagged adding
in the msm8939 dtsi.


When converting from .txt to .yaml a number of the parameters for the older
msm8916 silicon were not transmitted into the yaml.

Adding in the msm8939 which is a near 1:1 copy of the msm8916 in terms of
dtsi triggers a rake of dtbs checks as a result.

https://www.mail-archive.com/dri-devel@lists.freedesktop.org/msg403211.html

Bryan O'Donoghue (4):
  dt-bindings: msm: dsi-controller-main: Add compatible strings for
every current SoC
  dt-bindings: msm: dsi-controller-main: Document clocks on a per
compatible basis
  dt-bindings: msm: dsi-controller-main: Add vdd* descriptions back in
  dt-bindings: display/msm: Add list of mdss-dsi-ctrl compats

 .../display/msm/dsi-controller-main.yaml  | 261 --
 .../bindings/display/msm/qcom,mdss.yaml   |   3 +-
 .../display/msm/qcom,msm8998-mdss.yaml|   8 +-
 .../display/msm/qcom,sc7180-mdss.yaml |   6 +-
 .../display/msm/qcom,sc7280-mdss.yaml |   6 +-
 .../display/msm/qcom,sdm845-mdss.yaml |   8 +-
 .../display/msm/qcom,sm8150-mdss.yaml |   8 +-
 .../display/msm/qcom,sm8250-mdss.yaml |   8 +-
 .../display/msm/qcom,sm8350-mdss.yaml |   6 +-
 .../display/msm/qcom,sm8450

[PATCH v3 1/1] dt-bindings: msm: dsi-phy-28nm: Add missing qcom, dsi-phy-regulator-ldo-mode

2022-12-29 Thread Bryan O'Donoghue
Add in missing qcom,dsi-phy-regulator-ldo-mode to the 28nm DSI PHY.
When converting from .txt to .yaml we missed this one.

Fixes: 4dbe55c97741 ("dt-bindings: msm: dsi: add yaml schemas for DSI bindings")
Reviewed-by: Dmitry Baryshkov 
Signed-off-by: Bryan O'Donoghue 
---
 .../devicetree/bindings/display/msm/dsi-phy-28nm.yaml | 4 
 1 file changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/display/msm/dsi-phy-28nm.yaml 
b/Documentation/devicetree/bindings/display/msm/dsi-phy-28nm.yaml
index 3d8540a06fe22..2f1fd140c87df 100644
--- a/Documentation/devicetree/bindings/display/msm/dsi-phy-28nm.yaml
+++ b/Documentation/devicetree/bindings/display/msm/dsi-phy-28nm.yaml
@@ -34,6 +34,10 @@ properties:
   vddio-supply:
 description: Phandle to vdd-io regulator device node.
 
+  qcom,dsi-phy-regulator-ldo-mode:
+type: boolean
+description: Indicates if the LDO mode PHY regulator is wanted.
+
 required:
   - compatible
   - reg
-- 
2.34.1



[PATCH v3 0/1] Fixup documentation for dsi-phy-28nm

2022-12-29 Thread Bryan O'Donoghue
V3:
Moves change to last item in list so as not to break-up grouping of 
reg/reg-names

V2:
This is the one remaining patch I had from a previous series for
mdss-dsi-ctrl and the dsi-phy. The mdss-dsi-ctrl set became a bigger so I
split out the 28nm phy fixes.

I'm resubmitting with Dmitry's RB as a standalone.

Old: 
https://lore.kernel.org/all/20220630120845.3356144-1-bryan.odonog...@linaro.org/

Bryan O'Donoghue (1):
  dt-bindings: msm: dsi-phy-28nm: Add missing
qcom,dsi-phy-regulator-ldo-mode

 .../devicetree/bindings/display/msm/dsi-phy-28nm.yaml | 4 
 1 file changed, 4 insertions(+)

-- 
2.34.1



[PATCH v2 1/1] dt-bindings: msm: dsi-phy-28nm: Add missing qcom, dsi-phy-regulator-ldo-mode

2022-12-28 Thread Bryan O'Donoghue
Add in missing qcom,dsi-phy-regulator-ldo-mode to the 28nm DSI PHY.
When converting from .txt to .yaml we missed this one.

Fixes: 4dbe55c97741 ("dt-bindings: msm: dsi: add yaml schemas for DSI bindings")
Reviewed-by: Dmitry Baryshkov 
Signed-off-by: Bryan O'Donoghue 
---
 .../devicetree/bindings/display/msm/dsi-phy-28nm.yaml | 4 
 1 file changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/display/msm/dsi-phy-28nm.yaml 
b/Documentation/devicetree/bindings/display/msm/dsi-phy-28nm.yaml
index 3d8540a06fe22..95076c90ea171 100644
--- a/Documentation/devicetree/bindings/display/msm/dsi-phy-28nm.yaml
+++ b/Documentation/devicetree/bindings/display/msm/dsi-phy-28nm.yaml
@@ -25,6 +25,10 @@ properties:
   - description: dsi phy register set
   - description: dsi phy regulator register set
 
+  qcom,dsi-phy-regulator-ldo-mode:
+type: boolean
+description: Indicates if the LDO mode PHY regulator is wanted.
+
   reg-names:
 items:
   - const: dsi_pll
-- 
2.34.1



[PATCH v2 0/1] Fixup documentation for dsi-phy-28nm

2022-12-28 Thread Bryan O'Donoghue
This is the one remaining patch I had from a previous series for
mdss-dsi-ctrl and the dsi-phy. The mdss-dsi-ctrl set became a bigger so I
split out the 28nm phy fixes.

I'm resubmitting with Dmitry's RB as a standalone.

Old: 
https://lore.kernel.org/all/20220630120845.3356144-1-bryan.odonog...@linaro.org/

Bryan O'Donoghue (1):
  dt-bindings: msm: dsi-phy-28nm: Add missing
qcom,dsi-phy-regulator-ldo-mode

 .../devicetree/bindings/display/msm/dsi-phy-28nm.yaml | 4 
 1 file changed, 4 insertions(+)

-- 
2.34.1



[PATCH v6 17/18] arm64: dts: qcom: sdm845: Add compat qcom, sdm845-dsi-ctrl

2022-12-22 Thread Bryan O'Donoghue
Add silicon specific compatible qcom,sdm845-dsi-ctrl to the
mdss-dsi-ctrl block. This allows us to differentiate the specific bindings
for sdm845 against the yaml documentation.

Reviewed-by: Douglas Anderson 
Reviewed-by: Dmitry Baryshkov 
Signed-off-by: Bryan O'Donoghue 
---
 arch/arm64/boot/dts/qcom/sdm845.dtsi | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi 
b/arch/arm64/boot/dts/qcom/sdm845.dtsi
index 65032b94b46d6..623e5d7dddfd2 100644
--- a/arch/arm64/boot/dts/qcom/sdm845.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi
@@ -4645,7 +4645,8 @@ opp-81000 {
};
 
dsi0: dsi@ae94000 {
-   compatible = "qcom,mdss-dsi-ctrl";
+   compatible = "qcom,sdm845-dsi-ctrl",
+"qcom,mdss-dsi-ctrl";
reg = <0 0x0ae94000 0 0x400>;
reg-names = "dsi_ctrl";
 
@@ -4716,7 +4717,8 @@ dsi0_phy: phy@ae94400 {
};
 
dsi1: dsi@ae96000 {
-   compatible = "qcom,mdss-dsi-ctrl";
+   compatible = "qcom,sdm845-dsi-ctrl",
+"qcom,mdss-dsi-ctrl";
reg = <0 0x0ae96000 0 0x400>;
reg-names = "dsi_ctrl";
 
-- 
2.38.1



[PATCH v6 13/18] arm64: dts: qcom: sc7180: Add compat qcom, sc7180-dsi-ctrl

2022-12-22 Thread Bryan O'Donoghue
Add silicon specific compatible qcom,sc7180-dsi-ctrl to the
mdss-dsi-ctrl block. This allows us to differentiate the specific bindings
for sc7180 against the yaml documentation.

Reviewed-by: Douglas Anderson 
Reviewed-by: Dmitry Baryshkov 
Signed-off-by: Bryan O'Donoghue 
---
 arch/arm64/boot/dts/qcom/sc7180.dtsi | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi 
b/arch/arm64/boot/dts/qcom/sc7180.dtsi
index f71cf21a8dd8a..fbd6a7b31eac2 100644
--- a/arch/arm64/boot/dts/qcom/sc7180.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7180.dtsi
@@ -3022,7 +3022,8 @@ opp-46000 {
};
 
dsi0: dsi@ae94000 {
-   compatible = "qcom,mdss-dsi-ctrl";
+   compatible = "qcom,sc7180-dsi-ctrl",
+"qcom,mdss-dsi-ctrl";
reg = <0 0x0ae94000 0 0x400>;
reg-names = "dsi_ctrl";
 
-- 
2.38.1



[PATCH v6 16/18] arm64: dts: qcom: sdm660: Add compat qcom, sdm660-dsi-ctrl

2022-12-22 Thread Bryan O'Donoghue
Add silicon specific compatible qcom,sdm660-dsi-ctrl to the
mdss-dsi-ctrl block. This allows us to differentiate the specific bindings
for sdm660 against the yaml documentation.

Signed-off-by: Bryan O'Donoghue 
---
 arch/arm64/boot/dts/qcom/sdm660.dtsi | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/sdm660.dtsi 
b/arch/arm64/boot/dts/qcom/sdm660.dtsi
index d52123cb5cd31..e8a15b9cee18f 100644
--- a/arch/arm64/boot/dts/qcom/sdm660.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm660.dtsi
@@ -154,7 +154,8 @@ mdp5_intf2_out: endpoint {
 
  {
dsi1: dsi@c996000 {
-   compatible = "qcom,mdss-dsi-ctrl";
+   compatible = "qcom,sdm660-dsi-ctrl",
+"qcom,mdss-dsi-ctrl";
reg = <0x0c996000 0x400>;
reg-names = "dsi_ctrl";
 
-- 
2.38.1



[PATCH v6 15/18] arm64: dts: qcom: sdm630: Add compat qcom, sdm660-dsi-ctrl

2022-12-22 Thread Bryan O'Donoghue
The sdm630 can use the sdm660 mdss-dsi-ctrl compat. Currently it has the
same set of binding dependencies as sdm660.

Suggested-by: Dmitry Baryshkov 
Signed-off-by: Bryan O'Donoghue 
---
 arch/arm64/boot/dts/qcom/sdm630.dtsi | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/sdm630.dtsi 
b/arch/arm64/boot/dts/qcom/sdm630.dtsi
index 13e6a4fbba27c..8b9c7421bc0c6 100644
--- a/arch/arm64/boot/dts/qcom/sdm630.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm630.dtsi
@@ -1572,7 +1572,8 @@ opp-41250 {
};
 
dsi0: dsi@c994000 {
-   compatible = "qcom,mdss-dsi-ctrl";
+   compatible = "qcom,sdm660-dsi-ctrl",
+"qcom,mdss-dsi-ctrl";
reg = <0x0c994000 0x400>;
reg-names = "dsi_ctrl";
 
-- 
2.38.1



[PATCH v6 18/18] arm64: dts: qcom: sm8250: Add compat qcom, sm8250-dsi-ctrl

2022-12-22 Thread Bryan O'Donoghue
Add silicon specific compatible qcom,sm8250-dsi-ctrl to the
mdss-dsi-ctrl block. This allows us to differentiate the specific bindings
for sm8250 against the yaml documentation.

Reviewed-by: Dmitry Baryshkov 
Signed-off-by: Bryan O'Donoghue 
---
 arch/arm64/boot/dts/qcom/sm8250.dtsi | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi 
b/arch/arm64/boot/dts/qcom/sm8250.dtsi
index dab5579946f35..9240132efa75e 100644
--- a/arch/arm64/boot/dts/qcom/sm8250.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi
@@ -4050,7 +4050,8 @@ opp-46000 {
};
 
dsi0: dsi@ae94000 {
-   compatible = "qcom,mdss-dsi-ctrl";
+   compatible = "qcom,sm8250-dsi-ctrl",
+"qcom,mdss-dsi-ctrl";
reg = <0 0x0ae94000 0 0x400>;
reg-names = "dsi_ctrl";
 
@@ -4141,7 +4142,8 @@ dsi0_phy: phy@ae94400 {
};
 
dsi1: dsi@ae96000 {
-   compatible = "qcom,mdss-dsi-ctrl";
+   compatible = "qcom,sm8250-dsi-ctrl",
+"qcom,mdss-dsi-ctrl";
reg = <0 0x0ae96000 0 0x400>;
reg-names = "dsi_ctrl";
 
-- 
2.38.1



[PATCH v6 05/18] dt-bindings: msm: dsi-controller-main: Document clocks on a per compatible basis

2022-12-22 Thread Bryan O'Donoghue
Each compatible has a different set of clocks which are associated with it.
Add in the list of clocks for each compatible.

Acked-by: Rob Herring 
Acked-by: Krzysztof Kozlowski 
Signed-off-by: Bryan O'Donoghue 
---
 .../display/msm/dsi-controller-main.yaml  | 209 --
 1 file changed, 192 insertions(+), 17 deletions(-)

diff --git 
a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml 
b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
index 98d54a7ee28d4..4b79b31123515 100644
--- a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
+++ b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
@@ -9,9 +9,6 @@ title: Qualcomm Display DSI controller
 maintainers:
   - Krishna Manikandan 
 
-allOf:
-  - $ref: "../dsi-controller.yaml#"
-
 properties:
   compatible:
 oneOf:
@@ -46,22 +43,23 @@ properties:
 maxItems: 1
 
   clocks:
-items:
-  - description: Display byte clock
-  - description: Display byte interface clock
-  - description: Display pixel clock
-  - description: Display core clock
-  - description: Display AHB clock
-  - description: Display AXI clock
+description: |
+  Several clocks are used, depending on the variant. Typical ones are::
+   - bus:: Display AHB clock.
+   - byte:: Display byte clock.
+   - byte_intf:: Display byte interface clock.
+   - core:: Display core clock.
+   - core_mss:: Core MultiMedia SubSystem clock.
+   - iface:: Display AXI clock.
+   - mdp_core:: MDP Core clock.
+   - mnoc:: MNOC clock
+   - pixel:: Display pixel clock.
+minItems: 3
+maxItems: 9
 
   clock-names:
-items:
-  - const: byte
-  - const: byte_intf
-  - const: pixel
-  - const: core
-  - const: iface
-  - const: bus
+minItems: 3
+maxItems: 9
 
   phys:
 maxItems: 1
@@ -157,6 +155,183 @@ required:
   - assigned-clock-parents
   - ports
 
+allOf:
+  - $ref: ../dsi-controller.yaml#
+  - if:
+  properties:
+compatible:
+  contains:
+enum:
+  - qcom,apq8064-dsi-ctrl
+then:
+  properties:
+clocks:
+  maxItems: 7
+clock-names:
+  items:
+- const: iface
+- const: bus
+- const: core_mmss
+- const: src
+- const: byte
+- const: pixel
+- const: core
+
+  - if:
+  properties:
+compatible:
+  contains:
+enum:
+  - qcom,msm8916-dsi-ctrl
+then:
+  properties:
+clocks:
+  maxItems: 6
+clock-names:
+  items:
+- const: mdp_core
+- const: iface
+- const: bus
+- const: byte
+- const: pixel
+- const: core
+
+  - if:
+  properties:
+compatible:
+  contains:
+enum:
+  - qcom,msm8953-dsi-ctrl
+then:
+  properties:
+clocks:
+  maxItems: 6
+clock-names:
+  items:
+- const: mdp_core
+- const: iface
+- const: bus
+- const: byte
+- const: pixel
+- const: core
+
+  - if:
+  properties:
+compatible:
+  contains:
+enum:
+  - qcom,msm8974-dsi-ctrl
+then:
+  properties:
+clocks:
+  maxItems: 3
+clock-names:
+  items:
+- const: iface
+- const: bus
+- const: vsync
+
+  - if:
+  properties:
+compatible:
+  contains:
+enum:
+  - qcom,msm8996-dsi-ctrl
+then:
+  properties:
+clocks:
+  maxItems: 7
+clock-names:
+  items:
+- const: mdp_core
+- const: byte
+- const: iface
+- const: bus
+- const: core_mmss
+- const: pixel
+- const: core
+
+  - if:
+  properties:
+compatible:
+  contains:
+enum:
+  - qcom,msm8998-dsi-ctrl
+then:
+  properties:
+clocks:
+  maxItems: 6
+clock-names:
+  items:
+- const: byte
+- const: byte_intf
+- const: pixel
+- const: core
+- const: iface
+- const: bus
+
+  - if:
+  properties:
+compatible:
+  contains:
+enum:
+  - qcom,sc7180-dsi-ctrl
+  - qcom,sc7280-dsi-ctrl
+  - qcom,sm8250-dsi-ctrl
+then:
+  properties:
+clocks:
+  maxItems: 6
+clock-names:
+  items:
+- const: byte
+- const: byte_intf
+- const: pixel
+- const: core
+- const: iface
+- const: bus
+
+  - if:
+  properties:
+

[PATCH v6 12/18] arm64: dts: qcom: msm8996: Add compat qcom, msm8996-dsi-ctrl

2022-12-22 Thread Bryan O'Donoghue
Add silicon specific compatible qcom,msm8996-dsi-ctrl to the
mdss-dsi-ctrl block. This allows us to differentiate the specific bindings
for msm8996 against the yaml documentation.

Reviewed-by: Dmitry Baryshkov 
Signed-off-by: Bryan O'Donoghue 
---
 arch/arm64/boot/dts/qcom/msm8996.dtsi | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi 
b/arch/arm64/boot/dts/qcom/msm8996.dtsi
index d31464204f696..c6d8371043a9a 100644
--- a/arch/arm64/boot/dts/qcom/msm8996.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi
@@ -989,7 +989,8 @@ mdp5_intf2_out: endpoint {
};
 
dsi0: dsi@994000 {
-   compatible = "qcom,mdss-dsi-ctrl";
+   compatible = "qcom,msm8996-dsi-ctrl",
+"qcom,mdss-dsi-ctrl";
reg = <0x00994000 0x400>;
reg-names = "dsi_ctrl";
 
@@ -1056,7 +1057,8 @@ dsi0_phy: phy@994400 {
};
 
dsi1: dsi@996000 {
-   compatible = "qcom,mdss-dsi-ctrl";
+   compatible = "qcom,msm8996-dsi-ctrl",
+"qcom,mdss-dsi-ctrl";
reg = <0x00996000 0x400>;
reg-names = "dsi_ctrl";
 
-- 
2.38.1



[PATCH v6 14/18] arm64: dts: qcom: sc7280: Add compat qcom, sc7280-dsi-ctrl

2022-12-22 Thread Bryan O'Donoghue
Add silicon specific compatible qcom,sc7280-dsi-ctrl to the
mdss-dsi-ctrl block. This allows us to differentiate the specific bindings
for sc7280 against the yaml documentation.

Reviewed-by: Douglas Anderson 
Reviewed-by: Dmitry Baryshkov 
Signed-off-by: Bryan O'Donoghue 
---
 arch/arm64/boot/dts/qcom/sc7280.dtsi | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/sc7280.dtsi 
b/arch/arm64/boot/dts/qcom/sc7280.dtsi
index 0adf13399e649..a437ad4047f52 100644
--- a/arch/arm64/boot/dts/qcom/sc7280.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7280.dtsi
@@ -3906,7 +3906,8 @@ opp-50667 {
};
 
mdss_dsi: dsi@ae94000 {
-   compatible = "qcom,mdss-dsi-ctrl";
+   compatible = "qcom,sc7280-dsi-ctrl",
+"qcom,mdss-dsi-ctrl";
reg = <0 0x0ae94000 0 0x400>;
reg-names = "dsi_ctrl";
 
-- 
2.38.1



[PATCH v6 11/18] arm64: dts: qcom: msm8953: Add compat qcom, msm8953-dsi-ctrl

2022-12-22 Thread Bryan O'Donoghue
Add silicon specific compatible qcom,msm8953-dsi-ctrl to the
mdss-dsi-ctrl block. This allows us to differentiate the specific bindings
for msm8953 against the yaml documentation.

Signed-off-by: Bryan O'Donoghue 
---
 arch/arm64/boot/dts/qcom/msm8953.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/msm8953.dtsi 
b/arch/arm64/boot/dts/qcom/msm8953.dtsi
index 32349174c4bd9..acbe100d9b5be 100644
--- a/arch/arm64/boot/dts/qcom/msm8953.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8953.dtsi
@@ -797,7 +797,7 @@ mdp5_intf2_out: endpoint {
};
 
dsi0: dsi@1a94000 {
-   compatible = "qcom,mdss-dsi-ctrl";
+   compatible = "qcom,msm8953-dsi-ctrl", 
"qcom,mdss-dsi-ctrl";
reg = <0x1a94000 0x400>;
reg-names = "dsi_ctrl";
 
@@ -867,7 +867,7 @@ dsi0_phy: phy@1a94400 {
};
 
dsi1: dsi@1a96000 {
-   compatible = "qcom,mdss-dsi-ctrl";
+   compatible = "qcom,msm8953-dsi-ctrl", 
"qcom,mdss-dsi-ctrl";
reg = <0x1a96000 0x400>;
reg-names = "dsi_ctrl";
 
-- 
2.38.1



[PATCH v6 10/18] arm64: dts: qcom: msm8916: Add compat qcom, msm8916-dsi-ctrl

2022-12-22 Thread Bryan O'Donoghue
Add silicon specific compatible qcom,msm8916-dsi-ctrl to the
mdss-dsi-ctrl block. This allows us to differentiate the specific bindings
for msm8916 against the yaml documentation.

Reviewed-by: Dmitry Baryshkov 
Signed-off-by: Bryan O'Donoghue 
---
 arch/arm64/boot/dts/qcom/msm8916.dtsi | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi 
b/arch/arm64/boot/dts/qcom/msm8916.dtsi
index 2ca8e977fc2a9..ffb4ce8935b37 100644
--- a/arch/arm64/boot/dts/qcom/msm8916.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi
@@ -1021,7 +1021,8 @@ mdp5_intf1_out: endpoint {
};
 
dsi0: dsi@1a98000 {
-   compatible = "qcom,mdss-dsi-ctrl";
+   compatible = "qcom,msm8916-dsi-ctrl",
+"qcom,mdss-dsi-ctrl";
reg = <0x01a98000 0x25c>;
reg-names = "dsi_ctrl";
 
-- 
2.38.1



[PATCH v6 07/18] dt-bindings: display/msm: Add list of mdss-dsi-ctrl compats

2022-12-22 Thread Bryan O'Donoghue
Add the list of current compats absent the deprecated qcm2290 to the list
of dsi compats listed here.

Several MDSS yaml files exist which document the dsi sub-node.
For each existing SoC MDSS yaml, provide the right dsi compat string.

Signed-off-by: Bryan O'Donoghue 
---
 .../bindings/display/msm/qcom,mdss.yaml  | 16 +++-
 .../bindings/display/msm/qcom,msm8998-mdss.yaml  |  8 +---
 .../bindings/display/msm/qcom,sc7180-mdss.yaml   |  6 --
 .../bindings/display/msm/qcom,sc7280-mdss.yaml   |  6 --
 .../bindings/display/msm/qcom,sdm845-mdss.yaml   |  8 +---
 .../bindings/display/msm/qcom,sm8250-mdss.yaml   |  8 +---
 6 files changed, 38 insertions(+), 14 deletions(-)

diff --git a/Documentation/devicetree/bindings/display/msm/qcom,mdss.yaml 
b/Documentation/devicetree/bindings/display/msm/qcom,mdss.yaml
index ba0460268731b..86bb43489bf4a 100644
--- a/Documentation/devicetree/bindings/display/msm/qcom,mdss.yaml
+++ b/Documentation/devicetree/bindings/display/msm/qcom,mdss.yaml
@@ -94,7 +94,21 @@ patternProperties:
 type: object
 properties:
   compatible:
-const: qcom,mdss-dsi-ctrl
+items:
+  - enum:
+  - qcom,apq8064-dsi-ctrl
+  - qcom,msm8916-dsi-ctrl
+  - qcom,msm8953-dsi-ctrl
+  - qcom,msm8974-dsi-ctrl
+  - qcom,msm8996-dsi-ctrl
+  - qcom,msm8998-dsi-ctrl
+  - qcom,qcm2290-dsi-ctrl
+  - qcom,sc7180-dsi-ctrl
+  - qcom,sc7280-dsi-ctrl
+  - qcom,sdm660-dsi-ctrl
+  - qcom,sdm845-dsi-ctrl
+  - qcom,sm8250-dsi-ctrl
+  - const: qcom,mdss-dsi-ctrl
 
   "^phy@[1-9a-f][0-9a-f]*$":
 type: object
diff --git 
a/Documentation/devicetree/bindings/display/msm/qcom,msm8998-mdss.yaml 
b/Documentation/devicetree/bindings/display/msm/qcom,msm8998-mdss.yaml
index cf52ff77a41aa..692b60af946f0 100644
--- a/Documentation/devicetree/bindings/display/msm/qcom,msm8998-mdss.yaml
+++ b/Documentation/devicetree/bindings/display/msm/qcom,msm8998-mdss.yaml
@@ -47,7 +47,9 @@ patternProperties:
 type: object
 properties:
   compatible:
-const: qcom,mdss-dsi-ctrl
+items:
+  - const: qcom,msm8998-dsi-ctrl
+  - const: qcom,mdss-dsi-ctrl
 
   "^phy@[0-9a-f]+$":
 type: object
@@ -126,7 +128,7 @@ examples:
 };
 
 dsi@c994000 {
-compatible = "qcom,mdss-dsi-ctrl";
+compatible = "qcom,msm8998-dsi-ctrl", "qcom,mdss-dsi-ctrl";
 reg = <0x0c994000 0x400>;
 reg-names = "dsi_ctrl";
 
@@ -196,7 +198,7 @@ examples:
 };
 
 dsi@c996000 {
-compatible = "qcom,mdss-dsi-ctrl";
+compatible = "qcom,msm8998-dsi-ctrl", "qcom,mdss-dsi-ctrl";
 reg = <0x0c996000 0x400>;
 reg-names = "dsi_ctrl";
 
diff --git 
a/Documentation/devicetree/bindings/display/msm/qcom,sc7180-mdss.yaml 
b/Documentation/devicetree/bindings/display/msm/qcom,sc7180-mdss.yaml
index 13e396d61a512..e72190040ca05 100644
--- a/Documentation/devicetree/bindings/display/msm/qcom,sc7180-mdss.yaml
+++ b/Documentation/devicetree/bindings/display/msm/qcom,sc7180-mdss.yaml
@@ -59,7 +59,9 @@ patternProperties:
 type: object
 properties:
   compatible:
-const: qcom,mdss-dsi-ctrl
+items:
+  - const: qcom,sc7180-dsi-ctrl
+  - const: qcom,mdss-dsi-ctrl
 
   "^phy@[0-9a-f]+$":
 type: object
@@ -142,7 +144,7 @@ examples:
 };
 
 dsi@ae94000 {
-compatible = "qcom,mdss-dsi-ctrl";
+compatible = "qcom,sc7180-dsi-ctrl", "qcom,mdss-dsi-ctrl";
 reg = <0x0ae94000 0x400>;
 reg-names = "dsi_ctrl";
 
diff --git 
a/Documentation/devicetree/bindings/display/msm/qcom,sc7280-mdss.yaml 
b/Documentation/devicetree/bindings/display/msm/qcom,sc7280-mdss.yaml
index a3de1744ba119..8997e24f804eb 100644
--- a/Documentation/devicetree/bindings/display/msm/qcom,sc7280-mdss.yaml
+++ b/Documentation/devicetree/bindings/display/msm/qcom,sc7280-mdss.yaml
@@ -58,7 +58,9 @@ patternProperties:
 type: object
 properties:
   compatible:
-const: qcom,mdss-dsi-ctrl
+items:
+  - const: qcom,sc7280-dsi-ctrl
+  - const: qcom,mdss-dsi-ctrl
 
   "^edp@[0-9a-f]+$":
 type: object
@@ -162,7 +164,7 @@ examples:
 };
 
 dsi@ae94000 {
-compatible = "qcom,mdss-dsi-ctrl";
+compatible = "qcom,sc7280-dsi-ctrl", "qcom,mdss-dsi-ctrl";
 reg = <0x0ae94000 0x400>;
 reg-names = "dsi_ctrl";
 
diff --git 
a/Documentation/devicetree/bindings/display/msm/qcom,sdm845-mdss.yaml 
b/Documentation/devicetree/bindings/display/msm/qc

[PATCH v6 08/18] ARM: dts: qcom: apq8064: add compat qcom, apq8064-dsi-ctrl

2022-12-22 Thread Bryan O'Donoghue
Append silicon specific compatible qcom,apq8064-dsi-ctrl to the
mdss-dsi-ctrl block. This allows us to differentiate the specific bindings
for apq8064 against the yaml documentation.

Reviewed-by: David Heidelberg 
Reviewed-by: Dmitry Baryshkov 
Signed-off-by: Bryan O'Donoghue 
---
 arch/arm/boot/dts/qcom-apq8064.dtsi | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/qcom-apq8064.dtsi 
b/arch/arm/boot/dts/qcom-apq8064.dtsi
index 0da9623ea0849..1f3e0aa9ab0c8 100644
--- a/arch/arm/boot/dts/qcom-apq8064.dtsi
+++ b/arch/arm/boot/dts/qcom-apq8064.dtsi
@@ -1277,7 +1277,8 @@ mmss_sfpb: syscon@570 {
};
 
dsi0: dsi@470 {
-   compatible = "qcom,mdss-dsi-ctrl";
+   compatible = "qcom,apq8064-dsi-ctrl",
+"qcom,mdss-dsi-ctrl";
label = "MDSS DSI CTRL->0";
#address-cells = <1>;
#size-cells = <0>;
-- 
2.38.1



[PATCH v6 06/18] dt-bindings: msm: dsi-controller-main: Add vdd* descriptions back in

2022-12-22 Thread Bryan O'Donoghue
When converting from .txt to .yaml we didn't include descriptions for the
existing regulator supplies.

- vdd
- vdda
- vddio

Add those descriptions into the yaml now as they were prior to the
conversion. In the .txt description we marked these regulators as required,
however, that requirement appears to have been in error.

Taking the example of sc7180-trogdor-wormdingler.dtsi. The avdd and avee
come from GPIO controlled external regulators, not the SoC and in this case
there's no need for vddio to power an I/O bus. Similarly the regulators for
the LCD are controlled by the panel driver not by the dsi-ctrl driver.

It would be possible to connect a different type of panel to the DSI bus
here in which case we may or may not want to make use of vdd, vdda or
vddio.

This is also the case for older chipsets like apq8064, msm8916 etc the vdd*
regulators in the dsi-ctrl block are helpers not dependencies.

Add the description of vdd, vdda and vddio back in for the existing
upstream dts where vdd, vdda or vddio are already declared but, don't
declare those regulators required - they are not SoC requirements.

Fixes: 4dbe55c97741 ("dt-bindings: msm: dsi: add yaml schemas for DSI bindings")
Acked-by: Rob Herring 
Signed-off-by: Bryan O'Donoghue 
---
 .../bindings/display/msm/dsi-controller-main.yaml| 12 
 1 file changed, 12 insertions(+)

diff --git 
a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml 
b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
index 4b79b31123515..3144699e20a08 100644
--- a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
+++ b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
@@ -143,6 +143,18 @@ properties:
   - port@0
   - port@1
 
+  vdd-supply:
+description:
+  VDD regulator
+
+  vddio-supply:
+description:
+  VDD-IO regulator
+
+  vdda-supply:
+description:
+  VDDA regulator
+
 required:
   - compatible
   - reg
-- 
2.38.1



[PATCH v6 02/18] dt-bindings: msm: dsi-controller-main: Fix power-domain constraint

2022-12-22 Thread Bryan O'Donoghue
power-domain is required for the sc7180 dispcc GDSC but not every qcom SoC
has a similar dependency for example the apq8064.

Most Qcom SoC's using mdss-dsi-ctrl seem to have the ability to
power-collapse the MDP without collapsing DSI.

For example the qcom vendor kernel commit for apq8084, msm8226, msm8916,
msm8974.

https://review.carbonrom.org/plugins/gitiles/CarbonROM/android_kernel_oneplus_msm8994/+/7b5c011a770daa2811778937ed646237a28a8694

"ARM: dts: msm: add mdss gdsc supply to dsi controller device

 It is possible for the DSI controller to be active when MDP is
 power collapsed. DSI controller needs to have it's own vote for
 mdss gdsc to ensure that gdsc remains on in such cases."

This however doesn't appear to be the case for the apq8064 so we shouldn't
be marking power-domain as required in yaml checks.

Fixes: 4dbe55c97741 ("dt-bindings: msm: dsi: add yaml schemas for DSI bindings")
Reviewed-by: Dmitry Baryshkov 
Acked-by: Krzysztof Kozlowski 
Signed-off-by: Bryan O'Donoghue 
---
 .../devicetree/bindings/display/msm/dsi-controller-main.yaml | 1 -
 1 file changed, 1 deletion(-)

diff --git 
a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml 
b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
index 55bfe1101d6f4..8ba61fef576a5 100644
--- a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
+++ b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
@@ -137,7 +137,6 @@ required:
   - phys
   - assigned-clocks
   - assigned-clock-parents
-  - power-domains
   - ports
 
 additionalProperties: false
-- 
2.38.1



[PATCH v6 04/18] dt-bindings: msm: dsi-controller-main: Add compatible strings for every current SoC

2022-12-22 Thread Bryan O'Donoghue
Currently we do not differentiate between the various users of the
qcom,mdss-dsi-ctrl. The driver is flexible enough to operate from one
compatible string but, the hardware does have some significant differences
in the number of clocks.

To facilitate documenting the clocks add the following compatible strings

- qcom,apq8064-dsi-ctrl
- qcom,msm8916-dsi-ctrl
- qcom,msm8953-dsi-ctrl
- qcom,msm8974-dsi-ctrl
- qcom,msm8996-dsi-ctrl
- qcom,msm8998-dsi-ctrl
- qcom,sc7180-dsi-ctrl
- qcom,sc7280-dsi-ctrl
- qcom,sdm660-dsi-ctrl
- qcom,sdm845-dsi-ctrl
- qcom,sm8250-dsi-ctrl
- qcom,qcm2290-dsi-ctrl

Deprecate qcom,dsi-ctrl-6g-qcm2290 in favour of the desired format while we
do so.

Reviewed-by: Krzysztof Kozlowski 
Signed-off-by: Bryan O'Donoghue 
---
 .../display/msm/dsi-controller-main.yaml  | 26 ---
 1 file changed, 22 insertions(+), 4 deletions(-)

diff --git 
a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml 
b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
index 6e2fd6e9fa7f0..98d54a7ee28d4 100644
--- a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
+++ b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
@@ -14,9 +14,27 @@ allOf:
 
 properties:
   compatible:
-enum:
-  - qcom,mdss-dsi-ctrl
-  - qcom,dsi-ctrl-6g-qcm2290
+oneOf:
+  - items:
+  - enum:
+  - qcom,apq8064-dsi-ctrl
+  - qcom,msm8916-dsi-ctrl
+  - qcom,msm8953-dsi-ctrl
+  - qcom,msm8974-dsi-ctrl
+  - qcom,msm8996-dsi-ctrl
+  - qcom,msm8998-dsi-ctrl
+  - qcom,qcm2290-dsi-ctrl
+  - qcom,sc7180-dsi-ctrl
+  - qcom,sc7280-dsi-ctrl
+  - qcom,sdm660-dsi-ctrl
+  - qcom,sdm845-dsi-ctrl
+  - qcom,sm8250-dsi-ctrl
+  - const: qcom,mdss-dsi-ctrl
+  - items:
+  - enum:
+  - dsi-ctrl-6g-qcm2290
+  - const: qcom,mdss-dsi-ctrl
+deprecated: true
 
   reg:
 maxItems: 1
@@ -149,7 +167,7 @@ examples:
  #include 
 
  dsi@ae94000 {
-   compatible = "qcom,mdss-dsi-ctrl";
+   compatible = "qcom,sc7180-dsi-ctrl", "qcom,mdss-dsi-ctrl";
reg = <0x0ae94000 0x400>;
reg-names = "dsi_ctrl";
 
-- 
2.38.1



[PATCH v6 09/18] ARM: dts: qcom: msm8974: Add compat qcom, msm8974-dsi-ctrl

2022-12-22 Thread Bryan O'Donoghue
Add silicon specific compatible qcom,msm8974-dsi-ctrl to the
mdss-dsi-ctrl block. This allows us to differentiate the specific bindings
for msm8974 against the yaml documentation.

Reviewed-by: Dmitry Baryshkov 
Signed-off-by: Bryan O'Donoghue 
---
 arch/arm/boot/dts/qcom-msm8974.dtsi | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/qcom-msm8974.dtsi 
b/arch/arm/boot/dts/qcom-msm8974.dtsi
index 8d216a3c08511..3ab3665b28aaa 100644
--- a/arch/arm/boot/dts/qcom-msm8974.dtsi
+++ b/arch/arm/boot/dts/qcom-msm8974.dtsi
@@ -1579,7 +1579,8 @@ mdp5_intf1_out: endpoint {
};
 
dsi0: dsi@fd922800 {
-   compatible = "qcom,mdss-dsi-ctrl";
+   compatible = "qcom,msm8974-dsi-ctrl",
+"qcom,mdss-dsi-ctrl";
reg = <0xfd922800 0x1f8>;
reg-names = "dsi_ctrl";
 
-- 
2.38.1



[PATCH v6 03/18] dt-bindings: msm: dsi-controller-main: Fix description of core clock

2022-12-22 Thread Bryan O'Donoghue
There's a typo in describing the core clock as an 'escape' clock. The
accurate description is 'core'.

Fixes: 4dbe55c97741 ("dt-bindings: msm: dsi: add yaml schemas for DSI bindings")
Reviewed-by: Dmitry Baryshkov 
Acked-by: Krzysztof Kozlowski 
Signed-off-by: Bryan O'Donoghue 
---
 .../devicetree/bindings/display/msm/dsi-controller-main.yaml| 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml 
b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
index 8ba61fef576a5..6e2fd6e9fa7f0 100644
--- a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
+++ b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
@@ -32,7 +32,7 @@ properties:
   - description: Display byte clock
   - description: Display byte interface clock
   - description: Display pixel clock
-  - description: Display escape clock
+  - description: Display core clock
   - description: Display AHB clock
   - description: Display AXI clock
 
-- 
2.38.1



[PATCH v6 01/18] dt-bindings: msm: dsi-controller-main: Fix operating-points-v2 constraint

2022-12-22 Thread Bryan O'Donoghue
The existing msm8916.dtsi does not depend on nor require operating points.

Fixes: 4dbe55c97741 ("dt-bindings: msm: dsi: add yaml schemas for DSI bindings")
Reviewed-by: Dmitry Baryshkov 
Acked-by: Krzysztof Kozlowski 
Signed-off-by: Bryan O'Donoghue 
---
 .../devicetree/bindings/display/msm/dsi-controller-main.yaml | 1 -
 1 file changed, 1 deletion(-)

diff --git 
a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml 
b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
index f2c143730a551..55bfe1101d6f4 100644
--- a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
+++ b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
@@ -138,7 +138,6 @@ required:
   - assigned-clocks
   - assigned-clock-parents
   - power-domains
-  - operating-points-v2
   - ports
 
 additionalProperties: false
-- 
2.38.1



[PATCH v6 00/18] mdss-dsi-ctrl binding and dts fixes

2022-12-22 Thread Bryan O'Donoghue
V6:
- Squashes a number of patches per Krzysztof's comments on bisectability
- Adds in Acked-by Rob and Krzysztof 

V5:
- Adds compat strings to bindings/display/msm/qcom,SoC-mdss.yaml - Dmitry
- Re-orders simple fixes to the start of the series to allow backports - Dmitry 
- VDDA and drop of node-names - Krzysztof
- Deprecates qcom,dsi-ctrl-6g-qcm2290 - Krzysztof, Dmitry
- Expands set of updated files to include new msm8953 - bod
- Converts to agreed compat string qcom,SoC-dsi-ctrl hence
  -  - qcom,mdss-dsi-ctrl-msm8996
  +  - qcom,msm8996-dsi-ctrl
- Adds RB where indicated for the compat strings.
V4:
- Moves the update of the example from patch #5 to patch #4

V3:
- Moves declaration of mdss-dsi-ctrl into compat string declaration
  patch - Krzysztof, Dmitry
- Renames qcm-2290 compat string to agreed compat "qcom,socname-dsi-ctrl"
  Dmirty, Krzysztof
- Adds empty line after if clause in yaml control flow section - Dmirty
- Adds Rb/Ack - Krzysztof, Dmitry, Doug, David
- vdd*
  Looking into this some more, I don't believe vdd, vdda, vddio ought to be
  required properties. Its up to the PCB manufacturer and the panel in-use
  how that panel is powered. Powering the panel is not something that
  even necessarily needs to be done from the dsi-ctrl driver.
  Originally marking vdd* as required in the .txt was an error, its not a
  SoC level dtsi requirement.
- clock-names
  Rather than replicate the clock-name in each if block I listed them with
  a specific description from a similar reference in usb/qcom,dwc3.yaml.
 
https://lore.kernel.org/linux-arm-msm/eb80681f-2e0b-605f-0444-ec65562f7...@linaro.org/

V2:
https://www.spinics.net/lists/linux-arm-msm/msg116326.html

- Moves the DSI PHY changes to a different later series.
  There are enough dsi-controller-main changes to justify its own
  standalone series.

- The original phy-name binding change given discussion with Rob and
  Krzysztof became its own standalone series that has since been merged.
  https://www.mail-archive.com/dri-devel@lists.freedesktop.org/msg403214.html

- Retains the drop of power-domain from yaml as a required property.
  I dug into the available dtsi. The apq8064 doesn't appear to have any
  GDSC which can be attached as a power-domain, which means the
  power-domain requirement is not universal across the various silicon
  versions.

- Adds Dmitry's RB to power-domain drop

- For the clock declarations I've
  * I noticed that the simple change I had worked for msm8939 but
subsquently broke other dtsi which drove a bigger change to document
the clocks on a per compatible basis.
  * Added compat strings in yaml.
  * Moved the allOf down later in the file to acomodate the if/then.
  * Number of clocks validated on a per compatible basis
  * The driver code which doesn't care about the number of clocks
can still operate on the mdss-dsi-ctrl compat but the dts checks will
validate against the compat string and yaml.

- vdd descriptions
  Took the previous text I missed from the .txt file - Krzysztof, Dmitry
  Adds vdd, vdda and vddio to the required list. This exposes warnings in
  existing dtsi but the previous .txt declared these regulators as
  required. - Krzysztof
 
V1:
This series fixes up a number of dtbs checks which are being flagged adding
in the msm8939 dtsi.


When converting from .txt to .yaml a number of the parameters for the older
msm8916 silicon were not transmitted into the yaml.

Adding in the msm8939 which is a near 1:1 copy of the msm8916 in terms of
dtsi triggers a rake of dtbs checks as a result.

https://www.mail-archive.com/dri-devel@lists.freedesktop.org/msg403211.html

Bryan O'Donoghue (18):
  dt-bindings: msm: dsi-controller-main: Fix operating-points-v2
constraint
  dt-bindings: msm: dsi-controller-main: Fix power-domain constraint
  dt-bindings: msm: dsi-controller-main: Fix description of core clock
  dt-bindings: msm: dsi-controller-main: Add compatible strings for
every current SoC
  dt-bindings: msm: dsi-controller-main: Document clocks on a per
compatible basis
  dt-bindings: msm: dsi-controller-main: Add vdd* descriptions back in
  dt-bindings: display/msm: Add list of mdss-dsi-ctrl compats
  ARM: dts: qcom: apq8064: add compat qcom,apq8064-dsi-ctrl
  ARM: dts: qcom: msm8974: Add compat qcom,msm8974-dsi-ctrl
  arm64: dts: qcom: msm8916: Add compat qcom,msm8916-dsi-ctrl
  arm64: dts: qcom: msm8953: Add compat qcom,msm8953-dsi-ctrl
  arm64: dts: qcom: msm8996: Add compat qcom,msm8996-dsi-ctrl
  arm64: dts: qcom: sc7180: Add compat qcom,sc7180-dsi-ctrl
  arm64: dts: qcom: sc7280: Add compat qcom,sc7280-dsi-ctrl
  arm64: dts: qcom: sdm630: Add compat qcom,sdm660-dsi-ctrl
  arm64: dts: qcom: sdm660: Add compat qcom,sdm660-dsi-ctrl
  arm64: dts: qcom: sdm845: Add compat qcom,sdm845-dsi-ctrl
  arm64: dts: qcom: sm8250: Add compat qcom,sm8250-dsi-ctrl

 .../display/msm/dsi-controller-main.yaml  | 249 --
 .../bindings/displa

Re: [PATCH v5 05/21] dt-bindings: msm: dsi-controller-main: Deprecate qcom,dsi-ctrl-6g-qcm2290 in favour of qcom,qcm2290-dsi-ctrl

2022-12-22 Thread Bryan O'Donoghue

On 22/12/2022 11:50, Krzysztof Kozlowski wrote:

On 20/12/2022 13:36, Bryan O'Donoghue wrote:

Deprecate qcom,dsi-ctrl-6g-qcm2290 in favour of the desired format
qcom,qcm2290-dsi-ctrl.

Signed-off-by: Bryan O'Donoghue 
---
  .../display/msm/dsi-controller-main.yaml  | 36 +++
  1 file changed, 21 insertions(+), 15 deletions(-)

diff --git 
a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml 
b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
index 01afa9e9c4b3c..98d54a7ee28d4 100644
--- a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
+++ b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
@@ -14,21 +14,27 @@ allOf:
  
  properties:

compatible:
-items:
-  - enum:
-  - qcom,apq8064-dsi-ctrl
-  - qcom,msm8916-dsi-ctrl
-  - qcom,msm8953-dsi-ctrl
-  - qcom,msm8974-dsi-ctrl
-  - qcom,msm8996-dsi-ctrl
-  - qcom,msm8998-dsi-ctrl
-  - qcom,dsi-ctrl-6g-qcm2290
-  - qcom,sc7180-dsi-ctrl
-  - qcom,sc7280-dsi-ctrl
-  - qcom,sdm660-dsi-ctrl
-  - qcom,sdm845-dsi-ctrl
-  - qcom,sm8250-dsi-ctrl
-  - const: qcom,mdss-dsi-ctrl
+oneOf:
+  - items:
+  - enum:
+  - qcom,apq8064-dsi-ctrl
+  - qcom,msm8916-dsi-ctrl
+  - qcom,msm8953-dsi-ctrl
+  - qcom,msm8974-dsi-ctrl
+  - qcom,msm8996-dsi-ctrl
+  - qcom,msm8998-dsi-ctrl
+  - qcom,qcm2290-dsi-ctrl
+  - qcom,sc7180-dsi-ctrl
+  - qcom,sc7280-dsi-ctrl
+  - qcom,sdm660-dsi-ctrl
+  - qcom,sdm845-dsi-ctrl
+  - qcom,sm8250-dsi-ctrl
+  - const: qcom,mdss-dsi-ctrl
+  - items:


I would just squash it with previous. You are adding some code and in
next patch immediately:
1. re-indent it,
2. remove it (qcom,dsi-ctrl-6g-qcm2290)


Best regards,
Krzysztof



Just to make sure.

I'll squash this patch down in the previous and include your RB.


[PATCH v5 19/21] arm64: dts: qcom: sdm660: Add compat qcom, sdm660-dsi-ctrl

2022-12-20 Thread Bryan O'Donoghue
Add silicon specific compatible qcom,sdm660-dsi-ctrl to the
mdss-dsi-ctrl block. This allows us to differentiate the specific bindings
for sdm660 against the yaml documentation.

Signed-off-by: Bryan O'Donoghue 
---
 arch/arm64/boot/dts/qcom/sdm660.dtsi | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/sdm660.dtsi 
b/arch/arm64/boot/dts/qcom/sdm660.dtsi
index d52123cb5cd31..e8a15b9cee18f 100644
--- a/arch/arm64/boot/dts/qcom/sdm660.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm660.dtsi
@@ -154,7 +154,8 @@ mdp5_intf2_out: endpoint {
 
  {
dsi1: dsi@c996000 {
-   compatible = "qcom,mdss-dsi-ctrl";
+   compatible = "qcom,sdm660-dsi-ctrl",
+"qcom,mdss-dsi-ctrl";
reg = <0x0c996000 0x400>;
reg-names = "dsi_ctrl";
 
-- 
2.38.1



[PATCH v5 18/21] arm64: dts: qcom: sdm630: Add compat qcom, sdm660-dsi-ctrl

2022-12-20 Thread Bryan O'Donoghue
The sdm630 can use the sdm660 mdss-dsi-ctrl compat. Currently it has the
same set of binding dependencies as sdm660.

Suggested-by: Dmitry Baryshkov 
Signed-off-by: Bryan O'Donoghue 
---
 arch/arm64/boot/dts/qcom/sdm630.dtsi | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/sdm630.dtsi 
b/arch/arm64/boot/dts/qcom/sdm630.dtsi
index 13e6a4fbba27c..8b9c7421bc0c6 100644
--- a/arch/arm64/boot/dts/qcom/sdm630.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm630.dtsi
@@ -1572,7 +1572,8 @@ opp-41250 {
};
 
dsi0: dsi@c994000 {
-   compatible = "qcom,mdss-dsi-ctrl";
+   compatible = "qcom,sdm660-dsi-ctrl",
+"qcom,mdss-dsi-ctrl";
reg = <0x0c994000 0x400>;
reg-names = "dsi_ctrl";
 
-- 
2.38.1



[PATCH v5 13/21] arm64: dts: qcom: msm8916: Add compat qcom, msm8916-dsi-ctrl

2022-12-20 Thread Bryan O'Donoghue
Add silicon specific compatible qcom,msm8916-dsi-ctrl to the
mdss-dsi-ctrl block. This allows us to differentiate the specific bindings
for msm8916 against the yaml documentation.

Reviewed-by: Dmitry Baryshkov 
Signed-off-by: Bryan O'Donoghue 
---
 arch/arm64/boot/dts/qcom/msm8916.dtsi | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi 
b/arch/arm64/boot/dts/qcom/msm8916.dtsi
index 2ca8e977fc2a9..ffb4ce8935b37 100644
--- a/arch/arm64/boot/dts/qcom/msm8916.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi
@@ -1021,7 +1021,8 @@ mdp5_intf1_out: endpoint {
};
 
dsi0: dsi@1a98000 {
-   compatible = "qcom,mdss-dsi-ctrl";
+   compatible = "qcom,msm8916-dsi-ctrl",
+"qcom,mdss-dsi-ctrl";
reg = <0x01a98000 0x25c>;
reg-names = "dsi_ctrl";
 
-- 
2.38.1



[PATCH v5 07/21] dt-bindings: msm: dsi-controller-main: Fix clock declarations

2022-12-20 Thread Bryan O'Donoghue
When converting from .txt to .yaml dt-binding descriptions we appear to
have missed some of the previous detail on the number and names of
permissible clocks.

Fix this by listing the clock descriptions against the clock names at a
high level.

Fixes: 4dbe55c97741 ("dt-bindings: msm: dsi: add yaml schemas for DSI bindings")
Signed-off-by: Bryan O'Donoghue 
---
 .../display/msm/dsi-controller-main.yaml  | 20 ---
 1 file changed, 13 insertions(+), 7 deletions(-)

diff --git 
a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml 
b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
index ce103e3ec4db3..4116b3010219a 100644
--- a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
+++ b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
@@ -43,13 +43,19 @@ properties:
 maxItems: 1
 
   clocks:
-items:
-  - description: Display byte clock
-  - description: Display byte interface clock
-  - description: Display pixel clock
-  - description: Display core clock
-  - description: Display AHB clock
-  - description: Display AXI clock
+description: |
+  Several clocks are used, depending on the variant. Typical ones are::
+   - bus:: Display AHB clock.
+   - byte:: Display byte clock.
+   - byte_intf:: Display byte interface clock.
+   - core:: Display core clock.
+   - core_mss:: Core MultiMedia SubSystem clock.
+   - iface:: Display AXI clock.
+   - mdp_core:: MDP Core clock.
+   - mnoc:: MNOC clock
+   - pixel:: Display pixel clock.
+minItems: 3
+maxItems: 9
 
   clock-names:
 minItems: 3
-- 
2.38.1



[PATCH v5 14/21] arm64: dts: qcom: msm8953: Add compat qcom, msm8953-dsi-ctrl

2022-12-20 Thread Bryan O'Donoghue
Add silicon specific compatible qcom,msm8953-dsi-ctrl to the
mdss-dsi-ctrl block. This allows us to differentiate the specific bindings
for msm8953 against the yaml documentation.

Signed-off-by: Bryan O'Donoghue 
---
 arch/arm64/boot/dts/qcom/msm8953.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/msm8953.dtsi 
b/arch/arm64/boot/dts/qcom/msm8953.dtsi
index 32349174c4bd9..acbe100d9b5be 100644
--- a/arch/arm64/boot/dts/qcom/msm8953.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8953.dtsi
@@ -797,7 +797,7 @@ mdp5_intf2_out: endpoint {
};
 
dsi0: dsi@1a94000 {
-   compatible = "qcom,mdss-dsi-ctrl";
+   compatible = "qcom,msm8953-dsi-ctrl", 
"qcom,mdss-dsi-ctrl";
reg = <0x1a94000 0x400>;
reg-names = "dsi_ctrl";
 
@@ -867,7 +867,7 @@ dsi0_phy: phy@1a94400 {
};
 
dsi1: dsi@1a96000 {
-   compatible = "qcom,mdss-dsi-ctrl";
+   compatible = "qcom,msm8953-dsi-ctrl", 
"qcom,mdss-dsi-ctrl";
reg = <0x1a96000 0x400>;
reg-names = "dsi_ctrl";
 
-- 
2.38.1



[PATCH v5 16/21] arm64: dts: qcom: sc7180: Add compat qcom, sc7180-dsi-ctrl

2022-12-20 Thread Bryan O'Donoghue
Add silicon specific compatible qcom,sc7180-dsi-ctrl to the
mdss-dsi-ctrl block. This allows us to differentiate the specific bindings
for sc7180 against the yaml documentation.

Reviewed-by: Douglas Anderson 
Reviewed-by: Dmitry Baryshkov 
Signed-off-by: Bryan O'Donoghue 
---
 arch/arm64/boot/dts/qcom/sc7180.dtsi | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi 
b/arch/arm64/boot/dts/qcom/sc7180.dtsi
index f71cf21a8dd8a..fbd6a7b31eac2 100644
--- a/arch/arm64/boot/dts/qcom/sc7180.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7180.dtsi
@@ -3022,7 +3022,8 @@ opp-46000 {
};
 
dsi0: dsi@ae94000 {
-   compatible = "qcom,mdss-dsi-ctrl";
+   compatible = "qcom,sc7180-dsi-ctrl",
+"qcom,mdss-dsi-ctrl";
reg = <0 0x0ae94000 0 0x400>;
reg-names = "dsi_ctrl";
 
-- 
2.38.1



[PATCH v5 15/21] arm64: dts: qcom: msm8996: Add compat qcom, msm8996-dsi-ctrl

2022-12-20 Thread Bryan O'Donoghue
Add silicon specific compatible qcom,msm8996-dsi-ctrl to the
mdss-dsi-ctrl block. This allows us to differentiate the specific bindings
for msm8996 against the yaml documentation.

Reviewed-by: Dmitry Baryshkov 
Signed-off-by: Bryan O'Donoghue 
---
 arch/arm64/boot/dts/qcom/msm8996.dtsi | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi 
b/arch/arm64/boot/dts/qcom/msm8996.dtsi
index d31464204f696..c6d8371043a9a 100644
--- a/arch/arm64/boot/dts/qcom/msm8996.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi
@@ -989,7 +989,8 @@ mdp5_intf2_out: endpoint {
};
 
dsi0: dsi@994000 {
-   compatible = "qcom,mdss-dsi-ctrl";
+   compatible = "qcom,msm8996-dsi-ctrl",
+"qcom,mdss-dsi-ctrl";
reg = <0x00994000 0x400>;
reg-names = "dsi_ctrl";
 
@@ -1056,7 +1057,8 @@ dsi0_phy: phy@994400 {
};
 
dsi1: dsi@996000 {
-   compatible = "qcom,mdss-dsi-ctrl";
+   compatible = "qcom,msm8996-dsi-ctrl",
+"qcom,mdss-dsi-ctrl";
reg = <0x00996000 0x400>;
reg-names = "dsi_ctrl";
 
-- 
2.38.1



[PATCH v5 09/21] dt-bindings: display/msm: Add list of mdss-dsi-ctrl compats

2022-12-20 Thread Bryan O'Donoghue
Add the list of current compats absent the deprecated qcm2290 to the list
of dsi compats listed here.

Signed-off-by: Bryan O'Donoghue 
---
 .../bindings/display/msm/qcom,mdss.yaml  | 16 +++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/display/msm/qcom,mdss.yaml 
b/Documentation/devicetree/bindings/display/msm/qcom,mdss.yaml
index ba0460268731b..86bb43489bf4a 100644
--- a/Documentation/devicetree/bindings/display/msm/qcom,mdss.yaml
+++ b/Documentation/devicetree/bindings/display/msm/qcom,mdss.yaml
@@ -94,7 +94,21 @@ patternProperties:
 type: object
 properties:
   compatible:
-const: qcom,mdss-dsi-ctrl
+items:
+  - enum:
+  - qcom,apq8064-dsi-ctrl
+  - qcom,msm8916-dsi-ctrl
+  - qcom,msm8953-dsi-ctrl
+  - qcom,msm8974-dsi-ctrl
+  - qcom,msm8996-dsi-ctrl
+  - qcom,msm8998-dsi-ctrl
+  - qcom,qcm2290-dsi-ctrl
+  - qcom,sc7180-dsi-ctrl
+  - qcom,sc7280-dsi-ctrl
+  - qcom,sdm660-dsi-ctrl
+  - qcom,sdm845-dsi-ctrl
+  - qcom,sm8250-dsi-ctrl
+  - const: qcom,mdss-dsi-ctrl
 
   "^phy@[1-9a-f][0-9a-f]*$":
 type: object
-- 
2.38.1



[PATCH v5 11/21] ARM: dts: qcom: apq8064: add compat qcom, apq8064-dsi-ctrl

2022-12-20 Thread Bryan O'Donoghue
Append silicon specific compatible qcom,apq8064-dsi-ctrl to the
mdss-dsi-ctrl block. This allows us to differentiate the specific bindings
for apq8064 against the yaml documentation.

Reviewed-by: David Heidelberg 
Reviewed-by: Dmitry Baryshkov 
Signed-off-by: Bryan O'Donoghue 
---
 arch/arm/boot/dts/qcom-apq8064.dtsi | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/qcom-apq8064.dtsi 
b/arch/arm/boot/dts/qcom-apq8064.dtsi
index 0da9623ea0849..1f3e0aa9ab0c8 100644
--- a/arch/arm/boot/dts/qcom-apq8064.dtsi
+++ b/arch/arm/boot/dts/qcom-apq8064.dtsi
@@ -1277,7 +1277,8 @@ mmss_sfpb: syscon@570 {
};
 
dsi0: dsi@470 {
-   compatible = "qcom,mdss-dsi-ctrl";
+   compatible = "qcom,apq8064-dsi-ctrl",
+"qcom,mdss-dsi-ctrl";
label = "MDSS DSI CTRL->0";
#address-cells = <1>;
#size-cells = <0>;
-- 
2.38.1



[PATCH v5 08/21] dt-bindings: msm: dsi-controller-main: Add vdd* descriptions back in

2022-12-20 Thread Bryan O'Donoghue
When converting from .txt to .yaml we didn't include descriptions for the
existing regulator supplies.

- vdd
- vdda
- vddio

Add those descriptions into the yaml now as they were prior to the
conversion. In the .txt description we marked these regulators as required,
however, that requirement appears to have been in error.

Taking the example of sc7180-trogdor-wormdingler.dtsi. The avdd and avee
come from GPIO controlled external regulators, not the SoC and in this case
there's no need for vddio to power an I/O bus. Similarly the regulators for
the LCD are controlled by the panel driver not by the dsi-ctrl driver.

It would be possible to connect a different type of panel to the DSI bus
here in which case we may or may not want to make use of vdd, vdda or
vddio.

This is also the case for older chipsets like apq8064, msm8916 etc the vdd*
regulators in the dsi-ctrl block are helpers not dependencies.

Add the description of vdd, vdda and vddio back in for the existing
upstream dts where vdd, vdda or vddio are already declared but, don't
declare those regulators required - they are not SoC requirements.

Fixes: 4dbe55c97741 ("dt-bindings: msm: dsi: add yaml schemas for DSI bindings")
Signed-off-by: Bryan O'Donoghue 
---
 .../bindings/display/msm/dsi-controller-main.yaml| 12 
 1 file changed, 12 insertions(+)

diff --git 
a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml 
b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
index 4116b3010219a..785cc51838f07 100644
--- a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
+++ b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
@@ -143,6 +143,18 @@ properties:
   - port@0
   - port@1
 
+  vdd-supply:
+description:
+  VDD regulator
+
+  vddio-supply:
+description:
+  VDD-IO regulator
+
+  vdda-supply:
+description:
+  VDDA regulator
+
 required:
   - compatible
   - reg
-- 
2.38.1



[PATCH v5 21/21] arm64: dts: qcom: sm8250: Add compat qcom, sm8250-dsi-ctrl

2022-12-20 Thread Bryan O'Donoghue
Add silicon specific compatible qcom,sm8250-dsi-ctrl to the
mdss-dsi-ctrl block. This allows us to differentiate the specific bindings
for sm8250 against the yaml documentation.

Reviewed-by: Dmitry Baryshkov 
Signed-off-by: Bryan O'Donoghue 
---
 arch/arm64/boot/dts/qcom/sm8250.dtsi | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi 
b/arch/arm64/boot/dts/qcom/sm8250.dtsi
index dab5579946f35..9240132efa75e 100644
--- a/arch/arm64/boot/dts/qcom/sm8250.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi
@@ -4050,7 +4050,8 @@ opp-46000 {
};
 
dsi0: dsi@ae94000 {
-   compatible = "qcom,mdss-dsi-ctrl";
+   compatible = "qcom,sm8250-dsi-ctrl",
+"qcom,mdss-dsi-ctrl";
reg = <0 0x0ae94000 0 0x400>;
reg-names = "dsi_ctrl";
 
@@ -4141,7 +4142,8 @@ dsi0_phy: phy@ae94400 {
};
 
dsi1: dsi@ae96000 {
-   compatible = "qcom,mdss-dsi-ctrl";
+   compatible = "qcom,sm8250-dsi-ctrl",
+"qcom,mdss-dsi-ctrl";
reg = <0 0x0ae96000 0 0x400>;
reg-names = "dsi_ctrl";
 
-- 
2.38.1



[PATCH v5 17/21] arm64: dts: qcom: sc7280: Add compat qcom, sc7280-dsi-ctrl

2022-12-20 Thread Bryan O'Donoghue
Add silicon specific compatible qcom,sc7280-dsi-ctrl to the
mdss-dsi-ctrl block. This allows us to differentiate the specific bindings
for sc7280 against the yaml documentation.

Reviewed-by: Douglas Anderson 
Reviewed-by: Dmitry Baryshkov 
Signed-off-by: Bryan O'Donoghue 
---
 arch/arm64/boot/dts/qcom/sc7280.dtsi | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/sc7280.dtsi 
b/arch/arm64/boot/dts/qcom/sc7280.dtsi
index 0adf13399e649..a437ad4047f52 100644
--- a/arch/arm64/boot/dts/qcom/sc7280.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7280.dtsi
@@ -3906,7 +3906,8 @@ opp-50667 {
};
 
mdss_dsi: dsi@ae94000 {
-   compatible = "qcom,mdss-dsi-ctrl";
+   compatible = "qcom,sc7280-dsi-ctrl",
+"qcom,mdss-dsi-ctrl";
reg = <0 0x0ae94000 0 0x400>;
reg-names = "dsi_ctrl";
 
-- 
2.38.1



[PATCH v5 10/21] dt-bindings: display/msm: Update MDSS dsi compat strings

2022-12-20 Thread Bryan O'Donoghue
Several MDSS yaml files exist which document the dsi sub-node.
For each existing SoC MDSS yaml, provide the right dsi compat string.

Signed-off-by: Bryan O'Donoghue 
---
 .../bindings/display/msm/qcom,msm8998-mdss.yaml   | 8 +---
 .../devicetree/bindings/display/msm/qcom,sc7180-mdss.yaml | 6 --
 .../devicetree/bindings/display/msm/qcom,sc7280-mdss.yaml | 6 --
 .../devicetree/bindings/display/msm/qcom,sdm845-mdss.yaml | 8 +---
 .../devicetree/bindings/display/msm/qcom,sm8250-mdss.yaml | 8 +---
 5 files changed, 23 insertions(+), 13 deletions(-)

diff --git 
a/Documentation/devicetree/bindings/display/msm/qcom,msm8998-mdss.yaml 
b/Documentation/devicetree/bindings/display/msm/qcom,msm8998-mdss.yaml
index cf52ff77a41aa..692b60af946f0 100644
--- a/Documentation/devicetree/bindings/display/msm/qcom,msm8998-mdss.yaml
+++ b/Documentation/devicetree/bindings/display/msm/qcom,msm8998-mdss.yaml
@@ -47,7 +47,9 @@ patternProperties:
 type: object
 properties:
   compatible:
-const: qcom,mdss-dsi-ctrl
+items:
+  - const: qcom,msm8998-dsi-ctrl
+  - const: qcom,mdss-dsi-ctrl
 
   "^phy@[0-9a-f]+$":
 type: object
@@ -126,7 +128,7 @@ examples:
 };
 
 dsi@c994000 {
-compatible = "qcom,mdss-dsi-ctrl";
+compatible = "qcom,msm8998-dsi-ctrl", "qcom,mdss-dsi-ctrl";
 reg = <0x0c994000 0x400>;
 reg-names = "dsi_ctrl";
 
@@ -196,7 +198,7 @@ examples:
 };
 
 dsi@c996000 {
-compatible = "qcom,mdss-dsi-ctrl";
+compatible = "qcom,msm8998-dsi-ctrl", "qcom,mdss-dsi-ctrl";
 reg = <0x0c996000 0x400>;
 reg-names = "dsi_ctrl";
 
diff --git 
a/Documentation/devicetree/bindings/display/msm/qcom,sc7180-mdss.yaml 
b/Documentation/devicetree/bindings/display/msm/qcom,sc7180-mdss.yaml
index 13e396d61a512..e72190040ca05 100644
--- a/Documentation/devicetree/bindings/display/msm/qcom,sc7180-mdss.yaml
+++ b/Documentation/devicetree/bindings/display/msm/qcom,sc7180-mdss.yaml
@@ -59,7 +59,9 @@ patternProperties:
 type: object
 properties:
   compatible:
-const: qcom,mdss-dsi-ctrl
+items:
+  - const: qcom,sc7180-dsi-ctrl
+  - const: qcom,mdss-dsi-ctrl
 
   "^phy@[0-9a-f]+$":
 type: object
@@ -142,7 +144,7 @@ examples:
 };
 
 dsi@ae94000 {
-compatible = "qcom,mdss-dsi-ctrl";
+compatible = "qcom,sc7180-dsi-ctrl", "qcom,mdss-dsi-ctrl";
 reg = <0x0ae94000 0x400>;
 reg-names = "dsi_ctrl";
 
diff --git 
a/Documentation/devicetree/bindings/display/msm/qcom,sc7280-mdss.yaml 
b/Documentation/devicetree/bindings/display/msm/qcom,sc7280-mdss.yaml
index a3de1744ba119..8997e24f804eb 100644
--- a/Documentation/devicetree/bindings/display/msm/qcom,sc7280-mdss.yaml
+++ b/Documentation/devicetree/bindings/display/msm/qcom,sc7280-mdss.yaml
@@ -58,7 +58,9 @@ patternProperties:
 type: object
 properties:
   compatible:
-const: qcom,mdss-dsi-ctrl
+items:
+  - const: qcom,sc7280-dsi-ctrl
+  - const: qcom,mdss-dsi-ctrl
 
   "^edp@[0-9a-f]+$":
 type: object
@@ -162,7 +164,7 @@ examples:
 };
 
 dsi@ae94000 {
-compatible = "qcom,mdss-dsi-ctrl";
+compatible = "qcom,sc7280-dsi-ctrl", "qcom,mdss-dsi-ctrl";
 reg = <0x0ae94000 0x400>;
 reg-names = "dsi_ctrl";
 
diff --git 
a/Documentation/devicetree/bindings/display/msm/qcom,sdm845-mdss.yaml 
b/Documentation/devicetree/bindings/display/msm/qcom,sdm845-mdss.yaml
index 31ca6f99fc223..b5446671f3adf 100644
--- a/Documentation/devicetree/bindings/display/msm/qcom,sdm845-mdss.yaml
+++ b/Documentation/devicetree/bindings/display/msm/qcom,sdm845-mdss.yaml
@@ -51,7 +51,9 @@ patternProperties:
 type: object
 properties:
   compatible:
-const: qcom,mdss-dsi-ctrl
+items:
+  - const: qcom,sdm845-dsi-ctrl
+  - const: qcom,mdss-dsi-ctrl
 
   "^phy@[0-9a-f]+$":
 type: object
@@ -128,7 +130,7 @@ examples:
 };
 
 dsi@ae94000 {
-compatible = "qcom,mdss-dsi-ctrl";
+compatible = "qcom,sdm845-dsi-ctrl", "qcom,mdss-dsi-ctrl";
 reg = <0x0ae94000 0x400>;
 reg-names = "dsi_ctrl";
 
@@ -198,7 +200,7 @@ examples:
 };
 
 dsi@ae96000 {
-compatible = "qcom,mdss-dsi-ctrl";
+compatible = "qcom,sdm845-dsi-ctrl", "qcom,mdss-dsi-ctrl";
 reg = <0x0ae96000 0x400>;
 reg-names = "dsi_ctrl";
 
diff --git 
a/Documentation/devicetree/bindings/display/msm/qcom,sm8250-m

[PATCH v5 20/21] arm64: dts: qcom: sdm845: Add compat qcom, sdm845-dsi-ctrl

2022-12-20 Thread Bryan O'Donoghue
Add silicon specific compatible qcom,sdm845-dsi-ctrl to the
mdss-dsi-ctrl block. This allows us to differentiate the specific bindings
for sdm845 against the yaml documentation.

Reviewed-by: Douglas Anderson 
Reviewed-by: Dmitry Baryshkov 
Signed-off-by: Bryan O'Donoghue 
---
 arch/arm64/boot/dts/qcom/sdm845.dtsi | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi 
b/arch/arm64/boot/dts/qcom/sdm845.dtsi
index 65032b94b46d6..623e5d7dddfd2 100644
--- a/arch/arm64/boot/dts/qcom/sdm845.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi
@@ -4645,7 +4645,8 @@ opp-81000 {
};
 
dsi0: dsi@ae94000 {
-   compatible = "qcom,mdss-dsi-ctrl";
+   compatible = "qcom,sdm845-dsi-ctrl",
+"qcom,mdss-dsi-ctrl";
reg = <0 0x0ae94000 0 0x400>;
reg-names = "dsi_ctrl";
 
@@ -4716,7 +4717,8 @@ dsi0_phy: phy@ae94400 {
};
 
dsi1: dsi@ae96000 {
-   compatible = "qcom,mdss-dsi-ctrl";
+   compatible = "qcom,sdm845-dsi-ctrl",
+"qcom,mdss-dsi-ctrl";
reg = <0 0x0ae96000 0 0x400>;
reg-names = "dsi_ctrl";
 
-- 
2.38.1



[PATCH v5 12/21] ARM: dts: qcom: msm8974: Add compat qcom, msm8974-dsi-ctrl

2022-12-20 Thread Bryan O'Donoghue
Add silicon specific compatible qcom,msm8974-dsi-ctrl to the
mdss-dsi-ctrl block. This allows us to differentiate the specific bindings
for msm8974 against the yaml documentation.

Reviewed-by: Dmitry Baryshkov 
Signed-off-by: Bryan O'Donoghue 
---
 arch/arm/boot/dts/qcom-msm8974.dtsi | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/qcom-msm8974.dtsi 
b/arch/arm/boot/dts/qcom-msm8974.dtsi
index 8d216a3c08511..3ab3665b28aaa 100644
--- a/arch/arm/boot/dts/qcom-msm8974.dtsi
+++ b/arch/arm/boot/dts/qcom-msm8974.dtsi
@@ -1579,7 +1579,8 @@ mdp5_intf1_out: endpoint {
};
 
dsi0: dsi@fd922800 {
-   compatible = "qcom,mdss-dsi-ctrl";
+   compatible = "qcom,msm8974-dsi-ctrl",
+"qcom,mdss-dsi-ctrl";
reg = <0xfd922800 0x1f8>;
reg-names = "dsi_ctrl";
 
-- 
2.38.1



[PATCH v5 06/21] dt-bindings: msm: dsi-controller-main: Document clocks on a per compatible basis

2022-12-20 Thread Bryan O'Donoghue
Each compatible has a different set of clocks which are associated with it.
Add in the list of clocks for each compatible.

Signed-off-by: Bryan O'Donoghue 
---
 .../display/msm/dsi-controller-main.yaml  | 189 +-
 1 file changed, 179 insertions(+), 10 deletions(-)

diff --git 
a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml 
b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
index 98d54a7ee28d4..ce103e3ec4db3 100644
--- a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
+++ b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
@@ -9,9 +9,6 @@ title: Qualcomm Display DSI controller
 maintainers:
   - Krishna Manikandan 
 
-allOf:
-  - $ref: "../dsi-controller.yaml#"
-
 properties:
   compatible:
 oneOf:
@@ -55,13 +52,8 @@ properties:
   - description: Display AXI clock
 
   clock-names:
-items:
-  - const: byte
-  - const: byte_intf
-  - const: pixel
-  - const: core
-  - const: iface
-  - const: bus
+minItems: 3
+maxItems: 9
 
   phys:
 maxItems: 1
@@ -157,6 +149,183 @@ required:
   - assigned-clock-parents
   - ports
 
+allOf:
+  - $ref: "../dsi-controller.yaml#"
+  - if:
+  properties:
+compatible:
+  contains:
+enum:
+  - qcom,apq8064-dsi-ctrl
+then:
+  properties:
+clocks:
+  maxItems: 7
+clock-names:
+  items:
+- const: iface
+- const: bus
+- const: core_mmss
+- const: src
+- const: byte
+- const: pixel
+- const: core
+
+  - if:
+  properties:
+compatible:
+  contains:
+enum:
+  - qcom,msm8916-dsi-ctrl
+then:
+  properties:
+clocks:
+  maxItems: 6
+clock-names:
+  items:
+- const: mdp_core
+- const: iface
+- const: bus
+- const: byte
+- const: pixel
+- const: core
+
+  - if:
+  properties:
+compatible:
+  contains:
+enum:
+  - qcom,msm8953-dsi-ctrl
+then:
+  properties:
+clocks:
+  maxItems: 6
+clock-names:
+  items:
+- const: mdp_core
+- const: iface
+- const: bus
+- const: byte
+- const: pixel
+- const: core
+
+  - if:
+  properties:
+compatible:
+  contains:
+enum:
+  - qcom,msm8974-dsi-ctrl
+then:
+  properties:
+clocks:
+  maxItems: 3
+clock-names:
+  items:
+- const: iface
+- const: bus
+- const: vsync
+
+  - if:
+  properties:
+compatible:
+  contains:
+enum:
+  - qcom,msm8996-dsi-ctrl
+then:
+  properties:
+clocks:
+  maxItems: 7
+clock-names:
+  items:
+- const: mdp_core
+- const: byte
+- const: iface
+- const: bus
+- const: core_mmss
+- const: pixel
+- const: core
+
+  - if:
+  properties:
+compatible:
+  contains:
+enum:
+  - qcom,msm8998-dsi-ctrl
+then:
+  properties:
+clocks:
+  maxItems: 6
+clock-names:
+  items:
+- const: byte
+- const: byte_intf
+- const: pixel
+- const: core
+- const: iface
+- const: bus
+
+  - if:
+  properties:
+compatible:
+  contains:
+enum:
+  - qcom,sc7180-dsi-ctrl
+  - qcom,sc7280-dsi-ctrl
+  - qcom,sm8250-dsi-ctrl
+then:
+  properties:
+clocks:
+  maxItems: 6
+clock-names:
+  items:
+- const: byte
+- const: byte_intf
+- const: pixel
+- const: core
+- const: iface
+- const: bus
+
+  - if:
+  properties:
+compatible:
+  contains:
+enum:
+  - qcom,sdm660-dsi-ctrl
+then:
+  properties:
+clocks:
+  maxItems: 9
+clock-names:
+  items:
+- const: mdp_core
+- const: byte
+- const: byte_intf
+- const: mnoc
+- const: iface
+- const: bus
+- const: core_mmss
+- const: pixel
+- const: core
+
+  - if:
+  properties:
+compatible:
+  contains:
+enum:
+  - qcom,sdm845-dsi-ctrl
+then:
+  properties:
+clocks:
+  maxItems: 6
+clock-names:
+  items:
+- const: byte
+- const: byte_intf
+- const: pixel
+ 

[PATCH v5 05/21] dt-bindings: msm: dsi-controller-main: Deprecate qcom, dsi-ctrl-6g-qcm2290 in favour of qcom, qcm2290-dsi-ctrl

2022-12-20 Thread Bryan O'Donoghue
Deprecate qcom,dsi-ctrl-6g-qcm2290 in favour of the desired format
qcom,qcm2290-dsi-ctrl.

Signed-off-by: Bryan O'Donoghue 
---
 .../display/msm/dsi-controller-main.yaml  | 36 +++
 1 file changed, 21 insertions(+), 15 deletions(-)

diff --git 
a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml 
b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
index 01afa9e9c4b3c..98d54a7ee28d4 100644
--- a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
+++ b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
@@ -14,21 +14,27 @@ allOf:
 
 properties:
   compatible:
-items:
-  - enum:
-  - qcom,apq8064-dsi-ctrl
-  - qcom,msm8916-dsi-ctrl
-  - qcom,msm8953-dsi-ctrl
-  - qcom,msm8974-dsi-ctrl
-  - qcom,msm8996-dsi-ctrl
-  - qcom,msm8998-dsi-ctrl
-  - qcom,dsi-ctrl-6g-qcm2290
-  - qcom,sc7180-dsi-ctrl
-  - qcom,sc7280-dsi-ctrl
-  - qcom,sdm660-dsi-ctrl
-  - qcom,sdm845-dsi-ctrl
-  - qcom,sm8250-dsi-ctrl
-  - const: qcom,mdss-dsi-ctrl
+oneOf:
+  - items:
+  - enum:
+  - qcom,apq8064-dsi-ctrl
+  - qcom,msm8916-dsi-ctrl
+  - qcom,msm8953-dsi-ctrl
+  - qcom,msm8974-dsi-ctrl
+  - qcom,msm8996-dsi-ctrl
+  - qcom,msm8998-dsi-ctrl
+  - qcom,qcm2290-dsi-ctrl
+  - qcom,sc7180-dsi-ctrl
+  - qcom,sc7280-dsi-ctrl
+  - qcom,sdm660-dsi-ctrl
+  - qcom,sdm845-dsi-ctrl
+  - qcom,sm8250-dsi-ctrl
+  - const: qcom,mdss-dsi-ctrl
+  - items:
+  - enum:
+  - dsi-ctrl-6g-qcm2290
+  - const: qcom,mdss-dsi-ctrl
+deprecated: true
 
   reg:
 maxItems: 1
-- 
2.38.1



[PATCH v5 04/21] dt-bindings: msm: dsi-controller-main: Add compatible strings for every current SoC

2022-12-20 Thread Bryan O'Donoghue
Currently we do not differentiate between the various users of the
qcom,mdss-dsi-ctrl. The driver is flexible enough to operate from one
compatible string but, the hardware does have some significant differences
in the number of clocks.

To facilitate documenting the clocks add the following compatible strings

- qcom,apq8064-dsi-ctrl
- qcom,msm8916-dsi-ctrl
- qcom,msm8953-dsi-ctrl
- qcom,msm8974-dsi-ctrl
- qcom,msm8996-dsi-ctrl
- qcom,msm8998-dsi-ctrl
- qcom,sc7180-dsi-ctrl
- qcom,sc7280-dsi-ctrl
- qcom,sdm660-dsi-ctrl
- qcom,sdm845-dsi-ctrl
- qcom,sm8250-dsi-ctrl

Each SoC dtsi should declare "qcom,socname-dsi-ctrl", "qcom,mdss-dsi-ctrl";

Signed-off-by: Bryan O'Donoghue 
---
 .../display/msm/dsi-controller-main.yaml  | 20 +++
 1 file changed, 16 insertions(+), 4 deletions(-)

diff --git 
a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml 
b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
index 6e2fd6e9fa7f0..01afa9e9c4b3c 100644
--- a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
+++ b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
@@ -14,9 +14,21 @@ allOf:
 
 properties:
   compatible:
-enum:
-  - qcom,mdss-dsi-ctrl
-  - qcom,dsi-ctrl-6g-qcm2290
+items:
+  - enum:
+  - qcom,apq8064-dsi-ctrl
+  - qcom,msm8916-dsi-ctrl
+  - qcom,msm8953-dsi-ctrl
+  - qcom,msm8974-dsi-ctrl
+  - qcom,msm8996-dsi-ctrl
+  - qcom,msm8998-dsi-ctrl
+  - qcom,dsi-ctrl-6g-qcm2290
+  - qcom,sc7180-dsi-ctrl
+  - qcom,sc7280-dsi-ctrl
+  - qcom,sdm660-dsi-ctrl
+  - qcom,sdm845-dsi-ctrl
+  - qcom,sm8250-dsi-ctrl
+  - const: qcom,mdss-dsi-ctrl
 
   reg:
 maxItems: 1
@@ -149,7 +161,7 @@ examples:
  #include 
 
  dsi@ae94000 {
-   compatible = "qcom,mdss-dsi-ctrl";
+   compatible = "qcom,sc7180-dsi-ctrl", "qcom,mdss-dsi-ctrl";
reg = <0x0ae94000 0x400>;
reg-names = "dsi_ctrl";
 
-- 
2.38.1



[PATCH v5 01/21] dt-bindings: msm: dsi-controller-main: Fix operating-points-v2 constraint

2022-12-20 Thread Bryan O'Donoghue
The existing msm8916.dtsi does not depend on nor require operating points.

Fixes: 4dbe55c97741 ("dt-bindings: msm: dsi: add yaml schemas for DSI bindings")
Reviewed-by: Dmitry Baryshkov 
Acked-by: Krzysztof Kozlowski 
Signed-off-by: Bryan O'Donoghue 
---
 .../devicetree/bindings/display/msm/dsi-controller-main.yaml | 1 -
 1 file changed, 1 deletion(-)

diff --git 
a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml 
b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
index f2c143730a551..55bfe1101d6f4 100644
--- a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
+++ b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
@@ -138,7 +138,6 @@ required:
   - assigned-clocks
   - assigned-clock-parents
   - power-domains
-  - operating-points-v2
   - ports
 
 additionalProperties: false
-- 
2.38.1



[PATCH v5 02/21] dt-bindings: msm: dsi-controller-main: Fix power-domain constraint

2022-12-20 Thread Bryan O'Donoghue
power-domain is required for the sc7180 dispcc GDSC but not every qcom SoC
has a similar dependency for example the apq8064.

Most Qcom SoC's using mdss-dsi-ctrl seem to have the ability to
power-collapse the MDP without collapsing DSI.

For example the qcom vendor kernel commit for apq8084, msm8226, msm8916,
msm8974.

https://review.carbonrom.org/plugins/gitiles/CarbonROM/android_kernel_oneplus_msm8994/+/7b5c011a770daa2811778937ed646237a28a8694

"ARM: dts: msm: add mdss gdsc supply to dsi controller device

 It is possible for the DSI controller to be active when MDP is
 power collapsed. DSI controller needs to have it's own vote for
 mdss gdsc to ensure that gdsc remains on in such cases."

This however doesn't appear to be the case for the apq8064 so we shouldn't
be marking power-domain as required in yaml checks.

Fixes: 4dbe55c97741 ("dt-bindings: msm: dsi: add yaml schemas for DSI bindings")
Reviewed-by: Dmitry Baryshkov 
Acked-by: Krzysztof Kozlowski 
Signed-off-by: Bryan O'Donoghue 
---
 .../devicetree/bindings/display/msm/dsi-controller-main.yaml | 1 -
 1 file changed, 1 deletion(-)

diff --git 
a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml 
b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
index 55bfe1101d6f4..8ba61fef576a5 100644
--- a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
+++ b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
@@ -137,7 +137,6 @@ required:
   - phys
   - assigned-clocks
   - assigned-clock-parents
-  - power-domains
   - ports
 
 additionalProperties: false
-- 
2.38.1



[PATCH v5 03/21] dt-bindings: msm: dsi-controller-main: Fix description of core clock

2022-12-20 Thread Bryan O'Donoghue
There's a typo in describing the core clock as an 'escape' clock. The
accurate description is 'core'.

Fixes: 4dbe55c97741 ("dt-bindings: msm: dsi: add yaml schemas for DSI bindings")
Reviewed-by: Dmitry Baryshkov 
Acked-by: Krzysztof Kozlowski 
Signed-off-by: Bryan O'Donoghue 
---
 .../devicetree/bindings/display/msm/dsi-controller-main.yaml| 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml 
b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
index 8ba61fef576a5..6e2fd6e9fa7f0 100644
--- a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
+++ b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
@@ -32,7 +32,7 @@ properties:
   - description: Display byte clock
   - description: Display byte interface clock
   - description: Display pixel clock
-  - description: Display escape clock
+  - description: Display core clock
   - description: Display AHB clock
   - description: Display AXI clock
 
-- 
2.38.1



[PATCH v5 00/21] mdss-dsi-ctrl binding and dts fixes

2022-12-20 Thread Bryan O'Donoghue
V5:
- Adds compat strings to bindings/display/msm/qcom,SoC-mdss.yaml - Dmitry
- Re-orders simple fixes to the start of the series to allow backports - Dmitry 
- VDDA and drop of node-names - Krzysztof
- Deprecates qcom,dsi-ctrl-6g-qcm2290 - Krzysztof, Dmitry
- Expands set of updated files to include new msm8953 - bod
- Converts to agreed compat string qcom,SoC-dsi-ctrl hence
  -  - qcom,mdss-dsi-ctrl-msm8996
  +  - qcom,msm8996-dsi-ctrl
- Adds RB where indicated for the compat strings.
V4:
- Moves the update of the example from patch #5 to patch #4

V3:
- Moves declaration of mdss-dsi-ctrl into compat string declaration
  patch - Krzysztof, Dmitry
- Renames qcm-2290 compat string to agreed compat "qcom,socname-dsi-ctrl"
  Dmirty, Krzysztof
- Adds empty line after if clause in yaml control flow section - Dmirty
- Adds Rb/Ack - Krzysztof, Dmitry, Doug, David
- vdd*
  Looking into this some more, I don't believe vdd, vdda, vddio ought to be
  required properties. Its up to the PCB manufacturer and the panel in-use
  how that panel is powered. Powering the panel is not something that
  even necessarily needs to be done from the dsi-ctrl driver.
  Originally marking vdd* as required in the .txt was an error, its not a
  SoC level dtsi requirement.
- clock-names
  Rather than replicate the clock-name in each if block I listed them with
  a specific description from a similar reference in usb/qcom,dwc3.yaml.
 
https://lore.kernel.org/linux-arm-msm/eb80681f-2e0b-605f-0444-ec65562f7...@linaro.org/

V2:
https://www.spinics.net/lists/linux-arm-msm/msg116326.html

- Moves the DSI PHY changes to a different later series.
  There are enough dsi-controller-main changes to justify its own
  standalone series.

- The original phy-name binding change given discussion with Rob and
  Krzysztof became its own standalone series that has since been merged.
  https://www.mail-archive.com/dri-devel@lists.freedesktop.org/msg403214.html

- Retains the drop of power-domain from yaml as a required property.
  I dug into the available dtsi. The apq8064 doesn't appear to have any
  GDSC which can be attached as a power-domain, which means the
  power-domain requirement is not universal across the various silicon
  versions.

- Adds Dmitry's RB to power-domain drop

- For the clock declarations I've
  * I noticed that the simple change I had worked for msm8939 but
subsquently broke other dtsi which drove a bigger change to document
the clocks on a per compatible basis.
  * Added compat strings in yaml.
  * Moved the allOf down later in the file to acomodate the if/then.
  * Number of clocks validated on a per compatible basis
  * The driver code which doesn't care about the number of clocks
can still operate on the mdss-dsi-ctrl compat but the dts checks will
validate against the compat string and yaml.

- vdd descriptions
  Took the previous text I missed from the .txt file - Krzysztof, Dmitry
  Adds vdd, vdda and vddio to the required list. This exposes warnings in
  existing dtsi but the previous .txt declared these regulators as
  required. - Krzysztof
 
V1:
This series fixes up a number of dtbs checks which are being flagged adding
in the msm8939 dtsi.


When converting from .txt to .yaml a number of the parameters for the older
msm8916 silicon were not transmitted into the yaml.

Adding in the msm8939 which is a near 1:1 copy of the msm8916 in terms of
dtsi triggers a rake of dtbs checks as a result.

https://www.mail-archive.com/dri-devel@lists.freedesktop.org/msg403211.html

Bryan O'Donoghue (21):
  dt-bindings: msm: dsi-controller-main: Fix operating-points-v2
constraint
  dt-bindings: msm: dsi-controller-main: Fix power-domain constraint
  dt-bindings: msm: dsi-controller-main: Fix description of core clock
  dt-bindings: msm: dsi-controller-main: Add compatible strings for
every current SoC
  dt-bindings: msm: dsi-controller-main: Deprecate
qcom,dsi-ctrl-6g-qcm2290 in favour of qcom,qcm2290-dsi-ctrl
  dt-bindings: msm: dsi-controller-main: Document clocks on a per
compatible basis
  dt-bindings: msm: dsi-controller-main: Fix clock declarations
  dt-bindings: msm: dsi-controller-main: Add vdd* descriptions back in
  dt-bindings: display/msm: Add list of mdss-dsi-ctrl compats
  dt-bindings: display/msm: Update MDSS dsi compat strings
  ARM: dts: qcom: apq8064: add compat qcom,apq8064-dsi-ctrl
  ARM: dts: qcom: msm8974: Add compat qcom,msm8974-dsi-ctrl
  arm64: dts: qcom: msm8916: Add compat qcom,msm8916-dsi-ctrl
  arm64: dts: qcom: msm8953: Add compat qcom,msm8953-dsi-ctrl
  arm64: dts: qcom: msm8996: Add compat qcom,msm8996-dsi-ctrl
  arm64: dts: qcom: sc7180: Add compat qcom,sc7180-dsi-ctrl
  arm64: dts: qcom: sc7280: Add compat qcom,sc7280-dsi-ctrl
  arm64: dts: qcom: sdm630: Add compat qcom,sdm660-dsi-ctrl
  arm64: dts: qcom: sdm660: Add compat qcom,sdm660-dsi-ctrl
  arm64: dts: qcom: sdm845: Add compat qcom,sdm845-dsi-ctrl
  arm64: dts: qcom: sm8250: Add c

Re: [PATCH v4 02/18] dt-bindings: msm: dsi-controller-main: Fix power-domain constraint

2022-11-27 Thread Bryan O'Donoghue

On 25/11/2022 12:36, Bryan O'Donoghue wrote:

power-domain is required for the sc7180 dispcc GDSC but not every qcom SoC
has a similar dependency for example the aqp8064.


Note to self "apq8064"



Re: [PATCH v3 08/18] dt-bindings: msm: dsi-controller-main: Add vdd* descriptions back in

2022-11-26 Thread Bryan O'Donoghue

On 26/11/2022 14:46, Krzysztof Kozlowski wrote:

1. vdd->VDD


Hmm.

I honestly didn't pick that up from your previous comment but, np.

---
bod



Re: [PATCH v3 05/18] dt-bindings: msm: dsi-controller-main: Document clocks on a per compatible basis

2022-11-26 Thread Bryan O'Donoghue

On 26/11/2022 14:44, Krzysztof Kozlowski wrote:

On 24/11/2022 01:47, Bryan O'Donoghue wrote:

Each compatible has a different set of clocks which are associated with it.
Add in the list of clocks for each compatible.

Signed-off-by: Bryan O'Donoghue 
---
  .../display/msm/dsi-controller-main.yaml  | 154 --
  1 file changed, 143 insertions(+), 11 deletions(-)

diff --git 
a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml 
b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
index c4da717d2..88aac7d33555c 100644
--- a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
+++ b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
@@ -9,9 +9,6 @@ title: Qualcomm Display DSI controller
  maintainers:
- Krishna Manikandan 
  
-allOf:

-  - $ref: "../dsi-controller.yaml#"
-
  properties:
compatible:
  items:
@@ -48,13 +45,8 @@ properties:
- description: Display AXI clock
  
clock-names:

-items:
-  - const: byte
-  - const: byte_intf
-  - const: pixel
-  - const: core
-  - const: iface
-  - const: bus
+minItems: 6
+maxItems: 9
  
phys:

  maxItems: 1
@@ -147,6 +139,146 @@ required:
- assigned-clock-parents
- ports
  
+allOf:

+  - $ref: "../dsi-controller.yaml#"
+  - if:
+  properties:
+compatible:
+  contains:
+enum:
+  - qcom,apq8064-dsi-ctrl
+then:
+  properties:
+clocks:
+  maxItems: 7
+clock-names:
+  items:
+- const: iface
+- const: bus
+- const: core_mmss
+- const: src
+- const: byte
+- const: pixel
+- const: core
+
+  - if:
+  properties:
+compatible:
+  contains:
+enum:
+  - qcom,msm8916-dsi-ctrl
+then:
+  properties:
+clocks:
+  maxItems: 6
+clock-names:
+  items:
+- const: mdp_core
+- const: iface
+- const: bus
+- const: byte
+- const: pixel
+- const: core
+
+  - if:
+  properties:
+compatible:
+  contains:
+enum:
+  - qcom,msm8974-dsi-ctrl
+then:
+  properties:
+clocks:
+  maxItems: 3
+clock-names:
+  items:
+- const: iface
+- const: bus
+- const: vsync


minItems are 6, so does it actually work?


Hmm.

I ran this using a recent version of dt-schema from github

DT_DOC_CHECKER=~/Development/qualcomm/dt-schema/tools/dt-doc-validate
DT_EXTRACT_EX=~/Development/qualcomm/dt-schema/tools/dt-extract-example
DT_MK_SCHEMA=~/Development/qualcomm/dt-schema/tools/dt-mk-schema
DT_CHECKER=~/Development/qualcomm/dt-schema/tools/dt-validate

make DT_CHECKER_FLAGS=-m dt_binding_check O=$BUILDDIR 
DT_DOC_CHECKER=$DT_DOC_CHECKER DT_EXTRACT_EX=$DT_EXTRACT_EX 
DT_MK_SCHEMA=$DT_MK_SCHEMA DT_CHECKER=$DT_CHECKER 
DT_SCHEMA_FILES=display/msm/dsi-controller-main.yaml -j `nproc`


Neither of these throw an warning in my compile log

arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts:
arch/arm/boot/dts/qcom-msm8974pro-samsung-klte.dts:

thanks for spotting


-   compatible = "qcom,mdss-dsi-ctrl";
+   compatible = "qcom,sc7180-dsi-ctrl", "qcom,mdss-dsi-ctrl";




already dropped in v4



Re: [PATCH v3 03/18] dt-bindings: msm: dsi-controller-main: Rename qcom,dsi-ctrl-6g-qcm2290 to qcom,qcm2290-dsi-ctrl

2022-11-26 Thread Bryan O'Donoghue

On 26/11/2022 14:36, Krzysztof Kozlowski wrote:

That's a bit surprising. Did we discuss it? It breaks the ABI, so I
doubt (driver/bindings were already upstreamed).

Best regards,
Krzysztof


We did discuss it but, apparently didn't grep it.

I'll drop this


[PATCH v4 17/18] arm64: dts: qcom: sdm845: Add compat qcom, sdm845-dsi-ctrl

2022-11-25 Thread Bryan O'Donoghue
Add silicon specific compatible qcom,sdm845-dsi-ctrl to the
mdss-dsi-ctrl block. This allows us to differentiate the specific bindings
for sdm845 against the yaml documentation.

Reviewed-by: Douglas Anderson 
Signed-off-by: Bryan O'Donoghue 
---
 arch/arm64/boot/dts/qcom/sdm845.dtsi | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi 
b/arch/arm64/boot/dts/qcom/sdm845.dtsi
index 5420205417c81..c14e49c9655c3 100644
--- a/arch/arm64/boot/dts/qcom/sdm845.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi
@@ -4522,7 +4522,8 @@ opp-43000 {
};
 
dsi0: dsi@ae94000 {
-   compatible = "qcom,mdss-dsi-ctrl";
+   compatible = "qcom,sdm845-dsi-ctrl",
+"qcom,mdss-dsi-ctrl";
reg = <0 0x0ae94000 0 0x400>;
reg-names = "dsi_ctrl";
 
@@ -4593,7 +4594,8 @@ dsi0_phy: dsi-phy@ae94400 {
};
 
dsi1: dsi@ae96000 {
-   compatible = "qcom,mdss-dsi-ctrl";
+   compatible = "qcom,sdm845-dsi-ctrl",
+"qcom,mdss-dsi-ctrl";
reg = <0 0x0ae96000 0 0x400>;
reg-names = "dsi_ctrl";
 
-- 
2.38.1



[PATCH v4 18/18] arm64: dts: qcom: sm8250: Add compat qcom, sm8250-dsi-ctrl

2022-11-25 Thread Bryan O'Donoghue
Add silicon specific compatible qcom,sm8250-dsi-ctrl to the
mdss-dsi-ctrl block. This allows us to differentiate the specific bindings
for sm8250 against the yaml documentation.

Signed-off-by: Bryan O'Donoghue 
---
 arch/arm64/boot/dts/qcom/sm8250.dtsi | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi 
b/arch/arm64/boot/dts/qcom/sm8250.dtsi
index 0d47c5b7148e1..8a73f1b487043 100644
--- a/arch/arm64/boot/dts/qcom/sm8250.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi
@@ -3528,7 +3528,8 @@ opp-46000 {
};
 
dsi0: dsi@ae94000 {
-   compatible = "qcom,mdss-dsi-ctrl";
+   compatible = "qcom,sm8250-dsi-ctrl",
+"qcom,mdss-dsi-ctrl";
reg = <0 0x0ae94000 0 0x400>;
reg-names = "dsi_ctrl";
 
@@ -3619,7 +3620,8 @@ dsi0_phy: dsi-phy@ae94400 {
};
 
dsi1: dsi@ae96000 {
-   compatible = "qcom,mdss-dsi-ctrl";
+   compatible = "qcom,sm8250-dsi-ctrl",
+"qcom,mdss-dsi-ctrl";
reg = <0 0x0ae96000 0 0x400>;
reg-names = "dsi_ctrl";
 
-- 
2.38.1



[PATCH v4 10/18] ARM: dts: qcom: msm8974: Add compat qcom, msm8974-dsi-ctrl

2022-11-25 Thread Bryan O'Donoghue
Add silicon specific compatible qcom,msm8974-dsi-ctrl to the
mdss-dsi-ctrl block. This allows us to differentiate the specific bindings
for msm8974 against the yaml documentation.

Signed-off-by: Bryan O'Donoghue 
---
 arch/arm/boot/dts/qcom-msm8974.dtsi | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/qcom-msm8974.dtsi 
b/arch/arm/boot/dts/qcom-msm8974.dtsi
index 21d943d4b02d7..b4361f4318ece 100644
--- a/arch/arm/boot/dts/qcom-msm8974.dtsi
+++ b/arch/arm/boot/dts/qcom-msm8974.dtsi
@@ -1545,7 +1545,8 @@ mdp5_intf1_out: endpoint {
};
 
dsi0: dsi@fd922800 {
-   compatible = "qcom,mdss-dsi-ctrl";
+   compatible = "qcom,msm8974-dsi-ctrl",
+"qcom,mdss-dsi-ctrl";
reg = <0xfd922800 0x1f8>;
reg-names = "dsi_ctrl";
 
-- 
2.38.1



[PATCH v4 11/18] arm64: dts: qcom: msm8916: Add compat qcom, msm8916-dsi-ctrl

2022-11-25 Thread Bryan O'Donoghue
Add silicon specific compatible qcom,msm8916-dsi-ctrl to the
mdss-dsi-ctrl block. This allows us to differentiate the specific bindings
for msm8916 against the yaml documentation.

Signed-off-by: Bryan O'Donoghue 
---
 arch/arm64/boot/dts/qcom/msm8916.dtsi | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi 
b/arch/arm64/boot/dts/qcom/msm8916.dtsi
index c1d8a1b388d27..20e72038cadfe 100644
--- a/arch/arm64/boot/dts/qcom/msm8916.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi
@@ -1021,7 +1021,8 @@ mdp5_intf1_out: endpoint {
};
 
dsi0: dsi@1a98000 {
-   compatible = "qcom,mdss-dsi-ctrl";
+   compatible = "qcom,msm8916-dsi-ctrl",
+"qcom,mdss-dsi-ctrl";
reg = <0x01a98000 0x25c>;
reg-names = "dsi_ctrl";
 
-- 
2.38.1



[PATCH v4 13/18] arm64: dts: qcom: sc7180: Add compat qcom, sc7180-dsi-ctrl

2022-11-25 Thread Bryan O'Donoghue
Add silicon specific compatible qcom,sc7180-dsi-ctrl to the
mdss-dsi-ctrl block. This allows us to differentiate the specific bindings
for sc7180 against the yaml documentation.

Reviewed-by: Douglas Anderson 
Signed-off-by: Bryan O'Donoghue 
---
 arch/arm64/boot/dts/qcom/sc7180.dtsi | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi 
b/arch/arm64/boot/dts/qcom/sc7180.dtsi
index d2c374e9d8c03..cfe44afc52b4a 100644
--- a/arch/arm64/boot/dts/qcom/sc7180.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7180.dtsi
@@ -2985,7 +2985,8 @@ opp-46000 {
};
 
dsi0: dsi@ae94000 {
-   compatible = "qcom,mdss-dsi-ctrl";
+   compatible = "qcom,sc7180-dsi-ctrl",
+"qcom,mdss-dsi-ctrl";
reg = <0 0x0ae94000 0 0x400>;
reg-names = "dsi_ctrl";
 
-- 
2.38.1



[PATCH v4 08/18] dt-bindings: msm: dsi-controller-main: Add vdd* descriptions back in

2022-11-25 Thread Bryan O'Donoghue
When converting from .txt to .yaml we didn't include descriptions for the
existing regulator supplies.

- vdd
- vdda
- vddio

Add those descriptions into the yaml now as they were prior to the
conversion. In the .txt description we marked these regulators as required,
however, that requirement appears to have been in error.

Taking the example of sc7180-trogdor-wormdingler.dtsi. The avdd and avee
come from GPIO controlled external regulators, not the SoC and in this case
there's no need for vddio to power an I/O bus. Similarly the regulators for
the LCD are controlled by the panel driver not by the dsi-ctrl driver.

It would be possible to connect a different type of panel to the DSI bus
here in which case we may or may not want to make use of vdd, vdda or
vddio.

This is also the case for older chipsets like apq8064, msm8916 etc the vdd*
regulators in the dsi-ctrl block are helpers not dependencies.

Add the description of vdd, vdda and vddio back in for the existing
upstream dts where vdd, vdda or vddio are already declared but, don't
declare those regulators required - they are not SoC requirements.

Fixes: 4dbe55c97741 ("dt-bindings: msm: dsi: add yaml schemas for DSI bindings")
Signed-off-by: Bryan O'Donoghue 
---
 .../bindings/display/msm/dsi-controller-main.yaml| 12 
 1 file changed, 12 insertions(+)

diff --git 
a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml 
b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
index 0fbb0c04f4b06..bcbcbdca1a78a 100644
--- a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
+++ b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
@@ -133,6 +133,18 @@ properties:
   - port@0
   - port@1
 
+  vdd-supply:
+description:
+  vdd regulator device node
+
+  vddio-supply:
+description:
+  vdd-io regulator device node
+
+  vdda-supply:
+description:
+  vdda regulator device node
+
 required:
   - compatible
   - reg
-- 
2.38.1



[PATCH v4 05/18] dt-bindings: msm: dsi-controller-main: Document clocks on a per compatible basis

2022-11-25 Thread Bryan O'Donoghue
Each compatible has a different set of clocks which are associated with it.
Add in the list of clocks for each compatible.

Signed-off-by: Bryan O'Donoghue 
---
 .../display/msm/dsi-controller-main.yaml  | 152 --
 1 file changed, 142 insertions(+), 10 deletions(-)

diff --git 
a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml 
b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
index 0cd2079137b02..88aac7d33555c 100644
--- a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
+++ b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
@@ -9,9 +9,6 @@ title: Qualcomm Display DSI controller
 maintainers:
   - Krishna Manikandan 
 
-allOf:
-  - $ref: "../dsi-controller.yaml#"
-
 properties:
   compatible:
 items:
@@ -48,13 +45,8 @@ properties:
   - description: Display AXI clock
 
   clock-names:
-items:
-  - const: byte
-  - const: byte_intf
-  - const: pixel
-  - const: core
-  - const: iface
-  - const: bus
+minItems: 6
+maxItems: 9
 
   phys:
 maxItems: 1
@@ -147,6 +139,146 @@ required:
   - assigned-clock-parents
   - ports
 
+allOf:
+  - $ref: "../dsi-controller.yaml#"
+  - if:
+  properties:
+compatible:
+  contains:
+enum:
+  - qcom,apq8064-dsi-ctrl
+then:
+  properties:
+clocks:
+  maxItems: 7
+clock-names:
+  items:
+- const: iface
+- const: bus
+- const: core_mmss
+- const: src
+- const: byte
+- const: pixel
+- const: core
+
+  - if:
+  properties:
+compatible:
+  contains:
+enum:
+  - qcom,msm8916-dsi-ctrl
+then:
+  properties:
+clocks:
+  maxItems: 6
+clock-names:
+  items:
+- const: mdp_core
+- const: iface
+- const: bus
+- const: byte
+- const: pixel
+- const: core
+
+  - if:
+  properties:
+compatible:
+  contains:
+enum:
+  - qcom,msm8974-dsi-ctrl
+then:
+  properties:
+clocks:
+  maxItems: 3
+clock-names:
+  items:
+- const: iface
+- const: bus
+- const: vsync
+
+  - if:
+  properties:
+compatible:
+  contains:
+enum:
+  - qcom,msm8996-dsi-ctrl
+then:
+  properties:
+clocks:
+  maxItems: 7
+clock-names:
+  items:
+- const: mdp_core
+- const: byte
+- const: iface
+- const: bus
+- const: core_mmss
+- const: pixel
+- const: core
+
+  - if:
+  properties:
+compatible:
+  contains:
+enum:
+  - qcom,sc7180-dsi-ctrl
+  - qcom,sc7280-dsi-ctrl
+  - qcom,sm8250-dsi-ctrl
+then:
+  properties:
+clocks:
+  maxItems: 6
+clock-names:
+  items:
+- const: byte
+- const: byte_intf
+- const: pixel
+- const: core
+- const: iface
+- const: bus
+
+  - if:
+  properties:
+compatible:
+  contains:
+enum:
+  - qcom,sdm630-dsi-ctrl
+  - qcom,sdm660-dsi-ctrl
+then:
+  properties:
+clocks:
+  maxItems: 9
+clock-names:
+  items:
+- const: mdp_core
+- const: byte
+- const: byte_intf
+- const: mnoc
+- const: iface
+- const: bus
+- const: core_mmss
+- const: pixel
+- const: core
+
+  - if:
+  properties:
+compatible:
+  contains:
+enum:
+  - qcom,sdm845-dsi-ctrl
+then:
+  properties:
+clocks:
+  maxItems: 6
+clock-names:
+  items:
+- const: byte
+- const: byte_intf
+- const: pixel
+- const: core
+- const: iface
+- const: bus
+
 additionalProperties: false
 
 examples:
-- 
2.38.1



[PATCH v4 15/18] arm64: dts: qcom: sdm630: Add compat qcom, sdm630-dsi-ctrl

2022-11-25 Thread Bryan O'Donoghue
Add silicon specific compatible qcom,sdm630-dsi-ctrl to the
mdss-dsi-ctrl block. This allows us to differentiate the specific bindings
for sdm630 against the yaml documentation.

Signed-off-by: Bryan O'Donoghue 
---
 arch/arm64/boot/dts/qcom/sdm630.dtsi | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/sdm630.dtsi 
b/arch/arm64/boot/dts/qcom/sdm630.dtsi
index 0e7764f66b104..905ddb57318dd 100644
--- a/arch/arm64/boot/dts/qcom/sdm630.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm630.dtsi
@@ -1581,7 +1581,8 @@ opp-41250 {
};
 
dsi0: dsi@c994000 {
-   compatible = "qcom,mdss-dsi-ctrl";
+   compatible = "qcom,sdm630-dsi-ctrl",
+"qcom,mdss-dsi-ctrl";
reg = <0x0c994000 0x400>;
reg-names = "dsi_ctrl";
 
-- 
2.38.1



[PATCH v4 14/18] arm64: dts: qcom: sc7280: Add compat qcom, sc7280-dsi-ctrl

2022-11-25 Thread Bryan O'Donoghue
Add silicon specific compatible qcom,sc7280-dsi-ctrl to the
mdss-dsi-ctrl block. This allows us to differentiate the specific bindings
for sc7280 against the yaml documentation.

Reviewed-by: Douglas Anderson 
Signed-off-by: Bryan O'Donoghue 
---
 arch/arm64/boot/dts/qcom/sc7280.dtsi | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/sc7280.dtsi 
b/arch/arm64/boot/dts/qcom/sc7280.dtsi
index a4d6e866b5999..3368531e004e8 100644
--- a/arch/arm64/boot/dts/qcom/sc7280.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7280.dtsi
@@ -3903,7 +3903,8 @@ opp-50667 {
};
 
mdss_dsi: dsi@ae94000 {
-   compatible = "qcom,mdss-dsi-ctrl";
+   compatible = "qcom,sc7280-dsi-ctrl",
+"qcom,mdss-dsi-ctrl";
reg = <0 0x0ae94000 0 0x400>;
reg-names = "dsi_ctrl";
 
-- 
2.38.1



[PATCH v4 06/18] dt-bindings: msm: dsi-controller-main: Fix description of core clock

2022-11-25 Thread Bryan O'Donoghue
There's a typo in describing the core clock as an 'escape' clock. The
accurate description is 'core'.

Fixes: 4dbe55c97741 ("dt-bindings: msm: dsi: add yaml schemas for DSI bindings")
Reviewed-by: Dmitry Baryshkov 
Acked-by: Krzysztof Kozlowski 
Signed-off-by: Bryan O'Donoghue 
---
 .../devicetree/bindings/display/msm/dsi-controller-main.yaml| 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml 
b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
index 88aac7d33555c..0c09b9230b7f5 100644
--- a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
+++ b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
@@ -40,7 +40,7 @@ properties:
   - description: Display byte clock
   - description: Display byte interface clock
   - description: Display pixel clock
-  - description: Display escape clock
+  - description: Display core clock
   - description: Display AHB clock
   - description: Display AXI clock
 
-- 
2.38.1



[PATCH v4 07/18] dt-bindings: msm: dsi-controller-main: Fix clock declarations

2022-11-25 Thread Bryan O'Donoghue
When converting from .txt to .yaml dt-binding descriptions we appear to
have missed some of the previous detail on the number and names of
permissible clocks.

Fix this by listing the clock descriptions against the clock names at a
high level.

Fixes: 4dbe55c97741 ("dt-bindings: msm: dsi: add yaml schemas for DSI bindings")
Signed-off-by: Bryan O'Donoghue 
---
 .../display/msm/dsi-controller-main.yaml  | 20 ---
 1 file changed, 13 insertions(+), 7 deletions(-)

diff --git 
a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml 
b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
index 0c09b9230b7f5..0fbb0c04f4b06 100644
--- a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
+++ b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
@@ -36,13 +36,19 @@ properties:
 maxItems: 1
 
   clocks:
-items:
-  - description: Display byte clock
-  - description: Display byte interface clock
-  - description: Display pixel clock
-  - description: Display core clock
-  - description: Display AHB clock
-  - description: Display AXI clock
+description: |
+  Several clocks are used, depending on the variant. Typical ones are::
+   - bus:: Display AHB clock.
+   - byte:: Display byte clock.
+   - byte_intf:: Display byte interface clock.
+   - core:: Display core clock.
+   - core_mss:: Core MultiMedia SubSystem clock.
+   - iface:: Display AXI clock.
+   - mdp_core:: MDP Core clock.
+   - mnoc:: MNOC clock
+   - pixel:: Display pixel clock.
+minItems: 6
+maxItems: 9
 
   clock-names:
 minItems: 6
-- 
2.38.1



[PATCH v4 04/18] dt-bindings: msm: dsi-controller-main: Add compatible strings for every current SoC

2022-11-25 Thread Bryan O'Donoghue
Currently we do not differentiate between the various users of the
qcom,mdss-dsi-ctrl. The driver is flexible enough to operate from one
compatible string but, the hardware does have some significant differences
in the number of clocks.

To facilitate documenting the clocks add the following compatible strings

- qcom,apq8064-dsi-ctrl
- qcom,msm8916-dsi-ctrl
- qcom,msm8974-dsi-ctrl
- qcom,msm8996-dsi-ctrl
- qcom,sc7180-dsi-ctrl
- qcom,sc7280-dsi-ctrl
- qcom,sdm630-dsi-ctrl
- qcom,sdm660-dsi-ctrl
- qcom,sdm845-dsi-ctrl
- qcom,sm8250-dsi-ctrl

Each SoC dtsi should declare "qcom,socname-dsi-ctrl", "qcom,mdss-dsi-ctrl";

Signed-off-by: Bryan O'Donoghue 
---
 .../display/msm/dsi-controller-main.yaml  | 19 +++
 1 file changed, 15 insertions(+), 4 deletions(-)

diff --git 
a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml 
b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
index 67d08dc338925..0cd2079137b02 100644
--- a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
+++ b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
@@ -14,9 +14,20 @@ allOf:
 
 properties:
   compatible:
-enum:
-  - qcom,mdss-dsi-ctrl
-  - qcom,qcm2290-dsi-ctrl
+items:
+  - enum:
+  - qcom,apq8064-dsi-ctrl
+  - qcom,msm8916-dsi-ctrl
+  - qcom,msm8974-dsi-ctrl
+  - qcom,msm8996-dsi-ctrl
+  - qcom,qcm2290-dsi-ctrl
+  - qcom,sc7180-dsi-ctrl
+  - qcom,sc7280-dsi-ctrl
+  - qcom,sdm630-dsi-ctrl
+  - qcom,sdm660-dsi-ctrl
+  - qcom,sdm845-dsi-ctrl
+  - qcom,sm8250-dsi-ctrl
+  - const: qcom,mdss-dsi-ctrl
 
   reg:
 maxItems: 1
@@ -146,7 +157,7 @@ examples:
  #include 
 
  dsi@ae94000 {
-   compatible = "qcom,mdss-dsi-ctrl";
+   compatible = "qcom,sc7180-dsi-ctrl", "qcom,mdss-dsi-ctrl";
reg = <0x0ae94000 0x400>;
reg-names = "dsi_ctrl";
 
-- 
2.38.1



[PATCH v4 02/18] dt-bindings: msm: dsi-controller-main: Fix power-domain constraint

2022-11-25 Thread Bryan O'Donoghue
power-domain is required for the sc7180 dispcc GDSC but not every qcom SoC
has a similar dependency for example the aqp8064.

Most Qcom SoC's using mdss-dsi-ctrl seem to have the ability to
power-collapse the MDP without collapsing DSI.

For example the qcom vendor kernel commit for apq8084, msm8226, msm8916,
msm8974.

https://review.carbonrom.org/plugins/gitiles/CarbonROM/android_kernel_oneplus_msm8994/+/7b5c011a770daa2811778937ed646237a28a8694

"ARM: dts: msm: add mdss gdsc supply to dsi controller device

 It is possible for the DSI controller to be active when MDP is
 power collapsed. DSI controller needs to have it's own vote for
 mdss gdsc to ensure that gdsc remains on in such cases."

This however doesn't appear to be the case for the apq8064 so we shouldn't
be marking power-domain as required in yaml checks.

Fixes: 4dbe55c97741 ("dt-bindings: msm: dsi: add yaml schemas for DSI bindings")
Reviewed-by: Dmitry Baryshkov 
Acked-by: Krzysztof Kozlowski 
Signed-off-by: Bryan O'Donoghue 
---
 .../devicetree/bindings/display/msm/dsi-controller-main.yaml | 1 -
 1 file changed, 1 deletion(-)

diff --git 
a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml 
b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
index 27ebfd5ffb22f..cf782c5f5bdb0 100644
--- a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
+++ b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
@@ -134,7 +134,6 @@ required:
   - phys
   - assigned-clocks
   - assigned-clock-parents
-  - power-domains
   - ports
 
 additionalProperties: false
-- 
2.38.1



[PATCH v4 12/18] arm64: dts: qcom: msm8996: Add compat qcom, msm8996-dsi-ctrl

2022-11-25 Thread Bryan O'Donoghue
Add silicon specific compatible qcom,msm8996-dsi-ctrl to the
mdss-dsi-ctrl block. This allows us to differentiate the specific bindings
for msm8996 against the yaml documentation.

Signed-off-by: Bryan O'Donoghue 
---
 arch/arm64/boot/dts/qcom/msm8996.dtsi | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi 
b/arch/arm64/boot/dts/qcom/msm8996.dtsi
index 081e20a63c610..9f6543579dcf0 100644
--- a/arch/arm64/boot/dts/qcom/msm8996.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi
@@ -968,7 +968,8 @@ mdp5_intf2_out: endpoint {
};
 
dsi0: dsi@994000 {
-   compatible = "qcom,mdss-dsi-ctrl";
+   compatible = "qcom,msm8996-dsi-ctrl",
+"qcom,mdss-dsi-ctrl";
reg = <0x00994000 0x400>;
reg-names = "dsi_ctrl";
 
@@ -1035,7 +1036,8 @@ dsi0_phy: dsi-phy@994400 {
};
 
dsi1: dsi@996000 {
-   compatible = "qcom,mdss-dsi-ctrl";
+   compatible = "qcom,msm8996-dsi-ctrl",
+"qcom,mdss-dsi-ctrl";
reg = <0x00996000 0x400>;
reg-names = "dsi_ctrl";
 
-- 
2.38.1



[PATCH v4 01/18] dt-bindings: msm: dsi-controller-main: Fix operating-points-v2 constraint

2022-11-25 Thread Bryan O'Donoghue
The existing msm8916.dtsi does not depend on nor require operating points.

Fixes: 4dbe55c97741 ("dt-bindings: msm: dsi: add yaml schemas for DSI bindings")
Reviewed-by: Dmitry Baryshkov 
Acked-by: Krzysztof Kozlowski 
Signed-off-by: Bryan O'Donoghue 
---
 .../devicetree/bindings/display/msm/dsi-controller-main.yaml | 1 -
 1 file changed, 1 deletion(-)

diff --git 
a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml 
b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
index 7782bff89afc7..27ebfd5ffb22f 100644
--- a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
+++ b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
@@ -135,7 +135,6 @@ required:
   - assigned-clocks
   - assigned-clock-parents
   - power-domains
-  - operating-points-v2
   - ports
 
 additionalProperties: false
-- 
2.38.1



[PATCH v4 09/18] ARM: dts: qcom: apq8064: add compat qcom, apq8064-dsi-ctrl

2022-11-25 Thread Bryan O'Donoghue
Append silicon specific compatible qcom,apq8064-dsi-ctrl to the
mdss-dsi-ctrl block. This allows us to differentiate the specific bindings
for apq8064 against the yaml documentation.

Reviewed-by: David Heidelberg 
Signed-off-by: Bryan O'Donoghue 
---
 arch/arm/boot/dts/qcom-apq8064.dtsi | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/qcom-apq8064.dtsi 
b/arch/arm/boot/dts/qcom-apq8064.dtsi
index d036dff4b14f7..a8b089eb0dad2 100644
--- a/arch/arm/boot/dts/qcom-apq8064.dtsi
+++ b/arch/arm/boot/dts/qcom-apq8064.dtsi
@@ -1287,7 +1287,8 @@ mmss_sfpb: syscon@570 {
};
 
dsi0: dsi@470 {
-   compatible = "qcom,mdss-dsi-ctrl";
+   compatible = "qcom,apq8064-dsi-ctrl"
+"qcom,mdss-dsi-ctrl";
label = "MDSS DSI CTRL->0";
#address-cells = <1>;
#size-cells = <0>;
-- 
2.38.1



[PATCH v4 03/18] dt-bindings: msm: dsi-controller-main: Rename qcom, dsi-ctrl-6g-qcm2290 to qcom, qcm2290-dsi-ctrl

2022-11-25 Thread Bryan O'Donoghue
We will add in a number of compat strings to dsi-controller-main.yaml in
the format "qcom,socname-dsi-ctrl" convert the currently unused
qcom,dsi-ctrl-6g-qcm2290 to qcom,qcm2290-dsi-ctrl.

Signed-off-by: Bryan O'Donoghue 
---
 .../devicetree/bindings/display/msm/dsi-controller-main.yaml| 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml 
b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
index cf782c5f5bdb0..67d08dc338925 100644
--- a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
+++ b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
@@ -16,7 +16,7 @@ properties:
   compatible:
 enum:
   - qcom,mdss-dsi-ctrl
-  - qcom,dsi-ctrl-6g-qcm2290
+  - qcom,qcm2290-dsi-ctrl
 
   reg:
 maxItems: 1
-- 
2.38.1



[PATCH v4 16/18] arm64: dts: qcom: sdm660: Add compat qcom, sdm660-dsi-ctrl

2022-11-25 Thread Bryan O'Donoghue
Add silicon specific compatible qcom,sdm660-dsi-ctrl to the
mdss-dsi-ctrl block. This allows us to differentiate the specific bindings
for sdm660 against the yaml documentation.

Signed-off-by: Bryan O'Donoghue 
---
 arch/arm64/boot/dts/qcom/sdm660.dtsi | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/sdm660.dtsi 
b/arch/arm64/boot/dts/qcom/sdm660.dtsi
index 10bf1c45cf6ec..f8ec728e67f3d 100644
--- a/arch/arm64/boot/dts/qcom/sdm660.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm660.dtsi
@@ -154,7 +154,8 @@ mdp5_intf2_out: endpoint {
 
  {
dsi1: dsi@c996000 {
-   compatible = "qcom,mdss-dsi-ctrl";
+   compatible = "qcom,sdm660-dsi-ctrl",
+"qcom,mdss-dsi-ctrl";
reg = <0x0c996000 0x400>;
reg-names = "dsi_ctrl";
 
-- 
2.38.1



[PATCH v4 00/18] mdss-dsi-ctrl binding and dts fixes

2022-11-25 Thread Bryan O'Donoghue
V4:
- Moves the update of the example from patch #5 to patch #4

V3:
- Moves declaration of mdss-dsi-ctrl into compat string declaration
  patch - Krzysztof, Dmitry
- Renames qcm-2290 compat string to agreed compat "qcom,socname-dsi-ctrl"
  Dmirty, Krzysztof
- Adds empty line after if clause in yaml control flow section - Dmirty
- Adds Rb/Ack - Krzysztof, Dmitry, Doug, David
- vdd*
  Looking into this some more, I don't believe vdd, vdda, vddio ought to be
  required properties. Its up to the PCB manufacturer and the panel in-use
  how that panel is powered. Powering the panel is not something that
  even necessarily needs to be done from the dsi-ctrl driver.
  Originally marking vdd* as required in the .txt was an error, its not a
  SoC level dtsi requirement.
- clock-names
  Rather than replicate the clock-name in each if block I listed them with
  a specific description from a similar reference in usb/qcom,dwc3.yaml.
 
https://lore.kernel.org/linux-arm-msm/eb80681f-2e0b-605f-0444-ec65562f7...@linaro.org/

V2:
https://www.spinics.net/lists/linux-arm-msm/msg116326.html

- Moves the DSI PHY changes to a different later series.
  There are enough dsi-controller-main changes to justify its own
  standalone series.

- The original phy-name binding change given discussion with Rob and
  Krzysztof became its own standalone series that has since been merged.
  https://www.mail-archive.com/dri-devel@lists.freedesktop.org/msg403214.html

- Retains the drop of power-domain from yaml as a required property.
  I dug into the available dtsi. The apq8064 doesn't appear to have any
  GDSC which can be attached as a power-domain, which means the
  power-domain requirement is not universal across the various silicon
  versions.

- Adds Dmitry's RB to power-domain drop

- For the clock declarations I've
  * I noticed that the simple change I had worked for msm8939 but
subsquently broke other dtsi which drove a bigger change to document
the clocks on a per compatible basis.
  * Added compat strings in yaml.
  * Moved the allOf down later in the file to acomodate the if/then.
  * Number of clocks validated on a per compatible basis
  * The driver code which doesn't care about the number of clocks
can still operate on the mdss-dsi-ctrl compat but the dts checks will
validate against the compat string and yaml.

- vdd descriptions
  Took the previous text I missed from the .txt file - Krzysztof, Dmitry
  Adds vdd, vdda and vddio to the required list. This exposes warnings in
  existing dtsi but the previous .txt declared these regulators as
  required. - Krzysztof
 
V1:
This series fixes up a number of dtbs checks which are being flagged adding
in the msm8939 dtsi.


When converting from .txt to .yaml a number of the parameters for the older
msm8916 silicon were not transmitted into the yaml.

Adding in the msm8939 which is a near 1:1 copy of the msm8916 in terms of
dtsi triggers a rake of dtbs checks as a result.

https://www.mail-archive.com/dri-devel@lists.freedesktop.org/msg403211.html

Bryan O'Donoghue (18):
  dt-bindings: msm: dsi-controller-main: Fix operating-points-v2
constraint
  dt-bindings: msm: dsi-controller-main: Fix power-domain constraint
  dt-bindings: msm: dsi-controller-main: Rename qcom,dsi-ctrl-6g-qcm2290
to qcom,qcm2290-dsi-ctrl
  dt-bindings: msm: dsi-controller-main: Add compatible strings for
every current SoC
  dt-bindings: msm: dsi-controller-main: Document clocks on a per
compatible basis
  dt-bindings: msm: dsi-controller-main: Fix description of core clock
  dt-bindings: msm: dsi-controller-main: Fix clock declarations
  dt-bindings: msm: dsi-controller-main: Add vdd* descriptions back in
  ARM: dts: qcom: apq8064: add compat qcom,apq8064-dsi-ctrl
  ARM: dts: qcom: msm8974: Add compat qcom,msm8974-dsi-ctrl
  arm64: dts: qcom: msm8916: Add compat qcom,msm8916-dsi-ctrl
  arm64: dts: qcom: msm8996: Add compat qcom,msm8996-dsi-ctrl
  arm64: dts: qcom: sc7180: Add compat qcom,sc7180-dsi-ctrl
  arm64: dts: qcom: sc7280: Add compat qcom,sc7280-dsi-ctrl
  arm64: dts: qcom: sdm630: Add compat qcom,sdm630-dsi-ctrl
  arm64: dts: qcom: sdm660: Add compat qcom,sdm660-dsi-ctrl
  arm64: dts: qcom: sdm845: Add compat qcom,sdm845-dsi-ctrl
  arm64: dts: qcom: sm8250: Add compat qcom,sm8250-dsi-ctrl

 .../display/msm/dsi-controller-main.yaml  | 205 --
 arch/arm/boot/dts/qcom-apq8064.dtsi   |   3 +-
 arch/arm/boot/dts/qcom-msm8974.dtsi   |   3 +-
 arch/arm64/boot/dts/qcom/msm8916.dtsi |   3 +-
 arch/arm64/boot/dts/qcom/msm8996.dtsi |   6 +-
 arch/arm64/boot/dts/qcom/sc7180.dtsi  |   3 +-
 arch/arm64/boot/dts/qcom/sc7280.dtsi  |   3 +-
 arch/arm64/boot/dts/qcom/sdm630.dtsi  |   3 +-
 arch/arm64/boot/dts/qcom/sdm660.dtsi  |   3 +-
 arch/arm64/boot/dts/qcom/sdm845.dtsi  |   6 +-
 arch/arm64/boot/dts/qcom/sm8250.dtsi  |   6 +-
 11 files changed, 208 insertions(+), 36

[PATCH v3 14/18] arm64: dts: qcom: sc7280: Add compat qcom, sc7280-dsi-ctrl

2022-11-23 Thread Bryan O'Donoghue
Add silicon specific compatible qcom,sc7280-dsi-ctrl to the
mdss-dsi-ctrl block. This allows us to differentiate the specific bindings
for sc7280 against the yaml documentation.

Reviewed-by: Douglas Anderson 
Signed-off-by: Bryan O'Donoghue 
---
 arch/arm64/boot/dts/qcom/sc7280.dtsi | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/sc7280.dtsi 
b/arch/arm64/boot/dts/qcom/sc7280.dtsi
index a4d6e866b5999..3368531e004e8 100644
--- a/arch/arm64/boot/dts/qcom/sc7280.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7280.dtsi
@@ -3903,7 +3903,8 @@ opp-50667 {
};
 
mdss_dsi: dsi@ae94000 {
-   compatible = "qcom,mdss-dsi-ctrl";
+   compatible = "qcom,sc7280-dsi-ctrl",
+"qcom,mdss-dsi-ctrl";
reg = <0 0x0ae94000 0 0x400>;
reg-names = "dsi_ctrl";
 
-- 
2.38.1



[PATCH v3 12/18] arm64: dts: qcom: msm8996: Add compat qcom, msm8996-dsi-ctrl

2022-11-23 Thread Bryan O'Donoghue
Add silicon specific compatible qcom,msm8996-dsi-ctrl to the
mdss-dsi-ctrl block. This allows us to differentiate the specific bindings
for msm8996 against the yaml documentation.

Signed-off-by: Bryan O'Donoghue 
---
 arch/arm64/boot/dts/qcom/msm8996.dtsi | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi 
b/arch/arm64/boot/dts/qcom/msm8996.dtsi
index 081e20a63c610..9f6543579dcf0 100644
--- a/arch/arm64/boot/dts/qcom/msm8996.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi
@@ -968,7 +968,8 @@ mdp5_intf2_out: endpoint {
};
 
dsi0: dsi@994000 {
-   compatible = "qcom,mdss-dsi-ctrl";
+   compatible = "qcom,msm8996-dsi-ctrl",
+"qcom,mdss-dsi-ctrl";
reg = <0x00994000 0x400>;
reg-names = "dsi_ctrl";
 
@@ -1035,7 +1036,8 @@ dsi0_phy: dsi-phy@994400 {
};
 
dsi1: dsi@996000 {
-   compatible = "qcom,mdss-dsi-ctrl";
+   compatible = "qcom,msm8996-dsi-ctrl",
+"qcom,mdss-dsi-ctrl";
reg = <0x00996000 0x400>;
reg-names = "dsi_ctrl";
 
-- 
2.38.1



  1   2   >