RSB Information Request
#1
Hello,

I'm porting RSB (Reduced Serial Bus) driver for PMIC development.
In mainline kernel, it seems RSB driver is supported. According to RSB DT bindings, it requires clock gate and reset line.
However, I can't find them in Allwinner A64 user manual. I think register information below should be described in the document but nothing.

    Clock gate number (PLL_XXX_CTRL_REG)
    Reset register information (BUS_SOFT_RST_REGX)

Both DT properties are mandatory in the driver, so RSB subsystem will not work without these specifiers.
Or Am I missing something?

Best regards,
Milo
#2
(03-06-2016, 07:59 PM)Milo Kim Wrote: Hello,

I'm porting RSB (Reduced Serial Bus) driver for PMIC development.
In mainline kernel, it seems RSB driver is supported. According to RSB DT bindings, it requires clock gate and reset line.
However, I can't find them in Allwinner A64 user manual. I think register information below should be described in the document but nothing.

    Clock gate number (PLL_XXX_CTRL_REG)
    Reset register information (BUS_SOFT_RST_REGX)

Both DT properties are mandatory in the driver, so RSB subsystem will work without these specifiers.
Or Am I missing something?

Best regards,
Milo
@milo, you can probe at Sunxi IRC, http://irclog.whitequark.org/linux-sunxi , and they may have some suggestion.
#3
@milo
Talk with Apritzel and SSVB - they have been working on that.
#4
Hi,

there is no elaborate RSB information in the manual. For a  generic register and functionality description you can look at the A80 manual, which is somewhere at linux-sunxi.org. There is _some_ information about the A64 specific whereabouts of the RSB, namely the MMIO address, the GPIO lines and the interrupt, hidden in the various sections of the A64 manual, namely the "Memory Mapping", the GIC description and the port controller section. Searching for "RSB" in the manual should give you the bits.

For further details usually the most reliable information is in the BSP, preferrably in the Linux kernel tree, but also the U-Boot code is a good source and easier to parse mostly. In the case of the RSB it's not too much information there, since in the Allwinner firmware the RSB is only driven by the arisc, which is the separate OpenRISC core (called CPUS in Allwinner's manual) in the SoC. Therefore this information is mostly hidden in this (closed source) blob. And that's why you actually shouldn't drive the AXP from Linux, since you will definitely step on the arisc's toes. You can do so when you either not disable the arisc code or leave it out at all.

In my experiments with U-Boot (without the arisc) I didn't manage to initialize the RSB properly, despite apperently having the proper bits set. I need to investigate if this is related to some default security settings forbidding access to the RSB from the non-secure world. I hope that we get away without driving the arisc from Linux by just setting up the proper bits once in U-Boot at boot time.

Cheers,
Andre
#5
Hi Andre,
Thanks for detailed description. So Linux kernel can't access AXP803 at this moment. It means all LDO & BUCKs are controlled in boot code and are never changed at run time.
In other words, regulator driver should expose all them as statically - 'regulator-fixed' for regulator consumers.
Another problem is no way to handle AXP interrupts (like charger) in Linux because IRQ pin will be de-asserted by writing '1' to status bit.

Hi Pine64 team,
Do you have any plan to change PMIC interface from RSB to I2C (TWI) later?

Best regards,
Milo
#6
(03-07-2016, 11:38 PM)Milo Kim Wrote: Hi Andre,
Thanks for detailed description. So Linux kernel can't access AXP803 at this moment. It means all LDO & BUCKs are controlled in boot code and are never changed at run time.
In other words, regulator driver should expose all them as statically - 'regulator-fixed' for regulator consumers.
Another problem is no way to handle AXP interrupts (like charger) in Linux because IRQ pin will be de-asserted by writing '1' to status bit.

Hi Pine64 team,
Do you have any plan to change PMIC interface from RSB to I2C (TWI) later?

Best regards,
Milo

@milo, change an existing interface is serious decision and cannot be make lightly. This due to such change will affect existing board operation and OS. Unless there is a well plan decision, we will not change PMIC interface from RSB to I2C. I can check with Allwinner on RSB information release but may takes some time.
... TL Lim
#7
(03-08-2016, 12:51 AM)tllim Wrote:
(03-07-2016, 11:38 PM)Milo Kim Wrote: Hi Andre,
Thanks for detailed description. So Linux kernel can't access AXP803 at this moment. It means all LDO & BUCKs are controlled in boot code and are never changed at run time.
In other words, regulator driver should expose all them as statically - 'regulator-fixed' for regulator consumers.
Another problem is no way to handle AXP interrupts (like charger) in Linux because IRQ pin will be de-asserted by writing '1' to status bit.

Hi Pine64 team,
Do you have any plan to change PMIC interface from RSB to I2C (TWI) later?

Best regards,
Milo

@milo, change an existing interface is serious decision and cannot be make lightly. This due to such change will affect existing board operation and OS. Unless there is a well plan decision, we will not change PMIC interface from RSB to I2C. I can check with Allwinner on RSB information release but may takes some time.
... TL Lim

Fully understood. Thanks for your help.

Best regards,
Milo
#8
(03-08-2016, 01:12 AM)Milo Kim Wrote:
(03-08-2016, 12:51 AM)tllim Wrote:
(03-07-2016, 11:38 PM)Milo Kim Wrote: Hi Andre,
Thanks for detailed description. So Linux kernel can't access AXP803 at this moment. It means all LDO & BUCKs are controlled in boot code and are never changed at run time.
In other words, regulator driver should expose all them as statically - 'regulator-fixed' for regulator consumers.
Another problem is no way to handle AXP interrupts (like charger) in Linux because IRQ pin will be de-asserted by writing '1' to status bit.

Hi Pine64 team,
Do you have any plan to change PMIC interface from RSB to I2C (TWI) later?

Best regards,
Milo

@milo, change an existing interface is serious decision and cannot be make lightly. This due to such change will affect existing board operation and OS. Unless there is a well plan decision, we will not change PMIC interface from RSB to I2C. I can check with Allwinner on RSB information release but may takes some time.
... TL Lim

Fully understood. Thanks for your help.

Best regards,
Milo

@milo, here is the RSB source code link the Allwinner release for A83 which is same for A64, hopefully this help: https://github.com/allwinner-zh/bootload...dram/rsb.c
#9
Milo,

Did you ever make any headway with this? I'd hope so and that perhaps your work would lead to us being able to poll the PMIC as to what the input source currently is.


Possibly Related Threads…
Thread Author Replies Views Last Post
  1st Debian image and further information umiddelb 13 20,284 03-04-2016, 02:08 AM
Last Post: umiddelb
  Allwinner Mali Information? KPhillisJr 2 6,493 01-14-2016, 03:05 AM
Last Post: taros

Forum Jump:


Users browsing this thread: 1 Guest(s)