aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2020-08-14olpc/sound: split off the OLPC specific partslr/arielLubomir Rintel4-1021/+1110
2020-08-14olpc/sound: move the Mic and HP jacks from /gpio-keys to /audio-complexLubomir Rintel2-28/+10
The Linux codec drivers really wants to know which GPIOs are used for connected jack detection and it also eventually registers an input device.
2020-08-14olpc/sound: make /audio-complex compatible with audio-graph-cardLubomir Rintel1-2/+37
2020-08-14olpc/sound: make /audio compatible with marvell,mmp-sspaLubomir Rintel2-9/+26
Aside from adding the compatible string, this adds the bit clock and sets the DAI cell count.
2020-08-14arm/mmp2: add /audio-clocksLubomir Rintel3-1/+61
This is the clock controller that creates the I2S master and bit clocks for the codec from the PMUA or VCXO via Audio PLL.
2020-08-14olpc/sound: split the /audio register range into twoLubomir Rintel2-2/+16
There are separate blocks for RX and TX paths. However, in between the first pair there's the clock controller and thus the SSPA device shouldn't claim the whole continuous range.
2020-08-14arm/mmp2: move +audio from olpc/soundLubomir Rintel2-4/+4
We'll need it earlier when we add the audio clock controller node. It is not specific to OLPC anyways.
2020-08-14olpc/sound: make /asram compatible with mmio-sramLubomir Rintel1-0/+8
This allows the generic Linux SRAM driver to bind.
2020-08-14olpc/sound: add "dmas" property to /audioLubomir Rintel1-0/+11
This tells the Linux's generic DMA PCM driver which DMA channels to use for copying the audio sample data around.
2020-08-14olpc/sound: add "iram" property to /admaLubomir Rintel1-0/+1
This tells Linux where to allocate the buffers for audio sample data from. It is somewhat redundant to the "asram" property that the ADMA driver itself uses for the DMA transaction descriptors, but sadly the DMA PCM driver already uses this name.
2020-08-14mmp2/irq: drop /interrupt-controller@128 on MMP2Lubomir Rintel1-1/+1
This mux seems to only exist on MMP3. On MMP2 the IRQ 48 seems to be shared by all DMA activity without a way to tell the events apart.
2020-08-14olpc/sound: on MMP2 the ADMA interrupts are not muxedLubomir Rintel1-0/+8
There seems to be just one interrupt line shared by all the DMA blocks.
2020-08-14olpc/sound: move /asram before /admaLubomir Rintel1-7/+7
/adma is going to refer to /asram, we need to create it first.
2020-08-14mmp2/clk: increase MPMU reg rangeLubomir Rintel1-1/+1
The ACGR is at the offset of 0x1024, beyond the 4k initially assigned to the MPMU range.
2020-08-14olpc/mmp2camera: add power domain on MMP3Lubomir Rintel2-0/+2
This tells the driver to enable the power island first.
2020-08-14mmp3/galcore: split the /gpu node into 2D and 3DLubomir Rintel1-7/+34
2020-08-14mmp2/clk: rename mmp2-gpu-power-domain# to mmp2-gpu-pd#Lubomir Rintel2-2/+2
This saves some bits!
2020-08-14Revert "q4e01ja" ("disable dtcompat.fth")Lubomir Rintel2-1/+2
This brings back dtcompat.fth. It's needed to boot older images and also works with newer kernels just fine. This reverts commit 82e8638d4f7d3a34ff5f6a8ab091ea0ca94a0b65.
2020-08-14REMOVEME fedora-compatLubomir Rintel1-0/+5
2020-03-24mmp3/ariel: add Dell Ariel board supportLubomir Rintel12-0/+1058
This is the board used in Dell Wyse 3020 thin client. It's based on MMP3, reusing most of OLPC XO-4 support.
2020-03-24olpc: turn on olpc-compat? if alternate? is inspected on bootLubomir Rintel2-5/+12
The OLPC OS on XO-4 (be it in secured mode, or on unsecured laptop booted from an USB flash stick) executes the alternate? word to find out if it shall boot the Android kernel or whatever it is. While probably quite half-hearded, that seems to be the only way to tell if we're running OLPC OS, that probably has a 3.5-based kernel that needs a compatibility device tree. The other distros that are potentially going to ship newer kernels have no need to call alternate? in their boot paths.
2020-03-24olpc/4.0: optionally build DT for OLPC's 3.5 kernelLubomir Rintel4-0/+274
Many of the preceding changes were done for the sake of compatibility with mainline kernel and were done without considering compatibility with OLPC XO-4.0's kernel, based on linux-3.5. Most notably, the clock driver uses completely different DT bindings. There are a couple more things -- some drivers are crashy when they don't find the expected nodes, such as I2C node aliases or dumb panel. This adds an "olpc-compat-" drop-in whose purpose is to beat the tree back into shape that's acceptable for the non-mainline kernel. It's loaded just prior to booting the kernel if olpc-compat? flag is set.
2020-03-24olpc/1.75/lcdcfg: keep the /panel node as it isLubomir Rintel1-24/+0
These were only meaningful for the OLPC kernel's pxa688fb driver, and that one is going to be looking for them elsewhere -- in /display child nodes. Drop them from here.
2020-03-24olpc/1.75/lcfcfg: deselect root node when we're done with thingsLubomir Rintel1-0/+1
Otherwise words defined afterwards, such as has-dcon-ram? will end up being root device's methods, resulting in no end of mayhem and suffering.
2020-03-23olpc/rtc: move into dev/ds1338Lubomir Rintel2-8/+4
This driver is not particularly OLPC specific. Move it to dev/ and unwrap it from /i2c@d4031000 to allow attaching it to different I2C hosts.
2020-03-23video/dacs: add driver for Chrontel CH7033Lubomir Rintel1-0/+187
This is a driver for video encoder with VGA and DVI/HDMI outputs. There is no documentation for the chip -- the operation was guessed from what was sniffed on a Dell Wyse 3020 ThinOS terminal with some clues from largely obfuscated Mediatek's GPL code dump. The configuration is hardcoded to what makes sense for 1024x768@60. However, with VGA and clock bypasses on, it doesn't seem to matter too much and other modes seem to work fine, which is good.
2020-03-23dev: add driver for KB3930 Embedded Controller on Dell ArielLubomir Rintel1-0/+118
This is an ENE Embedded Controller with the Dell Ariel firmware. It seems to be able to control LEDs and USB port power.
2020-03-23dev: add mv88pm867 driverLubomir Rintel1-0/+50
This is a regulator that is used on Dell Ariel (Wyse 3020) board to configure DRAM voltage. For now the driver actually does nothing but create the device node.
2020-03-23usb2/net: add a driver for SMSC LAN7500Lubomir Rintel3-2/+218
This is a driver for the USB 2.0 to 10/100/1000 Mbps Ethernet driver. At the time it is pretty basic, it accepts all packets and makes no attempt at filtering in hardware but works well enough.
2020-03-23usb2/net: drop extra copy-packet wordLubomir Rintel1-4/+0
This one seems to be Pegasus specific and just forgotten in place. The one that follows immediately shadows it.
2020-03-23usb2/net: add length-header callbackLubomir Rintel3-10/+16
This allows the drivers to prepend extra headers to the packet data for hardware that requires that. It is a more flexible replacement for length-header? logic that only prepends Pegasus-style length header.
2020-03-23usb2/net: remove wrap-msgLubomir Rintel2-2/+0
It does nothing, is not used, and it's not clear how would it have worked for devices that wrap ethernet data in their custom headers.
2020-03-23arm/olpc: fix gitignoreLubomir Rintel3-6/+0
Don't ignore the build directory -- ignore the build artifacts themselves as seems to have been intended.
2020-03-23spiflash: add Windbond W25Q32FV chipLubomir Rintel1-0/+3
A 4M SPI flash chip as used on the Dell Ariel board.
2020-03-23mmp2/uart: factor out the UART nodesLubomir Rintel5-59/+56
2020-03-23mmp2/uart: make the MMP UART compatible with intel,xscale-uartLubomir Rintel1-0/+3
The UART is XScale compatible and the more specific compatible string shouldn't really have been necessary. There are three drivers that bind to mrvl,mmp-uart in Linux, for legacy reasons. The 8250_of driver should be preferrably used and the other two sometimes break. We need to keep the more specific compatible string for OLPC builds that lack the 8250_of driver, but prefer the XScale one.
2020-03-23mmp2/rtc: conditionalize the suspend/resume testing machineryLubomir Rintel1-0/+2
Only include it if the OLPC EC is around, that can report the power consumption.
2020-03-23olpc/usb: make usb-hub-reset-gpios property optionalLubomir Rintel1-0/+2
Only create it if the board actually has a USB hub reset line.
2020-03-23olpc: parametrize the gridmap and life demo resolutionLubomir Rintel2-4/+5
On MMP2/MMP3 we have hdisp and vdisp words that describe the display size. Otherwise still assume the OLPC resolution.
2020-03-23olpc/lcd: fix a messed up horizontal front porch calculationLubomir Rintel1-3/+2
There's a nice hfp word that gives us exactly the value we need. Tested not to blow up on a XO-1.75.
2020-03-23olpc/lcd: fix a handful of places that assume 16 bppLubomir Rintel1-9/+18
2020-03-23olpc/lcd: fix compatible string on MMP3Lubomir Rintel1-0/+4
The hardware is slightly different (a different clock select register) and the driver needs to know.
2020-03-23olpc/lcd: only include the HDMI driver if we have a HDMI portLubomir Rintel1-0/+2
2020-03-23olpc/lcd: only call into DCON on OLPCLubomir Rintel1-0/+2
2020-03-23arm/olpc: split OLPC LCD configuration from the LCDC driverLubomir Rintel3-27/+27
Making the driver useful for boards configured differently than OLPC.
2020-03-23arm/olpc: move font selection from lcd.fth to build-fw.fthLubomir Rintel2-9/+9
The console font is not a function of the LCD controller.
2020-03-23mmp3/thermal: only show battery stats if there's a batteryLubomir Rintel1-0/+2
2020-03-23mmp3/thermal: add /thermal-zones nodeLubomir Rintel1-0/+30
This describes the thermal zones as specified by the thermal/thermal.txt binding.
2020-03-23mmp3/thermal: add #thermal-sensor-cellsLubomir Rintel1-0/+1
This is required as specified in the thermal/thermal.txt binding.
2020-03-23mmp3/thermal: also pass the complete register value to .tcLubomir Rintel1-5/+5
Aside from the temperature bits, it also needs the lowrange bit to tell which gray code table to look up the temperature value in. Otherwise it always uses the high one; and then it appears that the CPU is on fire: ok .ts tsense_reg[0]=a4200d00 31=reserved 29=status 26=en_wdog 21=auto_read_en wdog_tshld=d 100.5C int_tshld=0 78.0C temp_value=0 78.0C tsense_reg[1]=a8200009 31=reserved 29=status 27=lowrange 21=auto_read_en wdog_tshld=0 78.0C int_tshld=0 78.0C temp_value=9 113.0C tsense_reg[2]=a8200009 31=reserved 29=status 27=lowrange 21=auto_read_en wdog_tshld=0 78.0C int_tshld=0 78.0C temp_value=9 113.0C ok
2020-03-23mmp2/twsi: move node creation from arm/olpcLubomir Rintel4-35/+50
Move twsi-i2c.fth out from arm/olpc/ into arm/mmp2/ and have it create all the device nodes. If the platform doesn't need any, it can disable them, just like olpc/build-fw.fth does. Having the device around makes it possible for code like arm/mmp3/gic.fth to just always assume the device nodes are always around.
2020-03-23olpc/twsi-i2c: fix TWSI5 addressLubomir Rintel1-1/+1
In a comment, but still -- the documentation better be correct.
2020-03-23mmp2/twsi-node: fix the register rangeLubomir Rintel1-2/+2
The TWSI register block doesn't take up the whole page. In fact, on MMP3 the TWSI ranges are too close together so that they would overlap if they were 4K long: pxa2xx-i2c d4033800.i2c: can't request region for resource [mem 0xd4033800-0xd40347ff]
2020-03-23olpc/usb: also initialize HSICLubomir Rintel1-0/+5
Not on OLPC actually, since there HSIC is not used, but generally on MMP3. (This file prehaps really belongs to cpu/mmp2, but hey...)
2020-03-23mmp3: add HSIC USB driverLubomir Rintel2-1/+105
2020-03-23mmp2: add nodes for all SSP SPI devicesLubomir Rintel3-0/+46
Currently OLPC lumps together SSP1 and a SPI flash device, which is impractical for boards that use more SSP blocks. For now this doesn't implement the I/O driver; merely creates the device nodes.
2020-03-23olpc/sdhci: split out MMP2 SDHCI codeLubomir Rintel5-149/+162
This separates common MMP2/MMP3 SDHCI fixture from OLPC specifics. It allows reuse from non-OLPC MMP boards.
2020-03-23mmp3/gic: only fix up OLPC specific nodes on OLPCLubomir Rintel1-4/+6
2020-03-23mmp3/gic: create the TWD nodesLubomir Rintel1-0/+26
Arm TWD is used for local timer interrupt delivery on SMP systems. Enable it and create the appropriate nodes in the GIC fixup path, because it relies on GIC. Apparently the non-GIC interrupt controller can be used for CPU local timer interrupt delivery, but not with mainline Linux at this point.
2020-03-23mmp3/gic: don't create separate interrupt mux nodesLubomir Rintel1-111/+57
The interrupt muxes we use are the same as when booted in non-GIC mode. Just modify their "interrupts" property for the three-cell mode as well. Otherwise Linux would get super confused.
2020-03-23mmp3/gic: delete the interrupt property before adding it anewLubomir Rintel1-0/+1
2020-03-23mmp3: tidy up interrupt controller referencesLubomir Rintel8-9/+8
Drop unnecessary interrupt-parent. Qualify the names with the bus location so that it's obvious which interrupt controller do we mean (there also are muxes and possibly a GIC). Don't include INTC in MUX paths. It is there by accident -- the MUXes cna happily multiplex interrupts via the GIC as well. This will make it easier to tidy things up.
2020-03-23mmp3: add /snoop-control-unitLubomir Rintel2-0/+35
This is required to bring SMP up. Described by arm/scu.txt binding.
2020-03-23mmp2: make /interrupt-controller compatible with marvell,mmp3-intcLubomir Rintel1-1/+4
Described by interrupt-controller/mrvl,intc.txt bindings.
2020-03-23mmp3/usb2phy: make /usb2-phy compatible with marvell,mmp3-usb-phyLubomir Rintel1-0/+3
This allows the Linux PHY driver to bind and be used with the EHCI controller driver. Described by the phy/phy-mmp3-usb.txt binding.
2020-03-23mmp2: drop /apbc and /pmuaLubomir Rintel3-392/+0
Now that there are unused, we can drop them. All clocks are provided by the /clocks node.
2020-03-23thunderstone: switch UART to clock from /clocksLubomir Rintel1-1/+1
2020-03-23thunderstone: switch /usb to clock from /clocksLubomir Rintel1-1/+1
2020-03-23thunderstone: switch vmeta to clock from /clocksLubomir Rintel1-1/+1
2020-03-23mmp3: switch galcore to clock from /clocksLubomir Rintel1-1/+1
2020-03-23olpc/cl4: switch SDHCI to clock from /clocksLubomir Rintel2-6/+5
2020-03-23mmp3: switch /thermal to clock from /clocksLubomir Rintel2-8/+12
2020-03-23mmp2/clk: add clock IDs for HSICsLubomir Rintel1-0/+2
2020-03-23mmp2/clk: don't enable SD master clock along with SDHCI1Lubomir Rintel1-11/+11
It's pretty arbitrary, only because the knob appears in the same register. The master clock is actually also enabled in cpu/arm/olpc/sdhci.fth: 159 stand-init: SDHC clocks 160 h# 400 h# 54 pmua! \ Master SDH clock divisor
2020-03-23mmp2/clk: add a different compatible string on MMP3Lubomir Rintel1-0/+3
There are hardware differencies, such as more clocks available on the newer model. The driver needs to know which platform are we on.
2020-03-23mmp2/clk: add SSP4 clock IDLubomir Rintel1-0/+1
2020-03-23mmp2/clk: add clock IDs for TWSI3 and TWSI5Lubomir Rintel1-0/+6
2020-03-23mmp2/galcore: fix the clock numbersLubomir Rintel2-5/+4
Use the same numbers as Linux 5.7 uses.
2020-03-23mmp2/galcore: drop assigned clocksLubomir Rintel1-8/+0
This was a bad idea altogether. The driver should decide which mux to use or keep whatever firmware set. Moreover would require kernel to expose the muxes by allocating a clock ids for them.
2020-03-23mmp3: fix the cpus/ nodeLubomir Rintel3-12/+74
Include compatible strings for both CPU cores as well as the enable method. Remove the MMP3 cruft from the x86/pc CPU node -- it's irrelevant and we don't need to clutter it any more.
2020-03-23mmp3: add l2 cache controllerLubomir Rintel2-0/+42
It's Tauros 3 on MMP3. Conditionally use it instead of Tauros 2 on that platform.
2020-03-23olpc: split the mmp2 l2cache into a separate fileLubomir Rintel2-5/+35
It actually is not correct for mmp3. Move it aside, then we can conditionalize it.
2020-03-23olpc/4.0: fix the mmp3 compatible stringLubomir Rintel1-1/+1
"mrvl" prefix is incorrect and we don't have to use it here. The 3.5-based OLPC kernel's machine support binds to "olpc,xo-cl4", while mainline binds to "marvell,mmp3"
2020-03-23mmp2/random: create a device nodeLubomir Rintel1-0/+6
This way the Linux driver can bind.
2020-03-23dev/usb2: use @1 for root hub port indexLubomir Rintel1-1/+1
A hub is an USB device and devices' "port numbers range from 1 to 255" according to Open Firmware, Recommended Practice: Universal Serial Bus (Version 1, June 1, 1998). Linux thinks the same and if we kept indexing from zero it wouldn't associate the Device Tree firmware node with the device instance. Before: USB devices: /usb@d4208000/hub@0,0 /usb@d4208000/hub@0,0/scsi@4,0 /usb@d4208000/hub@0,0/ethernet@3,0 /usb@d4208000/hub@0,0/scsi@4,0/disk After: USB devices: /usb@d4208000/hub@1,0 /usb@d4208000/hub@1,0/scsi@4,0 /usb@d4208000/hub@1,0/ethernet@3,0 /usb@d4208000/hub@1,0/scsi@4,0/disk
2020-03-23cforth: update to a newer versionLubomir Rintel6-21/+14
This switches to the github.com/MitchBradley repository and pins it to the commit that is known to build well. It contains fixes for newer compilers, native and cross-compilers. The cforth image grew a couple of kilos, which is why move the shim 4k further on XO-1.75. Tested on XO-1.75 (MMP2) and Dell Ariel (MMP3).
2020-03-23fdt: Fix the node name stringsLubomir Rintel1-0/+1
Previously the tree would look like this: "/" "/subnode@0" "/subnode@0/leaf0" "/subnode@1" Whereas the correct version would be: "" "subnode@0" "leaf0" "subnode@1"
2020-03-23Revert "fdt: Fix the node name strings"Lubomir Rintel2-20/+1
phandle>basename sometimes causes infinite loops; no idea why. Drop that abomination. We'll fix things differently. This reverts commit a00c13115bf55c5caec907369584695c652fb03d.
2020-03-23arm/linux: drop load-base off stack if not a zImageLubomir Rintel1-1/+1
At the time we check the zImage magic, there's ( adr len ) on the stack. Pop both off if the magic check fails. Otherwise the load of a different kind of image (such as Forth text larger than 30 bytes -- we check the length on the previous line) would leave the load base on stack which is just not nice. Fixes: 2d7dad95a1f4 ("arm/linux: ignore the size from the zImage header")
2020-03-12forth/wrapper: include time.hLubomir Rintel1-0/+3
Fixes build warnings due to missing prototypes: forth/wrapper/wrapper.c: In function ‘today’: forth/wrapper/wrapper.c:2145:2: warning: implicit declaration of function ‘time’; did you mean ‘ftime’? [-Wimplicit-function-declaration] 2145 | time(&tadd); | ^~~~ | ftime forth/wrapper/wrapper.c:2146:15: warning: implicit declaration of function ‘localtime’ [-Wimplicit-function-declaration] 2146 | return((long)localtime(&tadd)); | ^~~~~~~~~
2020-03-12forth/wrapper: include sys/ioctl.h on UNIXLubomir Rintel1-1/+3
Fixes a build warning due to a missing prototype: forth/wrapper/wrapper.c: In function ‘f_ioctl’: forth/wrapper/wrapper.c:1968:15: warning: implicit declaration of function ‘ioctl’ [-Wimplicit-function-declaration] 1968 | return((long)ioctl((int)fd, (int)code, buf)); | ^~~~~
2020-03-12clients/lib: cast memchr() return value to non-constLubomir Rintel1-1/+1
strings.c: In function 'memchr': strings.c:196:11: warning: return discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] 196 | return p; | ^
2020-03-12clients/lib: include string.h for memset()Lubomir Rintel1-0/+1
Fixes a build warning due to a missing prototype: strprop.c: In function 'zalloc': strprop.c:13:2: warning: implicit declaration of function 'memset' [-Wimplicit-function-declaration] 13 | memset(vp, size, 0); | ^~~~~~
2020-03-12clients/lib: include string.h for memcpy()Lubomir Rintel1-0/+1
Fixes a build warning due to a missing prototype: malloc.c: In function 'realloc': malloc.c:245:3: warning: implicit declaration of function 'memcpy' [-Wimplicit-function-declaration] 245 | memcpy(newmem, mem, nbytes); | ^~~~~~
2020-03-12clients/lib/arm: add ofw_setup() prototypeLubomir Rintel1-0/+1
start.c: In function '_start': start.c:23:5: warning: implicit declaration of function 'ofw_setup' [-Wimplicit-function-declaration] 23 | ofw_setup(); | ^~~~~~~~~
2020-03-12clients/emacs: disable some compilers warningsLubomir Rintel2-0/+4
In K&R style that's used across the whole emacs client code base, it's common not to declare types in function return values and arguments. Do not warn about that.
2020-03-12clients/emacs: don't return without a valueLubomir Rintel1-2/+2
Return TRUE on success like the rest of the code base does to silence the warnings: ansi.c: In function 'ansifcol': ansi.c:86:3: warning: 'return' with no value, in function returning non-void 86 | return; | ^~~~~~ ansi.c:80:1: note: declared here 80 | ansifcol(color) /* set the current output color */ | ^~~~~~~~ ansi.c: In function 'ansibcol': ansi.c:108:3: warning: 'return' with no value, in function returning non-void 108 | return; | ^~~~~~ ansi.c:102:1: note: declared here 102 | ansibcol(color) /* set the current background color */ | ^~~~~~~~
2020-03-12build: turn off PIE by defaultLubomir Rintel3-3/+3
Some compilers (e.g. Debian) now turn PIE on by default. It makes no sense for use, and the inclusion of .got table confuses our tooling.
2020-03-12arm/olpc: use the same compiler to ofw clients and mcnandLubomir Rintel1-1/+1
The mcnand build script otherwise tries to guess and that might fail, because it used uname -p, which is non-portable.
2020-03-12clients: do not use uname -pLubomir Rintel2-2/+2
It is documented as "non-portable" and it basically does nothing on Linux. Fedora patches coreutils so that it is effectively same as -m, but other Linux distros just print "unknown".
2020-03-12builder.dic: rebuildLubomir Rintel3-0/+0
Done so that the default permission fixes propagate. The following was run, on a x86 host: make -C cpu/arm/build builder.dic make -C cpu/x86/build builder.dic make -C cpu/ppc/build -f Makefile.cross builder.dic
2020-03-12kernel/sysio: don't default to all-ones permissionsLubomir Rintel1-1/+1
The file-protection variable is understood to be an (unsigned) UNIX file mode everywhere, and contrary to what the comment says the -1 is not a default of any sort. In fact, such a file mode is a pretty terrible thing, because the files end up being setuid executables. That is -- anyone could execute them with the privileges of whoever run the build. It's a matter of luck that umask typically chops off the writable bits and the images generated during the build are likely to just terminate upon an attempt to execute them. This calls for wisdom: let's use what the UNIX programs typically use for mode bits, for it is the number of a regular non-executable file, and this number is 666, octal.
2020-03-12all: drop a handful of extra executable bitsLubomir Rintel180-0/+0
Not sure why are they there. Perhaps they crawled in from Windows file systems.
2020-03-12geode/display: add /chosen/framebuffer simple-framebuffer nodeLubomir Rintel2-2/+29
Hand the framebuffer set up by OFW over to the operating system. This enables Linux to draw on the screen if the native driver is not (yet) available. Follows the display/simple-framebuffer.txt bindings.
2020-03-12pc/olpc: link /dcon with the /display and /panelLubomir Rintel1-0/+8
Draw a device graph edge between the three, so that the drivers will be able to discover how are the devices connected. We need to do this after the PCI device is scanned, because some of the nodes are created by the PCI drop-ins.
2020-03-12pc/olpc: link /camera to /image-sensorLubomir Rintel1-0/+6
Draw a device graph edge between the two, so that the driver will be able to discover how are they connected. We need to do this after the PCI device is scanned, because the CAFE function drop-in will create the necessary nodes, but the FCode does not have a provision for drawing device graphs.
2020-03-12olpc/dcon: add gpio and ports to /dcon nodeLubomir Rintel1-0/+47
This will allow the driver to discover how is the DCON connected in the system.
2020-03-12geode/gxfb: add ports to the /displayLubomir Rintel1-0/+29
This will allow drawing the device graph to the DCON and ultimately also to the panel.
2020-03-12olpc/cafecamera: create port and an image-sensor nodesLubomir Rintel2-0/+36
This allows the Linux driver to discover which sensor is attached and how instead of hardcoding it. This also means that we need to probe the sensor, similarly to what we do on XO-1.75.
2020-03-12pc/olpc: split gxfb, smbus and dcon into separate nodesLubomir Rintel7-109/+131
This will ensure we all have all the nodes for the Linux drivers to bind to. Essentially the same thing the olpc/1.75 does.
2020-03-12gxfb: move maybe-set-cmos from dconLubomir Rintel3-18/+15
It ir concerned with configuration of the Geode CRTC and is only used from the CRTC code itself.
2020-03-12pc/olpc: add the /embedded-controller nodeLubomir Rintel2-2/+22
2020-03-12pc/olpc: add model and compatible strings to the root nodeLubomir Rintel1-0/+3
They are sort of expected to be around.
2020-03-12pc/olpc: add /panel nodeLubomir Rintel1-0/+1
2020-03-12x86/olpc: add GPIO pin definitionsLubomir Rintel2-0/+15
Will be useful later on.
2020-03-12geode/gpio: make /isa node a gpio-controllerLubomir Rintel7-3/+8
The LPC node provides the GPIO functionality. Add properties specified by the Documentation/devicetree/bindings/common-properties.txt bindings.
2020-03-12x86/olpc: enable device tree flatteningLubomir Rintel1-0/+1
This allows booting kernels with CONFIG_OF_FLATTREE instead of CONFIG_OF_PROMTREE.
2020-03-12x86/linux: add support for flattening the device treeLubomir Rintel1-0/+17
This allows flattiening the DT on x86 platform and passing the FDT to the kernel via the "The Linux/x86 Boot Protocol" [1] version 2.09. Specifically, this uses a setup_data of type SETUP_DTB as documented in "Entry point for arch/x86" paragraph of devicetree/booting-without-of.txt. [1] https://www.kernel.org/doc/html/v5.3/x86/boot.html
2020-03-12gitignore: ignore cpu/x86/pc/olpc/build/testicons/Lubomir Rintel1-0/+1
Those are build artifacts.
2020-03-12usb2/keyboard: fix the "\" keyLubomir Rintel1-4/+4
I'm unable to type a Backslash. None of the keyboards I have seems to be able to produce the 0x31 scan code. All of them have a key that produces scan code 0x64 just to the right of the left Shift key, labeled as follows: | * \ & That seems to be the "Keyboard Non-US \ and |" key. Oddly enough, Linux with US English layout considers this a "<" and ">" (shifted) key. There's another pair of "<" and ">" keys at the other end of the row. There's another Backslash key with code 0x32 on keyboard with Czech layout, just above the right Shift key, left of Return: | ' \ ¨ That is somewhat closer to where it would it be on an US keyboard. The Return key on these keyboards spans two rows, occupying also the space where the US "\" key would be. On a keyboard with English keys + Euro key it is labeled differently: ~ # The HID boot descriptor seems to suggest that indeed this should be a "Keyboard Non-US # and ~" key. However, Linux with US English layout uses this as a Backslash/Pipe key. I'm labeling both keys as Backslash/Pipe. The 0x32 one matches the labels on all the keyboards around here (Czech and English International?). The 0x64 one matches the Czech layout, and, more importantly, what an user would actually expect because that's how the key usually works in the OS. Both keys were undefined until now so I guess I'm unlikely to ruin things for anyone.
2020-03-12olpc/via: force IASL outputLubomir Rintel1-2/+2
We do use some faulty names, but we can't fix them because Linux drivers bind to them: dsdt.dsl(1964) : error 6033 - _HID string must be exactly 7 or 8 characters (XO15EC) dsdt.dsl(1976) : error 6136 - Non-hex letters must be upper case (15EBK)
2020-03-12clients/emacs: disable some warningsLubomir Rintel1-0/+2
The Microemacs heavily relies on some implicit behavior of ancient compilers that GCC now warns about. Don't warn about that; it may drown warnings about actual problems.
2020-03-12memtest86: get rid of duplicate symbolsLubomir Rintel1-3/+3
There's no such thing as extern inline; perhaps just a typo. But now it causes the build to fail. make[1]: Entering directory 'clients/memtest86' ... ld -shared -Bsymbolic -T memtest_shared.lds -o memtest_shared head.o \ reloc.o main.o test.o init.o lib.o patn.o screen_buffer.o config.o \ memsize.o random.o olpc.o lfbega.o ld: lib.o: in function `__inb': lib.c:(.text+0x0): multiple definition of `__inb'; init.o:init.c:(.text+0x0): first defined here ld: lib.o: in function `__inbc': lib.c:(.text+0x6): multiple definition of `__inbc'; init.o:init.c:(.text+0x6): first defined here ld: lib.o: in function `__inb_p': ...
2020-03-12memtest86: fix build with recent gccLubomir Rintel1-0/+1
It includes a section with the build id: ld --warn-constructors --warn-common -static -T memtest_shared.lds \ -o memtest_shared head.o reloc.o main.o test.o init.o lib.o patn.o \ screen_buffer.o config.o memsize.o random.o olpc.o lfbega.o && \ ld -shared -Bsymbolic -T memtest_shared.lds -o memtest_shared head.o \ reloc.o main.o test.o init.o lib.o patn.o screen_buffer.o config.o \ memsize.o random.o olpc.o lfbega.o ld: could not find section .gnu.hash ld: final link failed: nonrepresentable section on output make[1]: *** [Makefile:117: memtest_shared] Error 1
2019-10-29arm/olpc: drop make-sensor-node from gpio-i2cLubomir Rintel1-14/+0
It is not used.
2019-10-29olpc/1.75: include the panel device from the panel.fthLubomir Rintel1-14/+2
No functional change.
2019-10-29dev/olpc: add /panel node moduleLubomir Rintel1-0/+12
The simple-panel driver shall support this, described by the display/panel/innolux,ls075at011.txt binding.
2019-10-29mmp2: use link-endpoints to draw device graphsLubomir Rintel2-13/+3
No functional change.
2019-10-29ofwcore: allow drawing device graphsLubomir Rintel1-0/+15
This adds convenience words for linking device tree nodes into graphs as described in Documentation/devicetree/bindings/graph.txt.
2019-10-29dcon: drop dcon-found?Lubomir Rintel3-6/+0
It is not used.
2019-08-13Merge pull request #3 from lkundrak/lr/xo175-zimage-fixJames Cameron1-1/+1
arm/linux: drop an extra copy of the loaded address
2019-08-12arm/linux: drop an extra copy of the loaded addressLubomir Rintel1-1/+1
The commit 2d7dad95a1f4 ('arm/linux: ignore the size from the zImage header') duplicates the length of the loaded area before comparing it to 30, but fails to drop the extra copy on early return. Fix that.
2019-05-09Merge pull request #2 from lkundrak/lr/vivanteJames Cameron3-12/+29
WIP: Make the GPU work
2019-05-09Merge pull request #1 from lkundrak/lr/lcdclkJames Cameron1-1/+1
olpc/lcd: fix a typo
2019-05-08olpc/lcd: fix a typoLubomir Rintel1-1/+1
2019-05-08mmp2/galcore: drive the BUS and GC clocks from USB_PLLLubomir Rintel1-0/+8
2019-05-08mmp2/galcore: make compatible with vivante,gcLubomir Rintel1-4/+11
2019-05-08olpc: include mmp2/galcore on MMP2Lubomir Rintel2-8/+3
2019-05-08mmp2/clk: provide some more clocksLubomir Rintel1-1/+9
...and a power domain for the GPU.
2019-05-08mmp2/galcore: fix a typoLubomir Rintel1-2/+1
2019-04-20q4e01jaJames Cameron2-2/+1
- disable dtcompat.fth
2019-04-20q4e00jaJames Cameron1-2/+2
2019-04-19olpc/lcd: add /chosen/framebuffer simple-framebuffer nodeLubomir Rintel1-1/+31
Hand the framebuffer set up by OFW over to the operating system. This enables Linux to draw on the screen if the native driver is not (yet) available. Follows the display/simple-framebuffer.txt bindings.
2019-04-19olpc: drop /apbc and /pmua on XO-1.75Lubomir Rintel1-0/+2
No peripherals on this machine use clocks from these nodes anymore. They're still kept for other machines that are not switched (yet).
2019-04-19olpc: switch UART to clock from /clocksLubomir Rintel1-4/+4
2019-04-19olpc: switch SPI to clock from /clocksLubomir Rintel2-2/+2
2019-04-19olpc: switch /display to clock from /clocksLubomir Rintel1-2/+8
2019-04-19olpc: remove clock from /ap-spLubomir Rintel1-1/+0
The operating system should not be concerned with management of this clock. It can not disable it and enable it back.
2019-04-19olpc: switch /usb to clock from /clocksLubomir Rintel1-1/+1
2019-04-19olpc: switch vmeta to clock from /clocksLubomir Rintel1-1/+1
2019-04-19olpc: switch audio to clock from /clocksLubomir Rintel2-3/+3
2019-04-19olpc: switch SDHCI to clock from /clocksLubomir Rintel2-3/+3
2019-04-19olpc: switch /camera to clock from /clocksLubomir Rintel1-1/+1
2019-04-19mmp2: switch TWSI to clock from /clocksLubomir Rintel2-8/+8
2019-04-19mmp2: switch /timer to clock from /clocksLubomir Rintel1-1/+1
2019-04-19mmp2: switch /rtc to clock from /clocksLubomir Rintel1-1/+1
2019-04-19mmp2: switch /gpio to clock from /clocksLubomir Rintel1-1/+1
2019-04-19mmp2: switch galcore to clock from /clocksLubomir Rintel2-1/+2
2019-04-19mmp2/clk: move my-clock-on/off from pmua.fth to clk.fthLubomir Rintel2-15/+15
2019-04-19mmp2/clk: add AUDIO clock managementLubomir Rintel1-0/+65
Copied over from cpu/arm/mmp2/pmua.fth.
2019-04-19mmp2/clk: add CCIC0 clock managementLubomir Rintel1-0/+68
Copied over from cpu/arm/mmp2/pmua.fth.
2019-04-19mmp2/clk: add bogus clock numbers for undocumented clocksLubomir Rintel1-0/+5
TODO: These don't have numbers assigned in the bindings doc. Invent numbers for them so that they can be referred to, but they eventually need to get real assignments.
2019-04-19mmp2/clk: add /clocks nodeLubomir Rintel2-0/+102
Provides a marvell,mmp2-clock compatible clock implementation as described in the clock/marvell,mmp2.txt binding doc. This should eventually replace the /apbc and /pmua nodes, which follow a different binding than Linux expects. Following commits switch the peripherals to this new nod.
2019-04-19olpc/1.75: make /sdhci@d4281000 (emmc) match mrvl,pxav3-mmc bindingLubomir Rintel1-1/+4
2019-04-19olpc/1.75: make /sdhci@d4280800 (wlan) match mrvl,pxav3-mmc bindingLubomir Rintel1-1/+6
2019-04-19olpc/1.75: make sdhci@d4280000 (ext) match mrvl,pxav3-mmc bindingLubomir Rintel1-1/+4
2019-04-19kb3700: make sure the SSP's TXFIXO is empty on closeLubomir Rintel1-0/+5
The Linux driver would get confused if it wasn't empty.
2019-04-19olpc: add the olpc,xo1.75-ec compatible /ec-spi/slaveLubomir Rintel1-2/+13
2019-04-19olpc/sdhci: add /pwrseq0 power sequencer for wlanLubomir Rintel2-0/+8
This creates a MMC power sequencer instance that fiddles the reset and power pins in order to ensure the card is initialized and powered up when necessary. It's defined by the mmc/mmc-pwrseq-sd8787.txt binding. Link it to MMC controller WLAN card is connected to following the mmc/mmc.txt bindings.
2019-04-19olpc/sdhci: add /fixedregulator0 regulator for /wlanLubomir Rintel2-0/+12
This creates an instance of fixed regulator, defined by regulator/fixed-regulator.txt binding. Bind it to MMC controller WLAN card is connected to following the regulator/regulator.txt and mmc/mmc.txt bindings.
2019-04-19olpc/1.75: move the /panel from /display to /Lubomir Rintel1-3/+1
There's no reason the panel should be under the LCDC. They're connected via the device graph and there's another chip sitting in between anyways.
2019-04-19olpc/1.75: make /panel compatible with innolux,ls075at011Lubomir Rintel1-0/+2
The simple-panel driver shall support this, described by the display/panel/innolux,ls075at011.txt binding.
2019-04-19olpc/1.75: connect the /panel to the /dconLubomir Rintel2-0/+13
Link the two following the bindings/graph.txt binding to describe the display pipeline for the DRM driver.
2019-04-19olpc/lcd: connect the /display to the /dconLubomir Rintel2-0/+13
Link the two following the bindings/graph.txt binding to describe the display pipeline for the DRM driver.
2019-04-19olpc: make /dcon compatible with himax,hx8837Lubomir Rintel1-0/+16
2019-04-19olpc: add /port nodes to /dconLubomir Rintel1-0/+27
This adds port nodes, following the bindings/graph.txt binding, needed for constructing the device graph from the LCDC to the panel.
2019-04-19olpc: add /reserved-memory/framebuffer for Armada DRMLubomir Rintel1-0/+17
2019-04-19olpc/lcd: make /display compatible with marvell,mmp2-lcdLubomir Rintel1-1/+3
This allows the Armada DRM driver to bind, following display/armada/marvell-armada-drm.txt. TODO: Not mainlined yet. Also, this will probably end up with two different clock sources: one for the LCDC peripheral (without it the registers won't be accessible) and one for the pixel clock. Patches were sent out, not yet merged.
2019-04-19olpc: have the /camera provide clock for /image-sensorLubomir Rintel1-0/+8
2019-04-19olpc: link the /camera and /image-sensor into a device graphLubomir Rintel2-0/+21
This will tell the V4L drivers about how are the devices related, following the bindings/graph.txt binding.
2019-04-19olpc/mmp2camera: make /camera compatible with marvell,mmp2-ccicLubomir Rintel1-0/+2
This will allow the Linux driver, following the media/marvell,mmp2-ccic.txt binding, to attach.
2019-04-19olpc/gpio-i2c: specify i2c-gpio,timeout-ms for /camera-i2cLubomir Rintel1-0/+2
i2c/i2c-gpio.txt TODO: Why
2019-04-19olpc/gpio-i2c: mark SDA and SCL lines open drainLubomir Rintel1-8/+10
Otherwise Linux's disgruntled i2c-gpio driver logs a warning.
2019-04-19olpc/gpio-i2c: use zero #size-cellsLubomir Rintel3-10/+10
The I2C devices are addressed with a single address number and i2c/i2c-gpio.txt bindings say so too.
2019-04-19olpc/gpio-i2c: add powerdown-gpios and reset-gpios to /image-sensorLubomir Rintel1-0/+3
The Linux bindings use these properties, described by media/i2c/ov7670.txt.
2019-04-19olpc: make /image-sensor compatible with ovti,ov7670Lubomir Rintel2-2/+2
That is what the Linux driver binds to as described in media/i2c/ov7670.txt.
2019-04-19olpc: add /gpio-keys nodeLubomir Rintel2-0/+100
This tells the Linux gpio-keys driver to generate key codes for Lid switch, E-Book mode and Audio plug events. See input/gpio-keys.txt bindings.
2019-04-19olpc: add /l2-cache nodeLubomir Rintel1-0/+6
If this is absent, the kernel disables the L2 cache. Sad. Described by the arm/mrvl/tauros2.txt binding. TODO: perhaps this belong to some more generic MMP2 support code. That may involve splitting the x86 and arm cpunode.fth instead of ifdefing various parts of it.
2019-04-19olpc/usb: rename the clock to match marvell,pxau2o-ehci bindingLubomir Rintel1-1/+1
2019-04-19olpc/usb: link the PHY node to /usbLubomir Rintel1-4/+2
This allows the Linux EHCI driver locate the PHY, as described by the usb/ehci-mv.txt binding. Some unused properties are removed too.
2019-04-19marvell/utmiphy: make /usb2-phy compatible with marvell,mmp2-usb-phyLubomir Rintel1-0/+3
This allows the Linux PHY driver to bind and be used with the EHCI controller driver. Described by the phy/phy-pxa-usb.txt binding.
2019-04-19olpc: make /battery compatible with olpc,xo1.5-battery on > XO-1Lubomir Rintel1-0/+3
The Linux's driver needs to tell the two apart so that it can decide whether to expose the ambient temperature. Described by the power/supply/olpc_battery.txt binding. TODO: Not yet mainlined.
2019-04-19olpc/accelerometer: make /i2c/accelerometer compatible with st,lis3lv02dLubomir Rintel1-0/+1
This allows the Linux driver to attach, following the iio/accel/lis302.txt binding. TODO: Is this necessary? Wouldn't the driver core just fall back to the correct driver? Should the existing compatible string be modified instead?
2019-04-19olpc/rtc: make /i2c/rtc compatible with dallas,ds1338Lubomir Rintel1-0/+1
The device in fact is compatible with the Dallas DS1388, covered by the rtc/rtc-ds1307.txt binding. This allows the Linux driver to bind.
2019-04-19mmp2/gpio: make /gpio be compatible with marvell,mmp2-gpioLubomir Rintel1-0/+1
This allows the Linux driver that follows the gpio/mrvl-gpio.txt binding to attach to the device.
2019-04-19mmp2/gpio: add ranges property to /gpioLubomir Rintel1-0/+1
There are the mux nodes. TODO: Really? But they are not on the main bus; perhaps this could be dropped.
2019-04-19mmp2/gpio: fix the /gpio #interrupt-cellsLubomir Rintel1-1/+1
The mmp2 gpios actually have two cells: a pin number and polarity. Documented in gpio/mrvl-gpio.txt.
2019-04-19mmp2/irq: add ranges property to /interrupt-controllerLubomir Rintel1-0/+2
The "regs" property of the "mrvl,mmp2-mux-intc" devices are offsets from intc's base, not addresses on the parent bus. This shouldn't have happened, but it had, and the bindings can't be changed. To add insult to injury, Linux's mmp2 irqchip driver gets the ranges with of_address_to_resource() as if it were bus addresses. To make it happy, let's pretend they actually are... TODO: simple-bus is probably not needed...
2019-04-19mmp2/uart: specify reg-shift propertyLubomir Rintel1-0/+2
This makes the Linux's 8250_of driver happy. It is broken: there are two more drivers (yes...) that claim mrvl,mmp-uart compatibility and both assume register shift of 2 bits. The third one should do the same. However, we can't really tell or decide which driver is going to be bound, so let's just add the property before 8250_of gets fixed. It doesn't hurt to be a little bit more explicit anyway.
2019-04-19core: specify device_type for /memory nodeLubomir Rintel1-0/+2
Linux's early_init_dt_scan_nodes() won't be able to find a memory node without this and the boot will fail very early.