rockchip: Add support for RK3582
Subsystems (4)
cover rockchip: Add support for RK3582
Rockchip RK3582 is a scaled down version of Rockchip RK3588(S).
- Dual Cortex-A76 and quad Cortex-A55 CPU
- No GPU
- 5TOPS NPU
- H.264/H.265 video encoder up to 4K@60fps
This patch series adds RK3582 support to the GIC and the Radxa E52C compact network computer.
FUKAUMI Naoki (3):
irqchip/gic-v3: Enable Rockchip 3588001 erratum workaround for RK3582
dt-bindings: arm: rockchip: Add Radxa E52C
arm64: dts: rockchip: Add Radxa E52C
.../devicetree/bindings/arm/rockchip.yaml | 5 + arch/arm64/boot/dts/rockchip/Makefile | 1 + .../boot/dts/rockchip/rk3582-radxa-e52c.dts | 729 ++++++++++++++++++ drivers/irqchip/irq-gic-v3-its.c | 3 +- 4 files changed, 737 insertions(+), 1 deletion(-) create mode 100644 arch/arm64/boot/dts/rockchip/rk3582-radxa-e52c.dts
Signature · 1 line
2.43.0
PATCH 1/3 irqchip/gic-v3: Enable Rockchip 3588001 erratum workaround for RK3582
Rockchip RK3582 is a scaled down version of Rockchip RK3588(S). Apply Rockchip 3588001 erratum workaround to RK3582.
--- drivers/irqchip/irq-gic-v3-its.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/irqchip/irq-gic-v3-its.c +2 -1
@@ -4861,7 +4861,8 @@ static bool __maybe_unused its_enable_rk3588001(void *data) {struct its_node *its = data; -if (!of_machine_is_compatible ("rockchip,rk3588" ) && +if (!of_machine_is_compatible ("rockchip,rk3582" ) && + !of_machine_is_compatible ("rockchip,rk3588" ) && !of_machine_is_compatible ("rockchip,rk3588s" ))return false;
Signature · 7 lines
2.43.0 _______________________________________________ Linux-rockchip mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-rockchip
Marc Zyngier
maintainerRe: [PATCH 1/3] irqchip/gic-v3: Enable Rockchip 3588001 erratum workaround for RK3582
Quoted 14 lines · FUKAUMI Naoki
Rockchip RK3582 is a scaled down version of Rockchip RK3588(S). Apply Rockchip 3588001 erratum workaround to RK3582.
Signed-off-by FUKAUMI Naoki <[email protected]>--- drivers/irqchip/irq-gic-v3-its.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/irqchip/irq-gic-v3-its.c +0
-0
drivers/irqchip/irq-gic-v3-its.c static bool __maybe_unused its_enable_rk3588001(void *data) · line 4868
Quoted 9 lines
drivers/irqchip/irq-gic-v3-its.c +2
-1@@ -4861,7 +4861,8 @@ static bool __maybe_unused its_enable_rk3588001(void *data) {struct its_node *its = data; -if (!of_machine_is_compatible ("rockchip,rk3588" ) && +if (!of_machine_is_compatible ("rockchip,rk3582" ) && + !of_machine_is_compatible ("rockchip,rk3588" ) && !of_machine_is_compatible ("rockchip,rk3588s" ))return false;
Please use the relevant property for that purpose ("dma-noncoherent") at the distributor and ITS levels. We're not adding extra compatibles for this anymore, and you might as well fix the core dtsi to expose such property.
Thanks,
M.
Signature · 1 line
Without deviation from the norm, progress is not possible.
Re: [PATCH 1/3] irqchip/gic-v3: Enable Rockchip 3588001 erratum workaround for RK3582
Hi Marc,
Quoted 19 lines · Marc Zyngier
Quoted 17 lines · FUKAUMI Naoki
Rockchip RK3582 is a scaled down version of Rockchip RK3588(S). Apply Rockchip 3588001 erratum workaround to RK3582.
Signed-off-by FUKAUMI Naoki <[email protected]>--- drivers/irqchip/irq-gic-v3-its.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/irqchip/irq-gic-v3-its.c +0
-0@@ -4861,7 +4861,8 @@ static bool __maybe_unused its_enable_rk3588001(void *data) {struct its_node *its = data;
Quoted 11 lines
drivers/irqchip/irq-gic-v3-its.c static bool __maybe_unused its_enable_rk3588001(void *data) · line 4868
Quoted 6 lines
drivers/irqchip/irq-gic-v3-its.c +2
-1-if (!of_machine_is_compatible ("rockchip,rk3588" ) && +if (!of_machine_is_compatible ("rockchip,rk3582" ) && + !of_machine_is_compatible ("rockchip,rk3588" ) && !of_machine_is_compatible ("rockchip,rk3588s" ))return false;Please use the relevant property for that purpose ("dma-noncoherent") at the distributor and ITS levels. We're not adding extra compatibles for this anymore, and you might as well fix the core dtsi to expose such property.
I see. I'll drop this patch in v2.
Best regards,
--
FUKAUMI Naoki
Radxa Computer (Shenzhen) Co., Ltd.
Quoted 4 lines
Thanks,
M.
Re: [PATCH 1/3] irqchip/gic-v3: Enable Rockchip 3588001 erratum workaround for RK3582
In reply to Marc ZyngierHello Marc,
Quoted 20 lines · Marc Zyngier
Quoted 18 lines · FUKAUMI Naoki
Rockchip RK3582 is a scaled down version of Rockchip RK3588(S). Apply Rockchip 3588001 erratum workaround to RK3582.
Signed-off-by FUKAUMI Naoki <[email protected]>--- drivers/irqchip/irq-gic-v3-its.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/irqchip/irq-gic-v3-its.c +0
-0@@ -4861,7 +4861,8 @@ static bool __maybe_unused its_enable_rk3588001(void *data) {struct its_node *its = data;
Quoted 11 lines
drivers/irqchip/irq-gic-v3-its.c static bool __maybe_unused its_enable_rk3588001(void *data) · line 4867
Quoted 6 lines
drivers/irqchip/irq-gic-v3-its.c +2
-1-if (!of_machine_is_compatible ("rockchip,rk3588" ) && +if (!of_machine_is_compatible ("rockchip,rk3582" ) && + !of_machine_is_compatible ("rockchip,rk3588" ) && !of_machine_is_compatible ("rockchip,rk3588s" ))return false;Please use the relevant property for that purpose ("dma-noncoherent") at the distributor and ITS levels. We're not adding extra compatibles for this anymore, and you might as well fix the core dtsi to expose such property.
Thanks for your response.
After a more detailed look into drivers/irqchip/irq-gic-v3-its.c, it seems that relying on the "dma-noncoherent" DT property may not be equivalent to adding another compatible check. Here are a few quotations from irq-gic-v3-its.c, to illustrate this better:
4746 static bool __maybe_unused its_enable_rk3588001(void *data) 4747 {
4748 struct its_node *its = data;
4749
4750 if (!of_machine_is_compatible("rockchip,rk3588") &&
4751 !of_machine_is_compatible("rockchip,rk3588s"))
4752 return false;
4753
4754 its->flags |= ITS_FLAGS_FORCE_NON_SHAREABLE;
4755 gic_rdists->flags |= RDIST_FLAGS_FORCE_NON_SHAREABLE;
4756
4757 return true;
4758 }
4759
4760 static bool its_set_non_coherent(void *data)
4761 {
4762 struct its_node *its = data;
4763
4764 its->flags |= ITS_FLAGS_FORCE_NON_SHAREABLE;
4765 return true;
4766 }
4814 #ifdef CONFIG_ROCKCHIP_ERRATUM_3588001
4815 {
4816 .desc = "ITS: Rockchip erratum RK3588001",
4817 .iidr = 0x0201743b,
4818 .mask = 0xffffffff,
4819 .init = its_enable_rk3588001,
4820 },
4821 #endif
4822 {
4823 .desc = "ITS: non-coherent attribute",
4824 .property = "dma-noncoherent",
4825 .init = its_set_non_coherent,4826 },
As visible above, using the "dma-noncoherent" DT property results in not setting the RDIST_FLAGS_FORCE_NON_SHAREABLE flag, which the its_enable_rk3588001() function does. In other words, it doesn't seem that "dma-noncoherent" is a "drop-in" replacement for adding yet another compatible for the RK3582.
Modifying the current behavior of the "dma-noncoherent" DT property doesn't seem like an option, because it's already used in a couple of board dts(i) files. Should we introduce another DT property, perhaps "dma-noncoherent-rdist" or something similar?
Could you, please, advise on how to move forward with this? I'm willing to implement the required patches, but I'd prefer to reduce the possible back-and-forth on them, to save everyone's time.
Marc Zyngier
maintainerRe: [PATCH 1/3] irqchip/gic-v3: Enable Rockchip 3588001 erratum workaround for RK3582
Dragan,
Quoted 37 lines · Dragan Simic
Hello Marc,
Quoted 21 lines · Marc Zyngier
Quoted 19 lines · FUKAUMI Naoki
Rockchip RK3582 is a scaled down version of Rockchip RK3588(S). Apply Rockchip 3588001 erratum workaround to RK3582.
Signed-off-by FUKAUMI Naoki <[email protected]>--- drivers/irqchip/irq-gic-v3-its.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/irqchip/irq-gic-v3-its.c +0
-0@@ -4861,7 +4861,8 @@ static bool __maybe_unused its_enable_rk3588001(void *data) {struct its_node *its = data;Quoted 11 lines
drivers/irqchip/irq-gic-v3-its.c static bool __maybe_unused its_enable_rk3588001(void *data) · line 4867
Quoted 6 lines
drivers/irqchip/irq-gic-v3-its.c +2
-1-if (!of_machine_is_compatible ("rockchip,rk3588" ) && +if (!of_machine_is_compatible ("rockchip,rk3582" ) && + !of_machine_is_compatible ("rockchip,rk3588" ) && !of_machine_is_compatible ("rockchip,rk3588s" ))return false;Please use the relevant property for that purpose ("dma-noncoherent") at the distributor and ITS levels. We're not adding extra compatibles for this anymore, and you might as well fix the core dtsi to expose such property.
Quoted 5 lines
Thanks for your response.
After a more detailed look into
drivers/irqchip/irq-gic-v3-its.c, it seems that relying on the "dma-noncoherent" DT property may not be equivalent to adding another compatible check.
It is. My email makes it plain what needs doing.
Quoted 37 lines
Here are a few
quotations fromirq-gic-v3-its.c, to illustrate this better:4746 static bool
__maybe_unusedits_enable_rk3588001(void *data)4747 {
4748 structits_node*its = data;
4749
4750 if (!of_machine_is_compatible("rockchip,rk3588") &&
4751 !of_machine_is_compatible("rockchip,rk3588s"))
4752 return false;
4753
4754its->flags|=ITS_FLAGS_FORCE_NON_SHAREABLE;
4755gic_rdists->flags|=RDIST_FLAGS_FORCE_NON_SHAREABLE;
4756
4757 return true;
4758 }
4759
4760 static boolits_set_non_coherent(void *data)
4761 {
4762 structits_node*its = data;
4763
4764its->flags|=ITS_FLAGS_FORCE_NON_SHAREABLE;
4765 return true;
4766 }4814 #ifdef
CONFIG_ROCKCHIP_ERRATUM_3588001
4815 {4816 .desc = "ITS: Rockchip erratum RK3588001", 4817 .iidr = 0x0201743b, 4818 .mask = 0xffffffff, 4819 .init = its_enable_rk3588001, 4820 }, 4821 #endif 4822 { 4823 .desc = "ITS: non-coherent attribute", 4824 .property = "dma-noncoherent", 4825 .init = its_set_non_coherent,
Quoted 1 line
4826 },
Nothing tickles me more than having my own work being thrown back at me.
Quoted 6 lines
As visible above, using the "dma-noncoherent" DT property results in not setting the
RDIST_FLAGS_FORCE_NON_SHAREABLEflag, which theits_enable_rk3588001()function does. In other words, it doesn't seem that "dma-noncoherent" is a "drop-in" replacement for adding yet another compatible for the RK3582.
You clearly haven't read what I wrote. Or rather, you read what you wanted to read, and ignored half of it.
Quoted 5 lines
Modifying the current behavior of the "dma-noncoherent" DT property doesn't seem like an option, because it's already used in a couple of board dts(i) files. Should we introduce another DT property, perhaps "dma-noncoherent-rdist" or something similar?
No. We have everything we need. Believe it or not, I actually know what I'm talking about. I know, this is surprising. I surprise myself sometimes.
Quoted 1 line
Could you, please, advise on how to move forward with this? I'm
I already have.
Quoted 2 lines
willing to implement the required patches, but I'd prefer to reduce the possible back-and-forth on them, to save everyone's time.
May I suggest that you read my email again? How about grepping through the upstream DT collection and (shock, horror) look at the imx95.dtsi file, which suffers from the same braindead behaviour as the RK stuff?
For clarity, let me paste it here again, and add some emphasis for extra clarity:
Quoted 2 lines
Quoted 2 lines
Please use the relevant property for that purpose ("dma-noncoherent") at the distributor and ITS levels. We're not adding extra compatibles
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Now, please go look at the code for real this time, appreciate how the "dma-noncoherent" property placed at the distributor *AND* ITS levels combine to give you the effects the hardware requires.
To sum it up: the standard properties and the Rockchip hacks are strictly equivalent, there is no need for anything extra, and I stand by my NAK on this very patch.
M.
Signature · 1 line
Without deviation from the norm, progress is not possible.
Re: [PATCH 1/3] irqchip/gic-v3: Enable Rockchip 3588001 erratum workaround for RK3582
Hello Marc,
Quoted 83 lines · Marc Zyngier
Quoted 34 lines · Dragan Simic
Quoted 21 lines · Marc Zyngier
Quoted 19 lines · FUKAUMI Naoki
Rockchip RK3582 is a scaled down version of Rockchip RK3588(S). Apply Rockchip 3588001 erratum workaround to RK3582.
Signed-off-by FUKAUMI Naoki <[email protected]>--- drivers/irqchip/irq-gic-v3-its.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/irqchip/irq-gic-v3-its.c +0
-0@@ -4861,7 +4861,8 @@ static bool __maybe_unused its_enable_rk3588001(void *data) {struct its_node *its = data;Quoted 11 lines
drivers/irqchip/irq-gic-v3-its.c static bool __maybe_unused its_enable_rk3588001(void *data) · line 4867
Quoted 6 lines
drivers/irqchip/irq-gic-v3-its.c +2
-1-if (!of_machine_is_compatible ("rockchip,rk3588" ) && +if (!of_machine_is_compatible ("rockchip,rk3582" ) && + !of_machine_is_compatible ("rockchip,rk3588" ) && !of_machine_is_compatible ("rockchip,rk3588s" ))return false;Please use the relevant property for that purpose ("dma-noncoherent") at the distributor and ITS levels. We're not adding extra compatibles for this anymore, and you might as well fix the core dtsi to expose such property.
Quoted 5 lines
Thanks for your response.
After a more detailed look into
drivers/irqchip/irq-gic-v3-its.c, it seems that relying on the "dma-noncoherent" DT property may not be equivalent to adding another compatible check.It is. My email makes it plain what needs doing.
Quoted 37 lines
Here are a few
quotations fromirq-gic-v3-its.c, to illustrate this better:4746 static bool
__maybe_unusedits_enable_rk3588001(void *data)4747 {
4748 structits_node*its = data;
4749
4750 if (!of_machine_is_compatible("rockchip,rk3588") &&
4751 !of_machine_is_compatible("rockchip,rk3588s"))
4752 return false;
4753
4754its->flags|=ITS_FLAGS_FORCE_NON_SHAREABLE;
4755gic_rdists->flags|=RDIST_FLAGS_FORCE_NON_SHAREABLE;
4756
4757 return true;
4758 }
4759
4760 static boolits_set_non_coherent(void *data)
4761 {
4762 structits_node*its = data;
4763
4764its->flags|=ITS_FLAGS_FORCE_NON_SHAREABLE;
4765 return true;
4766 }4814 #ifdef
CONFIG_ROCKCHIP_ERRATUM_3588001
4815 {4816 .desc = "ITS: Rockchip erratum RK3588001", 4817 .iidr = 0x0201743b, 4818 .mask = 0xffffffff, 4819 .init = its_enable_rk3588001, 4820 }, 4821 #endif 4822 { 4823 .desc = "ITS: non-coherent attribute", 4824 .property = "dma-noncoherent", 4825 .init = its_set_non_coherent,Quoted 1 line
4826 },
Quoted 2 lines
Nothing tickles me more than having my own work being thrown back at me.
I'm sorry, that wasn't my intention. I just wanted to make referencing to what I was talking about a bit easier. Though, I now see that I was wrong, and I apologize for the noise.
Quoted 8 lines
Quoted 5 lines
As visible above, using the "dma-noncoherent" DT property results in not setting the
RDIST_FLAGS_FORCE_NON_SHAREABLEflag, which theits_enable_rk3588001()function does. In other words, it doesn't seem that "dma-noncoherent" is a "drop-in" replacement for adding yet another compatible for the RK3582.You clearly haven't read what I wrote. Or rather, you read what you wanted to read, and ignored half of it.
No, it an honest mistake, nothing else. My intention is never to twist the reality in any way.
Quoted 8 lines
Quoted 4 lines
Modifying the current behavior of the "dma-noncoherent" DT property doesn't seem like an option, because it's already used in a couple of board dts(i) files. Should we introduce another DT property, perhaps "dma-noncoherent-rdist" or something similar?
No. We have everything we need. Believe it or not, I actually know what I'm talking about. I know, this is surprising. I surprise myself sometimes.
It wasn't my intention to insult you in any way. I highly respect everyone's work, including yours, of course. I am a human being, so perhaps I am allowed to be tired a bit and, as a result, make an honest mistake from time to time?
Quoted 3 lines
Quoted 1 line
Could you, please, advise on how to move forward with this? I'm
I already have.
Yes, I see it now. I'm sorry for not reading the code more carefully the first time. I read your earlier response carefully, but I missed to read the code carefully as well.
Quoted 10 lines
Quoted 2 lines
willing to implement the required patches, but I'd prefer to reduce the possible back-and-forth on them, to save everyone's time.
May I suggest that you read my email again? How about grepping through the upstream DT collection and (shock, horror) look at the
imx95.dtsifile, which suffers from the same braindead behaviour as the RK stuff?For clarity, let me paste it here again, and add some emphasis for extra clarity:
Quoted 7 lines
Quoted 2 lines
Quoted 2 lines
Please use the relevant property for that purpose ("dma-noncoherent") at the distributor and ITS levels. We're not adding extra compatibles
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^Now, please go look at the code for real this time, appreciate how the "dma-noncoherent" property placed at the distributor *AND* ITS levels combine to give you the effects the hardware requires.
You're absolutely right, and I should've read the code more carefully. I stand corrected, and I appreciate your additional explanation.
Quoted 3 lines
To sum it up: the standard properties and the Rockchip hacks are strictly equivalent, there is no need for anything extra, and I stand by my NAK on this very patch.
Please note that I never questioned that this patch shouldn't be dropped. I just missed some parts of the code, as an honest mistake, for which I apologize once again.
Marc Zyngier
maintainerRe: [PATCH 1/3] irqchip/gic-v3: Enable Rockchip 3588001 erratum workaround for RK3582
Quoted 87 lines · Dragan Simic
Hello Marc,
Quoted 83 lines · Marc Zyngier
Quoted 34 lines · Dragan Simic
Quoted 21 lines · Marc Zyngier
Quoted 19 lines · FUKAUMI Naoki
Rockchip RK3582 is a scaled down version of Rockchip RK3588(S). Apply Rockchip 3588001 erratum workaround to RK3582.
Signed-off-by FUKAUMI Naoki <[email protected]>--- drivers/irqchip/irq-gic-v3-its.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/irqchip/irq-gic-v3-its.c +0
-0@@ -4861,7 +4861,8 @@ static bool __maybe_unused its_enable_rk3588001(void *data) {struct its_node *its = data;Quoted 11 lines
drivers/irqchip/irq-gic-v3-its.c static bool __maybe_unused its_enable_rk3588001(void *data) · line 4867
Quoted 6 lines
drivers/irqchip/irq-gic-v3-its.c +2
-1-if (!of_machine_is_compatible ("rockchip,rk3588" ) && +if (!of_machine_is_compatible ("rockchip,rk3582" ) && + !of_machine_is_compatible ("rockchip,rk3588" ) && !of_machine_is_compatible ("rockchip,rk3588s" ))return false;Please use the relevant property for that purpose ("dma-noncoherent") at the distributor and ITS levels. We're not adding extra compatibles for this anymore, and you might as well fix the core dtsi to expose such property.
Quoted 5 lines
Thanks for your response.
After a more detailed look into
drivers/irqchip/irq-gic-v3-its.c, it seems that relying on the "dma-noncoherent" DT property may not be equivalent to adding another compatible check.It is. My email makes it plain what needs doing.
Quoted 38 lines
Here are a few
quotations fromirq-gic-v3-its.c, to illustrate this better:4746 static bool
__maybe_unusedits_enable_rk3588001(void *data)4747 {
4748 structits_node*its = data;
4749
4750 if (!of_machine_is_compatible("rockchip,rk3588") &&
4751 !of_machine_is_compatible("rockchip,rk3588s"))
4752 return false;
4753
4754its->flags|=ITS_FLAGS_FORCE_NON_SHAREABLE;
4755gic_rdists->flags|=RDIST_FLAGS_FORCE_NON_SHAREABLE;
4756
4757 return true;
4758 }
4759
4760 static boolits_set_non_coherent(void *data)
4761 {
4762 structits_node*its = data;
4763
4764its->flags|=ITS_FLAGS_FORCE_NON_SHAREABLE;
4765 return true;
4766 }4814 #ifdef
CONFIG_ROCKCHIP_ERRATUM_3588001
4815 {4816 .desc = "ITS: Rockchip erratum RK3588001", 4817 .iidr = 0x0201743b, 4818 .mask = 0xffffffff, 4819 .init = its_enable_rk3588001, 4820 }, 4821 #endif 4822 { 4823 .desc = "ITS: non-coherent attribute", 4824 .property = "dma-noncoherent", 4825 .init = its_set_non_coherent,4826 },
Quoted 6 lines
Quoted 2 lines
Nothing tickles me more than having my own work being thrown back at me.
I'm sorry, that wasn't my intention. I just wanted to make referencing to what I was talking about a bit easier. Though, I now see that I was wrong, and I apologize for the noise.
No need to apologise. Just understand that the way you approached the discussion was suboptimal. Next time, just ask how the proposed solution works, rather than asserting that it doesn't.
Hopefully we can move on and you and Naoki can come up with a set of patches that does the right thing.
M.
Signature · 1 line
Without deviation from the norm, progress is not possible.
Re: [PATCH 1/3] irqchip/gic-v3: Enable Rockchip 3588001 erratum workaround for RK3582
Quoted 89 lines · Marc Zyngier
Quoted 87 lines · Dragan Simic
Quoted 85 lines · Marc Zyngier
Quoted 34 lines · Dragan Simic
Quoted 21 lines · Marc Zyngier
Quoted 19 lines · FUKAUMI Naoki
Rockchip RK3582 is a scaled down version of Rockchip RK3588(S). Apply Rockchip 3588001 erratum workaround to RK3582.
Signed-off-by FUKAUMI Naoki <[email protected]>--- drivers/irqchip/irq-gic-v3-its.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/irqchip/irq-gic-v3-its.c +0
-0@@ -4861,7 +4861,8 @@ static bool __maybe_unused its_enable_rk3588001(void *data) {struct its_node *its = data;Quoted 11 lines
drivers/irqchip/irq-gic-v3-its.c static bool __maybe_unused its_enable_rk3588001(void *data) · line 4867
Quoted 6 lines
drivers/irqchip/irq-gic-v3-its.c +2
-1-if (!of_machine_is_compatible ("rockchip,rk3588" ) && +if (!of_machine_is_compatible ("rockchip,rk3582" ) && + !of_machine_is_compatible ("rockchip,rk3588" ) && !of_machine_is_compatible ("rockchip,rk3588s" ))return false;Please use the relevant property for that purpose ("dma-noncoherent") at the distributor and ITS levels. We're not adding extra compatibles for this anymore, and you might as well fix the core dtsi to expose such property.
Quoted 5 lines
Thanks for your response.
After a more detailed look into
drivers/irqchip/irq-gic-v3-its.c, it seems that relying on the "dma-noncoherent" DT property may not be equivalent to adding another compatible check.It is. My email makes it plain what needs doing.
Quoted 37 lines
Here are a few
quotations fromirq-gic-v3-its.c, to illustrate this better:4746 static bool
__maybe_unusedits_enable_rk3588001(void *data)4747 {
4748 structits_node*its = data;
4749
4750 if (!of_machine_is_compatible("rockchip,rk3588") &&
4751 !of_machine_is_compatible("rockchip,rk3588s"))
4752 return false;
4753
4754its->flags|=ITS_FLAGS_FORCE_NON_SHAREABLE;
4755gic_rdists->flags|=RDIST_FLAGS_FORCE_NON_SHAREABLE;
4756
4757 return true;
4758 }
4759
4760 static boolits_set_non_coherent(void *data)
4761 {
4762 structits_node*its = data;
4763
4764its->flags|=ITS_FLAGS_FORCE_NON_SHAREABLE;
4765 return true;
4766 }4814 #ifdef
CONFIG_ROCKCHIP_ERRATUM_3588001
4815 {4816 .desc = "ITS: Rockchip erratum RK3588001", 4817 .iidr = 0x0201743b, 4818 .mask = 0xffffffff, 4819 .init = its_enable_rk3588001, 4820 }, 4821 #endif 4822 { 4823 .desc = "ITS: non-coherent attribute", 4824 .property = "dma-noncoherent", 4825 .init = its_set_non_coherent,Quoted 1 line
4826 },
Nothing tickles me more than having my own work being thrown back at me.
Quoted 7 lines
Quoted 3 lines
I'm sorry, that wasn't my intention. I just wanted to make referencing to what I was talking about a bit easier. Though, I now see that I was wrong, and I apologize for the noise.
No need to apologise. Just understand that the way you approached the discussion was suboptimal. Next time, just ask how the proposed solution works, rather than asserting that it doesn't.
Thanks. Indeed, the way I approached it was waaay suboptimal. I just wanted to clarify that it was an honest mistake resulting from not looking at the code carefully enough, nothing else.
Quoted 2 lines
Hopefully we can move on and you and Naoki can come up with a set of patches that does the right thing.
Of course. I've already prepared a small patch series that, hopefully, does the right thing when it comes to the Rockchip 3588001 errata. I'll submit it soon, after I check the patches a bit further.
Re: [PATCH 1/3] irqchip/gic-v3: Enable Rockchip 3588001 erratum workaround for RK3582
Quoted 102 lines · Dragan Simic
Quoted 89 lines · Marc Zyngier
Quoted 87 lines · Dragan Simic
Quoted 85 lines · Marc Zyngier
Quoted 34 lines · Dragan Simic
Quoted 21 lines · Marc Zyngier
Quoted 19 lines · FUKAUMI Naoki
Rockchip RK3582 is a scaled down version of Rockchip RK3588(S). Apply Rockchip 3588001 erratum workaround to RK3582.
Signed-off-by FUKAUMI Naoki <[email protected]>--- drivers/irqchip/irq-gic-v3-its.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/irqchip/irq-gic-v3-its.c +0
-0@@ -4861,7 +4861,8 @@ static bool __maybe_unused its_enable_rk3588001(void *data) {struct its_node *its = data;Quoted 11 lines
drivers/irqchip/irq-gic-v3-its.c static bool __maybe_unused · line 4868
Quoted 6 lines
drivers/irqchip/irq-gic-v3-its.c +2
-1-if (!of_machine_is_compatible ("rockchip,rk3588" ) && +if (!of_machine_is_compatible ("rockchip,rk3582" ) && + !of_machine_is_compatible ("rockchip,rk3588" ) && !of_machine_is_compatible ("rockchip,rk3588s" ))return false;Please use the relevant property for that purpose ("dma-noncoherent") at the distributor and ITS levels. We're not adding extra compatibles for this anymore, and you might as well fix the core dtsi to expose such property.
Quoted 5 lines
Thanks for your response.
After a more detailed look into
drivers/irqchip/irq-gic-v3-its.c, it seems that relying on the "dma-noncoherent" DT property may not be equivalent to adding another compatible check.It is. My email makes it plain what needs doing.
Quoted 37 lines
Here are a few
quotations fromirq-gic-v3-its.c, to illustrate this better:4746 static bool
__maybe_unusedits_enable_rk3588001(void *data)4747 {
4748 structits_node*its = data;
4749
4750 if (!of_machine_is_compatible("rockchip,rk3588") &&
4751 !of_machine_is_compatible("rockchip,rk3588s"))
4752 return false;
4753
4754its->flags|=ITS_FLAGS_FORCE_NON_SHAREABLE;
4755gic_rdists->flags|=RDIST_FLAGS_FORCE_NON_SHAREABLE;
4756
4757 return true;
4758 }
4759
4760 static boolits_set_non_coherent(void *data)
4761 {
4762 structits_node*its = data;
4763
4764its->flags|=ITS_FLAGS_FORCE_NON_SHAREABLE;
4765 return true;
4766 }4814 #ifdef
CONFIG_ROCKCHIP_ERRATUM_3588001
4815 {4816 .desc = "ITS: Rockchip erratum RK3588001", 4817 .iidr = 0x0201743b, 4818 .mask = 0xffffffff, 4819 .init = its_enable_rk3588001, 4820 }, 4821 #endif 4822 { 4823 .desc = "ITS: non-coherent attribute", 4824 .property = "dma-noncoherent", 4825 .init = its_set_non_coherent,Quoted 1 line
4826 },
Nothing tickles me more than having my own work being thrown back at me.
Quoted 7 lines
Quoted 3 lines
I'm sorry, that wasn't my intention. I just wanted to make referencing to what I was talking about a bit easier. Though, I now see that I was wrong, and I apologize for the noise.
No need to apologise. Just understand that the way you approached the discussion was suboptimal. Next time, just ask how the proposed solution works, rather than asserting that it doesn't.
Thanks. Indeed, the way I approached it was waaay suboptimal. I just wanted to clarify that it was an honest mistake resulting from not looking at the code carefully enough, nothing else.
Quoted 7 lines
Quoted 2 lines
Hopefully we can move on and you and Naoki can come up with a set of patches that does the right thing.
Of course. I've already prepared a small patch series that, hopefully, does the right thing when it comes to the Rockchip 3588001 errata. I'll submit it soon, after I check the patches a bit further.
For future reference, here's the link to the above-mentioned small patch series on the linux-rockchip mailing list:
https://lore.kernel.org/linux-rockchip/[email protected]/T/#u
PATCH 2/3 dt-bindings: arm: rockchip: Add Radxa E52C
In reply to FUKAUMI NaokiAdd devicetree binding for the Radxa E52C.
Radxa E52C is a compact network computer based on the Rockchip RK3582 SoC.
--- Documentation/devicetree/bindings/arm/rockchip.yaml | 5 +++++ 1 file changed, 5 insertions(+)
Documentation/devicetree/bindings/arm/rockchip.yaml +5 -0
@@ -812,6 +812,11 @@ properties: - const: radxa,e20c - const: rockchip,rk3528 + - description: Radxa E52C + items: + - const: radxa,e52c + - const: rockchip,rk3582 + - description: Radxa Rock items: - const: radxa,rock
Signature · 1 line
2.43.0
Re: [PATCH 2/3] dt-bindings: arm: rockchip: Add Radxa E52C
Quoted 6 lines · FUKAUMI Naoki
Add devicetree binding for the Radxa E52C.
Radxa E52C is a compact network computer based on the Rockchip RK3582 SoC.
Signed-off-by FUKAUMI Naoki <[email protected]>
Re: [PATCH 2/3] dt-bindings: arm: rockchip: Add Radxa E52C
Hi Conor,
Thank you for your ack.
I fixed the patch so I didn't add your A-b in v2.
Best regards,
--
FUKAUMI Naoki
Radxa Computer (Shenzhen) Co., Ltd.
Quoted 10 lines · Conor Dooley
Quoted 6 lines · FUKAUMI Naoki
Add devicetree binding for the Radxa E52C.
Radxa E52C is a compact network computer based on the Rockchip RK3582 SoC.
Signed-off-by FUKAUMI Naoki <[email protected]>Acked-by Conor Dooley <[email protected]>
PATCH 3/3 arm64: dts: rockchip: Add Radxa E52C
In reply to FUKAUMI NaokiRadxa E52C is a compact network computer[1] based on the Rockchip RK3582 SoC:
- Dual Cortex-A76 and quad Cortex-A55 CPU
- 5TOPS NPU
- 2GB/4GB/8GB LPDDR4 RAM
- 16GB/32GB/64GB on-board eMMC
- microSD card slot
- USB 3.0 Type-A HOST port
- USB Type-C debug port
- USB Type-C power port (5V only)
- 2x 2.5GbE ports
[1] https://radxa.com/products/network-computer/e52c
--- arch/arm64/boot/dts/rockchip/Makefile | 1 + .../boot/dts/rockchip/rk3582-radxa-e52c.dts | 729 ++++++++++++++++++ 2 files changed, 730 insertions(+) create mode 100644 arch/arm64/boot/dts/rockchip/rk3582-radxa-e52c.dts
arch/arm64/boot/dts/rockchip/Makefile +1 -0
@@ -157,6 +157,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-wolfvision-pf5.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-wolfvision-pf5-display-vz.dtbo dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-wolfvision-pf5-io-expander.dtbo dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3576-armsom-sige5.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3582-radxa-e52c.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-armsom-sige7.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-armsom-w3.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-coolpi-cm5-evb.dtb
arch/arm64/boot/dts/rockchip/rk3582-radxa-e52c.dts new file +729 -0
729 lines not on this page · raw message
Signature · 1 line
2.43.0
Re: [PATCH 3/3] arm64: dts: rockchip: Add Radxa E52C
In v2 I will change the node names to be more general. Please ignore the "node name" part.
Best regards,
--
FUKAUMI Naoki
Radxa Computer (Shenzhen) Co., Ltd.
Quoted 769 lines · FUKAUMI Naoki
Radxa E52C is a compact network computer[1] based on the Rockchip RK3582 SoC:
- Dual Cortex-A76 and quad Cortex-A55 CPU
- 5TOPS NPU
- 2GB/4GB/8GB LPDDR4 RAM
- 16GB/32GB/64GB on-board eMMC
- microSD card slot
- USB 3.0 Type-A HOST port
- USB Type-C debug port
- USB Type-C power port (5V only)
- 2x 2.5GbE ports[1] https://radxa.com/products/network-computer/e52c
Signed-off-by FUKAUMI Naoki <[email protected]>--- arch/arm64/boot/dts/rockchip/Makefile | 1 + .../boot/dts/rockchip/rk3582-radxa-e52c.dts | 729 ++++++++++++++++++ 2 files changed, 730 insertions(+)create mode 100644
arch/arm64/boot/dts/rockchip/rk3582-radxa-e52c.dtsarch/arm64/boot/dts/rockchip/Makefile +1
-0@@ -157,6 +157,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-wolfvision-pf5.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-wolfvision-pf5-display-vz.dtbo dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-wolfvision-pf5-io-expander.dtbo dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3576-armsom-sige5.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3582-radxa-e52c.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-armsom-sige7.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-armsom-w3.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-coolpi-cm5-evb.dtbarch/arm64/boot/dts/rockchip/rk3582-radxa-e52c.dts new file +729
-0@@ -0,0 +1,729 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2024 Radxa Computer (Shenzhen) Co., Ltd. + */ + +/dts-v1/; + +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/input/input.h> +#include <dt-bindings/leds/common.h> +#include <dt-bindings/pinctrl/rockchip.h> +#include <dt-bindings/pwm/pwm.h> +#include "rk3588s.dtsi" + +/ { + model = "Radxa E52C"; + compatible = "radxa,e52c", "rockchip,rk3582"; + + aliases { + mmc0 = &sdhci; + mmc1 = &sdmmc; + }; + + chosen { + stdout-path = "serial2:1500000n8"; + }; + + adc-keys { + compatible = "adc-keys"; + io-channels = <&saradc 0>; + io-channel-names = "buttons"; + keyup-threshold-microvolt = <18000>; + poll-interval = <100>; + + key-vendor { + label = "Maskrom"; + linux,code = <KEY_VENDOR>; + press-threshold-microvolt = <0>; + }; + }; + + gpio-keys { + compatible = "gpio-keys"; + pinctrl-names = "default"; + pinctrl-0 = <&btn_user>; + + button-0 { + label = "User"; + gpios = <&gpio4 RK_PB3 GPIO_ACTIVE_LOW>; + linux,code = <BTN_0>; + wakeup-source; + }; + }; + + gpio-leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&led_pin>; + + led-0 { + color = <LED_COLOR_ID_GREEN>; + default-state = "on"; + function = LED_FUNCTION_STATUS; + gpios = <&gpio3 RK_PC4 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "heartbeat"; + }; + }; + + pwm-leds { + compatible = "pwm-leds"; + + led-1 { + color = <LED_COLOR_ID_GREEN>; + default-state = "on"; + function = LED_FUNCTION_LAN; + linux,default-trigger = "r8169-4-4100:00:link"; + pwms = <&pwm14 0 1000000 PWM_POLARITY_INVERTED>; + max-brightness = <255>; + }; + + led-2 { + color = <LED_COLOR_ID_GREEN>; + default-state = "on"; + function = LED_FUNCTION_WAN; + linux,default-trigger = "r8169-3-3100:00:link"; + pwms = <&pwm11 0 1000000 PWM_POLARITY_INVERTED>; + max-brightness = <255>; + }; + }; + + /* 5V_DCIN */ + vbus_typec: regulator-vbus-typec { + compatible = "regulator-fixed"; + regulator-name = "vbus_typec"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + }; + + vcc5v0_usb_otg0: regulator-vcc5v0-usb-otg0 { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&usb_otg_pwren_h>; + regulator-name = "vcc5v0_usb_otg0"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + vin-supply = <&vcc_sysin>; + }; + + vcc_1v1_nldo_s3: regulator-vcc-1v1-nldo-s3 { + compatible = "regulator-fixed"; + regulator-name = "vcc_1v1_nldo_s3"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <1100000>; + regulator-max-microvolt = <1100000>; + vin-supply = <&vcc_sysin>; + }; + + vcc_3v3_pmu: regulator-vcc-3v3-pmu { + compatible = "regulator-fixed"; + regulator-name = "vcc_3v3_pmu"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + vin-supply = <&vcc_3v3_s3>; + }; + + vcc_3v3_s0: regulator-vcc-3v3-s0 { + compatible = "regulator-fixed"; + regulator-name = "vcc_3v3_s0"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + vin-supply = <&vcc_3v3_s3>; + }; + + vcc_5v0: regulator-vcc-5v0 { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&gpio4 RK_PA3 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&vcc_5v0_pwren_h>; + regulator-name = "vcc_5v0"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + vin-supply = <&vcc_sysin>; + }; + + vcc_sysin: regulator-vcc-sysin { + compatible = "regulator-fixed"; + regulator-name = "vcc_sysin"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + vin-supply = <&vbus_typec>; + }; + + vcca: regulator-vcca { + compatible = "regulator-fixed"; + regulator-name = "vcca"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <4000000>; + regulator-max-microvolt = <4000000>; + vin-supply = <&vcc_sysin>; + }; +}; + +&combphy0_ps { + status = "okay"; +}; + +&combphy2_psu { + status = "okay"; +}; + +&cpu_b0 { + cpu-supply = <&vdd_cpu_big0_s0>; +}; + +&cpu_b1 { + cpu-supply = <&vdd_cpu_big0_s0>; +}; + +&cpu_b2 { + cpu-supply = <&vdd_cpu_big1_s0>; +}; + +&cpu_b3 { + cpu-supply = <&vdd_cpu_big1_s0>; +}; + +&cpu_l0 { + cpu-supply = <&vdd_cpu_lit_s0>; +}; + +&cpu_l1 { + cpu-supply = <&vdd_cpu_lit_s0>; +}; + +&cpu_l2 { + cpu-supply = <&vdd_cpu_lit_s0>; +}; + +&cpu_l3 { + cpu-supply = <&vdd_cpu_lit_s0>; +}; + +&i2c0 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c0m2_xfer>; + status = "okay"; + + vdd_cpu_big0_s0: regulator@42 { + compatible = "rockchip,rk8602"; + reg = <0x42>; + fcs,suspend-voltage-selector = <1>; + regulator-name = "vdd_cpu_big0_s0"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <550000>; + regulator-max-microvolt = <1050000>; + regulator-ramp-delay = <2300>; + vin-supply = <&vcc_sysin>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vdd_cpu_big1_s0: regulator@43 { + compatible = "rockchip,rk8603", "rockchip,rk8602"; + reg = <0x43>; + fcs,suspend-voltage-selector = <1>; + regulator-name = "vdd_cpu_big1_s0"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <550000>; + regulator-max-microvolt = <1050000>; + regulator-ramp-delay = <2300>; + vin-supply = <&vcc_sysin>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + eeprom@50 { + compatible = "belling,bl24c16a", "atmel,24c16"; + reg = <0x50>; + pagesize = <16>; + vcc-supply = <&vcc_3v3_pmu>; + }; +}; + +&i2c2 { + status = "okay"; + + vdd_npu_s0: regulator@42 { + compatible = "rockchip,rk8602"; + reg = <0x42>; + fcs,suspend-voltage-selector = <1>; + regulator-name = "vdd_npu_s0"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <550000>; + regulator-max-microvolt = <950000>; + regulator-ramp-delay = <2300>; + vin-supply = <&vcc_sysin>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; +}; + +&pcie2x1l1 { + pinctrl-names = "default"; + pinctrl-0 = <&pcie20x1_1_perstn_m1>, + <&pcie30x1m1_1_clkreqn>, + <&pcie30x1m1_1_waken>; + reset-gpios = <&gpio4 RK_PA2 GPIO_ACTIVE_HIGH>; + vpcie3v3-supply = <&vcc_3v3_s3>; + status = "okay"; +}; + +&pcie2x1l2 { + pinctrl-names = "default"; + pinctrl-0 = <&pcie20x1_2_perstn_m0>, + <&pcie20x1m0_clkreqn>, + <&pcie20x1m0_waken>; + reset-gpios = <&gpio3 RK_PD1 GPIO_ACTIVE_HIGH>; + vpcie3v3-supply = <&vcc_3v3_s3>; + status = "okay"; +}; + +&pinctrl { + keys { + btn_user: btn-user { + rockchip,pins = <4 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + + leds { + led_pin: led-pin { + rockchip,pins = <3 RK_PC4 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + + pcie { + pcie20x1_1_perstn_m1: pcie20x1-1-perstn-m1 { + rockchip,pins = <4 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + pcie20x1_2_perstn_m0: pcie20x1-2-perstn-m0 { + rockchip,pins = <3 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + + usb { + usb_otg_pwren_h: usb-otg-pwren-h { + rockchip,pins = <0 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + + vcc-5v0 { + vcc_5v0_pwren_h: vcc-5v0-pwren-h { + rockchip,pins = <4 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; +}; + +&pwm11 { + pinctrl-names = "default"; + pinctrl-0 = <&pwm11m1_pins>; + status = "okay"; +}; + +&pwm14 { + pinctrl-names = "default"; + pinctrl-0 = <&pwm14m1_pins>; + status = "okay"; +}; + +&saradc { + vref-supply = <&vcca_1v8_s0>; + status = "okay"; +}; + +&sdhci { + bus-width = <8>; + cap-mmc-highspeed; + mmc-hs400-1_8v; + mmc-hs400-enhanced-strobe; + no-sd; + no-sdio; + non-removable; + vmmc-supply = <&vcc_3v3_s0>; + vqmmc-supply = <&vcc_1v8_s3>; + status = "okay"; +}; + +&sdmmc { + bus-width = <4>; + cap-mmc-highspeed; + cap-sd-highspeed; + cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>; + disable-wp; + no-sdio; + sd-uhs-sdr104; + vmmc-supply = <&vcc_3v3_s3>; + vqmmc-supply = <&vccio_sd_s0>; + status = "okay"; +}; + +&spi2 { + status = "okay"; + assigned-clocks = <&cru CLK_SPI2>; + assigned-clock-rates = <200000000>; + num-cs = <1>; + pinctrl-names = "default"; + pinctrl-0 = <&spi2m2_cs0 &spi2m2_pins>; + + pmic@0 { + compatible = "rockchip,rk806"; + reg = <0>; + gpio-controller; + #gpio-cells = <2>; + interrupt-parent = <&gpio0>; + interrupts = <7 IRQ_TYPE_LEVEL_LOW>; + pinctrl-names = "default"; + pinctrl-0 = <&pmic_pins>, <&rk806_dvs1_null>, + <&rk806_dvs2_null>, <&rk806_dvs3_null>; + spi-max-frequency = <1000000>; + system-power-controller; + + vcc1-supply = <&vcc_sysin>; + vcc2-supply = <&vcc_sysin>; + vcc3-supply = <&vcc_sysin>; + vcc4-supply = <&vcc_sysin>; + vcc5-supply = <&vcc_sysin>; + vcc6-supply = <&vcc_sysin>; + vcc7-supply = <&vcc_sysin>; + vcc8-supply = <&vcc_sysin>; + vcc9-supply = <&vcc_sysin>; + vcc10-supply = <&vcc_sysin>; + vcc11-supply = <&vcc_2v0_pldo_s3>; + vcc12-supply = <&vcc_sysin>; + vcc13-supply = <&vcc_1v1_nldo_s3>; + vcc14-supply = <&vcc_1v1_nldo_s3>; + vcca-supply = <&vcca>; + + rk806_dvs1_null: dvs1-null-pins { + pins = "gpio_pwrctrl1"; + function = "pin_fun0"; + }; + + rk806_dvs2_null: dvs2-null-pins { + pins = "gpio_pwrctrl2"; + function = "pin_fun0"; + }; + + rk806_dvs3_null: dvs3-null-pins { + pins = "gpio_pwrctrl3"; + function = "pin_fun0"; + }; + + regulators { + vdd_gpu_s0: dcdc-reg1 { + regulator-name = "vdd_gpu_s0"; + regulator-boot-on; + regulator-min-microvolt = <550000>; + regulator-max-microvolt = <950000>; + regulator-ramp-delay = <12500>; + regulator-enable-ramp-delay = <400>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vdd_cpu_lit_s0: dcdc-reg2 { + regulator-name = "vdd_cpu_lit_s0"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <550000>; + regulator-max-microvolt = <950000>; + regulator-ramp-delay = <12500>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vdd_logic_s0: dcdc-reg3 { + regulator-name = "vdd_logic_s0"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <675000>; + regulator-max-microvolt = <750000>; + regulator-ramp-delay = <12500>; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <750000>; + }; + }; + + vdd_vdenc_s0: dcdc-reg4 { + regulator-name = "vdd_vdenc_s0"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <550000>; + regulator-max-microvolt = <950000>; + regulator-ramp-delay = <12500>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vdd_ddr_s0: dcdc-reg5 { + regulator-name = "vdd_ddr_s0"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <675000>; + regulator-max-microvolt = <900000>; + regulator-ramp-delay = <12500>; + + regulator-state-mem { + regulator-off-in-suspend; + regulator-suspend-microvolt = <850000>; + }; + }; + + vdd2_ddr_s3: dcdc-reg6 { + regulator-name = "vdd2_ddr_s3"; + regulator-always-on; + regulator-boot-on; + + regulator-state-mem { + regulator-on-in-suspend; + }; + }; + + vcc_2v0_pldo_s3: dcdc-reg7 { + regulator-name = "vcc_2v0_pldo_s3"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <2000000>; + regulator-max-microvolt = <2000000>; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <2000000>; + }; + }; + + vcc_3v3_s3: dcdc-reg8 { + regulator-name = "vcc_3v3_s3"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <3300000>; + }; + }; + + vddq_ddr_s0: dcdc-reg9 { + regulator-name = "vddq_ddr_s0"; + regulator-always-on; + regulator-boot-on; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vcc_1v8_s3: dcdc-reg10 { + regulator-name = "vcc_1v8_s3"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <1800000>; + }; + }; + + vcc_1v8_s0: pldo-reg1 { + regulator-name = "vcc_1v8_s0"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <1800000>; + }; + }; + + vcca_1v8_s0: pldo-reg2 { + regulator-name = "vcca_1v8_s0"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <1800000>; + }; + }; + + vdda_1v2_s0: pldo-reg3 { + regulator-name = "vdda_1v2_s0"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vcca_3v3_s0: pldo-reg4 { + regulator-name = "vcca_3v3_s0"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <3300000>; + }; + }; + + vccio_sd_s0: pldo-reg5 { + regulator-name = "vccio_sd_s0"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + pldo6_s3: pldo-reg6 { + regulator-name = "pldo6_s3"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <1800000>; + }; + }; + + vdd_0v75_s3: nldo-reg1 { + regulator-name = "vdd_0v75_s3"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <750000>; + regulator-max-microvolt = <750000>; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <750000>; + }; + }; + + vdda_ddr_pll_s0: nldo-reg2 { + regulator-name = "vdda_ddr_pll_s0"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <850000>; + regulator-max-microvolt = <850000>; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <850000>; + }; + }; + + vdda_0v75_s0: nldo-reg3 { + regulator-name = "vdda_0v75_s0"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <750000>; + regulator-max-microvolt = <750000>; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <750000>; + }; + }; + + vdda_0v85_s0: nldo-reg4 { + regulator-name = "vdda_0v85_s0"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <850000>; + regulator-max-microvolt = <850000>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vdd_0v75_s0: nldo-reg5 { + regulator-name = "vdd_0v75_s0"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <750000>; + regulator-max-microvolt = <750000>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + }; + }; +}; + +&tsadc { + status = "okay"; +}; + +&u2phy0 { + status = "okay"; +}; + +&u2phy0_otg { + phy-supply = <&vcc5v0_usb_otg0>; + status = "okay"; +}; + +&uart2 { + pinctrl-0 = <&uart2m0_xfer>; + status = "okay"; +}; + +&usb_host0_xhci { + dr_mode = "host"; + status = "okay"; +}; + +&usbdp_phy0 { + status = "okay"; +};
Marc Zyngier
maintainerRe: [PATCH 3/3] arm64: dts: rockchip: Add Radxa E52C
In reply to FUKAUMI NaokiQuoted 5 lines · FUKAUMI Naoki
Radxa E52C is a compact network computer[1] based on the Rockchip RK3582 SoC:
- Dual Cortex-A76 and quad Cortex-A55 CPU
So you have *two* big cores.
Quoted 17 lines
- 5TOPS NPU
- 2GB/4GB/8GB LPDDR4 RAM
- 16GB/32GB/64GB on-board eMMC
- microSD card slot
- USB 3.0 Type-A HOST port
- USB Type-C debug port
- USB Type-C power port (5V only)
- 2x 2.5GbE ports[1] https://radxa.com/products/network-computer/e52c
Signed-off-by FUKAUMI Naoki <[email protected]>--- arch/arm64/boot/dts/rockchip/Makefile | 1 + .../boot/dts/rockchip/rk3582-radxa-e52c.dts | 729 ++++++++++++++++++ 2 files changed, 730 insertions(+) create mode 100644 arch/arm64/boot/dts/rockchip/rk3582-radxa-e52c.dts
[...]
Quoted 5 lines
+&cpu_b0 {
arch/arm64/boot/dts/rockchip/rk3582-radxa-e52c.dts new file +4
-0+ cpu-supply = <&vdd_cpu_big0_s0>; +}; + +&cpu_b1 {
arch/arm64/boot/dts/rockchip/rk3582-radxa-e52c.dts line 198
Quoted 10 lines
arch/arm64/boot/dts/rockchip/rk3582-radxa-e52c.dts new file +10
-0+ cpu-supply = <&vdd_cpu_big0_s0>; +}; + +&cpu_b2 { + cpu-supply = <&vdd_cpu_big1_s0>; +}; + +&cpu_b3 { + cpu-supply = <&vdd_cpu_big1_s0>; +};
And yet you configure 4. If your HW only has 2 A76s, surely something should remove these cores for this platform rather than keep them around.
Thanks,
M.
Signature · 1 line
Without deviation from the norm, progress is not possible.
Re: [PATCH 3/3] arm64: dts: rockchip: Add Radxa E52C
Hello Marc,
Quoted 42 lines · Marc Zyngier
Quoted 5 lines · FUKAUMI Naoki
Radxa E52C is a compact network computer[1] based on the Rockchip RK3582 SoC:
- Dual Cortex-A76 and quad Cortex-A55 CPU
So you have *two* big cores.
Quoted 18 lines
- 5TOPS NPU
- 2GB/4GB/8GB LPDDR4 RAM
- 16GB/32GB/64GB on-board eMMC
- microSD card slot
- USB 3.0 Type-A HOST port
- USB Type-C debug port
- USB Type-C power port (5V only)
- 2x 2.5GbE ports[1] https://radxa.com/products/network-computer/e52c
Signed-off-by FUKAUMI Naoki <[email protected]>--- arch/arm64/boot/dts/rockchip/Makefile | 1 + .../boot/dts/rockchip/rk3582-radxa-e52c.dts | 729 ++++++++++++++++++ 2 files changed, 730 insertions(+) create mode 100644 arch/arm64/boot/dts/rockchip/rk3582-radxa-e52c.dts[...]
Quoted 11 lines
+&cpu_b0 {
arch/arm64/boot/dts/rockchip/rk3582-radxa-e52c.dts new file +10
-0+ cpu-supply = <&vdd_cpu_big0_s0>; +}; + +&cpu_b1 { + cpu-supply = <&vdd_cpu_big0_s0>; +}; + +&cpu_b2 { + cpu-supply = <&vdd_cpu_big1_s0>; +};
Quoted 8 lines
arch/arm64/boot/dts/rockchip/rk3582-radxa-e52c.dts line 198
Quoted 4 lines
arch/arm64/boot/dts/rockchip/rk3582-radxa-e52c.dts new file +4
-0+ +&cpu_b3 { + cpu-supply = <&vdd_cpu_big1_s0>; +};And yet you configure 4. If your HW only has 2 A76s, surely something should remove these cores for this platform rather than keep them around.
Indeed, U-Boot will do that, based on the efuses that contain the data required to determine which CPU cores (and/or clusters) are defective and need to be marked as disabled.
Maybe we should add a comment block above the "cpu_b0" node, to describe that a bit better. Perhaps something like this:
/*
* In the Rockchip RK3582 SoC, some CPU cores end up disabled
* and unused because they're marked in the efuses as defective.
* The disabling in the DT is performed by the boot loader. */
Re: [PATCH 3/3] arm64: dts: rockchip: Add Radxa E52C
In reply to Marc ZyngierHi Marc,
Quoted 41 lines · Marc Zyngier
Quoted 5 lines · FUKAUMI Naoki
Radxa E52C is a compact network computer[1] based on the Rockchip RK3582 SoC:
- Dual Cortex-A76 and quad Cortex-A55 CPU
So you have *two* big cores.
Quoted 17 lines
- 5TOPS NPU
- 2GB/4GB/8GB LPDDR4 RAM
- 16GB/32GB/64GB on-board eMMC
- microSD card slot
- USB 3.0 Type-A HOST port
- USB Type-C debug port
- USB Type-C power port (5V only)
- 2x 2.5GbE ports[1] https://radxa.com/products/network-computer/e52c
Signed-off-by FUKAUMI Naoki <[email protected]>--- arch/arm64/boot/dts/rockchip/Makefile | 1 + .../boot/dts/rockchip/rk3582-radxa-e52c.dts | 729 ++++++++++++++++++ 2 files changed, 730 insertions(+)create mode 100644
arch/arm64/boot/dts/rockchip/rk3582-radxa-e52c.dts[...]
Quoted 11 lines
+&cpu_b0 {
arch/arm64/boot/dts/rockchip/rk3582-radxa-e52c.dts new file +10
-0+ cpu-supply = <&vdd_cpu_big0_s0>; +}; + +&cpu_b1 { + cpu-supply = <&vdd_cpu_big0_s0>; +}; + +&cpu_b2 { + cpu-supply = <&vdd_cpu_big1_s0>; +};
Quoted 8 lines
arch/arm64/boot/dts/rockchip/rk3582-radxa-e52c.dts line 198
Quoted 4 lines
arch/arm64/boot/dts/rockchip/rk3582-radxa-e52c.dts new file +4
-0+ +&cpu_b3 { + cpu-supply = <&vdd_cpu_big1_s0>; +};And yet you configure 4. If your HW only has 2 A76s, surely something should remove these cores for this platform rather than keep them around.
One of the four cores may be defective. This information is stored in the OTP, so we need to run our software to detect which core is defective. Then we disable the cluster that contains the defective core.
please refer
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
Best regards,
--
FUKAUMI Naoki
Radxa Computer (Shenzhen) Co., Ltd.
Quoted 4 lines
Thanks,
M.
Marc Zyngier
maintainerRe: [PATCH 3/3] arm64: dts: rockchip: Add Radxa E52C
Quoted 54 lines · FUKAUMI Naoki
Hi Marc,
Quoted 41 lines · Marc Zyngier
Quoted 5 lines · FUKAUMI Naoki
Radxa E52C is a compact network computer[1] based on the Rockchip RK3582 SoC:
- Dual Cortex-A76 and quad Cortex-A55 CPU
So you have *two* big cores.
Quoted 17 lines
- 5TOPS NPU
- 2GB/4GB/8GB LPDDR4 RAM
- 16GB/32GB/64GB on-board eMMC
- microSD card slot
- USB 3.0 Type-A HOST port
- USB Type-C debug port
- USB Type-C power port (5V only)
- 2x 2.5GbE ports[1] https://radxa.com/products/network-computer/e52c
Signed-off-by FUKAUMI Naoki <[email protected]>--- arch/arm64/boot/dts/rockchip/Makefile | 1 + .../boot/dts/rockchip/rk3582-radxa-e52c.dts | 729 ++++++++++++++++++ 2 files changed, 730 insertions(+)create mode 100644
arch/arm64/boot/dts/rockchip/rk3582-radxa-e52c.dts[...]
Quoted 11 lines
+&cpu_b0 {
arch/arm64/boot/dts/rockchip/rk3582-radxa-e52c.dts new file +10
-0+ cpu-supply = <&vdd_cpu_big0_s0>; +}; + +&cpu_b1 { + cpu-supply = <&vdd_cpu_big0_s0>; +}; + +&cpu_b2 { + cpu-supply = <&vdd_cpu_big1_s0>; +};Quoted 8 lines
arch/arm64/boot/dts/rockchip/rk3582-radxa-e52c.dts line 198
Quoted 4 lines
arch/arm64/boot/dts/rockchip/rk3582-radxa-e52c.dts new file +4
-0+ +&cpu_b3 { + cpu-supply = <&vdd_cpu_big1_s0>; +};And yet you configure 4. If your HW only has 2 A76s, surely something should remove these cores for this platform rather than keep them around.
Quoted 4 lines
One of the four cores may be defective. This information is stored in the OTP, so we need to run our software to detect which core is defective. Then we disable the cluster that contains the defective core.
Is it one? Is it two? If anything, this sort of binning information should be clearly explained in the cover letter, and a comment placed in the DTS file to explain that the DT needs to be further processed by the bootloader to be valid.
M.
Signature · 1 line
Without deviation from the norm, progress is not possible.
Rob Herring (Arm)
maintainerQuoted 22 lines · FUKAUMI Naoki
Rockchip RK3582 is a scaled down version of Rockchip RK3588(S).
- Dual Cortex-A76 and quad Cortex-A55 CPU
- No GPU
- 5TOPS NPU
- H.264/H.265 video encoder up to 4K@60fpsThis patch series adds RK3582 support to the GIC and the Radxa E52C compact network computer.
FUKAUMI Naoki (3):
irqchip/gic-v3: Enable Rockchip 3588001 erratum workaround for RK3582
dt-bindings: arm: rockchip: Add Radxa E52C
arm64: dts: rockchip: Add Radxa E52C.../devicetree/bindings/arm/rockchip.yaml | 5 + arch/arm64/boot/dts/rockchip/Makefile | 1 + .../boot/dts/rockchip/rk3582-radxa-e52c.dts | 729 ++++++++++++++++++ drivers/irqchip/irq-gic-v3-its.c | 3 +- 4 files changed, 737 insertions(+), 1 deletion(-) create mode 100644 arch/arm64/boot/dts/rockchip/rk3582-radxa-e52c.dts
Quoted 5 lines
--
2.43.0
My bot found new DTB warnings on the .dts files added or changed in this series.
Some warnings may be from an existing SoC .dtsi. Or perhaps the warnings are fixed by another series. Ultimately, it is up to the platform maintainer whether these warnings are acceptable or not. No need to reply unless the platform maintainer has comments.
If you already ran DT checks and didn't see these error(s), then make sure dt-schema is up to date:
pip3 install dtschema --upgrade
New warnings running 'make CHECK_DTBS=y rockchip/rk3582-radxa-e52c.dtb' for [email protected]:
arch/arm64/boot/dts/rockchip/rk3582-radxa-e52c.dtb: adc-keys: 'key-vendor' does not match any of the regexes: '^button-', 'pinctrl-[0-9]+'
from schema $id: http://devicetree.org/schemas/input/adc-keys.yaml#arch/arm64/boot/dts/rockchip/rk3582-radxa-e52c.dtb: pwm-leds: led-1:linux,default-trigger: 'oneOf' conditional failed, one must be fixed:
'r8169-4-4100:00:link' is not one of ['backlight', 'default-on', 'heartbeat', 'disk-activity', 'disk-read', 'disk-write', 'timer', 'pattern', 'audio-micmute', 'audio-mute', 'bluetooth-power', 'flash', 'kbd-capslock', 'mtd', 'nand-disk', 'netdev', 'none', 'rc-feedback', 'torch', 'usb-gadget', 'usb-host', 'usbport'] 'r8169-4-4100:00:link' does not match '^cpu[0-9]*$' 'r8169-4-4100:00:link' does not match '^hci[0-9]+-power$' 'r8169-4-4100:00:link' does not match '^mmc[0-9]+$' 'r8169-4-4100:00:link' does not match '^phy[0-9]+tx$' from schema $id: http://devicetree.org/schemas/leds/leds-pwm.yaml# arch/arm64/boot/dts/rockchip/rk3582-radxa-e52c.dtb: pwm-leds: led-1: Unevaluated properties are not allowed ('linux,default-trigger' was unexpected) from schema $id: http://devicetree.org/schemas/leds/leds-pwm.yaml# arch/arm64/boot/dts/rockchip/rk3582-radxa-e52c.dtb: pwm-leds: led-2:linux,default-trigger: 'oneOf' conditional failed, one must be fixed: 'r8169-3-3100:00:link' is not one of ['backlight', 'default-on', 'heartbeat', 'disk-activity', 'disk-read', 'disk-write', 'timer', 'pattern', 'audio-micmute', 'audio-mute', 'bluetooth-power', 'flash', 'kbd-capslock', 'mtd', 'nand-disk', 'netdev', 'none', 'rc-feedback', 'torch', 'usb-gadget', 'usb-host', 'usbport'] 'r8169-3-3100:00:link' does not match '^cpu[0-9]*$' 'r8169-3-3100:00:link' does not match '^hci[0-9]+-power$' 'r8169-3-3100:00:link' does not match '^mmc[0-9]+$' 'r8169-3-3100:00:link' does not match '^phy[0-9]+tx$' from schema $id: http://devicetree.org/schemas/leds/leds-pwm.yaml#
arch/arm64/boot/dts/rockchip/rk3582-radxa-e52c.dtb: pwm-leds: led-2: Unevaluated properties are not allowed ('linux,default-trigger' was unexpected)
from schema $id: http://devicetree.org/schemas/leds/leds-pwm.yaml#