Re: [PATCH v3 1/7] dt-bindings: mailbox: mediatek: Add MT8196 support for gce-mailbox

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Krzysztof,

On Fri, 2024-12-27 at 09:13 +0100, Krzysztof Kozlowski wrote:
> 
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
> 
> 
> On Fri, Dec 20, 2024 at 01:07:54AM +0800, Jason-JH.Lin wrote:
> >    2) GCE Subsys ID:
> >    - Defined in the header file: `#define SUBSYS_1c00XXXX 3`
> >    - Used in the Device Tree:
> >       `mediatek,gce-client-reg = <&gce SUBSYS_1c00XXXX 0x0000
> > 0x1000>;`
> >    - Parsed and used in the driver to configure subsys ID:
> >      ```c
> >      int cmdq_dev_get_client_reg(struct device *dev,
> >                                struct cmdq_client_reg *client_reg,
> >                                int idx)
> >      {
> >       client_reg->subsys = (u8)spec.args[0];
> >       client_reg->offset = (u16)spec.args[1];
> >      }
> >      // GCE write the value to the register 0x1c000000 + 0x0000 +
> > offset
> >      cmdq_pkt_write(cmdq_handle, client_reg->subsys,
> >                   client_reg->offset + offset, value);
> 
> This is a proof that SUBSYS_1300XXXX is not a binding. Your driver
> does
> not use it.
> 
> Drop all such things which are not used by drivers or explain why
> they
> are needed to be in the binding - what do they bind.
> 
> I asked for this already, for exactly the same thing.
> 
> 
> I did not check the rest, so next time I will choose any other random
> define and if I do not find it explained nor used, I will question
> it.
> Because you tend to apply pieces of review instead of really change
> your
> code.

Please forgive me for putting a lot of redundant message. I just want
to provide as much detail as possible to help you determine if they are
bindings. I appreciate your guidance and will make the necessary
adjustments.


I checked the clk header you accepted before:
https://lore.kernel.org/all/402ac5a2-334e-1843-0517-5ecf61f6a965@xxxxxxxxxx/

Please don't mind me to make a confirmation here because I can't find
the documentation of the definition for binding header.
Do you mean all the header defined in include/dt-bindings/* should be
used in a specific driver and the DTS in the same time?

Take the `#define CLK_TOP_AXI` and `#define CLK_TOP_VPP` in
mediatek,mt8188-clk.h for example:

`CLK_TOP_AXI` is used in the drivers/clk/mediatek/clk-mt8188-topckgen.c
but not in arch/arm64/boot/dts/mediatek/mt8188.dtsi:
```
  #include <dt-bindings/clock/mediatek,mt8188-clk.h>

  ...

  static const struct mtk_mux top_mtk_muxes[] = {
	MUX_GATE_CLR_SET_UPD_FLAGS(CLK_TOP_AXI, "top_axi",
axi_parents,
				   0x020, 0x024, 0x028, 0, 4, 7, 0x04,
  ...
	
	MUX_GATE_CLR_SET_UPD(CLK_TOP_VPP, "top_vpp",
			     vpp_parents, 0x02C, 0x030, 0x034, 0, 4,
7, 
  ...
```

and `CLK_TOP_VPP` is used in the both clk-mt8188-topckgen.c and
mt8188.dtsi:
```
  power-domain@MT8188_POWER_DOMAIN_VPPSYS0 {
  	reg = <MT8188_POWER_DOMAIN_VPPSYS0>;
	clocks = <&topckgen CLK_TOP_VPP>,
		 <&topckgen CLK_TOP_CAM>,
...
```

But it seems that both of `CLK_TOP_AXI` and `CLK_TOP_VPP` are regarded
as binding headers.



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux