From af63c7cf2d001f7c3e86c310e8e0c42e681c1e8a Mon Sep 17 00:00:00 2001 From: Christian Hewitt Date: Mon, 13 Feb 2023 13:11:14 +0000 Subject: [PATCH 115/120] WIP: arm64: dts: meson: add SPI VFD to Sunvell T95Z Plus making guesses at the config.. Signed-off-by: Christian Hewitt --- .../boot/dts/amlogic/meson-gxm-t95z-plus.dts | 79 ++++++++++++++++++- 1 file changed, 77 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-t95z-plus.dts b/arch/arm64/boot/dts/amlogic/meson-gxm-t95z-plus.dts index 30ed5b6d325f..5f4bd19d5d77 100644 --- a/arch/arm64/boot/dts/amlogic/meson-gxm-t95z-plus.dts +++ b/arch/arm64/boot/dts/amlogic/meson-gxm-t95z-plus.dts @@ -17,11 +17,18 @@ / { leds { compatible = "gpio-leds"; - led-white { - color = ; + led-green { + color = ; function = LED_FUNCTION_POWER; gpios = <&gpio_ao GPIOAO_9 GPIO_ACTIVE_HIGH>; default-state = "on"; + }; + + led-blue { + color = ; + function = LED_FUNCTION_POWER; + gpios = <&gpio GPIODV_25 GPIO_ACTIVE_HIGH>; + default-state = "off"; panic-indicator; }; }; @@ -38,6 +45,74 @@ button-function { press-threshold-microvolt = <10000>; }; }; + + spi { + compatible = "spi-gpio"; + + /* T95Z v1 (enabled) */ + sck-gpios = <&gpio GPIODV_22 GPIO_ACTIVE_HIGH>; + mosi-gpios = <&gpio GPIODV_23 GPIO_ACTIVE_HIGH>; + cs-gpios = <&gpio GPIODV_21 GPIO_ACTIVE_LOW>; + + /* T95Z v2 (disabled) + sck-gpios = <&gpio GPIODV_19 GPIO_ACTIVE_HIGH>; + mosi-gpios = <&gpio GPIODV_18 GPIO_ACTIVE_HIGH>; + cs-gpios = <&gpio GPIODV_20 GPIO_ACTIVE_LOW>; + */ + + num-chipselects = <1>; + #address-cells = <1>; + #size-cells = <0>; + + tm1628: led-controller@0 { + compatible = "titanmec,tm1628"; + reg = <0>; + spi-3wire; + spi-lsb-first; + spi-rx-delay-us = <1>; + spi-max-frequency = <500000>; + #address-cells = <2>; + #size-cells = <0>; + + titanmec,segment-mapping = /bits/ 8 <4 5 6 1 2 3 7>; + titanmec,grid = /bits/ 8 <2 3 4 5 1>; + + alarm@1,1 { + reg = <1 1>; + function = LED_FUNCTION_ALARM; + }; + + usb@1,2 { + reg = <1 2>; + function = LED_FUNCTION_USB; + }; + + play@1,3 { + reg = <1 3>; + function = "play"; + }; + + pause@1,4 { + reg = <1 4>; + function = "pause"; + }; + + colon@1,5 { + reg = <1 5>; + function = "colon"; + }; + + lan@1,6 { + reg = <1 6>; + function = LED_FUNCTION_LAN; + }; + + wlan@1,7 { + reg = <1 7>; + function = LED_FUNCTION_WLAN; + }; + }; + }; }; ðmac { -- 2.34.1