* [PATCH AUTOSEL 6.1 2/9] arm64: make is_ttbrX_addr() noinstr-safe
[not found] <20221217000937.41115-1-sashal@kernel.org>
@ 2022-12-17 0:09 ` Sasha Levin
2022-12-17 0:09 ` [PATCH AUTOSEL 6.1 3/9] ARM: dts: aspeed: rainier,everest: Move reserved memory regions Sasha Levin
2022-12-17 0:09 ` [PATCH AUTOSEL 6.1 8/9] arm64: dts: allwinner: h616: Add USB nodes Sasha Levin
2 siblings, 0 replies; 6+ messages in thread
From: Sasha Levin @ 2022-12-17 0:09 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Mark Rutland, Catalin Marinas, Will Deacon, Sasha Levin, broonie,
keescook, christophe.leroy, flaniel, wangkefeng.wang,
linux-arm-kernel
From: Mark Rutland <mark.rutland@arm.com>
[ Upstream commit d8c1d798a2e5091128c391c6dadcc9be334af3f5 ]
We use is_ttbr0_addr() in noinstr code, but as it's only marked as
inline, it's theoretically possible for the compiler to place it
out-of-line and instrument it, which would be problematic.
Mark is_ttbr0_addr() as __always_inline such that that can safely be
used from noinstr code. For consistency, do the same to is_ttbr1_addr().
Note that while is_ttbr1_addr() calls arch_kasan_reset_tag(), this is a
macro (and its callees are either macros or __always_inline), so there
is not a risk of transient instrumentation.
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20221114144042.3001140-1-mark.rutland@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/include/asm/processor.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/include/asm/processor.h b/arch/arm64/include/asm/processor.h
index 445aa3af3b76..400f8956328b 100644
--- a/arch/arm64/include/asm/processor.h
+++ b/arch/arm64/include/asm/processor.h
@@ -308,13 +308,13 @@ static inline void compat_start_thread(struct pt_regs *regs, unsigned long pc,
}
#endif
-static inline bool is_ttbr0_addr(unsigned long addr)
+static __always_inline bool is_ttbr0_addr(unsigned long addr)
{
/* entry assembly clears tags for TTBR0 addrs */
return addr < TASK_SIZE;
}
-static inline bool is_ttbr1_addr(unsigned long addr)
+static __always_inline bool is_ttbr1_addr(unsigned long addr)
{
/* TTBR1 addresses may have a tag if KASAN_SW_TAGS is in use */
return arch_kasan_reset_tag(addr) >= PAGE_OFFSET;
--
2.35.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH AUTOSEL 6.1 3/9] ARM: dts: aspeed: rainier,everest: Move reserved memory regions
[not found] <20221217000937.41115-1-sashal@kernel.org>
2022-12-17 0:09 ` [PATCH AUTOSEL 6.1 2/9] arm64: make is_ttbrX_addr() noinstr-safe Sasha Levin
@ 2022-12-17 0:09 ` Sasha Levin
2022-12-17 0:09 ` [PATCH AUTOSEL 6.1 8/9] arm64: dts: allwinner: h616: Add USB nodes Sasha Levin
2 siblings, 0 replies; 6+ messages in thread
From: Sasha Levin @ 2022-12-17 0:09 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Adriana Kobylak, Andrew Jeffery, Joel Stanley, Sasha Levin,
robh+dt, krzysztof.kozlowski+dt, keescook, devicetree,
linux-arm-kernel, linux-aspeed, linux-hardening
From: Adriana Kobylak <anoo@us.ibm.com>
[ Upstream commit e184d42a6e085f95f5c4f1a4fbabebab2984cb68 ]
Move the reserved regions to account for a decrease in DRAM when ECC is
enabled. ECC takes 1/9th of memory.
Running on HW with ECC off, u-boot prints:
DRAM: already initialized, 1008 MiB (capacity:1024 MiB, VGA:16 MiB, ECC:off)
And with ECC on, u-boot prints:
DRAM: already initialized, 896 MiB (capacity:1024 MiB, VGA:16 MiB, ECC:on, ECC size:896 MiB)
This implies that MCR54 is configured for ECC to be bounded at the
bottom of a 16MiB VGA memory region:
1024MiB - 16MiB (VGA) = 1008MiB
1008MiB / 9 (for ECC) = 112MiB
1008MiB - 112MiB = 896MiB (available DRAM)
The flash_memory region currently starts at offset 896MiB:
0xb8000000 (flash_memory offset) - 0x80000000 (base memory address) = 0x38000000 = 896MiB
This is the end of the available DRAM with ECC enabled and therefore it
needs to be moved.
Since the flash_memory is 64MiB in size and needs to be 64MiB aligned,
it can just be moved up by 64MiB and would sit right at the end of the
available DRAM buffer.
The ramoops region currently follows the flash_memory, but it can be
moved to sit above flash_memory which would minimize the address-space
fragmentation.
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
Reviewed-by: Andrew Jeffery <andrew@aj.id.au>
Link: https://lore.kernel.org/r/20220916195535.1020185-1-anoo@linux.ibm.com
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm/boot/dts/aspeed-bmc-ibm-everest.dts | 17 ++++++++---------
arch/arm/boot/dts/aspeed-bmc-ibm-rainier.dts | 16 +++++++++-------
2 files changed, 17 insertions(+), 16 deletions(-)
diff --git a/arch/arm/boot/dts/aspeed-bmc-ibm-everest.dts b/arch/arm/boot/dts/aspeed-bmc-ibm-everest.dts
index a6a2bc3b855c..fcc890e3ad73 100644
--- a/arch/arm/boot/dts/aspeed-bmc-ibm-everest.dts
+++ b/arch/arm/boot/dts/aspeed-bmc-ibm-everest.dts
@@ -162,16 +162,9 @@ reserved-memory {
#size-cells = <1>;
ranges;
- /* LPC FW cycle bridge region requires natural alignment */
- flash_memory: region@b8000000 {
- no-map;
- reg = <0xb8000000 0x04000000>; /* 64M */
- };
-
- /* 48MB region from the end of flash to start of vga memory */
- ramoops@bc000000 {
+ ramoops@b3e00000 {
compatible = "ramoops";
- reg = <0xbc000000 0x200000>; /* 16 * (4 * 0x8000) */
+ reg = <0xb3e00000 0x200000>; /* 16 * (4 * 0x8000) */
record-size = <0x8000>;
console-size = <0x8000>;
ftrace-size = <0x8000>;
@@ -179,6 +172,12 @@ ramoops@bc000000 {
max-reason = <3>; /* KMSG_DUMP_EMERG */
};
+ /* LPC FW cycle bridge region requires natural alignment */
+ flash_memory: region@b4000000 {
+ no-map;
+ reg = <0xb4000000 0x04000000>; /* 64M */
+ };
+
/* VGA region is dictated by hardware strapping */
vga_memory: region@bf000000 {
no-map;
diff --git a/arch/arm/boot/dts/aspeed-bmc-ibm-rainier.dts b/arch/arm/boot/dts/aspeed-bmc-ibm-rainier.dts
index bf59a9962379..4879da4cdbd2 100644
--- a/arch/arm/boot/dts/aspeed-bmc-ibm-rainier.dts
+++ b/arch/arm/boot/dts/aspeed-bmc-ibm-rainier.dts
@@ -95,14 +95,9 @@ reserved-memory {
#size-cells = <1>;
ranges;
- flash_memory: region@b8000000 {
- no-map;
- reg = <0xb8000000 0x04000000>; /* 64M */
- };
-
- ramoops@bc000000 {
+ ramoops@b3e00000 {
compatible = "ramoops";
- reg = <0xbc000000 0x200000>; /* 16 * (4 * 0x8000) */
+ reg = <0xb3e00000 0x200000>; /* 16 * (4 * 0x8000) */
record-size = <0x8000>;
console-size = <0x8000>;
ftrace-size = <0x8000>;
@@ -110,6 +105,13 @@ ramoops@bc000000 {
max-reason = <3>; /* KMSG_DUMP_EMERG */
};
+ /* LPC FW cycle bridge region requires natural alignment */
+ flash_memory: region@b4000000 {
+ no-map;
+ reg = <0xb4000000 0x04000000>; /* 64M */
+ };
+
+ /* VGA region is dictated by hardware strapping */
vga_memory: region@bf000000 {
no-map;
compatible = "shared-dma-pool";
--
2.35.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH AUTOSEL 6.1 8/9] arm64: dts: allwinner: h616: Add USB nodes
[not found] <20221217000937.41115-1-sashal@kernel.org>
2022-12-17 0:09 ` [PATCH AUTOSEL 6.1 2/9] arm64: make is_ttbrX_addr() noinstr-safe Sasha Levin
2022-12-17 0:09 ` [PATCH AUTOSEL 6.1 3/9] ARM: dts: aspeed: rainier,everest: Move reserved memory regions Sasha Levin
@ 2022-12-17 0:09 ` Sasha Levin
2022-12-20 0:01 ` Andre Przywara
2 siblings, 1 reply; 6+ messages in thread
From: Sasha Levin @ 2022-12-17 0:09 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Andre Przywara, Jernej Skrabec, Sasha Levin, robh+dt,
krzysztof.kozlowski+dt, wens, samuel, devicetree,
linux-arm-kernel, linux-sunxi
From: Andre Przywara <andre.przywara@arm.com>
[ Upstream commit f40cf244c3feb4e1a442f8029b691add2c65b3ab ]
Add the nodes for the MUSB and the four USB host controllers to the SoC
.dtsi, along with the PHY node needed to bind all of them together.
EHCI/OHCI and MUSB are compatible to previous SoCs, but the PHY requires
some quirks (handled in the driver).
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Link: https://lore.kernel.org/r/20221031111358.3387297-6-andre.przywara@arm.com
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
.../arm64/boot/dts/allwinner/sun50i-h616.dtsi | 160 ++++++++++++++++++
1 file changed, 160 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
index 622a1f7d1641..74aed0d232a9 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
@@ -504,6 +504,166 @@ mdio0: mdio {
};
};
+ usbotg: usb@5100000 {
+ compatible = "allwinner,sun50i-h616-musb",
+ "allwinner,sun8i-h3-musb";
+ reg = <0x05100000 0x0400>;
+ clocks = <&ccu CLK_BUS_OTG>;
+ resets = <&ccu RST_BUS_OTG>;
+ interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "mc";
+ phys = <&usbphy 0>;
+ phy-names = "usb";
+ extcon = <&usbphy 0>;
+ status = "disabled";
+ };
+
+ usbphy: phy@5100400 {
+ compatible = "allwinner,sun50i-h616-usb-phy";
+ reg = <0x05100400 0x24>,
+ <0x05101800 0x14>,
+ <0x05200800 0x14>,
+ <0x05310800 0x14>,
+ <0x05311800 0x14>;
+ reg-names = "phy_ctrl",
+ "pmu0",
+ "pmu1",
+ "pmu2",
+ "pmu3";
+ clocks = <&ccu CLK_USB_PHY0>,
+ <&ccu CLK_USB_PHY1>,
+ <&ccu CLK_USB_PHY2>,
+ <&ccu CLK_USB_PHY3>,
+ <&ccu CLK_BUS_EHCI2>;
+ clock-names = "usb0_phy",
+ "usb1_phy",
+ "usb2_phy",
+ "usb3_phy",
+ "pmu2_clk";
+ resets = <&ccu RST_USB_PHY0>,
+ <&ccu RST_USB_PHY1>,
+ <&ccu RST_USB_PHY2>,
+ <&ccu RST_USB_PHY3>;
+ reset-names = "usb0_reset",
+ "usb1_reset",
+ "usb2_reset",
+ "usb3_reset";
+ status = "disabled";
+ #phy-cells = <1>;
+ };
+
+ ehci0: usb@5101000 {
+ compatible = "allwinner,sun50i-h616-ehci",
+ "generic-ehci";
+ reg = <0x05101000 0x100>;
+ interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&ccu CLK_BUS_OHCI0>,
+ <&ccu CLK_BUS_EHCI0>,
+ <&ccu CLK_USB_OHCI0>;
+ resets = <&ccu RST_BUS_OHCI0>,
+ <&ccu RST_BUS_EHCI0>;
+ phys = <&usbphy 0>;
+ phy-names = "usb";
+ status = "disabled";
+ };
+
+ ohci0: usb@5101400 {
+ compatible = "allwinner,sun50i-h616-ohci",
+ "generic-ohci";
+ reg = <0x05101400 0x100>;
+ interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&ccu CLK_BUS_OHCI0>,
+ <&ccu CLK_USB_OHCI0>;
+ resets = <&ccu RST_BUS_OHCI0>;
+ phys = <&usbphy 0>;
+ phy-names = "usb";
+ status = "disabled";
+ };
+
+ ehci1: usb@5200000 {
+ compatible = "allwinner,sun50i-h616-ehci",
+ "generic-ehci";
+ reg = <0x05200000 0x100>;
+ interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&ccu CLK_BUS_OHCI1>,
+ <&ccu CLK_BUS_EHCI1>,
+ <&ccu CLK_USB_OHCI1>;
+ resets = <&ccu RST_BUS_OHCI1>,
+ <&ccu RST_BUS_EHCI1>;
+ phys = <&usbphy 1>;
+ phy-names = "usb";
+ status = "disabled";
+ };
+
+ ohci1: usb@5200400 {
+ compatible = "allwinner,sun50i-h616-ohci",
+ "generic-ohci";
+ reg = <0x05200400 0x100>;
+ interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&ccu CLK_BUS_OHCI1>,
+ <&ccu CLK_USB_OHCI1>;
+ resets = <&ccu RST_BUS_OHCI1>;
+ phys = <&usbphy 1>;
+ phy-names = "usb";
+ status = "disabled";
+ };
+
+ ehci2: usb@5310000 {
+ compatible = "allwinner,sun50i-h616-ehci",
+ "generic-ehci";
+ reg = <0x05310000 0x100>;
+ interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&ccu CLK_BUS_OHCI2>,
+ <&ccu CLK_BUS_EHCI2>,
+ <&ccu CLK_USB_OHCI2>;
+ resets = <&ccu RST_BUS_OHCI2>,
+ <&ccu RST_BUS_EHCI2>;
+ phys = <&usbphy 2>;
+ phy-names = "usb";
+ status = "disabled";
+ };
+
+ ohci2: usb@5310400 {
+ compatible = "allwinner,sun50i-h616-ohci",
+ "generic-ohci";
+ reg = <0x05310400 0x100>;
+ interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&ccu CLK_BUS_OHCI2>,
+ <&ccu CLK_USB_OHCI2>;
+ resets = <&ccu RST_BUS_OHCI2>;
+ phys = <&usbphy 2>;
+ phy-names = "usb";
+ status = "disabled";
+ };
+
+ ehci3: usb@5311000 {
+ compatible = "allwinner,sun50i-h616-ehci",
+ "generic-ehci";
+ reg = <0x05311000 0x100>;
+ interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&ccu CLK_BUS_OHCI3>,
+ <&ccu CLK_BUS_EHCI3>,
+ <&ccu CLK_USB_OHCI3>;
+ resets = <&ccu RST_BUS_OHCI3>,
+ <&ccu RST_BUS_EHCI3>;
+ phys = <&usbphy 3>;
+ phy-names = "usb";
+ status = "disabled";
+ };
+
+ ohci3: usb@5311400 {
+ compatible = "allwinner,sun50i-h616-ohci",
+ "generic-ohci";
+ reg = <0x05311400 0x100>;
+ interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&ccu CLK_BUS_OHCI3>,
+ <&ccu CLK_USB_OHCI3>;
+ resets = <&ccu RST_BUS_OHCI3>;
+ phys = <&usbphy 3>;
+ phy-names = "usb";
+ status = "disabled";
+ };
+
rtc: rtc@7000000 {
compatible = "allwinner,sun50i-h616-rtc";
reg = <0x07000000 0x400>;
--
2.35.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH AUTOSEL 6.1 8/9] arm64: dts: allwinner: h616: Add USB nodes
2022-12-17 0:09 ` [PATCH AUTOSEL 6.1 8/9] arm64: dts: allwinner: h616: Add USB nodes Sasha Levin
@ 2022-12-20 0:01 ` Andre Przywara
2022-12-20 6:48 ` Icenowy Zheng
0 siblings, 1 reply; 6+ messages in thread
From: Andre Przywara @ 2022-12-20 0:01 UTC (permalink / raw)
To: Sasha Levin
Cc: linux-kernel, stable, Jernej Skrabec, robh+dt,
krzysztof.kozlowski+dt, wens, samuel, devicetree,
linux-arm-kernel, linux-sunxi
On Fri, 16 Dec 2022 19:09:35 -0500
Sasha Levin <sashal@kernel.org> wrote:
> From: Andre Przywara <andre.przywara@arm.com>
>
> [ Upstream commit f40cf244c3feb4e1a442f8029b691add2c65b3ab ]
This is not really a backport candidate:
- This is not a fix, but a new feature.
- This relies on the H616 USB PHY support patch, which will be only in
v6.2 (and won't be backported).
- DT backports are generally not useful to begin with, and should
actually not be necessary anyway.
Cheers,
Andre
>
> Add the nodes for the MUSB and the four USB host controllers to the SoC
> .dtsi, along with the PHY node needed to bind all of them together.
>
> EHCI/OHCI and MUSB are compatible to previous SoCs, but the PHY requires
> some quirks (handled in the driver).
>
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
> Link: https://lore.kernel.org/r/20221031111358.3387297-6-andre.przywara@arm.com
> Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
> Signed-off-by: Sasha Levin <sashal@kernel.org>
> ---
> .../arm64/boot/dts/allwinner/sun50i-h616.dtsi | 160 ++++++++++++++++++
> 1 file changed, 160 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
> index 622a1f7d1641..74aed0d232a9 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
> @@ -504,6 +504,166 @@ mdio0: mdio {
> };
> };
>
> + usbotg: usb@5100000 {
> + compatible = "allwinner,sun50i-h616-musb",
> + "allwinner,sun8i-h3-musb";
> + reg = <0x05100000 0x0400>;
> + clocks = <&ccu CLK_BUS_OTG>;
> + resets = <&ccu RST_BUS_OTG>;
> + interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
> + interrupt-names = "mc";
> + phys = <&usbphy 0>;
> + phy-names = "usb";
> + extcon = <&usbphy 0>;
> + status = "disabled";
> + };
> +
> + usbphy: phy@5100400 {
> + compatible = "allwinner,sun50i-h616-usb-phy";
> + reg = <0x05100400 0x24>,
> + <0x05101800 0x14>,
> + <0x05200800 0x14>,
> + <0x05310800 0x14>,
> + <0x05311800 0x14>;
> + reg-names = "phy_ctrl",
> + "pmu0",
> + "pmu1",
> + "pmu2",
> + "pmu3";
> + clocks = <&ccu CLK_USB_PHY0>,
> + <&ccu CLK_USB_PHY1>,
> + <&ccu CLK_USB_PHY2>,
> + <&ccu CLK_USB_PHY3>,
> + <&ccu CLK_BUS_EHCI2>;
> + clock-names = "usb0_phy",
> + "usb1_phy",
> + "usb2_phy",
> + "usb3_phy",
> + "pmu2_clk";
> + resets = <&ccu RST_USB_PHY0>,
> + <&ccu RST_USB_PHY1>,
> + <&ccu RST_USB_PHY2>,
> + <&ccu RST_USB_PHY3>;
> + reset-names = "usb0_reset",
> + "usb1_reset",
> + "usb2_reset",
> + "usb3_reset";
> + status = "disabled";
> + #phy-cells = <1>;
> + };
> +
> + ehci0: usb@5101000 {
> + compatible = "allwinner,sun50i-h616-ehci",
> + "generic-ehci";
> + reg = <0x05101000 0x100>;
> + interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
> + clocks = <&ccu CLK_BUS_OHCI0>,
> + <&ccu CLK_BUS_EHCI0>,
> + <&ccu CLK_USB_OHCI0>;
> + resets = <&ccu RST_BUS_OHCI0>,
> + <&ccu RST_BUS_EHCI0>;
> + phys = <&usbphy 0>;
> + phy-names = "usb";
> + status = "disabled";
> + };
> +
> + ohci0: usb@5101400 {
> + compatible = "allwinner,sun50i-h616-ohci",
> + "generic-ohci";
> + reg = <0x05101400 0x100>;
> + interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>;
> + clocks = <&ccu CLK_BUS_OHCI0>,
> + <&ccu CLK_USB_OHCI0>;
> + resets = <&ccu RST_BUS_OHCI0>;
> + phys = <&usbphy 0>;
> + phy-names = "usb";
> + status = "disabled";
> + };
> +
> + ehci1: usb@5200000 {
> + compatible = "allwinner,sun50i-h616-ehci",
> + "generic-ehci";
> + reg = <0x05200000 0x100>;
> + interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
> + clocks = <&ccu CLK_BUS_OHCI1>,
> + <&ccu CLK_BUS_EHCI1>,
> + <&ccu CLK_USB_OHCI1>;
> + resets = <&ccu RST_BUS_OHCI1>,
> + <&ccu RST_BUS_EHCI1>;
> + phys = <&usbphy 1>;
> + phy-names = "usb";
> + status = "disabled";
> + };
> +
> + ohci1: usb@5200400 {
> + compatible = "allwinner,sun50i-h616-ohci",
> + "generic-ohci";
> + reg = <0x05200400 0x100>;
> + interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
> + clocks = <&ccu CLK_BUS_OHCI1>,
> + <&ccu CLK_USB_OHCI1>;
> + resets = <&ccu RST_BUS_OHCI1>;
> + phys = <&usbphy 1>;
> + phy-names = "usb";
> + status = "disabled";
> + };
> +
> + ehci2: usb@5310000 {
> + compatible = "allwinner,sun50i-h616-ehci",
> + "generic-ehci";
> + reg = <0x05310000 0x100>;
> + interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
> + clocks = <&ccu CLK_BUS_OHCI2>,
> + <&ccu CLK_BUS_EHCI2>,
> + <&ccu CLK_USB_OHCI2>;
> + resets = <&ccu RST_BUS_OHCI2>,
> + <&ccu RST_BUS_EHCI2>;
> + phys = <&usbphy 2>;
> + phy-names = "usb";
> + status = "disabled";
> + };
> +
> + ohci2: usb@5310400 {
> + compatible = "allwinner,sun50i-h616-ohci",
> + "generic-ohci";
> + reg = <0x05310400 0x100>;
> + interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
> + clocks = <&ccu CLK_BUS_OHCI2>,
> + <&ccu CLK_USB_OHCI2>;
> + resets = <&ccu RST_BUS_OHCI2>;
> + phys = <&usbphy 2>;
> + phy-names = "usb";
> + status = "disabled";
> + };
> +
> + ehci3: usb@5311000 {
> + compatible = "allwinner,sun50i-h616-ehci",
> + "generic-ehci";
> + reg = <0x05311000 0x100>;
> + interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
> + clocks = <&ccu CLK_BUS_OHCI3>,
> + <&ccu CLK_BUS_EHCI3>,
> + <&ccu CLK_USB_OHCI3>;
> + resets = <&ccu RST_BUS_OHCI3>,
> + <&ccu RST_BUS_EHCI3>;
> + phys = <&usbphy 3>;
> + phy-names = "usb";
> + status = "disabled";
> + };
> +
> + ohci3: usb@5311400 {
> + compatible = "allwinner,sun50i-h616-ohci",
> + "generic-ohci";
> + reg = <0x05311400 0x100>;
> + interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
> + clocks = <&ccu CLK_BUS_OHCI3>,
> + <&ccu CLK_USB_OHCI3>;
> + resets = <&ccu RST_BUS_OHCI3>;
> + phys = <&usbphy 3>;
> + phy-names = "usb";
> + status = "disabled";
> + };
> +
> rtc: rtc@7000000 {
> compatible = "allwinner,sun50i-h616-rtc";
> reg = <0x07000000 0x400>;
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH AUTOSEL 6.1 8/9] arm64: dts: allwinner: h616: Add USB nodes
2022-12-20 0:01 ` Andre Przywara
@ 2022-12-20 6:48 ` Icenowy Zheng
2022-12-23 14:09 ` Sasha Levin
0 siblings, 1 reply; 6+ messages in thread
From: Icenowy Zheng @ 2022-12-20 6:48 UTC (permalink / raw)
To: Andre Przywara, Sasha Levin
Cc: linux-kernel, stable, Jernej Skrabec, robh+dt,
krzysztof.kozlowski+dt, wens, samuel, devicetree,
linux-arm-kernel, linux-sunxi
在 2022-12-20星期二的 00:01 +0000,Andre Przywara写道:
> On Fri, 16 Dec 2022 19:09:35 -0500
> Sasha Levin <sashal@kernel.org> wrote:
>
> > From: Andre Przywara <andre.przywara@arm.com>
> >
> > [ Upstream commit f40cf244c3feb4e1a442f8029b691add2c65b3ab ]
>
> This is not really a backport candidate:
> - This is not a fix, but a new feature.
> - This relies on the H616 USB PHY support patch, which will be only
> in
> v6.2 (and won't be backported).
> - DT backports are generally not useful to begin with, and should
> actually not be necessary anyway.
DT changes include fixes and new features. New features are not useful,
but fixes are useful.
This specific change is a new feature one, not a fix one though.
>
> Cheers,
> Andre
>
> >
> > Add the nodes for the MUSB and the four USB host controllers to the
> > SoC
> > .dtsi, along with the PHY node needed to bind all of them together.
> >
> > EHCI/OHCI and MUSB are compatible to previous SoCs, but the PHY
> > requires
> > some quirks (handled in the driver).
> >
> > Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> > Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
> > Link:
> > https://lore.kernel.org/r/20221031111358.3387297-6-andre.przywara@arm.com
> > Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
> > Signed-off-by: Sasha Levin <sashal@kernel.org>
> > ---
> > .../arm64/boot/dts/allwinner/sun50i-h616.dtsi | 160
> > ++++++++++++++++++
> > 1 file changed, 160 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
> > b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
> > index 622a1f7d1641..74aed0d232a9 100644
> > --- a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
> > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
> > @@ -504,6 +504,166 @@ mdio0: mdio {
> > };
> > };
> >
> > + usbotg: usb@5100000 {
> > + compatible = "allwinner,sun50i-h616-musb",
> > + "allwinner,sun8i-h3-musb";
> > + reg = <0x05100000 0x0400>;
> > + clocks = <&ccu CLK_BUS_OTG>;
> > + resets = <&ccu RST_BUS_OTG>;
> > + interrupts = <GIC_SPI 25
> > IRQ_TYPE_LEVEL_HIGH>;
> > + interrupt-names = "mc";
> > + phys = <&usbphy 0>;
> > + phy-names = "usb";
> > + extcon = <&usbphy 0>;
> > + status = "disabled";
> > + };
> > +
> > + usbphy: phy@5100400 {
> > + compatible = "allwinner,sun50i-h616-usb-
> > phy";
> > + reg = <0x05100400 0x24>,
> > + <0x05101800 0x14>,
> > + <0x05200800 0x14>,
> > + <0x05310800 0x14>,
> > + <0x05311800 0x14>;
> > + reg-names = "phy_ctrl",
> > + "pmu0",
> > + "pmu1",
> > + "pmu2",
> > + "pmu3";
> > + clocks = <&ccu CLK_USB_PHY0>,
> > + <&ccu CLK_USB_PHY1>,
> > + <&ccu CLK_USB_PHY2>,
> > + <&ccu CLK_USB_PHY3>,
> > + <&ccu CLK_BUS_EHCI2>;
> > + clock-names = "usb0_phy",
> > + "usb1_phy",
> > + "usb2_phy",
> > + "usb3_phy",
> > + "pmu2_clk";
> > + resets = <&ccu RST_USB_PHY0>,
> > + <&ccu RST_USB_PHY1>,
> > + <&ccu RST_USB_PHY2>,
> > + <&ccu RST_USB_PHY3>;
> > + reset-names = "usb0_reset",
> > + "usb1_reset",
> > + "usb2_reset",
> > + "usb3_reset";
> > + status = "disabled";
> > + #phy-cells = <1>;
> > + };
> > +
> > + ehci0: usb@5101000 {
> > + compatible = "allwinner,sun50i-h616-ehci",
> > + "generic-ehci";
> > + reg = <0x05101000 0x100>;
> > + interrupts = <GIC_SPI 26
> > IRQ_TYPE_LEVEL_HIGH>;
> > + clocks = <&ccu CLK_BUS_OHCI0>,
> > + <&ccu CLK_BUS_EHCI0>,
> > + <&ccu CLK_USB_OHCI0>;
> > + resets = <&ccu RST_BUS_OHCI0>,
> > + <&ccu RST_BUS_EHCI0>;
> > + phys = <&usbphy 0>;
> > + phy-names = "usb";
> > + status = "disabled";
> > + };
> > +
> > + ohci0: usb@5101400 {
> > + compatible = "allwinner,sun50i-h616-ohci",
> > + "generic-ohci";
> > + reg = <0x05101400 0x100>;
> > + interrupts = <GIC_SPI 27
> > IRQ_TYPE_LEVEL_HIGH>;
> > + clocks = <&ccu CLK_BUS_OHCI0>,
> > + <&ccu CLK_USB_OHCI0>;
> > + resets = <&ccu RST_BUS_OHCI0>;
> > + phys = <&usbphy 0>;
> > + phy-names = "usb";
> > + status = "disabled";
> > + };
> > +
> > + ehci1: usb@5200000 {
> > + compatible = "allwinner,sun50i-h616-ehci",
> > + "generic-ehci";
> > + reg = <0x05200000 0x100>;
> > + interrupts = <GIC_SPI 28
> > IRQ_TYPE_LEVEL_HIGH>;
> > + clocks = <&ccu CLK_BUS_OHCI1>,
> > + <&ccu CLK_BUS_EHCI1>,
> > + <&ccu CLK_USB_OHCI1>;
> > + resets = <&ccu RST_BUS_OHCI1>,
> > + <&ccu RST_BUS_EHCI1>;
> > + phys = <&usbphy 1>;
> > + phy-names = "usb";
> > + status = "disabled";
> > + };
> > +
> > + ohci1: usb@5200400 {
> > + compatible = "allwinner,sun50i-h616-ohci",
> > + "generic-ohci";
> > + reg = <0x05200400 0x100>;
> > + interrupts = <GIC_SPI 29
> > IRQ_TYPE_LEVEL_HIGH>;
> > + clocks = <&ccu CLK_BUS_OHCI1>,
> > + <&ccu CLK_USB_OHCI1>;
> > + resets = <&ccu RST_BUS_OHCI1>;
> > + phys = <&usbphy 1>;
> > + phy-names = "usb";
> > + status = "disabled";
> > + };
> > +
> > + ehci2: usb@5310000 {
> > + compatible = "allwinner,sun50i-h616-ehci",
> > + "generic-ehci";
> > + reg = <0x05310000 0x100>;
> > + interrupts = <GIC_SPI 30
> > IRQ_TYPE_LEVEL_HIGH>;
> > + clocks = <&ccu CLK_BUS_OHCI2>,
> > + <&ccu CLK_BUS_EHCI2>,
> > + <&ccu CLK_USB_OHCI2>;
> > + resets = <&ccu RST_BUS_OHCI2>,
> > + <&ccu RST_BUS_EHCI2>;
> > + phys = <&usbphy 2>;
> > + phy-names = "usb";
> > + status = "disabled";
> > + };
> > +
> > + ohci2: usb@5310400 {
> > + compatible = "allwinner,sun50i-h616-ohci",
> > + "generic-ohci";
> > + reg = <0x05310400 0x100>;
> > + interrupts = <GIC_SPI 31
> > IRQ_TYPE_LEVEL_HIGH>;
> > + clocks = <&ccu CLK_BUS_OHCI2>,
> > + <&ccu CLK_USB_OHCI2>;
> > + resets = <&ccu RST_BUS_OHCI2>;
> > + phys = <&usbphy 2>;
> > + phy-names = "usb";
> > + status = "disabled";
> > + };
> > +
> > + ehci3: usb@5311000 {
> > + compatible = "allwinner,sun50i-h616-ehci",
> > + "generic-ehci";
> > + reg = <0x05311000 0x100>;
> > + interrupts = <GIC_SPI 32
> > IRQ_TYPE_LEVEL_HIGH>;
> > + clocks = <&ccu CLK_BUS_OHCI3>,
> > + <&ccu CLK_BUS_EHCI3>,
> > + <&ccu CLK_USB_OHCI3>;
> > + resets = <&ccu RST_BUS_OHCI3>,
> > + <&ccu RST_BUS_EHCI3>;
> > + phys = <&usbphy 3>;
> > + phy-names = "usb";
> > + status = "disabled";
> > + };
> > +
> > + ohci3: usb@5311400 {
> > + compatible = "allwinner,sun50i-h616-ohci",
> > + "generic-ohci";
> > + reg = <0x05311400 0x100>;
> > + interrupts = <GIC_SPI 33
> > IRQ_TYPE_LEVEL_HIGH>;
> > + clocks = <&ccu CLK_BUS_OHCI3>,
> > + <&ccu CLK_USB_OHCI3>;
> > + resets = <&ccu RST_BUS_OHCI3>;
> > + phys = <&usbphy 3>;
> > + phy-names = "usb";
> > + status = "disabled";
> > + };
> > +
> > rtc: rtc@7000000 {
> > compatible = "allwinner,sun50i-h616-rtc";
> > reg = <0x07000000 0x400>;
>
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH AUTOSEL 6.1 8/9] arm64: dts: allwinner: h616: Add USB nodes
2022-12-20 6:48 ` Icenowy Zheng
@ 2022-12-23 14:09 ` Sasha Levin
0 siblings, 0 replies; 6+ messages in thread
From: Sasha Levin @ 2022-12-23 14:09 UTC (permalink / raw)
To: Icenowy Zheng
Cc: Andre Przywara, linux-kernel, stable, Jernej Skrabec, robh+dt,
krzysztof.kozlowski+dt, wens, samuel, devicetree,
linux-arm-kernel, linux-sunxi
On Tue, Dec 20, 2022 at 02:48:29PM +0800, Icenowy Zheng wrote:
>在 2022-12-20星期二的 00:01 +0000,Andre Przywara写道:
>> On Fri, 16 Dec 2022 19:09:35 -0500
>> Sasha Levin <sashal@kernel.org> wrote:
>>
>> > From: Andre Przywara <andre.przywara@arm.com>
>> >
>> > [ Upstream commit f40cf244c3feb4e1a442f8029b691add2c65b3ab ]
>>
>> This is not really a backport candidate:
>> - This is not a fix, but a new feature.
>> - This relies on the H616 USB PHY support patch, which will be only
>> in
>> v6.2 (and won't be backported).
I'll go ahead and drop it.
>> - DT backports are generally not useful to begin with, and should
>> actually not be necessary anyway.
>
>DT changes include fixes and new features. New features are not useful,
>but fixes are useful.
>
>This specific change is a new feature one, not a fix one though.
Right - this is a similar issue to PCI/USB/etc IDs, or quirks - we try
and backport patches that enable new hardware to work (proerly) with
drivers that already exist in the kernel.
--
Thanks,
Sasha
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-12-23 14:10 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20221217000937.41115-1-sashal@kernel.org>
2022-12-17 0:09 ` [PATCH AUTOSEL 6.1 2/9] arm64: make is_ttbrX_addr() noinstr-safe Sasha Levin
2022-12-17 0:09 ` [PATCH AUTOSEL 6.1 3/9] ARM: dts: aspeed: rainier,everest: Move reserved memory regions Sasha Levin
2022-12-17 0:09 ` [PATCH AUTOSEL 6.1 8/9] arm64: dts: allwinner: h616: Add USB nodes Sasha Levin
2022-12-20 0:01 ` Andre Przywara
2022-12-20 6:48 ` Icenowy Zheng
2022-12-23 14:09 ` Sasha Levin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).