mmind00 changed the topic of #linux-rockchip to: Rockchip development discussion | public log at https://libera.irclog.whitequark.org/linux-rockchip
Daanct12 has joined #linux-rockchip
serdarth has quit [Ping timeout: 255 seconds]
psydroid has quit [Ping timeout: 260 seconds]
Daanct12 has quit [Read error: Connection reset by peer]
<naoki> hmmmmmm... I should update dts for ROCK 5A before making dts for ROCK 5C... many many things in 5a.dts are not matched with schematic :(
stikonas_ has quit [Remote host closed the connection]
Daanct12 has joined #linux-rockchip
<naoki> I refined dts for ROCK 5A and fixed dts few things for 5C
<naoki> diff rk3588s-rock-5[ac].dts | wc -l
<naoki> 63
<naoki> cat rk3588s-rock-5[ac].dts | wc -l
<naoki> 1830
hexdump0815 has quit [Ping timeout: 255 seconds]
hexdump0815 has joined #linux-rockchip
Daanct12 has quit [Ping timeout: 252 seconds]
Daanct12 has joined #linux-rockchip
serdarth has joined #linux-rockchip
vagrantc has joined #linux-rockchip
vagrantc has quit [Quit: leaving]
Stat_headcrabbed has joined #linux-rockchip
warpme has joined #linux-rockchip
paulk has joined #linux-rockchip
paulk has joined #linux-rockchip
paulk-bis has quit [Ping timeout: 252 seconds]
ldevulder has joined #linux-rockchip
raster has joined #linux-rockchip
warpme has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
warpme has joined #linux-rockchip
<dsimic> qschulz: here's a quotation from the TF-A's plat/rockchip/rk3399/drivers/pmu/pmu.c:
<dsimic> 1521 void __dead2 rockchip_soc_soft_reset(void)
<dsimic> 1523 struct bl_aux_gpio_info *rst_gpio;
<dsimic> 1524
<dsimic> 1522 {
<dsimic> 1525 rst_gpio = plat_get_rockchip_gpio_reset();
<dsimic> 1526
<dsimic> 1527 if (rst_gpio) {
<dsimic> 1528 gpio_set_direction(rst_gpio->index, GPIO_DIR_OUT);
<dsimic> 1529 gpio_set_value(rst_gpio->index, rst_gpio->polarity);
<dsimic> 1530 } else {
<dsimic> 1531 soc_global_soft_reset();
<dsimic> 1532 }
<dsimic> 1533
<dsimic> 1534 while (1)
<dsimic> 1535 ;
<dsimic> 1536 }
<dsimic> as visible above, the infrastructure for having TF-A perform GPIO-based resets is already in place, so I'll investigate it further, to see would that be the right place to (ab)use the TSADC for restarting
<dsimic> I'm also writing a response to Kever on the U-Boot ML
<qschulz> dsimic: we discussed that already with paulk a few days ago
<qschulz> dsimic: this feels very much like a hack
<qschulz> also, no data is actually passed to TF-A by default for all RK3399 boards (except Puma)
<qschulz> but TF-A needs the information of which GPIO to use
warpme has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<qschulz> except that if you want users to be able to use Rockchip's blob, you need to NOT pass any info to it
<qschulz> also, whatever you'll be doing for RK3399 wouldn't work on any other SoC
<dsimic> ah, thanks, I remember that discussion now... back then I only glanced over it
<dsimic> yes, TF-A has no clue about that GPIO, for example
<qschulz> but maybe that's less of a hack than trying to get the tsadc to act as a reset controller
<qschulz> TF-A won't know by itself, it needs to be provided with that information
<dsimic> I'm thinking the same, which one is less hacky
<qschulz> also
<qschulz> this means you won't be able to use this reset GPIO for resetting the whole system before TF-A has been loaded
<qschulz> which means essentially once you reach proper
<dsimic> what's the deal with the blob and passing anything to it?
<qschulz> TF-A <v2.3 has a nasty bug that results in crashing depending on some factors
<qschulz> and guess which version is used by Rockchip
<qschulz> e6fa0dcc6f3fc44b1bc08fd5d921c5ad95163a69 for the commit with explanations
<qschulz> actually <v2.4
<dsimic> ah, sure, (ab)using the TSADC/OTP in TF-A would be for the use with kernel only, and for manual resets in the U-Boot proper, meaning that sysreset-gpio would still be needed for early resets in U-Boot
<qschulz> This applies to ALL Rockchip SoCs, not only RK3399 BTW since they use the same ancient version for all SoCs
<qschulz> dsimic: we don't do anything with the sysreset-gpio outside of this TPL reset on warm boots
<qschulz> meaning calling `reset` will enter this logic on next boot
<qschulz> instead of doing it cleanly directly
<qschulz> which is fine, just not optimal :)
<dsimic> huh, so we basically can't pass anything to TF-A, because that would break the blobs :/
<dsimic> sure, sysreset-gpio is to be used for what I referred to as early resets in U-Boot, i.e. what's happening in arch/arm/mach-rockchip/rk3399/rk3399.c
<dsimic> hmm, I'll think more about it, but so far it seems that the reset-controller is actually a viable hack :)
warpme has joined #linux-rockchip
digetx has quit [Ping timeout: 252 seconds]
digetx has joined #linux-rockchip
System_Error has quit [Ping timeout: 260 seconds]
psydroid has joined #linux-rockchip
<naoki> I'll submit this after testing...
<naoki> current rock-5a.dts is very different to schematic...
<naoki> "arm64: dts: rockchip: refine dts for Radxa ROCK 5A" is, in short, "sync with rock-5c.dts"
<mmind00> naoki: please don't do patches that address multiple things ... "refine X" is way to broad, and looking at the change in the patch, this definitly needs to be split
System_Error has joined #linux-rockchip
<naoki> many many things need to be fixed :(
<mmind00> naoki: yes, but in separate patches please
<naoki> I cannot imagine how many commits are required for them
<naoki> I see...
<mmind00> naoki: (1) Match regulator structure and names to schematics
<mmind00> (3) Fix gmac1 clock and supply
<mmind00> (2) Match node names
<mmind00> (5) add RTC
<mmind00> (4) move eeprom to correct i2c controller
<mmind00> at least ... from a cursory glance
<mmind00> same for the "fix dts for rock5c" ... I see regulators, pcie, gmac, usbdp lane-mux ... in there
<naoki> mmind00: yeah... I'll try to fix them
<mmind00> also why the switch from rgmii-id back to rgmii? ... rgmii-id is the preferred form if it works
<naoki> hmm
<naoki> that is something I was worried about too
<naoki> this time I refer vendor kernel, but rgmii-id may be better... I'll check both 5a and 5c
<naoki> (btw basically rock 5c is modified version of rock 5a)
<naoki> btw I'm thinking rk3588-rock-5.dtsi for 5B and brothers (maybe 5 ITX too?)
<dsimic> I don't think that would be warranted
<dsimic> though, perhaps yes for the 5B+
<naoki> clock_in_out:
<naoki> description:
<naoki> For RGMII, it must be "input", means main clock(125MHz)
<naoki> is it right?
<naoki> I can see some dts use "output"
<mmind00> naoki: I'm not into the dwmac inner workings, so cannot say of the top of my hat
<naoki> hmm. at least, there is "MAC <----- PHY" description in 5a/5c schematic, "input" should be right :)
<naoki> it's late here. I'll continue to split patches tomorrow. thank you very much for your comment
raster has quit [Quit: Gettin' stinky!]
naoki has quit [Quit: naoki]
raster has joined #linux-rockchip
robmur01 has quit [Read error: Connection reset by peer]
robmur01 has joined #linux-rockchip
psydroid has quit [Ping timeout: 255 seconds]
warpme has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Daanct12 has quit [Quit: WeeChat 4.4.3]
raster has quit [Quit: Gettin' stinky!]
raster has joined #linux-rockchip
warpme has joined #linux-rockchip
dsimic has quit [Ping timeout: 244 seconds]
dsimic has joined #linux-rockchip
warpme has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
warpme has joined #linux-rockchip
warpme has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
_whitelogger has joined #linux-rockchip
vagrantc has joined #linux-rockchip
warpme has joined #linux-rockchip
warpme has quit [Client Quit]
ldevulder has quit [Quit: Leaving]
raster has quit [Quit: Gettin' stinky!]
ungeskriptet has quit [Ping timeout: 245 seconds]
ungeskriptet has joined #linux-rockchip
stikonas has joined #linux-rockchip
warpme has joined #linux-rockchip
warpme has quit [Client Quit]
psydroid has joined #linux-rockchip
naoki has joined #linux-rockchip
psydroid has quit [Ping timeout: 255 seconds]
Stat_headcrabbed has quit [Quit: Stat_headcrabbed]
psydroid has joined #linux-rockchip
System_Error has quit [Ping timeout: 260 seconds]
System_Error has joined #linux-rockchip
s1b1 has quit [Quit: ZNC 1.8.2+deb3.1 - https://znc.in]
s1b1 has joined #linux-rockchip
sukrutb has quit [Quit: Leaving]
vagrantc has quit [Ping timeout: 260 seconds]