Support SD/SDIO controllers on RK3528
Subsystems (4)
v2 cover Support SD/SDIO controllers on RK3528
RK3528 features two SDIO controllers and one SD/MMC controller. This series adds essential support for their tuning clocks, document the controller in dt-bindings and bring the SD/MMC one up on Radxa E20C board. Both HS and SDR104 mode are verified.
This is based on v2 of the SARADC series[1]
- Changed from v1
- Apply review tags
- Rebase on top of linux-rockchip/for-next and saradc v2 series
- rk3528 clock driver:
- explicitly include minmax.h, replace MAX() with more robust max()
- readability improvements
- fix error checks: ERR_PTR(-ENODEV), instead of ERR_PTR(ENODEV), is returned when syscon_regmap_lookup_by_compatible() fails for missing such syscon
- RK3528 devicetree
- Add default pinctrl
- Move the per-SoC property, rockchip,default-sample-phase, into the SoC devicetree
- rk3528-radxa-e20c devicetree
- Assign sdcard to mmc1
- Add missing regulators
- Apply no-sdio for the sdmmc controller
- Sort nodes
- Link to v1: https://lore.kernel.org/all/[email protected]/
Thanks for your time and review.
[1]: https://lore.kernel.org/all/[email protected]/
Yao Zi (8):
dt-bindings: soc: rockchip: Add RK3528 VO GRF syscon
dt-bindings: soc: rockchip: Add RK3528 VPU GRF syscon
dt-bindings: mmc: rockchip-dw-mshc: Add compatible string for RK3528
dt-bindings: clock: Add GRF clock definition for RK3528
clk: rockchip: Support MMC clocks in GRF region
clk: rockchip: rk3528: Add SD/SDIO tuning clocks in GRF region
arm64: dts: rockchip: Add SDMMC/SDIO controllers for RK3528
arm64: dts: rockchip: Enable SD-card interface on Radxa E20C
.../bindings/mmc/rockchip-dw-mshc.yaml | 1 + .../devicetree/bindings/soc/rockchip/grf.yaml | 2 + .../boot/dts/rockchip/rk3528-radxa-e20c.dts | 34 +++++++++ arch/arm64/boot/dts/rockchip/rk3528.dtsi | 70 +++++++++++++++++++ drivers/clk/rockchip/clk-mmc-phase.c | 24 +++++-- drivers/clk/rockchip/clk-rk3528.c | 61 ++++++++++++++-- drivers/clk/rockchip/clk.c | 42 +++++++++++ drivers/clk/rockchip/clk.h | 23 +++++- .../dt-bindings/clock/rockchip,rk3528-cru.h | 6 ++ 9 files changed, 252 insertions(+), 11 deletions(-)
Signature · 1 line
2.48.1
PATCH v2 1/8 dt-bindings: soc: rockchip: Add RK3528 VO GRF syscon
Add compatible string for VO GRF found on RK3528 SoC.
--- Documentation/devicetree/bindings/soc/rockchip/grf.yaml | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/soc/rockchip/grf.yaml +1 -0
@@ -16,6 +16,7 @@ properties: - enum: - rockchip,rk3288-sgrf - rockchip,rk3528-ioc-grf + - rockchip,rk3528-vo-grf - rockchip,rk3566-pipe-grf - rockchip,rk3568-pcie3-phy-grf - rockchip,rk3568-pipe-grf
Signature · 1 line
2.48.1
PATCH v2 2/8 dt-bindings: soc: rockchip: Add RK3528 VPU GRF syscon
In reply to Yao ZiAdd compatible string for VPU GRF found on RK3528 SoC.
--- Documentation/devicetree/bindings/soc/rockchip/grf.yaml | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/soc/rockchip/grf.yaml +1 -0
@@ -17,6 +17,7 @@ properties: - rockchip,rk3288-sgrf - rockchip,rk3528-ioc-grf - rockchip,rk3528-vo-grf + - rockchip,rk3528-vpu-grf - rockchip,rk3566-pipe-grf - rockchip,rk3568-pcie3-phy-grf - rockchip,rk3568-pipe-grf
Signature · 1 line
2.48.1
PATCH v2 3/8 dt-bindings: mmc: rockchip-dw-mshc: Add compatible string for RK3528
In reply to Yao ZiAdd RK3528 compatible string for SD/SDIO interface.
--- Documentation/devicetree/bindings/mmc/rockchip-dw-mshc.yaml | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/mmc/rockchip-dw-mshc.yaml +1 -0
@@ -38,6 +38,7 @@ properties: - rockchip,rk3328-dw-mshc - rockchip,rk3368-dw-mshc - rockchip,rk3399-dw-mshc + - rockchip,rk3528-dw-mshc - rockchip,rk3568-dw-mshc - rockchip,rk3588-dw-mshc - rockchip,rv1108-dw-mshc
Signature · 1 line
2.48.1
PATCH v2 4/8 dt-bindings: clock: Add GRF clock definition for RK3528
In reply to Yao ZiThese clocks are for SD/SDIO tuning purpose and come with registers in GRF syscon.
--- include/dt-bindings/clock/rockchip,rk3528-cru.h | 6 ++++++ 1 file changed, 6 insertions(+)
include/dt-bindings/clock/rockchip,rk3528-cru.h +6 -0
@@ -414,6 +414,12 @@#define MCLK_I2S2_2CH_SAI_SRC_PRE 402#define MCLK_I2S3_8CH_SAI_SRC_PRE 403#define MCLK_SDPDIF_SRC_PRE 404 +#define SCLK_SDMMC_DRV 405 +#define SCLK_SDMMC_SAMPLE 406 +#define SCLK_SDIO0_DRV 407 +#define SCLK_SDIO0_SAMPLE 408 +#define SCLK_SDIO1_DRV 409 +#define SCLK_SDIO1_SAMPLE 410/* scmi-clocks indices */ #define SCMI_PCLK_KEYREADER 0
Signature · 1 line
2.48.1
Re: [PATCH v2 4/8] dt-bindings: clock: Add GRF clock definition for RK3528
Quoted 7 lines · Yao Zi
These clocks are for SD/SDIO tuning purpose and come with registers in GRF syscon.
Signed-off-by Yao Zi <[email protected]>--- include/dt-bindings/clock/rockchip,rk3528-cru.h | 6 ++++++ 1 file changed, 6 insertions(+)
Best regards,
Krzysztof
PATCH v2 5/8 clk: rockchip: Support MMC clocks in GRF region
In reply to Yao ZiRegisters of MMC drive/sample clocks in Rockchip RV1106 and RK3528 locate in GRF regions. Adjust MMC clock code to support register operations through regmap. Also add a helper to ease registration of GRF clocks.
--- drivers/clk/rockchip/clk-mmc-phase.c | 24 +++++++++++++--- drivers/clk/rockchip/clk.c | 42 ++++++++++++++++++++++++++++ drivers/clk/rockchip/clk.h | 20 ++++++++++++- 3 files changed, 81 insertions(+), 5 deletions(-)
drivers/clk/rockchip/clk-mmc-phase.c +20 -4
@@ -9,11 +9,14 @@#include <linux/clk-provider.h> #include <linux/io.h> #include <linux/kernel.h> +#include <linux/regmap.h> #include "clk.h" struct rockchip_mmc_clock {struct clk_hw hw;void __iomem *reg; +struct regmap *grf; +int grf_reg;int shift;int cached_phase;struct notifier_block clk_rate_change_nb;
@@ -54,7 +57,12 @@ static int rockchip_mmc_get_phase(struct clk_hw *hw)if (!rate)return 0 ; - raw_value =readl (mmc_clock->reg) >> (mmc_clock->shift); +if (mmc_clock->grf) +regmap_read (mmc_clock->grf, mmc_clock->grf_reg, &raw_value); +else + raw_value =readl (mmc_clock->reg); + + raw_value >>= mmc_clock->shift; degrees = (raw_value &ROCKCHIP_MMC_DEGREE_MASK ) *90 ;
@@ -134,8 +142,12 @@ static int rockchip_mmc_set_phase(struct clk_hw *hw, int degrees) raw_value = delay_num ?ROCKCHIP_MMC_DELAY_SEL :0 ; raw_value |= delay_num <<ROCKCHIP_MMC_DELAYNUM_OFFSET ; raw_value |= nineties; -writel (HIWORD_UPDATE (raw_value,0x07ff , mmc_clock->shift), - mmc_clock->reg); + raw_value =HIWORD_UPDATE (raw_value,0x07ff , mmc_clock->shift); + +if (mmc_clock->grf) +regmap_write (mmc_clock->grf, mmc_clock->grf_reg, raw_value); +else +writel (raw_value, mmc_clock->reg); pr_debug("%s->set_phase(%d) delay_nums=%u reg[0x%p]=0x%03x actual_degrees=%d\n", clk_hw_get_name(hw), degrees, delay_num,
@@ -189,7 +201,9 @@ static int rockchip_mmc_clk_rate_notify(struct notifier_block *nb,struct clk *rockchip_clk_register_mmc (const char *name,const char *const *parent_names,u8 num_parents, -void __iomem *reg,int shift) +void __iomem *reg, +struct regmap *grf,int grf_reg, +int shift) {struct clk_init_data init;struct rockchip_mmc_clock *mmc_clock;
@@ -208,6 +222,8 @@ struct clk *rockchip_clk_register_mmc(const char *name, mmc_clock->hw.init = &init; mmc_clock->reg = reg; + mmc_clock->grf = grf; + mmc_clock->grf_reg = grf_reg; mmc_clock->shift = shift; clk =clk_register (NULL , &mmc_clock->hw);
drivers/clk/rockchip/clk.c +42 -0
60 lines not on this page · raw message
drivers/clk/rockchip/clk.h +19 -1
@@ -594,7 +594,9 @@ struct clk *rockchip_clk_register_cpuclk(const char *name,struct clk *rockchip_clk_register_mmc (const char *name,const char *const *parent_names,u8 num_parents, -void __iomem *reg,int shift); +void __iomem *reg, +struct regmap *grf,int grf_reg, +int shift);/* * DDRCLK flags, including method of setting the rate
@@ -633,6 +635,7 @@ enum rockchip_clk_branch_type { branch_gate, branch_linked_gate, branch_mmc, + branch_mmc_grf, branch_inverter, branch_factor, branch_ddrclk,
@@ -983,6 +986,17 @@ struct rockchip_clk_branch { .div_shift = shift, \ } +#define MMC_GRF (_id, cname, pname, offset, shift) \ + { \ + .id = _id, \ + .branch_type = branch_mmc_grf, \ + .name = cname, \ + .parent_names = (const char *[]){ pname }, \ + .num_parents = 1, \ + .muxdiv_offset = offset, \ + .div_shift = shift, \ + } +#define INVERTER (_id, cname, pname, io, is, if) \ { \ .id = _id, \
@@ -1132,6 +1146,10 @@ void rockchip_clk_register_late_branches(struct device *dev,struct rockchip_clk_provider *ctx, struct rockchip_clk_branch *list, unsigned int nr_clk); +void rockchip_clk_register_grf_branches (struct rockchip_clk_provider *ctx, +struct rockchip_clk_branch *list, +struct regmap *grf, +unsigned int nr_clk);void rockchip_clk_register_plls (struct rockchip_clk_provider *ctx,struct rockchip_pll_clock *pll_list,unsigned int nr_pll,int grf_lock_offset);
Signature · 1 line
2.48.1
PATCH v2 6/8 clk: rockchip: rk3528: Add SD/SDIO tuning clocks in GRF region
In reply to Yao ZiThese clocks locate in VO and VPU GRF, serving for SD/SDIO controller tuning purpose. Add their definitions and register them in driver if corresponding GRF is available.
GRFs are looked up by compatible to simplify devicetree binding.
--- drivers/clk/rockchip/clk-rk3528.c | 61 ++++++++++++++++++++++++++++--- drivers/clk/rockchip/clk.h | 3 ++ 2 files changed, 58 insertions(+), 6 deletions(-)
drivers/clk/rockchip/clk-rk3528.c +55 -6
@@ -10,6 +10,8 @@#include <linux/of.h> #include <linux/of_device.h> #include <linux/platform_device.h> +#include <linux/mfd/syscon.h> +#include <linux/minmax.h> #include <dt-bindings/clock/rockchip,rk3528-cru.h>
@@ -1061,23 +1063,64 @@ static struct rockchip_clk_branch rk3528_clk_branches[] __initdata = { 0, 1, 1), }; +static struct rockchip_clk_branch rk3528_vo_clk_branches[]__initdata = { +MMC_GRF (SCLK_SDMMC_DRV ,"sdmmc_drv" ,"cclk_src_sdmmc0" , +RK3528_SDMMC_CON (0 ),1 ), +MMC_GRF (SCLK_SDMMC_SAMPLE ,"sdmmc_sample" ,"cclk_src_sdmmc0" , +RK3528_SDMMC_CON (1 ),1 ), +}; + +static struct rockchip_clk_branch rk3528_vpu_clk_branches[]__initdata = { +MMC_GRF (SCLK_SDIO0_DRV ,"sdio0_drv" ,"cclk_src_sdio0" , +RK3528_SDIO0_CON (0 ),1 ), +MMC_GRF (SCLK_SDIO0_SAMPLE ,"sdio0_sample" ,"cclk_src_sdio0" , +RK3528_SDIO0_CON (1 ),1 ), +MMC_GRF (SCLK_SDIO1_DRV ,"sdio1_drv" ,"cclk_src_sdio1" , +RK3528_SDIO1_CON (0 ),1 ), +MMC_GRF (SCLK_SDIO1_SAMPLE ,"sdio1_sample" ,"cclk_src_sdio1" , +RK3528_SDIO1_CON (1 ),1 ), +}; +static int __init clk_rk3528_probe (struct platform_device *pdev) { -struct rockchip_clk_provider *ctx; +unsigned long nr_vpu_branches =ARRAY_SIZE (rk3528_vpu_clk_branches); +unsigned long nr_vo_branches =ARRAY_SIZE (rk3528_vo_clk_branches); +unsigned long nr_branches =ARRAY_SIZE (rk3528_clk_branches); +unsigned long nr_clks, nr_vo_clks, nr_vpu_clks;struct device *dev = &pdev->dev;struct device_node *np = dev->of_node; -unsigned long nr_branches =ARRAY_SIZE (rk3528_clk_branches); -unsigned long nr_clks; +struct rockchip_clk_provider *ctx; +struct regmap *vo_grf, *vpu_grf;void __iomem *reg_base; - nr_clks =rockchip_clk_find_max_clk_id (rk3528_clk_branches, - nr_branches) +1 ; - reg_base =devm_platform_ioremap_resource (pdev,0 );if (IS_ERR (reg_base))return dev_err_probe (dev,PTR_ERR (reg_base),"could not map cru region" ); + nr_clks =rockchip_clk_find_max_clk_id (rk3528_clk_branches, + nr_branches) +1 ; + + vo_grf =syscon_regmap_lookup_by_compatible ("rockchip,rk3528-vo-grf" ); +if (!IS_ERR (vo_grf)) { + nr_vo_clks =rockchip_clk_find_max_clk_id (rk3528_vo_clk_branches, + nr_vo_branches) +1 ; + nr_clks =max (nr_clks, nr_vo_clks); + }else if (PTR_ERR (vo_grf) != -ENODEV ) { +return dev_err_probe (dev,PTR_ERR (vo_grf), +"failed to look up VO GRF\n" ); + } + + vpu_grf =syscon_regmap_lookup_by_compatible ("rockchip,rk3528-vpu-grf" ); +if (!IS_ERR (vpu_grf)) { + nr_vpu_clks =rockchip_clk_find_max_clk_id (rk3528_vpu_clk_branches, + nr_vpu_branches) +1 ; + nr_clks =max (nr_clks, nr_vpu_clks); + }else if (PTR_ERR (vpu_grf) != -ENODEV ) { +return dev_err_probe (dev,PTR_ERR (vpu_grf), +"failed to look up VPU GRF\n" ); + } + ctx =rockchip_clk_init (np, reg_base, nr_clks);if (IS_ERR (ctx)) return dev_err_probe(dev, PTR_ERR(ctx),
@@ -1091,6 +1134,12 @@ static int __init clk_rk3528_probe(struct platform_device *pdev) &rk3528_cpuclk_data, rk3528_cpuclk_rates, ARRAY_SIZE(rk3528_cpuclk_rates));rockchip_clk_register_branches (ctx, rk3528_clk_branches, nr_branches); +if (!IS_ERR (vo_grf)) +rockchip_clk_register_grf_branches (ctx, rk3528_vo_clk_branches, + vo_grf, nr_vo_branches); +if (!IS_ERR (vpu_grf)) +rockchip_clk_register_grf_branches (ctx, rk3528_vpu_clk_branches, + vpu_grf, nr_vpu_branches);rk3528_rst_init (np, reg_base);
drivers/clk/rockchip/clk.h +3 -0
@@ -217,6 +217,9 @@ struct clk;#define RK3528_CLKSEL_CON (x) ((x) * 0x4 + 0x300)#define RK3528_CLKGATE_CON (x) ((x) * 0x4 + 0x800)#define RK3528_SOFTRST_CON (x) ((x) * 0x4 + 0xa00) +#define RK3528_SDMMC_CON (x) ((x) * 0x4 + 0x24) +#define RK3528_SDIO0_CON (x) ((x) * 0x4 + 0x4) +#define RK3528_SDIO1_CON (x) ((x) * 0x4 + 0xc)#define RK3528_PMU_CLKSEL_CON (x) ((x) * 0x4 + 0x300 + RK3528_PMU_CRU_BASE)#define RK3528_PMU_CLKGATE_CON (x) ((x) * 0x4 + 0x800 + RK3528_PMU_CRU_BASE)#define RK3528_PCIE_CLKSEL_CON (x) ((x) * 0x4 + 0x300 + RK3528_PCIE_CRU_BASE)
Signature · 1 line
2.48.1
PATCH v2 7/8 arm64: dts: rockchip: Add SDMMC/SDIO controllers for RK3528
In reply to Yao ZiRK3528 features two SDIO controllers and one SD/MMC controller, describe them in devicetree. Since their sample and drive clocks are located in the VO and VPU GRFs, corresponding syscons are added to make these clocks available.
--- arch/arm64/boot/dts/rockchip/rk3528.dtsi | 70 ++++++++++++++++++++++++ 1 file changed, 70 insertions(+)
arch/arm64/boot/dts/rockchip/rk3528.dtsi +70 -0
@@ -130,6 +130,16 @@ gic: interrupt-controller@fed01000 { #interrupt-cells = <3>; }; + vpu_grf: syscon@ff340000 { + compatible = "rockchip,rk3528-vpu-grf", "syscon"; + reg = <0x0 0xff340000 0x0 0x8000>; + }; + + vo_grf: syscon@ff360000 { + compatible = "rockchip,rk3528-vo-grf", "syscon"; + reg = <0x0 0xff360000 0x0 0x10000>; + }; + cru: clock-controller@ff4a0000 { compatible = "rockchip,rk3528-cru"; reg = <0x0 0xff4a0000 0x0 0x30000>;
@@ -274,6 +284,66 @@ saradc: adc@ffae0000 { resets = <&cru SRST_P_SARADC>; reset-names = "saradc-apb"; #io-channel-cells = <1>; + }; + + sdio0: mmc@ffc10000 { + compatible = "rockchip,rk3528-dw-mshc", + "rockchip,rk3288-dw-mshc"; + reg = <0x0 0xffc10000 0x0 0x4000>; + clocks = <&cru HCLK_SDIO0>, + <&cru CCLK_SRC_SDIO0>, + <&cru SCLK_SDIO0_DRV>, + <&cru SCLK_SDIO0_SAMPLE>; + clock-names = "biu", "ciu", "ciu-drive", "ciu-sample"; + fifo-depth = <0x100>; + interrupts = <GIC_SPI 137 IRQ_TYPE_LEVEL_HIGH>; + max-frequency = <150000000>; + pinctrl-names = "default"; + pinctrl-0 = <&sdio0_bus4>, <&sdio0_clk>, <&sdio0_cmd>, + <&sdio0_det>, <&sdio0_pwren>; + resets = <&cru SRST_H_SDIO0>; + reset-names = "reset"; + status = "disabled"; + }; + + sdio1: mmc@ffc20000 { + compatible = "rockchip,rk3528-dw-mshc", + "rockchip,rk3288-dw-mshc"; + reg = <0x0 0xffc20000 0x0 0x4000>; + clocks = <&cru HCLK_SDIO1>, + <&cru CCLK_SRC_SDIO1>, + <&cru SCLK_SDIO1_DRV>, + <&cru SCLK_SDIO1_SAMPLE>; + clock-names = "biu", "ciu", "ciu-drive", "ciu-sample"; + fifo-depth = <0x100>; + interrupts = <GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>; + max-frequency = <150000000>; + pinctrl-names = "default"; + pinctrl-0 = <&sdio1_bus4>, <&sdio1_clk>, <&sdio1_cmd>, + <&sdio1_det>, <&sdio1_pwren>; + resets = <&cru SRST_H_SDIO1>; + reset-names = "reset"; + status = "disabled"; + }; + + sdmmc: mmc@ffc30000 { + compatible = "rockchip,rk3528-dw-mshc", + "rockchip,rk3288-dw-mshc"; + reg = <0x0 0xffc30000 0x0 0x4000>; + clocks = <&cru HCLK_SDMMC0>, + <&cru CCLK_SRC_SDMMC0>, + <&cru SCLK_SDMMC_DRV>, + <&cru SCLK_SDMMC_SAMPLE>; + clock-names = "biu", "ciu", "ciu-drive", "ciu-sample"; + fifo-depth = <0x100>; + interrupts = <GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>; + max-frequency = <150000000>; + pinctrl-names = "default"; + pinctrl-0 = <&sdmmc_bus4>, <&sdmmc_clk>, <&sdmmc_cmd>, + <&sdmmc_det>; + resets = <&cru SRST_H_SDMMC0>; + reset-names = "reset"; + rockchip,default-sample-phase = <90>; status = "disabled"; };
Signature · 1 line
2.48.1
Re: [PATCH v2 7/8] arm64: dts: rockchip: Add SDMMC/SDIO controllers for RK3528
Hi,
Quoted 5 lines
arch/arm64/boot/dts/rockchip/rk3528.dtsi +5
-0+ sdio0: mmc@ffc10000 { + compatible = "rockchip,rk3528-dw-mshc", + "rockchip,rk3288-dw-mshc"; + reg = <0x0 0xffc10000 0x0 0x4000>; + clocks = <&cru HCLK_SDIO0>,
arch/arm64/boot/dts/rockchip/rk3528.dtsi saradc: adc@ffae0000 { · line 303
Quoted 10 lines
arch/arm64/boot/dts/rockchip/rk3528.dtsi +10
-0+ <&cru CCLK_SRC_SDIO0>, + <&cru SCLK_SDIO0_DRV>, + <&cru SCLK_SDIO0_SAMPLE>; + clock-names = "biu", "ciu", "ciu-drive", "ciu-sample"; + fifo-depth = <0x100>; + interrupts = <GIC_SPI 137 IRQ_TYPE_LEVEL_HIGH>; + max-frequency = <150000000>; + pinctrl-names = "default"; + pinctrl-0 = <&sdio0_bus4>, <&sdio0_clk>, <&sdio0_cmd>, + <&sdio0_det>, <&sdio0_pwren>;
The sdio module is usually "non-removable", no need det, and pwren may be other gpio (use mmc-pwrseq). So it should be pinctrl-0 = <&sdio0_bus4>, <&sdio0_clk>, <&sdio0_cmd>;
Quoted 10 lines
arch/arm64/boot/dts/rockchip/rk3528.dtsi +10
-0+ resets = <&cru SRST_H_SDIO0>; + reset-names = "reset"; + status = "disabled"; + }; + + sdio1: mmc@ffc20000 { + compatible = "rockchip,rk3528-dw-mshc", + "rockchip,rk3288-dw-mshc"; + reg = <0x0 0xffc20000 0x0 0x4000>; + clocks = <&cru HCLK_SDIO1>,
arch/arm64/boot/dts/rockchip/rk3528.dtsi saradc: adc@ffae0000 { · line 323
Quoted 10 lines
arch/arm64/boot/dts/rockchip/rk3528.dtsi +10
-0+ <&cru CCLK_SRC_SDIO1>, + <&cru SCLK_SDIO1_DRV>, + <&cru SCLK_SDIO1_SAMPLE>; + clock-names = "biu", "ciu", "ciu-drive", "ciu-sample"; + fifo-depth = <0x100>; + interrupts = <GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>; + max-frequency = <150000000>; + pinctrl-names = "default"; + pinctrl-0 = <&sdio1_bus4>, <&sdio1_clk>, <&sdio1_cmd>, + <&sdio1_det>, <&sdio1_pwren>;
Same here.
arch/arm64/boot/dts/rockchip/rk3528.dtsi saradc: adc@ffae0000 { · line 327
Quoted 4 lines
arch/arm64/boot/dts/rockchip/rk3528.dtsi +4
-0+ resets = <&cru SRST_H_SDIO1>; + reset-names = "reset"; + status = "disabled"; + };
Thanks,
Chukun
Signature · 1 line
2.25.1
Re: [PATCH v2 7/8] arm64: dts: rockchip: Add SDMMC/SDIO controllers for RK3528
Quoted 13 lines · Chukun Pan
Hi,
Quoted 11 lines
arch/arm64/boot/dts/rockchip/rk3528.dtsi +11
-0+ sdio0: mmc@ffc10000 { + compatible = "rockchip,rk3528-dw-mshc", + "rockchip,rk3288-dw-mshc"; + reg = <0x0 0xffc10000 0x0 0x4000>; + clocks = <&cru HCLK_SDIO0>, + <&cru CCLK_SRC_SDIO0>, + <&cru SCLK_SDIO0_DRV>, + <&cru SCLK_SDIO0_SAMPLE>; + clock-names = "biu", "ciu", "ciu-drive", "ciu-sample"; + fifo-depth = <0x100>; + interrupts = <GIC_SPI 137 IRQ_TYPE_LEVEL_HIGH>;
Quoted 8 lines
arch/arm64/boot/dts/rockchip/rk3528.dtsi saradc: adc@ffae0000 { · line 303
Quoted 4 lines
arch/arm64/boot/dts/rockchip/rk3528.dtsi +4
-0+ max-frequency = <150000000>; + pinctrl-names = "default"; + pinctrl-0 = <&sdio0_bus4>, <&sdio0_clk>, <&sdio0_cmd>, + <&sdio0_det>, <&sdio0_pwren>;The sdio module is usually "non-removable", no need det, and pwren may be other gpio (use mmc-pwrseq). So it should be
pinctrl-0 = <&sdio0_bus4>, <&sdio0_clk>, <&sdio0_cmd>;
This doesn't affect the fact that these two pins are assigned as functional pins for SDIO0, as pointed out by the datasheet[1].
But with more digging, I found the reference design[2] of Rockchip actually uses the two pins as normal GPIOs. This is more obvious in downstream devicetree of an EVB[3]. Most of the existing boards (Radxa 2A, ArmSOM Sige 1) follow the reference design.
For me, it's kind of surprising that the SDIO IP functions with two functional pins assigned as different modes. I'm not sure whether we should apply pin configuration for these two pins in the SoC devicetree. Jonas, what do you think about it?
Quoted 23 lines
Quoted 10 lines
arch/arm64/boot/dts/rockchip/rk3528.dtsi +10
-0+ resets = <&cru SRST_H_SDIO0>; + reset-names = "reset"; + status = "disabled"; + }; + + sdio1: mmc@ffc20000 { + compatible = "rockchip,rk3528-dw-mshc", + "rockchip,rk3288-dw-mshc"; + reg = <0x0 0xffc20000 0x0 0x4000>; + clocks = <&cru HCLK_SDIO1>,arch/arm64/boot/dts/rockchip/rk3528.dtsi saradc: adc@ffae0000 { · line 323
Quoted 10 lines
arch/arm64/boot/dts/rockchip/rk3528.dtsi +10
-0+ <&cru CCLK_SRC_SDIO1>, + <&cru SCLK_SDIO1_DRV>, + <&cru SCLK_SDIO1_SAMPLE>; + clock-names = "biu", "ciu", "ciu-drive", "ciu-sample"; + fifo-depth = <0x100>; + interrupts = <GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>; + max-frequency = <150000000>; + pinctrl-names = "default"; + pinctrl-0 = <&sdio1_bus4>, <&sdio1_clk>, <&sdio1_cmd>, + <&sdio1_det>, <&sdio1_pwren>;Same here.
Quoted 11 lines
arch/arm64/boot/dts/rockchip/rk3528.dtsi saradc: adc@ffae0000 { · line 327
Quoted 4 lines
arch/arm64/boot/dts/rockchip/rk3528.dtsi +4
-0+ resets = <&cru SRST_H_SDIO1>; + reset-names = "reset"; + status = "disabled"; + };Thanks,
ChukunSignature · 1 line
2.25.1
Best regards,
Yao Zi
[1]: https://github.com/DeciHD/rockchip_docs/blob/main/rk3528/Rockchip%C2%A0RK3528%C2%A0Datasheet%C2%A0V1.0-20230522.pdf
[2]: https://github.com/DeciHD/rockchip_docs/blob/main/rk3528/RK3528_BOX_REF_V10_20230525.pdf
[3]: https://github.com/rockchip-linux/kernel/blob/604cec4004abe5a96c734f2fab7b74809d2d742f/arch/arm64/boot/dts/rockchip/rk3528-evb1-ddr4-v10.dtsi#L128
Re: [PATCH v2 7/8] arm64: dts: rockchip: Add SDMMC/SDIO controllers for RK3528
Quoted 31 lines · Yao Zi
Quoted 13 lines · Chukun Pan
Hi,
Quoted 11 lines
arch/arm64/boot/dts/rockchip/rk3528.dtsi +11
-0+ sdio0: mmc@ffc10000 { + compatible = "rockchip,rk3528-dw-mshc", + "rockchip,rk3288-dw-mshc"; + reg = <0x0 0xffc10000 0x0 0x4000>; + clocks = <&cru HCLK_SDIO0>, + <&cru CCLK_SRC_SDIO0>, + <&cru SCLK_SDIO0_DRV>, + <&cru SCLK_SDIO0_SAMPLE>; + clock-names = "biu", "ciu", "ciu-drive", "ciu-sample"; + fifo-depth = <0x100>; + interrupts = <GIC_SPI 137 IRQ_TYPE_LEVEL_HIGH>;Quoted 8 lines
arch/arm64/boot/dts/rockchip/rk3528.dtsi saradc: adc@ffae0000 { · line 303
Quoted 4 lines
arch/arm64/boot/dts/rockchip/rk3528.dtsi +4
-0+ max-frequency = <150000000>; + pinctrl-names = "default"; + pinctrl-0 = <&sdio0_bus4>, <&sdio0_clk>, <&sdio0_cmd>, + <&sdio0_det>, <&sdio0_pwren>;The sdio module is usually "non-removable", no need det, and pwren may be other gpio (use mmc-pwrseq). So it should be
pinctrl-0 = <&sdio0_bus4>, <&sdio0_clk>, <&sdio0_cmd>;This doesn't affect the fact that these two pins are assigned as functional pins for SDIO0, as pointed out by the datasheet[1].
But with more digging, I found the reference design[2] of Rockchip actually uses the two pins as normal GPIOs. This is more obvious in downstream devicetree of an EVB[3]. Most of the existing boards (Radxa 2A, ArmSOM Sige 1) follow the reference design.
Quoted 4 lines
For me, it's kind of surprising that the SDIO IP functions with two functional pins assigned as different modes. I'm not sure whether we should apply pin configuration for these two pins in the SoC devicetree. Jonas, what do you think about it?
I think it make sense to match the pins used by reference boards, i.e. the pinconf most likely to be used by majority of boards that will use the sdio interface.
Of my RK3528 boards, only ArmSoM Sige1 use sdio for onboard wifi and there I currently have following in my work-in-progress board DT [4]:
pinctrl-names = "default"; pinctrl-0 = <&sdio0_bus4>, <&sdio0_clk>, <&sdio0_cmd>, <&clkm1_32k_out>;
The Radxa ROCK 2A/2F seem to use USB for wifi/bt.
Regards,
Jonas
Quoted 42 lines
Quoted 24 lines
Quoted 11 lines
arch/arm64/boot/dts/rockchip/rk3528.dtsi +10
-0+ resets = <&cru SRST_H_SDIO0>; + reset-names = "reset"; + status = "disabled"; + }; + + sdio1: mmc@ffc20000 { + compatible = "rockchip,rk3528-dw-mshc", + "rockchip,rk3288-dw-mshc"; + reg = <0x0 0xffc20000 0x0 0x4000>; + clocks = <&cru HCLK_SDIO1>,arch/arm64/boot/dts/rockchip/rk3528.dtsi saradc: adc@ffae0000 { · line 323
Quoted 10 lines
arch/arm64/boot/dts/rockchip/rk3528.dtsi +10
-0+ <&cru CCLK_SRC_SDIO1>, + <&cru SCLK_SDIO1_DRV>, + <&cru SCLK_SDIO1_SAMPLE>; + clock-names = "biu", "ciu", "ciu-drive", "ciu-sample"; + fifo-depth = <0x100>; + interrupts = <GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>; + max-frequency = <150000000>; + pinctrl-names = "default"; + pinctrl-0 = <&sdio1_bus4>, <&sdio1_clk>, <&sdio1_cmd>, + <&sdio1_det>, <&sdio1_pwren>;Same here.
Quoted 11 lines
arch/arm64/boot/dts/rockchip/rk3528.dtsi saradc: adc@ffae0000 { · line 327
Quoted 4 lines
arch/arm64/boot/dts/rockchip/rk3528.dtsi +4
-0+ resets = <&cru SRST_H_SDIO1>; + reset-names = "reset"; + status = "disabled"; + };Thanks,
ChukunSignature · 1 line
2.25.1Best regards,
Yao Zi[1]: https://github.com/DeciHD/rockchip_docs/blob/main/rk3528/Rockchip%C2%A0RK3528%C2%A0Datasheet%C2%A0V1.0-20230522.pdf
[2]: https://github.com/DeciHD/rockchip_docs/blob/main/rk3528/RK3528_BOX_REF_V10_20230525.pdf
[3]: https://github.com/rockchip-linux/kernel/blob/604cec4004abe5a96c734f2fab7b74809d2d742f/arch/arm64/boot/dts/rockchip/rk3528-evb1-ddr4-v10.dtsi#L128
Re: [PATCH v2 7/8] arm64: dts: rockchip: Add SDMMC/SDIO controllers for RK3528
Quoted 32 lines · Jonas Karlman
Quoted 31 lines · Yao Zi
Quoted 13 lines · Chukun Pan
Hi,
Quoted 11 lines
arch/arm64/boot/dts/rockchip/rk3528.dtsi +11
-0+ sdio0: mmc@ffc10000 { + compatible = "rockchip,rk3528-dw-mshc", + "rockchip,rk3288-dw-mshc"; + reg = <0x0 0xffc10000 0x0 0x4000>; + clocks = <&cru HCLK_SDIO0>, + <&cru CCLK_SRC_SDIO0>, + <&cru SCLK_SDIO0_DRV>, + <&cru SCLK_SDIO0_SAMPLE>; + clock-names = "biu", "ciu", "ciu-drive", "ciu-sample"; + fifo-depth = <0x100>; + interrupts = <GIC_SPI 137 IRQ_TYPE_LEVEL_HIGH>;Quoted 8 lines
arch/arm64/boot/dts/rockchip/rk3528.dtsi saradc: adc@ffae0000 { · line 303
Quoted 4 lines
arch/arm64/boot/dts/rockchip/rk3528.dtsi +4
-0+ max-frequency = <150000000>; + pinctrl-names = "default"; + pinctrl-0 = <&sdio0_bus4>, <&sdio0_clk>, <&sdio0_cmd>, + <&sdio0_det>, <&sdio0_pwren>;The sdio module is usually "non-removable", no need det, and pwren may be other gpio (use mmc-pwrseq). So it should be
pinctrl-0 = <&sdio0_bus4>, <&sdio0_clk>, <&sdio0_cmd>;This doesn't affect the fact that these two pins are assigned as functional pins for SDIO0, as pointed out by the datasheet[1].
But with more digging, I found the reference design[2] of Rockchip actually uses the two pins as normal GPIOs. This is more obvious in downstream devicetree of an EVB[3]. Most of the existing boards (Radxa 2A, ArmSOM Sige 1) follow the reference design.
Quoted 8 lines
Quoted 4 lines
For me, it's kind of surprising that the SDIO IP functions with two functional pins assigned as different modes. I'm not sure whether we should apply pin configuration for these two pins in the SoC devicetree. Jonas, what do you think about it?
I think it make sense to match the pins used by reference boards, i.e. the pinconf most likely to be used by majority of boards that will use the sdio interface.
Thanks, will take it.
Quoted 6 lines
Of my RK3528 boards, only ArmSoM Sige1 use sdio for onboard wifi and there I currently have following in my work-in-progress board DT [4]:
pinctrl-names = "default"; pinctrl-0 = <&sdio0_bus4>, <&sdio0_clk>, <&sdio0_cmd>, <&clkm1_32k_out>;
Quoted 50 lines
The Radxa ROCK 2A/2F seem to use USB for wifi/bt.
Regards,
JonasQuoted 42 lines
Quoted 24 lines
Quoted 11 lines
arch/arm64/boot/dts/rockchip/rk3528.dtsi +10
-0+ resets = <&cru SRST_H_SDIO0>; + reset-names = "reset"; + status = "disabled"; + }; + + sdio1: mmc@ffc20000 { + compatible = "rockchip,rk3528-dw-mshc", + "rockchip,rk3288-dw-mshc"; + reg = <0x0 0xffc20000 0x0 0x4000>; + clocks = <&cru HCLK_SDIO1>,arch/arm64/boot/dts/rockchip/rk3528.dtsi saradc: adc@ffae0000 { · line 323
Quoted 10 lines
arch/arm64/boot/dts/rockchip/rk3528.dtsi +10
-0+ <&cru CCLK_SRC_SDIO1>, + <&cru SCLK_SDIO1_DRV>, + <&cru SCLK_SDIO1_SAMPLE>; + clock-names = "biu", "ciu", "ciu-drive", "ciu-sample"; + fifo-depth = <0x100>; + interrupts = <GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>; + max-frequency = <150000000>; + pinctrl-names = "default"; + pinctrl-0 = <&sdio1_bus4>, <&sdio1_clk>, <&sdio1_cmd>, + <&sdio1_det>, <&sdio1_pwren>;Same here.
Quoted 11 lines
arch/arm64/boot/dts/rockchip/rk3528.dtsi saradc: adc@ffae0000 { · line 327
Quoted 4 lines
arch/arm64/boot/dts/rockchip/rk3528.dtsi +4
-0+ resets = <&cru SRST_H_SDIO1>; + reset-names = "reset"; + status = "disabled"; + };Thanks,
ChukunSignature · 1 line
2.25.1Best regards,
Yao Zi[1]: https://github.com/DeciHD/rockchip_docs/blob/main/rk3528/Rockchip%C2%A0RK3528%C2%A0Datasheet%C2%A0V1.0-20230522.pdf
[2]: https://github.com/DeciHD/rockchip_docs/blob/main/rk3528/RK3528_BOX_REF_V10_20230525.pdf
[3]: https://github.com/rockchip-linux/kernel/blob/604cec4004abe5a96c734f2fab7b74809d2d742f/arch/arm64/boot/dts/rockchip/rk3528-evb1-ddr4-v10.dtsi#L128
Best regards,
Yao Zi
Re: [PATCH v2 7/8] arm64: dts: rockchip: Add SDMMC/SDIO controllers for RK3528
In reply to Yao ZiHi Yao Zi,
Quoted 32 lines · Yao Zi
RK3528 features two SDIO controllers and one SD/MMC controller, describe them in devicetree. Since their sample and drive clocks are located in the VO and VPU GRFs, corresponding syscons are added to make these clocks available.
Signed-off-by Yao Zi <[email protected]>--- arch/arm64/boot/dts/rockchip/rk3528.dtsi | 70 ++++++++++++++++++++++++ 1 file changed, 70 insertions(+)arch/arm64/boot/dts/rockchip/rk3528.dtsi +10
-0@@ -130,6 +130,16 @@ gic: interrupt-controller@fed01000 { #interrupt-cells = <3>; }; + vpu_grf: syscon@ff340000 { + compatible = "rockchip,rk3528-vpu-grf", "syscon"; + reg = <0x0 0xff340000 0x0 0x8000>; + }; + + vo_grf: syscon@ff360000 { + compatible = "rockchip,rk3528-vo-grf", "syscon"; + reg = <0x0 0xff360000 0x0 0x10000>; + }; + cru: clock-controller@ff4a0000 { compatible = "rockchip,rk3528-cru"; reg = <0x0 0xff4a0000 0x0 0x30000>;
arch/arm64/boot/dts/rockchip/rk3528.dtsi saradc: adc@ffae0000 { · line 287
Quoted 4 lines
arch/arm64/boot/dts/rockchip/rk3528.dtsi +1
-0@@ -274,6 +284,66 @@ saradc: adc@ffae0000 { resets = <&cru SRST_P_SARADC>; reset-names = "saradc-apb"; #io-channel-cells = <1>; + };
Look like this patch accidentally drops status = "disabled" from the adc@ffae0000 node.
Regards,
Jonas
Quoted 62 lines
arch/arm64/boot/dts/rockchip/rk3528.dtsi +59
-0+ + sdio0: mmc@ffc10000 { + compatible = "rockchip,rk3528-dw-mshc", + "rockchip,rk3288-dw-mshc"; + reg = <0x0 0xffc10000 0x0 0x4000>; + clocks = <&cru HCLK_SDIO0>, + <&cru CCLK_SRC_SDIO0>, + <&cru SCLK_SDIO0_DRV>, + <&cru SCLK_SDIO0_SAMPLE>; + clock-names = "biu", "ciu", "ciu-drive", "ciu-sample"; + fifo-depth = <0x100>; + interrupts = <GIC_SPI 137 IRQ_TYPE_LEVEL_HIGH>; + max-frequency = <150000000>; + pinctrl-names = "default"; + pinctrl-0 = <&sdio0_bus4>, <&sdio0_clk>, <&sdio0_cmd>, + <&sdio0_det>, <&sdio0_pwren>; + resets = <&cru SRST_H_SDIO0>; + reset-names = "reset"; + status = "disabled"; + }; + + sdio1: mmc@ffc20000 { + compatible = "rockchip,rk3528-dw-mshc", + "rockchip,rk3288-dw-mshc"; + reg = <0x0 0xffc20000 0x0 0x4000>; + clocks = <&cru HCLK_SDIO1>, + <&cru CCLK_SRC_SDIO1>, + <&cru SCLK_SDIO1_DRV>, + <&cru SCLK_SDIO1_SAMPLE>; + clock-names = "biu", "ciu", "ciu-drive", "ciu-sample"; + fifo-depth = <0x100>; + interrupts = <GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>; + max-frequency = <150000000>; + pinctrl-names = "default"; + pinctrl-0 = <&sdio1_bus4>, <&sdio1_clk>, <&sdio1_cmd>, + <&sdio1_det>, <&sdio1_pwren>; + resets = <&cru SRST_H_SDIO1>; + reset-names = "reset"; + status = "disabled"; + }; + + sdmmc: mmc@ffc30000 { + compatible = "rockchip,rk3528-dw-mshc", + "rockchip,rk3288-dw-mshc"; + reg = <0x0 0xffc30000 0x0 0x4000>; + clocks = <&cru HCLK_SDMMC0>, + <&cru CCLK_SRC_SDMMC0>, + <&cru SCLK_SDMMC_DRV>, + <&cru SCLK_SDMMC_SAMPLE>; + clock-names = "biu", "ciu", "ciu-drive", "ciu-sample"; + fifo-depth = <0x100>; + interrupts = <GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>; + max-frequency = <150000000>; + pinctrl-names = "default"; + pinctrl-0 = <&sdmmc_bus4>, <&sdmmc_clk>, <&sdmmc_cmd>, + <&sdmmc_det>; + resets = <&cru SRST_H_SDMMC0>; + reset-names = "reset"; + rockchip,default-sample-phase = <90>; status = "disabled"; };
Re: [PATCH v2 7/8] arm64: dts: rockchip: Add SDMMC/SDIO controllers for RK3528
Quoted 34 lines · Jonas Karlman
Hi Yao Zi,
Quoted 31 lines · Yao Zi
RK3528 features two SDIO controllers and one SD/MMC controller, describe them in devicetree. Since their sample and drive clocks are located in the VO and VPU GRFs, corresponding syscons are added to make these clocks available.
Signed-off-by Yao Zi <[email protected]>--- arch/arm64/boot/dts/rockchip/rk3528.dtsi | 70 ++++++++++++++++++++++++ 1 file changed, 70 insertions(+)arch/arm64/boot/dts/rockchip/rk3528.dtsi +10
-0@@ -130,6 +130,16 @@ gic: interrupt-controller@fed01000 { #interrupt-cells = <3>; }; + vpu_grf: syscon@ff340000 { + compatible = "rockchip,rk3528-vpu-grf", "syscon"; + reg = <0x0 0xff340000 0x0 0x8000>; + }; + + vo_grf: syscon@ff360000 { + compatible = "rockchip,rk3528-vo-grf", "syscon"; + reg = <0x0 0xff360000 0x0 0x10000>; + }; + cru: clock-controller@ff4a0000 { compatible = "rockchip,rk3528-cru"; reg = <0x0 0xff4a0000 0x0 0x30000>;
Quoted 8 lines
arch/arm64/boot/dts/rockchip/rk3528.dtsi saradc: adc@ffae0000 { · line 287
Quoted 5 lines
arch/arm64/boot/dts/rockchip/rk3528.dtsi +1
-0@@ -274,6 +284,66 @@ saradc: adc@ffae0000 { resets = <&cru SRST_P_SARADC>; reset-names = "saradc-apb"; #io-channel-cells = <1>; + };Look like this patch accidentally drops status = "disabled" from the adc@ffae0000 node.
It's a mistake during rebasing, I'll fix it in v3.
Quoted 2 lines
Regards,
Jonas
Thanks,
Yao Zi
PATCH v2 8/8 arm64: dts: rockchip: Enable SD-card interface on Radxa E20C
In reply to Yao ZiSD-card is available on Radxa E20C board.
--- .../boot/dts/rockchip/rk3528-radxa-e20c.dts | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+)
arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts +34 -0
@@ -15,6 +15,10 @@ / { model = "Radxa E20C"; compatible = "radxa,e20c", "rockchip,rk3528"; + aliases { + mmc1 = &sdmmc; + }; + chosen { stdout-path = "serial0:1500000n8"; };
@@ -104,6 +108,18 @@ vcc5v0_sys: regulator-5v0-vcc-sys { regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; }; + + vccio_sd: regulator-vccio-sd { + compatible = "regulator-gpio"; + gpios = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&sdmmc_vol_ctrl_h>; + regulator-name = "vccio_sd"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + states = <1800000 0x0>, <3300000 0x1>; + vin-supply = <&vcc5v0_sys>; + }; }; &pinctrl {
@@ -126,6 +142,12 @@ wan_led_g: wan-led-g { rockchip,pins = <4 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>; }; }; + + sdmmc { + sdmmc_vol_ctrl_h: sdmmc-vol-ctrl-h { + rockchip,pins = <4 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; }; &saradc {
@@ -133,6 +155,18 @@ &saradc { status = "okay"; }; +&sdmmc { + bus-width = <4>; + cap-mmc-highspeed; + cap-sd-highspeed; + disable-wp; + no-sdio; + sd-uhs-sdr104; + vmmc-supply = <&vcc_3v3>; + vqmmc-supply = <&vccio_sd>; + status = "okay"; +}; + &uart0 { pinctrl-names = "default"; pinctrl-0 = <&uart0m0_xfer>;
Signature · 1 line
2.48.1
Re: [PATCH v2 8/8] arm64: dts: rockchip: Enable SD-card interface on Radxa E20C
Hi,
arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts &saradc { · line 163
Quoted 6 lines
+&sdmmc {
arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts +5
-0+ bus-width = <4>; + cap-mmc-highspeed; + cap-sd-highspeed; + disable-wp; + no-sdio;
With 'no-sdio' property:
[ 129.608986] mmc_host mmc1: Bus speed (slot 0) = 400000Hz (slot req 400000Hz, actual 400000HZ div = 0) [ 130.711168] mmc1: Card stuck being busy! __mmc_poll_for_busy [ 130.725536] mmc_host mmc1: Bus speed (slot 0) = 300000Hz (slot req 300000Hz, actual 300000HZ div = 0) [ 131.751240] mmc1: Card stuck being busy! __mmc_poll_for_busy [ 131.765608] mmc_host mmc1: Bus speed (slot 0) = 200000Hz (slot req 200000Hz, actual 200000HZ div = 0) [ 132.825083] mmc1: Card stuck being busy! __mmc_poll_for_busy [ 132.839413] mmc_host mmc1: Bus speed (slot 0) = 187500Hz (slot req 187500Hz, actual 187500HZ div = 0) [ 133.960141] mmc1: Card stuck being busy! __mmc_poll_for_busy
Without 'no-sdio' property:
[ 105.224019] mmc1: error -22 whilst initialising SDIO card [ 106.290838] mmc1: Card stuck being busy! __mmc_poll_for_busy [ 106.801931] dwmmc_rockchip ffc30000.mmc: Busy; trying anyway [ 107.385835] mmc_host mmc1: Timeou sending command (cmd 0x202000 arg 0x0 status 0x80202000) [ 107.400425] mmc_host mmc1: Bus speed (slot 0) = 300000Hz (slot req 300000Hz, actual 300000HZ div = 0) [ 107.431561] mmc_host mmc1: Bus speed (slot 0) = 49800000Hz (slot req 50000000Hz, actual 49800000HZ div = 0) [ 107.433107] mmc1: new high speed SDIO card at address 0001
# cat /sys/kernel/debug/mmc1/ios clock: 50000000 Hz vdd: 21 (3.3 ~ 3.4 V) bus mode: 2 (push-pull) chip select: 0 (don't care) power mode: 2 (on) bus width: 2 (4 bits) timing spec: 2 (sd high-speed) signal voltage: 0 (3.30 V) driver type: 0 (driver type B)
Thanks,
Chukun
Signature · 1 line
2.25.1
Re: [PATCH v2 8/8] arm64: dts: rockchip: Enable SD-card interface on Radxa E20C
Quoted 19 lines · Chukun Pan
Hi,
arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts &saradc { · line 163
Quoted 6 lines
+&sdmmc {
arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts +5
-0+ bus-width = <4>; + cap-mmc-highspeed; + cap-sd-highspeed; + disable-wp; + no-sdio;With 'no-sdio' property:
[ 129.608986] mmc_host mmc1: Bus speed (slot 0) = 400000Hz (slot req 400000Hz, actual 400000HZ div = 0) [ 130.711168] mmc1: Card stuck being busy! __mmc_poll_for_busy [ 130.725536] mmc_host mmc1: Bus speed (slot 0) = 300000Hz (slot req 300000Hz, actual 300000HZ div = 0) [ 131.751240] mmc1: Card stuck being busy! __mmc_poll_for_busy [ 131.765608] mmc_host mmc1: Bus speed (slot 0) = 200000Hz (slot req 200000Hz, actual 200000HZ div = 0) [ 132.825083] mmc1: Card stuck being busy! __mmc_poll_for_busy [ 132.839413] mmc_host mmc1: Bus speed (slot 0) = 187500Hz (slot req 187500Hz, actual 187500HZ div = 0) [ 133.960141] mmc1: Card stuck being busy! __mmc_poll_for_busy
Quoted 8 lines
Without 'no-sdio' property:
[ 105.224019] mmc1: error -22 whilst initialising SDIO card [ 106.290838] mmc1: Card stuck being busy! __mmc_poll_for_busy [ 106.801931] dwmmc_rockchip ffc30000.mmc: Busy; trying anyway [ 107.385835] mmc_host mmc1: Timeou sending command (cmd 0x202000 arg 0x0 status 0x80202000) [ 107.400425] mmc_host mmc1: Bus speed (slot 0) = 300000Hz (slot req 300000Hz, actual 300000HZ div = 0) [ 107.431561] mmc_host mmc1: Bus speed (slot 0) = 49800000Hz (slot req 50000000Hz, actual 49800000HZ div = 0) [ 107.433107] mmc1: new high speed SDIO card at address 0001
So it seems the sdmmc controller actually works with SDIO commands as well? I don't expect that since the datasheet says RK3528 has only two SDIO 3.0 controllers.
We could remove the "no-sdio" property if SDIO actually works. Will apply it in the next version if there's no objection against this.
Further tests about the capabilities of the controller are welcome.
Quoted 11 lines
# cat /sys/kernel/debug/mmc1/ios clock: 50000000 Hz vdd: 21 (3.3 ~ 3.4 V) bus mode: 2 (push-pull) chip select: 0 (don't care) power mode: 2 (on) bus width: 2 (4 bits) timing spec: 2 (sd high-speed) signal voltage: 0 (3.30 V) driver type: 0 (driver type B)
Quoted 6 lines
Thanks,
ChukunSignature · 1 line
2.25.1
Best regards,
Yao Zi
Re: [PATCH v2 8/8] arm64: dts: rockchip: Enable SD-card interface on Radxa E20C
Hi Chukun,
Quoted 29 lines · Yao Zi
Quoted 19 lines · Chukun Pan
Hi,
arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts &saradc { · line 163
Quoted 6 lines
+&sdmmc {
arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts +5
-0+ bus-width = <4>; + cap-mmc-highspeed; + cap-sd-highspeed; + disable-wp; + no-sdio;With 'no-sdio' property:
[ 129.608986] mmc_host mmc1: Bus speed (slot 0) = 400000Hz (slot req 400000Hz, actual 400000HZ div = 0) [ 130.711168] mmc1: Card stuck being busy! __mmc_poll_for_busy [ 130.725536] mmc_host mmc1: Bus speed (slot 0) = 300000Hz (slot req 300000Hz, actual 300000HZ div = 0) [ 131.751240] mmc1: Card stuck being busy! __mmc_poll_for_busy [ 131.765608] mmc_host mmc1: Bus speed (slot 0) = 200000Hz (slot req 200000Hz, actual 200000HZ div = 0) [ 132.825083] mmc1: Card stuck being busy! __mmc_poll_for_busy [ 132.839413] mmc_host mmc1: Bus speed (slot 0) = 187500Hz (slot req 187500Hz, actual 187500HZ div = 0) [ 133.960141] mmc1: Card stuck being busy! __mmc_poll_for_busyQuoted 8 lines
Without 'no-sdio' property:
[ 105.224019] mmc1: error -22 whilst initialising SDIO card [ 106.290838] mmc1: Card stuck being busy! __mmc_poll_for_busy [ 106.801931] dwmmc_rockchip ffc30000.mmc: Busy; trying anyway [ 107.385835] mmc_host mmc1: Timeou sending command (cmd 0x202000 arg 0x0 status 0x80202000) [ 107.400425] mmc_host mmc1: Bus speed (slot 0) = 300000Hz (slot req 300000Hz, actual 300000HZ div = 0) [ 107.431561] mmc_host mmc1: Bus speed (slot 0) = 49800000Hz (slot req 50000000Hz, actual 49800000HZ div = 0) [ 107.433107] mmc1: new high speed SDIO card at address 0001
Quoted 6 lines
So it seems the sdmmc controller actually works with SDIO commands as well? I don't expect that since the datasheet says RK3528 has only two SDIO 3.0 controllers.
We could remove the "no-sdio" property if SDIO actually works. Will apply it in the next version if there's no objection against this.
On the E20C the sdmmc controller is routed to a microSD card slot mainly intended for use with microSD-cards and should normally not need SDIO.
What card/adapter do you have inserted in the microSD card slot that requires use of SDIO instead of just SD or MMC? What is the use case you have that requires removal of no-sdio on E20C?
Regards,
Jonas
Quoted 23 lines
Further tests about the capabilities of the controller are welcome.
Quoted 11 lines
# cat /sys/kernel/debug/mmc1/ios clock: 50000000 Hz vdd: 21 (3.3 ~ 3.4 V) bus mode: 2 (push-pull) chip select: 0 (don't care) power mode: 2 (on) bus width: 2 (4 bits) timing spec: 2 (sd high-speed) signal voltage: 0 (3.30 V) driver type: 0 (driver type B)Quoted 6 lines
Thanks,
ChukunSignature · 1 line
2.25.1Best regards,
Yao Zi
Re: [PATCH v2 8/8] arm64: dts: rockchip: Enable SD-card interface on Radxa E20C
Hi,
Quoted 6 lines
On the E20C the sdmmc controller is routed to a microSD card slot mainly intended for use with microSD-cards and should normally not need SDIO.
What card/adapter do you have inserted in the microSD card slot that requires use of SDIO instead of just SD or MMC? What is the use case you have that requires removal of no-sdio on E20C?
I inserted an sdio wifi module (via sdcard adapter) for testing. Just out of curiosity :)
Thanks,
Chukun
Signature · 1 line
2.25.1
Re: [PATCH v2 8/8] arm64: dts: rockchip: Enable SD-card interface on Radxa E20C
Quoted 11 lines · Chukun Pan
Hi,
Quoted 6 lines
On the E20C the sdmmc controller is routed to a microSD card slot mainly intended for use with microSD-cards and should normally not need SDIO.
What card/adapter do you have inserted in the microSD card slot that requires use of SDIO instead of just SD or MMC? What is the use case you have that requires removal of no-sdio on E20C?
I inserted an sdio wifi module (via sdcard adapter) for testing. Just out of curiosity :)
I doubt whether the module actually works, they usually require more pins than a simple SDIO bus to function. Additionally, it really doesn't sound like a real use case for me.
Have you tried transferring some data? The log you showed only indicates the controller doesn't bail out or freeze when encountering SDIO command sequences during initialization, but cannot prove the controller is really in a good state and could transfer as normal.
Again, connecting SDIO WiFi modules to a SDcard slot doesn't seem an usual case for me. I'll change my mind to keep SDIO sequence disabled if you didn't get the module really working but only observed the initialization didn't fail,
Quoted 6 lines
Thanks,
ChukunSignature · 1 line
2.25.1
Best regards,
Yao Zi
Re: [PATCH v2 8/8] arm64: dts: rockchip: Enable SD-card interface on Radxa E20C
In reply to Jonas KarlmanHi Jonas,
Quoted 36 lines · Jonas Karlman
Hi Chukun,
Quoted 33 lines · Yao Zi
Quoted 19 lines · Chukun Pan
Hi,
arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts &saradc { · line 163
Quoted 6 lines
+&sdmmc {
arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts +5
-0+ bus-width = <4>; + cap-mmc-highspeed; + cap-sd-highspeed; + disable-wp; + no-sdio;With 'no-sdio' property:
[ 129.608986] mmc_host mmc1: Bus speed (slot 0) = 400000Hz (slot req 400000Hz, actual 400000HZ div = 0) [ 130.711168] mmc1: Card stuck being busy! __mmc_poll_for_busy [ 130.725536] mmc_host mmc1: Bus speed (slot 0) = 300000Hz (slot req 300000Hz, actual 300000HZ div = 0) [ 131.751240] mmc1: Card stuck being busy! __mmc_poll_for_busy [ 131.765608] mmc_host mmc1: Bus speed (slot 0) = 200000Hz (slot req 200000Hz, actual 200000HZ div = 0) [ 132.825083] mmc1: Card stuck being busy! __mmc_poll_for_busy [ 132.839413] mmc_host mmc1: Bus speed (slot 0) = 187500Hz (slot req 187500Hz, actual 187500HZ div = 0) [ 133.960141] mmc1: Card stuck being busy! __mmc_poll_for_busyQuoted 8 lines
Without 'no-sdio' property:
[ 105.224019] mmc1: error -22 whilst initialising SDIO card [ 106.290838] mmc1: Card stuck being busy! __mmc_poll_for_busy [ 106.801931] dwmmc_rockchip ffc30000.mmc: Busy; trying anyway [ 107.385835] mmc_host mmc1: Timeou sending command (cmd 0x202000 arg 0x0 status 0x80202000) [ 107.400425] mmc_host mmc1: Bus speed (slot 0) = 300000Hz (slot req 300000Hz, actual 300000HZ div = 0) [ 107.431561] mmc_host mmc1: Bus speed (slot 0) = 49800000Hz (slot req 50000000Hz, actual 49800000HZ div = 0) [ 107.433107] mmc1: new high speed SDIO card at address 0001So it seems the sdmmc controller actually works with SDIO commands as well? I don't expect that since the datasheet says RK3528 has only two SDIO 3.0 controllers.
Quoted 5 lines
Quoted 2 lines
We could remove the "no-sdio" property if SDIO actually works. Will apply it in the next version if there's no objection against this.
On the E20C the sdmmc controller is routed to a microSD card slot mainly intended for use with microSD-cards and should normally not need SDIO.
As pointed out by Chukun, I found the hardware design guide for RK3528[1] (in Chinese) does claim that SDIO 3.0 is supported on all these three controllers in Chapter 2.3.1 (SDMMC/SDIO),
RK3528 集成了 1 个 SDMMC 控制器和 2 个 SDIO 控制器,均可支持 SDIO3.0 协 议,以及 MMC V4.51 协议。其中 SDIO0 和 SDIO1 最高可支持 200MHz,SDMMC 最高只支持到 150MHz
translated to English,
RK3528 integrates one SDMMC controller and two SDIO controllers, all support SDIO3.0 protocol and MMC V4.51 protocol. Among them SDIO0 and SDIO1 support 200MHz frequency at maximum, and SDMMC supports up to 150MHz.
So I think there's no reason to explicitly deny SDIO initialization sequence for the controller on Radxa E20C. imho this won't break anything even for a sdcard slot, will it?
Additionally, this piece of information points out that wrong max-frequency is set for SDIO{0,1}. Rockchip overrides the frequency in devicetrees for the demo boards[2], I'm not sure whether it's for some speical reason or not.
Since I don't have a SDIO-capable board on hand, could you please test whether 200MHz actually works? If so I'll correct the SoC devicetree in v3.
Quoted 4 lines
What card/adapter do you have inserted in the microSD card slot that requires use of SDIO instead of just SD or MMC? What is the use case you have that requires removal of no-sdio on E20C?
Quoted 27 lines
Regards,
JonasQuoted 23 lines
Further tests about the capabilities of the controller are welcome.
Quoted 11 lines
# cat /sys/kernel/debug/mmc1/ios clock: 50000000 Hz vdd: 21 (3.3 ~ 3.4 V) bus mode: 2 (push-pull) chip select: 0 (don't care) power mode: 2 (on) bus width: 2 (4 bits) timing spec: 2 (sd high-speed) signal voltage: 0 (3.30 V) driver type: 0 (driver type B)Quoted 6 lines
Thanks,
ChukunSignature · 1 line
2.25.1Best regards,
Yao Zi
Thanks,
Yao Zi
[1]: https://github.com/DeciHD/rockchip_docs/blob/main/rk3528/RK3528%20Hardware%20Design%20Guide-CN-V1.0-20230525.pdf
[2]: https://github.com/rockchip-linux/kernel/blob/604cec4004abe5a96c734f2fab7b74809d2d742f/arch/arm64/boot/dts/rockchip/rk3528-demo1-lp4-v10.dtsi#L47
Re: [PATCH v2 8/8] arm64: dts: rockchip: Enable SD-card interface on Radxa E20C
Quoted 55 lines · Yao Zi
Hi Jonas,
Quoted 36 lines · Jonas Karlman
Hi Chukun,
Quoted 33 lines · Yao Zi
Quoted 19 lines · Chukun Pan
Hi,
arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts &saradc { · line 163
Quoted 6 lines
+&sdmmc {
arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts +5
-0+ bus-width = <4>; + cap-mmc-highspeed; + cap-sd-highspeed; + disable-wp; + no-sdio;With 'no-sdio' property:
[ 129.608986] mmc_host mmc1: Bus speed (slot 0) = 400000Hz (slot req 400000Hz, actual 400000HZ div = 0) [ 130.711168] mmc1: Card stuck being busy! __mmc_poll_for_busy [ 130.725536] mmc_host mmc1: Bus speed (slot 0) = 300000Hz (slot req 300000Hz, actual 300000HZ div = 0) [ 131.751240] mmc1: Card stuck being busy! __mmc_poll_for_busy [ 131.765608] mmc_host mmc1: Bus speed (slot 0) = 200000Hz (slot req 200000Hz, actual 200000HZ div = 0) [ 132.825083] mmc1: Card stuck being busy! __mmc_poll_for_busy [ 132.839413] mmc_host mmc1: Bus speed (slot 0) = 187500Hz (slot req 187500Hz, actual 187500HZ div = 0) [ 133.960141] mmc1: Card stuck being busy! __mmc_poll_for_busyQuoted 8 lines
Without 'no-sdio' property:
[ 105.224019] mmc1: error -22 whilst initialising SDIO card [ 106.290838] mmc1: Card stuck being busy! __mmc_poll_for_busy [ 106.801931] dwmmc_rockchip ffc30000.mmc: Busy; trying anyway [ 107.385835] mmc_host mmc1: Timeou sending command (cmd 0x202000 arg 0x0 status 0x80202000) [ 107.400425] mmc_host mmc1: Bus speed (slot 0) = 300000Hz (slot req 300000Hz, actual 300000HZ div = 0) [ 107.431561] mmc_host mmc1: Bus speed (slot 0) = 49800000Hz (slot req 50000000Hz, actual 49800000HZ div = 0) [ 107.433107] mmc1: new high speed SDIO card at address 0001So it seems the sdmmc controller actually works with SDIO commands as well? I don't expect that since the datasheet says RK3528 has only two SDIO 3.0 controllers.
Quoted 5 lines
Quoted 2 lines
We could remove the "no-sdio" property if SDIO actually works. Will apply it in the next version if there's no objection against this.
On the E20C the sdmmc controller is routed to a microSD card slot mainly intended for use with microSD-cards and should normally not need SDIO.
As pointed out by Chukun, I found the hardware design guide for RK3528[1] (in Chinese) does claim that SDIO 3.0 is supported on all these three controllers in Chapter 2.3.1 (SDMMC/SDIO),
RK3528 集成了 1 个 SDMMC 控制器和 2 个 SDIO 控制器,均可支持 SDIO3.0 协 议,以及 MMC V4.51 协议。其中 SDIO0 和 SDIO1 最高可支持 200MHz,SDMMC 最高只支持到 150MHz
translated to English,
Quoted 8 lines
RK3528 integrates one SDMMC controller and two SDIO controllers, all support SDIO3.0 protocol and MMC V4.51 protocol. Among them SDIO0 and SDIO1 support 200MHz frequency at maximum, and SDMMC supports up to 150MHz.
So I think there's no reason to explicitly deny SDIO initialization sequence for the controller on Radxa E20C. imho this won't break anything even for a sdcard slot, will it?
I have no strong opinion on this, just something I have done on a few boards recently.
When sd/sdio/mmc controller is attached to a microSD card slot I add no-sdio, when my uSD to eMMC adapter is not working I also add no-mmc.
Similar if the controller is attached to emmc, I add no-sd and no-sdio, and if used for sdio wifi, I add no-sd and no-mmc.
Mostly to minimize initialization time when slot is unpopulated or card or module is faulty.
Not sure how common it is to use a microSD to SDIO adapter, sound like an uncommon edge case, possible by someone who would know how to create and use a dt-overlay. I also do not think there will be a common use case with a uSD to eMMC adapter, however that is something this board vendor sell themself [3], so may be a slightly more likely use case.
[3] https://radxa.com/products/accessories/emmc-to-usd
Use of these no- props could possible be considered configuration and not information about the board hw design, so I am torn and as mentioned above, I have no strong opinion about keeping no-sdio or not.
Quoted 9 lines
Additionally, this piece of information points out that wrong max-frequency is set for SDIO{0,1}. Rockchip overrides the frequency in devicetrees for the demo boards[2], I'm not sure whether it's for some speical reason or not.
Since I don't have a SDIO-capable board on hand, could you please test whether 200MHz actually works? If so I'll correct the SoC devicetree in v3.
I would change to use default 200MHz as stated in the HW design guide.
Did a short boot test on my Sige1 board and the SDIO module can at least be identified using 200 MHz:
dwmmc_rockchip ffc10000.mmc: IDMAC supports 32-bit address mode.
dwmmc_rockchip ffc10000.mmc: Using internal DMA controller.
dwmmc_rockchip ffc10000.mmc: Version ID is 270a
dwmmc_rockchip ffc10000.mmc: DW MMC controller at irq 35,32 bit host data width,256 deep fifo mmc_host mmc2: card is non-removable.
mmc_host mmc2: Bus speed (slot 0) = 400000Hz (slot req 400000Hz, actual 400000HZ div = 0) mmc_host mmc2: Bus speed (slot 0) = 198000000Hz (slot req 200000000Hz, actual 198000000HZ div = 0) dwmmc_rockchip ffc10000.mmc: Successfully tuned phase to 30
mmc2: new UHS-I speed SDR104 SDIO card at address 0001
brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43752-sdio for chip BCM43752/2 brcmfmac mmc2:0001:1: Direct firmware load for brcm/brcmfmac43752-sdio.armsom,sige1.bin failed with error -2 brcmfmac mmc2:0001:1: Direct firmware load for brcm/brcmfmac43752-sdio.bin failed with error -2
brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50
~ # cat /sys/kernel/debug/mmc2/ios
clock: 200000000 Hz actual clock: 198000000 Hz vdd: 21 (3.3 ~ 3.4 V) bus mode: 2 (push-pull) chip select: 0 (don't care) power mode: 2 (on) bus width: 2 (4 bits) timing spec: 6 (sd uhs SDR104)
signal voltage: 1 (1.80 V)
driver type: 0 (driver type B)
If it turns out to be any instability issues for a specific board using default 200 MHz, such board can always define a lower max-frequency in its board .dts-file.
Regards,
Jonas
Quoted 38 lines
Quoted 32 lines
What card/adapter do you have inserted in the microSD card slot that requires use of SDIO instead of just SD or MMC? What is the use case you have that requires removal of no-sdio on E20C?
Regards,
JonasQuoted 23 lines
Further tests about the capabilities of the controller are welcome.
Quoted 11 lines
# cat /sys/kernel/debug/mmc1/ios clock: 50000000 Hz vdd: 21 (3.3 ~ 3.4 V) bus mode: 2 (push-pull) chip select: 0 (don't care) power mode: 2 (on) bus width: 2 (4 bits) timing spec: 2 (sd high-speed) signal voltage: 0 (3.30 V) driver type: 0 (driver type B)Quoted 6 lines
Thanks,
ChukunSignature · 1 line
2.25.1Best regards,
Yao ZiThanks,
Yao Zi[1]: https://github.com/DeciHD/rockchip_docs/blob/main/rk3528/RK3528%20Hardware%20Design%20Guide-CN-V1.0-20230525.pdf
[2]: https://github.com/rockchip-linux/kernel/blob/604cec4004abe5a96c734f2fab7b74809d2d742f/arch/arm64/boot/dts/rockchip/rk3528-demo1-lp4-v10.dtsi#L47
Re: (subset) [PATCH v2 0/8] Support SD/SDIO controllers on RK3528
In reply to Yao ZiQuoted 8 lines · Yao Zi
RK3528 features two SDIO controllers and one SD/MMC controller. This series adds essential support for their tuning clocks, document the controller in dt-bindings and bring the SD/MMC one up on Radxa E20C board. Both HS and SDR104 mode are verified.
This is based on v2 of the SARADC series[1]
[...]
Applied, thanks!
[1/8] dt-bindings: soc: rockchip: Add RK3528 VO GRF syscon
commit: efc1bc1f36568a4297d20a691758b68c121cf982
[2/8] dt-bindings: soc: rockchip: Add RK3528 VPU GRF syscon
commit: 8f814d7c9f6cdffc1f5cc97637e12cd699ff9085Best regards,
Signature · 1 line
Heiko Stuebner <[email protected]>