Re: [linux-yocto][yocto-kernel-cache yocto-6.1][PATCH] nxp-imx6: set CONFIG_CC_OPTIMIZE_FOR_SIZE to n

2023-07-17 Thread Bruce Ashfield
merged.

Bruce

In message: [linux-yocto][yocto-kernel-cache yocto-6.1][PATCH] nxp-imx6: set 
CONFIG_CC_OPTIMIZE_FOR_SIZE to n
on 13/07/2023 Xiaolei Wang wrote:

> Disable CONFIG_CC_OPTIMIZE_FOR_SIZE to fix the warning when 
> do_kernel_configcheck:
> 
> WARNING: linux-yocto-rt-6.1.27+gitAUTOINC+9045c12fb0_e318b47db6-r0 
> do_kernel_configcheck: [kernel config]: specified values did not make it into 
> the kernel's final configuration:
> 
> [NOTE]: 'CONFIG_CC_OPTIMIZE_FOR_SIZE' last val (n) and .config val (y) do 
> not match
> [INFO]: CONFIG_CC_OPTIMIZE_FOR_SIZE : y ## .config: 205 
> :configs/v6.1/standard/preempt-rt/arch/arm/arm.cfg (y) 
> configs/v6.1/standard/preempt-rt/ktypes/preempt-rt/preempt-rt.cfg (n)
> [INFO]: raw config text:
> 
> Signed-off-by: Xiaolei Wang 
> ---
>  bsp/nxp-imx6/nxp-imx6.cfg | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/bsp/nxp-imx6/nxp-imx6.cfg b/bsp/nxp-imx6/nxp-imx6.cfg
> index 2117f04c..a60de05d 100644
> --- a/bsp/nxp-imx6/nxp-imx6.cfg
> +++ b/bsp/nxp-imx6/nxp-imx6.cfg
> @@ -224,3 +224,5 @@ CONFIG_GPIO_MXC=y
>  CONFIG_GPIO_PCA953X=y
>  
>  CONFIG_MAILBOX=y
> +
> +CONFIG_CC_OPTIMIZE_FOR_SIZE=n
> -- 
> 2.25.1
> 

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#12865): 
https://lists.yoctoproject.org/g/linux-yocto/message/12865
Mute This Topic: https://lists.yoctoproject.org/mt/100115821/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: 
https://lists.yoctoproject.org/g/linux-yocto/leave/6687884/21656/624485779/xyzzy
 [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [linux-yocto][linux-yocto v6.1] add s25fl064l support for marvell cn96xx

2023-07-17 Thread Bruce Ashfield
In message: [linux-yocto][linux-yocto v6.1] add s25fl064l support for marvell 
cn96xx
on 17/07/2023 Ruiqiang Hao wrote:

> Hi Bruce,
> 
> These 2 patches are for Cypress flash s25fl064l used by customer.
> Please help to merge them into our linux-yocto repo.
> 
> repo:
>   linux-yocto
> branch:
>   v6.1/standard/cn-sdkv5.15/octeon
>   v6.1/standard/preempt-rt/cn-sdkv5.15/octeon

merged.

Bruce

> 
> Thanks,
> Ruiqiang

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#12866): 
https://lists.yoctoproject.org/g/linux-yocto/message/12866
Mute This Topic: https://lists.yoctoproject.org/mt/100189437/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: 
https://lists.yoctoproject.org/g/linux-yocto/leave/6687884/21656/624485779/xyzzy
 [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [linux-yocto][v6.1/standard/preempt-rt/nxp-sdk-6.1/nxp-soc & v6.1/standard/nxp-sdk-6.1/nxp-soc][PATCH 1/2] LF-8851: dmaengine: imx-sdma: sdma driver code optimization

2023-07-17 Thread Bruce Ashfield
merged.

Bruce

In message: [linux-yocto][v6.1/standard/preempt-rt/nxp-sdk-6.1/nxp-soc & 
v6.1/standard/nxp-sdk-6.1/nxp-soc][PATCH 1/2] LF-8851: dmaengine: imx-sdma: 
sdma driver code optimization
on 17/07/2023 Xiaolei Wang wrote:

> From: Joy Zou 
> 
> commit e708cbc250efab668507628d49bfec578b94f3ed from
> https://github.com/nxp-imx/linux-imx.git lf-6.1.y
> 
> The bluetooth starts to use sdma before sdma driver initialization done.
> It will cause NULL pointer access.
> 
> This patch adds sdma is_on check in order to avoid accessing NULL pointer.
> 
> Reviewed-by: Shengjiu Wang 
> Signed-off-by: Joy Zou 
> Signed-off-by: Xiaolei Wang 
> ---
>  drivers/dma/imx-sdma.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
> index a5d5aa7b70ce..97269f6d5eec 100644
> --- a/drivers/dma/imx-sdma.c
> +++ b/drivers/dma/imx-sdma.c
> @@ -2125,8 +2125,8 @@ static int sdma_config_write(struct dma_chan *chan,
>   sdmac->watermark_level = 0;
>   sdma_get_pc(sdmac, sdmac->peripheral_type);
>  
> - if (!sdmac->sdma->fw_loaded && sdmac->is_ram_script) {
> - dev_warn_once(sdmac->sdma->dev, "sdma firmware not ready!\n");
> + if (!sdmac->sdma->is_on || (!sdmac->sdma->fw_loaded && 
> sdmac->is_ram_script)) {
> + dev_warn_once(sdmac->sdma->dev, "sdma or sdma firmware not 
> ready!\n");
>   return -EPERM;
>   }
>  
> -- 
> 2.25.1
> 

In message: [linux-yocto][v6.1/standard/preempt-rt/nxp-sdk-6.1/nxp-soc & 
v6.1/standard/nxp-sdk-6.1/nxp-soc][PATCH 2/2] drm/bridge: adv7533: Limit 
supported clocks
on 17/07/2023 Xiaolei Wang wrote:

> Refer to commit 323751dadfbe("MLK-21958-13: drm/bridge: adv7511: Limit 
> supported clocks")
> Add Limit supported clocks for adv7533, Some modes are not working with this 
> converter.
> This will cause hdmi link down, so add this workround patch to solve this 
> problem.
> 
> Signed-off-by: Xiaolei Wang 
> ---
>  drivers/gpu/drm/bridge/adv7511/adv7533.c | 31 
>  1 file changed, 31 insertions(+)
> 
> diff --git a/drivers/gpu/drm/bridge/adv7511/adv7533.c 
> b/drivers/gpu/drm/bridge/adv7511/adv7533.c
> index 7316aa092f9b..b09ceb994123 100644
> --- a/drivers/gpu/drm/bridge/adv7511/adv7533.c
> +++ b/drivers/gpu/drm/bridge/adv7511/adv7533.c
> @@ -24,6 +24,26 @@ static const struct reg_sequence 
> adv7533_cec_fixed_registers[] = {
>   { 0x05, 0xc8 },
>  };
>  
> +/*
> + * TODO: Currently, filter-out unsupported modes by their clocks.
> + * Need to find a better way to do this.
> + * These are the pixel clocks that the converter can handle successfully.
> + */
> +
> +static const int valid_clocks[] = {
> + 148500,
> + 135000,
> + 132000,
> + 119000,
> + 108000,
> + 78750,
> + 74250,
> + 65000,
> + 49500,
> + 4,
> + 31500,
> +};
> +
>  static void adv7511_dsi_config_timing_gen(struct adv7511 *adv)
>  {
>   struct drm_display_mode *mode = &adv->curr_mode;
> @@ -136,6 +156,8 @@ enum drm_mode_status adv7533_mode_valid(struct adv7511 
> *adv,
>   unsigned long max_lane_freq;
>   struct mipi_dsi_device *dsi = adv->dsi;
>   u8 bpp = mipi_dsi_pixel_format_to_bpp(dsi->format);
> + size_t i, num_modes = ARRAY_SIZE(valid_clocks);
> + bool clock_ok = false;
>  
>   /* Check max clock for either 7533 or 7535 */
>   if (mode->clock > (adv->type == ADV7533 ? 8 : 148500))
> @@ -147,6 +169,15 @@ enum drm_mode_status adv7533_mode_valid(struct adv7511 
> *adv,
>   if (mode->clock * bpp > max_lane_freq * adv->num_dsi_lanes)
>   return MODE_CLOCK_HIGH;
>  
> + for (i = 0; i < num_modes; i++)
> + if (mode->clock == valid_clocks[i]) {
> + clock_ok = true;
> + break;
> + }
> +
> + if (!clock_ok)
> + return MODE_NOCLOCK;
> +
>   return MODE_OK;
>  }
>  
> -- 
> 2.25.1
> 


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#12867): 
https://lists.yoctoproject.org/g/linux-yocto/message/12867
Mute This Topic: https://lists.yoctoproject.org/mt/100205922/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: 
https://lists.yoctoproject.org/g/linux-yocto/leave/6687884/21656/624485779/xyzzy
 [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [linux-yocto][v6.1/standard/preempt-rt/nxp-sdk-6.1/nxp-soc][PATCH] ARM: imx: use raw_spin_lock instead of spin_lock

2023-07-17 Thread Bruce Ashfield
merged.

Bruce

In message: [linux-yocto][v6.1/standard/preempt-rt/nxp-sdk-6.1/nxp-soc][PATCH] 
ARM: imx: use raw_spin_lock instead of spin_lock
on 17/07/2023 Xiaolei Wang wrote:

> CPU: 0 PID: 0 Comm: swapper/0 Tainted: GW 
> 5.15.78-rt48-yocto-preempt-rt #1
> Hardware name: Freescale i.MX7 Dual (Device Tree)
> [<80110f4c>] (unwind_backtrace) from [<8010aef8>] (show_stack+0x18/0x1c)
> [<8010aef8>] (show_stack) from [<80be4998>] (dump_stack_lvl+0x40/0x4c)
> [<80be4998>] (dump_stack_lvl) from [<8015297c>] (__might_resched+0x16c/0x1f0)
> [<8015297c>] (__might_resched) from [<80bf2d8c>] (rt_spin_lock+0x34/0x80)
> [<80bf2d8c>] (rt_spin_lock) from [<8011e350>] (imx_set_cpu_jump+0x20/0x70)
> [<8011e350>] (imx_set_cpu_jump) from [<8011bd64>] 
> (imx7d_enter_low_power_idle+0x2e4/0x30c)
> [<8011bd64>] (imx7d_enter_low_power_idle) from [<80897bb8>] 
> (cpuidle_enter_state+0xe8/0x2f0)
> [<80897bb8>] (cpuidle_enter_state) from [<80897e18>] (cpuidle_enter+0x3c/0x50)
> [<80897e18>] (cpuidle_enter) from [<8015a748>] (do_idle+0x234/0x264)
> [<8015a748>] (do_idle) from [<8015aa88>] (cpu_startup_entry+0x20/0x28)
> [<8015aa88>] (cpu_startup_entry) from [<81001138>] (start_kernel+0x5b8/0x69c)
> [<81001138>] (start_kernel) from [<>] (0x0)
> 
> Signed-off-by: Xiaolei Wang 
> Signed-off-by: Bruce Ashfield 
> ---
>  arch/arm/mach-imx/src.c | 18 +-
>  1 file changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/arch/arm/mach-imx/src.c b/arch/arm/mach-imx/src.c
> index 2a2fc431d5e7..affaa0428315 100644
> --- a/arch/arm/mach-imx/src.c
> +++ b/arch/arm/mach-imx/src.c
> @@ -35,7 +35,7 @@
>  #define BP_SRC_A7RCR1_A7_CORE1_ENABLE  1
>  
>  static void __iomem *src_base;
> -static DEFINE_SPINLOCK(src_lock);
> +static DEFINE_RAW_SPINLOCK(src_lock);
>  static bool m4_is_enabled;
>  
>  static const int sw_reset_bits[5] = {
> @@ -64,11 +64,11 @@ static int imx_src_reset_module(struct 
> reset_controller_dev *rcdev,
>  
>   bit = 1 << sw_reset_bits[sw_reset_idx];
>  
> - spin_lock_irqsave(&src_lock, flags);
> + raw_spin_lock_irqsave(&src_lock, flags);
>   val = readl_relaxed(src_base + SRC_SCR);
>   val |= bit;
>   writel_relaxed(val, src_base + SRC_SCR);
> - spin_unlock_irqrestore(&src_lock, flags);
> + raw_spin_unlock_irqrestore(&src_lock, flags);
>  
>   timeout = jiffies + msecs_to_jiffies(1000);
>   while (readl(src_base + SRC_SCR) & bit) {
> @@ -89,7 +89,7 @@ void imx_enable_cpu(int cpu, bool enable)
>   u32 mask, val;
>  
>   cpu = cpu_logical_map(cpu);
> - spin_lock(&src_lock);
> + raw_spin_lock(&src_lock);
>   if (cpu_is_imx7d()) {
>   /* enable core */
>   if (enable)
> @@ -106,12 +106,12 @@ void imx_enable_cpu(int cpu, bool enable)
>   val |= 1 << (BP_SRC_SCR_CORE1_RST + cpu - 1);
>   writel_relaxed(val, src_base + SRC_SCR);
>   }
> - spin_unlock(&src_lock);
> + raw_spin_unlock(&src_lock);
>  }
>  
>  void imx_set_cpu_jump(int cpu, void *jump_addr)
>  {
> - spin_lock(&src_lock);
> + raw_spin_lock(&src_lock);
>   cpu = cpu_logical_map(cpu);
>   if (cpu_is_imx7d())
>   writel_relaxed(__pa_symbol(jump_addr),
> @@ -119,7 +119,7 @@ void imx_set_cpu_jump(int cpu, void *jump_addr)
>   else
>   writel_relaxed(__pa_symbol(jump_addr),
>   src_base + SRC_GPR1 + cpu * 8);
> - spin_unlock(&src_lock);
> + raw_spin_unlock(&src_lock);
>  }
>  
>  u32 imx_get_cpu_arg(int cpu)
> @@ -172,7 +172,7 @@ void __init imx_src_init(void)
>* force warm reset sources to generate cold reset
>* for a more reliable restart
>*/
> - spin_lock(&src_lock);
> + raw_spin_lock(&src_lock);
>   val = readl_relaxed(src_base + SRC_SCR);
>  
>   /* bit 4 is m4c_non_sclr_rst on i.MX6SX */
> @@ -184,7 +184,7 @@ void __init imx_src_init(void)
>  
>   val &= ~(1 << BP_SRC_SCR_WARM_RESET_ENABLE);
>   writel_relaxed(val, src_base + SRC_SCR);
> - spin_unlock(&src_lock);
> + raw_spin_unlock(&src_lock);
>  }
>  
>  static const struct of_device_id imx_src_dt_ids[] = {
> -- 
> 2.25.1
> 

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#12868): 
https://lists.yoctoproject.org/g/linux-yocto/message/12868
Mute This Topic: https://lists.yoctoproject.org/mt/100189710/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: 
https://lists.yoctoproject.org/g/linux-yocto/leave/6687884/21656/624485779/xyzzy
 [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [linux-yocto]: [kernel for intel-socfpga]: usb: dwc2: combine platform specific data for Intel Agilex and Stratix10

2023-07-17 Thread Bruce Ashfield
On Mon, Jul 17, 2023 at 1:31 AM Meng Li  wrote:
>
> From: Limeng 
>
> Hi Bruce,
>
> This patch is used to combine platform specific data for Intel Agilex and 
> Stratix10.
> Could you please help to merge it into linux-ycoto kernel repo, both standard 
> and rt branches
> v6.1/standard/intel-sdk-6.1/intel-socfpga
> v6.1/standard/preempt-rt/intel-sdk-6.1/intel-socfpga
>

Given the upstream discussion on this, I'll wait for a v2.

Bruce


> diffstat info as below:
>
>  Documentation/devicetree/bindings/usb/dwc2.yaml   |2 ++
>  arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi |4 ++--
>  drivers/usb/dwc2/params.c |6 --
>  3 files changed, 8 insertions(+), 4 deletions(-)
>
>
> thanks,
> Limeng



-- 
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#12869): 
https://lists.yoctoproject.org/g/linux-yocto/message/12869
Mute This Topic: https://lists.yoctoproject.org/mt/100189630/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: 
https://lists.yoctoproject.org/g/linux-yocto/leave/6687884/21656/624485779/xyzzy
 [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[linux-yocto]: [kernel for intel-socfpga]: usb: dwc2: add new compatible for Intel SoCFPGA Stratix10 platform

2023-07-17 Thread Meng Li via lists.yoctoproject.org
From: Limeng 

Hi Bruce,

This patch is used to add new compatible for Intel SoCFPGA Stratix10 platform
Could you please help to merge it into linux-ycoto kernel repo, both standard 
and rt branches
v6.1/standard/intel-sdk-6.1/intel-socfpga
v6.1/standard/preempt-rt/intel-sdk-6.1/intel-socfpga

diffstat info as below:

 socfpga_stratix10.dtsi |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


thanks,
Limeng

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#12871): 
https://lists.yoctoproject.org/g/linux-yocto/message/12871
Mute This Topic: https://lists.yoctoproject.org/mt/100209590/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[linux-yocto] [PATCH] usb: dwc2: combine platform specific data for Intel Agilex and Stratix10

2023-07-17 Thread Meng Li via lists.yoctoproject.org
Intel Stratix10 is very the same with Agilex platform, the DWC2 IP on
the Stratix platform also does not support clock-gating. So, based on
commit 3d8d3504d233("usb: dwc2: Add platform specific data for
Intel's Agilex"), combine platform specific data for Intel Agilex and
Stratix10 together. In additional, in order to avoid breaking the old
device tree, keep compatible string "intel,socfpga-agilex-hsotg" unchanged.

Signed-off-by: Meng Li 
---
 Documentation/devicetree/bindings/usb/dwc2.yaml   | 2 ++
 arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi | 4 ++--
 drivers/usb/dwc2/params.c | 6 --
 3 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/usb/dwc2.yaml 
b/Documentation/devicetree/bindings/usb/dwc2.yaml
index dc4988c0009c..c98ca98d5033 100644
--- a/Documentation/devicetree/bindings/usb/dwc2.yaml
+++ b/Documentation/devicetree/bindings/usb/dwc2.yaml
@@ -51,6 +51,7 @@ properties:
   - amlogic,meson-gxbb-usb
   - amlogic,meson-g12a-usb
   - intel,socfpga-agilex-hsotg
+  - intel,socfpga-hsotg
   - const: snps,dwc2
   - const: amcc,dwc-otg
   - const: apm,apm82181-dwc-otg
@@ -64,6 +65,7 @@ properties:
   - const: snps,dwc2
   - const: samsung,s3c6400-hsotg
   - const: intel,socfpga-agilex-hsotg
+  - const: intel,socfpga-hsotg
 
   reg:
 maxItems: 1
diff --git a/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi 
b/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi
index ea788a920eab..c5a51636f657 100644
--- a/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi
+++ b/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi
@@ -490,7 +490,7 @@ usbphy0: usbphy@0 {
};
 
usb0: usb@ffb0 {
-   compatible = "snps,dwc2";
+   compatible = "intel,socfpga-hsotg", "snps,dwc2";
reg = <0xffb0 0x4>;
interrupts = <0 93 4>;
phys = <&usbphy0>;
@@ -504,7 +504,7 @@ usb0: usb@ffb0 {
};
 
usb1: usb@ffb4 {
-   compatible = "snps,dwc2";
+   compatible = "intel,socfpga-hsotg", "snps,dwc2";
reg = <0xffb4 0x4>;
interrupts = <0 94 4>;
phys = <&usbphy0>;
diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c
index 8eab5f38b110..6bb27a24e9e1 100644
--- a/drivers/usb/dwc2/params.c
+++ b/drivers/usb/dwc2/params.c
@@ -93,7 +93,7 @@ static void dwc2_set_s3c6400_params(struct dwc2_hsotg *hsotg)
p->phy_utmi_width = 8;
 }
 
-static void dwc2_set_socfpga_agilex_params(struct dwc2_hsotg *hsotg)
+static void dwc2_set_socfpga_params(struct dwc2_hsotg *hsotg)
 {
struct dwc2_core_params *p = &hsotg->params;
 
@@ -266,7 +266,9 @@ const struct of_device_id dwc2_of_match_table[] = {
{ .compatible = "st,stm32mp15-hsotg",
  .data = dwc2_set_stm32mp15_hsotg_params },
{ .compatible = "intel,socfpga-agilex-hsotg",
- .data = dwc2_set_socfpga_agilex_params },
+ .data = dwc2_set_socfpga_params },
+   { .compatible = "intel,socfpga-hsotg",
+ .data = dwc2_set_socfpga_params },
{},
 };
 MODULE_DEVICE_TABLE(of, dwc2_of_match_table);
-- 
2.34.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#12870): 
https://lists.yoctoproject.org/g/linux-yocto/message/12870
Mute This Topic: https://lists.yoctoproject.org/mt/100189631/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [linux-yocto] [PATCH] usb: dwc2: combine platform specific data for Intel Agilex and Stratix10

2023-07-17 Thread Meng Li via lists.yoctoproject.org
Hi Bruce,

Sorry! I send the wrong patch, it is the old one.
Please discard this patch. I will send the new one in later.

Thanks,
LImeng

> -Original Message-
> From: linux-yocto@lists.yoctoproject.org 
> On Behalf Of Meng Li via lists.yoctoproject.org
> Sent: Tuesday, July 18, 2023 11:50 AM
> To: bruce.ashfi...@gmail.com
> Cc: linux-yocto@lists.yoctoproject.org
> Subject: [linux-yocto] [PATCH] usb: dwc2: combine platform specific data for
> Intel Agilex and Stratix10
> 
> Intel Stratix10 is very the same with Agilex platform, the DWC2 IP on the 
> Stratix
> platform also does not support clock-gating. So, based on commit
> 3d8d3504d233("usb: dwc2: Add platform specific data for Intel's Agilex"),
> combine platform specific data for Intel Agilex and
> Stratix10 together. In additional, in order to avoid breaking the old device 
> tree,
> keep compatible string "intel,socfpga-agilex-hsotg" unchanged.
> 
> Signed-off-by: Meng Li 
> ---
>  Documentation/devicetree/bindings/usb/dwc2.yaml   | 2 ++
>  arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi | 4 ++--
>  drivers/usb/dwc2/params.c | 6 --
>  3 files changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/usb/dwc2.yaml
> b/Documentation/devicetree/bindings/usb/dwc2.yaml
> index dc4988c0009c..c98ca98d5033 100644
> --- a/Documentation/devicetree/bindings/usb/dwc2.yaml
> +++ b/Documentation/devicetree/bindings/usb/dwc2.yaml
> @@ -51,6 +51,7 @@ properties:
>- amlogic,meson-gxbb-usb
>- amlogic,meson-g12a-usb
>- intel,socfpga-agilex-hsotg
> +  - intel,socfpga-hsotg
>- const: snps,dwc2
>- const: amcc,dwc-otg
>- const: apm,apm82181-dwc-otg
> @@ -64,6 +65,7 @@ properties:
>- const: snps,dwc2
>- const: samsung,s3c6400-hsotg
>- const: intel,socfpga-agilex-hsotg
> +  - const: intel,socfpga-hsotg
> 
>reg:
>  maxItems: 1
> diff --git a/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi
> b/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi
> index ea788a920eab..c5a51636f657 100644
> --- a/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi
> +++ b/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi
> @@ -490,7 +490,7 @@ usbphy0: usbphy@0 {
>   };
> 
>   usb0: usb@ffb0 {
> - compatible = "snps,dwc2";
> + compatible = "intel,socfpga-hsotg", "snps,dwc2";
>   reg = <0xffb0 0x4>;
>   interrupts = <0 93 4>;
>   phys = <&usbphy0>;
> @@ -504,7 +504,7 @@ usb0: usb@ffb0 {
>   };
> 
>   usb1: usb@ffb4 {
> - compatible = "snps,dwc2";
> + compatible = "intel,socfpga-hsotg", "snps,dwc2";
>   reg = <0xffb4 0x4>;
>   interrupts = <0 94 4>;
>   phys = <&usbphy0>;
> diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c index
> 8eab5f38b110..6bb27a24e9e1 100644
> --- a/drivers/usb/dwc2/params.c
> +++ b/drivers/usb/dwc2/params.c
> @@ -93,7 +93,7 @@ static void dwc2_set_s3c6400_params(struct dwc2_hsotg
> *hsotg)
>   p->phy_utmi_width = 8;
>  }
> 
> -static void dwc2_set_socfpga_agilex_params(struct dwc2_hsotg *hsotg)
> +static void dwc2_set_socfpga_params(struct dwc2_hsotg *hsotg)
>  {
>   struct dwc2_core_params *p = &hsotg->params;
> 
> @@ -266,7 +266,9 @@ const struct of_device_id dwc2_of_match_table[] = {
>   { .compatible = "st,stm32mp15-hsotg",
> .data = dwc2_set_stm32mp15_hsotg_params },
>   { .compatible = "intel,socfpga-agilex-hsotg",
> -   .data = dwc2_set_socfpga_agilex_params },
> +   .data = dwc2_set_socfpga_params },
> + { .compatible = "intel,socfpga-hsotg",
> +   .data = dwc2_set_socfpga_params },
>   {},
>  };
>  MODULE_DEVICE_TABLE(of, dwc2_of_match_table);
> --
> 2.34.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#12872): 
https://lists.yoctoproject.org/g/linux-yocto/message/12872
Mute This Topic: https://lists.yoctoproject.org/mt/100210243/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[linux-yocto] [PATCH] usb: dwc2: add new compatible for Intel SoCFPGA Stratix10 platform

2023-07-17 Thread Meng Li via lists.yoctoproject.org
Intel Stratix10 is very the same with Agilex platform, the DWC2 IP on
the Stratix platform also does not support clock-gating. The commit
3d8d3504d233("usb: dwc2: Add platform specific data for Intel's Agilex")
had fixed this issue. So, add the essential compatible to also use the
specific data on Stratix10 platform.

Signed-off-by: Meng Li 
---
 arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi 
b/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi
index ea788a920eab..b8dd5509c214 100644
--- a/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi
+++ b/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi
@@ -490,7 +490,7 @@ usbphy0: usbphy@0 {
};
 
usb0: usb@ffb0 {
-   compatible = "snps,dwc2";
+   compatible = "intel,socfpga-agilex-hsotg", "snps,dwc2";
reg = <0xffb0 0x4>;
interrupts = <0 93 4>;
phys = <&usbphy0>;
@@ -504,7 +504,7 @@ usb0: usb@ffb0 {
};
 
usb1: usb@ffb4 {
-   compatible = "snps,dwc2";
+   compatible = "intel,socfpga-agilex-hsotg", "snps,dwc2";
reg = <0xffb4 0x4>;
interrupts = <0 94 4>;
phys = <&usbphy0>;
-- 
2.34.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#12873): 
https://lists.yoctoproject.org/g/linux-yocto/message/12873
Mute This Topic: https://lists.yoctoproject.org/mt/100210250/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-