Squealing 9059 Posted yesterday at 01:39 AM Posted yesterday at 01:39 AM I have dtb files used by manufacturers for compiling on the Android 5.1 system (OEM versions 2.17 and 2.19). It differs from boards like the firefly, for example: using a 100 Mbps network port, USB GPIO uses <0x50 0x0c 0x00>. Can anyone help with adapting this board? I want to compile it for armbian. 2.17.dtb 2.19.dtb 0 Quote
Hqnicolas Posted 1 hour ago Posted 1 hour ago Find a board similar to yours and make the necessary adaptations. On 6/16/2023 at 6:39 PM, hotnikq said: Use this calculator to compare ports from original android HEX and set it up decimal number for linux... and on Linux Rockchip: Quote gpio0: gpio@fdd60000 { compatible = "rockchip,gpio-bank"; reg = <0x0 0xfdd60000 0x0 0x100>; interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>; clocks = <&pmucru PCLK_GPIO0>, <&pmucru DBCLK_GPIO0>; gpio-controller; gpio-ranges = <&pinctrl 0 0 32>; #gpio-cells = <2>; interrupt-controller; #interrupt-cells = <2>; }; The following example could be used to describe GPIO pins used as device enable and bit-banged data signals: gpio1: gpio1 { gpio-controller; #gpio-cells = <2>; }; [...] data-gpios = <&gpio1 12 0>, <&gpio1 13 0>, <&gpio1 14 0>, <&gpio1 15 0>; In the above example, &gpio1 uses 2 cells to specify a gpio. The first cell is a local offset to the GPIO line and the second cell represent consumer flags, such as if the consumer desire the line to be active low (inverted) or open drain. This is the recommended practice. #define RK_PA0 0 #define RK_PA1 1 #define RK_PA2 2 #define RK_PA3 3 #define RK_PA4 4 #define RK_PA5 5 #define RK_PA6 6 #define RK_PA7 7 #define RK_PB0 8 #define RK_PB1 9 #define RK_PB2 10 #define RK_PB3 11 #define RK_PB4 12 #define RK_PB5 13 #define RK_PB6 14 #define RK_PB7 15 #define RK_PC0 16 #define RK_PC1 17 #define RK_PC2 18 #define RK_PC3 19 #define RK_PC4 20 #define RK_PC5 21 #define RK_PC6 22 #define RK_PC7 23 #define RK_PD0 24 #define RK_PD1 25 #define RK_PD2 26 #define RK_PD3 27 #define RK_PD4 28 #define RK_PD5 29 #define RK_PD6 30 #define RK_PD7 31 So we can do an shutuo-v8-rk3288 compatible: Quote leds { compatible = "gpio-leds"; status = "okay"; power-green { gpios = <&gpio0 RK_PD3 GPIO_ACTIVE_HIGH>; linux,default-trigger = "none"; default-state = "off"; }; power-red { gpios = <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>; linux,default-trigger = "none"; default-state = "off"; }; }; gpio0: gpio@fdd60000 { compatible = "rockchip,gpio-bank"; reg = <0x0 0xfdd60000 0x0 0x100>; interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>; clocks = <&pmucru PCLK_GPIO0>, <&pmucru DBCLK_GPIO0>; gpio-controller; gpio-ranges = <&pinctrl 0 0 32>; #gpio-cells = <2>; interrupt-controller; #interrupt-cells = <2>; }; many times in mainline you can do some tricks like disabling all usb 0 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.