mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Roger Quadros <rogerq@kernel.org>
To: Andrew Davis <afd@ti.com>, nm@ti.com, vigneshr@ti.com
Cc: kristo@kernel.org, robh+dt@kernel.org,
	krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org,
	srk@ti.com, linux-arm-kernel@lists.infradead.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] arm64: dts: ti: k3-am62/a/p: use sub-node for USB_PHY_CTRL registers
Date: Tue, 30 Jan 2024 14:08:04 +0200	[thread overview]
Message-ID: <af43a3ef-318a-4b7a-8b33-4897fe5a90d9@kernel.org> (raw)
In-Reply-To: <16473ecf-c837-4424-a279-e5d921c2a588@ti.com>



On 26/01/2024 17:00, Andrew Davis wrote:
> On 1/26/24 6:59 AM, Roger Quadros wrote:
>> Exposing the entire CTRL_MMR space to syscon is not a good idea.
>> Add sub-nodes for USB0_PHY_CTRL and USB1_PHY_CTRL and use them
>> in the USB0/USB1 nodes.
>>
>> Signed-off-by: Roger Quadros <rogerq@kernel.org>
>> ---
>>   arch/arm64/boot/dts/ti/k3-am62-main.dtsi    |  4 ++--
>>   arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi  | 10 ++++++++++
>>   arch/arm64/boot/dts/ti/k3-am62a-main.dtsi   |  4 ++--
>>   arch/arm64/boot/dts/ti/k3-am62a-wakeup.dtsi | 10 ++++++++++
>>   arch/arm64/boot/dts/ti/k3-am62p-wakeup.dtsi | 10 ++++++++++
>>   5 files changed, 34 insertions(+), 4 deletions(-)
>>
>> diff --git a/arch/arm64/boot/dts/ti/k3-am62-main.dtsi b/arch/arm64/boot/dts/ti/k3-am62-main.dtsi
>> index 464b7565d085..9432ed344d52 100644
>> --- a/arch/arm64/boot/dts/ti/k3-am62-main.dtsi
>> +++ b/arch/arm64/boot/dts/ti/k3-am62-main.dtsi
>> @@ -625,7 +625,7 @@ usbss0: dwc3-usb@f900000 {
>>           reg = <0x00 0x0f900000 0x00 0x800>;
>>           clocks = <&k3_clks 161 3>;
>>           clock-names = "ref";
>> -        ti,syscon-phy-pll-refclk = <&wkup_conf 0x4008>;
>> +        ti,syscon-phy-pll-refclk = <&usb0_phy_ctrl 0x0>;
>>           #address-cells = <2>;
>>           #size-cells = <2>;
>>           power-domains = <&k3_pds 178 TI_SCI_PD_EXCLUSIVE>;
>> @@ -648,7 +648,7 @@ usbss1: dwc3-usb@f910000 {
>>           reg = <0x00 0x0f910000 0x00 0x800>;
>>           clocks = <&k3_clks 162 3>;
>>           clock-names = "ref";
>> -        ti,syscon-phy-pll-refclk = <&wkup_conf 0x4018>;
>> +        ti,syscon-phy-pll-refclk = <&usb1_phy_ctrl 0x0>;
>>           #address-cells = <2>;
>>           #size-cells = <2>;
>>           power-domains = <&k3_pds 179 TI_SCI_PD_EXCLUSIVE>;
>> diff --git a/arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi b/arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi
>> index fef76f52a52e..bd09662a3c29 100644
>> --- a/arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi
>> +++ b/arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi
>> @@ -19,6 +19,16 @@ chipid: chipid@14 {
>>               compatible = "ti,am654-chipid";
>>               reg = <0x14 0x4>;
>>           };
>> +
>> +        usb0_phy_ctrl: syscon@4008 {
>> +            compatible = "syscon";
> 
> You'll want to add a binding for this to the simple syscon list.
> See this patch for an example[0]. Otherwise this gives a DT check
> warning.

Thanks for the hint. Will fix.

> 
> Also, adding the new nodes for AM62p should be moved to the
> next patch in this series. Fixing AM62 and AM62a should be
> a standalone patch.

Agreed.

> 
> Andrew
> 
> [0] commit cb523495ee2a ("dt-bindings: mfd: syscon: Add ti,am654-dss-oldi-io-ctrl compatible")
> 
>> +            reg = <0x4008 0x4>;
>> +        };
>> +
>> +        usb1_phy_ctrl: syscon@4018 {
>> +            compatible = "syscon";
>> +            reg = <0x4018 0x4>;
>> +        };
>>       };
>>         wkup_uart0: serial@2b300000 {
>> diff --git a/arch/arm64/boot/dts/ti/k3-am62a-main.dtsi b/arch/arm64/boot/dts/ti/k3-am62a-main.dtsi
>> index f0b8c9ab1459..8311c7c44cd3 100644
>> --- a/arch/arm64/boot/dts/ti/k3-am62a-main.dtsi
>> +++ b/arch/arm64/boot/dts/ti/k3-am62a-main.dtsi
>> @@ -566,7 +566,7 @@ usbss0: dwc3-usb@f900000 {
>>           reg = <0x00 0x0f900000 0x00 0x800>;
>>           clocks = <&k3_clks 161 3>;
>>           clock-names = "ref";
>> -        ti,syscon-phy-pll-refclk = <&wkup_conf 0x4008>;
>> +        ti,syscon-phy-pll-refclk = <&usb0_phy_ctrl 0x0>;
>>           #address-cells = <2>;
>>           #size-cells = <2>;
>>           power-domains = <&k3_pds 178 TI_SCI_PD_EXCLUSIVE>;
>> @@ -589,7 +589,7 @@ usbss1: dwc3-usb@f910000 {
>>           reg = <0x00 0x0f910000 0x00 0x800>;
>>           clocks = <&k3_clks 162 3>;
>>           clock-names = "ref";
>> -        ti,syscon-phy-pll-refclk = <&wkup_conf 0x4018>;
>> +        ti,syscon-phy-pll-refclk = <&usb1_phy_ctrl 0x0>;
>>           #address-cells = <2>;
>>           #size-cells = <2>;
>>           power-domains = <&k3_pds 179 TI_SCI_PD_EXCLUSIVE>;
>> diff --git a/arch/arm64/boot/dts/ti/k3-am62a-wakeup.dtsi b/arch/arm64/boot/dts/ti/k3-am62a-wakeup.dtsi
>> index 4e8279fa01e1..26e9fd9da78f 100644
>> --- a/arch/arm64/boot/dts/ti/k3-am62a-wakeup.dtsi
>> +++ b/arch/arm64/boot/dts/ti/k3-am62a-wakeup.dtsi
>> @@ -17,6 +17,16 @@ chipid: chipid@14 {
>>               compatible = "ti,am654-chipid";
>>               reg = <0x14 0x4>;
>>           };
>> +
>> +        usb0_phy_ctrl: syscon@4008 {
>> +            compatible = "syscon";
>> +            reg = <0x4008 0x4>;
>> +        };
>> +
>> +        usb1_phy_ctrl: syscon@4018 {
>> +            compatible = "syscon";
>> +            reg = <0x4018 0x4>;
>> +        };
>>       };
>>         wkup_uart0: serial@2b300000 {
>> diff --git a/arch/arm64/boot/dts/ti/k3-am62p-wakeup.dtsi b/arch/arm64/boot/dts/ti/k3-am62p-wakeup.dtsi
>> index 19f42b39394e..0893e63c399a 100644
>> --- a/arch/arm64/boot/dts/ti/k3-am62p-wakeup.dtsi
>> +++ b/arch/arm64/boot/dts/ti/k3-am62p-wakeup.dtsi
>> @@ -18,6 +18,16 @@ chipid: chipid@14 {
>>               reg = <0x14 0x4>;
>>               bootph-all;
>>           };
>> +
>> +        usb0_phy_ctrl: syscon@4008 {
>> +            compatible = "syscon";
>> +            reg = <0x4008 0x4>;
>> +        };
>> +
>> +        usb1_phy_ctrl: syscon@4018 {
>> +            compatible = "syscon";
>> +            reg = <0x4018 0x4>;
>> +        };
>>       };
>>         wkup_uart0: serial@2b300000 {

-- 
cheers,
-roger

  reply	other threads:[~2024-01-30 12:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-26 12:59 [PATCH 0/2] arm64: dts: ti: am62: Add USB support for k3-am62p Roger Quadros
2024-01-26 12:59 ` [PATCH 1/2] arm64: dts: ti: k3-am62/a/p: use sub-node for USB_PHY_CTRL registers Roger Quadros
2024-01-26 15:00   ` Andrew Davis
2024-01-30 12:08     ` Roger Quadros [this message]
2024-01-26 15:12   ` Krzysztof Kozlowski
2024-01-26 12:59 ` [PATCH 2/2] arm64: dts: ti: k3-am62p: add the USB sub-system Roger Quadros
2024-01-26 15:11   ` Krzysztof Kozlowski
2024-01-30 12:10     ` Roger Quadros

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=af43a3ef-318a-4b7a-8b33-4897fe5a90d9@kernel.org \
    --to=rogerq@kernel.org \
    --cc=afd@ti.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=kristo@kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=robh+dt@kernel.org \
    --cc=srk@ti.com \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®