mbox series

[v3,00/14] Expand available features on Qnap TS433

Message ID 20240723195538.1133436-1-heiko@sntech.de (mailing list archive)
Headers show
Series Expand available features on Qnap TS433 | expand

Message

Heiko Stübner July 23, 2024, 7:55 p.m. UTC
Thanks to the nicely supported rk3568, the hardest part for adding things,
is to pull things from the vendor-kernel and translating them to mainline
standards.

This series allows the TS433 to use all 4 bays [0], wiggle some LEDs and
access devices connected to all 3 usb ports.

The device runs stable now and might be usable for actual usage.

There is still a todo-list though:
- the ethernet mac address for the realtek chip seems correct,
  but the gmac0 interface currently uses a wrong one
- i2cdetect reports devices on i2c-1 on addresses 54,55,56,57
  model_Q0B20_Q0B30_10_10.conf from the original rescue image labels them
    VPD_MB = I2C:0x54, VPD_BP = I2C:0x56
  the meaning currently being unknown. Some eeprom maybe?
- The regulator tree is slightly dubious. Everthing seems to follow rk3568
  reference designs, but especially the regulator labeled vcc3v3_sd
  seems to supply some PCIe functionality. So I guess the device's
  schematics will look quite different than the regulators added to the
  vendor devicetree.
- Quite a bit of functionality is provided by the MCU connected to uart0.
  According to the model.conf there should be fan-control, a number of
  additional LEDs (status,locate,usb?)


Thanks to Qnap engineers adding an easily accessible header for maskrom
mode on the board, replacing the bootloader is also quite a breeze. A
branch on top of today's u-boot master branch can be found on [1]. I'll
submit that code to u-boot once I can cherry-pick the dts patches.

changes in v3:
- fix the two regulator node-names, I noticed after sending v2
- add Uwe's Tested-by tags
- fold in some of Uwe's suggestions:
  - remove some phandles
  - more comments to explain what is connected where
  - handle the two RTCs in the system, though not by hacking around
    to disable the pmic-one, instead just make sure the real one
    stays the first rtc
changes in v2:
- add patches for tsadc, gpio-keys, cpu-supply, pmic, gpu and io-domains


[0] I only have two drives right now, but I tested both the internal
sata connector as well as the PCIe connected sata controller in different
combinations.
[1] https://github.com/mmind/u-boot-rockchip/tree/dev/qnap-ts433/v2024.07

Heiko Stuebner (14):
  arm64: dts: rockchip: add PCIe supply regulator to Qnap-TS433
  arm64: dts: rockchip: enable second PCIe controller on the Qnap-TS433
  arm64: dts: rockchip: enable uart0 on Qnap-TS433
  arm64: dts: rockchip: enable usb ports on Qnap-TS433
  arm64: dts: rockchip: add stdout path on Qnap-TS433
  arm64: dts: rockchip: enable sata1+2 on Qnap-TS433
  arm64: dts: rockchip: add board-aliases for Qnap-TS433
  arm64: dts: rockchip: add hdd leds to Qnap-TS433
  arm64: dts: rockchip: enable the tsadc on the Qnap-TS433
  arm64: dts: rockchip: add gpio-keys to Qnap-TS433
  arm64: dts: rockchip: define cpu-supply on the Qnap-TS433
  arm64: dts: rockchip: add missing pmic information on Qnap-TS433
  arm64: dts: rockchip: enable gpu on Qnap-TS433
  arm64: dts: rockchip: add 2 pmu_io_domain supplies for Qnap-TS433

 .../boot/dts/rockchip/rk3568-qnap-ts433.dts   | 546 +++++++++++++++++-
 1 file changed, 543 insertions(+), 3 deletions(-)

Comments

Rob Herring (Arm) July 25, 2024, 10:20 p.m. UTC | #1
On Tue, 23 Jul 2024 21:55:24 +0200, Heiko Stuebner wrote:
> Thanks to the nicely supported rk3568, the hardest part for adding things,
> is to pull things from the vendor-kernel and translating them to mainline
> standards.
> 
> This series allows the TS433 to use all 4 bays [0], wiggle some LEDs and
> access devices connected to all 3 usb ports.
> 
> The device runs stable now and might be usable for actual usage.
> 
> There is still a todo-list though:
> - the ethernet mac address for the realtek chip seems correct,
>   but the gmac0 interface currently uses a wrong one
> - i2cdetect reports devices on i2c-1 on addresses 54,55,56,57
>   model_Q0B20_Q0B30_10_10.conf from the original rescue image labels them
>     VPD_MB = I2C:0x54, VPD_BP = I2C:0x56
>   the meaning currently being unknown. Some eeprom maybe?
> - The regulator tree is slightly dubious. Everthing seems to follow rk3568
>   reference designs, but especially the regulator labeled vcc3v3_sd
>   seems to supply some PCIe functionality. So I guess the device's
>   schematics will look quite different than the regulators added to the
>   vendor devicetree.
> - Quite a bit of functionality is provided by the MCU connected to uart0.
>   According to the model.conf there should be fan-control, a number of
>   additional LEDs (status,locate,usb?)
> 
> 
> Thanks to Qnap engineers adding an easily accessible header for maskrom
> mode on the board, replacing the bootloader is also quite a breeze. A
> branch on top of today's u-boot master branch can be found on [1]. I'll
> submit that code to u-boot once I can cherry-pick the dts patches.
> 
> changes in v3:
> - fix the two regulator node-names, I noticed after sending v2
> - add Uwe's Tested-by tags
> - fold in some of Uwe's suggestions:
>   - remove some phandles
>   - more comments to explain what is connected where
>   - handle the two RTCs in the system, though not by hacking around
>     to disable the pmic-one, instead just make sure the real one
>     stays the first rtc
> changes in v2:
> - add patches for tsadc, gpio-keys, cpu-supply, pmic, gpu and io-domains
> 
> 
> [0] I only have two drives right now, but I tested both the internal
> sata connector as well as the PCIe connected sata controller in different
> combinations.
> [1] https://github.com/mmind/u-boot-rockchip/tree/dev/qnap-ts433/v2024.07
> 
> Heiko Stuebner (14):
>   arm64: dts: rockchip: add PCIe supply regulator to Qnap-TS433
>   arm64: dts: rockchip: enable second PCIe controller on the Qnap-TS433
>   arm64: dts: rockchip: enable uart0 on Qnap-TS433
>   arm64: dts: rockchip: enable usb ports on Qnap-TS433
>   arm64: dts: rockchip: add stdout path on Qnap-TS433
>   arm64: dts: rockchip: enable sata1+2 on Qnap-TS433
>   arm64: dts: rockchip: add board-aliases for Qnap-TS433
>   arm64: dts: rockchip: add hdd leds to Qnap-TS433
>   arm64: dts: rockchip: enable the tsadc on the Qnap-TS433
>   arm64: dts: rockchip: add gpio-keys to Qnap-TS433
>   arm64: dts: rockchip: define cpu-supply on the Qnap-TS433
>   arm64: dts: rockchip: add missing pmic information on Qnap-TS433
>   arm64: dts: rockchip: enable gpu on Qnap-TS433
>   arm64: dts: rockchip: add 2 pmu_io_domain supplies for Qnap-TS433
> 
>  .../boot/dts/rockchip/rk3568-qnap-ts433.dts   | 546 +++++++++++++++++-
>  1 file changed, 543 insertions(+), 3 deletions(-)
> 
> --
> 2.39.2
> 
> 
> 


My bot found new DTB warnings on the .dts files added or changed in this
series.

Some warnings may be from an existing SoC .dtsi. Or perhaps the warnings
are fixed by another series. Ultimately, it is up to the platform
maintainer whether these warnings are acceptable or not. No need to reply
unless the platform maintainer has comments.

If you already ran DT checks and didn't see these error(s), then
make sure dt-schema is up to date:

  pip3 install dtschema --upgrade


New warnings running 'make CHECK_DTBS=y rockchip/rk3568-qnap-ts433.dtb' for 20240723195538.1133436-1-heiko@sntech.de:

arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dtb: sata@fc400000: Unevaluated properties are not allowed ('power-domains' was unexpected)
	from schema $id: http://devicetree.org/schemas/ata/rockchip,dwc-ahci.yaml#
arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dtb: sata@fc800000: Unevaluated properties are not allowed ('power-domains' was unexpected)
	from schema $id: http://devicetree.org/schemas/ata/rockchip,dwc-ahci.yaml#
Heiko Stübner July 30, 2024, 7:32 a.m. UTC | #2
On Tue, 23 Jul 2024 21:55:24 +0200, Heiko Stuebner wrote:
> Thanks to the nicely supported rk3568, the hardest part for adding things,
> is to pull things from the vendor-kernel and translating them to mainline
> standards.
> 
> This series allows the TS433 to use all 4 bays [0], wiggle some LEDs and
> access devices connected to all 3 usb ports.
> 
> [...]

Applied, thanks!

[01/14] arm64: dts: rockchip: add PCIe supply regulator to Qnap-TS433
        commit: e0ec6d48226fb3d4df18895b56f0b7a94c0fe474
[02/14] arm64: dts: rockchip: enable second PCIe controller on the Qnap-TS433
        commit: 0f5f87a1d602a33028522784eb005647fa1b5c11
[03/14] arm64: dts: rockchip: enable uart0 on Qnap-TS433
        commit: 07ef8be476bebd77cba3ca4804be03cc0dba414f
[04/14] arm64: dts: rockchip: enable usb ports on Qnap-TS433
        commit: d992203f57c5caad0dbd4a9c669d79b315873c81
[05/14] arm64: dts: rockchip: add stdout path on Qnap-TS433
        commit: e1cb5d8a92e41171bf4d5ddc459bd96372500901
[06/14] arm64: dts: rockchip: enable sata1+2 on Qnap-TS433
        commit: 673c1353b3d476b9c5df6b84a777ed171e5594f5
[07/14] arm64: dts: rockchip: add board-aliases for Qnap-TS433
        commit: dadd4256e12360d3ff1f6481b2e4697f9d890caf
[08/14] arm64: dts: rockchip: add hdd leds to Qnap-TS433
        commit: ea91aabf18bcad6f5eceae6848ea6570ea61f126
[09/14] arm64: dts: rockchip: enable the tsadc on the Qnap-TS433
        commit: 2dfdddd9d20306fd0d04b88fcbbf36d76fb67f11
[10/14] arm64: dts: rockchip: add gpio-keys to Qnap-TS433
        commit: 9b682d31b24f1f70b5b4d0618095d46e0722b9d8
[11/14] arm64: dts: rockchip: define cpu-supply on the Qnap-TS433
        commit: 99b36ba910d896bddbb9a190ca686c6d9cd0325f
[12/14] arm64: dts: rockchip: add missing pmic information on Qnap-TS433
        commit: ee078c7daa98353496410b715a5acbb41d7d3a90
[13/14] arm64: dts: rockchip: enable gpu on Qnap-TS433
        commit: 9130eb62586f4cef0557d0378fb7e78d7397ab2d
[14/14] arm64: dts: rockchip: add 2 pmu_io_domain supplies for Qnap-TS433
        commit: 64b7f16fb3947e5d08d9e9b860ce966250e45d52

Best regards,