mbox series

[v10,0/9] arm64: j721s2: Add support for additional IPs

Message ID 20230221120612.27366-1-r-gunasekaran@ti.com
Headers show
Series arm64: j721s2: Add support for additional IPs | expand

Message

Ravi Gunasekaran Feb. 21, 2023, 12:06 p.m. UTC
The following series of patches add support for the following
on J721S2 common processor board,

- USB
- SerDes
- OSPI
- PCIe

Changes from v1:
* Resolve issues with dt schema reporting
* Minor changes related to consistency on node naming and value

Changes from v2:
* Added PCIe RC + EP enablement patchsets
* Added device-id for j722s2 PCIe host in dt documentation
* Reworked SERDES + WIZ enablement patchset to use properies for clocks
  defines versus entire devicetree nodes. Results in cleaner code that
  doesn't break dt-schema or the driver functionality.

Changes from v3:
* Rebased changes on top of '[PATCH 00/12] TI J7x Disable Incomplete DT Nodes'
* Removed "dt-bindings: PCI: Add host mode device-id for j721s2 platform" patch and
  send it own series to avoid a dependency that would hold up other patches in this
  series

Changes from v4:
* Add my Signed-off-by lines to all patchsets

Changes from v5:
* Removed Cc from commit messages to reduce clutter
* Squashed changes for device tree nodes that get modified latter in the patchset
  series

Changes from v6:
* Changes to ti,j721s2-wiz-10g compatible string from ti,am64-wiz-10g but
  requires this series to be merged first
  Ref: https://lore.kernel.org/linux-arm-kernel/20221122092203.762308-1-mranostay@ti.com/
* Removed unused pcie1_ep based on feedback
* Switch from incorrect "ti,j721e-system-controller", "syscon", "simple-mfd" compatible for
  SPI node to "simple-bus"

Changes from v7:
* Fix node names as per bindings document

Changes from v8:
* Update the ti,j721e-system-controller bindings document
* Fix dtbs warnings

Changes from v9:
* Disable nodes in main.dtsi and enable them in the board
  specific DT file

Aswath Govindraju (7):
  arm64: dts: ti: k3-j721s2-main: Add support for USB
  arm64: dts: ti: k3-j721s2-mcu-wakeup: Add support of OSPI
  arm64: dts: ti: k3-j721s2-common-proc-board: Enable SERDES0
  arm64: dts: ti: k3-j721s2-common-proc-board: Add USB support
  arm64: dts: ti: k3-j721s2: Add support for OSPI Flashes
  arm64: dts: ti: k3-j721s2-main: Add PCIe device tree node
  arm64: dts: ti: k3-j721s2-common-proc-board: Enable PCIe

Matt Ranostay (1):
  arm64: dts: ti: k3-j721s2-main: Add SERDES and WIZ device tree node

Ravi Gunasekaran (1):
  dt-bindings: mfd: ti,j721e-system-controller: Fix mux node regex

 .../mfd/ti,j721e-system-controller.yaml       |   8 +-
 .../dts/ti/k3-j721s2-common-proc-board.dts    |  98 ++++++++++++
 arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi    | 147 ++++++++++++++++++
 .../boot/dts/ti/k3-j721s2-mcu-wakeup.dtsi     |  47 ++++++
 arch/arm64/boot/dts/ti/k3-j721s2-som-p0.dtsi  |  43 +++++
 5 files changed, 342 insertions(+), 1 deletion(-)

Comments

Nishanth Menon Feb. 21, 2023, 1:58 p.m. UTC | #1
On 17:36-20230221, Ravi Gunasekaran wrote:
> From: Aswath Govindraju <a-govindraju@ti.com>
> 
> Add support for single instance of USB 3.0 controller in J721S2 SoC.
> 
> Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
> Signed-off-by: Matt Ranostay <mranostay@ti.com>
> Link: https://lore.kernel.org/r/20221122101616.770050-2-mranostay@ti.com

Is the link supposed to signify some reference we need to keep for ever?

> Signed-off-by: Ravi Gunasekaran <r-gunasekaran@ti.com>
> ---
> I had reviewed this patch in the v5 series [1].
> Since I'm taking over upstreaming this series, I removed the self
> Reviewed-by tag.
> 
> Links:
> 
> [1] - https://lore.kernel.org/all/134c28a0-2d49-549c-dc8d-0887d8fd29c3@ti.com/


What changed in this rev of the patch?

> 
>  arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi | 46 ++++++++++++++++++++++
>  1 file changed, 46 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi b/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi
> index 8915132efcc1..84e5689fff9f 100644
> --- a/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi
> +++ b/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi
> @@ -26,6 +26,20 @@
>  		};
>  	};
>  
> +	scm_conf: syscon@104000 {
> +		compatible = "ti,j721e-system-controller", "syscon", "simple-mfd";
> +		reg = <0x00 0x00104000 0x00 0x18000>;
> +		#address-cells = <1>;
> +		#size-cells = <1>;
> +		ranges = <0x00 0x00 0x00104000 0x18000>;
> +
> +		usb_serdes_mux: mux-controller@0 {
> +			compatible = "mmio-mux";
> +			#mux-control-cells = <1>;
> +			mux-reg-masks = <0x0 0x8000000>; /* USB0 to SERDES0 lane 1/3 mux */
> +		};
> +	};
> +
>  	gic500: interrupt-controller@1800000 {
>  		compatible = "arm,gic-v3";
>  		#address-cells = <2>;
> @@ -745,6 +759,38 @@
>  		};
>  	};
>  
> +	usbss0: cdns-usb@4104000 {
> +		compatible = "ti,j721e-usb";
> +		reg = <0x00 0x04104000 0x00 0x100>;
> +		clocks = <&k3_clks 360 16>, <&k3_clks 360 15>;
> +		clock-names = "ref", "lpm";
> +		assigned-clocks = <&k3_clks 360 16>; /* USB2_REFCLK */
> +		assigned-clock-parents = <&k3_clks 360 17>;
> +		power-domains = <&k3_pds 360 TI_SCI_PD_EXCLUSIVE>;
> +		#address-cells = <2>;
> +		#size-cells = <2>;
> +		ranges;
> +		dma-coherent;
> +
> +		status = "disabled";

Why disabled by default?

> +
> +		usb0: usb@6000000 {
> +			compatible = "cdns,usb3";
> +			reg = <0x00 0x06000000 0x00 0x10000>,
> +			      <0x00 0x06010000 0x00 0x10000>,
> +			      <0x00 0x06020000 0x00 0x10000>;
> +			reg-names = "otg", "xhci", "dev";
> +			interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>,
> +				     <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,
> +				     <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
> +			interrupt-names = "host", "peripheral", "otg";
> +			maximum-speed = "super-speed";
> +			dr_mode = "otg";
> +
> +			status = "disabled";

Why disabled by default?

> +		};
> +	};
> +
>  	main_mcan0: can@2701000 {
>  		compatible = "bosch,m_can";
>  		reg = <0x00 0x02701000 0x00 0x200>,
> -- 
> 2.17.1
>
Nishanth Menon Feb. 21, 2023, 2:01 p.m. UTC | #2
On 17:36-20230221, Ravi Gunasekaran wrote:
> From: Matt Ranostay <mranostay@ti.com>
> 
> Add dt node for the single instance of WIZ (SERDES wrapper) and
> SERDES module shared by PCIe, eDP and USB.

[...]

> 
> diff --git a/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi b/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi
> index 84e5689fff9f..af6c93f0a055 100644
> --- a/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi
> +++ b/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi
[...]
> @@ -33,11 +44,18 @@
>  		#size-cells = <1>;
>  		ranges = <0x00 0x00 0x00104000 0x18000>;
>  
> -		usb_serdes_mux: mux-controller@0 {
> +		usb_serdes_mux: mux-controller-0 {

was'nt this just introduced in the patch just prior, if so, NAK,
do the changes where they are introduced.

>  			compatible = "mmio-mux";
>  			#mux-control-cells = <1>;
>  			mux-reg-masks = <0x0 0x8000000>; /* USB0 to SERDES0 lane 1/3 mux */
>  		};
Ravi Gunasekaran Feb. 22, 2023, 4:51 a.m. UTC | #3
On 21/02/23 7:28 pm, Nishanth Menon wrote:
> On 17:36-20230221, Ravi Gunasekaran wrote:
>> From: Aswath Govindraju <a-govindraju@ti.com>
>>
>> Add support for single instance of USB 3.0 controller in J721S2 SoC.
>>
>> Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
>> Signed-off-by: Matt Ranostay <mranostay@ti.com>
>> Link: https://lore.kernel.org/r/20221122101616.770050-2-mranostay@ti.com
> 
> Is the link supposed to signify some reference we need to keep for ever?

No. I will remove the reference to the link. I picked up the v7 series from
previous submitter through "b4" and maintained the Link tag as-is since then.
I will remove the reference to the link in the next series.

> 
>> Signed-off-by: Ravi Gunasekaran <r-gunasekaran@ti.com>
>> ---
>> I had reviewed this patch in the v5 series [1].
>> Since I'm taking over upstreaming this series, I removed the self
>> Reviewed-by tag.
>>
>> Links:
>>
>> [1] - https://lore.kernel.org/all/134c28a0-2d49-549c-dc8d-0887d8fd29c3@ti.com/
> 
> 
> What changed in this rev of the patch?

Only one change in the patch since v5; Status of the some nodes introduced
in this patch is set to disabled.

> 
>>
>>  arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi | 46 ++++++++++++++++++++++
>>  1 file changed, 46 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi b/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi
>> index 8915132efcc1..84e5689fff9f 100644
>> --- a/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi
>> +++ b/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi
>> @@ -26,6 +26,20 @@
>>  		};
>>  	};
>>  
>> +	scm_conf: syscon@104000 {
>> +		compatible = "ti,j721e-system-controller", "syscon", "simple-mfd";
>> +		reg = <0x00 0x00104000 0x00 0x18000>;
>> +		#address-cells = <1>;
>> +		#size-cells = <1>;
>> +		ranges = <0x00 0x00 0x00104000 0x18000>;
>> +
>> +		usb_serdes_mux: mux-controller@0 {
>> +			compatible = "mmio-mux";
>> +			#mux-control-cells = <1>;
>> +			mux-reg-masks = <0x0 0x8000000>; /* USB0 to SERDES0 lane 1/3 mux */
>> +		};
>> +	};
>> +
>>  	gic500: interrupt-controller@1800000 {
>>  		compatible = "arm,gic-v3";
>>  		#address-cells = <2>;
>> @@ -745,6 +759,38 @@
>>  		};
>>  	};
>>  
>> +	usbss0: cdns-usb@4104000 {
>> +		compatible = "ti,j721e-usb";
>> +		reg = <0x00 0x04104000 0x00 0x100>;
>> +		clocks = <&k3_clks 360 16>, <&k3_clks 360 15>;
>> +		clock-names = "ref", "lpm";
>> +		assigned-clocks = <&k3_clks 360 16>; /* USB2_REFCLK */
>> +		assigned-clock-parents = <&k3_clks 360 17>;
>> +		power-domains = <&k3_pds 360 TI_SCI_PD_EXCLUSIVE>;
>> +		#address-cells = <2>;
>> +		#size-cells = <2>;
>> +		ranges;
>> +		dma-coherent;
>> +
>> +		status = "disabled";
> 
> Why disabled by default?

One of the comment received in the v9 series was to disable the node in
the include file and then enable it in the board specific DTS file.
Changes in this series addressed that comment.

> 
>> +
>> +		usb0: usb@6000000 {
>> +			compatible = "cdns,usb3";
>> +			reg = <0x00 0x06000000 0x00 0x10000>,
>> +			      <0x00 0x06010000 0x00 0x10000>,
>> +			      <0x00 0x06020000 0x00 0x10000>;
>> +			reg-names = "otg", "xhci", "dev";
>> +			interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>,
>> +				     <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,
>> +				     <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
>> +			interrupt-names = "host", "peripheral", "otg";
>> +			maximum-speed = "super-speed";
>> +			dr_mode = "otg";
>> +
>> +			status = "disabled";
> 
> Why disabled by default?

See above.

> 
>> +		};
>> +	};
>> +
>>  	main_mcan0: can@2701000 {
>>  		compatible = "bosch,m_can";
>>  		reg = <0x00 0x02701000 0x00 0x200>,
>> -- 
>> 2.17.1
>>
Ravi Gunasekaran Feb. 22, 2023, 4:53 a.m. UTC | #4
On 21/02/23 7:31 pm, Nishanth Menon wrote:
> On 17:36-20230221, Ravi Gunasekaran wrote:
>> From: Matt Ranostay <mranostay@ti.com>
>>
>> Add dt node for the single instance of WIZ (SERDES wrapper) and
>> SERDES module shared by PCIe, eDP and USB.
> 
> [...]
> 
>>
>> diff --git a/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi b/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi
>> index 84e5689fff9f..af6c93f0a055 100644
>> --- a/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi
>> +++ b/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi
> [...]
>> @@ -33,11 +44,18 @@
>>  		#size-cells = <1>;
>>  		ranges = <0x00 0x00 0x00104000 0x18000>;
>>  
>> -		usb_serdes_mux: mux-controller@0 {
>> +		usb_serdes_mux: mux-controller-0 {
> 
> was'nt this just introduced in the patch just prior, if so, NAK,
> do the changes where they are introduced.

Noted. I will fix this.
Thanks for reviewing.

> 
>>  			compatible = "mmio-mux";
>>  			#mux-control-cells = <1>;
>>  			mux-reg-masks = <0x0 0x8000000>; /* USB0 to SERDES0 lane 1/3 mux */
>>  		};
Nishanth Menon Feb. 22, 2023, 1:15 p.m. UTC | #5
On 10:21-20230222, Ravi Gunasekaran wrote:
[...]
> >> +	usbss0: cdns-usb@4104000 {
> >> +		compatible = "ti,j721e-usb";
> >> +		reg = <0x00 0x04104000 0x00 0x100>;
> >> +		clocks = <&k3_clks 360 16>, <&k3_clks 360 15>;
> >> +		clock-names = "ref", "lpm";
> >> +		assigned-clocks = <&k3_clks 360 16>; /* USB2_REFCLK */
> >> +		assigned-clock-parents = <&k3_clks 360 17>;
> >> +		power-domains = <&k3_pds 360 TI_SCI_PD_EXCLUSIVE>;
> >> +		#address-cells = <2>;
> >> +		#size-cells = <2>;
> >> +		ranges;
> >> +		dma-coherent;
> >> +
> >> +		status = "disabled";
> > 
> > Why disabled by default?
> 
> One of the comment received in the v9 series was to disable the node in
> the include file and then enable it in the board specific DTS file.
> Changes in this series addressed that comment.

Document in the node why it is disabled by default. Also do make sure
All K3 SoCs dtsi nodes follow the same argument.