OF_PLATDATA questions on rk3399 platfrom
hi simon,
I need to achieve emmc_phy physical address in driver, so that I can configure phy in different scenarios (phy register address should be 0xff77f780). see below:
sdhci: sdhci at fe330000 {
phys = <&emmc_phy>;
phy-names = "phy_arasan";
};
grf: syscon at ff770000 {
reg = <0x0 0xff770000 0x0 0x10000>;
emmc_phy: phy at f780 {
compatible = "rockchip,rk3399-emmc-phy";
reg = <0xf780 0x24>;
#phy-cells = <0>;
status = "disabled";
};
}; AKA, I can't use libfdt if OF_PLATDATA is enabled, so how to get it?
Hi Ziyuan,
Quoted 23 lines · Ziyuan
hi simon,
I need to achieve
emmc_phyphysical address in driver, so that I can configure phy in different scenarios (phy register address should be0xff77f780). see below:sdhci: sdhci at fe330000 { phys = <&emmc_phy>; phy-names = "phy_arasan"; }; grf: syscon at ff770000 { reg = <0x0 0xff770000 0x0 0x10000>; emmc_phy: phy at f780 { compatible = "rockchip,rk3399-emmc-phy"; reg = <0xf780 0x24>; #phy-cells = <0>; status = "disabled"; }; };
Quoted 2 lines
AKA, I can't use libfdt if
OF_PLATDATAis enabled, so how to get it?
At present this is not supported. I'm not quite sure how to support it, or at least the best way. Do you have ideas on what the C structure should be for this?
Regards,
Simon
Hi Ziyuan, Simon,
Quoted 26 lines · Simon Glass
Hi Ziyuan,
Quoted 23 lines · Ziyuan
hi simon,
I need to achieve
emmc_phyphysical address in driver, so that I can configure phy in different scenarios (phy register address should be0xff77f780). see below:sdhci: sdhci at fe330000 { phys = <&emmc_phy>; phy-names = "phy_arasan"; }; grf: syscon at ff770000 { reg = <0x0 0xff770000 0x0 0x10000>; emmc_phy: phy at f780 { compatible = "rockchip,rk3399-emmc-phy"; reg = <0xf780 0x24>; #phy-cells = <0>; status = "disabled"; }; };
Quoted 5 lines
Quoted 2 lines
AKA, I can't use libfdt if
OF_PLATDATAis enabled, so how to get it?At present this is not supported. I'm not quite sure how to support it, or at least the best way. Do you have ideas on what the C structure should be for this?
I don't know how much operation for grf access is needed in SPL,
but I think driver in SPL should be simple, and OF_PLATDATA is also for
reduce memory size requirement in SPL. If operation is not much, can we
just use the GRF base address directly when OF_PLATDATA enabled? just
like other GRF access in SPL on different board files.
Thanks,
- Kever
Quoted 4 lines
Regards,
Simon
Hi Kever,
Quoted 41 lines · Kever Yang
Hi Ziyuan, Simon,
Quoted 28 lines · Simon Glass
Hi Ziyuan,
Quoted 24 lines · Ziyuan
hi simon,
I need to achieve
emmc_phyphysical address in driver, so that I can configure phy in different scenarios (phy register address should be0xff77f780). see below:sdhci: sdhci at fe330000 { phys = <&emmc_phy>; phy-names = "phy_arasan"; }; grf: syscon at ff770000 { reg = <0x0 0xff770000 0x0 0x10000>; emmc_phy: phy at f780 { compatible = "rockchip,rk3399-emmc-phy"; reg = <0xf780 0x24>; #phy-cells = <0>; status = "disabled"; }; };Quoted 5 lines
Quoted 2 lines
AKA, I can't use libfdt if
OF_PLATDATAis enabled, so how to get it?At present this is not supported. I'm not quite sure how to support it, or at least the best way. Do you have ideas on what the C structure should be for this?
I don't know how much operation for grf access is needed in SPL,
Quoted 7 lines
but I think driver in SPL should be simple, and
OF_PLATDATAis also forreduce memory size requirement in SPL. If operation is not much, can we
just use the GRF base address directly when
OF_PLATDATAenabled? justlike other GRF access in SPL on different board files.
I think in another thread you are hoping to use syscon/regmap for this. Please let me know if this is not the case.
Regards,
Simon