mbox series

[v9,0/4] RTL9300 support for reboot and i2c

Message ID 20241106001835.2725522-1-chris.packham@alliedtelesis.co.nz
Headers show
Series RTL9300 support for reboot and i2c | expand

Message

Chris Packham Nov. 6, 2024, 12:18 a.m. UTC
The following patches from earlier rounds of this series have already been applied

- https://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply.git/commit/?h=for-next&id=e7af7d13316dc5e2293c4f777f71bd8331f5d7a5
- https://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply.git/commit/?h=for-next&id=ce38cdc908557953604ffb0a91ef5ae3fbdf1c6b
- https://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux.git/commit/?h=i2c/i2c-host&id=9114f5a4e63edd5ab1ba453799da335237cfc6f1

There may be complaints from some of the automated checkers about the mfd
dt-binding patch until it shows up in the same tree as the i2c binding that is
referred to.

Chris Packham (4):
  dt-bindings: mfd: Add Realtek RTL9300 switch peripherals
  mips: dts: realtek: Add syscon-reboot node
  mips: dts: realtek: Add I2C controllers
  i2c: Add driver for the RTL9300 I2C controller

 .../bindings/mfd/realtek,rtl9301-switch.yaml  | 114 +++++
 MAINTAINERS                                   |   7 +
 .../cameo-rtl9302c-2x-rtl8224-2xge.dts        |   2 +-
 arch/mips/boot/dts/realtek/rtl9302c.dtsi      |  15 +
 arch/mips/boot/dts/realtek/rtl930x.dtsi       |  29 ++
 drivers/i2c/busses/Kconfig                    |  10 +
 drivers/i2c/busses/Makefile                   |   1 +
 drivers/i2c/busses/i2c-rtl9300.c              | 423 ++++++++++++++++++
 8 files changed, 600 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/devicetree/bindings/mfd/realtek,rtl9301-switch.yaml
 create mode 100644 arch/mips/boot/dts/realtek/rtl9302c.dtsi
 create mode 100644 drivers/i2c/busses/i2c-rtl9300.c

Comments

Andi Shyti Nov. 6, 2024, 9:57 a.m. UTC | #1
Hi Chris,

On Wed, Nov 06, 2024 at 01:18:35PM +1300, Chris Packham wrote:
> Add support for the I2C controller on the RTL9300 SoC. There are two I2C
> controllers in the RTL9300 that are part of the Ethernet switch register
> block. Each of these controllers owns a SCL pin (GPIO8 for the fiorst
> I2C controller, GPIO17 for the second). There are 8 possible SDA pins
> (GPIO9-16) that can be assigned to either I2C controller. This
> relationship is represented in the device tree with a child node for
> each SDA line in use.
> 
> This is based on the openwrt implementation[1] but has been
> significantly modified
> 
> [1] - https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=target/linux/realtek/files-5.15/drivers/i2c/busses/i2c-rtl9300.c
> 
> Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
> Reviewed-by: Andi Shyti <andi.shyti@kernel.org>

Thanks for following up with v9. I think nothing prevents us from
already merging this 4/4 patch, right?

Andi
Chris Packham Nov. 6, 2024, 7:47 p.m. UTC | #2
On 6/11/24 22:57, Andi Shyti wrote:
> Hi Chris,
>
> On Wed, Nov 06, 2024 at 01:18:35PM +1300, Chris Packham wrote:
>> Add support for the I2C controller on the RTL9300 SoC. There are two I2C
>> controllers in the RTL9300 that are part of the Ethernet switch register
>> block. Each of these controllers owns a SCL pin (GPIO8 for the fiorst
>> I2C controller, GPIO17 for the second). There are 8 possible SDA pins
>> (GPIO9-16) that can be assigned to either I2C controller. This
>> relationship is represented in the device tree with a child node for
>> each SDA line in use.
>>
>> This is based on the openwrt implementation[1] but has been
>> significantly modified
>>
>> [1] - https://scanmail.trustwave.com/?c=20988&d=pL2r5zHAPsW8d92uECdR2T8Eh4fYX_ZwrCyklfTCzQ&u=https%3a%2f%2fgit%2eopenwrt%2eorg%2f%3fp%3dopenwrt%2fopenwrt%2egit%3ba%3dblob%3bf%3dtarget%2flinux%2frealtek%2ffiles-5%2e15%2fdrivers%2fi2c%2fbusses%2fi2c-rtl9300%2ec
>>
>> Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
>> Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
> Thanks for following up with v9. I think nothing prevents us from
> already merging this 4/4 patch, right?
>
 From my end yes it's all good to go. Lee's just applied the mfd binding.

The only thing outstanding are the mips dts changes. I'll wait for a bit 
and chase those up. Hopefully they can make it in the 6.13 window but 
it's not the end of the world if they don't.
Andi Shyti Nov. 6, 2024, 10:51 p.m. UTC | #3
Hi Chris,

On Thu, Nov 07, 2024 at 08:47:42AM +1300, Chris Packham wrote:
> On 6/11/24 22:57, Andi Shyti wrote:
> > On Wed, Nov 06, 2024 at 01:18:35PM +1300, Chris Packham wrote:
> > > Add support for the I2C controller on the RTL9300 SoC. There are two I2C
> > > controllers in the RTL9300 that are part of the Ethernet switch register
> > > block. Each of these controllers owns a SCL pin (GPIO8 for the fiorst
> > > I2C controller, GPIO17 for the second). There are 8 possible SDA pins
> > > (GPIO9-16) that can be assigned to either I2C controller. This
> > > relationship is represented in the device tree with a child node for
> > > each SDA line in use.
> > > 
> > > This is based on the openwrt implementation[1] but has been
> > > significantly modified
> > > 
> > > [1] - https://scanmail.trustwave.com/?c=20988&d=pL2r5zHAPsW8d92uECdR2T8Eh4fYX_ZwrCyklfTCzQ&u=https%3a%2f%2fgit%2eopenwrt%2eorg%2f%3fp%3dopenwrt%2fopenwrt%2egit%3ba%3dblob%3bf%3dtarget%2flinux%2frealtek%2ffiles-5%2e15%2fdrivers%2fi2c%2fbusses%2fi2c-rtl9300%2ec
> > > 
> > > Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
> > > Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
> > Thanks for following up with v9. I think nothing prevents us from
> > already merging this 4/4 patch, right?
> > 
> From my end yes it's all good to go. Lee's just applied the mfd binding.
> 
> The only thing outstanding are the mips dts changes. I'll wait for a bit and
> chase those up. Hopefully they can make it in the 6.13 window but it's not
> the end of the world if they don't.

Cool, I just wanted to confirm. Applied to i2c/i2c-host.

Thanks,
Andi