mbox series

[v3,0/8] Add support for Sonoff iHost RV1126 Smart Home Gateway

Message ID 20231203124004.2676174-1-tim@feathertop.org
Headers show
Series Add support for Sonoff iHost RV1126 Smart Home Gateway | expand

Message

Tim Lunn Dec. 3, 2023, 12:39 p.m. UTC
Sonoff iHost is gateway device designed to provide a Smart Home Hub,
most notably it includes builtin radios for Wifi, BT and Zigbee, which
make it suitable SBC for use with many of the open home automation
platforms. It is availabe in two versions, first is based on
Rockchip RV1126 and 4GB DDR4 RAM. There is a second version based off
the RV1109 dual core SoC and 2GB RAM.

Features:
- Rockchip RV1126 (or RV1109)
- 4GB DDR4
- 8GB eMMC
- microSD slot
- RMII Ethernet PHY
- 1x USB 2.0 Host
- 1x USB 2.0 OTG
- Realtek RTL8723DS WiFi/BT
- EFR32MG21 Silabs Zigbee radio
- Speaker/Microphone

This patch series adds the various device tree nodes required to
support this device. It also adds the initial dts for this device,
This work was largely based off the device trees for mainline
Edgeble Neu2 and downstream Rockchip rv1126-evb-v13 configs.
It has been adapted with relevant peripherals and GPIO pins for the
iHost.

Implemented in this series are most of the core periperhals including
Ethernet, Wifi, BT, Zigbee and RTC. Sound and USB will be added in a
later series.

Changes in v3:
- i2c: add code comment and clarify commit message further
- i2c: Collect ack by Heiko
- Move ethernet alias from rv1126.dtsi to board dtsi

Changes in v2:
- i2c: clarify commit message
- Address review comments from Heiko
- Split out rv1109.dtsi to new patch
- Collect Robh Ack for dt-bindings patch

Tim Lunn (8):
  ARM: dts: rockchip: rv1126: Add alternate UART pins
  ARM: dts: rockchip: rv1126: Serial aliases
  i2c: rk3x: Adjust mask/value offset for i2c2 on rv1126
  ARM: dts: rockchip: rv1126: Add i2c2 nodes
  ARM: dts: rockchip: rv1126: Split up rgmii1 pinctrl
  ARM: dts: rockchip: Add rv1109 SoC
  ARM: dts: Add Sonoff iHost Smart Home Hub
  dt-bindings: arm: rockchip: Add Sonoff iHost

 .../devicetree/bindings/arm/rockchip.yaml     |   7 +
 arch/arm/boot/dts/rockchip/Makefile           |   2 +
 .../boot/dts/rockchip/rv1109-sonoff-ihost.dts |  13 +
 arch/arm/boot/dts/rockchip/rv1109.dtsi        |  23 +
 .../dts/rockchip/rv1126-edgeble-neu2-io.dts   |   2 +-
 .../arm/boot/dts/rockchip/rv1126-pinctrl.dtsi |  72 +++-
 .../boot/dts/rockchip/rv1126-sonoff-ihost.dts |  13 +
 .../dts/rockchip/rv1126-sonoff-ihost.dtsi     | 408 ++++++++++++++++++
 arch/arm/boot/dts/rockchip/rv1126.dtsi        |  21 +
 drivers/i2c/busses/i2c-rk3x.c                 |   8 +-
 10 files changed, 553 insertions(+), 16 deletions(-)
 create mode 100644 arch/arm/boot/dts/rockchip/rv1109-sonoff-ihost.dts
 create mode 100644 arch/arm/boot/dts/rockchip/rv1109.dtsi
 create mode 100644 arch/arm/boot/dts/rockchip/rv1126-sonoff-ihost.dts
 create mode 100644 arch/arm/boot/dts/rockchip/rv1126-sonoff-ihost.dtsi

Comments

Wolfram Sang Dec. 19, 2023, 5:06 p.m. UTC | #1
On Sun, Dec 03, 2023 at 11:39:59PM +1100, Tim Lunn wrote:
> Rockchip RV1126 is using old style i2c controller, the i2c2
> bus uses a non-sequential offset in the grf register for the
> mask/value bits for this bus.
> 
> This patch fixes i2c2 bus on rv1126 SoCs.
> 
> Signed-off-by: Tim Lunn <tim@feathertop.org>
> Acked-by: Heiko Stuebner <heiko@sntech.de>
> 

Applied to for-next, thanks!

But, phew, the fact that this driver _needs_ i2c-aliases in DT should be
fixed somewhen. I totally overlooked this so far :/
Tim Lunn Dec. 19, 2023, 10:40 p.m. UTC | #2
Hi Wolfram,

On 12/20/23 04:06, Wolfram Sang wrote:
> On Sun, Dec 03, 2023 at 11:39:59PM +1100, Tim Lunn wrote:
>> Rockchip RV1126 is using old style i2c controller, the i2c2
>> bus uses a non-sequential offset in the grf register for the
>> mask/value bits for this bus.
>>
>> This patch fixes i2c2 bus on rv1126 SoCs.
>>
>> Signed-off-by: Tim Lunn <tim@feathertop.org>
>> Acked-by: Heiko Stuebner <heiko@sntech.de>
>>
> Applied to for-next, thanks!
Thanks.
> But, phew, the fact that this driver _needs_ i2c-aliases in DT should be
> fixed somewhen. I totally overlooked this so far :/
>
Not sure what you mean here? I did add an alias for i2c2 in the DT in 
another patch.

Regards
    Tim

>