ARM: sunxi: Add Reduced Serial Bus (RSB) controller support
Subsystems (2)
v6 cover ARM: sunxi: Add Reduced Serial Bus (RSB) controller support
Hi Arnd, Kevin, Olof,
As discussed on IRC, here is a resend of these RSB patches, to merge for 4.4.
The original cover letter was:
This is v6 of the Allwinner Reduced Serial Bus driver. This version puts the driver under drivers/bus instead of drivers/soc/sunxi. There are no changes to the binding or the driver itself.
The series is based on v4.3-rc1.
Thanks!
Maxime
Chen-Yu Tsai (2):
bus: sunxi-rsb: Add Allwinner Reduced Serial Bus (RSB) controller
bindings
bus: sunxi-rsb: Add driver for Allwinner Reduced Serial Bus
.../devicetree/bindings/bus/sunxi-rsb.txt | 47 ++ drivers/bus/Kconfig | 11 + drivers/bus/Makefile | 1 + drivers/bus/sunxi-rsb.c | 783 +++++++++++++++++++++ include/linux/sunxi-rsb.h | 105 +++ 5 files changed, 947 insertions(+) create mode 100644 Documentation/devicetree/bindings/bus/sunxi-rsb.txt create mode 100644 drivers/bus/sunxi-rsb.c create mode 100644 include/linux/sunxi-rsb.h
Signature · 1 line
2.6.2
PATCH RESEND v6 1/2 bus: sunxi-rsb: Add Allwinner Reduced Serial Bus (RSB) controller bindings
From: Chen-Yu Tsai <[email protected]>
Reduced Serial Bus is a proprietary 2-line push-pull serial bus supporting multiple slave devices. It was developed by Allwinner, Inc. and used by Allwinner and X-Powers, Inc. for their line of PMICs and other peripheral ICs.
Recent Allwinner SoCs, starting with the A23, have an RSB controller. This is used to talk to the PMIC, and later with the A80 and A83 platform, the audio codec IC.
--- .../devicetree/bindings/bus/sunxi-rsb.txt | 47 ++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 Documentation/devicetree/bindings/bus/sunxi-rsb.txt
Documentation/devicetree/bindings/bus/sunxi-rsb.txt new file +47 -0
@@ -0,0 +1,47 @@ +Allwinner Reduced Serial Bus (RSB) controller + +The RSB controller found on later Allwinner SoCs is an SMBus like 2 wire +serial bus with 1 master and up to 15 slaves. It is represented by a node +for the controller itself, and child nodes representing the slave devices. + +Required properties : + + - reg : Offset and length of the register set for the controller. + - compatible : Shall be "allwinner,sun8i-a23-rsb". + - interrupts : The interrupt line associated to the RSB controller. + - clocks : The gate clk associated to the RSB controller. + - resets : The reset line associated to the RSB controller. + - #address-cells : shall be 1 + - #size-cells : shall be 0 + +Optional properties : + + - clock-frequency : Desired RSB bus clock frequency in Hz. Maximum is 20MHz. + If not set this defaults to 3MHz. + +Child nodes: + +An RSB controller node can contain zero or more child nodes representing +slave devices on the bus. Child 'reg' properties should contain the slave +device's hardware address. The hardware address is hardwired in the device, +which can normally be found in the datasheet. + +Example: + + rsb at 01f03400 { + compatible = "allwinner,sun8i-a23-rsb"; + reg = <0x01f03400 0x400>; + interrupts = <0 39 4>; + clocks = <&apb0_gates 3>; + clock-frequency = <3000000>; + resets = <&apb0_rst 3>; + #address-cells = <1>; + #size-cells = <0>; + + pmic at 3e3 { + compatible = "..."; + reg = <0x3e3>; + + /* ... */ + }; + };
Signature · 1 line
2.6.2
PATCH RESEND v6 2/2 bus: sunxi-rsb: Add driver for Allwinner Reduced Serial Bus
In reply to Maxime RipardFrom: Chen-Yu Tsai <[email protected]>
Reduced Serial Bus (RSB) is an Allwinner proprietery interface used to communicate with PMICs and other peripheral ICs.
RSB is a two-wire push-pull serial bus that supports 1 master device and up to 15 active slave devices.
--- drivers/bus/Kconfig | 11 + drivers/bus/Makefile | 1 + drivers/bus/sunxi-rsb.c | 783 ++++++++++++++++++++++++++++++++++++++++++++++ include/linux/sunxi-rsb.h | 105 +++++++ 4 files changed, 900 insertions(+) create mode 100644 drivers/bus/sunxi-rsb.c create mode 100644 include/linux/sunxi-rsb.h
drivers/bus/Kconfig +11 -0
@@ -120,6 +120,17 @@ config SIMPLE_PM_BUS Controller (BSC, sometimes called "LBSC within Bus Bridge", or "External Bus Interface") as found on several Renesas ARM SoCs. +config SUNXI_RSB + tristate "Allwinner sunXi Reduced Serial Bus Driver" + default MACH_SUN8I || MACH_SUN9I + depends on ARCH_SUNXI + select REGMAP + help + Say y here to enable support for Allwinner's Reduced Serial Bus + (RSB) support. This controller is responsible for communicating + with various RSB based devices, such as AXP223, AXP8XX PMICs, + and AC100/AC200 ICs. + config VEXPRESS_CONFIG bool "Versatile Express configuration bus" default y if ARCH_VEXPRESS
drivers/bus/Makefile +1 -0
@@ -15,5 +15,6 @@ obj-$(CONFIG_MVEBU_MBUS) += mvebu-mbus.o obj-$(CONFIG_OMAP_INTERCONNECT) += omap_l3_smx.o omap_l3_noc.o obj-$(CONFIG_OMAP_OCP2SCP) += omap-ocp2scp.o +obj-$(CONFIG_SUNXI_RSB) += sunxi-rsb.o obj-$(CONFIG_SIMPLE_PM_BUS) += simple-pm-bus.o obj-$(CONFIG_VEXPRESS_CONFIG) += vexpress-config.o
drivers/bus/sunxi-rsb.c new file +783 -0
783 lines not on this page · raw message
include/linux/sunxi-rsb.h new file +105 -0
105 lines not on this page · raw message
Signature · 1 line
2.6.2
v6 cover ARM: sunxi: Add Reduced Serial Bus (RSB) controller support
In reply to Maxime RipardHi Arnd, Kevin, Olof,
Quoted 4 lines · Maxime Ripard
Hi Arnd, Kevin, Olof,
As discussed on IRC, here is a resend of these RSB patches, to merge for 4.4.
Please merge them on a topic branch, so we can try to merge other patches depending on them. If possible I'd like to get an actual user in 4.4, otherwise this driver won't get any usage until the next merge window.
I'll try to send out a new version of the AXP223 patches later today.
Thanks!
Regards
ChenYu
Quoted 29 lines
The original cover letter was:
This is v6 of the Allwinner Reduced Serial Bus driver. This version puts the driver under
drivers/businstead ofdrivers/soc/sunxi. There are no changes to the binding or the driver itself.The series is based on v4.3-rc1.
Thanks!
MaximeChen-Yu Tsai (2):
bus: sunxi-rsb: Add Allwinner Reduced Serial Bus (RSB) controller
bindings
bus: sunxi-rsb: Add driver for Allwinner Reduced Serial Bus.../devicetree/bindings/bus/sunxi-rsb.txt | 47 ++ drivers/bus/Kconfig | 11 + drivers/bus/Makefile | 1 + drivers/bus/sunxi-rsb.c | 783 +++++++++++++++++++++ include/linux/sunxi-rsb.h | 105 +++ 5 files changed, 947 insertions(+) create mode 100644 Documentation/devicetree/bindings/bus/sunxi-rsb.txt create mode 100644 drivers/bus/sunxi-rsb.c create mode 100644 include/linux/sunxi-rsb.h--
2.6.2
v6 cover ARM: sunxi: Add Reduced Serial Bus (RSB) controller support
Quoted 9 lines · Chen-Yu Tsai
Hi Arnd, Kevin, Olof,
Quoted 4 lines · Maxime Ripard
Hi Arnd, Kevin, Olof,
As discussed on IRC, here is a resend of these RSB patches, to merge for 4.4.
Quoted 6 lines
Please merge them on a topic branch, so we can try to merge other patches depending on them. If possible I'd like to get an actual user in 4.4, otherwise this driver won't get any usage until the next merge window.
I'll try to send out a new version of the AXP223 patches later today.
It's too late to make 4.4, rc7 is upon us. But the good news is that for 4.4 there's no need to add cross-tree dependencies to get the shared base, which is a good thing.
So, given timing I'll apply these directly without a topic branch.
-Olof