Fix and improve Rockchip RK3128 support
Subsystems (8)
cover Fix and improve Rockchip RK3128 support
Hi list,
this series fixes some issues I found when testing my "new" RK3128 board with the mainline kernel and adds some core functionality like SMP bringup, usb and networking.
The propably most distinctive change is the split up of the DTs for the different SoCs of this platform: RK3126 and RK3128. Even if I'm not adding a RK3126 board in this series: I think this change should be done as early as possible in order to avoid issues in future.
Actually it should have been done like that in the first place.
All patches have been tested on both SoCs:
Patch 01-04 are dt-bindings additions for this SoC platform and the new board I'm addding here
Patch 05-07 are some clock driver fixes (there is more to do, but I'm limiting it to the things which can work now)
Patch 08 and 09 adding support for the usb 2 phy found in RK312x platform to the Rockchip Innosilicon usb phy driver.
Patch 10-14 are DT patches which I did in the "old" rk3128.dtsi in order to be backportable.
Patch 15 does the aforementioned split-up of the current rk3128.dtsi in rk312x.dtsi, rk3126.dtsi and rk3128.dtsi
Patch 16-20 adds SMP bringup and cpu frequency scaling
Patch 21-23 adds power controller, GPU and I2S nodes to the RK312x DT
Patch 24-26 adds the second I2S, S/PDIF and gmac nodes to the RK3128 DT
Patch 27-30 adds fixes for the usb controllers and adds a missing pincontrol for the sd card detection
Patch 31 finnaly adds a DT for Genatech XPI-3128 board
There are quite some HW blocks which can easily be added for this platform, but I guess this series is pretty huge already, so that it is limited to some core devices for now.
I hope the single patches are small enough, that reviewing won't be a burden ;)
The plan is to sync the DT changes to u-boot after they are merged where I'm planning to add "full" TPL/SPL for this platform (dram controller/phy driver is currently missing)
I'm planing the add a RK3126 (tablet) board here as well, but I will have to add support for RK816 pmic first.
Alex Bee (29):
dt-bindings: mfd: syscon: Add rockchip,rk3128-qos compatible
dt-bindings: gpu: mali-utgard: Add Rockchip RK3128 compatible
dt-bindings: ASoC: rockchip: Add compatible for RK3128 spdif
dt-bindings: arm: rockchip: Add Geniatech XPI-3128
clk: rockchip: rk3128: Fix SCLK_SDMMC's clock name
phy: rockchip-inno-usb2: Split ID interrupt phy registers
phy: phy-rockchip-inno-usb2: Add RK3128 support
ARM: dts: rockchip: Fix i2c0 register address for RK3128
ARM: dts: rockchip: Add missing arm timer interrupt for RK3128
ARM: dts: rockchip: Add missing quirk for RK3128's dma engine
ARM: dts: rockchip: Fix timer clocks for RK3128
ARM: dts: rockchip: Disable non-required timers for RK3128
ARM: dts: rockchip: Split RK3128 devictree for RK312x SoC family
ARM: dts: rockchip: Add SRAM node for RK312x
ARM: dts: rockchip: Add CPU resets for RK312x
ARM: dts: rockchip: Enable SMP bringup for RK312x
ARM: dts: rockchip: Switch to operating-points-v2 for RK312x's CPU
ARM: dts: rockchip: Add extra CPU voltages for RK3126
ARM: dts: rockchip: add power controller for RK312x
ARM: dts: rockchip: Add GPU node for RK312x
ARM: dts: rockchip: Add 2-channel I2S for RK312x
ARM: dts: rockchip: Add 8-channel I2S for RK3128
ARM: dts: rockchip: Add spdif for RK3128
ARM: dts: rockchip: Add gmac for RK3128
ARM: dts: rockchip: Add dwc2 otg fifo siztes for RK312x
ARM: dts: rockchip: Add USB host clocks for RK312x
ARM: dts: rockchip: Make usbphy the parent of SCLK_USB480M for RK312x
ARM: dts: rockchip: Add sdmmc_det pinctrl for RK312x
ARM: dts: Add Geniatech XPI-3128 RK3128 board
Finley Xiao (2):
clk: rockchip: rk3128: Fix aclk_peri_src parent
clk: rockchip: rk3128: Fix hclk_otg gate
.../devicetree/bindings/arm/rockchip.yaml | 5 + .../bindings/gpu/arm,mali-utgard.yaml | 1 + .../devicetree/bindings/mfd/syscon.yaml | 1 + .../bindings/sound/rockchip-spdif.yaml | 1 + arch/arm/boot/dts/rockchip/Makefile | 1 + arch/arm/boot/dts/rockchip/rk3126.dtsi | 36 + .../arm/boot/dts/rockchip/rk3128-xpi-3128.dts | 431 +++++++ arch/arm/boot/dts/rockchip/rk3128.dtsi | 920 +------------- arch/arm/boot/dts/rockchip/rk312x.dtsi | 1101 +++++++++++++++++ drivers/clk/rockchip/clk-rk3128.c | 24 +- drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 147 ++- 11 files changed, 1754 insertions(+), 914 deletions(-) create mode 100644 arch/arm/boot/dts/rockchip/rk3126.dtsi create mode 100644 arch/arm/boot/dts/rockchip/rk3128-xpi-3128.dts create mode 100644 arch/arm/boot/dts/rockchip/rk312x.dtsi
base-commit: 2dde18cd1d8fac735875f2e4987f11817cc0bc2c
Signature · 1 line
2.42.0
PATCH 1/31 dt-bindings: mfd: syscon: Add rockchip,rk3128-qos compatible
Document Rockchip RK3128 SoC compatible for qos registers.
--- Documentation/devicetree/bindings/mfd/syscon.yaml | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/mfd/syscon.yaml +1 -0
@@ -61,6 +61,7 @@ properties: - rockchip,px30-qos - rockchip,rk3036-qos - rockchip,rk3066-qos + - rockchip,rk3128-qos - rockchip,rk3228-qos - rockchip,rk3288-qos - rockchip,rk3368-qos
Signature · 7 lines
2.42.0 -- linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy
Re: [PATCH 01/31] dt-bindings: mfd: syscon: Add rockchip,rk3128-qos compatible
Quoted 5 lines · Alex Bee
Document Rockchip RK3128 SoC compatible for qos registers.
Signed-off-by Alex Bee <[email protected]>--- Documentation/devicetree/bindings/mfd/syscon.yaml | 1 +
You should probably split patches per subsystem, if you want it to get applied.
Best regards,
Krzysztof
Re: (subset) [PATCH 01/31] dt-bindings: mfd: syscon: Add rockchip,rk3128-qos compatible
In reply to Alex BeeQuoted 3 lines · Alex Bee
Document Rockchip RK3128 SoC compatible for qos registers.
Applied, thanks!
[01/31] dt-bindings: mfd: syscon: Add rockchip,rk3128-qos compatible
commit: 4c57b25b09932acf81ead78bd32019fc5d0ea913
--
Lee Jones [李琼斯]
PATCH 2/31 dt-bindings: gpu: mali-utgard: Add Rockchip RK3128 compatible
In reply to Alex BeeRockchip RK312x SoC family has a Mali400 MP2.
Add a compatible for it.
--- Documentation/devicetree/bindings/gpu/arm,mali-utgard.yaml | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/gpu/arm,mali-utgard.yaml +1 -0
@@ -29,6 +29,7 @@ properties: - allwinner,sun50i-a64-mali - rockchip,rk3036-mali - rockchip,rk3066-mali + - rockchip,rk3128-mali - rockchip,rk3188-mali - rockchip,rk3228-mali - samsung,exynos4210-mali
Signature · 7 lines
2.42.0 -- linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy
Re: [PATCH 02/31] dt-bindings: gpu: mali-utgard: Add Rockchip RK3128 compatible
Quoted 5 lines · Alex Bee
Rockchip RK312x SoC family has a Mali400 MP2.
Add a compatible for it.Signed-off-by Alex Bee <[email protected]>---
Best regards,
Krzysztof
PATCH 3/31 dt-bindings: ASoC: rockchip: Add compatible for RK3128 spdif
In reply to Alex BeeAdd compatible for RK3128's S/PDIF.
--- Documentation/devicetree/bindings/sound/rockchip-spdif.yaml | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/sound/rockchip-spdif.yaml +1 -0
@@ -26,6 +26,7 @@ properties: - const: rockchip,rk3568-spdif - items: - enum: + - rockchip,rk3128-spdif - rockchip,rk3188-spdif - rockchip,rk3288-spdif - rockchip,rk3308-spdif
Signature · 1 line
2.42.0
Re: [PATCH 03/31] dt-bindings: ASoC: rockchip: Add compatible for RK3128 spdif
Quoted 2 lines · Alex Bee
Add compatible for RK3128's S/PDIF.
Subject: ASoC: dt-bindings: rockchip,spdif:
Quoted 2 lines
Signed-off-by Alex Bee <[email protected]>---
---
This is an automated instruction, just in case, because many review tags are being ignored. If you know the process, you can skip it (please do not feel offended by me posting it here - no bad intentions intended). If you do not know the process, here is a short explanation:
Please add Acked-by/Reviewed-by/Tested-by tags when posting new versions, under or above your Signed-off-by tag. Tag is "received", when provided in a message replied to you on the mailing list. Tools like b4 can help here. However, there's no need to repost patches *only* to add the tags. The upstream maintainer will do that for tags received on the version they apply.
https://elixir.bootlin.com/linux/v6.5-rc3/source/Documentation/process/submitting-patches.rst#L577
Best regards,
Krzysztof
PATCH 4/31 dt-bindings: arm: rockchip: Add Geniatech XPI-3128
In reply to Alex BeeAdd Geniatech XPI-3128, a RK3128 based single board computer.
--- Documentation/devicetree/bindings/arm/rockchip.yaml | 5 +++++ 1 file changed, 5 insertions(+)
Documentation/devicetree/bindings/arm/rockchip.yaml +5 -0
@@ -227,6 +227,11 @@ properties: - const: geekbuying,geekbox - const: rockchip,rk3368 + - description: Geniatech XPI-3128 + items: + - const: geniatech,xpi-3128 + - const: rockchip,rk3128 + - description: Google Bob (Asus Chromebook Flip C101PA) items: - const: google,bob-rev13
Signature · 1 line
2.42.0
Re: [PATCH 04/31] dt-bindings: arm: rockchip: Add Geniatech XPI-3128
Quoted 6 lines · Alex Bee
Add Geniatech XPI-3128, a RK3128 based single board computer.
Signed-off-by Alex Bee <[email protected]>--- Documentation/devicetree/bindings/arm/rockchip.yaml | 5 +++++ 1 file changed, 5 insertions(+)
Best regards,
Krzysztof
Signature · 3 lines
linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy
PATCH 5/31 clk: rockchip: rk3128: Fix aclk_peri_src parent
In reply to Alex BeeFrom: Finley Xiao <[email protected]>
According to the TRM there are no specific cpll_peri, gpll_div2_peri or gpll_div3_peri gates, but a single clk_peri_src gate and the peri mux directly connects to the plls respectivly the pll divider clocks. Fix this by creating a single gated composite.
Also rename all occurrences of "aclk_peri_src*" to clk_peri_src, since it is the parent for both peri aclks and hclks and that also matches the naming in the TRM.
--- drivers/clk/rockchip/clk-rk3128.c | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-)
drivers/clk/rockchip/clk-rk3128.c +7 -13
@@ -138,7 +138,7 @@ PNAME(mux_pll_src_5plls_p) = { "cpll", "gpll", "gpll_div2", "gpll_div3", "usb480PNAME (mux_pll_src_4plls_p) = {"cpll" ,"gpll" ,"gpll_div2" ,"usb480m" };PNAME (mux_pll_src_3plls_p) = {"cpll" ,"gpll" ,"gpll_div2" }; -PNAME (mux_aclk_peri_src_p) = {"gpll_peri" ,"cpll_peri" ,"gpll_div2_peri" ,"gpll_div3_peri" }; +PNAME (mux_clk_peri_src_p) = {"gpll" ,"cpll" ,"gpll_div2" ,"gpll_div3" };PNAME (mux_mmc_src_p) = {"cpll" ,"gpll" ,"gpll_div2" ,"xin24m" };PNAME (mux_clk_cif_out_src_p) = {"clk_cif_src" ,"xin24m" };PNAME (mux_sclk_vop_src_p) = {"cpll" ,"gpll" ,"gpll_div2" ,"gpll_div3" };
@@ -275,23 +275,17 @@ static struct rockchip_clk_branch common_clk_branches[] __initdata = { RK2928_CLKGATE_CON(0), 11, GFLAGS),/* PD_PERI */ -GATE (0 ,"gpll_peri" ,"gpll" ,CLK_IGNORE_UNUSED , +COMPOSITE (0 ,"clk_peri_src" , mux_clk_peri_src_p,0 , +RK2928_CLKSEL_CON (10 ),14 ,2 ,MFLAGS ,0 ,5 ,DFLAGS ,RK2928_CLKGATE_CON (2 ),0 ,GFLAGS ), -GATE (0 ,"cpll_peri" ,"cpll" ,CLK_IGNORE_UNUSED , -RK2928_CLKGATE_CON (2 ),0 ,GFLAGS ), -GATE (0 ,"gpll_div2_peri" ,"gpll_div2" ,CLK_IGNORE_UNUSED , -RK2928_CLKGATE_CON (2 ),0 ,GFLAGS ), -GATE (0 ,"gpll_div3_peri" ,"gpll_div3" ,CLK_IGNORE_UNUSED , -RK2928_CLKGATE_CON (2 ),0 ,GFLAGS ), -COMPOSITE_NOGATE (0 ,"aclk_peri_src" , mux_aclk_peri_src_p,0 , -RK2928_CLKSEL_CON (10 ),14 ,2 ,MFLAGS ,0 ,5 ,DFLAGS ), -COMPOSITE_NOMUX (PCLK_PERI ,"pclk_peri" ,"aclk_peri_src" ,0 , + +COMPOSITE_NOMUX (PCLK_PERI ,"pclk_peri" ,"clk_peri_src" ,0 ,RK2928_CLKSEL_CON (10 ),12 ,2 ,DFLAGS |CLK_DIVIDER_POWER_OF_TWO ,RK2928_CLKGATE_CON (2 ),3 ,GFLAGS ), -COMPOSITE_NOMUX (HCLK_PERI ,"hclk_peri" ,"aclk_peri_src" ,0 , +COMPOSITE_NOMUX (HCLK_PERI ,"hclk_peri" ,"clk_peri_src" ,0 ,RK2928_CLKSEL_CON (10 ),8 ,2 ,DFLAGS |CLK_DIVIDER_POWER_OF_TWO ,RK2928_CLKGATE_CON (2 ),2 ,GFLAGS ), -GATE (ACLK_PERI ,"aclk_peri" ,"aclk_peri_src" ,0 , +GATE (ACLK_PERI ,"aclk_peri" ,"clk_peri_src" ,0 ,RK2928_CLKGATE_CON (2 ),1 ,GFLAGS ), GATE(SCLK_TIMER0, "sclk_timer0", "xin24m", 0,
Signature · 1 line
2.42.0
Re: [PATCH 05/31] clk: rockchip: rk3128: Fix aclk_peri_src parent
Quoted 7 lines · Alex Bee
From: Finley Xiao <[email protected]>
According to the TRM there are no specific
cpll_peri,gpll_div2_periorgpll_div3_perigates, but a singleclk_peri_srcgate and the peri mux directly connects to the plls respectivly the pll divider clocks. Fix this by creating a single gated composite.
Quoted 8 lines
Also rename all occurrences of "aclk_peri_src*" to
clk_peri_src, since it is the parent for both peri aclks and hclks and that also matches the naming in the TRM.Fixes f6022e88faca ("clk: rockchip: add clock controller for rk3128")Signed-off-by Finley Xiao <[email protected]>[renamed aclk_peri_src -> clk_peri_src and added commit message]Signed-off-by Alex Bee <[email protected]>
Please send fixes as separate patchset. Don't mix it with other work and definitely it should not be in the middle of the patchset.
Best regards,
Krzysztof
Re: [PATCH 05/31] clk: rockchip: rk3128: Fix aclk_peri_src parent
Hi Krzysztof,
thanks for your quick feedback.
You're right: This series mixes up too many things. I'll split up and re-send.
(And fix my typos, indeed)
Best Regards,
Alex
Am 29.08.23 um 19:40 schrieb Krzysztof Kozlowski:
Quoted 22 lines · Alex Bee
Quoted 7 lines
From: Finley Xiao <[email protected]>
According to the TRM there are no specific
cpll_peri,gpll_div2_periorgpll_div3_perigates, but a singleclk_peri_srcgate and the peri mux directly connects to the plls respectivly the pll divider clocks. Fix this by creating a single gated composite.Quoted 8 lines
Also rename all occurrences of "aclk_peri_src*" to
clk_peri_src, since it is the parent for both peri aclks and hclks and that also matches the naming in the TRM.Fixes f6022e88faca ("clk: rockchip: add clock controller for rk3128")Signed-off-by Finley Xiao <[email protected]>[renamed aclk_peri_src -> clk_peri_src and added commit message]Signed-off-by Alex Bee <[email protected]>Please send fixes as separate patchset. Don't mix it with other work and definitely it should not be in the middle of the patchset.
Best regards,
Krzysztof
PATCH 6/31 clk: rockchip: rk3128: Fix hclk_otg gate
In reply to Alex BeeFrom: Finley Xiao <[email protected]>
HCLK_OTG gate is located in CRU_CLKGATE5_CON, not in CRU_CLKGATE3_CON. CRU_CLKGATE3_CON bit 13 is already (correctly) defined for ACLK_GPU.
--- drivers/clk/rockchip/clk-rk3128.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/rockchip/clk-rk3128.c +1 -1
@@ -484,7 +484,7 @@ static struct rockchip_clk_branch common_clk_branches[] __initdata = {GATE (HCLK_I2S_2CH ,"hclk_i2s_2ch" ,"hclk_peri" ,0 ,RK2928_CLKGATE_CON (7 ),2 ,GFLAGS ),GATE (0 ,"hclk_usb_peri" ,"hclk_peri" ,CLK_IGNORE_UNUSED ,RK2928_CLKGATE_CON (9 ),13 ,GFLAGS ),GATE (HCLK_HOST2 ,"hclk_host2" ,"hclk_peri" ,0 ,RK2928_CLKGATE_CON (7 ),3 ,GFLAGS ), -GATE (HCLK_OTG ,"hclk_otg" ,"hclk_peri" ,0 ,RK2928_CLKGATE_CON (3 ),13 ,GFLAGS ), +GATE (HCLK_OTG ,"hclk_otg" ,"hclk_peri" ,0 ,RK2928_CLKGATE_CON (5 ),13 ,GFLAGS ),GATE (0 ,"hclk_peri_ahb" ,"hclk_peri" ,CLK_IGNORE_UNUSED ,RK2928_CLKGATE_CON (9 ),14 ,GFLAGS ),GATE (HCLK_SPDIF ,"hclk_spdif" ,"hclk_peri" ,0 ,RK2928_CLKGATE_CON (10 ),9 ,GFLAGS ), GATE(HCLK_TSP, "hclk_tsp", "hclk_peri", 0, RK2928_CLKGATE_CON(10), 12, GFLAGS),
Signature · 1 line
2.42.0
PATCH 7/31 clk: rockchip: rk3128: Fix SCLK_SDMMC's clock name
In reply to Alex BeeSCLK_SDMMC is the parent for SCLK_SDMMC_DRV and SCLK_SDMMC_SAMPLE, but used with the (more) correct name sclk_sdmmc. SD card tuning does currently fail as the parent can't be found under that name
There is no need to suffix the name with '0' since RK312x SoCs do have a single sdmmc controller - so rename it to the name which is already used by it's children.
--- drivers/clk/rockchip/clk-rk3128.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/rockchip/clk-rk3128.c +1 -1
@@ -310,7 +310,7 @@ static struct rockchip_clk_branch common_clk_branches[] __initdata = {GATE (SCLK_MIPI_24M ,"clk_mipi_24m" ,"xin24m" ,CLK_IGNORE_UNUSED ,RK2928_CLKGATE_CON (2 ),15 ,GFLAGS ), -COMPOSITE (SCLK_SDMMC ,"sclk_sdmmc0" , mux_mmc_src_p,0 , +COMPOSITE (SCLK_SDMMC ,"sclk_sdmmc" , mux_mmc_src_p,0 ,RK2928_CLKSEL_CON (11 ),6 ,2 ,MFLAGS ,0 ,6 ,DFLAGS , RK2928_CLKGATE_CON(2), 11, GFLAGS),
Signature · 1 line
2.42.0
PATCH 8/31 phy: rockchip-inno-usb2: Split ID interrupt phy registers
In reply to Alex BeeCommit 51a9b2c03dd3 ("phy: rockchip-inno-usb2: Handle ID IRQ") added ID detection interrupt registers. However the current implementation assumes that falling and rising edge interrupt are always enabled in registers spaning over subsequent bits.
That is not the case for RK312x's version of the phy and this implementation can't be used as-is, since there are bits with different purpose in between.
This splits up the register definitions for id_det_en, id_det_en and id_det_clr registers in rising and falling edge variants.
It's required as preparation to support RK312x's Innosilicon usb2 phy as well in this driver and matches pretty much to what the vendor does, so I'm not expecting issues for other SoCs with that change.
--- drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 99 +++++++++++++------ 1 file changed, 70 insertions(+), 29 deletions(-)
drivers/phy/rockchip/phy-rockchip-inno-usb2.c +70 -29
@@ -116,9 +116,12 @@ struct rockchip_chg_det_reg {* @bvalid_det_en: vbus valid rise detection enable register. * @bvalid_det_st: vbus valid rise detection status register. * @bvalid_det_clr: vbus valid rise detection clear register. -* @id_det_en: id detection enable register. -* @id_det_st: id detection state register. -* @id_det_clr: id detection clear register. +* @idfall_det_en: id detection enable register, falling edge +* @idfall_det_st: id detection state register, falling edge +* @idfall_det_clr: id detection clear register, falling edge +* @idrise_det_en: id detection enable register, rising edge +* @idrise_det_st: id detection state register, rising edge +* @idrise_det_clr: id detection clear register, rising edge * @ls_det_en: linestate detection enable register. * @ls_det_st: linestate detection state register. * @ls_det_clr: linestate detection clear register.
@@ -133,9 +136,12 @@ struct rockchip_usb2phy_port_cfg {struct usb2phy_reg bvalid_det_en;struct usb2phy_reg bvalid_det_st;struct usb2phy_reg bvalid_det_clr; -struct usb2phy_reg id_det_en; -struct usb2phy_reg id_det_st; -struct usb2phy_reg id_det_clr; +struct usb2phy_reg idfall_det_en; +struct usb2phy_reg idfall_det_st; +struct usb2phy_reg idfall_det_clr; +struct usb2phy_reg idrise_det_en; +struct usb2phy_reg idrise_det_st; +struct usb2phy_reg idrise_det_clr;struct usb2phy_reg ls_det_en;struct usb2phy_reg ls_det_st;struct usb2phy_reg ls_det_clr;
@@ -429,15 +435,27 @@ static int rockchip_usb2phy_init(struct phy *phy)if (ret) goto out; -/* clear id status and enable id detect irq */ +/* clear id status and enable id detect irqs */ ret =property_enable (rphy->grf, - &rport->port_cfg->id_det_clr, + &rport->port_cfg->idfall_det_clr, true);if (ret) goto out; ret =property_enable (rphy->grf, - &rport->port_cfg->id_det_en, + &rport->port_cfg->idrise_det_clr, + true); +if (ret) + goto out; + + ret =property_enable (rphy->grf, + &rport->port_cfg->idfall_det_en, + true); +if (ret) + goto out; + + ret =property_enable (rphy->grf, + &rport->port_cfg->idrise_det_en, true);if (ret) goto out;
@@ -944,11 +962,16 @@ static irqreturn_t rockchip_usb2phy_id_irq(int irq, void *data)struct rockchip_usb2phy *rphy =dev_get_drvdata (rport->phy->dev.parent);bool id; -if (!property_enabled (rphy->grf, &rport->port_cfg->id_det_st)) +if (!property_enabled (rphy->grf, &rport->port_cfg->idfall_det_st) && + !property_enabled (rphy->grf, &rport->port_cfg->idrise_det_st))return IRQ_NONE ;/* clear id detect irq pending status */ -property_enable (rphy->grf, &rport->port_cfg->id_det_clr, true); +if (property_enabled (rphy->grf, &rport->port_cfg->idfall_det_st)) +property_enable (rphy->grf, &rport->port_cfg->idfall_det_clr, true); + +if (property_enabled (rphy->grf, &rport->port_cfg->idrise_det_st)) +property_enable (rphy->grf, &rport->port_cfg->idrise_det_clr, true); id =property_enabled (rphy->grf, &rport->port_cfg->utmi_id);extcon_set_state_sync (rphy->edev,EXTCON_USB_HOST , !id);
@@ -1362,9 +1385,12 @@ static const struct rockchip_usb2phy_cfg rk3228_phy_cfgs[] = { .bvalid_det_en = { 0x0680, 3, 3, 0, 1 }, .bvalid_det_st = { 0x0690, 3, 3, 0, 1 }, .bvalid_det_clr = { 0x06a0, 3, 3, 0, 1 }, - .id_det_en = { 0x0680, 6, 5, 0, 3 }, - .id_det_st = { 0x0690, 6, 5, 0, 3 }, - .id_det_clr = { 0x06a0, 6, 5, 0, 3 }, + .idfall_det_en = { 0x0680, 6, 6, 0, 1 }, + .idfall_det_st = { 0x0690, 6, 6, 0, 1 }, + .idfall_det_clr = { 0x06a0, 6, 6, 0, 1 }, + .idrise_det_en = { 0x0680, 5, 5, 0, 1 }, + .idrise_det_st = { 0x0690, 5, 5, 0, 1 }, + .idrise_det_clr = { 0x06a0, 5, 5, 0, 1 }, .ls_det_en = { 0x0680, 2, 2, 0, 1 }, .ls_det_st = { 0x0690, 2, 2, 0, 1 }, .ls_det_clr = { 0x06a0, 2, 2, 0, 1 },
@@ -1425,9 +1451,12 @@ static const struct rockchip_usb2phy_cfg rk3308_phy_cfgs[] = { .bvalid_det_en = { 0x3020, 3, 2, 0, 3 }, .bvalid_det_st = { 0x3024, 3, 2, 0, 3 }, .bvalid_det_clr = { 0x3028, 3, 2, 0, 3 }, - .id_det_en = { 0x3020, 5, 4, 0, 3 }, - .id_det_st = { 0x3024, 5, 4, 0, 3 }, - .id_det_clr = { 0x3028, 5, 4, 0, 3 }, + .idfall_det_en = { 0x3020, 5, 5, 0, 1 }, + .idfall_det_st = { 0x3024, 5, 5, 0, 1 }, + .idfall_det_clr = { 0x3028, 5, 5, 0, 1 }, + .idrise_det_en = { 0x3020, 4, 4, 0, 1 }, + .idrise_det_st = { 0x3024, 4, 4, 0, 1 }, + .idrise_det_clr = { 0x3028, 4, 4, 0, 1 }, .ls_det_en = { 0x3020, 0, 0, 0, 1 }, .ls_det_st = { 0x3024, 0, 0, 0, 1 }, .ls_det_clr = { 0x3028, 0, 0, 0, 1 },
@@ -1472,9 +1501,12 @@ static const struct rockchip_usb2phy_cfg rk3328_phy_cfgs[] = { .bvalid_det_en = { 0x0110, 3, 2, 0, 3 }, .bvalid_det_st = { 0x0114, 3, 2, 0, 3 }, .bvalid_det_clr = { 0x0118, 3, 2, 0, 3 }, - .id_det_en = { 0x0110, 5, 4, 0, 3 }, - .id_det_st = { 0x0114, 5, 4, 0, 3 }, - .id_det_clr = { 0x0118, 5, 4, 0, 3 }, + .idfall_det_en = { 0x0110, 5, 5, 0, 1 }, + .idfall_det_st = { 0x0114, 5, 5, 0, 1 }, + .idfall_det_clr = { 0x0118, 5, 5, 0, 1 }, + .idrise_det_en = { 0x0110, 4, 4, 0, 1 }, + .idrise_det_st = { 0x0114, 4, 4, 0, 1 }, + .idrise_det_clr = { 0x0118, 4, 4, 0, 1 }, .ls_det_en = { 0x0110, 0, 0, 0, 1 }, .ls_det_st = { 0x0114, 0, 0, 0, 1 }, .ls_det_clr = { 0x0118, 0, 0, 0, 1 },
@@ -1538,9 +1570,12 @@ static const struct rockchip_usb2phy_cfg rk3399_phy_cfgs[] = { .bvalid_det_en = { 0xe3c0, 3, 3, 0, 1 }, .bvalid_det_st = { 0xe3e0, 3, 3, 0, 1 }, .bvalid_det_clr = { 0xe3d0, 3, 3, 0, 1 }, - .id_det_en = { 0xe3c0, 5, 4, 0, 3 }, - .id_det_st = { 0xe3e0, 5, 4, 0, 3 }, - .id_det_clr = { 0xe3d0, 5, 4, 0, 3 }, + .idfall_det_en = { 0xe3c0, 5, 5, 0, 1 }, + .idfall_det_st = { 0xe3e0, 5, 5, 0, 1 }, + .idfall_det_clr = { 0xe3d0, 5, 5, 0, 1 }, + .idrise_det_en = { 0xe3c0, 4, 4, 0, 1 }, + .idrise_det_st = { 0xe3e0, 4, 4, 0, 1 }, + .idrise_det_clr = { 0xe3d0, 4, 4, 0, 1 }, .utmi_avalid = { 0xe2ac, 7, 7, 0, 1 }, .utmi_bvalid = { 0xe2ac, 12, 12, 0, 1 }, .utmi_id = { 0xe2ac, 8, 8, 0, 1 },
@@ -1577,9 +1612,12 @@ static const struct rockchip_usb2phy_cfg rk3399_phy_cfgs[] = { .bvalid_det_en = { 0xe3c0, 8, 8, 0, 1 }, .bvalid_det_st = { 0xe3e0, 8, 8, 0, 1 }, .bvalid_det_clr = { 0xe3d0, 8, 8, 0, 1 }, - .id_det_en = { 0xe3c0, 10, 9, 0, 3 }, - .id_det_st = { 0xe3e0, 10, 9, 0, 3 }, - .id_det_clr = { 0xe3d0, 10, 9, 0, 3 }, + .idfall_det_en = { 0xe3c0, 10, 10, 0, 1 }, + .idfall_det_st = { 0xe3e0, 10, 10, 0, 1 }, + .idfall_det_clr = { 0xe3d0, 10, 10, 0, 1 }, + .idrise_det_en = { 0xe3c0, 9, 9, 0, 1 }, + .idrise_det_st = { 0xe3e0, 9, 9, 0, 1 }, + .idrise_det_clr = { 0xe3d0, 9, 9, 0, 1 }, .utmi_avalid = { 0xe2ac, 10, 10, 0, 1 }, .utmi_bvalid = { 0xe2ac, 16, 16, 0, 1 }, .utmi_id = { 0xe2ac, 11, 11, 0, 1 },
@@ -1608,9 +1646,12 @@ static const struct rockchip_usb2phy_cfg rk3568_phy_cfgs[] = { .bvalid_det_en = { 0x0080, 3, 2, 0, 3 }, .bvalid_det_st = { 0x0084, 3, 2, 0, 3 }, .bvalid_det_clr = { 0x0088, 3, 2, 0, 3 }, - .id_det_en = { 0x0080, 5, 4, 0, 3 }, - .id_det_st = { 0x0084, 5, 4, 0, 3 }, - .id_det_clr = { 0x0088, 5, 4, 0, 3 }, + .idfall_det_en = { 0x0080, 5, 5, 0, 1 }, + .idfall_det_st = { 0x0084, 5, 5, 0, 1 }, + .idfall_det_clr = { 0x0088, 5, 5, 0, 1 }, + .idrise_det_en = { 0x0080, 4, 4, 0, 1 }, + .idrise_det_st = { 0x0084, 4, 4, 0, 1 }, + .idrise_det_clr = { 0x0088, 4, 4, 0, 1 }, .utmi_avalid = { 0x00c0, 10, 10, 0, 1 }, .utmi_bvalid = { 0x00c0, 9, 9, 0, 1 }, .utmi_id = { 0x00c0, 6, 6, 0, 1 },
Signature · 1 line
2.42.0
Vinod Koul
maintainerRe: [PATCH 08/31] phy: rockchip-inno-usb2: Split ID interrupt phy registers
Quoted 8 lines · Alex Bee
Commit
51a9b2c03dd3("phy: rockchip-inno-usb2: Handle ID IRQ") added ID detection interrupt registers. However the current implementation assumes that falling and rising edge interrupt are always enabled in registers spaning over subsequent bits.
That is not the case for RK312x's version of the phy and this implementation can't be used as-is, since there are bits with different purpose in between.
Quoted 5 lines
This splits up the register definitions for
id_det_en,id_det_enandid_det_clrregisters in rising and falling edge variants.
It's required as preparation to support RK312x's Innosilicon usb2 phy as well in this driver and matches pretty much to what the vendor does, so I'm not expecting issues for other SoCs with that change.
This fails to apply for phy/next
Signature · 1 line
~Vinod
PATCH 9/31 phy: phy-rockchip-inno-usb2: Add RK3128 support
In reply to Alex BeeAdd registers to support the 2-port usb2 phy found in RK312x SoC familiy.
--- drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+)
drivers/phy/rockchip/phy-rockchip-inno-usb2.c +48 -0
@@ -1374,6 +1374,53 @@ static int rockchip_usb2phy_probe(struct platform_device *pdev)return ret; } +static const struct rockchip_usb2phy_cfg rk3128_phy_cfgs[] = { + { + .reg =0x17c , + .num_ports =2 , + .clkout_ctl = {0x0190 ,15 ,15 ,1 ,0 }, + .port_cfgs = { + [USB2PHY_PORT_OTG ] = { + .phy_sus = {0x017c ,8 ,0 ,0 ,0x1d1 }, + .bvalid_det_en = {0x017c ,14 ,14 ,0 ,1 }, + .bvalid_det_st = {0x017c ,15 ,15 ,0 ,1 }, + .bvalid_det_clr = {0x017c ,15 ,15 ,0 ,1 }, + .idfall_det_en = {0x01a0 ,2 ,2 ,0 ,1 }, + .idfall_det_st = {0x01a0 ,3 ,3 ,0 ,1 }, + .idfall_det_clr = {0x01a0 ,3 ,3 ,0 ,1 }, + .idrise_det_en = {0x01a0 ,0 ,0 ,0 ,1 }, + .idrise_det_st = {0x01a0 ,1 ,1 ,0 ,1 }, + .idrise_det_clr = {0x01a0 ,1 ,1 ,0 ,1 }, + .ls_det_en = {0x017c ,12 ,12 ,0 ,1 }, + .ls_det_st = {0x017c ,13 ,13 ,0 ,1 }, + .ls_det_clr = {0x017c ,13 ,13 ,0 ,1 }, + .utmi_bvalid = {0x014c ,5 ,5 ,0 ,1 }, + .utmi_id = {0x014c ,8 ,8 ,0 ,1 }, + .utmi_ls = {0x014c ,7 ,6 ,0 ,1 }, + }, + [USB2PHY_PORT_HOST ] = { + .phy_sus = {0x0194 ,8 ,0 ,0 ,0x1d1 }, + .ls_det_en = {0x0194 ,14 ,14 ,0 ,1 }, + .ls_det_st = {0x0194 ,15 ,15 ,0 ,1 }, + .ls_det_clr = {0x0194 ,15 ,15 ,0 ,1 } + } + }, + .chg_det = { + .opmode = {0x017c ,3 ,0 ,5 ,1 }, + .cp_det = {0x02c0 ,6 ,6 ,0 ,1 }, + .dcp_det = {0x02c0 ,5 ,5 ,0 ,1 }, + .dp_det = {0x02c0 ,7 ,7 ,0 ,1 }, + .idm_sink_en = {0x0184 ,8 ,8 ,0 ,1 }, + .idp_sink_en = {0x0184 ,7 ,7 ,0 ,1 }, + .idp_src_en = {0x0184 ,9 ,9 ,0 ,1 }, + .rdm_pdwn_en = {0x0184 ,10 ,10 ,0 ,1 }, + .vdm_src_en = {0x0184 ,12 ,12 ,0 ,1 }, + .vdp_src_en = {0x0184 ,11 ,11 ,0 ,1 }, + }, + }, + {/* sentinel */ } +}; +static const struct rockchip_usb2phy_cfg rk3228_phy_cfgs[] = { { .reg =0x760 ,
@@ -1749,6 +1796,7 @@ static const struct rockchip_usb2phy_cfg rv1108_phy_cfgs[] = {static const struct of_device_id rockchip_usb2phy_dt_match[] = { { .compatible ="rockchip,px30-usb2phy" , .data = &rk3328_phy_cfgs }, + { .compatible ="rockchip,rk3128-usb2phy" , .data = &rk3128_phy_cfgs }, { .compatible ="rockchip,rk3228-usb2phy" , .data = &rk3228_phy_cfgs }, { .compatible ="rockchip,rk3308-usb2phy" , .data = &rk3308_phy_cfgs }, { .compatible ="rockchip,rk3328-usb2phy" , .data = &rk3328_phy_cfgs },
Signature · 1 line
2.42.0
PATCH 10/31 ARM: dts: rockchip: Fix i2c0 register address for RK3128
In reply to Alex BeeThe register address for i2c0 is missing a 0x to mark it as hex.
--- arch/arm/boot/dts/rockchip/rk3128.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/rockchip/rk3128.dtsi +1 -1
@@ -426,7 +426,7 @@ saradc: saradc@2006c000 { i2c0: i2c@20072000 { compatible = "rockchip,rk3128-i2c", "rockchip,rk3288-i2c"; - reg = <20072000 0x1000>; + reg = <0x20072000 0x1000>; interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>; clock-names = "i2c"; clocks = <&cru PCLK_I2C0>;
Signature · 1 line
2.42.0
PATCH 11/31 ARM: dts: rockchip: Add missing arm timer interrupt for RK3128
In reply to Alex BeeThe Cortex-A7 timer has 4 interrupts.
Add the mssing one.
--- arch/arm/boot/dts/rockchip/rk3128.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm/boot/dts/rockchip/rk3128.dtsi +2 -1
@@ -64,7 +64,8 @@ timer { compatible = "arm,armv7-timer"; interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>, <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>, - <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>; + <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>, + <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>; arm,cpu-registers-not-fw-configured; clock-frequency = <24000000>; };
Signature · 1 line
2.42.0
PATCH 12/31 ARM: dts: rockchip: Add missing quirk for RK3128's dma engine
In reply to Alex BeeLike most other Rockchip ARM SoCs, the PL330 needs the arm,pl330-periph-burst quirk in order to work as expected. Add it.
--- arch/arm/boot/dts/rockchip/rk3128.dtsi | 1 + 1 file changed, 1 insertion(+)
arch/arm/boot/dts/rockchip/rk3128.dtsi +1 -0
@@ -459,6 +459,7 @@ pdma: dma-controller@20078000 { interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>; arm,pl330-broken-no-flushp; + arm,pl330-periph-burst; clocks = <&cru ACLK_DMAC>; clock-names = "apb_pclk"; #dma-cells = <1>;
Signature · 1 line
2.42.0
PATCH 13/31 ARM: dts: rockchip: Fix timer clocks for RK3128
In reply to Alex BeeCurrently the Rockchip timer source clocks are set to xin24 for no obvious reason and the "real" timer clocks (SCLK_TIMER*) will get disabled during boot process as the have no user. That will make the SoC stuck as no timer source exists.
--- arch/arm/boot/dts/rockchip/rk3128.dtsi | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
arch/arm/boot/dts/rockchip/rk3128.dtsi +6 -6
@@ -234,7 +234,7 @@ timer0: timer@20044000 { compatible = "rockchip,rk3128-timer", "rockchip,rk3288-timer"; reg = <0x20044000 0x20>; interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&cru PCLK_TIMER>, <&xin24m>; + clocks = <&cru PCLK_TIMER>, <&cru SCLK_TIMER0>; clock-names = "pclk", "timer"; };
@@ -242,7 +242,7 @@ timer1: timer@20044020 { compatible = "rockchip,rk3128-timer", "rockchip,rk3288-timer"; reg = <0x20044020 0x20>; interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&cru PCLK_TIMER>, <&xin24m>; + clocks = <&cru PCLK_TIMER>, <&cru SCLK_TIMER1>; clock-names = "pclk", "timer"; };
@@ -250,7 +250,7 @@ timer2: timer@20044040 { compatible = "rockchip,rk3128-timer", "rockchip,rk3288-timer"; reg = <0x20044040 0x20>; interrupts = <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&cru PCLK_TIMER>, <&xin24m>; + clocks = <&cru PCLK_TIMER>, <&cru SCLK_TIMER2>; clock-names = "pclk", "timer"; };
@@ -258,7 +258,7 @@ timer3: timer@20044060 { compatible = "rockchip,rk3128-timer", "rockchip,rk3288-timer"; reg = <0x20044060 0x20>; interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&cru PCLK_TIMER>, <&xin24m>; + clocks = <&cru PCLK_TIMER>, <&cru SCLK_TIMER3>; clock-names = "pclk", "timer"; };
@@ -266,7 +266,7 @@ timer4: timer@20044080 { compatible = "rockchip,rk3128-timer", "rockchip,rk3288-timer"; reg = <0x20044080 0x20>; interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&cru PCLK_TIMER>, <&xin24m>; + clocks = <&cru PCLK_TIMER>, <&cru SCLK_TIMER4>; clock-names = "pclk", "timer"; };
@@ -274,7 +274,7 @@ timer5: timer@200440a0 { compatible = "rockchip,rk3128-timer", "rockchip,rk3288-timer"; reg = <0x200440a0 0x20>; interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&cru PCLK_TIMER>, <&xin24m>; + clocks = <&cru PCLK_TIMER>, <&cru SCLK_TIMER5>; clock-names = "pclk", "timer"; };
Signature · 7 lines
2.42.0 _______________________________________________ Linux-rockchip mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-rockchip
PATCH 14/31 ARM: dts: rockchip: Disable non-required timers for RK3128
In reply to Alex BeeThe Rockchip timer linux driver can handle a maximum of 2 timers and will get confused if more of them exist.
RK3128 only needs timer0, timer1 and timer5. The latter is the source for the arm-timer and its clock is prevented from being disabled in the clock driver so it can get disabled in the device tree, too.
--- arch/arm/boot/dts/rockchip/rk3128.dtsi | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm/boot/dts/rockchip/rk3128.dtsi +4 -0
@@ -252,6 +252,7 @@ timer2: timer@20044040 { interrupts = <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>; clocks = <&cru PCLK_TIMER>, <&cru SCLK_TIMER2>; clock-names = "pclk", "timer"; + status = "disabled"; }; timer3: timer@20044060 {
@@ -260,6 +261,7 @@ timer3: timer@20044060 { interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>; clocks = <&cru PCLK_TIMER>, <&cru SCLK_TIMER3>; clock-names = "pclk", "timer"; + status = "disabled"; }; timer4: timer@20044080 {
@@ -268,6 +270,7 @@ timer4: timer@20044080 { interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>; clocks = <&cru PCLK_TIMER>, <&cru SCLK_TIMER4>; clock-names = "pclk", "timer"; + status = "disabled"; }; timer5: timer@200440a0 {
@@ -276,6 +279,7 @@ timer5: timer@200440a0 { interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>; clocks = <&cru PCLK_TIMER>, <&cru SCLK_TIMER5>; clock-names = "pclk", "timer"; + status = "disabled"; }; watchdog: watchdog@2004c000 {
Signature · 1 line
2.42.0
PATCH 15/31 ARM: dts: rockchip: Split RK3128 devictree for RK312x SoC family
In reply to Alex BeeCurrently there is only a SoC devicetree for RK3128 although RK312x SoC family consits of (at least) RK3126(C) and RK3128.
This splits up the currently existing rk3128.dtsi in rk312x.dtsi which contains the common definitions for both SoCs and rk3128.dtsi, rk3126.dtsi respectivly.
The differentiation between rk3126/rk3128 is already taken into account in the clock driver and they have their own compatibles. uart0 and i2c3 exist only in rk3128 SoC, thus they are moved to the new rk3128.dtsi.
--- arch/arm/boot/dts/rockchip/rk3126.dtsi | 9 + arch/arm/boot/dts/rockchip/rk3128.dtsi | 894 +------------------------ arch/arm/boot/dts/rockchip/rk312x.dtsi | 893 ++++++++++++++++++++++++ 3 files changed, 909 insertions(+), 887 deletions(-) create mode 100644 arch/arm/boot/dts/rockchip/rk3126.dtsi create mode 100644 arch/arm/boot/dts/rockchip/rk312x.dtsi
arch/arm/boot/dts/rockchip/rk3126.dtsi new file +9 -0
@@ -0,0 +1,9 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) + +/dts-v1/; + +#include "rk312x.dtsi" + +/ { + compatible = "rockchip,rk3126"; +};
arch/arm/boot/dts/rockchip/rk3128.dtsi +7 -887
906 lines not on this page · raw message
arch/arm/boot/dts/rockchip/rk312x.dtsi new file +893 -0
893 lines not on this page · raw message
Signature · 1 line
2.42.0
Re: [PATCH 15/31] ARM: dts: rockchip: Split RK3128 devictree for RK312x SoC family
Quoted 6 lines · Alex Bee
Currently there is only a SoC devicetree for RK3128 although RK312x SoC family consits of (at least) RK3126(C) and RK3128.
This splits up the currently existing
rk3128.dtsiinrk312x.dtsiwhich contains the common definitions for both SoCs andrk3128.dtsi,rk3126.dtsirespectivly.
typos here and before
Quoted 11 lines
The differentiation between rk3126/rk3128 is already taken into account in the clock driver and they have their own compatibles. uart0 and i2c3 exist only in rk3128 SoC, thus they are moved to the new
rk3128.dtsi.Signed-off-by Alex Bee <[email protected]>--- arch/arm/boot/dts/rockchip/rk3126.dtsi | 9 + arch/arm/boot/dts/rockchip/rk3128.dtsi | 894 +------------------------ arch/arm/boot/dts/rockchip/rk312x.dtsi | 893 ++++++++++++++++++++++++
Please generate your patches with proper -M/-B/-C arguments to detect the rename/copy.
Quoted 24 lines
3 files changed, 909 insertions(+), 887 deletions(-) create mode 100644 arch/arm/boot/dts/rockchip/rk3126.dtsi create mode 100644 arch/arm/boot/dts/rockchip/rk312x.dtsiarch/arm/boot/dts/rockchip/rk3126.dtsi new file +9
-0@@ -0,0 +1,9 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) + +/dts-v1/; + +#include "rk312x.dtsi" + +/ { + compatible = "rockchip,rk3126"; +};arch/arm/boot/dts/rockchip/rk3128.dtsi +0
-0
arch/arm/boot/dts/rockchip/rk3128.dtsi line 1
Quoted 5 lines
arch/arm/boot/dts/rockchip/rk3128.dtsi +1
-4@@ -1,360 +1,11 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * (C) Copyright 2017 Rockchip Electronics Co., Ltd - */ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
This looks like relicensing, so without proper diff (see comment before) it is a no-go.
Quoted 31 lines
arch/arm/boot/dts/rockchip/rk3128.dtsi +3
-24-#include <dt-bindings/clock/rk3128-cru.h> -#include <dt-bindings/gpio/gpio.h> -#include <dt-bindings/interrupt-controller/arm-gic.h> -#include <dt-bindings/interrupt-controller/irq.h> -#include <dt-bindings/pinctrl/rockchip.h> +/dts-v1/; + +#include "rk312x.dtsi" / { compatible = "rockchip,rk3128"; - interrupt-parent = <&gic>; - #address-cells = <1>; - #size-cells = <1>; - - arm-pmu { - compatible = "arm,cortex-a7-pmu"; - interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>, - <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>, - <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>, - <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>; - interrupt-affinity = <&cpu0>, <&cpu1>, <&cpu2>, <&cpu3>; - }; - - cpus { - #address-cells = <1>; - #size-cells = <0>; - - cpu0: cpu@f00 { - device_type = "cpu";
arch/arm/boot/dts/rockchip/rk3128.dtsi line 42
Quoted 10 lines
arch/arm/boot/dts/rockchip/rk3128.dtsi +0
-10- compatible = "arm,cortex-a7"; - reg = <0xf00>; - clock-latency = <40000>; - clocks = <&cru ARMCLK>; - operating-points = < - /* KHz uV */ - 816000 1000000 - >; - #cooling-cells = <2>; /* min followed by max */ - };
All this patch is absolutely unreadable and unreviewable. Sorry, use the tools to make review possible.
Best regards,
Krzysztof
PATCH 16/31 ARM: dts: rockchip: Add SRAM node for RK312x
In reply to Alex BeeRK312x SoCs have 8KB of SRAM.
Add the respective device tree node for it.
--- arch/arm/boot/dts/rockchip/rk312x.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+)
arch/arm/boot/dts/rockchip/rk312x.dtsi +8 -0
@@ -77,6 +77,14 @@ xin24m: oscillator { #clock-cells = <0>; }; + imem: sram@10080000 { + compatible = "mmio-sram"; + reg = <0x10080000 0x2000>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0x10080000 0x2000>; + }; + pmu: syscon@100a0000 { compatible = "rockchip,rk3128-pmu", "syscon", "simple-mfd"; reg = <0x100a0000 0x1000>;
Signature · 1 line
2.42.0
Re: [PATCH 16/31] ARM: dts: rockchip: Add SRAM node for RK312x
Quoted 5 lines · Alex Bee
RK312x SoCs have 8KB of SRAM.
Add the respective device tree node for it.Signed-off-by Alex Bee <[email protected]>---
This really does not depend on your MFD, GPU nor ASoC changes. Keep independent work for different subsystems separate.
Best regards,
Krzysztof
PATCH 17/31 ARM: dts: rockchip: Add CPU resets for RK312x
In reply to Alex BeeAdd the reset controls for all 4 cpu cores.
--- arch/arm/boot/dts/rockchip/rk312x.dtsi | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm/boot/dts/rockchip/rk312x.dtsi +4 -0
@@ -34,6 +34,7 @@ cpu0: cpu@f00 { reg = <0xf00>; clock-latency = <40000>; clocks = <&cru ARMCLK>; + resets = <&cru SRST_CORE0>; operating-points = < /* KHz uV */ 816000 1000000
@@ -45,18 +46,21 @@ cpu1: cpu@f01 { device_type = "cpu"; compatible = "arm,cortex-a7"; reg = <0xf01>; + resets = <&cru SRST_CORE1>; }; cpu2: cpu@f02 { device_type = "cpu"; compatible = "arm,cortex-a7"; reg = <0xf02>; + resets = <&cru SRST_CORE2>; }; cpu3: cpu@f03 { device_type = "cpu"; compatible = "arm,cortex-a7"; reg = <0xf03>; + resets = <&cru SRST_CORE3>; }; };
Signature · 1 line
2.42.0
Re: [PATCH 17/31] ARM: dts: rockchip: Add CPU resets for RK312x
Quoted 1 line · Alex Bee
Add the reset controls for all 4 cpu cores.
This we see from the diff. Commit should say why.
Best regards,
Krzysztof
PATCH 18/31 ARM: dts: rockchip: Enable SMP bringup for RK312x
In reply to Alex BeeFor bringup of the non-boot cpu cores the enable-method for RK3036 can be re-used.
This adds a (small) chunk of SRAM for execution of the SMP trampoline code and the respective enable-method property to the cpus.
--- arch/arm/boot/dts/rockchip/rk312x.dtsi | 6 ++++++ 1 file changed, 6 insertions(+)
arch/arm/boot/dts/rockchip/rk312x.dtsi +6 -0
@@ -27,6 +27,7 @@ arm-pmu { cpus { #address-cells = <1>; #size-cells = <0>; + enable-method = "rockchip,rk3036-smp"; cpu0: cpu@f00 { device_type = "cpu";
@@ -87,6 +88,11 @@ imem: sram@10080000 { #address-cells = <1>; #size-cells = <1>; ranges = <0 0x10080000 0x2000>; + + smp-sram@0 { + compatible = "rockchip,rk3066-smp-sram"; + reg = <0x00 0x10>; + }; }; pmu: syscon@100a0000 {
Signature · 1 line
2.42.0
PATCH 19/31 ARM: dts: rockchip: Switch to operating-points-v2 for RK312x's CPU
In reply to Alex BeeThis will allow frequency-scaling for the cpu cores. Operating frequencies and voltages have been taken from Rockchip's downstream kernel.
--- arch/arm/boot/dts/rockchip/rk312x.dtsi | 43 +++++++++++++++++++++++--- 1 file changed, 39 insertions(+), 4 deletions(-)
arch/arm/boot/dts/rockchip/rk312x.dtsi +39 -4
@@ -36,10 +36,7 @@ cpu0: cpu@f00 { clock-latency = <40000>; clocks = <&cru ARMCLK>; resets = <&cru SRST_CORE0>; - operating-points = < - /* KHz uV */ - 816000 1000000 - >; + operating-points-v2 = <&cpu_opp_table>; #cooling-cells = <2>; /* min followed by max */ };
@@ -48,6 +45,7 @@ cpu1: cpu@f01 { compatible = "arm,cortex-a7"; reg = <0xf01>; resets = <&cru SRST_CORE1>; + operating-points-v2 = <&cpu_opp_table>; }; cpu2: cpu@f02 {
@@ -55,6 +53,7 @@ cpu2: cpu@f02 { compatible = "arm,cortex-a7"; reg = <0xf02>; resets = <&cru SRST_CORE2>; + operating-points-v2 = <&cpu_opp_table>; }; cpu3: cpu@f03 {
@@ -62,6 +61,42 @@ cpu3: cpu@f03 { compatible = "arm,cortex-a7"; reg = <0xf03>; resets = <&cru SRST_CORE3>; + operating-points-v2 = <&cpu_opp_table>; + }; + }; + + cpu_opp_table: opp-table-0 { + compatible = "operating-points-v2"; + opp-shared; + + opp-216000000 { + opp-hz = /bits/ 64 <216000000>; + opp-microvolt = <950000 950000 1325000>; + }; + opp-408000000 { + opp-hz = /bits/ 64 <408000000>; + opp-microvolt = <950000 950000 1325000>; + }; + opp-600000000 { + opp-hz = /bits/ 64 <600000000>; + opp-microvolt = <950000 950000 1325000>; + }; + opp-696000000 { + opp-hz = /bits/ 64 <696000000>; + opp-microvolt = <975000 975000 1325000>; + }; + opp-816000000 { + opp-hz = /bits/ 64 <816000000>; + opp-microvolt = <1075000 1075000 1325000>; + opp-suspend; + }; + opp-1008000000 { + opp-hz = /bits/ 64 <1008000000>; + opp-microvolt = <1200000 1200000 1325000>; + }; + opp-1200000000 { + opp-hz = /bits/ 64 <1200000000>; + opp-microvolt = <1325000 1325000 1325000>; }; };
Signature · 1 line
2.42.0
PATCH 20/31 ARM: dts: rockchip: Add extra CPU voltages for RK3126
In reply to Alex BeeWhile RK3126's CPU cores can operate at the same frequencies as RK3128, but it needs higher voltages.
The values have been taken from vendor's downstream kernel.
--- arch/arm/boot/dts/rockchip/rk3126.dtsi | 27 ++++++++++++++++++++++++++ 1 file changed, 27 insertions(+)
arch/arm/boot/dts/rockchip/rk3126.dtsi +27 -0
@@ -7,3 +7,30 @@ / { compatible = "rockchip,rk3126"; }; + +&cpu_opp_table { + opp-216000000 { + opp-microvolt = <1000000 1000000 1425000>; + }; + opp-408000000 { + opp-microvolt = <1150000 1150000 1425000>; + }; + opp-600000000 { + opp-microvolt = <1150000 1150000 1425000>; + }; + opp-696000000 { + opp-microvolt = <1150000 1150000 1425000>; + }; + opp-816000000 { + opp-microvolt = <1200000 1200000 1425000>; + }; + opp-816000000 { + opp-microvolt = <1200000 1200000 1425000>; + }; + opp-1008000000 { + opp-microvolt = <1350000 1350000 1425000>; + }; + opp-1200000000 { + opp-microvolt = <1425000 1425000 1425000>; + }; +};
Signature · 1 line
2.42.0
PATCH 21/31 ARM: dts: rockchip: add power controller for RK312x
In reply to Alex BeeAdd the power controller node and the correspondending qos nodes for RK312x.
--- arch/arm/boot/dts/rockchip/rk312x.dtsi | 82 ++++++++++++++++++++++++++ 1 file changed, 82 insertions(+)
arch/arm/boot/dts/rockchip/rk312x.dtsi +82 -0
@@ -8,6 +8,7 @@ #include <dt-bindings/interrupt-controller/arm-gic.h> #include <dt-bindings/interrupt-controller/irq.h> #include <dt-bindings/pinctrl/rockchip.h> +#include <dt-bindings/power/rk3128-power.h> / { compatible = "rockchip,rk3128";
@@ -133,6 +134,87 @@ smp-sram@0 { pmu: syscon@100a0000 { compatible = "rockchip,rk3128-pmu", "syscon", "simple-mfd"; reg = <0x100a0000 0x1000>; + + power: power-controller { + compatible = "rockchip,rk3128-power-controller"; + #power-domain-cells = <1>; + #address-cells = <1>; + #size-cells = <0>; + + power-domain@RK3128_PD_VIO { + reg = <RK3128_PD_VIO>; + clocks = <&cru ACLK_RGA>, + <&cru ACLK_LCDC0>, + <&cru ACLK_IEP>, + <&cru ACLK_CIF>, + <&cru ACLK_VIO0>, + <&cru ACLK_VIO1>, + <&cru DCLK_VOP>, + <&cru DCLK_EBC>, + <&cru HCLK_RGA>, + <&cru HCLK_VIO>, + <&cru HCLK_EBC>, + <&cru HCLK_LCDC0>, + <&cru HCLK_IEP>, + <&cru HCLK_CIF>, + <&cru HCLK_VIO_H2P>, + <&cru PCLK_MIPI>, + <&cru SCLK_VOP>; + pm_qos = <&qos_rga>, + <&qos_iep>, + <&qos_lcdc>, + <&qos_vip>; + #power-domain-cells = <0>; + }; + + power-domain@RK3128_PD_VIDEO { + reg = <RK3128_PD_VIDEO>; + clocks = <&cru ACLK_VEPU>, + <&cru ACLK_VDPU>, + <&cru HCLK_VEPU>, + <&cru HCLK_VDPU>, + <&cru SCLK_HEVC_CORE>; + pm_qos = <&qos_vpu>; + #power-domain-cells = <0>; + }; + + power-domain@RK3128_PD_GPU { + reg = <RK3128_PD_GPU>; + clocks = <&cru ACLK_GPU>; + pm_qos = <&qos_gpu>; + #power-domain-cells = <0>; + }; + }; + }; + + qos_gpu: qos@1012d000 { + compatible = "rockchip,rk3128-qos", "syscon"; + reg = <0x1012d000 0x20>; + }; + + qos_vpu: qos@1012e000 { + compatible = "rockchip,rk3128-qos", "syscon"; + reg = <0x1012e000 0x20>; + }; + + qos_rga: qos@1012f000 { + compatible = "rockchip,rk3128-qos", "syscon"; + reg = <0x1012f000 0x20>; + }; + + qos_iep: qos@1012f100 { + compatible = "rockchip,rk3128-qos", "syscon"; + reg = <0x1012f100 0x20>; + }; + + qos_lcdc: qos@1012f180 { + compatible = "rockchip,rk3128-qos", "syscon"; + reg = <0x1012f180 0x20>; + }; + + qos_vip: qos@1012f200 { + compatible = "rockchip,rk3128-qos", "syscon"; + reg = <0x1012f200 0x20>; }; gic: interrupt-controller@10139000 {
Signature · 1 line
2.42.0
PATCH 22/31 ARM: dts: rockchip: Add GPU node for RK312x
In reply to Alex BeeRK312x SoCs have Mali400 MP2 GPU.
Add the respective device tree node and the correspondending opp-table.
The frequencies and voltages have been taken from downstream kernel and work fine for both RK3126 and RK3128.
--- arch/arm/boot/dts/rockchip/rk312x.dtsi | 44 ++++++++++++++++++++++++++ 1 file changed, 44 insertions(+)
arch/arm/boot/dts/rockchip/rk312x.dtsi +44 -0
@@ -101,6 +101,27 @@ opp-1200000000 { }; }; + gpu_opp_table: opp-table-1 { + compatible = "operating-points-v2"; + + opp-200000000 { + opp-hz = /bits/ 64 <200000000>; + opp-microvolt = <975000 975000 1250000>; + }; + opp-300000000 { + opp-hz = /bits/ 64 <300000000>; + opp-microvolt = <1050000 1050000 1250000>; + }; + opp-400000000 { + opp-hz = /bits/ 64 <400000000>; + opp-microvolt = <1150000 1150000 1250000>; + }; + opp-480000000 { + opp-hz = /bits/ 64 <480000000>; + opp-microvolt = <1250000 1250000 1250000>; + }; + }; + timer { compatible = "arm,armv7-timer"; interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
@@ -131,6 +152,29 @@ smp-sram@0 { }; }; + gpu: gpu@10090000 { + compatible = "rockchip,rk3128-mali", "arm,mali-400"; + reg = <0x10090000 0x10000>; + interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "gp", + "gpmmu", + "pp0", + "ppmmu0", + "pp1", + "ppmmu1"; + clocks = <&cru ACLK_GPU>, <&cru ACLK_GPU>; + clock-names = "bus", "core"; + power-domains = <&power RK3128_PD_GPU>; + resets = <&cru SRST_GPU>; + operating-points-v2 = <&gpu_opp_table>; + status = "disabled"; + }; + pmu: syscon@100a0000 { compatible = "rockchip,rk3128-pmu", "syscon", "simple-mfd"; reg = <0x100a0000 0x1000>;
Signature · 1 line
2.42.0
PATCH 23/31 ARM: dts: rockchip: Add 2-channel I2S for RK312x
In reply to Alex BeeBoth RK3126 and RK3128 have a 2-channel I2S IP block. Add the respective node for it.
--- arch/arm/boot/dts/rockchip/rk312x.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
arch/arm/boot/dts/rockchip/rk312x.dtsi +16 -0
@@ -351,6 +351,22 @@ emmc: mmc@1021c000 { status = "disabled"; }; + i2s_2ch: i2s@10220000 { + compatible = "rockchip,rk3128-i2s", "rockchip,rk3066-i2s"; + reg = <0x10220000 0x1000>; + interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cru SCLK_I2S1>, <&cru HCLK_I2S_2CH>; + clock-names = "i2s_clk", "i2s_hclk"; + dmas = <&pdma 0>, <&pdma 1>; + dma-names = "tx", "rx"; + pinctrl-names = "default"; + pinctrl-0 = <&i2s_bus>; + rockchip,playback-channels = <2>; + rockchip,capture-channels = <2>; + #sound-dai-cells = <0>; + status = "disabled"; + }; + nfc: nand-controller@10500000 { compatible = "rockchip,rk3128-nfc", "rockchip,rk2928-nfc"; reg = <0x10500000 0x4000>;
Signature · 1 line
2.42.0
PATCH 24/31 ARM: dts: rockchip: Add 8-channel I2S for RK3128
In reply to Alex BeeRK3128 has a second I2S block with 8 playback channels. It's internally hard-wired to the HDMI-TX, thus only usable with it.
--- arch/arm/boot/dts/rockchip/rk3128.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
arch/arm/boot/dts/rockchip/rk3128.dtsi +14 -0
@@ -7,6 +7,20 @@ / { compatible = "rockchip,rk3128"; + i2s_8ch: i2s@10200000 { + compatible = "rockchip,rk3128-i2s", "rockchip,rk3066-i2s"; + reg = <0x10200000 0x1000>; + interrupts = <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cru SCLK_I2S0>, <&cru HCLK_I2S_8CH>; + clock-names = "i2s_clk", "i2s_hclk"; + dmas = <&pdma 14>, <&pdma 15>; + dma-names = "tx", "rx"; + rockchip,playback-channels = <8>; + rockchip,capture-channels = <2>; + #sound-dai-cells = <0>; + status = "disabled"; + }; + i2c3: i2c@2005e000 { compatible = "rockchip,rk3128-i2c", "rockchip,rk3288-i2c"; reg = <0x2005e000 0x1000>;
Signature · 1 line
2.42.0
PATCH 25/31 ARM: dts: rockchip: Add spdif for RK3128
In reply to Alex BeeAdd the S/PDIF block for RK3128 SoC.
--- arch/arm/boot/dts/rockchip/rk3128.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
arch/arm/boot/dts/rockchip/rk3128.dtsi +14 -0
@@ -21,6 +21,20 @@ i2s_8ch: i2s@10200000 { status = "disabled"; }; + spdif: spdif@10204000 { + compatible = "rockchip,rk3128-spdif", "rockchip,rk3066-spdif"; + reg = <0x10204000 0x1000>; + interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cru SCLK_SPDIF>, <&cru HCLK_SPDIF>; + clock-names = "mclk", "hclk"; + dmas = <&pdma 13>; + dma-names = "tx"; + pinctrl-names = "default"; + pinctrl-0 = <&spdif_tx>; + #sound-dai-cells = <0>; + status = "disabled"; + }; + i2c3: i2c@2005e000 { compatible = "rockchip,rk3128-i2c", "rockchip,rk3288-i2c"; reg = <0x2005e000 0x1000>;
Signature · 1 line
2.42.0
PATCH 26/31 ARM: dts: rockchip: Add gmac for RK3128
In reply to Alex BeeAdd the gmac node for RK3128 SoC.
--- arch/arm/boot/dts/rockchip/rk3128.dtsi | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+)
arch/arm/boot/dts/rockchip/rk3128.dtsi +26 -0
@@ -63,6 +63,32 @@ uart0: serial@20060000 { reg-shift = <2>; status = "disabled"; }; + + gmac: ethernet@2008c000 { + compatible = "rockchip,rk3128-gmac"; + reg = <0x2008c000 0x4000>; + interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "macirq", "eth_wake_irq"; + clocks = <&cru SCLK_MAC>, + <&cru SCLK_MAC_RX>, <&cru SCLK_MAC_TX>, + <&cru SCLK_MAC_REF>, <&cru SCLK_MAC_REFOUT>, + <&cru ACLK_GMAC>, <&cru PCLK_GMAC>; + clock-names = "stmmaceth", + "mac_clk_rx", "mac_clk_tx", + "clk_mac_ref", "clk_mac_refout", + "aclk_mac", "pclk_mac"; + resets = <&cru SRST_GMAC>; + reset-names = "stmmaceth"; + rockchip,grf = <&grf>; + status = "disabled"; + + mdio: mdio { + compatible = "snps,dwmac-mdio"; + #address-cells = <0x1>; + #size-cells = <0x0>; + }; + }; }; &cru {
Signature · 1 line
2.42.0
PATCH 27/31 ARM: dts: rockchip: Add dwc2 otg fifo siztes for RK312x
In reply to Alex BeeThe driver currently won't probe correctly if those values are missing. They have been taken from dowstream kernel and match those of other Rockchip SoCs.
--- arch/arm/boot/dts/rockchip/rk312x.dtsi | 3 +++ 1 file changed, 3 insertions(+)
arch/arm/boot/dts/rockchip/rk312x.dtsi +3 -0
@@ -280,6 +280,9 @@ usb_otg: usb@10180000 { clocks = <&cru HCLK_OTG>; clock-names = "otg"; dr_mode = "otg"; + g-np-tx-fifo-size = <16>; + g-rx-fifo-size = <280>; + g-tx-fifo-size = <256 128 128 64 32 16>; phys = <&usb2phy_otg>; phy-names = "usb2-phy"; status = "disabled";
Signature · 1 line
2.42.0
PATCH 28/31 ARM: dts: rockchip: Add USB host clocks for RK312x
In reply to Alex BeeAdd the AHB clocks for both the ehci and ohci controller.
--- arch/arm/boot/dts/rockchip/rk312x.dtsi | 2 ++ 1 file changed, 2 insertions(+)
arch/arm/boot/dts/rockchip/rk312x.dtsi +2 -0
@@ -292,6 +292,7 @@ usb_host_ehci: usb@101c0000 { compatible = "generic-ehci"; reg = <0x101c0000 0x20000>; interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cru HCLK_HOST2>; phys = <&usb2phy_host>; phy-names = "usb"; status = "disabled";
@@ -301,6 +302,7 @@ usb_host_ohci: usb@101e0000 { compatible = "generic-ohci"; reg = <0x101e0000 0x20000>; interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cru HCLK_HOST2>; phys = <&usb2phy_host>; phy-names = "usb"; status = "disabled";
Signature · 1 line
2.42.0
PATCH 29/31 ARM: dts: rockchip: Make usbphy the parent of SCLK_USB480M for RK312x
In reply to Alex BeeWithout setting the parent for SCLK_USB480M the clock will use xin24m as it's default parent. While this is generally not an issue for the usb blocks to work, but the clock driver will "think" it runs at 24 MHz. That becomes an issue for RK312x since SCLK_USB480M can be a parent for other HW blocks (users of mux_pll_src_5plls_p) but they never will choose this clock as their parent, because it runs at OSC frequency.
This sets usb480m_phy as SCLK_USB480M's parent, which now runs and outputs the expected frequency of 480 MHz and the other blocks can choose SCLK_USB480M as their parent if needed.
--- arch/arm/boot/dts/rockchip/rk312x.dtsi | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm/boot/dts/rockchip/rk312x.dtsi +4 -0
@@ -293,6 +293,8 @@ usb_host_ehci: usb@101c0000 { reg = <0x101c0000 0x20000>; interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>; clocks = <&cru HCLK_HOST2>; + assigned-clocks = <&cru SCLK_USB480M>; + assigned-clock-parents = <&usb2phy>; phys = <&usb2phy_host>; phy-names = "usb"; status = "disabled";
@@ -303,6 +305,8 @@ usb_host_ohci: usb@101e0000 { reg = <0x101e0000 0x20000>; interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>; clocks = <&cru HCLK_HOST2>; + assigned-clocks = <&cru SCLK_USB480M>; + assigned-clock-parents = <&usb2phy>; phys = <&usb2phy_host>; phy-names = "usb"; status = "disabled";
Signature · 1 line
2.42.0
PATCH 30/31 ARM: dts: rockchip: Add sdmmc_det pinctrl for RK312x
In reply to Alex BeeThe pincontrol for sd card detection is currently missing. Add it.
--- arch/arm/boot/dts/rockchip/rk312x.dtsi | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm/boot/dts/rockchip/rk312x.dtsi +4 -0
@@ -969,6 +969,10 @@ sdmmc_cmd: sdmmc-cmd { rockchip,pins = <1 RK_PB7 1 &pcfg_pull_default>; }; + sdmmc_det: sdmmc-det { + rockchip,pins = <1 RK_PC1 1 &pcfg_pull_default>; + }; + sdmmc_wp: sdmmc-wp { rockchip,pins = <1 RK_PA7 1 &pcfg_pull_default>; };
Signature · 1 line
2.42.0
PATCH 31/31 ARM: dts: Add Geniatech XPI-3128 RK3128 board
In reply to Alex BeeXPI-3128 is RK3128 based SBC form Geniatec in RPi form factor
Specs:
- Rockchip RK3128
- 1 GB DDR3 DRAM
- 8/16 GB eMMC
- TF card slot
- 100 MBit ethernet / RJ45
- optional Marvell 88W8897 (USB version)
- 3 x USB host (onboard GL852G hub connected to SoC ehci host)
- 1 x USB otg
- 1 x Type-C (solely for powering the board)
- HDMI 1.4 out
- 1 ADC button
- IR receiver
- Artasie AM1805 RTC
- 40 pin header
--- arch/arm/boot/dts/rockchip/Makefile | 1 + .../arm/boot/dts/rockchip/rk3128-xpi-3128.dts | 431 ++++++++++++++++++ 2 files changed, 432 insertions(+) create mode 100644 arch/arm/boot/dts/rockchip/rk3128-xpi-3128.dts
arch/arm/boot/dts/rockchip/Makefile +1 -0
@@ -10,6 +10,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += \ rk3066a-mk808.dtb \ rk3066a-rayeager.dtb \ rk3128-evb.dtb \ + rk3128-xpi-3128.dtb \ rk3188-bqedison2qc.dtb \ rk3188-px3-evb.dtb \ rk3188-radxarock.dtb \
arch/arm/boot/dts/rockchip/rk3128-xpi-3128.dts new file +431 -0
431 lines not on this page · raw message
Signature · 1 line
2.42.0
Mark Brown
maintainerRe: (subset) [PATCH 00/31] Fix and improve Rockchip RK3128 support
In reply to Alex BeeQuoted 11 lines · Alex Bee
this series fixes some issues I found when testing my "new" RK3128 board with the mainline kernel and adds some core functionality like SMP bringup, usb and networking.
The propably most distinctive change is the split up of the DTs for the different SoCs of this platform: RK3126 and RK3128. Even if I'm not adding a RK3126 board in this series: I think this change should be done as early as possible in order to avoid issues in future.
Actually it should have been done like that in the first place.[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[03/31] dt-bindings: ASoC: rockchip: Add compatible for RK3128 spdif
commit: 5c8a033f5674ae62d5aa2ebbdb9980b89380c34f
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Re: (subset) [PATCH 00/31] Fix and improve Rockchip RK3128 support
In reply to Alex BeeQuoted 11 lines · Alex Bee
this series fixes some issues I found when testing my "new" RK3128 board with the mainline kernel and adds some core functionality like SMP bringup, usb and networking.
The propably most distinctive change is the split up of the DTs for the different SoCs of this platform: RK3126 and RK3128. Even if I'm not adding a RK3126 board in this series: I think this change should be done as early as possible in order to avoid issues in future.
Actually it should have been done like that in the first place.[...]
Applied, thanks!
[08/31] phy: rockchip-inno-usb2: Split ID interrupt phy registers
commit: 2fda59099462ee700e424ba3ac928d13ad6389a8
[09/31] phy: phy-rockchip-inno-usb2: Add RK3128 support
commit: 62ff41017e147472b07de6125c3be82ce02a8dd7Best regards,
Signature · 1 line
~Vinod
Heiko Stuebner
maintainerHi Alex,
Am Dienstag, 29. August 2023, 19:16:16 CET schrieb Alex Bee:
Quoted 3 lines
this series fixes some issues I found when testing my "new" RK3128 board with the mainline kernel and adds some core functionality like SMP bringup, usb and networking.
before I discard this thread, is everything from here migrated to separate serieses or are there patches in this big pile that are still relevant on their own, that haven't been applied?
[I lost track of what did go where ;-) ]
Thanks
Heiko
Hi Heiko
Am 12.12.23 um 21:03 schrieb Heiko Stuebner:
Quoted 10 lines
Hi Alex,
Am Dienstag, 29. August 2023, 19:16:16 CET schrieb Alex Bee:
Quoted 3 lines
this series fixes some issues I found when testing my "new" RK3128 board with the mainline kernel and adds some core functionality like SMP bringup, usb and networking.
before I discard this thread, is everything from here migrated to separate serieses or are there patches in this big pile that are still relevant on their own, that haven't been applied?
[I lost track of what did go where ;-) ]
No worries - I kept track :)
Not everything is re-sent yet (sound nodes, RK3126/RK3128 split-up) but you can discard this and will re-send everything left in separate series (as I said [0])
Regards,
Alex
Quoted 6 lines
Thanks
Heiko